"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 Ta(){}function lb(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(n){typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}var Cs=function(e){yl(n,e);var t=ab(n);function n(){var r,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(Mt(this,n),r=t.call(this),wl&&rr.call(Kn(r)),r.options=Ch(o),r.services={},r.logger=an,r.modules={external:[]},lb(Kn(r)),i&&!r.isInitialized&&!o.isClone){if(!r.options.initImmediate)return r.init(o,i),ra(r,Kn(r));setTimeout(function(){r.init(o,i)},0)}return r}return $t(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=ib();this.options=en(en(en({},s),this.options),Ch(i)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=en(en({},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?an.init(l(this.modules.logger),this.options):an.init(null,this.options);var u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=eb);var c=new K_(this.options);this.store=new V_(this.options.resources,this.options);var f=this.services;f.logger=an,f.resourceStore=this.store,f.languageUtils=c,f.pluralResolver=new Y_(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 J_(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new ob(l(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(m){for(var p=arguments.length,v=new Array(p>1?p-1:0),S=1;S1?p-1:0),S=1;S
0&&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 h=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];h.forEach(function(m){o[m]=function(){var p;return(p=o.store)[m].apply(p,arguments)}});var g=["addResource","addResources","addResourceBundle","removeResourceBundle"];g.forEach(function(m){o[m]=function(){var p;return(p=o.store)[m].apply(p,arguments),o}});var y=Ho(),b=function(){var p=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 p(null,o.t.bind(o));o.changeLanguage(o.options.lng,p)};return this.options.resources||!this.options.initImmediate?b():setTimeout(b,0),y}},{key:"loadResources",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ta,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(h){if(!!h){var g=i.services.languageUtils.toResolveHierarchy(h);g.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=Ho();return o||(o=this.languages),i||(i=this.options.ns),a||(a=Ta),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"&&Ug.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=Ho();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,h){h?(l(h),a.translator.changeLanguage(h),a.isLanguageChangingTo=void 0,a.emit("languageChanged",h),a.logger.log("languageChanged",h)):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 h=typeof d=="string"?d:a.services.languageUtils.getBestMatchFromCodes(d);h&&(a.language||l(h),a.translator.language||a.translator.changeLanguage(h),a.services.languageDetector&&a.services.languageDetector.cacheUserLanguage(h)),a.loadResources(h,function(g){u(g,h)})};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(c):c(o),s}},{key:"getFixedT",value:function(o,i,a){var s=this,l=function u(c,f){var d;if(Hn(f)!=="object"){for(var h=arguments.length,g=new Array(h>2?h-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(h,g){var y=i.services.backendConnector.state["".concat(h,"|").concat(g)];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=Ho();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=Ho();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"];return i.indexOf(this.services.languageUtils.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]:Ta,s=en(en(en({},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=en({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new Sh(l.services,l.options),l.translator.on("*",function(c){for(var f=arguments.length,d=new Array(f>1?f-1:0),h=1;h0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new Cs(e,t)});var et=Cs.createInstance();et.createInstance=Cs.createInstance;et.createInstance;et.init;et.loadResources;et.reloadResources;et.use;et.changeLanguage;et.getFixedT;et.t;et.exists;et.setDefaultNamespace;et.hasLoadedNamespace;et.loadNamespaces;et.loadLanguages;var Fg=[],ub=Fg.forEach,cb=Fg.slice;function fb(e){return ub.call(cb.call(arguments,1),function(t){if(t)for(var n in t)e[n]===void 0&&(e[n]=t[n])}),e}var kh=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,db=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(!kh.test(o.domain))throw new TypeError("option domain is invalid");a+="; Domain=".concat(o.domain)}if(o.path){if(!kh.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},Th={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=db(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}},Ko=null,Ph=function(){if(Ko!==null)return Ko;try{Ko=window!=="undefined"&&window.localStorage!==null;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Ko=!1}return Ko},vb={name:"localStorage",lookup:function(t){var n;if(t.lookupLocalStorage&&Ph()){var r=window.localStorage.getItem(t.lookupLocalStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupLocalStorage&&Ph()&&window.localStorage.setItem(n.lookupLocalStorage,t)}},qo=null,Lh=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},mb={name:"sessionStorage",lookup:function(t){var n;if(t.lookupSessionStorage&&Lh()){var r=window.sessionStorage.getItem(t.lookupSessionStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupSessionStorage&&Lh()&&window.sessionStorage.setItem(n.lookupSessionStorage,t)}},gb={name:"navigator",lookup:function(t){var n=[];if(typeof navigator<"u"){if(navigator.languages)for(var r=0;r0?n:void 0}},yb={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}},wb={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}},Sb={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 _b(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}}var jg=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Mt(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return $t(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=fb(r,this.options||{},_b()),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=o,this.addDetector(pb),this.addDetector(hb),this.addDetector(vb),this.addDetector(mb),this.addDetector(gb),this.addDetector(yb),this.addDetector(wb),this.addDetector(Sb)}},{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}();jg.type="languageDetector";function Ec(e){return Ec=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},Ec(e)}var Bg=[],bb=Bg.forEach,Eb=Bg.slice;function xc(e){return bb.call(Eb.call(arguments,1),function(t){if(t)for(var n in t)e[n]===void 0&&(e[n]=t[n])}),e}function zg(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":Ec(XMLHttpRequest))==="object"}function xb(e){return!!e&&typeof e.then=="function"}function Rb(e){return xb(e)?e:Promise.resolve(e)}var is=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ad(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Cb(e){var t=e.default;if(typeof t=="function"){var n=function(){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}function Ob(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 Os={exports:{}},Pa={exports:{}},Nh;function kb(){return Nh||(Nh=1,function(e,t){var n=typeof self<"u"?self:is,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(_){return _&&DataView.prototype.isPrototypeOf(_)}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(_){return _&&u.indexOf(Object.prototype.toString.call(_))>-1};function f(_){if(typeof _!="string"&&(_=String(_)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(_))throw new TypeError("Invalid character in header field name");return _.toLowerCase()}function d(_){return typeof _!="string"&&(_=String(_)),_}function h(_){var L={next:function(){var j=_.shift();return{done:j===void 0,value:j}}};return s.iterable&&(L[Symbol.iterator]=function(){return L}),L}function g(_){this.map={},_ instanceof g?_.forEach(function(L,j){this.append(j,L)},this):Array.isArray(_)?_.forEach(function(L){this.append(L[0],L[1])},this):_&&Object.getOwnPropertyNames(_).forEach(function(L){this.append(L,_[L])},this)}g.prototype.append=function(_,L){_=f(_),L=d(L);var j=this.map[_];this.map[_]=j?j+", "+L:L},g.prototype.delete=function(_){delete this.map[f(_)]},g.prototype.get=function(_){return _=f(_),this.has(_)?this.map[_]:null},g.prototype.has=function(_){return this.map.hasOwnProperty(f(_))},g.prototype.set=function(_,L){this.map[f(_)]=d(L)},g.prototype.forEach=function(_,L){for(var j in this.map)this.map.hasOwnProperty(j)&&_.call(L,this.map[j],j,this)},g.prototype.keys=function(){var _=[];return this.forEach(function(L,j){_.push(j)}),h(_)},g.prototype.values=function(){var _=[];return this.forEach(function(L){_.push(L)}),h(_)},g.prototype.entries=function(){var _=[];return this.forEach(function(L,j){_.push([j,L])}),h(_)},s.iterable&&(g.prototype[Symbol.iterator]=g.prototype.entries);function y(_){if(_.bodyUsed)return Promise.reject(new TypeError("Already read"));_.bodyUsed=!0}function b(_){return new Promise(function(L,j){_.onload=function(){L(_.result)},_.onerror=function(){j(_.error)}})}function m(_){var L=new FileReader,j=b(L);return L.readAsArrayBuffer(_),j}function p(_){var L=new FileReader,j=b(L);return L.readAsText(_),j}function v(_){for(var L=new Uint8Array(_),j=new Array(L.length),O=0;O-1?L:_}function A(_,L){L=L||{};var j=L.body;if(_ instanceof A){if(_.bodyUsed)throw new TypeError("Already read");this.url=_.url,this.credentials=_.credentials,L.headers||(this.headers=new g(_.headers)),this.method=_.method,this.mode=_.mode,this.signal=_.signal,!j&&_._bodyInit!=null&&(j=_._bodyInit,_.bodyUsed=!0)}else this.url=String(_);if(this.credentials=L.credentials||this.credentials||"same-origin",(L.headers||!this.headers)&&(this.headers=new g(L.headers)),this.method=N(L.method||this.method||"GET"),this.mode=L.mode||this.mode||null,this.signal=L.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&j)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(j)}A.prototype.clone=function(){return new A(this,{body:this._bodyInit})};function W(_){var L=new FormData;return _.trim().split("&").forEach(function(j){if(j){var O=j.split("="),P=O.shift().replace(/\+/g," "),I=O.join("=").replace(/\+/g," ");L.append(decodeURIComponent(P),decodeURIComponent(I))}}),L}function F(_){var L=new g,j=_.replace(/\r?\n[\t ]+/g," ");return j.split(/\r?\n/).forEach(function(O){var P=O.split(":"),I=P.shift().trim();if(I){var M=P.join(":").trim();L.append(I,M)}}),L}k.call(A.prototype);function X(_,L){L||(L={}),this.type="default",this.status=L.status===void 0?200:L.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in L?L.statusText:"OK",this.headers=new g(L.headers),this.url=L.url||"",this._initBody(_)}k.call(X.prototype),X.prototype.clone=function(){return new X(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new g(this.headers),url:this.url})},X.error=function(){var _=new X(null,{status:0,statusText:""});return _.type="error",_};var ce=[301,302,303,307,308];X.redirect=function(_,L){if(ce.indexOf(L)===-1)throw new RangeError("Invalid status code");return new X(null,{status:L,headers:{location:_}})},a.DOMException=i.DOMException;try{new a.DOMException}catch{a.DOMException=function(L,j){this.message=L,this.name=j;var O=Error(L);this.stack=O.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function ae(_,L){return new Promise(function(j,O){var P=new A(_,L);if(P.signal&&P.signal.aborted)return O(new a.DOMException("Aborted","AbortError"));var I=new XMLHttpRequest;function M(){I.abort()}I.onload=function(){var z={status:I.status,statusText:I.statusText,headers:F(I.getAllResponseHeaders()||"")};z.url="responseURL"in I?I.responseURL:z.headers.get("X-Request-URL");var E="response"in I?I.response:I.responseText;j(new X(E,z))},I.onerror=function(){O(new TypeError("Network request failed"))},I.ontimeout=function(){O(new TypeError("Network request failed"))},I.onabort=function(){O(new a.DOMException("Aborted","AbortError"))},I.open(P.method,P.url,!0),P.credentials==="include"?I.withCredentials=!0:P.credentials==="omit"&&(I.withCredentials=!1),"responseType"in I&&s.blob&&(I.responseType="blob"),P.headers.forEach(function(z,E){I.setRequestHeader(E,z)}),P.signal&&(P.signal.addEventListener("abort",M),I.onreadystatechange=function(){I.readyState===4&&P.signal.removeEventListener("abort",M)}),I.send(typeof P._bodyInit>"u"?null:P._bodyInit)})}return ae.polyfill=!0,i.fetch||(i.fetch=ae,i.Headers=g,i.Request=A,i.Response=X),a.Headers=g,a.Request=A,a.Response=X,a.fetch=ae,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}(Pa,Pa.exports)),Pa.exports}(function(e,t){var n;if(typeof fetch=="function"&&(typeof is<"u"&&is.fetch?n=is.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof Ob<"u"&&(typeof window>"u"||typeof window.document>"u")){var r=n||kb();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(Os,Os.exports);const Vg=Os.exports,Ah=Ng({__proto__:null,default:Vg},[Os.exports]);function ks(e){return ks=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},ks(e)}var wn;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?wn=global.fetch:typeof window<"u"&&window.fetch?wn=window.fetch:wn=fetch);var ki;zg()&&(typeof global<"u"&&global.XMLHttpRequest?ki=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(ki=window.XMLHttpRequest));var Ts;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?Ts=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(Ts=window.ActiveXObject));!wn&&Ah&&!ki&&!Ts&&(wn=Vg||Ah);typeof wn!="function"&&(wn=void 0);var Rc=function(t,n){if(n&&ks(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},Ih=function(t,n,r){wn(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)},Dh=!1,Tb=function(t,n,r,o){t.queryStringParams&&(n=Rc(n,t.queryStringParams));var i=xc({},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=xc({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:i},Dh?{}:a);try{Ih(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]}),Ih(n,s,o),Dh=!0}catch(u){o(u)}}},Pb=function(t,n,r,o){r&&ks(r)==="object"&&(r=Rc("",r).slice(1)),t.queryStringParams&&(n=Rc(n,t.queryStringParams));try{var i;ki?i=new ki:i=new Ts("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)}},Lb=function(t,n,r,o){if(typeof r=="function"&&(o=r,r=void 0),o=o||function(){},wn&&n.indexOf("file:")!==0)return Tb(t,n,r,o);if(zg()||typeof ActiveXObject=="function")return Pb(t,n,r,o);o(new Error("No fetch and no xhr implementation found!"))};function Nb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mh(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Nb(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return Ab(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=xc(o,this.options||{},Db()),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=Rb(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 h=s.options.addPath;typeof s.options.addPath=="function"&&(h=s.options.addPath(d,r));var g=s.services.interpolator.interpolate(h,{lng:d,ns:r});s.options.request(s.options,g,l,function(y,b){u+=1,c.push(y),f.push(b),u===n.length&&a&&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(h){l.indexOf(h)<0&&l.push(h)})};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,h){d&&a.warn("loading namespace ".concat(f," for language ").concat(c," failed"),d),!d&&h&&a.log("loaded namespace ".concat(f," for language ").concat(c),h),o.loaded("".concat(c,"|").concat(f),d,h)})})})}}}]),e}();Wg.type="backend";var R={exports:{}},ue={};/**
+ * @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 oa=Symbol.for("react.element"),Mb=Symbol.for("react.portal"),$b=Symbol.for("react.fragment"),Ub=Symbol.for("react.strict_mode"),Fb=Symbol.for("react.profiler"),jb=Symbol.for("react.provider"),Bb=Symbol.for("react.context"),zb=Symbol.for("react.forward_ref"),Vb=Symbol.for("react.suspense"),Wb=Symbol.for("react.memo"),Hb=Symbol.for("react.lazy"),$h=Symbol.iterator;function Kb(e){return e===null||typeof e!="object"?null:(e=$h&&e[$h]||e["@@iterator"],typeof e=="function"?e:null)}var Hg={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Kg=Object.assign,qg={};function Ao(e,t,n){this.props=e,this.context=t,this.refs=qg,this.updater=n||Hg}Ao.prototype.isReactComponent={};Ao.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")};Ao.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Qg(){}Qg.prototype=Ao.prototype;function sd(e,t,n){this.props=e,this.context=t,this.refs=qg,this.updater=n||Hg}var ld=sd.prototype=new Qg;ld.constructor=sd;Kg(ld,Ao.prototype);ld.isPureReactComponent=!0;var Uh=Array.isArray,Gg=Object.prototype.hasOwnProperty,ud={current:null},Xg={key:!0,ref:!0,__self:!0,__source:!0};function Yg(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)Gg.call(t,r)&&!Xg.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"\xA9","©":"\xA9","®":"\xAE","®":"\xAE","…":"\u2026","…":"\u2026","/":"/","/":"/"},Zb=function(t){return Jb[t]},eE=function(t){return t.replace(Yb,Zb)};function jh(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 Bh(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:{};Cc=Bh(Bh({},Cc),e)}function rE(){return Cc}var oE=function(){function e(){Mt(this,e),this.usedNamespaces={}}return $t(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 iE(e){Jg=e}function aE(){return Jg}var sE={type:"3rdParty",init:function(t){nE(t.options.react),iE(t)}};function lE(){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 cE(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t.languages||!t.languages.length)return Oc("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}}):uE(e,t,n)}function fE(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function dE(e,t){return Ag(e)||fE(e,t)||Ig(e,t)||Dg()}function Wh(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 Eu(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},n=t.i18n,r=R.exports.useContext(tE)||{},o=r.i18n,i=r.defaultNS,a=n||o||aE();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new oE),!a){Oc("You will need to pass in an i18next instance by using initReactI18next");var s=function(W){return Array.isArray(W)?W[W.length-1]:W},l=[s,{},!1];return l.t=s,l.i18n={},l.ready=!1,l}a.options.react&&a.options.react.wait!==void 0&&Oc("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var u=Eu(Eu(Eu({},rE()),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 h=(a.isInitialized||a.initializedStoreOnce)&&d.every(function(A){return cE(A,a,u)});function g(){return a.getFixedT(null,u.nsMode==="fallback"?d:d[0],f)}var y=R.exports.useState(g),b=dE(y,2),m=b[0],p=b[1],v=d.join(),S=pE(v),k=R.exports.useRef(!0);R.exports.useEffect(function(){var A=u.bindI18n,W=u.bindI18nStore;k.current=!0,!h&&!c&&Vh(a,d,function(){k.current&&p(g)}),h&&S&&S!==v&&k.current&&p(g);function F(){k.current&&p(g)}return A&&a&&a.on(A,F),W&&a&&a.store.on(W,F),function(){k.current=!1,A&&a&&A.split(" ").forEach(function(X){return a.off(X,F)}),W&&a&&W.split(" ").forEach(function(X){return a.store.off(X,F)})}},[a,v]);var C=R.exports.useRef(!0);R.exports.useEffect(function(){k.current&&!C.current&&p(g),C.current=!1},[a,f]);var N=[m,a,h];if(N.t=m,N.i18n=a,N.ready=h,h||!h&&!c)return N;throw new Promise(function(A){Vh(a,d,function(){A()})})}const Hh={zh:_n(()=>import("./zh.9b79b7bf.js"),[],import.meta.url),en:_n(()=>import("./en.fb34eaf7.js"),[],import.meta.url)};et.use(Wg).use(sE).use(jg).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=Hh.zh;break;case"/__en/translation.json":default:o=Hh.en;break}o&&o.then(i=>{r(null,{status:200,data:i.data})})}},supportedLngs:["en","zh"],fallbackLng:"en",interpolation:{escapeValue:!1}});const hE=""+new URL("inter-latin-400-normal.0364d368.woff2",import.meta.url).href,vE=""+new URL("inter-latin-800-normal.a51ac27d.woff2",import.meta.url).href,mE=""+new URL("roboto-mono-latin-400-normal.7295944e.woff2",import.meta.url).href;var aa={exports:{}},wt={},Zg={exports:{}},ey={};/**
+ * @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(P,I){var M=P.length;P.push(I);e:for(;0>>1,E=P[z];if(0>>1;zo(J,M))Vo(H,J)?(P[z]=H,P[V]=M,z=V):(P[z]=J,P[$]=M,z=$);else if(Vo(H,M))P[z]=H,P[V]=M,z=V;else break e}}return I}function o(P,I){var M=P.sortIndex-I.sortIndex;return M!==0?M:P.id-I.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,h=!1,g=!1,y=!1,b=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(P){for(var I=n(u);I!==null;){if(I.callback===null)r(u);else if(I.startTime<=P)r(u),I.sortIndex=I.expirationTime,t(l,I);else break;I=n(u)}}function S(P){if(y=!1,v(P),!g)if(n(l)!==null)g=!0,j(k);else{var I=n(u);I!==null&&O(S,I.startTime-P)}}function k(P,I){g=!1,y&&(y=!1,m(A),A=-1),h=!0;var M=d;try{for(v(I),f=n(l);f!==null&&(!(f.expirationTime>I)||P&&!X());){var z=f.callback;if(typeof z=="function"){f.callback=null,d=f.priorityLevel;var E=z(f.expirationTime<=I);I=e.unstable_now(),typeof E=="function"?f.callback=E:f===n(l)&&r(l),v(I)}else r(l);f=n(l)}if(f!==null)var D=!0;else{var $=n(u);$!==null&&O(S,$.startTime-I),D=!1}return D}finally{f=null,d=M,h=!1}}var C=!1,N=null,A=-1,W=5,F=-1;function X(){return!(e.unstable_now()-FP||125z?(P.sortIndex=M,t(u,P),n(l)===null&&P===n(u)&&(y?(m(A),A=-1):y=!0,O(S,M-z))):(P.sortIndex=E,t(l,P),g||h||(g=!0,j(k))),P},e.unstable_shouldYield=X,e.unstable_wrapCallback=function(P){var I=d;return function(){var M=d;d=I;try{return P.apply(this,arguments)}finally{d=M}}}})(ey);(function(e){e.exports=ey})(Zg);/**
+ * @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 ty=R.exports,mt=Zg.exports;function B(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"),kc=Object.prototype.hasOwnProperty,gE=/^[: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]*$/,Kh={},qh={};function yE(e){return kc.call(qh,e)?!0:kc.call(Kh,e)?!1:gE.test(e)?qh[e]=!0:(Kh[e]=!0,!1)}function wE(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 SE(e,t,n,r){if(t===null||typeof t>"u"||wE(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 fd=/[\-:]([a-z])/g;function dd(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(fd,dd);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(fd,dd);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(fd,dd);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 pd(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{Ru=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?si(e):""}function _E(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=Cu(e.type,!1),e;case 11:return e=Cu(e.type.render,!1),e;case 1:return e=Cu(e.type,!0),e;default:return""}}function Nc(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 Gr:return"Fragment";case Qr:return"Portal";case Tc:return"Profiler";case hd:return"StrictMode";case Pc:return"Suspense";case Lc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case oy:return(e.displayName||"Context")+".Consumer";case ry:return(e._context.displayName||"Context")+".Provider";case vd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case md:return t=e.displayName||null,t!==null?t:Nc(e.type)||"Memo";case An:t=e._payload,e=e._init;try{return Nc(e(t))}catch{}}return null}function bE(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 Nc(t);case 8:return t===hd?"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 or(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ay(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function EE(e){var t=ay(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=EE(e))}function sy(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ay(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ps(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 Ac(e,t){var n=t.checked;return Pe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function Gh(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=or(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 ly(e,t){t=t.checked,t!=null&&pd(e,"checked",t,!1)}function Ic(e,t){ly(e,t);var n=or(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")?Dc(e,t.type,n):t.hasOwnProperty("defaultValue")&&Dc(e,t.type,or(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Xh(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 Dc(e,t,n){(t!=="number"||Ps(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 Pi(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var hi={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},xE=["Webkit","ms","Moz","O"];Object.keys(hi).forEach(function(e){xE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),hi[t]=hi[e]})});function dy(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||hi.hasOwnProperty(e)&&hi[e]?(""+t).trim():t+"px"}function py(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=dy(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var RE=Pe({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 Uc(e,t){if(t){if(RE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(B(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(B(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(B(61))}if(t.style!=null&&typeof t.style!="object")throw Error(B(62))}}function Fc(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 jc=null;function gd(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Bc=null,uo=null,co=null;function Zh(e){if(e=ua(e)){if(typeof Bc!="function")throw Error(B(280));var t=e.stateNode;t&&(t=xl(t),Bc(e.stateNode,e.type,t))}}function hy(e){uo?co?co.push(e):co=[e]:uo=e}function vy(){if(uo){var e=uo,t=co;if(co=uo=null,Zh(e),t)for(e=0;e>>=0,e===0?32:31-(ME(e)/$E|0)|0}var Da=64,Ma=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 Is(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)===0&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function sa(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 BE(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),lv=String.fromCharCode(32),uv=!1;function Dy(e,t){switch(e){case"keyup":return vx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function My(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xr=!1;function gx(e,t){switch(e){case"compositionend":return My(t);case"keypress":return t.which!==32?null:(uv=!0,lv);case"textInput":return e=t.data,e===lv&&uv?null:e;default:return null}}function yx(e,t){if(Xr)return e==="compositionend"||!Rd&&Dy(e,t)?(e=Ay(),us=bd=jn=null,Xr=!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=pv(n)}}function jy(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?jy(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function By(){for(var e=window,t=Ps();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ps(e.document)}return t}function Cd(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 Ox(e){var t=By(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&jy(n.ownerDocument.documentElement,n)){if(r!==null&&Cd(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=hv(n,i);var a=hv(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,Yr=null,qc=null,yi=null,Qc=!1;function vv(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Qc||Yr==null||Yr!==Ps(r)||(r=Yr,"selectionStart"in r&&Cd(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&&Mi(yi,r)||(yi=r,r=$s(qc,"onSelect"),0eo||(e.current=ef[eo],ef[eo]=null,eo--)}function _e(e,t){eo++,ef[eo]=e.current,e.current=t}var ir={},Ge=ur(ir),st=ur(!1),Cr=ir;function yo(e,t){var n=e.type.contextTypes;if(!n)return ir;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 Fs(){Ee(st),Ee(Ge)}function bv(e,t,n){if(Ge.current!==ir)throw Error(B(168));_e(Ge,t),_e(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(B(108,bE(e)||"Unknown",o));return Pe({},n,r)}function js(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ir,Cr=Ge.current,_e(Ge,e),_e(st,st.current),!0}function Ev(e,t,n){var r=e.stateNode;if(!r)throw Error(B(169));n?(e=Xy(e,t,Cr),r.__reactInternalMemoizedMergedChildContext=e,Ee(st),Ee(Ge),_e(Ge,e)):Ee(st),_e(st,n)}var mn=null,Rl=!1,ju=!1;function Yy(e){mn===null?mn=[e]:mn.push(e)}function Fx(e){Rl=!0,Yy(e)}function cr(){if(!ju&&mn!==null){ju=!0;var e=0,t=he;try{var n=mn;for(he=1;e>=a,o-=a,gn=1<<32-Qt(t)+o|n<A?(W=N,N=null):W=N.sibling;var F=d(m,N,v[A],S);if(F===null){N===null&&(N=W);break}e&&N&&F.alternate===null&&t(m,N),p=i(F,p,A),C===null?k=F:C.sibling=F,C=F,N=W}if(A===v.length)return n(m,N),Re&&hr(m,A),k;if(N===null){for(;AA?(W=N,N=null):W=N.sibling;var X=d(m,N,F.value,S);if(X===null){N===null&&(N=W);break}e&&N&&X.alternate===null&&t(m,N),p=i(X,p,A),C===null?k=X:C.sibling=X,C=X,N=W}if(F.done)return n(m,N),Re&&hr(m,A),k;if(N===null){for(;!F.done;A++,F=v.next())F=f(m,F.value,S),F!==null&&(p=i(F,p,A),C===null?k=F:C.sibling=F,C=F);return Re&&hr(m,A),k}for(N=r(m,N);!F.done;A++,F=v.next())F=h(N,m,A,F.value,S),F!==null&&(e&&F.alternate!==null&&N.delete(F.key===null?A:F.key),p=i(F,p,A),C===null?k=F:C.sibling=F,C=F);return e&&N.forEach(function(ce){return t(m,ce)}),Re&&hr(m,A),k}function b(m,p,v,S){if(typeof v=="object"&&v!==null&&v.type===Gr&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Na:e:{for(var k=v.key,C=p;C!==null;){if(C.key===k){if(k=v.type,k===Gr){if(C.tag===7){n(m,C.sibling),p=o(C,v.props.children),p.return=m,m=p;break e}}else if(C.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===An&&Pv(k)===C.type){n(m,C.sibling),p=o(C,v.props),p.ref=Zo(m,C,v),p.return=m,m=p;break e}n(m,C);break}else t(m,C);C=C.sibling}v.type===Gr?(p=xr(v.props.children,m.mode,S,v.key),p.return=m,m=p):(S=gs(v.type,v.key,v.props,null,m.mode,S),S.ref=Zo(m,p,v),S.return=m,m=S)}return a(m);case Qr:e:{for(C=v.key;p!==null;){if(p.key===C)if(p.tag===4&&p.stateNode.containerInfo===v.containerInfo&&p.stateNode.implementation===v.implementation){n(m,p.sibling),p=o(p,v.children||[]),p.return=m,m=p;break e}else{n(m,p);break}else t(m,p);p=p.sibling}p=Qu(v,m.mode,S),p.return=m,m=p}return a(m);case An:return C=v._init,b(m,p,C(v._payload),S)}if(li(v))return g(m,p,v,S);if(Qo(v))return y(m,p,v,S);Va(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,p!==null&&p.tag===6?(n(m,p.sibling),p=o(p,v),p.return=m,m=p):(n(m,p),p=qu(v,m.mode,S),p.return=m,m=p),a(m)):n(m,p)}return b}var So=i0(!0),a0=i0(!1),ca={},ln=ur(ca),ji=ur(ca),Bi=ur(ca);function _r(e){if(e===ca)throw Error(B(174));return e}function Dd(e,t){switch(_e(Bi,t),_e(ji,e),_e(ln,ca),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:$c(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=$c(t,e)}Ee(ln),_e(ln,t)}function _o(){Ee(ln),Ee(ji),Ee(Bi)}function s0(e){_r(Bi.current);var t=_r(ln.current),n=$c(t,e.type);t!==n&&(_e(ji,e),_e(ln,n))}function Md(e){ji.current===e&&(Ee(ln),Ee(ji))}var ke=ur(0);function Ks(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)!==0)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 Bu=[];function $d(){for(var e=0;en?n:4,e(!0);var r=zu.transition;zu.transition={};try{e(!1),t()}finally{he=n,zu.transition=r}}function E0(){return Dt().memoizedState}function Vx(e,t,n){var r=Zn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},x0(e))R0(t,n);else if(n=t0(e,t,n,r),n!==null){var o=Je();Gt(n,e,r,o),C0(n,t,r)}}function Wx(e,t,n){var r=Zn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(x0(e))R0(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,Yt(s,a)){var l=t.interleaved;l===null?(o.next=o,Ad(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=t0(e,t,o,r),n!==null&&(o=Je(),Gt(n,e,r,o),C0(n,t,r))}}function x0(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function R0(e,t){wi=qs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function C0(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,wd(e,n)}}var Qs={readContext:It,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},Hx={readContext:It,useCallback:function(e,t){return nn().memoizedState=[e,t===void 0?null:t],e},useContext:It,useEffect:Nv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ps(4194308,4,y0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ps(4194308,4,e,t)},useInsertionEffect:function(e,t){return ps(4,2,e,t)},useMemo:function(e,t){var n=nn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=nn();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=Vx.bind(null,Te,e),[r.memoizedState,e]},useRef:function(e){var t=nn();return e={current:e},t.memoizedState=e},useState:Lv,useDebugValue:zd,useDeferredValue:function(e){return nn().memoizedState=e},useTransition:function(){var e=Lv(!1),t=e[0];return e=zx.bind(null,e[1]),nn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Te,o=nn();if(Re){if(n===void 0)throw Error(B(407));n=n()}else{if(n=t(),je===null)throw Error(B(349));(kr&30)!==0||c0(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Nv(d0.bind(null,r,i,e),[e]),r.flags|=2048,Wi(9,f0.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=nn(),t=je.identifierPrefix;if(Re){var n=yn,r=gn;n=(r&~(1<<32-Qt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=zi++,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[on]=t,e[Fi]=r,D0(e,t,!1,!1),t.stateNode=e;e:{switch(a=Fc(n,r),n){case"dialog":be("cancel",e),be("close",e),o=r;break;case"iframe":case"object":case"embed":be("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=Ks(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&&!Re)return Ke(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,_e(ke,r?n&1|2:n&1),t):(Ke(t),null);case 22:case 23:return Qd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(pt&1073741824)!==0&&(Ke(t),t.subtreeFlags&6&&(t.flags|=8192)):Ke(t),null;case 24:return null;case 25:return null}throw Error(B(156,t.tag))}function Zx(e,t){switch(kd(t),t.tag){case 1:return lt(t.type)&&Fs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _o(),Ee(st),Ee(Ge),$d(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Md(t),null;case 13:if(Ee(ke),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(B(340));wo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ee(ke),null;case 4:return _o(),null;case 10:return Nd(t.type._context),null;case 22:case 23:return Qd(),null;case 24:return null;default:return null}}var Ha=!1,Qe=!1,eR=typeof WeakSet=="function"?WeakSet:Set,Q=null;function oo(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 pf(e,t,n){try{n()}catch(r){Le(e,t,r)}}var Bv=!1;function tR(e,t){if(Gc=Ds,e=By(),Cd(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 h;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),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===e)break t;if(d===n&&++u===o&&(s=a),d===i&&++c===r&&(l=a),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Xc={focusedElem:e,selectionRange:n},Ds=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var g=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var y=g.memoizedProps,b=g.memoizedState,m=t.stateNode,p=m.getSnapshotBeforeUpdate(t.elementType===t.type?y:zt(t.type,y),b);m.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(B(163))}}catch(S){Le(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return g=Bv,Bv=!1,g}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&&pf(t,n,i)}o=o.next}while(o!==r)}}function kl(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 hf(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 U0(e){var t=e.alternate;t!==null&&(e.alternate=null,U0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[on],delete t[Fi],delete t[Zc],delete t[$x],delete t[Ux])),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 F0(e){return e.tag===5||e.tag===3||e.tag===4}function zv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||F0(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 vf(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=Us));else if(r!==4&&(e=e.child,e!==null))for(vf(e,t,n),e=e.sibling;e!==null;)vf(e,t,n),e=e.sibling}function mf(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(mf(e,t,n),e=e.sibling;e!==null;)mf(e,t,n),e=e.sibling}var ze=null,Ht=!1;function Pn(e,t,n){for(n=n.child;n!==null;)j0(e,t,n),n=n.sibling}function j0(e,t,n){if(sn&&typeof sn.onCommitFiberUnmount=="function")try{sn.onCommitFiberUnmount(Sl,n)}catch{}switch(n.tag){case 5:Qe||oo(n,t);case 6:var r=ze,o=Ht;ze=null,Pn(e,t,n),ze=r,Ht=o,ze!==null&&(Ht?(e=ze,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ze.removeChild(n.stateNode));break;case 18:ze!==null&&(Ht?(e=ze,n=n.stateNode,e.nodeType===8?Fu(e.parentNode,n):e.nodeType===1&&Fu(e,n),Ii(e)):Fu(ze,n.stateNode));break;case 4:r=ze,o=Ht,ze=n.stateNode.containerInfo,Ht=!0,Pn(e,t,n),ze=r,Ht=o;break;case 0:case 11:case 14:case 15:if(!Qe&&(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)!==0||(i&4)!==0)&&pf(n,t,a),o=o.next}while(o!==r)}Pn(e,t,n);break;case 1:if(!Qe&&(oo(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)}Pn(e,t,n);break;case 21:Pn(e,t,n);break;case 22:n.mode&1?(Qe=(r=Qe)||n.memoizedState!==null,Pn(e,t,n),Qe=r):Pn(e,t,n);break;default:Pn(e,t,n)}}function Vv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new eR),t.forEach(function(r){var o=cR.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function jt(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*rR(r/1960))-r,10e?16:e,Bn===null)var r=!1;else{if(e=Bn,Bn=null,Ys=0,(fe&6)!==0)throw Error(B(331));var o=fe;for(fe|=4,Q=e.current;Q!==null;){var i=Q,a=i.child;if((Q.flags&16)!==0){var s=i.deletions;if(s!==null){for(var l=0;lAe()-Kd?Er(e,0):Hd|=n),ut(e,t)}function Q0(e,t){t===0&&((e.mode&1)===0?t=1:(t=Ma,Ma<<=1,(Ma&130023424)===0&&(Ma=4194304)));var n=Je();e=xn(e,t),e!==null&&(sa(e,t,n),ut(e,n))}function uR(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Q0(e,n)}function cR(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(B(314))}r!==null&&r.delete(t),Q0(e,n)}var G0;G0=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||st.current)at=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return at=!1,Yx(e,t,n);at=(e.flags&131072)!==0}else at=!1,Re&&(t.flags&1048576)!==0&&Jy(t,zs,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;hs(e,t),e=t.pendingProps;var o=yo(t,Ge.current);po(t,n),o=Fd(null,t,r,e,o,n);var i=jd();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,js(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Id(t),o.updater=Cl,t.stateNode=o,o._reactInternals=t,af(t,r,e,n),t=uf(null,t,r,!0,i,n)):(t.tag=0,Re&&i&&Od(t),Ye(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(hs(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=dR(r),e=zt(r,e),o){case 0:t=lf(null,t,r,e,n);break e;case 1:t=Uv(null,t,r,e,n);break e;case 11:t=Mv(null,t,r,e,n);break e;case 14:t=$v(null,t,r,zt(r.type,e),n);break e}throw Error(B(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:zt(r,o),lf(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:zt(r,o),Uv(e,t,r,o,n);case 3:e:{if(N0(t),e===null)throw Error(B(387));r=t.pendingProps,i=t.memoizedState,o=i.element,n0(e,t),Hs(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(B(423)),t),t=Fv(e,t,r,n,o);break e}else if(r!==o){o=bo(Error(B(424)),t),t=Fv(e,t,r,n,o);break e}else for(ht=Xn(t.stateNode.containerInfo.firstChild),vt=t,Re=!0,Kt=null,n=a0(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(wo(),r===o){t=Rn(e,t,n);break e}Ye(e,t,r,n)}t=t.child}return t;case 5:return s0(t),e===null&&nf(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,Yc(r,o)?a=null:i!==null&&Yc(r,i)&&(t.flags|=32),L0(e,t),Ye(e,t,a,n),t.child;case 6:return e===null&&nf(t),null;case 13:return A0(e,t,n);case 4:return Dd(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=So(t,null,r,n):Ye(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:zt(r,o),Mv(e,t,r,o,n);case 7:return Ye(e,t,t.pendingProps,n),t.child;case 8:return Ye(e,t,t.pendingProps.children,n),t.child;case 12:return Ye(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,_e(Vs,r._currentValue),r._currentValue=a,i!==null)if(Yt(i.value,a)){if(i.children===o.children&&!st.current){t=Rn(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=Sn(-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),rf(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(B(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),rf(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}Ye(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,po(t,n),o=It(o),r=r(o),t.flags|=1,Ye(e,t,r,n),t.child;case 14:return r=t.type,o=zt(r,t.pendingProps),o=zt(r.type,o),$v(e,t,r,o,n);case 15:return T0(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:zt(r,o),hs(e,t),t.tag=1,lt(r)?(e=!0,js(t)):e=!1,po(t,n),o0(t,r,o),af(t,r,o,n),uf(null,t,r,!0,e,n);case 19:return I0(e,t,n);case 22:return P0(e,t,n)}throw Error(B(156,t.tag))};function X0(e,t){return by(e,t)}function fR(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 Tt(e,t,n,r){return new fR(e,t,n,r)}function Xd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function dR(e){if(typeof e=="function")return Xd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===vd)return 11;if(e===md)return 14}return 2}function er(e,t){var n=e.alternate;return n===null?(n=Tt(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 gs(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")Xd(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Gr:return xr(n.children,o,i,t);case hd:a=8,o|=8;break;case Tc:return e=Tt(12,n,t,o|2),e.elementType=Tc,e.lanes=i,e;case Pc:return e=Tt(13,n,t,o),e.elementType=Pc,e.lanes=i,e;case Lc:return e=Tt(19,n,t,o),e.elementType=Lc,e.lanes=i,e;case iy:return Pl(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ry:a=10;break e;case oy:a=9;break e;case vd:a=11;break e;case md:a=14;break e;case An:a=16,r=null;break e}throw Error(B(130,e==null?e:typeof e,""))}return t=Tt(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function xr(e,t,n,r){return e=Tt(7,e,r,t),e.lanes=n,e}function Pl(e,t,n,r){return e=Tt(22,e,r,t),e.elementType=iy,e.lanes=n,e.stateNode={isHidden:!1},e}function qu(e,t,n){return e=Tt(6,e,null,t),e.lanes=n,e}function Qu(e,t,n){return t=Tt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function pR(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=ku(0),this.expirationTimes=ku(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ku(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Yd(e,t,n,r,o,i,a,s,l){return e=new pR(e,t,n,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Tt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Id(i),e}function hR(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})(aa);const wR=ad(aa.exports);var e1,Yv=aa.exports;e1=Yv.createRoot,Yv.hydrateRoot;var _f={exports:{}},Lr={},ge={exports:{}},SR="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",_R=SR,bR=_R;function t1(){}function n1(){}n1.resetWarningCache=t1;var ER=function(){function e(r,o,i,a,s,l){if(l!==bR){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:n1,resetWarningCache:t1};return n.PropTypes=n,n};ge.exports=ER();var bf={exports:{}},Jt={},el={exports:{}};(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 h=window.getComputedStyle(f),g=h.getPropertyValue("display");return d?g!==r&&i(f,h):g===n}catch{return console.warn("Failed to inspect element style"),!1}}function s(f){for(var d=f,h=f.getRootNode&&f.getRootNode();d&&d!==document.body;){if(h&&d===h&&(d=h.host.parentNode),a(d))return!1;d=d.parentNode}return!0}function l(f,d){var h=f.nodeName.toLowerCase(),g=o.test(h)&&!f.disabled||h==="a"&&f.href||d;return g&&s(f)}function u(f){var d=f.getAttribute("tabindex");d===null&&(d=void 0);var h=isNaN(d);return(h||d>=0)&&l(f,!h)}function c(f){var d=[].slice.call(f.querySelectorAll("*"),0).reduce(function(h,g){return h.concat(g.shadowRoot?c(g.shadowRoot):[g])},[]);return d.filter(u)}e.exports=t.default})(el,el.exports);Object.defineProperty(Jt,"__esModule",{value:!0});Jt.resetState=OR;Jt.log=kR;Jt.handleBlur=Ki;Jt.handleFocus=qi;Jt.markForFocusLater=TR;Jt.returnFocus=PR;Jt.popWithoutFocus=LR;Jt.setupScopedFocus=NR;Jt.teardownScopedFocus=AR;var xR=el.exports,RR=CR(xR);function CR(e){return e&&e.__esModule?e:{default:e}}var xo=[],ao=null,Ef=!1;function OR(){xo=[]}function kR(){}function Ki(){Ef=!0}function qi(){if(Ef){if(Ef=!1,!ao)return;setTimeout(function(){if(!ao.contains(document.activeElement)){var e=(0,RR.default)(ao)[0]||ao;e.focus()}},0)}}function TR(){xo.push(document.activeElement)}function PR(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=null;try{xo.length!==0&&(t=xo.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 LR(){xo.length>0&&xo.pop()}function NR(e){ao=e,window.addEventListener?(window.addEventListener("blur",Ki,!1),document.addEventListener("focus",qi,!0)):(window.attachEvent("onBlur",Ki),document.attachEvent("onFocus",qi))}function AR(){ao=null,window.addEventListener?(window.removeEventListener("blur",Ki),document.removeEventListener("focus",qi)):(window.detachEvent("onBlur",Ki),document.detachEvent("onFocus",qi))}var xf={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=el.exports,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],h=u[u.length-1],g=i();if(s===g){if(!f)return;c=h}if(h===g&&!f&&(c=d),d===g&&f&&(c=h),c){l.preventDefault(),c.focus();return}var y=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent),b=y!=null&&y[1]!="Chrome"&&/\biPod\b|\biPad\b/g.exec(navigator.userAgent)==null;if(!!b){var m=u.indexOf(g);if(m>-1&&(m+=f?-1:1),c=u[m],typeof c>"u"){l.preventDefault(),c=f?h:d,c.focus();return}l.preventDefault(),c.focus()}}e.exports=t.default})(xf,xf.exports);var Zt={},IR=function(){},DR=IR,Xt={},r1={exports:{}};/*!
+ 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})()})(r1);Object.defineProperty(Xt,"__esModule",{value:!0});Xt.canUseDOM=Xt.SafeNodeList=Xt.SafeHTMLCollection=void 0;var MR=r1.exports,$R=UR(MR);function UR(e){return e&&e.__esModule?e:{default:e}}var Dl=$R.default,FR=Dl.canUseDOM?window.HTMLElement:{};Xt.SafeHTMLCollection=Dl.canUseDOM?window.HTMLCollection:{};Xt.SafeNodeList=Dl.canUseDOM?window.NodeList:{};Xt.canUseDOM=Dl.canUseDOM;Xt.default=FR;Object.defineProperty(Zt,"__esModule",{value:!0});Zt.resetState=WR;Zt.log=HR;Zt.assertNodeList=o1;Zt.setElement=KR;Zt.validateElement=tp;Zt.hide=qR;Zt.show=QR;Zt.documentNotReadyOrSSRTesting=GR;var jR=DR,BR=VR(jR),zR=Xt;function VR(e){return e&&e.__esModule?e:{default:e}}var Ct=null;function WR(){Ct&&(Ct.removeAttribute?Ct.removeAttribute("aria-hidden"):Ct.length!=null?Ct.forEach(function(e){return e.removeAttribute("aria-hidden")}):document.querySelectorAll(Ct).forEach(function(e){return e.removeAttribute("aria-hidden")})),Ct=null}function HR(){}function o1(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function KR(e){var t=e;if(typeof t=="string"&&zR.canUseDOM){var n=document.querySelectorAll(t);o1(n,t),t=n}return Ct=t||Ct,Ct}function tp(e){var t=e||Ct;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,BR.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 qR(e){var t=!0,n=!1,r=void 0;try{for(var o=tp(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 QR(e){var t=!0,n=!1,r=void 0;try{for(var o=tp(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 GR(){Ct=null}var Mo={};Object.defineProperty(Mo,"__esModule",{value:!0});Mo.resetState=XR;Mo.log=YR;var Ei={},xi={};function Jv(e,t){e.classList.remove(t)}function XR(){var e=document.getElementsByTagName("html")[0];for(var t in Ei)Jv(e,Ei[t]);var n=document.body;for(var r in xi)Jv(n,xi[r]);Ei={},xi={}}function YR(){}var JR=function(t,n){return t[n]||(t[n]=0),t[n]+=1,n},ZR=function(t,n){return t[n]&&(t[n]-=1),n},eC=function(t,n,r){r.forEach(function(o){JR(n,o),t.add(o)})},tC=function(t,n,r){r.forEach(function(o){ZR(n,o),n[o]===0&&t.remove(o)})};Mo.add=function(t,n){return eC(t.classList,t.nodeName.toLowerCase()=="html"?Ei:xi,n.split(" "))};Mo.remove=function(t,n){return tC(t.classList,t.nodeName.toLowerCase()=="html"?Ei:xi,n.split(" "))};var $o={};Object.defineProperty($o,"__esModule",{value:!0});$o.log=rC;$o.resetState=oC;function nC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i1=function e(){var t=this;nC(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=[]},tl=new i1;function rC(){console.log("portalOpenInstances ----------"),console.log(tl.openInstances.length),tl.openInstances.forEach(function(e){return console.log(e)}),console.log("end portalOpenInstances ----------")}function oC(){tl=new i1}$o.default=tl;var np={};Object.defineProperty(np,"__esModule",{value:!0});np.resetState=lC;np.log=uC;var iC=$o,aC=sC(iC);function sC(e){return e&&e.__esModule?e:{default:e}}var qe=void 0,Vt=void 0,Rr=[];function lC(){for(var e=[qe,Vt],t=0;t0?(document.body.firstChild!==qe&&document.body.insertBefore(qe,document.body.firstChild),document.body.lastChild!==Vt&&document.body.appendChild(Vt)):(qe.parentElement&&qe.parentElement.removeChild(qe),Vt.parentElement&&Vt.parentElement.removeChild(Vt))}aC.default.subscribe(cC);(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(_){for(var L=1;L0&&(ce-=1,ce===0&&h.show(I)),O.props.shouldFocusAfterRender&&(O.props.shouldReturnFocusAfterClose?(u.returnFocus(O.props.preventScroll),u.teardownScopedFocus()):u.popWithoutFocus()),O.props.onAfterClose&&O.props.onAfterClose(),v.default.deregister(O)},O.open=function(){O.beforeOpen(),O.state.afterOpen&&O.state.beforeClose?(clearTimeout(O.closeTimer),O.setState({beforeClose:!1})):(O.props.shouldFocusAfterRender&&(u.setupScopedFocus(O.node),u.markForFocusLater()),O.setState({isOpen:!0},function(){O.openAnimationFrame=requestAnimationFrame(function(){O.setState({afterOpen:!0}),O.props.isOpen&&O.props.onAfterOpen&&O.props.onAfterOpen({overlayEl:O.overlay,contentEl:O.content})})}))},O.close=function(){O.props.closeTimeoutMS>0?O.closeWithTimeout():O.closeWithoutTimeout()},O.focusContent=function(){return O.content&&!O.contentHasFocus()&&O.content.focus({preventScroll:!0})},O.closeWithTimeout=function(){var P=Date.now()+O.props.closeTimeoutMS;O.setState({beforeClose:!0,closesAt:P},function(){O.closeTimer=setTimeout(O.closeWithoutTimeout,O.state.closesAt-Date.now())})},O.closeWithoutTimeout=function(){O.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},O.afterClose)},O.handleKeyDown=function(P){F(P)&&(0,f.default)(O.content,P),O.props.shouldCloseOnEsc&&X(P)&&(P.stopPropagation(),O.requestClose(P))},O.handleOverlayOnClick=function(P){O.shouldClose===null&&(O.shouldClose=!0),O.shouldClose&&O.props.shouldCloseOnOverlayClick&&(O.ownerHandlesClose()?O.requestClose(P):O.focusContent()),O.shouldClose=null},O.handleContentOnMouseUp=function(){O.shouldClose=!1},O.handleOverlayOnMouseDown=function(P){!O.props.shouldCloseOnOverlayClick&&P.target==O.overlay&&P.preventDefault()},O.handleContentOnClick=function(){O.shouldClose=!1},O.handleContentOnMouseDown=function(){O.shouldClose=!1},O.requestClose=function(P){return O.ownerHandlesClose()&&O.props.onRequestClose(P)},O.ownerHandlesClose=function(){return O.props.onRequestClose},O.shouldBeClosed=function(){return!O.state.isOpen&&!O.state.beforeClose},O.contentHasFocus=function(){return document.activeElement===O.content||O.content.contains(document.activeElement)},O.buildClassName=function(P,I){var M=(typeof I>"u"?"undefined":r(I))==="object"?I:{base:W[P],afterOpen:W[P]+"--after-open",beforeClose:W[P]+"--before-close"},z=M.base;return O.state.afterOpen&&(z=z+" "+M.afterOpen),O.state.beforeClose&&(z=z+" "+M.beforeClose),typeof I=="string"&&I?z+" "+I:z},O.attributesFromObject=function(P,I){return Object.keys(I).reduce(function(M,z){return M[P+"-"+z]=I[z],M},{})},O.state={afterOpen:!1,beforeClose:!1},O.shouldClose=null,O.moveFromContentToOverlay=null,O}return o(L,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(O,P){this.props.isOpen&&!O.isOpen?this.open():!this.props.isOpen&&O.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!P.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var O=this.props,P=O.appElement,I=O.ariaHideApp,M=O.htmlOpenClassName,z=O.bodyOpenClassName,E=O.parentSelector,D=E&&E().ownerDocument||document;z&&y.add(D.body,z),M&&y.add(D.getElementsByTagName("html")[0],M),I&&(ce+=1,h.hide(P)),v.default.register(this)}},{key:"render",value:function(){var O=this.props,P=O.id,I=O.className,M=O.overlayClassName,z=O.defaultStyles,E=O.children,D=I?{}:z.content,$=M?{}:z.overlay;if(this.shouldBeClosed())return null;var J={ref:this.setOverlayRef,className:this.buildClassName("overlay",M),style:n({},$,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},V=n({id:P,ref:this.setContentRef,style:n({},D,this.props.style.content),className:this.buildClassName("content",I),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}),H=this.props.contentElement(V,E);return this.props.overlayElement(J,H)}}]),L}(i.Component);ae.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},ae.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(b.SafeHTMLCollection),s.default.instanceOf(b.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=ae,e.exports=t.default})(bf,bf.exports);function a1(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function s1(e){function t(n){var r=this.constructor.getDerivedStateFromProps(e,n);return r!=null?r:null}this.setState(t.bind(this))}function l1(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}}a1.__suppressDeprecationWarning=!0;s1.__suppressDeprecationWarning=!0;l1.__suppressDeprecationWarning=!0;function fC(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=a1,t.componentWillReceiveProps=s1),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=l1;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 dC=Object.freeze(Object.defineProperty({__proto__:null,polyfill:fC},Symbol.toStringTag,{value:"Module"})),pC=Cb(dC);Object.defineProperty(Lr,"__esModule",{value:!0});Lr.bodyOpenClassName=Lr.portalClassName=void 0;var em=Object.assign||function(e){for(var t=1;t{this.listeners=this.listeners.filter(n=>n!==t),this.onUnsubscribe()}}hasListeners(){return this.listeners.length>0}onSubscribe(){}onUnsubscribe(){}}const Qi=typeof window>"u";function Rt(){}function CC(e,t){return typeof e=="function"?e(t):e}function Rf(e){return typeof e=="number"&&e>=0&&e!==1/0}function f1(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ys(e,t,n){return ha(e)?typeof t=="function"?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function SU(e,t,n){return ha(e)?typeof t=="function"?{...n,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:typeof e=="function"?{...t,mutationFn:e}:{...e}}function Dn(e,t,n){return ha(e)?[{...t,queryKey:e},n]:[e||{},t]}function am(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:a,stale:s}=e;if(ha(a)){if(r){if(t.queryHash!==rp(a,t.options))return!1}else if(!ol(t.queryKey,a))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||typeof o<"u"&&o!==t.state.fetchStatus||i&&!i(t))}function sm(e,t){const{exact:n,fetching:r,predicate:o,mutationKey:i}=e;if(ha(i)){if(!t.options.mutationKey)return!1;if(n){if(br(t.options.mutationKey)!==br(i))return!1}else if(!ol(t.options.mutationKey,i))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||o&&!o(t))}function rp(e,t){return((t==null?void 0:t.queryKeyHashFn)||br)(e)}function br(e){return JSON.stringify(e,(t,n)=>Cf(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function ol(e,t){return d1(e,t)}function d1(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!d1(e[n],t[n])):!1}function p1(e,t){if(e===t)return e;const n=um(e)&&um(t);if(n||Cf(e)&&Cf(t)){const r=n?e.length:Object.keys(e).length,o=n?t:Object.keys(t),i=o.length,a=n?[]:{};let s=0;for(let l=0;l"u")return!0;const n=t.prototype;return!(!cm(n)||!n.hasOwnProperty("isPrototypeOf"))}function cm(e){return Object.prototype.toString.call(e)==="[object Object]"}function ha(e){return Array.isArray(e)}function h1(e){return new Promise(t=>{setTimeout(t,e)})}function fm(e){h1(0).then(e)}function OC(){if(typeof AbortController=="function")return new AbortController}function Of(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?p1(e,t):t}class kC extends pa{constructor(){super(),this.setup=t=>{if(!Qi&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.focused=t,t&&this.onFocus()}onFocus(){this.listeners.forEach(t=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const il=new kC;class TC extends pa{constructor(){super(),this.setup=t=>{if(!Qi&&window.addEventListener){const n=()=>t();return window.addEventListener("online",n,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setOnline(r):this.onOnline()})}setOnline(t){this.online=t,t&&this.onOnline()}onOnline(){this.listeners.forEach(t=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const al=new TC;function PC(e){return Math.min(1e3*2**e,3e4)}function Ml(e){return(e!=null?e:"online")==="online"?al.isOnline():!0}class v1{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function ws(e){return e instanceof v1}function m1(e){let t=!1,n=0,r=!1,o,i,a;const s=new Promise((b,m)=>{i=b,a=m}),l=b=>{r||(h(new v1(b)),e.abort==null||e.abort())},u=()=>{t=!0},c=()=>{t=!1},f=()=>!il.isFocused()||e.networkMode!=="always"&&!al.isOnline(),d=b=>{r||(r=!0,e.onSuccess==null||e.onSuccess(b),o==null||o(),i(b))},h=b=>{r||(r=!0,e.onError==null||e.onError(b),o==null||o(),a(b))},g=()=>new Promise(b=>{o=m=>{if(r||!f())return b(m)},e.onPause==null||e.onPause()}).then(()=>{o=void 0,r||e.onContinue==null||e.onContinue()}),y=()=>{if(r)return;let b;try{b=e.fn()}catch(m){b=Promise.reject(m)}Promise.resolve(b).then(d).catch(m=>{var p,v;if(r)return;const S=(p=e.retry)!=null?p:3,k=(v=e.retryDelay)!=null?v:PC,C=typeof k=="function"?k(n,m):k,N=S===!0||typeof S=="number"&&n{if(f())return g()}).then(()=>{t?h(m):y()})})};return Ml(e.networkMode)?y():g().then(y),{promise:s,cancel:l,continue:()=>{o==null||o()},cancelRetry:u,continueRetry:c}}const op=console;function LC(){let e=[],t=0,n=c=>{c()},r=c=>{c()};const o=c=>{let f;t++;try{f=c()}finally{t--,t||s()}return f},i=c=>{t?e.push(c):fm(()=>{n(c)})},a=c=>(...f)=>{i(()=>{c(...f)})},s=()=>{const c=e;e=[],c.length&&fm(()=>{r(()=>{c.forEach(f=>{n(f)})})})};return{batch:o,batchCalls:a,schedule:i,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c}}}const Ie=LC();class g1{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Rf(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t!=null?t:Qi?1/0:5*60*1e3)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class NC extends g1{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||op,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||AC(this.options),this.state=this.initialState}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,n){const r=Of(this.state.data,t,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){this.dispatch({type:"setState",state:t,setStateOptions:n})}cancel(t){var n;const r=this.promise;return(n=this.retryer)==null||n.cancel(t),r?r.then(Rt).catch(Rt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!f1(this.state.dataUpdatedAt,t)}onFocus(){var t;const n=this.observers.find(r=>r.shouldFetchOnWindowFocus());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const n=this.observers.find(r=>r.shouldFetchOnReconnect());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.indexOf(t)===-1&&(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.indexOf(t)!==-1&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,n){var r,o;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&n!=null&&n.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var i;return(i=this.retryer)==null||i.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(g=>g.options.queryFn);h&&this.setOptions(h.options)}Array.isArray(this.options.queryKey);const a=OC(),s={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},l=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>{if(a)return this.abortSignalConsumed=!0,a.signal}})};l(s);const u=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(s)):Promise.reject("Missing queryFn"),c={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:u};if(l(c),(r=this.options.behavior)==null||r.onFetch(c),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((o=c.fetchOptions)==null?void 0:o.meta)){var f;this.dispatch({type:"fetch",meta:(f=c.fetchOptions)==null?void 0:f.meta})}const d=h=>{if(ws(h)&&h.silent||this.dispatch({type:"error",error:h}),!ws(h)){var g,y;(g=(y=this.cache.config).onError)==null||g.call(y,h,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=m1({fn:c.fetchFn,abort:a==null?void 0:a.abort.bind(a),onSuccess:h=>{var g,y;if(typeof h>"u"){d(new Error("undefined"));return}this.setData(h),(g=(y=this.cache.config).onSuccess)==null||g.call(y,h,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:d,onFail:(h,g)=>{this.dispatch({type:"failed",failureCount:h,error:g})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const n=r=>{var o,i;switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(o=t.meta)!=null?o:null,fetchStatus:Ml(this.options.networkMode)?"fetching":"paused",...!r.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(i=t.dataUpdatedAt)!=null?i:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=t.error;return ws(a)&&a.revert&&this.revertState?{...this.revertState}:{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ie.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function AC(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t<"u",r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r!=null?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}class y1 extends pa{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,n,r){var o;const i=n.queryKey,a=(o=n.queryHash)!=null?o:rp(i,n);let s=this.get(a);return s||(s=new NC({cache:this,logger:t.getLogger(),queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const n=this.queriesMap[t.queryHash];n&&(t.destroy(),this.queries=this.queries.filter(r=>r!==t),n===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){Ie.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,n){const[r]=Dn(t,n);return typeof r.exact>"u"&&(r.exact=!0),this.queries.find(o=>am(r,o))}findAll(t,n){const[r]=Dn(t,n);return Object.keys(r).length>0?this.queries.filter(o=>am(r,o)):this.queries}notify(t){Ie.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ie.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){Ie.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class IC extends g1{constructor(t){super(),this.options={...t.defaultOptions,...t.options},this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||op,this.observers=[],this.state=t.state||DC(),this.updateCacheTime(this.options.cacheTime),this.scheduleGc()}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.indexOf(t)===-1&&(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(n=>n!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()}async execute(){const t=()=>{var v;return this.retryer=m1({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(S,k)=>{this.dispatch({type:"failed",failureCount:S,error:k})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(v=this.options.retry)!=null?v:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},n=this.state.status==="loading";try{var r,o,i,a,s,l;if(!n){var u,c,f,d;this.dispatch({type:"loading",variables:this.options.variables}),await((u=(c=this.mutationCache.config).onMutate)==null?void 0:u.call(c,this.state.variables,this));const S=await((f=(d=this.options).onMutate)==null?void 0:f.call(d,this.state.variables));S!==this.state.context&&this.dispatch({type:"loading",context:S,variables:this.state.variables})}const v=await t();return await((r=(o=this.mutationCache.config).onSuccess)==null?void 0:r.call(o,v,this.state.variables,this.state.context,this)),await((i=(a=this.options).onSuccess)==null?void 0:i.call(a,v,this.state.variables,this.state.context)),await((s=(l=this.options).onSettled)==null?void 0:s.call(l,v,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:v}),v}catch(v){try{var h,g,y,b,m,p;throw await((h=(g=this.mutationCache.config).onError)==null?void 0:h.call(g,v,this.state.variables,this.state.context,this)),await((y=(b=this.options).onError)==null?void 0:y.call(b,v,this.state.variables,this.state.context)),await((m=(p=this.options).onSettled)==null?void 0:m.call(p,void 0,v,this.state.variables,this.state.context)),v}finally{this.dispatch({type:"error",error:v})}}}dispatch(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"loading":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!Ml(this.options.networkMode),status:"loading",variables:t.variables};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ie.batch(()=>{this.observers.forEach(r=>{r.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function DC(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class MC extends pa{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,n,r){const o=new IC({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(n),state:r,defaultOptions:n.mutationKey?t.getMutationDefaults(n.mutationKey):void 0});return this.add(o),o}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(n=>n!==t),this.notify({type:"removed",mutation:t})}clear(){Ie.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact>"u"&&(t.exact=!0),this.mutations.find(n=>sm(t,n))}findAll(t){return this.mutations.filter(n=>sm(t,n))}notify(t){Ie.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.mutations.filter(n=>n.state.isPaused);return Ie.batch(()=>t.reduce((n,r)=>n.then(()=>r.continue().catch(Rt)),Promise.resolve()))}}function $C(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,o,i,a;const s=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,l=(r=e.fetchOptions)==null||(o=r.meta)==null?void 0:o.fetchMore,u=l==null?void 0:l.pageParam,c=(l==null?void 0:l.direction)==="forward",f=(l==null?void 0:l.direction)==="backward",d=((i=e.state.data)==null?void 0:i.pages)||[],h=((a=e.state.data)==null?void 0:a.pageParams)||[];let g=h,y=!1;const b=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>{var N;if((N=e.signal)!=null&&N.aborted)y=!0;else{var A;(A=e.signal)==null||A.addEventListener("abort",()=>{y=!0})}return e.signal}})},m=e.options.queryFn||(()=>Promise.reject("Missing queryFn")),p=(C,N,A,W)=>(g=W?[N,...g]:[...g,N],W?[A,...C]:[...C,A]),v=(C,N,A,W)=>{if(y)return Promise.reject("Cancelled");if(typeof A>"u"&&!N&&C.length)return Promise.resolve(C);const F={queryKey:e.queryKey,pageParam:A,meta:e.options.meta};b(F);const X=m(F);return Promise.resolve(X).then(ae=>p(C,A,ae,W))};let S;if(!d.length)S=v([]);else if(c){const C=typeof u<"u",N=C?u:dm(e.options,d);S=v(d,C,N)}else if(f){const C=typeof u<"u",N=C?u:UC(e.options,d);S=v(d,C,N,!0)}else{g=[];const C=typeof e.options.getNextPageParam>"u";S=(s&&d[0]?s(d[0],0,d):!0)?v([],C,h[0]):Promise.resolve(p([],h[0],d[0]));for(let A=1;A{if(s&&d[A]?s(d[A],A,d):!0){const X=C?h[A]:dm(e.options,W);return v(W,C,X)}return Promise.resolve(p(W,h[A],d[A]))})}return S.then(C=>({pages:C,pageParams:g}))}}}}function dm(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function UC(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class FC{constructor(t={}){this.queryCache=t.queryCache||new y1,this.mutationCache=t.mutationCache||new MC,this.logger=t.logger||op,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}mount(){this.unsubscribeFocus=il.subscribe(()=>{il.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=al.subscribe(()=>{al.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())})}unmount(){var t,n;(t=this.unsubscribeFocus)==null||t.call(this),(n=this.unsubscribeOnline)==null||n.call(this)}isFetching(t,n){const[r]=Dn(t,n);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state.data}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:n,state:r})=>{const o=r.data;return[n,o]})}setQueryData(t,n,r){const o=this.queryCache.find(t),i=o==null?void 0:o.state.data,a=CC(n,i);if(typeof a>"u")return;const s=ys(t),l=this.defaultQueryOptions(s);return this.queryCache.build(this,l).setData(a,{...r,manual:!0})}setQueriesData(t,n,r){return Ie.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:o})=>[o,this.setQueryData(o,n,r)]))}getQueryState(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state}removeQueries(t,n){const[r]=Dn(t,n),o=this.queryCache;Ie.batch(()=>{o.findAll(r).forEach(i=>{o.remove(i)})})}resetQueries(t,n,r){const[o,i]=Dn(t,n,r),a=this.queryCache,s={type:"active",...o};return Ie.batch(()=>(a.findAll(o).forEach(l=>{l.reset()}),this.refetchQueries(s,i)))}cancelQueries(t,n,r){const[o,i={}]=Dn(t,n,r);typeof i.revert>"u"&&(i.revert=!0);const a=Ie.batch(()=>this.queryCache.findAll(o).map(s=>s.cancel(i)));return Promise.all(a).then(Rt).catch(Rt)}invalidateQueries(t,n,r){const[o,i]=Dn(t,n,r);return Ie.batch(()=>{var a,s;if(this.queryCache.findAll(o).forEach(u=>{u.invalidate()}),o.refetchType==="none")return Promise.resolve();const l={...o,type:(a=(s=o.refetchType)!=null?s:o.type)!=null?a:"active"};return this.refetchQueries(l,i)})}refetchQueries(t,n,r){const[o,i]=Dn(t,n,r),a=Ie.batch(()=>this.queryCache.findAll(o).filter(l=>!l.isDisabled()).map(l=>{var u;return l.fetch(void 0,{...i,cancelRefetch:(u=i==null?void 0:i.cancelRefetch)!=null?u:!0,meta:{refetchPage:o.refetchPage}})}));let s=Promise.all(a).then(Rt);return i!=null&&i.throwOnError||(s=s.catch(Rt)),s}fetchQuery(t,n,r){const o=ys(t,n,r),i=this.defaultQueryOptions(o);typeof i.retry>"u"&&(i.retry=!1);const a=this.queryCache.build(this,i);return a.isStaleByTime(i.staleTime)?a.fetch(i):Promise.resolve(a.state.data)}prefetchQuery(t,n,r){return this.fetchQuery(t,n,r).then(Rt).catch(Rt)}fetchInfiniteQuery(t,n,r){const o=ys(t,n,r);return o.behavior=$C(),this.fetchQuery(o)}prefetchInfiniteQuery(t,n,r){return this.fetchInfiniteQuery(t,n,r).then(Rt).catch(Rt)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,n){const r=this.queryDefaults.find(o=>br(t)===br(o.queryKey));r?r.defaultOptions=n:this.queryDefaults.push({queryKey:t,defaultOptions:n})}getQueryDefaults(t){if(!t)return;const n=this.queryDefaults.find(r=>ol(t,r.queryKey));return n==null?void 0:n.defaultOptions}setMutationDefaults(t,n){const r=this.mutationDefaults.find(o=>br(t)===br(o.mutationKey));r?r.defaultOptions=n:this.mutationDefaults.push({mutationKey:t,defaultOptions:n})}getMutationDefaults(t){if(!t)return;const n=this.mutationDefaults.find(r=>ol(t,r.mutationKey));return n==null?void 0:n.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const n={...this.defaultOptions.queries,...this.getQueryDefaults(t==null?void 0:t.queryKey),...t,_defaulted:!0};return!n.queryHash&&n.queryKey&&(n.queryHash=rp(n.queryKey,n)),typeof n.refetchOnReconnect>"u"&&(n.refetchOnReconnect=n.networkMode!=="always"),typeof n.useErrorBoundary>"u"&&(n.useErrorBoundary=!!n.suspense),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(t==null?void 0:t.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class jC extends pa{constructor(t,n){super(),this.client=t,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.length===1&&(this.currentQuery.addObserver(this),pm(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.listeners.length||this.destroy()}shouldFetchOnReconnect(){return kf(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return kf(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=[],this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,n){const r=this.options,o=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),lm(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),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=r.queryKey),this.updateQuery();const i=this.hasListeners();i&&hm(this.currentQuery,o,this.options,r)&&this.executeFetch(),this.updateResult(n),i&&(this.currentQuery!==o||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();const a=this.computeRefetchInterval();i&&(this.currentQuery!==o||this.options.enabled!==r.enabled||a!==this.currentRefetchInterval)&&this.updateRefetchInterval(a)}getOptimisticResult(t){const n=this.client.getQueryCache().build(this.client,t);return this.createResult(n,t)}getCurrentResult(){return this.currentResult}trackResult(t){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),t[r])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:t,...n}={}){return this.fetch({...n,meta:{refetchPage:t}})}fetchOptimistic(t){const n=this.client.defaultQueryOptions(t),r=this.client.getQueryCache().build(this.client,n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){var n;return this.executeFetch({...t,cancelRefetch:(n=t.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let n=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Rt)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),Qi||this.currentResult.isStale||!Rf(this.options.staleTime))return;const n=f1(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},n)}computeRefetchInterval(){var t;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(t=this.options.refetchInterval)!=null?t:!1}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!(Qi||this.options.enabled===!1||!Rf(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||il.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,n){const r=this.currentQuery,o=this.options,i=this.currentResult,a=this.currentResultState,s=this.currentResultOptions,l=t!==r,u=l?t.state:this.currentQueryInitialState,c=l?this.currentResult:this.previousQueryResult,{state:f}=t;let{dataUpdatedAt:d,error:h,errorUpdatedAt:g,fetchStatus:y,status:b}=f,m=!1,p=!1,v;if(n._optimisticResults){const A=this.hasListeners(),W=!A&&pm(t,n),F=A&&hm(t,r,n,o);(W||F)&&(y=Ml(t.options.networkMode)?"fetching":"paused",d||(b="loading")),n._optimisticResults==="isRestoring"&&(y="idle")}if(n.keepPreviousData&&!f.dataUpdatedAt&&c!=null&&c.isSuccess&&b!=="error")v=c.data,d=c.dataUpdatedAt,b=c.status,m=!0;else if(n.select&&typeof f.data<"u")if(i&&f.data===(a==null?void 0:a.data)&&n.select===this.selectFn)v=this.selectResult;else try{this.selectFn=n.select,v=n.select(f.data),v=Of(i==null?void 0:i.data,v,n),this.selectResult=v,this.selectError=null}catch(A){this.selectError=A}else v=f.data;if(typeof n.placeholderData<"u"&&typeof v>"u"&&b==="loading"){let A;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData))A=i.data;else if(A=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof A<"u")try{A=n.select(A),this.selectError=null}catch(W){this.selectError=W}typeof A<"u"&&(b="success",v=Of(i==null?void 0:i.data,A,n),p=!0)}this.selectError&&(h=this.selectError,v=this.selectResult,g=Date.now(),b="error");const S=y==="fetching",k=b==="loading",C=b==="error";return{status:b,fetchStatus:y,isLoading:k,isSuccess:b==="success",isError:C,isInitialLoading:k&&S,data:v,dataUpdatedAt:d,error:h,errorUpdatedAt:g,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:S,isRefetching:S&&!k,isLoadingError:C&&f.dataUpdatedAt===0,isPaused:y==="paused",isPlaceholderData:p,isPreviousData:m,isRefetchError:C&&f.dataUpdatedAt!==0,isStale:ip(t,n),refetch:this.refetch,remove:this.remove}}updateResult(t){const n=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,lm(r,n))return;this.currentResult=r;const o={cache:!0},i=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options;if(a==="all"||!a&&!this.trackedProps.size)return!0;const s=new Set(a!=null?a:this.trackedProps);return this.options.useErrorBoundary&&s.add("error"),Object.keys(this.currentResult).some(l=>{const u=l;return this.currentResult[u]!==n[u]&&s.has(u)})};(t==null?void 0:t.listeners)!==!1&&i()&&(o.listeners=!0),this.notify({...o,...t})}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const n={};t.type==="success"?n.onSuccess=!t.manual:t.type==="error"&&!ws(t.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(t){Ie.batch(()=>{if(t.onSuccess){var n,r,o,i;(n=(r=this.options).onSuccess)==null||n.call(r,this.currentResult.data),(o=(i=this.options).onSettled)==null||o.call(i,this.currentResult.data,null)}else if(t.onError){var a,s,l,u;(a=(s=this.options).onError)==null||a.call(s,this.currentResult.error),(l=(u=this.options).onSettled)==null||l.call(u,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(c=>{c(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function BC(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function pm(e,t){return BC(e,t)||e.state.dataUpdatedAt>0&&kf(e,t,t.refetchOnMount)}function kf(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&ip(e,t)}return!1}function hm(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&ip(e,n)}function ip(e,t){return e.isStaleByTime(t.staleTime)}var w1={exports:{}},S1={};/**
+ * @license React
+ * use-sync-external-store-shim.production.min.js
+ *
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */var Ro=R.exports;function zC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var VC=typeof Object.is=="function"?Object.is:zC,WC=Ro.useState,HC=Ro.useEffect,KC=Ro.useLayoutEffect,qC=Ro.useDebugValue;function QC(e,t){var n=t(),r=WC({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return KC(function(){o.value=n,o.getSnapshot=t,Gu(o)&&i({inst:o})},[e,n,t]),HC(function(){return Gu(o)&&i({inst:o}),e(function(){Gu(o)&&i({inst:o})})},[e]),qC(n),n}function Gu(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!VC(e,n)}catch{return!0}}function GC(e,t){return t()}var XC=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?GC:QC;S1.useSyncExternalStore=Ro.useSyncExternalStore!==void 0?Ro.useSyncExternalStore:XC;(function(e){e.exports=S1})(w1);const YC=w1.exports.useSyncExternalStore;var $l={exports:{}},Ul={};/**
+ * @license React
+ * react-jsx-runtime.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 JC=R.exports,ZC=Symbol.for("react.element"),e2=Symbol.for("react.fragment"),t2=Object.prototype.hasOwnProperty,n2=JC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,r2={key:!0,ref:!0,__self:!0,__source:!0};function _1(e,t,n){var r,o={},i=null,a=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)t2.call(t,r)&&!r2.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:ZC,type:e,key:i,ref:a,props:o,_owner:n2.current}}Ul.Fragment=e2;Ul.jsx=_1;Ul.jsxs=_1;(function(e){e.exports=Ul})($l);const Nt=$l.exports.Fragment,w=$l.exports.jsx,Z=$l.exports.jsxs,vm=R.exports.createContext(void 0),b1=R.exports.createContext(!1);function E1(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=vm),window.ReactQueryClientContext):vm)}const o2=({context:e}={})=>{const t=R.exports.useContext(E1(e,R.exports.useContext(b1)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},i2=({client:e,children:t,context:n,contextSharing:r=!1})=>{R.exports.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const o=E1(n,r);return w(b1.Provider,{value:!n&&r,children:w(o.Provider,{value:e,children:t})})},x1=R.exports.createContext(!1),a2=()=>R.exports.useContext(x1);x1.Provider;function s2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const l2=R.exports.createContext(s2()),u2=()=>R.exports.useContext(l2);function c2(e,t){return typeof e=="function"?e(...t):!!e}const f2=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},d2=e=>{R.exports.useEffect(()=>{e.clearReset()},[e])},p2=({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&c2(n,[e.error,r]);function h2(e,t){const n=o2({context:e.context}),r=a2(),o=u2(),i=n.defaultQueryOptions(e);i._optimisticResults=r?"isRestoring":"optimistic",i.onError&&(i.onError=Ie.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=Ie.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=Ie.batchCalls(i.onSettled)),i.suspense&&typeof i.staleTime!="number"&&(i.staleTime=1e3),f2(i,o),d2(o);const[a]=R.exports.useState(()=>new t(n,i)),s=a.getOptimisticResult(i);if(YC(R.exports.useCallback(l=>r?()=>{}:a.subscribe(Ie.batchCalls(l)),[a,r]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),R.exports.useEffect(()=>{a.setOptions(i,{listeners:!1})},[i,a]),i.suspense&&s.isLoading&&s.isFetching&&!r)throw a.fetchOptimistic(i).then(({data:l})=>{i.onSuccess==null||i.onSuccess(l),i.onSettled==null||i.onSettled(l,null)}).catch(l=>{o.clearReset(),i.onError==null||i.onError(l),i.onSettled==null||i.onSettled(void 0,l)});if(p2({result:s,errorResetBoundary:o,useErrorBoundary:i.useErrorBoundary,query:a.getCurrentQuery()}))throw s.error;return i.notifyOnChangeProps?s:a.trackResult(s)}function v2(e,t,n){const r=ys(e,t,n);return h2(r,jC)}/**
+ * @remix-run/router v1.0.3
+ *
+ * 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 Gi(){return Gi=Object.assign?Object.assign.bind():function(e){for(var t=1;t=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 w2(e){let t=typeof window<"u"&&typeof window.location<"u"&&window.location.origin!=="null"?window.location.origin:"unknown://unknown",n=typeof e=="string"?e:Xi(e);return new URL(n,t)}function S2(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,s=Vn.Pop,l=null;function u(){s=Vn.Pop,l&&l({action:s,location:d.location})}function c(h,g){s=Vn.Push;let y=Tf(d.location,h,g);n&&n(y,h);let b=gm(y),m=d.createHref(y);try{a.pushState(b,"",m)}catch{o.location.assign(m)}i&&l&&l({action:s,location:d.location})}function f(h,g){s=Vn.Replace;let y=Tf(d.location,h,g);n&&n(y,h);let b=gm(y),m=d.createHref(y);a.replaceState(b,"",m),i&&l&&l({action:s,location:d.location})}let d={get action(){return s},get location(){return e(o,a)},listen(h){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(mm,u),l=h,()=>{o.removeEventListener(mm,u),l=null}},createHref(h){return t(o,h)},encodeLocation(h){let g=w2(Xi(h));return Gi({},h,{pathname:g.pathname,search:g.search,hash:g.hash})},push:c,replace:f,go(h){return a.go(h)}};return d}var ym;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ym||(ym={}));function _2(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?$r(t):t,o=C1(r.pathname||"/",n);if(o==null)return null;let i=R1(e);b2(i);let a=null;for(let s=0;a==null&&s{let a={relativePath:o.path||"",caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};a.relativePath.startsWith("/")&&(Ze(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(r.length));let s=tr([r,a.relativePath]),l=n.concat(a);o.children&&o.children.length>0&&(Ze(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+s+'".')),R1(o.children,t,l,s)),!(o.path==null&&!o.index)&&t.push({path:s,score:T2(s,o.index),routesMeta:l})}),t}function b2(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:P2(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const E2=/^:\w+$/,x2=3,R2=2,C2=1,O2=10,k2=-2,wm=e=>e==="*";function T2(e,t){let n=e.split("/"),r=n.length;return n.some(wm)&&(r+=k2),t&&(r+=R2),n.filter(o=>!wm(o)).reduce((o,i)=>o+(E2.test(i)?x2:i===""?C2:O2),r)}function P2(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 L2(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]=D2(s[f]||"",c),u},{}),pathname:i,pathnameBase:a,pattern:e}}function A2(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ap(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 I2(e){try{return decodeURI(e)}catch(t){return ap(!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 D2(e,t){try{return decodeURIComponent(e)}catch(n){return ap(!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 C1(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 Ze(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ap(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function M2(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:$2(n,t):t,search:F2(r),hash:j2(o)}}function $2(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 Xu(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 O1(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function k1(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=$r(e):(o=Gi({},e),Ze(!o.pathname||!o.pathname.includes("?"),Xu("?","pathname","search",o)),Ze(!o.pathname||!o.pathname.includes("#"),Xu("#","pathname","hash",o)),Ze(!o.search||!o.search.includes("#"),Xu("#","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=M2(o,s),u=a&&a!=="/"&&a.endsWith("/"),c=(i||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const tr=e=>e.join("/").replace(/\/\/+/g,"/"),U2=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),F2=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,j2=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class B2{constructor(t,n,r){this.status=t,this.statusText=n||"",this.data=r}}function z2(e){return e instanceof B2}const V2=new Set(["POST","PUT","PATCH","DELETE"]);[...V2];/**
+ * React Router v6.4.3
+ *
+ * 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,Yu(o)&&i({inst:o})},[e,r,t]),q2(()=>(Yu(o)&&i({inst:o}),e(()=>{Yu(o)&&i({inst:o})})),[e]),G2(r),r}function Yu(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!H2(n,r)}catch{return!0}}function Y2(e,t,n){return t()}const J2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Z2=!J2,eO=Z2?Y2:X2;"useSyncExternalStore"in At&&(e=>e.useSyncExternalStore)(At);const tO=R.exports.createContext(null),T1=R.exports.createContext(null),sp=R.exports.createContext(null),Fl=R.exports.createContext(null),va=R.exports.createContext({outlet:null,matches:[]}),P1=R.exports.createContext(null);function nO(e,t){let{relative:n}=t===void 0?{}:t;ma()||Ze(!1);let{basename:r,navigator:o}=R.exports.useContext(sp),{hash:i,pathname:a,search:s}=L1(e,{relative:n}),l=a;return r!=="/"&&(l=a==="/"?r:tr([r,a])),o.createHref({pathname:l,search:s,hash:i})}function ma(){return R.exports.useContext(Fl)!=null}function ga(){return ma()||Ze(!1),R.exports.useContext(Fl).location}function rO(){ma()||Ze(!1);let{basename:e,navigator:t}=R.exports.useContext(sp),{matches:n}=R.exports.useContext(va),{pathname:r}=ga(),o=JSON.stringify(O1(n).map(s=>s.pathnameBase)),i=R.exports.useRef(!1);return R.exports.useEffect(()=>{i.current=!0}),R.exports.useCallback(function(s,l){if(l===void 0&&(l={}),!i.current)return;if(typeof s=="number"){t.go(s);return}let u=k1(s,JSON.parse(o),r,l.relative==="path");e!=="/"&&(u.pathname=u.pathname==="/"?e:tr([e,u.pathname])),(l.replace?t.replace:t.push)(u,l.state,l)},[e,t,o,r])}function L1(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=R.exports.useContext(va),{pathname:o}=ga(),i=JSON.stringify(O1(r).map(a=>a.pathnameBase));return R.exports.useMemo(()=>k1(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function N1(e,t){ma()||Ze(!1);let n=R.exports.useContext(T1),{matches:r}=R.exports.useContext(va),o=r[r.length-1],i=o?o.params:{};o&&o.pathname;let a=o?o.pathnameBase:"/";o&&o.route;let s=ga(),l;if(t){var u;let g=typeof t=="string"?$r(t):t;a==="/"||((u=g.pathname)==null?void 0:u.startsWith(a))||Ze(!1),l=g}else l=s;let c=l.pathname||"/",f=a==="/"?c:c.slice(a.length)||"/",d=_2(e,{pathname:f}),h=sO(d&&d.map(g=>Object.assign({},g,{params:Object.assign({},i,g.params),pathname:tr([a,g.pathname]),pathnameBase:g.pathnameBase==="/"?a:tr([a,g.pathnameBase])})),r,n||void 0);return t&&h?w(Fl.Provider,{value:{location:Pf({pathname:"/",search:"",hash:"",state:null,key:"default"},l),navigationType:Vn.Pop},children:h}):h}function oO(){let e=uO(),t=z2(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r};return Z(Nt,{children:[w("h2",{children:"Unhandled Thrown Error!"}),w("h3",{style:{fontStyle:"italic"},children:t}),n?w("pre",{style:o,children:n}):null,w("p",{children:"\u{1F4BF} Hey developer \u{1F44B}"}),Z("p",{children:["You can provide a way better UX than this when your app throws errors by providing your own\xA0",w("code",{style:i,children:"errorElement"})," props on\xA0",w("code",{style:i,children:""})]})]})}class iO extends R.exports.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?w(P1.Provider,{value:this.state.error,children:this.props.component}):this.props.children}}function aO(e){let{routeContext:t,match:n,children:r}=e,o=R.exports.useContext(tO);return o&&n.route.errorElement&&(o._deepestRenderedBoundaryId=n.route.id),w(va.Provider,{value:t,children:r})}function sO(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||Ze(!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||w(oO,{}):null,c=()=>w(aO,{match:a,routeContext:{outlet:i,matches:t.concat(r.slice(0,s+1))},children:l?u:a.route.element!==void 0?a.route.element:i});return n&&(a.route.errorElement||s===0)?w(iO,{location:n.location,component:u,error:l,children:c()}):c()},null)}var Sm;(function(e){e.UseRevalidator="useRevalidator"})(Sm||(Sm={}));var Lf;(function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"})(Lf||(Lf={}));function lO(e){let t=R.exports.useContext(T1);return t||Ze(!1),t}function uO(){var e;let t=R.exports.useContext(P1),n=lO(Lf.UseRouteError),r=R.exports.useContext(va),o=r.matches[r.matches.length-1];return t||(r||Ze(!1),o.route.id||Ze(!1),(e=n.errors)==null?void 0:e[o.route.id])}function cO(e){let{basename:t="/",children:n=null,location:r,navigationType:o=Vn.Pop,navigator:i,static:a=!1}=e;ma()&&Ze(!1);let s=t.replace(/^\/*/,"/"),l=R.exports.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:h="default"}=r,g=R.exports.useMemo(()=>{let y=C1(u,s);return y==null?null:{pathname:y,search:c,hash:f,state:d,key:h}},[s,u,c,f,d,h]);return g==null?null:w(sp.Provider,{value:l,children:w(Fl.Provider,{children:n,value:{location:g,navigationType:o}})})}var _m;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(_m||(_m={}));new Promise(()=>{});/**
+ * React Router DOM v6.4.3
+ *
+ * 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 fO(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}function dO(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function pO(e,t){return e.button===0&&(!t||t==="_self")&&!dO(e)}const hO=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function vO(e){let{basename:t,children:n,window:r}=e,o=R.exports.useRef();o.current==null&&(o.current=m2({window:r,v5Compat:!0}));let i=o.current,[a,s]=R.exports.useState({action:i.action,location:i.location});return R.exports.useLayoutEffect(()=>i.listen(s),[i]),w(cO,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:i})}const A1=R.exports.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:a,state:s,target:l,to:u,preventScrollReset:c}=t,f=fO(t,hO),d=nO(u,{relative:o}),h=mO(u,{replace:a,state:s,target:l,preventScrollReset:c,relative:o});function g(y){r&&r(y),y.defaultPrevented||h(y)}return w("a",{...f,href:d,onClick:i?r:g,ref:n,target:l})});var bm;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(bm||(bm={}));var Em;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Em||(Em={}));function mO(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:a}=t===void 0?{}:t,s=rO(),l=ga(),u=L1(e,{relative:a});return R.exports.useCallback(c=>{if(pO(c,n)){c.preventDefault();let f=r!==void 0?r:Xi(l)===Xi(u);s(e,{replace:f,state:o,preventScrollReset:i,relative:a})}},[l,s,u,r,o,n,e,i,a])}function gO(e){const t=new Error(e);if(t.stack===void 0)try{throw t}catch{}return t}var yO=gO,se=yO;function wO(e){return!!e&&typeof e.then=="function"}var Ce=wO;function SO(e,t){if(e!=null)return e;throw se(t!=null?t:"Got unexpected null or undefined")}var Oe=SO;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 jl{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 _O extends jl{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 Ce(n)?Nr(n):Co(n)?n:ya(n)}catch(n){return Ce(n)?Nr(n.next(()=>this.map(t))):Bl(n)}}}class bO extends jl{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 I1 extends jl{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 Nr(this.contents.then(n=>{const r=t(n);if(Co(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(Ce(n))return n.then(()=>this.map(t).contents);throw n}))}}function ya(e){return Object.freeze(new _O(e))}function Bl(e){return Object.freeze(new bO(e))}function Nr(e){return Object.freeze(new I1(e))}function D1(){return Object.freeze(new I1(new Promise(()=>{})))}function EO(e){return e.every(t=>t.state==="hasValue")?ya(e.map(t=>t.contents)):e.some(t=>t.state==="hasError")?Bl(Oe(e.find(t=>t.state==="hasError"),"Invalid loadable passed to loadableAll").contents):Nr(Promise.all(e.map(t=>t.contents)))}function M1(e){const n=(Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(o=>e[o])).map(o=>Co(o)?o:Ce(o)?Nr(o):ya(o)),r=EO(n);return Array.isArray(e)?r:r.map(o=>Object.getOwnPropertyNames(e).reduce((i,a,s)=>({...i,[a]:o[s]}),{}))}function Co(e){return e instanceof jl}const xO={of:e=>Ce(e)?Nr(e):Co(e)?e:ya(e),error:e=>Bl(e),loading:()=>D1(),all:M1,isLoadable:Co};var Ur={loadableWithValue:ya,loadableWithError:Bl,loadableWithPromise:Nr,loadableLoading:D1,loadableAll:M1,isLoadable:Co,RecoilLoadable:xO},RO=Ur.loadableWithValue,CO=Ur.loadableWithError,OO=Ur.loadableWithPromise,kO=Ur.loadableLoading,TO=Ur.loadableAll,PO=Ur.isLoadable,LO=Ur.RecoilLoadable,wa=Object.freeze({__proto__:null,loadableWithValue:RO,loadableWithError:CO,loadableWithPromise:OO,loadableLoading:kO,loadableAll:TO,isLoadable:PO,RecoilLoadable:LO});const zl=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 Vl(e){var t;return(t=zl.get(e))!==null&&t!==void 0?t:!1}Vl.setPass=e=>{zl.set(e,!0)};Vl.setFail=e=>{zl.set(e,!1)};Vl.clear=()=>{zl.clear()};var me=Vl;function NO(e,t,{error:n}={}){return null}var AO=NO,lp=AO,Ju,Zu,ec;const IO=(Ju=ye.createMutableSource)!==null&&Ju!==void 0?Ju:ye.unstable_createMutableSource,$1=(Zu=ye.useMutableSource)!==null&&Zu!==void 0?Zu:ye.unstable_useMutableSource,U1=(ec=ye.useSyncExternalStore)!==null&&ec!==void 0?ec:ye.unstable_useSyncExternalStore;function DO(){var e;const{ReactCurrentDispatcher:t,ReactCurrentOwner:n}=ye.__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 MO(){return me("recoil_transition_support")?{mode:"TRANSITION_SUPPORT",early:!0,concurrent:!0}:me("recoil_sync_external_store")&&U1!=null?{mode:"SYNC_EXTERNAL_STORE",early:!0,concurrent:!1}:me("recoil_mutable_source")&&$1!=null&&typeof window<"u"&&!window.$disableRecoilValueMutableSource_TEMP_HACK_DO_NOT_USE?me("recoil_suppress_rerender_in_callback")?{mode:"MUTABLE_SOURCE",early:!0,concurrent:!0}:{mode:"MUTABLE_SOURCE",early:!1,concurrent:!1}:me("recoil_suppress_rerender_in_callback")?{mode:"LEGACY",early:!0,concurrent:!1}:{mode:"LEGACY",early:!1,concurrent:!1}}function $O(){return!1}var Sa={createMutableSource:IO,useMutableSource:$1,useSyncExternalStore:U1,currentRendererSupportsUseSyncExternalStore:DO,reactMode:MO,isFastRefreshEnabled:$O};const F1={RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED:!0};function UO(){var e,t,n;if(typeof process>"u"||((e=process)===null||e===void 0?void 0:e.env)==null)return;const r=(t=process.env.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(`process.env.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED value must be 'true', 'false', or empty: ${r}`);F1.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED=r==="true"}UO();var j1=F1;class up{constructor(t){ie(this,"key",void 0),this.key=t}toJSON(){return{key:this.key}}}class B1 extends up{}class z1 extends up{}function FO(e){return e instanceof B1||e instanceof z1}var Wl={AbstractRecoilValue:up,RecoilState:B1,RecoilValueReadOnly:z1,isRecoilValue:FO},jO=Wl.AbstractRecoilValue,BO=Wl.RecoilState,zO=Wl.RecoilValueReadOnly,VO=Wl.isRecoilValue,Oo=Object.freeze({__proto__:null,AbstractRecoilValue:jO,RecoilState:BO,RecoilValueReadOnly:zO,isRecoilValue:VO});function WO(e,t){return function*(){let n=0;for(const r of e)yield t(r,n++)}()}var Hl=WO;class V1{}const HO=new V1,Ar=new Map,cp=new Map;function KO(e){return Hl(e,t=>Oe(cp.get(t)))}function qO(e){if(Ar.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 QO(e){j1.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED&&qO(e.key),Ar.set(e.key,e);const t=e.set==null?new Oo.RecoilValueReadOnly(e.key):new Oo.RecoilState(e.key);return cp.set(e.key,t),t}class W1 extends Error{}function GO(e){const t=Ar.get(e);if(t==null)throw new W1(`Missing definition for RecoilValue: "${e}""`);return t}function XO(e){return Ar.get(e)}const sl=new Map;function YO(e){var t;if(!me("recoil_memory_managament_2020"))return;const n=Ar.get(e);if(n!=null&&(t=n.shouldDeleteConfigOnRelease)!==null&&t!==void 0&&t.call(n)){var r;Ar.delete(e),(r=H1(e))===null||r===void 0||r(),sl.delete(e)}}function JO(e,t){!me("recoil_memory_managament_2020")||(t===void 0?sl.delete(e):sl.set(e,t))}function H1(e){return sl.get(e)}var ft={nodes:Ar,recoilValues:cp,registerNode:QO,getNode:GO,getNodeMaybe:XO,deleteNodeConfigIfPossible:YO,setConfigDeletionHandler:JO,getConfigDeletionHandler:H1,recoilValuesForKeys:KO,NodeMissingError:W1,DefaultValue:V1,DEFAULT_VALUE:HO};function ZO(e,t){t()}var ek={enqueueExecution:ZO};function tk(e,t){return t={exports:{}},e(t,t.exports),t.exports}var nk=tk(function(e){var t=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},n={},r=5,o=Math.pow(2,r),i=o-1,a=o/2,s=o/4,l={},u=function(x){return function(){return x}},c=n.hash=function(T){var x=typeof T>"u"?"undefined":t(T);if(x==="number")return T;x!=="string"&&(T+="");for(var U=0,K=0,q=T.length;K>1&1431655765,x=(x&858993459)+(x>>2&858993459),x=x+(x>>4)&252645135,x+=x>>8,x+=x>>16,x&127},d=function(x,U){return U>>>x&i},h=function(x){return 1<=U;)q[re--]=q[re];return q[U]=K,q}for(var te=0,ne=0,le=new Array(G+1);te>>=1;return re[U]=K,X(x,ne+1,re)},_=function(x,U,K,q){for(var G=new Array(U-1),re=0,te=0,ne=0,le=q.length;ne1?W(x,this.hash,le):le[0]}var xe=q();return xe===l?this:(++te.value,L(x,K,this.hash,this,G,A(x,G,re,xe)))},M=function(x,U,K,q,G,re,te){var ne=this.mask,le=this.children,xe=d(K,G),ot=h(xe),Ue=g(ne,ot),xt=ne&ot,Ut=xt?le[Ue]:C,zr=Ut._modify(x,U,K+r,q,G,re,te);if(Ut===zr)return this;var Oa=O(x,this),Vo=ne,Wo=void 0;if(xt&&N(zr)){if(Vo&=~ot,!Vo)return C;if(le.length<=2&&ce(le[Ue^1]))return le[Ue^1];Wo=b(Oa,Ue,le)}else if(!xt&&!N(zr)){if(le.length>=a)return ae(x,xe,zr,ne,le);Vo|=ot,Wo=m(Oa,Ue,zr,le)}else Wo=y(Oa,Ue,zr,le);return Oa?(this.mask=Vo,this.children=Wo,this):F(x,Vo,Wo)},z=function(x,U,K,q,G,re,te){var ne=this.size,le=this.children,xe=d(K,G),ot=le[xe],Ue=(ot||C)._modify(x,U,K+r,q,G,re,te);if(ot===Ue)return this;var xt=O(x,this),Ut=void 0;if(N(ot)&&!N(Ue))++ne,Ut=y(xt,xe,Ue,le);else if(!N(ot)&&N(Ue)){if(--ne,ne<=s)return _(x,ne,xe,le);Ut=y(xt,xe,C,le)}else Ut=y(xt,xe,Ue,le);return xt?(this.size=ne,this.children=Ut,this):X(x,ne,Ut)};C._modify=function(T,x,U,K,q,G,re){var te=K();return te===l?C:(++re.value,A(T,q,G,te))};function E(T,x,U,K,q){this._editable=T,this._edit=x,this._config=U,this._root=K,this._size=q}E.prototype.setTree=function(T,x){return this._editable?(this._root=T,this._size=x,this):T===this._root?this:new E(this._editable,this._edit,this._config,T,x)};var D=n.tryGetHash=function(T,x,U,K){for(var q=K._root,G=0,re=K._config.keyEq;;)switch(q.type){case p:return re(U,q.key)?q.value:T;case v:{if(x===q.hash)for(var te=q.children,ne=0,le=te.length;ne{n.set(o,t(r,o))}),n}var ll=lk;function uk(){return{nodeDeps:new Map,nodeToNodeSubscriptions:new Map}}function ck(e){return{nodeDeps:ll(e.nodeDeps,t=>new Set(t)),nodeToNodeSubscriptions:ll(e.nodeToNodeSubscriptions,t=>new Set(t))}}function tc(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:Ri(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=Ri(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 fk(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(tc(e,t,u),r===((a=l.previousTree)===null||a===void 0?void 0:a.version)){const f=n.getGraph(l.currentTree.version);tc(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);tc(e,t,d,u)}}}var _a={cloneGraph:ck,graph:uk,saveDepsToStore:fk};let dk=0;const pk=()=>dk++;let hk=0;const vk=()=>hk++;let mk=0;const gk=()=>mk++;var Kl={getNextTreeStateVersion:pk,getNextStoreID:vk,getNextComponentID:gk};const{persistentMap:xm}=ak,{graph:yk}=_a,{getNextTreeStateVersion:K1}=Kl;function q1(){const e=K1();return{version:e,stateID:e,transactionMetadata:{},dirtyAtoms:new Set,atomValues:xm(),nonvalidatedAtoms:xm()}}function wk(){const e=q1();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,yk()),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map}}var Q1={makeEmptyTreeState:q1,makeEmptyStoreState:wk,getNextTreeStateVersion:K1};class G1{}function Sk(){return new G1}var ql={RetentionZone:G1,retentionZone:Sk};function _k(e,t){const n=new Set(e);return n.add(t),n}function bk(e,t){const n=new Set(e);return n.delete(t),n}function Ek(e,t,n){const r=new Map(e);return r.set(t,n),r}function xk(e,t,n){const r=new Map(e);return r.set(t,n(r.get(t))),r}function Rk(e,t){const n=new Map(e);return n.delete(t),n}function Ck(e,t){const n=new Map(e);return t.forEach(r=>n.delete(r)),n}var X1={setByAddingToSet:_k,setByDeletingFromSet:bk,mapBySettingInMap:Ek,mapByUpdatingInMap:xk,mapByDeletingFromMap:Rk,mapByDeletingMultipleFromMap:Ck};function*Ok(e,t){let n=0;for(const r of e)t(r,n++)&&(yield r)}var pp=Ok;function kk(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 Y1=kk;const{getNode:ba,getNodeMaybe:Tk,recoilValuesForKeys:Rm}=ft,{RetentionZone:Cm}=ql,{setByAddingToSet:Pk}=X1,Lk=Object.freeze(new Set);class Nk extends Error{}function Ak(e,t,n){if(!me("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 Cm)o(n);else if(Array.isArray(n))for(const i of n)o(i);return()=>{if(!me("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 Cm)a(n);else if(Array.isArray(n))for(const s of n)a(s)}}function hp(e,t,n,r){const o=e.getState();if(o.nodeCleanupFunctions.has(n))return;const i=ba(n),a=Ak(e,n,i.retainedBy),s=i.init(e,t,r);o.nodeCleanupFunctions.set(n,()=>{s(),a()})}function Ik(e,t,n){hp(e,e.getState().currentTree,t,n)}function Dk(e,t){var n;const r=e.getState();(n=r.nodeCleanupFunctions.get(t))===null||n===void 0||n(),r.nodeCleanupFunctions.delete(t)}function Mk(e,t,n){return hp(e,t,n,"get"),ba(n).get(e,t)}function J1(e,t,n){return ba(n).peek(e,t)}function $k(e,t,n){var r;const o=Tk(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:Pk(e.dirtyAtoms,t)}}function Uk(e,t,n,r){const o=ba(n);if(o.set==null)throw new Nk(`Attempt to set read-only RecoilValue: ${n}`);const i=o.set;return hp(e,t,n,"set"),i(e,t,r)}function Fk(e,t,n){const r=e.getState(),o=e.getGraph(t.version),i=ba(n).nodeType;return Y1({type:i},{loadable:()=>J1(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(pp(Z1(e,t,new Set([n])),l=>l!==n)),components:Hl((a=(s=r.nodeToComponentSubscriptions.get(n))===null||s===void 0?void 0:s.values())!==null&&a!==void 0?a:[],([l])=>({name:l}))}}})}function Z1(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:Lk;for(const u of l)r.has(u)||o.push(u)}return r}var fr={getNodeLoadable:Mk,peekNodeLoadable:J1,setNodeValue:Uk,initializeNode:Ik,cleanUpNode:Dk,setUnvalidatedAtomValue_DEPRECATED:$k,peekNodeInfo:Fk,getDownstreamNodes:Z1};let ew=null;function jk(e){ew=e}function Bk(){var e;(e=ew)===null||e===void 0||e()}var tw={setInvalidateMemoizedSnapshot:jk,invalidateMemoizedSnapshot:Bk};const{getDownstreamNodes:zk,getNodeLoadable:nw,setNodeValue:Vk}=fr,{getNextComponentID:Wk}=Kl,{getNode:Hk,getNodeMaybe:rw}=ft,{DefaultValue:vp}=ft,{reactMode:Kk}=Sa,{AbstractRecoilValue:qk,RecoilState:Qk,RecoilValueReadOnly:Gk,isRecoilValue:Xk}=Oo,{invalidateMemoizedSnapshot:Yk}=tw;function Jk(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=nw(e,n,t);return a.state==="loading"&&a.contents.catch(()=>{}),a}function Zk(e,t){const n=e.clone();return t.forEach((r,o)=>{r.state==="hasValue"&&r.contents instanceof vp?n.delete(o):n.set(o,r)}),n}function eT(e,t,{key:n},r){if(typeof r=="function"){const o=nw(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 tT(e,t,n){if(n.type==="set"){const{recoilValue:o,valueOrUpdater:i}=n,a=eT(e,t,o,i),s=Vk(e,t,o.key,a);for(const[l,u]of s.entries())Nf(t,l,u)}else if(n.type==="setLoadable"){const{recoilValue:{key:o},loadable:i}=n;Nf(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=rw(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 lp(`Unknown action ${n.type}`)}function Nf(e,t,n){n.state==="hasValue"&&n.contents instanceof vp?e.atomValues.delete(t):e.atomValues.set(t,n),e.dirtyAtoms.add(t),e.nonvalidatedAtoms.delete(t)}function ow(e,t){e.replaceState(n=>{const r=iw(n);for(const o of t)tT(e,r,o);return aw(e,r),Yk(),r})}function Ql(e,t){if(Ci.length){const n=Ci[Ci.length-1];let r=n.get(e);r||n.set(e,r=[]),r.push(t)}else ow(e,[t])}const Ci=[];function nT(){const e=new Map;return Ci.push(e),()=>{for(const[t,n]of e)ow(t,n);Ci.pop()}}function iw(e){return{...e,atomValues:e.atomValues.clone(),nonvalidatedAtoms:e.nonvalidatedAtoms.clone(),dirtyAtoms:new Set(e.dirtyAtoms)}}function aw(e,t){const n=zk(e,t,t.dirtyAtoms);for(const i of n){var r,o;(r=rw(i))===null||r===void 0||(o=r.invalidate)===null||o===void 0||o.call(r,t)}}function sw(e,t,n){Ql(e,{type:"set",recoilValue:t,valueOrUpdater:n})}function rT(e,t,n){if(n instanceof vp)return sw(e,t,n);Ql(e,{type:"setLoadable",recoilValue:t,loadable:n})}function oT(e,t){Ql(e,{type:"markModified",recoilValue:t})}function iT(e,t,n){Ql(e,{type:"setUnvalidated",recoilValue:t,unvalidatedValue:n})}function aT(e,{key:t},n,r=null){const o=Wk(),i=e.getState();i.nodeToComponentSubscriptions.has(t)||i.nodeToComponentSubscriptions.set(t,new Map),Oe(i.nodeToComponentSubscriptions.get(t)).set(o,[r!=null?r:"",n]);const a=Kk();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 sT(e,t){var n;const{currentTree:r}=e.getState(),o=Hk(t.key);(n=o.clearCache)===null||n===void 0||n.call(o,e,r)}var dn={RecoilValueReadOnly:Gk,AbstractRecoilValue:qk,RecoilState:Qk,getRecoilValueAsLoadable:Jk,setRecoilValue:sw,setRecoilValueLoadable:rT,markRecoilValueModified:oT,setUnvalidatedRecoilValue:iT,subscribeToRecoilValue:aT,isRecoilValue:Xk,applyAtomValueWrites:Zk,batchStart:nT,writeLoadableToTreeState:Nf,invalidateDownstreams:aw,copyTreeState:iw,refreshRecoilValue:sT};function lT(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 uT=lT;const{cleanUpNode:cT}=fr,{deleteNodeConfigIfPossible:fT,getNode:lw}=ft,{RetentionZone:uw}=ql,dT=12e4,cw=new Set;function fw(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 uw)for(const s of mT(n,a))o.add(s);else o.add(a);const i=pT(e,o);for(const a of i)vT(e,r,a)}function pT(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=hT(e,r,l,i,a);for(const g of c){var f;if(lw(g).retainedBy==="recoilRoot"){a.add(g);continue}if(((f=n.retention.referenceCounts.get(g))!==null&&f!==void 0?f:0)>0){a.add(g);continue}if(dw(g).some(b=>n.retention.referenceCounts.get(b))){a.add(g);continue}const y=o.nodeToNodeSubscriptions.get(g);if(y&&uT(y,b=>a.has(b))){a.add(g);continue}i.add(g),u.add(g)}const d=new Set;for(const g of u)for(const y of(h=o.nodeDeps.get(g))!==null&&h!==void 0?h:cw){var h;i.has(y)||d.add(y)}d.size&&s(d)}}function hT(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 vT(e,t,n){if(!me("recoil_memory_managament_2020"))return;cT(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=dw(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)}fT(n)}function mT(e,t){var n;return(n=e.retention.nodesRetainedByZone.get(t))!==null&&n!==void 0?n:cw}function dw(e){const t=lw(e).retainedBy;return t===void 0||t==="components"||t==="recoilRoot"?[]:t instanceof uw?[t]:t}function gT(e,t){const n=e.getState();n.nextTree?n.retention.retainablesToCheckForRelease.add(t):fw(e,new Set([t]))}function yT(e,t,n){var r;if(!me("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?pw(e,t):o.set(t,i)}function pw(e,t){if(!me("recoil_memory_managament_2020"))return;e.getState().retention.referenceCounts.delete(t),gT(e,t)}function wT(e){if(!me("recoil_memory_managament_2020"))return;const t=e.getState();fw(e,t.retention.retainablesToCheckForRelease),t.retention.retainablesToCheckForRelease.clear()}function ST(e){return e===void 0?"recoilRoot":e}var Fr={SUSPENSE_TIMEOUT_MS:dT,updateRetainCount:yT,updateRetainCountToZero:pw,releaseScheduledRetainablesNow:wT,retainedByOptionWithDefault:ST};const{unstable_batchedUpdates:_T}=wR;var bT={unstable_batchedUpdates:_T};const{unstable_batchedUpdates:ET}=bT;var xT={unstable_batchedUpdates:ET};const{batchStart:RT}=dn,{unstable_batchedUpdates:CT}=xT;let mp=CT;const OT=e=>{mp=e},kT=()=>mp,TT=e=>{mp(()=>{let t=()=>{};try{t=RT(),e()}finally{t()}})};var Gl={getBatcher:kT,setBatcher:OT,batchUpdates:TT};function*PT(e){for(const t of e)for(const n of t)yield n}var hw=PT;const vw=typeof Window>"u"||typeof window>"u",LT=e=>!vw&&(e===window||e instanceof Window),NT=typeof navigator<"u"&&navigator.product==="ReactNative";var gp={isSSR:vw,isReactNative:NT,isWindow:LT};function AT(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 IT(e,t){let n,r;return(...i)=>{const a=t(...i);return n===a||(n=a,r=e(...i)),r}}function DT(e,t){let n,r;return[(...a)=>{const s=t(...a);return n===s||(n=s,r=e(...a)),r},()=>{n=null}]}var MT={memoizeWithArgsHash:AT,memoizeOneWithArgsHash:IT,memoizeOneWithArgsHashAndInvalidation:DT};const{batchUpdates:Af}=Gl,{initializeNode:$T,peekNodeInfo:UT}=fr,{graph:FT}=_a,{getNextStoreID:jT}=Kl,{DEFAULT_VALUE:BT,recoilValues:Om,recoilValuesForKeys:km}=ft,{AbstractRecoilValue:zT,getRecoilValueAsLoadable:VT,setRecoilValue:Tm,setUnvalidatedRecoilValue:WT}=dn,{updateRetainCount:Ss}=Fr,{setInvalidateMemoizedSnapshot:HT}=tw,{getNextTreeStateVersion:KT,makeEmptyStoreState:qT}=Q1,{isSSR:QT}=gp,{memoizeOneWithArgsHashAndInvalidation:GT}=MT;class Xl{constructor(t,n){ie(this,"_store",void 0),ie(this,"_refCount",1),ie(this,"getLoadable",r=>(this.checkRefCount_INTERNAL(),VT(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 km(a.dirtyAtoms)}const o=this._store.getState().knownAtoms,i=this._store.getState().knownSelectors;return(r==null?void 0:r.isInitialized)==null?Om.values():r.isInitialized===!0?km(hw([o,i])):pp(Om.values(),({key:a})=>!o.has(a)&&!i.has(a))}),ie(this,"getInfo_UNSTABLE",({key:r})=>(this.checkRefCount_INTERNAL(),UT(this._store,this._store.getState().currentTree,r))),ie(this,"map",r=>{this.checkRefCount_INTERNAL();const o=new If(this,Af);return r(o),o}),ie(this,"asyncMap",async r=>{this.checkRefCount_INTERNAL();const o=new If(this,Af);return o.retain(),await r(o),o.autoRelease_INTERNAL(),o}),this._store={storeID:jT(),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=FT();return o.set(r,i),i},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw se("Cannot subscribe to Snapshots")}};for(const r of this._store.getState().knownAtoms)$T(this._store,r,"get"),Ss(this._store,r,1);this.autoRelease_INTERNAL()}retain(){this._refCount<=0,this._refCount++;let t=!1;return()=>{t||(t=!0,this._release())}}autoRelease_INTERNAL(){QT||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(),!me("recoil_memory_managament_2020"))return}else this._refCount<0}isRetained(){return this._refCount>0}checkRefCount_INTERNAL(){me("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 mw(e,t,n=!1){const r=e.getState(),o=n?KT():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(Hl(r.nodeCleanupFunctions.entries(),([i])=>[i,()=>{}]))}}function XT(e){const t=new Xl(qT());return e!=null?t.map(e):t}const[Pm,gw]=GT((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 Xl(mw(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)});HT(gw);function YT(e,t="latest"){const n=Pm(e,t);return n.isRetained()?n:(gw(),Pm(e,t))}class If extends Xl{constructor(t,n){super(mw(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(()=>{Ss(i,r.key,1),Tm(this.getStore_INTERNAL(),r,o)})}),ie(this,"reset",r=>{this.checkRefCount_INTERNAL();const o=this.getStore_INTERNAL();this._batch(()=>{Ss(o,r.key,1),Tm(this.getStore_INTERNAL(),r,BT)})}),ie(this,"setUnvalidatedAtomValues_DEPRECATED",r=>{this.checkRefCount_INTERNAL();const o=this.getStore_INTERNAL();Af(()=>{for(const[i,a]of r.entries())Ss(o,i,1),WT(o,new zT(i),a)})}),this._batch=n}}var Yl={Snapshot:Xl,MutableSnapshot:If,freshSnapshot:XT,cloneSnapshot:YT},JT=Yl.Snapshot,ZT=Yl.MutableSnapshot,eP=Yl.freshSnapshot,tP=Yl.cloneSnapshot,Jl=Object.freeze({__proto__:null,Snapshot:JT,MutableSnapshot:ZT,freshSnapshot:eP,cloneSnapshot:tP});function nP(...e){const t=new Set;for(const n of e)for(const r of n)t.add(r);return t}var rP=nP;const{useRef:oP}=ye;function iP(e){const t=oP(e);return t.current===e&&typeof e=="function"&&(t.current=e()),t}var Lm=iP;const{getNextTreeStateVersion:aP,makeEmptyStoreState:yw}=Q1,{cleanUpNode:sP,getDownstreamNodes:lP,initializeNode:uP,setNodeValue:cP,setUnvalidatedAtomValue_DEPRECATED:fP}=fr,{graph:dP}=_a,{cloneGraph:pP}=_a,{getNextStoreID:ww}=Kl,{createMutableSource:nc,reactMode:Sw}=Sa,{applyAtomValueWrites:hP}=dn,{releaseScheduledRetainablesNow:_w}=Fr,{freshSnapshot:vP}=Jl,{useCallback:mP,useContext:bw,useEffect:Df,useMemo:gP,useRef:yP,useState:wP}=ye;function ni(){throw se("This component must be used inside a component.")}const Ew=Object.freeze({storeID:ww(),getState:ni,replaceState:ni,getGraph:ni,subscribeToTransactions:ni,addTransactionMetadata:ni});let Mf=!1;function Nm(e){if(Mf)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){me("recoil_memory_managament_2020")&&me("recoil_release_on_cascading_update_killswitch_2021")&&t.commitDepth>0&&_w(e);const n=t.currentTree.version,r=aP();t.nextTree={...t.currentTree,version:r,stateID:r,dirtyAtoms:new Set,transactionMetadata:{}},t.graphsByVersion.set(r,pP(Oe(t.graphsByVersion.get(n))))}}const xw=ye.createContext({current:Ew}),Zl=()=>bw(xw),Rw=ye.createContext(null);function SP(){return bw(Rw)}function yp(e,t,n){const r=lP(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 Cw(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);(!Sw().early||t.suspendedComponentResolvers.size>0)&&(yp(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 _P(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,Cw(e),t.previousTree!=null?t.graphsByVersion.delete(t.previousTree.version):lp("Ended batch with no previous state, which is unexpected","recoil"),t.previousTree=null,me("recoil_memory_managament_2020")&&n==null&&_w(e)}finally{t.commitDepth--}}function bP({setNotifyBatcherOfChange:e}){const t=Zl(),[,n]=wP([]);return e(()=>n({})),Df(()=>(e(()=>n({})),()=>{e(()=>{})}),[e]),Df(()=>{ek.enqueueExecution("Batcher",()=>{_P(t.current)})}),null}function EP(e,t){const n=yw();return t({set:(r,o)=>{const i=n.currentTree,a=cP(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:rP(i.dirtyAtoms,s),atomValues:hP(i.atomValues,a),nonvalidatedAtoms:l}},setUnvalidatedAtomValues:r=>{r.forEach((o,i)=>{n.currentTree=fP(n.currentTree,i,o)})}}),n}function xP(e){const t=vP(e),n=t.getStore_INTERNAL().getState();return t.retain(),n.nodeCleanupFunctions.forEach(r=>r()),n.nodeCleanupFunctions.clear(),n}let Am=0;function RP({initializeState_DEPRECATED:e,initializeState:t,store_INTERNAL:n,children:r}){let o;const i=h=>{const g=o.current.graphsByVersion;if(g.has(h))return Oe(g.get(h));const y=dP();return g.set(h,y),y},a=(h,g)=>{if(g==null){const{transactionSubscriptions:y}=f.current.getState(),b=Am++;return y.set(b,h),{release:()=>{y.delete(b)}}}else{const{nodeTransactionSubscriptions:y}=f.current.getState();y.has(g)||y.set(g,new Map);const b=Am++;return Oe(y.get(g)).set(b,h),{release:()=>{const m=y.get(g);m&&(m.delete(b),m.size===0&&y.delete(g))}}}},s=h=>{Nm(f.current);for(const g of Object.keys(h))Oe(f.current.getState().nextTree).transactionMetadata[g]=h[g]},l=h=>{Nm(f.current);const g=Oe(o.current.nextTree);let y;try{Mf=!0,y=h(g)}finally{Mf=!1}y!==g&&(o.current.nextTree=y,Sw().early&&yp(f.current,o.current,y),Oe(u.current)())},u=yP(null),c=mP(h=>{u.current=h},[u]),f=Lm(()=>n!=null?n:{storeID:ww(),getState:()=>o.current,replaceState:l,getGraph:i,subscribeToTransactions:a,addTransactionMetadata:s});n!=null&&(f.current=n),o=Lm(()=>e!=null?EP(f.current,e):t!=null?xP(t):yw());const d=gP(()=>nc==null?void 0:nc(o,()=>o.current.currentTree.version),[o]);return Df(()=>{const h=f.current;for(const g of new Set(h.getState().knownAtoms))uP(h,g,"get");return()=>{for(const g of h.getState().knownAtoms)sP(h,g)}},[f]),w(xw.Provider,{value:f,children:Z(Rw.Provider,{value:d,children:[w(bP,{setNotifyBatcherOfChange:c}),r]})})}function CP(e){const{override:t,...n}=e,r=Zl();return t===!1&&r.current!==Ew?e.children:w(RP,{...n})}function OP(){return Zl().current.storeID}var On={RecoilRoot:CP,useStoreRef:Zl,useRecoilMutableSource:SP,useRecoilStoreID:OP,notifyComponents_FOR_TESTING:yp,sendEndOfBatchNotifications_FOR_TESTING:Cw};function kP(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 Ow=NP;const{useStoreRef:AP}=On,{SUSPENSE_TIMEOUT_MS:IP}=Fr,{updateRetainCount:ri}=Fr,{RetentionZone:DP}=ql,{useEffect:MP,useRef:$P}=ye,{isSSR:Im}=gp;function UP(e){if(!!me("recoil_memory_managament_2020"))return FP(e)}function FP(e){const n=(Array.isArray(e)?e:[e]).map(a=>a instanceof DP?a:a.key),r=AP();MP(()=>{if(!me("recoil_memory_managament_2020"))return;const a=r.current;if(o.current&&!Im)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=$P(),i=Ow(n);if(!Im&&(i===void 0||!TP(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)},IP)}}var wp=UP;function jP(){return""}var Ea=jP;const{batchUpdates:BP}=Gl,{DEFAULT_VALUE:kw}=ft,{currentRendererSupportsUseSyncExternalStore:zP,reactMode:Uo,useMutableSource:VP,useSyncExternalStore:WP}=Sa,{useRecoilMutableSource:HP,useStoreRef:pn}=On,{AbstractRecoilValue:$f,getRecoilValueAsLoadable:xa,setRecoilValue:ul,setUnvalidatedRecoilValue:KP,subscribeToRecoilValue:ko}=dn,{useCallback:ct,useEffect:To,useMemo:Tw,useRef:Oi,useState:Sp}=ye,{setByAddingToSet:qP}=X1;function _p(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 QP(){const e=Ea(),t=pn(),[,n]=Sp([]),r=Oi(new Set);r.current=new Set;const o=Oi(new Set),i=Oi(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 To(()=>{const l=t.current;Ri(r.current,o.current).forEach(u=>{if(i.current.has(u))return;const c=ko(l,new $f(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)}),Ri(o.current,r.current).forEach(u=>{a(u)}),o.current=r.current}),To(()=>{const l=i.current;return Ri(r.current,new Set(l.keys())).forEach(u=>{const c=ko(t.current,new $f(u),f=>s(f,u),e);l.set(u,c)}),()=>l.forEach((u,c)=>a(c))},[e,t,a,s]),Tw(()=>{function l(g){return y=>{ul(t.current,g,y)}}function u(g){return()=>ul(t.current,g,kw)}function c(g){var y;r.current.has(g.key)||(r.current=qP(r.current,g.key));const b=t.current.getState();return xa(t.current,g,Uo().early&&(y=b.nextTree)!==null&&y!==void 0?y:b.currentTree)}function f(g){const y=c(g);return _p(y,g,t)}function d(g){return[f(g),l(g)]}function h(g){return[c(g),l(g)]}return{getRecoilValue:f,getRecoilValueLoadable:c,getRecoilState:d,getRecoilStateLoadable:h,getSetRecoilState:l,getResetRecoilState:u}},[r,t])}const GP={current:0};function XP(e){const t=pn(),n=Ea(),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:xa(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=Tw(()=>o(r),[r,o]),a=ct(s=>{const l=t.current;return ko(l,e,s,n).release},[t,e,n]);return WP(a,i,i).loadable}function YP(e){const t=pn(),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 xa(c,e,d)},[t,e]),r=ct(()=>n(),[n]),o=Ea(),i=ct((u,c)=>{const f=t.current;return ko(f,e,()=>{if(!me("recoil_suppress_rerender_in_callback"))return c();const h=n();l.current.is(h)||c(),l.current=h},o).release},[t,e,o,n]),a=HP();if(a==null)throw se("Recoil hooks must be used in components contained within a component.");const s=VP(a,r,i),l=Oi(s);return To(()=>{l.current=s}),s}function Uf(e){const t=pn(),n=Ea(),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 xa(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]);To(()=>{const l=ko(t.current,e,u=>{s(i)},n);return s(i),l.release},[n,e,t,i]);const[a,s]=Sp(o);return a.key!==e.key?o().loadable:a.loadable}function JP(e){const t=pn(),[,n]=Sp([]),r=Ea(),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 xa(l,e,c)},[t,e]),i=o(),a=Oi(i);return To(()=>{a.current=i}),To(()=>{const s=t.current,l=s.getState(),u=ko(s,e,f=>{var d;if(!me("recoil_suppress_rerender_in_callback"))return n([]);const h=o();(d=a.current)!==null&&d!==void 0&&d.is(h)||n(h),a.current=h},r);if(l.nextTree)s.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{a.current=null,n([])});else{var c;if(!me("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 bp(e){return me("recoil_memory_managament_2020")&&wp(e),{TRANSITION_SUPPORT:Uf,SYNC_EXTERNAL_STORE:zP()?XP:Uf,MUTABLE_SOURCE:YP,LEGACY:JP}[Uo().mode](e)}function Pw(e){const t=pn(),n=bp(e);return _p(n,e,t)}function eu(e){const t=pn();return ct(n=>{ul(t.current,e,n)},[t,e])}function ZP(e){const t=pn();return ct(()=>{ul(t.current,e,kw)},[t,e])}function eL(e){return[Pw(e),eu(e)]}function tL(e){return[bp(e),eu(e)]}function nL(){const e=pn();return(t,n={})=>{BP(()=>{e.current.addTransactionMetadata(n),t.forEach((r,o)=>KP(e.current,new $f(o),r))})}}function Lw(e){return me("recoil_memory_managament_2020")&&wp(e),Uf(e)}function Nw(e){const t=pn(),n=Lw(e);return _p(n,e,t)}function rL(e){return[Nw(e),eu(e)]}var oL={recoilComponentGetRecoilValueCount_FOR_TESTING:GP,useRecoilInterface:QP,useRecoilState:eL,useRecoilStateLoadable:tL,useRecoilValue:Pw,useRecoilValueLoadable:bp,useResetRecoilState:ZP,useSetRecoilState:eu,useSetUnvalidatedAtomValues:nL,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:Lw,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:Nw,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:rL};function iL(e,t){const n=new Map;for(const[r,o]of e)t(o,r)&&n.set(r,o);return n}var aL=iL;function sL(e,t){const n=new Set;for(const r of e)t(r)&&n.add(r);return n}var lL=sL;function uL(...e){const t=new Map;for(let n=0;nt.current.subscribeToTransactions(e).release,[e,t])}function $m(e){const t=e.atomValues.toMap(),n=ll(aL(t,(r,o)=>{const a=Aw(o).persistence_UNSTABLE;return a!=null&&a.type!=="none"&&r.state==="hasValue"}),r=>r.contents);return cL(e.nonvalidatedAtoms.toMap(),n)}function yL(e){nu(tu(t=>{let n=t.getState().previousTree;const r=t.getState().currentTree;n||(n=t.getState().currentTree);const o=$m(r),i=$m(n),a=ll(pL,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=lL(r.dirtyAtoms,l=>o.has(l)||i.has(l));e({atomValues:o,previousAtomValues:i,atomInfo:a,modifiedAtoms:s,transactionMetadata:{...r.transactionMetadata}})},[e]))}function wL(e){nu(tu(t=>{const n=cl(t,"latest"),r=cl(t,"previous");e({snapshot:n,previousSnapshot:r})},[e]))}function SL(){const e=Ep(),[t,n]=gL(()=>cl(e.current)),r=Ow(t),o=Dm(),i=Dm();if(nu(tu(s=>n(cl(s)),[])),Iw(()=>{const s=t.retain();if(o.current&&!Mm){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&&!Mm){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},mL)}return t}function Dw(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;fL(()=>{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)&&Aw(c).shouldRestoreFromSnapshots&&a.add(c)}a.forEach(u=>{vL(e,new hL(u),i.atomValues.has(u)?Oe(i.atomValues.get(u)):dL)}),e.replaceState(u=>({...u,stateID:t.getID()}))})}function _L(){const e=Ep();return tu(t=>Dw(e.current,t),[e])}var Mw={useRecoilSnapshot:SL,gotoSnapshot:Dw,useGotoRecoilSnapshot:_L,useRecoilTransactionObserver:wL,useTransactionObservation_DEPRECATED:yL,useTransactionSubscription_DEPRECATED:nu};const{peekNodeInfo:bL}=fr,{useStoreRef:EL}=On;function xL(){const e=EL();return({key:t})=>bL(e.current,e.current.getState().currentTree,t)}var RL=xL;const{reactMode:CL}=Sa,{RecoilRoot:OL,useStoreRef:kL}=On,{useMemo:TL}=ye;function PL(){CL().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=kL().current;return TL(()=>{function t({children:n}){return w(OL,{store_INTERNAL:e,children:n})}return t},[e])}var LL=PL;const{loadableWithValue:NL}=wa,{initializeNode:AL}=fr,{DEFAULT_VALUE:IL,getNode:DL}=ft,{copyTreeState:ML,getRecoilValueAsLoadable:$L,invalidateDownstreams:UL,writeLoadableToTreeState:FL}=dn;function Um(e){return DL(e.key).nodeType==="atom"}class jL{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(!Um(r))throw se("Reading selectors within atomicUpdate is not supported");const o=$L(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(!Um(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 AL(this._store,r.key,"set"),this._changes.set(r.key,o)}),ie(this,"reset",r=>{this.set(r,IL)}),this._store=t,this._treeState=n,this._changes=new Map}newTreeState_INTERNAL(){if(this._changes.size===0)return this._treeState;const t=ML(this._treeState);for(const[n,r]of this._changes)FL(t,n,NL(r));return UL(this._store,t),t}}function BL(e){return t=>{e.replaceState(n=>{const r=new jL(e,n);return t(r),r.newTreeState_INTERNAL()})}}var zL={atomicUpdater:BL},VL=zL.atomicUpdater,$w=Object.freeze({__proto__:null,atomicUpdater:VL});function WL(e,t){if(!e)throw new Error(t)}var HL=WL,fi=HL;const{atomicUpdater:KL}=$w,{batchUpdates:qL}=Gl,{DEFAULT_VALUE:QL}=ft,{useStoreRef:GL}=On,{refreshRecoilValue:XL,setRecoilValue:Fm}=dn,{cloneSnapshot:YL}=Jl,{gotoSnapshot:JL}=Mw,{useCallback:ZL}=ye;class Uw{}const eN=new Uw;function Fw(e,t,n,r){let o=eN,i;if(qL(()=>{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=Y1({...r!=null?r:{},set:(c,f)=>Fm(e,c,f),reset:c=>Fm(e,c,QL),refresh:c=>XL(e,c),gotoSnapshot:c=>JL(e,c),transact_UNSTABLE:c=>KL(e)(c)},{snapshot:()=>{const c=YL(e);return i=c.retain(),c}}),u=t(l);if(typeof u!="function")throw se(s);o=u(...n)}),o instanceof Uw&&fi(!1),Ce(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 tN(e,t){const n=GL();return ZL((...r)=>Fw(n.current,e,r),t!=null?[...t,n]:void 0)}var jw={recoilCallback:Fw,useRecoilCallback:tN};const{useStoreRef:nN}=On,{refreshRecoilValue:rN}=dn,{useCallback:oN}=ye;function iN(e){const t=nN();return oN(()=>{const n=t.current;rN(n,e)},[e,t])}var aN=iN;const{atomicUpdater:sN}=$w,{useStoreRef:lN}=On,{useMemo:uN}=ye;function cN(e,t){const n=lN();return uN(()=>(...r)=>{sN(n.current)(i=>{e(i)(...r)})},t!=null?[...t,n]:void 0)}var fN=cN;class dN{constructor(t){ie(this,"value",void 0),this.value=t}}var pN={WrappedValue:dN},hN=pN.WrappedValue,Bw=Object.freeze({__proto__:null,WrappedValue:hN});const{isFastRefreshEnabled:vN}=Sa;class jm extends Error{}class mN{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[b,m]of t){var f,d,h;const p=this._root;if((p==null?void 0:p.type)==="leaf")throw this.invalidCacheError();const v=u;if(u=v?v.branches.get(c):p,u=(f=u)!==null&&f!==void 0?f:{type:"branch",nodeKey:b,parent:v,branches:new Map,branchKey:c},u.type!=="branch"||u.nodeKey!==b)throw this.invalidCacheError();v==null||v.branches.set(c,u),r==null||(d=r.onNodeVisit)===null||d===void 0||d.call(r,u),c=this._mapNodeValue(m),this._root=(h=this._root)!==null&&h!==void 0?h:u}const g=u?(i=u)===null||i===void 0?void 0:i.branches.get(c):this._root;if(g!=null&&(g.type!=="leaf"||g.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 jm)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=vN()?"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 lp(t+(this._name!=null?` - ${this._name}`:"")),new jm}}var gN={TreeCache:mN},yN=gN.TreeCache,zw=Object.freeze({__proto__:null,TreeCache:yN});class wN{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 SN={LRUCache:wN},_N=SN.LRUCache,Vw=Object.freeze({__proto__:null,LRUCache:_N});const{LRUCache:bN}=Vw,{TreeCache:EN}=zw;function xN({name:e,maxSize:t,mapNodeValue:n=r=>r}){const r=new bN({maxSize:t}),o=new EN({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 Bm=xN;function Bt(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(Ce(e))return"__PROMISE__";if(Array.isArray(e))return`[${e.map((o,i)=>Bt(o,t,i.toString()))}]`;if(typeof e.toJSON=="function")return Bt(e.toJSON(n),t,n);if(e instanceof Map){const o={};for(const[i,a]of e)o[typeof i=="string"?i:Bt(i,t)]=a;return Bt(o,t,n)}return e instanceof Set?Bt(Array.from(e).sort((o,i)=>Bt(o,t).localeCompare(Bt(i,t))),t,n):Symbol!==void 0&&e[Symbol.iterator]!=null&&typeof e[Symbol.iterator]=="function"?Bt(Array.from(e),t,n):`{${Object.keys(e).filter(o=>e[o]!==void 0).sort().map(o=>`${Bt(o,t)}:${Bt(e[o],t,o)}`).join(",")}}`}function RN(e,t={allowFunctions:!1}){return Bt(e,t)}var ru=RN;const{TreeCache:CN}=zw,Ga={equality:"reference",eviction:"keep-all",maxSize:1/0};function ON({equality:e=Ga.equality,eviction:t=Ga.eviction,maxSize:n=Ga.maxSize}=Ga,r){const o=kN(e);return TN(t,n,o,r)}function kN(e){switch(e){case"reference":return t=>t;case"value":return t=>ru(t)}throw se(`Unrecognized equality policy ${e}`)}function TN(e,t,n,r){switch(e){case"keep-all":return new CN({name:r,mapNodeValue:n});case"lru":return Bm({name:r,maxSize:Oe(t),mapNodeValue:n});case"most-recent":return Bm({name:r,maxSize:1,mapNodeValue:n})}throw se(`Unrecognized eviction policy ${e}`)}var PN=ON;function LN(e){return()=>null}var NN={startPerfBlock:LN};const{isLoadable:AN,loadableWithError:Xa,loadableWithPromise:IN,loadableWithValue:rc}=wa,{WrappedValue:Ww}=Bw,{getNodeLoadable:Ya,peekNodeLoadable:DN,setNodeValue:MN}=fr,{saveDepsToStore:$N}=_a,{DEFAULT_VALUE:UN,getConfigDeletionHandler:FN,getNode:jN,registerNode:zm}=ft,{isRecoilValue:BN}=Oo,{markRecoilValueModified:Vm}=dn,{retainedByOptionWithDefault:zN}=Fr,{recoilCallback:VN}=jw,{startPerfBlock:WN}=NN;class Hw{}const oi=new Hw,ii=[],Ja=new Map,HN=(()=>{let e=0;return()=>e++})();function Kw(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=PN(o!=null?o:{equality:"reference",eviction:"keep-all"},n),l=zN(e.retainedBy_UNSTABLE),u=new Map;let c=0;function f(){return!me("recoil_memory_managament_2020")||c>0}function d(E){return E.getState().knownSelectors.add(n),c++,()=>{c--}}function h(){return FN(n)!==void 0&&!f()}function g(E,D,$,J,V){j(D,J,V),y(E,$)}function y(E,D){_(E,D)&&ae(E),m(D,!0)}function b(E,D){_(E,D)&&(Oe(F(E)).stateVersions.clear(),m(D,!1))}function m(E,D){const $=Ja.get(E);if($!=null){for(const J of $)Vm(J,Oe(t));D&&Ja.delete(E)}}function p(E,D){let $=Ja.get(D);$==null&&Ja.set(D,$=new Set),$.add(E)}function v(E,D,$,J,V,H){return D.then(ee=>{if(!f())throw ae(E),oi;const Y=rc(ee);return g(E,$,V,Y,J),ee}).catch(ee=>{if(!f())throw ae(E),oi;if(Ce(ee))return S(E,ee,$,J,V,H);const Y=Xa(ee);throw g(E,$,V,Y,J),ee})}function S(E,D,$,J,V,H){return D.then(ee=>{if(!f())throw ae(E),oi;H.loadingDepKey!=null&&H.loadingDepPromise===D?$.atomValues.set(H.loadingDepKey,rc(ee)):E.getState().knownSelectors.forEach(de=>{$.atomValues.delete(de)});const Y=N(E,$);if(Y&&Y.state!=="loading"){if((_(E,V)||F(E)==null)&&y(E,V),Y.state==="hasValue")return Y.contents;throw Y.contents}if(!_(E,V)){const de=W(E,$);if(de!=null)return de.loadingLoadable.contents}const[pe,we]=C(E,$,V);if(pe.state!=="loading"&&g(E,$,V,pe,we),pe.state==="hasError")throw pe.contents;return pe.contents}).catch(ee=>{if(ee instanceof Hw)throw oi;if(!f())throw ae(E),oi;const Y=Xa(ee);throw g(E,$,V,Y,J),ee})}function k(E,D,$,J){var V,H,ee,Y;if(_(E,J)||D.version===((V=E.getState())===null||V===void 0||(H=V.currentTree)===null||H===void 0?void 0:H.version)||D.version===((ee=E.getState())===null||ee===void 0||(Y=ee.nextTree)===null||Y===void 0?void 0:Y.version)){var pe,we,de;$N(n,$,E,(pe=(we=E.getState())===null||we===void 0||(de=we.nextTree)===null||de===void 0?void 0:de.version)!==null&&pe!==void 0?pe:E.getState().currentTree.version)}for(const Se of $)a.add(Se)}function C(E,D,$){const J=WN(n);let V=!0,H=!0;const ee=()=>{J(),H=!1};let Y,pe=!1,we;const de={loadingDepKey:null,loadingDepPromise:null},Se=new Map;function rt({key:Et}){const dt=Ya(E,D,Et);switch(Se.set(Et,dt),V||(k(E,D,new Set(Se.keys()),$),b(E,$)),dt.state){case"hasValue":return dt.contents;case"hasError":throw dt.contents;case"loading":throw de.loadingDepKey=Et,de.loadingDepPromise=dt.contents,dt.contents}throw se("Invalid Loadable state")}const pr=Et=>(...dt)=>{if(H)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),VN(E,Et,dt,{node:t})};try{Y=r({get:rt,getCallback:pr}),Y=BN(Y)?rt(Y):Y,AN(Y)&&(Y.state==="hasError"&&(pe=!0),Y=Y.contents),Ce(Y)?Y=v(E,Y,D,Se,$,de).finally(ee):ee(),Y=Y instanceof Ww?Y.value:Y}catch(Et){Y=Et,Ce(Y)?Y=S(E,Y,D,Se,$,de).finally(ee):(pe=!0,ee())}return pe?we=Xa(Y):Ce(Y)?we=IN(Y):we=rc(Y),V=!1,ce(E,$,Se),k(E,D,new Set(Se.keys()),$),[we,Se]}function N(E,D){let $=D.atomValues.get(n);if($!=null)return $;const J=new Set;try{$=s.get(H=>(typeof H!="string"&&fi(!1),Ya(E,D,H).contents),{onNodeVisit:H=>{H.type==="branch"&&H.nodeKey!==n&&J.add(H.nodeKey)}})}catch(H){throw se(`Problem with cache lookup for selector "${n}": ${H.message}`)}if($){var V;D.atomValues.set(n,$),k(E,D,J,(V=F(E))===null||V===void 0?void 0:V.executionID)}return $}function A(E,D){const $=N(E,D);if($!=null)return ae(E),$;const J=W(E,D);if(J!=null){var V;return((V=J.loadingLoadable)===null||V===void 0?void 0:V.state)==="loading"&&p(E,J.executionID),J.loadingLoadable}const H=HN(),[ee,Y]=C(E,D,H);return ee.state==="loading"?(X(E,H,ee,Y,D),p(E,H)):(ae(E),j(D,ee,Y)),ee}function W(E,D){const $=hw([u.has(E)?[Oe(u.get(E))]:[],Hl(pp(u,([V])=>V!==E),([,V])=>V)]);function J(V){for(const[H,ee]of V)if(!Ya(E,D,H).is(ee))return!0;return!1}for(const V of $){if(V.stateVersions.get(D.version)||!J(V.depValuesDiscoveredSoFarDuringAsyncWork))return V.stateVersions.set(D.version,!0),V;V.stateVersions.set(D.version,!1)}}function F(E){return u.get(E)}function X(E,D,$,J,V){u.set(E,{depValuesDiscoveredSoFarDuringAsyncWork:J,executionID:D,loadingLoadable:$,stateVersions:new Map([[V.version,!0]])})}function ce(E,D,$){if(_(E,D)){const J=F(E);J!=null&&(J.depValuesDiscoveredSoFarDuringAsyncWork=$)}}function ae(E){u.delete(E)}function _(E,D){var $;return D===(($=F(E))===null||$===void 0?void 0:$.executionID)}function L(E){return Array.from(E.entries()).map(([D,$])=>[D,$.contents])}function j(E,D,$){E.atomValues.set(n,D);try{s.set(L($),D)}catch(J){throw se(`Problem with setting cache for selector "${n}": ${J.message}`)}}function O(E){if(ii.includes(n)){const D=`Recoil selector has circular dependencies: ${ii.slice(ii.indexOf(n)).join(" \u2192 ")}`;return Xa(se(D))}ii.push(n);try{return E()}finally{ii.pop()}}function P(E,D){const $=D.atomValues.get(n);return $!=null?$:s.get(J=>{var V;return typeof J!="string"&&fi(!1),(V=DN(E,D,J))===null||V===void 0?void 0:V.contents})}function I(E,D){return O(()=>A(E,D))}function M(E){E.atomValues.delete(n)}function z(E,D){t==null&&fi(!1);for(const J of a){var $;const V=jN(J);($=V.clearCache)===null||$===void 0||$.call(V,E,D)}a.clear(),M(D),s.clear(),Vm(E,t)}return i!=null?t=zm({key:n,nodeType:"selector",peek:P,get:I,set:(D,$,J)=>{let V=!1;const H=new Map;function ee({key:de}){if(V)throw se("Recoil: Async selector sets are not currently supported.");const Se=Ya(D,$,de);if(Se.state==="hasValue")return Se.contents;if(Se.state==="loading"){const rt=`Getting value of asynchronous atom or selector "${de}" in a pending state while setting selector "${n}" is not yet supported.`;throw se(rt)}else throw Se.contents}function Y(de,Se){if(V)throw se("Recoil: Async selector sets are not currently supported.");const rt=typeof Se=="function"?Se(ee(de)):Se;MN(D,$,de.key,rt).forEach((Et,dt)=>H.set(dt,Et))}function pe(de){Y(de,UN)}const we=i({set:Y,get:ee,reset:pe},J);if(we!==void 0)throw Ce(we)?se("Recoil: Async selector sets are not currently supported."):se("Recoil: selector set should be a void function.");return V=!0,H},init:d,invalidate:M,clearCache:z,shouldDeleteConfigOnRelease:h,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:l}):t=zm({key:n,nodeType:"selector",peek:P,get:I,init:d,invalidate:M,clearCache:z,shouldDeleteConfigOnRelease:h,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:l})}Kw.value=e=>new Ww(e);var Po=Kw;const{isLoadable:KN,loadableWithError:oc,loadableWithPromise:ic,loadableWithValue:Kr}=wa,{WrappedValue:qw}=Bw,{peekNodeInfo:qN}=fr,{DEFAULT_VALUE:yr,DefaultValue:Mn,getConfigDeletionHandler:Qw,registerNode:QN,setConfigDeletionHandler:GN}=ft,{isRecoilValue:XN}=Oo,{getRecoilValueAsLoadable:YN,markRecoilValueModified:JN,setRecoilValue:Wm,setRecoilValueLoadable:ZN}=dn,{retainedByOptionWithDefault:eA}=Fr,ai=e=>e instanceof qw?e.value:e;function tA(e){const{key:t,persistence_UNSTABLE:n}=e,r=eA(e.retainedBy_UNSTABLE);let o=0;function i(p){return ic(p.then(v=>(a=Kr(v),v)).catch(v=>{throw a=oc(v),v}))}let a=Ce(e.default)?i(e.default):KN(e.default)?e.default.state==="loading"?i(e.default.contents):e.default:Kr(ai(e.default));a.contents;let s;const l=new Map;function u(p){return p}function c(p,v){const S=v.then(k=>{var C,N;return((N=((C=p.getState().nextTree)!==null&&C!==void 0?C:p.getState().currentTree).atomValues.get(t))===null||N===void 0?void 0:N.contents)===S&&Wm(p,m,k),k}).catch(k=>{var C,N;throw((N=((C=p.getState().nextTree)!==null&&C!==void 0?C:p.getState().currentTree).atomValues.get(t))===null||N===void 0?void 0:N.contents)===S&&ZN(p,m,oc(k)),k});return S}function f(p,v,S){var k;o++;const C=()=>{var F;o--,(F=l.get(p))===null||F===void 0||F.forEach(X=>X()),l.delete(p)};if(p.getState().knownAtoms.add(t),a.state==="loading"){const F=()=>{var X;((X=p.getState().nextTree)!==null&&X!==void 0?X:p.getState().currentTree).atomValues.has(t)||JN(p,m)};a.contents.finally(F)}const N=(k=e.effects)!==null&&k!==void 0?k:e.effects_UNSTABLE;if(N!=null){let _=function(M){if(X&&M.key===t){const z=F;return z instanceof Mn?d(p,v):Ce(z)?ic(z.then(E=>E instanceof Mn?a.toPromise():E)):Kr(z)}return YN(p,M)},L=function(M){return _(M).toPromise()},j=function(M){var z;const E=qN(p,(z=p.getState().nextTree)!==null&&z!==void 0?z:p.getState().currentTree,M.key);return X&&M.key===t&&!(F instanceof Mn)?{...E,isSet:!0,loadable:_(M)}:E},F=yr,X=!0,ce=!1,ae=null;const O=M=>z=>{if(X){const E=_(m),D=E.state==="hasValue"?E.contents:yr;F=typeof z=="function"?z(D):z,Ce(F)&&(F=F.then($=>(ae={effect:M,value:$},$)))}else{if(Ce(z))throw se("Setting atoms to async values is not implemented.");typeof z!="function"&&(ae={effect:M,value:ai(z)}),Wm(p,m,typeof z=="function"?E=>{const D=ai(z(E));return ae={effect:M,value:D},D}:ai(z))}},P=M=>()=>O(M)(yr),I=M=>z=>{var E;const{release:D}=p.subscribeToTransactions($=>{var J;let{currentTree:V,previousTree:H}=$.getState();H||(H=V);const ee=(J=V.atomValues.get(t))!==null&&J!==void 0?J:a;if(ee.state==="hasValue"){var Y,pe,we,de;const Se=ee.contents,rt=(Y=H.atomValues.get(t))!==null&&Y!==void 0?Y:a,pr=rt.state==="hasValue"?rt.contents:yr;((pe=ae)===null||pe===void 0?void 0:pe.effect)!==M||((we=ae)===null||we===void 0?void 0:we.value)!==Se?z(Se,pr,!V.atomValues.has(t)):((de=ae)===null||de===void 0?void 0:de.effect)===M&&(ae=null)}},t);l.set(p,[...(E=l.get(p))!==null&&E!==void 0?E:[],D])};for(const M of N)try{const z=M({node:m,storeID:p.storeID,parentStoreID_UNSTABLE:p.parentStoreID,trigger:S,setSelf:O(M),resetSelf:P(M),onSet:I(M),getPromise:L,getLoadable:_,getInfo_UNSTABLE:j});if(z!=null){var A;l.set(p,[...(A=l.get(p))!==null&&A!==void 0?A:[],z])}}catch(z){F=z,ce=!0}if(X=!1,!(F instanceof Mn)){var W;const M=ce?oc(F):Ce(F)?ic(c(p,F)):Kr(ai(F));M.contents,v.atomValues.set(t,M),(W=p.getState().nextTree)===null||W===void 0||W.atomValues.set(t,M)}}return C}function d(p,v){var S,k;return(S=(k=v.atomValues.get(t))!==null&&k!==void 0?k:s)!==null&&S!==void 0?S:a}function h(p,v){if(v.atomValues.has(t))return Oe(v.atomValues.get(t));if(v.nonvalidatedAtoms.has(t)){if(s!=null)return s;if(n==null)return a;const S=v.nonvalidatedAtoms.get(t),k=n.validator(S,yr);return s=k instanceof Mn?a:Kr(k),s}else return a}function g(){s=void 0}function y(p,v,S){if(v.atomValues.has(t)){const k=Oe(v.atomValues.get(t));if(k.state==="hasValue"&&S===k.contents)return new Map}else if(!v.nonvalidatedAtoms.has(t)&&S instanceof Mn)return new Map;return s=void 0,new Map().set(t,Kr(S))}function b(){return Qw(t)!==void 0&&o<=0}const m=QN({key:t,nodeType:"atom",peek:d,get:h,set:y,init:f,invalidate:g,shouldDeleteConfigOnRelease:b,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 xp(e){const{...t}=e,n="default"in e?e.default:new Promise(()=>{});return XN(n)?nA({...t,default:n}):tA({...t,default:n})}function nA(e){const t=xp({...e,default:yr,persistence_UNSTABLE:e.persistence_UNSTABLE===void 0?void 0:{...e.persistence_UNSTABLE,validator:r=>r instanceof Mn?r:Oe(e.persistence_UNSTABLE).validator(r,yr)},effects:e.effects,effects_UNSTABLE:e.effects_UNSTABLE}),n=Po({key:`${e.key}__withFallback`,get:({get:r})=>{const o=r(t);return o instanceof Mn?e.default:o},set:({set:r},o)=>r(t,o),cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:e.dangerouslyAllowMutability});return GN(n.key,Qw(e.key)),n}xp.value=e=>new qw(e);var Gw=xp;class rA{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 oA={MapCache:rA},iA=oA.MapCache,aA=Object.freeze({__proto__:null,MapCache:iA});const{LRUCache:Hm}=Vw,{MapCache:sA}=aA,Za={equality:"reference",eviction:"none",maxSize:1/0};function lA({equality:e=Za.equality,eviction:t=Za.eviction,maxSize:n=Za.maxSize}=Za){const r=uA(e);return cA(t,n,r)}function uA(e){switch(e){case"reference":return t=>t;case"value":return t=>ru(t)}throw se(`Unrecognized equality policy ${e}`)}function cA(e,t,n){switch(e){case"keep-all":return new sA({mapKey:n});case"lru":return new Hm({mapKey:n,maxSize:Oe(t)});case"most-recent":return new Hm({mapKey:n,maxSize:1})}throw se(`Unrecognized eviction policy ${e}`)}var Xw=lA;const{setConfigDeletionHandler:fA}=ft;function dA(e){var t,n;const r=Xw({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=Gw({...u,key:`${e.key}__${(i=ru(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),fA(f.key,()=>{r.delete(o)}),f}}var pA=dA;const{setConfigDeletionHandler:hA}=ft;let vA=0;function mA(e){var t,n;const r=Xw({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=ru(o,{allowFunctions:!0}))!==null&&i!==void 0?i:"void"}/${vA++}`,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:(g,y)=>d(o)(g,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),hA(f.key,()=>{r.delete(o)}),f}}var dr=mA;const gA=dr({key:"__constant",get:e=>()=>e,cachePolicyForParams_UNSTABLE:{equality:"reference"}});function yA(e){return gA(e)}var wA=yA;const SA=dr({key:"__error",get:e=>()=>{throw se(e)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});function _A(e){return SA(e)}var bA=_A;function EA(e){return e}var xA=EA;const{loadableWithError:Yw,loadableWithPromise:Jw,loadableWithValue:Zw}=wa;function ou(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 RA(e){return e!=null&&!Ce(e)}function iu(e){return Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(t=>e[t])}function Ff(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?Zw(t[i]):Ce(o)?Jw(o):Yw(o));return Ff(e,r)}function CA(e,t){return t.map((n,r)=>n===void 0?e[r]:n)}const OA=dr({key:"__waitForNone",get:e=>({get:t})=>{const n=iu(e),[r,o]=ou(t,n);return vo(e,r,o)},dangerouslyAllowMutability:!0}),kA=dr({key:"__waitForAny",get:e=>({get:t})=>{const n=iu(e),[r,o]=ou(t,n);return o.some(i=>!Ce(i))?vo(e,r,o):new Promise(i=>{for(const[a,s]of o.entries())Ce(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}),TA=dr({key:"__waitForAll",get:e=>({get:t})=>{const n=iu(e),[r,o]=ou(t,n);if(o.every(a=>a==null))return Ff(e,r);const i=o.find(RA);if(i!=null)throw i;return Promise.all(o).then(a=>Ff(e,CA(r,a)))},dangerouslyAllowMutability:!0}),PA=dr({key:"__waitForAllSettled",get:e=>({get:t})=>{const n=iu(e),[r,o]=ou(t,n);return o.every(i=>!Ce(i))?vo(e,r,o):Promise.all(o.map((i,a)=>Ce(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}),LA=dr({key:"__noWait",get:e=>({get:t})=>{try{return Po.value(Zw(t(e)))}catch(n){return Po.value(Ce(n)?Jw(n):Yw(n))}},dangerouslyAllowMutability:!0});var NA={waitForNone:OA,waitForAny:kA,waitForAll:TA,waitForAllSettled:PA,noWait:LA};const{RecoilLoadable:AA}=wa,{DefaultValue:IA}=ft,{RecoilRoot:DA,useRecoilStoreID:MA}=On,{isRecoilValue:$A}=Oo,{retentionZone:UA}=ql,{freshSnapshot:FA}=Jl,{useRecoilState:jA,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:BA,useRecoilStateLoadable:zA,useRecoilValue:VA,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:WA,useRecoilValueLoadable:HA,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:KA,useResetRecoilState:qA,useSetRecoilState:QA}=oL,{useGotoRecoilSnapshot:GA,useRecoilSnapshot:XA,useRecoilTransactionObserver:YA}=Mw,{useRecoilCallback:JA}=jw,{noWait:ZA,waitForAll:eI,waitForAllSettled:tI,waitForAny:nI,waitForNone:rI}=NA;var Rp={DefaultValue:IA,isRecoilValue:$A,RecoilLoadable:AA,RecoilEnv:j1,RecoilRoot:DA,useRecoilStoreID:MA,useRecoilBridgeAcrossReactRoots_UNSTABLE:LL,atom:Gw,selector:Po,atomFamily:pA,selectorFamily:dr,constSelector:wA,errorSelector:bA,readOnlySelector:xA,noWait:ZA,waitForNone:rI,waitForAny:nI,waitForAll:eI,waitForAllSettled:tI,useRecoilValue:VA,useRecoilValueLoadable:HA,useRecoilState:jA,useRecoilStateLoadable:zA,useSetRecoilState:QA,useResetRecoilState:qA,useGetRecoilValueInfo_UNSTABLE:RL,useRecoilRefresher_UNSTABLE:aN,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:KA,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:WA,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:BA,useRecoilCallback:JA,useRecoilTransaction_UNSTABLE:fN,useGotoRecoilSnapshot:GA,useRecoilSnapshot:XA,useRecoilTransactionObserver_UNSTABLE:YA,snapshot_UNSTABLE:FA,useRetain:wp,retentionZone:UA},oI=Rp.RecoilRoot,iI=Rp.atom,_U=Rp.useRecoilState;function aI(e,t){if(e==null)return{};var n=sI(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function sI(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 Cp=R.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,a=aI(e,["color","size"]);return w("svg",{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,children:w("polyline",{points:"20 6 9 17 4 12"})})});Cp.propTypes={color:ge.exports.string,size:ge.exports.oneOfType([ge.exports.string,ge.exports.number])};Cp.displayName="Check";const lI=Cp;function uI(e,t){if(e==null)return{};var n=cI(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function cI(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 Op=R.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,a=uI(e,["color","size"]);return Z("svg",{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,children:[w("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"}),w("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]})});Op.propTypes={color:ge.exports.string,size:ge.exports.oneOfType([ge.exports.string,ge.exports.number])};Op.displayName="EyeOff";const fI=Op;function dI(e,t){if(e==null)return{};var n=pI(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function pI(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 kp=R.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,a=dI(e,["color","size"]);return Z("svg",{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,children:[w("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),w("circle",{cx:"12",cy:"12",r:"3"})]})});kp.propTypes={color:ge.exports.string,size:ge.exports.oneOfType([ge.exports.string,ge.exports.number])};kp.displayName="Eye";const hI=kp;function vI(e,t){if(e==null)return{};var n=mI(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function mI(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 Tp=R.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,a=vI(e,["color","size"]);return w("svg",{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,children:w("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"})})});Tp.propTypes={color:ge.exports.string,size:ge.exports.oneOfType([ge.exports.string,ge.exports.number])};Tp.displayName="GitHub";const gI=Tp;function yI(e,t){if(e==null)return{};var n=wI(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function wI(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 Pp=R.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,a=yI(e,["color","size"]);return Z("svg",{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,children:[w("circle",{cx:"12",cy:"12",r:"10"}),w("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),w("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})});Pp.propTypes={color:ge.exports.string,size:ge.exports.oneOfType([ge.exports.string,ge.exports.number])};Pp.displayName="Info";const SI=Pp;function _I(e,t){if(e==null)return{};var n=bI(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function bI(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 Lp=R.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,a=_I(e,["color","size"]);return Z("svg",{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,children:[w("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),w("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})});Lp.propTypes={color:ge.exports.string,size:ge.exports.oneOfType([ge.exports.string,ge.exports.number])};Lp.displayName="X";const EI=Lp;function xI(e,t){let n;return(...r)=>{n&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}function eS(e){return e.replace(/\/$/,"")}function bU(e,t){let n=String(e);for(;n.length1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:Np(e)?2:Ap(e)?3:0}function jf(e,t){return Fo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function LI(e,t){return Fo(e)===2?e.get(t):e[t]}function oS(e,t,n){var r=Fo(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function NI(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Np(e){return MI&&e instanceof Map}function Ap(e){return $I&&e instanceof Set}function gr(e){return e.o||e.t}function Ip(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=FI(e);delete t[gt];for(var n=Up(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=AI),Object.freeze(e),t&&Yi(e,function(n,r){return Dp(r,!0)},!0)),e}function AI(){qt(2)}function Mp(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function un(e){var t=jI[e];return t||qt(18,e),t}function qm(){return Ji}function ac(e,t){t&&(un("Patches"),e.u=[],e.s=[],e.v=t)}function fl(e){Bf(e),e.p.forEach(II),e.p=null}function Bf(e){e===Ji&&(Ji=e.l)}function Qm(e){return Ji={p:[],l:Ji,h:e,m:!0,_:0}}function II(e){var t=e[gt];t.i===0||t.i===1?t.j():t.O=!0}function sc(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||un("ES5").S(t,e,r),r?(n[gt].P&&(fl(t),qt(4)),Ir(e)&&(e=dl(t,e),t.l||pl(t,e)),t.u&&un("Patches").M(n[gt].t,e,t.u,t.s)):e=dl(t,n,[]),fl(t),t.u&&t.v(t.u,t.s),e!==iS?e:void 0}function dl(e,t,n){if(Mp(t))return t;var r=t[gt];if(!r)return Yi(t,function(i,a){return Gm(e,r,t,i,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return pl(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=Ip(r.k):r.o;Yi(r.i===3?new Set(o):o,function(i,a){return Gm(e,r,o,i,a,n)}),pl(e,o,!1),n&&e.u&&un("Patches").R(r,n,e.u,e.s)}return r.o}function Gm(e,t,n,r,o,i){if(Lo(o)){var a=dl(e,o,i&&t&&t.i!==3&&!jf(t.D,r)?i.concat(r):void 0);if(oS(n,r,a),!Lo(a))return;e.m=!1}if(Ir(o)&&!Mp(o)){if(!e.h.F&&e._<1)return;dl(e,o),t&&t.A.l||pl(e,o)}}function pl(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&Dp(t,n)}function lc(e,t){var n=e[gt];return(n?gr(n):e)[t]}function Xm(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 zf(e){e.P||(e.P=!0,e.l&&zf(e.l))}function uc(e){e.o||(e.o=Ip(e.t))}function Vf(e,t,n){var r=Np(t)?un("MapSet").N(t,n):Ap(t)?un("MapSet").T(t,n):e.g?function(o,i){var a=Array.isArray(o),s={i:a?1:0,A:i?i.A:qm(),P:!1,I:!1,D:{},l:i,t:o,k:null,o:null,j:null,C:!1},l=s,u=Wf;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):un("ES5").J(t,n);return(n?n.A:qm()).p.push(r),r}function DI(e){return Lo(e)||qt(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||!un("ES5").K(o)))return o.t;o.I=!0,r=Ym(n,i),o.I=!1}else r=Ym(n,i);return Yi(r,function(a,s){o&&LI(o.t,a)===s||oS(r,a,t(s))}),i===3?new Set(r):r}(e)}function Ym(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Ip(e)}var Jm,Ji,$p=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",MI=typeof Map<"u",$I=typeof Set<"u",Zm=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",iS=$p?Symbol.for("immer-nothing"):((Jm={})["immer-nothing"]=!0,Jm),eg=$p?Symbol.for("immer-draftable"):"__$immer_draftable",gt=$p?Symbol.for("immer-state"):"__$immer_state",UI=""+Object.prototype.constructor,Up=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,FI=Object.getOwnPropertyDescriptors||function(e){var t={};return Up(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},jI={},Wf={get:function(e,t){if(t===gt)return e;var n=gr(e);if(!jf(n,t))return function(o,i,a){var s,l=Xm(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===lc(e.t,t)?(uc(e),e.o[t]=Vf(e.A.h,r,e)):r},has:function(e,t){return t in gr(e)},ownKeys:function(e){return Reflect.ownKeys(gr(e))},set:function(e,t,n){var r=Xm(gr(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=lc(gr(e),t),i=o==null?void 0:o[gt];if(i&&i.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(NI(n,o)&&(n!==void 0||jf(e.t,t)))return!0;uc(e),zf(e)}return e.o[t]===n&&typeof n!="number"&&(n!==void 0||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return lc(e.t,t)!==void 0||t in e.t?(e.D[t]=!1,uc(e),zf(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=gr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){qt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){qt(12)}},di={};Yi(Wf,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 Wf.set.call(this,e[0],t,n,e[0])};var BI=function(){function e(n){var r=this;this.g=Zm,this.F=!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 b=this;y===void 0&&(y=s);for(var m=arguments.length,p=Array(m>1?m-1:0),v=1;v1?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=un("Patches").$;return Lo(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),yt=new BI,zI=yt.produce;yt.produceWithPatches.bind(yt);var VI=yt.setAutoFreeze.bind(yt);yt.setUseProxies.bind(yt);yt.applyPatches.bind(yt);yt.createDraft.bind(yt);yt.finishDraft.bind(yt);VI(!1);const{createContext:Fp,memo:WI,useMemo:HI,useRef:KI,useEffect:qI,useCallback:tg,useContext:Hf,useState:QI}=ye,aS=Fp(null),sS=Fp(null),lS=Fp(null);function GI(){return Hf(lS)}function XI({initialState:e,actions:t={},children:n}){const r=KI(e),[o,i]=QI(e),a=tg(()=>r.current,[]);qI(()=>{},[a]);const s=tg((u,c)=>{if(typeof u=="function")return u(s,a);const f=zI(a(),c);f!==r.current&&(r.current=f,i(f))},[a]),l=HI(()=>uS(t,s),[t,s]);return w(aS.Provider,{value:o,children:w(sS.Provider,{value:s,children:w(lS.Provider,{value:l,children:n})})})}function kn(e){return t=>{const n=WI(t);function r(o){const i=Hf(aS),a=Hf(sS),s=e(i,o),l={dispatch:a,...o,...s};return w(n,{...l})}return r}}function YI(e,t){return function(...n){return t(e.apply(this,n))}}function uS(e,t){const n={};for(const r in e){const o=e[r];typeof o=="function"?n[r]=YI(o,t):typeof o=="object"&&(n[r]=uS(o,t))}return n}const cS="yacd.haishan.me";function JI(){try{const e=localStorage.getItem(cS);return e?JSON.parse(e):void 0}catch{return}}function jr(e){try{const t=JSON.stringify(e);localStorage.setItem(cS,t)}catch{}}const fS="/configs";async function dS(e){const{url:t,init:n}=_t(e);return await fetch(t+fS,n)}function ZI(e){return"socks-port"in e&&(e["socket-port"]=e["socks-port"]),e}async function eD(e,t){const{url:n,init:r}=_t(e),o=JSON.stringify(ZI(t));return await fetch(n+fS,{...r,body:o,method:"PATCH"})}const pS="/traffic",tD=new TextDecoder("utf-8"),es=150,Zi={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 so=!1,ts="";function Kf(e){Zi.appendData(JSON.parse(e))}function hS(e){return e.read().then(({done:t,value:n})=>{const r=tD.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();hS(o)}else so=!1},r=>{console.log("fetch /traffic error",r),so=!1}),Zi}function ng(e){return t=>{t(`openModal:${e}`,n=>{n.modals[e]=!0})}}function rD(e){return t=>{t(`closeModal:${e}`,n=>{n.modals[e]=!1})}}const oD={apiConfig:!1},xU=e=>e.configs.configs,iD=e=>e.configs.haveFetchedConfig,RU=e=>e.configs.configs["log-level"];function vS(e){return async(t,n)=>{let r;try{r=await dS(e)}catch{t(ng("apiConfig"));return}if(!r.ok){console.log("Error fetch configs",r.statusText),t(ng("apiConfig"));return}const o=await r.json();t("store/configs#fetchConfigs",a=>{a.configs.configs=o}),iD(n())?jp(e):t(aD())}}function aD(){return e=>{e("store/configs#markHaveFetchedConfig",t=>{t.configs.haveFetchedConfig=!0})}}function CU(e,t){return async n=>{eD(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(vS(e))}),n("storeConfigsOptimisticUpdateConfigs",r=>{r.configs.configs={...r.configs.configs,...t}})}}const sD={configs:{port:7890,"socks-port":7891,"redir-port":0,"allow-lan":!1,mode:"Rule","log-level":"uninit"},haveFetchedConfig:!1},jo=e=>{const t=e.app.selectedClashAPIConfigIndex;return e.app.clashAPIConfigs[t]},mS=e=>e.app.selectedClashAPIConfigIndex,Bp=e=>e.app.clashAPIConfigs,zp=e=>e.app.theme,lD=e=>e.app.selectedChartStyleIndex,gS=e=>e.app.latencyTestUrl,OU=e=>e.app.collapsibleIsOpen,kU=e=>e.app.proxySortBy,TU=e=>e.app.hideUnavailableProxies,uD=e=>e.app.autoCloseOldConns,PU=e=>e.app.logStreamingPaused,cD=xI(jr,600);function Vp(e,{baseURL:t,secret:n,metaLabel:r}){const o=Bp(e());for(let i=0;i{if(Vp(n,e))return;const o={...e,addedAt:Date.now()};t("addClashAPIConfig",i=>{i.app.clashAPIConfigs.push(o)}),jr(n().app)}}function dD(e){return async(t,n)=>{const r=Vp(n,e);t("removeClashAPIConfig",o=>{o.app.clashAPIConfigs.splice(r,1)}),jr(n().app)}}function pD(e){return async(t,n)=>{const r=Vp(n,e);mS(n())!==r&&t("selectClashAPIConfig",i=>{i.app.selectedClashAPIConfigIndex=r}),jr(n().app);try{window.location.reload()}catch{}}}const cc=document.querySelector("html");function fc(e,t){const n=document.createElement("meta");n.setAttribute("name","theme-color"),n.setAttribute("content",e),t&&n.setAttribute("media",t),document.head.appendChild(n)}function hD(e){const t=Array.from(document.querySelectorAll("meta[name=theme-color]"));let n;for(const r of t)r.getAttribute("media")?document.head.removeChild(r):n=r;if(e==="auto")if(fc("#eeeeee","(prefers-color-scheme: light)"),fc("#202020","(prefers-color-scheme: dark)"),n)document.head.removeChild(n);else return;else{const r=e==="light"?"#eeeeee":"#202020";n?n.setAttribute("content",r):fc(r)}}function yS(e="dark"){e==="auto"?cc.setAttribute("data-theme","auto"):e==="dark"?cc.setAttribute("data-theme","dark"):cc.setAttribute("data-theme","light"),hD(e)}function vD(e="auto"){return(t,n)=>{zp(n())!==e&&(yS(e),t("storeSwitchTheme",o=>{o.app.theme=e}),jr(n().app))}}function mD(e){return(t,n)=>{t("appSelectChartStyleIndex",r=>{r.app.selectedChartStyleIndex=Number(e)}),jr(n().app)}}function rg(e,t){return(n,r)=>{n("appUpdateAppConfig",o=>{o.app[e]=t}),jr(r().app)}}function gD(e,t,n){return(r,o)=>{r("updateCollapsibleIsOpen",i=>{i.app.collapsibleIsOpen[`${e}:${t}`]=n}),cD(o().app)}}var Pg,Lg;const yD={baseURL:(Lg=(Pg=document.getElementById("app"))==null?void 0:Pg.getAttribute("data-base-url"))!=null?Lg:"http://127.0.0.1:9090",secret:"",addedAt:0},wD={selectedClashAPIConfigIndex:0,clashAPIConfigs:[yD],latencyTestUrl:"http://www.gstatic.com/generate_204",selectedChartStyleIndex:0,theme:"dark",collapsibleIsOpen:{},proxySortBy:"Natural",hideUnavailableProxies:!1,autoCloseOldConns:!1,logStreamingPaused:!1};function SD(){const{search:e}=window.location,t={};if(typeof e!="string"||e==="")return t;const n=e.replace(/^\?/,"").split("&");for(let r=0;rOI("/version",e.apiConfig));return Z(Nt,{children:[w(rS,{title:"About"}),t&&t.version?w(og,{name:"Clash",version:t.version,link:"https://github.com/Dreamacro/clash"}):null,w(og,{name:"Yacd",version:"0.3.8",link:"https://github.com/haishanh/yacd"})]})}const CD=e=>({apiConfig:jo(e)}),OD=kn(CD)(RD),kD="_loading_74j3j_1",TD="_spinner_74j3j_9",PD="_rotate_74j3j_1",ig={loading:kD,spinner:TD,rotate:PD},wS=({height:e})=>{const t=e?{height:e}:{};return w("div",{className:ig.loading,style:t,children:w("div",{className:ig.spinner})})},LD=e=>({apiConfig:jo(e),apiConfigs:Bp(e)});function ND({apiConfig:e,apiConfigs:t}){return R.exports.useEffect(()=>{let n="yacd";if(t.length>1)try{n=`${e.metaLabel||new URL(e.baseURL).host} - yacd`}catch{}document.title=n}),w(Nt,{})}const AD=kn(LD)(ND),ID=new y1,DD=new FC({queryCache:ID,defaultOptions:{queries:{suspense:!0}}});var hl="NOT_FOUND";function MD(e){var t;return{get:function(r){return t&&e(t.key,r)?t.value:hl},put:function(r,o){t={key:r,value:o}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function $D(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 hl}function o(s,l){r(s)===hl&&(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 UD=function(t,n){return t===n};function FD(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,_S=e=>e.logs.tail,WD=e=>e.logs.searchText,LU=VD(SS,_S,WD,(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 NU(e){return t=>{t("logsUpdateSearchText",n=>{n.logs.searchText=e.toLowerCase()})}}function AU(e){return(t,n)=>{const r=n(),o=SS(r),i=_S(r),a=i>=qf-1?0:i+1;o[a]=e,t("logsAppendLog",s=>{s.logs.tail=a})}}const HD={searchText:"",logs:[],tail:-1},au="/connections",_s=[];function KD(e){let t;try{t=JSON.parse(e)}catch{console.log("JSON.parse error",JSON.parse(e))}_s.forEach(n=>n(t))}let pc;function qD(e,t){if(pc===1&&t)return ag(t);pc=1;const n=nS(e,au),r=new WebSocket(n);if(r.addEventListener("error",()=>pc=3),r.addEventListener("message",o=>KD(o.data)),t)return ag(t)}function ag(e){return _s.push(e),function(){const n=_s.indexOf(e);_s.splice(n,1)}}async function IU(e){const{url:t,init:n}=_t(e);return await fetch(t+au,{...n,method:"DELETE"})}async function QD(e){const{url:t,init:n}=_t(e);return await fetch(t+au,{...n})}async function GD(e,t){const{url:n,init:r}=_t(e),o=`${n}${au}/${t}`;return await fetch(o,{...r,method:"DELETE"})}const Wp="/proxies";async function XD(e){const{url:t,init:n}=_t(e);return await(await fetch(t+Wp,n)).json()}async function YD(e,t,n){const r={name:n},{url:o,init:i}=_t(e),a=encodeURIComponent(t),s=`${o}${Wp}/${a}`;return await fetch(s,{...i,method:"PUT",body:JSON.stringify(r)})}async function bS(e,t,n="http://www.gstatic.com/generate_204"){const{url:r,init:o}=_t(e),i=`timeout=5000&url=${encodeURIComponent(n)}`,a=`${r}${Wp}/${encodeURIComponent(t)}/delay?${i}`;return await fetch(a,o)}async function JD(e){const{url:t,init:n}=_t(e),r=await fetch(t+"/providers/proxies",n);return r.status===404?{providers:{}}:await r.json()}async function ES(e,t){const{url:n,init:r}=_t(e),o={...r,method:"PUT"};return await fetch(n+"/providers/proxies/"+encodeURIComponent(t),o)}async function ZD(e,t){const{url:n,init:r}=_t(e),o={...r,method:"GET"};return await fetch(n+"/providers/proxies/"+encodeURIComponent(t)+"/healthcheck",o)}const eM={proxies:{},delay:{},groupNames:[],showModalClosePrevConns:!1},xS=()=>null,tM=["Direct","Reject","Relay","Selector","Fallback","URLTest","LoadBalance","Unknown"],RS=e=>e.proxies.proxies,nM=e=>e.proxies.delay,DU=e=>e.proxies.groupNames,rM=e=>e.proxies.proxyProviders||[],oM=e=>e.proxies.dangleProxyNames,MU=e=>e.proxies.showModalClosePrevConns;function iM(e,t){const n={};for(const r of e){const i=(t(r)||{history:[]}).history,a=i[i.length-1];a&&typeof a.delay=="number"&&(n[r]={number:a.delay})}return n}function Bo(e){return async(t,n)=>{const[r,o]=await Promise.all([XD(e),JD(e)]),{proxyProviders:i,providerProxyRecord:a}=dM(o.providers),s={...a,...r.proxies},[l,u]=fM(s),c={...nM(n()),...iM(Object.keys(s),d=>s[d])},f=[];for(const d of u)a[d]||f.push(d);t("store/proxies#fetchProxies",d=>{d.proxies.proxies=s,d.proxies.groupNames=l,d.proxies.dangleProxyNames=f,d.proxies.delay=c,d.proxies.proxyProviders=i})}}function $U(e,t){return async n=>{try{await ES(e,t)}catch{}n(Bo(e))}}function UU(e,t){return async n=>{for(let r=0;r{await Hp(e,t),await n(Bo(e))}}async function aM(e,t,n){const r=await QD(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=>GD(e,s).catch(xS)))}function sM(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 lM(e,t,n,r,o){try{if((await YD(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)),uD(t())){const a=RS(t());OS(n,a,{groupName:r,itemName:o})}}function CS(){return e=>{e("closeModalClosePrevConns",t=>{t.proxies.showModalClosePrevConns=!1})}}function OS(e,t,n){const r=sM(t,n.groupName,n.itemName);aM(e,n.groupName,r[0])}function uM(e){return async(t,n)=>{var a;const r=n(),o=(a=r.proxies.switchProxyCtx)==null?void 0:a.to;if(!o){t(CS());return}const i=r.proxies.proxies;OS(e,i,o),t("closePrevConnsAndTheModal",s=>{s.proxies.showModalClosePrevConns=!1,s.proxies.switchProxyCtx=void 0})}}function jU(e,t,n){return async(r,o)=>{lM(r,o,e,t,n).catch(xS),r("store/proxies#switchProxy",i=>{const a=i.proxies.proxies;a[t]&&a[t].now&&(a[t].now=n)})}}function cM(e,t){return async(n,r)=>{const o=RS(r()),i=gS(r()),a=new Map,s=new Map,l=t.map(u=>{const c=o[u];return c.__provider?c.__provider?s.get(c.__provider)?void 0:(s.set(c.__provider,!0),Hp(e,c.__provider)):void 0:a.get(u)?void 0:(a.set(u,!0),bS(e,u,i))});await Promise.all(l),await n(Bo(e))}}function BU(e){return async(t,n)=>{const r=oM(n()),o=gS(n());await Promise.all(r.map(a=>bS(e,a,o)));const i=rM(n());for(const a of i)await Hp(e,a.name);await t(Bo(e))}}function fM(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))):tM.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 dM(e){const t=Object.keys(e),n=[],r={};for(let o=0;on(o=>!o),[]);return[t,r]}function VU(e){const[t,n]=TS(e);return{value:t,set:n}}const yM="_ul_1ore2_1",wM="_li_1ore2_10",SM="_right_1ore2_21",_M="_close_1ore2_32",bM="_eye_1ore2_39",EM="_url_1ore2_54",xM="_secret_1ore2_55",RM="_metaLabel_1ore2_56",CM="_btn_1ore2_62",rn={ul:yM,li:wM,right:SM,close:_M,eye:bM,url:EM,secret:xM,metaLabel:RM,btn:CM},OM=e=>({apiConfigs:Bp(e),selectedClashAPIConfigIndex:mS(e)}),kM=kn(OM)(TM);function TM({apiConfigs:e,selectedClashAPIConfigIndex:t}){const{app:{removeClashAPIConfig:n,selectClashAPIConfig:r}}=GI(),o=R.exports.useCallback(a=>{n(a)},[n]),i=R.exports.useCallback(a=>{r(a)},[r]);return w(Nt,{children:w("ul",{className:rn.ul,children:e.map((a,s)=>w("li",{className:ar(rn.li,{[rn.isSelected]:s===t}),children:w(PM,{disableRemove:s===t,conf:a,onRemove:o,onSelect:i})},a.baseURL+a.secret+a.metaLabel))})})}function PM({conf:e,disableRemove:t,onRemove:n,onSelect:r}){const[o,i]=gM(),a=o?fI:hI,s=R.exports.useCallback(l=>{l.stopPropagation()},[]);return Z(Nt,{children:[w(sg,{disabled:t,onClick:()=>n(e),className:rn.close,children:w(EI,{size:20})}),Z("div",{className:rn.right,children:[e.metaLabel?Z(Nt,{children:[w("span",{className:rn.metaLabel,tabIndex:0,role:"button",onClick:()=>r(e),onKeyUp:s,children:e.metaLabel}),w("span",{})]}):null,w("span",{className:rn.url,tabIndex:0,role:"button",onClick:()=>r(e),onKeyUp:s,children:e.baseURL}),w("span",{}),e.secret?Z(Nt,{children:[w("span",{className:rn.secret,children:o?e.secret:"***"}),w(sg,{onClick:i,className:rn.eye,children:w(a,{size:16})})]}):null]})]})}function sg({children:e,onClick:t,className:n,disabled:r}){return w("button",{disabled:r,className:ar(n,rn.btn),onClick:t,children:e})}const LM="_root_zwtea_1",NM="_header_zwtea_5",AM="_icon_zwtea_10",IM="_body_zwtea_20",DM="_hostnamePort_zwtea_24",MM="_error_zwtea_36",$M="_footer_zwtea_42",Ln={root:LM,header:NM,icon:AM,body:IM,hostnamePort:DM,error:MM,footer:$M},UM="_btn_lzu00_1",FM="_circular_lzu00_27",jM="_minimal_lzu00_30",BM="_btnStart_lzu00_48",zM="_loadingContainer_lzu00_55",pi={btn:UM,circular:FM,minimal:jM,btnStart:BM,loadingContainer:zM},VM="_sectionNameType_8lri2_1",WM="_loadingDot_8lri2_66",HM="_dot2_8lri2_1",KM="_dot1_8lri2_1",qM="_dot3_8lri2_1",PS={sectionNameType:VM,loadingDot:WM,dot2:HM,dot1:KM,dot3:qM};function WU({name:e,type:t}){return Z("h2",{className:PS.sectionNameType,children:[w("span",{children:e}),w("span",{children:t})]})}function QM(){return w("span",{className:PS.loadingDot})}const{forwardRef:GM,useCallback:XM}=At;function YM(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},h=XM(y=>{o||n&&n(y)},[o,n]),g=ar(pi.btn,{[pi.minimal]:i==="minimal",[pi.circular]:i==="circular"},a);return w("button",{className:g,ref:t,onClick:h,disabled:r,...f,children:o?Z(Nt,{children:[w("span",{style:{display:"inline-flex",opacity:0},children:w(lg,{...d})}),w("span",{className:pi.loadingContainer,children:w(QM,{})})]}):w(lg,{...d})})}function lg({children:e,label:t,text:n,start:r}){return Z(Nt,{children:[r?w("span",{className:pi.btnStart,children:typeof r=="function"?r():r}):null,e||t||n]})}const JM=GM(YM),ZM="_root_1or8t_1",e3="_floatAbove_1or8t_32",ug={root:ZM,floatAbove:e3},{useCallback:t3}=At;function hc({id:e,label:t,value:n,onChange:r,...o}){const i=t3(a=>r(a),[r]);return Z("div",{className:ug.root,children:[w("input",{id:e,value:n,onChange:i,...o}),w("label",{htmlFor:e,className:ug.floatAbove,children:t})]})}const n3="_path_r8pm3_1",r3="_dash_r8pm3_1",o3={path:n3,dash:r3};function Kp({width:e=320,height:t=320,animate:n=!1,c0:r="currentColor",stroke:o="#eee",eye:i="#eee",mouth:a="#eee"}){const s=ar({[o3.path]:n});return w("svg",{width:e,height:t,viewBox:"0 0 320 320",xmlns:"http://www.w3.org/2000/svg",children:Z("g",{fill:"none",fillRule:"evenodd",children:[w("path",{d:"M71.689 53.055c9.23-1.487 25.684 27.263 41.411 56.663 18.572-8.017 71.708-7.717 93.775 0 4.714-15.612 31.96-57.405 41.626-56.663 3.992.088 13.07 31.705 23.309 94.96 2.743 16.949 7.537 47.492 14.38 91.63-42.339 17.834-84.37 26.751-126.095 26.751-41.724 0-83.756-8.917-126.095-26.751C52.973 116.244 65.536 54.047 71.689 53.055z",stroke:o,strokeWidth:"4",strokeLinecap:"round",fill:r,className:s}),w("circle",{fill:i,cx:"216.5",cy:"181.5",r:"14.5"}),w("circle",{fill:i,cx:"104.5",cy:"181.5",r:"14.5"}),w("g",{stroke:a,strokeLinecap:"round",strokeWidth:"4",children:w("path",{d:"M175.568 218.694c-2.494 1.582-5.534 2.207-8.563 1.508-3.029-.7-5.487-2.594-7.035-5.11M143.981 218.694c2.494 1.582 5.534 2.207 8.563 1.508 3.03-.7 5.488-2.594 7.036-5.11"})})]})})}const{useState:rs,useRef:cg,useCallback:vc,useEffect:i3}=At,LS=0,a3=()=>{},s3=e=>({apiConfig:jo(e)});function l3({dispatch:e}){const[t,n]=rs(""),[r,o]=rs(""),[i,a]=rs(""),[s,l]=rs(""),u=cg(!1),c=cg(null),f=vc(y=>{u.current=!0,l("");const b=y.target,{name:m}=b,p=b.value;switch(m){case"baseURL":n(p);break;case"secret":o(p);break;case"metaLabel":a(p);break;default:throw new Error(`unknown input name ${m}`)}},[]),d=vc(()=>{u3({baseURL:t,secret:r}).then(y=>{y[0]!==LS?l(y[1]):e(fD({baseURL:t,secret:r,metaLabel:i}))})},[t,r,i,e]),h=vc(y=>{y.target instanceof Element&&(!y.target.tagName||y.target.tagName.toUpperCase()!=="INPUT")||y.key==="Enter"&&d()},[d]),g=async()=>{(await fetch("/")).json().then(b=>{b.hello==="clash"&&n(window.location.origin)},a3)};return i3(()=>{g()},[]),Z("div",{className:Ln.root,ref:c,onKeyDown:h,children:[w("div",{className:Ln.header,children:w("div",{className:Ln.icon,children:w(Kp,{width:160,height:160,stroke:"var(--stroke)"})})}),Z("div",{className:Ln.body,children:[Z("div",{className:Ln.hostnamePort,children:[w(hc,{id:"baseURL",name:"baseURL",label:"API Base URL",type:"text",placeholder:"http://127.0.0.1:9090",value:t,onChange:f}),w(hc,{id:"secret",name:"secret",label:"Secret(optional)",value:r,type:"text",onChange:f})]}),s?w("div",{className:Ln.error,children:s}):null,w("div",{className:Ln.label,children:w(hc,{id:"metaLabel",name:"metaLabel",label:"Label(optional)",type:"text",placeholder:"",value:i,onChange:f})})]}),w("div",{className:Ln.footer,children:w(JM,{label:"Add",onClick:d})}),w("div",{style:{height:20}}),w(kM,{})]})}const NS=kn(s3)(l3);async function u3(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 dS(e);return t.status>399?[1,t.statusText]:[LS]}catch{return[1,"Failed to connect"]}}/**
+ * @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 AS(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Ne(e,t){return n=>{if(e&&e(n),!n.defaultPrevented)return t(n)}}function fg(e){return typeof e=="boolean"}function vl(e){return!!(e&&{}.toString.call(e)=="[object Function]")}function c3(e){return typeof e=="string"}function f3(e,t){if(e!=null)if(vl(e))e(t);else try{e.current=t}catch{throw new Error(`Cannot assign value "${t}" to ref "${e}"`)}}function Br(...e){return R.exports.useCallback(t=>{for(let n of e)f3(n,t)},e)}function sr(e){return AS()?e?e.ownerDocument:document:null}function d3(e,t){let n=R.exports.createContext(t);function r(i){let{children:a,...s}=i,l=R.exports.useMemo(()=>s,Object.values(s));return w(n.Provider,{value:l,children:a})}function o(i){let a=R.exports.useContext(n);if(a)return a;if(t)return t;throw Error(`${i} must be rendered inside of a ${e} component.`)}return n.displayName=`${e}Context`,r.displayName=`${e}Provider`,[r,o]}function p3(e){var r,o;let t=sr(e),n=t.defaultView||window;return t?{width:(r=t.documentElement.clientWidth)!=null?r:n.innerWidth,height:(o=t.documentElement.clientHeight)!=null?o:n.innerHeight}:{width:0,height:0}}function bs(e){return"which"in e?e.which===3:"button"in e?e.button===2:!1}function No(...e){return e.filter(t=>t!=null).join("--")}function qp(){}function IS(){let[,e]=R.exports.useState(Object.create(null));return R.exports.useCallback(()=>{e(Object.create(null))},[])}var mo=AS()?R.exports.useLayoutEffect:R.exports.useEffect;function mc(e){const t=R.exports.useRef(null);return R.exports.useEffect(()=>{t.current=e},[e]),t.current}function h3(e,t){let[n,r]=R.exports.useState(t),o=R.exports.useCallback(i=>{e.current=i,r(i)},[]);return[n,o]}var v3=({children:e,type:t="reach-portal",containerRef:n})=>{let r=R.exports.useRef(null),o=R.exports.useRef(null),i=IS();return R.exports.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]),mo(()=>{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?aa.exports.createPortal(e,o.current):w("span",{ref:r})},Qp=({unstable_skipInitialRender:e,...t})=>{let[n,r]=R.exports.useState(!1);return R.exports.useEffect(()=>{e&&r(!0)},[e]),e&&!n?null:w(v3,{...t})};Qp.displayName="Portal";var m3=["bottom","height","left","right","top","width"],g3=function(t,n){return t===void 0&&(t={}),n===void 0&&(n={}),m3.some(function(r){return t[r]!==n[r]})},Nn=new Map,DS,y3=function e(){var t=[];Nn.forEach(function(n,r){var o=r.getBoundingClientRect();g3(o,n.rect)&&(n.rect=o,t.push(n))}),t.forEach(function(n){n.callbacks.forEach(function(r){return r(n.rect)})}),DS=window.requestAnimationFrame(e)};function w3(e,t){return{observe:function(){var r=Nn.size===0;Nn.has(e)?Nn.get(e).callbacks.push(t):Nn.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]}),r&&y3()},unobserve:function(){var r=Nn.get(e);if(r){var o=r.callbacks.indexOf(t);o>=0&&r.callbacks.splice(o,1),r.callbacks.length||Nn.delete(e),Nn.size||cancelAnimationFrame(DS)}}}}function ml(e,t,n){var d;let r,o;fg(t)?r=t:(r=(d=t==null?void 0:t.observe)!=null?d:!0,o=t==null?void 0:t.onChange),vl(n)&&(o=n),R.exports.useEffect(()=>{fg(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]),R.exports.useEffect(()=>{vl(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]=R.exports.useState(e.current),s=R.exports.useRef(!1),l=R.exports.useRef(!1),[u,c]=R.exports.useState(null),f=R.exports.useRef(o);return mo(()=>{f.current=o,e.current!==i&&a(e.current)}),mo(()=>{i&&!s.current&&(s.current=!0,c(i.getBoundingClientRect()))},[i]),mo(()=>{if(!r)return;let h=i;if(l.current||(l.current=!0,h=e.current),!h){console.warn("You need to place the ref");return}let g=w3(h,y=>{var b;(b=f.current)==null||b.call(f,y),c(y)});return g.observe(),()=>{g.unobserve()}},[r,i,e]),u}/*!
+* tabbable 5.3.3
+* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
+*/var S3=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],Qf=S3.join(","),MS=typeof Element>"u",ea=MS?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Gf=!MS&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},_3=function(t,n,r){var o=Array.prototype.slice.apply(t.querySelectorAll(Qf));return n&&ea.call(t,Qf)&&o.unshift(t),o=o.filter(r),o},b3=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,u=e(l,!0,r);r.flatten?o.push.apply(o,u):o.push({scope:a,candidates:u})}else{var c=ea.call(a,Qf);c&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var f=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),d=!r.shadowRootFilter||r.shadowRootFilter(a);if(f&&d){var h=e(f===!0?a.children:f.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scope:a,candidates:h})}else i.unshift.apply(i,a.children)}}return o},$S=function(t,n){return t.tabIndex<0&&(n||/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||t.isContentEditable)&&isNaN(parseInt(t.getAttribute("tabindex"),10))?0:t.tabIndex},E3=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},US=function(t){return t.tagName==="INPUT"},x3=function(t){return US(t)&&t.type==="hidden"},R3=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},C3=function(t,n){for(var r=0;rsummary:first-of-type"),a=i?t.parentElement:t;if(ea.call(a,"details:not([open]) *"))return!0;var s=Gf(t).host,l=(s==null?void 0:s.ownerDocument.contains(s))||t.ownerDocument.contains(t);if(!r||r==="full"){if(typeof o=="function"){for(var u=t;t;){var c=t.parentElement,f=Gf(t);if(c&&!c.shadowRoot&&o(c)===!0)return dg(t);t.assignedSlot?t=t.assignedSlot:!c&&f!==t.ownerDocument?t=f.host:t=c}t=u}if(l)return!t.getClientRects().length}else if(r==="non-zero-area")return dg(t);return!1},L3=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r=0)},I3=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scope,s=a?o.scope:o,l=$S(s,a),u=a?e(o.candidates):s;l===0?a?n.push.apply(n,u):n.push(s):r.push({documentOrder:i,tabIndex:l,item:o,isScope:a,content:u})}),r.sort(E3).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},hn=function(t,n){n=n||{};var r;return n.getShadowRoot?r=b3([t],n.includeContainer,{filter:pg.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:A3}):r=_3(t,n.includeContainer,pg.bind(null,n)),I3(r)},Gp=R.exports.forwardRef(function({unstable_skipInitialPortalRender:t,...n},r){return w(Qp,{unstable_skipInitialRender:t,children:w(FS,{ref:r,...n})})});Gp.displayName="Popover";var FS=R.exports.forwardRef(function({as:t="div",targetRef:n,position:r=$3,unstable_observableRefs:o=[],...i},a){const s=R.exports.useRef(null),l=ml(s,{observe:!i.hidden}),u=ml(n,{observe:!0}),c=Br(s,a);return F3(n,s),w(t,{"data-reach-popover":"",ref:c,...i,style:{position:"absolute",...D3(r,u,l,...o),...i.style}})});FS.displayName="PopoverImpl";function D3(e,t,n,...r){return n?e(t,n,...r.map(o=>o.current)):{visibility:"hidden"}}function M3(e,t,n){return{top:n?`${e.top-t.height+window.pageYOffset}px`:`${e.top+e.height+window.pageYOffset}px`}}var $3=(e,t)=>{if(!e||!t)return{};const{directionRight:n,directionUp:r}=U3(e,t);return{left:n?`${e.right-t.width+window.pageXOffset}px`:`${e.left+window.pageXOffset}px`,...M3(e,t,r)}};function U3(e,t,n=0,r=0){const o={top:e.top-t.height<0,right:window.innerWidth(n.addEventListener("keydown",r),()=>{n.removeEventListener("keydown",r)}),[]);function o(){const p=hn(n),v=p&&e.current?p.indexOf(e.current):-1,S=p&&p[v+1];return t.current&&t.current.contains(S||null)?!1:S}function i(){return e.current?e.current===n.activeElement:!1}function a(p){const v=t.current&&hn(t.current);v&&v[0]&&(p.preventDefault(),v[0].focus())}function s(){if(t.current?t.current.contains(n.activeElement||null):!1){const v=t.current&&hn(t.current);return Boolean(v&&v[v.length-1]===n.activeElement)}return!1}function l(p){const v=o();v&&(p.preventDefault(),v.focus())}function u(p){if(!p.shiftKey)return;const v=o();return p.target===v}function c(p){const v=t.current&&hn(t.current),S=v&&v[v.length-1];S&&(p.preventDefault(),S.focus())}function f(p){const v=t.current&&hn(t.current);return v?v.length===0?!1:p.target===v[0]:!1}function d(p){var v;p.preventDefault(),(v=e.current)==null||v.focus()}function h(p){const v=t.current?hn(n).filter(S=>!t.current.contains(S)):null;return v?p.target===v[v.length-1]:!1}function g(p){return p.target===hn(n)[0]}let y=[];function b(){const p=t.current&&hn(t.current);p&&(p.forEach(v=>{y.push([v,v.tabIndex]),v.tabIndex=-1}),n.addEventListener("focusin",m))}function m(){n.removeEventListener("focusin",m),y.forEach(([p,v])=>{p.tabIndex=v})}}var gc=!1,j3=0;function hg(){return++j3}var vg=At["useId".toString()];function jS(e){var o;if(vg!==void 0){let i=vg();return e!=null?e:i}let t=e!=null?e:gc?hg():null,[n,r]=R.exports.useState(t);return mo(()=>{n===null&&r(hg())},[]),R.exports.useEffect(()=>{gc===!1&&(gc=!0)},[]),(o=e!=null?e:n)!=null?o:void 0}function B3(e,t={}){const n=[];let r=R.exports.createContext({descendants:n,registerDescendant:()=>qp,...t});return r.displayName=e,r}function z3(e,t,n){let r=IS(),{registerDescendant:o,descendants:i}=R.exports.useContext(t),a=n!=null?n:i.findIndex(s=>s.element===e.element);return mo(()=>(e.element||r(),o({...e,index:a})),[e,r,a,o,...Object.values(e)]),a}function V3(){return R.exports.useState([])}function W3(e){return R.exports.useContext(e).descendants}function H3({context:e,children:t,items:n,set:r}){let o=R.exports.useCallback(({element:i,index:a,...s})=>i?(r(l=>{if(a!=null&&a!==-1)return mg(l,{element:i,index:a,...s},a);if(l.length===0)return[{...s,element:i,index:0}];if(l.find(f=>f.element===i))return console.warn(`[reach-ui]: \`useDescendant\` was called with an element that was already registered.
+
+If you are using the \`@reach/descendants\` package directly, make sure to only register descendants once. Registering a descendant more than once will lead to bugs in your app.
+
+If you are using another \`reach-ui\` package, this is probably our bug!
+
+To report a bug, open a new issue:
+
+ https://github.com/reach/reach-ui/issues/new?assignees=&labels=&template=Bug_report.md
+
+IMPORTANT: this check will only run in the development build, so if you see this warning please be aware that your app may crash when deployed.`),Q3(l);let u=q3(l,i),c;return u===-1?c=[...l,{...s,element:i,index:l.length}]:c=mg(l,{...s,element:i,index:u},u),c}),()=>{!i||r(l=>l.filter(u=>i!==u.element))}):qp,[]);return w(e.Provider,{value:R.exports.useMemo(()=>({descendants:n,registerDescendant:o}),[n,o]),children:t})}function K3(e,t){let{descendants:n}=R.exports.useContext(e),{callback:r,currentIndex:o,filter:i,key:a="index",orientation:s="vertical",rotate:l=!0,rtl:u=!1}=t;return function(f){if(!["ArrowDown","ArrowUp","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(f.key))return;let d=o!=null?o:-1,h=i?n.filter(i):n;if(!h.length)return;let g=h.findIndex(v=>v.index===o);function y(){return d===p().index?l?m():h[g]:h[(g+1)%h.length]}function b(){return d===m().index?l?p():h[g]:h[(g-1+h.length)%h.length]}function m(){return h[0]}function p(){return h[h.length-1]}switch(f.key){case"ArrowDown":if(s==="vertical"||s==="both"){f.preventDefault();let N=y();r(a==="option"?N:N[a])}break;case"ArrowUp":if(s==="vertical"||s==="both"){f.preventDefault();let N=b();r(a==="option"?N:N[a])}break;case"ArrowLeft":if(s==="horizontal"||s==="both"){f.preventDefault();let N=(u?y:b)();r(a==="option"?N:N[a])}break;case"ArrowRight":if(s==="horizontal"||s==="both"){f.preventDefault();let N=(u?b:y)();r(a==="option"?N:N[a])}break;case"PageUp":f.preventDefault();let v=(f.ctrlKey?b:m)();r(a==="option"?v:v[a]);break;case"Home":f.preventDefault();let S=m();r(a==="option"?S:S[a]);break;case"PageDown":f.preventDefault();let k=(f.ctrlKey?y:p)();r(a==="option"?k:k[a]);break;case"End":f.preventDefault();let C=p();r(a==="option"?C:C[a]);break}}}function BS(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function q3(e,t){if(!t||!e.length)return-1;let n=e.length;for(;n--;){let r=e[n].element;if(!!r&&BS(r,t))return n+1}return-1}function mg(e,t,n){return n==null||!(n in e)?[...e,t]:[...e.slice(0,n),t,...e.slice(n)]}function Q3(e){return e.sort((t,n)=>!t.element||!n.element?0:BS(t.element,n.element)?-1:1).map((t,n)=>({...t,index:n}))}var zS="CLEAR_SELECTION_INDEX",Xp="CLICK_MENU_ITEM",ta="CLOSE_MENU",G3="OPEN_MENU_AT_FIRST_ITEM",Xf="OPEN_MENU_AT_INDEX",VS="OPEN_MENU_CLEARED",Yf="SEARCH_FOR_ITEM",Wn="SELECT_ITEM_AT_INDEX",Jf="SET_BUTTON_ID",su=B3("DropdownDescendantContext"),[X3,Ra]=d3("Dropdown"),Y3={triggerId:null,isExpanded:!1,typeaheadQuery:"",selectionIndex:-1},WS=({id:e,children:t})=>{let n=R.exports.useRef(null),r=R.exports.useRef(null),o=R.exports.useRef(null),[i,a]=V3(),s=jS(e),l=e||No("menu",s),u=No("menu-button",l),[c,f]=R.exports.useReducer(o4,{...Y3,triggerId:u}),d=R.exports.useRef(!1),h=R.exports.useRef([]),g=R.exports.useRef(!1),y=R.exports.useRef({x:0,y:0});return R.exports.useEffect(()=>{c.isExpanded?(window.__REACH_DISABLE_TOOLTIPS=!0,window.requestAnimationFrame(()=>{gl(r.current)})):window.__REACH_DISABLE_TOOLTIPS=!1},[c.isExpanded]),w(H3,{context:su,items:i,set:a,children:w(X3,{dispatch:f,dropdownId:l,dropdownRef:r,mouseDownStartPosRef:y,popoverRef:o,readyToSelect:g,selectCallbacks:h,state:c,triggerClickedRef:d,triggerRef:n,children:vl(t)?t({isExpanded:c.isExpanded,isOpen:c.isExpanded}):t})})};WS.displayName="DropdownProvider";function HS({onKeyDown:e,onMouseDown:t,id:n,ref:r,...o}){let{dispatch:i,dropdownId:a,mouseDownStartPosRef:s,triggerClickedRef:l,triggerRef:u,state:{triggerId:c,isExpanded:f}}=Ra("useDropdownTrigger"),d=Br(u,r),h=XS(),g=R.exports.useMemo(()=>h.findIndex(m=>!m.disabled),[h]);R.exports.useEffect(()=>{n!=null&&n!==c&&i({type:Jf,payload:n})},[c,i,n]),R.exports.useEffect(()=>{n==null&&i({type:Jf,payload:No("menu-button",a)})},[a,i,n]);function y(m){switch(m.key){case"ArrowDown":case"ArrowUp":m.preventDefault(),i({type:Xf,payload:{index:g}});break;case"Enter":case" ":i({type:Xf,payload:{index:g}});break}}function b(m){bs(m.nativeEvent)||(s.current={x:m.clientX,y:m.clientY},f||(l.current=!0),i(f?{type:ta}:{type:VS}))}return{data:{isExpanded:f,controls:a},props:{...o,ref:d,id:c||void 0,onKeyDown:Ne(e,y),onMouseDown:Ne(t,b),type:"button"}}}var J3=R.exports.forwardRef(({as:e="button",...t},n)=>{let{props:r}=HS({...t,ref:n});return w(e,{"data-reach-dropdown-trigger":"",...r})});J3.displayName="DropdownTrigger";function KS({index:e,isLink:t=!1,onClick:n,onDragStart:r,onMouseDown:o,onMouseEnter:i,onMouseLeave:a,onMouseMove:s,onMouseUp:l,onSelect:u,disabled:c,onFocus:f,valueText:d,ref:h,...g}){let{dispatch:y,dropdownRef:b,mouseDownStartPosRef:m,readyToSelect:p,selectCallbacks:v,triggerRef:S,state:{selectionIndex:k,isExpanded:C}}=Ra("useDropdownItem"),N=R.exports.useRef(null),[A,W]=R.exports.useState(d||""),F=R.exports.useCallback(H=>{!d&&(H==null?void 0:H.textContent)&&W(H.textContent)},[d]),X=R.exports.useRef(!1),[ce,ae]=h3(N,null),_=R.exports.useMemo(()=>({element:ce,key:A,disabled:c,isLink:t}),[c,ce,t,A]),L=z3(_,su,e),j=L===k&&!c,O=Br(h,ae,F);v.current[L]=u;function P(){gl(S.current),u&&u(),y({type:Xp})}function I(H){bs(H.nativeEvent)||t&&(c?H.preventDefault():P())}function M(H){t&&H.preventDefault()}function z(H){bs(H.nativeEvent)||(t?X.current=!0:H.preventDefault())}function E(H){let ee=sr(b.current);!j&&L!=null&&!c&&((b==null?void 0:b.current)&&b.current!==ee.activeElement&&N.current!==ee.activeElement&&b.current.focus(),y({type:Wn,payload:{index:L}}))}function D(H){y({type:zS})}function $(H){if(!p.current){let ee=8,Y=Math.abs(H.clientX-m.current.x),pe=Math.abs(H.clientY-m.current.y);(Y>ee||pe>ee)&&(p.current=!0)}!j&&L!=null&&!c&&y({type:Wn,payload:{index:L,dropdownRef:b}})}function J(){p.current=!0,!j&&L!=null&&!c&&y({type:Wn,payload:{index:L}})}function V(H){if(!bs(H.nativeEvent)){if(!p.current){p.current=!0;return}t?X.current?X.current=!1:N.current&&N.current.click():c||P()}}return R.exports.useEffect(()=>{if(C){let H=window.setTimeout(()=>{p.current=!0},400);return()=>{window.clearTimeout(H)}}else p.current=!1},[C,p]),R.exports.useEffect(()=>{let H=sr(N.current);return H.addEventListener("mouseup",ee),()=>{H.removeEventListener("mouseup",ee)};function ee(){X.current=!1}},[]),{data:{disabled:c},props:{id:GS(L),tabIndex:-1,...g,ref:O,"data-disabled":c?"":void 0,"data-selected":j?"":void 0,"data-valuetext":A,onClick:Ne(n,I),onDragStart:Ne(r,M),onMouseDown:Ne(o,z),onMouseEnter:Ne(i,E),onMouseLeave:Ne(a,D),onMouseMove:Ne(s,$),onFocus:Ne(f,J),onMouseUp:Ne(l,V)}}}var Z3=R.exports.forwardRef(({as:e="div",...t},n)=>{let{props:r}=KS({...t,ref:n});return w(e,{"data-reach-dropdown-item":"",...r})});Z3.displayName="DropdownItem";function qS({id:e,onKeyDown:t,ref:n,...r}){let{dispatch:o,triggerRef:i,dropdownRef:a,selectCallbacks:s,dropdownId:l,state:{isExpanded:u,triggerId:c,selectionIndex:f,typeaheadQuery:d}}=Ra("useDropdownItems"),h=XS(),g=Br(a,n);R.exports.useEffect(()=>{let v=n4(h,d);d&&v!=null&&o({type:Wn,payload:{index:v,dropdownRef:a}});let S=window.setTimeout(()=>d&&o({type:Yf,payload:""}),1e3);return()=>window.clearTimeout(S)},[o,h,d,a]);let y=mc(h.length),b=mc(h[f]),m=mc(f);R.exports.useEffect(()=>{f>h.length-1?o({type:Wn,payload:{index:h.length-1,dropdownRef:a}}):y!==h.length&&f>-1&&b&&m===f&&h[f]!==b&&o({type:Wn,payload:{index:h.findIndex(v=>v.key===(b==null?void 0:b.key)),dropdownRef:a}})},[a,o,h,y,b,m,f]);let p=Ne(function(S){let{key:k}=S;if(!!u)switch(k){case"Enter":case" ":let C=h.find(N=>N.index===f);C&&!C.disabled&&(S.preventDefault(),C.isLink&&C.element?C.element.click():(gl(i.current),s.current[C.index]&&s.current[C.index](),o({type:Xp})));break;case"Escape":gl(i.current),o({type:ta});break;case"Tab":S.preventDefault();break;default:if(c3(k)&&k.length===1){let N=d+k.toLowerCase();o({type:Yf,payload:N})}break}},K3(su,{currentIndex:f,orientation:"vertical",rotate:!1,filter:v=>!v.disabled,callback:v=>{o({type:Wn,payload:{index:v,dropdownRef:a}})},key:"index"}));return{data:{activeDescendant:GS(f)||void 0,triggerId:c},props:{tabIndex:-1,...r,ref:g,id:l,onKeyDown:Ne(t,p)}}}var e4=R.exports.forwardRef(({as:e="div",...t},n)=>{let{props:r}=qS({...t,ref:n});return w(e,{"data-reach-dropdown-items":"",...r})});e4.displayName="DropdownItems";function QS({onBlur:e,portal:t=!0,position:n,ref:r,...o}){let{triggerRef:i,triggerClickedRef:a,dispatch:s,dropdownRef:l,popoverRef:u,state:{isExpanded:c}}=Ra("useDropdownPopover"),f=Br(u,r);return R.exports.useEffect(()=>{if(!c)return;let d=sr(u.current);function h(g){a.current?a.current=!1:r4(u.current,g.target)||s({type:ta})}return d.addEventListener("mousedown",h),()=>{d.removeEventListener("mousedown",h)}},[a,i,s,l,u,c]),{data:{portal:t,position:n,targetRef:i,isExpanded:c},props:{ref:f,hidden:!c,onBlur:Ne(e,d=>{d.currentTarget.contains(d.relatedTarget)||s({type:ta})}),...o}}}var t4=R.exports.forwardRef(({as:e="div",...t},n)=>{let{data:{portal:r,targetRef:o,position:i},props:a}=QS({...t,ref:n}),s={"data-reach-dropdown-popover":""};return r?w(Gp,{...a,...s,as:e,targetRef:o,position:i,unstable_skipInitialPortalRender:!0}):w(e,{...a,...s})});t4.displayName="DropdownPopover";function n4(e,t=""){if(!t)return null;let n=e.find(r=>{var o,i,a;return r.disabled?!1:(a=(i=(o=r.element)==null?void 0:o.dataset)==null?void 0:i.valuetext)==null?void 0:a.toLowerCase().startsWith(t)});return n?e.indexOf(n):null}function GS(e){let{dropdownId:t}=Ra("useItemId");return e!=null&&e>-1?No(`option-${e}`,t):void 0}function gl(e){e&&e.focus()}function r4(e,t){return!!(e&&e.contains(t))}function o4(e,t={}){switch(t.type){case Xp:return{...e,isExpanded:!1,selectionIndex:-1};case ta:return{...e,isExpanded:!1,selectionIndex:-1};case G3:return{...e,isExpanded:!0,selectionIndex:0};case Xf:return{...e,isExpanded:!0,selectionIndex:t.payload.index};case VS:return{...e,isExpanded:!0,selectionIndex:-1};case Wn:{let{dropdownRef:n={current:null}}=t.payload;if(t.payload.index>=0&&t.payload.index!==e.selectionIndex){if(n.current){let r=sr(n.current);n.current!==(r==null?void 0:r.activeElement)&&n.current.focus()}return{...e,selectionIndex:t.payload.max!=null?Math.min(Math.max(t.payload.index,0),t.payload.max):Math.max(t.payload.index,0)}}return e}case zS:return{...e,selectionIndex:-1};case Jf:return{...e,triggerId:t.payload};case Yf:return typeof t.payload<"u"?{...e,typeaheadQuery:t.payload}:e;default:return e}}function XS(){return W3(su)}var YS={exports:{}},ve={};/** @license React v16.13.1
+ * react-is.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 Be=typeof Symbol=="function"&&Symbol.for,Yp=Be?Symbol.for("react.element"):60103,Jp=Be?Symbol.for("react.portal"):60106,lu=Be?Symbol.for("react.fragment"):60107,uu=Be?Symbol.for("react.strict_mode"):60108,cu=Be?Symbol.for("react.profiler"):60114,fu=Be?Symbol.for("react.provider"):60109,du=Be?Symbol.for("react.context"):60110,Zp=Be?Symbol.for("react.async_mode"):60111,pu=Be?Symbol.for("react.concurrent_mode"):60111,hu=Be?Symbol.for("react.forward_ref"):60112,vu=Be?Symbol.for("react.suspense"):60113,i4=Be?Symbol.for("react.suspense_list"):60120,mu=Be?Symbol.for("react.memo"):60115,gu=Be?Symbol.for("react.lazy"):60116,a4=Be?Symbol.for("react.block"):60121,s4=Be?Symbol.for("react.fundamental"):60117,l4=Be?Symbol.for("react.responder"):60118,u4=Be?Symbol.for("react.scope"):60119;function bt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Yp:switch(e=e.type,e){case Zp:case pu:case lu:case cu:case uu:case vu:return e;default:switch(e=e&&e.$$typeof,e){case du:case hu:case gu:case mu:case fu:return e;default:return t}}case Jp:return t}}}function JS(e){return bt(e)===pu}ve.AsyncMode=Zp;ve.ConcurrentMode=pu;ve.ContextConsumer=du;ve.ContextProvider=fu;ve.Element=Yp;ve.ForwardRef=hu;ve.Fragment=lu;ve.Lazy=gu;ve.Memo=mu;ve.Portal=Jp;ve.Profiler=cu;ve.StrictMode=uu;ve.Suspense=vu;ve.isAsyncMode=function(e){return JS(e)||bt(e)===Zp};ve.isConcurrentMode=JS;ve.isContextConsumer=function(e){return bt(e)===du};ve.isContextProvider=function(e){return bt(e)===fu};ve.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Yp};ve.isForwardRef=function(e){return bt(e)===hu};ve.isFragment=function(e){return bt(e)===lu};ve.isLazy=function(e){return bt(e)===gu};ve.isMemo=function(e){return bt(e)===mu};ve.isPortal=function(e){return bt(e)===Jp};ve.isProfiler=function(e){return bt(e)===cu};ve.isStrictMode=function(e){return bt(e)===uu};ve.isSuspense=function(e){return bt(e)===vu};ve.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===lu||e===pu||e===cu||e===uu||e===vu||e===i4||typeof e=="object"&&e!==null&&(e.$$typeof===gu||e.$$typeof===mu||e.$$typeof===fu||e.$$typeof===du||e.$$typeof===hu||e.$$typeof===s4||e.$$typeof===l4||e.$$typeof===u4||e.$$typeof===a4)};ve.typeOf=bt;(function(e){e.exports=ve})(YS);var ZS=R.exports.forwardRef(({as:e=R.exports.Fragment,id:t,children:n,...r},o)=>{let a=R.exports.useMemo(()=>{try{return YS.exports.isFragment(w(e,{}))}catch{return!1}},[e])?{}:{ref:o,id:t,"data-reach-menu":"",...r};return w(e,{...a,children:w(WS,{id:t,children:n})})});ZS.displayName="Menu";var e_=R.exports.forwardRef(({as:e="button",...t},n)=>{let{data:{isExpanded:r,controls:o},props:i}=HS({...t,ref:n});return w(e,{"aria-expanded":r?!0:void 0,"aria-haspopup":!0,"aria-controls":o,...i,"data-reach-menu-button":""})});e_.displayName="MenuButton";var eh=R.exports.forwardRef(({as:e="div",...t},n)=>{let{data:{disabled:r},props:o}=KS({...t,ref:n});return w(e,{role:"menuitem",...o,"aria-disabled":r||void 0,"data-reach-menu-item":""})});eh.displayName="MenuItemImpl";var t_=R.exports.forwardRef(({as:e="div",...t},n)=>w(eh,{...t,ref:n,as:e}));t_.displayName="MenuItem";var n_=R.exports.forwardRef(({as:e="div",...t},n)=>{let{data:{activeDescendant:r,triggerId:o},props:i}=qS({...t,ref:n});return w(e,{"aria-activedescendant":r,"aria-labelledby":o||void 0,role:"menu",...i,"data-reach-menu-items":""})});n_.displayName="MenuItems";var c4=R.exports.forwardRef(({as:e="a",component:t,onSelect:n,...r},o)=>(R.exports.useEffect(()=>{t&&console.warn("[@reach/menu-button]: Please use the `as` prop instead of `component`")},[t]),w(eh,{...r,ref:o,"data-reach-menu-link":"",as:e,isLink:!0,onSelect:n||qp})));c4.displayName="MenuLink";var r_=R.exports.forwardRef(({portal:e=!0,...t},n)=>w(o_,{portal:e,children:w(n_,{...t,ref:n,"data-reach-menu-list":""})}));r_.displayName="MenuList";var o_=R.exports.forwardRef(({as:e="div",...t},n)=>{let{data:{portal:r,targetRef:o,position:i},props:a}=QS({...t,ref:n}),s={"data-reach-menu-popover":""};return r?w(Gp,{...a,...s,as:e,targetRef:o,position:i,unstable_skipInitialPortalRender:!0}):w(e,{...a,...s})});o_.displayName="MenuPopover";var i_=R.exports.forwardRef(function({as:t="span",style:n={},...r},o){return w(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})});i_.displayName="VisuallyHidden";var f4=100,d4=500,Zf={initial:"IDLE",states:{IDLE:{enter:yc,on:{MOUSE_ENTER:"FOCUSED",FOCUS:"VISIBLE"}},FOCUSED:{enter:v4,leave:m4,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:g4,leave:()=>{y4(),yc()},on:{MOUSE_ENTER:"VISIBLE",FOCUS:"VISIBLE",TIME_COMPLETE:"IDLE"}},DISMISSED:{leave:()=>{yc()},on:{MOUSE_LEAVE:"IDLE",BLUR:"IDLE"}}}},Pt={value:Zf.initial,context:{id:null}},Es=[];function p4(e){return Es.push(e),()=>{Es.splice(Es.indexOf(e),1)}}function h4(){Es.forEach(e=>e(Pt))}var ed;function v4(){window.clearTimeout(ed),ed=window.setTimeout(()=>{Wt({type:"REST"})},f4)}function m4(){window.clearTimeout(ed)}var td;function g4(){window.clearTimeout(td),td=window.setTimeout(()=>Wt({type:"TIME_COMPLETE"}),d4)}function y4(){window.clearTimeout(td)}function yc(){Pt.context.id=null}function w4({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:h,DEBUG_STYLE:g}={}){let y=String(jS(e)),[b,m]=R.exports.useState(g?!0:gg(y,!0)),p=R.exports.useRef(null),v=Br(h,p),S=ml(p,{observe:b});R.exports.useEffect(()=>p4(()=>{m(gg(y))}),[y]),R.exports.useEffect(()=>{let j=sr(p.current);function O(P){(P.key==="Escape"||P.key==="Esc")&&Pt.value==="VISIBLE"&&Wt({type:"SELECT_WITH_KEYBOARD"})}return j.addEventListener("keydown",O),()=>j.removeEventListener("keydown",O)},[]),E4({disabled:d,isVisible:b,ref:p});function k(j,O){return typeof window<"u"&&"PointerEvent"in window?j:Ne(j,O)}function C(j){return function(P){P.pointerType==="mouse"&&j(P)}}function N(){Wt({type:"MOUSE_ENTER",id:y})}function A(){Wt({type:"MOUSE_MOVE",id:y})}function W(){Wt({type:"MOUSE_LEAVE"})}function F(){Pt.context.id===y&&Wt({type:"MOUSE_DOWN"})}function X(){window.__REACH_DISABLE_TOOLTIPS||Wt({type:"FOCUS",id:y})}function ce(){Pt.context.id===y&&Wt({type:"BLUR"})}function ae(j){(j.key==="Enter"||j.key===" ")&&Wt({type:"SELECT_WITH_KEYBOARD"})}return[{"aria-describedby":b?No("tooltip",y):void 0,"data-state":b?"tooltip-visible":"tooltip-hidden","data-reach-tooltip-trigger":"",ref:v,onPointerEnter:Ne(t,C(N)),onPointerMove:Ne(n,C(A)),onPointerLeave:Ne(r,C(W)),onPointerDown:Ne(o,C(F)),onMouseEnter:k(i,N),onMouseMove:k(a,A),onMouseLeave:k(s,W),onMouseDown:k(l,F),onFocus:Ne(u,X),onBlur:Ne(c,ce),onKeyDown:Ne(f,ae)},{id:y,triggerRect:S,isVisible:b},b]}var th=R.exports.forwardRef(function({children:e,label:t,ariaLabel:n,id:r,DEBUG_STYLE:o,...i},a){let s=R.exports.Children.only(e);R.exports.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]=w4({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 Z(Nt,{children:[R.exports.cloneElement(s,l),w(a_,{ref:a,label:t,"aria-label":n,...u,...i})]})});th.displayName="Tooltip";var a_=R.exports.forwardRef(function({label:t,ariaLabel:n,isVisible:r,id:o,...i},a){return r?w(Qp,{children:w(s_,{ref:a,label:t,"aria-label":n,isVisible:r,...i,id:No("tooltip",String(o))})}):null});a_.displayName="TooltipPopup";var s_=R.exports.forwardRef(function({ariaLabel:t,"aria-label":n,as:r="div",id:o,isVisible:i,label:a,position:s=b4,style:l,triggerRect:u,...c},f){let d=(n||t)!=null,h=R.exports.useRef(null),g=Br(f,h),y=ml(h,{observe:i});return Z(Nt,{children:[w(r,{role:d?void 0:"tooltip",...c,ref:g,"data-reach-tooltip":"",id:d?void 0:o,style:{...l,...S4(s,u,y)},children:a}),d&&w(i_,{role:"tooltip",id:o,children:n||t})]})});s_.displayName="TooltipContent";function S4(e,t,n){return n?e(t,n):{visibility:"hidden"}}var _4=8,b4=(e,t,n=_4)=>{let{width:r,height:o}=p3();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=sr(n.current);function o(i){!t||i.target instanceof Element&&i.target.closest("[data-reach-tooltip-trigger][data-state='tooltip-visible']")||Wt({type:"GLOBAL_MOUSE_MOVE"})}return r.addEventListener("mousemove",o),()=>{r.removeEventListener("mousemove",o)}},[e,t,n])}function Wt(e){let{value:t,context:n,changed:r}=x4(Pt,e);r&&(Pt={value:t,context:n},h4())}function x4(e,t){let n=Zf.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={...Pt.context,...i},s=typeof r=="string"?r:r.target,l=Zf.states[s];return l&&l.enter&&l.enter(e.context,t),{value:s,context:a,changed:!0}}function gg(e,t){return Pt.context.id===e&&(t?Pt.value==="VISIBLE":Pt.value==="VISIBLE"||Pt.value==="LEAVING_VISIBLE")}function R4(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 nh=R4(()=>_n(()=>import("./index.8bb012c6.js"),[],import.meta.url)),C4="_checkWrapper_1nrct_45",O4="_active_1nrct_51",yg={checkWrapper:C4,active:O4};function k4({theme:e,dispatch:t}){const{t:n}=ia(),r=R.exports.useMemo(()=>{switch(e){case"dark":return w(wg,{});case"auto":return w(P4,{});case"light":return w(T4,{});default:return console.assert(!1,"Unknown theme"),w(wg,{})}},[e]),o=R.exports.useCallback(i=>t(vD(i)),[t]);return Z(ZS,{children:[w(th,{label:n("switch_theme"),"aria-label":"switch theme",children:w(e_,{children:r})}),Z(r_,{children:[w(wc,{value:"auto",label:"Auto",active:e==="auto",onSelect:o}),w(wc,{value:"dark",label:"Dark",active:e==="dark",onSelect:o}),w(wc,{value:"light",label:"Light",active:e==="light",onSelect:o})]})]})}function wc(e){const t=ar(yg.checkWrapper,{[yg.active]:e.active});return Z(t_,{onSelect:()=>e.onSelect(e.value),children:[w("span",{className:t,children:w(lI,{size:14})}),w("span",{children:e.label})]})}function wg(){const t=nh.read().motion;return w("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:w(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 T4(){const t=nh.read().motion;return Z("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:[w("circle",{cx:"12",cy:"12",r:"5"}),Z(t.g,{initial:{scale:.7},animate:{scale:1},transition:{duration:.5},children:[w("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),w("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),w("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),w("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),w("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),w("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),w("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),w("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]})]})}function P4(){const t=nh.read().motion;return Z("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:[w("circle",{cx:"12",cy:"12",r:"11"}),w("clipPath",{id:"cut-off-bottom",children:w(t.rect,{x:"12",y:"0",width:"12",height:"24",initial:{rotate:-30},animate:{rotate:0},transition:{duration:.7}})}),w("circle",{cx:"12",cy:"12",r:"6",clipPath:"url(#cut-off-bottom)",fill:"currentColor"})]})}const L4=e=>({theme:zp(e)}),l_=kn(L4)(k4),nd=0;class N4 extends Error{constructor(t,n){super(t),this.message=t,this.code=n}}const rd={[nd]:{message:"Browser not supported!",detail:'This browser does not support "fetch", please choose another one.'},default:{message:"Oops, something went wrong!"}};function A4(e){const{code:t}=e;return typeof t=="number"?rd[t]:rd.default}const I4="_content_b98hm_1",D4="_container_b98hm_16",M4="_overlay_b98hm_22",$4="_fixed_b98hm_26",os={content:I4,container:D4,overlay:M4,fixed:$4},U4="_overlay_1i06e_1",F4="_content_1i06e_10",Sg={overlay:U4,content:F4};function j4({isOpen:e,onRequestClose:t,className:n,overlayClassName:r,children:o,...i}){const a=ar(n,Sg.content),s=ar(r,Sg.overlay);return w(c1,{isOpen:e,onRequestClose:t,className:a,overlayClassName:s,...i,children:o})}const B4=R.exports.memo(j4),{useCallback:z4,useEffect:V4}=At;function W4({dispatch:e,apiConfig:t,modals:n}){if(!window.fetch){const{detail:o}=rd[nd];throw new N4(o,nd)}const r=z4(()=>{e(rD("apiConfig"))},[e]);return V4(()=>{e(vS(t))},[e,t]),Z(B4,{isOpen:n.apiConfig,className:os.content,overlayClassName:os.overlay,shouldCloseOnOverlayClick:!1,shouldCloseOnEsc:!1,onRequestClose:r,children:[w("div",{className:os.container,children:w(NS,{})}),w("div",{className:os.fixed,children:w(l_,{})})]})}const H4=e=>({modals:e.modals,apiConfig:jo(e)}),K4=kn(H4)(W4),q4={hasProcessPath:!1},Q4=R.exports.createContext(q4),G4="_root_4m2cd_1",X4="_yacd_4m2cd_14",Y4="_link_4m2cd_23",Sc={root:G4,yacd:X4,link:Y4};function J4({width:e=24,height:t=24}={}){return w("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:w("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 Z4="https://github.com/haishanh/yacd/issues";function e$({message:e,detail:t}){return Z("div",{className:Sc.root,children:[w("div",{className:Sc.yacd,children:w(Kp,{width:150,height:150})}),e?w("h1",{children:e}):null,t?w("p",{children:t}):null,w("p",{children:Z("a",{className:Sc.link,href:Z4,children:[w(J4,{width:16,height:16}),"haishanh/yacd"]})})]})}class t$ extends R.exports.Component{constructor(){super(...arguments);lh(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}render(){if(this.state.error){const{message:n,detail:r}=A4(this.state.error);return w(e$,{message:n,detail:r})}else return this.props.children}}const n$="_root_jynjv_1",r$="_chart_jynjv_10",_g={root:n$,chart:r$};var rh=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 bg(e,t,n,r=0,o=!1){for(const a of t)if(rh(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!=null?a:!0).catch(a=>i.error=a!=null?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 o$(e,...t){if(t===void 0||t.length===0)e.splice(0,e.length);else{const n=e.find(r=>rh(t,r.args));if(n){const r=e.indexOf(n);r!==-1&&e.splice(r,1)}}}function i$(e,t=0){const n=[];return{read:(...r)=>bg(e,n,r,t),preload:(...r)=>void bg(e,n,r,t,!0),clear:(...r)=>o$(n,...r),peek:(...r)=>{var o;return(o=n.find(i=>rh(r,i.args)))==null?void 0:o.response}}}const Eg=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];function na(e){if(e<1e3)return e+" B";const t=Math.min(Math.floor(Math.log10(e)/3),Eg.length-1);e=Number((e/Math.pow(1e3,t)).toPrecision(3));const n=Eg[t];return e+" "+n}const a$=i$(()=>_n(()=>import("./chart-lib.a8ad03fd.js"),[],import.meta.url)),xg={borderWidth:1,pointRadius:0,tension:.2,fill:!0},s$={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,borderDash:[3,6],drawBorder:!1},ticks:{callback(e){return na(e)+"/s "}}}}},Rg=[{down:{backgroundColor:"rgba(176, 209, 132, 0.8)",borderColor:"rgb(176, 209, 132)"},up:{backgroundColor:"rgba(181, 220, 231, 0.8)",borderColor:"rgb(181, 220, 231)"}},{up:{backgroundColor:"rgb(98, 190, 100)",borderColor:"rgb(78,146,79)"},down:{backgroundColor:"rgb(160, 230, 66)",borderColor:"rgb(110, 156, 44)"}},{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)"}}],{useEffect:l$}=ye;function u$(e,t,n,r,o={}){l$(()=>{const i=document.getElementById(t).getContext("2d"),a={...s$,...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{useMemo:c$}=At,f$={position:"relative",maxWidth:1e3},d$=e=>({apiConfig:jo(e),selectedChartStyleIndex:lD(e)}),p$=kn(d$)(h$);function h$({apiConfig:e,selectedChartStyleIndex:t}){const n=a$.read(),r=jp(e),{t:o}=ia(),i=c$(()=>({labels:r.labels,datasets:[{...xg,...Rg[t].up,label:o("Up"),data:r.up},{...xg,...Rg[t].down,label:o("Down"),data:r.down}]}),[r,t,o]);return u$(n.Chart,"trafficChart",i,r),w("div",{style:f$,children:w("canvas",{id:"trafficChart"})})}const v$="_TrafficNow_hzna1_1",m$="_sec_hzna1_10",qr={TrafficNow:v$,sec:m$},{useState:u_,useEffect:c_,useCallback:g$}=At,y$=e=>({apiConfig:jo(e)}),w$=kn(y$)(S$);function S$({apiConfig:e}){const{t}=ia(),{upStr:n,downStr:r}=_$(e),{upTotal:o,dlTotal:i,connNumber:a}=b$(e);return Z("div",{className:qr.TrafficNow,children:[Z("div",{className:qr.sec,children:[w("div",{children:t("Upload")}),w("div",{children:n})]}),Z("div",{className:qr.sec,children:[w("div",{children:t("Download")}),w("div",{children:r})]}),Z("div",{className:qr.sec,children:[w("div",{children:t("Upload Total")}),w("div",{children:o})]}),Z("div",{className:qr.sec,children:[w("div",{children:t("Download Total")}),w("div",{children:i})]}),Z("div",{className:qr.sec,children:[w("div",{children:t("Active Connections")}),w("div",{children:a})]})]})}function _$(e){const[t,n]=u_({upStr:"0 B/s",downStr:"0 B/s"});return c_(()=>jp(e).subscribe(r=>n({upStr:na(r.up)+"/s",downStr:na(r.down)+"/s"})),[e]),t}function b$(e){const[t,n]=u_({upTotal:"0 B",dlTotal:"0 B",connNumber:0}),r=g$(({downloadTotal:o,uploadTotal:i,connections:a})=>{n({upTotal:na(i),dlTotal:na(o),connNumber:a.length})},[n]);return c_(()=>qD(e,r),[e,r]),t}function E$(){const{t:e}=ia();return Z("div",{children:[w(rS,{title:e("Overview")}),Z("div",{className:_g.root,children:[w("div",{children:w(w$,{})}),w("div",{className:_g.chart,children:w(R.exports.Suspense,{fallback:w(wS,{height:"200px"}),children:w(p$,{})})})]})]})}const x$="_lo_pmly2_1",R$={lo:x$};function C$(){return w("div",{className:R$.lo,children:w(Kp,{width:280,height:280,animate:!0,c0:"transparent",c1:"#646464"})})}const O$="_app_1s3k7_1",k$="_content_1s3k7_18",f_={app:O$,content:k$};var d_={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Cg=ye.createContext&&ye.createContext(d_),nr=globalThis&&globalThis.__assign||function(){return nr=Object.assign||function(e){for(var t,n=1,r=arguments.length;nw(K$,{to:n,isActive:t.pathname===n,iconId:r,labelText:e(o)},n))}),Z("div",{className:Fn.footer,children:[w(l_,{}),w(th,{label:e("about"),children:w(A1,{to:"/about",className:Fn.iconWrapper,children:w(SI,{size:20})})})]})]})}const G$="_input_mh4af_1",HU={input:G$},X$="_animate_1w0e8_1",KU={animate:X$,"zap-pulse":"_zap-pulse_1w0e8_1"};function od(){return od=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,h=n.uncheckedHandleIcon,g=n.boxShadow,y=n.activeBoxShadow,b=n.height,m=n.width,p=n.borderRadius,v=function(L,j){var O={};for(var P in L)Object.prototype.hasOwnProperty.call(L,P)&&j.indexOf(P)===-1&&(O[P]=L[P]);return O}(n,["checked","disabled","className","offColor","onColor","offHandleColor","onHandleColor","checkedIcon","uncheckedIcon","checkedHandleIcon","uncheckedHandleIcon","boxShadow","activeBoxShadow","height","width","borderRadius","handleDiameter"]),S=this.state,k=S.h,C=S.N,N=S.j,A={position:"relative",display:"inline-block",textAlign:"left",opacity:o?.5:1,direction:"ltr",borderRadius:b/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"},W={height:b,width:m,margin:Math.max(0,(this.t-b)/2),position:"relative",background:kg(k,this.i,this.o,a,s),borderRadius:typeof p=="number"?p:b/2,cursor:o?"default":"pointer",WebkitTransition:C?null:"background 0.25s",MozTransition:C?null:"background 0.25s",transition:C?null:"background 0.25s"},F={height:b,width:Math.min(1.5*b,m-(this.t+b)/2+1),position:"relative",opacity:(k-this.o)/(this.i-this.o),pointerEvents:"none",WebkitTransition:C?null:"opacity 0.25s",MozTransition:C?null:"opacity 0.25s",transition:C?null:"opacity 0.25s"},X={height:b,width:Math.min(1.5*b,m-(this.t+b)/2+1),position:"absolute",opacity:1-(k-this.o)/(this.i-this.o),right:0,top:0,pointerEvents:"none",WebkitTransition:C?null:"opacity 0.25s",MozTransition:C?null:"opacity 0.25s",transition:C?null:"opacity 0.25s"},ce={height:this.t,width:this.t,background:kg(k,this.i,this.o,l,u),display:"inline-block",cursor:o?"default":"pointer",borderRadius:typeof p=="number"?p-1:"50%",position:"absolute",transform:"translateX("+k+"px)",top:Math.max(0,(b-this.t)/2),outline:0,boxShadow:N?y:g,border:0,WebkitTransition:C?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",MozTransition:C?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",transition:C?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s"},ae={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:C?null:"opacity 0.25s",MozTransition:C?null:"opacity 0.25s",transition:C?null:"opacity 0.25s"},_={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:C?null:"opacity 0.25s",MozTransition:C?null:"opacity 0.25s",transition:C?null:"opacity 0.25s"};return Z("div",{className:i,style:A,children:[Z("div",{className:"react-switch-bg",style:W,onClick:o?null:this.T,onMouseDown:function(L){return L.preventDefault()},children:[c&&w("div",{style:F,children:c}),f&&w("div",{style:X,children:f})]}),Z("div",{className:"react-switch-handle",style:ce,onClick:function(L){return L.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,children:[h&&w("div",{style:ae,children:h}),d&&w("div",{style:_,children:d})]}),w("input",{...od({},{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}},v,{ref:this.S,onFocus:this.D,onBlur:this.O,onKeyUp:this.C,onChange:this.$})})]})},t}(R.exports.Component);xs.defaultProps={disabled:!1,offColor:"#888",onColor:"#080",offHandleColor:"#fff",onHandleColor:"#fff",uncheckedIcon:Y$,checkedIcon:J$,boxShadow:null,activeBoxShadow:"0 0 2px 3px #3bf",height:28,width:56};const Z$=xs.default?xs.default:xs;function eU({checked:e=!1,onChange:t,theme:n,name:r}){return w(Z$,{onChange:t,checked:e,uncheckedIcon:!1,checkedIcon:!1,offColor:n==="dark"?"#393939":"#e9e9e9",onColor:"#047aff",offHandleColor:"#fff",onHandleColor:"#fff",handleDiameter:24,height:28,width:44,className:"rs",name:r})}const qU=kn(e=>({theme:zp(e)}))(eU),tU="_ToggleSwitch_10mtp_1",nU="_slider_10mtp_28",Tg={ToggleSwitch:tU,slider:nU};function rU({options:e,value:t,name:n,onChange:r}){const o=R.exports.useMemo(()=>e.map(s=>s.value).indexOf(t),[e,t]),i=R.exports.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=R.exports.useMemo(()=>({width:i(o)+"%",left:o*i(0)+"%"}),[o,i]);return Z("div",{className:Tg.ToggleSwitch,children:[w("div",{className:Tg.slider,style:a}),e.map((s,l)=>{const u=`${n}-${s.label}`;return Z("label",{htmlFor:u,className:l===0?"":"border-left",style:{width:i(l)+"%"},children:[w("input",{id:u,name:n,type:"radio",value:s.value,checked:t===s.value,onChange:r}),w("div",{children:s.label})]},u)})]})}ye.memo(rU);const{lazy:Ca,Suspense:h_}=At,oU=Ca(()=>_n(()=>import("./Connections.e48eac36.js"),["./Connections.e48eac36.js","./useRemainingViewPortHeight.7395542b.js","./chevron-down.dd238e96.js","./index.92e2d967.js","./Fab.ef67ff10.js","./Fab.a0a7e573.css","./play.7b1a5f99.js","./Connections.fb8ea59b.css"],import.meta.url)),iU=Ca(()=>_n(()=>import("./Config.c09e8dbe.js"),["./Config.c09e8dbe.js","./logs.43986220.js","./Select.6c389032.js","./Select.1e55eba1.css","./Config.39d8d2ef.css"],import.meta.url)),aU=Ca(()=>_n(()=>import("./Logs.ac990610.js"),["./Logs.ac990610.js","./index.esm.e4dd1508.js","./logs.43986220.js","./debounce.c2d20996.js","./useRemainingViewPortHeight.7395542b.js","./Fab.ef67ff10.js","./Fab.a0a7e573.css","./play.7b1a5f99.js","./Logs.4b8e75d1.css"],import.meta.url)),sU=Ca(()=>_n(()=>import("./Proxies.16b46af4.js"),["./Proxies.16b46af4.js","./chevron-down.dd238e96.js","./Fab.ef67ff10.js","./Fab.a0a7e573.css","./TextFitler.61537a57.js","./debounce.c2d20996.js","./TextFitler.b21c0577.css","./index.92e2d967.js","./Select.6c389032.js","./Select.1e55eba1.css","./Proxies.3fa3509d.css"],import.meta.url)),lU=Ca(()=>_n(()=>import("./Rules.70e6962f.js"),["./Rules.70e6962f.js","./index.esm.e4dd1508.js","./TextFitler.61537a57.js","./debounce.c2d20996.js","./TextFitler.b21c0577.css","./index.92e2d967.js","./Fab.ef67ff10.js","./Fab.a0a7e573.css","./useRemainingViewPortHeight.7395542b.js","./Rules.e03c54a8.css"],import.meta.url)),uU=[{path:"/",element:w(E$,{})},{path:"/connections",element:w(Q4.Provider,{value:{hasProcessPath:!1},children:w(oU,{})})},{path:"/configs",element:w(iU,{})},{path:"/logs",element:w(aU,{})},{path:"/proxies",element:w(sU,{})},{path:"/rules",element:w(lU,{})},{path:"/about",element:w(OD,{})},!1].filter(Boolean);function cU(){return N1(uU)}function fU(){return Z(Nt,{children:[w(K4,{}),w(Q$,{}),w("div",{className:f_.content,children:w(h_,{fallback:w(C$,{}),children:w(cU,{})})})]})}function dU(){return N1([{path:"/backend",element:w(NS,{})},{path:"*",element:w(fU,{})}])}const pU=()=>w(t$,{children:w(oI,{children:w(XI,{initialState:hM,actions:vM,children:w(i2,{client:DD,children:w(vO,{children:Z("div",{className:f_.app,children:[w(AD,{}),w(h_,{fallback:w(wS,{}),children:w(dU,{})})]})})})})})}),hU=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 vU(e){if("serviceWorker"in navigator){if(new URL("./",window.location.href).origin!==window.location.origin)return;window.addEventListener("load",()=>{const n=".//sw.js";hU?(mU(n,e),navigator.serviceWorker.ready.then(()=>{console.log("This web app is being served cache-first by a service worker")})):v_(n,e)})}}function v_(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 mU(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()})}):v_(e,t)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})}yU();const m_=document.getElementById("app"),gU=e1(m_);function _c(e){const t=document.createElement("link");t.href=e,t.rel="preload",t.as="font",t.crossOrigin="",document.head.appendChild(t)}function yU(){_c(hE),_c(vE),_c(mE)}c1.setAppElement(m_);gU.render(w(R.exports.StrictMode,{children:w(pU,{})}));vU();console.log("Checkout the repo: https://github.com/haishanh/yacd");console.log("Version:","0.3.8");export{RS as $,lD as A,JM as B,rS as C,gS as D,EU as E,Nt as F,_t as G,bU as H,EI as I,WD as J,NU as K,AU as L,Q4 as M,LU as N,RU as O,PU as P,Kn as Q,ye as R,Kp as S,KU as T,WU as U,_U as V,zU as W,tM as X,w4 as Y,a_ as Z,bc as _,is as a,nM as a0,jU as a1,VU as a2,th as a3,OU as a4,kU as a5,TU as a6,$U as a7,UU as a8,BU as a9,FU as aa,nh as ab,uD as ac,Bo as ad,DU as ae,rM as af,MU as ag,pa as ah,lm as ai,DC as aj,Ie as ak,SU as al,o2 as am,YC as an,c2 as ao,iI as ap,v2 as aq,Z as b,ar as c,c1 as d,kn as e,IU as f,qD as g,jo as h,At as i,w as j,ge as k,a$ as l,Sg as m,xg as n,Rg as o,na as p,u$ as q,R as r,HU as s,xU as t,ia as u,vS as v,ng as w,CU as x,GI as y,qU as z};
diff --git a/dashboard/public/assets/index.8bb012c6.js b/dashboard/public/assets/index.8bb012c6.js
new file mode 100644
index 0000000..37fb412
--- /dev/null
+++ b/dashboard/public/assets/index.8bb012c6.js
@@ -0,0 +1,9 @@
+import{r as p,R as xo,b as ci,j as F,F as ns}from"./index.171f553a.js";const tt=p.exports.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),we=p.exports.createContext({});function bo(){return p.exports.useContext(we).visualElement}const At=p.exports.createContext(null),vt=typeof document<"u",mt=vt?p.exports.useLayoutEffect:p.exports.useEffect,gn=p.exports.createContext({strict:!1});function li(t,e,n,s){const o=bo(),i=p.exports.useContext(gn),r=p.exports.useContext(At),a=p.exports.useContext(tt).reducedMotion,c=p.exports.useRef(void 0);s=s||i.renderer,!c.current&&s&&(c.current=s(t,{visualState:e,parent:o,props:n,presenceId:r?r.id:void 0,blockInitialAnimation:r?r.initial===!1:!1,reducedMotionConfig:a}));const l=c.current;return mt(()=>{l&&l.syncRender()}),p.exports.useEffect(()=>{l&&l.animationState&&l.animationState.animateChanges()}),mt(()=>()=>l&&l.notifyUnmount(),[]),l}function wt(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function ui(t,e,n){return p.exports.useCallback(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):wt(n)&&(n.current=s))},[e])}function Nt(t){return typeof t=="string"||Array.isArray(t)}function Te(t){return typeof t=="object"&&typeof t.start=="function"}const fi=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function Pe(t){return Te(t.animate)||fi.some(e=>Nt(t[e]))}function So(t){return Boolean(Pe(t)||t.variants)}function di(t,e){if(Pe(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Nt(n)?n:void 0,animate:Nt(s)?s:void 0}}return t.inherit!==!1?e:{}}function hi(t){const{initial:e,animate:n}=di(t,p.exports.useContext(we));return p.exports.useMemo(()=>({initial:e,animate:n}),[ss(e),ss(n)])}function ss(t){return Array.isArray(t)?t.join(" "):t}const Q=t=>({isEnabled:e=>t.some(n=>!!e[n])}),zt={measureLayout:Q(["layout","layoutId","drag"]),animation:Q(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:Q(["exit"]),drag:Q(["drag","dragControls"]),focus:Q(["whileFocus"]),hover:Q(["whileHover","onHoverStart","onHoverEnd"]),tap:Q(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Q(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:Q(["whileInView","onViewportEnter","onViewportLeave"])};function Ye(t){for(const e in t)e==="projectionNodeConstructor"?zt.projectionNodeConstructor=t[e]:zt[e].Component=t[e]}function _(t){const e=p.exports.useRef(null);return e.current===null&&(e.current=t()),e.current}const Dt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let pi=1;function mi(){return _(()=>{if(Dt.hasEverUpdated)return pi++})}const $t=p.exports.createContext({});class gi extends xo.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:n}=this.props;return e&&e.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const Vo=p.exports.createContext({}),yn=Symbol.for("motionComponentSymbol");function wo({preloadedFeatures:t,createVisualElement:e,projectionNodeConstructor:n,useRender:s,useVisualState:o,Component:i}){t&&Ye(t);function r(c,l){const u={...p.exports.useContext(tt),...c,layoutId:yi(c)},{isStatic:f}=u;let d=null;const h=hi(c),m=f?void 0:mi(),x=o(c,f);if(!f&&vt){h.visualElement=li(i,x,u,e);const S=p.exports.useContext(gn).strict,V=p.exports.useContext(Vo);h.visualElement&&(d=h.visualElement.loadFeatures(u,S,t,m,n||zt.projectionNodeConstructor,V))}return ci(gi,{visualElement:h.visualElement,props:u,children:[d,F(we.Provider,{value:h,children:s(i,c,m,ui(x,h.visualElement,l),x,f,h.visualElement)})]})}const a=p.exports.forwardRef(r);return a[yn]=i,a}function yi({layoutId:t}){const e=p.exports.useContext($t).id;return e&&t!==void 0?e+"-"+t:t}function To(t){function e(s,o={}){return wo(t(s,o))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(s,o)=>(n.has(o)||n.set(o,e(o)),n.get(o))})}const vi=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function vn(t){return typeof t!="string"||t.includes("-")?!1:!!(vi.indexOf(t)>-1||/[A-Z]/.test(t))}const le={};function xi(t){Object.assign(le,t)}const ue=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],gt=new Set(ue);function Po(t,{layout:e,layoutId:n}){return gt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!le[t]||t==="opacity")}const U=t=>!!(t!=null&&t.getVelocity),bi={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Si=(t,e)=>ue.indexOf(t)-ue.indexOf(e);function Vi({transform:t,transformKeys:e},{enableHardwareAcceleration:n=!0,allowTransformNone:s=!0},o,i){let r="";e.sort(Si);for(const a of e)r+=`${bi[a]||a}(${t[a]}) `;return n&&!t.z&&(r+="translateZ(0)"),r=r.trim(),i?r=i(t,o?"":r):s&&o&&(r="none"),r}function xn(t){return t.startsWith("--")}const wi=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Co=(t,e)=>n=>Math.max(Math.min(n,e),t),It=t=>t%1?Number(t.toFixed(5)):t,Ht=/(-)?([\d]*\.?[\d])+/g,Ke=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Ti=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Xt(t){return typeof t=="string"}const xt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Ft=Object.assign(Object.assign({},xt),{transform:Co(0,1)}),Jt=Object.assign(Object.assign({},xt),{default:1}),qt=t=>({test:e=>Xt(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),ot=qt("deg"),X=qt("%"),T=qt("px"),Pi=qt("vh"),Ci=qt("vw"),os=Object.assign(Object.assign({},X),{parse:t=>X.parse(t)/100,transform:t=>X.transform(t*100)}),bn=(t,e)=>n=>Boolean(Xt(n)&&Ti.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Ao=(t,e,n)=>s=>{if(!Xt(s))return s;const[o,i,r,a]=s.match(Ht);return{[t]:parseFloat(o),[e]:parseFloat(i),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},ht={test:bn("hsl","hue"),parse:Ao("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+X.transform(It(e))+", "+X.transform(It(n))+", "+It(Ft.transform(s))+")"},Ai=Co(0,255),Fe=Object.assign(Object.assign({},xt),{transform:t=>Math.round(Ai(t))}),at={test:bn("rgb","red"),parse:Ao("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Fe.transform(t)+", "+Fe.transform(e)+", "+Fe.transform(n)+", "+It(Ft.transform(s))+")"};function Ri(t){let e="",n="",s="",o="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),s=t.substr(5,2),o=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),s=t.substr(3,1),o=t.substr(4,1),e+=e,n+=n,s+=s,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:o?parseInt(o,16)/255:1}}const Xe={test:bn("#"),parse:Ri,transform:at.transform},B={test:t=>at.test(t)||Xe.test(t)||ht.test(t),parse:t=>at.test(t)?at.parse(t):ht.test(t)?ht.parse(t):Xe.parse(t),transform:t=>Xt(t)?t:t.hasOwnProperty("red")?at.transform(t):ht.transform(t)},Ro="${c}",Mo="${n}";function Mi(t){var e,n,s,o;return isNaN(t)&&Xt(t)&&((n=(e=t.match(Ht))===null||e===void 0?void 0:e.length)!==null&&n!==void 0?n:0)+((o=(s=t.match(Ke))===null||s===void 0?void 0:s.length)!==null&&o!==void 0?o:0)>0}function Lo(t){typeof t=="number"&&(t=`${t}`);const e=[];let n=0;const s=t.match(Ke);s&&(n=s.length,t=t.replace(Ke,Ro),e.push(...s.map(B.parse)));const o=t.match(Ht);return o&&(t=t.replace(Ht,Mo),e.push(...o.map(xt.parse))),{values:e,numColors:n,tokenised:t}}function Eo(t){return Lo(t).values}function Oo(t){const{values:e,numColors:n,tokenised:s}=Lo(t),o=e.length;return i=>{let r=s;for(let a=0;atypeof t=="number"?0:t;function Ei(t){const e=Eo(t);return Oo(t)(e.map(Li))}const et={test:Mi,parse:Eo,createTransformer:Oo,getAnimatableNone:Ei},Oi=new Set(["brightness","contrast","saturate","opacity"]);function Di(t){let[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Ht)||[];if(!s)return t;const o=n.replace(s,"");let i=Oi.has(e)?1:0;return s!==n&&(i*=100),e+"("+i+o+")"}const Ii=/([a-z-]*)\(.*?\)/g,qe=Object.assign(Object.assign({},et),{getAnimatableNone:t=>{const e=t.match(Ii);return e?e.map(Di).join(" "):t}}),rs={...xt,transform:Math.round},Do={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,radius:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,size:T,top:T,right:T,bottom:T,left:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,rotate:ot,rotateX:ot,rotateY:ot,rotateZ:ot,scale:Jt,scaleX:Jt,scaleY:Jt,scaleZ:Jt,skew:ot,skewX:ot,skewY:ot,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:Ft,originX:os,originY:os,originZ:T,zIndex:rs,fillOpacity:Ft,strokeOpacity:Ft,numOctaves:rs};function Sn(t,e,n,s){const{style:o,vars:i,transform:r,transformKeys:a,transformOrigin:c}=t;a.length=0;let l=!1,u=!1,f=!0;for(const d in e){const h=e[d];if(xn(d)){i[d]=h;continue}const m=Do[d],x=wi(h,m);if(gt.has(d)){if(l=!0,r[d]=x,a.push(d),!f)continue;h!==(m.default||0)&&(f=!1)}else d.startsWith("origin")?(u=!0,c[d]=x):o[d]=x}if(e.transform||(l||s?o.transform=Vi(t,n,f,s):o.transform&&(o.transform="none")),u){const{originX:d="50%",originY:h="50%",originZ:m=0}=c;o.transformOrigin=`${d} ${h} ${m}`}}const Vn=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function Io(t,e,n){for(const s in e)!U(e[s])&&!Po(s,n)&&(t[s]=e[s])}function Fi({transformTemplate:t},e,n){return p.exports.useMemo(()=>{const s=Vn();return Sn(s,e,{enableHardwareAcceleration:!n},t),Object.assign({},s.vars,s.style)},[e])}function ki(t,e,n){const s=t.style||{},o={};return Io(o,s,t),Object.assign(o,Fi(t,e,n)),t.transformValues?t.transformValues(o):o}function ji(t,e,n){const s={},o=ki(t,e,n);return t.drag&&t.dragListener!==!1&&(s.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),s.style=o,s}const _i=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],Bi=["whileTap","onTap","onTapStart","onTapCancel"],Ui=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Ni=["whileInView","onViewportEnter","onViewportLeave","viewport"],zi=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...Ni,...Bi,..._i,...Ui]);function fe(t){return zi.has(t)}let Fo=t=>!fe(t);function ko(t){!t||(Fo=e=>e.startsWith("on")?!fe(e):t(e))}try{ko(require("@emotion/is-prop-valid").default)}catch{}function $i(t,e,n){const s={};for(const o in t)(Fo(o)||n===!0&&fe(o)||!e&&!fe(o)||t.draggable&&o.startsWith("onDrag"))&&(s[o]=t[o]);return s}function is(t,e,n){return typeof t=="string"?t:T.transform(e+n*t)}function Hi(t,e,n){const s=is(e,t.x,t.width),o=is(n,t.y,t.height);return`${s} ${o}`}const Wi={offset:"stroke-dashoffset",array:"stroke-dasharray"},Gi={offset:"strokeDashoffset",array:"strokeDasharray"};function Yi(t,e,n=1,s=0,o=!0){t.pathLength=1;const i=o?Wi:Gi;t[i.offset]=T.transform(-s);const r=T.transform(e),a=T.transform(n);t[i.array]=`${r} ${a}`}function wn(t,{attrX:e,attrY:n,originX:s,originY:o,pathLength:i,pathSpacing:r=1,pathOffset:a=0,...c},l,u){Sn(t,c,l,u),t.attrs=t.style,t.style={};const{attrs:f,style:d,dimensions:h}=t;f.transform&&(h&&(d.transform=f.transform),delete f.transform),h&&(s!==void 0||o!==void 0||d.transform)&&(d.transformOrigin=Hi(h,s!==void 0?s:.5,o!==void 0?o:.5)),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),i!==void 0&&Yi(f,i,r,a,!1)}const jo=()=>({...Vn(),attrs:{}});function Ki(t,e){const n=p.exports.useMemo(()=>{const s=jo();return wn(s,e,{enableHardwareAcceleration:!1},t.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};Io(s,t.style,t),n.style={...s,...n.style}}return n}function Xi(t=!1){return(n,s,o,i,{latestValues:r},a)=>{const l=(vn(n)?Ki:ji)(s,r,a),f={...$i(s,typeof n=="string",t),...l,ref:i};return o&&(f["data-projection-id"]=o),p.exports.createElement(n,f)}}const de=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function _o(t,{style:e,vars:n},s,o){Object.assign(t.style,e,o&&o.getProjectionStyles(s));for(const i in n)t.style.setProperty(i,n[i])}const Bo=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function Uo(t,e,n,s){_o(t,e,void 0,s);for(const o in e.attrs)t.setAttribute(Bo.has(o)?o:de(o),e.attrs[o])}function Tn(t){const{style:e}=t,n={};for(const s in e)(U(e[s])||Po(s,t))&&(n[s]=e[s]);return n}function No(t){const e=Tn(t);for(const n in t)if(U(t[n])){const s=n==="x"||n==="y"?"attr"+n.toUpperCase():n;e[s]=t[n]}return e}function Pn(t,e,n,s={},o={}){return typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,o)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,o)),e}const Wt=t=>Array.isArray(t),qi=t=>Boolean(t&&typeof t=="object"&&t.mix&&t.toValue),zo=t=>Wt(t)?t[t.length-1]||0:t;function oe(t){const e=U(t)?t.get():t;return qi(e)?e.toValue():e}function Zi({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,o,i){const r={latestValues:Ji(s,o,i,t),renderState:e()};return n&&(r.mount=a=>n(s,a,r)),r}const Cn=t=>(e,n)=>{const s=p.exports.useContext(we),o=p.exports.useContext(At),i=()=>Zi(t,e,s,o);return n?i():_(i)};function Ji(t,e,n,s){const o={},i=s(t);for(const d in i)o[d]=oe(i[d]);let{initial:r,animate:a}=t;const c=Pe(t),l=So(t);e&&l&&!c&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const f=u?a:r;return f&&typeof f!="boolean"&&!Te(f)&&(Array.isArray(f)?f:[f]).forEach(h=>{const m=Pn(t,h);if(!m)return;const{transitionEnd:x,transition:S,...V}=m;for(const b in V){let g=V[b];if(Array.isArray(g)){const v=u?g.length-1:0;g=g[v]}g!==null&&(o[b]=g)}for(const b in x)o[b]=x[b]}),o}const Qi={useVisualState:Cn({scrapeMotionValuesFromProps:No,createRenderState:jo,onMount:(t,e,{renderState:n,latestValues:s})=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}wn(n,s,{enableHardwareAcceleration:!1},t.transformTemplate),Uo(e,n)}})},ta={useVisualState:Cn({scrapeMotionValuesFromProps:Tn,createRenderState:Vn})};function An(t,{forwardMotionProps:e=!1},n,s,o){return{...vn(t)?Qi:ta,preloadedFeatures:n,useRender:Xi(e),createVisualElement:s,projectionNodeConstructor:o,Component:t}}var M;(function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"})(M||(M={}));function Ce(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function Ze(t,e,n,s){p.exports.useEffect(()=>{const o=t.current;if(n&&o)return Ce(o,e,n,s)},[t,e,n,s])}function ea({whileFocus:t,visualElement:e}){const{animationState:n}=e,s=()=>{n&&n.setActive(M.Focus,!0)},o=()=>{n&&n.setActive(M.Focus,!1)};Ze(e,"focus",t?s:void 0),Ze(e,"blur",t?o:void 0)}function $o(t){return typeof PointerEvent<"u"&&t instanceof PointerEvent?t.pointerType==="mouse":t instanceof MouseEvent}function Ho(t){return!!t.touches}function na(t){return e=>{const n=e instanceof MouseEvent;(!n||n&&e.button===0)&&t(e)}}const sa={pageX:0,pageY:0};function oa(t,e="page"){const s=t.touches[0]||t.changedTouches[0]||sa;return{x:s[e+"X"],y:s[e+"Y"]}}function ra(t,e="page"){return{x:t[e+"X"],y:t[e+"Y"]}}function Rn(t,e="page"){return{point:Ho(t)?oa(t,e):ra(t,e)}}const Wo=(t,e=!1)=>{const n=s=>t(s,Rn(s));return e?na(n):n},ia=()=>vt&&window.onpointerdown===null,aa=()=>vt&&window.ontouchstart===null,ca=()=>vt&&window.onmousedown===null,la={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},ua={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Go(t){return ia()?t:aa()?ua[t]:ca()?la[t]:t}function Pt(t,e,n,s){return Ce(t,Go(e),Wo(n,e==="pointerdown"),s)}function he(t,e,n,s){return Ze(t,Go(e),n&&Wo(n,e==="pointerdown"),s)}function Yo(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const as=Yo("dragHorizontal"),cs=Yo("dragVertical");function Ko(t){let e=!1;if(t==="y")e=cs();else if(t==="x")e=as();else{const n=as(),s=cs();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function Xo(){const t=Ko(!0);return t?(t(),!1):!0}function ls(t,e,n){return(s,o)=>{!$o(s)||Xo()||(t.animationState&&t.animationState.setActive(M.Hover,e),n&&n(s,o))}}function fa({onHoverStart:t,onHoverEnd:e,whileHover:n,visualElement:s}){he(s,"pointerenter",t||n?ls(s,!0,t):void 0,{passive:!t}),he(s,"pointerleave",e||n?ls(s,!1,e):void 0,{passive:!e})}const qo=(t,e)=>e?t===e?!0:qo(t,e.parentElement):!1;function Mn(t){return p.exports.useEffect(()=>()=>t(),[])}function Zo(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(t);oMath.min(Math.max(n,t),e),ke=.001,ha=.01,us=10,pa=.05,ma=1;function ga({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let o,i;da(t<=us*1e3);let r=1-e;r=me(pa,ma,r),t=me(ha,us,t/1e3),r<1?(o=l=>{const u=l*r,f=u*t,d=u-n,h=Je(l,r),m=Math.exp(-f);return ke-d/h*m},i=l=>{const f=l*r*t,d=f*n+n,h=Math.pow(r,2)*Math.pow(l,2)*t,m=Math.exp(-f),x=Je(Math.pow(l,2),r);return(-o(l)+ke>0?-1:1)*((d-h)*m)/x}):(o=l=>{const u=Math.exp(-l*t),f=(l-n)*t+1;return-ke+u*f},i=l=>{const u=Math.exp(-l*t),f=(n-l)*(t*t);return u*f});const a=5/t,c=va(o,i,a);if(t=t*1e3,isNaN(c))return{stiffness:100,damping:10,duration:t};{const l=Math.pow(c,2)*s;return{stiffness:l,damping:r*2*Math.sqrt(s*l),duration:t}}}const ya=12;function va(t,e,n){let s=n;for(let o=1;ot[n]!==void 0)}function Sa(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!fs(t,ba)&&fs(t,xa)){const n=ga(t);e=Object.assign(Object.assign(Object.assign({},e),n),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function Ln(t){var{from:e=0,to:n=1,restSpeed:s=2,restDelta:o}=t,i=Zo(t,["from","to","restSpeed","restDelta"]);const r={done:!1,value:e};let{stiffness:a,damping:c,mass:l,velocity:u,duration:f,isResolvedFromDuration:d}=Sa(i),h=ds,m=ds;function x(){const S=u?-(u/1e3):0,V=n-e,b=c/(2*Math.sqrt(a*l)),g=Math.sqrt(a/l)/1e3;if(o===void 0&&(o=Math.min(Math.abs(n-e)/100,.4)),b<1){const v=Je(g,b);h=w=>{const A=Math.exp(-b*g*w);return n-A*((S+b*g*V)/v*Math.sin(v*w)+V*Math.cos(v*w))},m=w=>{const A=Math.exp(-b*g*w);return b*g*A*(Math.sin(v*w)*(S+b*g*V)/v+V*Math.cos(v*w))-A*(Math.cos(v*w)*(S+b*g*V)-v*V*Math.sin(v*w))}}else if(b===1)h=v=>n-Math.exp(-g*v)*(V+(S+g*V)*v);else{const v=g*Math.sqrt(b*b-1);h=w=>{const A=Math.exp(-b*g*w),E=Math.min(v*w,300);return n-A*((S+b*g*V)*Math.sinh(E)+v*V*Math.cosh(E))/v}}}return x(),{next:S=>{const V=h(S);if(d)r.done=S>=f;else{const b=m(S)*1e3,g=Math.abs(b)<=s,v=Math.abs(n-V)<=o;r.done=g&&v}return r.value=r.done?n:V,r},flipTarget:()=>{u=-u,[e,n]=[n,e],x()}}}Ln.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const ds=t=>0,Gt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},L=(t,e,n)=>-n*t+n*e+t;function je(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function hs({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let o=0,i=0,r=0;if(!e)o=i=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,c=2*n-a;o=je(c,a,t+1/3),i=je(c,a,t),r=je(c,a,t-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(r*255),alpha:s}}const Va=(t,e,n)=>{const s=t*t,o=e*e;return Math.sqrt(Math.max(0,n*(o-s)+s))},wa=[Xe,at,ht],ps=t=>wa.find(e=>e.test(t)),Jo=(t,e)=>{let n=ps(t),s=ps(e),o=n.parse(t),i=s.parse(e);n===ht&&(o=hs(o),n=at),s===ht&&(i=hs(i),s=at);const r=Object.assign({},o);return a=>{for(const c in r)c!=="alpha"&&(r[c]=Va(o[c],i[c],a));return r.alpha=L(o.alpha,i.alpha,a),n.transform(r)}},Qe=t=>typeof t=="number",Ta=(t,e)=>n=>e(t(n)),Ae=(...t)=>t.reduce(Ta);function Qo(t,e){return Qe(t)?n=>L(t,e,n):B.test(t)?Jo(t,e):er(t,e)}const tr=(t,e)=>{const n=[...t],s=n.length,o=t.map((i,r)=>Qo(i,e[r]));return i=>{for(let r=0;r{const n=Object.assign(Object.assign({},t),e),s={};for(const o in n)t[o]!==void 0&&e[o]!==void 0&&(s[o]=Qo(t[o],e[o]));return o=>{for(const i in s)n[i]=s[i](o);return n}};function ms(t){const e=et.parse(t),n=e.length;let s=0,o=0,i=0;for(let r=0;r{const n=et.createTransformer(e),s=ms(t),o=ms(e);return s.numHSL===o.numHSL&&s.numRGB===o.numRGB&&s.numNumbers>=o.numNumbers?Ae(tr(s.parsed,o.parsed),n):r=>`${r>0?e:t}`},Ca=(t,e)=>n=>L(t,e,n);function Aa(t){if(typeof t=="number")return Ca;if(typeof t=="string")return B.test(t)?Jo:er;if(Array.isArray(t))return tr;if(typeof t=="object")return Pa}function Ra(t,e,n){const s=[],o=n||Aa(t[0]),i=t.length-1;for(let r=0;rn(Gt(t,e,s))}function La(t,e){const n=t.length,s=n-1;return o=>{let i=0,r=!1;if(o<=t[0]?r=!0:o>=t[s]&&(i=s-1,r=!0),!r){let c=1;for(;co||c===s);c++);i=c-1}const a=Gt(t[i],t[i+1],o);return e[i](a)}}function En(t,e,{clamp:n=!0,ease:s,mixer:o}={}){const i=t.length;pe(i===e.length),pe(!s||!Array.isArray(s)||s.length===i-1),t[0]>t[i-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());const r=Ra(e,s,o),a=i===2?Ma(t,r):La(t,r);return n?c=>a(me(t[0],t[i-1],c)):a}const Re=t=>e=>1-t(1-e),On=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Ea=t=>e=>Math.pow(e,t),nr=t=>e=>e*e*((t+1)*e-t),Oa=t=>{const e=nr(t);return n=>(n*=2)<1?.5*e(n):.5*(2-Math.pow(2,-10*(n-1)))},sr=1.525,Da=4/11,Ia=8/11,Fa=9/10,Dn=t=>t,In=Ea(2),ka=Re(In),or=On(In),rr=t=>1-Math.sin(Math.acos(t)),Fn=Re(rr),ja=On(Fn),kn=nr(sr),_a=Re(kn),Ba=On(kn),Ua=Oa(sr),Na=4356/361,za=35442/1805,$a=16061/1805,ge=t=>{if(t===1||t===0)return t;const e=t*t;return tt<.5?.5*(1-ge(1-t*2)):.5*ge(t*2-1)+.5;function Ga(t,e){return t.map(()=>e||or).splice(0,t.length-1)}function Ya(t){const e=t.length;return t.map((n,s)=>s!==0?s/(e-1):0)}function Ka(t,e){return t.map(n=>n*e)}function re({from:t=0,to:e=1,ease:n,offset:s,duration:o=300}){const i={done:!1,value:t},r=Array.isArray(e)?e:[t,e],a=Ka(s&&s.length===r.length?s:Ya(r),o);function c(){return En(a,r,{ease:Array.isArray(n)?n:Ga(r,n)})}let l=c();return{next:u=>(i.value=l(u),i.done=u>=o,i),flipTarget:()=>{r.reverse(),l=c()}}}function Xa({velocity:t=0,from:e=0,power:n=.8,timeConstant:s=350,restDelta:o=.5,modifyTarget:i}){const r={done:!1,value:e};let a=n*t;const c=e+a,l=i===void 0?c:i(c);return l!==c&&(a=l-e),{next:u=>{const f=-a*Math.exp(-u/s);return r.done=!(f>o||f<-o),r.value=r.done?l:l+f,r},flipTarget:()=>{}}}const gs={keyframes:re,spring:Ln,decay:Xa};function qa(t){if(Array.isArray(t.to))return re;if(gs[t.type])return gs[t.type];const e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?re:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?Ln:re}const ir=1/60*1e3,Za=typeof performance<"u"?()=>performance.now():()=>Date.now(),ar=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(Za()),ir);function Ja(t){let e=[],n=[],s=0,o=!1,i=!1;const r=new WeakSet,a={schedule:(c,l=!1,u=!1)=>{const f=u&&o,d=f?e:n;return l&&r.add(c),d.indexOf(c)===-1&&(d.push(c),f&&o&&(s=e.length)),c},cancel:c=>{const l=n.indexOf(c);l!==-1&&n.splice(l,1),r.delete(c)},process:c=>{if(o){i=!0;return}if(o=!0,[e,n]=[n,e],n.length=0,s=e.length,s)for(let l=0;l(t[e]=Ja(()=>Yt=!0),t),{}),j=Zt.reduce((t,e)=>{const n=Me[e];return t[e]=(s,o=!1,i=!1)=>(Yt||ec(),n.schedule(s,o,i)),t},{}),q=Zt.reduce((t,e)=>(t[e]=Me[e].cancel,t),{}),_e=Zt.reduce((t,e)=>(t[e]=()=>Me[e].process(Ct),t),{}),tc=t=>Me[t].process(Ct),cr=t=>{Yt=!1,Ct.delta=tn?ir:Math.max(Math.min(t-Ct.timestamp,Qa),1),Ct.timestamp=t,en=!0,Zt.forEach(tc),en=!1,Yt&&(tn=!1,ar(cr))},ec=()=>{Yt=!0,tn=!0,en||ar(cr)},ye=()=>Ct;function lr(t,e,n=0){return t-e-n}function nc(t,e,n=0,s=!0){return s?lr(e+-t,e,n):e-(t-e)+n}function sc(t,e,n,s){return s?t>=e+n:t<=-n}const oc=t=>{const e=({delta:n})=>t(n);return{start:()=>j.update(e,!0),stop:()=>q.update(e)}};function jn(t){var e,n,{from:s,autoplay:o=!0,driver:i=oc,elapsed:r=0,repeat:a=0,repeatType:c="loop",repeatDelay:l=0,onPlay:u,onStop:f,onComplete:d,onRepeat:h,onUpdate:m}=t,x=Zo(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:S}=x,V,b=0,g=x.duration,v,w=!1,A=!0,E;const k=qa(x);!((n=(e=k).needsInterpolation)===null||n===void 0)&&n.call(e,s,S)&&(E=En([0,100],[s,S],{clamp:!1}),s=0,S=100);const I=k(Object.assign(Object.assign({},x),{from:s,to:S}));function $(){b++,c==="reverse"?(A=b%2===0,r=nc(r,g,l,A)):(r=lr(r,g,l),c==="mirror"&&I.flipTarget()),w=!1,h&&h()}function Z(){V.stop(),d&&d()}function H(nt){if(A||(nt=-nt),r+=nt,!w){const J=I.next(Math.max(0,r));v=J.value,E&&(v=E(v)),w=A?J.done:r<=0}m==null||m(v),w&&(b===0&&(g!=null||(g=r)),b{f==null||f(),V.stop()}}}function ur(t,e){return e?t*(1e3/e):0}function rc({from:t=0,velocity:e=0,min:n,max:s,power:o=.8,timeConstant:i=750,bounceStiffness:r=500,bounceDamping:a=10,restDelta:c=1,modifyTarget:l,driver:u,onUpdate:f,onComplete:d,onStop:h}){let m;function x(g){return n!==void 0&&gs}function S(g){return n===void 0?s:s===void 0||Math.abs(n-g){var w;f==null||f(v),(w=g.onUpdate)===null||w===void 0||w.call(g,v)},onComplete:d,onStop:h}))}function b(g){V(Object.assign({type:"spring",stiffness:r,damping:a,restDelta:c},g))}if(x(t))b({from:t,velocity:e,to:S(t)});else{let g=o*e+t;typeof l<"u"&&(g=l(g));const v=S(g),w=v===n?-1:1;let A,E;const k=I=>{A=E,E=I,e=ur(I-A,ye().delta),(w===1&&I>v||w===-1&&Im==null?void 0:m.stop()}}const nn=t=>t.hasOwnProperty("x")&&t.hasOwnProperty("y"),ys=t=>nn(t)&&t.hasOwnProperty("z"),Qt=(t,e)=>Math.abs(t-e);function _n(t,e){if(Qe(t)&&Qe(e))return Qt(t,e);if(nn(t)&&nn(e)){const n=Qt(t.x,e.x),s=Qt(t.y,e.y),o=ys(t)&&ys(e)?Qt(t.z,e.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(s,2)+Math.pow(o,2))}}const ic=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t},fr=(t,e)=>1-3*e+3*t,dr=(t,e)=>3*e-6*t,hr=t=>3*t,ve=(t,e,n)=>((fr(e,n)*t+dr(e,n))*t+hr(e))*t,pr=(t,e,n)=>3*fr(e,n)*t*t+2*dr(e,n)*t+hr(e),ac=1e-7,cc=10;function lc(t,e,n,s,o){let i,r,a=0;do r=e+(n-e)/2,i=ve(r,s,o)-t,i>0?n=r:e=r;while(Math.abs(i)>ac&&++a=fc?dc(r,f,t,n):d===0?f:lc(r,a,a+te,t,n)}return r=>r===0||r===1?r:ve(i(r),e,s)}function pc({onTap:t,onTapStart:e,onTapCancel:n,whileTap:s,visualElement:o}){const i=t||e||n||s,r=p.exports.useRef(!1),a=p.exports.useRef(null),c={passive:!(e||t||n||h)};function l(){a.current&&a.current(),a.current=null}function u(){return l(),r.current=!1,o.animationState&&o.animationState.setActive(M.Tap,!1),!Xo()}function f(m,x){!u()||(qo(o.getInstance(),m.target)?t&&t(m,x):n&&n(m,x))}function d(m,x){!u()||n&&n(m,x)}function h(m,x){l(),!r.current&&(r.current=!0,a.current=Ae(Pt(window,"pointerup",f,c),Pt(window,"pointercancel",d,c)),o.animationState&&o.animationState.setActive(M.Tap,!0),e&&e(m,x))}he(o,"pointerdown",i?h:void 0,c),Mn(l)}const mc="production",Bn=typeof process>"u"||process.env===void 0?mc:"production",vs=new Set;function Le(t,e,n){t||vs.has(e)||(console.warn(e),n&&console.warn(n),vs.add(e))}const sn=new WeakMap,Be=new WeakMap,gc=t=>{const e=sn.get(t.target);e&&e(t)},yc=t=>{t.forEach(gc)};function vc({root:t,...e}){const n=t||document;Be.has(n)||Be.set(n,{});const s=Be.get(n),o=JSON.stringify(e);return s[o]||(s[o]=new IntersectionObserver(yc,{root:t,...e})),s[o]}function xc(t,e,n){const s=vc(e);return sn.set(t,n),s.observe(t),()=>{sn.delete(t),s.unobserve(t)}}function bc({visualElement:t,whileInView:e,onViewportEnter:n,onViewportLeave:s,viewport:o={}}){const i=p.exports.useRef({hasEnteredView:!1,isInView:!1});let r=Boolean(e||n||s);o.once&&i.current.hasEnteredView&&(r=!1),(typeof IntersectionObserver>"u"?wc:Vc)(r,i.current,t,o)}const Sc={some:0,all:1};function Vc(t,e,n,{root:s,margin:o,amount:i="some",once:r}){p.exports.useEffect(()=>{if(!t)return;const a={root:s==null?void 0:s.current,rootMargin:o,threshold:typeof i=="number"?i:Sc[i]},c=l=>{const{isIntersecting:u}=l;if(e.isInView===u||(e.isInView=u,r&&!u&&e.hasEnteredView))return;u&&(e.hasEnteredView=!0),n.animationState&&n.animationState.setActive(M.InView,u);const f=n.getProps(),d=u?f.onViewportEnter:f.onViewportLeave;d&&d(l)};return xc(n.getInstance(),a,c)},[t,s,o,i])}function wc(t,e,n,{fallback:s=!0}){p.exports.useEffect(()=>{!t||!s||(Bn!=="production"&&Le(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{e.hasEnteredView=!0;const{onViewportEnter:o}=n.getProps();o&&o(null),n.animationState&&n.animationState.setActive(M.InView,!0)}))},[t])}const ct=t=>e=>(t(e),null),mr={inView:ct(bc),tap:ct(pc),focus:ct(ea),hover:ct(fa)};function gr(){const t=p.exports.useContext(At);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,o=p.exports.useId();return p.exports.useEffect(()=>s(o),[]),!e&&n?[!1,()=>n&&n(o)]:[!0]}function If(){return Tc(p.exports.useContext(At))}function Tc(t){return t===null?!0:t.isPresent}function yr(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s