@c4a/server-cli 0.4.11 → 0.4.12-alpha.1
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/index.js +795 -3402
- package/package.json +1 -1
- package/serve.js +3223 -4193
- package/web/assets/index--UyZtsHr.js +238 -0
- package/web/assets/index-15FuETM5.js +238 -0
- package/web/assets/index-1O90ZcBt.js +238 -0
- package/web/assets/index-2ZaXHlEm.js +12 -0
- package/web/assets/index-5SgaIe6K.js +238 -0
- package/web/assets/index-69TE-Dt9.js +238 -0
- package/web/assets/index-6qWMAJjW.js +12 -0
- package/web/assets/index-8bavzcKH.js +238 -0
- package/web/assets/index-B2JcVRax.js +238 -0
- package/web/assets/index-B3a1j3cz.js +238 -0
- package/web/assets/index-B6EqO_Cg.js +12 -0
- package/web/assets/index-B7OJ5sV_.js +238 -0
- package/web/assets/index-B9YWtkC-.js +12 -0
- package/web/assets/index-BD162a_1.js +238 -0
- package/web/assets/index-BF50bkqY.css +1 -0
- package/web/assets/index-BPMcNaXa.css +1 -0
- package/web/assets/index-BPlwhwPb.css +1 -0
- package/web/assets/index-BW9aouHt.js +238 -0
- package/web/assets/index-BbZvxZvZ.css +1 -0
- package/web/assets/index-BkYFml7g.css +1 -0
- package/web/assets/index-Bnn0CunM.js +238 -0
- package/web/assets/index-BosC7CbW.css +1 -0
- package/web/assets/index-BrJa-9jA.css +1 -0
- package/web/assets/index-C63Z-8cw.js +238 -0
- package/web/assets/index-C6ydhyiL.js +238 -0
- package/web/assets/index-CAXoXe3-.css +1 -0
- package/web/assets/index-CDG7D9Wo.css +1 -0
- package/web/assets/index-CNruo9jb.js +238 -0
- package/web/assets/index-CUGq5bZG.js +12 -0
- package/web/assets/index-CVB_F0xd.js +238 -0
- package/web/assets/index-CVct6UjO.css +1 -0
- package/web/assets/index-CX2QKHgP.js +12 -0
- package/web/assets/index-Cok56quU.css +1 -0
- package/web/assets/index-Ct-X2M8U.js +12 -0
- package/web/assets/index-CtnVCeI7.css +1 -0
- package/web/assets/index-Cu6ttPtz.js +12 -0
- package/web/assets/index-CvTLDILA.css +1 -0
- package/web/assets/index-D0x9zuj2.js +238 -0
- package/web/assets/index-D3-qG0Hp.js +238 -0
- package/web/assets/index-D3UsEQTE.css +1 -0
- package/web/assets/index-D5WvCk3U.js +238 -0
- package/web/assets/index-D6QqUdMz.css +1 -0
- package/web/assets/index-D7EkgIsu.js +12 -0
- package/web/assets/index-DB_YWOXK.js +12 -0
- package/web/assets/index-DBaysFVi.css +1 -0
- package/web/assets/index-DGYdHfUt.js +238 -0
- package/web/assets/index-DIzfj2PR.css +1 -0
- package/web/assets/index-DJiYLRIW.css +1 -0
- package/web/assets/index-DQcztEye.js +238 -0
- package/web/assets/index-DSnxWXVs.css +1 -0
- package/web/assets/index-DX1UQEJF.css +1 -0
- package/web/assets/index-DgtV8nwc.js +238 -0
- package/web/assets/index-DqdyIshw.js +12 -0
- package/web/assets/index-DyF2kEj9.js +238 -0
- package/web/assets/index-H6Rs5Fbq.js +12 -0
- package/web/assets/index-O5LI2GNV.js +238 -0
- package/web/assets/index-SnFvyzm_.css +1 -0
- package/web/assets/index-bnfl0N-T.css +1 -0
- package/web/assets/index-cMgxghVE.css +1 -0
- package/web/assets/index-dDuVahj-.js +12 -0
- package/web/assets/index-fG23cf-l.js +238 -0
- package/web/assets/index-it-5oMch.css +1 -0
- package/web/assets/index-yq497d-W.js +12 -0
- package/web/index.html +2 -2
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
function Lv(n,i){for(var r=0;r<i.length;r++){const s=i[r];if(typeof s!="string"&&!Array.isArray(s)){for(const c in s)if(c!=="default"&&!(c in n)){const f=Object.getOwnPropertyDescriptor(s,c);f&&Object.defineProperty(n,c,f.get?f:{enumerable:!0,get:()=>s[c]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))s(c);new MutationObserver(c=>{for(const f of c)if(f.type==="childList")for(const h of f.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&s(h)}).observe(document,{childList:!0,subtree:!0});function r(c){const f={};return c.integrity&&(f.integrity=c.integrity),c.referrerPolicy&&(f.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?f.credentials="include":c.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function s(c){if(c.ep)return;c.ep=!0;const f=r(c);fetch(c.href,f)}})();function kv(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Nu={exports:{}},er={};var Jm;function Uv(){if(Jm)return er;Jm=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(s,c,f){var h=null;if(f!==void 0&&(h=""+f),c.key!==void 0&&(h=""+c.key),"key"in c){f={};for(var m in c)m!=="key"&&(f[m]=c[m])}else f=c;return c=f.ref,{$$typeof:n,type:s,key:h,ref:c!==void 0?c:null,props:f}}return er.Fragment=i,er.jsx=r,er.jsxs=r,er}var Wm;function Hv(){return Wm||(Wm=1,Nu.exports=Uv()),Nu.exports}var d=Hv();const Ce=n=>typeof n=="string",tr=()=>{let n,i;const r=new Promise((s,c)=>{n=s,i=c});return r.resolve=n,r.reject=i,r},Pm=n=>n==null?"":""+n,Bv=(n,i,r)=>{n.forEach(s=>{i[s]&&(r[s]=i[s])})},qv=/###/g,Im=n=>n&&n.indexOf("###")>-1?n.replace(qv,"."):n,ep=n=>!n||Ce(n),cr=(n,i,r)=>{const s=Ce(i)?i.split("."):i;let c=0;for(;c<s.length-1;){if(ep(n))return{};const f=Im(s[c]);!n[f]&&r&&(n[f]=new r),Object.prototype.hasOwnProperty.call(n,f)?n=n[f]:n={},++c}return ep(n)?{}:{obj:n,k:Im(s[c])}},tp=(n,i,r)=>{const{obj:s,k:c}=cr(n,i,Object);if(s!==void 0||i.length===1){s[c]=r;return}let f=i[i.length-1],h=i.slice(0,i.length-1),m=cr(n,h,Object);for(;m.obj===void 0&&h.length;)f=`${h[h.length-1]}.${f}`,h=h.slice(0,h.length-1),m=cr(n,h,Object),m?.obj&&typeof m.obj[`${m.k}.${f}`]<"u"&&(m.obj=void 0);m.obj[`${m.k}.${f}`]=r},Yv=(n,i,r,s)=>{const{obj:c,k:f}=cr(n,i,Object);c[f]=c[f]||[],c[f].push(r)},Ws=(n,i)=>{const{obj:r,k:s}=cr(n,i);if(r&&Object.prototype.hasOwnProperty.call(r,s))return r[s]},Vv=(n,i,r)=>{const s=Ws(n,r);return s!==void 0?s:Ws(i,r)},Eg=(n,i,r)=>{for(const s in i)s!=="__proto__"&&s!=="constructor"&&(s in n?Ce(n[s])||n[s]instanceof String||Ce(i[s])||i[s]instanceof String?r&&(n[s]=i[s]):Eg(n[s],i[s],r):n[s]=i[s]);return n},hl=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Gv={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Kv=n=>Ce(n)?n.replace(/[&<>"'\/]/g,i=>Gv[i]):n;class $v{constructor(i){this.capacity=i,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(i){const r=this.regExpMap.get(i);if(r!==void 0)return r;const s=new RegExp(i);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(i,s),this.regExpQueue.push(i),s}}const Xv=[" ",",","?","!",";"],Qv=new $v(20),Zv=(n,i,r)=>{i=i||"",r=r||"";const s=Xv.filter(h=>i.indexOf(h)<0&&r.indexOf(h)<0);if(s.length===0)return!0;const c=Qv.getRegExp(`(${s.map(h=>h==="?"?"\\?":h).join("|")})`);let f=!c.test(n);if(!f){const h=n.indexOf(r);h>0&&!c.test(n.substring(0,h))&&(f=!0)}return f},Gu=(n,i,r=".")=>{if(!n)return;if(n[i])return Object.prototype.hasOwnProperty.call(n,i)?n[i]:void 0;const s=i.split(r);let c=n;for(let f=0;f<s.length;){if(!c||typeof c!="object")return;let h,m="";for(let y=f;y<s.length;++y)if(y!==f&&(m+=r),m+=s[y],h=c[m],h!==void 0){if(["string","number","boolean"].indexOf(typeof h)>-1&&y<s.length-1)continue;f+=y-f+1;break}c=h}return c},dr=n=>n?.replace("_","-"),Fv={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,i){console?.[n]?.apply?.(console,i)}};class Ps{constructor(i,r={}){this.init(i,r)}init(i,r={}){this.prefix=r.prefix||"i18next:",this.logger=i||Fv,this.options=r,this.debug=r.debug}log(...i){return this.forward(i,"log","",!0)}warn(...i){return this.forward(i,"warn","",!0)}error(...i){return this.forward(i,"error","")}deprecate(...i){return this.forward(i,"warn","WARNING DEPRECATED: ",!0)}forward(i,r,s,c){return c&&!this.debug?null:(Ce(i[0])&&(i[0]=`${s}${this.prefix} ${i[0]}`),this.logger[r](i))}create(i){return new Ps(this.logger,{prefix:`${this.prefix}:${i}:`,...this.options})}clone(i){return i=i||this.options,i.prefix=i.prefix||this.prefix,new Ps(this.logger,i)}}var ka=new Ps;class ao{constructor(){this.observers={}}on(i,r){return i.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const c=this.observers[s].get(r)||0;this.observers[s].set(r,c+1)}),this}off(i,r){if(this.observers[i]){if(!r){delete this.observers[i];return}this.observers[i].delete(r)}}emit(i,...r){this.observers[i]&&Array.from(this.observers[i].entries()).forEach(([c,f])=>{for(let h=0;h<f;h++)c(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([c,f])=>{for(let h=0;h<f;h++)c.apply(c,[i,...r])})}}class ap extends ao{constructor(i,r={ns:["translation"],defaultNS:"translation"}){super(),this.data=i||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}removeNamespaces(i){const r=this.options.ns.indexOf(i);r>-1&&this.options.ns.splice(r,1)}getResource(i,r,s,c={}){const f=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator,h=c.ignoreJSONStructure!==void 0?c.ignoreJSONStructure:this.options.ignoreJSONStructure;let m;i.indexOf(".")>-1?m=i.split("."):(m=[i,r],s&&(Array.isArray(s)?m.push(...s):Ce(s)&&f?m.push(...s.split(f)):m.push(s)));const y=Ws(this.data,m);return!y&&!r&&!s&&i.indexOf(".")>-1&&(i=m[0],r=m[1],s=m.slice(2).join(".")),y||!h||!Ce(s)?y:Gu(this.data?.[i]?.[r],s,f)}addResource(i,r,s,c,f={silent:!1}){const h=f.keySeparator!==void 0?f.keySeparator:this.options.keySeparator;let m=[i,r];s&&(m=m.concat(h?s.split(h):s)),i.indexOf(".")>-1&&(m=i.split("."),c=r,r=m[1]),this.addNamespaces(r),tp(this.data,m,c),f.silent||this.emit("added",i,r,s,c)}addResources(i,r,s,c={silent:!1}){for(const f in s)(Ce(s[f])||Array.isArray(s[f]))&&this.addResource(i,r,f,s[f],{silent:!0});c.silent||this.emit("added",i,r,s)}addResourceBundle(i,r,s,c,f,h={silent:!1,skipCopy:!1}){let m=[i,r];i.indexOf(".")>-1&&(m=i.split("."),c=s,s=r,r=m[1]),this.addNamespaces(r);let y=Ws(this.data,m)||{};h.skipCopy||(s=JSON.parse(JSON.stringify(s))),c?Eg(y,s,f):y={...y,...s},tp(this.data,m,y),h.silent||this.emit("added",i,r,s)}removeResourceBundle(i,r){this.hasResourceBundle(i,r)&&delete this.data[i][r],this.removeNamespaces(r),this.emit("removed",i,r)}hasResourceBundle(i,r){return this.getResource(i,r)!==void 0}getResourceBundle(i,r){return r||(r=this.options.defaultNS),this.getResource(i,r)}getDataByLanguage(i){return this.data[i]}hasLanguageSomeTranslations(i){const r=this.getDataByLanguage(i);return!!(r&&Object.keys(r)||[]).find(c=>r[c]&&Object.keys(r[c]).length>0)}toJSON(){return this.data}}var wg={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,i,r,s,c){return n.forEach(f=>{i=this.processors[f]?.process(i,r,s,c)??i}),i}};const Cg=Symbol("i18next/PATH_KEY");function Jv(){const n=[],i=Object.create(null);let r;return i.get=(s,c)=>(r?.revoke?.(),c===Cg?n:(n.push(c),r=Proxy.revocable(s,i),r.proxy)),Proxy.revocable(Object.create(null),i).proxy}function Ku(n,i){const{[Cg]:r}=n(Jv());return r.join(i?.keySeparator??".")}const np={},Eu=n=>!Ce(n)&&typeof n!="boolean"&&typeof n!="number";class Is extends ao{constructor(i,r={}){super(),Bv(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],i,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ka.create("translator")}changeLanguage(i){i&&(this.language=i)}exists(i,r={interpolation:{}}){const s={...r};if(i==null)return!1;const c=this.resolve(i,s);if(c?.res===void 0)return!1;const f=Eu(c.res);return!(s.returnObjects===!1&&f)}extractFromKey(i,r){let s=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const c=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let f=r.ns||this.options.defaultNS||[];const h=s&&i.indexOf(s)>-1,m=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!Zv(i,s,c);if(h&&!m){const y=i.match(this.interpolator.nestingRegexp);if(y&&y.length>0)return{key:i,namespaces:Ce(f)?[f]:f};const p=i.split(s);(s!==c||s===c&&this.options.ns.indexOf(p[0])>-1)&&(f=p.shift()),i=p.join(c)}return{key:i,namespaces:Ce(f)?[f]:f}}translate(i,r,s){let c=typeof r=="object"?{...r}:r;if(typeof c!="object"&&this.options.overloadTranslationOptionHandler&&(c=this.options.overloadTranslationOptionHandler(arguments)),typeof c=="object"&&(c={...c}),c||(c={}),i==null)return"";typeof i=="function"&&(i=Ku(i,{...this.options,...c})),Array.isArray(i)||(i=[String(i)]);const f=c.returnDetails!==void 0?c.returnDetails:this.options.returnDetails,h=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator,{key:m,namespaces:y}=this.extractFromKey(i[i.length-1],c),p=y[y.length-1];let S=c.nsSeparator!==void 0?c.nsSeparator:this.options.nsSeparator;S===void 0&&(S=":");const x=c.lng||this.language,_=c.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(x?.toLowerCase()==="cimode")return _?f?{res:`${p}${S}${m}`,usedKey:m,exactUsedKey:m,usedLng:x,usedNS:p,usedParams:this.getUsedParamsDetails(c)}:`${p}${S}${m}`:f?{res:m,usedKey:m,exactUsedKey:m,usedLng:x,usedNS:p,usedParams:this.getUsedParamsDetails(c)}:m;const E=this.resolve(i,c);let z=E?.res;const D=E?.usedKey||m,A=E?.exactUsedKey||m,W=["[object Number]","[object Function]","[object RegExp]"],X=c.joinArrays!==void 0?c.joinArrays:this.options.joinArrays,G=!this.i18nFormat||this.i18nFormat.handleAsObject,ne=c.count!==void 0&&!Ce(c.count),re=Is.hasDefaultValue(c),ce=ne?this.pluralResolver.getSuffix(x,c.count,c):"",P=c.ordinal&&ne?this.pluralResolver.getSuffix(x,c.count,{ordinal:!1}):"",j=ne&&!c.ordinal&&c.count===0,$=j&&c[`defaultValue${this.options.pluralSeparator}zero`]||c[`defaultValue${ce}`]||c[`defaultValue${P}`]||c.defaultValue;let Q=z;G&&!z&&re&&(Q=$);const H=Eu(Q),ee=Object.prototype.toString.apply(Q);if(G&&Q&&H&&W.indexOf(ee)<0&&!(Ce(X)&&Array.isArray(Q))){if(!c.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const pe=this.options.returnedObjectHandler?this.options.returnedObjectHandler(D,Q,{...c,ns:y}):`key '${m} (${this.language})' returned an object instead of string.`;return f?(E.res=pe,E.usedParams=this.getUsedParamsDetails(c),E):pe}if(h){const pe=Array.isArray(Q),Z=pe?[]:{},ie=pe?A:D;for(const M in Q)if(Object.prototype.hasOwnProperty.call(Q,M)){const J=`${ie}${h}${M}`;re&&!z?Z[M]=this.translate(J,{...c,defaultValue:Eu($)?$[M]:void 0,joinArrays:!1,ns:y}):Z[M]=this.translate(J,{...c,joinArrays:!1,ns:y}),Z[M]===J&&(Z[M]=Q[M])}z=Z}}else if(G&&Ce(X)&&Array.isArray(z))z=z.join(X),z&&(z=this.extendTranslation(z,i,c,s));else{let pe=!1,Z=!1;!this.isValidLookup(z)&&re&&(pe=!0,z=$),this.isValidLookup(z)||(Z=!0,z=m);const M=(c.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&Z?void 0:z,J=re&&$!==z&&this.options.updateMissing;if(Z||pe||J){if(this.logger.log(J?"updateKey":"missingKey",x,p,m,J?$:z),h){const N=this.resolve(m,{...c,keySeparator:!1});N&&N.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 ue=[];const de=this.languageUtils.getFallbackCodes(this.options.fallbackLng,c.lng||this.language);if(this.options.saveMissingTo==="fallback"&&de&&de[0])for(let N=0;N<de.length;N++)ue.push(de[N]);else this.options.saveMissingTo==="all"?ue=this.languageUtils.toResolveHierarchy(c.lng||this.language):ue.push(c.lng||this.language);const ae=(N,q,I)=>{const se=re&&I!==z?I:M;this.options.missingKeyHandler?this.options.missingKeyHandler(N,p,q,se,J,c):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(N,p,q,se,J,c),this.emit("missingKey",N,p,q,z)};this.options.saveMissing&&(this.options.saveMissingPlurals&&ne?ue.forEach(N=>{const q=this.pluralResolver.getSuffixes(N,c);j&&c[`defaultValue${this.options.pluralSeparator}zero`]&&q.indexOf(`${this.options.pluralSeparator}zero`)<0&&q.push(`${this.options.pluralSeparator}zero`),q.forEach(I=>{ae([N],m+I,c[`defaultValue${I}`]||$)})}):ae(ue,m,$))}z=this.extendTranslation(z,i,c,E,s),Z&&z===m&&this.options.appendNamespaceToMissingKey&&(z=`${p}${S}${m}`),(Z||pe)&&this.options.parseMissingKeyHandler&&(z=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${p}${S}${m}`:m,pe?z:void 0,c))}return f?(E.res=z,E.usedParams=this.getUsedParamsDetails(c),E):z}extendTranslation(i,r,s,c,f){if(this.i18nFormat?.parse)i=this.i18nFormat.parse(i,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||c.usedLng,c.usedNS,c.usedKey,{resolved:c});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const y=Ce(i)&&(s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let p;if(y){const x=i.match(this.interpolator.nestingRegexp);p=x&&x.length}let S=s.replace&&!Ce(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(S={...this.options.interpolation.defaultVariables,...S}),i=this.interpolator.interpolate(i,S,s.lng||this.language||c.usedLng,s),y){const x=i.match(this.interpolator.nestingRegexp),_=x&&x.length;p<_&&(s.nest=!1)}!s.lng&&c&&c.res&&(s.lng=this.language||c.usedLng),s.nest!==!1&&(i=this.interpolator.nest(i,(...x)=>f?.[0]===x[0]&&!s.context?(this.logger.warn(`It seems you are nesting recursively key: ${x[0]} in key: ${r[0]}`),null):this.translate(...x,r),s)),s.interpolation&&this.interpolator.reset()}const h=s.postProcess||this.options.postProcess,m=Ce(h)?[h]:h;return i!=null&&m?.length&&s.applyPostProcessor!==!1&&(i=wg.handle(m,i,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...c,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),i}resolve(i,r={}){let s,c,f,h,m;return Ce(i)&&(i=[i]),i.forEach(y=>{if(this.isValidLookup(s))return;const p=this.extractFromKey(y,r),S=p.key;c=S;let x=p.namespaces;this.options.fallbackNS&&(x=x.concat(this.options.fallbackNS));const _=r.count!==void 0&&!Ce(r.count),E=_&&!r.ordinal&&r.count===0,z=r.context!==void 0&&(Ce(r.context)||typeof r.context=="number")&&r.context!=="",D=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);x.forEach(A=>{this.isValidLookup(s)||(m=A,!np[`${D[0]}-${A}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(m)&&(np[`${D[0]}-${A}`]=!0,this.logger.warn(`key "${c}" for languages "${D.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!!!")),D.forEach(W=>{if(this.isValidLookup(s))return;h=W;const X=[S];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(X,S,W,A,r);else{let ne;_&&(ne=this.pluralResolver.getSuffix(W,r.count,r));const re=`${this.options.pluralSeparator}zero`,ce=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(_&&(r.ordinal&&ne.indexOf(ce)===0&&X.push(S+ne.replace(ce,this.options.pluralSeparator)),X.push(S+ne),E&&X.push(S+re)),z){const P=`${S}${this.options.contextSeparator||"_"}${r.context}`;X.push(P),_&&(r.ordinal&&ne.indexOf(ce)===0&&X.push(P+ne.replace(ce,this.options.pluralSeparator)),X.push(P+ne),E&&X.push(P+re))}}let G;for(;G=X.pop();)this.isValidLookup(s)||(f=G,s=this.getResource(W,A,G,r))}))})}),{res:s,usedKey:c,exactUsedKey:f,usedLng:h,usedNS:m}}isValidLookup(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}getResource(i,r,s,c={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(i,r,s,c):this.resourceStore.getResource(i,r,s,c)}getUsedParamsDetails(i={}){const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=i.replace&&!Ce(i.replace);let c=s?i.replace:i;if(s&&typeof i.count<"u"&&(c.count=i.count),this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),!s){c={...c};for(const f of r)delete c[f]}return c}static hasDefaultValue(i){const r="defaultValue";for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&r===s.substring(0,r.length)&&i[s]!==void 0)return!0;return!1}}class lp{constructor(i){this.options=i,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ka.create("languageUtils")}getScriptPartFromCode(i){if(i=dr(i),!i||i.indexOf("-")<0)return null;const r=i.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(i){if(i=dr(i),!i||i.indexOf("-")<0)return i;const r=i.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(i){if(Ce(i)&&i.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(i)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?i.toLowerCase():i)}return this.options.cleanCode||this.options.lowerCaseLng?i.toLowerCase():i}isSupportedCode(i){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(i=this.getLanguagePartFromCode(i)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(i)>-1}getBestMatchFromCodes(i){if(!i)return null;let r;return i.forEach(s=>{if(r)return;const c=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(c))&&(r=c)}),!r&&this.options.supportedLngs&&i.forEach(s=>{if(r)return;const c=this.getScriptPartFromCode(s);if(this.isSupportedCode(c))return r=c;const f=this.getLanguagePartFromCode(s);if(this.isSupportedCode(f))return r=f;r=this.options.supportedLngs.find(h=>{if(h===f)return h;if(!(h.indexOf("-")<0&&f.indexOf("-")<0)&&(h.indexOf("-")>0&&f.indexOf("-")<0&&h.substring(0,h.indexOf("-"))===f||h.indexOf(f)===0&&f.length>1))return h})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(i,r){if(!i)return[];if(typeof i=="function"&&(i=i(r)),Ce(i)&&(i=[i]),Array.isArray(i))return i;if(!r)return i.default||[];let s=i[r];return s||(s=i[this.getScriptPartFromCode(r)]),s||(s=i[this.formatLanguageCode(r)]),s||(s=i[this.getLanguagePartFromCode(r)]),s||(s=i.default),s||[]}toResolveHierarchy(i,r){const s=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],i),c=[],f=h=>{h&&(this.isSupportedCode(h)?c.push(h):this.logger.warn(`rejecting language code not found in supportedLngs: ${h}`))};return Ce(i)&&(i.indexOf("-")>-1||i.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&f(this.formatLanguageCode(i)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&f(this.getScriptPartFromCode(i)),this.options.load!=="currentOnly"&&f(this.getLanguagePartFromCode(i))):Ce(i)&&f(this.formatLanguageCode(i)),s.forEach(h=>{c.indexOf(h)<0&&f(this.formatLanguageCode(h))}),c}}const ip={zero:0,one:1,two:2,few:3,many:4,other:5},rp={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Wv{constructor(i,r={}){this.languageUtils=i,this.options=r,this.logger=ka.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(i,r={}){const s=dr(i==="dev"?"en":i),c=r.ordinal?"ordinal":"cardinal",f=JSON.stringify({cleanedCode:s,type:c});if(f in this.pluralRulesCache)return this.pluralRulesCache[f];let h;try{h=new Intl.PluralRules(s,{type:c})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),rp;if(!i.match(/-|_/))return rp;const y=this.languageUtils.getLanguagePartFromCode(i);h=this.getRule(y,r)}return this.pluralRulesCache[f]=h,h}needsPlural(i,r={}){let s=this.getRule(i,r);return s||(s=this.getRule("dev",r)),s?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(i,r,s={}){return this.getSuffixes(i,s).map(c=>`${r}${c}`)}getSuffixes(i,r={}){let s=this.getRule(i,r);return s||(s=this.getRule("dev",r)),s?s.resolvedOptions().pluralCategories.sort((c,f)=>ip[c]-ip[f]).map(c=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${c}`):[]}getSuffix(i,r,s={}){const c=this.getRule(i,s);return c?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${c.select(r)}`:(this.logger.warn(`no plural rule found for: ${i}`),this.getSuffix("dev",r,s))}}const sp=(n,i,r,s=".",c=!0)=>{let f=Vv(n,i,r);return!f&&c&&Ce(r)&&(f=Gu(n,r,s),f===void 0&&(f=Gu(i,r,s))),f},wu=n=>n.replace(/\$/g,"$$$$");class op{constructor(i={}){this.logger=ka.create("interpolator"),this.options=i,this.format=i?.interpolation?.format||(r=>r),this.init(i)}init(i={}){i.interpolation||(i.interpolation={escapeValue:!0});const{escape:r,escapeValue:s,useRawValueToEscape:c,prefix:f,prefixEscaped:h,suffix:m,suffixEscaped:y,formatSeparator:p,unescapeSuffix:S,unescapePrefix:x,nestingPrefix:_,nestingPrefixEscaped:E,nestingSuffix:z,nestingSuffixEscaped:D,nestingOptionsSeparator:A,maxReplaces:W,alwaysFormat:X}=i.interpolation;this.escape=r!==void 0?r:Kv,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=c!==void 0?c:!1,this.prefix=f?hl(f):h||"{{",this.suffix=m?hl(m):y||"}}",this.formatSeparator=p||",",this.unescapePrefix=S?"":x||"-",this.unescapeSuffix=this.unescapePrefix?"":S||"",this.nestingPrefix=_?hl(_):E||hl("$t("),this.nestingSuffix=z?hl(z):D||hl(")"),this.nestingOptionsSeparator=A||",",this.maxReplaces=W||1e3,this.alwaysFormat=X!==void 0?X:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const i=(r,s)=>r?.source===s?(r.lastIndex=0,r):new RegExp(s,"g");this.regexp=i(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=i(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=i(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(i,r,s,c){let f,h,m;const y=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},p=E=>{if(E.indexOf(this.formatSeparator)<0){const W=sp(r,y,E,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(W,void 0,s,{...c,...r,interpolationkey:E}):W}const z=E.split(this.formatSeparator),D=z.shift().trim(),A=z.join(this.formatSeparator).trim();return this.format(sp(r,y,D,this.options.keySeparator,this.options.ignoreJSONStructure),A,s,{...c,...r,interpolationkey:D})};this.resetRegExp();const S=c?.missingInterpolationHandler||this.options.missingInterpolationHandler,x=c?.interpolation?.skipOnVariables!==void 0?c.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:E=>wu(E)},{regex:this.regexp,safeValue:E=>this.escapeValue?wu(this.escape(E)):wu(E)}].forEach(E=>{for(m=0;f=E.regex.exec(i);){const z=f[1].trim();if(h=p(z),h===void 0)if(typeof S=="function"){const A=S(i,f,c);h=Ce(A)?A:""}else if(c&&Object.prototype.hasOwnProperty.call(c,z))h="";else if(x){h=f[0];continue}else this.logger.warn(`missed to pass in variable ${z} for interpolating ${i}`),h="";else!Ce(h)&&!this.useRawValueToEscape&&(h=Pm(h));const D=E.safeValue(h);if(i=i.replace(f[0],D),x?(E.regex.lastIndex+=h.length,E.regex.lastIndex-=f[0].length):E.regex.lastIndex=0,m++,m>=this.maxReplaces)break}}),i}nest(i,r,s={}){let c,f,h;const m=(y,p)=>{const S=this.nestingOptionsSeparator;if(y.indexOf(S)<0)return y;const x=y.split(new RegExp(`${hl(S)}[ ]*{`));let _=`{${x[1]}`;y=x[0],_=this.interpolate(_,h);const E=_.match(/'/g),z=_.match(/"/g);((E?.length??0)%2===0&&!z||(z?.length??0)%2!==0)&&(_=_.replace(/'/g,'"'));try{h=JSON.parse(_),p&&(h={...p,...h})}catch(D){return this.logger.warn(`failed parsing options string in nesting for key ${y}`,D),`${y}${S}${_}`}return h.defaultValue&&h.defaultValue.indexOf(this.prefix)>-1&&delete h.defaultValue,y};for(;c=this.nestingRegexp.exec(i);){let y=[];h={...s},h=h.replace&&!Ce(h.replace)?h.replace:h,h.applyPostProcessor=!1,delete h.defaultValue;const p=/{.*}/.test(c[1])?c[1].lastIndexOf("}")+1:c[1].indexOf(this.formatSeparator);if(p!==-1&&(y=c[1].slice(p).split(this.formatSeparator).map(S=>S.trim()).filter(Boolean),c[1]=c[1].slice(0,p)),f=r(m.call(this,c[1].trim(),h),h),f&&c[0]===i&&!Ce(f))return f;Ce(f)||(f=Pm(f)),f||(this.logger.warn(`missed to resolve ${c[1]} for nesting ${i}`),f=""),y.length&&(f=y.reduce((S,x)=>this.format(S,x,s.lng,{...s,interpolationkey:c[1].trim()}),f.trim())),i=i.replace(c[0],f),this.regexp.lastIndex=0}return i}}const Pv=n=>{let i=n.toLowerCase().trim();const r={};if(n.indexOf("(")>-1){const s=n.split("(");i=s[0].toLowerCase().trim();const c=s[1].substring(0,s[1].length-1);i==="currency"&&c.indexOf(":")<0?r.currency||(r.currency=c.trim()):i==="relativetime"&&c.indexOf(":")<0?r.range||(r.range=c.trim()):c.split(";").forEach(h=>{if(h){const[m,...y]=h.split(":"),p=y.join(":").trim().replace(/^'+|'+$/g,""),S=m.trim();r[S]||(r[S]=p),p==="false"&&(r[S]=!1),p==="true"&&(r[S]=!0),isNaN(p)||(r[S]=parseInt(p,10))}})}return{formatName:i,formatOptions:r}},cp=n=>{const i={};return(r,s,c)=>{let f=c;c&&c.interpolationkey&&c.formatParams&&c.formatParams[c.interpolationkey]&&c[c.interpolationkey]&&(f={...f,[c.interpolationkey]:void 0});const h=s+JSON.stringify(f);let m=i[h];return m||(m=n(dr(s),c),i[h]=m),m(r)}},Iv=n=>(i,r,s)=>n(dr(r),s)(i);class e0{constructor(i={}){this.logger=ka.create("formatter"),this.options=i,this.init(i)}init(i,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const s=r.cacheInBuiltFormats?cp:Iv;this.formats={number:s((c,f)=>{const h=new Intl.NumberFormat(c,{...f});return m=>h.format(m)}),currency:s((c,f)=>{const h=new Intl.NumberFormat(c,{...f,style:"currency"});return m=>h.format(m)}),datetime:s((c,f)=>{const h=new Intl.DateTimeFormat(c,{...f});return m=>h.format(m)}),relativetime:s((c,f)=>{const h=new Intl.RelativeTimeFormat(c,{...f});return m=>h.format(m,f.range||"day")}),list:s((c,f)=>{const h=new Intl.ListFormat(c,{...f});return m=>h.format(m)})}}add(i,r){this.formats[i.toLowerCase().trim()]=r}addCached(i,r){this.formats[i.toLowerCase().trim()]=cp(r)}format(i,r,s,c={}){const f=r.split(this.formatSeparator);if(f.length>1&&f[0].indexOf("(")>1&&f[0].indexOf(")")<0&&f.find(m=>m.indexOf(")")>-1)){const m=f.findIndex(y=>y.indexOf(")")>-1);f[0]=[f[0],...f.splice(1,m)].join(this.formatSeparator)}return f.reduce((m,y)=>{const{formatName:p,formatOptions:S}=Pv(y);if(this.formats[p]){let x=m;try{const _=c?.formatParams?.[c.interpolationkey]||{},E=_.locale||_.lng||c.locale||c.lng||s;x=this.formats[p](m,E,{...S,...c,..._})}catch(_){this.logger.warn(_)}return x}else this.logger.warn(`there was no format function for ${p}`);return m},i)}}const t0=(n,i)=>{n.pending[i]!==void 0&&(delete n.pending[i],n.pendingCount--)};class a0 extends ao{constructor(i,r,s,c={}){super(),this.backend=i,this.store=r,this.services=s,this.languageUtils=s.languageUtils,this.options=c,this.logger=ka.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=c.maxParallelReads||10,this.readingCalls=0,this.maxRetries=c.maxRetries>=0?c.maxRetries:5,this.retryTimeout=c.retryTimeout>=1?c.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(s,c.backend,c)}queueLoad(i,r,s,c){const f={},h={},m={},y={};return i.forEach(p=>{let S=!0;r.forEach(x=>{const _=`${p}|${x}`;!s.reload&&this.store.hasResourceBundle(p,x)?this.state[_]=2:this.state[_]<0||(this.state[_]===1?h[_]===void 0&&(h[_]=!0):(this.state[_]=1,S=!1,h[_]===void 0&&(h[_]=!0),f[_]===void 0&&(f[_]=!0),y[x]===void 0&&(y[x]=!0)))}),S||(m[p]=!0)}),(Object.keys(f).length||Object.keys(h).length)&&this.queue.push({pending:h,pendingCount:Object.keys(h).length,loaded:{},errors:[],callback:c}),{toLoad:Object.keys(f),pending:Object.keys(h),toLoadLanguages:Object.keys(m),toLoadNamespaces:Object.keys(y)}}loaded(i,r,s){const c=i.split("|"),f=c[0],h=c[1];r&&this.emit("failedLoading",f,h,r),!r&&s&&this.store.addResourceBundle(f,h,s,void 0,void 0,{skipCopy:!0}),this.state[i]=r?-1:2,r&&s&&(this.state[i]=0);const m={};this.queue.forEach(y=>{Yv(y.loaded,[f],h),t0(y,i),r&&y.errors.push(r),y.pendingCount===0&&!y.done&&(Object.keys(y.loaded).forEach(p=>{m[p]||(m[p]={});const S=y.loaded[p];S.length&&S.forEach(x=>{m[p][x]===void 0&&(m[p][x]=!0)})}),y.done=!0,y.errors.length?y.callback(y.errors):y.callback())}),this.emit("loaded",m),this.queue=this.queue.filter(y=>!y.done)}read(i,r,s,c=0,f=this.retryTimeout,h){if(!i.length)return h(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:r,fcName:s,tried:c,wait:f,callback:h});return}this.readingCalls++;const m=(p,S)=>{if(this.readingCalls--,this.waitingReads.length>0){const x=this.waitingReads.shift();this.read(x.lng,x.ns,x.fcName,x.tried,x.wait,x.callback)}if(p&&S&&c<this.maxRetries){setTimeout(()=>{this.read.call(this,i,r,s,c+1,f*2,h)},f);return}h(p,S)},y=this.backend[s].bind(this.backend);if(y.length===2){try{const p=y(i,r);p&&typeof p.then=="function"?p.then(S=>m(null,S)).catch(m):m(null,p)}catch(p){m(p)}return}return y(i,r,m)}prepareLoading(i,r,s={},c){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),c&&c();Ce(i)&&(i=this.languageUtils.toResolveHierarchy(i)),Ce(r)&&(r=[r]);const f=this.queueLoad(i,r,s,c);if(!f.toLoad.length)return f.pending.length||c(),null;f.toLoad.forEach(h=>{this.loadOne(h)})}load(i,r,s){this.prepareLoading(i,r,{},s)}reload(i,r,s){this.prepareLoading(i,r,{reload:!0},s)}loadOne(i,r=""){const s=i.split("|"),c=s[0],f=s[1];this.read(c,f,"read",void 0,void 0,(h,m)=>{h&&this.logger.warn(`${r}loading namespace ${f} for language ${c} failed`,h),!h&&m&&this.logger.log(`${r}loaded namespace ${f} for language ${c}`,m),this.loaded(i,h,m)})}saveMissing(i,r,s,c,f,h={},m=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${s}" as the namespace "${r}" 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(!(s==null||s==="")){if(this.backend?.create){const y={...h,isUpdate:f},p=this.backend.create.bind(this.backend);if(p.length<6)try{let S;p.length===5?S=p(i,r,s,c,y):S=p(i,r,s,c),S&&typeof S.then=="function"?S.then(x=>m(null,x)).catch(m):m(null,S)}catch(S){m(S)}else p(i,r,s,c,m,y)}!i||!i[0]||this.store.addResource(i[0],r,s,c)}}}const Cu=()=>({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 i={};if(typeof n[1]=="object"&&(i=n[1]),Ce(n[1])&&(i.defaultValue=n[1]),Ce(n[2])&&(i.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const r=n[3]||n[2];Object.keys(r).forEach(s=>{i[s]=r[s]})}return i},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),up=n=>(Ce(n.ns)&&(n.ns=[n.ns]),Ce(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),Ce(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),Ys=()=>{},n0=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(r=>{typeof n[r]=="function"&&(n[r]=n[r].bind(n))})},Rg="__i18next_supportNoticeShown",l0=()=>typeof globalThis<"u"&&!!globalThis[Rg],i0=()=>{typeof globalThis<"u"&&(globalThis[Rg]=!0)},r0=n=>!!(n?.modules?.backend?.name?.indexOf("Locize")>0||n?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||n?.options?.backend?.backends&&n.options.backend.backends.some(i=>i?.name?.indexOf("Locize")>0||i?.constructor?.name?.indexOf("Locize")>0)||n?.options?.backend?.projectId||n?.options?.backend?.backendOptions&&n.options.backend.backendOptions.some(i=>i?.projectId));class ur extends ao{constructor(i={},r){if(super(),this.options=up(i),this.services={},this.logger=ka,this.modules={external:[]},n0(this),r&&!this.isInitialized&&!i.isClone){if(!this.options.initAsync)return this.init(i,r),this;setTimeout(()=>{this.init(i,r)},0)}}init(i={},r){this.isInitializing=!0,typeof i=="function"&&(r=i,i={}),i.defaultNS==null&&i.ns&&(Ce(i.ns)?i.defaultNS=i.ns:i.ns.indexOf("translation")<0&&(i.defaultNS=i.ns[0]));const s=Cu();this.options={...s,...this.options,...up(i)},this.options.interpolation={...s.interpolation,...this.options.interpolation},i.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=i.keySeparator),i.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=i.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=s.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!r0(this)&&!l0()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is maintained with support from Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),i0());const c=p=>p?typeof p=="function"?new p:p:null;if(!this.options.isClone){this.modules.logger?ka.init(c(this.modules.logger),this.options):ka.init(null,this.options);let p;this.modules.formatter?p=this.modules.formatter:p=e0;const S=new lp(this.options);this.store=new ap(this.options.resources,this.options);const x=this.services;x.logger=ka,x.resourceStore=this.store,x.languageUtils=S,x.pluralResolver=new Wv(S,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),p&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(x.formatter=c(p),x.formatter.init&&x.formatter.init(x,this.options),this.options.interpolation.format=x.formatter.format.bind(x.formatter)),x.interpolator=new op(this.options),x.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},x.backendConnector=new a0(c(this.modules.backend),x.resourceStore,x,this.options),x.backendConnector.on("*",(E,...z)=>{this.emit(E,...z)}),this.modules.languageDetector&&(x.languageDetector=c(this.modules.languageDetector),x.languageDetector.init&&x.languageDetector.init(x,this.options.detection,this.options)),this.modules.i18nFormat&&(x.i18nFormat=c(this.modules.i18nFormat),x.i18nFormat.init&&x.i18nFormat.init(this)),this.translator=new Is(this.services,this.options),this.translator.on("*",(E,...z)=>{this.emit(E,...z)}),this.modules.external.forEach(E=>{E.init&&E.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Ys),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const p=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);p.length>0&&p[0]!=="dev"&&(this.options.lng=p[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(p=>{this[p]=(...S)=>this.store[p](...S)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(p=>{this[p]=(...S)=>(this.store[p](...S),this)});const m=tr(),y=()=>{const p=(S,x)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),m.resolve(x),r(S,x)};if(this.languages&&!this.isInitialized)return p(null,this.t.bind(this));this.changeLanguage(this.options.lng,p)};return this.options.resources||!this.options.initAsync?y():setTimeout(y,0),m}loadResources(i,r=Ys){let s=r;const c=Ce(i)?i:this.language;if(typeof i=="function"&&(s=i),!this.options.resources||this.options.partialBundledLanguages){if(c?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const f=[],h=m=>{if(!m||m==="cimode")return;this.services.languageUtils.toResolveHierarchy(m).forEach(p=>{p!=="cimode"&&f.indexOf(p)<0&&f.push(p)})};c?h(c):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(y=>h(y)),this.options.preload?.forEach?.(m=>h(m)),this.services.backendConnector.load(f,this.options.ns,m=>{!m&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(m)})}else s(null)}reloadResources(i,r,s){const c=tr();return typeof i=="function"&&(s=i,i=void 0),typeof r=="function"&&(s=r,r=void 0),i||(i=this.languages),r||(r=this.options.ns),s||(s=Ys),this.services.backendConnector.reload(i,r,f=>{c.resolve(),s(f)}),c}use(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&wg.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}setResolvedLanguage(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1)){for(let r=0;r<this.languages.length;r++){const s=this.languages[r];if(!(["cimode","dev"].indexOf(s)>-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}!this.resolvedLanguage&&this.languages.indexOf(i)<0&&this.store.hasLanguageSomeTranslations(i)&&(this.resolvedLanguage=i,this.languages.unshift(i))}}changeLanguage(i,r){this.isLanguageChangingTo=i;const s=tr();this.emit("languageChanging",i);const c=m=>{this.language=m,this.languages=this.services.languageUtils.toResolveHierarchy(m),this.resolvedLanguage=void 0,this.setResolvedLanguage(m)},f=(m,y)=>{y?this.isLanguageChangingTo===i&&(c(y),this.translator.changeLanguage(y),this.isLanguageChangingTo=void 0,this.emit("languageChanged",y),this.logger.log("languageChanged",y)):this.isLanguageChangingTo=void 0,s.resolve((...p)=>this.t(...p)),r&&r(m,(...p)=>this.t(...p))},h=m=>{!i&&!m&&this.services.languageDetector&&(m=[]);const y=Ce(m)?m:m&&m[0],p=this.store.hasLanguageSomeTranslations(y)?y:this.services.languageUtils.getBestMatchFromCodes(Ce(m)?[m]:m);p&&(this.language||c(p),this.translator.language||this.translator.changeLanguage(p),this.services.languageDetector?.cacheUserLanguage?.(p)),this.loadResources(p,S=>{f(S,p)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?h(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(h):this.services.languageDetector.detect(h):h(i),s}getFixedT(i,r,s){const c=(f,h,...m)=>{let y;typeof h!="object"?y=this.options.overloadTranslationOptionHandler([f,h].concat(m)):y={...h},y.lng=y.lng||c.lng,y.lngs=y.lngs||c.lngs,y.ns=y.ns||c.ns,y.keyPrefix!==""&&(y.keyPrefix=y.keyPrefix||s||c.keyPrefix);const p=this.options.keySeparator||".";let S;return y.keyPrefix&&Array.isArray(f)?S=f.map(x=>(typeof x=="function"&&(x=Ku(x,{...this.options,...h})),`${y.keyPrefix}${p}${x}`)):(typeof f=="function"&&(f=Ku(f,{...this.options,...h})),S=y.keyPrefix?`${y.keyPrefix}${p}${f}`:f),this.t(S,y)};return Ce(i)?c.lng=i:c.lngs=i,c.ns=r,c.keyPrefix=s,c}t(...i){return this.translator?.translate(...i)}exists(...i){return this.translator?.exists(...i)}setDefaultNamespace(i){this.options.defaultNS=i}hasLoadedNamespace(i,r={}){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 s=r.lng||this.resolvedLanguage||this.languages[0],c=this.options?this.options.fallbackLng:!1,f=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const h=(m,y)=>{const p=this.services.backendConnector.state[`${m}|${y}`];return p===-1||p===0||p===2};if(r.precheck){const m=r.precheck(this,h);if(m!==void 0)return m}return!!(this.hasResourceBundle(s,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||h(s,i)&&(!c||h(f,i)))}loadNamespaces(i,r){const s=tr();return this.options.ns?(Ce(i)&&(i=[i]),i.forEach(c=>{this.options.ns.indexOf(c)<0&&this.options.ns.push(c)}),this.loadResources(c=>{s.resolve(),r&&r(c)}),s):(r&&r(),Promise.resolve())}loadLanguages(i,r){const s=tr();Ce(i)&&(i=[i]);const c=this.options.preload||[],f=i.filter(h=>c.indexOf(h)<0&&this.services.languageUtils.isSupportedCode(h));return f.length?(this.options.preload=c.concat(f),this.loadResources(h=>{s.resolve(),r&&r(h)}),s):(r&&r(),Promise.resolve())}dir(i){if(i||(i=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!i)return"rtl";try{const c=new Intl.Locale(i);if(c&&c.getTextInfo){const f=c.getTextInfo();if(f&&f.direction)return f.direction}}catch{}const r=["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"],s=this.services?.languageUtils||new lp(Cu());return i.toLowerCase().indexOf("-latn")>1?"ltr":r.indexOf(s.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(i={},r){const s=new ur(i,r);return s.createInstance=ur.createInstance,s}cloneInstance(i={},r=Ys){const s=i.forkResourceStore;s&&delete i.forkResourceStore;const c={...this.options,...i,isClone:!0},f=new ur(c);if((i.debug!==void 0||i.prefix!==void 0)&&(f.logger=f.logger.clone(i)),["store","services","language"].forEach(m=>{f[m]=this[m]}),f.services={...this.services},f.services.utils={hasLoadedNamespace:f.hasLoadedNamespace.bind(f)},s){const m=Object.keys(this.store.data).reduce((y,p)=>(y[p]={...this.store.data[p]},y[p]=Object.keys(y[p]).reduce((S,x)=>(S[x]={...y[p][x]},S),y[p]),y),{});f.store=new ap(m,c),f.services.resourceStore=f.store}if(i.interpolation){const y={...Cu().interpolation,...this.options.interpolation,...i.interpolation},p={...c,interpolation:y};f.services.interpolator=new op(p)}return f.translator=new Is(f.services,c),f.translator.on("*",(m,...y)=>{f.emit(m,...y)}),f.init(c,r),f.translator.options=c,f.translator.backendConnector.services.utils={hasLoadedNamespace:f.hasLoadedNamespace.bind(f)},f}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Yt=ur.createInstance();Yt.createInstance;Yt.dir;Yt.init;Yt.loadResources;Yt.reloadResources;Yt.use;Yt.changeLanguage;Yt.getFixedT;Yt.t;Yt.exists;Yt.setDefaultNamespace;Yt.hasLoadedNamespace;Yt.loadNamespaces;Yt.loadLanguages;var Ru={exports:{}},Re={};var fp;function s0(){if(fp)return Re;fp=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),h=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),_=Symbol.iterator;function E(N){return N===null||typeof N!="object"?null:(N=_&&N[_]||N["@@iterator"],typeof N=="function"?N:null)}var z={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D=Object.assign,A={};function W(N,q,I){this.props=N,this.context=q,this.refs=A,this.updater=I||z}W.prototype.isReactComponent={},W.prototype.setState=function(N,q){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,q,"setState")},W.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function X(){}X.prototype=W.prototype;function G(N,q,I){this.props=N,this.context=q,this.refs=A,this.updater=I||z}var ne=G.prototype=new X;ne.constructor=G,D(ne,W.prototype),ne.isPureReactComponent=!0;var re=Array.isArray;function ce(){}var P={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function $(N,q,I){var se=I.ref;return{$$typeof:n,type:N,key:q,ref:se!==void 0?se:null,props:I}}function Q(N,q){return $(N.type,q,N.props)}function H(N){return typeof N=="object"&&N!==null&&N.$$typeof===n}function ee(N){var q={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(I){return q[I]})}var pe=/\/+/g;function Z(N,q){return typeof N=="object"&&N!==null&&N.key!=null?ee(""+N.key):q.toString(36)}function ie(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(ce,ce):(N.status="pending",N.then(function(q){N.status==="pending"&&(N.status="fulfilled",N.value=q)},function(q){N.status==="pending"&&(N.status="rejected",N.reason=q)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function M(N,q,I,se,be){var je=typeof N;(je==="undefined"||je==="boolean")&&(N=null);var Te=!1;if(N===null)Te=!0;else switch(je){case"bigint":case"string":case"number":Te=!0;break;case"object":switch(N.$$typeof){case n:case i:Te=!0;break;case S:return Te=N._init,M(Te(N._payload),q,I,se,be)}}if(Te)return be=be(N),Te=se===""?"."+Z(N,0):se,re(be)?(I="",Te!=null&&(I=Te.replace(pe,"$&/")+"/"),M(be,q,I,"",function(Ba){return Ba})):be!=null&&(H(be)&&(be=Q(be,I+(be.key==null||N&&N.key===be.key?"":(""+be.key).replace(pe,"$&/")+"/")+Te)),q.push(be)),1;Te=0;var ot=se===""?".":se+":";if(re(N))for(var Qe=0;Qe<N.length;Qe++)se=N[Qe],je=ot+Z(se,Qe),Te+=M(se,q,I,je,be);else if(Qe=E(N),typeof Qe=="function")for(N=Qe.call(N),Qe=0;!(se=N.next()).done;)se=se.value,je=ot+Z(se,Qe++),Te+=M(se,q,I,je,be);else if(je==="object"){if(typeof N.then=="function")return M(ie(N),q,I,se,be);throw q=String(N),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return Te}function J(N,q,I){if(N==null)return N;var se=[],be=0;return M(N,se,"","",function(je){return q.call(I,je,be++)}),se}function ue(N){if(N._status===-1){var q=N._result;q=q(),q.then(function(I){(N._status===0||N._status===-1)&&(N._status=1,N._result=I)},function(I){(N._status===0||N._status===-1)&&(N._status=2,N._result=I)}),N._status===-1&&(N._status=0,N._result=q)}if(N._status===1)return N._result.default;throw N._result}var de=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},ae={map:J,forEach:function(N,q,I){J(N,function(){q.apply(this,arguments)},I)},count:function(N){var q=0;return J(N,function(){q++}),q},toArray:function(N){return J(N,function(q){return q})||[]},only:function(N){if(!H(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return Re.Activity=x,Re.Children=ae,Re.Component=W,Re.Fragment=r,Re.Profiler=c,Re.PureComponent=G,Re.StrictMode=s,Re.Suspense=y,Re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,Re.__COMPILER_RUNTIME={__proto__:null,c:function(N){return P.H.useMemoCache(N)}},Re.cache=function(N){return function(){return N.apply(null,arguments)}},Re.cacheSignal=function(){return null},Re.cloneElement=function(N,q,I){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var se=D({},N.props),be=N.key;if(q!=null)for(je in q.key!==void 0&&(be=""+q.key),q)!j.call(q,je)||je==="key"||je==="__self"||je==="__source"||je==="ref"&&q.ref===void 0||(se[je]=q[je]);var je=arguments.length-2;if(je===1)se.children=I;else if(1<je){for(var Te=Array(je),ot=0;ot<je;ot++)Te[ot]=arguments[ot+2];se.children=Te}return $(N.type,be,se)},Re.createContext=function(N){return N={$$typeof:h,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:f,_context:N},N},Re.createElement=function(N,q,I){var se,be={},je=null;if(q!=null)for(se in q.key!==void 0&&(je=""+q.key),q)j.call(q,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(be[se]=q[se]);var Te=arguments.length-2;if(Te===1)be.children=I;else if(1<Te){for(var ot=Array(Te),Qe=0;Qe<Te;Qe++)ot[Qe]=arguments[Qe+2];be.children=ot}if(N&&N.defaultProps)for(se in Te=N.defaultProps,Te)be[se]===void 0&&(be[se]=Te[se]);return $(N,je,be)},Re.createRef=function(){return{current:null}},Re.forwardRef=function(N){return{$$typeof:m,render:N}},Re.isValidElement=H,Re.lazy=function(N){return{$$typeof:S,_payload:{_status:-1,_result:N},_init:ue}},Re.memo=function(N,q){return{$$typeof:p,type:N,compare:q===void 0?null:q}},Re.startTransition=function(N){var q=P.T,I={};P.T=I;try{var se=N(),be=P.S;be!==null&&be(I,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(ce,de)}catch(je){de(je)}finally{q!==null&&I.types!==null&&(q.types=I.types),P.T=q}},Re.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},Re.use=function(N){return P.H.use(N)},Re.useActionState=function(N,q,I){return P.H.useActionState(N,q,I)},Re.useCallback=function(N,q){return P.H.useCallback(N,q)},Re.useContext=function(N){return P.H.useContext(N)},Re.useDebugValue=function(){},Re.useDeferredValue=function(N,q){return P.H.useDeferredValue(N,q)},Re.useEffect=function(N,q){return P.H.useEffect(N,q)},Re.useEffectEvent=function(N){return P.H.useEffectEvent(N)},Re.useId=function(){return P.H.useId()},Re.useImperativeHandle=function(N,q,I){return P.H.useImperativeHandle(N,q,I)},Re.useInsertionEffect=function(N,q){return P.H.useInsertionEffect(N,q)},Re.useLayoutEffect=function(N,q){return P.H.useLayoutEffect(N,q)},Re.useMemo=function(N,q){return P.H.useMemo(N,q)},Re.useOptimistic=function(N,q){return P.H.useOptimistic(N,q)},Re.useReducer=function(N,q,I){return P.H.useReducer(N,q,I)},Re.useRef=function(N){return P.H.useRef(N)},Re.useState=function(N){return P.H.useState(N)},Re.useSyncExternalStore=function(N,q,I){return P.H.useSyncExternalStore(N,q,I)},Re.useTransition=function(){return P.H.useTransition()},Re.version="19.2.4",Re}var dp;function no(){return dp||(dp=1,Ru.exports=s0()),Ru.exports}var b=no();const li=kv(b),o0=Lv({__proto__:null,default:li},[b]),c0=(n,i,r,s)=>{const c=[r,{code:i,...s||{}}];if(n?.services?.logger?.forward)return n.services.logger.forward(c,"warn","react-i18next::",!0);pl(c[0])&&(c[0]=`react-i18next:: ${c[0]}`),n?.services?.logger?.warn?n.services.logger.warn(...c):console?.warn&&console.warn(...c)},hp={},zg=(n,i,r,s)=>{pl(r)&&hp[r]||(pl(r)&&(hp[r]=new Date),c0(n,i,r,s))},Og=(n,i)=>()=>{if(n.isInitialized)i();else{const r=()=>{setTimeout(()=>{n.off("initialized",r)},0),i()};n.on("initialized",r)}},$u=(n,i,r)=>{n.loadNamespaces(i,Og(n,r))},mp=(n,i,r,s)=>{if(pl(r)&&(r=[r]),n.options.preload&&n.options.preload.indexOf(i)>-1)return $u(n,r,s);r.forEach(c=>{n.options.ns.indexOf(c)<0&&n.options.ns.push(c)}),n.loadLanguages(i,Og(n,s))},u0=(n,i,r={})=>!i.languages||!i.languages.length?(zg(i,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:i.languages}),!0):i.hasLoadedNamespace(n,{lng:r.lng,precheck:(s,c)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!c(s.isLanguageChangingTo,n))return!1}}),pl=n=>typeof n=="string",f0=n=>typeof n=="object"&&n!==null,d0=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,h0={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},m0=n=>h0[n],p0=n=>n.replace(d0,m0);let Xu={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:p0,transDefaultProps:void 0};const g0=(n={})=>{Xu={...Xu,...n}},y0=()=>Xu;let Tg;const x0=n=>{Tg=n},v0=()=>Tg,b0={type:"3rdParty",init(n){g0(n.options.react),x0(n)}},S0=b.createContext();class _0{constructor(){this.usedNamespaces={}}addUsedNamespaces(i){i.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var zu={exports:{}},Ou={};var pp;function j0(){if(pp)return Ou;pp=1;var n=no();function i(x,_){return x===_&&(x!==0||1/x===1/_)||x!==x&&_!==_}var r=typeof Object.is=="function"?Object.is:i,s=n.useState,c=n.useEffect,f=n.useLayoutEffect,h=n.useDebugValue;function m(x,_){var E=_(),z=s({inst:{value:E,getSnapshot:_}}),D=z[0].inst,A=z[1];return f(function(){D.value=E,D.getSnapshot=_,y(D)&&A({inst:D})},[x,E,_]),c(function(){return y(D)&&A({inst:D}),x(function(){y(D)&&A({inst:D})})},[x]),h(E),E}function y(x){var _=x.getSnapshot;x=x.value;try{var E=_();return!r(x,E)}catch{return!0}}function p(x,_){return _()}var S=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:m;return Ou.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:S,Ou}var gp;function N0(){return gp||(gp=1,zu.exports=j0()),zu.exports}var E0=N0();const w0=(n,i)=>pl(i)?i:f0(i)&&pl(i.defaultValue)?i.defaultValue:Array.isArray(n)?n[n.length-1]:n,C0={t:w0,ready:!1},R0=()=>()=>{},we=(n,i={})=>{const{i18n:r}=i,{i18n:s,defaultNS:c}=b.useContext(S0)||{},f=r||s||v0();f&&!f.reportNamespaces&&(f.reportNamespaces=new _0),f||zg(f,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const h=b.useMemo(()=>({...y0(),...f?.options?.react,...i}),[f,i]),{useSuspense:m,keyPrefix:y}=h,p=c||f?.options?.defaultNS,S=pl(p)?[p]:p||["translation"],x=b.useMemo(()=>S,S);f?.reportNamespaces?.addUsedNamespaces?.(x);const _=b.useRef(0),E=b.useCallback($=>{if(!f)return R0;const{bindI18n:Q,bindI18nStore:H}=h,ee=()=>{_.current+=1,$()};return Q&&f.on(Q,ee),H&&f.store.on(H,ee),()=>{Q&&Q.split(" ").forEach(pe=>f.off(pe,ee)),H&&H.split(" ").forEach(pe=>f.store.off(pe,ee))}},[f,h]),z=b.useRef(),D=b.useCallback(()=>{if(!f)return C0;const $=!!(f.isInitialized||f.initializedStoreOnce)&&x.every(ie=>u0(ie,f,h)),Q=i.lng||f.language,H=_.current,ee=z.current;if(ee&&ee.ready===$&&ee.lng===Q&&ee.keyPrefix===y&&ee.revision===H)return ee;const Z={t:f.getFixedT(Q,h.nsMode==="fallback"?x:x[0],y),ready:$,lng:Q,keyPrefix:y,revision:H};return z.current=Z,Z},[f,x,y,h,i.lng]),[A,W]=b.useState(0),{t:X,ready:G}=E0.useSyncExternalStore(E,D,D);b.useEffect(()=>{if(f&&!G&&!m){const $=()=>W(Q=>Q+1);i.lng?mp(f,i.lng,x,$):$u(f,x,$)}},[f,i.lng,x,G,m,A]);const ne=f||{},re=b.useRef(null),ce=b.useRef(),P=$=>{const Q=Object.getOwnPropertyDescriptors($);Q.__original&&delete Q.__original;const H=Object.create(Object.getPrototypeOf($),Q);if(!Object.prototype.hasOwnProperty.call(H,"__original"))try{Object.defineProperty(H,"__original",{value:$,writable:!1,enumerable:!1,configurable:!1})}catch{}return H},j=b.useMemo(()=>{const $=ne,Q=$?.language;let H=$;$&&(re.current&&re.current.__original===$?ce.current!==Q?(H=P($),re.current=H,ce.current=Q):H=re.current:(H=P($),re.current=H,ce.current=Q));const ee=[X,H,G];return ee.t=X,ee.i18n=H,ee.ready=G,ee},[X,ne,G,ne.resolvedLanguage,ne.language,ne.languages]);if(f&&m&&!G)throw new Promise($=>{const Q=()=>$();i.lng?mp(f,i.lng,x,Q):$u(f,x,Q)});return j},{slice:z0,forEach:O0}=[];function T0(n){return O0.call(z0.call(arguments,1),i=>{if(i)for(const r in i)n[r]===void 0&&(n[r]=i[r])}),n}function D0(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(r=>r.test(n))}const yp=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,M0=function(n,i){const s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},c=encodeURIComponent(i);let f=`${n}=${c}`;if(s.maxAge>0){const h=s.maxAge-0;if(Number.isNaN(h))throw new Error("maxAge should be a Number");f+=`; Max-Age=${Math.floor(h)}`}if(s.domain){if(!yp.test(s.domain))throw new TypeError("option domain is invalid");f+=`; Domain=${s.domain}`}if(s.path){if(!yp.test(s.path))throw new TypeError("option path is invalid");f+=`; Path=${s.path}`}if(s.expires){if(typeof s.expires.toUTCString!="function")throw new TypeError("option expires is invalid");f+=`; Expires=${s.expires.toUTCString()}`}if(s.httpOnly&&(f+="; HttpOnly"),s.secure&&(f+="; Secure"),s.sameSite)switch(typeof s.sameSite=="string"?s.sameSite.toLowerCase():s.sameSite){case!0:f+="; SameSite=Strict";break;case"lax":f+="; SameSite=Lax";break;case"strict":f+="; SameSite=Strict";break;case"none":f+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s.partitioned&&(f+="; Partitioned"),f},xp={create(n,i,r,s){let c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(c.expires=new Date,c.expires.setTime(c.expires.getTime()+r*60*1e3)),s&&(c.domain=s),document.cookie=M0(n,i,c)},read(n){const i=`${n}=`,r=document.cookie.split(";");for(let s=0;s<r.length;s++){let c=r[s];for(;c.charAt(0)===" ";)c=c.substring(1,c.length);if(c.indexOf(i)===0)return c.substring(i.length,c.length)}return null},remove(n,i){this.create(n,"",-1,i)}};var A0={name:"cookie",lookup(n){let{lookupCookie:i}=n;if(i&&typeof document<"u")return xp.read(i)||void 0},cacheUserLanguage(n,i){let{lookupCookie:r,cookieMinutes:s,cookieDomain:c,cookieOptions:f}=i;r&&typeof document<"u"&&xp.create(r,n,s,c,f)}},L0={name:"querystring",lookup(n){let{lookupQuerystring:i}=n,r;if(typeof window<"u"){let{search:s}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(s=window.location.hash.substring(window.location.hash.indexOf("?")));const f=s.substring(1).split("&");for(let h=0;h<f.length;h++){const m=f[h].indexOf("=");m>0&&f[h].substring(0,m)===i&&(r=f[h].substring(m+1))}}return r}},k0={name:"hash",lookup(n){let{lookupHash:i,lookupFromHashIndex:r}=n,s;if(typeof window<"u"){const{hash:c}=window.location;if(c&&c.length>2){const f=c.substring(1);if(i){const h=f.split("&");for(let m=0;m<h.length;m++){const y=h[m].indexOf("=");y>0&&h[m].substring(0,y)===i&&(s=h[m].substring(y+1))}}if(s)return s;if(!s&&r>-1){const h=c.match(/\/([a-zA-Z-]*)/g);return Array.isArray(h)?h[typeof r=="number"?r:0]?.replace("/",""):void 0}}}return s}};let ti=null;const vp=()=>{if(ti!==null)return ti;try{if(ti=typeof window<"u"&&window.localStorage!==null,!ti)return!1;const n="i18next.translate.boo";window.localStorage.setItem(n,"foo"),window.localStorage.removeItem(n)}catch{ti=!1}return ti};var U0={name:"localStorage",lookup(n){let{lookupLocalStorage:i}=n;if(i&&vp())return window.localStorage.getItem(i)||void 0},cacheUserLanguage(n,i){let{lookupLocalStorage:r}=i;r&&vp()&&window.localStorage.setItem(r,n)}};let ai=null;const bp=()=>{if(ai!==null)return ai;try{if(ai=typeof window<"u"&&window.sessionStorage!==null,!ai)return!1;const n="i18next.translate.boo";window.sessionStorage.setItem(n,"foo"),window.sessionStorage.removeItem(n)}catch{ai=!1}return ai};var H0={name:"sessionStorage",lookup(n){let{lookupSessionStorage:i}=n;if(i&&bp())return window.sessionStorage.getItem(i)||void 0},cacheUserLanguage(n,i){let{lookupSessionStorage:r}=i;r&&bp()&&window.sessionStorage.setItem(r,n)}},B0={name:"navigator",lookup(n){const i=[];if(typeof navigator<"u"){const{languages:r,userLanguage:s,language:c}=navigator;if(r)for(let f=0;f<r.length;f++)i.push(r[f]);s&&i.push(s),c&&i.push(c)}return i.length>0?i:void 0}},q0={name:"htmlTag",lookup(n){let{htmlTag:i}=n,r;const s=i||(typeof document<"u"?document.documentElement:null);return s&&typeof s.getAttribute=="function"&&(r=s.getAttribute("lang")),r}},Y0={name:"path",lookup(n){let{lookupFromPathIndex:i}=n;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?r[typeof i=="number"?i:0]?.replace("/",""):void 0}},V0={name:"subdomain",lookup(n){let{lookupFromSubdomainIndex:i}=n;const r=typeof i=="number"?i+1:1,s=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(s)return s[r]}};let Dg=!1;try{document.cookie,Dg=!0}catch{}const Mg=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Dg||Mg.splice(1,1);const G0=()=>({order:Mg,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:n=>n});class Ag{constructor(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(i,r)}init(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=i,this.options=T0(r,this.options||{},G0()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=c=>c.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=s,this.addDetector(A0),this.addDetector(L0),this.addDetector(U0),this.addDetector(H0),this.addDetector(B0),this.addDetector(q0),this.addDetector(Y0),this.addDetector(V0),this.addDetector(k0)}addDetector(i){return this.detectors[i.name]=i,this}detect(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,r=[];return i.forEach(s=>{if(this.detectors[s]){let c=this.detectors[s].lookup(this.options);c&&typeof c=="string"&&(c=[c]),c&&(r=r.concat(c))}}),r=r.filter(s=>s!=null&&!D0(s)).map(s=>this.options.convertDetectedLanguage(s)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(i)>-1||r.forEach(s=>{this.detectors[s]&&this.detectors[s].cacheUserLanguage(i,this.options)}))}}Ag.type="languageDetector";const K0={"nav.home":"Home","nav.studio":"Studio","nav.docs":"Docs","nav.login":"Login","nav.logout":"Logout","header.status.connected":"Connected","header.status.disconnected":"Disconnected","header.status.reconnecting":"Reconnecting","footer.copyright":"GitHub · @Context4AI {{year}}. All rights reserved.","footer.tagline":"Knowledge Factory","footer.theme.dark":"Dark","footer.theme.light":"Light","footer.theme.system":"System","studio.sidebar.sources":"Sources","studio.sidebar.modeling":"Modeling","studio.sidebar.brain":"Brain","studio.sidebar.discovery":"Discovery","studio.sidebar.sharing":"Sharing","studio.sidebar.collaboration":"Collaboration","studio.sidebar.settings":"Settings","placeholder.coming":"Coming in {{version}}","page.login.title":"Login","page.login.description":"Authentication and user management.","page.docs.title":"Docs","page.docs.description":"Public documentation portal.","page.sources.title":"Sources","page.sources.description":"Add code repositories, documents, and other input materials for your brain to index.","page.modeling.title":"Modeling","page.modeling.description":"Model indexed content with AI — only what stands up to scrutiny gets written to the knowledge graph.","page.brain.title":"Brain","page.brain.description":"All modeled knowledge lives here — browse, search, analyze, and use it anytime.","page.discovery.title":"Discovery","page.discovery.description":"Explore knowledge curated by others and add what's useful to your own brain.","page.sharing.title":"Sharing","page.sharing.description":"Package and export knowledge from your brain for others and AI to use directly.","page.collaboration.title":"Collaboration","page.collaboration.description":"Stay in sync with other brains — get notified on updates, no manual transfer needed.","page.settings.title":"Settings","page.settings.description":"Manage workspace members and configuration.","page.code_setup.title":"Code Setup","page.code_setup.description":"Repository selection and configuration for code modeling.","page.code_compile.title":"Code Compile","page.code_compile.description":"Compilation progress tracking for code modeling.","page.code_review.title":"Code Review","page.code_review.description":"Review and approve modeling results.","page.code_result.title":"Code Result","page.code_result.description":"View final modeling results and generated knowledge graph.","home.hero.title":"Context For AI","home.hero.description":"Transform code repositories and business documents into structured knowledge graphs.","home.hero.cta.studio":"Enter Studio","home.hero.cta.github":"GitHub","notfound.title":"404","notfound.description":"The page you're looking for doesn't exist.","notfound.back":"Back to Home","sources.menu.add_client":"Add Client","sources.menu.online":"online","sources.menu.offline":"offline","sources.library.default_cloud_name":"Personal Cloud","sources.library.rename":"Rename","sources.library.rename_placeholder":"Enter library name","sources.header.daemon_status":"{{online}}/{{total}} online","sources.header.all_offline":"All offline","sources.actions.new_folder":"New Folder","sources.folder.name_placeholder":"Enter folder name","sources.actions.import_repo":"Import Repository","sources.actions.rename":"Rename","sources.actions.move_to":"Move to...","sources.actions.delete":"Delete","sources.filter.all":"All","sources.filter.indexed":"Indexed","sources.filter.not_indexed":"Not Indexed","sources.status.none":"None","sources.status.indexed":"Indexed","sources.status.stale":"Stale","sources.type.code":"Code","sources.type.doc":"Document","sources.empty.cloud.title":"Your personal knowledge input zone","sources.empty.cloud.description":"Create folders to organize your documents and materials. These are visible only to you and will serve as the foundation for building your digital brain.","sources.empty.daemon.title":"Connect your local code assets","sources.empty.daemon.description":"Import local code repositories. The system will automatically extract code structures and technical documents, transforming them into structured knowledge.","sources.empty.indexed.title":"Knowledge not yet indexed","sources.empty.indexed.description":"Select sources and complete indexing. They will be transformed into structured summaries, providing material for your future speculations.","sources.empty.folder.title":"This folder is empty","sources.empty.folder.daemon_description":"You can add or edit documents locally, and they will appear here after the next sync.","sources.safety.notice.repo":"In local mode, your code has absolute privacy. Source code never leaves your computer. The system only extracts structured summaries for knowledge modeling (function signatures, dependencies, etc.).","sources.safety.notice.dir":"The system extracts document content and summaries for knowledge modeling. Although unsafe text is filtered, please ensure sensitive data is not included in indexing or modeling.","sources.import.title":"Import Repository","sources.import.step.select":"Select Repository","sources.import.step.version":"Version Selection","sources.import.step.confirm":"Confirm Import","sources.import.daemon_offline":"Client {{name}} is not connected. Please start the local Daemon and connect to the server before importing.","sources.import.view_guide":"View Connection Guide","sources.import.select_root":"Select repository root directory","sources.import.current_path":"Current path","sources.import.not_git":"This directory is not a Git repository. Please select a directory containing .git.","sources.import.branch":"Branch","sources.import.commit":"Commit","sources.import.branch_warning":"Currently based on {{branch}} branch HEAD","sources.import.uncommitted_warning":"Uncommitted changes will not be collected","sources.import.recognized":"Recognized {{packages}} packages and {{docs}} documents","sources.import.no_packages":"No package structure detected. Will be imported as a single-package repository.","sources.import.confirm_heading":"About to import the following repository to {{name}}:","sources.import.packages":"Packages","sources.import.documents":"Documents","sources.import.importing":"Importing...","sources.import.success":"Import complete","sources.add_client.title":"Connect Local Knowledge Source","sources.add_client.description":"Start a client (Daemon) on your local computer to mount local code repositories as input material into your digital brain.","sources.add_client.step1":"Install Daemon","sources.add_client.step2":"Start Daemon","sources.add_client.step3":"Wait for connection","sources.add_client.step3_desc":"This page will update automatically once connected.","sources.add_client.waiting":"Waiting for client connection...","sources.add_client.detected":"New client detected","sources.add_client.machine_name":"Machine ID","sources.add_client.os":"Operating system","sources.add_client.daemon_version":"Daemon version","sources.add_client.client_name":"Client name","sources.add_client.confirm":"Confirm Add","sources.add_client.reconnected":"Client {{name}} has reconnected","sources.add_client.go_to":"Go to {{name}}","sources.detail.tab.original":"Original","sources.detail.tab.overview":"Overview","sources.detail.tab.digest":"Digest","sources.detail.tab.modeling":"Modeling Result","sources.detail.digest_placeholder":"Structured summary will be available here after indexing is complete.","sources.detail.modeling_placeholder":"Knowledge entities derived from this source will appear here after modeling in the speculation zone.","sources.detail.type":"Type","sources.detail.origin":"Origin","sources.detail.origin.upload":"Upload","sources.detail.origin.local":"Local file","sources.detail.path":"Path","sources.detail.status":"Status","sources.detail.repo":"Repository","sources.detail.branch":"Branch","sources.detail.commit":"Commit","sources.detail.tech_stack":"Tech stack","sources.detail.original_code_placeholder":"Package overview will be available after indexing.","sources.detail.original_doc_placeholder":"Document content will be available after upload.","sources.detail.dependencies":"Dependencies","sources.delete.confirm_title":"Confirm Delete","sources.delete.resource":"Are you sure you want to delete {{name}}?","sources.delete.resource_impact":"The following data will be permanently deleted: original content, structured digest (if any).","sources.delete.session_warning":"If your personal speculation zone is using this source, related candidate speculations will be affected.","sources.delete.entity_safe":"Formal knowledge already merged into the brain will not be affected.","sources.delete.folder":"Are you sure you want to delete folder {{name}}?","sources.delete.folder_impact":"All resources inside will be recursively deleted: {{folders}} sub-folders, {{sources}} sources.","sources.delete.folder_impact_generic":"All sub-folders and resources inside will be recursively deleted.","sources.delete.irreversible":"This action cannot be undone.","sources.delete.repo":"Are you sure you want to remove repository {{name}} from {{library}}?","sources.delete.repo_impact":"Will delete: {{packages}} package index records, {{docs}} document index records.","sources.delete.repo_impact_generic":"All package and document index records will be deleted.","sources.delete.local_safe":"Local files will not be affected.","sources.delete.client":"Are you sure you want to delete client {{name}}?","sources.delete.client_impact":"All imported repository records and related index data under this client will be deleted.","sources.delete.client_reregister":"This client will need to re-register on next connection.","sources.error.name_conflict":'An item named "{{name}}" already exists in this directory.',"sources.move.current":"Current","sources.move.target":"Move to","sources.breadcrumb.sources":"Sources","common.cancel":"Cancel","common.confirm":"Confirm","common.back":"Back","common.next":"Next","common.previous":"Previous","common.items":"{{count}} items","common.loading":"Loading...","sources.import.no_entries":"No entries found","sources.import.allowed_dirs":"Client authorized directories","sources.import.allowed_dirs_tooltip_restrict":"Restrict to specific directories:","sources.import.allowed_dirs_tooltip_all":"Or allow all directories (default):","sources.import.wildcard_home":"Home","sources.import.wildcard_path_placeholder":"Enter a directory path…","sources.import.wildcard_go":"Go","sources.import.wildcard_goto":"Go to","sources.import.wildcard_go_title":"Go to Directory","sources.import.wildcard_path_not_found":"Path does not exist on the remote machine","sources.import.already_imported":"Imported","sources.import.dir_title":"Import Directory","sources.import.dir_step.select":"Select Directory","sources.import.dir_step.scan":"Scan","sources.import.dir_step.confirm":"Confirm Import","sources.import.dir_confirm_heading":"About to import the following directory to {{name}}:","sources.import.dir_name":"Directory Name","sources.import.dir_path":"Directory Path","sources.import.dir_files":"Files","sources.import.dir_subdirs":"Subdirectories","sources.import.dir_git_repos":"Git Repositories","sources.import.dir_git_hint":"Git repositories inside the directory will not be expanded for indexing. Import them separately if needed.","sources.import.dir_scanning":"Scanning directory contents...","sources.import.dir_scan_complete":"Scan complete","sources.import.dir_scan_error":"Failed to scan directory","sources.import.dir_scan_retry":"Retry","sources.import.dir_code_packages":"Code Packages","sources.import.dir_doc_files":"Documents","sources.import.dir_total_files":"Total Files","sources.import.dir_total_dirs":"Directories","sources.import.dir_git_skip_hint":"{{count}} Git repo(s) will be skipped. Import them via 'Import Repository'.","sources.actions.upload":"Upload","sources.actions.upload_md":"Markdown Document","sources.actions.add":"Add","sources.actions.add_folder":"Folder","sources.actions.add_web":"Web Page","sources.actions.add_feishu":"Feishu Document","sources.actions.import_dir":"Import Directory","sources.actions.import_repo_url":"Import Repository","sources.upgrade.title":"Feature Upgrading","sources.upgrade.description":"This feature will be available in version 0.5.x. Stay tuned."},$0={"nav.home":"首页","nav.studio":"工作台","nav.docs":"文档","nav.login":"登录","nav.logout":"退出登录","header.status.connected":"已连接","header.status.disconnected":"已断开","header.status.reconnecting":"重连中","footer.copyright":"GitHub · @Context4AI {{year}}. 版权所有 ","footer.tagline":"知识工厂","footer.theme.dark":"暗色","footer.theme.light":"亮色","footer.theme.system":"跟随系统","studio.sidebar.sources":"知识索引","studio.sidebar.modeling":"知识建模","studio.sidebar.brain":"知识大脑","studio.sidebar.discovery":"发现知识","studio.sidebar.sharing":"分享知识","studio.sidebar.collaboration":"知识协同","studio.sidebar.settings":"设置","placeholder.coming":"计划在 {{version}} 版本实现","page.login.title":"登录","page.login.description":"身份验证与用户管理。","page.docs.title":"文档","page.docs.description":"公开文档门户。","page.sources.title":"知识索引","page.sources.description":"添加代码仓库、文档等输入材料,让大脑完成初步索引。","page.modeling.title":"知识建模","page.modeling.description":"和 AI 一起对索引内容建模,只有经得起推敲的才写入知识图谱。","page.brain.title":"知识大脑","page.brain.description":"建模完成的全部知识都在这里——浏览、搜索、分析,随时调用。","page.discovery.title":"发现知识","page.discovery.description":"看看别人整理好的知识,发现有用的一键补充到自己的大脑。","page.sharing.title":"分享知识","page.sharing.description":"把大脑中的知识打包输出,让别人和 AI 都能直接使用。","page.collaboration.title":"知识协同","page.collaboration.description":"和其他大脑保持同步,知识更新时自动通知,不用手动搬运。","page.settings.title":"设置","page.settings.description":"管理大脑的成员和配置。","page.code_setup.title":"代码设置","page.code_setup.description":"代码建模的仓库选择与配置。","page.code_compile.title":"代码编译","page.code_compile.description":"代码建模的编译进度追踪。","page.code_review.title":"代码审查","page.code_review.description":"审查并确认建模结果。","page.code_result.title":"代码结果","page.code_result.description":"查看最终建模结果与生成的知识图谱。","home.hero.title":"Context For AI","home.hero.description":"将代码仓库和业务文档转化为结构化知识图谱。","home.hero.cta.studio":"进入工作台","home.hero.cta.github":"GitHub","notfound.title":"404","notfound.description":"您访问的页面不存在。","notfound.back":"返回首页","sources.menu.add_client":"添加客户端","sources.menu.online":"在线","sources.menu.offline":"离线","sources.library.default_cloud_name":"个人云","sources.library.rename":"重命名","sources.library.rename_placeholder":"输入名称","sources.header.daemon_status":"{{online}}/{{total}} 在线","sources.header.all_offline":"全部离线","sources.actions.new_folder":"新文件夹","sources.folder.name_placeholder":"输入文件夹名称","sources.actions.import_repo":"导入仓库","sources.actions.rename":"重命名","sources.actions.move_to":"移动到...","sources.actions.delete":"删除","sources.filter.all":"全部","sources.filter.indexed":"已索引","sources.filter.not_indexed":"未索引","sources.status.none":"未索引","sources.status.indexed":"已索引","sources.status.stale":"索引过期","sources.type.code":"代码","sources.type.doc":"文档","sources.empty.cloud.title":"这里是你专属的知识输入区","sources.empty.cloud.description":"创建文件夹来整理你的文档和材料。这些内容仅你个人可见,将成为后续推演、构建数字大脑的基础。","sources.empty.daemon.title":"连接你的本地代码资产","sources.empty.daemon.description":"导入本地代码仓库,系统会自动提取代码结构与技术文档,将其转化为结构化知识。","sources.empty.indexed.title":"这些知识尚未被索引","sources.empty.indexed.description":"选择资源并完成索引后,它们将转化为结构化摘要,为你后续的推演提供素材。","sources.empty.folder.title":"当前文件夹还没有内容","sources.empty.folder.daemon_description":"你可以在本地进行文档新增、编辑后查看。","sources.safety.notice.repo":"在本地模式下,你的代码保有绝对隐私,源代码永远不会离开你的电脑,系统仅提取用于知识建模的结构化摘要(函数签名、依赖关系等)。","sources.safety.notice.dir":"系统会提取用于知识建模的文档内容及摘要,尽管会过滤不安全的文本内容,但请确保敏感数据不要参与索引及建模。","sources.import.title":"导入代码仓库","sources.import.step.select":"选择仓库","sources.import.step.version":"版本选择","sources.import.step.confirm":"确认导入","sources.import.daemon_offline":"客户端 {{name}} 未连接,请先启动本地 Daemon 并连接到服务器后再导入仓库。","sources.import.view_guide":"查看连接指引","sources.import.select_root":"选择仓库根目录","sources.import.current_path":"当前路径","sources.import.not_git":"该目录不是 Git 仓库,请选择包含 .git 的目录。","sources.import.branch":"分支","sources.import.commit":"提交","sources.import.branch_warning":"当前基于 {{branch}} 分支的 HEAD","sources.import.uncommitted_warning":"未提交的修改不会被采集","sources.import.recognized":"已识别 {{packages}} 个包和 {{docs}} 篇文档","sources.import.no_packages":"未识别到包结构,将作为单包仓库导入。","sources.import.confirm_heading":"即将导入以下仓库到 {{name}}:","sources.import.packages":"包数","sources.import.documents":"文档","sources.import.importing":"导入中...","sources.import.success":"导入完成","sources.add_client.title":"接入本地知识源","sources.add_client.description":"在本地计算机上启动客户端 (Daemon),即可将本地代码仓库作为输入材料,挂载到你的数字大脑中。","sources.add_client.step1":"安装 Daemon","sources.add_client.step2":"启动 Daemon","sources.add_client.step3":"等待连接","sources.add_client.step3_desc":"连接成功后,本页面将自动更新。","sources.add_client.waiting":"等待客户端连接...","sources.add_client.detected":"检测到新的本地客户端","sources.add_client.machine_name":"机器标识","sources.add_client.os":"操作系统","sources.add_client.daemon_version":"Daemon 版本","sources.add_client.client_name":"客户端名称","sources.add_client.confirm":"确认添加","sources.add_client.reconnected":"客户端 {{name}} 已重新连接","sources.add_client.go_to":"前往 {{name}}","sources.detail.tab.original":"原文","sources.detail.tab.overview":"概览","sources.detail.tab.digest":"摘要","sources.detail.tab.modeling":"建模结果","sources.detail.digest_placeholder":"完成索引后,即可在此查看结构化摘要。","sources.detail.modeling_placeholder":"在推演区完成建模后,此处将展示由该源产生的知识实体。","sources.detail.type":"类型","sources.detail.origin":"来源","sources.detail.origin.upload":"直接上传","sources.detail.origin.local":"本地文件","sources.detail.path":"路径","sources.detail.status":"状态","sources.detail.repo":"仓库","sources.detail.branch":"分支","sources.detail.commit":"提交","sources.detail.tech_stack":"技术栈","sources.detail.original_code_placeholder":"完成索引后即可查看包概览。","sources.detail.original_doc_placeholder":"文档内容将在上传后展示。","sources.detail.dependencies":"依赖","sources.delete.confirm_title":"确认删除","sources.delete.resource":"确定要删除 {{name}}?","sources.delete.resource_impact":"以下数据将被永久删除:原文内容、结构化摘要(如有)。","sources.delete.session_warning":"如果你的个人推演区正在使用此知识源,相关的候选推演将受到影响。","sources.delete.entity_safe":"已汇入大脑的正式知识不受影响。","sources.delete.folder":"确定要删除文件夹 {{name}}?","sources.delete.folder_impact":"文件夹内的所有资源将被递归删除:{{folders}} 个子文件夹、{{sources}} 个知识源。","sources.delete.folder_impact_generic":"文件夹内的所有子文件夹和知识源将被递归删除。","sources.delete.irreversible":"此操作不可撤销。","sources.delete.repo":"确定要从 {{library}} 中移除仓库 {{name}}?","sources.delete.repo_impact":"将删除:{{packages}} 个包的索引记录、{{docs}} 篇文档的索引记录。","sources.delete.repo_impact_generic":"所有包和文档的索引记录将被删除。","sources.delete.local_safe":"本地文件不受影响。","sources.delete.client":"确定要删除客户端 {{name}}?","sources.delete.client_impact":"该客户端下的所有已导入仓库记录和相关索引数据将被删除。","sources.delete.client_reregister":"该客户端下次连接时将触发重新注册。","sources.error.name_conflict":'该目录下已存在同名项"{{name}}"。',"sources.move.current":"当前位置","sources.move.target":"移动到","sources.breadcrumb.sources":"知识索引","common.cancel":"取消","common.confirm":"确认","common.back":"返回","common.next":"下一步","common.previous":"上一步","common.items":"{{count}} 项","common.loading":"加载中...","sources.import.no_entries":"未找到任何条目","sources.import.allowed_dirs":"客户端授权目录","sources.import.allowed_dirs_tooltip_restrict":"通过参数设定有权限的目录:","sources.import.allowed_dirs_tooltip_all":"或默认允许全部目录:","sources.import.wildcard_home":"主目录","sources.import.wildcard_path_placeholder":"输入目录路径…","sources.import.wildcard_go":"前往","sources.import.wildcard_goto":"前往","sources.import.wildcard_go_title":"前往目录","sources.import.wildcard_path_not_found":"该路径在远程机器上不存在","sources.import.already_imported":"已导入","sources.import.dir_title":"导入目录","sources.import.dir_step.select":"选择目录","sources.import.dir_step.scan":"扫描","sources.import.dir_step.confirm":"确认导入","sources.import.dir_confirm_heading":"即将导入以下目录到 {{name}}:","sources.import.dir_name":"目录名","sources.import.dir_path":"目录路径","sources.import.dir_files":"文件数","sources.import.dir_subdirs":"子目录数","sources.import.dir_git_repos":"Git 仓库","sources.import.dir_git_hint":"目录内的 Git 仓库不会被展开索引,如需索引请单独导入仓库。","sources.import.dir_scanning":"正在扫描目录内容...","sources.import.dir_scan_complete":"扫描完成","sources.import.dir_scan_error":"目录扫描失败","sources.import.dir_scan_retry":"重试","sources.import.dir_code_packages":"代码包","sources.import.dir_doc_files":"文档","sources.import.dir_total_files":"文件总数","sources.import.dir_total_dirs":"目录","sources.import.dir_git_skip_hint":"{{count}} 个 Git 仓库将被跳过,请通过「导入仓库」单独导入。","sources.actions.upload":"上传","sources.actions.upload_md":"Markdown 文档","sources.actions.add":"新增","sources.actions.add_folder":"文件夹","sources.actions.add_web":"网页","sources.actions.add_feishu":"飞书文档","sources.actions.import_dir":"导入目录","sources.actions.import_repo_url":"导入仓库","sources.upgrade.title":"功能升级中","sources.upgrade.description":"此功能将在 0.5.x 版本中推出,敬请期待。"};Yt.use(Ag).use(b0).init({resources:{en:{translation:K0},zh:{translation:$0}},fallbackLng:"en",interpolation:{escapeValue:!1},detection:{order:["localStorage"],caches:["localStorage"],lookupLocalStorage:"lang"}});var Tu={exports:{}},ar={},Du={exports:{}},Mu={};var Sp;function X0(){return Sp||(Sp=1,(function(n){function i(M,J){var ue=M.length;M.push(J);e:for(;0<ue;){var de=ue-1>>>1,ae=M[de];if(0<c(ae,J))M[de]=J,M[ue]=ae,ue=de;else break e}}function r(M){return M.length===0?null:M[0]}function s(M){if(M.length===0)return null;var J=M[0],ue=M.pop();if(ue!==J){M[0]=ue;e:for(var de=0,ae=M.length,N=ae>>>1;de<N;){var q=2*(de+1)-1,I=M[q],se=q+1,be=M[se];if(0>c(I,ue))se<ae&&0>c(be,I)?(M[de]=be,M[se]=ue,de=se):(M[de]=I,M[q]=ue,de=q);else if(se<ae&&0>c(be,ue))M[de]=be,M[se]=ue,de=se;else break e}}return J}function c(M,J){var ue=M.sortIndex-J.sortIndex;return ue!==0?ue:M.id-J.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var h=Date,m=h.now();n.unstable_now=function(){return h.now()-m}}var y=[],p=[],S=1,x=null,_=3,E=!1,z=!1,D=!1,A=!1,W=typeof setTimeout=="function"?setTimeout:null,X=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;function ne(M){for(var J=r(p);J!==null;){if(J.callback===null)s(p);else if(J.startTime<=M)s(p),J.sortIndex=J.expirationTime,i(y,J);else break;J=r(p)}}function re(M){if(D=!1,ne(M),!z)if(r(y)!==null)z=!0,ce||(ce=!0,ee());else{var J=r(p);J!==null&&ie(re,J.startTime-M)}}var ce=!1,P=-1,j=5,$=-1;function Q(){return A?!0:!(n.unstable_now()-$<j)}function H(){if(A=!1,ce){var M=n.unstable_now();$=M;var J=!0;try{e:{z=!1,D&&(D=!1,X(P),P=-1),E=!0;var ue=_;try{t:{for(ne(M),x=r(y);x!==null&&!(x.expirationTime>M&&Q());){var de=x.callback;if(typeof de=="function"){x.callback=null,_=x.priorityLevel;var ae=de(x.expirationTime<=M);if(M=n.unstable_now(),typeof ae=="function"){x.callback=ae,ne(M),J=!0;break t}x===r(y)&&s(y),ne(M)}else s(y);x=r(y)}if(x!==null)J=!0;else{var N=r(p);N!==null&&ie(re,N.startTime-M),J=!1}}break e}finally{x=null,_=ue,E=!1}J=void 0}}finally{J?ee():ce=!1}}}var ee;if(typeof G=="function")ee=function(){G(H)};else if(typeof MessageChannel<"u"){var pe=new MessageChannel,Z=pe.port2;pe.port1.onmessage=H,ee=function(){Z.postMessage(null)}}else ee=function(){W(H,0)};function ie(M,J){P=W(function(){M(n.unstable_now())},J)}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(M){M.callback=null},n.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<M?Math.floor(1e3/M):5},n.unstable_getCurrentPriorityLevel=function(){return _},n.unstable_next=function(M){switch(_){case 1:case 2:case 3:var J=3;break;default:J=_}var ue=_;_=J;try{return M()}finally{_=ue}},n.unstable_requestPaint=function(){A=!0},n.unstable_runWithPriority=function(M,J){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var ue=_;_=M;try{return J()}finally{_=ue}},n.unstable_scheduleCallback=function(M,J,ue){var de=n.unstable_now();switch(typeof ue=="object"&&ue!==null?(ue=ue.delay,ue=typeof ue=="number"&&0<ue?de+ue:de):ue=de,M){case 1:var ae=-1;break;case 2:ae=250;break;case 5:ae=1073741823;break;case 4:ae=1e4;break;default:ae=5e3}return ae=ue+ae,M={id:S++,callback:J,priorityLevel:M,startTime:ue,expirationTime:ae,sortIndex:-1},ue>de?(M.sortIndex=ue,i(p,M),r(y)===null&&M===r(p)&&(D?(X(P),P=-1):D=!0,ie(re,ue-de))):(M.sortIndex=ae,i(y,M),z||E||(z=!0,ce||(ce=!0,ee()))),M},n.unstable_shouldYield=Q,n.unstable_wrapCallback=function(M){var J=_;return function(){var ue=_;_=J;try{return M.apply(this,arguments)}finally{_=ue}}}})(Mu)),Mu}var _p;function Q0(){return _p||(_p=1,Du.exports=X0()),Du.exports}var Au={exports:{}},Mt={};var jp;function Z0(){if(jp)return Mt;jp=1;var n=no();function i(y){var p="https://react.dev/errors/"+y;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)p+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+y+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var s={d:{f:r,r:function(){throw Error(i(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},c=Symbol.for("react.portal");function f(y,p,S){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:x==null?null:""+x,children:y,containerInfo:p,implementation:S}}var h=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(y,p){if(y==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Mt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,Mt.createPortal=function(y,p){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(i(299));return f(y,p,null,S)},Mt.flushSync=function(y){var p=h.T,S=s.p;try{if(h.T=null,s.p=2,y)return y()}finally{h.T=p,s.p=S,s.d.f()}},Mt.preconnect=function(y,p){typeof y=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,s.d.C(y,p))},Mt.prefetchDNS=function(y){typeof y=="string"&&s.d.D(y)},Mt.preinit=function(y,p){if(typeof y=="string"&&p&&typeof p.as=="string"){var S=p.as,x=m(S,p.crossOrigin),_=typeof p.integrity=="string"?p.integrity:void 0,E=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;S==="style"?s.d.S(y,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:x,integrity:_,fetchPriority:E}):S==="script"&&s.d.X(y,{crossOrigin:x,integrity:_,fetchPriority:E,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Mt.preinitModule=function(y,p){if(typeof y=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var S=m(p.as,p.crossOrigin);s.d.M(y,{crossOrigin:S,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&s.d.M(y)},Mt.preload=function(y,p){if(typeof y=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var S=p.as,x=m(S,p.crossOrigin);s.d.L(y,S,{crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Mt.preloadModule=function(y,p){if(typeof y=="string")if(p){var S=m(p.as,p.crossOrigin);s.d.m(y,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:S,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else s.d.m(y)},Mt.requestFormReset=function(y){s.d.r(y)},Mt.unstable_batchedUpdates=function(y,p){return y(p)},Mt.useFormState=function(y,p,S){return h.H.useFormState(y,p,S)},Mt.useFormStatus=function(){return h.H.useHostTransitionStatus()},Mt.version="19.2.4",Mt}var Np;function F0(){if(Np)return Au.exports;Np=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(i){console.error(i)}}return n(),Au.exports=Z0(),Au.exports}var Ep;function J0(){if(Ep)return ar;Ep=1;var n=Q0(),i=no(),r=F0();function s(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}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 c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function h(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(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(f(e)!==e)throw Error(s(188))}function p(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(s(188));return t!==e?null:e}for(var a=e,l=t;;){var o=a.return;if(o===null)break;var u=o.alternate;if(u===null){if(l=o.return,l!==null){a=l;continue}break}if(o.child===u.child){for(u=o.child;u;){if(u===a)return y(o),e;if(u===l)return y(o),t;u=u.sibling}throw Error(s(188))}if(a.return!==l.return)a=o,l=u;else{for(var g=!1,v=o.child;v;){if(v===a){g=!0,a=o,l=u;break}if(v===l){g=!0,l=o,a=u;break}v=v.sibling}if(!g){for(v=u.child;v;){if(v===a){g=!0,a=u,l=o;break}if(v===l){g=!0,l=u,a=o;break}v=v.sibling}if(!g)throw Error(s(189))}}if(a.alternate!==l)throw Error(s(190))}if(a.tag!==3)throw Error(s(188));return a.stateNode.current===a?e:t}function S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var x=Object.assign,_=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),W=Symbol.for("react.profiler"),X=Symbol.for("react.consumer"),G=Symbol.for("react.context"),ne=Symbol.for("react.forward_ref"),re=Symbol.for("react.suspense"),ce=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),Q=Symbol.for("react.memo_cache_sentinel"),H=Symbol.iterator;function ee(e){return e===null||typeof e!="object"?null:(e=H&&e[H]||e["@@iterator"],typeof e=="function"?e:null)}var pe=Symbol.for("react.client.reference");function Z(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===pe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case D:return"Fragment";case W:return"Profiler";case A:return"StrictMode";case re:return"Suspense";case ce:return"SuspenseList";case $:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case z:return"Portal";case G:return e.displayName||"Context";case X:return(e._context.displayName||"Context")+".Consumer";case ne:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P:return t=e.displayName||null,t!==null?t:Z(e.type)||"Memo";case j:t=e._payload,e=e._init;try{return Z(e(t))}catch{}}return null}var ie=Array.isArray,M=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue={pending:!1,data:null,method:null,action:null},de=[],ae=-1;function N(e){return{current:e}}function q(e){0>ae||(e.current=de[ae],de[ae]=null,ae--)}function I(e,t){ae++,de[ae]=e.current,e.current=t}var se=N(null),be=N(null),je=N(null),Te=N(null);function ot(e,t){switch(I(je,t),I(be,e),I(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?vm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=vm(t),e=bm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(se),I(se,e)}function Qe(){q(se),q(be),q(je)}function Ba(e){e.memoizedState!==null&&I(Te,e);var t=se.current,a=bm(t,e.type);t!==a&&(I(be,e),I(se,a))}function un(e){be.current===e&&(q(se),q(be)),Te.current===e&&(q(Te),Ji._currentValue=ue)}var $n,fe;function ze(e){if($n===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);$n=t&&t[1]||"",fe=-1<a.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+$n+e+fe}var ht=!1;function kt(e,t){if(!e||ht)return"";ht=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var F=function(){throw Error()};if(Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch(Y){var U=Y}Reflect.construct(e,[],F)}else{try{F.call()}catch(Y){U=Y}e.call(F.prototype)}}else{try{throw Error()}catch(Y){U=Y}(F=e())&&typeof F.catch=="function"&&F.catch(function(){})}}catch(Y){if(Y&&U&&typeof Y.stack=="string")return[Y.stack,U.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=l.DetermineComponentFrameRoot(),g=u[0],v=u[1];if(g&&v){var w=g.split(`
|
|
4
|
+
`),k=v.split(`
|
|
5
|
+
`);for(o=l=0;l<w.length&&!w[l].includes("DetermineComponentFrameRoot");)l++;for(;o<k.length&&!k[o].includes("DetermineComponentFrameRoot");)o++;if(l===w.length||o===k.length)for(l=w.length-1,o=k.length-1;1<=l&&0<=o&&w[l]!==k[o];)o--;for(;1<=l&&0<=o;l--,o--)if(w[l]!==k[o]){if(l!==1||o!==1)do if(l--,o--,0>o||w[l]!==k[o]){var V=`
|
|
6
|
+
`+w[l].replace(" at new "," at ");return e.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",e.displayName)),V}while(1<=l&&0<=o);break}}}finally{ht=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?ze(a):""}function Je(e,t){switch(e.tag){case 26:case 27:case 5:return ze(e.type);case 16:return ze("Lazy");case 13:return e.child!==t&&t!==null?ze("Suspense Fallback"):ze("Suspense");case 19:return ze("SuspenseList");case 0:case 15:return kt(e.type,!1);case 11:return kt(e.type.render,!1);case 1:return kt(e.type,!0);case 31:return ze("Activity");default:return""}}function Xn(e){try{var t="",a=null;do t+=Je(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
|
|
7
|
+
Error generating stack: `+l.message+`
|
|
8
|
+
`+l.stack}}var fn=Object.prototype.hasOwnProperty,Ra=n.unstable_scheduleCallback,dn=n.unstable_cancelCallback,ui=n.unstable_shouldYield,mo=n.unstable_requestPaint,Ut=n.unstable_now,qa=n.unstable_getCurrentPriorityLevel,hn=n.unstable_ImmediatePriority,fi=n.unstable_UserBlockingPriority,mn=n.unstable_NormalPriority,ba=n.unstable_LowPriority,ia=n.unstable_IdlePriority,Nr=n.log,po=n.unstable_setDisableYieldValue,Ya=null,Ht=null;function Nt(e){if(typeof Nr=="function"&&po(e),Ht&&typeof Ht.setStrictMode=="function")try{Ht.setStrictMode(Ya,e)}catch{}}var Tt=Math.clz32?Math.clz32:go,Er=Math.log,wr=Math.LN2;function go(e){return e>>>=0,e===0?32:31-(Er(e)/wr|0)|0}var Qn=256,Va=262144,Zn=4194304;function Sa(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:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;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 xl(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var o=0,u=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var v=l&134217727;return v!==0?(l=v&~u,l!==0?o=Sa(l):(g&=v,g!==0?o=Sa(g):a||(a=v&~e,a!==0&&(o=Sa(a))))):(v=l&~u,v!==0?o=Sa(v):g!==0?o=Sa(g):a||(a=l&~e,a!==0&&(o=Sa(a)))),o===0?0:t!==0&&t!==o&&(t&u)===0&&(u=o&-o,a=t&-t,u>=a||u===32&&(a&4194048)!==0)?t:o}function pn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function yo(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 di(){var e=Zn;return Zn<<=1,(Zn&62914560)===0&&(Zn=4194304),e}function gn(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function za(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Cr(e,t,a,l,o,u){var g=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var v=e.entanglements,w=e.expirationTimes,k=e.hiddenUpdates;for(a=g&~a;0<a;){var V=31-Tt(a),F=1<<V;v[V]=0,w[V]=-1;var U=k[V];if(U!==null)for(k[V]=null,V=0;V<U.length;V++){var Y=U[V];Y!==null&&(Y.lane&=-536870913)}a&=~F}l!==0&&Rr(e,l,0),u!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=u&~(g&~t))}function Rr(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Tt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function zr(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-Tt(a),o=1<<l;o&t|e[l]&t&&(e[l]|=t),a&=~o}}function C(e,t){var a=t&-t;return a=(a&42)!==0?1:O(a),(a&(e.suspendedLanes|t))!==0?0:a}function O(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 B(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function te(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:Gm(e.type))}function le(e,t){var a=J.p;try{return J.p=e,t()}finally{J.p=a}}var ge=Math.random().toString(36).slice(2),oe="__reactFiber$"+ge,he="__reactProps$"+ge,me="__reactContainer$"+ge,Se="__reactEvents$"+ge,Ne="__reactListeners$"+ge,ve="__reactHandles$"+ge,Ge="__reactResources$"+ge,Le="__reactMarker$"+ge;function et(e){delete e[oe],delete e[he],delete e[Se],delete e[Ne],delete e[ve]}function nt(e){var t=e[oe];if(t)return t;for(var a=e.parentNode;a;){if(t=a[me]||a[oe]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Cm(e);e!==null;){if(a=e[oe])return a;e=Cm(e)}return t}e=a,a=e.parentNode}return null}function ct(e){if(e=e[oe]||e[me]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ve(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function _t(e){var t=e[Ge];return t||(t=e[Ge]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function at(e){e[Le]=!0}var yn=new Set,_a={};function Et(e,t){Oa(e,t),Oa(e+"Capture",t)}function Oa(e,t){for(_a[e]=t,e=0;e<t.length;e++)yn.add(t[e])}var Fn=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]*$"),Ta={},Jn={};function vl(e){return fn.call(Jn,e)?!0:fn.call(Ta,e)?!1:Fn.test(e)?Jn[e]=!0:(Ta[e]=!0,!1)}function ke(e,t,a){if(vl(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function mt(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Dt(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function yt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function lt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function bl(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var o=l.get,u=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(g){a=""+g,u.call(this,g)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(g){a=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Sl(e){if(!e._valueTracker){var t=lt(e)?"checked":"value";e._valueTracker=bl(e,t,""+e[t])}}function Or(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=lt(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function Tr(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 zy=/[\n"\\]/g;function ra(e){return e.replace(zy,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function xo(e,t,a,l,o,u,g,v){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+yt(t)):e.value!==""+yt(t)&&(e.value=""+yt(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?vo(e,g,yt(t)):a!=null?vo(e,g,yt(a)):l!=null&&e.removeAttribute("value"),o==null&&u!=null&&(e.defaultChecked=!!u),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.name=""+yt(v):e.removeAttribute("name")}function hf(e,t,a,l,o,u,g,v){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||a!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){Sl(e);return}a=a!=null?""+yt(a):"",t=t!=null?""+yt(t):a,v||t===e.value||(e.value=t),e.defaultValue=t}l=l??o,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=v?e.checked:!!l,e.defaultChecked=!!l,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),Sl(e)}function vo(e,t,a){t==="number"&&Tr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function _l(e,t,a,l){if(e=e.options,t){t={};for(var o=0;o<a.length;o++)t["$"+a[o]]=!0;for(a=0;a<e.length;a++)o=t.hasOwnProperty("$"+e[a].value),e[a].selected!==o&&(e[a].selected=o),o&&l&&(e[a].defaultSelected=!0)}else{for(a=""+yt(a),t=null,o=0;o<e.length;o++){if(e[o].value===a){e[o].selected=!0,l&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function mf(e,t,a){if(t!=null&&(t=""+yt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+yt(a):""}function pf(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(s(92));if(ie(l)){if(1<l.length)throw Error(s(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=yt(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),Sl(e)}function jl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Oy=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 gf(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||Oy.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function yf(e,t,a){if(t!=null&&typeof t!="object")throw Error(s(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var o in t)l=t[o],t.hasOwnProperty(o)&&a[o]!==l&&gf(e,o,l)}else for(var u in t)t.hasOwnProperty(u)&&gf(e,u,t[u])}function bo(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 Ty=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"]]),Dy=/^[\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 Dr(e){return Dy.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ga(){}var So=null;function _o(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Nl=null,El=null;function xf(e){var t=ct(e);if(t&&(e=t.stateNode)){var a=e[he]||null;e:switch(e=t.stateNode,t.type){case"input":if(xo(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+ra(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var o=l[he]||null;if(!o)throw Error(s(90));xo(l,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&Or(l)}break e;case"textarea":mf(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&_l(e,!!a.multiple,t,!1)}}}var jo=!1;function vf(e,t,a){if(jo)return e(t,a);jo=!0;try{var l=e(t);return l}finally{if(jo=!1,(Nl!==null||El!==null)&&(vs(),Nl&&(t=Nl,e=El,El=Nl=null,xf(t),e)))for(t=0;t<e.length;t++)xf(e[t])}}function hi(e,t){var a=e.stateNode;if(a===null)return null;var l=a[he]||null;if(l===null)return null;a=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(s(231,t,typeof a));return a}var Ka=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),No=!1;if(Ka)try{var mi={};Object.defineProperty(mi,"passive",{get:function(){No=!0}}),window.addEventListener("test",mi,mi),window.removeEventListener("test",mi,mi)}catch{No=!1}var xn=null,Eo=null,Mr=null;function bf(){if(Mr)return Mr;var e,t=Eo,a=t.length,l,o="value"in xn?xn.value:xn.textContent,u=o.length;for(e=0;e<a&&t[e]===o[e];e++);var g=a-e;for(l=1;l<=g&&t[a-l]===o[u-l];l++);return Mr=o.slice(e,1<l?1-l:void 0)}function Ar(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 Lr(){return!0}function Sf(){return!1}function Vt(e){function t(a,l,o,u,g){this._reactName=a,this._targetInst=o,this.type=l,this.nativeEvent=u,this.target=g,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(a=e[v],this[v]=a?a(u):u[v]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Lr:Sf,this.isPropagationStopped=Sf,this}return x(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Lr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Lr)},persist:function(){},isPersistent:Lr}),t}var Wn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},kr=Vt(Wn),pi=x({},Wn,{view:0,detail:0}),My=Vt(pi),wo,Co,gi,Ur=x({},pi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zo,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!==gi&&(gi&&e.type==="mousemove"?(wo=e.screenX-gi.screenX,Co=e.screenY-gi.screenY):Co=wo=0,gi=e),wo)},movementY:function(e){return"movementY"in e?e.movementY:Co}}),_f=Vt(Ur),Ay=x({},Ur,{dataTransfer:0}),Ly=Vt(Ay),ky=x({},pi,{relatedTarget:0}),Ro=Vt(ky),Uy=x({},Wn,{animationName:0,elapsedTime:0,pseudoElement:0}),Hy=Vt(Uy),By=x({},Wn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),qy=Vt(By),Yy=x({},Wn,{data:0}),jf=Vt(Yy),Vy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Gy={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"},Ky={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function $y(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ky[e])?!!t[e]:!1}function zo(){return $y}var Xy=x({},pi,{key:function(e){if(e.key){var t=Vy[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ar(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Gy[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zo,charCode:function(e){return e.type==="keypress"?Ar(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ar(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Qy=Vt(Xy),Zy=x({},Ur,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Nf=Vt(Zy),Fy=x({},pi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zo}),Jy=Vt(Fy),Wy=x({},Wn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Py=Vt(Wy),Iy=x({},Ur,{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}),ex=Vt(Iy),tx=x({},Wn,{newState:0,oldState:0}),ax=Vt(tx),nx=[9,13,27,32],Oo=Ka&&"CompositionEvent"in window,yi=null;Ka&&"documentMode"in document&&(yi=document.documentMode);var lx=Ka&&"TextEvent"in window&&!yi,Ef=Ka&&(!Oo||yi&&8<yi&&11>=yi),wf=" ",Cf=!1;function Rf(e,t){switch(e){case"keyup":return nx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wl=!1;function ix(e,t){switch(e){case"compositionend":return zf(t);case"keypress":return t.which!==32?null:(Cf=!0,wf);case"textInput":return e=t.data,e===wf&&Cf?null:e;default:return null}}function rx(e,t){if(wl)return e==="compositionend"||!Oo&&Rf(e,t)?(e=bf(),Mr=Eo=xn=null,wl=!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 Ef&&t.locale!=="ko"?null:t.data;default:return null}}var sx={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 Of(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!sx[e.type]:t==="textarea"}function Tf(e,t,a,l){Nl?El?El.push(l):El=[l]:Nl=l,t=ws(t,"onChange"),0<t.length&&(a=new kr("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var xi=null,vi=null;function ox(e){hm(e,0)}function Hr(e){var t=Ve(e);if(Or(t))return e}function Df(e,t){if(e==="change")return t}var Mf=!1;if(Ka){var To;if(Ka){var Do="oninput"in document;if(!Do){var Af=document.createElement("div");Af.setAttribute("oninput","return;"),Do=typeof Af.oninput=="function"}To=Do}else To=!1;Mf=To&&(!document.documentMode||9<document.documentMode)}function Lf(){xi&&(xi.detachEvent("onpropertychange",kf),vi=xi=null)}function kf(e){if(e.propertyName==="value"&&Hr(vi)){var t=[];Tf(t,vi,e,_o(e)),vf(ox,t)}}function cx(e,t,a){e==="focusin"?(Lf(),xi=t,vi=a,xi.attachEvent("onpropertychange",kf)):e==="focusout"&&Lf()}function ux(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Hr(vi)}function fx(e,t){if(e==="click")return Hr(t)}function dx(e,t){if(e==="input"||e==="change")return Hr(t)}function hx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Jt=typeof Object.is=="function"?Object.is:hx;function bi(e,t){if(Jt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var o=a[l];if(!fn.call(t,o)||!Jt(e[o],t[o]))return!1}return!0}function Uf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Hf(e,t){var a=Uf(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Uf(a)}}function Bf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Bf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function qf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Tr(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Tr(e.document)}return t}function Mo(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 mx=Ka&&"documentMode"in document&&11>=document.documentMode,Cl=null,Ao=null,Si=null,Lo=!1;function Yf(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Lo||Cl==null||Cl!==Tr(l)||(l=Cl,"selectionStart"in l&&Mo(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Si&&bi(Si,l)||(Si=l,l=ws(Ao,"onSelect"),0<l.length&&(t=new kr("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=Cl)))}function Pn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Rl={animationend:Pn("Animation","AnimationEnd"),animationiteration:Pn("Animation","AnimationIteration"),animationstart:Pn("Animation","AnimationStart"),transitionrun:Pn("Transition","TransitionRun"),transitionstart:Pn("Transition","TransitionStart"),transitioncancel:Pn("Transition","TransitionCancel"),transitionend:Pn("Transition","TransitionEnd")},ko={},Vf={};Ka&&(Vf=document.createElement("div").style,"AnimationEvent"in window||(delete Rl.animationend.animation,delete Rl.animationiteration.animation,delete Rl.animationstart.animation),"TransitionEvent"in window||delete Rl.transitionend.transition);function In(e){if(ko[e])return ko[e];if(!Rl[e])return e;var t=Rl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Vf)return ko[e]=t[a];return e}var Gf=In("animationend"),Kf=In("animationiteration"),$f=In("animationstart"),px=In("transitionrun"),gx=In("transitionstart"),yx=In("transitioncancel"),Xf=In("transitionend"),Qf=new Map,Uo="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(" ");Uo.push("scrollEnd");function ja(e,t){Qf.set(e,t),Et(t,[e])}var Br=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)},sa=[],zl=0,Ho=0;function qr(){for(var e=zl,t=Ho=zl=0;t<e;){var a=sa[t];sa[t++]=null;var l=sa[t];sa[t++]=null;var o=sa[t];sa[t++]=null;var u=sa[t];if(sa[t++]=null,l!==null&&o!==null){var g=l.pending;g===null?o.next=o:(o.next=g.next,g.next=o),l.pending=o}u!==0&&Zf(a,o,u)}}function Yr(e,t,a,l){sa[zl++]=e,sa[zl++]=t,sa[zl++]=a,sa[zl++]=l,Ho|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Bo(e,t,a,l){return Yr(e,t,a,l),Vr(e)}function el(e,t){return Yr(e,null,null,t),Vr(e)}function Zf(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var o=!1,u=e.return;u!==null;)u.childLanes|=a,l=u.alternate,l!==null&&(l.childLanes|=a),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(o=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,o&&t!==null&&(o=31-Tt(a),e=u.hiddenUpdates,l=e[o],l===null?e[o]=[t]:l.push(t),t.lane=a|536870912),u):null}function Vr(e){if(50<Gi)throw Gi=0,Zc=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ol={};function xx(e,t,a,l){this.tag=e,this.key=a,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=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wt(e,t,a,l){return new xx(e,t,a,l)}function qo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $a(e,t){var a=e.alternate;return a===null?(a=Wt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Ff(e,t){e.flags&=65011714;var a=e.alternate;return a===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=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Gr(e,t,a,l,o,u){var g=0;if(l=e,typeof e=="function")qo(e)&&(g=1);else if(typeof e=="string")g=jv(e,a,se.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case $:return e=Wt(31,a,t,o),e.elementType=$,e.lanes=u,e;case D:return tl(a.children,o,u,t);case A:g=8,o|=24;break;case W:return e=Wt(12,a,t,o|2),e.elementType=W,e.lanes=u,e;case re:return e=Wt(13,a,t,o),e.elementType=re,e.lanes=u,e;case ce:return e=Wt(19,a,t,o),e.elementType=ce,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case G:g=10;break e;case X:g=9;break e;case ne:g=11;break e;case P:g=14;break e;case j:g=16,l=null;break e}g=29,a=Error(s(130,e===null?"null":typeof e,"")),l=null}return t=Wt(g,a,t,o),t.elementType=e,t.type=l,t.lanes=u,t}function tl(e,t,a,l){return e=Wt(7,e,l,t),e.lanes=a,e}function Yo(e,t,a){return e=Wt(6,e,null,t),e.lanes=a,e}function Jf(e){var t=Wt(18,null,null,0);return t.stateNode=e,t}function Vo(e,t,a){return t=Wt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Wf=new WeakMap;function oa(e,t){if(typeof e=="object"&&e!==null){var a=Wf.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Xn(t)},Wf.set(e,t),t)}return{value:e,source:t,stack:Xn(t)}}var Tl=[],Dl=0,Kr=null,_i=0,ca=[],ua=0,vn=null,Da=1,Ma="";function Xa(e,t){Tl[Dl++]=_i,Tl[Dl++]=Kr,Kr=e,_i=t}function Pf(e,t,a){ca[ua++]=Da,ca[ua++]=Ma,ca[ua++]=vn,vn=e;var l=Da;e=Ma;var o=32-Tt(l)-1;l&=~(1<<o),a+=1;var u=32-Tt(t)+o;if(30<u){var g=o-o%5;u=(l&(1<<g)-1).toString(32),l>>=g,o-=g,Da=1<<32-Tt(t)+o|a<<o|l,Ma=u+e}else Da=1<<u|a<<o|l,Ma=e}function Go(e){e.return!==null&&(Xa(e,1),Pf(e,1,0))}function Ko(e){for(;e===Kr;)Kr=Tl[--Dl],Tl[Dl]=null,_i=Tl[--Dl],Tl[Dl]=null;for(;e===vn;)vn=ca[--ua],ca[ua]=null,Ma=ca[--ua],ca[ua]=null,Da=ca[--ua],ca[ua]=null}function If(e,t){ca[ua++]=Da,ca[ua++]=Ma,ca[ua++]=vn,Da=t.id,Ma=t.overflow,vn=e}var Ct=null,it=null,Ye=!1,bn=null,fa=!1,$o=Error(s(519));function Sn(e){var t=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ji(oa(t,e)),$o}function ed(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[oe]=e,t[he]=l,a){case"dialog":He("cancel",t),He("close",t);break;case"iframe":case"object":case"embed":He("load",t);break;case"video":case"audio":for(a=0;a<$i.length;a++)He($i[a],t);break;case"source":He("error",t);break;case"img":case"image":case"link":He("error",t),He("load",t);break;case"details":He("toggle",t);break;case"input":He("invalid",t),hf(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":He("invalid",t);break;case"textarea":He("invalid",t),pf(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||ym(t.textContent,a)?(l.popover!=null&&(He("beforetoggle",t),He("toggle",t)),l.onScroll!=null&&He("scroll",t),l.onScrollEnd!=null&&He("scrollend",t),l.onClick!=null&&(t.onclick=Ga),t=!0):t=!1,t||Sn(e,!0)}function td(e){for(Ct=e.return;Ct;)switch(Ct.tag){case 5:case 31:case 13:fa=!1;return;case 27:case 3:fa=!0;return;default:Ct=Ct.return}}function Ml(e){if(e!==Ct)return!1;if(!Ye)return td(e),Ye=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||cu(e.type,e.memoizedProps)),a=!a),a&&it&&Sn(e),td(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));it=wm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));it=wm(e)}else t===27?(t=it,Ln(e.type)?(e=mu,mu=null,it=e):it=t):it=Ct?ha(e.stateNode.nextSibling):null;return!0}function al(){it=Ct=null,Ye=!1}function Xo(){var e=bn;return e!==null&&(Xt===null?Xt=e:Xt.push.apply(Xt,e),bn=null),e}function ji(e){bn===null?bn=[e]:bn.push(e)}var Qo=N(null),nl=null,Qa=null;function _n(e,t,a){I(Qo,t._currentValue),t._currentValue=a}function Za(e){e._currentValue=Qo.current,q(Qo)}function Zo(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function Fo(e,t,a,l){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var u=o.dependencies;if(u!==null){var g=o.child;u=u.firstContext;e:for(;u!==null;){var v=u;u=o;for(var w=0;w<t.length;w++)if(v.context===t[w]){u.lanes|=a,v=u.alternate,v!==null&&(v.lanes|=a),Zo(u.return,a,e),l||(g=null);break e}u=v.next}}else if(o.tag===18){if(g=o.return,g===null)throw Error(s(341));g.lanes|=a,u=g.alternate,u!==null&&(u.lanes|=a),Zo(g,a,e),g=null}else g=o.child;if(g!==null)g.return=o;else for(g=o;g!==null;){if(g===e){g=null;break}if(o=g.sibling,o!==null){o.return=g.return,g=o;break}g=g.return}o=g}}function Al(e,t,a,l){e=null;for(var o=t,u=!1;o!==null;){if(!u){if((o.flags&524288)!==0)u=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var g=o.alternate;if(g===null)throw Error(s(387));if(g=g.memoizedProps,g!==null){var v=o.type;Jt(o.pendingProps.value,g.value)||(e!==null?e.push(v):e=[v])}}else if(o===Te.current){if(g=o.alternate,g===null)throw Error(s(387));g.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(Ji):e=[Ji])}o=o.return}e!==null&&Fo(t,e,a,l),t.flags|=262144}function $r(e){for(e=e.firstContext;e!==null;){if(!Jt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ll(e){nl=e,Qa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Rt(e){return ad(nl,e)}function Xr(e,t){return nl===null&&ll(e),ad(e,t)}function ad(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Qa===null){if(e===null)throw Error(s(308));Qa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Qa=Qa.next=t;return a}var vx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},bx=n.unstable_scheduleCallback,Sx=n.unstable_NormalPriority,xt={$$typeof:G,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Jo(){return{controller:new vx,data:new Map,refCount:0}}function Ni(e){e.refCount--,e.refCount===0&&bx(Sx,function(){e.controller.abort()})}var Ei=null,Wo=0,Ll=0,kl=null;function _x(e,t){if(Ei===null){var a=Ei=[];Wo=0,Ll=eu(),kl={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Wo++,t.then(nd,nd),t}function nd(){if(--Wo===0&&Ei!==null){kl!==null&&(kl.status="fulfilled");var e=Ei;Ei=null,Ll=0,kl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function jx(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(o){a.push(o)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var o=0;o<a.length;o++)(0,a[o])(t)},function(o){for(l.status="rejected",l.reason=o,o=0;o<a.length;o++)(0,a[o])(void 0)}),l}var ld=M.S;M.S=function(e,t){Yh=Ut(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&_x(e,t),ld!==null&&ld(e,t)};var il=N(null);function Po(){var e=il.current;return e!==null?e:tt.pooledCache}function Qr(e,t){t===null?I(il,il.current):I(il,t.pool)}function id(){var e=Po();return e===null?null:{parent:xt._currentValue,pool:e}}var Ul=Error(s(460)),Io=Error(s(474)),Zr=Error(s(542)),Fr={then:function(){}};function rd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function sd(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Ga,Ga),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,cd(e),e;default:if(typeof t.status=="string")t.then(Ga,Ga);else{if(e=tt,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=l}},function(l){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,cd(e),e}throw sl=t,Ul}}function rl(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(sl=a,Ul):a}}var sl=null;function od(){if(sl===null)throw Error(s(459));var e=sl;return sl=null,e}function cd(e){if(e===Ul||e===Zr)throw Error(s(483))}var Hl=null,wi=0;function Jr(e){var t=wi;return wi+=1,Hl===null&&(Hl=[]),sd(Hl,e,t)}function Ci(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Wr(e,t){throw t.$$typeof===_?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function ud(e){function t(T,R){if(e){var L=T.deletions;L===null?(T.deletions=[R],T.flags|=16):L.push(R)}}function a(T,R){if(!e)return null;for(;R!==null;)t(T,R),R=R.sibling;return null}function l(T){for(var R=new Map;T!==null;)T.key!==null?R.set(T.key,T):R.set(T.index,T),T=T.sibling;return R}function o(T,R){return T=$a(T,R),T.index=0,T.sibling=null,T}function u(T,R,L){return T.index=L,e?(L=T.alternate,L!==null?(L=L.index,L<R?(T.flags|=67108866,R):L):(T.flags|=67108866,R)):(T.flags|=1048576,R)}function g(T){return e&&T.alternate===null&&(T.flags|=67108866),T}function v(T,R,L,K){return R===null||R.tag!==6?(R=Yo(L,T.mode,K),R.return=T,R):(R=o(R,L),R.return=T,R)}function w(T,R,L,K){var _e=L.type;return _e===D?V(T,R,L.props.children,K,L.key):R!==null&&(R.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===j&&rl(_e)===R.type)?(R=o(R,L.props),Ci(R,L),R.return=T,R):(R=Gr(L.type,L.key,L.props,null,T.mode,K),Ci(R,L),R.return=T,R)}function k(T,R,L,K){return R===null||R.tag!==4||R.stateNode.containerInfo!==L.containerInfo||R.stateNode.implementation!==L.implementation?(R=Vo(L,T.mode,K),R.return=T,R):(R=o(R,L.children||[]),R.return=T,R)}function V(T,R,L,K,_e){return R===null||R.tag!==7?(R=tl(L,T.mode,K,_e),R.return=T,R):(R=o(R,L),R.return=T,R)}function F(T,R,L){if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return R=Yo(""+R,T.mode,L),R.return=T,R;if(typeof R=="object"&&R!==null){switch(R.$$typeof){case E:return L=Gr(R.type,R.key,R.props,null,T.mode,L),Ci(L,R),L.return=T,L;case z:return R=Vo(R,T.mode,L),R.return=T,R;case j:return R=rl(R),F(T,R,L)}if(ie(R)||ee(R))return R=tl(R,T.mode,L,null),R.return=T,R;if(typeof R.then=="function")return F(T,Jr(R),L);if(R.$$typeof===G)return F(T,Xr(T,R),L);Wr(T,R)}return null}function U(T,R,L,K){var _e=R!==null?R.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return _e!==null?null:v(T,R,""+L,K);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case E:return L.key===_e?w(T,R,L,K):null;case z:return L.key===_e?k(T,R,L,K):null;case j:return L=rl(L),U(T,R,L,K)}if(ie(L)||ee(L))return _e!==null?null:V(T,R,L,K,null);if(typeof L.then=="function")return U(T,R,Jr(L),K);if(L.$$typeof===G)return U(T,R,Xr(T,L),K);Wr(T,L)}return null}function Y(T,R,L,K,_e){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return T=T.get(L)||null,v(R,T,""+K,_e);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case E:return T=T.get(K.key===null?L:K.key)||null,w(R,T,K,_e);case z:return T=T.get(K.key===null?L:K.key)||null,k(R,T,K,_e);case j:return K=rl(K),Y(T,R,L,K,_e)}if(ie(K)||ee(K))return T=T.get(L)||null,V(R,T,K,_e,null);if(typeof K.then=="function")return Y(T,R,L,Jr(K),_e);if(K.$$typeof===G)return Y(T,R,L,Xr(R,K),_e);Wr(R,K)}return null}function ye(T,R,L,K){for(var _e=null,Ke=null,xe=R,De=R=0,qe=null;xe!==null&&De<L.length;De++){xe.index>De?(qe=xe,xe=null):qe=xe.sibling;var $e=U(T,xe,L[De],K);if($e===null){xe===null&&(xe=qe);break}e&&xe&&$e.alternate===null&&t(T,xe),R=u($e,R,De),Ke===null?_e=$e:Ke.sibling=$e,Ke=$e,xe=qe}if(De===L.length)return a(T,xe),Ye&&Xa(T,De),_e;if(xe===null){for(;De<L.length;De++)xe=F(T,L[De],K),xe!==null&&(R=u(xe,R,De),Ke===null?_e=xe:Ke.sibling=xe,Ke=xe);return Ye&&Xa(T,De),_e}for(xe=l(xe);De<L.length;De++)qe=Y(xe,T,De,L[De],K),qe!==null&&(e&&qe.alternate!==null&&xe.delete(qe.key===null?De:qe.key),R=u(qe,R,De),Ke===null?_e=qe:Ke.sibling=qe,Ke=qe);return e&&xe.forEach(function(qn){return t(T,qn)}),Ye&&Xa(T,De),_e}function Ee(T,R,L,K){if(L==null)throw Error(s(151));for(var _e=null,Ke=null,xe=R,De=R=0,qe=null,$e=L.next();xe!==null&&!$e.done;De++,$e=L.next()){xe.index>De?(qe=xe,xe=null):qe=xe.sibling;var qn=U(T,xe,$e.value,K);if(qn===null){xe===null&&(xe=qe);break}e&&xe&&qn.alternate===null&&t(T,xe),R=u(qn,R,De),Ke===null?_e=qn:Ke.sibling=qn,Ke=qn,xe=qe}if($e.done)return a(T,xe),Ye&&Xa(T,De),_e;if(xe===null){for(;!$e.done;De++,$e=L.next())$e=F(T,$e.value,K),$e!==null&&(R=u($e,R,De),Ke===null?_e=$e:Ke.sibling=$e,Ke=$e);return Ye&&Xa(T,De),_e}for(xe=l(xe);!$e.done;De++,$e=L.next())$e=Y(xe,T,De,$e.value,K),$e!==null&&(e&&$e.alternate!==null&&xe.delete($e.key===null?De:$e.key),R=u($e,R,De),Ke===null?_e=$e:Ke.sibling=$e,Ke=$e);return e&&xe.forEach(function(Av){return t(T,Av)}),Ye&&Xa(T,De),_e}function Ie(T,R,L,K){if(typeof L=="object"&&L!==null&&L.type===D&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case E:e:{for(var _e=L.key;R!==null;){if(R.key===_e){if(_e=L.type,_e===D){if(R.tag===7){a(T,R.sibling),K=o(R,L.props.children),K.return=T,T=K;break e}}else if(R.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===j&&rl(_e)===R.type){a(T,R.sibling),K=o(R,L.props),Ci(K,L),K.return=T,T=K;break e}a(T,R);break}else t(T,R);R=R.sibling}L.type===D?(K=tl(L.props.children,T.mode,K,L.key),K.return=T,T=K):(K=Gr(L.type,L.key,L.props,null,T.mode,K),Ci(K,L),K.return=T,T=K)}return g(T);case z:e:{for(_e=L.key;R!==null;){if(R.key===_e)if(R.tag===4&&R.stateNode.containerInfo===L.containerInfo&&R.stateNode.implementation===L.implementation){a(T,R.sibling),K=o(R,L.children||[]),K.return=T,T=K;break e}else{a(T,R);break}else t(T,R);R=R.sibling}K=Vo(L,T.mode,K),K.return=T,T=K}return g(T);case j:return L=rl(L),Ie(T,R,L,K)}if(ie(L))return ye(T,R,L,K);if(ee(L)){if(_e=ee(L),typeof _e!="function")throw Error(s(150));return L=_e.call(L),Ee(T,R,L,K)}if(typeof L.then=="function")return Ie(T,R,Jr(L),K);if(L.$$typeof===G)return Ie(T,R,Xr(T,L),K);Wr(T,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,R!==null&&R.tag===6?(a(T,R.sibling),K=o(R,L),K.return=T,T=K):(a(T,R),K=Yo(L,T.mode,K),K.return=T,T=K),g(T)):a(T,R)}return function(T,R,L,K){try{wi=0;var _e=Ie(T,R,L,K);return Hl=null,_e}catch(xe){if(xe===Ul||xe===Zr)throw xe;var Ke=Wt(29,xe,null,T.mode);return Ke.lanes=K,Ke.return=T,Ke}}}var ol=ud(!0),fd=ud(!1),jn=!1;function ec(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function tc(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 Nn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function En(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Xe&2)!==0){var o=l.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),l.pending=t,t=Vr(e),Zf(e,null,a),t}return Yr(e,l,t,a),Vr(e)}function Ri(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,zr(e,a)}}function ac(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var o=null,u=null;if(a=a.firstBaseUpdate,a!==null){do{var g={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};u===null?o=u=g:u=u.next=g,a=a.next}while(a!==null);u===null?o=u=t:u=u.next=t}else o=u=t;a={baseState:l.baseState,firstBaseUpdate:o,lastBaseUpdate:u,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var nc=!1;function zi(){if(nc){var e=kl;if(e!==null)throw e}}function Oi(e,t,a,l){nc=!1;var o=e.updateQueue;jn=!1;var u=o.firstBaseUpdate,g=o.lastBaseUpdate,v=o.shared.pending;if(v!==null){o.shared.pending=null;var w=v,k=w.next;w.next=null,g===null?u=k:g.next=k,g=w;var V=e.alternate;V!==null&&(V=V.updateQueue,v=V.lastBaseUpdate,v!==g&&(v===null?V.firstBaseUpdate=k:v.next=k,V.lastBaseUpdate=w))}if(u!==null){var F=o.baseState;g=0,V=k=w=null,v=u;do{var U=v.lane&-536870913,Y=U!==v.lane;if(Y?(Be&U)===U:(l&U)===U){U!==0&&U===Ll&&(nc=!0),V!==null&&(V=V.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});e:{var ye=e,Ee=v;U=t;var Ie=a;switch(Ee.tag){case 1:if(ye=Ee.payload,typeof ye=="function"){F=ye.call(Ie,F,U);break e}F=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=Ee.payload,U=typeof ye=="function"?ye.call(Ie,F,U):ye,U==null)break e;F=x({},F,U);break e;case 2:jn=!0}}U=v.callback,U!==null&&(e.flags|=64,Y&&(e.flags|=8192),Y=o.callbacks,Y===null?o.callbacks=[U]:Y.push(U))}else Y={lane:U,tag:v.tag,payload:v.payload,callback:v.callback,next:null},V===null?(k=V=Y,w=F):V=V.next=Y,g|=U;if(v=v.next,v===null){if(v=o.shared.pending,v===null)break;Y=v,v=Y.next,Y.next=null,o.lastBaseUpdate=Y,o.shared.pending=null}}while(!0);V===null&&(w=F),o.baseState=w,o.firstBaseUpdate=k,o.lastBaseUpdate=V,u===null&&(o.shared.lanes=0),On|=g,e.lanes=g,e.memoizedState=F}}function dd(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function hd(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)dd(a[e],t)}var Bl=N(null),Pr=N(0);function md(e,t){e=nn,I(Pr,e),I(Bl,t),nn=e|t.baseLanes}function lc(){I(Pr,nn),I(Bl,Bl.current)}function ic(){nn=Pr.current,q(Bl),q(Pr)}var Pt=N(null),da=null;function wn(e){var t=e.alternate;I(pt,pt.current&1),I(Pt,e),da===null&&(t===null||Bl.current!==null||t.memoizedState!==null)&&(da=e)}function rc(e){I(pt,pt.current),I(Pt,e),da===null&&(da=e)}function pd(e){e.tag===22?(I(pt,pt.current),I(Pt,e),da===null&&(da=e)):Cn()}function Cn(){I(pt,pt.current),I(Pt,Pt.current)}function It(e){q(Pt),da===e&&(da=null),q(pt)}var pt=N(0);function Ir(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||du(a)||hu(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Fa=0,Oe=null,We=null,vt=null,es=!1,ql=!1,cl=!1,ts=0,Ti=0,Yl=null,Nx=0;function ut(){throw Error(s(321))}function sc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Jt(e[a],t[a]))return!1;return!0}function oc(e,t,a,l,o,u){return Fa=u,Oe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?Pd:jc,cl=!1,u=a(l,o),cl=!1,ql&&(u=yd(t,a,l,o)),gd(e),u}function gd(e){M.H=Ai;var t=We!==null&&We.next!==null;if(Fa=0,vt=We=Oe=null,es=!1,Ti=0,Yl=null,t)throw Error(s(300));e===null||bt||(e=e.dependencies,e!==null&&$r(e)&&(bt=!0))}function yd(e,t,a,l){Oe=e;var o=0;do{if(ql&&(Yl=null),Ti=0,ql=!1,25<=o)throw Error(s(301));if(o+=1,vt=We=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}M.H=Id,u=t(a,l)}while(ql);return u}function Ex(){var e=M.H,t=e.useState()[0];return t=typeof t.then=="function"?Di(t):t,e=e.useState()[0],(We!==null?We.memoizedState:null)!==e&&(Oe.flags|=1024),t}function cc(){var e=ts!==0;return ts=0,e}function uc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function fc(e){if(es){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}es=!1}Fa=0,vt=We=Oe=null,ql=!1,Ti=ts=0,Yl=null}function Bt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return vt===null?Oe.memoizedState=vt=e:vt=vt.next=e,vt}function gt(){if(We===null){var e=Oe.alternate;e=e!==null?e.memoizedState:null}else e=We.next;var t=vt===null?Oe.memoizedState:vt.next;if(t!==null)vt=t,We=e;else{if(e===null)throw Oe.alternate===null?Error(s(467)):Error(s(310));We=e,e={memoizedState:We.memoizedState,baseState:We.baseState,baseQueue:We.baseQueue,queue:We.queue,next:null},vt===null?Oe.memoizedState=vt=e:vt=vt.next=e}return vt}function as(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Di(e){var t=Ti;return Ti+=1,Yl===null&&(Yl=[]),e=sd(Yl,e,t),t=Oe,(vt===null?t.memoizedState:vt.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?Pd:jc),e}function ns(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Di(e);if(e.$$typeof===G)return Rt(e)}throw Error(s(438,String(e)))}function dc(e){var t=null,a=Oe.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=Oe.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=as(),Oe.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=Q;return t.index++,a}function Ja(e,t){return typeof t=="function"?t(e):t}function ls(e){var t=gt();return hc(t,We,e)}function hc(e,t,a){var l=e.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=a;var o=e.baseQueue,u=l.pending;if(u!==null){if(o!==null){var g=o.next;o.next=u.next,u.next=g}t.baseQueue=o=u,l.pending=null}if(u=e.baseState,o===null)e.memoizedState=u;else{t=o.next;var v=g=null,w=null,k=t,V=!1;do{var F=k.lane&-536870913;if(F!==k.lane?(Be&F)===F:(Fa&F)===F){var U=k.revertLane;if(U===0)w!==null&&(w=w.next={lane:0,revertLane:0,gesture:null,action:k.action,hasEagerState:k.hasEagerState,eagerState:k.eagerState,next:null}),F===Ll&&(V=!0);else if((Fa&U)===U){k=k.next,U===Ll&&(V=!0);continue}else F={lane:0,revertLane:k.revertLane,gesture:null,action:k.action,hasEagerState:k.hasEagerState,eagerState:k.eagerState,next:null},w===null?(v=w=F,g=u):w=w.next=F,Oe.lanes|=U,On|=U;F=k.action,cl&&a(u,F),u=k.hasEagerState?k.eagerState:a(u,F)}else U={lane:F,revertLane:k.revertLane,gesture:k.gesture,action:k.action,hasEagerState:k.hasEagerState,eagerState:k.eagerState,next:null},w===null?(v=w=U,g=u):w=w.next=U,Oe.lanes|=F,On|=F;k=k.next}while(k!==null&&k!==t);if(w===null?g=u:w.next=v,!Jt(u,e.memoizedState)&&(bt=!0,V&&(a=kl,a!==null)))throw a;e.memoizedState=u,e.baseState=g,e.baseQueue=w,l.lastRenderedState=u}return o===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function mc(e){var t=gt(),a=t.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=e;var l=a.dispatch,o=a.pending,u=t.memoizedState;if(o!==null){a.pending=null;var g=o=o.next;do u=e(u,g.action),g=g.next;while(g!==o);Jt(u,t.memoizedState)||(bt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,l]}function xd(e,t,a){var l=Oe,o=gt(),u=Ye;if(u){if(a===void 0)throw Error(s(407));a=a()}else a=t();var g=!Jt((We||o).memoizedState,a);if(g&&(o.memoizedState=a,bt=!0),o=o.queue,yc(Sd.bind(null,l,o,e),[e]),o.getSnapshot!==t||g||vt!==null&&vt.memoizedState.tag&1){if(l.flags|=2048,Vl(9,{destroy:void 0},bd.bind(null,l,o,a,t),null),tt===null)throw Error(s(349));u||(Fa&127)!==0||vd(l,t,a)}return a}function vd(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Oe.updateQueue,t===null?(t=as(),Oe.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function bd(e,t,a,l){t.value=a,t.getSnapshot=l,_d(t)&&jd(e)}function Sd(e,t,a){return a(function(){_d(t)&&jd(e)})}function _d(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Jt(e,a)}catch{return!0}}function jd(e){var t=el(e,2);t!==null&&Qt(t,e,2)}function pc(e){var t=Bt();if(typeof e=="function"){var a=e;if(e=a(),cl){Nt(!0);try{a()}finally{Nt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ja,lastRenderedState:e},t}function Nd(e,t,a,l){return e.baseState=a,hc(e,We,typeof l=="function"?l:Ja)}function wx(e,t,a,l,o){if(ss(e))throw Error(s(485));if(e=t.action,e!==null){var u={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){u.listeners.push(g)}};M.T!==null?a(!0):u.isTransition=!1,l(u),a=t.pending,a===null?(u.next=t.pending=u,Ed(t,u)):(u.next=a.next,t.pending=a.next=u)}}function Ed(e,t){var a=t.action,l=t.payload,o=e.state;if(t.isTransition){var u=M.T,g={};M.T=g;try{var v=a(o,l),w=M.S;w!==null&&w(g,v),wd(e,t,v)}catch(k){gc(e,t,k)}finally{u!==null&&g.types!==null&&(u.types=g.types),M.T=u}}else try{u=a(o,l),wd(e,t,u)}catch(k){gc(e,t,k)}}function wd(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Cd(e,t,l)},function(l){return gc(e,t,l)}):Cd(e,t,a)}function Cd(e,t,a){t.status="fulfilled",t.value=a,Rd(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Ed(e,a)))}function gc(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,Rd(t),t=t.next;while(t!==l)}e.action=null}function Rd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function zd(e,t){return t}function Od(e,t){if(Ye){var a=tt.formState;if(a!==null){e:{var l=Oe;if(Ye){if(it){t:{for(var o=it,u=fa;o.nodeType!==8;){if(!u){o=null;break t}if(o=ha(o.nextSibling),o===null){o=null;break t}}u=o.data,o=u==="F!"||u==="F"?o:null}if(o){it=ha(o.nextSibling),l=o.data==="F!";break e}}Sn(l)}l=!1}l&&(t=a[0])}}return a=Bt(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zd,lastRenderedState:t},a.queue=l,a=Fd.bind(null,Oe,l),l.dispatch=a,l=pc(!1),u=_c.bind(null,Oe,!1,l.queue),l=Bt(),o={state:t,dispatch:null,action:e,pending:null},l.queue=o,a=wx.bind(null,Oe,o,u,a),o.dispatch=a,l.memoizedState=e,[t,a,!1]}function Td(e){var t=gt();return Dd(t,We,e)}function Dd(e,t,a){if(t=hc(e,t,zd)[0],e=ls(Ja)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Di(t)}catch(g){throw g===Ul?Zr:g}else l=t;t=gt();var o=t.queue,u=o.dispatch;return a!==t.memoizedState&&(Oe.flags|=2048,Vl(9,{destroy:void 0},Cx.bind(null,o,a),null)),[l,u,e]}function Cx(e,t){e.action=t}function Md(e){var t=gt(),a=We;if(a!==null)return Dd(t,a,e);gt(),t=t.memoizedState,a=gt();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function Vl(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=Oe.updateQueue,t===null&&(t=as(),Oe.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function Ad(){return gt().memoizedState}function is(e,t,a,l){var o=Bt();Oe.flags|=e,o.memoizedState=Vl(1|t,{destroy:void 0},a,l===void 0?null:l)}function rs(e,t,a,l){var o=gt();l=l===void 0?null:l;var u=o.memoizedState.inst;We!==null&&l!==null&&sc(l,We.memoizedState.deps)?o.memoizedState=Vl(t,u,a,l):(Oe.flags|=e,o.memoizedState=Vl(1|t,u,a,l))}function Ld(e,t){is(8390656,8,e,t)}function yc(e,t){rs(2048,8,e,t)}function Rx(e){Oe.flags|=4;var t=Oe.updateQueue;if(t===null)t=as(),Oe.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function kd(e){var t=gt().memoizedState;return Rx({ref:t,nextImpl:e}),function(){if((Xe&2)!==0)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function Ud(e,t){return rs(4,2,e,t)}function Hd(e,t){return rs(4,4,e,t)}function Bd(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function qd(e,t,a){a=a!=null?a.concat([e]):null,rs(4,4,Bd.bind(null,t,e),a)}function xc(){}function Yd(e,t){var a=gt();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&sc(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function Vd(e,t){var a=gt();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&sc(t,l[1]))return l[0];if(l=e(),cl){Nt(!0);try{e()}finally{Nt(!1)}}return a.memoizedState=[l,t],l}function vc(e,t,a){return a===void 0||(Fa&1073741824)!==0&&(Be&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Gh(),Oe.lanes|=e,On|=e,a)}function Gd(e,t,a,l){return Jt(a,t)?a:Bl.current!==null?(e=vc(e,a,l),Jt(e,t)||(bt=!0),e):(Fa&42)===0||(Fa&1073741824)!==0&&(Be&261930)===0?(bt=!0,e.memoizedState=a):(e=Gh(),Oe.lanes|=e,On|=e,t)}function Kd(e,t,a,l,o){var u=J.p;J.p=u!==0&&8>u?u:8;var g=M.T,v={};M.T=v,_c(e,!1,t,a);try{var w=o(),k=M.S;if(k!==null&&k(v,w),w!==null&&typeof w=="object"&&typeof w.then=="function"){var V=jx(w,l);Mi(e,t,V,aa(e))}else Mi(e,t,l,aa(e))}catch(F){Mi(e,t,{then:function(){},status:"rejected",reason:F},aa())}finally{J.p=u,g!==null&&v.types!==null&&(g.types=v.types),M.T=g}}function zx(){}function bc(e,t,a,l){if(e.tag!==5)throw Error(s(476));var o=$d(e).queue;Kd(e,o,t,ue,a===null?zx:function(){return Xd(e),a(l)})}function $d(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ue,baseState:ue,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ja,lastRenderedState:ue},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ja,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Xd(e){var t=$d(e);t.next===null&&(t=e.alternate.memoizedState),Mi(e,t.next.queue,{},aa())}function Sc(){return Rt(Ji)}function Qd(){return gt().memoizedState}function Zd(){return gt().memoizedState}function Ox(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=aa();e=Nn(a);var l=En(t,e,a);l!==null&&(Qt(l,t,a),Ri(l,t,a)),t={cache:Jo()},e.payload=t;return}t=t.return}}function Tx(e,t,a){var l=aa();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ss(e)?Jd(t,a):(a=Bo(e,t,a,l),a!==null&&(Qt(a,e,l),Wd(a,t,l)))}function Fd(e,t,a){var l=aa();Mi(e,t,a,l)}function Mi(e,t,a,l){var o={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ss(e))Jd(t,o);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var g=t.lastRenderedState,v=u(g,a);if(o.hasEagerState=!0,o.eagerState=v,Jt(v,g))return Yr(e,t,o,0),tt===null&&qr(),!1}catch{}if(a=Bo(e,t,o,l),a!==null)return Qt(a,e,l),Wd(a,t,l),!0}return!1}function _c(e,t,a,l){if(l={lane:2,revertLane:eu(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ss(e)){if(t)throw Error(s(479))}else t=Bo(e,a,l,2),t!==null&&Qt(t,e,2)}function ss(e){var t=e.alternate;return e===Oe||t!==null&&t===Oe}function Jd(e,t){ql=es=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Wd(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,zr(e,a)}}var Ai={readContext:Rt,use:ns,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useLayoutEffect:ut,useInsertionEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useSyncExternalStore:ut,useId:ut,useHostTransitionStatus:ut,useFormState:ut,useActionState:ut,useOptimistic:ut,useMemoCache:ut,useCacheRefresh:ut};Ai.useEffectEvent=ut;var Pd={readContext:Rt,use:ns,useCallback:function(e,t){return Bt().memoizedState=[e,t===void 0?null:t],e},useContext:Rt,useEffect:Ld,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,is(4194308,4,Bd.bind(null,t,e),a)},useLayoutEffect:function(e,t){return is(4194308,4,e,t)},useInsertionEffect:function(e,t){is(4,2,e,t)},useMemo:function(e,t){var a=Bt();t=t===void 0?null:t;var l=e();if(cl){Nt(!0);try{e()}finally{Nt(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=Bt();if(a!==void 0){var o=a(t);if(cl){Nt(!0);try{a(t)}finally{Nt(!1)}}}else o=t;return l.memoizedState=l.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},l.queue=e,e=e.dispatch=Tx.bind(null,Oe,e),[l.memoizedState,e]},useRef:function(e){var t=Bt();return e={current:e},t.memoizedState=e},useState:function(e){e=pc(e);var t=e.queue,a=Fd.bind(null,Oe,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:xc,useDeferredValue:function(e,t){var a=Bt();return vc(a,e,t)},useTransition:function(){var e=pc(!1);return e=Kd.bind(null,Oe,e.queue,!0,!1),Bt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=Oe,o=Bt();if(Ye){if(a===void 0)throw Error(s(407));a=a()}else{if(a=t(),tt===null)throw Error(s(349));(Be&127)!==0||vd(l,t,a)}o.memoizedState=a;var u={value:a,getSnapshot:t};return o.queue=u,Ld(Sd.bind(null,l,u,e),[e]),l.flags|=2048,Vl(9,{destroy:void 0},bd.bind(null,l,u,a,t),null),a},useId:function(){var e=Bt(),t=tt.identifierPrefix;if(Ye){var a=Ma,l=Da;a=(l&~(1<<32-Tt(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=ts++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Nx++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Sc,useFormState:Od,useActionState:Od,useOptimistic:function(e){var t=Bt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=_c.bind(null,Oe,!0,a),a.dispatch=t,[e,t]},useMemoCache:dc,useCacheRefresh:function(){return Bt().memoizedState=Ox.bind(null,Oe)},useEffectEvent:function(e){var t=Bt(),a={impl:e};return t.memoizedState=a,function(){if((Xe&2)!==0)throw Error(s(440));return a.impl.apply(void 0,arguments)}}},jc={readContext:Rt,use:ns,useCallback:Yd,useContext:Rt,useEffect:yc,useImperativeHandle:qd,useInsertionEffect:Ud,useLayoutEffect:Hd,useMemo:Vd,useReducer:ls,useRef:Ad,useState:function(){return ls(Ja)},useDebugValue:xc,useDeferredValue:function(e,t){var a=gt();return Gd(a,We.memoizedState,e,t)},useTransition:function(){var e=ls(Ja)[0],t=gt().memoizedState;return[typeof e=="boolean"?e:Di(e),t]},useSyncExternalStore:xd,useId:Qd,useHostTransitionStatus:Sc,useFormState:Td,useActionState:Td,useOptimistic:function(e,t){var a=gt();return Nd(a,We,e,t)},useMemoCache:dc,useCacheRefresh:Zd};jc.useEffectEvent=kd;var Id={readContext:Rt,use:ns,useCallback:Yd,useContext:Rt,useEffect:yc,useImperativeHandle:qd,useInsertionEffect:Ud,useLayoutEffect:Hd,useMemo:Vd,useReducer:mc,useRef:Ad,useState:function(){return mc(Ja)},useDebugValue:xc,useDeferredValue:function(e,t){var a=gt();return We===null?vc(a,e,t):Gd(a,We.memoizedState,e,t)},useTransition:function(){var e=mc(Ja)[0],t=gt().memoizedState;return[typeof e=="boolean"?e:Di(e),t]},useSyncExternalStore:xd,useId:Qd,useHostTransitionStatus:Sc,useFormState:Md,useActionState:Md,useOptimistic:function(e,t){var a=gt();return We!==null?Nd(a,We,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:dc,useCacheRefresh:Zd};Id.useEffectEvent=kd;function Nc(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:x({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Ec={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=aa(),o=Nn(l);o.payload=t,a!=null&&(o.callback=a),t=En(e,o,l),t!==null&&(Qt(t,e,l),Ri(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=aa(),o=Nn(l);o.tag=1,o.payload=t,a!=null&&(o.callback=a),t=En(e,o,l),t!==null&&(Qt(t,e,l),Ri(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=aa(),l=Nn(a);l.tag=2,t!=null&&(l.callback=t),t=En(e,l,a),t!==null&&(Qt(t,e,a),Ri(t,e,a))}};function eh(e,t,a,l,o,u,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,u,g):t.prototype&&t.prototype.isPureReactComponent?!bi(a,l)||!bi(o,u):!0}function th(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&Ec.enqueueReplaceState(t,t.state,null)}function ul(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=x({},a));for(var o in e)a[o]===void 0&&(a[o]=e[o])}return a}function ah(e){Br(e)}function nh(e){console.error(e)}function lh(e){Br(e)}function os(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function ih(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function wc(e,t,a){return a=Nn(a),a.tag=3,a.payload={element:null},a.callback=function(){os(e,t)},a}function rh(e){return e=Nn(e),e.tag=3,e}function sh(e,t,a,l){var o=a.type.getDerivedStateFromError;if(typeof o=="function"){var u=l.value;e.payload=function(){return o(u)},e.callback=function(){ih(t,a,l)}}var g=a.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){ih(t,a,l),typeof o!="function"&&(Tn===null?Tn=new Set([this]):Tn.add(this));var v=l.stack;this.componentDidCatch(l.value,{componentStack:v!==null?v:""})})}function Dx(e,t,a,l,o){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&Al(t,a,o,!0),a=Pt.current,a!==null){switch(a.tag){case 31:case 13:return da===null?bs():a.alternate===null&&ft===0&&(ft=3),a.flags&=-257,a.flags|=65536,a.lanes=o,l===Fr?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),Wc(e,l,o)),!1;case 22:return a.flags|=65536,l===Fr?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),Wc(e,l,o)),!1}throw Error(s(435,a.tag))}return Wc(e,l,o),bs(),!1}if(Ye)return t=Pt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,l!==$o&&(e=Error(s(422),{cause:l}),ji(oa(e,a)))):(l!==$o&&(t=Error(s(423),{cause:l}),ji(oa(t,a))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,l=oa(l,a),o=wc(e.stateNode,l,o),ac(e,o),ft!==4&&(ft=2)),!1;var u=Error(s(520),{cause:l});if(u=oa(u,a),Vi===null?Vi=[u]:Vi.push(u),ft!==4&&(ft=2),t===null)return!0;l=oa(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=o&-o,a.lanes|=e,e=wc(a.stateNode,l,e),ac(a,e),!1;case 1:if(t=a.type,u=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Tn===null||!Tn.has(u))))return a.flags|=65536,o&=-o,a.lanes|=o,o=rh(o),sh(o,e,a,l),ac(a,o),!1}a=a.return}while(a!==null);return!1}var Cc=Error(s(461)),bt=!1;function zt(e,t,a,l){t.child=e===null?fd(t,null,a,l):ol(t,e.child,a,l)}function oh(e,t,a,l,o){a=a.render;var u=t.ref;if("ref"in l){var g={};for(var v in l)v!=="ref"&&(g[v]=l[v])}else g=l;return ll(t),l=oc(e,t,a,g,u,o),v=cc(),e!==null&&!bt?(uc(e,t,o),Wa(e,t,o)):(Ye&&v&&Go(t),t.flags|=1,zt(e,t,l,o),t.child)}function ch(e,t,a,l,o){if(e===null){var u=a.type;return typeof u=="function"&&!qo(u)&&u.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=u,uh(e,t,u,l,o)):(e=Gr(a.type,null,l,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Lc(e,o)){var g=u.memoizedProps;if(a=a.compare,a=a!==null?a:bi,a(g,l)&&e.ref===t.ref)return Wa(e,t,o)}return t.flags|=1,e=$a(u,l),e.ref=t.ref,e.return=t,t.child=e}function uh(e,t,a,l,o){if(e!==null){var u=e.memoizedProps;if(bi(u,l)&&e.ref===t.ref)if(bt=!1,t.pendingProps=l=u,Lc(e,o))(e.flags&131072)!==0&&(bt=!0);else return t.lanes=e.lanes,Wa(e,t,o)}return Rc(e,t,a,l,o)}function fh(e,t,a,l){var o=l.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|a:a,e!==null){for(l=t.child=e.child,o=0;l!==null;)o=o|l.lanes|l.childLanes,l=l.sibling;l=o&~u}else l=0,t.child=null;return dh(e,t,u,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Qr(t,u!==null?u.cachePool:null),u!==null?md(t,u):lc(),pd(t);else return l=t.lanes=536870912,dh(e,t,u!==null?u.baseLanes|a:a,a,l)}else u!==null?(Qr(t,u.cachePool),md(t,u),Cn(),t.memoizedState=null):(e!==null&&Qr(t,null),lc(),Cn());return zt(e,t,o,a),t.child}function Li(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function dh(e,t,a,l,o){var u=Po();return u=u===null?null:{parent:xt._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&Qr(t,null),lc(),pd(t),e!==null&&Al(e,t,l,!0),t.childLanes=o,null}function cs(e,t){return t=fs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function hh(e,t,a){return ol(t,e.child,null,a),e=cs(t,t.pendingProps),e.flags|=2,It(t),t.memoizedState=null,e}function Mx(e,t,a){var l=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ye){if(l.mode==="hidden")return e=cs(t,l),t.lanes=536870912,Li(null,e);if(rc(t),(e=it)?(e=Em(e,fa),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:vn!==null?{id:Da,overflow:Ma}:null,retryLane:536870912,hydrationErrors:null},a=Jf(e),a.return=t,t.child=a,Ct=t,it=null)):e=null,e===null)throw Sn(t);return t.lanes=536870912,null}return cs(t,l)}var u=e.memoizedState;if(u!==null){var g=u.dehydrated;if(rc(t),o)if(t.flags&256)t.flags&=-257,t=hh(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558));else if(bt||Al(e,t,a,!1),o=(a&e.childLanes)!==0,bt||o){if(l=tt,l!==null&&(g=C(l,a),g!==0&&g!==u.retryLane))throw u.retryLane=g,el(e,g),Qt(l,e,g),Cc;bs(),t=hh(e,t,a)}else e=u.treeContext,it=ha(g.nextSibling),Ct=t,Ye=!0,bn=null,fa=!1,e!==null&&If(t,e),t=cs(t,l),t.flags|=4096;return t}return e=$a(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function us(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(s(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Rc(e,t,a,l,o){return ll(t),a=oc(e,t,a,l,void 0,o),l=cc(),e!==null&&!bt?(uc(e,t,o),Wa(e,t,o)):(Ye&&l&&Go(t),t.flags|=1,zt(e,t,a,o),t.child)}function mh(e,t,a,l,o,u){return ll(t),t.updateQueue=null,a=yd(t,l,a,o),gd(e),l=cc(),e!==null&&!bt?(uc(e,t,u),Wa(e,t,u)):(Ye&&l&&Go(t),t.flags|=1,zt(e,t,a,u),t.child)}function ph(e,t,a,l,o){if(ll(t),t.stateNode===null){var u=Ol,g=a.contextType;typeof g=="object"&&g!==null&&(u=Rt(g)),u=new a(l,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Ec,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=l,u.state=t.memoizedState,u.refs={},ec(t),g=a.contextType,u.context=typeof g=="object"&&g!==null?Rt(g):Ol,u.state=t.memoizedState,g=a.getDerivedStateFromProps,typeof g=="function"&&(Nc(t,a,g,l),u.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(g=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),g!==u.state&&Ec.enqueueReplaceState(u,u.state,null),Oi(t,l,u,o),zi(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){u=t.stateNode;var v=t.memoizedProps,w=ul(a,v);u.props=w;var k=u.context,V=a.contextType;g=Ol,typeof V=="object"&&V!==null&&(g=Rt(V));var F=a.getDerivedStateFromProps;V=typeof F=="function"||typeof u.getSnapshotBeforeUpdate=="function",v=t.pendingProps!==v,V||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(v||k!==g)&&th(t,u,l,g),jn=!1;var U=t.memoizedState;u.state=U,Oi(t,l,u,o),zi(),k=t.memoizedState,v||U!==k||jn?(typeof F=="function"&&(Nc(t,a,F,l),k=t.memoizedState),(w=jn||eh(t,a,w,l,U,k,g))?(V||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=k),u.props=l,u.state=k,u.context=g,l=w):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{u=t.stateNode,tc(e,t),g=t.memoizedProps,V=ul(a,g),u.props=V,F=t.pendingProps,U=u.context,k=a.contextType,w=Ol,typeof k=="object"&&k!==null&&(w=Rt(k)),v=a.getDerivedStateFromProps,(k=typeof v=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(g!==F||U!==w)&&th(t,u,l,w),jn=!1,U=t.memoizedState,u.state=U,Oi(t,l,u,o),zi();var Y=t.memoizedState;g!==F||U!==Y||jn||e!==null&&e.dependencies!==null&&$r(e.dependencies)?(typeof v=="function"&&(Nc(t,a,v,l),Y=t.memoizedState),(V=jn||eh(t,a,V,l,U,Y,w)||e!==null&&e.dependencies!==null&&$r(e.dependencies))?(k||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(l,Y,w),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(l,Y,w)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||g===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=Y),u.props=l,u.state=Y,u.context=w,l=V):(typeof u.componentDidUpdate!="function"||g===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),l=!1)}return u=l,us(e,t),l=(t.flags&128)!==0,u||l?(u=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&l?(t.child=ol(t,e.child,null,o),t.child=ol(t,null,a,o)):zt(e,t,a,o),t.memoizedState=u.state,e=t.child):e=Wa(e,t,o),e}function gh(e,t,a,l){return al(),t.flags|=256,zt(e,t,a,l),t.child}var zc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Oc(e){return{baseLanes:e,cachePool:id()}}function Tc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=ta),e}function yh(e,t,a){var l=t.pendingProps,o=!1,u=(t.flags&128)!==0,g;if((g=u)||(g=e!==null&&e.memoizedState===null?!1:(pt.current&2)!==0),g&&(o=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ye){if(o?wn(t):Cn(),(e=it)?(e=Em(e,fa),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:vn!==null?{id:Da,overflow:Ma}:null,retryLane:536870912,hydrationErrors:null},a=Jf(e),a.return=t,t.child=a,Ct=t,it=null)):e=null,e===null)throw Sn(t);return hu(e)?t.lanes=32:t.lanes=536870912,null}var v=l.children;return l=l.fallback,o?(Cn(),o=t.mode,v=fs({mode:"hidden",children:v},o),l=tl(l,o,a,null),v.return=t,l.return=t,v.sibling=l,t.child=v,l=t.child,l.memoizedState=Oc(a),l.childLanes=Tc(e,g,a),t.memoizedState=zc,Li(null,l)):(wn(t),Dc(t,v))}var w=e.memoizedState;if(w!==null&&(v=w.dehydrated,v!==null)){if(u)t.flags&256?(wn(t),t.flags&=-257,t=Mc(e,t,a)):t.memoizedState!==null?(Cn(),t.child=e.child,t.flags|=128,t=null):(Cn(),v=l.fallback,o=t.mode,l=fs({mode:"visible",children:l.children},o),v=tl(v,o,a,null),v.flags|=2,l.return=t,v.return=t,l.sibling=v,t.child=l,ol(t,e.child,null,a),l=t.child,l.memoizedState=Oc(a),l.childLanes=Tc(e,g,a),t.memoizedState=zc,t=Li(null,l));else if(wn(t),hu(v)){if(g=v.nextSibling&&v.nextSibling.dataset,g)var k=g.dgst;g=k,l=Error(s(419)),l.stack="",l.digest=g,ji({value:l,source:null,stack:null}),t=Mc(e,t,a)}else if(bt||Al(e,t,a,!1),g=(a&e.childLanes)!==0,bt||g){if(g=tt,g!==null&&(l=C(g,a),l!==0&&l!==w.retryLane))throw w.retryLane=l,el(e,l),Qt(g,e,l),Cc;du(v)||bs(),t=Mc(e,t,a)}else du(v)?(t.flags|=192,t.child=e.child,t=null):(e=w.treeContext,it=ha(v.nextSibling),Ct=t,Ye=!0,bn=null,fa=!1,e!==null&&If(t,e),t=Dc(t,l.children),t.flags|=4096);return t}return o?(Cn(),v=l.fallback,o=t.mode,w=e.child,k=w.sibling,l=$a(w,{mode:"hidden",children:l.children}),l.subtreeFlags=w.subtreeFlags&65011712,k!==null?v=$a(k,v):(v=tl(v,o,a,null),v.flags|=2),v.return=t,l.return=t,l.sibling=v,t.child=l,Li(null,l),l=t.child,v=e.child.memoizedState,v===null?v=Oc(a):(o=v.cachePool,o!==null?(w=xt._currentValue,o=o.parent!==w?{parent:w,pool:w}:o):o=id(),v={baseLanes:v.baseLanes|a,cachePool:o}),l.memoizedState=v,l.childLanes=Tc(e,g,a),t.memoizedState=zc,Li(e.child,l)):(wn(t),a=e.child,e=a.sibling,a=$a(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=a,t.memoizedState=null,a)}function Dc(e,t){return t=fs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function fs(e,t){return e=Wt(22,e,null,t),e.lanes=0,e}function Mc(e,t,a){return ol(t,e.child,null,a),e=Dc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function xh(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Zo(e.return,t,a)}function Ac(e,t,a,l,o,u){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:o,treeForkCount:u}:(g.isBackwards=t,g.rendering=null,g.renderingStartTime=0,g.last=l,g.tail=a,g.tailMode=o,g.treeForkCount=u)}function vh(e,t,a){var l=t.pendingProps,o=l.revealOrder,u=l.tail;l=l.children;var g=pt.current,v=(g&2)!==0;if(v?(g=g&1|2,t.flags|=128):g&=1,I(pt,g),zt(e,t,l,a),l=Ye?_i:0,!v&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&xh(e,a,t);else if(e.tag===19)xh(e,a,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}switch(o){case"forwards":for(a=t.child,o=null;a!==null;)e=a.alternate,e!==null&&Ir(e)===null&&(o=a),a=a.sibling;a=o,a===null?(o=t.child,t.child=null):(o=a.sibling,a.sibling=null),Ac(t,!1,o,a,u,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Ir(e)===null){t.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}Ac(t,!0,a,null,u,l);break;case"together":Ac(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Wa(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),On|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Al(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,a=$a(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=$a(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Lc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&$r(e)))}function Ax(e,t,a){switch(t.tag){case 3:ot(t,t.stateNode.containerInfo),_n(t,xt,e.memoizedState.cache),al();break;case 27:case 5:Ba(t);break;case 4:ot(t,t.stateNode.containerInfo);break;case 10:_n(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,rc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(wn(t),t.flags|=128,null):(a&t.child.childLanes)!==0?yh(e,t,a):(wn(t),e=Wa(e,t,a),e!==null?e.sibling:null);wn(t);break;case 19:var o=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(Al(e,t,a,!1),l=(a&t.childLanes)!==0),o){if(l)return vh(e,t,a);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),I(pt,pt.current),l)break;return null;case 22:return t.lanes=0,fh(e,t,a,t.pendingProps);case 24:_n(t,xt,e.memoizedState.cache)}return Wa(e,t,a)}function bh(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)bt=!0;else{if(!Lc(e,a)&&(t.flags&128)===0)return bt=!1,Ax(e,t,a);bt=(e.flags&131072)!==0}else bt=!1,Ye&&(t.flags&1048576)!==0&&Pf(t,_i,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=rl(t.elementType),t.type=e,typeof e=="function")qo(e)?(l=ul(e,l),t.tag=1,t=ph(null,t,e,l,a)):(t.tag=0,t=Rc(null,t,e,l,a));else{if(e!=null){var o=e.$$typeof;if(o===ne){t.tag=11,t=oh(null,t,e,l,a);break e}else if(o===P){t.tag=14,t=ch(null,t,e,l,a);break e}}throw t=Z(e)||e,Error(s(306,t,""))}}return t;case 0:return Rc(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,o=ul(l,t.pendingProps),ph(e,t,l,o,a);case 3:e:{if(ot(t,t.stateNode.containerInfo),e===null)throw Error(s(387));l=t.pendingProps;var u=t.memoizedState;o=u.element,tc(e,t),Oi(t,l,null,a);var g=t.memoizedState;if(l=g.cache,_n(t,xt,l),l!==u.cache&&Fo(t,[xt],a,!0),zi(),l=g.element,u.isDehydrated)if(u={element:l,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=gh(e,t,l,a);break e}else if(l!==o){o=oa(Error(s(424)),t),ji(o),t=gh(e,t,l,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,it=ha(e.firstChild),Ct=t,Ye=!0,bn=null,fa=!0,a=fd(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(al(),l===o){t=Wa(e,t,a);break e}zt(e,t,l,a)}t=t.child}return t;case 26:return us(e,t),e===null?(a=Tm(t.type,null,t.pendingProps,null))?t.memoizedState=a:Ye||(a=t.type,e=t.pendingProps,l=Cs(je.current).createElement(a),l[oe]=t,l[he]=e,Ot(l,a,e),at(l),t.stateNode=l):t.memoizedState=Tm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ba(t),e===null&&Ye&&(l=t.stateNode=Rm(t.type,t.pendingProps,je.current),Ct=t,fa=!0,o=it,Ln(t.type)?(mu=o,it=ha(l.firstChild)):it=o),zt(e,t,t.pendingProps.children,a),us(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ye&&((o=l=it)&&(l=uv(l,t.type,t.pendingProps,fa),l!==null?(t.stateNode=l,Ct=t,it=ha(l.firstChild),fa=!1,o=!0):o=!1),o||Sn(t)),Ba(t),o=t.type,u=t.pendingProps,g=e!==null?e.memoizedProps:null,l=u.children,cu(o,u)?l=null:g!==null&&cu(o,g)&&(t.flags|=32),t.memoizedState!==null&&(o=oc(e,t,Ex,null,null,a),Ji._currentValue=o),us(e,t),zt(e,t,l,a),t.child;case 6:return e===null&&Ye&&((e=a=it)&&(a=fv(a,t.pendingProps,fa),a!==null?(t.stateNode=a,Ct=t,it=null,e=!0):e=!1),e||Sn(t)),null;case 13:return yh(e,t,a);case 4:return ot(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=ol(t,null,l,a):zt(e,t,l,a),t.child;case 11:return oh(e,t,t.type,t.pendingProps,a);case 7:return zt(e,t,t.pendingProps,a),t.child;case 8:return zt(e,t,t.pendingProps.children,a),t.child;case 12:return zt(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,_n(t,t.type,l.value),zt(e,t,l.children,a),t.child;case 9:return o=t.type._context,l=t.pendingProps.children,ll(t),o=Rt(o),l=l(o),t.flags|=1,zt(e,t,l,a),t.child;case 14:return ch(e,t,t.type,t.pendingProps,a);case 15:return uh(e,t,t.type,t.pendingProps,a);case 19:return vh(e,t,a);case 31:return Mx(e,t,a);case 22:return fh(e,t,a,t.pendingProps);case 24:return ll(t),l=Rt(xt),e===null?(o=Po(),o===null&&(o=tt,u=Jo(),o.pooledCache=u,u.refCount++,u!==null&&(o.pooledCacheLanes|=a),o=u),t.memoizedState={parent:l,cache:o},ec(t),_n(t,xt,o)):((e.lanes&a)!==0&&(tc(e,t),Oi(t,null,null,a),zi()),o=e.memoizedState,u=t.memoizedState,o.parent!==l?(o={parent:l,cache:l},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),_n(t,xt,l)):(l=u.cache,_n(t,xt,l),l!==o.cache&&Fo(t,[xt],a,!0))),zt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function Pa(e){e.flags|=4}function kc(e,t,a,l,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(Qh())e.flags|=8192;else throw sl=Fr,Io}else e.flags&=-16777217}function Sh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!km(t))if(Qh())e.flags|=8192;else throw sl=Fr,Io}function ds(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?di():536870912,e.lanes|=t,Xl|=t)}function ki(e,t){if(!Ye)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function rt(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var o=e.child;o!==null;)a|=o.lanes|o.childLanes,l|=o.subtreeFlags&65011712,l|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)a|=o.lanes|o.childLanes,l|=o.subtreeFlags,l|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function Lx(e,t,a){var l=t.pendingProps;switch(Ko(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return rt(t),null;case 1:return rt(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Za(xt),Qe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Ml(t)?Pa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Xo())),rt(t),null;case 26:var o=t.type,u=t.memoizedState;return e===null?(Pa(t),u!==null?(rt(t),Sh(t,u)):(rt(t),kc(t,o,null,l,a))):u?u!==e.memoizedState?(Pa(t),rt(t),Sh(t,u)):(rt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Pa(t),rt(t),kc(t,o,e,l,a)),null;case 27:if(un(t),a=je.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Pa(t);else{if(!l){if(t.stateNode===null)throw Error(s(166));return rt(t),null}e=se.current,Ml(t)?ed(t):(e=Rm(o,l,a),t.stateNode=e,Pa(t))}return rt(t),null;case 5:if(un(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Pa(t);else{if(!l){if(t.stateNode===null)throw Error(s(166));return rt(t),null}if(u=se.current,Ml(t))ed(t);else{var g=Cs(je.current);switch(u){case 1:u=g.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:u=g.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":u=g.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":u=g.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":u=g.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof l.is=="string"?g.createElement("select",{is:l.is}):g.createElement("select"),l.multiple?u.multiple=!0:l.size&&(u.size=l.size);break;default:u=typeof l.is=="string"?g.createElement(o,{is:l.is}):g.createElement(o)}}u[oe]=t,u[he]=l;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)u.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=u;e:switch(Ot(u,o,l),o){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Pa(t)}}return rt(t),kc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Pa(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(s(166));if(e=je.current,Ml(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,o=Ct,o!==null)switch(o.tag){case 27:case 5:l=o.memoizedProps}e[oe]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||ym(e.nodeValue,a)),e||Sn(t,!0)}else e=Cs(e).createTextNode(l),e[oe]=t,t.stateNode=e}return rt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Ml(t),a!==null){if(e===null){if(!l)throw Error(s(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(557));e[oe]=t}else al(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;rt(t),e=!1}else a=Xo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(It(t),t):(It(t),null);if((t.flags&128)!==0)throw Error(s(558))}return rt(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=Ml(t),l!==null&&l.dehydrated!==null){if(e===null){if(!o)throw Error(s(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(s(317));o[oe]=t}else al(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;rt(t),o=!1}else o=Xo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(It(t),t):(It(t),null)}return It(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,o=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(o=l.alternate.memoizedState.cachePool.pool),u=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==o&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),ds(t,t.updateQueue),rt(t),null);case 4:return Qe(),e===null&&lu(t.stateNode.containerInfo),rt(t),null;case 10:return Za(t.type),rt(t),null;case 19:if(q(pt),l=t.memoizedState,l===null)return rt(t),null;if(o=(t.flags&128)!==0,u=l.rendering,u===null)if(o)ki(l,!1);else{if(ft!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Ir(e),u!==null){for(t.flags|=128,ki(l,!1),e=u.updateQueue,t.updateQueue=e,ds(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Ff(a,e),a=a.sibling;return I(pt,pt.current&1|2),Ye&&Xa(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Ut()>ys&&(t.flags|=128,o=!0,ki(l,!1),t.lanes=4194304)}else{if(!o)if(e=Ir(u),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,ds(t,e),ki(l,!0),l.tail===null&&l.tailMode==="hidden"&&!u.alternate&&!Ye)return rt(t),null}else 2*Ut()-l.renderingStartTime>ys&&a!==536870912&&(t.flags|=128,o=!0,ki(l,!1),t.lanes=4194304);l.isBackwards?(u.sibling=t.child,t.child=u):(e=l.last,e!==null?e.sibling=u:t.child=u,l.last=u)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Ut(),e.sibling=null,a=pt.current,I(pt,o?a&1|2:a&1),Ye&&Xa(t,l.treeForkCount),e):(rt(t),null);case 22:case 23:return It(t),ic(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(rt(t),t.subtreeFlags&6&&(t.flags|=8192)):rt(t),a=t.updateQueue,a!==null&&ds(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&q(il),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Za(xt),rt(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function kx(e,t){switch(Ko(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Za(xt),Qe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return un(t),null;case 31:if(t.memoizedState!==null){if(It(t),t.alternate===null)throw Error(s(340));al()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(It(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));al()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return q(pt),null;case 4:return Qe(),null;case 10:return Za(t.type),null;case 22:case 23:return It(t),ic(),e!==null&&q(il),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Za(xt),null;case 25:return null;default:return null}}function _h(e,t){switch(Ko(t),t.tag){case 3:Za(xt),Qe();break;case 26:case 27:case 5:un(t);break;case 4:Qe();break;case 31:t.memoizedState!==null&&It(t);break;case 13:It(t);break;case 19:q(pt);break;case 10:Za(t.type);break;case 22:case 23:It(t),ic(),e!==null&&q(il);break;case 24:Za(xt)}}function Ui(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var o=l.next;a=o;do{if((a.tag&e)===e){l=void 0;var u=a.create,g=a.inst;l=u(),g.destroy=l}a=a.next}while(a!==o)}}catch(v){Fe(t,t.return,v)}}function Rn(e,t,a){try{var l=t.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var u=o.next;l=u;do{if((l.tag&e)===e){var g=l.inst,v=g.destroy;if(v!==void 0){g.destroy=void 0,o=t;var w=a,k=v;try{k()}catch(V){Fe(o,w,V)}}}l=l.next}while(l!==u)}}catch(V){Fe(t,t.return,V)}}function jh(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{hd(t,a)}catch(l){Fe(e,e.return,l)}}}function Nh(e,t,a){a.props=ul(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Fe(e,t,l)}}function Hi(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(o){Fe(e,t,o)}}function Aa(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(o){Fe(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(o){Fe(e,t,o)}else a.current=null}function Eh(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(o){Fe(e,e.return,o)}}function Uc(e,t,a){try{var l=e.stateNode;lv(l,e.type,a,t),l[he]=t}catch(o){Fe(e,e.return,o)}}function wh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ln(e.type)||e.tag===4}function Hc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wh(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&&Ln(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 Bc(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Ga));else if(l!==4&&(l===27&&Ln(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Bc(e,t,a),e=e.sibling;e!==null;)Bc(e,t,a),e=e.sibling}function hs(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&Ln(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(hs(e,t,a),e=e.sibling;e!==null;)hs(e,t,a),e=e.sibling}function Ch(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);Ot(t,l,a),t[oe]=e,t[he]=a}catch(u){Fe(e,e.return,u)}}var Ia=!1,St=!1,qc=!1,Rh=typeof WeakSet=="function"?WeakSet:Set,wt=null;function Ux(e,t){if(e=e.containerInfo,su=As,e=qf(e),Mo(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var o=l.anchorOffset,u=l.focusNode;l=l.focusOffset;try{a.nodeType,u.nodeType}catch{a=null;break e}var g=0,v=-1,w=-1,k=0,V=0,F=e,U=null;t:for(;;){for(var Y;F!==a||o!==0&&F.nodeType!==3||(v=g+o),F!==u||l!==0&&F.nodeType!==3||(w=g+l),F.nodeType===3&&(g+=F.nodeValue.length),(Y=F.firstChild)!==null;)U=F,F=Y;for(;;){if(F===e)break t;if(U===a&&++k===o&&(v=g),U===u&&++V===l&&(w=g),(Y=F.nextSibling)!==null)break;F=U,U=F.parentNode}F=Y}a=v===-1||w===-1?null:{start:v,end:w}}else a=null}a=a||{start:0,end:0}}else a=null;for(ou={focusedElem:e,selectionRange:a},As=!1,wt=t;wt!==null;)if(t=wt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,wt=e;else for(;wt!==null;){switch(t=wt,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)o=e[a],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,a=t,o=u.memoizedProps,u=u.memoizedState,l=a.stateNode;try{var ye=ul(a.type,o);e=l.getSnapshotBeforeUpdate(ye,u),l.__reactInternalSnapshotBeforeUpdate=e}catch(Ee){Fe(a,a.return,Ee)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)fu(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":fu(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(s(163))}if(e=t.sibling,e!==null){e.return=t.return,wt=e;break}wt=t.return}}function zh(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:tn(e,a),l&4&&Ui(5,a);break;case 1:if(tn(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(g){Fe(a,a.return,g)}else{var o=ul(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){Fe(a,a.return,g)}}l&64&&jh(a),l&512&&Hi(a,a.return);break;case 3:if(tn(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{hd(e,t)}catch(g){Fe(a,a.return,g)}}break;case 27:t===null&&l&4&&Ch(a);case 26:case 5:tn(e,a),t===null&&l&4&&Eh(a),l&512&&Hi(a,a.return);break;case 12:tn(e,a);break;case 31:tn(e,a),l&4&&Dh(e,a);break;case 13:tn(e,a),l&4&&Mh(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Xx.bind(null,a),dv(e,a))));break;case 22:if(l=a.memoizedState!==null||Ia,!l){t=t!==null&&t.memoizedState!==null||St,o=Ia;var u=St;Ia=l,(St=t)&&!u?an(e,a,(a.subtreeFlags&8772)!==0):tn(e,a),Ia=o,St=u}break;case 30:break;default:tn(e,a)}}function Oh(e){var t=e.alternate;t!==null&&(e.alternate=null,Oh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&et(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 st=null,Gt=!1;function en(e,t,a){for(a=a.child;a!==null;)Th(e,t,a),a=a.sibling}function Th(e,t,a){if(Ht&&typeof Ht.onCommitFiberUnmount=="function")try{Ht.onCommitFiberUnmount(Ya,a)}catch{}switch(a.tag){case 26:St||Aa(a,t),en(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:St||Aa(a,t);var l=st,o=Gt;Ln(a.type)&&(st=a.stateNode,Gt=!1),en(e,t,a),Qi(a.stateNode),st=l,Gt=o;break;case 5:St||Aa(a,t);case 6:if(l=st,o=Gt,st=null,en(e,t,a),st=l,Gt=o,st!==null)if(Gt)try{(st.nodeType===9?st.body:st.nodeName==="HTML"?st.ownerDocument.body:st).removeChild(a.stateNode)}catch(u){Fe(a,t,u)}else try{st.removeChild(a.stateNode)}catch(u){Fe(a,t,u)}break;case 18:st!==null&&(Gt?(e=st,jm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),ei(e)):jm(st,a.stateNode));break;case 4:l=st,o=Gt,st=a.stateNode.containerInfo,Gt=!0,en(e,t,a),st=l,Gt=o;break;case 0:case 11:case 14:case 15:Rn(2,a,t),St||Rn(4,a,t),en(e,t,a);break;case 1:St||(Aa(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Nh(a,t,l)),en(e,t,a);break;case 21:en(e,t,a);break;case 22:St=(l=St)||a.memoizedState!==null,en(e,t,a),St=l;break;default:en(e,t,a)}}function Dh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ei(e)}catch(a){Fe(t,t.return,a)}}}function Mh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ei(e)}catch(a){Fe(t,t.return,a)}}function Hx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Rh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Rh),t;default:throw Error(s(435,e.tag))}}function ms(e,t){var a=Hx(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var o=Qx.bind(null,e,l);l.then(o,o)}})}function Kt(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var o=a[l],u=e,g=t,v=g;e:for(;v!==null;){switch(v.tag){case 27:if(Ln(v.type)){st=v.stateNode,Gt=!1;break e}break;case 5:st=v.stateNode,Gt=!1;break e;case 3:case 4:st=v.stateNode.containerInfo,Gt=!0;break e}v=v.return}if(st===null)throw Error(s(160));Th(u,g,o),st=null,Gt=!1,u=o.alternate,u!==null&&(u.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ah(t,e),t=t.sibling}var Na=null;function Ah(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Kt(t,e),$t(e),l&4&&(Rn(3,e,e.return),Ui(3,e),Rn(5,e,e.return));break;case 1:Kt(t,e),$t(e),l&512&&(St||a===null||Aa(a,a.return)),l&64&&Ia&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var o=Na;if(Kt(t,e),$t(e),l&512&&(St||a===null||Aa(a,a.return)),l&4){var u=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,o=o.ownerDocument||o;t:switch(l){case"title":u=o.getElementsByTagName("title")[0],(!u||u[Le]||u[oe]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=o.createElement(l),o.head.insertBefore(u,o.querySelector("head > title"))),Ot(u,l,a),u[oe]=e,at(u),l=u;break e;case"link":var g=Am("link","href",o).get(l+(a.href||""));if(g){for(var v=0;v<g.length;v++)if(u=g[v],u.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&u.getAttribute("rel")===(a.rel==null?null:a.rel)&&u.getAttribute("title")===(a.title==null?null:a.title)&&u.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){g.splice(v,1);break t}}u=o.createElement(l),Ot(u,l,a),o.head.appendChild(u);break;case"meta":if(g=Am("meta","content",o).get(l+(a.content||""))){for(v=0;v<g.length;v++)if(u=g[v],u.getAttribute("content")===(a.content==null?null:""+a.content)&&u.getAttribute("name")===(a.name==null?null:a.name)&&u.getAttribute("property")===(a.property==null?null:a.property)&&u.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&u.getAttribute("charset")===(a.charSet==null?null:a.charSet)){g.splice(v,1);break t}}u=o.createElement(l),Ot(u,l,a),o.head.appendChild(u);break;default:throw Error(s(468,l))}u[oe]=e,at(u),l=u}e.stateNode=l}else Lm(o,e.type,e.stateNode);else e.stateNode=Mm(o,l,e.memoizedProps);else u!==l?(u===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):u.count--,l===null?Lm(o,e.type,e.stateNode):Mm(o,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Uc(e,e.memoizedProps,a.memoizedProps)}break;case 27:Kt(t,e),$t(e),l&512&&(St||a===null||Aa(a,a.return)),a!==null&&l&4&&Uc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Kt(t,e),$t(e),l&512&&(St||a===null||Aa(a,a.return)),e.flags&32){o=e.stateNode;try{jl(o,"")}catch(ye){Fe(e,e.return,ye)}}l&4&&e.stateNode!=null&&(o=e.memoizedProps,Uc(e,o,a!==null?a.memoizedProps:o)),l&1024&&(qc=!0);break;case 6:if(Kt(t,e),$t(e),l&4){if(e.stateNode===null)throw Error(s(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(ye){Fe(e,e.return,ye)}}break;case 3:if(Os=null,o=Na,Na=Rs(t.containerInfo),Kt(t,e),Na=o,$t(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{ei(t.containerInfo)}catch(ye){Fe(e,e.return,ye)}qc&&(qc=!1,Lh(e));break;case 4:l=Na,Na=Rs(e.stateNode.containerInfo),Kt(t,e),$t(e),Na=l;break;case 12:Kt(t,e),$t(e);break;case 31:Kt(t,e),$t(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ms(e,l)));break;case 13:Kt(t,e),$t(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(gs=Ut()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ms(e,l)));break;case 22:o=e.memoizedState!==null;var w=a!==null&&a.memoizedState!==null,k=Ia,V=St;if(Ia=k||o,St=V||w,Kt(t,e),St=V,Ia=k,$t(e),l&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(a===null||w||Ia||St||fl(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){w=a=t;try{if(u=w.stateNode,o)g=u.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{v=w.stateNode;var F=w.memoizedProps.style,U=F!=null&&F.hasOwnProperty("display")?F.display:null;v.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(ye){Fe(w,w.return,ye)}}}else if(t.tag===6){if(a===null){w=t;try{w.stateNode.nodeValue=o?"":w.memoizedProps}catch(ye){Fe(w,w.return,ye)}}}else if(t.tag===18){if(a===null){w=t;try{var Y=w.stateNode;o?Nm(Y,!0):Nm(w.stateNode,!1)}catch(ye){Fe(w,w.return,ye)}}}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;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,ms(e,a))));break;case 19:Kt(t,e),$t(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ms(e,l)));break;case 30:break;case 21:break;default:Kt(t,e),$t(e)}}function $t(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(wh(l)){a=l;break}l=l.return}if(a==null)throw Error(s(160));switch(a.tag){case 27:var o=a.stateNode,u=Hc(e);hs(e,u,o);break;case 5:var g=a.stateNode;a.flags&32&&(jl(g,""),a.flags&=-33);var v=Hc(e);hs(e,v,g);break;case 3:case 4:var w=a.stateNode.containerInfo,k=Hc(e);Bc(e,k,w);break;default:throw Error(s(161))}}catch(V){Fe(e,e.return,V)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Lh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Lh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function tn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)zh(e,t.alternate,t),t=t.sibling}function fl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Rn(4,t,t.return),fl(t);break;case 1:Aa(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Nh(t,t.return,a),fl(t);break;case 27:Qi(t.stateNode);case 26:case 5:Aa(t,t.return),fl(t);break;case 22:t.memoizedState===null&&fl(t);break;case 30:fl(t);break;default:fl(t)}e=e.sibling}}function an(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,o=e,u=t,g=u.flags;switch(u.tag){case 0:case 11:case 15:an(o,u,a),Ui(4,u);break;case 1:if(an(o,u,a),l=u,o=l.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(k){Fe(l,l.return,k)}if(l=u,o=l.updateQueue,o!==null){var v=l.stateNode;try{var w=o.shared.hiddenCallbacks;if(w!==null)for(o.shared.hiddenCallbacks=null,o=0;o<w.length;o++)dd(w[o],v)}catch(k){Fe(l,l.return,k)}}a&&g&64&&jh(u),Hi(u,u.return);break;case 27:Ch(u);case 26:case 5:an(o,u,a),a&&l===null&&g&4&&Eh(u),Hi(u,u.return);break;case 12:an(o,u,a);break;case 31:an(o,u,a),a&&g&4&&Dh(o,u);break;case 13:an(o,u,a),a&&g&4&&Mh(o,u);break;case 22:u.memoizedState===null&&an(o,u,a),Hi(u,u.return);break;case 30:break;default:an(o,u,a)}t=t.sibling}}function Yc(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Ni(a))}function Vc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ni(e))}function Ea(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)kh(e,t,a,l),t=t.sibling}function kh(e,t,a,l){var o=t.flags;switch(t.tag){case 0:case 11:case 15:Ea(e,t,a,l),o&2048&&Ui(9,t);break;case 1:Ea(e,t,a,l);break;case 3:Ea(e,t,a,l),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ni(e)));break;case 12:if(o&2048){Ea(e,t,a,l),e=t.stateNode;try{var u=t.memoizedProps,g=u.id,v=u.onPostCommit;typeof v=="function"&&v(g,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(w){Fe(t,t.return,w)}}else Ea(e,t,a,l);break;case 31:Ea(e,t,a,l);break;case 13:Ea(e,t,a,l);break;case 23:break;case 22:u=t.stateNode,g=t.alternate,t.memoizedState!==null?u._visibility&2?Ea(e,t,a,l):Bi(e,t):u._visibility&2?Ea(e,t,a,l):(u._visibility|=2,Gl(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),o&2048&&Yc(g,t);break;case 24:Ea(e,t,a,l),o&2048&&Vc(t.alternate,t);break;default:Ea(e,t,a,l)}}function Gl(e,t,a,l,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,g=t,v=a,w=l,k=g.flags;switch(g.tag){case 0:case 11:case 15:Gl(u,g,v,w,o),Ui(8,g);break;case 23:break;case 22:var V=g.stateNode;g.memoizedState!==null?V._visibility&2?Gl(u,g,v,w,o):Bi(u,g):(V._visibility|=2,Gl(u,g,v,w,o)),o&&k&2048&&Yc(g.alternate,g);break;case 24:Gl(u,g,v,w,o),o&&k&2048&&Vc(g.alternate,g);break;default:Gl(u,g,v,w,o)}t=t.sibling}}function Bi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,o=l.flags;switch(l.tag){case 22:Bi(a,l),o&2048&&Yc(l.alternate,l);break;case 24:Bi(a,l),o&2048&&Vc(l.alternate,l);break;default:Bi(a,l)}t=t.sibling}}var qi=8192;function Kl(e,t,a){if(e.subtreeFlags&qi)for(e=e.child;e!==null;)Uh(e,t,a),e=e.sibling}function Uh(e,t,a){switch(e.tag){case 26:Kl(e,t,a),e.flags&qi&&e.memoizedState!==null&&Nv(a,Na,e.memoizedState,e.memoizedProps);break;case 5:Kl(e,t,a);break;case 3:case 4:var l=Na;Na=Rs(e.stateNode.containerInfo),Kl(e,t,a),Na=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=qi,qi=16777216,Kl(e,t,a),qi=l):Kl(e,t,a));break;default:Kl(e,t,a)}}function Hh(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 Yi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];wt=l,qh(l,e)}Hh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Bh(e),e=e.sibling}function Bh(e){switch(e.tag){case 0:case 11:case 15:Yi(e),e.flags&2048&&Rn(9,e,e.return);break;case 3:Yi(e);break;case 12:Yi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ps(e)):Yi(e);break;default:Yi(e)}}function ps(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];wt=l,qh(l,e)}Hh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Rn(8,t,t.return),ps(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,ps(t));break;default:ps(t)}e=e.sibling}}function qh(e,t){for(;wt!==null;){var a=wt;switch(a.tag){case 0:case 11:case 15:Rn(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Ni(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,wt=l;else e:for(a=e;wt!==null;){l=wt;var o=l.sibling,u=l.return;if(Oh(l),l===a){wt=null;break e}if(o!==null){o.return=u,wt=o;break e}wt=u}}}var Bx={getCacheForType:function(e){var t=Rt(xt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Rt(xt).controller.signal}},qx=typeof WeakMap=="function"?WeakMap:Map,Xe=0,tt=null,Ue=null,Be=0,Ze=0,ea=null,zn=!1,$l=!1,Gc=!1,nn=0,ft=0,On=0,dl=0,Kc=0,ta=0,Xl=0,Vi=null,Xt=null,$c=!1,gs=0,Yh=0,ys=1/0,xs=null,Tn=null,jt=0,Dn=null,Ql=null,ln=0,Xc=0,Qc=null,Vh=null,Gi=0,Zc=null;function aa(){return(Xe&2)!==0&&Be!==0?Be&-Be:M.T!==null?eu():te()}function Gh(){if(ta===0)if((Be&536870912)===0||Ye){var e=Va;Va<<=1,(Va&3932160)===0&&(Va=262144),ta=e}else ta=536870912;return e=Pt.current,e!==null&&(e.flags|=32),ta}function Qt(e,t,a){(e===tt&&(Ze===2||Ze===9)||e.cancelPendingCommit!==null)&&(Zl(e,0),Mn(e,Be,ta,!1)),za(e,a),((Xe&2)===0||e!==tt)&&(e===tt&&((Xe&2)===0&&(dl|=a),ft===4&&Mn(e,Be,ta,!1)),La(e))}function Kh(e,t,a){if((Xe&6)!==0)throw Error(s(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||pn(e,t),o=l?Gx(e,t):Jc(e,t,!0),u=l;do{if(o===0){$l&&!l&&Mn(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!Yx(a)){o=Jc(e,t,!1),u=!1;continue}if(o===2){if(u=t,e.errorRecoveryDisabledLanes&u)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var v=e;o=Vi;var w=v.current.memoizedState.isDehydrated;if(w&&(Zl(v,g).flags|=256),g=Jc(v,g,!1),g!==2){if(Gc&&!w){v.errorRecoveryDisabledLanes|=u,dl|=u,o=4;break e}u=Xt,Xt=o,u!==null&&(Xt===null?Xt=u:Xt.push.apply(Xt,u))}o=g}if(u=!1,o!==2)continue}}if(o===1){Zl(e,0),Mn(e,t,0,!0);break}e:{switch(l=e,u=o,u){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:Mn(l,t,ta,!zn);break e;case 2:Xt=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(o=gs+300-Ut(),10<o)){if(Mn(l,t,ta,!zn),xl(l,0,!0)!==0)break e;ln=t,l.timeoutHandle=Sm($h.bind(null,l,a,Xt,xs,$c,t,ta,dl,Xl,zn,u,"Throttled",-0,0),o);break e}$h(l,a,Xt,xs,$c,t,ta,dl,Xl,zn,u,null,-0,0)}}break}while(!0);La(e)}function $h(e,t,a,l,o,u,g,v,w,k,V,F,U,Y){if(e.timeoutHandle=-1,F=t.subtreeFlags,F&8192||(F&16785408)===16785408){F={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ga},Uh(t,u,F);var ye=(u&62914560)===u?gs-Ut():(u&4194048)===u?Yh-Ut():0;if(ye=Ev(F,ye),ye!==null){ln=u,e.cancelPendingCommit=ye(Ih.bind(null,e,t,u,a,l,o,g,v,w,V,F,null,U,Y)),Mn(e,u,g,!k);return}}Ih(e,t,u,a,l,o,g,v,w)}function Yx(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var o=a[l],u=o.getSnapshot;o=o.value;try{if(!Jt(u(),o))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;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 Mn(e,t,a,l){t&=~Kc,t&=~dl,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var o=t;0<o;){var u=31-Tt(o),g=1<<u;l[u]=-1,o&=~g}a!==0&&Rr(e,a,t)}function vs(){return(Xe&6)===0?(Ki(0),!1):!0}function Fc(){if(Ue!==null){if(Ze===0)var e=Ue.return;else e=Ue,Qa=nl=null,fc(e),Hl=null,wi=0,e=Ue;for(;e!==null;)_h(e.alternate,e),e=e.return;Ue=null}}function Zl(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,sv(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ln=0,Fc(),tt=e,Ue=a=$a(e.current,null),Be=t,Ze=0,ea=null,zn=!1,$l=pn(e,t),Gc=!1,Xl=ta=Kc=dl=On=ft=0,Xt=Vi=null,$c=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var o=31-Tt(l),u=1<<o;t|=e[o],l&=~u}return nn=t,qr(),a}function Xh(e,t){Oe=null,M.H=Ai,t===Ul||t===Zr?(t=od(),Ze=3):t===Io?(t=od(),Ze=4):Ze=t===Cc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,ea=t,Ue===null&&(ft=1,os(e,oa(t,e.current)))}function Qh(){var e=Pt.current;return e===null?!0:(Be&4194048)===Be?da===null:(Be&62914560)===Be||(Be&536870912)!==0?e===da:!1}function Zh(){var e=M.H;return M.H=Ai,e===null?Ai:e}function Fh(){var e=M.A;return M.A=Bx,e}function bs(){ft=4,zn||(Be&4194048)!==Be&&Pt.current!==null||($l=!0),(On&134217727)===0&&(dl&134217727)===0||tt===null||Mn(tt,Be,ta,!1)}function Jc(e,t,a){var l=Xe;Xe|=2;var o=Zh(),u=Fh();(tt!==e||Be!==t)&&(xs=null,Zl(e,t)),t=!1;var g=ft;e:do try{if(Ze!==0&&Ue!==null){var v=Ue,w=ea;switch(Ze){case 8:Fc(),g=6;break e;case 3:case 2:case 9:case 6:Pt.current===null&&(t=!0);var k=Ze;if(Ze=0,ea=null,Fl(e,v,w,k),a&&$l){g=0;break e}break;default:k=Ze,Ze=0,ea=null,Fl(e,v,w,k)}}Vx(),g=ft;break}catch(V){Xh(e,V)}while(!0);return t&&e.shellSuspendCounter++,Qa=nl=null,Xe=l,M.H=o,M.A=u,Ue===null&&(tt=null,Be=0,qr()),g}function Vx(){for(;Ue!==null;)Jh(Ue)}function Gx(e,t){var a=Xe;Xe|=2;var l=Zh(),o=Fh();tt!==e||Be!==t?(xs=null,ys=Ut()+500,Zl(e,t)):$l=pn(e,t);e:do try{if(Ze!==0&&Ue!==null){t=Ue;var u=ea;t:switch(Ze){case 1:Ze=0,ea=null,Fl(e,t,u,1);break;case 2:case 9:if(rd(u)){Ze=0,ea=null,Wh(t);break}t=function(){Ze!==2&&Ze!==9||tt!==e||(Ze=7),La(e)},u.then(t,t);break e;case 3:Ze=7;break e;case 4:Ze=5;break e;case 7:rd(u)?(Ze=0,ea=null,Wh(t)):(Ze=0,ea=null,Fl(e,t,u,7));break;case 5:var g=null;switch(Ue.tag){case 26:g=Ue.memoizedState;case 5:case 27:var v=Ue;if(g?km(g):v.stateNode.complete){Ze=0,ea=null;var w=v.sibling;if(w!==null)Ue=w;else{var k=v.return;k!==null?(Ue=k,Ss(k)):Ue=null}break t}}Ze=0,ea=null,Fl(e,t,u,5);break;case 6:Ze=0,ea=null,Fl(e,t,u,6);break;case 8:Fc(),ft=6;break e;default:throw Error(s(462))}}Kx();break}catch(V){Xh(e,V)}while(!0);return Qa=nl=null,M.H=l,M.A=o,Xe=a,Ue!==null?0:(tt=null,Be=0,qr(),ft)}function Kx(){for(;Ue!==null&&!ui();)Jh(Ue)}function Jh(e){var t=bh(e.alternate,e,nn);e.memoizedProps=e.pendingProps,t===null?Ss(e):Ue=t}function Wh(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=mh(a,t,t.pendingProps,t.type,void 0,Be);break;case 11:t=mh(a,t,t.pendingProps,t.type.render,t.ref,Be);break;case 5:fc(t);default:_h(a,t),t=Ue=Ff(t,nn),t=bh(a,t,nn)}e.memoizedProps=e.pendingProps,t===null?Ss(e):Ue=t}function Fl(e,t,a,l){Qa=nl=null,fc(t),Hl=null,wi=0;var o=t.return;try{if(Dx(e,o,t,a,Be)){ft=1,os(e,oa(a,e.current)),Ue=null;return}}catch(u){if(o!==null)throw Ue=o,u;ft=1,os(e,oa(a,e.current)),Ue=null;return}t.flags&32768?(Ye||l===1?e=!0:$l||(Be&536870912)!==0?e=!1:(zn=e=!0,(l===2||l===9||l===3||l===6)&&(l=Pt.current,l!==null&&l.tag===13&&(l.flags|=16384))),Ph(t,e)):Ss(t)}function Ss(e){var t=e;do{if((t.flags&32768)!==0){Ph(t,zn);return}e=t.return;var a=Lx(t.alternate,t,nn);if(a!==null){Ue=a;return}if(t=t.sibling,t!==null){Ue=t;return}Ue=t=e}while(t!==null);ft===0&&(ft=5)}function Ph(e,t){do{var a=kx(e.alternate,e);if(a!==null){a.flags&=32767,Ue=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ue=e;return}Ue=e=a}while(e!==null);ft=6,Ue=null}function Ih(e,t,a,l,o,u,g,v,w){e.cancelPendingCommit=null;do _s();while(jt!==0);if((Xe&6)!==0)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(u=t.lanes|t.childLanes,u|=Ho,Cr(e,a,u,g,v,w),e===tt&&(Ue=tt=null,Be=0),Ql=t,Dn=e,ln=a,Xc=u,Qc=o,Vh=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Zx(mn,function(){return lm(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=M.T,M.T=null,o=J.p,J.p=2,g=Xe,Xe|=4;try{Ux(e,t,a)}finally{Xe=g,J.p=o,M.T=l}}jt=1,em(),tm(),am()}}function em(){if(jt===1){jt=0;var e=Dn,t=Ql,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=M.T,M.T=null;var l=J.p;J.p=2;var o=Xe;Xe|=4;try{Ah(t,e);var u=ou,g=qf(e.containerInfo),v=u.focusedElem,w=u.selectionRange;if(g!==v&&v&&v.ownerDocument&&Bf(v.ownerDocument.documentElement,v)){if(w!==null&&Mo(v)){var k=w.start,V=w.end;if(V===void 0&&(V=k),"selectionStart"in v)v.selectionStart=k,v.selectionEnd=Math.min(V,v.value.length);else{var F=v.ownerDocument||document,U=F&&F.defaultView||window;if(U.getSelection){var Y=U.getSelection(),ye=v.textContent.length,Ee=Math.min(w.start,ye),Ie=w.end===void 0?Ee:Math.min(w.end,ye);!Y.extend&&Ee>Ie&&(g=Ie,Ie=Ee,Ee=g);var T=Hf(v,Ee),R=Hf(v,Ie);if(T&&R&&(Y.rangeCount!==1||Y.anchorNode!==T.node||Y.anchorOffset!==T.offset||Y.focusNode!==R.node||Y.focusOffset!==R.offset)){var L=F.createRange();L.setStart(T.node,T.offset),Y.removeAllRanges(),Ee>Ie?(Y.addRange(L),Y.extend(R.node,R.offset)):(L.setEnd(R.node,R.offset),Y.addRange(L))}}}}for(F=[],Y=v;Y=Y.parentNode;)Y.nodeType===1&&F.push({element:Y,left:Y.scrollLeft,top:Y.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<F.length;v++){var K=F[v];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}As=!!su,ou=su=null}finally{Xe=o,J.p=l,M.T=a}}e.current=t,jt=2}}function tm(){if(jt===2){jt=0;var e=Dn,t=Ql,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=M.T,M.T=null;var l=J.p;J.p=2;var o=Xe;Xe|=4;try{zh(e,t.alternate,t)}finally{Xe=o,J.p=l,M.T=a}}jt=3}}function am(){if(jt===4||jt===3){jt=0,mo();var e=Dn,t=Ql,a=ln,l=Vh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?jt=5:(jt=0,Ql=Dn=null,nm(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(Tn=null),B(a),t=t.stateNode,Ht&&typeof Ht.onCommitFiberRoot=="function")try{Ht.onCommitFiberRoot(Ya,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=M.T,o=J.p,J.p=2,M.T=null;try{for(var u=e.onRecoverableError,g=0;g<l.length;g++){var v=l[g];u(v.value,{componentStack:v.stack})}}finally{M.T=t,J.p=o}}(ln&3)!==0&&_s(),La(e),o=e.pendingLanes,(a&261930)!==0&&(o&42)!==0?e===Zc?Gi++:(Gi=0,Zc=e):Gi=0,Ki(0)}}function nm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ni(t)))}function _s(){return em(),tm(),am(),lm()}function lm(){if(jt!==5)return!1;var e=Dn,t=Xc;Xc=0;var a=B(ln),l=M.T,o=J.p;try{J.p=32>a?32:a,M.T=null,a=Qc,Qc=null;var u=Dn,g=ln;if(jt=0,Ql=Dn=null,ln=0,(Xe&6)!==0)throw Error(s(331));var v=Xe;if(Xe|=4,Bh(u.current),kh(u,u.current,g,a),Xe=v,Ki(0,!1),Ht&&typeof Ht.onPostCommitFiberRoot=="function")try{Ht.onPostCommitFiberRoot(Ya,u)}catch{}return!0}finally{J.p=o,M.T=l,nm(e,t)}}function im(e,t,a){t=oa(a,t),t=wc(e.stateNode,t,2),e=En(e,t,2),e!==null&&(za(e,2),La(e))}function Fe(e,t,a){if(e.tag===3)im(e,e,a);else for(;t!==null;){if(t.tag===3){im(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Tn===null||!Tn.has(l))){e=oa(a,e),a=rh(2),l=En(t,a,2),l!==null&&(sh(a,l,t,e),za(l,2),La(l));break}}t=t.return}}function Wc(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new qx;var o=new Set;l.set(t,o)}else o=l.get(t),o===void 0&&(o=new Set,l.set(t,o));o.has(a)||(Gc=!0,o.add(a),e=$x.bind(null,e,t,a),t.then(e,e))}function $x(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,tt===e&&(Be&a)===a&&(ft===4||ft===3&&(Be&62914560)===Be&&300>Ut()-gs?(Xe&2)===0&&Zl(e,0):Kc|=a,Xl===Be&&(Xl=0)),La(e)}function rm(e,t){t===0&&(t=di()),e=el(e,t),e!==null&&(za(e,t),La(e))}function Xx(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),rm(e,a)}function Qx(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,o=e.memoizedState;o!==null&&(a=o.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(s(314))}l!==null&&l.delete(t),rm(e,a)}function Zx(e,t){return Ra(e,t)}var js=null,Jl=null,Pc=!1,Ns=!1,Ic=!1,An=0;function La(e){e!==Jl&&e.next===null&&(Jl===null?js=Jl=e:Jl=Jl.next=e),Ns=!0,Pc||(Pc=!0,Jx())}function Ki(e,t){if(!Ic&&Ns){Ic=!0;do for(var a=!1,l=js;l!==null;){if(e!==0){var o=l.pendingLanes;if(o===0)var u=0;else{var g=l.suspendedLanes,v=l.pingedLanes;u=(1<<31-Tt(42|e)+1)-1,u&=o&~(g&~v),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,um(l,u))}else u=Be,u=xl(l,l===tt?u:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(u&3)===0||pn(l,u)||(a=!0,um(l,u));l=l.next}while(a);Ic=!1}}function Fx(){sm()}function sm(){Ns=Pc=!1;var e=0;An!==0&&rv()&&(e=An);for(var t=Ut(),a=null,l=js;l!==null;){var o=l.next,u=om(l,t);u===0?(l.next=null,a===null?js=o:a.next=o,o===null&&(Jl=a)):(a=l,(e!==0||(u&3)!==0)&&(Ns=!0)),l=o}jt!==0&&jt!==5||Ki(e),An!==0&&(An=0)}function om(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var g=31-Tt(u),v=1<<g,w=o[g];w===-1?((v&a)===0||(v&l)!==0)&&(o[g]=yo(v,t)):w<=t&&(e.expiredLanes|=v),u&=~v}if(t=tt,a=Be,a=xl(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(Ze===2||Ze===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&dn(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||pn(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&dn(l),B(a)){case 2:case 8:a=fi;break;case 32:a=mn;break;case 268435456:a=ia;break;default:a=mn}return l=cm.bind(null,e),a=Ra(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&dn(l),e.callbackPriority=2,e.callbackNode=null,2}function cm(e,t){if(jt!==0&&jt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(_s()&&e.callbackNode!==a)return null;var l=Be;return l=xl(e,e===tt?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Kh(e,l,t),om(e,Ut()),e.callbackNode!=null&&e.callbackNode===a?cm.bind(null,e):null)}function um(e,t){if(_s())return null;Kh(e,t,!0)}function Jx(){ov(function(){(Xe&6)!==0?Ra(hn,Fx):sm()})}function eu(){if(An===0){var e=Ll;e===0&&(e=Qn,Qn<<=1,(Qn&261888)===0&&(Qn=256)),An=e}return An}function fm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Dr(""+e)}function dm(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function Wx(e,t,a,l,o){if(t==="submit"&&a&&a.stateNode===o){var u=fm((o[he]||null).action),g=l.submitter;g&&(t=(t=g[he]||null)?fm(t.formAction):g.getAttribute("formAction"),t!==null&&(u=t,g=null));var v=new kr("action","action",null,l,o);e.push({event:v,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(An!==0){var w=g?dm(o,g):new FormData(o);bc(a,{pending:!0,data:w,method:o.method,action:u},null,w)}}else typeof u=="function"&&(v.preventDefault(),w=g?dm(o,g):new FormData(o),bc(a,{pending:!0,data:w,method:o.method,action:u},u,w))},currentTarget:o}]})}}for(var tu=0;tu<Uo.length;tu++){var au=Uo[tu],Px=au.toLowerCase(),Ix=au[0].toUpperCase()+au.slice(1);ja(Px,"on"+Ix)}ja(Gf,"onAnimationEnd"),ja(Kf,"onAnimationIteration"),ja($f,"onAnimationStart"),ja("dblclick","onDoubleClick"),ja("focusin","onFocus"),ja("focusout","onBlur"),ja(px,"onTransitionRun"),ja(gx,"onTransitionStart"),ja(yx,"onTransitionCancel"),ja(Xf,"onTransitionEnd"),Oa("onMouseEnter",["mouseout","mouseover"]),Oa("onMouseLeave",["mouseout","mouseover"]),Oa("onPointerEnter",["pointerout","pointerover"]),Oa("onPointerLeave",["pointerout","pointerover"]),Et("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Et("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Et("onBeforeInput",["compositionend","keypress","textInput","paste"]),Et("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Et("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Et("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $i="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(" "),ev=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat($i));function hm(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],o=l.event;l=l.listeners;e:{var u=void 0;if(t)for(var g=l.length-1;0<=g;g--){var v=l[g],w=v.instance,k=v.currentTarget;if(v=v.listener,w!==u&&o.isPropagationStopped())break e;u=v,o.currentTarget=k;try{u(o)}catch(V){Br(V)}o.currentTarget=null,u=w}else for(g=0;g<l.length;g++){if(v=l[g],w=v.instance,k=v.currentTarget,v=v.listener,w!==u&&o.isPropagationStopped())break e;u=v,o.currentTarget=k;try{u(o)}catch(V){Br(V)}o.currentTarget=null,u=w}}}}function He(e,t){var a=t[Se];a===void 0&&(a=t[Se]=new Set);var l=e+"__bubble";a.has(l)||(mm(t,e,2,!1),a.add(l))}function nu(e,t,a){var l=0;t&&(l|=4),mm(a,e,l,t)}var Es="_reactListening"+Math.random().toString(36).slice(2);function lu(e){if(!e[Es]){e[Es]=!0,yn.forEach(function(a){a!=="selectionchange"&&(ev.has(a)||nu(a,!1,e),nu(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Es]||(t[Es]=!0,nu("selectionchange",!1,t))}}function mm(e,t,a,l){switch(Gm(t)){case 2:var o=Rv;break;case 8:o=zv;break;default:o=vu}a=o.bind(null,t,a,e),o=void 0,!No||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),l?o!==void 0?e.addEventListener(t,a,{capture:!0,passive:o}):e.addEventListener(t,a,!0):o!==void 0?e.addEventListener(t,a,{passive:o}):e.addEventListener(t,a,!1)}function iu(e,t,a,l,o){var u=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var g=l.tag;if(g===3||g===4){var v=l.stateNode.containerInfo;if(v===o)break;if(g===4)for(g=l.return;g!==null;){var w=g.tag;if((w===3||w===4)&&g.stateNode.containerInfo===o)return;g=g.return}for(;v!==null;){if(g=nt(v),g===null)return;if(w=g.tag,w===5||w===6||w===26||w===27){l=u=g;continue e}v=v.parentNode}}l=l.return}vf(function(){var k=u,V=_o(a),F=[];e:{var U=Qf.get(e);if(U!==void 0){var Y=kr,ye=e;switch(e){case"keypress":if(Ar(a)===0)break e;case"keydown":case"keyup":Y=Qy;break;case"focusin":ye="focus",Y=Ro;break;case"focusout":ye="blur",Y=Ro;break;case"beforeblur":case"afterblur":Y=Ro;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Y=_f;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=Ly;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=Jy;break;case Gf:case Kf:case $f:Y=Hy;break;case Xf:Y=Py;break;case"scroll":case"scrollend":Y=My;break;case"wheel":Y=ex;break;case"copy":case"cut":case"paste":Y=qy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=Nf;break;case"toggle":case"beforetoggle":Y=ax}var Ee=(t&4)!==0,Ie=!Ee&&(e==="scroll"||e==="scrollend"),T=Ee?U!==null?U+"Capture":null:U;Ee=[];for(var R=k,L;R!==null;){var K=R;if(L=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||L===null||T===null||(K=hi(R,T),K!=null&&Ee.push(Xi(R,K,L))),Ie)break;R=R.return}0<Ee.length&&(U=new Y(U,ye,null,a,V),F.push({event:U,listeners:Ee}))}}if((t&7)===0){e:{if(U=e==="mouseover"||e==="pointerover",Y=e==="mouseout"||e==="pointerout",U&&a!==So&&(ye=a.relatedTarget||a.fromElement)&&(nt(ye)||ye[me]))break e;if((Y||U)&&(U=V.window===V?V:(U=V.ownerDocument)?U.defaultView||U.parentWindow:window,Y?(ye=a.relatedTarget||a.toElement,Y=k,ye=ye?nt(ye):null,ye!==null&&(Ie=f(ye),Ee=ye.tag,ye!==Ie||Ee!==5&&Ee!==27&&Ee!==6)&&(ye=null)):(Y=null,ye=k),Y!==ye)){if(Ee=_f,K="onMouseLeave",T="onMouseEnter",R="mouse",(e==="pointerout"||e==="pointerover")&&(Ee=Nf,K="onPointerLeave",T="onPointerEnter",R="pointer"),Ie=Y==null?U:Ve(Y),L=ye==null?U:Ve(ye),U=new Ee(K,R+"leave",Y,a,V),U.target=Ie,U.relatedTarget=L,K=null,nt(V)===k&&(Ee=new Ee(T,R+"enter",ye,a,V),Ee.target=L,Ee.relatedTarget=Ie,K=Ee),Ie=K,Y&&ye)t:{for(Ee=tv,T=Y,R=ye,L=0,K=T;K;K=Ee(K))L++;K=0;for(var _e=R;_e;_e=Ee(_e))K++;for(;0<L-K;)T=Ee(T),L--;for(;0<K-L;)R=Ee(R),K--;for(;L--;){if(T===R||R!==null&&T===R.alternate){Ee=T;break t}T=Ee(T),R=Ee(R)}Ee=null}else Ee=null;Y!==null&&pm(F,U,Y,Ee,!1),ye!==null&&Ie!==null&&pm(F,Ie,ye,Ee,!0)}}e:{if(U=k?Ve(k):window,Y=U.nodeName&&U.nodeName.toLowerCase(),Y==="select"||Y==="input"&&U.type==="file")var Ke=Df;else if(Of(U))if(Mf)Ke=dx;else{Ke=ux;var xe=cx}else Y=U.nodeName,!Y||Y.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?k&&bo(k.elementType)&&(Ke=Df):Ke=fx;if(Ke&&(Ke=Ke(e,k))){Tf(F,Ke,a,V);break e}xe&&xe(e,U,k),e==="focusout"&&k&&U.type==="number"&&k.memoizedProps.value!=null&&vo(U,"number",U.value)}switch(xe=k?Ve(k):window,e){case"focusin":(Of(xe)||xe.contentEditable==="true")&&(Cl=xe,Ao=k,Si=null);break;case"focusout":Si=Ao=Cl=null;break;case"mousedown":Lo=!0;break;case"contextmenu":case"mouseup":case"dragend":Lo=!1,Yf(F,a,V);break;case"selectionchange":if(mx)break;case"keydown":case"keyup":Yf(F,a,V)}var De;if(Oo)e:{switch(e){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else wl?Rf(e,a)&&(qe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(qe="onCompositionStart");qe&&(Ef&&a.locale!=="ko"&&(wl||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&wl&&(De=bf()):(xn=V,Eo="value"in xn?xn.value:xn.textContent,wl=!0)),xe=ws(k,qe),0<xe.length&&(qe=new jf(qe,e,null,a,V),F.push({event:qe,listeners:xe}),De?qe.data=De:(De=zf(a),De!==null&&(qe.data=De)))),(De=lx?ix(e,a):rx(e,a))&&(qe=ws(k,"onBeforeInput"),0<qe.length&&(xe=new jf("onBeforeInput","beforeinput",null,a,V),F.push({event:xe,listeners:qe}),xe.data=De)),Wx(F,e,k,a,V)}hm(F,t)})}function Xi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function ws(e,t){for(var a=t+"Capture",l=[];e!==null;){var o=e,u=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||u===null||(o=hi(e,a),o!=null&&l.unshift(Xi(e,o,u)),o=hi(e,t),o!=null&&l.push(Xi(e,o,u))),e.tag===3)return l;e=e.return}return[]}function tv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function pm(e,t,a,l,o){for(var u=t._reactName,g=[];a!==null&&a!==l;){var v=a,w=v.alternate,k=v.stateNode;if(v=v.tag,w!==null&&w===l)break;v!==5&&v!==26&&v!==27||k===null||(w=k,o?(k=hi(a,u),k!=null&&g.unshift(Xi(a,k,w))):o||(k=hi(a,u),k!=null&&g.push(Xi(a,k,w)))),a=a.return}g.length!==0&&e.push({event:t,listeners:g})}var av=/\r\n?/g,nv=/\u0000|\uFFFD/g;function gm(e){return(typeof e=="string"?e:""+e).replace(av,`
|
|
9
|
+
`).replace(nv,"")}function ym(e,t){return t=gm(t),gm(e)===t}function Pe(e,t,a,l,o,u){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||jl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&jl(e,""+l);break;case"className":mt(e,"class",l);break;case"tabIndex":mt(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":mt(e,a,l);break;case"style":yf(e,l,u);break;case"data":if(t!=="object"){mt(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Dr(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"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 u=="function"&&(a==="formAction"?(t!=="input"&&Pe(e,t,"name",o.name,o,null),Pe(e,t,"formEncType",o.formEncType,o,null),Pe(e,t,"formMethod",o.formMethod,o,null),Pe(e,t,"formTarget",o.formTarget,o,null)):(Pe(e,t,"encType",o.encType,o,null),Pe(e,t,"method",o.method,o,null),Pe(e,t,"target",o.target,o,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Dr(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Ga);break;case"onScroll":l!=null&&He("scroll",e);break;case"onScrollEnd":l!=null&&He("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(a=l.__html,a!=null){if(o.children!=null)throw Error(s(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=Dr(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":He("beforetoggle",e),He("toggle",e),ke(e,"popover",l);break;case"xlinkActuate":Dt(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Dt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Dt(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Dt(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Dt(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Dt(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Dt(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Dt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Dt(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":ke(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Ty.get(a)||a,ke(e,a,l))}}function ru(e,t,a,l,o,u){switch(a){case"style":yf(e,l,u);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(a=l.__html,a!=null){if(o.children!=null)throw Error(s(60));e.innerHTML=a}}break;case"children":typeof l=="string"?jl(e,l):(typeof l=="number"||typeof l=="bigint")&&jl(e,""+l);break;case"onScroll":l!=null&&He("scroll",e);break;case"onScrollEnd":l!=null&&He("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Ga);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!_a.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(o=a.endsWith("Capture"),t=a.slice(2,o?a.length-7:void 0),u=e[he]||null,u=u!=null?u[a]:null,typeof u=="function"&&e.removeEventListener(t,u,o),typeof l=="function")){typeof u!="function"&&u!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,o);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):ke(e,a,l)}}}function Ot(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":He("error",e),He("load",e);var l=!1,o=!1,u;for(u in a)if(a.hasOwnProperty(u)){var g=a[u];if(g!=null)switch(u){case"src":l=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Pe(e,t,u,g,a,null)}}o&&Pe(e,t,"srcSet",a.srcSet,a,null),l&&Pe(e,t,"src",a.src,a,null);return;case"input":He("invalid",e);var v=u=g=o=null,w=null,k=null;for(l in a)if(a.hasOwnProperty(l)){var V=a[l];if(V!=null)switch(l){case"name":o=V;break;case"type":g=V;break;case"checked":w=V;break;case"defaultChecked":k=V;break;case"value":u=V;break;case"defaultValue":v=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(s(137,t));break;default:Pe(e,t,l,V,a,null)}}hf(e,u,v,w,k,g,o,!1);return;case"select":He("invalid",e),l=g=u=null;for(o in a)if(a.hasOwnProperty(o)&&(v=a[o],v!=null))switch(o){case"value":u=v;break;case"defaultValue":g=v;break;case"multiple":l=v;default:Pe(e,t,o,v,a,null)}t=u,a=g,e.multiple=!!l,t!=null?_l(e,!!l,t,!1):a!=null&&_l(e,!!l,a,!0);return;case"textarea":He("invalid",e),u=o=l=null;for(g in a)if(a.hasOwnProperty(g)&&(v=a[g],v!=null))switch(g){case"value":l=v;break;case"defaultValue":o=v;break;case"children":u=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(s(91));break;default:Pe(e,t,g,v,a,null)}pf(e,l,o,u);return;case"option":for(w in a)a.hasOwnProperty(w)&&(l=a[w],l!=null)&&(w==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":Pe(e,t,w,l,a,null));return;case"dialog":He("beforetoggle",e),He("toggle",e),He("cancel",e),He("close",e);break;case"iframe":case"object":He("load",e);break;case"video":case"audio":for(l=0;l<$i.length;l++)He($i[l],e);break;case"image":He("error",e),He("load",e);break;case"details":He("toggle",e);break;case"embed":case"source":case"link":He("error",e),He("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(k in a)if(a.hasOwnProperty(k)&&(l=a[k],l!=null))switch(k){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Pe(e,t,k,l,a,null)}return;default:if(bo(t)){for(V in a)a.hasOwnProperty(V)&&(l=a[V],l!==void 0&&ru(e,t,V,l,a,void 0));return}}for(v in a)a.hasOwnProperty(v)&&(l=a[v],l!=null&&Pe(e,t,v,l,a,null))}function lv(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,u=null,g=null,v=null,w=null,k=null,V=null;for(Y in a){var F=a[Y];if(a.hasOwnProperty(Y)&&F!=null)switch(Y){case"checked":break;case"value":break;case"defaultValue":w=F;default:l.hasOwnProperty(Y)||Pe(e,t,Y,null,l,F)}}for(var U in l){var Y=l[U];if(F=a[U],l.hasOwnProperty(U)&&(Y!=null||F!=null))switch(U){case"type":u=Y;break;case"name":o=Y;break;case"checked":k=Y;break;case"defaultChecked":V=Y;break;case"value":g=Y;break;case"defaultValue":v=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(s(137,t));break;default:Y!==F&&Pe(e,t,U,Y,l,F)}}xo(e,g,v,w,k,V,u,o);return;case"select":Y=g=v=U=null;for(u in a)if(w=a[u],a.hasOwnProperty(u)&&w!=null)switch(u){case"value":break;case"multiple":Y=w;default:l.hasOwnProperty(u)||Pe(e,t,u,null,l,w)}for(o in l)if(u=l[o],w=a[o],l.hasOwnProperty(o)&&(u!=null||w!=null))switch(o){case"value":U=u;break;case"defaultValue":v=u;break;case"multiple":g=u;default:u!==w&&Pe(e,t,o,u,l,w)}t=v,a=g,l=Y,U!=null?_l(e,!!a,U,!1):!!l!=!!a&&(t!=null?_l(e,!!a,t,!0):_l(e,!!a,a?[]:"",!1));return;case"textarea":Y=U=null;for(v in a)if(o=a[v],a.hasOwnProperty(v)&&o!=null&&!l.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:Pe(e,t,v,null,l,o)}for(g in l)if(o=l[g],u=a[g],l.hasOwnProperty(g)&&(o!=null||u!=null))switch(g){case"value":U=o;break;case"defaultValue":Y=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(s(91));break;default:o!==u&&Pe(e,t,g,o,l,u)}mf(e,U,Y);return;case"option":for(var ye in a)U=a[ye],a.hasOwnProperty(ye)&&U!=null&&!l.hasOwnProperty(ye)&&(ye==="selected"?e.selected=!1:Pe(e,t,ye,null,l,U));for(w in l)U=l[w],Y=a[w],l.hasOwnProperty(w)&&U!==Y&&(U!=null||Y!=null)&&(w==="selected"?e.selected=U&&typeof U!="function"&&typeof U!="symbol":Pe(e,t,w,U,l,Y));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 Ee in a)U=a[Ee],a.hasOwnProperty(Ee)&&U!=null&&!l.hasOwnProperty(Ee)&&Pe(e,t,Ee,null,l,U);for(k in l)if(U=l[k],Y=a[k],l.hasOwnProperty(k)&&U!==Y&&(U!=null||Y!=null))switch(k){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(s(137,t));break;default:Pe(e,t,k,U,l,Y)}return;default:if(bo(t)){for(var Ie in a)U=a[Ie],a.hasOwnProperty(Ie)&&U!==void 0&&!l.hasOwnProperty(Ie)&&ru(e,t,Ie,void 0,l,U);for(V in l)U=l[V],Y=a[V],!l.hasOwnProperty(V)||U===Y||U===void 0&&Y===void 0||ru(e,t,V,U,l,Y);return}}for(var T in a)U=a[T],a.hasOwnProperty(T)&&U!=null&&!l.hasOwnProperty(T)&&Pe(e,t,T,null,l,U);for(F in l)U=l[F],Y=a[F],!l.hasOwnProperty(F)||U===Y||U==null&&Y==null||Pe(e,t,F,U,l,Y)}function xm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function iv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var o=a[l],u=o.transferSize,g=o.initiatorType,v=o.duration;if(u&&v&&xm(g)){for(g=0,v=o.responseEnd,l+=1;l<a.length;l++){var w=a[l],k=w.startTime;if(k>v)break;var V=w.transferSize,F=w.initiatorType;V&&xm(F)&&(w=w.responseEnd,g+=V*(w<v?1:(v-k)/(w-k)))}if(--l,t+=8*(u+g)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var su=null,ou=null;function Cs(e){return e.nodeType===9?e:e.ownerDocument}function vm(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 bm(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 cu(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 uu=null;function rv(){var e=window.event;return e&&e.type==="popstate"?e===uu?!1:(uu=e,!0):(uu=null,!1)}var Sm=typeof setTimeout=="function"?setTimeout:void 0,sv=typeof clearTimeout=="function"?clearTimeout:void 0,_m=typeof Promise=="function"?Promise:void 0,ov=typeof queueMicrotask=="function"?queueMicrotask:typeof _m<"u"?function(e){return _m.resolve(null).then(e).catch(cv)}:Sm;function cv(e){setTimeout(function(){throw e})}function Ln(e){return e==="head"}function jm(e,t){var a=t,l=0;do{var o=a.nextSibling;if(e.removeChild(a),o&&o.nodeType===8)if(a=o.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(o),ei(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")Qi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Qi(a);for(var u=a.firstChild;u;){var g=u.nextSibling,v=u.nodeName;u[Le]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&u.rel.toLowerCase()==="stylesheet"||a.removeChild(u),u=g}}else a==="body"&&Qi(e.ownerDocument.body);a=o}while(a);ei(t)}function Nm(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function fu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":fu(a),et(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function uv(e,t,a,l){for(;e.nodeType===1;){var o=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Le])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=ha(e.nextSibling),e===null)break}return null}function fv(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=ha(e.nextSibling),e===null))return null;return e}function Em(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ha(e.nextSibling),e===null))return null;return e}function du(e){return e.data==="$?"||e.data==="$~"}function hu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function dv(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function ha(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==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var mu=null;function wm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return ha(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Cm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function Rm(e,t,a){switch(t=Cs(a),e){case"html":if(e=t.documentElement,!e)throw Error(s(452));return e;case"head":if(e=t.head,!e)throw Error(s(453));return e;case"body":if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function Qi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);et(e)}var ma=new Map,zm=new Set;function Rs(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var rn=J.d;J.d={f:hv,r:mv,D:pv,C:gv,L:yv,m:xv,X:bv,S:vv,M:Sv};function hv(){var e=rn.f(),t=vs();return e||t}function mv(e){var t=ct(e);t!==null&&t.tag===5&&t.type==="form"?Xd(t):rn.r(e)}var Wl=typeof document>"u"?null:document;function Om(e,t,a){var l=Wl;if(l&&typeof t=="string"&&t){var o=ra(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),zm.has(o)||(zm.add(o),e={rel:e,crossOrigin:a,href:t},l.querySelector(o)===null&&(t=l.createElement("link"),Ot(t,"link",e),at(t),l.head.appendChild(t)))}}function pv(e){rn.D(e),Om("dns-prefetch",e,null)}function gv(e,t){rn.C(e,t),Om("preconnect",e,t)}function yv(e,t,a){rn.L(e,t,a);var l=Wl;if(l&&e&&t){var o='link[rel="preload"][as="'+ra(t)+'"]';t==="image"&&a&&a.imageSrcSet?(o+='[imagesrcset="'+ra(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(o+='[imagesizes="'+ra(a.imageSizes)+'"]')):o+='[href="'+ra(e)+'"]';var u=o;switch(t){case"style":u=Pl(e);break;case"script":u=Il(e)}ma.has(u)||(e=x({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),ma.set(u,e),l.querySelector(o)!==null||t==="style"&&l.querySelector(Zi(u))||t==="script"&&l.querySelector(Fi(u))||(t=l.createElement("link"),Ot(t,"link",e),at(t),l.head.appendChild(t)))}}function xv(e,t){rn.m(e,t);var a=Wl;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+ra(l)+'"][href="'+ra(e)+'"]',u=o;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Il(e)}if(!ma.has(u)&&(e=x({rel:"modulepreload",href:e},t),ma.set(u,e),a.querySelector(o)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Fi(u)))return}l=a.createElement("link"),Ot(l,"link",e),at(l),a.head.appendChild(l)}}}function vv(e,t,a){rn.S(e,t,a);var l=Wl;if(l&&e){var o=_t(l).hoistableStyles,u=Pl(e);t=t||"default";var g=o.get(u);if(!g){var v={loading:0,preload:null};if(g=l.querySelector(Zi(u)))v.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},a),(a=ma.get(u))&&pu(e,a);var w=g=l.createElement("link");at(w),Ot(w,"link",e),w._p=new Promise(function(k,V){w.onload=k,w.onerror=V}),w.addEventListener("load",function(){v.loading|=1}),w.addEventListener("error",function(){v.loading|=2}),v.loading|=4,zs(g,t,l)}g={type:"stylesheet",instance:g,count:1,state:v},o.set(u,g)}}}function bv(e,t){rn.X(e,t);var a=Wl;if(a&&e){var l=_t(a).hoistableScripts,o=Il(e),u=l.get(o);u||(u=a.querySelector(Fi(o)),u||(e=x({src:e,async:!0},t),(t=ma.get(o))&&gu(e,t),u=a.createElement("script"),at(u),Ot(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(o,u))}}function Sv(e,t){rn.M(e,t);var a=Wl;if(a&&e){var l=_t(a).hoistableScripts,o=Il(e),u=l.get(o);u||(u=a.querySelector(Fi(o)),u||(e=x({src:e,async:!0,type:"module"},t),(t=ma.get(o))&&gu(e,t),u=a.createElement("script"),at(u),Ot(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(o,u))}}function Tm(e,t,a,l){var o=(o=je.current)?Rs(o):null;if(!o)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Pl(a.href),a=_t(o).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Pl(a.href);var u=_t(o).hoistableStyles,g=u.get(e);if(g||(o=o.ownerDocument||o,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,g),(u=o.querySelector(Zi(e)))&&!u._p&&(g.instance=u,g.state.loading=5),ma.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},ma.set(e,a),u||_v(o,e,a,g.state))),t&&l===null)throw Error(s(528,""));return g}if(t&&l!==null)throw Error(s(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Il(a),a=_t(o).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Pl(e){return'href="'+ra(e)+'"'}function Zi(e){return'link[rel="stylesheet"]['+e+"]"}function Dm(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function _v(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Ot(t,"link",a),at(t),e.head.appendChild(t))}function Il(e){return'[src="'+ra(e)+'"]'}function Fi(e){return"script[async]"+e}function Mm(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+ra(a.href)+'"]');if(l)return t.instance=l,at(l),l;var o=x({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),at(l),Ot(l,"style",o),zs(l,a.precedence,e),t.instance=l;case"stylesheet":o=Pl(a.href);var u=e.querySelector(Zi(o));if(u)return t.state.loading|=4,t.instance=u,at(u),u;l=Dm(a),(o=ma.get(o))&&pu(l,o),u=(e.ownerDocument||e).createElement("link"),at(u);var g=u;return g._p=new Promise(function(v,w){g.onload=v,g.onerror=w}),Ot(u,"link",l),t.state.loading|=4,zs(u,a.precedence,e),t.instance=u;case"script":return u=Il(a.src),(o=e.querySelector(Fi(u)))?(t.instance=o,at(o),o):(l=a,(o=ma.get(u))&&(l=x({},a),gu(l,o)),e=e.ownerDocument||e,o=e.createElement("script"),at(o),Ot(o,"link",l),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(s(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,zs(l,a.precedence,e));return t.instance}function zs(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=l.length?l[l.length-1]:null,u=o,g=0;g<l.length;g++){var v=l[g];if(v.dataset.precedence===t)u=v;else if(u!==o)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function pu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function gu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Os=null;function Am(e,t,a){if(Os===null){var l=new Map,o=Os=new Map;o.set(a,l)}else o=Os,l=o.get(a),l||(l=new Map,o.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),o=0;o<a.length;o++){var u=a[o];if(!(u[Le]||u[oe]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var g=u.getAttribute(t)||"";g=e+g;var v=l.get(g);v?v.push(u):l.set(g,[u])}}return l}function Lm(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function jv(e,t,a){if(a===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;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!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 km(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Nv(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var o=Pl(l.href),u=t.querySelector(Zi(o));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ts.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=u,at(u);return}u=t.ownerDocument||t,l=Dm(l),(o=ma.get(o))&&pu(l,o),u=u.createElement("link"),at(u);var g=u;g._p=new Promise(function(v,w){g.onload=v,g.onerror=w}),Ot(u,"link",l),a.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Ts.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var yu=0;function Ev(e,t){return e.stylesheets&&e.count===0&&Ms(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&Ms(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&yu===0&&(yu=62500*iv());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ms(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>yu?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(o)}}:null}function Ts(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ms(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ds=null;function Ms(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ds=new Map,t.forEach(wv,e),Ds=null,Ts.call(e))}function wv(e,t){if(!(t.state.loading&4)){var a=Ds.get(e);if(a)var l=a.get(null);else{a=new Map,Ds.set(e,a);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<o.length;u++){var g=o[u];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(a.set(g.dataset.precedence,g),l=g)}l&&a.set(null,l)}o=t.instance,g=o.getAttribute("data-precedence"),u=a.get(g)||l,u===l&&a.set(null,o),a.set(g,o),this.count++,l=Ts.bind(this),o.addEventListener("load",l),o.addEventListener("error",l),u?u.parentNode.insertBefore(o,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var Ji={$$typeof:G,Provider:null,Consumer:null,_currentValue:ue,_currentValue2:ue,_threadCount:0};function Cv(e,t,a,l,o,u,g,v,w){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=gn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gn(0),this.hiddenUpdates=gn(null),this.identifierPrefix=l,this.onUncaughtError=o,this.onCaughtError=u,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=w,this.incompleteTransitions=new Map}function Um(e,t,a,l,o,u,g,v,w,k,V,F){return e=new Cv(e,t,a,g,w,k,V,F,v),t=1,u===!0&&(t|=24),u=Wt(3,null,null,t),e.current=u,u.stateNode=e,t=Jo(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:l,isDehydrated:a,cache:t},ec(u),e}function Hm(e){return e?(e=Ol,e):Ol}function Bm(e,t,a,l,o,u){o=Hm(o),l.context===null?l.context=o:l.pendingContext=o,l=Nn(t),l.payload={element:a},u=u===void 0?null:u,u!==null&&(l.callback=u),a=En(e,l,t),a!==null&&(Qt(a,e,t),Ri(a,e,t))}function qm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function xu(e,t){qm(e,t),(e=e.alternate)&&qm(e,t)}function Ym(e){if(e.tag===13||e.tag===31){var t=el(e,67108864);t!==null&&Qt(t,e,67108864),xu(e,67108864)}}function Vm(e){if(e.tag===13||e.tag===31){var t=aa();t=O(t);var a=el(e,t);a!==null&&Qt(a,e,t),xu(e,t)}}var As=!0;function Rv(e,t,a,l){var o=M.T;M.T=null;var u=J.p;try{J.p=2,vu(e,t,a,l)}finally{J.p=u,M.T=o}}function zv(e,t,a,l){var o=M.T;M.T=null;var u=J.p;try{J.p=8,vu(e,t,a,l)}finally{J.p=u,M.T=o}}function vu(e,t,a,l){if(As){var o=bu(l);if(o===null)iu(e,t,l,Ls,a),Km(e,l);else if(Tv(o,e,t,a,l))l.stopPropagation();else if(Km(e,l),t&4&&-1<Ov.indexOf(e)){for(;o!==null;){var u=ct(o);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var g=Sa(u.pendingLanes);if(g!==0){var v=u;for(v.pendingLanes|=2,v.entangledLanes|=2;g;){var w=1<<31-Tt(g);v.entanglements[1]|=w,g&=~w}La(u),(Xe&6)===0&&(ys=Ut()+500,Ki(0))}}break;case 31:case 13:v=el(u,2),v!==null&&Qt(v,u,2),vs(),xu(u,2)}if(u=bu(l),u===null&&iu(e,t,l,Ls,a),u===o)break;o=u}o!==null&&l.stopPropagation()}else iu(e,t,l,null,a)}}function bu(e){return e=_o(e),Su(e)}var Ls=null;function Su(e){if(Ls=null,e=nt(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=h(t),e!==null)return e;e=null}else if(a===31){if(e=m(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ls=e,null}function Gm(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(qa()){case hn:return 2;case fi:return 8;case mn:case ba:return 32;case ia:return 268435456;default:return 32}default:return 32}}var _u=!1,kn=null,Un=null,Hn=null,Wi=new Map,Pi=new Map,Bn=[],Ov="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 Km(e,t){switch(e){case"focusin":case"focusout":kn=null;break;case"dragenter":case"dragleave":Un=null;break;case"mouseover":case"mouseout":Hn=null;break;case"pointerover":case"pointerout":Wi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pi.delete(t.pointerId)}}function Ii(e,t,a,l,o,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:u,targetContainers:[o]},t!==null&&(t=ct(t),t!==null&&Ym(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Tv(e,t,a,l,o){switch(t){case"focusin":return kn=Ii(kn,e,t,a,l,o),!0;case"dragenter":return Un=Ii(Un,e,t,a,l,o),!0;case"mouseover":return Hn=Ii(Hn,e,t,a,l,o),!0;case"pointerover":var u=o.pointerId;return Wi.set(u,Ii(Wi.get(u)||null,e,t,a,l,o)),!0;case"gotpointercapture":return u=o.pointerId,Pi.set(u,Ii(Pi.get(u)||null,e,t,a,l,o)),!0}return!1}function $m(e){var t=nt(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=h(a),t!==null){e.blockedOn=t,le(e.priority,function(){Vm(a)});return}}else if(t===31){if(t=m(a),t!==null){e.blockedOn=t,le(e.priority,function(){Vm(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.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 a=bu(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);So=l,a.target.dispatchEvent(l),So=null}else return t=ct(a),t!==null&&Ym(t),e.blockedOn=a,!1;t.shift()}return!0}function Xm(e,t,a){ks(e)&&a.delete(t)}function Dv(){_u=!1,kn!==null&&ks(kn)&&(kn=null),Un!==null&&ks(Un)&&(Un=null),Hn!==null&&ks(Hn)&&(Hn=null),Wi.forEach(Xm),Pi.forEach(Xm)}function Us(e,t){e.blockedOn===t&&(e.blockedOn=null,_u||(_u=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Dv)))}var Hs=null;function Qm(e){Hs!==e&&(Hs=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Hs===e&&(Hs=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],o=e[t+2];if(typeof l!="function"){if(Su(l||a)===null)continue;break}var u=ct(a);u!==null&&(e.splice(t,3),t-=3,bc(u,{pending:!0,data:o,method:a.method,action:l},l,o))}}))}function ei(e){function t(w){return Us(w,e)}kn!==null&&Us(kn,e),Un!==null&&Us(Un,e),Hn!==null&&Us(Hn,e),Wi.forEach(t),Pi.forEach(t);for(var a=0;a<Bn.length;a++){var l=Bn[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Bn.length&&(a=Bn[0],a.blockedOn===null);)$m(a),a.blockedOn===null&&Bn.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var o=a[l],u=a[l+1],g=o[he]||null;if(typeof u=="function")g||Qm(a);else if(g){var v=null;if(u&&u.hasAttribute("formAction")){if(o=u,g=u[he]||null)v=g.formAction;else if(Su(o)!==null)continue}else v=g.action;typeof v=="function"?a[l+1]=v:(a.splice(l,3),l-=3),Qm(a)}}}function Zm(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(g){return o=g})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function ju(e){this._internalRoot=e}Bs.prototype.render=ju.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var a=t.current,l=aa();Bm(a,l,e,t,null,null)},Bs.prototype.unmount=ju.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Bm(e.current,2,null,e,null,null),vs(),t[me]=null}};function Bs(e){this._internalRoot=e}Bs.prototype.unstable_scheduleHydration=function(e){if(e){var t=te();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Bn.length&&t!==0&&t<Bn[a].priority;a++);Bn.splice(a,0,e),a===0&&$m(e)}};var Fm=i.version;if(Fm!=="19.2.4")throw Error(s(527,Fm,"19.2.4"));J.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=p(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var Mv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var qs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!qs.isDisabled&&qs.supportsFiber)try{Ya=qs.inject(Mv),Ht=qs}catch{}}return ar.createRoot=function(e,t){if(!c(e))throw Error(s(299));var a=!1,l="",o=ah,u=nh,g=lh;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError)),t=Um(e,1,!1,null,null,a,l,null,o,u,g,Zm),e[me]=t.current,lu(e),new ju(t)},ar.hydrateRoot=function(e,t,a){if(!c(e))throw Error(s(299));var l=!1,o="",u=ah,g=nh,v=lh,w=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(u=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(v=a.onRecoverableError),a.formState!==void 0&&(w=a.formState)),t=Um(e,1,!0,t,a??null,l,o,w,u,g,v,Zm),t.context=Hm(null),a=t.current,l=aa(),l=O(l),o=Nn(l),o.callback=null,En(a,o,l),a=l,t.current.lanes=a,za(t,a),La(t),e[me]=t.current,lu(e),new Bs(t)},ar.version="19.2.4",ar}var wp;function W0(){if(wp)return Tu.exports;wp=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(i){console.error(i)}}return n(),Tu.exports=J0(),Tu.exports}var P0=W0();var Lg=n=>{throw TypeError(n)},I0=(n,i,r)=>i.has(n)||Lg("Cannot "+r),Lu=(n,i,r)=>(I0(n,i,"read from private field"),r?r.call(n):i.get(n)),eb=(n,i,r)=>i.has(n)?Lg("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(n):i.set(n,r),Cp="popstate";function Rp(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function tb(n={}){function i(s,c){let f=c.state?.masked,{pathname:h,search:m,hash:y}=f||s.location;return hr("",{pathname:h,search:m,hash:y},c.state&&c.state.usr||null,c.state&&c.state.key||"default",f?{pathname:s.location.pathname,search:s.location.search,hash:s.location.hash}:void 0)}function r(s,c){return typeof c=="string"?c:Ua(c)}return nb(i,r,null,n)}function Me(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function dt(n,i){if(!n){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function ab(){return Math.random().toString(36).substring(2,10)}function zp(n,i){return{usr:n.state,key:n.key,idx:i,masked:n.unstable_mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function hr(n,i,r=null,s,c){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof i=="string"?cn(i):i,state:r,key:i&&i.key||s||ab(),unstable_mask:c}}function Ua({pathname:n="/",search:i="",hash:r=""}){return i&&i!=="?"&&(n+=i.charAt(0)==="?"?i:"?"+i),r&&r!=="#"&&(n+=r.charAt(0)==="#"?r:"#"+r),n}function cn(n){let i={};if(n){let r=n.indexOf("#");r>=0&&(i.hash=n.substring(r),n=n.substring(0,r));let s=n.indexOf("?");s>=0&&(i.search=n.substring(s),n=n.substring(0,s)),n&&(i.pathname=n)}return i}function nb(n,i,r,s={}){let{window:c=document.defaultView,v5Compat:f=!1}=s,h=c.history,m="POP",y=null,p=S();p==null&&(p=0,h.replaceState({...h.state,idx:p},""));function S(){return(h.state||{idx:null}).idx}function x(){m="POP";let A=S(),W=A==null?null:A-p;p=A,y&&y({action:m,location:D.location,delta:W})}function _(A,W){m="PUSH";let X=Rp(A)?A:hr(D.location,A,W);p=S()+1;let G=zp(X,p),ne=D.createHref(X.unstable_mask||X);try{h.pushState(G,"",ne)}catch(re){if(re instanceof DOMException&&re.name==="DataCloneError")throw re;c.location.assign(ne)}f&&y&&y({action:m,location:D.location,delta:1})}function E(A,W){m="REPLACE";let X=Rp(A)?A:hr(D.location,A,W);p=S();let G=zp(X,p),ne=D.createHref(X.unstable_mask||X);h.replaceState(G,"",ne),f&&y&&y({action:m,location:D.location,delta:0})}function z(A){return kg(A)}let D={get action(){return m},get location(){return n(c,h)},listen(A){if(y)throw new Error("A history only accepts one active listener");return c.addEventListener(Cp,x),y=A,()=>{c.removeEventListener(Cp,x),y=null}},createHref(A){return i(c,A)},createURL:z,encodeLocation(A){let W=z(A);return{pathname:W.pathname,search:W.search,hash:W.hash}},push:_,replace:E,go(A){return h.go(A)}};return D}function kg(n,i=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Me(r,"No window.location.(origin|href) available to create URL");let s=typeof n=="string"?n:Ua(n);return s=s.replace(/ $/,"%20"),!i&&s.startsWith("//")&&(s=r+s),new URL(s,r)}var sr,Op=class{constructor(n){if(eb(this,sr,new Map),n)for(let[i,r]of n)this.set(i,r)}get(n){if(Lu(this,sr).has(n))return Lu(this,sr).get(n);if(n.defaultValue!==void 0)return n.defaultValue;throw new Error("No value found for context")}set(n,i){Lu(this,sr).set(n,i)}};sr=new WeakMap;var lb=new Set(["lazy","caseSensitive","path","id","index","children"]);function ib(n){return lb.has(n)}var rb=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function sb(n){return rb.has(n)}function ob(n){return n.index===!0}function mr(n,i,r=[],s={},c=!1){return n.map((f,h)=>{let m=[...r,String(h)],y=typeof f.id=="string"?f.id:m.join("-");if(Me(f.index!==!0||!f.children,"Cannot specify children on an index route"),Me(c||!s[y],`Found a route id collision on id "${y}". Route id's must be globally unique within Data Router usages`),ob(f)){let p={...f,id:y};return s[y]=Tp(p,i(p)),p}else{let p={...f,id:y,children:void 0};return s[y]=Tp(p,i(p)),f.children&&(p.children=mr(f.children,i,m,s,c)),p}})}function Tp(n,i){return Object.assign(n,{...i,...typeof i.lazy=="object"&&i.lazy!=null?{lazy:{...n.lazy,...i.lazy}}:{}})}function Yn(n,i,r="/"){return or(n,i,r,!1)}function or(n,i,r,s){let c=typeof i=="string"?cn(i):i,f=ya(c.pathname||"/",r);if(f==null)return null;let h=Ug(n);ub(h);let m=null;for(let y=0;m==null&&y<h.length;++y){let p=Sb(f);m=vb(h[y],p,s)}return m}function cb(n,i){let{route:r,pathname:s,params:c}=n;return{id:r.id,pathname:s,params:c,data:i[r.id],loaderData:i[r.id],handle:r.handle}}function Ug(n,i=[],r=[],s="",c=!1){let f=(h,m,y=c,p)=>{let S={relativePath:p===void 0?h.path||"":p,caseSensitive:h.caseSensitive===!0,childrenIndex:m,route:h};if(S.relativePath.startsWith("/")){if(!S.relativePath.startsWith(s)&&y)return;Me(S.relativePath.startsWith(s),`Absolute route path "${S.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),S.relativePath=S.relativePath.slice(s.length)}let x=wa([s,S.relativePath]),_=r.concat(S);h.children&&h.children.length>0&&(Me(h.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),Ug(h.children,i,_,x,y)),!(h.path==null&&!h.index)&&i.push({path:x,score:yb(x,h.index),routesMeta:_})};return n.forEach((h,m)=>{if(h.path===""||!h.path?.includes("?"))f(h,m);else for(let y of Hg(h.path))f(h,m,!0,y)}),i}function Hg(n){let i=n.split("/");if(i.length===0)return[];let[r,...s]=i,c=r.endsWith("?"),f=r.replace(/\?$/,"");if(s.length===0)return c?[f,""]:[f];let h=Hg(s.join("/")),m=[];return m.push(...h.map(y=>y===""?f:[f,y].join("/"))),c&&m.push(...h),m.map(y=>n.startsWith("/")&&y===""?"/":y)}function ub(n){n.sort((i,r)=>i.score!==r.score?r.score-i.score:xb(i.routesMeta.map(s=>s.childrenIndex),r.routesMeta.map(s=>s.childrenIndex)))}var fb=/^:[\w-]+$/,db=3,hb=2,mb=1,pb=10,gb=-2,Dp=n=>n==="*";function yb(n,i){let r=n.split("/"),s=r.length;return r.some(Dp)&&(s+=gb),i&&(s+=hb),r.filter(c=>!Dp(c)).reduce((c,f)=>c+(fb.test(f)?db:f===""?mb:pb),s)}function xb(n,i){return n.length===i.length&&n.slice(0,-1).every((s,c)=>s===i[c])?n[n.length-1]-i[i.length-1]:0}function vb(n,i,r=!1){let{routesMeta:s}=n,c={},f="/",h=[];for(let m=0;m<s.length;++m){let y=s[m],p=m===s.length-1,S=f==="/"?i:i.slice(f.length)||"/",x=eo({path:y.relativePath,caseSensitive:y.caseSensitive,end:p},S),_=y.route;if(!x&&p&&r&&!s[s.length-1].route.index&&(x=eo({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},S)),!x)return null;Object.assign(c,x.params),h.push({params:c,pathname:wa([f,x.pathname]),pathnameBase:Nb(wa([f,x.pathnameBase])),route:_}),x.pathnameBase!=="/"&&(f=wa([f,x.pathnameBase]))}return h}function eo(n,i){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[r,s]=bb(n.path,n.caseSensitive,n.end),c=i.match(r);if(!c)return null;let f=c[0],h=f.replace(/(.)\/+$/,"$1"),m=c.slice(1);return{params:s.reduce((p,{paramName:S,isOptional:x},_)=>{if(S==="*"){let z=m[_]||"";h=f.slice(0,f.length-z.length).replace(/(.)\/+$/,"$1")}const E=m[_];return x&&!E?p[S]=void 0:p[S]=(E||"").replace(/%2F/g,"/"),p},{}),pathname:f,pathnameBase:h,pattern:n}}function bb(n,i=!1,r=!0){dt(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 s=[],c="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,m,y,p,S)=>{if(s.push({paramName:m,isOptional:y!=null}),y){let x=S.charAt(p+h.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(s.push({paramName:"*"}),c+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?c+="\\/*$":n!==""&&n!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,i?void 0:"i"),s]}function Sb(n){try{return n.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return dt(!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 (${i}).`),n}}function ya(n,i){if(i==="/")return n;if(!n.toLowerCase().startsWith(i.toLowerCase()))return null;let r=i.endsWith("/")?i.length-1:i.length,s=n.charAt(r);return s&&s!=="/"?null:n.slice(r)||"/"}function _b({basename:n,pathname:i}){return i==="/"?n:wa([n,i])}var Bg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Iu=n=>Bg.test(n);function jb(n,i="/"){let{pathname:r,search:s="",hash:c=""}=typeof n=="string"?cn(n):n,f;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?f=Mp(r.substring(1),"/"):f=Mp(r,i)):f=i,{pathname:f,search:Eb(s),hash:wb(c)}}function Mp(n,i){let r=i.replace(/\/+$/,"").split("/");return n.split("/").forEach(c=>{c===".."?r.length>1&&r.pop():c!=="."&&r.push(c)}),r.length>1?r.join("/"):"/"}function ku(n,i,r,s){return`Cannot include a '${n}' character in a manually specified \`to.${i}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function qg(n){return n.filter((i,r)=>r===0||i.route.path&&i.route.path.length>0)}function lo(n){let i=qg(n);return i.map((r,s)=>s===i.length-1?r.pathname:r.pathnameBase)}function yr(n,i,r,s=!1){let c;typeof n=="string"?c=cn(n):(c={...n},Me(!c.pathname||!c.pathname.includes("?"),ku("?","pathname","search",c)),Me(!c.pathname||!c.pathname.includes("#"),ku("#","pathname","hash",c)),Me(!c.search||!c.search.includes("#"),ku("#","search","hash",c)));let f=n===""||c.pathname==="",h=f?"/":c.pathname,m;if(h==null)m=r;else{let x=i.length-1;if(!s&&h.startsWith("..")){let _=h.split("/");for(;_[0]==="..";)_.shift(),x-=1;c.pathname=_.join("/")}m=x>=0?i[x]:"/"}let y=jb(c,m),p=h&&h!=="/"&&h.endsWith("/"),S=(f||h===".")&&r.endsWith("/");return!y.pathname.endsWith("/")&&(p||S)&&(y.pathname+="/"),y}var wa=n=>n.join("/").replace(/\/\/+/g,"/"),Nb=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Eb=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,wb=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,xr=class{constructor(n,i,r,s=!1){this.status=n,this.statusText=i||"",this.internal=s,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function pr(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function vr(n){return n.map(i=>i.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Yg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Vg(n,i){let r=n;if(typeof r!="string"||!Bg.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let s=r,c=!1;if(Yg)try{let f=new URL(window.location.href),h=r.startsWith("//")?new URL(f.protocol+r):new URL(r),m=ya(h.pathname,i);h.origin===f.origin&&m!=null?r=m+h.search+h.hash:c=!0}catch{dt(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:c,to:r}}var Gn=Symbol("Uninstrumented");function Cb(n,i){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};n.forEach(c=>c({id:i.id,index:i.index,path:i.path,instrument(f){let h=Object.keys(r);for(let m of h)f[m]&&r[m].push(f[m])}}));let s={};if(typeof i.lazy=="function"&&r.lazy.length>0){let c=ii(r.lazy,i.lazy,()=>{});c&&(s.lazy=c)}if(typeof i.lazy=="object"){let c=i.lazy;["middleware","loader","action"].forEach(f=>{let h=c[f],m=r[`lazy.${f}`];if(typeof h=="function"&&m.length>0){let y=ii(m,h,()=>{});y&&(s.lazy=Object.assign(s.lazy||{},{[f]:y}))}})}return["loader","action"].forEach(c=>{let f=i[c];if(typeof f=="function"&&r[c].length>0){let h=f[Gn]??f,m=ii(r[c],h,(...y)=>Ap(y[0]));m&&(c==="loader"&&h.hydrate===!0&&(m.hydrate=!0),m[Gn]=h,s[c]=m)}}),i.middleware&&i.middleware.length>0&&r.middleware.length>0&&(s.middleware=i.middleware.map(c=>{let f=c[Gn]??c,h=ii(r.middleware,f,(...m)=>Ap(m[0]));return h?(h[Gn]=f,h):c})),s}function Rb(n,i){let r={navigate:[],fetch:[]};if(i.forEach(s=>s({instrument(c){let f=Object.keys(c);for(let h of f)c[h]&&r[h].push(c[h])}})),r.navigate.length>0){let s=n.navigate[Gn]??n.navigate,c=ii(r.navigate,s,(...f)=>{let[h,m]=f;return{to:typeof h=="number"||typeof h=="string"?h:h?Ua(h):".",...Lp(n,m??{})}});c&&(c[Gn]=s,n.navigate=c)}if(r.fetch.length>0){let s=n.fetch[Gn]??n.fetch,c=ii(r.fetch,s,(...f)=>{let[h,,m,y]=f;return{href:m??".",fetcherKey:h,...Lp(n,y??{})}});c&&(c[Gn]=s,n.fetch=c)}return n}function ii(n,i,r){return n.length===0?null:async(...s)=>{let c=await Gg(n,r(...s),()=>i(...s),n.length-1);if(c.type==="error")throw c.value;return c.value}}async function Gg(n,i,r,s){let c=n[s],f;if(c){let h,m=async()=>(h?console.error("You cannot call instrumented handlers more than once"):h=Gg(n,i,r,s-1),f=await h,Me(f,"Expected a result"),f.type==="error"&&f.value instanceof Error?{status:"error",error:f.value}:{status:"success",error:void 0});try{await c(m,i)}catch(y){console.error("An instrumentation function threw an error:",y)}h||await m(),await h}else try{f={type:"success",value:await r()}}catch(h){f={type:"error",value:h}}return f||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Ap(n){let{request:i,context:r,params:s,unstable_pattern:c}=n;return{request:zb(i),params:{...s},unstable_pattern:c,context:Ob(r)}}function Lp(n,i){return{currentUrl:Ua(n.state.location),..."formMethod"in i?{formMethod:i.formMethod}:{},..."formEncType"in i?{formEncType:i.formEncType}:{},..."formData"in i?{formData:i.formData}:{},..."body"in i?{body:i.body}:{}}}function zb(n){return{method:n.method,url:n.url,headers:{get:(...i)=>n.headers.get(...i)}}}function Ob(n){if(Db(n)){let i={...n};return Object.freeze(i),i}else return{get:i=>n.get(i)}}var Tb=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Db(n){if(n===null||typeof n!="object")return!1;const i=Object.getPrototypeOf(n);return i===Object.prototype||i===null||Object.getOwnPropertyNames(i).sort().join("\0")===Tb}var Kg=["POST","PUT","PATCH","DELETE"],Mb=new Set(Kg),Ab=["GET",...Kg],Lb=new Set(Ab),$g=new Set([301,302,303,307,308]),kb=new Set([307,308]),Uu={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ub={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},nr={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Hb=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),Xg="remix-router-transitions",Qg=Symbol("ResetLoaderData");function Bb(n){const i=n.window?n.window:typeof window<"u"?window:void 0,r=typeof i<"u"&&typeof i.document<"u"&&typeof i.document.createElement<"u";Me(n.routes.length>0,"You must provide a non-empty routes array to createRouter");let s=n.hydrationRouteProperties||[],c=n.mapRouteProperties||Hb,f=c;if(n.unstable_instrumentations){let C=n.unstable_instrumentations;f=O=>({...c(O),...Cb(C.map(B=>B.route).filter(Boolean),O)})}let h={},m=mr(n.routes,f,void 0,h),y,p=n.basename||"/";p.startsWith("/")||(p=`/${p}`);let S=n.dataStrategy||Kb,x={...n.future},_=null,E=new Set,z=null,D=null,A=null,W=n.hydrationData!=null,X=Yn(m,n.history.location,p),G=!1,ne=null,re,ce;if(X==null&&!n.patchRoutesOnNavigation){let C=pa(404,{pathname:n.history.location.pathname}),{matches:O,route:B}=Vs(m);re=!0,ce=!re,X=O,ne={[B.id]:C}}else if(X&&!n.hydrationData&&gn(X,m,n.history.location.pathname).active&&(X=null),X)if(X.some(C=>C.route.lazy))re=!1,ce=!re;else if(!X.some(C=>ef(C.route)))re=!0,ce=!re;else{let C=n.hydrationData?n.hydrationData.loaderData:null,O=n.hydrationData?n.hydrationData.errors:null,B=X;if(O){let te=X.findIndex(le=>O[le.route.id]!==void 0);B=B.slice(0,te+1)}ce=!1,re=B.every(te=>{let le=Zg(te.route,C,O);return ce=ce||le.renderFallback,!le.shouldLoad})}else{re=!1,ce=!re,X=[];let C=gn(null,m,n.history.location.pathname);C.active&&C.matches&&(G=!0,X=C.matches)}let P,j={historyAction:n.history.action,location:n.history.location,matches:X,initialized:re,renderFallback:ce,navigation:Uu,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||ne,fetchers:new Map,blockers:new Map},$="POP",Q=null,H=!1,ee,pe=!1,Z=new Map,ie=null,M=!1,J=!1,ue=new Set,de=new Map,ae=0,N=-1,q=new Map,I=new Set,se=new Map,be=new Map,je=new Set,Te=new Map,ot,Qe=null;function Ba(){if(_=n.history.listen(({action:C,location:O,delta:B})=>{if(ot){ot(),ot=void 0;return}dt(Te.size===0||B!=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 te=Zn({currentLocation:j.location,nextLocation:O,historyAction:C});if(te&&B!=null){let le=new Promise(ge=>{ot=ge});n.history.go(B*-1),Va(te,{state:"blocked",location:O,proceed(){Va(te,{state:"proceeding",proceed:void 0,reset:void 0,location:O}),le.then(()=>n.history.go(B))},reset(){let ge=new Map(j.blockers);ge.set(te,nr),fe({blockers:ge})}}),Q?.resolve(),Q=null;return}return Je(C,O)}),r){o1(i,Z);let C=()=>c1(i,Z);i.addEventListener("pagehide",C),ie=()=>i.removeEventListener("pagehide",C)}return j.initialized||Je("POP",j.location,{initialHydration:!0}),P}function un(){_&&_(),ie&&ie(),E.clear(),ee&&ee.abort(),j.fetchers.forEach((C,O)=>Ya(O)),j.blockers.forEach((C,O)=>Qn(O))}function $n(C){return E.add(C),()=>E.delete(C)}function fe(C,O={}){C.matches&&(C.matches=C.matches.map(le=>{let ge=h[le.route.id],oe=le.route;return oe.element!==ge.element||oe.errorElement!==ge.errorElement||oe.hydrateFallbackElement!==ge.hydrateFallbackElement?{...le,route:ge}:le})),j={...j,...C};let B=[],te=[];j.fetchers.forEach((le,ge)=>{le.state==="idle"&&(je.has(ge)?B.push(ge):te.push(ge))}),je.forEach(le=>{!j.fetchers.has(le)&&!de.has(le)&&B.push(le)}),[...E].forEach(le=>le(j,{deletedFetchers:B,newErrors:C.errors??null,viewTransitionOpts:O.viewTransitionOpts,flushSync:O.flushSync===!0})),B.forEach(le=>Ya(le)),te.forEach(le=>j.fetchers.delete(le))}function ze(C,O,{flushSync:B}={}){let te=j.actionData!=null&&j.navigation.formMethod!=null&&At(j.navigation.formMethod)&&j.navigation.state==="loading"&&C.state?._isRedirect!==!0,le;O.actionData?Object.keys(O.actionData).length>0?le=O.actionData:le=null:te?le=j.actionData:le=null;let ge=O.loaderData?$p(j.loaderData,O.loaderData,O.matches||[],O.errors):j.loaderData,oe=j.blockers;oe.size>0&&(oe=new Map(oe),oe.forEach((Ne,ve)=>oe.set(ve,nr)));let he=M?!1:di(C,O.matches||j.matches),me=H===!0||j.navigation.formMethod!=null&&At(j.navigation.formMethod)&&C.state?._isRedirect!==!0;y&&(m=y,y=void 0),M||$==="POP"||($==="PUSH"?n.history.push(C,C.state):$==="REPLACE"&&n.history.replace(C,C.state));let Se;if($==="POP"){let Ne=Z.get(j.location.pathname);Ne&&Ne.has(C.pathname)?Se={currentLocation:j.location,nextLocation:C}:Z.has(C.pathname)&&(Se={currentLocation:C,nextLocation:j.location})}else if(pe){let Ne=Z.get(j.location.pathname);Ne?Ne.add(C.pathname):(Ne=new Set([C.pathname]),Z.set(j.location.pathname,Ne)),Se={currentLocation:j.location,nextLocation:C}}fe({...O,actionData:le,loaderData:ge,historyAction:$,location:C,initialized:!0,renderFallback:!1,navigation:Uu,revalidation:"idle",restoreScrollPosition:he,preventScrollReset:me,blockers:oe},{viewTransitionOpts:Se,flushSync:B===!0}),$="POP",H=!1,pe=!1,M=!1,J=!1,Q?.resolve(),Q=null,Qe?.resolve(),Qe=null}async function ht(C,O){if(Q?.resolve(),Q=null,typeof C=="number"){Q||(Q=Fp());let et=Q.promise;return n.history.go(C),et}let B=Qu(j.location,j.matches,p,C,O?.fromRouteId,O?.relative),{path:te,submission:le,error:ge}=kp(!1,B,O),oe;O?.unstable_mask&&(oe={pathname:"",search:"",hash:"",...typeof O.unstable_mask=="string"?cn(O.unstable_mask):{...j.location.unstable_mask,...O.unstable_mask}});let he=j.location,me=hr(he,te,O&&O.state,void 0,oe);me={...me,...n.history.encodeLocation(me)};let Se=O&&O.replace!=null?O.replace:void 0,Ne="PUSH";Se===!0?Ne="REPLACE":Se===!1||le!=null&&At(le.formMethod)&&le.formAction===j.location.pathname+j.location.search&&(Ne="REPLACE");let ve=O&&"preventScrollReset"in O?O.preventScrollReset===!0:void 0,Ge=(O&&O.flushSync)===!0,Le=Zn({currentLocation:he,nextLocation:me,historyAction:Ne});if(Le){Va(Le,{state:"blocked",location:me,proceed(){Va(Le,{state:"proceeding",proceed:void 0,reset:void 0,location:me}),ht(C,O)},reset(){let et=new Map(j.blockers);et.set(Le,nr),fe({blockers:et})}});return}await Je(Ne,me,{submission:le,pendingError:ge,preventScrollReset:ve,replace:O&&O.replace,enableViewTransition:O&&O.viewTransition,flushSync:Ge,callSiteDefaultShouldRevalidate:O&&O.unstable_defaultShouldRevalidate})}function kt(){Qe||(Qe=Fp()),mn(),fe({revalidation:"loading"});let C=Qe.promise;return j.navigation.state==="submitting"?C:j.navigation.state==="idle"?(Je(j.historyAction,j.location,{startUninterruptedRevalidation:!0}),C):(Je($||j.historyAction,j.navigation.location,{overrideNavigation:j.navigation,enableViewTransition:pe===!0}),C)}async function Je(C,O,B){ee&&ee.abort(),ee=null,$=C,M=(B&&B.startUninterruptedRevalidation)===!0,yo(j.location,j.matches),H=(B&&B.preventScrollReset)===!0,pe=(B&&B.enableViewTransition)===!0;let te=y||m,le=B&&B.overrideNavigation,ge=B?.initialHydration&&j.matches&&j.matches.length>0&&!G?j.matches:Yn(te,O,p),oe=(B&&B.flushSync)===!0;if(ge&&j.initialized&&!J&&Pb(j.location,O)&&!(B&&B.submission&&At(B.submission.formMethod))){ze(O,{matches:ge},{flushSync:oe});return}let he=gn(ge,te,O.pathname);if(he.active&&he.matches&&(ge=he.matches),!ge){let{error:nt,notFoundMatches:ct,route:Ve}=Sa(O.pathname);ze(O,{matches:ct,loaderData:{},errors:{[Ve.id]:nt}},{flushSync:oe});return}ee=new AbortController;let me=ni(n.history,O,ee.signal,B&&B.submission),Se=n.getContext?await n.getContext():new Op,Ne;if(B&&B.pendingError)Ne=[Vn(ge).route.id,{type:"error",error:B.pendingError}];else if(B&&B.submission&&At(B.submission.formMethod)){let nt=await Xn(me,O,B.submission,ge,Se,he.active,B&&B.initialHydration===!0,{replace:B.replace,flushSync:oe});if(nt.shortCircuited)return;if(nt.pendingActionResult){let[ct,Ve]=nt.pendingActionResult;if(na(Ve)&&pr(Ve.error)&&Ve.error.status===404){ee=null,ze(O,{matches:nt.matches,loaderData:{},errors:{[ct]:Ve.error}});return}}ge=nt.matches||ge,Ne=nt.pendingActionResult,le=Hu(O,B.submission),oe=!1,he.active=!1,me=ni(n.history,me.url,me.signal)}let{shortCircuited:ve,matches:Ge,loaderData:Le,errors:et}=await fn(me,O,ge,Se,he.active,le,B&&B.submission,B&&B.fetcherSubmission,B&&B.replace,B&&B.initialHydration===!0,oe,Ne,B&&B.callSiteDefaultShouldRevalidate);ve||(ee=null,ze(O,{matches:Ge||ge,...Xp(Ne),loaderData:Le,errors:et}))}async function Xn(C,O,B,te,le,ge,oe,he={}){mn();let me=r1(O,B);if(fe({navigation:me},{flushSync:he.flushSync===!0}),ge){let ve=await za(te,O.pathname,C.signal);if(ve.type==="aborted")return{shortCircuited:!0};if(ve.type==="error"){if(ve.partialMatches.length===0){let{matches:Le,route:et}=Vs(m);return{matches:Le,pendingActionResult:[et.id,{type:"error",error:ve.error}]}}let Ge=Vn(ve.partialMatches).route.id;return{matches:ve.partialMatches,pendingActionResult:[Ge,{type:"error",error:ve.error}]}}else if(ve.matches)te=ve.matches;else{let{notFoundMatches:Ge,error:Le,route:et}=Sa(O.pathname);return{matches:Ge,pendingActionResult:[et.id,{type:"error",error:Le}]}}}let Se,Ne=Zs(te,O);if(!Ne.route.action&&!Ne.route.lazy)Se={type:"error",error:pa(405,{method:C.method,pathname:O.pathname,routeId:Ne.route.id})};else{let ve=ri(f,h,C,te,Ne,oe?[]:s,le),Ge=await hn(C,ve,le,null);if(Se=Ge[Ne.route.id],!Se){for(let Le of te)if(Ge[Le.route.id]){Se=Ge[Le.route.id];break}}if(C.signal.aborted)return{shortCircuited:!0}}if(ml(Se)){let ve;return he&&he.replace!=null?ve=he.replace:ve=Vp(Se.response.headers.get("Location"),new URL(C.url),p,n.history)===j.location.pathname+j.location.search,await qa(C,Se,!0,{submission:B,replace:ve}),{shortCircuited:!0}}if(na(Se)){let ve=Vn(te,Ne.route.id);return(he&&he.replace)!==!0&&($="PUSH"),{matches:te,pendingActionResult:[ve.route.id,Se,Ne.route.id]}}return{matches:te,pendingActionResult:[Ne.route.id,Se]}}async function fn(C,O,B,te,le,ge,oe,he,me,Se,Ne,ve,Ge){let Le=ge||Hu(O,oe),et=oe||he||Zp(Le),nt=!M&&!Se;if(le){if(nt){let mt=Ra(ve);fe({navigation:Le,...mt!==void 0?{actionData:mt}:{}},{flushSync:Ne})}let ke=await za(B,O.pathname,C.signal);if(ke.type==="aborted")return{shortCircuited:!0};if(ke.type==="error"){if(ke.partialMatches.length===0){let{matches:Dt,route:yt}=Vs(m);return{matches:Dt,loaderData:{},errors:{[yt.id]:ke.error}}}let mt=Vn(ke.partialMatches).route.id;return{matches:ke.partialMatches,loaderData:{},errors:{[mt]:ke.error}}}else if(ke.matches)B=ke.matches;else{let{error:mt,notFoundMatches:Dt,route:yt}=Sa(O.pathname);return{matches:Dt,loaderData:{},errors:{[yt.id]:mt}}}}let ct=y||m,{dsMatches:Ve,revalidatingFetchers:_t}=Up(C,te,f,h,n.history,j,B,et,O,Se?[]:s,Se===!0,J,ue,je,se,I,ct,p,n.patchRoutesOnNavigation!=null,ve,Ge);if(N=++ae,!n.dataStrategy&&!Ve.some(ke=>ke.shouldLoad)&&!Ve.some(ke=>ke.route.middleware&&ke.route.middleware.length>0)&&_t.length===0){let ke=Er();return ze(O,{matches:B,loaderData:{},errors:ve&&na(ve[1])?{[ve[0]]:ve[1].error}:null,...Xp(ve),...ke?{fetchers:new Map(j.fetchers)}:{}},{flushSync:Ne}),{shortCircuited:!0}}if(nt){let ke={};if(!le){ke.navigation=Le;let mt=Ra(ve);mt!==void 0&&(ke.actionData=mt)}_t.length>0&&(ke.fetchers=dn(_t)),fe(ke,{flushSync:Ne})}_t.forEach(ke=>{Nt(ke.key),ke.controller&&de.set(ke.key,ke.controller)});let at=()=>_t.forEach(ke=>Nt(ke.key));ee&&ee.signal.addEventListener("abort",at);let{loaderResults:yn,fetcherResults:_a}=await fi(Ve,_t,C,te);if(C.signal.aborted)return{shortCircuited:!0};ee&&ee.signal.removeEventListener("abort",at),_t.forEach(ke=>de.delete(ke.key));let Et=Gs(yn);if(Et)return await qa(C,Et.result,!0,{replace:me}),{shortCircuited:!0};if(Et=Gs(_a),Et)return I.add(Et.key),await qa(C,Et.result,!0,{replace:me}),{shortCircuited:!0};let{loaderData:Oa,errors:Fn}=Kp(j,B,yn,ve,_t,_a);Se&&j.errors&&(Fn={...j.errors,...Fn});let Ta=Er(),Jn=wr(N),vl=Ta||Jn||_t.length>0;return{matches:B,loaderData:Oa,errors:Fn,...vl?{fetchers:new Map(j.fetchers)}:{}}}function Ra(C){if(C&&!na(C[1]))return{[C[0]]:C[1].data};if(j.actionData)return Object.keys(j.actionData).length===0?null:j.actionData}function dn(C){return C.forEach(O=>{let B=j.fetchers.get(O.key),te=lr(void 0,B?B.data:void 0);j.fetchers.set(O.key,te)}),new Map(j.fetchers)}async function ui(C,O,B,te){Nt(C);let le=(te&&te.flushSync)===!0,ge=y||m,oe=Qu(j.location,j.matches,p,B,O,te?.relative),he=Yn(ge,oe,p),me=gn(he,ge,oe);if(me.active&&me.matches&&(he=me.matches),!he){ia(C,O,pa(404,{pathname:oe}),{flushSync:le});return}let{path:Se,submission:Ne,error:ve}=kp(!0,oe,te);if(ve){ia(C,O,ve,{flushSync:le});return}let Ge=n.getContext?await n.getContext():new Op,Le=(te&&te.preventScrollReset)===!0;if(Ne&&At(Ne.formMethod)){await mo(C,O,Se,he,Ge,me.active,le,Le,Ne,te&&te.unstable_defaultShouldRevalidate);return}se.set(C,{routeId:O,path:Se}),await Ut(C,O,Se,he,Ge,me.active,le,Le,Ne)}async function mo(C,O,B,te,le,ge,oe,he,me,Se){mn(),se.delete(C);let Ne=j.fetchers.get(C);ba(C,s1(me,Ne),{flushSync:oe});let ve=new AbortController,Ge=ni(n.history,B,ve.signal,me);if(ge){let lt=await za(te,new URL(Ge.url).pathname,Ge.signal,C);if(lt.type==="aborted")return;if(lt.type==="error"){ia(C,O,lt.error,{flushSync:oe});return}else if(lt.matches)te=lt.matches;else{ia(C,O,pa(404,{pathname:B}),{flushSync:oe});return}}let Le=Zs(te,B);if(!Le.route.action&&!Le.route.lazy){let lt=pa(405,{method:me.formMethod,pathname:B,routeId:O});ia(C,O,lt,{flushSync:oe});return}de.set(C,ve);let et=ae,nt=ri(f,h,Ge,te,Le,s,le),ct=await hn(Ge,nt,le,C),Ve=ct[Le.route.id];if(!Ve){for(let lt of nt)if(ct[lt.route.id]){Ve=ct[lt.route.id];break}}if(Ge.signal.aborted){de.get(C)===ve&&de.delete(C);return}if(je.has(C)){if(ml(Ve)||na(Ve)){ba(C,sn(void 0));return}}else{if(ml(Ve))if(de.delete(C),N>et){ba(C,sn(void 0));return}else return I.add(C),ba(C,lr(me)),qa(Ge,Ve,!1,{fetcherSubmission:me,preventScrollReset:he});if(na(Ve)){ia(C,O,Ve.error);return}}let _t=j.navigation.location||j.location,at=ni(n.history,_t,ve.signal),yn=y||m,_a=j.navigation.state!=="idle"?Yn(yn,j.navigation.location,p):j.matches;Me(_a,"Didn't find any matches after fetcher action");let Et=++ae;q.set(C,Et);let Oa=lr(me,Ve.data);j.fetchers.set(C,Oa);let{dsMatches:Fn,revalidatingFetchers:Ta}=Up(at,le,f,h,n.history,j,_a,me,_t,s,!1,J,ue,je,se,I,yn,p,n.patchRoutesOnNavigation!=null,[Le.route.id,Ve],Se);Ta.filter(lt=>lt.key!==C).forEach(lt=>{let bl=lt.key,Sl=j.fetchers.get(bl),Or=lr(void 0,Sl?Sl.data:void 0);j.fetchers.set(bl,Or),Nt(bl),lt.controller&&de.set(bl,lt.controller)}),fe({fetchers:new Map(j.fetchers)});let Jn=()=>Ta.forEach(lt=>Nt(lt.key));ve.signal.addEventListener("abort",Jn);let{loaderResults:vl,fetcherResults:ke}=await fi(Fn,Ta,at,le);if(ve.signal.aborted)return;if(ve.signal.removeEventListener("abort",Jn),q.delete(C),de.delete(C),Ta.forEach(lt=>de.delete(lt.key)),j.fetchers.has(C)){let lt=sn(Ve.data);j.fetchers.set(C,lt)}let mt=Gs(vl);if(mt)return qa(at,mt.result,!1,{preventScrollReset:he});if(mt=Gs(ke),mt)return I.add(mt.key),qa(at,mt.result,!1,{preventScrollReset:he});let{loaderData:Dt,errors:yt}=Kp(j,_a,vl,void 0,Ta,ke);wr(Et),j.navigation.state==="loading"&&Et>N?(Me($,"Expected pending action"),ee&&ee.abort(),ze(j.navigation.location,{matches:_a,loaderData:Dt,errors:yt,fetchers:new Map(j.fetchers)})):(fe({errors:yt,loaderData:$p(j.loaderData,Dt,_a,yt),fetchers:new Map(j.fetchers)}),J=!1)}async function Ut(C,O,B,te,le,ge,oe,he,me){let Se=j.fetchers.get(C);ba(C,lr(me,Se?Se.data:void 0),{flushSync:oe});let Ne=new AbortController,ve=ni(n.history,B,Ne.signal);if(ge){let Ve=await za(te,new URL(ve.url).pathname,ve.signal,C);if(Ve.type==="aborted")return;if(Ve.type==="error"){ia(C,O,Ve.error,{flushSync:oe});return}else if(Ve.matches)te=Ve.matches;else{ia(C,O,pa(404,{pathname:B}),{flushSync:oe});return}}let Ge=Zs(te,B);de.set(C,Ne);let Le=ae,et=ri(f,h,ve,te,Ge,s,le),ct=(await hn(ve,et,le,C))[Ge.route.id];if(de.get(C)===Ne&&de.delete(C),!ve.signal.aborted){if(je.has(C)){ba(C,sn(void 0));return}if(ml(ct))if(N>Le){ba(C,sn(void 0));return}else{I.add(C),await qa(ve,ct,!1,{preventScrollReset:he});return}if(na(ct)){ia(C,O,ct.error);return}ba(C,sn(ct.data))}}async function qa(C,O,B,{submission:te,fetcherSubmission:le,preventScrollReset:ge,replace:oe}={}){B||(Q?.resolve(),Q=null),O.response.headers.has("X-Remix-Revalidate")&&(J=!0);let he=O.response.headers.get("Location");Me(he,"Expected a Location header on the redirect Response"),he=Vp(he,new URL(C.url),p,n.history);let me=hr(j.location,he,{_isRedirect:!0});if(r){let et=!1;if(O.response.headers.has("X-Remix-Reload-Document"))et=!0;else if(Iu(he)){const nt=kg(he,!0);et=nt.origin!==i.location.origin||ya(nt.pathname,p)==null}if(et){oe?i.location.replace(he):i.location.assign(he);return}}ee=null;let Se=oe===!0||O.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Ne,formAction:ve,formEncType:Ge}=j.navigation;!te&&!le&&Ne&&ve&&Ge&&(te=Zp(j.navigation));let Le=te||le;if(kb.has(O.response.status)&&Le&&At(Le.formMethod))await Je(Se,me,{submission:{...Le,formAction:he},preventScrollReset:ge||H,enableViewTransition:B?pe:void 0});else{let et=Hu(me,te);await Je(Se,me,{overrideNavigation:et,fetcherSubmission:le,preventScrollReset:ge||H,enableViewTransition:B?pe:void 0})}}async function hn(C,O,B,te){let le,ge={};try{le=await Xb(S,C,O,te,B,!1)}catch(oe){return O.filter(he=>he.shouldLoad).forEach(he=>{ge[he.route.id]={type:"error",error:oe}}),ge}if(C.signal.aborted)return ge;if(!At(C.method))for(let oe of O){if(le[oe.route.id]?.type==="error")break;!le.hasOwnProperty(oe.route.id)&&!j.loaderData.hasOwnProperty(oe.route.id)&&(!j.errors||!j.errors.hasOwnProperty(oe.route.id))&&oe.shouldCallHandler()&&(le[oe.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${oe.route.id}`)})}for(let[oe,he]of Object.entries(le))if(a1(he)){let me=he.result;ge[oe]={type:"redirect",response:Jb(me,C,oe,O,p)}}else ge[oe]=await Fb(he);return ge}async function fi(C,O,B,te){let le=hn(B,C,te,null),ge=Promise.all(O.map(async me=>{if(me.matches&&me.match&&me.request&&me.controller){let Ne=(await hn(me.request,me.matches,te,me.key))[me.match.route.id];return{[me.key]:Ne}}else return Promise.resolve({[me.key]:{type:"error",error:pa(404,{pathname:me.path})}})})),oe=await le,he=(await ge).reduce((me,Se)=>Object.assign(me,Se),{});return{loaderResults:oe,fetcherResults:he}}function mn(){J=!0,se.forEach((C,O)=>{de.has(O)&&ue.add(O),Nt(O)})}function ba(C,O,B={}){j.fetchers.set(C,O),fe({fetchers:new Map(j.fetchers)},{flushSync:(B&&B.flushSync)===!0})}function ia(C,O,B,te={}){let le=Vn(j.matches,O);Ya(C),fe({errors:{[le.route.id]:B},fetchers:new Map(j.fetchers)},{flushSync:(te&&te.flushSync)===!0})}function Nr(C){return be.set(C,(be.get(C)||0)+1),je.has(C)&&je.delete(C),j.fetchers.get(C)||Ub}function po(C,O){Nt(C,O?.reason),ba(C,sn(null))}function Ya(C){let O=j.fetchers.get(C);de.has(C)&&!(O&&O.state==="loading"&&q.has(C))&&Nt(C),se.delete(C),q.delete(C),I.delete(C),je.delete(C),ue.delete(C),j.fetchers.delete(C)}function Ht(C){let O=(be.get(C)||0)-1;O<=0?(be.delete(C),je.add(C)):be.set(C,O),fe({fetchers:new Map(j.fetchers)})}function Nt(C,O){let B=de.get(C);B&&(B.abort(O),de.delete(C))}function Tt(C){for(let O of C){let B=Nr(O),te=sn(B.data);j.fetchers.set(O,te)}}function Er(){let C=[],O=!1;for(let B of I){let te=j.fetchers.get(B);Me(te,`Expected fetcher: ${B}`),te.state==="loading"&&(I.delete(B),C.push(B),O=!0)}return Tt(C),O}function wr(C){let O=[];for(let[B,te]of q)if(te<C){let le=j.fetchers.get(B);Me(le,`Expected fetcher: ${B}`),le.state==="loading"&&(Nt(B),q.delete(B),O.push(B))}return Tt(O),O.length>0}function go(C,O){let B=j.blockers.get(C)||nr;return Te.get(C)!==O&&Te.set(C,O),B}function Qn(C){j.blockers.delete(C),Te.delete(C)}function Va(C,O){let B=j.blockers.get(C)||nr;Me(B.state==="unblocked"&&O.state==="blocked"||B.state==="blocked"&&O.state==="blocked"||B.state==="blocked"&&O.state==="proceeding"||B.state==="blocked"&&O.state==="unblocked"||B.state==="proceeding"&&O.state==="unblocked",`Invalid blocker state transition: ${B.state} -> ${O.state}`);let te=new Map(j.blockers);te.set(C,O),fe({blockers:te})}function Zn({currentLocation:C,nextLocation:O,historyAction:B}){if(Te.size===0)return;Te.size>1&&dt(!1,"A router only supports one blocker at a time");let te=Array.from(Te.entries()),[le,ge]=te[te.length-1],oe=j.blockers.get(le);if(!(oe&&oe.state==="proceeding")&&ge({currentLocation:C,nextLocation:O,historyAction:B}))return le}function Sa(C){let O=pa(404,{pathname:C}),B=y||m,{matches:te,route:le}=Vs(B);return{notFoundMatches:te,route:le,error:O}}function xl(C,O,B){if(z=C,A=O,D=B||null,!W&&j.navigation===Uu){W=!0;let te=di(j.location,j.matches);te!=null&&fe({restoreScrollPosition:te})}return()=>{z=null,A=null,D=null}}function pn(C,O){return D&&D(C,O.map(te=>cb(te,j.loaderData)))||C.key}function yo(C,O){if(z&&A){let B=pn(C,O);z[B]=A()}}function di(C,O){if(z){let B=pn(C,O),te=z[B];if(typeof te=="number")return te}return null}function gn(C,O,B){if(n.patchRoutesOnNavigation)if(C){if(Object.keys(C[0].params).length>0)return{active:!0,matches:or(O,B,p,!0)}}else return{active:!0,matches:or(O,B,p,!0)||[]};return{active:!1,matches:null}}async function za(C,O,B,te){if(!n.patchRoutesOnNavigation)return{type:"success",matches:C};let le=C;for(;;){let ge=y==null,oe=y||m,he=h;try{await n.patchRoutesOnNavigation({signal:B,path:O,matches:le,fetcherKey:te,patch:(Ne,ve)=>{B.aborted||Hp(Ne,ve,oe,he,f,!1)}})}catch(Ne){return{type:"error",error:Ne,partialMatches:le}}finally{ge&&!B.aborted&&(m=[...m])}if(B.aborted)return{type:"aborted"};let me=Yn(oe,O,p),Se=null;if(me){if(Object.keys(me[0].params).length===0)return{type:"success",matches:me};if(Se=or(oe,O,p,!0),!(Se&&le.length<Se.length&&Cr(le,Se.slice(0,le.length))))return{type:"success",matches:me}}if(Se||(Se=or(oe,O,p,!0)),!Se||Cr(le,Se))return{type:"success",matches:null};le=Se}}function Cr(C,O){return C.length===O.length&&C.every((B,te)=>B.route.id===O[te].route.id)}function Rr(C){h={},y=mr(C,f,void 0,h)}function zr(C,O,B=!1){let te=y==null;Hp(C,O,y||m,h,f,B),te&&(m=[...m],fe({}))}return P={get basename(){return p},get future(){return x},get state(){return j},get routes(){return m},get window(){return i},initialize:Ba,subscribe:$n,enableScrollRestoration:xl,navigate:ht,fetch:ui,revalidate:kt,createHref:C=>n.history.createHref(C),encodeLocation:C=>n.history.encodeLocation(C),getFetcher:Nr,resetFetcher:po,deleteFetcher:Ht,dispose:un,getBlocker:go,deleteBlocker:Qn,patchRoutes:zr,_internalFetchControllers:de,_internalSetRoutes:Rr,_internalSetStateDoNotUseOrYouWillBreakYourApp(C){fe(C)}},n.unstable_instrumentations&&(P=Rb(P,n.unstable_instrumentations.map(C=>C.router).filter(Boolean))),P}function qb(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function Qu(n,i,r,s,c,f){let h,m;if(c){h=[];for(let p of i)if(h.push(p),p.route.id===c){m=p;break}}else h=i,m=i[i.length-1];let y=yr(s||".",lo(h),ya(n.pathname,r)||n.pathname,f==="path");if(s==null&&(y.search=n.search,y.hash=n.hash),(s==null||s===""||s===".")&&m){let p=af(y.search);if(m.route.index&&!p)y.search=y.search?y.search.replace(/^\?/,"?index&"):"?index";else if(!m.route.index&&p){let S=new URLSearchParams(y.search),x=S.getAll("index");S.delete("index"),x.filter(E=>E).forEach(E=>S.append("index",E));let _=S.toString();y.search=_?`?${_}`:""}}return r!=="/"&&(y.pathname=_b({basename:r,pathname:y.pathname})),Ua(y)}function kp(n,i,r){if(!r||!qb(r))return{path:i};if(r.formMethod&&!i1(r.formMethod))return{path:i,error:pa(405,{method:r.formMethod})};let s=()=>({path:i,error:pa(400,{type:"invalid-body"})}),f=(r.formMethod||"get").toUpperCase(),h=ey(i);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!At(f))return s();let x=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((_,[E,z])=>`${_}${E}=${z}
|
|
10
|
+
`,""):String(r.body);return{path:i,submission:{formMethod:f,formAction:h,formEncType:r.formEncType,formData:void 0,json:void 0,text:x}}}else if(r.formEncType==="application/json"){if(!At(f))return s();try{let x=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:i,submission:{formMethod:f,formAction:h,formEncType:r.formEncType,formData:void 0,json:x,text:void 0}}}catch{return s()}}}Me(typeof FormData=="function","FormData is not available in this environment");let m,y;if(r.formData)m=Fu(r.formData),y=r.formData;else if(r.body instanceof FormData)m=Fu(r.body),y=r.body;else if(r.body instanceof URLSearchParams)m=r.body,y=Gp(m);else if(r.body==null)m=new URLSearchParams,y=new FormData;else try{m=new URLSearchParams(r.body),y=Gp(m)}catch{return s()}let p={formMethod:f,formAction:h,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:y,json:void 0,text:void 0};if(At(p.formMethod))return{path:i,submission:p};let S=cn(i);return n&&S.search&&af(S.search)&&m.append("index",""),S.search=`?${m}`,{path:Ua(S),submission:p}}function Up(n,i,r,s,c,f,h,m,y,p,S,x,_,E,z,D,A,W,X,G,ne){let re=G?na(G[1])?G[1].error:G[1].data:void 0,ce=c.createURL(f.location),P=c.createURL(y),j;if(S&&f.errors){let ie=Object.keys(f.errors)[0];j=h.findIndex(M=>M.route.id===ie)}else if(G&&na(G[1])){let ie=G[0];j=h.findIndex(M=>M.route.id===ie)-1}let $=G?G[1].statusCode:void 0,Q=$&&$>=400,H={currentUrl:ce,currentParams:f.matches[0]?.params||{},nextUrl:P,nextParams:h[0].params,...m,actionResult:re,actionStatus:$},ee=vr(h),pe=h.map((ie,M)=>{let{route:J}=ie,ue=null;if(j!=null&&M>j)ue=!1;else if(J.lazy)ue=!0;else if(!ef(J))ue=!1;else if(S){let{shouldLoad:q}=Zg(J,f.loaderData,f.errors);ue=q}else Yb(f.loaderData,f.matches[M],ie)&&(ue=!0);if(ue!==null)return Zu(r,s,n,ee,ie,p,i,ue);let de=!1;typeof ne=="boolean"?de=ne:Q?de=!1:(x||ce.pathname+ce.search===P.pathname+P.search||ce.search!==P.search||Vb(f.matches[M],ie))&&(de=!0);let ae={...H,defaultShouldRevalidate:de},N=fr(ie,ae);return Zu(r,s,n,ee,ie,p,i,N,ae,ne)}),Z=[];return z.forEach((ie,M)=>{if(S||!h.some(se=>se.route.id===ie.routeId)||E.has(M))return;let J=f.fetchers.get(M),ue=J&&J.state!=="idle"&&J.data===void 0,de=Yn(A,ie.path,W);if(!de){if(X&&ue)return;Z.push({key:M,routeId:ie.routeId,path:ie.path,matches:null,match:null,request:null,controller:null});return}if(D.has(M))return;let ae=Zs(de,ie.path),N=new AbortController,q=ni(c,ie.path,N.signal),I=null;if(_.has(M))_.delete(M),I=ri(r,s,q,de,ae,p,i);else if(ue)x&&(I=ri(r,s,q,de,ae,p,i));else{let se;typeof ne=="boolean"?se=ne:Q?se=!1:se=x;let be={...H,defaultShouldRevalidate:se};fr(ae,be)&&(I=ri(r,s,q,de,ae,p,i,be))}I&&Z.push({key:M,routeId:ie.routeId,path:ie.path,matches:I,match:ae,request:q,controller:N})}),{dsMatches:pe,revalidatingFetchers:Z}}function ef(n){return n.loader!=null||n.middleware!=null&&n.middleware.length>0}function Zg(n,i,r){if(n.lazy)return{shouldLoad:!0,renderFallback:!0};if(!ef(n))return{shouldLoad:!1,renderFallback:!1};let s=i!=null&&n.id in i,c=r!=null&&r[n.id]!==void 0;if(!s&&c)return{shouldLoad:!1,renderFallback:!1};if(typeof n.loader=="function"&&n.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!s};let f=!s&&!c;return{shouldLoad:f,renderFallback:f}}function Yb(n,i,r){let s=!i||r.route.id!==i.route.id,c=!n.hasOwnProperty(r.route.id);return s||c}function Vb(n,i){let r=n.route.path;return n.pathname!==i.pathname||r!=null&&r.endsWith("*")&&n.params["*"]!==i.params["*"]}function fr(n,i){if(n.route.shouldRevalidate){let r=n.route.shouldRevalidate(i);if(typeof r=="boolean")return r}return i.defaultShouldRevalidate}function Hp(n,i,r,s,c,f){let h;if(n){let p=s[n];Me(p,`No route found to patch children into: routeId = ${n}`),p.children||(p.children=[]),h=p.children}else h=r;let m=[],y=[];if(i.forEach(p=>{let S=h.find(x=>Fg(p,x));S?y.push({existingRoute:S,newRoute:p}):m.push(p)}),m.length>0){let p=mr(m,c,[n||"_","patch",String(h?.length||"0")],s);h.push(...p)}if(f&&y.length>0)for(let p=0;p<y.length;p++){let{existingRoute:S,newRoute:x}=y[p],_=S,[E]=mr([x],c,[],{},!0);Object.assign(_,{element:E.element?E.element:_.element,errorElement:E.errorElement?E.errorElement:_.errorElement,hydrateFallbackElement:E.hydrateFallbackElement?E.hydrateFallbackElement:_.hydrateFallbackElement})}}function Fg(n,i){return"id"in n&&"id"in i&&n.id===i.id?!0:n.index===i.index&&n.path===i.path&&n.caseSensitive===i.caseSensitive?(!n.children||n.children.length===0)&&(!i.children||i.children.length===0)?!0:n.children?.every((r,s)=>i.children?.some(c=>Fg(r,c)))??!1:!1}var Bp=new WeakMap,Jg=({key:n,route:i,manifest:r,mapRouteProperties:s})=>{let c=r[i.id];if(Me(c,"No route found in manifest"),!c.lazy||typeof c.lazy!="object")return;let f=c.lazy[n];if(!f)return;let h=Bp.get(c);h||(h={},Bp.set(c,h));let m=h[n];if(m)return m;let y=(async()=>{let p=ib(n),x=c[n]!==void 0&&n!=="hasErrorBoundary";if(p)dt(!p,"Route property "+n+" is not a supported lazy route property. This property will be ignored."),h[n]=Promise.resolve();else if(x)dt(!1,`Route "${c.id}" has a static property "${n}" defined. The lazy property will be ignored.`);else{let _=await f();_!=null&&(Object.assign(c,{[n]:_}),Object.assign(c,s(c)))}typeof c.lazy=="object"&&(c.lazy[n]=void 0,Object.values(c.lazy).every(_=>_===void 0)&&(c.lazy=void 0))})();return h[n]=y,y},qp=new WeakMap;function Gb(n,i,r,s,c){let f=r[n.id];if(Me(f,"No route found in manifest"),!n.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof n.lazy=="function"){let S=qp.get(f);if(S)return{lazyRoutePromise:S,lazyHandlerPromise:S};let x=(async()=>{Me(typeof n.lazy=="function","No lazy route function found");let _=await n.lazy(),E={};for(let z in _){let D=_[z];if(D===void 0)continue;let A=sb(z),X=f[z]!==void 0&&z!=="hasErrorBoundary";A?dt(!A,"Route property "+z+" is not a supported property to be returned from a lazy route function. This property will be ignored."):X?dt(!X,`Route "${f.id}" has a static property "${z}" defined but its lazy function is also returning a value for this property. The lazy route property "${z}" will be ignored.`):E[z]=D}Object.assign(f,E),Object.assign(f,{...s(f),lazy:void 0})})();return qp.set(f,x),x.catch(()=>{}),{lazyRoutePromise:x,lazyHandlerPromise:x}}let h=Object.keys(n.lazy),m=[],y;for(let S of h){if(c&&c.includes(S))continue;let x=Jg({key:S,route:n,manifest:r,mapRouteProperties:s});x&&(m.push(x),S===i&&(y=x))}let p=m.length>0?Promise.all(m).then(()=>{}):void 0;return p?.catch(()=>{}),y?.catch(()=>{}),{lazyRoutePromise:p,lazyHandlerPromise:y}}async function Yp(n){let i=n.matches.filter(c=>c.shouldLoad),r={};return(await Promise.all(i.map(c=>c.resolve()))).forEach((c,f)=>{r[i[f].route.id]=c}),r}async function Kb(n){return n.matches.some(i=>i.route.middleware)?Wg(n,()=>Yp(n)):Yp(n)}function Wg(n,i){return $b(n,i,s=>{if(l1(s))throw s;return s},e1,r);function r(s,c,f){if(f)return Promise.resolve(Object.assign(f.value,{[c]:{type:"error",result:s}}));{let{matches:h}=n,m=Math.min(Math.max(h.findIndex(p=>p.route.id===c),0),Math.max(h.findIndex(p=>p.shouldCallHandler()),0)),y=Vn(h,h[m].route.id).route.id;return Promise.resolve({[y]:{type:"error",result:s}})}}}async function $b(n,i,r,s,c){let{matches:f,request:h,params:m,context:y,unstable_pattern:p}=n,S=f.flatMap(_=>_.route.middleware?_.route.middleware.map(E=>[_.route.id,E]):[]);return await Pg({request:h,params:m,context:y,unstable_pattern:p},S,i,r,s,c)}async function Pg(n,i,r,s,c,f,h=0){let{request:m}=n;if(m.signal.aborted)throw m.signal.reason??new Error(`Request aborted: ${m.method} ${m.url}`);let y=i[h];if(!y)return await r();let[p,S]=y,x,_=async()=>{if(x)throw new Error("You may only call `next()` once per middleware");try{return x={value:await Pg(n,i,r,s,c,f,h+1)},x.value}catch(E){return x={value:await f(E,p,x)},x.value}};try{let E=await S(n,_),z=E!=null?s(E):void 0;return c(z)?z:x?z??x.value:(x={value:await _()},x.value)}catch(E){return await f(E,p,x)}}function Ig(n,i,r,s,c){let f=Jg({key:"middleware",route:s.route,manifest:i,mapRouteProperties:n}),h=Gb(s.route,At(r.method)?"action":"loader",i,n,c);return{middleware:f,route:h.lazyRoutePromise,handler:h.lazyHandlerPromise}}function Zu(n,i,r,s,c,f,h,m,y=null,p){let S=!1,x=Ig(n,i,r,c,f);return{...c,_lazyPromises:x,shouldLoad:m,shouldRevalidateArgs:y,shouldCallHandler(_){return S=!0,y?typeof p=="boolean"?fr(c,{...y,defaultShouldRevalidate:p}):typeof _=="boolean"?fr(c,{...y,defaultShouldRevalidate:_}):fr(c,y):m},resolve(_){let{lazy:E,loader:z,middleware:D}=c.route,A=S||m||_&&!At(r.method)&&(E||z),W=D&&D.length>0&&!z&&!E;return A&&(At(r.method)||!W)?Qb({request:r,unstable_pattern:s,match:c,lazyHandlerPromise:x?.handler,lazyRoutePromise:x?.route,handlerOverride:_,scopedContext:h}):Promise.resolve({type:"data",result:void 0})}}}function ri(n,i,r,s,c,f,h,m=null){return s.map(y=>y.route.id!==c.route.id?{...y,shouldLoad:!1,shouldRevalidateArgs:m,shouldCallHandler:()=>!1,_lazyPromises:Ig(n,i,r,y,f),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Zu(n,i,r,vr(s),y,f,h,!0,m))}async function Xb(n,i,r,s,c,f){r.some(p=>p._lazyPromises?.middleware)&&await Promise.all(r.map(p=>p._lazyPromises?.middleware));let h={request:i,unstable_pattern:vr(r),params:r[0].params,context:c,matches:r},y=await n({...h,fetcherKey:s,runClientMiddleware:p=>{let S=h;return Wg(S,()=>p({...S,fetcherKey:s,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(r.flatMap(p=>[p._lazyPromises?.handler,p._lazyPromises?.route]))}catch{}return y}async function Qb({request:n,unstable_pattern:i,match:r,lazyHandlerPromise:s,lazyRoutePromise:c,handlerOverride:f,scopedContext:h}){let m,y,p=At(n.method),S=p?"action":"loader",x=_=>{let E,z=new Promise((W,X)=>E=X);y=()=>E(),n.signal.addEventListener("abort",y);let D=W=>typeof _!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${S}" [routeId: ${r.route.id}]`)):_({request:n,unstable_pattern:i,params:r.params,context:h},...W!==void 0?[W]:[]),A=(async()=>{try{return{type:"data",result:await(f?f(X=>D(X)):D())}}catch(W){return{type:"error",result:W}}})();return Promise.race([A,z])};try{let _=p?r.route.action:r.route.loader;if(s||c)if(_){let E,[z]=await Promise.all([x(_).catch(D=>{E=D}),s,c]);if(E!==void 0)throw E;m=z}else{await s;let E=p?r.route.action:r.route.loader;if(E)[m]=await Promise.all([x(E),c]);else if(S==="action"){let z=new URL(n.url),D=z.pathname+z.search;throw pa(405,{method:n.method,pathname:D,routeId:r.route.id})}else return{type:"data",result:void 0}}else if(_)m=await x(_);else{let E=new URL(n.url),z=E.pathname+E.search;throw pa(404,{pathname:z})}}catch(_){return{type:"error",result:_}}finally{y&&n.signal.removeEventListener("abort",y)}return m}async function Zb(n){let i=n.headers.get("Content-Type");return i&&/\bapplication\/json\b/.test(i)?n.body==null?null:n.json():n.text()}async function Fb(n){let{result:i,type:r}=n;if(tf(i)){let s;try{s=await Zb(i)}catch(c){return{type:"error",error:c}}return r==="error"?{type:"error",error:new xr(i.status,i.statusText,s),statusCode:i.status,headers:i.headers}:{type:"data",data:s,statusCode:i.status,headers:i.headers}}return r==="error"?Qp(i)?i.data instanceof Error?{type:"error",error:i.data,statusCode:i.init?.status,headers:i.init?.headers?new Headers(i.init.headers):void 0}:{type:"error",error:Ib(i),statusCode:pr(i)?i.status:void 0,headers:i.init?.headers?new Headers(i.init.headers):void 0}:{type:"error",error:i,statusCode:pr(i)?i.status:void 0}:Qp(i)?{type:"data",data:i.data,statusCode:i.init?.status,headers:i.init?.headers?new Headers(i.init.headers):void 0}:{type:"data",data:i}}function Jb(n,i,r,s,c){let f=n.headers.get("Location");if(Me(f,"Redirects returned/thrown from loaders/actions must have a Location header"),!Iu(f)){let h=s.slice(0,s.findIndex(m=>m.route.id===r)+1);f=Qu(new URL(i.url),h,c,f),n.headers.set("Location",f)}return n}function Vp(n,i,r,s){let c=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(Iu(n)){let f=n,h=f.startsWith("//")?new URL(i.protocol+f):new URL(f);if(c.includes(h.protocol))throw new Error("Invalid redirect location");let m=ya(h.pathname,r)!=null;if(h.origin===i.origin&&m)return h.pathname+h.search+h.hash}try{let f=s.createURL(n);if(c.includes(f.protocol))throw new Error("Invalid redirect location")}catch{}return n}function ni(n,i,r,s){let c=n.createURL(ey(i)).toString(),f={signal:r};if(s&&At(s.formMethod)){let{formMethod:h,formEncType:m}=s;f.method=h.toUpperCase(),m==="application/json"?(f.headers=new Headers({"Content-Type":m}),f.body=JSON.stringify(s.json)):m==="text/plain"?f.body=s.text:m==="application/x-www-form-urlencoded"&&s.formData?f.body=Fu(s.formData):f.body=s.formData}return new Request(c,f)}function Fu(n){let i=new URLSearchParams;for(let[r,s]of n.entries())i.append(r,typeof s=="string"?s:s.name);return i}function Gp(n){let i=new FormData;for(let[r,s]of n.entries())i.append(r,s);return i}function Wb(n,i,r,s=!1,c=!1){let f={},h=null,m,y=!1,p={},S=r&&na(r[1])?r[1].error:void 0;return n.forEach(x=>{if(!(x.route.id in i))return;let _=x.route.id,E=i[_];if(Me(!ml(E),"Cannot handle redirect results in processLoaderData"),na(E)){let z=E.error;if(S!==void 0&&(z=S,S=void 0),h=h||{},c)h[_]=z;else{let D=Vn(n,_);h[D.route.id]==null&&(h[D.route.id]=z)}s||(f[_]=Qg),y||(y=!0,m=pr(E.error)?E.error.status:500),E.headers&&(p[_]=E.headers)}else f[_]=E.data,E.statusCode&&E.statusCode!==200&&!y&&(m=E.statusCode),E.headers&&(p[_]=E.headers)}),S!==void 0&&r&&(h={[r[0]]:S},r[2]&&(f[r[2]]=void 0)),{loaderData:f,errors:h,statusCode:m||200,loaderHeaders:p}}function Kp(n,i,r,s,c,f){let{loaderData:h,errors:m}=Wb(i,r,s);return c.filter(y=>!y.matches||y.matches.some(p=>p.shouldLoad)).forEach(y=>{let{key:p,match:S,controller:x}=y;if(x&&x.signal.aborted)return;let _=f[p];if(Me(_,"Did not find corresponding fetcher result"),na(_)){let E=Vn(n.matches,S?.route.id);m&&m[E.route.id]||(m={...m,[E.route.id]:_.error}),n.fetchers.delete(p)}else if(ml(_))Me(!1,"Unhandled fetcher revalidation redirect");else{let E=sn(_.data);n.fetchers.set(p,E)}}),{loaderData:h,errors:m}}function $p(n,i,r,s){let c=Object.entries(i).filter(([,f])=>f!==Qg).reduce((f,[h,m])=>(f[h]=m,f),{});for(let f of r){let h=f.route.id;if(!i.hasOwnProperty(h)&&n.hasOwnProperty(h)&&f.route.loader&&(c[h]=n[h]),s&&s.hasOwnProperty(h))break}return c}function Xp(n){return n?na(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function Vn(n,i){return(i?n.slice(0,n.findIndex(s=>s.route.id===i)+1):[...n]).reverse().find(s=>s.route.hasErrorBoundary===!0)||n[0]}function Vs(n){let i=n.length===1?n[0]:n.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:i}],route:i}}function pa(n,{pathname:i,routeId:r,method:s,type:c,message:f}={}){let h="Unknown Server Error",m="Unknown @remix-run/router error";return n===400?(h="Bad Request",s&&i&&r?m=`You made a ${s} request to "${i}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:c==="invalid-body"&&(m="Unable to encode submission body")):n===403?(h="Forbidden",m=`Route "${r}" does not match URL "${i}"`):n===404?(h="Not Found",m=`No route matches URL "${i}"`):n===405&&(h="Method Not Allowed",s&&i&&r?m=`You made a ${s.toUpperCase()} request to "${i}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:s&&(m=`Invalid request method "${s.toUpperCase()}"`)),new xr(n||500,h,new Error(m),!0)}function Gs(n){let i=Object.entries(n);for(let r=i.length-1;r>=0;r--){let[s,c]=i[r];if(ml(c))return{key:s,result:c}}}function ey(n){let i=typeof n=="string"?cn(n):n;return Ua({...i,hash:""})}function Pb(n,i){return n.pathname!==i.pathname||n.search!==i.search?!1:n.hash===""?i.hash!=="":n.hash===i.hash?!0:i.hash!==""}function Ib(n){return new xr(n.init?.status??500,n.init?.statusText??"Internal Server Error",n.data)}function e1(n){return n!=null&&typeof n=="object"&&Object.entries(n).every(([i,r])=>typeof i=="string"&&t1(r))}function t1(n){return n!=null&&typeof n=="object"&&"type"in n&&"result"in n&&(n.type==="data"||n.type==="error")}function a1(n){return tf(n.result)&&$g.has(n.result.status)}function na(n){return n.type==="error"}function ml(n){return(n&&n.type)==="redirect"}function Qp(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function tf(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function n1(n){return $g.has(n)}function l1(n){return tf(n)&&n1(n.status)&&n.headers.has("Location")}function i1(n){return Lb.has(n.toUpperCase())}function At(n){return Mb.has(n.toUpperCase())}function af(n){return new URLSearchParams(n).getAll("index").some(i=>i==="")}function Zs(n,i){let r=typeof i=="string"?cn(i).search:i.search;if(n[n.length-1].route.index&&af(r||""))return n[n.length-1];let s=qg(n);return s[s.length-1]}function Zp(n){let{formMethod:i,formAction:r,formEncType:s,text:c,formData:f,json:h}=n;if(!(!i||!r||!s)){if(c!=null)return{formMethod:i,formAction:r,formEncType:s,formData:void 0,json:void 0,text:c};if(f!=null)return{formMethod:i,formAction:r,formEncType:s,formData:f,json:void 0,text:void 0};if(h!==void 0)return{formMethod:i,formAction:r,formEncType:s,formData:void 0,json:h,text:void 0}}}function Hu(n,i){return i?{state:"loading",location:n,formMethod:i.formMethod,formAction:i.formAction,formEncType:i.formEncType,formData:i.formData,json:i.json,text:i.text}:{state:"loading",location:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function r1(n,i){return{state:"submitting",location:n,formMethod:i.formMethod,formAction:i.formAction,formEncType:i.formEncType,formData:i.formData,json:i.json,text:i.text}}function lr(n,i){return n?{state:"loading",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:i}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:i}}function s1(n,i){return{state:"submitting",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:i?i.data:void 0}}function sn(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 o1(n,i){try{let r=n.sessionStorage.getItem(Xg);if(r){let s=JSON.parse(r);for(let[c,f]of Object.entries(s||{}))f&&Array.isArray(f)&&i.set(c,new Set(f||[]))}}catch{}}function c1(n,i){if(i.size>0){let r={};for(let[s,c]of i)r[s]=[...c];try{n.sessionStorage.setItem(Xg,JSON.stringify(r))}catch(s){dt(!1,`Failed to save applied view transitions in sessionStorage (${s}).`)}}}function Fp(){let n,i,r=new Promise((s,c)=>{n=async f=>{s(f);try{await r}catch{}},i=async f=>{c(f);try{await r}catch{}}});return{promise:r,resolve:n,reject:i}}var yl=b.createContext(null);yl.displayName="DataRouter";var br=b.createContext(null);br.displayName="DataRouterState";var ty=b.createContext(!1);function u1(){return b.useContext(ty)}var nf=b.createContext({isTransitioning:!1});nf.displayName="ViewTransition";var ay=b.createContext(new Map);ay.displayName="Fetchers";var f1=b.createContext(null);f1.displayName="Await";var la=b.createContext(null);la.displayName="Navigation";var io=b.createContext(null);io.displayName="Location";var xa=b.createContext({outlet:null,matches:[],isDataRoute:!1});xa.displayName="Route";var lf=b.createContext(null);lf.displayName="RouteError";var ny="REACT_ROUTER_ERROR",d1="REDIRECT",h1="ROUTE_ERROR_RESPONSE";function m1(n){if(n.startsWith(`${ny}:${d1}:{`))try{let i=JSON.parse(n.slice(28));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.location=="string"&&typeof i.reloadDocument=="boolean"&&typeof i.replace=="boolean")return i}catch{}}function p1(n){if(n.startsWith(`${ny}:${h1}:{`))try{let i=JSON.parse(n.slice(40));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string")return new xr(i.status,i.statusText,i.data)}catch{}}function g1(n,{relative:i}={}){Me(oi(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:s}=b.useContext(la),{hash:c,pathname:f,search:h}=Sr(n,{relative:i}),m=f;return r!=="/"&&(m=f==="/"?r:wa([r,f])),s.createHref({pathname:m,search:h,hash:c})}function oi(){return b.useContext(io)!=null}function Ca(){return Me(oi(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(io).location}var ly="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function iy(n){b.useContext(la).static||b.useLayoutEffect(n)}function Kn(){let{isDataRoute:n}=b.useContext(xa);return n?T1():y1()}function y1(){Me(oi(),"useNavigate() may be used only in the context of a <Router> component.");let n=b.useContext(yl),{basename:i,navigator:r}=b.useContext(la),{matches:s}=b.useContext(xa),{pathname:c}=Ca(),f=JSON.stringify(lo(s)),h=b.useRef(!1);return iy(()=>{h.current=!0}),b.useCallback((y,p={})=>{if(dt(h.current,ly),!h.current)return;if(typeof y=="number"){r.go(y);return}let S=yr(y,JSON.parse(f),c,p.relative==="path");n==null&&i!=="/"&&(S.pathname=S.pathname==="/"?i:wa([i,S.pathname])),(p.replace?r.replace:r.push)(S,p.state,p)},[i,r,f,c,n])}var x1=b.createContext(null);function v1(n){let i=b.useContext(xa).outlet;return b.useMemo(()=>i&&b.createElement(x1.Provider,{value:n},i),[i,n])}function ro(){let{matches:n}=b.useContext(xa),i=n[n.length-1];return i?i.params:{}}function Sr(n,{relative:i}={}){let{matches:r}=b.useContext(xa),{pathname:s}=Ca(),c=JSON.stringify(lo(r));return b.useMemo(()=>yr(n,JSON.parse(c),s,i==="path"),[n,c,s,i])}function b1(n,i,r){Me(oi(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=b.useContext(la),{matches:c}=b.useContext(xa),f=c[c.length-1],h=f?f.params:{},m=f?f.pathname:"/",y=f?f.pathnameBase:"/",p=f&&f.route;{let A=p&&p.path||"";sy(m,!p||A.endsWith("*")||A.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${A}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
11
|
+
|
|
12
|
+
Please change the parent <Route path="${A}"> to <Route path="${A==="/"?"*":`${A}/*`}">.`)}let S=Ca(),x;x=S;let _=x.pathname||"/",E=_;if(y!=="/"){let A=y.replace(/^\//,"").split("/");E="/"+_.replace(/^\//,"").split("/").slice(A.length).join("/")}let z=Yn(n,{pathname:E});return dt(p||z!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),dt(z==null||z[z.length-1].route.element!==void 0||z[z.length-1].route.Component!==void 0||z[z.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.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.`),E1(z&&z.map(A=>Object.assign({},A,{params:Object.assign({},h,A.params),pathname:wa([y,s.encodeLocation?s.encodeLocation(A.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?y:wa([y,s.encodeLocation?s.encodeLocation(A.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathnameBase])})),c,r)}function S1(){let n=O1(),i=pr(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),r=n instanceof Error?n.stack:null,s="rgba(200,200,200, 0.5)",c={padding:"0.5rem",backgroundColor:s},f={padding:"2px 4px",backgroundColor:s},h=null;return console.error("Error handled by React Router default ErrorBoundary:",n),h=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:f},"ErrorBoundary")," or"," ",b.createElement("code",{style:f},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},i),r?b.createElement("pre",{style:c},r):null,h)}var _1=b.createElement(S1,null),ry=class extends b.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,i){return i.location!==n.location||i.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:i.error,location:i.location,revalidation:n.revalidation||i.revalidation}}componentDidCatch(n,i){this.props.onError?this.props.onError(n,i):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const r=p1(n.digest);r&&(n=r)}let i=n!==void 0?b.createElement(xa.Provider,{value:this.props.routeContext},b.createElement(lf.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?b.createElement(j1,{error:n},i):i}};ry.contextType=ty;var Bu=new WeakMap;function j1({children:n,error:i}){let{basename:r}=b.useContext(la);if(typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){let s=m1(i.digest);if(s){let c=Bu.get(i);if(c)throw c;let f=Vg(s.location,r);if(Yg&&!Bu.get(i))if(f.isExternal||s.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const h=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:s.replace}));throw Bu.set(i,h),h}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return n}function N1({routeContext:n,match:i,children:r}){let s=b.useContext(yl);return s&&s.static&&s.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=i.route.id),b.createElement(xa.Provider,{value:n},r)}function E1(n,i=[],r){let s=r?.state;if(n==null){if(!s)return null;if(s.errors)n=s.matches;else if(i.length===0&&!s.initialized&&s.matches.length>0)n=s.matches;else return null}let c=n,f=s?.errors;if(f!=null){let S=c.findIndex(x=>x.route.id&&f?.[x.route.id]!==void 0);Me(S>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),c=c.slice(0,Math.min(c.length,S+1))}let h=!1,m=-1;if(r&&s){h=s.renderFallback;for(let S=0;S<c.length;S++){let x=c[S];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(m=S),x.route.id){let{loaderData:_,errors:E}=s,z=x.route.loader&&!_.hasOwnProperty(x.route.id)&&(!E||E[x.route.id]===void 0);if(x.route.lazy||z){r.isStatic&&(h=!0),m>=0?c=c.slice(0,m+1):c=[c[0]];break}}}}let y=r?.onError,p=s&&y?(S,x)=>{y(S,{location:s.location,params:s.matches?.[0]?.params??{},unstable_pattern:vr(s.matches),errorInfo:x})}:void 0;return c.reduceRight((S,x,_)=>{let E,z=!1,D=null,A=null;s&&(E=f&&x.route.id?f[x.route.id]:void 0,D=x.route.errorElement||_1,h&&(m<0&&_===0?(sy("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),z=!0,A=null):m===_&&(z=!0,A=x.route.hydrateFallbackElement||null)));let W=i.concat(c.slice(0,_+1)),X=()=>{let G;return E?G=D:z?G=A:x.route.Component?G=b.createElement(x.route.Component,null):x.route.element?G=x.route.element:G=S,b.createElement(N1,{match:x,routeContext:{outlet:S,matches:W,isDataRoute:s!=null},children:G})};return s&&(x.route.ErrorBoundary||x.route.errorElement||_===0)?b.createElement(ry,{location:s.location,revalidation:s.revalidation,component:D,error:E,children:X(),routeContext:{outlet:null,matches:W,isDataRoute:!0},onError:p}):X()},null)}function rf(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function w1(n){let i=b.useContext(yl);return Me(i,rf(n)),i}function C1(n){let i=b.useContext(br);return Me(i,rf(n)),i}function R1(n){let i=b.useContext(xa);return Me(i,rf(n)),i}function sf(n){let i=R1(n),r=i.matches[i.matches.length-1];return Me(r.route.id,`${n} can only be used on routes that contain a unique "id"`),r.route.id}function z1(){return sf("useRouteId")}function O1(){let n=b.useContext(lf),i=C1("useRouteError"),r=sf("useRouteError");return n!==void 0?n:i.errors?.[r]}function T1(){let{router:n}=w1("useNavigate"),i=sf("useNavigate"),r=b.useRef(!1);return iy(()=>{r.current=!0}),b.useCallback(async(c,f={})=>{dt(r.current,ly),r.current&&(typeof c=="number"?await n.navigate(c):await n.navigate(c,{fromRouteId:i,...f}))},[n,i])}var Jp={};function sy(n,i,r){!i&&!Jp[n]&&(Jp[n]=!0,dt(!1,r))}var Wp={};function Pp(n,i){!n&&!Wp[i]&&(Wp[i]=!0,console.warn(i))}var D1="useOptimistic",Ip=o0[D1],M1=()=>{};function A1(n){return Ip?Ip(n):[n,M1]}function L1(n){let i={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&dt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(i,{element:b.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&dt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(i,{hydrateFallbackElement:b.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&dt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(i,{errorElement:b.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),i}var k1=["HydrateFallback","hydrateFallbackElement"],U1=class{constructor(){this.status="pending",this.promise=new Promise((n,i)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",n(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",i(r))}})}};function H1({router:n,flushSync:i,onError:r,unstable_useTransitions:s}){s=u1()||s;let[f,h]=b.useState(n.state),[m,y]=A1(f),[p,S]=b.useState(),[x,_]=b.useState({isTransitioning:!1}),[E,z]=b.useState(),[D,A]=b.useState(),[W,X]=b.useState(),G=b.useRef(new Map),ne=b.useCallback((j,{deletedFetchers:$,newErrors:Q,flushSync:H,viewTransitionOpts:ee})=>{Q&&r&&Object.values(Q).forEach(Z=>r(Z,{location:j.location,params:j.matches[0]?.params??{},unstable_pattern:vr(j.matches)})),j.fetchers.forEach((Z,ie)=>{Z.data!==void 0&&G.current.set(ie,Z.data)}),$.forEach(Z=>G.current.delete(Z)),Pp(H===!1||i!=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 pe=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(Pp(ee==null||pe,"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."),!ee||!pe){i&&H?i(()=>h(j)):s===!1?h(j):b.startTransition(()=>{s===!0&&y(Z=>eg(Z,j)),h(j)});return}if(i&&H){i(()=>{D&&(E?.resolve(),D.skipTransition()),_({isTransitioning:!0,flushSync:!0,currentLocation:ee.currentLocation,nextLocation:ee.nextLocation})});let Z=n.window.document.startViewTransition(()=>{i(()=>h(j))});Z.finished.finally(()=>{i(()=>{z(void 0),A(void 0),S(void 0),_({isTransitioning:!1})})}),i(()=>A(Z));return}D?(E?.resolve(),D.skipTransition(),X({state:j,currentLocation:ee.currentLocation,nextLocation:ee.nextLocation})):(S(j),_({isTransitioning:!0,flushSync:!1,currentLocation:ee.currentLocation,nextLocation:ee.nextLocation}))},[n.window,i,D,E,s,y,r]);b.useLayoutEffect(()=>n.subscribe(ne),[n,ne]),b.useEffect(()=>{x.isTransitioning&&!x.flushSync&&z(new U1)},[x]),b.useEffect(()=>{if(E&&p&&n.window){let j=p,$=E.promise,Q=n.window.document.startViewTransition(async()=>{s===!1?h(j):b.startTransition(()=>{s===!0&&y(H=>eg(H,j)),h(j)}),await $});Q.finished.finally(()=>{z(void 0),A(void 0),S(void 0),_({isTransitioning:!1})}),A(Q)}},[p,E,n.window,s,y]),b.useEffect(()=>{E&&p&&m.location.key===p.location.key&&E.resolve()},[E,D,m.location,p]),b.useEffect(()=>{!x.isTransitioning&&W&&(S(W.state),_({isTransitioning:!0,flushSync:!1,currentLocation:W.currentLocation,nextLocation:W.nextLocation}),X(void 0))},[x.isTransitioning,W]);let re=b.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:j=>n.navigate(j),push:(j,$,Q)=>n.navigate(j,{state:$,preventScrollReset:Q?.preventScrollReset}),replace:(j,$,Q)=>n.navigate(j,{replace:!0,state:$,preventScrollReset:Q?.preventScrollReset})}),[n]),ce=n.basename||"/",P=b.useMemo(()=>({router:n,navigator:re,static:!1,basename:ce,onError:r}),[n,re,ce,r]);return b.createElement(b.Fragment,null,b.createElement(yl.Provider,{value:P},b.createElement(br.Provider,{value:m},b.createElement(ay.Provider,{value:G.current},b.createElement(nf.Provider,{value:x},b.createElement(Y1,{basename:ce,location:m.location,navigationType:m.historyAction,navigator:re,unstable_useTransitions:s},b.createElement(B1,{routes:n.routes,future:n.future,state:m,isStatic:!1,onError:r})))))),null)}function eg(n,i){return{...n,navigation:i.navigation.state!=="idle"?i.navigation:n.navigation,revalidation:i.revalidation!=="idle"?i.revalidation:n.revalidation,actionData:i.navigation.state!=="submitting"?i.actionData:n.actionData,fetchers:i.fetchers}}var B1=b.memo(q1);function q1({routes:n,future:i,state:r,isStatic:s,onError:c}){return b1(n,void 0,{state:r,isStatic:s,onError:c})}function tg({to:n,replace:i,state:r,relative:s}){Me(oi(),"<Navigate> may be used only in the context of a <Router> component.");let{static:c}=b.useContext(la);dt(!c,"<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:f}=b.useContext(xa),{pathname:h}=Ca(),m=Kn(),y=yr(n,lo(f),h,s==="path"),p=JSON.stringify(y);return b.useEffect(()=>{m(JSON.parse(p),{replace:i,state:r,relative:s})},[m,p,s,i,r]),null}function oy(n){return v1(n.context)}function Y1({basename:n="/",children:i=null,location:r,navigationType:s="POP",navigator:c,static:f=!1,unstable_useTransitions:h}){Me(!oi(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=n.replace(/^\/*/,"/"),y=b.useMemo(()=>({basename:m,navigator:c,static:f,unstable_useTransitions:h,future:{}}),[m,c,f,h]);typeof r=="string"&&(r=cn(r));let{pathname:p="/",search:S="",hash:x="",state:_=null,key:E="default",unstable_mask:z}=r,D=b.useMemo(()=>{let A=ya(p,m);return A==null?null:{location:{pathname:A,search:S,hash:x,state:_,key:E,unstable_mask:z},navigationType:s}},[m,p,S,x,_,E,s,z]);return dt(D!=null,`<Router basename="${m}"> is not able to match the URL "${p}${S}${x}" because it does not start with the basename, so the <Router> won't render anything.`),D==null?null:b.createElement(la.Provider,{value:y},b.createElement(io.Provider,{children:i,value:D}))}var Fs="get",Js="application/x-www-form-urlencoded";function so(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function V1(n){return so(n)&&n.tagName.toLowerCase()==="button"}function G1(n){return so(n)&&n.tagName.toLowerCase()==="form"}function K1(n){return so(n)&&n.tagName.toLowerCase()==="input"}function $1(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function X1(n,i){return n.button===0&&(!i||i==="_self")&&!$1(n)}function Ju(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((i,r)=>{let s=n[r];return i.concat(Array.isArray(s)?s.map(c=>[r,c]):[[r,s]])},[]))}function Q1(n,i){let r=Ju(n);return i&&i.forEach((s,c)=>{r.has(c)||i.getAll(c).forEach(f=>{r.append(c,f)})}),r}var Ks=null;function Z1(){if(Ks===null)try{new FormData(document.createElement("form"),0),Ks=!1}catch{Ks=!0}return Ks}var F1=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function qu(n){return n!=null&&!F1.has(n)?(dt(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Js}"`),null):n}function J1(n,i){let r,s,c,f,h;if(G1(n)){let m=n.getAttribute("action");s=m?ya(m,i):null,r=n.getAttribute("method")||Fs,c=qu(n.getAttribute("enctype"))||Js,f=new FormData(n)}else if(V1(n)||K1(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 y=n.getAttribute("formaction")||m.getAttribute("action");if(s=y?ya(y,i):null,r=n.getAttribute("formmethod")||m.getAttribute("method")||Fs,c=qu(n.getAttribute("formenctype"))||qu(m.getAttribute("enctype"))||Js,f=new FormData(m,n),!Z1()){let{name:p,type:S,value:x}=n;if(S==="image"){let _=p?`${p}.`:"";f.append(`${_}x`,"0"),f.append(`${_}y`,"0")}else p&&f.append(p,x)}}else{if(so(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Fs,s=null,c=Js,h=n}return f&&c==="text/plain"&&(h=f,f=void 0),{action:s,method:r.toLowerCase(),encType:c,formData:f,body:h}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function of(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function W1(n,i,r,s){let c=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return r?c.pathname.endsWith("/")?c.pathname=`${c.pathname}_.${s}`:c.pathname=`${c.pathname}.${s}`:c.pathname==="/"?c.pathname=`_root.${s}`:i&&ya(c.pathname,i)==="/"?c.pathname=`${i.replace(/\/$/,"")}/_root.${s}`:c.pathname=`${c.pathname.replace(/\/$/,"")}.${s}`,c}async function P1(n,i){if(n.id in i)return i[n.id];try{let r=await import(n.module);return i[n.id]=r,r}catch(r){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function I1(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 eS(n,i,r){let s=await Promise.all(n.map(async c=>{let f=i.routes[c.route.id];if(f){let h=await P1(f,r);return h.links?h.links():[]}return[]}));return lS(s.flat(1).filter(I1).filter(c=>c.rel==="stylesheet"||c.rel==="preload").map(c=>c.rel==="stylesheet"?{...c,rel:"prefetch",as:"style"}:{...c,rel:"prefetch"}))}function ag(n,i,r,s,c,f){let h=(y,p)=>r[p]?y.route.id!==r[p].route.id:!0,m=(y,p)=>r[p].pathname!==y.pathname||r[p].route.path?.endsWith("*")&&r[p].params["*"]!==y.params["*"];return f==="assets"?i.filter((y,p)=>h(y,p)||m(y,p)):f==="data"?i.filter((y,p)=>{let S=s.routes[y.route.id];if(!S||!S.hasLoader)return!1;if(h(y,p)||m(y,p))return!0;if(y.route.shouldRevalidate){let x=y.route.shouldRevalidate({currentUrl:new URL(c.pathname+c.search+c.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(n,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function tS(n,i,{includeHydrateFallback:r}={}){return aS(n.map(s=>{let c=i.routes[s.route.id];if(!c)return[];let f=[c.module];return c.clientActionModule&&(f=f.concat(c.clientActionModule)),c.clientLoaderModule&&(f=f.concat(c.clientLoaderModule)),r&&c.hydrateFallbackModule&&(f=f.concat(c.hydrateFallbackModule)),c.imports&&(f=f.concat(c.imports)),f}).flat(1))}function aS(n){return[...new Set(n)]}function nS(n){let i={},r=Object.keys(n).sort();for(let s of r)i[s]=n[s];return i}function lS(n,i){let r=new Set;return new Set(i),n.reduce((s,c)=>{let f=JSON.stringify(nS(c));return r.has(f)||(r.add(f),s.push({key:f,link:c})),s},[])}function cy(){let n=b.useContext(yl);return of(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function iS(){let n=b.useContext(br);return of(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var cf=b.createContext(void 0);cf.displayName="FrameworkContext";function uy(){let n=b.useContext(cf);return of(n,"You must render this element inside a <HydratedRouter> element"),n}function rS(n,i){let r=b.useContext(cf),[s,c]=b.useState(!1),[f,h]=b.useState(!1),{onFocus:m,onBlur:y,onMouseEnter:p,onMouseLeave:S,onTouchStart:x}=i,_=b.useRef(null);b.useEffect(()=>{if(n==="render"&&h(!0),n==="viewport"){let D=W=>{W.forEach(X=>{h(X.isIntersecting)})},A=new IntersectionObserver(D,{threshold:.5});return _.current&&A.observe(_.current),()=>{A.disconnect()}}},[n]),b.useEffect(()=>{if(s){let D=setTimeout(()=>{h(!0)},100);return()=>{clearTimeout(D)}}},[s]);let E=()=>{c(!0)},z=()=>{c(!1),h(!1)};return r?n!=="intent"?[f,_,{}]:[f,_,{onFocus:ir(m,E),onBlur:ir(y,z),onMouseEnter:ir(p,E),onMouseLeave:ir(S,z),onTouchStart:ir(x,E)}]:[!1,_,{}]}function ir(n,i){return r=>{n&&n(r),r.defaultPrevented||i(r)}}function sS({page:n,...i}){let{router:r}=cy(),s=b.useMemo(()=>Yn(r.routes,n,r.basename),[r.routes,n,r.basename]);return s?b.createElement(cS,{page:n,matches:s,...i}):null}function oS(n){let{manifest:i,routeModules:r}=uy(),[s,c]=b.useState([]);return b.useEffect(()=>{let f=!1;return eS(n,i,r).then(h=>{f||c(h)}),()=>{f=!0}},[n,i,r]),s}function cS({page:n,matches:i,...r}){let s=Ca(),{future:c,manifest:f,routeModules:h}=uy(),{basename:m}=cy(),{loaderData:y,matches:p}=iS(),S=b.useMemo(()=>ag(n,i,p,f,s,"data"),[n,i,p,f,s]),x=b.useMemo(()=>ag(n,i,p,f,s,"assets"),[n,i,p,f,s]),_=b.useMemo(()=>{if(n===s.pathname+s.search+s.hash)return[];let D=new Set,A=!1;if(i.forEach(X=>{let G=f.routes[X.route.id];!G||!G.hasLoader||(!S.some(ne=>ne.route.id===X.route.id)&&X.route.id in y&&h[X.route.id]?.shouldRevalidate||G.hasClientLoader?A=!0:D.add(X.route.id))}),D.size===0)return[];let W=W1(n,m,c.unstable_trailingSlashAwareDataRequests,"data");return A&&D.size>0&&W.searchParams.set("_routes",i.filter(X=>D.has(X.route.id)).map(X=>X.route.id).join(",")),[W.pathname+W.search]},[m,c.unstable_trailingSlashAwareDataRequests,y,s,f,S,i,n,h]),E=b.useMemo(()=>tS(x,f),[x,f]),z=oS(x);return b.createElement(b.Fragment,null,_.map(D=>b.createElement("link",{key:D,rel:"prefetch",as:"fetch",href:D,...r})),E.map(D=>b.createElement("link",{key:D,rel:"modulepreload",href:D,...r})),z.map(({key:D,link:A})=>b.createElement("link",{key:D,nonce:r.nonce,...A,crossOrigin:A.crossOrigin??r.crossOrigin})))}function uS(...n){return i=>{n.forEach(r=>{typeof r=="function"?r(i):r!=null&&(r.current=i)})}}var fS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{fS&&(window.__reactRouterVersion="7.13.1")}catch{}function dS(n,i){return Bb({basename:i?.basename,getContext:i?.getContext,future:i?.future,history:tb({window:i?.window}),hydrationData:hS(),routes:n,mapRouteProperties:L1,hydrationRouteProperties:k1,dataStrategy:i?.dataStrategy,patchRoutesOnNavigation:i?.patchRoutesOnNavigation,window:i?.window,unstable_instrumentations:i?.unstable_instrumentations}).initialize()}function hS(){let n=window?.__staticRouterHydrationData;return n&&n.errors&&(n={...n,errors:mS(n.errors)}),n}function mS(n){if(!n)return null;let i=Object.entries(n),r={};for(let[s,c]of i)if(c&&c.__type==="RouteErrorResponse")r[s]=new xr(c.status,c.statusText,c.data,c.internal===!0);else if(c&&c.__type==="Error"){if(c.__subType){let f=window[c.__subType];if(typeof f=="function")try{let h=new f(c.message);h.stack="",r[s]=h}catch{}}if(r[s]==null){let f=new Error(c.message);f.stack="",r[s]=f}}else r[s]=c;return r}var fy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Zt=b.forwardRef(function({onClick:i,discover:r="render",prefetch:s="none",relative:c,reloadDocument:f,replace:h,unstable_mask:m,state:y,target:p,to:S,preventScrollReset:x,viewTransition:_,unstable_defaultShouldRevalidate:E,...z},D){let{basename:A,navigator:W,unstable_useTransitions:X}=b.useContext(la),G=typeof S=="string"&&fy.test(S),ne=Vg(S,A);S=ne.to;let re=g1(S,{relative:c}),ce=Ca(),P=null;if(m){let ie=yr(m,[],ce.unstable_mask?ce.unstable_mask.pathname:"/",!0);A!=="/"&&(ie.pathname=ie.pathname==="/"?A:wa([A,ie.pathname])),P=W.createHref(ie)}let[j,$,Q]=rS(s,z),H=yS(S,{replace:h,unstable_mask:m,state:y,target:p,preventScrollReset:x,relative:c,viewTransition:_,unstable_defaultShouldRevalidate:E,unstable_useTransitions:X});function ee(ie){i&&i(ie),ie.defaultPrevented||H(ie)}let pe=!(ne.isExternal||f),Z=b.createElement("a",{...z,...Q,href:(pe?P:void 0)||ne.absoluteURL||re,onClick:pe?ee:i,ref:uS(D,$),target:p,"data-discover":!G&&r==="render"?"true":void 0});return j&&!G?b.createElement(b.Fragment,null,Z,b.createElement(sS,{page:re})):Z});Zt.displayName="Link";var gr=b.forwardRef(function({"aria-current":i="page",caseSensitive:r=!1,className:s="",end:c=!1,style:f,to:h,viewTransition:m,children:y,...p},S){let x=Sr(h,{relative:p.relative}),_=Ca(),E=b.useContext(br),{navigator:z,basename:D}=b.useContext(la),A=E!=null&&_S(x)&&m===!0,W=z.encodeLocation?z.encodeLocation(x).pathname:x.pathname,X=_.pathname,G=E&&E.navigation&&E.navigation.location?E.navigation.location.pathname:null;r||(X=X.toLowerCase(),G=G?G.toLowerCase():null,W=W.toLowerCase()),G&&D&&(G=ya(G,D)||G);const ne=W!=="/"&&W.endsWith("/")?W.length-1:W.length;let re=X===W||!c&&X.startsWith(W)&&X.charAt(ne)==="/",ce=G!=null&&(G===W||!c&&G.startsWith(W)&&G.charAt(W.length)==="/"),P={isActive:re,isPending:ce,isTransitioning:A},j=re?i:void 0,$;typeof s=="function"?$=s(P):$=[s,re?"active":null,ce?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let Q=typeof f=="function"?f(P):f;return b.createElement(Zt,{...p,"aria-current":j,className:$,ref:S,style:Q,to:h,viewTransition:m},typeof y=="function"?y(P):y)});gr.displayName="NavLink";var pS=b.forwardRef(({discover:n="render",fetcherKey:i,navigate:r,reloadDocument:s,replace:c,state:f,method:h=Fs,action:m,onSubmit:y,relative:p,preventScrollReset:S,viewTransition:x,unstable_defaultShouldRevalidate:_,...E},z)=>{let{unstable_useTransitions:D}=b.useContext(la),A=bS(),W=SS(m,{relative:p}),X=h.toLowerCase()==="get"?"get":"post",G=typeof m=="string"&&fy.test(m),ne=re=>{if(y&&y(re),re.defaultPrevented)return;re.preventDefault();let ce=re.nativeEvent.submitter,P=ce?.getAttribute("formmethod")||h,j=()=>A(ce||re.currentTarget,{fetcherKey:i,method:P,navigate:r,replace:c,state:f,relative:p,preventScrollReset:S,viewTransition:x,unstable_defaultShouldRevalidate:_});D&&r!==!1?b.startTransition(()=>j()):j()};return b.createElement("form",{ref:z,method:X,action:W,onSubmit:s?y:ne,...E,"data-discover":!G&&n==="render"?"true":void 0})});pS.displayName="Form";function gS(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function dy(n){let i=b.useContext(yl);return Me(i,gS(n)),i}function yS(n,{target:i,replace:r,unstable_mask:s,state:c,preventScrollReset:f,relative:h,viewTransition:m,unstable_defaultShouldRevalidate:y,unstable_useTransitions:p}={}){let S=Kn(),x=Ca(),_=Sr(n,{relative:h});return b.useCallback(E=>{if(X1(E,i)){E.preventDefault();let z=r!==void 0?r:Ua(x)===Ua(_),D=()=>S(n,{replace:z,unstable_mask:s,state:c,preventScrollReset:f,relative:h,viewTransition:m,unstable_defaultShouldRevalidate:y});p?b.startTransition(()=>D()):D()}},[x,S,_,r,s,c,i,n,f,h,m,y,p])}function hy(n){dt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let i=b.useRef(Ju(n)),r=b.useRef(!1),s=Ca(),c=b.useMemo(()=>Q1(s.search,r.current?null:i.current),[s.search]),f=Kn(),h=b.useCallback((m,y)=>{const p=Ju(typeof m=="function"?m(new URLSearchParams(c)):m);r.current=!0,f("?"+p,y)},[f,c]);return[c,h]}var xS=0,vS=()=>`__${String(++xS)}__`;function bS(){let{router:n}=dy("useSubmit"),{basename:i}=b.useContext(la),r=z1(),s=n.fetch,c=n.navigate;return b.useCallback(async(f,h={})=>{let{action:m,method:y,encType:p,formData:S,body:x}=J1(f,i);if(h.navigate===!1){let _=h.fetcherKey||vS();await s(_,r,h.action||m,{unstable_defaultShouldRevalidate:h.unstable_defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:S,body:x,formMethod:h.method||y,formEncType:h.encType||p,flushSync:h.flushSync})}else await c(h.action||m,{unstable_defaultShouldRevalidate:h.unstable_defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:S,body:x,formMethod:h.method||y,formEncType:h.encType||p,replace:h.replace,state:h.state,fromRouteId:r,flushSync:h.flushSync,viewTransition:h.viewTransition})},[s,c,i,r])}function SS(n,{relative:i}={}){let{basename:r}=b.useContext(la),s=b.useContext(xa);Me(s,"useFormAction must be used inside a RouteContext");let[c]=s.matches.slice(-1),f={...Sr(n||".",{relative:i})},h=Ca();if(n==null){f.search=h.search;let m=new URLSearchParams(f.search),y=m.getAll("index");if(y.some(S=>S==="")){m.delete("index"),y.filter(x=>x).forEach(x=>m.append("index",x));let S=m.toString();f.search=S?`?${S}`:""}}return(!n||n===".")&&c.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(f.pathname=f.pathname==="/"?r:wa([r,f.pathname])),Ua(f)}function _S(n,{relative:i}={}){let r=b.useContext(nf);Me(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=dy("useViewTransitionState"),c=Sr(n,{relative:i});if(!r.isTransitioning)return!1;let f=ya(r.currentLocation.pathname,s)||r.currentLocation.pathname,h=ya(r.nextLocation.pathname,s)||r.nextLocation.pathname;return eo(c.pathname,h)!=null||eo(c.pathname,f)!=null}const my=(...n)=>n.filter((i,r,s)=>!!i&&i.trim()!==""&&s.indexOf(i)===r).join(" ").trim();const jS=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const NS=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,r,s)=>s?s.toUpperCase():r.toLowerCase());const ng=n=>{const i=NS(n);return i.charAt(0).toUpperCase()+i.slice(1)};var ES={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"};const wS=n=>{for(const i in n)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1};const CS=b.forwardRef(({color:n="currentColor",size:i=24,strokeWidth:r=2,absoluteStrokeWidth:s,className:c="",children:f,iconNode:h,...m},y)=>b.createElement("svg",{ref:y,...ES,width:i,height:i,stroke:n,strokeWidth:s?Number(r)*24/Number(i):r,className:my("lucide",c),...!f&&!wS(m)&&{"aria-hidden":"true"},...m},[...h.map(([p,S])=>b.createElement(p,S)),...Array.isArray(f)?f:[f]]));const Ae=(n,i)=>{const r=b.forwardRef(({className:s,...c},f)=>b.createElement(CS,{ref:f,iconNode:i,className:my(`lucide-${jS(ng(n))}`,`lucide-${n}`,s),...c}));return r.displayName=ng(n),r};const RS=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],py=Ae("arrow-right",RS);const zS=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],OS=Ae("boxes",zS);const TS=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],DS=Ae("brain",TS);const MS=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],to=Ae("check",MS);const AS=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],gy=Ae("chevron-down",AS);const LS=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],on=Ae("chevron-right",LS);const kS=[["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"}]],uf=Ae("circle-alert",kS);const US=[["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"}]],lg=Ae("copy",US);const HS=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],BS=Ae("database",HS);const qS=[["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"}]],ig=Ae("download",qS);const YS=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],VS=Ae("ellipsis",YS);const GS=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]],KS=Ae("file-spreadsheet",GS);const $S=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],si=Ae("file-text",$S);const XS=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],yy=Ae("file",XS);const QS=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],ff=Ae("folder-git-2",QS);const ZS=[["path",{d:"M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1",key:"fm4g5t"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m9 16 3-3-3-3",key:"6m91ic"}]],FS=Ae("folder-input",ZS);const JS=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],WS=Ae("folder-open",JS);const PS=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],xy=Ae("folder-plus",PS);const IS=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],ga=Ae("folder",IS);const e2=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],rg=Ae("git-branch",e2);const t2=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],sg=Ae("github",t2);const a2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],n2=Ae("globe",a2);const l2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],i2=Ae("info",l2);const r2=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ft=Ae("loader-circle",r2);const s2=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],o2=Ae("menu",s2);const c2=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],u2=Ae("monitor",c2);const f2=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],d2=Ae("moon",f2);const h2=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],oo=Ae("package",h2);const m2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],p2=Ae("panel-left",m2);const g2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],vy=Ae("plus",g2);const y2=[["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"}]],x2=Ae("refresh-cw",y2);const v2=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],b2=Ae("search",v2);const S2=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],_2=Ae("settings",S2);const j2=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],N2=Ae("share-2",j2);const E2=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],w2=Ae("sparkles",E2);const C2=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],R2=Ae("sun",C2);const z2=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],O2=Ae("upload",z2);const T2=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],D2=Ae("users",T2);const M2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],df=Ae("x",M2),og=n=>{let i;const r=new Set,s=(p,S)=>{const x=typeof p=="function"?p(i):p;if(!Object.is(x,i)){const _=i;i=S??(typeof x!="object"||x===null)?x:Object.assign({},i,x),r.forEach(E=>E(i,_))}},c=()=>i,m={setState:s,getState:c,getInitialState:()=>y,subscribe:p=>(r.add(p),()=>r.delete(p))},y=i=n(s,c,m);return m},A2=(n=>n?og(n):og),L2=n=>n;function k2(n,i=L2){const r=li.useSyncExternalStore(n.subscribe,li.useCallback(()=>i(n.getState()),[n,i]),li.useCallback(()=>i(n.getInitialState()),[n,i]));return li.useDebugValue(r),r}const cg=n=>{const i=A2(n),r=s=>k2(i,s);return Object.assign(r,i),r},co=(n=>n?cg(n):cg),U2="/api/v1";class Wu extends Error{constructor(i,r,s){super(s),this.status=i,this.code=r,this.name="ApiError"}}async function $s(n,i,r,s){let c=`${U2}${i}`;if(s){const m=new URLSearchParams(s).toString();m&&(c+=`?${m}`)}const f={method:n,headers:{"Content-Type":"application/json"}};r!==void 0&&(f.body=JSON.stringify(r));const h=await fetch(c,f);if(!h.ok){let m="UNKNOWN",y=h.statusText;try{const p=await h.json();p.code&&(m=p.code),p.message&&(y=p.message)}catch{}throw new Wu(h.status,m,y)}return h.json()}const qt={get(n,i){return $s("GET",n,void 0,i)},post(n,i){return $s("POST",n,i)},put(n,i){return $s("PUT",n,i)},delete(n){return $s("DELETE",n)}},H2=3e4,B2=1e3,q2=3e4;class Y2{ws=null;url="";handlers=new Map;statusHandlers=new Set;heartbeatTimer=null;reconnectTimer=null;reconnectAttempt=0;intentionalClose=!1;_status="disconnected";get status(){return this._status}setStatus(i){this._status=i;for(const r of this.statusHandlers)r(i)}onStatusChange(i){return this.statusHandlers.add(i),()=>{this.statusHandlers.delete(i)}}connect(i){this.url=i,this.intentionalClose=!1,this.reconnectAttempt=0,this.open()}disconnect(){this.intentionalClose=!0,this.clearTimers(),this.ws&&(this.ws.close(),this.ws=null),this.setStatus("disconnected")}on(i,r){let s=this.handlers.get(i);return s||(s=new Set,this.handlers.set(i,s)),s.add(r),()=>{s.delete(r),s.size===0&&this.handlers.delete(i)}}send(i,r){if(this.ws?.readyState!==WebSocket.OPEN)return;const s={event:i,payload:r,timestamp:Date.now()};this.ws.send(JSON.stringify(s))}open(){this.setStatus("connecting");const i=new WebSocket(this.url);i.onopen=()=>{this.reconnectAttempt=0,this.setStatus("connected"),this.startHeartbeat()},i.onmessage=r=>{try{const s=JSON.parse(String(r.data));if(s.event==="pong")return;const c=this.handlers.get(s.event);if(c)for(const f of c)f(s.payload)}catch{}},i.onclose=()=>{this.stopHeartbeat(),this.intentionalClose||(this.setStatus("reconnecting"),this.scheduleReconnect())},i.onerror=()=>{},this.ws=i}startHeartbeat(){this.stopHeartbeat(),this.heartbeatTimer=setInterval(()=>{this.ws?.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify({event:"ping",payload:null,timestamp:Date.now()}))},H2)}stopHeartbeat(){this.heartbeatTimer&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=null)}scheduleReconnect(){if(this.reconnectTimer)return;const i=Math.min(B2*2**this.reconnectAttempt,q2);this.reconnectAttempt++,this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.open()},i)}clearTimers(){this.stopHeartbeat(),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}}const Ha=new Y2,gl=co(n=>({status:"disconnected",onlineCount:0,connections:[],setStatus:i=>n({status:i}),fetchDaemonStatus:async()=>{try{const i=await qt.get("/daemons/status");n({onlineCount:i.online_count,connections:i.connections})}catch{}}})),V2=n=>n==="connecting"?"disconnected":n;Ha.onStatusChange(n=>{gl.getState().setStatus(V2(n))});Ha.on("ws:daemon:connected",n=>{const i=n;gl.setState(r=>{if(r.connections.some(h=>h.machine_id===i.machine_id))return r;const c={machine_id:i.machine_id};i.lib_id&&(c.lib_id=i.lib_id);const f=[...r.connections,c];return{connections:f,onlineCount:f.length}})});Ha.on("ws:daemon:status",n=>{const i=n;gl.setState(r=>{if(i.is_online){if(r.connections.some(m=>m.machine_id===i.machine_id))return r;const f={machine_id:i.machine_id};i.lib_id&&(f.lib_id=i.lib_id);const h=[...r.connections,f];return{connections:h,onlineCount:h.length}}const s=r.connections.filter(c=>c.machine_id!==i.machine_id);return{connections:s,onlineCount:s.length}})});const uo="lib_cloud_default",Lt=co((n,i)=>({libraries:[],loading:!1,error:null,fetchLibraries:async()=>{n({loading:!0,error:null});try{const r=await qt.get("/libraries");n({libraries:r,loading:!1})}catch(r){n({error:r instanceof Error?r.message:"Failed to load libraries",loading:!1})}},createLibrary:async r=>{const s=await qt.post("/libraries",r);return n(c=>({libraries:[...c.libraries,s]})),s},deleteLibrary:async r=>{await qt.delete(`/libraries/${r}`),n(s=>({libraries:s.libraries.filter(c=>c.id!==r)}))},updateLibraryName:async(r,s)=>{const c=await qt.put(`/libraries/${r}`,{name:s});n(f=>({libraries:f.libraries.map(h=>h.id===r?c:h)}))},_updateLibraryOnline:(r,s)=>{n(c=>({libraries:c.libraries.map(f=>f.id===r?{...f,is_online:s}:f)}))},_refreshLibrary:async r=>{try{const s=await qt.get(`/libraries/${r}`);n(c=>({libraries:c.libraries.map(f=>f.id===r?s:f)}))}catch{i().fetchLibraries()}}})),_r=n=>{const i=n.libraries.filter(s=>s.type==="cloud").sort((s,c)=>s.created_at.localeCompare(c.created_at)),r=n.libraries.filter(s=>s.type==="daemon").sort((s,c)=>s.name.localeCompare(c.name));return[...i,...r]},G2=n=>n.libraries.filter(i=>i.type==="daemon");Ha.on("ws:daemon:status",n=>{const i=n;i.lib_id&&Lt.getState()._updateLibraryOnline(i.lib_id,i.is_online),Lt.getState().fetchLibraries()});Ha.on("ws:daemon:connected",n=>{const i=n;i.lib_id&&Lt.getState()._updateLibraryOnline(i.lib_id,!0),Lt.getState().fetchLibraries()});Ha.on("ws:library:updated",n=>{const i=n;Lt.getState()._refreshLibrary(i.library_id)});const ug=n=>Symbol.iterator in n,fg=n=>"entries"in n,dg=(n,i)=>{const r=n instanceof Map?n:new Map(n.entries()),s=i instanceof Map?i:new Map(i.entries());if(r.size!==s.size)return!1;for(const[c,f]of r)if(!s.has(c)||!Object.is(f,s.get(c)))return!1;return!0},K2=(n,i)=>{const r=n[Symbol.iterator](),s=i[Symbol.iterator]();let c=r.next(),f=s.next();for(;!c.done&&!f.done;){if(!Object.is(c.value,f.value))return!1;c=r.next(),f=s.next()}return!!c.done&&!!f.done};function $2(n,i){return Object.is(n,i)?!0:typeof n!="object"||n===null||typeof i!="object"||i===null||Object.getPrototypeOf(n)!==Object.getPrototypeOf(i)?!1:ug(n)&&ug(i)?fg(n)&&fg(i)?dg(n,i):K2(n,i):dg({entries:()=>Object.entries(n)},{entries:()=>Object.entries(i)})}function ci(n){const i=li.useRef(void 0);return r=>{const s=n(r);return $2(i.current,s)?i.current:i.current=s}}function Pu(){const{t:n}=we(),i=gl(h=>h.onlineCount),r=gl(h=>h.connections.length);if(Lt(ci(G2)).length===0)return null;const c=i>0,f=c?n("sources.header.daemon_status",{online:i,total:r}):n("sources.header.all_offline");return d.jsxs("div",{className:"group relative flex items-center",title:f,children:[d.jsx("span",{className:`inline-block h-[7px] w-[7px] rounded-full ${c?"bg-c4a-success":"bg-c4a-error"}`}),d.jsx("span",{className:"pointer-events-none absolute right-full mr-2 hidden whitespace-nowrap rounded bg-c4a-bg-elevated px-2 py-1 font-mono text-xs text-c4a-text-secondary shadow-c4a-md group-hover:block",children:f})]})}const hg=[{to:"/",labelKey:"nav.home"},{to:"/studio",labelKey:"nav.studio"},{to:"/docs",labelKey:"nav.docs"}];function X2(){const{t:n}=we(),[i,r]=b.useState(!1);return d.jsxs("header",{className:"sticky top-0 z-40 border-b border-c4a-border-subtle bg-c4a-bg-base/95 backdrop-blur-sm",children:[d.jsxs("div",{className:"flex h-14 items-center justify-between px-4",children:[d.jsxs(Zt,{to:"/",className:"flex items-center gap-2 text-c4a-text-primary",children:[d.jsx("span",{className:"font-mono text-lg font-bold text-c4a-accent",children:"C4A"}),d.jsx("span",{className:"hidden font-mono text-sm font-semibold uppercase tracking-tight md:inline",children:"Context4AI"})]}),d.jsxs("div",{className:"hidden items-center gap-6 md:flex",children:[d.jsx("nav",{className:"flex items-center gap-4",children:hg.map(({to:s,labelKey:c})=>d.jsx(gr,{to:s,end:s==="/",className:({isActive:f})=>`font-mono text-xs uppercase tracking-tight transition-colors duration-150 ${f?"text-c4a-accent":"text-c4a-text-secondary hover:text-c4a-text-primary"}`,children:n(c)},s))}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(Pu,{}),d.jsx(Zt,{to:"/login",className:"font-mono text-xs uppercase tracking-tight text-c4a-text-muted transition-colors duration-150 hover:text-c4a-text-primary",children:n("nav.login")})]})]}),d.jsx("button",{onClick:()=>r(!i),className:"text-c4a-text-secondary md:hidden",children:i?d.jsx(df,{size:20}):d.jsx(o2,{size:20})})]}),i&&d.jsxs("div",{className:"border-t border-c4a-border-subtle bg-c4a-bg-surface px-4 pb-4 pt-2 md:hidden",children:[d.jsx("nav",{className:"flex flex-col gap-2",children:hg.map(({to:s,labelKey:c})=>d.jsx(gr,{to:s,end:s==="/",onClick:()=>r(!1),className:({isActive:f})=>`block py-2 font-mono text-xs uppercase tracking-tight transition-colors duration-150 ${f?"text-c4a-accent":"text-c4a-text-secondary hover:text-c4a-text-primary"}`,children:n(c)},s))}),d.jsx("div",{className:"mt-2 border-t border-c4a-border-subtle pt-2",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(Pu,{}),d.jsx(Zt,{to:"/login",onClick:()=>r(!1),className:"font-mono text-xs uppercase tracking-tight text-c4a-text-muted transition-colors duration-150 hover:text-c4a-text-primary",children:n("nav.login")})]})})]})]})}function Q2(n){return n==="system"&&typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":n==="system"?"dark":n}function by(n){if(typeof window>"u")return;const i=Q2(n);document.documentElement.setAttribute("data-theme",i),localStorage.setItem("theme",n)}function Z2(){try{return localStorage.getItem("theme")||"system"}catch{return"system"}}const Sy=co(n=>({theme:Z2(),setTheme:i=>{by(i),n({theme:i})}}));let mg=!1;function F2(){if(mg||typeof window>"u")return;mg=!0;const n=window.matchMedia("(prefers-color-scheme: dark)"),i=()=>{const{theme:r}=Sy.getState();r==="system"&&by("system")};n.addEventListener("change",i)}F2();const J2=[{mode:"light",icon:R2,labelKey:"footer.theme.light"},{mode:"dark",icon:d2,labelKey:"footer.theme.dark"},{mode:"system",icon:u2,labelKey:"footer.theme.system"}];function W2(){const{t:n}=we(),{theme:i,setTheme:r}=Sy();return d.jsx("div",{className:"flex items-center gap-1",children:J2.map(({mode:s,icon:c,labelKey:f})=>d.jsx("button",{onClick:()=>r(s),title:n(f),className:`cursor-pointer rounded p-1.5 transition-colors duration-150 ${i===s?"bg-c4a-bg-active text-c4a-accent":"text-c4a-text-muted hover:text-c4a-text-secondary hover:bg-c4a-bg-hover"}`,children:d.jsx(c,{size:14})},s))})}function P2(){const{i18n:n}=we(),i=()=>{const r=n.language==="en"?"zh":"en";n.changeLanguage(r)};return d.jsx("button",{onClick:i,className:"cursor-pointer rounded px-2 py-1 font-mono text-xs uppercase tracking-tight text-c4a-text-muted transition-colors duration-150 hover:text-c4a-text-secondary hover:bg-c4a-bg-hover",children:n.language==="en"?"CN":"EN"})}const I2="_brandIcon_1c7st_1",e4="_iconPulse_1c7st_35",pg={brandIcon:I2,iconPulse:e4};function _y(){const{t:n}=we(),i=new Date().getFullYear();return d.jsx("footer",{className:"border-t border-c4a-border-subtle bg-c4a-bg-base px-4 py-4",children:d.jsxs("div",{className:"flex items-end justify-between gap-4",children:[d.jsxs("div",{className:"hidden items-center gap-3 md:flex",children:[d.jsx("div",{className:pg.brandIcon,children:d.jsx("span",{className:pg.iconPulse,children:"C4A"})}),d.jsxs("div",{className:"flex flex-col",children:[d.jsx("span",{className:"font-mono text-xs font-semibold uppercase tracking-tight text-c4a-text-primary",children:"Context4AI"}),d.jsx("span",{className:"font-mono text-[10px] uppercase tracking-wider text-c4a-text-muted",children:n("footer.tagline")})]})]}),d.jsxs("div",{className:"ml-auto flex flex-col items-end gap-2",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(W2,{}),d.jsx(P2,{})]}),d.jsx("p",{className:"font-mono text-[11px] text-c4a-text-muted",children:n("footer.copyright",{year:i})})]})]})})}function t4(){return d.jsxs("div",{className:"flex min-h-screen flex-col",children:[d.jsx(X2,{}),d.jsx("main",{className:"mx-auto flex w-full max-w-[1200px] flex-1 flex-col px-4",children:d.jsx(oy,{})}),d.jsx(_y,{})]})}function a4({onToggleSidebar:n}){const{t:i}=we();return d.jsx("header",{className:"sticky top-0 z-40 border-b border-c4a-border-subtle bg-c4a-bg-base/95 backdrop-blur-sm",children:d.jsxs("div",{className:"relative flex h-14 items-center justify-between px-4",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[n&&d.jsx("button",{onClick:n,className:"text-c4a-text-secondary transition-colors duration-150 hover:text-c4a-text-primary md:hidden",children:d.jsx(p2,{size:20})}),d.jsxs(Zt,{to:"/",className:"hidden items-center gap-2 text-c4a-text-primary md:flex",children:[d.jsx("span",{className:"font-mono text-lg font-bold text-c4a-accent",children:"C4A"}),d.jsx("span",{className:"font-mono text-sm font-semibold uppercase tracking-tight",children:"Context4AI"})]})]}),d.jsx(Zt,{to:"/",className:"absolute left-1/2 flex -translate-x-1/2 items-center gap-2 text-c4a-text-primary md:hidden",children:d.jsx("span",{className:"font-mono text-lg font-bold text-c4a-accent",children:"C4A"})}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(Pu,{}),d.jsx(Zt,{to:"/login",className:"font-mono text-xs uppercase tracking-tight text-c4a-text-muted transition-colors duration-150 hover:text-c4a-text-primary",children:i("nav.login")})]})]})})}function jy({currentName:n,onConfirm:i,onCancel:r,error:s}){const[c,f]=b.useState(n),h=b.useRef(null);b.useEffect(()=>{h.current?.select()},[]);const m=b.useCallback(()=>{const p=c.trim();p&&p!==n?i(p):r()},[c,n,i,r]),y=b.useCallback(p=>{p.key==="Enter"?(p.preventDefault(),m()):p.key==="Escape"&&r()},[m,r]);return d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx("input",{ref:h,value:c,onChange:p=>f(p.target.value),onKeyDown:y,onBlur:m,className:"min-w-0 flex-1 rounded border border-c4a-accent bg-c4a-bg-surface px-2 py-1 text-sm text-c4a-text-primary outline-none",autoFocus:!0}),d.jsx("button",{onClick:p=>{p.stopPropagation(),m()},className:"rounded p-0.5 text-c4a-success hover:bg-c4a-bg-hover",children:d.jsx(to,{size:14})}),d.jsx("button",{onClick:p=>{p.stopPropagation(),r()},className:"rounded p-0.5 text-c4a-error hover:bg-c4a-bg-hover",children:d.jsx(df,{size:14})}),s&&d.jsx("span",{className:"ml-1 text-xs text-c4a-error",children:s})]})}function Ny({target:n,onConfirm:i,onCancel:r}){const{t:s}=we(),c=b.useRef(null);b.useEffect(()=>{const h=m=>{m.key==="Escape"&&r()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r]);const f=b.useCallback(h=>{c.current&&!c.current.contains(h.target)&&r()},[r]);return d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:f,children:d.jsxs("div",{ref:c,className:"mx-4 w-full max-w-md rounded border border-c4a-border-default bg-c4a-bg-elevated p-6 shadow-c4a-lg",children:[d.jsx("h3",{className:"font-mono text-sm font-bold uppercase text-c4a-text-primary",children:s("sources.delete.confirm_title")}),d.jsxs("div",{className:"mt-4 space-y-3 text-sm text-c4a-text-secondary",children:[n.type==="resource"&&d.jsxs(d.Fragment,{children:[d.jsx("p",{children:s("sources.delete.resource",{name:n.name})}),d.jsx("p",{children:s("sources.delete.resource_impact")}),d.jsx("p",{className:"text-c4a-warning",children:s("sources.delete.session_warning")}),d.jsx("p",{children:s("sources.delete.entity_safe")})]}),n.type==="folder"&&d.jsxs(d.Fragment,{children:[d.jsx("p",{children:s("sources.delete.folder",{name:n.name})}),d.jsx("p",{children:n.folderCount!==void 0&&n.sourceCount!==void 0?s("sources.delete.folder_impact",{folders:n.folderCount,sources:n.sourceCount}):s("sources.delete.folder_impact_generic")}),d.jsx("p",{className:"text-c4a-warning",children:s("sources.delete.irreversible")})]}),n.type==="repo"&&d.jsxs(d.Fragment,{children:[d.jsx("p",{children:s("sources.delete.repo",{name:n.name,library:n.libraryName})}),d.jsx("p",{children:n.packageCount!==void 0&&n.docCount!==void 0?s("sources.delete.repo_impact",{packages:n.packageCount,docs:n.docCount}):s("sources.delete.repo_impact_generic")}),d.jsx("p",{children:s("sources.delete.local_safe")}),d.jsx("p",{children:s("sources.delete.entity_safe")})]}),n.type==="client"&&d.jsxs(d.Fragment,{children:[d.jsx("p",{children:s("sources.delete.client",{name:n.name})}),d.jsx("p",{children:s("sources.delete.client_impact")}),d.jsx("p",{children:s("sources.delete.local_safe")}),d.jsx("p",{children:s("sources.delete.entity_safe")}),d.jsx("p",{className:"text-c4a-warning",children:s("sources.delete.irreversible")}),d.jsx("p",{className:"text-c4a-text-muted",children:s("sources.delete.client_reregister")})]})]}),d.jsxs("div",{className:"mt-6 flex justify-end gap-2",children:[d.jsx("button",{onClick:r,className:"rounded border border-c4a-border-default px-3 py-1.5 font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary",children:s("common.cancel")}),d.jsx("button",{onClick:i,className:"rounded bg-c4a-error px-3 py-1.5 font-mono text-xs text-white transition-colors hover:bg-c4a-error/80",children:s("common.confirm")})]})]})})}const Ey="lib_cloud_default",n4=n=>`flex items-center gap-2 rounded px-3 py-2 font-mono text-xs uppercase tracking-tight transition-colors duration-150 ${n?"bg-c4a-bg-active text-c4a-accent":"text-c4a-text-secondary hover:bg-c4a-bg-hover hover:text-c4a-text-primary"}`,l4=[{to:"/studio/modeling",icon:OS,i18nKey:"studio.sidebar.modeling"},{to:"/studio/brain",icon:DS,i18nKey:"studio.sidebar.brain"},{to:"/studio/discovery",icon:b2,i18nKey:"studio.sidebar.discovery"},{to:"/studio/sharing",icon:N2,i18nKey:"studio.sidebar.sharing"},{to:"/studio/collaboration",icon:D2,i18nKey:"studio.sidebar.collaboration"},{to:"/studio/settings",icon:_2,i18nKey:"studio.sidebar.settings"}];function i4({state:n,onClose:i,onRename:r,onDelete:s}){const{t:c}=we(),f=b.useRef(null);b.useEffect(()=>{const m=y=>{f.current&&!f.current.contains(y.target)&&i()};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[i]);const h=n.library.id===Ey;return d.jsxs("div",{ref:f,className:"fixed z-50 min-w-[140px] rounded border border-c4a-border-default bg-c4a-bg-elevated py-1 shadow-lg",style:{top:n.y,left:n.x},children:[d.jsx("button",{className:"flex w-full items-center px-3 py-1.5 text-left font-mono text-xs text-c4a-text-secondary hover:bg-c4a-bg-hover hover:text-c4a-text-primary",onClick:()=>{r(n.library),i()},children:c("sources.library.rename")}),!h&&d.jsx("button",{className:"flex w-full items-center px-3 py-1.5 text-left font-mono text-xs text-c4a-error hover:bg-c4a-bg-hover",onClick:()=>{s(n.library),i()},children:c("sources.actions.delete")})]})}function gg({onNavigate:n}){const{t:i}=we(),r=Ca(),s=Kn(),c=Lt(ci(_r)),f=Lt(H=>H.updateLibraryName),h=Lt(H=>H.deleteLibrary),m=r.pathname.startsWith("/studio/sources")||r.pathname.startsWith("/studio/source/"),[y,p]=b.useState(m),[S,x]=b.useState(null),[_,E]=b.useState(null),[z,D]=b.useState(null),[A,W]=b.useState(null);b.useEffect(()=>{m&&p(!0)},[m]);const X=b.useCallback((H,ee)=>{H.preventDefault(),x({x:H.clientX,y:H.clientY,library:ee})},[]),G=b.useCallback(()=>x(null),[]),ne=b.useCallback(H=>{E(H.id),D(null)},[]),re=b.useCallback(async H=>{if(_)try{await f(_,H),E(null),D(null)}catch(ee){const pe=ee instanceof Error?ee.message:String(ee);D(pe)}},[_,f]),ce=b.useCallback(()=>{E(null),D(null)},[]),P=b.useCallback(H=>{W(H)},[]),j=b.useCallback(async()=>{if(A){try{await h(A.id),r.pathname.includes(A.id)&&s("/studio/sources")}catch{}W(null)}},[A,h,r.pathname,s]),$=b.useCallback(()=>{W(null)},[]),Q=H=>H.id===Ey?i("sources.library.default_cloud_name"):H.name;return d.jsxs("aside",{className:"flex h-full w-[220px] shrink-0 flex-col border-r border-c4a-border-subtle bg-c4a-bg-surface p-4",children:[d.jsxs("nav",{className:"flex flex-col gap-1",children:[d.jsxs("div",{className:"group/sources",children:[d.jsxs("button",{onClick:()=>p(H=>!H),className:`flex w-full cursor-pointer items-center gap-2 rounded px-3 py-2 font-mono text-xs uppercase tracking-tight transition-colors duration-150 ${m?"text-c4a-accent":"text-c4a-text-secondary hover:text-c4a-text-primary"}`,children:[d.jsx(BS,{size:14}),i("studio.sidebar.sources"),d.jsx("span",{role:"button",tabIndex:0,onClick:H=>{H.stopPropagation(),s("/studio/sources/add-client"),n?.()},onKeyDown:H=>{(H.key==="Enter"||H.key===" ")&&(H.stopPropagation(),s("/studio/sources/add-client"),n?.())},className:"rounded p-0.5 text-c4a-text-muted opacity-0 transition-opacity hover:bg-c4a-bg-hover hover:text-c4a-text-primary max-md:opacity-100 group-hover/sources:opacity-100",title:i("sources.menu.add_client"),children:d.jsx(vy,{size:12})}),d.jsx("span",{className:"ml-auto shrink-0",children:y?d.jsx(gy,{size:12}):d.jsx(on,{size:12})})]}),y&&d.jsx("div",{className:"mt-0.5 flex flex-col gap-0.5",children:c.map(H=>{const ee=_===H.id,pe=Q(H);return ee?d.jsx("div",{className:"py-1.5 pl-8 pr-3",onClick:Z=>Z.stopPropagation(),children:d.jsx(jy,{currentName:pe,onConfirm:re,onCancel:ce,error:z})},H.id):d.jsxs(gr,{to:`/studio/sources/${H.id}`,onClick:n,onContextMenu:Z=>X(Z,H),className:({isActive:Z})=>`flex items-center gap-2 rounded py-1.5 pl-8 pr-3 font-mono text-xs tracking-tight transition-colors duration-150 ${Z?"bg-c4a-bg-active text-c4a-accent":"text-c4a-text-secondary hover:bg-c4a-bg-hover hover:text-c4a-text-primary"}`,children:[d.jsx("span",{className:"truncate",children:pe}),H.type==="daemon"&&d.jsx("span",{className:`ml-auto h-[7px] w-[7px] shrink-0 rounded-full ${H.is_online?"bg-c4a-success":"bg-c4a-error"}`})]},H.id)})})]}),l4.map(({to:H,icon:ee,i18nKey:pe})=>d.jsxs(gr,{to:H,onClick:n,className:({isActive:Z})=>n4(Z),children:[d.jsx(ee,{size:14}),i(pe)]},H))]}),S&&d.jsx(i4,{state:S,onClose:G,onRename:ne,onDelete:P}),A&&d.jsx(Ny,{target:{type:"client",name:Q(A)},onConfirm:j,onCancel:$})]})}function r4(){const[n,i]=b.useState(!1);return b.useEffect(()=>{Lt.getState().fetchLibraries(),gl.getState().fetchDaemonStatus()},[]),b.useEffect(()=>Ha.onStatusChange(r=>{r==="connected"&&(Lt.getState().fetchLibraries(),gl.getState().fetchDaemonStatus())}),[]),d.jsxs("div",{className:"flex min-h-screen flex-col",children:[d.jsx(a4,{onToggleSidebar:()=>i(!n)}),d.jsxs("div",{className:"flex flex-1",children:[d.jsx("div",{className:"hidden md:block",children:d.jsx(gg,{})}),n&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 top-14 z-30 bg-black/40 md:hidden",onClick:()=>i(!1)}),d.jsx("div",{className:"fixed bottom-0 left-0 top-14 z-30 md:hidden",children:d.jsx(gg,{onNavigate:()=>i(!1)})})]}),d.jsx("main",{className:"flex flex-1 flex-col overflow-x-hidden",children:d.jsx(oy,{})})]}),d.jsx(_y,{})]})}function s4(){const{t:n}=we();return d.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center py-20 text-center",children:[d.jsx("h1",{className:"font-mono text-4xl font-bold uppercase tracking-wide text-c4a-text-primary md:text-5xl",children:n("home.hero.title")}),d.jsx("p",{className:"mt-6 max-w-lg text-base text-c4a-text-secondary",children:n("home.hero.description")}),d.jsxs("div",{className:"mt-10 flex items-center gap-4",children:[d.jsxs(Zt,{to:"/studio",className:"flex items-center gap-2 rounded bg-c4a-accent px-5 py-2.5 font-mono text-xs font-semibold uppercase tracking-tight text-white transition-colors duration-150 hover:bg-c4a-accent-hover",children:[n("home.hero.cta.studio"),d.jsx(py,{size:14})]}),d.jsx("a",{href:"https://github.com/context4ai/c4a",target:"_blank",rel:"noopener noreferrer",className:"rounded border border-c4a-border-default px-5 py-2.5 font-mono text-xs font-semibold uppercase tracking-tight text-c4a-text-secondary transition-colors duration-150 hover:border-c4a-border-strong hover:text-c4a-text-primary",children:n("home.hero.cta.github")})]})]})}function va({title:n,version:i,description:r}){const{t:s}=we();return d.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:d.jsxs("div",{className:"max-w-md text-center",children:[d.jsx("h2",{className:"font-mono text-2xl font-bold uppercase text-c4a-text-primary",children:n}),i&&d.jsx("span",{className:"mt-3 inline-block rounded border border-c4a-border-default bg-c4a-bg-surface px-3 py-1 font-mono text-xs uppercase text-c4a-accent",children:s("placeholder.coming",{version:i})}),d.jsx("p",{className:"mt-4 text-sm text-c4a-text-secondary",children:r})]})})}function o4(){const{t:n}=we();return d.jsx(va,{title:n("page.login.title"),version:"0.5.0",description:n("page.login.description")})}function c4(){const{t:n}=we();return d.jsx(va,{title:n("page.docs.title"),version:"0.4.13",description:n("page.docs.description")})}function u4(){const{t:n}=we();return d.jsxs("div",{className:"flex min-h-screen flex-col items-center justify-center bg-c4a-bg-base p-8 text-center",children:[d.jsx("h1",{className:"font-mono text-6xl font-bold text-c4a-accent",children:n("notfound.title")}),d.jsx("p",{className:"mt-4 text-base text-c4a-text-secondary",children:n("notfound.description")}),d.jsx(Zt,{to:"/",className:"mt-8 rounded border border-c4a-border-default px-5 py-2.5 font-mono text-xs uppercase tracking-tight text-c4a-text-secondary transition-colors duration-150 hover:border-c4a-border-strong hover:text-c4a-text-primary",children:n("notfound.back")})]})}function f4(){const{t:n}=we();return d.jsx(va,{title:n("page.modeling.title"),version:"0.4.16",description:n("page.modeling.description")})}function d4(){const{t:n}=we();return d.jsx(va,{title:n("page.brain.title"),version:"0.4.18",description:n("page.brain.description")})}function h4(){const{t:n}=we();return d.jsx(va,{title:n("page.discovery.title"),version:"0.6.x",description:n("page.discovery.description")})}function m4(){const{t:n}=we();return d.jsx(va,{title:n("page.sharing.title"),version:"0.4.39",description:n("page.sharing.description")})}function p4(){const{t:n}=we();return d.jsx(va,{title:n("page.collaboration.title"),version:"0.5.x",description:n("page.collaboration.description")})}function g4(){const{t:n}=we();return d.jsx(va,{title:n("page.settings.title"),version:"0.5.x",description:n("page.settings.description")})}function y4(){const{t:n}=we();return d.jsx(va,{title:n("page.code_setup.title"),version:"0.4.13",description:n("page.code_setup.description")})}function x4(){const{t:n}=we();return d.jsx(va,{title:n("page.code_compile.title"),version:"0.4.13",description:n("page.code_compile.description")})}function v4(){const{t:n}=we();return d.jsx(va,{title:n("page.code_review.title"),version:"0.4.14",description:n("page.code_review.description")})}function b4(){const{t:n}=we();return d.jsx(va,{title:n("page.code_result.title"),version:"0.4.14",description:n("page.code_result.description")})}const fo=(n,i)=>{for(const r of n){if(r.path===i)return r;if(r.children){const s=fo(r.children,i);if(s)return s}}return null},S4=(n,i)=>i===""?n:fo(n,i)?.children??[],wy=(n,i)=>{if(!i)return[];const r=i.split("/"),s=[];let c="";for(const f of r){c=c?`${c}/${f}`:f;const h=fo(n,c);h&&s.push(h)}return s},ho=co(n=>({rootSources:[],currentRoot:null,loading:!1,error:null,total:0,limit:100,offset:0,filter:"all",fetchRootSources:async({library_id:i,limit:r,offset:s})=>{n({loading:!0,error:null});try{const c={library_id:i};r!==void 0&&(c.limit=String(r)),s!==void 0&&(c.offset=String(s));const f=await qt.get("/sources",c);n({rootSources:f.items,total:f.total,limit:f.limit,offset:f.offset,loading:!1})}catch(c){n({error:c instanceof Error?c.message:"Failed to load sources",loading:!1})}},fetchRootSource:async i=>{const r=await qt.get(`/sources/${i}`);return n({currentRoot:r}),r},createSource:async i=>await qt.post("/sources",i),updateSource:async(i,r)=>{const s=await qt.put(`/sources/${i}`,r);n(c=>({rootSources:c.rootSources.map(f=>f.id===i?s:f),currentRoot:c.currentRoot?.id===i?s:c.currentRoot}))},deleteSource:async i=>{await qt.delete(`/sources/${i}`),n(r=>({rootSources:r.rootSources.filter(s=>s.id!==i),currentRoot:r.currentRoot?.id===i?null:r.currentRoot}))},setFilter:i=>n({filter:i}),clearSources:()=>n({rootSources:[],currentRoot:null,total:0,offset:0})}));function jr({segments:n}){const{t:i}=we(),r=b.useRef(null),s=b.useRef(null),[c,f]=b.useState(0),h=[{label:i("sources.breadcrumb.sources")},...n],m=Math.max(0,h.length-3);b.useEffect(()=>{const p=r.current,S=s.current;if(!p||!S)return;const x=()=>{const E=p.clientWidth,z=Array.from(S.children);if(z.length===0)return;const D=z.map(P=>P.offsetWidth),A=4;if(D.reduce((P,j)=>P+j,0)+A*(D.length-1)<=E){f(0);return}const X=20,G=(D[0]??0)+(D[1]??0)+A,ne=D[D.length-1]??0,re=G+A+X+A+ne;let ce=m;for(let P=1;P<=m;P++){let j=0;for(let $=2+P;$<D.length-1;$++)j+=D[$]+A;if(re+j<=E){ce=P;break}}f(ce)};x();const _=new ResizeObserver(x);return _.observe(p),()=>_.disconnect()},[m,n,i]);const y=(()=>{if(c===0||h.length<=3)return h;const p=h.slice(0,2),S=h[h.length-1],x=h.slice(2+c,h.length-1);return[...p,{label:"…"},...x,S]})();return d.jsxs("div",{ref:r,className:"relative min-w-0 overflow-hidden",children:[d.jsx("nav",{className:"flex min-h-8 items-center gap-1 font-mono text-xs text-c4a-text-muted",children:y.map((p,S)=>{const x=S===y.length-1;return d.jsxs("span",{className:"flex shrink-0 items-center gap-1",children:[S>0&&d.jsx(on,{size:12,className:"shrink-0 text-c4a-text-muted"}),p.to&&!x?d.jsx(Zt,{to:p.to,className:"cursor-pointer whitespace-nowrap transition-colors hover:text-c4a-text-primary",children:p.label}):d.jsx("span",{className:`whitespace-nowrap ${x?"text-c4a-text-primary":""}`,children:p.label})]},S)})}),d.jsx("div",{ref:s,"aria-hidden":!0,className:"pointer-events-none invisible absolute left-0 top-0 flex h-0 items-center gap-1 overflow-visible whitespace-nowrap font-mono text-xs",children:h.map((p,S)=>d.jsxs("span",{className:"flex shrink-0 items-center gap-1",children:[S>0&&d.jsx(on,{size:12}),d.jsx("span",{className:"whitespace-nowrap",children:p.label})]},S))})]})}const _4=["all","indexed","not_indexed"];function j4({value:n,onChange:i}){const{t:r}=we(),s={all:r("sources.filter.all"),indexed:r("sources.filter.indexed"),not_indexed:r("sources.filter.not_indexed")};return d.jsx("select",{value:n,onChange:c=>i(c.target.value),className:"rounded border border-c4a-border-default bg-c4a-bg-surface px-2 py-1 font-mono text-xs text-c4a-text-secondary outline-none transition-colors hover:border-c4a-border-strong focus:border-c4a-accent",children:_4.map(c=>d.jsx("option",{value:c,children:s[c]},c))})}function N4({source:n,isDaemonLibrary:i}){return n.kind==="folder"?i?d.jsx(WS,{size:16,className:"shrink-0 text-c4a-text-muted"}):d.jsx(ga,{size:16,className:"shrink-0 text-c4a-text-muted"}):n.source_type==="code"?d.jsx(oo,{size:16,className:"shrink-0 text-c4a-accent"}):d.jsx(si,{size:16,className:"shrink-0 text-c4a-text-secondary"})}function yg({status:n}){const{t:i}=we(),r={none:"bg-c4a-bg-active text-c4a-text-muted",indexed:"bg-c4a-success/20 text-c4a-success",stale:"bg-c4a-warning/20 text-c4a-warning"},s={none:"sources.status.none",indexed:"sources.status.indexed",stale:"sources.status.stale"};return d.jsx("span",{className:`rounded px-1.5 py-0.5 font-mono text-[10px] uppercase ${r[n]}`,children:i(s[n])})}function E4({type:n}){const{t:i}=we(),r=n==="code"?"sources.type.code":"sources.type.doc";return d.jsx("span",{className:"font-mono text-[10px] uppercase text-c4a-text-muted",children:i(r)})}function xg({source:n,displayName:i,childCount:r,isDaemonLibrary:s,isRepoRoot:c,onClick:f,onRename:h,onMoveTo:m,onDelete:y}){const{t:p}=we(),[S,x]=b.useState(!1),[_,E]=b.useState(!1),[z,D]=b.useState(null),A=b.useRef(null);b.useEffect(()=>{if(!S)return;const j=$=>{A.current&&!A.current.contains($.target)&&x(!1)};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[S]);const W=b.useCallback(j=>{j.preventDefault(),x(!0)},[]),X=b.useCallback(async j=>{if(!h)return;const $=await h(j);$?D($):(E(!1),D(null))},[h]),G=b.useCallback(()=>{E(!1),D(null)},[]),ne=!c&&h,re=n.kind==="source"&&!c&&m,ce=y,P=ne||re||ce;return d.jsxs("div",{className:"group flex items-center gap-3 rounded px-3 py-2 transition-colors hover:bg-c4a-bg-hover cursor-pointer",onClick:_?void 0:f,onContextMenu:_?void 0:W,children:[d.jsx(N4,{source:n,isDaemonLibrary:s??!1}),_?d.jsx("div",{className:"min-w-0 flex-1",onClick:j=>j.stopPropagation(),children:d.jsx(jy,{currentName:n.name,onConfirm:X,onCancel:G,error:z})}):d.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-c4a-text-primary",children:i??n.name}),d.jsxs("div",{className:"hidden items-center gap-2 md:flex",children:[n.kind==="folder"&&r!==void 0&&d.jsx("span",{className:"font-mono text-xs text-c4a-text-muted",children:p("common.items",{count:r})}),n.kind==="source"&&d.jsxs(d.Fragment,{children:[d.jsx(yg,{status:n.index_status}),n.source_type&&d.jsx(E4,{type:n.source_type})]})]}),d.jsx("div",{className:"flex items-center gap-2 md:hidden",children:n.kind==="source"&&d.jsx(yg,{status:n.index_status})}),P&&d.jsxs("div",{className:"relative",ref:A,children:[d.jsx("button",{onClick:j=>{j.stopPropagation(),x($=>!$)},className:"rounded p-1 text-c4a-text-muted opacity-0 transition-opacity hover:bg-c4a-bg-active hover:text-c4a-text-primary group-hover:opacity-100",children:d.jsx(VS,{size:14})}),S&&d.jsxs("div",{className:"absolute right-0 top-full z-50 mt-1 min-w-[140px] rounded border border-c4a-border-default bg-c4a-bg-elevated py-1 shadow-lg",children:[ne&&d.jsx("button",{className:"flex w-full items-center px-3 py-1.5 text-left font-mono text-xs text-c4a-text-secondary hover:bg-c4a-bg-hover hover:text-c4a-text-primary",onClick:j=>{j.stopPropagation(),x(!1),E(!0)},children:p("sources.actions.rename")}),re&&d.jsx("button",{className:"flex w-full items-center px-3 py-1.5 text-left font-mono text-xs text-c4a-text-secondary hover:bg-c4a-bg-hover hover:text-c4a-text-primary",onClick:j=>{j.stopPropagation(),x(!1),m()},children:p("sources.actions.move_to")}),ce&&d.jsx("button",{className:"flex w-full items-center px-3 py-1.5 text-left font-mono text-xs text-c4a-error hover:bg-c4a-bg-hover",onClick:j=>{j.stopPropagation(),x(!1),y()},children:p("sources.actions.delete")})]})]})]})}function w4({onConfirm:n,onCancel:i,error:r}){const{t:s}=we(),[c,f]=b.useState(""),h=b.useRef(null),m=b.useRef(null);b.useEffect(()=>{h.current?.focus()},[]),b.useEffect(()=>{const x=_=>{_.key==="Escape"&&i()};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[i]);const y=b.useCallback(x=>{m.current&&!m.current.contains(x.target)&&i()},[i]),p=b.useCallback(()=>{const x=c.trim();x&&n(x)},[c,n]),S=b.useCallback(x=>{x.key==="Enter"&&(x.preventDefault(),p())},[p]);return d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:y,children:d.jsxs("div",{ref:m,className:"mx-4 w-full max-w-md rounded border border-c4a-border-default bg-c4a-bg-elevated p-6 shadow-c4a-lg",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(xy,{size:16,className:"shrink-0 text-c4a-accent"}),d.jsx("h3",{className:"font-mono text-sm font-bold uppercase text-c4a-text-primary",children:s("sources.actions.new_folder")})]}),d.jsxs("div",{className:"mt-4",children:[d.jsx("input",{ref:h,value:c,onChange:x=>f(x.target.value),onKeyDown:S,placeholder:s("sources.folder.name_placeholder"),className:"w-full rounded border border-c4a-border-default bg-c4a-bg-surface px-3 py-2 text-sm text-c4a-text-primary outline-none transition-colors focus:border-c4a-accent",autoFocus:!0}),r&&d.jsx("p",{className:"mt-2 text-xs text-c4a-error",children:r})]}),d.jsxs("div",{className:"mt-6 flex justify-end gap-2",children:[d.jsx("button",{onClick:i,className:"rounded border border-c4a-border-default px-3 py-1.5 font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary",children:s("common.cancel")}),d.jsx("button",{onClick:p,disabled:!c.trim(),className:"rounded bg-c4a-accent px-3 py-1.5 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-40",children:s("common.confirm")})]})]})})}function vg({label:n,icon:i,items:r}){const[s,c]=b.useState(!1),f=b.useRef(null),h=b.useCallback(m=>{f.current&&!f.current.contains(m.target)&&c(!1)},[]);return b.useEffect(()=>{if(s)return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[s,h]),d.jsxs("div",{ref:f,className:"relative",children:[d.jsxs("button",{onClick:()=>c(m=>!m),className:"flex items-center gap-1.5 rounded border border-c4a-border-default bg-c4a-bg-surface px-2 py-1 font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary",children:[i,n,d.jsx(gy,{size:12,className:`transition-transform ${s?"rotate-180":""}`})]}),s&&d.jsx("div",{className:"absolute right-0 top-full z-20 mt-1 min-w-[160px] rounded border border-c4a-border-default bg-c4a-bg-elevated py-1 shadow-c4a-lg",children:r.map(m=>d.jsxs("button",{onClick:()=>{m.onClick(),c(!1)},className:"flex w-full items-center gap-2 px-3 py-1.5 text-left font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary",children:[m.icon,m.label]},m.label))})]})}function C4({onClose:n}){const{t:i}=we(),r=b.useRef(null),s=b.useCallback(c=>{r.current&&!r.current.contains(c.target)&&n()},[n]);return d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:s,children:d.jsxs("div",{ref:r,className:"w-full max-w-sm rounded border border-c4a-border-default bg-c4a-bg-elevated p-6 shadow-c4a-lg",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(w2,{size:18,className:"text-c4a-accent"}),d.jsx("h3",{className:"font-mono text-sm font-bold uppercase text-c4a-text-primary",children:i("sources.upgrade.title")})]}),d.jsx("p",{className:"mt-3 text-sm text-c4a-text-secondary",children:i("sources.upgrade.description")}),d.jsx("div",{className:"mt-6 flex justify-end",children:d.jsx("button",{onClick:n,className:"rounded bg-c4a-accent px-4 py-2 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover",children:i("common.confirm")})})]})})}function R4({pathLabel:n,loading:i,onNavigateUp:r,children:s}){return d.jsxs("div",{className:"mt-4 flex min-h-0 flex-1 flex-col rounded border border-c4a-border-default bg-c4a-bg-surface p-4",children:[d.jsx("p",{className:"min-w-0 truncate font-mono text-xs text-c4a-text-muted",children:n}),d.jsx("hr",{className:"my-3 border-c4a-border-subtle"}),d.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-y-auto",children:i?d.jsx("div",{className:"flex flex-1 items-center justify-center py-8",children:d.jsx(Ft,{size:14,className:"animate-spin text-c4a-text-muted"})}):d.jsxs(d.Fragment,{children:[r&&d.jsxs("button",{onClick:r,className:"flex w-full cursor-pointer items-center gap-3 rounded px-3 py-2 text-left text-sm text-c4a-text-primary transition-colors hover:bg-c4a-bg-hover",children:[d.jsx(ga,{size:16,className:"shrink-0 text-c4a-text-muted"}),d.jsx("span",{children:".."})]}),s]})})]})}function z4({library:n,onNewFolder:i,onImportRepo:r,onImportDir:s,onUpgrade:c}){const{t:f}=we(),h=n.type==="daemon";return d.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:d.jsxs("div",{className:"max-w-2xl text-center",children:[d.jsx("h3",{className:"font-mono text-lg font-bold uppercase text-c4a-text-primary",children:f(h?"sources.empty.daemon.title":"sources.empty.cloud.title")}),d.jsx("p",{className:"mt-3 text-sm text-c4a-text-secondary",children:f(h?"sources.empty.daemon.description":"sources.empty.cloud.description")}),d.jsx("div",{className:"mt-6 flex justify-center gap-3",children:h?d.jsxs(d.Fragment,{children:[s&&d.jsx("button",{onClick:s,disabled:!n.is_online,className:"rounded border border-c4a-border-default bg-c4a-bg-surface px-4 py-2 font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary disabled:opacity-40",children:f("sources.actions.import_dir")}),r&&d.jsx("button",{onClick:r,disabled:!n.is_online,className:"rounded bg-c4a-accent px-4 py-2 font-mono text-xs uppercase text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-40",children:f("sources.actions.import_repo")})]}):d.jsxs(d.Fragment,{children:[d.jsx("button",{onClick:i,className:"rounded border border-c4a-border-default bg-c4a-bg-surface px-4 py-2 font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary",children:f("sources.actions.new_folder")}),c&&d.jsx("button",{onClick:c,className:"rounded bg-c4a-accent px-4 py-2 font-mono text-xs uppercase text-white transition-colors hover:bg-c4a-accent-hover",children:f("sources.actions.import_repo_url")})]})})]})})}function O4(){const{t:n}=we();return d.jsxs("div",{className:"rounded border border-c4a-border-subtle bg-c4a-bg-surface p-6 text-center",children:[d.jsx("h4",{className:"font-mono text-sm font-bold text-c4a-text-primary",children:n("sources.empty.indexed.title")}),d.jsx("p",{className:"mt-2 text-xs text-c4a-text-secondary",children:n("sources.empty.indexed.description")})]})}const bg=n=>{const i=n.children??[];return{folders:i.filter(r=>r.kind==="folder").length,sources:i.filter(r=>r.kind==="source").length,codeSources:i.filter(r=>r.kind==="source"&&r.source_type==="code").length,docSources:i.filter(r=>r.kind==="source"&&r.source_type==="doc").length}};function T4(){const{t:n}=we(),i=Kn(),{libId:r}=ro(),[s,c]=hy(),f=s.get("rootId")||null,h=s.get("path")||"",y=Lt(ci(_r)).find(fe=>fe.id===r),{rootSources:p,currentRoot:S,loading:x,filter:_,fetchRootSources:E,fetchRootSource:z,createSource:D,updateSource:A,deleteSource:W,setFilter:X}=ho(),[G,ne]=b.useState(!1),[re,ce]=b.useState(null),[P,j]=b.useState(null),[$,Q]=b.useState(null),[H,ee]=b.useState(!1);b.useEffect(()=>{r&&E({library_id:r})},[r,E]),b.useEffect(()=>{f&&z(f)},[f,z]);const pe=f!==null,Z=b.useMemo(()=>pe?S?[...S4(S.tree,h)].sort((ht,kt)=>ht.kind!==kt.kind?ht.kind==="folder"?-1:1:ht.name.localeCompare(kt.name)).map(ht=>({type:"node",root:S,node:ht})):[]:[...p].sort((kt,Je)=>new Date(kt.created_at).getTime()-new Date(Je.created_at).getTime()).map(kt=>({type:"root",root:kt,node:null})),[pe,p,S,h]),ie=b.useMemo(()=>_==="all"?Z:Z.filter(fe=>fe.type==="root"||!fe.node||fe.node.kind==="folder"?!0:_==="indexed"?fe.node.index_status==="indexed":fe.node.index_status==="none"||!fe.node.index_status),[Z,_]),M=y?.type==="daemon",J=y?.type==="cloud",ue=M&&!pe,de=b.useMemo(()=>{if(!y)return[];const fe=[{label:y.id===uo?n("sources.library.default_cloud_name"):y.name,to:`/studio/sources/${y.id}`}];return pe&&S&&(fe.push({label:S.name,to:`/studio/sources/${y.id}?rootId=${S.id}`}),h&&wy(S.tree,h).forEach(ht=>{fe.push({label:ht.name,to:`/studio/sources/${y.id}?rootId=${S.id}&path=${encodeURIComponent(ht.path)}`})})),fe},[y,pe,S,h,n]),ae=b.useCallback(async fe=>{if(r)try{await D({library_id:r,kind:"folder",name:fe}),ne(!1),ce(null),E({library_id:r})}catch(ze){ze instanceof Wu&&ze.status===409&&ce(n("sources.error.name_conflict",{name:fe}))}},[r,D,E,n]),N=b.useCallback(fe=>{r&&(fe.type==="root"?c({rootId:fe.root.id}):fe.node&&(fe.node.kind==="folder"?c({rootId:fe.root.id,path:fe.node.path}):i(`/studio/source/${fe.root.id}?path=${encodeURIComponent(fe.node.path)}`)))},[r,i,c]),q=b.useCallback(()=>{if(!(!f||!r))if(h){const fe=h.split("/");fe.pop();const ze=fe.join("/");c(ze?{rootId:f,path:ze}:{rootId:f})}else c({})},[f,r,h,c]),I=b.useCallback(async(fe,ze)=>{try{return await A(fe,{name:ze}),E({library_id:r}),null}catch(ht){return ht instanceof Wu&&ht.status===409?n("sources.error.name_conflict",{name:ze}):null}},[r,A,E,n]),se=b.useCallback(fe=>{if(fe.type==="root"){Q(fe.root.id);const ze=fe.root.tree.length>0?bg({children:fe.root.tree}):void 0;j(M?{type:"repo",name:fe.root.name,libraryName:y.name,...ze?{packageCount:ze.codeSources,docCount:ze.docSources}:{}}:{type:"folder",name:fe.root.name,...ze?{folderCount:ze.folders,sourceCount:ze.sources}:{}})}},[M,y]),be=b.useCallback(async()=>{if(!(!$||!r))try{await W($),j(null),Q(null),E({library_id:r})}catch{}},[$,r,W,E]),je=b.useCallback(()=>{r&&i(`/studio/sources/import/${r}`)},[r,i]),Te=b.useCallback(()=>{r&&i(`/studio/sources/import-dir/${r}`)},[r,i]);if(!y)return d.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:d.jsx("p",{className:"text-sm text-c4a-text-muted",children:n("common.loading")})});const ot=p.length===0&&_==="all"&&!x&&!pe,Qe=ie.filter(fe=>fe.type==="node"&&fe.node?.kind==="source").length===0&&_==="indexed"&&!x,Ba=!ue,un=J&&!pe,$n=ue;return d.jsxs("div",{className:"flex flex-1 flex-col p-4 md:p-6",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx("div",{className:"min-w-0 flex-1",children:d.jsx(jr,{segments:de})}),d.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[un&&d.jsxs(d.Fragment,{children:[d.jsx(vg,{label:n("sources.actions.upload"),icon:d.jsx(O2,{size:14}),items:[{label:n("sources.actions.upload_md"),icon:d.jsx(si,{size:14}),onClick:()=>ee(!0)}]}),d.jsx(vg,{label:n("sources.actions.add"),icon:d.jsx(vy,{size:14}),items:[{label:n("sources.actions.add_folder"),icon:d.jsx(xy,{size:14}),onClick:()=>ne(!0)},{label:n("sources.actions.add_web"),icon:d.jsx(n2,{size:14}),onClick:()=>ee(!0)},{label:n("sources.actions.add_feishu"),icon:d.jsx(KS,{size:14}),onClick:()=>ee(!0)}]}),d.jsxs("button",{onClick:()=>ee(!0),className:"flex items-center gap-1.5 rounded border border-c4a-border-default bg-c4a-bg-surface px-2 py-1 font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary",children:[d.jsx(ig,{size:14}),n("sources.actions.import_repo_url")]})]}),$n&&d.jsxs(d.Fragment,{children:[d.jsxs("button",{onClick:Te,disabled:!y.is_online,title:y.is_online?void 0:n("sources.import.daemon_offline",{name:y.name}),className:"flex items-center gap-1.5 rounded border border-c4a-border-default bg-c4a-bg-surface px-2 py-1 font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary disabled:cursor-not-allowed disabled:opacity-40",children:[d.jsx(FS,{size:14}),n("sources.actions.import_dir")]}),d.jsxs("button",{onClick:je,disabled:!y.is_online,title:y.is_online?void 0:n("sources.import.daemon_offline",{name:y.name}),className:"flex items-center gap-1.5 rounded border border-c4a-border-default bg-c4a-bg-surface px-2 py-1 font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary disabled:cursor-not-allowed disabled:opacity-40",children:[d.jsx(ig,{size:14}),n("sources.actions.import_repo")]})]}),Ba&&d.jsx(j4,{value:_,onChange:X})]})]}),ot?d.jsx(z4,{library:y,onNewFolder:()=>ne(!0),...M?{onImportRepo:je,onImportDir:Te}:{},...J?{onUpgrade:()=>ee(!0)}:{}}):d.jsx(R4,{pathLabel:de.map(fe=>fe.label).join(" / "),loading:x,onNavigateUp:pe?q:void 0,children:ie.length===0?Qe?d.jsx(O4,{}):pe?null:d.jsx("p",{className:"py-8 text-center text-xs text-c4a-text-muted",children:n("common.items",{count:0})}):d.jsx("div",{className:"flex flex-col gap-0.5",children:ie.map(fe=>{if(fe.type==="root"){const Je=fe.root,Xn=M,fn=Xn?Je.metadata?.local_path:void 0,Ra=Je.tree.length>0?bg({children:Je.tree}):void 0,dn=Ra?Ra.folders+Ra.sources:0;return d.jsx(xg,{source:{id:Je.id,library_id:Je.library_id,owner_id:Je.owner_id,path:"",kind:Je.kind,source_type:Je.source_type,name:Je.name,content_hash:Je.content_hash,metadata:Je.metadata,index_status:Je.index_status,created_at:Je.created_at,updated_at:Je.updated_at},...typeof fn=="string"?{displayName:fn}:{},...dn>0?{childCount:dn}:{},isDaemonLibrary:M??!1,isRepoRoot:Xn,onClick:()=>N(fe),onRename:ui=>I(Je.id,ui),onDelete:()=>se(fe)},Je.id)}const ze=fe.node,ht=`${fe.root.id}:${ze.path}`,kt=ze.kind==="folder"&&ze.children?ze.children.length:void 0;return d.jsx(xg,{source:{id:fe.root.id,library_id:fe.root.library_id,owner_id:fe.root.owner_id,path:ze.path,kind:ze.kind,source_type:ze.source_type??null,name:ze.name,content_hash:null,metadata:ze.metadata??null,index_status:ze.index_status??"none",created_at:fe.root.created_at,updated_at:fe.root.updated_at},...kt!==void 0?{childCount:kt}:{},isDaemonLibrary:M??!1,onClick:()=>N(fe)},ht)})})}),G&&d.jsx(w4,{onConfirm:ae,onCancel:()=>{ne(!1),ce(null)},error:re}),H&&d.jsx(C4,{onClose:()=>ee(!1)}),P&&d.jsx(Ny,{target:P,onConfirm:be,onCancel:()=>{j(null),Q(null)}})]})}function Cy(){const{t:n}=we(),[i,r]=b.useState(!1),[s,c]=b.useState(null),f=b.useRef(),h=b.useRef(),m=window.location.host,y=`c4a-daemon --server ${m} --allow <dir1> <dir2>`,p=`c4a-daemon --server ${m}`,S=b.useCallback((E,z)=>{navigator.clipboard.writeText(E),c(z),clearTimeout(f.current),f.current=setTimeout(()=>c(null),1500)},[]),x=b.useCallback(()=>{clearTimeout(h.current),r(!0)},[]),_=b.useCallback(()=>{h.current=setTimeout(()=>r(!1),150)},[]);return d.jsxs("span",{className:"relative",onMouseEnter:x,onMouseLeave:_,children:[d.jsx(uf,{size:12,className:"text-c4a-warning"}),i&&d.jsxs("span",{className:"absolute left-full top-1/2 z-10 ml-2 -translate-y-1/2 rounded border border-c4a-border-default bg-c4a-bg-elevated px-2.5 py-2 shadow-lg",onMouseEnter:x,onMouseLeave:_,children:[d.jsx("span",{className:"block whitespace-nowrap font-mono text-xs text-c4a-text-secondary",children:n("sources.import.allowed_dirs_tooltip_restrict")}),d.jsxs("span",{className:"mt-1 flex items-center gap-1.5 whitespace-nowrap",children:[d.jsx("span",{className:"font-mono text-xs text-c4a-accent",children:y}),d.jsx("button",{onClick:()=>S(y,0),className:"shrink-0 rounded p-0.5 text-c4a-accent transition-colors hover:bg-c4a-bg-hover",title:"Copy",children:s===0?d.jsx(to,{size:10}):d.jsx(lg,{size:10})})]}),d.jsx("span",{className:"mt-2 block whitespace-nowrap font-mono text-xs text-c4a-text-secondary",children:n("sources.import.allowed_dirs_tooltip_all")}),d.jsxs("span",{className:"mt-1 flex items-center gap-1.5 whitespace-nowrap",children:[d.jsx("span",{className:"font-mono text-xs text-c4a-accent",children:p}),d.jsx("button",{onClick:()=>S(p,1),className:"shrink-0 rounded p-0.5 text-c4a-accent transition-colors hover:bg-c4a-bg-hover",title:"Copy",children:s===1?d.jsx(to,{size:10}):d.jsx(lg,{size:10})})]})]})]})}function Ry({open:n,onClose:i,rpc:r,onNavigate:s,defaultPath:c}){const{t:f}=we(),[h,m]=b.useState(c??""),[y,p]=b.useState(null),[S,x]=b.useState(!1),_=b.useRef(null);b.useEffect(()=>{c&&!h&&m(c)},[c]);const E=b.useCallback(async()=>{const D=h.trim();if(D){x(!0),p(null);try{(await r("fs/exists",{path:D})).exists?(s(D),m(c??""),p(null),i()):p(f("sources.import.wildcard_path_not_found"))}catch(A){p(A instanceof Error?A.message:String(A))}finally{x(!1)}}},[h,r,f,s,i]),z=b.useCallback(()=>{m(c??""),p(null),i()},[i,c]);return n?d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",children:d.jsxs("div",{className:"w-full max-w-md rounded-lg border border-c4a-border-default bg-c4a-bg-surface p-5 shadow-xl",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h3",{className:"font-mono text-sm font-medium text-c4a-text-primary",children:f("sources.import.wildcard_go_title")}),d.jsx("button",{onClick:z,className:"rounded p-1 text-c4a-text-muted transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-secondary",children:d.jsx(df,{size:14})})]}),d.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[d.jsx("input",{ref:_,type:"text",value:h,onChange:D=>{m(D.target.value),p(null)},onKeyDown:D=>{D.key==="Enter"&&E()},placeholder:f("sources.import.wildcard_path_placeholder"),autoFocus:!0,className:"flex-1 rounded border border-c4a-border-default bg-c4a-bg-base px-3 py-2 font-mono text-xs text-c4a-text-primary outline-none transition-colors focus:border-c4a-accent"}),d.jsxs("button",{onClick:E,disabled:S||!h.trim(),className:"flex shrink-0 items-center gap-1.5 rounded bg-c4a-accent px-3 py-2 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-40",children:[S?d.jsx(Ft,{size:12,className:"animate-spin"}):d.jsx(py,{size:12}),f("sources.import.wildcard_go")]})]}),y&&d.jsx("p",{className:"mt-2 text-xs text-c4a-error",children:y})]})}):null}function D4(n){const i=n.match(/^[\w.-]+@([\w.-]+):([\w./-]+?)(?:\.git)?$/);if(i){const r=i[1],s=i[2];return{slug:s,repoUrl:`https://${r}/${s}`,host:r}}try{const r=new URL(n),s=r.hostname,c=r.pathname.replace(/^\//,"").replace(/\.git$/,"");return c?{slug:c,repoUrl:`https://${s}/${c}`,host:s}:null}catch{return null}}function M4(n,i){return`${n}/tree/${encodeURIComponent(i)}`}function A4(n,i){return`${n}/commit/${i}`}function L4({rpc:n,selectedPath:i,onSelect:r,allowedPaths:s,importedPaths:c}){const{t:f}=we(),h=!!s&&s.length>0,m=h&&s.length===1&&s[0]==="*",[y,p]=b.useState(h),S=!h||m?"/":s?.[0]??"/",[x,_]=b.useState(h?"":S),[E,z]=b.useState([]),[D,A]=b.useState(!1),[W,X]=b.useState(null),[G,ne]=b.useState(null);b.useEffect(()=>{if(!m)return;let ae=!1;return(async()=>{try{const N=await n("fs/homeDir",{});ae||ne(N.home_dir)}catch{}})(),()=>{ae=!0}},[m,n]);const[re,ce]=b.useState(!1),P=b.useCallback(async ae=>{A(!0),X(null);try{const N=await n("fs/listTree",{path:ae,depth:1});z(N.entries||[]),_(ae),p(!1)}catch(N){const q=N instanceof Error?N.message:String(N);X(q)}finally{A(!1)}},[n]);b.useEffect(()=>{h||P(S)},[P,S,h]);const[j,$]=b.useState(null),[Q,H]=b.useState(null),[ee,pe]=b.useState(!1);b.useEffect(()=>{if(!i){H(null),pe(!1);return}H(null),pe(!0);let ae=!1;return(async()=>{try{const N=await n("fs/repoStatus",{path:i});ae||(H({branch:N.branch,hash:N.head_hash,remoteUrl:N.remote_url}),pe(!1))}catch{ae||(H(null),pe(!1))}})(),()=>{ae=!0}},[i,n]);const Z=b.useMemo(()=>Q?.remoteUrl?D4(Q.remoteUrl):null,[Q?.remoteUrl]),ie=b.useMemo(()=>new Set(c??[]),[c]),M=b.useCallback(ae=>{if(ae.type==="directory")if(ae.is_git_repo){if(ie.has(ae.path))return;$(null),r(ae.path,ae.name)}else $(ae.path),P(ae.path)},[r,P,ie]),J=b.useCallback(()=>{if(h&&!m&&s.some(q=>q===x)){p(!0),_(""),z([]),X(null),$(null);return}if(m&&x.split("/").filter(Boolean).length<=1){p(!0),_(""),z([]),X(null),$(null);return}const ae=x.split("/").slice(0,-1).join("/")||"/";$(null),P(ae)},[x,P,h,m,s]),ue=b.useMemo(()=>E.filter(ae=>ae.type==="directory").sort((ae,N)=>ae.is_git_repo&&!N.is_git_repo?-1:!ae.is_git_repo&&N.is_git_repo?1:ae.name.localeCompare(N.name)),[E]),de=b.useMemo(()=>E.filter(ae=>ae.type==="file").sort((ae,N)=>ae.name.localeCompare(N.name)),[E]);return d.jsxs("div",{className:"flex min-h-0 flex-1 flex-col rounded border border-c4a-border-default bg-c4a-bg-surface p-4",children:[d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-1",children:[y?d.jsxs("p",{className:"flex items-center gap-1.5 font-mono text-xs text-c4a-text-muted",children:[d.jsx("span",{children:f("sources.import.allowed_dirs")}),d.jsx(Cy,{})]}):d.jsx("p",{className:"min-w-0 shrink truncate font-mono text-xs text-c4a-text-muted",children:x}),i&&ee?d.jsxs("div",{className:"flex shrink-0 items-center gap-1.5 font-mono text-xs text-c4a-accent",children:[d.jsx(Ft,{size:12,className:"animate-spin"}),d.jsx("span",{children:f("common.loading")})]}):i&&Q?d.jsxs("div",{className:"flex shrink-0 items-center gap-1.5 font-mono text-xs leading-none text-c4a-accent",children:[Z?d.jsxs("a",{href:Z.repoUrl,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 hover:underline",title:Z.repoUrl,children:[d.jsx(sg,{size:12,className:"shrink-0"}),d.jsx("span",{children:Z.slug})]}):d.jsxs(d.Fragment,{children:[d.jsx(sg,{size:12,className:"shrink-0"}),d.jsx("span",{children:i.split("/").pop()||i})]}),d.jsx("span",{className:"text-c4a-text-muted",children:"/"}),Z?d.jsxs("a",{href:M4(Z.repoUrl,Q.branch),target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 hover:underline",children:[d.jsx(rg,{size:10,className:"shrink-0"}),d.jsx("span",{children:Q.branch})]}):d.jsxs("span",{className:"flex items-center gap-1",children:[d.jsx(rg,{size:10,className:"shrink-0"}),d.jsx("span",{children:Q.branch})]}),d.jsx("span",{className:"text-c4a-text-muted",children:"/"}),Z?d.jsx("a",{href:A4(Z.repoUrl,Q.hash),target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:Q.hash.slice(0,7)}):d.jsx("span",{children:Q.hash.slice(0,7)})]}):!i&&m&&y?d.jsx("button",{onClick:()=>ce(!0),className:"flex shrink-0 items-center gap-1.5 rounded border border-c4a-accent/40 bg-c4a-accent/10 px-2.5 py-1 text-xs text-c4a-accent transition-colors hover:bg-c4a-accent/20",children:f("sources.import.wildcard_goto")}):null]}),d.jsx("hr",{className:"my-3 border-c4a-border-subtle"}),y?m?d.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:G&&d.jsxs("button",{onClick:()=>P(G),className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-sm text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:[d.jsx(ga,{size:14,className:"shrink-0"}),d.jsxs("span",{className:"truncate",children:[G,d.jsxs("span",{className:"ml-1.5 text-c4a-text-muted",children:["(",f("sources.import.wildcard_home"),")"]})]}),d.jsx(on,{size:12,className:"shrink-0 text-c4a-text-muted"})]})}):d.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:s.map(ae=>d.jsxs("button",{onClick:()=>P(ae),className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-sm text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:[d.jsx(ga,{size:14,className:"shrink-0"}),d.jsx("span",{className:"truncate",children:ae}),d.jsx(on,{size:12,className:"shrink-0 text-c4a-text-muted"})]},ae))}):W&&!D?d.jsx("p",{className:"py-4 text-xs text-c4a-error",children:W}):d.jsxs("div",{className:"relative mt-3 min-h-[5rem] min-h-0 flex-1 overflow-y-auto",children:[D&&d.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-c4a-bg-surface/60",children:d.jsx(Ft,{size:14,className:"animate-spin text-c4a-text-muted"})}),x!=="/"&&d.jsxs("button",{onClick:J,disabled:D,className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-sm text-c4a-text-secondary hover:bg-c4a-bg-hover disabled:pointer-events-none",children:[d.jsx(ga,{size:14}),d.jsx("span",{children:".."})]}),ue.map(ae=>{const N=ae.is_git_repo&&ie.has(ae.path),q=ae.is_git_repo?ff:ga;return d.jsxs("div",{className:`flex w-full items-center rounded text-left text-sm transition-colors ${N?"cursor-not-allowed opacity-50":i===ae.path?"bg-c4a-accent/10 text-c4a-accent":"text-c4a-text-secondary hover:bg-c4a-accent/10 hover:text-c4a-accent"}`,children:[d.jsxs("button",{onClick:()=>M(ae),disabled:N||D,className:"flex flex-1 items-center gap-2 px-2 py-1.5",children:[d.jsx(q,{size:14,className:"shrink-0"}),d.jsx("span",{className:"flex-1 truncate text-left",children:ae.name}),N&&d.jsx("span",{className:"rounded bg-c4a-bg-active px-1.5 py-0.5 font-mono text-[10px] text-c4a-text-muted",children:f("sources.import.already_imported")})]}),!N&&d.jsx("button",{onClick:I=>{I.stopPropagation(),P(ae.path)},disabled:D,className:"shrink-0 rounded p-1.5 text-c4a-text-muted transition-colors hover:bg-c4a-accent/10 hover:text-c4a-accent disabled:pointer-events-none",title:ae.path,children:d.jsx(on,{size:12})})]},ae.path)}),de.map(ae=>d.jsxs("div",{className:"flex w-full items-center gap-2 px-2 py-1.5 text-sm text-c4a-text-muted",children:[d.jsx(yy,{size:14,className:"shrink-0"}),d.jsx("span",{className:"truncate",children:ae.name})]},ae.path)),E.length===0&&!D&&d.jsx("p",{className:"py-4 text-center text-xs text-c4a-text-muted",children:f("sources.import.no_entries")})]}),j&&!i&&d.jsx("p",{className:"mt-3 text-xs text-c4a-warning",children:f("sources.import.not_git")}),d.jsx(Ry,{open:re,onClose:()=>ce(!1),rpc:n,onNavigate:P,defaultPath:G??void 0})]})}const k4=/\.md$/i,U4=(n,i)=>{const r=n.toLowerCase();try{if(r.endsWith("package.json")){const s=JSON.parse(i);if(typeof s.name=="string"&&s.name.trim())return s.name.trim()}if(r.endsWith("pyproject.toml"))return i.match(/^\s*name\s*=\s*["']([^"']+)["']/m)?.[1]??null;if(r.endsWith("go.mod"))return i.match(/^\s*module\s+([^\s]+)\s*$/m)?.[1]??null;if(r.endsWith("cargo.toml"))return i.match(/^\s*name\s*=\s*["']([^"']+)["']/m)?.[1]??null;if(r.endsWith("pom.xml"))return i.match(/<artifactId>([^<]+)<\/artifactId>/)?.[1]?.trim()??null;if(r.endsWith("build.gradle"))return i.match(/rootProject\.name\s*=\s*["']([^"']+)["']/)?.[1]??null}catch{return null}return null};function H4({rpc:n,repoPath:i,onReady:r,onBusyChange:s}){const{t:c}=we(),[f,h]=b.useState(""),[m,y]=b.useState([]),[p,S]=b.useState(""),[x,_]=b.useState([]),[E,z]=b.useState(!1),[D,A]=b.useState(!0),[W,X]=b.useState(!1),[G,ne]=b.useState([]),[re,ce]=b.useState([]),[,P]=b.useState([]),j=b.useCallback(async(H,ee)=>{X(!0),s?.(!0);try{const pe=await n("fs/repoScan",{path:i,hash:H}),Z=pe.files||[],ie=pe.manifests||[];P(Z);const M=new Map;for(const N of ie)M.set(N.path,N);const J=[];for(const N of ie){const q=N.path.split("/"),I=q.slice(0,-1).join("/")||".",se=q.length===1||N.path==="package.json",be=I==="."?i.split("/").pop()||"root":q[q.length-2]||I,je=U4(N.path,N.content);J.push({name:je||be,path:I,isRoot:se})}const ue=Z.filter(N=>k4.test(N.path)).map(N=>N.path);ce(ue),ne(J);const de=ee?.branch??f,ae=ee?.isDirty??E;r({branch:de,commit:H,isDirty:ae,repoFiles:Z,packages:J,mdFiles:ue,repoFileContents:ie})}catch{}finally{X(!1),s?.(!1)}},[n,i,f,E,r,s]);b.useEffect(()=>{(async()=>{A(!0),s?.(!0);try{const H=await n("fs/repoStatus",{path:i});h(H.branch),y(H.branches||[H.branch]),S(H.head_hash),z(H.is_dirty),_(H.commits||[{hash:H.head_hash,message:"HEAD"}]),await j(H.head_hash,{branch:H.branch,isDirty:H.is_dirty})}catch{}finally{A(!1),s?.(!1)}})()},[i]),b.useEffect(()=>{r({branch:f,commit:p,isDirty:E,packages:G,mdFiles:re,repoFileContents:[]})},[f,p,E]);const $=b.useCallback(async H=>{h(H);try{const ee=await n("fs/repoStatus",{path:i});S(ee.head_hash),await j(ee.head_hash)}catch{}},[i,n,j]),Q=f&&f!=="main"&&f!=="master";return D?d.jsx("div",{className:"flex items-center justify-center py-12",children:d.jsx(Ft,{size:20,className:"animate-spin text-c4a-text-muted"})}):d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"rounded border border-c4a-border-default bg-c4a-bg-surface p-4",children:[d.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[d.jsxs("div",{children:[d.jsx("span",{className:"font-mono text-xs text-c4a-text-muted",children:c("sources.detail.repo")}),d.jsx("p",{className:"mt-0.5 font-mono text-xs text-c4a-text-primary",children:i.split("/").pop()})]}),d.jsxs("div",{children:[d.jsx("span",{className:"font-mono text-xs text-c4a-text-muted",children:c("sources.import.current_path")}),d.jsx("p",{className:"mt-0.5 font-mono text-xs text-c4a-text-primary",children:i})]})]}),d.jsxs("div",{className:"mt-4 grid grid-cols-2 gap-4",children:[d.jsxs("div",{children:[d.jsx("label",{className:"font-mono text-xs text-c4a-text-muted",children:c("sources.import.branch")}),d.jsx("select",{value:f,onChange:H=>$(H.target.value),className:"mt-1 w-full rounded border border-c4a-border-default bg-c4a-bg-base px-2 py-1 font-mono text-xs text-c4a-text-primary outline-none focus:border-c4a-accent",children:m.map(H=>d.jsx("option",{value:H,children:H},H))})]}),d.jsxs("div",{children:[d.jsx("label",{className:"font-mono text-xs text-c4a-text-muted",children:c("sources.import.commit")}),d.jsx("select",{value:p,onChange:H=>{S(H.target.value),j(H.target.value)},className:"mt-1 w-full rounded border border-c4a-border-default bg-c4a-bg-base px-2 py-1 font-mono text-xs text-c4a-text-primary outline-none focus:border-c4a-accent",children:x.map(H=>d.jsxs("option",{value:H.hash,children:[H.hash.slice(0,7)," - ",H.message.slice(0,60)]},H.hash))})]})]}),d.jsxs("div",{className:"mt-3 space-y-1",children:[Q&&d.jsxs("p",{className:"flex items-center gap-1 text-xs text-c4a-info",children:[d.jsx(i2,{size:12}),c("sources.import.branch_warning",{branch:f})]}),E&&d.jsxs("p",{className:"flex items-center gap-1 text-xs text-c4a-warning",children:[d.jsx(uf,{size:12}),c("sources.import.uncommitted_warning")]})]})]}),d.jsx("div",{className:"rounded border border-c4a-border-default bg-c4a-bg-surface p-4",children:W?d.jsxs("div",{className:"flex items-center gap-2 py-4",children:[d.jsx(Ft,{size:14,className:"animate-spin text-c4a-text-muted"}),d.jsx("span",{className:"text-xs text-c4a-text-muted",children:"Analyzing repository..."})]}):d.jsxs(d.Fragment,{children:[d.jsx("p",{className:"font-mono text-xs text-c4a-text-primary",children:G.length>0?c("sources.import.recognized",{packages:G.length,docs:re.length}):c("sources.import.no_packages")}),G.length>0&&d.jsx("div",{className:"mt-3 max-h-60 space-y-1 overflow-y-auto",children:G.map(H=>d.jsxs("div",{className:"flex items-center gap-2 rounded px-2 py-1 text-xs",children:[d.jsx(oo,{size:14,className:"shrink-0 text-c4a-accent"}),d.jsx("span",{className:"text-c4a-text-primary",children:H.name}),d.jsx("span",{className:"text-c4a-text-muted",children:H.path}),H.isRoot&&d.jsx("span",{className:"rounded bg-c4a-bg-active px-1 py-0.5 font-mono text-[10px] text-c4a-text-muted",children:"root"})]},H.path))}),re.length>0&&d.jsx("div",{className:"mt-3 space-y-1",children:re.map(H=>d.jsxs("div",{className:"flex items-center gap-2 rounded px-2 py-1 text-xs",children:[d.jsx(si,{size:14,className:"shrink-0 text-c4a-text-secondary"}),d.jsx("span",{className:"text-c4a-text-primary",children:H})]},H))})]})})]})}function B4({importState:n,libraryName:i,importing:r}){const{t:s}=we();return d.jsxs("div",{className:"rounded border border-c4a-border-default bg-c4a-bg-surface p-6",children:[d.jsx("p",{className:"text-sm text-c4a-text-secondary",children:s("sources.import.confirm_heading",{name:i})}),d.jsxs("div",{className:"mt-4 space-y-2 text-sm",children:[d.jsx(rr,{label:s("sources.detail.repo"),value:n.repoName}),d.jsx(rr,{label:s("sources.import.branch"),value:n.branch}),d.jsx(rr,{label:s("sources.import.commit"),value:n.commit.slice(0,7)}),d.jsx(rr,{label:s("sources.import.packages"),value:String(n.packages.length)}),d.jsx(rr,{label:s("sources.import.documents"),value:String(n.mdFiles.length)})]}),r&&d.jsxs("div",{className:"mt-4 flex items-center justify-center gap-2 rounded bg-c4a-bg-base p-3",children:[d.jsx(Ft,{size:14,className:"animate-spin text-c4a-accent"}),d.jsx("p",{className:"font-mono text-xs text-c4a-accent",children:s("sources.import.importing")})]})]})}function rr({label:n,value:i}){return d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx("span",{className:"w-24 font-mono text-xs text-c4a-text-muted",children:n}),d.jsx("span",{className:"font-mono text-xs text-c4a-text-primary",children:i})]})}function q4(){const{t:n}=we(),i=Kn(),{libId:r}=ro(),c=Lt(ci(_r)).find(j=>j.id===r),f=ho(j=>j.createSource),[h,m]=b.useState(1),[y,p]=b.useState(!1),[S,x]=b.useState(!1),[_,E]=b.useState({repoPath:"",repoName:"",branch:"",branches:[],commit:"",commits:[],isDirty:!1,repoFiles:[],packages:[],mdFiles:[],repoFileContents:[]}),z=c?.is_online??!1,[D,A]=b.useState([]);b.useEffect(()=>{if(!r)return;let j=!1;return(async()=>{try{const $=await qt.get("/sources",{library_id:r,limit:"500"});if(j)return;const Q=$.items.map(H=>{const ee=H.metadata;return typeof ee?.local_path=="string"?ee.local_path:null}).filter(H=>H!==null);A(Q)}catch{}})(),()=>{j=!0}},[r]);const W=b.useMemo(()=>{const j=c?.config;return!j||!Array.isArray(j.allowed_paths)?[]:j.allowed_paths},[c]),X=b.useCallback(async(j,$)=>{if(!r)throw new Error("No library");const Q=await qt.post(`/libraries/${r}/rpc`,{method:j,params:$});if(Q.error){const H=Q.error;throw new Error(H.message??JSON.stringify(Q.error))}return Q.result??Q},[r]),G=b.useCallback((j,$)=>{E(Q=>({...Q,repoPath:j,repoName:$}))},[]),ne=b.useCallback(j=>{E($=>({...$,...j}))},[]),re=b.useCallback(async()=>{if(r){p(!0);try{const j=await f({library_id:r,repo_name:_.repoName,repo_root_path:_.repoPath,repo_branch:_.branch,repo_commit:_.commit,repo_files:_.repoFiles.map(Q=>Q.path),repo_file_contents:_.repoFileContents}),$=Array.isArray(j)?j[0]:j;$?.id?i(`/studio/sources/${r}?rootId=${$.id}`):i(`/studio/sources/${r}`)}catch{p(!1)}}},[r,_,f,i]),ce=b.useMemo(()=>h===1?!!_.repoPath:h===2?!!_.commit:!0,[h,_]),P=b.useMemo(()=>c?[{label:c.id===uo?n("sources.library.default_cloud_name"):c.name,to:`/studio/sources/${c.id}`},{label:n("sources.import.title")}]:[],[c,n]);return c?d.jsxs("div",{className:"flex flex-1 flex-col p-4 md:p-6",children:[d.jsx("div",{className:"shrink-0",children:d.jsx(jr,{segments:P})}),d.jsxs("div",{className:"mt-6 flex shrink-0 items-center gap-2 font-mono text-sm md:gap-3",children:[d.jsx(Yu,{active:h>=1,current:h===1}),d.jsx("span",{className:h===1?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.step.select")}),d.jsx(Sg,{}),d.jsx(Yu,{active:h>=2,current:h===2}),d.jsx("span",{className:h===2?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.step.version")}),d.jsx(Sg,{}),d.jsx(Yu,{active:h>=3,current:h===3}),d.jsx("span",{className:h===3?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.step.confirm")})]}),d.jsx("div",{className:"mt-6 flex min-h-0 flex-1 flex-col",children:z?d.jsxs(d.Fragment,{children:[h===1&&d.jsx(L4,{rpc:X,selectedPath:_.repoPath,onSelect:G,allowedPaths:W,importedPaths:D}),h===2&&d.jsx(H4,{rpc:X,repoPath:_.repoPath,onReady:ne,onBusyChange:x}),h===3&&d.jsx(B4,{importState:_,libraryName:c.name,importing:y})]}):d.jsx(Y4,{libraryName:c.name})}),d.jsx("p",{className:"mt-4 shrink-0 text-right text-xs text-c4a-text-muted",children:n("sources.safety.notice.repo")}),z&&d.jsxs("div",{className:"mt-6 flex shrink-0 justify-end gap-2 border-t border-c4a-border-subtle pt-4",children:[h>1&&d.jsx("button",{onClick:()=>m(j=>j-1),disabled:y||S,className:"rounded border border-c4a-border-default px-4 py-2 font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover disabled:opacity-40",children:n("common.previous")}),h<3?d.jsx("button",{onClick:()=>m(j=>j+1),disabled:!ce||S,className:"rounded bg-c4a-accent px-4 py-2 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-40",children:n("common.next")}):d.jsxs("button",{onClick:re,disabled:y||S,className:"flex items-center gap-1.5 rounded bg-c4a-accent px-4 py-2 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-40",children:[y&&d.jsx(Ft,{size:12,className:"animate-spin"}),n(y?"sources.import.importing":"sources.import.step.confirm")]})]})]}):d.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:d.jsx("p",{className:"text-sm text-c4a-text-muted",children:n("common.loading")})})}function Yu({active:n,current:i}){return d.jsx("span",{className:`inline-block h-2.5 w-2.5 rounded-full border-2 ${i?"border-c4a-accent bg-c4a-accent":n?"border-c4a-accent bg-transparent":"border-c4a-border-default bg-transparent"}`})}function Sg(){return d.jsx("span",{className:"h-px flex-1 bg-c4a-border-default"})}function Y4({libraryName:n}){const{t:i}=we();return d.jsxs("div",{className:"rounded border border-c4a-warning/30 bg-c4a-bg-surface p-6 text-center",children:[d.jsx("p",{className:"text-sm text-c4a-warning",children:i("sources.import.daemon_offline",{name:n})}),d.jsx(Zt,{to:"/studio/sources/add-client",className:"mt-4 inline-block rounded bg-c4a-accent px-3 py-1.5 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover",children:i("sources.import.view_guide")})]})}const _g=(n,i)=>{let r=0,s=0,c=0;const f=[],h=m=>{for(const y of m)if(y.type==="directory")s++,y.is_git_repo&&c++,y.children&&h(y.children);else if(r++,/\.md$/i.test(y.name)){const p=y.path.startsWith(i)?y.path.slice(i.length).replace(/^\//,""):y.name;f.push(p)}};return h(n),{files:r,dirs:s,gitRepos:c,mdFiles:f}};function V4({rpc:n,selectedPath:i,onSelect:r,allowedPaths:s,importedPaths:c}){const{t:f}=we(),h=!!s&&s.length>0,m=h&&s.length===1&&s[0]==="*",[y,p]=b.useState(h),S=!h||m?"/":s?.[0]??"/",[x,_]=b.useState(h?"":S),[E,z]=b.useState([]),[D,A]=b.useState(!1),[W,X]=b.useState(null),G=b.useMemo(()=>new Set(c??[]),[c]),[ne,re]=b.useState(null);b.useEffect(()=>{if(!m)return;let Z=!1;return(async()=>{try{const ie=await n("fs/homeDir",{});Z||re(ie.home_dir)}catch{}})(),()=>{Z=!0}},[m,n]);const[ce,P]=b.useState(!1),j=b.useCallback(async Z=>{A(!0),X(null);try{const ie=await n("fs/listTree",{path:Z,depth:1});z(ie.entries||[]),_(Z),p(!1)}catch(ie){const M=ie instanceof Error?ie.message:String(ie);X(M)}finally{A(!1)}},[n]);b.useEffect(()=>{h||j(S)},[j,S,h]);const $=b.useCallback(Z=>{if(Z.type!=="directory"||G.has(Z.path))return;const ie=_g(Z.children||[],Z.path);r(Z.path,Z.name,ie),j(Z.path)},[r,j,G]),Q=b.useCallback(()=>{if(h&&!m&&s.some(M=>M===x)){p(!0),_(""),z([]),X(null);return}if(m&&x.split("/").filter(Boolean).length<=1){p(!0),_(""),z([]),X(null);return}const Z=x.split("/").slice(0,-1).join("/")||"/";j(Z)},[x,j,h,m,s]);b.useEffect(()=>{if(x&&!y&&E.length>=0&&!D){const Z=x.split("/").pop()||x,ie=_g(E,x);r(x,Z,ie)}},[x,y,E,D]);const H=b.useMemo(()=>i?i.split("/").pop()||i:"",[i]),ee=b.useMemo(()=>E.filter(Z=>Z.type==="directory").sort((Z,ie)=>Z.is_git_repo&&!ie.is_git_repo?-1:!Z.is_git_repo&&ie.is_git_repo?1:Z.name.localeCompare(ie.name)),[E]),pe=b.useMemo(()=>E.filter(Z=>Z.type==="file").sort((Z,ie)=>Z.name.localeCompare(ie.name)),[E]);return d.jsxs("div",{className:"flex min-h-0 flex-1 flex-col rounded border border-c4a-border-default bg-c4a-bg-surface p-4",children:[d.jsxs("div",{className:"flex items-center justify-between gap-4",children:[y?d.jsxs("p",{className:"flex items-center gap-1.5 font-mono text-xs text-c4a-text-muted",children:[d.jsx("span",{children:f("sources.import.allowed_dirs")}),d.jsx(Cy,{})]}):d.jsx("p",{className:"min-w-0 truncate font-mono text-xs text-c4a-text-muted",children:x}),i?d.jsxs("p",{className:"flex shrink-0 items-center gap-2 font-mono text-xs text-c4a-accent",children:[d.jsx(ga,{size:12}),d.jsx("span",{children:H})]}):m&&y?d.jsx("button",{onClick:()=>P(!0),className:"flex shrink-0 items-center gap-1.5 rounded border border-c4a-accent/40 bg-c4a-accent/10 px-2.5 py-1 text-xs text-c4a-accent transition-colors hover:bg-c4a-accent/20",children:f("sources.import.wildcard_goto")}):null]}),d.jsx("hr",{className:"my-3 border-c4a-border-subtle"}),y?m?d.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:ne&&d.jsxs("button",{onClick:()=>j(ne),className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-sm text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:[d.jsx(ga,{size:14,className:"shrink-0"}),d.jsxs("span",{className:"truncate",children:[ne,d.jsxs("span",{className:"ml-1.5 text-c4a-text-muted",children:["(",f("sources.import.wildcard_home"),")"]})]}),d.jsx(on,{size:12,className:"shrink-0 text-c4a-text-muted"})]})}):d.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:s.map(Z=>d.jsxs("button",{onClick:()=>j(Z),className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-sm text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:[d.jsx(ga,{size:14,className:"shrink-0"}),d.jsx("span",{className:"truncate",children:Z}),d.jsx(on,{size:12,className:"shrink-0 text-c4a-text-muted"})]},Z))}):W&&!D?d.jsx("p",{className:"py-4 text-xs text-c4a-error",children:W}):d.jsxs("div",{className:"relative mt-3 min-h-[5rem] min-h-0 flex-1 overflow-y-auto",children:[D&&d.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-c4a-bg-surface/60",children:d.jsx(Ft,{size:14,className:"animate-spin text-c4a-text-muted"})}),x!=="/"&&d.jsxs("button",{onClick:Q,disabled:D,className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-sm text-c4a-text-secondary hover:bg-c4a-bg-hover disabled:pointer-events-none",children:[d.jsx(ga,{size:14}),d.jsx("span",{children:".."})]}),ee.map(Z=>{const ie=G.has(Z.path),M=Z.is_git_repo?ff:ga;return d.jsxs("button",{onClick:()=>$(Z),disabled:ie||D,className:`flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-sm transition-colors ${ie?"cursor-not-allowed opacity-50":i===Z.path?"bg-c4a-accent/10 text-c4a-accent":"text-c4a-text-secondary hover:bg-c4a-bg-hover"}`,children:[d.jsx(M,{size:14,className:"shrink-0"}),d.jsx("span",{className:"flex-1 truncate",children:Z.name}),ie&&d.jsx("span",{className:"rounded bg-c4a-bg-active px-1.5 py-0.5 font-mono text-[10px] text-c4a-text-muted",children:f("sources.import.already_imported")}),d.jsx(on,{size:12,className:"shrink-0 text-c4a-text-muted"})]},Z.path)}),pe.map(Z=>d.jsxs("div",{className:"flex w-full items-center gap-2 px-2 py-1.5 text-sm text-c4a-text-muted",children:[d.jsx(yy,{size:14,className:"shrink-0"}),d.jsx("span",{className:"truncate",children:Z.name})]},Z.path)),E.length===0&&!D&&d.jsx("p",{className:"py-4 text-center text-xs text-c4a-text-muted",children:f("sources.import.no_entries")})]}),d.jsx(Ry,{open:ce,onClose:()=>P(!1),rpc:n,onNavigate:j,defaultPath:ne??void 0})]})}const G4=new Set(["package.json","pyproject.toml","setup.py","go.mod","cargo.toml","pom.xml","build.gradle"]),K4=n=>{let i=0,r=0,s=0,c=0,f=0;const h=new Set;for(const m of n)if(m.type==="directory")r++,m.is_git_repo&&f++;else{i++,m.path.toLowerCase().endsWith(".md")&&c++;const p=m.path.split("/").pop();if(p&&G4.has(p.toLowerCase())){const S=m.path.split("/").slice(0,-1).join("/");n.some(_=>_.type==="directory"&&_.is_git_repo&&(S===_.path||S.startsWith(`${_.path}/`)))||h.add(S)}}return s=h.size,{totalFiles:i,totalDirs:r,codePackages:s,docFiles:c,gitRepos:f}};function $4({dirPath:n,rpc:i,importing:r,onScanComplete:s,onBusyChange:c}){const{t:f}=we(),[h,m]=b.useState(!1),[y,p]=b.useState(null),[S,x]=b.useState(null),_=b.useCallback(async()=>{m(!0),c?.(!0),p(null),x(null);try{const E=await i("fs/dirScan",{path:n}),z=E.entries||[],D=E.manifests||[],A=K4(z);x(A),s(z,A,D)}catch(E){const z=E instanceof Error?E.message:String(E);p(z)}finally{m(!1),c?.(!1)}},[n,i,s,c]);return b.useEffect(()=>{_()},[_]),d.jsxs("div",{className:"rounded border border-c4a-border-default bg-c4a-bg-surface p-6",children:[d.jsx("p",{className:"font-mono text-xs text-c4a-text-muted",children:n}),d.jsx("div",{className:"mt-3 border-t border-c4a-border-subtle"}),h&&d.jsxs("div",{className:"mt-6 flex items-center justify-center gap-2 rounded bg-c4a-bg-base p-4",children:[d.jsx(Ft,{size:14,className:"animate-spin text-c4a-accent"}),d.jsx("p",{className:"font-mono text-xs text-c4a-accent",children:f("sources.import.dir_scanning")})]}),y&&d.jsxs("div",{className:"mt-6",children:[d.jsxs("p",{className:"flex items-start gap-2 text-xs text-c4a-error",children:[d.jsx(uf,{size:14,className:"mt-0.5 shrink-0"}),f("sources.import.dir_scan_error")]}),d.jsx("p",{className:"mt-1 text-xs text-c4a-text-muted",children:y}),d.jsxs("button",{onClick:_,className:"mt-3 flex items-center gap-1.5 rounded border border-c4a-border-default px-3 py-1.5 font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:[d.jsx(x2,{size:12}),f("sources.import.dir_scan_retry")]})]}),S&&!h&&!y&&d.jsxs("div",{className:"mt-6 space-y-3",children:[d.jsxs("p",{className:"font-mono text-sm uppercase text-c4a-accent",children:[f("sources.import.dir_scan_complete"),"!"]}),d.jsxs("div",{className:"grid grid-cols-2 gap-3 md:grid-cols-4",children:[d.jsx(Xs,{icon:d.jsx(oo,{size:14}),label:f("sources.import.dir_code_packages"),value:S.codePackages}),d.jsx(Xs,{icon:d.jsx(si,{size:14}),label:f("sources.import.dir_doc_files"),value:S.docFiles}),d.jsx(Xs,{icon:d.jsx(ga,{size:14}),label:f("sources.import.dir_total_dirs"),value:S.totalDirs}),d.jsx(Xs,{icon:d.jsx(si,{size:14}),label:f("sources.import.dir_total_files"),value:S.totalFiles})]}),S.gitRepos>0&&d.jsxs("p",{className:"flex items-start gap-2 text-xs text-c4a-warning",children:[d.jsx(ff,{size:14,className:"mt-0.5 shrink-0"}),f("sources.import.dir_git_skip_hint",{count:S.gitRepos})]})]}),r&&d.jsxs("div",{className:"mt-4 flex items-center justify-center gap-2 rounded bg-c4a-bg-base p-3",children:[d.jsx(Ft,{size:14,className:"animate-spin text-c4a-accent"}),d.jsx("p",{className:"font-mono text-xs text-c4a-accent",children:f("sources.import.importing")})]})]})}function Xs({icon:n,label:i,value:r}){return d.jsxs("div",{className:"rounded border border-c4a-border-subtle bg-c4a-bg-base p-3",children:[d.jsxs("div",{className:"flex items-center gap-1.5 text-c4a-text-muted",children:[n,d.jsx("span",{className:"font-mono text-[10px] uppercase",children:i})]}),d.jsx("p",{className:"mt-1 font-mono text-lg font-bold text-c4a-text-primary",children:r})]})}function X4(){const{t:n}=we(),i=Kn(),{libId:r}=ro(),c=Lt(ci(_r)).find(j=>j.id===r),f=ho(j=>j.createSource),[h,m]=b.useState(1),[y,p]=b.useState(!1),[S,x]=b.useState(!1),[_,E]=b.useState({dirPath:"",dirName:"",fileCount:0,subDirCount:0,gitRepoCount:0,mdFiles:[],scanEntries:[],scanStats:null,manifests:[]}),z=c?.is_online??!1,[D,A]=b.useState([]);b.useEffect(()=>{if(!r)return;let j=!1;return(async()=>{try{const $=await qt.get("/sources",{library_id:r,limit:"500"});if(j)return;const Q=$.items.map(H=>{const ee=H.metadata;return typeof ee?.local_path=="string"?ee.local_path:null}).filter(H=>H!==null);A(Q)}catch{}})(),()=>{j=!0}},[r]);const W=b.useMemo(()=>{const j=c?.config;return!j||!Array.isArray(j.allowed_paths)?[]:j.allowed_paths},[c]),X=b.useCallback(async(j,$)=>{if(!r)throw new Error("No library");const Q=await qt.post(`/libraries/${r}/rpc`,{method:j,params:$});if(Q.error){const H=Q.error;throw new Error(H.message??JSON.stringify(Q.error))}return Q.result??Q},[r]),G=b.useCallback((j,$,Q)=>{E(H=>({...H,dirPath:j,dirName:$,fileCount:Q.files,subDirCount:Q.dirs,gitRepoCount:Q.gitRepos,mdFiles:Q.mdFiles}))},[]),ne=b.useCallback((j,$,Q)=>{E(H=>({...H,scanEntries:j,scanStats:$,manifests:Q}))},[]),re=b.useCallback(async()=>{if(r){p(!0);try{const j=await f({library_id:r,dir_files:_.scanEntries,dir_name:_.dirName,dir_path:_.dirPath,dir_file_contents:_.manifests}),$=Array.isArray(j)?j[0]:j;$?.id?i(`/studio/sources/${r}?rootId=${$.id}`):i(`/studio/sources/${r}`)}catch{p(!1)}}},[r,_,f,i]),ce=b.useMemo(()=>h===1?!!_.dirPath:h===2?_.scanEntries.length>0:!0,[h,_]),P=b.useMemo(()=>c?[{label:c.id===uo?n("sources.library.default_cloud_name"):c.name,to:`/studio/sources/${c.id}`},{label:n("sources.import.dir_title")}]:[],[c,n]);return c?d.jsxs("div",{className:"flex flex-1 flex-col p-4 md:p-6",children:[d.jsx("div",{className:"shrink-0",children:d.jsx(jr,{segments:P})}),d.jsxs("div",{className:"mt-6 flex shrink-0 items-center gap-2 font-mono text-sm md:gap-3",children:[d.jsx(jg,{active:h>=1,current:h===1}),d.jsx("span",{className:h===1?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.dir_step.select")}),d.jsx(Q4,{}),d.jsx(jg,{active:h>=2,current:h===2}),d.jsx("span",{className:h===2?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.dir_step.confirm")})]}),d.jsx("div",{className:"mt-6 flex min-h-0 flex-1 flex-col",children:z?d.jsxs(d.Fragment,{children:[h===1&&d.jsx(V4,{rpc:X,selectedPath:_.dirPath,onSelect:G,allowedPaths:W,importedPaths:D}),h===2&&d.jsx($4,{dirPath:_.dirPath,rpc:X,importing:y,onScanComplete:ne,onBusyChange:x})]}):d.jsx(Z4,{libraryName:c.name})}),d.jsx("p",{className:"mt-4 shrink-0 text-right text-xs text-c4a-text-muted",children:n("sources.safety.notice.dir")}),z&&d.jsxs("div",{className:"mt-6 flex shrink-0 justify-end gap-2 border-t border-c4a-border-subtle pt-4",children:[h>1&&d.jsx("button",{onClick:()=>m(j=>j-1),disabled:y||S,className:"rounded border border-c4a-border-default px-4 py-2 font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover disabled:opacity-40",children:n("common.previous")}),h<2?d.jsx("button",{onClick:()=>m(j=>j+1),disabled:!ce||S,className:"rounded bg-c4a-accent px-4 py-2 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-40",children:n("common.next")}):d.jsxs("button",{onClick:re,disabled:y||S||!ce,className:"flex items-center gap-1.5 rounded bg-c4a-accent px-4 py-2 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-40",children:[y&&d.jsx(Ft,{size:12,className:"animate-spin"}),n(y?"sources.import.importing":"sources.import.dir_step.confirm")]})]})]}):d.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:d.jsx("p",{className:"text-sm text-c4a-text-muted",children:n("common.loading")})})}function jg({active:n,current:i}){return d.jsx("span",{className:`inline-block h-2.5 w-2.5 rounded-full border-2 ${i?"border-c4a-accent bg-c4a-accent":n?"border-c4a-accent bg-transparent":"border-c4a-border-default bg-transparent"}`})}function Q4(){return d.jsx("span",{className:"h-px flex-1 bg-c4a-border-default"})}function Z4({libraryName:n}){const{t:i}=we();return d.jsxs("div",{className:"rounded border border-c4a-warning/30 bg-c4a-bg-surface p-6 text-center",children:[d.jsx("p",{className:"text-sm text-c4a-warning",children:i("sources.import.daemon_offline",{name:n})}),d.jsx(Zt,{to:"/studio/sources/add-client",className:"mt-4 inline-block rounded bg-c4a-accent px-3 py-1.5 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover",children:i("sources.import.view_guide")})]})}function F4(){const{t:n}=we(),i=Kn(),r=Lt(_=>_.createLibrary),[s,c]=b.useState("waiting"),[f,h]=b.useState(null),[m,y]=b.useState(""),[p,S]=b.useState(!1);b.useEffect(()=>Ha.on("ws:daemon:connected",E=>{const z=E;h(z),y(z.machine_id),c(z.needs_registration?"new_client":"reconnected")}),[]);const x=b.useCallback(async()=>{if(f){S(!0);try{const _=await r({type:"daemon",name:m||f.machine_id,config:{machine_id:f.machine_id,os:f.os||"",daemon_version:f.daemon_version||""}});i(`/studio/sources/${_.id}`)}catch{S(!1)}}},[f,m,r,i]);return d.jsxs("div",{className:"flex flex-1 flex-col p-4 md:p-6",children:[d.jsx(jr,{segments:[{label:n("sources.add_client.title")}]}),d.jsx("p",{className:"mt-4 text-sm text-c4a-text-secondary",children:n("sources.add_client.description")}),d.jsx("div",{className:"mt-6 rounded border border-c4a-border-default bg-c4a-bg-surface p-5",children:d.jsxs("ol",{className:"space-y-4 text-sm text-c4a-text-secondary",children:[d.jsxs("li",{children:[d.jsxs("span",{className:"font-mono text-xs font-bold text-c4a-text-primary",children:["1. ",n("sources.add_client.step1")]}),d.jsx("pre",{className:"mt-1 rounded bg-c4a-bg-base px-3 py-2 font-mono text-xs text-c4a-accent",children:"npm install -g @c4a/daemon"})]}),d.jsxs("li",{children:[d.jsxs("span",{className:"font-mono text-xs font-bold text-c4a-text-primary",children:["2. ",n("sources.add_client.step2")]}),d.jsx("pre",{className:"mt-1 rounded bg-c4a-bg-base px-3 py-2 font-mono text-xs text-c4a-accent",children:`c4a-daemon --server ${window.location.host} --allow ./`})]}),d.jsxs("li",{children:[d.jsxs("span",{className:"font-mono text-xs font-bold text-c4a-text-primary",children:["3. ",n("sources.add_client.step3")]}),d.jsx("p",{className:"mt-1 text-xs text-c4a-text-muted",children:n("sources.add_client.step3_desc")})]})]})}),d.jsxs("div",{className:"mt-6 rounded border border-c4a-border-default bg-c4a-bg-surface p-5",children:[s==="waiting"&&d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(Ft,{size:16,className:"animate-spin text-c4a-warning"}),d.jsx("span",{className:"text-sm text-c4a-warning",children:n("sources.add_client.waiting")})]}),s==="new_client"&&f&&d.jsxs("div",{className:"space-y-4",children:[d.jsx("h3",{className:"font-mono text-sm font-bold text-c4a-text-primary",children:n("sources.add_client.detected")}),d.jsxs("div",{className:"space-y-2 text-sm",children:[d.jsx(Vu,{label:n("sources.add_client.machine_name"),value:f.machine_id}),f.os&&d.jsx(Vu,{label:n("sources.add_client.os"),value:f.os}),f.daemon_version&&d.jsx(Vu,{label:n("sources.add_client.daemon_version"),value:f.daemon_version})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"w-32 font-mono text-xs text-c4a-text-muted",children:n("sources.add_client.client_name")}),d.jsx("input",{value:m,onChange:_=>y(_.target.value),className:"min-w-0 flex-1 rounded border border-c4a-border-default bg-c4a-bg-base px-2 py-1 font-mono text-xs text-c4a-text-primary outline-none focus:border-c4a-accent"})]}),d.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[d.jsx("button",{onClick:()=>i("/studio/sources"),className:"rounded border border-c4a-border-default px-3 py-1.5 font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:n("common.cancel")}),d.jsxs("button",{onClick:x,disabled:p||!m.trim(),className:"flex items-center gap-1.5 rounded bg-c4a-accent px-3 py-1.5 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-50",children:[p&&d.jsx(Ft,{size:12,className:"animate-spin"}),n("sources.add_client.confirm")]})]})]}),s==="reconnected"&&f&&d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(to,{size:16,className:"text-c4a-success"}),d.jsx("span",{className:"text-sm text-c4a-text-primary",children:n("sources.add_client.reconnected",{name:f.machine_id})})]}),f.lib_id&&d.jsx(Zt,{to:`/studio/sources/${f.lib_id}`,className:"inline-block rounded bg-c4a-accent px-3 py-1.5 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover",children:n("sources.add_client.go_to",{name:f.machine_id})})]})]})]})}function Vu({label:n,value:i}){return d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"w-32 font-mono text-xs text-c4a-text-muted",children:n}),d.jsx("span",{className:"font-mono text-xs text-c4a-text-primary",children:i})]})}function J4(){const{t:n}=we(),{sourceUuid:i}=ro(),[r]=hy(),s=r.get("path")||"",{currentRoot:c,loading:f,fetchRootSource:h}=ho(),m=Lt(ci(_r)),[y,p]=b.useState("original");b.useEffect(()=>{i&&h(i)},[i,h]);const S=b.useMemo(()=>!c||!s?null:fo(c.tree,s),[c,s]),x=m.find(G=>G.id===c?.library_id),_=S?.metadata,E=_?Object.fromEntries(Object.entries(_).map(([G,ne])=>[G,String(ne??"")])):null,z=S?.source_type==="code",D=S?.name??c?.name??"",A=S?.source_type??null,W=b.useMemo(()=>{if(!c||!x)return[];const G=[{label:x.id===uo?n("sources.library.default_cloud_name"):x.name,to:`/studio/sources/${x.id}`},{label:c.name,to:`/studio/sources/${x.id}?rootId=${c.id}`}];if(s){const ne=wy(c.tree,s);for(let re=0;re<ne.length-1;re++){const ce=ne[re];G.push({label:ce.name,to:`/studio/sources/${x.id}?rootId=${c.id}&path=${encodeURIComponent(ce.path)}`})}ne.length>0&&G.push({label:ne[ne.length-1].name})}return G},[c,x,s,n]),X=[{key:"original",label:n(z?"sources.detail.tab.overview":"sources.detail.tab.original")},{key:"digest",label:n("sources.detail.tab.digest")},{key:"modeling",label:n("sources.detail.tab.modeling")}];return f||!c||!S?d.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:d.jsx("p",{className:"text-sm text-c4a-text-muted",children:n("common.loading")})}):d.jsxs("div",{className:"flex flex-1 flex-col p-4 md:p-6",children:[d.jsx(jr,{segments:W}),d.jsxs("div",{className:"mt-4 flex items-center gap-2",children:[z?d.jsx(oo,{size:20,className:"text-c4a-accent"}):d.jsx(si,{size:20,className:"text-c4a-text-secondary"}),d.jsx("h1",{className:"font-mono text-xl font-bold text-c4a-text-primary",children:D})]}),d.jsxs("div",{className:"mt-2 flex flex-wrap gap-4 text-xs text-c4a-text-muted",children:[d.jsxs("span",{children:[n("sources.detail.type"),":"," ",d.jsx("span",{className:"text-c4a-text-secondary",children:n(A==="code"?"sources.type.code":"sources.type.doc")})]}),z&&E?.relative_path&&d.jsxs("span",{children:[n("sources.detail.path"),":"," ",d.jsx("span",{className:"font-mono text-c4a-text-secondary",children:E.relative_path})]}),!z&&d.jsxs("span",{children:[n("sources.detail.origin"),":"," ",d.jsx("span",{className:"text-c4a-text-secondary",children:x?.type==="daemon"?n("sources.detail.origin.local"):n("sources.detail.origin.upload")})]}),d.jsxs("span",{children:[n("sources.detail.status"),":"," ",d.jsx("span",{className:"text-c4a-text-secondary",children:n(`sources.status.${S.index_status??"none"}`)})]})]}),z&&E&&d.jsx("div",{className:"mt-4 rounded border border-c4a-border-subtle bg-c4a-bg-surface p-4",children:d.jsxs("div",{className:"grid grid-cols-2 gap-x-8 gap-y-2 text-xs md:grid-cols-4",children:[E.repo_name&&d.jsx(Qs,{label:n("sources.detail.repo"),value:E.repo_name}),E.pinned_branch&&d.jsx(Qs,{label:n("sources.detail.branch"),value:E.pinned_branch}),E.pinned_hash&&d.jsx(Qs,{label:n("sources.detail.commit"),value:E.pinned_hash.slice(0,7)}),E.tech_stack&&d.jsx(Qs,{label:n("sources.detail.tech_stack"),value:E.tech_stack})]})}),d.jsx("div",{className:"mt-6 flex border-b border-c4a-border-subtle",children:X.map(G=>d.jsx("button",{onClick:()=>p(G.key),className:`border-b-2 px-4 py-2 font-mono text-xs uppercase transition-colors ${y===G.key?"border-c4a-accent text-c4a-accent":"border-transparent text-c4a-text-muted hover:text-c4a-text-secondary"}`,children:G.label},G.key))}),d.jsxs("div",{className:"mt-4 flex-1",children:[y==="original"&&d.jsx(W4,{node:S,isCode:z}),y==="digest"&&d.jsx(Ng,{message:n("sources.detail.digest_placeholder")}),y==="modeling"&&d.jsx(Ng,{message:n("sources.detail.modeling_placeholder")})]})]})}function Qs({label:n,value:i}){return d.jsxs("div",{children:[d.jsx("span",{className:"text-c4a-text-muted",children:n}),d.jsx("p",{className:"mt-0.5 font-mono text-c4a-text-primary",children:i})]})}function W4({node:n,isCode:i}){const{t:r}=we(),s=n.metadata;return i?d.jsxs("div",{className:"space-y-4 text-sm text-c4a-text-secondary",children:[!!s?.description&&d.jsx("p",{children:String(s.description)}),!!s?.dependencies&&d.jsxs("div",{children:[d.jsx("h4",{className:"font-mono text-xs font-bold uppercase text-c4a-text-primary",children:r("sources.detail.dependencies")}),d.jsx("div",{className:"mt-2 rounded bg-c4a-bg-surface p-3 font-mono text-xs",children:Object.entries(s.dependencies).map(([c,f])=>d.jsxs("div",{className:"flex justify-between py-0.5",children:[d.jsx("span",{className:"text-c4a-text-primary",children:c}),d.jsx("span",{className:"text-c4a-text-muted",children:f})]},c))})]}),!s?.description&&!s?.dependencies&&d.jsx("p",{className:"text-c4a-text-muted",children:r("sources.detail.original_code_placeholder")})]}):d.jsx("div",{className:"prose prose-invert max-w-none text-sm text-c4a-text-secondary",children:d.jsx("p",{className:"text-c4a-text-muted",children:r("sources.detail.original_doc_placeholder")})})}function Ng({message:n}){return d.jsx("div",{className:"flex items-center justify-center rounded border border-dashed border-c4a-border-subtle p-12",children:d.jsx("p",{className:"text-center text-sm text-c4a-text-muted",children:n})})}const P4="lib_cloud_default",I4=dS([{element:d.jsx(t4,{}),children:[{path:"/",element:d.jsx(s4,{})},{path:"/login",element:d.jsx(o4,{})},{path:"/docs",element:d.jsx(c4,{})}]},{path:"/studio",element:d.jsx(r4,{}),children:[{index:!0,element:d.jsx(tg,{to:"/studio/sources",replace:!0})},{path:"sources",element:d.jsx(tg,{to:`/studio/sources/${P4}`,replace:!0})},{path:"sources/add-client",element:d.jsx(F4,{})},{path:"sources/import/:libId",element:d.jsx(q4,{})},{path:"sources/import-dir/:libId",element:d.jsx(X4,{})},{path:"sources/:libId",element:d.jsx(T4,{})},{path:"source/:sourceUuid",element:d.jsx(J4,{})},{path:"modeling",element:d.jsx(f4,{})},{path:"modeling/code/setup",element:d.jsx(y4,{})},{path:"modeling/code/compile",element:d.jsx(x4,{})},{path:"modeling/code/review",element:d.jsx(v4,{})},{path:"modeling/code/result",element:d.jsx(b4,{})},{path:"brain",element:d.jsx(d4,{})},{path:"discovery",element:d.jsx(h4,{})},{path:"sharing",element:d.jsx(m4,{})},{path:"collaboration",element:d.jsx(p4,{})},{path:"settings",element:d.jsx(g4,{})}]},{path:"*",element:d.jsx(u4,{})}]);function e_(){return b.useEffect(()=>{const i=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`;return Ha.connect(i),()=>{Ha.disconnect()}},[]),d.jsx(H1,{router:I4})}P0.createRoot(document.getElementById("root")).render(d.jsx(b.StrictMode,{children:d.jsx(e_,{})}));
|