@musistudio/claude-code-router 1.0.31 → 1.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.html CHANGED
@@ -12,7 +12,7 @@
12
12
  *
13
13
  * This source code is licensed under the MIT license found in the
14
14
  * LICENSE file in the root directory of this source tree.
15
- */var Zg;function TS(){if(Zg)return Ki;Zg=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function l(i,s,u){var f=null;if(u!==void 0&&(f=""+u),s.key!==void 0&&(f=""+s.key),"key"in s){u={};for(var h in s)h!=="key"&&(u[h]=s[h])}else u=s;return s=u.ref,{$$typeof:n,type:i,key:f,ref:s!==void 0?s:null,props:u}}return Ki.Fragment=a,Ki.jsx=l,Ki.jsxs=l,Ki}var Jg;function jS(){return Jg||(Jg=1,$f.exports=TS()),$f.exports}var y=jS();const Me=n=>typeof n=="string",Fi=()=>{let n,a;const l=new Promise((i,s)=>{n=i,a=s});return l.resolve=n,l.reject=a,l},Ig=n=>n==null?"":""+n,MS=(n,a,l)=>{n.forEach(i=>{a[i]&&(l[i]=a[i])})},_S=/###/g,Wg=n=>n&&n.indexOf("###")>-1?n.replace(_S,"."):n,ev=n=>!n||Me(n),no=(n,a,l)=>{const i=Me(a)?a.split("."):a;let s=0;for(;s<i.length-1;){if(ev(n))return{};const u=Wg(i[s]);!n[u]&&l&&(n[u]=new l),Object.prototype.hasOwnProperty.call(n,u)?n=n[u]:n={},++s}return ev(n)?{}:{obj:n,k:Wg(i[s])}},tv=(n,a,l)=>{const{obj:i,k:s}=no(n,a,Object);if(i!==void 0||a.length===1){i[s]=l;return}let u=a[a.length-1],f=a.slice(0,a.length-1),h=no(n,f,Object);for(;h.obj===void 0&&f.length;)u=`${f[f.length-1]}.${u}`,f=f.slice(0,f.length-1),h=no(n,f,Object),h?.obj&&typeof h.obj[`${h.k}.${u}`]<"u"&&(h.obj=void 0);h.obj[`${h.k}.${u}`]=l},DS=(n,a,l,i)=>{const{obj:s,k:u}=no(n,a,Object);s[u]=s[u]||[],s[u].push(l)},au=(n,a)=>{const{obj:l,k:i}=no(n,a);if(l&&Object.prototype.hasOwnProperty.call(l,i))return l[i]},LS=(n,a,l)=>{const i=au(n,l);return i!==void 0?i:au(a,l)},_y=(n,a,l)=>{for(const i in a)i!=="__proto__"&&i!=="constructor"&&(i in n?Me(n[i])||n[i]instanceof String||Me(a[i])||a[i]instanceof String?l&&(n[i]=a[i]):_y(n[i],a[i],l):n[i]=a[i]);return n},wl=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var zS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const kS=n=>Me(n)?n.replace(/[&<>"'\/]/g,a=>zS[a]):n;class US{constructor(a){this.capacity=a,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(a){const l=this.regExpMap.get(a);if(l!==void 0)return l;const i=new RegExp(a);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(a,i),this.regExpQueue.push(a),i}}const PS=[" ",",","?","!",";"],HS=new US(20),BS=(n,a,l)=>{a=a||"",l=l||"";const i=PS.filter(f=>a.indexOf(f)<0&&l.indexOf(f)<0);if(i.length===0)return!0;const s=HS.getRegExp(`(${i.map(f=>f==="?"?"\\?":f).join("|")})`);let u=!s.test(n);if(!u){const f=n.indexOf(l);f>0&&!s.test(n.substring(0,f))&&(u=!0)}return u},gd=(n,a,l=".")=>{if(!n)return;if(n[a])return Object.prototype.hasOwnProperty.call(n,a)?n[a]:void 0;const i=a.split(l);let s=n;for(let u=0;u<i.length;){if(!s||typeof s!="object")return;let f,h="";for(let p=u;p<i.length;++p)if(p!==u&&(h+=l),h+=i[p],f=s[h],f!==void 0){if(["string","number","boolean"].indexOf(typeof f)>-1&&p<i.length-1)continue;u+=p-u+1;break}s=f}return s},ro=n=>n?.replace("_","-"),$S={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,a){console?.[n]?.apply?.(console,a)}};class ru{constructor(a,l={}){this.init(a,l)}init(a,l={}){this.prefix=l.prefix||"i18next:",this.logger=a||$S,this.options=l,this.debug=l.debug}log(...a){return this.forward(a,"log","",!0)}warn(...a){return this.forward(a,"warn","",!0)}error(...a){return this.forward(a,"error","")}deprecate(...a){return this.forward(a,"warn","WARNING DEPRECATED: ",!0)}forward(a,l,i,s){return s&&!this.debug?null:(Me(a[0])&&(a[0]=`${i}${this.prefix} ${a[0]}`),this.logger[l](a))}create(a){return new ru(this.logger,{prefix:`${this.prefix}:${a}:`,...this.options})}clone(a){return a=a||this.options,a.prefix=a.prefix||this.prefix,new ru(this.logger,a)}}var Hn=new ru;class pu{constructor(){this.observers={}}on(a,l){return a.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const s=this.observers[i].get(l)||0;this.observers[i].set(l,s+1)}),this}off(a,l){if(this.observers[a]){if(!l){delete this.observers[a];return}this.observers[a].delete(l)}}emit(a,...l){this.observers[a]&&Array.from(this.observers[a].entries()).forEach(([s,u])=>{for(let f=0;f<u;f++)s(...l)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,u])=>{for(let f=0;f<u;f++)s.apply(s,[a,...l])})}}class nv extends pu{constructor(a,l={ns:["translation"],defaultNS:"translation"}){super(),this.data=a||{},this.options=l,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(a){this.options.ns.indexOf(a)<0&&this.options.ns.push(a)}removeNamespaces(a){const l=this.options.ns.indexOf(a);l>-1&&this.options.ns.splice(l,1)}getResource(a,l,i,s={}){const u=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,f=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let h;a.indexOf(".")>-1?h=a.split("."):(h=[a,l],i&&(Array.isArray(i)?h.push(...i):Me(i)&&u?h.push(...i.split(u)):h.push(i)));const p=au(this.data,h);return!p&&!l&&!i&&a.indexOf(".")>-1&&(a=h[0],l=h[1],i=h.slice(2).join(".")),p||!f||!Me(i)?p:gd(this.data?.[a]?.[l],i,u)}addResource(a,l,i,s,u={silent:!1}){const f=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator;let h=[a,l];i&&(h=h.concat(f?i.split(f):i)),a.indexOf(".")>-1&&(h=a.split("."),s=l,l=h[1]),this.addNamespaces(l),tv(this.data,h,s),u.silent||this.emit("added",a,l,i,s)}addResources(a,l,i,s={silent:!1}){for(const u in i)(Me(i[u])||Array.isArray(i[u]))&&this.addResource(a,l,u,i[u],{silent:!0});s.silent||this.emit("added",a,l,i)}addResourceBundle(a,l,i,s,u,f={silent:!1,skipCopy:!1}){let h=[a,l];a.indexOf(".")>-1&&(h=a.split("."),s=i,i=l,l=h[1]),this.addNamespaces(l);let p=au(this.data,h)||{};f.skipCopy||(i=JSON.parse(JSON.stringify(i))),s?_y(p,i,u):p={...p,...i},tv(this.data,h,p),f.silent||this.emit("added",a,l,i)}removeResourceBundle(a,l){this.hasResourceBundle(a,l)&&delete this.data[a][l],this.removeNamespaces(l),this.emit("removed",a,l)}hasResourceBundle(a,l){return this.getResource(a,l)!==void 0}getResourceBundle(a,l){return l||(l=this.options.defaultNS),this.getResource(a,l)}getDataByLanguage(a){return this.data[a]}hasLanguageSomeTranslations(a){const l=this.getDataByLanguage(a);return!!(l&&Object.keys(l)||[]).find(s=>l[s]&&Object.keys(l[s]).length>0)}toJSON(){return this.data}}var Dy={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,a,l,i,s){return n.forEach(u=>{a=this.processors[u]?.process(a,l,i,s)??a}),a}};const av={},rv=n=>!Me(n)&&typeof n!="boolean"&&typeof n!="number";class lu extends pu{constructor(a,l={}){super(),MS(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],a,this),this.options=l,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Hn.create("translator")}changeLanguage(a){a&&(this.language=a)}exists(a,l={interpolation:{}}){const i={...l};return a==null?!1:this.resolve(a,i)?.res!==void 0}extractFromKey(a,l){let i=l.nsSeparator!==void 0?l.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const s=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator;let u=l.ns||this.options.defaultNS||[];const f=i&&a.indexOf(i)>-1,h=!this.options.userDefinedKeySeparator&&!l.keySeparator&&!this.options.userDefinedNsSeparator&&!l.nsSeparator&&!BS(a,i,s);if(f&&!h){const p=a.match(this.interpolator.nestingRegexp);if(p&&p.length>0)return{key:a,namespaces:Me(u)?[u]:u};const m=a.split(i);(i!==s||i===s&&this.options.ns.indexOf(m[0])>-1)&&(u=m.shift()),a=m.join(s)}return{key:a,namespaces:Me(u)?[u]:u}}translate(a,l,i){let s=typeof l=="object"?{...l}:l;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(s={...s}),s||(s={}),a==null)return"";Array.isArray(a)||(a=[String(a)]);const u=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,f=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:h,namespaces:p}=this.extractFromKey(a[a.length-1],s),m=p[p.length-1];let g=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;g===void 0&&(g=":");const x=s.lng||this.language,S=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(x?.toLowerCase()==="cimode")return S?u?{res:`${m}${g}${h}`,usedKey:h,exactUsedKey:h,usedLng:x,usedNS:m,usedParams:this.getUsedParamsDetails(s)}:`${m}${g}${h}`:u?{res:h,usedKey:h,exactUsedKey:h,usedLng:x,usedNS:m,usedParams:this.getUsedParamsDetails(s)}:h;const w=this.resolve(a,s);let C=w?.res;const R=w?.usedKey||h,j=w?.exactUsedKey||h,A=["[object Number]","[object Function]","[object RegExp]"],k=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,P=!this.i18nFormat||this.i18nFormat.handleAsObject,Y=s.count!==void 0&&!Me(s.count),B=lu.hasDefaultValue(s),N=Y?this.pluralResolver.getSuffix(x,s.count,s):"",X=s.ordinal&&Y?this.pluralResolver.getSuffix(x,s.count,{ordinal:!1}):"",ee=Y&&!s.ordinal&&s.count===0,ie=ee&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${N}`]||s[`defaultValue${X}`]||s.defaultValue;let oe=C;P&&!C&&B&&(oe=ie);const Oe=rv(oe),Se=Object.prototype.toString.apply(oe);if(P&&oe&&Oe&&A.indexOf(Se)<0&&!(Me(k)&&Array.isArray(oe))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const de=this.options.returnedObjectHandler?this.options.returnedObjectHandler(R,oe,{...s,ns:p}):`key '${h} (${this.language})' returned an object instead of string.`;return u?(w.res=de,w.usedParams=this.getUsedParamsDetails(s),w):de}if(f){const de=Array.isArray(oe),fe=de?[]:{},ue=de?j:R;for(const L in oe)if(Object.prototype.hasOwnProperty.call(oe,L)){const W=`${ue}${f}${L}`;B&&!C?fe[L]=this.translate(W,{...s,defaultValue:rv(ie)?ie[L]:void 0,joinArrays:!1,ns:p}):fe[L]=this.translate(W,{...s,joinArrays:!1,ns:p}),fe[L]===W&&(fe[L]=oe[L])}C=fe}}else if(P&&Me(k)&&Array.isArray(C))C=C.join(k),C&&(C=this.extendTranslation(C,a,s,i));else{let de=!1,fe=!1;!this.isValidLookup(C)&&B&&(de=!0,C=ie),this.isValidLookup(C)||(fe=!0,C=h);const L=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&fe?void 0:C,W=B&&ie!==C&&this.options.updateMissing;if(fe||de||W){if(this.logger.log(W?"updateKey":"missingKey",x,m,h,W?ie:C),f){const $=this.resolve(h,{...s,keySeparator:!1});$&&$.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let K=[];const he=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&he&&he[0])for(let $=0;$<he.length;$++)K.push(he[$]);else this.options.saveMissingTo==="all"?K=this.languageUtils.toResolveHierarchy(s.lng||this.language):K.push(s.lng||this.language);const T=($,O,M)=>{const U=B&&M!==C?M:L;this.options.missingKeyHandler?this.options.missingKeyHandler($,m,O,U,W,s):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing($,m,O,U,W,s),this.emit("missingKey",$,m,O,C)};this.options.saveMissing&&(this.options.saveMissingPlurals&&Y?K.forEach($=>{const O=this.pluralResolver.getSuffixes($,s);ee&&s[`defaultValue${this.options.pluralSeparator}zero`]&&O.indexOf(`${this.options.pluralSeparator}zero`)<0&&O.push(`${this.options.pluralSeparator}zero`),O.forEach(M=>{T([$],h+M,s[`defaultValue${M}`]||ie)})}):T(K,h,ie))}C=this.extendTranslation(C,a,s,w,i),fe&&C===h&&this.options.appendNamespaceToMissingKey&&(C=`${m}${g}${h}`),(fe||de)&&this.options.parseMissingKeyHandler&&(C=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${m}${g}${h}`:h,de?C:void 0,s))}return u?(w.res=C,w.usedParams=this.getUsedParamsDetails(s),w):C}extendTranslation(a,l,i,s,u){if(this.i18nFormat?.parse)a=this.i18nFormat.parse(a,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const p=Me(a)&&(i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(p){const x=a.match(this.interpolator.nestingRegexp);m=x&&x.length}let g=i.replace&&!Me(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(g={...this.options.interpolation.defaultVariables,...g}),a=this.interpolator.interpolate(a,g,i.lng||this.language||s.usedLng,i),p){const x=a.match(this.interpolator.nestingRegexp),S=x&&x.length;m<S&&(i.nest=!1)}!i.lng&&s&&s.res&&(i.lng=this.language||s.usedLng),i.nest!==!1&&(a=this.interpolator.nest(a,(...x)=>u?.[0]===x[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${x[0]} in key: ${l[0]}`),null):this.translate(...x,l),i)),i.interpolation&&this.interpolator.reset()}const f=i.postProcess||this.options.postProcess,h=Me(f)?[f]:f;return a!=null&&h?.length&&i.applyPostProcessor!==!1&&(a=Dy.handle(h,a,l,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),a}resolve(a,l={}){let i,s,u,f,h;return Me(a)&&(a=[a]),a.forEach(p=>{if(this.isValidLookup(i))return;const m=this.extractFromKey(p,l),g=m.key;s=g;let x=m.namespaces;this.options.fallbackNS&&(x=x.concat(this.options.fallbackNS));const S=l.count!==void 0&&!Me(l.count),w=S&&!l.ordinal&&l.count===0,C=l.context!==void 0&&(Me(l.context)||typeof l.context=="number")&&l.context!=="",R=l.lngs?l.lngs:this.languageUtils.toResolveHierarchy(l.lng||this.language,l.fallbackLng);x.forEach(j=>{this.isValidLookup(i)||(h=j,!av[`${R[0]}-${j}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(h)&&(av[`${R[0]}-${j}`]=!0,this.logger.warn(`key "${s}" for languages "${R.join(", ")}" won't get resolved as namespace "${h}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),R.forEach(A=>{if(this.isValidLookup(i))return;f=A;const k=[g];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(k,g,A,j,l);else{let Y;S&&(Y=this.pluralResolver.getSuffix(A,l.count,l));const B=`${this.options.pluralSeparator}zero`,N=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(S&&(k.push(g+Y),l.ordinal&&Y.indexOf(N)===0&&k.push(g+Y.replace(N,this.options.pluralSeparator)),w&&k.push(g+B)),C){const X=`${g}${this.options.contextSeparator}${l.context}`;k.push(X),S&&(k.push(X+Y),l.ordinal&&Y.indexOf(N)===0&&k.push(X+Y.replace(N,this.options.pluralSeparator)),w&&k.push(X+B))}}let P;for(;P=k.pop();)this.isValidLookup(i)||(u=P,i=this.getResource(A,j,P,l))}))})}),{res:i,usedKey:s,exactUsedKey:u,usedLng:f,usedNS:h}}isValidLookup(a){return a!==void 0&&!(!this.options.returnNull&&a===null)&&!(!this.options.returnEmptyString&&a==="")}getResource(a,l,i,s={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(a,l,i,s):this.resourceStore.getResource(a,l,i,s)}getUsedParamsDetails(a={}){const l=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=a.replace&&!Me(a.replace);let s=i?a.replace:a;if(i&&typeof a.count<"u"&&(s.count=a.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!i){s={...s};for(const u of l)delete s[u]}return s}static hasDefaultValue(a){const l="defaultValue";for(const i in a)if(Object.prototype.hasOwnProperty.call(a,i)&&l===i.substring(0,l.length)&&a[i]!==void 0)return!0;return!1}}class lv{constructor(a){this.options=a,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Hn.create("languageUtils")}getScriptPartFromCode(a){if(a=ro(a),!a||a.indexOf("-")<0)return null;const l=a.split("-");return l.length===2||(l.pop(),l[l.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(l.join("-"))}getLanguagePartFromCode(a){if(a=ro(a),!a||a.indexOf("-")<0)return a;const l=a.split("-");return this.formatLanguageCode(l[0])}formatLanguageCode(a){if(Me(a)&&a.indexOf("-")>-1){let l;try{l=Intl.getCanonicalLocales(a)[0]}catch{}return l&&this.options.lowerCaseLng&&(l=l.toLowerCase()),l||(this.options.lowerCaseLng?a.toLowerCase():a)}return this.options.cleanCode||this.options.lowerCaseLng?a.toLowerCase():a}isSupportedCode(a){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(a=this.getLanguagePartFromCode(a)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(a)>-1}getBestMatchFromCodes(a){if(!a)return null;let l;return a.forEach(i=>{if(l)return;const s=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(s))&&(l=s)}),!l&&this.options.supportedLngs&&a.forEach(i=>{if(l)return;const s=this.getScriptPartFromCode(i);if(this.isSupportedCode(s))return l=s;const u=this.getLanguagePartFromCode(i);if(this.isSupportedCode(u))return l=u;l=this.options.supportedLngs.find(f=>{if(f===u)return f;if(!(f.indexOf("-")<0&&u.indexOf("-")<0)&&(f.indexOf("-")>0&&u.indexOf("-")<0&&f.substring(0,f.indexOf("-"))===u||f.indexOf(u)===0&&u.length>1))return f})}),l||(l=this.getFallbackCodes(this.options.fallbackLng)[0]),l}getFallbackCodes(a,l){if(!a)return[];if(typeof a=="function"&&(a=a(l)),Me(a)&&(a=[a]),Array.isArray(a))return a;if(!l)return a.default||[];let i=a[l];return i||(i=a[this.getScriptPartFromCode(l)]),i||(i=a[this.formatLanguageCode(l)]),i||(i=a[this.getLanguagePartFromCode(l)]),i||(i=a.default),i||[]}toResolveHierarchy(a,l){const i=this.getFallbackCodes((l===!1?[]:l)||this.options.fallbackLng||[],a),s=[],u=f=>{f&&(this.isSupportedCode(f)?s.push(f):this.logger.warn(`rejecting language code not found in supportedLngs: ${f}`))};return Me(a)&&(a.indexOf("-")>-1||a.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&u(this.formatLanguageCode(a)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&u(this.getScriptPartFromCode(a)),this.options.load!=="currentOnly"&&u(this.getLanguagePartFromCode(a))):Me(a)&&u(this.formatLanguageCode(a)),i.forEach(f=>{s.indexOf(f)<0&&u(this.formatLanguageCode(f))}),s}}const iv={zero:0,one:1,two:2,few:3,many:4,other:5},ov={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class VS{constructor(a,l={}){this.languageUtils=a,this.options=l,this.logger=Hn.create("pluralResolver"),this.pluralRulesCache={}}addRule(a,l){this.rules[a]=l}clearCache(){this.pluralRulesCache={}}getRule(a,l={}){const i=ro(a==="dev"?"en":a),s=l.ordinal?"ordinal":"cardinal",u=JSON.stringify({cleanedCode:i,type:s});if(u in this.pluralRulesCache)return this.pluralRulesCache[u];let f;try{f=new Intl.PluralRules(i,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),ov;if(!a.match(/-|_/))return ov;const p=this.languageUtils.getLanguagePartFromCode(a);f=this.getRule(p,l)}return this.pluralRulesCache[u]=f,f}needsPlural(a,l={}){let i=this.getRule(a,l);return i||(i=this.getRule("dev",l)),i?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(a,l,i={}){return this.getSuffixes(a,i).map(s=>`${l}${s}`)}getSuffixes(a,l={}){let i=this.getRule(a,l);return i||(i=this.getRule("dev",l)),i?i.resolvedOptions().pluralCategories.sort((s,u)=>iv[s]-iv[u]).map(s=>`${this.options.prepend}${l.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(a,l,i={}){const s=this.getRule(a,i);return s?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${s.select(l)}`:(this.logger.warn(`no plural rule found for: ${a}`),this.getSuffix("dev",l,i))}}const sv=(n,a,l,i=".",s=!0)=>{let u=LS(n,a,l);return!u&&s&&Me(l)&&(u=gd(n,l,i),u===void 0&&(u=gd(a,l,i))),u},Vf=n=>n.replace(/\$/g,"$$$$");class YS{constructor(a={}){this.logger=Hn.create("interpolator"),this.options=a,this.format=a?.interpolation?.format||(l=>l),this.init(a)}init(a={}){a.interpolation||(a.interpolation={escapeValue:!0});const{escape:l,escapeValue:i,useRawValueToEscape:s,prefix:u,prefixEscaped:f,suffix:h,suffixEscaped:p,formatSeparator:m,unescapeSuffix:g,unescapePrefix:x,nestingPrefix:S,nestingPrefixEscaped:w,nestingSuffix:C,nestingSuffixEscaped:R,nestingOptionsSeparator:j,maxReplaces:A,alwaysFormat:k}=a.interpolation;this.escape=l!==void 0?l:kS,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=u?wl(u):f||"{{",this.suffix=h?wl(h):p||"}}",this.formatSeparator=m||",",this.unescapePrefix=g?"":x||"-",this.unescapeSuffix=this.unescapePrefix?"":g||"",this.nestingPrefix=S?wl(S):w||wl("$t("),this.nestingSuffix=C?wl(C):R||wl(")"),this.nestingOptionsSeparator=j||",",this.maxReplaces=A||1e3,this.alwaysFormat=k!==void 0?k:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const a=(l,i)=>l?.source===i?(l.lastIndex=0,l):new RegExp(i,"g");this.regexp=a(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=a(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=a(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(a,l,i,s){let u,f,h;const p=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},m=w=>{if(w.indexOf(this.formatSeparator)<0){const A=sv(l,p,w,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(A,void 0,i,{...s,...l,interpolationkey:w}):A}const C=w.split(this.formatSeparator),R=C.shift().trim(),j=C.join(this.formatSeparator).trim();return this.format(sv(l,p,R,this.options.keySeparator,this.options.ignoreJSONStructure),j,i,{...s,...l,interpolationkey:R})};this.resetRegExp();const g=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,x=s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:w=>Vf(w)},{regex:this.regexp,safeValue:w=>this.escapeValue?Vf(this.escape(w)):Vf(w)}].forEach(w=>{for(h=0;u=w.regex.exec(a);){const C=u[1].trim();if(f=m(C),f===void 0)if(typeof g=="function"){const j=g(a,u,s);f=Me(j)?j:""}else if(s&&Object.prototype.hasOwnProperty.call(s,C))f="";else if(x){f=u[0];continue}else this.logger.warn(`missed to pass in variable ${C} for interpolating ${a}`),f="";else!Me(f)&&!this.useRawValueToEscape&&(f=Ig(f));const R=w.safeValue(f);if(a=a.replace(u[0],R),x?(w.regex.lastIndex+=f.length,w.regex.lastIndex-=u[0].length):w.regex.lastIndex=0,h++,h>=this.maxReplaces)break}}),a}nest(a,l,i={}){let s,u,f;const h=(p,m)=>{const g=this.nestingOptionsSeparator;if(p.indexOf(g)<0)return p;const x=p.split(new RegExp(`${g}[ ]*{`));let S=`{${x[1]}`;p=x[0],S=this.interpolate(S,f);const w=S.match(/'/g),C=S.match(/"/g);((w?.length??0)%2===0&&!C||C.length%2!==0)&&(S=S.replace(/'/g,'"'));try{f=JSON.parse(S),m&&(f={...m,...f})}catch(R){return this.logger.warn(`failed parsing options string in nesting for key ${p}`,R),`${p}${g}${S}`}return f.defaultValue&&f.defaultValue.indexOf(this.prefix)>-1&&delete f.defaultValue,p};for(;s=this.nestingRegexp.exec(a);){let p=[];f={...i},f=f.replace&&!Me(f.replace)?f.replace:f,f.applyPostProcessor=!1,delete f.defaultValue;const m=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(m!==-1&&(p=s[1].slice(m).split(this.formatSeparator).map(g=>g.trim()).filter(Boolean),s[1]=s[1].slice(0,m)),u=l(h.call(this,s[1].trim(),f),f),u&&s[0]===a&&!Me(u))return u;Me(u)||(u=Ig(u)),u||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${a}`),u=""),p.length&&(u=p.reduce((g,x)=>this.format(g,x,i.lng,{...i,interpolationkey:s[1].trim()}),u.trim())),a=a.replace(s[0],u),this.regexp.lastIndex=0}return a}}const qS=n=>{let a=n.toLowerCase().trim();const l={};if(n.indexOf("(")>-1){const i=n.split("(");a=i[0].toLowerCase().trim();const s=i[1].substring(0,i[1].length-1);a==="currency"&&s.indexOf(":")<0?l.currency||(l.currency=s.trim()):a==="relativetime"&&s.indexOf(":")<0?l.range||(l.range=s.trim()):s.split(";").forEach(f=>{if(f){const[h,...p]=f.split(":"),m=p.join(":").trim().replace(/^'+|'+$/g,""),g=h.trim();l[g]||(l[g]=m),m==="false"&&(l[g]=!1),m==="true"&&(l[g]=!0),isNaN(m)||(l[g]=parseInt(m,10))}})}return{formatName:a,formatOptions:l}},uv=n=>{const a={};return(l,i,s)=>{let u=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(u={...u,[s.interpolationkey]:void 0});const f=i+JSON.stringify(u);let h=a[f];return h||(h=n(ro(i),s),a[f]=h),h(l)}},GS=n=>(a,l,i)=>n(ro(l),i)(a);class KS{constructor(a={}){this.logger=Hn.create("formatter"),this.options=a,this.init(a)}init(a,l={interpolation:{}}){this.formatSeparator=l.interpolation.formatSeparator||",";const i=l.cacheInBuiltFormats?uv:GS;this.formats={number:i((s,u)=>{const f=new Intl.NumberFormat(s,{...u});return h=>f.format(h)}),currency:i((s,u)=>{const f=new Intl.NumberFormat(s,{...u,style:"currency"});return h=>f.format(h)}),datetime:i((s,u)=>{const f=new Intl.DateTimeFormat(s,{...u});return h=>f.format(h)}),relativetime:i((s,u)=>{const f=new Intl.RelativeTimeFormat(s,{...u});return h=>f.format(h,u.range||"day")}),list:i((s,u)=>{const f=new Intl.ListFormat(s,{...u});return h=>f.format(h)})}}add(a,l){this.formats[a.toLowerCase().trim()]=l}addCached(a,l){this.formats[a.toLowerCase().trim()]=uv(l)}format(a,l,i,s={}){const u=l.split(this.formatSeparator);if(u.length>1&&u[0].indexOf("(")>1&&u[0].indexOf(")")<0&&u.find(h=>h.indexOf(")")>-1)){const h=u.findIndex(p=>p.indexOf(")")>-1);u[0]=[u[0],...u.splice(1,h)].join(this.formatSeparator)}return u.reduce((h,p)=>{const{formatName:m,formatOptions:g}=qS(p);if(this.formats[m]){let x=h;try{const S=s?.formatParams?.[s.interpolationkey]||{},w=S.locale||S.lng||s.locale||s.lng||i;x=this.formats[m](h,w,{...g,...s,...S})}catch(S){this.logger.warn(S)}return x}else this.logger.warn(`there was no format function for ${m}`);return h},a)}}const FS=(n,a)=>{n.pending[a]!==void 0&&(delete n.pending[a],n.pendingCount--)};class XS extends pu{constructor(a,l,i,s={}){super(),this.backend=a,this.store=l,this.services=i,this.languageUtils=i.languageUtils,this.options=s,this.logger=Hn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(i,s.backend,s)}queueLoad(a,l,i,s){const u={},f={},h={},p={};return a.forEach(m=>{let g=!0;l.forEach(x=>{const S=`${m}|${x}`;!i.reload&&this.store.hasResourceBundle(m,x)?this.state[S]=2:this.state[S]<0||(this.state[S]===1?f[S]===void 0&&(f[S]=!0):(this.state[S]=1,g=!1,f[S]===void 0&&(f[S]=!0),u[S]===void 0&&(u[S]=!0),p[x]===void 0&&(p[x]=!0)))}),g||(h[m]=!0)}),(Object.keys(u).length||Object.keys(f).length)&&this.queue.push({pending:f,pendingCount:Object.keys(f).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(u),pending:Object.keys(f),toLoadLanguages:Object.keys(h),toLoadNamespaces:Object.keys(p)}}loaded(a,l,i){const s=a.split("|"),u=s[0],f=s[1];l&&this.emit("failedLoading",u,f,l),!l&&i&&this.store.addResourceBundle(u,f,i,void 0,void 0,{skipCopy:!0}),this.state[a]=l?-1:2,l&&i&&(this.state[a]=0);const h={};this.queue.forEach(p=>{DS(p.loaded,[u],f),FS(p,a),l&&p.errors.push(l),p.pendingCount===0&&!p.done&&(Object.keys(p.loaded).forEach(m=>{h[m]||(h[m]={});const g=p.loaded[m];g.length&&g.forEach(x=>{h[m][x]===void 0&&(h[m][x]=!0)})}),p.done=!0,p.errors.length?p.callback(p.errors):p.callback())}),this.emit("loaded",h),this.queue=this.queue.filter(p=>!p.done)}read(a,l,i,s=0,u=this.retryTimeout,f){if(!a.length)return f(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:a,ns:l,fcName:i,tried:s,wait:u,callback:f});return}this.readingCalls++;const h=(m,g)=>{if(this.readingCalls--,this.waitingReads.length>0){const x=this.waitingReads.shift();this.read(x.lng,x.ns,x.fcName,x.tried,x.wait,x.callback)}if(m&&g&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,a,l,i,s+1,u*2,f)},u);return}f(m,g)},p=this.backend[i].bind(this.backend);if(p.length===2){try{const m=p(a,l);m&&typeof m.then=="function"?m.then(g=>h(null,g)).catch(h):h(null,m)}catch(m){h(m)}return}return p(a,l,h)}prepareLoading(a,l,i={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();Me(a)&&(a=this.languageUtils.toResolveHierarchy(a)),Me(l)&&(l=[l]);const u=this.queueLoad(a,l,i,s);if(!u.toLoad.length)return u.pending.length||s(),null;u.toLoad.forEach(f=>{this.loadOne(f)})}load(a,l,i){this.prepareLoading(a,l,{},i)}reload(a,l,i){this.prepareLoading(a,l,{reload:!0},i)}loadOne(a,l=""){const i=a.split("|"),s=i[0],u=i[1];this.read(s,u,"read",void 0,void 0,(f,h)=>{f&&this.logger.warn(`${l}loading namespace ${u} for language ${s} failed`,f),!f&&h&&this.logger.log(`${l}loaded namespace ${u} for language ${s}`,h),this.loaded(a,f,h)})}saveMissing(a,l,i,s,u,f={},h=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(l)){this.logger.warn(`did not save key "${i}" as the namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if(this.backend?.create){const p={...f,isUpdate:u},m=this.backend.create.bind(this.backend);if(m.length<6)try{let g;m.length===5?g=m(a,l,i,s,p):g=m(a,l,i,s),g&&typeof g.then=="function"?g.then(x=>h(null,x)).catch(h):h(null,g)}catch(g){h(g)}else m(a,l,i,s,h,p)}!a||!a[0]||this.store.addResource(a[0],l,i,s)}}}const cv=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let a={};if(typeof n[1]=="object"&&(a=n[1]),Me(n[1])&&(a.defaultValue=n[1]),Me(n[2])&&(a.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const l=n[3]||n[2];Object.keys(l).forEach(i=>{a[i]=l[i]})}return a},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),fv=n=>(Me(n.ns)&&(n.ns=[n.ns]),Me(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),Me(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs?.indexOf?.("cimode")<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n),Us=()=>{},QS=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(l=>{typeof n[l]=="function"&&(n[l]=n[l].bind(n))})};class lo extends pu{constructor(a={},l){if(super(),this.options=fv(a),this.services={},this.logger=Hn,this.modules={external:[]},QS(this),l&&!this.isInitialized&&!a.isClone){if(!this.options.initAsync)return this.init(a,l),this;setTimeout(()=>{this.init(a,l)},0)}}init(a={},l){this.isInitializing=!0,typeof a=="function"&&(l=a,a={}),a.defaultNS==null&&a.ns&&(Me(a.ns)?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));const i=cv();this.options={...i,...this.options,...fv(a)},this.options.interpolation={...i.interpolation,...this.options.interpolation},a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator);const s=m=>m?typeof m=="function"?new m:m:null;if(!this.options.isClone){this.modules.logger?Hn.init(s(this.modules.logger),this.options):Hn.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:m=KS;const g=new lv(this.options);this.store=new nv(this.options.resources,this.options);const x=this.services;x.logger=Hn,x.resourceStore=this.store,x.languageUtils=g,x.pluralResolver=new VS(g,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format&&this.logger.warn("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),m&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(x.formatter=s(m),x.formatter.init&&x.formatter.init(x,this.options),this.options.interpolation.format=x.formatter.format.bind(x.formatter)),x.interpolator=new YS(this.options),x.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},x.backendConnector=new XS(s(this.modules.backend),x.resourceStore,x,this.options),x.backendConnector.on("*",(w,...C)=>{this.emit(w,...C)}),this.modules.languageDetector&&(x.languageDetector=s(this.modules.languageDetector),x.languageDetector.init&&x.languageDetector.init(x,this.options.detection,this.options)),this.modules.i18nFormat&&(x.i18nFormat=s(this.modules.i18nFormat),x.i18nFormat.init&&x.i18nFormat.init(this)),this.translator=new lu(this.services,this.options),this.translator.on("*",(w,...C)=>{this.emit(w,...C)}),this.modules.external.forEach(w=>{w.init&&w.init(this)})}if(this.format=this.options.interpolation.format,l||(l=Us),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(m=>{this[m]=(...g)=>this.store[m](...g)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=(...g)=>(this.store[m](...g),this)});const h=Fi(),p=()=>{const m=(g,x)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),h.resolve(x),l(g,x)};if(this.languages&&!this.isInitialized)return m(null,this.t.bind(this));this.changeLanguage(this.options.lng,m)};return this.options.resources||!this.options.initAsync?p():setTimeout(p,0),h}loadResources(a,l=Us){let i=l;const s=Me(a)?a:this.language;if(typeof a=="function"&&(i=a),!this.options.resources||this.options.partialBundledLanguages){if(s?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const u=[],f=h=>{if(!h||h==="cimode")return;this.services.languageUtils.toResolveHierarchy(h).forEach(m=>{m!=="cimode"&&u.indexOf(m)<0&&u.push(m)})};s?f(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(p=>f(p)),this.options.preload?.forEach?.(h=>f(h)),this.services.backendConnector.load(u,this.options.ns,h=>{!h&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(h)})}else i(null)}reloadResources(a,l,i){const s=Fi();return typeof a=="function"&&(i=a,a=void 0),typeof l=="function"&&(i=l,l=void 0),a||(a=this.languages),l||(l=this.options.ns),i||(i=Us),this.services.backendConnector.reload(a,l,u=>{s.resolve(),i(u)}),s}use(a){if(!a)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!a.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return a.type==="backend"&&(this.modules.backend=a),(a.type==="logger"||a.log&&a.warn&&a.error)&&(this.modules.logger=a),a.type==="languageDetector"&&(this.modules.languageDetector=a),a.type==="i18nFormat"&&(this.modules.i18nFormat=a),a.type==="postProcessor"&&Dy.addPostProcessor(a),a.type==="formatter"&&(this.modules.formatter=a),a.type==="3rdParty"&&this.modules.external.push(a),this}setResolvedLanguage(a){if(!(!a||!this.languages)&&!(["cimode","dev"].indexOf(a)>-1)){for(let l=0;l<this.languages.length;l++){const i=this.languages[l];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(a)<0&&this.store.hasLanguageSomeTranslations(a)&&(this.resolvedLanguage=a,this.languages.unshift(a))}}changeLanguage(a,l){this.isLanguageChangingTo=a;const i=Fi();this.emit("languageChanging",a);const s=h=>{this.language=h,this.languages=this.services.languageUtils.toResolveHierarchy(h),this.resolvedLanguage=void 0,this.setResolvedLanguage(h)},u=(h,p)=>{p?this.isLanguageChangingTo===a&&(s(p),this.translator.changeLanguage(p),this.isLanguageChangingTo=void 0,this.emit("languageChanged",p),this.logger.log("languageChanged",p)):this.isLanguageChangingTo=void 0,i.resolve((...m)=>this.t(...m)),l&&l(h,(...m)=>this.t(...m))},f=h=>{!a&&!h&&this.services.languageDetector&&(h=[]);const p=Me(h)?h:h&&h[0],m=this.store.hasLanguageSomeTranslations(p)?p:this.services.languageUtils.getBestMatchFromCodes(Me(h)?[h]:h);m&&(this.language||s(m),this.translator.language||this.translator.changeLanguage(m),this.services.languageDetector?.cacheUserLanguage?.(m)),this.loadResources(m,g=>{u(g,m)})};return!a&&this.services.languageDetector&&!this.services.languageDetector.async?f(this.services.languageDetector.detect()):!a&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(f):this.services.languageDetector.detect(f):f(a),i}getFixedT(a,l,i){const s=(u,f,...h)=>{let p;typeof f!="object"?p=this.options.overloadTranslationOptionHandler([u,f].concat(h)):p={...f},p.lng=p.lng||s.lng,p.lngs=p.lngs||s.lngs,p.ns=p.ns||s.ns,p.keyPrefix!==""&&(p.keyPrefix=p.keyPrefix||i||s.keyPrefix);const m=this.options.keySeparator||".";let g;return p.keyPrefix&&Array.isArray(u)?g=u.map(x=>`${p.keyPrefix}${m}${x}`):g=p.keyPrefix?`${p.keyPrefix}${m}${u}`:u,this.t(g,p)};return Me(a)?s.lng=a:s.lngs=a,s.ns=l,s.keyPrefix=i,s}t(...a){return this.translator?.translate(...a)}exists(...a){return this.translator?.exists(...a)}setDefaultNamespace(a){this.options.defaultNS=a}hasLoadedNamespace(a,l={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=l.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const f=(h,p)=>{const m=this.services.backendConnector.state[`${h}|${p}`];return m===-1||m===0||m===2};if(l.precheck){const h=l.precheck(this,f);if(h!==void 0)return h}return!!(this.hasResourceBundle(i,a)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||f(i,a)&&(!s||f(u,a)))}loadNamespaces(a,l){const i=Fi();return this.options.ns?(Me(a)&&(a=[a]),a.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{i.resolve(),l&&l(s)}),i):(l&&l(),Promise.resolve())}loadLanguages(a,l){const i=Fi();Me(a)&&(a=[a]);const s=this.options.preload||[],u=a.filter(f=>s.indexOf(f)<0&&this.services.languageUtils.isSupportedCode(f));return u.length?(this.options.preload=s.concat(u),this.loadResources(f=>{i.resolve(),l&&l(f)}),i):(l&&l(),Promise.resolve())}dir(a){if(a||(a=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!a)return"rtl";try{const s=new Intl.Locale(a);if(s&&s.getTextInfo){const u=s.getTextInfo();if(u&&u.direction)return u.direction}}catch{}const l=["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"],i=this.services?.languageUtils||new lv(cv());return a.toLowerCase().indexOf("-latn")>1?"ltr":l.indexOf(i.getLanguagePartFromCode(a))>-1||a.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(a={},l){return new lo(a,l)}cloneInstance(a={},l=Us){const i=a.forkResourceStore;i&&delete a.forkResourceStore;const s={...this.options,...a,isClone:!0},u=new lo(s);if((a.debug!==void 0||a.prefix!==void 0)&&(u.logger=u.logger.clone(a)),["store","services","language"].forEach(h=>{u[h]=this[h]}),u.services={...this.services},u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},i){const h=Object.keys(this.store.data).reduce((p,m)=>(p[m]={...this.store.data[m]},p[m]=Object.keys(p[m]).reduce((g,x)=>(g[x]={...p[m][x]},g),p[m]),p),{});u.store=new nv(h,s),u.services.resourceStore=u.store}return u.translator=new lu(u.services,s),u.translator.on("*",(h,...p)=>{u.emit(h,...p)}),u.init(s,l),u.translator.options=s,u.translator.backendConnector.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Dt=lo.createInstance();Dt.createInstance=lo.createInstance;Dt.createInstance;Dt.dir;Dt.init;Dt.loadResources;Dt.reloadResources;Dt.use;Dt.changeLanguage;Dt.getFixedT;Dt.t;Dt.exists;Dt.setDefaultNamespace;Dt.hasLoadedNamespace;Dt.loadNamespaces;Dt.loadLanguages;var Yf={exports:{}},De={};/**
15
+ */var Zg;function TS(){if(Zg)return Ki;Zg=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function l(i,s,u){var f=null;if(u!==void 0&&(f=""+u),s.key!==void 0&&(f=""+s.key),"key"in s){u={};for(var h in s)h!=="key"&&(u[h]=s[h])}else u=s;return s=u.ref,{$$typeof:n,type:i,key:f,ref:s!==void 0?s:null,props:u}}return Ki.Fragment=a,Ki.jsx=l,Ki.jsxs=l,Ki}var Jg;function jS(){return Jg||(Jg=1,$f.exports=TS()),$f.exports}var y=jS();const De=n=>typeof n=="string",Fi=()=>{let n,a;const l=new Promise((i,s)=>{n=i,a=s});return l.resolve=n,l.reject=a,l},Ig=n=>n==null?"":""+n,MS=(n,a,l)=>{n.forEach(i=>{a[i]&&(l[i]=a[i])})},_S=/###/g,Wg=n=>n&&n.indexOf("###")>-1?n.replace(_S,"."):n,ev=n=>!n||De(n),no=(n,a,l)=>{const i=De(a)?a.split("."):a;let s=0;for(;s<i.length-1;){if(ev(n))return{};const u=Wg(i[s]);!n[u]&&l&&(n[u]=new l),Object.prototype.hasOwnProperty.call(n,u)?n=n[u]:n={},++s}return ev(n)?{}:{obj:n,k:Wg(i[s])}},tv=(n,a,l)=>{const{obj:i,k:s}=no(n,a,Object);if(i!==void 0||a.length===1){i[s]=l;return}let u=a[a.length-1],f=a.slice(0,a.length-1),h=no(n,f,Object);for(;h.obj===void 0&&f.length;)u=`${f[f.length-1]}.${u}`,f=f.slice(0,f.length-1),h=no(n,f,Object),h?.obj&&typeof h.obj[`${h.k}.${u}`]<"u"&&(h.obj=void 0);h.obj[`${h.k}.${u}`]=l},DS=(n,a,l,i)=>{const{obj:s,k:u}=no(n,a,Object);s[u]=s[u]||[],s[u].push(l)},au=(n,a)=>{const{obj:l,k:i}=no(n,a);if(l&&Object.prototype.hasOwnProperty.call(l,i))return l[i]},LS=(n,a,l)=>{const i=au(n,l);return i!==void 0?i:au(a,l)},_y=(n,a,l)=>{for(const i in a)i!=="__proto__"&&i!=="constructor"&&(i in n?De(n[i])||n[i]instanceof String||De(a[i])||a[i]instanceof String?l&&(n[i]=a[i]):_y(n[i],a[i],l):n[i]=a[i]);return n},wl=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var zS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const kS=n=>De(n)?n.replace(/[&<>"'\/]/g,a=>zS[a]):n;class US{constructor(a){this.capacity=a,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(a){const l=this.regExpMap.get(a);if(l!==void 0)return l;const i=new RegExp(a);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(a,i),this.regExpQueue.push(a),i}}const PS=[" ",",","?","!",";"],HS=new US(20),BS=(n,a,l)=>{a=a||"",l=l||"";const i=PS.filter(f=>a.indexOf(f)<0&&l.indexOf(f)<0);if(i.length===0)return!0;const s=HS.getRegExp(`(${i.map(f=>f==="?"?"\\?":f).join("|")})`);let u=!s.test(n);if(!u){const f=n.indexOf(l);f>0&&!s.test(n.substring(0,f))&&(u=!0)}return u},gd=(n,a,l=".")=>{if(!n)return;if(n[a])return Object.prototype.hasOwnProperty.call(n,a)?n[a]:void 0;const i=a.split(l);let s=n;for(let u=0;u<i.length;){if(!s||typeof s!="object")return;let f,h="";for(let p=u;p<i.length;++p)if(p!==u&&(h+=l),h+=i[p],f=s[h],f!==void 0){if(["string","number","boolean"].indexOf(typeof f)>-1&&p<i.length-1)continue;u+=p-u+1;break}s=f}return s},ro=n=>n?.replace("_","-"),$S={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,a){console?.[n]?.apply?.(console,a)}};class ru{constructor(a,l={}){this.init(a,l)}init(a,l={}){this.prefix=l.prefix||"i18next:",this.logger=a||$S,this.options=l,this.debug=l.debug}log(...a){return this.forward(a,"log","",!0)}warn(...a){return this.forward(a,"warn","",!0)}error(...a){return this.forward(a,"error","")}deprecate(...a){return this.forward(a,"warn","WARNING DEPRECATED: ",!0)}forward(a,l,i,s){return s&&!this.debug?null:(De(a[0])&&(a[0]=`${i}${this.prefix} ${a[0]}`),this.logger[l](a))}create(a){return new ru(this.logger,{prefix:`${this.prefix}:${a}:`,...this.options})}clone(a){return a=a||this.options,a.prefix=a.prefix||this.prefix,new ru(this.logger,a)}}var Hn=new ru;class pu{constructor(){this.observers={}}on(a,l){return a.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const s=this.observers[i].get(l)||0;this.observers[i].set(l,s+1)}),this}off(a,l){if(this.observers[a]){if(!l){delete this.observers[a];return}this.observers[a].delete(l)}}emit(a,...l){this.observers[a]&&Array.from(this.observers[a].entries()).forEach(([s,u])=>{for(let f=0;f<u;f++)s(...l)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,u])=>{for(let f=0;f<u;f++)s.apply(s,[a,...l])})}}class nv extends pu{constructor(a,l={ns:["translation"],defaultNS:"translation"}){super(),this.data=a||{},this.options=l,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(a){this.options.ns.indexOf(a)<0&&this.options.ns.push(a)}removeNamespaces(a){const l=this.options.ns.indexOf(a);l>-1&&this.options.ns.splice(l,1)}getResource(a,l,i,s={}){const u=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,f=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let h;a.indexOf(".")>-1?h=a.split("."):(h=[a,l],i&&(Array.isArray(i)?h.push(...i):De(i)&&u?h.push(...i.split(u)):h.push(i)));const p=au(this.data,h);return!p&&!l&&!i&&a.indexOf(".")>-1&&(a=h[0],l=h[1],i=h.slice(2).join(".")),p||!f||!De(i)?p:gd(this.data?.[a]?.[l],i,u)}addResource(a,l,i,s,u={silent:!1}){const f=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator;let h=[a,l];i&&(h=h.concat(f?i.split(f):i)),a.indexOf(".")>-1&&(h=a.split("."),s=l,l=h[1]),this.addNamespaces(l),tv(this.data,h,s),u.silent||this.emit("added",a,l,i,s)}addResources(a,l,i,s={silent:!1}){for(const u in i)(De(i[u])||Array.isArray(i[u]))&&this.addResource(a,l,u,i[u],{silent:!0});s.silent||this.emit("added",a,l,i)}addResourceBundle(a,l,i,s,u,f={silent:!1,skipCopy:!1}){let h=[a,l];a.indexOf(".")>-1&&(h=a.split("."),s=i,i=l,l=h[1]),this.addNamespaces(l);let p=au(this.data,h)||{};f.skipCopy||(i=JSON.parse(JSON.stringify(i))),s?_y(p,i,u):p={...p,...i},tv(this.data,h,p),f.silent||this.emit("added",a,l,i)}removeResourceBundle(a,l){this.hasResourceBundle(a,l)&&delete this.data[a][l],this.removeNamespaces(l),this.emit("removed",a,l)}hasResourceBundle(a,l){return this.getResource(a,l)!==void 0}getResourceBundle(a,l){return l||(l=this.options.defaultNS),this.getResource(a,l)}getDataByLanguage(a){return this.data[a]}hasLanguageSomeTranslations(a){const l=this.getDataByLanguage(a);return!!(l&&Object.keys(l)||[]).find(s=>l[s]&&Object.keys(l[s]).length>0)}toJSON(){return this.data}}var Dy={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,a,l,i,s){return n.forEach(u=>{a=this.processors[u]?.process(a,l,i,s)??a}),a}};const av={},rv=n=>!De(n)&&typeof n!="boolean"&&typeof n!="number";class lu extends pu{constructor(a,l={}){super(),MS(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],a,this),this.options=l,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Hn.create("translator")}changeLanguage(a){a&&(this.language=a)}exists(a,l={interpolation:{}}){const i={...l};return a==null?!1:this.resolve(a,i)?.res!==void 0}extractFromKey(a,l){let i=l.nsSeparator!==void 0?l.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const s=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator;let u=l.ns||this.options.defaultNS||[];const f=i&&a.indexOf(i)>-1,h=!this.options.userDefinedKeySeparator&&!l.keySeparator&&!this.options.userDefinedNsSeparator&&!l.nsSeparator&&!BS(a,i,s);if(f&&!h){const p=a.match(this.interpolator.nestingRegexp);if(p&&p.length>0)return{key:a,namespaces:De(u)?[u]:u};const m=a.split(i);(i!==s||i===s&&this.options.ns.indexOf(m[0])>-1)&&(u=m.shift()),a=m.join(s)}return{key:a,namespaces:De(u)?[u]:u}}translate(a,l,i){let s=typeof l=="object"?{...l}:l;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(s={...s}),s||(s={}),a==null)return"";Array.isArray(a)||(a=[String(a)]);const u=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,f=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:h,namespaces:p}=this.extractFromKey(a[a.length-1],s),m=p[p.length-1];let g=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;g===void 0&&(g=":");const x=s.lng||this.language,S=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(x?.toLowerCase()==="cimode")return S?u?{res:`${m}${g}${h}`,usedKey:h,exactUsedKey:h,usedLng:x,usedNS:m,usedParams:this.getUsedParamsDetails(s)}:`${m}${g}${h}`:u?{res:h,usedKey:h,exactUsedKey:h,usedLng:x,usedNS:m,usedParams:this.getUsedParamsDetails(s)}:h;const w=this.resolve(a,s);let C=w?.res;const R=w?.usedKey||h,T=w?.exactUsedKey||h,O=["[object Number]","[object Function]","[object RegExp]"],z=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,U=!this.i18nFormat||this.i18nFormat.handleAsObject,$=s.count!==void 0&&!De(s.count),P=lu.hasDefaultValue(s),A=$?this.pluralResolver.getSuffix(x,s.count,s):"",X=s.ordinal&&$?this.pluralResolver.getSuffix(x,s.count,{ordinal:!1}):"",ne=$&&!s.ordinal&&s.count===0,oe=ne&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${A}`]||s[`defaultValue${X}`]||s.defaultValue;let se=C;U&&!C&&P&&(se=oe);const Ne=rv(se),we=Object.prototype.toString.apply(se);if(U&&se&&Ne&&O.indexOf(we)<0&&!(De(z)&&Array.isArray(se))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const he=this.options.returnedObjectHandler?this.options.returnedObjectHandler(R,se,{...s,ns:p}):`key '${h} (${this.language})' returned an object instead of string.`;return u?(w.res=he,w.usedParams=this.getUsedParamsDetails(s),w):he}if(f){const he=Array.isArray(se),de=he?[]:{},ce=he?T:R;for(const _ in se)if(Object.prototype.hasOwnProperty.call(se,_)){const ee=`${ce}${f}${_}`;P&&!C?de[_]=this.translate(ee,{...s,defaultValue:rv(oe)?oe[_]:void 0,joinArrays:!1,ns:p}):de[_]=this.translate(ee,{...s,joinArrays:!1,ns:p}),de[_]===ee&&(de[_]=se[_])}C=de}}else if(U&&De(z)&&Array.isArray(C))C=C.join(z),C&&(C=this.extendTranslation(C,a,s,i));else{let he=!1,de=!1;!this.isValidLookup(C)&&P&&(he=!0,C=oe),this.isValidLookup(C)||(de=!0,C=h);const _=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&de?void 0:C,ee=P&&oe!==C&&this.options.updateMissing;if(de||he||ee){if(this.logger.log(ee?"updateKey":"missingKey",x,m,h,ee?oe:C),f){const K=this.resolve(h,{...s,keySeparator:!1});K&&K.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let q=[];const pe=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&pe&&pe[0])for(let K=0;K<pe.length;K++)q.push(pe[K]);else this.options.saveMissingTo==="all"?q=this.languageUtils.toResolveHierarchy(s.lng||this.language):q.push(s.lng||this.language);const N=(K,L,F)=>{const W=P&&F!==C?F:_;this.options.missingKeyHandler?this.options.missingKeyHandler(K,m,L,W,ee,s):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(K,m,L,W,ee,s),this.emit("missingKey",K,m,L,C)};this.options.saveMissing&&(this.options.saveMissingPlurals&&$?q.forEach(K=>{const L=this.pluralResolver.getSuffixes(K,s);ne&&s[`defaultValue${this.options.pluralSeparator}zero`]&&L.indexOf(`${this.options.pluralSeparator}zero`)<0&&L.push(`${this.options.pluralSeparator}zero`),L.forEach(F=>{N([K],h+F,s[`defaultValue${F}`]||oe)})}):N(q,h,oe))}C=this.extendTranslation(C,a,s,w,i),de&&C===h&&this.options.appendNamespaceToMissingKey&&(C=`${m}${g}${h}`),(de||he)&&this.options.parseMissingKeyHandler&&(C=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${m}${g}${h}`:h,he?C:void 0,s))}return u?(w.res=C,w.usedParams=this.getUsedParamsDetails(s),w):C}extendTranslation(a,l,i,s,u){if(this.i18nFormat?.parse)a=this.i18nFormat.parse(a,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const p=De(a)&&(i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(p){const x=a.match(this.interpolator.nestingRegexp);m=x&&x.length}let g=i.replace&&!De(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(g={...this.options.interpolation.defaultVariables,...g}),a=this.interpolator.interpolate(a,g,i.lng||this.language||s.usedLng,i),p){const x=a.match(this.interpolator.nestingRegexp),S=x&&x.length;m<S&&(i.nest=!1)}!i.lng&&s&&s.res&&(i.lng=this.language||s.usedLng),i.nest!==!1&&(a=this.interpolator.nest(a,(...x)=>u?.[0]===x[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${x[0]} in key: ${l[0]}`),null):this.translate(...x,l),i)),i.interpolation&&this.interpolator.reset()}const f=i.postProcess||this.options.postProcess,h=De(f)?[f]:f;return a!=null&&h?.length&&i.applyPostProcessor!==!1&&(a=Dy.handle(h,a,l,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),a}resolve(a,l={}){let i,s,u,f,h;return De(a)&&(a=[a]),a.forEach(p=>{if(this.isValidLookup(i))return;const m=this.extractFromKey(p,l),g=m.key;s=g;let x=m.namespaces;this.options.fallbackNS&&(x=x.concat(this.options.fallbackNS));const S=l.count!==void 0&&!De(l.count),w=S&&!l.ordinal&&l.count===0,C=l.context!==void 0&&(De(l.context)||typeof l.context=="number")&&l.context!=="",R=l.lngs?l.lngs:this.languageUtils.toResolveHierarchy(l.lng||this.language,l.fallbackLng);x.forEach(T=>{this.isValidLookup(i)||(h=T,!av[`${R[0]}-${T}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(h)&&(av[`${R[0]}-${T}`]=!0,this.logger.warn(`key "${s}" for languages "${R.join(", ")}" won't get resolved as namespace "${h}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),R.forEach(O=>{if(this.isValidLookup(i))return;f=O;const z=[g];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(z,g,O,T,l);else{let $;S&&($=this.pluralResolver.getSuffix(O,l.count,l));const P=`${this.options.pluralSeparator}zero`,A=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(S&&(z.push(g+$),l.ordinal&&$.indexOf(A)===0&&z.push(g+$.replace(A,this.options.pluralSeparator)),w&&z.push(g+P)),C){const X=`${g}${this.options.contextSeparator}${l.context}`;z.push(X),S&&(z.push(X+$),l.ordinal&&$.indexOf(A)===0&&z.push(X+$.replace(A,this.options.pluralSeparator)),w&&z.push(X+P))}}let U;for(;U=z.pop();)this.isValidLookup(i)||(u=U,i=this.getResource(O,T,U,l))}))})}),{res:i,usedKey:s,exactUsedKey:u,usedLng:f,usedNS:h}}isValidLookup(a){return a!==void 0&&!(!this.options.returnNull&&a===null)&&!(!this.options.returnEmptyString&&a==="")}getResource(a,l,i,s={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(a,l,i,s):this.resourceStore.getResource(a,l,i,s)}getUsedParamsDetails(a={}){const l=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=a.replace&&!De(a.replace);let s=i?a.replace:a;if(i&&typeof a.count<"u"&&(s.count=a.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!i){s={...s};for(const u of l)delete s[u]}return s}static hasDefaultValue(a){const l="defaultValue";for(const i in a)if(Object.prototype.hasOwnProperty.call(a,i)&&l===i.substring(0,l.length)&&a[i]!==void 0)return!0;return!1}}class lv{constructor(a){this.options=a,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Hn.create("languageUtils")}getScriptPartFromCode(a){if(a=ro(a),!a||a.indexOf("-")<0)return null;const l=a.split("-");return l.length===2||(l.pop(),l[l.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(l.join("-"))}getLanguagePartFromCode(a){if(a=ro(a),!a||a.indexOf("-")<0)return a;const l=a.split("-");return this.formatLanguageCode(l[0])}formatLanguageCode(a){if(De(a)&&a.indexOf("-")>-1){let l;try{l=Intl.getCanonicalLocales(a)[0]}catch{}return l&&this.options.lowerCaseLng&&(l=l.toLowerCase()),l||(this.options.lowerCaseLng?a.toLowerCase():a)}return this.options.cleanCode||this.options.lowerCaseLng?a.toLowerCase():a}isSupportedCode(a){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(a=this.getLanguagePartFromCode(a)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(a)>-1}getBestMatchFromCodes(a){if(!a)return null;let l;return a.forEach(i=>{if(l)return;const s=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(s))&&(l=s)}),!l&&this.options.supportedLngs&&a.forEach(i=>{if(l)return;const s=this.getScriptPartFromCode(i);if(this.isSupportedCode(s))return l=s;const u=this.getLanguagePartFromCode(i);if(this.isSupportedCode(u))return l=u;l=this.options.supportedLngs.find(f=>{if(f===u)return f;if(!(f.indexOf("-")<0&&u.indexOf("-")<0)&&(f.indexOf("-")>0&&u.indexOf("-")<0&&f.substring(0,f.indexOf("-"))===u||f.indexOf(u)===0&&u.length>1))return f})}),l||(l=this.getFallbackCodes(this.options.fallbackLng)[0]),l}getFallbackCodes(a,l){if(!a)return[];if(typeof a=="function"&&(a=a(l)),De(a)&&(a=[a]),Array.isArray(a))return a;if(!l)return a.default||[];let i=a[l];return i||(i=a[this.getScriptPartFromCode(l)]),i||(i=a[this.formatLanguageCode(l)]),i||(i=a[this.getLanguagePartFromCode(l)]),i||(i=a.default),i||[]}toResolveHierarchy(a,l){const i=this.getFallbackCodes((l===!1?[]:l)||this.options.fallbackLng||[],a),s=[],u=f=>{f&&(this.isSupportedCode(f)?s.push(f):this.logger.warn(`rejecting language code not found in supportedLngs: ${f}`))};return De(a)&&(a.indexOf("-")>-1||a.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&u(this.formatLanguageCode(a)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&u(this.getScriptPartFromCode(a)),this.options.load!=="currentOnly"&&u(this.getLanguagePartFromCode(a))):De(a)&&u(this.formatLanguageCode(a)),i.forEach(f=>{s.indexOf(f)<0&&u(this.formatLanguageCode(f))}),s}}const iv={zero:0,one:1,two:2,few:3,many:4,other:5},ov={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class VS{constructor(a,l={}){this.languageUtils=a,this.options=l,this.logger=Hn.create("pluralResolver"),this.pluralRulesCache={}}addRule(a,l){this.rules[a]=l}clearCache(){this.pluralRulesCache={}}getRule(a,l={}){const i=ro(a==="dev"?"en":a),s=l.ordinal?"ordinal":"cardinal",u=JSON.stringify({cleanedCode:i,type:s});if(u in this.pluralRulesCache)return this.pluralRulesCache[u];let f;try{f=new Intl.PluralRules(i,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),ov;if(!a.match(/-|_/))return ov;const p=this.languageUtils.getLanguagePartFromCode(a);f=this.getRule(p,l)}return this.pluralRulesCache[u]=f,f}needsPlural(a,l={}){let i=this.getRule(a,l);return i||(i=this.getRule("dev",l)),i?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(a,l,i={}){return this.getSuffixes(a,i).map(s=>`${l}${s}`)}getSuffixes(a,l={}){let i=this.getRule(a,l);return i||(i=this.getRule("dev",l)),i?i.resolvedOptions().pluralCategories.sort((s,u)=>iv[s]-iv[u]).map(s=>`${this.options.prepend}${l.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(a,l,i={}){const s=this.getRule(a,i);return s?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${s.select(l)}`:(this.logger.warn(`no plural rule found for: ${a}`),this.getSuffix("dev",l,i))}}const sv=(n,a,l,i=".",s=!0)=>{let u=LS(n,a,l);return!u&&s&&De(l)&&(u=gd(n,l,i),u===void 0&&(u=gd(a,l,i))),u},Vf=n=>n.replace(/\$/g,"$$$$");class YS{constructor(a={}){this.logger=Hn.create("interpolator"),this.options=a,this.format=a?.interpolation?.format||(l=>l),this.init(a)}init(a={}){a.interpolation||(a.interpolation={escapeValue:!0});const{escape:l,escapeValue:i,useRawValueToEscape:s,prefix:u,prefixEscaped:f,suffix:h,suffixEscaped:p,formatSeparator:m,unescapeSuffix:g,unescapePrefix:x,nestingPrefix:S,nestingPrefixEscaped:w,nestingSuffix:C,nestingSuffixEscaped:R,nestingOptionsSeparator:T,maxReplaces:O,alwaysFormat:z}=a.interpolation;this.escape=l!==void 0?l:kS,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=u?wl(u):f||"{{",this.suffix=h?wl(h):p||"}}",this.formatSeparator=m||",",this.unescapePrefix=g?"":x||"-",this.unescapeSuffix=this.unescapePrefix?"":g||"",this.nestingPrefix=S?wl(S):w||wl("$t("),this.nestingSuffix=C?wl(C):R||wl(")"),this.nestingOptionsSeparator=T||",",this.maxReplaces=O||1e3,this.alwaysFormat=z!==void 0?z:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const a=(l,i)=>l?.source===i?(l.lastIndex=0,l):new RegExp(i,"g");this.regexp=a(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=a(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=a(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(a,l,i,s){let u,f,h;const p=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},m=w=>{if(w.indexOf(this.formatSeparator)<0){const O=sv(l,p,w,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(O,void 0,i,{...s,...l,interpolationkey:w}):O}const C=w.split(this.formatSeparator),R=C.shift().trim(),T=C.join(this.formatSeparator).trim();return this.format(sv(l,p,R,this.options.keySeparator,this.options.ignoreJSONStructure),T,i,{...s,...l,interpolationkey:R})};this.resetRegExp();const g=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,x=s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:w=>Vf(w)},{regex:this.regexp,safeValue:w=>this.escapeValue?Vf(this.escape(w)):Vf(w)}].forEach(w=>{for(h=0;u=w.regex.exec(a);){const C=u[1].trim();if(f=m(C),f===void 0)if(typeof g=="function"){const T=g(a,u,s);f=De(T)?T:""}else if(s&&Object.prototype.hasOwnProperty.call(s,C))f="";else if(x){f=u[0];continue}else this.logger.warn(`missed to pass in variable ${C} for interpolating ${a}`),f="";else!De(f)&&!this.useRawValueToEscape&&(f=Ig(f));const R=w.safeValue(f);if(a=a.replace(u[0],R),x?(w.regex.lastIndex+=f.length,w.regex.lastIndex-=u[0].length):w.regex.lastIndex=0,h++,h>=this.maxReplaces)break}}),a}nest(a,l,i={}){let s,u,f;const h=(p,m)=>{const g=this.nestingOptionsSeparator;if(p.indexOf(g)<0)return p;const x=p.split(new RegExp(`${g}[ ]*{`));let S=`{${x[1]}`;p=x[0],S=this.interpolate(S,f);const w=S.match(/'/g),C=S.match(/"/g);((w?.length??0)%2===0&&!C||C.length%2!==0)&&(S=S.replace(/'/g,'"'));try{f=JSON.parse(S),m&&(f={...m,...f})}catch(R){return this.logger.warn(`failed parsing options string in nesting for key ${p}`,R),`${p}${g}${S}`}return f.defaultValue&&f.defaultValue.indexOf(this.prefix)>-1&&delete f.defaultValue,p};for(;s=this.nestingRegexp.exec(a);){let p=[];f={...i},f=f.replace&&!De(f.replace)?f.replace:f,f.applyPostProcessor=!1,delete f.defaultValue;const m=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(m!==-1&&(p=s[1].slice(m).split(this.formatSeparator).map(g=>g.trim()).filter(Boolean),s[1]=s[1].slice(0,m)),u=l(h.call(this,s[1].trim(),f),f),u&&s[0]===a&&!De(u))return u;De(u)||(u=Ig(u)),u||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${a}`),u=""),p.length&&(u=p.reduce((g,x)=>this.format(g,x,i.lng,{...i,interpolationkey:s[1].trim()}),u.trim())),a=a.replace(s[0],u),this.regexp.lastIndex=0}return a}}const qS=n=>{let a=n.toLowerCase().trim();const l={};if(n.indexOf("(")>-1){const i=n.split("(");a=i[0].toLowerCase().trim();const s=i[1].substring(0,i[1].length-1);a==="currency"&&s.indexOf(":")<0?l.currency||(l.currency=s.trim()):a==="relativetime"&&s.indexOf(":")<0?l.range||(l.range=s.trim()):s.split(";").forEach(f=>{if(f){const[h,...p]=f.split(":"),m=p.join(":").trim().replace(/^'+|'+$/g,""),g=h.trim();l[g]||(l[g]=m),m==="false"&&(l[g]=!1),m==="true"&&(l[g]=!0),isNaN(m)||(l[g]=parseInt(m,10))}})}return{formatName:a,formatOptions:l}},uv=n=>{const a={};return(l,i,s)=>{let u=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(u={...u,[s.interpolationkey]:void 0});const f=i+JSON.stringify(u);let h=a[f];return h||(h=n(ro(i),s),a[f]=h),h(l)}},GS=n=>(a,l,i)=>n(ro(l),i)(a);class KS{constructor(a={}){this.logger=Hn.create("formatter"),this.options=a,this.init(a)}init(a,l={interpolation:{}}){this.formatSeparator=l.interpolation.formatSeparator||",";const i=l.cacheInBuiltFormats?uv:GS;this.formats={number:i((s,u)=>{const f=new Intl.NumberFormat(s,{...u});return h=>f.format(h)}),currency:i((s,u)=>{const f=new Intl.NumberFormat(s,{...u,style:"currency"});return h=>f.format(h)}),datetime:i((s,u)=>{const f=new Intl.DateTimeFormat(s,{...u});return h=>f.format(h)}),relativetime:i((s,u)=>{const f=new Intl.RelativeTimeFormat(s,{...u});return h=>f.format(h,u.range||"day")}),list:i((s,u)=>{const f=new Intl.ListFormat(s,{...u});return h=>f.format(h)})}}add(a,l){this.formats[a.toLowerCase().trim()]=l}addCached(a,l){this.formats[a.toLowerCase().trim()]=uv(l)}format(a,l,i,s={}){const u=l.split(this.formatSeparator);if(u.length>1&&u[0].indexOf("(")>1&&u[0].indexOf(")")<0&&u.find(h=>h.indexOf(")")>-1)){const h=u.findIndex(p=>p.indexOf(")")>-1);u[0]=[u[0],...u.splice(1,h)].join(this.formatSeparator)}return u.reduce((h,p)=>{const{formatName:m,formatOptions:g}=qS(p);if(this.formats[m]){let x=h;try{const S=s?.formatParams?.[s.interpolationkey]||{},w=S.locale||S.lng||s.locale||s.lng||i;x=this.formats[m](h,w,{...g,...s,...S})}catch(S){this.logger.warn(S)}return x}else this.logger.warn(`there was no format function for ${m}`);return h},a)}}const FS=(n,a)=>{n.pending[a]!==void 0&&(delete n.pending[a],n.pendingCount--)};class XS extends pu{constructor(a,l,i,s={}){super(),this.backend=a,this.store=l,this.services=i,this.languageUtils=i.languageUtils,this.options=s,this.logger=Hn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(i,s.backend,s)}queueLoad(a,l,i,s){const u={},f={},h={},p={};return a.forEach(m=>{let g=!0;l.forEach(x=>{const S=`${m}|${x}`;!i.reload&&this.store.hasResourceBundle(m,x)?this.state[S]=2:this.state[S]<0||(this.state[S]===1?f[S]===void 0&&(f[S]=!0):(this.state[S]=1,g=!1,f[S]===void 0&&(f[S]=!0),u[S]===void 0&&(u[S]=!0),p[x]===void 0&&(p[x]=!0)))}),g||(h[m]=!0)}),(Object.keys(u).length||Object.keys(f).length)&&this.queue.push({pending:f,pendingCount:Object.keys(f).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(u),pending:Object.keys(f),toLoadLanguages:Object.keys(h),toLoadNamespaces:Object.keys(p)}}loaded(a,l,i){const s=a.split("|"),u=s[0],f=s[1];l&&this.emit("failedLoading",u,f,l),!l&&i&&this.store.addResourceBundle(u,f,i,void 0,void 0,{skipCopy:!0}),this.state[a]=l?-1:2,l&&i&&(this.state[a]=0);const h={};this.queue.forEach(p=>{DS(p.loaded,[u],f),FS(p,a),l&&p.errors.push(l),p.pendingCount===0&&!p.done&&(Object.keys(p.loaded).forEach(m=>{h[m]||(h[m]={});const g=p.loaded[m];g.length&&g.forEach(x=>{h[m][x]===void 0&&(h[m][x]=!0)})}),p.done=!0,p.errors.length?p.callback(p.errors):p.callback())}),this.emit("loaded",h),this.queue=this.queue.filter(p=>!p.done)}read(a,l,i,s=0,u=this.retryTimeout,f){if(!a.length)return f(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:a,ns:l,fcName:i,tried:s,wait:u,callback:f});return}this.readingCalls++;const h=(m,g)=>{if(this.readingCalls--,this.waitingReads.length>0){const x=this.waitingReads.shift();this.read(x.lng,x.ns,x.fcName,x.tried,x.wait,x.callback)}if(m&&g&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,a,l,i,s+1,u*2,f)},u);return}f(m,g)},p=this.backend[i].bind(this.backend);if(p.length===2){try{const m=p(a,l);m&&typeof m.then=="function"?m.then(g=>h(null,g)).catch(h):h(null,m)}catch(m){h(m)}return}return p(a,l,h)}prepareLoading(a,l,i={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();De(a)&&(a=this.languageUtils.toResolveHierarchy(a)),De(l)&&(l=[l]);const u=this.queueLoad(a,l,i,s);if(!u.toLoad.length)return u.pending.length||s(),null;u.toLoad.forEach(f=>{this.loadOne(f)})}load(a,l,i){this.prepareLoading(a,l,{},i)}reload(a,l,i){this.prepareLoading(a,l,{reload:!0},i)}loadOne(a,l=""){const i=a.split("|"),s=i[0],u=i[1];this.read(s,u,"read",void 0,void 0,(f,h)=>{f&&this.logger.warn(`${l}loading namespace ${u} for language ${s} failed`,f),!f&&h&&this.logger.log(`${l}loaded namespace ${u} for language ${s}`,h),this.loaded(a,f,h)})}saveMissing(a,l,i,s,u,f={},h=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(l)){this.logger.warn(`did not save key "${i}" as the namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if(this.backend?.create){const p={...f,isUpdate:u},m=this.backend.create.bind(this.backend);if(m.length<6)try{let g;m.length===5?g=m(a,l,i,s,p):g=m(a,l,i,s),g&&typeof g.then=="function"?g.then(x=>h(null,x)).catch(h):h(null,g)}catch(g){h(g)}else m(a,l,i,s,h,p)}!a||!a[0]||this.store.addResource(a[0],l,i,s)}}}const cv=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let a={};if(typeof n[1]=="object"&&(a=n[1]),De(n[1])&&(a.defaultValue=n[1]),De(n[2])&&(a.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const l=n[3]||n[2];Object.keys(l).forEach(i=>{a[i]=l[i]})}return a},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),fv=n=>(De(n.ns)&&(n.ns=[n.ns]),De(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),De(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs?.indexOf?.("cimode")<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n),Us=()=>{},QS=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(l=>{typeof n[l]=="function"&&(n[l]=n[l].bind(n))})};class lo extends pu{constructor(a={},l){if(super(),this.options=fv(a),this.services={},this.logger=Hn,this.modules={external:[]},QS(this),l&&!this.isInitialized&&!a.isClone){if(!this.options.initAsync)return this.init(a,l),this;setTimeout(()=>{this.init(a,l)},0)}}init(a={},l){this.isInitializing=!0,typeof a=="function"&&(l=a,a={}),a.defaultNS==null&&a.ns&&(De(a.ns)?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));const i=cv();this.options={...i,...this.options,...fv(a)},this.options.interpolation={...i.interpolation,...this.options.interpolation},a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator);const s=m=>m?typeof m=="function"?new m:m:null;if(!this.options.isClone){this.modules.logger?Hn.init(s(this.modules.logger),this.options):Hn.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:m=KS;const g=new lv(this.options);this.store=new nv(this.options.resources,this.options);const x=this.services;x.logger=Hn,x.resourceStore=this.store,x.languageUtils=g,x.pluralResolver=new VS(g,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format&&this.logger.warn("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),m&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(x.formatter=s(m),x.formatter.init&&x.formatter.init(x,this.options),this.options.interpolation.format=x.formatter.format.bind(x.formatter)),x.interpolator=new YS(this.options),x.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},x.backendConnector=new XS(s(this.modules.backend),x.resourceStore,x,this.options),x.backendConnector.on("*",(w,...C)=>{this.emit(w,...C)}),this.modules.languageDetector&&(x.languageDetector=s(this.modules.languageDetector),x.languageDetector.init&&x.languageDetector.init(x,this.options.detection,this.options)),this.modules.i18nFormat&&(x.i18nFormat=s(this.modules.i18nFormat),x.i18nFormat.init&&x.i18nFormat.init(this)),this.translator=new lu(this.services,this.options),this.translator.on("*",(w,...C)=>{this.emit(w,...C)}),this.modules.external.forEach(w=>{w.init&&w.init(this)})}if(this.format=this.options.interpolation.format,l||(l=Us),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(m=>{this[m]=(...g)=>this.store[m](...g)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=(...g)=>(this.store[m](...g),this)});const h=Fi(),p=()=>{const m=(g,x)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),h.resolve(x),l(g,x)};if(this.languages&&!this.isInitialized)return m(null,this.t.bind(this));this.changeLanguage(this.options.lng,m)};return this.options.resources||!this.options.initAsync?p():setTimeout(p,0),h}loadResources(a,l=Us){let i=l;const s=De(a)?a:this.language;if(typeof a=="function"&&(i=a),!this.options.resources||this.options.partialBundledLanguages){if(s?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const u=[],f=h=>{if(!h||h==="cimode")return;this.services.languageUtils.toResolveHierarchy(h).forEach(m=>{m!=="cimode"&&u.indexOf(m)<0&&u.push(m)})};s?f(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(p=>f(p)),this.options.preload?.forEach?.(h=>f(h)),this.services.backendConnector.load(u,this.options.ns,h=>{!h&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(h)})}else i(null)}reloadResources(a,l,i){const s=Fi();return typeof a=="function"&&(i=a,a=void 0),typeof l=="function"&&(i=l,l=void 0),a||(a=this.languages),l||(l=this.options.ns),i||(i=Us),this.services.backendConnector.reload(a,l,u=>{s.resolve(),i(u)}),s}use(a){if(!a)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!a.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return a.type==="backend"&&(this.modules.backend=a),(a.type==="logger"||a.log&&a.warn&&a.error)&&(this.modules.logger=a),a.type==="languageDetector"&&(this.modules.languageDetector=a),a.type==="i18nFormat"&&(this.modules.i18nFormat=a),a.type==="postProcessor"&&Dy.addPostProcessor(a),a.type==="formatter"&&(this.modules.formatter=a),a.type==="3rdParty"&&this.modules.external.push(a),this}setResolvedLanguage(a){if(!(!a||!this.languages)&&!(["cimode","dev"].indexOf(a)>-1)){for(let l=0;l<this.languages.length;l++){const i=this.languages[l];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(a)<0&&this.store.hasLanguageSomeTranslations(a)&&(this.resolvedLanguage=a,this.languages.unshift(a))}}changeLanguage(a,l){this.isLanguageChangingTo=a;const i=Fi();this.emit("languageChanging",a);const s=h=>{this.language=h,this.languages=this.services.languageUtils.toResolveHierarchy(h),this.resolvedLanguage=void 0,this.setResolvedLanguage(h)},u=(h,p)=>{p?this.isLanguageChangingTo===a&&(s(p),this.translator.changeLanguage(p),this.isLanguageChangingTo=void 0,this.emit("languageChanged",p),this.logger.log("languageChanged",p)):this.isLanguageChangingTo=void 0,i.resolve((...m)=>this.t(...m)),l&&l(h,(...m)=>this.t(...m))},f=h=>{!a&&!h&&this.services.languageDetector&&(h=[]);const p=De(h)?h:h&&h[0],m=this.store.hasLanguageSomeTranslations(p)?p:this.services.languageUtils.getBestMatchFromCodes(De(h)?[h]:h);m&&(this.language||s(m),this.translator.language||this.translator.changeLanguage(m),this.services.languageDetector?.cacheUserLanguage?.(m)),this.loadResources(m,g=>{u(g,m)})};return!a&&this.services.languageDetector&&!this.services.languageDetector.async?f(this.services.languageDetector.detect()):!a&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(f):this.services.languageDetector.detect(f):f(a),i}getFixedT(a,l,i){const s=(u,f,...h)=>{let p;typeof f!="object"?p=this.options.overloadTranslationOptionHandler([u,f].concat(h)):p={...f},p.lng=p.lng||s.lng,p.lngs=p.lngs||s.lngs,p.ns=p.ns||s.ns,p.keyPrefix!==""&&(p.keyPrefix=p.keyPrefix||i||s.keyPrefix);const m=this.options.keySeparator||".";let g;return p.keyPrefix&&Array.isArray(u)?g=u.map(x=>`${p.keyPrefix}${m}${x}`):g=p.keyPrefix?`${p.keyPrefix}${m}${u}`:u,this.t(g,p)};return De(a)?s.lng=a:s.lngs=a,s.ns=l,s.keyPrefix=i,s}t(...a){return this.translator?.translate(...a)}exists(...a){return this.translator?.exists(...a)}setDefaultNamespace(a){this.options.defaultNS=a}hasLoadedNamespace(a,l={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=l.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const f=(h,p)=>{const m=this.services.backendConnector.state[`${h}|${p}`];return m===-1||m===0||m===2};if(l.precheck){const h=l.precheck(this,f);if(h!==void 0)return h}return!!(this.hasResourceBundle(i,a)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||f(i,a)&&(!s||f(u,a)))}loadNamespaces(a,l){const i=Fi();return this.options.ns?(De(a)&&(a=[a]),a.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{i.resolve(),l&&l(s)}),i):(l&&l(),Promise.resolve())}loadLanguages(a,l){const i=Fi();De(a)&&(a=[a]);const s=this.options.preload||[],u=a.filter(f=>s.indexOf(f)<0&&this.services.languageUtils.isSupportedCode(f));return u.length?(this.options.preload=s.concat(u),this.loadResources(f=>{i.resolve(),l&&l(f)}),i):(l&&l(),Promise.resolve())}dir(a){if(a||(a=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!a)return"rtl";try{const s=new Intl.Locale(a);if(s&&s.getTextInfo){const u=s.getTextInfo();if(u&&u.direction)return u.direction}}catch{}const l=["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"],i=this.services?.languageUtils||new lv(cv());return a.toLowerCase().indexOf("-latn")>1?"ltr":l.indexOf(i.getLanguagePartFromCode(a))>-1||a.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(a={},l){return new lo(a,l)}cloneInstance(a={},l=Us){const i=a.forkResourceStore;i&&delete a.forkResourceStore;const s={...this.options,...a,isClone:!0},u=new lo(s);if((a.debug!==void 0||a.prefix!==void 0)&&(u.logger=u.logger.clone(a)),["store","services","language"].forEach(h=>{u[h]=this[h]}),u.services={...this.services},u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},i){const h=Object.keys(this.store.data).reduce((p,m)=>(p[m]={...this.store.data[m]},p[m]=Object.keys(p[m]).reduce((g,x)=>(g[x]={...p[m][x]},g),p[m]),p),{});u.store=new nv(h,s),u.services.resourceStore=u.store}return u.translator=new lu(u.services,s),u.translator.on("*",(h,...p)=>{u.emit(h,...p)}),u.init(s,l),u.translator.options=s,u.translator.backendConnector.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const zt=lo.createInstance();zt.createInstance=lo.createInstance;zt.createInstance;zt.dir;zt.init;zt.loadResources;zt.reloadResources;zt.use;zt.changeLanguage;zt.getFixedT;zt.t;zt.exists;zt.setDefaultNamespace;zt.hasLoadedNamespace;zt.loadNamespaces;zt.loadLanguages;var Yf={exports:{}},ze={};/**
16
16
  * @license React
17
17
  * react.production.js
18
18
  *
@@ -20,7 +20,7 @@
20
20
  *
21
21
  * This source code is licensed under the MIT license found in the
22
22
  * LICENSE file in the root directory of this source tree.
23
- */var dv;function ZS(){if(dv)return De;dv=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),x=Symbol.iterator;function S(T){return T===null||typeof T!="object"?null:(T=x&&T[x]||T["@@iterator"],typeof T=="function"?T:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,R={};function j(T,$,O){this.props=T,this.context=$,this.refs=R,this.updater=O||w}j.prototype.isReactComponent={},j.prototype.setState=function(T,$){if(typeof T!="object"&&typeof T!="function"&&T!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,T,$,"setState")},j.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function A(){}A.prototype=j.prototype;function k(T,$,O){this.props=T,this.context=$,this.refs=R,this.updater=O||w}var P=k.prototype=new A;P.constructor=k,C(P,j.prototype),P.isPureReactComponent=!0;var Y=Array.isArray,B={H:null,A:null,T:null,S:null,V:null},N=Object.prototype.hasOwnProperty;function X(T,$,O,M,U,V){return O=V.ref,{$$typeof:n,type:T,key:$,ref:O!==void 0?O:null,props:V}}function ee(T,$){return X(T.type,$,void 0,void 0,void 0,T.props)}function ie(T){return typeof T=="object"&&T!==null&&T.$$typeof===n}function oe(T){var $={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(O){return $[O]})}var Oe=/\/+/g;function Se(T,$){return typeof T=="object"&&T!==null&&T.key!=null?oe(""+T.key):$.toString(36)}function de(){}function fe(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(de,de):(T.status="pending",T.then(function($){T.status==="pending"&&(T.status="fulfilled",T.value=$)},function($){T.status==="pending"&&(T.status="rejected",T.reason=$)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function ue(T,$,O,M,U){var V=typeof T;(V==="undefined"||V==="boolean")&&(T=null);var I=!1;if(T===null)I=!0;else switch(V){case"bigint":case"string":case"number":I=!0;break;case"object":switch(T.$$typeof){case n:case a:I=!0;break;case g:return I=T._init,ue(I(T._payload),$,O,M,U)}}if(I)return U=U(T),I=M===""?"."+Se(T,0):M,Y(U)?(O="",I!=null&&(O=I.replace(Oe,"$&/")+"/"),ue(U,$,O,"",function(Ee){return Ee})):U!=null&&(ie(U)&&(U=ee(U,O+(U.key==null||T&&T.key===U.key?"":(""+U.key).replace(Oe,"$&/")+"/")+I)),$.push(U)),1;I=0;var re=M===""?".":M+":";if(Y(T))for(var ce=0;ce<T.length;ce++)M=T[ce],V=re+Se(M,ce),I+=ue(M,$,O,V,U);else if(ce=S(T),typeof ce=="function")for(T=ce.call(T),ce=0;!(M=T.next()).done;)M=M.value,V=re+Se(M,ce++),I+=ue(M,$,O,V,U);else if(V==="object"){if(typeof T.then=="function")return ue(fe(T),$,O,M,U);throw $=String(T),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return I}function L(T,$,O){if(T==null)return T;var M=[],U=0;return ue(T,M,"","",function(V){return $.call(O,V,U++)}),M}function W(T){if(T._status===-1){var $=T._result;$=$(),$.then(function(O){(T._status===0||T._status===-1)&&(T._status=1,T._result=O)},function(O){(T._status===0||T._status===-1)&&(T._status=2,T._result=O)}),T._status===-1&&(T._status=0,T._result=$)}if(T._status===1)return T._result.default;throw T._result}var K=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var $=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent($))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)};function he(){}return De.Children={map:L,forEach:function(T,$,O){L(T,function(){$.apply(this,arguments)},O)},count:function(T){var $=0;return L(T,function(){$++}),$},toArray:function(T){return L(T,function($){return $})||[]},only:function(T){if(!ie(T))throw Error("React.Children.only expected to receive a single React element child.");return T}},De.Component=j,De.Fragment=l,De.Profiler=s,De.PureComponent=k,De.StrictMode=i,De.Suspense=p,De.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,De.__COMPILER_RUNTIME={__proto__:null,c:function(T){return B.H.useMemoCache(T)}},De.cache=function(T){return function(){return T.apply(null,arguments)}},De.cloneElement=function(T,$,O){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var M=C({},T.props),U=T.key,V=void 0;if($!=null)for(I in $.ref!==void 0&&(V=void 0),$.key!==void 0&&(U=""+$.key),$)!N.call($,I)||I==="key"||I==="__self"||I==="__source"||I==="ref"&&$.ref===void 0||(M[I]=$[I]);var I=arguments.length-2;if(I===1)M.children=O;else if(1<I){for(var re=Array(I),ce=0;ce<I;ce++)re[ce]=arguments[ce+2];M.children=re}return X(T.type,U,void 0,void 0,V,M)},De.createContext=function(T){return T={$$typeof:f,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:u,_context:T},T},De.createElement=function(T,$,O){var M,U={},V=null;if($!=null)for(M in $.key!==void 0&&(V=""+$.key),$)N.call($,M)&&M!=="key"&&M!=="__self"&&M!=="__source"&&(U[M]=$[M]);var I=arguments.length-2;if(I===1)U.children=O;else if(1<I){for(var re=Array(I),ce=0;ce<I;ce++)re[ce]=arguments[ce+2];U.children=re}if(T&&T.defaultProps)for(M in I=T.defaultProps,I)U[M]===void 0&&(U[M]=I[M]);return X(T,V,void 0,void 0,null,U)},De.createRef=function(){return{current:null}},De.forwardRef=function(T){return{$$typeof:h,render:T}},De.isValidElement=ie,De.lazy=function(T){return{$$typeof:g,_payload:{_status:-1,_result:T},_init:W}},De.memo=function(T,$){return{$$typeof:m,type:T,compare:$===void 0?null:$}},De.startTransition=function(T){var $=B.T,O={};B.T=O;try{var M=T(),U=B.S;U!==null&&U(O,M),typeof M=="object"&&M!==null&&typeof M.then=="function"&&M.then(he,K)}catch(V){K(V)}finally{B.T=$}},De.unstable_useCacheRefresh=function(){return B.H.useCacheRefresh()},De.use=function(T){return B.H.use(T)},De.useActionState=function(T,$,O){return B.H.useActionState(T,$,O)},De.useCallback=function(T,$){return B.H.useCallback(T,$)},De.useContext=function(T){return B.H.useContext(T)},De.useDebugValue=function(){},De.useDeferredValue=function(T,$){return B.H.useDeferredValue(T,$)},De.useEffect=function(T,$,O){var M=B.H;if(typeof O=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return M.useEffect(T,$)},De.useId=function(){return B.H.useId()},De.useImperativeHandle=function(T,$,O){return B.H.useImperativeHandle(T,$,O)},De.useInsertionEffect=function(T,$){return B.H.useInsertionEffect(T,$)},De.useLayoutEffect=function(T,$){return B.H.useLayoutEffect(T,$)},De.useMemo=function(T,$){return B.H.useMemo(T,$)},De.useOptimistic=function(T,$){return B.H.useOptimistic(T,$)},De.useReducer=function(T,$,O){return B.H.useReducer(T,$,O)},De.useRef=function(T){return B.H.useRef(T)},De.useState=function(T){return B.H.useState(T)},De.useSyncExternalStore=function(T,$,O){return B.H.useSyncExternalStore(T,$,O)},De.useTransition=function(){return B.H.useTransition()},De.version="19.1.0",De}var hv;function Ud(){return hv||(hv=1,Yf.exports=ZS()),Yf.exports}var v=Ud();const jr=My(v),Ly=NS({__proto__:null,default:jr},[v]),JS=(n,a,l,i)=>{const s=[l,{code:a,...i||{}}];if(n?.services?.logger?.forward)return n.services.logger.forward(s,"warn","react-i18next::",!0);Mr(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),n?.services?.logger?.warn?n.services.logger.warn(...s):console?.warn&&console.warn(...s)},mv={},vd=(n,a,l,i)=>{Mr(l)&&mv[l]||(Mr(l)&&(mv[l]=new Date),JS(n,a,l,i))},zy=(n,a)=>()=>{if(n.isInitialized)a();else{const l=()=>{setTimeout(()=>{n.off("initialized",l)},0),a()};n.on("initialized",l)}},yd=(n,a,l)=>{n.loadNamespaces(a,zy(n,l))},pv=(n,a,l,i)=>{if(Mr(l)&&(l=[l]),n.options.preload&&n.options.preload.indexOf(a)>-1)return yd(n,l,i);l.forEach(s=>{n.options.ns.indexOf(s)<0&&n.options.ns.push(s)}),n.loadLanguages(a,zy(n,i))},IS=(n,a,l={})=>!a.languages||!a.languages.length?(vd(a,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:a.languages}),!0):a.hasLoadedNamespace(n,{lng:l.lng,precheck:(i,s)=>{if(l.bindI18n&&l.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!s(i.isLanguageChangingTo,n))return!1}}),Mr=n=>typeof n=="string",WS=n=>typeof n=="object"&&n!==null,ew=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,tw={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},nw=n=>tw[n],aw=n=>n.replace(ew,nw);let bd={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:aw};const rw=(n={})=>{bd={...bd,...n}},lw=()=>bd;let ky;const iw=n=>{ky=n},ow=()=>ky,sw={type:"3rdParty",init(n){rw(n.options.react),iw(n)}},uw=v.createContext();class cw{constructor(){this.usedNamespaces={}}addUsedNamespaces(a){a.forEach(l=>{this.usedNamespaces[l]||(this.usedNamespaces[l]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const fw=(n,a)=>{const l=v.useRef();return v.useEffect(()=>{l.current=n},[n,a]),l.current},Uy=(n,a,l,i)=>n.getFixedT(a,l,i),dw=(n,a,l,i)=>v.useCallback(Uy(n,a,l,i),[n,a,l,i]),Ur=(n,a={})=>{const{i18n:l}=a,{i18n:i,defaultNS:s}=v.useContext(uw)||{},u=l||i||ow();if(u&&!u.reportNamespaces&&(u.reportNamespaces=new cw),!u){vd(u,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const Y=(N,X)=>Mr(X)?X:WS(X)&&Mr(X.defaultValue)?X.defaultValue:Array.isArray(N)?N[N.length-1]:N,B=[Y,{},!1];return B.t=Y,B.i18n={},B.ready=!1,B}u.options.react?.wait&&vd(u,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const f={...lw(),...u.options.react,...a},{useSuspense:h,keyPrefix:p}=f;let m=s||u.options?.defaultNS;m=Mr(m)?[m]:m||["translation"],u.reportNamespaces.addUsedNamespaces?.(m);const g=(u.isInitialized||u.initializedStoreOnce)&&m.every(Y=>IS(Y,u,f)),x=dw(u,a.lng||null,f.nsMode==="fallback"?m:m[0],p),S=()=>x,w=()=>Uy(u,a.lng||null,f.nsMode==="fallback"?m:m[0],p),[C,R]=v.useState(S);let j=m.join();a.lng&&(j=`${a.lng}${j}`);const A=fw(j),k=v.useRef(!0);v.useEffect(()=>{const{bindI18n:Y,bindI18nStore:B}=f;k.current=!0,!g&&!h&&(a.lng?pv(u,a.lng,m,()=>{k.current&&R(w)}):yd(u,m,()=>{k.current&&R(w)})),g&&A&&A!==j&&k.current&&R(w);const N=()=>{k.current&&R(w)};return Y&&u?.on(Y,N),B&&u?.store.on(B,N),()=>{k.current=!1,u&&Y&&Y?.split(" ").forEach(X=>u.off(X,N)),B&&u&&B.split(" ").forEach(X=>u.store.off(X,N))}},[u,j]),v.useEffect(()=>{k.current&&g&&R(S)},[u,p,g]);const P=[C,u,g];if(P.t=C,P.i18n=u,P.ready=g,g||!g&&!h)return P;throw new Promise(Y=>{a.lng?pv(u,a.lng,m,()=>Y()):yd(u,m,()=>Y())})},{slice:hw,forEach:mw}=[];function pw(n){return mw.call(hw.call(arguments,1),a=>{if(a)for(const l in a)n[l]===void 0&&(n[l]=a[l])}),n}function gw(n){return typeof n!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(l=>l.test(n))}const gv=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,vw=function(n,a){const i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},s=encodeURIComponent(a);let u=`${n}=${s}`;if(i.maxAge>0){const f=i.maxAge-0;if(Number.isNaN(f))throw new Error("maxAge should be a Number");u+=`; Max-Age=${Math.floor(f)}`}if(i.domain){if(!gv.test(i.domain))throw new TypeError("option domain is invalid");u+=`; Domain=${i.domain}`}if(i.path){if(!gv.test(i.path))throw new TypeError("option path is invalid");u+=`; Path=${i.path}`}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");u+=`; Expires=${i.expires.toUTCString()}`}if(i.httpOnly&&(u+="; HttpOnly"),i.secure&&(u+="; Secure"),i.sameSite)switch(typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite){case!0:u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"strict":u+="; SameSite=Strict";break;case"none":u+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i.partitioned&&(u+="; Partitioned"),u},vv={create(n,a,l,i){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};l&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+l*60*1e3)),i&&(s.domain=i),document.cookie=vw(n,a,s)},read(n){const a=`${n}=`,l=document.cookie.split(";");for(let i=0;i<l.length;i++){let s=l[i];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(a)===0)return s.substring(a.length,s.length)}return null},remove(n,a){this.create(n,"",-1,a)}};var yw={name:"cookie",lookup(n){let{lookupCookie:a}=n;if(a&&typeof document<"u")return vv.read(a)||void 0},cacheUserLanguage(n,a){let{lookupCookie:l,cookieMinutes:i,cookieDomain:s,cookieOptions:u}=a;l&&typeof document<"u"&&vv.create(l,n,i,s,u)}},bw={name:"querystring",lookup(n){let{lookupQuerystring:a}=n,l;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const u=i.substring(1).split("&");for(let f=0;f<u.length;f++){const h=u[f].indexOf("=");h>0&&u[f].substring(0,h)===a&&(l=u[f].substring(h+1))}}return l}},xw={name:"hash",lookup(n){let{lookupHash:a,lookupFromHashIndex:l}=n,i;if(typeof window<"u"){const{hash:s}=window.location;if(s&&s.length>2){const u=s.substring(1);if(a){const f=u.split("&");for(let h=0;h<f.length;h++){const p=f[h].indexOf("=");p>0&&f[h].substring(0,p)===a&&(i=f[h].substring(p+1))}}if(i)return i;if(!i&&l>-1){const f=s.match(/\/([a-zA-Z-]*)/g);return Array.isArray(f)?f[typeof l=="number"?l:0]?.replace("/",""):void 0}}}return i}};let El=null;const yv=()=>{if(El!==null)return El;try{if(El=typeof window<"u"&&window.localStorage!==null,!El)return!1;const n="i18next.translate.boo";window.localStorage.setItem(n,"foo"),window.localStorage.removeItem(n)}catch{El=!1}return El};var Sw={name:"localStorage",lookup(n){let{lookupLocalStorage:a}=n;if(a&&yv())return window.localStorage.getItem(a)||void 0},cacheUserLanguage(n,a){let{lookupLocalStorage:l}=a;l&&yv()&&window.localStorage.setItem(l,n)}};let Rl=null;const bv=()=>{if(Rl!==null)return Rl;try{if(Rl=typeof window<"u"&&window.sessionStorage!==null,!Rl)return!1;const n="i18next.translate.boo";window.sessionStorage.setItem(n,"foo"),window.sessionStorage.removeItem(n)}catch{Rl=!1}return Rl};var ww={name:"sessionStorage",lookup(n){let{lookupSessionStorage:a}=n;if(a&&bv())return window.sessionStorage.getItem(a)||void 0},cacheUserLanguage(n,a){let{lookupSessionStorage:l}=a;l&&bv()&&window.sessionStorage.setItem(l,n)}},Ew={name:"navigator",lookup(n){const a=[];if(typeof navigator<"u"){const{languages:l,userLanguage:i,language:s}=navigator;if(l)for(let u=0;u<l.length;u++)a.push(l[u]);i&&a.push(i),s&&a.push(s)}return a.length>0?a:void 0}},Rw={name:"htmlTag",lookup(n){let{htmlTag:a}=n,l;const i=a||(typeof document<"u"?document.documentElement:null);return i&&typeof i.getAttribute=="function"&&(l=i.getAttribute("lang")),l}},Cw={name:"path",lookup(n){let{lookupFromPathIndex:a}=n;if(typeof window>"u")return;const l=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(l)?l[typeof a=="number"?a:0]?.replace("/",""):void 0}},Ow={name:"subdomain",lookup(n){let{lookupFromSubdomainIndex:a}=n;const l=typeof a=="number"?a+1:1,i=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(i)return i[l]}};let Py=!1;try{document.cookie,Py=!0}catch{}const Hy=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Py||Hy.splice(1,1);const Aw=()=>({order:Hy,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:n=>n});class By{constructor(a){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(a,l)}init(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=a,this.options=pw(l,this.options||{},Aw()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(yw),this.addDetector(bw),this.addDetector(Sw),this.addDetector(ww),this.addDetector(Ew),this.addDetector(Rw),this.addDetector(Cw),this.addDetector(Ow),this.addDetector(xw)}addDetector(a){return this.detectors[a.name]=a,this}detect(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,l=[];return a.forEach(i=>{if(this.detectors[i]){let s=this.detectors[i].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(l=l.concat(s))}}),l=l.filter(i=>i!=null&&!gw(i)).map(i=>this.options.convertDetectedLanguage(i)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?l:l.length>0?l[0]:null}cacheUserLanguage(a){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;l&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(a)>-1||l.forEach(i=>{this.detectors[i]&&this.detectors[i].cacheUserLanguage(a,this.options)}))}}By.type="languageDetector";const Nw={title:"Claude Code Router",save:"Save",save_and_restart:"Save and Restart",cancel:"Cancel",edit:"Edit",remove:"Remove",delete:"Delete",settings:"Settings",selectFile:"Select File",config_saved_success:"Config saved successfully",config_saved_failed:"Failed to save config",config_saved_restart_success:"Config saved and service restarted successfully",config_saved_restart_failed:"Failed to save config and restart service"},Tw={title:"Sign in to your account",description:"Enter your API key to access the configuration panel",apiKey:"API Key",apiKeyPlaceholder:"Enter your API key",signIn:"Sign In",invalidApiKey:"Invalid API key",configError:"Configuration not loaded",validating:"Validating API key..."},jw={title:"General Settings",log:"Enable Logging",claude_path:"Claude Path",host:"Host",port:"Port",apikey:"API Key",timeout:"API Timeout (ms)"},Mw={title:"Custom Transformers",path:"Path",project:"Project",remove:"Remove",add:"Add Custom Transformer",edit:"Edit Custom Transformer",delete:"Delete Custom Transformer",delete_transformer_confirm:"Are you sure you want to delete this custom transformer?",parameters:"Parameters"},_w={title:"Providers",name:"Name",api_base_url:"API Base URL",api_key:"API Key",models:"Models",models_placeholder:"Enter model name and press Enter to add",add_model:"Add Model",select_models:"Select Models",remove:"Remove",add:"Add Provider",edit:"Edit Provider",delete:"Delete",cancel:"Cancel",delete_provider_confirm:"Are you sure you want to delete this provider?",test_connectivity:"Test Connectivity",testing:"Testing...",connection_successful:"Connection successful!",connection_failed:"Connection failed!",missing_credentials:"Missing API base URL or API key",fetch_available_models:"Fetch available models",fetching_models:"Fetching models...",fetch_models_failed:"Failed to fetch models",transformers:"Transformers",select_transformer:"Select Transformer",no_transformers:"No transformers available",provider_transformer:"Provider Transformer",model_transformers:"Model Transformers",transformer_parameters:"Transformer Parameters",add_parameter:"Add Parameter",parameter_name:"Parameter Name",parameter_value:"Parameter Value",selected_transformers:"Selected Transformers"},Dw={title:"Router",default:"Default",background:"Background",think:"Think",longContext:"Long Context",longContextThreshold:"Context Threshold",webSearch:"Web Search",selectModel:"Select a model...",searchModel:"Search model...",noModelFound:"No model found."},Lw={title:"JSON Editor",save:"Save",saving:"Saving...",cancel:"Cancel",save_failed:"Failed to save config",save_and_restart:"Save & Restart"},zw={app:Nw,login:Tw,toplevel:jw,transformers:Mw,providers:_w,router:Dw,json_editor:Lw},kw={title:"Claude Code Router",save:"保存",save_and_restart:"保存并重启",cancel:"取消",edit:"编辑",remove:"移除",delete:"删除",settings:"设置",selectFile:"选择文件",config_saved_success:"配置保存成功",config_saved_failed:"配置保存失败",config_saved_restart_success:"配置保存并服务重启成功",config_saved_restart_failed:"配置保存并服务重启失败"},Uw={title:"登录到您的账户",description:"请输入您的API密钥以访问配置面板",apiKey:"API密钥",apiKeyPlaceholder:"请输入您的API密钥",signIn:"登录",invalidApiKey:"API密钥无效",configError:"配置未加载",validating:"正在验证API密钥..."},Pw={title:"通用设置",log:"启用日志",claude_path:"Claude 路径",host:"主机",port:"端口",apikey:"API 密钥",timeout:"API 超时时间 (毫秒)"},Hw={title:"自定义转换器",path:"路径",project:"项目",remove:"移除",add:"添加自定义转换器",edit:"编辑自定义转换器",delete:"删除自定义转换器",delete_transformer_confirm:"您确定要删除此自定义转换器吗?",parameters:"参数"},Bw={title:"供应商",name:"名称",api_base_url:"API 基础地址",api_key:"API 密钥",models:"模型",models_placeholder:"输入模型名称并按回车键添加",add_model:"添加模型",select_models:"选择模型",remove:"移除",add:"添加供应商",edit:"编辑供应商",delete:"删除",cancel:"取消",delete_provider_confirm:"您确定要删除此供应商吗?",test_connectivity:"测试连通性",testing:"测试中...",connection_successful:"连接成功!",connection_failed:"连接失败!",missing_credentials:"缺少 API 基础地址或 API 密钥",fetch_available_models:"获取可用模型",fetching_models:"获取模型中...",fetch_models_failed:"获取模型失败",transformers:"转换器",select_transformer:"选择转换器",no_transformers:"无可用转换器",provider_transformer:"供应商转换器",model_transformers:"模型转换器",transformer_parameters:"转换器参数",add_parameter:"添加参数",parameter_name:"参数名称",parameter_value:"参数值",selected_transformers:"已选转换器"},$w={title:"路由",default:"默认",background:"后台",think:"思考",longContext:"长上下文",longContextThreshold:"上下文阈值",webSearch:"网络搜索",selectModel:"选择一个模型...",searchModel:"搜索模型...",noModelFound:"未找到模型."},Vw={title:"JSON 编辑器",save:"保存",saving:"保存中...",cancel:"取消",save_failed:"配置保存失败",save_and_restart:"保存并重启"},Yw={app:kw,login:Uw,toplevel:Pw,transformers:Hw,providers:Bw,router:$w,json_editor:Vw},qw={en:{translation:zw},zh:{translation:Yw}};Dt.use(By).use(sw).init({resources:qw,fallbackLng:"en",interpolation:{escapeValue:!1}});var qf={exports:{}},Xi={},Gf={exports:{}},Kf={};/**
23
+ */var dv;function ZS(){if(dv)return ze;dv=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),x=Symbol.iterator;function S(N){return N===null||typeof N!="object"?null:(N=x&&N[x]||N["@@iterator"],typeof N=="function"?N:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,R={};function T(N,K,L){this.props=N,this.context=K,this.refs=R,this.updater=L||w}T.prototype.isReactComponent={},T.prototype.setState=function(N,K){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,K,"setState")},T.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function O(){}O.prototype=T.prototype;function z(N,K,L){this.props=N,this.context=K,this.refs=R,this.updater=L||w}var U=z.prototype=new O;U.constructor=z,C(U,T.prototype),U.isPureReactComponent=!0;var $=Array.isArray,P={H:null,A:null,T:null,S:null,V:null},A=Object.prototype.hasOwnProperty;function X(N,K,L,F,W,k){return L=k.ref,{$$typeof:n,type:N,key:K,ref:L!==void 0?L:null,props:k}}function ne(N,K){return X(N.type,K,void 0,void 0,void 0,N.props)}function oe(N){return typeof N=="object"&&N!==null&&N.$$typeof===n}function se(N){var K={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(L){return K[L]})}var Ne=/\/+/g;function we(N,K){return typeof N=="object"&&N!==null&&N.key!=null?se(""+N.key):K.toString(36)}function he(){}function de(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(he,he):(N.status="pending",N.then(function(K){N.status==="pending"&&(N.status="fulfilled",N.value=K)},function(K){N.status==="pending"&&(N.status="rejected",N.reason=K)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function ce(N,K,L,F,W){var k=typeof N;(k==="undefined"||k==="boolean")&&(N=null);var B=!1;if(N===null)B=!0;else switch(k){case"bigint":case"string":case"number":B=!0;break;case"object":switch(N.$$typeof){case n:case a:B=!0;break;case g:return B=N._init,ce(B(N._payload),K,L,F,W)}}if(B)return W=W(N),B=F===""?"."+we(N,0):F,$(W)?(L="",B!=null&&(L=B.replace(Ne,"$&/")+"/"),ce(W,K,L,"",function(fe){return fe})):W!=null&&(oe(W)&&(W=ne(W,L+(W.key==null||N&&N.key===W.key?"":(""+W.key).replace(Ne,"$&/")+"/")+B)),K.push(W)),1;B=0;var I=F===""?".":F+":";if($(N))for(var te=0;te<N.length;te++)F=N[te],k=I+we(F,te),B+=ce(F,K,L,k,W);else if(te=S(N),typeof te=="function")for(N=te.call(N),te=0;!(F=N.next()).done;)F=F.value,k=I+we(F,te++),B+=ce(F,K,L,k,W);else if(k==="object"){if(typeof N.then=="function")return ce(de(N),K,L,F,W);throw K=String(N),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.")}return B}function _(N,K,L){if(N==null)return N;var F=[],W=0;return ce(N,F,"","",function(k){return K.call(L,k,W++)}),F}function ee(N){if(N._status===-1){var K=N._result;K=K(),K.then(function(L){(N._status===0||N._status===-1)&&(N._status=1,N._result=L)},function(L){(N._status===0||N._status===-1)&&(N._status=2,N._result=L)}),N._status===-1&&(N._status=0,N._result=K)}if(N._status===1)return N._result.default;throw N._result}var q=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var K=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(K))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)};function pe(){}return ze.Children={map:_,forEach:function(N,K,L){_(N,function(){K.apply(this,arguments)},L)},count:function(N){var K=0;return _(N,function(){K++}),K},toArray:function(N){return _(N,function(K){return K})||[]},only:function(N){if(!oe(N))throw Error("React.Children.only expected to receive a single React element child.");return N}},ze.Component=T,ze.Fragment=l,ze.Profiler=s,ze.PureComponent=z,ze.StrictMode=i,ze.Suspense=p,ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,ze.__COMPILER_RUNTIME={__proto__:null,c:function(N){return P.H.useMemoCache(N)}},ze.cache=function(N){return function(){return N.apply(null,arguments)}},ze.cloneElement=function(N,K,L){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var F=C({},N.props),W=N.key,k=void 0;if(K!=null)for(B in K.ref!==void 0&&(k=void 0),K.key!==void 0&&(W=""+K.key),K)!A.call(K,B)||B==="key"||B==="__self"||B==="__source"||B==="ref"&&K.ref===void 0||(F[B]=K[B]);var B=arguments.length-2;if(B===1)F.children=L;else if(1<B){for(var I=Array(B),te=0;te<B;te++)I[te]=arguments[te+2];F.children=I}return X(N.type,W,void 0,void 0,k,F)},ze.createContext=function(N){return N={$$typeof:f,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:u,_context:N},N},ze.createElement=function(N,K,L){var F,W={},k=null;if(K!=null)for(F in K.key!==void 0&&(k=""+K.key),K)A.call(K,F)&&F!=="key"&&F!=="__self"&&F!=="__source"&&(W[F]=K[F]);var B=arguments.length-2;if(B===1)W.children=L;else if(1<B){for(var I=Array(B),te=0;te<B;te++)I[te]=arguments[te+2];W.children=I}if(N&&N.defaultProps)for(F in B=N.defaultProps,B)W[F]===void 0&&(W[F]=B[F]);return X(N,k,void 0,void 0,null,W)},ze.createRef=function(){return{current:null}},ze.forwardRef=function(N){return{$$typeof:h,render:N}},ze.isValidElement=oe,ze.lazy=function(N){return{$$typeof:g,_payload:{_status:-1,_result:N},_init:ee}},ze.memo=function(N,K){return{$$typeof:m,type:N,compare:K===void 0?null:K}},ze.startTransition=function(N){var K=P.T,L={};P.T=L;try{var F=N(),W=P.S;W!==null&&W(L,F),typeof F=="object"&&F!==null&&typeof F.then=="function"&&F.then(pe,q)}catch(k){q(k)}finally{P.T=K}},ze.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},ze.use=function(N){return P.H.use(N)},ze.useActionState=function(N,K,L){return P.H.useActionState(N,K,L)},ze.useCallback=function(N,K){return P.H.useCallback(N,K)},ze.useContext=function(N){return P.H.useContext(N)},ze.useDebugValue=function(){},ze.useDeferredValue=function(N,K){return P.H.useDeferredValue(N,K)},ze.useEffect=function(N,K,L){var F=P.H;if(typeof L=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return F.useEffect(N,K)},ze.useId=function(){return P.H.useId()},ze.useImperativeHandle=function(N,K,L){return P.H.useImperativeHandle(N,K,L)},ze.useInsertionEffect=function(N,K){return P.H.useInsertionEffect(N,K)},ze.useLayoutEffect=function(N,K){return P.H.useLayoutEffect(N,K)},ze.useMemo=function(N,K){return P.H.useMemo(N,K)},ze.useOptimistic=function(N,K){return P.H.useOptimistic(N,K)},ze.useReducer=function(N,K,L){return P.H.useReducer(N,K,L)},ze.useRef=function(N){return P.H.useRef(N)},ze.useState=function(N){return P.H.useState(N)},ze.useSyncExternalStore=function(N,K,L){return P.H.useSyncExternalStore(N,K,L)},ze.useTransition=function(){return P.H.useTransition()},ze.version="19.1.0",ze}var hv;function Ud(){return hv||(hv=1,Yf.exports=ZS()),Yf.exports}var v=Ud();const jr=My(v),Ly=NS({__proto__:null,default:jr},[v]),JS=(n,a,l,i)=>{const s=[l,{code:a,...i||{}}];if(n?.services?.logger?.forward)return n.services.logger.forward(s,"warn","react-i18next::",!0);Mr(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),n?.services?.logger?.warn?n.services.logger.warn(...s):console?.warn&&console.warn(...s)},mv={},vd=(n,a,l,i)=>{Mr(l)&&mv[l]||(Mr(l)&&(mv[l]=new Date),JS(n,a,l,i))},zy=(n,a)=>()=>{if(n.isInitialized)a();else{const l=()=>{setTimeout(()=>{n.off("initialized",l)},0),a()};n.on("initialized",l)}},yd=(n,a,l)=>{n.loadNamespaces(a,zy(n,l))},pv=(n,a,l,i)=>{if(Mr(l)&&(l=[l]),n.options.preload&&n.options.preload.indexOf(a)>-1)return yd(n,l,i);l.forEach(s=>{n.options.ns.indexOf(s)<0&&n.options.ns.push(s)}),n.loadLanguages(a,zy(n,i))},IS=(n,a,l={})=>!a.languages||!a.languages.length?(vd(a,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:a.languages}),!0):a.hasLoadedNamespace(n,{lng:l.lng,precheck:(i,s)=>{if(l.bindI18n&&l.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!s(i.isLanguageChangingTo,n))return!1}}),Mr=n=>typeof n=="string",WS=n=>typeof n=="object"&&n!==null,ew=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,tw={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},nw=n=>tw[n],aw=n=>n.replace(ew,nw);let bd={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:aw};const rw=(n={})=>{bd={...bd,...n}},lw=()=>bd;let ky;const iw=n=>{ky=n},ow=()=>ky,sw={type:"3rdParty",init(n){rw(n.options.react),iw(n)}},uw=v.createContext();class cw{constructor(){this.usedNamespaces={}}addUsedNamespaces(a){a.forEach(l=>{this.usedNamespaces[l]||(this.usedNamespaces[l]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const fw=(n,a)=>{const l=v.useRef();return v.useEffect(()=>{l.current=n},[n,a]),l.current},Uy=(n,a,l,i)=>n.getFixedT(a,l,i),dw=(n,a,l,i)=>v.useCallback(Uy(n,a,l,i),[n,a,l,i]),Ur=(n,a={})=>{const{i18n:l}=a,{i18n:i,defaultNS:s}=v.useContext(uw)||{},u=l||i||ow();if(u&&!u.reportNamespaces&&(u.reportNamespaces=new cw),!u){vd(u,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const $=(A,X)=>Mr(X)?X:WS(X)&&Mr(X.defaultValue)?X.defaultValue:Array.isArray(A)?A[A.length-1]:A,P=[$,{},!1];return P.t=$,P.i18n={},P.ready=!1,P}u.options.react?.wait&&vd(u,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const f={...lw(),...u.options.react,...a},{useSuspense:h,keyPrefix:p}=f;let m=s||u.options?.defaultNS;m=Mr(m)?[m]:m||["translation"],u.reportNamespaces.addUsedNamespaces?.(m);const g=(u.isInitialized||u.initializedStoreOnce)&&m.every($=>IS($,u,f)),x=dw(u,a.lng||null,f.nsMode==="fallback"?m:m[0],p),S=()=>x,w=()=>Uy(u,a.lng||null,f.nsMode==="fallback"?m:m[0],p),[C,R]=v.useState(S);let T=m.join();a.lng&&(T=`${a.lng}${T}`);const O=fw(T),z=v.useRef(!0);v.useEffect(()=>{const{bindI18n:$,bindI18nStore:P}=f;z.current=!0,!g&&!h&&(a.lng?pv(u,a.lng,m,()=>{z.current&&R(w)}):yd(u,m,()=>{z.current&&R(w)})),g&&O&&O!==T&&z.current&&R(w);const A=()=>{z.current&&R(w)};return $&&u?.on($,A),P&&u?.store.on(P,A),()=>{z.current=!1,u&&$&&$?.split(" ").forEach(X=>u.off(X,A)),P&&u&&P.split(" ").forEach(X=>u.store.off(X,A))}},[u,T]),v.useEffect(()=>{z.current&&g&&R(S)},[u,p,g]);const U=[C,u,g];if(U.t=C,U.i18n=u,U.ready=g,g||!g&&!h)return U;throw new Promise($=>{a.lng?pv(u,a.lng,m,()=>$()):yd(u,m,()=>$())})},{slice:hw,forEach:mw}=[];function pw(n){return mw.call(hw.call(arguments,1),a=>{if(a)for(const l in a)n[l]===void 0&&(n[l]=a[l])}),n}function gw(n){return typeof n!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(l=>l.test(n))}const gv=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,vw=function(n,a){const i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},s=encodeURIComponent(a);let u=`${n}=${s}`;if(i.maxAge>0){const f=i.maxAge-0;if(Number.isNaN(f))throw new Error("maxAge should be a Number");u+=`; Max-Age=${Math.floor(f)}`}if(i.domain){if(!gv.test(i.domain))throw new TypeError("option domain is invalid");u+=`; Domain=${i.domain}`}if(i.path){if(!gv.test(i.path))throw new TypeError("option path is invalid");u+=`; Path=${i.path}`}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");u+=`; Expires=${i.expires.toUTCString()}`}if(i.httpOnly&&(u+="; HttpOnly"),i.secure&&(u+="; Secure"),i.sameSite)switch(typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite){case!0:u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"strict":u+="; SameSite=Strict";break;case"none":u+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i.partitioned&&(u+="; Partitioned"),u},vv={create(n,a,l,i){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};l&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+l*60*1e3)),i&&(s.domain=i),document.cookie=vw(n,a,s)},read(n){const a=`${n}=`,l=document.cookie.split(";");for(let i=0;i<l.length;i++){let s=l[i];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(a)===0)return s.substring(a.length,s.length)}return null},remove(n,a){this.create(n,"",-1,a)}};var yw={name:"cookie",lookup(n){let{lookupCookie:a}=n;if(a&&typeof document<"u")return vv.read(a)||void 0},cacheUserLanguage(n,a){let{lookupCookie:l,cookieMinutes:i,cookieDomain:s,cookieOptions:u}=a;l&&typeof document<"u"&&vv.create(l,n,i,s,u)}},bw={name:"querystring",lookup(n){let{lookupQuerystring:a}=n,l;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const u=i.substring(1).split("&");for(let f=0;f<u.length;f++){const h=u[f].indexOf("=");h>0&&u[f].substring(0,h)===a&&(l=u[f].substring(h+1))}}return l}},xw={name:"hash",lookup(n){let{lookupHash:a,lookupFromHashIndex:l}=n,i;if(typeof window<"u"){const{hash:s}=window.location;if(s&&s.length>2){const u=s.substring(1);if(a){const f=u.split("&");for(let h=0;h<f.length;h++){const p=f[h].indexOf("=");p>0&&f[h].substring(0,p)===a&&(i=f[h].substring(p+1))}}if(i)return i;if(!i&&l>-1){const f=s.match(/\/([a-zA-Z-]*)/g);return Array.isArray(f)?f[typeof l=="number"?l:0]?.replace("/",""):void 0}}}return i}};let El=null;const yv=()=>{if(El!==null)return El;try{if(El=typeof window<"u"&&window.localStorage!==null,!El)return!1;const n="i18next.translate.boo";window.localStorage.setItem(n,"foo"),window.localStorage.removeItem(n)}catch{El=!1}return El};var Sw={name:"localStorage",lookup(n){let{lookupLocalStorage:a}=n;if(a&&yv())return window.localStorage.getItem(a)||void 0},cacheUserLanguage(n,a){let{lookupLocalStorage:l}=a;l&&yv()&&window.localStorage.setItem(l,n)}};let Rl=null;const bv=()=>{if(Rl!==null)return Rl;try{if(Rl=typeof window<"u"&&window.sessionStorage!==null,!Rl)return!1;const n="i18next.translate.boo";window.sessionStorage.setItem(n,"foo"),window.sessionStorage.removeItem(n)}catch{Rl=!1}return Rl};var ww={name:"sessionStorage",lookup(n){let{lookupSessionStorage:a}=n;if(a&&bv())return window.sessionStorage.getItem(a)||void 0},cacheUserLanguage(n,a){let{lookupSessionStorage:l}=a;l&&bv()&&window.sessionStorage.setItem(l,n)}},Ew={name:"navigator",lookup(n){const a=[];if(typeof navigator<"u"){const{languages:l,userLanguage:i,language:s}=navigator;if(l)for(let u=0;u<l.length;u++)a.push(l[u]);i&&a.push(i),s&&a.push(s)}return a.length>0?a:void 0}},Rw={name:"htmlTag",lookup(n){let{htmlTag:a}=n,l;const i=a||(typeof document<"u"?document.documentElement:null);return i&&typeof i.getAttribute=="function"&&(l=i.getAttribute("lang")),l}},Cw={name:"path",lookup(n){let{lookupFromPathIndex:a}=n;if(typeof window>"u")return;const l=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(l)?l[typeof a=="number"?a:0]?.replace("/",""):void 0}},Ow={name:"subdomain",lookup(n){let{lookupFromSubdomainIndex:a}=n;const l=typeof a=="number"?a+1:1,i=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(i)return i[l]}};let Py=!1;try{document.cookie,Py=!0}catch{}const Hy=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Py||Hy.splice(1,1);const Aw=()=>({order:Hy,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:n=>n});class By{constructor(a){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(a,l)}init(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=a,this.options=pw(l,this.options||{},Aw()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(yw),this.addDetector(bw),this.addDetector(Sw),this.addDetector(ww),this.addDetector(Ew),this.addDetector(Rw),this.addDetector(Cw),this.addDetector(Ow),this.addDetector(xw)}addDetector(a){return this.detectors[a.name]=a,this}detect(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,l=[];return a.forEach(i=>{if(this.detectors[i]){let s=this.detectors[i].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(l=l.concat(s))}}),l=l.filter(i=>i!=null&&!gw(i)).map(i=>this.options.convertDetectedLanguage(i)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?l:l.length>0?l[0]:null}cacheUserLanguage(a){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;l&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(a)>-1||l.forEach(i=>{this.detectors[i]&&this.detectors[i].cacheUserLanguage(a,this.options)}))}}By.type="languageDetector";const Nw={title:"Claude Code Router",save:"Save",save_and_restart:"Save and Restart",cancel:"Cancel",edit:"Edit",remove:"Remove",delete:"Delete",settings:"Settings",selectFile:"Select File",config_saved_success:"Config saved successfully",config_saved_failed:"Failed to save config",config_saved_restart_success:"Config saved and service restarted successfully",config_saved_restart_failed:"Failed to save config and restart service"},Tw={title:"Sign in to your account",description:"Enter your API key to access the configuration panel",apiKey:"API Key",apiKeyPlaceholder:"Enter your API key",signIn:"Sign In",invalidApiKey:"Invalid API key",configError:"Configuration not loaded",validating:"Validating API key..."},jw={title:"General Settings",log:"Enable Logging",claude_path:"Claude Path",host:"Host",port:"Port",apikey:"API Key",timeout:"API Timeout (ms)",proxy_url:"Proxy URL"},Mw={title:"Custom Transformers",path:"Path",project:"Project",remove:"Remove",add:"Add Custom Transformer",edit:"Edit Custom Transformer",delete:"Delete Custom Transformer",delete_transformer_confirm:"Are you sure you want to delete this custom transformer?",parameters:"Parameters"},_w={title:"Providers",name:"Name",api_base_url:"API Base URL",api_key:"API Key",models:"Models",models_placeholder:"Enter model name and press Enter to add",add_model:"Add Model",select_models:"Select Models",remove:"Remove",add:"Add Provider",edit:"Edit Provider",delete:"Delete",cancel:"Cancel",delete_provider_confirm:"Are you sure you want to delete this provider?",test_connectivity:"Test Connectivity",testing:"Testing...",connection_successful:"Connection successful!",connection_failed:"Connection failed!",missing_credentials:"Missing API base URL or API key",fetch_available_models:"Fetch available models",fetching_models:"Fetching models...",fetch_models_failed:"Failed to fetch models",transformers:"Transformers",select_transformer:"Select Transformer",no_transformers:"No transformers available",provider_transformer:"Provider Transformer",model_transformers:"Model Transformers",transformer_parameters:"Transformer Parameters",add_parameter:"Add Parameter",parameter_name:"Parameter Name",parameter_value:"Parameter Value",selected_transformers:"Selected Transformers",import_from_template:"Import from template",no_templates_found:"No templates found",select_template:"Select a template..."},Dw={title:"Router",default:"Default",background:"Background",think:"Think",longContext:"Long Context",longContextThreshold:"Context Threshold",webSearch:"Web Search",selectModel:"Select a model...",searchModel:"Search model...",noModelFound:"No model found."},Lw={title:"JSON Editor",save:"Save",saving:"Saving...",cancel:"Cancel",save_failed:"Failed to save config",save_and_restart:"Save & Restart"},zw={app:Nw,login:Tw,toplevel:jw,transformers:Mw,providers:_w,router:Dw,json_editor:Lw},kw={title:"Claude Code Router",save:"保存",save_and_restart:"保存并重启",cancel:"取消",edit:"编辑",remove:"移除",delete:"删除",settings:"设置",selectFile:"选择文件",config_saved_success:"配置保存成功",config_saved_failed:"配置保存失败",config_saved_restart_success:"配置保存并服务重启成功",config_saved_restart_failed:"配置保存并服务重启失败"},Uw={title:"登录到您的账户",description:"请输入您的API密钥以访问配置面板",apiKey:"API密钥",apiKeyPlaceholder:"请输入您的API密钥",signIn:"登录",invalidApiKey:"API密钥无效",configError:"配置未加载",validating:"正在验证API密钥..."},Pw={title:"通用设置",log:"启用日志",claude_path:"Claude 路径",host:"主机",port:"端口",apikey:"API 密钥",timeout:"API 超时时间 (毫秒)",proxy_url:"代理地址"},Hw={title:"自定义转换器",path:"路径",project:"项目",remove:"移除",add:"添加自定义转换器",edit:"编辑自定义转换器",delete:"删除自定义转换器",delete_transformer_confirm:"您确定要删除此自定义转换器吗?",parameters:"参数"},Bw={title:"供应商",name:"名称",api_base_url:"API 基础地址",api_key:"API 密钥",models:"模型",models_placeholder:"输入模型名称并按回车键添加",add_model:"添加模型",select_models:"选择模型",remove:"移除",add:"添加供应商",edit:"编辑供应商",delete:"删除",cancel:"取消",delete_provider_confirm:"您确定要删除此供应商吗?",test_connectivity:"测试连通性",testing:"测试中...",connection_successful:"连接成功!",connection_failed:"连接失败!",missing_credentials:"缺少 API 基础地址或 API 密钥",fetch_available_models:"获取可用模型",fetching_models:"获取模型中...",fetch_models_failed:"获取模型失败",transformers:"转换器",select_transformer:"选择转换器",no_transformers:"无可用转换器",provider_transformer:"供应商转换器",model_transformers:"模型转换器",transformer_parameters:"转换器参数",add_parameter:"添加参数",parameter_name:"参数名称",parameter_value:"参数值",selected_transformers:"已选转换器",import_from_template:"从模板导入",no_templates_found:"未找到模板",select_template:"选择一个模板..."},$w={title:"路由",default:"默认",background:"后台",think:"思考",longContext:"长上下文",longContextThreshold:"上下文阈值",webSearch:"网络搜索",selectModel:"选择一个模型...",searchModel:"搜索模型...",noModelFound:"未找到模型."},Vw={title:"JSON 编辑器",save:"保存",saving:"保存中...",cancel:"取消",save_failed:"配置保存失败",save_and_restart:"保存并重启"},Yw={app:kw,login:Uw,toplevel:Pw,transformers:Hw,providers:Bw,router:$w,json_editor:Vw},qw={en:{translation:zw},zh:{translation:Yw}};zt.use(By).use(sw).init({resources:qw,fallbackLng:"en",interpolation:{escapeValue:!1}});var qf={exports:{}},Xi={},Gf={exports:{}},Kf={};/**
24
24
  * @license React
25
25
  * scheduler.production.js
26
26
  *
@@ -28,7 +28,7 @@
28
28
  *
29
29
  * This source code is licensed under the MIT license found in the
30
30
  * LICENSE file in the root directory of this source tree.
31
- */var xv;function Gw(){return xv||(xv=1,function(n){function a(L,W){var K=L.length;L.push(W);e:for(;0<K;){var he=K-1>>>1,T=L[he];if(0<s(T,W))L[he]=W,L[K]=T,K=he;else break e}}function l(L){return L.length===0?null:L[0]}function i(L){if(L.length===0)return null;var W=L[0],K=L.pop();if(K!==W){L[0]=K;e:for(var he=0,T=L.length,$=T>>>1;he<$;){var O=2*(he+1)-1,M=L[O],U=O+1,V=L[U];if(0>s(M,K))U<T&&0>s(V,M)?(L[he]=V,L[U]=K,he=U):(L[he]=M,L[O]=K,he=O);else if(U<T&&0>s(V,K))L[he]=V,L[U]=K,he=U;else break e}}return W}function s(L,W){var K=L.sortIndex-W.sortIndex;return K!==0?K:L.id-W.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var f=Date,h=f.now();n.unstable_now=function(){return f.now()-h}}var p=[],m=[],g=1,x=null,S=3,w=!1,C=!1,R=!1,j=!1,A=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;function Y(L){for(var W=l(m);W!==null;){if(W.callback===null)i(m);else if(W.startTime<=L)i(m),W.sortIndex=W.expirationTime,a(p,W);else break;W=l(m)}}function B(L){if(R=!1,Y(L),!C)if(l(p)!==null)C=!0,N||(N=!0,Se());else{var W=l(m);W!==null&&ue(B,W.startTime-L)}}var N=!1,X=-1,ee=5,ie=-1;function oe(){return j?!0:!(n.unstable_now()-ie<ee)}function Oe(){if(j=!1,N){var L=n.unstable_now();ie=L;var W=!0;try{e:{C=!1,R&&(R=!1,k(X),X=-1),w=!0;var K=S;try{t:{for(Y(L),x=l(p);x!==null&&!(x.expirationTime>L&&oe());){var he=x.callback;if(typeof he=="function"){x.callback=null,S=x.priorityLevel;var T=he(x.expirationTime<=L);if(L=n.unstable_now(),typeof T=="function"){x.callback=T,Y(L),W=!0;break t}x===l(p)&&i(p),Y(L)}else i(p);x=l(p)}if(x!==null)W=!0;else{var $=l(m);$!==null&&ue(B,$.startTime-L),W=!1}}break e}finally{x=null,S=K,w=!1}W=void 0}}finally{W?Se():N=!1}}}var Se;if(typeof P=="function")Se=function(){P(Oe)};else if(typeof MessageChannel<"u"){var de=new MessageChannel,fe=de.port2;de.port1.onmessage=Oe,Se=function(){fe.postMessage(null)}}else Se=function(){A(Oe,0)};function ue(L,W){X=A(function(){L(n.unstable_now())},W)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(L){L.callback=null},n.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ee=0<L?Math.floor(1e3/L):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(L){switch(S){case 1:case 2:case 3:var W=3;break;default:W=S}var K=S;S=W;try{return L()}finally{S=K}},n.unstable_requestPaint=function(){j=!0},n.unstable_runWithPriority=function(L,W){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var K=S;S=L;try{return W()}finally{S=K}},n.unstable_scheduleCallback=function(L,W,K){var he=n.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?he+K:he):K=he,L){case 1:var T=-1;break;case 2:T=250;break;case 5:T=1073741823;break;case 4:T=1e4;break;default:T=5e3}return T=K+T,L={id:g++,callback:W,priorityLevel:L,startTime:K,expirationTime:T,sortIndex:-1},K>he?(L.sortIndex=K,a(m,L),l(p)===null&&L===l(m)&&(R?(k(X),X=-1):R=!0,ue(B,K-he))):(L.sortIndex=T,a(p,L),C||w||(C=!0,N||(N=!0,Se()))),L},n.unstable_shouldYield=oe,n.unstable_wrapCallback=function(L){var W=S;return function(){var K=S;S=W;try{return L.apply(this,arguments)}finally{S=K}}}}(Kf)),Kf}var Sv;function Kw(){return Sv||(Sv=1,Gf.exports=Gw()),Gf.exports}var Ff={exports:{}},_t={};/**
31
+ */var xv;function Gw(){return xv||(xv=1,function(n){function a(_,ee){var q=_.length;_.push(ee);e:for(;0<q;){var pe=q-1>>>1,N=_[pe];if(0<s(N,ee))_[pe]=ee,_[q]=N,q=pe;else break e}}function l(_){return _.length===0?null:_[0]}function i(_){if(_.length===0)return null;var ee=_[0],q=_.pop();if(q!==ee){_[0]=q;e:for(var pe=0,N=_.length,K=N>>>1;pe<K;){var L=2*(pe+1)-1,F=_[L],W=L+1,k=_[W];if(0>s(F,q))W<N&&0>s(k,F)?(_[pe]=k,_[W]=q,pe=W):(_[pe]=F,_[L]=q,pe=L);else if(W<N&&0>s(k,q))_[pe]=k,_[W]=q,pe=W;else break e}}return ee}function s(_,ee){var q=_.sortIndex-ee.sortIndex;return q!==0?q:_.id-ee.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var f=Date,h=f.now();n.unstable_now=function(){return f.now()-h}}var p=[],m=[],g=1,x=null,S=3,w=!1,C=!1,R=!1,T=!1,O=typeof setTimeout=="function"?setTimeout:null,z=typeof clearTimeout=="function"?clearTimeout:null,U=typeof setImmediate<"u"?setImmediate:null;function $(_){for(var ee=l(m);ee!==null;){if(ee.callback===null)i(m);else if(ee.startTime<=_)i(m),ee.sortIndex=ee.expirationTime,a(p,ee);else break;ee=l(m)}}function P(_){if(R=!1,$(_),!C)if(l(p)!==null)C=!0,A||(A=!0,we());else{var ee=l(m);ee!==null&&ce(P,ee.startTime-_)}}var A=!1,X=-1,ne=5,oe=-1;function se(){return T?!0:!(n.unstable_now()-oe<ne)}function Ne(){if(T=!1,A){var _=n.unstable_now();oe=_;var ee=!0;try{e:{C=!1,R&&(R=!1,z(X),X=-1),w=!0;var q=S;try{t:{for($(_),x=l(p);x!==null&&!(x.expirationTime>_&&se());){var pe=x.callback;if(typeof pe=="function"){x.callback=null,S=x.priorityLevel;var N=pe(x.expirationTime<=_);if(_=n.unstable_now(),typeof N=="function"){x.callback=N,$(_),ee=!0;break t}x===l(p)&&i(p),$(_)}else i(p);x=l(p)}if(x!==null)ee=!0;else{var K=l(m);K!==null&&ce(P,K.startTime-_),ee=!1}}break e}finally{x=null,S=q,w=!1}ee=void 0}}finally{ee?we():A=!1}}}var we;if(typeof U=="function")we=function(){U(Ne)};else if(typeof MessageChannel<"u"){var he=new MessageChannel,de=he.port2;he.port1.onmessage=Ne,we=function(){de.postMessage(null)}}else we=function(){O(Ne,0)};function ce(_,ee){X=O(function(){_(n.unstable_now())},ee)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(_){_.callback=null},n.unstable_forceFrameRate=function(_){0>_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ne=0<_?Math.floor(1e3/_):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(_){switch(S){case 1:case 2:case 3:var ee=3;break;default:ee=S}var q=S;S=ee;try{return _()}finally{S=q}},n.unstable_requestPaint=function(){T=!0},n.unstable_runWithPriority=function(_,ee){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var q=S;S=_;try{return ee()}finally{S=q}},n.unstable_scheduleCallback=function(_,ee,q){var pe=n.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?pe+q:pe):q=pe,_){case 1:var N=-1;break;case 2:N=250;break;case 5:N=1073741823;break;case 4:N=1e4;break;default:N=5e3}return N=q+N,_={id:g++,callback:ee,priorityLevel:_,startTime:q,expirationTime:N,sortIndex:-1},q>pe?(_.sortIndex=q,a(m,_),l(p)===null&&_===l(m)&&(R?(z(X),X=-1):R=!0,ce(P,q-pe))):(_.sortIndex=N,a(p,_),C||w||(C=!0,A||(A=!0,we()))),_},n.unstable_shouldYield=se,n.unstable_wrapCallback=function(_){var ee=S;return function(){var q=S;S=ee;try{return _.apply(this,arguments)}finally{S=q}}}}(Kf)),Kf}var Sv;function Kw(){return Sv||(Sv=1,Gf.exports=Gw()),Gf.exports}var Ff={exports:{}},Lt={};/**
32
32
  * @license React
33
33
  * react-dom.production.js
34
34
  *
@@ -36,7 +36,7 @@
36
36
  *
37
37
  * This source code is licensed under the MIT license found in the
38
38
  * LICENSE file in the root directory of this source tree.
39
- */var wv;function Fw(){if(wv)return _t;wv=1;var n=Ud();function a(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)m+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var i={d:{f:l,r:function(){throw Error(a(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},s=Symbol.for("react.portal");function u(p,m,g){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:x==null?null:""+x,children:p,containerInfo:m,implementation:g}}var f=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return _t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,_t.createPortal=function(p,m){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(a(299));return u(p,m,null,g)},_t.flushSync=function(p){var m=f.T,g=i.p;try{if(f.T=null,i.p=2,p)return p()}finally{f.T=m,i.p=g,i.d.f()}},_t.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,i.d.C(p,m))},_t.prefetchDNS=function(p){typeof p=="string"&&i.d.D(p)},_t.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var g=m.as,x=h(g,m.crossOrigin),S=typeof m.integrity=="string"?m.integrity:void 0,w=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;g==="style"?i.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:x,integrity:S,fetchPriority:w}):g==="script"&&i.d.X(p,{crossOrigin:x,integrity:S,fetchPriority:w,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},_t.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var g=h(m.as,m.crossOrigin);i.d.M(p,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&i.d.M(p)},_t.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var g=m.as,x=h(g,m.crossOrigin);i.d.L(p,g,{crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},_t.preloadModule=function(p,m){if(typeof p=="string")if(m){var g=h(m.as,m.crossOrigin);i.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else i.d.m(p)},_t.requestFormReset=function(p){i.d.r(p)},_t.unstable_batchedUpdates=function(p,m){return p(m)},_t.useFormState=function(p,m,g){return f.H.useFormState(p,m,g)},_t.useFormStatus=function(){return f.H.useHostTransitionStatus()},_t.version="19.1.0",_t}var Ev;function $y(){if(Ev)return Ff.exports;Ev=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),Ff.exports=Fw(),Ff.exports}/**
39
+ */var wv;function Fw(){if(wv)return Lt;wv=1;var n=Ud();function a(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)m+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var i={d:{f:l,r:function(){throw Error(a(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},s=Symbol.for("react.portal");function u(p,m,g){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:x==null?null:""+x,children:p,containerInfo:m,implementation:g}}var f=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Lt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Lt.createPortal=function(p,m){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(a(299));return u(p,m,null,g)},Lt.flushSync=function(p){var m=f.T,g=i.p;try{if(f.T=null,i.p=2,p)return p()}finally{f.T=m,i.p=g,i.d.f()}},Lt.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,i.d.C(p,m))},Lt.prefetchDNS=function(p){typeof p=="string"&&i.d.D(p)},Lt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var g=m.as,x=h(g,m.crossOrigin),S=typeof m.integrity=="string"?m.integrity:void 0,w=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;g==="style"?i.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:x,integrity:S,fetchPriority:w}):g==="script"&&i.d.X(p,{crossOrigin:x,integrity:S,fetchPriority:w,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Lt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var g=h(m.as,m.crossOrigin);i.d.M(p,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&i.d.M(p)},Lt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var g=m.as,x=h(g,m.crossOrigin);i.d.L(p,g,{crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Lt.preloadModule=function(p,m){if(typeof p=="string")if(m){var g=h(m.as,m.crossOrigin);i.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else i.d.m(p)},Lt.requestFormReset=function(p){i.d.r(p)},Lt.unstable_batchedUpdates=function(p,m){return p(m)},Lt.useFormState=function(p,m,g){return f.H.useFormState(p,m,g)},Lt.useFormStatus=function(){return f.H.useHostTransitionStatus()},Lt.version="19.1.0",Lt}var Ev;function $y(){if(Ev)return Ff.exports;Ev=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),Ff.exports=Fw(),Ff.exports}/**
40
40
  * @license React
41
41
  * react-dom-client.production.js
42
42
  *
@@ -44,15 +44,15 @@
44
44
  *
45
45
  * This source code is licensed under the MIT license found in the
46
46
  * LICENSE file in the root directory of this source tree.
47
- */var Rv;function Xw(){if(Rv)return Xi;Rv=1;var n=Kw(),a=Ud(),l=$y();function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function f(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h(e){if(u(e)!==e)throw Error(i(188))}function p(e){var t=e.alternate;if(!t){if(t=u(e),t===null)throw Error(i(188));return t!==e?null:e}for(var r=e,o=t;;){var c=r.return;if(c===null)break;var d=c.alternate;if(d===null){if(o=c.return,o!==null){r=o;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===r)return h(c),e;if(d===o)return h(c),t;d=d.sibling}throw Error(i(188))}if(r.return!==o.return)r=c,o=d;else{for(var b=!1,E=c.child;E;){if(E===r){b=!0,r=c,o=d;break}if(E===o){b=!0,o=c,r=d;break}E=E.sibling}if(!b){for(E=d.child;E;){if(E===r){b=!0,r=d,o=c;break}if(E===o){b=!0,o=d,r=c;break}E=E.sibling}if(!b)throw Error(i(189))}}if(r.alternate!==o)throw Error(i(190))}if(r.tag!==3)throw Error(i(188));return r.stateNode.current===r?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var g=Object.assign,x=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),A=Symbol.for("react.provider"),k=Symbol.for("react.consumer"),P=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),ee=Symbol.for("react.lazy"),ie=Symbol.for("react.activity"),oe=Symbol.for("react.memo_cache_sentinel"),Oe=Symbol.iterator;function Se(e){return e===null||typeof e!="object"?null:(e=Oe&&e[Oe]||e["@@iterator"],typeof e=="function"?e:null)}var de=Symbol.for("react.client.reference");function fe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===de?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case C:return"Fragment";case j:return"Profiler";case R:return"StrictMode";case B:return"Suspense";case N:return"SuspenseList";case ie:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case P:return(e.displayName||"Context")+".Provider";case k:return(e._context.displayName||"Context")+".Consumer";case Y:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case X:return t=e.displayName||null,t!==null?t:fe(e.type)||"Memo";case ee:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}var ue=Array.isArray,L=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K={pending:!1,data:null,method:null,action:null},he=[],T=-1;function $(e){return{current:e}}function O(e){0>T||(e.current=he[T],he[T]=null,T--)}function M(e,t){T++,he[T]=e.current,e.current=t}var U=$(null),V=$(null),I=$(null),re=$(null);function ce(e,t){switch(M(I,t),M(V,e),M(U,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Rg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Rg(t),e=Cg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}O(U),M(U,e)}function Ee(){O(U),O(V),O(I)}function ke(e){e.memoizedState!==null&&M(re,e);var t=U.current,r=Cg(t,e.type);t!==r&&(M(V,e),M(U,r))}function xt(e){V.current===e&&(O(U),O(V)),re.current===e&&(O(re),$i._currentValue=K)}var qt=Object.prototype.hasOwnProperty,Tn=n.unstable_scheduleCallback,xn=n.unstable_cancelCallback,Du=n.unstable_shouldYield,Lu=n.unstable_requestPaint,Gt=n.unstable_now,zu=n.unstable_getCurrentPriorityLevel,xo=n.unstable_ImmediatePriority,So=n.unstable_UserBlockingPriority,Hr=n.unstable_NormalPriority,Fn=n.unstable_LowPriority,xa=n.unstable_IdlePriority,wo=n.log,Jl=n.unstable_setDisableYieldValue,Ut=null,it=null;function Sn(e){if(typeof wo=="function"&&Jl(e),it&&typeof it.setStrictMode=="function")try{it.setStrictMode(Ut,e)}catch{}}var At=Math.clz32?Math.clz32:Eo,ku=Math.log,jn=Math.LN2;function Eo(e){return e>>>=0,e===0?32:31-(ku(e)/jn|0)|0}var ar=256,rr=4194304;function Xn(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 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&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function lr(e,t,r){var o=e.pendingLanes;if(o===0)return 0;var c=0,d=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var E=o&134217727;return E!==0?(o=E&~d,o!==0?c=Xn(o):(b&=E,b!==0?c=Xn(b):r||(r=E&~e,r!==0&&(c=Xn(r))))):(E=o&~d,E!==0?c=Xn(E):b!==0?c=Xn(b):r||(r=o&~e,r!==0&&(c=Xn(r)))),c===0?0:t!==0&&t!==c&&(t&d)===0&&(d=c&-c,r=t&-t,d>=r||d===32&&(r&4194048)!==0)?t:c}function Mn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ro(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Br(){var e=ar;return ar<<=1,(ar&4194048)===0&&(ar=256),e}function Co(){var e=rr;return rr<<=1,(rr&62914560)===0&&(rr=4194304),e}function $r(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function ir(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Oo(e,t,r,o,c,d){var b=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var E=e.entanglements,_=e.expirationTimes,F=e.hiddenUpdates;for(r=b&~r;0<r;){var te=31-At(r),ae=1<<te;E[te]=0,_[te]=-1;var Q=F[te];if(Q!==null)for(F[te]=null,te=0;te<Q.length;te++){var Z=Q[te];Z!==null&&(Z.lane&=-536870913)}r&=~ae}o!==0&&or(e,o,0),d!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=d&~(b&~t))}function or(e,t,r){e.pendingLanes|=t,e.suspendedLanes&=~t;var o=31-At(t);e.entangledLanes|=t,e.entanglements[o]=e.entanglements[o]|1073741824|r&4194090}function sr(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var o=31-At(r),c=1<<o;c&t|e[o]&t&&(e[o]|=t),r&=~c}}function Il(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Wl(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function D(){var e=W.p;return e!==0?e:(e=window.event,e===void 0?32:qg(e.type))}function q(e,t){var r=W.p;try{return W.p=e,t()}finally{W.p=r}}var J=Math.random().toString(36).slice(2),le="__reactFiber$"+J,se="__reactProps$"+J,ve="__reactContainer$"+J,xe="__reactEvents$"+J,ye="__reactListeners$"+J,Ce="__reactHandles$"+J,Ae="__reactResources$"+J,be="__reactMarker$"+J;function we(e){delete e[le],delete e[se],delete e[xe],delete e[ye],delete e[Ce]}function ze(e){var t=e[le];if(t)return t;for(var r=e.parentNode;r;){if(t=r[ve]||r[le]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Tg(e);e!==null;){if(r=e[le])return r;e=Tg(e)}return t}e=r,r=e.parentNode}return null}function Fe(e){if(e=e[le]||e[ve]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function ut(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function ct(e){var t=e[Ae];return t||(t=e[Ae]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function _e(e){e[be]=!0}var Ze=new Set,_n={};function Kt(e,t){Lt(e,t),Lt(e+"Capture",t)}function Lt(e,t){for(_n[e]=t,e=0;e<t.length;e++)Ze.add(t[e])}var on=RegExp("^[: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]*$"),Vr={},Sa={};function Qn(e){return qt.call(Sa,e)?!0:qt.call(Vr,e)?!1:on.test(e)?Sa[e]=!0:(Vr[e]=!0,!1)}function Zn(e,t,r){if(Qn(t))if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var o=t.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+r)}}function Jn(e,t,r){if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+r)}}function He(e,t,r,o){if(o===null)e.removeAttribute(r);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(t,r,""+o)}}var gt,ur;function sn(e){if(gt===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);gt=t&&t[1]||"",ur=-1<r.stack.indexOf(`
47
+ */var Rv;function Xw(){if(Rv)return Xi;Rv=1;var n=Kw(),a=Ud(),l=$y();function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function f(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h(e){if(u(e)!==e)throw Error(i(188))}function p(e){var t=e.alternate;if(!t){if(t=u(e),t===null)throw Error(i(188));return t!==e?null:e}for(var r=e,o=t;;){var c=r.return;if(c===null)break;var d=c.alternate;if(d===null){if(o=c.return,o!==null){r=o;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===r)return h(c),e;if(d===o)return h(c),t;d=d.sibling}throw Error(i(188))}if(r.return!==o.return)r=c,o=d;else{for(var b=!1,E=c.child;E;){if(E===r){b=!0,r=c,o=d;break}if(E===o){b=!0,o=c,r=d;break}E=E.sibling}if(!b){for(E=d.child;E;){if(E===r){b=!0,r=d,o=c;break}if(E===o){b=!0,o=d,r=c;break}E=E.sibling}if(!b)throw Error(i(189))}}if(r.alternate!==o)throw Error(i(190))}if(r.tag!==3)throw Error(i(188));return r.stateNode.current===r?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var g=Object.assign,x=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),z=Symbol.for("react.consumer"),U=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),ne=Symbol.for("react.lazy"),oe=Symbol.for("react.activity"),se=Symbol.for("react.memo_cache_sentinel"),Ne=Symbol.iterator;function we(e){return e===null||typeof e!="object"?null:(e=Ne&&e[Ne]||e["@@iterator"],typeof e=="function"?e:null)}var he=Symbol.for("react.client.reference");function de(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===he?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case C:return"Fragment";case T:return"Profiler";case R:return"StrictMode";case P:return"Suspense";case A:return"SuspenseList";case oe:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case U:return(e.displayName||"Context")+".Provider";case z:return(e._context.displayName||"Context")+".Consumer";case $:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case X:return t=e.displayName||null,t!==null?t:de(e.type)||"Memo";case ne:t=e._payload,e=e._init;try{return de(e(t))}catch{}}return null}var ce=Array.isArray,_=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q={pending:!1,data:null,method:null,action:null},pe=[],N=-1;function K(e){return{current:e}}function L(e){0>N||(e.current=pe[N],pe[N]=null,N--)}function F(e,t){N++,pe[N]=e.current,e.current=t}var W=K(null),k=K(null),B=K(null),I=K(null);function te(e,t){switch(F(B,t),F(k,e),F(W,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Rg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Rg(t),e=Cg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(W),F(W,e)}function fe(){L(W),L(k),L(B)}function me(e){e.memoizedState!==null&&F(I,e);var t=W.current,r=Cg(t,e.type);t!==r&&(F(k,e),F(W,r))}function Ce(e){k.current===e&&(L(W),L(k)),I.current===e&&(L(I),$i._currentValue=q)}var Ye=Object.prototype.hasOwnProperty,Nt=n.unstable_scheduleCallback,Kt=n.unstable_cancelCallback,Du=n.unstable_shouldYield,Lu=n.unstable_requestPaint,Ft=n.unstable_now,zu=n.unstable_getCurrentPriorityLevel,xo=n.unstable_ImmediatePriority,So=n.unstable_UserBlockingPriority,Hr=n.unstable_NormalPriority,Fn=n.unstable_LowPriority,xa=n.unstable_IdlePriority,wo=n.log,Jl=n.unstable_setDisableYieldValue,Ht=null,st=null;function wn(e){if(typeof wo=="function"&&Jl(e),st&&typeof st.setStrictMode=="function")try{st.setStrictMode(Ht,e)}catch{}}var Tt=Math.clz32?Math.clz32:Eo,ku=Math.log,jn=Math.LN2;function Eo(e){return e>>>=0,e===0?32:31-(ku(e)/jn|0)|0}var rr=256,lr=4194304;function Xn(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 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&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ir(e,t,r){var o=e.pendingLanes;if(o===0)return 0;var c=0,d=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var E=o&134217727;return E!==0?(o=E&~d,o!==0?c=Xn(o):(b&=E,b!==0?c=Xn(b):r||(r=E&~e,r!==0&&(c=Xn(r))))):(E=o&~d,E!==0?c=Xn(E):b!==0?c=Xn(b):r||(r=o&~e,r!==0&&(c=Xn(r)))),c===0?0:t!==0&&t!==c&&(t&d)===0&&(d=c&-c,r=t&-t,d>=r||d===32&&(r&4194048)!==0)?t:c}function Mn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ro(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Br(){var e=rr;return rr<<=1,(rr&4194048)===0&&(rr=256),e}function Co(){var e=lr;return lr<<=1,(lr&62914560)===0&&(lr=4194304),e}function $r(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function or(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Oo(e,t,r,o,c,d){var b=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var E=e.entanglements,j=e.expirationTimes,G=e.hiddenUpdates;for(r=b&~r;0<r;){var ae=31-Tt(r),le=1<<ae;E[ae]=0,j[ae]=-1;var Q=G[ae];if(Q!==null)for(G[ae]=null,ae=0;ae<Q.length;ae++){var Z=Q[ae];Z!==null&&(Z.lane&=-536870913)}r&=~le}o!==0&&sr(e,o,0),d!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=d&~(b&~t))}function sr(e,t,r){e.pendingLanes|=t,e.suspendedLanes&=~t;var o=31-Tt(t);e.entangledLanes|=t,e.entanglements[o]=e.entanglements[o]|1073741824|r&4194090}function ur(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var o=31-Tt(r),c=1<<o;c&t|e[o]&t&&(e[o]|=t),r&=~c}}function Il(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Wl(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function M(){var e=ee.p;return e!==0?e:(e=window.event,e===void 0?32:qg(e.type))}function V(e,t){var r=ee.p;try{return ee.p=e,t()}finally{ee.p=r}}var J=Math.random().toString(36).slice(2),ie="__reactFiber$"+J,ue="__reactProps$"+J,be="__reactContainer$"+J,Ee="__reactEvents$"+J,xe="__reactListeners$"+J,Ae="__reactHandles$"+J,Te="__reactResources$"+J,Se="__reactMarker$"+J;function Re(e){delete e[ie],delete e[ue],delete e[Ee],delete e[xe],delete e[Ae]}function Ue(e){var t=e[ie];if(t)return t;for(var r=e.parentNode;r;){if(t=r[be]||r[ie]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Tg(e);e!==null;){if(r=e[ie])return r;e=Tg(e)}return t}e=r,r=e.parentNode}return null}function Qe(e){if(e=e[ie]||e[be]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function ft(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function dt(e){var t=e[Te];return t||(t=e[Te]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Le(e){e[Se]=!0}var Ie=new Set,_n={};function Xt(e,t){kt(e,t),kt(e+"Capture",t)}function kt(e,t){for(_n[e]=t,e=0;e<t.length;e++)Ie.add(t[e])}var un=RegExp("^[: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]*$"),Vr={},Sa={};function Qn(e){return Ye.call(Sa,e)?!0:Ye.call(Vr,e)?!1:un.test(e)?Sa[e]=!0:(Vr[e]=!0,!1)}function Zn(e,t,r){if(Qn(t))if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var o=t.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+r)}}function Jn(e,t,r){if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+r)}}function Be(e,t,r,o){if(o===null)e.removeAttribute(r);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(t,r,""+o)}}var bt,cr;function cn(e){if(bt===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);bt=t&&t[1]||"",cr=-1<r.stack.indexOf(`
48
48
  at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
49
- `+gt+e+ur}var ot=!1;function wa(e,t){if(!e||ot)return"";ot=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(t){var ae=function(){throw Error()};if(Object.defineProperty(ae.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ae,[])}catch(Z){var Q=Z}Reflect.construct(e,[],ae)}else{try{ae.call()}catch(Z){Q=Z}e.call(ae.prototype)}}else{try{throw Error()}catch(Z){Q=Z}(ae=e())&&typeof ae.catch=="function"&&ae.catch(function(){})}}catch(Z){if(Z&&Q&&typeof Z.stack=="string")return[Z.stack,Q.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=o.DetermineComponentFrameRoot(),b=d[0],E=d[1];if(b&&E){var _=b.split(`
50
- `),F=E.split(`
51
- `);for(c=o=0;o<_.length&&!_[o].includes("DetermineComponentFrameRoot");)o++;for(;c<F.length&&!F[c].includes("DetermineComponentFrameRoot");)c++;if(o===_.length||c===F.length)for(o=_.length-1,c=F.length-1;1<=o&&0<=c&&_[o]!==F[c];)c--;for(;1<=o&&0<=c;o--,c--)if(_[o]!==F[c]){if(o!==1||c!==1)do if(o--,c--,0>c||_[o]!==F[c]){var te=`
52
- `+_[o].replace(" at new "," at ");return e.displayName&&te.includes("<anonymous>")&&(te=te.replace("<anonymous>",e.displayName)),te}while(1<=o&&0<=c);break}}}finally{ot=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?sn(r):""}function Ao(e){switch(e.tag){case 26:case 27:case 5:return sn(e.type);case 16:return sn("Lazy");case 13:return sn("Suspense");case 19:return sn("SuspenseList");case 0:case 15:return wa(e.type,!1);case 11:return wa(e.type.render,!1);case 1:return wa(e.type,!0);case 31:return sn("Activity");default:return""}}function No(e){try{var t="";do t+=Ao(e),e=e.return;while(e);return t}catch(r){return`
49
+ `+bt+e+cr}var ut=!1;function wa(e,t){if(!e||ut)return"";ut=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(t){var le=function(){throw Error()};if(Object.defineProperty(le.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(le,[])}catch(Z){var Q=Z}Reflect.construct(e,[],le)}else{try{le.call()}catch(Z){Q=Z}e.call(le.prototype)}}else{try{throw Error()}catch(Z){Q=Z}(le=e())&&typeof le.catch=="function"&&le.catch(function(){})}}catch(Z){if(Z&&Q&&typeof Z.stack=="string")return[Z.stack,Q.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=o.DetermineComponentFrameRoot(),b=d[0],E=d[1];if(b&&E){var j=b.split(`
50
+ `),G=E.split(`
51
+ `);for(c=o=0;o<j.length&&!j[o].includes("DetermineComponentFrameRoot");)o++;for(;c<G.length&&!G[c].includes("DetermineComponentFrameRoot");)c++;if(o===j.length||c===G.length)for(o=j.length-1,c=G.length-1;1<=o&&0<=c&&j[o]!==G[c];)c--;for(;1<=o&&0<=c;o--,c--)if(j[o]!==G[c]){if(o!==1||c!==1)do if(o--,c--,0>c||j[o]!==G[c]){var ae=`
52
+ `+j[o].replace(" at new "," at ");return e.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",e.displayName)),ae}while(1<=o&&0<=c);break}}}finally{ut=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?cn(r):""}function Ao(e){switch(e.tag){case 26:case 27:case 5:return cn(e.type);case 16:return cn("Lazy");case 13:return cn("Suspense");case 19:return cn("SuspenseList");case 0:case 15:return wa(e.type,!1);case 11:return wa(e.type.render,!1);case 1:return wa(e.type,!0);case 31:return cn("Activity");default:return""}}function No(e){try{var t="";do t+=Ao(e),e=e.return;while(e);return t}catch(r){return`
53
53
  Error generating stack: `+r.message+`
54
- `+r.stack}}function un(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function bh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ex(e){var t=bh(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var c=r.get,d=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(b){o=""+b,d.call(this,b)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return o},setValue:function(b){o=""+b},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function To(e){e._valueTracker||(e._valueTracker=Ex(e))}function xh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),o="";return e&&(o=bh(e)?e.checked?"true":"false":e.value),e=o,e!==r?(t.setValue(e),!0):!1}function jo(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}}var Rx=/[\n"\\]/g;function cn(e){return e.replace(Rx,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Uu(e,t,r,o,c,d,b,E){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),t!=null?b==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+un(t)):e.value!==""+un(t)&&(e.value=""+un(t)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),t!=null?Pu(e,b,un(t)):r!=null?Pu(e,b,un(r)):o!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+un(E):e.removeAttribute("name")}function Sh(e,t,r,o,c,d,b,E){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||r!=null){if(!(d!=="submit"&&d!=="reset"||t!=null))return;r=r!=null?""+un(r):"",t=t!=null?""+un(t):r,E||t===e.value||(e.value=t),e.defaultValue=t}o=o??c,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=E?e.checked:!!o,e.defaultChecked=!!o,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b)}function Pu(e,t,r){t==="number"&&jo(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function Yr(e,t,r,o){if(e=e.options,t){t={};for(var c=0;c<r.length;c++)t["$"+r[c]]=!0;for(r=0;r<e.length;r++)c=t.hasOwnProperty("$"+e[r].value),e[r].selected!==c&&(e[r].selected=c),c&&o&&(e[r].defaultSelected=!0)}else{for(r=""+un(r),t=null,c=0;c<e.length;c++){if(e[c].value===r){e[c].selected=!0,o&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function wh(e,t,r){if(t!=null&&(t=""+un(t),t!==e.value&&(e.value=t),r==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=r!=null?""+un(r):""}function Eh(e,t,r,o){if(t==null){if(o!=null){if(r!=null)throw Error(i(92));if(ue(o)){if(1<o.length)throw Error(i(93));o=o[0]}r=o}r==null&&(r=""),t=r}r=un(t),e.defaultValue=r,o=e.textContent,o===r&&o!==""&&o!==null&&(e.value=o)}function qr(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Cx=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Rh(e,t,r){var o=t.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?o?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":o?e.setProperty(t,r):typeof r!="number"||r===0||Cx.has(t)?t==="float"?e.cssFloat=r:e[t]=(""+r).trim():e[t]=r+"px"}function Ch(e,t,r){if(t!=null&&typeof t!="object")throw Error(i(62));if(e=e.style,r!=null){for(var o in r)!r.hasOwnProperty(o)||t!=null&&t.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var c in t)o=t[c],t.hasOwnProperty(c)&&r[c]!==o&&Rh(e,c,o)}else for(var d in t)t.hasOwnProperty(d)&&Rh(e,d,t[d])}function Hu(e){if(e.indexOf("-")===-1)return!1;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 Ox=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Ax=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Mo(e){return Ax.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Bu=null;function $u(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Gr=null,Kr=null;function Oh(e){var t=Fe(e);if(t&&(e=t.stateNode)){var r=e[se]||null;e:switch(e=t.stateNode,t.type){case"input":if(Uu(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+cn(""+t)+'"][type="radio"]'),t=0;t<r.length;t++){var o=r[t];if(o!==e&&o.form===e.form){var c=o[se]||null;if(!c)throw Error(i(90));Uu(o,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<r.length;t++)o=r[t],o.form===e.form&&xh(o)}break e;case"textarea":wh(e,r.value,r.defaultValue);break e;case"select":t=r.value,t!=null&&Yr(e,!!r.multiple,t,!1)}}}var Vu=!1;function Ah(e,t,r){if(Vu)return e(t,r);Vu=!0;try{var o=e(t);return o}finally{if(Vu=!1,(Gr!==null||Kr!==null)&&(gs(),Gr&&(t=Gr,e=Kr,Kr=Gr=null,Oh(t),e)))for(t=0;t<e.length;t++)Oh(e[t])}}function ei(e,t){var r=e.stateNode;if(r===null)return null;var o=r[se]||null;if(o===null)return null;r=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(i(231,t,typeof r));return r}var In=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yu=!1;if(In)try{var ti={};Object.defineProperty(ti,"passive",{get:function(){Yu=!0}}),window.addEventListener("test",ti,ti),window.removeEventListener("test",ti,ti)}catch{Yu=!1}var Ea=null,qu=null,_o=null;function Nh(){if(_o)return _o;var e,t=qu,r=t.length,o,c="value"in Ea?Ea.value:Ea.textContent,d=c.length;for(e=0;e<r&&t[e]===c[e];e++);var b=r-e;for(o=1;o<=b&&t[r-o]===c[d-o];o++);return _o=c.slice(e,1<o?1-o:void 0)}function Do(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Lo(){return!0}function Th(){return!1}function Pt(e){function t(r,o,c,d,b){this._reactName=r,this._targetInst=c,this.type=o,this.nativeEvent=d,this.target=b,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(r=e[E],this[E]=r?r(d):d[E]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Lo:Th,this.isPropagationStopped=Th,this}return g(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Lo)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Lo)},persist:function(){},isPersistent:Lo}),t}var cr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zo=Pt(cr),ni=g({},cr,{view:0,detail:0}),Nx=Pt(ni),Gu,Ku,ai,ko=g({},ni,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ai&&(ai&&e.type==="mousemove"?(Gu=e.screenX-ai.screenX,Ku=e.screenY-ai.screenY):Ku=Gu=0,ai=e),Gu)},movementY:function(e){return"movementY"in e?e.movementY:Ku}}),jh=Pt(ko),Tx=g({},ko,{dataTransfer:0}),jx=Pt(Tx),Mx=g({},ni,{relatedTarget:0}),Fu=Pt(Mx),_x=g({},cr,{animationName:0,elapsedTime:0,pseudoElement:0}),Dx=Pt(_x),Lx=g({},cr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),zx=Pt(Lx),kx=g({},cr,{data:0}),Mh=Pt(kx),Ux={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Px={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Hx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Bx(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Hx[e])?!!t[e]:!1}function Xu(){return Bx}var $x=g({},ni,{key:function(e){if(e.key){var t=Ux[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Do(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Px[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xu,charCode:function(e){return e.type==="keypress"?Do(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Do(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Vx=Pt($x),Yx=g({},ko,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_h=Pt(Yx),qx=g({},ni,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xu}),Gx=Pt(qx),Kx=g({},cr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Fx=Pt(Kx),Xx=g({},ko,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Qx=Pt(Xx),Zx=g({},cr,{newState:0,oldState:0}),Jx=Pt(Zx),Ix=[9,13,27,32],Qu=In&&"CompositionEvent"in window,ri=null;In&&"documentMode"in document&&(ri=document.documentMode);var Wx=In&&"TextEvent"in window&&!ri,Dh=In&&(!Qu||ri&&8<ri&&11>=ri),Lh=" ",zh=!1;function kh(e,t){switch(e){case"keyup":return Ix.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Uh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Fr=!1;function e1(e,t){switch(e){case"compositionend":return Uh(t);case"keypress":return t.which!==32?null:(zh=!0,Lh);case"textInput":return e=t.data,e===Lh&&zh?null:e;default:return null}}function t1(e,t){if(Fr)return e==="compositionend"||!Qu&&kh(e,t)?(e=Nh(),_o=qu=Ea=null,Fr=!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.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Dh&&t.locale!=="ko"?null:t.data;default:return null}}var n1={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ph(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!n1[e.type]:t==="textarea"}function Hh(e,t,r,o){Gr?Kr?Kr.push(o):Kr=[o]:Gr=o,t=ws(t,"onChange"),0<t.length&&(r=new zo("onChange","change",null,r,o),e.push({event:r,listeners:t}))}var li=null,ii=null;function a1(e){bg(e,0)}function Uo(e){var t=ut(e);if(xh(t))return e}function Bh(e,t){if(e==="change")return t}var $h=!1;if(In){var Zu;if(In){var Ju="oninput"in document;if(!Ju){var Vh=document.createElement("div");Vh.setAttribute("oninput","return;"),Ju=typeof Vh.oninput=="function"}Zu=Ju}else Zu=!1;$h=Zu&&(!document.documentMode||9<document.documentMode)}function Yh(){li&&(li.detachEvent("onpropertychange",qh),ii=li=null)}function qh(e){if(e.propertyName==="value"&&Uo(ii)){var t=[];Hh(t,ii,e,$u(e)),Ah(a1,t)}}function r1(e,t,r){e==="focusin"?(Yh(),li=t,ii=r,li.attachEvent("onpropertychange",qh)):e==="focusout"&&Yh()}function l1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Uo(ii)}function i1(e,t){if(e==="click")return Uo(t)}function o1(e,t){if(e==="input"||e==="change")return Uo(t)}function s1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ft=typeof Object.is=="function"?Object.is:s1;function oi(e,t){if(Ft(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(o=0;o<r.length;o++){var c=r[o];if(!qt.call(t,c)||!Ft(e[c],t[c]))return!1}return!0}function Gh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Kh(e,t){var r=Gh(e);e=0;for(var o;r;){if(r.nodeType===3){if(o=e+r.textContent.length,e<=t&&o>=t)return{node:r,offset:t-e};e=o}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Gh(r)}}function Fh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Fh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Xh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=jo(e.document);t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=jo(e.document)}return t}function Iu(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")}var u1=In&&"documentMode"in document&&11>=document.documentMode,Xr=null,Wu=null,si=null,ec=!1;function Qh(e,t,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;ec||Xr==null||Xr!==jo(o)||(o=Xr,"selectionStart"in o&&Iu(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),si&&oi(si,o)||(si=o,o=ws(Wu,"onSelect"),0<o.length&&(t=new zo("onSelect","select",null,t,r),e.push({event:t,listeners:o}),t.target=Xr)))}function fr(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Qr={animationend:fr("Animation","AnimationEnd"),animationiteration:fr("Animation","AnimationIteration"),animationstart:fr("Animation","AnimationStart"),transitionrun:fr("Transition","TransitionRun"),transitionstart:fr("Transition","TransitionStart"),transitioncancel:fr("Transition","TransitionCancel"),transitionend:fr("Transition","TransitionEnd")},tc={},Zh={};In&&(Zh=document.createElement("div").style,"AnimationEvent"in window||(delete Qr.animationend.animation,delete Qr.animationiteration.animation,delete Qr.animationstart.animation),"TransitionEvent"in window||delete Qr.transitionend.transition);function dr(e){if(tc[e])return tc[e];if(!Qr[e])return e;var t=Qr[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Zh)return tc[e]=t[r];return e}var Jh=dr("animationend"),Ih=dr("animationiteration"),Wh=dr("animationstart"),c1=dr("transitionrun"),f1=dr("transitionstart"),d1=dr("transitioncancel"),em=dr("transitionend"),tm=new Map,nc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");nc.push("scrollEnd");function wn(e,t){tm.set(e,t),Kt(t,[e])}var nm=new WeakMap;function fn(e,t){if(typeof e=="object"&&e!==null){var r=nm.get(e);return r!==void 0?r:(t={value:e,source:t,stack:No(t)},nm.set(e,t),t)}return{value:e,source:t,stack:No(t)}}var dn=[],Zr=0,ac=0;function Po(){for(var e=Zr,t=ac=Zr=0;t<e;){var r=dn[t];dn[t++]=null;var o=dn[t];dn[t++]=null;var c=dn[t];dn[t++]=null;var d=dn[t];if(dn[t++]=null,o!==null&&c!==null){var b=o.pending;b===null?c.next=c:(c.next=b.next,b.next=c),o.pending=c}d!==0&&am(r,c,d)}}function Ho(e,t,r,o){dn[Zr++]=e,dn[Zr++]=t,dn[Zr++]=r,dn[Zr++]=o,ac|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function rc(e,t,r,o){return Ho(e,t,r,o),Bo(e)}function Jr(e,t){return Ho(e,null,null,t),Bo(e)}function am(e,t,r){e.lanes|=r;var o=e.alternate;o!==null&&(o.lanes|=r);for(var c=!1,d=e.return;d!==null;)d.childLanes|=r,o=d.alternate,o!==null&&(o.childLanes|=r),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(c=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,c&&t!==null&&(c=31-At(r),e=d.hiddenUpdates,o=e[c],o===null?e[c]=[t]:o.push(t),t.lane=r|536870912),d):null}function Bo(e){if(50<Di)throw Di=0,ff=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ir={};function h1(e,t,r,o){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xt(e,t,r,o){return new h1(e,t,r,o)}function lc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Wn(e,t){var r=e.alternate;return r===null?(r=Xt(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function rm(e,t){e.flags&=65011714;var r=e.alternate;return r===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,t=r.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function $o(e,t,r,o,c,d){var b=0;if(o=e,typeof e=="function")lc(e)&&(b=1);else if(typeof e=="string")b=pS(e,r,U.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ie:return e=Xt(31,r,t,c),e.elementType=ie,e.lanes=d,e;case C:return hr(r.children,c,d,t);case R:b=8,c|=24;break;case j:return e=Xt(12,r,t,c|2),e.elementType=j,e.lanes=d,e;case B:return e=Xt(13,r,t,c),e.elementType=B,e.lanes=d,e;case N:return e=Xt(19,r,t,c),e.elementType=N,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case A:case P:b=10;break e;case k:b=9;break e;case Y:b=11;break e;case X:b=14;break e;case ee:b=16,o=null;break e}b=29,r=Error(i(130,e===null?"null":typeof e,"")),o=null}return t=Xt(b,r,t,c),t.elementType=e,t.type=o,t.lanes=d,t}function hr(e,t,r,o){return e=Xt(7,e,o,t),e.lanes=r,e}function ic(e,t,r){return e=Xt(6,e,null,t),e.lanes=r,e}function oc(e,t,r){return t=Xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Wr=[],el=0,Vo=null,Yo=0,hn=[],mn=0,mr=null,ea=1,ta="";function pr(e,t){Wr[el++]=Yo,Wr[el++]=Vo,Vo=e,Yo=t}function lm(e,t,r){hn[mn++]=ea,hn[mn++]=ta,hn[mn++]=mr,mr=e;var o=ea;e=ta;var c=32-At(o)-1;o&=~(1<<c),r+=1;var d=32-At(t)+c;if(30<d){var b=c-c%5;d=(o&(1<<b)-1).toString(32),o>>=b,c-=b,ea=1<<32-At(t)+c|r<<c|o,ta=d+e}else ea=1<<d|r<<c|o,ta=e}function sc(e){e.return!==null&&(pr(e,1),lm(e,1,0))}function uc(e){for(;e===Vo;)Vo=Wr[--el],Wr[el]=null,Yo=Wr[--el],Wr[el]=null;for(;e===mr;)mr=hn[--mn],hn[mn]=null,ta=hn[--mn],hn[mn]=null,ea=hn[--mn],hn[mn]=null}var zt=null,ft=null,Ke=!1,gr=null,Dn=!1,cc=Error(i(519));function vr(e){var t=Error(i(418,""));throw fi(fn(t,e)),cc}function im(e){var t=e.stateNode,r=e.type,o=e.memoizedProps;switch(t[le]=e,t[se]=o,r){case"dialog":Ye("cancel",t),Ye("close",t);break;case"iframe":case"object":case"embed":Ye("load",t);break;case"video":case"audio":for(r=0;r<zi.length;r++)Ye(zi[r],t);break;case"source":Ye("error",t);break;case"img":case"image":case"link":Ye("error",t),Ye("load",t);break;case"details":Ye("toggle",t);break;case"input":Ye("invalid",t),Sh(t,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0),To(t);break;case"select":Ye("invalid",t);break;case"textarea":Ye("invalid",t),Eh(t,o.value,o.defaultValue,o.children),To(t)}r=o.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||t.textContent===""+r||o.suppressHydrationWarning===!0||Eg(t.textContent,r)?(o.popover!=null&&(Ye("beforetoggle",t),Ye("toggle",t)),o.onScroll!=null&&Ye("scroll",t),o.onScrollEnd!=null&&Ye("scrollend",t),o.onClick!=null&&(t.onclick=Es),t=!0):t=!1,t||vr(e)}function om(e){for(zt=e.return;zt;)switch(zt.tag){case 5:case 13:Dn=!1;return;case 27:case 3:Dn=!0;return;default:zt=zt.return}}function ui(e){if(e!==zt)return!1;if(!Ke)return om(e),Ke=!0,!1;var t=e.tag,r;if((r=t!==3&&t!==27)&&((r=t===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||Af(e.type,e.memoizedProps)),r=!r),r&&ft&&vr(e),om(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(r=e.data,r==="/$"){if(t===0){ft=Rn(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++;e=e.nextSibling}ft=null}}else t===27?(t=ft,Ha(e.type)?(e=Mf,Mf=null,ft=e):ft=t):ft=zt?Rn(e.stateNode.nextSibling):null;return!0}function ci(){ft=zt=null,Ke=!1}function sm(){var e=gr;return e!==null&&($t===null?$t=e:$t.push.apply($t,e),gr=null),e}function fi(e){gr===null?gr=[e]:gr.push(e)}var fc=$(null),yr=null,na=null;function Ra(e,t,r){M(fc,t._currentValue),t._currentValue=r}function aa(e){e._currentValue=fc.current,O(fc)}function dc(e,t,r){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===r)break;e=e.return}}function hc(e,t,r,o){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var d=c.dependencies;if(d!==null){var b=c.child;d=d.firstContext;e:for(;d!==null;){var E=d;d=c;for(var _=0;_<t.length;_++)if(E.context===t[_]){d.lanes|=r,E=d.alternate,E!==null&&(E.lanes|=r),dc(d.return,r,e),o||(b=null);break e}d=E.next}}else if(c.tag===18){if(b=c.return,b===null)throw Error(i(341));b.lanes|=r,d=b.alternate,d!==null&&(d.lanes|=r),dc(b,r,e),b=null}else b=c.child;if(b!==null)b.return=c;else for(b=c;b!==null;){if(b===e){b=null;break}if(c=b.sibling,c!==null){c.return=b.return,b=c;break}b=b.return}c=b}}function di(e,t,r,o){e=null;for(var c=t,d=!1;c!==null;){if(!d){if((c.flags&524288)!==0)d=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var b=c.alternate;if(b===null)throw Error(i(387));if(b=b.memoizedProps,b!==null){var E=c.type;Ft(c.pendingProps.value,b.value)||(e!==null?e.push(E):e=[E])}}else if(c===re.current){if(b=c.alternate,b===null)throw Error(i(387));b.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push($i):e=[$i])}c=c.return}e!==null&&hc(t,e,r,o),t.flags|=262144}function qo(e){for(e=e.firstContext;e!==null;){if(!Ft(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function br(e){yr=e,na=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Mt(e){return um(yr,e)}function Go(e,t){return yr===null&&br(e),um(e,t)}function um(e,t){var r=t._currentValue;if(t={context:t,memoizedValue:r,next:null},na===null){if(e===null)throw Error(i(308));na=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else na=na.next=t;return r}var m1=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(r,o){e.push(o)}};this.abort=function(){t.aborted=!0,e.forEach(function(r){return r()})}},p1=n.unstable_scheduleCallback,g1=n.unstable_NormalPriority,St={$$typeof:P,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function mc(){return{controller:new m1,data:new Map,refCount:0}}function hi(e){e.refCount--,e.refCount===0&&p1(g1,function(){e.controller.abort()})}var mi=null,pc=0,tl=0,nl=null;function v1(e,t){if(mi===null){var r=mi=[];pc=0,tl=yf(),nl={status:"pending",value:void 0,then:function(o){r.push(o)}}}return pc++,t.then(cm,cm),t}function cm(){if(--pc===0&&mi!==null){nl!==null&&(nl.status="fulfilled");var e=mi;mi=null,tl=0,nl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function y1(e,t){var r=[],o={status:"pending",value:null,reason:null,then:function(c){r.push(c)}};return e.then(function(){o.status="fulfilled",o.value=t;for(var c=0;c<r.length;c++)(0,r[c])(t)},function(c){for(o.status="rejected",o.reason=c,c=0;c<r.length;c++)(0,r[c])(void 0)}),o}var fm=L.S;L.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&v1(e,t),fm!==null&&fm(e,t)};var xr=$(null);function gc(){var e=xr.current;return e!==null?e:tt.pooledCache}function Ko(e,t){t===null?M(xr,xr.current):M(xr,t.pool)}function dm(){var e=gc();return e===null?null:{parent:St._currentValue,pool:e}}var pi=Error(i(460)),hm=Error(i(474)),Fo=Error(i(542)),vc={then:function(){}};function mm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Xo(){}function pm(e,t,r){switch(r=e[r],r===void 0?e.push(t):r!==t&&(t.then(Xo,Xo),t=r),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,vm(e),e;default:if(typeof t.status=="string")t.then(Xo,Xo);else{if(e=tt,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status="pending",e.then(function(o){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=o}},function(o){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=o}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,vm(e),e}throw gi=t,pi}}var gi=null;function gm(){if(gi===null)throw Error(i(459));var e=gi;return gi=null,e}function vm(e){if(e===pi||e===Fo)throw Error(i(483))}var Ca=!1;function yc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Oa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Aa(e,t,r){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Xe&2)!==0){var c=o.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),o.pending=t,t=Bo(e),am(e,null,r),t}return Ho(e,o,t,r),Bo(e)}function vi(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194048)!==0)){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,sr(e,r)}}function xc(e,t){var r=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,r===o)){var c=null,d=null;if(r=r.firstBaseUpdate,r!==null){do{var b={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};d===null?c=d=b:d=d.next=b,r=r.next}while(r!==null);d===null?c=d=t:d=d.next=t}else c=d=t;r={baseState:o.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:o.shared,callbacks:o.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}var Sc=!1;function yi(){if(Sc){var e=nl;if(e!==null)throw e}}function bi(e,t,r,o){Sc=!1;var c=e.updateQueue;Ca=!1;var d=c.firstBaseUpdate,b=c.lastBaseUpdate,E=c.shared.pending;if(E!==null){c.shared.pending=null;var _=E,F=_.next;_.next=null,b===null?d=F:b.next=F,b=_;var te=e.alternate;te!==null&&(te=te.updateQueue,E=te.lastBaseUpdate,E!==b&&(E===null?te.firstBaseUpdate=F:E.next=F,te.lastBaseUpdate=_))}if(d!==null){var ae=c.baseState;b=0,te=F=_=null,E=d;do{var Q=E.lane&-536870913,Z=Q!==E.lane;if(Z?(qe&Q)===Q:(o&Q)===Q){Q!==0&&Q===tl&&(Sc=!0),te!==null&&(te=te.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var je=e,Ne=E;Q=t;var We=r;switch(Ne.tag){case 1:if(je=Ne.payload,typeof je=="function"){ae=je.call(We,ae,Q);break e}ae=je;break e;case 3:je.flags=je.flags&-65537|128;case 0:if(je=Ne.payload,Q=typeof je=="function"?je.call(We,ae,Q):je,Q==null)break e;ae=g({},ae,Q);break e;case 2:Ca=!0}}Q=E.callback,Q!==null&&(e.flags|=64,Z&&(e.flags|=8192),Z=c.callbacks,Z===null?c.callbacks=[Q]:Z.push(Q))}else Z={lane:Q,tag:E.tag,payload:E.payload,callback:E.callback,next:null},te===null?(F=te=Z,_=ae):te=te.next=Z,b|=Q;if(E=E.next,E===null){if(E=c.shared.pending,E===null)break;Z=E,E=Z.next,Z.next=null,c.lastBaseUpdate=Z,c.shared.pending=null}}while(!0);te===null&&(_=ae),c.baseState=_,c.firstBaseUpdate=F,c.lastBaseUpdate=te,d===null&&(c.shared.lanes=0),za|=b,e.lanes=b,e.memoizedState=ae}}function ym(e,t){if(typeof e!="function")throw Error(i(191,e));e.call(t)}function bm(e,t){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)ym(r[e],t)}var al=$(null),Qo=$(0);function xm(e,t){e=ca,M(Qo,e),M(al,t),ca=e|t.baseLanes}function wc(){M(Qo,ca),M(al,al.current)}function Ec(){ca=Qo.current,O(al),O(Qo)}var Na=0,Ue=null,Je=null,vt=null,Zo=!1,rl=!1,Sr=!1,Jo=0,xi=0,ll=null,b1=0;function mt(){throw Error(i(321))}function Rc(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Ft(e[r],t[r]))return!1;return!0}function Cc(e,t,r,o,c,d){return Na=d,Ue=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,L.H=e===null||e.memoizedState===null?ap:rp,Sr=!1,d=r(o,c),Sr=!1,rl&&(d=wm(t,r,o,c)),Sm(e),d}function Sm(e){L.H=as;var t=Je!==null&&Je.next!==null;if(Na=0,vt=Je=Ue=null,Zo=!1,xi=0,ll=null,t)throw Error(i(300));e===null||Rt||(e=e.dependencies,e!==null&&qo(e)&&(Rt=!0))}function wm(e,t,r,o){Ue=e;var c=0;do{if(rl&&(ll=null),xi=0,rl=!1,25<=c)throw Error(i(301));if(c+=1,vt=Je=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}L.H=O1,d=t(r,o)}while(rl);return d}function x1(){var e=L.H,t=e.useState()[0];return t=typeof t.then=="function"?Si(t):t,e=e.useState()[0],(Je!==null?Je.memoizedState:null)!==e&&(Ue.flags|=1024),t}function Oc(){var e=Jo!==0;return Jo=0,e}function Ac(e,t,r){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r}function Nc(e){if(Zo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Zo=!1}Na=0,vt=Je=Ue=null,rl=!1,xi=Jo=0,ll=null}function Ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return vt===null?Ue.memoizedState=vt=e:vt=vt.next=e,vt}function yt(){if(Je===null){var e=Ue.alternate;e=e!==null?e.memoizedState:null}else e=Je.next;var t=vt===null?Ue.memoizedState:vt.next;if(t!==null)vt=t,Je=e;else{if(e===null)throw Ue.alternate===null?Error(i(467)):Error(i(310));Je=e,e={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},vt===null?Ue.memoizedState=vt=e:vt=vt.next=e}return vt}function Tc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Si(e){var t=xi;return xi+=1,ll===null&&(ll=[]),e=pm(ll,e,t),t=Ue,(vt===null?t.memoizedState:vt.next)===null&&(t=t.alternate,L.H=t===null||t.memoizedState===null?ap:rp),e}function Io(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Si(e);if(e.$$typeof===P)return Mt(e)}throw Error(i(438,String(e)))}function jc(e){var t=null,r=Ue.updateQueue;if(r!==null&&(t=r.memoCache),t==null){var o=Ue.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(t={data:o.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),r===null&&(r=Tc(),Ue.updateQueue=r),r.memoCache=t,r=t.data[t.index],r===void 0)for(r=t.data[t.index]=Array(e),o=0;o<e;o++)r[o]=oe;return t.index++,r}function ra(e,t){return typeof t=="function"?t(e):t}function Wo(e){var t=yt();return Mc(t,Je,e)}function Mc(e,t,r){var o=e.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=r;var c=e.baseQueue,d=o.pending;if(d!==null){if(c!==null){var b=c.next;c.next=d.next,d.next=b}t.baseQueue=c=d,o.pending=null}if(d=e.baseState,c===null)e.memoizedState=d;else{t=c.next;var E=b=null,_=null,F=t,te=!1;do{var ae=F.lane&-536870913;if(ae!==F.lane?(qe&ae)===ae:(Na&ae)===ae){var Q=F.revertLane;if(Q===0)_!==null&&(_=_.next={lane:0,revertLane:0,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null}),ae===tl&&(te=!0);else if((Na&Q)===Q){F=F.next,Q===tl&&(te=!0);continue}else ae={lane:0,revertLane:F.revertLane,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},_===null?(E=_=ae,b=d):_=_.next=ae,Ue.lanes|=Q,za|=Q;ae=F.action,Sr&&r(d,ae),d=F.hasEagerState?F.eagerState:r(d,ae)}else Q={lane:ae,revertLane:F.revertLane,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},_===null?(E=_=Q,b=d):_=_.next=Q,Ue.lanes|=ae,za|=ae;F=F.next}while(F!==null&&F!==t);if(_===null?b=d:_.next=E,!Ft(d,e.memoizedState)&&(Rt=!0,te&&(r=nl,r!==null)))throw r;e.memoizedState=d,e.baseState=b,e.baseQueue=_,o.lastRenderedState=d}return c===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function _c(e){var t=yt(),r=t.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=e;var o=r.dispatch,c=r.pending,d=t.memoizedState;if(c!==null){r.pending=null;var b=c=c.next;do d=e(d,b.action),b=b.next;while(b!==c);Ft(d,t.memoizedState)||(Rt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),r.lastRenderedState=d}return[d,o]}function Em(e,t,r){var o=Ue,c=yt(),d=Ke;if(d){if(r===void 0)throw Error(i(407));r=r()}else r=t();var b=!Ft((Je||c).memoizedState,r);b&&(c.memoizedState=r,Rt=!0),c=c.queue;var E=Om.bind(null,o,c,e);if(wi(2048,8,E,[e]),c.getSnapshot!==t||b||vt!==null&&vt.memoizedState.tag&1){if(o.flags|=2048,il(9,es(),Cm.bind(null,o,c,r,t),null),tt===null)throw Error(i(349));d||(Na&124)!==0||Rm(o,t,r)}return r}function Rm(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Ue.updateQueue,t===null?(t=Tc(),Ue.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Cm(e,t,r,o){t.value=r,t.getSnapshot=o,Am(t)&&Nm(e)}function Om(e,t,r){return r(function(){Am(t)&&Nm(e)})}function Am(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Ft(e,r)}catch{return!0}}function Nm(e){var t=Jr(e,2);t!==null&&Wt(t,e,2)}function Dc(e){var t=Ht();if(typeof e=="function"){var r=e;if(e=r(),Sr){Sn(!0);try{r()}finally{Sn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:e},t}function Tm(e,t,r,o){return e.baseState=r,Mc(e,Je,typeof o=="function"?o:ra)}function S1(e,t,r,o,c){if(ns(e))throw Error(i(485));if(e=t.action,e!==null){var d={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){d.listeners.push(b)}};L.T!==null?r(!0):d.isTransition=!1,o(d),r=t.pending,r===null?(d.next=t.pending=d,jm(t,d)):(d.next=r.next,t.pending=r.next=d)}}function jm(e,t){var r=t.action,o=t.payload,c=e.state;if(t.isTransition){var d=L.T,b={};L.T=b;try{var E=r(c,o),_=L.S;_!==null&&_(b,E),Mm(e,t,E)}catch(F){Lc(e,t,F)}finally{L.T=d}}else try{d=r(c,o),Mm(e,t,d)}catch(F){Lc(e,t,F)}}function Mm(e,t,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(o){_m(e,t,o)},function(o){return Lc(e,t,o)}):_m(e,t,r)}function _m(e,t,r){t.status="fulfilled",t.value=r,Dm(t),e.state=r,t=e.pending,t!==null&&(r=t.next,r===t?e.pending=null:(r=r.next,t.next=r,jm(e,r)))}function Lc(e,t,r){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do t.status="rejected",t.reason=r,Dm(t),t=t.next;while(t!==o)}e.action=null}function Dm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Lm(e,t){return t}function zm(e,t){if(Ke){var r=tt.formState;if(r!==null){e:{var o=Ue;if(Ke){if(ft){t:{for(var c=ft,d=Dn;c.nodeType!==8;){if(!d){c=null;break t}if(c=Rn(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){ft=Rn(c.nextSibling),o=c.data==="F!";break e}}vr(o)}o=!1}o&&(t=r[0])}}return r=Ht(),r.memoizedState=r.baseState=t,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lm,lastRenderedState:t},r.queue=o,r=ep.bind(null,Ue,o),o.dispatch=r,o=Dc(!1),d=Hc.bind(null,Ue,!1,o.queue),o=Ht(),c={state:t,dispatch:null,action:e,pending:null},o.queue=c,r=S1.bind(null,Ue,c,d,r),c.dispatch=r,o.memoizedState=e,[t,r,!1]}function km(e){var t=yt();return Um(t,Je,e)}function Um(e,t,r){if(t=Mc(e,t,Lm)[0],e=Wo(ra)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var o=Si(t)}catch(b){throw b===pi?Fo:b}else o=t;t=yt();var c=t.queue,d=c.dispatch;return r!==t.memoizedState&&(Ue.flags|=2048,il(9,es(),w1.bind(null,c,r),null)),[o,d,e]}function w1(e,t){e.action=t}function Pm(e){var t=yt(),r=Je;if(r!==null)return Um(t,r,e);yt(),t=t.memoizedState,r=yt();var o=r.queue.dispatch;return r.memoizedState=e,[t,o,!1]}function il(e,t,r,o){return e={tag:e,create:r,deps:o,inst:t,next:null},t=Ue.updateQueue,t===null&&(t=Tc(),Ue.updateQueue=t),r=t.lastEffect,r===null?t.lastEffect=e.next=e:(o=r.next,r.next=e,e.next=o,t.lastEffect=e),e}function es(){return{destroy:void 0,resource:void 0}}function Hm(){return yt().memoizedState}function ts(e,t,r,o){var c=Ht();o=o===void 0?null:o,Ue.flags|=e,c.memoizedState=il(1|t,es(),r,o)}function wi(e,t,r,o){var c=yt();o=o===void 0?null:o;var d=c.memoizedState.inst;Je!==null&&o!==null&&Rc(o,Je.memoizedState.deps)?c.memoizedState=il(t,d,r,o):(Ue.flags|=e,c.memoizedState=il(1|t,d,r,o))}function Bm(e,t){ts(8390656,8,e,t)}function $m(e,t){wi(2048,8,e,t)}function Vm(e,t){return wi(4,2,e,t)}function Ym(e,t){return wi(4,4,e,t)}function qm(e,t){if(typeof t=="function"){e=e();var r=t(e);return function(){typeof r=="function"?r():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Gm(e,t,r){r=r!=null?r.concat([e]):null,wi(4,4,qm.bind(null,t,e),r)}function zc(){}function Km(e,t){var r=yt();t=t===void 0?null:t;var o=r.memoizedState;return t!==null&&Rc(t,o[1])?o[0]:(r.memoizedState=[e,t],e)}function Fm(e,t){var r=yt();t=t===void 0?null:t;var o=r.memoizedState;if(t!==null&&Rc(t,o[1]))return o[0];if(o=e(),Sr){Sn(!0);try{e()}finally{Sn(!1)}}return r.memoizedState=[o,t],o}function kc(e,t,r){return r===void 0||(Na&1073741824)!==0?e.memoizedState=t:(e.memoizedState=r,e=Zp(),Ue.lanes|=e,za|=e,r)}function Xm(e,t,r,o){return Ft(r,t)?r:al.current!==null?(e=kc(e,r,o),Ft(e,t)||(Rt=!0),e):(Na&42)===0?(Rt=!0,e.memoizedState=r):(e=Zp(),Ue.lanes|=e,za|=e,t)}function Qm(e,t,r,o,c){var d=W.p;W.p=d!==0&&8>d?d:8;var b=L.T,E={};L.T=E,Hc(e,!1,t,r);try{var _=c(),F=L.S;if(F!==null&&F(E,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var te=y1(_,o);Ei(e,t,te,It(e))}else Ei(e,t,o,It(e))}catch(ae){Ei(e,t,{then:function(){},status:"rejected",reason:ae},It())}finally{W.p=d,L.T=b}}function E1(){}function Uc(e,t,r,o){if(e.tag!==5)throw Error(i(476));var c=Zm(e).queue;Qm(e,c,t,K,r===null?E1:function(){return Jm(e),r(o)})}function Zm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:K,baseState:K,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:K},next:null};var r={};return t.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:r},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Jm(e){var t=Zm(e).next.queue;Ei(e,t,{},It())}function Pc(){return Mt($i)}function Im(){return yt().memoizedState}function Wm(){return yt().memoizedState}function R1(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var r=It();e=Oa(r);var o=Aa(t,e,r);o!==null&&(Wt(o,t,r),vi(o,t,r)),t={cache:mc()},e.payload=t;return}t=t.return}}function C1(e,t,r){var o=It();r={lane:o,revertLane:0,action:r,hasEagerState:!1,eagerState:null,next:null},ns(e)?tp(t,r):(r=rc(e,t,r,o),r!==null&&(Wt(r,e,o),np(r,t,o)))}function ep(e,t,r){var o=It();Ei(e,t,r,o)}function Ei(e,t,r,o){var c={lane:o,revertLane:0,action:r,hasEagerState:!1,eagerState:null,next:null};if(ns(e))tp(t,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var b=t.lastRenderedState,E=d(b,r);if(c.hasEagerState=!0,c.eagerState=E,Ft(E,b))return Ho(e,t,c,0),tt===null&&Po(),!1}catch{}finally{}if(r=rc(e,t,c,o),r!==null)return Wt(r,e,o),np(r,t,o),!0}return!1}function Hc(e,t,r,o){if(o={lane:2,revertLane:yf(),action:o,hasEagerState:!1,eagerState:null,next:null},ns(e)){if(t)throw Error(i(479))}else t=rc(e,r,o,2),t!==null&&Wt(t,e,2)}function ns(e){var t=e.alternate;return e===Ue||t!==null&&t===Ue}function tp(e,t){rl=Zo=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function np(e,t,r){if((r&4194048)!==0){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,sr(e,r)}}var as={readContext:Mt,use:Io,useCallback:mt,useContext:mt,useEffect:mt,useImperativeHandle:mt,useLayoutEffect:mt,useInsertionEffect:mt,useMemo:mt,useReducer:mt,useRef:mt,useState:mt,useDebugValue:mt,useDeferredValue:mt,useTransition:mt,useSyncExternalStore:mt,useId:mt,useHostTransitionStatus:mt,useFormState:mt,useActionState:mt,useOptimistic:mt,useMemoCache:mt,useCacheRefresh:mt},ap={readContext:Mt,use:Io,useCallback:function(e,t){return Ht().memoizedState=[e,t===void 0?null:t],e},useContext:Mt,useEffect:Bm,useImperativeHandle:function(e,t,r){r=r!=null?r.concat([e]):null,ts(4194308,4,qm.bind(null,t,e),r)},useLayoutEffect:function(e,t){return ts(4194308,4,e,t)},useInsertionEffect:function(e,t){ts(4,2,e,t)},useMemo:function(e,t){var r=Ht();t=t===void 0?null:t;var o=e();if(Sr){Sn(!0);try{e()}finally{Sn(!1)}}return r.memoizedState=[o,t],o},useReducer:function(e,t,r){var o=Ht();if(r!==void 0){var c=r(t);if(Sr){Sn(!0);try{r(t)}finally{Sn(!1)}}}else c=t;return o.memoizedState=o.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},o.queue=e,e=e.dispatch=C1.bind(null,Ue,e),[o.memoizedState,e]},useRef:function(e){var t=Ht();return e={current:e},t.memoizedState=e},useState:function(e){e=Dc(e);var t=e.queue,r=ep.bind(null,Ue,t);return t.dispatch=r,[e.memoizedState,r]},useDebugValue:zc,useDeferredValue:function(e,t){var r=Ht();return kc(r,e,t)},useTransition:function(){var e=Dc(!1);return e=Qm.bind(null,Ue,e.queue,!0,!1),Ht().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,r){var o=Ue,c=Ht();if(Ke){if(r===void 0)throw Error(i(407));r=r()}else{if(r=t(),tt===null)throw Error(i(349));(qe&124)!==0||Rm(o,t,r)}c.memoizedState=r;var d={value:r,getSnapshot:t};return c.queue=d,Bm(Om.bind(null,o,d,e),[e]),o.flags|=2048,il(9,es(),Cm.bind(null,o,d,r,t),null),r},useId:function(){var e=Ht(),t=tt.identifierPrefix;if(Ke){var r=ta,o=ea;r=(o&~(1<<32-At(o)-1)).toString(32)+r,t="«"+t+"R"+r,r=Jo++,0<r&&(t+="H"+r.toString(32)),t+="»"}else r=b1++,t="«"+t+"r"+r.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:Pc,useFormState:zm,useActionState:zm,useOptimistic:function(e){var t=Ht();t.memoizedState=t.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=r,t=Hc.bind(null,Ue,!0,r),r.dispatch=t,[e,t]},useMemoCache:jc,useCacheRefresh:function(){return Ht().memoizedState=R1.bind(null,Ue)}},rp={readContext:Mt,use:Io,useCallback:Km,useContext:Mt,useEffect:$m,useImperativeHandle:Gm,useInsertionEffect:Vm,useLayoutEffect:Ym,useMemo:Fm,useReducer:Wo,useRef:Hm,useState:function(){return Wo(ra)},useDebugValue:zc,useDeferredValue:function(e,t){var r=yt();return Xm(r,Je.memoizedState,e,t)},useTransition:function(){var e=Wo(ra)[0],t=yt().memoizedState;return[typeof e=="boolean"?e:Si(e),t]},useSyncExternalStore:Em,useId:Im,useHostTransitionStatus:Pc,useFormState:km,useActionState:km,useOptimistic:function(e,t){var r=yt();return Tm(r,Je,e,t)},useMemoCache:jc,useCacheRefresh:Wm},O1={readContext:Mt,use:Io,useCallback:Km,useContext:Mt,useEffect:$m,useImperativeHandle:Gm,useInsertionEffect:Vm,useLayoutEffect:Ym,useMemo:Fm,useReducer:_c,useRef:Hm,useState:function(){return _c(ra)},useDebugValue:zc,useDeferredValue:function(e,t){var r=yt();return Je===null?kc(r,e,t):Xm(r,Je.memoizedState,e,t)},useTransition:function(){var e=_c(ra)[0],t=yt().memoizedState;return[typeof e=="boolean"?e:Si(e),t]},useSyncExternalStore:Em,useId:Im,useHostTransitionStatus:Pc,useFormState:Pm,useActionState:Pm,useOptimistic:function(e,t){var r=yt();return Je!==null?Tm(r,Je,e,t):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:jc,useCacheRefresh:Wm},ol=null,Ri=0;function rs(e){var t=Ri;return Ri+=1,ol===null&&(ol=[]),pm(ol,e,t)}function Ci(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ls(e,t){throw t.$$typeof===x?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function lp(e){var t=e._init;return t(e._payload)}function ip(e){function t(H,z){if(e){var G=H.deletions;G===null?(H.deletions=[z],H.flags|=16):G.push(z)}}function r(H,z){if(!e)return null;for(;z!==null;)t(H,z),z=z.sibling;return null}function o(H){for(var z=new Map;H!==null;)H.key!==null?z.set(H.key,H):z.set(H.index,H),H=H.sibling;return z}function c(H,z){return H=Wn(H,z),H.index=0,H.sibling=null,H}function d(H,z,G){return H.index=G,e?(G=H.alternate,G!==null?(G=G.index,G<z?(H.flags|=67108866,z):G):(H.flags|=67108866,z)):(H.flags|=1048576,z)}function b(H){return e&&H.alternate===null&&(H.flags|=67108866),H}function E(H,z,G,ne){return z===null||z.tag!==6?(z=ic(G,H.mode,ne),z.return=H,z):(z=c(z,G),z.return=H,z)}function _(H,z,G,ne){var me=G.type;return me===C?te(H,z,G.props.children,ne,G.key):z!==null&&(z.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===ee&&lp(me)===z.type)?(z=c(z,G.props),Ci(z,G),z.return=H,z):(z=$o(G.type,G.key,G.props,null,H.mode,ne),Ci(z,G),z.return=H,z)}function F(H,z,G,ne){return z===null||z.tag!==4||z.stateNode.containerInfo!==G.containerInfo||z.stateNode.implementation!==G.implementation?(z=oc(G,H.mode,ne),z.return=H,z):(z=c(z,G.children||[]),z.return=H,z)}function te(H,z,G,ne,me){return z===null||z.tag!==7?(z=hr(G,H.mode,ne,me),z.return=H,z):(z=c(z,G),z.return=H,z)}function ae(H,z,G){if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return z=ic(""+z,H.mode,G),z.return=H,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case S:return G=$o(z.type,z.key,z.props,null,H.mode,G),Ci(G,z),G.return=H,G;case w:return z=oc(z,H.mode,G),z.return=H,z;case ee:var ne=z._init;return z=ne(z._payload),ae(H,z,G)}if(ue(z)||Se(z))return z=hr(z,H.mode,G,null),z.return=H,z;if(typeof z.then=="function")return ae(H,rs(z),G);if(z.$$typeof===P)return ae(H,Go(H,z),G);ls(H,z)}return null}function Q(H,z,G,ne){var me=z!==null?z.key:null;if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return me!==null?null:E(H,z,""+G,ne);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case S:return G.key===me?_(H,z,G,ne):null;case w:return G.key===me?F(H,z,G,ne):null;case ee:return me=G._init,G=me(G._payload),Q(H,z,G,ne)}if(ue(G)||Se(G))return me!==null?null:te(H,z,G,ne,null);if(typeof G.then=="function")return Q(H,z,rs(G),ne);if(G.$$typeof===P)return Q(H,z,Go(H,G),ne);ls(H,G)}return null}function Z(H,z,G,ne,me){if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return H=H.get(G)||null,E(z,H,""+ne,me);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case S:return H=H.get(ne.key===null?G:ne.key)||null,_(z,H,ne,me);case w:return H=H.get(ne.key===null?G:ne.key)||null,F(z,H,ne,me);case ee:var Be=ne._init;return ne=Be(ne._payload),Z(H,z,G,ne,me)}if(ue(ne)||Se(ne))return H=H.get(G)||null,te(z,H,ne,me,null);if(typeof ne.then=="function")return Z(H,z,G,rs(ne),me);if(ne.$$typeof===P)return Z(H,z,G,Go(z,ne),me);ls(z,ne)}return null}function je(H,z,G,ne){for(var me=null,Be=null,Re=z,Te=z=0,Ot=null;Re!==null&&Te<G.length;Te++){Re.index>Te?(Ot=Re,Re=null):Ot=Re.sibling;var Ge=Q(H,Re,G[Te],ne);if(Ge===null){Re===null&&(Re=Ot);break}e&&Re&&Ge.alternate===null&&t(H,Re),z=d(Ge,z,Te),Be===null?me=Ge:Be.sibling=Ge,Be=Ge,Re=Ot}if(Te===G.length)return r(H,Re),Ke&&pr(H,Te),me;if(Re===null){for(;Te<G.length;Te++)Re=ae(H,G[Te],ne),Re!==null&&(z=d(Re,z,Te),Be===null?me=Re:Be.sibling=Re,Be=Re);return Ke&&pr(H,Te),me}for(Re=o(Re);Te<G.length;Te++)Ot=Z(Re,H,Te,G[Te],ne),Ot!==null&&(e&&Ot.alternate!==null&&Re.delete(Ot.key===null?Te:Ot.key),z=d(Ot,z,Te),Be===null?me=Ot:Be.sibling=Ot,Be=Ot);return e&&Re.forEach(function(qa){return t(H,qa)}),Ke&&pr(H,Te),me}function Ne(H,z,G,ne){if(G==null)throw Error(i(151));for(var me=null,Be=null,Re=z,Te=z=0,Ot=null,Ge=G.next();Re!==null&&!Ge.done;Te++,Ge=G.next()){Re.index>Te?(Ot=Re,Re=null):Ot=Re.sibling;var qa=Q(H,Re,Ge.value,ne);if(qa===null){Re===null&&(Re=Ot);break}e&&Re&&qa.alternate===null&&t(H,Re),z=d(qa,z,Te),Be===null?me=qa:Be.sibling=qa,Be=qa,Re=Ot}if(Ge.done)return r(H,Re),Ke&&pr(H,Te),me;if(Re===null){for(;!Ge.done;Te++,Ge=G.next())Ge=ae(H,Ge.value,ne),Ge!==null&&(z=d(Ge,z,Te),Be===null?me=Ge:Be.sibling=Ge,Be=Ge);return Ke&&pr(H,Te),me}for(Re=o(Re);!Ge.done;Te++,Ge=G.next())Ge=Z(Re,H,Te,Ge.value,ne),Ge!==null&&(e&&Ge.alternate!==null&&Re.delete(Ge.key===null?Te:Ge.key),z=d(Ge,z,Te),Be===null?me=Ge:Be.sibling=Ge,Be=Ge);return e&&Re.forEach(function(AS){return t(H,AS)}),Ke&&pr(H,Te),me}function We(H,z,G,ne){if(typeof G=="object"&&G!==null&&G.type===C&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case S:e:{for(var me=G.key;z!==null;){if(z.key===me){if(me=G.type,me===C){if(z.tag===7){r(H,z.sibling),ne=c(z,G.props.children),ne.return=H,H=ne;break e}}else if(z.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===ee&&lp(me)===z.type){r(H,z.sibling),ne=c(z,G.props),Ci(ne,G),ne.return=H,H=ne;break e}r(H,z);break}else t(H,z);z=z.sibling}G.type===C?(ne=hr(G.props.children,H.mode,ne,G.key),ne.return=H,H=ne):(ne=$o(G.type,G.key,G.props,null,H.mode,ne),Ci(ne,G),ne.return=H,H=ne)}return b(H);case w:e:{for(me=G.key;z!==null;){if(z.key===me)if(z.tag===4&&z.stateNode.containerInfo===G.containerInfo&&z.stateNode.implementation===G.implementation){r(H,z.sibling),ne=c(z,G.children||[]),ne.return=H,H=ne;break e}else{r(H,z);break}else t(H,z);z=z.sibling}ne=oc(G,H.mode,ne),ne.return=H,H=ne}return b(H);case ee:return me=G._init,G=me(G._payload),We(H,z,G,ne)}if(ue(G))return je(H,z,G,ne);if(Se(G)){if(me=Se(G),typeof me!="function")throw Error(i(150));return G=me.call(G),Ne(H,z,G,ne)}if(typeof G.then=="function")return We(H,z,rs(G),ne);if(G.$$typeof===P)return We(H,z,Go(H,G),ne);ls(H,G)}return typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint"?(G=""+G,z!==null&&z.tag===6?(r(H,z.sibling),ne=c(z,G),ne.return=H,H=ne):(r(H,z),ne=ic(G,H.mode,ne),ne.return=H,H=ne),b(H)):r(H,z)}return function(H,z,G,ne){try{Ri=0;var me=We(H,z,G,ne);return ol=null,me}catch(Re){if(Re===pi||Re===Fo)throw Re;var Be=Xt(29,Re,null,H.mode);return Be.lanes=ne,Be.return=H,Be}finally{}}}var sl=ip(!0),op=ip(!1),pn=$(null),Ln=null;function Ta(e){var t=e.alternate;M(wt,wt.current&1),M(pn,e),Ln===null&&(t===null||al.current!==null||t.memoizedState!==null)&&(Ln=e)}function sp(e){if(e.tag===22){if(M(wt,wt.current),M(pn,e),Ln===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Ln=e)}}else ja()}function ja(){M(wt,wt.current),M(pn,pn.current)}function la(e){O(pn),Ln===e&&(Ln=null),O(wt)}var wt=$(0);function is(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||jf(r)))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}function Bc(e,t,r,o){t=e.memoizedState,r=r(o,t),r=r==null?t:g({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var $c={enqueueSetState:function(e,t,r){e=e._reactInternals;var o=It(),c=Oa(o);c.payload=t,r!=null&&(c.callback=r),t=Aa(e,c,o),t!==null&&(Wt(t,e,o),vi(t,e,o))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var o=It(),c=Oa(o);c.tag=1,c.payload=t,r!=null&&(c.callback=r),t=Aa(e,c,o),t!==null&&(Wt(t,e,o),vi(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=It(),o=Oa(r);o.tag=2,t!=null&&(o.callback=t),t=Aa(e,o,r),t!==null&&(Wt(t,e,r),vi(t,e,r))}};function up(e,t,r,o,c,d,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,d,b):t.prototype&&t.prototype.isPureReactComponent?!oi(r,o)||!oi(c,d):!0}function cp(e,t,r,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,o),t.state!==e&&$c.enqueueReplaceState(t,t.state,null)}function wr(e,t){var r=t;if("ref"in t){r={};for(var o in t)o!=="ref"&&(r[o]=t[o])}if(e=e.defaultProps){r===t&&(r=g({},r));for(var c in e)r[c]===void 0&&(r[c]=e[c])}return r}var os=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function fp(e){os(e)}function dp(e){console.error(e)}function hp(e){os(e)}function ss(e,t){try{var r=e.onUncaughtError;r(t.value,{componentStack:t.stack})}catch(o){setTimeout(function(){throw o})}}function mp(e,t,r){try{var o=e.onCaughtError;o(r.value,{componentStack:r.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Vc(e,t,r){return r=Oa(r),r.tag=3,r.payload={element:null},r.callback=function(){ss(e,t)},r}function pp(e){return e=Oa(e),e.tag=3,e}function gp(e,t,r,o){var c=r.type.getDerivedStateFromError;if(typeof c=="function"){var d=o.value;e.payload=function(){return c(d)},e.callback=function(){mp(t,r,o)}}var b=r.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){mp(t,r,o),typeof c!="function"&&(ka===null?ka=new Set([this]):ka.add(this));var E=o.stack;this.componentDidCatch(o.value,{componentStack:E!==null?E:""})})}function A1(e,t,r,o,c){if(r.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(t=r.alternate,t!==null&&di(t,r,c,!0),r=pn.current,r!==null){switch(r.tag){case 13:return Ln===null?hf():r.alternate===null&&dt===0&&(dt=3),r.flags&=-257,r.flags|=65536,r.lanes=c,o===vc?r.flags|=16384:(t=r.updateQueue,t===null?r.updateQueue=new Set([o]):t.add(o),pf(e,o,c)),!1;case 22:return r.flags|=65536,o===vc?r.flags|=16384:(t=r.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([o])},r.updateQueue=t):(r=t.retryQueue,r===null?t.retryQueue=new Set([o]):r.add(o)),pf(e,o,c)),!1}throw Error(i(435,r.tag))}return pf(e,o,c),hf(),!1}if(Ke)return t=pn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,o!==cc&&(e=Error(i(422),{cause:o}),fi(fn(e,r)))):(o!==cc&&(t=Error(i(423),{cause:o}),fi(fn(t,r))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,o=fn(o,r),c=Vc(e.stateNode,o,c),xc(e,c),dt!==4&&(dt=2)),!1;var d=Error(i(520),{cause:o});if(d=fn(d,r),_i===null?_i=[d]:_i.push(d),dt!==4&&(dt=2),t===null)return!0;o=fn(o,r),r=t;do{switch(r.tag){case 3:return r.flags|=65536,e=c&-c,r.lanes|=e,e=Vc(r.stateNode,o,e),xc(r,e),!1;case 1:if(t=r.type,d=r.stateNode,(r.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(ka===null||!ka.has(d))))return r.flags|=65536,c&=-c,r.lanes|=c,c=pp(c),gp(c,e,r,o),xc(r,c),!1}r=r.return}while(r!==null);return!1}var vp=Error(i(461)),Rt=!1;function Nt(e,t,r,o){t.child=e===null?op(t,null,r,o):sl(t,e.child,r,o)}function yp(e,t,r,o,c){r=r.render;var d=t.ref;if("ref"in o){var b={};for(var E in o)E!=="ref"&&(b[E]=o[E])}else b=o;return br(t),o=Cc(e,t,r,b,d,c),E=Oc(),e!==null&&!Rt?(Ac(e,t,c),ia(e,t,c)):(Ke&&E&&sc(t),t.flags|=1,Nt(e,t,o,c),t.child)}function bp(e,t,r,o,c){if(e===null){var d=r.type;return typeof d=="function"&&!lc(d)&&d.defaultProps===void 0&&r.compare===null?(t.tag=15,t.type=d,xp(e,t,d,o,c)):(e=$o(r.type,null,o,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!Zc(e,c)){var b=d.memoizedProps;if(r=r.compare,r=r!==null?r:oi,r(b,o)&&e.ref===t.ref)return ia(e,t,c)}return t.flags|=1,e=Wn(d,o),e.ref=t.ref,e.return=t,t.child=e}function xp(e,t,r,o,c){if(e!==null){var d=e.memoizedProps;if(oi(d,o)&&e.ref===t.ref)if(Rt=!1,t.pendingProps=o=d,Zc(e,c))(e.flags&131072)!==0&&(Rt=!0);else return t.lanes=e.lanes,ia(e,t,c)}return Yc(e,t,r,o,c)}function Sp(e,t,r){var o=t.pendingProps,c=o.children,d=e!==null?e.memoizedState:null;if(o.mode==="hidden"){if((t.flags&128)!==0){if(o=d!==null?d.baseLanes|r:r,e!==null){for(c=t.child=e.child,d=0;c!==null;)d=d|c.lanes|c.childLanes,c=c.sibling;t.childLanes=d&~o}else t.childLanes=0,t.child=null;return wp(e,t,o,r)}if((r&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ko(t,d!==null?d.cachePool:null),d!==null?xm(t,d):wc(),sp(t);else return t.lanes=t.childLanes=536870912,wp(e,t,d!==null?d.baseLanes|r:r,r)}else d!==null?(Ko(t,d.cachePool),xm(t,d),ja(),t.memoizedState=null):(e!==null&&Ko(t,null),wc(),ja());return Nt(e,t,c,r),t.child}function wp(e,t,r,o){var c=gc();return c=c===null?null:{parent:St._currentValue,pool:c},t.memoizedState={baseLanes:r,cachePool:c},e!==null&&Ko(t,null),wc(),sp(t),e!==null&&di(e,t,o,!0),null}function us(e,t){var r=t.ref;if(r===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(i(284));(e===null||e.ref!==r)&&(t.flags|=4194816)}}function Yc(e,t,r,o,c){return br(t),r=Cc(e,t,r,o,void 0,c),o=Oc(),e!==null&&!Rt?(Ac(e,t,c),ia(e,t,c)):(Ke&&o&&sc(t),t.flags|=1,Nt(e,t,r,c),t.child)}function Ep(e,t,r,o,c,d){return br(t),t.updateQueue=null,r=wm(t,o,r,c),Sm(e),o=Oc(),e!==null&&!Rt?(Ac(e,t,d),ia(e,t,d)):(Ke&&o&&sc(t),t.flags|=1,Nt(e,t,r,d),t.child)}function Rp(e,t,r,o,c){if(br(t),t.stateNode===null){var d=Ir,b=r.contextType;typeof b=="object"&&b!==null&&(d=Mt(b)),d=new r(o,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=$c,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=o,d.state=t.memoizedState,d.refs={},yc(t),b=r.contextType,d.context=typeof b=="object"&&b!==null?Mt(b):Ir,d.state=t.memoizedState,b=r.getDerivedStateFromProps,typeof b=="function"&&(Bc(t,r,b,o),d.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(b=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),b!==d.state&&$c.enqueueReplaceState(d,d.state,null),bi(t,o,d,c),yi(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),o=!0}else if(e===null){d=t.stateNode;var E=t.memoizedProps,_=wr(r,E);d.props=_;var F=d.context,te=r.contextType;b=Ir,typeof te=="object"&&te!==null&&(b=Mt(te));var ae=r.getDerivedStateFromProps;te=typeof ae=="function"||typeof d.getSnapshotBeforeUpdate=="function",E=t.pendingProps!==E,te||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(E||F!==b)&&cp(t,d,o,b),Ca=!1;var Q=t.memoizedState;d.state=Q,bi(t,o,d,c),yi(),F=t.memoizedState,E||Q!==F||Ca?(typeof ae=="function"&&(Bc(t,r,ae,o),F=t.memoizedState),(_=Ca||up(t,r,_,o,Q,F,b))?(te||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=F),d.props=o,d.state=F,d.context=b,o=_):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{d=t.stateNode,bc(e,t),b=t.memoizedProps,te=wr(r,b),d.props=te,ae=t.pendingProps,Q=d.context,F=r.contextType,_=Ir,typeof F=="object"&&F!==null&&(_=Mt(F)),E=r.getDerivedStateFromProps,(F=typeof E=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(b!==ae||Q!==_)&&cp(t,d,o,_),Ca=!1,Q=t.memoizedState,d.state=Q,bi(t,o,d,c),yi();var Z=t.memoizedState;b!==ae||Q!==Z||Ca||e!==null&&e.dependencies!==null&&qo(e.dependencies)?(typeof E=="function"&&(Bc(t,r,E,o),Z=t.memoizedState),(te=Ca||up(t,r,te,o,Q,Z,_)||e!==null&&e.dependencies!==null&&qo(e.dependencies))?(F||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(o,Z,_),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(o,Z,_)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||b===e.memoizedProps&&Q===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&Q===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=Z),d.props=o,d.state=Z,d.context=_,o=te):(typeof d.componentDidUpdate!="function"||b===e.memoizedProps&&Q===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&Q===e.memoizedState||(t.flags|=1024),o=!1)}return d=o,us(e,t),o=(t.flags&128)!==0,d||o?(d=t.stateNode,r=o&&typeof r.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&o?(t.child=sl(t,e.child,null,c),t.child=sl(t,null,r,c)):Nt(e,t,r,c),t.memoizedState=d.state,e=t.child):e=ia(e,t,c),e}function Cp(e,t,r,o){return ci(),t.flags|=256,Nt(e,t,r,o),t.child}var qc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Gc(e){return{baseLanes:e,cachePool:dm()}}function Kc(e,t,r){return e=e!==null?e.childLanes&~r:0,t&&(e|=gn),e}function Op(e,t,r){var o=t.pendingProps,c=!1,d=(t.flags&128)!==0,b;if((b=d)||(b=e!==null&&e.memoizedState===null?!1:(wt.current&2)!==0),b&&(c=!0,t.flags&=-129),b=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ke){if(c?Ta(t):ja(),Ke){var E=ft,_;if(_=E){e:{for(_=E,E=Dn;_.nodeType!==8;){if(!E){E=null;break e}if(_=Rn(_.nextSibling),_===null){E=null;break e}}E=_}E!==null?(t.memoizedState={dehydrated:E,treeContext:mr!==null?{id:ea,overflow:ta}:null,retryLane:536870912,hydrationErrors:null},_=Xt(18,null,null,0),_.stateNode=E,_.return=t,t.child=_,zt=t,ft=null,_=!0):_=!1}_||vr(t)}if(E=t.memoizedState,E!==null&&(E=E.dehydrated,E!==null))return jf(E)?t.lanes=32:t.lanes=536870912,null;la(t)}return E=o.children,o=o.fallback,c?(ja(),c=t.mode,E=cs({mode:"hidden",children:E},c),o=hr(o,c,r,null),E.return=t,o.return=t,E.sibling=o,t.child=E,c=t.child,c.memoizedState=Gc(r),c.childLanes=Kc(e,b,r),t.memoizedState=qc,o):(Ta(t),Fc(t,E))}if(_=e.memoizedState,_!==null&&(E=_.dehydrated,E!==null)){if(d)t.flags&256?(Ta(t),t.flags&=-257,t=Xc(e,t,r)):t.memoizedState!==null?(ja(),t.child=e.child,t.flags|=128,t=null):(ja(),c=o.fallback,E=t.mode,o=cs({mode:"visible",children:o.children},E),c=hr(c,E,r,null),c.flags|=2,o.return=t,c.return=t,o.sibling=c,t.child=o,sl(t,e.child,null,r),o=t.child,o.memoizedState=Gc(r),o.childLanes=Kc(e,b,r),t.memoizedState=qc,t=c);else if(Ta(t),jf(E)){if(b=E.nextSibling&&E.nextSibling.dataset,b)var F=b.dgst;b=F,o=Error(i(419)),o.stack="",o.digest=b,fi({value:o,source:null,stack:null}),t=Xc(e,t,r)}else if(Rt||di(e,t,r,!1),b=(r&e.childLanes)!==0,Rt||b){if(b=tt,b!==null&&(o=r&-r,o=(o&42)!==0?1:Il(o),o=(o&(b.suspendedLanes|r))!==0?0:o,o!==0&&o!==_.retryLane))throw _.retryLane=o,Jr(e,o),Wt(b,e,o),vp;E.data==="$?"||hf(),t=Xc(e,t,r)}else E.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=_.treeContext,ft=Rn(E.nextSibling),zt=t,Ke=!0,gr=null,Dn=!1,e!==null&&(hn[mn++]=ea,hn[mn++]=ta,hn[mn++]=mr,ea=e.id,ta=e.overflow,mr=t),t=Fc(t,o.children),t.flags|=4096);return t}return c?(ja(),c=o.fallback,E=t.mode,_=e.child,F=_.sibling,o=Wn(_,{mode:"hidden",children:o.children}),o.subtreeFlags=_.subtreeFlags&65011712,F!==null?c=Wn(F,c):(c=hr(c,E,r,null),c.flags|=2),c.return=t,o.return=t,o.sibling=c,t.child=o,o=c,c=t.child,E=e.child.memoizedState,E===null?E=Gc(r):(_=E.cachePool,_!==null?(F=St._currentValue,_=_.parent!==F?{parent:F,pool:F}:_):_=dm(),E={baseLanes:E.baseLanes|r,cachePool:_}),c.memoizedState=E,c.childLanes=Kc(e,b,r),t.memoizedState=qc,o):(Ta(t),r=e.child,e=r.sibling,r=Wn(r,{mode:"visible",children:o.children}),r.return=t,r.sibling=null,e!==null&&(b=t.deletions,b===null?(t.deletions=[e],t.flags|=16):b.push(e)),t.child=r,t.memoizedState=null,r)}function Fc(e,t){return t=cs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function cs(e,t){return e=Xt(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function Xc(e,t,r){return sl(t,e.child,null,r),e=Fc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ap(e,t,r){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),dc(e.return,t,r)}function Qc(e,t,r,o,c){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:r,tailMode:c}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=o,d.tail=r,d.tailMode=c)}function Np(e,t,r){var o=t.pendingProps,c=o.revealOrder,d=o.tail;if(Nt(e,t,o.children,r),o=wt.current,(o&2)!==0)o=o&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ap(e,r,t);else if(e.tag===19)Ap(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}o&=1}switch(M(wt,o),c){case"forwards":for(r=t.child,c=null;r!==null;)e=r.alternate,e!==null&&is(e)===null&&(c=r),r=r.sibling;r=c,r===null?(c=t.child,t.child=null):(c=r.sibling,r.sibling=null),Qc(t,!1,c,r,d);break;case"backwards":for(r=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&is(e)===null){t.child=c;break}e=c.sibling,c.sibling=r,r=c,c=e}Qc(t,!0,r,null,d);break;case"together":Qc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ia(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),za|=t.lanes,(r&t.childLanes)===0)if(e!==null){if(di(e,t,r,!1),(r&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,r=Wn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Wn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Zc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&qo(e)))}function N1(e,t,r){switch(t.tag){case 3:ce(t,t.stateNode.containerInfo),Ra(t,St,e.memoizedState.cache),ci();break;case 27:case 5:ke(t);break;case 4:ce(t,t.stateNode.containerInfo);break;case 10:Ra(t,t.type,t.memoizedProps.value);break;case 13:var o=t.memoizedState;if(o!==null)return o.dehydrated!==null?(Ta(t),t.flags|=128,null):(r&t.child.childLanes)!==0?Op(e,t,r):(Ta(t),e=ia(e,t,r),e!==null?e.sibling:null);Ta(t);break;case 19:var c=(e.flags&128)!==0;if(o=(r&t.childLanes)!==0,o||(di(e,t,r,!1),o=(r&t.childLanes)!==0),c){if(o)return Np(e,t,r);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),M(wt,wt.current),o)break;return null;case 22:case 23:return t.lanes=0,Sp(e,t,r);case 24:Ra(t,St,e.memoizedState.cache)}return ia(e,t,r)}function Tp(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps)Rt=!0;else{if(!Zc(e,r)&&(t.flags&128)===0)return Rt=!1,N1(e,t,r);Rt=(e.flags&131072)!==0}else Rt=!1,Ke&&(t.flags&1048576)!==0&&lm(t,Yo,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var o=t.elementType,c=o._init;if(o=c(o._payload),t.type=o,typeof o=="function")lc(o)?(e=wr(o,e),t.tag=1,t=Rp(null,t,o,e,r)):(t.tag=0,t=Yc(null,t,o,e,r));else{if(o!=null){if(c=o.$$typeof,c===Y){t.tag=11,t=yp(null,t,o,e,r);break e}else if(c===X){t.tag=14,t=bp(null,t,o,e,r);break e}}throw t=fe(o)||o,Error(i(306,t,""))}}return t;case 0:return Yc(e,t,t.type,t.pendingProps,r);case 1:return o=t.type,c=wr(o,t.pendingProps),Rp(e,t,o,c,r);case 3:e:{if(ce(t,t.stateNode.containerInfo),e===null)throw Error(i(387));o=t.pendingProps;var d=t.memoizedState;c=d.element,bc(e,t),bi(t,o,null,r);var b=t.memoizedState;if(o=b.cache,Ra(t,St,o),o!==d.cache&&hc(t,[St],r,!0),yi(),o=b.element,d.isDehydrated)if(d={element:o,isDehydrated:!1,cache:b.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=Cp(e,t,o,r);break e}else if(o!==c){c=fn(Error(i(424)),t),fi(c),t=Cp(e,t,o,r);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(ft=Rn(e.firstChild),zt=t,Ke=!0,gr=null,Dn=!0,r=op(t,null,o,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling}else{if(ci(),o===c){t=ia(e,t,r);break e}Nt(e,t,o,r)}t=t.child}return t;case 26:return us(e,t),e===null?(r=Dg(t.type,null,t.pendingProps,null))?t.memoizedState=r:Ke||(r=t.type,e=t.pendingProps,o=Rs(I.current).createElement(r),o[le]=t,o[se]=e,jt(o,r,e),_e(o),t.stateNode=o):t.memoizedState=Dg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ke(t),e===null&&Ke&&(o=t.stateNode=jg(t.type,t.pendingProps,I.current),zt=t,Dn=!0,c=ft,Ha(t.type)?(Mf=c,ft=Rn(o.firstChild)):ft=c),Nt(e,t,t.pendingProps.children,r),us(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ke&&((c=o=ft)&&(o=nS(o,t.type,t.pendingProps,Dn),o!==null?(t.stateNode=o,zt=t,ft=Rn(o.firstChild),Dn=!1,c=!0):c=!1),c||vr(t)),ke(t),c=t.type,d=t.pendingProps,b=e!==null?e.memoizedProps:null,o=d.children,Af(c,d)?o=null:b!==null&&Af(c,b)&&(t.flags|=32),t.memoizedState!==null&&(c=Cc(e,t,x1,null,null,r),$i._currentValue=c),us(e,t),Nt(e,t,o,r),t.child;case 6:return e===null&&Ke&&((e=r=ft)&&(r=aS(r,t.pendingProps,Dn),r!==null?(t.stateNode=r,zt=t,ft=null,e=!0):e=!1),e||vr(t)),null;case 13:return Op(e,t,r);case 4:return ce(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=sl(t,null,o,r):Nt(e,t,o,r),t.child;case 11:return yp(e,t,t.type,t.pendingProps,r);case 7:return Nt(e,t,t.pendingProps,r),t.child;case 8:return Nt(e,t,t.pendingProps.children,r),t.child;case 12:return Nt(e,t,t.pendingProps.children,r),t.child;case 10:return o=t.pendingProps,Ra(t,t.type,o.value),Nt(e,t,o.children,r),t.child;case 9:return c=t.type._context,o=t.pendingProps.children,br(t),c=Mt(c),o=o(c),t.flags|=1,Nt(e,t,o,r),t.child;case 14:return bp(e,t,t.type,t.pendingProps,r);case 15:return xp(e,t,t.type,t.pendingProps,r);case 19:return Np(e,t,r);case 31:return o=t.pendingProps,r=t.mode,o={mode:o.mode,children:o.children},e===null?(r=cs(o,r),r.ref=t.ref,t.child=r,r.return=t,t=r):(r=Wn(e.child,o),r.ref=t.ref,t.child=r,r.return=t,t=r),t;case 22:return Sp(e,t,r);case 24:return br(t),o=Mt(St),e===null?(c=gc(),c===null&&(c=tt,d=mc(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=r),c=d),t.memoizedState={parent:o,cache:c},yc(t),Ra(t,St,c)):((e.lanes&r)!==0&&(bc(e,t),bi(t,null,null,r),yi()),c=e.memoizedState,d=t.memoizedState,c.parent!==o?(c={parent:o,cache:o},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Ra(t,St,o)):(o=d.cache,Ra(t,St,o),o!==c.cache&&hc(t,[St],r,!0))),Nt(e,t,t.pendingProps.children,r),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function oa(e){e.flags|=4}function jp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Pg(t)){if(t=pn.current,t!==null&&((qe&4194048)===qe?Ln!==null:(qe&62914560)!==qe&&(qe&536870912)===0||t!==Ln))throw gi=vc,hm;e.flags|=8192}}function fs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Co():536870912,e.lanes|=t,dl|=t)}function Oi(e,t){if(!Ke)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var o=null;r!==null;)r.alternate!==null&&(o=r),r=r.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function st(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,o=0;if(t)for(var c=e.child;c!==null;)r|=c.lanes|c.childLanes,o|=c.subtreeFlags&65011712,o|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)r|=c.lanes|c.childLanes,o|=c.subtreeFlags,o|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=o,e.childLanes=r,t}function T1(e,t,r){var o=t.pendingProps;switch(uc(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return st(t),null;case 1:return st(t),null;case 3:return r=t.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),aa(St),Ee(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ui(t)?oa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,sm())),st(t),null;case 26:return r=t.memoizedState,e===null?(oa(t),r!==null?(st(t),jp(t,r)):(st(t),t.flags&=-16777217)):r?r!==e.memoizedState?(oa(t),st(t),jp(t,r)):(st(t),t.flags&=-16777217):(e.memoizedProps!==o&&oa(t),st(t),t.flags&=-16777217),null;case 27:xt(t),r=I.current;var c=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==o&&oa(t);else{if(!o){if(t.stateNode===null)throw Error(i(166));return st(t),null}e=U.current,ui(t)?im(t):(e=jg(c,o,r),t.stateNode=e,oa(t))}return st(t),null;case 5:if(xt(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&oa(t);else{if(!o){if(t.stateNode===null)throw Error(i(166));return st(t),null}if(e=U.current,ui(t))im(t);else{switch(c=Rs(I.current),e){case 1:e=c.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:e=c.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":e=c.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":e=c.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":e=c.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof o.is=="string"?c.createElement("select",{is:o.is}):c.createElement("select"),o.multiple?e.multiple=!0:o.size&&(e.size=o.size);break;default:e=typeof o.is=="string"?c.createElement(r,{is:o.is}):c.createElement(r)}}e[le]=t,e[se]=o;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)e.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=e;e:switch(jt(e,r,o),r){case"button":case"input":case"select":case"textarea":e=!!o.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&oa(t)}}return st(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==o&&oa(t);else{if(typeof o!="string"&&t.stateNode===null)throw Error(i(166));if(e=I.current,ui(t)){if(e=t.stateNode,r=t.memoizedProps,o=null,c=zt,c!==null)switch(c.tag){case 27:case 5:o=c.memoizedProps}e[le]=t,e=!!(e.nodeValue===r||o!==null&&o.suppressHydrationWarning===!0||Eg(e.nodeValue,r)),e||vr(t)}else e=Rs(e).createTextNode(o),e[le]=t,t.stateNode=e}return st(t),null;case 13:if(o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=ui(t),o!==null&&o.dehydrated!==null){if(e===null){if(!c)throw Error(i(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(i(317));c[le]=t}else ci(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;st(t),c=!1}else c=sm(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(la(t),t):(la(t),null)}if(la(t),(t.flags&128)!==0)return t.lanes=r,t;if(r=o!==null,e=e!==null&&e.memoizedState!==null,r){o=t.child,c=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(c=o.alternate.memoizedState.cachePool.pool);var d=null;o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),d!==c&&(o.flags|=2048)}return r!==e&&r&&(t.child.flags|=8192),fs(t,t.updateQueue),st(t),null;case 4:return Ee(),e===null&&wf(t.stateNode.containerInfo),st(t),null;case 10:return aa(t.type),st(t),null;case 19:if(O(wt),c=t.memoizedState,c===null)return st(t),null;if(o=(t.flags&128)!==0,d=c.rendering,d===null)if(o)Oi(c,!1);else{if(dt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=is(e),d!==null){for(t.flags|=128,Oi(c,!1),e=d.updateQueue,t.updateQueue=e,fs(t,e),t.subtreeFlags=0,e=r,r=t.child;r!==null;)rm(r,e),r=r.sibling;return M(wt,wt.current&1|2),t.child}e=e.sibling}c.tail!==null&&Gt()>ms&&(t.flags|=128,o=!0,Oi(c,!1),t.lanes=4194304)}else{if(!o)if(e=is(d),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,fs(t,e),Oi(c,!0),c.tail===null&&c.tailMode==="hidden"&&!d.alternate&&!Ke)return st(t),null}else 2*Gt()-c.renderingStartTime>ms&&r!==536870912&&(t.flags|=128,o=!0,Oi(c,!1),t.lanes=4194304);c.isBackwards?(d.sibling=t.child,t.child=d):(e=c.last,e!==null?e.sibling=d:t.child=d,c.last=d)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=Gt(),t.sibling=null,e=wt.current,M(wt,o?e&1|2:e&1),t):(st(t),null);case 22:case 23:return la(t),Ec(),o=t.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(t.flags|=8192):o&&(t.flags|=8192),o?(r&536870912)!==0&&(t.flags&128)===0&&(st(t),t.subtreeFlags&6&&(t.flags|=8192)):st(t),r=t.updateQueue,r!==null&&fs(t,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),o=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),o!==r&&(t.flags|=2048),e!==null&&O(xr),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),aa(St),st(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function j1(e,t){switch(uc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return aa(St),Ee(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return xt(t),null;case 13:if(la(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ci()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return O(wt),null;case 4:return Ee(),null;case 10:return aa(t.type),null;case 22:case 23:return la(t),Ec(),e!==null&&O(xr),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return aa(St),null;case 25:return null;default:return null}}function Mp(e,t){switch(uc(t),t.tag){case 3:aa(St),Ee();break;case 26:case 27:case 5:xt(t);break;case 4:Ee();break;case 13:la(t);break;case 19:O(wt);break;case 10:aa(t.type);break;case 22:case 23:la(t),Ec(),e!==null&&O(xr);break;case 24:aa(St)}}function Ai(e,t){try{var r=t.updateQueue,o=r!==null?r.lastEffect:null;if(o!==null){var c=o.next;r=c;do{if((r.tag&e)===e){o=void 0;var d=r.create,b=r.inst;o=d(),b.destroy=o}r=r.next}while(r!==c)}}catch(E){et(t,t.return,E)}}function Ma(e,t,r){try{var o=t.updateQueue,c=o!==null?o.lastEffect:null;if(c!==null){var d=c.next;o=d;do{if((o.tag&e)===e){var b=o.inst,E=b.destroy;if(E!==void 0){b.destroy=void 0,c=t;var _=r,F=E;try{F()}catch(te){et(c,_,te)}}}o=o.next}while(o!==d)}}catch(te){et(t,t.return,te)}}function _p(e){var t=e.updateQueue;if(t!==null){var r=e.stateNode;try{bm(t,r)}catch(o){et(e,e.return,o)}}}function Dp(e,t,r){r.props=wr(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(o){et(e,t,o)}}function Ni(e,t){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof r=="function"?e.refCleanup=r(o):r.current=o}}catch(c){et(e,t,c)}}function zn(e,t){var r=e.ref,o=e.refCleanup;if(r!==null)if(typeof o=="function")try{o()}catch(c){et(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(c){et(e,t,c)}else r.current=null}function Lp(e){var t=e.type,r=e.memoizedProps,o=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":r.autoFocus&&o.focus();break e;case"img":r.src?o.src=r.src:r.srcSet&&(o.srcset=r.srcSet)}}catch(c){et(e,e.return,c)}}function Jc(e,t,r){try{var o=e.stateNode;J1(o,e.type,r,t),o[se]=t}catch(c){et(e,e.return,c)}}function zp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ha(e.type)||e.tag===4}function Ic(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||zp(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.tag===27&&Ha(e.type)||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 Wc(e,t,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,t):(t=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,t.appendChild(e),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Es));else if(o!==4&&(o===27&&Ha(e.type)&&(r=e.stateNode,t=null),e=e.child,e!==null))for(Wc(e,t,r),e=e.sibling;e!==null;)Wc(e,t,r),e=e.sibling}function ds(e,t,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(o!==4&&(o===27&&Ha(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(ds(e,t,r),e=e.sibling;e!==null;)ds(e,t,r),e=e.sibling}function kp(e){var t=e.stateNode,r=e.memoizedProps;try{for(var o=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);jt(t,o,r),t[le]=e,t[se]=r}catch(d){et(e,e.return,d)}}var sa=!1,pt=!1,ef=!1,Up=typeof WeakSet=="function"?WeakSet:Set,Ct=null;function M1(e,t){if(e=e.containerInfo,Cf=js,e=Xh(e),Iu(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var o=r.getSelection&&r.getSelection();if(o&&o.rangeCount!==0){r=o.anchorNode;var c=o.anchorOffset,d=o.focusNode;o=o.focusOffset;try{r.nodeType,d.nodeType}catch{r=null;break e}var b=0,E=-1,_=-1,F=0,te=0,ae=e,Q=null;t:for(;;){for(var Z;ae!==r||c!==0&&ae.nodeType!==3||(E=b+c),ae!==d||o!==0&&ae.nodeType!==3||(_=b+o),ae.nodeType===3&&(b+=ae.nodeValue.length),(Z=ae.firstChild)!==null;)Q=ae,ae=Z;for(;;){if(ae===e)break t;if(Q===r&&++F===c&&(E=b),Q===d&&++te===o&&(_=b),(Z=ae.nextSibling)!==null)break;ae=Q,Q=ae.parentNode}ae=Z}r=E===-1||_===-1?null:{start:E,end:_}}else r=null}r=r||{start:0,end:0}}else r=null;for(Of={focusedElem:e,selectionRange:r},js=!1,Ct=t;Ct!==null;)if(t=Ct,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,Ct=e;else for(;Ct!==null;){switch(t=Ct,d=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,r=t,c=d.memoizedProps,d=d.memoizedState,o=r.stateNode;try{var je=wr(r.type,c,r.elementType===r.type);e=o.getSnapshotBeforeUpdate(je,d),o.__reactInternalSnapshotBeforeUpdate=e}catch(Ne){et(r,r.return,Ne)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,r=e.nodeType,r===9)Tf(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Tf(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,Ct=e;break}Ct=t.return}}function Pp(e,t,r){var o=r.flags;switch(r.tag){case 0:case 11:case 15:_a(e,r),o&4&&Ai(5,r);break;case 1:if(_a(e,r),o&4)if(e=r.stateNode,t===null)try{e.componentDidMount()}catch(b){et(r,r.return,b)}else{var c=wr(r.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(b){et(r,r.return,b)}}o&64&&_p(r),o&512&&Ni(r,r.return);break;case 3:if(_a(e,r),o&64&&(e=r.updateQueue,e!==null)){if(t=null,r.child!==null)switch(r.child.tag){case 27:case 5:t=r.child.stateNode;break;case 1:t=r.child.stateNode}try{bm(e,t)}catch(b){et(r,r.return,b)}}break;case 27:t===null&&o&4&&kp(r);case 26:case 5:_a(e,r),t===null&&o&4&&Lp(r),o&512&&Ni(r,r.return);break;case 12:_a(e,r);break;case 13:_a(e,r),o&4&&$p(e,r),o&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=B1.bind(null,r),rS(e,r))));break;case 22:if(o=r.memoizedState!==null||sa,!o){t=t!==null&&t.memoizedState!==null||pt,c=sa;var d=pt;sa=o,(pt=t)&&!d?Da(e,r,(r.subtreeFlags&8772)!==0):_a(e,r),sa=c,pt=d}break;case 30:break;default:_a(e,r)}}function Hp(e){var t=e.alternate;t!==null&&(e.alternate=null,Hp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&we(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var rt=null,Bt=!1;function ua(e,t,r){for(r=r.child;r!==null;)Bp(e,t,r),r=r.sibling}function Bp(e,t,r){if(it&&typeof it.onCommitFiberUnmount=="function")try{it.onCommitFiberUnmount(Ut,r)}catch{}switch(r.tag){case 26:pt||zn(r,t),ua(e,t,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:pt||zn(r,t);var o=rt,c=Bt;Ha(r.type)&&(rt=r.stateNode,Bt=!1),ua(e,t,r),Ui(r.stateNode),rt=o,Bt=c;break;case 5:pt||zn(r,t);case 6:if(o=rt,c=Bt,rt=null,ua(e,t,r),rt=o,Bt=c,rt!==null)if(Bt)try{(rt.nodeType===9?rt.body:rt.nodeName==="HTML"?rt.ownerDocument.body:rt).removeChild(r.stateNode)}catch(d){et(r,t,d)}else try{rt.removeChild(r.stateNode)}catch(d){et(r,t,d)}break;case 18:rt!==null&&(Bt?(e=rt,Ng(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),Gi(e)):Ng(rt,r.stateNode));break;case 4:o=rt,c=Bt,rt=r.stateNode.containerInfo,Bt=!0,ua(e,t,r),rt=o,Bt=c;break;case 0:case 11:case 14:case 15:pt||Ma(2,r,t),pt||Ma(4,r,t),ua(e,t,r);break;case 1:pt||(zn(r,t),o=r.stateNode,typeof o.componentWillUnmount=="function"&&Dp(r,t,o)),ua(e,t,r);break;case 21:ua(e,t,r);break;case 22:pt=(o=pt)||r.memoizedState!==null,ua(e,t,r),pt=o;break;default:ua(e,t,r)}}function $p(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Gi(e)}catch(r){et(t,t.return,r)}}function _1(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Up),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Up),t;default:throw Error(i(435,e.tag))}}function tf(e,t){var r=_1(e);t.forEach(function(o){var c=$1.bind(null,e,o);r.has(o)||(r.add(o),o.then(c,c))})}function Qt(e,t){var r=t.deletions;if(r!==null)for(var o=0;o<r.length;o++){var c=r[o],d=e,b=t,E=b;e:for(;E!==null;){switch(E.tag){case 27:if(Ha(E.type)){rt=E.stateNode,Bt=!1;break e}break;case 5:rt=E.stateNode,Bt=!1;break e;case 3:case 4:rt=E.stateNode.containerInfo,Bt=!0;break e}E=E.return}if(rt===null)throw Error(i(160));Bp(d,b,c),rt=null,Bt=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)Vp(t,e),t=t.sibling}var En=null;function Vp(e,t){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Qt(t,e),Zt(e),o&4&&(Ma(3,e,e.return),Ai(3,e),Ma(5,e,e.return));break;case 1:Qt(t,e),Zt(e),o&512&&(pt||r===null||zn(r,r.return)),o&64&&sa&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?o:r.concat(o))));break;case 26:var c=En;if(Qt(t,e),Zt(e),o&512&&(pt||r===null||zn(r,r.return)),o&4){var d=r!==null?r.memoizedState:null;if(o=e.memoizedState,r===null)if(o===null)if(e.stateNode===null){e:{o=e.type,r=e.memoizedProps,c=c.ownerDocument||c;t:switch(o){case"title":d=c.getElementsByTagName("title")[0],(!d||d[be]||d[le]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(o),c.head.insertBefore(d,c.querySelector("head > title"))),jt(d,o,r),d[le]=e,_e(d),o=d;break e;case"link":var b=kg("link","href",c).get(o+(r.href||""));if(b){for(var E=0;E<b.length;E++)if(d=b[E],d.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&d.getAttribute("rel")===(r.rel==null?null:r.rel)&&d.getAttribute("title")===(r.title==null?null:r.title)&&d.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){b.splice(E,1);break t}}d=c.createElement(o),jt(d,o,r),c.head.appendChild(d);break;case"meta":if(b=kg("meta","content",c).get(o+(r.content||""))){for(E=0;E<b.length;E++)if(d=b[E],d.getAttribute("content")===(r.content==null?null:""+r.content)&&d.getAttribute("name")===(r.name==null?null:r.name)&&d.getAttribute("property")===(r.property==null?null:r.property)&&d.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&d.getAttribute("charset")===(r.charSet==null?null:r.charSet)){b.splice(E,1);break t}}d=c.createElement(o),jt(d,o,r),c.head.appendChild(d);break;default:throw Error(i(468,o))}d[le]=e,_e(d),o=d}e.stateNode=o}else Ug(c,e.type,e.stateNode);else e.stateNode=zg(c,o,e.memoizedProps);else d!==o?(d===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):d.count--,o===null?Ug(c,e.type,e.stateNode):zg(c,o,e.memoizedProps)):o===null&&e.stateNode!==null&&Jc(e,e.memoizedProps,r.memoizedProps)}break;case 27:Qt(t,e),Zt(e),o&512&&(pt||r===null||zn(r,r.return)),r!==null&&o&4&&Jc(e,e.memoizedProps,r.memoizedProps);break;case 5:if(Qt(t,e),Zt(e),o&512&&(pt||r===null||zn(r,r.return)),e.flags&32){c=e.stateNode;try{qr(c,"")}catch(Z){et(e,e.return,Z)}}o&4&&e.stateNode!=null&&(c=e.memoizedProps,Jc(e,c,r!==null?r.memoizedProps:c)),o&1024&&(ef=!0);break;case 6:if(Qt(t,e),Zt(e),o&4){if(e.stateNode===null)throw Error(i(162));o=e.memoizedProps,r=e.stateNode;try{r.nodeValue=o}catch(Z){et(e,e.return,Z)}}break;case 3:if(As=null,c=En,En=Cs(t.containerInfo),Qt(t,e),En=c,Zt(e),o&4&&r!==null&&r.memoizedState.isDehydrated)try{Gi(t.containerInfo)}catch(Z){et(e,e.return,Z)}ef&&(ef=!1,Yp(e));break;case 4:o=En,En=Cs(e.stateNode.containerInfo),Qt(t,e),Zt(e),En=o;break;case 12:Qt(t,e),Zt(e);break;case 13:Qt(t,e),Zt(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(sf=Gt()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,tf(e,o)));break;case 22:c=e.memoizedState!==null;var _=r!==null&&r.memoizedState!==null,F=sa,te=pt;if(sa=F||c,pt=te||_,Qt(t,e),pt=te,sa=F,Zt(e),o&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(r===null||_||sa||pt||Er(e)),r=null,t=e;;){if(t.tag===5||t.tag===26){if(r===null){_=r=t;try{if(d=_.stateNode,c)b=d.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{E=_.stateNode;var ae=_.memoizedProps.style,Q=ae!=null&&ae.hasOwnProperty("display")?ae.display:null;E.style.display=Q==null||typeof Q=="boolean"?"":(""+Q).trim()}}catch(Z){et(_,_.return,Z)}}}else if(t.tag===6){if(r===null){_=t;try{_.stateNode.nodeValue=c?"":_.memoizedProps}catch(Z){et(_,_.return,Z)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;r===t&&(r=null),t=t.return}r===t&&(r=null),t.sibling.return=t.return,t=t.sibling}o&4&&(o=e.updateQueue,o!==null&&(r=o.retryQueue,r!==null&&(o.retryQueue=null,tf(e,r))));break;case 19:Qt(t,e),Zt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,tf(e,o)));break;case 30:break;case 21:break;default:Qt(t,e),Zt(e)}}function Zt(e){var t=e.flags;if(t&2){try{for(var r,o=e.return;o!==null;){if(zp(o)){r=o;break}o=o.return}if(r==null)throw Error(i(160));switch(r.tag){case 27:var c=r.stateNode,d=Ic(e);ds(e,d,c);break;case 5:var b=r.stateNode;r.flags&32&&(qr(b,""),r.flags&=-33);var E=Ic(e);ds(e,E,b);break;case 3:case 4:var _=r.stateNode.containerInfo,F=Ic(e);Wc(e,F,_);break;default:throw Error(i(161))}}catch(te){et(e,e.return,te)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Yp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Yp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function _a(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Pp(e,t.alternate,t),t=t.sibling}function Er(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ma(4,t,t.return),Er(t);break;case 1:zn(t,t.return);var r=t.stateNode;typeof r.componentWillUnmount=="function"&&Dp(t,t.return,r),Er(t);break;case 27:Ui(t.stateNode);case 26:case 5:zn(t,t.return),Er(t);break;case 22:t.memoizedState===null&&Er(t);break;case 30:Er(t);break;default:Er(t)}e=e.sibling}}function Da(e,t,r){for(r=r&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var o=t.alternate,c=e,d=t,b=d.flags;switch(d.tag){case 0:case 11:case 15:Da(c,d,r),Ai(4,d);break;case 1:if(Da(c,d,r),o=d,c=o.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(F){et(o,o.return,F)}if(o=d,c=o.updateQueue,c!==null){var E=o.stateNode;try{var _=c.shared.hiddenCallbacks;if(_!==null)for(c.shared.hiddenCallbacks=null,c=0;c<_.length;c++)ym(_[c],E)}catch(F){et(o,o.return,F)}}r&&b&64&&_p(d),Ni(d,d.return);break;case 27:kp(d);case 26:case 5:Da(c,d,r),r&&o===null&&b&4&&Lp(d),Ni(d,d.return);break;case 12:Da(c,d,r);break;case 13:Da(c,d,r),r&&b&4&&$p(c,d);break;case 22:d.memoizedState===null&&Da(c,d,r),Ni(d,d.return);break;case 30:break;default:Da(c,d,r)}t=t.sibling}}function nf(e,t){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&hi(r))}function af(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&hi(e))}function kn(e,t,r,o){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)qp(e,t,r,o),t=t.sibling}function qp(e,t,r,o){var c=t.flags;switch(t.tag){case 0:case 11:case 15:kn(e,t,r,o),c&2048&&Ai(9,t);break;case 1:kn(e,t,r,o);break;case 3:kn(e,t,r,o),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&hi(e)));break;case 12:if(c&2048){kn(e,t,r,o),e=t.stateNode;try{var d=t.memoizedProps,b=d.id,E=d.onPostCommit;typeof E=="function"&&E(b,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(_){et(t,t.return,_)}}else kn(e,t,r,o);break;case 13:kn(e,t,r,o);break;case 23:break;case 22:d=t.stateNode,b=t.alternate,t.memoizedState!==null?d._visibility&2?kn(e,t,r,o):Ti(e,t):d._visibility&2?kn(e,t,r,o):(d._visibility|=2,ul(e,t,r,o,(t.subtreeFlags&10256)!==0)),c&2048&&nf(b,t);break;case 24:kn(e,t,r,o),c&2048&&af(t.alternate,t);break;default:kn(e,t,r,o)}}function ul(e,t,r,o,c){for(c=c&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var d=e,b=t,E=r,_=o,F=b.flags;switch(b.tag){case 0:case 11:case 15:ul(d,b,E,_,c),Ai(8,b);break;case 23:break;case 22:var te=b.stateNode;b.memoizedState!==null?te._visibility&2?ul(d,b,E,_,c):Ti(d,b):(te._visibility|=2,ul(d,b,E,_,c)),c&&F&2048&&nf(b.alternate,b);break;case 24:ul(d,b,E,_,c),c&&F&2048&&af(b.alternate,b);break;default:ul(d,b,E,_,c)}t=t.sibling}}function Ti(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var r=e,o=t,c=o.flags;switch(o.tag){case 22:Ti(r,o),c&2048&&nf(o.alternate,o);break;case 24:Ti(r,o),c&2048&&af(o.alternate,o);break;default:Ti(r,o)}t=t.sibling}}var ji=8192;function cl(e){if(e.subtreeFlags&ji)for(e=e.child;e!==null;)Gp(e),e=e.sibling}function Gp(e){switch(e.tag){case 26:cl(e),e.flags&ji&&e.memoizedState!==null&&vS(En,e.memoizedState,e.memoizedProps);break;case 5:cl(e);break;case 3:case 4:var t=En;En=Cs(e.stateNode.containerInfo),cl(e),En=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=ji,ji=16777216,cl(e),ji=t):cl(e));break;default:cl(e)}}function Kp(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Mi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var o=t[r];Ct=o,Xp(o,e)}Kp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Fp(e),e=e.sibling}function Fp(e){switch(e.tag){case 0:case 11:case 15:Mi(e),e.flags&2048&&Ma(9,e,e.return);break;case 3:Mi(e);break;case 12:Mi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,hs(e)):Mi(e);break;default:Mi(e)}}function hs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var o=t[r];Ct=o,Xp(o,e)}Kp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ma(8,t,t.return),hs(t);break;case 22:r=t.stateNode,r._visibility&2&&(r._visibility&=-3,hs(t));break;default:hs(t)}e=e.sibling}}function Xp(e,t){for(;Ct!==null;){var r=Ct;switch(r.tag){case 0:case 11:case 15:Ma(8,r,t);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var o=r.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:hi(r.memoizedState.cache)}if(o=r.child,o!==null)o.return=r,Ct=o;else e:for(r=e;Ct!==null;){o=Ct;var c=o.sibling,d=o.return;if(Hp(o),o===r){Ct=null;break e}if(c!==null){c.return=d,Ct=c;break e}Ct=d}}}var D1={getCacheForType:function(e){var t=Mt(St),r=t.data.get(e);return r===void 0&&(r=e(),t.data.set(e,r)),r}},L1=typeof WeakMap=="function"?WeakMap:Map,Xe=0,tt=null,Ve=null,qe=0,Qe=0,Jt=null,La=!1,fl=!1,rf=!1,ca=0,dt=0,za=0,Rr=0,lf=0,gn=0,dl=0,_i=null,$t=null,of=!1,sf=0,ms=1/0,ps=null,ka=null,Tt=0,Ua=null,hl=null,ml=0,uf=0,cf=null,Qp=null,Di=0,ff=null;function It(){if((Xe&2)!==0&&qe!==0)return qe&-qe;if(L.T!==null){var e=tl;return e!==0?e:yf()}return D()}function Zp(){gn===0&&(gn=(qe&536870912)===0||Ke?Br():536870912);var e=pn.current;return e!==null&&(e.flags|=32),gn}function Wt(e,t,r){(e===tt&&(Qe===2||Qe===9)||e.cancelPendingCommit!==null)&&(pl(e,0),Pa(e,qe,gn,!1)),ir(e,r),((Xe&2)===0||e!==tt)&&(e===tt&&((Xe&2)===0&&(Rr|=r),dt===4&&Pa(e,qe,gn,!1)),Un(e))}function Jp(e,t,r){if((Xe&6)!==0)throw Error(i(327));var o=!r&&(t&124)===0&&(t&e.expiredLanes)===0||Mn(e,t),c=o?U1(e,t):mf(e,t,!0),d=o;do{if(c===0){fl&&!o&&Pa(e,t,0,!1);break}else{if(r=e.current.alternate,d&&!z1(r)){c=mf(e,t,!1),d=!1;continue}if(c===2){if(d=t,e.errorRecoveryDisabledLanes&d)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){t=b;e:{var E=e;c=_i;var _=E.current.memoizedState.isDehydrated;if(_&&(pl(E,b).flags|=256),b=mf(E,b,!1),b!==2){if(rf&&!_){E.errorRecoveryDisabledLanes|=d,Rr|=d,c=4;break e}d=$t,$t=c,d!==null&&($t===null?$t=d:$t.push.apply($t,d))}c=b}if(d=!1,c!==2)continue}}if(c===1){pl(e,0),Pa(e,t,0,!0);break}e:{switch(o=e,d=c,d){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Pa(o,t,gn,!La);break e;case 2:$t=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(c=sf+300-Gt(),10<c)){if(Pa(o,t,gn,!La),lr(o,0,!0)!==0)break e;o.timeoutHandle=Og(Ip.bind(null,o,r,$t,ps,of,t,gn,Rr,dl,La,d,2,-0,0),c);break e}Ip(o,r,$t,ps,of,t,gn,Rr,dl,La,d,0,-0,0)}}break}while(!0);Un(e)}function Ip(e,t,r,o,c,d,b,E,_,F,te,ae,Q,Z){if(e.timeoutHandle=-1,ae=t.subtreeFlags,(ae&8192||(ae&16785408)===16785408)&&(Bi={stylesheets:null,count:0,unsuspend:gS},Gp(t),ae=yS(),ae!==null)){e.cancelPendingCommit=ae(lg.bind(null,e,t,d,r,o,c,b,E,_,te,1,Q,Z)),Pa(e,d,b,!F);return}lg(e,t,d,r,o,c,b,E,_)}function z1(e){for(var t=e;;){var r=t.tag;if((r===0||r===11||r===15)&&t.flags&16384&&(r=t.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var o=0;o<r.length;o++){var c=r[o],d=c.getSnapshot;c=c.value;try{if(!Ft(d(),c))return!1}catch{return!1}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Pa(e,t,r,o){t&=~lf,t&=~Rr,e.suspendedLanes|=t,e.pingedLanes&=~t,o&&(e.warmLanes|=t),o=e.expirationTimes;for(var c=t;0<c;){var d=31-At(c),b=1<<d;o[d]=-1,c&=~b}r!==0&&or(e,r,t)}function gs(){return(Xe&6)===0?(Li(0),!1):!0}function df(){if(Ve!==null){if(Qe===0)var e=Ve.return;else e=Ve,na=yr=null,Nc(e),ol=null,Ri=0,e=Ve;for(;e!==null;)Mp(e.alternate,e),e=e.return;Ve=null}}function pl(e,t){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,W1(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),df(),tt=e,Ve=r=Wn(e.current,null),qe=t,Qe=0,Jt=null,La=!1,fl=Mn(e,t),rf=!1,dl=gn=lf=Rr=za=dt=0,$t=_i=null,of=!1,(t&8)!==0&&(t|=t&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=t;0<o;){var c=31-At(o),d=1<<c;t|=e[c],o&=~d}return ca=t,Po(),r}function Wp(e,t){Ue=null,L.H=as,t===pi||t===Fo?(t=gm(),Qe=3):t===hm?(t=gm(),Qe=4):Qe=t===vp?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Jt=t,Ve===null&&(dt=1,ss(e,fn(t,e.current)))}function eg(){var e=L.H;return L.H=as,e===null?as:e}function tg(){var e=L.A;return L.A=D1,e}function hf(){dt=4,La||(qe&4194048)!==qe&&pn.current!==null||(fl=!0),(za&134217727)===0&&(Rr&134217727)===0||tt===null||Pa(tt,qe,gn,!1)}function mf(e,t,r){var o=Xe;Xe|=2;var c=eg(),d=tg();(tt!==e||qe!==t)&&(ps=null,pl(e,t)),t=!1;var b=dt;e:do try{if(Qe!==0&&Ve!==null){var E=Ve,_=Jt;switch(Qe){case 8:df(),b=6;break e;case 3:case 2:case 9:case 6:pn.current===null&&(t=!0);var F=Qe;if(Qe=0,Jt=null,gl(e,E,_,F),r&&fl){b=0;break e}break;default:F=Qe,Qe=0,Jt=null,gl(e,E,_,F)}}k1(),b=dt;break}catch(te){Wp(e,te)}while(!0);return t&&e.shellSuspendCounter++,na=yr=null,Xe=o,L.H=c,L.A=d,Ve===null&&(tt=null,qe=0,Po()),b}function k1(){for(;Ve!==null;)ng(Ve)}function U1(e,t){var r=Xe;Xe|=2;var o=eg(),c=tg();tt!==e||qe!==t?(ps=null,ms=Gt()+500,pl(e,t)):fl=Mn(e,t);e:do try{if(Qe!==0&&Ve!==null){t=Ve;var d=Jt;t:switch(Qe){case 1:Qe=0,Jt=null,gl(e,t,d,1);break;case 2:case 9:if(mm(d)){Qe=0,Jt=null,ag(t);break}t=function(){Qe!==2&&Qe!==9||tt!==e||(Qe=7),Un(e)},d.then(t,t);break e;case 3:Qe=7;break e;case 4:Qe=5;break e;case 7:mm(d)?(Qe=0,Jt=null,ag(t)):(Qe=0,Jt=null,gl(e,t,d,7));break;case 5:var b=null;switch(Ve.tag){case 26:b=Ve.memoizedState;case 5:case 27:var E=Ve;if(!b||Pg(b)){Qe=0,Jt=null;var _=E.sibling;if(_!==null)Ve=_;else{var F=E.return;F!==null?(Ve=F,vs(F)):Ve=null}break t}}Qe=0,Jt=null,gl(e,t,d,5);break;case 6:Qe=0,Jt=null,gl(e,t,d,6);break;case 8:df(),dt=6;break e;default:throw Error(i(462))}}P1();break}catch(te){Wp(e,te)}while(!0);return na=yr=null,L.H=o,L.A=c,Xe=r,Ve!==null?0:(tt=null,qe=0,Po(),dt)}function P1(){for(;Ve!==null&&!Du();)ng(Ve)}function ng(e){var t=Tp(e.alternate,e,ca);e.memoizedProps=e.pendingProps,t===null?vs(e):Ve=t}function ag(e){var t=e,r=t.alternate;switch(t.tag){case 15:case 0:t=Ep(r,t,t.pendingProps,t.type,void 0,qe);break;case 11:t=Ep(r,t,t.pendingProps,t.type.render,t.ref,qe);break;case 5:Nc(t);default:Mp(r,t),t=Ve=rm(t,ca),t=Tp(r,t,ca)}e.memoizedProps=e.pendingProps,t===null?vs(e):Ve=t}function gl(e,t,r,o){na=yr=null,Nc(t),ol=null,Ri=0;var c=t.return;try{if(A1(e,c,t,r,qe)){dt=1,ss(e,fn(r,e.current)),Ve=null;return}}catch(d){if(c!==null)throw Ve=c,d;dt=1,ss(e,fn(r,e.current)),Ve=null;return}t.flags&32768?(Ke||o===1?e=!0:fl||(qe&536870912)!==0?e=!1:(La=e=!0,(o===2||o===9||o===3||o===6)&&(o=pn.current,o!==null&&o.tag===13&&(o.flags|=16384))),rg(t,e)):vs(t)}function vs(e){var t=e;do{if((t.flags&32768)!==0){rg(t,La);return}e=t.return;var r=T1(t.alternate,t,ca);if(r!==null){Ve=r;return}if(t=t.sibling,t!==null){Ve=t;return}Ve=t=e}while(t!==null);dt===0&&(dt=5)}function rg(e,t){do{var r=j1(e.alternate,e);if(r!==null){r.flags&=32767,Ve=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!t&&(e=e.sibling,e!==null)){Ve=e;return}Ve=e=r}while(e!==null);dt=6,Ve=null}function lg(e,t,r,o,c,d,b,E,_){e.cancelPendingCommit=null;do ys();while(Tt!==0);if((Xe&6)!==0)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(d=t.lanes|t.childLanes,d|=ac,Oo(e,r,d,b,E,_),e===tt&&(Ve=tt=null,qe=0),hl=t,Ua=e,ml=r,uf=d,cf=c,Qp=o,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,V1(Hr,function(){return cg(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||o){o=L.T,L.T=null,c=W.p,W.p=2,b=Xe,Xe|=4;try{M1(e,t,r)}finally{Xe=b,W.p=c,L.T=o}}Tt=1,ig(),og(),sg()}}function ig(){if(Tt===1){Tt=0;var e=Ua,t=hl,r=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||r){r=L.T,L.T=null;var o=W.p;W.p=2;var c=Xe;Xe|=4;try{Vp(t,e);var d=Of,b=Xh(e.containerInfo),E=d.focusedElem,_=d.selectionRange;if(b!==E&&E&&E.ownerDocument&&Fh(E.ownerDocument.documentElement,E)){if(_!==null&&Iu(E)){var F=_.start,te=_.end;if(te===void 0&&(te=F),"selectionStart"in E)E.selectionStart=F,E.selectionEnd=Math.min(te,E.value.length);else{var ae=E.ownerDocument||document,Q=ae&&ae.defaultView||window;if(Q.getSelection){var Z=Q.getSelection(),je=E.textContent.length,Ne=Math.min(_.start,je),We=_.end===void 0?Ne:Math.min(_.end,je);!Z.extend&&Ne>We&&(b=We,We=Ne,Ne=b);var H=Kh(E,Ne),z=Kh(E,We);if(H&&z&&(Z.rangeCount!==1||Z.anchorNode!==H.node||Z.anchorOffset!==H.offset||Z.focusNode!==z.node||Z.focusOffset!==z.offset)){var G=ae.createRange();G.setStart(H.node,H.offset),Z.removeAllRanges(),Ne>We?(Z.addRange(G),Z.extend(z.node,z.offset)):(G.setEnd(z.node,z.offset),Z.addRange(G))}}}}for(ae=[],Z=E;Z=Z.parentNode;)Z.nodeType===1&&ae.push({element:Z,left:Z.scrollLeft,top:Z.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<ae.length;E++){var ne=ae[E];ne.element.scrollLeft=ne.left,ne.element.scrollTop=ne.top}}js=!!Cf,Of=Cf=null}finally{Xe=c,W.p=o,L.T=r}}e.current=t,Tt=2}}function og(){if(Tt===2){Tt=0;var e=Ua,t=hl,r=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||r){r=L.T,L.T=null;var o=W.p;W.p=2;var c=Xe;Xe|=4;try{Pp(e,t.alternate,t)}finally{Xe=c,W.p=o,L.T=r}}Tt=3}}function sg(){if(Tt===4||Tt===3){Tt=0,Lu();var e=Ua,t=hl,r=ml,o=Qp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Tt=5:(Tt=0,hl=Ua=null,ug(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(ka=null),Wl(r),t=t.stateNode,it&&typeof it.onCommitFiberRoot=="function")try{it.onCommitFiberRoot(Ut,t,void 0,(t.current.flags&128)===128)}catch{}if(o!==null){t=L.T,c=W.p,W.p=2,L.T=null;try{for(var d=e.onRecoverableError,b=0;b<o.length;b++){var E=o[b];d(E.value,{componentStack:E.stack})}}finally{L.T=t,W.p=c}}(ml&3)!==0&&ys(),Un(e),c=e.pendingLanes,(r&4194090)!==0&&(c&42)!==0?e===ff?Di++:(Di=0,ff=e):Di=0,Li(0)}}function ug(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,hi(t)))}function ys(e){return ig(),og(),sg(),cg()}function cg(){if(Tt!==5)return!1;var e=Ua,t=uf;uf=0;var r=Wl(ml),o=L.T,c=W.p;try{W.p=32>r?32:r,L.T=null,r=cf,cf=null;var d=Ua,b=ml;if(Tt=0,hl=Ua=null,ml=0,(Xe&6)!==0)throw Error(i(331));var E=Xe;if(Xe|=4,Fp(d.current),qp(d,d.current,b,r),Xe=E,Li(0,!1),it&&typeof it.onPostCommitFiberRoot=="function")try{it.onPostCommitFiberRoot(Ut,d)}catch{}return!0}finally{W.p=c,L.T=o,ug(e,t)}}function fg(e,t,r){t=fn(r,t),t=Vc(e.stateNode,t,2),e=Aa(e,t,2),e!==null&&(ir(e,2),Un(e))}function et(e,t,r){if(e.tag===3)fg(e,e,r);else for(;t!==null;){if(t.tag===3){fg(t,e,r);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(ka===null||!ka.has(o))){e=fn(r,e),r=pp(2),o=Aa(t,r,2),o!==null&&(gp(r,o,t,e),ir(o,2),Un(o));break}}t=t.return}}function pf(e,t,r){var o=e.pingCache;if(o===null){o=e.pingCache=new L1;var c=new Set;o.set(t,c)}else c=o.get(t),c===void 0&&(c=new Set,o.set(t,c));c.has(r)||(rf=!0,c.add(r),e=H1.bind(null,e,t,r),t.then(e,e))}function H1(e,t,r){var o=e.pingCache;o!==null&&o.delete(t),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,tt===e&&(qe&r)===r&&(dt===4||dt===3&&(qe&62914560)===qe&&300>Gt()-sf?(Xe&2)===0&&pl(e,0):lf|=r,dl===qe&&(dl=0)),Un(e)}function dg(e,t){t===0&&(t=Co()),e=Jr(e,t),e!==null&&(ir(e,t),Un(e))}function B1(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),dg(e,r)}function $1(e,t){var r=0;switch(e.tag){case 13:var o=e.stateNode,c=e.memoizedState;c!==null&&(r=c.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(i(314))}o!==null&&o.delete(t),dg(e,r)}function V1(e,t){return Tn(e,t)}var bs=null,vl=null,gf=!1,xs=!1,vf=!1,Cr=0;function Un(e){e!==vl&&e.next===null&&(vl===null?bs=vl=e:vl=vl.next=e),xs=!0,gf||(gf=!0,q1())}function Li(e,t){if(!vf&&xs){vf=!0;do for(var r=!1,o=bs;o!==null;){if(e!==0){var c=o.pendingLanes;if(c===0)var d=0;else{var b=o.suspendedLanes,E=o.pingedLanes;d=(1<<31-At(42|e)+1)-1,d&=c&~(b&~E),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(r=!0,gg(o,d))}else d=qe,d=lr(o,o===tt?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(d&3)===0||Mn(o,d)||(r=!0,gg(o,d));o=o.next}while(r);vf=!1}}function Y1(){hg()}function hg(){xs=gf=!1;var e=0;Cr!==0&&(I1()&&(e=Cr),Cr=0);for(var t=Gt(),r=null,o=bs;o!==null;){var c=o.next,d=mg(o,t);d===0?(o.next=null,r===null?bs=c:r.next=c,c===null&&(vl=r)):(r=o,(e!==0||(d&3)!==0)&&(xs=!0)),o=c}Li(e)}function mg(e,t){for(var r=e.suspendedLanes,o=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var b=31-At(d),E=1<<b,_=c[b];_===-1?((E&r)===0||(E&o)!==0)&&(c[b]=Ro(E,t)):_<=t&&(e.expiredLanes|=E),d&=~E}if(t=tt,r=qe,r=lr(e,e===t?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,r===0||e===t&&(Qe===2||Qe===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&xn(o),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||Mn(e,r)){if(t=r&-r,t===e.callbackPriority)return t;switch(o!==null&&xn(o),Wl(r)){case 2:case 8:r=So;break;case 32:r=Hr;break;case 268435456:r=xa;break;default:r=Hr}return o=pg.bind(null,e),r=Tn(r,o),e.callbackPriority=t,e.callbackNode=r,t}return o!==null&&o!==null&&xn(o),e.callbackPriority=2,e.callbackNode=null,2}function pg(e,t){if(Tt!==0&&Tt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(ys()&&e.callbackNode!==r)return null;var o=qe;return o=lr(e,e===tt?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(Jp(e,o,t),mg(e,Gt()),e.callbackNode!=null&&e.callbackNode===r?pg.bind(null,e):null)}function gg(e,t){if(ys())return null;Jp(e,t,!0)}function q1(){eS(function(){(Xe&6)!==0?Tn(xo,Y1):hg()})}function yf(){return Cr===0&&(Cr=Br()),Cr}function vg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Mo(""+e)}function yg(e,t){var r=t.ownerDocument.createElement("input");return r.name=t.name,r.value=t.value,e.id&&r.setAttribute("form",e.id),t.parentNode.insertBefore(r,t),e=new FormData(e),r.parentNode.removeChild(r),e}function G1(e,t,r,o,c){if(t==="submit"&&r&&r.stateNode===c){var d=vg((c[se]||null).action),b=o.submitter;b&&(t=(t=b[se]||null)?vg(t.formAction):b.getAttribute("formAction"),t!==null&&(d=t,b=null));var E=new zo("action","action",null,o,c);e.push({event:E,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Cr!==0){var _=b?yg(c,b):new FormData(c);Uc(r,{pending:!0,data:_,method:c.method,action:d},null,_)}}else typeof d=="function"&&(E.preventDefault(),_=b?yg(c,b):new FormData(c),Uc(r,{pending:!0,data:_,method:c.method,action:d},d,_))},currentTarget:c}]})}}for(var bf=0;bf<nc.length;bf++){var xf=nc[bf],K1=xf.toLowerCase(),F1=xf[0].toUpperCase()+xf.slice(1);wn(K1,"on"+F1)}wn(Jh,"onAnimationEnd"),wn(Ih,"onAnimationIteration"),wn(Wh,"onAnimationStart"),wn("dblclick","onDoubleClick"),wn("focusin","onFocus"),wn("focusout","onBlur"),wn(c1,"onTransitionRun"),wn(f1,"onTransitionStart"),wn(d1,"onTransitionCancel"),wn(em,"onTransitionEnd"),Lt("onMouseEnter",["mouseout","mouseover"]),Lt("onMouseLeave",["mouseout","mouseover"]),Lt("onPointerEnter",["pointerout","pointerover"]),Lt("onPointerLeave",["pointerout","pointerover"]),Kt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Kt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Kt("onBeforeInput",["compositionend","keypress","textInput","paste"]),Kt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Kt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Kt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),X1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(zi));function bg(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var o=e[r],c=o.event;o=o.listeners;e:{var d=void 0;if(t)for(var b=o.length-1;0<=b;b--){var E=o[b],_=E.instance,F=E.currentTarget;if(E=E.listener,_!==d&&c.isPropagationStopped())break e;d=E,c.currentTarget=F;try{d(c)}catch(te){os(te)}c.currentTarget=null,d=_}else for(b=0;b<o.length;b++){if(E=o[b],_=E.instance,F=E.currentTarget,E=E.listener,_!==d&&c.isPropagationStopped())break e;d=E,c.currentTarget=F;try{d(c)}catch(te){os(te)}c.currentTarget=null,d=_}}}}function Ye(e,t){var r=t[xe];r===void 0&&(r=t[xe]=new Set);var o=e+"__bubble";r.has(o)||(xg(t,e,2,!1),r.add(o))}function Sf(e,t,r){var o=0;t&&(o|=4),xg(r,e,o,t)}var Ss="_reactListening"+Math.random().toString(36).slice(2);function wf(e){if(!e[Ss]){e[Ss]=!0,Ze.forEach(function(r){r!=="selectionchange"&&(X1.has(r)||Sf(r,!1,e),Sf(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ss]||(t[Ss]=!0,Sf("selectionchange",!1,t))}}function xg(e,t,r,o){switch(qg(t)){case 2:var c=SS;break;case 8:c=wS;break;default:c=kf}r=c.bind(null,t,r,e),c=void 0,!Yu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),o?c!==void 0?e.addEventListener(t,r,{capture:!0,passive:c}):e.addEventListener(t,r,!0):c!==void 0?e.addEventListener(t,r,{passive:c}):e.addEventListener(t,r,!1)}function Ef(e,t,r,o,c){var d=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var b=o.tag;if(b===3||b===4){var E=o.stateNode.containerInfo;if(E===c)break;if(b===4)for(b=o.return;b!==null;){var _=b.tag;if((_===3||_===4)&&b.stateNode.containerInfo===c)return;b=b.return}for(;E!==null;){if(b=ze(E),b===null)return;if(_=b.tag,_===5||_===6||_===26||_===27){o=d=b;continue e}E=E.parentNode}}o=o.return}Ah(function(){var F=d,te=$u(r),ae=[];e:{var Q=tm.get(e);if(Q!==void 0){var Z=zo,je=e;switch(e){case"keypress":if(Do(r)===0)break e;case"keydown":case"keyup":Z=Vx;break;case"focusin":je="focus",Z=Fu;break;case"focusout":je="blur",Z=Fu;break;case"beforeblur":case"afterblur":Z=Fu;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Z=jh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=jx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=Gx;break;case Jh:case Ih:case Wh:Z=Dx;break;case em:Z=Fx;break;case"scroll":case"scrollend":Z=Nx;break;case"wheel":Z=Qx;break;case"copy":case"cut":case"paste":Z=zx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=_h;break;case"toggle":case"beforetoggle":Z=Jx}var Ne=(t&4)!==0,We=!Ne&&(e==="scroll"||e==="scrollend"),H=Ne?Q!==null?Q+"Capture":null:Q;Ne=[];for(var z=F,G;z!==null;){var ne=z;if(G=ne.stateNode,ne=ne.tag,ne!==5&&ne!==26&&ne!==27||G===null||H===null||(ne=ei(z,H),ne!=null&&Ne.push(ki(z,ne,G))),We)break;z=z.return}0<Ne.length&&(Q=new Z(Q,je,null,r,te),ae.push({event:Q,listeners:Ne}))}}if((t&7)===0){e:{if(Q=e==="mouseover"||e==="pointerover",Z=e==="mouseout"||e==="pointerout",Q&&r!==Bu&&(je=r.relatedTarget||r.fromElement)&&(ze(je)||je[ve]))break e;if((Z||Q)&&(Q=te.window===te?te:(Q=te.ownerDocument)?Q.defaultView||Q.parentWindow:window,Z?(je=r.relatedTarget||r.toElement,Z=F,je=je?ze(je):null,je!==null&&(We=u(je),Ne=je.tag,je!==We||Ne!==5&&Ne!==27&&Ne!==6)&&(je=null)):(Z=null,je=F),Z!==je)){if(Ne=jh,ne="onMouseLeave",H="onMouseEnter",z="mouse",(e==="pointerout"||e==="pointerover")&&(Ne=_h,ne="onPointerLeave",H="onPointerEnter",z="pointer"),We=Z==null?Q:ut(Z),G=je==null?Q:ut(je),Q=new Ne(ne,z+"leave",Z,r,te),Q.target=We,Q.relatedTarget=G,ne=null,ze(te)===F&&(Ne=new Ne(H,z+"enter",je,r,te),Ne.target=G,Ne.relatedTarget=We,ne=Ne),We=ne,Z&&je)t:{for(Ne=Z,H=je,z=0,G=Ne;G;G=yl(G))z++;for(G=0,ne=H;ne;ne=yl(ne))G++;for(;0<z-G;)Ne=yl(Ne),z--;for(;0<G-z;)H=yl(H),G--;for(;z--;){if(Ne===H||H!==null&&Ne===H.alternate)break t;Ne=yl(Ne),H=yl(H)}Ne=null}else Ne=null;Z!==null&&Sg(ae,Q,Z,Ne,!1),je!==null&&We!==null&&Sg(ae,We,je,Ne,!0)}}e:{if(Q=F?ut(F):window,Z=Q.nodeName&&Q.nodeName.toLowerCase(),Z==="select"||Z==="input"&&Q.type==="file")var me=Bh;else if(Ph(Q))if($h)me=o1;else{me=l1;var Be=r1}else Z=Q.nodeName,!Z||Z.toLowerCase()!=="input"||Q.type!=="checkbox"&&Q.type!=="radio"?F&&Hu(F.elementType)&&(me=Bh):me=i1;if(me&&(me=me(e,F))){Hh(ae,me,r,te);break e}Be&&Be(e,Q,F),e==="focusout"&&F&&Q.type==="number"&&F.memoizedProps.value!=null&&Pu(Q,"number",Q.value)}switch(Be=F?ut(F):window,e){case"focusin":(Ph(Be)||Be.contentEditable==="true")&&(Xr=Be,Wu=F,si=null);break;case"focusout":si=Wu=Xr=null;break;case"mousedown":ec=!0;break;case"contextmenu":case"mouseup":case"dragend":ec=!1,Qh(ae,r,te);break;case"selectionchange":if(u1)break;case"keydown":case"keyup":Qh(ae,r,te)}var Re;if(Qu)e:{switch(e){case"compositionstart":var Te="onCompositionStart";break e;case"compositionend":Te="onCompositionEnd";break e;case"compositionupdate":Te="onCompositionUpdate";break e}Te=void 0}else Fr?kh(e,r)&&(Te="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(Te="onCompositionStart");Te&&(Dh&&r.locale!=="ko"&&(Fr||Te!=="onCompositionStart"?Te==="onCompositionEnd"&&Fr&&(Re=Nh()):(Ea=te,qu="value"in Ea?Ea.value:Ea.textContent,Fr=!0)),Be=ws(F,Te),0<Be.length&&(Te=new Mh(Te,e,null,r,te),ae.push({event:Te,listeners:Be}),Re?Te.data=Re:(Re=Uh(r),Re!==null&&(Te.data=Re)))),(Re=Wx?e1(e,r):t1(e,r))&&(Te=ws(F,"onBeforeInput"),0<Te.length&&(Be=new Mh("onBeforeInput","beforeinput",null,r,te),ae.push({event:Be,listeners:Te}),Be.data=Re)),G1(ae,e,F,r,te)}bg(ae,t)})}function ki(e,t,r){return{instance:e,listener:t,currentTarget:r}}function ws(e,t){for(var r=t+"Capture",o=[];e!==null;){var c=e,d=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||d===null||(c=ei(e,r),c!=null&&o.unshift(ki(e,c,d)),c=ei(e,t),c!=null&&o.push(ki(e,c,d))),e.tag===3)return o;e=e.return}return[]}function yl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Sg(e,t,r,o,c){for(var d=t._reactName,b=[];r!==null&&r!==o;){var E=r,_=E.alternate,F=E.stateNode;if(E=E.tag,_!==null&&_===o)break;E!==5&&E!==26&&E!==27||F===null||(_=F,c?(F=ei(r,d),F!=null&&b.unshift(ki(r,F,_))):c||(F=ei(r,d),F!=null&&b.push(ki(r,F,_)))),r=r.return}b.length!==0&&e.push({event:t,listeners:b})}var Q1=/\r\n?/g,Z1=/\u0000|\uFFFD/g;function wg(e){return(typeof e=="string"?e:""+e).replace(Q1,`
55
- `).replace(Z1,"")}function Eg(e,t){return t=wg(t),wg(e)===t}function Es(){}function Ie(e,t,r,o,c,d){switch(r){case"children":typeof o=="string"?t==="body"||t==="textarea"&&o===""||qr(e,o):(typeof o=="number"||typeof o=="bigint")&&t!=="body"&&qr(e,""+o);break;case"className":Jn(e,"class",o);break;case"tabIndex":Jn(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":Jn(e,r,o);break;case"style":Ch(e,o,d);break;case"data":if(t!=="object"){Jn(e,"data",o);break}case"src":case"href":if(o===""&&(t!=="a"||r!=="href")){e.removeAttribute(r);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(r);break}o=Mo(""+o),e.setAttribute(r,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(r,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(r==="formAction"?(t!=="input"&&Ie(e,t,"name",c.name,c,null),Ie(e,t,"formEncType",c.formEncType,c,null),Ie(e,t,"formMethod",c.formMethod,c,null),Ie(e,t,"formTarget",c.formTarget,c,null)):(Ie(e,t,"encType",c.encType,c,null),Ie(e,t,"method",c.method,c,null),Ie(e,t,"target",c.target,c,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(r);break}o=Mo(""+o),e.setAttribute(r,o);break;case"onClick":o!=null&&(e.onclick=Es);break;case"onScroll":o!=null&&Ye("scroll",e);break;case"onScrollEnd":o!=null&&Ye("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(r=o.__html,r!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=r}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}r=Mo(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(r,""+o):e.removeAttribute(r);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":o===!0?e.setAttribute(r,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(r,o):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(r,o):e.removeAttribute(r);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(r):e.setAttribute(r,o);break;case"popover":Ye("beforetoggle",e),Ye("toggle",e),Zn(e,"popover",o);break;case"xlinkActuate":He(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":He(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":He(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":He(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":He(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":He(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":He(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":He(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":He(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Zn(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=Ox.get(r)||r,Zn(e,r,o))}}function Rf(e,t,r,o,c,d){switch(r){case"style":Ch(e,o,d);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(r=o.__html,r!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=r}}break;case"children":typeof o=="string"?qr(e,o):(typeof o=="number"||typeof o=="bigint")&&qr(e,""+o);break;case"onScroll":o!=null&&Ye("scroll",e);break;case"onScrollEnd":o!=null&&Ye("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Es);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!_n.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(c=r.endsWith("Capture"),t=r.slice(2,c?r.length-7:void 0),d=e[se]||null,d=d!=null?d[r]:null,typeof d=="function"&&e.removeEventListener(t,d,c),typeof o=="function")){typeof d!="function"&&d!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(t,o,c);break e}r in e?e[r]=o:o===!0?e.setAttribute(r,""):Zn(e,r,o)}}}function jt(e,t,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ye("error",e),Ye("load",e);var o=!1,c=!1,d;for(d in r)if(r.hasOwnProperty(d)){var b=r[d];if(b!=null)switch(d){case"src":o=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:Ie(e,t,d,b,r,null)}}c&&Ie(e,t,"srcSet",r.srcSet,r,null),o&&Ie(e,t,"src",r.src,r,null);return;case"input":Ye("invalid",e);var E=d=b=c=null,_=null,F=null;for(o in r)if(r.hasOwnProperty(o)){var te=r[o];if(te!=null)switch(o){case"name":c=te;break;case"type":b=te;break;case"checked":_=te;break;case"defaultChecked":F=te;break;case"value":d=te;break;case"defaultValue":E=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(i(137,t));break;default:Ie(e,t,o,te,r,null)}}Sh(e,d,E,_,F,b,c,!1),To(e);return;case"select":Ye("invalid",e),o=b=d=null;for(c in r)if(r.hasOwnProperty(c)&&(E=r[c],E!=null))switch(c){case"value":d=E;break;case"defaultValue":b=E;break;case"multiple":o=E;default:Ie(e,t,c,E,r,null)}t=d,r=b,e.multiple=!!o,t!=null?Yr(e,!!o,t,!1):r!=null&&Yr(e,!!o,r,!0);return;case"textarea":Ye("invalid",e),d=c=o=null;for(b in r)if(r.hasOwnProperty(b)&&(E=r[b],E!=null))switch(b){case"value":o=E;break;case"defaultValue":c=E;break;case"children":d=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(i(91));break;default:Ie(e,t,b,E,r,null)}Eh(e,o,c,d),To(e);return;case"option":for(_ in r)if(r.hasOwnProperty(_)&&(o=r[_],o!=null))switch(_){case"selected":e.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:Ie(e,t,_,o,r,null)}return;case"dialog":Ye("beforetoggle",e),Ye("toggle",e),Ye("cancel",e),Ye("close",e);break;case"iframe":case"object":Ye("load",e);break;case"video":case"audio":for(o=0;o<zi.length;o++)Ye(zi[o],e);break;case"image":Ye("error",e),Ye("load",e);break;case"details":Ye("toggle",e);break;case"embed":case"source":case"link":Ye("error",e),Ye("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(F in r)if(r.hasOwnProperty(F)&&(o=r[F],o!=null))switch(F){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:Ie(e,t,F,o,r,null)}return;default:if(Hu(t)){for(te in r)r.hasOwnProperty(te)&&(o=r[te],o!==void 0&&Rf(e,t,te,o,r,void 0));return}}for(E in r)r.hasOwnProperty(E)&&(o=r[E],o!=null&&Ie(e,t,E,o,r,null))}function J1(e,t,r,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,d=null,b=null,E=null,_=null,F=null,te=null;for(Z in r){var ae=r[Z];if(r.hasOwnProperty(Z)&&ae!=null)switch(Z){case"checked":break;case"value":break;case"defaultValue":_=ae;default:o.hasOwnProperty(Z)||Ie(e,t,Z,null,o,ae)}}for(var Q in o){var Z=o[Q];if(ae=r[Q],o.hasOwnProperty(Q)&&(Z!=null||ae!=null))switch(Q){case"type":d=Z;break;case"name":c=Z;break;case"checked":F=Z;break;case"defaultChecked":te=Z;break;case"value":b=Z;break;case"defaultValue":E=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(i(137,t));break;default:Z!==ae&&Ie(e,t,Q,Z,o,ae)}}Uu(e,b,E,_,F,te,d,c);return;case"select":Z=b=E=Q=null;for(d in r)if(_=r[d],r.hasOwnProperty(d)&&_!=null)switch(d){case"value":break;case"multiple":Z=_;default:o.hasOwnProperty(d)||Ie(e,t,d,null,o,_)}for(c in o)if(d=o[c],_=r[c],o.hasOwnProperty(c)&&(d!=null||_!=null))switch(c){case"value":Q=d;break;case"defaultValue":E=d;break;case"multiple":b=d;default:d!==_&&Ie(e,t,c,d,o,_)}t=E,r=b,o=Z,Q!=null?Yr(e,!!r,Q,!1):!!o!=!!r&&(t!=null?Yr(e,!!r,t,!0):Yr(e,!!r,r?[]:"",!1));return;case"textarea":Z=Q=null;for(E in r)if(c=r[E],r.hasOwnProperty(E)&&c!=null&&!o.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:Ie(e,t,E,null,o,c)}for(b in o)if(c=o[b],d=r[b],o.hasOwnProperty(b)&&(c!=null||d!=null))switch(b){case"value":Q=c;break;case"defaultValue":Z=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(i(91));break;default:c!==d&&Ie(e,t,b,c,o,d)}wh(e,Q,Z);return;case"option":for(var je in r)if(Q=r[je],r.hasOwnProperty(je)&&Q!=null&&!o.hasOwnProperty(je))switch(je){case"selected":e.selected=!1;break;default:Ie(e,t,je,null,o,Q)}for(_ in o)if(Q=o[_],Z=r[_],o.hasOwnProperty(_)&&Q!==Z&&(Q!=null||Z!=null))switch(_){case"selected":e.selected=Q&&typeof Q!="function"&&typeof Q!="symbol";break;default:Ie(e,t,_,Q,o,Z)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ne in r)Q=r[Ne],r.hasOwnProperty(Ne)&&Q!=null&&!o.hasOwnProperty(Ne)&&Ie(e,t,Ne,null,o,Q);for(F in o)if(Q=o[F],Z=r[F],o.hasOwnProperty(F)&&Q!==Z&&(Q!=null||Z!=null))switch(F){case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(i(137,t));break;default:Ie(e,t,F,Q,o,Z)}return;default:if(Hu(t)){for(var We in r)Q=r[We],r.hasOwnProperty(We)&&Q!==void 0&&!o.hasOwnProperty(We)&&Rf(e,t,We,void 0,o,Q);for(te in o)Q=o[te],Z=r[te],!o.hasOwnProperty(te)||Q===Z||Q===void 0&&Z===void 0||Rf(e,t,te,Q,o,Z);return}}for(var H in r)Q=r[H],r.hasOwnProperty(H)&&Q!=null&&!o.hasOwnProperty(H)&&Ie(e,t,H,null,o,Q);for(ae in o)Q=o[ae],Z=r[ae],!o.hasOwnProperty(ae)||Q===Z||Q==null&&Z==null||Ie(e,t,ae,Q,o,Z)}var Cf=null,Of=null;function Rs(e){return e.nodeType===9?e:e.ownerDocument}function Rg(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Cg(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Af(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Nf=null;function I1(){var e=window.event;return e&&e.type==="popstate"?e===Nf?!1:(Nf=e,!0):(Nf=null,!1)}var Og=typeof setTimeout=="function"?setTimeout:void 0,W1=typeof clearTimeout=="function"?clearTimeout:void 0,Ag=typeof Promise=="function"?Promise:void 0,eS=typeof queueMicrotask=="function"?queueMicrotask:typeof Ag<"u"?function(e){return Ag.resolve(null).then(e).catch(tS)}:Og;function tS(e){setTimeout(function(){throw e})}function Ha(e){return e==="head"}function Ng(e,t){var r=t,o=0,c=0;do{var d=r.nextSibling;if(e.removeChild(r),d&&d.nodeType===8)if(r=d.data,r==="/$"){if(0<o&&8>o){r=o;var b=e.ownerDocument;if(r&1&&Ui(b.documentElement),r&2&&Ui(b.body),r&4)for(r=b.head,Ui(r),b=r.firstChild;b;){var E=b.nextSibling,_=b.nodeName;b[be]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&b.rel.toLowerCase()==="stylesheet"||r.removeChild(b),b=E}}if(c===0){e.removeChild(d),Gi(t);return}c--}else r==="$"||r==="$?"||r==="$!"?c++:o=r.charCodeAt(0)-48;else o=0;r=d}while(r);Gi(t)}function Tf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var r=t;switch(t=t.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":Tf(r),we(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function nS(e,t,r,o){for(;e.nodeType===1;){var c=r;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[be])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=Rn(e.nextSibling),e===null)break}return null}function aS(e,t,r){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=Rn(e.nextSibling),e===null))return null;return e}function jf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function rS(e,t){var r=e.ownerDocument;if(e.data!=="$?"||r.readyState==="complete")t();else{var o=function(){t(),r.removeEventListener("DOMContentLoaded",o)};r.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function Rn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="F!"||t==="F")break;if(t==="/$")return null}}return e}var Mf=null;function Tg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}function jg(e,t,r){switch(t=Rs(r),e){case"html":if(e=t.documentElement,!e)throw Error(i(452));return e;case"head":if(e=t.head,!e)throw Error(i(453));return e;case"body":if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Ui(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);we(e)}var vn=new Map,Mg=new Set;function Cs(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var fa=W.d;W.d={f:lS,r:iS,D:oS,C:sS,L:uS,m:cS,X:dS,S:fS,M:hS};function lS(){var e=fa.f(),t=gs();return e||t}function iS(e){var t=Fe(e);t!==null&&t.tag===5&&t.type==="form"?Jm(t):fa.r(e)}var bl=typeof document>"u"?null:document;function _g(e,t,r){var o=bl;if(o&&typeof t=="string"&&t){var c=cn(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof r=="string"&&(c+='[crossorigin="'+r+'"]'),Mg.has(c)||(Mg.add(c),e={rel:e,crossOrigin:r,href:t},o.querySelector(c)===null&&(t=o.createElement("link"),jt(t,"link",e),_e(t),o.head.appendChild(t)))}}function oS(e){fa.D(e),_g("dns-prefetch",e,null)}function sS(e,t){fa.C(e,t),_g("preconnect",e,t)}function uS(e,t,r){fa.L(e,t,r);var o=bl;if(o&&e&&t){var c='link[rel="preload"][as="'+cn(t)+'"]';t==="image"&&r&&r.imageSrcSet?(c+='[imagesrcset="'+cn(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(c+='[imagesizes="'+cn(r.imageSizes)+'"]')):c+='[href="'+cn(e)+'"]';var d=c;switch(t){case"style":d=xl(e);break;case"script":d=Sl(e)}vn.has(d)||(e=g({rel:"preload",href:t==="image"&&r&&r.imageSrcSet?void 0:e,as:t},r),vn.set(d,e),o.querySelector(c)!==null||t==="style"&&o.querySelector(Pi(d))||t==="script"&&o.querySelector(Hi(d))||(t=o.createElement("link"),jt(t,"link",e),_e(t),o.head.appendChild(t)))}}function cS(e,t){fa.m(e,t);var r=bl;if(r&&e){var o=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+cn(o)+'"][href="'+cn(e)+'"]',d=c;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Sl(e)}if(!vn.has(d)&&(e=g({rel:"modulepreload",href:e},t),vn.set(d,e),r.querySelector(c)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(Hi(d)))return}o=r.createElement("link"),jt(o,"link",e),_e(o),r.head.appendChild(o)}}}function fS(e,t,r){fa.S(e,t,r);var o=bl;if(o&&e){var c=ct(o).hoistableStyles,d=xl(e);t=t||"default";var b=c.get(d);if(!b){var E={loading:0,preload:null};if(b=o.querySelector(Pi(d)))E.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":t},r),(r=vn.get(d))&&_f(e,r);var _=b=o.createElement("link");_e(_),jt(_,"link",e),_._p=new Promise(function(F,te){_.onload=F,_.onerror=te}),_.addEventListener("load",function(){E.loading|=1}),_.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Os(b,t,o)}b={type:"stylesheet",instance:b,count:1,state:E},c.set(d,b)}}}function dS(e,t){fa.X(e,t);var r=bl;if(r&&e){var o=ct(r).hoistableScripts,c=Sl(e),d=o.get(c);d||(d=r.querySelector(Hi(c)),d||(e=g({src:e,async:!0},t),(t=vn.get(c))&&Df(e,t),d=r.createElement("script"),_e(d),jt(d,"link",e),r.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(c,d))}}function hS(e,t){fa.M(e,t);var r=bl;if(r&&e){var o=ct(r).hoistableScripts,c=Sl(e),d=o.get(c);d||(d=r.querySelector(Hi(c)),d||(e=g({src:e,async:!0,type:"module"},t),(t=vn.get(c))&&Df(e,t),d=r.createElement("script"),_e(d),jt(d,"link",e),r.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(c,d))}}function Dg(e,t,r,o){var c=(c=I.current)?Cs(c):null;if(!c)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(t=xl(r.href),r=ct(c).hoistableStyles,o=r.get(t),o||(o={type:"style",instance:null,count:0,state:null},r.set(t,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=xl(r.href);var d=ct(c).hoistableStyles,b=d.get(e);if(b||(c=c.ownerDocument||c,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,b),(d=c.querySelector(Pi(e)))&&!d._p&&(b.instance=d,b.state.loading=5),vn.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},vn.set(e,r),d||mS(c,e,r,b.state))),t&&o===null)throw Error(i(528,""));return b}if(t&&o!==null)throw Error(i(529,""));return null;case"script":return t=r.async,r=r.src,typeof r=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Sl(r),r=ct(c).hoistableScripts,o=r.get(t),o||(o={type:"script",instance:null,count:0,state:null},r.set(t,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function xl(e){return'href="'+cn(e)+'"'}function Pi(e){return'link[rel="stylesheet"]['+e+"]"}function Lg(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function mS(e,t,r,o){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?o.loading=1:(t=e.createElement("link"),o.preload=t,t.addEventListener("load",function(){return o.loading|=1}),t.addEventListener("error",function(){return o.loading|=2}),jt(t,"link",r),_e(t),e.head.appendChild(t))}function Sl(e){return'[src="'+cn(e)+'"]'}function Hi(e){return"script[async]"+e}function zg(e,t,r){if(t.count++,t.instance===null)switch(t.type){case"style":var o=e.querySelector('style[data-href~="'+cn(r.href)+'"]');if(o)return t.instance=o,_e(o),o;var c=g({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),_e(o),jt(o,"style",c),Os(o,r.precedence,e),t.instance=o;case"stylesheet":c=xl(r.href);var d=e.querySelector(Pi(c));if(d)return t.state.loading|=4,t.instance=d,_e(d),d;o=Lg(r),(c=vn.get(c))&&_f(o,c),d=(e.ownerDocument||e).createElement("link"),_e(d);var b=d;return b._p=new Promise(function(E,_){b.onload=E,b.onerror=_}),jt(d,"link",o),t.state.loading|=4,Os(d,r.precedence,e),t.instance=d;case"script":return d=Sl(r.src),(c=e.querySelector(Hi(d)))?(t.instance=c,_e(c),c):(o=r,(c=vn.get(d))&&(o=g({},r),Df(o,c)),e=e.ownerDocument||e,c=e.createElement("script"),_e(c),jt(c,"link",o),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(i(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(o=t.instance,t.state.loading|=4,Os(o,r.precedence,e));return t.instance}function Os(e,t,r){for(var o=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=o.length?o[o.length-1]:null,d=c,b=0;b<o.length;b++){var E=o[b];if(E.dataset.precedence===t)d=E;else if(d!==c)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=r.nodeType===9?r.head:r,t.insertBefore(e,t.firstChild))}function _f(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Df(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var As=null;function kg(e,t,r){if(As===null){var o=new Map,c=As=new Map;c.set(r,o)}else c=As,o=c.get(r),o||(o=new Map,c.set(r,o));if(o.has(e))return o;for(o.set(e,null),r=r.getElementsByTagName(e),c=0;c<r.length;c++){var d=r[c];if(!(d[be]||d[le]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var b=d.getAttribute(t)||"";b=e+b;var E=o.get(b);E?E.push(d):o.set(b,[d])}}return o}function Ug(e,t,r){e=e.ownerDocument||e,e.head.insertBefore(r,t==="title"?e.querySelector("head > title"):null)}function pS(e,t,r){if(r===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Pg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var Bi=null;function gS(){}function vS(e,t,r){if(Bi===null)throw Error(i(475));var o=Bi;if(t.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var c=xl(r.href),d=e.querySelector(Pi(c));if(d){e=d._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(o.count++,o=Ns.bind(o),e.then(o,o)),t.state.loading|=4,t.instance=d,_e(d);return}d=e.ownerDocument||e,r=Lg(r),(c=vn.get(c))&&_f(r,c),d=d.createElement("link"),_e(d);var b=d;b._p=new Promise(function(E,_){b.onload=E,b.onerror=_}),jt(d,"link",r),t.instance=d}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(o.count++,t=Ns.bind(o),e.addEventListener("load",t),e.addEventListener("error",t))}}function yS(){if(Bi===null)throw Error(i(475));var e=Bi;return e.stylesheets&&e.count===0&&Lf(e,e.stylesheets),0<e.count?function(t){var r=setTimeout(function(){if(e.stylesheets&&Lf(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(r)}}:null}function Ns(){if(this.count--,this.count===0){if(this.stylesheets)Lf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ts=null;function Lf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ts=new Map,t.forEach(bS,e),Ts=null,Ns.call(e))}function bS(e,t){if(!(t.state.loading&4)){var r=Ts.get(e);if(r)var o=r.get(null);else{r=new Map,Ts.set(e,r);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var b=c[d];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(r.set(b.dataset.precedence,b),o=b)}o&&r.set(null,o)}c=t.instance,b=c.getAttribute("data-precedence"),d=r.get(b)||o,d===o&&r.set(null,c),r.set(b,c),this.count++,o=Ns.bind(this),c.addEventListener("load",o),c.addEventListener("error",o),d?d.parentNode.insertBefore(c,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var $i={$$typeof:P,Provider:null,Consumer:null,_currentValue:K,_currentValue2:K,_threadCount:0};function xS(e,t,r,o,c,d,b,E){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=$r(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$r(0),this.hiddenUpdates=$r(null),this.identifierPrefix=o,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function Hg(e,t,r,o,c,d,b,E,_,F,te,ae){return e=new xS(e,t,r,b,E,_,F,ae),t=1,d===!0&&(t|=24),d=Xt(3,null,null,t),e.current=d,d.stateNode=e,t=mc(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:o,isDehydrated:r,cache:t},yc(d),e}function Bg(e){return e?(e=Ir,e):Ir}function $g(e,t,r,o,c,d){c=Bg(c),o.context===null?o.context=c:o.pendingContext=c,o=Oa(t),o.payload={element:r},d=d===void 0?null:d,d!==null&&(o.callback=d),r=Aa(e,o,t),r!==null&&(Wt(r,e,t),vi(r,e,t))}function Vg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function zf(e,t){Vg(e,t),(e=e.alternate)&&Vg(e,t)}function Yg(e){if(e.tag===13){var t=Jr(e,67108864);t!==null&&Wt(t,e,67108864),zf(e,67108864)}}var js=!0;function SS(e,t,r,o){var c=L.T;L.T=null;var d=W.p;try{W.p=2,kf(e,t,r,o)}finally{W.p=d,L.T=c}}function wS(e,t,r,o){var c=L.T;L.T=null;var d=W.p;try{W.p=8,kf(e,t,r,o)}finally{W.p=d,L.T=c}}function kf(e,t,r,o){if(js){var c=Uf(o);if(c===null)Ef(e,t,o,Ms,r),Gg(e,o);else if(RS(c,e,t,r,o))o.stopPropagation();else if(Gg(e,o),t&4&&-1<ES.indexOf(e)){for(;c!==null;){var d=Fe(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var b=Xn(d.pendingLanes);if(b!==0){var E=d;for(E.pendingLanes|=2,E.entangledLanes|=2;b;){var _=1<<31-At(b);E.entanglements[1]|=_,b&=~_}Un(d),(Xe&6)===0&&(ms=Gt()+500,Li(0))}}break;case 13:E=Jr(d,2),E!==null&&Wt(E,d,2),gs(),zf(d,2)}if(d=Uf(o),d===null&&Ef(e,t,o,Ms,r),d===c)break;c=d}c!==null&&o.stopPropagation()}else Ef(e,t,o,null,r)}}function Uf(e){return e=$u(e),Pf(e)}var Ms=null;function Pf(e){if(Ms=null,e=ze(e),e!==null){var t=u(e);if(t===null)e=null;else{var r=t.tag;if(r===13){if(e=f(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ms=e,null}function qg(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(zu()){case xo:return 2;case So:return 8;case Hr:case Fn:return 32;case xa:return 268435456;default:return 32}default:return 32}}var Hf=!1,Ba=null,$a=null,Va=null,Vi=new Map,Yi=new Map,Ya=[],ES="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Gg(e,t){switch(e){case"focusin":case"focusout":Ba=null;break;case"dragenter":case"dragleave":$a=null;break;case"mouseover":case"mouseout":Va=null;break;case"pointerover":case"pointerout":Vi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Yi.delete(t.pointerId)}}function qi(e,t,r,o,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:r,eventSystemFlags:o,nativeEvent:d,targetContainers:[c]},t!==null&&(t=Fe(t),t!==null&&Yg(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function RS(e,t,r,o,c){switch(t){case"focusin":return Ba=qi(Ba,e,t,r,o,c),!0;case"dragenter":return $a=qi($a,e,t,r,o,c),!0;case"mouseover":return Va=qi(Va,e,t,r,o,c),!0;case"pointerover":var d=c.pointerId;return Vi.set(d,qi(Vi.get(d)||null,e,t,r,o,c)),!0;case"gotpointercapture":return d=c.pointerId,Yi.set(d,qi(Yi.get(d)||null,e,t,r,o,c)),!0}return!1}function Kg(e){var t=ze(e.target);if(t!==null){var r=u(t);if(r!==null){if(t=r.tag,t===13){if(t=f(r),t!==null){e.blockedOn=t,q(e.priority,function(){if(r.tag===13){var o=It();o=Il(o);var c=Jr(r,o);c!==null&&Wt(c,r,o),zf(r,o)}});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function _s(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Uf(e.nativeEvent);if(r===null){r=e.nativeEvent;var o=new r.constructor(r.type,r);Bu=o,r.target.dispatchEvent(o),Bu=null}else return t=Fe(r),t!==null&&Yg(t),e.blockedOn=r,!1;t.shift()}return!0}function Fg(e,t,r){_s(e)&&r.delete(t)}function CS(){Hf=!1,Ba!==null&&_s(Ba)&&(Ba=null),$a!==null&&_s($a)&&($a=null),Va!==null&&_s(Va)&&(Va=null),Vi.forEach(Fg),Yi.forEach(Fg)}function Ds(e,t){e.blockedOn===t&&(e.blockedOn=null,Hf||(Hf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,CS)))}var Ls=null;function Xg(e){Ls!==e&&(Ls=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Ls===e&&(Ls=null);for(var t=0;t<e.length;t+=3){var r=e[t],o=e[t+1],c=e[t+2];if(typeof o!="function"){if(Pf(o||r)===null)continue;break}var d=Fe(r);d!==null&&(e.splice(t,3),t-=3,Uc(d,{pending:!0,data:c,method:r.method,action:o},o,c))}}))}function Gi(e){function t(_){return Ds(_,e)}Ba!==null&&Ds(Ba,e),$a!==null&&Ds($a,e),Va!==null&&Ds(Va,e),Vi.forEach(t),Yi.forEach(t);for(var r=0;r<Ya.length;r++){var o=Ya[r];o.blockedOn===e&&(o.blockedOn=null)}for(;0<Ya.length&&(r=Ya[0],r.blockedOn===null);)Kg(r),r.blockedOn===null&&Ya.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(o=0;o<r.length;o+=3){var c=r[o],d=r[o+1],b=c[se]||null;if(typeof d=="function")b||Xg(r);else if(b){var E=null;if(d&&d.hasAttribute("formAction")){if(c=d,b=d[se]||null)E=b.formAction;else if(Pf(c)!==null)continue}else E=b.action;typeof E=="function"?r[o+1]=E:(r.splice(o,3),o-=3),Xg(r)}}}function Bf(e){this._internalRoot=e}zs.prototype.render=Bf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var r=t.current,o=It();$g(r,o,e,t,null,null)},zs.prototype.unmount=Bf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;$g(e.current,2,null,e,null,null),gs(),t[ve]=null}};function zs(e){this._internalRoot=e}zs.prototype.unstable_scheduleHydration=function(e){if(e){var t=D();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Ya.length&&t!==0&&t<Ya[r].priority;r++);Ya.splice(r,0,e),r===0&&Kg(e)}};var Qg=a.version;if(Qg!=="19.1.0")throw Error(i(527,Qg,"19.1.0"));W.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=p(t),e=e!==null?m(e):null,e=e===null?null:e.stateNode,e};var OS={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ks=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ks.isDisabled&&ks.supportsFiber)try{Ut=ks.inject(OS),it=ks}catch{}}return Xi.createRoot=function(e,t){if(!s(e))throw Error(i(299));var r=!1,o="",c=fp,d=dp,b=hp,E=null;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(b=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(E=t.unstable_transitionCallbacks)),t=Hg(e,1,!1,null,null,r,o,c,d,b,E,null),e[ve]=t.current,wf(e),new Bf(t)},Xi.hydrateRoot=function(e,t,r){if(!s(e))throw Error(i(299));var o=!1,c="",d=fp,b=dp,E=hp,_=null,F=null;return r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onUncaughtError!==void 0&&(d=r.onUncaughtError),r.onCaughtError!==void 0&&(b=r.onCaughtError),r.onRecoverableError!==void 0&&(E=r.onRecoverableError),r.unstable_transitionCallbacks!==void 0&&(_=r.unstable_transitionCallbacks),r.formState!==void 0&&(F=r.formState)),t=Hg(e,1,!0,t,r??null,o,c,d,b,E,_,F),t.context=Bg(null),r=t.current,o=It(),o=Il(o),c=Oa(o),c.callback=null,Aa(r,c,o),r=o,t.current.lanes=r,ir(t,r),Un(t),e[ve]=t.current,wf(e),new zs(t)},Xi.version="19.1.0",Xi}var Cv;function Qw(){if(Cv)return qf.exports;Cv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),qf.exports=Xw(),qf.exports}var Zw=Qw();/**
54
+ `+r.stack}}function fn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function bh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ex(e){var t=bh(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var c=r.get,d=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(b){o=""+b,d.call(this,b)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return o},setValue:function(b){o=""+b},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function To(e){e._valueTracker||(e._valueTracker=Ex(e))}function xh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),o="";return e&&(o=bh(e)?e.checked?"true":"false":e.value),e=o,e!==r?(t.setValue(e),!0):!1}function jo(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}}var Rx=/[\n"\\]/g;function dn(e){return e.replace(Rx,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Uu(e,t,r,o,c,d,b,E){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),t!=null?b==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+fn(t)):e.value!==""+fn(t)&&(e.value=""+fn(t)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),t!=null?Pu(e,b,fn(t)):r!=null?Pu(e,b,fn(r)):o!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+fn(E):e.removeAttribute("name")}function Sh(e,t,r,o,c,d,b,E){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||r!=null){if(!(d!=="submit"&&d!=="reset"||t!=null))return;r=r!=null?""+fn(r):"",t=t!=null?""+fn(t):r,E||t===e.value||(e.value=t),e.defaultValue=t}o=o??c,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=E?e.checked:!!o,e.defaultChecked=!!o,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b)}function Pu(e,t,r){t==="number"&&jo(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function Yr(e,t,r,o){if(e=e.options,t){t={};for(var c=0;c<r.length;c++)t["$"+r[c]]=!0;for(r=0;r<e.length;r++)c=t.hasOwnProperty("$"+e[r].value),e[r].selected!==c&&(e[r].selected=c),c&&o&&(e[r].defaultSelected=!0)}else{for(r=""+fn(r),t=null,c=0;c<e.length;c++){if(e[c].value===r){e[c].selected=!0,o&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function wh(e,t,r){if(t!=null&&(t=""+fn(t),t!==e.value&&(e.value=t),r==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=r!=null?""+fn(r):""}function Eh(e,t,r,o){if(t==null){if(o!=null){if(r!=null)throw Error(i(92));if(ce(o)){if(1<o.length)throw Error(i(93));o=o[0]}r=o}r==null&&(r=""),t=r}r=fn(t),e.defaultValue=r,o=e.textContent,o===r&&o!==""&&o!==null&&(e.value=o)}function qr(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Cx=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Rh(e,t,r){var o=t.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?o?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":o?e.setProperty(t,r):typeof r!="number"||r===0||Cx.has(t)?t==="float"?e.cssFloat=r:e[t]=(""+r).trim():e[t]=r+"px"}function Ch(e,t,r){if(t!=null&&typeof t!="object")throw Error(i(62));if(e=e.style,r!=null){for(var o in r)!r.hasOwnProperty(o)||t!=null&&t.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var c in t)o=t[c],t.hasOwnProperty(c)&&r[c]!==o&&Rh(e,c,o)}else for(var d in t)t.hasOwnProperty(d)&&Rh(e,d,t[d])}function Hu(e){if(e.indexOf("-")===-1)return!1;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 Ox=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Ax=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Mo(e){return Ax.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Bu=null;function $u(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Gr=null,Kr=null;function Oh(e){var t=Qe(e);if(t&&(e=t.stateNode)){var r=e[ue]||null;e:switch(e=t.stateNode,t.type){case"input":if(Uu(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+dn(""+t)+'"][type="radio"]'),t=0;t<r.length;t++){var o=r[t];if(o!==e&&o.form===e.form){var c=o[ue]||null;if(!c)throw Error(i(90));Uu(o,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<r.length;t++)o=r[t],o.form===e.form&&xh(o)}break e;case"textarea":wh(e,r.value,r.defaultValue);break e;case"select":t=r.value,t!=null&&Yr(e,!!r.multiple,t,!1)}}}var Vu=!1;function Ah(e,t,r){if(Vu)return e(t,r);Vu=!0;try{var o=e(t);return o}finally{if(Vu=!1,(Gr!==null||Kr!==null)&&(gs(),Gr&&(t=Gr,e=Kr,Kr=Gr=null,Oh(t),e)))for(t=0;t<e.length;t++)Oh(e[t])}}function ei(e,t){var r=e.stateNode;if(r===null)return null;var o=r[ue]||null;if(o===null)return null;r=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(i(231,t,typeof r));return r}var In=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yu=!1;if(In)try{var ti={};Object.defineProperty(ti,"passive",{get:function(){Yu=!0}}),window.addEventListener("test",ti,ti),window.removeEventListener("test",ti,ti)}catch{Yu=!1}var Ea=null,qu=null,_o=null;function Nh(){if(_o)return _o;var e,t=qu,r=t.length,o,c="value"in Ea?Ea.value:Ea.textContent,d=c.length;for(e=0;e<r&&t[e]===c[e];e++);var b=r-e;for(o=1;o<=b&&t[r-o]===c[d-o];o++);return _o=c.slice(e,1<o?1-o:void 0)}function Do(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Lo(){return!0}function Th(){return!1}function Bt(e){function t(r,o,c,d,b){this._reactName=r,this._targetInst=c,this.type=o,this.nativeEvent=d,this.target=b,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(r=e[E],this[E]=r?r(d):d[E]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Lo:Th,this.isPropagationStopped=Th,this}return g(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Lo)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Lo)},persist:function(){},isPersistent:Lo}),t}var fr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zo=Bt(fr),ni=g({},fr,{view:0,detail:0}),Nx=Bt(ni),Gu,Ku,ai,ko=g({},ni,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ai&&(ai&&e.type==="mousemove"?(Gu=e.screenX-ai.screenX,Ku=e.screenY-ai.screenY):Ku=Gu=0,ai=e),Gu)},movementY:function(e){return"movementY"in e?e.movementY:Ku}}),jh=Bt(ko),Tx=g({},ko,{dataTransfer:0}),jx=Bt(Tx),Mx=g({},ni,{relatedTarget:0}),Fu=Bt(Mx),_x=g({},fr,{animationName:0,elapsedTime:0,pseudoElement:0}),Dx=Bt(_x),Lx=g({},fr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),zx=Bt(Lx),kx=g({},fr,{data:0}),Mh=Bt(kx),Ux={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Px={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Hx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Bx(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Hx[e])?!!t[e]:!1}function Xu(){return Bx}var $x=g({},ni,{key:function(e){if(e.key){var t=Ux[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Do(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Px[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xu,charCode:function(e){return e.type==="keypress"?Do(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Do(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Vx=Bt($x),Yx=g({},ko,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_h=Bt(Yx),qx=g({},ni,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xu}),Gx=Bt(qx),Kx=g({},fr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Fx=Bt(Kx),Xx=g({},ko,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Qx=Bt(Xx),Zx=g({},fr,{newState:0,oldState:0}),Jx=Bt(Zx),Ix=[9,13,27,32],Qu=In&&"CompositionEvent"in window,ri=null;In&&"documentMode"in document&&(ri=document.documentMode);var Wx=In&&"TextEvent"in window&&!ri,Dh=In&&(!Qu||ri&&8<ri&&11>=ri),Lh=" ",zh=!1;function kh(e,t){switch(e){case"keyup":return Ix.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Uh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Fr=!1;function e1(e,t){switch(e){case"compositionend":return Uh(t);case"keypress":return t.which!==32?null:(zh=!0,Lh);case"textInput":return e=t.data,e===Lh&&zh?null:e;default:return null}}function t1(e,t){if(Fr)return e==="compositionend"||!Qu&&kh(e,t)?(e=Nh(),_o=qu=Ea=null,Fr=!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.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Dh&&t.locale!=="ko"?null:t.data;default:return null}}var n1={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ph(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!n1[e.type]:t==="textarea"}function Hh(e,t,r,o){Gr?Kr?Kr.push(o):Kr=[o]:Gr=o,t=ws(t,"onChange"),0<t.length&&(r=new zo("onChange","change",null,r,o),e.push({event:r,listeners:t}))}var li=null,ii=null;function a1(e){bg(e,0)}function Uo(e){var t=ft(e);if(xh(t))return e}function Bh(e,t){if(e==="change")return t}var $h=!1;if(In){var Zu;if(In){var Ju="oninput"in document;if(!Ju){var Vh=document.createElement("div");Vh.setAttribute("oninput","return;"),Ju=typeof Vh.oninput=="function"}Zu=Ju}else Zu=!1;$h=Zu&&(!document.documentMode||9<document.documentMode)}function Yh(){li&&(li.detachEvent("onpropertychange",qh),ii=li=null)}function qh(e){if(e.propertyName==="value"&&Uo(ii)){var t=[];Hh(t,ii,e,$u(e)),Ah(a1,t)}}function r1(e,t,r){e==="focusin"?(Yh(),li=t,ii=r,li.attachEvent("onpropertychange",qh)):e==="focusout"&&Yh()}function l1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Uo(ii)}function i1(e,t){if(e==="click")return Uo(t)}function o1(e,t){if(e==="input"||e==="change")return Uo(t)}function s1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Qt=typeof Object.is=="function"?Object.is:s1;function oi(e,t){if(Qt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(o=0;o<r.length;o++){var c=r[o];if(!Ye.call(t,c)||!Qt(e[c],t[c]))return!1}return!0}function Gh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Kh(e,t){var r=Gh(e);e=0;for(var o;r;){if(r.nodeType===3){if(o=e+r.textContent.length,e<=t&&o>=t)return{node:r,offset:t-e};e=o}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Gh(r)}}function Fh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Fh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Xh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=jo(e.document);t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=jo(e.document)}return t}function Iu(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")}var u1=In&&"documentMode"in document&&11>=document.documentMode,Xr=null,Wu=null,si=null,ec=!1;function Qh(e,t,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;ec||Xr==null||Xr!==jo(o)||(o=Xr,"selectionStart"in o&&Iu(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),si&&oi(si,o)||(si=o,o=ws(Wu,"onSelect"),0<o.length&&(t=new zo("onSelect","select",null,t,r),e.push({event:t,listeners:o}),t.target=Xr)))}function dr(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Qr={animationend:dr("Animation","AnimationEnd"),animationiteration:dr("Animation","AnimationIteration"),animationstart:dr("Animation","AnimationStart"),transitionrun:dr("Transition","TransitionRun"),transitionstart:dr("Transition","TransitionStart"),transitioncancel:dr("Transition","TransitionCancel"),transitionend:dr("Transition","TransitionEnd")},tc={},Zh={};In&&(Zh=document.createElement("div").style,"AnimationEvent"in window||(delete Qr.animationend.animation,delete Qr.animationiteration.animation,delete Qr.animationstart.animation),"TransitionEvent"in window||delete Qr.transitionend.transition);function hr(e){if(tc[e])return tc[e];if(!Qr[e])return e;var t=Qr[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Zh)return tc[e]=t[r];return e}var Jh=hr("animationend"),Ih=hr("animationiteration"),Wh=hr("animationstart"),c1=hr("transitionrun"),f1=hr("transitionstart"),d1=hr("transitioncancel"),em=hr("transitionend"),tm=new Map,nc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");nc.push("scrollEnd");function En(e,t){tm.set(e,t),Xt(t,[e])}var nm=new WeakMap;function hn(e,t){if(typeof e=="object"&&e!==null){var r=nm.get(e);return r!==void 0?r:(t={value:e,source:t,stack:No(t)},nm.set(e,t),t)}return{value:e,source:t,stack:No(t)}}var mn=[],Zr=0,ac=0;function Po(){for(var e=Zr,t=ac=Zr=0;t<e;){var r=mn[t];mn[t++]=null;var o=mn[t];mn[t++]=null;var c=mn[t];mn[t++]=null;var d=mn[t];if(mn[t++]=null,o!==null&&c!==null){var b=o.pending;b===null?c.next=c:(c.next=b.next,b.next=c),o.pending=c}d!==0&&am(r,c,d)}}function Ho(e,t,r,o){mn[Zr++]=e,mn[Zr++]=t,mn[Zr++]=r,mn[Zr++]=o,ac|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function rc(e,t,r,o){return Ho(e,t,r,o),Bo(e)}function Jr(e,t){return Ho(e,null,null,t),Bo(e)}function am(e,t,r){e.lanes|=r;var o=e.alternate;o!==null&&(o.lanes|=r);for(var c=!1,d=e.return;d!==null;)d.childLanes|=r,o=d.alternate,o!==null&&(o.childLanes|=r),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(c=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,c&&t!==null&&(c=31-Tt(r),e=d.hiddenUpdates,o=e[c],o===null?e[c]=[t]:o.push(t),t.lane=r|536870912),d):null}function Bo(e){if(50<Di)throw Di=0,ff=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ir={};function h1(e,t,r,o){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zt(e,t,r,o){return new h1(e,t,r,o)}function lc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Wn(e,t){var r=e.alternate;return r===null?(r=Zt(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function rm(e,t){e.flags&=65011714;var r=e.alternate;return r===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,t=r.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function $o(e,t,r,o,c,d){var b=0;if(o=e,typeof e=="function")lc(e)&&(b=1);else if(typeof e=="string")b=pS(e,r,W.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case oe:return e=Zt(31,r,t,c),e.elementType=oe,e.lanes=d,e;case C:return mr(r.children,c,d,t);case R:b=8,c|=24;break;case T:return e=Zt(12,r,t,c|2),e.elementType=T,e.lanes=d,e;case P:return e=Zt(13,r,t,c),e.elementType=P,e.lanes=d,e;case A:return e=Zt(19,r,t,c),e.elementType=A,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case O:case U:b=10;break e;case z:b=9;break e;case $:b=11;break e;case X:b=14;break e;case ne:b=16,o=null;break e}b=29,r=Error(i(130,e===null?"null":typeof e,"")),o=null}return t=Zt(b,r,t,c),t.elementType=e,t.type=o,t.lanes=d,t}function mr(e,t,r,o){return e=Zt(7,e,o,t),e.lanes=r,e}function ic(e,t,r){return e=Zt(6,e,null,t),e.lanes=r,e}function oc(e,t,r){return t=Zt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Wr=[],el=0,Vo=null,Yo=0,pn=[],gn=0,pr=null,ea=1,ta="";function gr(e,t){Wr[el++]=Yo,Wr[el++]=Vo,Vo=e,Yo=t}function lm(e,t,r){pn[gn++]=ea,pn[gn++]=ta,pn[gn++]=pr,pr=e;var o=ea;e=ta;var c=32-Tt(o)-1;o&=~(1<<c),r+=1;var d=32-Tt(t)+c;if(30<d){var b=c-c%5;d=(o&(1<<b)-1).toString(32),o>>=b,c-=b,ea=1<<32-Tt(t)+c|r<<c|o,ta=d+e}else ea=1<<d|r<<c|o,ta=e}function sc(e){e.return!==null&&(gr(e,1),lm(e,1,0))}function uc(e){for(;e===Vo;)Vo=Wr[--el],Wr[el]=null,Yo=Wr[--el],Wr[el]=null;for(;e===pr;)pr=pn[--gn],pn[gn]=null,ta=pn[--gn],pn[gn]=null,ea=pn[--gn],pn[gn]=null}var Ut=null,ht=null,Xe=!1,vr=null,Dn=!1,cc=Error(i(519));function yr(e){var t=Error(i(418,""));throw fi(hn(t,e)),cc}function im(e){var t=e.stateNode,r=e.type,o=e.memoizedProps;switch(t[ie]=e,t[ue]=o,r){case"dialog":Ge("cancel",t),Ge("close",t);break;case"iframe":case"object":case"embed":Ge("load",t);break;case"video":case"audio":for(r=0;r<zi.length;r++)Ge(zi[r],t);break;case"source":Ge("error",t);break;case"img":case"image":case"link":Ge("error",t),Ge("load",t);break;case"details":Ge("toggle",t);break;case"input":Ge("invalid",t),Sh(t,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0),To(t);break;case"select":Ge("invalid",t);break;case"textarea":Ge("invalid",t),Eh(t,o.value,o.defaultValue,o.children),To(t)}r=o.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||t.textContent===""+r||o.suppressHydrationWarning===!0||Eg(t.textContent,r)?(o.popover!=null&&(Ge("beforetoggle",t),Ge("toggle",t)),o.onScroll!=null&&Ge("scroll",t),o.onScrollEnd!=null&&Ge("scrollend",t),o.onClick!=null&&(t.onclick=Es),t=!0):t=!1,t||yr(e)}function om(e){for(Ut=e.return;Ut;)switch(Ut.tag){case 5:case 13:Dn=!1;return;case 27:case 3:Dn=!0;return;default:Ut=Ut.return}}function ui(e){if(e!==Ut)return!1;if(!Xe)return om(e),Xe=!0,!1;var t=e.tag,r;if((r=t!==3&&t!==27)&&((r=t===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||Af(e.type,e.memoizedProps)),r=!r),r&&ht&&yr(e),om(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(r=e.data,r==="/$"){if(t===0){ht=Cn(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++;e=e.nextSibling}ht=null}}else t===27?(t=ht,Ha(e.type)?(e=Mf,Mf=null,ht=e):ht=t):ht=Ut?Cn(e.stateNode.nextSibling):null;return!0}function ci(){ht=Ut=null,Xe=!1}function sm(){var e=vr;return e!==null&&(Yt===null?Yt=e:Yt.push.apply(Yt,e),vr=null),e}function fi(e){vr===null?vr=[e]:vr.push(e)}var fc=K(null),br=null,na=null;function Ra(e,t,r){F(fc,t._currentValue),t._currentValue=r}function aa(e){e._currentValue=fc.current,L(fc)}function dc(e,t,r){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===r)break;e=e.return}}function hc(e,t,r,o){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var d=c.dependencies;if(d!==null){var b=c.child;d=d.firstContext;e:for(;d!==null;){var E=d;d=c;for(var j=0;j<t.length;j++)if(E.context===t[j]){d.lanes|=r,E=d.alternate,E!==null&&(E.lanes|=r),dc(d.return,r,e),o||(b=null);break e}d=E.next}}else if(c.tag===18){if(b=c.return,b===null)throw Error(i(341));b.lanes|=r,d=b.alternate,d!==null&&(d.lanes|=r),dc(b,r,e),b=null}else b=c.child;if(b!==null)b.return=c;else for(b=c;b!==null;){if(b===e){b=null;break}if(c=b.sibling,c!==null){c.return=b.return,b=c;break}b=b.return}c=b}}function di(e,t,r,o){e=null;for(var c=t,d=!1;c!==null;){if(!d){if((c.flags&524288)!==0)d=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var b=c.alternate;if(b===null)throw Error(i(387));if(b=b.memoizedProps,b!==null){var E=c.type;Qt(c.pendingProps.value,b.value)||(e!==null?e.push(E):e=[E])}}else if(c===I.current){if(b=c.alternate,b===null)throw Error(i(387));b.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push($i):e=[$i])}c=c.return}e!==null&&hc(t,e,r,o),t.flags|=262144}function qo(e){for(e=e.firstContext;e!==null;){if(!Qt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function xr(e){br=e,na=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Dt(e){return um(br,e)}function Go(e,t){return br===null&&xr(e),um(e,t)}function um(e,t){var r=t._currentValue;if(t={context:t,memoizedValue:r,next:null},na===null){if(e===null)throw Error(i(308));na=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else na=na.next=t;return r}var m1=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(r,o){e.push(o)}};this.abort=function(){t.aborted=!0,e.forEach(function(r){return r()})}},p1=n.unstable_scheduleCallback,g1=n.unstable_NormalPriority,wt={$$typeof:U,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function mc(){return{controller:new m1,data:new Map,refCount:0}}function hi(e){e.refCount--,e.refCount===0&&p1(g1,function(){e.controller.abort()})}var mi=null,pc=0,tl=0,nl=null;function v1(e,t){if(mi===null){var r=mi=[];pc=0,tl=yf(),nl={status:"pending",value:void 0,then:function(o){r.push(o)}}}return pc++,t.then(cm,cm),t}function cm(){if(--pc===0&&mi!==null){nl!==null&&(nl.status="fulfilled");var e=mi;mi=null,tl=0,nl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function y1(e,t){var r=[],o={status:"pending",value:null,reason:null,then:function(c){r.push(c)}};return e.then(function(){o.status="fulfilled",o.value=t;for(var c=0;c<r.length;c++)(0,r[c])(t)},function(c){for(o.status="rejected",o.reason=c,c=0;c<r.length;c++)(0,r[c])(void 0)}),o}var fm=_.S;_.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&v1(e,t),fm!==null&&fm(e,t)};var Sr=K(null);function gc(){var e=Sr.current;return e!==null?e:at.pooledCache}function Ko(e,t){t===null?F(Sr,Sr.current):F(Sr,t.pool)}function dm(){var e=gc();return e===null?null:{parent:wt._currentValue,pool:e}}var pi=Error(i(460)),hm=Error(i(474)),Fo=Error(i(542)),vc={then:function(){}};function mm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Xo(){}function pm(e,t,r){switch(r=e[r],r===void 0?e.push(t):r!==t&&(t.then(Xo,Xo),t=r),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,vm(e),e;default:if(typeof t.status=="string")t.then(Xo,Xo);else{if(e=at,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status="pending",e.then(function(o){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=o}},function(o){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=o}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,vm(e),e}throw gi=t,pi}}var gi=null;function gm(){if(gi===null)throw Error(i(459));var e=gi;return gi=null,e}function vm(e){if(e===pi||e===Fo)throw Error(i(483))}var Ca=!1;function yc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Oa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Aa(e,t,r){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Ze&2)!==0){var c=o.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),o.pending=t,t=Bo(e),am(e,null,r),t}return Ho(e,o,t,r),Bo(e)}function vi(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194048)!==0)){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,ur(e,r)}}function xc(e,t){var r=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,r===o)){var c=null,d=null;if(r=r.firstBaseUpdate,r!==null){do{var b={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};d===null?c=d=b:d=d.next=b,r=r.next}while(r!==null);d===null?c=d=t:d=d.next=t}else c=d=t;r={baseState:o.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:o.shared,callbacks:o.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}var Sc=!1;function yi(){if(Sc){var e=nl;if(e!==null)throw e}}function bi(e,t,r,o){Sc=!1;var c=e.updateQueue;Ca=!1;var d=c.firstBaseUpdate,b=c.lastBaseUpdate,E=c.shared.pending;if(E!==null){c.shared.pending=null;var j=E,G=j.next;j.next=null,b===null?d=G:b.next=G,b=j;var ae=e.alternate;ae!==null&&(ae=ae.updateQueue,E=ae.lastBaseUpdate,E!==b&&(E===null?ae.firstBaseUpdate=G:E.next=G,ae.lastBaseUpdate=j))}if(d!==null){var le=c.baseState;b=0,ae=G=j=null,E=d;do{var Q=E.lane&-536870913,Z=Q!==E.lane;if(Z?(Ke&Q)===Q:(o&Q)===Q){Q!==0&&Q===tl&&(Sc=!0),ae!==null&&(ae=ae.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var _e=e,je=E;Q=t;var tt=r;switch(je.tag){case 1:if(_e=je.payload,typeof _e=="function"){le=_e.call(tt,le,Q);break e}le=_e;break e;case 3:_e.flags=_e.flags&-65537|128;case 0:if(_e=je.payload,Q=typeof _e=="function"?_e.call(tt,le,Q):_e,Q==null)break e;le=g({},le,Q);break e;case 2:Ca=!0}}Q=E.callback,Q!==null&&(e.flags|=64,Z&&(e.flags|=8192),Z=c.callbacks,Z===null?c.callbacks=[Q]:Z.push(Q))}else Z={lane:Q,tag:E.tag,payload:E.payload,callback:E.callback,next:null},ae===null?(G=ae=Z,j=le):ae=ae.next=Z,b|=Q;if(E=E.next,E===null){if(E=c.shared.pending,E===null)break;Z=E,E=Z.next,Z.next=null,c.lastBaseUpdate=Z,c.shared.pending=null}}while(!0);ae===null&&(j=le),c.baseState=j,c.firstBaseUpdate=G,c.lastBaseUpdate=ae,d===null&&(c.shared.lanes=0),za|=b,e.lanes=b,e.memoizedState=le}}function ym(e,t){if(typeof e!="function")throw Error(i(191,e));e.call(t)}function bm(e,t){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)ym(r[e],t)}var al=K(null),Qo=K(0);function xm(e,t){e=ca,F(Qo,e),F(al,t),ca=e|t.baseLanes}function wc(){F(Qo,ca),F(al,al.current)}function Ec(){ca=Qo.current,L(al),L(Qo)}var Na=0,Pe=null,We=null,xt=null,Zo=!1,rl=!1,wr=!1,Jo=0,xi=0,ll=null,b1=0;function gt(){throw Error(i(321))}function Rc(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Qt(e[r],t[r]))return!1;return!0}function Cc(e,t,r,o,c,d){return Na=d,Pe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,_.H=e===null||e.memoizedState===null?ap:rp,wr=!1,d=r(o,c),wr=!1,rl&&(d=wm(t,r,o,c)),Sm(e),d}function Sm(e){_.H=as;var t=We!==null&&We.next!==null;if(Na=0,xt=We=Pe=null,Zo=!1,xi=0,ll=null,t)throw Error(i(300));e===null||Ct||(e=e.dependencies,e!==null&&qo(e)&&(Ct=!0))}function wm(e,t,r,o){Pe=e;var c=0;do{if(rl&&(ll=null),xi=0,rl=!1,25<=c)throw Error(i(301));if(c+=1,xt=We=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}_.H=O1,d=t(r,o)}while(rl);return d}function x1(){var e=_.H,t=e.useState()[0];return t=typeof t.then=="function"?Si(t):t,e=e.useState()[0],(We!==null?We.memoizedState:null)!==e&&(Pe.flags|=1024),t}function Oc(){var e=Jo!==0;return Jo=0,e}function Ac(e,t,r){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r}function Nc(e){if(Zo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Zo=!1}Na=0,xt=We=Pe=null,rl=!1,xi=Jo=0,ll=null}function $t(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xt===null?Pe.memoizedState=xt=e:xt=xt.next=e,xt}function St(){if(We===null){var e=Pe.alternate;e=e!==null?e.memoizedState:null}else e=We.next;var t=xt===null?Pe.memoizedState:xt.next;if(t!==null)xt=t,We=e;else{if(e===null)throw Pe.alternate===null?Error(i(467)):Error(i(310));We=e,e={memoizedState:We.memoizedState,baseState:We.baseState,baseQueue:We.baseQueue,queue:We.queue,next:null},xt===null?Pe.memoizedState=xt=e:xt=xt.next=e}return xt}function Tc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Si(e){var t=xi;return xi+=1,ll===null&&(ll=[]),e=pm(ll,e,t),t=Pe,(xt===null?t.memoizedState:xt.next)===null&&(t=t.alternate,_.H=t===null||t.memoizedState===null?ap:rp),e}function Io(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Si(e);if(e.$$typeof===U)return Dt(e)}throw Error(i(438,String(e)))}function jc(e){var t=null,r=Pe.updateQueue;if(r!==null&&(t=r.memoCache),t==null){var o=Pe.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(t={data:o.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),r===null&&(r=Tc(),Pe.updateQueue=r),r.memoCache=t,r=t.data[t.index],r===void 0)for(r=t.data[t.index]=Array(e),o=0;o<e;o++)r[o]=se;return t.index++,r}function ra(e,t){return typeof t=="function"?t(e):t}function Wo(e){var t=St();return Mc(t,We,e)}function Mc(e,t,r){var o=e.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=r;var c=e.baseQueue,d=o.pending;if(d!==null){if(c!==null){var b=c.next;c.next=d.next,d.next=b}t.baseQueue=c=d,o.pending=null}if(d=e.baseState,c===null)e.memoizedState=d;else{t=c.next;var E=b=null,j=null,G=t,ae=!1;do{var le=G.lane&-536870913;if(le!==G.lane?(Ke&le)===le:(Na&le)===le){var Q=G.revertLane;if(Q===0)j!==null&&(j=j.next={lane:0,revertLane:0,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),le===tl&&(ae=!0);else if((Na&Q)===Q){G=G.next,Q===tl&&(ae=!0);continue}else le={lane:0,revertLane:G.revertLane,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},j===null?(E=j=le,b=d):j=j.next=le,Pe.lanes|=Q,za|=Q;le=G.action,wr&&r(d,le),d=G.hasEagerState?G.eagerState:r(d,le)}else Q={lane:le,revertLane:G.revertLane,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},j===null?(E=j=Q,b=d):j=j.next=Q,Pe.lanes|=le,za|=le;G=G.next}while(G!==null&&G!==t);if(j===null?b=d:j.next=E,!Qt(d,e.memoizedState)&&(Ct=!0,ae&&(r=nl,r!==null)))throw r;e.memoizedState=d,e.baseState=b,e.baseQueue=j,o.lastRenderedState=d}return c===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function _c(e){var t=St(),r=t.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=e;var o=r.dispatch,c=r.pending,d=t.memoizedState;if(c!==null){r.pending=null;var b=c=c.next;do d=e(d,b.action),b=b.next;while(b!==c);Qt(d,t.memoizedState)||(Ct=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),r.lastRenderedState=d}return[d,o]}function Em(e,t,r){var o=Pe,c=St(),d=Xe;if(d){if(r===void 0)throw Error(i(407));r=r()}else r=t();var b=!Qt((We||c).memoizedState,r);b&&(c.memoizedState=r,Ct=!0),c=c.queue;var E=Om.bind(null,o,c,e);if(wi(2048,8,E,[e]),c.getSnapshot!==t||b||xt!==null&&xt.memoizedState.tag&1){if(o.flags|=2048,il(9,es(),Cm.bind(null,o,c,r,t),null),at===null)throw Error(i(349));d||(Na&124)!==0||Rm(o,t,r)}return r}function Rm(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Pe.updateQueue,t===null?(t=Tc(),Pe.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Cm(e,t,r,o){t.value=r,t.getSnapshot=o,Am(t)&&Nm(e)}function Om(e,t,r){return r(function(){Am(t)&&Nm(e)})}function Am(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Qt(e,r)}catch{return!0}}function Nm(e){var t=Jr(e,2);t!==null&&tn(t,e,2)}function Dc(e){var t=$t();if(typeof e=="function"){var r=e;if(e=r(),wr){wn(!0);try{r()}finally{wn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:e},t}function Tm(e,t,r,o){return e.baseState=r,Mc(e,We,typeof o=="function"?o:ra)}function S1(e,t,r,o,c){if(ns(e))throw Error(i(485));if(e=t.action,e!==null){var d={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){d.listeners.push(b)}};_.T!==null?r(!0):d.isTransition=!1,o(d),r=t.pending,r===null?(d.next=t.pending=d,jm(t,d)):(d.next=r.next,t.pending=r.next=d)}}function jm(e,t){var r=t.action,o=t.payload,c=e.state;if(t.isTransition){var d=_.T,b={};_.T=b;try{var E=r(c,o),j=_.S;j!==null&&j(b,E),Mm(e,t,E)}catch(G){Lc(e,t,G)}finally{_.T=d}}else try{d=r(c,o),Mm(e,t,d)}catch(G){Lc(e,t,G)}}function Mm(e,t,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(o){_m(e,t,o)},function(o){return Lc(e,t,o)}):_m(e,t,r)}function _m(e,t,r){t.status="fulfilled",t.value=r,Dm(t),e.state=r,t=e.pending,t!==null&&(r=t.next,r===t?e.pending=null:(r=r.next,t.next=r,jm(e,r)))}function Lc(e,t,r){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do t.status="rejected",t.reason=r,Dm(t),t=t.next;while(t!==o)}e.action=null}function Dm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Lm(e,t){return t}function zm(e,t){if(Xe){var r=at.formState;if(r!==null){e:{var o=Pe;if(Xe){if(ht){t:{for(var c=ht,d=Dn;c.nodeType!==8;){if(!d){c=null;break t}if(c=Cn(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){ht=Cn(c.nextSibling),o=c.data==="F!";break e}}yr(o)}o=!1}o&&(t=r[0])}}return r=$t(),r.memoizedState=r.baseState=t,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lm,lastRenderedState:t},r.queue=o,r=ep.bind(null,Pe,o),o.dispatch=r,o=Dc(!1),d=Hc.bind(null,Pe,!1,o.queue),o=$t(),c={state:t,dispatch:null,action:e,pending:null},o.queue=c,r=S1.bind(null,Pe,c,d,r),c.dispatch=r,o.memoizedState=e,[t,r,!1]}function km(e){var t=St();return Um(t,We,e)}function Um(e,t,r){if(t=Mc(e,t,Lm)[0],e=Wo(ra)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var o=Si(t)}catch(b){throw b===pi?Fo:b}else o=t;t=St();var c=t.queue,d=c.dispatch;return r!==t.memoizedState&&(Pe.flags|=2048,il(9,es(),w1.bind(null,c,r),null)),[o,d,e]}function w1(e,t){e.action=t}function Pm(e){var t=St(),r=We;if(r!==null)return Um(t,r,e);St(),t=t.memoizedState,r=St();var o=r.queue.dispatch;return r.memoizedState=e,[t,o,!1]}function il(e,t,r,o){return e={tag:e,create:r,deps:o,inst:t,next:null},t=Pe.updateQueue,t===null&&(t=Tc(),Pe.updateQueue=t),r=t.lastEffect,r===null?t.lastEffect=e.next=e:(o=r.next,r.next=e,e.next=o,t.lastEffect=e),e}function es(){return{destroy:void 0,resource:void 0}}function Hm(){return St().memoizedState}function ts(e,t,r,o){var c=$t();o=o===void 0?null:o,Pe.flags|=e,c.memoizedState=il(1|t,es(),r,o)}function wi(e,t,r,o){var c=St();o=o===void 0?null:o;var d=c.memoizedState.inst;We!==null&&o!==null&&Rc(o,We.memoizedState.deps)?c.memoizedState=il(t,d,r,o):(Pe.flags|=e,c.memoizedState=il(1|t,d,r,o))}function Bm(e,t){ts(8390656,8,e,t)}function $m(e,t){wi(2048,8,e,t)}function Vm(e,t){return wi(4,2,e,t)}function Ym(e,t){return wi(4,4,e,t)}function qm(e,t){if(typeof t=="function"){e=e();var r=t(e);return function(){typeof r=="function"?r():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Gm(e,t,r){r=r!=null?r.concat([e]):null,wi(4,4,qm.bind(null,t,e),r)}function zc(){}function Km(e,t){var r=St();t=t===void 0?null:t;var o=r.memoizedState;return t!==null&&Rc(t,o[1])?o[0]:(r.memoizedState=[e,t],e)}function Fm(e,t){var r=St();t=t===void 0?null:t;var o=r.memoizedState;if(t!==null&&Rc(t,o[1]))return o[0];if(o=e(),wr){wn(!0);try{e()}finally{wn(!1)}}return r.memoizedState=[o,t],o}function kc(e,t,r){return r===void 0||(Na&1073741824)!==0?e.memoizedState=t:(e.memoizedState=r,e=Zp(),Pe.lanes|=e,za|=e,r)}function Xm(e,t,r,o){return Qt(r,t)?r:al.current!==null?(e=kc(e,r,o),Qt(e,t)||(Ct=!0),e):(Na&42)===0?(Ct=!0,e.memoizedState=r):(e=Zp(),Pe.lanes|=e,za|=e,t)}function Qm(e,t,r,o,c){var d=ee.p;ee.p=d!==0&&8>d?d:8;var b=_.T,E={};_.T=E,Hc(e,!1,t,r);try{var j=c(),G=_.S;if(G!==null&&G(E,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var ae=y1(j,o);Ei(e,t,ae,en(e))}else Ei(e,t,o,en(e))}catch(le){Ei(e,t,{then:function(){},status:"rejected",reason:le},en())}finally{ee.p=d,_.T=b}}function E1(){}function Uc(e,t,r,o){if(e.tag!==5)throw Error(i(476));var c=Zm(e).queue;Qm(e,c,t,q,r===null?E1:function(){return Jm(e),r(o)})}function Zm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:q,baseState:q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:q},next:null};var r={};return t.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:r},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Jm(e){var t=Zm(e).next.queue;Ei(e,t,{},en())}function Pc(){return Dt($i)}function Im(){return St().memoizedState}function Wm(){return St().memoizedState}function R1(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var r=en();e=Oa(r);var o=Aa(t,e,r);o!==null&&(tn(o,t,r),vi(o,t,r)),t={cache:mc()},e.payload=t;return}t=t.return}}function C1(e,t,r){var o=en();r={lane:o,revertLane:0,action:r,hasEagerState:!1,eagerState:null,next:null},ns(e)?tp(t,r):(r=rc(e,t,r,o),r!==null&&(tn(r,e,o),np(r,t,o)))}function ep(e,t,r){var o=en();Ei(e,t,r,o)}function Ei(e,t,r,o){var c={lane:o,revertLane:0,action:r,hasEagerState:!1,eagerState:null,next:null};if(ns(e))tp(t,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var b=t.lastRenderedState,E=d(b,r);if(c.hasEagerState=!0,c.eagerState=E,Qt(E,b))return Ho(e,t,c,0),at===null&&Po(),!1}catch{}finally{}if(r=rc(e,t,c,o),r!==null)return tn(r,e,o),np(r,t,o),!0}return!1}function Hc(e,t,r,o){if(o={lane:2,revertLane:yf(),action:o,hasEagerState:!1,eagerState:null,next:null},ns(e)){if(t)throw Error(i(479))}else t=rc(e,r,o,2),t!==null&&tn(t,e,2)}function ns(e){var t=e.alternate;return e===Pe||t!==null&&t===Pe}function tp(e,t){rl=Zo=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function np(e,t,r){if((r&4194048)!==0){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,ur(e,r)}}var as={readContext:Dt,use:Io,useCallback:gt,useContext:gt,useEffect:gt,useImperativeHandle:gt,useLayoutEffect:gt,useInsertionEffect:gt,useMemo:gt,useReducer:gt,useRef:gt,useState:gt,useDebugValue:gt,useDeferredValue:gt,useTransition:gt,useSyncExternalStore:gt,useId:gt,useHostTransitionStatus:gt,useFormState:gt,useActionState:gt,useOptimistic:gt,useMemoCache:gt,useCacheRefresh:gt},ap={readContext:Dt,use:Io,useCallback:function(e,t){return $t().memoizedState=[e,t===void 0?null:t],e},useContext:Dt,useEffect:Bm,useImperativeHandle:function(e,t,r){r=r!=null?r.concat([e]):null,ts(4194308,4,qm.bind(null,t,e),r)},useLayoutEffect:function(e,t){return ts(4194308,4,e,t)},useInsertionEffect:function(e,t){ts(4,2,e,t)},useMemo:function(e,t){var r=$t();t=t===void 0?null:t;var o=e();if(wr){wn(!0);try{e()}finally{wn(!1)}}return r.memoizedState=[o,t],o},useReducer:function(e,t,r){var o=$t();if(r!==void 0){var c=r(t);if(wr){wn(!0);try{r(t)}finally{wn(!1)}}}else c=t;return o.memoizedState=o.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},o.queue=e,e=e.dispatch=C1.bind(null,Pe,e),[o.memoizedState,e]},useRef:function(e){var t=$t();return e={current:e},t.memoizedState=e},useState:function(e){e=Dc(e);var t=e.queue,r=ep.bind(null,Pe,t);return t.dispatch=r,[e.memoizedState,r]},useDebugValue:zc,useDeferredValue:function(e,t){var r=$t();return kc(r,e,t)},useTransition:function(){var e=Dc(!1);return e=Qm.bind(null,Pe,e.queue,!0,!1),$t().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,r){var o=Pe,c=$t();if(Xe){if(r===void 0)throw Error(i(407));r=r()}else{if(r=t(),at===null)throw Error(i(349));(Ke&124)!==0||Rm(o,t,r)}c.memoizedState=r;var d={value:r,getSnapshot:t};return c.queue=d,Bm(Om.bind(null,o,d,e),[e]),o.flags|=2048,il(9,es(),Cm.bind(null,o,d,r,t),null),r},useId:function(){var e=$t(),t=at.identifierPrefix;if(Xe){var r=ta,o=ea;r=(o&~(1<<32-Tt(o)-1)).toString(32)+r,t="«"+t+"R"+r,r=Jo++,0<r&&(t+="H"+r.toString(32)),t+="»"}else r=b1++,t="«"+t+"r"+r.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:Pc,useFormState:zm,useActionState:zm,useOptimistic:function(e){var t=$t();t.memoizedState=t.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=r,t=Hc.bind(null,Pe,!0,r),r.dispatch=t,[e,t]},useMemoCache:jc,useCacheRefresh:function(){return $t().memoizedState=R1.bind(null,Pe)}},rp={readContext:Dt,use:Io,useCallback:Km,useContext:Dt,useEffect:$m,useImperativeHandle:Gm,useInsertionEffect:Vm,useLayoutEffect:Ym,useMemo:Fm,useReducer:Wo,useRef:Hm,useState:function(){return Wo(ra)},useDebugValue:zc,useDeferredValue:function(e,t){var r=St();return Xm(r,We.memoizedState,e,t)},useTransition:function(){var e=Wo(ra)[0],t=St().memoizedState;return[typeof e=="boolean"?e:Si(e),t]},useSyncExternalStore:Em,useId:Im,useHostTransitionStatus:Pc,useFormState:km,useActionState:km,useOptimistic:function(e,t){var r=St();return Tm(r,We,e,t)},useMemoCache:jc,useCacheRefresh:Wm},O1={readContext:Dt,use:Io,useCallback:Km,useContext:Dt,useEffect:$m,useImperativeHandle:Gm,useInsertionEffect:Vm,useLayoutEffect:Ym,useMemo:Fm,useReducer:_c,useRef:Hm,useState:function(){return _c(ra)},useDebugValue:zc,useDeferredValue:function(e,t){var r=St();return We===null?kc(r,e,t):Xm(r,We.memoizedState,e,t)},useTransition:function(){var e=_c(ra)[0],t=St().memoizedState;return[typeof e=="boolean"?e:Si(e),t]},useSyncExternalStore:Em,useId:Im,useHostTransitionStatus:Pc,useFormState:Pm,useActionState:Pm,useOptimistic:function(e,t){var r=St();return We!==null?Tm(r,We,e,t):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:jc,useCacheRefresh:Wm},ol=null,Ri=0;function rs(e){var t=Ri;return Ri+=1,ol===null&&(ol=[]),pm(ol,e,t)}function Ci(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ls(e,t){throw t.$$typeof===x?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function lp(e){var t=e._init;return t(e._payload)}function ip(e){function t(H,D){if(e){var Y=H.deletions;Y===null?(H.deletions=[D],H.flags|=16):Y.push(D)}}function r(H,D){if(!e)return null;for(;D!==null;)t(H,D),D=D.sibling;return null}function o(H){for(var D=new Map;H!==null;)H.key!==null?D.set(H.key,H):D.set(H.index,H),H=H.sibling;return D}function c(H,D){return H=Wn(H,D),H.index=0,H.sibling=null,H}function d(H,D,Y){return H.index=Y,e?(Y=H.alternate,Y!==null?(Y=Y.index,Y<D?(H.flags|=67108866,D):Y):(H.flags|=67108866,D)):(H.flags|=1048576,D)}function b(H){return e&&H.alternate===null&&(H.flags|=67108866),H}function E(H,D,Y,re){return D===null||D.tag!==6?(D=ic(Y,H.mode,re),D.return=H,D):(D=c(D,Y),D.return=H,D)}function j(H,D,Y,re){var ge=Y.type;return ge===C?ae(H,D,Y.props.children,re,Y.key):D!==null&&(D.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===ne&&lp(ge)===D.type)?(D=c(D,Y.props),Ci(D,Y),D.return=H,D):(D=$o(Y.type,Y.key,Y.props,null,H.mode,re),Ci(D,Y),D.return=H,D)}function G(H,D,Y,re){return D===null||D.tag!==4||D.stateNode.containerInfo!==Y.containerInfo||D.stateNode.implementation!==Y.implementation?(D=oc(Y,H.mode,re),D.return=H,D):(D=c(D,Y.children||[]),D.return=H,D)}function ae(H,D,Y,re,ge){return D===null||D.tag!==7?(D=mr(Y,H.mode,re,ge),D.return=H,D):(D=c(D,Y),D.return=H,D)}function le(H,D,Y){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return D=ic(""+D,H.mode,Y),D.return=H,D;if(typeof D=="object"&&D!==null){switch(D.$$typeof){case S:return Y=$o(D.type,D.key,D.props,null,H.mode,Y),Ci(Y,D),Y.return=H,Y;case w:return D=oc(D,H.mode,Y),D.return=H,D;case ne:var re=D._init;return D=re(D._payload),le(H,D,Y)}if(ce(D)||we(D))return D=mr(D,H.mode,Y,null),D.return=H,D;if(typeof D.then=="function")return le(H,rs(D),Y);if(D.$$typeof===U)return le(H,Go(H,D),Y);ls(H,D)}return null}function Q(H,D,Y,re){var ge=D!==null?D.key:null;if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return ge!==null?null:E(H,D,""+Y,re);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case S:return Y.key===ge?j(H,D,Y,re):null;case w:return Y.key===ge?G(H,D,Y,re):null;case ne:return ge=Y._init,Y=ge(Y._payload),Q(H,D,Y,re)}if(ce(Y)||we(Y))return ge!==null?null:ae(H,D,Y,re,null);if(typeof Y.then=="function")return Q(H,D,rs(Y),re);if(Y.$$typeof===U)return Q(H,D,Go(H,Y),re);ls(H,Y)}return null}function Z(H,D,Y,re,ge){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return H=H.get(Y)||null,E(D,H,""+re,ge);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case S:return H=H.get(re.key===null?Y:re.key)||null,j(D,H,re,ge);case w:return H=H.get(re.key===null?Y:re.key)||null,G(D,H,re,ge);case ne:var $e=re._init;return re=$e(re._payload),Z(H,D,Y,re,ge)}if(ce(re)||we(re))return H=H.get(Y)||null,ae(D,H,re,ge,null);if(typeof re.then=="function")return Z(H,D,Y,rs(re),ge);if(re.$$typeof===U)return Z(H,D,Y,Go(D,re),ge);ls(D,re)}return null}function _e(H,D,Y,re){for(var ge=null,$e=null,Oe=D,Me=D=0,At=null;Oe!==null&&Me<Y.length;Me++){Oe.index>Me?(At=Oe,Oe=null):At=Oe.sibling;var Fe=Q(H,Oe,Y[Me],re);if(Fe===null){Oe===null&&(Oe=At);break}e&&Oe&&Fe.alternate===null&&t(H,Oe),D=d(Fe,D,Me),$e===null?ge=Fe:$e.sibling=Fe,$e=Fe,Oe=At}if(Me===Y.length)return r(H,Oe),Xe&&gr(H,Me),ge;if(Oe===null){for(;Me<Y.length;Me++)Oe=le(H,Y[Me],re),Oe!==null&&(D=d(Oe,D,Me),$e===null?ge=Oe:$e.sibling=Oe,$e=Oe);return Xe&&gr(H,Me),ge}for(Oe=o(Oe);Me<Y.length;Me++)At=Z(Oe,H,Me,Y[Me],re),At!==null&&(e&&At.alternate!==null&&Oe.delete(At.key===null?Me:At.key),D=d(At,D,Me),$e===null?ge=At:$e.sibling=At,$e=At);return e&&Oe.forEach(function(qa){return t(H,qa)}),Xe&&gr(H,Me),ge}function je(H,D,Y,re){if(Y==null)throw Error(i(151));for(var ge=null,$e=null,Oe=D,Me=D=0,At=null,Fe=Y.next();Oe!==null&&!Fe.done;Me++,Fe=Y.next()){Oe.index>Me?(At=Oe,Oe=null):At=Oe.sibling;var qa=Q(H,Oe,Fe.value,re);if(qa===null){Oe===null&&(Oe=At);break}e&&Oe&&qa.alternate===null&&t(H,Oe),D=d(qa,D,Me),$e===null?ge=qa:$e.sibling=qa,$e=qa,Oe=At}if(Fe.done)return r(H,Oe),Xe&&gr(H,Me),ge;if(Oe===null){for(;!Fe.done;Me++,Fe=Y.next())Fe=le(H,Fe.value,re),Fe!==null&&(D=d(Fe,D,Me),$e===null?ge=Fe:$e.sibling=Fe,$e=Fe);return Xe&&gr(H,Me),ge}for(Oe=o(Oe);!Fe.done;Me++,Fe=Y.next())Fe=Z(Oe,H,Me,Fe.value,re),Fe!==null&&(e&&Fe.alternate!==null&&Oe.delete(Fe.key===null?Me:Fe.key),D=d(Fe,D,Me),$e===null?ge=Fe:$e.sibling=Fe,$e=Fe);return e&&Oe.forEach(function(AS){return t(H,AS)}),Xe&&gr(H,Me),ge}function tt(H,D,Y,re){if(typeof Y=="object"&&Y!==null&&Y.type===C&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case S:e:{for(var ge=Y.key;D!==null;){if(D.key===ge){if(ge=Y.type,ge===C){if(D.tag===7){r(H,D.sibling),re=c(D,Y.props.children),re.return=H,H=re;break e}}else if(D.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===ne&&lp(ge)===D.type){r(H,D.sibling),re=c(D,Y.props),Ci(re,Y),re.return=H,H=re;break e}r(H,D);break}else t(H,D);D=D.sibling}Y.type===C?(re=mr(Y.props.children,H.mode,re,Y.key),re.return=H,H=re):(re=$o(Y.type,Y.key,Y.props,null,H.mode,re),Ci(re,Y),re.return=H,H=re)}return b(H);case w:e:{for(ge=Y.key;D!==null;){if(D.key===ge)if(D.tag===4&&D.stateNode.containerInfo===Y.containerInfo&&D.stateNode.implementation===Y.implementation){r(H,D.sibling),re=c(D,Y.children||[]),re.return=H,H=re;break e}else{r(H,D);break}else t(H,D);D=D.sibling}re=oc(Y,H.mode,re),re.return=H,H=re}return b(H);case ne:return ge=Y._init,Y=ge(Y._payload),tt(H,D,Y,re)}if(ce(Y))return _e(H,D,Y,re);if(we(Y)){if(ge=we(Y),typeof ge!="function")throw Error(i(150));return Y=ge.call(Y),je(H,D,Y,re)}if(typeof Y.then=="function")return tt(H,D,rs(Y),re);if(Y.$$typeof===U)return tt(H,D,Go(H,Y),re);ls(H,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint"?(Y=""+Y,D!==null&&D.tag===6?(r(H,D.sibling),re=c(D,Y),re.return=H,H=re):(r(H,D),re=ic(Y,H.mode,re),re.return=H,H=re),b(H)):r(H,D)}return function(H,D,Y,re){try{Ri=0;var ge=tt(H,D,Y,re);return ol=null,ge}catch(Oe){if(Oe===pi||Oe===Fo)throw Oe;var $e=Zt(29,Oe,null,H.mode);return $e.lanes=re,$e.return=H,$e}finally{}}}var sl=ip(!0),op=ip(!1),vn=K(null),Ln=null;function Ta(e){var t=e.alternate;F(Et,Et.current&1),F(vn,e),Ln===null&&(t===null||al.current!==null||t.memoizedState!==null)&&(Ln=e)}function sp(e){if(e.tag===22){if(F(Et,Et.current),F(vn,e),Ln===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Ln=e)}}else ja()}function ja(){F(Et,Et.current),F(vn,vn.current)}function la(e){L(vn),Ln===e&&(Ln=null),L(Et)}var Et=K(0);function is(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||jf(r)))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}function Bc(e,t,r,o){t=e.memoizedState,r=r(o,t),r=r==null?t:g({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var $c={enqueueSetState:function(e,t,r){e=e._reactInternals;var o=en(),c=Oa(o);c.payload=t,r!=null&&(c.callback=r),t=Aa(e,c,o),t!==null&&(tn(t,e,o),vi(t,e,o))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var o=en(),c=Oa(o);c.tag=1,c.payload=t,r!=null&&(c.callback=r),t=Aa(e,c,o),t!==null&&(tn(t,e,o),vi(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=en(),o=Oa(r);o.tag=2,t!=null&&(o.callback=t),t=Aa(e,o,r),t!==null&&(tn(t,e,r),vi(t,e,r))}};function up(e,t,r,o,c,d,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,d,b):t.prototype&&t.prototype.isPureReactComponent?!oi(r,o)||!oi(c,d):!0}function cp(e,t,r,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,o),t.state!==e&&$c.enqueueReplaceState(t,t.state,null)}function Er(e,t){var r=t;if("ref"in t){r={};for(var o in t)o!=="ref"&&(r[o]=t[o])}if(e=e.defaultProps){r===t&&(r=g({},r));for(var c in e)r[c]===void 0&&(r[c]=e[c])}return r}var os=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function fp(e){os(e)}function dp(e){console.error(e)}function hp(e){os(e)}function ss(e,t){try{var r=e.onUncaughtError;r(t.value,{componentStack:t.stack})}catch(o){setTimeout(function(){throw o})}}function mp(e,t,r){try{var o=e.onCaughtError;o(r.value,{componentStack:r.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Vc(e,t,r){return r=Oa(r),r.tag=3,r.payload={element:null},r.callback=function(){ss(e,t)},r}function pp(e){return e=Oa(e),e.tag=3,e}function gp(e,t,r,o){var c=r.type.getDerivedStateFromError;if(typeof c=="function"){var d=o.value;e.payload=function(){return c(d)},e.callback=function(){mp(t,r,o)}}var b=r.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){mp(t,r,o),typeof c!="function"&&(ka===null?ka=new Set([this]):ka.add(this));var E=o.stack;this.componentDidCatch(o.value,{componentStack:E!==null?E:""})})}function A1(e,t,r,o,c){if(r.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(t=r.alternate,t!==null&&di(t,r,c,!0),r=vn.current,r!==null){switch(r.tag){case 13:return Ln===null?hf():r.alternate===null&&mt===0&&(mt=3),r.flags&=-257,r.flags|=65536,r.lanes=c,o===vc?r.flags|=16384:(t=r.updateQueue,t===null?r.updateQueue=new Set([o]):t.add(o),pf(e,o,c)),!1;case 22:return r.flags|=65536,o===vc?r.flags|=16384:(t=r.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([o])},r.updateQueue=t):(r=t.retryQueue,r===null?t.retryQueue=new Set([o]):r.add(o)),pf(e,o,c)),!1}throw Error(i(435,r.tag))}return pf(e,o,c),hf(),!1}if(Xe)return t=vn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,o!==cc&&(e=Error(i(422),{cause:o}),fi(hn(e,r)))):(o!==cc&&(t=Error(i(423),{cause:o}),fi(hn(t,r))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,o=hn(o,r),c=Vc(e.stateNode,o,c),xc(e,c),mt!==4&&(mt=2)),!1;var d=Error(i(520),{cause:o});if(d=hn(d,r),_i===null?_i=[d]:_i.push(d),mt!==4&&(mt=2),t===null)return!0;o=hn(o,r),r=t;do{switch(r.tag){case 3:return r.flags|=65536,e=c&-c,r.lanes|=e,e=Vc(r.stateNode,o,e),xc(r,e),!1;case 1:if(t=r.type,d=r.stateNode,(r.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(ka===null||!ka.has(d))))return r.flags|=65536,c&=-c,r.lanes|=c,c=pp(c),gp(c,e,r,o),xc(r,c),!1}r=r.return}while(r!==null);return!1}var vp=Error(i(461)),Ct=!1;function jt(e,t,r,o){t.child=e===null?op(t,null,r,o):sl(t,e.child,r,o)}function yp(e,t,r,o,c){r=r.render;var d=t.ref;if("ref"in o){var b={};for(var E in o)E!=="ref"&&(b[E]=o[E])}else b=o;return xr(t),o=Cc(e,t,r,b,d,c),E=Oc(),e!==null&&!Ct?(Ac(e,t,c),ia(e,t,c)):(Xe&&E&&sc(t),t.flags|=1,jt(e,t,o,c),t.child)}function bp(e,t,r,o,c){if(e===null){var d=r.type;return typeof d=="function"&&!lc(d)&&d.defaultProps===void 0&&r.compare===null?(t.tag=15,t.type=d,xp(e,t,d,o,c)):(e=$o(r.type,null,o,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!Zc(e,c)){var b=d.memoizedProps;if(r=r.compare,r=r!==null?r:oi,r(b,o)&&e.ref===t.ref)return ia(e,t,c)}return t.flags|=1,e=Wn(d,o),e.ref=t.ref,e.return=t,t.child=e}function xp(e,t,r,o,c){if(e!==null){var d=e.memoizedProps;if(oi(d,o)&&e.ref===t.ref)if(Ct=!1,t.pendingProps=o=d,Zc(e,c))(e.flags&131072)!==0&&(Ct=!0);else return t.lanes=e.lanes,ia(e,t,c)}return Yc(e,t,r,o,c)}function Sp(e,t,r){var o=t.pendingProps,c=o.children,d=e!==null?e.memoizedState:null;if(o.mode==="hidden"){if((t.flags&128)!==0){if(o=d!==null?d.baseLanes|r:r,e!==null){for(c=t.child=e.child,d=0;c!==null;)d=d|c.lanes|c.childLanes,c=c.sibling;t.childLanes=d&~o}else t.childLanes=0,t.child=null;return wp(e,t,o,r)}if((r&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ko(t,d!==null?d.cachePool:null),d!==null?xm(t,d):wc(),sp(t);else return t.lanes=t.childLanes=536870912,wp(e,t,d!==null?d.baseLanes|r:r,r)}else d!==null?(Ko(t,d.cachePool),xm(t,d),ja(),t.memoizedState=null):(e!==null&&Ko(t,null),wc(),ja());return jt(e,t,c,r),t.child}function wp(e,t,r,o){var c=gc();return c=c===null?null:{parent:wt._currentValue,pool:c},t.memoizedState={baseLanes:r,cachePool:c},e!==null&&Ko(t,null),wc(),sp(t),e!==null&&di(e,t,o,!0),null}function us(e,t){var r=t.ref;if(r===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(i(284));(e===null||e.ref!==r)&&(t.flags|=4194816)}}function Yc(e,t,r,o,c){return xr(t),r=Cc(e,t,r,o,void 0,c),o=Oc(),e!==null&&!Ct?(Ac(e,t,c),ia(e,t,c)):(Xe&&o&&sc(t),t.flags|=1,jt(e,t,r,c),t.child)}function Ep(e,t,r,o,c,d){return xr(t),t.updateQueue=null,r=wm(t,o,r,c),Sm(e),o=Oc(),e!==null&&!Ct?(Ac(e,t,d),ia(e,t,d)):(Xe&&o&&sc(t),t.flags|=1,jt(e,t,r,d),t.child)}function Rp(e,t,r,o,c){if(xr(t),t.stateNode===null){var d=Ir,b=r.contextType;typeof b=="object"&&b!==null&&(d=Dt(b)),d=new r(o,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=$c,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=o,d.state=t.memoizedState,d.refs={},yc(t),b=r.contextType,d.context=typeof b=="object"&&b!==null?Dt(b):Ir,d.state=t.memoizedState,b=r.getDerivedStateFromProps,typeof b=="function"&&(Bc(t,r,b,o),d.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(b=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),b!==d.state&&$c.enqueueReplaceState(d,d.state,null),bi(t,o,d,c),yi(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),o=!0}else if(e===null){d=t.stateNode;var E=t.memoizedProps,j=Er(r,E);d.props=j;var G=d.context,ae=r.contextType;b=Ir,typeof ae=="object"&&ae!==null&&(b=Dt(ae));var le=r.getDerivedStateFromProps;ae=typeof le=="function"||typeof d.getSnapshotBeforeUpdate=="function",E=t.pendingProps!==E,ae||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(E||G!==b)&&cp(t,d,o,b),Ca=!1;var Q=t.memoizedState;d.state=Q,bi(t,o,d,c),yi(),G=t.memoizedState,E||Q!==G||Ca?(typeof le=="function"&&(Bc(t,r,le,o),G=t.memoizedState),(j=Ca||up(t,r,j,o,Q,G,b))?(ae||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=G),d.props=o,d.state=G,d.context=b,o=j):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{d=t.stateNode,bc(e,t),b=t.memoizedProps,ae=Er(r,b),d.props=ae,le=t.pendingProps,Q=d.context,G=r.contextType,j=Ir,typeof G=="object"&&G!==null&&(j=Dt(G)),E=r.getDerivedStateFromProps,(G=typeof E=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(b!==le||Q!==j)&&cp(t,d,o,j),Ca=!1,Q=t.memoizedState,d.state=Q,bi(t,o,d,c),yi();var Z=t.memoizedState;b!==le||Q!==Z||Ca||e!==null&&e.dependencies!==null&&qo(e.dependencies)?(typeof E=="function"&&(Bc(t,r,E,o),Z=t.memoizedState),(ae=Ca||up(t,r,ae,o,Q,Z,j)||e!==null&&e.dependencies!==null&&qo(e.dependencies))?(G||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(o,Z,j),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(o,Z,j)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||b===e.memoizedProps&&Q===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&Q===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=Z),d.props=o,d.state=Z,d.context=j,o=ae):(typeof d.componentDidUpdate!="function"||b===e.memoizedProps&&Q===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&Q===e.memoizedState||(t.flags|=1024),o=!1)}return d=o,us(e,t),o=(t.flags&128)!==0,d||o?(d=t.stateNode,r=o&&typeof r.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&o?(t.child=sl(t,e.child,null,c),t.child=sl(t,null,r,c)):jt(e,t,r,c),t.memoizedState=d.state,e=t.child):e=ia(e,t,c),e}function Cp(e,t,r,o){return ci(),t.flags|=256,jt(e,t,r,o),t.child}var qc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Gc(e){return{baseLanes:e,cachePool:dm()}}function Kc(e,t,r){return e=e!==null?e.childLanes&~r:0,t&&(e|=yn),e}function Op(e,t,r){var o=t.pendingProps,c=!1,d=(t.flags&128)!==0,b;if((b=d)||(b=e!==null&&e.memoizedState===null?!1:(Et.current&2)!==0),b&&(c=!0,t.flags&=-129),b=(t.flags&32)!==0,t.flags&=-33,e===null){if(Xe){if(c?Ta(t):ja(),Xe){var E=ht,j;if(j=E){e:{for(j=E,E=Dn;j.nodeType!==8;){if(!E){E=null;break e}if(j=Cn(j.nextSibling),j===null){E=null;break e}}E=j}E!==null?(t.memoizedState={dehydrated:E,treeContext:pr!==null?{id:ea,overflow:ta}:null,retryLane:536870912,hydrationErrors:null},j=Zt(18,null,null,0),j.stateNode=E,j.return=t,t.child=j,Ut=t,ht=null,j=!0):j=!1}j||yr(t)}if(E=t.memoizedState,E!==null&&(E=E.dehydrated,E!==null))return jf(E)?t.lanes=32:t.lanes=536870912,null;la(t)}return E=o.children,o=o.fallback,c?(ja(),c=t.mode,E=cs({mode:"hidden",children:E},c),o=mr(o,c,r,null),E.return=t,o.return=t,E.sibling=o,t.child=E,c=t.child,c.memoizedState=Gc(r),c.childLanes=Kc(e,b,r),t.memoizedState=qc,o):(Ta(t),Fc(t,E))}if(j=e.memoizedState,j!==null&&(E=j.dehydrated,E!==null)){if(d)t.flags&256?(Ta(t),t.flags&=-257,t=Xc(e,t,r)):t.memoizedState!==null?(ja(),t.child=e.child,t.flags|=128,t=null):(ja(),c=o.fallback,E=t.mode,o=cs({mode:"visible",children:o.children},E),c=mr(c,E,r,null),c.flags|=2,o.return=t,c.return=t,o.sibling=c,t.child=o,sl(t,e.child,null,r),o=t.child,o.memoizedState=Gc(r),o.childLanes=Kc(e,b,r),t.memoizedState=qc,t=c);else if(Ta(t),jf(E)){if(b=E.nextSibling&&E.nextSibling.dataset,b)var G=b.dgst;b=G,o=Error(i(419)),o.stack="",o.digest=b,fi({value:o,source:null,stack:null}),t=Xc(e,t,r)}else if(Ct||di(e,t,r,!1),b=(r&e.childLanes)!==0,Ct||b){if(b=at,b!==null&&(o=r&-r,o=(o&42)!==0?1:Il(o),o=(o&(b.suspendedLanes|r))!==0?0:o,o!==0&&o!==j.retryLane))throw j.retryLane=o,Jr(e,o),tn(b,e,o),vp;E.data==="$?"||hf(),t=Xc(e,t,r)}else E.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=j.treeContext,ht=Cn(E.nextSibling),Ut=t,Xe=!0,vr=null,Dn=!1,e!==null&&(pn[gn++]=ea,pn[gn++]=ta,pn[gn++]=pr,ea=e.id,ta=e.overflow,pr=t),t=Fc(t,o.children),t.flags|=4096);return t}return c?(ja(),c=o.fallback,E=t.mode,j=e.child,G=j.sibling,o=Wn(j,{mode:"hidden",children:o.children}),o.subtreeFlags=j.subtreeFlags&65011712,G!==null?c=Wn(G,c):(c=mr(c,E,r,null),c.flags|=2),c.return=t,o.return=t,o.sibling=c,t.child=o,o=c,c=t.child,E=e.child.memoizedState,E===null?E=Gc(r):(j=E.cachePool,j!==null?(G=wt._currentValue,j=j.parent!==G?{parent:G,pool:G}:j):j=dm(),E={baseLanes:E.baseLanes|r,cachePool:j}),c.memoizedState=E,c.childLanes=Kc(e,b,r),t.memoizedState=qc,o):(Ta(t),r=e.child,e=r.sibling,r=Wn(r,{mode:"visible",children:o.children}),r.return=t,r.sibling=null,e!==null&&(b=t.deletions,b===null?(t.deletions=[e],t.flags|=16):b.push(e)),t.child=r,t.memoizedState=null,r)}function Fc(e,t){return t=cs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function cs(e,t){return e=Zt(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function Xc(e,t,r){return sl(t,e.child,null,r),e=Fc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ap(e,t,r){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),dc(e.return,t,r)}function Qc(e,t,r,o,c){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:r,tailMode:c}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=o,d.tail=r,d.tailMode=c)}function Np(e,t,r){var o=t.pendingProps,c=o.revealOrder,d=o.tail;if(jt(e,t,o.children,r),o=Et.current,(o&2)!==0)o=o&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ap(e,r,t);else if(e.tag===19)Ap(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}o&=1}switch(F(Et,o),c){case"forwards":for(r=t.child,c=null;r!==null;)e=r.alternate,e!==null&&is(e)===null&&(c=r),r=r.sibling;r=c,r===null?(c=t.child,t.child=null):(c=r.sibling,r.sibling=null),Qc(t,!1,c,r,d);break;case"backwards":for(r=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&is(e)===null){t.child=c;break}e=c.sibling,c.sibling=r,r=c,c=e}Qc(t,!0,r,null,d);break;case"together":Qc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ia(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),za|=t.lanes,(r&t.childLanes)===0)if(e!==null){if(di(e,t,r,!1),(r&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,r=Wn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Wn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Zc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&qo(e)))}function N1(e,t,r){switch(t.tag){case 3:te(t,t.stateNode.containerInfo),Ra(t,wt,e.memoizedState.cache),ci();break;case 27:case 5:me(t);break;case 4:te(t,t.stateNode.containerInfo);break;case 10:Ra(t,t.type,t.memoizedProps.value);break;case 13:var o=t.memoizedState;if(o!==null)return o.dehydrated!==null?(Ta(t),t.flags|=128,null):(r&t.child.childLanes)!==0?Op(e,t,r):(Ta(t),e=ia(e,t,r),e!==null?e.sibling:null);Ta(t);break;case 19:var c=(e.flags&128)!==0;if(o=(r&t.childLanes)!==0,o||(di(e,t,r,!1),o=(r&t.childLanes)!==0),c){if(o)return Np(e,t,r);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),F(Et,Et.current),o)break;return null;case 22:case 23:return t.lanes=0,Sp(e,t,r);case 24:Ra(t,wt,e.memoizedState.cache)}return ia(e,t,r)}function Tp(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ct=!0;else{if(!Zc(e,r)&&(t.flags&128)===0)return Ct=!1,N1(e,t,r);Ct=(e.flags&131072)!==0}else Ct=!1,Xe&&(t.flags&1048576)!==0&&lm(t,Yo,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var o=t.elementType,c=o._init;if(o=c(o._payload),t.type=o,typeof o=="function")lc(o)?(e=Er(o,e),t.tag=1,t=Rp(null,t,o,e,r)):(t.tag=0,t=Yc(null,t,o,e,r));else{if(o!=null){if(c=o.$$typeof,c===$){t.tag=11,t=yp(null,t,o,e,r);break e}else if(c===X){t.tag=14,t=bp(null,t,o,e,r);break e}}throw t=de(o)||o,Error(i(306,t,""))}}return t;case 0:return Yc(e,t,t.type,t.pendingProps,r);case 1:return o=t.type,c=Er(o,t.pendingProps),Rp(e,t,o,c,r);case 3:e:{if(te(t,t.stateNode.containerInfo),e===null)throw Error(i(387));o=t.pendingProps;var d=t.memoizedState;c=d.element,bc(e,t),bi(t,o,null,r);var b=t.memoizedState;if(o=b.cache,Ra(t,wt,o),o!==d.cache&&hc(t,[wt],r,!0),yi(),o=b.element,d.isDehydrated)if(d={element:o,isDehydrated:!1,cache:b.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=Cp(e,t,o,r);break e}else if(o!==c){c=hn(Error(i(424)),t),fi(c),t=Cp(e,t,o,r);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(ht=Cn(e.firstChild),Ut=t,Xe=!0,vr=null,Dn=!0,r=op(t,null,o,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling}else{if(ci(),o===c){t=ia(e,t,r);break e}jt(e,t,o,r)}t=t.child}return t;case 26:return us(e,t),e===null?(r=Dg(t.type,null,t.pendingProps,null))?t.memoizedState=r:Xe||(r=t.type,e=t.pendingProps,o=Rs(B.current).createElement(r),o[ie]=t,o[ue]=e,_t(o,r,e),Le(o),t.stateNode=o):t.memoizedState=Dg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return me(t),e===null&&Xe&&(o=t.stateNode=jg(t.type,t.pendingProps,B.current),Ut=t,Dn=!0,c=ht,Ha(t.type)?(Mf=c,ht=Cn(o.firstChild)):ht=c),jt(e,t,t.pendingProps.children,r),us(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Xe&&((c=o=ht)&&(o=nS(o,t.type,t.pendingProps,Dn),o!==null?(t.stateNode=o,Ut=t,ht=Cn(o.firstChild),Dn=!1,c=!0):c=!1),c||yr(t)),me(t),c=t.type,d=t.pendingProps,b=e!==null?e.memoizedProps:null,o=d.children,Af(c,d)?o=null:b!==null&&Af(c,b)&&(t.flags|=32),t.memoizedState!==null&&(c=Cc(e,t,x1,null,null,r),$i._currentValue=c),us(e,t),jt(e,t,o,r),t.child;case 6:return e===null&&Xe&&((e=r=ht)&&(r=aS(r,t.pendingProps,Dn),r!==null?(t.stateNode=r,Ut=t,ht=null,e=!0):e=!1),e||yr(t)),null;case 13:return Op(e,t,r);case 4:return te(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=sl(t,null,o,r):jt(e,t,o,r),t.child;case 11:return yp(e,t,t.type,t.pendingProps,r);case 7:return jt(e,t,t.pendingProps,r),t.child;case 8:return jt(e,t,t.pendingProps.children,r),t.child;case 12:return jt(e,t,t.pendingProps.children,r),t.child;case 10:return o=t.pendingProps,Ra(t,t.type,o.value),jt(e,t,o.children,r),t.child;case 9:return c=t.type._context,o=t.pendingProps.children,xr(t),c=Dt(c),o=o(c),t.flags|=1,jt(e,t,o,r),t.child;case 14:return bp(e,t,t.type,t.pendingProps,r);case 15:return xp(e,t,t.type,t.pendingProps,r);case 19:return Np(e,t,r);case 31:return o=t.pendingProps,r=t.mode,o={mode:o.mode,children:o.children},e===null?(r=cs(o,r),r.ref=t.ref,t.child=r,r.return=t,t=r):(r=Wn(e.child,o),r.ref=t.ref,t.child=r,r.return=t,t=r),t;case 22:return Sp(e,t,r);case 24:return xr(t),o=Dt(wt),e===null?(c=gc(),c===null&&(c=at,d=mc(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=r),c=d),t.memoizedState={parent:o,cache:c},yc(t),Ra(t,wt,c)):((e.lanes&r)!==0&&(bc(e,t),bi(t,null,null,r),yi()),c=e.memoizedState,d=t.memoizedState,c.parent!==o?(c={parent:o,cache:o},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Ra(t,wt,o)):(o=d.cache,Ra(t,wt,o),o!==c.cache&&hc(t,[wt],r,!0))),jt(e,t,t.pendingProps.children,r),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function oa(e){e.flags|=4}function jp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Pg(t)){if(t=vn.current,t!==null&&((Ke&4194048)===Ke?Ln!==null:(Ke&62914560)!==Ke&&(Ke&536870912)===0||t!==Ln))throw gi=vc,hm;e.flags|=8192}}function fs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Co():536870912,e.lanes|=t,dl|=t)}function Oi(e,t){if(!Xe)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var o=null;r!==null;)r.alternate!==null&&(o=r),r=r.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function ct(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,o=0;if(t)for(var c=e.child;c!==null;)r|=c.lanes|c.childLanes,o|=c.subtreeFlags&65011712,o|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)r|=c.lanes|c.childLanes,o|=c.subtreeFlags,o|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=o,e.childLanes=r,t}function T1(e,t,r){var o=t.pendingProps;switch(uc(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ct(t),null;case 1:return ct(t),null;case 3:return r=t.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),aa(wt),fe(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ui(t)?oa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,sm())),ct(t),null;case 26:return r=t.memoizedState,e===null?(oa(t),r!==null?(ct(t),jp(t,r)):(ct(t),t.flags&=-16777217)):r?r!==e.memoizedState?(oa(t),ct(t),jp(t,r)):(ct(t),t.flags&=-16777217):(e.memoizedProps!==o&&oa(t),ct(t),t.flags&=-16777217),null;case 27:Ce(t),r=B.current;var c=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==o&&oa(t);else{if(!o){if(t.stateNode===null)throw Error(i(166));return ct(t),null}e=W.current,ui(t)?im(t):(e=jg(c,o,r),t.stateNode=e,oa(t))}return ct(t),null;case 5:if(Ce(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&oa(t);else{if(!o){if(t.stateNode===null)throw Error(i(166));return ct(t),null}if(e=W.current,ui(t))im(t);else{switch(c=Rs(B.current),e){case 1:e=c.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:e=c.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":e=c.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":e=c.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":e=c.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof o.is=="string"?c.createElement("select",{is:o.is}):c.createElement("select"),o.multiple?e.multiple=!0:o.size&&(e.size=o.size);break;default:e=typeof o.is=="string"?c.createElement(r,{is:o.is}):c.createElement(r)}}e[ie]=t,e[ue]=o;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)e.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=e;e:switch(_t(e,r,o),r){case"button":case"input":case"select":case"textarea":e=!!o.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&oa(t)}}return ct(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==o&&oa(t);else{if(typeof o!="string"&&t.stateNode===null)throw Error(i(166));if(e=B.current,ui(t)){if(e=t.stateNode,r=t.memoizedProps,o=null,c=Ut,c!==null)switch(c.tag){case 27:case 5:o=c.memoizedProps}e[ie]=t,e=!!(e.nodeValue===r||o!==null&&o.suppressHydrationWarning===!0||Eg(e.nodeValue,r)),e||yr(t)}else e=Rs(e).createTextNode(o),e[ie]=t,t.stateNode=e}return ct(t),null;case 13:if(o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=ui(t),o!==null&&o.dehydrated!==null){if(e===null){if(!c)throw Error(i(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(i(317));c[ie]=t}else ci(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ct(t),c=!1}else c=sm(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(la(t),t):(la(t),null)}if(la(t),(t.flags&128)!==0)return t.lanes=r,t;if(r=o!==null,e=e!==null&&e.memoizedState!==null,r){o=t.child,c=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(c=o.alternate.memoizedState.cachePool.pool);var d=null;o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),d!==c&&(o.flags|=2048)}return r!==e&&r&&(t.child.flags|=8192),fs(t,t.updateQueue),ct(t),null;case 4:return fe(),e===null&&wf(t.stateNode.containerInfo),ct(t),null;case 10:return aa(t.type),ct(t),null;case 19:if(L(Et),c=t.memoizedState,c===null)return ct(t),null;if(o=(t.flags&128)!==0,d=c.rendering,d===null)if(o)Oi(c,!1);else{if(mt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=is(e),d!==null){for(t.flags|=128,Oi(c,!1),e=d.updateQueue,t.updateQueue=e,fs(t,e),t.subtreeFlags=0,e=r,r=t.child;r!==null;)rm(r,e),r=r.sibling;return F(Et,Et.current&1|2),t.child}e=e.sibling}c.tail!==null&&Ft()>ms&&(t.flags|=128,o=!0,Oi(c,!1),t.lanes=4194304)}else{if(!o)if(e=is(d),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,fs(t,e),Oi(c,!0),c.tail===null&&c.tailMode==="hidden"&&!d.alternate&&!Xe)return ct(t),null}else 2*Ft()-c.renderingStartTime>ms&&r!==536870912&&(t.flags|=128,o=!0,Oi(c,!1),t.lanes=4194304);c.isBackwards?(d.sibling=t.child,t.child=d):(e=c.last,e!==null?e.sibling=d:t.child=d,c.last=d)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=Ft(),t.sibling=null,e=Et.current,F(Et,o?e&1|2:e&1),t):(ct(t),null);case 22:case 23:return la(t),Ec(),o=t.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(t.flags|=8192):o&&(t.flags|=8192),o?(r&536870912)!==0&&(t.flags&128)===0&&(ct(t),t.subtreeFlags&6&&(t.flags|=8192)):ct(t),r=t.updateQueue,r!==null&&fs(t,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),o=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),o!==r&&(t.flags|=2048),e!==null&&L(Sr),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),aa(wt),ct(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function j1(e,t){switch(uc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return aa(wt),fe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ce(t),null;case 13:if(la(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ci()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(Et),null;case 4:return fe(),null;case 10:return aa(t.type),null;case 22:case 23:return la(t),Ec(),e!==null&&L(Sr),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return aa(wt),null;case 25:return null;default:return null}}function Mp(e,t){switch(uc(t),t.tag){case 3:aa(wt),fe();break;case 26:case 27:case 5:Ce(t);break;case 4:fe();break;case 13:la(t);break;case 19:L(Et);break;case 10:aa(t.type);break;case 22:case 23:la(t),Ec(),e!==null&&L(Sr);break;case 24:aa(wt)}}function Ai(e,t){try{var r=t.updateQueue,o=r!==null?r.lastEffect:null;if(o!==null){var c=o.next;r=c;do{if((r.tag&e)===e){o=void 0;var d=r.create,b=r.inst;o=d(),b.destroy=o}r=r.next}while(r!==c)}}catch(E){nt(t,t.return,E)}}function Ma(e,t,r){try{var o=t.updateQueue,c=o!==null?o.lastEffect:null;if(c!==null){var d=c.next;o=d;do{if((o.tag&e)===e){var b=o.inst,E=b.destroy;if(E!==void 0){b.destroy=void 0,c=t;var j=r,G=E;try{G()}catch(ae){nt(c,j,ae)}}}o=o.next}while(o!==d)}}catch(ae){nt(t,t.return,ae)}}function _p(e){var t=e.updateQueue;if(t!==null){var r=e.stateNode;try{bm(t,r)}catch(o){nt(e,e.return,o)}}}function Dp(e,t,r){r.props=Er(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(o){nt(e,t,o)}}function Ni(e,t){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof r=="function"?e.refCleanup=r(o):r.current=o}}catch(c){nt(e,t,c)}}function zn(e,t){var r=e.ref,o=e.refCleanup;if(r!==null)if(typeof o=="function")try{o()}catch(c){nt(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(c){nt(e,t,c)}else r.current=null}function Lp(e){var t=e.type,r=e.memoizedProps,o=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":r.autoFocus&&o.focus();break e;case"img":r.src?o.src=r.src:r.srcSet&&(o.srcset=r.srcSet)}}catch(c){nt(e,e.return,c)}}function Jc(e,t,r){try{var o=e.stateNode;J1(o,e.type,r,t),o[ue]=t}catch(c){nt(e,e.return,c)}}function zp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ha(e.type)||e.tag===4}function Ic(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||zp(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.tag===27&&Ha(e.type)||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 Wc(e,t,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,t):(t=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,t.appendChild(e),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Es));else if(o!==4&&(o===27&&Ha(e.type)&&(r=e.stateNode,t=null),e=e.child,e!==null))for(Wc(e,t,r),e=e.sibling;e!==null;)Wc(e,t,r),e=e.sibling}function ds(e,t,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(o!==4&&(o===27&&Ha(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(ds(e,t,r),e=e.sibling;e!==null;)ds(e,t,r),e=e.sibling}function kp(e){var t=e.stateNode,r=e.memoizedProps;try{for(var o=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);_t(t,o,r),t[ie]=e,t[ue]=r}catch(d){nt(e,e.return,d)}}var sa=!1,vt=!1,ef=!1,Up=typeof WeakSet=="function"?WeakSet:Set,Ot=null;function M1(e,t){if(e=e.containerInfo,Cf=js,e=Xh(e),Iu(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var o=r.getSelection&&r.getSelection();if(o&&o.rangeCount!==0){r=o.anchorNode;var c=o.anchorOffset,d=o.focusNode;o=o.focusOffset;try{r.nodeType,d.nodeType}catch{r=null;break e}var b=0,E=-1,j=-1,G=0,ae=0,le=e,Q=null;t:for(;;){for(var Z;le!==r||c!==0&&le.nodeType!==3||(E=b+c),le!==d||o!==0&&le.nodeType!==3||(j=b+o),le.nodeType===3&&(b+=le.nodeValue.length),(Z=le.firstChild)!==null;)Q=le,le=Z;for(;;){if(le===e)break t;if(Q===r&&++G===c&&(E=b),Q===d&&++ae===o&&(j=b),(Z=le.nextSibling)!==null)break;le=Q,Q=le.parentNode}le=Z}r=E===-1||j===-1?null:{start:E,end:j}}else r=null}r=r||{start:0,end:0}}else r=null;for(Of={focusedElem:e,selectionRange:r},js=!1,Ot=t;Ot!==null;)if(t=Ot,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,Ot=e;else for(;Ot!==null;){switch(t=Ot,d=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,r=t,c=d.memoizedProps,d=d.memoizedState,o=r.stateNode;try{var _e=Er(r.type,c,r.elementType===r.type);e=o.getSnapshotBeforeUpdate(_e,d),o.__reactInternalSnapshotBeforeUpdate=e}catch(je){nt(r,r.return,je)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,r=e.nodeType,r===9)Tf(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Tf(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,Ot=e;break}Ot=t.return}}function Pp(e,t,r){var o=r.flags;switch(r.tag){case 0:case 11:case 15:_a(e,r),o&4&&Ai(5,r);break;case 1:if(_a(e,r),o&4)if(e=r.stateNode,t===null)try{e.componentDidMount()}catch(b){nt(r,r.return,b)}else{var c=Er(r.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(b){nt(r,r.return,b)}}o&64&&_p(r),o&512&&Ni(r,r.return);break;case 3:if(_a(e,r),o&64&&(e=r.updateQueue,e!==null)){if(t=null,r.child!==null)switch(r.child.tag){case 27:case 5:t=r.child.stateNode;break;case 1:t=r.child.stateNode}try{bm(e,t)}catch(b){nt(r,r.return,b)}}break;case 27:t===null&&o&4&&kp(r);case 26:case 5:_a(e,r),t===null&&o&4&&Lp(r),o&512&&Ni(r,r.return);break;case 12:_a(e,r);break;case 13:_a(e,r),o&4&&$p(e,r),o&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=B1.bind(null,r),rS(e,r))));break;case 22:if(o=r.memoizedState!==null||sa,!o){t=t!==null&&t.memoizedState!==null||vt,c=sa;var d=vt;sa=o,(vt=t)&&!d?Da(e,r,(r.subtreeFlags&8772)!==0):_a(e,r),sa=c,vt=d}break;case 30:break;default:_a(e,r)}}function Hp(e){var t=e.alternate;t!==null&&(e.alternate=null,Hp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Re(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ot=null,Vt=!1;function ua(e,t,r){for(r=r.child;r!==null;)Bp(e,t,r),r=r.sibling}function Bp(e,t,r){if(st&&typeof st.onCommitFiberUnmount=="function")try{st.onCommitFiberUnmount(Ht,r)}catch{}switch(r.tag){case 26:vt||zn(r,t),ua(e,t,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:vt||zn(r,t);var o=ot,c=Vt;Ha(r.type)&&(ot=r.stateNode,Vt=!1),ua(e,t,r),Ui(r.stateNode),ot=o,Vt=c;break;case 5:vt||zn(r,t);case 6:if(o=ot,c=Vt,ot=null,ua(e,t,r),ot=o,Vt=c,ot!==null)if(Vt)try{(ot.nodeType===9?ot.body:ot.nodeName==="HTML"?ot.ownerDocument.body:ot).removeChild(r.stateNode)}catch(d){nt(r,t,d)}else try{ot.removeChild(r.stateNode)}catch(d){nt(r,t,d)}break;case 18:ot!==null&&(Vt?(e=ot,Ng(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),Gi(e)):Ng(ot,r.stateNode));break;case 4:o=ot,c=Vt,ot=r.stateNode.containerInfo,Vt=!0,ua(e,t,r),ot=o,Vt=c;break;case 0:case 11:case 14:case 15:vt||Ma(2,r,t),vt||Ma(4,r,t),ua(e,t,r);break;case 1:vt||(zn(r,t),o=r.stateNode,typeof o.componentWillUnmount=="function"&&Dp(r,t,o)),ua(e,t,r);break;case 21:ua(e,t,r);break;case 22:vt=(o=vt)||r.memoizedState!==null,ua(e,t,r),vt=o;break;default:ua(e,t,r)}}function $p(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Gi(e)}catch(r){nt(t,t.return,r)}}function _1(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Up),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Up),t;default:throw Error(i(435,e.tag))}}function tf(e,t){var r=_1(e);t.forEach(function(o){var c=$1.bind(null,e,o);r.has(o)||(r.add(o),o.then(c,c))})}function Jt(e,t){var r=t.deletions;if(r!==null)for(var o=0;o<r.length;o++){var c=r[o],d=e,b=t,E=b;e:for(;E!==null;){switch(E.tag){case 27:if(Ha(E.type)){ot=E.stateNode,Vt=!1;break e}break;case 5:ot=E.stateNode,Vt=!1;break e;case 3:case 4:ot=E.stateNode.containerInfo,Vt=!0;break e}E=E.return}if(ot===null)throw Error(i(160));Bp(d,b,c),ot=null,Vt=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)Vp(t,e),t=t.sibling}var Rn=null;function Vp(e,t){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Jt(t,e),It(e),o&4&&(Ma(3,e,e.return),Ai(3,e),Ma(5,e,e.return));break;case 1:Jt(t,e),It(e),o&512&&(vt||r===null||zn(r,r.return)),o&64&&sa&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?o:r.concat(o))));break;case 26:var c=Rn;if(Jt(t,e),It(e),o&512&&(vt||r===null||zn(r,r.return)),o&4){var d=r!==null?r.memoizedState:null;if(o=e.memoizedState,r===null)if(o===null)if(e.stateNode===null){e:{o=e.type,r=e.memoizedProps,c=c.ownerDocument||c;t:switch(o){case"title":d=c.getElementsByTagName("title")[0],(!d||d[Se]||d[ie]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(o),c.head.insertBefore(d,c.querySelector("head > title"))),_t(d,o,r),d[ie]=e,Le(d),o=d;break e;case"link":var b=kg("link","href",c).get(o+(r.href||""));if(b){for(var E=0;E<b.length;E++)if(d=b[E],d.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&d.getAttribute("rel")===(r.rel==null?null:r.rel)&&d.getAttribute("title")===(r.title==null?null:r.title)&&d.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){b.splice(E,1);break t}}d=c.createElement(o),_t(d,o,r),c.head.appendChild(d);break;case"meta":if(b=kg("meta","content",c).get(o+(r.content||""))){for(E=0;E<b.length;E++)if(d=b[E],d.getAttribute("content")===(r.content==null?null:""+r.content)&&d.getAttribute("name")===(r.name==null?null:r.name)&&d.getAttribute("property")===(r.property==null?null:r.property)&&d.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&d.getAttribute("charset")===(r.charSet==null?null:r.charSet)){b.splice(E,1);break t}}d=c.createElement(o),_t(d,o,r),c.head.appendChild(d);break;default:throw Error(i(468,o))}d[ie]=e,Le(d),o=d}e.stateNode=o}else Ug(c,e.type,e.stateNode);else e.stateNode=zg(c,o,e.memoizedProps);else d!==o?(d===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):d.count--,o===null?Ug(c,e.type,e.stateNode):zg(c,o,e.memoizedProps)):o===null&&e.stateNode!==null&&Jc(e,e.memoizedProps,r.memoizedProps)}break;case 27:Jt(t,e),It(e),o&512&&(vt||r===null||zn(r,r.return)),r!==null&&o&4&&Jc(e,e.memoizedProps,r.memoizedProps);break;case 5:if(Jt(t,e),It(e),o&512&&(vt||r===null||zn(r,r.return)),e.flags&32){c=e.stateNode;try{qr(c,"")}catch(Z){nt(e,e.return,Z)}}o&4&&e.stateNode!=null&&(c=e.memoizedProps,Jc(e,c,r!==null?r.memoizedProps:c)),o&1024&&(ef=!0);break;case 6:if(Jt(t,e),It(e),o&4){if(e.stateNode===null)throw Error(i(162));o=e.memoizedProps,r=e.stateNode;try{r.nodeValue=o}catch(Z){nt(e,e.return,Z)}}break;case 3:if(As=null,c=Rn,Rn=Cs(t.containerInfo),Jt(t,e),Rn=c,It(e),o&4&&r!==null&&r.memoizedState.isDehydrated)try{Gi(t.containerInfo)}catch(Z){nt(e,e.return,Z)}ef&&(ef=!1,Yp(e));break;case 4:o=Rn,Rn=Cs(e.stateNode.containerInfo),Jt(t,e),It(e),Rn=o;break;case 12:Jt(t,e),It(e);break;case 13:Jt(t,e),It(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(sf=Ft()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,tf(e,o)));break;case 22:c=e.memoizedState!==null;var j=r!==null&&r.memoizedState!==null,G=sa,ae=vt;if(sa=G||c,vt=ae||j,Jt(t,e),vt=ae,sa=G,It(e),o&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(r===null||j||sa||vt||Rr(e)),r=null,t=e;;){if(t.tag===5||t.tag===26){if(r===null){j=r=t;try{if(d=j.stateNode,c)b=d.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{E=j.stateNode;var le=j.memoizedProps.style,Q=le!=null&&le.hasOwnProperty("display")?le.display:null;E.style.display=Q==null||typeof Q=="boolean"?"":(""+Q).trim()}}catch(Z){nt(j,j.return,Z)}}}else if(t.tag===6){if(r===null){j=t;try{j.stateNode.nodeValue=c?"":j.memoizedProps}catch(Z){nt(j,j.return,Z)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;r===t&&(r=null),t=t.return}r===t&&(r=null),t.sibling.return=t.return,t=t.sibling}o&4&&(o=e.updateQueue,o!==null&&(r=o.retryQueue,r!==null&&(o.retryQueue=null,tf(e,r))));break;case 19:Jt(t,e),It(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,tf(e,o)));break;case 30:break;case 21:break;default:Jt(t,e),It(e)}}function It(e){var t=e.flags;if(t&2){try{for(var r,o=e.return;o!==null;){if(zp(o)){r=o;break}o=o.return}if(r==null)throw Error(i(160));switch(r.tag){case 27:var c=r.stateNode,d=Ic(e);ds(e,d,c);break;case 5:var b=r.stateNode;r.flags&32&&(qr(b,""),r.flags&=-33);var E=Ic(e);ds(e,E,b);break;case 3:case 4:var j=r.stateNode.containerInfo,G=Ic(e);Wc(e,G,j);break;default:throw Error(i(161))}}catch(ae){nt(e,e.return,ae)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Yp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Yp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function _a(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Pp(e,t.alternate,t),t=t.sibling}function Rr(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ma(4,t,t.return),Rr(t);break;case 1:zn(t,t.return);var r=t.stateNode;typeof r.componentWillUnmount=="function"&&Dp(t,t.return,r),Rr(t);break;case 27:Ui(t.stateNode);case 26:case 5:zn(t,t.return),Rr(t);break;case 22:t.memoizedState===null&&Rr(t);break;case 30:Rr(t);break;default:Rr(t)}e=e.sibling}}function Da(e,t,r){for(r=r&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var o=t.alternate,c=e,d=t,b=d.flags;switch(d.tag){case 0:case 11:case 15:Da(c,d,r),Ai(4,d);break;case 1:if(Da(c,d,r),o=d,c=o.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(G){nt(o,o.return,G)}if(o=d,c=o.updateQueue,c!==null){var E=o.stateNode;try{var j=c.shared.hiddenCallbacks;if(j!==null)for(c.shared.hiddenCallbacks=null,c=0;c<j.length;c++)ym(j[c],E)}catch(G){nt(o,o.return,G)}}r&&b&64&&_p(d),Ni(d,d.return);break;case 27:kp(d);case 26:case 5:Da(c,d,r),r&&o===null&&b&4&&Lp(d),Ni(d,d.return);break;case 12:Da(c,d,r);break;case 13:Da(c,d,r),r&&b&4&&$p(c,d);break;case 22:d.memoizedState===null&&Da(c,d,r),Ni(d,d.return);break;case 30:break;default:Da(c,d,r)}t=t.sibling}}function nf(e,t){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&hi(r))}function af(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&hi(e))}function kn(e,t,r,o){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)qp(e,t,r,o),t=t.sibling}function qp(e,t,r,o){var c=t.flags;switch(t.tag){case 0:case 11:case 15:kn(e,t,r,o),c&2048&&Ai(9,t);break;case 1:kn(e,t,r,o);break;case 3:kn(e,t,r,o),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&hi(e)));break;case 12:if(c&2048){kn(e,t,r,o),e=t.stateNode;try{var d=t.memoizedProps,b=d.id,E=d.onPostCommit;typeof E=="function"&&E(b,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(j){nt(t,t.return,j)}}else kn(e,t,r,o);break;case 13:kn(e,t,r,o);break;case 23:break;case 22:d=t.stateNode,b=t.alternate,t.memoizedState!==null?d._visibility&2?kn(e,t,r,o):Ti(e,t):d._visibility&2?kn(e,t,r,o):(d._visibility|=2,ul(e,t,r,o,(t.subtreeFlags&10256)!==0)),c&2048&&nf(b,t);break;case 24:kn(e,t,r,o),c&2048&&af(t.alternate,t);break;default:kn(e,t,r,o)}}function ul(e,t,r,o,c){for(c=c&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var d=e,b=t,E=r,j=o,G=b.flags;switch(b.tag){case 0:case 11:case 15:ul(d,b,E,j,c),Ai(8,b);break;case 23:break;case 22:var ae=b.stateNode;b.memoizedState!==null?ae._visibility&2?ul(d,b,E,j,c):Ti(d,b):(ae._visibility|=2,ul(d,b,E,j,c)),c&&G&2048&&nf(b.alternate,b);break;case 24:ul(d,b,E,j,c),c&&G&2048&&af(b.alternate,b);break;default:ul(d,b,E,j,c)}t=t.sibling}}function Ti(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var r=e,o=t,c=o.flags;switch(o.tag){case 22:Ti(r,o),c&2048&&nf(o.alternate,o);break;case 24:Ti(r,o),c&2048&&af(o.alternate,o);break;default:Ti(r,o)}t=t.sibling}}var ji=8192;function cl(e){if(e.subtreeFlags&ji)for(e=e.child;e!==null;)Gp(e),e=e.sibling}function Gp(e){switch(e.tag){case 26:cl(e),e.flags&ji&&e.memoizedState!==null&&vS(Rn,e.memoizedState,e.memoizedProps);break;case 5:cl(e);break;case 3:case 4:var t=Rn;Rn=Cs(e.stateNode.containerInfo),cl(e),Rn=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=ji,ji=16777216,cl(e),ji=t):cl(e));break;default:cl(e)}}function Kp(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Mi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var o=t[r];Ot=o,Xp(o,e)}Kp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Fp(e),e=e.sibling}function Fp(e){switch(e.tag){case 0:case 11:case 15:Mi(e),e.flags&2048&&Ma(9,e,e.return);break;case 3:Mi(e);break;case 12:Mi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,hs(e)):Mi(e);break;default:Mi(e)}}function hs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var o=t[r];Ot=o,Xp(o,e)}Kp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ma(8,t,t.return),hs(t);break;case 22:r=t.stateNode,r._visibility&2&&(r._visibility&=-3,hs(t));break;default:hs(t)}e=e.sibling}}function Xp(e,t){for(;Ot!==null;){var r=Ot;switch(r.tag){case 0:case 11:case 15:Ma(8,r,t);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var o=r.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:hi(r.memoizedState.cache)}if(o=r.child,o!==null)o.return=r,Ot=o;else e:for(r=e;Ot!==null;){o=Ot;var c=o.sibling,d=o.return;if(Hp(o),o===r){Ot=null;break e}if(c!==null){c.return=d,Ot=c;break e}Ot=d}}}var D1={getCacheForType:function(e){var t=Dt(wt),r=t.data.get(e);return r===void 0&&(r=e(),t.data.set(e,r)),r}},L1=typeof WeakMap=="function"?WeakMap:Map,Ze=0,at=null,qe=null,Ke=0,Je=0,Wt=null,La=!1,fl=!1,rf=!1,ca=0,mt=0,za=0,Cr=0,lf=0,yn=0,dl=0,_i=null,Yt=null,of=!1,sf=0,ms=1/0,ps=null,ka=null,Mt=0,Ua=null,hl=null,ml=0,uf=0,cf=null,Qp=null,Di=0,ff=null;function en(){if((Ze&2)!==0&&Ke!==0)return Ke&-Ke;if(_.T!==null){var e=tl;return e!==0?e:yf()}return M()}function Zp(){yn===0&&(yn=(Ke&536870912)===0||Xe?Br():536870912);var e=vn.current;return e!==null&&(e.flags|=32),yn}function tn(e,t,r){(e===at&&(Je===2||Je===9)||e.cancelPendingCommit!==null)&&(pl(e,0),Pa(e,Ke,yn,!1)),or(e,r),((Ze&2)===0||e!==at)&&(e===at&&((Ze&2)===0&&(Cr|=r),mt===4&&Pa(e,Ke,yn,!1)),Un(e))}function Jp(e,t,r){if((Ze&6)!==0)throw Error(i(327));var o=!r&&(t&124)===0&&(t&e.expiredLanes)===0||Mn(e,t),c=o?U1(e,t):mf(e,t,!0),d=o;do{if(c===0){fl&&!o&&Pa(e,t,0,!1);break}else{if(r=e.current.alternate,d&&!z1(r)){c=mf(e,t,!1),d=!1;continue}if(c===2){if(d=t,e.errorRecoveryDisabledLanes&d)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){t=b;e:{var E=e;c=_i;var j=E.current.memoizedState.isDehydrated;if(j&&(pl(E,b).flags|=256),b=mf(E,b,!1),b!==2){if(rf&&!j){E.errorRecoveryDisabledLanes|=d,Cr|=d,c=4;break e}d=Yt,Yt=c,d!==null&&(Yt===null?Yt=d:Yt.push.apply(Yt,d))}c=b}if(d=!1,c!==2)continue}}if(c===1){pl(e,0),Pa(e,t,0,!0);break}e:{switch(o=e,d=c,d){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Pa(o,t,yn,!La);break e;case 2:Yt=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(c=sf+300-Ft(),10<c)){if(Pa(o,t,yn,!La),ir(o,0,!0)!==0)break e;o.timeoutHandle=Og(Ip.bind(null,o,r,Yt,ps,of,t,yn,Cr,dl,La,d,2,-0,0),c);break e}Ip(o,r,Yt,ps,of,t,yn,Cr,dl,La,d,0,-0,0)}}break}while(!0);Un(e)}function Ip(e,t,r,o,c,d,b,E,j,G,ae,le,Q,Z){if(e.timeoutHandle=-1,le=t.subtreeFlags,(le&8192||(le&16785408)===16785408)&&(Bi={stylesheets:null,count:0,unsuspend:gS},Gp(t),le=yS(),le!==null)){e.cancelPendingCommit=le(lg.bind(null,e,t,d,r,o,c,b,E,j,ae,1,Q,Z)),Pa(e,d,b,!G);return}lg(e,t,d,r,o,c,b,E,j)}function z1(e){for(var t=e;;){var r=t.tag;if((r===0||r===11||r===15)&&t.flags&16384&&(r=t.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var o=0;o<r.length;o++){var c=r[o],d=c.getSnapshot;c=c.value;try{if(!Qt(d(),c))return!1}catch{return!1}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Pa(e,t,r,o){t&=~lf,t&=~Cr,e.suspendedLanes|=t,e.pingedLanes&=~t,o&&(e.warmLanes|=t),o=e.expirationTimes;for(var c=t;0<c;){var d=31-Tt(c),b=1<<d;o[d]=-1,c&=~b}r!==0&&sr(e,r,t)}function gs(){return(Ze&6)===0?(Li(0),!1):!0}function df(){if(qe!==null){if(Je===0)var e=qe.return;else e=qe,na=br=null,Nc(e),ol=null,Ri=0,e=qe;for(;e!==null;)Mp(e.alternate,e),e=e.return;qe=null}}function pl(e,t){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,W1(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),df(),at=e,qe=r=Wn(e.current,null),Ke=t,Je=0,Wt=null,La=!1,fl=Mn(e,t),rf=!1,dl=yn=lf=Cr=za=mt=0,Yt=_i=null,of=!1,(t&8)!==0&&(t|=t&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=t;0<o;){var c=31-Tt(o),d=1<<c;t|=e[c],o&=~d}return ca=t,Po(),r}function Wp(e,t){Pe=null,_.H=as,t===pi||t===Fo?(t=gm(),Je=3):t===hm?(t=gm(),Je=4):Je=t===vp?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Wt=t,qe===null&&(mt=1,ss(e,hn(t,e.current)))}function eg(){var e=_.H;return _.H=as,e===null?as:e}function tg(){var e=_.A;return _.A=D1,e}function hf(){mt=4,La||(Ke&4194048)!==Ke&&vn.current!==null||(fl=!0),(za&134217727)===0&&(Cr&134217727)===0||at===null||Pa(at,Ke,yn,!1)}function mf(e,t,r){var o=Ze;Ze|=2;var c=eg(),d=tg();(at!==e||Ke!==t)&&(ps=null,pl(e,t)),t=!1;var b=mt;e:do try{if(Je!==0&&qe!==null){var E=qe,j=Wt;switch(Je){case 8:df(),b=6;break e;case 3:case 2:case 9:case 6:vn.current===null&&(t=!0);var G=Je;if(Je=0,Wt=null,gl(e,E,j,G),r&&fl){b=0;break e}break;default:G=Je,Je=0,Wt=null,gl(e,E,j,G)}}k1(),b=mt;break}catch(ae){Wp(e,ae)}while(!0);return t&&e.shellSuspendCounter++,na=br=null,Ze=o,_.H=c,_.A=d,qe===null&&(at=null,Ke=0,Po()),b}function k1(){for(;qe!==null;)ng(qe)}function U1(e,t){var r=Ze;Ze|=2;var o=eg(),c=tg();at!==e||Ke!==t?(ps=null,ms=Ft()+500,pl(e,t)):fl=Mn(e,t);e:do try{if(Je!==0&&qe!==null){t=qe;var d=Wt;t:switch(Je){case 1:Je=0,Wt=null,gl(e,t,d,1);break;case 2:case 9:if(mm(d)){Je=0,Wt=null,ag(t);break}t=function(){Je!==2&&Je!==9||at!==e||(Je=7),Un(e)},d.then(t,t);break e;case 3:Je=7;break e;case 4:Je=5;break e;case 7:mm(d)?(Je=0,Wt=null,ag(t)):(Je=0,Wt=null,gl(e,t,d,7));break;case 5:var b=null;switch(qe.tag){case 26:b=qe.memoizedState;case 5:case 27:var E=qe;if(!b||Pg(b)){Je=0,Wt=null;var j=E.sibling;if(j!==null)qe=j;else{var G=E.return;G!==null?(qe=G,vs(G)):qe=null}break t}}Je=0,Wt=null,gl(e,t,d,5);break;case 6:Je=0,Wt=null,gl(e,t,d,6);break;case 8:df(),mt=6;break e;default:throw Error(i(462))}}P1();break}catch(ae){Wp(e,ae)}while(!0);return na=br=null,_.H=o,_.A=c,Ze=r,qe!==null?0:(at=null,Ke=0,Po(),mt)}function P1(){for(;qe!==null&&!Du();)ng(qe)}function ng(e){var t=Tp(e.alternate,e,ca);e.memoizedProps=e.pendingProps,t===null?vs(e):qe=t}function ag(e){var t=e,r=t.alternate;switch(t.tag){case 15:case 0:t=Ep(r,t,t.pendingProps,t.type,void 0,Ke);break;case 11:t=Ep(r,t,t.pendingProps,t.type.render,t.ref,Ke);break;case 5:Nc(t);default:Mp(r,t),t=qe=rm(t,ca),t=Tp(r,t,ca)}e.memoizedProps=e.pendingProps,t===null?vs(e):qe=t}function gl(e,t,r,o){na=br=null,Nc(t),ol=null,Ri=0;var c=t.return;try{if(A1(e,c,t,r,Ke)){mt=1,ss(e,hn(r,e.current)),qe=null;return}}catch(d){if(c!==null)throw qe=c,d;mt=1,ss(e,hn(r,e.current)),qe=null;return}t.flags&32768?(Xe||o===1?e=!0:fl||(Ke&536870912)!==0?e=!1:(La=e=!0,(o===2||o===9||o===3||o===6)&&(o=vn.current,o!==null&&o.tag===13&&(o.flags|=16384))),rg(t,e)):vs(t)}function vs(e){var t=e;do{if((t.flags&32768)!==0){rg(t,La);return}e=t.return;var r=T1(t.alternate,t,ca);if(r!==null){qe=r;return}if(t=t.sibling,t!==null){qe=t;return}qe=t=e}while(t!==null);mt===0&&(mt=5)}function rg(e,t){do{var r=j1(e.alternate,e);if(r!==null){r.flags&=32767,qe=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!t&&(e=e.sibling,e!==null)){qe=e;return}qe=e=r}while(e!==null);mt=6,qe=null}function lg(e,t,r,o,c,d,b,E,j){e.cancelPendingCommit=null;do ys();while(Mt!==0);if((Ze&6)!==0)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(d=t.lanes|t.childLanes,d|=ac,Oo(e,r,d,b,E,j),e===at&&(qe=at=null,Ke=0),hl=t,Ua=e,ml=r,uf=d,cf=c,Qp=o,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,V1(Hr,function(){return cg(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||o){o=_.T,_.T=null,c=ee.p,ee.p=2,b=Ze,Ze|=4;try{M1(e,t,r)}finally{Ze=b,ee.p=c,_.T=o}}Mt=1,ig(),og(),sg()}}function ig(){if(Mt===1){Mt=0;var e=Ua,t=hl,r=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||r){r=_.T,_.T=null;var o=ee.p;ee.p=2;var c=Ze;Ze|=4;try{Vp(t,e);var d=Of,b=Xh(e.containerInfo),E=d.focusedElem,j=d.selectionRange;if(b!==E&&E&&E.ownerDocument&&Fh(E.ownerDocument.documentElement,E)){if(j!==null&&Iu(E)){var G=j.start,ae=j.end;if(ae===void 0&&(ae=G),"selectionStart"in E)E.selectionStart=G,E.selectionEnd=Math.min(ae,E.value.length);else{var le=E.ownerDocument||document,Q=le&&le.defaultView||window;if(Q.getSelection){var Z=Q.getSelection(),_e=E.textContent.length,je=Math.min(j.start,_e),tt=j.end===void 0?je:Math.min(j.end,_e);!Z.extend&&je>tt&&(b=tt,tt=je,je=b);var H=Kh(E,je),D=Kh(E,tt);if(H&&D&&(Z.rangeCount!==1||Z.anchorNode!==H.node||Z.anchorOffset!==H.offset||Z.focusNode!==D.node||Z.focusOffset!==D.offset)){var Y=le.createRange();Y.setStart(H.node,H.offset),Z.removeAllRanges(),je>tt?(Z.addRange(Y),Z.extend(D.node,D.offset)):(Y.setEnd(D.node,D.offset),Z.addRange(Y))}}}}for(le=[],Z=E;Z=Z.parentNode;)Z.nodeType===1&&le.push({element:Z,left:Z.scrollLeft,top:Z.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<le.length;E++){var re=le[E];re.element.scrollLeft=re.left,re.element.scrollTop=re.top}}js=!!Cf,Of=Cf=null}finally{Ze=c,ee.p=o,_.T=r}}e.current=t,Mt=2}}function og(){if(Mt===2){Mt=0;var e=Ua,t=hl,r=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||r){r=_.T,_.T=null;var o=ee.p;ee.p=2;var c=Ze;Ze|=4;try{Pp(e,t.alternate,t)}finally{Ze=c,ee.p=o,_.T=r}}Mt=3}}function sg(){if(Mt===4||Mt===3){Mt=0,Lu();var e=Ua,t=hl,r=ml,o=Qp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Mt=5:(Mt=0,hl=Ua=null,ug(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(ka=null),Wl(r),t=t.stateNode,st&&typeof st.onCommitFiberRoot=="function")try{st.onCommitFiberRoot(Ht,t,void 0,(t.current.flags&128)===128)}catch{}if(o!==null){t=_.T,c=ee.p,ee.p=2,_.T=null;try{for(var d=e.onRecoverableError,b=0;b<o.length;b++){var E=o[b];d(E.value,{componentStack:E.stack})}}finally{_.T=t,ee.p=c}}(ml&3)!==0&&ys(),Un(e),c=e.pendingLanes,(r&4194090)!==0&&(c&42)!==0?e===ff?Di++:(Di=0,ff=e):Di=0,Li(0)}}function ug(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,hi(t)))}function ys(e){return ig(),og(),sg(),cg()}function cg(){if(Mt!==5)return!1;var e=Ua,t=uf;uf=0;var r=Wl(ml),o=_.T,c=ee.p;try{ee.p=32>r?32:r,_.T=null,r=cf,cf=null;var d=Ua,b=ml;if(Mt=0,hl=Ua=null,ml=0,(Ze&6)!==0)throw Error(i(331));var E=Ze;if(Ze|=4,Fp(d.current),qp(d,d.current,b,r),Ze=E,Li(0,!1),st&&typeof st.onPostCommitFiberRoot=="function")try{st.onPostCommitFiberRoot(Ht,d)}catch{}return!0}finally{ee.p=c,_.T=o,ug(e,t)}}function fg(e,t,r){t=hn(r,t),t=Vc(e.stateNode,t,2),e=Aa(e,t,2),e!==null&&(or(e,2),Un(e))}function nt(e,t,r){if(e.tag===3)fg(e,e,r);else for(;t!==null;){if(t.tag===3){fg(t,e,r);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(ka===null||!ka.has(o))){e=hn(r,e),r=pp(2),o=Aa(t,r,2),o!==null&&(gp(r,o,t,e),or(o,2),Un(o));break}}t=t.return}}function pf(e,t,r){var o=e.pingCache;if(o===null){o=e.pingCache=new L1;var c=new Set;o.set(t,c)}else c=o.get(t),c===void 0&&(c=new Set,o.set(t,c));c.has(r)||(rf=!0,c.add(r),e=H1.bind(null,e,t,r),t.then(e,e))}function H1(e,t,r){var o=e.pingCache;o!==null&&o.delete(t),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,at===e&&(Ke&r)===r&&(mt===4||mt===3&&(Ke&62914560)===Ke&&300>Ft()-sf?(Ze&2)===0&&pl(e,0):lf|=r,dl===Ke&&(dl=0)),Un(e)}function dg(e,t){t===0&&(t=Co()),e=Jr(e,t),e!==null&&(or(e,t),Un(e))}function B1(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),dg(e,r)}function $1(e,t){var r=0;switch(e.tag){case 13:var o=e.stateNode,c=e.memoizedState;c!==null&&(r=c.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(i(314))}o!==null&&o.delete(t),dg(e,r)}function V1(e,t){return Nt(e,t)}var bs=null,vl=null,gf=!1,xs=!1,vf=!1,Or=0;function Un(e){e!==vl&&e.next===null&&(vl===null?bs=vl=e:vl=vl.next=e),xs=!0,gf||(gf=!0,q1())}function Li(e,t){if(!vf&&xs){vf=!0;do for(var r=!1,o=bs;o!==null;){if(e!==0){var c=o.pendingLanes;if(c===0)var d=0;else{var b=o.suspendedLanes,E=o.pingedLanes;d=(1<<31-Tt(42|e)+1)-1,d&=c&~(b&~E),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(r=!0,gg(o,d))}else d=Ke,d=ir(o,o===at?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(d&3)===0||Mn(o,d)||(r=!0,gg(o,d));o=o.next}while(r);vf=!1}}function Y1(){hg()}function hg(){xs=gf=!1;var e=0;Or!==0&&(I1()&&(e=Or),Or=0);for(var t=Ft(),r=null,o=bs;o!==null;){var c=o.next,d=mg(o,t);d===0?(o.next=null,r===null?bs=c:r.next=c,c===null&&(vl=r)):(r=o,(e!==0||(d&3)!==0)&&(xs=!0)),o=c}Li(e)}function mg(e,t){for(var r=e.suspendedLanes,o=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var b=31-Tt(d),E=1<<b,j=c[b];j===-1?((E&r)===0||(E&o)!==0)&&(c[b]=Ro(E,t)):j<=t&&(e.expiredLanes|=E),d&=~E}if(t=at,r=Ke,r=ir(e,e===t?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,r===0||e===t&&(Je===2||Je===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&Kt(o),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||Mn(e,r)){if(t=r&-r,t===e.callbackPriority)return t;switch(o!==null&&Kt(o),Wl(r)){case 2:case 8:r=So;break;case 32:r=Hr;break;case 268435456:r=xa;break;default:r=Hr}return o=pg.bind(null,e),r=Nt(r,o),e.callbackPriority=t,e.callbackNode=r,t}return o!==null&&o!==null&&Kt(o),e.callbackPriority=2,e.callbackNode=null,2}function pg(e,t){if(Mt!==0&&Mt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(ys()&&e.callbackNode!==r)return null;var o=Ke;return o=ir(e,e===at?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(Jp(e,o,t),mg(e,Ft()),e.callbackNode!=null&&e.callbackNode===r?pg.bind(null,e):null)}function gg(e,t){if(ys())return null;Jp(e,t,!0)}function q1(){eS(function(){(Ze&6)!==0?Nt(xo,Y1):hg()})}function yf(){return Or===0&&(Or=Br()),Or}function vg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Mo(""+e)}function yg(e,t){var r=t.ownerDocument.createElement("input");return r.name=t.name,r.value=t.value,e.id&&r.setAttribute("form",e.id),t.parentNode.insertBefore(r,t),e=new FormData(e),r.parentNode.removeChild(r),e}function G1(e,t,r,o,c){if(t==="submit"&&r&&r.stateNode===c){var d=vg((c[ue]||null).action),b=o.submitter;b&&(t=(t=b[ue]||null)?vg(t.formAction):b.getAttribute("formAction"),t!==null&&(d=t,b=null));var E=new zo("action","action",null,o,c);e.push({event:E,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Or!==0){var j=b?yg(c,b):new FormData(c);Uc(r,{pending:!0,data:j,method:c.method,action:d},null,j)}}else typeof d=="function"&&(E.preventDefault(),j=b?yg(c,b):new FormData(c),Uc(r,{pending:!0,data:j,method:c.method,action:d},d,j))},currentTarget:c}]})}}for(var bf=0;bf<nc.length;bf++){var xf=nc[bf],K1=xf.toLowerCase(),F1=xf[0].toUpperCase()+xf.slice(1);En(K1,"on"+F1)}En(Jh,"onAnimationEnd"),En(Ih,"onAnimationIteration"),En(Wh,"onAnimationStart"),En("dblclick","onDoubleClick"),En("focusin","onFocus"),En("focusout","onBlur"),En(c1,"onTransitionRun"),En(f1,"onTransitionStart"),En(d1,"onTransitionCancel"),En(em,"onTransitionEnd"),kt("onMouseEnter",["mouseout","mouseover"]),kt("onMouseLeave",["mouseout","mouseover"]),kt("onPointerEnter",["pointerout","pointerover"]),kt("onPointerLeave",["pointerout","pointerover"]),Xt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Xt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Xt("onBeforeInput",["compositionend","keypress","textInput","paste"]),Xt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Xt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Xt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),X1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(zi));function bg(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var o=e[r],c=o.event;o=o.listeners;e:{var d=void 0;if(t)for(var b=o.length-1;0<=b;b--){var E=o[b],j=E.instance,G=E.currentTarget;if(E=E.listener,j!==d&&c.isPropagationStopped())break e;d=E,c.currentTarget=G;try{d(c)}catch(ae){os(ae)}c.currentTarget=null,d=j}else for(b=0;b<o.length;b++){if(E=o[b],j=E.instance,G=E.currentTarget,E=E.listener,j!==d&&c.isPropagationStopped())break e;d=E,c.currentTarget=G;try{d(c)}catch(ae){os(ae)}c.currentTarget=null,d=j}}}}function Ge(e,t){var r=t[Ee];r===void 0&&(r=t[Ee]=new Set);var o=e+"__bubble";r.has(o)||(xg(t,e,2,!1),r.add(o))}function Sf(e,t,r){var o=0;t&&(o|=4),xg(r,e,o,t)}var Ss="_reactListening"+Math.random().toString(36).slice(2);function wf(e){if(!e[Ss]){e[Ss]=!0,Ie.forEach(function(r){r!=="selectionchange"&&(X1.has(r)||Sf(r,!1,e),Sf(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ss]||(t[Ss]=!0,Sf("selectionchange",!1,t))}}function xg(e,t,r,o){switch(qg(t)){case 2:var c=SS;break;case 8:c=wS;break;default:c=kf}r=c.bind(null,t,r,e),c=void 0,!Yu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),o?c!==void 0?e.addEventListener(t,r,{capture:!0,passive:c}):e.addEventListener(t,r,!0):c!==void 0?e.addEventListener(t,r,{passive:c}):e.addEventListener(t,r,!1)}function Ef(e,t,r,o,c){var d=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var b=o.tag;if(b===3||b===4){var E=o.stateNode.containerInfo;if(E===c)break;if(b===4)for(b=o.return;b!==null;){var j=b.tag;if((j===3||j===4)&&b.stateNode.containerInfo===c)return;b=b.return}for(;E!==null;){if(b=Ue(E),b===null)return;if(j=b.tag,j===5||j===6||j===26||j===27){o=d=b;continue e}E=E.parentNode}}o=o.return}Ah(function(){var G=d,ae=$u(r),le=[];e:{var Q=tm.get(e);if(Q!==void 0){var Z=zo,_e=e;switch(e){case"keypress":if(Do(r)===0)break e;case"keydown":case"keyup":Z=Vx;break;case"focusin":_e="focus",Z=Fu;break;case"focusout":_e="blur",Z=Fu;break;case"beforeblur":case"afterblur":Z=Fu;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Z=jh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=jx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=Gx;break;case Jh:case Ih:case Wh:Z=Dx;break;case em:Z=Fx;break;case"scroll":case"scrollend":Z=Nx;break;case"wheel":Z=Qx;break;case"copy":case"cut":case"paste":Z=zx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=_h;break;case"toggle":case"beforetoggle":Z=Jx}var je=(t&4)!==0,tt=!je&&(e==="scroll"||e==="scrollend"),H=je?Q!==null?Q+"Capture":null:Q;je=[];for(var D=G,Y;D!==null;){var re=D;if(Y=re.stateNode,re=re.tag,re!==5&&re!==26&&re!==27||Y===null||H===null||(re=ei(D,H),re!=null&&je.push(ki(D,re,Y))),tt)break;D=D.return}0<je.length&&(Q=new Z(Q,_e,null,r,ae),le.push({event:Q,listeners:je}))}}if((t&7)===0){e:{if(Q=e==="mouseover"||e==="pointerover",Z=e==="mouseout"||e==="pointerout",Q&&r!==Bu&&(_e=r.relatedTarget||r.fromElement)&&(Ue(_e)||_e[be]))break e;if((Z||Q)&&(Q=ae.window===ae?ae:(Q=ae.ownerDocument)?Q.defaultView||Q.parentWindow:window,Z?(_e=r.relatedTarget||r.toElement,Z=G,_e=_e?Ue(_e):null,_e!==null&&(tt=u(_e),je=_e.tag,_e!==tt||je!==5&&je!==27&&je!==6)&&(_e=null)):(Z=null,_e=G),Z!==_e)){if(je=jh,re="onMouseLeave",H="onMouseEnter",D="mouse",(e==="pointerout"||e==="pointerover")&&(je=_h,re="onPointerLeave",H="onPointerEnter",D="pointer"),tt=Z==null?Q:ft(Z),Y=_e==null?Q:ft(_e),Q=new je(re,D+"leave",Z,r,ae),Q.target=tt,Q.relatedTarget=Y,re=null,Ue(ae)===G&&(je=new je(H,D+"enter",_e,r,ae),je.target=Y,je.relatedTarget=tt,re=je),tt=re,Z&&_e)t:{for(je=Z,H=_e,D=0,Y=je;Y;Y=yl(Y))D++;for(Y=0,re=H;re;re=yl(re))Y++;for(;0<D-Y;)je=yl(je),D--;for(;0<Y-D;)H=yl(H),Y--;for(;D--;){if(je===H||H!==null&&je===H.alternate)break t;je=yl(je),H=yl(H)}je=null}else je=null;Z!==null&&Sg(le,Q,Z,je,!1),_e!==null&&tt!==null&&Sg(le,tt,_e,je,!0)}}e:{if(Q=G?ft(G):window,Z=Q.nodeName&&Q.nodeName.toLowerCase(),Z==="select"||Z==="input"&&Q.type==="file")var ge=Bh;else if(Ph(Q))if($h)ge=o1;else{ge=l1;var $e=r1}else Z=Q.nodeName,!Z||Z.toLowerCase()!=="input"||Q.type!=="checkbox"&&Q.type!=="radio"?G&&Hu(G.elementType)&&(ge=Bh):ge=i1;if(ge&&(ge=ge(e,G))){Hh(le,ge,r,ae);break e}$e&&$e(e,Q,G),e==="focusout"&&G&&Q.type==="number"&&G.memoizedProps.value!=null&&Pu(Q,"number",Q.value)}switch($e=G?ft(G):window,e){case"focusin":(Ph($e)||$e.contentEditable==="true")&&(Xr=$e,Wu=G,si=null);break;case"focusout":si=Wu=Xr=null;break;case"mousedown":ec=!0;break;case"contextmenu":case"mouseup":case"dragend":ec=!1,Qh(le,r,ae);break;case"selectionchange":if(u1)break;case"keydown":case"keyup":Qh(le,r,ae)}var Oe;if(Qu)e:{switch(e){case"compositionstart":var Me="onCompositionStart";break e;case"compositionend":Me="onCompositionEnd";break e;case"compositionupdate":Me="onCompositionUpdate";break e}Me=void 0}else Fr?kh(e,r)&&(Me="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(Me="onCompositionStart");Me&&(Dh&&r.locale!=="ko"&&(Fr||Me!=="onCompositionStart"?Me==="onCompositionEnd"&&Fr&&(Oe=Nh()):(Ea=ae,qu="value"in Ea?Ea.value:Ea.textContent,Fr=!0)),$e=ws(G,Me),0<$e.length&&(Me=new Mh(Me,e,null,r,ae),le.push({event:Me,listeners:$e}),Oe?Me.data=Oe:(Oe=Uh(r),Oe!==null&&(Me.data=Oe)))),(Oe=Wx?e1(e,r):t1(e,r))&&(Me=ws(G,"onBeforeInput"),0<Me.length&&($e=new Mh("onBeforeInput","beforeinput",null,r,ae),le.push({event:$e,listeners:Me}),$e.data=Oe)),G1(le,e,G,r,ae)}bg(le,t)})}function ki(e,t,r){return{instance:e,listener:t,currentTarget:r}}function ws(e,t){for(var r=t+"Capture",o=[];e!==null;){var c=e,d=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||d===null||(c=ei(e,r),c!=null&&o.unshift(ki(e,c,d)),c=ei(e,t),c!=null&&o.push(ki(e,c,d))),e.tag===3)return o;e=e.return}return[]}function yl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Sg(e,t,r,o,c){for(var d=t._reactName,b=[];r!==null&&r!==o;){var E=r,j=E.alternate,G=E.stateNode;if(E=E.tag,j!==null&&j===o)break;E!==5&&E!==26&&E!==27||G===null||(j=G,c?(G=ei(r,d),G!=null&&b.unshift(ki(r,G,j))):c||(G=ei(r,d),G!=null&&b.push(ki(r,G,j)))),r=r.return}b.length!==0&&e.push({event:t,listeners:b})}var Q1=/\r\n?/g,Z1=/\u0000|\uFFFD/g;function wg(e){return(typeof e=="string"?e:""+e).replace(Q1,`
55
+ `).replace(Z1,"")}function Eg(e,t){return t=wg(t),wg(e)===t}function Es(){}function et(e,t,r,o,c,d){switch(r){case"children":typeof o=="string"?t==="body"||t==="textarea"&&o===""||qr(e,o):(typeof o=="number"||typeof o=="bigint")&&t!=="body"&&qr(e,""+o);break;case"className":Jn(e,"class",o);break;case"tabIndex":Jn(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":Jn(e,r,o);break;case"style":Ch(e,o,d);break;case"data":if(t!=="object"){Jn(e,"data",o);break}case"src":case"href":if(o===""&&(t!=="a"||r!=="href")){e.removeAttribute(r);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(r);break}o=Mo(""+o),e.setAttribute(r,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(r,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(r==="formAction"?(t!=="input"&&et(e,t,"name",c.name,c,null),et(e,t,"formEncType",c.formEncType,c,null),et(e,t,"formMethod",c.formMethod,c,null),et(e,t,"formTarget",c.formTarget,c,null)):(et(e,t,"encType",c.encType,c,null),et(e,t,"method",c.method,c,null),et(e,t,"target",c.target,c,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(r);break}o=Mo(""+o),e.setAttribute(r,o);break;case"onClick":o!=null&&(e.onclick=Es);break;case"onScroll":o!=null&&Ge("scroll",e);break;case"onScrollEnd":o!=null&&Ge("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(r=o.__html,r!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=r}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}r=Mo(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(r,""+o):e.removeAttribute(r);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":o===!0?e.setAttribute(r,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(r,o):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(r,o):e.removeAttribute(r);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(r):e.setAttribute(r,o);break;case"popover":Ge("beforetoggle",e),Ge("toggle",e),Zn(e,"popover",o);break;case"xlinkActuate":Be(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Be(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Be(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Be(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Be(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Be(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Be(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Be(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Be(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Zn(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=Ox.get(r)||r,Zn(e,r,o))}}function Rf(e,t,r,o,c,d){switch(r){case"style":Ch(e,o,d);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(r=o.__html,r!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=r}}break;case"children":typeof o=="string"?qr(e,o):(typeof o=="number"||typeof o=="bigint")&&qr(e,""+o);break;case"onScroll":o!=null&&Ge("scroll",e);break;case"onScrollEnd":o!=null&&Ge("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Es);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!_n.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(c=r.endsWith("Capture"),t=r.slice(2,c?r.length-7:void 0),d=e[ue]||null,d=d!=null?d[r]:null,typeof d=="function"&&e.removeEventListener(t,d,c),typeof o=="function")){typeof d!="function"&&d!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(t,o,c);break e}r in e?e[r]=o:o===!0?e.setAttribute(r,""):Zn(e,r,o)}}}function _t(e,t,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ge("error",e),Ge("load",e);var o=!1,c=!1,d;for(d in r)if(r.hasOwnProperty(d)){var b=r[d];if(b!=null)switch(d){case"src":o=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:et(e,t,d,b,r,null)}}c&&et(e,t,"srcSet",r.srcSet,r,null),o&&et(e,t,"src",r.src,r,null);return;case"input":Ge("invalid",e);var E=d=b=c=null,j=null,G=null;for(o in r)if(r.hasOwnProperty(o)){var ae=r[o];if(ae!=null)switch(o){case"name":c=ae;break;case"type":b=ae;break;case"checked":j=ae;break;case"defaultChecked":G=ae;break;case"value":d=ae;break;case"defaultValue":E=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(i(137,t));break;default:et(e,t,o,ae,r,null)}}Sh(e,d,E,j,G,b,c,!1),To(e);return;case"select":Ge("invalid",e),o=b=d=null;for(c in r)if(r.hasOwnProperty(c)&&(E=r[c],E!=null))switch(c){case"value":d=E;break;case"defaultValue":b=E;break;case"multiple":o=E;default:et(e,t,c,E,r,null)}t=d,r=b,e.multiple=!!o,t!=null?Yr(e,!!o,t,!1):r!=null&&Yr(e,!!o,r,!0);return;case"textarea":Ge("invalid",e),d=c=o=null;for(b in r)if(r.hasOwnProperty(b)&&(E=r[b],E!=null))switch(b){case"value":o=E;break;case"defaultValue":c=E;break;case"children":d=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(i(91));break;default:et(e,t,b,E,r,null)}Eh(e,o,c,d),To(e);return;case"option":for(j in r)if(r.hasOwnProperty(j)&&(o=r[j],o!=null))switch(j){case"selected":e.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:et(e,t,j,o,r,null)}return;case"dialog":Ge("beforetoggle",e),Ge("toggle",e),Ge("cancel",e),Ge("close",e);break;case"iframe":case"object":Ge("load",e);break;case"video":case"audio":for(o=0;o<zi.length;o++)Ge(zi[o],e);break;case"image":Ge("error",e),Ge("load",e);break;case"details":Ge("toggle",e);break;case"embed":case"source":case"link":Ge("error",e),Ge("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(G in r)if(r.hasOwnProperty(G)&&(o=r[G],o!=null))switch(G){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:et(e,t,G,o,r,null)}return;default:if(Hu(t)){for(ae in r)r.hasOwnProperty(ae)&&(o=r[ae],o!==void 0&&Rf(e,t,ae,o,r,void 0));return}}for(E in r)r.hasOwnProperty(E)&&(o=r[E],o!=null&&et(e,t,E,o,r,null))}function J1(e,t,r,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,d=null,b=null,E=null,j=null,G=null,ae=null;for(Z in r){var le=r[Z];if(r.hasOwnProperty(Z)&&le!=null)switch(Z){case"checked":break;case"value":break;case"defaultValue":j=le;default:o.hasOwnProperty(Z)||et(e,t,Z,null,o,le)}}for(var Q in o){var Z=o[Q];if(le=r[Q],o.hasOwnProperty(Q)&&(Z!=null||le!=null))switch(Q){case"type":d=Z;break;case"name":c=Z;break;case"checked":G=Z;break;case"defaultChecked":ae=Z;break;case"value":b=Z;break;case"defaultValue":E=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(i(137,t));break;default:Z!==le&&et(e,t,Q,Z,o,le)}}Uu(e,b,E,j,G,ae,d,c);return;case"select":Z=b=E=Q=null;for(d in r)if(j=r[d],r.hasOwnProperty(d)&&j!=null)switch(d){case"value":break;case"multiple":Z=j;default:o.hasOwnProperty(d)||et(e,t,d,null,o,j)}for(c in o)if(d=o[c],j=r[c],o.hasOwnProperty(c)&&(d!=null||j!=null))switch(c){case"value":Q=d;break;case"defaultValue":E=d;break;case"multiple":b=d;default:d!==j&&et(e,t,c,d,o,j)}t=E,r=b,o=Z,Q!=null?Yr(e,!!r,Q,!1):!!o!=!!r&&(t!=null?Yr(e,!!r,t,!0):Yr(e,!!r,r?[]:"",!1));return;case"textarea":Z=Q=null;for(E in r)if(c=r[E],r.hasOwnProperty(E)&&c!=null&&!o.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:et(e,t,E,null,o,c)}for(b in o)if(c=o[b],d=r[b],o.hasOwnProperty(b)&&(c!=null||d!=null))switch(b){case"value":Q=c;break;case"defaultValue":Z=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(i(91));break;default:c!==d&&et(e,t,b,c,o,d)}wh(e,Q,Z);return;case"option":for(var _e in r)if(Q=r[_e],r.hasOwnProperty(_e)&&Q!=null&&!o.hasOwnProperty(_e))switch(_e){case"selected":e.selected=!1;break;default:et(e,t,_e,null,o,Q)}for(j in o)if(Q=o[j],Z=r[j],o.hasOwnProperty(j)&&Q!==Z&&(Q!=null||Z!=null))switch(j){case"selected":e.selected=Q&&typeof Q!="function"&&typeof Q!="symbol";break;default:et(e,t,j,Q,o,Z)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var je in r)Q=r[je],r.hasOwnProperty(je)&&Q!=null&&!o.hasOwnProperty(je)&&et(e,t,je,null,o,Q);for(G in o)if(Q=o[G],Z=r[G],o.hasOwnProperty(G)&&Q!==Z&&(Q!=null||Z!=null))switch(G){case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(i(137,t));break;default:et(e,t,G,Q,o,Z)}return;default:if(Hu(t)){for(var tt in r)Q=r[tt],r.hasOwnProperty(tt)&&Q!==void 0&&!o.hasOwnProperty(tt)&&Rf(e,t,tt,void 0,o,Q);for(ae in o)Q=o[ae],Z=r[ae],!o.hasOwnProperty(ae)||Q===Z||Q===void 0&&Z===void 0||Rf(e,t,ae,Q,o,Z);return}}for(var H in r)Q=r[H],r.hasOwnProperty(H)&&Q!=null&&!o.hasOwnProperty(H)&&et(e,t,H,null,o,Q);for(le in o)Q=o[le],Z=r[le],!o.hasOwnProperty(le)||Q===Z||Q==null&&Z==null||et(e,t,le,Q,o,Z)}var Cf=null,Of=null;function Rs(e){return e.nodeType===9?e:e.ownerDocument}function Rg(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Cg(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Af(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Nf=null;function I1(){var e=window.event;return e&&e.type==="popstate"?e===Nf?!1:(Nf=e,!0):(Nf=null,!1)}var Og=typeof setTimeout=="function"?setTimeout:void 0,W1=typeof clearTimeout=="function"?clearTimeout:void 0,Ag=typeof Promise=="function"?Promise:void 0,eS=typeof queueMicrotask=="function"?queueMicrotask:typeof Ag<"u"?function(e){return Ag.resolve(null).then(e).catch(tS)}:Og;function tS(e){setTimeout(function(){throw e})}function Ha(e){return e==="head"}function Ng(e,t){var r=t,o=0,c=0;do{var d=r.nextSibling;if(e.removeChild(r),d&&d.nodeType===8)if(r=d.data,r==="/$"){if(0<o&&8>o){r=o;var b=e.ownerDocument;if(r&1&&Ui(b.documentElement),r&2&&Ui(b.body),r&4)for(r=b.head,Ui(r),b=r.firstChild;b;){var E=b.nextSibling,j=b.nodeName;b[Se]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&b.rel.toLowerCase()==="stylesheet"||r.removeChild(b),b=E}}if(c===0){e.removeChild(d),Gi(t);return}c--}else r==="$"||r==="$?"||r==="$!"?c++:o=r.charCodeAt(0)-48;else o=0;r=d}while(r);Gi(t)}function Tf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var r=t;switch(t=t.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":Tf(r),Re(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function nS(e,t,r,o){for(;e.nodeType===1;){var c=r;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[Se])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=Cn(e.nextSibling),e===null)break}return null}function aS(e,t,r){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=Cn(e.nextSibling),e===null))return null;return e}function jf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function rS(e,t){var r=e.ownerDocument;if(e.data!=="$?"||r.readyState==="complete")t();else{var o=function(){t(),r.removeEventListener("DOMContentLoaded",o)};r.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function Cn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="F!"||t==="F")break;if(t==="/$")return null}}return e}var Mf=null;function Tg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}function jg(e,t,r){switch(t=Rs(r),e){case"html":if(e=t.documentElement,!e)throw Error(i(452));return e;case"head":if(e=t.head,!e)throw Error(i(453));return e;case"body":if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Ui(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Re(e)}var bn=new Map,Mg=new Set;function Cs(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var fa=ee.d;ee.d={f:lS,r:iS,D:oS,C:sS,L:uS,m:cS,X:dS,S:fS,M:hS};function lS(){var e=fa.f(),t=gs();return e||t}function iS(e){var t=Qe(e);t!==null&&t.tag===5&&t.type==="form"?Jm(t):fa.r(e)}var bl=typeof document>"u"?null:document;function _g(e,t,r){var o=bl;if(o&&typeof t=="string"&&t){var c=dn(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof r=="string"&&(c+='[crossorigin="'+r+'"]'),Mg.has(c)||(Mg.add(c),e={rel:e,crossOrigin:r,href:t},o.querySelector(c)===null&&(t=o.createElement("link"),_t(t,"link",e),Le(t),o.head.appendChild(t)))}}function oS(e){fa.D(e),_g("dns-prefetch",e,null)}function sS(e,t){fa.C(e,t),_g("preconnect",e,t)}function uS(e,t,r){fa.L(e,t,r);var o=bl;if(o&&e&&t){var c='link[rel="preload"][as="'+dn(t)+'"]';t==="image"&&r&&r.imageSrcSet?(c+='[imagesrcset="'+dn(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(c+='[imagesizes="'+dn(r.imageSizes)+'"]')):c+='[href="'+dn(e)+'"]';var d=c;switch(t){case"style":d=xl(e);break;case"script":d=Sl(e)}bn.has(d)||(e=g({rel:"preload",href:t==="image"&&r&&r.imageSrcSet?void 0:e,as:t},r),bn.set(d,e),o.querySelector(c)!==null||t==="style"&&o.querySelector(Pi(d))||t==="script"&&o.querySelector(Hi(d))||(t=o.createElement("link"),_t(t,"link",e),Le(t),o.head.appendChild(t)))}}function cS(e,t){fa.m(e,t);var r=bl;if(r&&e){var o=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+dn(o)+'"][href="'+dn(e)+'"]',d=c;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Sl(e)}if(!bn.has(d)&&(e=g({rel:"modulepreload",href:e},t),bn.set(d,e),r.querySelector(c)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(Hi(d)))return}o=r.createElement("link"),_t(o,"link",e),Le(o),r.head.appendChild(o)}}}function fS(e,t,r){fa.S(e,t,r);var o=bl;if(o&&e){var c=dt(o).hoistableStyles,d=xl(e);t=t||"default";var b=c.get(d);if(!b){var E={loading:0,preload:null};if(b=o.querySelector(Pi(d)))E.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":t},r),(r=bn.get(d))&&_f(e,r);var j=b=o.createElement("link");Le(j),_t(j,"link",e),j._p=new Promise(function(G,ae){j.onload=G,j.onerror=ae}),j.addEventListener("load",function(){E.loading|=1}),j.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Os(b,t,o)}b={type:"stylesheet",instance:b,count:1,state:E},c.set(d,b)}}}function dS(e,t){fa.X(e,t);var r=bl;if(r&&e){var o=dt(r).hoistableScripts,c=Sl(e),d=o.get(c);d||(d=r.querySelector(Hi(c)),d||(e=g({src:e,async:!0},t),(t=bn.get(c))&&Df(e,t),d=r.createElement("script"),Le(d),_t(d,"link",e),r.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(c,d))}}function hS(e,t){fa.M(e,t);var r=bl;if(r&&e){var o=dt(r).hoistableScripts,c=Sl(e),d=o.get(c);d||(d=r.querySelector(Hi(c)),d||(e=g({src:e,async:!0,type:"module"},t),(t=bn.get(c))&&Df(e,t),d=r.createElement("script"),Le(d),_t(d,"link",e),r.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(c,d))}}function Dg(e,t,r,o){var c=(c=B.current)?Cs(c):null;if(!c)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(t=xl(r.href),r=dt(c).hoistableStyles,o=r.get(t),o||(o={type:"style",instance:null,count:0,state:null},r.set(t,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=xl(r.href);var d=dt(c).hoistableStyles,b=d.get(e);if(b||(c=c.ownerDocument||c,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,b),(d=c.querySelector(Pi(e)))&&!d._p&&(b.instance=d,b.state.loading=5),bn.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},bn.set(e,r),d||mS(c,e,r,b.state))),t&&o===null)throw Error(i(528,""));return b}if(t&&o!==null)throw Error(i(529,""));return null;case"script":return t=r.async,r=r.src,typeof r=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Sl(r),r=dt(c).hoistableScripts,o=r.get(t),o||(o={type:"script",instance:null,count:0,state:null},r.set(t,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function xl(e){return'href="'+dn(e)+'"'}function Pi(e){return'link[rel="stylesheet"]['+e+"]"}function Lg(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function mS(e,t,r,o){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?o.loading=1:(t=e.createElement("link"),o.preload=t,t.addEventListener("load",function(){return o.loading|=1}),t.addEventListener("error",function(){return o.loading|=2}),_t(t,"link",r),Le(t),e.head.appendChild(t))}function Sl(e){return'[src="'+dn(e)+'"]'}function Hi(e){return"script[async]"+e}function zg(e,t,r){if(t.count++,t.instance===null)switch(t.type){case"style":var o=e.querySelector('style[data-href~="'+dn(r.href)+'"]');if(o)return t.instance=o,Le(o),o;var c=g({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),Le(o),_t(o,"style",c),Os(o,r.precedence,e),t.instance=o;case"stylesheet":c=xl(r.href);var d=e.querySelector(Pi(c));if(d)return t.state.loading|=4,t.instance=d,Le(d),d;o=Lg(r),(c=bn.get(c))&&_f(o,c),d=(e.ownerDocument||e).createElement("link"),Le(d);var b=d;return b._p=new Promise(function(E,j){b.onload=E,b.onerror=j}),_t(d,"link",o),t.state.loading|=4,Os(d,r.precedence,e),t.instance=d;case"script":return d=Sl(r.src),(c=e.querySelector(Hi(d)))?(t.instance=c,Le(c),c):(o=r,(c=bn.get(d))&&(o=g({},r),Df(o,c)),e=e.ownerDocument||e,c=e.createElement("script"),Le(c),_t(c,"link",o),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(i(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(o=t.instance,t.state.loading|=4,Os(o,r.precedence,e));return t.instance}function Os(e,t,r){for(var o=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=o.length?o[o.length-1]:null,d=c,b=0;b<o.length;b++){var E=o[b];if(E.dataset.precedence===t)d=E;else if(d!==c)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=r.nodeType===9?r.head:r,t.insertBefore(e,t.firstChild))}function _f(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Df(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var As=null;function kg(e,t,r){if(As===null){var o=new Map,c=As=new Map;c.set(r,o)}else c=As,o=c.get(r),o||(o=new Map,c.set(r,o));if(o.has(e))return o;for(o.set(e,null),r=r.getElementsByTagName(e),c=0;c<r.length;c++){var d=r[c];if(!(d[Se]||d[ie]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var b=d.getAttribute(t)||"";b=e+b;var E=o.get(b);E?E.push(d):o.set(b,[d])}}return o}function Ug(e,t,r){e=e.ownerDocument||e,e.head.insertBefore(r,t==="title"?e.querySelector("head > title"):null)}function pS(e,t,r){if(r===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Pg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var Bi=null;function gS(){}function vS(e,t,r){if(Bi===null)throw Error(i(475));var o=Bi;if(t.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var c=xl(r.href),d=e.querySelector(Pi(c));if(d){e=d._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(o.count++,o=Ns.bind(o),e.then(o,o)),t.state.loading|=4,t.instance=d,Le(d);return}d=e.ownerDocument||e,r=Lg(r),(c=bn.get(c))&&_f(r,c),d=d.createElement("link"),Le(d);var b=d;b._p=new Promise(function(E,j){b.onload=E,b.onerror=j}),_t(d,"link",r),t.instance=d}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(o.count++,t=Ns.bind(o),e.addEventListener("load",t),e.addEventListener("error",t))}}function yS(){if(Bi===null)throw Error(i(475));var e=Bi;return e.stylesheets&&e.count===0&&Lf(e,e.stylesheets),0<e.count?function(t){var r=setTimeout(function(){if(e.stylesheets&&Lf(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(r)}}:null}function Ns(){if(this.count--,this.count===0){if(this.stylesheets)Lf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ts=null;function Lf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ts=new Map,t.forEach(bS,e),Ts=null,Ns.call(e))}function bS(e,t){if(!(t.state.loading&4)){var r=Ts.get(e);if(r)var o=r.get(null);else{r=new Map,Ts.set(e,r);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var b=c[d];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(r.set(b.dataset.precedence,b),o=b)}o&&r.set(null,o)}c=t.instance,b=c.getAttribute("data-precedence"),d=r.get(b)||o,d===o&&r.set(null,c),r.set(b,c),this.count++,o=Ns.bind(this),c.addEventListener("load",o),c.addEventListener("error",o),d?d.parentNode.insertBefore(c,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var $i={$$typeof:U,Provider:null,Consumer:null,_currentValue:q,_currentValue2:q,_threadCount:0};function xS(e,t,r,o,c,d,b,E){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=$r(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$r(0),this.hiddenUpdates=$r(null),this.identifierPrefix=o,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function Hg(e,t,r,o,c,d,b,E,j,G,ae,le){return e=new xS(e,t,r,b,E,j,G,le),t=1,d===!0&&(t|=24),d=Zt(3,null,null,t),e.current=d,d.stateNode=e,t=mc(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:o,isDehydrated:r,cache:t},yc(d),e}function Bg(e){return e?(e=Ir,e):Ir}function $g(e,t,r,o,c,d){c=Bg(c),o.context===null?o.context=c:o.pendingContext=c,o=Oa(t),o.payload={element:r},d=d===void 0?null:d,d!==null&&(o.callback=d),r=Aa(e,o,t),r!==null&&(tn(r,e,t),vi(r,e,t))}function Vg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function zf(e,t){Vg(e,t),(e=e.alternate)&&Vg(e,t)}function Yg(e){if(e.tag===13){var t=Jr(e,67108864);t!==null&&tn(t,e,67108864),zf(e,67108864)}}var js=!0;function SS(e,t,r,o){var c=_.T;_.T=null;var d=ee.p;try{ee.p=2,kf(e,t,r,o)}finally{ee.p=d,_.T=c}}function wS(e,t,r,o){var c=_.T;_.T=null;var d=ee.p;try{ee.p=8,kf(e,t,r,o)}finally{ee.p=d,_.T=c}}function kf(e,t,r,o){if(js){var c=Uf(o);if(c===null)Ef(e,t,o,Ms,r),Gg(e,o);else if(RS(c,e,t,r,o))o.stopPropagation();else if(Gg(e,o),t&4&&-1<ES.indexOf(e)){for(;c!==null;){var d=Qe(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var b=Xn(d.pendingLanes);if(b!==0){var E=d;for(E.pendingLanes|=2,E.entangledLanes|=2;b;){var j=1<<31-Tt(b);E.entanglements[1]|=j,b&=~j}Un(d),(Ze&6)===0&&(ms=Ft()+500,Li(0))}}break;case 13:E=Jr(d,2),E!==null&&tn(E,d,2),gs(),zf(d,2)}if(d=Uf(o),d===null&&Ef(e,t,o,Ms,r),d===c)break;c=d}c!==null&&o.stopPropagation()}else Ef(e,t,o,null,r)}}function Uf(e){return e=$u(e),Pf(e)}var Ms=null;function Pf(e){if(Ms=null,e=Ue(e),e!==null){var t=u(e);if(t===null)e=null;else{var r=t.tag;if(r===13){if(e=f(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ms=e,null}function qg(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(zu()){case xo:return 2;case So:return 8;case Hr:case Fn:return 32;case xa:return 268435456;default:return 32}default:return 32}}var Hf=!1,Ba=null,$a=null,Va=null,Vi=new Map,Yi=new Map,Ya=[],ES="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Gg(e,t){switch(e){case"focusin":case"focusout":Ba=null;break;case"dragenter":case"dragleave":$a=null;break;case"mouseover":case"mouseout":Va=null;break;case"pointerover":case"pointerout":Vi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Yi.delete(t.pointerId)}}function qi(e,t,r,o,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:r,eventSystemFlags:o,nativeEvent:d,targetContainers:[c]},t!==null&&(t=Qe(t),t!==null&&Yg(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function RS(e,t,r,o,c){switch(t){case"focusin":return Ba=qi(Ba,e,t,r,o,c),!0;case"dragenter":return $a=qi($a,e,t,r,o,c),!0;case"mouseover":return Va=qi(Va,e,t,r,o,c),!0;case"pointerover":var d=c.pointerId;return Vi.set(d,qi(Vi.get(d)||null,e,t,r,o,c)),!0;case"gotpointercapture":return d=c.pointerId,Yi.set(d,qi(Yi.get(d)||null,e,t,r,o,c)),!0}return!1}function Kg(e){var t=Ue(e.target);if(t!==null){var r=u(t);if(r!==null){if(t=r.tag,t===13){if(t=f(r),t!==null){e.blockedOn=t,V(e.priority,function(){if(r.tag===13){var o=en();o=Il(o);var c=Jr(r,o);c!==null&&tn(c,r,o),zf(r,o)}});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function _s(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Uf(e.nativeEvent);if(r===null){r=e.nativeEvent;var o=new r.constructor(r.type,r);Bu=o,r.target.dispatchEvent(o),Bu=null}else return t=Qe(r),t!==null&&Yg(t),e.blockedOn=r,!1;t.shift()}return!0}function Fg(e,t,r){_s(e)&&r.delete(t)}function CS(){Hf=!1,Ba!==null&&_s(Ba)&&(Ba=null),$a!==null&&_s($a)&&($a=null),Va!==null&&_s(Va)&&(Va=null),Vi.forEach(Fg),Yi.forEach(Fg)}function Ds(e,t){e.blockedOn===t&&(e.blockedOn=null,Hf||(Hf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,CS)))}var Ls=null;function Xg(e){Ls!==e&&(Ls=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Ls===e&&(Ls=null);for(var t=0;t<e.length;t+=3){var r=e[t],o=e[t+1],c=e[t+2];if(typeof o!="function"){if(Pf(o||r)===null)continue;break}var d=Qe(r);d!==null&&(e.splice(t,3),t-=3,Uc(d,{pending:!0,data:c,method:r.method,action:o},o,c))}}))}function Gi(e){function t(j){return Ds(j,e)}Ba!==null&&Ds(Ba,e),$a!==null&&Ds($a,e),Va!==null&&Ds(Va,e),Vi.forEach(t),Yi.forEach(t);for(var r=0;r<Ya.length;r++){var o=Ya[r];o.blockedOn===e&&(o.blockedOn=null)}for(;0<Ya.length&&(r=Ya[0],r.blockedOn===null);)Kg(r),r.blockedOn===null&&Ya.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(o=0;o<r.length;o+=3){var c=r[o],d=r[o+1],b=c[ue]||null;if(typeof d=="function")b||Xg(r);else if(b){var E=null;if(d&&d.hasAttribute("formAction")){if(c=d,b=d[ue]||null)E=b.formAction;else if(Pf(c)!==null)continue}else E=b.action;typeof E=="function"?r[o+1]=E:(r.splice(o,3),o-=3),Xg(r)}}}function Bf(e){this._internalRoot=e}zs.prototype.render=Bf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var r=t.current,o=en();$g(r,o,e,t,null,null)},zs.prototype.unmount=Bf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;$g(e.current,2,null,e,null,null),gs(),t[be]=null}};function zs(e){this._internalRoot=e}zs.prototype.unstable_scheduleHydration=function(e){if(e){var t=M();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Ya.length&&t!==0&&t<Ya[r].priority;r++);Ya.splice(r,0,e),r===0&&Kg(e)}};var Qg=a.version;if(Qg!=="19.1.0")throw Error(i(527,Qg,"19.1.0"));ee.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=p(t),e=e!==null?m(e):null,e=e===null?null:e.stateNode,e};var OS={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:_,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ks=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ks.isDisabled&&ks.supportsFiber)try{Ht=ks.inject(OS),st=ks}catch{}}return Xi.createRoot=function(e,t){if(!s(e))throw Error(i(299));var r=!1,o="",c=fp,d=dp,b=hp,E=null;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(b=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(E=t.unstable_transitionCallbacks)),t=Hg(e,1,!1,null,null,r,o,c,d,b,E,null),e[be]=t.current,wf(e),new Bf(t)},Xi.hydrateRoot=function(e,t,r){if(!s(e))throw Error(i(299));var o=!1,c="",d=fp,b=dp,E=hp,j=null,G=null;return r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onUncaughtError!==void 0&&(d=r.onUncaughtError),r.onCaughtError!==void 0&&(b=r.onCaughtError),r.onRecoverableError!==void 0&&(E=r.onRecoverableError),r.unstable_transitionCallbacks!==void 0&&(j=r.unstable_transitionCallbacks),r.formState!==void 0&&(G=r.formState)),t=Hg(e,1,!0,t,r??null,o,c,d,b,E,j,G),t.context=Bg(null),r=t.current,o=en(),o=Il(o),c=Oa(o),c.callback=null,Aa(r,c,o),r=o,t.current.lanes=r,or(t,r),Un(t),e[be]=t.current,wf(e),new zs(t)},Xi.version="19.1.0",Xi}var Cv;function Qw(){if(Cv)return qf.exports;Cv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),qf.exports=Xw(),qf.exports}var Zw=Qw();/**
56
56
  * react-router v7.7.0
57
57
  *
58
58
  * Copyright (c) Remix Software Inc.
@@ -61,10 +61,10 @@ Error generating stack: `+r.message+`
61
61
  * LICENSE.md file in the root directory of this source tree.
62
62
  *
63
63
  * @license MIT
64
- */var Vy=n=>{throw TypeError(n)},Jw=(n,a,l)=>a.has(n)||Vy("Cannot "+l),Xf=(n,a,l)=>(Jw(n,a,"read from private field"),l?l.call(n):a.get(n)),Iw=(n,a,l)=>a.has(n)?Vy("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(n):a.set(n,l);function Ww(n={}){let{initialEntries:a=["/"],initialIndex:l,v5Compat:i=!1}=n,s;s=a.map((w,C)=>g(w,typeof w=="string"?null:w.state,C===0?"default":void 0));let u=p(l??s.length-1),f="POP",h=null;function p(w){return Math.min(Math.max(w,0),s.length-1)}function m(){return s[u]}function g(w,C=null,R){let j=xd(s?m().pathname:"/",w,C,R);return ht(j.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(w)}`),j}function x(w){return typeof w=="string"?w:Za(w)}return{get index(){return u},get action(){return f},get location(){return m()},createHref:x,createURL(w){return new URL(x(w),"http://localhost")},encodeLocation(w){let C=typeof w=="string"?ba(w):w;return{pathname:C.pathname||"",search:C.search||"",hash:C.hash||""}},push(w,C){f="PUSH";let R=g(w,C);u+=1,s.splice(u,s.length,R),i&&h&&h({action:f,location:R,delta:1})},replace(w,C){f="REPLACE";let R=g(w,C);s[u]=R,i&&h&&h({action:f,location:R,delta:0})},go(w){f="POP";let C=p(u+w),R=s[C];u=C,h&&h({action:f,location:R,delta:w})},listen(w){return h=w,()=>{h=null}}}}function $e(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function ht(n,a){if(!n){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function eE(){return Math.random().toString(36).substring(2,10)}function xd(n,a,l=null,i){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof a=="string"?ba(a):a,state:l,key:a&&a.key||i||eE()}}function Za({pathname:n="/",search:a="",hash:l=""}){return a&&a!=="?"&&(n+=a.charAt(0)==="?"?a:"?"+a),l&&l!=="#"&&(n+=l.charAt(0)==="#"?l:"#"+l),n}function ba(n){let a={};if(n){let l=n.indexOf("#");l>=0&&(a.hash=n.substring(l),n=n.substring(0,l));let i=n.indexOf("?");i>=0&&(a.search=n.substring(i),n=n.substring(0,i)),n&&(a.pathname=n)}return a}function tE(n,a=!1){let l="http://localhost";typeof window<"u"&&(l=window.location.origin!=="null"?window.location.origin:window.location.href),$e(l,"No window.location.(origin|href) available to create URL");let i=typeof n=="string"?n:Za(n);return i=i.replace(/ $/,"%20"),!a&&i.startsWith("//")&&(i=l+i),new URL(i,l)}var eo,Ov=class{constructor(n){if(Iw(this,eo,new Map),n)for(let[a,l]of n)this.set(a,l)}get(n){if(Xf(this,eo).has(n))return Xf(this,eo).get(n);if(n.defaultValue!==void 0)return n.defaultValue;throw new Error("No value found for context")}set(n,a){Xf(this,eo).set(n,a)}};eo=new WeakMap;var nE=new Set(["lazy","caseSensitive","path","id","index","children"]);function aE(n){return nE.has(n)}var rE=new Set(["lazy","caseSensitive","path","id","index","unstable_middleware","children"]);function lE(n){return rE.has(n)}function iE(n){return n.index===!0}function io(n,a,l=[],i={},s=!1){return n.map((u,f)=>{let h=[...l,String(f)],p=typeof u.id=="string"?u.id:h.join("-");if($e(u.index!==!0||!u.children,"Cannot specify children on an index route"),$e(s||!i[p],`Found a route id collision on id "${p}". Route id's must be globally unique within Data Router usages`),iE(u)){let m={...u,...a(u),id:p};return i[p]=m,m}else{let m={...u,...a(u),id:p,children:void 0};return i[p]=m,u.children&&(m.children=io(u.children,a,h,i,s)),m}})}function Xa(n,a,l="/"){return Zs(n,a,l,!1)}function Zs(n,a,l,i){let s=typeof a=="string"?ba(a):a,u=bn(s.pathname||"/",l);if(u==null)return null;let f=Yy(n);sE(f);let h=null;for(let p=0;h==null&&p<f.length;++p){let m=bE(u);h=vE(f[p],m,i)}return h}function oE(n,a){let{route:l,pathname:i,params:s}=n;return{id:l.id,pathname:i,params:s,data:a[l.id],handle:l.handle}}function Yy(n,a=[],l=[],i=""){let s=(u,f,h)=>{let p={relativePath:h===void 0?u.path||"":h,caseSensitive:u.caseSensitive===!0,childrenIndex:f,route:u};p.relativePath.startsWith("/")&&($e(p.relativePath.startsWith(i),`Absolute route path "${p.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(i.length));let m=$n([i,p.relativePath]),g=l.concat(p);u.children&&u.children.length>0&&($e(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),Yy(u.children,a,g,m)),!(u.path==null&&!u.index)&&a.push({path:m,score:pE(m,u.index),routesMeta:g})};return n.forEach((u,f)=>{if(u.path===""||!u.path?.includes("?"))s(u,f);else for(let h of qy(u.path))s(u,f,h)}),a}function qy(n){let a=n.split("/");if(a.length===0)return[];let[l,...i]=a,s=l.endsWith("?"),u=l.replace(/\?$/,"");if(i.length===0)return s?[u,""]:[u];let f=qy(i.join("/")),h=[];return h.push(...f.map(p=>p===""?u:[u,p].join("/"))),s&&h.push(...f),h.map(p=>n.startsWith("/")&&p===""?"/":p)}function sE(n){n.sort((a,l)=>a.score!==l.score?l.score-a.score:gE(a.routesMeta.map(i=>i.childrenIndex),l.routesMeta.map(i=>i.childrenIndex)))}var uE=/^:[\w-]+$/,cE=3,fE=2,dE=1,hE=10,mE=-2,Av=n=>n==="*";function pE(n,a){let l=n.split("/"),i=l.length;return l.some(Av)&&(i+=mE),a&&(i+=fE),l.filter(s=>!Av(s)).reduce((s,u)=>s+(uE.test(u)?cE:u===""?dE:hE),i)}function gE(n,a){return n.length===a.length&&n.slice(0,-1).every((i,s)=>i===a[s])?n[n.length-1]-a[a.length-1]:0}function vE(n,a,l=!1){let{routesMeta:i}=n,s={},u="/",f=[];for(let h=0;h<i.length;++h){let p=i[h],m=h===i.length-1,g=u==="/"?a:a.slice(u.length)||"/",x=iu({path:p.relativePath,caseSensitive:p.caseSensitive,end:m},g),S=p.route;if(!x&&m&&l&&!i[i.length-1].route.index&&(x=iu({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},g)),!x)return null;Object.assign(s,x.params),f.push({params:s,pathname:$n([u,x.pathname]),pathnameBase:EE($n([u,x.pathnameBase])),route:S}),x.pathnameBase!=="/"&&(u=$n([u,x.pathnameBase]))}return f}function iu(n,a){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[l,i]=yE(n.path,n.caseSensitive,n.end),s=a.match(l);if(!s)return null;let u=s[0],f=u.replace(/(.)\/+$/,"$1"),h=s.slice(1);return{params:i.reduce((m,{paramName:g,isOptional:x},S)=>{if(g==="*"){let C=h[S]||"";f=u.slice(0,u.length-C.length).replace(/(.)\/+$/,"$1")}const w=h[S];return x&&!w?m[g]=void 0:m[g]=(w||"").replace(/%2F/g,"/"),m},{}),pathname:u,pathnameBase:f,pattern:n}}function yE(n,a=!1,l=!0){ht(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let i=[],s="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,h,p)=>(i.push({paramName:h,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(i.push({paramName:"*"}),s+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):l?s+="\\/*$":n!==""&&n!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,a?void 0:"i"),i]}function bE(n){try{return n.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return ht(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${a}).`),n}}function bn(n,a){if(a==="/")return n;if(!n.toLowerCase().startsWith(a.toLowerCase()))return null;let l=a.endsWith("/")?a.length-1:a.length,i=n.charAt(l);return i&&i!=="/"?null:n.slice(l)||"/"}function xE({basename:n,pathname:a}){return a==="/"?n:$n([n,a])}function SE(n,a="/"){let{pathname:l,search:i="",hash:s=""}=typeof n=="string"?ba(n):n;return{pathname:l?l.startsWith("/")?l:wE(l,a):a,search:RE(i),hash:CE(s)}}function wE(n,a){let l=a.replace(/\/+$/,"").split("/");return n.split("/").forEach(s=>{s===".."?l.length>1&&l.pop():s!=="."&&l.push(s)}),l.length>1?l.join("/"):"/"}function Qf(n,a,l,i){return`Cannot include a '${n}' character in a manually specified \`to.${a}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${l}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Gy(n){return n.filter((a,l)=>l===0||a.route.path&&a.route.path.length>0)}function gu(n){let a=Gy(n);return a.map((l,i)=>i===a.length-1?l.pathname:l.pathnameBase)}function vu(n,a,l,i=!1){let s;typeof n=="string"?s=ba(n):(s={...n},$e(!s.pathname||!s.pathname.includes("?"),Qf("?","pathname","search",s)),$e(!s.pathname||!s.pathname.includes("#"),Qf("#","pathname","hash",s)),$e(!s.search||!s.search.includes("#"),Qf("#","search","hash",s)));let u=n===""||s.pathname==="",f=u?"/":s.pathname,h;if(f==null)h=l;else{let x=a.length-1;if(!i&&f.startsWith("..")){let S=f.split("/");for(;S[0]==="..";)S.shift(),x-=1;s.pathname=S.join("/")}h=x>=0?a[x]:"/"}let p=SE(s,h),m=f&&f!=="/"&&f.endsWith("/"),g=(u||f===".")&&l.endsWith("/");return!p.pathname.endsWith("/")&&(m||g)&&(p.pathname+="/"),p}var $n=n=>n.join("/").replace(/\/\/+/g,"/"),EE=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),RE=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,CE=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,Sd=class{constructor(n,a,l,i=!1){this.status=n,this.statusText=a||"",this.internal=i,l instanceof Error?(this.data=l.toString(),this.error=l):this.data=l}};function oo(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}var Ky=["POST","PUT","PATCH","DELETE"],OE=new Set(Ky),AE=["GET",...Ky],NE=new Set(AE),TE=new Set([301,302,303,307,308]),jE=new Set([307,308]),Zf={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ME={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Qi={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},_E=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Pd=n=>_E.test(n),DE=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),Fy="remix-router-transitions",Xy=Symbol("ResetLoaderData");function LE(n){const a=n.window?n.window:typeof window<"u"?window:void 0,l=typeof a<"u"&&typeof a.document<"u"&&typeof a.document.createElement<"u";$e(n.routes.length>0,"You must provide a non-empty routes array to createRouter");let i=n.hydrationRouteProperties||[],s=n.mapRouteProperties||DE,u={},f=io(n.routes,s,void 0,u),h,p=n.basename||"/",m=n.dataStrategy||HE,g={unstable_middleware:!1,...n.future},x=null,S=new Set,w=null,C=null,R=null,j=n.hydrationData!=null,A=Xa(f,n.history.location,p),k=!1,P=null,Y;if(A==null&&!n.patchRoutesOnNavigation){let D=yn(404,{pathname:n.history.location.pathname}),{matches:q,route:J}=Hv(f);Y=!0,A=q,P={[J.id]:D}}else if(A&&!n.hydrationData&&or(A,f,n.history.location.pathname).active&&(A=null),A)if(A.some(D=>D.route.lazy))Y=!1;else if(!A.some(D=>D.route.loader))Y=!0;else{let D=n.hydrationData?n.hydrationData.loaderData:null,q=n.hydrationData?n.hydrationData.errors:null;if(q){let J=A.findIndex(le=>q[le.route.id]!==void 0);Y=A.slice(0,J+1).every(le=>!Ed(le.route,D,q))}else Y=A.every(J=>!Ed(J.route,D,q))}else{Y=!1,A=[];let D=or(null,f,n.history.location.pathname);D.active&&D.matches&&(k=!0,A=D.matches)}let B,N={historyAction:n.history.action,location:n.history.location,matches:A,initialized:Y,navigation:Zf,restoreScrollPosition:n.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:n.hydrationData&&n.hydrationData.loaderData||{},actionData:n.hydrationData&&n.hydrationData.actionData||null,errors:n.hydrationData&&n.hydrationData.errors||P,fetchers:new Map,blockers:new Map},X="POP",ee=!1,ie,oe=!1,Oe=new Map,Se=null,de=!1,fe=!1,ue=new Set,L=new Map,W=0,K=-1,he=new Map,T=new Set,$=new Map,O=new Map,M=new Set,U=new Map,V,I=null;function re(){if(x=n.history.listen(({action:D,location:q,delta:J})=>{if(V){V(),V=void 0;return}ht(U.size===0||J!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let le=Ro({currentLocation:N.location,nextLocation:q,historyAction:D});if(le&&J!=null){let se=new Promise(ve=>{V=ve});n.history.go(J*-1),Mn(le,{state:"blocked",location:q,proceed(){Mn(le,{state:"proceeding",proceed:void 0,reset:void 0,location:q}),se.then(()=>n.history.go(J))},reset(){let ve=new Map(N.blockers);ve.set(le,Qi),ke({blockers:ve})}});return}return xn(D,q)}),l){ZE(a,Oe);let D=()=>JE(a,Oe);a.addEventListener("pagehide",D),Se=()=>a.removeEventListener("pagehide",D)}return N.initialized||xn("POP",N.location,{initialHydration:!0}),B}function ce(){x&&x(),Se&&Se(),S.clear(),ie&&ie.abort(),N.fetchers.forEach((D,q)=>At(q)),N.blockers.forEach((D,q)=>lr(q))}function Ee(D){return S.add(D),()=>S.delete(D)}function ke(D,q={}){D.matches&&(D.matches=D.matches.map(se=>{let ve=u[se.route.id],xe=se.route;return xe.element!==ve.element||xe.errorElement!==ve.errorElement||xe.hydrateFallbackElement!==ve.hydrateFallbackElement?{...se,route:ve}:se})),N={...N,...D};let J=[],le=[];N.fetchers.forEach((se,ve)=>{se.state==="idle"&&(M.has(ve)?J.push(ve):le.push(ve))}),M.forEach(se=>{!N.fetchers.has(se)&&!L.has(se)&&J.push(se)}),[...S].forEach(se=>se(N,{deletedFetchers:J,viewTransitionOpts:q.viewTransitionOpts,flushSync:q.flushSync===!0})),J.forEach(se=>At(se)),le.forEach(se=>N.fetchers.delete(se))}function xt(D,q,{flushSync:J}={}){let le=N.actionData!=null&&N.navigation.formMethod!=null&&Vt(N.navigation.formMethod)&&N.navigation.state==="loading"&&D.state?._isRedirect!==!0,se;q.actionData?Object.keys(q.actionData).length>0?se=q.actionData:se=null:le?se=N.actionData:se=null;let ve=q.loaderData?Uv(N.loaderData,q.loaderData,q.matches||[],q.errors):N.loaderData,xe=N.blockers;xe.size>0&&(xe=new Map(xe),xe.forEach((be,we)=>xe.set(we,Qi)));let ye=de?!1:Oo(D,q.matches||N.matches),Ce=ee===!0||N.navigation.formMethod!=null&&Vt(N.navigation.formMethod)&&D.state?._isRedirect!==!0;h&&(f=h,h=void 0),de||X==="POP"||(X==="PUSH"?n.history.push(D,D.state):X==="REPLACE"&&n.history.replace(D,D.state));let Ae;if(X==="POP"){let be=Oe.get(N.location.pathname);be&&be.has(D.pathname)?Ae={currentLocation:N.location,nextLocation:D}:Oe.has(D.pathname)&&(Ae={currentLocation:D,nextLocation:N.location})}else if(oe){let be=Oe.get(N.location.pathname);be?be.add(D.pathname):(be=new Set([D.pathname]),Oe.set(N.location.pathname,be)),Ae={currentLocation:N.location,nextLocation:D}}ke({...q,actionData:se,loaderData:ve,historyAction:X,location:D,initialized:!0,navigation:Zf,revalidation:"idle",restoreScrollPosition:ye,preventScrollReset:Ce,blockers:xe},{viewTransitionOpts:Ae,flushSync:J===!0}),X="POP",ee=!1,oe=!1,de=!1,fe=!1,I?.resolve(),I=null}async function qt(D,q){if(typeof D=="number"){n.history.go(D);return}let J=wd(N.location,N.matches,p,D,q?.fromRouteId,q?.relative),{path:le,submission:se,error:ve}=Nv(!1,J,q),xe=N.location,ye=xd(N.location,le,q&&q.state);ye={...ye,...n.history.encodeLocation(ye)};let Ce=q&&q.replace!=null?q.replace:void 0,Ae="PUSH";Ce===!0?Ae="REPLACE":Ce===!1||se!=null&&Vt(se.formMethod)&&se.formAction===N.location.pathname+N.location.search&&(Ae="REPLACE");let be=q&&"preventScrollReset"in q?q.preventScrollReset===!0:void 0,we=(q&&q.flushSync)===!0,ze=Ro({currentLocation:xe,nextLocation:ye,historyAction:Ae});if(ze){Mn(ze,{state:"blocked",location:ye,proceed(){Mn(ze,{state:"proceeding",proceed:void 0,reset:void 0,location:ye}),qt(D,q)},reset(){let Fe=new Map(N.blockers);Fe.set(ze,Qi),ke({blockers:Fe})}});return}await xn(Ae,ye,{submission:se,pendingError:ve,preventScrollReset:be,replace:q&&q.replace,enableViewTransition:q&&q.viewTransition,flushSync:we})}function Tn(){I||(I=IE()),Jl(),ke({revalidation:"loading"});let D=I.promise;return N.navigation.state==="submitting"?D:N.navigation.state==="idle"?(xn(N.historyAction,N.location,{startUninterruptedRevalidation:!0}),D):(xn(X||N.historyAction,N.navigation.location,{overrideNavigation:N.navigation,enableViewTransition:oe===!0}),D)}async function xn(D,q,J){ie&&ie.abort(),ie=null,X=D,de=(J&&J.startUninterruptedRevalidation)===!0,ir(N.location,N.matches),ee=(J&&J.preventScrollReset)===!0,oe=(J&&J.enableViewTransition)===!0;let le=h||f,se=J&&J.overrideNavigation,ve=J?.initialHydration&&N.matches&&N.matches.length>0&&!k?N.matches:Xa(le,q,p),xe=(J&&J.flushSync)===!0;if(ve&&N.initialized&&!fe&&GE(N.location,q)&&!(J&&J.submission&&Vt(J.submission.formMethod))){xt(q,{matches:ve},{flushSync:xe});return}let ye=or(ve,le,q.pathname);if(ye.active&&ye.matches&&(ve=ye.matches),!ve){let{error:ct,notFoundMatches:_e,route:Ze}=Br(q.pathname);xt(q,{matches:_e,loaderData:{},errors:{[Ze.id]:ct}},{flushSync:xe});return}ie=new AbortController;let Ce=Tl(n.history,q,ie.signal,J&&J.submission),Ae=new Ov(n.unstable_getContext?await n.unstable_getContext():void 0),be;if(J&&J.pendingError)be=[Ar(ve).route.id,{type:"error",error:J.pendingError}];else if(J&&J.submission&&Vt(J.submission.formMethod)){let ct=await Du(Ce,q,J.submission,ve,Ae,ye.active,J&&J.initialHydration===!0,{replace:J.replace,flushSync:xe});if(ct.shortCircuited)return;if(ct.pendingActionResult){let[_e,Ze]=ct.pendingActionResult;if(en(Ze)&&oo(Ze.error)&&Ze.error.status===404){ie=null,xt(q,{matches:ct.matches,loaderData:{},errors:{[_e]:Ze.error}});return}}ve=ct.matches||ve,be=ct.pendingActionResult,se=Jf(q,J.submission),xe=!1,ye.active=!1,Ce=Tl(n.history,Ce.url,Ce.signal)}let{shortCircuited:we,matches:ze,loaderData:Fe,errors:ut}=await Lu(Ce,q,ve,Ae,ye.active,se,J&&J.submission,J&&J.fetcherSubmission,J&&J.replace,J&&J.initialHydration===!0,xe,be);we||(ie=null,xt(q,{matches:ze||ve,...Pv(be),loaderData:Fe,errors:ut}))}async function Du(D,q,J,le,se,ve,xe,ye={}){Jl();let Ce=XE(q,J);if(ke({navigation:Ce},{flushSync:ye.flushSync===!0}),ve){let we=await sr(le,q.pathname,D.signal);if(we.type==="aborted")return{shortCircuited:!0};if(we.type==="error"){let ze=Ar(we.partialMatches).route.id;return{matches:we.partialMatches,pendingActionResult:[ze,{type:"error",error:we.error}]}}else if(we.matches)le=we.matches;else{let{notFoundMatches:ze,error:Fe,route:ut}=Br(q.pathname);return{matches:ze,pendingActionResult:[ut.id,{type:"error",error:Fe}]}}}let Ae,be=Js(le,q);if(!be.route.action&&!be.route.lazy)Ae={type:"error",error:yn(405,{method:D.method,pathname:q.pathname,routeId:be.route.id})};else{let we=Dl(s,u,D,le,be,xe?[]:i,se),ze=await xa(D,we,se,null);if(Ae=ze[be.route.id],!Ae){for(let Fe of le)if(ze[Fe.route.id]){Ae=ze[Fe.route.id];break}}if(D.signal.aborted)return{shortCircuited:!0}}if(Tr(Ae)){let we;return ye&&ye.replace!=null?we=ye.replace:we=Lv(Ae.response.headers.get("Location"),new URL(D.url),p)===N.location.pathname+N.location.search,await Fn(D,Ae,!0,{submission:J,replace:we}),{shortCircuited:!0}}if(en(Ae)){let we=Ar(le,be.route.id);return(ye&&ye.replace)!==!0&&(X="PUSH"),{matches:le,pendingActionResult:[we.route.id,Ae,be.route.id]}}return{matches:le,pendingActionResult:[be.route.id,Ae]}}async function Lu(D,q,J,le,se,ve,xe,ye,Ce,Ae,be,we){let ze=ve||Jf(q,xe),Fe=xe||ye||$v(ze),ut=!de&&!Ae;if(se){if(ut){let gt=Gt(we);ke({navigation:ze,...gt!==void 0?{actionData:gt}:{}},{flushSync:be})}let He=await sr(J,q.pathname,D.signal);if(He.type==="aborted")return{shortCircuited:!0};if(He.type==="error"){let gt=Ar(He.partialMatches).route.id;return{matches:He.partialMatches,loaderData:{},errors:{[gt]:He.error}}}else if(He.matches)J=He.matches;else{let{error:gt,notFoundMatches:ur,route:sn}=Br(q.pathname);return{matches:ur,loaderData:{},errors:{[sn.id]:gt}}}}let ct=h||f,{dsMatches:_e,revalidatingFetchers:Ze}=Tv(D,le,s,u,n.history,N,J,Fe,q,Ae?[]:i,Ae===!0,fe,ue,M,$,T,ct,p,n.patchRoutesOnNavigation!=null,we);if(K=++W,!n.dataStrategy&&!_e.some(He=>He.shouldLoad)&&Ze.length===0){let He=ar();return xt(q,{matches:J,loaderData:{},errors:we&&en(we[1])?{[we[0]]:we[1].error}:null,...Pv(we),...He?{fetchers:new Map(N.fetchers)}:{}},{flushSync:be}),{shortCircuited:!0}}if(ut){let He={};if(!se){He.navigation=ze;let gt=Gt(we);gt!==void 0&&(He.actionData=gt)}Ze.length>0&&(He.fetchers=zu(Ze)),ke(He,{flushSync:be})}Ze.forEach(He=>{jn(He.key),He.controller&&L.set(He.key,He.controller)});let _n=()=>Ze.forEach(He=>jn(He.key));ie&&ie.signal.addEventListener("abort",_n);let{loaderResults:Kt,fetcherResults:Lt}=await wo(_e,Ze,D,le);if(D.signal.aborted)return{shortCircuited:!0};ie&&ie.signal.removeEventListener("abort",_n),Ze.forEach(He=>L.delete(He.key));let on=Ps(Kt);if(on)return await Fn(D,on.result,!0,{replace:Ce}),{shortCircuited:!0};if(on=Ps(Lt),on)return T.add(on.key),await Fn(D,on.result,!0,{replace:Ce}),{shortCircuited:!0};let{loaderData:Vr,errors:Sa}=kv(N,J,Kt,we,Ze,Lt);Ae&&N.errors&&(Sa={...N.errors,...Sa});let Qn=ar(),Zn=rr(K),Jn=Qn||Zn||Ze.length>0;return{matches:J,loaderData:Vr,errors:Sa,...Jn?{fetchers:new Map(N.fetchers)}:{}}}function Gt(D){if(D&&!en(D[1]))return{[D[0]]:D[1].data};if(N.actionData)return Object.keys(N.actionData).length===0?null:N.actionData}function zu(D){return D.forEach(q=>{let J=N.fetchers.get(q.key),le=Zi(void 0,J?J.data:void 0);N.fetchers.set(q.key,le)}),new Map(N.fetchers)}async function xo(D,q,J,le){jn(D);let se=(le&&le.flushSync)===!0,ve=h||f,xe=wd(N.location,N.matches,p,J,q,le?.relative),ye=Xa(ve,xe,p),Ce=or(ye,ve,xe);if(Ce.active&&Ce.matches&&(ye=Ce.matches),!ye){it(D,q,yn(404,{pathname:xe}),{flushSync:se});return}let{path:Ae,submission:be,error:we}=Nv(!0,xe,le);if(we){it(D,q,we,{flushSync:se});return}let ze=new Ov(n.unstable_getContext?await n.unstable_getContext():void 0),Fe=(le&&le.preventScrollReset)===!0;if(be&&Vt(be.formMethod)){await So(D,q,Ae,ye,ze,Ce.active,se,Fe,be);return}$.set(D,{routeId:q,path:Ae}),await Hr(D,q,Ae,ye,ze,Ce.active,se,Fe,be)}async function So(D,q,J,le,se,ve,xe,ye,Ce){Jl(),$.delete(D);let Ae=N.fetchers.get(D);Ut(D,QE(Ce,Ae),{flushSync:xe});let be=new AbortController,we=Tl(n.history,J,be.signal,Ce);if(ve){let ot=await sr(le,new URL(we.url).pathname,we.signal,D);if(ot.type==="aborted")return;if(ot.type==="error"){it(D,q,ot.error,{flushSync:xe});return}else if(ot.matches)le=ot.matches;else{it(D,q,yn(404,{pathname:J}),{flushSync:xe});return}}let ze=Js(le,J);if(!ze.route.action&&!ze.route.lazy){let ot=yn(405,{method:Ce.formMethod,pathname:J,routeId:q});it(D,q,ot,{flushSync:xe});return}L.set(D,be);let Fe=W,ut=Dl(s,u,we,le,ze,i,se),_e=(await xa(we,ut,se,D))[ze.route.id];if(we.signal.aborted){L.get(D)===be&&L.delete(D);return}if(M.has(D)){if(Tr(_e)||en(_e)){Ut(D,Ka(void 0));return}}else{if(Tr(_e))if(L.delete(D),K>Fe){Ut(D,Ka(void 0));return}else return T.add(D),Ut(D,Zi(Ce)),Fn(we,_e,!1,{fetcherSubmission:Ce,preventScrollReset:ye});if(en(_e)){it(D,q,_e.error);return}}let Ze=N.navigation.location||N.location,_n=Tl(n.history,Ze,be.signal),Kt=h||f,Lt=N.navigation.state!=="idle"?Xa(Kt,N.navigation.location,p):N.matches;$e(Lt,"Didn't find any matches after fetcher action");let on=++W;he.set(D,on);let Vr=Zi(Ce,_e.data);N.fetchers.set(D,Vr);let{dsMatches:Sa,revalidatingFetchers:Qn}=Tv(_n,se,s,u,n.history,N,Lt,Ce,Ze,i,!1,fe,ue,M,$,T,Kt,p,n.patchRoutesOnNavigation!=null,[ze.route.id,_e]);Qn.filter(ot=>ot.key!==D).forEach(ot=>{let wa=ot.key,Ao=N.fetchers.get(wa),No=Zi(void 0,Ao?Ao.data:void 0);N.fetchers.set(wa,No),jn(wa),ot.controller&&L.set(wa,ot.controller)}),ke({fetchers:new Map(N.fetchers)});let Zn=()=>Qn.forEach(ot=>jn(ot.key));be.signal.addEventListener("abort",Zn);let{loaderResults:Jn,fetcherResults:He}=await wo(Sa,Qn,_n,se);if(be.signal.aborted)return;if(be.signal.removeEventListener("abort",Zn),he.delete(D),L.delete(D),Qn.forEach(ot=>L.delete(ot.key)),N.fetchers.has(D)){let ot=Ka(_e.data);N.fetchers.set(D,ot)}let gt=Ps(Jn);if(gt)return Fn(_n,gt.result,!1,{preventScrollReset:ye});if(gt=Ps(He),gt)return T.add(gt.key),Fn(_n,gt.result,!1,{preventScrollReset:ye});let{loaderData:ur,errors:sn}=kv(N,Lt,Jn,void 0,Qn,He);rr(on),N.navigation.state==="loading"&&on>K?($e(X,"Expected pending action"),ie&&ie.abort(),xt(N.navigation.location,{matches:Lt,loaderData:ur,errors:sn,fetchers:new Map(N.fetchers)})):(ke({errors:sn,loaderData:Uv(N.loaderData,ur,Lt,sn),fetchers:new Map(N.fetchers)}),fe=!1)}async function Hr(D,q,J,le,se,ve,xe,ye,Ce){let Ae=N.fetchers.get(D);Ut(D,Zi(Ce,Ae?Ae.data:void 0),{flushSync:xe});let be=new AbortController,we=Tl(n.history,J,be.signal);if(ve){let Ze=await sr(le,new URL(we.url).pathname,we.signal,D);if(Ze.type==="aborted")return;if(Ze.type==="error"){it(D,q,Ze.error,{flushSync:xe});return}else if(Ze.matches)le=Ze.matches;else{it(D,q,yn(404,{pathname:J}),{flushSync:xe});return}}let ze=Js(le,J);L.set(D,be);let Fe=W,ut=Dl(s,u,we,le,ze,i,se),_e=(await xa(we,ut,se,D))[ze.route.id];if(L.get(D)===be&&L.delete(D),!we.signal.aborted){if(M.has(D)){Ut(D,Ka(void 0));return}if(Tr(_e))if(K>Fe){Ut(D,Ka(void 0));return}else{T.add(D),await Fn(we,_e,!1,{preventScrollReset:ye});return}if(en(_e)){it(D,q,_e.error);return}Ut(D,Ka(_e.data))}}async function Fn(D,q,J,{submission:le,fetcherSubmission:se,preventScrollReset:ve,replace:xe}={}){q.response.headers.has("X-Remix-Revalidate")&&(fe=!0);let ye=q.response.headers.get("Location");$e(ye,"Expected a Location header on the redirect Response"),ye=Lv(ye,new URL(D.url),p);let Ce=xd(N.location,ye,{_isRedirect:!0});if(l){let ut=!1;if(q.response.headers.has("X-Remix-Reload-Document"))ut=!0;else if(Pd(ye)){const ct=tE(ye,!0);ut=ct.origin!==a.location.origin||bn(ct.pathname,p)==null}if(ut){xe?a.location.replace(ye):a.location.assign(ye);return}}ie=null;let Ae=xe===!0||q.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:be,formAction:we,formEncType:ze}=N.navigation;!le&&!se&&be&&we&&ze&&(le=$v(N.navigation));let Fe=le||se;if(jE.has(q.response.status)&&Fe&&Vt(Fe.formMethod))await xn(Ae,Ce,{submission:{...Fe,formAction:ye},preventScrollReset:ve||ee,enableViewTransition:J?oe:void 0});else{let ut=Jf(Ce,le);await xn(Ae,Ce,{overrideNavigation:ut,fetcherSubmission:se,preventScrollReset:ve||ee,enableViewTransition:J?oe:void 0})}}async function xa(D,q,J,le){let se,ve={};try{se=await BE(m,D,q,le,J,!1)}catch(xe){return q.filter(ye=>ye.shouldLoad).forEach(ye=>{ve[ye.route.id]={type:"error",error:xe}}),ve}if(D.signal.aborted)return ve;for(let[xe,ye]of Object.entries(se))if(KE(ye)){let Ce=ye.result;ve[xe]={type:"redirect",response:YE(Ce,D,xe,q,p)}}else ve[xe]=await VE(ye);return ve}async function wo(D,q,J,le){let se=xa(J,D,le,null),ve=Promise.all(q.map(async Ce=>{if(Ce.matches&&Ce.match&&Ce.request&&Ce.controller){let be=(await xa(Ce.request,Ce.matches,le,Ce.key))[Ce.match.route.id];return{[Ce.key]:be}}else return Promise.resolve({[Ce.key]:{type:"error",error:yn(404,{pathname:Ce.path})}})})),xe=await se,ye=(await ve).reduce((Ce,Ae)=>Object.assign(Ce,Ae),{});return{loaderResults:xe,fetcherResults:ye}}function Jl(){fe=!0,$.forEach((D,q)=>{L.has(q)&&ue.add(q),jn(q)})}function Ut(D,q,J={}){N.fetchers.set(D,q),ke({fetchers:new Map(N.fetchers)},{flushSync:(J&&J.flushSync)===!0})}function it(D,q,J,le={}){let se=Ar(N.matches,q);At(D),ke({errors:{[se.route.id]:J},fetchers:new Map(N.fetchers)},{flushSync:(le&&le.flushSync)===!0})}function Sn(D){return O.set(D,(O.get(D)||0)+1),M.has(D)&&M.delete(D),N.fetchers.get(D)||ME}function At(D){let q=N.fetchers.get(D);L.has(D)&&!(q&&q.state==="loading"&&he.has(D))&&jn(D),$.delete(D),he.delete(D),T.delete(D),M.delete(D),ue.delete(D),N.fetchers.delete(D)}function ku(D){let q=(O.get(D)||0)-1;q<=0?(O.delete(D),M.add(D)):O.set(D,q),ke({fetchers:new Map(N.fetchers)})}function jn(D){let q=L.get(D);q&&(q.abort(),L.delete(D))}function Eo(D){for(let q of D){let J=Sn(q),le=Ka(J.data);N.fetchers.set(q,le)}}function ar(){let D=[],q=!1;for(let J of T){let le=N.fetchers.get(J);$e(le,`Expected fetcher: ${J}`),le.state==="loading"&&(T.delete(J),D.push(J),q=!0)}return Eo(D),q}function rr(D){let q=[];for(let[J,le]of he)if(le<D){let se=N.fetchers.get(J);$e(se,`Expected fetcher: ${J}`),se.state==="loading"&&(jn(J),he.delete(J),q.push(J))}return Eo(q),q.length>0}function Xn(D,q){let J=N.blockers.get(D)||Qi;return U.get(D)!==q&&U.set(D,q),J}function lr(D){N.blockers.delete(D),U.delete(D)}function Mn(D,q){let J=N.blockers.get(D)||Qi;$e(J.state==="unblocked"&&q.state==="blocked"||J.state==="blocked"&&q.state==="blocked"||J.state==="blocked"&&q.state==="proceeding"||J.state==="blocked"&&q.state==="unblocked"||J.state==="proceeding"&&q.state==="unblocked",`Invalid blocker state transition: ${J.state} -> ${q.state}`);let le=new Map(N.blockers);le.set(D,q),ke({blockers:le})}function Ro({currentLocation:D,nextLocation:q,historyAction:J}){if(U.size===0)return;U.size>1&&ht(!1,"A router only supports one blocker at a time");let le=Array.from(U.entries()),[se,ve]=le[le.length-1],xe=N.blockers.get(se);if(!(xe&&xe.state==="proceeding")&&ve({currentLocation:D,nextLocation:q,historyAction:J}))return se}function Br(D){let q=yn(404,{pathname:D}),J=h||f,{matches:le,route:se}=Hv(J);return{notFoundMatches:le,route:se,error:q}}function Co(D,q,J){if(w=D,R=q,C=J||null,!j&&N.navigation===Zf){j=!0;let le=Oo(N.location,N.matches);le!=null&&ke({restoreScrollPosition:le})}return()=>{w=null,R=null,C=null}}function $r(D,q){return C&&C(D,q.map(le=>oE(le,N.loaderData)))||D.key}function ir(D,q){if(w&&R){let J=$r(D,q);w[J]=R()}}function Oo(D,q){if(w){let J=$r(D,q),le=w[J];if(typeof le=="number")return le}return null}function or(D,q,J){if(n.patchRoutesOnNavigation)if(D){if(Object.keys(D[0].params).length>0)return{active:!0,matches:Zs(q,J,p,!0)}}else return{active:!0,matches:Zs(q,J,p,!0)||[]};return{active:!1,matches:null}}async function sr(D,q,J,le){if(!n.patchRoutesOnNavigation)return{type:"success",matches:D};let se=D;for(;;){let ve=h==null,xe=h||f,ye=u;try{await n.patchRoutesOnNavigation({signal:J,path:q,matches:se,fetcherKey:le,patch:(be,we)=>{J.aborted||jv(be,we,xe,ye,s,!1)}})}catch(be){return{type:"error",error:be,partialMatches:se}}finally{ve&&!J.aborted&&(f=[...f])}if(J.aborted)return{type:"aborted"};let Ce=Xa(xe,q,p);if(Ce)return{type:"success",matches:Ce};let Ae=Zs(xe,q,p,!0);if(!Ae||se.length===Ae.length&&se.every((be,we)=>be.route.id===Ae[we].route.id))return{type:"success",matches:null};se=Ae}}function Il(D){u={},h=io(D,s,void 0,u)}function Wl(D,q,J=!1){let le=h==null;jv(D,q,h||f,u,s,J),le&&(f=[...f],ke({}))}return B={get basename(){return p},get future(){return g},get state(){return N},get routes(){return f},get window(){return a},initialize:re,subscribe:Ee,enableScrollRestoration:Co,navigate:qt,fetch:xo,revalidate:Tn,createHref:D=>n.history.createHref(D),encodeLocation:D=>n.history.encodeLocation(D),getFetcher:Sn,deleteFetcher:ku,dispose:ce,getBlocker:Xn,deleteBlocker:lr,patchRoutes:Wl,_internalFetchControllers:L,_internalSetRoutes:Il,_internalSetStateDoNotUseOrYouWillBreakYourApp(D){ke(D)}},B}function zE(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function wd(n,a,l,i,s,u){let f,h;if(s){f=[];for(let m of a)if(f.push(m),m.route.id===s){h=m;break}}else f=a,h=a[a.length-1];let p=vu(i||".",gu(f),bn(n.pathname,l)||n.pathname,u==="path");if(i==null&&(p.search=n.search,p.hash=n.hash),(i==null||i===""||i===".")&&h){let m=Hd(p.search);if(h.route.index&&!m)p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index";else if(!h.route.index&&m){let g=new URLSearchParams(p.search),x=g.getAll("index");g.delete("index"),x.filter(w=>w).forEach(w=>g.append("index",w));let S=g.toString();p.search=S?`?${S}`:""}}return l!=="/"&&(p.pathname=xE({basename:l,pathname:p.pathname})),Za(p)}function Nv(n,a,l){if(!l||!zE(l))return{path:a};if(l.formMethod&&!FE(l.formMethod))return{path:a,error:yn(405,{method:l.formMethod})};let i=()=>({path:a,error:yn(400,{type:"invalid-body"})}),u=(l.formMethod||"get").toUpperCase(),f=e0(a);if(l.body!==void 0){if(l.formEncType==="text/plain"){if(!Vt(u))return i();let x=typeof l.body=="string"?l.body:l.body instanceof FormData||l.body instanceof URLSearchParams?Array.from(l.body.entries()).reduce((S,[w,C])=>`${S}${w}=${C}
65
- `,""):String(l.body);return{path:a,submission:{formMethod:u,formAction:f,formEncType:l.formEncType,formData:void 0,json:void 0,text:x}}}else if(l.formEncType==="application/json"){if(!Vt(u))return i();try{let x=typeof l.body=="string"?JSON.parse(l.body):l.body;return{path:a,submission:{formMethod:u,formAction:f,formEncType:l.formEncType,formData:void 0,json:x,text:void 0}}}catch{return i()}}}$e(typeof FormData=="function","FormData is not available in this environment");let h,p;if(l.formData)h=Cd(l.formData),p=l.formData;else if(l.body instanceof FormData)h=Cd(l.body),p=l.body;else if(l.body instanceof URLSearchParams)h=l.body,p=zv(h);else if(l.body==null)h=new URLSearchParams,p=new FormData;else try{h=new URLSearchParams(l.body),p=zv(h)}catch{return i()}let m={formMethod:u,formAction:f,formEncType:l&&l.formEncType||"application/x-www-form-urlencoded",formData:p,json:void 0,text:void 0};if(Vt(m.formMethod))return{path:a,submission:m};let g=ba(a);return n&&g.search&&Hd(g.search)&&h.append("index",""),g.search=`?${h}`,{path:Za(g),submission:m}}function Tv(n,a,l,i,s,u,f,h,p,m,g,x,S,w,C,R,j,A,k,P){let Y=P?en(P[1])?P[1].error:P[1].data:void 0,B=s.createURL(u.location),N=s.createURL(p),X;if(g&&u.errors){let de=Object.keys(u.errors)[0];X=f.findIndex(fe=>fe.route.id===de)}else if(P&&en(P[1])){let de=P[0];X=f.findIndex(fe=>fe.route.id===de)-1}let ee=P?P[1].statusCode:void 0,ie=ee&&ee>=400,oe={currentUrl:B,currentParams:u.matches[0]?.params||{},nextUrl:N,nextParams:f[0].params,...h,actionResult:Y,actionStatus:ee},Oe=f.map((de,fe)=>{let{route:ue}=de,L=null;if(X!=null&&fe>X?L=!1:ue.lazy?L=!0:ue.loader==null?L=!1:g?L=Ed(ue,u.loaderData,u.errors):kE(u.loaderData,u.matches[fe],de)&&(L=!0),L!==null)return Rd(l,i,n,de,m,a,L);let W=ie?!1:x||B.pathname+B.search===N.pathname+N.search||B.search!==N.search||UE(u.matches[fe],de),K={...oe,defaultShouldRevalidate:W},he=ou(de,K);return Rd(l,i,n,de,m,a,he,K)}),Se=[];return C.forEach((de,fe)=>{if(g||!f.some(O=>O.route.id===de.routeId)||w.has(fe))return;let ue=u.fetchers.get(fe),L=ue&&ue.state!=="idle"&&ue.data===void 0,W=Xa(j,de.path,A);if(!W){if(k&&L)return;Se.push({key:fe,routeId:de.routeId,path:de.path,matches:null,match:null,request:null,controller:null});return}if(R.has(fe))return;let K=Js(W,de.path),he=new AbortController,T=Tl(s,de.path,he.signal),$=null;if(S.has(fe))S.delete(fe),$=Dl(l,i,T,W,K,m,a);else if(L)x&&($=Dl(l,i,T,W,K,m,a));else{let O={...oe,defaultShouldRevalidate:ie?!1:x};ou(K,O)&&($=Dl(l,i,T,W,K,m,a,O))}$&&Se.push({key:fe,routeId:de.routeId,path:de.path,matches:$,match:K,request:T,controller:he})}),{dsMatches:Oe,revalidatingFetchers:Se}}function Ed(n,a,l){if(n.lazy)return!0;if(!n.loader)return!1;let i=a!=null&&n.id in a,s=l!=null&&l[n.id]!==void 0;return!i&&s?!1:typeof n.loader=="function"&&n.loader.hydrate===!0?!0:!i&&!s}function kE(n,a,l){let i=!a||l.route.id!==a.route.id,s=!n.hasOwnProperty(l.route.id);return i||s}function UE(n,a){let l=n.route.path;return n.pathname!==a.pathname||l!=null&&l.endsWith("*")&&n.params["*"]!==a.params["*"]}function ou(n,a){if(n.route.shouldRevalidate){let l=n.route.shouldRevalidate(a);if(typeof l=="boolean")return l}return a.defaultShouldRevalidate}function jv(n,a,l,i,s,u){let f;if(n){let m=i[n];$e(m,`No route found to patch children into: routeId = ${n}`),m.children||(m.children=[]),f=m.children}else f=l;let h=[],p=[];if(a.forEach(m=>{let g=f.find(x=>Qy(m,x));g?p.push({existingRoute:g,newRoute:m}):h.push(m)}),h.length>0){let m=io(h,s,[n||"_","patch",String(f?.length||"0")],i);f.push(...m)}if(u&&p.length>0)for(let m=0;m<p.length;m++){let{existingRoute:g,newRoute:x}=p[m],S=g,[w]=io([x],s,[],{},!0);Object.assign(S,{element:w.element?w.element:S.element,errorElement:w.errorElement?w.errorElement:S.errorElement,hydrateFallbackElement:w.hydrateFallbackElement?w.hydrateFallbackElement:S.hydrateFallbackElement})}}function Qy(n,a){return"id"in n&&"id"in a&&n.id===a.id?!0:n.index===a.index&&n.path===a.path&&n.caseSensitive===a.caseSensitive?(!n.children||n.children.length===0)&&(!a.children||a.children.length===0)?!0:n.children.every((l,i)=>a.children?.some(s=>Qy(l,s))):!1}var Mv=new WeakMap,Zy=({key:n,route:a,manifest:l,mapRouteProperties:i})=>{let s=l[a.id];if($e(s,"No route found in manifest"),!s.lazy||typeof s.lazy!="object")return;let u=s.lazy[n];if(!u)return;let f=Mv.get(s);f||(f={},Mv.set(s,f));let h=f[n];if(h)return h;let p=(async()=>{let m=aE(n),x=s[n]!==void 0&&n!=="hasErrorBoundary";if(m)ht(!m,"Route property "+n+" is not a supported lazy route property. This property will be ignored."),f[n]=Promise.resolve();else if(x)ht(!1,`Route "${s.id}" has a static property "${n}" defined. The lazy property will be ignored.`);else{let S=await u();S!=null&&(Object.assign(s,{[n]:S}),Object.assign(s,i(s)))}typeof s.lazy=="object"&&(s.lazy[n]=void 0,Object.values(s.lazy).every(S=>S===void 0)&&(s.lazy=void 0))})();return f[n]=p,p},_v=new WeakMap;function PE(n,a,l,i,s){let u=l[n.id];if($e(u,"No route found in manifest"),!n.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof n.lazy=="function"){let g=_v.get(u);if(g)return{lazyRoutePromise:g,lazyHandlerPromise:g};let x=(async()=>{$e(typeof n.lazy=="function","No lazy route function found");let S=await n.lazy(),w={};for(let C in S){let R=S[C];if(R===void 0)continue;let j=lE(C),k=u[C]!==void 0&&C!=="hasErrorBoundary";j?ht(!j,"Route property "+C+" is not a supported property to be returned from a lazy route function. This property will be ignored."):k?ht(!k,`Route "${u.id}" has a static property "${C}" defined but its lazy function is also returning a value for this property. The lazy route property "${C}" will be ignored.`):w[C]=R}Object.assign(u,w),Object.assign(u,{...i(u),lazy:void 0})})();return _v.set(u,x),x.catch(()=>{}),{lazyRoutePromise:x,lazyHandlerPromise:x}}let f=Object.keys(n.lazy),h=[],p;for(let g of f){if(s&&s.includes(g))continue;let x=Zy({key:g,route:n,manifest:l,mapRouteProperties:i});x&&(h.push(x),g===a&&(p=x))}let m=h.length>0?Promise.all(h).then(()=>{}):void 0;return m?.catch(()=>{}),p?.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:p}}async function Dv(n){let a=n.matches.filter(s=>s.shouldLoad),l={};return(await Promise.all(a.map(s=>s.resolve()))).forEach((s,u)=>{l[a[u].route.id]=s}),l}async function HE(n){return n.matches.some(a=>a.route.unstable_middleware)?Jy(n,!1,()=>Dv(n),(a,l)=>({[l]:{type:"error",result:a}})):Dv(n)}async function Jy(n,a,l,i){let{matches:s,request:u,params:f,context:h}=n,p={handlerResult:void 0};try{let m=s.flatMap(x=>x.route.unstable_middleware?x.route.unstable_middleware.map(S=>[x.route.id,S]):[]),g=await Iy({request:u,params:f,context:h},m,a,p,l);return a?g:p.handlerResult}catch(m){if(!p.middlewareError)throw m;let g=await i(p.middlewareError.error,p.middlewareError.routeId);return p.handlerResult?Object.assign(p.handlerResult,g):g}}async function Iy(n,a,l,i,s,u=0){let{request:f}=n;if(f.signal.aborted)throw f.signal.reason?f.signal.reason:new Error(`Request aborted without an \`AbortSignal.reason\`: ${f.method} ${f.url}`);let h=a[u];if(!h)return i.handlerResult=await s(),i.handlerResult;let[p,m]=h,g=!1,x,S=async()=>{if(g)throw new Error("You may only call `next()` once per middleware");g=!0,await Iy(n,a,l,i,s,u+1)};try{let w=await m({request:n.request,params:n.params,context:n.context},S);return g?w===void 0?x:w:S()}catch(w){throw i.middlewareError?i.middlewareError.error!==w&&(i.middlewareError={routeId:p,error:w}):i.middlewareError={routeId:p,error:w},w}}function Wy(n,a,l,i,s){let u=Zy({key:"unstable_middleware",route:i.route,manifest:a,mapRouteProperties:n}),f=PE(i.route,Vt(l.method)?"action":"loader",a,n,s);return{middleware:u,route:f.lazyRoutePromise,handler:f.lazyHandlerPromise}}function Rd(n,a,l,i,s,u,f,h=null){let p=!1,m=Wy(n,a,l,i,s);return{...i,_lazyPromises:m,shouldLoad:f,unstable_shouldRevalidateArgs:h,unstable_shouldCallHandler(g){return p=!0,h?typeof g=="boolean"?ou(i,{...h,defaultShouldRevalidate:g}):ou(i,h):f},resolve(g){return p||f||g&&!Vt(l.method)&&(i.route.lazy||i.route.loader)?$E({request:l,match:i,lazyHandlerPromise:m?.handler,lazyRoutePromise:m?.route,handlerOverride:g,scopedContext:u}):Promise.resolve({type:"data",result:void 0})}}}function Dl(n,a,l,i,s,u,f,h=null){return i.map(p=>p.route.id!==s.route.id?{...p,shouldLoad:!1,unstable_shouldRevalidateArgs:h,unstable_shouldCallHandler:()=>!1,_lazyPromises:Wy(n,a,l,p,u),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Rd(n,a,l,p,u,f,!0,h))}async function BE(n,a,l,i,s,u){l.some(m=>m._lazyPromises?.middleware)&&await Promise.all(l.map(m=>m._lazyPromises?.middleware));let f={request:a,params:l[0].params,context:s,matches:l},p=await n({...f,fetcherKey:i,unstable_runClientMiddleware:m=>{let g=f;return Jy(g,!1,()=>m({...g,fetcherKey:i,unstable_runClientMiddleware:()=>{throw new Error("Cannot call `unstable_runClientMiddleware()` from within an `unstable_runClientMiddleware` handler")}}),(x,S)=>({[S]:{type:"error",result:x}}))}});try{await Promise.all(l.flatMap(m=>[m._lazyPromises?.handler,m._lazyPromises?.route]))}catch{}return p}async function $E({request:n,match:a,lazyHandlerPromise:l,lazyRoutePromise:i,handlerOverride:s,scopedContext:u}){let f,h,p=Vt(n.method),m=p?"action":"loader",g=x=>{let S,w=new Promise((j,A)=>S=A);h=()=>S(),n.signal.addEventListener("abort",h);let C=j=>typeof x!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${m}" [routeId: ${a.route.id}]`)):x({request:n,params:a.params,context:u},...j!==void 0?[j]:[]),R=(async()=>{try{return{type:"data",result:await(s?s(A=>C(A)):C())}}catch(j){return{type:"error",result:j}}})();return Promise.race([R,w])};try{let x=p?a.route.action:a.route.loader;if(l||i)if(x){let S,[w]=await Promise.all([g(x).catch(C=>{S=C}),l,i]);if(S!==void 0)throw S;f=w}else{await l;let S=p?a.route.action:a.route.loader;if(S)[f]=await Promise.all([g(S),i]);else if(m==="action"){let w=new URL(n.url),C=w.pathname+w.search;throw yn(405,{method:n.method,pathname:C,routeId:a.route.id})}else return{type:"data",result:void 0}}else if(x)f=await g(x);else{let S=new URL(n.url),w=S.pathname+S.search;throw yn(404,{pathname:w})}}catch(x){return{type:"error",result:x}}finally{h&&n.signal.removeEventListener("abort",h)}return f}async function VE(n){let{result:a,type:l}=n;if(t0(a)){let i;try{let s=a.headers.get("Content-Type");s&&/\bapplication\/json\b/.test(s)?a.body==null?i=null:i=await a.json():i=await a.text()}catch(s){return{type:"error",error:s}}return l==="error"?{type:"error",error:new Sd(a.status,a.statusText,i),statusCode:a.status,headers:a.headers}:{type:"data",data:i,statusCode:a.status,headers:a.headers}}return l==="error"?Bv(a)?a.data instanceof Error?{type:"error",error:a.data,statusCode:a.init?.status,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"error",error:new Sd(a.init?.status||500,void 0,a.data),statusCode:oo(a)?a.status:void 0,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"error",error:a,statusCode:oo(a)?a.status:void 0}:Bv(a)?{type:"data",data:a.data,statusCode:a.init?.status,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"data",data:a}}function YE(n,a,l,i,s){let u=n.headers.get("Location");if($e(u,"Redirects returned/thrown from loaders/actions must have a Location header"),!Pd(u)){let f=i.slice(0,i.findIndex(h=>h.route.id===l)+1);u=wd(new URL(a.url),f,s,u),n.headers.set("Location",u)}return n}function Lv(n,a,l){if(Pd(n)){let i=n,s=i.startsWith("//")?new URL(a.protocol+i):new URL(i),u=bn(s.pathname,l)!=null;if(s.origin===a.origin&&u)return s.pathname+s.search+s.hash}return n}function Tl(n,a,l,i){let s=n.createURL(e0(a)).toString(),u={signal:l};if(i&&Vt(i.formMethod)){let{formMethod:f,formEncType:h}=i;u.method=f.toUpperCase(),h==="application/json"?(u.headers=new Headers({"Content-Type":h}),u.body=JSON.stringify(i.json)):h==="text/plain"?u.body=i.text:h==="application/x-www-form-urlencoded"&&i.formData?u.body=Cd(i.formData):u.body=i.formData}return new Request(s,u)}function Cd(n){let a=new URLSearchParams;for(let[l,i]of n.entries())a.append(l,typeof i=="string"?i:i.name);return a}function zv(n){let a=new FormData;for(let[l,i]of n.entries())a.append(l,i);return a}function qE(n,a,l,i=!1,s=!1){let u={},f=null,h,p=!1,m={},g=l&&en(l[1])?l[1].error:void 0;return n.forEach(x=>{if(!(x.route.id in a))return;let S=x.route.id,w=a[S];if($e(!Tr(w),"Cannot handle redirect results in processLoaderData"),en(w)){let C=w.error;if(g!==void 0&&(C=g,g=void 0),f=f||{},s)f[S]=C;else{let R=Ar(n,S);f[R.route.id]==null&&(f[R.route.id]=C)}i||(u[S]=Xy),p||(p=!0,h=oo(w.error)?w.error.status:500),w.headers&&(m[S]=w.headers)}else u[S]=w.data,w.statusCode&&w.statusCode!==200&&!p&&(h=w.statusCode),w.headers&&(m[S]=w.headers)}),g!==void 0&&l&&(f={[l[0]]:g},l[2]&&(u[l[2]]=void 0)),{loaderData:u,errors:f,statusCode:h||200,loaderHeaders:m}}function kv(n,a,l,i,s,u){let{loaderData:f,errors:h}=qE(a,l,i);return s.filter(p=>!p.matches||p.matches.some(m=>m.shouldLoad)).forEach(p=>{let{key:m,match:g,controller:x}=p,S=u[m];if($e(S,"Did not find corresponding fetcher result"),!(x&&x.signal.aborted))if(en(S)){let w=Ar(n.matches,g?.route.id);h&&h[w.route.id]||(h={...h,[w.route.id]:S.error}),n.fetchers.delete(m)}else if(Tr(S))$e(!1,"Unhandled fetcher revalidation redirect");else{let w=Ka(S.data);n.fetchers.set(m,w)}}),{loaderData:f,errors:h}}function Uv(n,a,l,i){let s=Object.entries(a).filter(([,u])=>u!==Xy).reduce((u,[f,h])=>(u[f]=h,u),{});for(let u of l){let f=u.route.id;if(!a.hasOwnProperty(f)&&n.hasOwnProperty(f)&&u.route.loader&&(s[f]=n[f]),i&&i.hasOwnProperty(f))break}return s}function Pv(n){return n?en(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function Ar(n,a){return(a?n.slice(0,n.findIndex(i=>i.route.id===a)+1):[...n]).reverse().find(i=>i.route.hasErrorBoundary===!0)||n[0]}function Hv(n){let a=n.length===1?n[0]:n.find(l=>l.index||!l.path||l.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:a}],route:a}}function yn(n,{pathname:a,routeId:l,method:i,type:s,message:u}={}){let f="Unknown Server Error",h="Unknown @remix-run/router error";return n===400?(f="Bad Request",i&&a&&l?h=`You made a ${i} request to "${a}" but did not provide a \`loader\` for route "${l}", so there is no way to handle the request.`:s==="invalid-body"&&(h="Unable to encode submission body")):n===403?(f="Forbidden",h=`Route "${l}" does not match URL "${a}"`):n===404?(f="Not Found",h=`No route matches URL "${a}"`):n===405&&(f="Method Not Allowed",i&&a&&l?h=`You made a ${i.toUpperCase()} request to "${a}" but did not provide an \`action\` for route "${l}", so there is no way to handle the request.`:i&&(h=`Invalid request method "${i.toUpperCase()}"`)),new Sd(n||500,f,new Error(h),!0)}function Ps(n){let a=Object.entries(n);for(let l=a.length-1;l>=0;l--){let[i,s]=a[l];if(Tr(s))return{key:i,result:s}}}function e0(n){let a=typeof n=="string"?ba(n):n;return Za({...a,hash:""})}function GE(n,a){return n.pathname!==a.pathname||n.search!==a.search?!1:n.hash===""?a.hash!=="":n.hash===a.hash?!0:a.hash!==""}function KE(n){return t0(n.result)&&TE.has(n.result.status)}function en(n){return n.type==="error"}function Tr(n){return(n&&n.type)==="redirect"}function Bv(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function t0(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function FE(n){return NE.has(n.toUpperCase())}function Vt(n){return OE.has(n.toUpperCase())}function Hd(n){return new URLSearchParams(n).getAll("index").some(a=>a==="")}function Js(n,a){let l=typeof a=="string"?ba(a).search:a.search;if(n[n.length-1].route.index&&Hd(l||""))return n[n.length-1];let i=Gy(n);return i[i.length-1]}function $v(n){let{formMethod:a,formAction:l,formEncType:i,text:s,formData:u,json:f}=n;if(!(!a||!l||!i)){if(s!=null)return{formMethod:a,formAction:l,formEncType:i,formData:void 0,json:void 0,text:s};if(u!=null)return{formMethod:a,formAction:l,formEncType:i,formData:u,json:void 0,text:void 0};if(f!==void 0)return{formMethod:a,formAction:l,formEncType:i,formData:void 0,json:f,text:void 0}}}function Jf(n,a){return a?{state:"loading",location:n,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}:{state:"loading",location:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function XE(n,a){return{state:"submitting",location:n,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}}function Zi(n,a){return n?{state:"loading",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:a}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:a}}function QE(n,a){return{state:"submitting",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:a?a.data:void 0}}function Ka(n){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function ZE(n,a){try{let l=n.sessionStorage.getItem(Fy);if(l){let i=JSON.parse(l);for(let[s,u]of Object.entries(i||{}))u&&Array.isArray(u)&&a.set(s,new Set(u||[]))}}catch{}}function JE(n,a){if(a.size>0){let l={};for(let[i,s]of a)l[i]=[...s];try{n.sessionStorage.setItem(Fy,JSON.stringify(l))}catch(i){ht(!1,`Failed to save applied view transitions in sessionStorage (${i}).`)}}}function IE(){let n,a,l=new Promise((i,s)=>{n=async u=>{i(u);try{await l}catch{}},a=async u=>{s(u);try{await l}catch{}}});return{promise:l,resolve:n,reject:a}}var Pr=v.createContext(null);Pr.displayName="DataRouter";var mo=v.createContext(null);mo.displayName="DataRouterState";v.createContext(!1);var Bd=v.createContext({isTransitioning:!1});Bd.displayName="ViewTransition";var n0=v.createContext(new Map);n0.displayName="Fetchers";var WE=v.createContext(null);WE.displayName="Await";var An=v.createContext(null);An.displayName="Navigation";var yu=v.createContext(null);yu.displayName="Location";var Gn=v.createContext({outlet:null,matches:[],isDataRoute:!1});Gn.displayName="Route";var $d=v.createContext(null);$d.displayName="RouteError";function eR(n,{relative:a}={}){$e(Yl(),"useHref() may be used only in the context of a <Router> component.");let{basename:l,navigator:i}=v.useContext(An),{hash:s,pathname:u,search:f}=po(n,{relative:a}),h=u;return l!=="/"&&(h=u==="/"?l:$n([l,u])),i.createHref({pathname:h,search:f,hash:s})}function Yl(){return v.useContext(yu)!=null}function tr(){return $e(Yl(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(yu).location}var a0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function r0(n){v.useContext(An).static||v.useLayoutEffect(n)}function bu(){let{isDataRoute:n}=v.useContext(Gn);return n?hR():tR()}function tR(){$e(Yl(),"useNavigate() may be used only in the context of a <Router> component.");let n=v.useContext(Pr),{basename:a,navigator:l}=v.useContext(An),{matches:i}=v.useContext(Gn),{pathname:s}=tr(),u=JSON.stringify(gu(i)),f=v.useRef(!1);return r0(()=>{f.current=!0}),v.useCallback((p,m={})=>{if(ht(f.current,a0),!f.current)return;if(typeof p=="number"){l.go(p);return}let g=vu(p,JSON.parse(u),s,m.relative==="path");n==null&&a!=="/"&&(g.pathname=g.pathname==="/"?a:$n([a,g.pathname])),(m.replace?l.replace:l.push)(g,m.state,m)},[a,l,u,s,n])}v.createContext(null);function po(n,{relative:a}={}){let{matches:l}=v.useContext(Gn),{pathname:i}=tr(),s=JSON.stringify(gu(l));return v.useMemo(()=>vu(n,JSON.parse(s),i,a==="path"),[n,s,i,a])}function nR(n,a,l,i){$e(Yl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=v.useContext(An),{matches:u}=v.useContext(Gn),f=u[u.length-1],h=f?f.params:{},p=f?f.pathname:"/",m=f?f.pathnameBase:"/",g=f&&f.route;{let A=g&&g.path||"";l0(p,!g||A.endsWith("*")||A.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${A}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
64
+ */var Vy=n=>{throw TypeError(n)},Jw=(n,a,l)=>a.has(n)||Vy("Cannot "+l),Xf=(n,a,l)=>(Jw(n,a,"read from private field"),l?l.call(n):a.get(n)),Iw=(n,a,l)=>a.has(n)?Vy("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(n):a.set(n,l);function Ww(n={}){let{initialEntries:a=["/"],initialIndex:l,v5Compat:i=!1}=n,s;s=a.map((w,C)=>g(w,typeof w=="string"?null:w.state,C===0?"default":void 0));let u=p(l??s.length-1),f="POP",h=null;function p(w){return Math.min(Math.max(w,0),s.length-1)}function m(){return s[u]}function g(w,C=null,R){let T=xd(s?m().pathname:"/",w,C,R);return pt(T.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(w)}`),T}function x(w){return typeof w=="string"?w:Ja(w)}return{get index(){return u},get action(){return f},get location(){return m()},createHref:x,createURL(w){return new URL(x(w),"http://localhost")},encodeLocation(w){let C=typeof w=="string"?ba(w):w;return{pathname:C.pathname||"",search:C.search||"",hash:C.hash||""}},push(w,C){f="PUSH";let R=g(w,C);u+=1,s.splice(u,s.length,R),i&&h&&h({action:f,location:R,delta:1})},replace(w,C){f="REPLACE";let R=g(w,C);s[u]=R,i&&h&&h({action:f,location:R,delta:0})},go(w){f="POP";let C=p(u+w),R=s[C];u=C,h&&h({action:f,location:R,delta:w})},listen(w){return h=w,()=>{h=null}}}}function Ve(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function pt(n,a){if(!n){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function eE(){return Math.random().toString(36).substring(2,10)}function xd(n,a,l=null,i){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof a=="string"?ba(a):a,state:l,key:a&&a.key||i||eE()}}function Ja({pathname:n="/",search:a="",hash:l=""}){return a&&a!=="?"&&(n+=a.charAt(0)==="?"?a:"?"+a),l&&l!=="#"&&(n+=l.charAt(0)==="#"?l:"#"+l),n}function ba(n){let a={};if(n){let l=n.indexOf("#");l>=0&&(a.hash=n.substring(l),n=n.substring(0,l));let i=n.indexOf("?");i>=0&&(a.search=n.substring(i),n=n.substring(0,i)),n&&(a.pathname=n)}return a}function tE(n,a=!1){let l="http://localhost";typeof window<"u"&&(l=window.location.origin!=="null"?window.location.origin:window.location.href),Ve(l,"No window.location.(origin|href) available to create URL");let i=typeof n=="string"?n:Ja(n);return i=i.replace(/ $/,"%20"),!a&&i.startsWith("//")&&(i=l+i),new URL(i,l)}var eo,Ov=class{constructor(n){if(Iw(this,eo,new Map),n)for(let[a,l]of n)this.set(a,l)}get(n){if(Xf(this,eo).has(n))return Xf(this,eo).get(n);if(n.defaultValue!==void 0)return n.defaultValue;throw new Error("No value found for context")}set(n,a){Xf(this,eo).set(n,a)}};eo=new WeakMap;var nE=new Set(["lazy","caseSensitive","path","id","index","children"]);function aE(n){return nE.has(n)}var rE=new Set(["lazy","caseSensitive","path","id","index","unstable_middleware","children"]);function lE(n){return rE.has(n)}function iE(n){return n.index===!0}function io(n,a,l=[],i={},s=!1){return n.map((u,f)=>{let h=[...l,String(f)],p=typeof u.id=="string"?u.id:h.join("-");if(Ve(u.index!==!0||!u.children,"Cannot specify children on an index route"),Ve(s||!i[p],`Found a route id collision on id "${p}". Route id's must be globally unique within Data Router usages`),iE(u)){let m={...u,...a(u),id:p};return i[p]=m,m}else{let m={...u,...a(u),id:p,children:void 0};return i[p]=m,u.children&&(m.children=io(u.children,a,h,i,s)),m}})}function Xa(n,a,l="/"){return Zs(n,a,l,!1)}function Zs(n,a,l,i){let s=typeof a=="string"?ba(a):a,u=Sn(s.pathname||"/",l);if(u==null)return null;let f=Yy(n);sE(f);let h=null;for(let p=0;h==null&&p<f.length;++p){let m=bE(u);h=vE(f[p],m,i)}return h}function oE(n,a){let{route:l,pathname:i,params:s}=n;return{id:l.id,pathname:i,params:s,data:a[l.id],handle:l.handle}}function Yy(n,a=[],l=[],i=""){let s=(u,f,h)=>{let p={relativePath:h===void 0?u.path||"":h,caseSensitive:u.caseSensitive===!0,childrenIndex:f,route:u};p.relativePath.startsWith("/")&&(Ve(p.relativePath.startsWith(i),`Absolute route path "${p.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(i.length));let m=$n([i,p.relativePath]),g=l.concat(p);u.children&&u.children.length>0&&(Ve(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),Yy(u.children,a,g,m)),!(u.path==null&&!u.index)&&a.push({path:m,score:pE(m,u.index),routesMeta:g})};return n.forEach((u,f)=>{if(u.path===""||!u.path?.includes("?"))s(u,f);else for(let h of qy(u.path))s(u,f,h)}),a}function qy(n){let a=n.split("/");if(a.length===0)return[];let[l,...i]=a,s=l.endsWith("?"),u=l.replace(/\?$/,"");if(i.length===0)return s?[u,""]:[u];let f=qy(i.join("/")),h=[];return h.push(...f.map(p=>p===""?u:[u,p].join("/"))),s&&h.push(...f),h.map(p=>n.startsWith("/")&&p===""?"/":p)}function sE(n){n.sort((a,l)=>a.score!==l.score?l.score-a.score:gE(a.routesMeta.map(i=>i.childrenIndex),l.routesMeta.map(i=>i.childrenIndex)))}var uE=/^:[\w-]+$/,cE=3,fE=2,dE=1,hE=10,mE=-2,Av=n=>n==="*";function pE(n,a){let l=n.split("/"),i=l.length;return l.some(Av)&&(i+=mE),a&&(i+=fE),l.filter(s=>!Av(s)).reduce((s,u)=>s+(uE.test(u)?cE:u===""?dE:hE),i)}function gE(n,a){return n.length===a.length&&n.slice(0,-1).every((i,s)=>i===a[s])?n[n.length-1]-a[a.length-1]:0}function vE(n,a,l=!1){let{routesMeta:i}=n,s={},u="/",f=[];for(let h=0;h<i.length;++h){let p=i[h],m=h===i.length-1,g=u==="/"?a:a.slice(u.length)||"/",x=iu({path:p.relativePath,caseSensitive:p.caseSensitive,end:m},g),S=p.route;if(!x&&m&&l&&!i[i.length-1].route.index&&(x=iu({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},g)),!x)return null;Object.assign(s,x.params),f.push({params:s,pathname:$n([u,x.pathname]),pathnameBase:EE($n([u,x.pathnameBase])),route:S}),x.pathnameBase!=="/"&&(u=$n([u,x.pathnameBase]))}return f}function iu(n,a){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[l,i]=yE(n.path,n.caseSensitive,n.end),s=a.match(l);if(!s)return null;let u=s[0],f=u.replace(/(.)\/+$/,"$1"),h=s.slice(1);return{params:i.reduce((m,{paramName:g,isOptional:x},S)=>{if(g==="*"){let C=h[S]||"";f=u.slice(0,u.length-C.length).replace(/(.)\/+$/,"$1")}const w=h[S];return x&&!w?m[g]=void 0:m[g]=(w||"").replace(/%2F/g,"/"),m},{}),pathname:u,pathnameBase:f,pattern:n}}function yE(n,a=!1,l=!0){pt(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let i=[],s="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,h,p)=>(i.push({paramName:h,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(i.push({paramName:"*"}),s+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):l?s+="\\/*$":n!==""&&n!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,a?void 0:"i"),i]}function bE(n){try{return n.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return pt(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${a}).`),n}}function Sn(n,a){if(a==="/")return n;if(!n.toLowerCase().startsWith(a.toLowerCase()))return null;let l=a.endsWith("/")?a.length-1:a.length,i=n.charAt(l);return i&&i!=="/"?null:n.slice(l)||"/"}function xE({basename:n,pathname:a}){return a==="/"?n:$n([n,a])}function SE(n,a="/"){let{pathname:l,search:i="",hash:s=""}=typeof n=="string"?ba(n):n;return{pathname:l?l.startsWith("/")?l:wE(l,a):a,search:RE(i),hash:CE(s)}}function wE(n,a){let l=a.replace(/\/+$/,"").split("/");return n.split("/").forEach(s=>{s===".."?l.length>1&&l.pop():s!=="."&&l.push(s)}),l.length>1?l.join("/"):"/"}function Qf(n,a,l,i){return`Cannot include a '${n}' character in a manually specified \`to.${a}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${l}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Gy(n){return n.filter((a,l)=>l===0||a.route.path&&a.route.path.length>0)}function gu(n){let a=Gy(n);return a.map((l,i)=>i===a.length-1?l.pathname:l.pathnameBase)}function vu(n,a,l,i=!1){let s;typeof n=="string"?s=ba(n):(s={...n},Ve(!s.pathname||!s.pathname.includes("?"),Qf("?","pathname","search",s)),Ve(!s.pathname||!s.pathname.includes("#"),Qf("#","pathname","hash",s)),Ve(!s.search||!s.search.includes("#"),Qf("#","search","hash",s)));let u=n===""||s.pathname==="",f=u?"/":s.pathname,h;if(f==null)h=l;else{let x=a.length-1;if(!i&&f.startsWith("..")){let S=f.split("/");for(;S[0]==="..";)S.shift(),x-=1;s.pathname=S.join("/")}h=x>=0?a[x]:"/"}let p=SE(s,h),m=f&&f!=="/"&&f.endsWith("/"),g=(u||f===".")&&l.endsWith("/");return!p.pathname.endsWith("/")&&(m||g)&&(p.pathname+="/"),p}var $n=n=>n.join("/").replace(/\/\/+/g,"/"),EE=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),RE=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,CE=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,Sd=class{constructor(n,a,l,i=!1){this.status=n,this.statusText=a||"",this.internal=i,l instanceof Error?(this.data=l.toString(),this.error=l):this.data=l}};function oo(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}var Ky=["POST","PUT","PATCH","DELETE"],OE=new Set(Ky),AE=["GET",...Ky],NE=new Set(AE),TE=new Set([301,302,303,307,308]),jE=new Set([307,308]),Zf={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ME={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Qi={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},_E=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Pd=n=>_E.test(n),DE=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),Fy="remix-router-transitions",Xy=Symbol("ResetLoaderData");function LE(n){const a=n.window?n.window:typeof window<"u"?window:void 0,l=typeof a<"u"&&typeof a.document<"u"&&typeof a.document.createElement<"u";Ve(n.routes.length>0,"You must provide a non-empty routes array to createRouter");let i=n.hydrationRouteProperties||[],s=n.mapRouteProperties||DE,u={},f=io(n.routes,s,void 0,u),h,p=n.basename||"/",m=n.dataStrategy||HE,g={unstable_middleware:!1,...n.future},x=null,S=new Set,w=null,C=null,R=null,T=n.hydrationData!=null,O=Xa(f,n.history.location,p),z=!1,U=null,$;if(O==null&&!n.patchRoutesOnNavigation){let M=xn(404,{pathname:n.history.location.pathname}),{matches:V,route:J}=Hv(f);$=!0,O=V,U={[J.id]:M}}else if(O&&!n.hydrationData&&sr(O,f,n.history.location.pathname).active&&(O=null),O)if(O.some(M=>M.route.lazy))$=!1;else if(!O.some(M=>M.route.loader))$=!0;else{let M=n.hydrationData?n.hydrationData.loaderData:null,V=n.hydrationData?n.hydrationData.errors:null;if(V){let J=O.findIndex(ie=>V[ie.route.id]!==void 0);$=O.slice(0,J+1).every(ie=>!Ed(ie.route,M,V))}else $=O.every(J=>!Ed(J.route,M,V))}else{$=!1,O=[];let M=sr(null,f,n.history.location.pathname);M.active&&M.matches&&(z=!0,O=M.matches)}let P,A={historyAction:n.history.action,location:n.history.location,matches:O,initialized:$,navigation:Zf,restoreScrollPosition:n.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:n.hydrationData&&n.hydrationData.loaderData||{},actionData:n.hydrationData&&n.hydrationData.actionData||null,errors:n.hydrationData&&n.hydrationData.errors||U,fetchers:new Map,blockers:new Map},X="POP",ne=!1,oe,se=!1,Ne=new Map,we=null,he=!1,de=!1,ce=new Set,_=new Map,ee=0,q=-1,pe=new Map,N=new Set,K=new Map,L=new Map,F=new Set,W=new Map,k,B=null;function I(){if(x=n.history.listen(({action:M,location:V,delta:J})=>{if(k){k(),k=void 0;return}pt(W.size===0||J!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ie=Ro({currentLocation:A.location,nextLocation:V,historyAction:M});if(ie&&J!=null){let ue=new Promise(be=>{k=be});n.history.go(J*-1),Mn(ie,{state:"blocked",location:V,proceed(){Mn(ie,{state:"proceeding",proceed:void 0,reset:void 0,location:V}),ue.then(()=>n.history.go(J))},reset(){let be=new Map(A.blockers);be.set(ie,Qi),me({blockers:be})}});return}return Kt(M,V)}),l){ZE(a,Ne);let M=()=>JE(a,Ne);a.addEventListener("pagehide",M),we=()=>a.removeEventListener("pagehide",M)}return A.initialized||Kt("POP",A.location,{initialHydration:!0}),P}function te(){x&&x(),we&&we(),S.clear(),oe&&oe.abort(),A.fetchers.forEach((M,V)=>Tt(V)),A.blockers.forEach((M,V)=>ir(V))}function fe(M){return S.add(M),()=>S.delete(M)}function me(M,V={}){M.matches&&(M.matches=M.matches.map(ue=>{let be=u[ue.route.id],Ee=ue.route;return Ee.element!==be.element||Ee.errorElement!==be.errorElement||Ee.hydrateFallbackElement!==be.hydrateFallbackElement?{...ue,route:be}:ue})),A={...A,...M};let J=[],ie=[];A.fetchers.forEach((ue,be)=>{ue.state==="idle"&&(F.has(be)?J.push(be):ie.push(be))}),F.forEach(ue=>{!A.fetchers.has(ue)&&!_.has(ue)&&J.push(ue)}),[...S].forEach(ue=>ue(A,{deletedFetchers:J,viewTransitionOpts:V.viewTransitionOpts,flushSync:V.flushSync===!0})),J.forEach(ue=>Tt(ue)),ie.forEach(ue=>A.fetchers.delete(ue))}function Ce(M,V,{flushSync:J}={}){let ie=A.actionData!=null&&A.navigation.formMethod!=null&&qt(A.navigation.formMethod)&&A.navigation.state==="loading"&&M.state?._isRedirect!==!0,ue;V.actionData?Object.keys(V.actionData).length>0?ue=V.actionData:ue=null:ie?ue=A.actionData:ue=null;let be=V.loaderData?Uv(A.loaderData,V.loaderData,V.matches||[],V.errors):A.loaderData,Ee=A.blockers;Ee.size>0&&(Ee=new Map(Ee),Ee.forEach((Se,Re)=>Ee.set(Re,Qi)));let xe=he?!1:Oo(M,V.matches||A.matches),Ae=ne===!0||A.navigation.formMethod!=null&&qt(A.navigation.formMethod)&&M.state?._isRedirect!==!0;h&&(f=h,h=void 0),he||X==="POP"||(X==="PUSH"?n.history.push(M,M.state):X==="REPLACE"&&n.history.replace(M,M.state));let Te;if(X==="POP"){let Se=Ne.get(A.location.pathname);Se&&Se.has(M.pathname)?Te={currentLocation:A.location,nextLocation:M}:Ne.has(M.pathname)&&(Te={currentLocation:M,nextLocation:A.location})}else if(se){let Se=Ne.get(A.location.pathname);Se?Se.add(M.pathname):(Se=new Set([M.pathname]),Ne.set(A.location.pathname,Se)),Te={currentLocation:A.location,nextLocation:M}}me({...V,actionData:ue,loaderData:be,historyAction:X,location:M,initialized:!0,navigation:Zf,revalidation:"idle",restoreScrollPosition:xe,preventScrollReset:Ae,blockers:Ee},{viewTransitionOpts:Te,flushSync:J===!0}),X="POP",ne=!1,se=!1,he=!1,de=!1,B?.resolve(),B=null}async function Ye(M,V){if(typeof M=="number"){n.history.go(M);return}let J=wd(A.location,A.matches,p,M,V?.fromRouteId,V?.relative),{path:ie,submission:ue,error:be}=Nv(!1,J,V),Ee=A.location,xe=xd(A.location,ie,V&&V.state);xe={...xe,...n.history.encodeLocation(xe)};let Ae=V&&V.replace!=null?V.replace:void 0,Te="PUSH";Ae===!0?Te="REPLACE":Ae===!1||ue!=null&&qt(ue.formMethod)&&ue.formAction===A.location.pathname+A.location.search&&(Te="REPLACE");let Se=V&&"preventScrollReset"in V?V.preventScrollReset===!0:void 0,Re=(V&&V.flushSync)===!0,Ue=Ro({currentLocation:Ee,nextLocation:xe,historyAction:Te});if(Ue){Mn(Ue,{state:"blocked",location:xe,proceed(){Mn(Ue,{state:"proceeding",proceed:void 0,reset:void 0,location:xe}),Ye(M,V)},reset(){let Qe=new Map(A.blockers);Qe.set(Ue,Qi),me({blockers:Qe})}});return}await Kt(Te,xe,{submission:ue,pendingError:be,preventScrollReset:Se,replace:V&&V.replace,enableViewTransition:V&&V.viewTransition,flushSync:Re})}function Nt(){B||(B=IE()),Jl(),me({revalidation:"loading"});let M=B.promise;return A.navigation.state==="submitting"?M:A.navigation.state==="idle"?(Kt(A.historyAction,A.location,{startUninterruptedRevalidation:!0}),M):(Kt(X||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation,enableViewTransition:se===!0}),M)}async function Kt(M,V,J){oe&&oe.abort(),oe=null,X=M,he=(J&&J.startUninterruptedRevalidation)===!0,or(A.location,A.matches),ne=(J&&J.preventScrollReset)===!0,se=(J&&J.enableViewTransition)===!0;let ie=h||f,ue=J&&J.overrideNavigation,be=J?.initialHydration&&A.matches&&A.matches.length>0&&!z?A.matches:Xa(ie,V,p),Ee=(J&&J.flushSync)===!0;if(be&&A.initialized&&!de&&GE(A.location,V)&&!(J&&J.submission&&qt(J.submission.formMethod))){Ce(V,{matches:be},{flushSync:Ee});return}let xe=sr(be,ie,V.pathname);if(xe.active&&xe.matches&&(be=xe.matches),!be){let{error:dt,notFoundMatches:Le,route:Ie}=Br(V.pathname);Ce(V,{matches:Le,loaderData:{},errors:{[Ie.id]:dt}},{flushSync:Ee});return}oe=new AbortController;let Ae=Tl(n.history,V,oe.signal,J&&J.submission),Te=new Ov(n.unstable_getContext?await n.unstable_getContext():void 0),Se;if(J&&J.pendingError)Se=[Nr(be).route.id,{type:"error",error:J.pendingError}];else if(J&&J.submission&&qt(J.submission.formMethod)){let dt=await Du(Ae,V,J.submission,be,Te,xe.active,J&&J.initialHydration===!0,{replace:J.replace,flushSync:Ee});if(dt.shortCircuited)return;if(dt.pendingActionResult){let[Le,Ie]=dt.pendingActionResult;if(nn(Ie)&&oo(Ie.error)&&Ie.error.status===404){oe=null,Ce(V,{matches:dt.matches,loaderData:{},errors:{[Le]:Ie.error}});return}}be=dt.matches||be,Se=dt.pendingActionResult,ue=Jf(V,J.submission),Ee=!1,xe.active=!1,Ae=Tl(n.history,Ae.url,Ae.signal)}let{shortCircuited:Re,matches:Ue,loaderData:Qe,errors:ft}=await Lu(Ae,V,be,Te,xe.active,ue,J&&J.submission,J&&J.fetcherSubmission,J&&J.replace,J&&J.initialHydration===!0,Ee,Se);Re||(oe=null,Ce(V,{matches:Ue||be,...Pv(Se),loaderData:Qe,errors:ft}))}async function Du(M,V,J,ie,ue,be,Ee,xe={}){Jl();let Ae=XE(V,J);if(me({navigation:Ae},{flushSync:xe.flushSync===!0}),be){let Re=await ur(ie,V.pathname,M.signal);if(Re.type==="aborted")return{shortCircuited:!0};if(Re.type==="error"){let Ue=Nr(Re.partialMatches).route.id;return{matches:Re.partialMatches,pendingActionResult:[Ue,{type:"error",error:Re.error}]}}else if(Re.matches)ie=Re.matches;else{let{notFoundMatches:Ue,error:Qe,route:ft}=Br(V.pathname);return{matches:Ue,pendingActionResult:[ft.id,{type:"error",error:Qe}]}}}let Te,Se=Js(ie,V);if(!Se.route.action&&!Se.route.lazy)Te={type:"error",error:xn(405,{method:M.method,pathname:V.pathname,routeId:Se.route.id})};else{let Re=Dl(s,u,M,ie,Se,Ee?[]:i,ue),Ue=await xa(M,Re,ue,null);if(Te=Ue[Se.route.id],!Te){for(let Qe of ie)if(Ue[Qe.route.id]){Te=Ue[Qe.route.id];break}}if(M.signal.aborted)return{shortCircuited:!0}}if(Tr(Te)){let Re;return xe&&xe.replace!=null?Re=xe.replace:Re=Lv(Te.response.headers.get("Location"),new URL(M.url),p)===A.location.pathname+A.location.search,await Fn(M,Te,!0,{submission:J,replace:Re}),{shortCircuited:!0}}if(nn(Te)){let Re=Nr(ie,Se.route.id);return(xe&&xe.replace)!==!0&&(X="PUSH"),{matches:ie,pendingActionResult:[Re.route.id,Te,Se.route.id]}}return{matches:ie,pendingActionResult:[Se.route.id,Te]}}async function Lu(M,V,J,ie,ue,be,Ee,xe,Ae,Te,Se,Re){let Ue=be||Jf(V,Ee),Qe=Ee||xe||$v(Ue),ft=!he&&!Te;if(ue){if(ft){let bt=Ft(Re);me({navigation:Ue,...bt!==void 0?{actionData:bt}:{}},{flushSync:Se})}let Be=await ur(J,V.pathname,M.signal);if(Be.type==="aborted")return{shortCircuited:!0};if(Be.type==="error"){let bt=Nr(Be.partialMatches).route.id;return{matches:Be.partialMatches,loaderData:{},errors:{[bt]:Be.error}}}else if(Be.matches)J=Be.matches;else{let{error:bt,notFoundMatches:cr,route:cn}=Br(V.pathname);return{matches:cr,loaderData:{},errors:{[cn.id]:bt}}}}let dt=h||f,{dsMatches:Le,revalidatingFetchers:Ie}=Tv(M,ie,s,u,n.history,A,J,Qe,V,Te?[]:i,Te===!0,de,ce,F,K,N,dt,p,n.patchRoutesOnNavigation!=null,Re);if(q=++ee,!n.dataStrategy&&!Le.some(Be=>Be.shouldLoad)&&Ie.length===0){let Be=rr();return Ce(V,{matches:J,loaderData:{},errors:Re&&nn(Re[1])?{[Re[0]]:Re[1].error}:null,...Pv(Re),...Be?{fetchers:new Map(A.fetchers)}:{}},{flushSync:Se}),{shortCircuited:!0}}if(ft){let Be={};if(!ue){Be.navigation=Ue;let bt=Ft(Re);bt!==void 0&&(Be.actionData=bt)}Ie.length>0&&(Be.fetchers=zu(Ie)),me(Be,{flushSync:Se})}Ie.forEach(Be=>{jn(Be.key),Be.controller&&_.set(Be.key,Be.controller)});let _n=()=>Ie.forEach(Be=>jn(Be.key));oe&&oe.signal.addEventListener("abort",_n);let{loaderResults:Xt,fetcherResults:kt}=await wo(Le,Ie,M,ie);if(M.signal.aborted)return{shortCircuited:!0};oe&&oe.signal.removeEventListener("abort",_n),Ie.forEach(Be=>_.delete(Be.key));let un=Ps(Xt);if(un)return await Fn(M,un.result,!0,{replace:Ae}),{shortCircuited:!0};if(un=Ps(kt),un)return N.add(un.key),await Fn(M,un.result,!0,{replace:Ae}),{shortCircuited:!0};let{loaderData:Vr,errors:Sa}=kv(A,J,Xt,Re,Ie,kt);Te&&A.errors&&(Sa={...A.errors,...Sa});let Qn=rr(),Zn=lr(q),Jn=Qn||Zn||Ie.length>0;return{matches:J,loaderData:Vr,errors:Sa,...Jn?{fetchers:new Map(A.fetchers)}:{}}}function Ft(M){if(M&&!nn(M[1]))return{[M[0]]:M[1].data};if(A.actionData)return Object.keys(A.actionData).length===0?null:A.actionData}function zu(M){return M.forEach(V=>{let J=A.fetchers.get(V.key),ie=Zi(void 0,J?J.data:void 0);A.fetchers.set(V.key,ie)}),new Map(A.fetchers)}async function xo(M,V,J,ie){jn(M);let ue=(ie&&ie.flushSync)===!0,be=h||f,Ee=wd(A.location,A.matches,p,J,V,ie?.relative),xe=Xa(be,Ee,p),Ae=sr(xe,be,Ee);if(Ae.active&&Ae.matches&&(xe=Ae.matches),!xe){st(M,V,xn(404,{pathname:Ee}),{flushSync:ue});return}let{path:Te,submission:Se,error:Re}=Nv(!0,Ee,ie);if(Re){st(M,V,Re,{flushSync:ue});return}let Ue=new Ov(n.unstable_getContext?await n.unstable_getContext():void 0),Qe=(ie&&ie.preventScrollReset)===!0;if(Se&&qt(Se.formMethod)){await So(M,V,Te,xe,Ue,Ae.active,ue,Qe,Se);return}K.set(M,{routeId:V,path:Te}),await Hr(M,V,Te,xe,Ue,Ae.active,ue,Qe,Se)}async function So(M,V,J,ie,ue,be,Ee,xe,Ae){Jl(),K.delete(M);let Te=A.fetchers.get(M);Ht(M,QE(Ae,Te),{flushSync:Ee});let Se=new AbortController,Re=Tl(n.history,J,Se.signal,Ae);if(be){let ut=await ur(ie,new URL(Re.url).pathname,Re.signal,M);if(ut.type==="aborted")return;if(ut.type==="error"){st(M,V,ut.error,{flushSync:Ee});return}else if(ut.matches)ie=ut.matches;else{st(M,V,xn(404,{pathname:J}),{flushSync:Ee});return}}let Ue=Js(ie,J);if(!Ue.route.action&&!Ue.route.lazy){let ut=xn(405,{method:Ae.formMethod,pathname:J,routeId:V});st(M,V,ut,{flushSync:Ee});return}_.set(M,Se);let Qe=ee,ft=Dl(s,u,Re,ie,Ue,i,ue),Le=(await xa(Re,ft,ue,M))[Ue.route.id];if(Re.signal.aborted){_.get(M)===Se&&_.delete(M);return}if(F.has(M)){if(Tr(Le)||nn(Le)){Ht(M,Ka(void 0));return}}else{if(Tr(Le))if(_.delete(M),q>Qe){Ht(M,Ka(void 0));return}else return N.add(M),Ht(M,Zi(Ae)),Fn(Re,Le,!1,{fetcherSubmission:Ae,preventScrollReset:xe});if(nn(Le)){st(M,V,Le.error);return}}let Ie=A.navigation.location||A.location,_n=Tl(n.history,Ie,Se.signal),Xt=h||f,kt=A.navigation.state!=="idle"?Xa(Xt,A.navigation.location,p):A.matches;Ve(kt,"Didn't find any matches after fetcher action");let un=++ee;pe.set(M,un);let Vr=Zi(Ae,Le.data);A.fetchers.set(M,Vr);let{dsMatches:Sa,revalidatingFetchers:Qn}=Tv(_n,ue,s,u,n.history,A,kt,Ae,Ie,i,!1,de,ce,F,K,N,Xt,p,n.patchRoutesOnNavigation!=null,[Ue.route.id,Le]);Qn.filter(ut=>ut.key!==M).forEach(ut=>{let wa=ut.key,Ao=A.fetchers.get(wa),No=Zi(void 0,Ao?Ao.data:void 0);A.fetchers.set(wa,No),jn(wa),ut.controller&&_.set(wa,ut.controller)}),me({fetchers:new Map(A.fetchers)});let Zn=()=>Qn.forEach(ut=>jn(ut.key));Se.signal.addEventListener("abort",Zn);let{loaderResults:Jn,fetcherResults:Be}=await wo(Sa,Qn,_n,ue);if(Se.signal.aborted)return;if(Se.signal.removeEventListener("abort",Zn),pe.delete(M),_.delete(M),Qn.forEach(ut=>_.delete(ut.key)),A.fetchers.has(M)){let ut=Ka(Le.data);A.fetchers.set(M,ut)}let bt=Ps(Jn);if(bt)return Fn(_n,bt.result,!1,{preventScrollReset:xe});if(bt=Ps(Be),bt)return N.add(bt.key),Fn(_n,bt.result,!1,{preventScrollReset:xe});let{loaderData:cr,errors:cn}=kv(A,kt,Jn,void 0,Qn,Be);lr(un),A.navigation.state==="loading"&&un>q?(Ve(X,"Expected pending action"),oe&&oe.abort(),Ce(A.navigation.location,{matches:kt,loaderData:cr,errors:cn,fetchers:new Map(A.fetchers)})):(me({errors:cn,loaderData:Uv(A.loaderData,cr,kt,cn),fetchers:new Map(A.fetchers)}),de=!1)}async function Hr(M,V,J,ie,ue,be,Ee,xe,Ae){let Te=A.fetchers.get(M);Ht(M,Zi(Ae,Te?Te.data:void 0),{flushSync:Ee});let Se=new AbortController,Re=Tl(n.history,J,Se.signal);if(be){let Ie=await ur(ie,new URL(Re.url).pathname,Re.signal,M);if(Ie.type==="aborted")return;if(Ie.type==="error"){st(M,V,Ie.error,{flushSync:Ee});return}else if(Ie.matches)ie=Ie.matches;else{st(M,V,xn(404,{pathname:J}),{flushSync:Ee});return}}let Ue=Js(ie,J);_.set(M,Se);let Qe=ee,ft=Dl(s,u,Re,ie,Ue,i,ue),Le=(await xa(Re,ft,ue,M))[Ue.route.id];if(_.get(M)===Se&&_.delete(M),!Re.signal.aborted){if(F.has(M)){Ht(M,Ka(void 0));return}if(Tr(Le))if(q>Qe){Ht(M,Ka(void 0));return}else{N.add(M),await Fn(Re,Le,!1,{preventScrollReset:xe});return}if(nn(Le)){st(M,V,Le.error);return}Ht(M,Ka(Le.data))}}async function Fn(M,V,J,{submission:ie,fetcherSubmission:ue,preventScrollReset:be,replace:Ee}={}){V.response.headers.has("X-Remix-Revalidate")&&(de=!0);let xe=V.response.headers.get("Location");Ve(xe,"Expected a Location header on the redirect Response"),xe=Lv(xe,new URL(M.url),p);let Ae=xd(A.location,xe,{_isRedirect:!0});if(l){let ft=!1;if(V.response.headers.has("X-Remix-Reload-Document"))ft=!0;else if(Pd(xe)){const dt=tE(xe,!0);ft=dt.origin!==a.location.origin||Sn(dt.pathname,p)==null}if(ft){Ee?a.location.replace(xe):a.location.assign(xe);return}}oe=null;let Te=Ee===!0||V.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Se,formAction:Re,formEncType:Ue}=A.navigation;!ie&&!ue&&Se&&Re&&Ue&&(ie=$v(A.navigation));let Qe=ie||ue;if(jE.has(V.response.status)&&Qe&&qt(Qe.formMethod))await Kt(Te,Ae,{submission:{...Qe,formAction:xe},preventScrollReset:be||ne,enableViewTransition:J?se:void 0});else{let ft=Jf(Ae,ie);await Kt(Te,Ae,{overrideNavigation:ft,fetcherSubmission:ue,preventScrollReset:be||ne,enableViewTransition:J?se:void 0})}}async function xa(M,V,J,ie){let ue,be={};try{ue=await BE(m,M,V,ie,J,!1)}catch(Ee){return V.filter(xe=>xe.shouldLoad).forEach(xe=>{be[xe.route.id]={type:"error",error:Ee}}),be}if(M.signal.aborted)return be;for(let[Ee,xe]of Object.entries(ue))if(KE(xe)){let Ae=xe.result;be[Ee]={type:"redirect",response:YE(Ae,M,Ee,V,p)}}else be[Ee]=await VE(xe);return be}async function wo(M,V,J,ie){let ue=xa(J,M,ie,null),be=Promise.all(V.map(async Ae=>{if(Ae.matches&&Ae.match&&Ae.request&&Ae.controller){let Se=(await xa(Ae.request,Ae.matches,ie,Ae.key))[Ae.match.route.id];return{[Ae.key]:Se}}else return Promise.resolve({[Ae.key]:{type:"error",error:xn(404,{pathname:Ae.path})}})})),Ee=await ue,xe=(await be).reduce((Ae,Te)=>Object.assign(Ae,Te),{});return{loaderResults:Ee,fetcherResults:xe}}function Jl(){de=!0,K.forEach((M,V)=>{_.has(V)&&ce.add(V),jn(V)})}function Ht(M,V,J={}){A.fetchers.set(M,V),me({fetchers:new Map(A.fetchers)},{flushSync:(J&&J.flushSync)===!0})}function st(M,V,J,ie={}){let ue=Nr(A.matches,V);Tt(M),me({errors:{[ue.route.id]:J},fetchers:new Map(A.fetchers)},{flushSync:(ie&&ie.flushSync)===!0})}function wn(M){return L.set(M,(L.get(M)||0)+1),F.has(M)&&F.delete(M),A.fetchers.get(M)||ME}function Tt(M){let V=A.fetchers.get(M);_.has(M)&&!(V&&V.state==="loading"&&pe.has(M))&&jn(M),K.delete(M),pe.delete(M),N.delete(M),F.delete(M),ce.delete(M),A.fetchers.delete(M)}function ku(M){let V=(L.get(M)||0)-1;V<=0?(L.delete(M),F.add(M)):L.set(M,V),me({fetchers:new Map(A.fetchers)})}function jn(M){let V=_.get(M);V&&(V.abort(),_.delete(M))}function Eo(M){for(let V of M){let J=wn(V),ie=Ka(J.data);A.fetchers.set(V,ie)}}function rr(){let M=[],V=!1;for(let J of N){let ie=A.fetchers.get(J);Ve(ie,`Expected fetcher: ${J}`),ie.state==="loading"&&(N.delete(J),M.push(J),V=!0)}return Eo(M),V}function lr(M){let V=[];for(let[J,ie]of pe)if(ie<M){let ue=A.fetchers.get(J);Ve(ue,`Expected fetcher: ${J}`),ue.state==="loading"&&(jn(J),pe.delete(J),V.push(J))}return Eo(V),V.length>0}function Xn(M,V){let J=A.blockers.get(M)||Qi;return W.get(M)!==V&&W.set(M,V),J}function ir(M){A.blockers.delete(M),W.delete(M)}function Mn(M,V){let J=A.blockers.get(M)||Qi;Ve(J.state==="unblocked"&&V.state==="blocked"||J.state==="blocked"&&V.state==="blocked"||J.state==="blocked"&&V.state==="proceeding"||J.state==="blocked"&&V.state==="unblocked"||J.state==="proceeding"&&V.state==="unblocked",`Invalid blocker state transition: ${J.state} -> ${V.state}`);let ie=new Map(A.blockers);ie.set(M,V),me({blockers:ie})}function Ro({currentLocation:M,nextLocation:V,historyAction:J}){if(W.size===0)return;W.size>1&&pt(!1,"A router only supports one blocker at a time");let ie=Array.from(W.entries()),[ue,be]=ie[ie.length-1],Ee=A.blockers.get(ue);if(!(Ee&&Ee.state==="proceeding")&&be({currentLocation:M,nextLocation:V,historyAction:J}))return ue}function Br(M){let V=xn(404,{pathname:M}),J=h||f,{matches:ie,route:ue}=Hv(J);return{notFoundMatches:ie,route:ue,error:V}}function Co(M,V,J){if(w=M,R=V,C=J||null,!T&&A.navigation===Zf){T=!0;let ie=Oo(A.location,A.matches);ie!=null&&me({restoreScrollPosition:ie})}return()=>{w=null,R=null,C=null}}function $r(M,V){return C&&C(M,V.map(ie=>oE(ie,A.loaderData)))||M.key}function or(M,V){if(w&&R){let J=$r(M,V);w[J]=R()}}function Oo(M,V){if(w){let J=$r(M,V),ie=w[J];if(typeof ie=="number")return ie}return null}function sr(M,V,J){if(n.patchRoutesOnNavigation)if(M){if(Object.keys(M[0].params).length>0)return{active:!0,matches:Zs(V,J,p,!0)}}else return{active:!0,matches:Zs(V,J,p,!0)||[]};return{active:!1,matches:null}}async function ur(M,V,J,ie){if(!n.patchRoutesOnNavigation)return{type:"success",matches:M};let ue=M;for(;;){let be=h==null,Ee=h||f,xe=u;try{await n.patchRoutesOnNavigation({signal:J,path:V,matches:ue,fetcherKey:ie,patch:(Se,Re)=>{J.aborted||jv(Se,Re,Ee,xe,s,!1)}})}catch(Se){return{type:"error",error:Se,partialMatches:ue}}finally{be&&!J.aborted&&(f=[...f])}if(J.aborted)return{type:"aborted"};let Ae=Xa(Ee,V,p);if(Ae)return{type:"success",matches:Ae};let Te=Zs(Ee,V,p,!0);if(!Te||ue.length===Te.length&&ue.every((Se,Re)=>Se.route.id===Te[Re].route.id))return{type:"success",matches:null};ue=Te}}function Il(M){u={},h=io(M,s,void 0,u)}function Wl(M,V,J=!1){let ie=h==null;jv(M,V,h||f,u,s,J),ie&&(f=[...f],me({}))}return P={get basename(){return p},get future(){return g},get state(){return A},get routes(){return f},get window(){return a},initialize:I,subscribe:fe,enableScrollRestoration:Co,navigate:Ye,fetch:xo,revalidate:Nt,createHref:M=>n.history.createHref(M),encodeLocation:M=>n.history.encodeLocation(M),getFetcher:wn,deleteFetcher:ku,dispose:te,getBlocker:Xn,deleteBlocker:ir,patchRoutes:Wl,_internalFetchControllers:_,_internalSetRoutes:Il,_internalSetStateDoNotUseOrYouWillBreakYourApp(M){me(M)}},P}function zE(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function wd(n,a,l,i,s,u){let f,h;if(s){f=[];for(let m of a)if(f.push(m),m.route.id===s){h=m;break}}else f=a,h=a[a.length-1];let p=vu(i||".",gu(f),Sn(n.pathname,l)||n.pathname,u==="path");if(i==null&&(p.search=n.search,p.hash=n.hash),(i==null||i===""||i===".")&&h){let m=Hd(p.search);if(h.route.index&&!m)p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index";else if(!h.route.index&&m){let g=new URLSearchParams(p.search),x=g.getAll("index");g.delete("index"),x.filter(w=>w).forEach(w=>g.append("index",w));let S=g.toString();p.search=S?`?${S}`:""}}return l!=="/"&&(p.pathname=xE({basename:l,pathname:p.pathname})),Ja(p)}function Nv(n,a,l){if(!l||!zE(l))return{path:a};if(l.formMethod&&!FE(l.formMethod))return{path:a,error:xn(405,{method:l.formMethod})};let i=()=>({path:a,error:xn(400,{type:"invalid-body"})}),u=(l.formMethod||"get").toUpperCase(),f=e0(a);if(l.body!==void 0){if(l.formEncType==="text/plain"){if(!qt(u))return i();let x=typeof l.body=="string"?l.body:l.body instanceof FormData||l.body instanceof URLSearchParams?Array.from(l.body.entries()).reduce((S,[w,C])=>`${S}${w}=${C}
65
+ `,""):String(l.body);return{path:a,submission:{formMethod:u,formAction:f,formEncType:l.formEncType,formData:void 0,json:void 0,text:x}}}else if(l.formEncType==="application/json"){if(!qt(u))return i();try{let x=typeof l.body=="string"?JSON.parse(l.body):l.body;return{path:a,submission:{formMethod:u,formAction:f,formEncType:l.formEncType,formData:void 0,json:x,text:void 0}}}catch{return i()}}}Ve(typeof FormData=="function","FormData is not available in this environment");let h,p;if(l.formData)h=Cd(l.formData),p=l.formData;else if(l.body instanceof FormData)h=Cd(l.body),p=l.body;else if(l.body instanceof URLSearchParams)h=l.body,p=zv(h);else if(l.body==null)h=new URLSearchParams,p=new FormData;else try{h=new URLSearchParams(l.body),p=zv(h)}catch{return i()}let m={formMethod:u,formAction:f,formEncType:l&&l.formEncType||"application/x-www-form-urlencoded",formData:p,json:void 0,text:void 0};if(qt(m.formMethod))return{path:a,submission:m};let g=ba(a);return n&&g.search&&Hd(g.search)&&h.append("index",""),g.search=`?${h}`,{path:Ja(g),submission:m}}function Tv(n,a,l,i,s,u,f,h,p,m,g,x,S,w,C,R,T,O,z,U){let $=U?nn(U[1])?U[1].error:U[1].data:void 0,P=s.createURL(u.location),A=s.createURL(p),X;if(g&&u.errors){let he=Object.keys(u.errors)[0];X=f.findIndex(de=>de.route.id===he)}else if(U&&nn(U[1])){let he=U[0];X=f.findIndex(de=>de.route.id===he)-1}let ne=U?U[1].statusCode:void 0,oe=ne&&ne>=400,se={currentUrl:P,currentParams:u.matches[0]?.params||{},nextUrl:A,nextParams:f[0].params,...h,actionResult:$,actionStatus:ne},Ne=f.map((he,de)=>{let{route:ce}=he,_=null;if(X!=null&&de>X?_=!1:ce.lazy?_=!0:ce.loader==null?_=!1:g?_=Ed(ce,u.loaderData,u.errors):kE(u.loaderData,u.matches[de],he)&&(_=!0),_!==null)return Rd(l,i,n,he,m,a,_);let ee=oe?!1:x||P.pathname+P.search===A.pathname+A.search||P.search!==A.search||UE(u.matches[de],he),q={...se,defaultShouldRevalidate:ee},pe=ou(he,q);return Rd(l,i,n,he,m,a,pe,q)}),we=[];return C.forEach((he,de)=>{if(g||!f.some(L=>L.route.id===he.routeId)||w.has(de))return;let ce=u.fetchers.get(de),_=ce&&ce.state!=="idle"&&ce.data===void 0,ee=Xa(T,he.path,O);if(!ee){if(z&&_)return;we.push({key:de,routeId:he.routeId,path:he.path,matches:null,match:null,request:null,controller:null});return}if(R.has(de))return;let q=Js(ee,he.path),pe=new AbortController,N=Tl(s,he.path,pe.signal),K=null;if(S.has(de))S.delete(de),K=Dl(l,i,N,ee,q,m,a);else if(_)x&&(K=Dl(l,i,N,ee,q,m,a));else{let L={...se,defaultShouldRevalidate:oe?!1:x};ou(q,L)&&(K=Dl(l,i,N,ee,q,m,a,L))}K&&we.push({key:de,routeId:he.routeId,path:he.path,matches:K,match:q,request:N,controller:pe})}),{dsMatches:Ne,revalidatingFetchers:we}}function Ed(n,a,l){if(n.lazy)return!0;if(!n.loader)return!1;let i=a!=null&&n.id in a,s=l!=null&&l[n.id]!==void 0;return!i&&s?!1:typeof n.loader=="function"&&n.loader.hydrate===!0?!0:!i&&!s}function kE(n,a,l){let i=!a||l.route.id!==a.route.id,s=!n.hasOwnProperty(l.route.id);return i||s}function UE(n,a){let l=n.route.path;return n.pathname!==a.pathname||l!=null&&l.endsWith("*")&&n.params["*"]!==a.params["*"]}function ou(n,a){if(n.route.shouldRevalidate){let l=n.route.shouldRevalidate(a);if(typeof l=="boolean")return l}return a.defaultShouldRevalidate}function jv(n,a,l,i,s,u){let f;if(n){let m=i[n];Ve(m,`No route found to patch children into: routeId = ${n}`),m.children||(m.children=[]),f=m.children}else f=l;let h=[],p=[];if(a.forEach(m=>{let g=f.find(x=>Qy(m,x));g?p.push({existingRoute:g,newRoute:m}):h.push(m)}),h.length>0){let m=io(h,s,[n||"_","patch",String(f?.length||"0")],i);f.push(...m)}if(u&&p.length>0)for(let m=0;m<p.length;m++){let{existingRoute:g,newRoute:x}=p[m],S=g,[w]=io([x],s,[],{},!0);Object.assign(S,{element:w.element?w.element:S.element,errorElement:w.errorElement?w.errorElement:S.errorElement,hydrateFallbackElement:w.hydrateFallbackElement?w.hydrateFallbackElement:S.hydrateFallbackElement})}}function Qy(n,a){return"id"in n&&"id"in a&&n.id===a.id?!0:n.index===a.index&&n.path===a.path&&n.caseSensitive===a.caseSensitive?(!n.children||n.children.length===0)&&(!a.children||a.children.length===0)?!0:n.children.every((l,i)=>a.children?.some(s=>Qy(l,s))):!1}var Mv=new WeakMap,Zy=({key:n,route:a,manifest:l,mapRouteProperties:i})=>{let s=l[a.id];if(Ve(s,"No route found in manifest"),!s.lazy||typeof s.lazy!="object")return;let u=s.lazy[n];if(!u)return;let f=Mv.get(s);f||(f={},Mv.set(s,f));let h=f[n];if(h)return h;let p=(async()=>{let m=aE(n),x=s[n]!==void 0&&n!=="hasErrorBoundary";if(m)pt(!m,"Route property "+n+" is not a supported lazy route property. This property will be ignored."),f[n]=Promise.resolve();else if(x)pt(!1,`Route "${s.id}" has a static property "${n}" defined. The lazy property will be ignored.`);else{let S=await u();S!=null&&(Object.assign(s,{[n]:S}),Object.assign(s,i(s)))}typeof s.lazy=="object"&&(s.lazy[n]=void 0,Object.values(s.lazy).every(S=>S===void 0)&&(s.lazy=void 0))})();return f[n]=p,p},_v=new WeakMap;function PE(n,a,l,i,s){let u=l[n.id];if(Ve(u,"No route found in manifest"),!n.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof n.lazy=="function"){let g=_v.get(u);if(g)return{lazyRoutePromise:g,lazyHandlerPromise:g};let x=(async()=>{Ve(typeof n.lazy=="function","No lazy route function found");let S=await n.lazy(),w={};for(let C in S){let R=S[C];if(R===void 0)continue;let T=lE(C),z=u[C]!==void 0&&C!=="hasErrorBoundary";T?pt(!T,"Route property "+C+" is not a supported property to be returned from a lazy route function. This property will be ignored."):z?pt(!z,`Route "${u.id}" has a static property "${C}" defined but its lazy function is also returning a value for this property. The lazy route property "${C}" will be ignored.`):w[C]=R}Object.assign(u,w),Object.assign(u,{...i(u),lazy:void 0})})();return _v.set(u,x),x.catch(()=>{}),{lazyRoutePromise:x,lazyHandlerPromise:x}}let f=Object.keys(n.lazy),h=[],p;for(let g of f){if(s&&s.includes(g))continue;let x=Zy({key:g,route:n,manifest:l,mapRouteProperties:i});x&&(h.push(x),g===a&&(p=x))}let m=h.length>0?Promise.all(h).then(()=>{}):void 0;return m?.catch(()=>{}),p?.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:p}}async function Dv(n){let a=n.matches.filter(s=>s.shouldLoad),l={};return(await Promise.all(a.map(s=>s.resolve()))).forEach((s,u)=>{l[a[u].route.id]=s}),l}async function HE(n){return n.matches.some(a=>a.route.unstable_middleware)?Jy(n,!1,()=>Dv(n),(a,l)=>({[l]:{type:"error",result:a}})):Dv(n)}async function Jy(n,a,l,i){let{matches:s,request:u,params:f,context:h}=n,p={handlerResult:void 0};try{let m=s.flatMap(x=>x.route.unstable_middleware?x.route.unstable_middleware.map(S=>[x.route.id,S]):[]),g=await Iy({request:u,params:f,context:h},m,a,p,l);return a?g:p.handlerResult}catch(m){if(!p.middlewareError)throw m;let g=await i(p.middlewareError.error,p.middlewareError.routeId);return p.handlerResult?Object.assign(p.handlerResult,g):g}}async function Iy(n,a,l,i,s,u=0){let{request:f}=n;if(f.signal.aborted)throw f.signal.reason?f.signal.reason:new Error(`Request aborted without an \`AbortSignal.reason\`: ${f.method} ${f.url}`);let h=a[u];if(!h)return i.handlerResult=await s(),i.handlerResult;let[p,m]=h,g=!1,x,S=async()=>{if(g)throw new Error("You may only call `next()` once per middleware");g=!0,await Iy(n,a,l,i,s,u+1)};try{let w=await m({request:n.request,params:n.params,context:n.context},S);return g?w===void 0?x:w:S()}catch(w){throw i.middlewareError?i.middlewareError.error!==w&&(i.middlewareError={routeId:p,error:w}):i.middlewareError={routeId:p,error:w},w}}function Wy(n,a,l,i,s){let u=Zy({key:"unstable_middleware",route:i.route,manifest:a,mapRouteProperties:n}),f=PE(i.route,qt(l.method)?"action":"loader",a,n,s);return{middleware:u,route:f.lazyRoutePromise,handler:f.lazyHandlerPromise}}function Rd(n,a,l,i,s,u,f,h=null){let p=!1,m=Wy(n,a,l,i,s);return{...i,_lazyPromises:m,shouldLoad:f,unstable_shouldRevalidateArgs:h,unstable_shouldCallHandler(g){return p=!0,h?typeof g=="boolean"?ou(i,{...h,defaultShouldRevalidate:g}):ou(i,h):f},resolve(g){return p||f||g&&!qt(l.method)&&(i.route.lazy||i.route.loader)?$E({request:l,match:i,lazyHandlerPromise:m?.handler,lazyRoutePromise:m?.route,handlerOverride:g,scopedContext:u}):Promise.resolve({type:"data",result:void 0})}}}function Dl(n,a,l,i,s,u,f,h=null){return i.map(p=>p.route.id!==s.route.id?{...p,shouldLoad:!1,unstable_shouldRevalidateArgs:h,unstable_shouldCallHandler:()=>!1,_lazyPromises:Wy(n,a,l,p,u),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Rd(n,a,l,p,u,f,!0,h))}async function BE(n,a,l,i,s,u){l.some(m=>m._lazyPromises?.middleware)&&await Promise.all(l.map(m=>m._lazyPromises?.middleware));let f={request:a,params:l[0].params,context:s,matches:l},p=await n({...f,fetcherKey:i,unstable_runClientMiddleware:m=>{let g=f;return Jy(g,!1,()=>m({...g,fetcherKey:i,unstable_runClientMiddleware:()=>{throw new Error("Cannot call `unstable_runClientMiddleware()` from within an `unstable_runClientMiddleware` handler")}}),(x,S)=>({[S]:{type:"error",result:x}}))}});try{await Promise.all(l.flatMap(m=>[m._lazyPromises?.handler,m._lazyPromises?.route]))}catch{}return p}async function $E({request:n,match:a,lazyHandlerPromise:l,lazyRoutePromise:i,handlerOverride:s,scopedContext:u}){let f,h,p=qt(n.method),m=p?"action":"loader",g=x=>{let S,w=new Promise((T,O)=>S=O);h=()=>S(),n.signal.addEventListener("abort",h);let C=T=>typeof x!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${m}" [routeId: ${a.route.id}]`)):x({request:n,params:a.params,context:u},...T!==void 0?[T]:[]),R=(async()=>{try{return{type:"data",result:await(s?s(O=>C(O)):C())}}catch(T){return{type:"error",result:T}}})();return Promise.race([R,w])};try{let x=p?a.route.action:a.route.loader;if(l||i)if(x){let S,[w]=await Promise.all([g(x).catch(C=>{S=C}),l,i]);if(S!==void 0)throw S;f=w}else{await l;let S=p?a.route.action:a.route.loader;if(S)[f]=await Promise.all([g(S),i]);else if(m==="action"){let w=new URL(n.url),C=w.pathname+w.search;throw xn(405,{method:n.method,pathname:C,routeId:a.route.id})}else return{type:"data",result:void 0}}else if(x)f=await g(x);else{let S=new URL(n.url),w=S.pathname+S.search;throw xn(404,{pathname:w})}}catch(x){return{type:"error",result:x}}finally{h&&n.signal.removeEventListener("abort",h)}return f}async function VE(n){let{result:a,type:l}=n;if(t0(a)){let i;try{let s=a.headers.get("Content-Type");s&&/\bapplication\/json\b/.test(s)?a.body==null?i=null:i=await a.json():i=await a.text()}catch(s){return{type:"error",error:s}}return l==="error"?{type:"error",error:new Sd(a.status,a.statusText,i),statusCode:a.status,headers:a.headers}:{type:"data",data:i,statusCode:a.status,headers:a.headers}}return l==="error"?Bv(a)?a.data instanceof Error?{type:"error",error:a.data,statusCode:a.init?.status,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"error",error:new Sd(a.init?.status||500,void 0,a.data),statusCode:oo(a)?a.status:void 0,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"error",error:a,statusCode:oo(a)?a.status:void 0}:Bv(a)?{type:"data",data:a.data,statusCode:a.init?.status,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"data",data:a}}function YE(n,a,l,i,s){let u=n.headers.get("Location");if(Ve(u,"Redirects returned/thrown from loaders/actions must have a Location header"),!Pd(u)){let f=i.slice(0,i.findIndex(h=>h.route.id===l)+1);u=wd(new URL(a.url),f,s,u),n.headers.set("Location",u)}return n}function Lv(n,a,l){if(Pd(n)){let i=n,s=i.startsWith("//")?new URL(a.protocol+i):new URL(i),u=Sn(s.pathname,l)!=null;if(s.origin===a.origin&&u)return s.pathname+s.search+s.hash}return n}function Tl(n,a,l,i){let s=n.createURL(e0(a)).toString(),u={signal:l};if(i&&qt(i.formMethod)){let{formMethod:f,formEncType:h}=i;u.method=f.toUpperCase(),h==="application/json"?(u.headers=new Headers({"Content-Type":h}),u.body=JSON.stringify(i.json)):h==="text/plain"?u.body=i.text:h==="application/x-www-form-urlencoded"&&i.formData?u.body=Cd(i.formData):u.body=i.formData}return new Request(s,u)}function Cd(n){let a=new URLSearchParams;for(let[l,i]of n.entries())a.append(l,typeof i=="string"?i:i.name);return a}function zv(n){let a=new FormData;for(let[l,i]of n.entries())a.append(l,i);return a}function qE(n,a,l,i=!1,s=!1){let u={},f=null,h,p=!1,m={},g=l&&nn(l[1])?l[1].error:void 0;return n.forEach(x=>{if(!(x.route.id in a))return;let S=x.route.id,w=a[S];if(Ve(!Tr(w),"Cannot handle redirect results in processLoaderData"),nn(w)){let C=w.error;if(g!==void 0&&(C=g,g=void 0),f=f||{},s)f[S]=C;else{let R=Nr(n,S);f[R.route.id]==null&&(f[R.route.id]=C)}i||(u[S]=Xy),p||(p=!0,h=oo(w.error)?w.error.status:500),w.headers&&(m[S]=w.headers)}else u[S]=w.data,w.statusCode&&w.statusCode!==200&&!p&&(h=w.statusCode),w.headers&&(m[S]=w.headers)}),g!==void 0&&l&&(f={[l[0]]:g},l[2]&&(u[l[2]]=void 0)),{loaderData:u,errors:f,statusCode:h||200,loaderHeaders:m}}function kv(n,a,l,i,s,u){let{loaderData:f,errors:h}=qE(a,l,i);return s.filter(p=>!p.matches||p.matches.some(m=>m.shouldLoad)).forEach(p=>{let{key:m,match:g,controller:x}=p,S=u[m];if(Ve(S,"Did not find corresponding fetcher result"),!(x&&x.signal.aborted))if(nn(S)){let w=Nr(n.matches,g?.route.id);h&&h[w.route.id]||(h={...h,[w.route.id]:S.error}),n.fetchers.delete(m)}else if(Tr(S))Ve(!1,"Unhandled fetcher revalidation redirect");else{let w=Ka(S.data);n.fetchers.set(m,w)}}),{loaderData:f,errors:h}}function Uv(n,a,l,i){let s=Object.entries(a).filter(([,u])=>u!==Xy).reduce((u,[f,h])=>(u[f]=h,u),{});for(let u of l){let f=u.route.id;if(!a.hasOwnProperty(f)&&n.hasOwnProperty(f)&&u.route.loader&&(s[f]=n[f]),i&&i.hasOwnProperty(f))break}return s}function Pv(n){return n?nn(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function Nr(n,a){return(a?n.slice(0,n.findIndex(i=>i.route.id===a)+1):[...n]).reverse().find(i=>i.route.hasErrorBoundary===!0)||n[0]}function Hv(n){let a=n.length===1?n[0]:n.find(l=>l.index||!l.path||l.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:a}],route:a}}function xn(n,{pathname:a,routeId:l,method:i,type:s,message:u}={}){let f="Unknown Server Error",h="Unknown @remix-run/router error";return n===400?(f="Bad Request",i&&a&&l?h=`You made a ${i} request to "${a}" but did not provide a \`loader\` for route "${l}", so there is no way to handle the request.`:s==="invalid-body"&&(h="Unable to encode submission body")):n===403?(f="Forbidden",h=`Route "${l}" does not match URL "${a}"`):n===404?(f="Not Found",h=`No route matches URL "${a}"`):n===405&&(f="Method Not Allowed",i&&a&&l?h=`You made a ${i.toUpperCase()} request to "${a}" but did not provide an \`action\` for route "${l}", so there is no way to handle the request.`:i&&(h=`Invalid request method "${i.toUpperCase()}"`)),new Sd(n||500,f,new Error(h),!0)}function Ps(n){let a=Object.entries(n);for(let l=a.length-1;l>=0;l--){let[i,s]=a[l];if(Tr(s))return{key:i,result:s}}}function e0(n){let a=typeof n=="string"?ba(n):n;return Ja({...a,hash:""})}function GE(n,a){return n.pathname!==a.pathname||n.search!==a.search?!1:n.hash===""?a.hash!=="":n.hash===a.hash?!0:a.hash!==""}function KE(n){return t0(n.result)&&TE.has(n.result.status)}function nn(n){return n.type==="error"}function Tr(n){return(n&&n.type)==="redirect"}function Bv(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function t0(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function FE(n){return NE.has(n.toUpperCase())}function qt(n){return OE.has(n.toUpperCase())}function Hd(n){return new URLSearchParams(n).getAll("index").some(a=>a==="")}function Js(n,a){let l=typeof a=="string"?ba(a).search:a.search;if(n[n.length-1].route.index&&Hd(l||""))return n[n.length-1];let i=Gy(n);return i[i.length-1]}function $v(n){let{formMethod:a,formAction:l,formEncType:i,text:s,formData:u,json:f}=n;if(!(!a||!l||!i)){if(s!=null)return{formMethod:a,formAction:l,formEncType:i,formData:void 0,json:void 0,text:s};if(u!=null)return{formMethod:a,formAction:l,formEncType:i,formData:u,json:void 0,text:void 0};if(f!==void 0)return{formMethod:a,formAction:l,formEncType:i,formData:void 0,json:f,text:void 0}}}function Jf(n,a){return a?{state:"loading",location:n,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}:{state:"loading",location:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function XE(n,a){return{state:"submitting",location:n,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}}function Zi(n,a){return n?{state:"loading",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:a}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:a}}function QE(n,a){return{state:"submitting",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:a?a.data:void 0}}function Ka(n){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function ZE(n,a){try{let l=n.sessionStorage.getItem(Fy);if(l){let i=JSON.parse(l);for(let[s,u]of Object.entries(i||{}))u&&Array.isArray(u)&&a.set(s,new Set(u||[]))}}catch{}}function JE(n,a){if(a.size>0){let l={};for(let[i,s]of a)l[i]=[...s];try{n.sessionStorage.setItem(Fy,JSON.stringify(l))}catch(i){pt(!1,`Failed to save applied view transitions in sessionStorage (${i}).`)}}}function IE(){let n,a,l=new Promise((i,s)=>{n=async u=>{i(u);try{await l}catch{}},a=async u=>{s(u);try{await l}catch{}}});return{promise:l,resolve:n,reject:a}}var Pr=v.createContext(null);Pr.displayName="DataRouter";var mo=v.createContext(null);mo.displayName="DataRouterState";v.createContext(!1);var Bd=v.createContext({isTransitioning:!1});Bd.displayName="ViewTransition";var n0=v.createContext(new Map);n0.displayName="Fetchers";var WE=v.createContext(null);WE.displayName="Await";var Nn=v.createContext(null);Nn.displayName="Navigation";var yu=v.createContext(null);yu.displayName="Location";var Gn=v.createContext({outlet:null,matches:[],isDataRoute:!1});Gn.displayName="Route";var $d=v.createContext(null);$d.displayName="RouteError";function eR(n,{relative:a}={}){Ve(Yl(),"useHref() may be used only in the context of a <Router> component.");let{basename:l,navigator:i}=v.useContext(Nn),{hash:s,pathname:u,search:f}=po(n,{relative:a}),h=u;return l!=="/"&&(h=u==="/"?l:$n([l,u])),i.createHref({pathname:h,search:f,hash:s})}function Yl(){return v.useContext(yu)!=null}function nr(){return Ve(Yl(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(yu).location}var a0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function r0(n){v.useContext(Nn).static||v.useLayoutEffect(n)}function bu(){let{isDataRoute:n}=v.useContext(Gn);return n?hR():tR()}function tR(){Ve(Yl(),"useNavigate() may be used only in the context of a <Router> component.");let n=v.useContext(Pr),{basename:a,navigator:l}=v.useContext(Nn),{matches:i}=v.useContext(Gn),{pathname:s}=nr(),u=JSON.stringify(gu(i)),f=v.useRef(!1);return r0(()=>{f.current=!0}),v.useCallback((p,m={})=>{if(pt(f.current,a0),!f.current)return;if(typeof p=="number"){l.go(p);return}let g=vu(p,JSON.parse(u),s,m.relative==="path");n==null&&a!=="/"&&(g.pathname=g.pathname==="/"?a:$n([a,g.pathname])),(m.replace?l.replace:l.push)(g,m.state,m)},[a,l,u,s,n])}v.createContext(null);function po(n,{relative:a}={}){let{matches:l}=v.useContext(Gn),{pathname:i}=nr(),s=JSON.stringify(gu(l));return v.useMemo(()=>vu(n,JSON.parse(s),i,a==="path"),[n,s,i,a])}function nR(n,a,l,i){Ve(Yl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=v.useContext(Nn),{matches:u}=v.useContext(Gn),f=u[u.length-1],h=f?f.params:{},p=f?f.pathname:"/",m=f?f.pathnameBase:"/",g=f&&f.route;{let O=g&&g.path||"";l0(p,!g||O.endsWith("*")||O.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${O}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
66
66
 
67
- Please change the parent <Route path="${A}"> to <Route path="${A==="/"?"*":`${A}/*`}">.`)}let x=tr(),S;S=x;let w=S.pathname||"/",C=w;if(m!=="/"){let A=m.replace(/^\//,"").split("/");C="/"+w.replace(/^\//,"").split("/").slice(A.length).join("/")}let R=Xa(n,{pathname:C});return ht(g||R!=null,`No routes matched location "${S.pathname}${S.search}${S.hash}" `),ht(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${S.pathname}${S.search}${S.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),oR(R&&R.map(A=>Object.assign({},A,{params:Object.assign({},h,A.params),pathname:$n([m,s.encodeLocation?s.encodeLocation(A.pathname).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?m:$n([m,s.encodeLocation?s.encodeLocation(A.pathnameBase).pathname:A.pathnameBase])})),u,l,i)}function aR(){let n=dR(),a=oo(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),l=n instanceof Error?n.stack:null,i="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:i},u={padding:"2px 4px",backgroundColor:i},f=null;return console.error("Error handled by React Router default ErrorBoundary:",n),f=v.createElement(v.Fragment,null,v.createElement("p",null,"💿 Hey developer 👋"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:u},"ErrorBoundary")," or"," ",v.createElement("code",{style:u},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},a),l?v.createElement("pre",{style:s},l):null,f)}var rR=v.createElement(aR,null),lR=class extends v.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,a){return a.location!==n.location||a.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:a.error,location:a.location,revalidation:n.revalidation||a.revalidation}}componentDidCatch(n,a){console.error("React Router caught the following error during render",n,a)}render(){return this.state.error!==void 0?v.createElement(Gn.Provider,{value:this.props.routeContext},v.createElement($d.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function iR({routeContext:n,match:a,children:l}){let i=v.useContext(Pr);return i&&i.static&&i.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=a.route.id),v.createElement(Gn.Provider,{value:n},l)}function oR(n,a=[],l=null,i=null){if(n==null){if(!l)return null;if(l.errors)n=l.matches;else if(a.length===0&&!l.initialized&&l.matches.length>0)n=l.matches;else return null}let s=n,u=l?.errors;if(u!=null){let p=s.findIndex(m=>m.route.id&&u?.[m.route.id]!==void 0);$e(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),s=s.slice(0,Math.min(s.length,p+1))}let f=!1,h=-1;if(l)for(let p=0;p<s.length;p++){let m=s[p];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(h=p),m.route.id){let{loaderData:g,errors:x}=l,S=m.route.loader&&!g.hasOwnProperty(m.route.id)&&(!x||x[m.route.id]===void 0);if(m.route.lazy||S){f=!0,h>=0?s=s.slice(0,h+1):s=[s[0]];break}}}return s.reduceRight((p,m,g)=>{let x,S=!1,w=null,C=null;l&&(x=u&&m.route.id?u[m.route.id]:void 0,w=m.route.errorElement||rR,f&&(h<0&&g===0?(l0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,C=null):h===g&&(S=!0,C=m.route.hydrateFallbackElement||null)));let R=a.concat(s.slice(0,g+1)),j=()=>{let A;return x?A=w:S?A=C:m.route.Component?A=v.createElement(m.route.Component,null):m.route.element?A=m.route.element:A=p,v.createElement(iR,{match:m,routeContext:{outlet:p,matches:R,isDataRoute:l!=null},children:A})};return l&&(m.route.ErrorBoundary||m.route.errorElement||g===0)?v.createElement(lR,{location:l.location,revalidation:l.revalidation,component:w,error:x,children:j(),routeContext:{outlet:null,matches:R,isDataRoute:!0}}):j()},null)}function Vd(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function sR(n){let a=v.useContext(Pr);return $e(a,Vd(n)),a}function uR(n){let a=v.useContext(mo);return $e(a,Vd(n)),a}function cR(n){let a=v.useContext(Gn);return $e(a,Vd(n)),a}function Yd(n){let a=cR(n),l=a.matches[a.matches.length-1];return $e(l.route.id,`${n} can only be used on routes that contain a unique "id"`),l.route.id}function fR(){return Yd("useRouteId")}function dR(){let n=v.useContext($d),a=uR("useRouteError"),l=Yd("useRouteError");return n!==void 0?n:a.errors?.[l]}function hR(){let{router:n}=sR("useNavigate"),a=Yd("useNavigate"),l=v.useRef(!1);return r0(()=>{l.current=!0}),v.useCallback(async(s,u={})=>{ht(l.current,a0),l.current&&(typeof s=="number"?n.navigate(s):await n.navigate(s,{fromRouteId:a,...u}))},[n,a])}var Vv={};function l0(n,a,l){!a&&!Vv[n]&&(Vv[n]=!0,ht(!1,l))}var Yv={};function qv(n,a){!n&&!Yv[a]&&(Yv[a]=!0,console.warn(a))}function mR(n){let a={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&ht(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(a,{element:v.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&ht(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(a,{hydrateFallbackElement:v.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&ht(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(a,{errorElement:v.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),a}var pR=["HydrateFallback","hydrateFallbackElement"];function gR(n,a){return LE({basename:a?.basename,unstable_getContext:a?.unstable_getContext,future:a?.future,history:Ww({initialEntries:a?.initialEntries,initialIndex:a?.initialIndex}),hydrationData:a?.hydrationData,routes:n,hydrationRouteProperties:pR,mapRouteProperties:mR,dataStrategy:a?.dataStrategy,patchRoutesOnNavigation:a?.patchRoutesOnNavigation}).initialize()}var vR=class{constructor(){this.status="pending",this.promise=new Promise((n,a)=>{this.resolve=l=>{this.status==="pending"&&(this.status="resolved",n(l))},this.reject=l=>{this.status==="pending"&&(this.status="rejected",a(l))}})}};function yR({router:n,flushSync:a}){let[l,i]=v.useState(n.state),[s,u]=v.useState(),[f,h]=v.useState({isTransitioning:!1}),[p,m]=v.useState(),[g,x]=v.useState(),[S,w]=v.useState(),C=v.useRef(new Map),R=v.useCallback((P,{deletedFetchers:Y,flushSync:B,viewTransitionOpts:N})=>{P.fetchers.forEach((ee,ie)=>{ee.data!==void 0&&C.current.set(ie,ee.data)}),Y.forEach(ee=>C.current.delete(ee)),qv(B===!1||a!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let X=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(qv(N==null||X,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!N||!X){a&&B?a(()=>i(P)):v.startTransition(()=>i(P));return}if(a&&B){a(()=>{g&&(p&&p.resolve(),g.skipTransition()),h({isTransitioning:!0,flushSync:!0,currentLocation:N.currentLocation,nextLocation:N.nextLocation})});let ee=n.window.document.startViewTransition(()=>{a(()=>i(P))});ee.finished.finally(()=>{a(()=>{m(void 0),x(void 0),u(void 0),h({isTransitioning:!1})})}),a(()=>x(ee));return}g?(p&&p.resolve(),g.skipTransition(),w({state:P,currentLocation:N.currentLocation,nextLocation:N.nextLocation})):(u(P),h({isTransitioning:!0,flushSync:!1,currentLocation:N.currentLocation,nextLocation:N.nextLocation}))},[n.window,a,g,p]);v.useLayoutEffect(()=>n.subscribe(R),[n,R]),v.useEffect(()=>{f.isTransitioning&&!f.flushSync&&m(new vR)},[f]),v.useEffect(()=>{if(p&&s&&n.window){let P=s,Y=p.promise,B=n.window.document.startViewTransition(async()=>{v.startTransition(()=>i(P)),await Y});B.finished.finally(()=>{m(void 0),x(void 0),u(void 0),h({isTransitioning:!1})}),x(B)}},[s,p,n.window]),v.useEffect(()=>{p&&s&&l.location.key===s.location.key&&p.resolve()},[p,g,l.location,s]),v.useEffect(()=>{!f.isTransitioning&&S&&(u(S.state),h({isTransitioning:!0,flushSync:!1,currentLocation:S.currentLocation,nextLocation:S.nextLocation}),w(void 0))},[f.isTransitioning,S]);let j=v.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:P=>n.navigate(P),push:(P,Y,B)=>n.navigate(P,{state:Y,preventScrollReset:B?.preventScrollReset}),replace:(P,Y,B)=>n.navigate(P,{replace:!0,state:Y,preventScrollReset:B?.preventScrollReset})}),[n]),A=n.basename||"/",k=v.useMemo(()=>({router:n,navigator:j,static:!1,basename:A}),[n,j,A]);return v.createElement(v.Fragment,null,v.createElement(Pr.Provider,{value:k},v.createElement(mo.Provider,{value:l},v.createElement(n0.Provider,{value:C.current},v.createElement(Bd.Provider,{value:f},v.createElement(wR,{basename:A,location:l.location,navigationType:l.historyAction,navigator:j},v.createElement(bR,{routes:n.routes,future:n.future,state:l})))))),null)}var bR=v.memo(xR);function xR({routes:n,future:a,state:l}){return nR(n,void 0,l,a)}function SR({to:n,replace:a,state:l,relative:i}){$e(Yl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=v.useContext(An);ht(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:u}=v.useContext(Gn),{pathname:f}=tr(),h=bu(),p=vu(n,gu(u),f,i==="path"),m=JSON.stringify(p);return v.useEffect(()=>{h(JSON.parse(m),{replace:a,state:l,relative:i})},[h,m,i,a,l]),null}function wR({basename:n="/",children:a=null,location:l,navigationType:i="POP",navigator:s,static:u=!1}){$e(!Yl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=n.replace(/^\/*/,"/"),h=v.useMemo(()=>({basename:f,navigator:s,static:u,future:{}}),[f,s,u]);typeof l=="string"&&(l=ba(l));let{pathname:p="/",search:m="",hash:g="",state:x=null,key:S="default"}=l,w=v.useMemo(()=>{let C=bn(p,f);return C==null?null:{location:{pathname:C,search:m,hash:g,state:x,key:S},navigationType:i}},[f,p,m,g,x,S,i]);return ht(w!=null,`<Router basename="${f}"> is not able to match the URL "${p}${m}${g}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:v.createElement(An.Provider,{value:h},v.createElement(yu.Provider,{children:a,value:w}))}var Is="get",Ws="application/x-www-form-urlencoded";function xu(n){return n!=null&&typeof n.tagName=="string"}function ER(n){return xu(n)&&n.tagName.toLowerCase()==="button"}function RR(n){return xu(n)&&n.tagName.toLowerCase()==="form"}function CR(n){return xu(n)&&n.tagName.toLowerCase()==="input"}function OR(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function AR(n,a){return n.button===0&&(!a||a==="_self")&&!OR(n)}var Hs=null;function NR(){if(Hs===null)try{new FormData(document.createElement("form"),0),Hs=!1}catch{Hs=!0}return Hs}var TR=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function If(n){return n!=null&&!TR.has(n)?(ht(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ws}"`),null):n}function jR(n,a){let l,i,s,u,f;if(RR(n)){let h=n.getAttribute("action");i=h?bn(h,a):null,l=n.getAttribute("method")||Is,s=If(n.getAttribute("enctype"))||Ws,u=new FormData(n)}else if(ER(n)||CR(n)&&(n.type==="submit"||n.type==="image")){let h=n.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=n.getAttribute("formaction")||h.getAttribute("action");if(i=p?bn(p,a):null,l=n.getAttribute("formmethod")||h.getAttribute("method")||Is,s=If(n.getAttribute("formenctype"))||If(h.getAttribute("enctype"))||Ws,u=new FormData(h,n),!NR()){let{name:m,type:g,value:x}=n;if(g==="image"){let S=m?`${m}.`:"";u.append(`${S}x`,"0"),u.append(`${S}y`,"0")}else m&&u.append(m,x)}}else{if(xu(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');l=Is,i=null,s=Ws,f=n}return u&&s==="text/plain"&&(f=u,u=void 0),{action:i,method:l.toLowerCase(),encType:s,formData:u,body:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function qd(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function MR(n,a,l){let i=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return i.pathname==="/"?i.pathname=`_root.${l}`:a&&bn(i.pathname,a)==="/"?i.pathname=`${a.replace(/\/$/,"")}/_root.${l}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${l}`,i}async function _R(n,a){if(n.id in a)return a[n.id];try{let l=await import(n.module);return a[n.id]=l,l}catch(l){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(l),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function DR(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function LR(n,a,l){let i=await Promise.all(n.map(async s=>{let u=a.routes[s.route.id];if(u){let f=await _R(u,l);return f.links?f.links():[]}return[]}));return PR(i.flat(1).filter(DR).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function Gv(n,a,l,i,s,u){let f=(p,m)=>l[m]?p.route.id!==l[m].route.id:!0,h=(p,m)=>l[m].pathname!==p.pathname||l[m].route.path?.endsWith("*")&&l[m].params["*"]!==p.params["*"];return u==="assets"?a.filter((p,m)=>f(p,m)||h(p,m)):u==="data"?a.filter((p,m)=>{let g=i.routes[p.route.id];if(!g||!g.hasLoader)return!1;if(f(p,m)||h(p,m))return!0;if(p.route.shouldRevalidate){let x=p.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:l[0]?.params||{},nextUrl:new URL(n,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function zR(n,a,{includeHydrateFallback:l}={}){return kR(n.map(i=>{let s=a.routes[i.route.id];if(!s)return[];let u=[s.module];return s.clientActionModule&&(u=u.concat(s.clientActionModule)),s.clientLoaderModule&&(u=u.concat(s.clientLoaderModule)),l&&s.hydrateFallbackModule&&(u=u.concat(s.hydrateFallbackModule)),s.imports&&(u=u.concat(s.imports)),u}).flat(1))}function kR(n){return[...new Set(n)]}function UR(n){let a={},l=Object.keys(n).sort();for(let i of l)a[i]=n[i];return a}function PR(n,a){let l=new Set;return new Set(a),n.reduce((i,s)=>{let u=JSON.stringify(UR(s));return l.has(u)||(l.add(u),i.push({key:u,link:s})),i},[])}function i0(){let n=v.useContext(Pr);return qd(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function HR(){let n=v.useContext(mo);return qd(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Gd=v.createContext(void 0);Gd.displayName="FrameworkContext";function o0(){let n=v.useContext(Gd);return qd(n,"You must render this element inside a <HydratedRouter> element"),n}function BR(n,a){let l=v.useContext(Gd),[i,s]=v.useState(!1),[u,f]=v.useState(!1),{onFocus:h,onBlur:p,onMouseEnter:m,onMouseLeave:g,onTouchStart:x}=a,S=v.useRef(null);v.useEffect(()=>{if(n==="render"&&f(!0),n==="viewport"){let R=A=>{A.forEach(k=>{f(k.isIntersecting)})},j=new IntersectionObserver(R,{threshold:.5});return S.current&&j.observe(S.current),()=>{j.disconnect()}}},[n]),v.useEffect(()=>{if(i){let R=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(R)}}},[i]);let w=()=>{s(!0)},C=()=>{s(!1),f(!1)};return l?n!=="intent"?[u,S,{}]:[u,S,{onFocus:Ji(h,w),onBlur:Ji(p,C),onMouseEnter:Ji(m,w),onMouseLeave:Ji(g,C),onTouchStart:Ji(x,w)}]:[!1,S,{}]}function Ji(n,a){return l=>{n&&n(l),l.defaultPrevented||a(l)}}function $R({page:n,...a}){let{router:l}=i0(),i=v.useMemo(()=>Xa(l.routes,n,l.basename),[l.routes,n,l.basename]);return i?v.createElement(YR,{page:n,matches:i,...a}):null}function VR(n){let{manifest:a,routeModules:l}=o0(),[i,s]=v.useState([]);return v.useEffect(()=>{let u=!1;return LR(n,a,l).then(f=>{u||s(f)}),()=>{u=!0}},[n,a,l]),i}function YR({page:n,matches:a,...l}){let i=tr(),{manifest:s,routeModules:u}=o0(),{basename:f}=i0(),{loaderData:h,matches:p}=HR(),m=v.useMemo(()=>Gv(n,a,p,s,i,"data"),[n,a,p,s,i]),g=v.useMemo(()=>Gv(n,a,p,s,i,"assets"),[n,a,p,s,i]),x=v.useMemo(()=>{if(n===i.pathname+i.search+i.hash)return[];let C=new Set,R=!1;if(a.forEach(A=>{let k=s.routes[A.route.id];!k||!k.hasLoader||(!m.some(P=>P.route.id===A.route.id)&&A.route.id in h&&u[A.route.id]?.shouldRevalidate||k.hasClientLoader?R=!0:C.add(A.route.id))}),C.size===0)return[];let j=MR(n,f,"data");return R&&C.size>0&&j.searchParams.set("_routes",a.filter(A=>C.has(A.route.id)).map(A=>A.route.id).join(",")),[j.pathname+j.search]},[f,h,i,s,m,a,n,u]),S=v.useMemo(()=>zR(g,s),[g,s]),w=VR(g);return v.createElement(v.Fragment,null,x.map(C=>v.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...l})),S.map(C=>v.createElement("link",{key:C,rel:"modulepreload",href:C,...l})),w.map(({key:C,link:R})=>v.createElement("link",{key:C,...R})))}function qR(...n){return a=>{n.forEach(l=>{typeof l=="function"?l(a):l!=null&&(l.current=a)})}}var s0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{s0&&(window.__reactRouterVersion="7.7.0")}catch{}var u0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,c0=v.forwardRef(function({onClick:a,discover:l="render",prefetch:i="none",relative:s,reloadDocument:u,replace:f,state:h,target:p,to:m,preventScrollReset:g,viewTransition:x,...S},w){let{basename:C}=v.useContext(An),R=typeof m=="string"&&u0.test(m),j,A=!1;if(typeof m=="string"&&R&&(j=m,s0))try{let ie=new URL(window.location.href),oe=m.startsWith("//")?new URL(ie.protocol+m):new URL(m),Oe=bn(oe.pathname,C);oe.origin===ie.origin&&Oe!=null?m=Oe+oe.search+oe.hash:A=!0}catch{ht(!1,`<Link to="${m}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let k=eR(m,{relative:s}),[P,Y,B]=BR(i,S),N=XR(m,{replace:f,state:h,target:p,preventScrollReset:g,relative:s,viewTransition:x});function X(ie){a&&a(ie),ie.defaultPrevented||N(ie)}let ee=v.createElement("a",{...S,...B,href:j||k,onClick:A||u?a:X,ref:qR(w,Y),target:p,"data-discover":!R&&l==="render"?"true":void 0});return P&&!R?v.createElement(v.Fragment,null,ee,v.createElement($R,{page:k})):ee});c0.displayName="Link";var GR=v.forwardRef(function({"aria-current":a="page",caseSensitive:l=!1,className:i="",end:s=!1,style:u,to:f,viewTransition:h,children:p,...m},g){let x=po(f,{relative:m.relative}),S=tr(),w=v.useContext(mo),{navigator:C,basename:R}=v.useContext(An),j=w!=null&&WR(x)&&h===!0,A=C.encodeLocation?C.encodeLocation(x).pathname:x.pathname,k=S.pathname,P=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;l||(k=k.toLowerCase(),P=P?P.toLowerCase():null,A=A.toLowerCase()),P&&R&&(P=bn(P,R)||P);const Y=A!=="/"&&A.endsWith("/")?A.length-1:A.length;let B=k===A||!s&&k.startsWith(A)&&k.charAt(Y)==="/",N=P!=null&&(P===A||!s&&P.startsWith(A)&&P.charAt(A.length)==="/"),X={isActive:B,isPending:N,isTransitioning:j},ee=B?a:void 0,ie;typeof i=="function"?ie=i(X):ie=[i,B?"active":null,N?"pending":null,j?"transitioning":null].filter(Boolean).join(" ");let oe=typeof u=="function"?u(X):u;return v.createElement(c0,{...m,"aria-current":ee,className:ie,ref:g,style:oe,to:f,viewTransition:h},typeof p=="function"?p(X):p)});GR.displayName="NavLink";var KR=v.forwardRef(({discover:n="render",fetcherKey:a,navigate:l,reloadDocument:i,replace:s,state:u,method:f=Is,action:h,onSubmit:p,relative:m,preventScrollReset:g,viewTransition:x,...S},w)=>{let C=JR(),R=IR(h,{relative:m}),j=f.toLowerCase()==="get"?"get":"post",A=typeof h=="string"&&u0.test(h),k=P=>{if(p&&p(P),P.defaultPrevented)return;P.preventDefault();let Y=P.nativeEvent.submitter,B=Y?.getAttribute("formmethod")||f;C(Y||P.currentTarget,{fetcherKey:a,method:B,navigate:l,replace:s,state:u,relative:m,preventScrollReset:g,viewTransition:x})};return v.createElement("form",{ref:w,method:j,action:R,onSubmit:i?p:k,...S,"data-discover":!A&&n==="render"?"true":void 0})});KR.displayName="Form";function FR(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function f0(n){let a=v.useContext(Pr);return $e(a,FR(n)),a}function XR(n,{target:a,replace:l,state:i,preventScrollReset:s,relative:u,viewTransition:f}={}){let h=bu(),p=tr(),m=po(n,{relative:u});return v.useCallback(g=>{if(AR(g,a)){g.preventDefault();let x=l!==void 0?l:Za(p)===Za(m);h(n,{replace:x,state:i,preventScrollReset:s,relative:u,viewTransition:f})}},[p,h,m,l,i,a,n,s,u,f])}var QR=0,ZR=()=>`__${String(++QR)}__`;function JR(){let{router:n}=f0("useSubmit"),{basename:a}=v.useContext(An),l=fR();return v.useCallback(async(i,s={})=>{let{action:u,method:f,encType:h,formData:p,body:m}=jR(i,a);if(s.navigate===!1){let g=s.fetcherKey||ZR();await n.fetch(g,l,s.action||u,{preventScrollReset:s.preventScrollReset,formData:p,body:m,formMethod:s.method||f,formEncType:s.encType||h,flushSync:s.flushSync})}else await n.navigate(s.action||u,{preventScrollReset:s.preventScrollReset,formData:p,body:m,formMethod:s.method||f,formEncType:s.encType||h,replace:s.replace,state:s.state,fromRouteId:l,flushSync:s.flushSync,viewTransition:s.viewTransition})},[n,a,l])}function IR(n,{relative:a}={}){let{basename:l}=v.useContext(An),i=v.useContext(Gn);$e(i,"useFormAction must be used inside a RouteContext");let[s]=i.matches.slice(-1),u={...po(n||".",{relative:a})},f=tr();if(n==null){u.search=f.search;let h=new URLSearchParams(u.search),p=h.getAll("index");if(p.some(g=>g==="")){h.delete("index"),p.filter(x=>x).forEach(x=>h.append("index",x));let g=h.toString();u.search=g?`?${g}`:""}}return(!n||n===".")&&s.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),l!=="/"&&(u.pathname=u.pathname==="/"?l:$n([l,u.pathname])),Za(u)}function WR(n,a={}){let l=v.useContext(Bd);$e(l!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=f0("useViewTransitionState"),s=po(n,{relative:a.relative});if(!l.isTransitioning)return!1;let u=bn(l.currentLocation.pathname,i)||l.currentLocation.pathname,f=bn(l.nextLocation.pathname,i)||l.nextLocation.pathname;return iu(s.pathname,f)!=null||iu(s.pathname,u)!=null}var Su=$y();const eC=My(Su);function tC(n){return v.createElement(yR,{flushSync:Su.flushSync,...n})}function Yt(n,a,{checkForDefaultPrevented:l=!0}={}){return function(s){if(n?.(s),l===!1||!s.defaultPrevented)return a?.(s)}}function Kv(n,a){if(typeof n=="function")return n(a);n!=null&&(n.current=a)}function _r(...n){return a=>{let l=!1;const i=n.map(s=>{const u=Kv(s,a);return!l&&typeof u=="function"&&(l=!0),u});if(l)return()=>{for(let s=0;s<i.length;s++){const u=i[s];typeof u=="function"?u():Kv(n[s],null)}}}}function ln(...n){return v.useCallback(_r(...n),n)}function nC(n,a){const l=v.createContext(a),i=u=>{const{children:f,...h}=u,p=v.useMemo(()=>h,Object.values(h));return y.jsx(l.Provider,{value:p,children:f})};i.displayName=n+"Provider";function s(u){const f=v.useContext(l);if(f)return f;if(a!==void 0)return a;throw new Error(`\`${u}\` must be used within \`${n}\``)}return[i,s]}function wu(n,a=[]){let l=[];function i(u,f){const h=v.createContext(f),p=l.length;l=[...l,f];const m=x=>{const{scope:S,children:w,...C}=x,R=S?.[n]?.[p]||h,j=v.useMemo(()=>C,Object.values(C));return y.jsx(R.Provider,{value:j,children:w})};m.displayName=u+"Provider";function g(x,S){const w=S?.[n]?.[p]||h,C=v.useContext(w);if(C)return C;if(f!==void 0)return f;throw new Error(`\`${x}\` must be used within \`${u}\``)}return[m,g]}const s=()=>{const u=l.map(f=>v.createContext(f));return function(h){const p=h?.[n]||u;return v.useMemo(()=>({[`__scope${n}`]:{...h,[n]:p}}),[h,p])}};return s.scopeName=n,[i,aC(s,...a)]}function aC(...n){const a=n[0];if(n.length===1)return a;const l=()=>{const i=n.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(u){const f=i.reduce((h,{useScope:p,scopeName:m})=>{const x=p(u)[`__scope${m}`];return{...h,...x}},{});return v.useMemo(()=>({[`__scope${a.scopeName}`]:f}),[f])}};return l.scopeName=a.scopeName,l}var Ja=globalThis?.document?v.useLayoutEffect:()=>{},rC=Ly[" useId ".trim().toString()]||(()=>{}),lC=0;function Vn(n){const[a,l]=v.useState(rC());return Ja(()=>{l(i=>i??String(lC++))},[n]),n||(a?`radix-${a}`:"")}var iC=Ly[" useInsertionEffect ".trim().toString()]||Ja;function Kd({prop:n,defaultProp:a,onChange:l=()=>{},caller:i}){const[s,u,f]=oC({defaultProp:a,onChange:l}),h=n!==void 0,p=h?n:s;{const g=v.useRef(n!==void 0);v.useEffect(()=>{const x=g.current;x!==h&&console.warn(`${i} is changing from ${x?"controlled":"uncontrolled"} to ${h?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=h},[h,i])}const m=v.useCallback(g=>{if(h){const x=sC(g)?g(n):g;x!==n&&f.current?.(x)}else u(g)},[h,n,u,f]);return[p,m]}function oC({defaultProp:n,onChange:a}){const[l,i]=v.useState(n),s=v.useRef(l),u=v.useRef(a);return iC(()=>{u.current=a},[a]),v.useEffect(()=>{s.current!==l&&(u.current?.(l),s.current=l)},[l,s]),[l,i,u]}function sC(n){return typeof n=="function"}function Eu(n){const a=cC(n),l=v.forwardRef((i,s)=>{const{children:u,...f}=i,h=v.Children.toArray(u),p=h.find(dC);if(p){const m=p.props.children,g=h.map(x=>x===p?v.Children.count(m)>1?v.Children.only(null):v.isValidElement(m)?m.props.children:null:x);return y.jsx(a,{...f,ref:s,children:v.isValidElement(m)?v.cloneElement(m,void 0,g):null})}return y.jsx(a,{...f,ref:s,children:u})});return l.displayName=`${n}.Slot`,l}var uC=Eu("Slot");function cC(n){const a=v.forwardRef((l,i)=>{const{children:s,...u}=l;if(v.isValidElement(s)){const f=mC(s),h=hC(u,s.props);return s.type!==v.Fragment&&(h.ref=i?_r(i,f):f),v.cloneElement(s,h)}return v.Children.count(s)>1?v.Children.only(null):null});return a.displayName=`${n}.SlotClone`,a}var fC=Symbol("radix.slottable");function dC(n){return v.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===fC}function hC(n,a){const l={...a};for(const i in a){const s=n[i],u=a[i];/^on[A-Z]/.test(i)?s&&u?l[i]=(...h)=>{const p=u(...h);return s(...h),p}:s&&(l[i]=s):i==="style"?l[i]={...s,...u}:i==="className"&&(l[i]=[s,u].filter(Boolean).join(" "))}return{...n,...l}}function mC(n){let a=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,l=a&&"isReactWarning"in a&&a.isReactWarning;return l?n.ref:(a=Object.getOwnPropertyDescriptor(n,"ref")?.get,l=a&&"isReactWarning"in a&&a.isReactWarning,l?n.props.ref:n.props.ref||n.ref)}var pC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],at=pC.reduce((n,a)=>{const l=Eu(`Primitive.${a}`),i=v.forwardRef((s,u)=>{const{asChild:f,...h}=s,p=f?l:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(p,{...h,ref:u})});return i.displayName=`Primitive.${a}`,{...n,[a]:i}},{});function gC(n,a){n&&Su.flushSync(()=>n.dispatchEvent(a))}function Ul(n){const a=v.useRef(n);return v.useEffect(()=>{a.current=n}),v.useMemo(()=>(...l)=>a.current?.(...l),[])}function vC(n,a=globalThis?.document){const l=Ul(n);v.useEffect(()=>{const i=s=>{s.key==="Escape"&&l(s)};return a.addEventListener("keydown",i,{capture:!0}),()=>a.removeEventListener("keydown",i,{capture:!0})},[l,a])}var yC="DismissableLayer",Od="dismissableLayer.update",bC="dismissableLayer.pointerDownOutside",xC="dismissableLayer.focusOutside",Fv,d0=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Fd=v.forwardRef((n,a)=>{const{disableOutsidePointerEvents:l=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:u,onInteractOutside:f,onDismiss:h,...p}=n,m=v.useContext(d0),[g,x]=v.useState(null),S=g?.ownerDocument??globalThis?.document,[,w]=v.useState({}),C=ln(a,X=>x(X)),R=Array.from(m.layers),[j]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),A=R.indexOf(j),k=g?R.indexOf(g):-1,P=m.layersWithOutsidePointerEventsDisabled.size>0,Y=k>=A,B=EC(X=>{const ee=X.target,ie=[...m.branches].some(oe=>oe.contains(ee));!Y||ie||(s?.(X),f?.(X),X.defaultPrevented||h?.())},S),N=RC(X=>{const ee=X.target;[...m.branches].some(oe=>oe.contains(ee))||(u?.(X),f?.(X),X.defaultPrevented||h?.())},S);return vC(X=>{k===m.layers.size-1&&(i?.(X),!X.defaultPrevented&&h&&(X.preventDefault(),h()))},S),v.useEffect(()=>{if(g)return l&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(Fv=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(g)),m.layers.add(g),Xv(),()=>{l&&m.layersWithOutsidePointerEventsDisabled.size===1&&(S.body.style.pointerEvents=Fv)}},[g,S,l,m]),v.useEffect(()=>()=>{g&&(m.layers.delete(g),m.layersWithOutsidePointerEventsDisabled.delete(g),Xv())},[g,m]),v.useEffect(()=>{const X=()=>w({});return document.addEventListener(Od,X),()=>document.removeEventListener(Od,X)},[]),y.jsx(at.div,{...p,ref:C,style:{pointerEvents:P?Y?"auto":"none":void 0,...n.style},onFocusCapture:Yt(n.onFocusCapture,N.onFocusCapture),onBlurCapture:Yt(n.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Yt(n.onPointerDownCapture,B.onPointerDownCapture)})});Fd.displayName=yC;var SC="DismissableLayerBranch",wC=v.forwardRef((n,a)=>{const l=v.useContext(d0),i=v.useRef(null),s=ln(a,i);return v.useEffect(()=>{const u=i.current;if(u)return l.branches.add(u),()=>{l.branches.delete(u)}},[l.branches]),y.jsx(at.div,{...n,ref:s})});wC.displayName=SC;function EC(n,a=globalThis?.document){const l=Ul(n),i=v.useRef(!1),s=v.useRef(()=>{});return v.useEffect(()=>{const u=h=>{if(h.target&&!i.current){let p=function(){h0(bC,l,m,{discrete:!0})};const m={originalEvent:h};h.pointerType==="touch"?(a.removeEventListener("click",s.current),s.current=p,a.addEventListener("click",s.current,{once:!0})):p()}else a.removeEventListener("click",s.current);i.current=!1},f=window.setTimeout(()=>{a.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(f),a.removeEventListener("pointerdown",u),a.removeEventListener("click",s.current)}},[a,l]),{onPointerDownCapture:()=>i.current=!0}}function RC(n,a=globalThis?.document){const l=Ul(n),i=v.useRef(!1);return v.useEffect(()=>{const s=u=>{u.target&&!i.current&&h0(xC,l,{originalEvent:u},{discrete:!1})};return a.addEventListener("focusin",s),()=>a.removeEventListener("focusin",s)},[a,l]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function Xv(){const n=new CustomEvent(Od);document.dispatchEvent(n)}function h0(n,a,l,{discrete:i}){const s=l.originalEvent.target,u=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:l});a&&s.addEventListener(n,a,{once:!0}),i?gC(s,u):s.dispatchEvent(u)}var Wf="focusScope.autoFocusOnMount",ed="focusScope.autoFocusOnUnmount",Qv={bubbles:!1,cancelable:!0},CC="FocusScope",Xd=v.forwardRef((n,a)=>{const{loop:l=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:u,...f}=n,[h,p]=v.useState(null),m=Ul(s),g=Ul(u),x=v.useRef(null),S=ln(a,R=>p(R)),w=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(i){let R=function(P){if(w.paused||!h)return;const Y=P.target;h.contains(Y)?x.current=Y:Fa(x.current,{select:!0})},j=function(P){if(w.paused||!h)return;const Y=P.relatedTarget;Y!==null&&(h.contains(Y)||Fa(x.current,{select:!0}))},A=function(P){if(document.activeElement===document.body)for(const B of P)B.removedNodes.length>0&&Fa(h)};document.addEventListener("focusin",R),document.addEventListener("focusout",j);const k=new MutationObserver(A);return h&&k.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",R),document.removeEventListener("focusout",j),k.disconnect()}}},[i,h,w.paused]),v.useEffect(()=>{if(h){Jv.add(w);const R=document.activeElement;if(!h.contains(R)){const A=new CustomEvent(Wf,Qv);h.addEventListener(Wf,m),h.dispatchEvent(A),A.defaultPrevented||(OC(MC(m0(h)),{select:!0}),document.activeElement===R&&Fa(h))}return()=>{h.removeEventListener(Wf,m),setTimeout(()=>{const A=new CustomEvent(ed,Qv);h.addEventListener(ed,g),h.dispatchEvent(A),A.defaultPrevented||Fa(R??document.body,{select:!0}),h.removeEventListener(ed,g),Jv.remove(w)},0)}}},[h,m,g,w]);const C=v.useCallback(R=>{if(!l&&!i||w.paused)return;const j=R.key==="Tab"&&!R.altKey&&!R.ctrlKey&&!R.metaKey,A=document.activeElement;if(j&&A){const k=R.currentTarget,[P,Y]=AC(k);P&&Y?!R.shiftKey&&A===Y?(R.preventDefault(),l&&Fa(P,{select:!0})):R.shiftKey&&A===P&&(R.preventDefault(),l&&Fa(Y,{select:!0})):A===k&&R.preventDefault()}},[l,i,w.paused]);return y.jsx(at.div,{tabIndex:-1,...f,ref:S,onKeyDown:C})});Xd.displayName=CC;function OC(n,{select:a=!1}={}){const l=document.activeElement;for(const i of n)if(Fa(i,{select:a}),document.activeElement!==l)return}function AC(n){const a=m0(n),l=Zv(a,n),i=Zv(a.reverse(),n);return[l,i]}function m0(n){const a=[],l=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;l.nextNode();)a.push(l.currentNode);return a}function Zv(n,a){for(const l of n)if(!NC(l,{upTo:a}))return l}function NC(n,{upTo:a}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(a!==void 0&&n===a)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function TC(n){return n instanceof HTMLInputElement&&"select"in n}function Fa(n,{select:a=!1}={}){if(n&&n.focus){const l=document.activeElement;n.focus({preventScroll:!0}),n!==l&&TC(n)&&a&&n.select()}}var Jv=jC();function jC(){let n=[];return{add(a){const l=n[0];a!==l&&l?.pause(),n=Iv(n,a),n.unshift(a)},remove(a){n=Iv(n,a),n[0]?.resume()}}}function Iv(n,a){const l=[...n],i=l.indexOf(a);return i!==-1&&l.splice(i,1),l}function MC(n){return n.filter(a=>a.tagName!=="A")}var _C="Portal",Qd=v.forwardRef((n,a)=>{const{container:l,...i}=n,[s,u]=v.useState(!1);Ja(()=>u(!0),[]);const f=l||s&&globalThis?.document?.body;return f?eC.createPortal(y.jsx(at.div,{...i,ref:a}),f):null});Qd.displayName=_C;function DC(n,a){return v.useReducer((l,i)=>a[l][i]??l,n)}var ql=n=>{const{present:a,children:l}=n,i=LC(a),s=typeof l=="function"?l({present:i.isPresent}):v.Children.only(l),u=ln(i.ref,zC(s));return typeof l=="function"||i.isPresent?v.cloneElement(s,{ref:u}):null};ql.displayName="Presence";function LC(n){const[a,l]=v.useState(),i=v.useRef(null),s=v.useRef(n),u=v.useRef("none"),f=n?"mounted":"unmounted",[h,p]=DC(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const m=Bs(i.current);u.current=h==="mounted"?m:"none"},[h]),Ja(()=>{const m=i.current,g=s.current;if(g!==n){const S=u.current,w=Bs(m);n?p("MOUNT"):w==="none"||m?.display==="none"?p("UNMOUNT"):p(g&&S!==w?"ANIMATION_OUT":"UNMOUNT"),s.current=n}},[n,p]),Ja(()=>{if(a){let m;const g=a.ownerDocument.defaultView??window,x=w=>{const R=Bs(i.current).includes(w.animationName);if(w.target===a&&R&&(p("ANIMATION_END"),!s.current)){const j=a.style.animationFillMode;a.style.animationFillMode="forwards",m=g.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=j)})}},S=w=>{w.target===a&&(u.current=Bs(i.current))};return a.addEventListener("animationstart",S),a.addEventListener("animationcancel",x),a.addEventListener("animationend",x),()=>{g.clearTimeout(m),a.removeEventListener("animationstart",S),a.removeEventListener("animationcancel",x),a.removeEventListener("animationend",x)}}else p("ANIMATION_END")},[a,p]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:v.useCallback(m=>{i.current=m?getComputedStyle(m):null,l(m)},[])}}function Bs(n){return n?.animationName||"none"}function zC(n){let a=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,l=a&&"isReactWarning"in a&&a.isReactWarning;return l?n.ref:(a=Object.getOwnPropertyDescriptor(n,"ref")?.get,l=a&&"isReactWarning"in a&&a.isReactWarning,l?n.props.ref:n.props.ref||n.ref)}var td=0;function p0(){v.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??Wv()),document.body.insertAdjacentElement("beforeend",n[1]??Wv()),td++,()=>{td===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(a=>a.remove()),td--}},[])}function Wv(){const n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}var Pn=function(){return Pn=Object.assign||function(a){for(var l,i=1,s=arguments.length;i<s;i++){l=arguments[i];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(a[u]=l[u])}return a},Pn.apply(this,arguments)};function g0(n,a){var l={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.indexOf(i)<0&&(l[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(n);s<i.length;s++)a.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(n,i[s])&&(l[i[s]]=n[i[s]]);return l}function kC(n,a,l){if(l||arguments.length===2)for(var i=0,s=a.length,u;i<s;i++)(u||!(i in a))&&(u||(u=Array.prototype.slice.call(a,0,i)),u[i]=a[i]);return n.concat(u||Array.prototype.slice.call(a))}var eu="right-scroll-bar-position",tu="width-before-scroll-bar",UC="with-scroll-bars-hidden",PC="--removed-body-scroll-bar-size";function nd(n,a){return typeof n=="function"?n(a):n&&(n.current=a),n}function HC(n,a){var l=v.useState(function(){return{value:n,callback:a,facade:{get current(){return l.value},set current(i){var s=l.value;s!==i&&(l.value=i,l.callback(i,s))}}}})[0];return l.callback=a,l.facade}var BC=typeof window<"u"?v.useLayoutEffect:v.useEffect,ey=new WeakMap;function $C(n,a){var l=HC(null,function(i){return n.forEach(function(s){return nd(s,i)})});return BC(function(){var i=ey.get(l);if(i){var s=new Set(i),u=new Set(n),f=l.current;s.forEach(function(h){u.has(h)||nd(h,null)}),u.forEach(function(h){s.has(h)||nd(h,f)})}ey.set(l,n)},[n]),l}function VC(n){return n}function YC(n,a){a===void 0&&(a=VC);var l=[],i=!1,s={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return l.length?l[l.length-1]:n},useMedium:function(u){var f=a(u,i);return l.push(f),function(){l=l.filter(function(h){return h!==f})}},assignSyncMedium:function(u){for(i=!0;l.length;){var f=l;l=[],f.forEach(u)}l={push:function(h){return u(h)},filter:function(){return l}}},assignMedium:function(u){i=!0;var f=[];if(l.length){var h=l;l=[],h.forEach(u),f=l}var p=function(){var g=f;f=[],g.forEach(u)},m=function(){return Promise.resolve().then(p)};m(),l={push:function(g){f.push(g),m()},filter:function(g){return f=f.filter(g),l}}}};return s}function qC(n){n===void 0&&(n={});var a=YC(null);return a.options=Pn({async:!0,ssr:!1},n),a}var v0=function(n){var a=n.sideCar,l=g0(n,["sideCar"]);if(!a)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=a.read();if(!i)throw new Error("Sidecar medium not found");return v.createElement(i,Pn({},l))};v0.isSideCarExport=!0;function GC(n,a){return n.useMedium(a),v0}var y0=qC(),ad=function(){},Ru=v.forwardRef(function(n,a){var l=v.useRef(null),i=v.useState({onScrollCapture:ad,onWheelCapture:ad,onTouchMoveCapture:ad}),s=i[0],u=i[1],f=n.forwardProps,h=n.children,p=n.className,m=n.removeScrollBar,g=n.enabled,x=n.shards,S=n.sideCar,w=n.noRelative,C=n.noIsolation,R=n.inert,j=n.allowPinchZoom,A=n.as,k=A===void 0?"div":A,P=n.gapMode,Y=g0(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),B=S,N=$C([l,a]),X=Pn(Pn({},Y),s);return v.createElement(v.Fragment,null,g&&v.createElement(B,{sideCar:y0,removeScrollBar:m,shards:x,noRelative:w,noIsolation:C,inert:R,setCallbacks:u,allowPinchZoom:!!j,lockRef:l,gapMode:P}),f?v.cloneElement(v.Children.only(h),Pn(Pn({},X),{ref:N})):v.createElement(k,Pn({},X,{className:p,ref:N}),h))});Ru.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ru.classNames={fullWidth:tu,zeroRight:eu};var KC=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function FC(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var a=KC();return a&&n.setAttribute("nonce",a),n}function XC(n,a){n.styleSheet?n.styleSheet.cssText=a:n.appendChild(document.createTextNode(a))}function QC(n){var a=document.head||document.getElementsByTagName("head")[0];a.appendChild(n)}var ZC=function(){var n=0,a=null;return{add:function(l){n==0&&(a=FC())&&(XC(a,l),QC(a)),n++},remove:function(){n--,!n&&a&&(a.parentNode&&a.parentNode.removeChild(a),a=null)}}},JC=function(){var n=ZC();return function(a,l){v.useEffect(function(){return n.add(a),function(){n.remove()}},[a&&l])}},b0=function(){var n=JC(),a=function(l){var i=l.styles,s=l.dynamic;return n(i,s),null};return a},IC={left:0,top:0,right:0,gap:0},rd=function(n){return parseInt(n||"",10)||0},WC=function(n){var a=window.getComputedStyle(document.body),l=a[n==="padding"?"paddingLeft":"marginLeft"],i=a[n==="padding"?"paddingTop":"marginTop"],s=a[n==="padding"?"paddingRight":"marginRight"];return[rd(l),rd(i),rd(s)]},e2=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return IC;var a=WC(n),l=document.documentElement.clientWidth,i=window.innerWidth;return{left:a[0],top:a[1],right:a[2],gap:Math.max(0,i-l+a[2]-a[0])}},t2=b0(),Ll="data-scroll-locked",n2=function(n,a,l,i){var s=n.left,u=n.top,f=n.right,h=n.gap;return l===void 0&&(l="margin"),`
67
+ Please change the parent <Route path="${O}"> to <Route path="${O==="/"?"*":`${O}/*`}">.`)}let x=nr(),S;S=x;let w=S.pathname||"/",C=w;if(m!=="/"){let O=m.replace(/^\//,"").split("/");C="/"+w.replace(/^\//,"").split("/").slice(O.length).join("/")}let R=Xa(n,{pathname:C});return pt(g||R!=null,`No routes matched location "${S.pathname}${S.search}${S.hash}" `),pt(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${S.pathname}${S.search}${S.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),oR(R&&R.map(O=>Object.assign({},O,{params:Object.assign({},h,O.params),pathname:$n([m,s.encodeLocation?s.encodeLocation(O.pathname).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?m:$n([m,s.encodeLocation?s.encodeLocation(O.pathnameBase).pathname:O.pathnameBase])})),u,l,i)}function aR(){let n=dR(),a=oo(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),l=n instanceof Error?n.stack:null,i="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:i},u={padding:"2px 4px",backgroundColor:i},f=null;return console.error("Error handled by React Router default ErrorBoundary:",n),f=v.createElement(v.Fragment,null,v.createElement("p",null,"💿 Hey developer 👋"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:u},"ErrorBoundary")," or"," ",v.createElement("code",{style:u},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},a),l?v.createElement("pre",{style:s},l):null,f)}var rR=v.createElement(aR,null),lR=class extends v.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,a){return a.location!==n.location||a.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:a.error,location:a.location,revalidation:n.revalidation||a.revalidation}}componentDidCatch(n,a){console.error("React Router caught the following error during render",n,a)}render(){return this.state.error!==void 0?v.createElement(Gn.Provider,{value:this.props.routeContext},v.createElement($d.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function iR({routeContext:n,match:a,children:l}){let i=v.useContext(Pr);return i&&i.static&&i.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=a.route.id),v.createElement(Gn.Provider,{value:n},l)}function oR(n,a=[],l=null,i=null){if(n==null){if(!l)return null;if(l.errors)n=l.matches;else if(a.length===0&&!l.initialized&&l.matches.length>0)n=l.matches;else return null}let s=n,u=l?.errors;if(u!=null){let p=s.findIndex(m=>m.route.id&&u?.[m.route.id]!==void 0);Ve(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),s=s.slice(0,Math.min(s.length,p+1))}let f=!1,h=-1;if(l)for(let p=0;p<s.length;p++){let m=s[p];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(h=p),m.route.id){let{loaderData:g,errors:x}=l,S=m.route.loader&&!g.hasOwnProperty(m.route.id)&&(!x||x[m.route.id]===void 0);if(m.route.lazy||S){f=!0,h>=0?s=s.slice(0,h+1):s=[s[0]];break}}}return s.reduceRight((p,m,g)=>{let x,S=!1,w=null,C=null;l&&(x=u&&m.route.id?u[m.route.id]:void 0,w=m.route.errorElement||rR,f&&(h<0&&g===0?(l0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,C=null):h===g&&(S=!0,C=m.route.hydrateFallbackElement||null)));let R=a.concat(s.slice(0,g+1)),T=()=>{let O;return x?O=w:S?O=C:m.route.Component?O=v.createElement(m.route.Component,null):m.route.element?O=m.route.element:O=p,v.createElement(iR,{match:m,routeContext:{outlet:p,matches:R,isDataRoute:l!=null},children:O})};return l&&(m.route.ErrorBoundary||m.route.errorElement||g===0)?v.createElement(lR,{location:l.location,revalidation:l.revalidation,component:w,error:x,children:T(),routeContext:{outlet:null,matches:R,isDataRoute:!0}}):T()},null)}function Vd(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function sR(n){let a=v.useContext(Pr);return Ve(a,Vd(n)),a}function uR(n){let a=v.useContext(mo);return Ve(a,Vd(n)),a}function cR(n){let a=v.useContext(Gn);return Ve(a,Vd(n)),a}function Yd(n){let a=cR(n),l=a.matches[a.matches.length-1];return Ve(l.route.id,`${n} can only be used on routes that contain a unique "id"`),l.route.id}function fR(){return Yd("useRouteId")}function dR(){let n=v.useContext($d),a=uR("useRouteError"),l=Yd("useRouteError");return n!==void 0?n:a.errors?.[l]}function hR(){let{router:n}=sR("useNavigate"),a=Yd("useNavigate"),l=v.useRef(!1);return r0(()=>{l.current=!0}),v.useCallback(async(s,u={})=>{pt(l.current,a0),l.current&&(typeof s=="number"?n.navigate(s):await n.navigate(s,{fromRouteId:a,...u}))},[n,a])}var Vv={};function l0(n,a,l){!a&&!Vv[n]&&(Vv[n]=!0,pt(!1,l))}var Yv={};function qv(n,a){!n&&!Yv[a]&&(Yv[a]=!0,console.warn(a))}function mR(n){let a={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&pt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(a,{element:v.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&pt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(a,{hydrateFallbackElement:v.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&pt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(a,{errorElement:v.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),a}var pR=["HydrateFallback","hydrateFallbackElement"];function gR(n,a){return LE({basename:a?.basename,unstable_getContext:a?.unstable_getContext,future:a?.future,history:Ww({initialEntries:a?.initialEntries,initialIndex:a?.initialIndex}),hydrationData:a?.hydrationData,routes:n,hydrationRouteProperties:pR,mapRouteProperties:mR,dataStrategy:a?.dataStrategy,patchRoutesOnNavigation:a?.patchRoutesOnNavigation}).initialize()}var vR=class{constructor(){this.status="pending",this.promise=new Promise((n,a)=>{this.resolve=l=>{this.status==="pending"&&(this.status="resolved",n(l))},this.reject=l=>{this.status==="pending"&&(this.status="rejected",a(l))}})}};function yR({router:n,flushSync:a}){let[l,i]=v.useState(n.state),[s,u]=v.useState(),[f,h]=v.useState({isTransitioning:!1}),[p,m]=v.useState(),[g,x]=v.useState(),[S,w]=v.useState(),C=v.useRef(new Map),R=v.useCallback((U,{deletedFetchers:$,flushSync:P,viewTransitionOpts:A})=>{U.fetchers.forEach((ne,oe)=>{ne.data!==void 0&&C.current.set(oe,ne.data)}),$.forEach(ne=>C.current.delete(ne)),qv(P===!1||a!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let X=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(qv(A==null||X,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!A||!X){a&&P?a(()=>i(U)):v.startTransition(()=>i(U));return}if(a&&P){a(()=>{g&&(p&&p.resolve(),g.skipTransition()),h({isTransitioning:!0,flushSync:!0,currentLocation:A.currentLocation,nextLocation:A.nextLocation})});let ne=n.window.document.startViewTransition(()=>{a(()=>i(U))});ne.finished.finally(()=>{a(()=>{m(void 0),x(void 0),u(void 0),h({isTransitioning:!1})})}),a(()=>x(ne));return}g?(p&&p.resolve(),g.skipTransition(),w({state:U,currentLocation:A.currentLocation,nextLocation:A.nextLocation})):(u(U),h({isTransitioning:!0,flushSync:!1,currentLocation:A.currentLocation,nextLocation:A.nextLocation}))},[n.window,a,g,p]);v.useLayoutEffect(()=>n.subscribe(R),[n,R]),v.useEffect(()=>{f.isTransitioning&&!f.flushSync&&m(new vR)},[f]),v.useEffect(()=>{if(p&&s&&n.window){let U=s,$=p.promise,P=n.window.document.startViewTransition(async()=>{v.startTransition(()=>i(U)),await $});P.finished.finally(()=>{m(void 0),x(void 0),u(void 0),h({isTransitioning:!1})}),x(P)}},[s,p,n.window]),v.useEffect(()=>{p&&s&&l.location.key===s.location.key&&p.resolve()},[p,g,l.location,s]),v.useEffect(()=>{!f.isTransitioning&&S&&(u(S.state),h({isTransitioning:!0,flushSync:!1,currentLocation:S.currentLocation,nextLocation:S.nextLocation}),w(void 0))},[f.isTransitioning,S]);let T=v.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:U=>n.navigate(U),push:(U,$,P)=>n.navigate(U,{state:$,preventScrollReset:P?.preventScrollReset}),replace:(U,$,P)=>n.navigate(U,{replace:!0,state:$,preventScrollReset:P?.preventScrollReset})}),[n]),O=n.basename||"/",z=v.useMemo(()=>({router:n,navigator:T,static:!1,basename:O}),[n,T,O]);return v.createElement(v.Fragment,null,v.createElement(Pr.Provider,{value:z},v.createElement(mo.Provider,{value:l},v.createElement(n0.Provider,{value:C.current},v.createElement(Bd.Provider,{value:f},v.createElement(wR,{basename:O,location:l.location,navigationType:l.historyAction,navigator:T},v.createElement(bR,{routes:n.routes,future:n.future,state:l})))))),null)}var bR=v.memo(xR);function xR({routes:n,future:a,state:l}){return nR(n,void 0,l,a)}function SR({to:n,replace:a,state:l,relative:i}){Ve(Yl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=v.useContext(Nn);pt(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:u}=v.useContext(Gn),{pathname:f}=nr(),h=bu(),p=vu(n,gu(u),f,i==="path"),m=JSON.stringify(p);return v.useEffect(()=>{h(JSON.parse(m),{replace:a,state:l,relative:i})},[h,m,i,a,l]),null}function wR({basename:n="/",children:a=null,location:l,navigationType:i="POP",navigator:s,static:u=!1}){Ve(!Yl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=n.replace(/^\/*/,"/"),h=v.useMemo(()=>({basename:f,navigator:s,static:u,future:{}}),[f,s,u]);typeof l=="string"&&(l=ba(l));let{pathname:p="/",search:m="",hash:g="",state:x=null,key:S="default"}=l,w=v.useMemo(()=>{let C=Sn(p,f);return C==null?null:{location:{pathname:C,search:m,hash:g,state:x,key:S},navigationType:i}},[f,p,m,g,x,S,i]);return pt(w!=null,`<Router basename="${f}"> is not able to match the URL "${p}${m}${g}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:v.createElement(Nn.Provider,{value:h},v.createElement(yu.Provider,{children:a,value:w}))}var Is="get",Ws="application/x-www-form-urlencoded";function xu(n){return n!=null&&typeof n.tagName=="string"}function ER(n){return xu(n)&&n.tagName.toLowerCase()==="button"}function RR(n){return xu(n)&&n.tagName.toLowerCase()==="form"}function CR(n){return xu(n)&&n.tagName.toLowerCase()==="input"}function OR(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function AR(n,a){return n.button===0&&(!a||a==="_self")&&!OR(n)}var Hs=null;function NR(){if(Hs===null)try{new FormData(document.createElement("form"),0),Hs=!1}catch{Hs=!0}return Hs}var TR=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function If(n){return n!=null&&!TR.has(n)?(pt(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ws}"`),null):n}function jR(n,a){let l,i,s,u,f;if(RR(n)){let h=n.getAttribute("action");i=h?Sn(h,a):null,l=n.getAttribute("method")||Is,s=If(n.getAttribute("enctype"))||Ws,u=new FormData(n)}else if(ER(n)||CR(n)&&(n.type==="submit"||n.type==="image")){let h=n.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=n.getAttribute("formaction")||h.getAttribute("action");if(i=p?Sn(p,a):null,l=n.getAttribute("formmethod")||h.getAttribute("method")||Is,s=If(n.getAttribute("formenctype"))||If(h.getAttribute("enctype"))||Ws,u=new FormData(h,n),!NR()){let{name:m,type:g,value:x}=n;if(g==="image"){let S=m?`${m}.`:"";u.append(`${S}x`,"0"),u.append(`${S}y`,"0")}else m&&u.append(m,x)}}else{if(xu(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');l=Is,i=null,s=Ws,f=n}return u&&s==="text/plain"&&(f=u,u=void 0),{action:i,method:l.toLowerCase(),encType:s,formData:u,body:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function qd(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function MR(n,a,l){let i=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return i.pathname==="/"?i.pathname=`_root.${l}`:a&&Sn(i.pathname,a)==="/"?i.pathname=`${a.replace(/\/$/,"")}/_root.${l}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${l}`,i}async function _R(n,a){if(n.id in a)return a[n.id];try{let l=await import(n.module);return a[n.id]=l,l}catch(l){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(l),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function DR(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function LR(n,a,l){let i=await Promise.all(n.map(async s=>{let u=a.routes[s.route.id];if(u){let f=await _R(u,l);return f.links?f.links():[]}return[]}));return PR(i.flat(1).filter(DR).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function Gv(n,a,l,i,s,u){let f=(p,m)=>l[m]?p.route.id!==l[m].route.id:!0,h=(p,m)=>l[m].pathname!==p.pathname||l[m].route.path?.endsWith("*")&&l[m].params["*"]!==p.params["*"];return u==="assets"?a.filter((p,m)=>f(p,m)||h(p,m)):u==="data"?a.filter((p,m)=>{let g=i.routes[p.route.id];if(!g||!g.hasLoader)return!1;if(f(p,m)||h(p,m))return!0;if(p.route.shouldRevalidate){let x=p.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:l[0]?.params||{},nextUrl:new URL(n,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function zR(n,a,{includeHydrateFallback:l}={}){return kR(n.map(i=>{let s=a.routes[i.route.id];if(!s)return[];let u=[s.module];return s.clientActionModule&&(u=u.concat(s.clientActionModule)),s.clientLoaderModule&&(u=u.concat(s.clientLoaderModule)),l&&s.hydrateFallbackModule&&(u=u.concat(s.hydrateFallbackModule)),s.imports&&(u=u.concat(s.imports)),u}).flat(1))}function kR(n){return[...new Set(n)]}function UR(n){let a={},l=Object.keys(n).sort();for(let i of l)a[i]=n[i];return a}function PR(n,a){let l=new Set;return new Set(a),n.reduce((i,s)=>{let u=JSON.stringify(UR(s));return l.has(u)||(l.add(u),i.push({key:u,link:s})),i},[])}function i0(){let n=v.useContext(Pr);return qd(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function HR(){let n=v.useContext(mo);return qd(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Gd=v.createContext(void 0);Gd.displayName="FrameworkContext";function o0(){let n=v.useContext(Gd);return qd(n,"You must render this element inside a <HydratedRouter> element"),n}function BR(n,a){let l=v.useContext(Gd),[i,s]=v.useState(!1),[u,f]=v.useState(!1),{onFocus:h,onBlur:p,onMouseEnter:m,onMouseLeave:g,onTouchStart:x}=a,S=v.useRef(null);v.useEffect(()=>{if(n==="render"&&f(!0),n==="viewport"){let R=O=>{O.forEach(z=>{f(z.isIntersecting)})},T=new IntersectionObserver(R,{threshold:.5});return S.current&&T.observe(S.current),()=>{T.disconnect()}}},[n]),v.useEffect(()=>{if(i){let R=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(R)}}},[i]);let w=()=>{s(!0)},C=()=>{s(!1),f(!1)};return l?n!=="intent"?[u,S,{}]:[u,S,{onFocus:Ji(h,w),onBlur:Ji(p,C),onMouseEnter:Ji(m,w),onMouseLeave:Ji(g,C),onTouchStart:Ji(x,w)}]:[!1,S,{}]}function Ji(n,a){return l=>{n&&n(l),l.defaultPrevented||a(l)}}function $R({page:n,...a}){let{router:l}=i0(),i=v.useMemo(()=>Xa(l.routes,n,l.basename),[l.routes,n,l.basename]);return i?v.createElement(YR,{page:n,matches:i,...a}):null}function VR(n){let{manifest:a,routeModules:l}=o0(),[i,s]=v.useState([]);return v.useEffect(()=>{let u=!1;return LR(n,a,l).then(f=>{u||s(f)}),()=>{u=!0}},[n,a,l]),i}function YR({page:n,matches:a,...l}){let i=nr(),{manifest:s,routeModules:u}=o0(),{basename:f}=i0(),{loaderData:h,matches:p}=HR(),m=v.useMemo(()=>Gv(n,a,p,s,i,"data"),[n,a,p,s,i]),g=v.useMemo(()=>Gv(n,a,p,s,i,"assets"),[n,a,p,s,i]),x=v.useMemo(()=>{if(n===i.pathname+i.search+i.hash)return[];let C=new Set,R=!1;if(a.forEach(O=>{let z=s.routes[O.route.id];!z||!z.hasLoader||(!m.some(U=>U.route.id===O.route.id)&&O.route.id in h&&u[O.route.id]?.shouldRevalidate||z.hasClientLoader?R=!0:C.add(O.route.id))}),C.size===0)return[];let T=MR(n,f,"data");return R&&C.size>0&&T.searchParams.set("_routes",a.filter(O=>C.has(O.route.id)).map(O=>O.route.id).join(",")),[T.pathname+T.search]},[f,h,i,s,m,a,n,u]),S=v.useMemo(()=>zR(g,s),[g,s]),w=VR(g);return v.createElement(v.Fragment,null,x.map(C=>v.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...l})),S.map(C=>v.createElement("link",{key:C,rel:"modulepreload",href:C,...l})),w.map(({key:C,link:R})=>v.createElement("link",{key:C,...R})))}function qR(...n){return a=>{n.forEach(l=>{typeof l=="function"?l(a):l!=null&&(l.current=a)})}}var s0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{s0&&(window.__reactRouterVersion="7.7.0")}catch{}var u0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,c0=v.forwardRef(function({onClick:a,discover:l="render",prefetch:i="none",relative:s,reloadDocument:u,replace:f,state:h,target:p,to:m,preventScrollReset:g,viewTransition:x,...S},w){let{basename:C}=v.useContext(Nn),R=typeof m=="string"&&u0.test(m),T,O=!1;if(typeof m=="string"&&R&&(T=m,s0))try{let oe=new URL(window.location.href),se=m.startsWith("//")?new URL(oe.protocol+m):new URL(m),Ne=Sn(se.pathname,C);se.origin===oe.origin&&Ne!=null?m=Ne+se.search+se.hash:O=!0}catch{pt(!1,`<Link to="${m}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let z=eR(m,{relative:s}),[U,$,P]=BR(i,S),A=XR(m,{replace:f,state:h,target:p,preventScrollReset:g,relative:s,viewTransition:x});function X(oe){a&&a(oe),oe.defaultPrevented||A(oe)}let ne=v.createElement("a",{...S,...P,href:T||z,onClick:O||u?a:X,ref:qR(w,$),target:p,"data-discover":!R&&l==="render"?"true":void 0});return U&&!R?v.createElement(v.Fragment,null,ne,v.createElement($R,{page:z})):ne});c0.displayName="Link";var GR=v.forwardRef(function({"aria-current":a="page",caseSensitive:l=!1,className:i="",end:s=!1,style:u,to:f,viewTransition:h,children:p,...m},g){let x=po(f,{relative:m.relative}),S=nr(),w=v.useContext(mo),{navigator:C,basename:R}=v.useContext(Nn),T=w!=null&&WR(x)&&h===!0,O=C.encodeLocation?C.encodeLocation(x).pathname:x.pathname,z=S.pathname,U=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;l||(z=z.toLowerCase(),U=U?U.toLowerCase():null,O=O.toLowerCase()),U&&R&&(U=Sn(U,R)||U);const $=O!=="/"&&O.endsWith("/")?O.length-1:O.length;let P=z===O||!s&&z.startsWith(O)&&z.charAt($)==="/",A=U!=null&&(U===O||!s&&U.startsWith(O)&&U.charAt(O.length)==="/"),X={isActive:P,isPending:A,isTransitioning:T},ne=P?a:void 0,oe;typeof i=="function"?oe=i(X):oe=[i,P?"active":null,A?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let se=typeof u=="function"?u(X):u;return v.createElement(c0,{...m,"aria-current":ne,className:oe,ref:g,style:se,to:f,viewTransition:h},typeof p=="function"?p(X):p)});GR.displayName="NavLink";var KR=v.forwardRef(({discover:n="render",fetcherKey:a,navigate:l,reloadDocument:i,replace:s,state:u,method:f=Is,action:h,onSubmit:p,relative:m,preventScrollReset:g,viewTransition:x,...S},w)=>{let C=JR(),R=IR(h,{relative:m}),T=f.toLowerCase()==="get"?"get":"post",O=typeof h=="string"&&u0.test(h),z=U=>{if(p&&p(U),U.defaultPrevented)return;U.preventDefault();let $=U.nativeEvent.submitter,P=$?.getAttribute("formmethod")||f;C($||U.currentTarget,{fetcherKey:a,method:P,navigate:l,replace:s,state:u,relative:m,preventScrollReset:g,viewTransition:x})};return v.createElement("form",{ref:w,method:T,action:R,onSubmit:i?p:z,...S,"data-discover":!O&&n==="render"?"true":void 0})});KR.displayName="Form";function FR(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function f0(n){let a=v.useContext(Pr);return Ve(a,FR(n)),a}function XR(n,{target:a,replace:l,state:i,preventScrollReset:s,relative:u,viewTransition:f}={}){let h=bu(),p=nr(),m=po(n,{relative:u});return v.useCallback(g=>{if(AR(g,a)){g.preventDefault();let x=l!==void 0?l:Ja(p)===Ja(m);h(n,{replace:x,state:i,preventScrollReset:s,relative:u,viewTransition:f})}},[p,h,m,l,i,a,n,s,u,f])}var QR=0,ZR=()=>`__${String(++QR)}__`;function JR(){let{router:n}=f0("useSubmit"),{basename:a}=v.useContext(Nn),l=fR();return v.useCallback(async(i,s={})=>{let{action:u,method:f,encType:h,formData:p,body:m}=jR(i,a);if(s.navigate===!1){let g=s.fetcherKey||ZR();await n.fetch(g,l,s.action||u,{preventScrollReset:s.preventScrollReset,formData:p,body:m,formMethod:s.method||f,formEncType:s.encType||h,flushSync:s.flushSync})}else await n.navigate(s.action||u,{preventScrollReset:s.preventScrollReset,formData:p,body:m,formMethod:s.method||f,formEncType:s.encType||h,replace:s.replace,state:s.state,fromRouteId:l,flushSync:s.flushSync,viewTransition:s.viewTransition})},[n,a,l])}function IR(n,{relative:a}={}){let{basename:l}=v.useContext(Nn),i=v.useContext(Gn);Ve(i,"useFormAction must be used inside a RouteContext");let[s]=i.matches.slice(-1),u={...po(n||".",{relative:a})},f=nr();if(n==null){u.search=f.search;let h=new URLSearchParams(u.search),p=h.getAll("index");if(p.some(g=>g==="")){h.delete("index"),p.filter(x=>x).forEach(x=>h.append("index",x));let g=h.toString();u.search=g?`?${g}`:""}}return(!n||n===".")&&s.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),l!=="/"&&(u.pathname=u.pathname==="/"?l:$n([l,u.pathname])),Ja(u)}function WR(n,a={}){let l=v.useContext(Bd);Ve(l!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=f0("useViewTransitionState"),s=po(n,{relative:a.relative});if(!l.isTransitioning)return!1;let u=Sn(l.currentLocation.pathname,i)||l.currentLocation.pathname,f=Sn(l.nextLocation.pathname,i)||l.nextLocation.pathname;return iu(s.pathname,f)!=null||iu(s.pathname,u)!=null}var Su=$y();const eC=My(Su);function tC(n){return v.createElement(yR,{flushSync:Su.flushSync,...n})}function Gt(n,a,{checkForDefaultPrevented:l=!0}={}){return function(s){if(n?.(s),l===!1||!s.defaultPrevented)return a?.(s)}}function Kv(n,a){if(typeof n=="function")return n(a);n!=null&&(n.current=a)}function _r(...n){return a=>{let l=!1;const i=n.map(s=>{const u=Kv(s,a);return!l&&typeof u=="function"&&(l=!0),u});if(l)return()=>{for(let s=0;s<i.length;s++){const u=i[s];typeof u=="function"?u():Kv(n[s],null)}}}}function sn(...n){return v.useCallback(_r(...n),n)}function nC(n,a){const l=v.createContext(a),i=u=>{const{children:f,...h}=u,p=v.useMemo(()=>h,Object.values(h));return y.jsx(l.Provider,{value:p,children:f})};i.displayName=n+"Provider";function s(u){const f=v.useContext(l);if(f)return f;if(a!==void 0)return a;throw new Error(`\`${u}\` must be used within \`${n}\``)}return[i,s]}function wu(n,a=[]){let l=[];function i(u,f){const h=v.createContext(f),p=l.length;l=[...l,f];const m=x=>{const{scope:S,children:w,...C}=x,R=S?.[n]?.[p]||h,T=v.useMemo(()=>C,Object.values(C));return y.jsx(R.Provider,{value:T,children:w})};m.displayName=u+"Provider";function g(x,S){const w=S?.[n]?.[p]||h,C=v.useContext(w);if(C)return C;if(f!==void 0)return f;throw new Error(`\`${x}\` must be used within \`${u}\``)}return[m,g]}const s=()=>{const u=l.map(f=>v.createContext(f));return function(h){const p=h?.[n]||u;return v.useMemo(()=>({[`__scope${n}`]:{...h,[n]:p}}),[h,p])}};return s.scopeName=n,[i,aC(s,...a)]}function aC(...n){const a=n[0];if(n.length===1)return a;const l=()=>{const i=n.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(u){const f=i.reduce((h,{useScope:p,scopeName:m})=>{const x=p(u)[`__scope${m}`];return{...h,...x}},{});return v.useMemo(()=>({[`__scope${a.scopeName}`]:f}),[f])}};return l.scopeName=a.scopeName,l}var Ia=globalThis?.document?v.useLayoutEffect:()=>{},rC=Ly[" useId ".trim().toString()]||(()=>{}),lC=0;function Vn(n){const[a,l]=v.useState(rC());return Ia(()=>{l(i=>i??String(lC++))},[n]),n||(a?`radix-${a}`:"")}var iC=Ly[" useInsertionEffect ".trim().toString()]||Ia;function Kd({prop:n,defaultProp:a,onChange:l=()=>{},caller:i}){const[s,u,f]=oC({defaultProp:a,onChange:l}),h=n!==void 0,p=h?n:s;{const g=v.useRef(n!==void 0);v.useEffect(()=>{const x=g.current;x!==h&&console.warn(`${i} is changing from ${x?"controlled":"uncontrolled"} to ${h?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=h},[h,i])}const m=v.useCallback(g=>{if(h){const x=sC(g)?g(n):g;x!==n&&f.current?.(x)}else u(g)},[h,n,u,f]);return[p,m]}function oC({defaultProp:n,onChange:a}){const[l,i]=v.useState(n),s=v.useRef(l),u=v.useRef(a);return iC(()=>{u.current=a},[a]),v.useEffect(()=>{s.current!==l&&(u.current?.(l),s.current=l)},[l,s]),[l,i,u]}function sC(n){return typeof n=="function"}function Eu(n){const a=cC(n),l=v.forwardRef((i,s)=>{const{children:u,...f}=i,h=v.Children.toArray(u),p=h.find(dC);if(p){const m=p.props.children,g=h.map(x=>x===p?v.Children.count(m)>1?v.Children.only(null):v.isValidElement(m)?m.props.children:null:x);return y.jsx(a,{...f,ref:s,children:v.isValidElement(m)?v.cloneElement(m,void 0,g):null})}return y.jsx(a,{...f,ref:s,children:u})});return l.displayName=`${n}.Slot`,l}var uC=Eu("Slot");function cC(n){const a=v.forwardRef((l,i)=>{const{children:s,...u}=l;if(v.isValidElement(s)){const f=mC(s),h=hC(u,s.props);return s.type!==v.Fragment&&(h.ref=i?_r(i,f):f),v.cloneElement(s,h)}return v.Children.count(s)>1?v.Children.only(null):null});return a.displayName=`${n}.SlotClone`,a}var fC=Symbol("radix.slottable");function dC(n){return v.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===fC}function hC(n,a){const l={...a};for(const i in a){const s=n[i],u=a[i];/^on[A-Z]/.test(i)?s&&u?l[i]=(...h)=>{const p=u(...h);return s(...h),p}:s&&(l[i]=s):i==="style"?l[i]={...s,...u}:i==="className"&&(l[i]=[s,u].filter(Boolean).join(" "))}return{...n,...l}}function mC(n){let a=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,l=a&&"isReactWarning"in a&&a.isReactWarning;return l?n.ref:(a=Object.getOwnPropertyDescriptor(n,"ref")?.get,l=a&&"isReactWarning"in a&&a.isReactWarning,l?n.props.ref:n.props.ref||n.ref)}var pC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],it=pC.reduce((n,a)=>{const l=Eu(`Primitive.${a}`),i=v.forwardRef((s,u)=>{const{asChild:f,...h}=s,p=f?l:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(p,{...h,ref:u})});return i.displayName=`Primitive.${a}`,{...n,[a]:i}},{});function gC(n,a){n&&Su.flushSync(()=>n.dispatchEvent(a))}function Ul(n){const a=v.useRef(n);return v.useEffect(()=>{a.current=n}),v.useMemo(()=>(...l)=>a.current?.(...l),[])}function vC(n,a=globalThis?.document){const l=Ul(n);v.useEffect(()=>{const i=s=>{s.key==="Escape"&&l(s)};return a.addEventListener("keydown",i,{capture:!0}),()=>a.removeEventListener("keydown",i,{capture:!0})},[l,a])}var yC="DismissableLayer",Od="dismissableLayer.update",bC="dismissableLayer.pointerDownOutside",xC="dismissableLayer.focusOutside",Fv,d0=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Fd=v.forwardRef((n,a)=>{const{disableOutsidePointerEvents:l=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:u,onInteractOutside:f,onDismiss:h,...p}=n,m=v.useContext(d0),[g,x]=v.useState(null),S=g?.ownerDocument??globalThis?.document,[,w]=v.useState({}),C=sn(a,X=>x(X)),R=Array.from(m.layers),[T]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),O=R.indexOf(T),z=g?R.indexOf(g):-1,U=m.layersWithOutsidePointerEventsDisabled.size>0,$=z>=O,P=EC(X=>{const ne=X.target,oe=[...m.branches].some(se=>se.contains(ne));!$||oe||(s?.(X),f?.(X),X.defaultPrevented||h?.())},S),A=RC(X=>{const ne=X.target;[...m.branches].some(se=>se.contains(ne))||(u?.(X),f?.(X),X.defaultPrevented||h?.())},S);return vC(X=>{z===m.layers.size-1&&(i?.(X),!X.defaultPrevented&&h&&(X.preventDefault(),h()))},S),v.useEffect(()=>{if(g)return l&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(Fv=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(g)),m.layers.add(g),Xv(),()=>{l&&m.layersWithOutsidePointerEventsDisabled.size===1&&(S.body.style.pointerEvents=Fv)}},[g,S,l,m]),v.useEffect(()=>()=>{g&&(m.layers.delete(g),m.layersWithOutsidePointerEventsDisabled.delete(g),Xv())},[g,m]),v.useEffect(()=>{const X=()=>w({});return document.addEventListener(Od,X),()=>document.removeEventListener(Od,X)},[]),y.jsx(it.div,{...p,ref:C,style:{pointerEvents:U?$?"auto":"none":void 0,...n.style},onFocusCapture:Gt(n.onFocusCapture,A.onFocusCapture),onBlurCapture:Gt(n.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Gt(n.onPointerDownCapture,P.onPointerDownCapture)})});Fd.displayName=yC;var SC="DismissableLayerBranch",wC=v.forwardRef((n,a)=>{const l=v.useContext(d0),i=v.useRef(null),s=sn(a,i);return v.useEffect(()=>{const u=i.current;if(u)return l.branches.add(u),()=>{l.branches.delete(u)}},[l.branches]),y.jsx(it.div,{...n,ref:s})});wC.displayName=SC;function EC(n,a=globalThis?.document){const l=Ul(n),i=v.useRef(!1),s=v.useRef(()=>{});return v.useEffect(()=>{const u=h=>{if(h.target&&!i.current){let p=function(){h0(bC,l,m,{discrete:!0})};const m={originalEvent:h};h.pointerType==="touch"?(a.removeEventListener("click",s.current),s.current=p,a.addEventListener("click",s.current,{once:!0})):p()}else a.removeEventListener("click",s.current);i.current=!1},f=window.setTimeout(()=>{a.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(f),a.removeEventListener("pointerdown",u),a.removeEventListener("click",s.current)}},[a,l]),{onPointerDownCapture:()=>i.current=!0}}function RC(n,a=globalThis?.document){const l=Ul(n),i=v.useRef(!1);return v.useEffect(()=>{const s=u=>{u.target&&!i.current&&h0(xC,l,{originalEvent:u},{discrete:!1})};return a.addEventListener("focusin",s),()=>a.removeEventListener("focusin",s)},[a,l]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function Xv(){const n=new CustomEvent(Od);document.dispatchEvent(n)}function h0(n,a,l,{discrete:i}){const s=l.originalEvent.target,u=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:l});a&&s.addEventListener(n,a,{once:!0}),i?gC(s,u):s.dispatchEvent(u)}var Wf="focusScope.autoFocusOnMount",ed="focusScope.autoFocusOnUnmount",Qv={bubbles:!1,cancelable:!0},CC="FocusScope",Xd=v.forwardRef((n,a)=>{const{loop:l=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:u,...f}=n,[h,p]=v.useState(null),m=Ul(s),g=Ul(u),x=v.useRef(null),S=sn(a,R=>p(R)),w=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(i){let R=function(U){if(w.paused||!h)return;const $=U.target;h.contains($)?x.current=$:Fa(x.current,{select:!0})},T=function(U){if(w.paused||!h)return;const $=U.relatedTarget;$!==null&&(h.contains($)||Fa(x.current,{select:!0}))},O=function(U){if(document.activeElement===document.body)for(const P of U)P.removedNodes.length>0&&Fa(h)};document.addEventListener("focusin",R),document.addEventListener("focusout",T);const z=new MutationObserver(O);return h&&z.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",R),document.removeEventListener("focusout",T),z.disconnect()}}},[i,h,w.paused]),v.useEffect(()=>{if(h){Jv.add(w);const R=document.activeElement;if(!h.contains(R)){const O=new CustomEvent(Wf,Qv);h.addEventListener(Wf,m),h.dispatchEvent(O),O.defaultPrevented||(OC(MC(m0(h)),{select:!0}),document.activeElement===R&&Fa(h))}return()=>{h.removeEventListener(Wf,m),setTimeout(()=>{const O=new CustomEvent(ed,Qv);h.addEventListener(ed,g),h.dispatchEvent(O),O.defaultPrevented||Fa(R??document.body,{select:!0}),h.removeEventListener(ed,g),Jv.remove(w)},0)}}},[h,m,g,w]);const C=v.useCallback(R=>{if(!l&&!i||w.paused)return;const T=R.key==="Tab"&&!R.altKey&&!R.ctrlKey&&!R.metaKey,O=document.activeElement;if(T&&O){const z=R.currentTarget,[U,$]=AC(z);U&&$?!R.shiftKey&&O===$?(R.preventDefault(),l&&Fa(U,{select:!0})):R.shiftKey&&O===U&&(R.preventDefault(),l&&Fa($,{select:!0})):O===z&&R.preventDefault()}},[l,i,w.paused]);return y.jsx(it.div,{tabIndex:-1,...f,ref:S,onKeyDown:C})});Xd.displayName=CC;function OC(n,{select:a=!1}={}){const l=document.activeElement;for(const i of n)if(Fa(i,{select:a}),document.activeElement!==l)return}function AC(n){const a=m0(n),l=Zv(a,n),i=Zv(a.reverse(),n);return[l,i]}function m0(n){const a=[],l=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;l.nextNode();)a.push(l.currentNode);return a}function Zv(n,a){for(const l of n)if(!NC(l,{upTo:a}))return l}function NC(n,{upTo:a}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(a!==void 0&&n===a)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function TC(n){return n instanceof HTMLInputElement&&"select"in n}function Fa(n,{select:a=!1}={}){if(n&&n.focus){const l=document.activeElement;n.focus({preventScroll:!0}),n!==l&&TC(n)&&a&&n.select()}}var Jv=jC();function jC(){let n=[];return{add(a){const l=n[0];a!==l&&l?.pause(),n=Iv(n,a),n.unshift(a)},remove(a){n=Iv(n,a),n[0]?.resume()}}}function Iv(n,a){const l=[...n],i=l.indexOf(a);return i!==-1&&l.splice(i,1),l}function MC(n){return n.filter(a=>a.tagName!=="A")}var _C="Portal",Qd=v.forwardRef((n,a)=>{const{container:l,...i}=n,[s,u]=v.useState(!1);Ia(()=>u(!0),[]);const f=l||s&&globalThis?.document?.body;return f?eC.createPortal(y.jsx(it.div,{...i,ref:a}),f):null});Qd.displayName=_C;function DC(n,a){return v.useReducer((l,i)=>a[l][i]??l,n)}var ql=n=>{const{present:a,children:l}=n,i=LC(a),s=typeof l=="function"?l({present:i.isPresent}):v.Children.only(l),u=sn(i.ref,zC(s));return typeof l=="function"||i.isPresent?v.cloneElement(s,{ref:u}):null};ql.displayName="Presence";function LC(n){const[a,l]=v.useState(),i=v.useRef(null),s=v.useRef(n),u=v.useRef("none"),f=n?"mounted":"unmounted",[h,p]=DC(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const m=Bs(i.current);u.current=h==="mounted"?m:"none"},[h]),Ia(()=>{const m=i.current,g=s.current;if(g!==n){const S=u.current,w=Bs(m);n?p("MOUNT"):w==="none"||m?.display==="none"?p("UNMOUNT"):p(g&&S!==w?"ANIMATION_OUT":"UNMOUNT"),s.current=n}},[n,p]),Ia(()=>{if(a){let m;const g=a.ownerDocument.defaultView??window,x=w=>{const R=Bs(i.current).includes(w.animationName);if(w.target===a&&R&&(p("ANIMATION_END"),!s.current)){const T=a.style.animationFillMode;a.style.animationFillMode="forwards",m=g.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=T)})}},S=w=>{w.target===a&&(u.current=Bs(i.current))};return a.addEventListener("animationstart",S),a.addEventListener("animationcancel",x),a.addEventListener("animationend",x),()=>{g.clearTimeout(m),a.removeEventListener("animationstart",S),a.removeEventListener("animationcancel",x),a.removeEventListener("animationend",x)}}else p("ANIMATION_END")},[a,p]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:v.useCallback(m=>{i.current=m?getComputedStyle(m):null,l(m)},[])}}function Bs(n){return n?.animationName||"none"}function zC(n){let a=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,l=a&&"isReactWarning"in a&&a.isReactWarning;return l?n.ref:(a=Object.getOwnPropertyDescriptor(n,"ref")?.get,l=a&&"isReactWarning"in a&&a.isReactWarning,l?n.props.ref:n.props.ref||n.ref)}var td=0;function p0(){v.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??Wv()),document.body.insertAdjacentElement("beforeend",n[1]??Wv()),td++,()=>{td===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(a=>a.remove()),td--}},[])}function Wv(){const n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}var Pn=function(){return Pn=Object.assign||function(a){for(var l,i=1,s=arguments.length;i<s;i++){l=arguments[i];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(a[u]=l[u])}return a},Pn.apply(this,arguments)};function g0(n,a){var l={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.indexOf(i)<0&&(l[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(n);s<i.length;s++)a.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(n,i[s])&&(l[i[s]]=n[i[s]]);return l}function kC(n,a,l){if(l||arguments.length===2)for(var i=0,s=a.length,u;i<s;i++)(u||!(i in a))&&(u||(u=Array.prototype.slice.call(a,0,i)),u[i]=a[i]);return n.concat(u||Array.prototype.slice.call(a))}var eu="right-scroll-bar-position",tu="width-before-scroll-bar",UC="with-scroll-bars-hidden",PC="--removed-body-scroll-bar-size";function nd(n,a){return typeof n=="function"?n(a):n&&(n.current=a),n}function HC(n,a){var l=v.useState(function(){return{value:n,callback:a,facade:{get current(){return l.value},set current(i){var s=l.value;s!==i&&(l.value=i,l.callback(i,s))}}}})[0];return l.callback=a,l.facade}var BC=typeof window<"u"?v.useLayoutEffect:v.useEffect,ey=new WeakMap;function $C(n,a){var l=HC(null,function(i){return n.forEach(function(s){return nd(s,i)})});return BC(function(){var i=ey.get(l);if(i){var s=new Set(i),u=new Set(n),f=l.current;s.forEach(function(h){u.has(h)||nd(h,null)}),u.forEach(function(h){s.has(h)||nd(h,f)})}ey.set(l,n)},[n]),l}function VC(n){return n}function YC(n,a){a===void 0&&(a=VC);var l=[],i=!1,s={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return l.length?l[l.length-1]:n},useMedium:function(u){var f=a(u,i);return l.push(f),function(){l=l.filter(function(h){return h!==f})}},assignSyncMedium:function(u){for(i=!0;l.length;){var f=l;l=[],f.forEach(u)}l={push:function(h){return u(h)},filter:function(){return l}}},assignMedium:function(u){i=!0;var f=[];if(l.length){var h=l;l=[],h.forEach(u),f=l}var p=function(){var g=f;f=[],g.forEach(u)},m=function(){return Promise.resolve().then(p)};m(),l={push:function(g){f.push(g),m()},filter:function(g){return f=f.filter(g),l}}}};return s}function qC(n){n===void 0&&(n={});var a=YC(null);return a.options=Pn({async:!0,ssr:!1},n),a}var v0=function(n){var a=n.sideCar,l=g0(n,["sideCar"]);if(!a)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=a.read();if(!i)throw new Error("Sidecar medium not found");return v.createElement(i,Pn({},l))};v0.isSideCarExport=!0;function GC(n,a){return n.useMedium(a),v0}var y0=qC(),ad=function(){},Ru=v.forwardRef(function(n,a){var l=v.useRef(null),i=v.useState({onScrollCapture:ad,onWheelCapture:ad,onTouchMoveCapture:ad}),s=i[0],u=i[1],f=n.forwardProps,h=n.children,p=n.className,m=n.removeScrollBar,g=n.enabled,x=n.shards,S=n.sideCar,w=n.noRelative,C=n.noIsolation,R=n.inert,T=n.allowPinchZoom,O=n.as,z=O===void 0?"div":O,U=n.gapMode,$=g0(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=S,A=$C([l,a]),X=Pn(Pn({},$),s);return v.createElement(v.Fragment,null,g&&v.createElement(P,{sideCar:y0,removeScrollBar:m,shards:x,noRelative:w,noIsolation:C,inert:R,setCallbacks:u,allowPinchZoom:!!T,lockRef:l,gapMode:U}),f?v.cloneElement(v.Children.only(h),Pn(Pn({},X),{ref:A})):v.createElement(z,Pn({},X,{className:p,ref:A}),h))});Ru.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ru.classNames={fullWidth:tu,zeroRight:eu};var KC=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function FC(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var a=KC();return a&&n.setAttribute("nonce",a),n}function XC(n,a){n.styleSheet?n.styleSheet.cssText=a:n.appendChild(document.createTextNode(a))}function QC(n){var a=document.head||document.getElementsByTagName("head")[0];a.appendChild(n)}var ZC=function(){var n=0,a=null;return{add:function(l){n==0&&(a=FC())&&(XC(a,l),QC(a)),n++},remove:function(){n--,!n&&a&&(a.parentNode&&a.parentNode.removeChild(a),a=null)}}},JC=function(){var n=ZC();return function(a,l){v.useEffect(function(){return n.add(a),function(){n.remove()}},[a&&l])}},b0=function(){var n=JC(),a=function(l){var i=l.styles,s=l.dynamic;return n(i,s),null};return a},IC={left:0,top:0,right:0,gap:0},rd=function(n){return parseInt(n||"",10)||0},WC=function(n){var a=window.getComputedStyle(document.body),l=a[n==="padding"?"paddingLeft":"marginLeft"],i=a[n==="padding"?"paddingTop":"marginTop"],s=a[n==="padding"?"paddingRight":"marginRight"];return[rd(l),rd(i),rd(s)]},e2=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return IC;var a=WC(n),l=document.documentElement.clientWidth,i=window.innerWidth;return{left:a[0],top:a[1],right:a[2],gap:Math.max(0,i-l+a[2]-a[0])}},t2=b0(),Ll="data-scroll-locked",n2=function(n,a,l,i){var s=n.left,u=n.top,f=n.right,h=n.gap;return l===void 0&&(l="margin"),`
68
68
  .`.concat(UC,` {
69
69
  overflow: hidden `).concat(i,`;
70
70
  padding-right: `).concat(h,"px ").concat(i,`;
@@ -101,10 +101,10 @@ Please change the parent <Route path="${A}"> to <Route path="${A==="/"?"*":`${A}
101
101
  body[`).concat(Ll,`] {
102
102
  `).concat(PC,": ").concat(h,`px;
103
103
  }
104
- `)},ty=function(){var n=parseInt(document.body.getAttribute(Ll)||"0",10);return isFinite(n)?n:0},a2=function(){v.useEffect(function(){return document.body.setAttribute(Ll,(ty()+1).toString()),function(){var n=ty()-1;n<=0?document.body.removeAttribute(Ll):document.body.setAttribute(Ll,n.toString())}},[])},r2=function(n){var a=n.noRelative,l=n.noImportant,i=n.gapMode,s=i===void 0?"margin":i;a2();var u=v.useMemo(function(){return e2(s)},[s]);return v.createElement(t2,{styles:n2(u,!a,s,l?"":"!important")})},Ad=!1;if(typeof window<"u")try{var $s=Object.defineProperty({},"passive",{get:function(){return Ad=!0,!0}});window.addEventListener("test",$s,$s),window.removeEventListener("test",$s,$s)}catch{Ad=!1}var Cl=Ad?{passive:!1}:!1,l2=function(n){return n.tagName==="TEXTAREA"},x0=function(n,a){if(!(n instanceof Element))return!1;var l=window.getComputedStyle(n);return l[a]!=="hidden"&&!(l.overflowY===l.overflowX&&!l2(n)&&l[a]==="visible")},i2=function(n){return x0(n,"overflowY")},o2=function(n){return x0(n,"overflowX")},ny=function(n,a){var l=a.ownerDocument,i=a;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=S0(n,i);if(s){var u=w0(n,i),f=u[1],h=u[2];if(f>h)return!0}i=i.parentNode}while(i&&i!==l.body);return!1},s2=function(n){var a=n.scrollTop,l=n.scrollHeight,i=n.clientHeight;return[a,l,i]},u2=function(n){var a=n.scrollLeft,l=n.scrollWidth,i=n.clientWidth;return[a,l,i]},S0=function(n,a){return n==="v"?i2(a):o2(a)},w0=function(n,a){return n==="v"?s2(a):u2(a)},c2=function(n,a){return n==="h"&&a==="rtl"?-1:1},f2=function(n,a,l,i,s){var u=c2(n,window.getComputedStyle(a).direction),f=u*i,h=l.target,p=a.contains(h),m=!1,g=f>0,x=0,S=0;do{if(!h)break;var w=w0(n,h),C=w[0],R=w[1],j=w[2],A=R-j-u*C;(C||A)&&S0(n,h)&&(x+=A,S+=C);var k=h.parentNode;h=k&&k.nodeType===Node.DOCUMENT_FRAGMENT_NODE?k.host:k}while(!p&&h!==document.body||p&&(a.contains(h)||a===h));return(g&&Math.abs(x)<1||!g&&Math.abs(S)<1)&&(m=!0),m},Vs=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},ay=function(n){return[n.deltaX,n.deltaY]},ry=function(n){return n&&"current"in n?n.current:n},d2=function(n,a){return n[0]===a[0]&&n[1]===a[1]},h2=function(n){return`
104
+ `)},ty=function(){var n=parseInt(document.body.getAttribute(Ll)||"0",10);return isFinite(n)?n:0},a2=function(){v.useEffect(function(){return document.body.setAttribute(Ll,(ty()+1).toString()),function(){var n=ty()-1;n<=0?document.body.removeAttribute(Ll):document.body.setAttribute(Ll,n.toString())}},[])},r2=function(n){var a=n.noRelative,l=n.noImportant,i=n.gapMode,s=i===void 0?"margin":i;a2();var u=v.useMemo(function(){return e2(s)},[s]);return v.createElement(t2,{styles:n2(u,!a,s,l?"":"!important")})},Ad=!1;if(typeof window<"u")try{var $s=Object.defineProperty({},"passive",{get:function(){return Ad=!0,!0}});window.addEventListener("test",$s,$s),window.removeEventListener("test",$s,$s)}catch{Ad=!1}var Cl=Ad?{passive:!1}:!1,l2=function(n){return n.tagName==="TEXTAREA"},x0=function(n,a){if(!(n instanceof Element))return!1;var l=window.getComputedStyle(n);return l[a]!=="hidden"&&!(l.overflowY===l.overflowX&&!l2(n)&&l[a]==="visible")},i2=function(n){return x0(n,"overflowY")},o2=function(n){return x0(n,"overflowX")},ny=function(n,a){var l=a.ownerDocument,i=a;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=S0(n,i);if(s){var u=w0(n,i),f=u[1],h=u[2];if(f>h)return!0}i=i.parentNode}while(i&&i!==l.body);return!1},s2=function(n){var a=n.scrollTop,l=n.scrollHeight,i=n.clientHeight;return[a,l,i]},u2=function(n){var a=n.scrollLeft,l=n.scrollWidth,i=n.clientWidth;return[a,l,i]},S0=function(n,a){return n==="v"?i2(a):o2(a)},w0=function(n,a){return n==="v"?s2(a):u2(a)},c2=function(n,a){return n==="h"&&a==="rtl"?-1:1},f2=function(n,a,l,i,s){var u=c2(n,window.getComputedStyle(a).direction),f=u*i,h=l.target,p=a.contains(h),m=!1,g=f>0,x=0,S=0;do{if(!h)break;var w=w0(n,h),C=w[0],R=w[1],T=w[2],O=R-T-u*C;(C||O)&&S0(n,h)&&(x+=O,S+=C);var z=h.parentNode;h=z&&z.nodeType===Node.DOCUMENT_FRAGMENT_NODE?z.host:z}while(!p&&h!==document.body||p&&(a.contains(h)||a===h));return(g&&Math.abs(x)<1||!g&&Math.abs(S)<1)&&(m=!0),m},Vs=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},ay=function(n){return[n.deltaX,n.deltaY]},ry=function(n){return n&&"current"in n?n.current:n},d2=function(n,a){return n[0]===a[0]&&n[1]===a[1]},h2=function(n){return`
105
105
  .block-interactivity-`.concat(n,` {pointer-events: none;}
106
106
  .allow-interactivity-`).concat(n,` {pointer-events: all;}
107
- `)},m2=0,Ol=[];function p2(n){var a=v.useRef([]),l=v.useRef([0,0]),i=v.useRef(),s=v.useState(m2++)[0],u=v.useState(b0)[0],f=v.useRef(n);v.useEffect(function(){f.current=n},[n]),v.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(s));var R=kC([n.lockRef.current],(n.shards||[]).map(ry),!0).filter(Boolean);return R.forEach(function(j){return j.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),R.forEach(function(j){return j.classList.remove("allow-interactivity-".concat(s))})}}},[n.inert,n.lockRef.current,n.shards]);var h=v.useCallback(function(R,j){if("touches"in R&&R.touches.length===2||R.type==="wheel"&&R.ctrlKey)return!f.current.allowPinchZoom;var A=Vs(R),k=l.current,P="deltaX"in R?R.deltaX:k[0]-A[0],Y="deltaY"in R?R.deltaY:k[1]-A[1],B,N=R.target,X=Math.abs(P)>Math.abs(Y)?"h":"v";if("touches"in R&&X==="h"&&N.type==="range")return!1;var ee=ny(X,N);if(!ee)return!0;if(ee?B=X:(B=X==="v"?"h":"v",ee=ny(X,N)),!ee)return!1;if(!i.current&&"changedTouches"in R&&(P||Y)&&(i.current=B),!B)return!0;var ie=i.current||B;return f2(ie,j,R,ie==="h"?P:Y)},[]),p=v.useCallback(function(R){var j=R;if(!(!Ol.length||Ol[Ol.length-1]!==u)){var A="deltaY"in j?ay(j):Vs(j),k=a.current.filter(function(B){return B.name===j.type&&(B.target===j.target||j.target===B.shadowParent)&&d2(B.delta,A)})[0];if(k&&k.should){j.cancelable&&j.preventDefault();return}if(!k){var P=(f.current.shards||[]).map(ry).filter(Boolean).filter(function(B){return B.contains(j.target)}),Y=P.length>0?h(j,P[0]):!f.current.noIsolation;Y&&j.cancelable&&j.preventDefault()}}},[]),m=v.useCallback(function(R,j,A,k){var P={name:R,delta:j,target:A,should:k,shadowParent:g2(A)};a.current.push(P),setTimeout(function(){a.current=a.current.filter(function(Y){return Y!==P})},1)},[]),g=v.useCallback(function(R){l.current=Vs(R),i.current=void 0},[]),x=v.useCallback(function(R){m(R.type,ay(R),R.target,h(R,n.lockRef.current))},[]),S=v.useCallback(function(R){m(R.type,Vs(R),R.target,h(R,n.lockRef.current))},[]);v.useEffect(function(){return Ol.push(u),n.setCallbacks({onScrollCapture:x,onWheelCapture:x,onTouchMoveCapture:S}),document.addEventListener("wheel",p,Cl),document.addEventListener("touchmove",p,Cl),document.addEventListener("touchstart",g,Cl),function(){Ol=Ol.filter(function(R){return R!==u}),document.removeEventListener("wheel",p,Cl),document.removeEventListener("touchmove",p,Cl),document.removeEventListener("touchstart",g,Cl)}},[]);var w=n.removeScrollBar,C=n.inert;return v.createElement(v.Fragment,null,C?v.createElement(u,{styles:h2(s)}):null,w?v.createElement(r2,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function g2(n){for(var a=null;n!==null;)n instanceof ShadowRoot&&(a=n.host,n=n.host),n=n.parentNode;return a}const v2=GC(y0,p2);var Zd=v.forwardRef(function(n,a){return v.createElement(Ru,Pn({},n,{ref:a,sideCar:v2}))});Zd.classNames=Ru.classNames;var y2=function(n){if(typeof document>"u")return null;var a=Array.isArray(n)?n[0]:n;return a.ownerDocument.body},Al=new WeakMap,Ys=new WeakMap,qs={},ld=0,E0=function(n){return n&&(n.host||E0(n.parentNode))},b2=function(n,a){return a.map(function(l){if(n.contains(l))return l;var i=E0(l);return i&&n.contains(i)?i:(console.error("aria-hidden",l,"in not contained inside",n,". Doing nothing"),null)}).filter(function(l){return!!l})},x2=function(n,a,l,i){var s=b2(a,Array.isArray(n)?n:[n]);qs[l]||(qs[l]=new WeakMap);var u=qs[l],f=[],h=new Set,p=new Set(s),m=function(x){!x||h.has(x)||(h.add(x),m(x.parentNode))};s.forEach(m);var g=function(x){!x||p.has(x)||Array.prototype.forEach.call(x.children,function(S){if(h.has(S))g(S);else try{var w=S.getAttribute(i),C=w!==null&&w!=="false",R=(Al.get(S)||0)+1,j=(u.get(S)||0)+1;Al.set(S,R),u.set(S,j),f.push(S),R===1&&C&&Ys.set(S,!0),j===1&&S.setAttribute(l,"true"),C||S.setAttribute(i,"true")}catch(A){console.error("aria-hidden: cannot operate on ",S,A)}})};return g(a),h.clear(),ld++,function(){f.forEach(function(x){var S=Al.get(x)-1,w=u.get(x)-1;Al.set(x,S),u.set(x,w),S||(Ys.has(x)||x.removeAttribute(i),Ys.delete(x)),w||x.removeAttribute(l)}),ld--,ld||(Al=new WeakMap,Al=new WeakMap,Ys=new WeakMap,qs={})}},R0=function(n,a,l){l===void 0&&(l="data-aria-hidden");var i=Array.from(Array.isArray(n)?n:[n]),s=y2(n);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),x2(i,s,l,"aria-hidden")):function(){return null}},Cu="Dialog",[C0,Ej]=wu(Cu),[S2,Nn]=C0(Cu),O0=n=>{const{__scopeDialog:a,children:l,open:i,defaultOpen:s,onOpenChange:u,modal:f=!0}=n,h=v.useRef(null),p=v.useRef(null),[m,g]=Kd({prop:i,defaultProp:s??!1,onChange:u,caller:Cu});return y.jsx(S2,{scope:a,triggerRef:h,contentRef:p,contentId:Vn(),titleId:Vn(),descriptionId:Vn(),open:m,onOpenChange:g,onOpenToggle:v.useCallback(()=>g(x=>!x),[g]),modal:f,children:l})};O0.displayName=Cu;var A0="DialogTrigger",w2=v.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=Nn(A0,l),u=ln(a,s.triggerRef);return y.jsx(at.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Wd(s.open),...i,ref:u,onClick:Yt(n.onClick,s.onOpenToggle)})});w2.displayName=A0;var Jd="DialogPortal",[E2,N0]=C0(Jd,{forceMount:void 0}),T0=n=>{const{__scopeDialog:a,forceMount:l,children:i,container:s}=n,u=Nn(Jd,a);return y.jsx(E2,{scope:a,forceMount:l,children:v.Children.map(i,f=>y.jsx(ql,{present:l||u.open,children:y.jsx(Qd,{asChild:!0,container:s,children:f})}))})};T0.displayName=Jd;var su="DialogOverlay",j0=v.forwardRef((n,a)=>{const l=N0(su,n.__scopeDialog),{forceMount:i=l.forceMount,...s}=n,u=Nn(su,n.__scopeDialog);return u.modal?y.jsx(ql,{present:i||u.open,children:y.jsx(C2,{...s,ref:a})}):null});j0.displayName=su;var R2=Eu("DialogOverlay.RemoveScroll"),C2=v.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=Nn(su,l);return y.jsx(Zd,{as:R2,allowPinchZoom:!0,shards:[s.contentRef],children:y.jsx(at.div,{"data-state":Wd(s.open),...i,ref:a,style:{pointerEvents:"auto",...i.style}})})}),Dr="DialogContent",M0=v.forwardRef((n,a)=>{const l=N0(Dr,n.__scopeDialog),{forceMount:i=l.forceMount,...s}=n,u=Nn(Dr,n.__scopeDialog);return y.jsx(ql,{present:i||u.open,children:u.modal?y.jsx(O2,{...s,ref:a}):y.jsx(A2,{...s,ref:a})})});M0.displayName=Dr;var O2=v.forwardRef((n,a)=>{const l=Nn(Dr,n.__scopeDialog),i=v.useRef(null),s=ln(a,l.contentRef,i);return v.useEffect(()=>{const u=i.current;if(u)return R0(u)},[]),y.jsx(_0,{...n,ref:s,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Yt(n.onCloseAutoFocus,u=>{u.preventDefault(),l.triggerRef.current?.focus()}),onPointerDownOutside:Yt(n.onPointerDownOutside,u=>{const f=u.detail.originalEvent,h=f.button===0&&f.ctrlKey===!0;(f.button===2||h)&&u.preventDefault()}),onFocusOutside:Yt(n.onFocusOutside,u=>u.preventDefault())})}),A2=v.forwardRef((n,a)=>{const l=Nn(Dr,n.__scopeDialog),i=v.useRef(!1),s=v.useRef(!1);return y.jsx(_0,{...n,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{n.onCloseAutoFocus?.(u),u.defaultPrevented||(i.current||l.triggerRef.current?.focus(),u.preventDefault()),i.current=!1,s.current=!1},onInteractOutside:u=>{n.onInteractOutside?.(u),u.defaultPrevented||(i.current=!0,u.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const f=u.target;l.triggerRef.current?.contains(f)&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&s.current&&u.preventDefault()}})}),_0=v.forwardRef((n,a)=>{const{__scopeDialog:l,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:u,...f}=n,h=Nn(Dr,l),p=v.useRef(null),m=ln(a,p);return p0(),y.jsxs(y.Fragment,{children:[y.jsx(Xd,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:u,children:y.jsx(Fd,{role:"dialog",id:h.contentId,"aria-describedby":h.descriptionId,"aria-labelledby":h.titleId,"data-state":Wd(h.open),...f,ref:m,onDismiss:()=>h.onOpenChange(!1)})}),y.jsxs(y.Fragment,{children:[y.jsx(N2,{titleId:h.titleId}),y.jsx(j2,{contentRef:p,descriptionId:h.descriptionId})]})]})}),Id="DialogTitle",D0=v.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=Nn(Id,l);return y.jsx(at.h2,{id:s.titleId,...i,ref:a})});D0.displayName=Id;var L0="DialogDescription",z0=v.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=Nn(L0,l);return y.jsx(at.p,{id:s.descriptionId,...i,ref:a})});z0.displayName=L0;var k0="DialogClose",U0=v.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=Nn(k0,l);return y.jsx(at.button,{type:"button",...i,ref:a,onClick:Yt(n.onClick,()=>s.onOpenChange(!1))})});U0.displayName=k0;function Wd(n){return n?"open":"closed"}var P0="DialogTitleWarning",[Rj,H0]=nC(P0,{contentName:Dr,titleName:Id,docsSlug:"dialog"}),N2=({titleId:n})=>{const a=H0(P0),l=`\`${a.contentName}\` requires a \`${a.titleName}\` for the component to be accessible for screen reader users.
107
+ `)},m2=0,Ol=[];function p2(n){var a=v.useRef([]),l=v.useRef([0,0]),i=v.useRef(),s=v.useState(m2++)[0],u=v.useState(b0)[0],f=v.useRef(n);v.useEffect(function(){f.current=n},[n]),v.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(s));var R=kC([n.lockRef.current],(n.shards||[]).map(ry),!0).filter(Boolean);return R.forEach(function(T){return T.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),R.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(s))})}}},[n.inert,n.lockRef.current,n.shards]);var h=v.useCallback(function(R,T){if("touches"in R&&R.touches.length===2||R.type==="wheel"&&R.ctrlKey)return!f.current.allowPinchZoom;var O=Vs(R),z=l.current,U="deltaX"in R?R.deltaX:z[0]-O[0],$="deltaY"in R?R.deltaY:z[1]-O[1],P,A=R.target,X=Math.abs(U)>Math.abs($)?"h":"v";if("touches"in R&&X==="h"&&A.type==="range")return!1;var ne=ny(X,A);if(!ne)return!0;if(ne?P=X:(P=X==="v"?"h":"v",ne=ny(X,A)),!ne)return!1;if(!i.current&&"changedTouches"in R&&(U||$)&&(i.current=P),!P)return!0;var oe=i.current||P;return f2(oe,T,R,oe==="h"?U:$)},[]),p=v.useCallback(function(R){var T=R;if(!(!Ol.length||Ol[Ol.length-1]!==u)){var O="deltaY"in T?ay(T):Vs(T),z=a.current.filter(function(P){return P.name===T.type&&(P.target===T.target||T.target===P.shadowParent)&&d2(P.delta,O)})[0];if(z&&z.should){T.cancelable&&T.preventDefault();return}if(!z){var U=(f.current.shards||[]).map(ry).filter(Boolean).filter(function(P){return P.contains(T.target)}),$=U.length>0?h(T,U[0]):!f.current.noIsolation;$&&T.cancelable&&T.preventDefault()}}},[]),m=v.useCallback(function(R,T,O,z){var U={name:R,delta:T,target:O,should:z,shadowParent:g2(O)};a.current.push(U),setTimeout(function(){a.current=a.current.filter(function($){return $!==U})},1)},[]),g=v.useCallback(function(R){l.current=Vs(R),i.current=void 0},[]),x=v.useCallback(function(R){m(R.type,ay(R),R.target,h(R,n.lockRef.current))},[]),S=v.useCallback(function(R){m(R.type,Vs(R),R.target,h(R,n.lockRef.current))},[]);v.useEffect(function(){return Ol.push(u),n.setCallbacks({onScrollCapture:x,onWheelCapture:x,onTouchMoveCapture:S}),document.addEventListener("wheel",p,Cl),document.addEventListener("touchmove",p,Cl),document.addEventListener("touchstart",g,Cl),function(){Ol=Ol.filter(function(R){return R!==u}),document.removeEventListener("wheel",p,Cl),document.removeEventListener("touchmove",p,Cl),document.removeEventListener("touchstart",g,Cl)}},[]);var w=n.removeScrollBar,C=n.inert;return v.createElement(v.Fragment,null,C?v.createElement(u,{styles:h2(s)}):null,w?v.createElement(r2,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function g2(n){for(var a=null;n!==null;)n instanceof ShadowRoot&&(a=n.host,n=n.host),n=n.parentNode;return a}const v2=GC(y0,p2);var Zd=v.forwardRef(function(n,a){return v.createElement(Ru,Pn({},n,{ref:a,sideCar:v2}))});Zd.classNames=Ru.classNames;var y2=function(n){if(typeof document>"u")return null;var a=Array.isArray(n)?n[0]:n;return a.ownerDocument.body},Al=new WeakMap,Ys=new WeakMap,qs={},ld=0,E0=function(n){return n&&(n.host||E0(n.parentNode))},b2=function(n,a){return a.map(function(l){if(n.contains(l))return l;var i=E0(l);return i&&n.contains(i)?i:(console.error("aria-hidden",l,"in not contained inside",n,". Doing nothing"),null)}).filter(function(l){return!!l})},x2=function(n,a,l,i){var s=b2(a,Array.isArray(n)?n:[n]);qs[l]||(qs[l]=new WeakMap);var u=qs[l],f=[],h=new Set,p=new Set(s),m=function(x){!x||h.has(x)||(h.add(x),m(x.parentNode))};s.forEach(m);var g=function(x){!x||p.has(x)||Array.prototype.forEach.call(x.children,function(S){if(h.has(S))g(S);else try{var w=S.getAttribute(i),C=w!==null&&w!=="false",R=(Al.get(S)||0)+1,T=(u.get(S)||0)+1;Al.set(S,R),u.set(S,T),f.push(S),R===1&&C&&Ys.set(S,!0),T===1&&S.setAttribute(l,"true"),C||S.setAttribute(i,"true")}catch(O){console.error("aria-hidden: cannot operate on ",S,O)}})};return g(a),h.clear(),ld++,function(){f.forEach(function(x){var S=Al.get(x)-1,w=u.get(x)-1;Al.set(x,S),u.set(x,w),S||(Ys.has(x)||x.removeAttribute(i),Ys.delete(x)),w||x.removeAttribute(l)}),ld--,ld||(Al=new WeakMap,Al=new WeakMap,Ys=new WeakMap,qs={})}},R0=function(n,a,l){l===void 0&&(l="data-aria-hidden");var i=Array.from(Array.isArray(n)?n:[n]),s=y2(n);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),x2(i,s,l,"aria-hidden")):function(){return null}},Cu="Dialog",[C0,Ej]=wu(Cu),[S2,Tn]=C0(Cu),O0=n=>{const{__scopeDialog:a,children:l,open:i,defaultOpen:s,onOpenChange:u,modal:f=!0}=n,h=v.useRef(null),p=v.useRef(null),[m,g]=Kd({prop:i,defaultProp:s??!1,onChange:u,caller:Cu});return y.jsx(S2,{scope:a,triggerRef:h,contentRef:p,contentId:Vn(),titleId:Vn(),descriptionId:Vn(),open:m,onOpenChange:g,onOpenToggle:v.useCallback(()=>g(x=>!x),[g]),modal:f,children:l})};O0.displayName=Cu;var A0="DialogTrigger",w2=v.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=Tn(A0,l),u=sn(a,s.triggerRef);return y.jsx(it.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Wd(s.open),...i,ref:u,onClick:Gt(n.onClick,s.onOpenToggle)})});w2.displayName=A0;var Jd="DialogPortal",[E2,N0]=C0(Jd,{forceMount:void 0}),T0=n=>{const{__scopeDialog:a,forceMount:l,children:i,container:s}=n,u=Tn(Jd,a);return y.jsx(E2,{scope:a,forceMount:l,children:v.Children.map(i,f=>y.jsx(ql,{present:l||u.open,children:y.jsx(Qd,{asChild:!0,container:s,children:f})}))})};T0.displayName=Jd;var su="DialogOverlay",j0=v.forwardRef((n,a)=>{const l=N0(su,n.__scopeDialog),{forceMount:i=l.forceMount,...s}=n,u=Tn(su,n.__scopeDialog);return u.modal?y.jsx(ql,{present:i||u.open,children:y.jsx(C2,{...s,ref:a})}):null});j0.displayName=su;var R2=Eu("DialogOverlay.RemoveScroll"),C2=v.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=Tn(su,l);return y.jsx(Zd,{as:R2,allowPinchZoom:!0,shards:[s.contentRef],children:y.jsx(it.div,{"data-state":Wd(s.open),...i,ref:a,style:{pointerEvents:"auto",...i.style}})})}),Dr="DialogContent",M0=v.forwardRef((n,a)=>{const l=N0(Dr,n.__scopeDialog),{forceMount:i=l.forceMount,...s}=n,u=Tn(Dr,n.__scopeDialog);return y.jsx(ql,{present:i||u.open,children:u.modal?y.jsx(O2,{...s,ref:a}):y.jsx(A2,{...s,ref:a})})});M0.displayName=Dr;var O2=v.forwardRef((n,a)=>{const l=Tn(Dr,n.__scopeDialog),i=v.useRef(null),s=sn(a,l.contentRef,i);return v.useEffect(()=>{const u=i.current;if(u)return R0(u)},[]),y.jsx(_0,{...n,ref:s,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Gt(n.onCloseAutoFocus,u=>{u.preventDefault(),l.triggerRef.current?.focus()}),onPointerDownOutside:Gt(n.onPointerDownOutside,u=>{const f=u.detail.originalEvent,h=f.button===0&&f.ctrlKey===!0;(f.button===2||h)&&u.preventDefault()}),onFocusOutside:Gt(n.onFocusOutside,u=>u.preventDefault())})}),A2=v.forwardRef((n,a)=>{const l=Tn(Dr,n.__scopeDialog),i=v.useRef(!1),s=v.useRef(!1);return y.jsx(_0,{...n,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{n.onCloseAutoFocus?.(u),u.defaultPrevented||(i.current||l.triggerRef.current?.focus(),u.preventDefault()),i.current=!1,s.current=!1},onInteractOutside:u=>{n.onInteractOutside?.(u),u.defaultPrevented||(i.current=!0,u.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const f=u.target;l.triggerRef.current?.contains(f)&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&s.current&&u.preventDefault()}})}),_0=v.forwardRef((n,a)=>{const{__scopeDialog:l,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:u,...f}=n,h=Tn(Dr,l),p=v.useRef(null),m=sn(a,p);return p0(),y.jsxs(y.Fragment,{children:[y.jsx(Xd,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:u,children:y.jsx(Fd,{role:"dialog",id:h.contentId,"aria-describedby":h.descriptionId,"aria-labelledby":h.titleId,"data-state":Wd(h.open),...f,ref:m,onDismiss:()=>h.onOpenChange(!1)})}),y.jsxs(y.Fragment,{children:[y.jsx(N2,{titleId:h.titleId}),y.jsx(j2,{contentRef:p,descriptionId:h.descriptionId})]})]})}),Id="DialogTitle",D0=v.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=Tn(Id,l);return y.jsx(it.h2,{id:s.titleId,...i,ref:a})});D0.displayName=Id;var L0="DialogDescription",z0=v.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=Tn(L0,l);return y.jsx(it.p,{id:s.descriptionId,...i,ref:a})});z0.displayName=L0;var k0="DialogClose",U0=v.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=Tn(k0,l);return y.jsx(it.button,{type:"button",...i,ref:a,onClick:Gt(n.onClick,()=>s.onOpenChange(!1))})});U0.displayName=k0;function Wd(n){return n?"open":"closed"}var P0="DialogTitleWarning",[Rj,H0]=nC(P0,{contentName:Dr,titleName:Id,docsSlug:"dialog"}),N2=({titleId:n})=>{const a=H0(P0),l=`\`${a.contentName}\` requires a \`${a.titleName}\` for the component to be accessible for screen reader users.
108
108
 
109
109
  If you want to hide the \`${a.titleName}\`, you can wrap it with our VisuallyHidden component.
110
110
 
@@ -128,83 +128,83 @@ For more information, see https://radix-ui.com/primitives/docs/components/${a.do
128
128
  *
129
129
  * This source code is licensed under the ISC license.
130
130
  * See the LICENSE file in the root directory of this source tree.
131
- */const kt=(n,a)=>{const l=v.forwardRef(({className:i,...s},u)=>v.createElement(k2,{ref:u,iconNode:a,className:q0(`lucide-${_2(ly(n))}`,`lucide-${n}`,i),...s}));return l.displayName=ly(n),l};/**
131
+ */const Pt=(n,a)=>{const l=v.forwardRef(({className:i,...s},u)=>v.createElement(k2,{ref:u,iconNode:a,className:q0(`lucide-${_2(ly(n))}`,`lucide-${n}`,i),...s}));return l.displayName=ly(n),l};/**
132
132
  * @license lucide-react v0.525.0 - ISC
133
133
  *
134
134
  * This source code is licensed under the ISC license.
135
135
  * See the LICENSE file in the root directory of this source tree.
136
- */const U2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],G0=kt("check",U2);/**
136
+ */const U2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],G0=Pt("check",U2);/**
137
137
  * @license lucide-react v0.525.0 - ISC
138
138
  *
139
139
  * This source code is licensed under the ISC license.
140
140
  * See the LICENSE file in the root directory of this source tree.
141
- */const P2=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],K0=kt("chevrons-up-down",P2);/**
141
+ */const P2=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],K0=Pt("chevrons-up-down",P2);/**
142
142
  * @license lucide-react v0.525.0 - ISC
143
143
  *
144
144
  * This source code is licensed under the ISC license.
145
145
  * See the LICENSE file in the root directory of this source tree.
146
- */const H2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],B2=kt("circle-alert",H2);/**
146
+ */const H2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],B2=Pt("circle-alert",H2);/**
147
147
  * @license lucide-react v0.525.0 - ISC
148
148
  *
149
149
  * This source code is licensed under the ISC license.
150
150
  * See the LICENSE file in the root directory of this source tree.
151
- */const $2=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],V2=kt("circle-check-big",$2);/**
151
+ */const $2=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],V2=Pt("circle-check-big",$2);/**
152
152
  * @license lucide-react v0.525.0 - ISC
153
153
  *
154
154
  * This source code is licensed under the ISC license.
155
155
  * See the LICENSE file in the root directory of this source tree.
156
- */const Y2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],q2=kt("circle-x",Y2);/**
156
+ */const Y2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],q2=Pt("circle-x",Y2);/**
157
157
  * @license lucide-react v0.525.0 - ISC
158
158
  *
159
159
  * This source code is licensed under the ISC license.
160
160
  * See the LICENSE file in the root directory of this source tree.
161
- */const G2=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],K2=kt("file-json",G2);/**
161
+ */const G2=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],K2=Pt("file-json",G2);/**
162
162
  * @license lucide-react v0.525.0 - ISC
163
163
  *
164
164
  * This source code is licensed under the ISC license.
165
165
  * See the LICENSE file in the root directory of this source tree.
166
- */const F2=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],X2=kt("languages",F2);/**
166
+ */const F2=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],X2=Pt("languages",F2);/**
167
167
  * @license lucide-react v0.525.0 - ISC
168
168
  *
169
169
  * This source code is licensed under the ISC license.
170
170
  * See the LICENSE file in the root directory of this source tree.
171
- */const Q2=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],uu=kt("pencil",Q2);/**
171
+ */const Q2=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],uu=Pt("pencil",Q2);/**
172
172
  * @license lucide-react v0.525.0 - ISC
173
173
  *
174
174
  * This source code is licensed under the ISC license.
175
175
  * See the LICENSE file in the root directory of this source tree.
176
- */const Z2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Nd=kt("plus",Z2);/**
176
+ */const Z2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Nd=Pt("plus",Z2);/**
177
177
  * @license lucide-react v0.525.0 - ISC
178
178
  *
179
179
  * This source code is licensed under the ISC license.
180
180
  * See the LICENSE file in the root directory of this source tree.
181
- */const J2=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],F0=kt("refresh-cw",J2);/**
181
+ */const J2=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],F0=Pt("refresh-cw",J2);/**
182
182
  * @license lucide-react v0.525.0 - ISC
183
183
  *
184
184
  * This source code is licensed under the ISC license.
185
185
  * See the LICENSE file in the root directory of this source tree.
186
- */const I2=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],X0=kt("save",I2);/**
186
+ */const I2=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],X0=Pt("save",I2);/**
187
187
  * @license lucide-react v0.525.0 - ISC
188
188
  *
189
189
  * This source code is licensed under the ISC license.
190
190
  * See the LICENSE file in the root directory of this source tree.
191
- */const W2=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],eO=kt("search",W2);/**
191
+ */const W2=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],eO=Pt("search",W2);/**
192
192
  * @license lucide-react v0.525.0 - ISC
193
193
  *
194
194
  * This source code is licensed under the ISC license.
195
195
  * See the LICENSE file in the root directory of this source tree.
196
- */const tO=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],nO=kt("settings",tO);/**
196
+ */const tO=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],nO=Pt("settings",tO);/**
197
197
  * @license lucide-react v0.525.0 - ISC
198
198
  *
199
199
  * This source code is licensed under the ISC license.
200
200
  * See the LICENSE file in the root directory of this source tree.
201
- */const aO=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Lr=kt("trash-2",aO);/**
201
+ */const aO=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Lr=Pt("trash-2",aO);/**
202
202
  * @license lucide-react v0.525.0 - ISC
203
203
  *
204
204
  * This source code is licensed under the ISC license.
205
205
  * See the LICENSE file in the root directory of this source tree.
206
- */const rO=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],zl=kt("x",rO);function Q0(n){var a,l,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var s=n.length;for(a=0;a<s;a++)n[a]&&(l=Q0(n[a]))&&(i&&(i+=" "),i+=l)}else for(l in n)n[l]&&(i&&(i+=" "),i+=l);return i}function Z0(){for(var n,a,l=0,i="",s=arguments.length;l<s;l++)(n=arguments[l])&&(a=Q0(n))&&(i&&(i+=" "),i+=a);return i}const nh="-",lO=n=>{const a=oO(n),{conflictingClassGroups:l,conflictingClassGroupModifiers:i}=n;return{getClassGroupId:f=>{const h=f.split(nh);return h[0]===""&&h.length!==1&&h.shift(),J0(h,a)||iO(f)},getConflictingClassGroupIds:(f,h)=>{const p=l[f]||[];return h&&i[f]?[...p,...i[f]]:p}}},J0=(n,a)=>{if(n.length===0)return a.classGroupId;const l=n[0],i=a.nextPart.get(l),s=i?J0(n.slice(1),i):void 0;if(s)return s;if(a.validators.length===0)return;const u=n.join(nh);return a.validators.find(({validator:f})=>f(u))?.classGroupId},iy=/^\[(.+)\]$/,iO=n=>{if(iy.test(n)){const a=iy.exec(n)[1],l=a?.substring(0,a.indexOf(":"));if(l)return"arbitrary.."+l}},oO=n=>{const{theme:a,classGroups:l}=n,i={nextPart:new Map,validators:[]};for(const s in l)Td(l[s],i,s,a);return i},Td=(n,a,l,i)=>{n.forEach(s=>{if(typeof s=="string"){const u=s===""?a:oy(a,s);u.classGroupId=l;return}if(typeof s=="function"){if(sO(s)){Td(s(i),a,l,i);return}a.validators.push({validator:s,classGroupId:l});return}Object.entries(s).forEach(([u,f])=>{Td(f,oy(a,u),l,i)})})},oy=(n,a)=>{let l=n;return a.split(nh).forEach(i=>{l.nextPart.has(i)||l.nextPart.set(i,{nextPart:new Map,validators:[]}),l=l.nextPart.get(i)}),l},sO=n=>n.isThemeGetter,uO=n=>{if(n<1)return{get:()=>{},set:()=>{}};let a=0,l=new Map,i=new Map;const s=(u,f)=>{l.set(u,f),a++,a>n&&(a=0,i=l,l=new Map)};return{get(u){let f=l.get(u);if(f!==void 0)return f;if((f=i.get(u))!==void 0)return s(u,f),f},set(u,f){l.has(u)?l.set(u,f):s(u,f)}}},jd="!",Md=":",cO=Md.length,fO=n=>{const{prefix:a,experimentalParseClassName:l}=n;let i=s=>{const u=[];let f=0,h=0,p=0,m;for(let C=0;C<s.length;C++){let R=s[C];if(f===0&&h===0){if(R===Md){u.push(s.slice(p,C)),p=C+cO;continue}if(R==="/"){m=C;continue}}R==="["?f++:R==="]"?f--:R==="("?h++:R===")"&&h--}const g=u.length===0?s:s.substring(p),x=dO(g),S=x!==g,w=m&&m>p?m-p:void 0;return{modifiers:u,hasImportantModifier:S,baseClassName:x,maybePostfixModifierPosition:w}};if(a){const s=a+Md,u=i;i=f=>f.startsWith(s)?u(f.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:f,maybePostfixModifierPosition:void 0}}if(l){const s=i;i=u=>l({className:u,parseClassName:s})}return i},dO=n=>n.endsWith(jd)?n.substring(0,n.length-1):n.startsWith(jd)?n.substring(1):n,hO=n=>{const a=Object.fromEntries(n.orderSensitiveModifiers.map(i=>[i,!0]));return i=>{if(i.length<=1)return i;const s=[];let u=[];return i.forEach(f=>{f[0]==="["||a[f]?(s.push(...u.sort(),f),u=[]):u.push(f)}),s.push(...u.sort()),s}},mO=n=>({cache:uO(n.cacheSize),parseClassName:fO(n),sortModifiers:hO(n),...lO(n)}),pO=/\s+/,gO=(n,a)=>{const{parseClassName:l,getClassGroupId:i,getConflictingClassGroupIds:s,sortModifiers:u}=a,f=[],h=n.trim().split(pO);let p="";for(let m=h.length-1;m>=0;m-=1){const g=h[m],{isExternal:x,modifiers:S,hasImportantModifier:w,baseClassName:C,maybePostfixModifierPosition:R}=l(g);if(x){p=g+(p.length>0?" "+p:p);continue}let j=!!R,A=i(j?C.substring(0,R):C);if(!A){if(!j){p=g+(p.length>0?" "+p:p);continue}if(A=i(C),!A){p=g+(p.length>0?" "+p:p);continue}j=!1}const k=u(S).join(":"),P=w?k+jd:k,Y=P+A;if(f.includes(Y))continue;f.push(Y);const B=s(A,j);for(let N=0;N<B.length;++N){const X=B[N];f.push(P+X)}p=g+(p.length>0?" "+p:p)}return p};function vO(){let n=0,a,l,i="";for(;n<arguments.length;)(a=arguments[n++])&&(l=I0(a))&&(i&&(i+=" "),i+=l);return i}const I0=n=>{if(typeof n=="string")return n;let a,l="";for(let i=0;i<n.length;i++)n[i]&&(a=I0(n[i]))&&(l&&(l+=" "),l+=a);return l};function yO(n,...a){let l,i,s,u=f;function f(p){const m=a.reduce((g,x)=>x(g),n());return l=mO(m),i=l.cache.get,s=l.cache.set,u=h,h(p)}function h(p){const m=i(p);if(m)return m;const g=gO(p,l);return s(p,g),g}return function(){return u(vO.apply(null,arguments))}}const Et=n=>{const a=l=>l[n]||[];return a.isThemeGetter=!0,a},W0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,eb=/^\((?:(\w[\w-]*):)?(.+)\)$/i,bO=/^\d+\/\d+$/,xO=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,SO=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,wO=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,EO=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,RO=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Nl=n=>bO.test(n),Pe=n=>!!n&&!Number.isNaN(Number(n)),Ga=n=>!!n&&Number.isInteger(Number(n)),id=n=>n.endsWith("%")&&Pe(n.slice(0,-1)),da=n=>xO.test(n),CO=()=>!0,OO=n=>SO.test(n)&&!wO.test(n),tb=()=>!1,AO=n=>EO.test(n),NO=n=>RO.test(n),TO=n=>!pe(n)&&!ge(n),jO=n=>Gl(n,rb,tb),pe=n=>W0.test(n),Or=n=>Gl(n,lb,OO),od=n=>Gl(n,zO,Pe),sy=n=>Gl(n,nb,tb),MO=n=>Gl(n,ab,NO),Gs=n=>Gl(n,ib,AO),ge=n=>eb.test(n),Ii=n=>Kl(n,lb),_O=n=>Kl(n,kO),uy=n=>Kl(n,nb),DO=n=>Kl(n,rb),LO=n=>Kl(n,ab),Ks=n=>Kl(n,ib,!0),Gl=(n,a,l)=>{const i=W0.exec(n);return i?i[1]?a(i[1]):l(i[2]):!1},Kl=(n,a,l=!1)=>{const i=eb.exec(n);return i?i[1]?a(i[1]):l:!1},nb=n=>n==="position"||n==="percentage",ab=n=>n==="image"||n==="url",rb=n=>n==="length"||n==="size"||n==="bg-size",lb=n=>n==="length",zO=n=>n==="number",kO=n=>n==="family-name",ib=n=>n==="shadow",UO=()=>{const n=Et("color"),a=Et("font"),l=Et("text"),i=Et("font-weight"),s=Et("tracking"),u=Et("leading"),f=Et("breakpoint"),h=Et("container"),p=Et("spacing"),m=Et("radius"),g=Et("shadow"),x=Et("inset-shadow"),S=Et("text-shadow"),w=Et("drop-shadow"),C=Et("blur"),R=Et("perspective"),j=Et("aspect"),A=Et("ease"),k=Et("animate"),P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],B=()=>[...Y(),ge,pe],N=()=>["auto","hidden","clip","visible","scroll"],X=()=>["auto","contain","none"],ee=()=>[ge,pe,p],ie=()=>[Nl,"full","auto",...ee()],oe=()=>[Ga,"none","subgrid",ge,pe],Oe=()=>["auto",{span:["full",Ga,ge,pe]},Ga,ge,pe],Se=()=>[Ga,"auto",ge,pe],de=()=>["auto","min","max","fr",ge,pe],fe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ue=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...ee()],W=()=>[Nl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...ee()],K=()=>[n,ge,pe],he=()=>[...Y(),uy,sy,{position:[ge,pe]}],T=()=>["no-repeat",{repeat:["","x","y","space","round"]}],$=()=>["auto","cover","contain",DO,jO,{size:[ge,pe]}],O=()=>[id,Ii,Or],M=()=>["","none","full",m,ge,pe],U=()=>["",Pe,Ii,Or],V=()=>["solid","dashed","dotted","double"],I=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],re=()=>[Pe,id,uy,sy],ce=()=>["","none",C,ge,pe],Ee=()=>["none",Pe,ge,pe],ke=()=>["none",Pe,ge,pe],xt=()=>[Pe,ge,pe],qt=()=>[Nl,"full",...ee()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[da],breakpoint:[da],color:[CO],container:[da],"drop-shadow":[da],ease:["in","out","in-out"],font:[TO],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[da],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[da],shadow:[da],spacing:["px",Pe],text:[da],"text-shadow":[da],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Nl,pe,ge,j]}],container:["container"],columns:[{columns:[Pe,pe,ge,h]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:B()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:X()}],"overscroll-x":[{"overscroll-x":X()}],"overscroll-y":[{"overscroll-y":X()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ie()}],"inset-x":[{"inset-x":ie()}],"inset-y":[{"inset-y":ie()}],start:[{start:ie()}],end:[{end:ie()}],top:[{top:ie()}],right:[{right:ie()}],bottom:[{bottom:ie()}],left:[{left:ie()}],visibility:["visible","invisible","collapse"],z:[{z:[Ga,"auto",ge,pe]}],basis:[{basis:[Nl,"full","auto",h,...ee()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Pe,Nl,"auto","initial","none",pe]}],grow:[{grow:["",Pe,ge,pe]}],shrink:[{shrink:["",Pe,ge,pe]}],order:[{order:[Ga,"first","last","none",ge,pe]}],"grid-cols":[{"grid-cols":oe()}],"col-start-end":[{col:Oe()}],"col-start":[{"col-start":Se()}],"col-end":[{"col-end":Se()}],"grid-rows":[{"grid-rows":oe()}],"row-start-end":[{row:Oe()}],"row-start":[{"row-start":Se()}],"row-end":[{"row-end":Se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":de()}],"auto-rows":[{"auto-rows":de()}],gap:[{gap:ee()}],"gap-x":[{"gap-x":ee()}],"gap-y":[{"gap-y":ee()}],"justify-content":[{justify:[...fe(),"normal"]}],"justify-items":[{"justify-items":[...ue(),"normal"]}],"justify-self":[{"justify-self":["auto",...ue()]}],"align-content":[{content:["normal",...fe()]}],"align-items":[{items:[...ue(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ue(),{baseline:["","last"]}]}],"place-content":[{"place-content":fe()}],"place-items":[{"place-items":[...ue(),"baseline"]}],"place-self":[{"place-self":["auto",...ue()]}],p:[{p:ee()}],px:[{px:ee()}],py:[{py:ee()}],ps:[{ps:ee()}],pe:[{pe:ee()}],pt:[{pt:ee()}],pr:[{pr:ee()}],pb:[{pb:ee()}],pl:[{pl:ee()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":ee()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":ee()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[h,"screen",...W()]}],"min-w":[{"min-w":[h,"screen","none",...W()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[f]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",l,Ii,Or]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,ge,od]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",id,pe]}],"font-family":[{font:[_O,pe,a]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,ge,pe]}],"line-clamp":[{"line-clamp":[Pe,"none",ge,od]}],leading:[{leading:[u,...ee()]}],"list-image":[{"list-image":["none",ge,pe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ge,pe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:K()}],"text-color":[{text:K()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:[Pe,"from-font","auto",ge,Or]}],"text-decoration-color":[{decoration:K()}],"underline-offset":[{"underline-offset":[Pe,"auto",ge,pe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:ee()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge,pe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ge,pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:he()}],"bg-repeat":[{bg:T()}],"bg-size":[{bg:$()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ga,ge,pe],radial:["",ge,pe],conic:[Ga,ge,pe]},LO,MO]}],"bg-color":[{bg:K()}],"gradient-from-pos":[{from:O()}],"gradient-via-pos":[{via:O()}],"gradient-to-pos":[{to:O()}],"gradient-from":[{from:K()}],"gradient-via":[{via:K()}],"gradient-to":[{to:K()}],rounded:[{rounded:M()}],"rounded-s":[{"rounded-s":M()}],"rounded-e":[{"rounded-e":M()}],"rounded-t":[{"rounded-t":M()}],"rounded-r":[{"rounded-r":M()}],"rounded-b":[{"rounded-b":M()}],"rounded-l":[{"rounded-l":M()}],"rounded-ss":[{"rounded-ss":M()}],"rounded-se":[{"rounded-se":M()}],"rounded-ee":[{"rounded-ee":M()}],"rounded-es":[{"rounded-es":M()}],"rounded-tl":[{"rounded-tl":M()}],"rounded-tr":[{"rounded-tr":M()}],"rounded-br":[{"rounded-br":M()}],"rounded-bl":[{"rounded-bl":M()}],"border-w":[{border:U()}],"border-w-x":[{"border-x":U()}],"border-w-y":[{"border-y":U()}],"border-w-s":[{"border-s":U()}],"border-w-e":[{"border-e":U()}],"border-w-t":[{"border-t":U()}],"border-w-r":[{"border-r":U()}],"border-w-b":[{"border-b":U()}],"border-w-l":[{"border-l":U()}],"divide-x":[{"divide-x":U()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":U()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...V(),"hidden","none"]}],"divide-style":[{divide:[...V(),"hidden","none"]}],"border-color":[{border:K()}],"border-color-x":[{"border-x":K()}],"border-color-y":[{"border-y":K()}],"border-color-s":[{"border-s":K()}],"border-color-e":[{"border-e":K()}],"border-color-t":[{"border-t":K()}],"border-color-r":[{"border-r":K()}],"border-color-b":[{"border-b":K()}],"border-color-l":[{"border-l":K()}],"divide-color":[{divide:K()}],"outline-style":[{outline:[...V(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Pe,ge,pe]}],"outline-w":[{outline:["",Pe,Ii,Or]}],"outline-color":[{outline:K()}],shadow:[{shadow:["","none",g,Ks,Gs]}],"shadow-color":[{shadow:K()}],"inset-shadow":[{"inset-shadow":["none",x,Ks,Gs]}],"inset-shadow-color":[{"inset-shadow":K()}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:K()}],"ring-offset-w":[{"ring-offset":[Pe,Or]}],"ring-offset-color":[{"ring-offset":K()}],"inset-ring-w":[{"inset-ring":U()}],"inset-ring-color":[{"inset-ring":K()}],"text-shadow":[{"text-shadow":["none",S,Ks,Gs]}],"text-shadow-color":[{"text-shadow":K()}],opacity:[{opacity:[Pe,ge,pe]}],"mix-blend":[{"mix-blend":[...I(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":I()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Pe]}],"mask-image-linear-from-pos":[{"mask-linear-from":re()}],"mask-image-linear-to-pos":[{"mask-linear-to":re()}],"mask-image-linear-from-color":[{"mask-linear-from":K()}],"mask-image-linear-to-color":[{"mask-linear-to":K()}],"mask-image-t-from-pos":[{"mask-t-from":re()}],"mask-image-t-to-pos":[{"mask-t-to":re()}],"mask-image-t-from-color":[{"mask-t-from":K()}],"mask-image-t-to-color":[{"mask-t-to":K()}],"mask-image-r-from-pos":[{"mask-r-from":re()}],"mask-image-r-to-pos":[{"mask-r-to":re()}],"mask-image-r-from-color":[{"mask-r-from":K()}],"mask-image-r-to-color":[{"mask-r-to":K()}],"mask-image-b-from-pos":[{"mask-b-from":re()}],"mask-image-b-to-pos":[{"mask-b-to":re()}],"mask-image-b-from-color":[{"mask-b-from":K()}],"mask-image-b-to-color":[{"mask-b-to":K()}],"mask-image-l-from-pos":[{"mask-l-from":re()}],"mask-image-l-to-pos":[{"mask-l-to":re()}],"mask-image-l-from-color":[{"mask-l-from":K()}],"mask-image-l-to-color":[{"mask-l-to":K()}],"mask-image-x-from-pos":[{"mask-x-from":re()}],"mask-image-x-to-pos":[{"mask-x-to":re()}],"mask-image-x-from-color":[{"mask-x-from":K()}],"mask-image-x-to-color":[{"mask-x-to":K()}],"mask-image-y-from-pos":[{"mask-y-from":re()}],"mask-image-y-to-pos":[{"mask-y-to":re()}],"mask-image-y-from-color":[{"mask-y-from":K()}],"mask-image-y-to-color":[{"mask-y-to":K()}],"mask-image-radial":[{"mask-radial":[ge,pe]}],"mask-image-radial-from-pos":[{"mask-radial-from":re()}],"mask-image-radial-to-pos":[{"mask-radial-to":re()}],"mask-image-radial-from-color":[{"mask-radial-from":K()}],"mask-image-radial-to-color":[{"mask-radial-to":K()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":Y()}],"mask-image-conic-pos":[{"mask-conic":[Pe]}],"mask-image-conic-from-pos":[{"mask-conic-from":re()}],"mask-image-conic-to-pos":[{"mask-conic-to":re()}],"mask-image-conic-from-color":[{"mask-conic-from":K()}],"mask-image-conic-to-color":[{"mask-conic-to":K()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:he()}],"mask-repeat":[{mask:T()}],"mask-size":[{mask:$()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ge,pe]}],filter:[{filter:["","none",ge,pe]}],blur:[{blur:ce()}],brightness:[{brightness:[Pe,ge,pe]}],contrast:[{contrast:[Pe,ge,pe]}],"drop-shadow":[{"drop-shadow":["","none",w,Ks,Gs]}],"drop-shadow-color":[{"drop-shadow":K()}],grayscale:[{grayscale:["",Pe,ge,pe]}],"hue-rotate":[{"hue-rotate":[Pe,ge,pe]}],invert:[{invert:["",Pe,ge,pe]}],saturate:[{saturate:[Pe,ge,pe]}],sepia:[{sepia:["",Pe,ge,pe]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,pe]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[Pe,ge,pe]}],"backdrop-contrast":[{"backdrop-contrast":[Pe,ge,pe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Pe,ge,pe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Pe,ge,pe]}],"backdrop-invert":[{"backdrop-invert":["",Pe,ge,pe]}],"backdrop-opacity":[{"backdrop-opacity":[Pe,ge,pe]}],"backdrop-saturate":[{"backdrop-saturate":[Pe,ge,pe]}],"backdrop-sepia":[{"backdrop-sepia":["",Pe,ge,pe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":ee()}],"border-spacing-x":[{"border-spacing-x":ee()}],"border-spacing-y":[{"border-spacing-y":ee()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ge,pe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Pe,"initial",ge,pe]}],ease:[{ease:["linear","initial",A,ge,pe]}],delay:[{delay:[Pe,ge,pe]}],animate:[{animate:["none",k,ge,pe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[R,ge,pe]}],"perspective-origin":[{"perspective-origin":B()}],rotate:[{rotate:Ee()}],"rotate-x":[{"rotate-x":Ee()}],"rotate-y":[{"rotate-y":Ee()}],"rotate-z":[{"rotate-z":Ee()}],scale:[{scale:ke()}],"scale-x":[{"scale-x":ke()}],"scale-y":[{"scale-y":ke()}],"scale-z":[{"scale-z":ke()}],"scale-3d":["scale-3d"],skew:[{skew:xt()}],"skew-x":[{"skew-x":xt()}],"skew-y":[{"skew-y":xt()}],transform:[{transform:[ge,pe,"","none","gpu","cpu"]}],"transform-origin":[{origin:B()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:qt()}],"translate-x":[{"translate-x":qt()}],"translate-y":[{"translate-y":qt()}],"translate-z":[{"translate-z":qt()}],"translate-none":["translate-none"],accent:[{accent:K()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:K()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ge,pe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":ee()}],"scroll-mx":[{"scroll-mx":ee()}],"scroll-my":[{"scroll-my":ee()}],"scroll-ms":[{"scroll-ms":ee()}],"scroll-me":[{"scroll-me":ee()}],"scroll-mt":[{"scroll-mt":ee()}],"scroll-mr":[{"scroll-mr":ee()}],"scroll-mb":[{"scroll-mb":ee()}],"scroll-ml":[{"scroll-ml":ee()}],"scroll-p":[{"scroll-p":ee()}],"scroll-px":[{"scroll-px":ee()}],"scroll-py":[{"scroll-py":ee()}],"scroll-ps":[{"scroll-ps":ee()}],"scroll-pe":[{"scroll-pe":ee()}],"scroll-pt":[{"scroll-pt":ee()}],"scroll-pr":[{"scroll-pr":ee()}],"scroll-pb":[{"scroll-pb":ee()}],"scroll-pl":[{"scroll-pl":ee()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ge,pe]}],fill:[{fill:["none",...K()]}],"stroke-w":[{stroke:[Pe,Ii,Or,od]}],stroke:[{stroke:["none",...K()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},PO=yO(UO);function nt(...n){return PO(Z0(n))}const so=B0,HO=$0,ob=v.forwardRef(({className:n,...a},l)=>y.jsx(eh,{ref:l,className:nt("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n),...a}));ob.displayName=eh.displayName;const Pl=v.forwardRef(({className:n,children:a,...l},i)=>y.jsxs(HO,{children:[y.jsx(ob,{}),y.jsxs(th,{ref:i,className:nt("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-300 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg animate-scale-in",n),...l,children:[a,y.jsxs(M2,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground transition-all-ease hover:scale-110",children:[y.jsx(zl,{className:"h-4 w-4"}),y.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Pl.displayName=th.displayName;const Hl=({className:n,...a})=>y.jsx("div",{className:nt("flex flex-col space-y-1.5 text-center sm:text-left",n),...a});Hl.displayName="DialogHeader";const uo=({className:n,...a})=>y.jsx("div",{className:nt("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",n),...a});uo.displayName="DialogFooter";const Bl=v.forwardRef(({className:n,...a},l)=>y.jsx(V0,{ref:l,className:nt("text-lg font-semibold leading-none tracking-tight",n),...a}));Bl.displayName=V0.displayName;const ah=v.forwardRef(({className:n,...a},l)=>y.jsx(Y0,{ref:l,className:nt("text-sm text-muted-foreground",n),...a}));ah.displayName=Y0.displayName;const cy=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,fy=Z0,rh=(n,a)=>l=>{var i;if(a?.variants==null)return fy(n,l?.class,l?.className);const{variants:s,defaultVariants:u}=a,f=Object.keys(s).map(m=>{const g=l?.[m],x=u?.[m];if(g===null)return null;const S=cy(g)||cy(x);return s[m][S]}),h=l&&Object.entries(l).reduce((m,g)=>{let[x,S]=g;return S===void 0||(m[x]=S),m},{}),p=a==null||(i=a.compoundVariants)===null||i===void 0?void 0:i.reduce((m,g)=>{let{class:x,className:S,...w}=g;return Object.entries(w).every(C=>{let[R,j]=C;return Array.isArray(j)?j.includes({...u,...h}[R]):{...u,...h}[R]===j})?[...m,x,S]:m},[]);return fy(n,f,p,l?.class,l?.className)},BO=rh("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"border border-destructive/50 text-destructive hover:bg-destructive hover:text-destructive-foreground",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Le=v.forwardRef(({className:n,variant:a,size:l,asChild:i=!1,...s},u)=>{const f=i?uC:"button";return y.jsx(f,{className:nt(BO({variant:a,size:l,className:n})),ref:u,...s})});Le.displayName="Button";const bt=v.forwardRef(({className:n,type:a,...l},i)=>y.jsx("input",{type:a,className:nt("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n),ref:i,...l}));bt.displayName="Input";var $O="Label",sb=v.forwardRef((n,a)=>y.jsx(at.label,{...n,ref:a,onMouseDown:l=>{l.target.closest("button, input, select, textarea")||(n.onMouseDown?.(l),!l.defaultPrevented&&l.detail>1&&l.preventDefault())}}));sb.displayName=$O;var ub=sb;const VO=rh("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),lt=v.forwardRef(({className:n,...a},l)=>y.jsx(ub,{ref:l,className:nt(VO(),n),...a}));lt.displayName=ub.displayName;function YO(n){const a=v.useRef({value:n,previous:n});return v.useMemo(()=>(a.current.value!==n&&(a.current.previous=a.current.value,a.current.value=n),a.current.previous),[n])}function cb(n){const[a,l]=v.useState(void 0);return Ja(()=>{if(n){l({width:n.offsetWidth,height:n.offsetHeight});const i=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const u=s[0];let f,h;if("borderBoxSize"in u){const p=u.borderBoxSize,m=Array.isArray(p)?p[0]:p;f=m.inlineSize,h=m.blockSize}else f=n.offsetWidth,h=n.offsetHeight;l({width:f,height:h})});return i.observe(n,{box:"border-box"}),()=>i.unobserve(n)}else l(void 0)},[n]),a}var Ou="Switch",[qO,Cj]=wu(Ou),[GO,KO]=qO(Ou),fb=v.forwardRef((n,a)=>{const{__scopeSwitch:l,name:i,checked:s,defaultChecked:u,required:f,disabled:h,value:p="on",onCheckedChange:m,form:g,...x}=n,[S,w]=v.useState(null),C=ln(a,P=>w(P)),R=v.useRef(!1),j=S?g||!!S.closest("form"):!0,[A,k]=Kd({prop:s,defaultProp:u??!1,onChange:m,caller:Ou});return y.jsxs(GO,{scope:l,checked:A,disabled:h,children:[y.jsx(at.button,{type:"button",role:"switch","aria-checked":A,"aria-required":f,"data-state":pb(A),"data-disabled":h?"":void 0,disabled:h,value:p,...x,ref:C,onClick:Yt(n.onClick,P=>{k(Y=>!Y),j&&(R.current=P.isPropagationStopped(),R.current||P.stopPropagation())})}),j&&y.jsx(mb,{control:S,bubbles:!R.current,name:i,value:p,checked:A,required:f,disabled:h,form:g,style:{transform:"translateX(-100%)"}})]})});fb.displayName=Ou;var db="SwitchThumb",hb=v.forwardRef((n,a)=>{const{__scopeSwitch:l,...i}=n,s=KO(db,l);return y.jsx(at.span,{"data-state":pb(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:a})});hb.displayName=db;var FO="SwitchBubbleInput",mb=v.forwardRef(({__scopeSwitch:n,control:a,checked:l,bubbles:i=!0,...s},u)=>{const f=v.useRef(null),h=ln(f,u),p=YO(l),m=cb(a);return v.useEffect(()=>{const g=f.current;if(!g)return;const x=window.HTMLInputElement.prototype,w=Object.getOwnPropertyDescriptor(x,"checked").set;if(p!==l&&w){const C=new Event("click",{bubbles:i});w.call(g,l),g.dispatchEvent(C)}},[p,l,i]),y.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:l,...s,tabIndex:-1,ref:h,style:{...s.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});mb.displayName=FO;function pb(n){return n?"checked":"unchecked"}var gb=fb,XO=hb;const vb=v.forwardRef(({className:n,...a},l)=>y.jsx(gb,{className:nt("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-all-ease focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",n),...a,ref:l,children:y.jsx(XO,{className:nt("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 transition-all-ease")})}));vb.displayName=gb.displayName;class QO{baseUrl;apiKey;constructor(a="/api",l=""){this.baseUrl=a,this.apiKey=l||localStorage.getItem("apiKey")||""}setBaseUrl(a){this.baseUrl=a}setApiKey(a){this.apiKey=a,a?localStorage.setItem("apiKey",a):localStorage.removeItem("apiKey")}createHeaders(a="application/json"){const l={"X-API-Key":this.apiKey,Accept:"application/json"};return a&&(l["Content-Type"]=a),l}async apiFetch(a,l={}){const i=`${this.baseUrl}${a}`,s={...l,headers:{...this.createHeaders(),...l.headers}};try{const u=await fetch(i,s);if(u.status===401)return localStorage.removeItem("apiKey"),window.dispatchEvent(new CustomEvent("unauthorized")),new Promise(()=>{});if(!u.ok)throw new Error(`API request failed: ${u.status} ${u.statusText}`);if(u.status===204)return{};const f=await u.text();return f?JSON.parse(f):{}}catch(u){throw console.error("API request error:",u),u}}async get(a){return this.apiFetch(a,{method:"GET"})}async post(a,l){return this.apiFetch(a,{method:"POST",body:JSON.stringify(l)})}async put(a,l){return this.apiFetch(a,{method:"PUT",body:JSON.stringify(l)})}async delete(a){return this.apiFetch(a,{method:"DELETE"})}async getConfig(){return this.get("/config")}async updateConfig(a){return this.post("/config",a)}async getProviders(){return this.get("/api/providers")}async addProvider(a){return this.post("/api/providers",a)}async updateProvider(a,l){return this.post(`/api/providers/${a}`,l)}async deleteProvider(a){return this.delete(`/api/providers/${a}`)}async getTransformers(){return this.get("/api/transformers")}async addTransformer(a){return this.post("/api/transformers",a)}async updateTransformer(a,l){return this.post(`/api/transformers/${a}`,l)}async deleteTransformer(a){return this.delete(`/api/transformers/${a}`)}async getConfigNew(){return this.get("/config")}async saveConfig(a){return this.post("/config",a)}async restartService(){return this.post("/restart",{})}}const an=new QO,yb=v.createContext(void 0);function Fl(){const n=v.useContext(yb);if(n===void 0)throw new Error("useConfig must be used within a ConfigProvider");return n}function ZO({children:n}){const[a,l]=v.useState(null),[i,s]=v.useState(null),[u,f]=v.useState(!1),[h,p]=v.useState(localStorage.getItem("apiKey"));return v.useEffect(()=>{const m=()=>{p(localStorage.getItem("apiKey"))};return window.addEventListener("storage",m),()=>{window.removeEventListener("storage",m)}},[]),v.useEffect(()=>{(async()=>{f(!1),l(null),s(null)})()},[h]),v.useEffect(()=>{(async()=>{if(!u){f(!0);try{const g=await an.getConfig(),x={LOG:typeof g.LOG=="boolean"?g.LOG:!1,CLAUDE_PATH:typeof g.CLAUDE_PATH=="string"?g.CLAUDE_PATH:"",HOST:typeof g.HOST=="string"?g.HOST:"127.0.0.1",PORT:typeof g.PORT=="number"?g.PORT:3456,APIKEY:typeof g.APIKEY=="string"?g.APIKEY:"",API_TIMEOUT_MS:typeof g.API_TIMEOUT_MS=="string"?g.API_TIMEOUT_MS:"600000",transformers:Array.isArray(g.transformers)?g.transformers:[],Providers:Array.isArray(g.Providers)?g.Providers:[],Router:g.Router&&typeof g.Router=="object"?{default:typeof g.Router.default=="string"?g.Router.default:"",background:typeof g.Router.background=="string"?g.Router.background:"",think:typeof g.Router.think=="string"?g.Router.think:"",longContext:typeof g.Router.longContext=="string"?g.Router.longContext:"",longContextThreshold:typeof g.Router.longContextThreshold=="number"?g.Router.longContextThreshold:6e4,webSearch:typeof g.Router.webSearch=="string"?g.Router.webSearch:""}:{default:"",background:"",think:"",longContext:"",longContextThreshold:6e4,webSearch:""}};l(x)}catch(g){console.error("Failed to fetch config:",g),g.message!=="Unauthorized"&&(l({LOG:!1,CLAUDE_PATH:"",HOST:"127.0.0.1",PORT:3456,APIKEY:"",API_TIMEOUT_MS:"600000",transformers:[],Providers:[],Router:{default:"",background:"",think:"",longContext:"",longContextThreshold:6e4,webSearch:""}}),s(g))}}})()},[u,h]),y.jsx(yb.Provider,{value:{config:a,setConfig:l,error:i},children:n})}function JO({isOpen:n,onOpenChange:a}){const{t:l}=Ur(),{config:i,setConfig:s}=Fl();if(!i)return null;const u=h=>{s({...i,LOG:h})},f=h=>{s({...i,CLAUDE_PATH:h.target.value})};return y.jsx(so,{open:n,onOpenChange:a,children:y.jsxs(Pl,{children:[y.jsx(Hl,{children:y.jsx(Bl,{children:l("toplevel.title")})}),y.jsxs("div",{className:"space-y-4 py-4",children:[y.jsxs("div",{className:"flex items-center space-x-2",children:[y.jsx(vb,{id:"log",checked:i.LOG,onCheckedChange:u}),y.jsx(lt,{htmlFor:"log",className:"transition-all-ease hover:scale-[1.02] cursor-pointer",children:l("toplevel.log")})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(lt,{htmlFor:"claude-path",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.claude_path")}),y.jsx(bt,{id:"claude-path",value:i.CLAUDE_PATH,onChange:f,className:"transition-all-ease focus:scale-[1.01]"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(lt,{htmlFor:"host",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.host")}),y.jsx(bt,{id:"host",value:i.HOST,onChange:h=>s({...i,HOST:h.target.value}),className:"transition-all-ease focus:scale-[1.01]"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(lt,{htmlFor:"port",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.port")}),y.jsx(bt,{id:"port",type:"number",value:i.PORT,onChange:h=>s({...i,PORT:parseInt(h.target.value,10)}),className:"transition-all-ease focus:scale-[1.01]"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(lt,{htmlFor:"timeout",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.timeout")}),y.jsx(bt,{id:"timeout",value:i.API_TIMEOUT_MS,onChange:h=>s({...i,API_TIMEOUT_MS:h.target.value}),className:"transition-all-ease focus:scale-[1.01]"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(lt,{htmlFor:"apikey",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.apikey")}),y.jsx(bt,{id:"apikey",type:"password",value:i.APIKEY,onChange:h=>s({...i,APIKEY:h.target.value}),className:"transition-all-ease focus:scale-[1.01]"})]})]}),y.jsx(uo,{children:y.jsx(Le,{onClick:()=>a(!1),className:"transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:l("app.save")})})]})})}const ha=v.forwardRef(({className:n,...a},l)=>y.jsx("div",{ref:l,className:nt("rounded-lg border bg-card text-card-foreground shadow-sm",n),...a}));ha.displayName="Card";const ma=v.forwardRef(({className:n,...a},l)=>y.jsx("div",{ref:l,className:nt("flex flex-col space-y-1.5 p-6",n),...a}));ma.displayName="CardHeader";const pa=v.forwardRef(({className:n,...a},l)=>y.jsx("div",{ref:l,className:nt("text-2xl font-semibold leading-none tracking-tight",n),...a}));pa.displayName="CardTitle";const bb=v.forwardRef(({className:n,...a},l)=>y.jsx("div",{ref:l,className:nt("text-sm text-muted-foreground",n),...a}));bb.displayName="CardDescription";const ga=v.forwardRef(({className:n,...a},l)=>y.jsx("div",{ref:l,className:nt("p-6 pt-0",n),...a}));ga.displayName="CardContent";const xb=v.forwardRef(({className:n,...a},l)=>y.jsx("div",{ref:l,className:nt("flex items-center p-6 pt-0",n),...a}));xb.displayName="CardFooter";function IO({transformers:n,onEdit:a,onRemove:l}){return!n||!Array.isArray(n)?y.jsx("div",{className:"space-y-3",children:y.jsx("div",{className:"flex items-center justify-center rounded-md border bg-white p-8 text-gray-500",children:"No transformers configured"})}):y.jsx("div",{className:"space-y-3",children:n.map((i,s)=>{if(!i)return y.jsxs("div",{className:"flex items-start justify-between rounded-md border bg-white p-4 transition-all hover:shadow-md animate-slide-in hover:scale-[1.01]",children:[y.jsxs("div",{className:"flex-1 space-y-1.5",children:[y.jsx("p",{className:"text-md font-semibold text-gray-800",children:"Invalid Transformer"}),y.jsx("p",{className:"text-sm text-gray-500",children:"Transformer data is missing"})]}),y.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[y.jsx(Le,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",disabled:!0,children:y.jsx(uu,{className:"h-4 w-4"})}),y.jsx(Le,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:y.jsx(Lr,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s);const u=i.path||"Unnamed Transformer",f=i.options||{},h=()=>!f||Object.keys(f).length===0?y.jsx("p",{className:"text-sm text-gray-500",children:"No parameters configured"}):y.jsx("div",{className:"flex flex-wrap gap-2 max-h-8 overflow-hidden",children:Object.entries(f).map(([p,m])=>y.jsxs("span",{className:"inline-flex items-center px-2 py-1 rounded-md bg-gray-100 text-xs font-medium text-gray-700 border",children:[y.jsxs("span",{className:"text-gray-600",children:[p,":"]}),y.jsx("span",{className:"ml-1 text-gray-800",children:String(m)})]},p))});return y.jsxs("div",{className:"flex items-start justify-between rounded-md border bg-white p-4 transition-all hover:shadow-md animate-slide-in hover:scale-[1.01]",children:[y.jsxs("div",{className:"flex-1 space-y-1.5",children:[y.jsx("p",{className:"text-md font-semibold text-gray-800",children:u}),h()]}),y.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[y.jsx(Le,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",children:y.jsx(uu,{className:"h-4 w-4"})}),y.jsx(Le,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:y.jsx(Lr,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s)})})}function WO(){const{t:n}=Ur(),{config:a,setConfig:l}=Fl(),[i,s]=v.useState(null),[u,f]=v.useState(null),[h,p]=v.useState(null);if(!a)return y.jsxs(ha,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[y.jsx(ma,{className:"flex flex-row items-center justify-between border-b p-4",children:y.jsx(pa,{className:"text-lg",children:n("transformers.title")})}),y.jsx(ga,{className:"flex-grow flex items-center justify-center p-4",children:y.jsx("div",{className:"text-gray-500",children:"Loading transformers configuration..."})})]});const m=Array.isArray(a.transformers)?a.transformers:[],g=()=>{p({path:"",options:{}}),s(m.length)},x=j=>{const A=[...m];A.splice(j,1),l({...a,transformers:A}),f(null)},S=(j,A,k,P)=>{if(j<m.length){const Y=[...m];P!==void 0?Y[j].options[P]=k:Y[j][A]=k,l({...a,transformers:Y})}else if(h){const Y={...h};P!==void 0?Y.options[P]=k:Y[A]=k,p(Y)}},w=i!==null?i<m.length?m[i]:h:null,C=()=>{if(h&&i===m.length){const j=[...m,h];l({...a,transformers:j})}s(null),p(null)},R=()=>{s(null),p(null)};return y.jsxs(ha,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[y.jsxs(ma,{className:"flex flex-row items-center justify-between border-b p-4",children:[y.jsxs(pa,{className:"text-lg",children:[n("transformers.title")," ",y.jsxs("span",{className:"text-sm font-normal text-gray-500",children:["(",m.length,")"]})]}),y.jsx(Le,{onClick:g,children:n("transformers.add")})]}),y.jsx(ga,{className:"flex-grow overflow-y-auto p-4",children:y.jsx(IO,{transformers:m,onEdit:s,onRemove:f})}),y.jsx(so,{open:i!==null,onOpenChange:R,children:y.jsxs(Pl,{children:[y.jsx(Hl,{children:y.jsx(Bl,{children:n("transformers.edit")})}),w&&i!==null&&y.jsxs("div",{className:"space-y-4 py-4 px-6 max-h-96 overflow-y-auto",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(lt,{htmlFor:"transformer-path",children:n("transformers.path")}),y.jsx(bt,{id:"transformer-path",value:w.path||"",onChange:j=>S(i,"path",j.target.value)})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx(lt,{children:n("transformers.parameters")}),y.jsx(Le,{variant:"outline",size:"sm",onClick:()=>{const j=w.options||{},A=`param${Object.keys(j).length+1}`;if(i!==null){const k={...j,[A]:""};if(i<m.length){const P=[...m];P[i].options=k,l({...a,transformers:P})}else h&&p({...h,options:k})}},children:y.jsx(Nd,{className:"h-4 w-4"})})]}),Object.entries(w.options||{}).map(([j,A])=>y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(bt,{value:j,onChange:k=>{const Y={...w.options||{}};if(delete Y[j],Y[k.target.value]=A,i!==null)if(i<m.length){const B=[...m];B[i].options=Y,l({...a,transformers:B})}else h&&p({...h,options:Y})},className:"flex-1"}),y.jsx(bt,{value:A,onChange:k=>{i!==null&&S(i,"options",k.target.value,j)},className:"flex-1"}),y.jsx(Le,{variant:"outline",size:"icon",onClick:()=>{if(i!==null){const P={...w.options||{}};if(delete P[j],i<m.length){const Y=[...m];Y[i].options=P,l({...a,transformers:Y})}else h&&p({...h,options:P})}},children:y.jsx(Lr,{className:"h-4 w-4"})})]},j))]})]}),y.jsxs(uo,{children:[y.jsx(Le,{variant:"outline",onClick:R,children:n("app.cancel")}),y.jsx(Le,{onClick:C,children:n("app.save")})]})]})}),y.jsx(so,{open:u!==null,onOpenChange:()=>f(null),children:y.jsxs(Pl,{children:[y.jsxs(Hl,{children:[y.jsx(Bl,{children:n("transformers.delete")}),y.jsx(ah,{children:n("transformers.delete_transformer_confirm")})]}),y.jsxs(uo,{children:[y.jsx(Le,{variant:"outline",onClick:()=>f(null),children:n("app.cancel")}),y.jsx(Le,{variant:"destructive",onClick:()=>u!==null&&x(u),children:n("app.delete")})]})]})})]})}const eA=rh("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Sb({className:n,variant:a,...l}){return y.jsx("div",{className:nt(eA({variant:a}),n),...l})}function tA({providers:n,onEdit:a,onRemove:l}){return!n||!Array.isArray(n)?y.jsx("div",{className:"space-y-3",children:y.jsx("div",{className:"flex items-center justify-center rounded-md border bg-white p-8 text-gray-500",children:"No providers configured"})}):y.jsx("div",{className:"space-y-3",children:n.map((i,s)=>{if(!i)return y.jsxs("div",{className:"flex items-start justify-between rounded-md border bg-white p-4 transition-all hover:shadow-md animate-slide-in hover:scale-[1.01]",children:[y.jsxs("div",{className:"flex-1 space-y-1.5",children:[y.jsx("p",{className:"text-md font-semibold text-gray-800",children:"Invalid Provider"}),y.jsx("p",{className:"text-sm text-gray-500",children:"Provider data is missing"})]}),y.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[y.jsx(Le,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",disabled:!0,children:y.jsx(uu,{className:"h-4 w-4"})}),y.jsx(Le,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:y.jsx(Lr,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s);const u=i.name||"Unnamed Provider",f=i.api_base_url||"No API URL",h=Array.isArray(i.models)?i.models:[];return y.jsxs("div",{className:"flex items-start justify-between rounded-md border bg-white p-4 transition-all hover:shadow-md animate-slide-in hover:scale-[1.01]",children:[y.jsxs("div",{className:"flex-1 space-y-1.5",children:[y.jsx("p",{className:"text-md font-semibold text-gray-800",children:u}),y.jsx("p",{className:"text-sm text-gray-500",children:f}),y.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:h.map((p,m)=>y.jsx(Sb,{variant:"outline",className:"font-normal transition-all-ease hover:scale-105",children:p||"Unnamed Model"},m))})]}),y.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[y.jsx(Le,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",children:y.jsx(uu,{className:"h-4 w-4"})}),y.jsx(Le,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:y.jsx(Lr,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s)})})}var dy=1,nA=.9,aA=.8,rA=.17,sd=.1,ud=.999,lA=.9999,iA=.99,oA=/[\\\/_+.#"@\[\(\{&]/,sA=/[\\\/_+.#"@\[\(\{&]/g,uA=/[\s-]/,wb=/[\s-]/g;function _d(n,a,l,i,s,u,f){if(u===a.length)return s===n.length?dy:iA;var h=`${s},${u}`;if(f[h]!==void 0)return f[h];for(var p=i.charAt(u),m=l.indexOf(p,s),g=0,x,S,w,C;m>=0;)x=_d(n,a,l,i,m+1,u+1,f),x>g&&(m===s?x*=dy:oA.test(n.charAt(m-1))?(x*=aA,w=n.slice(s,m-1).match(sA),w&&s>0&&(x*=Math.pow(ud,w.length))):uA.test(n.charAt(m-1))?(x*=nA,C=n.slice(s,m-1).match(wb),C&&s>0&&(x*=Math.pow(ud,C.length))):(x*=rA,s>0&&(x*=Math.pow(ud,m-s))),n.charAt(m)!==a.charAt(u)&&(x*=lA)),(x<sd&&l.charAt(m-1)===i.charAt(u+1)||i.charAt(u+1)===i.charAt(u)&&l.charAt(m-1)!==i.charAt(u))&&(S=_d(n,a,l,i,m+1,u+2,f),S*sd>x&&(x=S*sd)),x>g&&(g=x),m=l.indexOf(p,m+1);return f[h]=g,g}function hy(n){return n.toLowerCase().replace(wb," ")}function cA(n,a,l){return n=l&&l.length>0?`${n+" "+l.join(" ")}`:n,_d(n,a,hy(n),hy(a),0,0,{})}var Wi='[cmdk-group=""]',cd='[cmdk-group-items=""]',fA='[cmdk-group-heading=""]',Eb='[cmdk-item=""]',my=`${Eb}:not([aria-disabled="true"])`,Dd="cmdk-item-select",jl="data-value",dA=(n,a,l)=>cA(n,a,l),Rb=v.createContext(void 0),go=()=>v.useContext(Rb),Cb=v.createContext(void 0),lh=()=>v.useContext(Cb),Ob=v.createContext(void 0),Ab=v.forwardRef((n,a)=>{let l=Ml(()=>{var O,M;return{search:"",value:(M=(O=n.value)!=null?O:n.defaultValue)!=null?M:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),i=Ml(()=>new Set),s=Ml(()=>new Map),u=Ml(()=>new Map),f=Ml(()=>new Set),h=Nb(n),{label:p,children:m,value:g,onValueChange:x,filter:S,shouldFilter:w,loop:C,disablePointerSelection:R=!1,vimBindings:j=!0,...A}=n,k=Vn(),P=Vn(),Y=Vn(),B=v.useRef(null),N=EA();zr(()=>{if(g!==void 0){let O=g.trim();l.current.value=O,X.emit()}},[g]),zr(()=>{N(6,de)},[]);let X=v.useMemo(()=>({subscribe:O=>(f.current.add(O),()=>f.current.delete(O)),snapshot:()=>l.current,setState:(O,M,U)=>{var V,I,re,ce;if(!Object.is(l.current[O],M)){if(l.current[O]=M,O==="search")Se(),oe(),N(1,Oe);else if(O==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Ee=document.getElementById(Y);Ee?Ee.focus():(V=document.getElementById(k))==null||V.focus()}if(N(7,()=>{var Ee;l.current.selectedItemId=(Ee=fe())==null?void 0:Ee.id,X.emit()}),U||N(5,de),((I=h.current)==null?void 0:I.value)!==void 0){let Ee=M??"";(ce=(re=h.current).onValueChange)==null||ce.call(re,Ee);return}}X.emit()}},emit:()=>{f.current.forEach(O=>O())}}),[]),ee=v.useMemo(()=>({value:(O,M,U)=>{var V;M!==((V=u.current.get(O))==null?void 0:V.value)&&(u.current.set(O,{value:M,keywords:U}),l.current.filtered.items.set(O,ie(M,U)),N(2,()=>{oe(),X.emit()}))},item:(O,M)=>(i.current.add(O),M&&(s.current.has(M)?s.current.get(M).add(O):s.current.set(M,new Set([O]))),N(3,()=>{Se(),oe(),l.current.value||Oe(),X.emit()}),()=>{u.current.delete(O),i.current.delete(O),l.current.filtered.items.delete(O);let U=fe();N(4,()=>{Se(),U?.getAttribute("id")===O&&Oe(),X.emit()})}),group:O=>(s.current.has(O)||s.current.set(O,new Set),()=>{u.current.delete(O),s.current.delete(O)}),filter:()=>h.current.shouldFilter,label:p||n["aria-label"],getDisablePointerSelection:()=>h.current.disablePointerSelection,listId:k,inputId:Y,labelId:P,listInnerRef:B}),[]);function ie(O,M){var U,V;let I=(V=(U=h.current)==null?void 0:U.filter)!=null?V:dA;return O?I(O,l.current.search,M):0}function oe(){if(!l.current.search||h.current.shouldFilter===!1)return;let O=l.current.filtered.items,M=[];l.current.filtered.groups.forEach(V=>{let I=s.current.get(V),re=0;I.forEach(ce=>{let Ee=O.get(ce);re=Math.max(Ee,re)}),M.push([V,re])});let U=B.current;ue().sort((V,I)=>{var re,ce;let Ee=V.getAttribute("id"),ke=I.getAttribute("id");return((re=O.get(ke))!=null?re:0)-((ce=O.get(Ee))!=null?ce:0)}).forEach(V=>{let I=V.closest(cd);I?I.appendChild(V.parentElement===I?V:V.closest(`${cd} > *`)):U.appendChild(V.parentElement===U?V:V.closest(`${cd} > *`))}),M.sort((V,I)=>I[1]-V[1]).forEach(V=>{var I;let re=(I=B.current)==null?void 0:I.querySelector(`${Wi}[${jl}="${encodeURIComponent(V[0])}"]`);re?.parentElement.appendChild(re)})}function Oe(){let O=ue().find(U=>U.getAttribute("aria-disabled")!=="true"),M=O?.getAttribute(jl);X.setState("value",M||void 0)}function Se(){var O,M,U,V;if(!l.current.search||h.current.shouldFilter===!1){l.current.filtered.count=i.current.size;return}l.current.filtered.groups=new Set;let I=0;for(let re of i.current){let ce=(M=(O=u.current.get(re))==null?void 0:O.value)!=null?M:"",Ee=(V=(U=u.current.get(re))==null?void 0:U.keywords)!=null?V:[],ke=ie(ce,Ee);l.current.filtered.items.set(re,ke),ke>0&&I++}for(let[re,ce]of s.current)for(let Ee of ce)if(l.current.filtered.items.get(Ee)>0){l.current.filtered.groups.add(re);break}l.current.filtered.count=I}function de(){var O,M,U;let V=fe();V&&(((O=V.parentElement)==null?void 0:O.firstChild)===V&&((U=(M=V.closest(Wi))==null?void 0:M.querySelector(fA))==null||U.scrollIntoView({block:"nearest"})),V.scrollIntoView({block:"nearest"}))}function fe(){var O;return(O=B.current)==null?void 0:O.querySelector(`${Eb}[aria-selected="true"]`)}function ue(){var O;return Array.from(((O=B.current)==null?void 0:O.querySelectorAll(my))||[])}function L(O){let M=ue()[O];M&&X.setState("value",M.getAttribute(jl))}function W(O){var M;let U=fe(),V=ue(),I=V.findIndex(ce=>ce===U),re=V[I+O];(M=h.current)!=null&&M.loop&&(re=I+O<0?V[V.length-1]:I+O===V.length?V[0]:V[I+O]),re&&X.setState("value",re.getAttribute(jl))}function K(O){let M=fe(),U=M?.closest(Wi),V;for(;U&&!V;)U=O>0?SA(U,Wi):wA(U,Wi),V=U?.querySelector(my);V?X.setState("value",V.getAttribute(jl)):W(O)}let he=()=>L(ue().length-1),T=O=>{O.preventDefault(),O.metaKey?he():O.altKey?K(1):W(1)},$=O=>{O.preventDefault(),O.metaKey?L(0):O.altKey?K(-1):W(-1)};return v.createElement(at.div,{ref:a,tabIndex:-1,...A,"cmdk-root":"",onKeyDown:O=>{var M;(M=A.onKeyDown)==null||M.call(A,O);let U=O.nativeEvent.isComposing||O.keyCode===229;if(!(O.defaultPrevented||U))switch(O.key){case"n":case"j":{j&&O.ctrlKey&&T(O);break}case"ArrowDown":{T(O);break}case"p":case"k":{j&&O.ctrlKey&&$(O);break}case"ArrowUp":{$(O);break}case"Home":{O.preventDefault(),L(0);break}case"End":{O.preventDefault(),he();break}case"Enter":{O.preventDefault();let V=fe();if(V){let I=new Event(Dd);V.dispatchEvent(I)}}}}},v.createElement("label",{"cmdk-label":"",htmlFor:ee.inputId,id:ee.labelId,style:CA},p),Au(n,O=>v.createElement(Cb.Provider,{value:X},v.createElement(Rb.Provider,{value:ee},O))))}),hA=v.forwardRef((n,a)=>{var l,i;let s=Vn(),u=v.useRef(null),f=v.useContext(Ob),h=go(),p=Nb(n),m=(i=(l=p.current)==null?void 0:l.forceMount)!=null?i:f?.forceMount;zr(()=>{if(!m)return h.item(s,f?.id)},[m]);let g=Tb(s,u,[n.value,n.children,u],n.keywords),x=lh(),S=Ia(N=>N.value&&N.value===g.current),w=Ia(N=>m||h.filter()===!1?!0:N.search?N.filtered.items.get(s)>0:!0);v.useEffect(()=>{let N=u.current;if(!(!N||n.disabled))return N.addEventListener(Dd,C),()=>N.removeEventListener(Dd,C)},[w,n.onSelect,n.disabled]);function C(){var N,X;R(),(X=(N=p.current).onSelect)==null||X.call(N,g.current)}function R(){x.setState("value",g.current,!0)}if(!w)return null;let{disabled:j,value:A,onSelect:k,forceMount:P,keywords:Y,...B}=n;return v.createElement(at.div,{ref:_r(u,a),...B,id:s,"cmdk-item":"",role:"option","aria-disabled":!!j,"aria-selected":!!S,"data-disabled":!!j,"data-selected":!!S,onPointerMove:j||h.getDisablePointerSelection()?void 0:R,onClick:j?void 0:C},n.children)}),mA=v.forwardRef((n,a)=>{let{heading:l,children:i,forceMount:s,...u}=n,f=Vn(),h=v.useRef(null),p=v.useRef(null),m=Vn(),g=go(),x=Ia(w=>s||g.filter()===!1?!0:w.search?w.filtered.groups.has(f):!0);zr(()=>g.group(f),[]),Tb(f,h,[n.value,n.heading,p]);let S=v.useMemo(()=>({id:f,forceMount:s}),[s]);return v.createElement(at.div,{ref:_r(h,a),...u,"cmdk-group":"",role:"presentation",hidden:x?void 0:!0},l&&v.createElement("div",{ref:p,"cmdk-group-heading":"","aria-hidden":!0,id:m},l),Au(n,w=>v.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":l?m:void 0},v.createElement(Ob.Provider,{value:S},w))))}),pA=v.forwardRef((n,a)=>{let{alwaysRender:l,...i}=n,s=v.useRef(null),u=Ia(f=>!f.search);return!l&&!u?null:v.createElement(at.div,{ref:_r(s,a),...i,"cmdk-separator":"",role:"separator"})}),gA=v.forwardRef((n,a)=>{let{onValueChange:l,...i}=n,s=n.value!=null,u=lh(),f=Ia(m=>m.search),h=Ia(m=>m.selectedItemId),p=go();return v.useEffect(()=>{n.value!=null&&u.setState("search",n.value)},[n.value]),v.createElement(at.input,{ref:a,...i,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":p.listId,"aria-labelledby":p.labelId,"aria-activedescendant":h,id:p.inputId,type:"text",value:s?n.value:f,onChange:m=>{s||u.setState("search",m.target.value),l?.(m.target.value)}})}),vA=v.forwardRef((n,a)=>{let{children:l,label:i="Suggestions",...s}=n,u=v.useRef(null),f=v.useRef(null),h=Ia(m=>m.selectedItemId),p=go();return v.useEffect(()=>{if(f.current&&u.current){let m=f.current,g=u.current,x,S=new ResizeObserver(()=>{x=requestAnimationFrame(()=>{let w=m.offsetHeight;g.style.setProperty("--cmdk-list-height",w.toFixed(1)+"px")})});return S.observe(m),()=>{cancelAnimationFrame(x),S.unobserve(m)}}},[]),v.createElement(at.div,{ref:_r(u,a),...s,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":h,"aria-label":i,id:p.listId},Au(n,m=>v.createElement("div",{ref:_r(f,p.listInnerRef),"cmdk-list-sizer":""},m)))}),yA=v.forwardRef((n,a)=>{let{open:l,onOpenChange:i,overlayClassName:s,contentClassName:u,container:f,...h}=n;return v.createElement(B0,{open:l,onOpenChange:i},v.createElement($0,{container:f},v.createElement(eh,{"cmdk-overlay":"",className:s}),v.createElement(th,{"aria-label":n.label,"cmdk-dialog":"",className:u},v.createElement(Ab,{ref:a,...h}))))}),bA=v.forwardRef((n,a)=>Ia(l=>l.filtered.count===0)?v.createElement(at.div,{ref:a,...n,"cmdk-empty":"",role:"presentation"}):null),xA=v.forwardRef((n,a)=>{let{progress:l,children:i,label:s="Loading...",...u}=n;return v.createElement(at.div,{ref:a,...u,"cmdk-loading":"",role:"progressbar","aria-valuenow":l,"aria-valuemin":0,"aria-valuemax":100,"aria-label":s},Au(n,f=>v.createElement("div",{"aria-hidden":!0},f)))}),Xl=Object.assign(Ab,{List:vA,Item:hA,Input:gA,Group:mA,Separator:pA,Dialog:yA,Empty:bA,Loading:xA});function SA(n,a){let l=n.nextElementSibling;for(;l;){if(l.matches(a))return l;l=l.nextElementSibling}}function wA(n,a){let l=n.previousElementSibling;for(;l;){if(l.matches(a))return l;l=l.previousElementSibling}}function Nb(n){let a=v.useRef(n);return zr(()=>{a.current=n}),a}var zr=typeof window>"u"?v.useEffect:v.useLayoutEffect;function Ml(n){let a=v.useRef();return a.current===void 0&&(a.current=n()),a}function Ia(n){let a=lh(),l=()=>n(a.snapshot());return v.useSyncExternalStore(a.subscribe,l,l)}function Tb(n,a,l,i=[]){let s=v.useRef(),u=go();return zr(()=>{var f;let h=(()=>{var m;for(let g of l){if(typeof g=="string")return g.trim();if(typeof g=="object"&&"current"in g)return g.current?(m=g.current.textContent)==null?void 0:m.trim():s.current}})(),p=i.map(m=>m.trim());u.value(n,h,p),(f=a.current)==null||f.setAttribute(jl,h),s.current=h}),s}var EA=()=>{let[n,a]=v.useState(),l=Ml(()=>new Map);return zr(()=>{l.current.forEach(i=>i()),l.current=new Map},[n]),(i,s)=>{l.current.set(i,s),a({})}};function RA(n){let a=n.type;return typeof a=="function"?a(n.props):"render"in a?a.render(n.props):n}function Au({asChild:n,children:a},l){return n&&v.isValidElement(a)?v.cloneElement(RA(a),{ref:a.ref},l(a.props.children)):l(a)}var CA={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function jb({className:n,...a}){return y.jsx(Xl,{"data-slot":"command",className:nt("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",n),...a})}function Mb({className:n,...a}){return y.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[y.jsx(eO,{className:"size-4 shrink-0 opacity-50"}),y.jsx(Xl.Input,{"data-slot":"command-input",className:nt("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",n),...a})]})}function _b({className:n,...a}){return y.jsx(Xl.List,{"data-slot":"command-list",className:nt("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",n),...a})}function Db({...n}){return y.jsx(Xl.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...n})}function Lb({className:n,...a}){return y.jsx(Xl.Group,{"data-slot":"command-group",className:nt("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",n),...a})}function zb({className:n,...a}){return y.jsx(Xl.Item,{"data-slot":"command-item",className:nt("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...a})}const OA=["top","right","bottom","left"],Wa=Math.min,nn=Math.max,cu=Math.round,Fs=Math.floor,Yn=n=>({x:n,y:n}),AA={left:"right",right:"left",bottom:"top",top:"bottom"},NA={start:"end",end:"start"};function Ld(n,a,l){return nn(n,Wa(a,l))}function va(n,a){return typeof n=="function"?n(a):n}function ya(n){return n.split("-")[0]}function Ql(n){return n.split("-")[1]}function ih(n){return n==="x"?"y":"x"}function oh(n){return n==="y"?"height":"width"}const TA=new Set(["top","bottom"]);function Bn(n){return TA.has(ya(n))?"y":"x"}function sh(n){return ih(Bn(n))}function jA(n,a,l){l===void 0&&(l=!1);const i=Ql(n),s=sh(n),u=oh(s);let f=s==="x"?i===(l?"end":"start")?"right":"left":i==="start"?"bottom":"top";return a.reference[u]>a.floating[u]&&(f=fu(f)),[f,fu(f)]}function MA(n){const a=fu(n);return[zd(n),a,zd(a)]}function zd(n){return n.replace(/start|end/g,a=>NA[a])}const py=["left","right"],gy=["right","left"],_A=["top","bottom"],DA=["bottom","top"];function LA(n,a,l){switch(n){case"top":case"bottom":return l?a?gy:py:a?py:gy;case"left":case"right":return a?_A:DA;default:return[]}}function zA(n,a,l,i){const s=Ql(n);let u=LA(ya(n),l==="start",i);return s&&(u=u.map(f=>f+"-"+s),a&&(u=u.concat(u.map(zd)))),u}function fu(n){return n.replace(/left|right|bottom|top/g,a=>AA[a])}function kA(n){return{top:0,right:0,bottom:0,left:0,...n}}function kb(n){return typeof n!="number"?kA(n):{top:n,right:n,bottom:n,left:n}}function du(n){const{x:a,y:l,width:i,height:s}=n;return{width:i,height:s,top:l,left:a,right:a+i,bottom:l+s,x:a,y:l}}function vy(n,a,l){let{reference:i,floating:s}=n;const u=Bn(a),f=sh(a),h=oh(f),p=ya(a),m=u==="y",g=i.x+i.width/2-s.width/2,x=i.y+i.height/2-s.height/2,S=i[h]/2-s[h]/2;let w;switch(p){case"top":w={x:g,y:i.y-s.height};break;case"bottom":w={x:g,y:i.y+i.height};break;case"right":w={x:i.x+i.width,y:x};break;case"left":w={x:i.x-s.width,y:x};break;default:w={x:i.x,y:i.y}}switch(Ql(a)){case"start":w[f]-=S*(l&&m?-1:1);break;case"end":w[f]+=S*(l&&m?-1:1);break}return w}const UA=async(n,a,l)=>{const{placement:i="bottom",strategy:s="absolute",middleware:u=[],platform:f}=l,h=u.filter(Boolean),p=await(f.isRTL==null?void 0:f.isRTL(a));let m=await f.getElementRects({reference:n,floating:a,strategy:s}),{x:g,y:x}=vy(m,i,p),S=i,w={},C=0;for(let R=0;R<h.length;R++){const{name:j,fn:A}=h[R],{x:k,y:P,data:Y,reset:B}=await A({x:g,y:x,initialPlacement:i,placement:S,strategy:s,middlewareData:w,rects:m,platform:f,elements:{reference:n,floating:a}});g=k??g,x=P??x,w={...w,[j]:{...w[j],...Y}},B&&C<=50&&(C++,typeof B=="object"&&(B.placement&&(S=B.placement),B.rects&&(m=B.rects===!0?await f.getElementRects({reference:n,floating:a,strategy:s}):B.rects),{x:g,y:x}=vy(m,S,p)),R=-1)}return{x:g,y:x,placement:S,strategy:s,middlewareData:w}};async function co(n,a){var l;a===void 0&&(a={});const{x:i,y:s,platform:u,rects:f,elements:h,strategy:p}=n,{boundary:m="clippingAncestors",rootBoundary:g="viewport",elementContext:x="floating",altBoundary:S=!1,padding:w=0}=va(a,n),C=kb(w),j=h[S?x==="floating"?"reference":"floating":x],A=du(await u.getClippingRect({element:(l=await(u.isElement==null?void 0:u.isElement(j)))==null||l?j:j.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(h.floating)),boundary:m,rootBoundary:g,strategy:p})),k=x==="floating"?{x:i,y:s,width:f.floating.width,height:f.floating.height}:f.reference,P=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h.floating)),Y=await(u.isElement==null?void 0:u.isElement(P))?await(u.getScale==null?void 0:u.getScale(P))||{x:1,y:1}:{x:1,y:1},B=du(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:k,offsetParent:P,strategy:p}):k);return{top:(A.top-B.top+C.top)/Y.y,bottom:(B.bottom-A.bottom+C.bottom)/Y.y,left:(A.left-B.left+C.left)/Y.x,right:(B.right-A.right+C.right)/Y.x}}const PA=n=>({name:"arrow",options:n,async fn(a){const{x:l,y:i,placement:s,rects:u,platform:f,elements:h,middlewareData:p}=a,{element:m,padding:g=0}=va(n,a)||{};if(m==null)return{};const x=kb(g),S={x:l,y:i},w=sh(s),C=oh(w),R=await f.getDimensions(m),j=w==="y",A=j?"top":"left",k=j?"bottom":"right",P=j?"clientHeight":"clientWidth",Y=u.reference[C]+u.reference[w]-S[w]-u.floating[C],B=S[w]-u.reference[w],N=await(f.getOffsetParent==null?void 0:f.getOffsetParent(m));let X=N?N[P]:0;(!X||!await(f.isElement==null?void 0:f.isElement(N)))&&(X=h.floating[P]||u.floating[C]);const ee=Y/2-B/2,ie=X/2-R[C]/2-1,oe=Wa(x[A],ie),Oe=Wa(x[k],ie),Se=oe,de=X-R[C]-Oe,fe=X/2-R[C]/2+ee,ue=Ld(Se,fe,de),L=!p.arrow&&Ql(s)!=null&&fe!==ue&&u.reference[C]/2-(fe<Se?oe:Oe)-R[C]/2<0,W=L?fe<Se?fe-Se:fe-de:0;return{[w]:S[w]+W,data:{[w]:ue,centerOffset:fe-ue-W,...L&&{alignmentOffset:W}},reset:L}}}),HA=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(a){var l,i;const{placement:s,middlewareData:u,rects:f,initialPlacement:h,platform:p,elements:m}=a,{mainAxis:g=!0,crossAxis:x=!0,fallbackPlacements:S,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:R=!0,...j}=va(n,a);if((l=u.arrow)!=null&&l.alignmentOffset)return{};const A=ya(s),k=Bn(h),P=ya(h)===h,Y=await(p.isRTL==null?void 0:p.isRTL(m.floating)),B=S||(P||!R?[fu(h)]:MA(h)),N=C!=="none";!S&&N&&B.push(...zA(h,R,C,Y));const X=[h,...B],ee=await co(a,j),ie=[];let oe=((i=u.flip)==null?void 0:i.overflows)||[];if(g&&ie.push(ee[A]),x){const fe=jA(s,f,Y);ie.push(ee[fe[0]],ee[fe[1]])}if(oe=[...oe,{placement:s,overflows:ie}],!ie.every(fe=>fe<=0)){var Oe,Se;const fe=(((Oe=u.flip)==null?void 0:Oe.index)||0)+1,ue=X[fe];if(ue&&(!(x==="alignment"?k!==Bn(ue):!1)||oe.every(K=>K.overflows[0]>0&&Bn(K.placement)===k)))return{data:{index:fe,overflows:oe},reset:{placement:ue}};let L=(Se=oe.filter(W=>W.overflows[0]<=0).sort((W,K)=>W.overflows[1]-K.overflows[1])[0])==null?void 0:Se.placement;if(!L)switch(w){case"bestFit":{var de;const W=(de=oe.filter(K=>{if(N){const he=Bn(K.placement);return he===k||he==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(he=>he>0).reduce((he,T)=>he+T,0)]).sort((K,he)=>K[1]-he[1])[0])==null?void 0:de[0];W&&(L=W);break}case"initialPlacement":L=h;break}if(s!==L)return{reset:{placement:L}}}return{}}}};function yy(n,a){return{top:n.top-a.height,right:n.right-a.width,bottom:n.bottom-a.height,left:n.left-a.width}}function by(n){return OA.some(a=>n[a]>=0)}const BA=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(a){const{rects:l}=a,{strategy:i="referenceHidden",...s}=va(n,a);switch(i){case"referenceHidden":{const u=await co(a,{...s,elementContext:"reference"}),f=yy(u,l.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:by(f)}}}case"escaped":{const u=await co(a,{...s,altBoundary:!0}),f=yy(u,l.floating);return{data:{escapedOffsets:f,escaped:by(f)}}}default:return{}}}}},Ub=new Set(["left","top"]);async function $A(n,a){const{placement:l,platform:i,elements:s}=n,u=await(i.isRTL==null?void 0:i.isRTL(s.floating)),f=ya(l),h=Ql(l),p=Bn(l)==="y",m=Ub.has(f)?-1:1,g=u&&p?-1:1,x=va(a,n);let{mainAxis:S,crossAxis:w,alignmentAxis:C}=typeof x=="number"?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return h&&typeof C=="number"&&(w=h==="end"?C*-1:C),p?{x:w*g,y:S*m}:{x:S*m,y:w*g}}const VA=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(a){var l,i;const{x:s,y:u,placement:f,middlewareData:h}=a,p=await $A(a,n);return f===((l=h.offset)==null?void 0:l.placement)&&(i=h.arrow)!=null&&i.alignmentOffset?{}:{x:s+p.x,y:u+p.y,data:{...p,placement:f}}}}},YA=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(a){const{x:l,y:i,placement:s}=a,{mainAxis:u=!0,crossAxis:f=!1,limiter:h={fn:j=>{let{x:A,y:k}=j;return{x:A,y:k}}},...p}=va(n,a),m={x:l,y:i},g=await co(a,p),x=Bn(ya(s)),S=ih(x);let w=m[S],C=m[x];if(u){const j=S==="y"?"top":"left",A=S==="y"?"bottom":"right",k=w+g[j],P=w-g[A];w=Ld(k,w,P)}if(f){const j=x==="y"?"top":"left",A=x==="y"?"bottom":"right",k=C+g[j],P=C-g[A];C=Ld(k,C,P)}const R=h.fn({...a,[S]:w,[x]:C});return{...R,data:{x:R.x-l,y:R.y-i,enabled:{[S]:u,[x]:f}}}}}},qA=function(n){return n===void 0&&(n={}),{options:n,fn(a){const{x:l,y:i,placement:s,rects:u,middlewareData:f}=a,{offset:h=0,mainAxis:p=!0,crossAxis:m=!0}=va(n,a),g={x:l,y:i},x=Bn(s),S=ih(x);let w=g[S],C=g[x];const R=va(h,a),j=typeof R=="number"?{mainAxis:R,crossAxis:0}:{mainAxis:0,crossAxis:0,...R};if(p){const P=S==="y"?"height":"width",Y=u.reference[S]-u.floating[P]+j.mainAxis,B=u.reference[S]+u.reference[P]-j.mainAxis;w<Y?w=Y:w>B&&(w=B)}if(m){var A,k;const P=S==="y"?"width":"height",Y=Ub.has(ya(s)),B=u.reference[x]-u.floating[P]+(Y&&((A=f.offset)==null?void 0:A[x])||0)+(Y?0:j.crossAxis),N=u.reference[x]+u.reference[P]+(Y?0:((k=f.offset)==null?void 0:k[x])||0)-(Y?j.crossAxis:0);C<B?C=B:C>N&&(C=N)}return{[S]:w,[x]:C}}}},GA=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(a){var l,i;const{placement:s,rects:u,platform:f,elements:h}=a,{apply:p=()=>{},...m}=va(n,a),g=await co(a,m),x=ya(s),S=Ql(s),w=Bn(s)==="y",{width:C,height:R}=u.floating;let j,A;x==="top"||x==="bottom"?(j=x,A=S===(await(f.isRTL==null?void 0:f.isRTL(h.floating))?"start":"end")?"left":"right"):(A=x,j=S==="end"?"top":"bottom");const k=R-g.top-g.bottom,P=C-g.left-g.right,Y=Wa(R-g[j],k),B=Wa(C-g[A],P),N=!a.middlewareData.shift;let X=Y,ee=B;if((l=a.middlewareData.shift)!=null&&l.enabled.x&&(ee=P),(i=a.middlewareData.shift)!=null&&i.enabled.y&&(X=k),N&&!S){const oe=nn(g.left,0),Oe=nn(g.right,0),Se=nn(g.top,0),de=nn(g.bottom,0);w?ee=C-2*(oe!==0||Oe!==0?oe+Oe:nn(g.left,g.right)):X=R-2*(Se!==0||de!==0?Se+de:nn(g.top,g.bottom))}await p({...a,availableWidth:ee,availableHeight:X});const ie=await f.getDimensions(h.floating);return C!==ie.width||R!==ie.height?{reset:{rects:!0}}:{}}}};function Nu(){return typeof window<"u"}function Zl(n){return Pb(n)?(n.nodeName||"").toLowerCase():"#document"}function rn(n){var a;return(n==null||(a=n.ownerDocument)==null?void 0:a.defaultView)||window}function Kn(n){var a;return(a=(Pb(n)?n.ownerDocument:n.document)||window.document)==null?void 0:a.documentElement}function Pb(n){return Nu()?n instanceof Node||n instanceof rn(n).Node:!1}function Cn(n){return Nu()?n instanceof Element||n instanceof rn(n).Element:!1}function qn(n){return Nu()?n instanceof HTMLElement||n instanceof rn(n).HTMLElement:!1}function xy(n){return!Nu()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof rn(n).ShadowRoot}const KA=new Set(["inline","contents"]);function vo(n){const{overflow:a,overflowX:l,overflowY:i,display:s}=On(n);return/auto|scroll|overlay|hidden|clip/.test(a+i+l)&&!KA.has(s)}const FA=new Set(["table","td","th"]);function XA(n){return FA.has(Zl(n))}const QA=[":popover-open",":modal"];function Tu(n){return QA.some(a=>{try{return n.matches(a)}catch{return!1}})}const ZA=["transform","translate","scale","rotate","perspective"],JA=["transform","translate","scale","rotate","perspective","filter"],IA=["paint","layout","strict","content"];function uh(n){const a=ch(),l=Cn(n)?On(n):n;return ZA.some(i=>l[i]?l[i]!=="none":!1)||(l.containerType?l.containerType!=="normal":!1)||!a&&(l.backdropFilter?l.backdropFilter!=="none":!1)||!a&&(l.filter?l.filter!=="none":!1)||JA.some(i=>(l.willChange||"").includes(i))||IA.some(i=>(l.contain||"").includes(i))}function WA(n){let a=er(n);for(;qn(a)&&!$l(a);){if(uh(a))return a;if(Tu(a))return null;a=er(a)}return null}function ch(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const eN=new Set(["html","body","#document"]);function $l(n){return eN.has(Zl(n))}function On(n){return rn(n).getComputedStyle(n)}function ju(n){return Cn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function er(n){if(Zl(n)==="html")return n;const a=n.assignedSlot||n.parentNode||xy(n)&&n.host||Kn(n);return xy(a)?a.host:a}function Hb(n){const a=er(n);return $l(a)?n.ownerDocument?n.ownerDocument.body:n.body:qn(a)&&vo(a)?a:Hb(a)}function fo(n,a,l){var i;a===void 0&&(a=[]),l===void 0&&(l=!0);const s=Hb(n),u=s===((i=n.ownerDocument)==null?void 0:i.body),f=rn(s);if(u){const h=kd(f);return a.concat(f,f.visualViewport||[],vo(s)?s:[],h&&l?fo(h):[])}return a.concat(s,fo(s,[],l))}function kd(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Bb(n){const a=On(n);let l=parseFloat(a.width)||0,i=parseFloat(a.height)||0;const s=qn(n),u=s?n.offsetWidth:l,f=s?n.offsetHeight:i,h=cu(l)!==u||cu(i)!==f;return h&&(l=u,i=f),{width:l,height:i,$:h}}function fh(n){return Cn(n)?n:n.contextElement}function kl(n){const a=fh(n);if(!qn(a))return Yn(1);const l=a.getBoundingClientRect(),{width:i,height:s,$:u}=Bb(a);let f=(u?cu(l.width):l.width)/i,h=(u?cu(l.height):l.height)/s;return(!f||!Number.isFinite(f))&&(f=1),(!h||!Number.isFinite(h))&&(h=1),{x:f,y:h}}const tN=Yn(0);function $b(n){const a=rn(n);return!ch()||!a.visualViewport?tN:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function nN(n,a,l){return a===void 0&&(a=!1),!l||a&&l!==rn(n)?!1:a}function kr(n,a,l,i){a===void 0&&(a=!1),l===void 0&&(l=!1);const s=n.getBoundingClientRect(),u=fh(n);let f=Yn(1);a&&(i?Cn(i)&&(f=kl(i)):f=kl(n));const h=nN(u,l,i)?$b(u):Yn(0);let p=(s.left+h.x)/f.x,m=(s.top+h.y)/f.y,g=s.width/f.x,x=s.height/f.y;if(u){const S=rn(u),w=i&&Cn(i)?rn(i):i;let C=S,R=kd(C);for(;R&&i&&w!==C;){const j=kl(R),A=R.getBoundingClientRect(),k=On(R),P=A.left+(R.clientLeft+parseFloat(k.paddingLeft))*j.x,Y=A.top+(R.clientTop+parseFloat(k.paddingTop))*j.y;p*=j.x,m*=j.y,g*=j.x,x*=j.y,p+=P,m+=Y,C=rn(R),R=kd(C)}}return du({width:g,height:x,x:p,y:m})}function dh(n,a){const l=ju(n).scrollLeft;return a?a.left+l:kr(Kn(n)).left+l}function Vb(n,a,l){l===void 0&&(l=!1);const i=n.getBoundingClientRect(),s=i.left+a.scrollLeft-(l?0:dh(n,i)),u=i.top+a.scrollTop;return{x:s,y:u}}function aN(n){let{elements:a,rect:l,offsetParent:i,strategy:s}=n;const u=s==="fixed",f=Kn(i),h=a?Tu(a.floating):!1;if(i===f||h&&u)return l;let p={scrollLeft:0,scrollTop:0},m=Yn(1);const g=Yn(0),x=qn(i);if((x||!x&&!u)&&((Zl(i)!=="body"||vo(f))&&(p=ju(i)),qn(i))){const w=kr(i);m=kl(i),g.x=w.x+i.clientLeft,g.y=w.y+i.clientTop}const S=f&&!x&&!u?Vb(f,p,!0):Yn(0);return{width:l.width*m.x,height:l.height*m.y,x:l.x*m.x-p.scrollLeft*m.x+g.x+S.x,y:l.y*m.y-p.scrollTop*m.y+g.y+S.y}}function rN(n){return Array.from(n.getClientRects())}function lN(n){const a=Kn(n),l=ju(n),i=n.ownerDocument.body,s=nn(a.scrollWidth,a.clientWidth,i.scrollWidth,i.clientWidth),u=nn(a.scrollHeight,a.clientHeight,i.scrollHeight,i.clientHeight);let f=-l.scrollLeft+dh(n);const h=-l.scrollTop;return On(i).direction==="rtl"&&(f+=nn(a.clientWidth,i.clientWidth)-s),{width:s,height:u,x:f,y:h}}function iN(n,a){const l=rn(n),i=Kn(n),s=l.visualViewport;let u=i.clientWidth,f=i.clientHeight,h=0,p=0;if(s){u=s.width,f=s.height;const m=ch();(!m||m&&a==="fixed")&&(h=s.offsetLeft,p=s.offsetTop)}return{width:u,height:f,x:h,y:p}}const oN=new Set(["absolute","fixed"]);function sN(n,a){const l=kr(n,!0,a==="fixed"),i=l.top+n.clientTop,s=l.left+n.clientLeft,u=qn(n)?kl(n):Yn(1),f=n.clientWidth*u.x,h=n.clientHeight*u.y,p=s*u.x,m=i*u.y;return{width:f,height:h,x:p,y:m}}function Sy(n,a,l){let i;if(a==="viewport")i=iN(n,l);else if(a==="document")i=lN(Kn(n));else if(Cn(a))i=sN(a,l);else{const s=$b(n);i={x:a.x-s.x,y:a.y-s.y,width:a.width,height:a.height}}return du(i)}function Yb(n,a){const l=er(n);return l===a||!Cn(l)||$l(l)?!1:On(l).position==="fixed"||Yb(l,a)}function uN(n,a){const l=a.get(n);if(l)return l;let i=fo(n,[],!1).filter(h=>Cn(h)&&Zl(h)!=="body"),s=null;const u=On(n).position==="fixed";let f=u?er(n):n;for(;Cn(f)&&!$l(f);){const h=On(f),p=uh(f);!p&&h.position==="fixed"&&(s=null),(u?!p&&!s:!p&&h.position==="static"&&!!s&&oN.has(s.position)||vo(f)&&!p&&Yb(n,f))?i=i.filter(g=>g!==f):s=h,f=er(f)}return a.set(n,i),i}function cN(n){let{element:a,boundary:l,rootBoundary:i,strategy:s}=n;const f=[...l==="clippingAncestors"?Tu(a)?[]:uN(a,this._c):[].concat(l),i],h=f[0],p=f.reduce((m,g)=>{const x=Sy(a,g,s);return m.top=nn(x.top,m.top),m.right=Wa(x.right,m.right),m.bottom=Wa(x.bottom,m.bottom),m.left=nn(x.left,m.left),m},Sy(a,h,s));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}function fN(n){const{width:a,height:l}=Bb(n);return{width:a,height:l}}function dN(n,a,l){const i=qn(a),s=Kn(a),u=l==="fixed",f=kr(n,!0,u,a);let h={scrollLeft:0,scrollTop:0};const p=Yn(0);function m(){p.x=dh(s)}if(i||!i&&!u)if((Zl(a)!=="body"||vo(s))&&(h=ju(a)),i){const w=kr(a,!0,u,a);p.x=w.x+a.clientLeft,p.y=w.y+a.clientTop}else s&&m();u&&!i&&s&&m();const g=s&&!i&&!u?Vb(s,h):Yn(0),x=f.left+h.scrollLeft-p.x-g.x,S=f.top+h.scrollTop-p.y-g.y;return{x,y:S,width:f.width,height:f.height}}function fd(n){return On(n).position==="static"}function wy(n,a){if(!qn(n)||On(n).position==="fixed")return null;if(a)return a(n);let l=n.offsetParent;return Kn(n)===l&&(l=l.ownerDocument.body),l}function qb(n,a){const l=rn(n);if(Tu(n))return l;if(!qn(n)){let s=er(n);for(;s&&!$l(s);){if(Cn(s)&&!fd(s))return s;s=er(s)}return l}let i=wy(n,a);for(;i&&XA(i)&&fd(i);)i=wy(i,a);return i&&$l(i)&&fd(i)&&!uh(i)?l:i||WA(n)||l}const hN=async function(n){const a=this.getOffsetParent||qb,l=this.getDimensions,i=await l(n.floating);return{reference:dN(n.reference,await a(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function mN(n){return On(n).direction==="rtl"}const pN={convertOffsetParentRelativeRectToViewportRelativeRect:aN,getDocumentElement:Kn,getClippingRect:cN,getOffsetParent:qb,getElementRects:hN,getClientRects:rN,getDimensions:fN,getScale:kl,isElement:Cn,isRTL:mN};function Gb(n,a){return n.x===a.x&&n.y===a.y&&n.width===a.width&&n.height===a.height}function gN(n,a){let l=null,i;const s=Kn(n);function u(){var h;clearTimeout(i),(h=l)==null||h.disconnect(),l=null}function f(h,p){h===void 0&&(h=!1),p===void 0&&(p=1),u();const m=n.getBoundingClientRect(),{left:g,top:x,width:S,height:w}=m;if(h||a(),!S||!w)return;const C=Fs(x),R=Fs(s.clientWidth-(g+S)),j=Fs(s.clientHeight-(x+w)),A=Fs(g),P={rootMargin:-C+"px "+-R+"px "+-j+"px "+-A+"px",threshold:nn(0,Wa(1,p))||1};let Y=!0;function B(N){const X=N[0].intersectionRatio;if(X!==p){if(!Y)return f();X?f(!1,X):i=setTimeout(()=>{f(!1,1e-7)},1e3)}X===1&&!Gb(m,n.getBoundingClientRect())&&f(),Y=!1}try{l=new IntersectionObserver(B,{...P,root:s.ownerDocument})}catch{l=new IntersectionObserver(B,P)}l.observe(n)}return f(!0),u}function vN(n,a,l,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:u=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:p=!1}=i,m=fh(n),g=s||u?[...m?fo(m):[],...fo(a)]:[];g.forEach(A=>{s&&A.addEventListener("scroll",l,{passive:!0}),u&&A.addEventListener("resize",l)});const x=m&&h?gN(m,l):null;let S=-1,w=null;f&&(w=new ResizeObserver(A=>{let[k]=A;k&&k.target===m&&w&&(w.unobserve(a),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var P;(P=w)==null||P.observe(a)})),l()}),m&&!p&&w.observe(m),w.observe(a));let C,R=p?kr(n):null;p&&j();function j(){const A=kr(n);R&&!Gb(R,A)&&l(),R=A,C=requestAnimationFrame(j)}return l(),()=>{var A;g.forEach(k=>{s&&k.removeEventListener("scroll",l),u&&k.removeEventListener("resize",l)}),x?.(),(A=w)==null||A.disconnect(),w=null,p&&cancelAnimationFrame(C)}}const yN=VA,bN=YA,xN=HA,SN=GA,wN=BA,Ey=PA,EN=qA,RN=(n,a,l)=>{const i=new Map,s={platform:pN,...l},u={...s.platform,_c:i};return UA(n,a,{...s,platform:u})};var CN=typeof document<"u",ON=function(){},nu=CN?v.useLayoutEffect:ON;function hu(n,a){if(n===a)return!0;if(typeof n!=typeof a)return!1;if(typeof n=="function"&&n.toString()===a.toString())return!0;let l,i,s;if(n&&a&&typeof n=="object"){if(Array.isArray(n)){if(l=n.length,l!==a.length)return!1;for(i=l;i--!==0;)if(!hu(n[i],a[i]))return!1;return!0}if(s=Object.keys(n),l=s.length,l!==Object.keys(a).length)return!1;for(i=l;i--!==0;)if(!{}.hasOwnProperty.call(a,s[i]))return!1;for(i=l;i--!==0;){const u=s[i];if(!(u==="_owner"&&n.$$typeof)&&!hu(n[u],a[u]))return!1}return!0}return n!==n&&a!==a}function Kb(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Ry(n,a){const l=Kb(n);return Math.round(a*l)/l}function dd(n){const a=v.useRef(n);return nu(()=>{a.current=n}),a}function AN(n){n===void 0&&(n={});const{placement:a="bottom",strategy:l="absolute",middleware:i=[],platform:s,elements:{reference:u,floating:f}={},transform:h=!0,whileElementsMounted:p,open:m}=n,[g,x]=v.useState({x:0,y:0,strategy:l,placement:a,middlewareData:{},isPositioned:!1}),[S,w]=v.useState(i);hu(S,i)||w(i);const[C,R]=v.useState(null),[j,A]=v.useState(null),k=v.useCallback(K=>{K!==N.current&&(N.current=K,R(K))},[]),P=v.useCallback(K=>{K!==X.current&&(X.current=K,A(K))},[]),Y=u||C,B=f||j,N=v.useRef(null),X=v.useRef(null),ee=v.useRef(g),ie=p!=null,oe=dd(p),Oe=dd(s),Se=dd(m),de=v.useCallback(()=>{if(!N.current||!X.current)return;const K={placement:a,strategy:l,middleware:S};Oe.current&&(K.platform=Oe.current),RN(N.current,X.current,K).then(he=>{const T={...he,isPositioned:Se.current!==!1};fe.current&&!hu(ee.current,T)&&(ee.current=T,Su.flushSync(()=>{x(T)}))})},[S,a,l,Oe,Se]);nu(()=>{m===!1&&ee.current.isPositioned&&(ee.current.isPositioned=!1,x(K=>({...K,isPositioned:!1})))},[m]);const fe=v.useRef(!1);nu(()=>(fe.current=!0,()=>{fe.current=!1}),[]),nu(()=>{if(Y&&(N.current=Y),B&&(X.current=B),Y&&B){if(oe.current)return oe.current(Y,B,de);de()}},[Y,B,de,oe,ie]);const ue=v.useMemo(()=>({reference:N,floating:X,setReference:k,setFloating:P}),[k,P]),L=v.useMemo(()=>({reference:Y,floating:B}),[Y,B]),W=v.useMemo(()=>{const K={position:l,left:0,top:0};if(!L.floating)return K;const he=Ry(L.floating,g.x),T=Ry(L.floating,g.y);return h?{...K,transform:"translate("+he+"px, "+T+"px)",...Kb(L.floating)>=1.5&&{willChange:"transform"}}:{position:l,left:he,top:T}},[l,h,L.floating,g.x,g.y]);return v.useMemo(()=>({...g,update:de,refs:ue,elements:L,floatingStyles:W}),[g,de,ue,L,W])}const NN=n=>{function a(l){return{}.hasOwnProperty.call(l,"current")}return{name:"arrow",options:n,fn(l){const{element:i,padding:s}=typeof n=="function"?n(l):n;return i&&a(i)?i.current!=null?Ey({element:i.current,padding:s}).fn(l):{}:i?Ey({element:i,padding:s}).fn(l):{}}}},TN=(n,a)=>({...yN(n),options:[n,a]}),jN=(n,a)=>({...bN(n),options:[n,a]}),MN=(n,a)=>({...EN(n),options:[n,a]}),_N=(n,a)=>({...xN(n),options:[n,a]}),DN=(n,a)=>({...SN(n),options:[n,a]}),LN=(n,a)=>({...wN(n),options:[n,a]}),zN=(n,a)=>({...NN(n),options:[n,a]});var kN="Arrow",Fb=v.forwardRef((n,a)=>{const{children:l,width:i=10,height:s=5,...u}=n;return y.jsx(at.svg,{...u,ref:a,width:i,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?l:y.jsx("polygon",{points:"0,0 30,0 15,10"})})});Fb.displayName=kN;var UN=Fb,hh="Popper",[Xb,Qb]=wu(hh),[PN,Zb]=Xb(hh),Jb=n=>{const{__scopePopper:a,children:l}=n,[i,s]=v.useState(null);return y.jsx(PN,{scope:a,anchor:i,onAnchorChange:s,children:l})};Jb.displayName=hh;var Ib="PopperAnchor",Wb=v.forwardRef((n,a)=>{const{__scopePopper:l,virtualRef:i,...s}=n,u=Zb(Ib,l),f=v.useRef(null),h=ln(a,f);return v.useEffect(()=>{u.onAnchorChange(i?.current||f.current)}),i?null:y.jsx(at.div,{...s,ref:h})});Wb.displayName=Ib;var mh="PopperContent",[HN,BN]=Xb(mh),ex=v.forwardRef((n,a)=>{const{__scopePopper:l,side:i="bottom",sideOffset:s=0,align:u="center",alignOffset:f=0,arrowPadding:h=0,avoidCollisions:p=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:x="partial",hideWhenDetached:S=!1,updatePositionStrategy:w="optimized",onPlaced:C,...R}=n,j=Zb(mh,l),[A,k]=v.useState(null),P=ln(a,re=>k(re)),[Y,B]=v.useState(null),N=cb(Y),X=N?.width??0,ee=N?.height??0,ie=i+(u!=="center"?"-"+u:""),oe=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},Oe=Array.isArray(m)?m:[m],Se=Oe.length>0,de={padding:oe,boundary:Oe.filter(VN),altBoundary:Se},{refs:fe,floatingStyles:ue,placement:L,isPositioned:W,middlewareData:K}=AN({strategy:"fixed",placement:ie,whileElementsMounted:(...re)=>vN(...re,{animationFrame:w==="always"}),elements:{reference:j.anchor},middleware:[TN({mainAxis:s+ee,alignmentAxis:f}),p&&jN({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?MN():void 0,...de}),p&&_N({...de}),DN({...de,apply:({elements:re,rects:ce,availableWidth:Ee,availableHeight:ke})=>{const{width:xt,height:qt}=ce.reference,Tn=re.floating.style;Tn.setProperty("--radix-popper-available-width",`${Ee}px`),Tn.setProperty("--radix-popper-available-height",`${ke}px`),Tn.setProperty("--radix-popper-anchor-width",`${xt}px`),Tn.setProperty("--radix-popper-anchor-height",`${qt}px`)}}),Y&&zN({element:Y,padding:h}),YN({arrowWidth:X,arrowHeight:ee}),S&&LN({strategy:"referenceHidden",...de})]}),[he,T]=ax(L),$=Ul(C);Ja(()=>{W&&$?.()},[W,$]);const O=K.arrow?.x,M=K.arrow?.y,U=K.arrow?.centerOffset!==0,[V,I]=v.useState();return Ja(()=>{A&&I(window.getComputedStyle(A).zIndex)},[A]),y.jsx("div",{ref:fe.setFloating,"data-radix-popper-content-wrapper":"",style:{...ue,transform:W?ue.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:V,"--radix-popper-transform-origin":[K.transformOrigin?.x,K.transformOrigin?.y].join(" "),...K.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:y.jsx(HN,{scope:l,placedSide:he,onArrowChange:B,arrowX:O,arrowY:M,shouldHideArrow:U,children:y.jsx(at.div,{"data-side":he,"data-align":T,...R,ref:P,style:{...R.style,animation:W?void 0:"none"}})})})});ex.displayName=mh;var tx="PopperArrow",$N={top:"bottom",right:"left",bottom:"top",left:"right"},nx=v.forwardRef(function(a,l){const{__scopePopper:i,...s}=a,u=BN(tx,i),f=$N[u.placedSide];return y.jsx("span",{ref:u.onArrowChange,style:{position:"absolute",left:u.arrowX,top:u.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[u.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[u.placedSide],visibility:u.shouldHideArrow?"hidden":void 0},children:y.jsx(UN,{...s,ref:l,style:{...s.style,display:"block"}})})});nx.displayName=tx;function VN(n){return n!==null}var YN=n=>({name:"transformOrigin",options:n,fn(a){const{placement:l,rects:i,middlewareData:s}=a,f=s.arrow?.centerOffset!==0,h=f?0:n.arrowWidth,p=f?0:n.arrowHeight,[m,g]=ax(l),x={start:"0%",center:"50%",end:"100%"}[g],S=(s.arrow?.x??0)+h/2,w=(s.arrow?.y??0)+p/2;let C="",R="";return m==="bottom"?(C=f?x:`${S}px`,R=`${-p}px`):m==="top"?(C=f?x:`${S}px`,R=`${i.floating.height+p}px`):m==="right"?(C=`${-p}px`,R=f?x:`${w}px`):m==="left"&&(C=`${i.floating.width+p}px`,R=f?x:`${w}px`),{data:{x:C,y:R}}}});function ax(n){const[a,l="center"]=n.split("-");return[a,l]}var qN=Jb,rx=Wb,GN=ex,KN=nx,Mu="Popover",[lx,Oj]=wu(Mu,[Qb]),yo=Qb(),[FN,nr]=lx(Mu),ix=n=>{const{__scopePopover:a,children:l,open:i,defaultOpen:s,onOpenChange:u,modal:f=!1}=n,h=yo(a),p=v.useRef(null),[m,g]=v.useState(!1),[x,S]=Kd({prop:i,defaultProp:s??!1,onChange:u,caller:Mu});return y.jsx(qN,{...h,children:y.jsx(FN,{scope:a,contentId:Vn(),triggerRef:p,open:x,onOpenChange:S,onOpenToggle:v.useCallback(()=>S(w=>!w),[S]),hasCustomAnchor:m,onCustomAnchorAdd:v.useCallback(()=>g(!0),[]),onCustomAnchorRemove:v.useCallback(()=>g(!1),[]),modal:f,children:l})})};ix.displayName=Mu;var ox="PopoverAnchor",XN=v.forwardRef((n,a)=>{const{__scopePopover:l,...i}=n,s=nr(ox,l),u=yo(l),{onCustomAnchorAdd:f,onCustomAnchorRemove:h}=s;return v.useEffect(()=>(f(),()=>h()),[f,h]),y.jsx(rx,{...u,...i,ref:a})});XN.displayName=ox;var sx="PopoverTrigger",ux=v.forwardRef((n,a)=>{const{__scopePopover:l,...i}=n,s=nr(sx,l),u=yo(l),f=ln(a,s.triggerRef),h=y.jsx(at.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":mx(s.open),...i,ref:f,onClick:Yt(n.onClick,s.onOpenToggle)});return s.hasCustomAnchor?h:y.jsx(rx,{asChild:!0,...u,children:h})});ux.displayName=sx;var ph="PopoverPortal",[QN,ZN]=lx(ph,{forceMount:void 0}),cx=n=>{const{__scopePopover:a,forceMount:l,children:i,container:s}=n,u=nr(ph,a);return y.jsx(QN,{scope:a,forceMount:l,children:y.jsx(ql,{present:l||u.open,children:y.jsx(Qd,{asChild:!0,container:s,children:i})})})};cx.displayName=ph;var Vl="PopoverContent",fx=v.forwardRef((n,a)=>{const l=ZN(Vl,n.__scopePopover),{forceMount:i=l.forceMount,...s}=n,u=nr(Vl,n.__scopePopover);return y.jsx(ql,{present:i||u.open,children:u.modal?y.jsx(IN,{...s,ref:a}):y.jsx(WN,{...s,ref:a})})});fx.displayName=Vl;var JN=Eu("PopoverContent.RemoveScroll"),IN=v.forwardRef((n,a)=>{const l=nr(Vl,n.__scopePopover),i=v.useRef(null),s=ln(a,i),u=v.useRef(!1);return v.useEffect(()=>{const f=i.current;if(f)return R0(f)},[]),y.jsx(Zd,{as:JN,allowPinchZoom:!0,children:y.jsx(dx,{...n,ref:s,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Yt(n.onCloseAutoFocus,f=>{f.preventDefault(),u.current||l.triggerRef.current?.focus()}),onPointerDownOutside:Yt(n.onPointerDownOutside,f=>{const h=f.detail.originalEvent,p=h.button===0&&h.ctrlKey===!0,m=h.button===2||p;u.current=m},{checkForDefaultPrevented:!1}),onFocusOutside:Yt(n.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1})})})}),WN=v.forwardRef((n,a)=>{const l=nr(Vl,n.__scopePopover),i=v.useRef(!1),s=v.useRef(!1);return y.jsx(dx,{...n,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{n.onCloseAutoFocus?.(u),u.defaultPrevented||(i.current||l.triggerRef.current?.focus(),u.preventDefault()),i.current=!1,s.current=!1},onInteractOutside:u=>{n.onInteractOutside?.(u),u.defaultPrevented||(i.current=!0,u.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const f=u.target;l.triggerRef.current?.contains(f)&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&s.current&&u.preventDefault()}})}),dx=v.forwardRef((n,a)=>{const{__scopePopover:l,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:u,disableOutsidePointerEvents:f,onEscapeKeyDown:h,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:g,...x}=n,S=nr(Vl,l),w=yo(l);return p0(),y.jsx(Xd,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:u,children:y.jsx(Fd,{asChild:!0,disableOutsidePointerEvents:f,onInteractOutside:g,onEscapeKeyDown:h,onPointerDownOutside:p,onFocusOutside:m,onDismiss:()=>S.onOpenChange(!1),children:y.jsx(GN,{"data-state":mx(S.open),role:"dialog",id:S.contentId,...w,...x,ref:a,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),hx="PopoverClose",eT=v.forwardRef((n,a)=>{const{__scopePopover:l,...i}=n,s=nr(hx,l);return y.jsx(at.button,{type:"button",...i,ref:a,onClick:Yt(n.onClick,()=>s.onOpenChange(!1))})});eT.displayName=hx;var tT="PopoverArrow",nT=v.forwardRef((n,a)=>{const{__scopePopover:l,...i}=n,s=yo(l);return y.jsx(KN,{...s,...i,ref:a})});nT.displayName=tT;function mx(n){return n?"open":"closed"}var aT=ix,rT=ux,lT=cx,iT=fx;function gh({...n}){return y.jsx(aT,{"data-slot":"popover",...n})}function vh({...n}){return y.jsx(rT,{"data-slot":"popover-trigger",...n})}function yh({className:n,align:a="center",sideOffset:l=4,...i}){return y.jsx(lT,{children:y.jsx(iT,{"data-slot":"popover-content",align:a,sideOffset:l,className:nt("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden animate-fade-in",n),...i})})}function Nr({options:n,value:a,onChange:l,placeholder:i="Select an option...",searchPlaceholder:s="Search...",emptyPlaceholder:u="No options found."}){const[f,h]=v.useState(!1),p=n.find(m=>m.value===a);return y.jsxs(gh,{open:f,onOpenChange:h,children:[y.jsx(vh,{asChild:!0,children:y.jsxs(Le,{variant:"outline",role:"combobox","aria-expanded":f,className:"w-full justify-between transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:[p?p.label:i,y.jsx(K0,{className:"ml-2 h-4 w-4 shrink-0 opacity-50 transition-transform duration-200 group-data-[state=open]:rotate-180"})]})}),y.jsx(yh,{className:"w-[--radix-popover-trigger-width] p-0 animate-fade-in",children:y.jsxs(jb,{children:[y.jsx(Mb,{placeholder:s}),y.jsxs(_b,{children:[y.jsx(Db,{children:u}),y.jsx(Lb,{children:n.map(m=>y.jsxs(zb,{value:m.value,onSelect:g=>{l(g===a?"":g),h(!1)},className:"transition-all-ease hover:bg-accent hover:text-accent-foreground",children:[y.jsx(G0,{className:nt("mr-2 h-4 w-4 transition-opacity",a===m.value?"opacity-100":"opacity-0")}),m.label]},m.value))})]})]})})]})}const oT=v.forwardRef(({options:n,value:a,onChange:l,onEnter:i,searchPlaceholder:s="Search...",emptyPlaceholder:u="No options found.",inputPlaceholder:f="Type or select..."},h)=>{const[p,m]=v.useState(!1),[g,x]=v.useState(a||""),S=v.useRef(null);v.useImperativeHandle(h,()=>S.current),v.useEffect(()=>{x(a||"")},[a]);const w=A=>{const k=A.target.value;x(k),l(k)},C=A=>{A.key==="Enter"&&g.trim()&&i&&(i(g.trim()),x(""))},R=A=>{x(A),l(A),i&&(i(A),x("")),m(!1)},j=()=>g;return v.useImperativeHandle(h,()=>({...S.current,value:g,getCurrentValue:j,clearInput:()=>{x(""),l("")}})),y.jsxs("div",{className:"relative",children:[y.jsx(bt,{ref:S,value:g,onChange:w,onKeyDown:C,placeholder:f,className:"pr-10"}),y.jsxs(gh,{open:p,onOpenChange:m,children:[y.jsx(vh,{asChild:!0,children:y.jsx(Le,{variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",children:y.jsx(K0,{className:"h-4 w-4 opacity-50"})})}),y.jsx(yh,{className:"w-[--radix-popover-trigger-width] p-0 animate-fade-in",children:y.jsxs(jb,{children:[y.jsx(Mb,{placeholder:s}),y.jsxs(_b,{children:[y.jsx(Db,{children:u}),y.jsx(Lb,{children:n.map(A=>y.jsxs(zb,{value:A.value,onSelect:()=>R(A.value),className:"transition-all-ease hover:bg-accent hover:text-accent-foreground",children:[y.jsx(G0,{className:nt("mr-2 h-4 w-4 transition-opacity",a===A.value?"opacity-100":"opacity-0")}),A.label]},A.value))})]})]})})]})]})});function sT(){const{t:n}=Ur(),{config:a,setConfig:l}=Fl(),[i,s]=v.useState(null),[u,f]=v.useState(null),[h,p]=v.useState({}),[m,g]=v.useState({}),[x,S]=v.useState({}),[w,C]=v.useState([]),[R,j]=v.useState(null),[A,k]=v.useState(!1),P=v.useRef(null);if(v.useEffect(()=>{(async()=>{try{const M=await an.get("/transformers");C(M.transformers)}catch(M){console.error("Failed to fetch transformers:",M)}})()},[]),!a)return y.jsxs(ha,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[y.jsx(ma,{className:"flex flex-row items-center justify-between border-b p-4",children:y.jsx(pa,{className:"text-lg",children:n("providers.title")})}),y.jsx(ga,{className:"flex-grow flex items-center justify-center p-4",children:y.jsx("div",{className:"text-gray-500",children:"Loading providers configuration..."})})]});const Y=Array.isArray(a.Providers)?a.Providers:[],B=()=>{const O={name:"",api_base_url:"",api_key:"",models:[]};s(a.Providers.length),j(O),k(!0)},N=O=>{const M=a.Providers[O];s(O),j(JSON.parse(JSON.stringify(M))),k(!1)},X=()=>{if(i!==null&&R){const O=[...a.Providers];A?O.push(R):O[i]=R,l({...a,Providers:O})}s(null),j(null),k(!1)},ee=()=>{i!==null&&p(O=>{const M={...O};return delete M[i],M}),s(null),j(null),k(!1)},ie=O=>{const M=[...a.Providers];M.splice(O,1),l({...a,Providers:M}),f(null)},oe=(O,M,U)=>{if(R){const V={...R,[M]:U};j(V)}},Oe=(O,M)=>{if(!M||!R)return;const U={...R};U.transformer||(U.transformer={use:[]}),U.transformer.use=[...U.transformer.use,M],j(U)},Se=(O,M)=>{if(!R)return;const U={...R};if(U.transformer){const V=[...U.transformer.use];V.splice(M,1),U.transformer.use=V,V.length===0&&Object.keys(U.transformer).length===1&&delete U.transformer}j(U)},de=(O,M,U)=>{if(!U||!R)return;const V={...R};V.transformer||(V.transformer={use:[]}),V.transformer[M]||(V.transformer[M]={use:[]}),V.transformer[M].use=[...V.transformer[M].use,U],j(V)},fe=(O,M,U)=>{if(!R)return;const V={...R};if(V.transformer&&V.transformer[M]){const I=[...V.transformer[M].use];I.splice(U,1),V.transformer[M].use=I,I.length===0&&Object.keys(V.transformer[M]).length===1&&delete V.transformer[M]}j(V)},ue=(O,M,U,V)=>{if(!R)return;const I={...R};if(I.transformer||(I.transformer={use:[]}),I.transformer.use&&I.transformer.use.length>M){const re=I.transformer.use[M];if(Array.isArray(re)){const ce=[...re];if(ce.length>1&&typeof ce[1]=="object"&&ce[1]!==null){const ke={...ce[1],[U]:V};ce[1]=ke}else if(ce.length>1){const Ee={[U]:V};ce.splice(1,ce.length-1,Ee)}else{const Ee={[U]:V};ce.push(Ee)}I.transformer.use[M]=ce}else{const ce={[U]:V};I.transformer.use[M]=[re,ce]}}j(I)},L=(O,M,U)=>{if(!R)return;const V={...R};if(!V.transformer?.use||V.transformer.use.length<=M)return;const I=V.transformer.use[M];if(Array.isArray(I)&&I.length>1){const re=[...I];if(typeof re[1]=="object"&&re[1]!==null){const ce={...re[1]};delete ce[U],Object.keys(ce).length===0?re.splice(1,1):re[1]=ce,V.transformer.use[M]=re,j(V)}}},W=(O,M,U,V,I)=>{if(!R)return;const re={...R};if(re.transformer||(re.transformer={use:[]}),re.transformer[M]||(re.transformer[M]={use:[]}),re.transformer[M].use&&re.transformer[M].use.length>U){const ce=re.transformer[M].use[U];if(Array.isArray(ce)){const Ee=[...ce];if(Ee.length>1&&typeof Ee[1]=="object"&&Ee[1]!==null){const xt={...Ee[1],[V]:I};Ee[1]=xt}else if(Ee.length>1){const ke={[V]:I};Ee.splice(1,Ee.length-1,ke)}else{const ke={[V]:I};Ee.push(ke)}re.transformer[M].use[U]=Ee}else{const Ee={[V]:I};re.transformer[M].use[U]=[ce,Ee]}}j(re)},K=(O,M,U,V)=>{if(!R)return;const I={...R};if(!I.transformer?.[M]?.use||I.transformer[M].use.length<=U)return;const re=I.transformer[M].use[U];if(Array.isArray(re)&&re.length>1){const ce=[...re];if(typeof ce[1]=="object"&&ce[1]!==null){const Ee={...ce[1]};delete Ee[V],Object.keys(Ee).length===0?ce.splice(1,1):ce[1]=Ee,I.transformer[M].use[U]=ce,j(I)}}},he=(O,M)=>{if(!M.trim()||!R)return;const U={...R},V=Array.isArray(U.models)?[...U.models]:[];V.includes(M.trim())||(V.push(M.trim()),U.models=V,j(U))},T=(O,M)=>{if(!R)return;const U={...R},V=Array.isArray(U.models)?[...U.models]:[];M>=0&&M<V.length&&(V.splice(M,1),U.models=V,j(U))},$=R||(i!==null?Y[i]:null);return y.jsxs(ha,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[y.jsxs(ma,{className:"flex flex-row items-center justify-between border-b p-4",children:[y.jsxs(pa,{className:"text-lg",children:[n("providers.title")," ",y.jsxs("span",{className:"text-sm font-normal text-gray-500",children:["(",Y.length,")"]})]}),y.jsx(Le,{onClick:B,children:n("providers.add")})]}),y.jsx(ga,{className:"flex-grow overflow-y-auto p-4",children:y.jsx(tA,{providers:Y,onEdit:N,onRemove:f})}),y.jsx(so,{open:i!==null,onOpenChange:O=>{O||ee()},children:y.jsxs(Pl,{className:"max-h-[80vh] flex flex-col sm:max-w-2xl",children:[y.jsx(Hl,{children:y.jsx(Bl,{children:n("providers.edit")})}),$&&i!==null&&y.jsxs("div",{className:"space-y-4 p-4 overflow-y-auto flex-grow",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(lt,{htmlFor:"name",children:n("providers.name")}),y.jsx(bt,{id:"name",value:$.name||"",onChange:O=>oe(i,"name",O.target.value)})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(lt,{htmlFor:"api_base_url",children:n("providers.api_base_url")}),y.jsx(bt,{id:"api_base_url",value:$.api_base_url||"",onChange:O=>oe(i,"api_base_url",O.target.value)})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(lt,{htmlFor:"api_key",children:n("providers.api_key")}),y.jsx(bt,{id:"api_key",type:"password",value:$.api_key||"",onChange:O=>oe(i,"api_key",O.target.value)})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(lt,{htmlFor:"models",children:n("providers.models")}),y.jsxs("div",{className:"space-y-2",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx("div",{className:"flex-1",children:h[i]?y.jsx(oT,{ref:P,options:($.models||[]).map(O=>({label:O,value:O})),value:"",onChange:()=>{},onEnter:O=>{i!==null&&he(i,O)},inputPlaceholder:n("providers.models_placeholder")}):y.jsx(bt,{id:"models",placeholder:n("providers.models_placeholder"),onKeyDown:O=>{O.key==="Enter"&&O.currentTarget.value.trim()&&i!==null&&(he(i,O.currentTarget.value),O.currentTarget.value="")}})}),y.jsx(Le,{onClick:()=>{if(h[i]&&P.current){const O=P.current,M=O.getCurrentValue();M&&M.trim()&&i!==null&&(he(i,M.trim()),O.clearInput())}else{const O=document.getElementById("models");O&&O.value.trim()&&i!==null&&(he(i,O.value),O.value="")}},children:n("providers.add_model")})]}),y.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:($.models||[]).map((O,M)=>y.jsxs(Sb,{variant:"outline",className:"font-normal flex items-center gap-1",children:[O,y.jsx("button",{type:"button",className:"ml-1 rounded-full hover:bg-gray-200",onClick:()=>i!==null&&T(i,M),children:y.jsx(zl,{className:"h-3 w-3"})})]},M))})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(lt,{children:n("providers.provider_transformer")}),y.jsx("div",{className:"flex gap-2",children:y.jsx(Nr,{options:w.map(O=>({label:O.name,value:O.name})),value:"",onChange:O=>{i!==null&&Oe(i,O)},placeholder:n("providers.select_transformer"),emptyPlaceholder:n("providers.no_transformers")})}),$.transformer?.use&&$.transformer.use.length>0&&y.jsxs("div",{className:"space-y-2 mt-2",children:[y.jsx("div",{className:"text-sm font-medium text-gray-700",children:n("providers.selected_transformers")}),$.transformer.use.map((O,M)=>y.jsxs("div",{className:"border rounded-md p-3",children:[y.jsxs("div",{className:"flex gap-2 items-center mb-2",children:[y.jsx("div",{className:"flex-1 bg-gray-50 rounded p-2 text-sm",children:typeof O=="string"?O:Array.isArray(O)?String(O[0]):String(O)}),y.jsx(Le,{variant:"outline",size:"icon",onClick:()=>{i!==null&&Se(i,M)},children:y.jsx(Lr,{className:"h-4 w-4"})})]}),y.jsxs("div",{className:"mt-2 pl-4 border-l-2 border-gray-200",children:[y.jsx(lt,{className:"text-sm",children:n("providers.transformer_parameters")}),y.jsxs("div",{className:"space-y-2 mt-1",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx(bt,{placeholder:n("providers.parameter_name"),value:m[`provider-${i}-transformer-${M}`]?.name||"",onChange:U=>{const V=`provider-${i}-transformer-${M}`;g(I=>({...I,[V]:{...I[V]||{name:"",value:""},name:U.target.value}}))}}),y.jsx(bt,{placeholder:n("providers.parameter_value"),value:m[`provider-${i}-transformer-${M}`]?.value||"",onChange:U=>{const V=`provider-${i}-transformer-${M}`;g(I=>({...I,[V]:{...I[V]||{name:"",value:""},value:U.target.value}}))}}),y.jsx(Le,{size:"sm",onClick:()=>{if(i!==null){const U=`provider-${i}-transformer-${M}`,V=m[U];V&&V.name&&V.value&&(ue(i,M,V.name,V.value),g(I=>({...I,[U]:{name:"",value:""}})))}},children:y.jsx(Nd,{className:"h-4 w-4"})})]}),(()=>{if(!$.transformer?.use||$.transformer.use.length<=M)return null;const U=$.transformer.use[M];let V={};return Array.isArray(U)&&U.length>1&&typeof U[1]=="object"&&U[1]!==null&&(V=U[1]),Object.keys(V).length>0?y.jsx("div",{className:"space-y-1",children:Object.entries(V).map(([I,re])=>y.jsxs("div",{className:"flex items-center justify-between bg-gray-50 rounded p-2",children:[y.jsxs("div",{className:"text-sm",children:[y.jsxs("span",{className:"font-medium",children:[I,":"]})," ",String(re)]}),y.jsx(Le,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>{i!==null&&L(i,M,I)},children:y.jsx(zl,{className:"h-3 w-3"})})]},I))}):null})()]})]})]},M))]})]}),$.models&&$.models.length>0&&y.jsxs("div",{className:"space-y-2",children:[y.jsx(lt,{children:n("providers.model_transformers")}),y.jsx("div",{className:"space-y-3",children:($.models||[]).map((O,M)=>y.jsxs("div",{className:"border rounded-md p-3",children:[y.jsx("div",{className:"font-medium text-sm mb-2",children:O}),y.jsx("div",{className:"flex gap-2",children:y.jsx("div",{className:"flex-1 flex gap-2",children:y.jsx(Nr,{options:w.map(U=>({label:U.name,value:U.name})),value:"",onChange:U=>{i!==null&&de(i,O,U)},placeholder:n("providers.select_transformer"),emptyPlaceholder:n("providers.no_transformers")})})}),$.transformer?.[O]?.use&&$.transformer[O].use.length>0&&y.jsxs("div",{className:"space-y-2 mt-2",children:[y.jsx("div",{className:"text-sm font-medium text-gray-700",children:n("providers.selected_transformers")}),$.transformer[O].use.map((U,V)=>y.jsxs("div",{className:"border rounded-md p-3",children:[y.jsxs("div",{className:"flex gap-2 items-center mb-2",children:[y.jsx("div",{className:"flex-1 bg-gray-50 rounded p-2 text-sm",children:typeof U=="string"?U:Array.isArray(U)?String(U[0]):String(U)}),y.jsx(Le,{variant:"outline",size:"icon",onClick:()=>{i!==null&&fe(i,O,V)},children:y.jsx(Lr,{className:"h-4 w-4"})})]}),y.jsxs("div",{className:"mt-2 pl-4 border-l-2 border-gray-200",children:[y.jsx(lt,{className:"text-sm",children:n("providers.transformer_parameters")}),y.jsxs("div",{className:"space-y-2 mt-1",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx(bt,{placeholder:n("providers.parameter_name"),value:x[`model-${i}-${O}-transformer-${V}`]?.name||"",onChange:I=>{const re=`model-${i}-${O}-transformer-${V}`;S(ce=>({...ce,[re]:{...ce[re]||{name:"",value:""},name:I.target.value}}))}}),y.jsx(bt,{placeholder:n("providers.parameter_value"),value:x[`model-${i}-${O}-transformer-${V}`]?.value||"",onChange:I=>{const re=`model-${i}-${O}-transformer-${V}`;S(ce=>({...ce,[re]:{...ce[re]||{name:"",value:""},value:I.target.value}}))}}),y.jsx(Le,{size:"sm",onClick:()=>{if(i!==null){const I=`model-${i}-${O}-transformer-${V}`,re=x[I];re&&re.name&&re.value&&(W(i,O,V,re.name,re.value),S(ce=>({...ce,[I]:{name:"",value:""}})))}},children:y.jsx(Nd,{className:"h-4 w-4"})})]}),(()=>{if(!$.transformer?.[O]?.use||$.transformer[O].use.length<=V)return null;const I=$.transformer[O].use[V];let re={};return Array.isArray(I)&&I.length>1&&typeof I[1]=="object"&&I[1]!==null&&(re=I[1]),Object.keys(re).length>0?y.jsx("div",{className:"space-y-1",children:Object.entries(re).map(([ce,Ee])=>y.jsxs("div",{className:"flex items-center justify-between bg-gray-50 rounded p-2",children:[y.jsxs("div",{className:"text-sm",children:[y.jsxs("span",{className:"font-medium",children:[ce,":"]})," ",String(Ee)]}),y.jsx(Le,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>{i!==null&&K(i,O,V,ce)},children:y.jsx(zl,{className:"h-3 w-3"})})]},ce))}):null})()]})]})]},V))]})]},M))})]})]}),y.jsx("div",{className:"space-y-3 mt-auto",children:y.jsx("div",{className:"flex justify-end gap-2",children:y.jsx(Le,{onClick:X,children:n("app.save")})})})]})}),y.jsx(so,{open:u!==null,onOpenChange:()=>f(null),children:y.jsxs(Pl,{children:[y.jsxs(Hl,{children:[y.jsx(Bl,{children:n("providers.delete")}),y.jsx(ah,{children:n("providers.delete_provider_confirm")})]}),y.jsxs(uo,{children:[y.jsx(Le,{variant:"outline",onClick:()=>f(null),children:n("providers.cancel")}),y.jsx(Le,{variant:"destructive",onClick:()=>u!==null&&ie(u),children:n("providers.delete")})]})]})})]})}function uT(){const{t:n}=Ur(),{config:a,setConfig:l}=Fl();if(!a)return y.jsxs(ha,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[y.jsx(ma,{className:"border-b p-4",children:y.jsx(pa,{className:"text-lg",children:n("router.title")})}),y.jsx(ga,{className:"flex-grow flex items-center justify-center p-4",children:y.jsx("div",{className:"text-gray-500",children:"Loading router configuration..."})})]});const i=a.Router||{default:"",background:"",think:"",longContext:"",longContextThreshold:6e4,webSearch:""},s=(h,p)=>{const g={...a.Router||{},[h]:p};l({...a,Router:g})},f=(Array.isArray(a.Providers)?a.Providers:[]).flatMap(h=>{if(!h)return[];const p=Array.isArray(h.models)?h.models:[],m=h.name||"Unknown Provider";return p.map(g=>({value:`${m},${g||"Unknown Model"}`,label:`${m}, ${g||"Unknown Model"}`}))});return y.jsxs(ha,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[y.jsx(ma,{className:"border-b p-4",children:y.jsx(pa,{className:"text-lg",children:n("router.title")})}),y.jsxs(ga,{className:"flex-grow space-y-5 overflow-y-auto p-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(lt,{children:n("router.default")}),y.jsx(Nr,{options:f,value:i.default||"",onChange:h=>s("default",h),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(lt,{children:n("router.background")}),y.jsx(Nr,{options:f,value:i.background||"",onChange:h=>s("background",h),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(lt,{children:n("router.think")}),y.jsx(Nr,{options:f,value:i.think||"",onChange:h=>s("think",h),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),y.jsx("div",{className:"space-y-2",children:y.jsxs("div",{className:"flex items-center gap-4",children:[y.jsxs("div",{className:"flex-1",children:[y.jsx(lt,{children:n("router.longContext")}),y.jsx(Nr,{options:f,value:i.longContext||"",onChange:h=>s("longContext",h),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),y.jsxs("div",{className:"w-48",children:[y.jsx(lt,{children:n("router.longContextThreshold")}),y.jsx(bt,{type:"number",value:i.longContextThreshold||6e4,onChange:h=>s("longContextThreshold",parseInt(h.target.value)||6e4),placeholder:"60000"})]})]})}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(lt,{children:n("router.webSearch")}),y.jsx(Nr,{options:f,value:i.webSearch||"",onChange:h=>s("webSearch",h),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]})]})]})}function cT(n,a,l){return a in n?Object.defineProperty(n,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):n[a]=l,n}function Cy(n,a){var l=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);a&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),l.push.apply(l,i)}return l}function Oy(n){for(var a=1;a<arguments.length;a++){var l=arguments[a]!=null?arguments[a]:{};a%2?Cy(Object(l),!0).forEach(function(i){cT(n,i,l[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(l)):Cy(Object(l)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(l,i))})}return n}function fT(n,a){if(n==null)return{};var l={},i=Object.keys(n),s,u;for(u=0;u<i.length;u++)s=i[u],!(a.indexOf(s)>=0)&&(l[s]=n[s]);return l}function dT(n,a){if(n==null)return{};var l=fT(n,a),i,s;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(n);for(s=0;s<u.length;s++)i=u[s],!(a.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(n,i)&&(l[i]=n[i])}return l}function hT(n,a){return mT(n)||pT(n,a)||gT(n,a)||vT()}function mT(n){if(Array.isArray(n))return n}function pT(n,a){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(n)))){var l=[],i=!0,s=!1,u=void 0;try{for(var f=n[Symbol.iterator](),h;!(i=(h=f.next()).done)&&(l.push(h.value),!(a&&l.length===a));i=!0);}catch(p){s=!0,u=p}finally{try{!i&&f.return!=null&&f.return()}finally{if(s)throw u}}return l}}function gT(n,a){if(n){if(typeof n=="string")return Ay(n,a);var l=Object.prototype.toString.call(n).slice(8,-1);if(l==="Object"&&n.constructor&&(l=n.constructor.name),l==="Map"||l==="Set")return Array.from(n);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return Ay(n,a)}}function Ay(n,a){(a==null||a>n.length)&&(a=n.length);for(var l=0,i=new Array(a);l<a;l++)i[l]=n[l];return i}function vT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
207
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yT(n,a,l){return a in n?Object.defineProperty(n,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):n[a]=l,n}function Ny(n,a){var l=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);a&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),l.push.apply(l,i)}return l}function Ty(n){for(var a=1;a<arguments.length;a++){var l=arguments[a]!=null?arguments[a]:{};a%2?Ny(Object(l),!0).forEach(function(i){yT(n,i,l[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(l)):Ny(Object(l)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(l,i))})}return n}function bT(){for(var n=arguments.length,a=new Array(n),l=0;l<n;l++)a[l]=arguments[l];return function(i){return a.reduceRight(function(s,u){return u(s)},i)}}function to(n){return function a(){for(var l=this,i=arguments.length,s=new Array(i),u=0;u<i;u++)s[u]=arguments[u];return s.length>=n.length?n.apply(this,s):function(){for(var f=arguments.length,h=new Array(f),p=0;p<f;p++)h[p]=arguments[p];return a.apply(l,[].concat(s,h))}}}function mu(n){return{}.toString.call(n).includes("Object")}function xT(n){return!Object.keys(n).length}function ho(n){return typeof n=="function"}function ST(n,a){return Object.prototype.hasOwnProperty.call(n,a)}function wT(n,a){return mu(a)||Qa("changeType"),Object.keys(a).some(function(l){return!ST(n,l)})&&Qa("changeField"),a}function ET(n){ho(n)||Qa("selectorType")}function RT(n){ho(n)||mu(n)||Qa("handlerType"),mu(n)&&Object.values(n).some(function(a){return!ho(a)})&&Qa("handlersType")}function CT(n){n||Qa("initialIsRequired"),mu(n)||Qa("initialType"),xT(n)&&Qa("initialContent")}function OT(n,a){throw new Error(n[a]||n.default)}var AT={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},Qa=to(OT)(AT),Xs={changes:wT,selector:ET,handler:RT,initial:CT};function NT(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Xs.initial(n),Xs.handler(a);var l={current:n},i=to(MT)(l,a),s=to(jT)(l),u=to(Xs.changes)(n),f=to(TT)(l);function h(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(g){return g};return Xs.selector(m),m(l.current)}function p(m){bT(i,s,u,f)(m)}return[h,p]}function TT(n,a){return ho(a)?a(n.current):a}function jT(n,a){return n.current=Ty(Ty({},n.current),a),a}function MT(n,a,l){return ho(a)?a(n.current):Object.keys(l).forEach(function(i){var s;return(s=a[i])===null||s===void 0?void 0:s.call(a,n.current[i])}),l}var _T={create:NT},DT={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}};function LT(n){return function a(){for(var l=this,i=arguments.length,s=new Array(i),u=0;u<i;u++)s[u]=arguments[u];return s.length>=n.length?n.apply(this,s):function(){for(var f=arguments.length,h=new Array(f),p=0;p<f;p++)h[p]=arguments[p];return a.apply(l,[].concat(s,h))}}}function zT(n){return{}.toString.call(n).includes("Object")}function kT(n){return n||jy("configIsRequired"),zT(n)||jy("configType"),n.urls?(UT(),{paths:{vs:n.urls.monacoBase}}):n}function UT(){console.warn(px.deprecation)}function PT(n,a){throw new Error(n[a]||n.default)}var px={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
206
+ */const rO=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],zl=Pt("x",rO);function Q0(n){var a,l,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var s=n.length;for(a=0;a<s;a++)n[a]&&(l=Q0(n[a]))&&(i&&(i+=" "),i+=l)}else for(l in n)n[l]&&(i&&(i+=" "),i+=l);return i}function Z0(){for(var n,a,l=0,i="",s=arguments.length;l<s;l++)(n=arguments[l])&&(a=Q0(n))&&(i&&(i+=" "),i+=a);return i}const nh="-",lO=n=>{const a=oO(n),{conflictingClassGroups:l,conflictingClassGroupModifiers:i}=n;return{getClassGroupId:f=>{const h=f.split(nh);return h[0]===""&&h.length!==1&&h.shift(),J0(h,a)||iO(f)},getConflictingClassGroupIds:(f,h)=>{const p=l[f]||[];return h&&i[f]?[...p,...i[f]]:p}}},J0=(n,a)=>{if(n.length===0)return a.classGroupId;const l=n[0],i=a.nextPart.get(l),s=i?J0(n.slice(1),i):void 0;if(s)return s;if(a.validators.length===0)return;const u=n.join(nh);return a.validators.find(({validator:f})=>f(u))?.classGroupId},iy=/^\[(.+)\]$/,iO=n=>{if(iy.test(n)){const a=iy.exec(n)[1],l=a?.substring(0,a.indexOf(":"));if(l)return"arbitrary.."+l}},oO=n=>{const{theme:a,classGroups:l}=n,i={nextPart:new Map,validators:[]};for(const s in l)Td(l[s],i,s,a);return i},Td=(n,a,l,i)=>{n.forEach(s=>{if(typeof s=="string"){const u=s===""?a:oy(a,s);u.classGroupId=l;return}if(typeof s=="function"){if(sO(s)){Td(s(i),a,l,i);return}a.validators.push({validator:s,classGroupId:l});return}Object.entries(s).forEach(([u,f])=>{Td(f,oy(a,u),l,i)})})},oy=(n,a)=>{let l=n;return a.split(nh).forEach(i=>{l.nextPart.has(i)||l.nextPart.set(i,{nextPart:new Map,validators:[]}),l=l.nextPart.get(i)}),l},sO=n=>n.isThemeGetter,uO=n=>{if(n<1)return{get:()=>{},set:()=>{}};let a=0,l=new Map,i=new Map;const s=(u,f)=>{l.set(u,f),a++,a>n&&(a=0,i=l,l=new Map)};return{get(u){let f=l.get(u);if(f!==void 0)return f;if((f=i.get(u))!==void 0)return s(u,f),f},set(u,f){l.has(u)?l.set(u,f):s(u,f)}}},jd="!",Md=":",cO=Md.length,fO=n=>{const{prefix:a,experimentalParseClassName:l}=n;let i=s=>{const u=[];let f=0,h=0,p=0,m;for(let C=0;C<s.length;C++){let R=s[C];if(f===0&&h===0){if(R===Md){u.push(s.slice(p,C)),p=C+cO;continue}if(R==="/"){m=C;continue}}R==="["?f++:R==="]"?f--:R==="("?h++:R===")"&&h--}const g=u.length===0?s:s.substring(p),x=dO(g),S=x!==g,w=m&&m>p?m-p:void 0;return{modifiers:u,hasImportantModifier:S,baseClassName:x,maybePostfixModifierPosition:w}};if(a){const s=a+Md,u=i;i=f=>f.startsWith(s)?u(f.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:f,maybePostfixModifierPosition:void 0}}if(l){const s=i;i=u=>l({className:u,parseClassName:s})}return i},dO=n=>n.endsWith(jd)?n.substring(0,n.length-1):n.startsWith(jd)?n.substring(1):n,hO=n=>{const a=Object.fromEntries(n.orderSensitiveModifiers.map(i=>[i,!0]));return i=>{if(i.length<=1)return i;const s=[];let u=[];return i.forEach(f=>{f[0]==="["||a[f]?(s.push(...u.sort(),f),u=[]):u.push(f)}),s.push(...u.sort()),s}},mO=n=>({cache:uO(n.cacheSize),parseClassName:fO(n),sortModifiers:hO(n),...lO(n)}),pO=/\s+/,gO=(n,a)=>{const{parseClassName:l,getClassGroupId:i,getConflictingClassGroupIds:s,sortModifiers:u}=a,f=[],h=n.trim().split(pO);let p="";for(let m=h.length-1;m>=0;m-=1){const g=h[m],{isExternal:x,modifiers:S,hasImportantModifier:w,baseClassName:C,maybePostfixModifierPosition:R}=l(g);if(x){p=g+(p.length>0?" "+p:p);continue}let T=!!R,O=i(T?C.substring(0,R):C);if(!O){if(!T){p=g+(p.length>0?" "+p:p);continue}if(O=i(C),!O){p=g+(p.length>0?" "+p:p);continue}T=!1}const z=u(S).join(":"),U=w?z+jd:z,$=U+O;if(f.includes($))continue;f.push($);const P=s(O,T);for(let A=0;A<P.length;++A){const X=P[A];f.push(U+X)}p=g+(p.length>0?" "+p:p)}return p};function vO(){let n=0,a,l,i="";for(;n<arguments.length;)(a=arguments[n++])&&(l=I0(a))&&(i&&(i+=" "),i+=l);return i}const I0=n=>{if(typeof n=="string")return n;let a,l="";for(let i=0;i<n.length;i++)n[i]&&(a=I0(n[i]))&&(l&&(l+=" "),l+=a);return l};function yO(n,...a){let l,i,s,u=f;function f(p){const m=a.reduce((g,x)=>x(g),n());return l=mO(m),i=l.cache.get,s=l.cache.set,u=h,h(p)}function h(p){const m=i(p);if(m)return m;const g=gO(p,l);return s(p,g),g}return function(){return u(vO.apply(null,arguments))}}const Rt=n=>{const a=l=>l[n]||[];return a.isThemeGetter=!0,a},W0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,eb=/^\((?:(\w[\w-]*):)?(.+)\)$/i,bO=/^\d+\/\d+$/,xO=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,SO=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,wO=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,EO=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,RO=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Nl=n=>bO.test(n),He=n=>!!n&&!Number.isNaN(Number(n)),Ga=n=>!!n&&Number.isInteger(Number(n)),id=n=>n.endsWith("%")&&He(n.slice(0,-1)),da=n=>xO.test(n),CO=()=>!0,OO=n=>SO.test(n)&&!wO.test(n),tb=()=>!1,AO=n=>EO.test(n),NO=n=>RO.test(n),TO=n=>!ve(n)&&!ye(n),jO=n=>Gl(n,rb,tb),ve=n=>W0.test(n),Ar=n=>Gl(n,lb,OO),od=n=>Gl(n,zO,He),sy=n=>Gl(n,nb,tb),MO=n=>Gl(n,ab,NO),Gs=n=>Gl(n,ib,AO),ye=n=>eb.test(n),Ii=n=>Kl(n,lb),_O=n=>Kl(n,kO),uy=n=>Kl(n,nb),DO=n=>Kl(n,rb),LO=n=>Kl(n,ab),Ks=n=>Kl(n,ib,!0),Gl=(n,a,l)=>{const i=W0.exec(n);return i?i[1]?a(i[1]):l(i[2]):!1},Kl=(n,a,l=!1)=>{const i=eb.exec(n);return i?i[1]?a(i[1]):l:!1},nb=n=>n==="position"||n==="percentage",ab=n=>n==="image"||n==="url",rb=n=>n==="length"||n==="size"||n==="bg-size",lb=n=>n==="length",zO=n=>n==="number",kO=n=>n==="family-name",ib=n=>n==="shadow",UO=()=>{const n=Rt("color"),a=Rt("font"),l=Rt("text"),i=Rt("font-weight"),s=Rt("tracking"),u=Rt("leading"),f=Rt("breakpoint"),h=Rt("container"),p=Rt("spacing"),m=Rt("radius"),g=Rt("shadow"),x=Rt("inset-shadow"),S=Rt("text-shadow"),w=Rt("drop-shadow"),C=Rt("blur"),R=Rt("perspective"),T=Rt("aspect"),O=Rt("ease"),z=Rt("animate"),U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],P=()=>[...$(),ye,ve],A=()=>["auto","hidden","clip","visible","scroll"],X=()=>["auto","contain","none"],ne=()=>[ye,ve,p],oe=()=>[Nl,"full","auto",...ne()],se=()=>[Ga,"none","subgrid",ye,ve],Ne=()=>["auto",{span:["full",Ga,ye,ve]},Ga,ye,ve],we=()=>[Ga,"auto",ye,ve],he=()=>["auto","min","max","fr",ye,ve],de=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ce=()=>["start","end","center","stretch","center-safe","end-safe"],_=()=>["auto",...ne()],ee=()=>[Nl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...ne()],q=()=>[n,ye,ve],pe=()=>[...$(),uy,sy,{position:[ye,ve]}],N=()=>["no-repeat",{repeat:["","x","y","space","round"]}],K=()=>["auto","cover","contain",DO,jO,{size:[ye,ve]}],L=()=>[id,Ii,Ar],F=()=>["","none","full",m,ye,ve],W=()=>["",He,Ii,Ar],k=()=>["solid","dashed","dotted","double"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>[He,id,uy,sy],te=()=>["","none",C,ye,ve],fe=()=>["none",He,ye,ve],me=()=>["none",He,ye,ve],Ce=()=>[He,ye,ve],Ye=()=>[Nl,"full",...ne()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[da],breakpoint:[da],color:[CO],container:[da],"drop-shadow":[da],ease:["in","out","in-out"],font:[TO],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[da],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[da],shadow:[da],spacing:["px",He],text:[da],"text-shadow":[da],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Nl,ve,ye,T]}],container:["container"],columns:[{columns:[He,ve,ye,h]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:P()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:X()}],"overscroll-x":[{"overscroll-x":X()}],"overscroll-y":[{"overscroll-y":X()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:oe()}],"inset-x":[{"inset-x":oe()}],"inset-y":[{"inset-y":oe()}],start:[{start:oe()}],end:[{end:oe()}],top:[{top:oe()}],right:[{right:oe()}],bottom:[{bottom:oe()}],left:[{left:oe()}],visibility:["visible","invisible","collapse"],z:[{z:[Ga,"auto",ye,ve]}],basis:[{basis:[Nl,"full","auto",h,...ne()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[He,Nl,"auto","initial","none",ve]}],grow:[{grow:["",He,ye,ve]}],shrink:[{shrink:["",He,ye,ve]}],order:[{order:[Ga,"first","last","none",ye,ve]}],"grid-cols":[{"grid-cols":se()}],"col-start-end":[{col:Ne()}],"col-start":[{"col-start":we()}],"col-end":[{"col-end":we()}],"grid-rows":[{"grid-rows":se()}],"row-start-end":[{row:Ne()}],"row-start":[{"row-start":we()}],"row-end":[{"row-end":we()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":he()}],"auto-rows":[{"auto-rows":he()}],gap:[{gap:ne()}],"gap-x":[{"gap-x":ne()}],"gap-y":[{"gap-y":ne()}],"justify-content":[{justify:[...de(),"normal"]}],"justify-items":[{"justify-items":[...ce(),"normal"]}],"justify-self":[{"justify-self":["auto",...ce()]}],"align-content":[{content:["normal",...de()]}],"align-items":[{items:[...ce(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ce(),{baseline:["","last"]}]}],"place-content":[{"place-content":de()}],"place-items":[{"place-items":[...ce(),"baseline"]}],"place-self":[{"place-self":["auto",...ce()]}],p:[{p:ne()}],px:[{px:ne()}],py:[{py:ne()}],ps:[{ps:ne()}],pe:[{pe:ne()}],pt:[{pt:ne()}],pr:[{pr:ne()}],pb:[{pb:ne()}],pl:[{pl:ne()}],m:[{m:_()}],mx:[{mx:_()}],my:[{my:_()}],ms:[{ms:_()}],me:[{me:_()}],mt:[{mt:_()}],mr:[{mr:_()}],mb:[{mb:_()}],ml:[{ml:_()}],"space-x":[{"space-x":ne()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":ne()}],"space-y-reverse":["space-y-reverse"],size:[{size:ee()}],w:[{w:[h,"screen",...ee()]}],"min-w":[{"min-w":[h,"screen","none",...ee()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[f]},...ee()]}],h:[{h:["screen","lh",...ee()]}],"min-h":[{"min-h":["screen","lh","none",...ee()]}],"max-h":[{"max-h":["screen","lh",...ee()]}],"font-size":[{text:["base",l,Ii,Ar]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,ye,od]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",id,ve]}],"font-family":[{font:[_O,ve,a]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,ye,ve]}],"line-clamp":[{"line-clamp":[He,"none",ye,od]}],leading:[{leading:[u,...ne()]}],"list-image":[{"list-image":["none",ye,ve]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ye,ve]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:q()}],"text-color":[{text:q()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...k(),"wavy"]}],"text-decoration-thickness":[{decoration:[He,"from-font","auto",ye,Ar]}],"text-decoration-color":[{decoration:q()}],"underline-offset":[{"underline-offset":[He,"auto",ye,ve]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:ne()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye,ve]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ye,ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:pe()}],"bg-repeat":[{bg:N()}],"bg-size":[{bg:K()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ga,ye,ve],radial:["",ye,ve],conic:[Ga,ye,ve]},LO,MO]}],"bg-color":[{bg:q()}],"gradient-from-pos":[{from:L()}],"gradient-via-pos":[{via:L()}],"gradient-to-pos":[{to:L()}],"gradient-from":[{from:q()}],"gradient-via":[{via:q()}],"gradient-to":[{to:q()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...k(),"hidden","none"]}],"divide-style":[{divide:[...k(),"hidden","none"]}],"border-color":[{border:q()}],"border-color-x":[{"border-x":q()}],"border-color-y":[{"border-y":q()}],"border-color-s":[{"border-s":q()}],"border-color-e":[{"border-e":q()}],"border-color-t":[{"border-t":q()}],"border-color-r":[{"border-r":q()}],"border-color-b":[{"border-b":q()}],"border-color-l":[{"border-l":q()}],"divide-color":[{divide:q()}],"outline-style":[{outline:[...k(),"none","hidden"]}],"outline-offset":[{"outline-offset":[He,ye,ve]}],"outline-w":[{outline:["",He,Ii,Ar]}],"outline-color":[{outline:q()}],shadow:[{shadow:["","none",g,Ks,Gs]}],"shadow-color":[{shadow:q()}],"inset-shadow":[{"inset-shadow":["none",x,Ks,Gs]}],"inset-shadow-color":[{"inset-shadow":q()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:q()}],"ring-offset-w":[{"ring-offset":[He,Ar]}],"ring-offset-color":[{"ring-offset":q()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":q()}],"text-shadow":[{"text-shadow":["none",S,Ks,Gs]}],"text-shadow-color":[{"text-shadow":q()}],opacity:[{opacity:[He,ye,ve]}],"mix-blend":[{"mix-blend":[...B(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":B()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[He]}],"mask-image-linear-from-pos":[{"mask-linear-from":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"mask-image-linear-from-color":[{"mask-linear-from":q()}],"mask-image-linear-to-color":[{"mask-linear-to":q()}],"mask-image-t-from-pos":[{"mask-t-from":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"mask-image-t-from-color":[{"mask-t-from":q()}],"mask-image-t-to-color":[{"mask-t-to":q()}],"mask-image-r-from-pos":[{"mask-r-from":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"mask-image-r-from-color":[{"mask-r-from":q()}],"mask-image-r-to-color":[{"mask-r-to":q()}],"mask-image-b-from-pos":[{"mask-b-from":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"mask-image-b-from-color":[{"mask-b-from":q()}],"mask-image-b-to-color":[{"mask-b-to":q()}],"mask-image-l-from-pos":[{"mask-l-from":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"mask-image-l-from-color":[{"mask-l-from":q()}],"mask-image-l-to-color":[{"mask-l-to":q()}],"mask-image-x-from-pos":[{"mask-x-from":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"mask-image-x-from-color":[{"mask-x-from":q()}],"mask-image-x-to-color":[{"mask-x-to":q()}],"mask-image-y-from-pos":[{"mask-y-from":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"mask-image-y-from-color":[{"mask-y-from":q()}],"mask-image-y-to-color":[{"mask-y-to":q()}],"mask-image-radial":[{"mask-radial":[ye,ve]}],"mask-image-radial-from-pos":[{"mask-radial-from":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"mask-image-radial-from-color":[{"mask-radial-from":q()}],"mask-image-radial-to-color":[{"mask-radial-to":q()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":$()}],"mask-image-conic-pos":[{"mask-conic":[He]}],"mask-image-conic-from-pos":[{"mask-conic-from":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"mask-image-conic-from-color":[{"mask-conic-from":q()}],"mask-image-conic-to-color":[{"mask-conic-to":q()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:pe()}],"mask-repeat":[{mask:N()}],"mask-size":[{mask:K()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ye,ve]}],filter:[{filter:["","none",ye,ve]}],blur:[{blur:te()}],brightness:[{brightness:[He,ye,ve]}],contrast:[{contrast:[He,ye,ve]}],"drop-shadow":[{"drop-shadow":["","none",w,Ks,Gs]}],"drop-shadow-color":[{"drop-shadow":q()}],grayscale:[{grayscale:["",He,ye,ve]}],"hue-rotate":[{"hue-rotate":[He,ye,ve]}],invert:[{invert:["",He,ye,ve]}],saturate:[{saturate:[He,ye,ve]}],sepia:[{sepia:["",He,ye,ve]}],"backdrop-filter":[{"backdrop-filter":["","none",ye,ve]}],"backdrop-blur":[{"backdrop-blur":te()}],"backdrop-brightness":[{"backdrop-brightness":[He,ye,ve]}],"backdrop-contrast":[{"backdrop-contrast":[He,ye,ve]}],"backdrop-grayscale":[{"backdrop-grayscale":["",He,ye,ve]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[He,ye,ve]}],"backdrop-invert":[{"backdrop-invert":["",He,ye,ve]}],"backdrop-opacity":[{"backdrop-opacity":[He,ye,ve]}],"backdrop-saturate":[{"backdrop-saturate":[He,ye,ve]}],"backdrop-sepia":[{"backdrop-sepia":["",He,ye,ve]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":ne()}],"border-spacing-x":[{"border-spacing-x":ne()}],"border-spacing-y":[{"border-spacing-y":ne()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ye,ve]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[He,"initial",ye,ve]}],ease:[{ease:["linear","initial",O,ye,ve]}],delay:[{delay:[He,ye,ve]}],animate:[{animate:["none",z,ye,ve]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[R,ye,ve]}],"perspective-origin":[{"perspective-origin":P()}],rotate:[{rotate:fe()}],"rotate-x":[{"rotate-x":fe()}],"rotate-y":[{"rotate-y":fe()}],"rotate-z":[{"rotate-z":fe()}],scale:[{scale:me()}],"scale-x":[{"scale-x":me()}],"scale-y":[{"scale-y":me()}],"scale-z":[{"scale-z":me()}],"scale-3d":["scale-3d"],skew:[{skew:Ce()}],"skew-x":[{"skew-x":Ce()}],"skew-y":[{"skew-y":Ce()}],transform:[{transform:[ye,ve,"","none","gpu","cpu"]}],"transform-origin":[{origin:P()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ye()}],"translate-x":[{"translate-x":Ye()}],"translate-y":[{"translate-y":Ye()}],"translate-z":[{"translate-z":Ye()}],"translate-none":["translate-none"],accent:[{accent:q()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:q()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ye,ve]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":ne()}],"scroll-mx":[{"scroll-mx":ne()}],"scroll-my":[{"scroll-my":ne()}],"scroll-ms":[{"scroll-ms":ne()}],"scroll-me":[{"scroll-me":ne()}],"scroll-mt":[{"scroll-mt":ne()}],"scroll-mr":[{"scroll-mr":ne()}],"scroll-mb":[{"scroll-mb":ne()}],"scroll-ml":[{"scroll-ml":ne()}],"scroll-p":[{"scroll-p":ne()}],"scroll-px":[{"scroll-px":ne()}],"scroll-py":[{"scroll-py":ne()}],"scroll-ps":[{"scroll-ps":ne()}],"scroll-pe":[{"scroll-pe":ne()}],"scroll-pt":[{"scroll-pt":ne()}],"scroll-pr":[{"scroll-pr":ne()}],"scroll-pb":[{"scroll-pb":ne()}],"scroll-pl":[{"scroll-pl":ne()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ye,ve]}],fill:[{fill:["none",...q()]}],"stroke-w":[{stroke:[He,Ii,Ar,od]}],stroke:[{stroke:["none",...q()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},PO=yO(UO);function lt(...n){return PO(Z0(n))}const so=B0,HO=$0,ob=v.forwardRef(({className:n,...a},l)=>y.jsx(eh,{ref:l,className:lt("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n),...a}));ob.displayName=eh.displayName;const Pl=v.forwardRef(({className:n,children:a,...l},i)=>y.jsxs(HO,{children:[y.jsx(ob,{}),y.jsxs(th,{ref:i,className:lt("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-300 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg animate-scale-in",n),...l,children:[a,y.jsxs(M2,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground transition-all-ease hover:scale-110",children:[y.jsx(zl,{className:"h-4 w-4"}),y.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Pl.displayName=th.displayName;const Hl=({className:n,...a})=>y.jsx("div",{className:lt("flex flex-col space-y-1.5 text-center sm:text-left",n),...a});Hl.displayName="DialogHeader";const uo=({className:n,...a})=>y.jsx("div",{className:lt("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",n),...a});uo.displayName="DialogFooter";const Bl=v.forwardRef(({className:n,...a},l)=>y.jsx(V0,{ref:l,className:lt("text-lg font-semibold leading-none tracking-tight",n),...a}));Bl.displayName=V0.displayName;const ah=v.forwardRef(({className:n,...a},l)=>y.jsx(Y0,{ref:l,className:lt("text-sm text-muted-foreground",n),...a}));ah.displayName=Y0.displayName;const cy=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,fy=Z0,rh=(n,a)=>l=>{var i;if(a?.variants==null)return fy(n,l?.class,l?.className);const{variants:s,defaultVariants:u}=a,f=Object.keys(s).map(m=>{const g=l?.[m],x=u?.[m];if(g===null)return null;const S=cy(g)||cy(x);return s[m][S]}),h=l&&Object.entries(l).reduce((m,g)=>{let[x,S]=g;return S===void 0||(m[x]=S),m},{}),p=a==null||(i=a.compoundVariants)===null||i===void 0?void 0:i.reduce((m,g)=>{let{class:x,className:S,...w}=g;return Object.entries(w).every(C=>{let[R,T]=C;return Array.isArray(T)?T.includes({...u,...h}[R]):{...u,...h}[R]===T})?[...m,x,S]:m},[]);return fy(n,f,p,l?.class,l?.className)},BO=rh("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"border border-destructive/50 text-destructive hover:bg-destructive hover:text-destructive-foreground",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),ke=v.forwardRef(({className:n,variant:a,size:l,asChild:i=!1,...s},u)=>{const f=i?uC:"button";return y.jsx(f,{className:lt(BO({variant:a,size:l,className:n})),ref:u,...s})});ke.displayName="Button";const yt=v.forwardRef(({className:n,type:a,...l},i)=>y.jsx("input",{type:a,className:lt("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n),ref:i,...l}));yt.displayName="Input";var $O="Label",sb=v.forwardRef((n,a)=>y.jsx(it.label,{...n,ref:a,onMouseDown:l=>{l.target.closest("button, input, select, textarea")||(n.onMouseDown?.(l),!l.defaultPrevented&&l.detail>1&&l.preventDefault())}}));sb.displayName=$O;var ub=sb;const VO=rh("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),rt=v.forwardRef(({className:n,...a},l)=>y.jsx(ub,{ref:l,className:lt(VO(),n),...a}));rt.displayName=ub.displayName;function YO(n){const a=v.useRef({value:n,previous:n});return v.useMemo(()=>(a.current.value!==n&&(a.current.previous=a.current.value,a.current.value=n),a.current.previous),[n])}function cb(n){const[a,l]=v.useState(void 0);return Ia(()=>{if(n){l({width:n.offsetWidth,height:n.offsetHeight});const i=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const u=s[0];let f,h;if("borderBoxSize"in u){const p=u.borderBoxSize,m=Array.isArray(p)?p[0]:p;f=m.inlineSize,h=m.blockSize}else f=n.offsetWidth,h=n.offsetHeight;l({width:f,height:h})});return i.observe(n,{box:"border-box"}),()=>i.unobserve(n)}else l(void 0)},[n]),a}var Ou="Switch",[qO,Cj]=wu(Ou),[GO,KO]=qO(Ou),fb=v.forwardRef((n,a)=>{const{__scopeSwitch:l,name:i,checked:s,defaultChecked:u,required:f,disabled:h,value:p="on",onCheckedChange:m,form:g,...x}=n,[S,w]=v.useState(null),C=sn(a,U=>w(U)),R=v.useRef(!1),T=S?g||!!S.closest("form"):!0,[O,z]=Kd({prop:s,defaultProp:u??!1,onChange:m,caller:Ou});return y.jsxs(GO,{scope:l,checked:O,disabled:h,children:[y.jsx(it.button,{type:"button",role:"switch","aria-checked":O,"aria-required":f,"data-state":pb(O),"data-disabled":h?"":void 0,disabled:h,value:p,...x,ref:C,onClick:Gt(n.onClick,U=>{z($=>!$),T&&(R.current=U.isPropagationStopped(),R.current||U.stopPropagation())})}),T&&y.jsx(mb,{control:S,bubbles:!R.current,name:i,value:p,checked:O,required:f,disabled:h,form:g,style:{transform:"translateX(-100%)"}})]})});fb.displayName=Ou;var db="SwitchThumb",hb=v.forwardRef((n,a)=>{const{__scopeSwitch:l,...i}=n,s=KO(db,l);return y.jsx(it.span,{"data-state":pb(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:a})});hb.displayName=db;var FO="SwitchBubbleInput",mb=v.forwardRef(({__scopeSwitch:n,control:a,checked:l,bubbles:i=!0,...s},u)=>{const f=v.useRef(null),h=sn(f,u),p=YO(l),m=cb(a);return v.useEffect(()=>{const g=f.current;if(!g)return;const x=window.HTMLInputElement.prototype,w=Object.getOwnPropertyDescriptor(x,"checked").set;if(p!==l&&w){const C=new Event("click",{bubbles:i});w.call(g,l),g.dispatchEvent(C)}},[p,l,i]),y.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:l,...s,tabIndex:-1,ref:h,style:{...s.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});mb.displayName=FO;function pb(n){return n?"checked":"unchecked"}var gb=fb,XO=hb;const vb=v.forwardRef(({className:n,...a},l)=>y.jsx(gb,{className:lt("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-all-ease focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",n),...a,ref:l,children:y.jsx(XO,{className:lt("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 transition-all-ease")})}));vb.displayName=gb.displayName;class QO{baseUrl;apiKey;constructor(a="/api",l=""){this.baseUrl=a,this.apiKey=l||localStorage.getItem("apiKey")||""}setBaseUrl(a){this.baseUrl=a}setApiKey(a){this.apiKey=a,a?localStorage.setItem("apiKey",a):localStorage.removeItem("apiKey")}createHeaders(a="application/json"){const l={"X-API-Key":this.apiKey,Accept:"application/json"};return a&&(l["Content-Type"]=a),l}async apiFetch(a,l={}){const i=`${this.baseUrl}${a}`,s={...l,headers:{...this.createHeaders(),...l.headers}};try{const u=await fetch(i,s);if(u.status===401)return localStorage.removeItem("apiKey"),window.dispatchEvent(new CustomEvent("unauthorized")),new Promise(()=>{});if(!u.ok)throw new Error(`API request failed: ${u.status} ${u.statusText}`);if(u.status===204)return{};const f=await u.text();return f?JSON.parse(f):{}}catch(u){throw console.error("API request error:",u),u}}async get(a){return this.apiFetch(a,{method:"GET"})}async post(a,l){return this.apiFetch(a,{method:"POST",body:JSON.stringify(l)})}async put(a,l){return this.apiFetch(a,{method:"PUT",body:JSON.stringify(l)})}async delete(a){return this.apiFetch(a,{method:"DELETE"})}async getConfig(){return this.get("/config")}async updateConfig(a){return this.post("/config",a)}async getProviders(){return this.get("/api/providers")}async addProvider(a){return this.post("/api/providers",a)}async updateProvider(a,l){return this.post(`/api/providers/${a}`,l)}async deleteProvider(a){return this.delete(`/api/providers/${a}`)}async getTransformers(){return this.get("/api/transformers")}async addTransformer(a){return this.post("/api/transformers",a)}async updateTransformer(a,l){return this.post(`/api/transformers/${a}`,l)}async deleteTransformer(a){return this.delete(`/api/transformers/${a}`)}async getConfigNew(){return this.get("/config")}async saveConfig(a){return this.post("/config",a)}async restartService(){return this.post("/restart",{})}}const ln=new QO,yb=v.createContext(void 0);function Fl(){const n=v.useContext(yb);if(n===void 0)throw new Error("useConfig must be used within a ConfigProvider");return n}function ZO({children:n}){const[a,l]=v.useState(null),[i,s]=v.useState(null),[u,f]=v.useState(!1),[h,p]=v.useState(localStorage.getItem("apiKey"));return v.useEffect(()=>{const m=()=>{p(localStorage.getItem("apiKey"))};return window.addEventListener("storage",m),()=>{window.removeEventListener("storage",m)}},[]),v.useEffect(()=>{(async()=>{f(!1),l(null),s(null)})()},[h]),v.useEffect(()=>{(async()=>{if(!u){f(!0);try{const g=await ln.getConfig(),x={LOG:typeof g.LOG=="boolean"?g.LOG:!1,CLAUDE_PATH:typeof g.CLAUDE_PATH=="string"?g.CLAUDE_PATH:"",HOST:typeof g.HOST=="string"?g.HOST:"127.0.0.1",PORT:typeof g.PORT=="number"?g.PORT:3456,APIKEY:typeof g.APIKEY=="string"?g.APIKEY:"",API_TIMEOUT_MS:typeof g.API_TIMEOUT_MS=="string"?g.API_TIMEOUT_MS:"600000",PROXY_URL:typeof g.PROXY_URL=="string"?g.PROXY_URL:"",Transformers:Array.isArray(g.Transformers)?g.Transformers:[],Providers:Array.isArray(g.Providers)?g.Providers:[],Router:g.Router&&typeof g.Router=="object"?{default:typeof g.Router.default=="string"?g.Router.default:"",background:typeof g.Router.background=="string"?g.Router.background:"",think:typeof g.Router.think=="string"?g.Router.think:"",longContext:typeof g.Router.longContext=="string"?g.Router.longContext:"",longContextThreshold:typeof g.Router.longContextThreshold=="number"?g.Router.longContextThreshold:6e4,webSearch:typeof g.Router.webSearch=="string"?g.Router.webSearch:""}:{default:"",background:"",think:"",longContext:"",longContextThreshold:6e4,webSearch:""}};l(x)}catch(g){console.error("Failed to fetch config:",g),g.message!=="Unauthorized"&&(l({LOG:!1,CLAUDE_PATH:"",HOST:"127.0.0.1",PORT:3456,APIKEY:"",API_TIMEOUT_MS:"600000",PROXY_URL:"",Transformers:[],Providers:[],Router:{default:"",background:"",think:"",longContext:"",longContextThreshold:6e4,webSearch:""}}),s(g))}}})()},[u,h]),y.jsx(yb.Provider,{value:{config:a,setConfig:l,error:i},children:n})}function JO({isOpen:n,onOpenChange:a}){const{t:l}=Ur(),{config:i,setConfig:s}=Fl();if(!i)return null;const u=h=>{s({...i,LOG:h})},f=h=>{s({...i,CLAUDE_PATH:h.target.value})};return y.jsx(so,{open:n,onOpenChange:a,children:y.jsxs(Pl,{children:[y.jsx(Hl,{children:y.jsx(Bl,{children:l("toplevel.title")})}),y.jsxs("div",{className:"space-y-4 py-4",children:[y.jsxs("div",{className:"flex items-center space-x-2",children:[y.jsx(vb,{id:"log",checked:i.LOG,onCheckedChange:u}),y.jsx(rt,{htmlFor:"log",className:"transition-all-ease hover:scale-[1.02] cursor-pointer",children:l("toplevel.log")})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(rt,{htmlFor:"claude-path",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.claude_path")}),y.jsx(yt,{id:"claude-path",value:i.CLAUDE_PATH,onChange:f,className:"transition-all-ease focus:scale-[1.01]"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(rt,{htmlFor:"host",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.host")}),y.jsx(yt,{id:"host",value:i.HOST,onChange:h=>s({...i,HOST:h.target.value}),className:"transition-all-ease focus:scale-[1.01]"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(rt,{htmlFor:"port",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.port")}),y.jsx(yt,{id:"port",type:"number",value:i.PORT,onChange:h=>s({...i,PORT:parseInt(h.target.value,10)}),className:"transition-all-ease focus:scale-[1.01]"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(rt,{htmlFor:"timeout",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.timeout")}),y.jsx(yt,{id:"timeout",value:i.API_TIMEOUT_MS,onChange:h=>s({...i,API_TIMEOUT_MS:h.target.value}),className:"transition-all-ease focus:scale-[1.01]"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(rt,{htmlFor:"proxy-url",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.proxy_url")}),y.jsx(yt,{id:"proxy-url",value:i.PROXY_URL,onChange:h=>s({...i,PROXY_URL:h.target.value}),className:"transition-all-ease focus:scale-[1.01]"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(rt,{htmlFor:"apikey",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.apikey")}),y.jsx(yt,{id:"apikey",type:"password",value:i.APIKEY,onChange:h=>s({...i,APIKEY:h.target.value}),className:"transition-all-ease focus:scale-[1.01]"})]})]}),y.jsx(uo,{children:y.jsx(ke,{onClick:()=>a(!1),className:"transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:l("app.save")})})]})})}const ha=v.forwardRef(({className:n,...a},l)=>y.jsx("div",{ref:l,className:lt("rounded-lg border bg-card text-card-foreground shadow-sm",n),...a}));ha.displayName="Card";const ma=v.forwardRef(({className:n,...a},l)=>y.jsx("div",{ref:l,className:lt("flex flex-col space-y-1.5 p-6",n),...a}));ma.displayName="CardHeader";const pa=v.forwardRef(({className:n,...a},l)=>y.jsx("div",{ref:l,className:lt("text-2xl font-semibold leading-none tracking-tight",n),...a}));pa.displayName="CardTitle";const bb=v.forwardRef(({className:n,...a},l)=>y.jsx("div",{ref:l,className:lt("text-sm text-muted-foreground",n),...a}));bb.displayName="CardDescription";const ga=v.forwardRef(({className:n,...a},l)=>y.jsx("div",{ref:l,className:lt("p-6 pt-0",n),...a}));ga.displayName="CardContent";const xb=v.forwardRef(({className:n,...a},l)=>y.jsx("div",{ref:l,className:lt("flex items-center p-6 pt-0",n),...a}));xb.displayName="CardFooter";function IO({transformers:n,onEdit:a,onRemove:l}){return!n||!Array.isArray(n)?y.jsx("div",{className:"space-y-3",children:y.jsx("div",{className:"flex items-center justify-center rounded-md border bg-white p-8 text-gray-500",children:"No transformers configured"})}):y.jsx("div",{className:"space-y-3",children:n.map((i,s)=>{if(!i)return y.jsxs("div",{className:"flex items-start justify-between rounded-md border bg-white p-4 transition-all hover:shadow-md animate-slide-in hover:scale-[1.01]",children:[y.jsxs("div",{className:"flex-1 space-y-1.5",children:[y.jsx("p",{className:"text-md font-semibold text-gray-800",children:"Invalid Transformer"}),y.jsx("p",{className:"text-sm text-gray-500",children:"Transformer data is missing"})]}),y.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[y.jsx(ke,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",disabled:!0,children:y.jsx(uu,{className:"h-4 w-4"})}),y.jsx(ke,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:y.jsx(Lr,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s);const u=i.path||"Unnamed Transformer",f=i.parameters||{},h=()=>!f||Object.keys(f).length===0?y.jsx("p",{className:"text-sm text-gray-500",children:"No parameters configured"}):y.jsx("div",{className:"flex flex-wrap gap-2 max-h-8 overflow-hidden",children:Object.entries(f).map(([p,m])=>y.jsxs("span",{className:"inline-flex items-center px-2 py-1 rounded-md bg-gray-100 text-xs font-medium text-gray-700 border",children:[y.jsxs("span",{className:"text-gray-600",children:[p,":"]}),y.jsx("span",{className:"ml-1 text-gray-800",children:String(m)})]},p))});return y.jsxs("div",{className:"flex items-start justify-between rounded-md border bg-white p-4 transition-all hover:shadow-md animate-slide-in hover:scale-[1.01]",children:[y.jsxs("div",{className:"flex-1 space-y-1.5",children:[y.jsx("p",{className:"text-md font-semibold text-gray-800",children:u}),h()]}),y.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[y.jsx(ke,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",children:y.jsx(uu,{className:"h-4 w-4"})}),y.jsx(ke,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:y.jsx(Lr,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s)})})}function WO(){const{t:n}=Ur(),{config:a,setConfig:l}=Fl(),[i,s]=v.useState(null),[u,f]=v.useState(null),[h,p]=v.useState(null);if(!a)return y.jsxs(ha,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[y.jsx(ma,{className:"flex flex-row items-center justify-between border-b p-4",children:y.jsx(pa,{className:"text-lg",children:n("transformers.title")})}),y.jsx(ga,{className:"flex-grow flex items-center justify-center p-4",children:y.jsx("div",{className:"text-gray-500",children:"Loading transformers configuration..."})})]});const m=Array.isArray(a.Transformers)?a.Transformers:[],g=()=>{p({name:"",path:"",project:"",parameters:{}}),s(m.length)},x=T=>{const O=[...m];O.splice(T,1),l({...a,Transformers:O}),f(null)},S=(T,O,z,U)=>{if(T<m.length){const $=[...m];U!==void 0?$[T].parameters[U]=z:$[T][O]=z,l({...a,Transformers:$})}else if(h){const $={...h};U!==void 0?$.parameters[U]=z:$[O]=z,p($)}},w=i!==null?i<m.length?m[i]:h:null,C=()=>{if(h&&i===m.length){const T=[...m,h];l({...a,Transformers:T})}s(null),p(null)},R=()=>{s(null),p(null)};return y.jsxs(ha,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[y.jsxs(ma,{className:"flex flex-row items-center justify-between border-b p-4",children:[y.jsxs(pa,{className:"text-lg",children:[n("transformers.title")," ",y.jsxs("span",{className:"text-sm font-normal text-gray-500",children:["(",m.length,")"]})]}),y.jsx(ke,{onClick:g,children:n("transformers.add")})]}),y.jsx(ga,{className:"flex-grow overflow-y-auto p-4",children:y.jsx(IO,{transformers:m,onEdit:s,onRemove:f})}),y.jsx(so,{open:i!==null,onOpenChange:R,children:y.jsxs(Pl,{children:[y.jsx(Hl,{children:y.jsx(Bl,{children:n("transformers.edit")})}),w&&i!==null&&y.jsxs("div",{className:"space-y-4 py-4 px-6 max-h-96 overflow-y-auto",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(rt,{htmlFor:"transformer-path",children:n("transformers.path")}),y.jsx(yt,{id:"transformer-path",value:w.path||"",onChange:T=>S(i,"path",T.target.value)})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx(rt,{children:n("transformers.parameters")}),y.jsx(ke,{variant:"outline",size:"sm",onClick:()=>{const T=w.parameters||{},O=`param${Object.keys(T).length+1}`;if(i!==null){const z={...T,[O]:""};if(i<m.length){const U=[...m];U[i].parameters=z,l({...a,Transformers:U})}else h&&p({...h,parameters:z})}},children:y.jsx(Nd,{className:"h-4 w-4"})})]}),Object.entries(w.parameters||{}).map(([T,O])=>y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(yt,{value:T,onChange:z=>{const $={...w.parameters||{}};if(delete $[T],$[z.target.value]=O,i!==null)if(i<m.length){const P=[...m];P[i].parameters=$,l({...a,Transformers:P})}else h&&p({...h,parameters:$})},className:"flex-1"}),y.jsx(yt,{value:O,onChange:z=>{i!==null&&S(i,"parameters",z.target.value,T)},className:"flex-1"}),y.jsx(ke,{variant:"outline",size:"icon",onClick:()=>{if(i!==null){const U={...w.parameters||{}};if(delete U[T],i<m.length){const $=[...m];$[i].parameters=U,l({...a,Transformers:$})}else h&&p({...h,parameters:U})}},children:y.jsx(Lr,{className:"h-4 w-4"})})]},T))]})]}),y.jsxs(uo,{children:[y.jsx(ke,{variant:"outline",onClick:R,children:n("app.cancel")}),y.jsx(ke,{onClick:C,children:n("app.save")})]})]})}),y.jsx(so,{open:u!==null,onOpenChange:()=>f(null),children:y.jsxs(Pl,{children:[y.jsxs(Hl,{children:[y.jsx(Bl,{children:n("transformers.delete")}),y.jsx(ah,{children:n("transformers.delete_transformer_confirm")})]}),y.jsxs(uo,{children:[y.jsx(ke,{variant:"outline",onClick:()=>f(null),children:n("app.cancel")}),y.jsx(ke,{variant:"destructive",onClick:()=>u!==null&&x(u),children:n("app.delete")})]})]})})]})}const eA=rh("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Sb({className:n,variant:a,...l}){return y.jsx("div",{className:lt(eA({variant:a}),n),...l})}function tA({providers:n,onEdit:a,onRemove:l}){return!n||!Array.isArray(n)?y.jsx("div",{className:"space-y-3",children:y.jsx("div",{className:"flex items-center justify-center rounded-md border bg-white p-8 text-gray-500",children:"No providers configured"})}):y.jsx("div",{className:"space-y-3",children:n.map((i,s)=>{if(!i)return y.jsxs("div",{className:"flex items-start justify-between rounded-md border bg-white p-4 transition-all hover:shadow-md animate-slide-in hover:scale-[1.01]",children:[y.jsxs("div",{className:"flex-1 space-y-1.5",children:[y.jsx("p",{className:"text-md font-semibold text-gray-800",children:"Invalid Provider"}),y.jsx("p",{className:"text-sm text-gray-500",children:"Provider data is missing"})]}),y.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[y.jsx(ke,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",disabled:!0,children:y.jsx(uu,{className:"h-4 w-4"})}),y.jsx(ke,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:y.jsx(Lr,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s);const u=i.name||"Unnamed Provider",f=i.api_base_url||"No API URL",h=Array.isArray(i.models)?i.models:[];return y.jsxs("div",{className:"flex items-start justify-between rounded-md border bg-white p-4 transition-all hover:shadow-md animate-slide-in hover:scale-[1.01]",children:[y.jsxs("div",{className:"flex-1 space-y-1.5",children:[y.jsx("p",{className:"text-md font-semibold text-gray-800",children:u}),y.jsx("p",{className:"text-sm text-gray-500",children:f}),y.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:h.map((p,m)=>y.jsx(Sb,{variant:"outline",className:"font-normal transition-all-ease hover:scale-105",children:p||"Unnamed Model"},m))})]}),y.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[y.jsx(ke,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",children:y.jsx(uu,{className:"h-4 w-4"})}),y.jsx(ke,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:y.jsx(Lr,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s)})})}var dy=1,nA=.9,aA=.8,rA=.17,sd=.1,ud=.999,lA=.9999,iA=.99,oA=/[\\\/_+.#"@\[\(\{&]/,sA=/[\\\/_+.#"@\[\(\{&]/g,uA=/[\s-]/,wb=/[\s-]/g;function _d(n,a,l,i,s,u,f){if(u===a.length)return s===n.length?dy:iA;var h=`${s},${u}`;if(f[h]!==void 0)return f[h];for(var p=i.charAt(u),m=l.indexOf(p,s),g=0,x,S,w,C;m>=0;)x=_d(n,a,l,i,m+1,u+1,f),x>g&&(m===s?x*=dy:oA.test(n.charAt(m-1))?(x*=aA,w=n.slice(s,m-1).match(sA),w&&s>0&&(x*=Math.pow(ud,w.length))):uA.test(n.charAt(m-1))?(x*=nA,C=n.slice(s,m-1).match(wb),C&&s>0&&(x*=Math.pow(ud,C.length))):(x*=rA,s>0&&(x*=Math.pow(ud,m-s))),n.charAt(m)!==a.charAt(u)&&(x*=lA)),(x<sd&&l.charAt(m-1)===i.charAt(u+1)||i.charAt(u+1)===i.charAt(u)&&l.charAt(m-1)!==i.charAt(u))&&(S=_d(n,a,l,i,m+1,u+2,f),S*sd>x&&(x=S*sd)),x>g&&(g=x),m=l.indexOf(p,m+1);return f[h]=g,g}function hy(n){return n.toLowerCase().replace(wb," ")}function cA(n,a,l){return n=l&&l.length>0?`${n+" "+l.join(" ")}`:n,_d(n,a,hy(n),hy(a),0,0,{})}var Wi='[cmdk-group=""]',cd='[cmdk-group-items=""]',fA='[cmdk-group-heading=""]',Eb='[cmdk-item=""]',my=`${Eb}:not([aria-disabled="true"])`,Dd="cmdk-item-select",jl="data-value",dA=(n,a,l)=>cA(n,a,l),Rb=v.createContext(void 0),go=()=>v.useContext(Rb),Cb=v.createContext(void 0),lh=()=>v.useContext(Cb),Ob=v.createContext(void 0),Ab=v.forwardRef((n,a)=>{let l=Ml(()=>{var L,F;return{search:"",value:(F=(L=n.value)!=null?L:n.defaultValue)!=null?F:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),i=Ml(()=>new Set),s=Ml(()=>new Map),u=Ml(()=>new Map),f=Ml(()=>new Set),h=Nb(n),{label:p,children:m,value:g,onValueChange:x,filter:S,shouldFilter:w,loop:C,disablePointerSelection:R=!1,vimBindings:T=!0,...O}=n,z=Vn(),U=Vn(),$=Vn(),P=v.useRef(null),A=EA();zr(()=>{if(g!==void 0){let L=g.trim();l.current.value=L,X.emit()}},[g]),zr(()=>{A(6,he)},[]);let X=v.useMemo(()=>({subscribe:L=>(f.current.add(L),()=>f.current.delete(L)),snapshot:()=>l.current,setState:(L,F,W)=>{var k,B,I,te;if(!Object.is(l.current[L],F)){if(l.current[L]=F,L==="search")we(),se(),A(1,Ne);else if(L==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let fe=document.getElementById($);fe?fe.focus():(k=document.getElementById(z))==null||k.focus()}if(A(7,()=>{var fe;l.current.selectedItemId=(fe=de())==null?void 0:fe.id,X.emit()}),W||A(5,he),((B=h.current)==null?void 0:B.value)!==void 0){let fe=F??"";(te=(I=h.current).onValueChange)==null||te.call(I,fe);return}}X.emit()}},emit:()=>{f.current.forEach(L=>L())}}),[]),ne=v.useMemo(()=>({value:(L,F,W)=>{var k;F!==((k=u.current.get(L))==null?void 0:k.value)&&(u.current.set(L,{value:F,keywords:W}),l.current.filtered.items.set(L,oe(F,W)),A(2,()=>{se(),X.emit()}))},item:(L,F)=>(i.current.add(L),F&&(s.current.has(F)?s.current.get(F).add(L):s.current.set(F,new Set([L]))),A(3,()=>{we(),se(),l.current.value||Ne(),X.emit()}),()=>{u.current.delete(L),i.current.delete(L),l.current.filtered.items.delete(L);let W=de();A(4,()=>{we(),W?.getAttribute("id")===L&&Ne(),X.emit()})}),group:L=>(s.current.has(L)||s.current.set(L,new Set),()=>{u.current.delete(L),s.current.delete(L)}),filter:()=>h.current.shouldFilter,label:p||n["aria-label"],getDisablePointerSelection:()=>h.current.disablePointerSelection,listId:z,inputId:$,labelId:U,listInnerRef:P}),[]);function oe(L,F){var W,k;let B=(k=(W=h.current)==null?void 0:W.filter)!=null?k:dA;return L?B(L,l.current.search,F):0}function se(){if(!l.current.search||h.current.shouldFilter===!1)return;let L=l.current.filtered.items,F=[];l.current.filtered.groups.forEach(k=>{let B=s.current.get(k),I=0;B.forEach(te=>{let fe=L.get(te);I=Math.max(fe,I)}),F.push([k,I])});let W=P.current;ce().sort((k,B)=>{var I,te;let fe=k.getAttribute("id"),me=B.getAttribute("id");return((I=L.get(me))!=null?I:0)-((te=L.get(fe))!=null?te:0)}).forEach(k=>{let B=k.closest(cd);B?B.appendChild(k.parentElement===B?k:k.closest(`${cd} > *`)):W.appendChild(k.parentElement===W?k:k.closest(`${cd} > *`))}),F.sort((k,B)=>B[1]-k[1]).forEach(k=>{var B;let I=(B=P.current)==null?void 0:B.querySelector(`${Wi}[${jl}="${encodeURIComponent(k[0])}"]`);I?.parentElement.appendChild(I)})}function Ne(){let L=ce().find(W=>W.getAttribute("aria-disabled")!=="true"),F=L?.getAttribute(jl);X.setState("value",F||void 0)}function we(){var L,F,W,k;if(!l.current.search||h.current.shouldFilter===!1){l.current.filtered.count=i.current.size;return}l.current.filtered.groups=new Set;let B=0;for(let I of i.current){let te=(F=(L=u.current.get(I))==null?void 0:L.value)!=null?F:"",fe=(k=(W=u.current.get(I))==null?void 0:W.keywords)!=null?k:[],me=oe(te,fe);l.current.filtered.items.set(I,me),me>0&&B++}for(let[I,te]of s.current)for(let fe of te)if(l.current.filtered.items.get(fe)>0){l.current.filtered.groups.add(I);break}l.current.filtered.count=B}function he(){var L,F,W;let k=de();k&&(((L=k.parentElement)==null?void 0:L.firstChild)===k&&((W=(F=k.closest(Wi))==null?void 0:F.querySelector(fA))==null||W.scrollIntoView({block:"nearest"})),k.scrollIntoView({block:"nearest"}))}function de(){var L;return(L=P.current)==null?void 0:L.querySelector(`${Eb}[aria-selected="true"]`)}function ce(){var L;return Array.from(((L=P.current)==null?void 0:L.querySelectorAll(my))||[])}function _(L){let F=ce()[L];F&&X.setState("value",F.getAttribute(jl))}function ee(L){var F;let W=de(),k=ce(),B=k.findIndex(te=>te===W),I=k[B+L];(F=h.current)!=null&&F.loop&&(I=B+L<0?k[k.length-1]:B+L===k.length?k[0]:k[B+L]),I&&X.setState("value",I.getAttribute(jl))}function q(L){let F=de(),W=F?.closest(Wi),k;for(;W&&!k;)W=L>0?SA(W,Wi):wA(W,Wi),k=W?.querySelector(my);k?X.setState("value",k.getAttribute(jl)):ee(L)}let pe=()=>_(ce().length-1),N=L=>{L.preventDefault(),L.metaKey?pe():L.altKey?q(1):ee(1)},K=L=>{L.preventDefault(),L.metaKey?_(0):L.altKey?q(-1):ee(-1)};return v.createElement(it.div,{ref:a,tabIndex:-1,...O,"cmdk-root":"",onKeyDown:L=>{var F;(F=O.onKeyDown)==null||F.call(O,L);let W=L.nativeEvent.isComposing||L.keyCode===229;if(!(L.defaultPrevented||W))switch(L.key){case"n":case"j":{T&&L.ctrlKey&&N(L);break}case"ArrowDown":{N(L);break}case"p":case"k":{T&&L.ctrlKey&&K(L);break}case"ArrowUp":{K(L);break}case"Home":{L.preventDefault(),_(0);break}case"End":{L.preventDefault(),pe();break}case"Enter":{L.preventDefault();let k=de();if(k){let B=new Event(Dd);k.dispatchEvent(B)}}}}},v.createElement("label",{"cmdk-label":"",htmlFor:ne.inputId,id:ne.labelId,style:CA},p),Au(n,L=>v.createElement(Cb.Provider,{value:X},v.createElement(Rb.Provider,{value:ne},L))))}),hA=v.forwardRef((n,a)=>{var l,i;let s=Vn(),u=v.useRef(null),f=v.useContext(Ob),h=go(),p=Nb(n),m=(i=(l=p.current)==null?void 0:l.forceMount)!=null?i:f?.forceMount;zr(()=>{if(!m)return h.item(s,f?.id)},[m]);let g=Tb(s,u,[n.value,n.children,u],n.keywords),x=lh(),S=Wa(A=>A.value&&A.value===g.current),w=Wa(A=>m||h.filter()===!1?!0:A.search?A.filtered.items.get(s)>0:!0);v.useEffect(()=>{let A=u.current;if(!(!A||n.disabled))return A.addEventListener(Dd,C),()=>A.removeEventListener(Dd,C)},[w,n.onSelect,n.disabled]);function C(){var A,X;R(),(X=(A=p.current).onSelect)==null||X.call(A,g.current)}function R(){x.setState("value",g.current,!0)}if(!w)return null;let{disabled:T,value:O,onSelect:z,forceMount:U,keywords:$,...P}=n;return v.createElement(it.div,{ref:_r(u,a),...P,id:s,"cmdk-item":"",role:"option","aria-disabled":!!T,"aria-selected":!!S,"data-disabled":!!T,"data-selected":!!S,onPointerMove:T||h.getDisablePointerSelection()?void 0:R,onClick:T?void 0:C},n.children)}),mA=v.forwardRef((n,a)=>{let{heading:l,children:i,forceMount:s,...u}=n,f=Vn(),h=v.useRef(null),p=v.useRef(null),m=Vn(),g=go(),x=Wa(w=>s||g.filter()===!1?!0:w.search?w.filtered.groups.has(f):!0);zr(()=>g.group(f),[]),Tb(f,h,[n.value,n.heading,p]);let S=v.useMemo(()=>({id:f,forceMount:s}),[s]);return v.createElement(it.div,{ref:_r(h,a),...u,"cmdk-group":"",role:"presentation",hidden:x?void 0:!0},l&&v.createElement("div",{ref:p,"cmdk-group-heading":"","aria-hidden":!0,id:m},l),Au(n,w=>v.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":l?m:void 0},v.createElement(Ob.Provider,{value:S},w))))}),pA=v.forwardRef((n,a)=>{let{alwaysRender:l,...i}=n,s=v.useRef(null),u=Wa(f=>!f.search);return!l&&!u?null:v.createElement(it.div,{ref:_r(s,a),...i,"cmdk-separator":"",role:"separator"})}),gA=v.forwardRef((n,a)=>{let{onValueChange:l,...i}=n,s=n.value!=null,u=lh(),f=Wa(m=>m.search),h=Wa(m=>m.selectedItemId),p=go();return v.useEffect(()=>{n.value!=null&&u.setState("search",n.value)},[n.value]),v.createElement(it.input,{ref:a,...i,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":p.listId,"aria-labelledby":p.labelId,"aria-activedescendant":h,id:p.inputId,type:"text",value:s?n.value:f,onChange:m=>{s||u.setState("search",m.target.value),l?.(m.target.value)}})}),vA=v.forwardRef((n,a)=>{let{children:l,label:i="Suggestions",...s}=n,u=v.useRef(null),f=v.useRef(null),h=Wa(m=>m.selectedItemId),p=go();return v.useEffect(()=>{if(f.current&&u.current){let m=f.current,g=u.current,x,S=new ResizeObserver(()=>{x=requestAnimationFrame(()=>{let w=m.offsetHeight;g.style.setProperty("--cmdk-list-height",w.toFixed(1)+"px")})});return S.observe(m),()=>{cancelAnimationFrame(x),S.unobserve(m)}}},[]),v.createElement(it.div,{ref:_r(u,a),...s,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":h,"aria-label":i,id:p.listId},Au(n,m=>v.createElement("div",{ref:_r(f,p.listInnerRef),"cmdk-list-sizer":""},m)))}),yA=v.forwardRef((n,a)=>{let{open:l,onOpenChange:i,overlayClassName:s,contentClassName:u,container:f,...h}=n;return v.createElement(B0,{open:l,onOpenChange:i},v.createElement($0,{container:f},v.createElement(eh,{"cmdk-overlay":"",className:s}),v.createElement(th,{"aria-label":n.label,"cmdk-dialog":"",className:u},v.createElement(Ab,{ref:a,...h}))))}),bA=v.forwardRef((n,a)=>Wa(l=>l.filtered.count===0)?v.createElement(it.div,{ref:a,...n,"cmdk-empty":"",role:"presentation"}):null),xA=v.forwardRef((n,a)=>{let{progress:l,children:i,label:s="Loading...",...u}=n;return v.createElement(it.div,{ref:a,...u,"cmdk-loading":"",role:"progressbar","aria-valuenow":l,"aria-valuemin":0,"aria-valuemax":100,"aria-label":s},Au(n,f=>v.createElement("div",{"aria-hidden":!0},f)))}),Xl=Object.assign(Ab,{List:vA,Item:hA,Input:gA,Group:mA,Separator:pA,Dialog:yA,Empty:bA,Loading:xA});function SA(n,a){let l=n.nextElementSibling;for(;l;){if(l.matches(a))return l;l=l.nextElementSibling}}function wA(n,a){let l=n.previousElementSibling;for(;l;){if(l.matches(a))return l;l=l.previousElementSibling}}function Nb(n){let a=v.useRef(n);return zr(()=>{a.current=n}),a}var zr=typeof window>"u"?v.useEffect:v.useLayoutEffect;function Ml(n){let a=v.useRef();return a.current===void 0&&(a.current=n()),a}function Wa(n){let a=lh(),l=()=>n(a.snapshot());return v.useSyncExternalStore(a.subscribe,l,l)}function Tb(n,a,l,i=[]){let s=v.useRef(),u=go();return zr(()=>{var f;let h=(()=>{var m;for(let g of l){if(typeof g=="string")return g.trim();if(typeof g=="object"&&"current"in g)return g.current?(m=g.current.textContent)==null?void 0:m.trim():s.current}})(),p=i.map(m=>m.trim());u.value(n,h,p),(f=a.current)==null||f.setAttribute(jl,h),s.current=h}),s}var EA=()=>{let[n,a]=v.useState(),l=Ml(()=>new Map);return zr(()=>{l.current.forEach(i=>i()),l.current=new Map},[n]),(i,s)=>{l.current.set(i,s),a({})}};function RA(n){let a=n.type;return typeof a=="function"?a(n.props):"render"in a?a.render(n.props):n}function Au({asChild:n,children:a},l){return n&&v.isValidElement(a)?v.cloneElement(RA(a),{ref:a.ref},l(a.props.children)):l(a)}var CA={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function jb({className:n,...a}){return y.jsx(Xl,{"data-slot":"command",className:lt("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",n),...a})}function Mb({className:n,...a}){return y.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[y.jsx(eO,{className:"size-4 shrink-0 opacity-50"}),y.jsx(Xl.Input,{"data-slot":"command-input",className:lt("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",n),...a})]})}function _b({className:n,...a}){return y.jsx(Xl.List,{"data-slot":"command-list",className:lt("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",n),...a})}function Db({...n}){return y.jsx(Xl.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...n})}function Lb({className:n,...a}){return y.jsx(Xl.Group,{"data-slot":"command-group",className:lt("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",n),...a})}function zb({className:n,...a}){return y.jsx(Xl.Item,{"data-slot":"command-item",className:lt("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...a})}const OA=["top","right","bottom","left"],er=Math.min,rn=Math.max,cu=Math.round,Fs=Math.floor,Yn=n=>({x:n,y:n}),AA={left:"right",right:"left",bottom:"top",top:"bottom"},NA={start:"end",end:"start"};function Ld(n,a,l){return rn(n,er(a,l))}function va(n,a){return typeof n=="function"?n(a):n}function ya(n){return n.split("-")[0]}function Ql(n){return n.split("-")[1]}function ih(n){return n==="x"?"y":"x"}function oh(n){return n==="y"?"height":"width"}const TA=new Set(["top","bottom"]);function Bn(n){return TA.has(ya(n))?"y":"x"}function sh(n){return ih(Bn(n))}function jA(n,a,l){l===void 0&&(l=!1);const i=Ql(n),s=sh(n),u=oh(s);let f=s==="x"?i===(l?"end":"start")?"right":"left":i==="start"?"bottom":"top";return a.reference[u]>a.floating[u]&&(f=fu(f)),[f,fu(f)]}function MA(n){const a=fu(n);return[zd(n),a,zd(a)]}function zd(n){return n.replace(/start|end/g,a=>NA[a])}const py=["left","right"],gy=["right","left"],_A=["top","bottom"],DA=["bottom","top"];function LA(n,a,l){switch(n){case"top":case"bottom":return l?a?gy:py:a?py:gy;case"left":case"right":return a?_A:DA;default:return[]}}function zA(n,a,l,i){const s=Ql(n);let u=LA(ya(n),l==="start",i);return s&&(u=u.map(f=>f+"-"+s),a&&(u=u.concat(u.map(zd)))),u}function fu(n){return n.replace(/left|right|bottom|top/g,a=>AA[a])}function kA(n){return{top:0,right:0,bottom:0,left:0,...n}}function kb(n){return typeof n!="number"?kA(n):{top:n,right:n,bottom:n,left:n}}function du(n){const{x:a,y:l,width:i,height:s}=n;return{width:i,height:s,top:l,left:a,right:a+i,bottom:l+s,x:a,y:l}}function vy(n,a,l){let{reference:i,floating:s}=n;const u=Bn(a),f=sh(a),h=oh(f),p=ya(a),m=u==="y",g=i.x+i.width/2-s.width/2,x=i.y+i.height/2-s.height/2,S=i[h]/2-s[h]/2;let w;switch(p){case"top":w={x:g,y:i.y-s.height};break;case"bottom":w={x:g,y:i.y+i.height};break;case"right":w={x:i.x+i.width,y:x};break;case"left":w={x:i.x-s.width,y:x};break;default:w={x:i.x,y:i.y}}switch(Ql(a)){case"start":w[f]-=S*(l&&m?-1:1);break;case"end":w[f]+=S*(l&&m?-1:1);break}return w}const UA=async(n,a,l)=>{const{placement:i="bottom",strategy:s="absolute",middleware:u=[],platform:f}=l,h=u.filter(Boolean),p=await(f.isRTL==null?void 0:f.isRTL(a));let m=await f.getElementRects({reference:n,floating:a,strategy:s}),{x:g,y:x}=vy(m,i,p),S=i,w={},C=0;for(let R=0;R<h.length;R++){const{name:T,fn:O}=h[R],{x:z,y:U,data:$,reset:P}=await O({x:g,y:x,initialPlacement:i,placement:S,strategy:s,middlewareData:w,rects:m,platform:f,elements:{reference:n,floating:a}});g=z??g,x=U??x,w={...w,[T]:{...w[T],...$}},P&&C<=50&&(C++,typeof P=="object"&&(P.placement&&(S=P.placement),P.rects&&(m=P.rects===!0?await f.getElementRects({reference:n,floating:a,strategy:s}):P.rects),{x:g,y:x}=vy(m,S,p)),R=-1)}return{x:g,y:x,placement:S,strategy:s,middlewareData:w}};async function co(n,a){var l;a===void 0&&(a={});const{x:i,y:s,platform:u,rects:f,elements:h,strategy:p}=n,{boundary:m="clippingAncestors",rootBoundary:g="viewport",elementContext:x="floating",altBoundary:S=!1,padding:w=0}=va(a,n),C=kb(w),T=h[S?x==="floating"?"reference":"floating":x],O=du(await u.getClippingRect({element:(l=await(u.isElement==null?void 0:u.isElement(T)))==null||l?T:T.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(h.floating)),boundary:m,rootBoundary:g,strategy:p})),z=x==="floating"?{x:i,y:s,width:f.floating.width,height:f.floating.height}:f.reference,U=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h.floating)),$=await(u.isElement==null?void 0:u.isElement(U))?await(u.getScale==null?void 0:u.getScale(U))||{x:1,y:1}:{x:1,y:1},P=du(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:z,offsetParent:U,strategy:p}):z);return{top:(O.top-P.top+C.top)/$.y,bottom:(P.bottom-O.bottom+C.bottom)/$.y,left:(O.left-P.left+C.left)/$.x,right:(P.right-O.right+C.right)/$.x}}const PA=n=>({name:"arrow",options:n,async fn(a){const{x:l,y:i,placement:s,rects:u,platform:f,elements:h,middlewareData:p}=a,{element:m,padding:g=0}=va(n,a)||{};if(m==null)return{};const x=kb(g),S={x:l,y:i},w=sh(s),C=oh(w),R=await f.getDimensions(m),T=w==="y",O=T?"top":"left",z=T?"bottom":"right",U=T?"clientHeight":"clientWidth",$=u.reference[C]+u.reference[w]-S[w]-u.floating[C],P=S[w]-u.reference[w],A=await(f.getOffsetParent==null?void 0:f.getOffsetParent(m));let X=A?A[U]:0;(!X||!await(f.isElement==null?void 0:f.isElement(A)))&&(X=h.floating[U]||u.floating[C]);const ne=$/2-P/2,oe=X/2-R[C]/2-1,se=er(x[O],oe),Ne=er(x[z],oe),we=se,he=X-R[C]-Ne,de=X/2-R[C]/2+ne,ce=Ld(we,de,he),_=!p.arrow&&Ql(s)!=null&&de!==ce&&u.reference[C]/2-(de<we?se:Ne)-R[C]/2<0,ee=_?de<we?de-we:de-he:0;return{[w]:S[w]+ee,data:{[w]:ce,centerOffset:de-ce-ee,..._&&{alignmentOffset:ee}},reset:_}}}),HA=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(a){var l,i;const{placement:s,middlewareData:u,rects:f,initialPlacement:h,platform:p,elements:m}=a,{mainAxis:g=!0,crossAxis:x=!0,fallbackPlacements:S,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:R=!0,...T}=va(n,a);if((l=u.arrow)!=null&&l.alignmentOffset)return{};const O=ya(s),z=Bn(h),U=ya(h)===h,$=await(p.isRTL==null?void 0:p.isRTL(m.floating)),P=S||(U||!R?[fu(h)]:MA(h)),A=C!=="none";!S&&A&&P.push(...zA(h,R,C,$));const X=[h,...P],ne=await co(a,T),oe=[];let se=((i=u.flip)==null?void 0:i.overflows)||[];if(g&&oe.push(ne[O]),x){const de=jA(s,f,$);oe.push(ne[de[0]],ne[de[1]])}if(se=[...se,{placement:s,overflows:oe}],!oe.every(de=>de<=0)){var Ne,we;const de=(((Ne=u.flip)==null?void 0:Ne.index)||0)+1,ce=X[de];if(ce&&(!(x==="alignment"?z!==Bn(ce):!1)||se.every(q=>q.overflows[0]>0&&Bn(q.placement)===z)))return{data:{index:de,overflows:se},reset:{placement:ce}};let _=(we=se.filter(ee=>ee.overflows[0]<=0).sort((ee,q)=>ee.overflows[1]-q.overflows[1])[0])==null?void 0:we.placement;if(!_)switch(w){case"bestFit":{var he;const ee=(he=se.filter(q=>{if(A){const pe=Bn(q.placement);return pe===z||pe==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(pe=>pe>0).reduce((pe,N)=>pe+N,0)]).sort((q,pe)=>q[1]-pe[1])[0])==null?void 0:he[0];ee&&(_=ee);break}case"initialPlacement":_=h;break}if(s!==_)return{reset:{placement:_}}}return{}}}};function yy(n,a){return{top:n.top-a.height,right:n.right-a.width,bottom:n.bottom-a.height,left:n.left-a.width}}function by(n){return OA.some(a=>n[a]>=0)}const BA=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(a){const{rects:l}=a,{strategy:i="referenceHidden",...s}=va(n,a);switch(i){case"referenceHidden":{const u=await co(a,{...s,elementContext:"reference"}),f=yy(u,l.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:by(f)}}}case"escaped":{const u=await co(a,{...s,altBoundary:!0}),f=yy(u,l.floating);return{data:{escapedOffsets:f,escaped:by(f)}}}default:return{}}}}},Ub=new Set(["left","top"]);async function $A(n,a){const{placement:l,platform:i,elements:s}=n,u=await(i.isRTL==null?void 0:i.isRTL(s.floating)),f=ya(l),h=Ql(l),p=Bn(l)==="y",m=Ub.has(f)?-1:1,g=u&&p?-1:1,x=va(a,n);let{mainAxis:S,crossAxis:w,alignmentAxis:C}=typeof x=="number"?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return h&&typeof C=="number"&&(w=h==="end"?C*-1:C),p?{x:w*g,y:S*m}:{x:S*m,y:w*g}}const VA=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(a){var l,i;const{x:s,y:u,placement:f,middlewareData:h}=a,p=await $A(a,n);return f===((l=h.offset)==null?void 0:l.placement)&&(i=h.arrow)!=null&&i.alignmentOffset?{}:{x:s+p.x,y:u+p.y,data:{...p,placement:f}}}}},YA=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(a){const{x:l,y:i,placement:s}=a,{mainAxis:u=!0,crossAxis:f=!1,limiter:h={fn:T=>{let{x:O,y:z}=T;return{x:O,y:z}}},...p}=va(n,a),m={x:l,y:i},g=await co(a,p),x=Bn(ya(s)),S=ih(x);let w=m[S],C=m[x];if(u){const T=S==="y"?"top":"left",O=S==="y"?"bottom":"right",z=w+g[T],U=w-g[O];w=Ld(z,w,U)}if(f){const T=x==="y"?"top":"left",O=x==="y"?"bottom":"right",z=C+g[T],U=C-g[O];C=Ld(z,C,U)}const R=h.fn({...a,[S]:w,[x]:C});return{...R,data:{x:R.x-l,y:R.y-i,enabled:{[S]:u,[x]:f}}}}}},qA=function(n){return n===void 0&&(n={}),{options:n,fn(a){const{x:l,y:i,placement:s,rects:u,middlewareData:f}=a,{offset:h=0,mainAxis:p=!0,crossAxis:m=!0}=va(n,a),g={x:l,y:i},x=Bn(s),S=ih(x);let w=g[S],C=g[x];const R=va(h,a),T=typeof R=="number"?{mainAxis:R,crossAxis:0}:{mainAxis:0,crossAxis:0,...R};if(p){const U=S==="y"?"height":"width",$=u.reference[S]-u.floating[U]+T.mainAxis,P=u.reference[S]+u.reference[U]-T.mainAxis;w<$?w=$:w>P&&(w=P)}if(m){var O,z;const U=S==="y"?"width":"height",$=Ub.has(ya(s)),P=u.reference[x]-u.floating[U]+($&&((O=f.offset)==null?void 0:O[x])||0)+($?0:T.crossAxis),A=u.reference[x]+u.reference[U]+($?0:((z=f.offset)==null?void 0:z[x])||0)-($?T.crossAxis:0);C<P?C=P:C>A&&(C=A)}return{[S]:w,[x]:C}}}},GA=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(a){var l,i;const{placement:s,rects:u,platform:f,elements:h}=a,{apply:p=()=>{},...m}=va(n,a),g=await co(a,m),x=ya(s),S=Ql(s),w=Bn(s)==="y",{width:C,height:R}=u.floating;let T,O;x==="top"||x==="bottom"?(T=x,O=S===(await(f.isRTL==null?void 0:f.isRTL(h.floating))?"start":"end")?"left":"right"):(O=x,T=S==="end"?"top":"bottom");const z=R-g.top-g.bottom,U=C-g.left-g.right,$=er(R-g[T],z),P=er(C-g[O],U),A=!a.middlewareData.shift;let X=$,ne=P;if((l=a.middlewareData.shift)!=null&&l.enabled.x&&(ne=U),(i=a.middlewareData.shift)!=null&&i.enabled.y&&(X=z),A&&!S){const se=rn(g.left,0),Ne=rn(g.right,0),we=rn(g.top,0),he=rn(g.bottom,0);w?ne=C-2*(se!==0||Ne!==0?se+Ne:rn(g.left,g.right)):X=R-2*(we!==0||he!==0?we+he:rn(g.top,g.bottom))}await p({...a,availableWidth:ne,availableHeight:X});const oe=await f.getDimensions(h.floating);return C!==oe.width||R!==oe.height?{reset:{rects:!0}}:{}}}};function Nu(){return typeof window<"u"}function Zl(n){return Pb(n)?(n.nodeName||"").toLowerCase():"#document"}function on(n){var a;return(n==null||(a=n.ownerDocument)==null?void 0:a.defaultView)||window}function Kn(n){var a;return(a=(Pb(n)?n.ownerDocument:n.document)||window.document)==null?void 0:a.documentElement}function Pb(n){return Nu()?n instanceof Node||n instanceof on(n).Node:!1}function On(n){return Nu()?n instanceof Element||n instanceof on(n).Element:!1}function qn(n){return Nu()?n instanceof HTMLElement||n instanceof on(n).HTMLElement:!1}function xy(n){return!Nu()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof on(n).ShadowRoot}const KA=new Set(["inline","contents"]);function vo(n){const{overflow:a,overflowX:l,overflowY:i,display:s}=An(n);return/auto|scroll|overlay|hidden|clip/.test(a+i+l)&&!KA.has(s)}const FA=new Set(["table","td","th"]);function XA(n){return FA.has(Zl(n))}const QA=[":popover-open",":modal"];function Tu(n){return QA.some(a=>{try{return n.matches(a)}catch{return!1}})}const ZA=["transform","translate","scale","rotate","perspective"],JA=["transform","translate","scale","rotate","perspective","filter"],IA=["paint","layout","strict","content"];function uh(n){const a=ch(),l=On(n)?An(n):n;return ZA.some(i=>l[i]?l[i]!=="none":!1)||(l.containerType?l.containerType!=="normal":!1)||!a&&(l.backdropFilter?l.backdropFilter!=="none":!1)||!a&&(l.filter?l.filter!=="none":!1)||JA.some(i=>(l.willChange||"").includes(i))||IA.some(i=>(l.contain||"").includes(i))}function WA(n){let a=tr(n);for(;qn(a)&&!$l(a);){if(uh(a))return a;if(Tu(a))return null;a=tr(a)}return null}function ch(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const eN=new Set(["html","body","#document"]);function $l(n){return eN.has(Zl(n))}function An(n){return on(n).getComputedStyle(n)}function ju(n){return On(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function tr(n){if(Zl(n)==="html")return n;const a=n.assignedSlot||n.parentNode||xy(n)&&n.host||Kn(n);return xy(a)?a.host:a}function Hb(n){const a=tr(n);return $l(a)?n.ownerDocument?n.ownerDocument.body:n.body:qn(a)&&vo(a)?a:Hb(a)}function fo(n,a,l){var i;a===void 0&&(a=[]),l===void 0&&(l=!0);const s=Hb(n),u=s===((i=n.ownerDocument)==null?void 0:i.body),f=on(s);if(u){const h=kd(f);return a.concat(f,f.visualViewport||[],vo(s)?s:[],h&&l?fo(h):[])}return a.concat(s,fo(s,[],l))}function kd(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Bb(n){const a=An(n);let l=parseFloat(a.width)||0,i=parseFloat(a.height)||0;const s=qn(n),u=s?n.offsetWidth:l,f=s?n.offsetHeight:i,h=cu(l)!==u||cu(i)!==f;return h&&(l=u,i=f),{width:l,height:i,$:h}}function fh(n){return On(n)?n:n.contextElement}function kl(n){const a=fh(n);if(!qn(a))return Yn(1);const l=a.getBoundingClientRect(),{width:i,height:s,$:u}=Bb(a);let f=(u?cu(l.width):l.width)/i,h=(u?cu(l.height):l.height)/s;return(!f||!Number.isFinite(f))&&(f=1),(!h||!Number.isFinite(h))&&(h=1),{x:f,y:h}}const tN=Yn(0);function $b(n){const a=on(n);return!ch()||!a.visualViewport?tN:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function nN(n,a,l){return a===void 0&&(a=!1),!l||a&&l!==on(n)?!1:a}function kr(n,a,l,i){a===void 0&&(a=!1),l===void 0&&(l=!1);const s=n.getBoundingClientRect(),u=fh(n);let f=Yn(1);a&&(i?On(i)&&(f=kl(i)):f=kl(n));const h=nN(u,l,i)?$b(u):Yn(0);let p=(s.left+h.x)/f.x,m=(s.top+h.y)/f.y,g=s.width/f.x,x=s.height/f.y;if(u){const S=on(u),w=i&&On(i)?on(i):i;let C=S,R=kd(C);for(;R&&i&&w!==C;){const T=kl(R),O=R.getBoundingClientRect(),z=An(R),U=O.left+(R.clientLeft+parseFloat(z.paddingLeft))*T.x,$=O.top+(R.clientTop+parseFloat(z.paddingTop))*T.y;p*=T.x,m*=T.y,g*=T.x,x*=T.y,p+=U,m+=$,C=on(R),R=kd(C)}}return du({width:g,height:x,x:p,y:m})}function dh(n,a){const l=ju(n).scrollLeft;return a?a.left+l:kr(Kn(n)).left+l}function Vb(n,a,l){l===void 0&&(l=!1);const i=n.getBoundingClientRect(),s=i.left+a.scrollLeft-(l?0:dh(n,i)),u=i.top+a.scrollTop;return{x:s,y:u}}function aN(n){let{elements:a,rect:l,offsetParent:i,strategy:s}=n;const u=s==="fixed",f=Kn(i),h=a?Tu(a.floating):!1;if(i===f||h&&u)return l;let p={scrollLeft:0,scrollTop:0},m=Yn(1);const g=Yn(0),x=qn(i);if((x||!x&&!u)&&((Zl(i)!=="body"||vo(f))&&(p=ju(i)),qn(i))){const w=kr(i);m=kl(i),g.x=w.x+i.clientLeft,g.y=w.y+i.clientTop}const S=f&&!x&&!u?Vb(f,p,!0):Yn(0);return{width:l.width*m.x,height:l.height*m.y,x:l.x*m.x-p.scrollLeft*m.x+g.x+S.x,y:l.y*m.y-p.scrollTop*m.y+g.y+S.y}}function rN(n){return Array.from(n.getClientRects())}function lN(n){const a=Kn(n),l=ju(n),i=n.ownerDocument.body,s=rn(a.scrollWidth,a.clientWidth,i.scrollWidth,i.clientWidth),u=rn(a.scrollHeight,a.clientHeight,i.scrollHeight,i.clientHeight);let f=-l.scrollLeft+dh(n);const h=-l.scrollTop;return An(i).direction==="rtl"&&(f+=rn(a.clientWidth,i.clientWidth)-s),{width:s,height:u,x:f,y:h}}function iN(n,a){const l=on(n),i=Kn(n),s=l.visualViewport;let u=i.clientWidth,f=i.clientHeight,h=0,p=0;if(s){u=s.width,f=s.height;const m=ch();(!m||m&&a==="fixed")&&(h=s.offsetLeft,p=s.offsetTop)}return{width:u,height:f,x:h,y:p}}const oN=new Set(["absolute","fixed"]);function sN(n,a){const l=kr(n,!0,a==="fixed"),i=l.top+n.clientTop,s=l.left+n.clientLeft,u=qn(n)?kl(n):Yn(1),f=n.clientWidth*u.x,h=n.clientHeight*u.y,p=s*u.x,m=i*u.y;return{width:f,height:h,x:p,y:m}}function Sy(n,a,l){let i;if(a==="viewport")i=iN(n,l);else if(a==="document")i=lN(Kn(n));else if(On(a))i=sN(a,l);else{const s=$b(n);i={x:a.x-s.x,y:a.y-s.y,width:a.width,height:a.height}}return du(i)}function Yb(n,a){const l=tr(n);return l===a||!On(l)||$l(l)?!1:An(l).position==="fixed"||Yb(l,a)}function uN(n,a){const l=a.get(n);if(l)return l;let i=fo(n,[],!1).filter(h=>On(h)&&Zl(h)!=="body"),s=null;const u=An(n).position==="fixed";let f=u?tr(n):n;for(;On(f)&&!$l(f);){const h=An(f),p=uh(f);!p&&h.position==="fixed"&&(s=null),(u?!p&&!s:!p&&h.position==="static"&&!!s&&oN.has(s.position)||vo(f)&&!p&&Yb(n,f))?i=i.filter(g=>g!==f):s=h,f=tr(f)}return a.set(n,i),i}function cN(n){let{element:a,boundary:l,rootBoundary:i,strategy:s}=n;const f=[...l==="clippingAncestors"?Tu(a)?[]:uN(a,this._c):[].concat(l),i],h=f[0],p=f.reduce((m,g)=>{const x=Sy(a,g,s);return m.top=rn(x.top,m.top),m.right=er(x.right,m.right),m.bottom=er(x.bottom,m.bottom),m.left=rn(x.left,m.left),m},Sy(a,h,s));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}function fN(n){const{width:a,height:l}=Bb(n);return{width:a,height:l}}function dN(n,a,l){const i=qn(a),s=Kn(a),u=l==="fixed",f=kr(n,!0,u,a);let h={scrollLeft:0,scrollTop:0};const p=Yn(0);function m(){p.x=dh(s)}if(i||!i&&!u)if((Zl(a)!=="body"||vo(s))&&(h=ju(a)),i){const w=kr(a,!0,u,a);p.x=w.x+a.clientLeft,p.y=w.y+a.clientTop}else s&&m();u&&!i&&s&&m();const g=s&&!i&&!u?Vb(s,h):Yn(0),x=f.left+h.scrollLeft-p.x-g.x,S=f.top+h.scrollTop-p.y-g.y;return{x,y:S,width:f.width,height:f.height}}function fd(n){return An(n).position==="static"}function wy(n,a){if(!qn(n)||An(n).position==="fixed")return null;if(a)return a(n);let l=n.offsetParent;return Kn(n)===l&&(l=l.ownerDocument.body),l}function qb(n,a){const l=on(n);if(Tu(n))return l;if(!qn(n)){let s=tr(n);for(;s&&!$l(s);){if(On(s)&&!fd(s))return s;s=tr(s)}return l}let i=wy(n,a);for(;i&&XA(i)&&fd(i);)i=wy(i,a);return i&&$l(i)&&fd(i)&&!uh(i)?l:i||WA(n)||l}const hN=async function(n){const a=this.getOffsetParent||qb,l=this.getDimensions,i=await l(n.floating);return{reference:dN(n.reference,await a(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function mN(n){return An(n).direction==="rtl"}const pN={convertOffsetParentRelativeRectToViewportRelativeRect:aN,getDocumentElement:Kn,getClippingRect:cN,getOffsetParent:qb,getElementRects:hN,getClientRects:rN,getDimensions:fN,getScale:kl,isElement:On,isRTL:mN};function Gb(n,a){return n.x===a.x&&n.y===a.y&&n.width===a.width&&n.height===a.height}function gN(n,a){let l=null,i;const s=Kn(n);function u(){var h;clearTimeout(i),(h=l)==null||h.disconnect(),l=null}function f(h,p){h===void 0&&(h=!1),p===void 0&&(p=1),u();const m=n.getBoundingClientRect(),{left:g,top:x,width:S,height:w}=m;if(h||a(),!S||!w)return;const C=Fs(x),R=Fs(s.clientWidth-(g+S)),T=Fs(s.clientHeight-(x+w)),O=Fs(g),U={rootMargin:-C+"px "+-R+"px "+-T+"px "+-O+"px",threshold:rn(0,er(1,p))||1};let $=!0;function P(A){const X=A[0].intersectionRatio;if(X!==p){if(!$)return f();X?f(!1,X):i=setTimeout(()=>{f(!1,1e-7)},1e3)}X===1&&!Gb(m,n.getBoundingClientRect())&&f(),$=!1}try{l=new IntersectionObserver(P,{...U,root:s.ownerDocument})}catch{l=new IntersectionObserver(P,U)}l.observe(n)}return f(!0),u}function vN(n,a,l,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:u=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:p=!1}=i,m=fh(n),g=s||u?[...m?fo(m):[],...fo(a)]:[];g.forEach(O=>{s&&O.addEventListener("scroll",l,{passive:!0}),u&&O.addEventListener("resize",l)});const x=m&&h?gN(m,l):null;let S=-1,w=null;f&&(w=new ResizeObserver(O=>{let[z]=O;z&&z.target===m&&w&&(w.unobserve(a),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var U;(U=w)==null||U.observe(a)})),l()}),m&&!p&&w.observe(m),w.observe(a));let C,R=p?kr(n):null;p&&T();function T(){const O=kr(n);R&&!Gb(R,O)&&l(),R=O,C=requestAnimationFrame(T)}return l(),()=>{var O;g.forEach(z=>{s&&z.removeEventListener("scroll",l),u&&z.removeEventListener("resize",l)}),x?.(),(O=w)==null||O.disconnect(),w=null,p&&cancelAnimationFrame(C)}}const yN=VA,bN=YA,xN=HA,SN=GA,wN=BA,Ey=PA,EN=qA,RN=(n,a,l)=>{const i=new Map,s={platform:pN,...l},u={...s.platform,_c:i};return UA(n,a,{...s,platform:u})};var CN=typeof document<"u",ON=function(){},nu=CN?v.useLayoutEffect:ON;function hu(n,a){if(n===a)return!0;if(typeof n!=typeof a)return!1;if(typeof n=="function"&&n.toString()===a.toString())return!0;let l,i,s;if(n&&a&&typeof n=="object"){if(Array.isArray(n)){if(l=n.length,l!==a.length)return!1;for(i=l;i--!==0;)if(!hu(n[i],a[i]))return!1;return!0}if(s=Object.keys(n),l=s.length,l!==Object.keys(a).length)return!1;for(i=l;i--!==0;)if(!{}.hasOwnProperty.call(a,s[i]))return!1;for(i=l;i--!==0;){const u=s[i];if(!(u==="_owner"&&n.$$typeof)&&!hu(n[u],a[u]))return!1}return!0}return n!==n&&a!==a}function Kb(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Ry(n,a){const l=Kb(n);return Math.round(a*l)/l}function dd(n){const a=v.useRef(n);return nu(()=>{a.current=n}),a}function AN(n){n===void 0&&(n={});const{placement:a="bottom",strategy:l="absolute",middleware:i=[],platform:s,elements:{reference:u,floating:f}={},transform:h=!0,whileElementsMounted:p,open:m}=n,[g,x]=v.useState({x:0,y:0,strategy:l,placement:a,middlewareData:{},isPositioned:!1}),[S,w]=v.useState(i);hu(S,i)||w(i);const[C,R]=v.useState(null),[T,O]=v.useState(null),z=v.useCallback(q=>{q!==A.current&&(A.current=q,R(q))},[]),U=v.useCallback(q=>{q!==X.current&&(X.current=q,O(q))},[]),$=u||C,P=f||T,A=v.useRef(null),X=v.useRef(null),ne=v.useRef(g),oe=p!=null,se=dd(p),Ne=dd(s),we=dd(m),he=v.useCallback(()=>{if(!A.current||!X.current)return;const q={placement:a,strategy:l,middleware:S};Ne.current&&(q.platform=Ne.current),RN(A.current,X.current,q).then(pe=>{const N={...pe,isPositioned:we.current!==!1};de.current&&!hu(ne.current,N)&&(ne.current=N,Su.flushSync(()=>{x(N)}))})},[S,a,l,Ne,we]);nu(()=>{m===!1&&ne.current.isPositioned&&(ne.current.isPositioned=!1,x(q=>({...q,isPositioned:!1})))},[m]);const de=v.useRef(!1);nu(()=>(de.current=!0,()=>{de.current=!1}),[]),nu(()=>{if($&&(A.current=$),P&&(X.current=P),$&&P){if(se.current)return se.current($,P,he);he()}},[$,P,he,se,oe]);const ce=v.useMemo(()=>({reference:A,floating:X,setReference:z,setFloating:U}),[z,U]),_=v.useMemo(()=>({reference:$,floating:P}),[$,P]),ee=v.useMemo(()=>{const q={position:l,left:0,top:0};if(!_.floating)return q;const pe=Ry(_.floating,g.x),N=Ry(_.floating,g.y);return h?{...q,transform:"translate("+pe+"px, "+N+"px)",...Kb(_.floating)>=1.5&&{willChange:"transform"}}:{position:l,left:pe,top:N}},[l,h,_.floating,g.x,g.y]);return v.useMemo(()=>({...g,update:he,refs:ce,elements:_,floatingStyles:ee}),[g,he,ce,_,ee])}const NN=n=>{function a(l){return{}.hasOwnProperty.call(l,"current")}return{name:"arrow",options:n,fn(l){const{element:i,padding:s}=typeof n=="function"?n(l):n;return i&&a(i)?i.current!=null?Ey({element:i.current,padding:s}).fn(l):{}:i?Ey({element:i,padding:s}).fn(l):{}}}},TN=(n,a)=>({...yN(n),options:[n,a]}),jN=(n,a)=>({...bN(n),options:[n,a]}),MN=(n,a)=>({...EN(n),options:[n,a]}),_N=(n,a)=>({...xN(n),options:[n,a]}),DN=(n,a)=>({...SN(n),options:[n,a]}),LN=(n,a)=>({...wN(n),options:[n,a]}),zN=(n,a)=>({...NN(n),options:[n,a]});var kN="Arrow",Fb=v.forwardRef((n,a)=>{const{children:l,width:i=10,height:s=5,...u}=n;return y.jsx(it.svg,{...u,ref:a,width:i,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?l:y.jsx("polygon",{points:"0,0 30,0 15,10"})})});Fb.displayName=kN;var UN=Fb,hh="Popper",[Xb,Qb]=wu(hh),[PN,Zb]=Xb(hh),Jb=n=>{const{__scopePopper:a,children:l}=n,[i,s]=v.useState(null);return y.jsx(PN,{scope:a,anchor:i,onAnchorChange:s,children:l})};Jb.displayName=hh;var Ib="PopperAnchor",Wb=v.forwardRef((n,a)=>{const{__scopePopper:l,virtualRef:i,...s}=n,u=Zb(Ib,l),f=v.useRef(null),h=sn(a,f);return v.useEffect(()=>{u.onAnchorChange(i?.current||f.current)}),i?null:y.jsx(it.div,{...s,ref:h})});Wb.displayName=Ib;var mh="PopperContent",[HN,BN]=Xb(mh),ex=v.forwardRef((n,a)=>{const{__scopePopper:l,side:i="bottom",sideOffset:s=0,align:u="center",alignOffset:f=0,arrowPadding:h=0,avoidCollisions:p=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:x="partial",hideWhenDetached:S=!1,updatePositionStrategy:w="optimized",onPlaced:C,...R}=n,T=Zb(mh,l),[O,z]=v.useState(null),U=sn(a,I=>z(I)),[$,P]=v.useState(null),A=cb($),X=A?.width??0,ne=A?.height??0,oe=i+(u!=="center"?"-"+u:""),se=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},Ne=Array.isArray(m)?m:[m],we=Ne.length>0,he={padding:se,boundary:Ne.filter(VN),altBoundary:we},{refs:de,floatingStyles:ce,placement:_,isPositioned:ee,middlewareData:q}=AN({strategy:"fixed",placement:oe,whileElementsMounted:(...I)=>vN(...I,{animationFrame:w==="always"}),elements:{reference:T.anchor},middleware:[TN({mainAxis:s+ne,alignmentAxis:f}),p&&jN({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?MN():void 0,...he}),p&&_N({...he}),DN({...he,apply:({elements:I,rects:te,availableWidth:fe,availableHeight:me})=>{const{width:Ce,height:Ye}=te.reference,Nt=I.floating.style;Nt.setProperty("--radix-popper-available-width",`${fe}px`),Nt.setProperty("--radix-popper-available-height",`${me}px`),Nt.setProperty("--radix-popper-anchor-width",`${Ce}px`),Nt.setProperty("--radix-popper-anchor-height",`${Ye}px`)}}),$&&zN({element:$,padding:h}),YN({arrowWidth:X,arrowHeight:ne}),S&&LN({strategy:"referenceHidden",...he})]}),[pe,N]=ax(_),K=Ul(C);Ia(()=>{ee&&K?.()},[ee,K]);const L=q.arrow?.x,F=q.arrow?.y,W=q.arrow?.centerOffset!==0,[k,B]=v.useState();return Ia(()=>{O&&B(window.getComputedStyle(O).zIndex)},[O]),y.jsx("div",{ref:de.setFloating,"data-radix-popper-content-wrapper":"",style:{...ce,transform:ee?ce.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:k,"--radix-popper-transform-origin":[q.transformOrigin?.x,q.transformOrigin?.y].join(" "),...q.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:y.jsx(HN,{scope:l,placedSide:pe,onArrowChange:P,arrowX:L,arrowY:F,shouldHideArrow:W,children:y.jsx(it.div,{"data-side":pe,"data-align":N,...R,ref:U,style:{...R.style,animation:ee?void 0:"none"}})})})});ex.displayName=mh;var tx="PopperArrow",$N={top:"bottom",right:"left",bottom:"top",left:"right"},nx=v.forwardRef(function(a,l){const{__scopePopper:i,...s}=a,u=BN(tx,i),f=$N[u.placedSide];return y.jsx("span",{ref:u.onArrowChange,style:{position:"absolute",left:u.arrowX,top:u.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[u.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[u.placedSide],visibility:u.shouldHideArrow?"hidden":void 0},children:y.jsx(UN,{...s,ref:l,style:{...s.style,display:"block"}})})});nx.displayName=tx;function VN(n){return n!==null}var YN=n=>({name:"transformOrigin",options:n,fn(a){const{placement:l,rects:i,middlewareData:s}=a,f=s.arrow?.centerOffset!==0,h=f?0:n.arrowWidth,p=f?0:n.arrowHeight,[m,g]=ax(l),x={start:"0%",center:"50%",end:"100%"}[g],S=(s.arrow?.x??0)+h/2,w=(s.arrow?.y??0)+p/2;let C="",R="";return m==="bottom"?(C=f?x:`${S}px`,R=`${-p}px`):m==="top"?(C=f?x:`${S}px`,R=`${i.floating.height+p}px`):m==="right"?(C=`${-p}px`,R=f?x:`${w}px`):m==="left"&&(C=`${i.floating.width+p}px`,R=f?x:`${w}px`),{data:{x:C,y:R}}}});function ax(n){const[a,l="center"]=n.split("-");return[a,l]}var qN=Jb,rx=Wb,GN=ex,KN=nx,Mu="Popover",[lx,Oj]=wu(Mu,[Qb]),yo=Qb(),[FN,ar]=lx(Mu),ix=n=>{const{__scopePopover:a,children:l,open:i,defaultOpen:s,onOpenChange:u,modal:f=!1}=n,h=yo(a),p=v.useRef(null),[m,g]=v.useState(!1),[x,S]=Kd({prop:i,defaultProp:s??!1,onChange:u,caller:Mu});return y.jsx(qN,{...h,children:y.jsx(FN,{scope:a,contentId:Vn(),triggerRef:p,open:x,onOpenChange:S,onOpenToggle:v.useCallback(()=>S(w=>!w),[S]),hasCustomAnchor:m,onCustomAnchorAdd:v.useCallback(()=>g(!0),[]),onCustomAnchorRemove:v.useCallback(()=>g(!1),[]),modal:f,children:l})})};ix.displayName=Mu;var ox="PopoverAnchor",XN=v.forwardRef((n,a)=>{const{__scopePopover:l,...i}=n,s=ar(ox,l),u=yo(l),{onCustomAnchorAdd:f,onCustomAnchorRemove:h}=s;return v.useEffect(()=>(f(),()=>h()),[f,h]),y.jsx(rx,{...u,...i,ref:a})});XN.displayName=ox;var sx="PopoverTrigger",ux=v.forwardRef((n,a)=>{const{__scopePopover:l,...i}=n,s=ar(sx,l),u=yo(l),f=sn(a,s.triggerRef),h=y.jsx(it.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":mx(s.open),...i,ref:f,onClick:Gt(n.onClick,s.onOpenToggle)});return s.hasCustomAnchor?h:y.jsx(rx,{asChild:!0,...u,children:h})});ux.displayName=sx;var ph="PopoverPortal",[QN,ZN]=lx(ph,{forceMount:void 0}),cx=n=>{const{__scopePopover:a,forceMount:l,children:i,container:s}=n,u=ar(ph,a);return y.jsx(QN,{scope:a,forceMount:l,children:y.jsx(ql,{present:l||u.open,children:y.jsx(Qd,{asChild:!0,container:s,children:i})})})};cx.displayName=ph;var Vl="PopoverContent",fx=v.forwardRef((n,a)=>{const l=ZN(Vl,n.__scopePopover),{forceMount:i=l.forceMount,...s}=n,u=ar(Vl,n.__scopePopover);return y.jsx(ql,{present:i||u.open,children:u.modal?y.jsx(IN,{...s,ref:a}):y.jsx(WN,{...s,ref:a})})});fx.displayName=Vl;var JN=Eu("PopoverContent.RemoveScroll"),IN=v.forwardRef((n,a)=>{const l=ar(Vl,n.__scopePopover),i=v.useRef(null),s=sn(a,i),u=v.useRef(!1);return v.useEffect(()=>{const f=i.current;if(f)return R0(f)},[]),y.jsx(Zd,{as:JN,allowPinchZoom:!0,children:y.jsx(dx,{...n,ref:s,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Gt(n.onCloseAutoFocus,f=>{f.preventDefault(),u.current||l.triggerRef.current?.focus()}),onPointerDownOutside:Gt(n.onPointerDownOutside,f=>{const h=f.detail.originalEvent,p=h.button===0&&h.ctrlKey===!0,m=h.button===2||p;u.current=m},{checkForDefaultPrevented:!1}),onFocusOutside:Gt(n.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1})})})}),WN=v.forwardRef((n,a)=>{const l=ar(Vl,n.__scopePopover),i=v.useRef(!1),s=v.useRef(!1);return y.jsx(dx,{...n,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{n.onCloseAutoFocus?.(u),u.defaultPrevented||(i.current||l.triggerRef.current?.focus(),u.preventDefault()),i.current=!1,s.current=!1},onInteractOutside:u=>{n.onInteractOutside?.(u),u.defaultPrevented||(i.current=!0,u.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const f=u.target;l.triggerRef.current?.contains(f)&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&s.current&&u.preventDefault()}})}),dx=v.forwardRef((n,a)=>{const{__scopePopover:l,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:u,disableOutsidePointerEvents:f,onEscapeKeyDown:h,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:g,...x}=n,S=ar(Vl,l),w=yo(l);return p0(),y.jsx(Xd,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:u,children:y.jsx(Fd,{asChild:!0,disableOutsidePointerEvents:f,onInteractOutside:g,onEscapeKeyDown:h,onPointerDownOutside:p,onFocusOutside:m,onDismiss:()=>S.onOpenChange(!1),children:y.jsx(GN,{"data-state":mx(S.open),role:"dialog",id:S.contentId,...w,...x,ref:a,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),hx="PopoverClose",eT=v.forwardRef((n,a)=>{const{__scopePopover:l,...i}=n,s=ar(hx,l);return y.jsx(it.button,{type:"button",...i,ref:a,onClick:Gt(n.onClick,()=>s.onOpenChange(!1))})});eT.displayName=hx;var tT="PopoverArrow",nT=v.forwardRef((n,a)=>{const{__scopePopover:l,...i}=n,s=yo(l);return y.jsx(KN,{...s,...i,ref:a})});nT.displayName=tT;function mx(n){return n?"open":"closed"}var aT=ix,rT=ux,lT=cx,iT=fx;function gh({...n}){return y.jsx(aT,{"data-slot":"popover",...n})}function vh({...n}){return y.jsx(rT,{"data-slot":"popover-trigger",...n})}function yh({className:n,align:a="center",sideOffset:l=4,...i}){return y.jsx(lT,{children:y.jsx(iT,{"data-slot":"popover-content",align:a,sideOffset:l,className:lt("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden animate-fade-in",n),...i})})}function Qa({options:n,value:a,onChange:l,placeholder:i="Select an option...",searchPlaceholder:s="Search...",emptyPlaceholder:u="No options found."}){const[f,h]=v.useState(!1),p=n.find(m=>m.value===a);return y.jsxs(gh,{open:f,onOpenChange:h,children:[y.jsx(vh,{asChild:!0,children:y.jsxs(ke,{variant:"outline",role:"combobox","aria-expanded":f,className:"w-full justify-between transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:[p?p.label:i,y.jsx(K0,{className:"ml-2 h-4 w-4 shrink-0 opacity-50 transition-transform duration-200 group-data-[state=open]:rotate-180"})]})}),y.jsx(yh,{className:"w-[--radix-popover-trigger-width] p-0 animate-fade-in",children:y.jsxs(jb,{children:[y.jsx(Mb,{placeholder:s}),y.jsxs(_b,{children:[y.jsx(Db,{children:u}),y.jsx(Lb,{children:n.map(m=>y.jsxs(zb,{value:m.value,onSelect:g=>{l(g===a?"":g),h(!1)},className:"transition-all-ease hover:bg-accent hover:text-accent-foreground",children:[y.jsx(G0,{className:lt("mr-2 h-4 w-4 transition-opacity",a===m.value?"opacity-100":"opacity-0")}),m.label]},m.value))})]})]})})]})}const oT=v.forwardRef(({options:n,value:a,onChange:l,onEnter:i,searchPlaceholder:s="Search...",emptyPlaceholder:u="No options found.",inputPlaceholder:f="Type or select..."},h)=>{const[p,m]=v.useState(!1),[g,x]=v.useState(a||""),S=v.useRef(null);v.useImperativeHandle(h,()=>S.current),v.useEffect(()=>{x(a||"")},[a]);const w=O=>{const z=O.target.value;x(z),l(z)},C=O=>{O.key==="Enter"&&g.trim()&&i&&(i(g.trim()),x(""))},R=O=>{x(O),l(O),i&&(i(O),x("")),m(!1)},T=()=>g;return v.useImperativeHandle(h,()=>({...S.current,value:g,getCurrentValue:T,clearInput:()=>{x(""),l("")}})),y.jsxs("div",{className:"relative",children:[y.jsx(yt,{ref:S,value:g,onChange:w,onKeyDown:C,placeholder:f,className:"pr-10"}),y.jsxs(gh,{open:p,onOpenChange:m,children:[y.jsx(vh,{asChild:!0,children:y.jsx(ke,{variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",children:y.jsx(K0,{className:"h-4 w-4 opacity-50"})})}),y.jsx(yh,{className:"w-[--radix-popover-trigger-width] p-0 animate-fade-in",children:y.jsxs(jb,{children:[y.jsx(Mb,{placeholder:s}),y.jsxs(_b,{children:[y.jsx(Db,{children:u}),y.jsx(Lb,{children:n.map(O=>y.jsxs(zb,{value:O.value,onSelect:()=>R(O.value),className:"transition-all-ease hover:bg-accent hover:text-accent-foreground",children:[y.jsx(G0,{className:lt("mr-2 h-4 w-4 transition-opacity",a===O.value?"opacity-100":"opacity-0")}),O.label]},O.value))})]})]})})]})]})});function sT(){const{t:n}=Ur(),{config:a,setConfig:l}=Fl(),[i,s]=v.useState(null),[u,f]=v.useState(null),[h,p]=v.useState({}),[m,g]=v.useState({}),[x,S]=v.useState({}),[w,C]=v.useState([]),[R,T]=v.useState(null),[O,z]=v.useState(!1),[U,$]=v.useState([]),P=v.useRef(null);if(v.useEffect(()=>{(async()=>{try{const B=await fetch("https://pub-0dc3e1677e894f07bbea11b17a29e032.r2.dev/providers.json");if(B.ok){const I=await B.json();$(I||[])}else console.error("Failed to fetch provider templates")}catch(B){console.error("Failed to fetch provider templates:",B)}})()},[]),v.useEffect(()=>{(async()=>{try{const B=await ln.get("/transformers");C(B.transformers)}catch(B){console.error("Failed to fetch transformers:",B)}})()},[]),!a)return y.jsxs(ha,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[y.jsx(ma,{className:"flex flex-row items-center justify-between border-b p-4",children:y.jsx(pa,{className:"text-lg",children:n("providers.title")})}),y.jsx(ga,{className:"flex-grow flex items-center justify-center p-4",children:y.jsx("div",{className:"text-gray-500",children:"Loading providers configuration..."})})]});const A=Array.isArray(a.Providers)?a.Providers:[],X=()=>{const k={name:"",api_base_url:"",api_key:"",models:[]};s(a.Providers.length),T(k),z(!0)},ne=k=>{const B=a.Providers[k];s(k),T(JSON.parse(JSON.stringify(B))),z(!1)},oe=()=>{if(i!==null&&R){const k=[...a.Providers];O?k.push(R):k[i]=R,l({...a,Providers:k})}s(null),T(null),z(!1)},se=()=>{i!==null&&p(k=>{const B={...k};return delete B[i],B}),s(null),T(null),z(!1)},Ne=k=>{const B=[...a.Providers];B.splice(k,1),l({...a,Providers:B}),f(null)},we=(k,B,I)=>{if(R){const te={...R,[B]:I};T(te)}},he=(k,B)=>{if(!B||!R)return;const I={...R};I.transformer||(I.transformer={use:[]}),I.transformer.use=[...I.transformer.use,B],T(I)},de=(k,B)=>{if(!R)return;const I={...R};if(I.transformer){const te=[...I.transformer.use];te.splice(B,1),I.transformer.use=te,te.length===0&&Object.keys(I.transformer).length===1&&delete I.transformer}T(I)},ce=(k,B,I)=>{if(!I||!R)return;const te={...R};te.transformer||(te.transformer={use:[]}),te.transformer[B]||(te.transformer[B]={use:[]}),te.transformer[B].use=[...te.transformer[B].use,I],T(te)},_=(k,B,I)=>{if(!R)return;const te={...R};if(te.transformer&&te.transformer[B]){const fe=[...te.transformer[B].use];fe.splice(I,1),te.transformer[B].use=fe,fe.length===0&&Object.keys(te.transformer[B]).length===1&&delete te.transformer[B]}T(te)},ee=(k,B,I,te)=>{if(!R)return;const fe={...R};if(fe.transformer||(fe.transformer={use:[]}),fe.transformer.use&&fe.transformer.use.length>B){const me=fe.transformer.use[B];if(Array.isArray(me)){const Ce=[...me];if(Ce.length>1&&typeof Ce[1]=="object"&&Ce[1]!==null){const Nt={...Ce[1],[I]:te};Ce[1]=Nt}else if(Ce.length>1){const Ye={[I]:te};Ce.splice(1,Ce.length-1,Ye)}else{const Ye={[I]:te};Ce.push(Ye)}fe.transformer.use[B]=Ce}else{const Ce={[I]:te};fe.transformer.use[B]=[me,Ce]}}T(fe)},q=(k,B,I)=>{if(!R)return;const te={...R};if(!te.transformer?.use||te.transformer.use.length<=B)return;const fe=te.transformer.use[B];if(Array.isArray(fe)&&fe.length>1){const me=[...fe];if(typeof me[1]=="object"&&me[1]!==null){const Ce={...me[1]};delete Ce[I],Object.keys(Ce).length===0?me.splice(1,1):me[1]=Ce,te.transformer.use[B]=me,T(te)}}},pe=(k,B,I,te,fe)=>{if(!R)return;const me={...R};if(me.transformer||(me.transformer={use:[]}),me.transformer[B]||(me.transformer[B]={use:[]}),me.transformer[B].use&&me.transformer[B].use.length>I){const Ce=me.transformer[B].use[I];if(Array.isArray(Ce)){const Ye=[...Ce];if(Ye.length>1&&typeof Ye[1]=="object"&&Ye[1]!==null){const Kt={...Ye[1],[te]:fe};Ye[1]=Kt}else if(Ye.length>1){const Nt={[te]:fe};Ye.splice(1,Ye.length-1,Nt)}else{const Nt={[te]:fe};Ye.push(Nt)}me.transformer[B].use[I]=Ye}else{const Ye={[te]:fe};me.transformer[B].use[I]=[Ce,Ye]}}T(me)},N=(k,B,I,te)=>{if(!R)return;const fe={...R};if(!fe.transformer?.[B]?.use||fe.transformer[B].use.length<=I)return;const me=fe.transformer[B].use[I];if(Array.isArray(me)&&me.length>1){const Ce=[...me];if(typeof Ce[1]=="object"&&Ce[1]!==null){const Ye={...Ce[1]};delete Ye[te],Object.keys(Ye).length===0?Ce.splice(1,1):Ce[1]=Ye,fe.transformer[B].use[I]=Ce,T(fe)}}},K=(k,B)=>{if(!B.trim()||!R)return;const I={...R},te=Array.isArray(I.models)?[...I.models]:[];te.includes(B.trim())||(te.push(B.trim()),I.models=te,T(I))},L=k=>{if(k)try{const B=JSON.parse(k);if(B){const I=R?.name,te=JSON.parse(JSON.stringify(B));!O&&I&&(te.name=I),T(te)}}catch(B){console.error("Failed to parse template",B)}},F=(k,B)=>{if(!R)return;const I={...R},te=Array.isArray(I.models)?[...I.models]:[];B>=0&&B<te.length&&(te.splice(B,1),I.models=te,T(I))},W=R||(i!==null?A[i]:null);return y.jsxs(ha,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[y.jsxs(ma,{className:"flex flex-row items-center justify-between border-b p-4",children:[y.jsxs(pa,{className:"text-lg",children:[n("providers.title")," ",y.jsxs("span",{className:"text-sm font-normal text-gray-500",children:["(",A.length,")"]})]}),y.jsx(ke,{onClick:X,children:n("providers.add")})]}),y.jsx(ga,{className:"flex-grow overflow-y-auto p-4",children:y.jsx(tA,{providers:A,onEdit:ne,onRemove:f})}),y.jsx(so,{open:i!==null,onOpenChange:k=>{k||se()},children:y.jsxs(Pl,{className:"max-h-[80vh] flex flex-col sm:max-w-2xl",children:[y.jsx(Hl,{children:y.jsx(Bl,{children:n("providers.edit")})}),W&&i!==null&&y.jsxs("div",{className:"space-y-4 p-4 overflow-y-auto flex-grow",children:[U.length>0&&y.jsxs("div",{className:"space-y-2",children:[y.jsx(rt,{children:n("providers.import_from_template")}),y.jsx(Qa,{options:U.map(k=>({label:k.name,value:JSON.stringify(k)})),value:"",onChange:L,placeholder:n("providers.select_template"),emptyPlaceholder:n("providers.no_templates_found")})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(rt,{htmlFor:"name",children:n("providers.name")}),y.jsx(yt,{id:"name",value:W.name||"",onChange:k=>we(i,"name",k.target.value)})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(rt,{htmlFor:"api_base_url",children:n("providers.api_base_url")}),y.jsx(yt,{id:"api_base_url",value:W.api_base_url||"",onChange:k=>we(i,"api_base_url",k.target.value)})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(rt,{htmlFor:"api_key",children:n("providers.api_key")}),y.jsx(yt,{id:"api_key",type:"password",value:W.api_key||"",onChange:k=>we(i,"api_key",k.target.value)})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(rt,{htmlFor:"models",children:n("providers.models")}),y.jsxs("div",{className:"space-y-2",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx("div",{className:"flex-1",children:h[i]?y.jsx(oT,{ref:P,options:(W.models||[]).map(k=>({label:k,value:k})),value:"",onChange:()=>{},onEnter:k=>{i!==null&&K(i,k)},inputPlaceholder:n("providers.models_placeholder")}):y.jsx(yt,{id:"models",placeholder:n("providers.models_placeholder"),onKeyDown:k=>{k.key==="Enter"&&k.currentTarget.value.trim()&&i!==null&&(K(i,k.currentTarget.value),k.currentTarget.value="")}})}),y.jsx(ke,{onClick:()=>{if(h[i]&&P.current){const k=P.current,B=k.getCurrentValue();B&&B.trim()&&i!==null&&(K(i,B.trim()),k.clearInput())}else{const k=document.getElementById("models");k&&k.value.trim()&&i!==null&&(K(i,k.value),k.value="")}},children:n("providers.add_model")})]}),y.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:(W.models||[]).map((k,B)=>y.jsxs(Sb,{variant:"outline",className:"font-normal flex items-center gap-1",children:[k,y.jsx("button",{type:"button",className:"ml-1 rounded-full hover:bg-gray-200",onClick:()=>i!==null&&F(i,B),children:y.jsx(zl,{className:"h-3 w-3"})})]},B))})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(rt,{children:n("providers.provider_transformer")}),y.jsx("div",{className:"flex gap-2",children:y.jsx(Qa,{options:w.map(k=>({label:k.name,value:k.name})),value:"",onChange:k=>{i!==null&&he(i,k)},placeholder:n("providers.select_transformer"),emptyPlaceholder:n("providers.no_transformers")})}),W.transformer?.use&&W.transformer.use.length>0&&y.jsxs("div",{className:"space-y-2 mt-2",children:[y.jsx("div",{className:"text-sm font-medium text-gray-700",children:n("providers.selected_transformers")}),W.transformer.use.map((k,B)=>y.jsxs("div",{className:"border rounded-md p-3",children:[y.jsxs("div",{className:"flex gap-2 items-center mb-2",children:[y.jsx("div",{className:"flex-1 bg-gray-50 rounded p-2 text-sm",children:typeof k=="string"?k:Array.isArray(k)?String(k[0]):String(k)}),y.jsx(ke,{variant:"outline",size:"icon",onClick:()=>{i!==null&&de(i,B)},children:y.jsx(Lr,{className:"h-4 w-4"})})]}),y.jsxs("div",{className:"mt-2 pl-4 border-l-2 border-gray-200",children:[y.jsx(rt,{className:"text-sm",children:n("providers.transformer_parameters")}),y.jsxs("div",{className:"space-y-2 mt-1",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx(yt,{placeholder:n("providers.parameter_name"),value:m[`provider-${i}-transformer-${B}`]?.name||"",onChange:I=>{const te=`provider-${i}-transformer-${B}`;g(fe=>({...fe,[te]:{...fe[te]||{name:"",value:""},name:I.target.value}}))}}),y.jsx(yt,{placeholder:n("providers.parameter_value"),value:m[`provider-${i}-transformer-${B}`]?.value||"",onChange:I=>{const te=`provider-${i}-transformer-${B}`;g(fe=>({...fe,[te]:{...fe[te]||{name:"",value:""},value:I.target.value}}))}}),y.jsx(ke,{size:"sm",onClick:()=>{if(i!==null){const I=`provider-${i}-transformer-${B}`,te=m[I];te&&te.name&&te.value&&(ee(i,B,te.name,te.value),g(fe=>({...fe,[I]:{name:"",value:""}})))}},children:y.jsx(Nd,{className:"h-4 w-4"})})]}),(()=>{if(!W.transformer?.use||W.transformer.use.length<=B)return null;const I=W.transformer.use[B];let te={};return Array.isArray(I)&&I.length>1&&typeof I[1]=="object"&&I[1]!==null&&(te=I[1]),Object.keys(te).length>0?y.jsx("div",{className:"space-y-1",children:Object.entries(te).map(([fe,me])=>y.jsxs("div",{className:"flex items-center justify-between bg-gray-50 rounded p-2",children:[y.jsxs("div",{className:"text-sm",children:[y.jsxs("span",{className:"font-medium",children:[fe,":"]})," ",String(me)]}),y.jsx(ke,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>{i!==null&&q(i,B,fe)},children:y.jsx(zl,{className:"h-3 w-3"})})]},fe))}):null})()]})]})]},B))]})]}),W.models&&W.models.length>0&&y.jsxs("div",{className:"space-y-2",children:[y.jsx(rt,{children:n("providers.model_transformers")}),y.jsx("div",{className:"space-y-3",children:(W.models||[]).map((k,B)=>y.jsxs("div",{className:"border rounded-md p-3",children:[y.jsx("div",{className:"font-medium text-sm mb-2",children:k}),y.jsx("div",{className:"flex gap-2",children:y.jsx("div",{className:"flex-1 flex gap-2",children:y.jsx(Qa,{options:w.map(I=>({label:I.name,value:I.name})),value:"",onChange:I=>{i!==null&&ce(i,k,I)},placeholder:n("providers.select_transformer"),emptyPlaceholder:n("providers.no_transformers")})})}),W.transformer?.[k]?.use&&W.transformer[k].use.length>0&&y.jsxs("div",{className:"space-y-2 mt-2",children:[y.jsx("div",{className:"text-sm font-medium text-gray-700",children:n("providers.selected_transformers")}),W.transformer[k].use.map((I,te)=>y.jsxs("div",{className:"border rounded-md p-3",children:[y.jsxs("div",{className:"flex gap-2 items-center mb-2",children:[y.jsx("div",{className:"flex-1 bg-gray-50 rounded p-2 text-sm",children:typeof I=="string"?I:Array.isArray(I)?String(I[0]):String(I)}),y.jsx(ke,{variant:"outline",size:"icon",onClick:()=>{i!==null&&_(i,k,te)},children:y.jsx(Lr,{className:"h-4 w-4"})})]}),y.jsxs("div",{className:"mt-2 pl-4 border-l-2 border-gray-200",children:[y.jsx(rt,{className:"text-sm",children:n("providers.transformer_parameters")}),y.jsxs("div",{className:"space-y-2 mt-1",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx(yt,{placeholder:n("providers.parameter_name"),value:x[`model-${i}-${k}-transformer-${te}`]?.name||"",onChange:fe=>{const me=`model-${i}-${k}-transformer-${te}`;S(Ce=>({...Ce,[me]:{...Ce[me]||{name:"",value:""},name:fe.target.value}}))}}),y.jsx(yt,{placeholder:n("providers.parameter_value"),value:x[`model-${i}-${k}-transformer-${te}`]?.value||"",onChange:fe=>{const me=`model-${i}-${k}-transformer-${te}`;S(Ce=>({...Ce,[me]:{...Ce[me]||{name:"",value:""},value:fe.target.value}}))}}),y.jsx(ke,{size:"sm",onClick:()=>{if(i!==null){const fe=`model-${i}-${k}-transformer-${te}`,me=x[fe];me&&me.name&&me.value&&(pe(i,k,te,me.name,me.value),S(Ce=>({...Ce,[fe]:{name:"",value:""}})))}},children:y.jsx(Nd,{className:"h-4 w-4"})})]}),(()=>{if(!W.transformer?.[k]?.use||W.transformer[k].use.length<=te)return null;const fe=W.transformer[k].use[te];let me={};return Array.isArray(fe)&&fe.length>1&&typeof fe[1]=="object"&&fe[1]!==null&&(me=fe[1]),Object.keys(me).length>0?y.jsx("div",{className:"space-y-1",children:Object.entries(me).map(([Ce,Ye])=>y.jsxs("div",{className:"flex items-center justify-between bg-gray-50 rounded p-2",children:[y.jsxs("div",{className:"text-sm",children:[y.jsxs("span",{className:"font-medium",children:[Ce,":"]})," ",String(Ye)]}),y.jsx(ke,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>{i!==null&&N(i,k,te,Ce)},children:y.jsx(zl,{className:"h-3 w-3"})})]},Ce))}):null})()]})]})]},te))]})]},B))})]})]}),y.jsx("div",{className:"space-y-3 mt-auto",children:y.jsx("div",{className:"flex justify-end gap-2",children:y.jsx(ke,{onClick:oe,children:n("app.save")})})})]})}),y.jsx(so,{open:u!==null,onOpenChange:()=>f(null),children:y.jsxs(Pl,{children:[y.jsxs(Hl,{children:[y.jsx(Bl,{children:n("providers.delete")}),y.jsx(ah,{children:n("providers.delete_provider_confirm")})]}),y.jsxs(uo,{children:[y.jsx(ke,{variant:"outline",onClick:()=>f(null),children:n("providers.cancel")}),y.jsx(ke,{variant:"destructive",onClick:()=>u!==null&&Ne(u),children:n("providers.delete")})]})]})})]})}function uT(){const{t:n}=Ur(),{config:a,setConfig:l}=Fl();if(!a)return y.jsxs(ha,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[y.jsx(ma,{className:"border-b p-4",children:y.jsx(pa,{className:"text-lg",children:n("router.title")})}),y.jsx(ga,{className:"flex-grow flex items-center justify-center p-4",children:y.jsx("div",{className:"text-gray-500",children:"Loading router configuration..."})})]});const i=a.Router||{default:"",background:"",think:"",longContext:"",longContextThreshold:6e4,webSearch:""},s=(h,p)=>{const g={...a.Router||{},[h]:p};l({...a,Router:g})},f=(Array.isArray(a.Providers)?a.Providers:[]).flatMap(h=>{if(!h)return[];const p=Array.isArray(h.models)?h.models:[],m=h.name||"Unknown Provider";return p.map(g=>({value:`${m},${g||"Unknown Model"}`,label:`${m}, ${g||"Unknown Model"}`}))});return y.jsxs(ha,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[y.jsx(ma,{className:"border-b p-4",children:y.jsx(pa,{className:"text-lg",children:n("router.title")})}),y.jsxs(ga,{className:"flex-grow space-y-5 overflow-y-auto p-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(rt,{children:n("router.default")}),y.jsx(Qa,{options:f,value:i.default||"",onChange:h=>s("default",h),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(rt,{children:n("router.background")}),y.jsx(Qa,{options:f,value:i.background||"",onChange:h=>s("background",h),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(rt,{children:n("router.think")}),y.jsx(Qa,{options:f,value:i.think||"",onChange:h=>s("think",h),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),y.jsx("div",{className:"space-y-2",children:y.jsxs("div",{className:"flex items-center gap-4",children:[y.jsxs("div",{className:"flex-1",children:[y.jsx(rt,{children:n("router.longContext")}),y.jsx(Qa,{options:f,value:i.longContext||"",onChange:h=>s("longContext",h),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),y.jsxs("div",{className:"w-48",children:[y.jsx(rt,{children:n("router.longContextThreshold")}),y.jsx(yt,{type:"number",value:i.longContextThreshold||6e4,onChange:h=>s("longContextThreshold",parseInt(h.target.value)||6e4),placeholder:"60000"})]})]})}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(rt,{children:n("router.webSearch")}),y.jsx(Qa,{options:f,value:i.webSearch||"",onChange:h=>s("webSearch",h),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]})]})]})}function cT(n,a,l){return a in n?Object.defineProperty(n,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):n[a]=l,n}function Cy(n,a){var l=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);a&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),l.push.apply(l,i)}return l}function Oy(n){for(var a=1;a<arguments.length;a++){var l=arguments[a]!=null?arguments[a]:{};a%2?Cy(Object(l),!0).forEach(function(i){cT(n,i,l[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(l)):Cy(Object(l)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(l,i))})}return n}function fT(n,a){if(n==null)return{};var l={},i=Object.keys(n),s,u;for(u=0;u<i.length;u++)s=i[u],!(a.indexOf(s)>=0)&&(l[s]=n[s]);return l}function dT(n,a){if(n==null)return{};var l=fT(n,a),i,s;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(n);for(s=0;s<u.length;s++)i=u[s],!(a.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(n,i)&&(l[i]=n[i])}return l}function hT(n,a){return mT(n)||pT(n,a)||gT(n,a)||vT()}function mT(n){if(Array.isArray(n))return n}function pT(n,a){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(n)))){var l=[],i=!0,s=!1,u=void 0;try{for(var f=n[Symbol.iterator](),h;!(i=(h=f.next()).done)&&(l.push(h.value),!(a&&l.length===a));i=!0);}catch(p){s=!0,u=p}finally{try{!i&&f.return!=null&&f.return()}finally{if(s)throw u}}return l}}function gT(n,a){if(n){if(typeof n=="string")return Ay(n,a);var l=Object.prototype.toString.call(n).slice(8,-1);if(l==="Object"&&n.constructor&&(l=n.constructor.name),l==="Map"||l==="Set")return Array.from(n);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return Ay(n,a)}}function Ay(n,a){(a==null||a>n.length)&&(a=n.length);for(var l=0,i=new Array(a);l<a;l++)i[l]=n[l];return i}function vT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
207
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yT(n,a,l){return a in n?Object.defineProperty(n,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):n[a]=l,n}function Ny(n,a){var l=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);a&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),l.push.apply(l,i)}return l}function Ty(n){for(var a=1;a<arguments.length;a++){var l=arguments[a]!=null?arguments[a]:{};a%2?Ny(Object(l),!0).forEach(function(i){yT(n,i,l[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(l)):Ny(Object(l)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(l,i))})}return n}function bT(){for(var n=arguments.length,a=new Array(n),l=0;l<n;l++)a[l]=arguments[l];return function(i){return a.reduceRight(function(s,u){return u(s)},i)}}function to(n){return function a(){for(var l=this,i=arguments.length,s=new Array(i),u=0;u<i;u++)s[u]=arguments[u];return s.length>=n.length?n.apply(this,s):function(){for(var f=arguments.length,h=new Array(f),p=0;p<f;p++)h[p]=arguments[p];return a.apply(l,[].concat(s,h))}}}function mu(n){return{}.toString.call(n).includes("Object")}function xT(n){return!Object.keys(n).length}function ho(n){return typeof n=="function"}function ST(n,a){return Object.prototype.hasOwnProperty.call(n,a)}function wT(n,a){return mu(a)||Za("changeType"),Object.keys(a).some(function(l){return!ST(n,l)})&&Za("changeField"),a}function ET(n){ho(n)||Za("selectorType")}function RT(n){ho(n)||mu(n)||Za("handlerType"),mu(n)&&Object.values(n).some(function(a){return!ho(a)})&&Za("handlersType")}function CT(n){n||Za("initialIsRequired"),mu(n)||Za("initialType"),xT(n)&&Za("initialContent")}function OT(n,a){throw new Error(n[a]||n.default)}var AT={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},Za=to(OT)(AT),Xs={changes:wT,selector:ET,handler:RT,initial:CT};function NT(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Xs.initial(n),Xs.handler(a);var l={current:n},i=to(MT)(l,a),s=to(jT)(l),u=to(Xs.changes)(n),f=to(TT)(l);function h(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(g){return g};return Xs.selector(m),m(l.current)}function p(m){bT(i,s,u,f)(m)}return[h,p]}function TT(n,a){return ho(a)?a(n.current):a}function jT(n,a){return n.current=Ty(Ty({},n.current),a),a}function MT(n,a,l){return ho(a)?a(n.current):Object.keys(l).forEach(function(i){var s;return(s=a[i])===null||s===void 0?void 0:s.call(a,n.current[i])}),l}var _T={create:NT},DT={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}};function LT(n){return function a(){for(var l=this,i=arguments.length,s=new Array(i),u=0;u<i;u++)s[u]=arguments[u];return s.length>=n.length?n.apply(this,s):function(){for(var f=arguments.length,h=new Array(f),p=0;p<f;p++)h[p]=arguments[p];return a.apply(l,[].concat(s,h))}}}function zT(n){return{}.toString.call(n).includes("Object")}function kT(n){return n||jy("configIsRequired"),zT(n)||jy("configType"),n.urls?(UT(),{paths:{vs:n.urls.monacoBase}}):n}function UT(){console.warn(px.deprecation)}function PT(n,a){throw new Error(n[a]||n.default)}var px={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
208
208
  You are using deprecated way of configuration.
209
209
 
210
210
  Instead of using
@@ -213,7 +213,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
213
213
  monaco.config({ paths: { vs: '...' } })
214
214
 
215
215
  For more please check the link https://github.com/suren-atoyan/monaco-loader#config
216
- `},jy=LT(PT)(px),HT={config:kT},BT=function(){for(var a=arguments.length,l=new Array(a),i=0;i<a;i++)l[i]=arguments[i];return function(s){return l.reduceRight(function(u,f){return f(u)},s)}};function gx(n,a){return Object.keys(a).forEach(function(l){a[l]instanceof Object&&n[l]&&Object.assign(a[l],gx(n[l],a[l]))}),Oy(Oy({},n),a)}var $T={type:"cancelation",msg:"operation is manually canceled"};function hd(n){var a=!1,l=new Promise(function(i,s){n.then(function(u){return a?s($T):i(u)}),n.catch(s)});return l.cancel=function(){return a=!0},l}var VT=_T.create({config:DT,isInitialized:!1,resolve:null,reject:null,monaco:null}),vx=hT(VT,2),bo=vx[0],_u=vx[1];function YT(n){var a=HT.config(n),l=a.monaco,i=dT(a,["monaco"]);_u(function(s){return{config:gx(s.config,i),monaco:l}})}function qT(){var n=bo(function(a){var l=a.monaco,i=a.isInitialized,s=a.resolve;return{monaco:l,isInitialized:i,resolve:s}});if(!n.isInitialized){if(_u({isInitialized:!0}),n.monaco)return n.resolve(n.monaco),hd(md);if(window.monaco&&window.monaco.editor)return yx(window.monaco),n.resolve(window.monaco),hd(md);BT(GT,FT)(XT)}return hd(md)}function GT(n){return document.body.appendChild(n)}function KT(n){var a=document.createElement("script");return n&&(a.src=n),a}function FT(n){var a=bo(function(i){var s=i.config,u=i.reject;return{config:s,reject:u}}),l=KT("".concat(a.config.paths.vs,"/loader.js"));return l.onload=function(){return n()},l.onerror=a.reject,l}function XT(){var n=bo(function(l){var i=l.config,s=l.resolve,u=l.reject;return{config:i,resolve:s,reject:u}}),a=window.require;a.config(n.config),a(["vs/editor/editor.main"],function(l){yx(l),n.resolve(l)},function(l){n.reject(l)})}function yx(n){bo().monaco||_u({monaco:n})}function QT(){return bo(function(n){var a=n.monaco;return a})}var md=new Promise(function(n,a){return _u({resolve:n,reject:a})}),bx={config:YT,init:qT,__getMonacoInstance:QT},ZT={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},pd=ZT,JT={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},IT=JT;function WT({children:n}){return jr.createElement("div",{style:IT.container},n)}var ej=WT,tj=ej;function nj({width:n,height:a,isEditorReady:l,loading:i,_ref:s,className:u,wrapperProps:f}){return jr.createElement("section",{style:{...pd.wrapper,width:n,height:a},...f},!l&&jr.createElement(tj,null,i),jr.createElement("div",{ref:s,style:{...pd.fullWidth,...!l&&pd.hide},className:u}))}var aj=nj,xx=v.memo(aj);function rj(n){v.useEffect(n,[])}var Sx=rj;function lj(n,a,l=!0){let i=v.useRef(!0);v.useEffect(i.current||!l?()=>{i.current=!1}:n,a)}var tn=lj;function ao(){}function _l(n,a,l,i){return ij(n,i)||oj(n,a,l,i)}function ij(n,a){return n.editor.getModel(wx(n,a))}function oj(n,a,l,i){return n.editor.createModel(a,l,i?wx(n,i):void 0)}function wx(n,a){return n.Uri.parse(a)}function sj({original:n,modified:a,language:l,originalLanguage:i,modifiedLanguage:s,originalModelPath:u,modifiedModelPath:f,keepCurrentOriginalModel:h=!1,keepCurrentModifiedModel:p=!1,theme:m="light",loading:g="Loading...",options:x={},height:S="100%",width:w="100%",className:C,wrapperProps:R={},beforeMount:j=ao,onMount:A=ao}){let[k,P]=v.useState(!1),[Y,B]=v.useState(!0),N=v.useRef(null),X=v.useRef(null),ee=v.useRef(null),ie=v.useRef(A),oe=v.useRef(j),Oe=v.useRef(!1);Sx(()=>{let ue=bx.init();return ue.then(L=>(X.current=L)&&B(!1)).catch(L=>L?.type!=="cancelation"&&console.error("Monaco initialization: error:",L)),()=>N.current?fe():ue.cancel()}),tn(()=>{if(N.current&&X.current){let ue=N.current.getOriginalEditor(),L=_l(X.current,n||"",i||l||"text",u||"");L!==ue.getModel()&&ue.setModel(L)}},[u],k),tn(()=>{if(N.current&&X.current){let ue=N.current.getModifiedEditor(),L=_l(X.current,a||"",s||l||"text",f||"");L!==ue.getModel()&&ue.setModel(L)}},[f],k),tn(()=>{let ue=N.current.getModifiedEditor();ue.getOption(X.current.editor.EditorOption.readOnly)?ue.setValue(a||""):a!==ue.getValue()&&(ue.executeEdits("",[{range:ue.getModel().getFullModelRange(),text:a||"",forceMoveMarkers:!0}]),ue.pushUndoStop())},[a],k),tn(()=>{N.current?.getModel()?.original.setValue(n||"")},[n],k),tn(()=>{let{original:ue,modified:L}=N.current.getModel();X.current.editor.setModelLanguage(ue,i||l||"text"),X.current.editor.setModelLanguage(L,s||l||"text")},[l,i,s],k),tn(()=>{X.current?.editor.setTheme(m)},[m],k),tn(()=>{N.current?.updateOptions(x)},[x],k);let Se=v.useCallback(()=>{if(!X.current)return;oe.current(X.current);let ue=_l(X.current,n||"",i||l||"text",u||""),L=_l(X.current,a||"",s||l||"text",f||"");N.current?.setModel({original:ue,modified:L})},[l,a,s,n,i,u,f]),de=v.useCallback(()=>{!Oe.current&&ee.current&&(N.current=X.current.editor.createDiffEditor(ee.current,{automaticLayout:!0,...x}),Se(),X.current?.editor.setTheme(m),P(!0),Oe.current=!0)},[x,m,Se]);v.useEffect(()=>{k&&ie.current(N.current,X.current)},[k]),v.useEffect(()=>{!Y&&!k&&de()},[Y,k,de]);function fe(){let ue=N.current?.getModel();h||ue?.original?.dispose(),p||ue?.modified?.dispose(),N.current?.dispose()}return jr.createElement(xx,{width:w,height:S,isEditorReady:k,loading:g,_ref:ee,className:C,wrapperProps:R})}var uj=sj;v.memo(uj);function cj(n){let a=v.useRef();return v.useEffect(()=>{a.current=n},[n]),a.current}var fj=cj,Qs=new Map;function dj({defaultValue:n,defaultLanguage:a,defaultPath:l,value:i,language:s,path:u,theme:f="light",line:h,loading:p="Loading...",options:m={},overrideServices:g={},saveViewState:x=!0,keepCurrentModel:S=!1,width:w="100%",height:C="100%",className:R,wrapperProps:j={},beforeMount:A=ao,onMount:k=ao,onChange:P,onValidate:Y=ao}){let[B,N]=v.useState(!1),[X,ee]=v.useState(!0),ie=v.useRef(null),oe=v.useRef(null),Oe=v.useRef(null),Se=v.useRef(k),de=v.useRef(A),fe=v.useRef(),ue=v.useRef(i),L=fj(u),W=v.useRef(!1),K=v.useRef(!1);Sx(()=>{let $=bx.init();return $.then(O=>(ie.current=O)&&ee(!1)).catch(O=>O?.type!=="cancelation"&&console.error("Monaco initialization: error:",O)),()=>oe.current?T():$.cancel()}),tn(()=>{let $=_l(ie.current,n||i||"",a||s||"",u||l||"");$!==oe.current?.getModel()&&(x&&Qs.set(L,oe.current?.saveViewState()),oe.current?.setModel($),x&&oe.current?.restoreViewState(Qs.get(u)))},[u],B),tn(()=>{oe.current?.updateOptions(m)},[m],B),tn(()=>{!oe.current||i===void 0||(oe.current.getOption(ie.current.editor.EditorOption.readOnly)?oe.current.setValue(i):i!==oe.current.getValue()&&(K.current=!0,oe.current.executeEdits("",[{range:oe.current.getModel().getFullModelRange(),text:i,forceMoveMarkers:!0}]),oe.current.pushUndoStop(),K.current=!1))},[i],B),tn(()=>{let $=oe.current?.getModel();$&&s&&ie.current?.editor.setModelLanguage($,s)},[s],B),tn(()=>{h!==void 0&&oe.current?.revealLine(h)},[h],B),tn(()=>{ie.current?.editor.setTheme(f)},[f],B);let he=v.useCallback(()=>{if(!(!Oe.current||!ie.current)&&!W.current){de.current(ie.current);let $=u||l,O=_l(ie.current,i||n||"",a||s||"",$||"");oe.current=ie.current?.editor.create(Oe.current,{model:O,automaticLayout:!0,...m},g),x&&oe.current.restoreViewState(Qs.get($)),ie.current.editor.setTheme(f),h!==void 0&&oe.current.revealLine(h),N(!0),W.current=!0}},[n,a,l,i,s,u,m,g,x,f,h]);v.useEffect(()=>{B&&Se.current(oe.current,ie.current)},[B]),v.useEffect(()=>{!X&&!B&&he()},[X,B,he]),ue.current=i,v.useEffect(()=>{B&&P&&(fe.current?.dispose(),fe.current=oe.current?.onDidChangeModelContent($=>{K.current||P(oe.current.getValue(),$)}))},[B,P]),v.useEffect(()=>{if(B){let $=ie.current.editor.onDidChangeMarkers(O=>{let M=oe.current.getModel()?.uri;if(M&&O.find(U=>U.path===M.path)){let U=ie.current.editor.getModelMarkers({resource:M});Y?.(U)}});return()=>{$?.dispose()}}return()=>{}},[B,Y]);function T(){fe.current?.dispose(),S?x&&Qs.set(u,oe.current.saveViewState()):oe.current.getModel()?.dispose(),oe.current.dispose()}return jr.createElement(xx,{width:w,height:C,isEditorReady:B,loading:p,_ref:Oe,className:R,wrapperProps:j})}var hj=dj,mj=v.memo(hj),pj=mj;function gj({open:n,onOpenChange:a,showToast:l}){const{t:i}=Ur(),{config:s}=Fl(),[u,f]=v.useState(""),[h,p]=v.useState(!1),[m,g]=v.useState(!1),[x,S]=v.useState(!1),w=v.useRef(null);v.useEffect(()=>{s&&n&&f(JSON.stringify(s,null,2))},[s,n]),v.useEffect(()=>{if(n)g(!0),requestAnimationFrame(()=>{S(!0)});else{S(!1);const A=setTimeout(()=>{g(!1)},300);return()=>clearTimeout(A)}},[n]);const C=(A,k,P)=>{if(A&&typeof A=="object"&&"success"in A){const Y=A;return Y.success?(l&&l(Y.message||k,"success"),!0):(l&&l(Y.message||P,"error"),!1)}else return l&&l(k,"success"),!0},R=async()=>{if(u)try{p(!0);const A=JSON.parse(u),k=await an.updateConfig(A);C(k,i("app.config_saved_success"),i("app.config_saved_failed"))&&a(!1)}catch(A){console.error("Failed to save config:",A),l&&l(i("app.config_saved_failed")+": "+A.message,"error")}finally{p(!1)}},j=async()=>{if(u)try{p(!0);const A=JSON.parse(u),k=await an.updateConfig(A);if(C(k,i("app.config_saved_success"),i("app.config_saved_failed"))){const Y=await an.restartService();C(Y,i("app.config_saved_restart_success"),i("app.config_saved_restart_failed")),a(!1)}}catch(A){console.error("Failed to save config and restart:",A),l&&l(i("app.config_saved_restart_failed")+": "+A.message,"error")}finally{p(!1)}};return!m&&!n?null:y.jsxs(y.Fragment,{children:[(m||n)&&y.jsx("div",{className:`fixed inset-0 z-50 transition-all duration-300 ease-out ${x&&n?"bg-black/50 opacity-100":"bg-black/0 opacity-0 pointer-events-none"}`,onClick:()=>a(!1)}),y.jsxs("div",{ref:w,className:`fixed bottom-0 left-0 right-0 z-50 flex flex-col bg-white shadow-2xl transition-all duration-300 ease-out transform ${x&&n?"translate-y-0":"translate-y-full"}`,style:{height:"100vh",maxHeight:"100vh"},children:[y.jsxs("div",{className:"flex items-center justify-between border-b p-4",children:[y.jsx("h2",{className:"text-lg font-semibold",children:i("json_editor.title")}),y.jsxs("div",{className:"flex gap-2",children:[y.jsxs(Le,{variant:"outline",size:"sm",onClick:()=>a(!1),disabled:h,children:[y.jsx(zl,{className:"h-4 w-4 mr-2"}),i("json_editor.cancel")]}),y.jsxs(Le,{variant:"outline",size:"sm",onClick:R,disabled:h,children:[y.jsx(X0,{className:"h-4 w-4 mr-2"}),i(h?"json_editor.saving":"json_editor.save")]}),y.jsxs(Le,{variant:"default",size:"sm",onClick:j,disabled:h,children:[y.jsx(F0,{className:"h-4 w-4 mr-2"}),i(h?"json_editor.saving":"json_editor.save_and_restart")]})]})]}),y.jsx("div",{className:"flex-1 min-h-0 bg-gray-50",children:y.jsx(pj,{height:"100%",defaultLanguage:"json",value:u,onChange:A=>f(A||""),theme:"vs",options:{minimap:{enabled:!0},fontSize:14,scrollBeyondLastLine:!1,automaticLayout:!0,wordWrap:"on",formatOnPaste:!0,formatOnType:!0,suggest:{showKeywords:!0,showSnippets:!0}}})})]})]})}function vj({message:n,type:a,onClose:l}){v.useEffect(()=>{const u=setTimeout(()=>{l()},3e3);return()=>clearTimeout(u)},[l]);const i=()=>{switch(a){case"success":return y.jsx(V2,{className:"h-5 w-5 text-green-500"});case"error":return y.jsx(q2,{className:"h-5 w-5 text-red-500"});case"warning":return y.jsx(B2,{className:"h-5 w-5 text-yellow-500"});default:return null}},s=()=>{switch(a){case"success":return"bg-green-100 border-green-200";case"error":return"bg-red-100 border-red-200";case"warning":return"bg-yellow-100 border-yellow-200";default:return"bg-gray-100 border-gray-200"}};return y.jsxs("div",{className:`fixed top-4 right-4 z-50 flex items-center justify-between p-4 rounded-lg border shadow-lg ${s()} transition-all duration-300 ease-in-out`,children:[y.jsxs("div",{className:"flex items-center space-x-2",children:[i(),y.jsx("span",{className:"text-sm font-medium",children:n})]}),y.jsx("button",{onClick:l,className:"ml-4 text-gray-500 hover:text-gray-700 focus:outline-none",children:y.jsx(zl,{className:"h-4 w-4"})})]})}function yj(){const{t:n,i18n:a}=Ur(),l=bu(),{config:i,error:s}=Fl(),[u,f]=v.useState(!1),[h,p]=v.useState(!1),[m,g]=v.useState(!0),[x,S]=v.useState(null);v.useEffect(()=>{(async()=>{if(i){g(!1);return}if(!localStorage.getItem("apiKey")){g(!1);return}try{await an.getConfig()}catch(k){console.error("Error checking auth:",k),k.message==="Unauthorized"&&l("/login")}finally{g(!1)}})();const j=()=>{l("/login")};return window.addEventListener("unauthorized",j),()=>{window.removeEventListener("unauthorized",j)}},[i,l]);const w=async()=>{if(!i){S({message:n("app.config_missing"),type:"error"});return}try{const R=await an.updateConfig(i);if(console.log("Config saved successfully"),R&&typeof R=="object"&&"success"in R){const j=R;j.success?S({message:j.message||n("app.config_saved_success"),type:"success"}):S({message:j.message||n("app.config_saved_failed"),type:"error"})}else S({message:n("app.config_saved_success"),type:"success"})}catch(R){console.error("Failed to save config:",R),S({message:n("app.config_saved_failed")+": "+R.message,type:"error"})}},C=async()=>{if(!i){S({message:n("app.config_missing"),type:"error"});return}try{const R=await an.updateConfig(i);let j=!0;if(R&&typeof R=="object"&&"success"in R){const A=R;A.success||(j=!1,S({message:A.message||n("app.config_saved_failed"),type:"error"}))}if(j){const A=await an.restartService();if(console.log("Config saved and service restarted successfully"),A&&typeof A=="object"&&"success"in A){const k=A;k.success&&S({message:k.message||n("app.config_saved_restart_success"),type:"success"})}else S({message:n("app.config_saved_restart_success"),type:"success"})}}catch(R){console.error("Failed to save config and restart:",R),S({message:n("app.config_saved_restart_failed")+": "+R.message,type:"error"})}};return m?y.jsx("div",{className:"h-screen bg-gray-50 font-sans flex items-center justify-center",children:y.jsx("div",{className:"text-gray-500",children:"Loading application..."})}):s?y.jsx("div",{className:"h-screen bg-gray-50 font-sans flex items-center justify-center",children:y.jsxs("div",{className:"text-red-500",children:["Error: ",s.message]})}):i?y.jsxs("div",{className:"h-screen bg-gray-50 font-sans",children:[y.jsxs("header",{className:"flex h-16 items-center justify-between border-b bg-white px-6",children:[y.jsx("h1",{className:"text-xl font-semibold text-gray-800",children:n("app.title")}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(Le,{variant:"ghost",size:"icon",onClick:()=>f(!0),className:"transition-all-ease hover:scale-110",children:y.jsx(nO,{className:"h-5 w-5"})}),y.jsx(Le,{variant:"ghost",size:"icon",onClick:()=>p(!0),className:"transition-all-ease hover:scale-110",children:y.jsx(K2,{className:"h-5 w-5"})}),y.jsxs(gh,{children:[y.jsx(vh,{asChild:!0,children:y.jsx(Le,{variant:"ghost",size:"icon",className:"transition-all-ease hover:scale-110",children:y.jsx(X2,{className:"h-5 w-5"})})}),y.jsx(yh,{className:"w-32 p-2",children:y.jsxs("div",{className:"space-y-1",children:[y.jsx(Le,{variant:a.language.startsWith("en")?"default":"ghost",className:"w-full justify-start transition-all-ease hover:scale-[1.02]",onClick:()=>a.changeLanguage("en"),children:"English"}),y.jsx(Le,{variant:a.language.startsWith("zh")?"default":"ghost",className:"w-full justify-start transition-all-ease hover:scale-[1.02]",onClick:()=>a.changeLanguage("zh"),children:"中文"})]})})]}),y.jsxs(Le,{onClick:w,variant:"outline",className:"transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:[y.jsx(X0,{className:"mr-2 h-4 w-4"}),n("app.save")]}),y.jsxs(Le,{onClick:C,className:"transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:[y.jsx(F0,{className:"mr-2 h-4 w-4"}),n("app.save_and_restart")]})]})]}),y.jsxs("main",{className:"flex h-[calc(100vh-4rem)] gap-4 p-4",children:[y.jsx("div",{className:"w-3/5",children:y.jsx(sT,{})}),y.jsxs("div",{className:"flex w-2/5 flex-col gap-4",children:[y.jsx("div",{className:"h-3/5",children:y.jsx(uT,{})}),y.jsx("div",{className:"flex-1",children:y.jsx(WO,{})})]})]}),y.jsx(JO,{isOpen:u,onOpenChange:f}),y.jsx(gj,{open:h,onOpenChange:p,showToast:(R,j)=>S({message:R,type:j})}),x&&y.jsx(vj,{message:x.message,type:x.type,onClose:()=>S(null)})]}):y.jsx("div",{className:"h-screen bg-gray-50 font-sans flex items-center justify-center",children:y.jsx("div",{className:"text-gray-500",children:"Loading configuration..."})})}function bj(){const{t:n}=Ur(),a=bu(),[l,i]=v.useState(""),[s,u]=v.useState(""),[f,h]=v.useState(!1);v.useEffect(()=>{(async()=>{if(localStorage.getItem("apiKey")){h(!0);try{await an.getConfig(),a("/dashboard")}catch{localStorage.removeItem("apiKey")}finally{h(!1)}}})();const g=()=>{a("/login")};return window.addEventListener("unauthorized",g),()=>{window.removeEventListener("unauthorized",g)}},[a]);const p=async m=>{m.preventDefault();try{an.setApiKey(l),window.dispatchEvent(new StorageEvent("storage",{key:"apiKey",newValue:l,url:window.location.href})),l&&await an.getConfig(),a("/dashboard")}catch{an.setApiKey(""),u(n("login.invalidApiKey"))}};return f?y.jsx("div",{className:"flex min-h-screen items-center justify-center bg-gray-50",children:y.jsxs(ha,{className:"w-full max-w-md",children:[y.jsx(ma,{className:"space-y-1",children:y.jsx(pa,{className:"text-2xl",children:n("login.title")})}),y.jsxs(ga,{children:[y.jsx("div",{className:"flex justify-center py-8",children:y.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent"})}),y.jsx("p",{className:"text-center text-sm text-gray-500",children:n("login.validating")})]})]})}):y.jsx("div",{className:"flex min-h-screen items-center justify-center bg-gray-50",children:y.jsxs(ha,{className:"w-full max-w-md",children:[y.jsxs(ma,{className:"space-y-1",children:[y.jsx(pa,{className:"text-2xl",children:n("login.title")}),y.jsx(bb,{children:n("login.description")})]}),y.jsxs("form",{onSubmit:p,children:[y.jsxs(ga,{className:"space-y-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(lt,{htmlFor:"apiKey",children:n("login.apiKey")}),y.jsx(bt,{id:"apiKey",type:"password",value:l,onChange:m=>i(m.target.value),placeholder:n("login.apiKeyPlaceholder")})]}),s&&y.jsx("div",{className:"text-sm text-red-500",children:s})]}),y.jsx(xb,{children:y.jsx(Le,{className:"w-full",type:"submit",children:n("login.signIn")})})]})]})})}const xj=({children:n})=>n,Sj=({children:n})=>n,wj=gR([{path:"/",element:y.jsx(SR,{to:"/dashboard",replace:!0})},{path:"/login",element:y.jsx(Sj,{children:y.jsx(bj,{})})},{path:"/dashboard",element:y.jsx(xj,{children:y.jsx(yj,{})})}],{initialEntries:["/dashboard"]});Zw.createRoot(document.getElementById("root")).render(y.jsx(v.StrictMode,{children:y.jsx(ZO,{children:y.jsx(tC,{router:wj})})}));</script>
216
+ `},jy=LT(PT)(px),HT={config:kT},BT=function(){for(var a=arguments.length,l=new Array(a),i=0;i<a;i++)l[i]=arguments[i];return function(s){return l.reduceRight(function(u,f){return f(u)},s)}};function gx(n,a){return Object.keys(a).forEach(function(l){a[l]instanceof Object&&n[l]&&Object.assign(a[l],gx(n[l],a[l]))}),Oy(Oy({},n),a)}var $T={type:"cancelation",msg:"operation is manually canceled"};function hd(n){var a=!1,l=new Promise(function(i,s){n.then(function(u){return a?s($T):i(u)}),n.catch(s)});return l.cancel=function(){return a=!0},l}var VT=_T.create({config:DT,isInitialized:!1,resolve:null,reject:null,monaco:null}),vx=hT(VT,2),bo=vx[0],_u=vx[1];function YT(n){var a=HT.config(n),l=a.monaco,i=dT(a,["monaco"]);_u(function(s){return{config:gx(s.config,i),monaco:l}})}function qT(){var n=bo(function(a){var l=a.monaco,i=a.isInitialized,s=a.resolve;return{monaco:l,isInitialized:i,resolve:s}});if(!n.isInitialized){if(_u({isInitialized:!0}),n.monaco)return n.resolve(n.monaco),hd(md);if(window.monaco&&window.monaco.editor)return yx(window.monaco),n.resolve(window.monaco),hd(md);BT(GT,FT)(XT)}return hd(md)}function GT(n){return document.body.appendChild(n)}function KT(n){var a=document.createElement("script");return n&&(a.src=n),a}function FT(n){var a=bo(function(i){var s=i.config,u=i.reject;return{config:s,reject:u}}),l=KT("".concat(a.config.paths.vs,"/loader.js"));return l.onload=function(){return n()},l.onerror=a.reject,l}function XT(){var n=bo(function(l){var i=l.config,s=l.resolve,u=l.reject;return{config:i,resolve:s,reject:u}}),a=window.require;a.config(n.config),a(["vs/editor/editor.main"],function(l){yx(l),n.resolve(l)},function(l){n.reject(l)})}function yx(n){bo().monaco||_u({monaco:n})}function QT(){return bo(function(n){var a=n.monaco;return a})}var md=new Promise(function(n,a){return _u({resolve:n,reject:a})}),bx={config:YT,init:qT,__getMonacoInstance:QT},ZT={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},pd=ZT,JT={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},IT=JT;function WT({children:n}){return jr.createElement("div",{style:IT.container},n)}var ej=WT,tj=ej;function nj({width:n,height:a,isEditorReady:l,loading:i,_ref:s,className:u,wrapperProps:f}){return jr.createElement("section",{style:{...pd.wrapper,width:n,height:a},...f},!l&&jr.createElement(tj,null,i),jr.createElement("div",{ref:s,style:{...pd.fullWidth,...!l&&pd.hide},className:u}))}var aj=nj,xx=v.memo(aj);function rj(n){v.useEffect(n,[])}var Sx=rj;function lj(n,a,l=!0){let i=v.useRef(!0);v.useEffect(i.current||!l?()=>{i.current=!1}:n,a)}var an=lj;function ao(){}function _l(n,a,l,i){return ij(n,i)||oj(n,a,l,i)}function ij(n,a){return n.editor.getModel(wx(n,a))}function oj(n,a,l,i){return n.editor.createModel(a,l,i?wx(n,i):void 0)}function wx(n,a){return n.Uri.parse(a)}function sj({original:n,modified:a,language:l,originalLanguage:i,modifiedLanguage:s,originalModelPath:u,modifiedModelPath:f,keepCurrentOriginalModel:h=!1,keepCurrentModifiedModel:p=!1,theme:m="light",loading:g="Loading...",options:x={},height:S="100%",width:w="100%",className:C,wrapperProps:R={},beforeMount:T=ao,onMount:O=ao}){let[z,U]=v.useState(!1),[$,P]=v.useState(!0),A=v.useRef(null),X=v.useRef(null),ne=v.useRef(null),oe=v.useRef(O),se=v.useRef(T),Ne=v.useRef(!1);Sx(()=>{let ce=bx.init();return ce.then(_=>(X.current=_)&&P(!1)).catch(_=>_?.type!=="cancelation"&&console.error("Monaco initialization: error:",_)),()=>A.current?de():ce.cancel()}),an(()=>{if(A.current&&X.current){let ce=A.current.getOriginalEditor(),_=_l(X.current,n||"",i||l||"text",u||"");_!==ce.getModel()&&ce.setModel(_)}},[u],z),an(()=>{if(A.current&&X.current){let ce=A.current.getModifiedEditor(),_=_l(X.current,a||"",s||l||"text",f||"");_!==ce.getModel()&&ce.setModel(_)}},[f],z),an(()=>{let ce=A.current.getModifiedEditor();ce.getOption(X.current.editor.EditorOption.readOnly)?ce.setValue(a||""):a!==ce.getValue()&&(ce.executeEdits("",[{range:ce.getModel().getFullModelRange(),text:a||"",forceMoveMarkers:!0}]),ce.pushUndoStop())},[a],z),an(()=>{A.current?.getModel()?.original.setValue(n||"")},[n],z),an(()=>{let{original:ce,modified:_}=A.current.getModel();X.current.editor.setModelLanguage(ce,i||l||"text"),X.current.editor.setModelLanguage(_,s||l||"text")},[l,i,s],z),an(()=>{X.current?.editor.setTheme(m)},[m],z),an(()=>{A.current?.updateOptions(x)},[x],z);let we=v.useCallback(()=>{if(!X.current)return;se.current(X.current);let ce=_l(X.current,n||"",i||l||"text",u||""),_=_l(X.current,a||"",s||l||"text",f||"");A.current?.setModel({original:ce,modified:_})},[l,a,s,n,i,u,f]),he=v.useCallback(()=>{!Ne.current&&ne.current&&(A.current=X.current.editor.createDiffEditor(ne.current,{automaticLayout:!0,...x}),we(),X.current?.editor.setTheme(m),U(!0),Ne.current=!0)},[x,m,we]);v.useEffect(()=>{z&&oe.current(A.current,X.current)},[z]),v.useEffect(()=>{!$&&!z&&he()},[$,z,he]);function de(){let ce=A.current?.getModel();h||ce?.original?.dispose(),p||ce?.modified?.dispose(),A.current?.dispose()}return jr.createElement(xx,{width:w,height:S,isEditorReady:z,loading:g,_ref:ne,className:C,wrapperProps:R})}var uj=sj;v.memo(uj);function cj(n){let a=v.useRef();return v.useEffect(()=>{a.current=n},[n]),a.current}var fj=cj,Qs=new Map;function dj({defaultValue:n,defaultLanguage:a,defaultPath:l,value:i,language:s,path:u,theme:f="light",line:h,loading:p="Loading...",options:m={},overrideServices:g={},saveViewState:x=!0,keepCurrentModel:S=!1,width:w="100%",height:C="100%",className:R,wrapperProps:T={},beforeMount:O=ao,onMount:z=ao,onChange:U,onValidate:$=ao}){let[P,A]=v.useState(!1),[X,ne]=v.useState(!0),oe=v.useRef(null),se=v.useRef(null),Ne=v.useRef(null),we=v.useRef(z),he=v.useRef(O),de=v.useRef(),ce=v.useRef(i),_=fj(u),ee=v.useRef(!1),q=v.useRef(!1);Sx(()=>{let K=bx.init();return K.then(L=>(oe.current=L)&&ne(!1)).catch(L=>L?.type!=="cancelation"&&console.error("Monaco initialization: error:",L)),()=>se.current?N():K.cancel()}),an(()=>{let K=_l(oe.current,n||i||"",a||s||"",u||l||"");K!==se.current?.getModel()&&(x&&Qs.set(_,se.current?.saveViewState()),se.current?.setModel(K),x&&se.current?.restoreViewState(Qs.get(u)))},[u],P),an(()=>{se.current?.updateOptions(m)},[m],P),an(()=>{!se.current||i===void 0||(se.current.getOption(oe.current.editor.EditorOption.readOnly)?se.current.setValue(i):i!==se.current.getValue()&&(q.current=!0,se.current.executeEdits("",[{range:se.current.getModel().getFullModelRange(),text:i,forceMoveMarkers:!0}]),se.current.pushUndoStop(),q.current=!1))},[i],P),an(()=>{let K=se.current?.getModel();K&&s&&oe.current?.editor.setModelLanguage(K,s)},[s],P),an(()=>{h!==void 0&&se.current?.revealLine(h)},[h],P),an(()=>{oe.current?.editor.setTheme(f)},[f],P);let pe=v.useCallback(()=>{if(!(!Ne.current||!oe.current)&&!ee.current){he.current(oe.current);let K=u||l,L=_l(oe.current,i||n||"",a||s||"",K||"");se.current=oe.current?.editor.create(Ne.current,{model:L,automaticLayout:!0,...m},g),x&&se.current.restoreViewState(Qs.get(K)),oe.current.editor.setTheme(f),h!==void 0&&se.current.revealLine(h),A(!0),ee.current=!0}},[n,a,l,i,s,u,m,g,x,f,h]);v.useEffect(()=>{P&&we.current(se.current,oe.current)},[P]),v.useEffect(()=>{!X&&!P&&pe()},[X,P,pe]),ce.current=i,v.useEffect(()=>{P&&U&&(de.current?.dispose(),de.current=se.current?.onDidChangeModelContent(K=>{q.current||U(se.current.getValue(),K)}))},[P,U]),v.useEffect(()=>{if(P){let K=oe.current.editor.onDidChangeMarkers(L=>{let F=se.current.getModel()?.uri;if(F&&L.find(W=>W.path===F.path)){let W=oe.current.editor.getModelMarkers({resource:F});$?.(W)}});return()=>{K?.dispose()}}return()=>{}},[P,$]);function N(){de.current?.dispose(),S?x&&Qs.set(u,se.current.saveViewState()):se.current.getModel()?.dispose(),se.current.dispose()}return jr.createElement(xx,{width:w,height:C,isEditorReady:P,loading:p,_ref:Ne,className:R,wrapperProps:T})}var hj=dj,mj=v.memo(hj),pj=mj;function gj({open:n,onOpenChange:a,showToast:l}){const{t:i}=Ur(),{config:s}=Fl(),[u,f]=v.useState(""),[h,p]=v.useState(!1),[m,g]=v.useState(!1),[x,S]=v.useState(!1),w=v.useRef(null);v.useEffect(()=>{s&&n&&f(JSON.stringify(s,null,2))},[s,n]),v.useEffect(()=>{if(n)g(!0),requestAnimationFrame(()=>{S(!0)});else{S(!1);const O=setTimeout(()=>{g(!1)},300);return()=>clearTimeout(O)}},[n]);const C=(O,z,U)=>{if(O&&typeof O=="object"&&"success"in O){const $=O;return $.success?(l&&l($.message||z,"success"),!0):(l&&l($.message||U,"error"),!1)}else return l&&l(z,"success"),!0},R=async()=>{if(u)try{p(!0);const O=JSON.parse(u),z=await ln.updateConfig(O);C(z,i("app.config_saved_success"),i("app.config_saved_failed"))&&a(!1)}catch(O){console.error("Failed to save config:",O),l&&l(i("app.config_saved_failed")+": "+O.message,"error")}finally{p(!1)}},T=async()=>{if(u)try{p(!0);const O=JSON.parse(u),z=await ln.updateConfig(O);if(C(z,i("app.config_saved_success"),i("app.config_saved_failed"))){const $=await ln.restartService();C($,i("app.config_saved_restart_success"),i("app.config_saved_restart_failed")),a(!1)}}catch(O){console.error("Failed to save config and restart:",O),l&&l(i("app.config_saved_restart_failed")+": "+O.message,"error")}finally{p(!1)}};return!m&&!n?null:y.jsxs(y.Fragment,{children:[(m||n)&&y.jsx("div",{className:`fixed inset-0 z-50 transition-all duration-300 ease-out ${x&&n?"bg-black/50 opacity-100":"bg-black/0 opacity-0 pointer-events-none"}`,onClick:()=>a(!1)}),y.jsxs("div",{ref:w,className:`fixed bottom-0 left-0 right-0 z-50 flex flex-col bg-white shadow-2xl transition-all duration-300 ease-out transform ${x&&n?"translate-y-0":"translate-y-full"}`,style:{height:"100vh",maxHeight:"100vh"},children:[y.jsxs("div",{className:"flex items-center justify-between border-b p-4",children:[y.jsx("h2",{className:"text-lg font-semibold",children:i("json_editor.title")}),y.jsxs("div",{className:"flex gap-2",children:[y.jsxs(ke,{variant:"outline",size:"sm",onClick:()=>a(!1),disabled:h,children:[y.jsx(zl,{className:"h-4 w-4 mr-2"}),i("json_editor.cancel")]}),y.jsxs(ke,{variant:"outline",size:"sm",onClick:R,disabled:h,children:[y.jsx(X0,{className:"h-4 w-4 mr-2"}),i(h?"json_editor.saving":"json_editor.save")]}),y.jsxs(ke,{variant:"default",size:"sm",onClick:T,disabled:h,children:[y.jsx(F0,{className:"h-4 w-4 mr-2"}),i(h?"json_editor.saving":"json_editor.save_and_restart")]})]})]}),y.jsx("div",{className:"flex-1 min-h-0 bg-gray-50",children:y.jsx(pj,{height:"100%",defaultLanguage:"json",value:u,onChange:O=>f(O||""),theme:"vs",options:{minimap:{enabled:!0},fontSize:14,scrollBeyondLastLine:!1,automaticLayout:!0,wordWrap:"on",formatOnPaste:!0,formatOnType:!0,suggest:{showKeywords:!0,showSnippets:!0}}})})]})]})}function vj({message:n,type:a,onClose:l}){v.useEffect(()=>{const u=setTimeout(()=>{l()},3e3);return()=>clearTimeout(u)},[l]);const i=()=>{switch(a){case"success":return y.jsx(V2,{className:"h-5 w-5 text-green-500"});case"error":return y.jsx(q2,{className:"h-5 w-5 text-red-500"});case"warning":return y.jsx(B2,{className:"h-5 w-5 text-yellow-500"});default:return null}},s=()=>{switch(a){case"success":return"bg-green-100 border-green-200";case"error":return"bg-red-100 border-red-200";case"warning":return"bg-yellow-100 border-yellow-200";default:return"bg-gray-100 border-gray-200"}};return y.jsxs("div",{className:`fixed top-4 right-4 z-50 flex items-center justify-between p-4 rounded-lg border shadow-lg ${s()} transition-all duration-300 ease-in-out`,children:[y.jsxs("div",{className:"flex items-center space-x-2",children:[i(),y.jsx("span",{className:"text-sm font-medium",children:n})]}),y.jsx("button",{onClick:l,className:"ml-4 text-gray-500 hover:text-gray-700 focus:outline-none",children:y.jsx(zl,{className:"h-4 w-4"})})]})}function yj(){const{t:n,i18n:a}=Ur(),l=bu(),{config:i,error:s}=Fl(),[u,f]=v.useState(!1),[h,p]=v.useState(!1),[m,g]=v.useState(!0),[x,S]=v.useState(null);v.useEffect(()=>{(async()=>{if(i){g(!1);return}if(!localStorage.getItem("apiKey")){g(!1);return}try{await ln.getConfig()}catch(z){console.error("Error checking auth:",z),z.message==="Unauthorized"&&l("/login")}finally{g(!1)}})();const T=()=>{l("/login")};return window.addEventListener("unauthorized",T),()=>{window.removeEventListener("unauthorized",T)}},[i,l]);const w=async()=>{if(!i){S({message:n("app.config_missing"),type:"error"});return}try{const R=await ln.updateConfig(i);if(console.log("Config saved successfully"),R&&typeof R=="object"&&"success"in R){const T=R;T.success?S({message:T.message||n("app.config_saved_success"),type:"success"}):S({message:T.message||n("app.config_saved_failed"),type:"error"})}else S({message:n("app.config_saved_success"),type:"success"})}catch(R){console.error("Failed to save config:",R),S({message:n("app.config_saved_failed")+": "+R.message,type:"error"})}},C=async()=>{if(!i){S({message:n("app.config_missing"),type:"error"});return}try{const R=await ln.updateConfig(i);let T=!0;if(R&&typeof R=="object"&&"success"in R){const O=R;O.success||(T=!1,S({message:O.message||n("app.config_saved_failed"),type:"error"}))}if(T){const O=await ln.restartService();if(console.log("Config saved and service restarted successfully"),O&&typeof O=="object"&&"success"in O){const z=O;z.success&&S({message:z.message||n("app.config_saved_restart_success"),type:"success"})}else S({message:n("app.config_saved_restart_success"),type:"success"})}}catch(R){console.error("Failed to save config and restart:",R),S({message:n("app.config_saved_restart_failed")+": "+R.message,type:"error"})}};return m?y.jsx("div",{className:"h-screen bg-gray-50 font-sans flex items-center justify-center",children:y.jsx("div",{className:"text-gray-500",children:"Loading application..."})}):s?y.jsx("div",{className:"h-screen bg-gray-50 font-sans flex items-center justify-center",children:y.jsxs("div",{className:"text-red-500",children:["Error: ",s.message]})}):i?y.jsxs("div",{className:"h-screen bg-gray-50 font-sans",children:[y.jsxs("header",{className:"flex h-16 items-center justify-between border-b bg-white px-6",children:[y.jsx("h1",{className:"text-xl font-semibold text-gray-800",children:n("app.title")}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(ke,{variant:"ghost",size:"icon",onClick:()=>f(!0),className:"transition-all-ease hover:scale-110",children:y.jsx(nO,{className:"h-5 w-5"})}),y.jsx(ke,{variant:"ghost",size:"icon",onClick:()=>p(!0),className:"transition-all-ease hover:scale-110",children:y.jsx(K2,{className:"h-5 w-5"})}),y.jsxs(gh,{children:[y.jsx(vh,{asChild:!0,children:y.jsx(ke,{variant:"ghost",size:"icon",className:"transition-all-ease hover:scale-110",children:y.jsx(X2,{className:"h-5 w-5"})})}),y.jsx(yh,{className:"w-32 p-2",children:y.jsxs("div",{className:"space-y-1",children:[y.jsx(ke,{variant:a.language.startsWith("en")?"default":"ghost",className:"w-full justify-start transition-all-ease hover:scale-[1.02]",onClick:()=>a.changeLanguage("en"),children:"English"}),y.jsx(ke,{variant:a.language.startsWith("zh")?"default":"ghost",className:"w-full justify-start transition-all-ease hover:scale-[1.02]",onClick:()=>a.changeLanguage("zh"),children:"中文"})]})})]}),y.jsxs(ke,{onClick:w,variant:"outline",className:"transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:[y.jsx(X0,{className:"mr-2 h-4 w-4"}),n("app.save")]}),y.jsxs(ke,{onClick:C,className:"transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:[y.jsx(F0,{className:"mr-2 h-4 w-4"}),n("app.save_and_restart")]})]})]}),y.jsxs("main",{className:"flex h-[calc(100vh-4rem)] gap-4 p-4",children:[y.jsx("div",{className:"w-3/5",children:y.jsx(sT,{})}),y.jsxs("div",{className:"flex w-2/5 flex-col gap-4",children:[y.jsx("div",{className:"h-3/5",children:y.jsx(uT,{})}),y.jsx("div",{className:"flex-1",children:y.jsx(WO,{})})]})]}),y.jsx(JO,{isOpen:u,onOpenChange:f}),y.jsx(gj,{open:h,onOpenChange:p,showToast:(R,T)=>S({message:R,type:T})}),x&&y.jsx(vj,{message:x.message,type:x.type,onClose:()=>S(null)})]}):y.jsx("div",{className:"h-screen bg-gray-50 font-sans flex items-center justify-center",children:y.jsx("div",{className:"text-gray-500",children:"Loading configuration..."})})}function bj(){const{t:n}=Ur(),a=bu(),[l,i]=v.useState(""),[s,u]=v.useState(""),[f,h]=v.useState(!1);v.useEffect(()=>{(async()=>{if(localStorage.getItem("apiKey")){h(!0);try{await ln.getConfig(),a("/dashboard")}catch{localStorage.removeItem("apiKey")}finally{h(!1)}}})();const g=()=>{a("/login")};return window.addEventListener("unauthorized",g),()=>{window.removeEventListener("unauthorized",g)}},[a]);const p=async m=>{m.preventDefault();try{ln.setApiKey(l),window.dispatchEvent(new StorageEvent("storage",{key:"apiKey",newValue:l,url:window.location.href})),l&&await ln.getConfig(),a("/dashboard")}catch{ln.setApiKey(""),u(n("login.invalidApiKey"))}};return f?y.jsx("div",{className:"flex min-h-screen items-center justify-center bg-gray-50",children:y.jsxs(ha,{className:"w-full max-w-md",children:[y.jsx(ma,{className:"space-y-1",children:y.jsx(pa,{className:"text-2xl",children:n("login.title")})}),y.jsxs(ga,{children:[y.jsx("div",{className:"flex justify-center py-8",children:y.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent"})}),y.jsx("p",{className:"text-center text-sm text-gray-500",children:n("login.validating")})]})]})}):y.jsx("div",{className:"flex min-h-screen items-center justify-center bg-gray-50",children:y.jsxs(ha,{className:"w-full max-w-md",children:[y.jsxs(ma,{className:"space-y-1",children:[y.jsx(pa,{className:"text-2xl",children:n("login.title")}),y.jsx(bb,{children:n("login.description")})]}),y.jsxs("form",{onSubmit:p,children:[y.jsxs(ga,{className:"space-y-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(rt,{htmlFor:"apiKey",children:n("login.apiKey")}),y.jsx(yt,{id:"apiKey",type:"password",value:l,onChange:m=>i(m.target.value),placeholder:n("login.apiKeyPlaceholder")})]}),s&&y.jsx("div",{className:"text-sm text-red-500",children:s})]}),y.jsx(xb,{children:y.jsx(ke,{className:"w-full",type:"submit",children:n("login.signIn")})})]})]})})}const xj=({children:n})=>n,Sj=({children:n})=>n,wj=gR([{path:"/",element:y.jsx(SR,{to:"/dashboard",replace:!0})},{path:"/login",element:y.jsx(Sj,{children:y.jsx(bj,{})})},{path:"/dashboard",element:y.jsx(xj,{children:y.jsx(yj,{})})}],{initialEntries:["/dashboard"]});Zw.createRoot(document.getElementById("root")).render(y.jsx(v.StrictMode,{children:y.jsx(ZO,{children:y.jsx(tC,{router:wj})})}));</script>
217
217
  <style rel="stylesheet" crossorigin>/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-500:oklch(63.7% .237 25.331);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-500:oklch(79.5% .184 86.047);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-500:oklch(72.3% .219 149.579);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--tracking-widest:.1em;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*{outline-color:color-mix(in oklab,var(--ring)50%,transparent)}}body{background-color:var(--background);color:var(--foreground)}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-4{top:calc(var(--spacing)*4)}.top-\[50\%\]{top:50%}.right-0{right:calc(var(--spacing)*0)}.right-4{right:calc(var(--spacing)*4)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.left-\[50\%\]{left:50%}.z-50{z-index:50}.-mx-1{margin-inline:calc(var(--spacing)*-1)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-auto{margin-top:auto}.mr-2{margin-right:calc(var(--spacing)*2)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.inline-flex{display:inline-flex}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.h-3{height:calc(var(--spacing)*3)}.h-3\/5{height:60%}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-11{height:calc(var(--spacing)*11)}.h-16{height:calc(var(--spacing)*16)}.h-\[calc\(100vh-4rem\)\]{height:calc(100vh - 4rem)}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-8{max-height:calc(var(--spacing)*8)}.max-h-96{max-height:calc(var(--spacing)*96)}.max-h-\[80vh\]{max-height:80vh}.max-h-\[300px\]{max-height:300px}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-screen{min-height:100vh}.w-2\/5{width:40%}.w-3{width:calc(var(--spacing)*3)}.w-3\/5{width:60%}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-10{width:calc(var(--spacing)*10)}.w-11{width:calc(var(--spacing)*11)}.w-32{width:calc(var(--spacing)*32)}.w-48{width:calc(var(--spacing)*48)}.w-72{width:calc(var(--spacing)*72)}.w-\[--radix-popover-trigger-width\]{width:--radix-popover-trigger-width}.w-full{width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.origin-\(--radix-popover-content-transform-origin\){transform-origin:var(--radix-popover-content-transform-origin)}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-full{--tw-translate-y:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.scroll-py-1{scroll-padding-block:calc(var(--spacing)*1)}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.overflow-hidden{overflow:hidden}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-destructive\/50{border-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.border-destructive\/50{border-color:color-mix(in oklab,var(--destructive)50%,transparent)}}.border-gray-200{border-color:var(--color-gray-200)}.border-green-200{border-color:var(--color-green-200)}.border-input{border-color:var(--input)}.border-primary{border-color:var(--primary)}.border-red-200{border-color:var(--color-red-200)}.border-transparent{border-color:#0000}.border-yellow-200{border-color:var(--color-yellow-200)}.border-t-transparent{border-top-color:#0000}.bg-background{background-color:var(--background)}.bg-black\/0{background-color:#0000}@supports (color:color-mix(in lab,red,red)){.bg-black\/0{background-color:color-mix(in oklab,var(--color-black)0%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-black\/80{background-color:#000c}@supports (color:color-mix(in lab,red,red)){.bg-black\/80{background-color:color-mix(in oklab,var(--color-black)80%,transparent)}}.bg-border{background-color:var(--border)}.bg-card{background-color:var(--card)}.bg-destructive{background-color:var(--destructive)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-green-100{background-color:var(--color-green-100)}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-red-100{background-color:var(--color-red-100)}.bg-secondary{background-color:var(--secondary)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-yellow-100{background-color:var(--color-yellow-100)}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-6{padding-block:calc(var(--spacing)*6)}.py-8{padding-block:calc(var(--spacing)*8)}.pt-0{padding-top:calc(var(--spacing)*0)}.pt-2{padding-top:calc(var(--spacing)*2)}.pr-10{padding-right:calc(var(--spacing)*10)}.pl-4{padding-left:calc(var(--spacing)*4)}.text-center{text-align:center}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-none{--tw-leading:1;line-height:1}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.whitespace-nowrap{white-space:nowrap}.text-card-foreground{color:var(--card-foreground)}.text-current{color:currentColor}.text-destructive{color:var(--destructive)}.text-destructive-foreground{color:var(--destructive-foreground)}.text-foreground{color:var(--foreground)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-green-500{color:var(--color-green-500)}.text-muted-foreground{color:var(--muted-foreground)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-red-500{color:var(--color-red-500)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-yellow-500{color:var(--color-yellow-500)}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-100{opacity:1}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.select-none{-webkit-user-select:none;user-select:none}.group-data-\[state\=open\]\:rotate-180:is(:where(.group)[data-state=open] *){rotate:180deg}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-70:is(:where(.peer):disabled~*){opacity:.7}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}@media (hover:hover){.hover\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\:scale-\[1\.01\]:hover{scale:1.01}.hover\:scale-\[1\.02\]:hover{scale:1.02}.hover\:bg-accent:hover{background-color:var(--accent)}.hover\:bg-destructive:hover,.hover\:bg-destructive\/80:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/80:hover{background-color:color-mix(in oklab,var(--destructive)80%,transparent)}}.hover\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\:bg-primary\/80:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/80:hover{background-color:color-mix(in oklab,var(--primary)80%,transparent)}}.hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary)90%,transparent)}}.hover\:bg-secondary\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,var(--secondary)80%,transparent)}}.hover\:bg-transparent:hover{background-color:#0000}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-destructive-foreground:hover{color:var(--destructive-foreground)}.hover\:text-gray-700:hover{color:var(--color-gray-700)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\:scale-\[1\.01\]:focus{scale:1.01}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:var(--ring)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color:var(--background)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:scale-\[0\.98\]:active{scale:.98}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true]{pointer-events:none}.data-\[disabled\=true\]\:opacity-50[data-disabled=true]{opacity:.5}.data-\[selected\=true\]\:bg-accent[data-selected=true]{background-color:var(--accent)}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:var(--accent-foreground)}:is(.\*\*\:data-\[slot\=command-input-wrapper\]\:h-12 *)[data-slot=command-input-wrapper]{height:calc(var(--spacing)*12)}.data-\[state\=checked\]\:translate-x-5[data-state=checked]{--tw-translate-x:calc(var(--spacing)*5);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:var(--primary)}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:var(--accent)}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:var(--input)}@media (min-width:40rem){.sm\:max-w-2xl{max-width:var(--container-2xl)}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}:where(.sm\:space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@media (min-width:48rem){.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-block:calc(var(--spacing)*1.5)}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:var(--muted-foreground)}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:calc(var(--spacing)*0)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:calc(var(--spacing)*5)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:calc(var(--spacing)*5)}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:calc(var(--spacing)*12)}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-block:calc(var(--spacing)*3)}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:calc(var(--spacing)*5)}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:calc(var(--spacing)*5)}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\[\&_svg\:not\(\[class\*\=\'text-\'\]\)\]\:text-muted-foreground svg:not([class*=text-]){color:var(--muted-foreground)}}:root{--radius:.625rem;--background:oklch(100% 0 0);--foreground:oklch(14.5% 0 0);--card:oklch(100% 0 0);--card-foreground:oklch(14.5% 0 0);--popover:oklch(100% 0 0);--popover-foreground:oklch(14.5% 0 0);--primary:oklch(20.5% 0 0);--primary-foreground:oklch(98.5% 0 0);--secondary:oklch(97% 0 0);--secondary-foreground:oklch(20.5% 0 0);--muted:oklch(97% 0 0);--muted-foreground:oklch(55.6% 0 0);--accent:oklch(97% 0 0);--accent-foreground:oklch(20.5% 0 0);--destructive:oklch(57.7% .245 27.325);--destructive-foreground:oklch(98.5% 0 0);--border:oklch(92.2% 0 0);--input:oklch(92.2% 0 0);--ring:oklch(70.8% 0 0);--chart-1:oklch(64.6% .222 41.116);--chart-2:oklch(60% .118 184.704);--chart-3:oklch(39.8% .07 227.392);--chart-4:oklch(82.8% .189 84.429);--chart-5:oklch(76.9% .188 70.08);--sidebar:oklch(98.5% 0 0);--sidebar-foreground:oklch(14.5% 0 0);--sidebar-primary:oklch(20.5% 0 0);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(97% 0 0);--sidebar-accent-foreground:oklch(20.5% 0 0);--sidebar-border:oklch(92.2% 0 0);--sidebar-ring:oklch(70.8% 0 0)}.dark{--background:oklch(14.5% 0 0);--foreground:oklch(98.5% 0 0);--card:oklch(20.5% 0 0);--card-foreground:oklch(98.5% 0 0);--popover:oklch(20.5% 0 0);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(92.2% 0 0);--primary-foreground:oklch(20.5% 0 0);--secondary:oklch(26.9% 0 0);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(26.9% 0 0);--muted-foreground:oklch(70.8% 0 0);--accent:oklch(26.9% 0 0);--accent-foreground:oklch(98.5% 0 0);--destructive:oklch(70.4% .191 22.216);--destructive-foreground:oklch(98.5% 0 0);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:oklch(55.6% 0 0);--chart-1:oklch(48.8% .243 264.376);--chart-2:oklch(69.6% .17 162.48);--chart-3:oklch(76.9% .188 70.08);--chart-4:oklch(62.7% .265 303.9);--chart-5:oklch(64.5% .246 16.439);--sidebar:oklch(20.5% 0 0);--sidebar-foreground:oklch(98.5% 0 0);--sidebar-primary:oklch(48.8% .243 264.376);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(26.9% 0 0);--sidebar-accent-foreground:oklch(98.5% 0 0);--sidebar-border:oklch(100% 0 0/.1);--sidebar-ring:oklch(55.6% 0 0)}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes scaleIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes slideIn{0%{opacity:0;transform:translate(20px)}to{opacity:1;transform:translate(0)}}.animate-fade-in{animation:fadeIn .2s ease-out forwards}.animate-scale-in{animation:scaleIn .2s cubic-bezier(.34,1.56,.64,1) forwards}.animate-slide-in{animation:slideIn .3s cubic-bezier(.34,1.56,.64,1) forwards}.transition-all-ease{transition:all .2s cubic-bezier(.34,1.56,.64,1)}</style>
218
218
  </head>
219
219
  <body>