@musistudio/claude-code-router 1.0.49 → 1.0.51

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
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>CCR UI</title>
7
- <script type="module" crossorigin>function Zw(n,a){for(var l=0;l<a.length;l++){const i=a[l];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in n)){const c=Object.getOwnPropertyDescriptor(i,s);c&&Object.defineProperty(n,s,c.get?c:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const c of s)if(c.type==="childList")for(const f of c.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&i(f)}).observe(document,{childList:!0,subtree:!0});function l(s){const c={};return s.integrity&&(c.integrity=s.integrity),s.referrerPolicy&&(c.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?c.credentials="include":s.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function i(s){if(s.ep)return;s.ep=!0;const c=l(s);fetch(s.href,c)}})();function Iy(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Zf={exports:{}},to={};/**
7
+ <script type="module" crossorigin>function LS(n,a){for(var l=0;l<a.length;l++){const o=a[l];if(typeof o!="string"&&!Array.isArray(o)){for(const s in o)if(s!=="default"&&!(s in n)){const c=Object.getOwnPropertyDescriptor(o,s);c&&Object.defineProperty(n,s,c.get?c:{enumerable:!0,get:()=>o[s]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const c of s)if(c.type==="childList")for(const f of c.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function l(s){const c={};return s.integrity&&(c.integrity=s.integrity),s.referrerPolicy&&(c.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?c.credentials="include":s.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function o(s){if(s.ep)return;s.ep=!0;const c=l(s);fetch(s.href,c)}})();function d0(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var od={exports:{}},oi={};/**
8
8
  * @license React
9
9
  * react-jsx-runtime.production.js
10
10
  *
@@ -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 fv;function Jw(){if(fv)return to;fv=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function l(i,s,c){var f=null;if(c!==void 0&&(f=""+c),s.key!==void 0&&(f=""+s.key),"key"in s){c={};for(var h in s)h!=="key"&&(c[h]=s[h])}else c=s;return s=c.ref,{$$typeof:n,type:i,key:f,ref:s!==void 0?s:null,props:c}}return to.Fragment=a,to.jsx=l,to.jsxs=l,to}var dv;function Ww(){return dv||(dv=1,Zf.exports=Jw()),Zf.exports}var g=Ww();const Ue=n=>typeof n=="string",no=()=>{let n,a;const l=new Promise((i,s)=>{n=i,a=s});return l.resolve=n,l.reject=a,l},hv=n=>n==null?"":""+n,eS=(n,a,l)=>{n.forEach(i=>{a[i]&&(l[i]=a[i])})},tS=/###/g,mv=n=>n&&n.indexOf("###")>-1?n.replace(tS,"."):n,pv=n=>!n||Ue(n),fo=(n,a,l)=>{const i=Ue(a)?a.split("."):a;let s=0;for(;s<i.length-1;){if(pv(n))return{};const c=mv(i[s]);!n[c]&&l&&(n[c]=new l),Object.prototype.hasOwnProperty.call(n,c)?n=n[c]:n={},++s}return pv(n)?{}:{obj:n,k:mv(i[s])}},gv=(n,a,l)=>{const{obj:i,k:s}=fo(n,a,Object);if(i!==void 0||a.length===1){i[s]=l;return}let c=a[a.length-1],f=a.slice(0,a.length-1),h=fo(n,f,Object);for(;h.obj===void 0&&f.length;)c=`${f[f.length-1]}.${c}`,f=f.slice(0,f.length-1),h=fo(n,f,Object),h?.obj&&typeof h.obj[`${h.k}.${c}`]<"u"&&(h.obj=void 0);h.obj[`${h.k}.${c}`]=l},nS=(n,a,l,i)=>{const{obj:s,k:c}=fo(n,a,Object);s[c]=s[c]||[],s[c].push(l)},fc=(n,a)=>{const{obj:l,k:i}=fo(n,a);if(l&&Object.prototype.hasOwnProperty.call(l,i))return l[i]},aS=(n,a,l)=>{const i=fc(n,l);return i!==void 0?i:fc(a,l)},Zy=(n,a,l)=>{for(const i in a)i!=="__proto__"&&i!=="constructor"&&(i in n?Ue(n[i])||n[i]instanceof String||Ue(a[i])||a[i]instanceof String?l&&(n[i]=a[i]):Zy(n[i],a[i],l):n[i]=a[i]);return n},zl=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var rS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const lS=n=>Ue(n)?n.replace(/[&<>"'\/]/g,a=>rS[a]):n;class iS{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 oS=[" ",",","?","!",";"],sS=new iS(20),cS=(n,a,l)=>{a=a||"",l=l||"";const i=oS.filter(f=>a.indexOf(f)<0&&l.indexOf(f)<0);if(i.length===0)return!0;const s=sS.getRegExp(`(${i.map(f=>f==="?"?"\\?":f).join("|")})`);let c=!s.test(n);if(!c){const f=n.indexOf(l);f>0&&!s.test(n.substring(0,f))&&(c=!0)}return c},jd=(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 c=0;c<i.length;){if(!s||typeof s!="object")return;let f,h="";for(let p=c;p<i.length;++p)if(p!==c&&(h+=l),h+=i[p],f=s[h],f!==void 0){if(["string","number","boolean"].indexOf(typeof f)>-1&&p<i.length-1)continue;c+=p-c+1;break}s=f}return s},po=n=>n?.replace("_","-"),uS={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 dc{constructor(a,l={}){this.init(a,l)}init(a,l={}){this.prefix=l.prefix||"i18next:",this.logger=a||uS,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:(Ue(a[0])&&(a[0]=`${i}${this.prefix} ${a[0]}`),this.logger[l](a))}create(a){return new dc(this.logger,{prefix:`${this.prefix}:${a}:`,...this.options})}clone(a){return a=a||this.options,a.prefix=a.prefix||this.prefix,new dc(this.logger,a)}}var In=new dc;class _c{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,c])=>{for(let f=0;f<c;f++)s(...l)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,c])=>{for(let f=0;f<c;f++)s.apply(s,[a,...l])})}}class vv extends _c{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 c=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):Ue(i)&&c?h.push(...i.split(c)):h.push(i)));const p=fc(this.data,h);return!p&&!l&&!i&&a.indexOf(".")>-1&&(a=h[0],l=h[1],i=h.slice(2).join(".")),p||!f||!Ue(i)?p:jd(this.data?.[a]?.[l],i,c)}addResource(a,l,i,s,c={silent:!1}){const f=c.keySeparator!==void 0?c.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),gv(this.data,h,s),c.silent||this.emit("added",a,l,i,s)}addResources(a,l,i,s={silent:!1}){for(const c in i)(Ue(i[c])||Array.isArray(i[c]))&&this.addResource(a,l,c,i[c],{silent:!0});s.silent||this.emit("added",a,l,i)}addResourceBundle(a,l,i,s,c,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=fc(this.data,h)||{};f.skipCopy||(i=JSON.parse(JSON.stringify(i))),s?Zy(p,i,c):p={...p,...i},gv(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 Jy={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,a,l,i,s){return n.forEach(c=>{a=this.processors[c]?.process(a,l,i,s)??a}),a}};const yv={},bv=n=>!Ue(n)&&typeof n!="boolean"&&typeof n!="number";class hc extends _c{constructor(a,l={}){super(),eS(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],a,this),this.options=l,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=In.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 c=l.ns||this.options.defaultNS||[];const f=i&&a.indexOf(i)>-1,h=!this.options.userDefinedKeySeparator&&!l.keySeparator&&!this.options.userDefinedNsSeparator&&!l.nsSeparator&&!cS(a,i,s);if(f&&!h){const p=a.match(this.interpolator.nestingRegexp);if(p&&p.length>0)return{key:a,namespaces:Ue(c)?[c]:c};const m=a.split(i);(i!==s||i===s&&this.options.ns.indexOf(m[0])>-1)&&(c=m.shift()),a=m.join(s)}return{key:a,namespaces:Ue(c)?[c]:c}}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 c=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 v=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;v===void 0&&(v=":");const b=s.lng||this.language,w=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(b?.toLowerCase()==="cimode")return w?c?{res:`${m}${v}${h}`,usedKey:h,exactUsedKey:h,usedLng:b,usedNS:m,usedParams:this.getUsedParamsDetails(s)}:`${m}${v}${h}`:c?{res:h,usedKey:h,exactUsedKey:h,usedLng:b,usedNS:m,usedParams:this.getUsedParamsDetails(s)}:h;const S=this.resolve(a,s);let C=S?.res;const E=S?.usedKey||h,j=S?.exactUsedKey||h,R=["[object Number]","[object Function]","[object RegExp]"],L=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,k=!this.i18nFormat||this.i18nFormat.handleAsObject,H=s.count!==void 0&&!Ue(s.count),M=hc.hasDefaultValue(s),N=H?this.pluralResolver.getSuffix(b,s.count,s):"",B=s.ordinal&&H?this.pluralResolver.getSuffix(b,s.count,{ordinal:!1}):"",J=H&&!s.ordinal&&s.count===0,te=J&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${N}`]||s[`defaultValue${B}`]||s.defaultValue;let ae=C;k&&!C&&M&&(ae=te);const re=bv(ae),fe=Object.prototype.toString.apply(ae);if(k&&ae&&re&&R.indexOf(fe)<0&&!(Ue(L)&&Array.isArray(ae))){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(E,ae,{...s,ns:p}):`key '${h} (${this.language})' returned an object instead of string.`;return c?(S.res=de,S.usedParams=this.getUsedParamsDetails(s),S):de}if(f){const de=Array.isArray(ae),Q=de?[]:{},ee=de?j:E;for(const A in ae)if(Object.prototype.hasOwnProperty.call(ae,A)){const X=`${ee}${f}${A}`;M&&!C?Q[A]=this.translate(X,{...s,defaultValue:bv(te)?te[A]:void 0,joinArrays:!1,ns:p}):Q[A]=this.translate(X,{...s,joinArrays:!1,ns:p}),Q[A]===X&&(Q[A]=ae[A])}C=Q}}else if(k&&Ue(L)&&Array.isArray(C))C=C.join(L),C&&(C=this.extendTranslation(C,a,s,i));else{let de=!1,Q=!1;!this.isValidLookup(C)&&M&&(de=!0,C=te),this.isValidLookup(C)||(Q=!0,C=h);const A=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&Q?void 0:C,X=M&&te!==C&&this.options.updateMissing;if(Q||de||X){if(this.logger.log(X?"updateKey":"missingKey",b,m,h,X?te:C),f){const G=this.resolve(h,{...s,keySeparator:!1});G&&G.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 V=[];const ye=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ye&&ye[0])for(let G=0;G<ye.length;G++)V.push(ye[G]);else this.options.saveMissingTo==="all"?V=this.languageUtils.toResolveHierarchy(s.lng||this.language):V.push(s.lng||this.language);const O=(G,U,K)=>{const P=M&&K!==C?K:A;this.options.missingKeyHandler?this.options.missingKeyHandler(G,m,U,P,X,s):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(G,m,U,P,X,s),this.emit("missingKey",G,m,U,C)};this.options.saveMissing&&(this.options.saveMissingPlurals&&H?V.forEach(G=>{const U=this.pluralResolver.getSuffixes(G,s);J&&s[`defaultValue${this.options.pluralSeparator}zero`]&&U.indexOf(`${this.options.pluralSeparator}zero`)<0&&U.push(`${this.options.pluralSeparator}zero`),U.forEach(K=>{O([G],h+K,s[`defaultValue${K}`]||te)})}):O(V,h,te))}C=this.extendTranslation(C,a,s,S,i),Q&&C===h&&this.options.appendNamespaceToMissingKey&&(C=`${m}${v}${h}`),(Q||de)&&this.options.parseMissingKeyHandler&&(C=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${m}${v}${h}`:h,de?C:void 0,s))}return c?(S.res=C,S.usedParams=this.getUsedParamsDetails(s),S):C}extendTranslation(a,l,i,s,c){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=Ue(a)&&(i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(p){const b=a.match(this.interpolator.nestingRegexp);m=b&&b.length}let v=i.replace&&!Ue(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(v={...this.options.interpolation.defaultVariables,...v}),a=this.interpolator.interpolate(a,v,i.lng||this.language||s.usedLng,i),p){const b=a.match(this.interpolator.nestingRegexp),w=b&&b.length;m<w&&(i.nest=!1)}!i.lng&&s&&s.res&&(i.lng=this.language||s.usedLng),i.nest!==!1&&(a=this.interpolator.nest(a,(...b)=>c?.[0]===b[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${b[0]} in key: ${l[0]}`),null):this.translate(...b,l),i)),i.interpolation&&this.interpolator.reset()}const f=i.postProcess||this.options.postProcess,h=Ue(f)?[f]:f;return a!=null&&h?.length&&i.applyPostProcessor!==!1&&(a=Jy.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,c,f,h;return Ue(a)&&(a=[a]),a.forEach(p=>{if(this.isValidLookup(i))return;const m=this.extractFromKey(p,l),v=m.key;s=v;let b=m.namespaces;this.options.fallbackNS&&(b=b.concat(this.options.fallbackNS));const w=l.count!==void 0&&!Ue(l.count),S=w&&!l.ordinal&&l.count===0,C=l.context!==void 0&&(Ue(l.context)||typeof l.context=="number")&&l.context!=="",E=l.lngs?l.lngs:this.languageUtils.toResolveHierarchy(l.lng||this.language,l.fallbackLng);b.forEach(j=>{this.isValidLookup(i)||(h=j,!yv[`${E[0]}-${j}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(h)&&(yv[`${E[0]}-${j}`]=!0,this.logger.warn(`key "${s}" for languages "${E.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!!!")),E.forEach(R=>{if(this.isValidLookup(i))return;f=R;const L=[v];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(L,v,R,j,l);else{let H;w&&(H=this.pluralResolver.getSuffix(R,l.count,l));const M=`${this.options.pluralSeparator}zero`,N=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(w&&(L.push(v+H),l.ordinal&&H.indexOf(N)===0&&L.push(v+H.replace(N,this.options.pluralSeparator)),S&&L.push(v+M)),C){const B=`${v}${this.options.contextSeparator}${l.context}`;L.push(B),w&&(L.push(B+H),l.ordinal&&H.indexOf(N)===0&&L.push(B+H.replace(N,this.options.pluralSeparator)),S&&L.push(B+M))}}let k;for(;k=L.pop();)this.isValidLookup(i)||(c=k,i=this.getResource(R,j,k,l))}))})}),{res:i,usedKey:s,exactUsedKey:c,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&&!Ue(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 c of l)delete s[c]}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 xv{constructor(a){this.options=a,this.supportedLngs=this.options.supportedLngs||!1,this.logger=In.create("languageUtils")}getScriptPartFromCode(a){if(a=po(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=po(a),!a||a.indexOf("-")<0)return a;const l=a.split("-");return this.formatLanguageCode(l[0])}formatLanguageCode(a){if(Ue(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 c=this.getLanguagePartFromCode(i);if(this.isSupportedCode(c))return l=c;l=this.options.supportedLngs.find(f=>{if(f===c)return f;if(!(f.indexOf("-")<0&&c.indexOf("-")<0)&&(f.indexOf("-")>0&&c.indexOf("-")<0&&f.substring(0,f.indexOf("-"))===c||f.indexOf(c)===0&&c.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)),Ue(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=[],c=f=>{f&&(this.isSupportedCode(f)?s.push(f):this.logger.warn(`rejecting language code not found in supportedLngs: ${f}`))};return Ue(a)&&(a.indexOf("-")>-1||a.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&c(this.formatLanguageCode(a)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&c(this.getScriptPartFromCode(a)),this.options.load!=="currentOnly"&&c(this.getLanguagePartFromCode(a))):Ue(a)&&c(this.formatLanguageCode(a)),i.forEach(f=>{s.indexOf(f)<0&&c(this.formatLanguageCode(f))}),s}}const wv={zero:0,one:1,two:2,few:3,many:4,other:5},Sv={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class fS{constructor(a,l={}){this.languageUtils=a,this.options=l,this.logger=In.create("pluralResolver"),this.pluralRulesCache={}}addRule(a,l){this.rules[a]=l}clearCache(){this.pluralRulesCache={}}getRule(a,l={}){const i=po(a==="dev"?"en":a),s=l.ordinal?"ordinal":"cardinal",c=JSON.stringify({cleanedCode:i,type:s});if(c in this.pluralRulesCache)return this.pluralRulesCache[c];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!"),Sv;if(!a.match(/-|_/))return Sv;const p=this.languageUtils.getLanguagePartFromCode(a);f=this.getRule(p,l)}return this.pluralRulesCache[c]=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,c)=>wv[s]-wv[c]).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 _v=(n,a,l,i=".",s=!0)=>{let c=aS(n,a,l);return!c&&s&&Ue(l)&&(c=jd(n,l,i),c===void 0&&(c=jd(a,l,i))),c},Jf=n=>n.replace(/\$/g,"$$$$");class dS{constructor(a={}){this.logger=In.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:c,prefixEscaped:f,suffix:h,suffixEscaped:p,formatSeparator:m,unescapeSuffix:v,unescapePrefix:b,nestingPrefix:w,nestingPrefixEscaped:S,nestingSuffix:C,nestingSuffixEscaped:E,nestingOptionsSeparator:j,maxReplaces:R,alwaysFormat:L}=a.interpolation;this.escape=l!==void 0?l:lS,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=c?zl(c):f||"{{",this.suffix=h?zl(h):p||"}}",this.formatSeparator=m||",",this.unescapePrefix=v?"":b||"-",this.unescapeSuffix=this.unescapePrefix?"":v||"",this.nestingPrefix=w?zl(w):S||zl("$t("),this.nestingSuffix=C?zl(C):E||zl(")"),this.nestingOptionsSeparator=j||",",this.maxReplaces=R||1e3,this.alwaysFormat=L!==void 0?L:!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 c,f,h;const p=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},m=S=>{if(S.indexOf(this.formatSeparator)<0){const R=_v(l,p,S,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(R,void 0,i,{...s,...l,interpolationkey:S}):R}const C=S.split(this.formatSeparator),E=C.shift().trim(),j=C.join(this.formatSeparator).trim();return this.format(_v(l,p,E,this.options.keySeparator,this.options.ignoreJSONStructure),j,i,{...s,...l,interpolationkey:E})};this.resetRegExp();const v=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,b=s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:S=>Jf(S)},{regex:this.regexp,safeValue:S=>this.escapeValue?Jf(this.escape(S)):Jf(S)}].forEach(S=>{for(h=0;c=S.regex.exec(a);){const C=c[1].trim();if(f=m(C),f===void 0)if(typeof v=="function"){const j=v(a,c,s);f=Ue(j)?j:""}else if(s&&Object.prototype.hasOwnProperty.call(s,C))f="";else if(b){f=c[0];continue}else this.logger.warn(`missed to pass in variable ${C} for interpolating ${a}`),f="";else!Ue(f)&&!this.useRawValueToEscape&&(f=hv(f));const E=S.safeValue(f);if(a=a.replace(c[0],E),b?(S.regex.lastIndex+=f.length,S.regex.lastIndex-=c[0].length):S.regex.lastIndex=0,h++,h>=this.maxReplaces)break}}),a}nest(a,l,i={}){let s,c,f;const h=(p,m)=>{const v=this.nestingOptionsSeparator;if(p.indexOf(v)<0)return p;const b=p.split(new RegExp(`${v}[ ]*{`));let w=`{${b[1]}`;p=b[0],w=this.interpolate(w,f);const S=w.match(/'/g),C=w.match(/"/g);((S?.length??0)%2===0&&!C||C.length%2!==0)&&(w=w.replace(/'/g,'"'));try{f=JSON.parse(w),m&&(f={...m,...f})}catch(E){return this.logger.warn(`failed parsing options string in nesting for key ${p}`,E),`${p}${v}${w}`}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&&!Ue(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(v=>v.trim()).filter(Boolean),s[1]=s[1].slice(0,m)),c=l(h.call(this,s[1].trim(),f),f),c&&s[0]===a&&!Ue(c))return c;Ue(c)||(c=hv(c)),c||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${a}`),c=""),p.length&&(c=p.reduce((v,b)=>this.format(v,b,i.lng,{...i,interpolationkey:s[1].trim()}),c.trim())),a=a.replace(s[0],c),this.regexp.lastIndex=0}return a}}const hS=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,""),v=h.trim();l[v]||(l[v]=m),m==="false"&&(l[v]=!1),m==="true"&&(l[v]=!0),isNaN(m)||(l[v]=parseInt(m,10))}})}return{formatName:a,formatOptions:l}},Ev=n=>{const a={};return(l,i,s)=>{let c=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(c={...c,[s.interpolationkey]:void 0});const f=i+JSON.stringify(c);let h=a[f];return h||(h=n(po(i),s),a[f]=h),h(l)}},mS=n=>(a,l,i)=>n(po(l),i)(a);class pS{constructor(a={}){this.logger=In.create("formatter"),this.options=a,this.init(a)}init(a,l={interpolation:{}}){this.formatSeparator=l.interpolation.formatSeparator||",";const i=l.cacheInBuiltFormats?Ev:mS;this.formats={number:i((s,c)=>{const f=new Intl.NumberFormat(s,{...c});return h=>f.format(h)}),currency:i((s,c)=>{const f=new Intl.NumberFormat(s,{...c,style:"currency"});return h=>f.format(h)}),datetime:i((s,c)=>{const f=new Intl.DateTimeFormat(s,{...c});return h=>f.format(h)}),relativetime:i((s,c)=>{const f=new Intl.RelativeTimeFormat(s,{...c});return h=>f.format(h,c.range||"day")}),list:i((s,c)=>{const f=new Intl.ListFormat(s,{...c});return h=>f.format(h)})}}add(a,l){this.formats[a.toLowerCase().trim()]=l}addCached(a,l){this.formats[a.toLowerCase().trim()]=Ev(l)}format(a,l,i,s={}){const c=l.split(this.formatSeparator);if(c.length>1&&c[0].indexOf("(")>1&&c[0].indexOf(")")<0&&c.find(h=>h.indexOf(")")>-1)){const h=c.findIndex(p=>p.indexOf(")")>-1);c[0]=[c[0],...c.splice(1,h)].join(this.formatSeparator)}return c.reduce((h,p)=>{const{formatName:m,formatOptions:v}=hS(p);if(this.formats[m]){let b=h;try{const w=s?.formatParams?.[s.interpolationkey]||{},S=w.locale||w.lng||s.locale||s.lng||i;b=this.formats[m](h,S,{...v,...s,...w})}catch(w){this.logger.warn(w)}return b}else this.logger.warn(`there was no format function for ${m}`);return h},a)}}const gS=(n,a)=>{n.pending[a]!==void 0&&(delete n.pending[a],n.pendingCount--)};class vS extends _c{constructor(a,l,i,s={}){super(),this.backend=a,this.store=l,this.services=i,this.languageUtils=i.languageUtils,this.options=s,this.logger=In.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 c={},f={},h={},p={};return a.forEach(m=>{let v=!0;l.forEach(b=>{const w=`${m}|${b}`;!i.reload&&this.store.hasResourceBundle(m,b)?this.state[w]=2:this.state[w]<0||(this.state[w]===1?f[w]===void 0&&(f[w]=!0):(this.state[w]=1,v=!1,f[w]===void 0&&(f[w]=!0),c[w]===void 0&&(c[w]=!0),p[b]===void 0&&(p[b]=!0)))}),v||(h[m]=!0)}),(Object.keys(c).length||Object.keys(f).length)&&this.queue.push({pending:f,pendingCount:Object.keys(f).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(c),pending:Object.keys(f),toLoadLanguages:Object.keys(h),toLoadNamespaces:Object.keys(p)}}loaded(a,l,i){const s=a.split("|"),c=s[0],f=s[1];l&&this.emit("failedLoading",c,f,l),!l&&i&&this.store.addResourceBundle(c,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=>{nS(p.loaded,[c],f),gS(p,a),l&&p.errors.push(l),p.pendingCount===0&&!p.done&&(Object.keys(p.loaded).forEach(m=>{h[m]||(h[m]={});const v=p.loaded[m];v.length&&v.forEach(b=>{h[m][b]===void 0&&(h[m][b]=!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,c=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:c,callback:f});return}this.readingCalls++;const h=(m,v)=>{if(this.readingCalls--,this.waitingReads.length>0){const b=this.waitingReads.shift();this.read(b.lng,b.ns,b.fcName,b.tried,b.wait,b.callback)}if(m&&v&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,a,l,i,s+1,c*2,f)},c);return}f(m,v)},p=this.backend[i].bind(this.backend);if(p.length===2){try{const m=p(a,l);m&&typeof m.then=="function"?m.then(v=>h(null,v)).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();Ue(a)&&(a=this.languageUtils.toResolveHierarchy(a)),Ue(l)&&(l=[l]);const c=this.queueLoad(a,l,i,s);if(!c.toLoad.length)return c.pending.length||s(),null;c.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],c=i[1];this.read(s,c,"read",void 0,void 0,(f,h)=>{f&&this.logger.warn(`${l}loading namespace ${c} for language ${s} failed`,f),!f&&h&&this.logger.log(`${l}loaded namespace ${c} for language ${s}`,h),this.loaded(a,f,h)})}saveMissing(a,l,i,s,c,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:c},m=this.backend.create.bind(this.backend);if(m.length<6)try{let v;m.length===5?v=m(a,l,i,s,p):v=m(a,l,i,s),v&&typeof v.then=="function"?v.then(b=>h(null,b)).catch(h):h(null,v)}catch(v){h(v)}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]),Ue(n[1])&&(a.defaultValue=n[1]),Ue(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}),Nv=n=>(Ue(n.ns)&&(n.ns=[n.ns]),Ue(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),Ue(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),Fs=()=>{},yS=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(l=>{typeof n[l]=="function"&&(n[l]=n[l].bind(n))})};class go extends _c{constructor(a={},l){if(super(),this.options=Nv(a),this.services={},this.logger=In,this.modules={external:[]},yS(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&&(Ue(a.ns)?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));const i=Cv();this.options={...i,...this.options,...Nv(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?In.init(s(this.modules.logger),this.options):In.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:m=pS;const v=new xv(this.options);this.store=new vv(this.options.resources,this.options);const b=this.services;b.logger=In,b.resourceStore=this.store,b.languageUtils=v,b.pluralResolver=new fS(v,{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)&&(b.formatter=s(m),b.formatter.init&&b.formatter.init(b,this.options),this.options.interpolation.format=b.formatter.format.bind(b.formatter)),b.interpolator=new dS(this.options),b.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},b.backendConnector=new vS(s(this.modules.backend),b.resourceStore,b,this.options),b.backendConnector.on("*",(S,...C)=>{this.emit(S,...C)}),this.modules.languageDetector&&(b.languageDetector=s(this.modules.languageDetector),b.languageDetector.init&&b.languageDetector.init(b,this.options.detection,this.options)),this.modules.i18nFormat&&(b.i18nFormat=s(this.modules.i18nFormat),b.i18nFormat.init&&b.i18nFormat.init(this)),this.translator=new hc(this.services,this.options),this.translator.on("*",(S,...C)=>{this.emit(S,...C)}),this.modules.external.forEach(S=>{S.init&&S.init(this)})}if(this.format=this.options.interpolation.format,l||(l=Fs),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]=(...v)=>this.store[m](...v)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=(...v)=>(this.store[m](...v),this)});const h=no(),p=()=>{const m=(v,b)=>{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(b),l(v,b)};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=Fs){let i=l;const s=Ue(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 c=[],f=h=>{if(!h||h==="cimode")return;this.services.languageUtils.toResolveHierarchy(h).forEach(m=>{m!=="cimode"&&c.indexOf(m)<0&&c.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(c,this.options.ns,h=>{!h&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(h)})}else i(null)}reloadResources(a,l,i){const s=no();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=Fs),this.services.backendConnector.reload(a,l,c=>{s.resolve(),i(c)}),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"&&Jy.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=no();this.emit("languageChanging",a);const s=h=>{this.language=h,this.languages=this.services.languageUtils.toResolveHierarchy(h),this.resolvedLanguage=void 0,this.setResolvedLanguage(h)},c=(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=Ue(h)?h:h&&h[0],m=this.store.hasLanguageSomeTranslations(p)?p:this.services.languageUtils.getBestMatchFromCodes(Ue(h)?[h]:h);m&&(this.language||s(m),this.translator.language||this.translator.changeLanguage(m),this.services.languageDetector?.cacheUserLanguage?.(m)),this.loadResources(m,v=>{c(v,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=(c,f,...h)=>{let p;typeof f!="object"?p=this.options.overloadTranslationOptionHandler([c,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 v;return p.keyPrefix&&Array.isArray(c)?v=c.map(b=>`${p.keyPrefix}${m}${b}`):v=p.keyPrefix?`${p.keyPrefix}${m}${c}`:c,this.t(v,p)};return Ue(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,c=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(c,a)))}loadNamespaces(a,l){const i=no();return this.options.ns?(Ue(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=no();Ue(a)&&(a=[a]);const s=this.options.preload||[],c=a.filter(f=>s.indexOf(f)<0&&this.services.languageUtils.isSupportedCode(f));return c.length?(this.options.preload=s.concat(c),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 c=s.getTextInfo();if(c&&c.direction)return c.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 xv(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 go(a,l)}cloneInstance(a={},l=Fs){const i=a.forkResourceStore;i&&delete a.forkResourceStore;const s={...this.options,...a,isClone:!0},c=new go(s);if((a.debug!==void 0||a.prefix!==void 0)&&(c.logger=c.logger.clone(a)),["store","services","language"].forEach(h=>{c[h]=this[h]}),c.services={...this.services},c.services.utils={hasLoadedNamespace:c.hasLoadedNamespace.bind(c)},i){const h=Object.keys(this.store.data).reduce((p,m)=>(p[m]={...this.store.data[m]},p[m]=Object.keys(p[m]).reduce((v,b)=>(v[b]={...p[m][b]},v),p[m]),p),{});c.store=new vv(h,s),c.services.resourceStore=c.store}return c.translator=new hc(c.services,s),c.translator.on("*",(h,...p)=>{c.emit(h,...p)}),c.init(s,l),c.translator.options=s,c.translator.backendConnector.services.utils={hasLoadedNamespace:c.hasLoadedNamespace.bind(c)},c}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Kt=go.createInstance();Kt.createInstance=go.createInstance;Kt.createInstance;Kt.dir;Kt.init;Kt.loadResources;Kt.reloadResources;Kt.use;Kt.changeLanguage;Kt.getFixedT;Kt.t;Kt.exists;Kt.setDefaultNamespace;Kt.hasLoadedNamespace;Kt.loadNamespaces;Kt.loadLanguages;var Wf={exports:{}},Be={};/**
15
+ */var Ev;function kS(){if(Ev)return oi;Ev=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function l(o,s,c){var f=null;if(c!==void 0&&(f=""+c),s.key!==void 0&&(f=""+s.key),"key"in s){c={};for(var m in s)m!=="key"&&(c[m]=s[m])}else c=s;return s=c.ref,{$$typeof:n,type:o,key:f,ref:s!==void 0?s:null,props:c}}return oi.Fragment=a,oi.jsx=l,oi.jsxs=l,oi}var Nv;function zS(){return Nv||(Nv=1,od.exports=kS()),od.exports}var d=zS();const $e=n=>typeof n=="string",ii=()=>{let n,a;const l=new Promise((o,s)=>{n=o,a=s});return l.resolve=n,l.reject=a,l},Cv=n=>n==null?"":""+n,US=(n,a,l)=>{n.forEach(o=>{a[o]&&(l[o]=a[o])})},PS=/###/g,jv=n=>n&&n.indexOf("###")>-1?n.replace(PS,"."):n,Rv=n=>!n||$e(n),yi=(n,a,l)=>{const o=$e(a)?a.split("."):a;let s=0;for(;s<o.length-1;){if(Rv(n))return{};const c=jv(o[s]);!n[c]&&l&&(n[c]=new l),Object.prototype.hasOwnProperty.call(n,c)?n=n[c]:n={},++s}return Rv(n)?{}:{obj:n,k:jv(o[s])}},Ov=(n,a,l)=>{const{obj:o,k:s}=yi(n,a,Object);if(o!==void 0||a.length===1){o[s]=l;return}let c=a[a.length-1],f=a.slice(0,a.length-1),m=yi(n,f,Object);for(;m.obj===void 0&&f.length;)c=`${f[f.length-1]}.${c}`,f=f.slice(0,f.length-1),m=yi(n,f,Object),m?.obj&&typeof m.obj[`${m.k}.${c}`]<"u"&&(m.obj=void 0);m.obj[`${m.k}.${c}`]=l},HS=(n,a,l,o)=>{const{obj:s,k:c}=yi(n,a,Object);s[c]=s[c]||[],s[c].push(l)},wc=(n,a)=>{const{obj:l,k:o}=yi(n,a);if(l&&Object.prototype.hasOwnProperty.call(l,o))return l[o]},BS=(n,a,l)=>{const o=wc(n,l);return o!==void 0?o:wc(a,l)},h0=(n,a,l)=>{for(const o in a)o!=="__proto__"&&o!=="constructor"&&(o in n?$e(n[o])||n[o]instanceof String||$e(a[o])||a[o]instanceof String?l&&(n[o]=a[o]):h0(n[o],a[o],l):n[o]=a[o]);return n},Hl=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var $S={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const qS=n=>$e(n)?n.replace(/[&<>"'\/]/g,a=>$S[a]):n;class FS{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 o=new RegExp(a);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(a,o),this.regExpQueue.push(a),o}}const VS=[" ",",","?","!",";"],GS=new FS(20),YS=(n,a,l)=>{a=a||"",l=l||"";const o=VS.filter(f=>a.indexOf(f)<0&&l.indexOf(f)<0);if(o.length===0)return!0;const s=GS.getRegExp(`(${o.map(f=>f==="?"?"\\?":f).join("|")})`);let c=!s.test(n);if(!c){const f=n.indexOf(l);f>0&&!s.test(n.substring(0,f))&&(c=!0)}return c},Pd=(n,a,l=".")=>{if(!n)return;if(n[a])return Object.prototype.hasOwnProperty.call(n,a)?n[a]:void 0;const o=a.split(l);let s=n;for(let c=0;c<o.length;){if(!s||typeof s!="object")return;let f,m="";for(let g=c;g<o.length;++g)if(g!==c&&(m+=l),m+=o[g],f=s[m],f!==void 0){if(["string","number","boolean"].indexOf(typeof f)>-1&&g<o.length-1)continue;c+=g-c+1;break}s=f}return s},wi=n=>n?.replace("_","-"),KS={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 Sc{constructor(a,l={}){this.init(a,l)}init(a,l={}){this.prefix=l.prefix||"i18next:",this.logger=a||KS,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,o,s){return s&&!this.debug?null:($e(a[0])&&(a[0]=`${o}${this.prefix} ${a[0]}`),this.logger[l](a))}create(a){return new Sc(this.logger,{prefix:`${this.prefix}:${a}:`,...this.options})}clone(a){return a=a||this.options,a.prefix=a.prefix||this.prefix,new Sc(this.logger,a)}}var Zn=new Sc;class Lc{constructor(){this.observers={}}on(a,l){return a.split(" ").forEach(o=>{this.observers[o]||(this.observers[o]=new Map);const s=this.observers[o].get(l)||0;this.observers[o].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,c])=>{for(let f=0;f<c;f++)s(...l)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,c])=>{for(let f=0;f<c;f++)s.apply(s,[a,...l])})}}class Av extends Lc{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,o,s={}){const c=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,f=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let m;a.indexOf(".")>-1?m=a.split("."):(m=[a,l],o&&(Array.isArray(o)?m.push(...o):$e(o)&&c?m.push(...o.split(c)):m.push(o)));const g=wc(this.data,m);return!g&&!l&&!o&&a.indexOf(".")>-1&&(a=m[0],l=m[1],o=m.slice(2).join(".")),g||!f||!$e(o)?g:Pd(this.data?.[a]?.[l],o,c)}addResource(a,l,o,s,c={silent:!1}){const f=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator;let m=[a,l];o&&(m=m.concat(f?o.split(f):o)),a.indexOf(".")>-1&&(m=a.split("."),s=l,l=m[1]),this.addNamespaces(l),Ov(this.data,m,s),c.silent||this.emit("added",a,l,o,s)}addResources(a,l,o,s={silent:!1}){for(const c in o)($e(o[c])||Array.isArray(o[c]))&&this.addResource(a,l,c,o[c],{silent:!0});s.silent||this.emit("added",a,l,o)}addResourceBundle(a,l,o,s,c,f={silent:!1,skipCopy:!1}){let m=[a,l];a.indexOf(".")>-1&&(m=a.split("."),s=o,o=l,l=m[1]),this.addNamespaces(l);let g=wc(this.data,m)||{};f.skipCopy||(o=JSON.parse(JSON.stringify(o))),s?h0(g,o,c):g={...g,...o},Ov(this.data,m,g),f.silent||this.emit("added",a,l,o)}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 m0={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,a,l,o,s){return n.forEach(c=>{a=this.processors[c]?.process(a,l,o,s)??a}),a}};const Tv={},Mv=n=>!$e(n)&&typeof n!="boolean"&&typeof n!="number";class _c extends Lc{constructor(a,l={}){super(),US(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],a,this),this.options=l,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Zn.create("translator")}changeLanguage(a){a&&(this.language=a)}exists(a,l={interpolation:{}}){const o={...l};return a==null?!1:this.resolve(a,o)?.res!==void 0}extractFromKey(a,l){let o=l.nsSeparator!==void 0?l.nsSeparator:this.options.nsSeparator;o===void 0&&(o=":");const s=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator;let c=l.ns||this.options.defaultNS||[];const f=o&&a.indexOf(o)>-1,m=!this.options.userDefinedKeySeparator&&!l.keySeparator&&!this.options.userDefinedNsSeparator&&!l.nsSeparator&&!YS(a,o,s);if(f&&!m){const g=a.match(this.interpolator.nestingRegexp);if(g&&g.length>0)return{key:a,namespaces:$e(c)?[c]:c};const h=a.split(o);(o!==s||o===s&&this.options.ns.indexOf(h[0])>-1)&&(c=h.shift()),a=h.join(s)}return{key:a,namespaces:$e(c)?[c]:c}}translate(a,l,o){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 c=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,f=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:m,namespaces:g}=this.extractFromKey(a[a.length-1],s),h=g[g.length-1];let v=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;v===void 0&&(v=":");const b=s.lng||this.language,w=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(b?.toLowerCase()==="cimode")return w?c?{res:`${h}${v}${m}`,usedKey:m,exactUsedKey:m,usedLng:b,usedNS:h,usedParams:this.getUsedParamsDetails(s)}:`${h}${v}${m}`:c?{res:m,usedKey:m,exactUsedKey:m,usedLng:b,usedNS:h,usedParams:this.getUsedParamsDetails(s)}:m;const S=this.resolve(a,s);let N=S?.res;const E=S?.usedKey||m,R=S?.exactUsedKey||m,C=["[object Number]","[object Function]","[object RegExp]"],A=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,T=!this.i18nFormat||this.i18nFormat.handleAsObject,k=s.count!==void 0&&!$e(s.count),D=_c.hasDefaultValue(s),j=k?this.pluralResolver.getSuffix(b,s.count,s):"",U=s.ordinal&&k?this.pluralResolver.getSuffix(b,s.count,{ordinal:!1}):"",B=k&&!s.ordinal&&s.count===0,W=B&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${j}`]||s[`defaultValue${U}`]||s.defaultValue;let ne=N;T&&!N&&D&&(ne=W);const ee=Mv(ne),ie=Object.prototype.toString.apply(ne);if(T&&ne&&ee&&C.indexOf(ie)<0&&!($e(A)&&Array.isArray(ne))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const fe=this.options.returnedObjectHandler?this.options.returnedObjectHandler(E,ne,{...s,ns:g}):`key '${m} (${this.language})' returned an object instead of string.`;return c?(S.res=fe,S.usedParams=this.getUsedParamsDetails(s),S):fe}if(f){const fe=Array.isArray(ne),X=fe?[]:{},te=fe?R:E;for(const O in ne)if(Object.prototype.hasOwnProperty.call(ne,O)){const I=`${te}${f}${O}`;D&&!N?X[O]=this.translate(I,{...s,defaultValue:Mv(W)?W[O]:void 0,joinArrays:!1,ns:g}):X[O]=this.translate(I,{...s,joinArrays:!1,ns:g}),X[O]===I&&(X[O]=ne[O])}N=X}}else if(T&&$e(A)&&Array.isArray(N))N=N.join(A),N&&(N=this.extendTranslation(N,a,s,o));else{let fe=!1,X=!1;!this.isValidLookup(N)&&D&&(fe=!0,N=W),this.isValidLookup(N)||(X=!0,N=m);const O=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&X?void 0:N,I=D&&W!==N&&this.options.updateMissing;if(X||fe||I){if(this.logger.log(I?"updateKey":"missingKey",b,h,m,I?W:N),f){const Y=this.resolve(m,{...s,keySeparator:!1});Y&&Y.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 ye=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ye&&ye[0])for(let Y=0;Y<ye.length;Y++)q.push(ye[Y]);else this.options.saveMissingTo==="all"?q=this.languageUtils.toResolveHierarchy(s.lng||this.language):q.push(s.lng||this.language);const M=(Y,H,K)=>{const le=D&&K!==N?K:O;this.options.missingKeyHandler?this.options.missingKeyHandler(Y,h,H,le,I,s):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(Y,h,H,le,I,s),this.emit("missingKey",Y,h,H,N)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?q.forEach(Y=>{const H=this.pluralResolver.getSuffixes(Y,s);B&&s[`defaultValue${this.options.pluralSeparator}zero`]&&H.indexOf(`${this.options.pluralSeparator}zero`)<0&&H.push(`${this.options.pluralSeparator}zero`),H.forEach(K=>{M([Y],m+K,s[`defaultValue${K}`]||W)})}):M(q,m,W))}N=this.extendTranslation(N,a,s,S,o),X&&N===m&&this.options.appendNamespaceToMissingKey&&(N=`${h}${v}${m}`),(X||fe)&&this.options.parseMissingKeyHandler&&(N=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${h}${v}${m}`:m,fe?N:void 0,s))}return c?(S.res=N,S.usedParams=this.getUsedParamsDetails(s),S):N}extendTranslation(a,l,o,s,c){if(this.i18nFormat?.parse)a=this.i18nFormat.parse(a,{...this.options.interpolation.defaultVariables,...o},o.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!o.skipInterpolation){o.interpolation&&this.interpolator.init({...o,interpolation:{...this.options.interpolation,...o.interpolation}});const g=$e(a)&&(o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let h;if(g){const b=a.match(this.interpolator.nestingRegexp);h=b&&b.length}let v=o.replace&&!$e(o.replace)?o.replace:o;if(this.options.interpolation.defaultVariables&&(v={...this.options.interpolation.defaultVariables,...v}),a=this.interpolator.interpolate(a,v,o.lng||this.language||s.usedLng,o),g){const b=a.match(this.interpolator.nestingRegexp),w=b&&b.length;h<w&&(o.nest=!1)}!o.lng&&s&&s.res&&(o.lng=this.language||s.usedLng),o.nest!==!1&&(a=this.interpolator.nest(a,(...b)=>c?.[0]===b[0]&&!o.context?(this.logger.warn(`It seems you are nesting recursively key: ${b[0]} in key: ${l[0]}`),null):this.translate(...b,l),o)),o.interpolation&&this.interpolator.reset()}const f=o.postProcess||this.options.postProcess,m=$e(f)?[f]:f;return a!=null&&m?.length&&o.applyPostProcessor!==!1&&(a=m0.handle(m,a,l,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(o)},...o}:o,this)),a}resolve(a,l={}){let o,s,c,f,m;return $e(a)&&(a=[a]),a.forEach(g=>{if(this.isValidLookup(o))return;const h=this.extractFromKey(g,l),v=h.key;s=v;let b=h.namespaces;this.options.fallbackNS&&(b=b.concat(this.options.fallbackNS));const w=l.count!==void 0&&!$e(l.count),S=w&&!l.ordinal&&l.count===0,N=l.context!==void 0&&($e(l.context)||typeof l.context=="number")&&l.context!=="",E=l.lngs?l.lngs:this.languageUtils.toResolveHierarchy(l.lng||this.language,l.fallbackLng);b.forEach(R=>{this.isValidLookup(o)||(m=R,!Tv[`${E[0]}-${R}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(m)&&(Tv[`${E[0]}-${R}`]=!0,this.logger.warn(`key "${s}" for languages "${E.join(", ")}" won't get resolved as namespace "${m}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),E.forEach(C=>{if(this.isValidLookup(o))return;f=C;const A=[v];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(A,v,C,R,l);else{let k;w&&(k=this.pluralResolver.getSuffix(C,l.count,l));const D=`${this.options.pluralSeparator}zero`,j=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(w&&(A.push(v+k),l.ordinal&&k.indexOf(j)===0&&A.push(v+k.replace(j,this.options.pluralSeparator)),S&&A.push(v+D)),N){const U=`${v}${this.options.contextSeparator}${l.context}`;A.push(U),w&&(A.push(U+k),l.ordinal&&k.indexOf(j)===0&&A.push(U+k.replace(j,this.options.pluralSeparator)),S&&A.push(U+D))}}let T;for(;T=A.pop();)this.isValidLookup(o)||(c=T,o=this.getResource(C,R,T,l))}))})}),{res:o,usedKey:s,exactUsedKey:c,usedLng:f,usedNS:m}}isValidLookup(a){return a!==void 0&&!(!this.options.returnNull&&a===null)&&!(!this.options.returnEmptyString&&a==="")}getResource(a,l,o,s={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(a,l,o,s):this.resourceStore.getResource(a,l,o,s)}getUsedParamsDetails(a={}){const l=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],o=a.replace&&!$e(a.replace);let s=o?a.replace:a;if(o&&typeof a.count<"u"&&(s.count=a.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!o){s={...s};for(const c of l)delete s[c]}return s}static hasDefaultValue(a){const l="defaultValue";for(const o in a)if(Object.prototype.hasOwnProperty.call(a,o)&&l===o.substring(0,l.length)&&a[o]!==void 0)return!0;return!1}}class Dv{constructor(a){this.options=a,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Zn.create("languageUtils")}getScriptPartFromCode(a){if(a=wi(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=wi(a),!a||a.indexOf("-")<0)return a;const l=a.split("-");return this.formatLanguageCode(l[0])}formatLanguageCode(a){if($e(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(o=>{if(l)return;const s=this.formatLanguageCode(o);(!this.options.supportedLngs||this.isSupportedCode(s))&&(l=s)}),!l&&this.options.supportedLngs&&a.forEach(o=>{if(l)return;const s=this.getScriptPartFromCode(o);if(this.isSupportedCode(s))return l=s;const c=this.getLanguagePartFromCode(o);if(this.isSupportedCode(c))return l=c;l=this.options.supportedLngs.find(f=>{if(f===c)return f;if(!(f.indexOf("-")<0&&c.indexOf("-")<0)&&(f.indexOf("-")>0&&c.indexOf("-")<0&&f.substring(0,f.indexOf("-"))===c||f.indexOf(c)===0&&c.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)),$e(a)&&(a=[a]),Array.isArray(a))return a;if(!l)return a.default||[];let o=a[l];return o||(o=a[this.getScriptPartFromCode(l)]),o||(o=a[this.formatLanguageCode(l)]),o||(o=a[this.getLanguagePartFromCode(l)]),o||(o=a.default),o||[]}toResolveHierarchy(a,l){const o=this.getFallbackCodes((l===!1?[]:l)||this.options.fallbackLng||[],a),s=[],c=f=>{f&&(this.isSupportedCode(f)?s.push(f):this.logger.warn(`rejecting language code not found in supportedLngs: ${f}`))};return $e(a)&&(a.indexOf("-")>-1||a.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&c(this.formatLanguageCode(a)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&c(this.getScriptPartFromCode(a)),this.options.load!=="currentOnly"&&c(this.getLanguagePartFromCode(a))):$e(a)&&c(this.formatLanguageCode(a)),o.forEach(f=>{s.indexOf(f)<0&&c(this.formatLanguageCode(f))}),s}}const Lv={zero:0,one:1,two:2,few:3,many:4,other:5},kv={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class IS{constructor(a,l={}){this.languageUtils=a,this.options=l,this.logger=Zn.create("pluralResolver"),this.pluralRulesCache={}}addRule(a,l){this.rules[a]=l}clearCache(){this.pluralRulesCache={}}getRule(a,l={}){const o=wi(a==="dev"?"en":a),s=l.ordinal?"ordinal":"cardinal",c=JSON.stringify({cleanedCode:o,type:s});if(c in this.pluralRulesCache)return this.pluralRulesCache[c];let f;try{f=new Intl.PluralRules(o,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),kv;if(!a.match(/-|_/))return kv;const g=this.languageUtils.getLanguagePartFromCode(a);f=this.getRule(g,l)}return this.pluralRulesCache[c]=f,f}needsPlural(a,l={}){let o=this.getRule(a,l);return o||(o=this.getRule("dev",l)),o?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(a,l,o={}){return this.getSuffixes(a,o).map(s=>`${l}${s}`)}getSuffixes(a,l={}){let o=this.getRule(a,l);return o||(o=this.getRule("dev",l)),o?o.resolvedOptions().pluralCategories.sort((s,c)=>Lv[s]-Lv[c]).map(s=>`${this.options.prepend}${l.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(a,l,o={}){const s=this.getRule(a,o);return s?`${this.options.prepend}${o.ordinal?`ordinal${this.options.prepend}`:""}${s.select(l)}`:(this.logger.warn(`no plural rule found for: ${a}`),this.getSuffix("dev",l,o))}}const zv=(n,a,l,o=".",s=!0)=>{let c=BS(n,a,l);return!c&&s&&$e(l)&&(c=Pd(n,l,o),c===void 0&&(c=Pd(a,l,o))),c},id=n=>n.replace(/\$/g,"$$$$");class XS{constructor(a={}){this.logger=Zn.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:o,useRawValueToEscape:s,prefix:c,prefixEscaped:f,suffix:m,suffixEscaped:g,formatSeparator:h,unescapeSuffix:v,unescapePrefix:b,nestingPrefix:w,nestingPrefixEscaped:S,nestingSuffix:N,nestingSuffixEscaped:E,nestingOptionsSeparator:R,maxReplaces:C,alwaysFormat:A}=a.interpolation;this.escape=l!==void 0?l:qS,this.escapeValue=o!==void 0?o:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=c?Hl(c):f||"{{",this.suffix=m?Hl(m):g||"}}",this.formatSeparator=h||",",this.unescapePrefix=v?"":b||"-",this.unescapeSuffix=this.unescapePrefix?"":v||"",this.nestingPrefix=w?Hl(w):S||Hl("$t("),this.nestingSuffix=N?Hl(N):E||Hl(")"),this.nestingOptionsSeparator=R||",",this.maxReplaces=C||1e3,this.alwaysFormat=A!==void 0?A:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const a=(l,o)=>l?.source===o?(l.lastIndex=0,l):new RegExp(o,"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,o,s){let c,f,m;const g=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=S=>{if(S.indexOf(this.formatSeparator)<0){const C=zv(l,g,S,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(C,void 0,o,{...s,...l,interpolationkey:S}):C}const N=S.split(this.formatSeparator),E=N.shift().trim(),R=N.join(this.formatSeparator).trim();return this.format(zv(l,g,E,this.options.keySeparator,this.options.ignoreJSONStructure),R,o,{...s,...l,interpolationkey:E})};this.resetRegExp();const v=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,b=s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:S=>id(S)},{regex:this.regexp,safeValue:S=>this.escapeValue?id(this.escape(S)):id(S)}].forEach(S=>{for(m=0;c=S.regex.exec(a);){const N=c[1].trim();if(f=h(N),f===void 0)if(typeof v=="function"){const R=v(a,c,s);f=$e(R)?R:""}else if(s&&Object.prototype.hasOwnProperty.call(s,N))f="";else if(b){f=c[0];continue}else this.logger.warn(`missed to pass in variable ${N} for interpolating ${a}`),f="";else!$e(f)&&!this.useRawValueToEscape&&(f=Cv(f));const E=S.safeValue(f);if(a=a.replace(c[0],E),b?(S.regex.lastIndex+=f.length,S.regex.lastIndex-=c[0].length):S.regex.lastIndex=0,m++,m>=this.maxReplaces)break}}),a}nest(a,l,o={}){let s,c,f;const m=(g,h)=>{const v=this.nestingOptionsSeparator;if(g.indexOf(v)<0)return g;const b=g.split(new RegExp(`${v}[ ]*{`));let w=`{${b[1]}`;g=b[0],w=this.interpolate(w,f);const S=w.match(/'/g),N=w.match(/"/g);((S?.length??0)%2===0&&!N||N.length%2!==0)&&(w=w.replace(/'/g,'"'));try{f=JSON.parse(w),h&&(f={...h,...f})}catch(E){return this.logger.warn(`failed parsing options string in nesting for key ${g}`,E),`${g}${v}${w}`}return f.defaultValue&&f.defaultValue.indexOf(this.prefix)>-1&&delete f.defaultValue,g};for(;s=this.nestingRegexp.exec(a);){let g=[];f={...o},f=f.replace&&!$e(f.replace)?f.replace:f,f.applyPostProcessor=!1,delete f.defaultValue;const h=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(h!==-1&&(g=s[1].slice(h).split(this.formatSeparator).map(v=>v.trim()).filter(Boolean),s[1]=s[1].slice(0,h)),c=l(m.call(this,s[1].trim(),f),f),c&&s[0]===a&&!$e(c))return c;$e(c)||(c=Cv(c)),c||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${a}`),c=""),g.length&&(c=g.reduce((v,b)=>this.format(v,b,o.lng,{...o,interpolationkey:s[1].trim()}),c.trim())),a=a.replace(s[0],c),this.regexp.lastIndex=0}return a}}const QS=n=>{let a=n.toLowerCase().trim();const l={};if(n.indexOf("(")>-1){const o=n.split("(");a=o[0].toLowerCase().trim();const s=o[1].substring(0,o[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[m,...g]=f.split(":"),h=g.join(":").trim().replace(/^'+|'+$/g,""),v=m.trim();l[v]||(l[v]=h),h==="false"&&(l[v]=!1),h==="true"&&(l[v]=!0),isNaN(h)||(l[v]=parseInt(h,10))}})}return{formatName:a,formatOptions:l}},Uv=n=>{const a={};return(l,o,s)=>{let c=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(c={...c,[s.interpolationkey]:void 0});const f=o+JSON.stringify(c);let m=a[f];return m||(m=n(wi(o),s),a[f]=m),m(l)}},ZS=n=>(a,l,o)=>n(wi(l),o)(a);class JS{constructor(a={}){this.logger=Zn.create("formatter"),this.options=a,this.init(a)}init(a,l={interpolation:{}}){this.formatSeparator=l.interpolation.formatSeparator||",";const o=l.cacheInBuiltFormats?Uv:ZS;this.formats={number:o((s,c)=>{const f=new Intl.NumberFormat(s,{...c});return m=>f.format(m)}),currency:o((s,c)=>{const f=new Intl.NumberFormat(s,{...c,style:"currency"});return m=>f.format(m)}),datetime:o((s,c)=>{const f=new Intl.DateTimeFormat(s,{...c});return m=>f.format(m)}),relativetime:o((s,c)=>{const f=new Intl.RelativeTimeFormat(s,{...c});return m=>f.format(m,c.range||"day")}),list:o((s,c)=>{const f=new Intl.ListFormat(s,{...c});return m=>f.format(m)})}}add(a,l){this.formats[a.toLowerCase().trim()]=l}addCached(a,l){this.formats[a.toLowerCase().trim()]=Uv(l)}format(a,l,o,s={}){const c=l.split(this.formatSeparator);if(c.length>1&&c[0].indexOf("(")>1&&c[0].indexOf(")")<0&&c.find(m=>m.indexOf(")")>-1)){const m=c.findIndex(g=>g.indexOf(")")>-1);c[0]=[c[0],...c.splice(1,m)].join(this.formatSeparator)}return c.reduce((m,g)=>{const{formatName:h,formatOptions:v}=QS(g);if(this.formats[h]){let b=m;try{const w=s?.formatParams?.[s.interpolationkey]||{},S=w.locale||w.lng||s.locale||s.lng||o;b=this.formats[h](m,S,{...v,...s,...w})}catch(w){this.logger.warn(w)}return b}else this.logger.warn(`there was no format function for ${h}`);return m},a)}}const WS=(n,a)=>{n.pending[a]!==void 0&&(delete n.pending[a],n.pendingCount--)};class e_ extends Lc{constructor(a,l,o,s={}){super(),this.backend=a,this.store=l,this.services=o,this.languageUtils=o.languageUtils,this.options=s,this.logger=Zn.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?.(o,s.backend,s)}queueLoad(a,l,o,s){const c={},f={},m={},g={};return a.forEach(h=>{let v=!0;l.forEach(b=>{const w=`${h}|${b}`;!o.reload&&this.store.hasResourceBundle(h,b)?this.state[w]=2:this.state[w]<0||(this.state[w]===1?f[w]===void 0&&(f[w]=!0):(this.state[w]=1,v=!1,f[w]===void 0&&(f[w]=!0),c[w]===void 0&&(c[w]=!0),g[b]===void 0&&(g[b]=!0)))}),v||(m[h]=!0)}),(Object.keys(c).length||Object.keys(f).length)&&this.queue.push({pending:f,pendingCount:Object.keys(f).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(c),pending:Object.keys(f),toLoadLanguages:Object.keys(m),toLoadNamespaces:Object.keys(g)}}loaded(a,l,o){const s=a.split("|"),c=s[0],f=s[1];l&&this.emit("failedLoading",c,f,l),!l&&o&&this.store.addResourceBundle(c,f,o,void 0,void 0,{skipCopy:!0}),this.state[a]=l?-1:2,l&&o&&(this.state[a]=0);const m={};this.queue.forEach(g=>{HS(g.loaded,[c],f),WS(g,a),l&&g.errors.push(l),g.pendingCount===0&&!g.done&&(Object.keys(g.loaded).forEach(h=>{m[h]||(m[h]={});const v=g.loaded[h];v.length&&v.forEach(b=>{m[h][b]===void 0&&(m[h][b]=!0)})}),g.done=!0,g.errors.length?g.callback(g.errors):g.callback())}),this.emit("loaded",m),this.queue=this.queue.filter(g=>!g.done)}read(a,l,o,s=0,c=this.retryTimeout,f){if(!a.length)return f(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:a,ns:l,fcName:o,tried:s,wait:c,callback:f});return}this.readingCalls++;const m=(h,v)=>{if(this.readingCalls--,this.waitingReads.length>0){const b=this.waitingReads.shift();this.read(b.lng,b.ns,b.fcName,b.tried,b.wait,b.callback)}if(h&&v&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,a,l,o,s+1,c*2,f)},c);return}f(h,v)},g=this.backend[o].bind(this.backend);if(g.length===2){try{const h=g(a,l);h&&typeof h.then=="function"?h.then(v=>m(null,v)).catch(m):m(null,h)}catch(h){m(h)}return}return g(a,l,m)}prepareLoading(a,l,o={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();$e(a)&&(a=this.languageUtils.toResolveHierarchy(a)),$e(l)&&(l=[l]);const c=this.queueLoad(a,l,o,s);if(!c.toLoad.length)return c.pending.length||s(),null;c.toLoad.forEach(f=>{this.loadOne(f)})}load(a,l,o){this.prepareLoading(a,l,{},o)}reload(a,l,o){this.prepareLoading(a,l,{reload:!0},o)}loadOne(a,l=""){const o=a.split("|"),s=o[0],c=o[1];this.read(s,c,"read",void 0,void 0,(f,m)=>{f&&this.logger.warn(`${l}loading namespace ${c} for language ${s} failed`,f),!f&&m&&this.logger.log(`${l}loaded namespace ${c} for language ${s}`,m),this.loaded(a,f,m)})}saveMissing(a,l,o,s,c,f={},m=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(l)){this.logger.warn(`did not save key "${o}" 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(!(o==null||o==="")){if(this.backend?.create){const g={...f,isUpdate:c},h=this.backend.create.bind(this.backend);if(h.length<6)try{let v;h.length===5?v=h(a,l,o,s,g):v=h(a,l,o,s),v&&typeof v.then=="function"?v.then(b=>m(null,b)).catch(m):m(null,v)}catch(v){m(v)}else h(a,l,o,s,m,g)}!a||!a[0]||this.store.addResource(a[0],l,o,s)}}}const Pv=()=>({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]),$e(n[1])&&(a.defaultValue=n[1]),$e(n[2])&&(a.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const l=n[3]||n[2];Object.keys(l).forEach(o=>{a[o]=l[o]})}return a},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Hv=n=>($e(n.ns)&&(n.ns=[n.ns]),$e(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),$e(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),Js=()=>{},t_=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(l=>{typeof n[l]=="function"&&(n[l]=n[l].bind(n))})};class Si extends Lc{constructor(a={},l){if(super(),this.options=Hv(a),this.services={},this.logger=Zn,this.modules={external:[]},t_(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&&($e(a.ns)?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));const o=Pv();this.options={...o,...this.options,...Hv(a)},this.options.interpolation={...o.interpolation,...this.options.interpolation},a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator);const s=h=>h?typeof h=="function"?new h:h:null;if(!this.options.isClone){this.modules.logger?Zn.init(s(this.modules.logger),this.options):Zn.init(null,this.options);let h;this.modules.formatter?h=this.modules.formatter:h=JS;const v=new Dv(this.options);this.store=new Av(this.options.resources,this.options);const b=this.services;b.logger=Zn,b.resourceStore=this.store,b.languageUtils=v,b.pluralResolver=new IS(v,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==o.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"),h&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(b.formatter=s(h),b.formatter.init&&b.formatter.init(b,this.options),this.options.interpolation.format=b.formatter.format.bind(b.formatter)),b.interpolator=new XS(this.options),b.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},b.backendConnector=new e_(s(this.modules.backend),b.resourceStore,b,this.options),b.backendConnector.on("*",(S,...N)=>{this.emit(S,...N)}),this.modules.languageDetector&&(b.languageDetector=s(this.modules.languageDetector),b.languageDetector.init&&b.languageDetector.init(b,this.options.detection,this.options)),this.modules.i18nFormat&&(b.i18nFormat=s(this.modules.i18nFormat),b.i18nFormat.init&&b.i18nFormat.init(this)),this.translator=new _c(this.services,this.options),this.translator.on("*",(S,...N)=>{this.emit(S,...N)}),this.modules.external.forEach(S=>{S.init&&S.init(this)})}if(this.format=this.options.interpolation.format,l||(l=Js),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.length>0&&h[0]!=="dev"&&(this.options.lng=h[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(h=>{this[h]=(...v)=>this.store[h](...v)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(h=>{this[h]=(...v)=>(this.store[h](...v),this)});const m=ii(),g=()=>{const h=(v,b)=>{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),m.resolve(b),l(v,b)};if(this.languages&&!this.isInitialized)return h(null,this.t.bind(this));this.changeLanguage(this.options.lng,h)};return this.options.resources||!this.options.initAsync?g():setTimeout(g,0),m}loadResources(a,l=Js){let o=l;const s=$e(a)?a:this.language;if(typeof a=="function"&&(o=a),!this.options.resources||this.options.partialBundledLanguages){if(s?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return o();const c=[],f=m=>{if(!m||m==="cimode")return;this.services.languageUtils.toResolveHierarchy(m).forEach(h=>{h!=="cimode"&&c.indexOf(h)<0&&c.push(h)})};s?f(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(g=>f(g)),this.options.preload?.forEach?.(m=>f(m)),this.services.backendConnector.load(c,this.options.ns,m=>{!m&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),o(m)})}else o(null)}reloadResources(a,l,o){const s=ii();return typeof a=="function"&&(o=a,a=void 0),typeof l=="function"&&(o=l,l=void 0),a||(a=this.languages),l||(l=this.options.ns),o||(o=Js),this.services.backendConnector.reload(a,l,c=>{s.resolve(),o(c)}),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"&&m0.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 o=this.languages[l];if(!(["cimode","dev"].indexOf(o)>-1)&&this.store.hasLanguageSomeTranslations(o)){this.resolvedLanguage=o;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 o=ii();this.emit("languageChanging",a);const s=m=>{this.language=m,this.languages=this.services.languageUtils.toResolveHierarchy(m),this.resolvedLanguage=void 0,this.setResolvedLanguage(m)},c=(m,g)=>{g?this.isLanguageChangingTo===a&&(s(g),this.translator.changeLanguage(g),this.isLanguageChangingTo=void 0,this.emit("languageChanged",g),this.logger.log("languageChanged",g)):this.isLanguageChangingTo=void 0,o.resolve((...h)=>this.t(...h)),l&&l(m,(...h)=>this.t(...h))},f=m=>{!a&&!m&&this.services.languageDetector&&(m=[]);const g=$e(m)?m:m&&m[0],h=this.store.hasLanguageSomeTranslations(g)?g:this.services.languageUtils.getBestMatchFromCodes($e(m)?[m]:m);h&&(this.language||s(h),this.translator.language||this.translator.changeLanguage(h),this.services.languageDetector?.cacheUserLanguage?.(h)),this.loadResources(h,v=>{c(v,h)})};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),o}getFixedT(a,l,o){const s=(c,f,...m)=>{let g;typeof f!="object"?g=this.options.overloadTranslationOptionHandler([c,f].concat(m)):g={...f},g.lng=g.lng||s.lng,g.lngs=g.lngs||s.lngs,g.ns=g.ns||s.ns,g.keyPrefix!==""&&(g.keyPrefix=g.keyPrefix||o||s.keyPrefix);const h=this.options.keySeparator||".";let v;return g.keyPrefix&&Array.isArray(c)?v=c.map(b=>`${g.keyPrefix}${h}${b}`):v=g.keyPrefix?`${g.keyPrefix}${h}${c}`:c,this.t(v,g)};return $e(a)?s.lng=a:s.lngs=a,s.ns=l,s.keyPrefix=o,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 o=l.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,c=this.languages[this.languages.length-1];if(o.toLowerCase()==="cimode")return!0;const f=(m,g)=>{const h=this.services.backendConnector.state[`${m}|${g}`];return h===-1||h===0||h===2};if(l.precheck){const m=l.precheck(this,f);if(m!==void 0)return m}return!!(this.hasResourceBundle(o,a)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||f(o,a)&&(!s||f(c,a)))}loadNamespaces(a,l){const o=ii();return this.options.ns?($e(a)&&(a=[a]),a.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{o.resolve(),l&&l(s)}),o):(l&&l(),Promise.resolve())}loadLanguages(a,l){const o=ii();$e(a)&&(a=[a]);const s=this.options.preload||[],c=a.filter(f=>s.indexOf(f)<0&&this.services.languageUtils.isSupportedCode(f));return c.length?(this.options.preload=s.concat(c),this.loadResources(f=>{o.resolve(),l&&l(f)}),o):(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 c=s.getTextInfo();if(c&&c.direction)return c.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"],o=this.services?.languageUtils||new Dv(Pv());return a.toLowerCase().indexOf("-latn")>1?"ltr":l.indexOf(o.getLanguagePartFromCode(a))>-1||a.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(a={},l){return new Si(a,l)}cloneInstance(a={},l=Js){const o=a.forkResourceStore;o&&delete a.forkResourceStore;const s={...this.options,...a,isClone:!0},c=new Si(s);if((a.debug!==void 0||a.prefix!==void 0)&&(c.logger=c.logger.clone(a)),["store","services","language"].forEach(m=>{c[m]=this[m]}),c.services={...this.services},c.services.utils={hasLoadedNamespace:c.hasLoadedNamespace.bind(c)},o){const m=Object.keys(this.store.data).reduce((g,h)=>(g[h]={...this.store.data[h]},g[h]=Object.keys(g[h]).reduce((v,b)=>(v[b]={...g[h][b]},v),g[h]),g),{});c.store=new Av(m,s),c.services.resourceStore=c.store}return c.translator=new _c(c.services,s),c.translator.on("*",(m,...g)=>{c.emit(m,...g)}),c.init(s,l),c.translator.options=s,c.translator.backendConnector.services.utils={hasLoadedNamespace:c.hasLoadedNamespace.bind(c)},c}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Xt=Si.createInstance();Xt.createInstance=Si.createInstance;Xt.createInstance;Xt.dir;Xt.init;Xt.loadResources;Xt.reloadResources;Xt.use;Xt.changeLanguage;Xt.getFixedT;Xt.t;Xt.exists;Xt.setDefaultNamespace;Xt.hasLoadedNamespace;Xt.loadNamespaces;Xt.loadLanguages;var sd={exports:{}},Ge={};/**
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 Rv;function bS(){if(Rv)return Be;Rv=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"),c=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"),v=Symbol.for("react.lazy"),b=Symbol.iterator;function w(O){return O===null||typeof O!="object"?null:(O=b&&O[b]||O["@@iterator"],typeof O=="function"?O:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,E={};function j(O,G,U){this.props=O,this.context=G,this.refs=E,this.updater=U||S}j.prototype.isReactComponent={},j.prototype.setState=function(O,G){if(typeof O!="object"&&typeof O!="function"&&O!=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,O,G,"setState")},j.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function R(){}R.prototype=j.prototype;function L(O,G,U){this.props=O,this.context=G,this.refs=E,this.updater=U||S}var k=L.prototype=new R;k.constructor=L,C(k,j.prototype),k.isPureReactComponent=!0;var H=Array.isArray,M={H:null,A:null,T:null,S:null,V:null},N=Object.prototype.hasOwnProperty;function B(O,G,U,K,P,oe){return U=oe.ref,{$$typeof:n,type:O,key:G,ref:U!==void 0?U:null,props:oe}}function J(O,G){return B(O.type,G,void 0,void 0,void 0,O.props)}function te(O){return typeof O=="object"&&O!==null&&O.$$typeof===n}function ae(O){var G={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(U){return G[U]})}var re=/\/+/g;function fe(O,G){return typeof O=="object"&&O!==null&&O.key!=null?ae(""+O.key):G.toString(36)}function de(){}function Q(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(de,de):(O.status="pending",O.then(function(G){O.status==="pending"&&(O.status="fulfilled",O.value=G)},function(G){O.status==="pending"&&(O.status="rejected",O.reason=G)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function ee(O,G,U,K,P){var oe=typeof O;(oe==="undefined"||oe==="boolean")&&(O=null);var me=!1;if(O===null)me=!0;else switch(oe){case"bigint":case"string":case"number":me=!0;break;case"object":switch(O.$$typeof){case n:case a:me=!0;break;case v:return me=O._init,ee(me(O._payload),G,U,K,P)}}if(me)return P=P(O),me=K===""?"."+fe(O,0):K,H(P)?(U="",me!=null&&(U=me.replace(re,"$&/")+"/"),ee(P,G,U,"",function(Fe){return Fe})):P!=null&&(te(P)&&(P=J(P,U+(P.key==null||O&&O.key===P.key?"":(""+P.key).replace(re,"$&/")+"/")+me)),G.push(P)),1;me=0;var ve=K===""?".":K+":";if(H(O))for(var Le=0;Le<O.length;Le++)K=O[Le],oe=ve+fe(K,Le),me+=ee(K,G,U,oe,P);else if(Le=w(O),typeof Le=="function")for(O=Le.call(O),Le=0;!(K=O.next()).done;)K=K.value,oe=ve+fe(K,Le++),me+=ee(K,G,U,oe,P);else if(oe==="object"){if(typeof O.then=="function")return ee(Q(O),G,U,K,P);throw G=String(O),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return me}function A(O,G,U){if(O==null)return O;var K=[],P=0;return ee(O,K,"","",function(oe){return G.call(U,oe,P++)}),K}function X(O){if(O._status===-1){var G=O._result;G=G(),G.then(function(U){(O._status===0||O._status===-1)&&(O._status=1,O._result=U)},function(U){(O._status===0||O._status===-1)&&(O._status=2,O._result=U)}),O._status===-1&&(O._status=0,O._result=G)}if(O._status===1)return O._result.default;throw O._result}var V=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)};function ye(){}return Be.Children={map:A,forEach:function(O,G,U){A(O,function(){G.apply(this,arguments)},U)},count:function(O){var G=0;return A(O,function(){G++}),G},toArray:function(O){return A(O,function(G){return G})||[]},only:function(O){if(!te(O))throw Error("React.Children.only expected to receive a single React element child.");return O}},Be.Component=j,Be.Fragment=l,Be.Profiler=s,Be.PureComponent=L,Be.StrictMode=i,Be.Suspense=p,Be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Be.__COMPILER_RUNTIME={__proto__:null,c:function(O){return M.H.useMemoCache(O)}},Be.cache=function(O){return function(){return O.apply(null,arguments)}},Be.cloneElement=function(O,G,U){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var K=C({},O.props),P=O.key,oe=void 0;if(G!=null)for(me in G.ref!==void 0&&(oe=void 0),G.key!==void 0&&(P=""+G.key),G)!N.call(G,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&G.ref===void 0||(K[me]=G[me]);var me=arguments.length-2;if(me===1)K.children=U;else if(1<me){for(var ve=Array(me),Le=0;Le<me;Le++)ve[Le]=arguments[Le+2];K.children=ve}return B(O.type,P,void 0,void 0,oe,K)},Be.createContext=function(O){return O={$$typeof:f,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:c,_context:O},O},Be.createElement=function(O,G,U){var K,P={},oe=null;if(G!=null)for(K in G.key!==void 0&&(oe=""+G.key),G)N.call(G,K)&&K!=="key"&&K!=="__self"&&K!=="__source"&&(P[K]=G[K]);var me=arguments.length-2;if(me===1)P.children=U;else if(1<me){for(var ve=Array(me),Le=0;Le<me;Le++)ve[Le]=arguments[Le+2];P.children=ve}if(O&&O.defaultProps)for(K in me=O.defaultProps,me)P[K]===void 0&&(P[K]=me[K]);return B(O,oe,void 0,void 0,null,P)},Be.createRef=function(){return{current:null}},Be.forwardRef=function(O){return{$$typeof:h,render:O}},Be.isValidElement=te,Be.lazy=function(O){return{$$typeof:v,_payload:{_status:-1,_result:O},_init:X}},Be.memo=function(O,G){return{$$typeof:m,type:O,compare:G===void 0?null:G}},Be.startTransition=function(O){var G=M.T,U={};M.T=U;try{var K=O(),P=M.S;P!==null&&P(U,K),typeof K=="object"&&K!==null&&typeof K.then=="function"&&K.then(ye,V)}catch(oe){V(oe)}finally{M.T=G}},Be.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Be.use=function(O){return M.H.use(O)},Be.useActionState=function(O,G,U){return M.H.useActionState(O,G,U)},Be.useCallback=function(O,G){return M.H.useCallback(O,G)},Be.useContext=function(O){return M.H.useContext(O)},Be.useDebugValue=function(){},Be.useDeferredValue=function(O,G){return M.H.useDeferredValue(O,G)},Be.useEffect=function(O,G,U){var K=M.H;if(typeof U=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return K.useEffect(O,G)},Be.useId=function(){return M.H.useId()},Be.useImperativeHandle=function(O,G,U){return M.H.useImperativeHandle(O,G,U)},Be.useInsertionEffect=function(O,G){return M.H.useInsertionEffect(O,G)},Be.useLayoutEffect=function(O,G){return M.H.useLayoutEffect(O,G)},Be.useMemo=function(O,G){return M.H.useMemo(O,G)},Be.useOptimistic=function(O,G){return M.H.useOptimistic(O,G)},Be.useReducer=function(O,G,U){return M.H.useReducer(O,G,U)},Be.useRef=function(O){return M.H.useRef(O)},Be.useState=function(O){return M.H.useState(O)},Be.useSyncExternalStore=function(O,G,U){return M.H.useSyncExternalStore(O,G,U)},Be.useTransition=function(){return M.H.useTransition()},Be.version="19.1.1",Be}var jv;function eh(){return jv||(jv=1,Wf.exports=bS()),Wf.exports}var y=eh();const mt=Iy(y),Wy=Zw({__proto__:null,default:mt},[y]),xS=(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);Fr(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),n?.services?.logger?.warn?n.services.logger.warn(...s):console?.warn&&console.warn(...s)},Ov={},Od=(n,a,l,i)=>{Fr(l)&&Ov[l]||(Fr(l)&&(Ov[l]=new Date),xS(n,a,l,i))},e0=(n,a)=>()=>{if(n.isInitialized)a();else{const l=()=>{setTimeout(()=>{n.off("initialized",l)},0),a()};n.on("initialized",l)}},Ad=(n,a,l)=>{n.loadNamespaces(a,e0(n,l))},Av=(n,a,l,i)=>{if(Fr(l)&&(l=[l]),n.options.preload&&n.options.preload.indexOf(a)>-1)return Ad(n,l,i);l.forEach(s=>{n.options.ns.indexOf(s)<0&&n.options.ns.push(s)}),n.loadLanguages(a,e0(n,i))},wS=(n,a,l={})=>!a.languages||!a.languages.length?(Od(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}}),Fr=n=>typeof n=="string",SS=n=>typeof n=="object"&&n!==null,_S=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ES={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},CS=n=>ES[n],NS=n=>n.replace(_S,CS);let Td={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:NS};const RS=(n={})=>{Td={...Td,...n}},jS=()=>Td;let t0;const OS=n=>{t0=n},AS=()=>t0,TS={type:"3rdParty",init(n){RS(n.options.react),OS(n)}},MS=y.createContext();class DS{constructor(){this.usedNamespaces={}}addUsedNamespaces(a){a.forEach(l=>{this.usedNamespaces[l]||(this.usedNamespaces[l]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const LS=(n,a)=>{const l=y.useRef();return y.useEffect(()=>{l.current=n},[n,a]),l.current},n0=(n,a,l,i)=>n.getFixedT(a,l,i),kS=(n,a,l,i)=>y.useCallback(n0(n,a,l,i),[n,a,l,i]),Oa=(n,a={})=>{const{i18n:l}=a,{i18n:i,defaultNS:s}=y.useContext(MS)||{},c=l||i||AS();if(c&&!c.reportNamespaces&&(c.reportNamespaces=new DS),!c){Od(c,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const H=(N,B)=>Fr(B)?B:SS(B)&&Fr(B.defaultValue)?B.defaultValue:Array.isArray(N)?N[N.length-1]:N,M=[H,{},!1];return M.t=H,M.i18n={},M.ready=!1,M}c.options.react?.wait&&Od(c,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const f={...jS(),...c.options.react,...a},{useSuspense:h,keyPrefix:p}=f;let m=s||c.options?.defaultNS;m=Fr(m)?[m]:m||["translation"],c.reportNamespaces.addUsedNamespaces?.(m);const v=(c.isInitialized||c.initializedStoreOnce)&&m.every(H=>wS(H,c,f)),b=kS(c,a.lng||null,f.nsMode==="fallback"?m:m[0],p),w=()=>b,S=()=>n0(c,a.lng||null,f.nsMode==="fallback"?m:m[0],p),[C,E]=y.useState(w);let j=m.join();a.lng&&(j=`${a.lng}${j}`);const R=LS(j),L=y.useRef(!0);y.useEffect(()=>{const{bindI18n:H,bindI18nStore:M}=f;L.current=!0,!v&&!h&&(a.lng?Av(c,a.lng,m,()=>{L.current&&E(S)}):Ad(c,m,()=>{L.current&&E(S)})),v&&R&&R!==j&&L.current&&E(S);const N=()=>{L.current&&E(S)};return H&&c?.on(H,N),M&&c?.store.on(M,N),()=>{L.current=!1,c&&H&&H?.split(" ").forEach(B=>c.off(B,N)),M&&c&&M.split(" ").forEach(B=>c.store.off(B,N))}},[c,j]),y.useEffect(()=>{L.current&&v&&E(w)},[c,p,v]);const k=[C,c,v];if(k.t=C,k.i18n=c,k.ready=v,v||!v&&!h)return k;throw new Promise(H=>{a.lng?Av(c,a.lng,m,()=>H()):Ad(c,m,()=>H())})},{slice:zS,forEach:US}=[];function PS(n){return US.call(zS.call(arguments,1),a=>{if(a)for(const l in a)n[l]===void 0&&(n[l]=a[l])}),n}function HS(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 Tv=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,BS=function(n,a){const i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},s=encodeURIComponent(a);let c=`${n}=${s}`;if(i.maxAge>0){const f=i.maxAge-0;if(Number.isNaN(f))throw new Error("maxAge should be a Number");c+=`; Max-Age=${Math.floor(f)}`}if(i.domain){if(!Tv.test(i.domain))throw new TypeError("option domain is invalid");c+=`; Domain=${i.domain}`}if(i.path){if(!Tv.test(i.path))throw new TypeError("option path is invalid");c+=`; Path=${i.path}`}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");c+=`; Expires=${i.expires.toUTCString()}`}if(i.httpOnly&&(c+="; HttpOnly"),i.secure&&(c+="; Secure"),i.sameSite)switch(typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite){case!0:c+="; SameSite=Strict";break;case"lax":c+="; SameSite=Lax";break;case"strict":c+="; SameSite=Strict";break;case"none":c+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i.partitioned&&(c+="; Partitioned"),c},Mv={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=BS(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 $S={name:"cookie",lookup(n){let{lookupCookie:a}=n;if(a&&typeof document<"u")return Mv.read(a)||void 0},cacheUserLanguage(n,a){let{lookupCookie:l,cookieMinutes:i,cookieDomain:s,cookieOptions:c}=a;l&&typeof document<"u"&&Mv.create(l,n,i,s,c)}},VS={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 c=i.substring(1).split("&");for(let f=0;f<c.length;f++){const h=c[f].indexOf("=");h>0&&c[f].substring(0,h)===a&&(l=c[f].substring(h+1))}}return l}},qS={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 c=s.substring(1);if(a){const f=c.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 Ul=null;const Dv=()=>{if(Ul!==null)return Ul;try{if(Ul=typeof window<"u"&&window.localStorage!==null,!Ul)return!1;const n="i18next.translate.boo";window.localStorage.setItem(n,"foo"),window.localStorage.removeItem(n)}catch{Ul=!1}return Ul};var FS={name:"localStorage",lookup(n){let{lookupLocalStorage:a}=n;if(a&&Dv())return window.localStorage.getItem(a)||void 0},cacheUserLanguage(n,a){let{lookupLocalStorage:l}=a;l&&Dv()&&window.localStorage.setItem(l,n)}};let Pl=null;const Lv=()=>{if(Pl!==null)return Pl;try{if(Pl=typeof window<"u"&&window.sessionStorage!==null,!Pl)return!1;const n="i18next.translate.boo";window.sessionStorage.setItem(n,"foo"),window.sessionStorage.removeItem(n)}catch{Pl=!1}return Pl};var YS={name:"sessionStorage",lookup(n){let{lookupSessionStorage:a}=n;if(a&&Lv())return window.sessionStorage.getItem(a)||void 0},cacheUserLanguage(n,a){let{lookupSessionStorage:l}=a;l&&Lv()&&window.sessionStorage.setItem(l,n)}},GS={name:"navigator",lookup(n){const a=[];if(typeof navigator<"u"){const{languages:l,userLanguage:i,language:s}=navigator;if(l)for(let c=0;c<l.length;c++)a.push(l[c]);i&&a.push(i),s&&a.push(s)}return a.length>0?a:void 0}},KS={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}},XS={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}},QS={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 a0=!1;try{document.cookie,a0=!0}catch{}const r0=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];a0||r0.splice(1,1);const IS=()=>({order:r0,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:n=>n});class l0{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=PS(l,this.options||{},IS()),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($S),this.addDetector(VS),this.addDetector(FS),this.addDetector(YS),this.addDetector(GS),this.addDetector(KS),this.addDetector(XS),this.addDetector(QS),this.addDetector(qS)}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&&!HS(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)}))}}l0.type="languageDetector";const ZS={yes:"Yes",no:"No"},JS={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",new_version_available:"New Version Available",update_description:"A new version is available. Please review the changelog and update to get the latest features and improvements.",no_changelog_available:"No changelog available",later:"Later",update_now:"Update Now",no_updates_available:"No updates available",update_check_failed:"Failed to check for updates",update_successful:"Update successful",update_failed:"Update failed"},WS={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..."},e_={title:"General Settings",log:"Enable Logging",log_level:"Log Level",claude_path:"Claude Path",host:"Host",port:"Port",apikey:"API Key",timeout:"API Timeout (ms)",proxy_url:"Proxy URL",custom_router_path:"Custom Router Script Path",custom_router_path_placeholder:"Enter absolute path to custom router script file"},t_={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"},n_={title:"Providers",name:"Name",api_base_url:"API Full 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...",api_key_required:"API Key is required",name_required:"Name is required",name_duplicate:"A provider with this name already exists",search:"Search providers..."},a_={title:"Router",default:"Default",background:"Background",think:"Think",longContext:"Long Context",longContextThreshold:"Context Threshold",webSearch:"Web Search",image:"Image",forceUseImageAgent:"Force Use Image Agent",selectModel:"Select a model...",searchModel:"Search model...",noModelFound:"No model found."},r_={title:"JSON Editor",save:"Save",saving:"Saving...",cancel:"Cancel",save_failed:"Failed to save config",save_and_restart:"Save & Restart"},l_={title:"Status Line Configuration",enable:"Enable Status Line",theme:"Theme Style",theme_default:"Default",theme_powerline:"Powerline",modules:"Modules",module_type:"Type",module_icon:"Icon",module_text:"Text",module_color:"Color",module_background:"Background",module_text_description:"Enter display text, variables can be used:",module_color_description:"Select text color",module_background_description:"Select background color (optional)",module_script_path:"Script Path",module_script_path_description:"Enter the absolute path of the Node.js script file",add_module:"Add Module",remove_module:"Remove Module",delete_module:"Delete Module",preview:"Preview",components:"Components",properties:"Properties",workDir:"Working Directory",gitBranch:"Git Branch",model:"Model",usage:"Usage",script:"Script",background_none:"None",color_black:"Black",color_red:"Red",color_green:"Green",color_yellow:"Yellow",color_blue:"Blue",color_magenta:"Magenta",color_cyan:"Cyan",color_white:"White",color_bright_black:"Bright Black",color_bright_red:"Bright Red",color_bright_green:"Bright Green",color_bright_yellow:"Bright Yellow",color_bright_blue:"Bright Blue",color_bright_magenta:"Bright Magenta",color_bright_cyan:"Bright Cyan",color_bright_white:"Bright White",font_placeholder:"Select Font",theme_placeholder:"Select Theme Style",icon_placeholder:"Paste icon or search by name...",icon_description:"Enter icon character, paste icon, or search icons (optional)",text_placeholder:"e.g.: {{workDirName}}",script_placeholder:"e.g.: /path/to/your/script.js",drag_hint:"Drag components here to configure",select_hint:"Select a component to configure",no_icons_found:"No icons found",no_icons_available:"No icons available",import_export:"Import/Export",import:"Import Config",export:"Export Config",download_template:"Download Template",import_export_help:"Export current configuration as a JSON file, or import configuration from a JSON file. You can also download a configuration template for reference.",export_success:"Configuration exported successfully",export_failed:"Failed to export configuration",import_success:"Configuration imported successfully",import_failed:"Failed to import configuration",invalid_config:"Invalid configuration file",template_download_success:"Template downloaded successfully",template_download_success_desc:"Configuration template has been downloaded to your device",template_download_failed:"Failed to download template"},i_={title:"Log Viewer",close:"Close",download:"Download",clear:"Clear",auto_refresh_on:"Auto Refresh On",auto_refresh_off:"Auto Refresh Off",load_failed:"Failed to load logs",no_logs_available:"No logs available",logs_cleared:"Logs cleared successfully",clear_failed:"Failed to clear logs",logs_downloaded:"Logs downloaded successfully",back_to_files:"Back to Files",select_file:"Select a log file to view",no_log_files_available:"No log files available",load_files_failed:"Failed to load log files",group_by_req_id:"Group by Request ID",grouped_on:"Grouped",request_groups:"Request Groups",total_requests:"Total Requests",total_logs:"Total Logs",request:"Request",logs:"logs",first_log:"First Log",last_log:"Last Log",back_to_all_logs:"Back to All Logs",worker_error:"Worker error",worker_init_failed:"Failed to initialize worker",grouping_not_supported:"Log grouping not supported by server",back:"Back"},o_={common:ZS,app:JS,login:WS,toplevel:e_,transformers:t_,providers:n_,router:a_,json_editor:r_,statusline:l_,log_viewer:i_},s_={yes:"是",no:"否"},c_={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:"配置保存并服务重启失败",new_version_available:"有新版本可用",update_description:"发现新版本。请查看更新日志并更新以获取最新功能和改进。",no_changelog_available:"暂无更新日志",later:"稍后再说",update_now:"立即更新",no_updates_available:"当前已是最新版本",update_check_failed:"检查更新失败",update_successful:"更新成功",update_failed:"更新失败"},u_={title:"登录到您的账户",description:"请输入您的API密钥以访问配置面板",apiKey:"API密钥",apiKeyPlaceholder:"请输入您的API密钥",signIn:"登录",invalidApiKey:"API密钥无效",configError:"配置未加载",validating:"正在验证API密钥..."},f_={title:"通用设置",log:"启用日志",log_level:"日志级别",claude_path:"Claude 路径",host:"主机",port:"端口",apikey:"API 密钥",timeout:"API 超时时间 (毫秒)",proxy_url:"代理地址",custom_router_path:"自定义路由脚本路径",custom_router_path_placeholder:"输入自定义路由脚本文件的绝对路径"},d_={title:"自定义转换器",path:"路径",project:"项目",remove:"移除",add:"添加自定义转换器",edit:"编辑自定义转换器",delete:"删除自定义转换器",delete_transformer_confirm:"您确定要删除此自定义转换器吗?",parameters:"参数"},h_={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:"选择一个模板...",api_key_required:"API 密钥为必填项",name_required:"名称为必填项",name_duplicate:"已存在同名供应商",search:"搜索供应商..."},m_={title:"路由",default:"默认",background:"后台",think:"思考",longContext:"长上下文",longContextThreshold:"上下文阈值",webSearch:"网络搜索",image:"图像",forceUseImageAgent:"强制使用图像代理",selectModel:"选择一个模型...",searchModel:"搜索模型...",noModelFound:"未找到模型."},p_={title:"JSON 编辑器",save:"保存",saving:"保存中...",cancel:"取消",save_failed:"配置保存失败",save_and_restart:"保存并重启"},g_={title:"状态栏配置",enable:"启用状态栏",theme:"主题样式",theme_default:"默认",theme_powerline:"Powerline",modules:"模块",module_type:"类型",module_icon:"图标",module_text:"文本",module_color:"颜色",module_background:"背景",module_text_description:"输入显示文本,可使用变量:",module_color_description:"选择文字颜色",module_background_description:"选择背景颜色(可选)",module_script_path:"脚本路径",module_script_path_description:"输入Node.js脚本文件的绝对路径",add_module:"添加模块",remove_module:"移除模块",delete_module:"删除组件",preview:"预览",components:"组件",properties:"属性",workDir:"工作目录",gitBranch:"Git分支",model:"模型",usage:"使用情况",script:"脚本",background_none:"无",color_black:"黑色",color_red:"红色",color_green:"绿色",color_yellow:"黄色",color_blue:"蓝色",color_magenta:"品红",color_cyan:"青色",color_white:"白色",color_bright_black:"亮黑色",color_bright_red:"亮红色",color_bright_green:"亮绿色",color_bright_yellow:"亮黄色",color_bright_blue:"亮蓝色",color_bright_magenta:"亮品红",color_bright_cyan:"亮青色",color_bright_white:"亮白色",font_placeholder:"选择字体",theme_placeholder:"选择主题样式",icon_placeholder:"粘贴图标或输入名称搜索...",icon_description:"输入图标字符、粘贴图标或搜索图标(可选)",text_placeholder:"例如: {{workDirName}}",script_placeholder:"例如: /path/to/your/script.js",drag_hint:"拖拽组件到此处进行配置",select_hint:"选择一个组件进行配置",no_icons_found:"未找到图标",no_icons_available:"暂无可用图标",import_export:"导入/导出",import:"导入配置",export:"导出配置",download_template:"下载模板",import_export_help:"导出当前配置为JSON文件,或从JSON文件导入配置。您也可以下载配置模板作为参考。",export_success:"配置导出成功",export_failed:"配置导出失败",import_success:"配置导入成功",import_failed:"配置导入失败",invalid_config:"无效的配置文件",template_download_success:"模板下载成功",template_download_success_desc:"配置模板已下载到您的设备",template_download_failed:"模板下载失败"},v_={title:"日志查看器",close:"关闭",download:"下载",clear:"清除",auto_refresh_on:"自动刷新开启",auto_refresh_off:"自动刷新关闭",load_failed:"加载日志失败",no_logs_available:"暂无日志",logs_cleared:"日志清除成功",clear_failed:"清除日志失败",logs_downloaded:"日志下载成功",back_to_files:"返回文件列表",select_file:"选择要查看的日志文件",no_log_files_available:"暂无日志文件",load_files_failed:"加载日志文件失败",group_by_req_id:"按请求ID分组",grouped_on:"已分组",request_groups:"请求组",total_requests:"总请求数",total_logs:"总日志数",request:"请求",logs:"条日志",first_log:"首条日志",last_log:"末条日志",back_to_all_logs:"返回所有日志",worker_error:"Worker错误",worker_init_failed:"Worker初始化失败",grouping_not_supported:"服务器不支持日志分组",back:"返回"},y_={common:s_,app:c_,login:u_,toplevel:f_,transformers:d_,providers:h_,router:m_,json_editor:p_,statusline:g_,log_viewer:v_},b_={en:{translation:o_},zh:{translation:y_}};Kt.use(l0).use(TS).init({resources:b_,fallbackLng:"en",interpolation:{escapeValue:!1}});var ed={exports:{}},ao={},td={exports:{}},nd={};/**
23
+ */var Bv;function n_(){if(Bv)return Ge;Bv=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),f=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),b=Symbol.iterator;function w(M){return M===null||typeof M!="object"?null:(M=b&&M[b]||M["@@iterator"],typeof M=="function"?M:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,E={};function R(M,Y,H){this.props=M,this.context=Y,this.refs=E,this.updater=H||S}R.prototype.isReactComponent={},R.prototype.setState=function(M,Y){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,Y,"setState")},R.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function C(){}C.prototype=R.prototype;function A(M,Y,H){this.props=M,this.context=Y,this.refs=E,this.updater=H||S}var T=A.prototype=new C;T.constructor=A,N(T,R.prototype),T.isPureReactComponent=!0;var k=Array.isArray,D={H:null,A:null,T:null,S:null,V:null},j=Object.prototype.hasOwnProperty;function U(M,Y,H,K,le,he){return H=he.ref,{$$typeof:n,type:M,key:Y,ref:H!==void 0?H:null,props:he}}function B(M,Y){return U(M.type,Y,void 0,void 0,void 0,M.props)}function W(M){return typeof M=="object"&&M!==null&&M.$$typeof===n}function ne(M){var Y={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(H){return Y[H]})}var ee=/\/+/g;function ie(M,Y){return typeof M=="object"&&M!==null&&M.key!=null?ne(""+M.key):Y.toString(36)}function fe(){}function X(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(fe,fe):(M.status="pending",M.then(function(Y){M.status==="pending"&&(M.status="fulfilled",M.value=Y)},function(Y){M.status==="pending"&&(M.status="rejected",M.reason=Y)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function te(M,Y,H,K,le){var he=typeof M;(he==="undefined"||he==="boolean")&&(M=null);var ve=!1;if(M===null)ve=!0;else switch(he){case"bigint":case"string":case"number":ve=!0;break;case"object":switch(M.$$typeof){case n:case a:ve=!0;break;case v:return ve=M._init,te(ve(M._payload),Y,H,K,le)}}if(ve)return le=le(M),ve=K===""?"."+ie(M,0):K,k(le)?(H="",ve!=null&&(H=ve.replace(ee,"$&/")+"/"),te(le,Y,H,"",function(ae){return ae})):le!=null&&(W(le)&&(le=B(le,H+(le.key==null||M&&M.key===le.key?"":(""+le.key).replace(ee,"$&/")+"/")+ve)),Y.push(le)),1;ve=0;var be=K===""?".":K+":";if(k(M))for(var ze=0;ze<M.length;ze++)K=M[ze],he=be+ie(K,ze),ve+=te(K,Y,H,he,le);else if(ze=w(M),typeof ze=="function")for(M=ze.call(M),ze=0;!(K=M.next()).done;)K=K.value,he=be+ie(K,ze++),ve+=te(K,Y,H,he,le);else if(he==="object"){if(typeof M.then=="function")return te(X(M),Y,H,K,le);throw Y=String(M),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return ve}function O(M,Y,H){if(M==null)return M;var K=[],le=0;return te(M,K,"","",function(he){return Y.call(H,he,le++)}),K}function I(M){if(M._status===-1){var Y=M._result;Y=Y(),Y.then(function(H){(M._status===0||M._status===-1)&&(M._status=1,M._result=H)},function(H){(M._status===0||M._status===-1)&&(M._status=2,M._result=H)}),M._status===-1&&(M._status=0,M._result=Y)}if(M._status===1)return M._result.default;throw M._result}var q=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)};function ye(){}return Ge.Children={map:O,forEach:function(M,Y,H){O(M,function(){Y.apply(this,arguments)},H)},count:function(M){var Y=0;return O(M,function(){Y++}),Y},toArray:function(M){return O(M,function(Y){return Y})||[]},only:function(M){if(!W(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},Ge.Component=R,Ge.Fragment=l,Ge.Profiler=s,Ge.PureComponent=A,Ge.StrictMode=o,Ge.Suspense=g,Ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,Ge.__COMPILER_RUNTIME={__proto__:null,c:function(M){return D.H.useMemoCache(M)}},Ge.cache=function(M){return function(){return M.apply(null,arguments)}},Ge.cloneElement=function(M,Y,H){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var K=N({},M.props),le=M.key,he=void 0;if(Y!=null)for(ve in Y.ref!==void 0&&(he=void 0),Y.key!==void 0&&(le=""+Y.key),Y)!j.call(Y,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&Y.ref===void 0||(K[ve]=Y[ve]);var ve=arguments.length-2;if(ve===1)K.children=H;else if(1<ve){for(var be=Array(ve),ze=0;ze<ve;ze++)be[ze]=arguments[ze+2];K.children=be}return U(M.type,le,void 0,void 0,he,K)},Ge.createContext=function(M){return M={$$typeof:f,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:c,_context:M},M},Ge.createElement=function(M,Y,H){var K,le={},he=null;if(Y!=null)for(K in Y.key!==void 0&&(he=""+Y.key),Y)j.call(Y,K)&&K!=="key"&&K!=="__self"&&K!=="__source"&&(le[K]=Y[K]);var ve=arguments.length-2;if(ve===1)le.children=H;else if(1<ve){for(var be=Array(ve),ze=0;ze<ve;ze++)be[ze]=arguments[ze+2];le.children=be}if(M&&M.defaultProps)for(K in ve=M.defaultProps,ve)le[K]===void 0&&(le[K]=ve[K]);return U(M,he,void 0,void 0,null,le)},Ge.createRef=function(){return{current:null}},Ge.forwardRef=function(M){return{$$typeof:m,render:M}},Ge.isValidElement=W,Ge.lazy=function(M){return{$$typeof:v,_payload:{_status:-1,_result:M},_init:I}},Ge.memo=function(M,Y){return{$$typeof:h,type:M,compare:Y===void 0?null:Y}},Ge.startTransition=function(M){var Y=D.T,H={};D.T=H;try{var K=M(),le=D.S;le!==null&&le(H,K),typeof K=="object"&&K!==null&&typeof K.then=="function"&&K.then(ye,q)}catch(he){q(he)}finally{D.T=Y}},Ge.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},Ge.use=function(M){return D.H.use(M)},Ge.useActionState=function(M,Y,H){return D.H.useActionState(M,Y,H)},Ge.useCallback=function(M,Y){return D.H.useCallback(M,Y)},Ge.useContext=function(M){return D.H.useContext(M)},Ge.useDebugValue=function(){},Ge.useDeferredValue=function(M,Y){return D.H.useDeferredValue(M,Y)},Ge.useEffect=function(M,Y,H){var K=D.H;if(typeof H=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return K.useEffect(M,Y)},Ge.useId=function(){return D.H.useId()},Ge.useImperativeHandle=function(M,Y,H){return D.H.useImperativeHandle(M,Y,H)},Ge.useInsertionEffect=function(M,Y){return D.H.useInsertionEffect(M,Y)},Ge.useLayoutEffect=function(M,Y){return D.H.useLayoutEffect(M,Y)},Ge.useMemo=function(M,Y){return D.H.useMemo(M,Y)},Ge.useOptimistic=function(M,Y){return D.H.useOptimistic(M,Y)},Ge.useReducer=function(M,Y,H){return D.H.useReducer(M,Y,H)},Ge.useRef=function(M){return D.H.useRef(M)},Ge.useState=function(M){return D.H.useState(M)},Ge.useSyncExternalStore=function(M,Y,H){return D.H.useSyncExternalStore(M,Y,H)},Ge.useTransition=function(){return D.H.useTransition()},Ge.version="19.1.0",Ge}var $v;function hh(){return $v||($v=1,sd.exports=n_()),sd.exports}var y=hh();const nt=d0(y),p0=LS({__proto__:null,default:nt},[y]),a_=(n,a,l,o)=>{const s=[l,{code:a,...o||{}}];if(n?.services?.logger?.forward)return n.services.logger.forward(s,"warn","react-i18next::",!0);Yr(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),n?.services?.logger?.warn?n.services.logger.warn(...s):console?.warn&&console.warn(...s)},qv={},Hd=(n,a,l,o)=>{Yr(l)&&qv[l]||(Yr(l)&&(qv[l]=new Date),a_(n,a,l,o))},g0=(n,a)=>()=>{if(n.isInitialized)a();else{const l=()=>{setTimeout(()=>{n.off("initialized",l)},0),a()};n.on("initialized",l)}},Bd=(n,a,l)=>{n.loadNamespaces(a,g0(n,l))},Fv=(n,a,l,o)=>{if(Yr(l)&&(l=[l]),n.options.preload&&n.options.preload.indexOf(a)>-1)return Bd(n,l,o);l.forEach(s=>{n.options.ns.indexOf(s)<0&&n.options.ns.push(s)}),n.loadLanguages(a,g0(n,o))},r_=(n,a,l={})=>!a.languages||!a.languages.length?(Hd(a,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:a.languages}),!0):a.hasLoadedNamespace(n,{lng:l.lng,precheck:(o,s)=>{if(l.bindI18n&&l.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!s(o.isLanguageChangingTo,n))return!1}}),Yr=n=>typeof n=="string",l_=n=>typeof n=="object"&&n!==null,o_=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,i_={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},s_=n=>i_[n],c_=n=>n.replace(o_,s_);let $d={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:c_};const u_=(n={})=>{$d={...$d,...n}},f_=()=>$d;let v0;const d_=n=>{v0=n},h_=()=>v0,m_={type:"3rdParty",init(n){u_(n.options.react),d_(n)}},p_=y.createContext();class g_{constructor(){this.usedNamespaces={}}addUsedNamespaces(a){a.forEach(l=>{this.usedNamespaces[l]||(this.usedNamespaces[l]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const v_=(n,a)=>{const l=y.useRef();return y.useEffect(()=>{l.current=n},[n,a]),l.current},y0=(n,a,l,o)=>n.getFixedT(a,l,o),y_=(n,a,l,o)=>y.useCallback(y0(n,a,l,o),[n,a,l,o]),Ma=(n,a={})=>{const{i18n:l}=a,{i18n:o,defaultNS:s}=y.useContext(p_)||{},c=l||o||h_();if(c&&!c.reportNamespaces&&(c.reportNamespaces=new g_),!c){Hd(c,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const k=(j,U)=>Yr(U)?U:l_(U)&&Yr(U.defaultValue)?U.defaultValue:Array.isArray(j)?j[j.length-1]:j,D=[k,{},!1];return D.t=k,D.i18n={},D.ready=!1,D}c.options.react?.wait&&Hd(c,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const f={...f_(),...c.options.react,...a},{useSuspense:m,keyPrefix:g}=f;let h=s||c.options?.defaultNS;h=Yr(h)?[h]:h||["translation"],c.reportNamespaces.addUsedNamespaces?.(h);const v=(c.isInitialized||c.initializedStoreOnce)&&h.every(k=>r_(k,c,f)),b=y_(c,a.lng||null,f.nsMode==="fallback"?h:h[0],g),w=()=>b,S=()=>y0(c,a.lng||null,f.nsMode==="fallback"?h:h[0],g),[N,E]=y.useState(w);let R=h.join();a.lng&&(R=`${a.lng}${R}`);const C=v_(R),A=y.useRef(!0);y.useEffect(()=>{const{bindI18n:k,bindI18nStore:D}=f;A.current=!0,!v&&!m&&(a.lng?Fv(c,a.lng,h,()=>{A.current&&E(S)}):Bd(c,h,()=>{A.current&&E(S)})),v&&C&&C!==R&&A.current&&E(S);const j=()=>{A.current&&E(S)};return k&&c?.on(k,j),D&&c?.store.on(D,j),()=>{A.current=!1,c&&k&&k?.split(" ").forEach(U=>c.off(U,j)),D&&c&&D.split(" ").forEach(U=>c.store.off(U,j))}},[c,R]),y.useEffect(()=>{A.current&&v&&E(w)},[c,g,v]);const T=[N,c,v];if(T.t=N,T.i18n=c,T.ready=v,v||!v&&!m)return T;throw new Promise(k=>{a.lng?Fv(c,a.lng,h,()=>k()):Bd(c,h,()=>k())})},{slice:b_,forEach:x_}=[];function w_(n){return x_.call(b_.call(arguments,1),a=>{if(a)for(const l in a)n[l]===void 0&&(n[l]=a[l])}),n}function S_(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 Vv=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,__=function(n,a){const o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},s=encodeURIComponent(a);let c=`${n}=${s}`;if(o.maxAge>0){const f=o.maxAge-0;if(Number.isNaN(f))throw new Error("maxAge should be a Number");c+=`; Max-Age=${Math.floor(f)}`}if(o.domain){if(!Vv.test(o.domain))throw new TypeError("option domain is invalid");c+=`; Domain=${o.domain}`}if(o.path){if(!Vv.test(o.path))throw new TypeError("option path is invalid");c+=`; Path=${o.path}`}if(o.expires){if(typeof o.expires.toUTCString!="function")throw new TypeError("option expires is invalid");c+=`; Expires=${o.expires.toUTCString()}`}if(o.httpOnly&&(c+="; HttpOnly"),o.secure&&(c+="; Secure"),o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:c+="; SameSite=Strict";break;case"lax":c+="; SameSite=Lax";break;case"strict":c+="; SameSite=Strict";break;case"none":c+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o.partitioned&&(c+="; Partitioned"),c},Gv={create(n,a,l,o){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)),o&&(s.domain=o),document.cookie=__(n,a,s)},read(n){const a=`${n}=`,l=document.cookie.split(";");for(let o=0;o<l.length;o++){let s=l[o];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 E_={name:"cookie",lookup(n){let{lookupCookie:a}=n;if(a&&typeof document<"u")return Gv.read(a)||void 0},cacheUserLanguage(n,a){let{lookupCookie:l,cookieMinutes:o,cookieDomain:s,cookieOptions:c}=a;l&&typeof document<"u"&&Gv.create(l,n,o,s,c)}},N_={name:"querystring",lookup(n){let{lookupQuerystring:a}=n,l;if(typeof window<"u"){let{search:o}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const c=o.substring(1).split("&");for(let f=0;f<c.length;f++){const m=c[f].indexOf("=");m>0&&c[f].substring(0,m)===a&&(l=c[f].substring(m+1))}}return l}},C_={name:"hash",lookup(n){let{lookupHash:a,lookupFromHashIndex:l}=n,o;if(typeof window<"u"){const{hash:s}=window.location;if(s&&s.length>2){const c=s.substring(1);if(a){const f=c.split("&");for(let m=0;m<f.length;m++){const g=f[m].indexOf("=");g>0&&f[m].substring(0,g)===a&&(o=f[m].substring(g+1))}}if(o)return o;if(!o&&l>-1){const f=s.match(/\/([a-zA-Z-]*)/g);return Array.isArray(f)?f[typeof l=="number"?l:0]?.replace("/",""):void 0}}}return o}};let Bl=null;const Yv=()=>{if(Bl!==null)return Bl;try{if(Bl=typeof window<"u"&&window.localStorage!==null,!Bl)return!1;const n="i18next.translate.boo";window.localStorage.setItem(n,"foo"),window.localStorage.removeItem(n)}catch{Bl=!1}return Bl};var j_={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 $l=null;const Kv=()=>{if($l!==null)return $l;try{if($l=typeof window<"u"&&window.sessionStorage!==null,!$l)return!1;const n="i18next.translate.boo";window.sessionStorage.setItem(n,"foo"),window.sessionStorage.removeItem(n)}catch{$l=!1}return $l};var R_={name:"sessionStorage",lookup(n){let{lookupSessionStorage:a}=n;if(a&&Kv())return window.sessionStorage.getItem(a)||void 0},cacheUserLanguage(n,a){let{lookupSessionStorage:l}=a;l&&Kv()&&window.sessionStorage.setItem(l,n)}},O_={name:"navigator",lookup(n){const a=[];if(typeof navigator<"u"){const{languages:l,userLanguage:o,language:s}=navigator;if(l)for(let c=0;c<l.length;c++)a.push(l[c]);o&&a.push(o),s&&a.push(s)}return a.length>0?a:void 0}},A_={name:"htmlTag",lookup(n){let{htmlTag:a}=n,l;const o=a||(typeof document<"u"?document.documentElement:null);return o&&typeof o.getAttribute=="function"&&(l=o.getAttribute("lang")),l}},T_={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}},M_={name:"subdomain",lookup(n){let{lookupFromSubdomainIndex:a}=n;const l=typeof a=="number"?a+1:1,o=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(o)return o[l]}};let b0=!1;try{document.cookie,b0=!0}catch{}const x0=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];b0||x0.splice(1,1);const D_=()=>({order:x0,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:n=>n});class w0{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]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=a,this.options=w_(l,this.options||{},D_()),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=o,this.addDetector(E_),this.addDetector(N_),this.addDetector(j_),this.addDetector(R_),this.addDetector(O_),this.addDetector(A_),this.addDetector(T_),this.addDetector(M_),this.addDetector(C_)}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(o=>{if(this.detectors[o]){let s=this.detectors[o].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(l=l.concat(s))}}),l=l.filter(o=>o!=null&&!S_(o)).map(o=>this.options.convertDetectedLanguage(o)),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(o=>{this.detectors[o]&&this.detectors[o].cacheUserLanguage(a,this.options)}))}}w0.type="languageDetector";const L_={yes:"Yes",no:"No"},k_={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",new_version_available:"New Version Available",update_description:"A new version is available. Please review the changelog and update to get the latest features and improvements.",no_changelog_available:"No changelog available",later:"Later",update_now:"Update Now",no_updates_available:"No updates available",update_check_failed:"Failed to check for updates",update_successful:"Update successful",update_failed:"Update failed"},z_={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..."},U_={title:"General Settings",log:"Enable Logging",log_level:"Log Level",claude_path:"Claude Path",host:"Host",port:"Port",apikey:"API Key",timeout:"API Timeout (ms)",proxy_url:"Proxy URL",custom_router_path:"Custom Router Script Path",custom_router_path_placeholder:"Enter absolute path to custom router script file"},P_={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"},H_={title:"Providers",name:"Name",api_base_url:"API Full 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...",api_key_required:"API Key is required",name_required:"Name is required",name_duplicate:"A provider with this name already exists",search:"Search providers..."},B_={title:"Router",default:"Default",background:"Background",think:"Think",longContext:"Long Context",longContextThreshold:"Context Threshold",webSearch:"Web Search",image:"Image",forceUseImageAgent:"Force Use Image Agent",selectModel:"Select a model...",searchModel:"Search model...",noModelFound:"No model found."},$_={title:"JSON Editor",save:"Save",saving:"Saving...",cancel:"Cancel",save_failed:"Failed to save config",save_and_restart:"Save & Restart"},q_={title:"Status Line Configuration",enable:"Enable Status Line",theme:"Theme Style",theme_default:"Default",theme_powerline:"Powerline",modules:"Modules",module_type:"Type",module_icon:"Icon",module_text:"Text",module_color:"Color",module_background:"Background",module_text_description:"Enter display text, variables can be used:",module_color_description:"Select text color",module_background_description:"Select background color (optional)",module_script_path:"Script Path",module_script_path_description:"Enter the absolute path of the Node.js script file",add_module:"Add Module",remove_module:"Remove Module",delete_module:"Delete Module",preview:"Preview",components:"Components",properties:"Properties",workDir:"Working Directory",gitBranch:"Git Branch",model:"Model",usage:"Usage",script:"Script",background_none:"None",color_black:"Black",color_red:"Red",color_green:"Green",color_yellow:"Yellow",color_blue:"Blue",color_magenta:"Magenta",color_cyan:"Cyan",color_white:"White",color_bright_black:"Bright Black",color_bright_red:"Bright Red",color_bright_green:"Bright Green",color_bright_yellow:"Bright Yellow",color_bright_blue:"Bright Blue",color_bright_magenta:"Bright Magenta",color_bright_cyan:"Bright Cyan",color_bright_white:"Bright White",font_placeholder:"Select Font",theme_placeholder:"Select Theme Style",icon_placeholder:"Paste icon or search by name...",icon_description:"Enter icon character, paste icon, or search icons (optional)",text_placeholder:"e.g.: {{workDirName}}",script_placeholder:"e.g.: /path/to/your/script.js",drag_hint:"Drag components here to configure",select_hint:"Select a component to configure",no_icons_found:"No icons found",no_icons_available:"No icons available",import_export:"Import/Export",import:"Import Config",export:"Export Config",download_template:"Download Template",import_export_help:"Export current configuration as a JSON file, or import configuration from a JSON file. You can also download a configuration template for reference.",export_success:"Configuration exported successfully",export_failed:"Failed to export configuration",import_success:"Configuration imported successfully",import_failed:"Failed to import configuration",invalid_config:"Invalid configuration file",template_download_success:"Template downloaded successfully",template_download_success_desc:"Configuration template has been downloaded to your device",template_download_failed:"Failed to download template"},F_={title:"Log Viewer",close:"Close",download:"Download",clear:"Clear",auto_refresh_on:"Auto Refresh On",auto_refresh_off:"Auto Refresh Off",load_failed:"Failed to load logs",no_logs_available:"No logs available",logs_cleared:"Logs cleared successfully",clear_failed:"Failed to clear logs",logs_downloaded:"Logs downloaded successfully",back_to_files:"Back to Files",select_file:"Select a log file to view",no_log_files_available:"No log files available",load_files_failed:"Failed to load log files",group_by_req_id:"Group by Request ID",grouped_on:"Grouped",request_groups:"Request Groups",total_requests:"Total Requests",total_logs:"Total Logs",request:"Request",logs:"logs",first_log:"First Log",last_log:"Last Log",back_to_all_logs:"Back to All Logs",worker_error:"Worker error",worker_init_failed:"Failed to initialize worker",grouping_not_supported:"Log grouping not supported by server",back:"Back"},V_={common:L_,app:k_,login:z_,toplevel:U_,transformers:P_,providers:H_,router:B_,json_editor:$_,statusline:q_,log_viewer:F_},G_={yes:"是",no:"否"},Y_={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:"配置保存并服务重启失败",new_version_available:"有新版本可用",update_description:"发现新版本。请查看更新日志并更新以获取最新功能和改进。",no_changelog_available:"暂无更新日志",later:"稍后再说",update_now:"立即更新",no_updates_available:"当前已是最新版本",update_check_failed:"检查更新失败",update_successful:"更新成功",update_failed:"更新失败"},K_={title:"登录到您的账户",description:"请输入您的API密钥以访问配置面板",apiKey:"API密钥",apiKeyPlaceholder:"请输入您的API密钥",signIn:"登录",invalidApiKey:"API密钥无效",configError:"配置未加载",validating:"正在验证API密钥..."},I_={title:"通用设置",log:"启用日志",log_level:"日志级别",claude_path:"Claude 路径",host:"主机",port:"端口",apikey:"API 密钥",timeout:"API 超时时间 (毫秒)",proxy_url:"代理地址",custom_router_path:"自定义路由脚本路径",custom_router_path_placeholder:"输入自定义路由脚本文件的绝对路径"},X_={title:"自定义转换器",path:"路径",project:"项目",remove:"移除",add:"添加自定义转换器",edit:"编辑自定义转换器",delete:"删除自定义转换器",delete_transformer_confirm:"您确定要删除此自定义转换器吗?",parameters:"参数"},Q_={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:"选择一个模板...",api_key_required:"API 密钥为必填项",name_required:"名称为必填项",name_duplicate:"已存在同名供应商",search:"搜索供应商..."},Z_={title:"路由",default:"默认",background:"后台",think:"思考",longContext:"长上下文",longContextThreshold:"上下文阈值",webSearch:"网络搜索",image:"图像",forceUseImageAgent:"强制使用图像代理",selectModel:"选择一个模型...",searchModel:"搜索模型...",noModelFound:"未找到模型."},J_={title:"JSON 编辑器",save:"保存",saving:"保存中...",cancel:"取消",save_failed:"配置保存失败",save_and_restart:"保存并重启"},W_={title:"状态栏配置",enable:"启用状态栏",theme:"主题样式",theme_default:"默认",theme_powerline:"Powerline",modules:"模块",module_type:"类型",module_icon:"图标",module_text:"文本",module_color:"颜色",module_background:"背景",module_text_description:"输入显示文本,可使用变量:",module_color_description:"选择文字颜色",module_background_description:"选择背景颜色(可选)",module_script_path:"脚本路径",module_script_path_description:"输入Node.js脚本文件的绝对路径",add_module:"添加模块",remove_module:"移除模块",delete_module:"删除组件",preview:"预览",components:"组件",properties:"属性",workDir:"工作目录",gitBranch:"Git分支",model:"模型",usage:"使用情况",script:"脚本",background_none:"无",color_black:"黑色",color_red:"红色",color_green:"绿色",color_yellow:"黄色",color_blue:"蓝色",color_magenta:"品红",color_cyan:"青色",color_white:"白色",color_bright_black:"亮黑色",color_bright_red:"亮红色",color_bright_green:"亮绿色",color_bright_yellow:"亮黄色",color_bright_blue:"亮蓝色",color_bright_magenta:"亮品红",color_bright_cyan:"亮青色",color_bright_white:"亮白色",font_placeholder:"选择字体",theme_placeholder:"选择主题样式",icon_placeholder:"粘贴图标或输入名称搜索...",icon_description:"输入图标字符、粘贴图标或搜索图标(可选)",text_placeholder:"例如: {{workDirName}}",script_placeholder:"例如: /path/to/your/script.js",drag_hint:"拖拽组件到此处进行配置",select_hint:"选择一个组件进行配置",no_icons_found:"未找到图标",no_icons_available:"暂无可用图标",import_export:"导入/导出",import:"导入配置",export:"导出配置",download_template:"下载模板",import_export_help:"导出当前配置为JSON文件,或从JSON文件导入配置。您也可以下载配置模板作为参考。",export_success:"配置导出成功",export_failed:"配置导出失败",import_success:"配置导入成功",import_failed:"配置导入失败",invalid_config:"无效的配置文件",template_download_success:"模板下载成功",template_download_success_desc:"配置模板已下载到您的设备",template_download_failed:"模板下载失败"},eE={title:"日志查看器",close:"关闭",download:"下载",clear:"清除",auto_refresh_on:"自动刷新开启",auto_refresh_off:"自动刷新关闭",load_failed:"加载日志失败",no_logs_available:"暂无日志",logs_cleared:"日志清除成功",clear_failed:"清除日志失败",logs_downloaded:"日志下载成功",back_to_files:"返回文件列表",select_file:"选择要查看的日志文件",no_log_files_available:"暂无日志文件",load_files_failed:"加载日志文件失败",group_by_req_id:"按请求ID分组",grouped_on:"已分组",request_groups:"请求组",total_requests:"总请求数",total_logs:"总日志数",request:"请求",logs:"条日志",first_log:"首条日志",last_log:"末条日志",back_to_all_logs:"返回所有日志",worker_error:"Worker错误",worker_init_failed:"Worker初始化失败",grouping_not_supported:"服务器不支持日志分组",back:"返回"},tE={common:G_,app:Y_,login:K_,toplevel:I_,transformers:X_,providers:Q_,router:Z_,json_editor:J_,statusline:W_,log_viewer:eE},nE={en:{translation:V_},zh:{translation:tE}};Xt.use(w0).use(m_).init({resources:nE,fallbackLng:"en",interpolation:{escapeValue:!1}});var cd={exports:{}},si={},ud={exports:{}},fd={};/**
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 kv;function x_(){return kv||(kv=1,function(n){function a(A,X){var V=A.length;A.push(X);e:for(;0<V;){var ye=V-1>>>1,O=A[ye];if(0<s(O,X))A[ye]=X,A[V]=O,V=ye;else break e}}function l(A){return A.length===0?null:A[0]}function i(A){if(A.length===0)return null;var X=A[0],V=A.pop();if(V!==X){A[0]=V;e:for(var ye=0,O=A.length,G=O>>>1;ye<G;){var U=2*(ye+1)-1,K=A[U],P=U+1,oe=A[P];if(0>s(K,V))P<O&&0>s(oe,K)?(A[ye]=oe,A[P]=V,ye=P):(A[ye]=K,A[U]=V,ye=U);else if(P<O&&0>s(oe,V))A[ye]=oe,A[P]=V,ye=P;else break e}}return X}function s(A,X){var V=A.sortIndex-X.sortIndex;return V!==0?V:A.id-X.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;n.unstable_now=function(){return c.now()}}else{var f=Date,h=f.now();n.unstable_now=function(){return f.now()-h}}var p=[],m=[],v=1,b=null,w=3,S=!1,C=!1,E=!1,j=!1,R=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function H(A){for(var X=l(m);X!==null;){if(X.callback===null)i(m);else if(X.startTime<=A)i(m),X.sortIndex=X.expirationTime,a(p,X);else break;X=l(m)}}function M(A){if(E=!1,H(A),!C)if(l(p)!==null)C=!0,N||(N=!0,fe());else{var X=l(m);X!==null&&ee(M,X.startTime-A)}}var N=!1,B=-1,J=5,te=-1;function ae(){return j?!0:!(n.unstable_now()-te<J)}function re(){if(j=!1,N){var A=n.unstable_now();te=A;var X=!0;try{e:{C=!1,E&&(E=!1,L(B),B=-1),S=!0;var V=w;try{t:{for(H(A),b=l(p);b!==null&&!(b.expirationTime>A&&ae());){var ye=b.callback;if(typeof ye=="function"){b.callback=null,w=b.priorityLevel;var O=ye(b.expirationTime<=A);if(A=n.unstable_now(),typeof O=="function"){b.callback=O,H(A),X=!0;break t}b===l(p)&&i(p),H(A)}else i(p);b=l(p)}if(b!==null)X=!0;else{var G=l(m);G!==null&&ee(M,G.startTime-A),X=!1}}break e}finally{b=null,w=V,S=!1}X=void 0}}finally{X?fe():N=!1}}}var fe;if(typeof k=="function")fe=function(){k(re)};else if(typeof MessageChannel<"u"){var de=new MessageChannel,Q=de.port2;de.port1.onmessage=re,fe=function(){Q.postMessage(null)}}else fe=function(){R(re,0)};function ee(A,X){B=R(function(){A(n.unstable_now())},X)}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(A){A.callback=null},n.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<A?Math.floor(1e3/A):5},n.unstable_getCurrentPriorityLevel=function(){return w},n.unstable_next=function(A){switch(w){case 1:case 2:case 3:var X=3;break;default:X=w}var V=w;w=X;try{return A()}finally{w=V}},n.unstable_requestPaint=function(){j=!0},n.unstable_runWithPriority=function(A,X){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var V=w;w=A;try{return X()}finally{w=V}},n.unstable_scheduleCallback=function(A,X,V){var ye=n.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?ye+V:ye):V=ye,A){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=V+O,A={id:v++,callback:X,priorityLevel:A,startTime:V,expirationTime:O,sortIndex:-1},V>ye?(A.sortIndex=V,a(m,A),l(p)===null&&A===l(m)&&(E?(L(B),B=-1):E=!0,ee(M,V-ye))):(A.sortIndex=O,a(p,A),C||S||(C=!0,N||(N=!0,fe()))),A},n.unstable_shouldYield=ae,n.unstable_wrapCallback=function(A){var X=w;return function(){var V=w;w=X;try{return A.apply(this,arguments)}finally{w=V}}}}(nd)),nd}var zv;function w_(){return zv||(zv=1,td.exports=x_()),td.exports}var ad={exports:{}},Gt={};/**
31
+ */var Iv;function aE(){return Iv||(Iv=1,function(n){function a(O,I){var q=O.length;O.push(I);e:for(;0<q;){var ye=q-1>>>1,M=O[ye];if(0<s(M,I))O[ye]=I,O[q]=M,q=ye;else break e}}function l(O){return O.length===0?null:O[0]}function o(O){if(O.length===0)return null;var I=O[0],q=O.pop();if(q!==I){O[0]=q;e:for(var ye=0,M=O.length,Y=M>>>1;ye<Y;){var H=2*(ye+1)-1,K=O[H],le=H+1,he=O[le];if(0>s(K,q))le<M&&0>s(he,K)?(O[ye]=he,O[le]=q,ye=le):(O[ye]=K,O[H]=q,ye=H);else if(le<M&&0>s(he,q))O[ye]=he,O[le]=q,ye=le;else break e}}return I}function s(O,I){var q=O.sortIndex-I.sortIndex;return q!==0?q:O.id-I.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;n.unstable_now=function(){return c.now()}}else{var f=Date,m=f.now();n.unstable_now=function(){return f.now()-m}}var g=[],h=[],v=1,b=null,w=3,S=!1,N=!1,E=!1,R=!1,C=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function k(O){for(var I=l(h);I!==null;){if(I.callback===null)o(h);else if(I.startTime<=O)o(h),I.sortIndex=I.expirationTime,a(g,I);else break;I=l(h)}}function D(O){if(E=!1,k(O),!N)if(l(g)!==null)N=!0,j||(j=!0,ie());else{var I=l(h);I!==null&&te(D,I.startTime-O)}}var j=!1,U=-1,B=5,W=-1;function ne(){return R?!0:!(n.unstable_now()-W<B)}function ee(){if(R=!1,j){var O=n.unstable_now();W=O;var I=!0;try{e:{N=!1,E&&(E=!1,A(U),U=-1),S=!0;var q=w;try{t:{for(k(O),b=l(g);b!==null&&!(b.expirationTime>O&&ne());){var ye=b.callback;if(typeof ye=="function"){b.callback=null,w=b.priorityLevel;var M=ye(b.expirationTime<=O);if(O=n.unstable_now(),typeof M=="function"){b.callback=M,k(O),I=!0;break t}b===l(g)&&o(g),k(O)}else o(g);b=l(g)}if(b!==null)I=!0;else{var Y=l(h);Y!==null&&te(D,Y.startTime-O),I=!1}}break e}finally{b=null,w=q,S=!1}I=void 0}}finally{I?ie():j=!1}}}var ie;if(typeof T=="function")ie=function(){T(ee)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,X=fe.port2;fe.port1.onmessage=ee,ie=function(){X.postMessage(null)}}else ie=function(){C(ee,0)};function te(O,I){U=C(function(){O(n.unstable_now())},I)}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(O){O.callback=null},n.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<O?Math.floor(1e3/O):5},n.unstable_getCurrentPriorityLevel=function(){return w},n.unstable_next=function(O){switch(w){case 1:case 2:case 3:var I=3;break;default:I=w}var q=w;w=I;try{return O()}finally{w=q}},n.unstable_requestPaint=function(){R=!0},n.unstable_runWithPriority=function(O,I){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var q=w;w=O;try{return I()}finally{w=q}},n.unstable_scheduleCallback=function(O,I,q){var ye=n.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?ye+q:ye):q=ye,O){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=q+M,O={id:v++,callback:I,priorityLevel:O,startTime:q,expirationTime:M,sortIndex:-1},q>ye?(O.sortIndex=q,a(h,O),l(g)===null&&O===l(h)&&(E?(A(U),U=-1):E=!0,te(D,q-ye))):(O.sortIndex=M,a(g,O),N||S||(N=!0,j||(j=!0,ie()))),O},n.unstable_shouldYield=ne,n.unstable_wrapCallback=function(O){var I=w;return function(){var q=w;w=I;try{return O.apply(this,arguments)}finally{w=q}}}}(fd)),fd}var Xv;function rE(){return Xv||(Xv=1,ud.exports=aE()),ud.exports}var dd={exports:{}},It={};/**
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 Uv;function S_(){if(Uv)return Gt;Uv=1;var n=eh();function a(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)m+="&args[]="+encodeURIComponent(arguments[v])}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 c(p,m,v){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:b==null?null:""+b,children:p,containerInfo:m,implementation:v}}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 Gt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Gt.createPortal=function(p,m){var v=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 c(p,m,null,v)},Gt.flushSync=function(p){var m=f.T,v=i.p;try{if(f.T=null,i.p=2,p)return p()}finally{f.T=m,i.p=v,i.d.f()}},Gt.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))},Gt.prefetchDNS=function(p){typeof p=="string"&&i.d.D(p)},Gt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var v=m.as,b=h(v,m.crossOrigin),w=typeof m.integrity=="string"?m.integrity:void 0,S=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;v==="style"?i.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:b,integrity:w,fetchPriority:S}):v==="script"&&i.d.X(p,{crossOrigin:b,integrity:w,fetchPriority:S,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Gt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var v=h(m.as,m.crossOrigin);i.d.M(p,{crossOrigin:v,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)},Gt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var v=m.as,b=h(v,m.crossOrigin);i.d.L(p,v,{crossOrigin:b,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})}},Gt.preloadModule=function(p,m){if(typeof p=="string")if(m){var v=h(m.as,m.crossOrigin);i.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else i.d.m(p)},Gt.requestFormReset=function(p){i.d.r(p)},Gt.unstable_batchedUpdates=function(p,m){return p(m)},Gt.useFormState=function(p,m,v){return f.H.useFormState(p,m,v)},Gt.useFormStatus=function(){return f.H.useHostTransitionStatus()},Gt.version="19.1.1",Gt}var Pv;function i0(){if(Pv)return ad.exports;Pv=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(),ad.exports=S_(),ad.exports}/**
39
+ */var Qv;function lE(){if(Qv)return It;Qv=1;var n=hh();function a(g){var h="https://react.dev/errors/"+g;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)h+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+g+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var o={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 c(g,h,v){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:b==null?null:""+b,children:g,containerInfo:h,implementation:v}}var f=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(g,h){if(g==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return It.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,It.createPortal=function(g,h){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(a(299));return c(g,h,null,v)},It.flushSync=function(g){var h=f.T,v=o.p;try{if(f.T=null,o.p=2,g)return g()}finally{f.T=h,o.p=v,o.d.f()}},It.preconnect=function(g,h){typeof g=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(g,h))},It.prefetchDNS=function(g){typeof g=="string"&&o.d.D(g)},It.preinit=function(g,h){if(typeof g=="string"&&h&&typeof h.as=="string"){var v=h.as,b=m(v,h.crossOrigin),w=typeof h.integrity=="string"?h.integrity:void 0,S=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;v==="style"?o.d.S(g,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:b,integrity:w,fetchPriority:S}):v==="script"&&o.d.X(g,{crossOrigin:b,integrity:w,fetchPriority:S,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},It.preinitModule=function(g,h){if(typeof g=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var v=m(h.as,h.crossOrigin);o.d.M(g,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&o.d.M(g)},It.preload=function(g,h){if(typeof g=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var v=h.as,b=m(v,h.crossOrigin);o.d.L(g,v,{crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},It.preloadModule=function(g,h){if(typeof g=="string")if(h){var v=m(h.as,h.crossOrigin);o.d.m(g,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else o.d.m(g)},It.requestFormReset=function(g){o.d.r(g)},It.unstable_batchedUpdates=function(g,h){return g(h)},It.useFormState=function(g,h,v){return f.H.useFormState(g,h,v)},It.useFormStatus=function(){return f.H.useHostTransitionStatus()},It.version="19.1.0",It}var Zv;function S0(){if(Zv)return dd.exports;Zv=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(),dd.exports=lE(),dd.exports}/**
40
40
  * @license React
41
41
  * react-dom-client.production.js
42
42
  *
@@ -44,16 +44,16 @@
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 Hv;function __(){if(Hv)return ao;Hv=1;var n=w_(),a=eh(),l=i0();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 c(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(c(e)!==e)throw Error(i(188))}function p(e){var t=e.alternate;if(!t){if(t=c(e),t===null)throw Error(i(188));return t!==e?null:e}for(var r=e,o=t;;){var u=r.return;if(u===null)break;var d=u.alternate;if(d===null){if(o=u.return,o!==null){r=o;continue}break}if(u.child===d.child){for(d=u.child;d;){if(d===r)return h(u),e;if(d===o)return h(u),t;d=d.sibling}throw Error(i(188))}if(r.return!==o.return)r=u,o=d;else{for(var x=!1,_=u.child;_;){if(_===r){x=!0,r=u,o=d;break}if(_===o){x=!0,o=u,r=d;break}_=_.sibling}if(!x){for(_=d.child;_;){if(_===r){x=!0,r=d,o=u;break}if(_===o){x=!0,o=d,r=u;break}_=_.sibling}if(!x)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 v=Object.assign,b=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),L=Symbol.for("react.consumer"),k=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),te=Symbol.for("react.activity"),ae=Symbol.for("react.memo_cache_sentinel"),re=Symbol.iterator;function fe(e){return e===null||typeof e!="object"?null:(e=re&&e[re]||e["@@iterator"],typeof e=="function"?e:null)}var de=Symbol.for("react.client.reference");function Q(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 E:return"StrictMode";case M:return"Suspense";case N:return"SuspenseList";case te:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case S:return"Portal";case k:return(e.displayName||"Context")+".Provider";case L:return(e._context.displayName||"Context")+".Consumer";case H:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case B:return t=e.displayName||null,t!==null?t:Q(e.type)||"Memo";case J:t=e._payload,e=e._init;try{return Q(e(t))}catch{}}return null}var ee=Array.isArray,A=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},ye=[],O=-1;function G(e){return{current:e}}function U(e){0>O||(e.current=ye[O],ye[O]=null,O--)}function K(e,t){O++,ye[O]=e.current,e.current=t}var P=G(null),oe=G(null),me=G(null),ve=G(null);function Le(e,t){switch(K(me,t),K(oe,e),K(P,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Hg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Hg(t),e=Bg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}U(P),K(P,e)}function Fe(){U(P),U(oe),U(me)}function Je(e){e.memoizedState!==null&&K(ve,e);var t=P.current,r=Bg(t,e.type);t!==r&&(K(oe,e),K(P,r))}function Tt(e){oe.current===e&&(U(P),U(oe)),ve.current===e&&(U(ve),Ii._currentValue=V)}var Ze=Object.prototype.hasOwnProperty,an=n.unstable_scheduleCallback,ie=n.unstable_cancelCallback,ue=n.unstable_shouldYield,ge=n.unstable_requestPaint,he=n.unstable_now,Oe=n.unstable_getCurrentPriorityLevel,ke=n.unstable_ImmediatePriority,Pe=n.unstable_UserBlockingPriority,nt=n.unstable_NormalPriority,Ft=n.unstable_LowPriority,Bn=n.unstable_IdlePriority,Oo=n.log,ii=n.unstable_setDisableYieldValue,It=null,vt=null;function Mn(e){if(typeof Oo=="function"&&ii(e),vt&&typeof vt.setStrictMode=="function")try{vt.setStrictMode(It,e)}catch{}}var Ht=Math.clz32?Math.clz32:Ao,Gc=Math.log,$n=Math.LN2;function Ao(e){return e>>>=0,e===0?32:31-(Gc(e)/$n|0)|0}var vr=256,yr=4194304;function ra(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 br(e,t,r){var o=e.pendingLanes;if(o===0)return 0;var u=0,d=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var _=o&134217727;return _!==0?(o=_&~d,o!==0?u=ra(o):(x&=_,x!==0?u=ra(x):r||(r=_&~e,r!==0&&(u=ra(r))))):(_=o&~d,_!==0?u=ra(_):x!==0?u=ra(x):r||(r=o&~e,r!==0&&(u=ra(r)))),u===0?0:t!==0&&t!==u&&(t&d)===0&&(d=u&-u,r=t&-t,d>=r||d===32&&(r&4194048)!==0)?t:u}function Vn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function To(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 el(){var e=vr;return vr<<=1,(vr&4194048)===0&&(vr=256),e}function Mo(){var e=yr;return yr<<=1,(yr&62914560)===0&&(yr=4194304),e}function tl(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function xr(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Do(e,t,r,o,u,d){var x=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.entanglements,T=e.expirationTimes,Y=e.hiddenUpdates;for(r=x&~r;0<r;){var ne=31-Ht(r),se=1<<ne;_[ne]=0,T[ne]=-1;var I=Y[ne];if(I!==null)for(Y[ne]=null,ne=0;ne<I.length;ne++){var Z=I[ne];Z!==null&&(Z.lane&=-536870913)}r&=~se}o!==0&&wr(e,o,0),d!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=d&~(x&~t))}function wr(e,t,r){e.pendingLanes|=t,e.suspendedLanes&=~t;var o=31-Ht(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-Ht(r),u=1<<o;u&t|e[o]&t&&(e[o]|=t),r&=~u}}function oi(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 si(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function D(){var e=X.p;return e!==0?e:(e=window.event,e===void 0?32:lv(e.type))}function q(e,t){var r=X.p;try{return X.p=e,t()}finally{X.p=r}}var W=Math.random().toString(36).slice(2),ce="__reactFiber$"+W,pe="__reactProps$"+W,Se="__reactContainer$"+W,Ne="__reactEvents$"+W,_e="__reactListeners$"+W,Ae="__reactHandles$"+W,Te="__reactResources$"+W,Ee="__reactMarker$"+W;function Re(e){delete e[ce],delete e[pe],delete e[Ne],delete e[_e],delete e[Ae]}function $e(e){var t=e[ce];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Se]||r[ce]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Fg(e);e!==null;){if(r=e[ce])return r;e=Fg(e)}return t}e=r,r=e.parentNode}return null}function at(e){if(e=e[ce]||e[Se]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function wt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function St(e){var t=e[Te];return t||(t=e[Te]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function He(e){e[Ee]=!0}var it=new Set,qn={};function rn(e,t){Xt(e,t),Xt(e+"Capture",t)}function Xt(e,t){for(qn[e]=t,e=0;e<t.length;e++)it.add(t[e])}var yn=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]*$"),nl={},Ta={};function la(e){return Ze.call(Ta,e)?!0:Ze.call(nl,e)?!1:yn.test(e)?Ta[e]=!0:(nl[e]=!0,!1)}function ia(e,t,r){if(la(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 oa(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 Ye(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 jt,_r;function bn(e){if(jt===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);jt=t&&t[1]||"",_r=-1<r.stack.indexOf(`
47
+ */var Jv;function oE(){if(Jv)return si;Jv=1;var n=rE(),a=hh(),l=S0();function o(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 c(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 m(e){if(c(e)!==e)throw Error(o(188))}function g(e){var t=e.alternate;if(!t){if(t=c(e),t===null)throw Error(o(188));return t!==e?null:e}for(var r=e,i=t;;){var u=r.return;if(u===null)break;var p=u.alternate;if(p===null){if(i=u.return,i!==null){r=i;continue}break}if(u.child===p.child){for(p=u.child;p;){if(p===r)return m(u),e;if(p===i)return m(u),t;p=p.sibling}throw Error(o(188))}if(r.return!==i.return)r=u,i=p;else{for(var x=!1,_=u.child;_;){if(_===r){x=!0,r=u,i=p;break}if(_===i){x=!0,i=u,r=p;break}_=_.sibling}if(!x){for(_=p.child;_;){if(_===r){x=!0,r=p,i=u;break}if(_===i){x=!0,i=p,r=u;break}_=_.sibling}if(!x)throw Error(o(189))}}if(r.alternate!==i)throw Error(o(190))}if(r.tag!==3)throw Error(o(188));return r.stateNode.current===r?e:t}function h(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=h(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,b=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),A=Symbol.for("react.consumer"),T=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),ne=Symbol.for("react.memo_cache_sentinel"),ee=Symbol.iterator;function ie(e){return e===null||typeof e!="object"?null:(e=ee&&e[ee]||e["@@iterator"],typeof e=="function"?e:null)}var fe=Symbol.for("react.client.reference");function X(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===fe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N:return"Fragment";case R:return"Profiler";case E:return"StrictMode";case D:return"Suspense";case j:return"SuspenseList";case W:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case S:return"Portal";case T:return(e.displayName||"Context")+".Provider";case A:return(e._context.displayName||"Context")+".Consumer";case k:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case U:return t=e.displayName||null,t!==null?t:X(e.type)||"Memo";case B:t=e._payload,e=e._init;try{return X(e(t))}catch{}}return null}var te=Array.isArray,O=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q={pending:!1,data:null,method:null,action:null},ye=[],M=-1;function Y(e){return{current:e}}function H(e){0>M||(e.current=ye[M],ye[M]=null,M--)}function K(e,t){M++,ye[M]=e.current,e.current=t}var le=Y(null),he=Y(null),ve=Y(null),be=Y(null);function ze(e,t){switch(K(ve,t),K(he,e),K(le,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Jg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Jg(t),e=Wg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}H(le),K(le,e)}function ae(){H(le),H(he),H(ve)}function we(e){e.memoizedState!==null&&K(be,e);var t=le.current,r=Wg(t,e.type);t!==r&&(K(he,e),K(le,r))}function Pe(e){he.current===e&&(H(le),H(he)),be.current===e&&(H(be),ti._currentValue=q)}var De=Object.prototype.hasOwnProperty,qe=n.unstable_scheduleCallback,oe=n.unstable_cancelCallback,ce=n.unstable_shouldYield,ge=n.unstable_requestPaint,me=n.unstable_now,Te=n.unstable_getCurrentPriorityLevel,He=n.unstable_ImmediatePriority,Fe=n.unstable_UserBlockingPriority,ot=n.unstable_NormalPriority,Yt=n.unstable_LowPriority,$n=n.unstable_IdlePriority,Ui=n.log,uo=n.unstable_setDisableYieldValue,Jt=null,xt=null;function Dn(e){if(typeof Ui=="function"&&uo(e),xt&&typeof xt.setStrictMode=="function")try{xt.setStrictMode(Jt,e)}catch{}}var Bt=Math.clz32?Math.clz32:Pi,tu=Math.log,qn=Math.LN2;function Pi(e){return e>>>=0,e===0?32:31-(tu(e)/qn|0)|0}var br=256,xr=4194304;function oa(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 wr(e,t,r){var i=e.pendingLanes;if(i===0)return 0;var u=0,p=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var _=i&134217727;return _!==0?(i=_&~p,i!==0?u=oa(i):(x&=_,x!==0?u=oa(x):r||(r=_&~e,r!==0&&(u=oa(r))))):(_=i&~p,_!==0?u=oa(_):x!==0?u=oa(x):r||(r=i&~e,r!==0&&(u=oa(r)))),u===0?0:t!==0&&t!==u&&(t&p)===0&&(p=u&-u,r=t&-t,p>=r||p===32&&(r&4194048)!==0)?t:u}function Fn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Hi(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 al(){var e=br;return br<<=1,(br&4194048)===0&&(br=256),e}function Bi(){var e=xr;return xr<<=1,(xr&62914560)===0&&(xr=4194304),e}function rl(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Sr(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function $i(e,t,r,i,u,p){var x=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.entanglements,L=e.expirationTimes,G=e.hiddenUpdates;for(r=x&~r;0<r;){var re=31-Bt(r),ue=1<<re;_[re]=0,L[re]=-1;var Q=G[re];if(Q!==null)for(G[re]=null,re=0;re<Q.length;re++){var Z=Q[re];Z!==null&&(Z.lane&=-536870913)}r&=~ue}i!==0&&_r(e,i,0),p!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=p&~(x&~t))}function _r(e,t,r){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-Bt(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|r&4194090}function Er(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var i=31-Bt(r),u=1<<i;u&t|e[i]&t&&(e[i]|=t),r&=~u}}function fo(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 ho(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function z(){var e=I.p;return e!==0?e:(e=window.event,e===void 0?32:yv(e.type))}function F(e,t){var r=I.p;try{return I.p=e,t()}finally{I.p=r}}var J=Math.random().toString(36).slice(2),de="__reactFiber$"+J,pe="__reactProps$"+J,Ne="__reactContainer$"+J,Re="__reactEvents$"+J,Ce="__reactListeners$"+J,Me="__reactHandles$"+J,Le="__reactResources$"+J,je="__reactMarker$"+J;function Oe(e){delete e[de],delete e[pe],delete e[Re],delete e[Ce],delete e[Me]}function Ye(e){var t=e[de];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Ne]||r[de]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=av(e);e!==null;){if(r=e[de])return r;e=av(e)}return t}e=r,r=e.parentNode}return null}function st(e){if(e=e[de]||e[Ne]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function _t(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Et(e){var t=e[Le];return t||(t=e[Le]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ve(e){e[je]=!0}var dt=new Set,Vn={};function ln(e,t){Qt(e,t),Qt(e+"Capture",t)}function Qt(e,t){for(Vn[e]=t,e=0;e<t.length;e++)dt.add(t[e])}var yn=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]*$"),ll={},ka={};function ia(e){return De.call(ka,e)?!0:De.call(ll,e)?!1:yn.test(e)?ka[e]=!0:(ll[e]=!0,!1)}function sa(e,t,r){if(ia(t))if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+r)}}function ca(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 Xe(e,t,r,i){if(i===null)e.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(t,r,""+i)}}var At,Nr;function bn(e){if(At===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);At=t&&t[1]||"",Nr=-1<r.stack.indexOf(`
48
48
  at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
49
- `+jt+e+_r}var yt=!1;function Ma(e,t){if(!e||yt)return"";yt=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(t){var se=function(){throw Error()};if(Object.defineProperty(se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(se,[])}catch(Z){var I=Z}Reflect.construct(e,[],se)}else{try{se.call()}catch(Z){I=Z}e.call(se.prototype)}}else{try{throw Error()}catch(Z){I=Z}(se=e())&&typeof se.catch=="function"&&se.catch(function(){})}}catch(Z){if(Z&&I&&typeof Z.stack=="string")return[Z.stack,I.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=o.DetermineComponentFrameRoot(),x=d[0],_=d[1];if(x&&_){var T=x.split(`
50
- `),Y=_.split(`
51
- `);for(u=o=0;o<T.length&&!T[o].includes("DetermineComponentFrameRoot");)o++;for(;u<Y.length&&!Y[u].includes("DetermineComponentFrameRoot");)u++;if(o===T.length||u===Y.length)for(o=T.length-1,u=Y.length-1;1<=o&&0<=u&&T[o]!==Y[u];)u--;for(;1<=o&&0<=u;o--,u--)if(T[o]!==Y[u]){if(o!==1||u!==1)do if(o--,u--,0>u||T[o]!==Y[u]){var ne=`
52
- `+T[o].replace(" at new "," at ");return e.displayName&&ne.includes("<anonymous>")&&(ne=ne.replace("<anonymous>",e.displayName)),ne}while(1<=o&&0<=u);break}}}finally{yt=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?bn(r):""}function Lo(e){switch(e.tag){case 26:case 27:case 5:return bn(e.type);case 16:return bn("Lazy");case 13:return bn("Suspense");case 19:return bn("SuspenseList");case 0:case 15:return Ma(e.type,!1);case 11:return Ma(e.type.render,!1);case 1:return Ma(e.type,!0);case 31:return bn("Activity");default:return""}}function ko(e){try{var t="";do t+=Lo(e),e=e.return;while(e);return t}catch(r){return`
49
+ `+At+e+Nr}var wt=!1;function za(e,t){if(!e||wt)return"";wt=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(Z){var Q=Z}Reflect.construct(e,[],ue)}else{try{ue.call()}catch(Z){Q=Z}e.call(ue.prototype)}}else{try{throw Error()}catch(Z){Q=Z}(ue=e())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(Z){if(Z&&Q&&typeof Z.stack=="string")return[Z.stack,Q.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=i.DetermineComponentFrameRoot(),x=p[0],_=p[1];if(x&&_){var L=x.split(`
50
+ `),G=_.split(`
51
+ `);for(u=i=0;i<L.length&&!L[i].includes("DetermineComponentFrameRoot");)i++;for(;u<G.length&&!G[u].includes("DetermineComponentFrameRoot");)u++;if(i===L.length||u===G.length)for(i=L.length-1,u=G.length-1;1<=i&&0<=u&&L[i]!==G[u];)u--;for(;1<=i&&0<=u;i--,u--)if(L[i]!==G[u]){if(i!==1||u!==1)do if(i--,u--,0>u||L[i]!==G[u]){var re=`
52
+ `+L[i].replace(" at new "," at ");return e.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",e.displayName)),re}while(1<=i&&0<=u);break}}}finally{wt=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?bn(r):""}function qi(e){switch(e.tag){case 26:case 27:case 5:return bn(e.type);case 16:return bn("Lazy");case 13:return bn("Suspense");case 19:return bn("SuspenseList");case 0:case 15:return za(e.type,!1);case 11:return za(e.type.render,!1);case 1:return za(e.type,!0);case 31:return bn("Activity");default:return""}}function Fi(e){try{var t="";do t+=qi(e),e=e.return;while(e);return t}catch(r){return`
53
53
  Error generating stack: `+r.message+`
54
- `+r.stack}}function xn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Lh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Gx(e){var t=Lh(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 u=r.get,d=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(x){o=""+x,d.call(this,x)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return o},setValue:function(x){o=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function zo(e){e._valueTracker||(e._valueTracker=Gx(e))}function kh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),o="";return e&&(o=Lh(e)?e.checked?"true":"false":e.value),e=o,e!==r?(t.setValue(e),!0):!1}function Uo(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 Kx=/[\n"\\]/g;function wn(e){return e.replace(Kx,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Kc(e,t,r,o,u,d,x,_){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),t!=null?x==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+xn(t)):e.value!==""+xn(t)&&(e.value=""+xn(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?Xc(e,x,xn(t)):r!=null?Xc(e,x,xn(r)):o!=null&&e.removeAttribute("value"),u==null&&d!=null&&(e.defaultChecked=!!d),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?e.name=""+xn(_):e.removeAttribute("name")}function zh(e,t,r,o,u,d,x,_){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?""+xn(r):"",t=t!=null?""+xn(t):r,_||t===e.value||(e.value=t),e.defaultValue=t}o=o??u,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=_?e.checked:!!o,e.defaultChecked=!!o,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x)}function Xc(e,t,r){t==="number"&&Uo(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function al(e,t,r,o){if(e=e.options,t){t={};for(var u=0;u<r.length;u++)t["$"+r[u]]=!0;for(r=0;r<e.length;r++)u=t.hasOwnProperty("$"+e[r].value),e[r].selected!==u&&(e[r].selected=u),u&&o&&(e[r].defaultSelected=!0)}else{for(r=""+xn(r),t=null,u=0;u<e.length;u++){if(e[u].value===r){e[u].selected=!0,o&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function Uh(e,t,r){if(t!=null&&(t=""+xn(t),t!==e.value&&(e.value=t),r==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=r!=null?""+xn(r):""}function Ph(e,t,r,o){if(t==null){if(o!=null){if(r!=null)throw Error(i(92));if(ee(o)){if(1<o.length)throw Error(i(93));o=o[0]}r=o}r==null&&(r=""),t=r}r=xn(t),e.defaultValue=r,o=e.textContent,o===r&&o!==""&&o!==null&&(e.value=o)}function rl(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Xx=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 Hh(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||Xx.has(t)?t==="float"?e.cssFloat=r:e[t]=(""+r).trim():e[t]=r+"px"}function Bh(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 u in t)o=t[u],t.hasOwnProperty(u)&&r[u]!==o&&Hh(e,u,o)}else for(var d in t)t.hasOwnProperty(d)&&Hh(e,d,t[d])}function Qc(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 Qx=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"]]),Ix=/^[\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 Po(e){return Ix.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Ic=null;function Zc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ll=null,il=null;function $h(e){var t=at(e);if(t&&(e=t.stateNode)){var r=e[pe]||null;e:switch(e=t.stateNode,t.type){case"input":if(Kc(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="'+wn(""+t)+'"][type="radio"]'),t=0;t<r.length;t++){var o=r[t];if(o!==e&&o.form===e.form){var u=o[pe]||null;if(!u)throw Error(i(90));Kc(o,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<r.length;t++)o=r[t],o.form===e.form&&kh(o)}break e;case"textarea":Uh(e,r.value,r.defaultValue);break e;case"select":t=r.value,t!=null&&al(e,!!r.multiple,t,!1)}}}var Jc=!1;function Vh(e,t,r){if(Jc)return e(t,r);Jc=!0;try{var o=e(t);return o}finally{if(Jc=!1,(ll!==null||il!==null)&&(_s(),ll&&(t=ll,e=il,il=ll=null,$h(t),e)))for(t=0;t<e.length;t++)$h(e[t])}}function ci(e,t){var r=e.stateNode;if(r===null)return null;var o=r[pe]||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 sa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Wc=!1;if(sa)try{var ui={};Object.defineProperty(ui,"passive",{get:function(){Wc=!0}}),window.addEventListener("test",ui,ui),window.removeEventListener("test",ui,ui)}catch{Wc=!1}var Da=null,eu=null,Ho=null;function qh(){if(Ho)return Ho;var e,t=eu,r=t.length,o,u="value"in Da?Da.value:Da.textContent,d=u.length;for(e=0;e<r&&t[e]===u[e];e++);var x=r-e;for(o=1;o<=x&&t[r-o]===u[d-o];o++);return Ho=u.slice(e,1<o?1-o:void 0)}function Bo(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 $o(){return!0}function Fh(){return!1}function Zt(e){function t(r,o,u,d,x){this._reactName=r,this._targetInst=u,this.type=o,this.nativeEvent=d,this.target=x,this.currentTarget=null;for(var _ in e)e.hasOwnProperty(_)&&(r=e[_],this[_]=r?r(d):d[_]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?$o:Fh,this.isPropagationStopped=Fh,this}return v(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=$o)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=$o)},persist:function(){},isPersistent:$o}),t}var Er={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vo=Zt(Er),fi=v({},Er,{view:0,detail:0}),Zx=Zt(fi),tu,nu,di,qo=v({},fi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ru,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!==di&&(di&&e.type==="mousemove"?(tu=e.screenX-di.screenX,nu=e.screenY-di.screenY):nu=tu=0,di=e),tu)},movementY:function(e){return"movementY"in e?e.movementY:nu}}),Yh=Zt(qo),Jx=v({},qo,{dataTransfer:0}),Wx=Zt(Jx),e1=v({},fi,{relatedTarget:0}),au=Zt(e1),t1=v({},Er,{animationName:0,elapsedTime:0,pseudoElement:0}),n1=Zt(t1),a1=v({},Er,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),r1=Zt(a1),l1=v({},Er,{data:0}),Gh=Zt(l1),i1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},o1={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"},s1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function c1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=s1[e])?!!t[e]:!1}function ru(){return c1}var u1=v({},fi,{key:function(e){if(e.key){var t=i1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Bo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?o1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ru,charCode:function(e){return e.type==="keypress"?Bo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Bo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),f1=Zt(u1),d1=v({},qo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Kh=Zt(d1),h1=v({},fi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ru}),m1=Zt(h1),p1=v({},Er,{propertyName:0,elapsedTime:0,pseudoElement:0}),g1=Zt(p1),v1=v({},qo,{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}),y1=Zt(v1),b1=v({},Er,{newState:0,oldState:0}),x1=Zt(b1),w1=[9,13,27,32],lu=sa&&"CompositionEvent"in window,hi=null;sa&&"documentMode"in document&&(hi=document.documentMode);var S1=sa&&"TextEvent"in window&&!hi,Xh=sa&&(!lu||hi&&8<hi&&11>=hi),Qh=" ",Ih=!1;function Zh(e,t){switch(e){case"keyup":return w1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ol=!1;function _1(e,t){switch(e){case"compositionend":return Jh(t);case"keypress":return t.which!==32?null:(Ih=!0,Qh);case"textInput":return e=t.data,e===Qh&&Ih?null:e;default:return null}}function E1(e,t){if(ol)return e==="compositionend"||!lu&&Zh(e,t)?(e=qh(),Ho=eu=Da=null,ol=!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 Xh&&t.locale!=="ko"?null:t.data;default:return null}}var C1={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 Wh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!C1[e.type]:t==="textarea"}function em(e,t,r,o){ll?il?il.push(o):il=[o]:ll=o,t=Os(t,"onChange"),0<t.length&&(r=new Vo("onChange","change",null,r,o),e.push({event:r,listeners:t}))}var mi=null,pi=null;function N1(e){Lg(e,0)}function Fo(e){var t=wt(e);if(kh(t))return e}function tm(e,t){if(e==="change")return t}var nm=!1;if(sa){var iu;if(sa){var ou="oninput"in document;if(!ou){var am=document.createElement("div");am.setAttribute("oninput","return;"),ou=typeof am.oninput=="function"}iu=ou}else iu=!1;nm=iu&&(!document.documentMode||9<document.documentMode)}function rm(){mi&&(mi.detachEvent("onpropertychange",lm),pi=mi=null)}function lm(e){if(e.propertyName==="value"&&Fo(pi)){var t=[];em(t,pi,e,Zc(e)),Vh(N1,t)}}function R1(e,t,r){e==="focusin"?(rm(),mi=t,pi=r,mi.attachEvent("onpropertychange",lm)):e==="focusout"&&rm()}function j1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Fo(pi)}function O1(e,t){if(e==="click")return Fo(t)}function A1(e,t){if(e==="input"||e==="change")return Fo(t)}function T1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ln=typeof Object.is=="function"?Object.is:T1;function gi(e,t){if(ln(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 u=r[o];if(!Ze.call(t,u)||!ln(e[u],t[u]))return!1}return!0}function im(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function om(e,t){var r=im(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=im(r)}}function sm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?sm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function cm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Uo(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=Uo(e.document)}return t}function su(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 M1=sa&&"documentMode"in document&&11>=document.documentMode,sl=null,cu=null,vi=null,uu=!1;function um(e,t,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;uu||sl==null||sl!==Uo(o)||(o=sl,"selectionStart"in o&&su(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}),vi&&gi(vi,o)||(vi=o,o=Os(cu,"onSelect"),0<o.length&&(t=new Vo("onSelect","select",null,t,r),e.push({event:t,listeners:o}),t.target=sl)))}function Cr(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var cl={animationend:Cr("Animation","AnimationEnd"),animationiteration:Cr("Animation","AnimationIteration"),animationstart:Cr("Animation","AnimationStart"),transitionrun:Cr("Transition","TransitionRun"),transitionstart:Cr("Transition","TransitionStart"),transitioncancel:Cr("Transition","TransitionCancel"),transitionend:Cr("Transition","TransitionEnd")},fu={},fm={};sa&&(fm=document.createElement("div").style,"AnimationEvent"in window||(delete cl.animationend.animation,delete cl.animationiteration.animation,delete cl.animationstart.animation),"TransitionEvent"in window||delete cl.transitionend.transition);function Nr(e){if(fu[e])return fu[e];if(!cl[e])return e;var t=cl[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in fm)return fu[e]=t[r];return e}var dm=Nr("animationend"),hm=Nr("animationiteration"),mm=Nr("animationstart"),D1=Nr("transitionrun"),L1=Nr("transitionstart"),k1=Nr("transitioncancel"),pm=Nr("transitionend"),gm=new Map,du="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(" ");du.push("scrollEnd");function Dn(e,t){gm.set(e,t),rn(t,[e])}var vm=new WeakMap;function Sn(e,t){if(typeof e=="object"&&e!==null){var r=vm.get(e);return r!==void 0?r:(t={value:e,source:t,stack:ko(t)},vm.set(e,t),t)}return{value:e,source:t,stack:ko(t)}}var _n=[],ul=0,hu=0;function Yo(){for(var e=ul,t=hu=ul=0;t<e;){var r=_n[t];_n[t++]=null;var o=_n[t];_n[t++]=null;var u=_n[t];_n[t++]=null;var d=_n[t];if(_n[t++]=null,o!==null&&u!==null){var x=o.pending;x===null?u.next=u:(u.next=x.next,x.next=u),o.pending=u}d!==0&&ym(r,u,d)}}function Go(e,t,r,o){_n[ul++]=e,_n[ul++]=t,_n[ul++]=r,_n[ul++]=o,hu|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function mu(e,t,r,o){return Go(e,t,r,o),Ko(e)}function fl(e,t){return Go(e,null,null,t),Ko(e)}function ym(e,t,r){e.lanes|=r;var o=e.alternate;o!==null&&(o.lanes|=r);for(var u=!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||(u=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,u&&t!==null&&(u=31-Ht(r),e=d.hiddenUpdates,o=e[u],o===null?e[u]=[t]:o.push(t),t.lane=r|536870912),d):null}function Ko(e){if(50<Vi)throw Vi=0,wf=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var dl={};function z1(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 on(e,t,r,o){return new z1(e,t,r,o)}function pu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ca(e,t){var r=e.alternate;return r===null?(r=on(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 bm(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 Xo(e,t,r,o,u,d){var x=0;if(o=e,typeof e=="function")pu(e)&&(x=1);else if(typeof e=="string")x=Pw(e,r,P.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case te:return e=on(31,r,t,u),e.elementType=te,e.lanes=d,e;case C:return Rr(r.children,u,d,t);case E:x=8,u|=24;break;case j:return e=on(12,r,t,u|2),e.elementType=j,e.lanes=d,e;case M:return e=on(13,r,t,u),e.elementType=M,e.lanes=d,e;case N:return e=on(19,r,t,u),e.elementType=N,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case R:case k:x=10;break e;case L:x=9;break e;case H:x=11;break e;case B:x=14;break e;case J:x=16,o=null;break e}x=29,r=Error(i(130,e===null?"null":typeof e,"")),o=null}return t=on(x,r,t,u),t.elementType=e,t.type=o,t.lanes=d,t}function Rr(e,t,r,o){return e=on(7,e,o,t),e.lanes=r,e}function gu(e,t,r){return e=on(6,e,null,t),e.lanes=r,e}function vu(e,t,r){return t=on(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var hl=[],ml=0,Qo=null,Io=0,En=[],Cn=0,jr=null,ua=1,fa="";function Or(e,t){hl[ml++]=Io,hl[ml++]=Qo,Qo=e,Io=t}function xm(e,t,r){En[Cn++]=ua,En[Cn++]=fa,En[Cn++]=jr,jr=e;var o=ua;e=fa;var u=32-Ht(o)-1;o&=~(1<<u),r+=1;var d=32-Ht(t)+u;if(30<d){var x=u-u%5;d=(o&(1<<x)-1).toString(32),o>>=x,u-=x,ua=1<<32-Ht(t)+u|r<<u|o,fa=d+e}else ua=1<<d|r<<u|o,fa=e}function yu(e){e.return!==null&&(Or(e,1),xm(e,1,0))}function bu(e){for(;e===Qo;)Qo=hl[--ml],hl[ml]=null,Io=hl[--ml],hl[ml]=null;for(;e===jr;)jr=En[--Cn],En[Cn]=null,fa=En[--Cn],En[Cn]=null,ua=En[--Cn],En[Cn]=null}var Qt=null,_t=null,tt=!1,Ar=null,Fn=!1,xu=Error(i(519));function Tr(e){var t=Error(i(418,""));throw xi(Sn(t,e)),xu}function wm(e){var t=e.stateNode,r=e.type,o=e.memoizedProps;switch(t[ce]=e,t[pe]=o,r){case"dialog":Ie("cancel",t),Ie("close",t);break;case"iframe":case"object":case"embed":Ie("load",t);break;case"video":case"audio":for(r=0;r<Fi.length;r++)Ie(Fi[r],t);break;case"source":Ie("error",t);break;case"img":case"image":case"link":Ie("error",t),Ie("load",t);break;case"details":Ie("toggle",t);break;case"input":Ie("invalid",t),zh(t,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0),zo(t);break;case"select":Ie("invalid",t);break;case"textarea":Ie("invalid",t),Ph(t,o.value,o.defaultValue,o.children),zo(t)}r=o.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||t.textContent===""+r||o.suppressHydrationWarning===!0||Pg(t.textContent,r)?(o.popover!=null&&(Ie("beforetoggle",t),Ie("toggle",t)),o.onScroll!=null&&Ie("scroll",t),o.onScrollEnd!=null&&Ie("scrollend",t),o.onClick!=null&&(t.onclick=As),t=!0):t=!1,t||Tr(e)}function Sm(e){for(Qt=e.return;Qt;)switch(Qt.tag){case 5:case 13:Fn=!1;return;case 27:case 3:Fn=!0;return;default:Qt=Qt.return}}function yi(e){if(e!==Qt)return!1;if(!tt)return Sm(e),tt=!0,!1;var t=e.tag,r;if((r=t!==3&&t!==27)&&((r=t===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||Uf(e.type,e.memoizedProps)),r=!r),r&&_t&&Tr(e),Sm(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){_t=kn(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++;e=e.nextSibling}_t=null}}else t===27?(t=_t,Qa(e.type)?(e=$f,$f=null,_t=e):_t=t):_t=Qt?kn(e.stateNode.nextSibling):null;return!0}function bi(){_t=Qt=null,tt=!1}function _m(){var e=Ar;return e!==null&&(en===null?en=e:en.push.apply(en,e),Ar=null),e}function xi(e){Ar===null?Ar=[e]:Ar.push(e)}var wu=G(null),Mr=null,da=null;function La(e,t,r){K(wu,t._currentValue),t._currentValue=r}function ha(e){e._currentValue=wu.current,U(wu)}function Su(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 _u(e,t,r,o){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var d=u.dependencies;if(d!==null){var x=u.child;d=d.firstContext;e:for(;d!==null;){var _=d;d=u;for(var T=0;T<t.length;T++)if(_.context===t[T]){d.lanes|=r,_=d.alternate,_!==null&&(_.lanes|=r),Su(d.return,r,e),o||(x=null);break e}d=_.next}}else if(u.tag===18){if(x=u.return,x===null)throw Error(i(341));x.lanes|=r,d=x.alternate,d!==null&&(d.lanes|=r),Su(x,r,e),x=null}else x=u.child;if(x!==null)x.return=u;else for(x=u;x!==null;){if(x===e){x=null;break}if(u=x.sibling,u!==null){u.return=x.return,x=u;break}x=x.return}u=x}}function wi(e,t,r,o){e=null;for(var u=t,d=!1;u!==null;){if(!d){if((u.flags&524288)!==0)d=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var x=u.alternate;if(x===null)throw Error(i(387));if(x=x.memoizedProps,x!==null){var _=u.type;ln(u.pendingProps.value,x.value)||(e!==null?e.push(_):e=[_])}}else if(u===ve.current){if(x=u.alternate,x===null)throw Error(i(387));x.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(Ii):e=[Ii])}u=u.return}e!==null&&_u(t,e,r,o),t.flags|=262144}function Zo(e){for(e=e.firstContext;e!==null;){if(!ln(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Dr(e){Mr=e,da=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Yt(e){return Em(Mr,e)}function Jo(e,t){return Mr===null&&Dr(e),Em(e,t)}function Em(e,t){var r=t._currentValue;if(t={context:t,memoizedValue:r,next:null},da===null){if(e===null)throw Error(i(308));da=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else da=da.next=t;return r}var U1=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,H1=n.unstable_NormalPriority,Mt={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Eu(){return{controller:new U1,data:new Map,refCount:0}}function Si(e){e.refCount--,e.refCount===0&&P1(H1,function(){e.controller.abort()})}var _i=null,Cu=0,pl=0,gl=null;function B1(e,t){if(_i===null){var r=_i=[];Cu=0,pl=jf(),gl={status:"pending",value:void 0,then:function(o){r.push(o)}}}return Cu++,t.then(Cm,Cm),t}function Cm(){if(--Cu===0&&_i!==null){gl!==null&&(gl.status="fulfilled");var e=_i;_i=null,pl=0,gl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function $1(e,t){var r=[],o={status:"pending",value:null,reason:null,then:function(u){r.push(u)}};return e.then(function(){o.status="fulfilled",o.value=t;for(var u=0;u<r.length;u++)(0,r[u])(t)},function(u){for(o.status="rejected",o.reason=u,u=0;u<r.length;u++)(0,r[u])(void 0)}),o}var Nm=A.S;A.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&B1(e,t),Nm!==null&&Nm(e,t)};var Lr=G(null);function Nu(){var e=Lr.current;return e!==null?e:ht.pooledCache}function Wo(e,t){t===null?K(Lr,Lr.current):K(Lr,t.pool)}function Rm(){var e=Nu();return e===null?null:{parent:Mt._currentValue,pool:e}}var Ei=Error(i(460)),jm=Error(i(474)),es=Error(i(542)),Ru={then:function(){}};function Om(e){return e=e.status,e==="fulfilled"||e==="rejected"}function ts(){}function Am(e,t,r){switch(r=e[r],r===void 0?e.push(t):r!==t&&(t.then(ts,ts),t=r),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Mm(e),e;default:if(typeof t.status=="string")t.then(ts,ts);else{if(e=ht,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status="pending",e.then(function(o){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=o}},function(o){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=o}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Mm(e),e}throw Ci=t,Ei}}var Ci=null;function Tm(){if(Ci===null)throw Error(i(459));var e=Ci;return Ci=null,e}function Mm(e){if(e===Ei||e===es)throw Error(i(483))}var ka=!1;function ju(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ou(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 za(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ua(e,t,r){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(rt&2)!==0){var u=o.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),o.pending=t,t=Ko(e),ym(e,null,r),t}return Go(e,o,t,r),Ko(e)}function Ni(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 Au(e,t){var r=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,r===o)){var u=null,d=null;if(r=r.firstBaseUpdate,r!==null){do{var x={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};d===null?u=d=x:d=d.next=x,r=r.next}while(r!==null);d===null?u=d=t:d=d.next=t}else u=d=t;r={baseState:o.baseState,firstBaseUpdate:u,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 Tu=!1;function Ri(){if(Tu){var e=gl;if(e!==null)throw e}}function ji(e,t,r,o){Tu=!1;var u=e.updateQueue;ka=!1;var d=u.firstBaseUpdate,x=u.lastBaseUpdate,_=u.shared.pending;if(_!==null){u.shared.pending=null;var T=_,Y=T.next;T.next=null,x===null?d=Y:x.next=Y,x=T;var ne=e.alternate;ne!==null&&(ne=ne.updateQueue,_=ne.lastBaseUpdate,_!==x&&(_===null?ne.firstBaseUpdate=Y:_.next=Y,ne.lastBaseUpdate=T))}if(d!==null){var se=u.baseState;x=0,ne=Y=T=null,_=d;do{var I=_.lane&-536870913,Z=I!==_.lane;if(Z?(We&I)===I:(o&I)===I){I!==0&&I===pl&&(Tu=!0),ne!==null&&(ne=ne.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var ze=e,Me=_;I=t;var ct=r;switch(Me.tag){case 1:if(ze=Me.payload,typeof ze=="function"){se=ze.call(ct,se,I);break e}se=ze;break e;case 3:ze.flags=ze.flags&-65537|128;case 0:if(ze=Me.payload,I=typeof ze=="function"?ze.call(ct,se,I):ze,I==null)break e;se=v({},se,I);break e;case 2:ka=!0}}I=_.callback,I!==null&&(e.flags|=64,Z&&(e.flags|=8192),Z=u.callbacks,Z===null?u.callbacks=[I]:Z.push(I))}else Z={lane:I,tag:_.tag,payload:_.payload,callback:_.callback,next:null},ne===null?(Y=ne=Z,T=se):ne=ne.next=Z,x|=I;if(_=_.next,_===null){if(_=u.shared.pending,_===null)break;Z=_,_=Z.next,Z.next=null,u.lastBaseUpdate=Z,u.shared.pending=null}}while(!0);ne===null&&(T=se),u.baseState=T,u.firstBaseUpdate=Y,u.lastBaseUpdate=ne,d===null&&(u.shared.lanes=0),Ya|=x,e.lanes=x,e.memoizedState=se}}function Dm(e,t){if(typeof e!="function")throw Error(i(191,e));e.call(t)}function Lm(e,t){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)Dm(r[e],t)}var vl=G(null),ns=G(0);function km(e,t){e=xa,K(ns,e),K(vl,t),xa=e|t.baseLanes}function Mu(){K(ns,xa),K(vl,vl.current)}function Du(){xa=ns.current,U(vl),U(ns)}var Pa=0,Ve=null,ot=null,Ot=null,as=!1,yl=!1,kr=!1,rs=0,Oi=0,bl=null,V1=0;function Nt(){throw Error(i(321))}function Lu(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!ln(e[r],t[r]))return!1;return!0}function ku(e,t,r,o,u,d){return Pa=d,Ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,A.H=e===null||e.memoizedState===null?yp:bp,kr=!1,d=r(o,u),kr=!1,yl&&(d=Um(t,r,o,u)),zm(e),d}function zm(e){A.H=us;var t=ot!==null&&ot.next!==null;if(Pa=0,Ot=ot=Ve=null,as=!1,Oi=0,bl=null,t)throw Error(i(300));e===null||kt||(e=e.dependencies,e!==null&&Zo(e)&&(kt=!0))}function Um(e,t,r,o){Ve=e;var u=0;do{if(yl&&(bl=null),Oi=0,yl=!1,25<=u)throw Error(i(301));if(u+=1,Ot=ot=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}A.H=Q1,d=t(r,o)}while(yl);return d}function q1(){var e=A.H,t=e.useState()[0];return t=typeof t.then=="function"?Ai(t):t,e=e.useState()[0],(ot!==null?ot.memoizedState:null)!==e&&(Ve.flags|=1024),t}function zu(){var e=rs!==0;return rs=0,e}function Uu(e,t,r){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r}function Pu(e){if(as){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}as=!1}Pa=0,Ot=ot=Ve=null,yl=!1,Oi=rs=0,bl=null}function Jt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ot===null?Ve.memoizedState=Ot=e:Ot=Ot.next=e,Ot}function At(){if(ot===null){var e=Ve.alternate;e=e!==null?e.memoizedState:null}else e=ot.next;var t=Ot===null?Ve.memoizedState:Ot.next;if(t!==null)Ot=t,ot=e;else{if(e===null)throw Ve.alternate===null?Error(i(467)):Error(i(310));ot=e,e={memoizedState:ot.memoizedState,baseState:ot.baseState,baseQueue:ot.baseQueue,queue:ot.queue,next:null},Ot===null?Ve.memoizedState=Ot=e:Ot=Ot.next=e}return Ot}function Hu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ai(e){var t=Oi;return Oi+=1,bl===null&&(bl=[]),e=Am(bl,e,t),t=Ve,(Ot===null?t.memoizedState:Ot.next)===null&&(t=t.alternate,A.H=t===null||t.memoizedState===null?yp:bp),e}function ls(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ai(e);if(e.$$typeof===k)return Yt(e)}throw Error(i(438,String(e)))}function Bu(e){var t=null,r=Ve.updateQueue;if(r!==null&&(t=r.memoCache),t==null){var o=Ve.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(t={data:o.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),r===null&&(r=Hu(),Ve.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]=ae;return t.index++,r}function ma(e,t){return typeof t=="function"?t(e):t}function is(e){var t=At();return $u(t,ot,e)}function $u(e,t,r){var o=e.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=r;var u=e.baseQueue,d=o.pending;if(d!==null){if(u!==null){var x=u.next;u.next=d.next,d.next=x}t.baseQueue=u=d,o.pending=null}if(d=e.baseState,u===null)e.memoizedState=d;else{t=u.next;var _=x=null,T=null,Y=t,ne=!1;do{var se=Y.lane&-536870913;if(se!==Y.lane?(We&se)===se:(Pa&se)===se){var I=Y.revertLane;if(I===0)T!==null&&(T=T.next={lane:0,revertLane:0,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),se===pl&&(ne=!0);else if((Pa&I)===I){Y=Y.next,I===pl&&(ne=!0);continue}else se={lane:0,revertLane:Y.revertLane,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},T===null?(_=T=se,x=d):T=T.next=se,Ve.lanes|=I,Ya|=I;se=Y.action,kr&&r(d,se),d=Y.hasEagerState?Y.eagerState:r(d,se)}else I={lane:se,revertLane:Y.revertLane,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},T===null?(_=T=I,x=d):T=T.next=I,Ve.lanes|=se,Ya|=se;Y=Y.next}while(Y!==null&&Y!==t);if(T===null?x=d:T.next=_,!ln(d,e.memoizedState)&&(kt=!0,ne&&(r=gl,r!==null)))throw r;e.memoizedState=d,e.baseState=x,e.baseQueue=T,o.lastRenderedState=d}return u===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function Vu(e){var t=At(),r=t.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=e;var o=r.dispatch,u=r.pending,d=t.memoizedState;if(u!==null){r.pending=null;var x=u=u.next;do d=e(d,x.action),x=x.next;while(x!==u);ln(d,t.memoizedState)||(kt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),r.lastRenderedState=d}return[d,o]}function Pm(e,t,r){var o=Ve,u=At(),d=tt;if(d){if(r===void 0)throw Error(i(407));r=r()}else r=t();var x=!ln((ot||u).memoizedState,r);x&&(u.memoizedState=r,kt=!0),u=u.queue;var _=$m.bind(null,o,u,e);if(Ti(2048,8,_,[e]),u.getSnapshot!==t||x||Ot!==null&&Ot.memoizedState.tag&1){if(o.flags|=2048,xl(9,os(),Bm.bind(null,o,u,r,t),null),ht===null)throw Error(i(349));d||(Pa&124)!==0||Hm(o,t,r)}return r}function Hm(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Ve.updateQueue,t===null?(t=Hu(),Ve.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Bm(e,t,r,o){t.value=r,t.getSnapshot=o,Vm(t)&&qm(e)}function $m(e,t,r){return r(function(){Vm(t)&&qm(e)})}function Vm(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!ln(e,r)}catch{return!0}}function qm(e){var t=fl(e,2);t!==null&&dn(t,e,2)}function qu(e){var t=Jt();if(typeof e=="function"){var r=e;if(e=r(),kr){Mn(!0);try{r()}finally{Mn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:e},t}function Fm(e,t,r,o){return e.baseState=r,$u(e,ot,typeof o=="function"?o:ma)}function F1(e,t,r,o,u){if(cs(e))throw Error(i(485));if(e=t.action,e!==null){var d={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){d.listeners.push(x)}};A.T!==null?r(!0):d.isTransition=!1,o(d),r=t.pending,r===null?(d.next=t.pending=d,Ym(t,d)):(d.next=r.next,t.pending=r.next=d)}}function Ym(e,t){var r=t.action,o=t.payload,u=e.state;if(t.isTransition){var d=A.T,x={};A.T=x;try{var _=r(u,o),T=A.S;T!==null&&T(x,_),Gm(e,t,_)}catch(Y){Fu(e,t,Y)}finally{A.T=d}}else try{d=r(u,o),Gm(e,t,d)}catch(Y){Fu(e,t,Y)}}function Gm(e,t,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(o){Km(e,t,o)},function(o){return Fu(e,t,o)}):Km(e,t,r)}function Km(e,t,r){t.status="fulfilled",t.value=r,Xm(t),e.state=r,t=e.pending,t!==null&&(r=t.next,r===t?e.pending=null:(r=r.next,t.next=r,Ym(e,r)))}function Fu(e,t,r){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do t.status="rejected",t.reason=r,Xm(t),t=t.next;while(t!==o)}e.action=null}function Xm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Qm(e,t){return t}function Im(e,t){if(tt){var r=ht.formState;if(r!==null){e:{var o=Ve;if(tt){if(_t){t:{for(var u=_t,d=Fn;u.nodeType!==8;){if(!d){u=null;break t}if(u=kn(u.nextSibling),u===null){u=null;break t}}d=u.data,u=d==="F!"||d==="F"?u:null}if(u){_t=kn(u.nextSibling),o=u.data==="F!";break e}}Tr(o)}o=!1}o&&(t=r[0])}}return r=Jt(),r.memoizedState=r.baseState=t,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qm,lastRenderedState:t},r.queue=o,r=pp.bind(null,Ve,o),o.dispatch=r,o=qu(!1),d=Qu.bind(null,Ve,!1,o.queue),o=Jt(),u={state:t,dispatch:null,action:e,pending:null},o.queue=u,r=F1.bind(null,Ve,u,d,r),u.dispatch=r,o.memoizedState=e,[t,r,!1]}function Zm(e){var t=At();return Jm(t,ot,e)}function Jm(e,t,r){if(t=$u(e,t,Qm)[0],e=is(ma)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var o=Ai(t)}catch(x){throw x===Ei?es:x}else o=t;t=At();var u=t.queue,d=u.dispatch;return r!==t.memoizedState&&(Ve.flags|=2048,xl(9,os(),Y1.bind(null,u,r),null)),[o,d,e]}function Y1(e,t){e.action=t}function Wm(e){var t=At(),r=ot;if(r!==null)return Jm(t,r,e);At(),t=t.memoizedState,r=At();var o=r.queue.dispatch;return r.memoizedState=e,[t,o,!1]}function xl(e,t,r,o){return e={tag:e,create:r,deps:o,inst:t,next:null},t=Ve.updateQueue,t===null&&(t=Hu(),Ve.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 os(){return{destroy:void 0,resource:void 0}}function ep(){return At().memoizedState}function ss(e,t,r,o){var u=Jt();o=o===void 0?null:o,Ve.flags|=e,u.memoizedState=xl(1|t,os(),r,o)}function Ti(e,t,r,o){var u=At();o=o===void 0?null:o;var d=u.memoizedState.inst;ot!==null&&o!==null&&Lu(o,ot.memoizedState.deps)?u.memoizedState=xl(t,d,r,o):(Ve.flags|=e,u.memoizedState=xl(1|t,d,r,o))}function tp(e,t){ss(8390656,8,e,t)}function np(e,t){Ti(2048,8,e,t)}function ap(e,t){return Ti(4,2,e,t)}function rp(e,t){return Ti(4,4,e,t)}function lp(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 ip(e,t,r){r=r!=null?r.concat([e]):null,Ti(4,4,lp.bind(null,t,e),r)}function Yu(){}function op(e,t){var r=At();t=t===void 0?null:t;var o=r.memoizedState;return t!==null&&Lu(t,o[1])?o[0]:(r.memoizedState=[e,t],e)}function sp(e,t){var r=At();t=t===void 0?null:t;var o=r.memoizedState;if(t!==null&&Lu(t,o[1]))return o[0];if(o=e(),kr){Mn(!0);try{e()}finally{Mn(!1)}}return r.memoizedState=[o,t],o}function Gu(e,t,r){return r===void 0||(Pa&1073741824)!==0?e.memoizedState=t:(e.memoizedState=r,e=fg(),Ve.lanes|=e,Ya|=e,r)}function cp(e,t,r,o){return ln(r,t)?r:vl.current!==null?(e=Gu(e,r,o),ln(e,t)||(kt=!0),e):(Pa&42)===0?(kt=!0,e.memoizedState=r):(e=fg(),Ve.lanes|=e,Ya|=e,t)}function up(e,t,r,o,u){var d=X.p;X.p=d!==0&&8>d?d:8;var x=A.T,_={};A.T=_,Qu(e,!1,t,r);try{var T=u(),Y=A.S;if(Y!==null&&Y(_,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var ne=$1(T,o);Mi(e,t,ne,fn(e))}else Mi(e,t,o,fn(e))}catch(se){Mi(e,t,{then:function(){},status:"rejected",reason:se},fn())}finally{X.p=d,A.T=x}}function G1(){}function Ku(e,t,r,o){if(e.tag!==5)throw Error(i(476));var u=fp(e).queue;up(e,u,t,V,r===null?G1:function(){return dp(e),r(o)})}function fp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:V},next:null};var r={};return t.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:r},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function dp(e){var t=fp(e).next.queue;Mi(e,t,{},fn())}function Xu(){return Yt(Ii)}function hp(){return At().memoizedState}function mp(){return At().memoizedState}function K1(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var r=fn();e=za(r);var o=Ua(t,e,r);o!==null&&(dn(o,t,r),Ni(o,t,r)),t={cache:Eu()},e.payload=t;return}t=t.return}}function X1(e,t,r){var o=fn();r={lane:o,revertLane:0,action:r,hasEagerState:!1,eagerState:null,next:null},cs(e)?gp(t,r):(r=mu(e,t,r,o),r!==null&&(dn(r,e,o),vp(r,t,o)))}function pp(e,t,r){var o=fn();Mi(e,t,r,o)}function Mi(e,t,r,o){var u={lane:o,revertLane:0,action:r,hasEagerState:!1,eagerState:null,next:null};if(cs(e))gp(t,u);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var x=t.lastRenderedState,_=d(x,r);if(u.hasEagerState=!0,u.eagerState=_,ln(_,x))return Go(e,t,u,0),ht===null&&Yo(),!1}catch{}finally{}if(r=mu(e,t,u,o),r!==null)return dn(r,e,o),vp(r,t,o),!0}return!1}function Qu(e,t,r,o){if(o={lane:2,revertLane:jf(),action:o,hasEagerState:!1,eagerState:null,next:null},cs(e)){if(t)throw Error(i(479))}else t=mu(e,r,o,2),t!==null&&dn(t,e,2)}function cs(e){var t=e.alternate;return e===Ve||t!==null&&t===Ve}function gp(e,t){yl=as=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function vp(e,t,r){if((r&4194048)!==0){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,Sr(e,r)}}var us={readContext:Yt,use:ls,useCallback:Nt,useContext:Nt,useEffect:Nt,useImperativeHandle:Nt,useLayoutEffect:Nt,useInsertionEffect:Nt,useMemo:Nt,useReducer:Nt,useRef:Nt,useState:Nt,useDebugValue:Nt,useDeferredValue:Nt,useTransition:Nt,useSyncExternalStore:Nt,useId:Nt,useHostTransitionStatus:Nt,useFormState:Nt,useActionState:Nt,useOptimistic:Nt,useMemoCache:Nt,useCacheRefresh:Nt},yp={readContext:Yt,use:ls,useCallback:function(e,t){return Jt().memoizedState=[e,t===void 0?null:t],e},useContext:Yt,useEffect:tp,useImperativeHandle:function(e,t,r){r=r!=null?r.concat([e]):null,ss(4194308,4,lp.bind(null,t,e),r)},useLayoutEffect:function(e,t){return ss(4194308,4,e,t)},useInsertionEffect:function(e,t){ss(4,2,e,t)},useMemo:function(e,t){var r=Jt();t=t===void 0?null:t;var o=e();if(kr){Mn(!0);try{e()}finally{Mn(!1)}}return r.memoizedState=[o,t],o},useReducer:function(e,t,r){var o=Jt();if(r!==void 0){var u=r(t);if(kr){Mn(!0);try{r(t)}finally{Mn(!1)}}}else u=t;return o.memoizedState=o.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},o.queue=e,e=e.dispatch=X1.bind(null,Ve,e),[o.memoizedState,e]},useRef:function(e){var t=Jt();return e={current:e},t.memoizedState=e},useState:function(e){e=qu(e);var t=e.queue,r=pp.bind(null,Ve,t);return t.dispatch=r,[e.memoizedState,r]},useDebugValue:Yu,useDeferredValue:function(e,t){var r=Jt();return Gu(r,e,t)},useTransition:function(){var e=qu(!1);return e=up.bind(null,Ve,e.queue,!0,!1),Jt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,r){var o=Ve,u=Jt();if(tt){if(r===void 0)throw Error(i(407));r=r()}else{if(r=t(),ht===null)throw Error(i(349));(We&124)!==0||Hm(o,t,r)}u.memoizedState=r;var d={value:r,getSnapshot:t};return u.queue=d,tp($m.bind(null,o,d,e),[e]),o.flags|=2048,xl(9,os(),Bm.bind(null,o,d,r,t),null),r},useId:function(){var e=Jt(),t=ht.identifierPrefix;if(tt){var r=fa,o=ua;r=(o&~(1<<32-Ht(o)-1)).toString(32)+r,t="«"+t+"R"+r,r=rs++,0<r&&(t+="H"+r.toString(32)),t+="»"}else r=V1++,t="«"+t+"r"+r.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:Xu,useFormState:Im,useActionState:Im,useOptimistic:function(e){var t=Jt();t.memoizedState=t.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=r,t=Qu.bind(null,Ve,!0,r),r.dispatch=t,[e,t]},useMemoCache:Bu,useCacheRefresh:function(){return Jt().memoizedState=K1.bind(null,Ve)}},bp={readContext:Yt,use:ls,useCallback:op,useContext:Yt,useEffect:np,useImperativeHandle:ip,useInsertionEffect:ap,useLayoutEffect:rp,useMemo:sp,useReducer:is,useRef:ep,useState:function(){return is(ma)},useDebugValue:Yu,useDeferredValue:function(e,t){var r=At();return cp(r,ot.memoizedState,e,t)},useTransition:function(){var e=is(ma)[0],t=At().memoizedState;return[typeof e=="boolean"?e:Ai(e),t]},useSyncExternalStore:Pm,useId:hp,useHostTransitionStatus:Xu,useFormState:Zm,useActionState:Zm,useOptimistic:function(e,t){var r=At();return Fm(r,ot,e,t)},useMemoCache:Bu,useCacheRefresh:mp},Q1={readContext:Yt,use:ls,useCallback:op,useContext:Yt,useEffect:np,useImperativeHandle:ip,useInsertionEffect:ap,useLayoutEffect:rp,useMemo:sp,useReducer:Vu,useRef:ep,useState:function(){return Vu(ma)},useDebugValue:Yu,useDeferredValue:function(e,t){var r=At();return ot===null?Gu(r,e,t):cp(r,ot.memoizedState,e,t)},useTransition:function(){var e=Vu(ma)[0],t=At().memoizedState;return[typeof e=="boolean"?e:Ai(e),t]},useSyncExternalStore:Pm,useId:hp,useHostTransitionStatus:Xu,useFormState:Wm,useActionState:Wm,useOptimistic:function(e,t){var r=At();return ot!==null?Fm(r,ot,e,t):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:Bu,useCacheRefresh:mp},wl=null,Di=0;function fs(e){var t=Di;return Di+=1,wl===null&&(wl=[]),Am(wl,e,t)}function Li(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ds(e,t){throw t.$$typeof===b?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function xp(e){var t=e._init;return t(e._payload)}function wp(e){function t($,z){if(e){var F=$.deletions;F===null?($.deletions=[z],$.flags|=16):F.push(z)}}function r($,z){if(!e)return null;for(;z!==null;)t($,z),z=z.sibling;return null}function o($){for(var z=new Map;$!==null;)$.key!==null?z.set($.key,$):z.set($.index,$),$=$.sibling;return z}function u($,z){return $=ca($,z),$.index=0,$.sibling=null,$}function d($,z,F){return $.index=F,e?(F=$.alternate,F!==null?(F=F.index,F<z?($.flags|=67108866,z):F):($.flags|=67108866,z)):($.flags|=1048576,z)}function x($){return e&&$.alternate===null&&($.flags|=67108866),$}function _($,z,F,le){return z===null||z.tag!==6?(z=gu(F,$.mode,le),z.return=$,z):(z=u(z,F),z.return=$,z)}function T($,z,F,le){var be=F.type;return be===C?ne($,z,F.props.children,le,F.key):z!==null&&(z.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===J&&xp(be)===z.type)?(z=u(z,F.props),Li(z,F),z.return=$,z):(z=Xo(F.type,F.key,F.props,null,$.mode,le),Li(z,F),z.return=$,z)}function Y($,z,F,le){return z===null||z.tag!==4||z.stateNode.containerInfo!==F.containerInfo||z.stateNode.implementation!==F.implementation?(z=vu(F,$.mode,le),z.return=$,z):(z=u(z,F.children||[]),z.return=$,z)}function ne($,z,F,le,be){return z===null||z.tag!==7?(z=Rr(F,$.mode,le,be),z.return=$,z):(z=u(z,F),z.return=$,z)}function se($,z,F){if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return z=gu(""+z,$.mode,F),z.return=$,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case w:return F=Xo(z.type,z.key,z.props,null,$.mode,F),Li(F,z),F.return=$,F;case S:return z=vu(z,$.mode,F),z.return=$,z;case J:var le=z._init;return z=le(z._payload),se($,z,F)}if(ee(z)||fe(z))return z=Rr(z,$.mode,F,null),z.return=$,z;if(typeof z.then=="function")return se($,fs(z),F);if(z.$$typeof===k)return se($,Jo($,z),F);ds($,z)}return null}function I($,z,F,le){var be=z!==null?z.key:null;if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return be!==null?null:_($,z,""+F,le);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case w:return F.key===be?T($,z,F,le):null;case S:return F.key===be?Y($,z,F,le):null;case J:return be=F._init,F=be(F._payload),I($,z,F,le)}if(ee(F)||fe(F))return be!==null?null:ne($,z,F,le,null);if(typeof F.then=="function")return I($,z,fs(F),le);if(F.$$typeof===k)return I($,z,Jo($,F),le);ds($,F)}return null}function Z($,z,F,le,be){if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return $=$.get(F)||null,_(z,$,""+le,be);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case w:return $=$.get(le.key===null?F:le.key)||null,T(z,$,le,be);case S:return $=$.get(le.key===null?F:le.key)||null,Y(z,$,le,be);case J:var Ge=le._init;return le=Ge(le._payload),Z($,z,F,le,be)}if(ee(le)||fe(le))return $=$.get(F)||null,ne(z,$,le,be,null);if(typeof le.then=="function")return Z($,z,F,fs(le),be);if(le.$$typeof===k)return Z($,z,F,Jo(z,le),be);ds(z,le)}return null}function ze($,z,F,le){for(var be=null,Ge=null,je=z,De=z=0,Ut=null;je!==null&&De<F.length;De++){je.index>De?(Ut=je,je=null):Ut=je.sibling;var et=I($,je,F[De],le);if(et===null){je===null&&(je=Ut);break}e&&je&&et.alternate===null&&t($,je),z=d(et,z,De),Ge===null?be=et:Ge.sibling=et,Ge=et,je=Ut}if(De===F.length)return r($,je),tt&&Or($,De),be;if(je===null){for(;De<F.length;De++)je=se($,F[De],le),je!==null&&(z=d(je,z,De),Ge===null?be=je:Ge.sibling=je,Ge=je);return tt&&Or($,De),be}for(je=o(je);De<F.length;De++)Ut=Z(je,$,De,F[De],le),Ut!==null&&(e&&Ut.alternate!==null&&je.delete(Ut.key===null?De:Ut.key),z=d(Ut,z,De),Ge===null?be=Ut:Ge.sibling=Ut,Ge=Ut);return e&&je.forEach(function(er){return t($,er)}),tt&&Or($,De),be}function Me($,z,F,le){if(F==null)throw Error(i(151));for(var be=null,Ge=null,je=z,De=z=0,Ut=null,et=F.next();je!==null&&!et.done;De++,et=F.next()){je.index>De?(Ut=je,je=null):Ut=je.sibling;var er=I($,je,et.value,le);if(er===null){je===null&&(je=Ut);break}e&&je&&er.alternate===null&&t($,je),z=d(er,z,De),Ge===null?be=er:Ge.sibling=er,Ge=er,je=Ut}if(et.done)return r($,je),tt&&Or($,De),be;if(je===null){for(;!et.done;De++,et=F.next())et=se($,et.value,le),et!==null&&(z=d(et,z,De),Ge===null?be=et:Ge.sibling=et,Ge=et);return tt&&Or($,De),be}for(je=o(je);!et.done;De++,et=F.next())et=Z(je,$,De,et.value,le),et!==null&&(e&&et.alternate!==null&&je.delete(et.key===null?De:et.key),z=d(et,z,De),Ge===null?be=et:Ge.sibling=et,Ge=et);return e&&je.forEach(function(Iw){return t($,Iw)}),tt&&Or($,De),be}function ct($,z,F,le){if(typeof F=="object"&&F!==null&&F.type===C&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case w:e:{for(var be=F.key;z!==null;){if(z.key===be){if(be=F.type,be===C){if(z.tag===7){r($,z.sibling),le=u(z,F.props.children),le.return=$,$=le;break e}}else if(z.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===J&&xp(be)===z.type){r($,z.sibling),le=u(z,F.props),Li(le,F),le.return=$,$=le;break e}r($,z);break}else t($,z);z=z.sibling}F.type===C?(le=Rr(F.props.children,$.mode,le,F.key),le.return=$,$=le):(le=Xo(F.type,F.key,F.props,null,$.mode,le),Li(le,F),le.return=$,$=le)}return x($);case S:e:{for(be=F.key;z!==null;){if(z.key===be)if(z.tag===4&&z.stateNode.containerInfo===F.containerInfo&&z.stateNode.implementation===F.implementation){r($,z.sibling),le=u(z,F.children||[]),le.return=$,$=le;break e}else{r($,z);break}else t($,z);z=z.sibling}le=vu(F,$.mode,le),le.return=$,$=le}return x($);case J:return be=F._init,F=be(F._payload),ct($,z,F,le)}if(ee(F))return ze($,z,F,le);if(fe(F)){if(be=fe(F),typeof be!="function")throw Error(i(150));return F=be.call(F),Me($,z,F,le)}if(typeof F.then=="function")return ct($,z,fs(F),le);if(F.$$typeof===k)return ct($,z,Jo($,F),le);ds($,F)}return typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint"?(F=""+F,z!==null&&z.tag===6?(r($,z.sibling),le=u(z,F),le.return=$,$=le):(r($,z),le=gu(F,$.mode,le),le.return=$,$=le),x($)):r($,z)}return function($,z,F,le){try{Di=0;var be=ct($,z,F,le);return wl=null,be}catch(je){if(je===Ei||je===es)throw je;var Ge=on(29,je,null,$.mode);return Ge.lanes=le,Ge.return=$,Ge}finally{}}}var Sl=wp(!0),Sp=wp(!1),Nn=G(null),Yn=null;function Ha(e){var t=e.alternate;K(Dt,Dt.current&1),K(Nn,e),Yn===null&&(t===null||vl.current!==null||t.memoizedState!==null)&&(Yn=e)}function _p(e){if(e.tag===22){if(K(Dt,Dt.current),K(Nn,e),Yn===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Yn=e)}}else Ba()}function Ba(){K(Dt,Dt.current),K(Nn,Nn.current)}function pa(e){U(Nn),Yn===e&&(Yn=null),U(Dt)}var Dt=G(0);function hs(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==="$?"||Bf(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 Iu(e,t,r,o){t=e.memoizedState,r=r(o,t),r=r==null?t:v({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Zu={enqueueSetState:function(e,t,r){e=e._reactInternals;var o=fn(),u=za(o);u.payload=t,r!=null&&(u.callback=r),t=Ua(e,u,o),t!==null&&(dn(t,e,o),Ni(t,e,o))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var o=fn(),u=za(o);u.tag=1,u.payload=t,r!=null&&(u.callback=r),t=Ua(e,u,o),t!==null&&(dn(t,e,o),Ni(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=fn(),o=za(r);o.tag=2,t!=null&&(o.callback=t),t=Ua(e,o,r),t!==null&&(dn(t,e,r),Ni(t,e,r))}};function Ep(e,t,r,o,u,d,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,d,x):t.prototype&&t.prototype.isPureReactComponent?!gi(r,o)||!gi(u,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&&Zu.enqueueReplaceState(t,t.state,null)}function zr(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=v({},r));for(var u in e)r[u]===void 0&&(r[u]=e[u])}return r}var ms=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 Np(e){ms(e)}function Rp(e){console.error(e)}function jp(e){ms(e)}function ps(e,t){try{var r=e.onUncaughtError;r(t.value,{componentStack:t.stack})}catch(o){setTimeout(function(){throw o})}}function Op(e,t,r){try{var o=e.onCaughtError;o(r.value,{componentStack:r.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function Ju(e,t,r){return r=za(r),r.tag=3,r.payload={element:null},r.callback=function(){ps(e,t)},r}function Ap(e){return e=za(e),e.tag=3,e}function Tp(e,t,r,o){var u=r.type.getDerivedStateFromError;if(typeof u=="function"){var d=o.value;e.payload=function(){return u(d)},e.callback=function(){Op(t,r,o)}}var x=r.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){Op(t,r,o),typeof u!="function"&&(Ga===null?Ga=new Set([this]):Ga.add(this));var _=o.stack;this.componentDidCatch(o.value,{componentStack:_!==null?_:""})})}function I1(e,t,r,o,u){if(r.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(t=r.alternate,t!==null&&wi(t,r,u,!0),r=Nn.current,r!==null){switch(r.tag){case 13:return Yn===null?_f():r.alternate===null&&Et===0&&(Et=3),r.flags&=-257,r.flags|=65536,r.lanes=u,o===Ru?r.flags|=16384:(t=r.updateQueue,t===null?r.updateQueue=new Set([o]):t.add(o),Cf(e,o,u)),!1;case 22:return r.flags|=65536,o===Ru?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)),Cf(e,o,u)),!1}throw Error(i(435,r.tag))}return Cf(e,o,u),_f(),!1}if(tt)return t=Nn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,o!==xu&&(e=Error(i(422),{cause:o}),xi(Sn(e,r)))):(o!==xu&&(t=Error(i(423),{cause:o}),xi(Sn(t,r))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,o=Sn(o,r),u=Ju(e.stateNode,o,u),Au(e,u),Et!==4&&(Et=2)),!1;var d=Error(i(520),{cause:o});if(d=Sn(d,r),$i===null?$i=[d]:$i.push(d),Et!==4&&(Et=2),t===null)return!0;o=Sn(o,r),r=t;do{switch(r.tag){case 3:return r.flags|=65536,e=u&-u,r.lanes|=e,e=Ju(r.stateNode,o,e),Au(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"&&(Ga===null||!Ga.has(d))))return r.flags|=65536,u&=-u,r.lanes|=u,u=Ap(u),Tp(u,e,r,o),Au(r,u),!1}r=r.return}while(r!==null);return!1}var Mp=Error(i(461)),kt=!1;function Bt(e,t,r,o){t.child=e===null?Sp(t,null,r,o):Sl(t,e.child,r,o)}function Dp(e,t,r,o,u){r=r.render;var d=t.ref;if("ref"in o){var x={};for(var _ in o)_!=="ref"&&(x[_]=o[_])}else x=o;return Dr(t),o=ku(e,t,r,x,d,u),_=zu(),e!==null&&!kt?(Uu(e,t,u),ga(e,t,u)):(tt&&_&&yu(t),t.flags|=1,Bt(e,t,o,u),t.child)}function Lp(e,t,r,o,u){if(e===null){var d=r.type;return typeof d=="function"&&!pu(d)&&d.defaultProps===void 0&&r.compare===null?(t.tag=15,t.type=d,kp(e,t,d,o,u)):(e=Xo(r.type,null,o,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!of(e,u)){var x=d.memoizedProps;if(r=r.compare,r=r!==null?r:gi,r(x,o)&&e.ref===t.ref)return ga(e,t,u)}return t.flags|=1,e=ca(d,o),e.ref=t.ref,e.return=t,t.child=e}function kp(e,t,r,o,u){if(e!==null){var d=e.memoizedProps;if(gi(d,o)&&e.ref===t.ref)if(kt=!1,t.pendingProps=o=d,of(e,u))(e.flags&131072)!==0&&(kt=!0);else return t.lanes=e.lanes,ga(e,t,u)}return Wu(e,t,r,o,u)}function zp(e,t,r){var o=t.pendingProps,u=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(u=t.child=e.child,d=0;u!==null;)d=d|u.lanes|u.childLanes,u=u.sibling;t.childLanes=d&~o}else t.childLanes=0,t.child=null;return Up(e,t,o,r)}if((r&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Wo(t,d!==null?d.cachePool:null),d!==null?km(t,d):Mu(),_p(t);else return t.lanes=t.childLanes=536870912,Up(e,t,d!==null?d.baseLanes|r:r,r)}else d!==null?(Wo(t,d.cachePool),km(t,d),Ba(),t.memoizedState=null):(e!==null&&Wo(t,null),Mu(),Ba());return Bt(e,t,u,r),t.child}function Up(e,t,r,o){var u=Nu();return u=u===null?null:{parent:Mt._currentValue,pool:u},t.memoizedState={baseLanes:r,cachePool:u},e!==null&&Wo(t,null),Mu(),_p(t),e!==null&&wi(e,t,o,!0),null}function gs(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 Wu(e,t,r,o,u){return Dr(t),r=ku(e,t,r,o,void 0,u),o=zu(),e!==null&&!kt?(Uu(e,t,u),ga(e,t,u)):(tt&&o&&yu(t),t.flags|=1,Bt(e,t,r,u),t.child)}function Pp(e,t,r,o,u,d){return Dr(t),t.updateQueue=null,r=Um(t,o,r,u),zm(e),o=zu(),e!==null&&!kt?(Uu(e,t,d),ga(e,t,d)):(tt&&o&&yu(t),t.flags|=1,Bt(e,t,r,d),t.child)}function Hp(e,t,r,o,u){if(Dr(t),t.stateNode===null){var d=dl,x=r.contextType;typeof x=="object"&&x!==null&&(d=Yt(x)),d=new r(o,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Zu,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=o,d.state=t.memoizedState,d.refs={},ju(t),x=r.contextType,d.context=typeof x=="object"&&x!==null?Yt(x):dl,d.state=t.memoizedState,x=r.getDerivedStateFromProps,typeof x=="function"&&(Iu(t,r,x,o),d.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(x=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),x!==d.state&&Zu.enqueueReplaceState(d,d.state,null),ji(t,o,d,u),Ri(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),o=!0}else if(e===null){d=t.stateNode;var _=t.memoizedProps,T=zr(r,_);d.props=T;var Y=d.context,ne=r.contextType;x=dl,typeof ne=="object"&&ne!==null&&(x=Yt(ne));var se=r.getDerivedStateFromProps;ne=typeof se=="function"||typeof d.getSnapshotBeforeUpdate=="function",_=t.pendingProps!==_,ne||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(_||Y!==x)&&Cp(t,d,o,x),ka=!1;var I=t.memoizedState;d.state=I,ji(t,o,d,u),Ri(),Y=t.memoizedState,_||I!==Y||ka?(typeof se=="function"&&(Iu(t,r,se,o),Y=t.memoizedState),(T=ka||Ep(t,r,T,o,I,Y,x))?(ne||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=Y),d.props=o,d.state=Y,d.context=x,o=T):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{d=t.stateNode,Ou(e,t),x=t.memoizedProps,ne=zr(r,x),d.props=ne,se=t.pendingProps,I=d.context,Y=r.contextType,T=dl,typeof Y=="object"&&Y!==null&&(T=Yt(Y)),_=r.getDerivedStateFromProps,(Y=typeof _=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(x!==se||I!==T)&&Cp(t,d,o,T),ka=!1,I=t.memoizedState,d.state=I,ji(t,o,d,u),Ri();var Z=t.memoizedState;x!==se||I!==Z||ka||e!==null&&e.dependencies!==null&&Zo(e.dependencies)?(typeof _=="function"&&(Iu(t,r,_,o),Z=t.memoizedState),(ne=ka||Ep(t,r,ne,o,I,Z,T)||e!==null&&e.dependencies!==null&&Zo(e.dependencies))?(Y||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(o,Z,T),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(o,Z,T)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||x===e.memoizedProps&&I===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&I===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=Z),d.props=o,d.state=Z,d.context=T,o=ne):(typeof d.componentDidUpdate!="function"||x===e.memoizedProps&&I===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&I===e.memoizedState||(t.flags|=1024),o=!1)}return d=o,gs(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,u),t.child=Sl(t,null,r,u)):Bt(e,t,r,u),t.memoizedState=d.state,e=t.child):e=ga(e,t,u),e}function Bp(e,t,r,o){return bi(),t.flags|=256,Bt(e,t,r,o),t.child}var ef={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function tf(e){return{baseLanes:e,cachePool:Rm()}}function nf(e,t,r){return e=e!==null?e.childLanes&~r:0,t&&(e|=Rn),e}function $p(e,t,r){var o=t.pendingProps,u=!1,d=(t.flags&128)!==0,x;if((x=d)||(x=e!==null&&e.memoizedState===null?!1:(Dt.current&2)!==0),x&&(u=!0,t.flags&=-129),x=(t.flags&32)!==0,t.flags&=-33,e===null){if(tt){if(u?Ha(t):Ba(),tt){var _=_t,T;if(T=_){e:{for(T=_,_=Fn;T.nodeType!==8;){if(!_){_=null;break e}if(T=kn(T.nextSibling),T===null){_=null;break e}}_=T}_!==null?(t.memoizedState={dehydrated:_,treeContext:jr!==null?{id:ua,overflow:fa}:null,retryLane:536870912,hydrationErrors:null},T=on(18,null,null,0),T.stateNode=_,T.return=t,t.child=T,Qt=t,_t=null,T=!0):T=!1}T||Tr(t)}if(_=t.memoizedState,_!==null&&(_=_.dehydrated,_!==null))return Bf(_)?t.lanes=32:t.lanes=536870912,null;pa(t)}return _=o.children,o=o.fallback,u?(Ba(),u=t.mode,_=vs({mode:"hidden",children:_},u),o=Rr(o,u,r,null),_.return=t,o.return=t,_.sibling=o,t.child=_,u=t.child,u.memoizedState=tf(r),u.childLanes=nf(e,x,r),t.memoizedState=ef,o):(Ha(t),af(t,_))}if(T=e.memoizedState,T!==null&&(_=T.dehydrated,_!==null)){if(d)t.flags&256?(Ha(t),t.flags&=-257,t=rf(e,t,r)):t.memoizedState!==null?(Ba(),t.child=e.child,t.flags|=128,t=null):(Ba(),u=o.fallback,_=t.mode,o=vs({mode:"visible",children:o.children},_),u=Rr(u,_,r,null),u.flags|=2,o.return=t,u.return=t,o.sibling=u,t.child=o,Sl(t,e.child,null,r),o=t.child,o.memoizedState=tf(r),o.childLanes=nf(e,x,r),t.memoizedState=ef,t=u);else if(Ha(t),Bf(_)){if(x=_.nextSibling&&_.nextSibling.dataset,x)var Y=x.dgst;x=Y,o=Error(i(419)),o.stack="",o.digest=x,xi({value:o,source:null,stack:null}),t=rf(e,t,r)}else if(kt||wi(e,t,r,!1),x=(r&e.childLanes)!==0,kt||x){if(x=ht,x!==null&&(o=r&-r,o=(o&42)!==0?1:oi(o),o=(o&(x.suspendedLanes|r))!==0?0:o,o!==0&&o!==T.retryLane))throw T.retryLane=o,fl(e,o),dn(x,e,o),Mp;_.data==="$?"||_f(),t=rf(e,t,r)}else _.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=T.treeContext,_t=kn(_.nextSibling),Qt=t,tt=!0,Ar=null,Fn=!1,e!==null&&(En[Cn++]=ua,En[Cn++]=fa,En[Cn++]=jr,ua=e.id,fa=e.overflow,jr=t),t=af(t,o.children),t.flags|=4096);return t}return u?(Ba(),u=o.fallback,_=t.mode,T=e.child,Y=T.sibling,o=ca(T,{mode:"hidden",children:o.children}),o.subtreeFlags=T.subtreeFlags&65011712,Y!==null?u=ca(Y,u):(u=Rr(u,_,r,null),u.flags|=2),u.return=t,o.return=t,o.sibling=u,t.child=o,o=u,u=t.child,_=e.child.memoizedState,_===null?_=tf(r):(T=_.cachePool,T!==null?(Y=Mt._currentValue,T=T.parent!==Y?{parent:Y,pool:Y}:T):T=Rm(),_={baseLanes:_.baseLanes|r,cachePool:T}),u.memoizedState=_,u.childLanes=nf(e,x,r),t.memoizedState=ef,o):(Ha(t),r=e.child,e=r.sibling,r=ca(r,{mode:"visible",children:o.children}),r.return=t,r.sibling=null,e!==null&&(x=t.deletions,x===null?(t.deletions=[e],t.flags|=16):x.push(e)),t.child=r,t.memoizedState=null,r)}function af(e,t){return t=vs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function vs(e,t){return e=on(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function rf(e,t,r){return Sl(t,e.child,null,r),e=af(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Vp(e,t,r){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),Su(e.return,t,r)}function lf(e,t,r,o,u){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:r,tailMode:u}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=o,d.tail=r,d.tailMode=u)}function qp(e,t,r){var o=t.pendingProps,u=o.revealOrder,d=o.tail;if(Bt(e,t,o.children,r),o=Dt.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&&Vp(e,r,t);else if(e.tag===19)Vp(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(K(Dt,o),u){case"forwards":for(r=t.child,u=null;r!==null;)e=r.alternate,e!==null&&hs(e)===null&&(u=r),r=r.sibling;r=u,r===null?(u=t.child,t.child=null):(u=r.sibling,r.sibling=null),lf(t,!1,u,r,d);break;case"backwards":for(r=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&hs(e)===null){t.child=u;break}e=u.sibling,u.sibling=r,r=u,u=e}lf(t,!0,r,null,d);break;case"together":lf(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ga(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Ya|=t.lanes,(r&t.childLanes)===0)if(e!==null){if(wi(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=ca(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=ca(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function of(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Zo(e)))}function Z1(e,t,r){switch(t.tag){case 3:Le(t,t.stateNode.containerInfo),La(t,Mt,e.memoizedState.cache),bi();break;case 27:case 5:Je(t);break;case 4:Le(t,t.stateNode.containerInfo);break;case 10:La(t,t.type,t.memoizedProps.value);break;case 13:var o=t.memoizedState;if(o!==null)return o.dehydrated!==null?(Ha(t),t.flags|=128,null):(r&t.child.childLanes)!==0?$p(e,t,r):(Ha(t),e=ga(e,t,r),e!==null?e.sibling:null);Ha(t);break;case 19:var u=(e.flags&128)!==0;if(o=(r&t.childLanes)!==0,o||(wi(e,t,r,!1),o=(r&t.childLanes)!==0),u){if(o)return qp(e,t,r);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),K(Dt,Dt.current),o)break;return null;case 22:case 23:return t.lanes=0,zp(e,t,r);case 24:La(t,Mt,e.memoizedState.cache)}return ga(e,t,r)}function Fp(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps)kt=!0;else{if(!of(e,r)&&(t.flags&128)===0)return kt=!1,Z1(e,t,r);kt=(e.flags&131072)!==0}else kt=!1,tt&&(t.flags&1048576)!==0&&xm(t,Io,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var o=t.elementType,u=o._init;if(o=u(o._payload),t.type=o,typeof o=="function")pu(o)?(e=zr(o,e),t.tag=1,t=Hp(null,t,o,e,r)):(t.tag=0,t=Wu(null,t,o,e,r));else{if(o!=null){if(u=o.$$typeof,u===H){t.tag=11,t=Dp(null,t,o,e,r);break e}else if(u===B){t.tag=14,t=Lp(null,t,o,e,r);break e}}throw t=Q(o)||o,Error(i(306,t,""))}}return t;case 0:return Wu(e,t,t.type,t.pendingProps,r);case 1:return o=t.type,u=zr(o,t.pendingProps),Hp(e,t,o,u,r);case 3:e:{if(Le(t,t.stateNode.containerInfo),e===null)throw Error(i(387));o=t.pendingProps;var d=t.memoizedState;u=d.element,Ou(e,t),ji(t,o,null,r);var x=t.memoizedState;if(o=x.cache,La(t,Mt,o),o!==d.cache&&_u(t,[Mt],r,!0),Ri(),o=x.element,d.isDehydrated)if(d={element:o,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=Bp(e,t,o,r);break e}else if(o!==u){u=Sn(Error(i(424)),t),xi(u),t=Bp(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(_t=kn(e.firstChild),Qt=t,tt=!0,Ar=null,Fn=!0,r=Sp(t,null,o,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling}else{if(bi(),o===u){t=ga(e,t,r);break e}Bt(e,t,o,r)}t=t.child}return t;case 26:return gs(e,t),e===null?(r=Xg(t.type,null,t.pendingProps,null))?t.memoizedState=r:tt||(r=t.type,e=t.pendingProps,o=Ts(me.current).createElement(r),o[ce]=t,o[pe]=e,Vt(o,r,e),He(o),t.stateNode=o):t.memoizedState=Xg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Je(t),e===null&&tt&&(o=t.stateNode=Yg(t.type,t.pendingProps,me.current),Qt=t,Fn=!0,u=_t,Qa(t.type)?($f=u,_t=kn(o.firstChild)):_t=u),Bt(e,t,t.pendingProps.children,r),gs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&tt&&((u=o=_t)&&(o=Cw(o,t.type,t.pendingProps,Fn),o!==null?(t.stateNode=o,Qt=t,_t=kn(o.firstChild),Fn=!1,u=!0):u=!1),u||Tr(t)),Je(t),u=t.type,d=t.pendingProps,x=e!==null?e.memoizedProps:null,o=d.children,Uf(u,d)?o=null:x!==null&&Uf(u,x)&&(t.flags|=32),t.memoizedState!==null&&(u=ku(e,t,q1,null,null,r),Ii._currentValue=u),gs(e,t),Bt(e,t,o,r),t.child;case 6:return e===null&&tt&&((e=r=_t)&&(r=Nw(r,t.pendingProps,Fn),r!==null?(t.stateNode=r,Qt=t,_t=null,e=!0):e=!1),e||Tr(t)),null;case 13:return $p(e,t,r);case 4:return Le(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=Sl(t,null,o,r):Bt(e,t,o,r),t.child;case 11:return Dp(e,t,t.type,t.pendingProps,r);case 7:return Bt(e,t,t.pendingProps,r),t.child;case 8:return Bt(e,t,t.pendingProps.children,r),t.child;case 12:return Bt(e,t,t.pendingProps.children,r),t.child;case 10:return o=t.pendingProps,La(t,t.type,o.value),Bt(e,t,o.children,r),t.child;case 9:return u=t.type._context,o=t.pendingProps.children,Dr(t),u=Yt(u),o=o(u),t.flags|=1,Bt(e,t,o,r),t.child;case 14:return Lp(e,t,t.type,t.pendingProps,r);case 15:return kp(e,t,t.type,t.pendingProps,r);case 19:return qp(e,t,r);case 31:return o=t.pendingProps,r=t.mode,o={mode:o.mode,children:o.children},e===null?(r=vs(o,r),r.ref=t.ref,t.child=r,r.return=t,t=r):(r=ca(e.child,o),r.ref=t.ref,t.child=r,r.return=t,t=r),t;case 22:return zp(e,t,r);case 24:return Dr(t),o=Yt(Mt),e===null?(u=Nu(),u===null&&(u=ht,d=Eu(),u.pooledCache=d,d.refCount++,d!==null&&(u.pooledCacheLanes|=r),u=d),t.memoizedState={parent:o,cache:u},ju(t),La(t,Mt,u)):((e.lanes&r)!==0&&(Ou(e,t),ji(t,null,null,r),Ri()),u=e.memoizedState,d=t.memoizedState,u.parent!==o?(u={parent:o,cache:o},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),La(t,Mt,o)):(o=d.cache,La(t,Mt,o),o!==u.cache&&_u(t,[Mt],r,!0))),Bt(e,t,t.pendingProps.children,r),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function va(e){e.flags|=4}function Yp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Wg(t)){if(t=Nn.current,t!==null&&((We&4194048)===We?Yn!==null:(We&62914560)!==We&&(We&536870912)===0||t!==Yn))throw Ci=Ru,jm;e.flags|=8192}}function ys(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Mo():536870912,e.lanes|=t,Nl|=t)}function ki(e,t){if(!tt)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 bt(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,o=0;if(t)for(var u=e.child;u!==null;)r|=u.lanes|u.childLanes,o|=u.subtreeFlags&65011712,o|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)r|=u.lanes|u.childLanes,o|=u.subtreeFlags,o|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=o,e.childLanes=r,t}function J1(e,t,r){var o=t.pendingProps;switch(bu(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bt(t),null;case 1:return bt(t),null;case 3:return r=t.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),ha(Mt),Fe(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(yi(t)?va(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,_m())),bt(t),null;case 26:return r=t.memoizedState,e===null?(va(t),r!==null?(bt(t),Yp(t,r)):(bt(t),t.flags&=-16777217)):r?r!==e.memoizedState?(va(t),bt(t),Yp(t,r)):(bt(t),t.flags&=-16777217):(e.memoizedProps!==o&&va(t),bt(t),t.flags&=-16777217),null;case 27:Tt(t),r=me.current;var u=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==o&&va(t);else{if(!o){if(t.stateNode===null)throw Error(i(166));return bt(t),null}e=P.current,yi(t)?wm(t):(e=Yg(u,o,r),t.stateNode=e,va(t))}return bt(t),null;case 5:if(Tt(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&va(t);else{if(!o){if(t.stateNode===null)throw Error(i(166));return bt(t),null}if(e=P.current,yi(t))wm(t);else{switch(u=Ts(me.current),e){case 1:e=u.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:e=u.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":e=u.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":e=u.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":e=u.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof o.is=="string"?u.createElement("select",{is:o.is}):u.createElement("select"),o.multiple?e.multiple=!0:o.size&&(e.size=o.size);break;default:e=typeof o.is=="string"?u.createElement(r,{is:o.is}):u.createElement(r)}}e[ce]=t,e[pe]=o;e:for(u=t.child;u!==null;){if(u.tag===5||u.tag===6)e.appendChild(u.stateNode);else if(u.tag!==4&&u.tag!==27&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===t)break e;for(;u.sibling===null;){if(u.return===null||u.return===t)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}t.stateNode=e;e:switch(Vt(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&&va(t)}}return bt(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==o&&va(t);else{if(typeof o!="string"&&t.stateNode===null)throw Error(i(166));if(e=me.current,yi(t)){if(e=t.stateNode,r=t.memoizedProps,o=null,u=Qt,u!==null)switch(u.tag){case 27:case 5:o=u.memoizedProps}e[ce]=t,e=!!(e.nodeValue===r||o!==null&&o.suppressHydrationWarning===!0||Pg(e.nodeValue,r)),e||Tr(t)}else e=Ts(e).createTextNode(o),e[ce]=t,t.stateNode=e}return bt(t),null;case 13:if(o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=yi(t),o!==null&&o.dehydrated!==null){if(e===null){if(!u)throw Error(i(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(i(317));u[ce]=t}else bi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;bt(t),u=!1}else u=_m(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(pa(t),t):(pa(t),null)}if(pa(t),(t.flags&128)!==0)return t.lanes=r,t;if(r=o!==null,e=e!==null&&e.memoizedState!==null,r){o=t.child,u=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(u=o.alternate.memoizedState.cachePool.pool);var d=null;o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),d!==u&&(o.flags|=2048)}return r!==e&&r&&(t.child.flags|=8192),ys(t,t.updateQueue),bt(t),null;case 4:return Fe(),e===null&&Mf(t.stateNode.containerInfo),bt(t),null;case 10:return ha(t.type),bt(t),null;case 19:if(U(Dt),u=t.memoizedState,u===null)return bt(t),null;if(o=(t.flags&128)!==0,d=u.rendering,d===null)if(o)ki(u,!1);else{if(Et!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=hs(e),d!==null){for(t.flags|=128,ki(u,!1),e=d.updateQueue,t.updateQueue=e,ys(t,e),t.subtreeFlags=0,e=r,r=t.child;r!==null;)bm(r,e),r=r.sibling;return K(Dt,Dt.current&1|2),t.child}e=e.sibling}u.tail!==null&&he()>ws&&(t.flags|=128,o=!0,ki(u,!1),t.lanes=4194304)}else{if(!o)if(e=hs(d),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,ys(t,e),ki(u,!0),u.tail===null&&u.tailMode==="hidden"&&!d.alternate&&!tt)return bt(t),null}else 2*he()-u.renderingStartTime>ws&&r!==536870912&&(t.flags|=128,o=!0,ki(u,!1),t.lanes=4194304);u.isBackwards?(d.sibling=t.child,t.child=d):(e=u.last,e!==null?e.sibling=d:t.child=d,u.last=d)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=he(),t.sibling=null,e=Dt.current,K(Dt,o?e&1|2:e&1),t):(bt(t),null);case 22:case 23:return pa(t),Du(),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&&(bt(t),t.subtreeFlags&6&&(t.flags|=8192)):bt(t),r=t.updateQueue,r!==null&&ys(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&&U(Lr),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ha(Mt),bt(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function W1(e,t){switch(bu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ha(Mt),Fe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Tt(t),null;case 13:if(pa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return U(Dt),null;case 4:return Fe(),null;case 10:return ha(t.type),null;case 22:case 23:return pa(t),Du(),e!==null&&U(Lr),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ha(Mt),null;case 25:return null;default:return null}}function Gp(e,t){switch(bu(t),t.tag){case 3:ha(Mt),Fe();break;case 26:case 27:case 5:Tt(t);break;case 4:Fe();break;case 13:pa(t);break;case 19:U(Dt);break;case 10:ha(t.type);break;case 22:case 23:pa(t),Du(),e!==null&&U(Lr);break;case 24:ha(Mt)}}function zi(e,t){try{var r=t.updateQueue,o=r!==null?r.lastEffect:null;if(o!==null){var u=o.next;r=u;do{if((r.tag&e)===e){o=void 0;var d=r.create,x=r.inst;o=d(),x.destroy=o}r=r.next}while(r!==u)}}catch(_){ut(t,t.return,_)}}function $a(e,t,r){try{var o=t.updateQueue,u=o!==null?o.lastEffect:null;if(u!==null){var d=u.next;o=d;do{if((o.tag&e)===e){var x=o.inst,_=x.destroy;if(_!==void 0){x.destroy=void 0,u=t;var T=r,Y=_;try{Y()}catch(ne){ut(u,T,ne)}}}o=o.next}while(o!==d)}}catch(ne){ut(t,t.return,ne)}}function Kp(e){var t=e.updateQueue;if(t!==null){var r=e.stateNode;try{Lm(t,r)}catch(o){ut(e,e.return,o)}}}function Xp(e,t,r){r.props=zr(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(o){ut(e,t,o)}}function Ui(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(u){ut(e,t,u)}}function Gn(e,t){var r=e.ref,o=e.refCleanup;if(r!==null)if(typeof o=="function")try{o()}catch(u){ut(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(u){ut(e,t,u)}else r.current=null}function Qp(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(u){ut(e,e.return,u)}}function sf(e,t,r){try{var o=e.stateNode;xw(o,e.type,r,t),o[pe]=t}catch(u){ut(e,e.return,u)}}function Ip(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Qa(e.type)||e.tag===4}function cf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ip(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&&Qa(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 uf(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=As));else if(o!==4&&(o===27&&Qa(e.type)&&(r=e.stateNode,t=null),e=e.child,e!==null))for(uf(e,t,r),e=e.sibling;e!==null;)uf(e,t,r),e=e.sibling}function bs(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&&Qa(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(bs(e,t,r),e=e.sibling;e!==null;)bs(e,t,r),e=e.sibling}function Zp(e){var t=e.stateNode,r=e.memoizedProps;try{for(var o=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);Vt(t,o,r),t[ce]=e,t[pe]=r}catch(d){ut(e,e.return,d)}}var ya=!1,Rt=!1,ff=!1,Jp=typeof WeakSet=="function"?WeakSet:Set,zt=null;function ew(e,t){if(e=e.containerInfo,kf=Us,e=cm(e),su(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 u=o.anchorOffset,d=o.focusNode;o=o.focusOffset;try{r.nodeType,d.nodeType}catch{r=null;break e}var x=0,_=-1,T=-1,Y=0,ne=0,se=e,I=null;t:for(;;){for(var Z;se!==r||u!==0&&se.nodeType!==3||(_=x+u),se!==d||o!==0&&se.nodeType!==3||(T=x+o),se.nodeType===3&&(x+=se.nodeValue.length),(Z=se.firstChild)!==null;)I=se,se=Z;for(;;){if(se===e)break t;if(I===r&&++Y===u&&(_=x),I===d&&++ne===o&&(T=x),(Z=se.nextSibling)!==null)break;se=I,I=se.parentNode}se=Z}r=_===-1||T===-1?null:{start:_,end:T}}else r=null}r=r||{start:0,end:0}}else r=null;for(zf={focusedElem:e,selectionRange:r},Us=!1,zt=t;zt!==null;)if(t=zt,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,zt=e;else for(;zt!==null;){switch(t=zt,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,u=d.memoizedProps,d=d.memoizedState,o=r.stateNode;try{var ze=zr(r.type,u,r.elementType===r.type);e=o.getSnapshotBeforeUpdate(ze,d),o.__reactInternalSnapshotBeforeUpdate=e}catch(Me){ut(r,r.return,Me)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,r=e.nodeType,r===9)Hf(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Hf(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,zt=e;break}zt=t.return}}function Wp(e,t,r){var o=r.flags;switch(r.tag){case 0:case 11:case 15:Va(e,r),o&4&&zi(5,r);break;case 1:if(Va(e,r),o&4)if(e=r.stateNode,t===null)try{e.componentDidMount()}catch(x){ut(r,r.return,x)}else{var u=zr(r.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){ut(r,r.return,x)}}o&64&&Kp(r),o&512&&Ui(r,r.return);break;case 3:if(Va(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{Lm(e,t)}catch(x){ut(r,r.return,x)}}break;case 27:t===null&&o&4&&Zp(r);case 26:case 5:Va(e,r),t===null&&o&4&&Qp(r),o&512&&Ui(r,r.return);break;case 12:Va(e,r);break;case 13:Va(e,r),o&4&&ng(e,r),o&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=cw.bind(null,r),Rw(e,r))));break;case 22:if(o=r.memoizedState!==null||ya,!o){t=t!==null&&t.memoizedState!==null||Rt,u=ya;var d=Rt;ya=o,(Rt=t)&&!d?qa(e,r,(r.subtreeFlags&8772)!==0):Va(e,r),ya=u,Rt=d}break;case 30:break;default:Va(e,r)}}function eg(e){var t=e.alternate;t!==null&&(e.alternate=null,eg(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 gt=null,Wt=!1;function ba(e,t,r){for(r=r.child;r!==null;)tg(e,t,r),r=r.sibling}function tg(e,t,r){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(It,r)}catch{}switch(r.tag){case 26:Rt||Gn(r,t),ba(e,t,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:Rt||Gn(r,t);var o=gt,u=Wt;Qa(r.type)&&(gt=r.stateNode,Wt=!1),ba(e,t,r),Gi(r.stateNode),gt=o,Wt=u;break;case 5:Rt||Gn(r,t);case 6:if(o=gt,u=Wt,gt=null,ba(e,t,r),gt=o,Wt=u,gt!==null)if(Wt)try{(gt.nodeType===9?gt.body:gt.nodeName==="HTML"?gt.ownerDocument.body:gt).removeChild(r.stateNode)}catch(d){ut(r,t,d)}else try{gt.removeChild(r.stateNode)}catch(d){ut(r,t,d)}break;case 18:gt!==null&&(Wt?(e=gt,qg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),eo(e)):qg(gt,r.stateNode));break;case 4:o=gt,u=Wt,gt=r.stateNode.containerInfo,Wt=!0,ba(e,t,r),gt=o,Wt=u;break;case 0:case 11:case 14:case 15:Rt||$a(2,r,t),Rt||$a(4,r,t),ba(e,t,r);break;case 1:Rt||(Gn(r,t),o=r.stateNode,typeof o.componentWillUnmount=="function"&&Xp(r,t,o)),ba(e,t,r);break;case 21:ba(e,t,r);break;case 22:Rt=(o=Rt)||r.memoizedState!==null,ba(e,t,r),Rt=o;break;default:ba(e,t,r)}}function ng(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{eo(e)}catch(r){ut(t,t.return,r)}}function tw(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Jp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Jp),t;default:throw Error(i(435,e.tag))}}function df(e,t){var r=tw(e);t.forEach(function(o){var u=uw.bind(null,e,o);r.has(o)||(r.add(o),o.then(u,u))})}function sn(e,t){var r=t.deletions;if(r!==null)for(var o=0;o<r.length;o++){var u=r[o],d=e,x=t,_=x;e:for(;_!==null;){switch(_.tag){case 27:if(Qa(_.type)){gt=_.stateNode,Wt=!1;break e}break;case 5:gt=_.stateNode,Wt=!1;break e;case 3:case 4:gt=_.stateNode.containerInfo,Wt=!0;break e}_=_.return}if(gt===null)throw Error(i(160));tg(d,x,u),gt=null,Wt=!1,d=u.alternate,d!==null&&(d.return=null),u.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)ag(t,e),t=t.sibling}var Ln=null;function ag(e,t){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:sn(t,e),cn(e),o&4&&($a(3,e,e.return),zi(3,e),$a(5,e,e.return));break;case 1:sn(t,e),cn(e),o&512&&(Rt||r===null||Gn(r,r.return)),o&64&&ya&&(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 u=Ln;if(sn(t,e),cn(e),o&512&&(Rt||r===null||Gn(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,u=u.ownerDocument||u;t:switch(o){case"title":d=u.getElementsByTagName("title")[0],(!d||d[Ee]||d[ce]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=u.createElement(o),u.head.insertBefore(d,u.querySelector("head > title"))),Vt(d,o,r),d[ce]=e,He(d),o=d;break e;case"link":var x=Zg("link","href",u).get(o+(r.href||""));if(x){for(var _=0;_<x.length;_++)if(d=x[_],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)){x.splice(_,1);break t}}d=u.createElement(o),Vt(d,o,r),u.head.appendChild(d);break;case"meta":if(x=Zg("meta","content",u).get(o+(r.content||""))){for(_=0;_<x.length;_++)if(d=x[_],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)){x.splice(_,1);break t}}d=u.createElement(o),Vt(d,o,r),u.head.appendChild(d);break;default:throw Error(i(468,o))}d[ce]=e,He(d),o=d}e.stateNode=o}else Jg(u,e.type,e.stateNode);else e.stateNode=Ig(u,o,e.memoizedProps);else d!==o?(d===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):d.count--,o===null?Jg(u,e.type,e.stateNode):Ig(u,o,e.memoizedProps)):o===null&&e.stateNode!==null&&sf(e,e.memoizedProps,r.memoizedProps)}break;case 27:sn(t,e),cn(e),o&512&&(Rt||r===null||Gn(r,r.return)),r!==null&&o&4&&sf(e,e.memoizedProps,r.memoizedProps);break;case 5:if(sn(t,e),cn(e),o&512&&(Rt||r===null||Gn(r,r.return)),e.flags&32){u=e.stateNode;try{rl(u,"")}catch(Z){ut(e,e.return,Z)}}o&4&&e.stateNode!=null&&(u=e.memoizedProps,sf(e,u,r!==null?r.memoizedProps:u)),o&1024&&(ff=!0);break;case 6:if(sn(t,e),cn(e),o&4){if(e.stateNode===null)throw Error(i(162));o=e.memoizedProps,r=e.stateNode;try{r.nodeValue=o}catch(Z){ut(e,e.return,Z)}}break;case 3:if(Ls=null,u=Ln,Ln=Ms(t.containerInfo),sn(t,e),Ln=u,cn(e),o&4&&r!==null&&r.memoizedState.isDehydrated)try{eo(t.containerInfo)}catch(Z){ut(e,e.return,Z)}ff&&(ff=!1,rg(e));break;case 4:o=Ln,Ln=Ms(e.stateNode.containerInfo),sn(t,e),cn(e),Ln=o;break;case 12:sn(t,e),cn(e);break;case 13:sn(t,e),cn(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(yf=he()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,df(e,o)));break;case 22:u=e.memoizedState!==null;var T=r!==null&&r.memoizedState!==null,Y=ya,ne=Rt;if(ya=Y||u,Rt=ne||T,sn(t,e),Rt=ne,ya=Y,cn(e),o&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(r===null||T||ya||Rt||Ur(e)),r=null,t=e;;){if(t.tag===5||t.tag===26){if(r===null){T=r=t;try{if(d=T.stateNode,u)x=d.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{_=T.stateNode;var se=T.memoizedProps.style,I=se!=null&&se.hasOwnProperty("display")?se.display:null;_.style.display=I==null||typeof I=="boolean"?"":(""+I).trim()}}catch(Z){ut(T,T.return,Z)}}}else if(t.tag===6){if(r===null){T=t;try{T.stateNode.nodeValue=u?"":T.memoizedProps}catch(Z){ut(T,T.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,df(e,r))));break;case 19:sn(t,e),cn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,df(e,o)));break;case 30:break;case 21:break;default:sn(t,e),cn(e)}}function cn(e){var t=e.flags;if(t&2){try{for(var r,o=e.return;o!==null;){if(Ip(o)){r=o;break}o=o.return}if(r==null)throw Error(i(160));switch(r.tag){case 27:var u=r.stateNode,d=cf(e);bs(e,d,u);break;case 5:var x=r.stateNode;r.flags&32&&(rl(x,""),r.flags&=-33);var _=cf(e);bs(e,_,x);break;case 3:case 4:var T=r.stateNode.containerInfo,Y=cf(e);uf(e,Y,T);break;default:throw Error(i(161))}}catch(ne){ut(e,e.return,ne)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function rg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;rg(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Va(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Wp(e,t.alternate,t),t=t.sibling}function Ur(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:$a(4,t,t.return),Ur(t);break;case 1:Gn(t,t.return);var r=t.stateNode;typeof r.componentWillUnmount=="function"&&Xp(t,t.return,r),Ur(t);break;case 27:Gi(t.stateNode);case 26:case 5:Gn(t,t.return),Ur(t);break;case 22:t.memoizedState===null&&Ur(t);break;case 30:Ur(t);break;default:Ur(t)}e=e.sibling}}function qa(e,t,r){for(r=r&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var o=t.alternate,u=e,d=t,x=d.flags;switch(d.tag){case 0:case 11:case 15:qa(u,d,r),zi(4,d);break;case 1:if(qa(u,d,r),o=d,u=o.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(Y){ut(o,o.return,Y)}if(o=d,u=o.updateQueue,u!==null){var _=o.stateNode;try{var T=u.shared.hiddenCallbacks;if(T!==null)for(u.shared.hiddenCallbacks=null,u=0;u<T.length;u++)Dm(T[u],_)}catch(Y){ut(o,o.return,Y)}}r&&x&64&&Kp(d),Ui(d,d.return);break;case 27:Zp(d);case 26:case 5:qa(u,d,r),r&&o===null&&x&4&&Qp(d),Ui(d,d.return);break;case 12:qa(u,d,r);break;case 13:qa(u,d,r),r&&x&4&&ng(u,d);break;case 22:d.memoizedState===null&&qa(u,d,r),Ui(d,d.return);break;case 30:break;default:qa(u,d,r)}t=t.sibling}}function hf(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&&Si(r))}function mf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Si(e))}function Kn(e,t,r,o){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)lg(e,t,r,o),t=t.sibling}function lg(e,t,r,o){var u=t.flags;switch(t.tag){case 0:case 11:case 15:Kn(e,t,r,o),u&2048&&zi(9,t);break;case 1:Kn(e,t,r,o);break;case 3:Kn(e,t,r,o),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Si(e)));break;case 12:if(u&2048){Kn(e,t,r,o),e=t.stateNode;try{var d=t.memoizedProps,x=d.id,_=d.onPostCommit;typeof _=="function"&&_(x,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(T){ut(t,t.return,T)}}else Kn(e,t,r,o);break;case 13:Kn(e,t,r,o);break;case 23:break;case 22:d=t.stateNode,x=t.alternate,t.memoizedState!==null?d._visibility&2?Kn(e,t,r,o):Pi(e,t):d._visibility&2?Kn(e,t,r,o):(d._visibility|=2,_l(e,t,r,o,(t.subtreeFlags&10256)!==0)),u&2048&&hf(x,t);break;case 24:Kn(e,t,r,o),u&2048&&mf(t.alternate,t);break;default:Kn(e,t,r,o)}}function _l(e,t,r,o,u){for(u=u&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var d=e,x=t,_=r,T=o,Y=x.flags;switch(x.tag){case 0:case 11:case 15:_l(d,x,_,T,u),zi(8,x);break;case 23:break;case 22:var ne=x.stateNode;x.memoizedState!==null?ne._visibility&2?_l(d,x,_,T,u):Pi(d,x):(ne._visibility|=2,_l(d,x,_,T,u)),u&&Y&2048&&hf(x.alternate,x);break;case 24:_l(d,x,_,T,u),u&&Y&2048&&mf(x.alternate,x);break;default:_l(d,x,_,T,u)}t=t.sibling}}function Pi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var r=e,o=t,u=o.flags;switch(o.tag){case 22:Pi(r,o),u&2048&&hf(o.alternate,o);break;case 24:Pi(r,o),u&2048&&mf(o.alternate,o);break;default:Pi(r,o)}t=t.sibling}}var Hi=8192;function El(e){if(e.subtreeFlags&Hi)for(e=e.child;e!==null;)ig(e),e=e.sibling}function ig(e){switch(e.tag){case 26:El(e),e.flags&Hi&&e.memoizedState!==null&&Bw(Ln,e.memoizedState,e.memoizedProps);break;case 5:El(e);break;case 3:case 4:var t=Ln;Ln=Ms(e.stateNode.containerInfo),El(e),Ln=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=Hi,Hi=16777216,El(e),Hi=t):El(e));break;default:El(e)}}function og(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 Bi(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];zt=o,cg(o,e)}og(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)sg(e),e=e.sibling}function sg(e){switch(e.tag){case 0:case 11:case 15:Bi(e),e.flags&2048&&$a(9,e,e.return);break;case 3:Bi(e);break;case 12:Bi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,xs(e)):Bi(e);break;default:Bi(e)}}function xs(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];zt=o,cg(o,e)}og(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:$a(8,t,t.return),xs(t);break;case 22:r=t.stateNode,r._visibility&2&&(r._visibility&=-3,xs(t));break;default:xs(t)}e=e.sibling}}function cg(e,t){for(;zt!==null;){var r=zt;switch(r.tag){case 0:case 11:case 15:$a(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:Si(r.memoizedState.cache)}if(o=r.child,o!==null)o.return=r,zt=o;else e:for(r=e;zt!==null;){o=zt;var u=o.sibling,d=o.return;if(eg(o),o===r){zt=null;break e}if(u!==null){u.return=d,zt=u;break e}zt=d}}}var nw={getCacheForType:function(e){var t=Yt(Mt),r=t.data.get(e);return r===void 0&&(r=e(),t.data.set(e,r)),r}},aw=typeof WeakMap=="function"?WeakMap:Map,rt=0,ht=null,Qe=null,We=0,lt=0,un=null,Fa=!1,Cl=!1,pf=!1,xa=0,Et=0,Ya=0,Pr=0,gf=0,Rn=0,Nl=0,$i=null,en=null,vf=!1,yf=0,ws=1/0,Ss=null,Ga=null,$t=0,Ka=null,Rl=null,jl=0,bf=0,xf=null,ug=null,Vi=0,wf=null;function fn(){if((rt&2)!==0&&We!==0)return We&-We;if(A.T!==null){var e=pl;return e!==0?e:jf()}return D()}function fg(){Rn===0&&(Rn=(We&536870912)===0||tt?el():536870912);var e=Nn.current;return e!==null&&(e.flags|=32),Rn}function dn(e,t,r){(e===ht&&(lt===2||lt===9)||e.cancelPendingCommit!==null)&&(Ol(e,0),Xa(e,We,Rn,!1)),xr(e,r),((rt&2)===0||e!==ht)&&(e===ht&&((rt&2)===0&&(Pr|=r),Et===4&&Xa(e,We,Rn,!1)),Xn(e))}function dg(e,t,r){if((rt&6)!==0)throw Error(i(327));var o=!r&&(t&124)===0&&(t&e.expiredLanes)===0||Vn(e,t),u=o?iw(e,t):Ef(e,t,!0),d=o;do{if(u===0){Cl&&!o&&Xa(e,t,0,!1);break}else{if(r=e.current.alternate,d&&!rw(r)){u=Ef(e,t,!1),d=!1;continue}if(u===2){if(d=t,e.errorRecoveryDisabledLanes&d)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){t=x;e:{var _=e;u=$i;var T=_.current.memoizedState.isDehydrated;if(T&&(Ol(_,x).flags|=256),x=Ef(_,x,!1),x!==2){if(pf&&!T){_.errorRecoveryDisabledLanes|=d,Pr|=d,u=4;break e}d=en,en=u,d!==null&&(en===null?en=d:en.push.apply(en,d))}u=x}if(d=!1,u!==2)continue}}if(u===1){Ol(e,0),Xa(e,t,0,!0);break}e:{switch(o=e,d=u,d){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Xa(o,t,Rn,!Fa);break e;case 2:en=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(u=yf+300-he(),10<u)){if(Xa(o,t,Rn,!Fa),br(o,0,!0)!==0)break e;o.timeoutHandle=$g(hg.bind(null,o,r,en,Ss,vf,t,Rn,Pr,Nl,Fa,d,2,-0,0),u);break e}hg(o,r,en,Ss,vf,t,Rn,Pr,Nl,Fa,d,0,-0,0)}}break}while(!0);Xn(e)}function hg(e,t,r,o,u,d,x,_,T,Y,ne,se,I,Z){if(e.timeoutHandle=-1,se=t.subtreeFlags,(se&8192||(se&16785408)===16785408)&&(Qi={stylesheets:null,count:0,unsuspend:Hw},ig(t),se=$w(),se!==null)){e.cancelPendingCommit=se(xg.bind(null,e,t,d,r,o,u,x,_,T,ne,1,I,Z)),Xa(e,d,x,!Y);return}xg(e,t,d,r,o,u,x,_,T)}function rw(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 u=r[o],d=u.getSnapshot;u=u.value;try{if(!ln(d(),u))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 Xa(e,t,r,o){t&=~gf,t&=~Pr,e.suspendedLanes|=t,e.pingedLanes&=~t,o&&(e.warmLanes|=t),o=e.expirationTimes;for(var u=t;0<u;){var d=31-Ht(u),x=1<<d;o[d]=-1,u&=~x}r!==0&&wr(e,r,t)}function _s(){return(rt&6)===0?(qi(0),!1):!0}function Sf(){if(Qe!==null){if(lt===0)var e=Qe.return;else e=Qe,da=Mr=null,Pu(e),wl=null,Di=0,e=Qe;for(;e!==null;)Gp(e.alternate,e),e=e.return;Qe=null}}function Ol(e,t){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,Sw(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),Sf(),ht=e,Qe=r=ca(e.current,null),We=t,lt=0,un=null,Fa=!1,Cl=Vn(e,t),pf=!1,Nl=Rn=gf=Pr=Ya=Et=0,en=$i=null,vf=!1,(t&8)!==0&&(t|=t&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=t;0<o;){var u=31-Ht(o),d=1<<u;t|=e[u],o&=~d}return xa=t,Yo(),r}function mg(e,t){Ve=null,A.H=us,t===Ei||t===es?(t=Tm(),lt=3):t===jm?(t=Tm(),lt=4):lt=t===Mp?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,un=t,Qe===null&&(Et=1,ps(e,Sn(t,e.current)))}function pg(){var e=A.H;return A.H=us,e===null?us:e}function gg(){var e=A.A;return A.A=nw,e}function _f(){Et=4,Fa||(We&4194048)!==We&&Nn.current!==null||(Cl=!0),(Ya&134217727)===0&&(Pr&134217727)===0||ht===null||Xa(ht,We,Rn,!1)}function Ef(e,t,r){var o=rt;rt|=2;var u=pg(),d=gg();(ht!==e||We!==t)&&(Ss=null,Ol(e,t)),t=!1;var x=Et;e:do try{if(lt!==0&&Qe!==null){var _=Qe,T=un;switch(lt){case 8:Sf(),x=6;break e;case 3:case 2:case 9:case 6:Nn.current===null&&(t=!0);var Y=lt;if(lt=0,un=null,Al(e,_,T,Y),r&&Cl){x=0;break e}break;default:Y=lt,lt=0,un=null,Al(e,_,T,Y)}}lw(),x=Et;break}catch(ne){mg(e,ne)}while(!0);return t&&e.shellSuspendCounter++,da=Mr=null,rt=o,A.H=u,A.A=d,Qe===null&&(ht=null,We=0,Yo()),x}function lw(){for(;Qe!==null;)vg(Qe)}function iw(e,t){var r=rt;rt|=2;var o=pg(),u=gg();ht!==e||We!==t?(Ss=null,ws=he()+500,Ol(e,t)):Cl=Vn(e,t);e:do try{if(lt!==0&&Qe!==null){t=Qe;var d=un;t:switch(lt){case 1:lt=0,un=null,Al(e,t,d,1);break;case 2:case 9:if(Om(d)){lt=0,un=null,yg(t);break}t=function(){lt!==2&&lt!==9||ht!==e||(lt=7),Xn(e)},d.then(t,t);break e;case 3:lt=7;break e;case 4:lt=5;break e;case 7:Om(d)?(lt=0,un=null,yg(t)):(lt=0,un=null,Al(e,t,d,7));break;case 5:var x=null;switch(Qe.tag){case 26:x=Qe.memoizedState;case 5:case 27:var _=Qe;if(!x||Wg(x)){lt=0,un=null;var T=_.sibling;if(T!==null)Qe=T;else{var Y=_.return;Y!==null?(Qe=Y,Es(Y)):Qe=null}break t}}lt=0,un=null,Al(e,t,d,5);break;case 6:lt=0,un=null,Al(e,t,d,6);break;case 8:Sf(),Et=6;break e;default:throw Error(i(462))}}ow();break}catch(ne){mg(e,ne)}while(!0);return da=Mr=null,A.H=o,A.A=u,rt=r,Qe!==null?0:(ht=null,We=0,Yo(),Et)}function ow(){for(;Qe!==null&&!ue();)vg(Qe)}function vg(e){var t=Fp(e.alternate,e,xa);e.memoizedProps=e.pendingProps,t===null?Es(e):Qe=t}function yg(e){var t=e,r=t.alternate;switch(t.tag){case 15:case 0:t=Pp(r,t,t.pendingProps,t.type,void 0,We);break;case 11:t=Pp(r,t,t.pendingProps,t.type.render,t.ref,We);break;case 5:Pu(t);default:Gp(r,t),t=Qe=bm(t,xa),t=Fp(r,t,xa)}e.memoizedProps=e.pendingProps,t===null?Es(e):Qe=t}function Al(e,t,r,o){da=Mr=null,Pu(t),wl=null,Di=0;var u=t.return;try{if(I1(e,u,t,r,We)){Et=1,ps(e,Sn(r,e.current)),Qe=null;return}}catch(d){if(u!==null)throw Qe=u,d;Et=1,ps(e,Sn(r,e.current)),Qe=null;return}t.flags&32768?(tt||o===1?e=!0:Cl||(We&536870912)!==0?e=!1:(Fa=e=!0,(o===2||o===9||o===3||o===6)&&(o=Nn.current,o!==null&&o.tag===13&&(o.flags|=16384))),bg(t,e)):Es(t)}function Es(e){var t=e;do{if((t.flags&32768)!==0){bg(t,Fa);return}e=t.return;var r=J1(t.alternate,t,xa);if(r!==null){Qe=r;return}if(t=t.sibling,t!==null){Qe=t;return}Qe=t=e}while(t!==null);Et===0&&(Et=5)}function bg(e,t){do{var r=W1(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);Et=6,Qe=null}function xg(e,t,r,o,u,d,x,_,T){e.cancelPendingCommit=null;do Cs();while($t!==0);if((rt&6)!==0)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(d=t.lanes|t.childLanes,d|=hu,Do(e,r,d,x,_,T),e===ht&&(Qe=ht=null,We=0),Rl=t,Ka=e,jl=r,bf=d,xf=u,ug=o,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,fw(nt,function(){return Cg(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||o){o=A.T,A.T=null,u=X.p,X.p=2,x=rt,rt|=4;try{ew(e,t,r)}finally{rt=x,X.p=u,A.T=o}}$t=1,wg(),Sg(),_g()}}function wg(){if($t===1){$t=0;var e=Ka,t=Rl,r=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||r){r=A.T,A.T=null;var o=X.p;X.p=2;var u=rt;rt|=4;try{ag(t,e);var d=zf,x=cm(e.containerInfo),_=d.focusedElem,T=d.selectionRange;if(x!==_&&_&&_.ownerDocument&&sm(_.ownerDocument.documentElement,_)){if(T!==null&&su(_)){var Y=T.start,ne=T.end;if(ne===void 0&&(ne=Y),"selectionStart"in _)_.selectionStart=Y,_.selectionEnd=Math.min(ne,_.value.length);else{var se=_.ownerDocument||document,I=se&&se.defaultView||window;if(I.getSelection){var Z=I.getSelection(),ze=_.textContent.length,Me=Math.min(T.start,ze),ct=T.end===void 0?Me:Math.min(T.end,ze);!Z.extend&&Me>ct&&(x=ct,ct=Me,Me=x);var $=om(_,Me),z=om(_,ct);if($&&z&&(Z.rangeCount!==1||Z.anchorNode!==$.node||Z.anchorOffset!==$.offset||Z.focusNode!==z.node||Z.focusOffset!==z.offset)){var F=se.createRange();F.setStart($.node,$.offset),Z.removeAllRanges(),Me>ct?(Z.addRange(F),Z.extend(z.node,z.offset)):(F.setEnd(z.node,z.offset),Z.addRange(F))}}}}for(se=[],Z=_;Z=Z.parentNode;)Z.nodeType===1&&se.push({element:Z,left:Z.scrollLeft,top:Z.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<se.length;_++){var le=se[_];le.element.scrollLeft=le.left,le.element.scrollTop=le.top}}Us=!!kf,zf=kf=null}finally{rt=u,X.p=o,A.T=r}}e.current=t,$t=2}}function Sg(){if($t===2){$t=0;var e=Ka,t=Rl,r=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||r){r=A.T,A.T=null;var o=X.p;X.p=2;var u=rt;rt|=4;try{Wp(e,t.alternate,t)}finally{rt=u,X.p=o,A.T=r}}$t=3}}function _g(){if($t===4||$t===3){$t=0,ge();var e=Ka,t=Rl,r=jl,o=ug;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?$t=5:($t=0,Rl=Ka=null,Eg(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(Ga=null),si(r),t=t.stateNode,vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(It,t,void 0,(t.current.flags&128)===128)}catch{}if(o!==null){t=A.T,u=X.p,X.p=2,A.T=null;try{for(var d=e.onRecoverableError,x=0;x<o.length;x++){var _=o[x];d(_.value,{componentStack:_.stack})}}finally{A.T=t,X.p=u}}(jl&3)!==0&&Cs(),Xn(e),u=e.pendingLanes,(r&4194090)!==0&&(u&42)!==0?e===wf?Vi++:(Vi=0,wf=e):Vi=0,qi(0)}}function Eg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Si(t)))}function Cs(e){return wg(),Sg(),_g(),Cg()}function Cg(){if($t!==5)return!1;var e=Ka,t=bf;bf=0;var r=si(jl),o=A.T,u=X.p;try{X.p=32>r?32:r,A.T=null,r=xf,xf=null;var d=Ka,x=jl;if($t=0,Rl=Ka=null,jl=0,(rt&6)!==0)throw Error(i(331));var _=rt;if(rt|=4,sg(d.current),lg(d,d.current,x,r),rt=_,qi(0,!1),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(It,d)}catch{}return!0}finally{X.p=u,A.T=o,Eg(e,t)}}function Ng(e,t,r){t=Sn(r,t),t=Ju(e.stateNode,t,2),e=Ua(e,t,2),e!==null&&(xr(e,2),Xn(e))}function ut(e,t,r){if(e.tag===3)Ng(e,e,r);else for(;t!==null;){if(t.tag===3){Ng(t,e,r);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Ga===null||!Ga.has(o))){e=Sn(r,e),r=Ap(2),o=Ua(t,r,2),o!==null&&(Tp(r,o,t,e),xr(o,2),Xn(o));break}}t=t.return}}function Cf(e,t,r){var o=e.pingCache;if(o===null){o=e.pingCache=new aw;var u=new Set;o.set(t,u)}else u=o.get(t),u===void 0&&(u=new Set,o.set(t,u));u.has(r)||(pf=!0,u.add(r),e=sw.bind(null,e,t,r),t.then(e,e))}function sw(e,t,r){var o=e.pingCache;o!==null&&o.delete(t),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,ht===e&&(We&r)===r&&(Et===4||Et===3&&(We&62914560)===We&&300>he()-yf?(rt&2)===0&&Ol(e,0):gf|=r,Nl===We&&(Nl=0)),Xn(e)}function Rg(e,t){t===0&&(t=Mo()),e=fl(e,t),e!==null&&(xr(e,t),Xn(e))}function cw(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Rg(e,r)}function uw(e,t){var r=0;switch(e.tag){case 13:var o=e.stateNode,u=e.memoizedState;u!==null&&(r=u.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),Rg(e,r)}function fw(e,t){return an(e,t)}var Ns=null,Tl=null,Nf=!1,Rs=!1,Rf=!1,Hr=0;function Xn(e){e!==Tl&&e.next===null&&(Tl===null?Ns=Tl=e:Tl=Tl.next=e),Rs=!0,Nf||(Nf=!0,hw())}function qi(e,t){if(!Rf&&Rs){Rf=!0;do for(var r=!1,o=Ns;o!==null;){if(e!==0){var u=o.pendingLanes;if(u===0)var d=0;else{var x=o.suspendedLanes,_=o.pingedLanes;d=(1<<31-Ht(42|e)+1)-1,d&=u&~(x&~_),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(r=!0,Tg(o,d))}else d=We,d=br(o,o===ht?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(d&3)===0||Vn(o,d)||(r=!0,Tg(o,d));o=o.next}while(r);Rf=!1}}function dw(){jg()}function jg(){Rs=Nf=!1;var e=0;Hr!==0&&(ww()&&(e=Hr),Hr=0);for(var t=he(),r=null,o=Ns;o!==null;){var u=o.next,d=Og(o,t);d===0?(o.next=null,r===null?Ns=u:r.next=u,u===null&&(Tl=r)):(r=o,(e!==0||(d&3)!==0)&&(Rs=!0)),o=u}qi(e)}function Og(e,t){for(var r=e.suspendedLanes,o=e.pingedLanes,u=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var x=31-Ht(d),_=1<<x,T=u[x];T===-1?((_&r)===0||(_&o)!==0)&&(u[x]=To(_,t)):T<=t&&(e.expiredLanes|=_),d&=~_}if(t=ht,r=We,r=br(e,e===t?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,r===0||e===t&&(lt===2||lt===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&ie(o),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||Vn(e,r)){if(t=r&-r,t===e.callbackPriority)return t;switch(o!==null&&ie(o),si(r)){case 2:case 8:r=Pe;break;case 32:r=nt;break;case 268435456:r=Bn;break;default:r=nt}return o=Ag.bind(null,e),r=an(r,o),e.callbackPriority=t,e.callbackNode=r,t}return o!==null&&o!==null&&ie(o),e.callbackPriority=2,e.callbackNode=null,2}function Ag(e,t){if($t!==0&&$t!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(Cs()&&e.callbackNode!==r)return null;var o=We;return o=br(e,e===ht?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(dg(e,o,t),Og(e,he()),e.callbackNode!=null&&e.callbackNode===r?Ag.bind(null,e):null)}function Tg(e,t){if(Cs())return null;dg(e,t,!0)}function hw(){_w(function(){(rt&6)!==0?an(ke,dw):jg()})}function jf(){return Hr===0&&(Hr=el()),Hr}function Mg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Po(""+e)}function Dg(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 mw(e,t,r,o,u){if(t==="submit"&&r&&r.stateNode===u){var d=Mg((u[pe]||null).action),x=o.submitter;x&&(t=(t=x[pe]||null)?Mg(t.formAction):x.getAttribute("formAction"),t!==null&&(d=t,x=null));var _=new Vo("action","action",null,o,u);e.push({event:_,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Hr!==0){var T=x?Dg(u,x):new FormData(u);Ku(r,{pending:!0,data:T,method:u.method,action:d},null,T)}}else typeof d=="function"&&(_.preventDefault(),T=x?Dg(u,x):new FormData(u),Ku(r,{pending:!0,data:T,method:u.method,action:d},d,T))},currentTarget:u}]})}}for(var Of=0;Of<du.length;Of++){var Af=du[Of],pw=Af.toLowerCase(),gw=Af[0].toUpperCase()+Af.slice(1);Dn(pw,"on"+gw)}Dn(dm,"onAnimationEnd"),Dn(hm,"onAnimationIteration"),Dn(mm,"onAnimationStart"),Dn("dblclick","onDoubleClick"),Dn("focusin","onFocus"),Dn("focusout","onBlur"),Dn(D1,"onTransitionRun"),Dn(L1,"onTransitionStart"),Dn(k1,"onTransitionCancel"),Dn(pm,"onTransitionEnd"),Xt("onMouseEnter",["mouseout","mouseover"]),Xt("onMouseLeave",["mouseout","mouseover"]),Xt("onPointerEnter",["pointerout","pointerover"]),Xt("onPointerLeave",["pointerout","pointerover"]),rn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),rn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),rn("onBeforeInput",["compositionend","keypress","textInput","paste"]),rn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),rn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),rn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fi="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(" "),vw=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Fi));function Lg(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var o=e[r],u=o.event;o=o.listeners;e:{var d=void 0;if(t)for(var x=o.length-1;0<=x;x--){var _=o[x],T=_.instance,Y=_.currentTarget;if(_=_.listener,T!==d&&u.isPropagationStopped())break e;d=_,u.currentTarget=Y;try{d(u)}catch(ne){ms(ne)}u.currentTarget=null,d=T}else for(x=0;x<o.length;x++){if(_=o[x],T=_.instance,Y=_.currentTarget,_=_.listener,T!==d&&u.isPropagationStopped())break e;d=_,u.currentTarget=Y;try{d(u)}catch(ne){ms(ne)}u.currentTarget=null,d=T}}}}function Ie(e,t){var r=t[Ne];r===void 0&&(r=t[Ne]=new Set);var o=e+"__bubble";r.has(o)||(kg(t,e,2,!1),r.add(o))}function Tf(e,t,r){var o=0;t&&(o|=4),kg(r,e,o,t)}var js="_reactListening"+Math.random().toString(36).slice(2);function Mf(e){if(!e[js]){e[js]=!0,it.forEach(function(r){r!=="selectionchange"&&(vw.has(r)||Tf(r,!1,e),Tf(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[js]||(t[js]=!0,Tf("selectionchange",!1,t))}}function kg(e,t,r,o){switch(lv(t)){case 2:var u=Fw;break;case 8:u=Yw;break;default:u=Gf}r=u.bind(null,t,r,e),u=void 0,!Wc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),o?u!==void 0?e.addEventListener(t,r,{capture:!0,passive:u}):e.addEventListener(t,r,!0):u!==void 0?e.addEventListener(t,r,{passive:u}):e.addEventListener(t,r,!1)}function Df(e,t,r,o,u){var d=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var x=o.tag;if(x===3||x===4){var _=o.stateNode.containerInfo;if(_===u)break;if(x===4)for(x=o.return;x!==null;){var T=x.tag;if((T===3||T===4)&&x.stateNode.containerInfo===u)return;x=x.return}for(;_!==null;){if(x=$e(_),x===null)return;if(T=x.tag,T===5||T===6||T===26||T===27){o=d=x;continue e}_=_.parentNode}}o=o.return}Vh(function(){var Y=d,ne=Zc(r),se=[];e:{var I=gm.get(e);if(I!==void 0){var Z=Vo,ze=e;switch(e){case"keypress":if(Bo(r)===0)break e;case"keydown":case"keyup":Z=f1;break;case"focusin":ze="focus",Z=au;break;case"focusout":ze="blur",Z=au;break;case"beforeblur":case"afterblur":Z=au;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=Yh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=Wx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=m1;break;case dm:case hm:case mm:Z=n1;break;case pm:Z=g1;break;case"scroll":case"scrollend":Z=Zx;break;case"wheel":Z=y1;break;case"copy":case"cut":case"paste":Z=r1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=Kh;break;case"toggle":case"beforetoggle":Z=x1}var Me=(t&4)!==0,ct=!Me&&(e==="scroll"||e==="scrollend"),$=Me?I!==null?I+"Capture":null:I;Me=[];for(var z=Y,F;z!==null;){var le=z;if(F=le.stateNode,le=le.tag,le!==5&&le!==26&&le!==27||F===null||$===null||(le=ci(z,$),le!=null&&Me.push(Yi(z,le,F))),ct)break;z=z.return}0<Me.length&&(I=new Z(I,ze,null,r,ne),se.push({event:I,listeners:Me}))}}if((t&7)===0){e:{if(I=e==="mouseover"||e==="pointerover",Z=e==="mouseout"||e==="pointerout",I&&r!==Ic&&(ze=r.relatedTarget||r.fromElement)&&($e(ze)||ze[Se]))break e;if((Z||I)&&(I=ne.window===ne?ne:(I=ne.ownerDocument)?I.defaultView||I.parentWindow:window,Z?(ze=r.relatedTarget||r.toElement,Z=Y,ze=ze?$e(ze):null,ze!==null&&(ct=c(ze),Me=ze.tag,ze!==ct||Me!==5&&Me!==27&&Me!==6)&&(ze=null)):(Z=null,ze=Y),Z!==ze)){if(Me=Yh,le="onMouseLeave",$="onMouseEnter",z="mouse",(e==="pointerout"||e==="pointerover")&&(Me=Kh,le="onPointerLeave",$="onPointerEnter",z="pointer"),ct=Z==null?I:wt(Z),F=ze==null?I:wt(ze),I=new Me(le,z+"leave",Z,r,ne),I.target=ct,I.relatedTarget=F,le=null,$e(ne)===Y&&(Me=new Me($,z+"enter",ze,r,ne),Me.target=F,Me.relatedTarget=ct,le=Me),ct=le,Z&&ze)t:{for(Me=Z,$=ze,z=0,F=Me;F;F=Ml(F))z++;for(F=0,le=$;le;le=Ml(le))F++;for(;0<z-F;)Me=Ml(Me),z--;for(;0<F-z;)$=Ml($),F--;for(;z--;){if(Me===$||$!==null&&Me===$.alternate)break t;Me=Ml(Me),$=Ml($)}Me=null}else Me=null;Z!==null&&zg(se,I,Z,Me,!1),ze!==null&&ct!==null&&zg(se,ct,ze,Me,!0)}}e:{if(I=Y?wt(Y):window,Z=I.nodeName&&I.nodeName.toLowerCase(),Z==="select"||Z==="input"&&I.type==="file")var be=tm;else if(Wh(I))if(nm)be=A1;else{be=j1;var Ge=R1}else Z=I.nodeName,!Z||Z.toLowerCase()!=="input"||I.type!=="checkbox"&&I.type!=="radio"?Y&&Qc(Y.elementType)&&(be=tm):be=O1;if(be&&(be=be(e,Y))){em(se,be,r,ne);break e}Ge&&Ge(e,I,Y),e==="focusout"&&Y&&I.type==="number"&&Y.memoizedProps.value!=null&&Xc(I,"number",I.value)}switch(Ge=Y?wt(Y):window,e){case"focusin":(Wh(Ge)||Ge.contentEditable==="true")&&(sl=Ge,cu=Y,vi=null);break;case"focusout":vi=cu=sl=null;break;case"mousedown":uu=!0;break;case"contextmenu":case"mouseup":case"dragend":uu=!1,um(se,r,ne);break;case"selectionchange":if(M1)break;case"keydown":case"keyup":um(se,r,ne)}var je;if(lu)e:{switch(e){case"compositionstart":var De="onCompositionStart";break e;case"compositionend":De="onCompositionEnd";break e;case"compositionupdate":De="onCompositionUpdate";break e}De=void 0}else ol?Zh(e,r)&&(De="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(De="onCompositionStart");De&&(Xh&&r.locale!=="ko"&&(ol||De!=="onCompositionStart"?De==="onCompositionEnd"&&ol&&(je=qh()):(Da=ne,eu="value"in Da?Da.value:Da.textContent,ol=!0)),Ge=Os(Y,De),0<Ge.length&&(De=new Gh(De,e,null,r,ne),se.push({event:De,listeners:Ge}),je?De.data=je:(je=Jh(r),je!==null&&(De.data=je)))),(je=S1?_1(e,r):E1(e,r))&&(De=Os(Y,"onBeforeInput"),0<De.length&&(Ge=new Gh("onBeforeInput","beforeinput",null,r,ne),se.push({event:Ge,listeners:De}),Ge.data=je)),mw(se,e,Y,r,ne)}Lg(se,t)})}function Yi(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Os(e,t){for(var r=t+"Capture",o=[];e!==null;){var u=e,d=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||d===null||(u=ci(e,r),u!=null&&o.unshift(Yi(e,u,d)),u=ci(e,t),u!=null&&o.push(Yi(e,u,d))),e.tag===3)return o;e=e.return}return[]}function Ml(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function zg(e,t,r,o,u){for(var d=t._reactName,x=[];r!==null&&r!==o;){var _=r,T=_.alternate,Y=_.stateNode;if(_=_.tag,T!==null&&T===o)break;_!==5&&_!==26&&_!==27||Y===null||(T=Y,u?(Y=ci(r,d),Y!=null&&x.unshift(Yi(r,Y,T))):u||(Y=ci(r,d),Y!=null&&x.push(Yi(r,Y,T)))),r=r.return}x.length!==0&&e.push({event:t,listeners:x})}var yw=/\r\n?/g,bw=/\u0000|\uFFFD/g;function Ug(e){return(typeof e=="string"?e:""+e).replace(yw,`
55
- `).replace(bw,"")}function Pg(e,t){return t=Ug(t),Ug(e)===t}function As(){}function st(e,t,r,o,u,d){switch(r){case"children":typeof o=="string"?t==="body"||t==="textarea"&&o===""||rl(e,o):(typeof o=="number"||typeof o=="bigint")&&t!=="body"&&rl(e,""+o);break;case"className":oa(e,"class",o);break;case"tabIndex":oa(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":oa(e,r,o);break;case"style":Bh(e,o,d);break;case"data":if(t!=="object"){oa(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=Po(""+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"&&st(e,t,"name",u.name,u,null),st(e,t,"formEncType",u.formEncType,u,null),st(e,t,"formMethod",u.formMethod,u,null),st(e,t,"formTarget",u.formTarget,u,null)):(st(e,t,"encType",u.encType,u,null),st(e,t,"method",u.method,u,null),st(e,t,"target",u.target,u,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(r);break}o=Po(""+o),e.setAttribute(r,o);break;case"onClick":o!=null&&(e.onclick=As);break;case"onScroll":o!=null&&Ie("scroll",e);break;case"onScrollEnd":o!=null&&Ie("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(u.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=Po(""+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":Ie("beforetoggle",e),Ie("toggle",e),ia(e,"popover",o);break;case"xlinkActuate":Ye(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Ye(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Ye(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Ye(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Ye(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Ye(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Ye(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Ye(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Ye(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":ia(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=Qx.get(r)||r,ia(e,r,o))}}function Lf(e,t,r,o,u,d){switch(r){case"style":Bh(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(u.children!=null)throw Error(i(60));e.innerHTML=r}}break;case"children":typeof o=="string"?rl(e,o):(typeof o=="number"||typeof o=="bigint")&&rl(e,""+o);break;case"onScroll":o!=null&&Ie("scroll",e);break;case"onScrollEnd":o!=null&&Ie("scrollend",e);break;case"onClick":o!=null&&(e.onclick=As);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!qn.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(u=r.endsWith("Capture"),t=r.slice(2,u?r.length-7:void 0),d=e[pe]||null,d=d!=null?d[r]:null,typeof d=="function"&&e.removeEventListener(t,d,u),typeof o=="function")){typeof d!="function"&&d!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(t,o,u);break e}r in e?e[r]=o:o===!0?e.setAttribute(r,""):ia(e,r,o)}}}function Vt(e,t,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ie("error",e),Ie("load",e);var o=!1,u=!1,d;for(d in r)if(r.hasOwnProperty(d)){var x=r[d];if(x!=null)switch(d){case"src":o=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:st(e,t,d,x,r,null)}}u&&st(e,t,"srcSet",r.srcSet,r,null),o&&st(e,t,"src",r.src,r,null);return;case"input":Ie("invalid",e);var _=d=x=u=null,T=null,Y=null;for(o in r)if(r.hasOwnProperty(o)){var ne=r[o];if(ne!=null)switch(o){case"name":u=ne;break;case"type":x=ne;break;case"checked":T=ne;break;case"defaultChecked":Y=ne;break;case"value":d=ne;break;case"defaultValue":_=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(i(137,t));break;default:st(e,t,o,ne,r,null)}}zh(e,d,_,T,Y,x,u,!1),zo(e);return;case"select":Ie("invalid",e),o=x=d=null;for(u in r)if(r.hasOwnProperty(u)&&(_=r[u],_!=null))switch(u){case"value":d=_;break;case"defaultValue":x=_;break;case"multiple":o=_;default:st(e,t,u,_,r,null)}t=d,r=x,e.multiple=!!o,t!=null?al(e,!!o,t,!1):r!=null&&al(e,!!o,r,!0);return;case"textarea":Ie("invalid",e),d=u=o=null;for(x in r)if(r.hasOwnProperty(x)&&(_=r[x],_!=null))switch(x){case"value":o=_;break;case"defaultValue":u=_;break;case"children":d=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(i(91));break;default:st(e,t,x,_,r,null)}Ph(e,o,u,d),zo(e);return;case"option":for(T in r)if(r.hasOwnProperty(T)&&(o=r[T],o!=null))switch(T){case"selected":e.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:st(e,t,T,o,r,null)}return;case"dialog":Ie("beforetoggle",e),Ie("toggle",e),Ie("cancel",e),Ie("close",e);break;case"iframe":case"object":Ie("load",e);break;case"video":case"audio":for(o=0;o<Fi.length;o++)Ie(Fi[o],e);break;case"image":Ie("error",e),Ie("load",e);break;case"details":Ie("toggle",e);break;case"embed":case"source":case"link":Ie("error",e),Ie("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(Y in r)if(r.hasOwnProperty(Y)&&(o=r[Y],o!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:st(e,t,Y,o,r,null)}return;default:if(Qc(t)){for(ne in r)r.hasOwnProperty(ne)&&(o=r[ne],o!==void 0&&Lf(e,t,ne,o,r,void 0));return}}for(_ in r)r.hasOwnProperty(_)&&(o=r[_],o!=null&&st(e,t,_,o,r,null))}function xw(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 u=null,d=null,x=null,_=null,T=null,Y=null,ne=null;for(Z in r){var se=r[Z];if(r.hasOwnProperty(Z)&&se!=null)switch(Z){case"checked":break;case"value":break;case"defaultValue":T=se;default:o.hasOwnProperty(Z)||st(e,t,Z,null,o,se)}}for(var I in o){var Z=o[I];if(se=r[I],o.hasOwnProperty(I)&&(Z!=null||se!=null))switch(I){case"type":d=Z;break;case"name":u=Z;break;case"checked":Y=Z;break;case"defaultChecked":ne=Z;break;case"value":x=Z;break;case"defaultValue":_=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(i(137,t));break;default:Z!==se&&st(e,t,I,Z,o,se)}}Kc(e,x,_,T,Y,ne,d,u);return;case"select":Z=x=_=I=null;for(d in r)if(T=r[d],r.hasOwnProperty(d)&&T!=null)switch(d){case"value":break;case"multiple":Z=T;default:o.hasOwnProperty(d)||st(e,t,d,null,o,T)}for(u in o)if(d=o[u],T=r[u],o.hasOwnProperty(u)&&(d!=null||T!=null))switch(u){case"value":I=d;break;case"defaultValue":_=d;break;case"multiple":x=d;default:d!==T&&st(e,t,u,d,o,T)}t=_,r=x,o=Z,I!=null?al(e,!!r,I,!1):!!o!=!!r&&(t!=null?al(e,!!r,t,!0):al(e,!!r,r?[]:"",!1));return;case"textarea":Z=I=null;for(_ in r)if(u=r[_],r.hasOwnProperty(_)&&u!=null&&!o.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:st(e,t,_,null,o,u)}for(x in o)if(u=o[x],d=r[x],o.hasOwnProperty(x)&&(u!=null||d!=null))switch(x){case"value":I=u;break;case"defaultValue":Z=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(i(91));break;default:u!==d&&st(e,t,x,u,o,d)}Uh(e,I,Z);return;case"option":for(var ze in r)if(I=r[ze],r.hasOwnProperty(ze)&&I!=null&&!o.hasOwnProperty(ze))switch(ze){case"selected":e.selected=!1;break;default:st(e,t,ze,null,o,I)}for(T in o)if(I=o[T],Z=r[T],o.hasOwnProperty(T)&&I!==Z&&(I!=null||Z!=null))switch(T){case"selected":e.selected=I&&typeof I!="function"&&typeof I!="symbol";break;default:st(e,t,T,I,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 Me in r)I=r[Me],r.hasOwnProperty(Me)&&I!=null&&!o.hasOwnProperty(Me)&&st(e,t,Me,null,o,I);for(Y in o)if(I=o[Y],Z=r[Y],o.hasOwnProperty(Y)&&I!==Z&&(I!=null||Z!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(i(137,t));break;default:st(e,t,Y,I,o,Z)}return;default:if(Qc(t)){for(var ct in r)I=r[ct],r.hasOwnProperty(ct)&&I!==void 0&&!o.hasOwnProperty(ct)&&Lf(e,t,ct,void 0,o,I);for(ne in o)I=o[ne],Z=r[ne],!o.hasOwnProperty(ne)||I===Z||I===void 0&&Z===void 0||Lf(e,t,ne,I,o,Z);return}}for(var $ in r)I=r[$],r.hasOwnProperty($)&&I!=null&&!o.hasOwnProperty($)&&st(e,t,$,null,o,I);for(se in o)I=o[se],Z=r[se],!o.hasOwnProperty(se)||I===Z||I==null&&Z==null||st(e,t,se,I,o,Z)}var kf=null,zf=null;function Ts(e){return e.nodeType===9?e:e.ownerDocument}function Hg(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 Bg(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 Uf(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 Pf=null;function ww(){var e=window.event;return e&&e.type==="popstate"?e===Pf?!1:(Pf=e,!0):(Pf=null,!1)}var $g=typeof setTimeout=="function"?setTimeout:void 0,Sw=typeof clearTimeout=="function"?clearTimeout:void 0,Vg=typeof Promise=="function"?Promise:void 0,_w=typeof queueMicrotask=="function"?queueMicrotask:typeof Vg<"u"?function(e){return Vg.resolve(null).then(e).catch(Ew)}:$g;function Ew(e){setTimeout(function(){throw e})}function Qa(e){return e==="head"}function qg(e,t){var r=t,o=0,u=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 x=e.ownerDocument;if(r&1&&Gi(x.documentElement),r&2&&Gi(x.body),r&4)for(r=x.head,Gi(r),x=r.firstChild;x;){var _=x.nextSibling,T=x.nodeName;x[Ee]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&x.rel.toLowerCase()==="stylesheet"||r.removeChild(x),x=_}}if(u===0){e.removeChild(d),eo(t);return}u--}else r==="$"||r==="$?"||r==="$!"?u++:o=r.charCodeAt(0)-48;else o=0;r=d}while(r);eo(t)}function Hf(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":Hf(r),Re(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function Cw(e,t,r,o){for(;e.nodeType===1;){var u=r;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[Ee])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!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=kn(e.nextSibling),e===null)break}return null}function Nw(e,t,r){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=kn(e.nextSibling),e===null))return null;return e}function Bf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function Rw(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 kn(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 $f=null;function Fg(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 Yg(e,t,r){switch(t=Ts(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 Gi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Re(e)}var jn=new Map,Gg=new Set;function Ms(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var wa=X.d;X.d={f:jw,r:Ow,D:Aw,C:Tw,L:Mw,m:Dw,X:kw,S:Lw,M:zw};function jw(){var e=wa.f(),t=_s();return e||t}function Ow(e){var t=at(e);t!==null&&t.tag===5&&t.type==="form"?dp(t):wa.r(e)}var Dl=typeof document>"u"?null:document;function Kg(e,t,r){var o=Dl;if(o&&typeof t=="string"&&t){var u=wn(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof r=="string"&&(u+='[crossorigin="'+r+'"]'),Gg.has(u)||(Gg.add(u),e={rel:e,crossOrigin:r,href:t},o.querySelector(u)===null&&(t=o.createElement("link"),Vt(t,"link",e),He(t),o.head.appendChild(t)))}}function Aw(e){wa.D(e),Kg("dns-prefetch",e,null)}function Tw(e,t){wa.C(e,t),Kg("preconnect",e,t)}function Mw(e,t,r){wa.L(e,t,r);var o=Dl;if(o&&e&&t){var u='link[rel="preload"][as="'+wn(t)+'"]';t==="image"&&r&&r.imageSrcSet?(u+='[imagesrcset="'+wn(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(u+='[imagesizes="'+wn(r.imageSizes)+'"]')):u+='[href="'+wn(e)+'"]';var d=u;switch(t){case"style":d=Ll(e);break;case"script":d=kl(e)}jn.has(d)||(e=v({rel:"preload",href:t==="image"&&r&&r.imageSrcSet?void 0:e,as:t},r),jn.set(d,e),o.querySelector(u)!==null||t==="style"&&o.querySelector(Ki(d))||t==="script"&&o.querySelector(Xi(d))||(t=o.createElement("link"),Vt(t,"link",e),He(t),o.head.appendChild(t)))}}function Dw(e,t){wa.m(e,t);var r=Dl;if(r&&e){var o=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+wn(o)+'"][href="'+wn(e)+'"]',d=u;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=kl(e)}if(!jn.has(d)&&(e=v({rel:"modulepreload",href:e},t),jn.set(d,e),r.querySelector(u)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(Xi(d)))return}o=r.createElement("link"),Vt(o,"link",e),He(o),r.head.appendChild(o)}}}function Lw(e,t,r){wa.S(e,t,r);var o=Dl;if(o&&e){var u=St(o).hoistableStyles,d=Ll(e);t=t||"default";var x=u.get(d);if(!x){var _={loading:0,preload:null};if(x=o.querySelector(Ki(d)))_.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},r),(r=jn.get(d))&&Vf(e,r);var T=x=o.createElement("link");He(T),Vt(T,"link",e),T._p=new Promise(function(Y,ne){T.onload=Y,T.onerror=ne}),T.addEventListener("load",function(){_.loading|=1}),T.addEventListener("error",function(){_.loading|=2}),_.loading|=4,Ds(x,t,o)}x={type:"stylesheet",instance:x,count:1,state:_},u.set(d,x)}}}function kw(e,t){wa.X(e,t);var r=Dl;if(r&&e){var o=St(r).hoistableScripts,u=kl(e),d=o.get(u);d||(d=r.querySelector(Xi(u)),d||(e=v({src:e,async:!0},t),(t=jn.get(u))&&qf(e,t),d=r.createElement("script"),He(d),Vt(d,"link",e),r.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(u,d))}}function zw(e,t){wa.M(e,t);var r=Dl;if(r&&e){var o=St(r).hoistableScripts,u=kl(e),d=o.get(u);d||(d=r.querySelector(Xi(u)),d||(e=v({src:e,async:!0,type:"module"},t),(t=jn.get(u))&&qf(e,t),d=r.createElement("script"),He(d),Vt(d,"link",e),r.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(u,d))}}function Xg(e,t,r,o){var u=(u=me.current)?Ms(u):null;if(!u)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(t=Ll(r.href),r=St(u).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=Ll(r.href);var d=St(u).hoistableStyles,x=d.get(e);if(x||(u=u.ownerDocument||u,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,x),(d=u.querySelector(Ki(e)))&&!d._p&&(x.instance=d,x.state.loading=5),jn.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},jn.set(e,r),d||Uw(u,e,r,x.state))),t&&o===null)throw Error(i(528,""));return x}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=kl(r),r=St(u).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 Ll(e){return'href="'+wn(e)+'"'}function Ki(e){return'link[rel="stylesheet"]['+e+"]"}function Qg(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function Uw(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}),Vt(t,"link",r),He(t),e.head.appendChild(t))}function kl(e){return'[src="'+wn(e)+'"]'}function Xi(e){return"script[async]"+e}function Ig(e,t,r){if(t.count++,t.instance===null)switch(t.type){case"style":var o=e.querySelector('style[data-href~="'+wn(r.href)+'"]');if(o)return t.instance=o,He(o),o;var u=v({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),He(o),Vt(o,"style",u),Ds(o,r.precedence,e),t.instance=o;case"stylesheet":u=Ll(r.href);var d=e.querySelector(Ki(u));if(d)return t.state.loading|=4,t.instance=d,He(d),d;o=Qg(r),(u=jn.get(u))&&Vf(o,u),d=(e.ownerDocument||e).createElement("link"),He(d);var x=d;return x._p=new Promise(function(_,T){x.onload=_,x.onerror=T}),Vt(d,"link",o),t.state.loading|=4,Ds(d,r.precedence,e),t.instance=d;case"script":return d=kl(r.src),(u=e.querySelector(Xi(d)))?(t.instance=u,He(u),u):(o=r,(u=jn.get(d))&&(o=v({},r),qf(o,u)),e=e.ownerDocument||e,u=e.createElement("script"),He(u),Vt(u,"link",o),e.head.appendChild(u),t.instance=u);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,Ds(o,r.precedence,e));return t.instance}function Ds(e,t,r){for(var o=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=o.length?o[o.length-1]:null,d=u,x=0;x<o.length;x++){var _=o[x];if(_.dataset.precedence===t)d=_;else if(d!==u)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=r.nodeType===9?r.head:r,t.insertBefore(e,t.firstChild))}function Vf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function qf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ls=null;function Zg(e,t,r){if(Ls===null){var o=new Map,u=Ls=new Map;u.set(r,o)}else u=Ls,o=u.get(r),o||(o=new Map,u.set(r,o));if(o.has(e))return o;for(o.set(e,null),r=r.getElementsByTagName(e),u=0;u<r.length;u++){var d=r[u];if(!(d[Ee]||d[ce]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var x=d.getAttribute(t)||"";x=e+x;var _=o.get(x);_?_.push(d):o.set(x,[d])}}return o}function Jg(e,t,r){e=e.ownerDocument||e,e.head.insertBefore(r,t==="title"?e.querySelector("head > title"):null)}function Pw(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 Wg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var Qi=null;function Hw(){}function Bw(e,t,r){if(Qi===null)throw Error(i(475));var o=Qi;if(t.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var u=Ll(r.href),d=e.querySelector(Ki(u));if(d){e=d._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(o.count++,o=ks.bind(o),e.then(o,o)),t.state.loading|=4,t.instance=d,He(d);return}d=e.ownerDocument||e,r=Qg(r),(u=jn.get(u))&&Vf(r,u),d=d.createElement("link"),He(d);var x=d;x._p=new Promise(function(_,T){x.onload=_,x.onerror=T}),Vt(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=ks.bind(o),e.addEventListener("load",t),e.addEventListener("error",t))}}function $w(){if(Qi===null)throw Error(i(475));var e=Qi;return e.stylesheets&&e.count===0&&Ff(e,e.stylesheets),0<e.count?function(t){var r=setTimeout(function(){if(e.stylesheets&&Ff(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 ks(){if(this.count--,this.count===0){if(this.stylesheets)Ff(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var zs=null;function Ff(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,zs=new Map,t.forEach(Vw,e),zs=null,ks.call(e))}function Vw(e,t){if(!(t.state.loading&4)){var r=zs.get(e);if(r)var o=r.get(null);else{r=new Map,zs.set(e,r);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<u.length;d++){var x=u[d];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(r.set(x.dataset.precedence,x),o=x)}o&&r.set(null,o)}u=t.instance,x=u.getAttribute("data-precedence"),d=r.get(x)||o,d===o&&r.set(null,u),r.set(x,u),this.count++,o=ks.bind(this),u.addEventListener("load",o),u.addEventListener("error",o),d?d.parentNode.insertBefore(u,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var Ii={$$typeof:k,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function qw(e,t,r,o,u,d,x,_){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=tl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tl(0),this.hiddenUpdates=tl(null),this.identifierPrefix=o,this.onUncaughtError=u,this.onCaughtError=d,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function ev(e,t,r,o,u,d,x,_,T,Y,ne,se){return e=new qw(e,t,r,x,_,T,Y,se),t=1,d===!0&&(t|=24),d=on(3,null,null,t),e.current=d,d.stateNode=e,t=Eu(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:o,isDehydrated:r,cache:t},ju(d),e}function tv(e){return e?(e=dl,e):dl}function nv(e,t,r,o,u,d){u=tv(u),o.context===null?o.context=u:o.pendingContext=u,o=za(t),o.payload={element:r},d=d===void 0?null:d,d!==null&&(o.callback=d),r=Ua(e,o,t),r!==null&&(dn(r,e,t),Ni(r,e,t))}function av(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Yf(e,t){av(e,t),(e=e.alternate)&&av(e,t)}function rv(e){if(e.tag===13){var t=fl(e,67108864);t!==null&&dn(t,e,67108864),Yf(e,67108864)}}var Us=!0;function Fw(e,t,r,o){var u=A.T;A.T=null;var d=X.p;try{X.p=2,Gf(e,t,r,o)}finally{X.p=d,A.T=u}}function Yw(e,t,r,o){var u=A.T;A.T=null;var d=X.p;try{X.p=8,Gf(e,t,r,o)}finally{X.p=d,A.T=u}}function Gf(e,t,r,o){if(Us){var u=Kf(o);if(u===null)Df(e,t,o,Ps,r),iv(e,o);else if(Kw(u,e,t,r,o))o.stopPropagation();else if(iv(e,o),t&4&&-1<Gw.indexOf(e)){for(;u!==null;){var d=at(u);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var x=ra(d.pendingLanes);if(x!==0){var _=d;for(_.pendingLanes|=2,_.entangledLanes|=2;x;){var T=1<<31-Ht(x);_.entanglements[1]|=T,x&=~T}Xn(d),(rt&6)===0&&(ws=he()+500,qi(0))}}break;case 13:_=fl(d,2),_!==null&&dn(_,d,2),_s(),Yf(d,2)}if(d=Kf(o),d===null&&Df(e,t,o,Ps,r),d===u)break;u=d}u!==null&&o.stopPropagation()}else Df(e,t,o,null,r)}}function Kf(e){return e=Zc(e),Xf(e)}var Ps=null;function Xf(e){if(Ps=null,e=$e(e),e!==null){var t=c(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 Ps=e,null}function lv(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(Oe()){case ke:return 2;case Pe:return 8;case nt:case Ft:return 32;case Bn:return 268435456;default:return 32}default:return 32}}var Qf=!1,Ia=null,Za=null,Ja=null,Zi=new Map,Ji=new Map,Wa=[],Gw="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 iv(e,t){switch(e){case"focusin":case"focusout":Ia=null;break;case"dragenter":case"dragleave":Za=null;break;case"mouseover":case"mouseout":Ja=null;break;case"pointerover":case"pointerout":Zi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ji.delete(t.pointerId)}}function Wi(e,t,r,o,u,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:r,eventSystemFlags:o,nativeEvent:d,targetContainers:[u]},t!==null&&(t=at(t),t!==null&&rv(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function Kw(e,t,r,o,u){switch(t){case"focusin":return Ia=Wi(Ia,e,t,r,o,u),!0;case"dragenter":return Za=Wi(Za,e,t,r,o,u),!0;case"mouseover":return Ja=Wi(Ja,e,t,r,o,u),!0;case"pointerover":var d=u.pointerId;return Zi.set(d,Wi(Zi.get(d)||null,e,t,r,o,u)),!0;case"gotpointercapture":return d=u.pointerId,Ji.set(d,Wi(Ji.get(d)||null,e,t,r,o,u)),!0}return!1}function ov(e){var t=$e(e.target);if(t!==null){var r=c(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=fn();o=oi(o);var u=fl(r,o);u!==null&&dn(u,r,o),Yf(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 Hs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Kf(e.nativeEvent);if(r===null){r=e.nativeEvent;var o=new r.constructor(r.type,r);Ic=o,r.target.dispatchEvent(o),Ic=null}else return t=at(r),t!==null&&rv(t),e.blockedOn=r,!1;t.shift()}return!0}function sv(e,t,r){Hs(e)&&r.delete(t)}function Xw(){Qf=!1,Ia!==null&&Hs(Ia)&&(Ia=null),Za!==null&&Hs(Za)&&(Za=null),Ja!==null&&Hs(Ja)&&(Ja=null),Zi.forEach(sv),Ji.forEach(sv)}function Bs(e,t){e.blockedOn===t&&(e.blockedOn=null,Qf||(Qf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Xw)))}var $s=null;function cv(e){$s!==e&&($s=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){$s===e&&($s=null);for(var t=0;t<e.length;t+=3){var r=e[t],o=e[t+1],u=e[t+2];if(typeof o!="function"){if(Xf(o||r)===null)continue;break}var d=at(r);d!==null&&(e.splice(t,3),t-=3,Ku(d,{pending:!0,data:u,method:r.method,action:o},o,u))}}))}function eo(e){function t(T){return Bs(T,e)}Ia!==null&&Bs(Ia,e),Za!==null&&Bs(Za,e),Ja!==null&&Bs(Ja,e),Zi.forEach(t),Ji.forEach(t);for(var r=0;r<Wa.length;r++){var o=Wa[r];o.blockedOn===e&&(o.blockedOn=null)}for(;0<Wa.length&&(r=Wa[0],r.blockedOn===null);)ov(r),r.blockedOn===null&&Wa.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(o=0;o<r.length;o+=3){var u=r[o],d=r[o+1],x=u[pe]||null;if(typeof d=="function")x||cv(r);else if(x){var _=null;if(d&&d.hasAttribute("formAction")){if(u=d,x=d[pe]||null)_=x.formAction;else if(Xf(u)!==null)continue}else _=x.action;typeof _=="function"?r[o+1]=_:(r.splice(o,3),o-=3),cv(r)}}}function If(e){this._internalRoot=e}Vs.prototype.render=If.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var r=t.current,o=fn();nv(r,o,e,t,null,null)},Vs.prototype.unmount=If.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;nv(e.current,2,null,e,null,null),_s(),t[Se]=null}};function Vs(e){this._internalRoot=e}Vs.prototype.unstable_scheduleHydration=function(e){if(e){var t=D();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Wa.length&&t!==0&&t<Wa[r].priority;r++);Wa.splice(r,0,e),r===0&&ov(e)}};var uv=a.version;if(uv!=="19.1.1")throw Error(i(527,uv,"19.1.1"));X.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 Qw={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:A,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var qs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!qs.isDisabled&&qs.supportsFiber)try{It=qs.inject(Qw),vt=qs}catch{}}return ao.createRoot=function(e,t){if(!s(e))throw Error(i(299));var r=!1,o="",u=Np,d=Rp,x=jp,_=null;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(_=t.unstable_transitionCallbacks)),t=ev(e,1,!1,null,null,r,o,u,d,x,_,null),e[Se]=t.current,Mf(e),new If(t)},ao.hydrateRoot=function(e,t,r){if(!s(e))throw Error(i(299));var o=!1,u="",d=Np,x=Rp,_=jp,T=null,Y=null;return r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onUncaughtError!==void 0&&(d=r.onUncaughtError),r.onCaughtError!==void 0&&(x=r.onCaughtError),r.onRecoverableError!==void 0&&(_=r.onRecoverableError),r.unstable_transitionCallbacks!==void 0&&(T=r.unstable_transitionCallbacks),r.formState!==void 0&&(Y=r.formState)),t=ev(e,1,!0,t,r??null,o,u,d,x,_,T,Y),t.context=tv(null),r=t.current,o=fn(),o=oi(o),u=za(o),u.callback=null,Ua(r,u,o),r=o,t.current.lanes=r,xr(t,r),Xn(t),e[Se]=t.current,Mf(e),new Vs(t)},ao.version="19.1.1",ao}var Bv;function E_(){if(Bv)return ed.exports;Bv=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(),ed.exports=__(),ed.exports}var C_=E_();/**
56
- * react-router v7.7.1
54
+ `+r.stack}}function xn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Kh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function O1(e){var t=Kh(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var u=r.get,p=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(x){i=""+x,p.call(this,x)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(x){i=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Vi(e){e._valueTracker||(e._valueTracker=O1(e))}function Ih(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),i="";return e&&(i=Kh(e)?e.checked?"true":"false":e.value),e=i,e!==r?(t.setValue(e),!0):!1}function Gi(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 A1=/[\n"\\]/g;function wn(e){return e.replace(A1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function nu(e,t,r,i,u,p,x,_){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),t!=null?x==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+xn(t)):e.value!==""+xn(t)&&(e.value=""+xn(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?au(e,x,xn(t)):r!=null?au(e,x,xn(r)):i!=null&&e.removeAttribute("value"),u==null&&p!=null&&(e.defaultChecked=!!p),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?e.name=""+xn(_):e.removeAttribute("name")}function Xh(e,t,r,i,u,p,x,_){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.type=p),t!=null||r!=null){if(!(p!=="submit"&&p!=="reset"||t!=null))return;r=r!=null?""+xn(r):"",t=t!=null?""+xn(t):r,_||t===e.value||(e.value=t),e.defaultValue=t}i=i??u,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=_?e.checked:!!i,e.defaultChecked=!!i,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x)}function au(e,t,r){t==="number"&&Gi(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function ol(e,t,r,i){if(e=e.options,t){t={};for(var u=0;u<r.length;u++)t["$"+r[u]]=!0;for(r=0;r<e.length;r++)u=t.hasOwnProperty("$"+e[r].value),e[r].selected!==u&&(e[r].selected=u),u&&i&&(e[r].defaultSelected=!0)}else{for(r=""+xn(r),t=null,u=0;u<e.length;u++){if(e[u].value===r){e[u].selected=!0,i&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function Qh(e,t,r){if(t!=null&&(t=""+xn(t),t!==e.value&&(e.value=t),r==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=r!=null?""+xn(r):""}function Zh(e,t,r,i){if(t==null){if(i!=null){if(r!=null)throw Error(o(92));if(te(i)){if(1<i.length)throw Error(o(93));i=i[0]}r=i}r==null&&(r=""),t=r}r=xn(t),e.defaultValue=r,i=e.textContent,i===r&&i!==""&&i!==null&&(e.value=i)}function il(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var T1=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 Jh(e,t,r){var i=t.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,r):typeof r!="number"||r===0||T1.has(t)?t==="float"?e.cssFloat=r:e[t]=(""+r).trim():e[t]=r+"px"}function Wh(e,t,r){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,r!=null){for(var i in r)!r.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var u in t)i=t[u],t.hasOwnProperty(u)&&r[u]!==i&&Jh(e,u,i)}else for(var p in t)t.hasOwnProperty(p)&&Jh(e,p,t[p])}function ru(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 M1=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"]]),D1=/^[\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 Yi(e){return D1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var lu=null;function ou(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var sl=null,cl=null;function em(e){var t=st(e);if(t&&(e=t.stateNode)){var r=e[pe]||null;e:switch(e=t.stateNode,t.type){case"input":if(nu(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="'+wn(""+t)+'"][type="radio"]'),t=0;t<r.length;t++){var i=r[t];if(i!==e&&i.form===e.form){var u=i[pe]||null;if(!u)throw Error(o(90));nu(i,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<r.length;t++)i=r[t],i.form===e.form&&Ih(i)}break e;case"textarea":Qh(e,r.value,r.defaultValue);break e;case"select":t=r.value,t!=null&&ol(e,!!r.multiple,t,!1)}}}var iu=!1;function tm(e,t,r){if(iu)return e(t,r);iu=!0;try{var i=e(t);return i}finally{if(iu=!1,(sl!==null||cl!==null)&&(Ts(),sl&&(t=sl,e=cl,cl=sl=null,em(t),e)))for(t=0;t<e.length;t++)em(e[t])}}function mo(e,t){var r=e.stateNode;if(r===null)return null;var i=r[pe]||null;if(i===null)return null;r=i[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":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(o(231,t,typeof r));return r}var ua=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),su=!1;if(ua)try{var po={};Object.defineProperty(po,"passive",{get:function(){su=!0}}),window.addEventListener("test",po,po),window.removeEventListener("test",po,po)}catch{su=!1}var Ua=null,cu=null,Ki=null;function nm(){if(Ki)return Ki;var e,t=cu,r=t.length,i,u="value"in Ua?Ua.value:Ua.textContent,p=u.length;for(e=0;e<r&&t[e]===u[e];e++);var x=r-e;for(i=1;i<=x&&t[r-i]===u[p-i];i++);return Ki=u.slice(e,1<i?1-i:void 0)}function Ii(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 Xi(){return!0}function am(){return!1}function Wt(e){function t(r,i,u,p,x){this._reactName=r,this._targetInst=u,this.type=i,this.nativeEvent=p,this.target=x,this.currentTarget=null;for(var _ in e)e.hasOwnProperty(_)&&(r=e[_],this[_]=r?r(p):p[_]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?Xi:am,this.isPropagationStopped=am,this}return v(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=Xi)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Xi)},persist:function(){},isPersistent:Xi}),t}var Cr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qi=Wt(Cr),go=v({},Cr,{view:0,detail:0}),L1=Wt(go),uu,fu,vo,Zi=v({},go,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hu,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!==vo&&(vo&&e.type==="mousemove"?(uu=e.screenX-vo.screenX,fu=e.screenY-vo.screenY):fu=uu=0,vo=e),uu)},movementY:function(e){return"movementY"in e?e.movementY:fu}}),rm=Wt(Zi),k1=v({},Zi,{dataTransfer:0}),z1=Wt(k1),U1=v({},go,{relatedTarget:0}),du=Wt(U1),P1=v({},Cr,{animationName:0,elapsedTime:0,pseudoElement:0}),H1=Wt(P1),B1=v({},Cr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),$1=Wt(B1),q1=v({},Cr,{data:0}),lm=Wt(q1),F1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},V1={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"},G1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Y1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=G1[e])?!!t[e]:!1}function hu(){return Y1}var K1=v({},go,{key:function(e){if(e.key){var t=F1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ii(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?V1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hu,charCode:function(e){return e.type==="keypress"?Ii(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ii(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),I1=Wt(K1),X1=v({},Zi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),om=Wt(X1),Q1=v({},go,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hu}),Z1=Wt(Q1),J1=v({},Cr,{propertyName:0,elapsedTime:0,pseudoElement:0}),W1=Wt(J1),ew=v({},Zi,{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}),tw=Wt(ew),nw=v({},Cr,{newState:0,oldState:0}),aw=Wt(nw),rw=[9,13,27,32],mu=ua&&"CompositionEvent"in window,yo=null;ua&&"documentMode"in document&&(yo=document.documentMode);var lw=ua&&"TextEvent"in window&&!yo,im=ua&&(!mu||yo&&8<yo&&11>=yo),sm=" ",cm=!1;function um(e,t){switch(e){case"keyup":return rw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ul=!1;function ow(e,t){switch(e){case"compositionend":return fm(t);case"keypress":return t.which!==32?null:(cm=!0,sm);case"textInput":return e=t.data,e===sm&&cm?null:e;default:return null}}function iw(e,t){if(ul)return e==="compositionend"||!mu&&um(e,t)?(e=nm(),Ki=cu=Ua=null,ul=!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 im&&t.locale!=="ko"?null:t.data;default:return null}}var sw={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 dm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!sw[e.type]:t==="textarea"}function hm(e,t,r,i){sl?cl?cl.push(i):cl=[i]:sl=i,t=Us(t,"onChange"),0<t.length&&(r=new Qi("onChange","change",null,r,i),e.push({event:r,listeners:t}))}var bo=null,xo=null;function cw(e){Kg(e,0)}function Ji(e){var t=_t(e);if(Ih(t))return e}function mm(e,t){if(e==="change")return t}var pm=!1;if(ua){var pu;if(ua){var gu="oninput"in document;if(!gu){var gm=document.createElement("div");gm.setAttribute("oninput","return;"),gu=typeof gm.oninput=="function"}pu=gu}else pu=!1;pm=pu&&(!document.documentMode||9<document.documentMode)}function vm(){bo&&(bo.detachEvent("onpropertychange",ym),xo=bo=null)}function ym(e){if(e.propertyName==="value"&&Ji(xo)){var t=[];hm(t,xo,e,ou(e)),tm(cw,t)}}function uw(e,t,r){e==="focusin"?(vm(),bo=t,xo=r,bo.attachEvent("onpropertychange",ym)):e==="focusout"&&vm()}function fw(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ji(xo)}function dw(e,t){if(e==="click")return Ji(t)}function hw(e,t){if(e==="input"||e==="change")return Ji(t)}function mw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var on=typeof Object.is=="function"?Object.is:mw;function wo(e,t){if(on(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(i=0;i<r.length;i++){var u=r[i];if(!De.call(t,u)||!on(e[u],t[u]))return!1}return!0}function bm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function xm(e,t){var r=bm(e);e=0;for(var i;r;){if(r.nodeType===3){if(i=e+r.textContent.length,e<=t&&i>=t)return{node:r,offset:t-e};e=i}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=bm(r)}}function wm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Sm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Gi(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=Gi(e.document)}return t}function vu(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 pw=ua&&"documentMode"in document&&11>=document.documentMode,fl=null,yu=null,So=null,bu=!1;function _m(e,t,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;bu||fl==null||fl!==Gi(i)||(i=fl,"selectionStart"in i&&vu(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),So&&wo(So,i)||(So=i,i=Us(yu,"onSelect"),0<i.length&&(t=new Qi("onSelect","select",null,t,r),e.push({event:t,listeners:i}),t.target=fl)))}function jr(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var dl={animationend:jr("Animation","AnimationEnd"),animationiteration:jr("Animation","AnimationIteration"),animationstart:jr("Animation","AnimationStart"),transitionrun:jr("Transition","TransitionRun"),transitionstart:jr("Transition","TransitionStart"),transitioncancel:jr("Transition","TransitionCancel"),transitionend:jr("Transition","TransitionEnd")},xu={},Em={};ua&&(Em=document.createElement("div").style,"AnimationEvent"in window||(delete dl.animationend.animation,delete dl.animationiteration.animation,delete dl.animationstart.animation),"TransitionEvent"in window||delete dl.transitionend.transition);function Rr(e){if(xu[e])return xu[e];if(!dl[e])return e;var t=dl[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Em)return xu[e]=t[r];return e}var Nm=Rr("animationend"),Cm=Rr("animationiteration"),jm=Rr("animationstart"),gw=Rr("transitionrun"),vw=Rr("transitionstart"),yw=Rr("transitioncancel"),Rm=Rr("transitionend"),Om=new Map,wu="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(" ");wu.push("scrollEnd");function Ln(e,t){Om.set(e,t),ln(t,[e])}var Am=new WeakMap;function Sn(e,t){if(typeof e=="object"&&e!==null){var r=Am.get(e);return r!==void 0?r:(t={value:e,source:t,stack:Fi(t)},Am.set(e,t),t)}return{value:e,source:t,stack:Fi(t)}}var _n=[],hl=0,Su=0;function Wi(){for(var e=hl,t=Su=hl=0;t<e;){var r=_n[t];_n[t++]=null;var i=_n[t];_n[t++]=null;var u=_n[t];_n[t++]=null;var p=_n[t];if(_n[t++]=null,i!==null&&u!==null){var x=i.pending;x===null?u.next=u:(u.next=x.next,x.next=u),i.pending=u}p!==0&&Tm(r,u,p)}}function es(e,t,r,i){_n[hl++]=e,_n[hl++]=t,_n[hl++]=r,_n[hl++]=i,Su|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function _u(e,t,r,i){return es(e,t,r,i),ts(e)}function ml(e,t){return es(e,null,null,t),ts(e)}function Tm(e,t,r){e.lanes|=r;var i=e.alternate;i!==null&&(i.lanes|=r);for(var u=!1,p=e.return;p!==null;)p.childLanes|=r,i=p.alternate,i!==null&&(i.childLanes|=r),p.tag===22&&(e=p.stateNode,e===null||e._visibility&1||(u=!0)),e=p,p=p.return;return e.tag===3?(p=e.stateNode,u&&t!==null&&(u=31-Bt(r),e=p.hiddenUpdates,i=e[u],i===null?e[u]=[t]:i.push(t),t.lane=r|536870912),p):null}function ts(e){if(50<Ko)throw Ko=0,Af=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var pl={};function bw(e,t,r,i){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=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function sn(e,t,r,i){return new bw(e,t,r,i)}function Eu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fa(e,t){var r=e.alternate;return r===null?(r=sn(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 Mm(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 ns(e,t,r,i,u,p){var x=0;if(i=e,typeof e=="function")Eu(e)&&(x=1);else if(typeof e=="string")x=wS(e,r,le.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case W:return e=sn(31,r,t,u),e.elementType=W,e.lanes=p,e;case N:return Or(r.children,u,p,t);case E:x=8,u|=24;break;case R:return e=sn(12,r,t,u|2),e.elementType=R,e.lanes=p,e;case D:return e=sn(13,r,t,u),e.elementType=D,e.lanes=p,e;case j:return e=sn(19,r,t,u),e.elementType=j,e.lanes=p,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case C:case T:x=10;break e;case A:x=9;break e;case k:x=11;break e;case U:x=14;break e;case B:x=16,i=null;break e}x=29,r=Error(o(130,e===null?"null":typeof e,"")),i=null}return t=sn(x,r,t,u),t.elementType=e,t.type=i,t.lanes=p,t}function Or(e,t,r,i){return e=sn(7,e,i,t),e.lanes=r,e}function Nu(e,t,r){return e=sn(6,e,null,t),e.lanes=r,e}function Cu(e,t,r){return t=sn(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var gl=[],vl=0,as=null,rs=0,En=[],Nn=0,Ar=null,da=1,ha="";function Tr(e,t){gl[vl++]=rs,gl[vl++]=as,as=e,rs=t}function Dm(e,t,r){En[Nn++]=da,En[Nn++]=ha,En[Nn++]=Ar,Ar=e;var i=da;e=ha;var u=32-Bt(i)-1;i&=~(1<<u),r+=1;var p=32-Bt(t)+u;if(30<p){var x=u-u%5;p=(i&(1<<x)-1).toString(32),i>>=x,u-=x,da=1<<32-Bt(t)+u|r<<u|i,ha=p+e}else da=1<<p|r<<u|i,ha=e}function ju(e){e.return!==null&&(Tr(e,1),Dm(e,1,0))}function Ru(e){for(;e===as;)as=gl[--vl],gl[vl]=null,rs=gl[--vl],gl[vl]=null;for(;e===Ar;)Ar=En[--Nn],En[Nn]=null,ha=En[--Nn],En[Nn]=null,da=En[--Nn],En[Nn]=null}var Zt=null,Nt=null,rt=!1,Mr=null,Gn=!1,Ou=Error(o(519));function Dr(e){var t=Error(o(418,""));throw No(Sn(t,e)),Ou}function Lm(e){var t=e.stateNode,r=e.type,i=e.memoizedProps;switch(t[de]=e,t[pe]=i,r){case"dialog":et("cancel",t),et("close",t);break;case"iframe":case"object":case"embed":et("load",t);break;case"video":case"audio":for(r=0;r<Xo.length;r++)et(Xo[r],t);break;case"source":et("error",t);break;case"img":case"image":case"link":et("error",t),et("load",t);break;case"details":et("toggle",t);break;case"input":et("invalid",t),Xh(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0),Vi(t);break;case"select":et("invalid",t);break;case"textarea":et("invalid",t),Zh(t,i.value,i.defaultValue,i.children),Vi(t)}r=i.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||t.textContent===""+r||i.suppressHydrationWarning===!0||Zg(t.textContent,r)?(i.popover!=null&&(et("beforetoggle",t),et("toggle",t)),i.onScroll!=null&&et("scroll",t),i.onScrollEnd!=null&&et("scrollend",t),i.onClick!=null&&(t.onclick=Ps),t=!0):t=!1,t||Dr(e)}function km(e){for(Zt=e.return;Zt;)switch(Zt.tag){case 5:case 13:Gn=!1;return;case 27:case 3:Gn=!0;return;default:Zt=Zt.return}}function _o(e){if(e!==Zt)return!1;if(!rt)return km(e),rt=!0,!1;var t=e.tag,r;if((r=t!==3&&t!==27)&&((r=t===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||Yf(e.type,e.memoizedProps)),r=!r),r&&Nt&&Dr(e),km(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(r=e.data,r==="/$"){if(t===0){Nt=zn(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++;e=e.nextSibling}Nt=null}}else t===27?(t=Nt,Wa(e.type)?(e=Qf,Qf=null,Nt=e):Nt=t):Nt=Zt?zn(e.stateNode.nextSibling):null;return!0}function Eo(){Nt=Zt=null,rt=!1}function zm(){var e=Mr;return e!==null&&(nn===null?nn=e:nn.push.apply(nn,e),Mr=null),e}function No(e){Mr===null?Mr=[e]:Mr.push(e)}var Au=Y(null),Lr=null,ma=null;function Pa(e,t,r){K(Au,t._currentValue),t._currentValue=r}function pa(e){e._currentValue=Au.current,H(Au)}function Tu(e,t,r){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===r)break;e=e.return}}function Mu(e,t,r,i){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var p=u.dependencies;if(p!==null){var x=u.child;p=p.firstContext;e:for(;p!==null;){var _=p;p=u;for(var L=0;L<t.length;L++)if(_.context===t[L]){p.lanes|=r,_=p.alternate,_!==null&&(_.lanes|=r),Tu(p.return,r,e),i||(x=null);break e}p=_.next}}else if(u.tag===18){if(x=u.return,x===null)throw Error(o(341));x.lanes|=r,p=x.alternate,p!==null&&(p.lanes|=r),Tu(x,r,e),x=null}else x=u.child;if(x!==null)x.return=u;else for(x=u;x!==null;){if(x===e){x=null;break}if(u=x.sibling,u!==null){u.return=x.return,x=u;break}x=x.return}u=x}}function Co(e,t,r,i){e=null;for(var u=t,p=!1;u!==null;){if(!p){if((u.flags&524288)!==0)p=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var x=u.alternate;if(x===null)throw Error(o(387));if(x=x.memoizedProps,x!==null){var _=u.type;on(u.pendingProps.value,x.value)||(e!==null?e.push(_):e=[_])}}else if(u===be.current){if(x=u.alternate,x===null)throw Error(o(387));x.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(ti):e=[ti])}u=u.return}e!==null&&Mu(t,e,r,i),t.flags|=262144}function ls(e){for(e=e.firstContext;e!==null;){if(!on(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function kr(e){Lr=e,ma=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Kt(e){return Um(Lr,e)}function os(e,t){return Lr===null&&kr(e),Um(e,t)}function Um(e,t){var r=t._currentValue;if(t={context:t,memoizedValue:r,next:null},ma===null){if(e===null)throw Error(o(308));ma=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ma=ma.next=t;return r}var xw=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(r,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(r){return r()})}},ww=n.unstable_scheduleCallback,Sw=n.unstable_NormalPriority,Dt={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Du(){return{controller:new xw,data:new Map,refCount:0}}function jo(e){e.refCount--,e.refCount===0&&ww(Sw,function(){e.controller.abort()})}var Ro=null,Lu=0,yl=0,bl=null;function _w(e,t){if(Ro===null){var r=Ro=[];Lu=0,yl=Uf(),bl={status:"pending",value:void 0,then:function(i){r.push(i)}}}return Lu++,t.then(Pm,Pm),t}function Pm(){if(--Lu===0&&Ro!==null){bl!==null&&(bl.status="fulfilled");var e=Ro;Ro=null,yl=0,bl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ew(e,t){var r=[],i={status:"pending",value:null,reason:null,then:function(u){r.push(u)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var u=0;u<r.length;u++)(0,r[u])(t)},function(u){for(i.status="rejected",i.reason=u,u=0;u<r.length;u++)(0,r[u])(void 0)}),i}var Hm=O.S;O.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&_w(e,t),Hm!==null&&Hm(e,t)};var zr=Y(null);function ku(){var e=zr.current;return e!==null?e:yt.pooledCache}function is(e,t){t===null?K(zr,zr.current):K(zr,t.pool)}function Bm(){var e=ku();return e===null?null:{parent:Dt._currentValue,pool:e}}var Oo=Error(o(460)),$m=Error(o(474)),ss=Error(o(542)),zu={then:function(){}};function qm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function cs(){}function Fm(e,t,r){switch(r=e[r],r===void 0?e.push(t):r!==t&&(t.then(cs,cs),t=r),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Gm(e),e;default:if(typeof t.status=="string")t.then(cs,cs);else{if(e=yt,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=i}},function(i){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Gm(e),e}throw Ao=t,Oo}}var Ao=null;function Vm(){if(Ao===null)throw Error(o(459));var e=Ao;return Ao=null,e}function Gm(e){if(e===Oo||e===ss)throw Error(o(483))}var Ha=!1;function Uu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Pu(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 Ba(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function $a(e,t,r){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(ct&2)!==0){var u=i.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),i.pending=t,t=ts(e),Tm(e,null,r),t}return es(e,i,t,r),ts(e)}function To(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,Er(e,r)}}function Hu(e,t){var r=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,r===i)){var u=null,p=null;if(r=r.firstBaseUpdate,r!==null){do{var x={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};p===null?u=p=x:p=p.next=x,r=r.next}while(r!==null);p===null?u=p=t:p=p.next=t}else u=p=t;r={baseState:i.baseState,firstBaseUpdate:u,lastBaseUpdate:p,shared:i.shared,callbacks:i.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}var Bu=!1;function Mo(){if(Bu){var e=bl;if(e!==null)throw e}}function Do(e,t,r,i){Bu=!1;var u=e.updateQueue;Ha=!1;var p=u.firstBaseUpdate,x=u.lastBaseUpdate,_=u.shared.pending;if(_!==null){u.shared.pending=null;var L=_,G=L.next;L.next=null,x===null?p=G:x.next=G,x=L;var re=e.alternate;re!==null&&(re=re.updateQueue,_=re.lastBaseUpdate,_!==x&&(_===null?re.firstBaseUpdate=G:_.next=G,re.lastBaseUpdate=L))}if(p!==null){var ue=u.baseState;x=0,re=G=L=null,_=p;do{var Q=_.lane&-536870913,Z=Q!==_.lane;if(Z?(tt&Q)===Q:(i&Q)===Q){Q!==0&&Q===yl&&(Bu=!0),re!==null&&(re=re.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var Be=e,ke=_;Q=t;var pt=r;switch(ke.tag){case 1:if(Be=ke.payload,typeof Be=="function"){ue=Be.call(pt,ue,Q);break e}ue=Be;break e;case 3:Be.flags=Be.flags&-65537|128;case 0:if(Be=ke.payload,Q=typeof Be=="function"?Be.call(pt,ue,Q):Be,Q==null)break e;ue=v({},ue,Q);break e;case 2:Ha=!0}}Q=_.callback,Q!==null&&(e.flags|=64,Z&&(e.flags|=8192),Z=u.callbacks,Z===null?u.callbacks=[Q]:Z.push(Q))}else Z={lane:Q,tag:_.tag,payload:_.payload,callback:_.callback,next:null},re===null?(G=re=Z,L=ue):re=re.next=Z,x|=Q;if(_=_.next,_===null){if(_=u.shared.pending,_===null)break;Z=_,_=Z.next,Z.next=null,u.lastBaseUpdate=Z,u.shared.pending=null}}while(!0);re===null&&(L=ue),u.baseState=L,u.firstBaseUpdate=G,u.lastBaseUpdate=re,p===null&&(u.shared.lanes=0),Xa|=x,e.lanes=x,e.memoizedState=ue}}function Ym(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Km(e,t){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)Ym(r[e],t)}var xl=Y(null),us=Y(0);function Im(e,t){e=Sa,K(us,e),K(xl,t),Sa=e|t.baseLanes}function $u(){K(us,Sa),K(xl,xl.current)}function qu(){Sa=us.current,H(xl),H(us)}var qa=0,Ke=null,ht=null,Tt=null,fs=!1,wl=!1,Ur=!1,ds=0,Lo=0,Sl=null,Nw=0;function Rt(){throw Error(o(321))}function Fu(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!on(e[r],t[r]))return!1;return!0}function Vu(e,t,r,i,u,p){return qa=p,Ke=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,O.H=e===null||e.memoizedState===null?Tp:Mp,Ur=!1,p=r(i,u),Ur=!1,wl&&(p=Qm(t,r,i,u)),Xm(e),p}function Xm(e){O.H=ys;var t=ht!==null&&ht.next!==null;if(qa=0,Tt=ht=Ke=null,fs=!1,Lo=0,Sl=null,t)throw Error(o(300));e===null||zt||(e=e.dependencies,e!==null&&ls(e)&&(zt=!0))}function Qm(e,t,r,i){Ke=e;var u=0;do{if(wl&&(Sl=null),Lo=0,wl=!1,25<=u)throw Error(o(301));if(u+=1,Tt=ht=null,e.updateQueue!=null){var p=e.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}O.H=Mw,p=t(r,i)}while(wl);return p}function Cw(){var e=O.H,t=e.useState()[0];return t=typeof t.then=="function"?ko(t):t,e=e.useState()[0],(ht!==null?ht.memoizedState:null)!==e&&(Ke.flags|=1024),t}function Gu(){var e=ds!==0;return ds=0,e}function Yu(e,t,r){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r}function Ku(e){if(fs){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}fs=!1}qa=0,Tt=ht=Ke=null,wl=!1,Lo=ds=0,Sl=null}function en(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Tt===null?Ke.memoizedState=Tt=e:Tt=Tt.next=e,Tt}function Mt(){if(ht===null){var e=Ke.alternate;e=e!==null?e.memoizedState:null}else e=ht.next;var t=Tt===null?Ke.memoizedState:Tt.next;if(t!==null)Tt=t,ht=e;else{if(e===null)throw Ke.alternate===null?Error(o(467)):Error(o(310));ht=e,e={memoizedState:ht.memoizedState,baseState:ht.baseState,baseQueue:ht.baseQueue,queue:ht.queue,next:null},Tt===null?Ke.memoizedState=Tt=e:Tt=Tt.next=e}return Tt}function Iu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ko(e){var t=Lo;return Lo+=1,Sl===null&&(Sl=[]),e=Fm(Sl,e,t),t=Ke,(Tt===null?t.memoizedState:Tt.next)===null&&(t=t.alternate,O.H=t===null||t.memoizedState===null?Tp:Mp),e}function hs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ko(e);if(e.$$typeof===T)return Kt(e)}throw Error(o(438,String(e)))}function Xu(e){var t=null,r=Ke.updateQueue;if(r!==null&&(t=r.memoCache),t==null){var i=Ke.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),r===null&&(r=Iu(),Ke.updateQueue=r),r.memoCache=t,r=t.data[t.index],r===void 0)for(r=t.data[t.index]=Array(e),i=0;i<e;i++)r[i]=ne;return t.index++,r}function ga(e,t){return typeof t=="function"?t(e):t}function ms(e){var t=Mt();return Qu(t,ht,e)}function Qu(e,t,r){var i=e.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=r;var u=e.baseQueue,p=i.pending;if(p!==null){if(u!==null){var x=u.next;u.next=p.next,p.next=x}t.baseQueue=u=p,i.pending=null}if(p=e.baseState,u===null)e.memoizedState=p;else{t=u.next;var _=x=null,L=null,G=t,re=!1;do{var ue=G.lane&-536870913;if(ue!==G.lane?(tt&ue)===ue:(qa&ue)===ue){var Q=G.revertLane;if(Q===0)L!==null&&(L=L.next={lane:0,revertLane:0,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),ue===yl&&(re=!0);else if((qa&Q)===Q){G=G.next,Q===yl&&(re=!0);continue}else ue={lane:0,revertLane:G.revertLane,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},L===null?(_=L=ue,x=p):L=L.next=ue,Ke.lanes|=Q,Xa|=Q;ue=G.action,Ur&&r(p,ue),p=G.hasEagerState?G.eagerState:r(p,ue)}else Q={lane:ue,revertLane:G.revertLane,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},L===null?(_=L=Q,x=p):L=L.next=Q,Ke.lanes|=ue,Xa|=ue;G=G.next}while(G!==null&&G!==t);if(L===null?x=p:L.next=_,!on(p,e.memoizedState)&&(zt=!0,re&&(r=bl,r!==null)))throw r;e.memoizedState=p,e.baseState=x,e.baseQueue=L,i.lastRenderedState=p}return u===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function Zu(e){var t=Mt(),r=t.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=e;var i=r.dispatch,u=r.pending,p=t.memoizedState;if(u!==null){r.pending=null;var x=u=u.next;do p=e(p,x.action),x=x.next;while(x!==u);on(p,t.memoizedState)||(zt=!0),t.memoizedState=p,t.baseQueue===null&&(t.baseState=p),r.lastRenderedState=p}return[p,i]}function Zm(e,t,r){var i=Ke,u=Mt(),p=rt;if(p){if(r===void 0)throw Error(o(407));r=r()}else r=t();var x=!on((ht||u).memoizedState,r);x&&(u.memoizedState=r,zt=!0),u=u.queue;var _=ep.bind(null,i,u,e);if(zo(2048,8,_,[e]),u.getSnapshot!==t||x||Tt!==null&&Tt.memoizedState.tag&1){if(i.flags|=2048,_l(9,ps(),Wm.bind(null,i,u,r,t),null),yt===null)throw Error(o(349));p||(qa&124)!==0||Jm(i,t,r)}return r}function Jm(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Ke.updateQueue,t===null?(t=Iu(),Ke.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Wm(e,t,r,i){t.value=r,t.getSnapshot=i,tp(t)&&np(e)}function ep(e,t,r){return r(function(){tp(t)&&np(e)})}function tp(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!on(e,r)}catch{return!0}}function np(e){var t=ml(e,2);t!==null&&hn(t,e,2)}function Ju(e){var t=en();if(typeof e=="function"){var r=e;if(e=r(),Ur){Dn(!0);try{r()}finally{Dn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:e},t}function ap(e,t,r,i){return e.baseState=r,Qu(e,ht,typeof i=="function"?i:ga)}function jw(e,t,r,i,u){if(vs(e))throw Error(o(485));if(e=t.action,e!==null){var p={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){p.listeners.push(x)}};O.T!==null?r(!0):p.isTransition=!1,i(p),r=t.pending,r===null?(p.next=t.pending=p,rp(t,p)):(p.next=r.next,t.pending=r.next=p)}}function rp(e,t){var r=t.action,i=t.payload,u=e.state;if(t.isTransition){var p=O.T,x={};O.T=x;try{var _=r(u,i),L=O.S;L!==null&&L(x,_),lp(e,t,_)}catch(G){Wu(e,t,G)}finally{O.T=p}}else try{p=r(u,i),lp(e,t,p)}catch(G){Wu(e,t,G)}}function lp(e,t,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(i){op(e,t,i)},function(i){return Wu(e,t,i)}):op(e,t,r)}function op(e,t,r){t.status="fulfilled",t.value=r,ip(t),e.state=r,t=e.pending,t!==null&&(r=t.next,r===t?e.pending=null:(r=r.next,t.next=r,rp(e,r)))}function Wu(e,t,r){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=r,ip(t),t=t.next;while(t!==i)}e.action=null}function ip(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function sp(e,t){return t}function cp(e,t){if(rt){var r=yt.formState;if(r!==null){e:{var i=Ke;if(rt){if(Nt){t:{for(var u=Nt,p=Gn;u.nodeType!==8;){if(!p){u=null;break t}if(u=zn(u.nextSibling),u===null){u=null;break t}}p=u.data,u=p==="F!"||p==="F"?u:null}if(u){Nt=zn(u.nextSibling),i=u.data==="F!";break e}}Dr(i)}i=!1}i&&(t=r[0])}}return r=en(),r.memoizedState=r.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sp,lastRenderedState:t},r.queue=i,r=Rp.bind(null,Ke,i),i.dispatch=r,i=Ju(!1),p=rf.bind(null,Ke,!1,i.queue),i=en(),u={state:t,dispatch:null,action:e,pending:null},i.queue=u,r=jw.bind(null,Ke,u,p,r),u.dispatch=r,i.memoizedState=e,[t,r,!1]}function up(e){var t=Mt();return fp(t,ht,e)}function fp(e,t,r){if(t=Qu(e,t,sp)[0],e=ms(ga)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=ko(t)}catch(x){throw x===Oo?ss:x}else i=t;t=Mt();var u=t.queue,p=u.dispatch;return r!==t.memoizedState&&(Ke.flags|=2048,_l(9,ps(),Rw.bind(null,u,r),null)),[i,p,e]}function Rw(e,t){e.action=t}function dp(e){var t=Mt(),r=ht;if(r!==null)return fp(t,r,e);Mt(),t=t.memoizedState,r=Mt();var i=r.queue.dispatch;return r.memoizedState=e,[t,i,!1]}function _l(e,t,r,i){return e={tag:e,create:r,deps:i,inst:t,next:null},t=Ke.updateQueue,t===null&&(t=Iu(),Ke.updateQueue=t),r=t.lastEffect,r===null?t.lastEffect=e.next=e:(i=r.next,r.next=e,e.next=i,t.lastEffect=e),e}function ps(){return{destroy:void 0,resource:void 0}}function hp(){return Mt().memoizedState}function gs(e,t,r,i){var u=en();i=i===void 0?null:i,Ke.flags|=e,u.memoizedState=_l(1|t,ps(),r,i)}function zo(e,t,r,i){var u=Mt();i=i===void 0?null:i;var p=u.memoizedState.inst;ht!==null&&i!==null&&Fu(i,ht.memoizedState.deps)?u.memoizedState=_l(t,p,r,i):(Ke.flags|=e,u.memoizedState=_l(1|t,p,r,i))}function mp(e,t){gs(8390656,8,e,t)}function pp(e,t){zo(2048,8,e,t)}function gp(e,t){return zo(4,2,e,t)}function vp(e,t){return zo(4,4,e,t)}function yp(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 bp(e,t,r){r=r!=null?r.concat([e]):null,zo(4,4,yp.bind(null,t,e),r)}function ef(){}function xp(e,t){var r=Mt();t=t===void 0?null:t;var i=r.memoizedState;return t!==null&&Fu(t,i[1])?i[0]:(r.memoizedState=[e,t],e)}function wp(e,t){var r=Mt();t=t===void 0?null:t;var i=r.memoizedState;if(t!==null&&Fu(t,i[1]))return i[0];if(i=e(),Ur){Dn(!0);try{e()}finally{Dn(!1)}}return r.memoizedState=[i,t],i}function tf(e,t,r){return r===void 0||(qa&1073741824)!==0?e.memoizedState=t:(e.memoizedState=r,e=Eg(),Ke.lanes|=e,Xa|=e,r)}function Sp(e,t,r,i){return on(r,t)?r:xl.current!==null?(e=tf(e,r,i),on(e,t)||(zt=!0),e):(qa&42)===0?(zt=!0,e.memoizedState=r):(e=Eg(),Ke.lanes|=e,Xa|=e,t)}function _p(e,t,r,i,u){var p=I.p;I.p=p!==0&&8>p?p:8;var x=O.T,_={};O.T=_,rf(e,!1,t,r);try{var L=u(),G=O.S;if(G!==null&&G(_,L),L!==null&&typeof L=="object"&&typeof L.then=="function"){var re=Ew(L,i);Uo(e,t,re,dn(e))}else Uo(e,t,i,dn(e))}catch(ue){Uo(e,t,{then:function(){},status:"rejected",reason:ue},dn())}finally{I.p=p,O.T=x}}function Ow(){}function nf(e,t,r,i){if(e.tag!==5)throw Error(o(476));var u=Ep(e).queue;_p(e,u,t,q,r===null?Ow:function(){return Np(e),r(i)})}function Ep(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:ga,lastRenderedState:q},next:null};var r={};return t.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:r},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Np(e){var t=Ep(e).next.queue;Uo(e,t,{},dn())}function af(){return Kt(ti)}function Cp(){return Mt().memoizedState}function jp(){return Mt().memoizedState}function Aw(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var r=dn();e=Ba(r);var i=$a(t,e,r);i!==null&&(hn(i,t,r),To(i,t,r)),t={cache:Du()},e.payload=t;return}t=t.return}}function Tw(e,t,r){var i=dn();r={lane:i,revertLane:0,action:r,hasEagerState:!1,eagerState:null,next:null},vs(e)?Op(t,r):(r=_u(e,t,r,i),r!==null&&(hn(r,e,i),Ap(r,t,i)))}function Rp(e,t,r){var i=dn();Uo(e,t,r,i)}function Uo(e,t,r,i){var u={lane:i,revertLane:0,action:r,hasEagerState:!1,eagerState:null,next:null};if(vs(e))Op(t,u);else{var p=e.alternate;if(e.lanes===0&&(p===null||p.lanes===0)&&(p=t.lastRenderedReducer,p!==null))try{var x=t.lastRenderedState,_=p(x,r);if(u.hasEagerState=!0,u.eagerState=_,on(_,x))return es(e,t,u,0),yt===null&&Wi(),!1}catch{}finally{}if(r=_u(e,t,u,i),r!==null)return hn(r,e,i),Ap(r,t,i),!0}return!1}function rf(e,t,r,i){if(i={lane:2,revertLane:Uf(),action:i,hasEagerState:!1,eagerState:null,next:null},vs(e)){if(t)throw Error(o(479))}else t=_u(e,r,i,2),t!==null&&hn(t,e,2)}function vs(e){var t=e.alternate;return e===Ke||t!==null&&t===Ke}function Op(e,t){wl=fs=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Ap(e,t,r){if((r&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,Er(e,r)}}var ys={readContext:Kt,use:hs,useCallback:Rt,useContext:Rt,useEffect:Rt,useImperativeHandle:Rt,useLayoutEffect:Rt,useInsertionEffect:Rt,useMemo:Rt,useReducer:Rt,useRef:Rt,useState:Rt,useDebugValue:Rt,useDeferredValue:Rt,useTransition:Rt,useSyncExternalStore:Rt,useId:Rt,useHostTransitionStatus:Rt,useFormState:Rt,useActionState:Rt,useOptimistic:Rt,useMemoCache:Rt,useCacheRefresh:Rt},Tp={readContext:Kt,use:hs,useCallback:function(e,t){return en().memoizedState=[e,t===void 0?null:t],e},useContext:Kt,useEffect:mp,useImperativeHandle:function(e,t,r){r=r!=null?r.concat([e]):null,gs(4194308,4,yp.bind(null,t,e),r)},useLayoutEffect:function(e,t){return gs(4194308,4,e,t)},useInsertionEffect:function(e,t){gs(4,2,e,t)},useMemo:function(e,t){var r=en();t=t===void 0?null:t;var i=e();if(Ur){Dn(!0);try{e()}finally{Dn(!1)}}return r.memoizedState=[i,t],i},useReducer:function(e,t,r){var i=en();if(r!==void 0){var u=r(t);if(Ur){Dn(!0);try{r(t)}finally{Dn(!1)}}}else u=t;return i.memoizedState=i.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},i.queue=e,e=e.dispatch=Tw.bind(null,Ke,e),[i.memoizedState,e]},useRef:function(e){var t=en();return e={current:e},t.memoizedState=e},useState:function(e){e=Ju(e);var t=e.queue,r=Rp.bind(null,Ke,t);return t.dispatch=r,[e.memoizedState,r]},useDebugValue:ef,useDeferredValue:function(e,t){var r=en();return tf(r,e,t)},useTransition:function(){var e=Ju(!1);return e=_p.bind(null,Ke,e.queue,!0,!1),en().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,r){var i=Ke,u=en();if(rt){if(r===void 0)throw Error(o(407));r=r()}else{if(r=t(),yt===null)throw Error(o(349));(tt&124)!==0||Jm(i,t,r)}u.memoizedState=r;var p={value:r,getSnapshot:t};return u.queue=p,mp(ep.bind(null,i,p,e),[e]),i.flags|=2048,_l(9,ps(),Wm.bind(null,i,p,r,t),null),r},useId:function(){var e=en(),t=yt.identifierPrefix;if(rt){var r=ha,i=da;r=(i&~(1<<32-Bt(i)-1)).toString(32)+r,t="«"+t+"R"+r,r=ds++,0<r&&(t+="H"+r.toString(32)),t+="»"}else r=Nw++,t="«"+t+"r"+r.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:af,useFormState:cp,useActionState:cp,useOptimistic:function(e){var t=en();t.memoizedState=t.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=r,t=rf.bind(null,Ke,!0,r),r.dispatch=t,[e,t]},useMemoCache:Xu,useCacheRefresh:function(){return en().memoizedState=Aw.bind(null,Ke)}},Mp={readContext:Kt,use:hs,useCallback:xp,useContext:Kt,useEffect:pp,useImperativeHandle:bp,useInsertionEffect:gp,useLayoutEffect:vp,useMemo:wp,useReducer:ms,useRef:hp,useState:function(){return ms(ga)},useDebugValue:ef,useDeferredValue:function(e,t){var r=Mt();return Sp(r,ht.memoizedState,e,t)},useTransition:function(){var e=ms(ga)[0],t=Mt().memoizedState;return[typeof e=="boolean"?e:ko(e),t]},useSyncExternalStore:Zm,useId:Cp,useHostTransitionStatus:af,useFormState:up,useActionState:up,useOptimistic:function(e,t){var r=Mt();return ap(r,ht,e,t)},useMemoCache:Xu,useCacheRefresh:jp},Mw={readContext:Kt,use:hs,useCallback:xp,useContext:Kt,useEffect:pp,useImperativeHandle:bp,useInsertionEffect:gp,useLayoutEffect:vp,useMemo:wp,useReducer:Zu,useRef:hp,useState:function(){return Zu(ga)},useDebugValue:ef,useDeferredValue:function(e,t){var r=Mt();return ht===null?tf(r,e,t):Sp(r,ht.memoizedState,e,t)},useTransition:function(){var e=Zu(ga)[0],t=Mt().memoizedState;return[typeof e=="boolean"?e:ko(e),t]},useSyncExternalStore:Zm,useId:Cp,useHostTransitionStatus:af,useFormState:dp,useActionState:dp,useOptimistic:function(e,t){var r=Mt();return ht!==null?ap(r,ht,e,t):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:Xu,useCacheRefresh:jp},El=null,Po=0;function bs(e){var t=Po;return Po+=1,El===null&&(El=[]),Fm(El,e,t)}function Ho(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function xs(e,t){throw t.$$typeof===b?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Dp(e){var t=e._init;return t(e._payload)}function Lp(e){function t($,P){if(e){var V=$.deletions;V===null?($.deletions=[P],$.flags|=16):V.push(P)}}function r($,P){if(!e)return null;for(;P!==null;)t($,P),P=P.sibling;return null}function i($){for(var P=new Map;$!==null;)$.key!==null?P.set($.key,$):P.set($.index,$),$=$.sibling;return P}function u($,P){return $=fa($,P),$.index=0,$.sibling=null,$}function p($,P,V){return $.index=V,e?(V=$.alternate,V!==null?(V=V.index,V<P?($.flags|=67108866,P):V):($.flags|=67108866,P)):($.flags|=1048576,P)}function x($){return e&&$.alternate===null&&($.flags|=67108866),$}function _($,P,V,se){return P===null||P.tag!==6?(P=Nu(V,$.mode,se),P.return=$,P):(P=u(P,V),P.return=$,P)}function L($,P,V,se){var Se=V.type;return Se===N?re($,P,V.props.children,se,V.key):P!==null&&(P.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===B&&Dp(Se)===P.type)?(P=u(P,V.props),Ho(P,V),P.return=$,P):(P=ns(V.type,V.key,V.props,null,$.mode,se),Ho(P,V),P.return=$,P)}function G($,P,V,se){return P===null||P.tag!==4||P.stateNode.containerInfo!==V.containerInfo||P.stateNode.implementation!==V.implementation?(P=Cu(V,$.mode,se),P.return=$,P):(P=u(P,V.children||[]),P.return=$,P)}function re($,P,V,se,Se){return P===null||P.tag!==7?(P=Or(V,$.mode,se,Se),P.return=$,P):(P=u(P,V),P.return=$,P)}function ue($,P,V){if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return P=Nu(""+P,$.mode,V),P.return=$,P;if(typeof P=="object"&&P!==null){switch(P.$$typeof){case w:return V=ns(P.type,P.key,P.props,null,$.mode,V),Ho(V,P),V.return=$,V;case S:return P=Cu(P,$.mode,V),P.return=$,P;case B:var se=P._init;return P=se(P._payload),ue($,P,V)}if(te(P)||ie(P))return P=Or(P,$.mode,V,null),P.return=$,P;if(typeof P.then=="function")return ue($,bs(P),V);if(P.$$typeof===T)return ue($,os($,P),V);xs($,P)}return null}function Q($,P,V,se){var Se=P!==null?P.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return Se!==null?null:_($,P,""+V,se);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case w:return V.key===Se?L($,P,V,se):null;case S:return V.key===Se?G($,P,V,se):null;case B:return Se=V._init,V=Se(V._payload),Q($,P,V,se)}if(te(V)||ie(V))return Se!==null?null:re($,P,V,se,null);if(typeof V.then=="function")return Q($,P,bs(V),se);if(V.$$typeof===T)return Q($,P,os($,V),se);xs($,V)}return null}function Z($,P,V,se,Se){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return $=$.get(V)||null,_(P,$,""+se,Se);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case w:return $=$.get(se.key===null?V:se.key)||null,L(P,$,se,Se);case S:return $=$.get(se.key===null?V:se.key)||null,G(P,$,se,Se);case B:var Qe=se._init;return se=Qe(se._payload),Z($,P,V,se,Se)}if(te(se)||ie(se))return $=$.get(V)||null,re(P,$,se,Se,null);if(typeof se.then=="function")return Z($,P,V,bs(se),Se);if(se.$$typeof===T)return Z($,P,V,os(P,se),Se);xs(P,se)}return null}function Be($,P,V,se){for(var Se=null,Qe=null,Ae=P,Ue=P=0,Pt=null;Ae!==null&&Ue<V.length;Ue++){Ae.index>Ue?(Pt=Ae,Ae=null):Pt=Ae.sibling;var at=Q($,Ae,V[Ue],se);if(at===null){Ae===null&&(Ae=Pt);break}e&&Ae&&at.alternate===null&&t($,Ae),P=p(at,P,Ue),Qe===null?Se=at:Qe.sibling=at,Qe=at,Ae=Pt}if(Ue===V.length)return r($,Ae),rt&&Tr($,Ue),Se;if(Ae===null){for(;Ue<V.length;Ue++)Ae=ue($,V[Ue],se),Ae!==null&&(P=p(Ae,P,Ue),Qe===null?Se=Ae:Qe.sibling=Ae,Qe=Ae);return rt&&Tr($,Ue),Se}for(Ae=i(Ae);Ue<V.length;Ue++)Pt=Z(Ae,$,Ue,V[Ue],se),Pt!==null&&(e&&Pt.alternate!==null&&Ae.delete(Pt.key===null?Ue:Pt.key),P=p(Pt,P,Ue),Qe===null?Se=Pt:Qe.sibling=Pt,Qe=Pt);return e&&Ae.forEach(function(rr){return t($,rr)}),rt&&Tr($,Ue),Se}function ke($,P,V,se){if(V==null)throw Error(o(151));for(var Se=null,Qe=null,Ae=P,Ue=P=0,Pt=null,at=V.next();Ae!==null&&!at.done;Ue++,at=V.next()){Ae.index>Ue?(Pt=Ae,Ae=null):Pt=Ae.sibling;var rr=Q($,Ae,at.value,se);if(rr===null){Ae===null&&(Ae=Pt);break}e&&Ae&&rr.alternate===null&&t($,Ae),P=p(rr,P,Ue),Qe===null?Se=rr:Qe.sibling=rr,Qe=rr,Ae=Pt}if(at.done)return r($,Ae),rt&&Tr($,Ue),Se;if(Ae===null){for(;!at.done;Ue++,at=V.next())at=ue($,at.value,se),at!==null&&(P=p(at,P,Ue),Qe===null?Se=at:Qe.sibling=at,Qe=at);return rt&&Tr($,Ue),Se}for(Ae=i(Ae);!at.done;Ue++,at=V.next())at=Z(Ae,$,Ue,at.value,se),at!==null&&(e&&at.alternate!==null&&Ae.delete(at.key===null?Ue:at.key),P=p(at,P,Ue),Qe===null?Se=at:Qe.sibling=at,Qe=at);return e&&Ae.forEach(function(DS){return t($,DS)}),rt&&Tr($,Ue),Se}function pt($,P,V,se){if(typeof V=="object"&&V!==null&&V.type===N&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case w:e:{for(var Se=V.key;P!==null;){if(P.key===Se){if(Se=V.type,Se===N){if(P.tag===7){r($,P.sibling),se=u(P,V.props.children),se.return=$,$=se;break e}}else if(P.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===B&&Dp(Se)===P.type){r($,P.sibling),se=u(P,V.props),Ho(se,V),se.return=$,$=se;break e}r($,P);break}else t($,P);P=P.sibling}V.type===N?(se=Or(V.props.children,$.mode,se,V.key),se.return=$,$=se):(se=ns(V.type,V.key,V.props,null,$.mode,se),Ho(se,V),se.return=$,$=se)}return x($);case S:e:{for(Se=V.key;P!==null;){if(P.key===Se)if(P.tag===4&&P.stateNode.containerInfo===V.containerInfo&&P.stateNode.implementation===V.implementation){r($,P.sibling),se=u(P,V.children||[]),se.return=$,$=se;break e}else{r($,P);break}else t($,P);P=P.sibling}se=Cu(V,$.mode,se),se.return=$,$=se}return x($);case B:return Se=V._init,V=Se(V._payload),pt($,P,V,se)}if(te(V))return Be($,P,V,se);if(ie(V)){if(Se=ie(V),typeof Se!="function")throw Error(o(150));return V=Se.call(V),ke($,P,V,se)}if(typeof V.then=="function")return pt($,P,bs(V),se);if(V.$$typeof===T)return pt($,P,os($,V),se);xs($,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(V=""+V,P!==null&&P.tag===6?(r($,P.sibling),se=u(P,V),se.return=$,$=se):(r($,P),se=Nu(V,$.mode,se),se.return=$,$=se),x($)):r($,P)}return function($,P,V,se){try{Po=0;var Se=pt($,P,V,se);return El=null,Se}catch(Ae){if(Ae===Oo||Ae===ss)throw Ae;var Qe=sn(29,Ae,null,$.mode);return Qe.lanes=se,Qe.return=$,Qe}finally{}}}var Nl=Lp(!0),kp=Lp(!1),Cn=Y(null),Yn=null;function Fa(e){var t=e.alternate;K(Lt,Lt.current&1),K(Cn,e),Yn===null&&(t===null||xl.current!==null||t.memoizedState!==null)&&(Yn=e)}function zp(e){if(e.tag===22){if(K(Lt,Lt.current),K(Cn,e),Yn===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Yn=e)}}else Va()}function Va(){K(Lt,Lt.current),K(Cn,Cn.current)}function va(e){H(Cn),Yn===e&&(Yn=null),H(Lt)}var Lt=Y(0);function ws(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==="$?"||Xf(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 lf(e,t,r,i){t=e.memoizedState,r=r(i,t),r=r==null?t:v({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var of={enqueueSetState:function(e,t,r){e=e._reactInternals;var i=dn(),u=Ba(i);u.payload=t,r!=null&&(u.callback=r),t=$a(e,u,i),t!==null&&(hn(t,e,i),To(t,e,i))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var i=dn(),u=Ba(i);u.tag=1,u.payload=t,r!=null&&(u.callback=r),t=$a(e,u,i),t!==null&&(hn(t,e,i),To(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=dn(),i=Ba(r);i.tag=2,t!=null&&(i.callback=t),t=$a(e,i,r),t!==null&&(hn(t,e,r),To(t,e,r))}};function Up(e,t,r,i,u,p,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,p,x):t.prototype&&t.prototype.isPureReactComponent?!wo(r,i)||!wo(u,p):!0}function Pp(e,t,r,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,i),t.state!==e&&of.enqueueReplaceState(t,t.state,null)}function Pr(e,t){var r=t;if("ref"in t){r={};for(var i in t)i!=="ref"&&(r[i]=t[i])}if(e=e.defaultProps){r===t&&(r=v({},r));for(var u in e)r[u]===void 0&&(r[u]=e[u])}return r}var Ss=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 Hp(e){Ss(e)}function Bp(e){console.error(e)}function $p(e){Ss(e)}function _s(e,t){try{var r=e.onUncaughtError;r(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function qp(e,t,r){try{var i=e.onCaughtError;i(r.value,{componentStack:r.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function sf(e,t,r){return r=Ba(r),r.tag=3,r.payload={element:null},r.callback=function(){_s(e,t)},r}function Fp(e){return e=Ba(e),e.tag=3,e}function Vp(e,t,r,i){var u=r.type.getDerivedStateFromError;if(typeof u=="function"){var p=i.value;e.payload=function(){return u(p)},e.callback=function(){qp(t,r,i)}}var x=r.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){qp(t,r,i),typeof u!="function"&&(Qa===null?Qa=new Set([this]):Qa.add(this));var _=i.stack;this.componentDidCatch(i.value,{componentStack:_!==null?_:""})})}function Dw(e,t,r,i,u){if(r.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=r.alternate,t!==null&&Co(t,r,u,!0),r=Cn.current,r!==null){switch(r.tag){case 13:return Yn===null?Mf():r.alternate===null&&Ct===0&&(Ct=3),r.flags&=-257,r.flags|=65536,r.lanes=u,i===zu?r.flags|=16384:(t=r.updateQueue,t===null?r.updateQueue=new Set([i]):t.add(i),Lf(e,i,u)),!1;case 22:return r.flags|=65536,i===zu?r.flags|=16384:(t=r.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},r.updateQueue=t):(r=t.retryQueue,r===null?t.retryQueue=new Set([i]):r.add(i)),Lf(e,i,u)),!1}throw Error(o(435,r.tag))}return Lf(e,i,u),Mf(),!1}if(rt)return t=Cn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,i!==Ou&&(e=Error(o(422),{cause:i}),No(Sn(e,r)))):(i!==Ou&&(t=Error(o(423),{cause:i}),No(Sn(t,r))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,i=Sn(i,r),u=sf(e.stateNode,i,u),Hu(e,u),Ct!==4&&(Ct=2)),!1;var p=Error(o(520),{cause:i});if(p=Sn(p,r),Yo===null?Yo=[p]:Yo.push(p),Ct!==4&&(Ct=2),t===null)return!0;i=Sn(i,r),r=t;do{switch(r.tag){case 3:return r.flags|=65536,e=u&-u,r.lanes|=e,e=sf(r.stateNode,i,e),Hu(r,e),!1;case 1:if(t=r.type,p=r.stateNode,(r.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(Qa===null||!Qa.has(p))))return r.flags|=65536,u&=-u,r.lanes|=u,u=Fp(u),Vp(u,e,r,i),Hu(r,u),!1}r=r.return}while(r!==null);return!1}var Gp=Error(o(461)),zt=!1;function $t(e,t,r,i){t.child=e===null?kp(t,null,r,i):Nl(t,e.child,r,i)}function Yp(e,t,r,i,u){r=r.render;var p=t.ref;if("ref"in i){var x={};for(var _ in i)_!=="ref"&&(x[_]=i[_])}else x=i;return kr(t),i=Vu(e,t,r,x,p,u),_=Gu(),e!==null&&!zt?(Yu(e,t,u),ya(e,t,u)):(rt&&_&&ju(t),t.flags|=1,$t(e,t,i,u),t.child)}function Kp(e,t,r,i,u){if(e===null){var p=r.type;return typeof p=="function"&&!Eu(p)&&p.defaultProps===void 0&&r.compare===null?(t.tag=15,t.type=p,Ip(e,t,p,i,u)):(e=ns(r.type,null,i,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(p=e.child,!gf(e,u)){var x=p.memoizedProps;if(r=r.compare,r=r!==null?r:wo,r(x,i)&&e.ref===t.ref)return ya(e,t,u)}return t.flags|=1,e=fa(p,i),e.ref=t.ref,e.return=t,t.child=e}function Ip(e,t,r,i,u){if(e!==null){var p=e.memoizedProps;if(wo(p,i)&&e.ref===t.ref)if(zt=!1,t.pendingProps=i=p,gf(e,u))(e.flags&131072)!==0&&(zt=!0);else return t.lanes=e.lanes,ya(e,t,u)}return cf(e,t,r,i,u)}function Xp(e,t,r){var i=t.pendingProps,u=i.children,p=e!==null?e.memoizedState:null;if(i.mode==="hidden"){if((t.flags&128)!==0){if(i=p!==null?p.baseLanes|r:r,e!==null){for(u=t.child=e.child,p=0;u!==null;)p=p|u.lanes|u.childLanes,u=u.sibling;t.childLanes=p&~i}else t.childLanes=0,t.child=null;return Qp(e,t,i,r)}if((r&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&is(t,p!==null?p.cachePool:null),p!==null?Im(t,p):$u(),zp(t);else return t.lanes=t.childLanes=536870912,Qp(e,t,p!==null?p.baseLanes|r:r,r)}else p!==null?(is(t,p.cachePool),Im(t,p),Va(),t.memoizedState=null):(e!==null&&is(t,null),$u(),Va());return $t(e,t,u,r),t.child}function Qp(e,t,r,i){var u=ku();return u=u===null?null:{parent:Dt._currentValue,pool:u},t.memoizedState={baseLanes:r,cachePool:u},e!==null&&is(t,null),$u(),zp(t),e!==null&&Co(e,t,i,!0),null}function Es(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(o(284));(e===null||e.ref!==r)&&(t.flags|=4194816)}}function cf(e,t,r,i,u){return kr(t),r=Vu(e,t,r,i,void 0,u),i=Gu(),e!==null&&!zt?(Yu(e,t,u),ya(e,t,u)):(rt&&i&&ju(t),t.flags|=1,$t(e,t,r,u),t.child)}function Zp(e,t,r,i,u,p){return kr(t),t.updateQueue=null,r=Qm(t,i,r,u),Xm(e),i=Gu(),e!==null&&!zt?(Yu(e,t,p),ya(e,t,p)):(rt&&i&&ju(t),t.flags|=1,$t(e,t,r,p),t.child)}function Jp(e,t,r,i,u){if(kr(t),t.stateNode===null){var p=pl,x=r.contextType;typeof x=="object"&&x!==null&&(p=Kt(x)),p=new r(i,p),t.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=of,t.stateNode=p,p._reactInternals=t,p=t.stateNode,p.props=i,p.state=t.memoizedState,p.refs={},Uu(t),x=r.contextType,p.context=typeof x=="object"&&x!==null?Kt(x):pl,p.state=t.memoizedState,x=r.getDerivedStateFromProps,typeof x=="function"&&(lf(t,r,x,i),p.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(x=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),x!==p.state&&of.enqueueReplaceState(p,p.state,null),Do(t,i,p,u),Mo(),p.state=t.memoizedState),typeof p.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){p=t.stateNode;var _=t.memoizedProps,L=Pr(r,_);p.props=L;var G=p.context,re=r.contextType;x=pl,typeof re=="object"&&re!==null&&(x=Kt(re));var ue=r.getDerivedStateFromProps;re=typeof ue=="function"||typeof p.getSnapshotBeforeUpdate=="function",_=t.pendingProps!==_,re||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(_||G!==x)&&Pp(t,p,i,x),Ha=!1;var Q=t.memoizedState;p.state=Q,Do(t,i,p,u),Mo(),G=t.memoizedState,_||Q!==G||Ha?(typeof ue=="function"&&(lf(t,r,ue,i),G=t.memoizedState),(L=Ha||Up(t,r,L,i,Q,G,x))?(re||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(t.flags|=4194308)):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=G),p.props=i,p.state=G,p.context=x,i=L):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{p=t.stateNode,Pu(e,t),x=t.memoizedProps,re=Pr(r,x),p.props=re,ue=t.pendingProps,Q=p.context,G=r.contextType,L=pl,typeof G=="object"&&G!==null&&(L=Kt(G)),_=r.getDerivedStateFromProps,(G=typeof _=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(x!==ue||Q!==L)&&Pp(t,p,i,L),Ha=!1,Q=t.memoizedState,p.state=Q,Do(t,i,p,u),Mo();var Z=t.memoizedState;x!==ue||Q!==Z||Ha||e!==null&&e.dependencies!==null&&ls(e.dependencies)?(typeof _=="function"&&(lf(t,r,_,i),Z=t.memoizedState),(re=Ha||Up(t,r,re,i,Q,Z,L)||e!==null&&e.dependencies!==null&&ls(e.dependencies))?(G||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(i,Z,L),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(i,Z,L)),typeof p.componentDidUpdate=="function"&&(t.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof p.componentDidUpdate!="function"||x===e.memoizedProps&&Q===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&Q===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=Z),p.props=i,p.state=Z,p.context=L,i=re):(typeof p.componentDidUpdate!="function"||x===e.memoizedProps&&Q===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&Q===e.memoizedState||(t.flags|=1024),i=!1)}return p=i,Es(e,t),i=(t.flags&128)!==0,p||i?(p=t.stateNode,r=i&&typeof r.getDerivedStateFromError!="function"?null:p.render(),t.flags|=1,e!==null&&i?(t.child=Nl(t,e.child,null,u),t.child=Nl(t,null,r,u)):$t(e,t,r,u),t.memoizedState=p.state,e=t.child):e=ya(e,t,u),e}function Wp(e,t,r,i){return Eo(),t.flags|=256,$t(e,t,r,i),t.child}var uf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ff(e){return{baseLanes:e,cachePool:Bm()}}function df(e,t,r){return e=e!==null?e.childLanes&~r:0,t&&(e|=jn),e}function eg(e,t,r){var i=t.pendingProps,u=!1,p=(t.flags&128)!==0,x;if((x=p)||(x=e!==null&&e.memoizedState===null?!1:(Lt.current&2)!==0),x&&(u=!0,t.flags&=-129),x=(t.flags&32)!==0,t.flags&=-33,e===null){if(rt){if(u?Fa(t):Va(),rt){var _=Nt,L;if(L=_){e:{for(L=_,_=Gn;L.nodeType!==8;){if(!_){_=null;break e}if(L=zn(L.nextSibling),L===null){_=null;break e}}_=L}_!==null?(t.memoizedState={dehydrated:_,treeContext:Ar!==null?{id:da,overflow:ha}:null,retryLane:536870912,hydrationErrors:null},L=sn(18,null,null,0),L.stateNode=_,L.return=t,t.child=L,Zt=t,Nt=null,L=!0):L=!1}L||Dr(t)}if(_=t.memoizedState,_!==null&&(_=_.dehydrated,_!==null))return Xf(_)?t.lanes=32:t.lanes=536870912,null;va(t)}return _=i.children,i=i.fallback,u?(Va(),u=t.mode,_=Ns({mode:"hidden",children:_},u),i=Or(i,u,r,null),_.return=t,i.return=t,_.sibling=i,t.child=_,u=t.child,u.memoizedState=ff(r),u.childLanes=df(e,x,r),t.memoizedState=uf,i):(Fa(t),hf(t,_))}if(L=e.memoizedState,L!==null&&(_=L.dehydrated,_!==null)){if(p)t.flags&256?(Fa(t),t.flags&=-257,t=mf(e,t,r)):t.memoizedState!==null?(Va(),t.child=e.child,t.flags|=128,t=null):(Va(),u=i.fallback,_=t.mode,i=Ns({mode:"visible",children:i.children},_),u=Or(u,_,r,null),u.flags|=2,i.return=t,u.return=t,i.sibling=u,t.child=i,Nl(t,e.child,null,r),i=t.child,i.memoizedState=ff(r),i.childLanes=df(e,x,r),t.memoizedState=uf,t=u);else if(Fa(t),Xf(_)){if(x=_.nextSibling&&_.nextSibling.dataset,x)var G=x.dgst;x=G,i=Error(o(419)),i.stack="",i.digest=x,No({value:i,source:null,stack:null}),t=mf(e,t,r)}else if(zt||Co(e,t,r,!1),x=(r&e.childLanes)!==0,zt||x){if(x=yt,x!==null&&(i=r&-r,i=(i&42)!==0?1:fo(i),i=(i&(x.suspendedLanes|r))!==0?0:i,i!==0&&i!==L.retryLane))throw L.retryLane=i,ml(e,i),hn(x,e,i),Gp;_.data==="$?"||Mf(),t=mf(e,t,r)}else _.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=L.treeContext,Nt=zn(_.nextSibling),Zt=t,rt=!0,Mr=null,Gn=!1,e!==null&&(En[Nn++]=da,En[Nn++]=ha,En[Nn++]=Ar,da=e.id,ha=e.overflow,Ar=t),t=hf(t,i.children),t.flags|=4096);return t}return u?(Va(),u=i.fallback,_=t.mode,L=e.child,G=L.sibling,i=fa(L,{mode:"hidden",children:i.children}),i.subtreeFlags=L.subtreeFlags&65011712,G!==null?u=fa(G,u):(u=Or(u,_,r,null),u.flags|=2),u.return=t,i.return=t,i.sibling=u,t.child=i,i=u,u=t.child,_=e.child.memoizedState,_===null?_=ff(r):(L=_.cachePool,L!==null?(G=Dt._currentValue,L=L.parent!==G?{parent:G,pool:G}:L):L=Bm(),_={baseLanes:_.baseLanes|r,cachePool:L}),u.memoizedState=_,u.childLanes=df(e,x,r),t.memoizedState=uf,i):(Fa(t),r=e.child,e=r.sibling,r=fa(r,{mode:"visible",children:i.children}),r.return=t,r.sibling=null,e!==null&&(x=t.deletions,x===null?(t.deletions=[e],t.flags|=16):x.push(e)),t.child=r,t.memoizedState=null,r)}function hf(e,t){return t=Ns({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ns(e,t){return e=sn(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function mf(e,t,r){return Nl(t,e.child,null,r),e=hf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function tg(e,t,r){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Tu(e.return,t,r)}function pf(e,t,r,i,u){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:r,tailMode:u}:(p.isBackwards=t,p.rendering=null,p.renderingStartTime=0,p.last=i,p.tail=r,p.tailMode=u)}function ng(e,t,r){var i=t.pendingProps,u=i.revealOrder,p=i.tail;if($t(e,t,i.children,r),i=Lt.current,(i&2)!==0)i=i&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&&tg(e,r,t);else if(e.tag===19)tg(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}i&=1}switch(K(Lt,i),u){case"forwards":for(r=t.child,u=null;r!==null;)e=r.alternate,e!==null&&ws(e)===null&&(u=r),r=r.sibling;r=u,r===null?(u=t.child,t.child=null):(u=r.sibling,r.sibling=null),pf(t,!1,u,r,p);break;case"backwards":for(r=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&ws(e)===null){t.child=u;break}e=u.sibling,u.sibling=r,r=u,u=e}pf(t,!0,r,null,p);break;case"together":pf(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ya(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Xa|=t.lanes,(r&t.childLanes)===0)if(e!==null){if(Co(e,t,r,!1),(r&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,r=fa(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=fa(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function gf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ls(e)))}function Lw(e,t,r){switch(t.tag){case 3:ze(t,t.stateNode.containerInfo),Pa(t,Dt,e.memoizedState.cache),Eo();break;case 27:case 5:we(t);break;case 4:ze(t,t.stateNode.containerInfo);break;case 10:Pa(t,t.type,t.memoizedProps.value);break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(Fa(t),t.flags|=128,null):(r&t.child.childLanes)!==0?eg(e,t,r):(Fa(t),e=ya(e,t,r),e!==null?e.sibling:null);Fa(t);break;case 19:var u=(e.flags&128)!==0;if(i=(r&t.childLanes)!==0,i||(Co(e,t,r,!1),i=(r&t.childLanes)!==0),u){if(i)return ng(e,t,r);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),K(Lt,Lt.current),i)break;return null;case 22:case 23:return t.lanes=0,Xp(e,t,r);case 24:Pa(t,Dt,e.memoizedState.cache)}return ya(e,t,r)}function ag(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps)zt=!0;else{if(!gf(e,r)&&(t.flags&128)===0)return zt=!1,Lw(e,t,r);zt=(e.flags&131072)!==0}else zt=!1,rt&&(t.flags&1048576)!==0&&Dm(t,rs,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var i=t.elementType,u=i._init;if(i=u(i._payload),t.type=i,typeof i=="function")Eu(i)?(e=Pr(i,e),t.tag=1,t=Jp(null,t,i,e,r)):(t.tag=0,t=cf(null,t,i,e,r));else{if(i!=null){if(u=i.$$typeof,u===k){t.tag=11,t=Yp(null,t,i,e,r);break e}else if(u===U){t.tag=14,t=Kp(null,t,i,e,r);break e}}throw t=X(i)||i,Error(o(306,t,""))}}return t;case 0:return cf(e,t,t.type,t.pendingProps,r);case 1:return i=t.type,u=Pr(i,t.pendingProps),Jp(e,t,i,u,r);case 3:e:{if(ze(t,t.stateNode.containerInfo),e===null)throw Error(o(387));i=t.pendingProps;var p=t.memoizedState;u=p.element,Pu(e,t),Do(t,i,null,r);var x=t.memoizedState;if(i=x.cache,Pa(t,Dt,i),i!==p.cache&&Mu(t,[Dt],r,!0),Mo(),i=x.element,p.isDehydrated)if(p={element:i,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=p,t.memoizedState=p,t.flags&256){t=Wp(e,t,i,r);break e}else if(i!==u){u=Sn(Error(o(424)),t),No(u),t=Wp(e,t,i,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(Nt=zn(e.firstChild),Zt=t,rt=!0,Mr=null,Gn=!0,r=kp(t,null,i,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling}else{if(Eo(),i===u){t=ya(e,t,r);break e}$t(e,t,i,r)}t=t.child}return t;case 26:return Es(e,t),e===null?(r=iv(t.type,null,t.pendingProps,null))?t.memoizedState=r:rt||(r=t.type,e=t.pendingProps,i=Hs(ve.current).createElement(r),i[de]=t,i[pe]=e,Ft(i,r,e),Ve(i),t.stateNode=i):t.memoizedState=iv(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return we(t),e===null&&rt&&(i=t.stateNode=rv(t.type,t.pendingProps,ve.current),Zt=t,Gn=!0,u=Nt,Wa(t.type)?(Qf=u,Nt=zn(i.firstChild)):Nt=u),$t(e,t,t.pendingProps.children,r),Es(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&rt&&((u=i=Nt)&&(i=sS(i,t.type,t.pendingProps,Gn),i!==null?(t.stateNode=i,Zt=t,Nt=zn(i.firstChild),Gn=!1,u=!0):u=!1),u||Dr(t)),we(t),u=t.type,p=t.pendingProps,x=e!==null?e.memoizedProps:null,i=p.children,Yf(u,p)?i=null:x!==null&&Yf(u,x)&&(t.flags|=32),t.memoizedState!==null&&(u=Vu(e,t,Cw,null,null,r),ti._currentValue=u),Es(e,t),$t(e,t,i,r),t.child;case 6:return e===null&&rt&&((e=r=Nt)&&(r=cS(r,t.pendingProps,Gn),r!==null?(t.stateNode=r,Zt=t,Nt=null,e=!0):e=!1),e||Dr(t)),null;case 13:return eg(e,t,r);case 4:return ze(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Nl(t,null,i,r):$t(e,t,i,r),t.child;case 11:return Yp(e,t,t.type,t.pendingProps,r);case 7:return $t(e,t,t.pendingProps,r),t.child;case 8:return $t(e,t,t.pendingProps.children,r),t.child;case 12:return $t(e,t,t.pendingProps.children,r),t.child;case 10:return i=t.pendingProps,Pa(t,t.type,i.value),$t(e,t,i.children,r),t.child;case 9:return u=t.type._context,i=t.pendingProps.children,kr(t),u=Kt(u),i=i(u),t.flags|=1,$t(e,t,i,r),t.child;case 14:return Kp(e,t,t.type,t.pendingProps,r);case 15:return Ip(e,t,t.type,t.pendingProps,r);case 19:return ng(e,t,r);case 31:return i=t.pendingProps,r=t.mode,i={mode:i.mode,children:i.children},e===null?(r=Ns(i,r),r.ref=t.ref,t.child=r,r.return=t,t=r):(r=fa(e.child,i),r.ref=t.ref,t.child=r,r.return=t,t=r),t;case 22:return Xp(e,t,r);case 24:return kr(t),i=Kt(Dt),e===null?(u=ku(),u===null&&(u=yt,p=Du(),u.pooledCache=p,p.refCount++,p!==null&&(u.pooledCacheLanes|=r),u=p),t.memoizedState={parent:i,cache:u},Uu(t),Pa(t,Dt,u)):((e.lanes&r)!==0&&(Pu(e,t),Do(t,null,null,r),Mo()),u=e.memoizedState,p=t.memoizedState,u.parent!==i?(u={parent:i,cache:i},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),Pa(t,Dt,i)):(i=p.cache,Pa(t,Dt,i),i!==u.cache&&Mu(t,[Dt],r,!0))),$t(e,t,t.pendingProps.children,r),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function ba(e){e.flags|=4}function rg(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!dv(t)){if(t=Cn.current,t!==null&&((tt&4194048)===tt?Yn!==null:(tt&62914560)!==tt&&(tt&536870912)===0||t!==Yn))throw Ao=zu,$m;e.flags|=8192}}function Cs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Bi():536870912,e.lanes|=t,Ol|=t)}function Bo(e,t){if(!rt)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 i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function St(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,i=0;if(t)for(var u=e.child;u!==null;)r|=u.lanes|u.childLanes,i|=u.subtreeFlags&65011712,i|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)r|=u.lanes|u.childLanes,i|=u.subtreeFlags,i|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=i,e.childLanes=r,t}function kw(e,t,r){var i=t.pendingProps;switch(Ru(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,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),pa(Dt),ae(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(_o(t)?ba(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,zm())),St(t),null;case 26:return r=t.memoizedState,e===null?(ba(t),r!==null?(St(t),rg(t,r)):(St(t),t.flags&=-16777217)):r?r!==e.memoizedState?(ba(t),St(t),rg(t,r)):(St(t),t.flags&=-16777217):(e.memoizedProps!==i&&ba(t),St(t),t.flags&=-16777217),null;case 27:Pe(t),r=ve.current;var u=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==i&&ba(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return St(t),null}e=le.current,_o(t)?Lm(t):(e=rv(u,i,r),t.stateNode=e,ba(t))}return St(t),null;case 5:if(Pe(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&ba(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return St(t),null}if(e=le.current,_o(t))Lm(t);else{switch(u=Hs(ve.current),e){case 1:e=u.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:e=u.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":e=u.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":e=u.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":e=u.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof i.is=="string"?u.createElement("select",{is:i.is}):u.createElement("select"),i.multiple?e.multiple=!0:i.size&&(e.size=i.size);break;default:e=typeof i.is=="string"?u.createElement(r,{is:i.is}):u.createElement(r)}}e[de]=t,e[pe]=i;e:for(u=t.child;u!==null;){if(u.tag===5||u.tag===6)e.appendChild(u.stateNode);else if(u.tag!==4&&u.tag!==27&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===t)break e;for(;u.sibling===null;){if(u.return===null||u.return===t)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}t.stateNode=e;e:switch(Ft(e,r,i),r){case"button":case"input":case"select":case"textarea":e=!!i.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&ba(t)}}return St(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&ba(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(o(166));if(e=ve.current,_o(t)){if(e=t.stateNode,r=t.memoizedProps,i=null,u=Zt,u!==null)switch(u.tag){case 27:case 5:i=u.memoizedProps}e[de]=t,e=!!(e.nodeValue===r||i!==null&&i.suppressHydrationWarning===!0||Zg(e.nodeValue,r)),e||Dr(t)}else e=Hs(e).createTextNode(i),e[de]=t,t.stateNode=e}return St(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=_o(t),i!==null&&i.dehydrated!==null){if(e===null){if(!u)throw Error(o(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(o(317));u[de]=t}else Eo(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;St(t),u=!1}else u=zm(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(va(t),t):(va(t),null)}if(va(t),(t.flags&128)!==0)return t.lanes=r,t;if(r=i!==null,e=e!==null&&e.memoizedState!==null,r){i=t.child,u=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(u=i.alternate.memoizedState.cachePool.pool);var p=null;i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(p=i.memoizedState.cachePool.pool),p!==u&&(i.flags|=2048)}return r!==e&&r&&(t.child.flags|=8192),Cs(t,t.updateQueue),St(t),null;case 4:return ae(),e===null&&$f(t.stateNode.containerInfo),St(t),null;case 10:return pa(t.type),St(t),null;case 19:if(H(Lt),u=t.memoizedState,u===null)return St(t),null;if(i=(t.flags&128)!==0,p=u.rendering,p===null)if(i)Bo(u,!1);else{if(Ct!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(p=ws(e),p!==null){for(t.flags|=128,Bo(u,!1),e=p.updateQueue,t.updateQueue=e,Cs(t,e),t.subtreeFlags=0,e=r,r=t.child;r!==null;)Mm(r,e),r=r.sibling;return K(Lt,Lt.current&1|2),t.child}e=e.sibling}u.tail!==null&&me()>Os&&(t.flags|=128,i=!0,Bo(u,!1),t.lanes=4194304)}else{if(!i)if(e=ws(p),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Cs(t,e),Bo(u,!0),u.tail===null&&u.tailMode==="hidden"&&!p.alternate&&!rt)return St(t),null}else 2*me()-u.renderingStartTime>Os&&r!==536870912&&(t.flags|=128,i=!0,Bo(u,!1),t.lanes=4194304);u.isBackwards?(p.sibling=t.child,t.child=p):(e=u.last,e!==null?e.sibling=p:t.child=p,u.last=p)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=me(),t.sibling=null,e=Lt.current,K(Lt,i?e&1|2:e&1),t):(St(t),null);case 22:case 23:return va(t),qu(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(r&536870912)!==0&&(t.flags&128)===0&&(St(t),t.subtreeFlags&6&&(t.flags|=8192)):St(t),r=t.updateQueue,r!==null&&Cs(t,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==r&&(t.flags|=2048),e!==null&&H(zr),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),pa(Dt),St(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function zw(e,t){switch(Ru(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return pa(Dt),ae(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Pe(t),null;case 13:if(va(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Eo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(Lt),null;case 4:return ae(),null;case 10:return pa(t.type),null;case 22:case 23:return va(t),qu(),e!==null&&H(zr),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return pa(Dt),null;case 25:return null;default:return null}}function lg(e,t){switch(Ru(t),t.tag){case 3:pa(Dt),ae();break;case 26:case 27:case 5:Pe(t);break;case 4:ae();break;case 13:va(t);break;case 19:H(Lt);break;case 10:pa(t.type);break;case 22:case 23:va(t),qu(),e!==null&&H(zr);break;case 24:pa(Dt)}}function $o(e,t){try{var r=t.updateQueue,i=r!==null?r.lastEffect:null;if(i!==null){var u=i.next;r=u;do{if((r.tag&e)===e){i=void 0;var p=r.create,x=r.inst;i=p(),x.destroy=i}r=r.next}while(r!==u)}}catch(_){gt(t,t.return,_)}}function Ga(e,t,r){try{var i=t.updateQueue,u=i!==null?i.lastEffect:null;if(u!==null){var p=u.next;i=p;do{if((i.tag&e)===e){var x=i.inst,_=x.destroy;if(_!==void 0){x.destroy=void 0,u=t;var L=r,G=_;try{G()}catch(re){gt(u,L,re)}}}i=i.next}while(i!==p)}}catch(re){gt(t,t.return,re)}}function og(e){var t=e.updateQueue;if(t!==null){var r=e.stateNode;try{Km(t,r)}catch(i){gt(e,e.return,i)}}}function ig(e,t,r){r.props=Pr(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(i){gt(e,t,i)}}function qo(e,t){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof r=="function"?e.refCleanup=r(i):r.current=i}}catch(u){gt(e,t,u)}}function Kn(e,t){var r=e.ref,i=e.refCleanup;if(r!==null)if(typeof i=="function")try{i()}catch(u){gt(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(u){gt(e,t,u)}else r.current=null}function sg(e){var t=e.type,r=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":r.autoFocus&&i.focus();break e;case"img":r.src?i.src=r.src:r.srcSet&&(i.srcset=r.srcSet)}}catch(u){gt(e,e.return,u)}}function vf(e,t,r){try{var i=e.stateNode;aS(i,e.type,r,t),i[pe]=t}catch(u){gt(e,e.return,u)}}function cg(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Wa(e.type)||e.tag===4}function yf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||cg(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&&Wa(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 bf(e,t,r){var i=e.tag;if(i===5||i===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=Ps));else if(i!==4&&(i===27&&Wa(e.type)&&(r=e.stateNode,t=null),e=e.child,e!==null))for(bf(e,t,r),e=e.sibling;e!==null;)bf(e,t,r),e=e.sibling}function js(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(i!==4&&(i===27&&Wa(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(js(e,t,r),e=e.sibling;e!==null;)js(e,t,r),e=e.sibling}function ug(e){var t=e.stateNode,r=e.memoizedProps;try{for(var i=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);Ft(t,i,r),t[de]=e,t[pe]=r}catch(p){gt(e,e.return,p)}}var xa=!1,Ot=!1,xf=!1,fg=typeof WeakSet=="function"?WeakSet:Set,Ut=null;function Uw(e,t){if(e=e.containerInfo,Vf=Gs,e=Sm(e),vu(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var u=i.anchorOffset,p=i.focusNode;i=i.focusOffset;try{r.nodeType,p.nodeType}catch{r=null;break e}var x=0,_=-1,L=-1,G=0,re=0,ue=e,Q=null;t:for(;;){for(var Z;ue!==r||u!==0&&ue.nodeType!==3||(_=x+u),ue!==p||i!==0&&ue.nodeType!==3||(L=x+i),ue.nodeType===3&&(x+=ue.nodeValue.length),(Z=ue.firstChild)!==null;)Q=ue,ue=Z;for(;;){if(ue===e)break t;if(Q===r&&++G===u&&(_=x),Q===p&&++re===i&&(L=x),(Z=ue.nextSibling)!==null)break;ue=Q,Q=ue.parentNode}ue=Z}r=_===-1||L===-1?null:{start:_,end:L}}else r=null}r=r||{start:0,end:0}}else r=null;for(Gf={focusedElem:e,selectionRange:r},Gs=!1,Ut=t;Ut!==null;)if(t=Ut,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,Ut=e;else for(;Ut!==null;){switch(t=Ut,p=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&p!==null){e=void 0,r=t,u=p.memoizedProps,p=p.memoizedState,i=r.stateNode;try{var Be=Pr(r.type,u,r.elementType===r.type);e=i.getSnapshotBeforeUpdate(Be,p),i.__reactInternalSnapshotBeforeUpdate=e}catch(ke){gt(r,r.return,ke)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,r=e.nodeType,r===9)If(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":If(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(o(163))}if(e=t.sibling,e!==null){e.return=t.return,Ut=e;break}Ut=t.return}}function dg(e,t,r){var i=r.flags;switch(r.tag){case 0:case 11:case 15:Ya(e,r),i&4&&$o(5,r);break;case 1:if(Ya(e,r),i&4)if(e=r.stateNode,t===null)try{e.componentDidMount()}catch(x){gt(r,r.return,x)}else{var u=Pr(r.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){gt(r,r.return,x)}}i&64&&og(r),i&512&&qo(r,r.return);break;case 3:if(Ya(e,r),i&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{Km(e,t)}catch(x){gt(r,r.return,x)}}break;case 27:t===null&&i&4&&ug(r);case 26:case 5:Ya(e,r),t===null&&i&4&&sg(r),i&512&&qo(r,r.return);break;case 12:Ya(e,r);break;case 13:Ya(e,r),i&4&&pg(e,r),i&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=Yw.bind(null,r),uS(e,r))));break;case 22:if(i=r.memoizedState!==null||xa,!i){t=t!==null&&t.memoizedState!==null||Ot,u=xa;var p=Ot;xa=i,(Ot=t)&&!p?Ka(e,r,(r.subtreeFlags&8772)!==0):Ya(e,r),xa=u,Ot=p}break;case 30:break;default:Ya(e,r)}}function hg(e){var t=e.alternate;t!==null&&(e.alternate=null,hg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Oe(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 bt=null,tn=!1;function wa(e,t,r){for(r=r.child;r!==null;)mg(e,t,r),r=r.sibling}function mg(e,t,r){if(xt&&typeof xt.onCommitFiberUnmount=="function")try{xt.onCommitFiberUnmount(Jt,r)}catch{}switch(r.tag){case 26:Ot||Kn(r,t),wa(e,t,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:Ot||Kn(r,t);var i=bt,u=tn;Wa(r.type)&&(bt=r.stateNode,tn=!1),wa(e,t,r),Zo(r.stateNode),bt=i,tn=u;break;case 5:Ot||Kn(r,t);case 6:if(i=bt,u=tn,bt=null,wa(e,t,r),bt=i,tn=u,bt!==null)if(tn)try{(bt.nodeType===9?bt.body:bt.nodeName==="HTML"?bt.ownerDocument.body:bt).removeChild(r.stateNode)}catch(p){gt(r,t,p)}else try{bt.removeChild(r.stateNode)}catch(p){gt(r,t,p)}break;case 18:bt!==null&&(tn?(e=bt,nv(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),li(e)):nv(bt,r.stateNode));break;case 4:i=bt,u=tn,bt=r.stateNode.containerInfo,tn=!0,wa(e,t,r),bt=i,tn=u;break;case 0:case 11:case 14:case 15:Ot||Ga(2,r,t),Ot||Ga(4,r,t),wa(e,t,r);break;case 1:Ot||(Kn(r,t),i=r.stateNode,typeof i.componentWillUnmount=="function"&&ig(r,t,i)),wa(e,t,r);break;case 21:wa(e,t,r);break;case 22:Ot=(i=Ot)||r.memoizedState!==null,wa(e,t,r),Ot=i;break;default:wa(e,t,r)}}function pg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{li(e)}catch(r){gt(t,t.return,r)}}function Pw(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new fg),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new fg),t;default:throw Error(o(435,e.tag))}}function wf(e,t){var r=Pw(e);t.forEach(function(i){var u=Kw.bind(null,e,i);r.has(i)||(r.add(i),i.then(u,u))})}function cn(e,t){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var u=r[i],p=e,x=t,_=x;e:for(;_!==null;){switch(_.tag){case 27:if(Wa(_.type)){bt=_.stateNode,tn=!1;break e}break;case 5:bt=_.stateNode,tn=!1;break e;case 3:case 4:bt=_.stateNode.containerInfo,tn=!0;break e}_=_.return}if(bt===null)throw Error(o(160));mg(p,x,u),bt=null,tn=!1,p=u.alternate,p!==null&&(p.return=null),u.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)gg(t,e),t=t.sibling}var kn=null;function gg(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:cn(t,e),un(e),i&4&&(Ga(3,e,e.return),$o(3,e),Ga(5,e,e.return));break;case 1:cn(t,e),un(e),i&512&&(Ot||r===null||Kn(r,r.return)),i&64&&xa&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?i:r.concat(i))));break;case 26:var u=kn;if(cn(t,e),un(e),i&512&&(Ot||r===null||Kn(r,r.return)),i&4){var p=r!==null?r.memoizedState:null;if(i=e.memoizedState,r===null)if(i===null)if(e.stateNode===null){e:{i=e.type,r=e.memoizedProps,u=u.ownerDocument||u;t:switch(i){case"title":p=u.getElementsByTagName("title")[0],(!p||p[je]||p[de]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=u.createElement(i),u.head.insertBefore(p,u.querySelector("head > title"))),Ft(p,i,r),p[de]=e,Ve(p),i=p;break e;case"link":var x=uv("link","href",u).get(i+(r.href||""));if(x){for(var _=0;_<x.length;_++)if(p=x[_],p.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&p.getAttribute("rel")===(r.rel==null?null:r.rel)&&p.getAttribute("title")===(r.title==null?null:r.title)&&p.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){x.splice(_,1);break t}}p=u.createElement(i),Ft(p,i,r),u.head.appendChild(p);break;case"meta":if(x=uv("meta","content",u).get(i+(r.content||""))){for(_=0;_<x.length;_++)if(p=x[_],p.getAttribute("content")===(r.content==null?null:""+r.content)&&p.getAttribute("name")===(r.name==null?null:r.name)&&p.getAttribute("property")===(r.property==null?null:r.property)&&p.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&p.getAttribute("charset")===(r.charSet==null?null:r.charSet)){x.splice(_,1);break t}}p=u.createElement(i),Ft(p,i,r),u.head.appendChild(p);break;default:throw Error(o(468,i))}p[de]=e,Ve(p),i=p}e.stateNode=i}else fv(u,e.type,e.stateNode);else e.stateNode=cv(u,i,e.memoizedProps);else p!==i?(p===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):p.count--,i===null?fv(u,e.type,e.stateNode):cv(u,i,e.memoizedProps)):i===null&&e.stateNode!==null&&vf(e,e.memoizedProps,r.memoizedProps)}break;case 27:cn(t,e),un(e),i&512&&(Ot||r===null||Kn(r,r.return)),r!==null&&i&4&&vf(e,e.memoizedProps,r.memoizedProps);break;case 5:if(cn(t,e),un(e),i&512&&(Ot||r===null||Kn(r,r.return)),e.flags&32){u=e.stateNode;try{il(u,"")}catch(Z){gt(e,e.return,Z)}}i&4&&e.stateNode!=null&&(u=e.memoizedProps,vf(e,u,r!==null?r.memoizedProps:u)),i&1024&&(xf=!0);break;case 6:if(cn(t,e),un(e),i&4){if(e.stateNode===null)throw Error(o(162));i=e.memoizedProps,r=e.stateNode;try{r.nodeValue=i}catch(Z){gt(e,e.return,Z)}}break;case 3:if(qs=null,u=kn,kn=Bs(t.containerInfo),cn(t,e),kn=u,un(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{li(t.containerInfo)}catch(Z){gt(e,e.return,Z)}xf&&(xf=!1,vg(e));break;case 4:i=kn,kn=Bs(e.stateNode.containerInfo),cn(t,e),un(e),kn=i;break;case 12:cn(t,e),un(e);break;case 13:cn(t,e),un(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(jf=me()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,wf(e,i)));break;case 22:u=e.memoizedState!==null;var L=r!==null&&r.memoizedState!==null,G=xa,re=Ot;if(xa=G||u,Ot=re||L,cn(t,e),Ot=re,xa=G,un(e),i&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(r===null||L||xa||Ot||Hr(e)),r=null,t=e;;){if(t.tag===5||t.tag===26){if(r===null){L=r=t;try{if(p=L.stateNode,u)x=p.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{_=L.stateNode;var ue=L.memoizedProps.style,Q=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;_.style.display=Q==null||typeof Q=="boolean"?"":(""+Q).trim()}}catch(Z){gt(L,L.return,Z)}}}else if(t.tag===6){if(r===null){L=t;try{L.stateNode.nodeValue=u?"":L.memoizedProps}catch(Z){gt(L,L.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}i&4&&(i=e.updateQueue,i!==null&&(r=i.retryQueue,r!==null&&(i.retryQueue=null,wf(e,r))));break;case 19:cn(t,e),un(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,wf(e,i)));break;case 30:break;case 21:break;default:cn(t,e),un(e)}}function un(e){var t=e.flags;if(t&2){try{for(var r,i=e.return;i!==null;){if(cg(i)){r=i;break}i=i.return}if(r==null)throw Error(o(160));switch(r.tag){case 27:var u=r.stateNode,p=yf(e);js(e,p,u);break;case 5:var x=r.stateNode;r.flags&32&&(il(x,""),r.flags&=-33);var _=yf(e);js(e,_,x);break;case 3:case 4:var L=r.stateNode.containerInfo,G=yf(e);bf(e,G,L);break;default:throw Error(o(161))}}catch(re){gt(e,e.return,re)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function vg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;vg(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ya(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)dg(e,t.alternate,t),t=t.sibling}function Hr(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ga(4,t,t.return),Hr(t);break;case 1:Kn(t,t.return);var r=t.stateNode;typeof r.componentWillUnmount=="function"&&ig(t,t.return,r),Hr(t);break;case 27:Zo(t.stateNode);case 26:case 5:Kn(t,t.return),Hr(t);break;case 22:t.memoizedState===null&&Hr(t);break;case 30:Hr(t);break;default:Hr(t)}e=e.sibling}}function Ka(e,t,r){for(r=r&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,u=e,p=t,x=p.flags;switch(p.tag){case 0:case 11:case 15:Ka(u,p,r),$o(4,p);break;case 1:if(Ka(u,p,r),i=p,u=i.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(G){gt(i,i.return,G)}if(i=p,u=i.updateQueue,u!==null){var _=i.stateNode;try{var L=u.shared.hiddenCallbacks;if(L!==null)for(u.shared.hiddenCallbacks=null,u=0;u<L.length;u++)Ym(L[u],_)}catch(G){gt(i,i.return,G)}}r&&x&64&&og(p),qo(p,p.return);break;case 27:ug(p);case 26:case 5:Ka(u,p,r),r&&i===null&&x&4&&sg(p),qo(p,p.return);break;case 12:Ka(u,p,r);break;case 13:Ka(u,p,r),r&&x&4&&pg(u,p);break;case 22:p.memoizedState===null&&Ka(u,p,r),qo(p,p.return);break;case 30:break;default:Ka(u,p,r)}t=t.sibling}}function Sf(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&&jo(r))}function _f(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&jo(e))}function In(e,t,r,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)yg(e,t,r,i),t=t.sibling}function yg(e,t,r,i){var u=t.flags;switch(t.tag){case 0:case 11:case 15:In(e,t,r,i),u&2048&&$o(9,t);break;case 1:In(e,t,r,i);break;case 3:In(e,t,r,i),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&jo(e)));break;case 12:if(u&2048){In(e,t,r,i),e=t.stateNode;try{var p=t.memoizedProps,x=p.id,_=p.onPostCommit;typeof _=="function"&&_(x,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(L){gt(t,t.return,L)}}else In(e,t,r,i);break;case 13:In(e,t,r,i);break;case 23:break;case 22:p=t.stateNode,x=t.alternate,t.memoizedState!==null?p._visibility&2?In(e,t,r,i):Fo(e,t):p._visibility&2?In(e,t,r,i):(p._visibility|=2,Cl(e,t,r,i,(t.subtreeFlags&10256)!==0)),u&2048&&Sf(x,t);break;case 24:In(e,t,r,i),u&2048&&_f(t.alternate,t);break;default:In(e,t,r,i)}}function Cl(e,t,r,i,u){for(u=u&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var p=e,x=t,_=r,L=i,G=x.flags;switch(x.tag){case 0:case 11:case 15:Cl(p,x,_,L,u),$o(8,x);break;case 23:break;case 22:var re=x.stateNode;x.memoizedState!==null?re._visibility&2?Cl(p,x,_,L,u):Fo(p,x):(re._visibility|=2,Cl(p,x,_,L,u)),u&&G&2048&&Sf(x.alternate,x);break;case 24:Cl(p,x,_,L,u),u&&G&2048&&_f(x.alternate,x);break;default:Cl(p,x,_,L,u)}t=t.sibling}}function Fo(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var r=e,i=t,u=i.flags;switch(i.tag){case 22:Fo(r,i),u&2048&&Sf(i.alternate,i);break;case 24:Fo(r,i),u&2048&&_f(i.alternate,i);break;default:Fo(r,i)}t=t.sibling}}var Vo=8192;function jl(e){if(e.subtreeFlags&Vo)for(e=e.child;e!==null;)bg(e),e=e.sibling}function bg(e){switch(e.tag){case 26:jl(e),e.flags&Vo&&e.memoizedState!==null&&_S(kn,e.memoizedState,e.memoizedProps);break;case 5:jl(e);break;case 3:case 4:var t=kn;kn=Bs(e.stateNode.containerInfo),jl(e),kn=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=Vo,Vo=16777216,jl(e),Vo=t):jl(e));break;default:jl(e)}}function xg(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 Go(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var i=t[r];Ut=i,Sg(i,e)}xg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)wg(e),e=e.sibling}function wg(e){switch(e.tag){case 0:case 11:case 15:Go(e),e.flags&2048&&Ga(9,e,e.return);break;case 3:Go(e);break;case 12:Go(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Rs(e)):Go(e);break;default:Go(e)}}function Rs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var i=t[r];Ut=i,Sg(i,e)}xg(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ga(8,t,t.return),Rs(t);break;case 22:r=t.stateNode,r._visibility&2&&(r._visibility&=-3,Rs(t));break;default:Rs(t)}e=e.sibling}}function Sg(e,t){for(;Ut!==null;){var r=Ut;switch(r.tag){case 0:case 11:case 15:Ga(8,r,t);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var i=r.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:jo(r.memoizedState.cache)}if(i=r.child,i!==null)i.return=r,Ut=i;else e:for(r=e;Ut!==null;){i=Ut;var u=i.sibling,p=i.return;if(hg(i),i===r){Ut=null;break e}if(u!==null){u.return=p,Ut=u;break e}Ut=p}}}var Hw={getCacheForType:function(e){var t=Kt(Dt),r=t.data.get(e);return r===void 0&&(r=e(),t.data.set(e,r)),r}},Bw=typeof WeakMap=="function"?WeakMap:Map,ct=0,yt=null,We=null,tt=0,ut=0,fn=null,Ia=!1,Rl=!1,Ef=!1,Sa=0,Ct=0,Xa=0,Br=0,Nf=0,jn=0,Ol=0,Yo=null,nn=null,Cf=!1,jf=0,Os=1/0,As=null,Qa=null,qt=0,Za=null,Al=null,Tl=0,Rf=0,Of=null,_g=null,Ko=0,Af=null;function dn(){if((ct&2)!==0&&tt!==0)return tt&-tt;if(O.T!==null){var e=yl;return e!==0?e:Uf()}return z()}function Eg(){jn===0&&(jn=(tt&536870912)===0||rt?al():536870912);var e=Cn.current;return e!==null&&(e.flags|=32),jn}function hn(e,t,r){(e===yt&&(ut===2||ut===9)||e.cancelPendingCommit!==null)&&(Ml(e,0),Ja(e,tt,jn,!1)),Sr(e,r),((ct&2)===0||e!==yt)&&(e===yt&&((ct&2)===0&&(Br|=r),Ct===4&&Ja(e,tt,jn,!1)),Xn(e))}function Ng(e,t,r){if((ct&6)!==0)throw Error(o(327));var i=!r&&(t&124)===0&&(t&e.expiredLanes)===0||Fn(e,t),u=i?Fw(e,t):Df(e,t,!0),p=i;do{if(u===0){Rl&&!i&&Ja(e,t,0,!1);break}else{if(r=e.current.alternate,p&&!$w(r)){u=Df(e,t,!1),p=!1;continue}if(u===2){if(p=t,e.errorRecoveryDisabledLanes&p)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){t=x;e:{var _=e;u=Yo;var L=_.current.memoizedState.isDehydrated;if(L&&(Ml(_,x).flags|=256),x=Df(_,x,!1),x!==2){if(Ef&&!L){_.errorRecoveryDisabledLanes|=p,Br|=p,u=4;break e}p=nn,nn=u,p!==null&&(nn===null?nn=p:nn.push.apply(nn,p))}u=x}if(p=!1,u!==2)continue}}if(u===1){Ml(e,0),Ja(e,t,0,!0);break}e:{switch(i=e,p=u,p){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Ja(i,t,jn,!Ia);break e;case 2:nn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(u=jf+300-me(),10<u)){if(Ja(i,t,jn,!Ia),wr(i,0,!0)!==0)break e;i.timeoutHandle=ev(Cg.bind(null,i,r,nn,As,Cf,t,jn,Br,Ol,Ia,p,2,-0,0),u);break e}Cg(i,r,nn,As,Cf,t,jn,Br,Ol,Ia,p,0,-0,0)}}break}while(!0);Xn(e)}function Cg(e,t,r,i,u,p,x,_,L,G,re,ue,Q,Z){if(e.timeoutHandle=-1,ue=t.subtreeFlags,(ue&8192||(ue&16785408)===16785408)&&(ei={stylesheets:null,count:0,unsuspend:SS},bg(t),ue=ES(),ue!==null)){e.cancelPendingCommit=ue(Dg.bind(null,e,t,p,r,i,u,x,_,L,re,1,Q,Z)),Ja(e,p,x,!G);return}Dg(e,t,p,r,i,u,x,_,L)}function $w(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 i=0;i<r.length;i++){var u=r[i],p=u.getSnapshot;u=u.value;try{if(!on(p(),u))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 Ja(e,t,r,i){t&=~Nf,t&=~Br,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var u=t;0<u;){var p=31-Bt(u),x=1<<p;i[p]=-1,u&=~x}r!==0&&_r(e,r,t)}function Ts(){return(ct&6)===0?(Io(0),!1):!0}function Tf(){if(We!==null){if(ut===0)var e=We.return;else e=We,ma=Lr=null,Ku(e),El=null,Po=0,e=We;for(;e!==null;)lg(e.alternate,e),e=e.return;We=null}}function Ml(e,t){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,lS(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),Tf(),yt=e,We=r=fa(e.current,null),tt=t,ut=0,fn=null,Ia=!1,Rl=Fn(e,t),Ef=!1,Ol=jn=Nf=Br=Xa=Ct=0,nn=Yo=null,Cf=!1,(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var u=31-Bt(i),p=1<<u;t|=e[u],i&=~p}return Sa=t,Wi(),r}function jg(e,t){Ke=null,O.H=ys,t===Oo||t===ss?(t=Vm(),ut=3):t===$m?(t=Vm(),ut=4):ut=t===Gp?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,fn=t,We===null&&(Ct=1,_s(e,Sn(t,e.current)))}function Rg(){var e=O.H;return O.H=ys,e===null?ys:e}function Og(){var e=O.A;return O.A=Hw,e}function Mf(){Ct=4,Ia||(tt&4194048)!==tt&&Cn.current!==null||(Rl=!0),(Xa&134217727)===0&&(Br&134217727)===0||yt===null||Ja(yt,tt,jn,!1)}function Df(e,t,r){var i=ct;ct|=2;var u=Rg(),p=Og();(yt!==e||tt!==t)&&(As=null,Ml(e,t)),t=!1;var x=Ct;e:do try{if(ut!==0&&We!==null){var _=We,L=fn;switch(ut){case 8:Tf(),x=6;break e;case 3:case 2:case 9:case 6:Cn.current===null&&(t=!0);var G=ut;if(ut=0,fn=null,Dl(e,_,L,G),r&&Rl){x=0;break e}break;default:G=ut,ut=0,fn=null,Dl(e,_,L,G)}}qw(),x=Ct;break}catch(re){jg(e,re)}while(!0);return t&&e.shellSuspendCounter++,ma=Lr=null,ct=i,O.H=u,O.A=p,We===null&&(yt=null,tt=0,Wi()),x}function qw(){for(;We!==null;)Ag(We)}function Fw(e,t){var r=ct;ct|=2;var i=Rg(),u=Og();yt!==e||tt!==t?(As=null,Os=me()+500,Ml(e,t)):Rl=Fn(e,t);e:do try{if(ut!==0&&We!==null){t=We;var p=fn;t:switch(ut){case 1:ut=0,fn=null,Dl(e,t,p,1);break;case 2:case 9:if(qm(p)){ut=0,fn=null,Tg(t);break}t=function(){ut!==2&&ut!==9||yt!==e||(ut=7),Xn(e)},p.then(t,t);break e;case 3:ut=7;break e;case 4:ut=5;break e;case 7:qm(p)?(ut=0,fn=null,Tg(t)):(ut=0,fn=null,Dl(e,t,p,7));break;case 5:var x=null;switch(We.tag){case 26:x=We.memoizedState;case 5:case 27:var _=We;if(!x||dv(x)){ut=0,fn=null;var L=_.sibling;if(L!==null)We=L;else{var G=_.return;G!==null?(We=G,Ms(G)):We=null}break t}}ut=0,fn=null,Dl(e,t,p,5);break;case 6:ut=0,fn=null,Dl(e,t,p,6);break;case 8:Tf(),Ct=6;break e;default:throw Error(o(462))}}Vw();break}catch(re){jg(e,re)}while(!0);return ma=Lr=null,O.H=i,O.A=u,ct=r,We!==null?0:(yt=null,tt=0,Wi(),Ct)}function Vw(){for(;We!==null&&!ce();)Ag(We)}function Ag(e){var t=ag(e.alternate,e,Sa);e.memoizedProps=e.pendingProps,t===null?Ms(e):We=t}function Tg(e){var t=e,r=t.alternate;switch(t.tag){case 15:case 0:t=Zp(r,t,t.pendingProps,t.type,void 0,tt);break;case 11:t=Zp(r,t,t.pendingProps,t.type.render,t.ref,tt);break;case 5:Ku(t);default:lg(r,t),t=We=Mm(t,Sa),t=ag(r,t,Sa)}e.memoizedProps=e.pendingProps,t===null?Ms(e):We=t}function Dl(e,t,r,i){ma=Lr=null,Ku(t),El=null,Po=0;var u=t.return;try{if(Dw(e,u,t,r,tt)){Ct=1,_s(e,Sn(r,e.current)),We=null;return}}catch(p){if(u!==null)throw We=u,p;Ct=1,_s(e,Sn(r,e.current)),We=null;return}t.flags&32768?(rt||i===1?e=!0:Rl||(tt&536870912)!==0?e=!1:(Ia=e=!0,(i===2||i===9||i===3||i===6)&&(i=Cn.current,i!==null&&i.tag===13&&(i.flags|=16384))),Mg(t,e)):Ms(t)}function Ms(e){var t=e;do{if((t.flags&32768)!==0){Mg(t,Ia);return}e=t.return;var r=kw(t.alternate,t,Sa);if(r!==null){We=r;return}if(t=t.sibling,t!==null){We=t;return}We=t=e}while(t!==null);Ct===0&&(Ct=5)}function Mg(e,t){do{var r=zw(e.alternate,e);if(r!==null){r.flags&=32767,We=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!t&&(e=e.sibling,e!==null)){We=e;return}We=e=r}while(e!==null);Ct=6,We=null}function Dg(e,t,r,i,u,p,x,_,L){e.cancelPendingCommit=null;do Ds();while(qt!==0);if((ct&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(p=t.lanes|t.childLanes,p|=Su,$i(e,r,p,x,_,L),e===yt&&(We=yt=null,tt=0),Al=t,Za=e,Tl=r,Rf=p,Of=u,_g=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Iw(ot,function(){return Pg(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=O.T,O.T=null,u=I.p,I.p=2,x=ct,ct|=4;try{Uw(e,t,r)}finally{ct=x,I.p=u,O.T=i}}qt=1,Lg(),kg(),zg()}}function Lg(){if(qt===1){qt=0;var e=Za,t=Al,r=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||r){r=O.T,O.T=null;var i=I.p;I.p=2;var u=ct;ct|=4;try{gg(t,e);var p=Gf,x=Sm(e.containerInfo),_=p.focusedElem,L=p.selectionRange;if(x!==_&&_&&_.ownerDocument&&wm(_.ownerDocument.documentElement,_)){if(L!==null&&vu(_)){var G=L.start,re=L.end;if(re===void 0&&(re=G),"selectionStart"in _)_.selectionStart=G,_.selectionEnd=Math.min(re,_.value.length);else{var ue=_.ownerDocument||document,Q=ue&&ue.defaultView||window;if(Q.getSelection){var Z=Q.getSelection(),Be=_.textContent.length,ke=Math.min(L.start,Be),pt=L.end===void 0?ke:Math.min(L.end,Be);!Z.extend&&ke>pt&&(x=pt,pt=ke,ke=x);var $=xm(_,ke),P=xm(_,pt);if($&&P&&(Z.rangeCount!==1||Z.anchorNode!==$.node||Z.anchorOffset!==$.offset||Z.focusNode!==P.node||Z.focusOffset!==P.offset)){var V=ue.createRange();V.setStart($.node,$.offset),Z.removeAllRanges(),ke>pt?(Z.addRange(V),Z.extend(P.node,P.offset)):(V.setEnd(P.node,P.offset),Z.addRange(V))}}}}for(ue=[],Z=_;Z=Z.parentNode;)Z.nodeType===1&&ue.push({element:Z,left:Z.scrollLeft,top:Z.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<ue.length;_++){var se=ue[_];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}Gs=!!Vf,Gf=Vf=null}finally{ct=u,I.p=i,O.T=r}}e.current=t,qt=2}}function kg(){if(qt===2){qt=0;var e=Za,t=Al,r=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||r){r=O.T,O.T=null;var i=I.p;I.p=2;var u=ct;ct|=4;try{dg(e,t.alternate,t)}finally{ct=u,I.p=i,O.T=r}}qt=3}}function zg(){if(qt===4||qt===3){qt=0,ge();var e=Za,t=Al,r=Tl,i=_g;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?qt=5:(qt=0,Al=Za=null,Ug(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(Qa=null),ho(r),t=t.stateNode,xt&&typeof xt.onCommitFiberRoot=="function")try{xt.onCommitFiberRoot(Jt,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=O.T,u=I.p,I.p=2,O.T=null;try{for(var p=e.onRecoverableError,x=0;x<i.length;x++){var _=i[x];p(_.value,{componentStack:_.stack})}}finally{O.T=t,I.p=u}}(Tl&3)!==0&&Ds(),Xn(e),u=e.pendingLanes,(r&4194090)!==0&&(u&42)!==0?e===Af?Ko++:(Ko=0,Af=e):Ko=0,Io(0)}}function Ug(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,jo(t)))}function Ds(e){return Lg(),kg(),zg(),Pg()}function Pg(){if(qt!==5)return!1;var e=Za,t=Rf;Rf=0;var r=ho(Tl),i=O.T,u=I.p;try{I.p=32>r?32:r,O.T=null,r=Of,Of=null;var p=Za,x=Tl;if(qt=0,Al=Za=null,Tl=0,(ct&6)!==0)throw Error(o(331));var _=ct;if(ct|=4,wg(p.current),yg(p,p.current,x,r),ct=_,Io(0,!1),xt&&typeof xt.onPostCommitFiberRoot=="function")try{xt.onPostCommitFiberRoot(Jt,p)}catch{}return!0}finally{I.p=u,O.T=i,Ug(e,t)}}function Hg(e,t,r){t=Sn(r,t),t=sf(e.stateNode,t,2),e=$a(e,t,2),e!==null&&(Sr(e,2),Xn(e))}function gt(e,t,r){if(e.tag===3)Hg(e,e,r);else for(;t!==null;){if(t.tag===3){Hg(t,e,r);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Qa===null||!Qa.has(i))){e=Sn(r,e),r=Fp(2),i=$a(t,r,2),i!==null&&(Vp(r,i,t,e),Sr(i,2),Xn(i));break}}t=t.return}}function Lf(e,t,r){var i=e.pingCache;if(i===null){i=e.pingCache=new Bw;var u=new Set;i.set(t,u)}else u=i.get(t),u===void 0&&(u=new Set,i.set(t,u));u.has(r)||(Ef=!0,u.add(r),e=Gw.bind(null,e,t,r),t.then(e,e))}function Gw(e,t,r){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,yt===e&&(tt&r)===r&&(Ct===4||Ct===3&&(tt&62914560)===tt&&300>me()-jf?(ct&2)===0&&Ml(e,0):Nf|=r,Ol===tt&&(Ol=0)),Xn(e)}function Bg(e,t){t===0&&(t=Bi()),e=ml(e,t),e!==null&&(Sr(e,t),Xn(e))}function Yw(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Bg(e,r)}function Kw(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,u=e.memoizedState;u!==null&&(r=u.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(o(314))}i!==null&&i.delete(t),Bg(e,r)}function Iw(e,t){return qe(e,t)}var Ls=null,Ll=null,kf=!1,ks=!1,zf=!1,$r=0;function Xn(e){e!==Ll&&e.next===null&&(Ll===null?Ls=Ll=e:Ll=Ll.next=e),ks=!0,kf||(kf=!0,Qw())}function Io(e,t){if(!zf&&ks){zf=!0;do for(var r=!1,i=Ls;i!==null;){if(e!==0){var u=i.pendingLanes;if(u===0)var p=0;else{var x=i.suspendedLanes,_=i.pingedLanes;p=(1<<31-Bt(42|e)+1)-1,p&=u&~(x&~_),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(r=!0,Vg(i,p))}else p=tt,p=wr(i,i===yt?p:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(p&3)===0||Fn(i,p)||(r=!0,Vg(i,p));i=i.next}while(r);zf=!1}}function Xw(){$g()}function $g(){ks=kf=!1;var e=0;$r!==0&&(rS()&&(e=$r),$r=0);for(var t=me(),r=null,i=Ls;i!==null;){var u=i.next,p=qg(i,t);p===0?(i.next=null,r===null?Ls=u:r.next=u,u===null&&(Ll=r)):(r=i,(e!==0||(p&3)!==0)&&(ks=!0)),i=u}Io(e)}function qg(e,t){for(var r=e.suspendedLanes,i=e.pingedLanes,u=e.expirationTimes,p=e.pendingLanes&-62914561;0<p;){var x=31-Bt(p),_=1<<x,L=u[x];L===-1?((_&r)===0||(_&i)!==0)&&(u[x]=Hi(_,t)):L<=t&&(e.expiredLanes|=_),p&=~_}if(t=yt,r=tt,r=wr(e,e===t?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,r===0||e===t&&(ut===2||ut===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&oe(i),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||Fn(e,r)){if(t=r&-r,t===e.callbackPriority)return t;switch(i!==null&&oe(i),ho(r)){case 2:case 8:r=Fe;break;case 32:r=ot;break;case 268435456:r=$n;break;default:r=ot}return i=Fg.bind(null,e),r=qe(r,i),e.callbackPriority=t,e.callbackNode=r,t}return i!==null&&i!==null&&oe(i),e.callbackPriority=2,e.callbackNode=null,2}function Fg(e,t){if(qt!==0&&qt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(Ds()&&e.callbackNode!==r)return null;var i=tt;return i=wr(e,e===yt?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(Ng(e,i,t),qg(e,me()),e.callbackNode!=null&&e.callbackNode===r?Fg.bind(null,e):null)}function Vg(e,t){if(Ds())return null;Ng(e,t,!0)}function Qw(){oS(function(){(ct&6)!==0?qe(He,Xw):$g()})}function Uf(){return $r===0&&($r=al()),$r}function Gg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Yi(""+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 Zw(e,t,r,i,u){if(t==="submit"&&r&&r.stateNode===u){var p=Gg((u[pe]||null).action),x=i.submitter;x&&(t=(t=x[pe]||null)?Gg(t.formAction):x.getAttribute("formAction"),t!==null&&(p=t,x=null));var _=new Qi("action","action",null,i,u);e.push({event:_,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if($r!==0){var L=x?Yg(u,x):new FormData(u);nf(r,{pending:!0,data:L,method:u.method,action:p},null,L)}}else typeof p=="function"&&(_.preventDefault(),L=x?Yg(u,x):new FormData(u),nf(r,{pending:!0,data:L,method:u.method,action:p},p,L))},currentTarget:u}]})}}for(var Pf=0;Pf<wu.length;Pf++){var Hf=wu[Pf],Jw=Hf.toLowerCase(),Ww=Hf[0].toUpperCase()+Hf.slice(1);Ln(Jw,"on"+Ww)}Ln(Nm,"onAnimationEnd"),Ln(Cm,"onAnimationIteration"),Ln(jm,"onAnimationStart"),Ln("dblclick","onDoubleClick"),Ln("focusin","onFocus"),Ln("focusout","onBlur"),Ln(gw,"onTransitionRun"),Ln(vw,"onTransitionStart"),Ln(yw,"onTransitionCancel"),Ln(Rm,"onTransitionEnd"),Qt("onMouseEnter",["mouseout","mouseover"]),Qt("onMouseLeave",["mouseout","mouseover"]),Qt("onPointerEnter",["pointerout","pointerover"]),Qt("onPointerLeave",["pointerout","pointerover"]),ln("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ln("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ln("onBeforeInput",["compositionend","keypress","textInput","paste"]),ln("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ln("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ln("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xo="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(" "),eS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Xo));function Kg(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var i=e[r],u=i.event;i=i.listeners;e:{var p=void 0;if(t)for(var x=i.length-1;0<=x;x--){var _=i[x],L=_.instance,G=_.currentTarget;if(_=_.listener,L!==p&&u.isPropagationStopped())break e;p=_,u.currentTarget=G;try{p(u)}catch(re){Ss(re)}u.currentTarget=null,p=L}else for(x=0;x<i.length;x++){if(_=i[x],L=_.instance,G=_.currentTarget,_=_.listener,L!==p&&u.isPropagationStopped())break e;p=_,u.currentTarget=G;try{p(u)}catch(re){Ss(re)}u.currentTarget=null,p=L}}}}function et(e,t){var r=t[Re];r===void 0&&(r=t[Re]=new Set);var i=e+"__bubble";r.has(i)||(Ig(t,e,2,!1),r.add(i))}function Bf(e,t,r){var i=0;t&&(i|=4),Ig(r,e,i,t)}var zs="_reactListening"+Math.random().toString(36).slice(2);function $f(e){if(!e[zs]){e[zs]=!0,dt.forEach(function(r){r!=="selectionchange"&&(eS.has(r)||Bf(r,!1,e),Bf(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[zs]||(t[zs]=!0,Bf("selectionchange",!1,t))}}function Ig(e,t,r,i){switch(yv(t)){case 2:var u=jS;break;case 8:u=RS;break;default:u=td}r=u.bind(null,t,r,e),u=void 0,!su||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),i?u!==void 0?e.addEventListener(t,r,{capture:!0,passive:u}):e.addEventListener(t,r,!0):u!==void 0?e.addEventListener(t,r,{passive:u}):e.addEventListener(t,r,!1)}function qf(e,t,r,i,u){var p=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var x=i.tag;if(x===3||x===4){var _=i.stateNode.containerInfo;if(_===u)break;if(x===4)for(x=i.return;x!==null;){var L=x.tag;if((L===3||L===4)&&x.stateNode.containerInfo===u)return;x=x.return}for(;_!==null;){if(x=Ye(_),x===null)return;if(L=x.tag,L===5||L===6||L===26||L===27){i=p=x;continue e}_=_.parentNode}}i=i.return}tm(function(){var G=p,re=ou(r),ue=[];e:{var Q=Om.get(e);if(Q!==void 0){var Z=Qi,Be=e;switch(e){case"keypress":if(Ii(r)===0)break e;case"keydown":case"keyup":Z=I1;break;case"focusin":Be="focus",Z=du;break;case"focusout":Be="blur",Z=du;break;case"beforeblur":case"afterblur":Z=du;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=rm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=z1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=Z1;break;case Nm:case Cm:case jm:Z=H1;break;case Rm:Z=W1;break;case"scroll":case"scrollend":Z=L1;break;case"wheel":Z=tw;break;case"copy":case"cut":case"paste":Z=$1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=om;break;case"toggle":case"beforetoggle":Z=aw}var ke=(t&4)!==0,pt=!ke&&(e==="scroll"||e==="scrollend"),$=ke?Q!==null?Q+"Capture":null:Q;ke=[];for(var P=G,V;P!==null;){var se=P;if(V=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||V===null||$===null||(se=mo(P,$),se!=null&&ke.push(Qo(P,se,V))),pt)break;P=P.return}0<ke.length&&(Q=new Z(Q,Be,null,r,re),ue.push({event:Q,listeners:ke}))}}if((t&7)===0){e:{if(Q=e==="mouseover"||e==="pointerover",Z=e==="mouseout"||e==="pointerout",Q&&r!==lu&&(Be=r.relatedTarget||r.fromElement)&&(Ye(Be)||Be[Ne]))break e;if((Z||Q)&&(Q=re.window===re?re:(Q=re.ownerDocument)?Q.defaultView||Q.parentWindow:window,Z?(Be=r.relatedTarget||r.toElement,Z=G,Be=Be?Ye(Be):null,Be!==null&&(pt=c(Be),ke=Be.tag,Be!==pt||ke!==5&&ke!==27&&ke!==6)&&(Be=null)):(Z=null,Be=G),Z!==Be)){if(ke=rm,se="onMouseLeave",$="onMouseEnter",P="mouse",(e==="pointerout"||e==="pointerover")&&(ke=om,se="onPointerLeave",$="onPointerEnter",P="pointer"),pt=Z==null?Q:_t(Z),V=Be==null?Q:_t(Be),Q=new ke(se,P+"leave",Z,r,re),Q.target=pt,Q.relatedTarget=V,se=null,Ye(re)===G&&(ke=new ke($,P+"enter",Be,r,re),ke.target=V,ke.relatedTarget=pt,se=ke),pt=se,Z&&Be)t:{for(ke=Z,$=Be,P=0,V=ke;V;V=kl(V))P++;for(V=0,se=$;se;se=kl(se))V++;for(;0<P-V;)ke=kl(ke),P--;for(;0<V-P;)$=kl($),V--;for(;P--;){if(ke===$||$!==null&&ke===$.alternate)break t;ke=kl(ke),$=kl($)}ke=null}else ke=null;Z!==null&&Xg(ue,Q,Z,ke,!1),Be!==null&&pt!==null&&Xg(ue,pt,Be,ke,!0)}}e:{if(Q=G?_t(G):window,Z=Q.nodeName&&Q.nodeName.toLowerCase(),Z==="select"||Z==="input"&&Q.type==="file")var Se=mm;else if(dm(Q))if(pm)Se=hw;else{Se=fw;var Qe=uw}else Z=Q.nodeName,!Z||Z.toLowerCase()!=="input"||Q.type!=="checkbox"&&Q.type!=="radio"?G&&ru(G.elementType)&&(Se=mm):Se=dw;if(Se&&(Se=Se(e,G))){hm(ue,Se,r,re);break e}Qe&&Qe(e,Q,G),e==="focusout"&&G&&Q.type==="number"&&G.memoizedProps.value!=null&&au(Q,"number",Q.value)}switch(Qe=G?_t(G):window,e){case"focusin":(dm(Qe)||Qe.contentEditable==="true")&&(fl=Qe,yu=G,So=null);break;case"focusout":So=yu=fl=null;break;case"mousedown":bu=!0;break;case"contextmenu":case"mouseup":case"dragend":bu=!1,_m(ue,r,re);break;case"selectionchange":if(pw)break;case"keydown":case"keyup":_m(ue,r,re)}var Ae;if(mu)e:{switch(e){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else ul?um(e,r)&&(Ue="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(Ue="onCompositionStart");Ue&&(im&&r.locale!=="ko"&&(ul||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&ul&&(Ae=nm()):(Ua=re,cu="value"in Ua?Ua.value:Ua.textContent,ul=!0)),Qe=Us(G,Ue),0<Qe.length&&(Ue=new lm(Ue,e,null,r,re),ue.push({event:Ue,listeners:Qe}),Ae?Ue.data=Ae:(Ae=fm(r),Ae!==null&&(Ue.data=Ae)))),(Ae=lw?ow(e,r):iw(e,r))&&(Ue=Us(G,"onBeforeInput"),0<Ue.length&&(Qe=new lm("onBeforeInput","beforeinput",null,r,re),ue.push({event:Qe,listeners:Ue}),Qe.data=Ae)),Zw(ue,e,G,r,re)}Kg(ue,t)})}function Qo(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Us(e,t){for(var r=t+"Capture",i=[];e!==null;){var u=e,p=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||p===null||(u=mo(e,r),u!=null&&i.unshift(Qo(e,u,p)),u=mo(e,t),u!=null&&i.push(Qo(e,u,p))),e.tag===3)return i;e=e.return}return[]}function kl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Xg(e,t,r,i,u){for(var p=t._reactName,x=[];r!==null&&r!==i;){var _=r,L=_.alternate,G=_.stateNode;if(_=_.tag,L!==null&&L===i)break;_!==5&&_!==26&&_!==27||G===null||(L=G,u?(G=mo(r,p),G!=null&&x.unshift(Qo(r,G,L))):u||(G=mo(r,p),G!=null&&x.push(Qo(r,G,L)))),r=r.return}x.length!==0&&e.push({event:t,listeners:x})}var tS=/\r\n?/g,nS=/\u0000|\uFFFD/g;function Qg(e){return(typeof e=="string"?e:""+e).replace(tS,`
55
+ `).replace(nS,"")}function Zg(e,t){return t=Qg(t),Qg(e)===t}function Ps(){}function mt(e,t,r,i,u,p){switch(r){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||il(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&il(e,""+i);break;case"className":ca(e,"class",i);break;case"tabIndex":ca(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":ca(e,r,i);break;case"style":Wh(e,i,p);break;case"data":if(t!=="object"){ca(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||r!=="href")){e.removeAttribute(r);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(r);break}i=Yi(""+i),e.setAttribute(r,i);break;case"action":case"formAction":if(typeof i=="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 p=="function"&&(r==="formAction"?(t!=="input"&&mt(e,t,"name",u.name,u,null),mt(e,t,"formEncType",u.formEncType,u,null),mt(e,t,"formMethod",u.formMethod,u,null),mt(e,t,"formTarget",u.formTarget,u,null)):(mt(e,t,"encType",u.encType,u,null),mt(e,t,"method",u.method,u,null),mt(e,t,"target",u.target,u,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(r);break}i=Yi(""+i),e.setAttribute(r,i);break;case"onClick":i!=null&&(e.onclick=Ps);break;case"onScroll":i!=null&&et("scroll",e);break;case"onScrollEnd":i!=null&&et("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(r=i.__html,r!=null){if(u.children!=null)throw Error(o(60));e.innerHTML=r}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}r=Yi(""+i),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":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(r,""+i):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":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":i===!0?e.setAttribute(r,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(r,i):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(r,i):e.removeAttribute(r);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(r):e.setAttribute(r,i);break;case"popover":et("beforetoggle",e),et("toggle",e),sa(e,"popover",i);break;case"xlinkActuate":Xe(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":Xe(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":Xe(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":Xe(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":Xe(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":Xe(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":Xe(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":Xe(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":Xe(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":sa(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=M1.get(r)||r,sa(e,r,i))}}function Ff(e,t,r,i,u,p){switch(r){case"style":Wh(e,i,p);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(r=i.__html,r!=null){if(u.children!=null)throw Error(o(60));e.innerHTML=r}}break;case"children":typeof i=="string"?il(e,i):(typeof i=="number"||typeof i=="bigint")&&il(e,""+i);break;case"onScroll":i!=null&&et("scroll",e);break;case"onScrollEnd":i!=null&&et("scrollend",e);break;case"onClick":i!=null&&(e.onclick=Ps);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Vn.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(u=r.endsWith("Capture"),t=r.slice(2,u?r.length-7:void 0),p=e[pe]||null,p=p!=null?p[r]:null,typeof p=="function"&&e.removeEventListener(t,p,u),typeof i=="function")){typeof p!="function"&&p!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(t,i,u);break e}r in e?e[r]=i:i===!0?e.setAttribute(r,""):sa(e,r,i)}}}function Ft(e,t,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":et("error",e),et("load",e);var i=!1,u=!1,p;for(p in r)if(r.hasOwnProperty(p)){var x=r[p];if(x!=null)switch(p){case"src":i=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:mt(e,t,p,x,r,null)}}u&&mt(e,t,"srcSet",r.srcSet,r,null),i&&mt(e,t,"src",r.src,r,null);return;case"input":et("invalid",e);var _=p=x=u=null,L=null,G=null;for(i in r)if(r.hasOwnProperty(i)){var re=r[i];if(re!=null)switch(i){case"name":u=re;break;case"type":x=re;break;case"checked":L=re;break;case"defaultChecked":G=re;break;case"value":p=re;break;case"defaultValue":_=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(o(137,t));break;default:mt(e,t,i,re,r,null)}}Xh(e,p,_,L,G,x,u,!1),Vi(e);return;case"select":et("invalid",e),i=x=p=null;for(u in r)if(r.hasOwnProperty(u)&&(_=r[u],_!=null))switch(u){case"value":p=_;break;case"defaultValue":x=_;break;case"multiple":i=_;default:mt(e,t,u,_,r,null)}t=p,r=x,e.multiple=!!i,t!=null?ol(e,!!i,t,!1):r!=null&&ol(e,!!i,r,!0);return;case"textarea":et("invalid",e),p=u=i=null;for(x in r)if(r.hasOwnProperty(x)&&(_=r[x],_!=null))switch(x){case"value":i=_;break;case"defaultValue":u=_;break;case"children":p=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(o(91));break;default:mt(e,t,x,_,r,null)}Zh(e,i,u,p),Vi(e);return;case"option":for(L in r)if(r.hasOwnProperty(L)&&(i=r[L],i!=null))switch(L){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:mt(e,t,L,i,r,null)}return;case"dialog":et("beforetoggle",e),et("toggle",e),et("cancel",e),et("close",e);break;case"iframe":case"object":et("load",e);break;case"video":case"audio":for(i=0;i<Xo.length;i++)et(Xo[i],e);break;case"image":et("error",e),et("load",e);break;case"details":et("toggle",e);break;case"embed":case"source":case"link":et("error",e),et("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)&&(i=r[G],i!=null))switch(G){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:mt(e,t,G,i,r,null)}return;default:if(ru(t)){for(re in r)r.hasOwnProperty(re)&&(i=r[re],i!==void 0&&Ff(e,t,re,i,r,void 0));return}}for(_ in r)r.hasOwnProperty(_)&&(i=r[_],i!=null&&mt(e,t,_,i,r,null))}function aS(e,t,r,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,p=null,x=null,_=null,L=null,G=null,re=null;for(Z in r){var ue=r[Z];if(r.hasOwnProperty(Z)&&ue!=null)switch(Z){case"checked":break;case"value":break;case"defaultValue":L=ue;default:i.hasOwnProperty(Z)||mt(e,t,Z,null,i,ue)}}for(var Q in i){var Z=i[Q];if(ue=r[Q],i.hasOwnProperty(Q)&&(Z!=null||ue!=null))switch(Q){case"type":p=Z;break;case"name":u=Z;break;case"checked":G=Z;break;case"defaultChecked":re=Z;break;case"value":x=Z;break;case"defaultValue":_=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(o(137,t));break;default:Z!==ue&&mt(e,t,Q,Z,i,ue)}}nu(e,x,_,L,G,re,p,u);return;case"select":Z=x=_=Q=null;for(p in r)if(L=r[p],r.hasOwnProperty(p)&&L!=null)switch(p){case"value":break;case"multiple":Z=L;default:i.hasOwnProperty(p)||mt(e,t,p,null,i,L)}for(u in i)if(p=i[u],L=r[u],i.hasOwnProperty(u)&&(p!=null||L!=null))switch(u){case"value":Q=p;break;case"defaultValue":_=p;break;case"multiple":x=p;default:p!==L&&mt(e,t,u,p,i,L)}t=_,r=x,i=Z,Q!=null?ol(e,!!r,Q,!1):!!i!=!!r&&(t!=null?ol(e,!!r,t,!0):ol(e,!!r,r?[]:"",!1));return;case"textarea":Z=Q=null;for(_ in r)if(u=r[_],r.hasOwnProperty(_)&&u!=null&&!i.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:mt(e,t,_,null,i,u)}for(x in i)if(u=i[x],p=r[x],i.hasOwnProperty(x)&&(u!=null||p!=null))switch(x){case"value":Q=u;break;case"defaultValue":Z=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(o(91));break;default:u!==p&&mt(e,t,x,u,i,p)}Qh(e,Q,Z);return;case"option":for(var Be in r)if(Q=r[Be],r.hasOwnProperty(Be)&&Q!=null&&!i.hasOwnProperty(Be))switch(Be){case"selected":e.selected=!1;break;default:mt(e,t,Be,null,i,Q)}for(L in i)if(Q=i[L],Z=r[L],i.hasOwnProperty(L)&&Q!==Z&&(Q!=null||Z!=null))switch(L){case"selected":e.selected=Q&&typeof Q!="function"&&typeof Q!="symbol";break;default:mt(e,t,L,Q,i,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 ke in r)Q=r[ke],r.hasOwnProperty(ke)&&Q!=null&&!i.hasOwnProperty(ke)&&mt(e,t,ke,null,i,Q);for(G in i)if(Q=i[G],Z=r[G],i.hasOwnProperty(G)&&Q!==Z&&(Q!=null||Z!=null))switch(G){case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(o(137,t));break;default:mt(e,t,G,Q,i,Z)}return;default:if(ru(t)){for(var pt in r)Q=r[pt],r.hasOwnProperty(pt)&&Q!==void 0&&!i.hasOwnProperty(pt)&&Ff(e,t,pt,void 0,i,Q);for(re in i)Q=i[re],Z=r[re],!i.hasOwnProperty(re)||Q===Z||Q===void 0&&Z===void 0||Ff(e,t,re,Q,i,Z);return}}for(var $ in r)Q=r[$],r.hasOwnProperty($)&&Q!=null&&!i.hasOwnProperty($)&&mt(e,t,$,null,i,Q);for(ue in i)Q=i[ue],Z=r[ue],!i.hasOwnProperty(ue)||Q===Z||Q==null&&Z==null||mt(e,t,ue,Q,i,Z)}var Vf=null,Gf=null;function Hs(e){return e.nodeType===9?e:e.ownerDocument}function Jg(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 Wg(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 Yf(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 Kf=null;function rS(){var e=window.event;return e&&e.type==="popstate"?e===Kf?!1:(Kf=e,!0):(Kf=null,!1)}var ev=typeof setTimeout=="function"?setTimeout:void 0,lS=typeof clearTimeout=="function"?clearTimeout:void 0,tv=typeof Promise=="function"?Promise:void 0,oS=typeof queueMicrotask=="function"?queueMicrotask:typeof tv<"u"?function(e){return tv.resolve(null).then(e).catch(iS)}:ev;function iS(e){setTimeout(function(){throw e})}function Wa(e){return e==="head"}function nv(e,t){var r=t,i=0,u=0;do{var p=r.nextSibling;if(e.removeChild(r),p&&p.nodeType===8)if(r=p.data,r==="/$"){if(0<i&&8>i){r=i;var x=e.ownerDocument;if(r&1&&Zo(x.documentElement),r&2&&Zo(x.body),r&4)for(r=x.head,Zo(r),x=r.firstChild;x;){var _=x.nextSibling,L=x.nodeName;x[je]||L==="SCRIPT"||L==="STYLE"||L==="LINK"&&x.rel.toLowerCase()==="stylesheet"||r.removeChild(x),x=_}}if(u===0){e.removeChild(p),li(t);return}u--}else r==="$"||r==="$?"||r==="$!"?u++:i=r.charCodeAt(0)-48;else i=0;r=p}while(r);li(t)}function If(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":If(r),Oe(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function sS(e,t,r,i){for(;e.nodeType===1;){var u=r;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[je])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(p=e.getAttribute("rel"),p==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(p!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(p=e.getAttribute("src"),(p!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&p&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var p=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===p)return e}else return e;if(e=zn(e.nextSibling),e===null)break}return null}function cS(e,t,r){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=zn(e.nextSibling),e===null))return null;return e}function Xf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function uS(e,t){var r=e.ownerDocument;if(e.data!=="$?"||r.readyState==="complete")t();else{var i=function(){t(),r.removeEventListener("DOMContentLoaded",i)};r.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function zn(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 Qf=null;function av(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 rv(e,t,r){switch(t=Hs(r),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Zo(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Oe(e)}var Rn=new Map,lv=new Set;function Bs(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _a=I.d;I.d={f:fS,r:dS,D:hS,C:mS,L:pS,m:gS,X:yS,S:vS,M:bS};function fS(){var e=_a.f(),t=Ts();return e||t}function dS(e){var t=st(e);t!==null&&t.tag===5&&t.type==="form"?Np(t):_a.r(e)}var zl=typeof document>"u"?null:document;function ov(e,t,r){var i=zl;if(i&&typeof t=="string"&&t){var u=wn(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof r=="string"&&(u+='[crossorigin="'+r+'"]'),lv.has(u)||(lv.add(u),e={rel:e,crossOrigin:r,href:t},i.querySelector(u)===null&&(t=i.createElement("link"),Ft(t,"link",e),Ve(t),i.head.appendChild(t)))}}function hS(e){_a.D(e),ov("dns-prefetch",e,null)}function mS(e,t){_a.C(e,t),ov("preconnect",e,t)}function pS(e,t,r){_a.L(e,t,r);var i=zl;if(i&&e&&t){var u='link[rel="preload"][as="'+wn(t)+'"]';t==="image"&&r&&r.imageSrcSet?(u+='[imagesrcset="'+wn(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(u+='[imagesizes="'+wn(r.imageSizes)+'"]')):u+='[href="'+wn(e)+'"]';var p=u;switch(t){case"style":p=Ul(e);break;case"script":p=Pl(e)}Rn.has(p)||(e=v({rel:"preload",href:t==="image"&&r&&r.imageSrcSet?void 0:e,as:t},r),Rn.set(p,e),i.querySelector(u)!==null||t==="style"&&i.querySelector(Jo(p))||t==="script"&&i.querySelector(Wo(p))||(t=i.createElement("link"),Ft(t,"link",e),Ve(t),i.head.appendChild(t)))}}function gS(e,t){_a.m(e,t);var r=zl;if(r&&e){var i=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+wn(i)+'"][href="'+wn(e)+'"]',p=u;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=Pl(e)}if(!Rn.has(p)&&(e=v({rel:"modulepreload",href:e},t),Rn.set(p,e),r.querySelector(u)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(Wo(p)))return}i=r.createElement("link"),Ft(i,"link",e),Ve(i),r.head.appendChild(i)}}}function vS(e,t,r){_a.S(e,t,r);var i=zl;if(i&&e){var u=Et(i).hoistableStyles,p=Ul(e);t=t||"default";var x=u.get(p);if(!x){var _={loading:0,preload:null};if(x=i.querySelector(Jo(p)))_.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},r),(r=Rn.get(p))&&Zf(e,r);var L=x=i.createElement("link");Ve(L),Ft(L,"link",e),L._p=new Promise(function(G,re){L.onload=G,L.onerror=re}),L.addEventListener("load",function(){_.loading|=1}),L.addEventListener("error",function(){_.loading|=2}),_.loading|=4,$s(x,t,i)}x={type:"stylesheet",instance:x,count:1,state:_},u.set(p,x)}}}function yS(e,t){_a.X(e,t);var r=zl;if(r&&e){var i=Et(r).hoistableScripts,u=Pl(e),p=i.get(u);p||(p=r.querySelector(Wo(u)),p||(e=v({src:e,async:!0},t),(t=Rn.get(u))&&Jf(e,t),p=r.createElement("script"),Ve(p),Ft(p,"link",e),r.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},i.set(u,p))}}function bS(e,t){_a.M(e,t);var r=zl;if(r&&e){var i=Et(r).hoistableScripts,u=Pl(e),p=i.get(u);p||(p=r.querySelector(Wo(u)),p||(e=v({src:e,async:!0,type:"module"},t),(t=Rn.get(u))&&Jf(e,t),p=r.createElement("script"),Ve(p),Ft(p,"link",e),r.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},i.set(u,p))}}function iv(e,t,r,i){var u=(u=ve.current)?Bs(u):null;if(!u)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(t=Ul(r.href),r=Et(u).hoistableStyles,i=r.get(t),i||(i={type:"style",instance:null,count:0,state:null},r.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=Ul(r.href);var p=Et(u).hoistableStyles,x=p.get(e);if(x||(u=u.ownerDocument||u,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(e,x),(p=u.querySelector(Jo(e)))&&!p._p&&(x.instance=p,x.state.loading=5),Rn.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},Rn.set(e,r),p||xS(u,e,r,x.state))),t&&i===null)throw Error(o(528,""));return x}if(t&&i!==null)throw Error(o(529,""));return null;case"script":return t=r.async,r=r.src,typeof r=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Pl(r),r=Et(u).hoistableScripts,i=r.get(t),i||(i={type:"script",instance:null,count:0,state:null},r.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Ul(e){return'href="'+wn(e)+'"'}function Jo(e){return'link[rel="stylesheet"]['+e+"]"}function sv(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function xS(e,t,r,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),Ft(t,"link",r),Ve(t),e.head.appendChild(t))}function Pl(e){return'[src="'+wn(e)+'"]'}function Wo(e){return"script[async]"+e}function cv(e,t,r){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+wn(r.href)+'"]');if(i)return t.instance=i,Ve(i),i;var u=v({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),Ve(i),Ft(i,"style",u),$s(i,r.precedence,e),t.instance=i;case"stylesheet":u=Ul(r.href);var p=e.querySelector(Jo(u));if(p)return t.state.loading|=4,t.instance=p,Ve(p),p;i=sv(r),(u=Rn.get(u))&&Zf(i,u),p=(e.ownerDocument||e).createElement("link"),Ve(p);var x=p;return x._p=new Promise(function(_,L){x.onload=_,x.onerror=L}),Ft(p,"link",i),t.state.loading|=4,$s(p,r.precedence,e),t.instance=p;case"script":return p=Pl(r.src),(u=e.querySelector(Wo(p)))?(t.instance=u,Ve(u),u):(i=r,(u=Rn.get(p))&&(i=v({},r),Jf(i,u)),e=e.ownerDocument||e,u=e.createElement("script"),Ve(u),Ft(u,"link",i),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,$s(i,r.precedence,e));return t.instance}function $s(e,t,r){for(var i=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=i.length?i[i.length-1]:null,p=u,x=0;x<i.length;x++){var _=i[x];if(_.dataset.precedence===t)p=_;else if(p!==u)break}p?p.parentNode.insertBefore(e,p.nextSibling):(t=r.nodeType===9?r.head:r,t.insertBefore(e,t.firstChild))}function Zf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Jf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var qs=null;function uv(e,t,r){if(qs===null){var i=new Map,u=qs=new Map;u.set(r,i)}else u=qs,i=u.get(r),i||(i=new Map,u.set(r,i));if(i.has(e))return i;for(i.set(e,null),r=r.getElementsByTagName(e),u=0;u<r.length;u++){var p=r[u];if(!(p[je]||p[de]||e==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var x=p.getAttribute(t)||"";x=e+x;var _=i.get(x);_?_.push(p):i.set(x,[p])}}return i}function fv(e,t,r){e=e.ownerDocument||e,e.head.insertBefore(r,t==="title"?e.querySelector("head > title"):null)}function wS(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 dv(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var ei=null;function SS(){}function _S(e,t,r){if(ei===null)throw Error(o(475));var i=ei;if(t.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var u=Ul(r.href),p=e.querySelector(Jo(u));if(p){e=p._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(i.count++,i=Fs.bind(i),e.then(i,i)),t.state.loading|=4,t.instance=p,Ve(p);return}p=e.ownerDocument||e,r=sv(r),(u=Rn.get(u))&&Zf(r,u),p=p.createElement("link"),Ve(p);var x=p;x._p=new Promise(function(_,L){x.onload=_,x.onerror=L}),Ft(p,"link",r),t.instance=p}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(i.count++,t=Fs.bind(i),e.addEventListener("load",t),e.addEventListener("error",t))}}function ES(){if(ei===null)throw Error(o(475));var e=ei;return e.stylesheets&&e.count===0&&Wf(e,e.stylesheets),0<e.count?function(t){var r=setTimeout(function(){if(e.stylesheets&&Wf(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(r)}}:null}function Fs(){if(this.count--,this.count===0){if(this.stylesheets)Wf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Vs=null;function Wf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Vs=new Map,t.forEach(NS,e),Vs=null,Fs.call(e))}function NS(e,t){if(!(t.state.loading&4)){var r=Vs.get(e);if(r)var i=r.get(null);else{r=new Map,Vs.set(e,r);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<u.length;p++){var x=u[p];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(r.set(x.dataset.precedence,x),i=x)}i&&r.set(null,i)}u=t.instance,x=u.getAttribute("data-precedence"),p=r.get(x)||i,p===i&&r.set(null,u),r.set(x,u),this.count++,i=Fs.bind(this),u.addEventListener("load",i),u.addEventListener("error",i),p?p.parentNode.insertBefore(u,p.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var ti={$$typeof:T,Provider:null,Consumer:null,_currentValue:q,_currentValue2:q,_threadCount:0};function CS(e,t,r,i,u,p,x,_){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=rl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rl(0),this.hiddenUpdates=rl(null),this.identifierPrefix=i,this.onUncaughtError=u,this.onCaughtError=p,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function hv(e,t,r,i,u,p,x,_,L,G,re,ue){return e=new CS(e,t,r,x,_,L,G,ue),t=1,p===!0&&(t|=24),p=sn(3,null,null,t),e.current=p,p.stateNode=e,t=Du(),t.refCount++,e.pooledCache=t,t.refCount++,p.memoizedState={element:i,isDehydrated:r,cache:t},Uu(p),e}function mv(e){return e?(e=pl,e):pl}function pv(e,t,r,i,u,p){u=mv(u),i.context===null?i.context=u:i.pendingContext=u,i=Ba(t),i.payload={element:r},p=p===void 0?null:p,p!==null&&(i.callback=p),r=$a(e,i,t),r!==null&&(hn(r,e,t),To(r,e,t))}function gv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function ed(e,t){gv(e,t),(e=e.alternate)&&gv(e,t)}function vv(e){if(e.tag===13){var t=ml(e,67108864);t!==null&&hn(t,e,67108864),ed(e,67108864)}}var Gs=!0;function jS(e,t,r,i){var u=O.T;O.T=null;var p=I.p;try{I.p=2,td(e,t,r,i)}finally{I.p=p,O.T=u}}function RS(e,t,r,i){var u=O.T;O.T=null;var p=I.p;try{I.p=8,td(e,t,r,i)}finally{I.p=p,O.T=u}}function td(e,t,r,i){if(Gs){var u=nd(i);if(u===null)qf(e,t,i,Ys,r),bv(e,i);else if(AS(u,e,t,r,i))i.stopPropagation();else if(bv(e,i),t&4&&-1<OS.indexOf(e)){for(;u!==null;){var p=st(u);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var x=oa(p.pendingLanes);if(x!==0){var _=p;for(_.pendingLanes|=2,_.entangledLanes|=2;x;){var L=1<<31-Bt(x);_.entanglements[1]|=L,x&=~L}Xn(p),(ct&6)===0&&(Os=me()+500,Io(0))}}break;case 13:_=ml(p,2),_!==null&&hn(_,p,2),Ts(),ed(p,2)}if(p=nd(i),p===null&&qf(e,t,i,Ys,r),p===u)break;u=p}u!==null&&i.stopPropagation()}else qf(e,t,i,null,r)}}function nd(e){return e=ou(e),ad(e)}var Ys=null;function ad(e){if(Ys=null,e=Ye(e),e!==null){var t=c(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 Ys=e,null}function yv(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(Te()){case He:return 2;case Fe:return 8;case ot:case Yt:return 32;case $n:return 268435456;default:return 32}default:return 32}}var rd=!1,er=null,tr=null,nr=null,ni=new Map,ai=new Map,ar=[],OS="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 bv(e,t){switch(e){case"focusin":case"focusout":er=null;break;case"dragenter":case"dragleave":tr=null;break;case"mouseover":case"mouseout":nr=null;break;case"pointerover":case"pointerout":ni.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ai.delete(t.pointerId)}}function ri(e,t,r,i,u,p){return e===null||e.nativeEvent!==p?(e={blockedOn:t,domEventName:r,eventSystemFlags:i,nativeEvent:p,targetContainers:[u]},t!==null&&(t=st(t),t!==null&&vv(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function AS(e,t,r,i,u){switch(t){case"focusin":return er=ri(er,e,t,r,i,u),!0;case"dragenter":return tr=ri(tr,e,t,r,i,u),!0;case"mouseover":return nr=ri(nr,e,t,r,i,u),!0;case"pointerover":var p=u.pointerId;return ni.set(p,ri(ni.get(p)||null,e,t,r,i,u)),!0;case"gotpointercapture":return p=u.pointerId,ai.set(p,ri(ai.get(p)||null,e,t,r,i,u)),!0}return!1}function xv(e){var t=Ye(e.target);if(t!==null){var r=c(t);if(r!==null){if(t=r.tag,t===13){if(t=f(r),t!==null){e.blockedOn=t,F(e.priority,function(){if(r.tag===13){var i=dn();i=fo(i);var u=ml(r,i);u!==null&&hn(u,r,i),ed(r,i)}});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ks(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=nd(e.nativeEvent);if(r===null){r=e.nativeEvent;var i=new r.constructor(r.type,r);lu=i,r.target.dispatchEvent(i),lu=null}else return t=st(r),t!==null&&vv(t),e.blockedOn=r,!1;t.shift()}return!0}function wv(e,t,r){Ks(e)&&r.delete(t)}function TS(){rd=!1,er!==null&&Ks(er)&&(er=null),tr!==null&&Ks(tr)&&(tr=null),nr!==null&&Ks(nr)&&(nr=null),ni.forEach(wv),ai.forEach(wv)}function Is(e,t){e.blockedOn===t&&(e.blockedOn=null,rd||(rd=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,TS)))}var Xs=null;function Sv(e){Xs!==e&&(Xs=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Xs===e&&(Xs=null);for(var t=0;t<e.length;t+=3){var r=e[t],i=e[t+1],u=e[t+2];if(typeof i!="function"){if(ad(i||r)===null)continue;break}var p=st(r);p!==null&&(e.splice(t,3),t-=3,nf(p,{pending:!0,data:u,method:r.method,action:i},i,u))}}))}function li(e){function t(L){return Is(L,e)}er!==null&&Is(er,e),tr!==null&&Is(tr,e),nr!==null&&Is(nr,e),ni.forEach(t),ai.forEach(t);for(var r=0;r<ar.length;r++){var i=ar[r];i.blockedOn===e&&(i.blockedOn=null)}for(;0<ar.length&&(r=ar[0],r.blockedOn===null);)xv(r),r.blockedOn===null&&ar.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(i=0;i<r.length;i+=3){var u=r[i],p=r[i+1],x=u[pe]||null;if(typeof p=="function")x||Sv(r);else if(x){var _=null;if(p&&p.hasAttribute("formAction")){if(u=p,x=p[pe]||null)_=x.formAction;else if(ad(u)!==null)continue}else _=x.action;typeof _=="function"?r[i+1]=_:(r.splice(i,3),i-=3),Sv(r)}}}function ld(e){this._internalRoot=e}Qs.prototype.render=ld.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var r=t.current,i=dn();pv(r,i,e,t,null,null)},Qs.prototype.unmount=ld.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;pv(e.current,2,null,e,null,null),Ts(),t[Ne]=null}};function Qs(e){this._internalRoot=e}Qs.prototype.unstable_scheduleHydration=function(e){if(e){var t=z();e={blockedOn:null,target:e,priority:t};for(var r=0;r<ar.length&&t!==0&&t<ar[r].priority;r++);ar.splice(r,0,e),r===0&&xv(e)}};var _v=a.version;if(_v!=="19.1.0")throw Error(o(527,_v,"19.1.0"));I.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=g(t),e=e!==null?h(e):null,e=e===null?null:e.stateNode,e};var MS={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:O,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Zs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zs.isDisabled&&Zs.supportsFiber)try{Jt=Zs.inject(MS),xt=Zs}catch{}}return si.createRoot=function(e,t){if(!s(e))throw Error(o(299));var r=!1,i="",u=Hp,p=Bp,x=$p,_=null;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(p=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(_=t.unstable_transitionCallbacks)),t=hv(e,1,!1,null,null,r,i,u,p,x,_,null),e[Ne]=t.current,$f(e),new ld(t)},si.hydrateRoot=function(e,t,r){if(!s(e))throw Error(o(299));var i=!1,u="",p=Hp,x=Bp,_=$p,L=null,G=null;return r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onUncaughtError!==void 0&&(p=r.onUncaughtError),r.onCaughtError!==void 0&&(x=r.onCaughtError),r.onRecoverableError!==void 0&&(_=r.onRecoverableError),r.unstable_transitionCallbacks!==void 0&&(L=r.unstable_transitionCallbacks),r.formState!==void 0&&(G=r.formState)),t=hv(e,1,!0,t,r??null,i,u,p,x,_,L,G),t.context=mv(null),r=t.current,i=dn(),i=fo(i),u=Ba(i),u.callback=null,$a(r,u,i),r=i,t.current.lanes=r,Sr(t,r),Xn(t),e[Ne]=t.current,$f(e),new Qs(t)},si.version="19.1.0",si}var Wv;function iE(){if(Wv)return cd.exports;Wv=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(),cd.exports=oE(),cd.exports}var sE=iE();/**
56
+ * react-router v7.7.0
57
57
  *
58
58
  * Copyright (c) Remix Software Inc.
59
59
  *
@@ -61,189 +61,219 @@ 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 o0=n=>{throw TypeError(n)},N_=(n,a,l)=>a.has(n)||o0("Cannot "+l),rd=(n,a,l)=>(N_(n,a,"read from private field"),l?l.call(n):a.get(n)),R_=(n,a,l)=>a.has(n)?o0("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(n):a.set(n,l);function j_(n={}){let{initialEntries:a=["/"],initialIndex:l,v5Compat:i=!1}=n,s;s=a.map((S,C)=>v(S,typeof S=="string"?null:S.state,C===0?"default":void 0));let c=p(l??s.length-1),f="POP",h=null;function p(S){return Math.min(Math.max(S,0),s.length-1)}function m(){return s[c]}function v(S,C=null,E){let j=Md(s?m().pathname:"/",S,C,E);return Ct(j.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(S)}`),j}function b(S){return typeof S=="string"?S:ir(S)}return{get index(){return c},get action(){return f},get location(){return m()},createHref:b,createURL(S){return new URL(b(S),"http://localhost")},encodeLocation(S){let C=typeof S=="string"?Aa(S):S;return{pathname:C.pathname||"",search:C.search||"",hash:C.hash||""}},push(S,C){f="PUSH";let E=v(S,C);c+=1,s.splice(c,s.length,E),i&&h&&h({action:f,location:E,delta:1})},replace(S,C){f="REPLACE";let E=v(S,C);s[c]=E,i&&h&&h({action:f,location:E,delta:0})},go(S){f="POP";let C=p(c+S),E=s[C];c=C,h&&h({action:f,location:E,delta:S})},listen(S){return h=S,()=>{h=null}}}}function Xe(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function Ct(n,a){if(!n){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function O_(){return Math.random().toString(36).substring(2,10)}function Md(n,a,l=null,i){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof a=="string"?Aa(a):a,state:l,key:a&&a.key||i||O_()}}function ir({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 Aa(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 A_(n,a=!1){let l="http://localhost";typeof window<"u"&&(l=window.location.origin!=="null"?window.location.origin:window.location.href),Xe(l,"No window.location.(origin|href) available to create URL");let i=typeof n=="string"?n:ir(n);return i=i.replace(/ $/,"%20"),!a&&i.startsWith("//")&&(i=l+i),new URL(i,l)}var co,$v=class{constructor(n){if(R_(this,co,new Map),n)for(let[a,l]of n)this.set(a,l)}get(n){if(rd(this,co).has(n))return rd(this,co).get(n);if(n.defaultValue!==void 0)return n.defaultValue;throw new Error("No value found for context")}set(n,a){rd(this,co).set(n,a)}};co=new WeakMap;var T_=new Set(["lazy","caseSensitive","path","id","index","children"]);function M_(n){return T_.has(n)}var D_=new Set(["lazy","caseSensitive","path","id","index","unstable_middleware","children"]);function L_(n){return D_.has(n)}function k_(n){return n.index===!0}function vo(n,a,l=[],i={},s=!1){return n.map((c,f)=>{let h=[...l,String(f)],p=typeof c.id=="string"?c.id:h.join("-");if(Xe(c.index!==!0||!c.children,"Cannot specify children on an index route"),Xe(s||!i[p],`Found a route id collision on id "${p}". Route id's must be globally unique within Data Router usages`),k_(c)){let m={...c,...a(c),id:p};return i[p]=m,m}else{let m={...c,...a(c),id:p,children:void 0};return i[p]=m,c.children&&(m.children=vo(c.children,a,h,i,s)),m}})}function rr(n,a,l="/"){return rc(n,a,l,!1)}function rc(n,a,l,i){let s=typeof a=="string"?Aa(a):a,c=Tn(s.pathname||"/",l);if(c==null)return null;let f=s0(n);U_(f);let h=null;for(let p=0;h==null&&p<f.length;++p){let m=X_(c);h=G_(f[p],m,i)}return h}function z_(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 s0(n,a=[],l=[],i=""){let s=(c,f,h)=>{let p={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};p.relativePath.startsWith("/")&&(Xe(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=Jn([i,p.relativePath]),v=l.concat(p);c.children&&c.children.length>0&&(Xe(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),s0(c.children,a,v,m)),!(c.path==null&&!c.index)&&a.push({path:m,score:F_(m,c.index),routesMeta:v})};return n.forEach((c,f)=>{if(c.path===""||!c.path?.includes("?"))s(c,f);else for(let h of c0(c.path))s(c,f,h)}),a}function c0(n){let a=n.split("/");if(a.length===0)return[];let[l,...i]=a,s=l.endsWith("?"),c=l.replace(/\?$/,"");if(i.length===0)return s?[c,""]:[c];let f=c0(i.join("/")),h=[];return h.push(...f.map(p=>p===""?c:[c,p].join("/"))),s&&h.push(...f),h.map(p=>n.startsWith("/")&&p===""?"/":p)}function U_(n){n.sort((a,l)=>a.score!==l.score?l.score-a.score:Y_(a.routesMeta.map(i=>i.childrenIndex),l.routesMeta.map(i=>i.childrenIndex)))}var P_=/^:[\w-]+$/,H_=3,B_=2,$_=1,V_=10,q_=-2,Vv=n=>n==="*";function F_(n,a){let l=n.split("/"),i=l.length;return l.some(Vv)&&(i+=q_),a&&(i+=B_),l.filter(s=>!Vv(s)).reduce((s,c)=>s+(P_.test(c)?H_:c===""?$_:V_),i)}function Y_(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 G_(n,a,l=!1){let{routesMeta:i}=n,s={},c="/",f=[];for(let h=0;h<i.length;++h){let p=i[h],m=h===i.length-1,v=c==="/"?a:a.slice(c.length)||"/",b=mc({path:p.relativePath,caseSensitive:p.caseSensitive,end:m},v),w=p.route;if(!b&&m&&l&&!i[i.length-1].route.index&&(b=mc({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},v)),!b)return null;Object.assign(s,b.params),f.push({params:s,pathname:Jn([c,b.pathname]),pathnameBase:J_(Jn([c,b.pathnameBase])),route:w}),b.pathnameBase!=="/"&&(c=Jn([c,b.pathnameBase]))}return f}function mc(n,a){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[l,i]=K_(n.path,n.caseSensitive,n.end),s=a.match(l);if(!s)return null;let c=s[0],f=c.replace(/(.)\/+$/,"$1"),h=s.slice(1);return{params:i.reduce((m,{paramName:v,isOptional:b},w)=>{if(v==="*"){let C=h[w]||"";f=c.slice(0,c.length-C.length).replace(/(.)\/+$/,"$1")}const S=h[w];return b&&!S?m[v]=void 0:m[v]=(S||"").replace(/%2F/g,"/"),m},{}),pathname:c,pathnameBase:f,pattern:n}}function K_(n,a=!1,l=!0){Ct(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 X_(n){try{return n.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return Ct(!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 Tn(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 Q_({basename:n,pathname:a}){return a==="/"?n:Jn([n,a])}function I_(n,a="/"){let{pathname:l,search:i="",hash:s=""}=typeof n=="string"?Aa(n):n;return{pathname:l?l.startsWith("/")?l:Z_(l,a):a,search:W_(i),hash:eE(s)}}function Z_(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 ld(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 u0(n){return n.filter((a,l)=>l===0||a.route.path&&a.route.path.length>0)}function Ec(n){let a=u0(n);return a.map((l,i)=>i===a.length-1?l.pathname:l.pathnameBase)}function Cc(n,a,l,i=!1){let s;typeof n=="string"?s=Aa(n):(s={...n},Xe(!s.pathname||!s.pathname.includes("?"),ld("?","pathname","search",s)),Xe(!s.pathname||!s.pathname.includes("#"),ld("#","pathname","hash",s)),Xe(!s.search||!s.search.includes("#"),ld("#","search","hash",s)));let c=n===""||s.pathname==="",f=c?"/":s.pathname,h;if(f==null)h=l;else{let b=a.length-1;if(!i&&f.startsWith("..")){let w=f.split("/");for(;w[0]==="..";)w.shift(),b-=1;s.pathname=w.join("/")}h=b>=0?a[b]:"/"}let p=I_(s,h),m=f&&f!=="/"&&f.endsWith("/"),v=(c||f===".")&&l.endsWith("/");return!p.pathname.endsWith("/")&&(m||v)&&(p.pathname+="/"),p}var Jn=n=>n.join("/").replace(/\/\/+/g,"/"),J_=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),W_=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,eE=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,Dd=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 yo(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}var f0=["POST","PUT","PATCH","DELETE"],tE=new Set(f0),nE=["GET",...f0],aE=new Set(nE),rE=new Set([301,302,303,307,308]),lE=new Set([307,308]),id={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},iE={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ro={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},oE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,th=n=>oE.test(n),sE=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),d0="remix-router-transitions",h0=Symbol("ResetLoaderData");function cE(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";Xe(n.routes.length>0,"You must provide a non-empty routes array to createRouter");let i=n.hydrationRouteProperties||[],s=n.mapRouteProperties||sE,c={},f=vo(n.routes,s,void 0,c),h,p=n.basename||"/",m=n.dataStrategy||mE,v={unstable_middleware:!1,...n.future},b=null,w=new Set,S=null,C=null,E=null,j=n.hydrationData!=null,R=rr(f,n.history.location,p),L=!1,k=null,H;if(R==null&&!n.patchRoutesOnNavigation){let D=On(404,{pathname:n.history.location.pathname}),{matches:q,route:W}=ey(f);H=!0,R=q,k={[W.id]:D}}else if(R&&!n.hydrationData&&wr(R,f,n.history.location.pathname).active&&(R=null),R)if(R.some(D=>D.route.lazy))H=!1;else if(!R.some(D=>D.route.loader))H=!0;else{let D=n.hydrationData?n.hydrationData.loaderData:null,q=n.hydrationData?n.hydrationData.errors:null;if(q){let W=R.findIndex(ce=>q[ce.route.id]!==void 0);H=R.slice(0,W+1).every(ce=>!kd(ce.route,D,q))}else H=R.every(W=>!kd(W.route,D,q))}else{H=!1,R=[];let D=wr(null,f,n.history.location.pathname);D.active&&D.matches&&(L=!0,R=D.matches)}let M,N={historyAction:n.history.action,location:n.history.location,matches:R,initialized:H,navigation:id,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||k,fetchers:new Map,blockers:new Map},B="POP",J=!1,te,ae=!1,re=new Map,fe=null,de=!1,Q=!1,ee=new Set,A=new Map,X=0,V=-1,ye=new Map,O=new Set,G=new Map,U=new Map,K=new Set,P=new Map,oe,me=null;function ve(){if(b=n.history.listen(({action:D,location:q,delta:W})=>{if(oe){oe(),oe=void 0;return}Ct(P.size===0||W!=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 ce=To({currentLocation:N.location,nextLocation:q,historyAction:D});if(ce&&W!=null){let pe=new Promise(Se=>{oe=Se});n.history.go(W*-1),Vn(ce,{state:"blocked",location:q,proceed(){Vn(ce,{state:"proceeding",proceed:void 0,reset:void 0,location:q}),pe.then(()=>n.history.go(W))},reset(){let Se=new Map(N.blockers);Se.set(ce,ro),Je({blockers:Se})}});return}return ie(D,q)}),l){CE(a,re);let D=()=>NE(a,re);a.addEventListener("pagehide",D),fe=()=>a.removeEventListener("pagehide",D)}return N.initialized||ie("POP",N.location,{initialHydration:!0}),M}function Le(){b&&b(),fe&&fe(),w.clear(),te&&te.abort(),N.fetchers.forEach((D,q)=>Ht(q)),N.blockers.forEach((D,q)=>br(q))}function Fe(D){return w.add(D),()=>w.delete(D)}function Je(D,q={}){D.matches&&(D.matches=D.matches.map(pe=>{let Se=c[pe.route.id],Ne=pe.route;return Ne.element!==Se.element||Ne.errorElement!==Se.errorElement||Ne.hydrateFallbackElement!==Se.hydrateFallbackElement?{...pe,route:Se}:pe})),N={...N,...D};let W=[],ce=[];N.fetchers.forEach((pe,Se)=>{pe.state==="idle"&&(K.has(Se)?W.push(Se):ce.push(Se))}),K.forEach(pe=>{!N.fetchers.has(pe)&&!A.has(pe)&&W.push(pe)}),[...w].forEach(pe=>pe(N,{deletedFetchers:W,viewTransitionOpts:q.viewTransitionOpts,flushSync:q.flushSync===!0})),W.forEach(pe=>Ht(pe)),ce.forEach(pe=>N.fetchers.delete(pe))}function Tt(D,q,{flushSync:W}={}){let ce=N.actionData!=null&&N.navigation.formMethod!=null&&tn(N.navigation.formMethod)&&N.navigation.state==="loading"&&D.state?._isRedirect!==!0,pe;q.actionData?Object.keys(q.actionData).length>0?pe=q.actionData:pe=null:ce?pe=N.actionData:pe=null;let Se=q.loaderData?Jv(N.loaderData,q.loaderData,q.matches||[],q.errors):N.loaderData,Ne=N.blockers;Ne.size>0&&(Ne=new Map(Ne),Ne.forEach((Ee,Re)=>Ne.set(Re,ro)));let _e=de?!1:Do(D,q.matches||N.matches),Ae=J===!0||N.navigation.formMethod!=null&&tn(N.navigation.formMethod)&&D.state?._isRedirect!==!0;h&&(f=h,h=void 0),de||B==="POP"||(B==="PUSH"?n.history.push(D,D.state):B==="REPLACE"&&n.history.replace(D,D.state));let Te;if(B==="POP"){let Ee=re.get(N.location.pathname);Ee&&Ee.has(D.pathname)?Te={currentLocation:N.location,nextLocation:D}:re.has(D.pathname)&&(Te={currentLocation:D,nextLocation:N.location})}else if(ae){let Ee=re.get(N.location.pathname);Ee?Ee.add(D.pathname):(Ee=new Set([D.pathname]),re.set(N.location.pathname,Ee)),Te={currentLocation:N.location,nextLocation:D}}Je({...q,actionData:pe,loaderData:Se,historyAction:B,location:D,initialized:!0,navigation:id,revalidation:"idle",restoreScrollPosition:_e,preventScrollReset:Ae,blockers:Ne},{viewTransitionOpts:Te,flushSync:W===!0}),B="POP",J=!1,ae=!1,de=!1,Q=!1,me?.resolve(),me=null}async function Ze(D,q){if(typeof D=="number"){n.history.go(D);return}let W=Ld(N.location,N.matches,p,D,q?.fromRouteId,q?.relative),{path:ce,submission:pe,error:Se}=qv(!1,W,q),Ne=N.location,_e=Md(N.location,ce,q&&q.state);_e={..._e,...n.history.encodeLocation(_e)};let Ae=q&&q.replace!=null?q.replace:void 0,Te="PUSH";Ae===!0?Te="REPLACE":Ae===!1||pe!=null&&tn(pe.formMethod)&&pe.formAction===N.location.pathname+N.location.search&&(Te="REPLACE");let Ee=q&&"preventScrollReset"in q?q.preventScrollReset===!0:void 0,Re=(q&&q.flushSync)===!0,$e=To({currentLocation:Ne,nextLocation:_e,historyAction:Te});if($e){Vn($e,{state:"blocked",location:_e,proceed(){Vn($e,{state:"proceeding",proceed:void 0,reset:void 0,location:_e}),Ze(D,q)},reset(){let at=new Map(N.blockers);at.set($e,ro),Je({blockers:at})}});return}await ie(Te,_e,{submission:pe,pendingError:Se,preventScrollReset:Ee,replace:q&&q.replace,enableViewTransition:q&&q.viewTransition,flushSync:Re})}function an(){me||(me=RE()),ii(),Je({revalidation:"loading"});let D=me.promise;return N.navigation.state==="submitting"?D:N.navigation.state==="idle"?(ie(N.historyAction,N.location,{startUninterruptedRevalidation:!0}),D):(ie(B||N.historyAction,N.navigation.location,{overrideNavigation:N.navigation,enableViewTransition:ae===!0}),D)}async function ie(D,q,W){te&&te.abort(),te=null,B=D,de=(W&&W.startUninterruptedRevalidation)===!0,xr(N.location,N.matches),J=(W&&W.preventScrollReset)===!0,ae=(W&&W.enableViewTransition)===!0;let ce=h||f,pe=W&&W.overrideNavigation,Se=W?.initialHydration&&N.matches&&N.matches.length>0&&!L?N.matches:rr(ce,q,p),Ne=(W&&W.flushSync)===!0;if(Se&&N.initialized&&!Q&&xE(N.location,q)&&!(W&&W.submission&&tn(W.submission.formMethod))){Tt(q,{matches:Se},{flushSync:Ne});return}let _e=wr(Se,ce,q.pathname);if(_e.active&&_e.matches&&(Se=_e.matches),!Se){let{error:St,notFoundMatches:He,route:it}=el(q.pathname);Tt(q,{matches:He,loaderData:{},errors:{[it.id]:St}},{flushSync:Ne});return}te=new AbortController;let Ae=ql(n.history,q,te.signal,W&&W.submission),Te=new $v(n.unstable_getContext?await n.unstable_getContext():void 0),Ee;if(W&&W.pendingError)Ee=[$r(Se).route.id,{type:"error",error:W.pendingError}];else if(W&&W.submission&&tn(W.submission.formMethod)){let St=await ue(Ae,q,W.submission,Se,Te,_e.active,W&&W.initialHydration===!0,{replace:W.replace,flushSync:Ne});if(St.shortCircuited)return;if(St.pendingActionResult){let[He,it]=St.pendingActionResult;if(hn(it)&&yo(it.error)&&it.error.status===404){te=null,Tt(q,{matches:St.matches,loaderData:{},errors:{[He]:it.error}});return}}Se=St.matches||Se,Ee=St.pendingActionResult,pe=od(q,W.submission),Ne=!1,_e.active=!1,Ae=ql(n.history,Ae.url,Ae.signal)}let{shortCircuited:Re,matches:$e,loaderData:at,errors:wt}=await ge(Ae,q,Se,Te,_e.active,pe,W&&W.submission,W&&W.fetcherSubmission,W&&W.replace,W&&W.initialHydration===!0,Ne,Ee);Re||(te=null,Tt(q,{matches:$e||Se,...Wv(Ee),loaderData:at,errors:wt}))}async function ue(D,q,W,ce,pe,Se,Ne,_e={}){ii();let Ae=_E(q,W);if(Je({navigation:Ae},{flushSync:_e.flushSync===!0}),Se){let Re=await Sr(ce,q.pathname,D.signal);if(Re.type==="aborted")return{shortCircuited:!0};if(Re.type==="error"){let $e=$r(Re.partialMatches).route.id;return{matches:Re.partialMatches,pendingActionResult:[$e,{type:"error",error:Re.error}]}}else if(Re.matches)ce=Re.matches;else{let{notFoundMatches:$e,error:at,route:wt}=el(q.pathname);return{matches:$e,pendingActionResult:[wt.id,{type:"error",error:at}]}}}let Te,Ee=lc(ce,q);if(!Ee.route.action&&!Ee.route.lazy)Te={type:"error",error:On(405,{method:D.method,pathname:q.pathname,routeId:Ee.route.id})};else{let Re=Kl(s,c,D,ce,Ee,Ne?[]:i,pe),$e=await Bn(D,Re,pe,null);if(Te=$e[Ee.route.id],!Te){for(let at of ce)if($e[at.route.id]){Te=$e[at.route.id];break}}if(D.signal.aborted)return{shortCircuited:!0}}if(qr(Te)){let Re;return _e&&_e.replace!=null?Re=_e.replace:Re=Qv(Te.response.headers.get("Location"),new URL(D.url),p)===N.location.pathname+N.location.search,await Ft(D,Te,!0,{submission:W,replace:Re}),{shortCircuited:!0}}if(hn(Te)){let Re=$r(ce,Ee.route.id);return(_e&&_e.replace)!==!0&&(B="PUSH"),{matches:ce,pendingActionResult:[Re.route.id,Te,Ee.route.id]}}return{matches:ce,pendingActionResult:[Ee.route.id,Te]}}async function ge(D,q,W,ce,pe,Se,Ne,_e,Ae,Te,Ee,Re){let $e=Se||od(q,Ne),at=Ne||_e||ny($e),wt=!de&&!Te;if(pe){if(wt){let jt=he(Re);Je({navigation:$e,...jt!==void 0?{actionData:jt}:{}},{flushSync:Ee})}let Ye=await Sr(W,q.pathname,D.signal);if(Ye.type==="aborted")return{shortCircuited:!0};if(Ye.type==="error"){let jt=$r(Ye.partialMatches).route.id;return{matches:Ye.partialMatches,loaderData:{},errors:{[jt]:Ye.error}}}else if(Ye.matches)W=Ye.matches;else{let{error:jt,notFoundMatches:_r,route:bn}=el(q.pathname);return{matches:_r,loaderData:{},errors:{[bn.id]:jt}}}}let St=h||f,{dsMatches:He,revalidatingFetchers:it}=Fv(D,ce,s,c,n.history,N,W,at,q,Te?[]:i,Te===!0,Q,ee,K,G,O,St,p,n.patchRoutesOnNavigation!=null,Re);if(V=++X,!n.dataStrategy&&!He.some(Ye=>Ye.shouldLoad)&&it.length===0){let Ye=vr();return Tt(q,{matches:W,loaderData:{},errors:Re&&hn(Re[1])?{[Re[0]]:Re[1].error}:null,...Wv(Re),...Ye?{fetchers:new Map(N.fetchers)}:{}},{flushSync:Ee}),{shortCircuited:!0}}if(wt){let Ye={};if(!pe){Ye.navigation=$e;let jt=he(Re);jt!==void 0&&(Ye.actionData=jt)}it.length>0&&(Ye.fetchers=Oe(it)),Je(Ye,{flushSync:Ee})}it.forEach(Ye=>{$n(Ye.key),Ye.controller&&A.set(Ye.key,Ye.controller)});let qn=()=>it.forEach(Ye=>$n(Ye.key));te&&te.signal.addEventListener("abort",qn);let{loaderResults:rn,fetcherResults:Xt}=await Oo(He,it,D,ce);if(D.signal.aborted)return{shortCircuited:!0};te&&te.signal.removeEventListener("abort",qn),it.forEach(Ye=>A.delete(Ye.key));let yn=Ys(rn);if(yn)return await Ft(D,yn.result,!0,{replace:Ae}),{shortCircuited:!0};if(yn=Ys(Xt),yn)return O.add(yn.key),await Ft(D,yn.result,!0,{replace:Ae}),{shortCircuited:!0};let{loaderData:nl,errors:Ta}=Zv(N,W,rn,Re,it,Xt);Te&&N.errors&&(Ta={...N.errors,...Ta});let la=vr(),ia=yr(V),oa=la||ia||it.length>0;return{matches:W,loaderData:nl,errors:Ta,...oa?{fetchers:new Map(N.fetchers)}:{}}}function he(D){if(D&&!hn(D[1]))return{[D[0]]:D[1].data};if(N.actionData)return Object.keys(N.actionData).length===0?null:N.actionData}function Oe(D){return D.forEach(q=>{let W=N.fetchers.get(q.key),ce=lo(void 0,W?W.data:void 0);N.fetchers.set(q.key,ce)}),new Map(N.fetchers)}async function ke(D,q,W,ce){$n(D);let pe=(ce&&ce.flushSync)===!0,Se=h||f,Ne=Ld(N.location,N.matches,p,W,q,ce?.relative),_e=rr(Se,Ne,p),Ae=wr(_e,Se,Ne);if(Ae.active&&Ae.matches&&(_e=Ae.matches),!_e){vt(D,q,On(404,{pathname:Ne}),{flushSync:pe});return}let{path:Te,submission:Ee,error:Re}=qv(!0,Ne,ce);if(Re){vt(D,q,Re,{flushSync:pe});return}let $e=new $v(n.unstable_getContext?await n.unstable_getContext():void 0),at=(ce&&ce.preventScrollReset)===!0;if(Ee&&tn(Ee.formMethod)){await Pe(D,q,Te,_e,$e,Ae.active,pe,at,Ee);return}G.set(D,{routeId:q,path:Te}),await nt(D,q,Te,_e,$e,Ae.active,pe,at,Ee)}async function Pe(D,q,W,ce,pe,Se,Ne,_e,Ae){ii(),G.delete(D);let Te=N.fetchers.get(D);It(D,EE(Ae,Te),{flushSync:Ne});let Ee=new AbortController,Re=ql(n.history,W,Ee.signal,Ae);if(Se){let yt=await Sr(ce,new URL(Re.url).pathname,Re.signal,D);if(yt.type==="aborted")return;if(yt.type==="error"){vt(D,q,yt.error,{flushSync:Ne});return}else if(yt.matches)ce=yt.matches;else{vt(D,q,On(404,{pathname:W}),{flushSync:Ne});return}}let $e=lc(ce,W);if(!$e.route.action&&!$e.route.lazy){let yt=On(405,{method:Ae.formMethod,pathname:W,routeId:q});vt(D,q,yt,{flushSync:Ne});return}A.set(D,Ee);let at=X,wt=Kl(s,c,Re,ce,$e,i,pe),He=(await Bn(Re,wt,pe,D))[$e.route.id];if(Re.signal.aborted){A.get(D)===Ee&&A.delete(D);return}if(K.has(D)){if(qr(He)||hn(He)){It(D,nr(void 0));return}}else{if(qr(He))if(A.delete(D),V>at){It(D,nr(void 0));return}else return O.add(D),It(D,lo(Ae)),Ft(Re,He,!1,{fetcherSubmission:Ae,preventScrollReset:_e});if(hn(He)){vt(D,q,He.error);return}}let it=N.navigation.location||N.location,qn=ql(n.history,it,Ee.signal),rn=h||f,Xt=N.navigation.state!=="idle"?rr(rn,N.navigation.location,p):N.matches;Xe(Xt,"Didn't find any matches after fetcher action");let yn=++X;ye.set(D,yn);let nl=lo(Ae,He.data);N.fetchers.set(D,nl);let{dsMatches:Ta,revalidatingFetchers:la}=Fv(qn,pe,s,c,n.history,N,Xt,Ae,it,i,!1,Q,ee,K,G,O,rn,p,n.patchRoutesOnNavigation!=null,[$e.route.id,He]);la.filter(yt=>yt.key!==D).forEach(yt=>{let Ma=yt.key,Lo=N.fetchers.get(Ma),ko=lo(void 0,Lo?Lo.data:void 0);N.fetchers.set(Ma,ko),$n(Ma),yt.controller&&A.set(Ma,yt.controller)}),Je({fetchers:new Map(N.fetchers)});let ia=()=>la.forEach(yt=>$n(yt.key));Ee.signal.addEventListener("abort",ia);let{loaderResults:oa,fetcherResults:Ye}=await Oo(Ta,la,qn,pe);if(Ee.signal.aborted)return;if(Ee.signal.removeEventListener("abort",ia),ye.delete(D),A.delete(D),la.forEach(yt=>A.delete(yt.key)),N.fetchers.has(D)){let yt=nr(He.data);N.fetchers.set(D,yt)}let jt=Ys(oa);if(jt)return Ft(qn,jt.result,!1,{preventScrollReset:_e});if(jt=Ys(Ye),jt)return O.add(jt.key),Ft(qn,jt.result,!1,{preventScrollReset:_e});let{loaderData:_r,errors:bn}=Zv(N,Xt,oa,void 0,la,Ye);yr(yn),N.navigation.state==="loading"&&yn>V?(Xe(B,"Expected pending action"),te&&te.abort(),Tt(N.navigation.location,{matches:Xt,loaderData:_r,errors:bn,fetchers:new Map(N.fetchers)})):(Je({errors:bn,loaderData:Jv(N.loaderData,_r,Xt,bn),fetchers:new Map(N.fetchers)}),Q=!1)}async function nt(D,q,W,ce,pe,Se,Ne,_e,Ae){let Te=N.fetchers.get(D);It(D,lo(Ae,Te?Te.data:void 0),{flushSync:Ne});let Ee=new AbortController,Re=ql(n.history,W,Ee.signal);if(Se){let it=await Sr(ce,new URL(Re.url).pathname,Re.signal,D);if(it.type==="aborted")return;if(it.type==="error"){vt(D,q,it.error,{flushSync:Ne});return}else if(it.matches)ce=it.matches;else{vt(D,q,On(404,{pathname:W}),{flushSync:Ne});return}}let $e=lc(ce,W);A.set(D,Ee);let at=X,wt=Kl(s,c,Re,ce,$e,i,pe),He=(await Bn(Re,wt,pe,D))[$e.route.id];if(A.get(D)===Ee&&A.delete(D),!Re.signal.aborted){if(K.has(D)){It(D,nr(void 0));return}if(qr(He))if(V>at){It(D,nr(void 0));return}else{O.add(D),await Ft(Re,He,!1,{preventScrollReset:_e});return}if(hn(He)){vt(D,q,He.error);return}It(D,nr(He.data))}}async function Ft(D,q,W,{submission:ce,fetcherSubmission:pe,preventScrollReset:Se,replace:Ne}={}){q.response.headers.has("X-Remix-Revalidate")&&(Q=!0);let _e=q.response.headers.get("Location");Xe(_e,"Expected a Location header on the redirect Response"),_e=Qv(_e,new URL(D.url),p);let Ae=Md(N.location,_e,{_isRedirect:!0});if(l){let wt=!1;if(q.response.headers.has("X-Remix-Reload-Document"))wt=!0;else if(th(_e)){const St=A_(_e,!0);wt=St.origin!==a.location.origin||Tn(St.pathname,p)==null}if(wt){Ne?a.location.replace(_e):a.location.assign(_e);return}}te=null;let Te=Ne===!0||q.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Ee,formAction:Re,formEncType:$e}=N.navigation;!ce&&!pe&&Ee&&Re&&$e&&(ce=ny(N.navigation));let at=ce||pe;if(lE.has(q.response.status)&&at&&tn(at.formMethod))await ie(Te,Ae,{submission:{...at,formAction:_e},preventScrollReset:Se||J,enableViewTransition:W?ae:void 0});else{let wt=od(Ae,ce);await ie(Te,Ae,{overrideNavigation:wt,fetcherSubmission:pe,preventScrollReset:Se||J,enableViewTransition:W?ae:void 0})}}async function Bn(D,q,W,ce){let pe,Se={};try{pe=await pE(m,D,q,ce,W,!1)}catch(Ne){return q.filter(_e=>_e.shouldLoad).forEach(_e=>{Se[_e.route.id]={type:"error",error:Ne}}),Se}if(D.signal.aborted)return Se;for(let[Ne,_e]of Object.entries(pe))if(wE(_e)){let Ae=_e.result;Se[Ne]={type:"redirect",response:yE(Ae,D,Ne,q,p)}}else Se[Ne]=await vE(_e);return Se}async function Oo(D,q,W,ce){let pe=Bn(W,D,ce,null),Se=Promise.all(q.map(async Ae=>{if(Ae.matches&&Ae.match&&Ae.request&&Ae.controller){let Ee=(await Bn(Ae.request,Ae.matches,ce,Ae.key))[Ae.match.route.id];return{[Ae.key]:Ee}}else return Promise.resolve({[Ae.key]:{type:"error",error:On(404,{pathname:Ae.path})}})})),Ne=await pe,_e=(await Se).reduce((Ae,Te)=>Object.assign(Ae,Te),{});return{loaderResults:Ne,fetcherResults:_e}}function ii(){Q=!0,G.forEach((D,q)=>{A.has(q)&&ee.add(q),$n(q)})}function It(D,q,W={}){N.fetchers.set(D,q),Je({fetchers:new Map(N.fetchers)},{flushSync:(W&&W.flushSync)===!0})}function vt(D,q,W,ce={}){let pe=$r(N.matches,q);Ht(D),Je({errors:{[pe.route.id]:W},fetchers:new Map(N.fetchers)},{flushSync:(ce&&ce.flushSync)===!0})}function Mn(D){return U.set(D,(U.get(D)||0)+1),K.has(D)&&K.delete(D),N.fetchers.get(D)||iE}function Ht(D){let q=N.fetchers.get(D);A.has(D)&&!(q&&q.state==="loading"&&ye.has(D))&&$n(D),G.delete(D),ye.delete(D),O.delete(D),K.delete(D),ee.delete(D),N.fetchers.delete(D)}function Gc(D){let q=(U.get(D)||0)-1;q<=0?(U.delete(D),K.add(D)):U.set(D,q),Je({fetchers:new Map(N.fetchers)})}function $n(D){let q=A.get(D);q&&(q.abort(),A.delete(D))}function Ao(D){for(let q of D){let W=Mn(q),ce=nr(W.data);N.fetchers.set(q,ce)}}function vr(){let D=[],q=!1;for(let W of O){let ce=N.fetchers.get(W);Xe(ce,`Expected fetcher: ${W}`),ce.state==="loading"&&(O.delete(W),D.push(W),q=!0)}return Ao(D),q}function yr(D){let q=[];for(let[W,ce]of ye)if(ce<D){let pe=N.fetchers.get(W);Xe(pe,`Expected fetcher: ${W}`),pe.state==="loading"&&($n(W),ye.delete(W),q.push(W))}return Ao(q),q.length>0}function ra(D,q){let W=N.blockers.get(D)||ro;return P.get(D)!==q&&P.set(D,q),W}function br(D){N.blockers.delete(D),P.delete(D)}function Vn(D,q){let W=N.blockers.get(D)||ro;Xe(W.state==="unblocked"&&q.state==="blocked"||W.state==="blocked"&&q.state==="blocked"||W.state==="blocked"&&q.state==="proceeding"||W.state==="blocked"&&q.state==="unblocked"||W.state==="proceeding"&&q.state==="unblocked",`Invalid blocker state transition: ${W.state} -> ${q.state}`);let ce=new Map(N.blockers);ce.set(D,q),Je({blockers:ce})}function To({currentLocation:D,nextLocation:q,historyAction:W}){if(P.size===0)return;P.size>1&&Ct(!1,"A router only supports one blocker at a time");let ce=Array.from(P.entries()),[pe,Se]=ce[ce.length-1],Ne=N.blockers.get(pe);if(!(Ne&&Ne.state==="proceeding")&&Se({currentLocation:D,nextLocation:q,historyAction:W}))return pe}function el(D){let q=On(404,{pathname:D}),W=h||f,{matches:ce,route:pe}=ey(W);return{notFoundMatches:ce,route:pe,error:q}}function Mo(D,q,W){if(S=D,E=q,C=W||null,!j&&N.navigation===id){j=!0;let ce=Do(N.location,N.matches);ce!=null&&Je({restoreScrollPosition:ce})}return()=>{S=null,E=null,C=null}}function tl(D,q){return C&&C(D,q.map(ce=>z_(ce,N.loaderData)))||D.key}function xr(D,q){if(S&&E){let W=tl(D,q);S[W]=E()}}function Do(D,q){if(S){let W=tl(D,q),ce=S[W];if(typeof ce=="number")return ce}return null}function wr(D,q,W){if(n.patchRoutesOnNavigation)if(D){if(Object.keys(D[0].params).length>0)return{active:!0,matches:rc(q,W,p,!0)}}else return{active:!0,matches:rc(q,W,p,!0)||[]};return{active:!1,matches:null}}async function Sr(D,q,W,ce){if(!n.patchRoutesOnNavigation)return{type:"success",matches:D};let pe=D;for(;;){let Se=h==null,Ne=h||f,_e=c;try{await n.patchRoutesOnNavigation({signal:W,path:q,matches:pe,fetcherKey:ce,patch:(Ee,Re)=>{W.aborted||Yv(Ee,Re,Ne,_e,s,!1)}})}catch(Ee){return{type:"error",error:Ee,partialMatches:pe}}finally{Se&&!W.aborted&&(f=[...f])}if(W.aborted)return{type:"aborted"};let Ae=rr(Ne,q,p);if(Ae)return{type:"success",matches:Ae};let Te=rc(Ne,q,p,!0);if(!Te||pe.length===Te.length&&pe.every((Ee,Re)=>Ee.route.id===Te[Re].route.id))return{type:"success",matches:null};pe=Te}}function oi(D){c={},h=vo(D,s,void 0,c)}function si(D,q,W=!1){let ce=h==null;Yv(D,q,h||f,c,s,W),ce&&(f=[...f],Je({}))}return M={get basename(){return p},get future(){return v},get state(){return N},get routes(){return f},get window(){return a},initialize:ve,subscribe:Fe,enableScrollRestoration:Mo,navigate:Ze,fetch:ke,revalidate:an,createHref:D=>n.history.createHref(D),encodeLocation:D=>n.history.encodeLocation(D),getFetcher:Mn,deleteFetcher:Gc,dispose:Le,getBlocker:ra,deleteBlocker:br,patchRoutes:si,_internalFetchControllers:A,_internalSetRoutes:oi,_internalSetStateDoNotUseOrYouWillBreakYourApp(D){Je(D)}},M}function uE(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function Ld(n,a,l,i,s,c){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=Cc(i||".",Ec(f),Tn(n.pathname,l)||n.pathname,c==="path");if(i==null&&(p.search=n.search,p.hash=n.hash),(i==null||i===""||i===".")&&h){let m=nh(p.search);if(h.route.index&&!m)p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index";else if(!h.route.index&&m){let v=new URLSearchParams(p.search),b=v.getAll("index");v.delete("index"),b.filter(S=>S).forEach(S=>v.append("index",S));let w=v.toString();p.search=w?`?${w}`:""}}return l!=="/"&&(p.pathname=Q_({basename:l,pathname:p.pathname})),ir(p)}function qv(n,a,l){if(!l||!uE(l))return{path:a};if(l.formMethod&&!SE(l.formMethod))return{path:a,error:On(405,{method:l.formMethod})};let i=()=>({path:a,error:On(400,{type:"invalid-body"})}),c=(l.formMethod||"get").toUpperCase(),f=b0(a);if(l.body!==void 0){if(l.formEncType==="text/plain"){if(!tn(c))return i();let b=typeof l.body=="string"?l.body:l.body instanceof FormData||l.body instanceof URLSearchParams?Array.from(l.body.entries()).reduce((w,[S,C])=>`${w}${S}=${C}
65
- `,""):String(l.body);return{path:a,submission:{formMethod:c,formAction:f,formEncType:l.formEncType,formData:void 0,json:void 0,text:b}}}else if(l.formEncType==="application/json"){if(!tn(c))return i();try{let b=typeof l.body=="string"?JSON.parse(l.body):l.body;return{path:a,submission:{formMethod:c,formAction:f,formEncType:l.formEncType,formData:void 0,json:b,text:void 0}}}catch{return i()}}}Xe(typeof FormData=="function","FormData is not available in this environment");let h,p;if(l.formData)h=Ud(l.formData),p=l.formData;else if(l.body instanceof FormData)h=Ud(l.body),p=l.body;else if(l.body instanceof URLSearchParams)h=l.body,p=Iv(h);else if(l.body==null)h=new URLSearchParams,p=new FormData;else try{h=new URLSearchParams(l.body),p=Iv(h)}catch{return i()}let m={formMethod:c,formAction:f,formEncType:l&&l.formEncType||"application/x-www-form-urlencoded",formData:p,json:void 0,text:void 0};if(tn(m.formMethod))return{path:a,submission:m};let v=Aa(a);return n&&v.search&&nh(v.search)&&h.append("index",""),v.search=`?${h}`,{path:ir(v),submission:m}}function Fv(n,a,l,i,s,c,f,h,p,m,v,b,w,S,C,E,j,R,L,k){let H=k?hn(k[1])?k[1].error:k[1].data:void 0,M=s.createURL(c.location),N=s.createURL(p),B;if(v&&c.errors){let de=Object.keys(c.errors)[0];B=f.findIndex(Q=>Q.route.id===de)}else if(k&&hn(k[1])){let de=k[0];B=f.findIndex(Q=>Q.route.id===de)-1}let J=k?k[1].statusCode:void 0,te=J&&J>=400,ae={currentUrl:M,currentParams:c.matches[0]?.params||{},nextUrl:N,nextParams:f[0].params,...h,actionResult:H,actionStatus:J},re=f.map((de,Q)=>{let{route:ee}=de,A=null;if(B!=null&&Q>B?A=!1:ee.lazy?A=!0:ee.loader==null?A=!1:v?A=kd(ee,c.loaderData,c.errors):fE(c.loaderData,c.matches[Q],de)&&(A=!0),A!==null)return zd(l,i,n,de,m,a,A);let X=te?!1:b||M.pathname+M.search===N.pathname+N.search||M.search!==N.search||dE(c.matches[Q],de),V={...ae,defaultShouldRevalidate:X},ye=pc(de,V);return zd(l,i,n,de,m,a,ye,V)}),fe=[];return C.forEach((de,Q)=>{if(v||!f.some(U=>U.route.id===de.routeId)||S.has(Q))return;let ee=c.fetchers.get(Q),A=ee&&ee.state!=="idle"&&ee.data===void 0,X=rr(j,de.path,R);if(!X){if(L&&A)return;fe.push({key:Q,routeId:de.routeId,path:de.path,matches:null,match:null,request:null,controller:null});return}if(E.has(Q))return;let V=lc(X,de.path),ye=new AbortController,O=ql(s,de.path,ye.signal),G=null;if(w.has(Q))w.delete(Q),G=Kl(l,i,O,X,V,m,a);else if(A)b&&(G=Kl(l,i,O,X,V,m,a));else{let U={...ae,defaultShouldRevalidate:te?!1:b};pc(V,U)&&(G=Kl(l,i,O,X,V,m,a,U))}G&&fe.push({key:Q,routeId:de.routeId,path:de.path,matches:G,match:V,request:O,controller:ye})}),{dsMatches:re,revalidatingFetchers:fe}}function kd(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 fE(n,a,l){let i=!a||l.route.id!==a.route.id,s=!n.hasOwnProperty(l.route.id);return i||s}function dE(n,a){let l=n.route.path;return n.pathname!==a.pathname||l!=null&&l.endsWith("*")&&n.params["*"]!==a.params["*"]}function pc(n,a){if(n.route.shouldRevalidate){let l=n.route.shouldRevalidate(a);if(typeof l=="boolean")return l}return a.defaultShouldRevalidate}function Yv(n,a,l,i,s,c){let f;if(n){let m=i[n];Xe(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 v=f.find(b=>m0(m,b));v?p.push({existingRoute:v,newRoute:m}):h.push(m)}),h.length>0){let m=vo(h,s,[n||"_","patch",String(f?.length||"0")],i);f.push(...m)}if(c&&p.length>0)for(let m=0;m<p.length;m++){let{existingRoute:v,newRoute:b}=p[m],w=v,[S]=vo([b],s,[],{},!0);Object.assign(w,{element:S.element?S.element:w.element,errorElement:S.errorElement?S.errorElement:w.errorElement,hydrateFallbackElement:S.hydrateFallbackElement?S.hydrateFallbackElement:w.hydrateFallbackElement})}}function m0(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=>m0(l,s))):!1}var Gv=new WeakMap,p0=({key:n,route:a,manifest:l,mapRouteProperties:i})=>{let s=l[a.id];if(Xe(s,"No route found in manifest"),!s.lazy||typeof s.lazy!="object")return;let c=s.lazy[n];if(!c)return;let f=Gv.get(s);f||(f={},Gv.set(s,f));let h=f[n];if(h)return h;let p=(async()=>{let m=M_(n),b=s[n]!==void 0&&n!=="hasErrorBoundary";if(m)Ct(!m,"Route property "+n+" is not a supported lazy route property. This property will be ignored."),f[n]=Promise.resolve();else if(b)Ct(!1,`Route "${s.id}" has a static property "${n}" defined. The lazy property will be ignored.`);else{let w=await c();w!=null&&(Object.assign(s,{[n]:w}),Object.assign(s,i(s)))}typeof s.lazy=="object"&&(s.lazy[n]=void 0,Object.values(s.lazy).every(w=>w===void 0)&&(s.lazy=void 0))})();return f[n]=p,p},Kv=new WeakMap;function hE(n,a,l,i,s){let c=l[n.id];if(Xe(c,"No route found in manifest"),!n.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof n.lazy=="function"){let v=Kv.get(c);if(v)return{lazyRoutePromise:v,lazyHandlerPromise:v};let b=(async()=>{Xe(typeof n.lazy=="function","No lazy route function found");let w=await n.lazy(),S={};for(let C in w){let E=w[C];if(E===void 0)continue;let j=L_(C),L=c[C]!==void 0&&C!=="hasErrorBoundary";j?Ct(!j,"Route property "+C+" is not a supported property to be returned from a lazy route function. This property will be ignored."):L?Ct(!L,`Route "${c.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.`):S[C]=E}Object.assign(c,S),Object.assign(c,{...i(c),lazy:void 0})})();return Kv.set(c,b),b.catch(()=>{}),{lazyRoutePromise:b,lazyHandlerPromise:b}}let f=Object.keys(n.lazy),h=[],p;for(let v of f){if(s&&s.includes(v))continue;let b=p0({key:v,route:n,manifest:l,mapRouteProperties:i});b&&(h.push(b),v===a&&(p=b))}let m=h.length>0?Promise.all(h).then(()=>{}):void 0;return m?.catch(()=>{}),p?.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:p}}async function Xv(n){let a=n.matches.filter(s=>s.shouldLoad),l={};return(await Promise.all(a.map(s=>s.resolve()))).forEach((s,c)=>{l[a[c].route.id]=s}),l}async function mE(n){return n.matches.some(a=>a.route.unstable_middleware)?g0(n,!1,()=>Xv(n),(a,l)=>({[l]:{type:"error",result:a}})):Xv(n)}async function g0(n,a,l,i){let{matches:s,request:c,params:f,context:h}=n,p={handlerResult:void 0};try{let m=s.flatMap(b=>b.route.unstable_middleware?b.route.unstable_middleware.map(w=>[b.route.id,w]):[]),v=await v0({request:c,params:f,context:h},m,a,p,l);return a?v:p.handlerResult}catch(m){if(!p.middlewareError)throw m;let v=await i(p.middlewareError.error,p.middlewareError.routeId);return p.handlerResult?Object.assign(p.handlerResult,v):v}}async function v0(n,a,l,i,s,c=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[c];if(!h)return i.handlerResult=await s(),i.handlerResult;let[p,m]=h,v=!1,b,w=async()=>{if(v)throw new Error("You may only call `next()` once per middleware");v=!0,await v0(n,a,l,i,s,c+1)};try{let S=await m({request:n.request,params:n.params,context:n.context},w);return v?S===void 0?b:S:w()}catch(S){throw i.middlewareError?i.middlewareError.error!==S&&(i.middlewareError={routeId:p,error:S}):i.middlewareError={routeId:p,error:S},S}}function y0(n,a,l,i,s){let c=p0({key:"unstable_middleware",route:i.route,manifest:a,mapRouteProperties:n}),f=hE(i.route,tn(l.method)?"action":"loader",a,n,s);return{middleware:c,route:f.lazyRoutePromise,handler:f.lazyHandlerPromise}}function zd(n,a,l,i,s,c,f,h=null){let p=!1,m=y0(n,a,l,i,s);return{...i,_lazyPromises:m,shouldLoad:f,unstable_shouldRevalidateArgs:h,unstable_shouldCallHandler(v){return p=!0,h?typeof v=="boolean"?pc(i,{...h,defaultShouldRevalidate:v}):pc(i,h):f},resolve(v){return p||f||v&&!tn(l.method)&&(i.route.lazy||i.route.loader)?gE({request:l,match:i,lazyHandlerPromise:m?.handler,lazyRoutePromise:m?.route,handlerOverride:v,scopedContext:c}):Promise.resolve({type:"data",result:void 0})}}}function Kl(n,a,l,i,s,c,f,h=null){return i.map(p=>p.route.id!==s.route.id?{...p,shouldLoad:!1,unstable_shouldRevalidateArgs:h,unstable_shouldCallHandler:()=>!1,_lazyPromises:y0(n,a,l,p,c),resolve:()=>Promise.resolve({type:"data",result:void 0})}:zd(n,a,l,p,c,f,!0,h))}async function pE(n,a,l,i,s,c){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 v=f;return g0(v,!1,()=>m({...v,fetcherKey:i,unstable_runClientMiddleware:()=>{throw new Error("Cannot call `unstable_runClientMiddleware()` from within an `unstable_runClientMiddleware` handler")}}),(b,w)=>({[w]:{type:"error",result:b}}))}});try{await Promise.all(l.flatMap(m=>[m._lazyPromises?.handler,m._lazyPromises?.route]))}catch{}return p}async function gE({request:n,match:a,lazyHandlerPromise:l,lazyRoutePromise:i,handlerOverride:s,scopedContext:c}){let f,h,p=tn(n.method),m=p?"action":"loader",v=b=>{let w,S=new Promise((j,R)=>w=R);h=()=>w(),n.signal.addEventListener("abort",h);let C=j=>typeof b!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${m}" [routeId: ${a.route.id}]`)):b({request:n,params:a.params,context:c},...j!==void 0?[j]:[]),E=(async()=>{try{return{type:"data",result:await(s?s(R=>C(R)):C())}}catch(j){return{type:"error",result:j}}})();return Promise.race([E,S])};try{let b=p?a.route.action:a.route.loader;if(l||i)if(b){let w,[S]=await Promise.all([v(b).catch(C=>{w=C}),l,i]);if(w!==void 0)throw w;f=S}else{await l;let w=p?a.route.action:a.route.loader;if(w)[f]=await Promise.all([v(w),i]);else if(m==="action"){let S=new URL(n.url),C=S.pathname+S.search;throw On(405,{method:n.method,pathname:C,routeId:a.route.id})}else return{type:"data",result:void 0}}else if(b)f=await v(b);else{let w=new URL(n.url),S=w.pathname+w.search;throw On(404,{pathname:S})}}catch(b){return{type:"error",result:b}}finally{h&&n.signal.removeEventListener("abort",h)}return f}async function vE(n){let{result:a,type:l}=n;if(x0(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 Dd(a.status,a.statusText,i),statusCode:a.status,headers:a.headers}:{type:"data",data:i,statusCode:a.status,headers:a.headers}}return l==="error"?ty(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 Dd(a.init?.status||500,void 0,a.data),statusCode:yo(a)?a.status:void 0,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"error",error:a,statusCode:yo(a)?a.status:void 0}:ty(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 c=n.headers.get("Location");if(Xe(c,"Redirects returned/thrown from loaders/actions must have a Location header"),!th(c)){let f=i.slice(0,i.findIndex(h=>h.route.id===l)+1);c=Ld(new URL(a.url),f,s,c),n.headers.set("Location",c)}return n}function Qv(n,a,l){if(th(n)){let i=n,s=i.startsWith("//")?new URL(a.protocol+i):new URL(i),c=Tn(s.pathname,l)!=null;if(s.origin===a.origin&&c)return s.pathname+s.search+s.hash}return n}function ql(n,a,l,i){let s=n.createURL(b0(a)).toString(),c={signal:l};if(i&&tn(i.formMethod)){let{formMethod:f,formEncType:h}=i;c.method=f.toUpperCase(),h==="application/json"?(c.headers=new Headers({"Content-Type":h}),c.body=JSON.stringify(i.json)):h==="text/plain"?c.body=i.text:h==="application/x-www-form-urlencoded"&&i.formData?c.body=Ud(i.formData):c.body=i.formData}return new Request(s,c)}function Ud(n){let a=new URLSearchParams;for(let[l,i]of n.entries())a.append(l,typeof i=="string"?i:i.name);return a}function Iv(n){let a=new FormData;for(let[l,i]of n.entries())a.append(l,i);return a}function bE(n,a,l,i=!1,s=!1){let c={},f=null,h,p=!1,m={},v=l&&hn(l[1])?l[1].error:void 0;return n.forEach(b=>{if(!(b.route.id in a))return;let w=b.route.id,S=a[w];if(Xe(!qr(S),"Cannot handle redirect results in processLoaderData"),hn(S)){let C=S.error;if(v!==void 0&&(C=v,v=void 0),f=f||{},s)f[w]=C;else{let E=$r(n,w);f[E.route.id]==null&&(f[E.route.id]=C)}i||(c[w]=h0),p||(p=!0,h=yo(S.error)?S.error.status:500),S.headers&&(m[w]=S.headers)}else c[w]=S.data,S.statusCode&&S.statusCode!==200&&!p&&(h=S.statusCode),S.headers&&(m[w]=S.headers)}),v!==void 0&&l&&(f={[l[0]]:v},l[2]&&(c[l[2]]=void 0)),{loaderData:c,errors:f,statusCode:h||200,loaderHeaders:m}}function Zv(n,a,l,i,s,c){let{loaderData:f,errors:h}=bE(a,l,i);return s.filter(p=>!p.matches||p.matches.some(m=>m.shouldLoad)).forEach(p=>{let{key:m,match:v,controller:b}=p,w=c[m];if(Xe(w,"Did not find corresponding fetcher result"),!(b&&b.signal.aborted))if(hn(w)){let S=$r(n.matches,v?.route.id);h&&h[S.route.id]||(h={...h,[S.route.id]:w.error}),n.fetchers.delete(m)}else if(qr(w))Xe(!1,"Unhandled fetcher revalidation redirect");else{let S=nr(w.data);n.fetchers.set(m,S)}}),{loaderData:f,errors:h}}function Jv(n,a,l,i){let s=Object.entries(a).filter(([,c])=>c!==h0).reduce((c,[f,h])=>(c[f]=h,c),{});for(let c of l){let f=c.route.id;if(!a.hasOwnProperty(f)&&n.hasOwnProperty(f)&&c.route.loader&&(s[f]=n[f]),i&&i.hasOwnProperty(f))break}return s}function Wv(n){return n?hn(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function $r(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 ey(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 On(n,{pathname:a,routeId:l,method:i,type:s,message:c}={}){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 Dd(n||500,f,new Error(h),!0)}function Ys(n){let a=Object.entries(n);for(let l=a.length-1;l>=0;l--){let[i,s]=a[l];if(qr(s))return{key:i,result:s}}}function b0(n){let a=typeof n=="string"?Aa(n):n;return ir({...a,hash:""})}function xE(n,a){return n.pathname!==a.pathname||n.search!==a.search?!1:n.hash===""?a.hash!=="":n.hash===a.hash?!0:a.hash!==""}function wE(n){return x0(n.result)&&rE.has(n.result.status)}function hn(n){return n.type==="error"}function qr(n){return(n&&n.type)==="redirect"}function ty(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function x0(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function SE(n){return aE.has(n.toUpperCase())}function tn(n){return tE.has(n.toUpperCase())}function nh(n){return new URLSearchParams(n).getAll("index").some(a=>a==="")}function lc(n,a){let l=typeof a=="string"?Aa(a).search:a.search;if(n[n.length-1].route.index&&nh(l||""))return n[n.length-1];let i=u0(n);return i[i.length-1]}function ny(n){let{formMethod:a,formAction:l,formEncType:i,text:s,formData:c,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(c!=null)return{formMethod:a,formAction:l,formEncType:i,formData:c,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 od(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 _E(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 lo(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 EE(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 nr(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 CE(n,a){try{let l=n.sessionStorage.getItem(d0);if(l){let i=JSON.parse(l);for(let[s,c]of Object.entries(i||{}))c&&Array.isArray(c)&&a.set(s,new Set(c||[]))}}catch{}}function NE(n,a){if(a.size>0){let l={};for(let[i,s]of a)l[i]=[...s];try{n.sessionStorage.setItem(d0,JSON.stringify(l))}catch(i){Ct(!1,`Failed to save applied view transitions in sessionStorage (${i}).`)}}}function RE(){let n,a,l=new Promise((i,s)=>{n=async c=>{i(c);try{await l}catch{}},a=async c=>{s(c);try{await l}catch{}}});return{promise:l,resolve:n,reject:a}}var Jr=y.createContext(null);Jr.displayName="DataRouter";var _o=y.createContext(null);_o.displayName="DataRouterState";y.createContext(!1);var ah=y.createContext({isTransitioning:!1});ah.displayName="ViewTransition";var w0=y.createContext(new Map);w0.displayName="Fetchers";var jE=y.createContext(null);jE.displayName="Await";var Pn=y.createContext(null);Pn.displayName="Navigation";var Nc=y.createContext(null);Nc.displayName="Location";var na=y.createContext({outlet:null,matches:[],isDataRoute:!1});na.displayName="Route";var rh=y.createContext(null);rh.displayName="RouteError";function OE(n,{relative:a}={}){Xe(Wl(),"useHref() may be used only in the context of a <Router> component.");let{basename:l,navigator:i}=y.useContext(Pn),{hash:s,pathname:c,search:f}=Eo(n,{relative:a}),h=c;return l!=="/"&&(h=c==="/"?l:Jn([l,c])),i.createHref({pathname:h,search:f,hash:s})}function Wl(){return y.useContext(Nc)!=null}function pr(){return Xe(Wl(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(Nc).location}var S0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function _0(n){y.useContext(Pn).static||y.useLayoutEffect(n)}function Rc(){let{isDataRoute:n}=y.useContext(na);return n?VE():AE()}function AE(){Xe(Wl(),"useNavigate() may be used only in the context of a <Router> component.");let n=y.useContext(Jr),{basename:a,navigator:l}=y.useContext(Pn),{matches:i}=y.useContext(na),{pathname:s}=pr(),c=JSON.stringify(Ec(i)),f=y.useRef(!1);return _0(()=>{f.current=!0}),y.useCallback((p,m={})=>{if(Ct(f.current,S0),!f.current)return;if(typeof p=="number"){l.go(p);return}let v=Cc(p,JSON.parse(c),s,m.relative==="path");n==null&&a!=="/"&&(v.pathname=v.pathname==="/"?a:Jn([a,v.pathname])),(m.replace?l.replace:l.push)(v,m.state,m)},[a,l,c,s,n])}y.createContext(null);function Eo(n,{relative:a}={}){let{matches:l}=y.useContext(na),{pathname:i}=pr(),s=JSON.stringify(Ec(l));return y.useMemo(()=>Cc(n,JSON.parse(s),i,a==="path"),[n,s,i,a])}function TE(n,a,l,i){Xe(Wl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=y.useContext(Pn),{matches:c}=y.useContext(na),f=c[c.length-1],h=f?f.params:{},p=f?f.pathname:"/",m=f?f.pathnameBase:"/",v=f&&f.route;{let R=v&&v.path||"";E0(p,!v||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${R}">) 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 _0=n=>{throw TypeError(n)},cE=(n,a,l)=>a.has(n)||_0("Cannot "+l),hd=(n,a,l)=>(cE(n,a,"read from private field"),l?l.call(n):a.get(n)),uE=(n,a,l)=>a.has(n)?_0("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(n):a.set(n,l);function fE(n={}){let{initialEntries:a=["/"],initialIndex:l,v5Compat:o=!1}=n,s;s=a.map((S,N)=>v(S,typeof S=="string"?null:S.state,N===0?"default":void 0));let c=g(l??s.length-1),f="POP",m=null;function g(S){return Math.min(Math.max(S,0),s.length-1)}function h(){return s[c]}function v(S,N=null,E){let R=qd(s?h().pathname:"/",S,N,E);return jt(R.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(S)}`),R}function b(S){return typeof S=="string"?S:fr(S)}return{get index(){return c},get action(){return f},get location(){return h()},createHref:b,createURL(S){return new URL(b(S),"http://localhost")},encodeLocation(S){let N=typeof S=="string"?Da(S):S;return{pathname:N.pathname||"",search:N.search||"",hash:N.hash||""}},push(S,N){f="PUSH";let E=v(S,N);c+=1,s.splice(c,s.length,E),o&&m&&m({action:f,location:E,delta:1})},replace(S,N){f="REPLACE";let E=v(S,N);s[c]=E,o&&m&&m({action:f,location:E,delta:0})},go(S){f="POP";let N=g(c+S),E=s[N];c=N,m&&m({action:f,location:E,delta:S})},listen(S){return m=S,()=>{m=null}}}}function Je(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function jt(n,a){if(!n){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function dE(){return Math.random().toString(36).substring(2,10)}function qd(n,a,l=null,o){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof a=="string"?Da(a):a,state:l,key:a&&a.key||o||dE()}}function fr({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 Da(n){let a={};if(n){let l=n.indexOf("#");l>=0&&(a.hash=n.substring(l),n=n.substring(0,l));let o=n.indexOf("?");o>=0&&(a.search=n.substring(o),n=n.substring(0,o)),n&&(a.pathname=n)}return a}function hE(n,a=!1){let l="http://localhost";typeof window<"u"&&(l=window.location.origin!=="null"?window.location.origin:window.location.href),Je(l,"No window.location.(origin|href) available to create URL");let o=typeof n=="string"?n:fr(n);return o=o.replace(/ $/,"%20"),!a&&o.startsWith("//")&&(o=l+o),new URL(o,l)}var mi,ey=class{constructor(n){if(uE(this,mi,new Map),n)for(let[a,l]of n)this.set(a,l)}get(n){if(hd(this,mi).has(n))return hd(this,mi).get(n);if(n.defaultValue!==void 0)return n.defaultValue;throw new Error("No value found for context")}set(n,a){hd(this,mi).set(n,a)}};mi=new WeakMap;var mE=new Set(["lazy","caseSensitive","path","id","index","children"]);function pE(n){return mE.has(n)}var gE=new Set(["lazy","caseSensitive","path","id","index","unstable_middleware","children"]);function vE(n){return gE.has(n)}function yE(n){return n.index===!0}function _i(n,a,l=[],o={},s=!1){return n.map((c,f)=>{let m=[...l,String(f)],g=typeof c.id=="string"?c.id:m.join("-");if(Je(c.index!==!0||!c.children,"Cannot specify children on an index route"),Je(s||!o[g],`Found a route id collision on id "${g}". Route id's must be globally unique within Data Router usages`),yE(c)){let h={...c,...a(c),id:g};return o[g]=h,h}else{let h={...c,...a(c),id:g,children:void 0};return o[g]=h,c.children&&(h.children=_i(c.children,a,m,o,s)),h}})}function sr(n,a,l="/"){return hc(n,a,l,!1)}function hc(n,a,l,o){let s=typeof a=="string"?Da(a):a,c=Mn(s.pathname||"/",l);if(c==null)return null;let f=E0(n);xE(f);let m=null;for(let g=0;m==null&&g<f.length;++g){let h=TE(c);m=OE(f[g],h,o)}return m}function bE(n,a){let{route:l,pathname:o,params:s}=n;return{id:l.id,pathname:o,params:s,data:a[l.id],handle:l.handle}}function E0(n,a=[],l=[],o=""){let s=(c,f,m)=>{let g={relativePath:m===void 0?c.path||"":m,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};g.relativePath.startsWith("/")&&(Je(g.relativePath.startsWith(o),`Absolute route path "${g.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(o.length));let h=Wn([o,g.relativePath]),v=l.concat(g);c.children&&c.children.length>0&&(Je(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),E0(c.children,a,v,h)),!(c.path==null&&!c.index)&&a.push({path:h,score:jE(h,c.index),routesMeta:v})};return n.forEach((c,f)=>{if(c.path===""||!c.path?.includes("?"))s(c,f);else for(let m of N0(c.path))s(c,f,m)}),a}function N0(n){let a=n.split("/");if(a.length===0)return[];let[l,...o]=a,s=l.endsWith("?"),c=l.replace(/\?$/,"");if(o.length===0)return s?[c,""]:[c];let f=N0(o.join("/")),m=[];return m.push(...f.map(g=>g===""?c:[c,g].join("/"))),s&&m.push(...f),m.map(g=>n.startsWith("/")&&g===""?"/":g)}function xE(n){n.sort((a,l)=>a.score!==l.score?l.score-a.score:RE(a.routesMeta.map(o=>o.childrenIndex),l.routesMeta.map(o=>o.childrenIndex)))}var wE=/^:[\w-]+$/,SE=3,_E=2,EE=1,NE=10,CE=-2,ty=n=>n==="*";function jE(n,a){let l=n.split("/"),o=l.length;return l.some(ty)&&(o+=CE),a&&(o+=_E),l.filter(s=>!ty(s)).reduce((s,c)=>s+(wE.test(c)?SE:c===""?EE:NE),o)}function RE(n,a){return n.length===a.length&&n.slice(0,-1).every((o,s)=>o===a[s])?n[n.length-1]-a[a.length-1]:0}function OE(n,a,l=!1){let{routesMeta:o}=n,s={},c="/",f=[];for(let m=0;m<o.length;++m){let g=o[m],h=m===o.length-1,v=c==="/"?a:a.slice(c.length)||"/",b=Ec({path:g.relativePath,caseSensitive:g.caseSensitive,end:h},v),w=g.route;if(!b&&h&&l&&!o[o.length-1].route.index&&(b=Ec({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},v)),!b)return null;Object.assign(s,b.params),f.push({params:s,pathname:Wn([c,b.pathname]),pathnameBase:kE(Wn([c,b.pathnameBase])),route:w}),b.pathnameBase!=="/"&&(c=Wn([c,b.pathnameBase]))}return f}function Ec(n,a){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[l,o]=AE(n.path,n.caseSensitive,n.end),s=a.match(l);if(!s)return null;let c=s[0],f=c.replace(/(.)\/+$/,"$1"),m=s.slice(1);return{params:o.reduce((h,{paramName:v,isOptional:b},w)=>{if(v==="*"){let N=m[w]||"";f=c.slice(0,c.length-N.length).replace(/(.)\/+$/,"$1")}const S=m[w];return b&&!S?h[v]=void 0:h[v]=(S||"").replace(/%2F/g,"/"),h},{}),pathname:c,pathnameBase:f,pattern:n}}function AE(n,a=!1,l=!0){jt(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 o=[],s="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,m,g)=>(o.push({paramName:m,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(o.push({paramName:"*"}),s+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):l?s+="\\/*$":n!==""&&n!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,a?void 0:"i"),o]}function TE(n){try{return n.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return jt(!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 Mn(n,a){if(a==="/")return n;if(!n.toLowerCase().startsWith(a.toLowerCase()))return null;let l=a.endsWith("/")?a.length-1:a.length,o=n.charAt(l);return o&&o!=="/"?null:n.slice(l)||"/"}function ME({basename:n,pathname:a}){return a==="/"?n:Wn([n,a])}function DE(n,a="/"){let{pathname:l,search:o="",hash:s=""}=typeof n=="string"?Da(n):n;return{pathname:l?l.startsWith("/")?l:LE(l,a):a,search:zE(o),hash:UE(s)}}function LE(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 md(n,a,l,o){return`Cannot include a '${n}' character in a manually specified \`to.${a}\` field [${JSON.stringify(o)}]. 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 C0(n){return n.filter((a,l)=>l===0||a.route.path&&a.route.path.length>0)}function kc(n){let a=C0(n);return a.map((l,o)=>o===a.length-1?l.pathname:l.pathnameBase)}function zc(n,a,l,o=!1){let s;typeof n=="string"?s=Da(n):(s={...n},Je(!s.pathname||!s.pathname.includes("?"),md("?","pathname","search",s)),Je(!s.pathname||!s.pathname.includes("#"),md("#","pathname","hash",s)),Je(!s.search||!s.search.includes("#"),md("#","search","hash",s)));let c=n===""||s.pathname==="",f=c?"/":s.pathname,m;if(f==null)m=l;else{let b=a.length-1;if(!o&&f.startsWith("..")){let w=f.split("/");for(;w[0]==="..";)w.shift(),b-=1;s.pathname=w.join("/")}m=b>=0?a[b]:"/"}let g=DE(s,m),h=f&&f!=="/"&&f.endsWith("/"),v=(c||f===".")&&l.endsWith("/");return!g.pathname.endsWith("/")&&(h||v)&&(g.pathname+="/"),g}var Wn=n=>n.join("/").replace(/\/\/+/g,"/"),kE=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),zE=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,UE=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,Fd=class{constructor(n,a,l,o=!1){this.status=n,this.statusText=a||"",this.internal=o,l instanceof Error?(this.data=l.toString(),this.error=l):this.data=l}};function Ei(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}var j0=["POST","PUT","PATCH","DELETE"],PE=new Set(j0),HE=["GET",...j0],BE=new Set(HE),$E=new Set([301,302,303,307,308]),qE=new Set([307,308]),pd={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},FE={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ci={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},VE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,mh=n=>VE.test(n),GE=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),R0="remix-router-transitions",O0=Symbol("ResetLoaderData");function YE(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";Je(n.routes.length>0,"You must provide a non-empty routes array to createRouter");let o=n.hydrationRouteProperties||[],s=n.mapRouteProperties||GE,c={},f=_i(n.routes,s,void 0,c),m,g=n.basename||"/",h=n.dataStrategy||ZE,v={unstable_middleware:!1,...n.future},b=null,w=new Set,S=null,N=null,E=null,R=n.hydrationData!=null,C=sr(f,n.history.location,g),A=!1,T=null,k;if(C==null&&!n.patchRoutesOnNavigation){let z=On(404,{pathname:n.history.location.pathname}),{matches:F,route:J}=hy(f);k=!0,C=F,T={[J.id]:z}}else if(C&&!n.hydrationData&&_r(C,f,n.history.location.pathname).active&&(C=null),C)if(C.some(z=>z.route.lazy))k=!1;else if(!C.some(z=>z.route.loader))k=!0;else{let z=n.hydrationData?n.hydrationData.loaderData:null,F=n.hydrationData?n.hydrationData.errors:null;if(F){let J=C.findIndex(de=>F[de.route.id]!==void 0);k=C.slice(0,J+1).every(de=>!Gd(de.route,z,F))}else k=C.every(J=>!Gd(J.route,z,F))}else{k=!1,C=[];let z=_r(null,f,n.history.location.pathname);z.active&&z.matches&&(A=!0,C=z.matches)}let D,j={historyAction:n.history.action,location:n.history.location,matches:C,initialized:k,navigation:pd,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||T,fetchers:new Map,blockers:new Map},U="POP",B=!1,W,ne=!1,ee=new Map,ie=null,fe=!1,X=!1,te=new Set,O=new Map,I=0,q=-1,ye=new Map,M=new Set,Y=new Map,H=new Map,K=new Set,le=new Map,he,ve=null;function be(){if(b=n.history.listen(({action:z,location:F,delta:J})=>{if(he){he(),he=void 0;return}jt(le.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 de=Hi({currentLocation:j.location,nextLocation:F,historyAction:z});if(de&&J!=null){let pe=new Promise(Ne=>{he=Ne});n.history.go(J*-1),Fn(de,{state:"blocked",location:F,proceed(){Fn(de,{state:"proceeding",proceed:void 0,reset:void 0,location:F}),pe.then(()=>n.history.go(J))},reset(){let Ne=new Map(j.blockers);Ne.set(de,ci),we({blockers:Ne})}});return}return oe(z,F)}),l){sN(a,ee);let z=()=>cN(a,ee);a.addEventListener("pagehide",z),ie=()=>a.removeEventListener("pagehide",z)}return j.initialized||oe("POP",j.location,{initialHydration:!0}),D}function ze(){b&&b(),ie&&ie(),w.clear(),W&&W.abort(),j.fetchers.forEach((z,F)=>Bt(F)),j.blockers.forEach((z,F)=>wr(F))}function ae(z){return w.add(z),()=>w.delete(z)}function we(z,F={}){z.matches&&(z.matches=z.matches.map(pe=>{let Ne=c[pe.route.id],Re=pe.route;return Re.element!==Ne.element||Re.errorElement!==Ne.errorElement||Re.hydrateFallbackElement!==Ne.hydrateFallbackElement?{...pe,route:Ne}:pe})),j={...j,...z};let J=[],de=[];j.fetchers.forEach((pe,Ne)=>{pe.state==="idle"&&(K.has(Ne)?J.push(Ne):de.push(Ne))}),K.forEach(pe=>{!j.fetchers.has(pe)&&!O.has(pe)&&J.push(pe)}),[...w].forEach(pe=>pe(j,{deletedFetchers:J,viewTransitionOpts:F.viewTransitionOpts,flushSync:F.flushSync===!0})),J.forEach(pe=>Bt(pe)),de.forEach(pe=>j.fetchers.delete(pe))}function Pe(z,F,{flushSync:J}={}){let de=j.actionData!=null&&j.navigation.formMethod!=null&&an(j.navigation.formMethod)&&j.navigation.state==="loading"&&z.state?._isRedirect!==!0,pe;F.actionData?Object.keys(F.actionData).length>0?pe=F.actionData:pe=null:de?pe=j.actionData:pe=null;let Ne=F.loaderData?fy(j.loaderData,F.loaderData,F.matches||[],F.errors):j.loaderData,Re=j.blockers;Re.size>0&&(Re=new Map(Re),Re.forEach((je,Oe)=>Re.set(Oe,ci)));let Ce=fe?!1:$i(z,F.matches||j.matches),Me=B===!0||j.navigation.formMethod!=null&&an(j.navigation.formMethod)&&z.state?._isRedirect!==!0;m&&(f=m,m=void 0),fe||U==="POP"||(U==="PUSH"?n.history.push(z,z.state):U==="REPLACE"&&n.history.replace(z,z.state));let Le;if(U==="POP"){let je=ee.get(j.location.pathname);je&&je.has(z.pathname)?Le={currentLocation:j.location,nextLocation:z}:ee.has(z.pathname)&&(Le={currentLocation:z,nextLocation:j.location})}else if(ne){let je=ee.get(j.location.pathname);je?je.add(z.pathname):(je=new Set([z.pathname]),ee.set(j.location.pathname,je)),Le={currentLocation:j.location,nextLocation:z}}we({...F,actionData:pe,loaderData:Ne,historyAction:U,location:z,initialized:!0,navigation:pd,revalidation:"idle",restoreScrollPosition:Ce,preventScrollReset:Me,blockers:Re},{viewTransitionOpts:Le,flushSync:J===!0}),U="POP",B=!1,ne=!1,fe=!1,X=!1,ve?.resolve(),ve=null}async function De(z,F){if(typeof z=="number"){n.history.go(z);return}let J=Vd(j.location,j.matches,g,z,F?.fromRouteId,F?.relative),{path:de,submission:pe,error:Ne}=ny(!1,J,F),Re=j.location,Ce=qd(j.location,de,F&&F.state);Ce={...Ce,...n.history.encodeLocation(Ce)};let Me=F&&F.replace!=null?F.replace:void 0,Le="PUSH";Me===!0?Le="REPLACE":Me===!1||pe!=null&&an(pe.formMethod)&&pe.formAction===j.location.pathname+j.location.search&&(Le="REPLACE");let je=F&&"preventScrollReset"in F?F.preventScrollReset===!0:void 0,Oe=(F&&F.flushSync)===!0,Ye=Hi({currentLocation:Re,nextLocation:Ce,historyAction:Le});if(Ye){Fn(Ye,{state:"blocked",location:Ce,proceed(){Fn(Ye,{state:"proceeding",proceed:void 0,reset:void 0,location:Ce}),De(z,F)},reset(){let st=new Map(j.blockers);st.set(Ye,ci),we({blockers:st})}});return}await oe(Le,Ce,{submission:pe,pendingError:Ne,preventScrollReset:je,replace:F&&F.replace,enableViewTransition:F&&F.viewTransition,flushSync:Oe})}function qe(){ve||(ve=uN()),uo(),we({revalidation:"loading"});let z=ve.promise;return j.navigation.state==="submitting"?z:j.navigation.state==="idle"?(oe(j.historyAction,j.location,{startUninterruptedRevalidation:!0}),z):(oe(U||j.historyAction,j.navigation.location,{overrideNavigation:j.navigation,enableViewTransition:ne===!0}),z)}async function oe(z,F,J){W&&W.abort(),W=null,U=z,fe=(J&&J.startUninterruptedRevalidation)===!0,Sr(j.location,j.matches),B=(J&&J.preventScrollReset)===!0,ne=(J&&J.enableViewTransition)===!0;let de=m||f,pe=J&&J.overrideNavigation,Ne=J?.initialHydration&&j.matches&&j.matches.length>0&&!A?j.matches:sr(de,F,g),Re=(J&&J.flushSync)===!0;if(Ne&&j.initialized&&!X&&aN(j.location,F)&&!(J&&J.submission&&an(J.submission.formMethod))){Pe(F,{matches:Ne},{flushSync:Re});return}let Ce=_r(Ne,de,F.pathname);if(Ce.active&&Ce.matches&&(Ne=Ce.matches),!Ne){let{error:Et,notFoundMatches:Ve,route:dt}=al(F.pathname);Pe(F,{matches:Ve,loaderData:{},errors:{[dt.id]:Et}},{flushSync:Re});return}W=new AbortController;let Me=Yl(n.history,F,W.signal,J&&J.submission),Le=new ey(n.unstable_getContext?await n.unstable_getContext():void 0),je;if(J&&J.pendingError)je=[Fr(Ne).route.id,{type:"error",error:J.pendingError}];else if(J&&J.submission&&an(J.submission.formMethod)){let Et=await ce(Me,F,J.submission,Ne,Le,Ce.active,J&&J.initialHydration===!0,{replace:J.replace,flushSync:Re});if(Et.shortCircuited)return;if(Et.pendingActionResult){let[Ve,dt]=Et.pendingActionResult;if(mn(dt)&&Ei(dt.error)&&dt.error.status===404){W=null,Pe(F,{matches:Et.matches,loaderData:{},errors:{[Ve]:dt.error}});return}}Ne=Et.matches||Ne,je=Et.pendingActionResult,pe=gd(F,J.submission),Re=!1,Ce.active=!1,Me=Yl(n.history,Me.url,Me.signal)}let{shortCircuited:Oe,matches:Ye,loaderData:st,errors:_t}=await ge(Me,F,Ne,Le,Ce.active,pe,J&&J.submission,J&&J.fetcherSubmission,J&&J.replace,J&&J.initialHydration===!0,Re,je);Oe||(W=null,Pe(F,{matches:Ye||Ne,...dy(je),loaderData:st,errors:_t}))}async function ce(z,F,J,de,pe,Ne,Re,Ce={}){uo();let Me=oN(F,J);if(we({navigation:Me},{flushSync:Ce.flushSync===!0}),Ne){let Oe=await Er(de,F.pathname,z.signal);if(Oe.type==="aborted")return{shortCircuited:!0};if(Oe.type==="error"){let Ye=Fr(Oe.partialMatches).route.id;return{matches:Oe.partialMatches,pendingActionResult:[Ye,{type:"error",error:Oe.error}]}}else if(Oe.matches)de=Oe.matches;else{let{notFoundMatches:Ye,error:st,route:_t}=al(F.pathname);return{matches:Ye,pendingActionResult:[_t.id,{type:"error",error:st}]}}}let Le,je=mc(de,F);if(!je.route.action&&!je.route.lazy)Le={type:"error",error:On(405,{method:z.method,pathname:F.pathname,routeId:je.route.id})};else{let Oe=Ql(s,c,z,de,je,Re?[]:o,pe),Ye=await $n(z,Oe,pe,null);if(Le=Ye[je.route.id],!Le){for(let st of de)if(Ye[st.route.id]){Le=Ye[st.route.id];break}}if(z.signal.aborted)return{shortCircuited:!0}}if(Gr(Le)){let Oe;return Ce&&Ce.replace!=null?Oe=Ce.replace:Oe=sy(Le.response.headers.get("Location"),new URL(z.url),g)===j.location.pathname+j.location.search,await Yt(z,Le,!0,{submission:J,replace:Oe}),{shortCircuited:!0}}if(mn(Le)){let Oe=Fr(de,je.route.id);return(Ce&&Ce.replace)!==!0&&(U="PUSH"),{matches:de,pendingActionResult:[Oe.route.id,Le,je.route.id]}}return{matches:de,pendingActionResult:[je.route.id,Le]}}async function ge(z,F,J,de,pe,Ne,Re,Ce,Me,Le,je,Oe){let Ye=Ne||gd(F,Re),st=Re||Ce||py(Ye),_t=!fe&&!Le;if(pe){if(_t){let At=me(Oe);we({navigation:Ye,...At!==void 0?{actionData:At}:{}},{flushSync:je})}let Xe=await Er(J,F.pathname,z.signal);if(Xe.type==="aborted")return{shortCircuited:!0};if(Xe.type==="error"){let At=Fr(Xe.partialMatches).route.id;return{matches:Xe.partialMatches,loaderData:{},errors:{[At]:Xe.error}}}else if(Xe.matches)J=Xe.matches;else{let{error:At,notFoundMatches:Nr,route:bn}=al(F.pathname);return{matches:Nr,loaderData:{},errors:{[bn.id]:At}}}}let Et=m||f,{dsMatches:Ve,revalidatingFetchers:dt}=ay(z,de,s,c,n.history,j,J,st,F,Le?[]:o,Le===!0,X,te,K,Y,M,Et,g,n.patchRoutesOnNavigation!=null,Oe);if(q=++I,!n.dataStrategy&&!Ve.some(Xe=>Xe.shouldLoad)&&dt.length===0){let Xe=br();return Pe(F,{matches:J,loaderData:{},errors:Oe&&mn(Oe[1])?{[Oe[0]]:Oe[1].error}:null,...dy(Oe),...Xe?{fetchers:new Map(j.fetchers)}:{}},{flushSync:je}),{shortCircuited:!0}}if(_t){let Xe={};if(!pe){Xe.navigation=Ye;let At=me(Oe);At!==void 0&&(Xe.actionData=At)}dt.length>0&&(Xe.fetchers=Te(dt)),we(Xe,{flushSync:je})}dt.forEach(Xe=>{qn(Xe.key),Xe.controller&&O.set(Xe.key,Xe.controller)});let Vn=()=>dt.forEach(Xe=>qn(Xe.key));W&&W.signal.addEventListener("abort",Vn);let{loaderResults:ln,fetcherResults:Qt}=await Ui(Ve,dt,z,de);if(z.signal.aborted)return{shortCircuited:!0};W&&W.signal.removeEventListener("abort",Vn),dt.forEach(Xe=>O.delete(Xe.key));let yn=Ws(ln);if(yn)return await Yt(z,yn.result,!0,{replace:Me}),{shortCircuited:!0};if(yn=Ws(Qt),yn)return M.add(yn.key),await Yt(z,yn.result,!0,{replace:Me}),{shortCircuited:!0};let{loaderData:ll,errors:ka}=uy(j,J,ln,Oe,dt,Qt);Le&&j.errors&&(ka={...j.errors,...ka});let ia=br(),sa=xr(q),ca=ia||sa||dt.length>0;return{matches:J,loaderData:ll,errors:ka,...ca?{fetchers:new Map(j.fetchers)}:{}}}function me(z){if(z&&!mn(z[1]))return{[z[0]]:z[1].data};if(j.actionData)return Object.keys(j.actionData).length===0?null:j.actionData}function Te(z){return z.forEach(F=>{let J=j.fetchers.get(F.key),de=ui(void 0,J?J.data:void 0);j.fetchers.set(F.key,de)}),new Map(j.fetchers)}async function He(z,F,J,de){qn(z);let pe=(de&&de.flushSync)===!0,Ne=m||f,Re=Vd(j.location,j.matches,g,J,F,de?.relative),Ce=sr(Ne,Re,g),Me=_r(Ce,Ne,Re);if(Me.active&&Me.matches&&(Ce=Me.matches),!Ce){xt(z,F,On(404,{pathname:Re}),{flushSync:pe});return}let{path:Le,submission:je,error:Oe}=ny(!0,Re,de);if(Oe){xt(z,F,Oe,{flushSync:pe});return}let Ye=new ey(n.unstable_getContext?await n.unstable_getContext():void 0),st=(de&&de.preventScrollReset)===!0;if(je&&an(je.formMethod)){await Fe(z,F,Le,Ce,Ye,Me.active,pe,st,je);return}Y.set(z,{routeId:F,path:Le}),await ot(z,F,Le,Ce,Ye,Me.active,pe,st,je)}async function Fe(z,F,J,de,pe,Ne,Re,Ce,Me){uo(),Y.delete(z);let Le=j.fetchers.get(z);Jt(z,iN(Me,Le),{flushSync:Re});let je=new AbortController,Oe=Yl(n.history,J,je.signal,Me);if(Ne){let wt=await Er(de,new URL(Oe.url).pathname,Oe.signal,z);if(wt.type==="aborted")return;if(wt.type==="error"){xt(z,F,wt.error,{flushSync:Re});return}else if(wt.matches)de=wt.matches;else{xt(z,F,On(404,{pathname:J}),{flushSync:Re});return}}let Ye=mc(de,J);if(!Ye.route.action&&!Ye.route.lazy){let wt=On(405,{method:Me.formMethod,pathname:J,routeId:F});xt(z,F,wt,{flushSync:Re});return}O.set(z,je);let st=I,_t=Ql(s,c,Oe,de,Ye,o,pe),Ve=(await $n(Oe,_t,pe,z))[Ye.route.id];if(Oe.signal.aborted){O.get(z)===je&&O.delete(z);return}if(K.has(z)){if(Gr(Ve)||mn(Ve)){Jt(z,or(void 0));return}}else{if(Gr(Ve))if(O.delete(z),q>st){Jt(z,or(void 0));return}else return M.add(z),Jt(z,ui(Me)),Yt(Oe,Ve,!1,{fetcherSubmission:Me,preventScrollReset:Ce});if(mn(Ve)){xt(z,F,Ve.error);return}}let dt=j.navigation.location||j.location,Vn=Yl(n.history,dt,je.signal),ln=m||f,Qt=j.navigation.state!=="idle"?sr(ln,j.navigation.location,g):j.matches;Je(Qt,"Didn't find any matches after fetcher action");let yn=++I;ye.set(z,yn);let ll=ui(Me,Ve.data);j.fetchers.set(z,ll);let{dsMatches:ka,revalidatingFetchers:ia}=ay(Vn,pe,s,c,n.history,j,Qt,Me,dt,o,!1,X,te,K,Y,M,ln,g,n.patchRoutesOnNavigation!=null,[Ye.route.id,Ve]);ia.filter(wt=>wt.key!==z).forEach(wt=>{let za=wt.key,qi=j.fetchers.get(za),Fi=ui(void 0,qi?qi.data:void 0);j.fetchers.set(za,Fi),qn(za),wt.controller&&O.set(za,wt.controller)}),we({fetchers:new Map(j.fetchers)});let sa=()=>ia.forEach(wt=>qn(wt.key));je.signal.addEventListener("abort",sa);let{loaderResults:ca,fetcherResults:Xe}=await Ui(ka,ia,Vn,pe);if(je.signal.aborted)return;if(je.signal.removeEventListener("abort",sa),ye.delete(z),O.delete(z),ia.forEach(wt=>O.delete(wt.key)),j.fetchers.has(z)){let wt=or(Ve.data);j.fetchers.set(z,wt)}let At=Ws(ca);if(At)return Yt(Vn,At.result,!1,{preventScrollReset:Ce});if(At=Ws(Xe),At)return M.add(At.key),Yt(Vn,At.result,!1,{preventScrollReset:Ce});let{loaderData:Nr,errors:bn}=uy(j,Qt,ca,void 0,ia,Xe);xr(yn),j.navigation.state==="loading"&&yn>q?(Je(U,"Expected pending action"),W&&W.abort(),Pe(j.navigation.location,{matches:Qt,loaderData:Nr,errors:bn,fetchers:new Map(j.fetchers)})):(we({errors:bn,loaderData:fy(j.loaderData,Nr,Qt,bn),fetchers:new Map(j.fetchers)}),X=!1)}async function ot(z,F,J,de,pe,Ne,Re,Ce,Me){let Le=j.fetchers.get(z);Jt(z,ui(Me,Le?Le.data:void 0),{flushSync:Re});let je=new AbortController,Oe=Yl(n.history,J,je.signal);if(Ne){let dt=await Er(de,new URL(Oe.url).pathname,Oe.signal,z);if(dt.type==="aborted")return;if(dt.type==="error"){xt(z,F,dt.error,{flushSync:Re});return}else if(dt.matches)de=dt.matches;else{xt(z,F,On(404,{pathname:J}),{flushSync:Re});return}}let Ye=mc(de,J);O.set(z,je);let st=I,_t=Ql(s,c,Oe,de,Ye,o,pe),Ve=(await $n(Oe,_t,pe,z))[Ye.route.id];if(O.get(z)===je&&O.delete(z),!Oe.signal.aborted){if(K.has(z)){Jt(z,or(void 0));return}if(Gr(Ve))if(q>st){Jt(z,or(void 0));return}else{M.add(z),await Yt(Oe,Ve,!1,{preventScrollReset:Ce});return}if(mn(Ve)){xt(z,F,Ve.error);return}Jt(z,or(Ve.data))}}async function Yt(z,F,J,{submission:de,fetcherSubmission:pe,preventScrollReset:Ne,replace:Re}={}){F.response.headers.has("X-Remix-Revalidate")&&(X=!0);let Ce=F.response.headers.get("Location");Je(Ce,"Expected a Location header on the redirect Response"),Ce=sy(Ce,new URL(z.url),g);let Me=qd(j.location,Ce,{_isRedirect:!0});if(l){let _t=!1;if(F.response.headers.has("X-Remix-Reload-Document"))_t=!0;else if(mh(Ce)){const Et=hE(Ce,!0);_t=Et.origin!==a.location.origin||Mn(Et.pathname,g)==null}if(_t){Re?a.location.replace(Ce):a.location.assign(Ce);return}}W=null;let Le=Re===!0||F.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:je,formAction:Oe,formEncType:Ye}=j.navigation;!de&&!pe&&je&&Oe&&Ye&&(de=py(j.navigation));let st=de||pe;if(qE.has(F.response.status)&&st&&an(st.formMethod))await oe(Le,Me,{submission:{...st,formAction:Ce},preventScrollReset:Ne||B,enableViewTransition:J?ne:void 0});else{let _t=gd(Me,de);await oe(Le,Me,{overrideNavigation:_t,fetcherSubmission:pe,preventScrollReset:Ne||B,enableViewTransition:J?ne:void 0})}}async function $n(z,F,J,de){let pe,Ne={};try{pe=await JE(h,z,F,de,J,!1)}catch(Re){return F.filter(Ce=>Ce.shouldLoad).forEach(Ce=>{Ne[Ce.route.id]={type:"error",error:Re}}),Ne}if(z.signal.aborted)return Ne;for(let[Re,Ce]of Object.entries(pe))if(rN(Ce)){let Me=Ce.result;Ne[Re]={type:"redirect",response:tN(Me,z,Re,F,g)}}else Ne[Re]=await eN(Ce);return Ne}async function Ui(z,F,J,de){let pe=$n(J,z,de,null),Ne=Promise.all(F.map(async Me=>{if(Me.matches&&Me.match&&Me.request&&Me.controller){let je=(await $n(Me.request,Me.matches,de,Me.key))[Me.match.route.id];return{[Me.key]:je}}else return Promise.resolve({[Me.key]:{type:"error",error:On(404,{pathname:Me.path})}})})),Re=await pe,Ce=(await Ne).reduce((Me,Le)=>Object.assign(Me,Le),{});return{loaderResults:Re,fetcherResults:Ce}}function uo(){X=!0,Y.forEach((z,F)=>{O.has(F)&&te.add(F),qn(F)})}function Jt(z,F,J={}){j.fetchers.set(z,F),we({fetchers:new Map(j.fetchers)},{flushSync:(J&&J.flushSync)===!0})}function xt(z,F,J,de={}){let pe=Fr(j.matches,F);Bt(z),we({errors:{[pe.route.id]:J},fetchers:new Map(j.fetchers)},{flushSync:(de&&de.flushSync)===!0})}function Dn(z){return H.set(z,(H.get(z)||0)+1),K.has(z)&&K.delete(z),j.fetchers.get(z)||FE}function Bt(z){let F=j.fetchers.get(z);O.has(z)&&!(F&&F.state==="loading"&&ye.has(z))&&qn(z),Y.delete(z),ye.delete(z),M.delete(z),K.delete(z),te.delete(z),j.fetchers.delete(z)}function tu(z){let F=(H.get(z)||0)-1;F<=0?(H.delete(z),K.add(z)):H.set(z,F),we({fetchers:new Map(j.fetchers)})}function qn(z){let F=O.get(z);F&&(F.abort(),O.delete(z))}function Pi(z){for(let F of z){let J=Dn(F),de=or(J.data);j.fetchers.set(F,de)}}function br(){let z=[],F=!1;for(let J of M){let de=j.fetchers.get(J);Je(de,`Expected fetcher: ${J}`),de.state==="loading"&&(M.delete(J),z.push(J),F=!0)}return Pi(z),F}function xr(z){let F=[];for(let[J,de]of ye)if(de<z){let pe=j.fetchers.get(J);Je(pe,`Expected fetcher: ${J}`),pe.state==="loading"&&(qn(J),ye.delete(J),F.push(J))}return Pi(F),F.length>0}function oa(z,F){let J=j.blockers.get(z)||ci;return le.get(z)!==F&&le.set(z,F),J}function wr(z){j.blockers.delete(z),le.delete(z)}function Fn(z,F){let J=j.blockers.get(z)||ci;Je(J.state==="unblocked"&&F.state==="blocked"||J.state==="blocked"&&F.state==="blocked"||J.state==="blocked"&&F.state==="proceeding"||J.state==="blocked"&&F.state==="unblocked"||J.state==="proceeding"&&F.state==="unblocked",`Invalid blocker state transition: ${J.state} -> ${F.state}`);let de=new Map(j.blockers);de.set(z,F),we({blockers:de})}function Hi({currentLocation:z,nextLocation:F,historyAction:J}){if(le.size===0)return;le.size>1&&jt(!1,"A router only supports one blocker at a time");let de=Array.from(le.entries()),[pe,Ne]=de[de.length-1],Re=j.blockers.get(pe);if(!(Re&&Re.state==="proceeding")&&Ne({currentLocation:z,nextLocation:F,historyAction:J}))return pe}function al(z){let F=On(404,{pathname:z}),J=m||f,{matches:de,route:pe}=hy(J);return{notFoundMatches:de,route:pe,error:F}}function Bi(z,F,J){if(S=z,E=F,N=J||null,!R&&j.navigation===pd){R=!0;let de=$i(j.location,j.matches);de!=null&&we({restoreScrollPosition:de})}return()=>{S=null,E=null,N=null}}function rl(z,F){return N&&N(z,F.map(de=>bE(de,j.loaderData)))||z.key}function Sr(z,F){if(S&&E){let J=rl(z,F);S[J]=E()}}function $i(z,F){if(S){let J=rl(z,F),de=S[J];if(typeof de=="number")return de}return null}function _r(z,F,J){if(n.patchRoutesOnNavigation)if(z){if(Object.keys(z[0].params).length>0)return{active:!0,matches:hc(F,J,g,!0)}}else return{active:!0,matches:hc(F,J,g,!0)||[]};return{active:!1,matches:null}}async function Er(z,F,J,de){if(!n.patchRoutesOnNavigation)return{type:"success",matches:z};let pe=z;for(;;){let Ne=m==null,Re=m||f,Ce=c;try{await n.patchRoutesOnNavigation({signal:J,path:F,matches:pe,fetcherKey:de,patch:(je,Oe)=>{J.aborted||ry(je,Oe,Re,Ce,s,!1)}})}catch(je){return{type:"error",error:je,partialMatches:pe}}finally{Ne&&!J.aborted&&(f=[...f])}if(J.aborted)return{type:"aborted"};let Me=sr(Re,F,g);if(Me)return{type:"success",matches:Me};let Le=hc(Re,F,g,!0);if(!Le||pe.length===Le.length&&pe.every((je,Oe)=>je.route.id===Le[Oe].route.id))return{type:"success",matches:null};pe=Le}}function fo(z){c={},m=_i(z,s,void 0,c)}function ho(z,F,J=!1){let de=m==null;ry(z,F,m||f,c,s,J),de&&(f=[...f],we({}))}return D={get basename(){return g},get future(){return v},get state(){return j},get routes(){return f},get window(){return a},initialize:be,subscribe:ae,enableScrollRestoration:Bi,navigate:De,fetch:He,revalidate:qe,createHref:z=>n.history.createHref(z),encodeLocation:z=>n.history.encodeLocation(z),getFetcher:Dn,deleteFetcher:tu,dispose:ze,getBlocker:oa,deleteBlocker:wr,patchRoutes:ho,_internalFetchControllers:O,_internalSetRoutes:fo,_internalSetStateDoNotUseOrYouWillBreakYourApp(z){we(z)}},D}function KE(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function Vd(n,a,l,o,s,c){let f,m;if(s){f=[];for(let h of a)if(f.push(h),h.route.id===s){m=h;break}}else f=a,m=a[a.length-1];let g=zc(o||".",kc(f),Mn(n.pathname,l)||n.pathname,c==="path");if(o==null&&(g.search=n.search,g.hash=n.hash),(o==null||o===""||o===".")&&m){let h=ph(g.search);if(m.route.index&&!h)g.search=g.search?g.search.replace(/^\?/,"?index&"):"?index";else if(!m.route.index&&h){let v=new URLSearchParams(g.search),b=v.getAll("index");v.delete("index"),b.filter(S=>S).forEach(S=>v.append("index",S));let w=v.toString();g.search=w?`?${w}`:""}}return l!=="/"&&(g.pathname=ME({basename:l,pathname:g.pathname})),fr(g)}function ny(n,a,l){if(!l||!KE(l))return{path:a};if(l.formMethod&&!lN(l.formMethod))return{path:a,error:On(405,{method:l.formMethod})};let o=()=>({path:a,error:On(400,{type:"invalid-body"})}),c=(l.formMethod||"get").toUpperCase(),f=k0(a);if(l.body!==void 0){if(l.formEncType==="text/plain"){if(!an(c))return o();let b=typeof l.body=="string"?l.body:l.body instanceof FormData||l.body instanceof URLSearchParams?Array.from(l.body.entries()).reduce((w,[S,N])=>`${w}${S}=${N}
65
+ `,""):String(l.body);return{path:a,submission:{formMethod:c,formAction:f,formEncType:l.formEncType,formData:void 0,json:void 0,text:b}}}else if(l.formEncType==="application/json"){if(!an(c))return o();try{let b=typeof l.body=="string"?JSON.parse(l.body):l.body;return{path:a,submission:{formMethod:c,formAction:f,formEncType:l.formEncType,formData:void 0,json:b,text:void 0}}}catch{return o()}}}Je(typeof FormData=="function","FormData is not available in this environment");let m,g;if(l.formData)m=Kd(l.formData),g=l.formData;else if(l.body instanceof FormData)m=Kd(l.body),g=l.body;else if(l.body instanceof URLSearchParams)m=l.body,g=cy(m);else if(l.body==null)m=new URLSearchParams,g=new FormData;else try{m=new URLSearchParams(l.body),g=cy(m)}catch{return o()}let h={formMethod:c,formAction:f,formEncType:l&&l.formEncType||"application/x-www-form-urlencoded",formData:g,json:void 0,text:void 0};if(an(h.formMethod))return{path:a,submission:h};let v=Da(a);return n&&v.search&&ph(v.search)&&m.append("index",""),v.search=`?${m}`,{path:fr(v),submission:h}}function ay(n,a,l,o,s,c,f,m,g,h,v,b,w,S,N,E,R,C,A,T){let k=T?mn(T[1])?T[1].error:T[1].data:void 0,D=s.createURL(c.location),j=s.createURL(g),U;if(v&&c.errors){let fe=Object.keys(c.errors)[0];U=f.findIndex(X=>X.route.id===fe)}else if(T&&mn(T[1])){let fe=T[0];U=f.findIndex(X=>X.route.id===fe)-1}let B=T?T[1].statusCode:void 0,W=B&&B>=400,ne={currentUrl:D,currentParams:c.matches[0]?.params||{},nextUrl:j,nextParams:f[0].params,...m,actionResult:k,actionStatus:B},ee=f.map((fe,X)=>{let{route:te}=fe,O=null;if(U!=null&&X>U?O=!1:te.lazy?O=!0:te.loader==null?O=!1:v?O=Gd(te,c.loaderData,c.errors):IE(c.loaderData,c.matches[X],fe)&&(O=!0),O!==null)return Yd(l,o,n,fe,h,a,O);let I=W?!1:b||D.pathname+D.search===j.pathname+j.search||D.search!==j.search||XE(c.matches[X],fe),q={...ne,defaultShouldRevalidate:I},ye=Nc(fe,q);return Yd(l,o,n,fe,h,a,ye,q)}),ie=[];return N.forEach((fe,X)=>{if(v||!f.some(H=>H.route.id===fe.routeId)||S.has(X))return;let te=c.fetchers.get(X),O=te&&te.state!=="idle"&&te.data===void 0,I=sr(R,fe.path,C);if(!I){if(A&&O)return;ie.push({key:X,routeId:fe.routeId,path:fe.path,matches:null,match:null,request:null,controller:null});return}if(E.has(X))return;let q=mc(I,fe.path),ye=new AbortController,M=Yl(s,fe.path,ye.signal),Y=null;if(w.has(X))w.delete(X),Y=Ql(l,o,M,I,q,h,a);else if(O)b&&(Y=Ql(l,o,M,I,q,h,a));else{let H={...ne,defaultShouldRevalidate:W?!1:b};Nc(q,H)&&(Y=Ql(l,o,M,I,q,h,a,H))}Y&&ie.push({key:X,routeId:fe.routeId,path:fe.path,matches:Y,match:q,request:M,controller:ye})}),{dsMatches:ee,revalidatingFetchers:ie}}function Gd(n,a,l){if(n.lazy)return!0;if(!n.loader)return!1;let o=a!=null&&n.id in a,s=l!=null&&l[n.id]!==void 0;return!o&&s?!1:typeof n.loader=="function"&&n.loader.hydrate===!0?!0:!o&&!s}function IE(n,a,l){let o=!a||l.route.id!==a.route.id,s=!n.hasOwnProperty(l.route.id);return o||s}function XE(n,a){let l=n.route.path;return n.pathname!==a.pathname||l!=null&&l.endsWith("*")&&n.params["*"]!==a.params["*"]}function Nc(n,a){if(n.route.shouldRevalidate){let l=n.route.shouldRevalidate(a);if(typeof l=="boolean")return l}return a.defaultShouldRevalidate}function ry(n,a,l,o,s,c){let f;if(n){let h=o[n];Je(h,`No route found to patch children into: routeId = ${n}`),h.children||(h.children=[]),f=h.children}else f=l;let m=[],g=[];if(a.forEach(h=>{let v=f.find(b=>A0(h,b));v?g.push({existingRoute:v,newRoute:h}):m.push(h)}),m.length>0){let h=_i(m,s,[n||"_","patch",String(f?.length||"0")],o);f.push(...h)}if(c&&g.length>0)for(let h=0;h<g.length;h++){let{existingRoute:v,newRoute:b}=g[h],w=v,[S]=_i([b],s,[],{},!0);Object.assign(w,{element:S.element?S.element:w.element,errorElement:S.errorElement?S.errorElement:w.errorElement,hydrateFallbackElement:S.hydrateFallbackElement?S.hydrateFallbackElement:w.hydrateFallbackElement})}}function A0(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,o)=>a.children?.some(s=>A0(l,s))):!1}var ly=new WeakMap,T0=({key:n,route:a,manifest:l,mapRouteProperties:o})=>{let s=l[a.id];if(Je(s,"No route found in manifest"),!s.lazy||typeof s.lazy!="object")return;let c=s.lazy[n];if(!c)return;let f=ly.get(s);f||(f={},ly.set(s,f));let m=f[n];if(m)return m;let g=(async()=>{let h=pE(n),b=s[n]!==void 0&&n!=="hasErrorBoundary";if(h)jt(!h,"Route property "+n+" is not a supported lazy route property. This property will be ignored."),f[n]=Promise.resolve();else if(b)jt(!1,`Route "${s.id}" has a static property "${n}" defined. The lazy property will be ignored.`);else{let w=await c();w!=null&&(Object.assign(s,{[n]:w}),Object.assign(s,o(s)))}typeof s.lazy=="object"&&(s.lazy[n]=void 0,Object.values(s.lazy).every(w=>w===void 0)&&(s.lazy=void 0))})();return f[n]=g,g},oy=new WeakMap;function QE(n,a,l,o,s){let c=l[n.id];if(Je(c,"No route found in manifest"),!n.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof n.lazy=="function"){let v=oy.get(c);if(v)return{lazyRoutePromise:v,lazyHandlerPromise:v};let b=(async()=>{Je(typeof n.lazy=="function","No lazy route function found");let w=await n.lazy(),S={};for(let N in w){let E=w[N];if(E===void 0)continue;let R=vE(N),A=c[N]!==void 0&&N!=="hasErrorBoundary";R?jt(!R,"Route property "+N+" is not a supported property to be returned from a lazy route function. This property will be ignored."):A?jt(!A,`Route "${c.id}" has a static property "${N}" defined but its lazy function is also returning a value for this property. The lazy route property "${N}" will be ignored.`):S[N]=E}Object.assign(c,S),Object.assign(c,{...o(c),lazy:void 0})})();return oy.set(c,b),b.catch(()=>{}),{lazyRoutePromise:b,lazyHandlerPromise:b}}let f=Object.keys(n.lazy),m=[],g;for(let v of f){if(s&&s.includes(v))continue;let b=T0({key:v,route:n,manifest:l,mapRouteProperties:o});b&&(m.push(b),v===a&&(g=b))}let h=m.length>0?Promise.all(m).then(()=>{}):void 0;return h?.catch(()=>{}),g?.catch(()=>{}),{lazyRoutePromise:h,lazyHandlerPromise:g}}async function iy(n){let a=n.matches.filter(s=>s.shouldLoad),l={};return(await Promise.all(a.map(s=>s.resolve()))).forEach((s,c)=>{l[a[c].route.id]=s}),l}async function ZE(n){return n.matches.some(a=>a.route.unstable_middleware)?M0(n,!1,()=>iy(n),(a,l)=>({[l]:{type:"error",result:a}})):iy(n)}async function M0(n,a,l,o){let{matches:s,request:c,params:f,context:m}=n,g={handlerResult:void 0};try{let h=s.flatMap(b=>b.route.unstable_middleware?b.route.unstable_middleware.map(w=>[b.route.id,w]):[]),v=await D0({request:c,params:f,context:m},h,a,g,l);return a?v:g.handlerResult}catch(h){if(!g.middlewareError)throw h;let v=await o(g.middlewareError.error,g.middlewareError.routeId);return g.handlerResult?Object.assign(g.handlerResult,v):v}}async function D0(n,a,l,o,s,c=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 m=a[c];if(!m)return o.handlerResult=await s(),o.handlerResult;let[g,h]=m,v=!1,b,w=async()=>{if(v)throw new Error("You may only call `next()` once per middleware");v=!0,await D0(n,a,l,o,s,c+1)};try{let S=await h({request:n.request,params:n.params,context:n.context},w);return v?S===void 0?b:S:w()}catch(S){throw o.middlewareError?o.middlewareError.error!==S&&(o.middlewareError={routeId:g,error:S}):o.middlewareError={routeId:g,error:S},S}}function L0(n,a,l,o,s){let c=T0({key:"unstable_middleware",route:o.route,manifest:a,mapRouteProperties:n}),f=QE(o.route,an(l.method)?"action":"loader",a,n,s);return{middleware:c,route:f.lazyRoutePromise,handler:f.lazyHandlerPromise}}function Yd(n,a,l,o,s,c,f,m=null){let g=!1,h=L0(n,a,l,o,s);return{...o,_lazyPromises:h,shouldLoad:f,unstable_shouldRevalidateArgs:m,unstable_shouldCallHandler(v){return g=!0,m?typeof v=="boolean"?Nc(o,{...m,defaultShouldRevalidate:v}):Nc(o,m):f},resolve(v){return g||f||v&&!an(l.method)&&(o.route.lazy||o.route.loader)?WE({request:l,match:o,lazyHandlerPromise:h?.handler,lazyRoutePromise:h?.route,handlerOverride:v,scopedContext:c}):Promise.resolve({type:"data",result:void 0})}}}function Ql(n,a,l,o,s,c,f,m=null){return o.map(g=>g.route.id!==s.route.id?{...g,shouldLoad:!1,unstable_shouldRevalidateArgs:m,unstable_shouldCallHandler:()=>!1,_lazyPromises:L0(n,a,l,g,c),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Yd(n,a,l,g,c,f,!0,m))}async function JE(n,a,l,o,s,c){l.some(h=>h._lazyPromises?.middleware)&&await Promise.all(l.map(h=>h._lazyPromises?.middleware));let f={request:a,params:l[0].params,context:s,matches:l},g=await n({...f,fetcherKey:o,unstable_runClientMiddleware:h=>{let v=f;return M0(v,!1,()=>h({...v,fetcherKey:o,unstable_runClientMiddleware:()=>{throw new Error("Cannot call `unstable_runClientMiddleware()` from within an `unstable_runClientMiddleware` handler")}}),(b,w)=>({[w]:{type:"error",result:b}}))}});try{await Promise.all(l.flatMap(h=>[h._lazyPromises?.handler,h._lazyPromises?.route]))}catch{}return g}async function WE({request:n,match:a,lazyHandlerPromise:l,lazyRoutePromise:o,handlerOverride:s,scopedContext:c}){let f,m,g=an(n.method),h=g?"action":"loader",v=b=>{let w,S=new Promise((R,C)=>w=C);m=()=>w(),n.signal.addEventListener("abort",m);let N=R=>typeof b!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${h}" [routeId: ${a.route.id}]`)):b({request:n,params:a.params,context:c},...R!==void 0?[R]:[]),E=(async()=>{try{return{type:"data",result:await(s?s(C=>N(C)):N())}}catch(R){return{type:"error",result:R}}})();return Promise.race([E,S])};try{let b=g?a.route.action:a.route.loader;if(l||o)if(b){let w,[S]=await Promise.all([v(b).catch(N=>{w=N}),l,o]);if(w!==void 0)throw w;f=S}else{await l;let w=g?a.route.action:a.route.loader;if(w)[f]=await Promise.all([v(w),o]);else if(h==="action"){let S=new URL(n.url),N=S.pathname+S.search;throw On(405,{method:n.method,pathname:N,routeId:a.route.id})}else return{type:"data",result:void 0}}else if(b)f=await v(b);else{let w=new URL(n.url),S=w.pathname+w.search;throw On(404,{pathname:S})}}catch(b){return{type:"error",result:b}}finally{m&&n.signal.removeEventListener("abort",m)}return f}async function eN(n){let{result:a,type:l}=n;if(z0(a)){let o;try{let s=a.headers.get("Content-Type");s&&/\bapplication\/json\b/.test(s)?a.body==null?o=null:o=await a.json():o=await a.text()}catch(s){return{type:"error",error:s}}return l==="error"?{type:"error",error:new Fd(a.status,a.statusText,o),statusCode:a.status,headers:a.headers}:{type:"data",data:o,statusCode:a.status,headers:a.headers}}return l==="error"?my(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 Fd(a.init?.status||500,void 0,a.data),statusCode:Ei(a)?a.status:void 0,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"error",error:a,statusCode:Ei(a)?a.status:void 0}:my(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 tN(n,a,l,o,s){let c=n.headers.get("Location");if(Je(c,"Redirects returned/thrown from loaders/actions must have a Location header"),!mh(c)){let f=o.slice(0,o.findIndex(m=>m.route.id===l)+1);c=Vd(new URL(a.url),f,s,c),n.headers.set("Location",c)}return n}function sy(n,a,l){if(mh(n)){let o=n,s=o.startsWith("//")?new URL(a.protocol+o):new URL(o),c=Mn(s.pathname,l)!=null;if(s.origin===a.origin&&c)return s.pathname+s.search+s.hash}return n}function Yl(n,a,l,o){let s=n.createURL(k0(a)).toString(),c={signal:l};if(o&&an(o.formMethod)){let{formMethod:f,formEncType:m}=o;c.method=f.toUpperCase(),m==="application/json"?(c.headers=new Headers({"Content-Type":m}),c.body=JSON.stringify(o.json)):m==="text/plain"?c.body=o.text:m==="application/x-www-form-urlencoded"&&o.formData?c.body=Kd(o.formData):c.body=o.formData}return new Request(s,c)}function Kd(n){let a=new URLSearchParams;for(let[l,o]of n.entries())a.append(l,typeof o=="string"?o:o.name);return a}function cy(n){let a=new FormData;for(let[l,o]of n.entries())a.append(l,o);return a}function nN(n,a,l,o=!1,s=!1){let c={},f=null,m,g=!1,h={},v=l&&mn(l[1])?l[1].error:void 0;return n.forEach(b=>{if(!(b.route.id in a))return;let w=b.route.id,S=a[w];if(Je(!Gr(S),"Cannot handle redirect results in processLoaderData"),mn(S)){let N=S.error;if(v!==void 0&&(N=v,v=void 0),f=f||{},s)f[w]=N;else{let E=Fr(n,w);f[E.route.id]==null&&(f[E.route.id]=N)}o||(c[w]=O0),g||(g=!0,m=Ei(S.error)?S.error.status:500),S.headers&&(h[w]=S.headers)}else c[w]=S.data,S.statusCode&&S.statusCode!==200&&!g&&(m=S.statusCode),S.headers&&(h[w]=S.headers)}),v!==void 0&&l&&(f={[l[0]]:v},l[2]&&(c[l[2]]=void 0)),{loaderData:c,errors:f,statusCode:m||200,loaderHeaders:h}}function uy(n,a,l,o,s,c){let{loaderData:f,errors:m}=nN(a,l,o);return s.filter(g=>!g.matches||g.matches.some(h=>h.shouldLoad)).forEach(g=>{let{key:h,match:v,controller:b}=g,w=c[h];if(Je(w,"Did not find corresponding fetcher result"),!(b&&b.signal.aborted))if(mn(w)){let S=Fr(n.matches,v?.route.id);m&&m[S.route.id]||(m={...m,[S.route.id]:w.error}),n.fetchers.delete(h)}else if(Gr(w))Je(!1,"Unhandled fetcher revalidation redirect");else{let S=or(w.data);n.fetchers.set(h,S)}}),{loaderData:f,errors:m}}function fy(n,a,l,o){let s=Object.entries(a).filter(([,c])=>c!==O0).reduce((c,[f,m])=>(c[f]=m,c),{});for(let c of l){let f=c.route.id;if(!a.hasOwnProperty(f)&&n.hasOwnProperty(f)&&c.route.loader&&(s[f]=n[f]),o&&o.hasOwnProperty(f))break}return s}function dy(n){return n?mn(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function Fr(n,a){return(a?n.slice(0,n.findIndex(o=>o.route.id===a)+1):[...n]).reverse().find(o=>o.route.hasErrorBoundary===!0)||n[0]}function hy(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 On(n,{pathname:a,routeId:l,method:o,type:s,message:c}={}){let f="Unknown Server Error",m="Unknown @remix-run/router error";return n===400?(f="Bad Request",o&&a&&l?m=`You made a ${o} request to "${a}" but did not provide a \`loader\` for route "${l}", so there is no way to handle the request.`:s==="invalid-body"&&(m="Unable to encode submission body")):n===403?(f="Forbidden",m=`Route "${l}" does not match URL "${a}"`):n===404?(f="Not Found",m=`No route matches URL "${a}"`):n===405&&(f="Method Not Allowed",o&&a&&l?m=`You made a ${o.toUpperCase()} request to "${a}" but did not provide an \`action\` for route "${l}", so there is no way to handle the request.`:o&&(m=`Invalid request method "${o.toUpperCase()}"`)),new Fd(n||500,f,new Error(m),!0)}function Ws(n){let a=Object.entries(n);for(let l=a.length-1;l>=0;l--){let[o,s]=a[l];if(Gr(s))return{key:o,result:s}}}function k0(n){let a=typeof n=="string"?Da(n):n;return fr({...a,hash:""})}function aN(n,a){return n.pathname!==a.pathname||n.search!==a.search?!1:n.hash===""?a.hash!=="":n.hash===a.hash?!0:a.hash!==""}function rN(n){return z0(n.result)&&$E.has(n.result.status)}function mn(n){return n.type==="error"}function Gr(n){return(n&&n.type)==="redirect"}function my(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function z0(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function lN(n){return BE.has(n.toUpperCase())}function an(n){return PE.has(n.toUpperCase())}function ph(n){return new URLSearchParams(n).getAll("index").some(a=>a==="")}function mc(n,a){let l=typeof a=="string"?Da(a).search:a.search;if(n[n.length-1].route.index&&ph(l||""))return n[n.length-1];let o=C0(n);return o[o.length-1]}function py(n){let{formMethod:a,formAction:l,formEncType:o,text:s,formData:c,json:f}=n;if(!(!a||!l||!o)){if(s!=null)return{formMethod:a,formAction:l,formEncType:o,formData:void 0,json:void 0,text:s};if(c!=null)return{formMethod:a,formAction:l,formEncType:o,formData:c,json:void 0,text:void 0};if(f!==void 0)return{formMethod:a,formAction:l,formEncType:o,formData:void 0,json:f,text:void 0}}}function gd(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 oN(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 ui(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 iN(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 or(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 sN(n,a){try{let l=n.sessionStorage.getItem(R0);if(l){let o=JSON.parse(l);for(let[s,c]of Object.entries(o||{}))c&&Array.isArray(c)&&a.set(s,new Set(c||[]))}}catch{}}function cN(n,a){if(a.size>0){let l={};for(let[o,s]of a)l[o]=[...s];try{n.sessionStorage.setItem(R0,JSON.stringify(l))}catch(o){jt(!1,`Failed to save applied view transitions in sessionStorage (${o}).`)}}}function uN(){let n,a,l=new Promise((o,s)=>{n=async c=>{o(c);try{await l}catch{}},a=async c=>{s(c);try{await l}catch{}}});return{promise:l,resolve:n,reject:a}}var el=y.createContext(null);el.displayName="DataRouter";var Oi=y.createContext(null);Oi.displayName="DataRouterState";y.createContext(!1);var gh=y.createContext({isTransitioning:!1});gh.displayName="ViewTransition";var U0=y.createContext(new Map);U0.displayName="Fetchers";var fN=y.createContext(null);fN.displayName="Await";var Hn=y.createContext(null);Hn.displayName="Navigation";var Uc=y.createContext(null);Uc.displayName="Location";var ra=y.createContext({outlet:null,matches:[],isDataRoute:!1});ra.displayName="Route";var vh=y.createContext(null);vh.displayName="RouteError";function dN(n,{relative:a}={}){Je(no(),"useHref() may be used only in the context of a <Router> component.");let{basename:l,navigator:o}=y.useContext(Hn),{hash:s,pathname:c,search:f}=Ai(n,{relative:a}),m=c;return l!=="/"&&(m=c==="/"?l:Wn([l,c])),o.createHref({pathname:m,search:f,hash:s})}function no(){return y.useContext(Uc)!=null}function La(){return Je(no(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(Uc).location}var P0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function H0(n){y.useContext(Hn).static||y.useLayoutEffect(n)}function ao(){let{isDataRoute:n}=y.useContext(ra);return n?NN():hN()}function hN(){Je(no(),"useNavigate() may be used only in the context of a <Router> component.");let n=y.useContext(el),{basename:a,navigator:l}=y.useContext(Hn),{matches:o}=y.useContext(ra),{pathname:s}=La(),c=JSON.stringify(kc(o)),f=y.useRef(!1);return H0(()=>{f.current=!0}),y.useCallback((g,h={})=>{if(jt(f.current,P0),!f.current)return;if(typeof g=="number"){l.go(g);return}let v=zc(g,JSON.parse(c),s,h.relative==="path");n==null&&a!=="/"&&(v.pathname=v.pathname==="/"?a:Wn([a,v.pathname])),(h.replace?l.replace:l.push)(v,h.state,h)},[a,l,c,s,n])}y.createContext(null);function Ai(n,{relative:a}={}){let{matches:l}=y.useContext(ra),{pathname:o}=La(),s=JSON.stringify(kc(l));return y.useMemo(()=>zc(n,JSON.parse(s),o,a==="path"),[n,s,o,a])}function mN(n,a,l,o){Je(no(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=y.useContext(Hn),{matches:c}=y.useContext(ra),f=c[c.length-1],m=f?f.params:{},g=f?f.pathname:"/",h=f?f.pathnameBase:"/",v=f&&f.route;{let C=v&&v.path||"";B0(g,!v||C.endsWith("*")||C.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${C}">) 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="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let b=pr(),w;w=b;let S=w.pathname||"/",C=S;if(m!=="/"){let R=m.replace(/^\//,"").split("/");C="/"+S.replace(/^\//,"").split("/").slice(R.length).join("/")}let E=rr(n,{pathname:C});return Ct(v||E!=null,`No routes matched location "${w.pathname}${w.search}${w.hash}" `),Ct(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${w.pathname}${w.search}${w.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.`),zE(E&&E.map(R=>Object.assign({},R,{params:Object.assign({},h,R.params),pathname:Jn([m,s.encodeLocation?s.encodeLocation(R.pathname).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?m:Jn([m,s.encodeLocation?s.encodeLocation(R.pathnameBase).pathname:R.pathnameBase])})),c,l,i)}function ME(){let n=$E(),a=yo(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},c={padding:"2px 4px",backgroundColor:i},f=null;return console.error("Error handled by React Router default ErrorBoundary:",n),f=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:c},"ErrorBoundary")," or"," ",y.createElement("code",{style:c},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},a),l?y.createElement("pre",{style:s},l):null,f)}var DE=y.createElement(ME,null),LE=class extends y.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?y.createElement(na.Provider,{value:this.props.routeContext},y.createElement(rh.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function kE({routeContext:n,match:a,children:l}){let i=y.useContext(Jr);return i&&i.static&&i.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=a.route.id),y.createElement(na.Provider,{value:n},l)}function zE(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,c=l?.errors;if(c!=null){let p=s.findIndex(m=>m.route.id&&c?.[m.route.id]!==void 0);Xe(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).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:v,errors:b}=l,w=m.route.loader&&!v.hasOwnProperty(m.route.id)&&(!b||b[m.route.id]===void 0);if(m.route.lazy||w){f=!0,h>=0?s=s.slice(0,h+1):s=[s[0]];break}}}return s.reduceRight((p,m,v)=>{let b,w=!1,S=null,C=null;l&&(b=c&&m.route.id?c[m.route.id]:void 0,S=m.route.errorElement||DE,f&&(h<0&&v===0?(E0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,C=null):h===v&&(w=!0,C=m.route.hydrateFallbackElement||null)));let E=a.concat(s.slice(0,v+1)),j=()=>{let R;return b?R=S:w?R=C:m.route.Component?R=y.createElement(m.route.Component,null):m.route.element?R=m.route.element:R=p,y.createElement(kE,{match:m,routeContext:{outlet:p,matches:E,isDataRoute:l!=null},children:R})};return l&&(m.route.ErrorBoundary||m.route.errorElement||v===0)?y.createElement(LE,{location:l.location,revalidation:l.revalidation,component:S,error:b,children:j(),routeContext:{outlet:null,matches:E,isDataRoute:!0}}):j()},null)}function lh(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function UE(n){let a=y.useContext(Jr);return Xe(a,lh(n)),a}function PE(n){let a=y.useContext(_o);return Xe(a,lh(n)),a}function HE(n){let a=y.useContext(na);return Xe(a,lh(n)),a}function ih(n){let a=HE(n),l=a.matches[a.matches.length-1];return Xe(l.route.id,`${n} can only be used on routes that contain a unique "id"`),l.route.id}function BE(){return ih("useRouteId")}function $E(){let n=y.useContext(rh),a=PE("useRouteError"),l=ih("useRouteError");return n!==void 0?n:a.errors?.[l]}function VE(){let{router:n}=UE("useNavigate"),a=ih("useNavigate"),l=y.useRef(!1);return _0(()=>{l.current=!0}),y.useCallback(async(s,c={})=>{Ct(l.current,S0),l.current&&(typeof s=="number"?n.navigate(s):await n.navigate(s,{fromRouteId:a,...c}))},[n,a])}var ay={};function E0(n,a,l){!a&&!ay[n]&&(ay[n]=!0,Ct(!1,l))}var ry={};function ly(n,a){!n&&!ry[a]&&(ry[a]=!0,console.warn(a))}function qE(n){let a={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&Ct(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(a,{element:y.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&Ct(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(a,{hydrateFallbackElement:y.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&Ct(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(a,{errorElement:y.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),a}var FE=["HydrateFallback","hydrateFallbackElement"];function YE(n,a){return cE({basename:a?.basename,unstable_getContext:a?.unstable_getContext,future:a?.future,history:j_({initialEntries:a?.initialEntries,initialIndex:a?.initialIndex}),hydrationData:a?.hydrationData,routes:n,hydrationRouteProperties:FE,mapRouteProperties:qE,dataStrategy:a?.dataStrategy,patchRoutesOnNavigation:a?.patchRoutesOnNavigation}).initialize()}var GE=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 KE({router:n,flushSync:a}){let[l,i]=y.useState(n.state),[s,c]=y.useState(),[f,h]=y.useState({isTransitioning:!1}),[p,m]=y.useState(),[v,b]=y.useState(),[w,S]=y.useState(),C=y.useRef(new Map),E=y.useCallback((k,{deletedFetchers:H,flushSync:M,viewTransitionOpts:N})=>{k.fetchers.forEach((J,te)=>{J.data!==void 0&&C.current.set(te,J.data)}),H.forEach(J=>C.current.delete(J)),ly(M===!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 B=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(ly(N==null||B,"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||!B){a&&M?a(()=>i(k)):y.startTransition(()=>i(k));return}if(a&&M){a(()=>{v&&(p&&p.resolve(),v.skipTransition()),h({isTransitioning:!0,flushSync:!0,currentLocation:N.currentLocation,nextLocation:N.nextLocation})});let J=n.window.document.startViewTransition(()=>{a(()=>i(k))});J.finished.finally(()=>{a(()=>{m(void 0),b(void 0),c(void 0),h({isTransitioning:!1})})}),a(()=>b(J));return}v?(p&&p.resolve(),v.skipTransition(),S({state:k,currentLocation:N.currentLocation,nextLocation:N.nextLocation})):(c(k),h({isTransitioning:!0,flushSync:!1,currentLocation:N.currentLocation,nextLocation:N.nextLocation}))},[n.window,a,v,p]);y.useLayoutEffect(()=>n.subscribe(E),[n,E]),y.useEffect(()=>{f.isTransitioning&&!f.flushSync&&m(new GE)},[f]),y.useEffect(()=>{if(p&&s&&n.window){let k=s,H=p.promise,M=n.window.document.startViewTransition(async()=>{y.startTransition(()=>i(k)),await H});M.finished.finally(()=>{m(void 0),b(void 0),c(void 0),h({isTransitioning:!1})}),b(M)}},[s,p,n.window]),y.useEffect(()=>{p&&s&&l.location.key===s.location.key&&p.resolve()},[p,v,l.location,s]),y.useEffect(()=>{!f.isTransitioning&&w&&(c(w.state),h({isTransitioning:!0,flushSync:!1,currentLocation:w.currentLocation,nextLocation:w.nextLocation}),S(void 0))},[f.isTransitioning,w]);let j=y.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:k=>n.navigate(k),push:(k,H,M)=>n.navigate(k,{state:H,preventScrollReset:M?.preventScrollReset}),replace:(k,H,M)=>n.navigate(k,{replace:!0,state:H,preventScrollReset:M?.preventScrollReset})}),[n]),R=n.basename||"/",L=y.useMemo(()=>({router:n,navigator:j,static:!1,basename:R}),[n,j,R]);return y.createElement(y.Fragment,null,y.createElement(Jr.Provider,{value:L},y.createElement(_o.Provider,{value:l},y.createElement(w0.Provider,{value:C.current},y.createElement(ah.Provider,{value:f},y.createElement(ZE,{basename:R,location:l.location,navigationType:l.historyAction,navigator:j},y.createElement(XE,{routes:n.routes,future:n.future,state:l})))))),null)}var XE=y.memo(QE);function QE({routes:n,future:a,state:l}){return TE(n,void 0,l,a)}function IE({to:n,replace:a,state:l,relative:i}){Xe(Wl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=y.useContext(Pn);Ct(!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:c}=y.useContext(na),{pathname:f}=pr(),h=Rc(),p=Cc(n,Ec(c),f,i==="path"),m=JSON.stringify(p);return y.useEffect(()=>{h(JSON.parse(m),{replace:a,state:l,relative:i})},[h,m,i,a,l]),null}function ZE({basename:n="/",children:a=null,location:l,navigationType:i="POP",navigator:s,static:c=!1}){Xe(!Wl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=n.replace(/^\/*/,"/"),h=y.useMemo(()=>({basename:f,navigator:s,static:c,future:{}}),[f,s,c]);typeof l=="string"&&(l=Aa(l));let{pathname:p="/",search:m="",hash:v="",state:b=null,key:w="default"}=l,S=y.useMemo(()=>{let C=Tn(p,f);return C==null?null:{location:{pathname:C,search:m,hash:v,state:b,key:w},navigationType:i}},[f,p,m,v,b,w,i]);return Ct(S!=null,`<Router basename="${f}"> is not able to match the URL "${p}${m}${v}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:y.createElement(Pn.Provider,{value:h},y.createElement(Nc.Provider,{children:a,value:S}))}var ic="get",oc="application/x-www-form-urlencoded";function jc(n){return n!=null&&typeof n.tagName=="string"}function JE(n){return jc(n)&&n.tagName.toLowerCase()==="button"}function WE(n){return jc(n)&&n.tagName.toLowerCase()==="form"}function e2(n){return jc(n)&&n.tagName.toLowerCase()==="input"}function t2(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function n2(n,a){return n.button===0&&(!a||a==="_self")&&!t2(n)}var Gs=null;function a2(){if(Gs===null)try{new FormData(document.createElement("form"),0),Gs=!1}catch{Gs=!0}return Gs}var r2=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function sd(n){return n!=null&&!r2.has(n)?(Ct(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${oc}"`),null):n}function l2(n,a){let l,i,s,c,f;if(WE(n)){let h=n.getAttribute("action");i=h?Tn(h,a):null,l=n.getAttribute("method")||ic,s=sd(n.getAttribute("enctype"))||oc,c=new FormData(n)}else if(JE(n)||e2(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?Tn(p,a):null,l=n.getAttribute("formmethod")||h.getAttribute("method")||ic,s=sd(n.getAttribute("formenctype"))||sd(h.getAttribute("enctype"))||oc,c=new FormData(h,n),!a2()){let{name:m,type:v,value:b}=n;if(v==="image"){let w=m?`${m}.`:"";c.append(`${w}x`,"0"),c.append(`${w}y`,"0")}else m&&c.append(m,b)}}else{if(jc(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');l=ic,i=null,s=oc,f=n}return c&&s==="text/plain"&&(f=c,c=void 0),{action:i,method:l.toLowerCase(),encType:s,formData:c,body:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function oh(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function i2(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&&Tn(i.pathname,a)==="/"?i.pathname=`${a.replace(/\/$/,"")}/_root.${l}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${l}`,i}async function o2(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 s2(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 c2(n,a,l){let i=await Promise.all(n.map(async s=>{let c=a.routes[s.route.id];if(c){let f=await o2(c,l);return f.links?f.links():[]}return[]}));return h2(i.flat(1).filter(s2).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function iy(n,a,l,i,s,c){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 c==="assets"?a.filter((p,m)=>f(p,m)||h(p,m)):c==="data"?a.filter((p,m)=>{let v=i.routes[p.route.id];if(!v||!v.hasLoader)return!1;if(f(p,m)||h(p,m))return!0;if(p.route.shouldRevalidate){let b=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 b=="boolean")return b}return!0}):[]}function u2(n,a,{includeHydrateFallback:l}={}){return f2(n.map(i=>{let s=a.routes[i.route.id];if(!s)return[];let c=[s.module];return s.clientActionModule&&(c=c.concat(s.clientActionModule)),s.clientLoaderModule&&(c=c.concat(s.clientLoaderModule)),l&&s.hydrateFallbackModule&&(c=c.concat(s.hydrateFallbackModule)),s.imports&&(c=c.concat(s.imports)),c}).flat(1))}function f2(n){return[...new Set(n)]}function d2(n){let a={},l=Object.keys(n).sort();for(let i of l)a[i]=n[i];return a}function h2(n,a){let l=new Set;return new Set(a),n.reduce((i,s)=>{let c=JSON.stringify(d2(s));return l.has(c)||(l.add(c),i.push({key:c,link:s})),i},[])}function C0(){let n=y.useContext(Jr);return oh(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function m2(){let n=y.useContext(_o);return oh(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var sh=y.createContext(void 0);sh.displayName="FrameworkContext";function N0(){let n=y.useContext(sh);return oh(n,"You must render this element inside a <HydratedRouter> element"),n}function p2(n,a){let l=y.useContext(sh),[i,s]=y.useState(!1),[c,f]=y.useState(!1),{onFocus:h,onBlur:p,onMouseEnter:m,onMouseLeave:v,onTouchStart:b}=a,w=y.useRef(null);y.useEffect(()=>{if(n==="render"&&f(!0),n==="viewport"){let E=R=>{R.forEach(L=>{f(L.isIntersecting)})},j=new IntersectionObserver(E,{threshold:.5});return w.current&&j.observe(w.current),()=>{j.disconnect()}}},[n]),y.useEffect(()=>{if(i){let E=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(E)}}},[i]);let S=()=>{s(!0)},C=()=>{s(!1),f(!1)};return l?n!=="intent"?[c,w,{}]:[c,w,{onFocus:io(h,S),onBlur:io(p,C),onMouseEnter:io(m,S),onMouseLeave:io(v,C),onTouchStart:io(b,S)}]:[!1,w,{}]}function io(n,a){return l=>{n&&n(l),l.defaultPrevented||a(l)}}function g2({page:n,...a}){let{router:l}=C0(),i=y.useMemo(()=>rr(l.routes,n,l.basename),[l.routes,n,l.basename]);return i?y.createElement(y2,{page:n,matches:i,...a}):null}function v2(n){let{manifest:a,routeModules:l}=N0(),[i,s]=y.useState([]);return y.useEffect(()=>{let c=!1;return c2(n,a,l).then(f=>{c||s(f)}),()=>{c=!0}},[n,a,l]),i}function y2({page:n,matches:a,...l}){let i=pr(),{manifest:s,routeModules:c}=N0(),{basename:f}=C0(),{loaderData:h,matches:p}=m2(),m=y.useMemo(()=>iy(n,a,p,s,i,"data"),[n,a,p,s,i]),v=y.useMemo(()=>iy(n,a,p,s,i,"assets"),[n,a,p,s,i]),b=y.useMemo(()=>{if(n===i.pathname+i.search+i.hash)return[];let C=new Set,E=!1;if(a.forEach(R=>{let L=s.routes[R.route.id];!L||!L.hasLoader||(!m.some(k=>k.route.id===R.route.id)&&R.route.id in h&&c[R.route.id]?.shouldRevalidate||L.hasClientLoader?E=!0:C.add(R.route.id))}),C.size===0)return[];let j=i2(n,f,"data");return E&&C.size>0&&j.searchParams.set("_routes",a.filter(R=>C.has(R.route.id)).map(R=>R.route.id).join(",")),[j.pathname+j.search]},[f,h,i,s,m,a,n,c]),w=y.useMemo(()=>u2(v,s),[v,s]),S=v2(v);return y.createElement(y.Fragment,null,b.map(C=>y.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...l})),w.map(C=>y.createElement("link",{key:C,rel:"modulepreload",href:C,...l})),S.map(({key:C,link:E})=>y.createElement("link",{key:C,...E})))}function b2(...n){return a=>{n.forEach(l=>{typeof l=="function"?l(a):l!=null&&(l.current=a)})}}var R0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{R0&&(window.__reactRouterVersion="7.7.1")}catch{}var j0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,O0=y.forwardRef(function({onClick:a,discover:l="render",prefetch:i="none",relative:s,reloadDocument:c,replace:f,state:h,target:p,to:m,preventScrollReset:v,viewTransition:b,...w},S){let{basename:C}=y.useContext(Pn),E=typeof m=="string"&&j0.test(m),j,R=!1;if(typeof m=="string"&&E&&(j=m,R0))try{let te=new URL(window.location.href),ae=m.startsWith("//")?new URL(te.protocol+m):new URL(m),re=Tn(ae.pathname,C);ae.origin===te.origin&&re!=null?m=re+ae.search+ae.hash:R=!0}catch{Ct(!1,`<Link to="${m}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let L=OE(m,{relative:s}),[k,H,M]=p2(i,w),N=_2(m,{replace:f,state:h,target:p,preventScrollReset:v,relative:s,viewTransition:b});function B(te){a&&a(te),te.defaultPrevented||N(te)}let J=y.createElement("a",{...w,...M,href:j||L,onClick:R||c?a:B,ref:b2(S,H),target:p,"data-discover":!E&&l==="render"?"true":void 0});return k&&!E?y.createElement(y.Fragment,null,J,y.createElement(g2,{page:L})):J});O0.displayName="Link";var x2=y.forwardRef(function({"aria-current":a="page",caseSensitive:l=!1,className:i="",end:s=!1,style:c,to:f,viewTransition:h,children:p,...m},v){let b=Eo(f,{relative:m.relative}),w=pr(),S=y.useContext(_o),{navigator:C,basename:E}=y.useContext(Pn),j=S!=null&&j2(b)&&h===!0,R=C.encodeLocation?C.encodeLocation(b).pathname:b.pathname,L=w.pathname,k=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;l||(L=L.toLowerCase(),k=k?k.toLowerCase():null,R=R.toLowerCase()),k&&E&&(k=Tn(k,E)||k);const H=R!=="/"&&R.endsWith("/")?R.length-1:R.length;let M=L===R||!s&&L.startsWith(R)&&L.charAt(H)==="/",N=k!=null&&(k===R||!s&&k.startsWith(R)&&k.charAt(R.length)==="/"),B={isActive:M,isPending:N,isTransitioning:j},J=M?a:void 0,te;typeof i=="function"?te=i(B):te=[i,M?"active":null,N?"pending":null,j?"transitioning":null].filter(Boolean).join(" ");let ae=typeof c=="function"?c(B):c;return y.createElement(O0,{...m,"aria-current":J,className:te,ref:v,style:ae,to:f,viewTransition:h},typeof p=="function"?p(B):p)});x2.displayName="NavLink";var w2=y.forwardRef(({discover:n="render",fetcherKey:a,navigate:l,reloadDocument:i,replace:s,state:c,method:f=ic,action:h,onSubmit:p,relative:m,preventScrollReset:v,viewTransition:b,...w},S)=>{let C=N2(),E=R2(h,{relative:m}),j=f.toLowerCase()==="get"?"get":"post",R=typeof h=="string"&&j0.test(h),L=k=>{if(p&&p(k),k.defaultPrevented)return;k.preventDefault();let H=k.nativeEvent.submitter,M=H?.getAttribute("formmethod")||f;C(H||k.currentTarget,{fetcherKey:a,method:M,navigate:l,replace:s,state:c,relative:m,preventScrollReset:v,viewTransition:b})};return y.createElement("form",{ref:S,method:j,action:E,onSubmit:i?p:L,...w,"data-discover":!R&&n==="render"?"true":void 0})});w2.displayName="Form";function S2(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function A0(n){let a=y.useContext(Jr);return Xe(a,S2(n)),a}function _2(n,{target:a,replace:l,state:i,preventScrollReset:s,relative:c,viewTransition:f}={}){let h=Rc(),p=pr(),m=Eo(n,{relative:c});return y.useCallback(v=>{if(n2(v,a)){v.preventDefault();let b=l!==void 0?l:ir(p)===ir(m);h(n,{replace:b,state:i,preventScrollReset:s,relative:c,viewTransition:f})}},[p,h,m,l,i,a,n,s,c,f])}var E2=0,C2=()=>`__${String(++E2)}__`;function N2(){let{router:n}=A0("useSubmit"),{basename:a}=y.useContext(Pn),l=BE();return y.useCallback(async(i,s={})=>{let{action:c,method:f,encType:h,formData:p,body:m}=l2(i,a);if(s.navigate===!1){let v=s.fetcherKey||C2();await n.fetch(v,l,s.action||c,{preventScrollReset:s.preventScrollReset,formData:p,body:m,formMethod:s.method||f,formEncType:s.encType||h,flushSync:s.flushSync})}else await n.navigate(s.action||c,{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 R2(n,{relative:a}={}){let{basename:l}=y.useContext(Pn),i=y.useContext(na);Xe(i,"useFormAction must be used inside a RouteContext");let[s]=i.matches.slice(-1),c={...Eo(n||".",{relative:a})},f=pr();if(n==null){c.search=f.search;let h=new URLSearchParams(c.search),p=h.getAll("index");if(p.some(v=>v==="")){h.delete("index"),p.filter(b=>b).forEach(b=>h.append("index",b));let v=h.toString();c.search=v?`?${v}`:""}}return(!n||n===".")&&s.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),l!=="/"&&(c.pathname=c.pathname==="/"?l:Jn([l,c.pathname])),ir(c)}function j2(n,{relative:a}={}){let l=y.useContext(ah);Xe(l!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=A0("useViewTransitionState"),s=Eo(n,{relative:a});if(!l.isTransitioning)return!1;let c=Tn(l.currentLocation.pathname,i)||l.currentLocation.pathname,f=Tn(l.nextLocation.pathname,i)||l.nextLocation.pathname;return mc(s.pathname,f)!=null||mc(s.pathname,c)!=null}var Oc=i0();const O2=Iy(Oc);function A2(n){return y.createElement(KE,{flushSync:Oc.flushSync,...n})}function nn(n,a,{checkForDefaultPrevented:l=!0}={}){return function(s){if(n?.(s),l===!1||!s.defaultPrevented)return a?.(s)}}function oy(n,a){if(typeof n=="function")return n(a);n!=null&&(n.current=a)}function Gr(...n){return a=>{let l=!1;const i=n.map(s=>{const c=oy(s,a);return!l&&typeof c=="function"&&(l=!0),c});if(l)return()=>{for(let s=0;s<i.length;s++){const c=i[s];typeof c=="function"?c():oy(n[s],null)}}}}function vn(...n){return y.useCallback(Gr(...n),n)}function T2(n,a){const l=y.createContext(a),i=c=>{const{children:f,...h}=c,p=y.useMemo(()=>h,Object.values(h));return g.jsx(l.Provider,{value:p,children:f})};i.displayName=n+"Provider";function s(c){const f=y.useContext(l);if(f)return f;if(a!==void 0)return a;throw new Error(`\`${c}\` must be used within \`${n}\``)}return[i,s]}function Ac(n,a=[]){let l=[];function i(c,f){const h=y.createContext(f),p=l.length;l=[...l,f];const m=b=>{const{scope:w,children:S,...C}=b,E=w?.[n]?.[p]||h,j=y.useMemo(()=>C,Object.values(C));return g.jsx(E.Provider,{value:j,children:S})};m.displayName=c+"Provider";function v(b,w){const S=w?.[n]?.[p]||h,C=y.useContext(S);if(C)return C;if(f!==void 0)return f;throw new Error(`\`${b}\` must be used within \`${c}\``)}return[m,v]}const s=()=>{const c=l.map(f=>y.createContext(f));return function(h){const p=h?.[n]||c;return y.useMemo(()=>({[`__scope${n}`]:{...h,[n]:p}}),[h,p])}};return s.scopeName=n,[i,M2(s,...a)]}function M2(...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(c){const f=i.reduce((h,{useScope:p,scopeName:m})=>{const b=p(c)[`__scope${m}`];return{...h,...b}},{});return y.useMemo(()=>({[`__scope${a.scopeName}`]:f}),[f])}};return l.scopeName=a.scopeName,l}var or=globalThis?.document?y.useLayoutEffect:()=>{},D2=Wy[" useId ".trim().toString()]||(()=>{}),L2=0;function Wn(n){const[a,l]=y.useState(D2());return or(()=>{l(i=>i??String(L2++))},[n]),n||(a?`radix-${a}`:"")}var k2=Wy[" useInsertionEffect ".trim().toString()]||or;function ch({prop:n,defaultProp:a,onChange:l=()=>{},caller:i}){const[s,c,f]=z2({defaultProp:a,onChange:l}),h=n!==void 0,p=h?n:s;{const v=y.useRef(n!==void 0);y.useEffect(()=>{const b=v.current;b!==h&&console.warn(`${i} is changing from ${b?"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.`),v.current=h},[h,i])}const m=y.useCallback(v=>{if(h){const b=U2(v)?v(n):v;b!==n&&f.current?.(b)}else c(v)},[h,n,c,f]);return[p,m]}function z2({defaultProp:n,onChange:a}){const[l,i]=y.useState(n),s=y.useRef(l),c=y.useRef(a);return k2(()=>{c.current=a},[a]),y.useEffect(()=>{s.current!==l&&(c.current?.(l),s.current=l)},[l,s]),[l,i,c]}function U2(n){return typeof n=="function"}function Tc(n){const a=H2(n),l=y.forwardRef((i,s)=>{const{children:c,...f}=i,h=y.Children.toArray(c),p=h.find($2);if(p){const m=p.props.children,v=h.map(b=>b===p?y.Children.count(m)>1?y.Children.only(null):y.isValidElement(m)?m.props.children:null:b);return g.jsx(a,{...f,ref:s,children:y.isValidElement(m)?y.cloneElement(m,void 0,v):null})}return g.jsx(a,{...f,ref:s,children:c})});return l.displayName=`${n}.Slot`,l}var P2=Tc("Slot");function H2(n){const a=y.forwardRef((l,i)=>{const{children:s,...c}=l;if(y.isValidElement(s)){const f=q2(s),h=V2(c,s.props);return s.type!==y.Fragment&&(h.ref=i?Gr(i,f):f),y.cloneElement(s,h)}return y.Children.count(s)>1?y.Children.only(null):null});return a.displayName=`${n}.SlotClone`,a}var B2=Symbol("radix.slottable");function $2(n){return y.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===B2}function V2(n,a){const l={...a};for(const i in a){const s=n[i],c=a[i];/^on[A-Z]/.test(i)?s&&c?l[i]=(...h)=>{const p=c(...h);return s(...h),p}:s&&(l[i]=s):i==="style"?l[i]={...s,...c}:i==="className"&&(l[i]=[s,c].filter(Boolean).join(" "))}return{...n,...l}}function q2(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 F2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],pt=F2.reduce((n,a)=>{const l=Tc(`Primitive.${a}`),i=y.forwardRef((s,c)=>{const{asChild:f,...h}=s,p=f?l:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(p,{...h,ref:c})});return i.displayName=`Primitive.${a}`,{...n,[a]:i}},{});function Y2(n,a){n&&Oc.flushSync(()=>n.dispatchEvent(a))}function Il(n){const a=y.useRef(n);return y.useEffect(()=>{a.current=n}),y.useMemo(()=>(...l)=>a.current?.(...l),[])}function G2(n,a=globalThis?.document){const l=Il(n);y.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 K2="DismissableLayer",Pd="dismissableLayer.update",X2="dismissableLayer.pointerDownOutside",Q2="dismissableLayer.focusOutside",sy,T0=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),uh=y.forwardRef((n,a)=>{const{disableOutsidePointerEvents:l=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:f,onDismiss:h,...p}=n,m=y.useContext(T0),[v,b]=y.useState(null),w=v?.ownerDocument??globalThis?.document,[,S]=y.useState({}),C=vn(a,B=>b(B)),E=Array.from(m.layers),[j]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),R=E.indexOf(j),L=v?E.indexOf(v):-1,k=m.layersWithOutsidePointerEventsDisabled.size>0,H=L>=R,M=J2(B=>{const J=B.target,te=[...m.branches].some(ae=>ae.contains(J));!H||te||(s?.(B),f?.(B),B.defaultPrevented||h?.())},w),N=W2(B=>{const J=B.target;[...m.branches].some(ae=>ae.contains(J))||(c?.(B),f?.(B),B.defaultPrevented||h?.())},w);return G2(B=>{L===m.layers.size-1&&(i?.(B),!B.defaultPrevented&&h&&(B.preventDefault(),h()))},w),y.useEffect(()=>{if(v)return l&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(sy=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(v)),m.layers.add(v),cy(),()=>{l&&m.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=sy)}},[v,w,l,m]),y.useEffect(()=>()=>{v&&(m.layers.delete(v),m.layersWithOutsidePointerEventsDisabled.delete(v),cy())},[v,m]),y.useEffect(()=>{const B=()=>S({});return document.addEventListener(Pd,B),()=>document.removeEventListener(Pd,B)},[]),g.jsx(pt.div,{...p,ref:C,style:{pointerEvents:k?H?"auto":"none":void 0,...n.style},onFocusCapture:nn(n.onFocusCapture,N.onFocusCapture),onBlurCapture:nn(n.onBlurCapture,N.onBlurCapture),onPointerDownCapture:nn(n.onPointerDownCapture,M.onPointerDownCapture)})});uh.displayName=K2;var I2="DismissableLayerBranch",Z2=y.forwardRef((n,a)=>{const l=y.useContext(T0),i=y.useRef(null),s=vn(a,i);return y.useEffect(()=>{const c=i.current;if(c)return l.branches.add(c),()=>{l.branches.delete(c)}},[l.branches]),g.jsx(pt.div,{...n,ref:s})});Z2.displayName=I2;function J2(n,a=globalThis?.document){const l=Il(n),i=y.useRef(!1),s=y.useRef(()=>{});return y.useEffect(()=>{const c=h=>{if(h.target&&!i.current){let p=function(){M0(X2,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",c)},0);return()=>{window.clearTimeout(f),a.removeEventListener("pointerdown",c),a.removeEventListener("click",s.current)}},[a,l]),{onPointerDownCapture:()=>i.current=!0}}function W2(n,a=globalThis?.document){const l=Il(n),i=y.useRef(!1);return y.useEffect(()=>{const s=c=>{c.target&&!i.current&&M0(Q2,l,{originalEvent:c},{discrete:!1})};return a.addEventListener("focusin",s),()=>a.removeEventListener("focusin",s)},[a,l]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function cy(){const n=new CustomEvent(Pd);document.dispatchEvent(n)}function M0(n,a,l,{discrete:i}){const s=l.originalEvent.target,c=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:l});a&&s.addEventListener(n,a,{once:!0}),i?Y2(s,c):s.dispatchEvent(c)}var cd="focusScope.autoFocusOnMount",ud="focusScope.autoFocusOnUnmount",uy={bubbles:!1,cancelable:!0},eC="FocusScope",fh=y.forwardRef((n,a)=>{const{loop:l=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:c,...f}=n,[h,p]=y.useState(null),m=Il(s),v=Il(c),b=y.useRef(null),w=vn(a,E=>p(E)),S=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(i){let E=function(k){if(S.paused||!h)return;const H=k.target;h.contains(H)?b.current=H:ar(b.current,{select:!0})},j=function(k){if(S.paused||!h)return;const H=k.relatedTarget;H!==null&&(h.contains(H)||ar(b.current,{select:!0}))},R=function(k){if(document.activeElement===document.body)for(const M of k)M.removedNodes.length>0&&ar(h)};document.addEventListener("focusin",E),document.addEventListener("focusout",j);const L=new MutationObserver(R);return h&&L.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",E),document.removeEventListener("focusout",j),L.disconnect()}}},[i,h,S.paused]),y.useEffect(()=>{if(h){dy.add(S);const E=document.activeElement;if(!h.contains(E)){const R=new CustomEvent(cd,uy);h.addEventListener(cd,m),h.dispatchEvent(R),R.defaultPrevented||(tC(iC(D0(h)),{select:!0}),document.activeElement===E&&ar(h))}return()=>{h.removeEventListener(cd,m),setTimeout(()=>{const R=new CustomEvent(ud,uy);h.addEventListener(ud,v),h.dispatchEvent(R),R.defaultPrevented||ar(E??document.body,{select:!0}),h.removeEventListener(ud,v),dy.remove(S)},0)}}},[h,m,v,S]);const C=y.useCallback(E=>{if(!l&&!i||S.paused)return;const j=E.key==="Tab"&&!E.altKey&&!E.ctrlKey&&!E.metaKey,R=document.activeElement;if(j&&R){const L=E.currentTarget,[k,H]=nC(L);k&&H?!E.shiftKey&&R===H?(E.preventDefault(),l&&ar(k,{select:!0})):E.shiftKey&&R===k&&(E.preventDefault(),l&&ar(H,{select:!0})):R===L&&E.preventDefault()}},[l,i,S.paused]);return g.jsx(pt.div,{tabIndex:-1,...f,ref:w,onKeyDown:C})});fh.displayName=eC;function tC(n,{select:a=!1}={}){const l=document.activeElement;for(const i of n)if(ar(i,{select:a}),document.activeElement!==l)return}function nC(n){const a=D0(n),l=fy(a,n),i=fy(a.reverse(),n);return[l,i]}function D0(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 fy(n,a){for(const l of n)if(!aC(l,{upTo:a}))return l}function aC(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 rC(n){return n instanceof HTMLInputElement&&"select"in n}function ar(n,{select:a=!1}={}){if(n&&n.focus){const l=document.activeElement;n.focus({preventScroll:!0}),n!==l&&rC(n)&&a&&n.select()}}var dy=lC();function lC(){let n=[];return{add(a){const l=n[0];a!==l&&l?.pause(),n=hy(n,a),n.unshift(a)},remove(a){n=hy(n,a),n[0]?.resume()}}}function hy(n,a){const l=[...n],i=l.indexOf(a);return i!==-1&&l.splice(i,1),l}function iC(n){return n.filter(a=>a.tagName!=="A")}var oC="Portal",dh=y.forwardRef((n,a)=>{const{container:l,...i}=n,[s,c]=y.useState(!1);or(()=>c(!0),[]);const f=l||s&&globalThis?.document?.body;return f?O2.createPortal(g.jsx(pt.div,{...i,ref:a}),f):null});dh.displayName=oC;function sC(n,a){return y.useReducer((l,i)=>a[l][i]??l,n)}var ei=n=>{const{present:a,children:l}=n,i=cC(a),s=typeof l=="function"?l({present:i.isPresent}):y.Children.only(l),c=vn(i.ref,uC(s));return typeof l=="function"||i.isPresent?y.cloneElement(s,{ref:c}):null};ei.displayName="Presence";function cC(n){const[a,l]=y.useState(),i=y.useRef(null),s=y.useRef(n),c=y.useRef("none"),f=n?"mounted":"unmounted",[h,p]=sC(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const m=Ks(i.current);c.current=h==="mounted"?m:"none"},[h]),or(()=>{const m=i.current,v=s.current;if(v!==n){const w=c.current,S=Ks(m);n?p("MOUNT"):S==="none"||m?.display==="none"?p("UNMOUNT"):p(v&&w!==S?"ANIMATION_OUT":"UNMOUNT"),s.current=n}},[n,p]),or(()=>{if(a){let m;const v=a.ownerDocument.defaultView??window,b=S=>{const E=Ks(i.current).includes(S.animationName);if(S.target===a&&E&&(p("ANIMATION_END"),!s.current)){const j=a.style.animationFillMode;a.style.animationFillMode="forwards",m=v.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=j)})}},w=S=>{S.target===a&&(c.current=Ks(i.current))};return a.addEventListener("animationstart",w),a.addEventListener("animationcancel",b),a.addEventListener("animationend",b),()=>{v.clearTimeout(m),a.removeEventListener("animationstart",w),a.removeEventListener("animationcancel",b),a.removeEventListener("animationend",b)}}else p("ANIMATION_END")},[a,p]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:y.useCallback(m=>{i.current=m?getComputedStyle(m):null,l(m)},[])}}function Ks(n){return n?.animationName||"none"}function uC(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 fd=0;function L0(){y.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??my()),document.body.insertAdjacentElement("beforeend",n[1]??my()),fd++,()=>{fd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(a=>a.remove()),fd--}},[])}function my(){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 Qn=function(){return Qn=Object.assign||function(a){for(var l,i=1,s=arguments.length;i<s;i++){l=arguments[i];for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(a[c]=l[c])}return a},Qn.apply(this,arguments)};function k0(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 fC(n,a,l){if(l||arguments.length===2)for(var i=0,s=a.length,c;i<s;i++)(c||!(i in a))&&(c||(c=Array.prototype.slice.call(a,0,i)),c[i]=a[i]);return n.concat(c||Array.prototype.slice.call(a))}var sc="right-scroll-bar-position",cc="width-before-scroll-bar",dC="with-scroll-bars-hidden",hC="--removed-body-scroll-bar-size";function dd(n,a){return typeof n=="function"?n(a):n&&(n.current=a),n}function mC(n,a){var l=y.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 pC=typeof window<"u"?y.useLayoutEffect:y.useEffect,py=new WeakMap;function gC(n,a){var l=mC(null,function(i){return n.forEach(function(s){return dd(s,i)})});return pC(function(){var i=py.get(l);if(i){var s=new Set(i),c=new Set(n),f=l.current;s.forEach(function(h){c.has(h)||dd(h,null)}),c.forEach(function(h){s.has(h)||dd(h,f)})}py.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(c){var f=a(c,i);return l.push(f),function(){l=l.filter(function(h){return h!==f})}},assignSyncMedium:function(c){for(i=!0;l.length;){var f=l;l=[],f.forEach(c)}l={push:function(h){return c(h)},filter:function(){return l}}},assignMedium:function(c){i=!0;var f=[];if(l.length){var h=l;l=[],h.forEach(c),f=l}var p=function(){var v=f;f=[],v.forEach(c)},m=function(){return Promise.resolve().then(p)};m(),l={push:function(v){f.push(v),m()},filter:function(v){return f=f.filter(v),l}}}};return s}function bC(n){n===void 0&&(n={});var a=yC(null);return a.options=Qn({async:!0,ssr:!1},n),a}var z0=function(n){var a=n.sideCar,l=k0(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 y.createElement(i,Qn({},l))};z0.isSideCarExport=!0;function xC(n,a){return n.useMedium(a),z0}var U0=bC(),hd=function(){},Mc=y.forwardRef(function(n,a){var l=y.useRef(null),i=y.useState({onScrollCapture:hd,onWheelCapture:hd,onTouchMoveCapture:hd}),s=i[0],c=i[1],f=n.forwardProps,h=n.children,p=n.className,m=n.removeScrollBar,v=n.enabled,b=n.shards,w=n.sideCar,S=n.noRelative,C=n.noIsolation,E=n.inert,j=n.allowPinchZoom,R=n.as,L=R===void 0?"div":R,k=n.gapMode,H=k0(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=w,N=gC([l,a]),B=Qn(Qn({},H),s);return y.createElement(y.Fragment,null,v&&y.createElement(M,{sideCar:U0,removeScrollBar:m,shards:b,noRelative:S,noIsolation:C,inert:E,setCallbacks:c,allowPinchZoom:!!j,lockRef:l,gapMode:k}),f?y.cloneElement(y.Children.only(h),Qn(Qn({},B),{ref:N})):y.createElement(L,Qn({},B,{className:p,ref:N}),h))});Mc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Mc.classNames={fullWidth:cc,zeroRight:sc};var wC=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function SC(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var a=wC();return a&&n.setAttribute("nonce",a),n}function _C(n,a){n.styleSheet?n.styleSheet.cssText=a:n.appendChild(document.createTextNode(a))}function EC(n){var a=document.head||document.getElementsByTagName("head")[0];a.appendChild(n)}var CC=function(){var n=0,a=null;return{add:function(l){n==0&&(a=SC())&&(_C(a,l),EC(a)),n++},remove:function(){n--,!n&&a&&(a.parentNode&&a.parentNode.removeChild(a),a=null)}}},NC=function(){var n=CC();return function(a,l){y.useEffect(function(){return n.add(a),function(){n.remove()}},[a&&l])}},P0=function(){var n=NC(),a=function(l){var i=l.styles,s=l.dynamic;return n(i,s),null};return a},RC={left:0,top:0,right:0,gap:0},md=function(n){return parseInt(n||"",10)||0},jC=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[md(l),md(i),md(s)]},OC=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return RC;var a=jC(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])}},AC=P0(),Xl="data-scroll-locked",TC=function(n,a,l,i){var s=n.left,c=n.top,f=n.right,h=n.gap;return l===void 0&&(l="margin"),`
68
- .`.concat(dC,` {
69
- overflow: hidden `).concat(i,`;
70
- padding-right: `).concat(h,"px ").concat(i,`;
67
+ Please change the parent <Route path="${C}"> to <Route path="${C==="/"?"*":`${C}/*`}">.`)}let b=La(),w;w=b;let S=w.pathname||"/",N=S;if(h!=="/"){let C=h.replace(/^\//,"").split("/");N="/"+S.replace(/^\//,"").split("/").slice(C.length).join("/")}let E=sr(n,{pathname:N});return jt(v||E!=null,`No routes matched location "${w.pathname}${w.search}${w.hash}" `),jt(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${w.pathname}${w.search}${w.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.`),bN(E&&E.map(C=>Object.assign({},C,{params:Object.assign({},m,C.params),pathname:Wn([h,s.encodeLocation?s.encodeLocation(C.pathname).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?h:Wn([h,s.encodeLocation?s.encodeLocation(C.pathnameBase).pathname:C.pathnameBase])})),c,l,o)}function pN(){let n=EN(),a=Ei(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),l=n instanceof Error?n.stack:null,o="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:o},c={padding:"2px 4px",backgroundColor:o},f=null;return console.error("Error handled by React Router default ErrorBoundary:",n),f=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:c},"ErrorBoundary")," or"," ",y.createElement("code",{style:c},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},a),l?y.createElement("pre",{style:s},l):null,f)}var gN=y.createElement(pN,null),vN=class extends y.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?y.createElement(ra.Provider,{value:this.props.routeContext},y.createElement(vh.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function yN({routeContext:n,match:a,children:l}){let o=y.useContext(el);return o&&o.static&&o.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=a.route.id),y.createElement(ra.Provider,{value:n},l)}function bN(n,a=[],l=null,o=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,c=l?.errors;if(c!=null){let g=s.findIndex(h=>h.route.id&&c?.[h.route.id]!==void 0);Je(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),s=s.slice(0,Math.min(s.length,g+1))}let f=!1,m=-1;if(l)for(let g=0;g<s.length;g++){let h=s[g];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(m=g),h.route.id){let{loaderData:v,errors:b}=l,w=h.route.loader&&!v.hasOwnProperty(h.route.id)&&(!b||b[h.route.id]===void 0);if(h.route.lazy||w){f=!0,m>=0?s=s.slice(0,m+1):s=[s[0]];break}}}return s.reduceRight((g,h,v)=>{let b,w=!1,S=null,N=null;l&&(b=c&&h.route.id?c[h.route.id]:void 0,S=h.route.errorElement||gN,f&&(m<0&&v===0?(B0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,N=null):m===v&&(w=!0,N=h.route.hydrateFallbackElement||null)));let E=a.concat(s.slice(0,v+1)),R=()=>{let C;return b?C=S:w?C=N:h.route.Component?C=y.createElement(h.route.Component,null):h.route.element?C=h.route.element:C=g,y.createElement(yN,{match:h,routeContext:{outlet:g,matches:E,isDataRoute:l!=null},children:C})};return l&&(h.route.ErrorBoundary||h.route.errorElement||v===0)?y.createElement(vN,{location:l.location,revalidation:l.revalidation,component:S,error:b,children:R(),routeContext:{outlet:null,matches:E,isDataRoute:!0}}):R()},null)}function yh(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function xN(n){let a=y.useContext(el);return Je(a,yh(n)),a}function wN(n){let a=y.useContext(Oi);return Je(a,yh(n)),a}function SN(n){let a=y.useContext(ra);return Je(a,yh(n)),a}function bh(n){let a=SN(n),l=a.matches[a.matches.length-1];return Je(l.route.id,`${n} can only be used on routes that contain a unique "id"`),l.route.id}function _N(){return bh("useRouteId")}function EN(){let n=y.useContext(vh),a=wN("useRouteError"),l=bh("useRouteError");return n!==void 0?n:a.errors?.[l]}function NN(){let{router:n}=xN("useNavigate"),a=bh("useNavigate"),l=y.useRef(!1);return H0(()=>{l.current=!0}),y.useCallback(async(s,c={})=>{jt(l.current,P0),l.current&&(typeof s=="number"?n.navigate(s):await n.navigate(s,{fromRouteId:a,...c}))},[n,a])}var gy={};function B0(n,a,l){!a&&!gy[n]&&(gy[n]=!0,jt(!1,l))}var vy={};function yy(n,a){!n&&!vy[a]&&(vy[a]=!0,console.warn(a))}function CN(n){let a={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&jt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(a,{element:y.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&jt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(a,{hydrateFallbackElement:y.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&jt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(a,{errorElement:y.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),a}var jN=["HydrateFallback","hydrateFallbackElement"];function RN(n,a){return YE({basename:a?.basename,unstable_getContext:a?.unstable_getContext,future:a?.future,history:fE({initialEntries:a?.initialEntries,initialIndex:a?.initialIndex}),hydrationData:a?.hydrationData,routes:n,hydrationRouteProperties:jN,mapRouteProperties:CN,dataStrategy:a?.dataStrategy,patchRoutesOnNavigation:a?.patchRoutesOnNavigation}).initialize()}var ON=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 AN({router:n,flushSync:a}){let[l,o]=y.useState(n.state),[s,c]=y.useState(),[f,m]=y.useState({isTransitioning:!1}),[g,h]=y.useState(),[v,b]=y.useState(),[w,S]=y.useState(),N=y.useRef(new Map),E=y.useCallback((T,{deletedFetchers:k,flushSync:D,viewTransitionOpts:j})=>{T.fetchers.forEach((B,W)=>{B.data!==void 0&&N.current.set(W,B.data)}),k.forEach(B=>N.current.delete(B)),yy(D===!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 U=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(yy(j==null||U,"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."),!j||!U){a&&D?a(()=>o(T)):y.startTransition(()=>o(T));return}if(a&&D){a(()=>{v&&(g&&g.resolve(),v.skipTransition()),m({isTransitioning:!0,flushSync:!0,currentLocation:j.currentLocation,nextLocation:j.nextLocation})});let B=n.window.document.startViewTransition(()=>{a(()=>o(T))});B.finished.finally(()=>{a(()=>{h(void 0),b(void 0),c(void 0),m({isTransitioning:!1})})}),a(()=>b(B));return}v?(g&&g.resolve(),v.skipTransition(),S({state:T,currentLocation:j.currentLocation,nextLocation:j.nextLocation})):(c(T),m({isTransitioning:!0,flushSync:!1,currentLocation:j.currentLocation,nextLocation:j.nextLocation}))},[n.window,a,v,g]);y.useLayoutEffect(()=>n.subscribe(E),[n,E]),y.useEffect(()=>{f.isTransitioning&&!f.flushSync&&h(new ON)},[f]),y.useEffect(()=>{if(g&&s&&n.window){let T=s,k=g.promise,D=n.window.document.startViewTransition(async()=>{y.startTransition(()=>o(T)),await k});D.finished.finally(()=>{h(void 0),b(void 0),c(void 0),m({isTransitioning:!1})}),b(D)}},[s,g,n.window]),y.useEffect(()=>{g&&s&&l.location.key===s.location.key&&g.resolve()},[g,v,l.location,s]),y.useEffect(()=>{!f.isTransitioning&&w&&(c(w.state),m({isTransitioning:!0,flushSync:!1,currentLocation:w.currentLocation,nextLocation:w.nextLocation}),S(void 0))},[f.isTransitioning,w]);let R=y.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:T=>n.navigate(T),push:(T,k,D)=>n.navigate(T,{state:k,preventScrollReset:D?.preventScrollReset}),replace:(T,k,D)=>n.navigate(T,{replace:!0,state:k,preventScrollReset:D?.preventScrollReset})}),[n]),C=n.basename||"/",A=y.useMemo(()=>({router:n,navigator:R,static:!1,basename:C}),[n,R,C]);return y.createElement(y.Fragment,null,y.createElement(el.Provider,{value:A},y.createElement(Oi.Provider,{value:l},y.createElement(U0.Provider,{value:N.current},y.createElement(gh.Provider,{value:f},y.createElement(LN,{basename:C,location:l.location,navigationType:l.historyAction,navigator:R},y.createElement(TN,{routes:n.routes,future:n.future,state:l})))))),null)}var TN=y.memo(MN);function MN({routes:n,future:a,state:l}){return mN(n,void 0,l,a)}function DN({to:n,replace:a,state:l,relative:o}){Je(no(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=y.useContext(Hn);jt(!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:c}=y.useContext(ra),{pathname:f}=La(),m=ao(),g=zc(n,kc(c),f,o==="path"),h=JSON.stringify(g);return y.useEffect(()=>{m(JSON.parse(h),{replace:a,state:l,relative:o})},[m,h,o,a,l]),null}function LN({basename:n="/",children:a=null,location:l,navigationType:o="POP",navigator:s,static:c=!1}){Je(!no(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=n.replace(/^\/*/,"/"),m=y.useMemo(()=>({basename:f,navigator:s,static:c,future:{}}),[f,s,c]);typeof l=="string"&&(l=Da(l));let{pathname:g="/",search:h="",hash:v="",state:b=null,key:w="default"}=l,S=y.useMemo(()=>{let N=Mn(g,f);return N==null?null:{location:{pathname:N,search:h,hash:v,state:b,key:w},navigationType:o}},[f,g,h,v,b,w,o]);return jt(S!=null,`<Router basename="${f}"> is not able to match the URL "${g}${h}${v}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:y.createElement(Hn.Provider,{value:m},y.createElement(Uc.Provider,{children:a,value:S}))}var pc="get",gc="application/x-www-form-urlencoded";function Pc(n){return n!=null&&typeof n.tagName=="string"}function kN(n){return Pc(n)&&n.tagName.toLowerCase()==="button"}function zN(n){return Pc(n)&&n.tagName.toLowerCase()==="form"}function UN(n){return Pc(n)&&n.tagName.toLowerCase()==="input"}function PN(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function HN(n,a){return n.button===0&&(!a||a==="_self")&&!PN(n)}var ec=null;function BN(){if(ec===null)try{new FormData(document.createElement("form"),0),ec=!1}catch{ec=!0}return ec}var $N=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function vd(n){return n!=null&&!$N.has(n)?(jt(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${gc}"`),null):n}function qN(n,a){let l,o,s,c,f;if(zN(n)){let m=n.getAttribute("action");o=m?Mn(m,a):null,l=n.getAttribute("method")||pc,s=vd(n.getAttribute("enctype"))||gc,c=new FormData(n)}else if(kN(n)||UN(n)&&(n.type==="submit"||n.type==="image")){let m=n.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=n.getAttribute("formaction")||m.getAttribute("action");if(o=g?Mn(g,a):null,l=n.getAttribute("formmethod")||m.getAttribute("method")||pc,s=vd(n.getAttribute("formenctype"))||vd(m.getAttribute("enctype"))||gc,c=new FormData(m,n),!BN()){let{name:h,type:v,value:b}=n;if(v==="image"){let w=h?`${h}.`:"";c.append(`${w}x`,"0"),c.append(`${w}y`,"0")}else h&&c.append(h,b)}}else{if(Pc(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');l=pc,o=null,s=gc,f=n}return c&&s==="text/plain"&&(f=c,c=void 0),{action:o,method:l.toLowerCase(),encType:s,formData:c,body:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function xh(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function FN(n,a,l){let o=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return o.pathname==="/"?o.pathname=`_root.${l}`:a&&Mn(o.pathname,a)==="/"?o.pathname=`${a.replace(/\/$/,"")}/_root.${l}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${l}`,o}async function VN(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 GN(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 YN(n,a,l){let o=await Promise.all(n.map(async s=>{let c=a.routes[s.route.id];if(c){let f=await VN(c,l);return f.links?f.links():[]}return[]}));return QN(o.flat(1).filter(GN).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function by(n,a,l,o,s,c){let f=(g,h)=>l[h]?g.route.id!==l[h].route.id:!0,m=(g,h)=>l[h].pathname!==g.pathname||l[h].route.path?.endsWith("*")&&l[h].params["*"]!==g.params["*"];return c==="assets"?a.filter((g,h)=>f(g,h)||m(g,h)):c==="data"?a.filter((g,h)=>{let v=o.routes[g.route.id];if(!v||!v.hasLoader)return!1;if(f(g,h)||m(g,h))return!0;if(g.route.shouldRevalidate){let b=g.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:l[0]?.params||{},nextUrl:new URL(n,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof b=="boolean")return b}return!0}):[]}function KN(n,a,{includeHydrateFallback:l}={}){return IN(n.map(o=>{let s=a.routes[o.route.id];if(!s)return[];let c=[s.module];return s.clientActionModule&&(c=c.concat(s.clientActionModule)),s.clientLoaderModule&&(c=c.concat(s.clientLoaderModule)),l&&s.hydrateFallbackModule&&(c=c.concat(s.hydrateFallbackModule)),s.imports&&(c=c.concat(s.imports)),c}).flat(1))}function IN(n){return[...new Set(n)]}function XN(n){let a={},l=Object.keys(n).sort();for(let o of l)a[o]=n[o];return a}function QN(n,a){let l=new Set;return new Set(a),n.reduce((o,s)=>{let c=JSON.stringify(XN(s));return l.has(c)||(l.add(c),o.push({key:c,link:s})),o},[])}function $0(){let n=y.useContext(el);return xh(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function ZN(){let n=y.useContext(Oi);return xh(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var wh=y.createContext(void 0);wh.displayName="FrameworkContext";function q0(){let n=y.useContext(wh);return xh(n,"You must render this element inside a <HydratedRouter> element"),n}function JN(n,a){let l=y.useContext(wh),[o,s]=y.useState(!1),[c,f]=y.useState(!1),{onFocus:m,onBlur:g,onMouseEnter:h,onMouseLeave:v,onTouchStart:b}=a,w=y.useRef(null);y.useEffect(()=>{if(n==="render"&&f(!0),n==="viewport"){let E=C=>{C.forEach(A=>{f(A.isIntersecting)})},R=new IntersectionObserver(E,{threshold:.5});return w.current&&R.observe(w.current),()=>{R.disconnect()}}},[n]),y.useEffect(()=>{if(o){let E=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(E)}}},[o]);let S=()=>{s(!0)},N=()=>{s(!1),f(!1)};return l?n!=="intent"?[c,w,{}]:[c,w,{onFocus:fi(m,S),onBlur:fi(g,N),onMouseEnter:fi(h,S),onMouseLeave:fi(v,N),onTouchStart:fi(b,S)}]:[!1,w,{}]}function fi(n,a){return l=>{n&&n(l),l.defaultPrevented||a(l)}}function WN({page:n,...a}){let{router:l}=$0(),o=y.useMemo(()=>sr(l.routes,n,l.basename),[l.routes,n,l.basename]);return o?y.createElement(t2,{page:n,matches:o,...a}):null}function e2(n){let{manifest:a,routeModules:l}=q0(),[o,s]=y.useState([]);return y.useEffect(()=>{let c=!1;return YN(n,a,l).then(f=>{c||s(f)}),()=>{c=!0}},[n,a,l]),o}function t2({page:n,matches:a,...l}){let o=La(),{manifest:s,routeModules:c}=q0(),{basename:f}=$0(),{loaderData:m,matches:g}=ZN(),h=y.useMemo(()=>by(n,a,g,s,o,"data"),[n,a,g,s,o]),v=y.useMemo(()=>by(n,a,g,s,o,"assets"),[n,a,g,s,o]),b=y.useMemo(()=>{if(n===o.pathname+o.search+o.hash)return[];let N=new Set,E=!1;if(a.forEach(C=>{let A=s.routes[C.route.id];!A||!A.hasLoader||(!h.some(T=>T.route.id===C.route.id)&&C.route.id in m&&c[C.route.id]?.shouldRevalidate||A.hasClientLoader?E=!0:N.add(C.route.id))}),N.size===0)return[];let R=FN(n,f,"data");return E&&N.size>0&&R.searchParams.set("_routes",a.filter(C=>N.has(C.route.id)).map(C=>C.route.id).join(",")),[R.pathname+R.search]},[f,m,o,s,h,a,n,c]),w=y.useMemo(()=>KN(v,s),[v,s]),S=e2(v);return y.createElement(y.Fragment,null,b.map(N=>y.createElement("link",{key:N,rel:"prefetch",as:"fetch",href:N,...l})),w.map(N=>y.createElement("link",{key:N,rel:"modulepreload",href:N,...l})),S.map(({key:N,link:E})=>y.createElement("link",{key:N,...E})))}function n2(...n){return a=>{n.forEach(l=>{typeof l=="function"?l(a):l!=null&&(l.current=a)})}}var F0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{F0&&(window.__reactRouterVersion="7.7.0")}catch{}var V0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,G0=y.forwardRef(function({onClick:a,discover:l="render",prefetch:o="none",relative:s,reloadDocument:c,replace:f,state:m,target:g,to:h,preventScrollReset:v,viewTransition:b,...w},S){let{basename:N}=y.useContext(Hn),E=typeof h=="string"&&V0.test(h),R,C=!1;if(typeof h=="string"&&E&&(R=h,F0))try{let W=new URL(window.location.href),ne=h.startsWith("//")?new URL(W.protocol+h):new URL(h),ee=Mn(ne.pathname,N);ne.origin===W.origin&&ee!=null?h=ee+ne.search+ne.hash:C=!0}catch{jt(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let A=dN(h,{relative:s}),[T,k,D]=JN(o,w),j=o2(h,{replace:f,state:m,target:g,preventScrollReset:v,relative:s,viewTransition:b});function U(W){a&&a(W),W.defaultPrevented||j(W)}let B=y.createElement("a",{...w,...D,href:R||A,onClick:C||c?a:U,ref:n2(S,k),target:g,"data-discover":!E&&l==="render"?"true":void 0});return T&&!E?y.createElement(y.Fragment,null,B,y.createElement(WN,{page:A})):B});G0.displayName="Link";var a2=y.forwardRef(function({"aria-current":a="page",caseSensitive:l=!1,className:o="",end:s=!1,style:c,to:f,viewTransition:m,children:g,...h},v){let b=Ai(f,{relative:h.relative}),w=La(),S=y.useContext(Oi),{navigator:N,basename:E}=y.useContext(Hn),R=S!=null&&f2(b)&&m===!0,C=N.encodeLocation?N.encodeLocation(b).pathname:b.pathname,A=w.pathname,T=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;l||(A=A.toLowerCase(),T=T?T.toLowerCase():null,C=C.toLowerCase()),T&&E&&(T=Mn(T,E)||T);const k=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let D=A===C||!s&&A.startsWith(C)&&A.charAt(k)==="/",j=T!=null&&(T===C||!s&&T.startsWith(C)&&T.charAt(C.length)==="/"),U={isActive:D,isPending:j,isTransitioning:R},B=D?a:void 0,W;typeof o=="function"?W=o(U):W=[o,D?"active":null,j?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let ne=typeof c=="function"?c(U):c;return y.createElement(G0,{...h,"aria-current":B,className:W,ref:v,style:ne,to:f,viewTransition:m},typeof g=="function"?g(U):g)});a2.displayName="NavLink";var r2=y.forwardRef(({discover:n="render",fetcherKey:a,navigate:l,reloadDocument:o,replace:s,state:c,method:f=pc,action:m,onSubmit:g,relative:h,preventScrollReset:v,viewTransition:b,...w},S)=>{let N=c2(),E=u2(m,{relative:h}),R=f.toLowerCase()==="get"?"get":"post",C=typeof m=="string"&&V0.test(m),A=T=>{if(g&&g(T),T.defaultPrevented)return;T.preventDefault();let k=T.nativeEvent.submitter,D=k?.getAttribute("formmethod")||f;N(k||T.currentTarget,{fetcherKey:a,method:D,navigate:l,replace:s,state:c,relative:h,preventScrollReset:v,viewTransition:b})};return y.createElement("form",{ref:S,method:R,action:E,onSubmit:o?g:A,...w,"data-discover":!C&&n==="render"?"true":void 0})});r2.displayName="Form";function l2(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Y0(n){let a=y.useContext(el);return Je(a,l2(n)),a}function o2(n,{target:a,replace:l,state:o,preventScrollReset:s,relative:c,viewTransition:f}={}){let m=ao(),g=La(),h=Ai(n,{relative:c});return y.useCallback(v=>{if(HN(v,a)){v.preventDefault();let b=l!==void 0?l:fr(g)===fr(h);m(n,{replace:b,state:o,preventScrollReset:s,relative:c,viewTransition:f})}},[g,m,h,l,o,a,n,s,c,f])}var i2=0,s2=()=>`__${String(++i2)}__`;function c2(){let{router:n}=Y0("useSubmit"),{basename:a}=y.useContext(Hn),l=_N();return y.useCallback(async(o,s={})=>{let{action:c,method:f,encType:m,formData:g,body:h}=qN(o,a);if(s.navigate===!1){let v=s.fetcherKey||s2();await n.fetch(v,l,s.action||c,{preventScrollReset:s.preventScrollReset,formData:g,body:h,formMethod:s.method||f,formEncType:s.encType||m,flushSync:s.flushSync})}else await n.navigate(s.action||c,{preventScrollReset:s.preventScrollReset,formData:g,body:h,formMethod:s.method||f,formEncType:s.encType||m,replace:s.replace,state:s.state,fromRouteId:l,flushSync:s.flushSync,viewTransition:s.viewTransition})},[n,a,l])}function u2(n,{relative:a}={}){let{basename:l}=y.useContext(Hn),o=y.useContext(ra);Je(o,"useFormAction must be used inside a RouteContext");let[s]=o.matches.slice(-1),c={...Ai(n||".",{relative:a})},f=La();if(n==null){c.search=f.search;let m=new URLSearchParams(c.search),g=m.getAll("index");if(g.some(v=>v==="")){m.delete("index"),g.filter(b=>b).forEach(b=>m.append("index",b));let v=m.toString();c.search=v?`?${v}`:""}}return(!n||n===".")&&s.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),l!=="/"&&(c.pathname=c.pathname==="/"?l:Wn([l,c.pathname])),fr(c)}function f2(n,a={}){let l=y.useContext(gh);Je(l!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=Y0("useViewTransitionState"),s=Ai(n,{relative:a.relative});if(!l.isTransitioning)return!1;let c=Mn(l.currentLocation.pathname,o)||l.currentLocation.pathname,f=Mn(l.nextLocation.pathname,o)||l.nextLocation.pathname;return Ec(s.pathname,f)!=null||Ec(s.pathname,c)!=null}var Hc=S0();const d2=d0(Hc);function h2(n){return y.createElement(AN,{flushSync:Hc.flushSync,...n})}function rn(n,a,{checkForDefaultPrevented:l=!0}={}){return function(s){if(n?.(s),l===!1||!s.defaultPrevented)return a?.(s)}}function xy(n,a){if(typeof n=="function")return n(a);n!=null&&(n.current=a)}function Kr(...n){return a=>{let l=!1;const o=n.map(s=>{const c=xy(s,a);return!l&&typeof c=="function"&&(l=!0),c});if(l)return()=>{for(let s=0;s<o.length;s++){const c=o[s];typeof c=="function"?c():xy(n[s],null)}}}}function Gt(...n){return y.useCallback(Kr(...n),n)}function m2(n,a){const l=y.createContext(a),o=c=>{const{children:f,...m}=c,g=y.useMemo(()=>m,Object.values(m));return d.jsx(l.Provider,{value:g,children:f})};o.displayName=n+"Provider";function s(c){const f=y.useContext(l);if(f)return f;if(a!==void 0)return a;throw new Error(`\`${c}\` must be used within \`${n}\``)}return[o,s]}function tl(n,a=[]){let l=[];function o(c,f){const m=y.createContext(f),g=l.length;l=[...l,f];const h=b=>{const{scope:w,children:S,...N}=b,E=w?.[n]?.[g]||m,R=y.useMemo(()=>N,Object.values(N));return d.jsx(E.Provider,{value:R,children:S})};h.displayName=c+"Provider";function v(b,w){const S=w?.[n]?.[g]||m,N=y.useContext(S);if(N)return N;if(f!==void 0)return f;throw new Error(`\`${b}\` must be used within \`${c}\``)}return[h,v]}const s=()=>{const c=l.map(f=>y.createContext(f));return function(m){const g=m?.[n]||c;return y.useMemo(()=>({[`__scope${n}`]:{...m,[n]:g}}),[m,g])}};return s.scopeName=n,[o,p2(s,...a)]}function p2(...n){const a=n[0];if(n.length===1)return a;const l=()=>{const o=n.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(c){const f=o.reduce((m,{useScope:g,scopeName:h})=>{const b=g(c)[`__scope${h}`];return{...m,...b}},{});return y.useMemo(()=>({[`__scope${a.scopeName}`]:f}),[f])}};return l.scopeName=a.scopeName,l}var ta=globalThis?.document?y.useLayoutEffect:()=>{},g2=p0[" useId ".trim().toString()]||(()=>{}),v2=0;function Tn(n){const[a,l]=y.useState(g2());return ta(()=>{l(o=>o??String(v2++))},[n]),n||(a?`radix-${a}`:"")}var y2=p0[" useInsertionEffect ".trim().toString()]||ta;function Ti({prop:n,defaultProp:a,onChange:l=()=>{},caller:o}){const[s,c,f]=b2({defaultProp:a,onChange:l}),m=n!==void 0,g=m?n:s;{const v=y.useRef(n!==void 0);y.useEffect(()=>{const b=v.current;b!==m&&console.warn(`${o} is changing from ${b?"controlled":"uncontrolled"} to ${m?"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.`),v.current=m},[m,o])}const h=y.useCallback(v=>{if(m){const b=x2(v)?v(n):v;b!==n&&f.current?.(b)}else c(v)},[m,n,c,f]);return[g,h]}function b2({defaultProp:n,onChange:a}){const[l,o]=y.useState(n),s=y.useRef(l),c=y.useRef(a);return y2(()=>{c.current=a},[a]),y.useEffect(()=>{s.current!==l&&(c.current?.(l),s.current=l)},[l,s]),[l,o,c]}function x2(n){return typeof n=="function"}function Wl(n){const a=S2(n),l=y.forwardRef((o,s)=>{const{children:c,...f}=o,m=y.Children.toArray(c),g=m.find(E2);if(g){const h=g.props.children,v=m.map(b=>b===g?y.Children.count(h)>1?y.Children.only(null):y.isValidElement(h)?h.props.children:null:b);return d.jsx(a,{...f,ref:s,children:y.isValidElement(h)?y.cloneElement(h,void 0,v):null})}return d.jsx(a,{...f,ref:s,children:c})});return l.displayName=`${n}.Slot`,l}var w2=Wl("Slot");function S2(n){const a=y.forwardRef((l,o)=>{const{children:s,...c}=l;if(y.isValidElement(s)){const f=C2(s),m=N2(c,s.props);return s.type!==y.Fragment&&(m.ref=o?Kr(o,f):f),y.cloneElement(s,m)}return y.Children.count(s)>1?y.Children.only(null):null});return a.displayName=`${n}.SlotClone`,a}var _2=Symbol("radix.slottable");function E2(n){return y.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===_2}function N2(n,a){const l={...a};for(const o in a){const s=n[o],c=a[o];/^on[A-Z]/.test(o)?s&&c?l[o]=(...m)=>{const g=c(...m);return s(...m),g}:s&&(l[o]=s):o==="style"?l[o]={...s,...c}:o==="className"&&(l[o]=[s,c].filter(Boolean).join(" "))}return{...n,...l}}function C2(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 j2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],lt=j2.reduce((n,a)=>{const l=Wl(`Primitive.${a}`),o=y.forwardRef((s,c)=>{const{asChild:f,...m}=s,g=f?l:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(g,{...m,ref:c})});return o.displayName=`Primitive.${a}`,{...n,[a]:o}},{});function R2(n,a){n&&Hc.flushSync(()=>n.dispatchEvent(a))}function Ir(n){const a=y.useRef(n);return y.useEffect(()=>{a.current=n}),y.useMemo(()=>(...l)=>a.current?.(...l),[])}function O2(n,a=globalThis?.document){const l=Ir(n);y.useEffect(()=>{const o=s=>{s.key==="Escape"&&l(s)};return a.addEventListener("keydown",o,{capture:!0}),()=>a.removeEventListener("keydown",o,{capture:!0})},[l,a])}var A2="DismissableLayer",Id="dismissableLayer.update",T2="dismissableLayer.pointerDownOutside",M2="dismissableLayer.focusOutside",wy,K0=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Sh=y.forwardRef((n,a)=>{const{disableOutsidePointerEvents:l=!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:f,onDismiss:m,...g}=n,h=y.useContext(K0),[v,b]=y.useState(null),w=v?.ownerDocument??globalThis?.document,[,S]=y.useState({}),N=Gt(a,U=>b(U)),E=Array.from(h.layers),[R]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),C=E.indexOf(R),A=v?E.indexOf(v):-1,T=h.layersWithOutsidePointerEventsDisabled.size>0,k=A>=C,D=k2(U=>{const B=U.target,W=[...h.branches].some(ne=>ne.contains(B));!k||W||(s?.(U),f?.(U),U.defaultPrevented||m?.())},w),j=z2(U=>{const B=U.target;[...h.branches].some(ne=>ne.contains(B))||(c?.(U),f?.(U),U.defaultPrevented||m?.())},w);return O2(U=>{A===h.layers.size-1&&(o?.(U),!U.defaultPrevented&&m&&(U.preventDefault(),m()))},w),y.useEffect(()=>{if(v)return l&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(wy=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(v)),h.layers.add(v),Sy(),()=>{l&&h.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=wy)}},[v,w,l,h]),y.useEffect(()=>()=>{v&&(h.layers.delete(v),h.layersWithOutsidePointerEventsDisabled.delete(v),Sy())},[v,h]),y.useEffect(()=>{const U=()=>S({});return document.addEventListener(Id,U),()=>document.removeEventListener(Id,U)},[]),d.jsx(lt.div,{...g,ref:N,style:{pointerEvents:T?k?"auto":"none":void 0,...n.style},onFocusCapture:rn(n.onFocusCapture,j.onFocusCapture),onBlurCapture:rn(n.onBlurCapture,j.onBlurCapture),onPointerDownCapture:rn(n.onPointerDownCapture,D.onPointerDownCapture)})});Sh.displayName=A2;var D2="DismissableLayerBranch",L2=y.forwardRef((n,a)=>{const l=y.useContext(K0),o=y.useRef(null),s=Gt(a,o);return y.useEffect(()=>{const c=o.current;if(c)return l.branches.add(c),()=>{l.branches.delete(c)}},[l.branches]),d.jsx(lt.div,{...n,ref:s})});L2.displayName=D2;function k2(n,a=globalThis?.document){const l=Ir(n),o=y.useRef(!1),s=y.useRef(()=>{});return y.useEffect(()=>{const c=m=>{if(m.target&&!o.current){let g=function(){I0(T2,l,h,{discrete:!0})};const h={originalEvent:m};m.pointerType==="touch"?(a.removeEventListener("click",s.current),s.current=g,a.addEventListener("click",s.current,{once:!0})):g()}else a.removeEventListener("click",s.current);o.current=!1},f=window.setTimeout(()=>{a.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(f),a.removeEventListener("pointerdown",c),a.removeEventListener("click",s.current)}},[a,l]),{onPointerDownCapture:()=>o.current=!0}}function z2(n,a=globalThis?.document){const l=Ir(n),o=y.useRef(!1);return y.useEffect(()=>{const s=c=>{c.target&&!o.current&&I0(M2,l,{originalEvent:c},{discrete:!1})};return a.addEventListener("focusin",s),()=>a.removeEventListener("focusin",s)},[a,l]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Sy(){const n=new CustomEvent(Id);document.dispatchEvent(n)}function I0(n,a,l,{discrete:o}){const s=l.originalEvent.target,c=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:l});a&&s.addEventListener(n,a,{once:!0}),o?R2(s,c):s.dispatchEvent(c)}var yd="focusScope.autoFocusOnMount",bd="focusScope.autoFocusOnUnmount",_y={bubbles:!1,cancelable:!0},U2="FocusScope",_h=y.forwardRef((n,a)=>{const{loop:l=!1,trapped:o=!1,onMountAutoFocus:s,onUnmountAutoFocus:c,...f}=n,[m,g]=y.useState(null),h=Ir(s),v=Ir(c),b=y.useRef(null),w=Gt(a,E=>g(E)),S=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(o){let E=function(T){if(S.paused||!m)return;const k=T.target;m.contains(k)?b.current=k:ir(b.current,{select:!0})},R=function(T){if(S.paused||!m)return;const k=T.relatedTarget;k!==null&&(m.contains(k)||ir(b.current,{select:!0}))},C=function(T){if(document.activeElement===document.body)for(const D of T)D.removedNodes.length>0&&ir(m)};document.addEventListener("focusin",E),document.addEventListener("focusout",R);const A=new MutationObserver(C);return m&&A.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",E),document.removeEventListener("focusout",R),A.disconnect()}}},[o,m,S.paused]),y.useEffect(()=>{if(m){Ny.add(S);const E=document.activeElement;if(!m.contains(E)){const C=new CustomEvent(yd,_y);m.addEventListener(yd,h),m.dispatchEvent(C),C.defaultPrevented||(P2(F2(X0(m)),{select:!0}),document.activeElement===E&&ir(m))}return()=>{m.removeEventListener(yd,h),setTimeout(()=>{const C=new CustomEvent(bd,_y);m.addEventListener(bd,v),m.dispatchEvent(C),C.defaultPrevented||ir(E??document.body,{select:!0}),m.removeEventListener(bd,v),Ny.remove(S)},0)}}},[m,h,v,S]);const N=y.useCallback(E=>{if(!l&&!o||S.paused)return;const R=E.key==="Tab"&&!E.altKey&&!E.ctrlKey&&!E.metaKey,C=document.activeElement;if(R&&C){const A=E.currentTarget,[T,k]=H2(A);T&&k?!E.shiftKey&&C===k?(E.preventDefault(),l&&ir(T,{select:!0})):E.shiftKey&&C===T&&(E.preventDefault(),l&&ir(k,{select:!0})):C===A&&E.preventDefault()}},[l,o,S.paused]);return d.jsx(lt.div,{tabIndex:-1,...f,ref:w,onKeyDown:N})});_h.displayName=U2;function P2(n,{select:a=!1}={}){const l=document.activeElement;for(const o of n)if(ir(o,{select:a}),document.activeElement!==l)return}function H2(n){const a=X0(n),l=Ey(a,n),o=Ey(a.reverse(),n);return[l,o]}function X0(n){const a=[],l=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const s=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||s?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;l.nextNode();)a.push(l.currentNode);return a}function Ey(n,a){for(const l of n)if(!B2(l,{upTo:a}))return l}function B2(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 $2(n){return n instanceof HTMLInputElement&&"select"in n}function ir(n,{select:a=!1}={}){if(n&&n.focus){const l=document.activeElement;n.focus({preventScroll:!0}),n!==l&&$2(n)&&a&&n.select()}}var Ny=q2();function q2(){let n=[];return{add(a){const l=n[0];a!==l&&l?.pause(),n=Cy(n,a),n.unshift(a)},remove(a){n=Cy(n,a),n[0]?.resume()}}}function Cy(n,a){const l=[...n],o=l.indexOf(a);return o!==-1&&l.splice(o,1),l}function F2(n){return n.filter(a=>a.tagName!=="A")}var V2="Portal",Eh=y.forwardRef((n,a)=>{const{container:l,...o}=n,[s,c]=y.useState(!1);ta(()=>c(!0),[]);const f=l||s&&globalThis?.document?.body;return f?d2.createPortal(d.jsx(lt.div,{...o,ref:a}),f):null});Eh.displayName=V2;function G2(n,a){return y.useReducer((l,o)=>a[l][o]??l,n)}var ro=n=>{const{present:a,children:l}=n,o=Y2(a),s=typeof l=="function"?l({present:o.isPresent}):y.Children.only(l),c=Gt(o.ref,K2(s));return typeof l=="function"||o.isPresent?y.cloneElement(s,{ref:c}):null};ro.displayName="Presence";function Y2(n){const[a,l]=y.useState(),o=y.useRef(null),s=y.useRef(n),c=y.useRef("none"),f=n?"mounted":"unmounted",[m,g]=G2(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const h=tc(o.current);c.current=m==="mounted"?h:"none"},[m]),ta(()=>{const h=o.current,v=s.current;if(v!==n){const w=c.current,S=tc(h);n?g("MOUNT"):S==="none"||h?.display==="none"?g("UNMOUNT"):g(v&&w!==S?"ANIMATION_OUT":"UNMOUNT"),s.current=n}},[n,g]),ta(()=>{if(a){let h;const v=a.ownerDocument.defaultView??window,b=S=>{const E=tc(o.current).includes(S.animationName);if(S.target===a&&E&&(g("ANIMATION_END"),!s.current)){const R=a.style.animationFillMode;a.style.animationFillMode="forwards",h=v.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=R)})}},w=S=>{S.target===a&&(c.current=tc(o.current))};return a.addEventListener("animationstart",w),a.addEventListener("animationcancel",b),a.addEventListener("animationend",b),()=>{v.clearTimeout(h),a.removeEventListener("animationstart",w),a.removeEventListener("animationcancel",b),a.removeEventListener("animationend",b)}}else g("ANIMATION_END")},[a,g]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:y.useCallback(h=>{o.current=h?getComputedStyle(h):null,l(h)},[])}}function tc(n){return n?.animationName||"none"}function K2(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 xd=0;function Q0(){y.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??jy()),document.body.insertAdjacentElement("beforeend",n[1]??jy()),xd++,()=>{xd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(a=>a.remove()),xd--}},[])}function jy(){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 Qn=function(){return Qn=Object.assign||function(a){for(var l,o=1,s=arguments.length;o<s;o++){l=arguments[o];for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(a[c]=l[c])}return a},Qn.apply(this,arguments)};function Z0(n,a){var l={};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&a.indexOf(o)<0&&(l[o]=n[o]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,o=Object.getOwnPropertySymbols(n);s<o.length;s++)a.indexOf(o[s])<0&&Object.prototype.propertyIsEnumerable.call(n,o[s])&&(l[o[s]]=n[o[s]]);return l}function I2(n,a,l){if(l||arguments.length===2)for(var o=0,s=a.length,c;o<s;o++)(c||!(o in a))&&(c||(c=Array.prototype.slice.call(a,0,o)),c[o]=a[o]);return n.concat(c||Array.prototype.slice.call(a))}var vc="right-scroll-bar-position",yc="width-before-scroll-bar",X2="with-scroll-bars-hidden",Q2="--removed-body-scroll-bar-size";function wd(n,a){return typeof n=="function"?n(a):n&&(n.current=a),n}function Z2(n,a){var l=y.useState(function(){return{value:n,callback:a,facade:{get current(){return l.value},set current(o){var s=l.value;s!==o&&(l.value=o,l.callback(o,s))}}}})[0];return l.callback=a,l.facade}var J2=typeof window<"u"?y.useLayoutEffect:y.useEffect,Ry=new WeakMap;function W2(n,a){var l=Z2(null,function(o){return n.forEach(function(s){return wd(s,o)})});return J2(function(){var o=Ry.get(l);if(o){var s=new Set(o),c=new Set(n),f=l.current;s.forEach(function(m){c.has(m)||wd(m,null)}),c.forEach(function(m){s.has(m)||wd(m,f)})}Ry.set(l,n)},[n]),l}function eC(n){return n}function tC(n,a){a===void 0&&(a=eC);var l=[],o=!1,s={read:function(){if(o)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(c){var f=a(c,o);return l.push(f),function(){l=l.filter(function(m){return m!==f})}},assignSyncMedium:function(c){for(o=!0;l.length;){var f=l;l=[],f.forEach(c)}l={push:function(m){return c(m)},filter:function(){return l}}},assignMedium:function(c){o=!0;var f=[];if(l.length){var m=l;l=[],m.forEach(c),f=l}var g=function(){var v=f;f=[],v.forEach(c)},h=function(){return Promise.resolve().then(g)};h(),l={push:function(v){f.push(v),h()},filter:function(v){return f=f.filter(v),l}}}};return s}function nC(n){n===void 0&&(n={});var a=tC(null);return a.options=Qn({async:!0,ssr:!1},n),a}var J0=function(n){var a=n.sideCar,l=Z0(n,["sideCar"]);if(!a)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=a.read();if(!o)throw new Error("Sidecar medium not found");return y.createElement(o,Qn({},l))};J0.isSideCarExport=!0;function aC(n,a){return n.useMedium(a),J0}var W0=nC(),Sd=function(){},Bc=y.forwardRef(function(n,a){var l=y.useRef(null),o=y.useState({onScrollCapture:Sd,onWheelCapture:Sd,onTouchMoveCapture:Sd}),s=o[0],c=o[1],f=n.forwardProps,m=n.children,g=n.className,h=n.removeScrollBar,v=n.enabled,b=n.shards,w=n.sideCar,S=n.noRelative,N=n.noIsolation,E=n.inert,R=n.allowPinchZoom,C=n.as,A=C===void 0?"div":C,T=n.gapMode,k=Z0(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=w,j=W2([l,a]),U=Qn(Qn({},k),s);return y.createElement(y.Fragment,null,v&&y.createElement(D,{sideCar:W0,removeScrollBar:h,shards:b,noRelative:S,noIsolation:N,inert:E,setCallbacks:c,allowPinchZoom:!!R,lockRef:l,gapMode:T}),f?y.cloneElement(y.Children.only(m),Qn(Qn({},U),{ref:j})):y.createElement(A,Qn({},U,{className:g,ref:j}),m))});Bc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Bc.classNames={fullWidth:yc,zeroRight:vc};var rC=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function lC(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var a=rC();return a&&n.setAttribute("nonce",a),n}function oC(n,a){n.styleSheet?n.styleSheet.cssText=a:n.appendChild(document.createTextNode(a))}function iC(n){var a=document.head||document.getElementsByTagName("head")[0];a.appendChild(n)}var sC=function(){var n=0,a=null;return{add:function(l){n==0&&(a=lC())&&(oC(a,l),iC(a)),n++},remove:function(){n--,!n&&a&&(a.parentNode&&a.parentNode.removeChild(a),a=null)}}},cC=function(){var n=sC();return function(a,l){y.useEffect(function(){return n.add(a),function(){n.remove()}},[a&&l])}},eb=function(){var n=cC(),a=function(l){var o=l.styles,s=l.dynamic;return n(o,s),null};return a},uC={left:0,top:0,right:0,gap:0},_d=function(n){return parseInt(n||"",10)||0},fC=function(n){var a=window.getComputedStyle(document.body),l=a[n==="padding"?"paddingLeft":"marginLeft"],o=a[n==="padding"?"paddingTop":"marginTop"],s=a[n==="padding"?"paddingRight":"marginRight"];return[_d(l),_d(o),_d(s)]},dC=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return uC;var a=fC(n),l=document.documentElement.clientWidth,o=window.innerWidth;return{left:a[0],top:a[1],right:a[2],gap:Math.max(0,o-l+a[2]-a[0])}},hC=eb(),Zl="data-scroll-locked",mC=function(n,a,l,o){var s=n.left,c=n.top,f=n.right,m=n.gap;return l===void 0&&(l="margin"),`
68
+ .`.concat(X2,` {
69
+ overflow: hidden `).concat(o,`;
70
+ padding-right: `).concat(m,"px ").concat(o,`;
71
71
  }
72
- body[`).concat(Xl,`] {
73
- overflow: hidden `).concat(i,`;
72
+ body[`).concat(Zl,`] {
73
+ overflow: hidden `).concat(o,`;
74
74
  overscroll-behavior: contain;
75
- `).concat([a&&"position: relative ".concat(i,";"),l==="margin"&&`
75
+ `).concat([a&&"position: relative ".concat(o,";"),l==="margin"&&`
76
76
  padding-left: `.concat(s,`px;
77
77
  padding-top: `).concat(c,`px;
78
78
  padding-right: `).concat(f,`px;
79
79
  margin-left:0;
80
80
  margin-top:0;
81
- margin-right: `).concat(h,"px ").concat(i,`;
82
- `),l==="padding"&&"padding-right: ".concat(h,"px ").concat(i,";")].filter(Boolean).join(""),`
81
+ margin-right: `).concat(m,"px ").concat(o,`;
82
+ `),l==="padding"&&"padding-right: ".concat(m,"px ").concat(o,";")].filter(Boolean).join(""),`
83
83
  }
84
84
 
85
- .`).concat(sc,` {
86
- right: `).concat(h,"px ").concat(i,`;
85
+ .`).concat(vc,` {
86
+ right: `).concat(m,"px ").concat(o,`;
87
87
  }
88
88
 
89
- .`).concat(cc,` {
90
- margin-right: `).concat(h,"px ").concat(i,`;
89
+ .`).concat(yc,` {
90
+ margin-right: `).concat(m,"px ").concat(o,`;
91
91
  }
92
92
 
93
- .`).concat(sc," .").concat(sc,` {
94
- right: 0 `).concat(i,`;
93
+ .`).concat(vc," .").concat(vc,` {
94
+ right: 0 `).concat(o,`;
95
95
  }
96
96
 
97
- .`).concat(cc," .").concat(cc,` {
98
- margin-right: 0 `).concat(i,`;
97
+ .`).concat(yc," .").concat(yc,` {
98
+ margin-right: 0 `).concat(o,`;
99
99
  }
100
100
 
101
- body[`).concat(Xl,`] {
102
- `).concat(hC,": ").concat(h,`px;
101
+ body[`).concat(Zl,`] {
102
+ `).concat(Q2,": ").concat(m,`px;
103
103
  }
104
- `)},gy=function(){var n=parseInt(document.body.getAttribute(Xl)||"0",10);return isFinite(n)?n:0},MC=function(){y.useEffect(function(){return document.body.setAttribute(Xl,(gy()+1).toString()),function(){var n=gy()-1;n<=0?document.body.removeAttribute(Xl):document.body.setAttribute(Xl,n.toString())}},[])},DC=function(n){var a=n.noRelative,l=n.noImportant,i=n.gapMode,s=i===void 0?"margin":i;MC();var c=y.useMemo(function(){return OC(s)},[s]);return y.createElement(AC,{styles:TC(c,!a,s,l?"":"!important")})},Hd=!1;if(typeof window<"u")try{var Xs=Object.defineProperty({},"passive",{get:function(){return Hd=!0,!0}});window.addEventListener("test",Xs,Xs),window.removeEventListener("test",Xs,Xs)}catch{Hd=!1}var Hl=Hd?{passive:!1}:!1,LC=function(n){return n.tagName==="TEXTAREA"},H0=function(n,a){if(!(n instanceof Element))return!1;var l=window.getComputedStyle(n);return l[a]!=="hidden"&&!(l.overflowY===l.overflowX&&!LC(n)&&l[a]==="visible")},kC=function(n){return H0(n,"overflowY")},zC=function(n){return H0(n,"overflowX")},vy=function(n,a){var l=a.ownerDocument,i=a;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=B0(n,i);if(s){var c=$0(n,i),f=c[1],h=c[2];if(f>h)return!0}i=i.parentNode}while(i&&i!==l.body);return!1},UC=function(n){var a=n.scrollTop,l=n.scrollHeight,i=n.clientHeight;return[a,l,i]},PC=function(n){var a=n.scrollLeft,l=n.scrollWidth,i=n.clientWidth;return[a,l,i]},B0=function(n,a){return n==="v"?kC(a):zC(a)},$0=function(n,a){return n==="v"?UC(a):PC(a)},HC=function(n,a){return n==="h"&&a==="rtl"?-1:1},BC=function(n,a,l,i,s){var c=HC(n,window.getComputedStyle(a).direction),f=c*i,h=l.target,p=a.contains(h),m=!1,v=f>0,b=0,w=0;do{if(!h)break;var S=$0(n,h),C=S[0],E=S[1],j=S[2],R=E-j-c*C;(C||R)&&B0(n,h)&&(b+=R,w+=C);var L=h.parentNode;h=L&&L.nodeType===Node.DOCUMENT_FRAGMENT_NODE?L.host:L}while(!p&&h!==document.body||p&&(a.contains(h)||a===h));return(v&&Math.abs(b)<1||!v&&Math.abs(w)<1)&&(m=!0),m},Qs=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},yy=function(n){return[n.deltaX,n.deltaY]},by=function(n){return n&&"current"in n?n.current:n},$C=function(n,a){return n[0]===a[0]&&n[1]===a[1]},VC=function(n){return`
104
+ `)},Oy=function(){var n=parseInt(document.body.getAttribute(Zl)||"0",10);return isFinite(n)?n:0},pC=function(){y.useEffect(function(){return document.body.setAttribute(Zl,(Oy()+1).toString()),function(){var n=Oy()-1;n<=0?document.body.removeAttribute(Zl):document.body.setAttribute(Zl,n.toString())}},[])},gC=function(n){var a=n.noRelative,l=n.noImportant,o=n.gapMode,s=o===void 0?"margin":o;pC();var c=y.useMemo(function(){return dC(s)},[s]);return y.createElement(hC,{styles:mC(c,!a,s,l?"":"!important")})},Xd=!1;if(typeof window<"u")try{var nc=Object.defineProperty({},"passive",{get:function(){return Xd=!0,!0}});window.addEventListener("test",nc,nc),window.removeEventListener("test",nc,nc)}catch{Xd=!1}var ql=Xd?{passive:!1}:!1,vC=function(n){return n.tagName==="TEXTAREA"},tb=function(n,a){if(!(n instanceof Element))return!1;var l=window.getComputedStyle(n);return l[a]!=="hidden"&&!(l.overflowY===l.overflowX&&!vC(n)&&l[a]==="visible")},yC=function(n){return tb(n,"overflowY")},bC=function(n){return tb(n,"overflowX")},Ay=function(n,a){var l=a.ownerDocument,o=a;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var s=nb(n,o);if(s){var c=ab(n,o),f=c[1],m=c[2];if(f>m)return!0}o=o.parentNode}while(o&&o!==l.body);return!1},xC=function(n){var a=n.scrollTop,l=n.scrollHeight,o=n.clientHeight;return[a,l,o]},wC=function(n){var a=n.scrollLeft,l=n.scrollWidth,o=n.clientWidth;return[a,l,o]},nb=function(n,a){return n==="v"?yC(a):bC(a)},ab=function(n,a){return n==="v"?xC(a):wC(a)},SC=function(n,a){return n==="h"&&a==="rtl"?-1:1},_C=function(n,a,l,o,s){var c=SC(n,window.getComputedStyle(a).direction),f=c*o,m=l.target,g=a.contains(m),h=!1,v=f>0,b=0,w=0;do{if(!m)break;var S=ab(n,m),N=S[0],E=S[1],R=S[2],C=E-R-c*N;(N||C)&&nb(n,m)&&(b+=C,w+=N);var A=m.parentNode;m=A&&A.nodeType===Node.DOCUMENT_FRAGMENT_NODE?A.host:A}while(!g&&m!==document.body||g&&(a.contains(m)||a===m));return(v&&Math.abs(b)<1||!v&&Math.abs(w)<1)&&(h=!0),h},ac=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},Ty=function(n){return[n.deltaX,n.deltaY]},My=function(n){return n&&"current"in n?n.current:n},EC=function(n,a){return n[0]===a[0]&&n[1]===a[1]},NC=function(n){return`
105
105
  .block-interactivity-`.concat(n,` {pointer-events: none;}
106
106
  .allow-interactivity-`).concat(n,` {pointer-events: all;}
107
- `)},qC=0,Bl=[];function FC(n){var a=y.useRef([]),l=y.useRef([0,0]),i=y.useRef(),s=y.useState(qC++)[0],c=y.useState(P0)[0],f=y.useRef(n);y.useEffect(function(){f.current=n},[n]),y.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(s));var E=fC([n.lockRef.current],(n.shards||[]).map(by),!0).filter(Boolean);return E.forEach(function(j){return j.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),E.forEach(function(j){return j.classList.remove("allow-interactivity-".concat(s))})}}},[n.inert,n.lockRef.current,n.shards]);var h=y.useCallback(function(E,j){if("touches"in E&&E.touches.length===2||E.type==="wheel"&&E.ctrlKey)return!f.current.allowPinchZoom;var R=Qs(E),L=l.current,k="deltaX"in E?E.deltaX:L[0]-R[0],H="deltaY"in E?E.deltaY:L[1]-R[1],M,N=E.target,B=Math.abs(k)>Math.abs(H)?"h":"v";if("touches"in E&&B==="h"&&N.type==="range")return!1;var J=vy(B,N);if(!J)return!0;if(J?M=B:(M=B==="v"?"h":"v",J=vy(B,N)),!J)return!1;if(!i.current&&"changedTouches"in E&&(k||H)&&(i.current=M),!M)return!0;var te=i.current||M;return BC(te,j,E,te==="h"?k:H)},[]),p=y.useCallback(function(E){var j=E;if(!(!Bl.length||Bl[Bl.length-1]!==c)){var R="deltaY"in j?yy(j):Qs(j),L=a.current.filter(function(M){return M.name===j.type&&(M.target===j.target||j.target===M.shadowParent)&&$C(M.delta,R)})[0];if(L&&L.should){j.cancelable&&j.preventDefault();return}if(!L){var k=(f.current.shards||[]).map(by).filter(Boolean).filter(function(M){return M.contains(j.target)}),H=k.length>0?h(j,k[0]):!f.current.noIsolation;H&&j.cancelable&&j.preventDefault()}}},[]),m=y.useCallback(function(E,j,R,L){var k={name:E,delta:j,target:R,should:L,shadowParent:YC(R)};a.current.push(k),setTimeout(function(){a.current=a.current.filter(function(H){return H!==k})},1)},[]),v=y.useCallback(function(E){l.current=Qs(E),i.current=void 0},[]),b=y.useCallback(function(E){m(E.type,yy(E),E.target,h(E,n.lockRef.current))},[]),w=y.useCallback(function(E){m(E.type,Qs(E),E.target,h(E,n.lockRef.current))},[]);y.useEffect(function(){return Bl.push(c),n.setCallbacks({onScrollCapture:b,onWheelCapture:b,onTouchMoveCapture:w}),document.addEventListener("wheel",p,Hl),document.addEventListener("touchmove",p,Hl),document.addEventListener("touchstart",v,Hl),function(){Bl=Bl.filter(function(E){return E!==c}),document.removeEventListener("wheel",p,Hl),document.removeEventListener("touchmove",p,Hl),document.removeEventListener("touchstart",v,Hl)}},[]);var S=n.removeScrollBar,C=n.inert;return y.createElement(y.Fragment,null,C?y.createElement(c,{styles:VC(s)}):null,S?y.createElement(DC,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function YC(n){for(var a=null;n!==null;)n instanceof ShadowRoot&&(a=n.host,n=n.host),n=n.parentNode;return a}const GC=xC(U0,FC);var hh=y.forwardRef(function(n,a){return y.createElement(Mc,Qn({},n,{ref:a,sideCar:GC}))});hh.classNames=Mc.classNames;var KC=function(n){if(typeof document>"u")return null;var a=Array.isArray(n)?n[0]:n;return a.ownerDocument.body},$l=new WeakMap,Is=new WeakMap,Zs={},pd=0,V0=function(n){return n&&(n.host||V0(n.parentNode))},XC=function(n,a){return a.map(function(l){if(n.contains(l))return l;var i=V0(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})},QC=function(n,a,l,i){var s=XC(a,Array.isArray(n)?n:[n]);Zs[l]||(Zs[l]=new WeakMap);var c=Zs[l],f=[],h=new Set,p=new Set(s),m=function(b){!b||h.has(b)||(h.add(b),m(b.parentNode))};s.forEach(m);var v=function(b){!b||p.has(b)||Array.prototype.forEach.call(b.children,function(w){if(h.has(w))v(w);else try{var S=w.getAttribute(i),C=S!==null&&S!=="false",E=($l.get(w)||0)+1,j=(c.get(w)||0)+1;$l.set(w,E),c.set(w,j),f.push(w),E===1&&C&&Is.set(w,!0),j===1&&w.setAttribute(l,"true"),C||w.setAttribute(i,"true")}catch(R){console.error("aria-hidden: cannot operate on ",w,R)}})};return v(a),h.clear(),pd++,function(){f.forEach(function(b){var w=$l.get(b)-1,S=c.get(b)-1;$l.set(b,w),c.set(b,S),w||(Is.has(b)||b.removeAttribute(i),Is.delete(b)),S||b.removeAttribute(l)}),pd--,pd||($l=new WeakMap,$l=new WeakMap,Is=new WeakMap,Zs={})}},q0=function(n,a,l){l===void 0&&(l="data-aria-hidden");var i=Array.from(Array.isArray(n)?n:[n]),s=KC(n);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),QC(i,s,l,"aria-hidden")):function(){return null}},Dc="Dialog",[F0,zT]=Ac(Dc),[IC,Hn]=F0(Dc),Y0=n=>{const{__scopeDialog:a,children:l,open:i,defaultOpen:s,onOpenChange:c,modal:f=!0}=n,h=y.useRef(null),p=y.useRef(null),[m,v]=ch({prop:i,defaultProp:s??!1,onChange:c,caller:Dc});return g.jsx(IC,{scope:a,triggerRef:h,contentRef:p,contentId:Wn(),titleId:Wn(),descriptionId:Wn(),open:m,onOpenChange:v,onOpenToggle:y.useCallback(()=>v(b=>!b),[v]),modal:f,children:l})};Y0.displayName=Dc;var G0="DialogTrigger",ZC=y.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=Hn(G0,l),c=vn(a,s.triggerRef);return g.jsx(pt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":gh(s.open),...i,ref:c,onClick:nn(n.onClick,s.onOpenToggle)})});ZC.displayName=G0;var mh="DialogPortal",[JC,K0]=F0(mh,{forceMount:void 0}),X0=n=>{const{__scopeDialog:a,forceMount:l,children:i,container:s}=n,c=Hn(mh,a);return g.jsx(JC,{scope:a,forceMount:l,children:y.Children.map(i,f=>g.jsx(ei,{present:l||c.open,children:g.jsx(dh,{asChild:!0,container:s,children:f})}))})};X0.displayName=mh;var gc="DialogOverlay",Q0=y.forwardRef((n,a)=>{const l=K0(gc,n.__scopeDialog),{forceMount:i=l.forceMount,...s}=n,c=Hn(gc,n.__scopeDialog);return c.modal?g.jsx(ei,{present:i||c.open,children:g.jsx(eN,{...s,ref:a})}):null});Q0.displayName=gc;var WC=Tc("DialogOverlay.RemoveScroll"),eN=y.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=Hn(gc,l);return g.jsx(hh,{as:WC,allowPinchZoom:!0,shards:[s.contentRef],children:g.jsx(pt.div,{"data-state":gh(s.open),...i,ref:a,style:{pointerEvents:"auto",...i.style}})})}),Kr="DialogContent",I0=y.forwardRef((n,a)=>{const l=K0(Kr,n.__scopeDialog),{forceMount:i=l.forceMount,...s}=n,c=Hn(Kr,n.__scopeDialog);return g.jsx(ei,{present:i||c.open,children:c.modal?g.jsx(tN,{...s,ref:a}):g.jsx(nN,{...s,ref:a})})});I0.displayName=Kr;var tN=y.forwardRef((n,a)=>{const l=Hn(Kr,n.__scopeDialog),i=y.useRef(null),s=vn(a,l.contentRef,i);return y.useEffect(()=>{const c=i.current;if(c)return q0(c)},[]),g.jsx(Z0,{...n,ref:s,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:nn(n.onCloseAutoFocus,c=>{c.preventDefault(),l.triggerRef.current?.focus()}),onPointerDownOutside:nn(n.onPointerDownOutside,c=>{const f=c.detail.originalEvent,h=f.button===0&&f.ctrlKey===!0;(f.button===2||h)&&c.preventDefault()}),onFocusOutside:nn(n.onFocusOutside,c=>c.preventDefault())})}),nN=y.forwardRef((n,a)=>{const l=Hn(Kr,n.__scopeDialog),i=y.useRef(!1),s=y.useRef(!1);return g.jsx(Z0,{...n,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{n.onCloseAutoFocus?.(c),c.defaultPrevented||(i.current||l.triggerRef.current?.focus(),c.preventDefault()),i.current=!1,s.current=!1},onInteractOutside:c=>{n.onInteractOutside?.(c),c.defaultPrevented||(i.current=!0,c.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const f=c.target;l.triggerRef.current?.contains(f)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&s.current&&c.preventDefault()}})}),Z0=y.forwardRef((n,a)=>{const{__scopeDialog:l,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:c,...f}=n,h=Hn(Kr,l),p=y.useRef(null),m=vn(a,p);return L0(),g.jsxs(g.Fragment,{children:[g.jsx(fh,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:c,children:g.jsx(uh,{role:"dialog",id:h.contentId,"aria-describedby":h.descriptionId,"aria-labelledby":h.titleId,"data-state":gh(h.open),...f,ref:m,onDismiss:()=>h.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(aN,{titleId:h.titleId}),g.jsx(lN,{contentRef:p,descriptionId:h.descriptionId})]})]})}),ph="DialogTitle",J0=y.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=Hn(ph,l);return g.jsx(pt.h2,{id:s.titleId,...i,ref:a})});J0.displayName=ph;var W0="DialogDescription",eb=y.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=Hn(W0,l);return g.jsx(pt.p,{id:s.descriptionId,...i,ref:a})});eb.displayName=W0;var tb="DialogClose",nb=y.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=Hn(tb,l);return g.jsx(pt.button,{type:"button",...i,ref:a,onClick:nn(n.onClick,()=>s.onOpenChange(!1))})});nb.displayName=tb;function gh(n){return n?"open":"closed"}var ab="DialogTitleWarning",[UT,rb]=T2(ab,{contentName:Kr,titleName:ph,docsSlug:"dialog"}),aN=({titleId:n})=>{const a=rb(ab),l=`\`${a.contentName}\` requires a \`${a.titleName}\` for the component to be accessible for screen reader users.
107
+ `)},CC=0,Fl=[];function jC(n){var a=y.useRef([]),l=y.useRef([0,0]),o=y.useRef(),s=y.useState(CC++)[0],c=y.useState(eb)[0],f=y.useRef(n);y.useEffect(function(){f.current=n},[n]),y.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(s));var E=I2([n.lockRef.current],(n.shards||[]).map(My),!0).filter(Boolean);return E.forEach(function(R){return R.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),E.forEach(function(R){return R.classList.remove("allow-interactivity-".concat(s))})}}},[n.inert,n.lockRef.current,n.shards]);var m=y.useCallback(function(E,R){if("touches"in E&&E.touches.length===2||E.type==="wheel"&&E.ctrlKey)return!f.current.allowPinchZoom;var C=ac(E),A=l.current,T="deltaX"in E?E.deltaX:A[0]-C[0],k="deltaY"in E?E.deltaY:A[1]-C[1],D,j=E.target,U=Math.abs(T)>Math.abs(k)?"h":"v";if("touches"in E&&U==="h"&&j.type==="range")return!1;var B=Ay(U,j);if(!B)return!0;if(B?D=U:(D=U==="v"?"h":"v",B=Ay(U,j)),!B)return!1;if(!o.current&&"changedTouches"in E&&(T||k)&&(o.current=D),!D)return!0;var W=o.current||D;return _C(W,R,E,W==="h"?T:k)},[]),g=y.useCallback(function(E){var R=E;if(!(!Fl.length||Fl[Fl.length-1]!==c)){var C="deltaY"in R?Ty(R):ac(R),A=a.current.filter(function(D){return D.name===R.type&&(D.target===R.target||R.target===D.shadowParent)&&EC(D.delta,C)})[0];if(A&&A.should){R.cancelable&&R.preventDefault();return}if(!A){var T=(f.current.shards||[]).map(My).filter(Boolean).filter(function(D){return D.contains(R.target)}),k=T.length>0?m(R,T[0]):!f.current.noIsolation;k&&R.cancelable&&R.preventDefault()}}},[]),h=y.useCallback(function(E,R,C,A){var T={name:E,delta:R,target:C,should:A,shadowParent:RC(C)};a.current.push(T),setTimeout(function(){a.current=a.current.filter(function(k){return k!==T})},1)},[]),v=y.useCallback(function(E){l.current=ac(E),o.current=void 0},[]),b=y.useCallback(function(E){h(E.type,Ty(E),E.target,m(E,n.lockRef.current))},[]),w=y.useCallback(function(E){h(E.type,ac(E),E.target,m(E,n.lockRef.current))},[]);y.useEffect(function(){return Fl.push(c),n.setCallbacks({onScrollCapture:b,onWheelCapture:b,onTouchMoveCapture:w}),document.addEventListener("wheel",g,ql),document.addEventListener("touchmove",g,ql),document.addEventListener("touchstart",v,ql),function(){Fl=Fl.filter(function(E){return E!==c}),document.removeEventListener("wheel",g,ql),document.removeEventListener("touchmove",g,ql),document.removeEventListener("touchstart",v,ql)}},[]);var S=n.removeScrollBar,N=n.inert;return y.createElement(y.Fragment,null,N?y.createElement(c,{styles:NC(s)}):null,S?y.createElement(gC,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function RC(n){for(var a=null;n!==null;)n instanceof ShadowRoot&&(a=n.host,n=n.host),n=n.parentNode;return a}const OC=aC(W0,jC);var Nh=y.forwardRef(function(n,a){return y.createElement(Bc,Qn({},n,{ref:a,sideCar:OC}))});Nh.classNames=Bc.classNames;var AC=function(n){if(typeof document>"u")return null;var a=Array.isArray(n)?n[0]:n;return a.ownerDocument.body},Vl=new WeakMap,rc=new WeakMap,lc={},Ed=0,rb=function(n){return n&&(n.host||rb(n.parentNode))},TC=function(n,a){return a.map(function(l){if(n.contains(l))return l;var o=rb(l);return o&&n.contains(o)?o:(console.error("aria-hidden",l,"in not contained inside",n,". Doing nothing"),null)}).filter(function(l){return!!l})},MC=function(n,a,l,o){var s=TC(a,Array.isArray(n)?n:[n]);lc[l]||(lc[l]=new WeakMap);var c=lc[l],f=[],m=new Set,g=new Set(s),h=function(b){!b||m.has(b)||(m.add(b),h(b.parentNode))};s.forEach(h);var v=function(b){!b||g.has(b)||Array.prototype.forEach.call(b.children,function(w){if(m.has(w))v(w);else try{var S=w.getAttribute(o),N=S!==null&&S!=="false",E=(Vl.get(w)||0)+1,R=(c.get(w)||0)+1;Vl.set(w,E),c.set(w,R),f.push(w),E===1&&N&&rc.set(w,!0),R===1&&w.setAttribute(l,"true"),N||w.setAttribute(o,"true")}catch(C){console.error("aria-hidden: cannot operate on ",w,C)}})};return v(a),m.clear(),Ed++,function(){f.forEach(function(b){var w=Vl.get(b)-1,S=c.get(b)-1;Vl.set(b,w),c.set(b,S),w||(rc.has(b)||b.removeAttribute(o),rc.delete(b)),S||b.removeAttribute(l)}),Ed--,Ed||(Vl=new WeakMap,Vl=new WeakMap,rc=new WeakMap,lc={})}},lb=function(n,a,l){l===void 0&&(l="data-aria-hidden");var o=Array.from(Array.isArray(n)?n:[n]),s=AC(n);return s?(o.push.apply(o,Array.from(s.querySelectorAll("[aria-live], script"))),MC(o,s,l,"aria-hidden")):function(){return null}},$c="Dialog",[ob,QM]=tl($c),[DC,Bn]=ob($c),ib=n=>{const{__scopeDialog:a,children:l,open:o,defaultOpen:s,onOpenChange:c,modal:f=!0}=n,m=y.useRef(null),g=y.useRef(null),[h,v]=Ti({prop:o,defaultProp:s??!1,onChange:c,caller:$c});return d.jsx(DC,{scope:a,triggerRef:m,contentRef:g,contentId:Tn(),titleId:Tn(),descriptionId:Tn(),open:h,onOpenChange:v,onOpenToggle:y.useCallback(()=>v(b=>!b),[v]),modal:f,children:l})};ib.displayName=$c;var sb="DialogTrigger",LC=y.forwardRef((n,a)=>{const{__scopeDialog:l,...o}=n,s=Bn(sb,l),c=Gt(a,s.triggerRef);return d.jsx(lt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Rh(s.open),...o,ref:c,onClick:rn(n.onClick,s.onOpenToggle)})});LC.displayName=sb;var Ch="DialogPortal",[kC,cb]=ob(Ch,{forceMount:void 0}),ub=n=>{const{__scopeDialog:a,forceMount:l,children:o,container:s}=n,c=Bn(Ch,a);return d.jsx(kC,{scope:a,forceMount:l,children:y.Children.map(o,f=>d.jsx(ro,{present:l||c.open,children:d.jsx(Eh,{asChild:!0,container:s,children:f})}))})};ub.displayName=Ch;var Cc="DialogOverlay",fb=y.forwardRef((n,a)=>{const l=cb(Cc,n.__scopeDialog),{forceMount:o=l.forceMount,...s}=n,c=Bn(Cc,n.__scopeDialog);return c.modal?d.jsx(ro,{present:o||c.open,children:d.jsx(UC,{...s,ref:a})}):null});fb.displayName=Cc;var zC=Wl("DialogOverlay.RemoveScroll"),UC=y.forwardRef((n,a)=>{const{__scopeDialog:l,...o}=n,s=Bn(Cc,l);return d.jsx(Nh,{as:zC,allowPinchZoom:!0,shards:[s.contentRef],children:d.jsx(lt.div,{"data-state":Rh(s.open),...o,ref:a,style:{pointerEvents:"auto",...o.style}})})}),Xr="DialogContent",db=y.forwardRef((n,a)=>{const l=cb(Xr,n.__scopeDialog),{forceMount:o=l.forceMount,...s}=n,c=Bn(Xr,n.__scopeDialog);return d.jsx(ro,{present:o||c.open,children:c.modal?d.jsx(PC,{...s,ref:a}):d.jsx(HC,{...s,ref:a})})});db.displayName=Xr;var PC=y.forwardRef((n,a)=>{const l=Bn(Xr,n.__scopeDialog),o=y.useRef(null),s=Gt(a,l.contentRef,o);return y.useEffect(()=>{const c=o.current;if(c)return lb(c)},[]),d.jsx(hb,{...n,ref:s,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:rn(n.onCloseAutoFocus,c=>{c.preventDefault(),l.triggerRef.current?.focus()}),onPointerDownOutside:rn(n.onPointerDownOutside,c=>{const f=c.detail.originalEvent,m=f.button===0&&f.ctrlKey===!0;(f.button===2||m)&&c.preventDefault()}),onFocusOutside:rn(n.onFocusOutside,c=>c.preventDefault())})}),HC=y.forwardRef((n,a)=>{const l=Bn(Xr,n.__scopeDialog),o=y.useRef(!1),s=y.useRef(!1);return d.jsx(hb,{...n,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{n.onCloseAutoFocus?.(c),c.defaultPrevented||(o.current||l.triggerRef.current?.focus(),c.preventDefault()),o.current=!1,s.current=!1},onInteractOutside:c=>{n.onInteractOutside?.(c),c.defaultPrevented||(o.current=!0,c.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const f=c.target;l.triggerRef.current?.contains(f)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&s.current&&c.preventDefault()}})}),hb=y.forwardRef((n,a)=>{const{__scopeDialog:l,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:c,...f}=n,m=Bn(Xr,l),g=y.useRef(null),h=Gt(a,g);return Q0(),d.jsxs(d.Fragment,{children:[d.jsx(_h,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:s,onUnmountAutoFocus:c,children:d.jsx(Sh,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionId,"aria-labelledby":m.titleId,"data-state":Rh(m.open),...f,ref:h,onDismiss:()=>m.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(BC,{titleId:m.titleId}),d.jsx(qC,{contentRef:g,descriptionId:m.descriptionId})]})]})}),jh="DialogTitle",mb=y.forwardRef((n,a)=>{const{__scopeDialog:l,...o}=n,s=Bn(jh,l);return d.jsx(lt.h2,{id:s.titleId,...o,ref:a})});mb.displayName=jh;var pb="DialogDescription",gb=y.forwardRef((n,a)=>{const{__scopeDialog:l,...o}=n,s=Bn(pb,l);return d.jsx(lt.p,{id:s.descriptionId,...o,ref:a})});gb.displayName=pb;var vb="DialogClose",yb=y.forwardRef((n,a)=>{const{__scopeDialog:l,...o}=n,s=Bn(vb,l);return d.jsx(lt.button,{type:"button",...o,ref:a,onClick:rn(n.onClick,()=>s.onOpenChange(!1))})});yb.displayName=vb;function Rh(n){return n?"open":"closed"}var bb="DialogTitleWarning",[ZM,xb]=m2(bb,{contentName:Xr,titleName:jh,docsSlug:"dialog"}),BC=({titleId:n})=>{const a=xb(bb),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
 
111
- For more information, see https://radix-ui.com/primitives/docs/components/${a.docsSlug}`;return y.useEffect(()=>{n&&(document.getElementById(n)||console.error(l))},[l,n]),null},rN="DialogDescriptionWarning",lN=({contentRef:n,descriptionId:a})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${rb(rN).contentName}}.`;return y.useEffect(()=>{const s=n.current?.getAttribute("aria-describedby");a&&s&&(document.getElementById(a)||console.warn(i))},[i,n,a]),null},lb=Y0,ib=X0,vh=Q0,yh=I0,ob=J0,sb=eb,iN=nb;/**
111
+ For more information, see https://radix-ui.com/primitives/docs/components/${a.docsSlug}`;return y.useEffect(()=>{n&&(document.getElementById(n)||console.error(l))},[l,n]),null},$C="DialogDescriptionWarning",qC=({contentRef:n,descriptionId:a})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${xb($C).contentName}}.`;return y.useEffect(()=>{const s=n.current?.getAttribute("aria-describedby");a&&s&&(document.getElementById(a)||console.warn(o))},[o,n,a]),null},wb=ib,Sb=ub,Oh=fb,Ah=db,_b=mb,Eb=gb,FC=yb;/**
112
112
  * @license lucide-react v0.525.0 - ISC
113
113
  *
114
114
  * This source code is licensed under the ISC license.
115
115
  * See the LICENSE file in the root directory of this source tree.
116
- */const oN=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),sN=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,l,i)=>i?i.toUpperCase():l.toLowerCase()),xy=n=>{const a=sN(n);return a.charAt(0).toUpperCase()+a.slice(1)},cb=(...n)=>n.filter((a,l,i)=>!!a&&a.trim()!==""&&i.indexOf(a)===l).join(" ").trim(),cN=n=>{for(const a in n)if(a.startsWith("aria-")||a==="role"||a==="title")return!0};/**
116
+ */const VC=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),GC=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,l,o)=>o?o.toUpperCase():l.toLowerCase()),Dy=n=>{const a=GC(n);return a.charAt(0).toUpperCase()+a.slice(1)},Nb=(...n)=>n.filter((a,l,o)=>!!a&&a.trim()!==""&&o.indexOf(a)===l).join(" ").trim(),YC=n=>{for(const a in n)if(a.startsWith("aria-")||a==="role"||a==="title")return!0};/**
117
117
  * @license lucide-react v0.525.0 - ISC
118
118
  *
119
119
  * This source code is licensed under the ISC license.
120
120
  * See the LICENSE file in the root directory of this source tree.
121
- */var uN={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
121
+ */var KC={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
122
122
  * @license lucide-react v0.525.0 - ISC
123
123
  *
124
124
  * This source code is licensed under the ISC license.
125
125
  * See the LICENSE file in the root directory of this source tree.
126
- */const fN=y.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:l=2,absoluteStrokeWidth:i,className:s="",children:c,iconNode:f,...h},p)=>y.createElement("svg",{ref:p,...uN,width:a,height:a,stroke:n,strokeWidth:i?Number(l)*24/Number(a):l,className:cb("lucide",s),...!c&&!cN(h)&&{"aria-hidden":"true"},...h},[...f.map(([m,v])=>y.createElement(m,v)),...Array.isArray(c)?c:[c]]));/**
126
+ */const IC=y.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:l=2,absoluteStrokeWidth:o,className:s="",children:c,iconNode:f,...m},g)=>y.createElement("svg",{ref:g,...KC,width:a,height:a,stroke:n,strokeWidth:o?Number(l)*24/Number(a):l,className:Nb("lucide",s),...!c&&!YC(m)&&{"aria-hidden":"true"},...m},[...f.map(([h,v])=>y.createElement(h,v)),...Array.isArray(c)?c:[c]]));/**
127
127
  * @license lucide-react v0.525.0 - ISC
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 xt=(n,a)=>{const l=y.forwardRef(({className:i,...s},c)=>y.createElement(fN,{ref:c,iconNode:a,className:cb(`lucide-${oN(xy(n))}`,`lucide-${n}`,i),...s}));return l.displayName=xy(n),l};/**
131
+ */const ft=(n,a)=>{const l=y.forwardRef(({className:o,...s},c)=>y.createElement(IC,{ref:c,iconNode:a,className:Nb(`lucide-${VC(Dy(n))}`,`lucide-${n}`,o),...s}));return l.displayName=Dy(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 dN=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],hN=xt("arrow-left",dN);/**
136
+ */const XC=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Cb=ft("arrow-left",XC);/**
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 mN=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ub=xt("check",mN);/**
141
+ */const QC=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],jb=ft("check",QC);/**
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 pN=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],fb=xt("chevrons-up-down",pN);/**
146
+ */const ZC=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Rb=ft("chevrons-up-down",ZC);/**
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 gN=[["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"}]],vN=xt("circle-alert",gN);/**
151
+ */const JC=[["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"}]],WC=ft("circle-alert",JC);/**
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 yN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]],bN=xt("circle-arrow-up",yN);/**
156
+ */const ej=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]],tj=ft("circle-arrow-up",ej);/**
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 xN=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],wN=xt("circle-check-big",xN);/**
161
+ */const nj=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],aj=ft("circle-check-big",nj);/**
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 SN=[["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"}]],db=xt("circle-x",SN);/**
166
+ */const rj=[["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"}]],Ob=ft("circle-x",rj);/**
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 _N=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],EN=xt("download",_N);/**
171
+ */const lj=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],oj=ft("clock",lj);/**
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 CN=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],NN=xt("eye-off",CN);/**
176
+ */const ij=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],sj=ft("copy",ij);/**
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 RN=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],jN=xt("eye",RN);/**
181
+ */const cj=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],uj=ft("download",cj);/**
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 ON=[["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"}]],AN=xt("file-json",ON);/**
186
+ */const fj=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],dj=ft("eye-off",fj);/**
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 TN=[["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 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],MN=xt("file-text",TN);/**
191
+ */const hj=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],mj=ft("eye",hj);/**
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 DN=[["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"}]],gd=xt("file",DN);/**
196
+ */const pj=[["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"}]],gj=ft("file-json",pj);/**
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 LN=[["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"}]],kN=xt("languages",LN);/**
201
+ */const vj=[["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 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],yj=ft("file-text",vj);/**
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 zN=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],UN=xt("layers",zN);/**
206
+ */const bj=[["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"}]],Nd=ft("file",bj);/**
207
207
  * @license lucide-react v0.525.0 - ISC
208
208
  *
209
209
  * This source code is licensed under the ISC license.
210
210
  * See the LICENSE file in the root directory of this source tree.
211
- */const PN=[["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"}]],vc=xt("pencil",PN);/**
211
+ */const xj=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],Qd=ft("history",xj);/**
212
212
  * @license lucide-react v0.525.0 - ISC
213
213
  *
214
214
  * This source code is licensed under the ISC license.
215
215
  * See the LICENSE file in the root directory of this source tree.
216
- */const HN=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Bd=xt("plus",HN);/**
216
+ */const wj=[["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"}]],Sj=ft("languages",wj);/**
217
217
  * @license lucide-react v0.525.0 - ISC
218
218
  *
219
219
  * This source code is licensed under the ISC license.
220
220
  * See the LICENSE file in the root directory of this source tree.
221
- */const BN=[["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"}]],bh=xt("refresh-cw",BN);/**
221
+ */const _j=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],Ej=ft("layers",_j);/**
222
222
  * @license lucide-react v0.525.0 - ISC
223
223
  *
224
224
  * This source code is licensed under the ISC license.
225
225
  * See the LICENSE file in the root directory of this source tree.
226
- */const $N=[["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"}]],hb=xt("save",$N);/**
226
+ */const Nj=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]],Ly=ft("maximize",Nj);/**
227
227
  * @license lucide-react v0.525.0 - ISC
228
228
  *
229
229
  * This source code is licensed under the ISC license.
230
230
  * See the LICENSE file in the root directory of this source tree.
231
- */const VN=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],mb=xt("search",VN);/**
231
+ */const Cj=[["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"}]],jc=ft("pencil",Cj);/**
232
232
  * @license lucide-react v0.525.0 - ISC
233
233
  *
234
234
  * This source code is licensed under the ISC license.
235
235
  * See the LICENSE file in the root directory of this source tree.
236
- */const qN=[["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"}]],FN=xt("settings",qN);/**
236
+ */const jj=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Zd=ft("plus",jj);/**
237
237
  * @license lucide-react v0.525.0 - ISC
238
238
  *
239
239
  * This source code is licensed under the ISC license.
240
240
  * See the LICENSE file in the root directory of this source tree.
241
- */const YN=[["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"}]],sr=xt("trash-2",YN);/**
241
+ */const Rj=[["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"}]],Th=ft("refresh-cw",Rj);/**
242
242
  * @license lucide-react v0.525.0 - ISC
243
243
  *
244
244
  * This source code is licensed under the ISC license.
245
245
  * See the LICENSE file in the root directory of this source tree.
246
- */const GN=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Yr=xt("x",GN);function pb(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=pb(n[a]))&&(i&&(i+=" "),i+=l)}else for(l in n)n[l]&&(i&&(i+=" "),i+=l);return i}function gb(){for(var n,a,l=0,i="",s=arguments.length;l<s;l++)(n=arguments[l])&&(a=pb(n))&&(i&&(i+=" "),i+=a);return i}const xh="-",KN=n=>{const a=QN(n),{conflictingClassGroups:l,conflictingClassGroupModifiers:i}=n;return{getClassGroupId:f=>{const h=f.split(xh);return h[0]===""&&h.length!==1&&h.shift(),vb(h,a)||XN(f)},getConflictingClassGroupIds:(f,h)=>{const p=l[f]||[];return h&&i[f]?[...p,...i[f]]:p}}},vb=(n,a)=>{if(n.length===0)return a.classGroupId;const l=n[0],i=a.nextPart.get(l),s=i?vb(n.slice(1),i):void 0;if(s)return s;if(a.validators.length===0)return;const c=n.join(xh);return a.validators.find(({validator:f})=>f(c))?.classGroupId},wy=/^\[(.+)\]$/,XN=n=>{if(wy.test(n)){const a=wy.exec(n)[1],l=a?.substring(0,a.indexOf(":"));if(l)return"arbitrary.."+l}},QN=n=>{const{theme:a,classGroups:l}=n,i={nextPart:new Map,validators:[]};for(const s in l)$d(l[s],i,s,a);return i},$d=(n,a,l,i)=>{n.forEach(s=>{if(typeof s=="string"){const c=s===""?a:Sy(a,s);c.classGroupId=l;return}if(typeof s=="function"){if(IN(s)){$d(s(i),a,l,i);return}a.validators.push({validator:s,classGroupId:l});return}Object.entries(s).forEach(([c,f])=>{$d(f,Sy(a,c),l,i)})})},Sy=(n,a)=>{let l=n;return a.split(xh).forEach(i=>{l.nextPart.has(i)||l.nextPart.set(i,{nextPart:new Map,validators:[]}),l=l.nextPart.get(i)}),l},IN=n=>n.isThemeGetter,ZN=n=>{if(n<1)return{get:()=>{},set:()=>{}};let a=0,l=new Map,i=new Map;const s=(c,f)=>{l.set(c,f),a++,a>n&&(a=0,i=l,l=new Map)};return{get(c){let f=l.get(c);if(f!==void 0)return f;if((f=i.get(c))!==void 0)return s(c,f),f},set(c,f){l.has(c)?l.set(c,f):s(c,f)}}},Vd="!",qd=":",JN=qd.length,WN=n=>{const{prefix:a,experimentalParseClassName:l}=n;let i=s=>{const c=[];let f=0,h=0,p=0,m;for(let C=0;C<s.length;C++){let E=s[C];if(f===0&&h===0){if(E===qd){c.push(s.slice(p,C)),p=C+JN;continue}if(E==="/"){m=C;continue}}E==="["?f++:E==="]"?f--:E==="("?h++:E===")"&&h--}const v=c.length===0?s:s.substring(p),b=eR(v),w=b!==v,S=m&&m>p?m-p:void 0;return{modifiers:c,hasImportantModifier:w,baseClassName:b,maybePostfixModifierPosition:S}};if(a){const s=a+qd,c=i;i=f=>f.startsWith(s)?c(f.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:f,maybePostfixModifierPosition:void 0}}if(l){const s=i;i=c=>l({className:c,parseClassName:s})}return i},eR=n=>n.endsWith(Vd)?n.substring(0,n.length-1):n.startsWith(Vd)?n.substring(1):n,tR=n=>{const a=Object.fromEntries(n.orderSensitiveModifiers.map(i=>[i,!0]));return i=>{if(i.length<=1)return i;const s=[];let c=[];return i.forEach(f=>{f[0]==="["||a[f]?(s.push(...c.sort(),f),c=[]):c.push(f)}),s.push(...c.sort()),s}},nR=n=>({cache:ZN(n.cacheSize),parseClassName:WN(n),sortModifiers:tR(n),...KN(n)}),aR=/\s+/,rR=(n,a)=>{const{parseClassName:l,getClassGroupId:i,getConflictingClassGroupIds:s,sortModifiers:c}=a,f=[],h=n.trim().split(aR);let p="";for(let m=h.length-1;m>=0;m-=1){const v=h[m],{isExternal:b,modifiers:w,hasImportantModifier:S,baseClassName:C,maybePostfixModifierPosition:E}=l(v);if(b){p=v+(p.length>0?" "+p:p);continue}let j=!!E,R=i(j?C.substring(0,E):C);if(!R){if(!j){p=v+(p.length>0?" "+p:p);continue}if(R=i(C),!R){p=v+(p.length>0?" "+p:p);continue}j=!1}const L=c(w).join(":"),k=S?L+Vd:L,H=k+R;if(f.includes(H))continue;f.push(H);const M=s(R,j);for(let N=0;N<M.length;++N){const B=M[N];f.push(k+B)}p=v+(p.length>0?" "+p:p)}return p};function lR(){let n=0,a,l,i="";for(;n<arguments.length;)(a=arguments[n++])&&(l=yb(a))&&(i&&(i+=" "),i+=l);return i}const yb=n=>{if(typeof n=="string")return n;let a,l="";for(let i=0;i<n.length;i++)n[i]&&(a=yb(n[i]))&&(l&&(l+=" "),l+=a);return l};function iR(n,...a){let l,i,s,c=f;function f(p){const m=a.reduce((v,b)=>b(v),n());return l=nR(m),i=l.cache.get,s=l.cache.set,c=h,h(p)}function h(p){const m=i(p);if(m)return m;const v=rR(p,l);return s(p,v),v}return function(){return c(lR.apply(null,arguments))}}const Lt=n=>{const a=l=>l[n]||[];return a.isThemeGetter=!0,a},bb=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,xb=/^\((?:(\w[\w-]*):)?(.+)\)$/i,oR=/^\d+\/\d+$/,sR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,cR=/\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$/,uR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,fR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Vl=n=>oR.test(n),qe=n=>!!n&&!Number.isNaN(Number(n)),tr=n=>!!n&&Number.isInteger(Number(n)),vd=n=>n.endsWith("%")&&qe(n.slice(0,-1)),Sa=n=>sR.test(n),hR=()=>!0,mR=n=>cR.test(n)&&!uR.test(n),wb=()=>!1,pR=n=>fR.test(n),gR=n=>dR.test(n),vR=n=>!xe(n)&&!we(n),yR=n=>ti(n,Eb,wb),xe=n=>bb.test(n),Br=n=>ti(n,Cb,mR),yd=n=>ti(n,_R,qe),_y=n=>ti(n,Sb,wb),bR=n=>ti(n,_b,gR),Js=n=>ti(n,Nb,pR),we=n=>xb.test(n),oo=n=>ni(n,Cb),xR=n=>ni(n,ER),Ey=n=>ni(n,Sb),wR=n=>ni(n,Eb),SR=n=>ni(n,_b),Ws=n=>ni(n,Nb,!0),ti=(n,a,l)=>{const i=bb.exec(n);return i?i[1]?a(i[1]):l(i[2]):!1},ni=(n,a,l=!1)=>{const i=xb.exec(n);return i?i[1]?a(i[1]):l:!1},Sb=n=>n==="position"||n==="percentage",_b=n=>n==="image"||n==="url",Eb=n=>n==="length"||n==="size"||n==="bg-size",Cb=n=>n==="length",_R=n=>n==="number",ER=n=>n==="family-name",Nb=n=>n==="shadow",CR=()=>{const n=Lt("color"),a=Lt("font"),l=Lt("text"),i=Lt("font-weight"),s=Lt("tracking"),c=Lt("leading"),f=Lt("breakpoint"),h=Lt("container"),p=Lt("spacing"),m=Lt("radius"),v=Lt("shadow"),b=Lt("inset-shadow"),w=Lt("text-shadow"),S=Lt("drop-shadow"),C=Lt("blur"),E=Lt("perspective"),j=Lt("aspect"),R=Lt("ease"),L=Lt("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[...H(),we,xe],N=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],J=()=>[we,xe,p],te=()=>[Vl,"full","auto",...J()],ae=()=>[tr,"none","subgrid",we,xe],re=()=>["auto",{span:["full",tr,we,xe]},tr,we,xe],fe=()=>[tr,"auto",we,xe],de=()=>["auto","min","max","fr",we,xe],Q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ee=()=>["start","end","center","stretch","center-safe","end-safe"],A=()=>["auto",...J()],X=()=>[Vl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...J()],V=()=>[n,we,xe],ye=()=>[...H(),Ey,_y,{position:[we,xe]}],O=()=>["no-repeat",{repeat:["","x","y","space","round"]}],G=()=>["auto","cover","contain",wR,yR,{size:[we,xe]}],U=()=>[vd,oo,Br],K=()=>["","none","full",m,we,xe],P=()=>["",qe,oo,Br],oe=()=>["solid","dashed","dotted","double"],me=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ve=()=>[qe,vd,Ey,_y],Le=()=>["","none",C,we,xe],Fe=()=>["none",qe,we,xe],Je=()=>["none",qe,we,xe],Tt=()=>[qe,we,xe],Ze=()=>[Vl,"full",...J()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Sa],breakpoint:[Sa],color:[hR],container:[Sa],"drop-shadow":[Sa],ease:["in","out","in-out"],font:[vR],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Sa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Sa],shadow:[Sa],spacing:["px",qe],text:[Sa],"text-shadow":[Sa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Vl,xe,we,j]}],container:["container"],columns:[{columns:[qe,xe,we,h]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"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:M()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:te()}],"inset-x":[{"inset-x":te()}],"inset-y":[{"inset-y":te()}],start:[{start:te()}],end:[{end:te()}],top:[{top:te()}],right:[{right:te()}],bottom:[{bottom:te()}],left:[{left:te()}],visibility:["visible","invisible","collapse"],z:[{z:[tr,"auto",we,xe]}],basis:[{basis:[Vl,"full","auto",h,...J()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,Vl,"auto","initial","none",xe]}],grow:[{grow:["",qe,we,xe]}],shrink:[{shrink:["",qe,we,xe]}],order:[{order:[tr,"first","last","none",we,xe]}],"grid-cols":[{"grid-cols":ae()}],"col-start-end":[{col:re()}],"col-start":[{"col-start":fe()}],"col-end":[{"col-end":fe()}],"grid-rows":[{"grid-rows":ae()}],"row-start-end":[{row:re()}],"row-start":[{"row-start":fe()}],"row-end":[{"row-end":fe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":de()}],"auto-rows":[{"auto-rows":de()}],gap:[{gap:J()}],"gap-x":[{"gap-x":J()}],"gap-y":[{"gap-y":J()}],"justify-content":[{justify:[...Q(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...Q()]}],"align-items":[{items:[...ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":Q()}],"place-items":[{"place-items":[...ee(),"baseline"]}],"place-self":[{"place-self":["auto",...ee()]}],p:[{p:J()}],px:[{px:J()}],py:[{py:J()}],ps:[{ps:J()}],pe:[{pe:J()}],pt:[{pt:J()}],pr:[{pr:J()}],pb:[{pb:J()}],pl:[{pl:J()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":J()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":J()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],w:[{w:[h,"screen",...X()]}],"min-w":[{"min-w":[h,"screen","none",...X()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[f]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",l,oo,Br]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,we,yd]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",vd,xe]}],"font-family":[{font:[xR,xe,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,we,xe]}],"line-clamp":[{"line-clamp":[qe,"none",we,yd]}],leading:[{leading:[c,...J()]}],"list-image":[{"list-image":["none",we,xe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",we,xe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:V()}],"text-color":[{text:V()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...oe(),"wavy"]}],"text-decoration-thickness":[{decoration:[qe,"from-font","auto",we,Br]}],"text-decoration-color":[{decoration:V()}],"underline-offset":[{"underline-offset":[qe,"auto",we,xe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:J()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",we,xe]}],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",we,xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ye()}],"bg-repeat":[{bg:O()}],"bg-size":[{bg:G()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},tr,we,xe],radial:["",we,xe],conic:[tr,we,xe]},SR,bR]}],"bg-color":[{bg:V()}],"gradient-from-pos":[{from:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"gradient-from":[{from:V()}],"gradient-via":[{via:V()}],"gradient-to":[{to:V()}],rounded:[{rounded:K()}],"rounded-s":[{"rounded-s":K()}],"rounded-e":[{"rounded-e":K()}],"rounded-t":[{"rounded-t":K()}],"rounded-r":[{"rounded-r":K()}],"rounded-b":[{"rounded-b":K()}],"rounded-l":[{"rounded-l":K()}],"rounded-ss":[{"rounded-ss":K()}],"rounded-se":[{"rounded-se":K()}],"rounded-ee":[{"rounded-ee":K()}],"rounded-es":[{"rounded-es":K()}],"rounded-tl":[{"rounded-tl":K()}],"rounded-tr":[{"rounded-tr":K()}],"rounded-br":[{"rounded-br":K()}],"rounded-bl":[{"rounded-bl":K()}],"border-w":[{border:P()}],"border-w-x":[{"border-x":P()}],"border-w-y":[{"border-y":P()}],"border-w-s":[{"border-s":P()}],"border-w-e":[{"border-e":P()}],"border-w-t":[{"border-t":P()}],"border-w-r":[{"border-r":P()}],"border-w-b":[{"border-b":P()}],"border-w-l":[{"border-l":P()}],"divide-x":[{"divide-x":P()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":P()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...oe(),"hidden","none"]}],"divide-style":[{divide:[...oe(),"hidden","none"]}],"border-color":[{border:V()}],"border-color-x":[{"border-x":V()}],"border-color-y":[{"border-y":V()}],"border-color-s":[{"border-s":V()}],"border-color-e":[{"border-e":V()}],"border-color-t":[{"border-t":V()}],"border-color-r":[{"border-r":V()}],"border-color-b":[{"border-b":V()}],"border-color-l":[{"border-l":V()}],"divide-color":[{divide:V()}],"outline-style":[{outline:[...oe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[qe,we,xe]}],"outline-w":[{outline:["",qe,oo,Br]}],"outline-color":[{outline:V()}],shadow:[{shadow:["","none",v,Ws,Js]}],"shadow-color":[{shadow:V()}],"inset-shadow":[{"inset-shadow":["none",b,Ws,Js]}],"inset-shadow-color":[{"inset-shadow":V()}],"ring-w":[{ring:P()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:V()}],"ring-offset-w":[{"ring-offset":[qe,Br]}],"ring-offset-color":[{"ring-offset":V()}],"inset-ring-w":[{"inset-ring":P()}],"inset-ring-color":[{"inset-ring":V()}],"text-shadow":[{"text-shadow":["none",w,Ws,Js]}],"text-shadow-color":[{"text-shadow":V()}],opacity:[{opacity:[qe,we,xe]}],"mix-blend":[{"mix-blend":[...me(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":me()}],"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":[qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":ve()}],"mask-image-linear-to-pos":[{"mask-linear-to":ve()}],"mask-image-linear-from-color":[{"mask-linear-from":V()}],"mask-image-linear-to-color":[{"mask-linear-to":V()}],"mask-image-t-from-pos":[{"mask-t-from":ve()}],"mask-image-t-to-pos":[{"mask-t-to":ve()}],"mask-image-t-from-color":[{"mask-t-from":V()}],"mask-image-t-to-color":[{"mask-t-to":V()}],"mask-image-r-from-pos":[{"mask-r-from":ve()}],"mask-image-r-to-pos":[{"mask-r-to":ve()}],"mask-image-r-from-color":[{"mask-r-from":V()}],"mask-image-r-to-color":[{"mask-r-to":V()}],"mask-image-b-from-pos":[{"mask-b-from":ve()}],"mask-image-b-to-pos":[{"mask-b-to":ve()}],"mask-image-b-from-color":[{"mask-b-from":V()}],"mask-image-b-to-color":[{"mask-b-to":V()}],"mask-image-l-from-pos":[{"mask-l-from":ve()}],"mask-image-l-to-pos":[{"mask-l-to":ve()}],"mask-image-l-from-color":[{"mask-l-from":V()}],"mask-image-l-to-color":[{"mask-l-to":V()}],"mask-image-x-from-pos":[{"mask-x-from":ve()}],"mask-image-x-to-pos":[{"mask-x-to":ve()}],"mask-image-x-from-color":[{"mask-x-from":V()}],"mask-image-x-to-color":[{"mask-x-to":V()}],"mask-image-y-from-pos":[{"mask-y-from":ve()}],"mask-image-y-to-pos":[{"mask-y-to":ve()}],"mask-image-y-from-color":[{"mask-y-from":V()}],"mask-image-y-to-color":[{"mask-y-to":V()}],"mask-image-radial":[{"mask-radial":[we,xe]}],"mask-image-radial-from-pos":[{"mask-radial-from":ve()}],"mask-image-radial-to-pos":[{"mask-radial-to":ve()}],"mask-image-radial-from-color":[{"mask-radial-from":V()}],"mask-image-radial-to-color":[{"mask-radial-to":V()}],"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":H()}],"mask-image-conic-pos":[{"mask-conic":[qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":ve()}],"mask-image-conic-to-pos":[{"mask-conic-to":ve()}],"mask-image-conic-from-color":[{"mask-conic-from":V()}],"mask-image-conic-to-color":[{"mask-conic-to":V()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ye()}],"mask-repeat":[{mask:O()}],"mask-size":[{mask:G()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",we,xe]}],filter:[{filter:["","none",we,xe]}],blur:[{blur:Le()}],brightness:[{brightness:[qe,we,xe]}],contrast:[{contrast:[qe,we,xe]}],"drop-shadow":[{"drop-shadow":["","none",S,Ws,Js]}],"drop-shadow-color":[{"drop-shadow":V()}],grayscale:[{grayscale:["",qe,we,xe]}],"hue-rotate":[{"hue-rotate":[qe,we,xe]}],invert:[{invert:["",qe,we,xe]}],saturate:[{saturate:[qe,we,xe]}],sepia:[{sepia:["",qe,we,xe]}],"backdrop-filter":[{"backdrop-filter":["","none",we,xe]}],"backdrop-blur":[{"backdrop-blur":Le()}],"backdrop-brightness":[{"backdrop-brightness":[qe,we,xe]}],"backdrop-contrast":[{"backdrop-contrast":[qe,we,xe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",qe,we,xe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qe,we,xe]}],"backdrop-invert":[{"backdrop-invert":["",qe,we,xe]}],"backdrop-opacity":[{"backdrop-opacity":[qe,we,xe]}],"backdrop-saturate":[{"backdrop-saturate":[qe,we,xe]}],"backdrop-sepia":[{"backdrop-sepia":["",qe,we,xe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":J()}],"border-spacing-x":[{"border-spacing-x":J()}],"border-spacing-y":[{"border-spacing-y":J()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",we,xe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[qe,"initial",we,xe]}],ease:[{ease:["linear","initial",R,we,xe]}],delay:[{delay:[qe,we,xe]}],animate:[{animate:["none",L,we,xe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,we,xe]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:Fe()}],"rotate-x":[{"rotate-x":Fe()}],"rotate-y":[{"rotate-y":Fe()}],"rotate-z":[{"rotate-z":Fe()}],scale:[{scale:Je()}],"scale-x":[{"scale-x":Je()}],"scale-y":[{"scale-y":Je()}],"scale-z":[{"scale-z":Je()}],"scale-3d":["scale-3d"],skew:[{skew:Tt()}],"skew-x":[{"skew-x":Tt()}],"skew-y":[{"skew-y":Tt()}],transform:[{transform:[we,xe,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ze()}],"translate-x":[{"translate-x":Ze()}],"translate-y":[{"translate-y":Ze()}],"translate-z":[{"translate-z":Ze()}],"translate-none":["translate-none"],accent:[{accent:V()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:V()}],"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",we,xe]}],"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":J()}],"scroll-mx":[{"scroll-mx":J()}],"scroll-my":[{"scroll-my":J()}],"scroll-ms":[{"scroll-ms":J()}],"scroll-me":[{"scroll-me":J()}],"scroll-mt":[{"scroll-mt":J()}],"scroll-mr":[{"scroll-mr":J()}],"scroll-mb":[{"scroll-mb":J()}],"scroll-ml":[{"scroll-ml":J()}],"scroll-p":[{"scroll-p":J()}],"scroll-px":[{"scroll-px":J()}],"scroll-py":[{"scroll-py":J()}],"scroll-ps":[{"scroll-ps":J()}],"scroll-pe":[{"scroll-pe":J()}],"scroll-pt":[{"scroll-pt":J()}],"scroll-pr":[{"scroll-pr":J()}],"scroll-pb":[{"scroll-pb":J()}],"scroll-pl":[{"scroll-pl":J()}],"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",we,xe]}],fill:[{fill:["none",...V()]}],"stroke-w":[{stroke:[qe,oo,Br,yd]}],stroke:[{stroke:["none",...V()]}],"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"]}},NR=iR(CR);function dt(...n){return NR(gb(n))}const Xr=lb,RR=ib,Rb=y.forwardRef(({className:n,...a},l)=>g.jsx(vh,{ref:l,className:dt("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}));Rb.displayName=vh.displayName;const cr=y.forwardRef(({className:n,children:a,...l},i)=>g.jsxs(RR,{children:[g.jsx(Rb,{}),g.jsxs(yh,{ref:i,className:dt("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,g.jsxs(iN,{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:[g.jsx(Yr,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));cr.displayName=yh.displayName;const ur=({className:n,...a})=>g.jsx("div",{className:dt("flex flex-col space-y-1.5 text-center sm:text-left",n),...a});ur.displayName="DialogHeader";const Qr=({className:n,...a})=>g.jsx("div",{className:dt("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",n),...a});Qr.displayName="DialogFooter";const fr=y.forwardRef(({className:n,...a},l)=>g.jsx(ob,{ref:l,className:dt("text-lg font-semibold leading-none tracking-tight",n),...a}));fr.displayName=ob.displayName;const Lc=y.forwardRef(({className:n,...a},l)=>g.jsx(sb,{ref:l,className:dt("text-sm text-muted-foreground",n),...a}));Lc.displayName=sb.displayName;const Cy=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,Ny=gb,wh=(n,a)=>l=>{var i;if(a?.variants==null)return Ny(n,l?.class,l?.className);const{variants:s,defaultVariants:c}=a,f=Object.keys(s).map(m=>{const v=l?.[m],b=c?.[m];if(v===null)return null;const w=Cy(v)||Cy(b);return s[m][w]}),h=l&&Object.entries(l).reduce((m,v)=>{let[b,w]=v;return w===void 0||(m[b]=w),m},{}),p=a==null||(i=a.compoundVariants)===null||i===void 0?void 0:i.reduce((m,v)=>{let{class:b,className:w,...S}=v;return Object.entries(S).every(C=>{let[E,j]=C;return Array.isArray(j)?j.includes({...c,...h}[E]):{...c,...h}[E]===j})?[...m,b,w]:m},[]);return Ny(n,f,p,l?.class,l?.className)},jR=wh("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"}}),Ce=y.forwardRef(({className:n,variant:a,size:l,asChild:i=!1,...s},c)=>{const f=i?P2:"button";return g.jsx(f,{className:dt(jR({variant:a,size:l,className:n})),ref:c,...s})});Ce.displayName="Button";const ft=y.forwardRef(({className:n,type:a,...l},i)=>{const s=a==="number",[c,f]=y.useState(l.value?.toString()||"");y.useEffect(()=>{l.value!==void 0&&f(l.value.toString())},[l.value]);const h=b=>{const w=b.target.value;s?(w===""||/^\d+$/.test(w))&&(f(w),l.onChange&&w!==""&&l.onChange(b)):(f(w),l.onChange&&l.onChange(b))},p=b=>{if(s&&c===""){const w=l.placeholder||"1";if(f(w),l.onChange){const S={...b,target:{...b.target,value:w}};l.onChange(S)}}l.onBlur&&l.onBlur(b)},m=s?"text":a,v=s?c:l.value;return g.jsx("input",{...l,type:m,value:v,onChange:h,onBlur:p,className:dt("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})});ft.displayName="Input";var OR="Label",jb=y.forwardRef((n,a)=>g.jsx(pt.label,{...n,ref:a,onMouseDown:l=>{l.target.closest("button, input, select, textarea")||(n.onMouseDown?.(l),!l.defaultPrevented&&l.detail>1&&l.preventDefault())}}));jb.displayName=OR;var Ob=jb;const AR=wh("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ke=y.forwardRef(({className:n,...a},l)=>g.jsx(Ob,{ref:l,className:dt(AR(),n),...a}));Ke.displayName=Ob.displayName;function TR(n){const a=y.useRef({value:n,previous:n});return y.useMemo(()=>(a.current.value!==n&&(a.current.previous=a.current.value,a.current.value=n),a.current.previous),[n])}function Ab(n){const[a,l]=y.useState(void 0);return or(()=>{if(n){l({width:n.offsetWidth,height:n.offsetHeight});const i=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const c=s[0];let f,h;if("borderBoxSize"in c){const p=c.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 kc="Switch",[MR,PT]=Ac(kc),[DR,LR]=MR(kc),Tb=y.forwardRef((n,a)=>{const{__scopeSwitch:l,name:i,checked:s,defaultChecked:c,required:f,disabled:h,value:p="on",onCheckedChange:m,form:v,...b}=n,[w,S]=y.useState(null),C=vn(a,k=>S(k)),E=y.useRef(!1),j=w?v||!!w.closest("form"):!0,[R,L]=ch({prop:s,defaultProp:c??!1,onChange:m,caller:kc});return g.jsxs(DR,{scope:l,checked:R,disabled:h,children:[g.jsx(pt.button,{type:"button",role:"switch","aria-checked":R,"aria-required":f,"data-state":kb(R),"data-disabled":h?"":void 0,disabled:h,value:p,...b,ref:C,onClick:nn(n.onClick,k=>{L(H=>!H),j&&(E.current=k.isPropagationStopped(),E.current||k.stopPropagation())})}),j&&g.jsx(Lb,{control:w,bubbles:!E.current,name:i,value:p,checked:R,required:f,disabled:h,form:v,style:{transform:"translateX(-100%)"}})]})});Tb.displayName=kc;var Mb="SwitchThumb",Db=y.forwardRef((n,a)=>{const{__scopeSwitch:l,...i}=n,s=LR(Mb,l);return g.jsx(pt.span,{"data-state":kb(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:a})});Db.displayName=Mb;var kR="SwitchBubbleInput",Lb=y.forwardRef(({__scopeSwitch:n,control:a,checked:l,bubbles:i=!0,...s},c)=>{const f=y.useRef(null),h=vn(f,c),p=TR(l),m=Ab(a);return y.useEffect(()=>{const v=f.current;if(!v)return;const b=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(b,"checked").set;if(p!==l&&S){const C=new Event("click",{bubbles:i});S.call(v,l),v.dispatchEvent(C)}},[p,l,i]),g.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}})});Lb.displayName=kR;function kb(n){return n?"checked":"unchecked"}var zb=Tb,zR=Db;const Fd=y.forwardRef(({className:n,...a},l)=>g.jsx(zb,{className:dt("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:g.jsx(zR,{className:dt("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")})}));Fd.displayName=zb.displayName;var Ry=1,UR=.9,PR=.8,HR=.17,bd=.1,xd=.999,BR=.9999,$R=.99,VR=/[\\\/_+.#"@\[\(\{&]/,qR=/[\\\/_+.#"@\[\(\{&]/g,FR=/[\s-]/,Ub=/[\s-]/g;function Yd(n,a,l,i,s,c,f){if(c===a.length)return s===n.length?Ry:$R;var h=`${s},${c}`;if(f[h]!==void 0)return f[h];for(var p=i.charAt(c),m=l.indexOf(p,s),v=0,b,w,S,C;m>=0;)b=Yd(n,a,l,i,m+1,c+1,f),b>v&&(m===s?b*=Ry:VR.test(n.charAt(m-1))?(b*=PR,S=n.slice(s,m-1).match(qR),S&&s>0&&(b*=Math.pow(xd,S.length))):FR.test(n.charAt(m-1))?(b*=UR,C=n.slice(s,m-1).match(Ub),C&&s>0&&(b*=Math.pow(xd,C.length))):(b*=HR,s>0&&(b*=Math.pow(xd,m-s))),n.charAt(m)!==a.charAt(c)&&(b*=BR)),(b<bd&&l.charAt(m-1)===i.charAt(c+1)||i.charAt(c+1)===i.charAt(c)&&l.charAt(m-1)!==i.charAt(c))&&(w=Yd(n,a,l,i,m+1,c+2,f),w*bd>b&&(b=w*bd)),b>v&&(v=b),m=l.indexOf(p,m+1);return f[h]=v,v}function jy(n){return n.toLowerCase().replace(Ub," ")}function YR(n,a,l){return n=l&&l.length>0?`${n+" "+l.join(" ")}`:n,Yd(n,a,jy(n),jy(a),0,0,{})}var so='[cmdk-group=""]',wd='[cmdk-group-items=""]',GR='[cmdk-group-heading=""]',Pb='[cmdk-item=""]',Oy=`${Pb}:not([aria-disabled="true"])`,Gd="cmdk-item-select",Fl="data-value",KR=(n,a,l)=>YR(n,a,l),Hb=y.createContext(void 0),Co=()=>y.useContext(Hb),Bb=y.createContext(void 0),Sh=()=>y.useContext(Bb),$b=y.createContext(void 0),Vb=y.forwardRef((n,a)=>{let l=Yl(()=>{var U,K;return{search:"",value:(K=(U=n.value)!=null?U:n.defaultValue)!=null?K:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),i=Yl(()=>new Set),s=Yl(()=>new Map),c=Yl(()=>new Map),f=Yl(()=>new Set),h=qb(n),{label:p,children:m,value:v,onValueChange:b,filter:w,shouldFilter:S,loop:C,disablePointerSelection:E=!1,vimBindings:j=!0,...R}=n,L=Wn(),k=Wn(),H=Wn(),M=y.useRef(null),N=rj();Ir(()=>{if(v!==void 0){let U=v.trim();l.current.value=U,B.emit()}},[v]),Ir(()=>{N(6,de)},[]);let B=y.useMemo(()=>({subscribe:U=>(f.current.add(U),()=>f.current.delete(U)),snapshot:()=>l.current,setState:(U,K,P)=>{var oe,me,ve,Le;if(!Object.is(l.current[U],K)){if(l.current[U]=K,U==="search")fe(),ae(),N(1,re);else if(U==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Fe=document.getElementById(H);Fe?Fe.focus():(oe=document.getElementById(L))==null||oe.focus()}if(N(7,()=>{var Fe;l.current.selectedItemId=(Fe=Q())==null?void 0:Fe.id,B.emit()}),P||N(5,de),((me=h.current)==null?void 0:me.value)!==void 0){let Fe=K??"";(Le=(ve=h.current).onValueChange)==null||Le.call(ve,Fe);return}}B.emit()}},emit:()=>{f.current.forEach(U=>U())}}),[]),J=y.useMemo(()=>({value:(U,K,P)=>{var oe;K!==((oe=c.current.get(U))==null?void 0:oe.value)&&(c.current.set(U,{value:K,keywords:P}),l.current.filtered.items.set(U,te(K,P)),N(2,()=>{ae(),B.emit()}))},item:(U,K)=>(i.current.add(U),K&&(s.current.has(K)?s.current.get(K).add(U):s.current.set(K,new Set([U]))),N(3,()=>{fe(),ae(),l.current.value||re(),B.emit()}),()=>{c.current.delete(U),i.current.delete(U),l.current.filtered.items.delete(U);let P=Q();N(4,()=>{fe(),P?.getAttribute("id")===U&&re(),B.emit()})}),group:U=>(s.current.has(U)||s.current.set(U,new Set),()=>{c.current.delete(U),s.current.delete(U)}),filter:()=>h.current.shouldFilter,label:p||n["aria-label"],getDisablePointerSelection:()=>h.current.disablePointerSelection,listId:L,inputId:H,labelId:k,listInnerRef:M}),[]);function te(U,K){var P,oe;let me=(oe=(P=h.current)==null?void 0:P.filter)!=null?oe:KR;return U?me(U,l.current.search,K):0}function ae(){if(!l.current.search||h.current.shouldFilter===!1)return;let U=l.current.filtered.items,K=[];l.current.filtered.groups.forEach(oe=>{let me=s.current.get(oe),ve=0;me.forEach(Le=>{let Fe=U.get(Le);ve=Math.max(Fe,ve)}),K.push([oe,ve])});let P=M.current;ee().sort((oe,me)=>{var ve,Le;let Fe=oe.getAttribute("id"),Je=me.getAttribute("id");return((ve=U.get(Je))!=null?ve:0)-((Le=U.get(Fe))!=null?Le:0)}).forEach(oe=>{let me=oe.closest(wd);me?me.appendChild(oe.parentElement===me?oe:oe.closest(`${wd} > *`)):P.appendChild(oe.parentElement===P?oe:oe.closest(`${wd} > *`))}),K.sort((oe,me)=>me[1]-oe[1]).forEach(oe=>{var me;let ve=(me=M.current)==null?void 0:me.querySelector(`${so}[${Fl}="${encodeURIComponent(oe[0])}"]`);ve?.parentElement.appendChild(ve)})}function re(){let U=ee().find(P=>P.getAttribute("aria-disabled")!=="true"),K=U?.getAttribute(Fl);B.setState("value",K||void 0)}function fe(){var U,K,P,oe;if(!l.current.search||h.current.shouldFilter===!1){l.current.filtered.count=i.current.size;return}l.current.filtered.groups=new Set;let me=0;for(let ve of i.current){let Le=(K=(U=c.current.get(ve))==null?void 0:U.value)!=null?K:"",Fe=(oe=(P=c.current.get(ve))==null?void 0:P.keywords)!=null?oe:[],Je=te(Le,Fe);l.current.filtered.items.set(ve,Je),Je>0&&me++}for(let[ve,Le]of s.current)for(let Fe of Le)if(l.current.filtered.items.get(Fe)>0){l.current.filtered.groups.add(ve);break}l.current.filtered.count=me}function de(){var U,K,P;let oe=Q();oe&&(((U=oe.parentElement)==null?void 0:U.firstChild)===oe&&((P=(K=oe.closest(so))==null?void 0:K.querySelector(GR))==null||P.scrollIntoView({block:"nearest"})),oe.scrollIntoView({block:"nearest"}))}function Q(){var U;return(U=M.current)==null?void 0:U.querySelector(`${Pb}[aria-selected="true"]`)}function ee(){var U;return Array.from(((U=M.current)==null?void 0:U.querySelectorAll(Oy))||[])}function A(U){let K=ee()[U];K&&B.setState("value",K.getAttribute(Fl))}function X(U){var K;let P=Q(),oe=ee(),me=oe.findIndex(Le=>Le===P),ve=oe[me+U];(K=h.current)!=null&&K.loop&&(ve=me+U<0?oe[oe.length-1]:me+U===oe.length?oe[0]:oe[me+U]),ve&&B.setState("value",ve.getAttribute(Fl))}function V(U){let K=Q(),P=K?.closest(so),oe;for(;P&&!oe;)P=U>0?nj(P,so):aj(P,so),oe=P?.querySelector(Oy);oe?B.setState("value",oe.getAttribute(Fl)):X(U)}let ye=()=>A(ee().length-1),O=U=>{U.preventDefault(),U.metaKey?ye():U.altKey?V(1):X(1)},G=U=>{U.preventDefault(),U.metaKey?A(0):U.altKey?V(-1):X(-1)};return y.createElement(pt.div,{ref:a,tabIndex:-1,...R,"cmdk-root":"",onKeyDown:U=>{var K;(K=R.onKeyDown)==null||K.call(R,U);let P=U.nativeEvent.isComposing||U.keyCode===229;if(!(U.defaultPrevented||P))switch(U.key){case"n":case"j":{j&&U.ctrlKey&&O(U);break}case"ArrowDown":{O(U);break}case"p":case"k":{j&&U.ctrlKey&&G(U);break}case"ArrowUp":{G(U);break}case"Home":{U.preventDefault(),A(0);break}case"End":{U.preventDefault(),ye();break}case"Enter":{U.preventDefault();let oe=Q();if(oe){let me=new Event(Gd);oe.dispatchEvent(me)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:J.inputId,id:J.labelId,style:ij},p),zc(n,U=>y.createElement(Bb.Provider,{value:B},y.createElement(Hb.Provider,{value:J},U))))}),XR=y.forwardRef((n,a)=>{var l,i;let s=Wn(),c=y.useRef(null),f=y.useContext($b),h=Co(),p=qb(n),m=(i=(l=p.current)==null?void 0:l.forceMount)!=null?i:f?.forceMount;Ir(()=>{if(!m)return h.item(s,f?.id)},[m]);let v=Fb(s,c,[n.value,n.children,c],n.keywords),b=Sh(),w=dr(N=>N.value&&N.value===v.current),S=dr(N=>m||h.filter()===!1?!0:N.search?N.filtered.items.get(s)>0:!0);y.useEffect(()=>{let N=c.current;if(!(!N||n.disabled))return N.addEventListener(Gd,C),()=>N.removeEventListener(Gd,C)},[S,n.onSelect,n.disabled]);function C(){var N,B;E(),(B=(N=p.current).onSelect)==null||B.call(N,v.current)}function E(){b.setState("value",v.current,!0)}if(!S)return null;let{disabled:j,value:R,onSelect:L,forceMount:k,keywords:H,...M}=n;return y.createElement(pt.div,{ref:Gr(c,a),...M,id:s,"cmdk-item":"",role:"option","aria-disabled":!!j,"aria-selected":!!w,"data-disabled":!!j,"data-selected":!!w,onPointerMove:j||h.getDisablePointerSelection()?void 0:E,onClick:j?void 0:C},n.children)}),QR=y.forwardRef((n,a)=>{let{heading:l,children:i,forceMount:s,...c}=n,f=Wn(),h=y.useRef(null),p=y.useRef(null),m=Wn(),v=Co(),b=dr(S=>s||v.filter()===!1?!0:S.search?S.filtered.groups.has(f):!0);Ir(()=>v.group(f),[]),Fb(f,h,[n.value,n.heading,p]);let w=y.useMemo(()=>({id:f,forceMount:s}),[s]);return y.createElement(pt.div,{ref:Gr(h,a),...c,"cmdk-group":"",role:"presentation",hidden:b?void 0:!0},l&&y.createElement("div",{ref:p,"cmdk-group-heading":"","aria-hidden":!0,id:m},l),zc(n,S=>y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":l?m:void 0},y.createElement($b.Provider,{value:w},S))))}),IR=y.forwardRef((n,a)=>{let{alwaysRender:l,...i}=n,s=y.useRef(null),c=dr(f=>!f.search);return!l&&!c?null:y.createElement(pt.div,{ref:Gr(s,a),...i,"cmdk-separator":"",role:"separator"})}),ZR=y.forwardRef((n,a)=>{let{onValueChange:l,...i}=n,s=n.value!=null,c=Sh(),f=dr(m=>m.search),h=dr(m=>m.selectedItemId),p=Co();return y.useEffect(()=>{n.value!=null&&c.setState("search",n.value)},[n.value]),y.createElement(pt.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||c.setState("search",m.target.value),l?.(m.target.value)}})}),JR=y.forwardRef((n,a)=>{let{children:l,label:i="Suggestions",...s}=n,c=y.useRef(null),f=y.useRef(null),h=dr(m=>m.selectedItemId),p=Co();return y.useEffect(()=>{if(f.current&&c.current){let m=f.current,v=c.current,b,w=new ResizeObserver(()=>{b=requestAnimationFrame(()=>{let S=m.offsetHeight;v.style.setProperty("--cmdk-list-height",S.toFixed(1)+"px")})});return w.observe(m),()=>{cancelAnimationFrame(b),w.unobserve(m)}}},[]),y.createElement(pt.div,{ref:Gr(c,a),...s,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":h,"aria-label":i,id:p.listId},zc(n,m=>y.createElement("div",{ref:Gr(f,p.listInnerRef),"cmdk-list-sizer":""},m)))}),WR=y.forwardRef((n,a)=>{let{open:l,onOpenChange:i,overlayClassName:s,contentClassName:c,container:f,...h}=n;return y.createElement(lb,{open:l,onOpenChange:i},y.createElement(ib,{container:f},y.createElement(vh,{"cmdk-overlay":"",className:s}),y.createElement(yh,{"aria-label":n.label,"cmdk-dialog":"",className:c},y.createElement(Vb,{ref:a,...h}))))}),ej=y.forwardRef((n,a)=>dr(l=>l.filtered.count===0)?y.createElement(pt.div,{ref:a,...n,"cmdk-empty":"",role:"presentation"}):null),tj=y.forwardRef((n,a)=>{let{progress:l,children:i,label:s="Loading...",...c}=n;return y.createElement(pt.div,{ref:a,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":l,"aria-valuemin":0,"aria-valuemax":100,"aria-label":s},zc(n,f=>y.createElement("div",{"aria-hidden":!0},f)))}),ai=Object.assign(Vb,{List:JR,Item:XR,Input:ZR,Group:QR,Separator:IR,Dialog:WR,Empty:ej,Loading:tj});function nj(n,a){let l=n.nextElementSibling;for(;l;){if(l.matches(a))return l;l=l.nextElementSibling}}function aj(n,a){let l=n.previousElementSibling;for(;l;){if(l.matches(a))return l;l=l.previousElementSibling}}function qb(n){let a=y.useRef(n);return Ir(()=>{a.current=n}),a}var Ir=typeof window>"u"?y.useEffect:y.useLayoutEffect;function Yl(n){let a=y.useRef();return a.current===void 0&&(a.current=n()),a}function dr(n){let a=Sh(),l=()=>n(a.snapshot());return y.useSyncExternalStore(a.subscribe,l,l)}function Fb(n,a,l,i=[]){let s=y.useRef(),c=Co();return Ir(()=>{var f;let h=(()=>{var m;for(let v of l){if(typeof v=="string")return v.trim();if(typeof v=="object"&&"current"in v)return v.current?(m=v.current.textContent)==null?void 0:m.trim():s.current}})(),p=i.map(m=>m.trim());c.value(n,h,p),(f=a.current)==null||f.setAttribute(Fl,h),s.current=h}),s}var rj=()=>{let[n,a]=y.useState(),l=Yl(()=>new Map);return Ir(()=>{l.current.forEach(i=>i()),l.current=new Map},[n]),(i,s)=>{l.current.set(i,s),a({})}};function lj(n){let a=n.type;return typeof a=="function"?a(n.props):"render"in a?a.render(n.props):n}function zc({asChild:n,children:a},l){return n&&y.isValidElement(a)?y.cloneElement(lj(a),{ref:a.ref},l(a.props.children)):l(a)}var ij={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Yb({className:n,...a}){return g.jsx(ai,{"data-slot":"command",className:dt("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",n),...a})}function Gb({className:n,...a}){return g.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[g.jsx(mb,{className:"size-4 shrink-0 opacity-50"}),g.jsx(ai.Input,{"data-slot":"command-input",className:dt("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 Kb({className:n,...a}){return g.jsx(ai.List,{"data-slot":"command-list",className:dt("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",n),...a})}function Xb({...n}){return g.jsx(ai.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...n})}function Qb({className:n,...a}){return g.jsx(ai.Group,{"data-slot":"command-group",className:dt("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 Ib({className:n,...a}){return g.jsx(ai.Item,{"data-slot":"command-item",className:dt("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 oj=["top","right","bottom","left"],hr=Math.min,pn=Math.max,yc=Math.round,ec=Math.floor,ea=n=>({x:n,y:n}),sj={left:"right",right:"left",bottom:"top",top:"bottom"},cj={start:"end",end:"start"};function Kd(n,a,l){return pn(n,hr(a,l))}function _a(n,a){return typeof n=="function"?n(a):n}function Ea(n){return n.split("-")[0]}function ri(n){return n.split("-")[1]}function _h(n){return n==="x"?"y":"x"}function Eh(n){return n==="y"?"height":"width"}const uj=new Set(["top","bottom"]);function Zn(n){return uj.has(Ea(n))?"y":"x"}function Ch(n){return _h(Zn(n))}function fj(n,a,l){l===void 0&&(l=!1);const i=ri(n),s=Ch(n),c=Eh(s);let f=s==="x"?i===(l?"end":"start")?"right":"left":i==="start"?"bottom":"top";return a.reference[c]>a.floating[c]&&(f=bc(f)),[f,bc(f)]}function dj(n){const a=bc(n);return[Xd(n),a,Xd(a)]}function Xd(n){return n.replace(/start|end/g,a=>cj[a])}const Ay=["left","right"],Ty=["right","left"],hj=["top","bottom"],mj=["bottom","top"];function pj(n,a,l){switch(n){case"top":case"bottom":return l?a?Ty:Ay:a?Ay:Ty;case"left":case"right":return a?hj:mj;default:return[]}}function gj(n,a,l,i){const s=ri(n);let c=pj(Ea(n),l==="start",i);return s&&(c=c.map(f=>f+"-"+s),a&&(c=c.concat(c.map(Xd)))),c}function bc(n){return n.replace(/left|right|bottom|top/g,a=>sj[a])}function vj(n){return{top:0,right:0,bottom:0,left:0,...n}}function Zb(n){return typeof n!="number"?vj(n):{top:n,right:n,bottom:n,left:n}}function xc(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 My(n,a,l){let{reference:i,floating:s}=n;const c=Zn(a),f=Ch(a),h=Eh(f),p=Ea(a),m=c==="y",v=i.x+i.width/2-s.width/2,b=i.y+i.height/2-s.height/2,w=i[h]/2-s[h]/2;let S;switch(p){case"top":S={x:v,y:i.y-s.height};break;case"bottom":S={x:v,y:i.y+i.height};break;case"right":S={x:i.x+i.width,y:b};break;case"left":S={x:i.x-s.width,y:b};break;default:S={x:i.x,y:i.y}}switch(ri(a)){case"start":S[f]-=w*(l&&m?-1:1);break;case"end":S[f]+=w*(l&&m?-1:1);break}return S}const yj=async(n,a,l)=>{const{placement:i="bottom",strategy:s="absolute",middleware:c=[],platform:f}=l,h=c.filter(Boolean),p=await(f.isRTL==null?void 0:f.isRTL(a));let m=await f.getElementRects({reference:n,floating:a,strategy:s}),{x:v,y:b}=My(m,i,p),w=i,S={},C=0;for(let E=0;E<h.length;E++){const{name:j,fn:R}=h[E],{x:L,y:k,data:H,reset:M}=await R({x:v,y:b,initialPlacement:i,placement:w,strategy:s,middlewareData:S,rects:m,platform:f,elements:{reference:n,floating:a}});v=L??v,b=k??b,S={...S,[j]:{...S[j],...H}},M&&C<=50&&(C++,typeof M=="object"&&(M.placement&&(w=M.placement),M.rects&&(m=M.rects===!0?await f.getElementRects({reference:n,floating:a,strategy:s}):M.rects),{x:v,y:b}=My(m,w,p)),E=-1)}return{x:v,y:b,placement:w,strategy:s,middlewareData:S}};async function bo(n,a){var l;a===void 0&&(a={});const{x:i,y:s,platform:c,rects:f,elements:h,strategy:p}=n,{boundary:m="clippingAncestors",rootBoundary:v="viewport",elementContext:b="floating",altBoundary:w=!1,padding:S=0}=_a(a,n),C=Zb(S),j=h[w?b==="floating"?"reference":"floating":b],R=xc(await c.getClippingRect({element:(l=await(c.isElement==null?void 0:c.isElement(j)))==null||l?j:j.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(h.floating)),boundary:m,rootBoundary:v,strategy:p})),L=b==="floating"?{x:i,y:s,width:f.floating.width,height:f.floating.height}:f.reference,k=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h.floating)),H=await(c.isElement==null?void 0:c.isElement(k))?await(c.getScale==null?void 0:c.getScale(k))||{x:1,y:1}:{x:1,y:1},M=xc(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:L,offsetParent:k,strategy:p}):L);return{top:(R.top-M.top+C.top)/H.y,bottom:(M.bottom-R.bottom+C.bottom)/H.y,left:(R.left-M.left+C.left)/H.x,right:(M.right-R.right+C.right)/H.x}}const bj=n=>({name:"arrow",options:n,async fn(a){const{x:l,y:i,placement:s,rects:c,platform:f,elements:h,middlewareData:p}=a,{element:m,padding:v=0}=_a(n,a)||{};if(m==null)return{};const b=Zb(v),w={x:l,y:i},S=Ch(s),C=Eh(S),E=await f.getDimensions(m),j=S==="y",R=j?"top":"left",L=j?"bottom":"right",k=j?"clientHeight":"clientWidth",H=c.reference[C]+c.reference[S]-w[S]-c.floating[C],M=w[S]-c.reference[S],N=await(f.getOffsetParent==null?void 0:f.getOffsetParent(m));let B=N?N[k]:0;(!B||!await(f.isElement==null?void 0:f.isElement(N)))&&(B=h.floating[k]||c.floating[C]);const J=H/2-M/2,te=B/2-E[C]/2-1,ae=hr(b[R],te),re=hr(b[L],te),fe=ae,de=B-E[C]-re,Q=B/2-E[C]/2+J,ee=Kd(fe,Q,de),A=!p.arrow&&ri(s)!=null&&Q!==ee&&c.reference[C]/2-(Q<fe?ae:re)-E[C]/2<0,X=A?Q<fe?Q-fe:Q-de:0;return{[S]:w[S]+X,data:{[S]:ee,centerOffset:Q-ee-X,...A&&{alignmentOffset:X}},reset:A}}}),xj=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(a){var l,i;const{placement:s,middlewareData:c,rects:f,initialPlacement:h,platform:p,elements:m}=a,{mainAxis:v=!0,crossAxis:b=!0,fallbackPlacements:w,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:E=!0,...j}=_a(n,a);if((l=c.arrow)!=null&&l.alignmentOffset)return{};const R=Ea(s),L=Zn(h),k=Ea(h)===h,H=await(p.isRTL==null?void 0:p.isRTL(m.floating)),M=w||(k||!E?[bc(h)]:dj(h)),N=C!=="none";!w&&N&&M.push(...gj(h,E,C,H));const B=[h,...M],J=await bo(a,j),te=[];let ae=((i=c.flip)==null?void 0:i.overflows)||[];if(v&&te.push(J[R]),b){const Q=fj(s,f,H);te.push(J[Q[0]],J[Q[1]])}if(ae=[...ae,{placement:s,overflows:te}],!te.every(Q=>Q<=0)){var re,fe;const Q=(((re=c.flip)==null?void 0:re.index)||0)+1,ee=B[Q];if(ee&&(!(b==="alignment"?L!==Zn(ee):!1)||ae.every(V=>V.overflows[0]>0&&Zn(V.placement)===L)))return{data:{index:Q,overflows:ae},reset:{placement:ee}};let A=(fe=ae.filter(X=>X.overflows[0]<=0).sort((X,V)=>X.overflows[1]-V.overflows[1])[0])==null?void 0:fe.placement;if(!A)switch(S){case"bestFit":{var de;const X=(de=ae.filter(V=>{if(N){const ye=Zn(V.placement);return ye===L||ye==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(ye=>ye>0).reduce((ye,O)=>ye+O,0)]).sort((V,ye)=>V[1]-ye[1])[0])==null?void 0:de[0];X&&(A=X);break}case"initialPlacement":A=h;break}if(s!==A)return{reset:{placement:A}}}return{}}}};function Dy(n,a){return{top:n.top-a.height,right:n.right-a.width,bottom:n.bottom-a.height,left:n.left-a.width}}function Ly(n){return oj.some(a=>n[a]>=0)}const wj=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(a){const{rects:l}=a,{strategy:i="referenceHidden",...s}=_a(n,a);switch(i){case"referenceHidden":{const c=await bo(a,{...s,elementContext:"reference"}),f=Dy(c,l.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:Ly(f)}}}case"escaped":{const c=await bo(a,{...s,altBoundary:!0}),f=Dy(c,l.floating);return{data:{escapedOffsets:f,escaped:Ly(f)}}}default:return{}}}}},Jb=new Set(["left","top"]);async function Sj(n,a){const{placement:l,platform:i,elements:s}=n,c=await(i.isRTL==null?void 0:i.isRTL(s.floating)),f=Ea(l),h=ri(l),p=Zn(l)==="y",m=Jb.has(f)?-1:1,v=c&&p?-1:1,b=_a(a,n);let{mainAxis:w,crossAxis:S,alignmentAxis:C}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return h&&typeof C=="number"&&(S=h==="end"?C*-1:C),p?{x:S*v,y:w*m}:{x:w*m,y:S*v}}const _j=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(a){var l,i;const{x:s,y:c,placement:f,middlewareData:h}=a,p=await Sj(a,n);return f===((l=h.offset)==null?void 0:l.placement)&&(i=h.arrow)!=null&&i.alignmentOffset?{}:{x:s+p.x,y:c+p.y,data:{...p,placement:f}}}}},Ej=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(a){const{x:l,y:i,placement:s}=a,{mainAxis:c=!0,crossAxis:f=!1,limiter:h={fn:j=>{let{x:R,y:L}=j;return{x:R,y:L}}},...p}=_a(n,a),m={x:l,y:i},v=await bo(a,p),b=Zn(Ea(s)),w=_h(b);let S=m[w],C=m[b];if(c){const j=w==="y"?"top":"left",R=w==="y"?"bottom":"right",L=S+v[j],k=S-v[R];S=Kd(L,S,k)}if(f){const j=b==="y"?"top":"left",R=b==="y"?"bottom":"right",L=C+v[j],k=C-v[R];C=Kd(L,C,k)}const E=h.fn({...a,[w]:S,[b]:C});return{...E,data:{x:E.x-l,y:E.y-i,enabled:{[w]:c,[b]:f}}}}}},Cj=function(n){return n===void 0&&(n={}),{options:n,fn(a){const{x:l,y:i,placement:s,rects:c,middlewareData:f}=a,{offset:h=0,mainAxis:p=!0,crossAxis:m=!0}=_a(n,a),v={x:l,y:i},b=Zn(s),w=_h(b);let S=v[w],C=v[b];const E=_a(h,a),j=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(p){const k=w==="y"?"height":"width",H=c.reference[w]-c.floating[k]+j.mainAxis,M=c.reference[w]+c.reference[k]-j.mainAxis;S<H?S=H:S>M&&(S=M)}if(m){var R,L;const k=w==="y"?"width":"height",H=Jb.has(Ea(s)),M=c.reference[b]-c.floating[k]+(H&&((R=f.offset)==null?void 0:R[b])||0)+(H?0:j.crossAxis),N=c.reference[b]+c.reference[k]+(H?0:((L=f.offset)==null?void 0:L[b])||0)-(H?j.crossAxis:0);C<M?C=M:C>N&&(C=N)}return{[w]:S,[b]:C}}}},Nj=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(a){var l,i;const{placement:s,rects:c,platform:f,elements:h}=a,{apply:p=()=>{},...m}=_a(n,a),v=await bo(a,m),b=Ea(s),w=ri(s),S=Zn(s)==="y",{width:C,height:E}=c.floating;let j,R;b==="top"||b==="bottom"?(j=b,R=w===(await(f.isRTL==null?void 0:f.isRTL(h.floating))?"start":"end")?"left":"right"):(R=b,j=w==="end"?"top":"bottom");const L=E-v.top-v.bottom,k=C-v.left-v.right,H=hr(E-v[j],L),M=hr(C-v[R],k),N=!a.middlewareData.shift;let B=H,J=M;if((l=a.middlewareData.shift)!=null&&l.enabled.x&&(J=k),(i=a.middlewareData.shift)!=null&&i.enabled.y&&(B=L),N&&!w){const ae=pn(v.left,0),re=pn(v.right,0),fe=pn(v.top,0),de=pn(v.bottom,0);S?J=C-2*(ae!==0||re!==0?ae+re:pn(v.left,v.right)):B=E-2*(fe!==0||de!==0?fe+de:pn(v.top,v.bottom))}await p({...a,availableWidth:J,availableHeight:B});const te=await f.getDimensions(h.floating);return C!==te.width||E!==te.height?{reset:{rects:!0}}:{}}}};function Uc(){return typeof window<"u"}function li(n){return Wb(n)?(n.nodeName||"").toLowerCase():"#document"}function gn(n){var a;return(n==null||(a=n.ownerDocument)==null?void 0:a.defaultView)||window}function aa(n){var a;return(a=(Wb(n)?n.ownerDocument:n.document)||window.document)==null?void 0:a.documentElement}function Wb(n){return Uc()?n instanceof Node||n instanceof gn(n).Node:!1}function zn(n){return Uc()?n instanceof Element||n instanceof gn(n).Element:!1}function ta(n){return Uc()?n instanceof HTMLElement||n instanceof gn(n).HTMLElement:!1}function ky(n){return!Uc()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof gn(n).ShadowRoot}const Rj=new Set(["inline","contents"]);function No(n){const{overflow:a,overflowX:l,overflowY:i,display:s}=Un(n);return/auto|scroll|overlay|hidden|clip/.test(a+i+l)&&!Rj.has(s)}const jj=new Set(["table","td","th"]);function Oj(n){return jj.has(li(n))}const Aj=[":popover-open",":modal"];function Pc(n){return Aj.some(a=>{try{return n.matches(a)}catch{return!1}})}const Tj=["transform","translate","scale","rotate","perspective"],Mj=["transform","translate","scale","rotate","perspective","filter"],Dj=["paint","layout","strict","content"];function Nh(n){const a=Rh(),l=zn(n)?Un(n):n;return Tj.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)||Mj.some(i=>(l.willChange||"").includes(i))||Dj.some(i=>(l.contain||"").includes(i))}function Lj(n){let a=mr(n);for(;ta(a)&&!Zl(a);){if(Nh(a))return a;if(Pc(a))return null;a=mr(a)}return null}function Rh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const kj=new Set(["html","body","#document"]);function Zl(n){return kj.has(li(n))}function Un(n){return gn(n).getComputedStyle(n)}function Hc(n){return zn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function mr(n){if(li(n)==="html")return n;const a=n.assignedSlot||n.parentNode||ky(n)&&n.host||aa(n);return ky(a)?a.host:a}function ex(n){const a=mr(n);return Zl(a)?n.ownerDocument?n.ownerDocument.body:n.body:ta(a)&&No(a)?a:ex(a)}function xo(n,a,l){var i;a===void 0&&(a=[]),l===void 0&&(l=!0);const s=ex(n),c=s===((i=n.ownerDocument)==null?void 0:i.body),f=gn(s);if(c){const h=Qd(f);return a.concat(f,f.visualViewport||[],No(s)?s:[],h&&l?xo(h):[])}return a.concat(s,xo(s,[],l))}function Qd(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function tx(n){const a=Un(n);let l=parseFloat(a.width)||0,i=parseFloat(a.height)||0;const s=ta(n),c=s?n.offsetWidth:l,f=s?n.offsetHeight:i,h=yc(l)!==c||yc(i)!==f;return h&&(l=c,i=f),{width:l,height:i,$:h}}function jh(n){return zn(n)?n:n.contextElement}function Ql(n){const a=jh(n);if(!ta(a))return ea(1);const l=a.getBoundingClientRect(),{width:i,height:s,$:c}=tx(a);let f=(c?yc(l.width):l.width)/i,h=(c?yc(l.height):l.height)/s;return(!f||!Number.isFinite(f))&&(f=1),(!h||!Number.isFinite(h))&&(h=1),{x:f,y:h}}const zj=ea(0);function nx(n){const a=gn(n);return!Rh()||!a.visualViewport?zj:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function Uj(n,a,l){return a===void 0&&(a=!1),!l||a&&l!==gn(n)?!1:a}function Zr(n,a,l,i){a===void 0&&(a=!1),l===void 0&&(l=!1);const s=n.getBoundingClientRect(),c=jh(n);let f=ea(1);a&&(i?zn(i)&&(f=Ql(i)):f=Ql(n));const h=Uj(c,l,i)?nx(c):ea(0);let p=(s.left+h.x)/f.x,m=(s.top+h.y)/f.y,v=s.width/f.x,b=s.height/f.y;if(c){const w=gn(c),S=i&&zn(i)?gn(i):i;let C=w,E=Qd(C);for(;E&&i&&S!==C;){const j=Ql(E),R=E.getBoundingClientRect(),L=Un(E),k=R.left+(E.clientLeft+parseFloat(L.paddingLeft))*j.x,H=R.top+(E.clientTop+parseFloat(L.paddingTop))*j.y;p*=j.x,m*=j.y,v*=j.x,b*=j.y,p+=k,m+=H,C=gn(E),E=Qd(C)}}return xc({width:v,height:b,x:p,y:m})}function Oh(n,a){const l=Hc(n).scrollLeft;return a?a.left+l:Zr(aa(n)).left+l}function ax(n,a,l){l===void 0&&(l=!1);const i=n.getBoundingClientRect(),s=i.left+a.scrollLeft-(l?0:Oh(n,i)),c=i.top+a.scrollTop;return{x:s,y:c}}function Pj(n){let{elements:a,rect:l,offsetParent:i,strategy:s}=n;const c=s==="fixed",f=aa(i),h=a?Pc(a.floating):!1;if(i===f||h&&c)return l;let p={scrollLeft:0,scrollTop:0},m=ea(1);const v=ea(0),b=ta(i);if((b||!b&&!c)&&((li(i)!=="body"||No(f))&&(p=Hc(i)),ta(i))){const S=Zr(i);m=Ql(i),v.x=S.x+i.clientLeft,v.y=S.y+i.clientTop}const w=f&&!b&&!c?ax(f,p,!0):ea(0);return{width:l.width*m.x,height:l.height*m.y,x:l.x*m.x-p.scrollLeft*m.x+v.x+w.x,y:l.y*m.y-p.scrollTop*m.y+v.y+w.y}}function Hj(n){return Array.from(n.getClientRects())}function Bj(n){const a=aa(n),l=Hc(n),i=n.ownerDocument.body,s=pn(a.scrollWidth,a.clientWidth,i.scrollWidth,i.clientWidth),c=pn(a.scrollHeight,a.clientHeight,i.scrollHeight,i.clientHeight);let f=-l.scrollLeft+Oh(n);const h=-l.scrollTop;return Un(i).direction==="rtl"&&(f+=pn(a.clientWidth,i.clientWidth)-s),{width:s,height:c,x:f,y:h}}function $j(n,a){const l=gn(n),i=aa(n),s=l.visualViewport;let c=i.clientWidth,f=i.clientHeight,h=0,p=0;if(s){c=s.width,f=s.height;const m=Rh();(!m||m&&a==="fixed")&&(h=s.offsetLeft,p=s.offsetTop)}return{width:c,height:f,x:h,y:p}}const Vj=new Set(["absolute","fixed"]);function qj(n,a){const l=Zr(n,!0,a==="fixed"),i=l.top+n.clientTop,s=l.left+n.clientLeft,c=ta(n)?Ql(n):ea(1),f=n.clientWidth*c.x,h=n.clientHeight*c.y,p=s*c.x,m=i*c.y;return{width:f,height:h,x:p,y:m}}function zy(n,a,l){let i;if(a==="viewport")i=$j(n,l);else if(a==="document")i=Bj(aa(n));else if(zn(a))i=qj(a,l);else{const s=nx(n);i={x:a.x-s.x,y:a.y-s.y,width:a.width,height:a.height}}return xc(i)}function rx(n,a){const l=mr(n);return l===a||!zn(l)||Zl(l)?!1:Un(l).position==="fixed"||rx(l,a)}function Fj(n,a){const l=a.get(n);if(l)return l;let i=xo(n,[],!1).filter(h=>zn(h)&&li(h)!=="body"),s=null;const c=Un(n).position==="fixed";let f=c?mr(n):n;for(;zn(f)&&!Zl(f);){const h=Un(f),p=Nh(f);!p&&h.position==="fixed"&&(s=null),(c?!p&&!s:!p&&h.position==="static"&&!!s&&Vj.has(s.position)||No(f)&&!p&&rx(n,f))?i=i.filter(v=>v!==f):s=h,f=mr(f)}return a.set(n,i),i}function Yj(n){let{element:a,boundary:l,rootBoundary:i,strategy:s}=n;const f=[...l==="clippingAncestors"?Pc(a)?[]:Fj(a,this._c):[].concat(l),i],h=f[0],p=f.reduce((m,v)=>{const b=zy(a,v,s);return m.top=pn(b.top,m.top),m.right=hr(b.right,m.right),m.bottom=hr(b.bottom,m.bottom),m.left=pn(b.left,m.left),m},zy(a,h,s));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}function Gj(n){const{width:a,height:l}=tx(n);return{width:a,height:l}}function Kj(n,a,l){const i=ta(a),s=aa(a),c=l==="fixed",f=Zr(n,!0,c,a);let h={scrollLeft:0,scrollTop:0};const p=ea(0);function m(){p.x=Oh(s)}if(i||!i&&!c)if((li(a)!=="body"||No(s))&&(h=Hc(a)),i){const S=Zr(a,!0,c,a);p.x=S.x+a.clientLeft,p.y=S.y+a.clientTop}else s&&m();c&&!i&&s&&m();const v=s&&!i&&!c?ax(s,h):ea(0),b=f.left+h.scrollLeft-p.x-v.x,w=f.top+h.scrollTop-p.y-v.y;return{x:b,y:w,width:f.width,height:f.height}}function Sd(n){return Un(n).position==="static"}function Uy(n,a){if(!ta(n)||Un(n).position==="fixed")return null;if(a)return a(n);let l=n.offsetParent;return aa(n)===l&&(l=l.ownerDocument.body),l}function lx(n,a){const l=gn(n);if(Pc(n))return l;if(!ta(n)){let s=mr(n);for(;s&&!Zl(s);){if(zn(s)&&!Sd(s))return s;s=mr(s)}return l}let i=Uy(n,a);for(;i&&Oj(i)&&Sd(i);)i=Uy(i,a);return i&&Zl(i)&&Sd(i)&&!Nh(i)?l:i||Lj(n)||l}const Xj=async function(n){const a=this.getOffsetParent||lx,l=this.getDimensions,i=await l(n.floating);return{reference:Kj(n.reference,await a(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Qj(n){return Un(n).direction==="rtl"}const Ij={convertOffsetParentRelativeRectToViewportRelativeRect:Pj,getDocumentElement:aa,getClippingRect:Yj,getOffsetParent:lx,getElementRects:Xj,getClientRects:Hj,getDimensions:Gj,getScale:Ql,isElement:zn,isRTL:Qj};function ix(n,a){return n.x===a.x&&n.y===a.y&&n.width===a.width&&n.height===a.height}function Zj(n,a){let l=null,i;const s=aa(n);function c(){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),c();const m=n.getBoundingClientRect(),{left:v,top:b,width:w,height:S}=m;if(h||a(),!w||!S)return;const C=ec(b),E=ec(s.clientWidth-(v+w)),j=ec(s.clientHeight-(b+S)),R=ec(v),k={rootMargin:-C+"px "+-E+"px "+-j+"px "+-R+"px",threshold:pn(0,hr(1,p))||1};let H=!0;function M(N){const B=N[0].intersectionRatio;if(B!==p){if(!H)return f();B?f(!1,B):i=setTimeout(()=>{f(!1,1e-7)},1e3)}B===1&&!ix(m,n.getBoundingClientRect())&&f(),H=!1}try{l=new IntersectionObserver(M,{...k,root:s.ownerDocument})}catch{l=new IntersectionObserver(M,k)}l.observe(n)}return f(!0),c}function Jj(n,a,l,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:c=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:p=!1}=i,m=jh(n),v=s||c?[...m?xo(m):[],...xo(a)]:[];v.forEach(R=>{s&&R.addEventListener("scroll",l,{passive:!0}),c&&R.addEventListener("resize",l)});const b=m&&h?Zj(m,l):null;let w=-1,S=null;f&&(S=new ResizeObserver(R=>{let[L]=R;L&&L.target===m&&S&&(S.unobserve(a),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var k;(k=S)==null||k.observe(a)})),l()}),m&&!p&&S.observe(m),S.observe(a));let C,E=p?Zr(n):null;p&&j();function j(){const R=Zr(n);E&&!ix(E,R)&&l(),E=R,C=requestAnimationFrame(j)}return l(),()=>{var R;v.forEach(L=>{s&&L.removeEventListener("scroll",l),c&&L.removeEventListener("resize",l)}),b?.(),(R=S)==null||R.disconnect(),S=null,p&&cancelAnimationFrame(C)}}const Wj=_j,eO=Ej,tO=xj,nO=Nj,aO=wj,Py=bj,rO=Cj,lO=(n,a,l)=>{const i=new Map,s={platform:Ij,...l},c={...s.platform,_c:i};return yj(n,a,{...s,platform:c})};var iO=typeof document<"u",oO=function(){},uc=iO?y.useLayoutEffect:oO;function wc(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(!wc(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 c=s[i];if(!(c==="_owner"&&n.$$typeof)&&!wc(n[c],a[c]))return!1}return!0}return n!==n&&a!==a}function ox(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Hy(n,a){const l=ox(n);return Math.round(a*l)/l}function _d(n){const a=y.useRef(n);return uc(()=>{a.current=n}),a}function sO(n){n===void 0&&(n={});const{placement:a="bottom",strategy:l="absolute",middleware:i=[],platform:s,elements:{reference:c,floating:f}={},transform:h=!0,whileElementsMounted:p,open:m}=n,[v,b]=y.useState({x:0,y:0,strategy:l,placement:a,middlewareData:{},isPositioned:!1}),[w,S]=y.useState(i);wc(w,i)||S(i);const[C,E]=y.useState(null),[j,R]=y.useState(null),L=y.useCallback(V=>{V!==N.current&&(N.current=V,E(V))},[]),k=y.useCallback(V=>{V!==B.current&&(B.current=V,R(V))},[]),H=c||C,M=f||j,N=y.useRef(null),B=y.useRef(null),J=y.useRef(v),te=p!=null,ae=_d(p),re=_d(s),fe=_d(m),de=y.useCallback(()=>{if(!N.current||!B.current)return;const V={placement:a,strategy:l,middleware:w};re.current&&(V.platform=re.current),lO(N.current,B.current,V).then(ye=>{const O={...ye,isPositioned:fe.current!==!1};Q.current&&!wc(J.current,O)&&(J.current=O,Oc.flushSync(()=>{b(O)}))})},[w,a,l,re,fe]);uc(()=>{m===!1&&J.current.isPositioned&&(J.current.isPositioned=!1,b(V=>({...V,isPositioned:!1})))},[m]);const Q=y.useRef(!1);uc(()=>(Q.current=!0,()=>{Q.current=!1}),[]),uc(()=>{if(H&&(N.current=H),M&&(B.current=M),H&&M){if(ae.current)return ae.current(H,M,de);de()}},[H,M,de,ae,te]);const ee=y.useMemo(()=>({reference:N,floating:B,setReference:L,setFloating:k}),[L,k]),A=y.useMemo(()=>({reference:H,floating:M}),[H,M]),X=y.useMemo(()=>{const V={position:l,left:0,top:0};if(!A.floating)return V;const ye=Hy(A.floating,v.x),O=Hy(A.floating,v.y);return h?{...V,transform:"translate("+ye+"px, "+O+"px)",...ox(A.floating)>=1.5&&{willChange:"transform"}}:{position:l,left:ye,top:O}},[l,h,A.floating,v.x,v.y]);return y.useMemo(()=>({...v,update:de,refs:ee,elements:A,floatingStyles:X}),[v,de,ee,A,X])}const cO=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?Py({element:i.current,padding:s}).fn(l):{}:i?Py({element:i,padding:s}).fn(l):{}}}},uO=(n,a)=>({...Wj(n),options:[n,a]}),fO=(n,a)=>({...eO(n),options:[n,a]}),dO=(n,a)=>({...rO(n),options:[n,a]}),hO=(n,a)=>({...tO(n),options:[n,a]}),mO=(n,a)=>({...nO(n),options:[n,a]}),pO=(n,a)=>({...aO(n),options:[n,a]}),gO=(n,a)=>({...cO(n),options:[n,a]});var vO="Arrow",sx=y.forwardRef((n,a)=>{const{children:l,width:i=10,height:s=5,...c}=n;return g.jsx(pt.svg,{...c,ref:a,width:i,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?l:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});sx.displayName=vO;var yO=sx,Ah="Popper",[cx,ux]=Ac(Ah),[bO,fx]=cx(Ah),dx=n=>{const{__scopePopper:a,children:l}=n,[i,s]=y.useState(null);return g.jsx(bO,{scope:a,anchor:i,onAnchorChange:s,children:l})};dx.displayName=Ah;var hx="PopperAnchor",mx=y.forwardRef((n,a)=>{const{__scopePopper:l,virtualRef:i,...s}=n,c=fx(hx,l),f=y.useRef(null),h=vn(a,f);return y.useEffect(()=>{c.onAnchorChange(i?.current||f.current)}),i?null:g.jsx(pt.div,{...s,ref:h})});mx.displayName=hx;var Th="PopperContent",[xO,wO]=cx(Th),px=y.forwardRef((n,a)=>{const{__scopePopper:l,side:i="bottom",sideOffset:s=0,align:c="center",alignOffset:f=0,arrowPadding:h=0,avoidCollisions:p=!0,collisionBoundary:m=[],collisionPadding:v=0,sticky:b="partial",hideWhenDetached:w=!1,updatePositionStrategy:S="optimized",onPlaced:C,...E}=n,j=fx(Th,l),[R,L]=y.useState(null),k=vn(a,ve=>L(ve)),[H,M]=y.useState(null),N=Ab(H),B=N?.width??0,J=N?.height??0,te=i+(c!=="center"?"-"+c:""),ae=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},re=Array.isArray(m)?m:[m],fe=re.length>0,de={padding:ae,boundary:re.filter(_O),altBoundary:fe},{refs:Q,floatingStyles:ee,placement:A,isPositioned:X,middlewareData:V}=sO({strategy:"fixed",placement:te,whileElementsMounted:(...ve)=>Jj(...ve,{animationFrame:S==="always"}),elements:{reference:j.anchor},middleware:[uO({mainAxis:s+J,alignmentAxis:f}),p&&fO({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?dO():void 0,...de}),p&&hO({...de}),mO({...de,apply:({elements:ve,rects:Le,availableWidth:Fe,availableHeight:Je})=>{const{width:Tt,height:Ze}=Le.reference,an=ve.floating.style;an.setProperty("--radix-popper-available-width",`${Fe}px`),an.setProperty("--radix-popper-available-height",`${Je}px`),an.setProperty("--radix-popper-anchor-width",`${Tt}px`),an.setProperty("--radix-popper-anchor-height",`${Ze}px`)}}),H&&gO({element:H,padding:h}),EO({arrowWidth:B,arrowHeight:J}),w&&pO({strategy:"referenceHidden",...de})]}),[ye,O]=yx(A),G=Il(C);or(()=>{X&&G?.()},[X,G]);const U=V.arrow?.x,K=V.arrow?.y,P=V.arrow?.centerOffset!==0,[oe,me]=y.useState();return or(()=>{R&&me(window.getComputedStyle(R).zIndex)},[R]),g.jsx("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:X?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oe,"--radix-popper-transform-origin":[V.transformOrigin?.x,V.transformOrigin?.y].join(" "),...V.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:g.jsx(xO,{scope:l,placedSide:ye,onArrowChange:M,arrowX:U,arrowY:K,shouldHideArrow:P,children:g.jsx(pt.div,{"data-side":ye,"data-align":O,...E,ref:k,style:{...E.style,animation:X?void 0:"none"}})})})});px.displayName=Th;var gx="PopperArrow",SO={top:"bottom",right:"left",bottom:"top",left:"right"},vx=y.forwardRef(function(a,l){const{__scopePopper:i,...s}=a,c=wO(gx,i),f=SO[c.placedSide];return g.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:g.jsx(yO,{...s,ref:l,style:{...s.style,display:"block"}})})});vx.displayName=gx;function _O(n){return n!==null}var EO=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,v]=yx(l),b={start:"0%",center:"50%",end:"100%"}[v],w=(s.arrow?.x??0)+h/2,S=(s.arrow?.y??0)+p/2;let C="",E="";return m==="bottom"?(C=f?b:`${w}px`,E=`${-p}px`):m==="top"?(C=f?b:`${w}px`,E=`${i.floating.height+p}px`):m==="right"?(C=`${-p}px`,E=f?b:`${S}px`):m==="left"&&(C=`${i.floating.width+p}px`,E=f?b:`${S}px`),{data:{x:C,y:E}}}});function yx(n){const[a,l="center"]=n.split("-");return[a,l]}var CO=dx,bx=mx,NO=px,RO=vx,Bc="Popover",[xx,HT]=Ac(Bc,[ux]),Ro=ux(),[jO,gr]=xx(Bc),wx=n=>{const{__scopePopover:a,children:l,open:i,defaultOpen:s,onOpenChange:c,modal:f=!1}=n,h=Ro(a),p=y.useRef(null),[m,v]=y.useState(!1),[b,w]=ch({prop:i,defaultProp:s??!1,onChange:c,caller:Bc});return g.jsx(CO,{...h,children:g.jsx(jO,{scope:a,contentId:Wn(),triggerRef:p,open:b,onOpenChange:w,onOpenToggle:y.useCallback(()=>w(S=>!S),[w]),hasCustomAnchor:m,onCustomAnchorAdd:y.useCallback(()=>v(!0),[]),onCustomAnchorRemove:y.useCallback(()=>v(!1),[]),modal:f,children:l})})};wx.displayName=Bc;var Sx="PopoverAnchor",OO=y.forwardRef((n,a)=>{const{__scopePopover:l,...i}=n,s=gr(Sx,l),c=Ro(l),{onCustomAnchorAdd:f,onCustomAnchorRemove:h}=s;return y.useEffect(()=>(f(),()=>h()),[f,h]),g.jsx(bx,{...c,...i,ref:a})});OO.displayName=Sx;var _x="PopoverTrigger",Ex=y.forwardRef((n,a)=>{const{__scopePopover:l,...i}=n,s=gr(_x,l),c=Ro(l),f=vn(a,s.triggerRef),h=g.jsx(pt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Ox(s.open),...i,ref:f,onClick:nn(n.onClick,s.onOpenToggle)});return s.hasCustomAnchor?h:g.jsx(bx,{asChild:!0,...c,children:h})});Ex.displayName=_x;var Mh="PopoverPortal",[AO,TO]=xx(Mh,{forceMount:void 0}),Cx=n=>{const{__scopePopover:a,forceMount:l,children:i,container:s}=n,c=gr(Mh,a);return g.jsx(AO,{scope:a,forceMount:l,children:g.jsx(ei,{present:l||c.open,children:g.jsx(dh,{asChild:!0,container:s,children:i})})})};Cx.displayName=Mh;var Jl="PopoverContent",Nx=y.forwardRef((n,a)=>{const l=TO(Jl,n.__scopePopover),{forceMount:i=l.forceMount,...s}=n,c=gr(Jl,n.__scopePopover);return g.jsx(ei,{present:i||c.open,children:c.modal?g.jsx(DO,{...s,ref:a}):g.jsx(LO,{...s,ref:a})})});Nx.displayName=Jl;var MO=Tc("PopoverContent.RemoveScroll"),DO=y.forwardRef((n,a)=>{const l=gr(Jl,n.__scopePopover),i=y.useRef(null),s=vn(a,i),c=y.useRef(!1);return y.useEffect(()=>{const f=i.current;if(f)return q0(f)},[]),g.jsx(hh,{as:MO,allowPinchZoom:!0,children:g.jsx(Rx,{...n,ref:s,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:nn(n.onCloseAutoFocus,f=>{f.preventDefault(),c.current||l.triggerRef.current?.focus()}),onPointerDownOutside:nn(n.onPointerDownOutside,f=>{const h=f.detail.originalEvent,p=h.button===0&&h.ctrlKey===!0,m=h.button===2||p;c.current=m},{checkForDefaultPrevented:!1}),onFocusOutside:nn(n.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1})})})}),LO=y.forwardRef((n,a)=>{const l=gr(Jl,n.__scopePopover),i=y.useRef(!1),s=y.useRef(!1);return g.jsx(Rx,{...n,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{n.onCloseAutoFocus?.(c),c.defaultPrevented||(i.current||l.triggerRef.current?.focus(),c.preventDefault()),i.current=!1,s.current=!1},onInteractOutside:c=>{n.onInteractOutside?.(c),c.defaultPrevented||(i.current=!0,c.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const f=c.target;l.triggerRef.current?.contains(f)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&s.current&&c.preventDefault()}})}),Rx=y.forwardRef((n,a)=>{const{__scopePopover:l,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:c,disableOutsidePointerEvents:f,onEscapeKeyDown:h,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:v,...b}=n,w=gr(Jl,l),S=Ro(l);return L0(),g.jsx(fh,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:c,children:g.jsx(uh,{asChild:!0,disableOutsidePointerEvents:f,onInteractOutside:v,onEscapeKeyDown:h,onPointerDownOutside:p,onFocusOutside:m,onDismiss:()=>w.onOpenChange(!1),children:g.jsx(NO,{"data-state":Ox(w.open),role:"dialog",id:w.contentId,...S,...b,ref:a,style:{...b.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)"}})})})}),jx="PopoverClose",kO=y.forwardRef((n,a)=>{const{__scopePopover:l,...i}=n,s=gr(jx,l);return g.jsx(pt.button,{type:"button",...i,ref:a,onClick:nn(n.onClick,()=>s.onOpenChange(!1))})});kO.displayName=jx;var zO="PopoverArrow",UO=y.forwardRef((n,a)=>{const{__scopePopover:l,...i}=n,s=Ro(l);return g.jsx(RO,{...s,...i,ref:a})});UO.displayName=zO;function Ox(n){return n?"open":"closed"}var PO=wx,HO=Ex,BO=Cx,$O=Nx;function $c({...n}){return g.jsx(PO,{"data-slot":"popover",...n})}function Vc({...n}){return g.jsx(HO,{"data-slot":"popover-trigger",...n})}function qc({className:n,align:a="center",sideOffset:l=4,...i}){return g.jsx(BO,{children:g.jsx($O,{"data-slot":"popover-content",align:a,sideOffset:l,className:dt("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 An({options:n,value:a,onChange:l,placeholder:i="Select an option...",searchPlaceholder:s="Search...",emptyPlaceholder:c="No options found."}){const[f,h]=y.useState(!1),p=n.find(m=>m.value===a);return g.jsxs($c,{open:f,onOpenChange:h,children:[g.jsx(Vc,{asChild:!0,children:g.jsxs(Ce,{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,g.jsx(fb,{className:"ml-2 h-4 w-4 shrink-0 opacity-50 transition-transform duration-200 group-data-[state=open]:rotate-180"})]})}),g.jsx(qc,{className:"w-[--radix-popover-trigger-width] p-0 animate-fade-in",children:g.jsxs(Yb,{children:[g.jsx(Gb,{placeholder:s}),g.jsxs(Kb,{children:[g.jsx(Xb,{children:c}),g.jsx(Qb,{children:n.map(m=>g.jsxs(Ib,{value:m.value,onSelect:v=>{l(v===a?"":v),h(!1)},className:"transition-all-ease hover:bg-accent hover:text-accent-foreground",children:[g.jsx(ub,{className:dt("mr-2 h-4 w-4 transition-opacity",a===m.value?"opacity-100":"opacity-0")}),m.label]},m.value))})]})]})})]})}class VO{baseUrl;apiKey;tempApiKey;constructor(a="/api",l=""){this.baseUrl=a,this.apiKey=l||localStorage.getItem("apiKey")||"",this.tempApiKey=new URLSearchParams(window.location.search).get("tempApiKey")}setBaseUrl(a){this.baseUrl=a}setApiKey(a){this.apiKey=a,a?localStorage.setItem("apiKey",a):localStorage.removeItem("apiKey")}setTempApiKey(a){this.tempApiKey=a}createHeaders(a="application/json"){const l={Accept:"application/json"};return this.tempApiKey?l["X-Temp-API-Key"]=this.tempApiKey:this.apiKey&&(l["X-API-Key"]=this.apiKey),a&&(l["Content-Type"]=a),l}async apiFetch(a,l={}){const i=`${this.baseUrl}${a}`,s={...l,headers:{...this.createHeaders(),...l.headers}};try{const c=await fetch(i,s);if(c.status===401)return localStorage.removeItem("apiKey"),window.dispatchEvent(new CustomEvent("unauthorized")),new Promise(()=>{});if(!c.ok)throw new Error(`API request failed: ${c.status} ${c.statusText}`);if(c.status===204)return{};const f=await c.text();return f?JSON.parse(f):{}}catch(c){throw console.error("API request error:",c),c}}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",{})}async checkForUpdates(){return this.get("/update/check")}async performUpdate(){return this.post("/api/update/perform",{})}async getLogFiles(){return this.get("/logs/files")}async getLogs(a){return this.get(`/logs?file=${encodeURIComponent(a)}`)}async clearLogs(a){return this.delete(`/logs?file=${encodeURIComponent(a)}`)}}const Pt=new VO,Ax=y.createContext(void 0);function Wr(){const n=y.useContext(Ax);if(n===void 0)throw new Error("useConfig must be used within a ConfigProvider");return n}function qO({children:n}){const[a,l]=y.useState(null),[i,s]=y.useState(null),[c,f]=y.useState(!1),[h,p]=y.useState(localStorage.getItem("apiKey"));return y.useEffect(()=>{const m=()=>{p(localStorage.getItem("apiKey"))};return window.addEventListener("storage",m),()=>{window.removeEventListener("storage",m)}},[]),y.useEffect(()=>{(async()=>{f(!1),l(null),s(null)})()},[h]),y.useEffect(()=>{(async()=>{if(!c){f(!0);try{const v=await Pt.getConfig(),b={LOG:typeof v.LOG=="boolean"?v.LOG:!1,LOG_LEVEL:typeof v.LOG_LEVEL=="string"?v.LOG_LEVEL:"debug",CLAUDE_PATH:typeof v.CLAUDE_PATH=="string"?v.CLAUDE_PATH:"",HOST:typeof v.HOST=="string"?v.HOST:"127.0.0.1",PORT:typeof v.PORT=="number"?v.PORT:3456,APIKEY:typeof v.APIKEY=="string"?v.APIKEY:"",API_TIMEOUT_MS:typeof v.API_TIMEOUT_MS=="string"?v.API_TIMEOUT_MS:"600000",PROXY_URL:typeof v.PROXY_URL=="string"?v.PROXY_URL:"",transformers:Array.isArray(v.transformers)?v.transformers:[],Providers:Array.isArray(v.Providers)?v.Providers:[],StatusLine:v.StatusLine&&typeof v.StatusLine=="object"?{enabled:typeof v.StatusLine.enabled=="boolean"?v.StatusLine.enabled:!1,currentStyle:typeof v.StatusLine.currentStyle=="string"?v.StatusLine.currentStyle:"default",default:v.StatusLine.default&&typeof v.StatusLine.default=="object"&&Array.isArray(v.StatusLine.default.modules)?v.StatusLine.default:{modules:[]},powerline:v.StatusLine.powerline&&typeof v.StatusLine.powerline=="object"&&Array.isArray(v.StatusLine.powerline.modules)?v.StatusLine.powerline:{modules:[]}}:{enabled:!1,currentStyle:"default",default:{modules:[]},powerline:{modules:[]}},Router:v.Router&&typeof v.Router=="object"?{default:typeof v.Router.default=="string"?v.Router.default:"",background:typeof v.Router.background=="string"?v.Router.background:"",think:typeof v.Router.think=="string"?v.Router.think:"",longContext:typeof v.Router.longContext=="string"?v.Router.longContext:"",longContextThreshold:typeof v.Router.longContextThreshold=="number"?v.Router.longContextThreshold:6e4,webSearch:typeof v.Router.webSearch=="string"?v.Router.webSearch:"",image:typeof v.Router.image=="string"?v.Router.image:""}:{default:"",background:"",think:"",longContext:"",longContextThreshold:6e4,webSearch:"",image:""},CUSTOM_ROUTER_PATH:typeof v.CUSTOM_ROUTER_PATH=="string"?v.CUSTOM_ROUTER_PATH:""};l(b)}catch(v){console.error("Failed to fetch config:",v),v.message!=="Unauthorized"&&(l({LOG:!1,LOG_LEVEL:"debug",CLAUDE_PATH:"",HOST:"127.0.0.1",PORT:3456,APIKEY:"",API_TIMEOUT_MS:"600000",PROXY_URL:"",transformers:[],Providers:[],StatusLine:void 0,Router:{default:"",background:"",think:"",longContext:"",longContextThreshold:6e4,webSearch:"",image:""},CUSTOM_ROUTER_PATH:""}),s(v))}}})()},[c,h]),g.jsx(Ax.Provider,{value:{config:a,setConfig:l,error:i},children:n})}function Fc(){return(Fc=Object.assign||function(n){for(var a=1;a<arguments.length;a++){var l=arguments[a];for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(n[i]=l[i])}return n}).apply(this,arguments)}function Tx(n,a){if(n==null)return{};var l,i,s={},c=Object.keys(n);for(i=0;i<c.length;i++)a.indexOf(l=c[i])>=0||(s[l]=n[l]);return s}function Id(n){var a=y.useRef(n),l=y.useRef(function(i){a.current&&a.current(i)});return a.current=n,l.current}var wo=function(n,a,l){return a===void 0&&(a=0),l===void 0&&(l=1),n>l?l:n<a?a:n},ho=function(n){return"touches"in n},Zd=function(n){return n&&n.ownerDocument.defaultView||self},By=function(n,a,l){var i=n.getBoundingClientRect(),s=ho(a)?function(c,f){for(var h=0;h<c.length;h++)if(c[h].identifier===f)return c[h];return c[0]}(a.touches,l):a;return{left:wo((s.pageX-(i.left+Zd(n).pageXOffset))/i.width),top:wo((s.pageY-(i.top+Zd(n).pageYOffset))/i.height)}},$y=function(n){!ho(n)&&n.preventDefault()},Mx=mt.memo(function(n){var a=n.onMove,l=n.onKey,i=Tx(n,["onMove","onKey"]),s=y.useRef(null),c=Id(a),f=Id(l),h=y.useRef(null),p=y.useRef(!1),m=y.useMemo(function(){var S=function(j){$y(j),(ho(j)?j.touches.length>0:j.buttons>0)&&s.current?c(By(s.current,j,h.current)):E(!1)},C=function(){return E(!1)};function E(j){var R=p.current,L=Zd(s.current),k=j?L.addEventListener:L.removeEventListener;k(R?"touchmove":"mousemove",S),k(R?"touchend":"mouseup",C)}return[function(j){var R=j.nativeEvent,L=s.current;if(L&&($y(R),!function(H,M){return M&&!ho(H)}(R,p.current)&&L)){if(ho(R)){p.current=!0;var k=R.changedTouches||[];k.length&&(h.current=k[0].identifier)}L.focus(),c(By(L,R,h.current)),E(!0)}},function(j){var R=j.which||j.keyCode;R<37||R>40||(j.preventDefault(),f({left:R===39?.05:R===37?-.05:0,top:R===40?.05:R===38?-.05:0}))},E]},[f,c]),v=m[0],b=m[1],w=m[2];return y.useEffect(function(){return w},[w]),mt.createElement("div",Fc({},i,{onTouchStart:v,onMouseDown:v,className:"react-colorful__interactive",ref:s,onKeyDown:b,tabIndex:0,role:"slider"}))}),Dh=function(n){return n.filter(Boolean).join(" ")},Dx=function(n){var a=n.color,l=n.left,i=n.top,s=i===void 0?.5:i,c=Dh(["react-colorful__pointer",n.className]);return mt.createElement("div",{className:c,style:{top:100*s+"%",left:100*l+"%"}},mt.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:a}}))},qt=function(n,a,l){return a===void 0&&(a=0),l===void 0&&(l=Math.pow(10,a)),Math.round(l*n)/l},FO=function(n){return QO(Jd(n))},Jd=function(n){return n[0]==="#"&&(n=n.substring(1)),n.length<6?{r:parseInt(n[0]+n[0],16),g:parseInt(n[1]+n[1],16),b:parseInt(n[2]+n[2],16),a:n.length===4?qt(parseInt(n[3]+n[3],16)/255,2):1}:{r:parseInt(n.substring(0,2),16),g:parseInt(n.substring(2,4),16),b:parseInt(n.substring(4,6),16),a:n.length===8?qt(parseInt(n.substring(6,8),16)/255,2):1}},YO=function(n){return XO(KO(n))},GO=function(n){var a=n.s,l=n.v,i=n.a,s=(200-a)*l/100;return{h:qt(n.h),s:qt(s>0&&s<200?a*l/100/(s<=100?s:200-s)*100:0),l:qt(s/2),a:qt(i,2)}},Wd=function(n){var a=GO(n);return"hsl("+a.h+", "+a.s+"%, "+a.l+"%)"},KO=function(n){var a=n.h,l=n.s,i=n.v,s=n.a;a=a/360*6,l/=100,i/=100;var c=Math.floor(a),f=i*(1-l),h=i*(1-(a-c)*l),p=i*(1-(1-a+c)*l),m=c%6;return{r:qt(255*[i,h,f,f,p,i][m]),g:qt(255*[p,i,i,h,f,f][m]),b:qt(255*[f,f,p,i,i,h][m]),a:qt(s,2)}},tc=function(n){var a=n.toString(16);return a.length<2?"0"+a:a},XO=function(n){var a=n.r,l=n.g,i=n.b,s=n.a,c=s<1?tc(qt(255*s)):"";return"#"+tc(a)+tc(l)+tc(i)+c},QO=function(n){var a=n.r,l=n.g,i=n.b,s=n.a,c=Math.max(a,l,i),f=c-Math.min(a,l,i),h=f?c===a?(l-i)/f:c===l?2+(i-a)/f:4+(a-l)/f:0;return{h:qt(60*(h<0?h+6:h)),s:qt(c?f/c*100:0),v:qt(c/255*100),a:s}},IO=mt.memo(function(n){var a=n.hue,l=n.onChange,i=Dh(["react-colorful__hue",n.className]);return mt.createElement("div",{className:i},mt.createElement(Mx,{onMove:function(s){l({h:360*s.left})},onKey:function(s){l({h:wo(a+360*s.left,0,360)})},"aria-label":"Hue","aria-valuenow":qt(a),"aria-valuemax":"360","aria-valuemin":"0"},mt.createElement(Dx,{className:"react-colorful__hue-pointer",left:a/360,color:Wd({h:a,s:100,v:100,a:1})})))}),ZO=mt.memo(function(n){var a=n.hsva,l=n.onChange,i={backgroundColor:Wd({h:a.h,s:100,v:100,a:1})};return mt.createElement("div",{className:"react-colorful__saturation",style:i},mt.createElement(Mx,{onMove:function(s){l({s:100*s.left,v:100-100*s.top})},onKey:function(s){l({s:wo(a.s+100*s.left,0,100),v:wo(a.v-100*s.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+qt(a.s)+"%, Brightness "+qt(a.v)+"%"},mt.createElement(Dx,{className:"react-colorful__saturation-pointer",top:1-a.v/100,left:a.s/100,color:Wd(a)})))}),Lx=function(n,a){if(n===a)return!0;for(var l in n)if(n[l]!==a[l])return!1;return!0},JO=function(n,a){return n.toLowerCase()===a.toLowerCase()||Lx(Jd(n),Jd(a))};function WO(n,a,l){var i=Id(l),s=y.useState(function(){return n.toHsva(a)}),c=s[0],f=s[1],h=y.useRef({color:a,hsva:c});y.useEffect(function(){if(!n.equal(a,h.current.color)){var m=n.toHsva(a);h.current={hsva:m,color:a},f(m)}},[a,n]),y.useEffect(function(){var m;Lx(c,h.current.hsva)||n.equal(m=n.fromHsva(c),h.current.color)||(h.current={hsva:c,color:m},i(m))},[c,n,i]);var p=y.useCallback(function(m){f(function(v){return Object.assign({},v,m)})},[]);return[c,p]}var eA=typeof window<"u"?y.useLayoutEffect:y.useEffect,tA=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},Vy=new Map,nA=function(n){eA(function(){var a=n.current?n.current.ownerDocument:document;if(a!==void 0&&!Vy.has(a)){var l=a.createElement("style");l.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,Vy.set(a,l);var i=tA();i&&l.setAttribute("nonce",i),a.head.appendChild(l)}},[])},aA=function(n){var a=n.className,l=n.colorModel,i=n.color,s=i===void 0?l.defaultColor:i,c=n.onChange,f=Tx(n,["className","colorModel","color","onChange"]),h=y.useRef(null);nA(h);var p=WO(l,s,c),m=p[0],v=p[1],b=Dh(["react-colorful",a]);return mt.createElement("div",Fc({},f,{ref:h,className:b}),mt.createElement(ZO,{hsva:m,onChange:v}),mt.createElement(IO,{hue:m.h,onChange:v,className:"react-colorful__last-control"}))},rA={defaultColor:"000",toHsva:FO,fromHsva:function(n){return YO({h:n.h,s:n.s,v:n.v,a:1})},equal:JO},lA=function(n){return mt.createElement(aA,Fc({},n,{colorModel:rA}))};const iA=n=>n.startsWith("#")?n:"#000000";function qy({value:n="",onChange:a,placeholder:l="选择颜色...",showPreview:i=!0}){const[s,c]=y.useState(!1),[f,h]=y.useState("");y.useEffect(()=>{n.startsWith("#")?h(n):h("")},[n]);const p=b=>{a(b)},m=b=>{const w=b.target.value;h(w),/^#[0-9A-F]{6}$/i.test(w)&&p(w)},v=iA(n);return g.jsx("div",{className:"space-y-2",children:g.jsxs($c,{open:s,onOpenChange:c,children:[g.jsx(Vc,{asChild:!0,children:g.jsx(Ce,{variant:"outline",className:dt("w-full justify-start text-left font-normal h-10 transition-all hover:scale-[1.02] active:scale-[0.98]",!n&&"text-muted-foreground"),children:g.jsxs("div",{className:"flex items-center gap-2 w-full",children:[i&&g.jsx("div",{className:"h-5 w-5 rounded border shadow-sm",style:{backgroundColor:v}}),g.jsx("span",{className:"truncate flex-1",children:n||l}),g.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[g.jsx("path",{d:"m7 15 5 5 5-5"}),g.jsx("path",{d:"m7 9 5-5 5 5"})]})]})})}),g.jsx(qc,{className:"w-72 p-3",align:"start",children:g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("h4",{className:"text-sm font-semibold",children:"颜色选择器"}),g.jsx(Ce,{variant:"ghost",size:"sm",className:"h-6 px-2 text-xs",onClick:()=>p(""),children:"清除"})]}),g.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-md bg-secondary",children:[g.jsx("div",{className:"h-8 w-8 rounded border shadow-sm",style:{backgroundColor:v}}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsx("div",{className:"text-sm font-medium truncate",children:n||"未选择颜色"}),n&&n.startsWith("#")&&g.jsx("div",{className:"text-xs text-muted-foreground font-mono",children:n.toUpperCase()})]})]}),g.jsx("div",{className:"rounded-md overflow-hidden border",children:g.jsx(lA,{color:v,onChange:p,className:"w-full"})}),g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{className:"text-sm font-medium",children:"自定义颜色"}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(ft,{type:"text",value:f,onChange:m,placeholder:"#RRGGBB",className:"font-mono flex-1"}),g.jsx(Ce,{size:"sm",onClick:()=>{f&&/^#[0-9A-F]{6}$/i.test(f)&&(p(f),c(!1))},disabled:!f||!/^#[0-9A-F]{6}$/i.test(f),children:"应用"})]}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"输入十六进制颜色值 (例如: #FF0000)"})]})]})})]})})}const oA=wh("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 Vr({className:n,variant:a,...l}){return g.jsx("div",{className:dt(oA({variant:a}),n),...l})}function sA(){return{enabled:!1,currentStyle:"default",default:{modules:[{type:"workDir",icon:"󰉋",text:"{{workDirName}}",color:"bright_blue"},{type:"gitBranch",icon:"",text:"{{gitBranch}}",color:"bright_magenta"},{type:"model",icon:"󰚩",text:"{{model}}",color:"bright_cyan"},{type:"usage",icon:"↑",text:"{{inputTokens}}",color:"bright_green"},{type:"usage",icon:"↓",text:"{{outputTokens}}",color:"bright_yellow"}]},powerline:{modules:[{type:"workDir",icon:"󰉋",text:"{{workDirName}}",color:"white",background:"bg_bright_blue"},{type:"gitBranch",icon:"",text:"{{gitBranch}}",color:"white",background:"bg_bright_magenta"},{type:"model",icon:"󰚩",text:"{{model}}",color:"white",background:"bg_bright_cyan"},{type:"usage",icon:"↑",text:"{{inputTokens}}",color:"white",background:"bg_bright_green"},{type:"usage",icon:"↓",text:"{{outputTokens}}",color:"white",background:"bg_bright_yellow"}]}}}const cA={type:"workDir",icon:"󰉋",text:"{{workDirName}}",color:"bright_blue"},uA=[{label:"Hack Nerd Font Mono",value:"Hack Nerd Font Mono"},{label:"FiraCode Nerd Font Mono",value:"FiraCode Nerd Font Mono"},{label:"JetBrainsMono Nerd Font Mono",value:"JetBrainsMono Nerd Font Mono"},{label:"Monaspace Nerd Font Mono",value:"Monaspace Nerd Font Mono"},{label:"UbuntuMono Nerd Font",value:"UbuntuMono Nerd Font"}],fA=[{label:"workDir",value:"workDir"},{label:"gitBranch",value:"gitBranch"},{label:"model",value:"model"},{label:"usage",value:"usage"},{label:"script",value:"script"}],Ed={black:"text-black",red:"text-red-600",green:"text-green-600",yellow:"text-yellow-500",blue:"text-blue-500",magenta:"text-purple-500",cyan:"text-cyan-500",white:"text-white",bright_black:"text-gray-500",bright_red:"text-red-400",bright_green:"text-green-400",bright_yellow:"text-yellow-300",bright_blue:"text-blue-300",bright_magenta:"text-purple-300",bright_cyan:"text-cyan-300",bright_white:"text-white",bg_black:"bg-black",bg_red:"bg-red-600",bg_green:"bg-green-600",bg_yellow:"bg-yellow-500",bg_blue:"bg-blue-500",bg_magenta:"bg-purple-500",bg_cyan:"bg-cyan-500",bg_white:"bg-white",bg_bright_black:"bg-gray-800",bg_bright_red:"bg-red-400",bg_bright_green:"bg-green-400",bg_bright_yellow:"bg-yellow-300",bg_bright_blue:"bg-blue-300",bg_bright_magenta:"bg-purple-300",bg_bright_cyan:"bg-cyan-300",bg_bright_white:"bg-gray-100",bg_bright_orange:"bg-orange-400",bg_bright_purple:"bg-purple-400"},dA=mt.memo(({value:n,onChange:a,fontFamily:l,t:i})=>{const[s,c]=y.useState(!1),[f,h]=y.useState(n),[p,m]=y.useState([]),[v,b]=y.useState([]),[w,S]=y.useState(!1),C=mt.useRef(null),E=y.useCallback(async()=>{if(!(p.length>0)){S(!0);try{const N=await(await fetch("https://www.nerdfonts.com/assets/css/combo.css")).text(),B=/\.nf-([a-zA-Z0-9_-]+):before\s*\{\s*content:\s*"\\([0-9a-fA-F]+)";?\s*\}/g,J=[];let te;for(;(te=B.exec(N))!==null;){const ae=`nf-${te[1]}`,re=te[2],fe=String.fromCharCode(parseInt(re,16));J.push({className:ae,unicode:re,char:fe})}m(J),b(J.slice(0,200))}catch(M){console.error("Failed to load icons:",M),m([]),b([])}finally{S(!1)}}},[p.length]);y.useEffect(()=>{if(f.trim()===""){b(p.slice(0,100));return}const M=f.toLowerCase();let N=p;if(M.length===1||/[\u{2000}-\u{2FFFF}]/u.test(f)){const B=p.find(J=>J.char===f);B?N=[B]:N=p.filter(J=>J.char===f)}else N=p.filter(B=>{const J=B.className.toLowerCase(),te=J.replace(/[_-]/g,""),ae=M.replace(/[_-]/g,"");return J.includes(M)||te.includes(ae)||M.split(" ").every(re=>J.includes(re)||te.includes(re))});b(N.slice(0,120))},[f,p]);const j=M=>{const N=M.target.value;h(N),a(N),c(!0),p.length===0&&E()},R=M=>{const N=M.clipboardData.getData("text");N&&N.length===1&&setTimeout(()=>{c(!0)},10)},L=M=>{h(M),a(M),c(!1),C.current?.focus()},k=()=>{c(!0),p.length===0&&E()},H=()=>{setTimeout(()=>c(!1),200)};return g.jsxs("div",{className:"relative",children:[g.jsx("div",{className:"relative",children:g.jsx(ft,{ref:C,value:f,onChange:j,onFocus:k,onBlur:H,onPaste:R,placeholder:i("statusline.icon_placeholder"),style:{fontFamily:l+", monospace"},className:"text-lg pr-2"})}),s&&g.jsx("div",{className:"absolute z-50 mt-1 w-full max-h-72 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg",children:w?g.jsx("div",{className:"flex items-center justify-center p-8",children:g.jsxs("svg",{className:"animate-spin h-6 w-6 text-primary",viewBox:"0 0 24 24",children:[g.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none",opacity:"0.1"}),g.jsx("path",{fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}):g.jsx(g.Fragment,{children:g.jsxs("div",{className:"grid grid-cols-5 gap-2 p-2 max-h-72 overflow-y-auto",children:[v.map(M=>g.jsx("div",{className:"flex items-center justify-center p-3 text-2xl cursor-pointer hover:bg-secondary rounded transition-colors",onClick:()=>L(M.char),onMouseDown:N=>N.preventDefault(),title:`${M.char} - ${M.className}`,style:{fontFamily:l+", monospace"},children:M.char},M.className)),v.length===0&&g.jsxs("div",{className:"col-span-5 flex flex-col items-center justify-center p-8 text-muted-foreground",children:[g.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"mb-2",children:[g.jsx("circle",{cx:"11",cy:"11",r:"8"}),g.jsx("path",{d:"m21 21-4.35-4.35"})]}),g.jsx("div",{className:"text-sm",children:f?`${i("statusline.no_icons_found")} "${f}"`:i("statusline.no_icons_available")})]})]})})})]})});function hA(n,a){return n.replace(/\{\{(\w+)\}\}/g,(l,i)=>a[i]||l)}function mA(n,a=!1){const l={workDirName:"project",gitBranch:"main",model:"Claude Sonnet 4",inputTokens:"1.2k",outputTokens:"2.5k"},i=hA(n.text,l),s=n.icon||"";if(!i&&n.type!=="usage")return null;const c=p=>/^#[0-9A-F]{6}$/i.test(p);if(a){let p={},m="",v="";n.background&&(c(n.background)?(p={backgroundColor:n.background},v=n.background):(m=Ed[n.background]||"",v=n.background));let b={},w="";return n.color?c(n.color)?b={color:n.color}:w=Ed[n.color]||"text-white":w="text-white",g.jsxs("div",{className:`powerline-module px-4 ${m} ${w}`,style:{...p,...b},children:[g.jsxs("div",{className:"powerline-module-content",children:[s&&g.jsx("span",{children:s}),g.jsx("span",{children:i})]}),g.jsx("div",{className:"powerline-separator","data-current-bg":v})]})}let f={},h="";return n.color&&(c(n.color)?f={color:n.color}:h=Ed[n.color]||""),g.jsxs(g.Fragment,{children:[s&&g.jsx("span",{style:f,className:h,children:s}),g.jsx("span",{style:f,className:h,children:i})]})}function pA({isOpen:n,onOpenChange:a}){const{t:l}=Oa(),{config:i,setConfig:s}=Wr(),[c,f]=y.useState(i?.StatusLine||sA()),[h,p]=y.useState(i?.StatusLine?.fontFamily||"Hack Nerd Font Mono"),[m,v]=y.useState(null),[b,w]=y.useState(new Set);y.useEffect(()=>{const re=document.createElement("style");return re.innerHTML=`
246
+ */const Oj=[["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"}]],Ab=ft("save",Oj);/**
247
+ * @license lucide-react v0.525.0 - ISC
248
+ *
249
+ * This source code is licensed under the ISC license.
250
+ * See the LICENSE file in the root directory of this source tree.
251
+ */const Aj=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Tb=ft("search",Aj);/**
252
+ * @license lucide-react v0.525.0 - ISC
253
+ *
254
+ * This source code is licensed under the ISC license.
255
+ * See the LICENSE file in the root directory of this source tree.
256
+ */const Tj=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Mj=ft("send",Tj);/**
257
+ * @license lucide-react v0.525.0 - ISC
258
+ *
259
+ * This source code is licensed under the ISC license.
260
+ * See the LICENSE file in the root directory of this source tree.
261
+ */const Dj=[["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"}]],Lj=ft("settings",Dj);/**
262
+ * @license lucide-react v0.525.0 - ISC
263
+ *
264
+ * This source code is licensed under the ISC license.
265
+ * See the LICENSE file in the root directory of this source tree.
266
+ */const kj=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],zj=ft("square",kj);/**
267
+ * @license lucide-react v0.525.0 - ISC
268
+ *
269
+ * This source code is licensed under the ISC license.
270
+ * See the LICENSE file in the root directory of this source tree.
271
+ */const Uj=[["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"}]],na=ft("trash-2",Uj);/**
272
+ * @license lucide-react v0.525.0 - ISC
273
+ *
274
+ * This source code is licensed under the ISC license.
275
+ * See the LICENSE file in the root directory of this source tree.
276
+ */const Pj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],cr=ft("x",Pj);function Mb(n){var a,l,o="";if(typeof n=="string"||typeof n=="number")o+=n;else if(typeof n=="object")if(Array.isArray(n)){var s=n.length;for(a=0;a<s;a++)n[a]&&(l=Mb(n[a]))&&(o&&(o+=" "),o+=l)}else for(l in n)n[l]&&(o&&(o+=" "),o+=l);return o}function Db(){for(var n,a,l=0,o="",s=arguments.length;l<s;l++)(n=arguments[l])&&(a=Mb(n))&&(o&&(o+=" "),o+=a);return o}const Mh="-",Hj=n=>{const a=$j(n),{conflictingClassGroups:l,conflictingClassGroupModifiers:o}=n;return{getClassGroupId:f=>{const m=f.split(Mh);return m[0]===""&&m.length!==1&&m.shift(),Lb(m,a)||Bj(f)},getConflictingClassGroupIds:(f,m)=>{const g=l[f]||[];return m&&o[f]?[...g,...o[f]]:g}}},Lb=(n,a)=>{if(n.length===0)return a.classGroupId;const l=n[0],o=a.nextPart.get(l),s=o?Lb(n.slice(1),o):void 0;if(s)return s;if(a.validators.length===0)return;const c=n.join(Mh);return a.validators.find(({validator:f})=>f(c))?.classGroupId},ky=/^\[(.+)\]$/,Bj=n=>{if(ky.test(n)){const a=ky.exec(n)[1],l=a?.substring(0,a.indexOf(":"));if(l)return"arbitrary.."+l}},$j=n=>{const{theme:a,classGroups:l}=n,o={nextPart:new Map,validators:[]};for(const s in l)Jd(l[s],o,s,a);return o},Jd=(n,a,l,o)=>{n.forEach(s=>{if(typeof s=="string"){const c=s===""?a:zy(a,s);c.classGroupId=l;return}if(typeof s=="function"){if(qj(s)){Jd(s(o),a,l,o);return}a.validators.push({validator:s,classGroupId:l});return}Object.entries(s).forEach(([c,f])=>{Jd(f,zy(a,c),l,o)})})},zy=(n,a)=>{let l=n;return a.split(Mh).forEach(o=>{l.nextPart.has(o)||l.nextPart.set(o,{nextPart:new Map,validators:[]}),l=l.nextPart.get(o)}),l},qj=n=>n.isThemeGetter,Fj=n=>{if(n<1)return{get:()=>{},set:()=>{}};let a=0,l=new Map,o=new Map;const s=(c,f)=>{l.set(c,f),a++,a>n&&(a=0,o=l,l=new Map)};return{get(c){let f=l.get(c);if(f!==void 0)return f;if((f=o.get(c))!==void 0)return s(c,f),f},set(c,f){l.has(c)?l.set(c,f):s(c,f)}}},Wd="!",eh=":",Vj=eh.length,Gj=n=>{const{prefix:a,experimentalParseClassName:l}=n;let o=s=>{const c=[];let f=0,m=0,g=0,h;for(let N=0;N<s.length;N++){let E=s[N];if(f===0&&m===0){if(E===eh){c.push(s.slice(g,N)),g=N+Vj;continue}if(E==="/"){h=N;continue}}E==="["?f++:E==="]"?f--:E==="("?m++:E===")"&&m--}const v=c.length===0?s:s.substring(g),b=Yj(v),w=b!==v,S=h&&h>g?h-g:void 0;return{modifiers:c,hasImportantModifier:w,baseClassName:b,maybePostfixModifierPosition:S}};if(a){const s=a+eh,c=o;o=f=>f.startsWith(s)?c(f.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:f,maybePostfixModifierPosition:void 0}}if(l){const s=o;o=c=>l({className:c,parseClassName:s})}return o},Yj=n=>n.endsWith(Wd)?n.substring(0,n.length-1):n.startsWith(Wd)?n.substring(1):n,Kj=n=>{const a=Object.fromEntries(n.orderSensitiveModifiers.map(o=>[o,!0]));return o=>{if(o.length<=1)return o;const s=[];let c=[];return o.forEach(f=>{f[0]==="["||a[f]?(s.push(...c.sort(),f),c=[]):c.push(f)}),s.push(...c.sort()),s}},Ij=n=>({cache:Fj(n.cacheSize),parseClassName:Gj(n),sortModifiers:Kj(n),...Hj(n)}),Xj=/\s+/,Qj=(n,a)=>{const{parseClassName:l,getClassGroupId:o,getConflictingClassGroupIds:s,sortModifiers:c}=a,f=[],m=n.trim().split(Xj);let g="";for(let h=m.length-1;h>=0;h-=1){const v=m[h],{isExternal:b,modifiers:w,hasImportantModifier:S,baseClassName:N,maybePostfixModifierPosition:E}=l(v);if(b){g=v+(g.length>0?" "+g:g);continue}let R=!!E,C=o(R?N.substring(0,E):N);if(!C){if(!R){g=v+(g.length>0?" "+g:g);continue}if(C=o(N),!C){g=v+(g.length>0?" "+g:g);continue}R=!1}const A=c(w).join(":"),T=S?A+Wd:A,k=T+C;if(f.includes(k))continue;f.push(k);const D=s(C,R);for(let j=0;j<D.length;++j){const U=D[j];f.push(T+U)}g=v+(g.length>0?" "+g:g)}return g};function Zj(){let n=0,a,l,o="";for(;n<arguments.length;)(a=arguments[n++])&&(l=kb(a))&&(o&&(o+=" "),o+=l);return o}const kb=n=>{if(typeof n=="string")return n;let a,l="";for(let o=0;o<n.length;o++)n[o]&&(a=kb(n[o]))&&(l&&(l+=" "),l+=a);return l};function Jj(n,...a){let l,o,s,c=f;function f(g){const h=a.reduce((v,b)=>b(v),n());return l=Ij(h),o=l.cache.get,s=l.cache.set,c=m,m(g)}function m(g){const h=o(g);if(h)return h;const v=Qj(g,l);return s(g,v),v}return function(){return c(Zj.apply(null,arguments))}}const kt=n=>{const a=l=>l[n]||[];return a.isThemeGetter=!0,a},zb=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ub=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Wj=/^\d+\/\d+$/,eR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tR=/\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$/,nR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,aR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,rR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Gl=n=>Wj.test(n),Ie=n=>!!n&&!Number.isNaN(Number(n)),lr=n=>!!n&&Number.isInteger(Number(n)),Cd=n=>n.endsWith("%")&&Ie(n.slice(0,-1)),Ea=n=>eR.test(n),lR=()=>!0,oR=n=>tR.test(n)&&!nR.test(n),Pb=()=>!1,iR=n=>aR.test(n),sR=n=>rR.test(n),cR=n=>!_e(n)&&!Ee(n),uR=n=>lo(n,$b,Pb),_e=n=>zb.test(n),qr=n=>lo(n,qb,oR),jd=n=>lo(n,pR,Ie),Uy=n=>lo(n,Hb,Pb),fR=n=>lo(n,Bb,sR),oc=n=>lo(n,Fb,iR),Ee=n=>Ub.test(n),di=n=>oo(n,qb),dR=n=>oo(n,gR),Py=n=>oo(n,Hb),hR=n=>oo(n,$b),mR=n=>oo(n,Bb),ic=n=>oo(n,Fb,!0),lo=(n,a,l)=>{const o=zb.exec(n);return o?o[1]?a(o[1]):l(o[2]):!1},oo=(n,a,l=!1)=>{const o=Ub.exec(n);return o?o[1]?a(o[1]):l:!1},Hb=n=>n==="position"||n==="percentage",Bb=n=>n==="image"||n==="url",$b=n=>n==="length"||n==="size"||n==="bg-size",qb=n=>n==="length",pR=n=>n==="number",gR=n=>n==="family-name",Fb=n=>n==="shadow",vR=()=>{const n=kt("color"),a=kt("font"),l=kt("text"),o=kt("font-weight"),s=kt("tracking"),c=kt("leading"),f=kt("breakpoint"),m=kt("container"),g=kt("spacing"),h=kt("radius"),v=kt("shadow"),b=kt("inset-shadow"),w=kt("text-shadow"),S=kt("drop-shadow"),N=kt("blur"),E=kt("perspective"),R=kt("aspect"),C=kt("ease"),A=kt("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],D=()=>[...k(),Ee,_e],j=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto","contain","none"],B=()=>[Ee,_e,g],W=()=>[Gl,"full","auto",...B()],ne=()=>[lr,"none","subgrid",Ee,_e],ee=()=>["auto",{span:["full",lr,Ee,_e]},lr,Ee,_e],ie=()=>[lr,"auto",Ee,_e],fe=()=>["auto","min","max","fr",Ee,_e],X=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],te=()=>["start","end","center","stretch","center-safe","end-safe"],O=()=>["auto",...B()],I=()=>[Gl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...B()],q=()=>[n,Ee,_e],ye=()=>[...k(),Py,Uy,{position:[Ee,_e]}],M=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Y=()=>["auto","cover","contain",hR,uR,{size:[Ee,_e]}],H=()=>[Cd,di,qr],K=()=>["","none","full",h,Ee,_e],le=()=>["",Ie,di,qr],he=()=>["solid","dashed","dotted","double"],ve=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],be=()=>[Ie,Cd,Py,Uy],ze=()=>["","none",N,Ee,_e],ae=()=>["none",Ie,Ee,_e],we=()=>["none",Ie,Ee,_e],Pe=()=>[Ie,Ee,_e],De=()=>[Gl,"full",...B()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ea],breakpoint:[Ea],color:[lR],container:[Ea],"drop-shadow":[Ea],ease:["in","out","in-out"],font:[cR],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ea],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ea],shadow:[Ea],spacing:["px",Ie],text:[Ea],"text-shadow":[Ea],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Gl,_e,Ee,R]}],container:["container"],columns:[{columns:[Ie,_e,Ee,m]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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:D()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:W()}],"inset-x":[{"inset-x":W()}],"inset-y":[{"inset-y":W()}],start:[{start:W()}],end:[{end:W()}],top:[{top:W()}],right:[{right:W()}],bottom:[{bottom:W()}],left:[{left:W()}],visibility:["visible","invisible","collapse"],z:[{z:[lr,"auto",Ee,_e]}],basis:[{basis:[Gl,"full","auto",m,...B()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ie,Gl,"auto","initial","none",_e]}],grow:[{grow:["",Ie,Ee,_e]}],shrink:[{shrink:["",Ie,Ee,_e]}],order:[{order:[lr,"first","last","none",Ee,_e]}],"grid-cols":[{"grid-cols":ne()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":ie()}],"col-end":[{"col-end":ie()}],"grid-rows":[{"grid-rows":ne()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":ie()}],"row-end":[{"row-end":ie()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":fe()}],"auto-rows":[{"auto-rows":fe()}],gap:[{gap:B()}],"gap-x":[{"gap-x":B()}],"gap-y":[{"gap-y":B()}],"justify-content":[{justify:[...X(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...X()]}],"align-items":[{items:[...te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...te(),{baseline:["","last"]}]}],"place-content":[{"place-content":X()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:B()}],px:[{px:B()}],py:[{py:B()}],ps:[{ps:B()}],pe:[{pe:B()}],pt:[{pt:B()}],pr:[{pr:B()}],pb:[{pb:B()}],pl:[{pl:B()}],m:[{m:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":B()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":B()}],"space-y-reverse":["space-y-reverse"],size:[{size:I()}],w:[{w:[m,"screen",...I()]}],"min-w":[{"min-w":[m,"screen","none",...I()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[f]},...I()]}],h:[{h:["screen","lh",...I()]}],"min-h":[{"min-h":["screen","lh","none",...I()]}],"max-h":[{"max-h":["screen","lh",...I()]}],"font-size":[{text:["base",l,di,qr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,Ee,jd]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Cd,_e]}],"font-family":[{font:[dR,_e,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,Ee,_e]}],"line-clamp":[{"line-clamp":[Ie,"none",Ee,jd]}],leading:[{leading:[c,...B()]}],"list-image":[{"list-image":["none",Ee,_e]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ee,_e]}],"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:[...he(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ie,"from-font","auto",Ee,qr]}],"text-decoration-color":[{decoration:q()}],"underline-offset":[{"underline-offset":[Ie,"auto",Ee,_e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ee,_e]}],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",Ee,_e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ye()}],"bg-repeat":[{bg:M()}],"bg-size":[{bg:Y()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},lr,Ee,_e],radial:["",Ee,_e],conic:[lr,Ee,_e]},mR,fR]}],"bg-color":[{bg:q()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:q()}],"gradient-via":[{via:q()}],"gradient-to":[{to:q()}],rounded:[{rounded:K()}],"rounded-s":[{"rounded-s":K()}],"rounded-e":[{"rounded-e":K()}],"rounded-t":[{"rounded-t":K()}],"rounded-r":[{"rounded-r":K()}],"rounded-b":[{"rounded-b":K()}],"rounded-l":[{"rounded-l":K()}],"rounded-ss":[{"rounded-ss":K()}],"rounded-se":[{"rounded-se":K()}],"rounded-ee":[{"rounded-ee":K()}],"rounded-es":[{"rounded-es":K()}],"rounded-tl":[{"rounded-tl":K()}],"rounded-tr":[{"rounded-tr":K()}],"rounded-br":[{"rounded-br":K()}],"rounded-bl":[{"rounded-bl":K()}],"border-w":[{border:le()}],"border-w-x":[{"border-x":le()}],"border-w-y":[{"border-y":le()}],"border-w-s":[{"border-s":le()}],"border-w-e":[{"border-e":le()}],"border-w-t":[{"border-t":le()}],"border-w-r":[{"border-r":le()}],"border-w-b":[{"border-b":le()}],"border-w-l":[{"border-l":le()}],"divide-x":[{"divide-x":le()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":le()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...he(),"hidden","none"]}],"divide-style":[{divide:[...he(),"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:[...he(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ie,Ee,_e]}],"outline-w":[{outline:["",Ie,di,qr]}],"outline-color":[{outline:q()}],shadow:[{shadow:["","none",v,ic,oc]}],"shadow-color":[{shadow:q()}],"inset-shadow":[{"inset-shadow":["none",b,ic,oc]}],"inset-shadow-color":[{"inset-shadow":q()}],"ring-w":[{ring:le()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:q()}],"ring-offset-w":[{"ring-offset":[Ie,qr]}],"ring-offset-color":[{"ring-offset":q()}],"inset-ring-w":[{"inset-ring":le()}],"inset-ring-color":[{"inset-ring":q()}],"text-shadow":[{"text-shadow":["none",w,ic,oc]}],"text-shadow-color":[{"text-shadow":q()}],opacity:[{opacity:[Ie,Ee,_e]}],"mix-blend":[{"mix-blend":[...ve(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ve()}],"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":[Ie]}],"mask-image-linear-from-pos":[{"mask-linear-from":be()}],"mask-image-linear-to-pos":[{"mask-linear-to":be()}],"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":be()}],"mask-image-t-to-pos":[{"mask-t-to":be()}],"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":be()}],"mask-image-r-to-pos":[{"mask-r-to":be()}],"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":be()}],"mask-image-b-to-pos":[{"mask-b-to":be()}],"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":be()}],"mask-image-l-to-pos":[{"mask-l-to":be()}],"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":be()}],"mask-image-x-to-pos":[{"mask-x-to":be()}],"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":be()}],"mask-image-y-to-pos":[{"mask-y-to":be()}],"mask-image-y-from-color":[{"mask-y-from":q()}],"mask-image-y-to-color":[{"mask-y-to":q()}],"mask-image-radial":[{"mask-radial":[Ee,_e]}],"mask-image-radial-from-pos":[{"mask-radial-from":be()}],"mask-image-radial-to-pos":[{"mask-radial-to":be()}],"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":k()}],"mask-image-conic-pos":[{"mask-conic":[Ie]}],"mask-image-conic-from-pos":[{"mask-conic-from":be()}],"mask-image-conic-to-pos":[{"mask-conic-to":be()}],"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:ye()}],"mask-repeat":[{mask:M()}],"mask-size":[{mask:Y()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ee,_e]}],filter:[{filter:["","none",Ee,_e]}],blur:[{blur:ze()}],brightness:[{brightness:[Ie,Ee,_e]}],contrast:[{contrast:[Ie,Ee,_e]}],"drop-shadow":[{"drop-shadow":["","none",S,ic,oc]}],"drop-shadow-color":[{"drop-shadow":q()}],grayscale:[{grayscale:["",Ie,Ee,_e]}],"hue-rotate":[{"hue-rotate":[Ie,Ee,_e]}],invert:[{invert:["",Ie,Ee,_e]}],saturate:[{saturate:[Ie,Ee,_e]}],sepia:[{sepia:["",Ie,Ee,_e]}],"backdrop-filter":[{"backdrop-filter":["","none",Ee,_e]}],"backdrop-blur":[{"backdrop-blur":ze()}],"backdrop-brightness":[{"backdrop-brightness":[Ie,Ee,_e]}],"backdrop-contrast":[{"backdrop-contrast":[Ie,Ee,_e]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ie,Ee,_e]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ie,Ee,_e]}],"backdrop-invert":[{"backdrop-invert":["",Ie,Ee,_e]}],"backdrop-opacity":[{"backdrop-opacity":[Ie,Ee,_e]}],"backdrop-saturate":[{"backdrop-saturate":[Ie,Ee,_e]}],"backdrop-sepia":[{"backdrop-sepia":["",Ie,Ee,_e]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":B()}],"border-spacing-x":[{"border-spacing-x":B()}],"border-spacing-y":[{"border-spacing-y":B()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ee,_e]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ie,"initial",Ee,_e]}],ease:[{ease:["linear","initial",C,Ee,_e]}],delay:[{delay:[Ie,Ee,_e]}],animate:[{animate:["none",A,Ee,_e]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,Ee,_e]}],"perspective-origin":[{"perspective-origin":D()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:we()}],"scale-x":[{"scale-x":we()}],"scale-y":[{"scale-y":we()}],"scale-z":[{"scale-z":we()}],"scale-3d":["scale-3d"],skew:[{skew:Pe()}],"skew-x":[{"skew-x":Pe()}],"skew-y":[{"skew-y":Pe()}],transform:[{transform:[Ee,_e,"","none","gpu","cpu"]}],"transform-origin":[{origin:D()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:De()}],"translate-x":[{"translate-x":De()}],"translate-y":[{"translate-y":De()}],"translate-z":[{"translate-z":De()}],"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",Ee,_e]}],"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":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"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",Ee,_e]}],fill:[{fill:["none",...q()]}],"stroke-w":[{stroke:[Ie,di,qr,jd]}],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"]}},yR=Jj(vR);function it(...n){return yR(Db(n))}const Qr=wb,bR=Sb,Vb=y.forwardRef(({className:n,...a},l)=>d.jsx(Oh,{ref:l,className:it("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}));Vb.displayName=Oh.displayName;const dr=y.forwardRef(({className:n,children:a,...l},o)=>d.jsxs(bR,{children:[d.jsx(Vb,{}),d.jsxs(Ah,{ref:o,className:it("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,d.jsxs(FC,{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:[d.jsx(cr,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));dr.displayName=Ah.displayName;const hr=({className:n,...a})=>d.jsx("div",{className:it("flex flex-col space-y-1.5 text-center sm:text-left",n),...a});hr.displayName="DialogHeader";const Zr=({className:n,...a})=>d.jsx("div",{className:it("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",n),...a});Zr.displayName="DialogFooter";const mr=y.forwardRef(({className:n,...a},l)=>d.jsx(_b,{ref:l,className:it("text-lg font-semibold leading-none tracking-tight",n),...a}));mr.displayName=_b.displayName;const qc=y.forwardRef(({className:n,...a},l)=>d.jsx(Eb,{ref:l,className:it("text-sm text-muted-foreground",n),...a}));qc.displayName=Eb.displayName;const Hy=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,By=Db,Dh=(n,a)=>l=>{var o;if(a?.variants==null)return By(n,l?.class,l?.className);const{variants:s,defaultVariants:c}=a,f=Object.keys(s).map(h=>{const v=l?.[h],b=c?.[h];if(v===null)return null;const w=Hy(v)||Hy(b);return s[h][w]}),m=l&&Object.entries(l).reduce((h,v)=>{let[b,w]=v;return w===void 0||(h[b]=w),h},{}),g=a==null||(o=a.compoundVariants)===null||o===void 0?void 0:o.reduce((h,v)=>{let{class:b,className:w,...S}=v;return Object.entries(S).every(N=>{let[E,R]=N;return Array.isArray(R)?R.includes({...c,...m}[E]):{...c,...m}[E]===R})?[...h,b,w]:h},[]);return By(n,f,g,l?.class,l?.className)},xR=Dh("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"}}),xe=y.forwardRef(({className:n,variant:a,size:l,asChild:o=!1,...s},c)=>{const f=o?w2:"button";return d.jsx(f,{className:it(xR({variant:a,size:l,className:n})),ref:c,...s})});xe.displayName="Button";const vt=y.forwardRef(({className:n,type:a,...l},o)=>{const s=a==="number",[c,f]=y.useState(l.value?.toString()||"");y.useEffect(()=>{l.value!==void 0&&f(l.value.toString())},[l.value]);const m=b=>{const w=b.target.value;s?(w===""||/^\d+$/.test(w))&&(f(w),l.onChange&&w!==""&&l.onChange(b)):(f(w),l.onChange&&l.onChange(b))},g=b=>{if(s&&c===""){const w=l.placeholder||"1";if(f(w),l.onChange){const S={...b,target:{...b.target,value:w}};l.onChange(S)}}l.onBlur&&l.onBlur(b)},h=s?"text":a,v=s?c:l.value;return d.jsx("input",{...l,type:h,value:v,onChange:m,onBlur:g,className:it("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:o})});vt.displayName="Input";var wR="Label",Gb=y.forwardRef((n,a)=>d.jsx(lt.label,{...n,ref:a,onMouseDown:l=>{l.target.closest("button, input, select, textarea")||(n.onMouseDown?.(l),!l.defaultPrevented&&l.detail>1&&l.preventDefault())}}));Gb.displayName=wR;var Yb=Gb;const SR=Dh("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ze=y.forwardRef(({className:n,...a},l)=>d.jsx(Yb,{ref:l,className:it(SR(),n),...a}));Ze.displayName=Yb.displayName;function _R(n){const a=y.useRef({value:n,previous:n});return y.useMemo(()=>(a.current.value!==n&&(a.current.previous=a.current.value,a.current.value=n),a.current.previous),[n])}function Kb(n){const[a,l]=y.useState(void 0);return ta(()=>{if(n){l({width:n.offsetWidth,height:n.offsetHeight});const o=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const c=s[0];let f,m;if("borderBoxSize"in c){const g=c.borderBoxSize,h=Array.isArray(g)?g[0]:g;f=h.inlineSize,m=h.blockSize}else f=n.offsetWidth,m=n.offsetHeight;l({width:f,height:m})});return o.observe(n,{box:"border-box"}),()=>o.unobserve(n)}else l(void 0)},[n]),a}var Fc="Switch",[ER,JM]=tl(Fc),[NR,CR]=ER(Fc),Ib=y.forwardRef((n,a)=>{const{__scopeSwitch:l,name:o,checked:s,defaultChecked:c,required:f,disabled:m,value:g="on",onCheckedChange:h,form:v,...b}=n,[w,S]=y.useState(null),N=Gt(a,T=>S(T)),E=y.useRef(!1),R=w?v||!!w.closest("form"):!0,[C,A]=Ti({prop:s,defaultProp:c??!1,onChange:h,caller:Fc});return d.jsxs(NR,{scope:l,checked:C,disabled:m,children:[d.jsx(lt.button,{type:"button",role:"switch","aria-checked":C,"aria-required":f,"data-state":Jb(C),"data-disabled":m?"":void 0,disabled:m,value:g,...b,ref:N,onClick:rn(n.onClick,T=>{A(k=>!k),R&&(E.current=T.isPropagationStopped(),E.current||T.stopPropagation())})}),R&&d.jsx(Zb,{control:w,bubbles:!E.current,name:o,value:g,checked:C,required:f,disabled:m,form:v,style:{transform:"translateX(-100%)"}})]})});Ib.displayName=Fc;var Xb="SwitchThumb",Qb=y.forwardRef((n,a)=>{const{__scopeSwitch:l,...o}=n,s=CR(Xb,l);return d.jsx(lt.span,{"data-state":Jb(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:a})});Qb.displayName=Xb;var jR="SwitchBubbleInput",Zb=y.forwardRef(({__scopeSwitch:n,control:a,checked:l,bubbles:o=!0,...s},c)=>{const f=y.useRef(null),m=Gt(f,c),g=_R(l),h=Kb(a);return y.useEffect(()=>{const v=f.current;if(!v)return;const b=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(b,"checked").set;if(g!==l&&S){const N=new Event("click",{bubbles:o});S.call(v,l),v.dispatchEvent(N)}},[g,l,o]),d.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:l,...s,tabIndex:-1,ref:m,style:{...s.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Zb.displayName=jR;function Jb(n){return n?"checked":"unchecked"}var Wb=Ib,RR=Qb;const th=y.forwardRef(({className:n,...a},l)=>d.jsx(Wb,{className:it("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:d.jsx(RR,{className:it("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")})}));th.displayName=Wb.displayName;var $y=1,OR=.9,AR=.8,TR=.17,Rd=.1,Od=.999,MR=.9999,DR=.99,LR=/[\\\/_+.#"@\[\(\{&]/,kR=/[\\\/_+.#"@\[\(\{&]/g,zR=/[\s-]/,ex=/[\s-]/g;function nh(n,a,l,o,s,c,f){if(c===a.length)return s===n.length?$y:DR;var m=`${s},${c}`;if(f[m]!==void 0)return f[m];for(var g=o.charAt(c),h=l.indexOf(g,s),v=0,b,w,S,N;h>=0;)b=nh(n,a,l,o,h+1,c+1,f),b>v&&(h===s?b*=$y:LR.test(n.charAt(h-1))?(b*=AR,S=n.slice(s,h-1).match(kR),S&&s>0&&(b*=Math.pow(Od,S.length))):zR.test(n.charAt(h-1))?(b*=OR,N=n.slice(s,h-1).match(ex),N&&s>0&&(b*=Math.pow(Od,N.length))):(b*=TR,s>0&&(b*=Math.pow(Od,h-s))),n.charAt(h)!==a.charAt(c)&&(b*=MR)),(b<Rd&&l.charAt(h-1)===o.charAt(c+1)||o.charAt(c+1)===o.charAt(c)&&l.charAt(h-1)!==o.charAt(c))&&(w=nh(n,a,l,o,h+1,c+2,f),w*Rd>b&&(b=w*Rd)),b>v&&(v=b),h=l.indexOf(g,h+1);return f[m]=v,v}function qy(n){return n.toLowerCase().replace(ex," ")}function UR(n,a,l){return n=l&&l.length>0?`${n+" "+l.join(" ")}`:n,nh(n,a,qy(n),qy(a),0,0,{})}var hi='[cmdk-group=""]',Ad='[cmdk-group-items=""]',PR='[cmdk-group-heading=""]',tx='[cmdk-item=""]',Fy=`${tx}:not([aria-disabled="true"])`,ah="cmdk-item-select",Kl="data-value",HR=(n,a,l)=>UR(n,a,l),nx=y.createContext(void 0),Mi=()=>y.useContext(nx),ax=y.createContext(void 0),Lh=()=>y.useContext(ax),rx=y.createContext(void 0),lx=y.forwardRef((n,a)=>{let l=Il(()=>{var H,K;return{search:"",value:(K=(H=n.value)!=null?H:n.defaultValue)!=null?K:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=Il(()=>new Set),s=Il(()=>new Map),c=Il(()=>new Map),f=Il(()=>new Set),m=ox(n),{label:g,children:h,value:v,onValueChange:b,filter:w,shouldFilter:S,loop:N,disablePointerSelection:E=!1,vimBindings:R=!0,...C}=n,A=Tn(),T=Tn(),k=Tn(),D=y.useRef(null),j=QR();Jr(()=>{if(v!==void 0){let H=v.trim();l.current.value=H,U.emit()}},[v]),Jr(()=>{j(6,fe)},[]);let U=y.useMemo(()=>({subscribe:H=>(f.current.add(H),()=>f.current.delete(H)),snapshot:()=>l.current,setState:(H,K,le)=>{var he,ve,be,ze;if(!Object.is(l.current[H],K)){if(l.current[H]=K,H==="search")ie(),ne(),j(1,ee);else if(H==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ae=document.getElementById(k);ae?ae.focus():(he=document.getElementById(A))==null||he.focus()}if(j(7,()=>{var ae;l.current.selectedItemId=(ae=X())==null?void 0:ae.id,U.emit()}),le||j(5,fe),((ve=m.current)==null?void 0:ve.value)!==void 0){let ae=K??"";(ze=(be=m.current).onValueChange)==null||ze.call(be,ae);return}}U.emit()}},emit:()=>{f.current.forEach(H=>H())}}),[]),B=y.useMemo(()=>({value:(H,K,le)=>{var he;K!==((he=c.current.get(H))==null?void 0:he.value)&&(c.current.set(H,{value:K,keywords:le}),l.current.filtered.items.set(H,W(K,le)),j(2,()=>{ne(),U.emit()}))},item:(H,K)=>(o.current.add(H),K&&(s.current.has(K)?s.current.get(K).add(H):s.current.set(K,new Set([H]))),j(3,()=>{ie(),ne(),l.current.value||ee(),U.emit()}),()=>{c.current.delete(H),o.current.delete(H),l.current.filtered.items.delete(H);let le=X();j(4,()=>{ie(),le?.getAttribute("id")===H&&ee(),U.emit()})}),group:H=>(s.current.has(H)||s.current.set(H,new Set),()=>{c.current.delete(H),s.current.delete(H)}),filter:()=>m.current.shouldFilter,label:g||n["aria-label"],getDisablePointerSelection:()=>m.current.disablePointerSelection,listId:A,inputId:k,labelId:T,listInnerRef:D}),[]);function W(H,K){var le,he;let ve=(he=(le=m.current)==null?void 0:le.filter)!=null?he:HR;return H?ve(H,l.current.search,K):0}function ne(){if(!l.current.search||m.current.shouldFilter===!1)return;let H=l.current.filtered.items,K=[];l.current.filtered.groups.forEach(he=>{let ve=s.current.get(he),be=0;ve.forEach(ze=>{let ae=H.get(ze);be=Math.max(ae,be)}),K.push([he,be])});let le=D.current;te().sort((he,ve)=>{var be,ze;let ae=he.getAttribute("id"),we=ve.getAttribute("id");return((be=H.get(we))!=null?be:0)-((ze=H.get(ae))!=null?ze:0)}).forEach(he=>{let ve=he.closest(Ad);ve?ve.appendChild(he.parentElement===ve?he:he.closest(`${Ad} > *`)):le.appendChild(he.parentElement===le?he:he.closest(`${Ad} > *`))}),K.sort((he,ve)=>ve[1]-he[1]).forEach(he=>{var ve;let be=(ve=D.current)==null?void 0:ve.querySelector(`${hi}[${Kl}="${encodeURIComponent(he[0])}"]`);be?.parentElement.appendChild(be)})}function ee(){let H=te().find(le=>le.getAttribute("aria-disabled")!=="true"),K=H?.getAttribute(Kl);U.setState("value",K||void 0)}function ie(){var H,K,le,he;if(!l.current.search||m.current.shouldFilter===!1){l.current.filtered.count=o.current.size;return}l.current.filtered.groups=new Set;let ve=0;for(let be of o.current){let ze=(K=(H=c.current.get(be))==null?void 0:H.value)!=null?K:"",ae=(he=(le=c.current.get(be))==null?void 0:le.keywords)!=null?he:[],we=W(ze,ae);l.current.filtered.items.set(be,we),we>0&&ve++}for(let[be,ze]of s.current)for(let ae of ze)if(l.current.filtered.items.get(ae)>0){l.current.filtered.groups.add(be);break}l.current.filtered.count=ve}function fe(){var H,K,le;let he=X();he&&(((H=he.parentElement)==null?void 0:H.firstChild)===he&&((le=(K=he.closest(hi))==null?void 0:K.querySelector(PR))==null||le.scrollIntoView({block:"nearest"})),he.scrollIntoView({block:"nearest"}))}function X(){var H;return(H=D.current)==null?void 0:H.querySelector(`${tx}[aria-selected="true"]`)}function te(){var H;return Array.from(((H=D.current)==null?void 0:H.querySelectorAll(Fy))||[])}function O(H){let K=te()[H];K&&U.setState("value",K.getAttribute(Kl))}function I(H){var K;let le=X(),he=te(),ve=he.findIndex(ze=>ze===le),be=he[ve+H];(K=m.current)!=null&&K.loop&&(be=ve+H<0?he[he.length-1]:ve+H===he.length?he[0]:he[ve+H]),be&&U.setState("value",be.getAttribute(Kl))}function q(H){let K=X(),le=K?.closest(hi),he;for(;le&&!he;)le=H>0?IR(le,hi):XR(le,hi),he=le?.querySelector(Fy);he?U.setState("value",he.getAttribute(Kl)):I(H)}let ye=()=>O(te().length-1),M=H=>{H.preventDefault(),H.metaKey?ye():H.altKey?q(1):I(1)},Y=H=>{H.preventDefault(),H.metaKey?O(0):H.altKey?q(-1):I(-1)};return y.createElement(lt.div,{ref:a,tabIndex:-1,...C,"cmdk-root":"",onKeyDown:H=>{var K;(K=C.onKeyDown)==null||K.call(C,H);let le=H.nativeEvent.isComposing||H.keyCode===229;if(!(H.defaultPrevented||le))switch(H.key){case"n":case"j":{R&&H.ctrlKey&&M(H);break}case"ArrowDown":{M(H);break}case"p":case"k":{R&&H.ctrlKey&&Y(H);break}case"ArrowUp":{Y(H);break}case"Home":{H.preventDefault(),O(0);break}case"End":{H.preventDefault(),ye();break}case"Enter":{H.preventDefault();let he=X();if(he){let ve=new Event(ah);he.dispatchEvent(ve)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:B.inputId,id:B.labelId,style:JR},g),Vc(n,H=>y.createElement(ax.Provider,{value:U},y.createElement(nx.Provider,{value:B},H))))}),BR=y.forwardRef((n,a)=>{var l,o;let s=Tn(),c=y.useRef(null),f=y.useContext(rx),m=Mi(),g=ox(n),h=(o=(l=g.current)==null?void 0:l.forceMount)!=null?o:f?.forceMount;Jr(()=>{if(!h)return m.item(s,f?.id)},[h]);let v=ix(s,c,[n.value,n.children,c],n.keywords),b=Lh(),w=pr(j=>j.value&&j.value===v.current),S=pr(j=>h||m.filter()===!1?!0:j.search?j.filtered.items.get(s)>0:!0);y.useEffect(()=>{let j=c.current;if(!(!j||n.disabled))return j.addEventListener(ah,N),()=>j.removeEventListener(ah,N)},[S,n.onSelect,n.disabled]);function N(){var j,U;E(),(U=(j=g.current).onSelect)==null||U.call(j,v.current)}function E(){b.setState("value",v.current,!0)}if(!S)return null;let{disabled:R,value:C,onSelect:A,forceMount:T,keywords:k,...D}=n;return y.createElement(lt.div,{ref:Kr(c,a),...D,id:s,"cmdk-item":"",role:"option","aria-disabled":!!R,"aria-selected":!!w,"data-disabled":!!R,"data-selected":!!w,onPointerMove:R||m.getDisablePointerSelection()?void 0:E,onClick:R?void 0:N},n.children)}),$R=y.forwardRef((n,a)=>{let{heading:l,children:o,forceMount:s,...c}=n,f=Tn(),m=y.useRef(null),g=y.useRef(null),h=Tn(),v=Mi(),b=pr(S=>s||v.filter()===!1?!0:S.search?S.filtered.groups.has(f):!0);Jr(()=>v.group(f),[]),ix(f,m,[n.value,n.heading,g]);let w=y.useMemo(()=>({id:f,forceMount:s}),[s]);return y.createElement(lt.div,{ref:Kr(m,a),...c,"cmdk-group":"",role:"presentation",hidden:b?void 0:!0},l&&y.createElement("div",{ref:g,"cmdk-group-heading":"","aria-hidden":!0,id:h},l),Vc(n,S=>y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":l?h:void 0},y.createElement(rx.Provider,{value:w},S))))}),qR=y.forwardRef((n,a)=>{let{alwaysRender:l,...o}=n,s=y.useRef(null),c=pr(f=>!f.search);return!l&&!c?null:y.createElement(lt.div,{ref:Kr(s,a),...o,"cmdk-separator":"",role:"separator"})}),FR=y.forwardRef((n,a)=>{let{onValueChange:l,...o}=n,s=n.value!=null,c=Lh(),f=pr(h=>h.search),m=pr(h=>h.selectedItemId),g=Mi();return y.useEffect(()=>{n.value!=null&&c.setState("search",n.value)},[n.value]),y.createElement(lt.input,{ref:a,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":g.listId,"aria-labelledby":g.labelId,"aria-activedescendant":m,id:g.inputId,type:"text",value:s?n.value:f,onChange:h=>{s||c.setState("search",h.target.value),l?.(h.target.value)}})}),VR=y.forwardRef((n,a)=>{let{children:l,label:o="Suggestions",...s}=n,c=y.useRef(null),f=y.useRef(null),m=pr(h=>h.selectedItemId),g=Mi();return y.useEffect(()=>{if(f.current&&c.current){let h=f.current,v=c.current,b,w=new ResizeObserver(()=>{b=requestAnimationFrame(()=>{let S=h.offsetHeight;v.style.setProperty("--cmdk-list-height",S.toFixed(1)+"px")})});return w.observe(h),()=>{cancelAnimationFrame(b),w.unobserve(h)}}},[]),y.createElement(lt.div,{ref:Kr(c,a),...s,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":m,"aria-label":o,id:g.listId},Vc(n,h=>y.createElement("div",{ref:Kr(f,g.listInnerRef),"cmdk-list-sizer":""},h)))}),GR=y.forwardRef((n,a)=>{let{open:l,onOpenChange:o,overlayClassName:s,contentClassName:c,container:f,...m}=n;return y.createElement(wb,{open:l,onOpenChange:o},y.createElement(Sb,{container:f},y.createElement(Oh,{"cmdk-overlay":"",className:s}),y.createElement(Ah,{"aria-label":n.label,"cmdk-dialog":"",className:c},y.createElement(lx,{ref:a,...m}))))}),YR=y.forwardRef((n,a)=>pr(l=>l.filtered.count===0)?y.createElement(lt.div,{ref:a,...n,"cmdk-empty":"",role:"presentation"}):null),KR=y.forwardRef((n,a)=>{let{progress:l,children:o,label:s="Loading...",...c}=n;return y.createElement(lt.div,{ref:a,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":l,"aria-valuemin":0,"aria-valuemax":100,"aria-label":s},Vc(n,f=>y.createElement("div",{"aria-hidden":!0},f)))}),io=Object.assign(lx,{List:VR,Item:BR,Input:FR,Group:$R,Separator:qR,Dialog:GR,Empty:YR,Loading:KR});function IR(n,a){let l=n.nextElementSibling;for(;l;){if(l.matches(a))return l;l=l.nextElementSibling}}function XR(n,a){let l=n.previousElementSibling;for(;l;){if(l.matches(a))return l;l=l.previousElementSibling}}function ox(n){let a=y.useRef(n);return Jr(()=>{a.current=n}),a}var Jr=typeof window>"u"?y.useEffect:y.useLayoutEffect;function Il(n){let a=y.useRef();return a.current===void 0&&(a.current=n()),a}function pr(n){let a=Lh(),l=()=>n(a.snapshot());return y.useSyncExternalStore(a.subscribe,l,l)}function ix(n,a,l,o=[]){let s=y.useRef(),c=Mi();return Jr(()=>{var f;let m=(()=>{var h;for(let v of l){if(typeof v=="string")return v.trim();if(typeof v=="object"&&"current"in v)return v.current?(h=v.current.textContent)==null?void 0:h.trim():s.current}})(),g=o.map(h=>h.trim());c.value(n,m,g),(f=a.current)==null||f.setAttribute(Kl,m),s.current=m}),s}var QR=()=>{let[n,a]=y.useState(),l=Il(()=>new Map);return Jr(()=>{l.current.forEach(o=>o()),l.current=new Map},[n]),(o,s)=>{l.current.set(o,s),a({})}};function ZR(n){let a=n.type;return typeof a=="function"?a(n.props):"render"in a?a.render(n.props):n}function Vc({asChild:n,children:a},l){return n&&y.isValidElement(a)?y.cloneElement(ZR(a),{ref:a.ref},l(a.props.children)):l(a)}var JR={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function sx({className:n,...a}){return d.jsx(io,{"data-slot":"command",className:it("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",n),...a})}function cx({className:n,...a}){return d.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[d.jsx(Tb,{className:"size-4 shrink-0 opacity-50"}),d.jsx(io.Input,{"data-slot":"command-input",className:it("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 ux({className:n,...a}){return d.jsx(io.List,{"data-slot":"command-list",className:it("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",n),...a})}function fx({...n}){return d.jsx(io.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...n})}function dx({className:n,...a}){return d.jsx(io.Group,{"data-slot":"command-group",className:it("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 hx({className:n,...a}){return d.jsx(io.Item,{"data-slot":"command-item",className:it("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 WR=["top","right","bottom","left"],gr=Math.min,gn=Math.max,Rc=Math.round,sc=Math.floor,ea=n=>({x:n,y:n}),eO={left:"right",right:"left",bottom:"top",top:"bottom"},tO={start:"end",end:"start"};function rh(n,a,l){return gn(n,gr(a,l))}function Ca(n,a){return typeof n=="function"?n(a):n}function ja(n){return n.split("-")[0]}function so(n){return n.split("-")[1]}function kh(n){return n==="x"?"y":"x"}function zh(n){return n==="y"?"height":"width"}const nO=new Set(["top","bottom"]);function Jn(n){return nO.has(ja(n))?"y":"x"}function Uh(n){return kh(Jn(n))}function aO(n,a,l){l===void 0&&(l=!1);const o=so(n),s=Uh(n),c=zh(s);let f=s==="x"?o===(l?"end":"start")?"right":"left":o==="start"?"bottom":"top";return a.reference[c]>a.floating[c]&&(f=Oc(f)),[f,Oc(f)]}function rO(n){const a=Oc(n);return[lh(n),a,lh(a)]}function lh(n){return n.replace(/start|end/g,a=>tO[a])}const Vy=["left","right"],Gy=["right","left"],lO=["top","bottom"],oO=["bottom","top"];function iO(n,a,l){switch(n){case"top":case"bottom":return l?a?Gy:Vy:a?Vy:Gy;case"left":case"right":return a?lO:oO;default:return[]}}function sO(n,a,l,o){const s=so(n);let c=iO(ja(n),l==="start",o);return s&&(c=c.map(f=>f+"-"+s),a&&(c=c.concat(c.map(lh)))),c}function Oc(n){return n.replace(/left|right|bottom|top/g,a=>eO[a])}function cO(n){return{top:0,right:0,bottom:0,left:0,...n}}function mx(n){return typeof n!="number"?cO(n):{top:n,right:n,bottom:n,left:n}}function Ac(n){const{x:a,y:l,width:o,height:s}=n;return{width:o,height:s,top:l,left:a,right:a+o,bottom:l+s,x:a,y:l}}function Yy(n,a,l){let{reference:o,floating:s}=n;const c=Jn(a),f=Uh(a),m=zh(f),g=ja(a),h=c==="y",v=o.x+o.width/2-s.width/2,b=o.y+o.height/2-s.height/2,w=o[m]/2-s[m]/2;let S;switch(g){case"top":S={x:v,y:o.y-s.height};break;case"bottom":S={x:v,y:o.y+o.height};break;case"right":S={x:o.x+o.width,y:b};break;case"left":S={x:o.x-s.width,y:b};break;default:S={x:o.x,y:o.y}}switch(so(a)){case"start":S[f]-=w*(l&&h?-1:1);break;case"end":S[f]+=w*(l&&h?-1:1);break}return S}const uO=async(n,a,l)=>{const{placement:o="bottom",strategy:s="absolute",middleware:c=[],platform:f}=l,m=c.filter(Boolean),g=await(f.isRTL==null?void 0:f.isRTL(a));let h=await f.getElementRects({reference:n,floating:a,strategy:s}),{x:v,y:b}=Yy(h,o,g),w=o,S={},N=0;for(let E=0;E<m.length;E++){const{name:R,fn:C}=m[E],{x:A,y:T,data:k,reset:D}=await C({x:v,y:b,initialPlacement:o,placement:w,strategy:s,middlewareData:S,rects:h,platform:f,elements:{reference:n,floating:a}});v=A??v,b=T??b,S={...S,[R]:{...S[R],...k}},D&&N<=50&&(N++,typeof D=="object"&&(D.placement&&(w=D.placement),D.rects&&(h=D.rects===!0?await f.getElementRects({reference:n,floating:a,strategy:s}):D.rects),{x:v,y:b}=Yy(h,w,g)),E=-1)}return{x:v,y:b,placement:w,strategy:s,middlewareData:S}};async function Ni(n,a){var l;a===void 0&&(a={});const{x:o,y:s,platform:c,rects:f,elements:m,strategy:g}=n,{boundary:h="clippingAncestors",rootBoundary:v="viewport",elementContext:b="floating",altBoundary:w=!1,padding:S=0}=Ca(a,n),N=mx(S),R=m[w?b==="floating"?"reference":"floating":b],C=Ac(await c.getClippingRect({element:(l=await(c.isElement==null?void 0:c.isElement(R)))==null||l?R:R.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(m.floating)),boundary:h,rootBoundary:v,strategy:g})),A=b==="floating"?{x:o,y:s,width:f.floating.width,height:f.floating.height}:f.reference,T=await(c.getOffsetParent==null?void 0:c.getOffsetParent(m.floating)),k=await(c.isElement==null?void 0:c.isElement(T))?await(c.getScale==null?void 0:c.getScale(T))||{x:1,y:1}:{x:1,y:1},D=Ac(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:A,offsetParent:T,strategy:g}):A);return{top:(C.top-D.top+N.top)/k.y,bottom:(D.bottom-C.bottom+N.bottom)/k.y,left:(C.left-D.left+N.left)/k.x,right:(D.right-C.right+N.right)/k.x}}const fO=n=>({name:"arrow",options:n,async fn(a){const{x:l,y:o,placement:s,rects:c,platform:f,elements:m,middlewareData:g}=a,{element:h,padding:v=0}=Ca(n,a)||{};if(h==null)return{};const b=mx(v),w={x:l,y:o},S=Uh(s),N=zh(S),E=await f.getDimensions(h),R=S==="y",C=R?"top":"left",A=R?"bottom":"right",T=R?"clientHeight":"clientWidth",k=c.reference[N]+c.reference[S]-w[S]-c.floating[N],D=w[S]-c.reference[S],j=await(f.getOffsetParent==null?void 0:f.getOffsetParent(h));let U=j?j[T]:0;(!U||!await(f.isElement==null?void 0:f.isElement(j)))&&(U=m.floating[T]||c.floating[N]);const B=k/2-D/2,W=U/2-E[N]/2-1,ne=gr(b[C],W),ee=gr(b[A],W),ie=ne,fe=U-E[N]-ee,X=U/2-E[N]/2+B,te=rh(ie,X,fe),O=!g.arrow&&so(s)!=null&&X!==te&&c.reference[N]/2-(X<ie?ne:ee)-E[N]/2<0,I=O?X<ie?X-ie:X-fe:0;return{[S]:w[S]+I,data:{[S]:te,centerOffset:X-te-I,...O&&{alignmentOffset:I}},reset:O}}}),dO=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(a){var l,o;const{placement:s,middlewareData:c,rects:f,initialPlacement:m,platform:g,elements:h}=a,{mainAxis:v=!0,crossAxis:b=!0,fallbackPlacements:w,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:N="none",flipAlignment:E=!0,...R}=Ca(n,a);if((l=c.arrow)!=null&&l.alignmentOffset)return{};const C=ja(s),A=Jn(m),T=ja(m)===m,k=await(g.isRTL==null?void 0:g.isRTL(h.floating)),D=w||(T||!E?[Oc(m)]:rO(m)),j=N!=="none";!w&&j&&D.push(...sO(m,E,N,k));const U=[m,...D],B=await Ni(a,R),W=[];let ne=((o=c.flip)==null?void 0:o.overflows)||[];if(v&&W.push(B[C]),b){const X=aO(s,f,k);W.push(B[X[0]],B[X[1]])}if(ne=[...ne,{placement:s,overflows:W}],!W.every(X=>X<=0)){var ee,ie;const X=(((ee=c.flip)==null?void 0:ee.index)||0)+1,te=U[X];if(te&&(!(b==="alignment"?A!==Jn(te):!1)||ne.every(q=>q.overflows[0]>0&&Jn(q.placement)===A)))return{data:{index:X,overflows:ne},reset:{placement:te}};let O=(ie=ne.filter(I=>I.overflows[0]<=0).sort((I,q)=>I.overflows[1]-q.overflows[1])[0])==null?void 0:ie.placement;if(!O)switch(S){case"bestFit":{var fe;const I=(fe=ne.filter(q=>{if(j){const ye=Jn(q.placement);return ye===A||ye==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(ye=>ye>0).reduce((ye,M)=>ye+M,0)]).sort((q,ye)=>q[1]-ye[1])[0])==null?void 0:fe[0];I&&(O=I);break}case"initialPlacement":O=m;break}if(s!==O)return{reset:{placement:O}}}return{}}}};function Ky(n,a){return{top:n.top-a.height,right:n.right-a.width,bottom:n.bottom-a.height,left:n.left-a.width}}function Iy(n){return WR.some(a=>n[a]>=0)}const hO=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(a){const{rects:l}=a,{strategy:o="referenceHidden",...s}=Ca(n,a);switch(o){case"referenceHidden":{const c=await Ni(a,{...s,elementContext:"reference"}),f=Ky(c,l.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:Iy(f)}}}case"escaped":{const c=await Ni(a,{...s,altBoundary:!0}),f=Ky(c,l.floating);return{data:{escapedOffsets:f,escaped:Iy(f)}}}default:return{}}}}},px=new Set(["left","top"]);async function mO(n,a){const{placement:l,platform:o,elements:s}=n,c=await(o.isRTL==null?void 0:o.isRTL(s.floating)),f=ja(l),m=so(l),g=Jn(l)==="y",h=px.has(f)?-1:1,v=c&&g?-1:1,b=Ca(a,n);let{mainAxis:w,crossAxis:S,alignmentAxis:N}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return m&&typeof N=="number"&&(S=m==="end"?N*-1:N),g?{x:S*v,y:w*h}:{x:w*h,y:S*v}}const pO=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(a){var l,o;const{x:s,y:c,placement:f,middlewareData:m}=a,g=await mO(a,n);return f===((l=m.offset)==null?void 0:l.placement)&&(o=m.arrow)!=null&&o.alignmentOffset?{}:{x:s+g.x,y:c+g.y,data:{...g,placement:f}}}}},gO=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(a){const{x:l,y:o,placement:s}=a,{mainAxis:c=!0,crossAxis:f=!1,limiter:m={fn:R=>{let{x:C,y:A}=R;return{x:C,y:A}}},...g}=Ca(n,a),h={x:l,y:o},v=await Ni(a,g),b=Jn(ja(s)),w=kh(b);let S=h[w],N=h[b];if(c){const R=w==="y"?"top":"left",C=w==="y"?"bottom":"right",A=S+v[R],T=S-v[C];S=rh(A,S,T)}if(f){const R=b==="y"?"top":"left",C=b==="y"?"bottom":"right",A=N+v[R],T=N-v[C];N=rh(A,N,T)}const E=m.fn({...a,[w]:S,[b]:N});return{...E,data:{x:E.x-l,y:E.y-o,enabled:{[w]:c,[b]:f}}}}}},vO=function(n){return n===void 0&&(n={}),{options:n,fn(a){const{x:l,y:o,placement:s,rects:c,middlewareData:f}=a,{offset:m=0,mainAxis:g=!0,crossAxis:h=!0}=Ca(n,a),v={x:l,y:o},b=Jn(s),w=kh(b);let S=v[w],N=v[b];const E=Ca(m,a),R=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(g){const T=w==="y"?"height":"width",k=c.reference[w]-c.floating[T]+R.mainAxis,D=c.reference[w]+c.reference[T]-R.mainAxis;S<k?S=k:S>D&&(S=D)}if(h){var C,A;const T=w==="y"?"width":"height",k=px.has(ja(s)),D=c.reference[b]-c.floating[T]+(k&&((C=f.offset)==null?void 0:C[b])||0)+(k?0:R.crossAxis),j=c.reference[b]+c.reference[T]+(k?0:((A=f.offset)==null?void 0:A[b])||0)-(k?R.crossAxis:0);N<D?N=D:N>j&&(N=j)}return{[w]:S,[b]:N}}}},yO=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(a){var l,o;const{placement:s,rects:c,platform:f,elements:m}=a,{apply:g=()=>{},...h}=Ca(n,a),v=await Ni(a,h),b=ja(s),w=so(s),S=Jn(s)==="y",{width:N,height:E}=c.floating;let R,C;b==="top"||b==="bottom"?(R=b,C=w===(await(f.isRTL==null?void 0:f.isRTL(m.floating))?"start":"end")?"left":"right"):(C=b,R=w==="end"?"top":"bottom");const A=E-v.top-v.bottom,T=N-v.left-v.right,k=gr(E-v[R],A),D=gr(N-v[C],T),j=!a.middlewareData.shift;let U=k,B=D;if((l=a.middlewareData.shift)!=null&&l.enabled.x&&(B=T),(o=a.middlewareData.shift)!=null&&o.enabled.y&&(U=A),j&&!w){const ne=gn(v.left,0),ee=gn(v.right,0),ie=gn(v.top,0),fe=gn(v.bottom,0);S?B=N-2*(ne!==0||ee!==0?ne+ee:gn(v.left,v.right)):U=E-2*(ie!==0||fe!==0?ie+fe:gn(v.top,v.bottom))}await g({...a,availableWidth:B,availableHeight:U});const W=await f.getDimensions(m.floating);return N!==W.width||E!==W.height?{reset:{rects:!0}}:{}}}};function Gc(){return typeof window<"u"}function co(n){return gx(n)?(n.nodeName||"").toLowerCase():"#document"}function vn(n){var a;return(n==null||(a=n.ownerDocument)==null?void 0:a.defaultView)||window}function la(n){var a;return(a=(gx(n)?n.ownerDocument:n.document)||window.document)==null?void 0:a.documentElement}function gx(n){return Gc()?n instanceof Node||n instanceof vn(n).Node:!1}function Un(n){return Gc()?n instanceof Element||n instanceof vn(n).Element:!1}function aa(n){return Gc()?n instanceof HTMLElement||n instanceof vn(n).HTMLElement:!1}function Xy(n){return!Gc()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof vn(n).ShadowRoot}const bO=new Set(["inline","contents"]);function Di(n){const{overflow:a,overflowX:l,overflowY:o,display:s}=Pn(n);return/auto|scroll|overlay|hidden|clip/.test(a+o+l)&&!bO.has(s)}const xO=new Set(["table","td","th"]);function wO(n){return xO.has(co(n))}const SO=[":popover-open",":modal"];function Yc(n){return SO.some(a=>{try{return n.matches(a)}catch{return!1}})}const _O=["transform","translate","scale","rotate","perspective"],EO=["transform","translate","scale","rotate","perspective","filter"],NO=["paint","layout","strict","content"];function Ph(n){const a=Hh(),l=Un(n)?Pn(n):n;return _O.some(o=>l[o]?l[o]!=="none":!1)||(l.containerType?l.containerType!=="normal":!1)||!a&&(l.backdropFilter?l.backdropFilter!=="none":!1)||!a&&(l.filter?l.filter!=="none":!1)||EO.some(o=>(l.willChange||"").includes(o))||NO.some(o=>(l.contain||"").includes(o))}function CO(n){let a=vr(n);for(;aa(a)&&!eo(a);){if(Ph(a))return a;if(Yc(a))return null;a=vr(a)}return null}function Hh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const jO=new Set(["html","body","#document"]);function eo(n){return jO.has(co(n))}function Pn(n){return vn(n).getComputedStyle(n)}function Kc(n){return Un(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function vr(n){if(co(n)==="html")return n;const a=n.assignedSlot||n.parentNode||Xy(n)&&n.host||la(n);return Xy(a)?a.host:a}function vx(n){const a=vr(n);return eo(a)?n.ownerDocument?n.ownerDocument.body:n.body:aa(a)&&Di(a)?a:vx(a)}function Ci(n,a,l){var o;a===void 0&&(a=[]),l===void 0&&(l=!0);const s=vx(n),c=s===((o=n.ownerDocument)==null?void 0:o.body),f=vn(s);if(c){const m=oh(f);return a.concat(f,f.visualViewport||[],Di(s)?s:[],m&&l?Ci(m):[])}return a.concat(s,Ci(s,[],l))}function oh(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function yx(n){const a=Pn(n);let l=parseFloat(a.width)||0,o=parseFloat(a.height)||0;const s=aa(n),c=s?n.offsetWidth:l,f=s?n.offsetHeight:o,m=Rc(l)!==c||Rc(o)!==f;return m&&(l=c,o=f),{width:l,height:o,$:m}}function Bh(n){return Un(n)?n:n.contextElement}function Jl(n){const a=Bh(n);if(!aa(a))return ea(1);const l=a.getBoundingClientRect(),{width:o,height:s,$:c}=yx(a);let f=(c?Rc(l.width):l.width)/o,m=(c?Rc(l.height):l.height)/s;return(!f||!Number.isFinite(f))&&(f=1),(!m||!Number.isFinite(m))&&(m=1),{x:f,y:m}}const RO=ea(0);function bx(n){const a=vn(n);return!Hh()||!a.visualViewport?RO:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function OO(n,a,l){return a===void 0&&(a=!1),!l||a&&l!==vn(n)?!1:a}function Wr(n,a,l,o){a===void 0&&(a=!1),l===void 0&&(l=!1);const s=n.getBoundingClientRect(),c=Bh(n);let f=ea(1);a&&(o?Un(o)&&(f=Jl(o)):f=Jl(n));const m=OO(c,l,o)?bx(c):ea(0);let g=(s.left+m.x)/f.x,h=(s.top+m.y)/f.y,v=s.width/f.x,b=s.height/f.y;if(c){const w=vn(c),S=o&&Un(o)?vn(o):o;let N=w,E=oh(N);for(;E&&o&&S!==N;){const R=Jl(E),C=E.getBoundingClientRect(),A=Pn(E),T=C.left+(E.clientLeft+parseFloat(A.paddingLeft))*R.x,k=C.top+(E.clientTop+parseFloat(A.paddingTop))*R.y;g*=R.x,h*=R.y,v*=R.x,b*=R.y,g+=T,h+=k,N=vn(E),E=oh(N)}}return Ac({width:v,height:b,x:g,y:h})}function $h(n,a){const l=Kc(n).scrollLeft;return a?a.left+l:Wr(la(n)).left+l}function xx(n,a,l){l===void 0&&(l=!1);const o=n.getBoundingClientRect(),s=o.left+a.scrollLeft-(l?0:$h(n,o)),c=o.top+a.scrollTop;return{x:s,y:c}}function AO(n){let{elements:a,rect:l,offsetParent:o,strategy:s}=n;const c=s==="fixed",f=la(o),m=a?Yc(a.floating):!1;if(o===f||m&&c)return l;let g={scrollLeft:0,scrollTop:0},h=ea(1);const v=ea(0),b=aa(o);if((b||!b&&!c)&&((co(o)!=="body"||Di(f))&&(g=Kc(o)),aa(o))){const S=Wr(o);h=Jl(o),v.x=S.x+o.clientLeft,v.y=S.y+o.clientTop}const w=f&&!b&&!c?xx(f,g,!0):ea(0);return{width:l.width*h.x,height:l.height*h.y,x:l.x*h.x-g.scrollLeft*h.x+v.x+w.x,y:l.y*h.y-g.scrollTop*h.y+v.y+w.y}}function TO(n){return Array.from(n.getClientRects())}function MO(n){const a=la(n),l=Kc(n),o=n.ownerDocument.body,s=gn(a.scrollWidth,a.clientWidth,o.scrollWidth,o.clientWidth),c=gn(a.scrollHeight,a.clientHeight,o.scrollHeight,o.clientHeight);let f=-l.scrollLeft+$h(n);const m=-l.scrollTop;return Pn(o).direction==="rtl"&&(f+=gn(a.clientWidth,o.clientWidth)-s),{width:s,height:c,x:f,y:m}}function DO(n,a){const l=vn(n),o=la(n),s=l.visualViewport;let c=o.clientWidth,f=o.clientHeight,m=0,g=0;if(s){c=s.width,f=s.height;const h=Hh();(!h||h&&a==="fixed")&&(m=s.offsetLeft,g=s.offsetTop)}return{width:c,height:f,x:m,y:g}}const LO=new Set(["absolute","fixed"]);function kO(n,a){const l=Wr(n,!0,a==="fixed"),o=l.top+n.clientTop,s=l.left+n.clientLeft,c=aa(n)?Jl(n):ea(1),f=n.clientWidth*c.x,m=n.clientHeight*c.y,g=s*c.x,h=o*c.y;return{width:f,height:m,x:g,y:h}}function Qy(n,a,l){let o;if(a==="viewport")o=DO(n,l);else if(a==="document")o=MO(la(n));else if(Un(a))o=kO(a,l);else{const s=bx(n);o={x:a.x-s.x,y:a.y-s.y,width:a.width,height:a.height}}return Ac(o)}function wx(n,a){const l=vr(n);return l===a||!Un(l)||eo(l)?!1:Pn(l).position==="fixed"||wx(l,a)}function zO(n,a){const l=a.get(n);if(l)return l;let o=Ci(n,[],!1).filter(m=>Un(m)&&co(m)!=="body"),s=null;const c=Pn(n).position==="fixed";let f=c?vr(n):n;for(;Un(f)&&!eo(f);){const m=Pn(f),g=Ph(f);!g&&m.position==="fixed"&&(s=null),(c?!g&&!s:!g&&m.position==="static"&&!!s&&LO.has(s.position)||Di(f)&&!g&&wx(n,f))?o=o.filter(v=>v!==f):s=m,f=vr(f)}return a.set(n,o),o}function UO(n){let{element:a,boundary:l,rootBoundary:o,strategy:s}=n;const f=[...l==="clippingAncestors"?Yc(a)?[]:zO(a,this._c):[].concat(l),o],m=f[0],g=f.reduce((h,v)=>{const b=Qy(a,v,s);return h.top=gn(b.top,h.top),h.right=gr(b.right,h.right),h.bottom=gr(b.bottom,h.bottom),h.left=gn(b.left,h.left),h},Qy(a,m,s));return{width:g.right-g.left,height:g.bottom-g.top,x:g.left,y:g.top}}function PO(n){const{width:a,height:l}=yx(n);return{width:a,height:l}}function HO(n,a,l){const o=aa(a),s=la(a),c=l==="fixed",f=Wr(n,!0,c,a);let m={scrollLeft:0,scrollTop:0};const g=ea(0);function h(){g.x=$h(s)}if(o||!o&&!c)if((co(a)!=="body"||Di(s))&&(m=Kc(a)),o){const S=Wr(a,!0,c,a);g.x=S.x+a.clientLeft,g.y=S.y+a.clientTop}else s&&h();c&&!o&&s&&h();const v=s&&!o&&!c?xx(s,m):ea(0),b=f.left+m.scrollLeft-g.x-v.x,w=f.top+m.scrollTop-g.y-v.y;return{x:b,y:w,width:f.width,height:f.height}}function Td(n){return Pn(n).position==="static"}function Zy(n,a){if(!aa(n)||Pn(n).position==="fixed")return null;if(a)return a(n);let l=n.offsetParent;return la(n)===l&&(l=l.ownerDocument.body),l}function Sx(n,a){const l=vn(n);if(Yc(n))return l;if(!aa(n)){let s=vr(n);for(;s&&!eo(s);){if(Un(s)&&!Td(s))return s;s=vr(s)}return l}let o=Zy(n,a);for(;o&&wO(o)&&Td(o);)o=Zy(o,a);return o&&eo(o)&&Td(o)&&!Ph(o)?l:o||CO(n)||l}const BO=async function(n){const a=this.getOffsetParent||Sx,l=this.getDimensions,o=await l(n.floating);return{reference:HO(n.reference,await a(n.floating),n.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function $O(n){return Pn(n).direction==="rtl"}const qO={convertOffsetParentRelativeRectToViewportRelativeRect:AO,getDocumentElement:la,getClippingRect:UO,getOffsetParent:Sx,getElementRects:BO,getClientRects:TO,getDimensions:PO,getScale:Jl,isElement:Un,isRTL:$O};function _x(n,a){return n.x===a.x&&n.y===a.y&&n.width===a.width&&n.height===a.height}function FO(n,a){let l=null,o;const s=la(n);function c(){var m;clearTimeout(o),(m=l)==null||m.disconnect(),l=null}function f(m,g){m===void 0&&(m=!1),g===void 0&&(g=1),c();const h=n.getBoundingClientRect(),{left:v,top:b,width:w,height:S}=h;if(m||a(),!w||!S)return;const N=sc(b),E=sc(s.clientWidth-(v+w)),R=sc(s.clientHeight-(b+S)),C=sc(v),T={rootMargin:-N+"px "+-E+"px "+-R+"px "+-C+"px",threshold:gn(0,gr(1,g))||1};let k=!0;function D(j){const U=j[0].intersectionRatio;if(U!==g){if(!k)return f();U?f(!1,U):o=setTimeout(()=>{f(!1,1e-7)},1e3)}U===1&&!_x(h,n.getBoundingClientRect())&&f(),k=!1}try{l=new IntersectionObserver(D,{...T,root:s.ownerDocument})}catch{l=new IntersectionObserver(D,T)}l.observe(n)}return f(!0),c}function VO(n,a,l,o){o===void 0&&(o={});const{ancestorScroll:s=!0,ancestorResize:c=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:g=!1}=o,h=Bh(n),v=s||c?[...h?Ci(h):[],...Ci(a)]:[];v.forEach(C=>{s&&C.addEventListener("scroll",l,{passive:!0}),c&&C.addEventListener("resize",l)});const b=h&&m?FO(h,l):null;let w=-1,S=null;f&&(S=new ResizeObserver(C=>{let[A]=C;A&&A.target===h&&S&&(S.unobserve(a),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var T;(T=S)==null||T.observe(a)})),l()}),h&&!g&&S.observe(h),S.observe(a));let N,E=g?Wr(n):null;g&&R();function R(){const C=Wr(n);E&&!_x(E,C)&&l(),E=C,N=requestAnimationFrame(R)}return l(),()=>{var C;v.forEach(A=>{s&&A.removeEventListener("scroll",l),c&&A.removeEventListener("resize",l)}),b?.(),(C=S)==null||C.disconnect(),S=null,g&&cancelAnimationFrame(N)}}const GO=pO,YO=gO,KO=dO,IO=yO,XO=hO,Jy=fO,QO=vO,ZO=(n,a,l)=>{const o=new Map,s={platform:qO,...l},c={...s.platform,_c:o};return uO(n,a,{...s,platform:c})};var JO=typeof document<"u",WO=function(){},bc=JO?y.useLayoutEffect:WO;function Tc(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,o,s;if(n&&a&&typeof n=="object"){if(Array.isArray(n)){if(l=n.length,l!==a.length)return!1;for(o=l;o--!==0;)if(!Tc(n[o],a[o]))return!1;return!0}if(s=Object.keys(n),l=s.length,l!==Object.keys(a).length)return!1;for(o=l;o--!==0;)if(!{}.hasOwnProperty.call(a,s[o]))return!1;for(o=l;o--!==0;){const c=s[o];if(!(c==="_owner"&&n.$$typeof)&&!Tc(n[c],a[c]))return!1}return!0}return n!==n&&a!==a}function Ex(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Wy(n,a){const l=Ex(n);return Math.round(a*l)/l}function Md(n){const a=y.useRef(n);return bc(()=>{a.current=n}),a}function eA(n){n===void 0&&(n={});const{placement:a="bottom",strategy:l="absolute",middleware:o=[],platform:s,elements:{reference:c,floating:f}={},transform:m=!0,whileElementsMounted:g,open:h}=n,[v,b]=y.useState({x:0,y:0,strategy:l,placement:a,middlewareData:{},isPositioned:!1}),[w,S]=y.useState(o);Tc(w,o)||S(o);const[N,E]=y.useState(null),[R,C]=y.useState(null),A=y.useCallback(q=>{q!==j.current&&(j.current=q,E(q))},[]),T=y.useCallback(q=>{q!==U.current&&(U.current=q,C(q))},[]),k=c||N,D=f||R,j=y.useRef(null),U=y.useRef(null),B=y.useRef(v),W=g!=null,ne=Md(g),ee=Md(s),ie=Md(h),fe=y.useCallback(()=>{if(!j.current||!U.current)return;const q={placement:a,strategy:l,middleware:w};ee.current&&(q.platform=ee.current),ZO(j.current,U.current,q).then(ye=>{const M={...ye,isPositioned:ie.current!==!1};X.current&&!Tc(B.current,M)&&(B.current=M,Hc.flushSync(()=>{b(M)}))})},[w,a,l,ee,ie]);bc(()=>{h===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,b(q=>({...q,isPositioned:!1})))},[h]);const X=y.useRef(!1);bc(()=>(X.current=!0,()=>{X.current=!1}),[]),bc(()=>{if(k&&(j.current=k),D&&(U.current=D),k&&D){if(ne.current)return ne.current(k,D,fe);fe()}},[k,D,fe,ne,W]);const te=y.useMemo(()=>({reference:j,floating:U,setReference:A,setFloating:T}),[A,T]),O=y.useMemo(()=>({reference:k,floating:D}),[k,D]),I=y.useMemo(()=>{const q={position:l,left:0,top:0};if(!O.floating)return q;const ye=Wy(O.floating,v.x),M=Wy(O.floating,v.y);return m?{...q,transform:"translate("+ye+"px, "+M+"px)",...Ex(O.floating)>=1.5&&{willChange:"transform"}}:{position:l,left:ye,top:M}},[l,m,O.floating,v.x,v.y]);return y.useMemo(()=>({...v,update:fe,refs:te,elements:O,floatingStyles:I}),[v,fe,te,O,I])}const tA=n=>{function a(l){return{}.hasOwnProperty.call(l,"current")}return{name:"arrow",options:n,fn(l){const{element:o,padding:s}=typeof n=="function"?n(l):n;return o&&a(o)?o.current!=null?Jy({element:o.current,padding:s}).fn(l):{}:o?Jy({element:o,padding:s}).fn(l):{}}}},nA=(n,a)=>({...GO(n),options:[n,a]}),aA=(n,a)=>({...YO(n),options:[n,a]}),rA=(n,a)=>({...QO(n),options:[n,a]}),lA=(n,a)=>({...KO(n),options:[n,a]}),oA=(n,a)=>({...IO(n),options:[n,a]}),iA=(n,a)=>({...XO(n),options:[n,a]}),sA=(n,a)=>({...tA(n),options:[n,a]});var cA="Arrow",Nx=y.forwardRef((n,a)=>{const{children:l,width:o=10,height:s=5,...c}=n;return d.jsx(lt.svg,{...c,ref:a,width:o,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?l:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});Nx.displayName=cA;var uA=Nx,qh="Popper",[Cx,jx]=tl(qh),[fA,Rx]=Cx(qh),Ox=n=>{const{__scopePopper:a,children:l}=n,[o,s]=y.useState(null);return d.jsx(fA,{scope:a,anchor:o,onAnchorChange:s,children:l})};Ox.displayName=qh;var Ax="PopperAnchor",Tx=y.forwardRef((n,a)=>{const{__scopePopper:l,virtualRef:o,...s}=n,c=Rx(Ax,l),f=y.useRef(null),m=Gt(a,f);return y.useEffect(()=>{c.onAnchorChange(o?.current||f.current)}),o?null:d.jsx(lt.div,{...s,ref:m})});Tx.displayName=Ax;var Fh="PopperContent",[dA,hA]=Cx(Fh),Mx=y.forwardRef((n,a)=>{const{__scopePopper:l,side:o="bottom",sideOffset:s=0,align:c="center",alignOffset:f=0,arrowPadding:m=0,avoidCollisions:g=!0,collisionBoundary:h=[],collisionPadding:v=0,sticky:b="partial",hideWhenDetached:w=!1,updatePositionStrategy:S="optimized",onPlaced:N,...E}=n,R=Rx(Fh,l),[C,A]=y.useState(null),T=Gt(a,be=>A(be)),[k,D]=y.useState(null),j=Kb(k),U=j?.width??0,B=j?.height??0,W=o+(c!=="center"?"-"+c:""),ne=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},ee=Array.isArray(h)?h:[h],ie=ee.length>0,fe={padding:ne,boundary:ee.filter(pA),altBoundary:ie},{refs:X,floatingStyles:te,placement:O,isPositioned:I,middlewareData:q}=eA({strategy:"fixed",placement:W,whileElementsMounted:(...be)=>VO(...be,{animationFrame:S==="always"}),elements:{reference:R.anchor},middleware:[nA({mainAxis:s+B,alignmentAxis:f}),g&&aA({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?rA():void 0,...fe}),g&&lA({...fe}),oA({...fe,apply:({elements:be,rects:ze,availableWidth:ae,availableHeight:we})=>{const{width:Pe,height:De}=ze.reference,qe=be.floating.style;qe.setProperty("--radix-popper-available-width",`${ae}px`),qe.setProperty("--radix-popper-available-height",`${we}px`),qe.setProperty("--radix-popper-anchor-width",`${Pe}px`),qe.setProperty("--radix-popper-anchor-height",`${De}px`)}}),k&&sA({element:k,padding:m}),gA({arrowWidth:U,arrowHeight:B}),w&&iA({strategy:"referenceHidden",...fe})]}),[ye,M]=kx(O),Y=Ir(N);ta(()=>{I&&Y?.()},[I,Y]);const H=q.arrow?.x,K=q.arrow?.y,le=q.arrow?.centerOffset!==0,[he,ve]=y.useState();return ta(()=>{C&&ve(window.getComputedStyle(C).zIndex)},[C]),d.jsx("div",{ref:X.setFloating,"data-radix-popper-content-wrapper":"",style:{...te,transform:I?te.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:he,"--radix-popper-transform-origin":[q.transformOrigin?.x,q.transformOrigin?.y].join(" "),...q.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:d.jsx(dA,{scope:l,placedSide:ye,onArrowChange:D,arrowX:H,arrowY:K,shouldHideArrow:le,children:d.jsx(lt.div,{"data-side":ye,"data-align":M,...E,ref:T,style:{...E.style,animation:I?void 0:"none"}})})})});Mx.displayName=Fh;var Dx="PopperArrow",mA={top:"bottom",right:"left",bottom:"top",left:"right"},Lx=y.forwardRef(function(a,l){const{__scopePopper:o,...s}=a,c=hA(Dx,o),f=mA[c.placedSide];return d.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:d.jsx(uA,{...s,ref:l,style:{...s.style,display:"block"}})})});Lx.displayName=Dx;function pA(n){return n!==null}var gA=n=>({name:"transformOrigin",options:n,fn(a){const{placement:l,rects:o,middlewareData:s}=a,f=s.arrow?.centerOffset!==0,m=f?0:n.arrowWidth,g=f?0:n.arrowHeight,[h,v]=kx(l),b={start:"0%",center:"50%",end:"100%"}[v],w=(s.arrow?.x??0)+m/2,S=(s.arrow?.y??0)+g/2;let N="",E="";return h==="bottom"?(N=f?b:`${w}px`,E=`${-g}px`):h==="top"?(N=f?b:`${w}px`,E=`${o.floating.height+g}px`):h==="right"?(N=`${-g}px`,E=f?b:`${S}px`):h==="left"&&(N=`${o.floating.width+g}px`,E=f?b:`${S}px`),{data:{x:N,y:E}}}});function kx(n){const[a,l="center"]=n.split("-");return[a,l]}var vA=Ox,zx=Tx,yA=Mx,bA=Lx,Ic="Popover",[Ux,WM]=tl(Ic,[jx]),Li=jx(),[xA,yr]=Ux(Ic),Px=n=>{const{__scopePopover:a,children:l,open:o,defaultOpen:s,onOpenChange:c,modal:f=!1}=n,m=Li(a),g=y.useRef(null),[h,v]=y.useState(!1),[b,w]=Ti({prop:o,defaultProp:s??!1,onChange:c,caller:Ic});return d.jsx(vA,{...m,children:d.jsx(xA,{scope:a,contentId:Tn(),triggerRef:g,open:b,onOpenChange:w,onOpenToggle:y.useCallback(()=>w(S=>!S),[w]),hasCustomAnchor:h,onCustomAnchorAdd:y.useCallback(()=>v(!0),[]),onCustomAnchorRemove:y.useCallback(()=>v(!1),[]),modal:f,children:l})})};Px.displayName=Ic;var Hx="PopoverAnchor",wA=y.forwardRef((n,a)=>{const{__scopePopover:l,...o}=n,s=yr(Hx,l),c=Li(l),{onCustomAnchorAdd:f,onCustomAnchorRemove:m}=s;return y.useEffect(()=>(f(),()=>m()),[f,m]),d.jsx(zx,{...c,...o,ref:a})});wA.displayName=Hx;var Bx="PopoverTrigger",$x=y.forwardRef((n,a)=>{const{__scopePopover:l,...o}=n,s=yr(Bx,l),c=Li(l),f=Gt(a,s.triggerRef),m=d.jsx(lt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Yx(s.open),...o,ref:f,onClick:rn(n.onClick,s.onOpenToggle)});return s.hasCustomAnchor?m:d.jsx(zx,{asChild:!0,...c,children:m})});$x.displayName=Bx;var Vh="PopoverPortal",[SA,_A]=Ux(Vh,{forceMount:void 0}),qx=n=>{const{__scopePopover:a,forceMount:l,children:o,container:s}=n,c=yr(Vh,a);return d.jsx(SA,{scope:a,forceMount:l,children:d.jsx(ro,{present:l||c.open,children:d.jsx(Eh,{asChild:!0,container:s,children:o})})})};qx.displayName=Vh;var to="PopoverContent",Fx=y.forwardRef((n,a)=>{const l=_A(to,n.__scopePopover),{forceMount:o=l.forceMount,...s}=n,c=yr(to,n.__scopePopover);return d.jsx(ro,{present:o||c.open,children:c.modal?d.jsx(NA,{...s,ref:a}):d.jsx(CA,{...s,ref:a})})});Fx.displayName=to;var EA=Wl("PopoverContent.RemoveScroll"),NA=y.forwardRef((n,a)=>{const l=yr(to,n.__scopePopover),o=y.useRef(null),s=Gt(a,o),c=y.useRef(!1);return y.useEffect(()=>{const f=o.current;if(f)return lb(f)},[]),d.jsx(Nh,{as:EA,allowPinchZoom:!0,children:d.jsx(Vx,{...n,ref:s,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:rn(n.onCloseAutoFocus,f=>{f.preventDefault(),c.current||l.triggerRef.current?.focus()}),onPointerDownOutside:rn(n.onPointerDownOutside,f=>{const m=f.detail.originalEvent,g=m.button===0&&m.ctrlKey===!0,h=m.button===2||g;c.current=h},{checkForDefaultPrevented:!1}),onFocusOutside:rn(n.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1})})})}),CA=y.forwardRef((n,a)=>{const l=yr(to,n.__scopePopover),o=y.useRef(!1),s=y.useRef(!1);return d.jsx(Vx,{...n,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{n.onCloseAutoFocus?.(c),c.defaultPrevented||(o.current||l.triggerRef.current?.focus(),c.preventDefault()),o.current=!1,s.current=!1},onInteractOutside:c=>{n.onInteractOutside?.(c),c.defaultPrevented||(o.current=!0,c.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const f=c.target;l.triggerRef.current?.contains(f)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&s.current&&c.preventDefault()}})}),Vx=y.forwardRef((n,a)=>{const{__scopePopover:l,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:c,disableOutsidePointerEvents:f,onEscapeKeyDown:m,onPointerDownOutside:g,onFocusOutside:h,onInteractOutside:v,...b}=n,w=yr(to,l),S=Li(l);return Q0(),d.jsx(_h,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:s,onUnmountAutoFocus:c,children:d.jsx(Sh,{asChild:!0,disableOutsidePointerEvents:f,onInteractOutside:v,onEscapeKeyDown:m,onPointerDownOutside:g,onFocusOutside:h,onDismiss:()=>w.onOpenChange(!1),children:d.jsx(yA,{"data-state":Yx(w.open),role:"dialog",id:w.contentId,...S,...b,ref:a,style:{...b.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)"}})})})}),Gx="PopoverClose",jA=y.forwardRef((n,a)=>{const{__scopePopover:l,...o}=n,s=yr(Gx,l);return d.jsx(lt.button,{type:"button",...o,ref:a,onClick:rn(n.onClick,()=>s.onOpenChange(!1))})});jA.displayName=Gx;var RA="PopoverArrow",OA=y.forwardRef((n,a)=>{const{__scopePopover:l,...o}=n,s=Li(l);return d.jsx(bA,{...s,...o,ref:a})});OA.displayName=RA;function Yx(n){return n?"open":"closed"}var AA=Px,TA=$x,MA=qx,DA=Fx;function Xc({...n}){return d.jsx(AA,{"data-slot":"popover",...n})}function Qc({...n}){return d.jsx(TA,{"data-slot":"popover-trigger",...n})}function Zc({className:n,align:a="center",sideOffset:l=4,...o}){return d.jsx(MA,{children:d.jsx(DA,{"data-slot":"popover-content",align:a,sideOffset:l,className:it("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),...o})})}function An({options:n,value:a,onChange:l,placeholder:o="Select an option...",searchPlaceholder:s="Search...",emptyPlaceholder:c="No options found."}){const[f,m]=y.useState(!1),g=n.find(h=>h.value===a);return d.jsxs(Xc,{open:f,onOpenChange:m,children:[d.jsx(Qc,{asChild:!0,children:d.jsxs(xe,{variant:"outline",role:"combobox","aria-expanded":f,className:"w-full justify-between transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:[g?g.label:o,d.jsx(Rb,{className:"ml-2 h-4 w-4 shrink-0 opacity-50 transition-transform duration-200 group-data-[state=open]:rotate-180"})]})}),d.jsx(Zc,{className:"w-[--radix-popover-trigger-width] p-0 animate-fade-in",children:d.jsxs(sx,{children:[d.jsx(cx,{placeholder:s}),d.jsxs(ux,{children:[d.jsx(fx,{children:c}),d.jsx(dx,{children:n.map(h=>d.jsxs(hx,{value:h.value,onSelect:v=>{l(v===a?"":v),m(!1)},className:"transition-all-ease hover:bg-accent hover:text-accent-foreground",children:[d.jsx(jb,{className:it("mr-2 h-4 w-4 transition-opacity",a===h.value?"opacity-100":"opacity-0")}),h.label]},h.value))})]})]})})]})}class LA{baseUrl;apiKey;tempApiKey;constructor(a="/api",l=""){this.baseUrl=a,this.apiKey=l||localStorage.getItem("apiKey")||"",this.tempApiKey=new URLSearchParams(window.location.search).get("tempApiKey")}setBaseUrl(a){this.baseUrl=a}setApiKey(a){this.apiKey=a,a?localStorage.setItem("apiKey",a):localStorage.removeItem("apiKey")}setTempApiKey(a){this.tempApiKey=a}createHeaders(a="application/json"){const l={Accept:"application/json"};return this.tempApiKey?l["X-Temp-API-Key"]=this.tempApiKey:this.apiKey&&(l["X-API-Key"]=this.apiKey),a&&(l["Content-Type"]=a),l}async apiFetch(a,l={}){const o=`${this.baseUrl}${a}`,s={...l,headers:{...this.createHeaders(),...l.headers}};try{const c=await fetch(o,s);if(c.status===401)return localStorage.removeItem("apiKey"),window.dispatchEvent(new CustomEvent("unauthorized")),new Promise(()=>{});if(!c.ok)throw new Error(`API request failed: ${c.status} ${c.statusText}`);if(c.status===204)return{};const f=await c.text();return f?JSON.parse(f):{}}catch(c){throw console.error("API request error:",c),c}}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",{})}async checkForUpdates(){return this.get("/update/check")}async performUpdate(){return this.post("/api/update/perform",{})}async getLogFiles(){return this.get("/logs/files")}async getLogs(a){return this.get(`/logs?file=${encodeURIComponent(a)}`)}async clearLogs(a){return this.delete(`/logs?file=${encodeURIComponent(a)}`)}}const Ht=new LA,Kx=y.createContext(void 0);function nl(){const n=y.useContext(Kx);if(n===void 0)throw new Error("useConfig must be used within a ConfigProvider");return n}function kA({children:n}){const[a,l]=y.useState(null),[o,s]=y.useState(null),[c,f]=y.useState(!1),[m,g]=y.useState(localStorage.getItem("apiKey"));return y.useEffect(()=>{const h=()=>{g(localStorage.getItem("apiKey"))};return window.addEventListener("storage",h),()=>{window.removeEventListener("storage",h)}},[]),y.useEffect(()=>{(async()=>{f(!1),l(null),s(null)})()},[m]),y.useEffect(()=>{(async()=>{if(!c){f(!0);try{const v=await Ht.getConfig(),b={LOG:typeof v.LOG=="boolean"?v.LOG:!1,LOG_LEVEL:typeof v.LOG_LEVEL=="string"?v.LOG_LEVEL:"debug",CLAUDE_PATH:typeof v.CLAUDE_PATH=="string"?v.CLAUDE_PATH:"",HOST:typeof v.HOST=="string"?v.HOST:"127.0.0.1",PORT:typeof v.PORT=="number"?v.PORT:3456,APIKEY:typeof v.APIKEY=="string"?v.APIKEY:"",API_TIMEOUT_MS:typeof v.API_TIMEOUT_MS=="string"?v.API_TIMEOUT_MS:"600000",PROXY_URL:typeof v.PROXY_URL=="string"?v.PROXY_URL:"",transformers:Array.isArray(v.transformers)?v.transformers:[],Providers:Array.isArray(v.Providers)?v.Providers:[],StatusLine:v.StatusLine&&typeof v.StatusLine=="object"?{enabled:typeof v.StatusLine.enabled=="boolean"?v.StatusLine.enabled:!1,currentStyle:typeof v.StatusLine.currentStyle=="string"?v.StatusLine.currentStyle:"default",default:v.StatusLine.default&&typeof v.StatusLine.default=="object"&&Array.isArray(v.StatusLine.default.modules)?v.StatusLine.default:{modules:[]},powerline:v.StatusLine.powerline&&typeof v.StatusLine.powerline=="object"&&Array.isArray(v.StatusLine.powerline.modules)?v.StatusLine.powerline:{modules:[]}}:{enabled:!1,currentStyle:"default",default:{modules:[]},powerline:{modules:[]}},Router:v.Router&&typeof v.Router=="object"?{default:typeof v.Router.default=="string"?v.Router.default:"",background:typeof v.Router.background=="string"?v.Router.background:"",think:typeof v.Router.think=="string"?v.Router.think:"",longContext:typeof v.Router.longContext=="string"?v.Router.longContext:"",longContextThreshold:typeof v.Router.longContextThreshold=="number"?v.Router.longContextThreshold:6e4,webSearch:typeof v.Router.webSearch=="string"?v.Router.webSearch:"",image:typeof v.Router.image=="string"?v.Router.image:""}:{default:"",background:"",think:"",longContext:"",longContextThreshold:6e4,webSearch:"",image:""},CUSTOM_ROUTER_PATH:typeof v.CUSTOM_ROUTER_PATH=="string"?v.CUSTOM_ROUTER_PATH:""};l(b)}catch(v){console.error("Failed to fetch config:",v),v.message!=="Unauthorized"&&(l({LOG:!1,LOG_LEVEL:"debug",CLAUDE_PATH:"",HOST:"127.0.0.1",PORT:3456,APIKEY:"",API_TIMEOUT_MS:"600000",PROXY_URL:"",transformers:[],Providers:[],StatusLine:void 0,Router:{default:"",background:"",think:"",longContext:"",longContextThreshold:6e4,webSearch:"",image:""},CUSTOM_ROUTER_PATH:""}),s(v))}}})()},[c,m]),d.jsx(Kx.Provider,{value:{config:a,setConfig:l,error:o},children:n})}function Jc(){return(Jc=Object.assign||function(n){for(var a=1;a<arguments.length;a++){var l=arguments[a];for(var o in l)Object.prototype.hasOwnProperty.call(l,o)&&(n[o]=l[o])}return n}).apply(this,arguments)}function Ix(n,a){if(n==null)return{};var l,o,s={},c=Object.keys(n);for(o=0;o<c.length;o++)a.indexOf(l=c[o])>=0||(s[l]=n[l]);return s}function ih(n){var a=y.useRef(n),l=y.useRef(function(o){a.current&&a.current(o)});return a.current=n,l.current}var ji=function(n,a,l){return a===void 0&&(a=0),l===void 0&&(l=1),n>l?l:n<a?a:n},bi=function(n){return"touches"in n},sh=function(n){return n&&n.ownerDocument.defaultView||self},e0=function(n,a,l){var o=n.getBoundingClientRect(),s=bi(a)?function(c,f){for(var m=0;m<c.length;m++)if(c[m].identifier===f)return c[m];return c[0]}(a.touches,l):a;return{left:ji((s.pageX-(o.left+sh(n).pageXOffset))/o.width),top:ji((s.pageY-(o.top+sh(n).pageYOffset))/o.height)}},t0=function(n){!bi(n)&&n.preventDefault()},Xx=nt.memo(function(n){var a=n.onMove,l=n.onKey,o=Ix(n,["onMove","onKey"]),s=y.useRef(null),c=ih(a),f=ih(l),m=y.useRef(null),g=y.useRef(!1),h=y.useMemo(function(){var S=function(R){t0(R),(bi(R)?R.touches.length>0:R.buttons>0)&&s.current?c(e0(s.current,R,m.current)):E(!1)},N=function(){return E(!1)};function E(R){var C=g.current,A=sh(s.current),T=R?A.addEventListener:A.removeEventListener;T(C?"touchmove":"mousemove",S),T(C?"touchend":"mouseup",N)}return[function(R){var C=R.nativeEvent,A=s.current;if(A&&(t0(C),!function(k,D){return D&&!bi(k)}(C,g.current)&&A)){if(bi(C)){g.current=!0;var T=C.changedTouches||[];T.length&&(m.current=T[0].identifier)}A.focus(),c(e0(A,C,m.current)),E(!0)}},function(R){var C=R.which||R.keyCode;C<37||C>40||(R.preventDefault(),f({left:C===39?.05:C===37?-.05:0,top:C===40?.05:C===38?-.05:0}))},E]},[f,c]),v=h[0],b=h[1],w=h[2];return y.useEffect(function(){return w},[w]),nt.createElement("div",Jc({},o,{onTouchStart:v,onMouseDown:v,className:"react-colorful__interactive",ref:s,onKeyDown:b,tabIndex:0,role:"slider"}))}),Gh=function(n){return n.filter(Boolean).join(" ")},Qx=function(n){var a=n.color,l=n.left,o=n.top,s=o===void 0?.5:o,c=Gh(["react-colorful__pointer",n.className]);return nt.createElement("div",{className:c,style:{top:100*s+"%",left:100*l+"%"}},nt.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:a}}))},Vt=function(n,a,l){return a===void 0&&(a=0),l===void 0&&(l=Math.pow(10,a)),Math.round(l*n)/l},zA=function(n){return $A(ch(n))},ch=function(n){return n[0]==="#"&&(n=n.substring(1)),n.length<6?{r:parseInt(n[0]+n[0],16),g:parseInt(n[1]+n[1],16),b:parseInt(n[2]+n[2],16),a:n.length===4?Vt(parseInt(n[3]+n[3],16)/255,2):1}:{r:parseInt(n.substring(0,2),16),g:parseInt(n.substring(2,4),16),b:parseInt(n.substring(4,6),16),a:n.length===8?Vt(parseInt(n.substring(6,8),16)/255,2):1}},UA=function(n){return BA(HA(n))},PA=function(n){var a=n.s,l=n.v,o=n.a,s=(200-a)*l/100;return{h:Vt(n.h),s:Vt(s>0&&s<200?a*l/100/(s<=100?s:200-s)*100:0),l:Vt(s/2),a:Vt(o,2)}},uh=function(n){var a=PA(n);return"hsl("+a.h+", "+a.s+"%, "+a.l+"%)"},HA=function(n){var a=n.h,l=n.s,o=n.v,s=n.a;a=a/360*6,l/=100,o/=100;var c=Math.floor(a),f=o*(1-l),m=o*(1-(a-c)*l),g=o*(1-(1-a+c)*l),h=c%6;return{r:Vt(255*[o,m,f,f,g,o][h]),g:Vt(255*[g,o,o,m,f,f][h]),b:Vt(255*[f,f,g,o,o,m][h]),a:Vt(s,2)}},cc=function(n){var a=n.toString(16);return a.length<2?"0"+a:a},BA=function(n){var a=n.r,l=n.g,o=n.b,s=n.a,c=s<1?cc(Vt(255*s)):"";return"#"+cc(a)+cc(l)+cc(o)+c},$A=function(n){var a=n.r,l=n.g,o=n.b,s=n.a,c=Math.max(a,l,o),f=c-Math.min(a,l,o),m=f?c===a?(l-o)/f:c===l?2+(o-a)/f:4+(a-l)/f:0;return{h:Vt(60*(m<0?m+6:m)),s:Vt(c?f/c*100:0),v:Vt(c/255*100),a:s}},qA=nt.memo(function(n){var a=n.hue,l=n.onChange,o=Gh(["react-colorful__hue",n.className]);return nt.createElement("div",{className:o},nt.createElement(Xx,{onMove:function(s){l({h:360*s.left})},onKey:function(s){l({h:ji(a+360*s.left,0,360)})},"aria-label":"Hue","aria-valuenow":Vt(a),"aria-valuemax":"360","aria-valuemin":"0"},nt.createElement(Qx,{className:"react-colorful__hue-pointer",left:a/360,color:uh({h:a,s:100,v:100,a:1})})))}),FA=nt.memo(function(n){var a=n.hsva,l=n.onChange,o={backgroundColor:uh({h:a.h,s:100,v:100,a:1})};return nt.createElement("div",{className:"react-colorful__saturation",style:o},nt.createElement(Xx,{onMove:function(s){l({s:100*s.left,v:100-100*s.top})},onKey:function(s){l({s:ji(a.s+100*s.left,0,100),v:ji(a.v-100*s.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Vt(a.s)+"%, Brightness "+Vt(a.v)+"%"},nt.createElement(Qx,{className:"react-colorful__saturation-pointer",top:1-a.v/100,left:a.s/100,color:uh(a)})))}),Zx=function(n,a){if(n===a)return!0;for(var l in n)if(n[l]!==a[l])return!1;return!0},VA=function(n,a){return n.toLowerCase()===a.toLowerCase()||Zx(ch(n),ch(a))};function GA(n,a,l){var o=ih(l),s=y.useState(function(){return n.toHsva(a)}),c=s[0],f=s[1],m=y.useRef({color:a,hsva:c});y.useEffect(function(){if(!n.equal(a,m.current.color)){var h=n.toHsva(a);m.current={hsva:h,color:a},f(h)}},[a,n]),y.useEffect(function(){var h;Zx(c,m.current.hsva)||n.equal(h=n.fromHsva(c),m.current.color)||(m.current={hsva:c,color:h},o(h))},[c,n,o]);var g=y.useCallback(function(h){f(function(v){return Object.assign({},v,h)})},[]);return[c,g]}var YA=typeof window<"u"?y.useLayoutEffect:y.useEffect,KA=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},n0=new Map,IA=function(n){YA(function(){var a=n.current?n.current.ownerDocument:document;if(a!==void 0&&!n0.has(a)){var l=a.createElement("style");l.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,n0.set(a,l);var o=KA();o&&l.setAttribute("nonce",o),a.head.appendChild(l)}},[])},XA=function(n){var a=n.className,l=n.colorModel,o=n.color,s=o===void 0?l.defaultColor:o,c=n.onChange,f=Ix(n,["className","colorModel","color","onChange"]),m=y.useRef(null);IA(m);var g=GA(l,s,c),h=g[0],v=g[1],b=Gh(["react-colorful",a]);return nt.createElement("div",Jc({},f,{ref:m,className:b}),nt.createElement(FA,{hsva:h,onChange:v}),nt.createElement(qA,{hue:h.h,onChange:v,className:"react-colorful__last-control"}))},QA={defaultColor:"000",toHsva:zA,fromHsva:function(n){return UA({h:n.h,s:n.s,v:n.v,a:1})},equal:VA},ZA=function(n){return nt.createElement(XA,Jc({},n,{colorModel:QA}))};const JA=n=>n.startsWith("#")?n:"#000000";function a0({value:n="",onChange:a,placeholder:l="选择颜色...",showPreview:o=!0}){const[s,c]=y.useState(!1),[f,m]=y.useState("");y.useEffect(()=>{n.startsWith("#")?m(n):m("")},[n]);const g=b=>{a(b)},h=b=>{const w=b.target.value;m(w),/^#[0-9A-F]{6}$/i.test(w)&&g(w)},v=JA(n);return d.jsx("div",{className:"space-y-2",children:d.jsxs(Xc,{open:s,onOpenChange:c,children:[d.jsx(Qc,{asChild:!0,children:d.jsx(xe,{variant:"outline",className:it("w-full justify-start text-left font-normal h-10 transition-all hover:scale-[1.02] active:scale-[0.98]",!n&&"text-muted-foreground"),children:d.jsxs("div",{className:"flex items-center gap-2 w-full",children:[o&&d.jsx("div",{className:"h-5 w-5 rounded border shadow-sm",style:{backgroundColor:v}}),d.jsx("span",{className:"truncate flex-1",children:n||l}),d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[d.jsx("path",{d:"m7 15 5 5 5-5"}),d.jsx("path",{d:"m7 9 5-5 5 5"})]})]})})}),d.jsx(Zc,{className:"w-72 p-3",align:"start",children:d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h4",{className:"text-sm font-semibold",children:"颜色选择器"}),d.jsx(xe,{variant:"ghost",size:"sm",className:"h-6 px-2 text-xs",onClick:()=>g(""),children:"清除"})]}),d.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-md bg-secondary",children:[d.jsx("div",{className:"h-8 w-8 rounded border shadow-sm",style:{backgroundColor:v}}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("div",{className:"text-sm font-medium truncate",children:n||"未选择颜色"}),n&&n.startsWith("#")&&d.jsx("div",{className:"text-xs text-muted-foreground font-mono",children:n.toUpperCase()})]})]}),d.jsx("div",{className:"rounded-md overflow-hidden border",children:d.jsx(ZA,{color:v,onChange:g,className:"w-full"})}),d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{className:"text-sm font-medium",children:"自定义颜色"}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx(vt,{type:"text",value:f,onChange:h,placeholder:"#RRGGBB",className:"font-mono flex-1"}),d.jsx(xe,{size:"sm",onClick:()=>{f&&/^#[0-9A-F]{6}$/i.test(f)&&(g(f),c(!1))},disabled:!f||!/^#[0-9A-F]{6}$/i.test(f),children:"应用"})]}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"输入十六进制颜色值 (例如: #FF0000)"})]})]})})]})})}const WA=Dh("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 Vr({className:n,variant:a,...l}){return d.jsx("div",{className:it(WA({variant:a}),n),...l})}function eT(){return{enabled:!1,currentStyle:"default",default:{modules:[{type:"workDir",icon:"󰉋",text:"{{workDirName}}",color:"bright_blue"},{type:"gitBranch",icon:"",text:"{{gitBranch}}",color:"bright_magenta"},{type:"model",icon:"󰚩",text:"{{model}}",color:"bright_cyan"},{type:"usage",icon:"↑",text:"{{inputTokens}}",color:"bright_green"},{type:"usage",icon:"↓",text:"{{outputTokens}}",color:"bright_yellow"}]},powerline:{modules:[{type:"workDir",icon:"󰉋",text:"{{workDirName}}",color:"white",background:"bg_bright_blue"},{type:"gitBranch",icon:"",text:"{{gitBranch}}",color:"white",background:"bg_bright_magenta"},{type:"model",icon:"󰚩",text:"{{model}}",color:"white",background:"bg_bright_cyan"},{type:"usage",icon:"↑",text:"{{inputTokens}}",color:"white",background:"bg_bright_green"},{type:"usage",icon:"↓",text:"{{outputTokens}}",color:"white",background:"bg_bright_yellow"}]}}}const tT={type:"workDir",icon:"󰉋",text:"{{workDirName}}",color:"bright_blue"},nT=[{label:"Hack Nerd Font Mono",value:"Hack Nerd Font Mono"},{label:"FiraCode Nerd Font Mono",value:"FiraCode Nerd Font Mono"},{label:"JetBrainsMono Nerd Font Mono",value:"JetBrainsMono Nerd Font Mono"},{label:"Monaspace Nerd Font Mono",value:"Monaspace Nerd Font Mono"},{label:"UbuntuMono Nerd Font",value:"UbuntuMono Nerd Font"}],aT=[{label:"workDir",value:"workDir"},{label:"gitBranch",value:"gitBranch"},{label:"model",value:"model"},{label:"usage",value:"usage"},{label:"script",value:"script"}],Dd={black:"text-black",red:"text-red-600",green:"text-green-600",yellow:"text-yellow-500",blue:"text-blue-500",magenta:"text-purple-500",cyan:"text-cyan-500",white:"text-white",bright_black:"text-gray-500",bright_red:"text-red-400",bright_green:"text-green-400",bright_yellow:"text-yellow-300",bright_blue:"text-blue-300",bright_magenta:"text-purple-300",bright_cyan:"text-cyan-300",bright_white:"text-white",bg_black:"bg-black",bg_red:"bg-red-600",bg_green:"bg-green-600",bg_yellow:"bg-yellow-500",bg_blue:"bg-blue-500",bg_magenta:"bg-purple-500",bg_cyan:"bg-cyan-500",bg_white:"bg-white",bg_bright_black:"bg-gray-800",bg_bright_red:"bg-red-400",bg_bright_green:"bg-green-400",bg_bright_yellow:"bg-yellow-300",bg_bright_blue:"bg-blue-300",bg_bright_magenta:"bg-purple-300",bg_bright_cyan:"bg-cyan-300",bg_bright_white:"bg-gray-100",bg_bright_orange:"bg-orange-400",bg_bright_purple:"bg-purple-400"},rT=nt.memo(({value:n,onChange:a,fontFamily:l,t:o})=>{const[s,c]=y.useState(!1),[f,m]=y.useState(n),[g,h]=y.useState([]),[v,b]=y.useState([]),[w,S]=y.useState(!1),N=nt.useRef(null),E=y.useCallback(async()=>{if(!(g.length>0)){S(!0);try{const j=await(await fetch("https://www.nerdfonts.com/assets/css/combo.css")).text(),U=/\.nf-([a-zA-Z0-9_-]+):before\s*\{\s*content:\s*"\\([0-9a-fA-F]+)";?\s*\}/g,B=[];let W;for(;(W=U.exec(j))!==null;){const ne=`nf-${W[1]}`,ee=W[2],ie=String.fromCharCode(parseInt(ee,16));B.push({className:ne,unicode:ee,char:ie})}h(B),b(B.slice(0,200))}catch(D){console.error("Failed to load icons:",D),h([]),b([])}finally{S(!1)}}},[g.length]);y.useEffect(()=>{if(f.trim()===""){b(g.slice(0,100));return}const D=f.toLowerCase();let j=g;if(D.length===1||/[\u{2000}-\u{2FFFF}]/u.test(f)){const U=g.find(B=>B.char===f);U?j=[U]:j=g.filter(B=>B.char===f)}else j=g.filter(U=>{const B=U.className.toLowerCase(),W=B.replace(/[_-]/g,""),ne=D.replace(/[_-]/g,"");return B.includes(D)||W.includes(ne)||D.split(" ").every(ee=>B.includes(ee)||W.includes(ee))});b(j.slice(0,120))},[f,g]);const R=D=>{const j=D.target.value;m(j),a(j),c(!0),g.length===0&&E()},C=D=>{const j=D.clipboardData.getData("text");j&&j.length===1&&setTimeout(()=>{c(!0)},10)},A=D=>{m(D),a(D),c(!1),N.current?.focus()},T=()=>{c(!0),g.length===0&&E()},k=()=>{setTimeout(()=>c(!1),200)};return d.jsxs("div",{className:"relative",children:[d.jsx("div",{className:"relative",children:d.jsx(vt,{ref:N,value:f,onChange:R,onFocus:T,onBlur:k,onPaste:C,placeholder:o("statusline.icon_placeholder"),style:{fontFamily:l+", monospace"},className:"text-lg pr-2"})}),s&&d.jsx("div",{className:"absolute z-50 mt-1 w-full max-h-72 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg",children:w?d.jsx("div",{className:"flex items-center justify-center p-8",children:d.jsxs("svg",{className:"animate-spin h-6 w-6 text-primary",viewBox:"0 0 24 24",children:[d.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none",opacity:"0.1"}),d.jsx("path",{fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}):d.jsx(d.Fragment,{children:d.jsxs("div",{className:"grid grid-cols-5 gap-2 p-2 max-h-72 overflow-y-auto",children:[v.map(D=>d.jsx("div",{className:"flex items-center justify-center p-3 text-2xl cursor-pointer hover:bg-secondary rounded transition-colors",onClick:()=>A(D.char),onMouseDown:j=>j.preventDefault(),title:`${D.char} - ${D.className}`,style:{fontFamily:l+", monospace"},children:D.char},D.className)),v.length===0&&d.jsxs("div",{className:"col-span-5 flex flex-col items-center justify-center p-8 text-muted-foreground",children:[d.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"mb-2",children:[d.jsx("circle",{cx:"11",cy:"11",r:"8"}),d.jsx("path",{d:"m21 21-4.35-4.35"})]}),d.jsx("div",{className:"text-sm",children:f?`${o("statusline.no_icons_found")} "${f}"`:o("statusline.no_icons_available")})]})]})})})]})});function lT(n,a){return n.replace(/\{\{(\w+)\}\}/g,(l,o)=>a[o]||l)}function oT(n,a=!1){const l={workDirName:"project",gitBranch:"main",model:"Claude Sonnet 4",inputTokens:"1.2k",outputTokens:"2.5k"},o=lT(n.text,l),s=n.icon||"";if(!o&&n.type!=="usage")return null;const c=g=>/^#[0-9A-F]{6}$/i.test(g);if(a){let g={},h="",v="";n.background&&(c(n.background)?(g={backgroundColor:n.background},v=n.background):(h=Dd[n.background]||"",v=n.background));let b={},w="";return n.color?c(n.color)?b={color:n.color}:w=Dd[n.color]||"text-white":w="text-white",d.jsxs("div",{className:`powerline-module px-4 ${h} ${w}`,style:{...g,...b},children:[d.jsxs("div",{className:"powerline-module-content",children:[s&&d.jsx("span",{children:s}),d.jsx("span",{children:o})]}),d.jsx("div",{className:"powerline-separator","data-current-bg":v})]})}let f={},m="";return n.color&&(c(n.color)?f={color:n.color}:m=Dd[n.color]||""),d.jsxs(d.Fragment,{children:[s&&d.jsx("span",{style:f,className:m,children:s}),d.jsx("span",{style:f,className:m,children:o})]})}function iT({isOpen:n,onOpenChange:a}){const{t:l}=Ma(),{config:o,setConfig:s}=nl(),[c,f]=y.useState(o?.StatusLine||eT()),[m,g]=y.useState(o?.StatusLine?.fontFamily||"Hack Nerd Font Mono"),[h,v]=y.useState(null),[b,w]=y.useState(new Set);y.useEffect(()=>{const ee=document.createElement("style");return ee.innerHTML=`
247
277
  .powerline-module {
248
278
  display: inline-flex;
249
279
  align-items: center;
@@ -307,9 +337,9 @@ For more information, see https://radix-ui.com/primitives/docs/components/${a.do
307
337
  .powerline-separator[data-current-bg="bg_bright_white"] { border-left-color: #f3f4f6; }
308
338
  .powerline-separator[data-current-bg="bg_bright_orange"] { border-left-color: #fb923c; }
309
339
  .powerline-separator[data-current-bg="bg_bright_purple"] { border-left-color: #c084fc; }
310
- `,document.head.appendChild(re),()=>{document.head.removeChild(re)}},[]),y.useEffect(()=>{const re=new Set;Object.keys(c).forEach(Q=>{const ee=c[Q];ee&&typeof ee=="object"&&"modules"in ee&&(ee.modules||[]).forEach(X=>{X.background&&/^#[0-9A-F]{6}$/i.test(X.background)&&re.add(X.background)})}),w(re);const fe=document.createElement("style");fe.id="hex-powerline-styles";let de="";return re.forEach(Q=>{const ee=parseInt(Q.slice(1,3),16),A=parseInt(Q.slice(3,5),16),X=parseInt(Q.slice(5,7),16);de+=`.powerline-separator[data-current-bg="${Q}"] { border-left-color: rgb(${ee}, ${A}, ${X}); }
311
- `}),fe.innerHTML=de,document.head.appendChild(fe),()=>{const Q=document.getElementById("hex-powerline-styles");Q&&document.head.removeChild(Q)}},[c]);const S=fA.map(re=>({...re,label:l(`statusline.${re.label}`)})),C=re=>{f(fe=>({...fe,currentStyle:re}))},E=(re,fe,de)=>{const Q=c.currentStyle,ee=c[Q],A=ee&&typeof ee=="object"&&"modules"in ee?[...ee.modules||[]]:[];A[re]&&(A[re]={...A[re],[fe]:de}),f(X=>({...X,[Q]:{modules:A}}))},[j,R]=y.useState([]),L=()=>{R([]),i&&(s({...i,StatusLine:{...c,fontFamily:h}}),a(!1))},k=({title:re,description:fe,variant:de="default"})=>{const Q=de==="destructive";return g.jsx("div",{className:`rounded-lg border p-4 ${Q?"bg-red-50 border-red-200 text-red-800":"bg-blue-50 border-blue-200 text-blue-800"}`,children:g.jsxs("div",{className:"flex",children:[g.jsx("div",{className:"flex-shrink-0",children:Q?g.jsx("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:g.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}):g.jsx("svg",{className:"h-5 w-5 text-blue-400",viewBox:"0 0 20 20",fill:"currentColor",children:g.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})}),g.jsxs("div",{className:"ml-3",children:[g.jsx("h3",{className:`text-sm font-medium ${Q?"text-red-800":"text-blue-800"}`,children:re}),g.jsx("div",{className:`mt-2 text-sm ${Q?"text-red-700":"text-blue-700"}`,children:fe})]})]})})},H=c.currentStyle,M=c[H],N=M&&typeof M=="object"&&"modules"in M?M.modules||[]:[],B=m!==null&&N.length>m?N[m]:null,J=y.useCallback(()=>{if(m===null)return;const re=c.currentStyle,fe=c[re],de=fe&&typeof fe=="object"&&"modules"in fe?[...fe.modules||[]]:[];m>=0&&m<de.length&&(de.splice(m,1),f(Q=>({...Q,[re]:{modules:de}})),v(null))},[m,c]),te=h?{fontFamily:h}:{};y.useEffect(()=>{const re=fe=>{m!==null&&(fe.key==="Delete"||fe.key==="Backspace")&&(fe.preventDefault(),J())};return document.addEventListener("keydown",re),()=>{document.removeEventListener("keydown",re)}},[m,J]);const ae=`${h}-${c.currentStyle}`;return g.jsx(Xr,{open:n,onOpenChange:a,children:g.jsxs(cr,{className:"max-w-4xl h-[90vh] overflow-hidden sm:max-w-5xl md:max-w-6xl lg:max-w-7xl animate-in fade-in-90 slide-in-from-bottom-10 duration-300 flex flex-col",children:[g.jsx(ur,{"data-testid":"statusline-config-dialog-header",className:"border-b pb-4",children:g.jsxs(fr,{className:"flex items-center",children:[g.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"mr-2",children:[g.jsx("path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),g.jsx("path",{d:"M14 3v4a2 2 0 0 0 2 2h4"}),g.jsx("path",{d:"M3 12h18"})]}),l("statusline.title")]})}),j.length>0&&g.jsx("div",{className:"px-6",children:g.jsx(k,{variant:"destructive",title:"配置验证失败",description:g.jsx("ul",{className:"list-disc pl-5 space-y-1",children:j.map((re,fe)=>g.jsx("li",{children:re},fe))})})}),g.jsxs("div",{className:"flex flex-col gap-6 flex-1 overflow-hidden",children:[g.jsx("div",{className:"space-y-6",children:g.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ke,{htmlFor:"theme-style",className:"text-sm font-medium",children:l("statusline.theme")}),g.jsx(An,{options:[{label:l("statusline.theme_default"),value:"default"},{label:l("statusline.theme_powerline"),value:"powerline"}],value:c.currentStyle,onChange:C,"data-testid":"theme-selector",placeholder:l("statusline.theme_placeholder")})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ke,{htmlFor:"font-family",className:"text-sm font-medium",children:l("statusline.module_icon")}),g.jsx(An,{options:uA,value:h,onChange:re=>p(re),"data-testid":"font-family-selector",placeholder:l("statusline.font_placeholder")})]})]})}),g.jsxs("div",{className:"grid grid-cols-5 gap-6 overflow-hidden flex-1",children:[g.jsxs("div",{className:"border rounded-lg flex flex-col overflow-hidden col-span-1",children:[g.jsx("h3",{className:"text-sm font-medium p-4 pb-0 mb-3",children:l("statusline.components")}),g.jsx("div",{className:"space-y-2 overflow-y-auto px-4 pb-4 flex-1",children:S.map(re=>g.jsx("div",{className:"flex items-center gap-2 p-2 border rounded cursor-move hover:bg-secondary",draggable:!0,onDragStart:fe=>{fe.dataTransfer.setData("moduleType",re.value)},children:g.jsx("span",{className:"text-sm",children:re.label})},re.value))})]}),g.jsxs("div",{className:"border rounded-lg p-4 flex flex-col col-span-3",children:[g.jsx("h3",{className:"text-sm font-medium mb-3",children:l("statusline.preview")}),g.jsx("div",{className:`rounded bg-black/90 text-white font-mono text-sm overflow-x-auto flex items-center border border-border p-3 py-5 shadow-inner overflow-hidden ${c.currentStyle==="powerline"?"gap-0 h-8 p-0 items-center relative":"h-5"}`,"data-testid":"statusline-preview",style:te,onDragOver:re=>{re.preventDefault()},onDrop:re=>{re.preventDefault();const fe=re.dataTransfer.getData("moduleType");if(fe){const de=c.currentStyle,Q=c[de],ee=Q&&typeof Q=="object"&&"modules"in Q?[...Q.modules||[]]:[];let A;switch(fe){case"workDir":A={type:"workDir",icon:"󰉋",text:"{{workDirName}}",color:"bright_blue"};break;case"gitBranch":A={type:"gitBranch",icon:"🌿",text:"{{gitBranch}}",color:"bright_green"};break;case"model":A={type:"model",icon:"🤖",text:"{{model}}",color:"bright_yellow"};break;case"usage":A={type:"usage",icon:"📊",text:"{{inputTokens}} → {{outputTokens}}",color:"bright_magenta"};break;case"script":A={type:"script",icon:"📜",text:"Script Module",color:"bright_cyan",scriptPath:""};break;default:A={...cA,type:fe}}ee.push(A),f(X=>({...X,[de]:{modules:ee}}))}},children:N.length>0?g.jsx("div",{className:"flex items-center flex-wrap gap-0",children:N.map((re,fe)=>g.jsx("div",{className:`cursor-pointer ${m===fe?"bg-white/20":"hover:bg-white/10"} ${c.currentStyle==="powerline"?"p-0 rounded-none inline-flex overflow-visible relative":"flex items-center gap-1 px-2 py-1 rounded"}`,onClick:()=>v(fe),draggable:!0,onDragStart:de=>{de.dataTransfer.setData("dragIndex",fe.toString())},onDragOver:de=>{de.preventDefault()},onDrop:de=>{de.preventDefault();const Q=parseInt(de.dataTransfer.getData("dragIndex"));if(!isNaN(Q)&&Q!==fe){const ee=c.currentStyle,A=c[ee],X=A&&typeof A=="object"&&"modules"in A?[...A.modules||[]]:[];if(Q>=0&&Q<X.length&&fe>=0&&fe<=X.length){const[V]=X.splice(Q,1);X.splice(fe,0,V),f(ye=>({...ye,[ee]:{modules:X}})),m===Q?v(fe):m===fe&&v(Q)}}},children:mA(re,c.currentStyle==="powerline")},fe))}):g.jsxs("div",{className:"flex flex-col items-center justify-center w-full py-4 text-center",children:[g.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-500 mb-2",children:[g.jsx("path",{d:"M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18z"}),g.jsx("path",{d:"M12 8v8"}),g.jsx("path",{d:"M8 12h8"})]}),g.jsx("span",{className:"text-gray-500 text-sm",children:l("statusline.drag_hint")})]})},ae)]}),g.jsxs("div",{className:"border rounded-lg flex flex-col overflow-hidden col-span-1",children:[g.jsx("h3",{className:"text-sm font-medium p-4 pb-0 mb-3",children:l("statusline.properties")}),g.jsx("div",{className:"overflow-y-auto px-4 pb-4 flex-1",children:B&&m!==null?g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ke,{htmlFor:"module-icon",children:l("statusline.module_icon")}),g.jsx(dA,{value:B.icon||"",onChange:re=>E(m,"icon",re),fontFamily:h,t:l},ae),g.jsx("p",{className:"text-xs text-muted-foreground",children:l("statusline.icon_description")})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ke,{htmlFor:"module-text",children:l("statusline.module_text")}),g.jsx(ft,{id:"module-text",value:B.text,onChange:re=>E(m,"text",re.target.value),placeholder:l("statusline.text_placeholder")}),g.jsxs("div",{className:"text-xs text-muted-foreground",children:[g.jsx("p",{children:l("statusline.module_text_description")}),g.jsxs("div",{className:"flex flex-wrap gap-1 mt-1",children:[g.jsx(Vr,{variant:"secondary",className:"text-xs py-0.5 px-1.5",children:"{{workDirName}}"}),g.jsx(Vr,{variant:"secondary",className:"text-xs py-0.5 px-1.5",children:"{{gitBranch}}"}),g.jsx(Vr,{variant:"secondary",className:"text-xs py-0.5 px-1.5",children:"{{model}}"}),g.jsx(Vr,{variant:"secondary",className:"text-xs py-0.5 px-1.5",children:"{{inputTokens}}"}),g.jsx(Vr,{variant:"secondary",className:"text-xs py-0.5 px-1.5",children:"{{outputTokens}}"})]})]})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ke,{children:l("statusline.module_color")}),g.jsx(qy,{value:B.color||"",onChange:re=>E(m,"color",re)}),g.jsx("p",{className:"text-xs text-muted-foreground",children:l("statusline.module_color_description")})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ke,{children:l("statusline.module_background")}),g.jsx(qy,{value:B.background||"",onChange:re=>E(m,"background",re)}),g.jsx("p",{className:"text-xs text-muted-foreground",children:l("statusline.module_background_description")})]}),B.type==="script"&&g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ke,{htmlFor:"module-script-path",children:l("statusline.module_script_path")}),g.jsx(ft,{id:"module-script-path",value:B.scriptPath||"",onChange:re=>E(m,"scriptPath",re.target.value),placeholder:l("statusline.script_placeholder")}),g.jsx("p",{className:"text-xs text-muted-foreground",children:l("statusline.module_script_path_description")})]}),g.jsx(Ce,{variant:"destructive",size:"sm",onClick:J,children:l("statusline.delete_module")})]}):g.jsx("div",{className:"flex items-center justify-center h-full min-h-[200px]",children:g.jsx("p",{className:"text-muted-foreground text-sm",children:l("statusline.select_hint")})})})]})]})]}),g.jsxs(Qr,{className:"border-t pt-4 mt-4",children:[g.jsx(Ce,{variant:"outline",onClick:()=>a(!1),className:"transition-all hover:scale-105",children:l("app.cancel")}),g.jsx(Ce,{onClick:L,"data-testid":"save-statusline-config",className:"transition-all hover:scale-105",children:l("app.save")})]})]})})}function gA({isOpen:n,onOpenChange:a}){const{t:l}=Oa(),{config:i,setConfig:s}=Wr(),[c,f]=y.useState(!1);if(!i)return null;const h=b=>{s({...i,LOG:b})},p=b=>{s({...i,CLAUDE_PATH:b.target.value})},m=b=>{const w={enabled:b,currentStyle:i.StatusLine?.currentStyle||"default",default:i.StatusLine?.default||{modules:[]},powerline:i.StatusLine?.powerline||{modules:[]}};s({...i,StatusLine:w})},v=()=>{f(!0)};return g.jsxs(Xr,{open:n,onOpenChange:a,children:[g.jsxs(cr,{"data-testid":"settings-dialog",className:"max-h-[80vh] flex flex-col p-0",children:[g.jsx(ur,{className:"p-4 pb-0",children:g.jsx(fr,{children:l("toplevel.title")})}),g.jsxs("div",{className:"space-y-4 p-4 px-8 overflow-y-auto flex-1",children:[g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx(Fd,{id:"log",checked:i.LOG,onCheckedChange:h}),g.jsx(Ke,{htmlFor:"log",className:"transition-all-ease hover:scale-[1.02] cursor-pointer",children:l("toplevel.log")})]}),g.jsx("div",{className:"space-y-2 border-t pt-4",children:g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx(Fd,{id:"statusline",checked:i.StatusLine?.enabled||!1,onCheckedChange:m}),g.jsx(Ke,{htmlFor:"statusline",className:"transition-all-ease hover:scale-[1.02] cursor-pointer",children:l("statusline.title")})]}),g.jsx(Ce,{variant:"outline",size:"sm",onClick:v,className:"transition-all-ease hover:scale-[1.02] active:scale-[0.98]","data-testid":"statusline-config-button",children:l("app.settings")})]})}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ke,{htmlFor:"log-level",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.log_level")}),g.jsx(An,{options:[{label:"fatal",value:"fatal"},{label:"error",value:"error"},{label:"warn",value:"warn"},{label:"info",value:"info"},{label:"debug",value:"debug"},{label:"trace",value:"trace"}],value:i.LOG_LEVEL,onChange:b=>s({...i,LOG_LEVEL:b})})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ke,{htmlFor:"claude-path",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.claude_path")}),g.jsx(ft,{id:"claude-path",value:i.CLAUDE_PATH,onChange:p,className:"transition-all-ease focus:scale-[1.01]"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ke,{htmlFor:"host",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.host")}),g.jsx(ft,{id:"host",value:i.HOST,onChange:b=>s({...i,HOST:b.target.value}),className:"transition-all-ease focus:scale-[1.01]"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ke,{htmlFor:"port",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.port")}),g.jsx(ft,{id:"port",type:"number",value:i.PORT,onChange:b=>s({...i,PORT:parseInt(b.target.value,10)}),className:"transition-all-ease focus:scale-[1.01]"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ke,{htmlFor:"timeout",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.timeout")}),g.jsx(ft,{id:"timeout",value:i.API_TIMEOUT_MS,onChange:b=>s({...i,API_TIMEOUT_MS:b.target.value}),className:"transition-all-ease focus:scale-[1.01]"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ke,{htmlFor:"proxy-url",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.proxy_url")}),g.jsx(ft,{id:"proxy-url",value:i.PROXY_URL,onChange:b=>s({...i,PROXY_URL:b.target.value}),placeholder:"http://127.0.0.1:7890",className:"transition-all-ease focus:scale-[1.01]"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ke,{htmlFor:"apikey",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.apikey")}),g.jsx(ft,{id:"apikey",type:"password",value:i.APIKEY,onChange:b=>s({...i,APIKEY:b.target.value}),className:"transition-all-ease focus:scale-[1.01]"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ke,{htmlFor:"custom-router-path",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.custom_router_path")}),g.jsx(ft,{id:"custom-router-path",value:i.CUSTOM_ROUTER_PATH||"",onChange:b=>s({...i,CUSTOM_ROUTER_PATH:b.target.value}),placeholder:l("toplevel.custom_router_path_placeholder"),className:"transition-all-ease focus:scale-[1.01]"})]})]}),g.jsx(Qr,{className:"p-4 pt-0",children:g.jsx(Ce,{onClick:()=>a(!1),className:"transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:l("app.save")})})]}),g.jsx(pA,{isOpen:c,onOpenChange:f,"data-testid":"statusline-config-dialog"})]})}const Ca=y.forwardRef(({className:n,...a},l)=>g.jsx("div",{ref:l,className:dt("rounded-lg border bg-card text-card-foreground shadow-sm",n),...a}));Ca.displayName="Card";const Na=y.forwardRef(({className:n,...a},l)=>g.jsx("div",{ref:l,className:dt("flex flex-col space-y-1.5 p-6",n),...a}));Na.displayName="CardHeader";const Ra=y.forwardRef(({className:n,...a},l)=>g.jsx("div",{ref:l,className:dt("text-2xl font-semibold leading-none tracking-tight",n),...a}));Ra.displayName="CardTitle";const kx=y.forwardRef(({className:n,...a},l)=>g.jsx("div",{ref:l,className:dt("text-sm text-muted-foreground",n),...a}));kx.displayName="CardDescription";const ja=y.forwardRef(({className:n,...a},l)=>g.jsx("div",{ref:l,className:dt("p-6 pt-0",n),...a}));ja.displayName="CardContent";const zx=y.forwardRef(({className:n,...a},l)=>g.jsx("div",{ref:l,className:dt("flex items-center p-6 pt-0",n),...a}));zx.displayName="CardFooter";function vA({transformers:n,onEdit:a,onRemove:l}){return!n||!Array.isArray(n)?g.jsx("div",{className:"space-y-3",children:g.jsx("div",{className:"flex items-center justify-center rounded-md border bg-white p-8 text-gray-500",children:"No transformers configured"})}):g.jsx("div",{className:"space-y-3",children:n.map((i,s)=>{if(!i)return g.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:[g.jsxs("div",{className:"flex-1 space-y-1.5",children:[g.jsx("p",{className:"text-md font-semibold text-gray-800",children:"Invalid Transformer"}),g.jsx("p",{className:"text-sm text-gray-500",children:"Transformer data is missing"})]}),g.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[g.jsx(Ce,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",disabled:!0,children:g.jsx(vc,{className:"h-4 w-4"})}),g.jsx(Ce,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:g.jsx(sr,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s);const c=i.path||"Unnamed Transformer",f=i.options||{},h=()=>!f||Object.keys(f).length===0?g.jsx("p",{className:"text-sm text-gray-500",children:"No parameters configured"}):g.jsx("div",{className:"flex flex-wrap gap-2 max-h-8 overflow-hidden",children:Object.entries(f).map(([p,m])=>g.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:[g.jsxs("span",{className:"text-gray-600",children:[p,":"]}),g.jsx("span",{className:"ml-1 text-gray-800",children:String(m)})]},p))});return g.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:[g.jsxs("div",{className:"flex-1 space-y-1.5",children:[g.jsx("p",{className:"text-md font-semibold text-gray-800",children:c}),h()]}),g.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[g.jsx(Ce,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",children:g.jsx(vc,{className:"h-4 w-4"})}),g.jsx(Ce,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:g.jsx(sr,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s)})})}function yA(){const{t:n}=Oa(),{config:a,setConfig:l}=Wr(),[i,s]=y.useState(null),[c,f]=y.useState(null),[h,p]=y.useState(null);if(!a)return g.jsxs(Ca,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[g.jsx(Na,{className:"flex flex-row items-center justify-between border-b p-4",children:g.jsx(Ra,{className:"text-lg",children:n("transformers.title")})}),g.jsx(ja,{className:"flex-grow flex items-center justify-center p-4",children:g.jsx("div",{className:"text-gray-500",children:"Loading transformers configuration..."})})]});const m=Array.isArray(a.transformers)?a.transformers:[],v=()=>{p({name:"",path:"",options:{}}),s(m.length)},b=j=>{const R=[...m];R.splice(j,1),l({...a,transformers:R}),f(null)},w=(j,R,L,k)=>{if(j<m.length){const H=[...m];k!==void 0?H[j].options[k]=L:H[j][R]=L,l({...a,transformers:H})}else if(h){const H={...h};k!==void 0?H.options[k]=L:H[R]=L,p(H)}},S=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)},E=()=>{s(null),p(null)};return g.jsxs(Ca,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[g.jsxs(Na,{className:"flex flex-row items-center justify-between border-b p-4",children:[g.jsxs(Ra,{className:"text-lg",children:[n("transformers.title")," ",g.jsxs("span",{className:"text-sm font-normal text-gray-500",children:["(",m.length,")"]})]}),g.jsx(Ce,{onClick:v,children:n("transformers.add")})]}),g.jsx(ja,{className:"flex-grow overflow-y-auto p-4",children:g.jsx(vA,{transformers:m,onEdit:s,onRemove:f})}),g.jsx(Xr,{open:i!==null,onOpenChange:E,children:g.jsxs(cr,{children:[g.jsx(ur,{children:g.jsx(fr,{children:n("transformers.edit")})}),S&&i!==null&&g.jsxs("div",{className:"space-y-4 py-4 px-6 max-h-96 overflow-y-auto",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ke,{htmlFor:"transformer-path",children:n("transformers.path")}),g.jsx(ft,{id:"transformer-path",value:S.path||"",onChange:j=>w(i,"path",j.target.value)})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx(Ke,{children:n("transformers.parameters")}),g.jsx(Ce,{variant:"outline",size:"sm",onClick:()=>{const j=S.options||{},R=`param${Object.keys(j).length+1}`;if(i!==null){const L={...j,[R]:""};if(i<m.length){const k=[...m];k[i].options=L,l({...a,transformers:k})}else h&&p({...h,options:L})}},children:g.jsx(Bd,{className:"h-4 w-4"})})]}),Object.entries(S.options||{}).map(([j,R])=>g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(ft,{value:j,onChange:L=>{const H={...S.options||{}};if(delete H[j],H[L.target.value]=R,i!==null)if(i<m.length){const M=[...m];M[i].options=H,l({...a,transformers:M})}else h&&p({...h,options:H})},className:"flex-1"}),g.jsx(ft,{value:R,onChange:L=>{i!==null&&w(i,"parameters",L.target.value,j)},className:"flex-1"}),g.jsx(Ce,{variant:"outline",size:"icon",onClick:()=>{if(i!==null){const k={...S.options||{}};if(delete k[j],i<m.length){const H=[...m];H[i].options=k,l({...a,transformers:H})}else h&&p({...h,options:k})}},children:g.jsx(sr,{className:"h-4 w-4"})})]},j))]})]}),g.jsxs(Qr,{children:[g.jsx(Ce,{variant:"outline",onClick:E,children:n("app.cancel")}),g.jsx(Ce,{onClick:C,children:n("app.save")})]})]})}),g.jsx(Xr,{open:c!==null,onOpenChange:()=>f(null),children:g.jsxs(cr,{children:[g.jsxs(ur,{children:[g.jsx(fr,{children:n("transformers.delete")}),g.jsx(Lc,{children:n("transformers.delete_transformer_confirm")})]}),g.jsxs(Qr,{children:[g.jsx(Ce,{variant:"outline",onClick:()=>f(null),children:n("app.cancel")}),g.jsx(Ce,{variant:"destructive",onClick:()=>c!==null&&b(c),children:n("app.delete")})]})]})})]})}function bA({providers:n,onEdit:a,onRemove:l}){return!n||!Array.isArray(n)?g.jsx("div",{className:"space-y-3",children:g.jsx("div",{className:"flex items-center justify-center rounded-md border bg-white p-8 text-gray-500",children:"No providers configured"})}):g.jsx("div",{className:"space-y-3",children:n.map((i,s)=>{if(!i)return g.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:[g.jsxs("div",{className:"flex-1 space-y-1.5",children:[g.jsx("p",{className:"text-md font-semibold text-gray-800",children:"Invalid Provider"}),g.jsx("p",{className:"text-sm text-gray-500",children:"Provider data is missing"})]}),g.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[g.jsx(Ce,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",disabled:!0,children:g.jsx(vc,{className:"h-4 w-4"})}),g.jsx(Ce,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:g.jsx(sr,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s);const c=i.name||"Unnamed Provider",f=i.api_base_url||"No API URL",h=Array.isArray(i.models)?i.models:[];return g.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:[g.jsxs("div",{className:"flex-1 space-y-1.5",children:[g.jsx("p",{className:"text-md font-semibold text-gray-800",children:c}),g.jsx("p",{className:"text-sm text-gray-500",children:f}),g.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:h.map((p,m)=>g.jsx(Vr,{variant:"outline",className:"font-normal transition-all-ease hover:scale-105",children:p||"Unnamed Model"},m))})]}),g.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[g.jsx(Ce,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",children:g.jsx(vc,{className:"h-4 w-4"})}),g.jsx(Ce,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:g.jsx(sr,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s)})})}const xA=y.forwardRef(({options:n,value:a,onChange:l,onEnter:i,searchPlaceholder:s="Search...",emptyPlaceholder:c="No options found.",inputPlaceholder:f="Type or select..."},h)=>{const[p,m]=y.useState(!1),[v,b]=y.useState(a||""),w=y.useRef(null);y.useImperativeHandle(h,()=>w.current),y.useEffect(()=>{b(a||"")},[a]);const S=R=>{const L=R.target.value;b(L),l(L)},C=R=>{R.key==="Enter"&&v.trim()&&i&&(i(v.trim()),b(""))},E=R=>{b(R),l(R),i&&(i(R),b("")),m(!1)},j=()=>v;return y.useImperativeHandle(h,()=>({...w.current,value:v,getCurrentValue:j,clearInput:()=>{b(""),l("")}})),g.jsxs("div",{className:"relative",children:[g.jsx(ft,{ref:w,value:v,onChange:S,onKeyDown:C,placeholder:f,className:"pr-10"}),g.jsxs($c,{open:p,onOpenChange:m,children:[g.jsx(Vc,{asChild:!0,children:g.jsx(Ce,{variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",children:g.jsx(fb,{className:"h-4 w-4 opacity-50"})})}),g.jsx(qc,{className:"w-[--radix-popover-trigger-width] p-0 animate-fade-in",children:g.jsxs(Yb,{children:[g.jsx(Gb,{placeholder:s}),g.jsxs(Kb,{children:[g.jsx(Xb,{children:c}),g.jsx(Qb,{children:n.map(R=>g.jsxs(Ib,{value:R.value,onSelect:()=>E(R.value),className:"transition-all-ease hover:bg-accent hover:text-accent-foreground",children:[g.jsx(ub,{className:dt("mr-2 h-4 w-4 transition-opacity",a===R.value?"opacity-100":"opacity-0")}),R.label]},R.value))})]})]})})]})]})});function wA(){const{t:n}=Oa(),{config:a,setConfig:l}=Wr(),[i,s]=y.useState(null),[c,f]=y.useState(null),[h,p]=y.useState({}),[m,v]=y.useState({}),[b,w]=y.useState({}),[S,C]=y.useState([]),[E,j]=y.useState(null),[R,L]=y.useState(!1),[k,H]=y.useState([]),[M,N]=y.useState({}),[B,J]=y.useState(null),[te,ae]=y.useState(null),[re,fe]=y.useState(""),de=y.useRef(null);if(y.useEffect(()=>{(async()=>{try{const ue=await fetch("https://pub-0dc3e1677e894f07bbea11b17a29e032.r2.dev/providers.json");if(ue.ok){const ge=await ue.json();H(ge||[])}else console.error("Failed to fetch provider templates")}catch(ue){console.error("Failed to fetch provider templates:",ue)}})()},[]),y.useEffect(()=>{(async()=>{try{const ue=await Pt.get("/transformers");C(ue.transformers)}catch(ue){console.error("Failed to fetch transformers:",ue)}})()},[]),!a)return g.jsxs(Ca,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[g.jsx(Na,{className:"flex flex-row items-center justify-between border-b p-4",children:g.jsx(Ra,{className:"text-lg",children:n("providers.title")})}),g.jsx(ja,{className:"flex-grow flex items-center justify-center p-4",children:g.jsx("div",{className:"text-gray-500",children:"Loading providers configuration..."})})]});const Q=Array.isArray(a.Providers)?a.Providers:[],ee=()=>{const ie={name:"",api_base_url:"",api_key:"",models:[]};s(a.Providers.length),j(ie),L(!0),N(ue=>({...ue,[a.Providers.length]:!1})),J(null),ae(null)},A=ie=>{const ue=a.Providers[ie];s(ie),j(JSON.parse(JSON.stringify(ue))),L(!1),N(ge=>({...ge,[ie]:!1})),J(null),ae(null)},X=()=>{if(!E)return;if(!E.name||E.name.trim()===""){ae(n("providers.name_required"));return}const ie=E.name.trim();if(a.Providers.some((ge,he)=>!R&&he===i?!1:ge.name.toLowerCase()===ie.toLowerCase())){ae(n("providers.name_duplicate"));return}if(!E.api_key||E.api_key.trim()===""){J(n("providers.api_key_required"));return}if(J(null),ae(null),i!==null&&E){const ge=[...a.Providers];R?ge.push(E):ge[i]=E,l({...a,Providers:ge})}i!==null&&N(ge=>{const he={...ge};return delete he[i],he}),s(null),j(null),L(!1)},V=()=>{i!==null&&(p(ie=>{const ue={...ie};return delete ue[i],ue}),N(ie=>{const ue={...ie};return delete ue[i],ue})),s(null),j(null),L(!1),J(null),ae(null)},ye=ie=>{const ue=[...a.Providers];ue.splice(ie,1),l({...a,Providers:ue}),f(null)},O=(ie,ue,ge)=>{if(E){const he={...E,[ue]:ge};j(he)}},G=(ie,ue)=>{if(!ue||!E)return;const ge={...E};ge.transformer||(ge.transformer={use:[]}),ge.transformer.use=[...ge.transformer.use,ue],j(ge)},U=(ie,ue)=>{if(!E)return;const ge={...E};if(ge.transformer){const he=[...ge.transformer.use];he.splice(ue,1),ge.transformer.use=he,he.length===0&&Object.keys(ge.transformer).length===1&&delete ge.transformer}j(ge)},K=(ie,ue,ge)=>{if(!ge||!E)return;const he={...E};he.transformer||(he.transformer={use:[]}),he.transformer[ue]||(he.transformer[ue]={use:[]}),he.transformer[ue].use=[...he.transformer[ue].use,ge],j(he)},P=(ie,ue,ge)=>{if(!E)return;const he={...E};if(he.transformer&&he.transformer[ue]){const Oe=[...he.transformer[ue].use];Oe.splice(ge,1),he.transformer[ue].use=Oe,Oe.length===0&&Object.keys(he.transformer[ue]).length===1&&delete he.transformer[ue]}j(he)},oe=(ie,ue,ge,he)=>{if(!E)return;const Oe={...E};if(Oe.transformer||(Oe.transformer={use:[]}),Oe.transformer.use&&Oe.transformer.use.length>ue){const ke=Oe.transformer.use[ue];if(Array.isArray(ke)){const Pe=[...ke];if(Pe.length>1&&typeof Pe[1]=="object"&&Pe[1]!==null){const Ft={...Pe[1],[ge]:he};Pe[1]=Ft}else if(Pe.length>1){const nt={[ge]:he};Pe.splice(1,Pe.length-1,nt)}else{const nt={[ge]:he};Pe.push(nt)}Oe.transformer.use[ue]=Pe}else{const Pe={[ge]:he};Oe.transformer.use[ue]=[ke,Pe]}}j(Oe)},me=(ie,ue,ge)=>{if(!E)return;const he={...E};if(!he.transformer?.use||he.transformer.use.length<=ue)return;const Oe=he.transformer.use[ue];if(Array.isArray(Oe)&&Oe.length>1){const ke=[...Oe];if(typeof ke[1]=="object"&&ke[1]!==null){const Pe={...ke[1]};delete Pe[ge],Object.keys(Pe).length===0?ke.splice(1,1):ke[1]=Pe,he.transformer.use[ue]=ke,j(he)}}},ve=(ie,ue,ge,he,Oe)=>{if(!E)return;const ke={...E};if(ke.transformer||(ke.transformer={use:[]}),ke.transformer[ue]||(ke.transformer[ue]={use:[]}),ke.transformer[ue].use&&ke.transformer[ue].use.length>ge){const Pe=ke.transformer[ue].use[ge];if(Array.isArray(Pe)){const nt=[...Pe];if(nt.length>1&&typeof nt[1]=="object"&&nt[1]!==null){const Bn={...nt[1],[he]:Oe};nt[1]=Bn}else if(nt.length>1){const Ft={[he]:Oe};nt.splice(1,nt.length-1,Ft)}else{const Ft={[he]:Oe};nt.push(Ft)}ke.transformer[ue].use[ge]=nt}else{const nt={[he]:Oe};ke.transformer[ue].use[ge]=[Pe,nt]}}j(ke)},Le=(ie,ue,ge,he)=>{if(!E)return;const Oe={...E};if(!Oe.transformer?.[ue]?.use||Oe.transformer[ue].use.length<=ge)return;const ke=Oe.transformer[ue].use[ge];if(Array.isArray(ke)&&ke.length>1){const Pe=[...ke];if(typeof Pe[1]=="object"&&Pe[1]!==null){const nt={...Pe[1]};delete nt[he],Object.keys(nt).length===0?Pe.splice(1,1):Pe[1]=nt,Oe.transformer[ue].use[ge]=Pe,j(Oe)}}},Fe=(ie,ue)=>{if(!ue.trim()||!E)return;const ge={...E},he=Array.isArray(ge.models)?[...ge.models]:[];he.includes(ue.trim())||(he.push(ue.trim()),ge.models=he,j(ge))},Je=ie=>{if(ie)try{const ue=JSON.parse(ie);if(ue){const ge=E?.name,he=JSON.parse(JSON.stringify(ue));!R&&ge&&(he.name=ge),j(he)}}catch(ue){console.error("Failed to parse template",ue)}},Tt=(ie,ue)=>{if(!E)return;const ge={...E},he=Array.isArray(ge.models)?[...ge.models]:[];ue>=0&&ue<he.length&&(he.splice(ue,1),ge.models=he,j(ge))},Ze=E||(i!==null?Q[i]:null),an=Q.filter(ie=>{if(!re)return!0;const ue=re.toLowerCase();return ie.name&&ie.name.toLowerCase().includes(ue)||ie.api_base_url&&ie.api_base_url.toLowerCase().includes(ue)?!0:ie.models&&Array.isArray(ie.models)?ie.models.some(ge=>ge&&ge.toLowerCase().includes(ue)):!1});return g.jsxs(Ca,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[g.jsxs(Na,{className:"flex flex-col border-b p-4 gap-3",children:[g.jsxs("div",{className:"flex flex-row items-center justify-between",children:[g.jsxs(Ra,{className:"text-lg",children:[n("providers.title")," ",g.jsxs("span",{className:"text-sm font-normal text-gray-500",children:["(",an.length,"/",Q.length,")"]})]}),g.jsx(Ce,{onClick:ee,children:n("providers.add")})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsxs("div",{className:"relative flex-1",children:[g.jsx(mb,{className:"absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-500"}),g.jsx(ft,{placeholder:n("providers.search"),value:re,onChange:ie=>fe(ie.target.value),className:"pl-8"})]}),re&&g.jsx(Ce,{variant:"ghost",size:"icon",onClick:()=>fe(""),children:g.jsx(db,{className:"h-4 w-4"})})]})]}),g.jsx(ja,{className:"flex-grow overflow-y-auto p-4",children:g.jsx(bA,{providers:an,onEdit:A,onRemove:f})}),g.jsx(Xr,{open:i!==null,onOpenChange:ie=>{ie||V()},children:g.jsxs(cr,{className:"max-h-[80vh] flex flex-col sm:max-w-2xl",children:[g.jsx(ur,{children:g.jsx(fr,{children:n("providers.edit")})}),Ze&&i!==null&&g.jsxs("div",{className:"space-y-4 p-4 overflow-y-auto flex-grow",children:[k.length>0&&g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ke,{children:n("providers.import_from_template")}),g.jsx(An,{options:k.map(ie=>({label:ie.name,value:JSON.stringify(ie)})),value:"",onChange:Je,placeholder:n("providers.select_template"),emptyPlaceholder:n("providers.no_templates_found")})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ke,{htmlFor:"name",children:n("providers.name")}),g.jsx(ft,{id:"name",value:Ze.name||"",onChange:ie=>{O(i,"name",ie.target.value),te&&ae(null)},className:te?"border-red-500":""}),te&&g.jsx("p",{className:"text-sm text-red-500",children:te})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ke,{htmlFor:"api_base_url",children:n("providers.api_base_url")}),g.jsx(ft,{id:"api_base_url",value:Ze.api_base_url||"",onChange:ie=>O(i,"api_base_url",ie.target.value)})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ke,{htmlFor:"api_key",children:n("providers.api_key")}),g.jsxs("div",{className:"relative",children:[g.jsx(ft,{id:"api_key",type:M[i||0]?"text":"password",value:Ze.api_key||"",onChange:ie=>O(i,"api_key",ie.target.value),className:B?"border-red-500":""}),g.jsx(Ce,{type:"button",variant:"ghost",size:"icon",className:"absolute right-2 top-1/2 transform -translate-y-1/2 h-8 w-8",onClick:()=>{const ie=i||0;N(ue=>({...ue,[ie]:!ue[ie]}))},children:M[i||0]?g.jsx(NN,{className:"h-4 w-4"}):g.jsx(jN,{className:"h-4 w-4"})})]}),B&&g.jsx("p",{className:"text-sm text-red-500",children:B})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ke,{htmlFor:"models",children:n("providers.models")}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs("div",{className:"flex gap-2",children:[g.jsx("div",{className:"flex-1",children:h[i]?g.jsx(xA,{ref:de,options:(Ze.models||[]).map(ie=>({label:ie,value:ie})),value:"",onChange:()=>{},onEnter:ie=>{i!==null&&Fe(i,ie)},inputPlaceholder:n("providers.models_placeholder")}):g.jsx(ft,{id:"models",placeholder:n("providers.models_placeholder"),onKeyDown:ie=>{ie.key==="Enter"&&ie.currentTarget.value.trim()&&i!==null&&(Fe(i,ie.currentTarget.value),ie.currentTarget.value="")}})}),g.jsx(Ce,{onClick:()=>{if(h[i]&&de.current){const ie=de.current,ue=ie.getCurrentValue();ue&&ue.trim()&&i!==null&&(Fe(i,ue.trim()),ie.clearInput())}else{const ie=document.getElementById("models");ie&&ie.value.trim()&&i!==null&&(Fe(i,ie.value),ie.value="")}},children:n("providers.add_model")})]}),g.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:(Ze.models||[]).map((ie,ue)=>g.jsxs(Vr,{variant:"outline",className:"font-normal flex items-center gap-1",children:[ie,g.jsx("button",{type:"button",className:"ml-1 rounded-full hover:bg-gray-200",onClick:()=>i!==null&&Tt(i,ue),children:g.jsx(Yr,{className:"h-3 w-3"})})]},ue))})]})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ke,{children:n("providers.provider_transformer")}),g.jsx("div",{className:"flex gap-2",children:g.jsx(An,{options:S.map(ie=>({label:ie.name,value:ie.name})),value:"",onChange:ie=>{i!==null&&G(i,ie)},placeholder:n("providers.select_transformer"),emptyPlaceholder:n("providers.no_transformers")})}),Ze.transformer?.use&&Ze.transformer.use.length>0&&g.jsxs("div",{className:"space-y-2 mt-2",children:[g.jsx("div",{className:"text-sm font-medium text-gray-700",children:n("providers.selected_transformers")}),Ze.transformer.use.map((ie,ue)=>g.jsxs("div",{className:"border rounded-md p-3",children:[g.jsxs("div",{className:"flex gap-2 items-center mb-2",children:[g.jsx("div",{className:"flex-1 bg-gray-50 rounded p-2 text-sm",children:typeof ie=="string"?ie:Array.isArray(ie)?String(ie[0]):String(ie)}),g.jsx(Ce,{variant:"outline",size:"icon",onClick:()=>{i!==null&&U(i,ue)},children:g.jsx(sr,{className:"h-4 w-4"})})]}),g.jsxs("div",{className:"mt-2 pl-4 border-l-2 border-gray-200",children:[g.jsx(Ke,{className:"text-sm",children:n("providers.transformer_parameters")}),g.jsxs("div",{className:"space-y-2 mt-1",children:[g.jsxs("div",{className:"flex gap-2",children:[g.jsx(ft,{placeholder:n("providers.parameter_name"),value:m[`provider-${i}-transformer-${ue}`]?.name||"",onChange:ge=>{const he=`provider-${i}-transformer-${ue}`;v(Oe=>({...Oe,[he]:{...Oe[he]||{name:"",value:""},name:ge.target.value}}))}}),g.jsx(ft,{placeholder:n("providers.parameter_value"),value:m[`provider-${i}-transformer-${ue}`]?.value||"",onChange:ge=>{const he=`provider-${i}-transformer-${ue}`;v(Oe=>({...Oe,[he]:{...Oe[he]||{name:"",value:""},value:ge.target.value}}))}}),g.jsx(Ce,{size:"sm",onClick:()=>{if(i!==null){const ge=`provider-${i}-transformer-${ue}`,he=m[ge];he&&he.name&&he.value&&(oe(i,ue,he.name,he.value),v(Oe=>({...Oe,[ge]:{name:"",value:""}})))}},children:g.jsx(Bd,{className:"h-4 w-4"})})]}),(()=>{if(!Ze.transformer?.use||Ze.transformer.use.length<=ue)return null;const ge=Ze.transformer.use[ue];let he={};return Array.isArray(ge)&&ge.length>1&&typeof ge[1]=="object"&&ge[1]!==null&&(he=ge[1]),Object.keys(he).length>0?g.jsx("div",{className:"space-y-1",children:Object.entries(he).map(([Oe,ke])=>g.jsxs("div",{className:"flex items-center justify-between bg-gray-50 rounded p-2",children:[g.jsxs("div",{className:"text-sm",children:[g.jsxs("span",{className:"font-medium",children:[Oe,":"]})," ",String(ke)]}),g.jsx(Ce,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>{i!==null&&me(i,ue,Oe)},children:g.jsx(Yr,{className:"h-3 w-3"})})]},Oe))}):null})()]})]})]},ue))]})]}),Ze.models&&Ze.models.length>0&&g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ke,{children:n("providers.model_transformers")}),g.jsx("div",{className:"space-y-3",children:(Ze.models||[]).map((ie,ue)=>g.jsxs("div",{className:"border rounded-md p-3",children:[g.jsx("div",{className:"font-medium text-sm mb-2",children:ie}),g.jsx("div",{className:"flex gap-2",children:g.jsx("div",{className:"flex-1 flex gap-2",children:g.jsx(An,{options:S.map(ge=>({label:ge.name,value:ge.name})),value:"",onChange:ge=>{i!==null&&K(i,ie,ge)},placeholder:n("providers.select_transformer"),emptyPlaceholder:n("providers.no_transformers")})})}),Ze.transformer?.[ie]?.use&&Ze.transformer[ie].use.length>0&&g.jsxs("div",{className:"space-y-2 mt-2",children:[g.jsx("div",{className:"text-sm font-medium text-gray-700",children:n("providers.selected_transformers")}),Ze.transformer[ie].use.map((ge,he)=>g.jsxs("div",{className:"border rounded-md p-3",children:[g.jsxs("div",{className:"flex gap-2 items-center mb-2",children:[g.jsx("div",{className:"flex-1 bg-gray-50 rounded p-2 text-sm",children:typeof ge=="string"?ge:Array.isArray(ge)?String(ge[0]):String(ge)}),g.jsx(Ce,{variant:"outline",size:"icon",onClick:()=>{i!==null&&P(i,ie,he)},children:g.jsx(sr,{className:"h-4 w-4"})})]}),g.jsxs("div",{className:"mt-2 pl-4 border-l-2 border-gray-200",children:[g.jsx(Ke,{className:"text-sm",children:n("providers.transformer_parameters")}),g.jsxs("div",{className:"space-y-2 mt-1",children:[g.jsxs("div",{className:"flex gap-2",children:[g.jsx(ft,{placeholder:n("providers.parameter_name"),value:b[`model-${i}-${ie}-transformer-${he}`]?.name||"",onChange:Oe=>{const ke=`model-${i}-${ie}-transformer-${he}`;w(Pe=>({...Pe,[ke]:{...Pe[ke]||{name:"",value:""},name:Oe.target.value}}))}}),g.jsx(ft,{placeholder:n("providers.parameter_value"),value:b[`model-${i}-${ie}-transformer-${he}`]?.value||"",onChange:Oe=>{const ke=`model-${i}-${ie}-transformer-${he}`;w(Pe=>({...Pe,[ke]:{...Pe[ke]||{name:"",value:""},value:Oe.target.value}}))}}),g.jsx(Ce,{size:"sm",onClick:()=>{if(i!==null){const Oe=`model-${i}-${ie}-transformer-${he}`,ke=b[Oe];ke&&ke.name&&ke.value&&(ve(i,ie,he,ke.name,ke.value),w(Pe=>({...Pe,[Oe]:{name:"",value:""}})))}},children:g.jsx(Bd,{className:"h-4 w-4"})})]}),(()=>{if(!Ze.transformer?.[ie]?.use||Ze.transformer[ie].use.length<=he)return null;const Oe=Ze.transformer[ie].use[he];let ke={};return Array.isArray(Oe)&&Oe.length>1&&typeof Oe[1]=="object"&&Oe[1]!==null&&(ke=Oe[1]),Object.keys(ke).length>0?g.jsx("div",{className:"space-y-1",children:Object.entries(ke).map(([Pe,nt])=>g.jsxs("div",{className:"flex items-center justify-between bg-gray-50 rounded p-2",children:[g.jsxs("div",{className:"text-sm",children:[g.jsxs("span",{className:"font-medium",children:[Pe,":"]})," ",String(nt)]}),g.jsx(Ce,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>{i!==null&&Le(i,ie,he,Pe)},children:g.jsx(Yr,{className:"h-3 w-3"})})]},Pe))}):null})()]})]})]},he))]})]},ue))})]})]}),g.jsx("div",{className:"space-y-3 mt-auto",children:g.jsx("div",{className:"flex justify-end gap-2",children:g.jsx(Ce,{onClick:X,children:n("app.save")})})})]})}),g.jsx(Xr,{open:c!==null,onOpenChange:()=>f(null),children:g.jsxs(cr,{children:[g.jsxs(ur,{children:[g.jsx(fr,{children:n("providers.delete")}),g.jsx(Lc,{children:n("providers.delete_provider_confirm")})]}),g.jsxs(Qr,{children:[g.jsx(Ce,{variant:"outline",onClick:()=>f(null),children:n("providers.cancel")}),g.jsx(Ce,{variant:"destructive",onClick:()=>c!==null&&ye(c),children:n("providers.delete")})]})]})})]})}function SA(){const{t:n}=Oa(),{config:a,setConfig:l}=Wr();if(!a)return g.jsxs(Ca,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[g.jsx(Na,{className:"border-b p-4",children:g.jsx(Ra,{className:"text-lg",children:n("router.title")})}),g.jsx(ja,{className:"flex-grow flex items-center justify-center p-4",children:g.jsx("div",{className:"text-gray-500",children:"Loading router configuration..."})})]});const i=a.Router||{default:"",background:"",think:"",longContext:"",longContextThreshold:6e4,webSearch:"",image:""},s=(p,m)=>{const b={...a.Router||{},[p]:m};l({...a,Router:b})},c=p=>{l({...a,forceUseImageAgent:p})},h=(Array.isArray(a.Providers)?a.Providers:[]).flatMap(p=>{if(!p)return[];const m=Array.isArray(p.models)?p.models:[],v=p.name||"Unknown Provider";return m.map(b=>({value:`${v},${b||"Unknown Model"}`,label:`${v}, ${b||"Unknown Model"}`}))});return g.jsxs(Ca,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[g.jsx(Na,{className:"border-b p-4",children:g.jsx(Ra,{className:"text-lg",children:n("router.title")})}),g.jsxs(ja,{className:"flex-grow space-y-5 overflow-y-auto p-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ke,{children:n("router.default")}),g.jsx(An,{options:h,value:i.default||"",onChange:p=>s("default",p),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ke,{children:n("router.background")}),g.jsx(An,{options:h,value:i.background||"",onChange:p=>s("background",p),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ke,{children:n("router.think")}),g.jsx(An,{options:h,value:i.think||"",onChange:p=>s("think",p),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),g.jsx("div",{className:"space-y-2",children:g.jsxs("div",{className:"flex items-center gap-4",children:[g.jsxs("div",{className:"flex-1",children:[g.jsx(Ke,{children:n("router.longContext")}),g.jsx(An,{options:h,value:i.longContext||"",onChange:p=>s("longContext",p),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),g.jsxs("div",{className:"w-48",children:[g.jsx(Ke,{children:n("router.longContextThreshold")}),g.jsx(ft,{type:"number",value:i.longContextThreshold||6e4,onChange:p=>s("longContextThreshold",parseInt(p.target.value)||6e4),placeholder:"60000"})]})]})}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ke,{children:n("router.webSearch")}),g.jsx(An,{options:h,value:i.webSearch||"",onChange:p=>s("webSearch",p),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),g.jsx("div",{className:"space-y-2",children:g.jsxs("div",{className:"flex items-center gap-4",children:[g.jsxs("div",{className:"flex-1",children:[g.jsxs(Ke,{children:[n("router.image")," (beta)"]}),g.jsx(An,{options:h,value:i.image||"",onChange:p=>s("image",p),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),g.jsxs("div",{className:"w-48",children:[g.jsx(Ke,{htmlFor:"forceUseImageAgent",children:n("router.forceUseImageAgent")}),g.jsxs("select",{id:"forceUseImageAgent",value:a.forceUseImageAgent?"true":"false",onChange:p=>c(p.target.value==="true"),className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium 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",children:[g.jsx("option",{value:"false",children:n("common.no")}),g.jsx("option",{value:"true",children:n("common.yes")})]})]})]})})]})]})}function _A(n,a,l){return a in n?Object.defineProperty(n,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):n[a]=l,n}function Fy(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 Yy(n){for(var a=1;a<arguments.length;a++){var l=arguments[a]!=null?arguments[a]:{};a%2?Fy(Object(l),!0).forEach(function(i){_A(n,i,l[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(l)):Fy(Object(l)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(l,i))})}return n}function EA(n,a){if(n==null)return{};var l={},i=Object.keys(n),s,c;for(c=0;c<i.length;c++)s=i[c],!(a.indexOf(s)>=0)&&(l[s]=n[s]);return l}function CA(n,a){if(n==null)return{};var l=EA(n,a),i,s;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(n);for(s=0;s<c.length;s++)i=c[s],!(a.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(n,i)&&(l[i]=n[i])}return l}function NA(n,a){return RA(n)||jA(n,a)||OA(n,a)||AA()}function RA(n){if(Array.isArray(n))return n}function jA(n,a){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(n)))){var l=[],i=!0,s=!1,c=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,c=p}finally{try{!i&&f.return!=null&&f.return()}finally{if(s)throw c}}return l}}function OA(n,a){if(n){if(typeof n=="string")return Gy(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 Gy(n,a)}}function Gy(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 AA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
312
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TA(n,a,l){return a in n?Object.defineProperty(n,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):n[a]=l,n}function Ky(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 Xy(n){for(var a=1;a<arguments.length;a++){var l=arguments[a]!=null?arguments[a]:{};a%2?Ky(Object(l),!0).forEach(function(i){TA(n,i,l[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(l)):Ky(Object(l)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(l,i))})}return n}function MA(){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,c){return c(s)},i)}}function uo(n){return function a(){for(var l=this,i=arguments.length,s=new Array(i),c=0;c<i;c++)s[c]=arguments[c];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 Sc(n){return{}.toString.call(n).includes("Object")}function DA(n){return!Object.keys(n).length}function So(n){return typeof n=="function"}function LA(n,a){return Object.prototype.hasOwnProperty.call(n,a)}function kA(n,a){return Sc(a)||lr("changeType"),Object.keys(a).some(function(l){return!LA(n,l)})&&lr("changeField"),a}function zA(n){So(n)||lr("selectorType")}function UA(n){So(n)||Sc(n)||lr("handlerType"),Sc(n)&&Object.values(n).some(function(a){return!So(a)})&&lr("handlersType")}function PA(n){n||lr("initialIsRequired"),Sc(n)||lr("initialType"),DA(n)&&lr("initialContent")}function HA(n,a){throw new Error(n[a]||n.default)}var BA={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"},lr=uo(HA)(BA),nc={changes:kA,selector:zA,handler:UA,initial:PA};function $A(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};nc.initial(n),nc.handler(a);var l={current:n},i=uo(FA)(l,a),s=uo(qA)(l),c=uo(nc.changes)(n),f=uo(VA)(l);function h(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(v){return v};return nc.selector(m),m(l.current)}function p(m){MA(i,s,c,f)(m)}return[h,p]}function VA(n,a){return So(a)?a(n.current):a}function qA(n,a){return n.current=Xy(Xy({},n.current),a),a}function FA(n,a,l){return So(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 YA={create:$A},GA={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}};function KA(n){return function a(){for(var l=this,i=arguments.length,s=new Array(i),c=0;c<i;c++)s[c]=arguments[c];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 XA(n){return{}.toString.call(n).includes("Object")}function QA(n){return n||Qy("configIsRequired"),XA(n)||Qy("configType"),n.urls?(IA(),{paths:{vs:n.urls.monacoBase}}):n}function IA(){console.warn(Ux.deprecation)}function ZA(n,a){throw new Error(n[a]||n.default)}var Ux={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!
340
+ `,document.head.appendChild(ee),()=>{document.head.removeChild(ee)}},[]),y.useEffect(()=>{const ee=new Set;Object.keys(c).forEach(X=>{const te=c[X];te&&typeof te=="object"&&"modules"in te&&(te.modules||[]).forEach(I=>{I.background&&/^#[0-9A-F]{6}$/i.test(I.background)&&ee.add(I.background)})}),w(ee);const ie=document.createElement("style");ie.id="hex-powerline-styles";let fe="";return ee.forEach(X=>{const te=parseInt(X.slice(1,3),16),O=parseInt(X.slice(3,5),16),I=parseInt(X.slice(5,7),16);fe+=`.powerline-separator[data-current-bg="${X}"] { border-left-color: rgb(${te}, ${O}, ${I}); }
341
+ `}),ie.innerHTML=fe,document.head.appendChild(ie),()=>{const X=document.getElementById("hex-powerline-styles");X&&document.head.removeChild(X)}},[c]);const S=aT.map(ee=>({...ee,label:l(`statusline.${ee.label}`)})),N=ee=>{f(ie=>({...ie,currentStyle:ee}))},E=(ee,ie,fe)=>{const X=c.currentStyle,te=c[X],O=te&&typeof te=="object"&&"modules"in te?[...te.modules||[]]:[];O[ee]&&(O[ee]={...O[ee],[ie]:fe}),f(I=>({...I,[X]:{modules:O}}))},[R,C]=y.useState([]),A=()=>{C([]),o&&(s({...o,StatusLine:{...c,fontFamily:m}}),a(!1))},T=({title:ee,description:ie,variant:fe="default"})=>{const X=fe==="destructive";return d.jsx("div",{className:`rounded-lg border p-4 ${X?"bg-red-50 border-red-200 text-red-800":"bg-blue-50 border-blue-200 text-blue-800"}`,children:d.jsxs("div",{className:"flex",children:[d.jsx("div",{className:"flex-shrink-0",children:X?d.jsx("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:d.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}):d.jsx("svg",{className:"h-5 w-5 text-blue-400",viewBox:"0 0 20 20",fill:"currentColor",children:d.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})}),d.jsxs("div",{className:"ml-3",children:[d.jsx("h3",{className:`text-sm font-medium ${X?"text-red-800":"text-blue-800"}`,children:ee}),d.jsx("div",{className:`mt-2 text-sm ${X?"text-red-700":"text-blue-700"}`,children:ie})]})]})})},k=c.currentStyle,D=c[k],j=D&&typeof D=="object"&&"modules"in D?D.modules||[]:[],U=h!==null&&j.length>h?j[h]:null,B=y.useCallback(()=>{if(h===null)return;const ee=c.currentStyle,ie=c[ee],fe=ie&&typeof ie=="object"&&"modules"in ie?[...ie.modules||[]]:[];h>=0&&h<fe.length&&(fe.splice(h,1),f(X=>({...X,[ee]:{modules:fe}})),v(null))},[h,c]),W=m?{fontFamily:m}:{};y.useEffect(()=>{const ee=ie=>{h!==null&&(ie.key==="Delete"||ie.key==="Backspace")&&(ie.preventDefault(),B())};return document.addEventListener("keydown",ee),()=>{document.removeEventListener("keydown",ee)}},[h,B]);const ne=`${m}-${c.currentStyle}`;return d.jsx(Qr,{open:n,onOpenChange:a,children:d.jsxs(dr,{className:"max-w-4xl h-[90vh] overflow-hidden sm:max-w-5xl md:max-w-6xl lg:max-w-7xl animate-in fade-in-90 slide-in-from-bottom-10 duration-300 flex flex-col",children:[d.jsx(hr,{"data-testid":"statusline-config-dialog-header",className:"border-b pb-4",children:d.jsxs(mr,{className:"flex items-center",children:[d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"mr-2",children:[d.jsx("path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),d.jsx("path",{d:"M14 3v4a2 2 0 0 0 2 2h4"}),d.jsx("path",{d:"M3 12h18"})]}),l("statusline.title")]})}),R.length>0&&d.jsx("div",{className:"px-6",children:d.jsx(T,{variant:"destructive",title:"配置验证失败",description:d.jsx("ul",{className:"list-disc pl-5 space-y-1",children:R.map((ee,ie)=>d.jsx("li",{children:ee},ie))})})}),d.jsxs("div",{className:"flex flex-col gap-6 flex-1 overflow-hidden",children:[d.jsx("div",{className:"space-y-6",children:d.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ze,{htmlFor:"theme-style",className:"text-sm font-medium",children:l("statusline.theme")}),d.jsx(An,{options:[{label:l("statusline.theme_default"),value:"default"},{label:l("statusline.theme_powerline"),value:"powerline"}],value:c.currentStyle,onChange:N,"data-testid":"theme-selector",placeholder:l("statusline.theme_placeholder")})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ze,{htmlFor:"font-family",className:"text-sm font-medium",children:l("statusline.module_icon")}),d.jsx(An,{options:nT,value:m,onChange:ee=>g(ee),"data-testid":"font-family-selector",placeholder:l("statusline.font_placeholder")})]})]})}),d.jsxs("div",{className:"grid grid-cols-5 gap-6 overflow-hidden flex-1",children:[d.jsxs("div",{className:"border rounded-lg flex flex-col overflow-hidden col-span-1",children:[d.jsx("h3",{className:"text-sm font-medium p-4 pb-0 mb-3",children:l("statusline.components")}),d.jsx("div",{className:"space-y-2 overflow-y-auto px-4 pb-4 flex-1",children:S.map(ee=>d.jsx("div",{className:"flex items-center gap-2 p-2 border rounded cursor-move hover:bg-secondary",draggable:!0,onDragStart:ie=>{ie.dataTransfer.setData("moduleType",ee.value)},children:d.jsx("span",{className:"text-sm",children:ee.label})},ee.value))})]}),d.jsxs("div",{className:"border rounded-lg p-4 flex flex-col col-span-3",children:[d.jsx("h3",{className:"text-sm font-medium mb-3",children:l("statusline.preview")}),d.jsx("div",{className:`rounded bg-black/90 text-white font-mono text-sm overflow-x-auto flex items-center border border-border p-3 py-5 shadow-inner overflow-hidden ${c.currentStyle==="powerline"?"gap-0 h-8 p-0 items-center relative":"h-5"}`,"data-testid":"statusline-preview",style:W,onDragOver:ee=>{ee.preventDefault()},onDrop:ee=>{ee.preventDefault();const ie=ee.dataTransfer.getData("moduleType");if(ie){const fe=c.currentStyle,X=c[fe],te=X&&typeof X=="object"&&"modules"in X?[...X.modules||[]]:[];let O;switch(ie){case"workDir":O={type:"workDir",icon:"󰉋",text:"{{workDirName}}",color:"bright_blue"};break;case"gitBranch":O={type:"gitBranch",icon:"🌿",text:"{{gitBranch}}",color:"bright_green"};break;case"model":O={type:"model",icon:"🤖",text:"{{model}}",color:"bright_yellow"};break;case"usage":O={type:"usage",icon:"📊",text:"{{inputTokens}} → {{outputTokens}}",color:"bright_magenta"};break;case"script":O={type:"script",icon:"📜",text:"Script Module",color:"bright_cyan",scriptPath:""};break;default:O={...tT,type:ie}}te.push(O),f(I=>({...I,[fe]:{modules:te}}))}},children:j.length>0?d.jsx("div",{className:"flex items-center flex-wrap gap-0",children:j.map((ee,ie)=>d.jsx("div",{className:`cursor-pointer ${h===ie?"bg-white/20":"hover:bg-white/10"} ${c.currentStyle==="powerline"?"p-0 rounded-none inline-flex overflow-visible relative":"flex items-center gap-1 px-2 py-1 rounded"}`,onClick:()=>v(ie),draggable:!0,onDragStart:fe=>{fe.dataTransfer.setData("dragIndex",ie.toString())},onDragOver:fe=>{fe.preventDefault()},onDrop:fe=>{fe.preventDefault();const X=parseInt(fe.dataTransfer.getData("dragIndex"));if(!isNaN(X)&&X!==ie){const te=c.currentStyle,O=c[te],I=O&&typeof O=="object"&&"modules"in O?[...O.modules||[]]:[];if(X>=0&&X<I.length&&ie>=0&&ie<=I.length){const[q]=I.splice(X,1);I.splice(ie,0,q),f(ye=>({...ye,[te]:{modules:I}})),h===X?v(ie):h===ie&&v(X)}}},children:oT(ee,c.currentStyle==="powerline")},ie))}):d.jsxs("div",{className:"flex flex-col items-center justify-center w-full py-4 text-center",children:[d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-500 mb-2",children:[d.jsx("path",{d:"M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18z"}),d.jsx("path",{d:"M12 8v8"}),d.jsx("path",{d:"M8 12h8"})]}),d.jsx("span",{className:"text-gray-500 text-sm",children:l("statusline.drag_hint")})]})},ne)]}),d.jsxs("div",{className:"border rounded-lg flex flex-col overflow-hidden col-span-1",children:[d.jsx("h3",{className:"text-sm font-medium p-4 pb-0 mb-3",children:l("statusline.properties")}),d.jsx("div",{className:"overflow-y-auto px-4 pb-4 flex-1",children:U&&h!==null?d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ze,{htmlFor:"module-icon",children:l("statusline.module_icon")}),d.jsx(rT,{value:U.icon||"",onChange:ee=>E(h,"icon",ee),fontFamily:m,t:l},ne),d.jsx("p",{className:"text-xs text-muted-foreground",children:l("statusline.icon_description")})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ze,{htmlFor:"module-text",children:l("statusline.module_text")}),d.jsx(vt,{id:"module-text",value:U.text,onChange:ee=>E(h,"text",ee.target.value),placeholder:l("statusline.text_placeholder")}),d.jsxs("div",{className:"text-xs text-muted-foreground",children:[d.jsx("p",{children:l("statusline.module_text_description")}),d.jsxs("div",{className:"flex flex-wrap gap-1 mt-1",children:[d.jsx(Vr,{variant:"secondary",className:"text-xs py-0.5 px-1.5",children:"{{workDirName}}"}),d.jsx(Vr,{variant:"secondary",className:"text-xs py-0.5 px-1.5",children:"{{gitBranch}}"}),d.jsx(Vr,{variant:"secondary",className:"text-xs py-0.5 px-1.5",children:"{{model}}"}),d.jsx(Vr,{variant:"secondary",className:"text-xs py-0.5 px-1.5",children:"{{inputTokens}}"}),d.jsx(Vr,{variant:"secondary",className:"text-xs py-0.5 px-1.5",children:"{{outputTokens}}"})]})]})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ze,{children:l("statusline.module_color")}),d.jsx(a0,{value:U.color||"",onChange:ee=>E(h,"color",ee)}),d.jsx("p",{className:"text-xs text-muted-foreground",children:l("statusline.module_color_description")})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ze,{children:l("statusline.module_background")}),d.jsx(a0,{value:U.background||"",onChange:ee=>E(h,"background",ee)}),d.jsx("p",{className:"text-xs text-muted-foreground",children:l("statusline.module_background_description")})]}),U.type==="script"&&d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ze,{htmlFor:"module-script-path",children:l("statusline.module_script_path")}),d.jsx(vt,{id:"module-script-path",value:U.scriptPath||"",onChange:ee=>E(h,"scriptPath",ee.target.value),placeholder:l("statusline.script_placeholder")}),d.jsx("p",{className:"text-xs text-muted-foreground",children:l("statusline.module_script_path_description")})]}),d.jsx(xe,{variant:"destructive",size:"sm",onClick:B,children:l("statusline.delete_module")})]}):d.jsx("div",{className:"flex items-center justify-center h-full min-h-[200px]",children:d.jsx("p",{className:"text-muted-foreground text-sm",children:l("statusline.select_hint")})})})]})]})]}),d.jsxs(Zr,{className:"border-t pt-4 mt-4",children:[d.jsx(xe,{variant:"outline",onClick:()=>a(!1),className:"transition-all hover:scale-105",children:l("app.cancel")}),d.jsx(xe,{onClick:A,"data-testid":"save-statusline-config",className:"transition-all hover:scale-105",children:l("app.save")})]})]})})}function sT({isOpen:n,onOpenChange:a}){const{t:l}=Ma(),{config:o,setConfig:s}=nl(),[c,f]=y.useState(!1);if(!o)return null;const m=b=>{s({...o,LOG:b})},g=b=>{s({...o,CLAUDE_PATH:b.target.value})},h=b=>{const w={enabled:b,currentStyle:o.StatusLine?.currentStyle||"default",default:o.StatusLine?.default||{modules:[]},powerline:o.StatusLine?.powerline||{modules:[]}};s({...o,StatusLine:w})},v=()=>{f(!0)};return d.jsxs(Qr,{open:n,onOpenChange:a,children:[d.jsxs(dr,{"data-testid":"settings-dialog",className:"max-h-[80vh] flex flex-col p-0",children:[d.jsx(hr,{className:"p-4 pb-0",children:d.jsx(mr,{children:l("toplevel.title")})}),d.jsxs("div",{className:"space-y-4 p-4 px-8 overflow-y-auto flex-1",children:[d.jsxs("div",{className:"flex items-center space-x-2",children:[d.jsx(th,{id:"log",checked:o.LOG,onCheckedChange:m}),d.jsx(Ze,{htmlFor:"log",className:"transition-all-ease hover:scale-[1.02] cursor-pointer",children:l("toplevel.log")})]}),d.jsx("div",{className:"space-y-2 border-t pt-4",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center space-x-2",children:[d.jsx(th,{id:"statusline",checked:o.StatusLine?.enabled||!1,onCheckedChange:h}),d.jsx(Ze,{htmlFor:"statusline",className:"transition-all-ease hover:scale-[1.02] cursor-pointer",children:l("statusline.title")})]}),d.jsx(xe,{variant:"outline",size:"sm",onClick:v,className:"transition-all-ease hover:scale-[1.02] active:scale-[0.98]","data-testid":"statusline-config-button",children:l("app.settings")})]})}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ze,{htmlFor:"log-level",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.log_level")}),d.jsx(An,{options:[{label:"fatal",value:"fatal"},{label:"error",value:"error"},{label:"warn",value:"warn"},{label:"info",value:"info"},{label:"debug",value:"debug"},{label:"trace",value:"trace"}],value:o.LOG_LEVEL,onChange:b=>s({...o,LOG_LEVEL:b})})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ze,{htmlFor:"claude-path",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.claude_path")}),d.jsx(vt,{id:"claude-path",value:o.CLAUDE_PATH,onChange:g,className:"transition-all-ease focus:scale-[1.01]"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ze,{htmlFor:"host",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.host")}),d.jsx(vt,{id:"host",value:o.HOST,onChange:b=>s({...o,HOST:b.target.value}),className:"transition-all-ease focus:scale-[1.01]"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ze,{htmlFor:"port",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.port")}),d.jsx(vt,{id:"port",type:"number",value:o.PORT,onChange:b=>s({...o,PORT:parseInt(b.target.value,10)}),className:"transition-all-ease focus:scale-[1.01]"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ze,{htmlFor:"timeout",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.timeout")}),d.jsx(vt,{id:"timeout",value:o.API_TIMEOUT_MS,onChange:b=>s({...o,API_TIMEOUT_MS:b.target.value}),className:"transition-all-ease focus:scale-[1.01]"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ze,{htmlFor:"proxy-url",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.proxy_url")}),d.jsx(vt,{id:"proxy-url",value:o.PROXY_URL,onChange:b=>s({...o,PROXY_URL:b.target.value}),placeholder:"http://127.0.0.1:7890",className:"transition-all-ease focus:scale-[1.01]"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ze,{htmlFor:"apikey",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.apikey")}),d.jsx(vt,{id:"apikey",type:"password",value:o.APIKEY,onChange:b=>s({...o,APIKEY:b.target.value}),className:"transition-all-ease focus:scale-[1.01]"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ze,{htmlFor:"custom-router-path",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.custom_router_path")}),d.jsx(vt,{id:"custom-router-path",value:o.CUSTOM_ROUTER_PATH||"",onChange:b=>s({...o,CUSTOM_ROUTER_PATH:b.target.value}),placeholder:l("toplevel.custom_router_path_placeholder"),className:"transition-all-ease focus:scale-[1.01]"})]})]}),d.jsx(Zr,{className:"p-4 pt-0",children:d.jsx(xe,{onClick:()=>a(!1),className:"transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:l("app.save")})})]}),d.jsx(iT,{isOpen:c,onOpenChange:f,"data-testid":"statusline-config-dialog"})]})}const Ra=y.forwardRef(({className:n,...a},l)=>d.jsx("div",{ref:l,className:it("rounded-lg border bg-card text-card-foreground shadow-sm",n),...a}));Ra.displayName="Card";const Oa=y.forwardRef(({className:n,...a},l)=>d.jsx("div",{ref:l,className:it("flex flex-col space-y-1.5 p-6",n),...a}));Oa.displayName="CardHeader";const Aa=y.forwardRef(({className:n,...a},l)=>d.jsx("div",{ref:l,className:it("text-2xl font-semibold leading-none tracking-tight",n),...a}));Aa.displayName="CardTitle";const Jx=y.forwardRef(({className:n,...a},l)=>d.jsx("div",{ref:l,className:it("text-sm text-muted-foreground",n),...a}));Jx.displayName="CardDescription";const Ta=y.forwardRef(({className:n,...a},l)=>d.jsx("div",{ref:l,className:it("p-6 pt-0",n),...a}));Ta.displayName="CardContent";const Wx=y.forwardRef(({className:n,...a},l)=>d.jsx("div",{ref:l,className:it("flex items-center p-6 pt-0",n),...a}));Wx.displayName="CardFooter";function cT({transformers:n,onEdit:a,onRemove:l}){return!n||!Array.isArray(n)?d.jsx("div",{className:"space-y-3",children:d.jsx("div",{className:"flex items-center justify-center rounded-md border bg-white p-8 text-gray-500",children:"No transformers configured"})}):d.jsx("div",{className:"space-y-3",children:n.map((o,s)=>{if(!o)return d.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:[d.jsxs("div",{className:"flex-1 space-y-1.5",children:[d.jsx("p",{className:"text-md font-semibold text-gray-800",children:"Invalid Transformer"}),d.jsx("p",{className:"text-sm text-gray-500",children:"Transformer data is missing"})]}),d.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[d.jsx(xe,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",disabled:!0,children:d.jsx(jc,{className:"h-4 w-4"})}),d.jsx(xe,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:d.jsx(na,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s);const c=o.path||"Unnamed Transformer",f=o.options||{},m=()=>!f||Object.keys(f).length===0?d.jsx("p",{className:"text-sm text-gray-500",children:"No parameters configured"}):d.jsx("div",{className:"flex flex-wrap gap-2 max-h-8 overflow-hidden",children:Object.entries(f).map(([g,h])=>d.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:[d.jsxs("span",{className:"text-gray-600",children:[g,":"]}),d.jsx("span",{className:"ml-1 text-gray-800",children:String(h)})]},g))});return d.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:[d.jsxs("div",{className:"flex-1 space-y-1.5",children:[d.jsx("p",{className:"text-md font-semibold text-gray-800",children:c}),m()]}),d.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[d.jsx(xe,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",children:d.jsx(jc,{className:"h-4 w-4"})}),d.jsx(xe,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:d.jsx(na,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s)})})}function uT(){const{t:n}=Ma(),{config:a,setConfig:l}=nl(),[o,s]=y.useState(null),[c,f]=y.useState(null),[m,g]=y.useState(null);if(!a)return d.jsxs(Ra,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[d.jsx(Oa,{className:"flex flex-row items-center justify-between border-b p-4",children:d.jsx(Aa,{className:"text-lg",children:n("transformers.title")})}),d.jsx(Ta,{className:"flex-grow flex items-center justify-center p-4",children:d.jsx("div",{className:"text-gray-500",children:"Loading transformers configuration..."})})]});const h=Array.isArray(a.transformers)?a.transformers:[],v=()=>{g({name:"",path:"",options:{}}),s(h.length)},b=R=>{const C=[...h];C.splice(R,1),l({...a,transformers:C}),f(null)},w=(R,C,A,T)=>{if(R<h.length){const k=[...h];T!==void 0?k[R].options[T]=A:k[R][C]=A,l({...a,transformers:k})}else if(m){const k={...m};T!==void 0?k.options[T]=A:k[C]=A,g(k)}},S=o!==null?o<h.length?h[o]:m:null,N=()=>{if(m&&o===h.length){const R=[...h,m];l({...a,transformers:R})}s(null),g(null)},E=()=>{s(null),g(null)};return d.jsxs(Ra,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[d.jsxs(Oa,{className:"flex flex-row items-center justify-between border-b p-4",children:[d.jsxs(Aa,{className:"text-lg",children:[n("transformers.title")," ",d.jsxs("span",{className:"text-sm font-normal text-gray-500",children:["(",h.length,")"]})]}),d.jsx(xe,{onClick:v,children:n("transformers.add")})]}),d.jsx(Ta,{className:"flex-grow overflow-y-auto p-4",children:d.jsx(cT,{transformers:h,onEdit:s,onRemove:f})}),d.jsx(Qr,{open:o!==null,onOpenChange:E,children:d.jsxs(dr,{children:[d.jsx(hr,{children:d.jsx(mr,{children:n("transformers.edit")})}),S&&o!==null&&d.jsxs("div",{className:"space-y-4 py-4 px-6 max-h-96 overflow-y-auto",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ze,{htmlFor:"transformer-path",children:n("transformers.path")}),d.jsx(vt,{id:"transformer-path",value:S.path||"",onChange:R=>w(o,"path",R.target.value)})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx(Ze,{children:n("transformers.parameters")}),d.jsx(xe,{variant:"outline",size:"sm",onClick:()=>{const R=S.options||{},C=`param${Object.keys(R).length+1}`;if(o!==null){const A={...R,[C]:""};if(o<h.length){const T=[...h];T[o].options=A,l({...a,transformers:T})}else m&&g({...m,options:A})}},children:d.jsx(Zd,{className:"h-4 w-4"})})]}),Object.entries(S.options||{}).map(([R,C])=>d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(vt,{value:R,onChange:A=>{const k={...S.options||{}};if(delete k[R],k[A.target.value]=C,o!==null)if(o<h.length){const D=[...h];D[o].options=k,l({...a,transformers:D})}else m&&g({...m,options:k})},className:"flex-1"}),d.jsx(vt,{value:C,onChange:A=>{o!==null&&w(o,"parameters",A.target.value,R)},className:"flex-1"}),d.jsx(xe,{variant:"outline",size:"icon",onClick:()=>{if(o!==null){const T={...S.options||{}};if(delete T[R],o<h.length){const k=[...h];k[o].options=T,l({...a,transformers:k})}else m&&g({...m,options:T})}},children:d.jsx(na,{className:"h-4 w-4"})})]},R))]})]}),d.jsxs(Zr,{children:[d.jsx(xe,{variant:"outline",onClick:E,children:n("app.cancel")}),d.jsx(xe,{onClick:N,children:n("app.save")})]})]})}),d.jsx(Qr,{open:c!==null,onOpenChange:()=>f(null),children:d.jsxs(dr,{children:[d.jsxs(hr,{children:[d.jsx(mr,{children:n("transformers.delete")}),d.jsx(qc,{children:n("transformers.delete_transformer_confirm")})]}),d.jsxs(Zr,{children:[d.jsx(xe,{variant:"outline",onClick:()=>f(null),children:n("app.cancel")}),d.jsx(xe,{variant:"destructive",onClick:()=>c!==null&&b(c),children:n("app.delete")})]})]})})]})}function fT({providers:n,onEdit:a,onRemove:l}){return!n||!Array.isArray(n)?d.jsx("div",{className:"space-y-3",children:d.jsx("div",{className:"flex items-center justify-center rounded-md border bg-white p-8 text-gray-500",children:"No providers configured"})}):d.jsx("div",{className:"space-y-3",children:n.map((o,s)=>{if(!o)return d.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:[d.jsxs("div",{className:"flex-1 space-y-1.5",children:[d.jsx("p",{className:"text-md font-semibold text-gray-800",children:"Invalid Provider"}),d.jsx("p",{className:"text-sm text-gray-500",children:"Provider data is missing"})]}),d.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[d.jsx(xe,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",disabled:!0,children:d.jsx(jc,{className:"h-4 w-4"})}),d.jsx(xe,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:d.jsx(na,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s);const c=o.name||"Unnamed Provider",f=o.api_base_url||"No API URL",m=Array.isArray(o.models)?o.models:[];return d.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:[d.jsxs("div",{className:"flex-1 space-y-1.5",children:[d.jsx("p",{className:"text-md font-semibold text-gray-800",children:c}),d.jsx("p",{className:"text-sm text-gray-500",children:f}),d.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:m.map((g,h)=>d.jsx(Vr,{variant:"outline",className:"font-normal transition-all-ease hover:scale-105",children:g||"Unnamed Model"},h))})]}),d.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[d.jsx(xe,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",children:d.jsx(jc,{className:"h-4 w-4"})}),d.jsx(xe,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:d.jsx(na,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s)})})}const dT=y.forwardRef(({options:n,value:a,onChange:l,onEnter:o,searchPlaceholder:s="Search...",emptyPlaceholder:c="No options found.",inputPlaceholder:f="Type or select..."},m)=>{const[g,h]=y.useState(!1),[v,b]=y.useState(a||""),w=y.useRef(null);y.useImperativeHandle(m,()=>w.current),y.useEffect(()=>{b(a||"")},[a]);const S=C=>{const A=C.target.value;b(A),l(A)},N=C=>{C.key==="Enter"&&v.trim()&&o&&(o(v.trim()),b(""))},E=C=>{b(C),l(C),o&&(o(C),b("")),h(!1)},R=()=>v;return y.useImperativeHandle(m,()=>({...w.current,value:v,getCurrentValue:R,clearInput:()=>{b(""),l("")}})),d.jsxs("div",{className:"relative",children:[d.jsx(vt,{ref:w,value:v,onChange:S,onKeyDown:N,placeholder:f,className:"pr-10"}),d.jsxs(Xc,{open:g,onOpenChange:h,children:[d.jsx(Qc,{asChild:!0,children:d.jsx(xe,{variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",children:d.jsx(Rb,{className:"h-4 w-4 opacity-50"})})}),d.jsx(Zc,{className:"w-[--radix-popover-trigger-width] p-0 animate-fade-in",children:d.jsxs(sx,{children:[d.jsx(cx,{placeholder:s}),d.jsxs(ux,{children:[d.jsx(fx,{children:c}),d.jsx(dx,{children:n.map(C=>d.jsxs(hx,{value:C.value,onSelect:()=>E(C.value),className:"transition-all-ease hover:bg-accent hover:text-accent-foreground",children:[d.jsx(jb,{className:it("mr-2 h-4 w-4 transition-opacity",a===C.value?"opacity-100":"opacity-0")}),C.label]},C.value))})]})]})})]})]})});function hT(){const{t:n}=Ma(),{config:a,setConfig:l}=nl(),[o,s]=y.useState(null),[c,f]=y.useState(null),[m,g]=y.useState({}),[h,v]=y.useState({}),[b,w]=y.useState({}),[S,N]=y.useState([]),[E,R]=y.useState(null),[C,A]=y.useState(!1),[T,k]=y.useState([]),[D,j]=y.useState({}),[U,B]=y.useState(null),[W,ne]=y.useState(null),[ee,ie]=y.useState(""),fe=y.useRef(null);if(y.useEffect(()=>{(async()=>{try{const ce=await fetch("https://pub-0dc3e1677e894f07bbea11b17a29e032.r2.dev/providers.json");if(ce.ok){const ge=await ce.json();k(ge||[])}else console.error("Failed to fetch provider templates")}catch(ce){console.error("Failed to fetch provider templates:",ce)}})()},[]),y.useEffect(()=>{(async()=>{try{const ce=await Ht.get("/transformers");N(ce.transformers)}catch(ce){console.error("Failed to fetch transformers:",ce)}})()},[]),!a)return d.jsxs(Ra,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[d.jsx(Oa,{className:"flex flex-row items-center justify-between border-b p-4",children:d.jsx(Aa,{className:"text-lg",children:n("providers.title")})}),d.jsx(Ta,{className:"flex-grow flex items-center justify-center p-4",children:d.jsx("div",{className:"text-gray-500",children:"Loading providers configuration..."})})]});const X=Array.isArray(a.Providers)?a.Providers:[],te=()=>{const oe={name:"",api_base_url:"",api_key:"",models:[]};s(a.Providers.length),R(oe),A(!0),j(ce=>({...ce,[a.Providers.length]:!1})),B(null),ne(null)},O=oe=>{const ce=a.Providers[oe];s(oe),R(JSON.parse(JSON.stringify(ce))),A(!1),j(ge=>({...ge,[oe]:!1})),B(null),ne(null)},I=()=>{if(!E)return;if(!E.name||E.name.trim()===""){ne(n("providers.name_required"));return}const oe=E.name.trim();if(a.Providers.some((ge,me)=>!C&&me===o?!1:ge.name.toLowerCase()===oe.toLowerCase())){ne(n("providers.name_duplicate"));return}if(!E.api_key||E.api_key.trim()===""){B(n("providers.api_key_required"));return}if(B(null),ne(null),o!==null&&E){const ge=[...a.Providers];C?ge.push(E):ge[o]=E,l({...a,Providers:ge})}o!==null&&j(ge=>{const me={...ge};return delete me[o],me}),s(null),R(null),A(!1)},q=()=>{o!==null&&(g(oe=>{const ce={...oe};return delete ce[o],ce}),j(oe=>{const ce={...oe};return delete ce[o],ce})),s(null),R(null),A(!1),B(null),ne(null)},ye=oe=>{const ce=[...a.Providers];ce.splice(oe,1),l({...a,Providers:ce}),f(null)},M=(oe,ce,ge)=>{if(E){const me={...E,[ce]:ge};R(me)}},Y=(oe,ce)=>{if(!ce||!E)return;const ge={...E};ge.transformer||(ge.transformer={use:[]}),ge.transformer.use=[...ge.transformer.use,ce],R(ge)},H=(oe,ce)=>{if(!E)return;const ge={...E};if(ge.transformer){const me=[...ge.transformer.use];me.splice(ce,1),ge.transformer.use=me,me.length===0&&Object.keys(ge.transformer).length===1&&delete ge.transformer}R(ge)},K=(oe,ce,ge)=>{if(!ge||!E)return;const me={...E};me.transformer||(me.transformer={use:[]}),me.transformer[ce]||(me.transformer[ce]={use:[]}),me.transformer[ce].use=[...me.transformer[ce].use,ge],R(me)},le=(oe,ce,ge)=>{if(!E)return;const me={...E};if(me.transformer&&me.transformer[ce]){const Te=[...me.transformer[ce].use];Te.splice(ge,1),me.transformer[ce].use=Te,Te.length===0&&Object.keys(me.transformer[ce]).length===1&&delete me.transformer[ce]}R(me)},he=(oe,ce,ge,me)=>{if(!E)return;const Te={...E};if(Te.transformer||(Te.transformer={use:[]}),Te.transformer.use&&Te.transformer.use.length>ce){const He=Te.transformer.use[ce];if(Array.isArray(He)){const Fe=[...He];if(Fe.length>1&&typeof Fe[1]=="object"&&Fe[1]!==null){const Yt={...Fe[1],[ge]:me};Fe[1]=Yt}else if(Fe.length>1){const ot={[ge]:me};Fe.splice(1,Fe.length-1,ot)}else{const ot={[ge]:me};Fe.push(ot)}Te.transformer.use[ce]=Fe}else{const Fe={[ge]:me};Te.transformer.use[ce]=[He,Fe]}}R(Te)},ve=(oe,ce,ge)=>{if(!E)return;const me={...E};if(!me.transformer?.use||me.transformer.use.length<=ce)return;const Te=me.transformer.use[ce];if(Array.isArray(Te)&&Te.length>1){const He=[...Te];if(typeof He[1]=="object"&&He[1]!==null){const Fe={...He[1]};delete Fe[ge],Object.keys(Fe).length===0?He.splice(1,1):He[1]=Fe,me.transformer.use[ce]=He,R(me)}}},be=(oe,ce,ge,me,Te)=>{if(!E)return;const He={...E};if(He.transformer||(He.transformer={use:[]}),He.transformer[ce]||(He.transformer[ce]={use:[]}),He.transformer[ce].use&&He.transformer[ce].use.length>ge){const Fe=He.transformer[ce].use[ge];if(Array.isArray(Fe)){const ot=[...Fe];if(ot.length>1&&typeof ot[1]=="object"&&ot[1]!==null){const $n={...ot[1],[me]:Te};ot[1]=$n}else if(ot.length>1){const Yt={[me]:Te};ot.splice(1,ot.length-1,Yt)}else{const Yt={[me]:Te};ot.push(Yt)}He.transformer[ce].use[ge]=ot}else{const ot={[me]:Te};He.transformer[ce].use[ge]=[Fe,ot]}}R(He)},ze=(oe,ce,ge,me)=>{if(!E)return;const Te={...E};if(!Te.transformer?.[ce]?.use||Te.transformer[ce].use.length<=ge)return;const He=Te.transformer[ce].use[ge];if(Array.isArray(He)&&He.length>1){const Fe=[...He];if(typeof Fe[1]=="object"&&Fe[1]!==null){const ot={...Fe[1]};delete ot[me],Object.keys(ot).length===0?Fe.splice(1,1):Fe[1]=ot,Te.transformer[ce].use[ge]=Fe,R(Te)}}},ae=(oe,ce)=>{if(!ce.trim()||!E)return;const ge={...E},me=Array.isArray(ge.models)?[...ge.models]:[];me.includes(ce.trim())||(me.push(ce.trim()),ge.models=me,R(ge))},we=oe=>{if(oe)try{const ce=JSON.parse(oe);if(ce){const ge=E?.name,me=JSON.parse(JSON.stringify(ce));!C&&ge&&(me.name=ge),R(me)}}catch(ce){console.error("Failed to parse template",ce)}},Pe=(oe,ce)=>{if(!E)return;const ge={...E},me=Array.isArray(ge.models)?[...ge.models]:[];ce>=0&&ce<me.length&&(me.splice(ce,1),ge.models=me,R(ge))},De=E||(o!==null?X[o]:null),qe=X.filter(oe=>{if(!ee)return!0;const ce=ee.toLowerCase();return oe.name&&oe.name.toLowerCase().includes(ce)||oe.api_base_url&&oe.api_base_url.toLowerCase().includes(ce)?!0:oe.models&&Array.isArray(oe.models)?oe.models.some(ge=>ge&&ge.toLowerCase().includes(ce)):!1});return d.jsxs(Ra,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[d.jsxs(Oa,{className:"flex flex-col border-b p-4 gap-3",children:[d.jsxs("div",{className:"flex flex-row items-center justify-between",children:[d.jsxs(Aa,{className:"text-lg",children:[n("providers.title")," ",d.jsxs("span",{className:"text-sm font-normal text-gray-500",children:["(",qe.length,"/",X.length,")"]})]}),d.jsx(xe,{onClick:te,children:n("providers.add")})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs("div",{className:"relative flex-1",children:[d.jsx(Tb,{className:"absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-500"}),d.jsx(vt,{placeholder:n("providers.search"),value:ee,onChange:oe=>ie(oe.target.value),className:"pl-8"})]}),ee&&d.jsx(xe,{variant:"ghost",size:"icon",onClick:()=>ie(""),children:d.jsx(Ob,{className:"h-4 w-4"})})]})]}),d.jsx(Ta,{className:"flex-grow overflow-y-auto p-4",children:d.jsx(fT,{providers:qe,onEdit:O,onRemove:f})}),d.jsx(Qr,{open:o!==null,onOpenChange:oe=>{oe||q()},children:d.jsxs(dr,{className:"max-h-[80vh] flex flex-col sm:max-w-2xl",children:[d.jsx(hr,{children:d.jsx(mr,{children:n("providers.edit")})}),De&&o!==null&&d.jsxs("div",{className:"space-y-4 p-4 overflow-y-auto flex-grow",children:[T.length>0&&d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ze,{children:n("providers.import_from_template")}),d.jsx(An,{options:T.map(oe=>({label:oe.name,value:JSON.stringify(oe)})),value:"",onChange:we,placeholder:n("providers.select_template"),emptyPlaceholder:n("providers.no_templates_found")})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ze,{htmlFor:"name",children:n("providers.name")}),d.jsx(vt,{id:"name",value:De.name||"",onChange:oe=>{M(o,"name",oe.target.value),W&&ne(null)},className:W?"border-red-500":""}),W&&d.jsx("p",{className:"text-sm text-red-500",children:W})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ze,{htmlFor:"api_base_url",children:n("providers.api_base_url")}),d.jsx(vt,{id:"api_base_url",value:De.api_base_url||"",onChange:oe=>M(o,"api_base_url",oe.target.value)})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ze,{htmlFor:"api_key",children:n("providers.api_key")}),d.jsxs("div",{className:"relative",children:[d.jsx(vt,{id:"api_key",type:D[o||0]?"text":"password",value:De.api_key||"",onChange:oe=>M(o,"api_key",oe.target.value),className:U?"border-red-500":""}),d.jsx(xe,{type:"button",variant:"ghost",size:"icon",className:"absolute right-2 top-1/2 transform -translate-y-1/2 h-8 w-8",onClick:()=>{const oe=o||0;j(ce=>({...ce,[oe]:!ce[oe]}))},children:D[o||0]?d.jsx(dj,{className:"h-4 w-4"}):d.jsx(mj,{className:"h-4 w-4"})})]}),U&&d.jsx("p",{className:"text-sm text-red-500",children:U})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ze,{htmlFor:"models",children:n("providers.models")}),d.jsxs("div",{className:"space-y-2",children:[d.jsxs("div",{className:"flex gap-2",children:[d.jsx("div",{className:"flex-1",children:m[o]?d.jsx(dT,{ref:fe,options:(De.models||[]).map(oe=>({label:oe,value:oe})),value:"",onChange:()=>{},onEnter:oe=>{o!==null&&ae(o,oe)},inputPlaceholder:n("providers.models_placeholder")}):d.jsx(vt,{id:"models",placeholder:n("providers.models_placeholder"),onKeyDown:oe=>{oe.key==="Enter"&&oe.currentTarget.value.trim()&&o!==null&&(ae(o,oe.currentTarget.value),oe.currentTarget.value="")}})}),d.jsx(xe,{onClick:()=>{if(m[o]&&fe.current){const oe=fe.current,ce=oe.getCurrentValue();ce&&ce.trim()&&o!==null&&(ae(o,ce.trim()),oe.clearInput())}else{const oe=document.getElementById("models");oe&&oe.value.trim()&&o!==null&&(ae(o,oe.value),oe.value="")}},children:n("providers.add_model")})]}),d.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:(De.models||[]).map((oe,ce)=>d.jsxs(Vr,{variant:"outline",className:"font-normal flex items-center gap-1",children:[oe,d.jsx("button",{type:"button",className:"ml-1 rounded-full hover:bg-gray-200",onClick:()=>o!==null&&Pe(o,ce),children:d.jsx(cr,{className:"h-3 w-3"})})]},ce))})]})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ze,{children:n("providers.provider_transformer")}),d.jsx("div",{className:"flex gap-2",children:d.jsx(An,{options:S.map(oe=>({label:oe.name,value:oe.name})),value:"",onChange:oe=>{o!==null&&Y(o,oe)},placeholder:n("providers.select_transformer"),emptyPlaceholder:n("providers.no_transformers")})}),De.transformer?.use&&De.transformer.use.length>0&&d.jsxs("div",{className:"space-y-2 mt-2",children:[d.jsx("div",{className:"text-sm font-medium text-gray-700",children:n("providers.selected_transformers")}),De.transformer.use.map((oe,ce)=>d.jsxs("div",{className:"border rounded-md p-3",children:[d.jsxs("div",{className:"flex gap-2 items-center mb-2",children:[d.jsx("div",{className:"flex-1 bg-gray-50 rounded p-2 text-sm",children:typeof oe=="string"?oe:Array.isArray(oe)?String(oe[0]):String(oe)}),d.jsx(xe,{variant:"outline",size:"icon",onClick:()=>{o!==null&&H(o,ce)},children:d.jsx(na,{className:"h-4 w-4"})})]}),d.jsxs("div",{className:"mt-2 pl-4 border-l-2 border-gray-200",children:[d.jsx(Ze,{className:"text-sm",children:n("providers.transformer_parameters")}),d.jsxs("div",{className:"space-y-2 mt-1",children:[d.jsxs("div",{className:"flex gap-2",children:[d.jsx(vt,{placeholder:n("providers.parameter_name"),value:h[`provider-${o}-transformer-${ce}`]?.name||"",onChange:ge=>{const me=`provider-${o}-transformer-${ce}`;v(Te=>({...Te,[me]:{...Te[me]||{name:"",value:""},name:ge.target.value}}))}}),d.jsx(vt,{placeholder:n("providers.parameter_value"),value:h[`provider-${o}-transformer-${ce}`]?.value||"",onChange:ge=>{const me=`provider-${o}-transformer-${ce}`;v(Te=>({...Te,[me]:{...Te[me]||{name:"",value:""},value:ge.target.value}}))}}),d.jsx(xe,{size:"sm",onClick:()=>{if(o!==null){const ge=`provider-${o}-transformer-${ce}`,me=h[ge];me&&me.name&&me.value&&(he(o,ce,me.name,me.value),v(Te=>({...Te,[ge]:{name:"",value:""}})))}},children:d.jsx(Zd,{className:"h-4 w-4"})})]}),(()=>{if(!De.transformer?.use||De.transformer.use.length<=ce)return null;const ge=De.transformer.use[ce];let me={};return Array.isArray(ge)&&ge.length>1&&typeof ge[1]=="object"&&ge[1]!==null&&(me=ge[1]),Object.keys(me).length>0?d.jsx("div",{className:"space-y-1",children:Object.entries(me).map(([Te,He])=>d.jsxs("div",{className:"flex items-center justify-between bg-gray-50 rounded p-2",children:[d.jsxs("div",{className:"text-sm",children:[d.jsxs("span",{className:"font-medium",children:[Te,":"]})," ",String(He)]}),d.jsx(xe,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>{o!==null&&ve(o,ce,Te)},children:d.jsx(cr,{className:"h-3 w-3"})})]},Te))}):null})()]})]})]},ce))]})]}),De.models&&De.models.length>0&&d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ze,{children:n("providers.model_transformers")}),d.jsx("div",{className:"space-y-3",children:(De.models||[]).map((oe,ce)=>d.jsxs("div",{className:"border rounded-md p-3",children:[d.jsx("div",{className:"font-medium text-sm mb-2",children:oe}),d.jsx("div",{className:"flex gap-2",children:d.jsx("div",{className:"flex-1 flex gap-2",children:d.jsx(An,{options:S.map(ge=>({label:ge.name,value:ge.name})),value:"",onChange:ge=>{o!==null&&K(o,oe,ge)},placeholder:n("providers.select_transformer"),emptyPlaceholder:n("providers.no_transformers")})})}),De.transformer?.[oe]?.use&&De.transformer[oe].use.length>0&&d.jsxs("div",{className:"space-y-2 mt-2",children:[d.jsx("div",{className:"text-sm font-medium text-gray-700",children:n("providers.selected_transformers")}),De.transformer[oe].use.map((ge,me)=>d.jsxs("div",{className:"border rounded-md p-3",children:[d.jsxs("div",{className:"flex gap-2 items-center mb-2",children:[d.jsx("div",{className:"flex-1 bg-gray-50 rounded p-2 text-sm",children:typeof ge=="string"?ge:Array.isArray(ge)?String(ge[0]):String(ge)}),d.jsx(xe,{variant:"outline",size:"icon",onClick:()=>{o!==null&&le(o,oe,me)},children:d.jsx(na,{className:"h-4 w-4"})})]}),d.jsxs("div",{className:"mt-2 pl-4 border-l-2 border-gray-200",children:[d.jsx(Ze,{className:"text-sm",children:n("providers.transformer_parameters")}),d.jsxs("div",{className:"space-y-2 mt-1",children:[d.jsxs("div",{className:"flex gap-2",children:[d.jsx(vt,{placeholder:n("providers.parameter_name"),value:b[`model-${o}-${oe}-transformer-${me}`]?.name||"",onChange:Te=>{const He=`model-${o}-${oe}-transformer-${me}`;w(Fe=>({...Fe,[He]:{...Fe[He]||{name:"",value:""},name:Te.target.value}}))}}),d.jsx(vt,{placeholder:n("providers.parameter_value"),value:b[`model-${o}-${oe}-transformer-${me}`]?.value||"",onChange:Te=>{const He=`model-${o}-${oe}-transformer-${me}`;w(Fe=>({...Fe,[He]:{...Fe[He]||{name:"",value:""},value:Te.target.value}}))}}),d.jsx(xe,{size:"sm",onClick:()=>{if(o!==null){const Te=`model-${o}-${oe}-transformer-${me}`,He=b[Te];He&&He.name&&He.value&&(be(o,oe,me,He.name,He.value),w(Fe=>({...Fe,[Te]:{name:"",value:""}})))}},children:d.jsx(Zd,{className:"h-4 w-4"})})]}),(()=>{if(!De.transformer?.[oe]?.use||De.transformer[oe].use.length<=me)return null;const Te=De.transformer[oe].use[me];let He={};return Array.isArray(Te)&&Te.length>1&&typeof Te[1]=="object"&&Te[1]!==null&&(He=Te[1]),Object.keys(He).length>0?d.jsx("div",{className:"space-y-1",children:Object.entries(He).map(([Fe,ot])=>d.jsxs("div",{className:"flex items-center justify-between bg-gray-50 rounded p-2",children:[d.jsxs("div",{className:"text-sm",children:[d.jsxs("span",{className:"font-medium",children:[Fe,":"]})," ",String(ot)]}),d.jsx(xe,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>{o!==null&&ze(o,oe,me,Fe)},children:d.jsx(cr,{className:"h-3 w-3"})})]},Fe))}):null})()]})]})]},me))]})]},ce))})]})]}),d.jsx("div",{className:"space-y-3 mt-auto",children:d.jsx("div",{className:"flex justify-end gap-2",children:d.jsx(xe,{onClick:I,children:n("app.save")})})})]})}),d.jsx(Qr,{open:c!==null,onOpenChange:()=>f(null),children:d.jsxs(dr,{children:[d.jsxs(hr,{children:[d.jsx(mr,{children:n("providers.delete")}),d.jsx(qc,{children:n("providers.delete_provider_confirm")})]}),d.jsxs(Zr,{children:[d.jsx(xe,{variant:"outline",onClick:()=>f(null),children:n("providers.cancel")}),d.jsx(xe,{variant:"destructive",onClick:()=>c!==null&&ye(c),children:n("providers.delete")})]})]})})]})}function mT(){const{t:n}=Ma(),{config:a,setConfig:l}=nl();if(!a)return d.jsxs(Ra,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[d.jsx(Oa,{className:"border-b p-4",children:d.jsx(Aa,{className:"text-lg",children:n("router.title")})}),d.jsx(Ta,{className:"flex-grow flex items-center justify-center p-4",children:d.jsx("div",{className:"text-gray-500",children:"Loading router configuration..."})})]});const o=a.Router||{default:"",background:"",think:"",longContext:"",longContextThreshold:6e4,webSearch:"",image:""},s=(g,h)=>{const b={...a.Router||{},[g]:h};l({...a,Router:b})},c=g=>{l({...a,forceUseImageAgent:g})},m=(Array.isArray(a.Providers)?a.Providers:[]).flatMap(g=>{if(!g)return[];const h=Array.isArray(g.models)?g.models:[],v=g.name||"Unknown Provider";return h.map(b=>({value:`${v},${b||"Unknown Model"}`,label:`${v}, ${b||"Unknown Model"}`}))});return d.jsxs(Ra,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[d.jsx(Oa,{className:"border-b p-4",children:d.jsx(Aa,{className:"text-lg",children:n("router.title")})}),d.jsxs(Ta,{className:"flex-grow space-y-5 overflow-y-auto p-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ze,{children:n("router.default")}),d.jsx(An,{options:m,value:o.default||"",onChange:g=>s("default",g),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ze,{children:n("router.background")}),d.jsx(An,{options:m,value:o.background||"",onChange:g=>s("background",g),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ze,{children:n("router.think")}),d.jsx(An,{options:m,value:o.think||"",onChange:g=>s("think",g),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),d.jsx("div",{className:"space-y-2",children:d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsxs("div",{className:"flex-1",children:[d.jsx(Ze,{children:n("router.longContext")}),d.jsx(An,{options:m,value:o.longContext||"",onChange:g=>s("longContext",g),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),d.jsxs("div",{className:"w-48",children:[d.jsx(Ze,{children:n("router.longContextThreshold")}),d.jsx(vt,{type:"number",value:o.longContextThreshold||6e4,onChange:g=>s("longContextThreshold",parseInt(g.target.value)||6e4),placeholder:"60000"})]})]})}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ze,{children:n("router.webSearch")}),d.jsx(An,{options:m,value:o.webSearch||"",onChange:g=>s("webSearch",g),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),d.jsx("div",{className:"space-y-2",children:d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsxs("div",{className:"flex-1",children:[d.jsxs(Ze,{children:[n("router.image")," (beta)"]}),d.jsx(An,{options:m,value:o.image||"",onChange:g=>s("image",g),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),d.jsxs("div",{className:"w-48",children:[d.jsx(Ze,{htmlFor:"forceUseImageAgent",children:n("router.forceUseImageAgent")}),d.jsxs("select",{id:"forceUseImageAgent",value:a.forceUseImageAgent?"true":"false",onChange:g=>c(g.target.value==="true"),className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium 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",children:[d.jsx("option",{value:"false",children:n("common.no")}),d.jsx("option",{value:"true",children:n("common.yes")})]})]})]})})]})]})}function pT(n,a,l){return a in n?Object.defineProperty(n,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):n[a]=l,n}function r0(n,a){var l=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);a&&(o=o.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),l.push.apply(l,o)}return l}function l0(n){for(var a=1;a<arguments.length;a++){var l=arguments[a]!=null?arguments[a]:{};a%2?r0(Object(l),!0).forEach(function(o){pT(n,o,l[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(l)):r0(Object(l)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(l,o))})}return n}function gT(n,a){if(n==null)return{};var l={},o=Object.keys(n),s,c;for(c=0;c<o.length;c++)s=o[c],!(a.indexOf(s)>=0)&&(l[s]=n[s]);return l}function vT(n,a){if(n==null)return{};var l=gT(n,a),o,s;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(n);for(s=0;s<c.length;s++)o=c[s],!(a.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(n,o)&&(l[o]=n[o])}return l}function yT(n,a){return bT(n)||xT(n,a)||wT(n,a)||ST()}function bT(n){if(Array.isArray(n))return n}function xT(n,a){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(n)))){var l=[],o=!0,s=!1,c=void 0;try{for(var f=n[Symbol.iterator](),m;!(o=(m=f.next()).done)&&(l.push(m.value),!(a&&l.length===a));o=!0);}catch(g){s=!0,c=g}finally{try{!o&&f.return!=null&&f.return()}finally{if(s)throw c}}return l}}function wT(n,a){if(n){if(typeof n=="string")return o0(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 o0(n,a)}}function o0(n,a){(a==null||a>n.length)&&(a=n.length);for(var l=0,o=new Array(a);l<a;l++)o[l]=n[l];return o}function ST(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
342
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _T(n,a,l){return a in n?Object.defineProperty(n,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):n[a]=l,n}function i0(n,a){var l=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);a&&(o=o.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),l.push.apply(l,o)}return l}function s0(n){for(var a=1;a<arguments.length;a++){var l=arguments[a]!=null?arguments[a]:{};a%2?i0(Object(l),!0).forEach(function(o){_T(n,o,l[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(l)):i0(Object(l)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(l,o))})}return n}function ET(){for(var n=arguments.length,a=new Array(n),l=0;l<n;l++)a[l]=arguments[l];return function(o){return a.reduceRight(function(s,c){return c(s)},o)}}function pi(n){return function a(){for(var l=this,o=arguments.length,s=new Array(o),c=0;c<o;c++)s[c]=arguments[c];return s.length>=n.length?n.apply(this,s):function(){for(var f=arguments.length,m=new Array(f),g=0;g<f;g++)m[g]=arguments[g];return a.apply(l,[].concat(s,m))}}}function Mc(n){return{}.toString.call(n).includes("Object")}function NT(n){return!Object.keys(n).length}function Ri(n){return typeof n=="function"}function CT(n,a){return Object.prototype.hasOwnProperty.call(n,a)}function jT(n,a){return Mc(a)||ur("changeType"),Object.keys(a).some(function(l){return!CT(n,l)})&&ur("changeField"),a}function RT(n){Ri(n)||ur("selectorType")}function OT(n){Ri(n)||Mc(n)||ur("handlerType"),Mc(n)&&Object.values(n).some(function(a){return!Ri(a)})&&ur("handlersType")}function AT(n){n||ur("initialIsRequired"),Mc(n)||ur("initialType"),NT(n)&&ur("initialContent")}function TT(n,a){throw new Error(n[a]||n.default)}var MT={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"},ur=pi(TT)(MT),uc={changes:jT,selector:RT,handler:OT,initial:AT};function DT(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};uc.initial(n),uc.handler(a);var l={current:n},o=pi(zT)(l,a),s=pi(kT)(l),c=pi(uc.changes)(n),f=pi(LT)(l);function m(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(v){return v};return uc.selector(h),h(l.current)}function g(h){ET(o,s,c,f)(h)}return[m,g]}function LT(n,a){return Ri(a)?a(n.current):a}function kT(n,a){return n.current=s0(s0({},n.current),a),a}function zT(n,a,l){return Ri(a)?a(n.current):Object.keys(l).forEach(function(o){var s;return(s=a[o])===null||s===void 0?void 0:s.call(a,n.current[o])}),l}var UT={create:DT},PT={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}};function HT(n){return function a(){for(var l=this,o=arguments.length,s=new Array(o),c=0;c<o;c++)s[c]=arguments[c];return s.length>=n.length?n.apply(this,s):function(){for(var f=arguments.length,m=new Array(f),g=0;g<f;g++)m[g]=arguments[g];return a.apply(l,[].concat(s,m))}}}function BT(n){return{}.toString.call(n).includes("Object")}function $T(n){return n||c0("configIsRequired"),BT(n)||c0("configType"),n.urls?(qT(),{paths:{vs:n.urls.monacoBase}}):n}function qT(){console.warn(e1.deprecation)}function FT(n,a){throw new Error(n[a]||n.default)}var e1={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!
313
343
  You are using deprecated way of configuration.
314
344
 
315
345
  Instead of using
@@ -318,7 +348,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
318
348
  monaco.config({ paths: { vs: '...' } })
319
349
 
320
350
  For more please check the link https://github.com/suren-atoyan/monaco-loader#config
321
- `},Qy=KA(ZA)(Ux),JA={config:QA},WA=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(c,f){return f(c)},s)}};function Px(n,a){return Object.keys(a).forEach(function(l){a[l]instanceof Object&&n[l]&&Object.assign(a[l],Px(n[l],a[l]))}),Yy(Yy({},n),a)}var eT={type:"cancelation",msg:"operation is manually canceled"};function Cd(n){var a=!1,l=new Promise(function(i,s){n.then(function(c){return a?s(eT):i(c)}),n.catch(s)});return l.cancel=function(){return a=!0},l}var tT=YA.create({config:GA,isInitialized:!1,resolve:null,reject:null,monaco:null}),Hx=NA(tT,2),jo=Hx[0],Yc=Hx[1];function nT(n){var a=JA.config(n),l=a.monaco,i=CA(a,["monaco"]);Yc(function(s){return{config:Px(s.config,i),monaco:l}})}function aT(){var n=jo(function(a){var l=a.monaco,i=a.isInitialized,s=a.resolve;return{monaco:l,isInitialized:i,resolve:s}});if(!n.isInitialized){if(Yc({isInitialized:!0}),n.monaco)return n.resolve(n.monaco),Cd(Nd);if(window.monaco&&window.monaco.editor)return Bx(window.monaco),n.resolve(window.monaco),Cd(Nd);WA(rT,iT)(oT)}return Cd(Nd)}function rT(n){return document.body.appendChild(n)}function lT(n){var a=document.createElement("script");return n&&(a.src=n),a}function iT(n){var a=jo(function(i){var s=i.config,c=i.reject;return{config:s,reject:c}}),l=lT("".concat(a.config.paths.vs,"/loader.js"));return l.onload=function(){return n()},l.onerror=a.reject,l}function oT(){var n=jo(function(l){var i=l.config,s=l.resolve,c=l.reject;return{config:i,resolve:s,reject:c}}),a=window.require;a.config(n.config),a(["vs/editor/editor.main"],function(l){Bx(l),n.resolve(l)},function(l){n.reject(l)})}function Bx(n){jo().monaco||Yc({monaco:n})}function sT(){return jo(function(n){var a=n.monaco;return a})}var Nd=new Promise(function(n,a){return Yc({resolve:n,reject:a})}),$x={config:nT,init:aT,__getMonacoInstance:sT},cT={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},Rd=cT,uT={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},fT=uT;function dT({children:n}){return mt.createElement("div",{style:fT.container},n)}var hT=dT,mT=hT;function pT({width:n,height:a,isEditorReady:l,loading:i,_ref:s,className:c,wrapperProps:f}){return mt.createElement("section",{style:{...Rd.wrapper,width:n,height:a},...f},!l&&mt.createElement(mT,null,i),mt.createElement("div",{ref:s,style:{...Rd.fullWidth,...!l&&Rd.hide},className:c}))}var gT=pT,Vx=y.memo(gT);function vT(n){y.useEffect(n,[])}var qx=vT;function yT(n,a,l=!0){let i=y.useRef(!0);y.useEffect(i.current||!l?()=>{i.current=!1}:n,a)}var mn=yT;function mo(){}function Gl(n,a,l,i){return bT(n,i)||xT(n,a,l,i)}function bT(n,a){return n.editor.getModel(Fx(n,a))}function xT(n,a,l,i){return n.editor.createModel(a,l,i?Fx(n,i):void 0)}function Fx(n,a){return n.Uri.parse(a)}function wT({original:n,modified:a,language:l,originalLanguage:i,modifiedLanguage:s,originalModelPath:c,modifiedModelPath:f,keepCurrentOriginalModel:h=!1,keepCurrentModifiedModel:p=!1,theme:m="light",loading:v="Loading...",options:b={},height:w="100%",width:S="100%",className:C,wrapperProps:E={},beforeMount:j=mo,onMount:R=mo}){let[L,k]=y.useState(!1),[H,M]=y.useState(!0),N=y.useRef(null),B=y.useRef(null),J=y.useRef(null),te=y.useRef(R),ae=y.useRef(j),re=y.useRef(!1);qx(()=>{let ee=$x.init();return ee.then(A=>(B.current=A)&&M(!1)).catch(A=>A?.type!=="cancelation"&&console.error("Monaco initialization: error:",A)),()=>N.current?Q():ee.cancel()}),mn(()=>{if(N.current&&B.current){let ee=N.current.getOriginalEditor(),A=Gl(B.current,n||"",i||l||"text",c||"");A!==ee.getModel()&&ee.setModel(A)}},[c],L),mn(()=>{if(N.current&&B.current){let ee=N.current.getModifiedEditor(),A=Gl(B.current,a||"",s||l||"text",f||"");A!==ee.getModel()&&ee.setModel(A)}},[f],L),mn(()=>{let ee=N.current.getModifiedEditor();ee.getOption(B.current.editor.EditorOption.readOnly)?ee.setValue(a||""):a!==ee.getValue()&&(ee.executeEdits("",[{range:ee.getModel().getFullModelRange(),text:a||"",forceMoveMarkers:!0}]),ee.pushUndoStop())},[a],L),mn(()=>{N.current?.getModel()?.original.setValue(n||"")},[n],L),mn(()=>{let{original:ee,modified:A}=N.current.getModel();B.current.editor.setModelLanguage(ee,i||l||"text"),B.current.editor.setModelLanguage(A,s||l||"text")},[l,i,s],L),mn(()=>{B.current?.editor.setTheme(m)},[m],L),mn(()=>{N.current?.updateOptions(b)},[b],L);let fe=y.useCallback(()=>{if(!B.current)return;ae.current(B.current);let ee=Gl(B.current,n||"",i||l||"text",c||""),A=Gl(B.current,a||"",s||l||"text",f||"");N.current?.setModel({original:ee,modified:A})},[l,a,s,n,i,c,f]),de=y.useCallback(()=>{!re.current&&J.current&&(N.current=B.current.editor.createDiffEditor(J.current,{automaticLayout:!0,...b}),fe(),B.current?.editor.setTheme(m),k(!0),re.current=!0)},[b,m,fe]);y.useEffect(()=>{L&&te.current(N.current,B.current)},[L]),y.useEffect(()=>{!H&&!L&&de()},[H,L,de]);function Q(){let ee=N.current?.getModel();h||ee?.original?.dispose(),p||ee?.modified?.dispose(),N.current?.dispose()}return mt.createElement(Vx,{width:S,height:w,isEditorReady:L,loading:v,_ref:J,className:C,wrapperProps:E})}var ST=wT;y.memo(ST);function _T(n){let a=y.useRef();return y.useEffect(()=>{a.current=n},[n]),a.current}var ET=_T,ac=new Map;function CT({defaultValue:n,defaultLanguage:a,defaultPath:l,value:i,language:s,path:c,theme:f="light",line:h,loading:p="Loading...",options:m={},overrideServices:v={},saveViewState:b=!0,keepCurrentModel:w=!1,width:S="100%",height:C="100%",className:E,wrapperProps:j={},beforeMount:R=mo,onMount:L=mo,onChange:k,onValidate:H=mo}){let[M,N]=y.useState(!1),[B,J]=y.useState(!0),te=y.useRef(null),ae=y.useRef(null),re=y.useRef(null),fe=y.useRef(L),de=y.useRef(R),Q=y.useRef(),ee=y.useRef(i),A=ET(c),X=y.useRef(!1),V=y.useRef(!1);qx(()=>{let G=$x.init();return G.then(U=>(te.current=U)&&J(!1)).catch(U=>U?.type!=="cancelation"&&console.error("Monaco initialization: error:",U)),()=>ae.current?O():G.cancel()}),mn(()=>{let G=Gl(te.current,n||i||"",a||s||"",c||l||"");G!==ae.current?.getModel()&&(b&&ac.set(A,ae.current?.saveViewState()),ae.current?.setModel(G),b&&ae.current?.restoreViewState(ac.get(c)))},[c],M),mn(()=>{ae.current?.updateOptions(m)},[m],M),mn(()=>{!ae.current||i===void 0||(ae.current.getOption(te.current.editor.EditorOption.readOnly)?ae.current.setValue(i):i!==ae.current.getValue()&&(V.current=!0,ae.current.executeEdits("",[{range:ae.current.getModel().getFullModelRange(),text:i,forceMoveMarkers:!0}]),ae.current.pushUndoStop(),V.current=!1))},[i],M),mn(()=>{let G=ae.current?.getModel();G&&s&&te.current?.editor.setModelLanguage(G,s)},[s],M),mn(()=>{h!==void 0&&ae.current?.revealLine(h)},[h],M),mn(()=>{te.current?.editor.setTheme(f)},[f],M);let ye=y.useCallback(()=>{if(!(!re.current||!te.current)&&!X.current){de.current(te.current);let G=c||l,U=Gl(te.current,i||n||"",a||s||"",G||"");ae.current=te.current?.editor.create(re.current,{model:U,automaticLayout:!0,...m},v),b&&ae.current.restoreViewState(ac.get(G)),te.current.editor.setTheme(f),h!==void 0&&ae.current.revealLine(h),N(!0),X.current=!0}},[n,a,l,i,s,c,m,v,b,f,h]);y.useEffect(()=>{M&&fe.current(ae.current,te.current)},[M]),y.useEffect(()=>{!B&&!M&&ye()},[B,M,ye]),ee.current=i,y.useEffect(()=>{M&&k&&(Q.current?.dispose(),Q.current=ae.current?.onDidChangeModelContent(G=>{V.current||k(ae.current.getValue(),G)}))},[M,k]),y.useEffect(()=>{if(M){let G=te.current.editor.onDidChangeMarkers(U=>{let K=ae.current.getModel()?.uri;if(K&&U.find(P=>P.path===K.path)){let P=te.current.editor.getModelMarkers({resource:K});H?.(P)}});return()=>{G?.dispose()}}return()=>{}},[M,H]);function O(){Q.current?.dispose(),w?b&&ac.set(c,ae.current.saveViewState()):ae.current.getModel()?.dispose(),ae.current.dispose()}return mt.createElement(Vx,{width:S,height:C,isEditorReady:M,loading:p,_ref:re,className:E,wrapperProps:j})}var NT=CT,RT=y.memo(NT),Yx=RT;function jT({open:n,onOpenChange:a,showToast:l}){const{t:i}=Oa(),{config:s}=Wr(),[c,f]=y.useState(""),[h,p]=y.useState(!1),[m,v]=y.useState(!1),[b,w]=y.useState(!1),S=y.useRef(null);y.useEffect(()=>{s&&n&&f(JSON.stringify(s,null,2))},[s,n]),y.useEffect(()=>{if(n)v(!0),requestAnimationFrame(()=>{w(!0)});else{w(!1);const R=setTimeout(()=>{v(!1)},300);return()=>clearTimeout(R)}},[n]);const C=(R,L,k)=>{if(R&&typeof R=="object"&&"success"in R){const H=R;return H.success?(l&&l(H.message||L,"success"),!0):(l&&l(H.message||k,"error"),!1)}else return l&&l(L,"success"),!0},E=async()=>{if(c)try{p(!0);const R=JSON.parse(c),L=await Pt.updateConfig(R);C(L,i("app.config_saved_success"),i("app.config_saved_failed"))&&a(!1)}catch(R){console.error("Failed to save config:",R),l&&l(i("app.config_saved_failed")+": "+R.message,"error")}finally{p(!1)}},j=async()=>{if(c)try{p(!0);const R=JSON.parse(c),L=await Pt.updateConfig(R);if(C(L,i("app.config_saved_success"),i("app.config_saved_failed"))){const H=await Pt.restartService();C(H,i("app.config_saved_restart_success"),i("app.config_saved_restart_failed")),a(!1)}}catch(R){console.error("Failed to save config and restart:",R),l&&l(i("app.config_saved_restart_failed")+": "+R.message,"error")}finally{p(!1)}};return!m&&!n?null:g.jsxs(g.Fragment,{children:[(m||n)&&g.jsx("div",{className:`fixed inset-0 z-50 transition-all duration-300 ease-out ${b&&n?"bg-black/50 opacity-100":"bg-black/0 opacity-0 pointer-events-none"}`,onClick:()=>a(!1)}),g.jsxs("div",{ref:S,className:`fixed bottom-0 left-0 right-0 z-50 flex flex-col bg-white shadow-2xl transition-all duration-300 ease-out transform ${b&&n?"translate-y-0":"translate-y-full"}`,style:{height:"100vh",maxHeight:"100vh"},children:[g.jsxs("div",{className:"flex items-center justify-between border-b p-4",children:[g.jsx("h2",{className:"text-lg font-semibold",children:i("json_editor.title")}),g.jsxs("div",{className:"flex gap-2",children:[g.jsxs(Ce,{variant:"outline",size:"sm",onClick:()=>a(!1),disabled:h,children:[g.jsx(Yr,{className:"h-4 w-4 mr-2"}),i("json_editor.cancel")]}),g.jsxs(Ce,{variant:"outline",size:"sm",onClick:E,disabled:h,children:[g.jsx(hb,{className:"h-4 w-4 mr-2"}),i(h?"json_editor.saving":"json_editor.save")]}),g.jsxs(Ce,{variant:"default",size:"sm",onClick:j,disabled:h,children:[g.jsx(bh,{className:"h-4 w-4 mr-2"}),i(h?"json_editor.saving":"json_editor.save_and_restart")]})]})]}),g.jsx("div",{className:"flex-1 min-h-0 bg-gray-50",children:g.jsx(Yx,{height:"100%",defaultLanguage:"json",value:c,onChange:R=>f(R||""),theme:"vs",options:{minimap:{enabled:!0},fontSize:14,scrollBeyondLastLine:!1,automaticLayout:!0,wordWrap:"on",formatOnPaste:!0,formatOnType:!0,suggest:{showKeywords:!0,showSnippets:!0}}})})]})]})}function OT({open:n,onOpenChange:a,showToast:l}){const{t:i}=Oa(),[s,c]=y.useState([]),[f,h]=y.useState([]),[p,m]=y.useState(null),[v,b]=y.useState(!1),[w,S]=y.useState(!1),[C,E]=y.useState(!1),[j,R]=y.useState(!1),[L,k]=y.useState(!1),[H,M]=y.useState(null),[N,B]=y.useState(null),J=y.useRef(null),te=y.useRef(null),ae=y.useRef(null);y.useEffect(()=>{n&&fe()},[n]);const re=()=>{const P=`
351
+ `},c0=HT(FT)(e1),VT={config:$T},GT=function(){for(var a=arguments.length,l=new Array(a),o=0;o<a;o++)l[o]=arguments[o];return function(s){return l.reduceRight(function(c,f){return f(c)},s)}};function t1(n,a){return Object.keys(a).forEach(function(l){a[l]instanceof Object&&n[l]&&Object.assign(a[l],t1(n[l],a[l]))}),l0(l0({},n),a)}var YT={type:"cancelation",msg:"operation is manually canceled"};function Ld(n){var a=!1,l=new Promise(function(o,s){n.then(function(c){return a?s(YT):o(c)}),n.catch(s)});return l.cancel=function(){return a=!0},l}var KT=UT.create({config:PT,isInitialized:!1,resolve:null,reject:null,monaco:null}),n1=yT(KT,2),ki=n1[0],Wc=n1[1];function IT(n){var a=VT.config(n),l=a.monaco,o=vT(a,["monaco"]);Wc(function(s){return{config:t1(s.config,o),monaco:l}})}function XT(){var n=ki(function(a){var l=a.monaco,o=a.isInitialized,s=a.resolve;return{monaco:l,isInitialized:o,resolve:s}});if(!n.isInitialized){if(Wc({isInitialized:!0}),n.monaco)return n.resolve(n.monaco),Ld(kd);if(window.monaco&&window.monaco.editor)return a1(window.monaco),n.resolve(window.monaco),Ld(kd);GT(QT,JT)(WT)}return Ld(kd)}function QT(n){return document.body.appendChild(n)}function ZT(n){var a=document.createElement("script");return n&&(a.src=n),a}function JT(n){var a=ki(function(o){var s=o.config,c=o.reject;return{config:s,reject:c}}),l=ZT("".concat(a.config.paths.vs,"/loader.js"));return l.onload=function(){return n()},l.onerror=a.reject,l}function WT(){var n=ki(function(l){var o=l.config,s=l.resolve,c=l.reject;return{config:o,resolve:s,reject:c}}),a=window.require;a.config(n.config),a(["vs/editor/editor.main"],function(l){a1(l),n.resolve(l)},function(l){n.reject(l)})}function a1(n){ki().monaco||Wc({monaco:n})}function eM(){return ki(function(n){var a=n.monaco;return a})}var kd=new Promise(function(n,a){return Wc({resolve:n,reject:a})}),r1={config:IT,init:XT,__getMonacoInstance:eM},tM={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},zd=tM,nM={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},aM=nM;function rM({children:n}){return nt.createElement("div",{style:aM.container},n)}var lM=rM,oM=lM;function iM({width:n,height:a,isEditorReady:l,loading:o,_ref:s,className:c,wrapperProps:f}){return nt.createElement("section",{style:{...zd.wrapper,width:n,height:a},...f},!l&&nt.createElement(oM,null,o),nt.createElement("div",{ref:s,style:{...zd.fullWidth,...!l&&zd.hide},className:c}))}var sM=iM,l1=y.memo(sM);function cM(n){y.useEffect(n,[])}var o1=cM;function uM(n,a,l=!0){let o=y.useRef(!0);y.useEffect(o.current||!l?()=>{o.current=!1}:n,a)}var pn=uM;function xi(){}function Xl(n,a,l,o){return fM(n,o)||dM(n,a,l,o)}function fM(n,a){return n.editor.getModel(i1(n,a))}function dM(n,a,l,o){return n.editor.createModel(a,l,o?i1(n,o):void 0)}function i1(n,a){return n.Uri.parse(a)}function hM({original:n,modified:a,language:l,originalLanguage:o,modifiedLanguage:s,originalModelPath:c,modifiedModelPath:f,keepCurrentOriginalModel:m=!1,keepCurrentModifiedModel:g=!1,theme:h="light",loading:v="Loading...",options:b={},height:w="100%",width:S="100%",className:N,wrapperProps:E={},beforeMount:R=xi,onMount:C=xi}){let[A,T]=y.useState(!1),[k,D]=y.useState(!0),j=y.useRef(null),U=y.useRef(null),B=y.useRef(null),W=y.useRef(C),ne=y.useRef(R),ee=y.useRef(!1);o1(()=>{let te=r1.init();return te.then(O=>(U.current=O)&&D(!1)).catch(O=>O?.type!=="cancelation"&&console.error("Monaco initialization: error:",O)),()=>j.current?X():te.cancel()}),pn(()=>{if(j.current&&U.current){let te=j.current.getOriginalEditor(),O=Xl(U.current,n||"",o||l||"text",c||"");O!==te.getModel()&&te.setModel(O)}},[c],A),pn(()=>{if(j.current&&U.current){let te=j.current.getModifiedEditor(),O=Xl(U.current,a||"",s||l||"text",f||"");O!==te.getModel()&&te.setModel(O)}},[f],A),pn(()=>{let te=j.current.getModifiedEditor();te.getOption(U.current.editor.EditorOption.readOnly)?te.setValue(a||""):a!==te.getValue()&&(te.executeEdits("",[{range:te.getModel().getFullModelRange(),text:a||"",forceMoveMarkers:!0}]),te.pushUndoStop())},[a],A),pn(()=>{j.current?.getModel()?.original.setValue(n||"")},[n],A),pn(()=>{let{original:te,modified:O}=j.current.getModel();U.current.editor.setModelLanguage(te,o||l||"text"),U.current.editor.setModelLanguage(O,s||l||"text")},[l,o,s],A),pn(()=>{U.current?.editor.setTheme(h)},[h],A),pn(()=>{j.current?.updateOptions(b)},[b],A);let ie=y.useCallback(()=>{if(!U.current)return;ne.current(U.current);let te=Xl(U.current,n||"",o||l||"text",c||""),O=Xl(U.current,a||"",s||l||"text",f||"");j.current?.setModel({original:te,modified:O})},[l,a,s,n,o,c,f]),fe=y.useCallback(()=>{!ee.current&&B.current&&(j.current=U.current.editor.createDiffEditor(B.current,{automaticLayout:!0,...b}),ie(),U.current?.editor.setTheme(h),T(!0),ee.current=!0)},[b,h,ie]);y.useEffect(()=>{A&&W.current(j.current,U.current)},[A]),y.useEffect(()=>{!k&&!A&&fe()},[k,A,fe]);function X(){let te=j.current?.getModel();m||te?.original?.dispose(),g||te?.modified?.dispose(),j.current?.dispose()}return nt.createElement(l1,{width:S,height:w,isEditorReady:A,loading:v,_ref:B,className:N,wrapperProps:E})}var mM=hM;y.memo(mM);function pM(n){let a=y.useRef();return y.useEffect(()=>{a.current=n},[n]),a.current}var gM=pM,fc=new Map;function vM({defaultValue:n,defaultLanguage:a,defaultPath:l,value:o,language:s,path:c,theme:f="light",line:m,loading:g="Loading...",options:h={},overrideServices:v={},saveViewState:b=!0,keepCurrentModel:w=!1,width:S="100%",height:N="100%",className:E,wrapperProps:R={},beforeMount:C=xi,onMount:A=xi,onChange:T,onValidate:k=xi}){let[D,j]=y.useState(!1),[U,B]=y.useState(!0),W=y.useRef(null),ne=y.useRef(null),ee=y.useRef(null),ie=y.useRef(A),fe=y.useRef(C),X=y.useRef(),te=y.useRef(o),O=gM(c),I=y.useRef(!1),q=y.useRef(!1);o1(()=>{let Y=r1.init();return Y.then(H=>(W.current=H)&&B(!1)).catch(H=>H?.type!=="cancelation"&&console.error("Monaco initialization: error:",H)),()=>ne.current?M():Y.cancel()}),pn(()=>{let Y=Xl(W.current,n||o||"",a||s||"",c||l||"");Y!==ne.current?.getModel()&&(b&&fc.set(O,ne.current?.saveViewState()),ne.current?.setModel(Y),b&&ne.current?.restoreViewState(fc.get(c)))},[c],D),pn(()=>{ne.current?.updateOptions(h)},[h],D),pn(()=>{!ne.current||o===void 0||(ne.current.getOption(W.current.editor.EditorOption.readOnly)?ne.current.setValue(o):o!==ne.current.getValue()&&(q.current=!0,ne.current.executeEdits("",[{range:ne.current.getModel().getFullModelRange(),text:o,forceMoveMarkers:!0}]),ne.current.pushUndoStop(),q.current=!1))},[o],D),pn(()=>{let Y=ne.current?.getModel();Y&&s&&W.current?.editor.setModelLanguage(Y,s)},[s],D),pn(()=>{m!==void 0&&ne.current?.revealLine(m)},[m],D),pn(()=>{W.current?.editor.setTheme(f)},[f],D);let ye=y.useCallback(()=>{if(!(!ee.current||!W.current)&&!I.current){fe.current(W.current);let Y=c||l,H=Xl(W.current,o||n||"",a||s||"",Y||"");ne.current=W.current?.editor.create(ee.current,{model:H,automaticLayout:!0,...h},v),b&&ne.current.restoreViewState(fc.get(Y)),W.current.editor.setTheme(f),m!==void 0&&ne.current.revealLine(m),j(!0),I.current=!0}},[n,a,l,o,s,c,h,v,b,f,m]);y.useEffect(()=>{D&&ie.current(ne.current,W.current)},[D]),y.useEffect(()=>{!U&&!D&&ye()},[U,D,ye]),te.current=o,y.useEffect(()=>{D&&T&&(X.current?.dispose(),X.current=ne.current?.onDidChangeModelContent(Y=>{q.current||T(ne.current.getValue(),Y)}))},[D,T]),y.useEffect(()=>{if(D){let Y=W.current.editor.onDidChangeMarkers(H=>{let K=ne.current.getModel()?.uri;if(K&&H.find(le=>le.path===K.path)){let le=W.current.editor.getModelMarkers({resource:K});k?.(le)}});return()=>{Y?.dispose()}}return()=>{}},[D,k]);function M(){X.current?.dispose(),w?b&&fc.set(c,ne.current.saveViewState()):ne.current.getModel()?.dispose(),ne.current.dispose()}return nt.createElement(l1,{width:S,height:N,isEditorReady:D,loading:g,_ref:ee,className:E,wrapperProps:R})}var yM=vM,bM=y.memo(yM),Dc=bM;function xM({open:n,onOpenChange:a,showToast:l}){const{t:o}=Ma(),{config:s}=nl(),[c,f]=y.useState(""),[m,g]=y.useState(!1),[h,v]=y.useState(!1),[b,w]=y.useState(!1),S=y.useRef(null);y.useEffect(()=>{s&&n&&f(JSON.stringify(s,null,2))},[s,n]),y.useEffect(()=>{if(n)v(!0),requestAnimationFrame(()=>{w(!0)});else{w(!1);const C=setTimeout(()=>{v(!1)},300);return()=>clearTimeout(C)}},[n]);const N=(C,A,T)=>{if(C&&typeof C=="object"&&"success"in C){const k=C;return k.success?(l&&l(k.message||A,"success"),!0):(l&&l(k.message||T,"error"),!1)}else return l&&l(A,"success"),!0},E=async()=>{if(c)try{g(!0);const C=JSON.parse(c),A=await Ht.updateConfig(C);N(A,o("app.config_saved_success"),o("app.config_saved_failed"))&&a(!1)}catch(C){console.error("Failed to save config:",C),l&&l(o("app.config_saved_failed")+": "+C.message,"error")}finally{g(!1)}},R=async()=>{if(c)try{g(!0);const C=JSON.parse(c),A=await Ht.updateConfig(C);if(N(A,o("app.config_saved_success"),o("app.config_saved_failed"))){const k=await Ht.restartService();N(k,o("app.config_saved_restart_success"),o("app.config_saved_restart_failed")),a(!1)}}catch(C){console.error("Failed to save config and restart:",C),l&&l(o("app.config_saved_restart_failed")+": "+C.message,"error")}finally{g(!1)}};return!h&&!n?null:d.jsxs(d.Fragment,{children:[(h||n)&&d.jsx("div",{className:`fixed inset-0 z-50 transition-all duration-300 ease-out ${b&&n?"bg-black/50 opacity-100":"bg-black/0 opacity-0 pointer-events-none"}`,onClick:()=>a(!1)}),d.jsxs("div",{ref:S,className:`fixed bottom-0 left-0 right-0 z-50 flex flex-col bg-white shadow-2xl transition-all duration-300 ease-out transform ${b&&n?"translate-y-0":"translate-y-full"}`,style:{height:"100vh",maxHeight:"100vh"},children:[d.jsxs("div",{className:"flex items-center justify-between border-b p-4",children:[d.jsx("h2",{className:"text-lg font-semibold",children:o("json_editor.title")}),d.jsxs("div",{className:"flex gap-2",children:[d.jsxs(xe,{variant:"outline",size:"sm",onClick:()=>a(!1),disabled:m,children:[d.jsx(cr,{className:"h-4 w-4 mr-2"}),o("json_editor.cancel")]}),d.jsxs(xe,{variant:"outline",size:"sm",onClick:E,disabled:m,children:[d.jsx(Ab,{className:"h-4 w-4 mr-2"}),o(m?"json_editor.saving":"json_editor.save")]}),d.jsxs(xe,{variant:"default",size:"sm",onClick:R,disabled:m,children:[d.jsx(Th,{className:"h-4 w-4 mr-2"}),o(m?"json_editor.saving":"json_editor.save_and_restart")]})]})]}),d.jsx("div",{className:"flex-1 min-h-0 bg-gray-50",children:d.jsx(Dc,{height:"100%",defaultLanguage:"json",value:c,onChange:C=>f(C||""),theme:"vs",options:{minimap:{enabled:!0},fontSize:14,scrollBeyondLastLine:!1,automaticLayout:!0,wordWrap:"on",formatOnPaste:!0,formatOnType:!0,suggest:{showKeywords:!0,showSnippets:!0}}})})]})]})}function wM({open:n,onOpenChange:a,showToast:l}){const{t:o}=Ma(),s=ao(),[c,f]=y.useState([]),[m,g]=y.useState([]),[h,v]=y.useState(null),[b,w]=y.useState(!1),[S,N]=y.useState(!1),[E,R]=y.useState(!1),[C,A]=y.useState(!1),[T,k]=y.useState(!1),[D,j]=y.useState(null),[U,B]=y.useState(null),W=y.useRef(null),ne=y.useRef(null),ee=y.useRef(null),ie=y.useRef(null);y.useEffect(()=>{n&&X()},[n]);const fe=()=>{const ae=`
322
352
  // 日志聚合Web Worker
323
353
  self.onmessage = function(event) {
324
354
  const { type, data } = event.data;
@@ -394,11 +424,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
394
424
  }
395
425
  }
396
426
  };
397
- `,oe=new Blob([P],{type:"application/javascript"}),me=URL.createObjectURL(oe);return new Worker(me)};y.useEffect(()=>{if(typeof Worker<"u")try{ae.current=re(),ae.current.onmessage=P=>{const{type:oe,data:me,error:ve}=P.data;oe==="groupLogsResult"?M(me):oe==="error"&&(console.error("Worker error:",ve),l&&l(i("log_viewer.worker_error")+": "+ve,"error"))},ae.current.onerror=P=>{console.error("Worker error:",P),l&&l(i("log_viewer.worker_init_failed"),"error")}}catch(P){console.error("Failed to create worker:",P),l&&l(i("log_viewer.worker_init_failed"),"error")}return()=>{ae.current&&(ae.current.terminate(),ae.current=null)}},[l,i]),y.useEffect(()=>(j&&n&&p?te.current=setInterval(()=>{de()},5e3):te.current&&clearInterval(te.current),()=>{te.current&&clearInterval(te.current)}),[j,n,p]),y.useEffect(()=>{p&&n&&(c([]),de())},[p,n]),y.useEffect(()=>{if(n)S(!0),requestAnimationFrame(()=>{E(!0)});else{E(!1);const P=setTimeout(()=>{S(!1)},300);return()=>clearTimeout(P)}},[n]);const fe=async()=>{try{b(!0);const P=await Pt.getLogFiles();P&&Array.isArray(P)?(h(P),m(null),c([])):(h([]),l&&l(i("log_viewer.no_log_files_available"),"warning"))}catch(P){console.error("Failed to load log files:",P),l&&l(i("log_viewer.load_files_failed")+": "+P.message,"error")}finally{b(!1)}},de=async()=>{if(p)try{b(!0),M(null),B(null);const P=await Pt.getLogs(p.path);P&&Array.isArray(P)?(c(P),L&&ae.current?ae.current.postMessage({type:"groupLogsByReqId",data:{logs:P}}):M(null)):(c([]),M(null),l&&l(i("log_viewer.no_logs_available"),"warning"))}catch(P){console.error("Failed to load logs:",P),l&&l(i("log_viewer.load_failed")+": "+P.message,"error")}finally{b(!1)}},Q=async()=>{if(p)try{await Pt.clearLogs(p.path),c([]),l&&l(i("log_viewer.logs_cleared"),"success")}catch(P){console.error("Failed to clear logs:",P),l&&l(i("log_viewer.clear_failed")+": "+P.message,"error")}},ee=P=>{m(P),R(!1)},A=()=>{const P=!L;k(P),P&&p&&s.length>0?ae.current&&ae.current.postMessage({type:"groupLogsByReqId",data:{logs:s}}):P||(M(null),B(null))},X=P=>{B(P)},V=()=>{if(!p||s.length===0)return;const P=s.join(`
398
- `),oe=new Blob([P],{type:"text/plain"}),me=URL.createObjectURL(oe),ve=document.createElement("a");ve.href=me,ve.download=`${p.name}-${new Date().toISOString().split("T")[0]}.txt`,document.body.appendChild(ve),ve.click(),document.body.removeChild(ve),URL.revokeObjectURL(me),l&&l(i("log_viewer.logs_downloaded"),"success")},ye=P=>{if(P===0)return"0 Bytes";const oe=1024,me=["Bytes","KB","MB","GB"],ve=Math.floor(Math.log(P)/Math.log(oe));return parseFloat((P/Math.pow(oe,ve)).toFixed(2))+" "+me[ve]},O=P=>new Date(P).toLocaleString(),G=()=>{const P=[{id:"root",label:i("log_viewer.title"),onClick:()=>{m(null),R(!1),c([]),M(null),B(null),k(!1)}}];return p&&P.push({id:"file",label:p.name,onClick:()=>{L?B(null):(B(null),M(null),k(!1))}}),N&&P.push({id:"req",label:`${i("log_viewer.request")} ${N}`,onClick:()=>{}}),P},U=()=>N?()=>{B(null)}:p?()=>{m(null),R(!1),c([]),M(null),B(null),k(!1)}:null,K=()=>{if(L&&H&&N&&H.groups[N]){const P=H.groups[N];return console.log(P),P.map(oe=>JSON.stringify(oe)).join(`
399
- `)}return s.join(`
400
- `)};return!w&&!n?null:g.jsxs(g.Fragment,{children:[(w||n)&&g.jsx("div",{className:`fixed inset-0 z-50 transition-all duration-300 ease-out ${C&&n?"bg-black/50 opacity-100":"bg-black/0 opacity-0 pointer-events-none"}`,onClick:()=>a(!1)}),g.jsxs("div",{ref:J,className:`fixed bottom-0 left-0 right-0 z-50 flex flex-col bg-white shadow-2xl transition-all duration-300 ease-out transform ${C&&n?"translate-y-0":"translate-y-full"}`,style:{height:"100vh",maxHeight:"100vh"},children:[g.jsxs("div",{className:"flex items-center justify-between border-b p-4",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[U()&&g.jsxs(Ce,{variant:"ghost",size:"sm",onClick:U(),children:[g.jsx(hN,{className:"h-4 w-4 mr-2"}),i("log_viewer.back")]}),g.jsx("nav",{className:"flex items-center space-x-1 text-sm",children:G().map((P,oe)=>g.jsxs(mt.Fragment,{children:[oe>0&&g.jsx("span",{className:"text-gray-400 mx-1",children:"/"}),oe===G().length-1?g.jsx("span",{className:"text-gray-900 font-medium",children:P.label}):g.jsx("button",{onClick:P.onClick,className:"text-blue-600 hover:text-blue-800 transition-colors",children:P.label})]},P.id))})]}),g.jsxs("div",{className:"flex gap-2",children:[p&&g.jsxs(g.Fragment,{children:[g.jsxs(Ce,{variant:"ghost",size:"sm",onClick:A,className:L?"bg-blue-100 text-blue-700":"",children:[g.jsx(UN,{className:"h-4 w-4 mr-2"}),i(L?"log_viewer.grouped_on":"log_viewer.group_by_req_id")]}),g.jsxs(Ce,{variant:"ghost",size:"sm",onClick:()=>R(!j),className:j?"bg-blue-100 text-blue-700":"",children:[g.jsx(bh,{className:`h-4 w-4 mr-2 ${j?"animate-spin":""}`}),i(j?"log_viewer.auto_refresh_on":"log_viewer.auto_refresh_off")]}),g.jsxs(Ce,{variant:"outline",size:"sm",onClick:V,disabled:s.length===0,children:[g.jsx(EN,{className:"h-4 w-4 mr-2"}),i("log_viewer.download")]}),g.jsxs(Ce,{variant:"outline",size:"sm",onClick:Q,disabled:s.length===0,children:[g.jsx(sr,{className:"h-4 w-4 mr-2"}),i("log_viewer.clear")]})]}),g.jsxs(Ce,{variant:"outline",size:"sm",onClick:()=>a(!1),children:[g.jsx(Yr,{className:"h-4 w-4 mr-2"}),i("log_viewer.close")]})]})]}),g.jsx("div",{className:"flex-1 min-h-0 bg-gray-50",children:v?g.jsx("div",{className:"flex items-center justify-center h-full",children:g.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}):p?g.jsx(g.Fragment,{children:L&&H&&!N?g.jsxs("div",{className:"flex flex-col h-full p-6",children:[g.jsxs("div",{className:"mb-4 flex-shrink-0",children:[g.jsx("h3",{className:"text-lg font-medium mb-2",children:i("log_viewer.request_groups")}),g.jsxs("p",{className:"text-sm text-gray-600",children:[i("log_viewer.total_requests"),": ",H.summary.totalRequests," |",i("log_viewer.total_logs"),": ",H.summary.totalLogs]})]}),g.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto space-y-3",children:H.summary.requests.map(P=>g.jsxs("div",{className:"border rounded-lg p-4 hover:bg-gray-50 cursor-pointer transition-colors",onClick:()=>X(P.reqId),children:[g.jsxs("div",{className:"flex items-center justify-between mb-2",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(gd,{className:"h-5 w-5 text-blue-600"}),g.jsx("span",{className:"font-medium text-sm",children:P.reqId}),P.model&&g.jsx("span",{className:"text-xs bg-green-100 text-green-800 px-2 py-1 rounded",children:P.model})]}),g.jsxs("span",{className:"text-xs bg-blue-100 text-blue-800 px-2 py-1 rounded",children:[P.logCount," ",i("log_viewer.logs")]})]}),g.jsxs("div",{className:"text-xs text-gray-500 space-y-1",children:[g.jsxs("div",{children:[i("log_viewer.first_log"),": ",O(P.firstLog)]}),g.jsxs("div",{children:[i("log_viewer.last_log"),": ",O(P.lastLog)]})]})]},P.reqId))})]}):g.jsx(Yx,{height:"100%",defaultLanguage:"json",value:K(),theme:"vs",options:{minimap:{enabled:!0},fontSize:14,scrollBeyondLastLine:!1,automaticLayout:!0,wordWrap:"on",readOnly:!0,lineNumbers:"on",folding:!0,renderWhitespace:"all"}})}):g.jsxs("div",{className:"p-6",children:[g.jsx("h3",{className:"text-lg font-medium mb-4",children:i("log_viewer.select_file")}),f.length===0?g.jsxs("div",{className:"text-gray-500 text-center py-8",children:[g.jsx(gd,{className:"h-12 w-12 mx-auto mb-4 text-gray-400"}),g.jsx("p",{children:i("log_viewer.no_log_files_available")})]}):g.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:f.map(P=>g.jsxs("div",{className:"border rounded-lg p-4 hover:bg-gray-50 cursor-pointer transition-colors",onClick:()=>ee(P),children:[g.jsx("div",{className:"flex items-start justify-between mb-2",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(gd,{className:"h-5 w-5 text-blue-600"}),g.jsx("span",{className:"font-medium text-sm",children:P.name})]})}),g.jsxs("div",{className:"text-xs text-gray-500 space-y-1",children:[g.jsx("div",{children:ye(P.size)}),g.jsx("div",{children:O(P.lastModified)})]})]},P.path))})]})})]})]})}function AT({message:n,type:a,onClose:l}){y.useEffect(()=>{const c=setTimeout(()=>{l()},3e3);return()=>clearTimeout(c)},[l]);const i=()=>{switch(a){case"success":return g.jsx(wN,{className:"h-5 w-5 text-green-500"});case"error":return g.jsx(db,{className:"h-5 w-5 text-red-500"});case"warning":return g.jsx(vN,{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 g.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:[g.jsxs("div",{className:"flex items-center space-x-2",children:[i(),g.jsx("span",{className:"text-sm font-medium",children:n})]}),g.jsx("button",{onClick:l,className:"ml-4 text-gray-500 hover:text-gray-700 focus:outline-none",children:g.jsx(Yr,{className:"h-4 w-4"})})]})}function TT(){const{t:n,i18n:a}=Oa(),l=Rc(),{config:i,error:s}=Wr(),[c,f]=y.useState(!1),[h,p]=y.useState(!1),[m,v]=y.useState(!1),[b,w]=y.useState(!0),[S,C]=y.useState(null),[E,j]=y.useState(!1),[R,L]=y.useState(!1),[k,H]=y.useState(null),[M,N]=y.useState(!1),[B,J]=y.useState(!1),te=y.useRef(!1),ae=async()=>{if(!i){C({message:n("app.config_missing"),type:"error"});return}try{const Q=await Pt.updateConfig(i);if(console.log("Config saved successfully"),Q&&typeof Q=="object"&&"success"in Q){const ee=Q;ee.success?C({message:ee.message||n("app.config_saved_success"),type:"success"}):C({message:ee.message||n("app.config_saved_failed"),type:"error"})}else C({message:n("app.config_saved_success"),type:"success"})}catch(Q){console.error("Failed to save config:",Q),C({message:n("app.config_saved_failed")+": "+Q.message,type:"error"})}},re=async()=>{if(!i){C({message:n("app.config_missing"),type:"error"});return}try{const Q=await Pt.updateConfig(i);let ee=!0;if(Q&&typeof Q=="object"&&"success"in Q){const A=Q;A.success||(ee=!1,C({message:A.message||n("app.config_saved_failed"),type:"error"}))}if(ee){const A=await Pt.restartService();if(console.log("Config saved and service restarted successfully"),A&&typeof A=="object"&&"success"in A){const X=A;X.success&&C({message:X.message||n("app.config_saved_restart_success"),type:"success"})}else C({message:n("app.config_saved_restart_success"),type:"success"})}}catch(Q){console.error("Failed to save config and restart:",Q),C({message:n("app.config_saved_restart_failed")+": "+Q.message,type:"error"})}},fe=y.useCallback(async(Q=!0)=>{if(B&&E){Q&&L(!0);return}N(!0);try{const ee=await Pt.checkForUpdates();ee.hasUpdate&&ee.latestVersion&&ee.changelog?(j(!0),H({version:ee.latestVersion,changelog:ee.changelog}),Q&&L(!0)):Q&&C({message:n("app.no_updates_available"),type:"success"}),J(!0)}catch(ee){console.error("Failed to check for updates:",ee),Q&&C({message:n("app.update_check_failed")+": "+ee.message,type:"error"})}finally{N(!1)}},[B,E,n]);y.useEffect(()=>{(async()=>{if(i){w(!1),!B&&!te.current&&(te.current=!0,fe(!1));return}if(!localStorage.getItem("apiKey")){w(!1);return}try{await Pt.getConfig()}catch(X){console.error("Error checking auth:",X),X.message==="Unauthorized"&&l("/login")}finally{w(!1),!B&&!te.current&&(te.current=!0,fe(!1))}})();const ee=()=>{l("/login")};return window.addEventListener("unauthorized",ee),()=>{window.removeEventListener("unauthorized",ee)}},[i,l,B,fe]);const de=async()=>{if(k)try{const Q=await Pt.performUpdate();Q.success?(C({message:n("app.update_successful"),type:"success"}),j(!1),L(!1),J(!1)):C({message:n("app.update_failed")+": "+Q.message,type:"error"})}catch(Q){console.error("Failed to perform update:",Q),C({message:n("app.update_failed")+": "+Q.message,type:"error"})}};return b?g.jsx("div",{className:"h-screen bg-gray-50 font-sans flex items-center justify-center",children:g.jsx("div",{className:"text-gray-500",children:"Loading application..."})}):s?g.jsx("div",{className:"h-screen bg-gray-50 font-sans flex items-center justify-center",children:g.jsxs("div",{className:"text-red-500",children:["Error: ",s.message]})}):i?g.jsxs("div",{className:"h-screen bg-gray-50 font-sans",children:[g.jsxs("header",{className:"flex h-16 items-center justify-between border-b bg-white px-6",children:[g.jsx("h1",{className:"text-xl font-semibold text-gray-800",children:n("app.title")}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Ce,{variant:"ghost",size:"icon",onClick:()=>f(!0),className:"transition-all-ease hover:scale-110",children:g.jsx(FN,{className:"h-5 w-5"})}),g.jsx(Ce,{variant:"ghost",size:"icon",onClick:()=>p(!0),className:"transition-all-ease hover:scale-110",children:g.jsx(AN,{className:"h-5 w-5"})}),g.jsx(Ce,{variant:"ghost",size:"icon",onClick:()=>v(!0),className:"transition-all-ease hover:scale-110",children:g.jsx(MN,{className:"h-5 w-5"})}),g.jsxs($c,{children:[g.jsx(Vc,{asChild:!0,children:g.jsx(Ce,{variant:"ghost",size:"icon",className:"transition-all-ease hover:scale-110",children:g.jsx(kN,{className:"h-5 w-5"})})}),g.jsx(qc,{className:"w-32 p-2",children:g.jsxs("div",{className:"space-y-1",children:[g.jsx(Ce,{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"}),g.jsx(Ce,{variant:a.language.startsWith("zh")?"default":"ghost",className:"w-full justify-start transition-all-ease hover:scale-[1.02]",onClick:()=>a.changeLanguage("zh"),children:"中文"})]})})]}),g.jsxs(Ce,{variant:"ghost",size:"icon",onClick:()=>fe(!0),disabled:M,className:"transition-all-ease hover:scale-110 relative",children:[g.jsxs("div",{className:"relative",children:[g.jsx(bN,{className:"h-5 w-5"}),E&&!M&&g.jsx("div",{className:"absolute -top-1 -right-1 w-3 h-3 bg-red-500 rounded-full border-2 border-white"})]}),M&&g.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:g.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent"})})]}),g.jsxs(Ce,{onClick:ae,variant:"outline",className:"transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:[g.jsx(hb,{className:"mr-2 h-4 w-4"}),n("app.save")]}),g.jsxs(Ce,{onClick:re,className:"transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:[g.jsx(bh,{className:"mr-2 h-4 w-4"}),n("app.save_and_restart")]})]})]}),g.jsxs("main",{className:"flex h-[calc(100vh-4rem)] gap-4 p-4 overflow-hidden",children:[g.jsx("div",{className:"w-3/5",children:g.jsx(wA,{})}),g.jsxs("div",{className:"flex w-2/5 flex-col gap-4",children:[g.jsx("div",{className:"h-3/5",children:g.jsx(SA,{})}),g.jsx("div",{className:"flex-1 overflow-hidden",children:g.jsx(yA,{})})]})]}),g.jsx(gA,{isOpen:c,onOpenChange:f}),g.jsx(jT,{open:h,onOpenChange:p,showToast:(Q,ee)=>C({message:Q,type:ee})}),g.jsx(OT,{open:m,onOpenChange:v,showToast:(Q,ee)=>C({message:Q,type:ee})}),g.jsx(Xr,{open:R,onOpenChange:L,children:g.jsxs(cr,{className:"max-w-2xl",children:[g.jsxs(ur,{children:[g.jsxs(fr,{children:[n("app.new_version_available"),k&&g.jsxs("span",{className:"ml-2 text-sm font-normal text-muted-foreground",children:["v",k.version]})]}),g.jsx(Lc,{children:n("app.update_description")})]}),g.jsx("div",{className:"max-h-96 overflow-y-auto py-4",children:k?.changelog?g.jsx("div",{className:"whitespace-pre-wrap text-sm",children:k.changelog}):g.jsx("div",{className:"text-muted-foreground",children:n("app.no_changelog_available")})}),g.jsxs(Qr,{children:[g.jsx(Ce,{variant:"outline",onClick:()=>L(!1),children:n("app.later")}),g.jsx(Ce,{onClick:de,children:n("app.update_now")})]})]})}),S&&g.jsx(AT,{message:S.message,type:S.type,onClose:()=>C(null)})]}):g.jsx("div",{className:"h-screen bg-gray-50 font-sans flex items-center justify-center",children:g.jsx("div",{className:"text-gray-500",children:"Loading configuration..."})})}function MT(){const{t:n}=Oa(),a=Rc(),[l,i]=y.useState(""),[s,c]=y.useState(""),[f,h]=y.useState(!1);y.useEffect(()=>{(async()=>{if(localStorage.getItem("apiKey")){h(!0);try{await Pt.getConfig(),a("/dashboard")}catch{localStorage.removeItem("apiKey")}finally{h(!1)}}})();const v=()=>{a("/login")};return window.addEventListener("unauthorized",v),()=>{window.removeEventListener("unauthorized",v)}},[a]);const p=async m=>{m.preventDefault();try{Pt.setApiKey(l),window.dispatchEvent(new StorageEvent("storage",{key:"apiKey",newValue:l,url:window.location.href})),await Pt.getConfig(),a("/dashboard")}catch(v){Pt.setApiKey(""),v.message&&v.message.includes("401")?c(n("login.invalidApiKey")):a("/dashboard")}};return f?g.jsx("div",{className:"flex min-h-screen items-center justify-center bg-gray-50",children:g.jsxs(Ca,{className:"w-full max-w-md",children:[g.jsx(Na,{className:"space-y-1",children:g.jsx(Ra,{className:"text-2xl",children:n("login.title")})}),g.jsxs(ja,{children:[g.jsx("div",{className:"flex justify-center py-8",children:g.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent"})}),g.jsx("p",{className:"text-center text-sm text-gray-500",children:n("login.validating")})]})]})}):g.jsx("div",{className:"flex min-h-screen items-center justify-center bg-gray-50",children:g.jsxs(Ca,{className:"w-full max-w-md",children:[g.jsxs(Na,{className:"space-y-1",children:[g.jsx(Ra,{className:"text-2xl",children:n("login.title")}),g.jsx(kx,{children:n("login.description")})]}),g.jsxs("form",{onSubmit:p,children:[g.jsxs(ja,{className:"space-y-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ke,{htmlFor:"apiKey",children:n("login.apiKey")}),g.jsx(ft,{id:"apiKey",type:"password",value:l,onChange:m=>i(m.target.value),placeholder:n("login.apiKeyPlaceholder")})]}),s&&g.jsx("div",{className:"text-sm text-red-500",children:s})]}),g.jsx(zx,{children:g.jsx(Ce,{className:"w-full",type:"submit",children:n("login.signIn")})})]})]})})}const DT=({children:n})=>n,LT=({children:n})=>n,kT=YE([{path:"/",element:g.jsx(IE,{to:"/dashboard",replace:!0})},{path:"/login",element:g.jsx(LT,{children:g.jsx(MT,{})})},{path:"/dashboard",element:g.jsx(DT,{children:g.jsx(TT,{})})}],{initialEntries:["/dashboard"]});C_.createRoot(document.getElementById("root")).render(g.jsx(y.StrictMode,{children:g.jsx(qO,{children:g.jsx(A2,{router:kT})})}));</script>
401
- <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-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-orange-400:oklch(75% .183 55.934);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--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-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-800:oklch(44.8% .119 151.328);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-500:oklch(71.5% .143 215.221);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-500:oklch(62.7% .265 303.9);--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-400:oklch(70.7% .022 261.325);--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-gray-900:oklch(21% .034 264.665);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--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)}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background-color:#0000;border-radius:4px}::-webkit-scrollbar-thumb{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){::-webkit-scrollbar-thumb{background-color:color-mix(in oklab,var(--muted-foreground)30%,transparent)}}::-webkit-scrollbar-thumb{border-radius:4px;transition:background-color .2s}::-webkit-scrollbar-thumb:hover{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){::-webkit-scrollbar-thumb:hover{background-color:color-mix(in oklab,var(--muted-foreground)50%,transparent)}}::-webkit-scrollbar-corner{background-color:#0000}*{scrollbar-width:thin;scrollbar-color:oklch(55.6% 0 0) oklch(97% 0 0)}.dark *{scrollbar-color:oklch(70.8% 0 0) oklch(26.9% 0 0)}}@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-1{top:calc(var(--spacing)*-1)}.top-0{top:calc(var(--spacing)*0)}.top-1\/2{top:50%}.top-4{top:calc(var(--spacing)*4)}.top-\[50\%\]{top:50%}.-right-1{right:calc(var(--spacing)*-1)}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-4{right:calc(var(--spacing)*4)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.left-2\.5{left:calc(var(--spacing)*2.5)}.left-\[50\%\]{left:50%}.z-50{z-index:50}.col-span-1{grid-column:span 1/span 1}.col-span-3{grid-column:span 3/span 3}.col-span-5{grid-column:span 5/span 5}.-mx-1{margin-inline:calc(var(--spacing)*-1)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-auto{margin-inline:auto}.mt-0\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-auto{margin-top:auto}.mr-2{margin-right:calc(var(--spacing)*2)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-3{margin-left:calc(var(--spacing)*3)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.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-12{height:calc(var(--spacing)*12)}.h-16{height:calc(var(--spacing)*16)}.h-\[90vh\]{height:90vh}.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-72{max-height:calc(var(--spacing)*72)}.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-\[200px\]{min-height:200px}.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-12{width:calc(var(--spacing)*12)}.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-2xl{max-width:var(--container-2xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:calc(var(--spacing)*0)}.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-1\/2{--tw-translate-y: -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-move{cursor:move}.cursor-pointer{cursor:pointer}.scroll-py-1{scroll-padding-block:calc(var(--spacing)*1)}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.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-0{gap:calc(var(--spacing)*0)}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}: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-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*1)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-x-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)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.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-none{border-radius:0}.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-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-blue-200{border-color:var(--color-blue-200)}.border-blue-600{border-color:var(--color-blue-600)}.border-border{border-color:var(--border)}.border-current{border-color:currentColor}.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-red-500{border-color:var(--color-red-500)}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.border-yellow-200{border-color:var(--color-yellow-200)}.border-t-transparent{border-top-color:#0000}.bg-background{background-color:var(--background)}.bg-black{background-color:var(--color-black)}.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-black\/90{background-color:#000000e6}@supports (color:color-mix(in lab,red,red)){.bg-black\/90{background-color:color-mix(in oklab,var(--color-black)90%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-300{background-color:var(--color-blue-300)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-border{background-color:var(--border)}.bg-card{background-color:var(--card)}.bg-cyan-300{background-color:var(--color-cyan-300)}.bg-cyan-500{background-color:var(--color-cyan-500)}.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-gray-800{background-color:var(--color-gray-800)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-400{background-color:var(--color-green-400)}.bg-green-600{background-color:var(--color-green-600)}.bg-orange-400{background-color:var(--color-orange-400)}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-purple-300{background-color:var(--color-purple-300)}.bg-purple-400{background-color:var(--color-purple-400)}.bg-purple-500{background-color:var(--color-purple-500)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-400{background-color:var(--color-red-400)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-600{background-color:var(--color-red-600)}.bg-secondary,.bg-secondary\/50{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.bg-secondary\/50{background-color:color-mix(in oklab,var(--secondary)50%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.bg-yellow-100{background-color:var(--color-yellow-100)}.bg-yellow-300{background-color:var(--color-yellow-300)}.bg-yellow-500{background-color:var(--color-yellow-500)}.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-1\.5{padding-inline:calc(var(--spacing)*1.5)}.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-5{padding-block:calc(var(--spacing)*5)}.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)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-10{padding-right:calc(var(--spacing)*10)}.pb-0{padding-bottom:calc(var(--spacing)*0)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pl-4{padding-left:calc(var(--spacing)*4)}.pl-5{padding-left:calc(var(--spacing)*5)}.pl-8{padding-left:calc(var(--spacing)*8)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.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}.whitespace-pre-wrap{white-space:pre-wrap}.text-black{color:var(--color-black)}.text-blue-300{color:var(--color-blue-300)}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-800{color:var(--color-blue-800)}.text-card-foreground{color:var(--card-foreground)}.text-current{color:currentColor}.text-cyan-300{color:var(--color-cyan-300)}.text-cyan-500{color:var(--color-cyan-500)}.text-destructive{color:var(--destructive)}.text-destructive-foreground{color:var(--destructive-foreground)}.text-foreground{color:var(--foreground)}.text-gray-400{color:var(--color-gray-400)}.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-gray-900{color:var(--color-gray-900)}.text-green-400{color:var(--color-green-400)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-green-800{color:var(--color-green-800)}.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-purple-300{color:var(--color-purple-300)}.text-purple-500{color:var(--color-purple-500)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-white{color:var(--color-white)}.text-yellow-300{color:var(--color-yellow-300)}.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-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);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-50:hover{background-color:var(--color-gray-50)}.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:hover,.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\:bg-white\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/10:hover{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-blue-800:hover{color:var(--color-blue-800)}.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\:col-span-2{grid-column:span 2/span 2}.sm\:max-w-2xl{max-width:var(--container-2xl)}.sm\:max-w-5xl{max-width:var(--container-5xl)}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.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\:max-w-6xl{max-width:var(--container-6xl)}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media (min-width:64rem){.lg\:max-w-7xl{max-width:var(--container-7xl)}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.\[\&_\[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>
427
+ `,we=new Blob([ae],{type:"application/javascript"}),Pe=URL.createObjectURL(we);return new Worker(Pe)};y.useEffect(()=>{if(typeof Worker<"u")try{ee.current=fe(),ee.current.onmessage=ae=>{const{type:we,data:Pe,error:De}=ae.data;we==="groupLogsResult"?j(Pe):we==="error"&&(console.error("Worker error:",De),l&&l(o("log_viewer.worker_error")+": "+De,"error"))},ee.current.onerror=ae=>{console.error("Worker error:",ae),l&&l(o("log_viewer.worker_init_failed"),"error")}}catch(ae){console.error("Failed to create worker:",ae),l&&l(o("log_viewer.worker_init_failed"),"error")}return()=>{ee.current&&(ee.current.terminate(),ee.current=null)}},[l,o]),y.useEffect(()=>(C&&n&&h?ne.current=setInterval(()=>{te()},5e3):ne.current&&clearInterval(ne.current),()=>{ne.current&&clearInterval(ne.current)}),[C,n,h]),y.useEffect(()=>{h&&n&&(f([]),te())},[h,n]),y.useEffect(()=>{if(n)N(!0),requestAnimationFrame(()=>{R(!0)});else{R(!1);const ae=setTimeout(()=>{N(!1)},300);return()=>clearTimeout(ae)}},[n]);const X=async()=>{try{w(!0);const ae=await Ht.getLogFiles();ae&&Array.isArray(ae)?(g(ae),v(null),f([])):(g([]),l&&l(o("log_viewer.no_log_files_available"),"warning"))}catch(ae){console.error("Failed to load log files:",ae),l&&l(o("log_viewer.load_files_failed")+": "+ae.message,"error")}finally{w(!1)}},te=async()=>{if(h)try{w(!0),j(null),B(null);const ae=await Ht.getLogs(h.path);ae&&Array.isArray(ae)?(f(ae),T&&ee.current?ee.current.postMessage({type:"groupLogsByReqId",data:{logs:ae}}):j(null)):(f([]),j(null),l&&l(o("log_viewer.no_logs_available"),"warning"))}catch(ae){console.error("Failed to load logs:",ae),l&&l(o("log_viewer.load_failed")+": "+ae.message,"error")}finally{w(!1)}},O=async()=>{if(h)try{await Ht.clearLogs(h.path),f([]),l&&l(o("log_viewer.logs_cleared"),"success")}catch(ae){console.error("Failed to clear logs:",ae),l&&l(o("log_viewer.clear_failed")+": "+ae.message,"error")}},I=ae=>{v(ae),A(!1)},q=()=>{const ae=!T;k(ae),ae&&h&&c.length>0?ee.current&&ee.current.postMessage({type:"groupLogsByReqId",data:{logs:c}}):ae||(j(null),B(null))},ye=ae=>{B(ae)},M=()=>{if(!h||c.length===0)return;const ae=c.join(`
428
+ `),we=new Blob([ae],{type:"text/plain"}),Pe=URL.createObjectURL(we),De=document.createElement("a");De.href=Pe,De.download=`${h.name}-${new Date().toISOString().split("T")[0]}.txt`,document.body.appendChild(De),De.click(),document.body.removeChild(De),URL.revokeObjectURL(Pe),l&&l(o("log_viewer.logs_downloaded"),"success")},Y=ae=>{if(ae===0)return"0 Bytes";const we=1024,Pe=["Bytes","KB","MB","GB"],De=Math.floor(Math.log(ae)/Math.log(we));return parseFloat((ae/Math.pow(we,De)).toFixed(2))+" "+Pe[De]},H=ae=>new Date(ae).toLocaleString(),K=()=>{const ae=[{id:"root",label:o("log_viewer.title"),onClick:()=>{v(null),A(!1),f([]),j(null),B(null),k(!1)}}];return h&&ae.push({id:"file",label:h.name,onClick:()=>{T?B(null):(B(null),j(null),k(!1))}}),U&&ae.push({id:"req",label:`${o("log_viewer.request")} ${U}`,onClick:()=>{}}),ae},le=()=>U?()=>{B(null)}:h?()=>{v(null),A(!1),f([]),j(null),B(null),k(!1)}:null,he=()=>T&&D&&U&&D.groups[U]?D.groups[U].map(we=>JSON.stringify(we)).join(`
429
+ `):c.join(`
430
+ `),ve=()=>{const ae=[];return T&&D&&U&&D.groups[U]?D.groups[U].forEach((Pe,De)=>{try{Pe=JSON.parse(Pe),Pe.msg==="final request"&&ae.push(De+1)}catch{}}):c.forEach((we,Pe)=>{try{JSON.parse(we).msg==="final request"&&ae.push(Pe+1)}catch{}}),ae},be=ae=>{console.log("handleDebugClick called with lineNumber:",ae),console.log("Current state:",{groupByReqId:T,selectedReqId:U,logsLength:c.length});let we=null;if(T&&D&&U&&D.groups[U]){const Pe=D.groups[U];console.log("Group mode - requestLogs length:",Pe.length),we=Pe[ae-1],console.log("Group mode - logData:",we)}else{console.log("Non-group mode - logs length:",c.length);try{const Pe=c[ae-1];console.log("Log line:",Pe),we=JSON.parse(Pe),console.log("Parsed logData:",we)}catch(Pe){console.error("Failed to parse log data:",Pe)}}if(we){console.log("Navigating to debug page with logData:",we);const Pe=encodeURIComponent(JSON.stringify(we));console.log("Encoded logDataParam length:",Pe.length),s(`/debug?logData=${Pe}`)}else console.error("No log data found for line:",ae)},ze=ae=>{ie.current=ae,ae.updateOptions({glyphMargin:!0});let we=[];const Pe=()=>{const oe=ve().map(ce=>({range:{startLineNumber:ce,startColumn:1,endLineNumber:ce,endColumn:1},options:{glyphMarginClassName:"debug-button-glyph",glyphMarginHoverMessage:{value:"点击调试此请求"}}}));we=ae.deltaDecorations(we,oe)};Pe(),ae.onMouseDown(qe=>{console.log("Mouse down event:",qe.target),console.log("Event details:",{type:qe.target.type,hasDetail:!!qe.target.detail,glyphMarginLane:qe.target.detail?.glyphMarginLane,offsetX:qe.target.detail?.offsetX,glyphMarginLeft:qe.target.detail?.glyphMarginLeft,glyphMarginWidth:qe.target.detail?.glyphMarginWidth});const oe=qe.target.detail&&qe.target.detail.glyphMarginLane!==void 0&&qe.target.detail.offsetX!==void 0&&qe.target.detail.offsetX<=qe.target.detail.glyphMarginLeft+qe.target.detail.glyphMarginWidth;if(console.log("Is glyph margin click:",oe),qe.target.position&&oe){const ce=ve();console.log("Final request lines:",ce),console.log("Clicked line number:",qe.target.position.lineNumber),ce.includes(qe.target.position.lineNumber)&&(console.log("Opening debug page for line:",qe.target.position.lineNumber),be(qe.target.position.lineNumber))}}),typeof ae.onGlyphMarginClick=="function"&&ae.onGlyphMarginClick(qe=>{console.log("Glyph margin click event:",qe),ve().includes(qe.target.position.lineNumber)&&(console.log("Opening debug page for line (glyph):",qe.target.position.lineNumber),be(qe.target.position.lineNumber))}),ae.onMouseMove(qe=>{qe.target.position&&(qe.target.type===4||qe.target.type==="glyph-margin")&&ve().includes(qe.target.position.lineNumber)&&ae.updateOptions({glyphMargin:!0})});const De=setInterval(Pe,1e3);return()=>{clearInterval(De),ie.current&&ie.current.deltaDecorations(we,[])}};return!S&&!n?null:d.jsxs(d.Fragment,{children:[(S||n)&&d.jsx("div",{className:`fixed inset-0 z-50 transition-all duration-300 ease-out ${E&&n?"bg-black/50 opacity-100":"bg-black/0 opacity-0 pointer-events-none"}`,onClick:()=>a(!1)}),d.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 ${E&&n?"translate-y-0":"translate-y-full"}`,style:{height:"100vh",maxHeight:"100vh"},children:[d.jsxs("div",{className:"flex items-center justify-between border-b p-4",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[le()&&d.jsxs(xe,{variant:"ghost",size:"sm",onClick:le(),children:[d.jsx(Cb,{className:"h-4 w-4 mr-2"}),o("log_viewer.back")]}),d.jsx("nav",{className:"flex items-center space-x-1 text-sm",children:K().map((ae,we)=>d.jsxs(nt.Fragment,{children:[we>0&&d.jsx("span",{className:"text-gray-400 mx-1",children:"/"}),we===K().length-1?d.jsx("span",{className:"text-gray-900 font-medium",children:ae.label}):d.jsx("button",{onClick:ae.onClick,className:"text-blue-600 hover:text-blue-800 transition-colors",children:ae.label})]},ae.id))})]}),d.jsxs("div",{className:"flex gap-2",children:[h&&d.jsxs(d.Fragment,{children:[d.jsxs(xe,{variant:"ghost",size:"sm",onClick:q,className:T?"bg-blue-100 text-blue-700":"",children:[d.jsx(Ej,{className:"h-4 w-4 mr-2"}),o(T?"log_viewer.grouped_on":"log_viewer.group_by_req_id")]}),d.jsxs(xe,{variant:"ghost",size:"sm",onClick:()=>A(!C),className:C?"bg-blue-100 text-blue-700":"",children:[d.jsx(Th,{className:`h-4 w-4 mr-2 ${C?"animate-spin":""}`}),o(C?"log_viewer.auto_refresh_on":"log_viewer.auto_refresh_off")]}),d.jsxs(xe,{variant:"outline",size:"sm",onClick:M,disabled:c.length===0,children:[d.jsx(uj,{className:"h-4 w-4 mr-2"}),o("log_viewer.download")]}),d.jsxs(xe,{variant:"outline",size:"sm",onClick:O,disabled:c.length===0,children:[d.jsx(na,{className:"h-4 w-4 mr-2"}),o("log_viewer.clear")]})]}),d.jsxs(xe,{variant:"outline",size:"sm",onClick:()=>a(!1),children:[d.jsx(cr,{className:"h-4 w-4 mr-2"}),o("log_viewer.close")]})]})]}),d.jsx("div",{className:"flex-1 min-h-0 bg-gray-50",children:b?d.jsx("div",{className:"flex items-center justify-center h-full",children:d.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}):h?d.jsx(d.Fragment,{children:T&&D&&!U?d.jsxs("div",{className:"flex flex-col h-full p-6",children:[d.jsxs("div",{className:"mb-4 flex-shrink-0",children:[d.jsx("h3",{className:"text-lg font-medium mb-2",children:o("log_viewer.request_groups")}),d.jsxs("p",{className:"text-sm text-gray-600",children:[o("log_viewer.total_requests"),": ",D.summary.totalRequests," |",o("log_viewer.total_logs"),": ",D.summary.totalLogs]})]}),d.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto space-y-3",children:D.summary.requests.map(ae=>d.jsxs("div",{className:"border rounded-lg p-4 hover:bg-gray-50 cursor-pointer transition-colors",onClick:()=>ye(ae.reqId),children:[d.jsxs("div",{className:"flex items-center justify-between mb-2",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Nd,{className:"h-5 w-5 text-blue-600"}),d.jsx("span",{className:"font-medium text-sm",children:ae.reqId}),ae.model&&d.jsx("span",{className:"text-xs bg-green-100 text-green-800 px-2 py-1 rounded",children:ae.model})]}),d.jsxs("span",{className:"text-xs bg-blue-100 text-blue-800 px-2 py-1 rounded",children:[ae.logCount," ",o("log_viewer.logs")]})]}),d.jsxs("div",{className:"text-xs text-gray-500 space-y-1",children:[d.jsxs("div",{children:[o("log_viewer.first_log"),": ",H(ae.firstLog)]}),d.jsxs("div",{children:[o("log_viewer.last_log"),": ",H(ae.lastLog)]})]})]},ae.reqId))})]}):d.jsx("div",{className:"relative h-full",children:d.jsx(Dc,{height:"100%",defaultLanguage:"json",value:he(),theme:"vs",options:{minimap:{enabled:!0},fontSize:14,scrollBeyondLastLine:!1,automaticLayout:!0,wordWrap:"on",readOnly:!0,lineNumbers:"on",folding:!0,renderWhitespace:"all",glyphMargin:!0},onMount:ze})})}):d.jsxs("div",{className:"p-6",children:[d.jsx("h3",{className:"text-lg font-medium mb-4",children:o("log_viewer.select_file")}),m.length===0?d.jsxs("div",{className:"text-gray-500 text-center py-8",children:[d.jsx(Nd,{className:"h-12 w-12 mx-auto mb-4 text-gray-400"}),d.jsx("p",{children:o("log_viewer.no_log_files_available")})]}):d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:m.map(ae=>d.jsxs("div",{className:"border rounded-lg p-4 hover:bg-gray-50 cursor-pointer transition-colors",onClick:()=>I(ae),children:[d.jsx("div",{className:"flex items-start justify-between mb-2",children:d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Nd,{className:"h-5 w-5 text-blue-600"}),d.jsx("span",{className:"font-medium text-sm",children:ae.name})]})}),d.jsxs("div",{className:"text-xs text-gray-500 space-y-1",children:[d.jsx("div",{children:Y(ae.size)}),d.jsx("div",{children:H(ae.lastModified)})]})]},ae.path))})]})})]})]})}function SM({message:n,type:a,onClose:l}){y.useEffect(()=>{const c=setTimeout(()=>{l()},3e3);return()=>clearTimeout(c)},[l]);const o=()=>{switch(a){case"success":return d.jsx(aj,{className:"h-5 w-5 text-green-500"});case"error":return d.jsx(Ob,{className:"h-5 w-5 text-red-500"});case"warning":return d.jsx(WC,{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 d.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:[d.jsxs("div",{className:"flex items-center space-x-2",children:[o(),d.jsx("span",{className:"text-sm font-medium",children:n})]}),d.jsx("button",{onClick:l,className:"ml-4 text-gray-500 hover:text-gray-700 focus:outline-none",children:d.jsx(cr,{className:"h-4 w-4"})})]})}function _M(){const{t:n,i18n:a}=Ma(),l=ao(),{config:o,error:s}=nl(),[c,f]=y.useState(!1),[m,g]=y.useState(!1),[h,v]=y.useState(!1),[b,w]=y.useState(!0),[S,N]=y.useState(null),[E,R]=y.useState(!1),[C,A]=y.useState(!1),[T,k]=y.useState(null),[D,j]=y.useState(!1),[U,B]=y.useState(!1),W=y.useRef(!1),ne=async()=>{if(!o){N({message:n("app.config_missing"),type:"error"});return}try{const X=await Ht.updateConfig(o);if(console.log("Config saved successfully"),X&&typeof X=="object"&&"success"in X){const te=X;te.success?N({message:te.message||n("app.config_saved_success"),type:"success"}):N({message:te.message||n("app.config_saved_failed"),type:"error"})}else N({message:n("app.config_saved_success"),type:"success"})}catch(X){console.error("Failed to save config:",X),N({message:n("app.config_saved_failed")+": "+X.message,type:"error"})}},ee=async()=>{if(!o){N({message:n("app.config_missing"),type:"error"});return}try{const X=await Ht.updateConfig(o);let te=!0;if(X&&typeof X=="object"&&"success"in X){const O=X;O.success||(te=!1,N({message:O.message||n("app.config_saved_failed"),type:"error"}))}if(te){const O=await Ht.restartService();if(console.log("Config saved and service restarted successfully"),O&&typeof O=="object"&&"success"in O){const I=O;I.success&&N({message:I.message||n("app.config_saved_restart_success"),type:"success"})}else N({message:n("app.config_saved_restart_success"),type:"success"})}}catch(X){console.error("Failed to save config and restart:",X),N({message:n("app.config_saved_restart_failed")+": "+X.message,type:"error"})}},ie=y.useCallback(async(X=!0)=>{if(U&&E){X&&A(!0);return}j(!0);try{const te=await Ht.checkForUpdates();te.hasUpdate&&te.latestVersion&&te.changelog?(R(!0),k({version:te.latestVersion,changelog:te.changelog}),X&&A(!0)):X&&N({message:n("app.no_updates_available"),type:"success"}),B(!0)}catch(te){console.error("Failed to check for updates:",te),X&&N({message:n("app.update_check_failed")+": "+te.message,type:"error"})}finally{j(!1)}},[U,E,n]);y.useEffect(()=>{(async()=>{if(o){w(!1),!U&&!W.current&&(W.current=!0,ie(!1));return}if(!localStorage.getItem("apiKey")){w(!1);return}try{await Ht.getConfig()}catch(I){console.error("Error checking auth:",I),I.message==="Unauthorized"&&l("/login")}finally{w(!1),!U&&!W.current&&(W.current=!0,ie(!1))}})();const te=()=>{l("/login")};return window.addEventListener("unauthorized",te),()=>{window.removeEventListener("unauthorized",te)}},[o,l,U,ie]);const fe=async()=>{if(T)try{const X=await Ht.performUpdate();X.success?(N({message:n("app.update_successful"),type:"success"}),R(!1),A(!1),B(!1)):N({message:n("app.update_failed")+": "+X.message,type:"error"})}catch(X){console.error("Failed to perform update:",X),N({message:n("app.update_failed")+": "+X.message,type:"error"})}};return b?d.jsx("div",{className:"h-screen bg-gray-50 font-sans flex items-center justify-center",children:d.jsx("div",{className:"text-gray-500",children:"Loading application..."})}):s?d.jsx("div",{className:"h-screen bg-gray-50 font-sans flex items-center justify-center",children:d.jsxs("div",{className:"text-red-500",children:["Error: ",s.message]})}):o?d.jsxs("div",{className:"h-screen bg-gray-50 font-sans",children:[d.jsxs("header",{className:"flex h-16 items-center justify-between border-b bg-white px-6",children:[d.jsx("h1",{className:"text-xl font-semibold text-gray-800",children:n("app.title")}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(xe,{variant:"ghost",size:"icon",onClick:()=>f(!0),className:"transition-all-ease hover:scale-110",children:d.jsx(Lj,{className:"h-5 w-5"})}),d.jsx(xe,{variant:"ghost",size:"icon",onClick:()=>g(!0),className:"transition-all-ease hover:scale-110",children:d.jsx(gj,{className:"h-5 w-5"})}),d.jsx(xe,{variant:"ghost",size:"icon",onClick:()=>v(!0),className:"transition-all-ease hover:scale-110",children:d.jsx(yj,{className:"h-5 w-5"})}),d.jsxs(Xc,{children:[d.jsx(Qc,{asChild:!0,children:d.jsx(xe,{variant:"ghost",size:"icon",className:"transition-all-ease hover:scale-110",children:d.jsx(Sj,{className:"h-5 w-5"})})}),d.jsx(Zc,{className:"w-32 p-2",children:d.jsxs("div",{className:"space-y-1",children:[d.jsx(xe,{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"}),d.jsx(xe,{variant:a.language.startsWith("zh")?"default":"ghost",className:"w-full justify-start transition-all-ease hover:scale-[1.02]",onClick:()=>a.changeLanguage("zh"),children:"中文"})]})})]}),d.jsxs(xe,{variant:"ghost",size:"icon",onClick:()=>ie(!0),disabled:D,className:"transition-all-ease hover:scale-110 relative",children:[d.jsxs("div",{className:"relative",children:[d.jsx(tj,{className:"h-5 w-5"}),E&&!D&&d.jsx("div",{className:"absolute -top-1 -right-1 w-3 h-3 bg-red-500 rounded-full border-2 border-white"})]}),D&&d.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:d.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent"})})]}),d.jsxs(xe,{onClick:ne,variant:"outline",className:"transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:[d.jsx(Ab,{className:"mr-2 h-4 w-4"}),n("app.save")]}),d.jsxs(xe,{onClick:ee,className:"transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:[d.jsx(Th,{className:"mr-2 h-4 w-4"}),n("app.save_and_restart")]})]})]}),d.jsxs("main",{className:"flex h-[calc(100vh-4rem)] gap-4 p-4 overflow-hidden",children:[d.jsx("div",{className:"w-3/5",children:d.jsx(hT,{})}),d.jsxs("div",{className:"flex w-2/5 flex-col gap-4",children:[d.jsx("div",{className:"h-3/5",children:d.jsx(mT,{})}),d.jsx("div",{className:"flex-1 overflow-hidden",children:d.jsx(uT,{})})]})]}),d.jsx(sT,{isOpen:c,onOpenChange:f}),d.jsx(xM,{open:m,onOpenChange:g,showToast:(X,te)=>N({message:X,type:te})}),d.jsx(wM,{open:h,onOpenChange:v,showToast:(X,te)=>N({message:X,type:te})}),d.jsx(Qr,{open:C,onOpenChange:A,children:d.jsxs(dr,{className:"max-w-2xl",children:[d.jsxs(hr,{children:[d.jsxs(mr,{children:[n("app.new_version_available"),T&&d.jsxs("span",{className:"ml-2 text-sm font-normal text-muted-foreground",children:["v",T.version]})]}),d.jsx(qc,{children:n("app.update_description")})]}),d.jsx("div",{className:"max-h-96 overflow-y-auto py-4",children:T?.changelog?d.jsx("div",{className:"whitespace-pre-wrap text-sm",children:T.changelog}):d.jsx("div",{className:"text-muted-foreground",children:n("app.no_changelog_available")})}),d.jsxs(Zr,{children:[d.jsx(xe,{variant:"outline",onClick:()=>A(!1),children:n("app.later")}),d.jsx(xe,{onClick:fe,children:n("app.update_now")})]})]})}),S&&d.jsx(SM,{message:S.message,type:S.type,onClose:()=>N(null)})]}):d.jsx("div",{className:"h-screen bg-gray-50 font-sans flex items-center justify-center",children:d.jsx("div",{className:"text-gray-500",children:"Loading configuration..."})})}function EM(){const{t:n}=Ma(),a=ao(),[l,o]=y.useState(""),[s,c]=y.useState(""),[f,m]=y.useState(!1);y.useEffect(()=>{(async()=>{if(localStorage.getItem("apiKey")){m(!0);try{await Ht.getConfig(),a("/dashboard")}catch{localStorage.removeItem("apiKey")}finally{m(!1)}}})();const v=()=>{a("/login")};return window.addEventListener("unauthorized",v),()=>{window.removeEventListener("unauthorized",v)}},[a]);const g=async h=>{h.preventDefault();try{Ht.setApiKey(l),window.dispatchEvent(new StorageEvent("storage",{key:"apiKey",newValue:l,url:window.location.href})),await Ht.getConfig(),a("/dashboard")}catch(v){Ht.setApiKey(""),v.message&&v.message.includes("401")?c(n("login.invalidApiKey")):a("/dashboard")}};return f?d.jsx("div",{className:"flex min-h-screen items-center justify-center bg-gray-50",children:d.jsxs(Ra,{className:"w-full max-w-md",children:[d.jsx(Oa,{className:"space-y-1",children:d.jsx(Aa,{className:"text-2xl",children:n("login.title")})}),d.jsxs(Ta,{children:[d.jsx("div",{className:"flex justify-center py-8",children:d.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent"})}),d.jsx("p",{className:"text-center text-sm text-gray-500",children:n("login.validating")})]})]})}):d.jsx("div",{className:"flex min-h-screen items-center justify-center bg-gray-50",children:d.jsxs(Ra,{className:"w-full max-w-md",children:[d.jsxs(Oa,{className:"space-y-1",children:[d.jsx(Aa,{className:"text-2xl",children:n("login.title")}),d.jsx(Jx,{children:n("login.description")})]}),d.jsxs("form",{onSubmit:g,children:[d.jsxs(Ta,{className:"space-y-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ze,{htmlFor:"apiKey",children:n("login.apiKey")}),d.jsx(vt,{id:"apiKey",type:"password",value:l,onChange:h=>o(h.target.value),placeholder:n("login.apiKeyPlaceholder")})]}),s&&d.jsx("div",{className:"text-sm text-red-500",children:s})]}),d.jsx(Wx,{children:d.jsx(xe,{className:"w-full",type:"submit",children:n("login.signIn")})})]})]})})}class NM{DB_NAME="RequestHistoryDB";STORE_NAME="requests";VERSION=1;async openDB(){return new Promise((a,l)=>{const o=indexedDB.open(this.DB_NAME,this.VERSION);o.onerror=()=>l(o.error),o.onsuccess=()=>a(o.result),o.onupgradeneeded=s=>{const c=s.target.result;if(!c.objectStoreNames.contains(this.STORE_NAME)){const f=c.createObjectStore(this.STORE_NAME,{keyPath:"id"});f.createIndex("timestamp","timestamp",{unique:!1}),f.createIndex("url","url",{unique:!1}),f.createIndex("method","method",{unique:!1})}}})}async saveRequest(a){const l=await this.openDB(),o={...a,id:Date.now().toString(),timestamp:new Date().toISOString()};return new Promise((s,c)=>{const g=l.transaction([this.STORE_NAME],"readwrite").objectStore(this.STORE_NAME).add(o);g.onsuccess=()=>s(),g.onerror=()=>c(g.error)})}async getRequests(a=50){const l=await this.openDB();return new Promise((o,s)=>{const g=l.transaction([this.STORE_NAME],"readonly").objectStore(this.STORE_NAME).index("timestamp").openCursor(null,"prev"),h=[];g.onsuccess=v=>{const b=v.target.result;b&&h.length<a?(h.push(b.value),b.continue()):o(h)},g.onerror=()=>s(g.error)})}async deleteRequest(a){const l=await this.openDB();return new Promise((o,s)=>{const m=l.transaction([this.STORE_NAME],"readwrite").objectStore(this.STORE_NAME).delete(a);m.onsuccess=()=>o(),m.onerror=()=>s(m.error)})}async clearAllRequests(){const a=await this.openDB();return new Promise((l,o)=>{const f=a.transaction([this.STORE_NAME],"readwrite").objectStore(this.STORE_NAME).clear();f.onsuccess=()=>l(),f.onerror=()=>o(f.error)})}}const xc=new NM;function CM({isOpen:n,onClose:a,onSelectRequest:l}){const[o,s]=y.useState([]),[c,f]=y.useState(!0);y.useEffect(()=>{n&&m()},[n]);const m=async()=>{try{f(!0);const b=await xc.getRequests();s(b)}catch(b){console.error("Failed to load request history:",b)}finally{f(!1)}},g=async(b,w)=>{w.stopPropagation();try{await xc.deleteRequest(b),s(S=>S.filter(N=>N.id!==b))}catch(S){console.error("Failed to delete request:",S)}},h=async()=>{if(window.confirm("确定要清空所有请求历史吗?"))try{await xc.clearAllRequests(),s([])}catch(b){console.error("Failed to clear request history:",b)}},v=b=>{const w=new Date(b),N=new Date().getTime()-w.getTime(),E=Math.floor(N/6e4);return E<1?"刚刚":E<60?`${E}分钟前`:E<1440?`${Math.floor(E/60)}小时前`:w.toLocaleDateString()};return n?d.jsxs("div",{className:"fixed inset-0 z-50",children:[d.jsx("div",{className:"absolute inset-0 bg-black bg-opacity-50",onClick:a}),d.jsxs("div",{className:"absolute right-0 top-0 h-full w-96 bg-white shadow-xl flex flex-col",children:[d.jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Qd,{className:"h-5 w-5"}),d.jsx("h2",{className:"text-lg font-semibold",children:"请求历史"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs(xe,{variant:"outline",size:"sm",onClick:h,disabled:o.length===0,children:[d.jsx(na,{className:"h-4 w-4 mr-1"}),"清空"]}),d.jsx(xe,{variant:"ghost",size:"sm",onClick:a,children:d.jsx(cr,{className:"h-4 w-4"})})]})]}),d.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:c?d.jsx("div",{className:"flex items-center justify-center h-32 text-gray-500",children:"加载中..."}):o.length>0?d.jsx("div",{className:"space-y-2",children:o.map(b=>d.jsxs("div",{className:"p-3 bg-gray-50 rounded-lg border cursor-pointer hover:bg-gray-100 transition-colors",onClick:()=>{l(b),a()},children:[d.jsxs("div",{className:"flex items-center justify-between mb-2",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"font-mono text-xs bg-gray-200 px-2 py-1 rounded",children:b.method}),d.jsx("span",{className:"text-sm font-medium truncate flex-1",children:b.url})]}),d.jsx(xe,{variant:"ghost",size:"sm",onClick:w=>g(b.id,w),className:"h-6 w-6 p-0",children:d.jsx(na,{className:"h-3 w-3"})})]}),d.jsxs("div",{className:"flex items-center justify-between text-xs text-gray-500",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:`font-mono px-1 rounded ${b.status>=200&&b.status<300?"bg-green-100 text-green-800":b.status>=400?"bg-red-100 text-red-800":"bg-yellow-100 text-yellow-800"}`,children:b.status}),d.jsxs("span",{children:[b.responseTime,"ms"]})]}),d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx(oj,{className:"h-3 w-3"}),d.jsx("span",{children:v(b.timestamp)})]})]})]},b.id))}):d.jsxs("div",{className:"text-center text-gray-500 py-8",children:[d.jsx(Qd,{className:"h-12 w-12 mx-auto mb-4 text-gray-300"}),d.jsx("p",{children:"暂无请求历史"}),d.jsx("p",{className:"text-sm mt-2",children:"发送请求后会在此显示历史记录"})]})})]})]}):null}function Na(n,a,{checkForDefaultPrevented:l=!0}={}){return function(s){if(n?.(s),l===!1||!s.defaultPrevented)return a?.(s)}}function jM(n){const a=n+"CollectionProvider",[l,o]=tl(a),[s,c]=l(a,{collectionRef:{current:null},itemMap:new Map}),f=E=>{const{scope:R,children:C}=E,A=nt.useRef(null),T=nt.useRef(new Map).current;return d.jsx(s,{scope:R,itemMap:T,collectionRef:A,children:C})};f.displayName=a;const m=n+"CollectionSlot",g=Wl(m),h=nt.forwardRef((E,R)=>{const{scope:C,children:A}=E,T=c(m,C),k=Gt(R,T.collectionRef);return d.jsx(g,{ref:k,children:A})});h.displayName=m;const v=n+"CollectionItemSlot",b="data-radix-collection-item",w=Wl(v),S=nt.forwardRef((E,R)=>{const{scope:C,children:A,...T}=E,k=nt.useRef(null),D=Gt(R,k),j=c(v,C);return nt.useEffect(()=>(j.itemMap.set(k,{ref:k,...T}),()=>void j.itemMap.delete(k))),d.jsx(w,{[b]:"",ref:D,children:A})});S.displayName=v;function N(E){const R=c(n+"CollectionConsumer",E);return nt.useCallback(()=>{const A=R.collectionRef.current;if(!A)return[];const T=Array.from(A.querySelectorAll(`[${b}]`));return Array.from(R.itemMap.values()).sort((j,U)=>T.indexOf(j.ref.current)-T.indexOf(U.ref.current))},[R.collectionRef,R.itemMap])}return[{Provider:f,Slot:h,ItemSlot:S},N,o]}var RM=y.createContext(void 0);function s1(n){const a=y.useContext(RM);return n||a||"ltr"}var Ud="rovingFocusGroup.onEntryFocus",OM={bubbles:!1,cancelable:!0},zi="RovingFocusGroup",[fh,c1,AM]=jM(zi),[TM,u1]=tl(zi,[AM]),[MM,DM]=TM(zi),f1=y.forwardRef((n,a)=>d.jsx(fh.Provider,{scope:n.__scopeRovingFocusGroup,children:d.jsx(fh.Slot,{scope:n.__scopeRovingFocusGroup,children:d.jsx(LM,{...n,ref:a})})}));f1.displayName=zi;var LM=y.forwardRef((n,a)=>{const{__scopeRovingFocusGroup:l,orientation:o,loop:s=!1,dir:c,currentTabStopId:f,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:g,onEntryFocus:h,preventScrollOnEntryFocus:v=!1,...b}=n,w=y.useRef(null),S=Gt(a,w),N=s1(c),[E,R]=Ti({prop:f,defaultProp:m??null,onChange:g,caller:zi}),[C,A]=y.useState(!1),T=Ir(h),k=c1(l),D=y.useRef(!1),[j,U]=y.useState(0);return y.useEffect(()=>{const B=w.current;if(B)return B.addEventListener(Ud,T),()=>B.removeEventListener(Ud,T)},[T]),d.jsx(MM,{scope:l,orientation:o,dir:N,loop:s,currentTabStopId:E,onItemFocus:y.useCallback(B=>R(B),[R]),onItemShiftTab:y.useCallback(()=>A(!0),[]),onFocusableItemAdd:y.useCallback(()=>U(B=>B+1),[]),onFocusableItemRemove:y.useCallback(()=>U(B=>B-1),[]),children:d.jsx(lt.div,{tabIndex:C||j===0?-1:0,"data-orientation":o,...b,ref:S,style:{outline:"none",...n.style},onMouseDown:Na(n.onMouseDown,()=>{D.current=!0}),onFocus:Na(n.onFocus,B=>{const W=!D.current;if(B.target===B.currentTarget&&W&&!C){const ne=new CustomEvent(Ud,OM);if(B.currentTarget.dispatchEvent(ne),!ne.defaultPrevented){const ee=k().filter(O=>O.focusable),ie=ee.find(O=>O.active),fe=ee.find(O=>O.id===E),te=[ie,fe,...ee].filter(Boolean).map(O=>O.ref.current);m1(te,v)}}D.current=!1}),onBlur:Na(n.onBlur,()=>A(!1))})})}),d1="RovingFocusGroupItem",h1=y.forwardRef((n,a)=>{const{__scopeRovingFocusGroup:l,focusable:o=!0,active:s=!1,tabStopId:c,children:f,...m}=n,g=Tn(),h=c||g,v=DM(d1,l),b=v.currentTabStopId===h,w=c1(l),{onFocusableItemAdd:S,onFocusableItemRemove:N,currentTabStopId:E}=v;return y.useEffect(()=>{if(o)return S(),()=>N()},[o,S,N]),d.jsx(fh.ItemSlot,{scope:l,id:h,focusable:o,active:s,children:d.jsx(lt.span,{tabIndex:b?0:-1,"data-orientation":v.orientation,...m,ref:a,onMouseDown:Na(n.onMouseDown,R=>{o?v.onItemFocus(h):R.preventDefault()}),onFocus:Na(n.onFocus,()=>v.onItemFocus(h)),onKeyDown:Na(n.onKeyDown,R=>{if(R.key==="Tab"&&R.shiftKey){v.onItemShiftTab();return}if(R.target!==R.currentTarget)return;const C=UM(R,v.orientation,v.dir);if(C!==void 0){if(R.metaKey||R.ctrlKey||R.altKey||R.shiftKey)return;R.preventDefault();let T=w().filter(k=>k.focusable).map(k=>k.ref.current);if(C==="last")T.reverse();else if(C==="prev"||C==="next"){C==="prev"&&T.reverse();const k=T.indexOf(R.currentTarget);T=v.loop?PM(T,k+1):T.slice(k+1)}setTimeout(()=>m1(T))}}),children:typeof f=="function"?f({isCurrentTabStop:b,hasTabStop:E!=null}):f})})});h1.displayName=d1;var kM={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function zM(n,a){return a!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}function UM(n,a,l){const o=zM(n.key,l);if(!(a==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(a==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return kM[o]}function m1(n,a=!1){const l=document.activeElement;for(const o of n)if(o===l||(o.focus({preventScroll:a}),document.activeElement!==l))return}function PM(n,a){return n.map((l,o)=>n[(a+o)%n.length])}var HM=f1,BM=h1;function $M(n,a){return y.useReducer((l,o)=>a[l][o]??l,n)}var p1=n=>{const{present:a,children:l}=n,o=qM(a),s=typeof l=="function"?l({present:o.isPresent}):y.Children.only(l),c=Gt(o.ref,FM(s));return typeof l=="function"||o.isPresent?y.cloneElement(s,{ref:c}):null};p1.displayName="Presence";function qM(n){const[a,l]=y.useState(),o=y.useRef(null),s=y.useRef(n),c=y.useRef("none"),f=n?"mounted":"unmounted",[m,g]=$M(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const h=dc(o.current);c.current=m==="mounted"?h:"none"},[m]),ta(()=>{const h=o.current,v=s.current;if(v!==n){const w=c.current,S=dc(h);n?g("MOUNT"):S==="none"||h?.display==="none"?g("UNMOUNT"):g(v&&w!==S?"ANIMATION_OUT":"UNMOUNT"),s.current=n}},[n,g]),ta(()=>{if(a){let h;const v=a.ownerDocument.defaultView??window,b=S=>{const E=dc(o.current).includes(CSS.escape(S.animationName));if(S.target===a&&E&&(g("ANIMATION_END"),!s.current)){const R=a.style.animationFillMode;a.style.animationFillMode="forwards",h=v.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=R)})}},w=S=>{S.target===a&&(c.current=dc(o.current))};return a.addEventListener("animationstart",w),a.addEventListener("animationcancel",b),a.addEventListener("animationend",b),()=>{v.clearTimeout(h),a.removeEventListener("animationstart",w),a.removeEventListener("animationcancel",b),a.removeEventListener("animationend",b)}}else g("ANIMATION_END")},[a,g]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:y.useCallback(h=>{o.current=h?getComputedStyle(h):null,l(h)},[])}}function dc(n){return n?.animationName||"none"}function FM(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 eu="Tabs",[VM,eD]=tl(eu,[u1]),g1=u1(),[GM,Yh]=VM(eu),v1=y.forwardRef((n,a)=>{const{__scopeTabs:l,value:o,onValueChange:s,defaultValue:c,orientation:f="horizontal",dir:m,activationMode:g="automatic",...h}=n,v=s1(m),[b,w]=Ti({prop:o,onChange:s,defaultProp:c??"",caller:eu});return d.jsx(GM,{scope:l,baseId:Tn(),value:b,onValueChange:w,orientation:f,dir:v,activationMode:g,children:d.jsx(lt.div,{dir:v,"data-orientation":f,...h,ref:a})})});v1.displayName=eu;var y1="TabsList",b1=y.forwardRef((n,a)=>{const{__scopeTabs:l,loop:o=!0,...s}=n,c=Yh(y1,l),f=g1(l);return d.jsx(HM,{asChild:!0,...f,orientation:c.orientation,dir:c.dir,loop:o,children:d.jsx(lt.div,{role:"tablist","aria-orientation":c.orientation,...s,ref:a})})});b1.displayName=y1;var x1="TabsTrigger",w1=y.forwardRef((n,a)=>{const{__scopeTabs:l,value:o,disabled:s=!1,...c}=n,f=Yh(x1,l),m=g1(l),g=E1(f.baseId,o),h=N1(f.baseId,o),v=o===f.value;return d.jsx(BM,{asChild:!0,...m,focusable:!s,active:v,children:d.jsx(lt.button,{type:"button",role:"tab","aria-selected":v,"aria-controls":h,"data-state":v?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:g,...c,ref:a,onMouseDown:Na(n.onMouseDown,b=>{!s&&b.button===0&&b.ctrlKey===!1?f.onValueChange(o):b.preventDefault()}),onKeyDown:Na(n.onKeyDown,b=>{[" ","Enter"].includes(b.key)&&f.onValueChange(o)}),onFocus:Na(n.onFocus,()=>{const b=f.activationMode!=="manual";!v&&!s&&b&&f.onValueChange(o)})})})});w1.displayName=x1;var S1="TabsContent",_1=y.forwardRef((n,a)=>{const{__scopeTabs:l,value:o,forceMount:s,children:c,...f}=n,m=Yh(S1,l),g=E1(m.baseId,o),h=N1(m.baseId,o),v=o===m.value,b=y.useRef(v);return y.useEffect(()=>{const w=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(w)},[]),d.jsx(p1,{present:s||v,children:({present:w})=>d.jsx(lt.div,{"data-state":v?"active":"inactive","data-orientation":m.orientation,role:"tabpanel","aria-labelledby":g,hidden:!w,id:h,tabIndex:0,...f,ref:a,style:{...n.style,animationDuration:b.current?"0s":void 0},children:w&&c})})});_1.displayName=S1;function E1(n,a){return`${n}-trigger-${a}`}function N1(n,a){return`${n}-content-${a}`}var YM=v1,C1=b1,j1=w1,R1=_1;const u0=YM,dh=y.forwardRef(({className:n,...a},l)=>d.jsx(C1,{ref:l,className:it("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",n),...a}));dh.displayName=C1.displayName;const gi=y.forwardRef(({className:n,...a},l)=>d.jsx(j1,{ref:l,className:it("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",n),...a}));gi.displayName=j1.displayName;const vi=y.forwardRef(({className:n,...a},l)=>d.jsx(R1,{ref:l,className:it("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",n),...a}));vi.displayName=R1.displayName;function KM(){const n=ao(),a=La(),[l,o]=y.useState({url:"",method:"POST",headers:"{}",body:"{}"}),[s,c]=y.useState({status:0,responseTime:0,body:"",headers:"{}"}),[f,m]=y.useState(!1),[g,h]=y.useState(!1),[v,b]=y.useState(null),w=y.useRef(null),S=y.useRef(null),N=A=>{b(v!==A?A:null),setTimeout(()=>{w.current&&w.current.layout(),S.current&&S.current.layout()},300)};y.useEffect(()=>{const T=new URLSearchParams(a.search).get("logData");if(T)try{const k=JSON.parse(decodeURIComponent(T)),D=k.url||k.requestUrl||k.endpoint||"",j=(k.method||k.requestMethod||"POST").toUpperCase();let U={};if(k.headers)if(typeof k.headers=="string")try{U=JSON.parse(k.headers)}catch{k.headers.split(`
431
+ `).forEach(ee=>{const[ie,...fe]=ee.split(":");ie&&fe.length>0&&(U[ie.trim()]=fe.join(":").trim())})}else U=k.headers;let B={},W=null;if(k.body?W=k.body:k.request&&k.request.body&&(W=k.request.body),W)if(typeof W=="string")try{B=JSON.parse(W)}catch{const ne=W.trim();ne.startsWith("{")||ne.startsWith("[")?B={raw:W}:B={content:W}}else typeof W=="object"?B=W:B={content:String(W)};o({url:D,method:j,headers:JSON.stringify(U,null,2),body:JSON.stringify(B,null,2)}),console.log("Log data parsed successfully:",{url:D,method:j,headers:U,body:B})}catch(k){console.error("Failed to parse log data:",k),console.error("Raw log data:",T)}},[a.search]);const E=async()=>{try{m(!0);const A=JSON.parse(l.headers),T=JSON.parse(l.body),k=Date.now(),D=await fetch(l.url,{method:l.method,headers:{"Content-Type":"application/json",...A},body:l.method!=="GET"?JSON.stringify(T):void 0}),U=Date.now()-k,B={};D.headers.forEach((ie,fe)=>{B[fe]=ie});const W=await D.text();let ne=W;try{const ie=JSON.parse(W);ne=JSON.stringify(ie,null,2)}catch{}const ee=JSON.stringify(B,null,2);c({status:D.status,responseTime:U,body:ne,headers:ee}),await xc.saveRequest({url:l.url,method:l.method,headers:l.headers,body:l.body,status:D.status,responseTime:U,responseBody:ne,responseHeaders:ee})}catch(A){console.error("Request failed:",A),c({status:0,responseTime:0,body:`请求失败: ${A instanceof Error?A.message:"未知错误"}`,headers:"{}"})}finally{m(!1)}},R=A=>{o({url:A.url,method:A.method,headers:A.headers,body:A.body}),c({status:A.status,responseTime:A.responseTime,body:A.responseBody,headers:A.responseHeaders})},C=()=>{try{const A=JSON.parse(l.headers),T=JSON.parse(l.body);let k=`curl -X ${l.method} "${l.url}"`;Object.entries(A).forEach(([D,j])=>{k+=` \\
432
+ -H "${D}: ${j}"`}),l.method!=="GET"&&Object.keys(T).length>0&&(k+=` \\
433
+ -d '${JSON.stringify(T)}'`),navigator.clipboard.writeText(k),alert("cURL命令已复制到剪贴板")}catch(A){console.error("Failed to copy cURL:",A),alert("复制cURL命令失败")}};return d.jsxs("div",{className:"h-screen bg-gray-50 font-sans",children:[d.jsxs("header",{className:"flex h-16 items-center justify-between border-b bg-white px-6",children:[d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsxs(xe,{variant:"ghost",size:"sm",onClick:()=>n("/dashboard"),children:[d.jsx(Cb,{className:"h-4 w-4 mr-2"}),"返回"]}),d.jsx("h1",{className:"text-xl font-semibold text-gray-800",children:"HTTP 调试器"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs(xe,{variant:"outline",onClick:()=>h(!0),children:[d.jsx(Qd,{className:"h-4 w-4 mr-2"}),"历史记录"]}),d.jsxs(xe,{variant:"outline",onClick:C,children:[d.jsx(sj,{className:"h-4 w-4 mr-2"}),"复制 cURL"]})]})]}),d.jsxs("main",{className:"flex h-[calc(100vh-4rem)] flex-col gap-4 p-4 overflow-hidden",children:[d.jsx("div",{className:"h-1/2 flex flex-col gap-4",children:d.jsxs("div",{className:"bg-white rounded-lg border p-4 flex-1 flex flex-col",children:[d.jsx("h3",{className:"font-medium mb-4",children:"请求参数配置"}),d.jsxs("div",{className:"flex flex-col gap-4 flex-1",children:[d.jsxs("div",{className:"flex gap-4 items-end",children:[d.jsxs("div",{className:"w-32",children:[d.jsx("label",{className:"block text-sm font-medium mb-1",children:"Method"}),d.jsxs("select",{className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background 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",value:l.method,onChange:A=>o(T=>({...T,method:A.target.value})),children:[d.jsx("option",{value:"GET",children:"GET"}),d.jsx("option",{value:"POST",children:"POST"}),d.jsx("option",{value:"PUT",children:"PUT"}),d.jsx("option",{value:"DELETE",children:"DELETE"}),d.jsx("option",{value:"PATCH",children:"PATCH"})]})]}),d.jsxs("div",{className:"flex-1",children:[d.jsx("label",{className:"block text-sm font-medium mb-1",children:"URL"}),d.jsx("input",{type:"text",className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background 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",value:l.url,onChange:A=>o(T=>({...T,url:A.target.value})),placeholder:"https://api.example.com/endpoint"})]}),d.jsx(xe,{variant:f?"destructive":"default",onClick:f?()=>{}:E,disabled:f||!l.url.trim(),children:f?d.jsxs(d.Fragment,{children:[d.jsx(zj,{className:"h-4 w-4 mr-2"}),"请求中..."]}):d.jsxs(d.Fragment,{children:[d.jsx(Mj,{className:"h-4 w-4 mr-2"}),"发送请求"]})})]}),d.jsx("div",{className:"flex-1",children:d.jsxs(u0,{defaultValue:"headers",className:"h-full flex flex-col",children:[d.jsxs(dh,{className:"grid w-full grid-cols-2",children:[d.jsx(gi,{value:"headers",children:"Headers"}),d.jsx(gi,{value:"body",children:"Body"})]}),d.jsx(vi,{value:"headers",className:"flex-1 mt-2",children:d.jsxs("div",{className:`${v==="headers"?"":"h-full"} flex flex-col ${v==="headers"?"fixed bg-white w-[100vw] h-[100vh] z-[9999] top-0 left-0 p-4":""}`,children:[d.jsxs("div",{className:"flex items-center justify-between mb-2",children:[d.jsx("label",{className:"block text-sm font-medium",children:"Headers (JSON)"}),d.jsxs(xe,{variant:"ghost",size:"sm",onClick:()=>N("headers"),children:[d.jsx(Ly,{className:"h-4 w-4 mr-1"}),v==="headers"?"退出全屏":"全屏"]})]}),d.jsx("div",{id:"fullscreen-headers",className:`${v==="headers"?"h-full":"flex-1"} border border-gray-300 rounded-md overflow-hidden relative`,children:d.jsx(Dc,{height:"100%",language:"json",value:l.headers,onChange:A=>o(T=>({...T,headers:A||"{}"})),onMount:A=>{w.current=A},options:{minimap:{enabled:v==="headers"},scrollBeyondLastLine:!1,fontSize:14,lineNumbers:"on",wordWrap:"on",automaticLayout:!0,formatOnPaste:!0,formatOnType:!0}})})]})}),d.jsx(vi,{value:"body",className:"flex-1 mt-2",children:d.jsxs("div",{className:`${v==="body"?"":"h-full"} flex flex-col ${v==="body"?"fixed bg-white w-[100vw] h-[100vh] z-[9999] top-0 left-0 p-4":""}`,children:[d.jsxs("div",{className:"flex items-center justify-between mb-2",children:[d.jsx("label",{className:"block text-sm font-medium",children:"Body (JSON)"}),d.jsxs(xe,{variant:"ghost",size:"sm",onClick:()=>N("body"),children:[d.jsx(Ly,{className:"h-4 w-4 mr-1"}),v==="body"?"退出全屏":"全屏"]})]}),d.jsx("div",{id:"fullscreen-body",className:`${v==="body"?"h-full":"flex-1"} border border-gray-300 rounded-md overflow-hidden relative`,children:d.jsx(Dc,{height:"100%",language:"json",value:l.body,onChange:A=>o(T=>({...T,body:A||"{}"})),onMount:A=>{S.current=A},options:{minimap:{enabled:v==="body"},scrollBeyondLastLine:!1,fontSize:14,lineNumbers:"on",wordWrap:"on",automaticLayout:!0,formatOnPaste:!0,formatOnType:!0}})})]})})]})})]})]})}),d.jsx("div",{className:"h-1/2 flex flex-col gap-4",children:d.jsxs("div",{className:"flex-1 bg-white rounded-lg border p-4 flex flex-col",children:[d.jsxs("div",{className:"flex items-center justify-between mb-4",children:[d.jsx("h3",{className:"font-medium",children:"响应信息"}),s.status>0&&d.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[d.jsxs("span",{className:"flex items-center gap-1",children:["状态码: ",d.jsx("span",{className:`font-mono px-2 py-1 rounded ${s.status>=200&&s.status<300?"bg-green-100 text-green-800":s.status>=400?"bg-red-100 text-red-800":"bg-yellow-100 text-yellow-800"}`,children:s.status})]}),d.jsxs("span",{children:["响应时间: ",d.jsxs("span",{className:"font-mono",children:[s.responseTime,"ms"]})]})]})]}),s.body?d.jsx("div",{className:"flex-1",children:d.jsxs(u0,{defaultValue:"body",className:"h-full flex flex-col",children:[d.jsxs(dh,{className:"grid w-full grid-cols-2",children:[d.jsx(gi,{value:"body",children:"响应体"}),d.jsx(gi,{value:"headers",children:"响应头"})]}),d.jsx(vi,{value:"body",className:"flex-1 mt-2",children:d.jsx("div",{className:"bg-gray-50 border rounded-md p-3 h-full overflow-auto",children:d.jsx("pre",{className:"text-sm whitespace-pre-wrap",children:s.body})})}),d.jsx(vi,{value:"headers",className:"flex-1 mt-2",children:d.jsx("div",{className:"bg-gray-50 border rounded-md p-3 h-full overflow-auto",children:d.jsx("pre",{className:"text-sm",children:s.headers})})})]})}):d.jsx("div",{className:"flex-1 flex items-center justify-center text-gray-500",children:f?"发送请求中...":"发送请求后将在此显示响应"})]})})]}),d.jsx(CM,{isOpen:g,onClose:()=>h(!1),onSelectRequest:R})]})}const f0=({children:n})=>n,IM=({children:n})=>n,XM=RN([{path:"/",element:d.jsx(DN,{to:"/dashboard",replace:!0})},{path:"/login",element:d.jsx(IM,{children:d.jsx(EM,{})})},{path:"/dashboard",element:d.jsx(f0,{children:d.jsx(_M,{})})},{path:"/debug",element:d.jsx(f0,{children:d.jsx(KM,{})})}],{initialEntries:["/dashboard"]});sE.createRoot(document.getElementById("root")).render(d.jsx(y.StrictMode,{children:d.jsx(kA,{children:d.jsx(h2,{router:XM})})}));</script>
434
+ <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-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-orange-400:oklch(75% .183 55.934);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-800:oklch(47.6% .114 61.907);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-800:oklch(44.8% .119 151.328);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-500:oklch(71.5% .143 215.221);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-500:oklch(62.7% .265 303.9);--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-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--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-gray-900:oklch(21% .034 264.665);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--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)}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background-color:#0000;border-radius:4px}::-webkit-scrollbar-thumb{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){::-webkit-scrollbar-thumb{background-color:color-mix(in oklab,var(--muted-foreground)30%,transparent)}}::-webkit-scrollbar-thumb{border-radius:4px;transition:background-color .2s}::-webkit-scrollbar-thumb:hover{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){::-webkit-scrollbar-thumb:hover{background-color:color-mix(in oklab,var(--muted-foreground)50%,transparent)}}::-webkit-scrollbar-corner{background-color:#0000}*{scrollbar-width:thin;scrollbar-color:oklch(55.6% 0 0) oklch(97% 0 0)}.dark *{scrollbar-color:oklch(70.8% 0 0) oklch(26.9% 0 0)}}@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-1{top:calc(var(--spacing)*-1)}.top-0{top:calc(var(--spacing)*0)}.top-1\/2{top:50%}.top-4{top:calc(var(--spacing)*4)}.top-\[50\%\]{top:50%}.-right-1{right:calc(var(--spacing)*-1)}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-4{right:calc(var(--spacing)*4)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.left-2\.5{left:calc(var(--spacing)*2.5)}.left-\[50\%\]{left:50%}.z-50{z-index:50}.z-\[9999\]{z-index:9999}.col-span-1{grid-column:span 1/span 1}.col-span-3{grid-column:span 3/span 3}.col-span-5{grid-column:span 5/span 5}.-mx-1{margin-inline:calc(var(--spacing)*-1)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-auto{margin-inline:auto}.mt-0\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-auto{margin-top:auto}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-2{margin-right:calc(var(--spacing)*2)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-3{margin-left:calc(var(--spacing)*3)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.h-1\/2{height:50%}.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-12{height:calc(var(--spacing)*12)}.h-16{height:calc(var(--spacing)*16)}.h-32{height:calc(var(--spacing)*32)}.h-\[90vh\]{height:90vh}.h-\[100vh\]{height:100vh}.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-72{max-height:calc(var(--spacing)*72)}.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-\[200px\]{min-height:200px}.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-12{width:calc(var(--spacing)*12)}.w-32{width:calc(var(--spacing)*32)}.w-48{width:calc(var(--spacing)*48)}.w-72{width:calc(var(--spacing)*72)}.w-96{width:calc(var(--spacing)*96)}.w-\[--radix-popover-trigger-width\]{width:--radix-popover-trigger-width}.w-\[100vw\]{width:100vw}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:calc(var(--spacing)*0)}.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-1\/2{--tw-translate-y: -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-move{cursor:move}.cursor-pointer{cursor:pointer}.scroll-py-1{scroll-padding-block:calc(var(--spacing)*1)}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.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-end{align-items:flex-end}.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-0{gap:calc(var(--spacing)*0)}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}: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-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*1)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-x-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)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.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-none{border-radius:0}.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-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-blue-200{border-color:var(--color-blue-200)}.border-blue-600{border-color:var(--color-blue-600)}.border-border{border-color:var(--border)}.border-current{border-color:currentColor}.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-gray-300{border-color:var(--color-gray-300)}.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-red-500{border-color:var(--color-red-500)}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.border-yellow-200{border-color:var(--color-yellow-200)}.border-t-transparent{border-top-color:#0000}.bg-background{background-color:var(--background)}.bg-black{background-color:var(--color-black)}.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-black\/90{background-color:#000000e6}@supports (color:color-mix(in lab,red,red)){.bg-black\/90{background-color:color-mix(in oklab,var(--color-black)90%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-300{background-color:var(--color-blue-300)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-border{background-color:var(--border)}.bg-card{background-color:var(--card)}.bg-cyan-300{background-color:var(--color-cyan-300)}.bg-cyan-500{background-color:var(--color-cyan-500)}.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-gray-200{background-color:var(--color-gray-200)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-400{background-color:var(--color-green-400)}.bg-green-600{background-color:var(--color-green-600)}.bg-muted{background-color:var(--muted)}.bg-orange-400{background-color:var(--color-orange-400)}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-purple-300{background-color:var(--color-purple-300)}.bg-purple-400{background-color:var(--color-purple-400)}.bg-purple-500{background-color:var(--color-purple-500)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-400{background-color:var(--color-red-400)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-600{background-color:var(--color-red-600)}.bg-secondary,.bg-secondary\/50{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.bg-secondary\/50{background-color:color-mix(in oklab,var(--secondary)50%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.bg-yellow-100{background-color:var(--color-yellow-100)}.bg-yellow-300{background-color:var(--color-yellow-300)}.bg-yellow-500{background-color:var(--color-yellow-500)}.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-1{padding-inline:calc(var(--spacing)*1)}.px-1\.5{padding-inline:calc(var(--spacing)*1.5)}.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-5{padding-block:calc(var(--spacing)*5)}.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)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-10{padding-right:calc(var(--spacing)*10)}.pb-0{padding-bottom:calc(var(--spacing)*0)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pl-4{padding-left:calc(var(--spacing)*4)}.pl-5{padding-left:calc(var(--spacing)*5)}.pl-8{padding-left:calc(var(--spacing)*8)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.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}.whitespace-pre-wrap{white-space:pre-wrap}.text-black{color:var(--color-black)}.text-blue-300{color:var(--color-blue-300)}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-800{color:var(--color-blue-800)}.text-card-foreground{color:var(--card-foreground)}.text-current{color:currentColor}.text-cyan-300{color:var(--color-cyan-300)}.text-cyan-500{color:var(--color-cyan-500)}.text-destructive{color:var(--destructive)}.text-destructive-foreground{color:var(--destructive-foreground)}.text-foreground{color:var(--foreground)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.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-gray-900{color:var(--color-gray-900)}.text-green-400{color:var(--color-green-400)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-green-800{color:var(--color-green-800)}.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-purple-300{color:var(--color-purple-300)}.text-purple-500{color:var(--color-purple-500)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-white{color:var(--color-white)}.text-yellow-300{color:var(--color-yellow-300)}.text-yellow-500{color:var(--color-yellow-500)}.text-yellow-800{color:var(--color-yellow-800)}.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-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);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)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px 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-50:hover{background-color:var(--color-gray-50)}.hover\:bg-gray-100:hover{background-color:var(--color-gray-100)}.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:hover,.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\:bg-white\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/10:hover{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-blue-800:hover{color:var(--color-blue-800)}.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\=active\]\:bg-background[data-state=active]{background-color:var(--background)}.data-\[state\=active\]\:text-foreground[data-state=active]{color:var(--foreground)}.data-\[state\=active\]\:shadow-sm[data-state=active]{--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)}.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\:col-span-2{grid-column:span 2/span 2}.sm\:max-w-2xl{max-width:var(--container-2xl)}.sm\:max-w-5xl{max-width:var(--container-5xl)}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.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\:max-w-6xl{max-width:var(--container-6xl)}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media (min-width:64rem){.lg\:max-w-7xl{max-width:var(--container-7xl)}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.\[\&_\[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)}.debug-button-glyph{cursor:pointer;opacity:.8;background:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23056bfe" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 20v-9"/><path d="M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z"/><path d="M14.12 3.88 16 2"/><path d="M21 21a4 4 0 0 0-3.81-4"/><path d="M21 5a4 4 0 0 1-3.55 3.97"/><path d="M22 13h-4"/><path d="M3 21a4 4 0 0 1 3.81-4"/><path d="M3 5a4 4 0 0 0 3.55 3.97"/><path d="M6 13H2"/><path d="m8 2 1.88 1.88"/><path d="M9 7.13V6a3 3 0 1 1 6 0v1.13"/></svg>') 50%/14px 14px no-repeat;transition:opacity .2s}.debug-button-glyph:hover{opacity:1}.monaco-editor .margin-view-overlays .debug-button-glyph{margin:2px 0;width:16px!important;height:16px!important;display:block!important}@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>
402
435
  </head>
403
436
  <body>
404
437
  <div id="root"></div>