@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 Yv(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 d=Object.getOwnPropertyDescriptor(s,c);d&&Object.defineProperty(n,c,d.get?d:{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 d of c)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&s(h)}).observe(document,{childList:!0,subtree:!0});function r(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function s(c){if(c.ep)return;c.ep=!0;const d=r(c);fetch(c.href,d)}})();function Vv(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var wu={exports:{}},nr={};var tp;function Gv(){if(tp)return nr;tp=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(s,c,d){var h=null;if(d!==void 0&&(h=""+d),c.key!==void 0&&(h=""+c.key),"key"in c){d={};for(var m in c)m!=="key"&&(d[m]=c[m])}else d=c;return c=d.ref,{$$typeof:n,type:s,key:h,ref:c!==void 0?c:null,props:d}}return nr.Fragment=i,nr.jsx=r,nr.jsxs=r,nr}var ap;function $v(){return ap||(ap=1,wu.exports=Gv()),wu.exports}var f=$v();const Re=n=>typeof n=="string",lr=()=>{let n,i;const r=new Promise((s,c)=>{n=s,i=c});return r.resolve=n,r.reject=i,r},np=n=>n==null?"":""+n,Kv=(n,i,r)=>{n.forEach(s=>{i[s]&&(r[s]=i[s])})},Xv=/###/g,lp=n=>n&&n.indexOf("###")>-1?n.replace(Xv,"."):n,ip=n=>!n||Re(n),fr=(n,i,r)=>{const s=Re(i)?i.split("."):i;let c=0;for(;c<s.length-1;){if(ip(n))return{};const d=lp(s[c]);!n[d]&&r&&(n[d]=new r),Object.prototype.hasOwnProperty.call(n,d)?n=n[d]:n={},++c}return ip(n)?{}:{obj:n,k:lp(s[c])}},rp=(n,i,r)=>{const{obj:s,k:c}=fr(n,i,Object);if(s!==void 0||i.length===1){s[c]=r;return}let d=i[i.length-1],h=i.slice(0,i.length-1),m=fr(n,h,Object);for(;m.obj===void 0&&h.length;)d=`${h[h.length-1]}.${d}`,h=h.slice(0,h.length-1),m=fr(n,h,Object),m?.obj&&typeof m.obj[`${m.k}.${d}`]<"u"&&(m.obj=void 0);m.obj[`${m.k}.${d}`]=r},Qv=(n,i,r,s)=>{const{obj:c,k:d}=fr(n,i,Object);c[d]=c[d]||[],c[d].push(r)},eo=(n,i)=>{const{obj:r,k:s}=fr(n,i);if(r&&Object.prototype.hasOwnProperty.call(r,s))return r[s]},Zv=(n,i,r)=>{const s=eo(n,r);return s!==void 0?s:eo(i,r)},zg=(n,i,r)=>{for(const s in i)s!=="__proto__"&&s!=="constructor"&&(s in n?Re(n[s])||n[s]instanceof String||Re(i[s])||i[s]instanceof String?r&&(n[s]=i[s]):zg(n[s],i[s],r):n[s]=i[s]);return n},pl=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Fv={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Jv=n=>Re(n)?n.replace(/[&<>"'\/]/g,i=>Fv[i]):n;class Wv{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 Pv=[" ",",","?","!",";"],Iv=new Wv(20),e0=(n,i,r)=>{i=i||"",r=r||"";const s=Pv.filter(h=>i.indexOf(h)<0&&r.indexOf(h)<0);if(s.length===0)return!0;const c=Iv.getRegExp(`(${s.map(h=>h==="?"?"\\?":h).join("|")})`);let d=!c.test(n);if(!d){const h=n.indexOf(r);h>0&&!c.test(n.substring(0,h))&&(d=!0)}return d},Xu=(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 d=0;d<s.length;){if(!c||typeof c!="object")return;let h,m="";for(let y=d;y<s.length;++y)if(y!==d&&(m+=r),m+=s[y],h=c[m],h!==void 0){if(["string","number","boolean"].indexOf(typeof h)>-1&&y<s.length-1)continue;d+=y-d+1;break}c=h}return c},pr=n=>n?.replace("_","-"),t0={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 to{constructor(i,r={}){this.init(i,r)}init(i,r={}){this.prefix=r.prefix||"i18next:",this.logger=i||t0,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:(Re(i[0])&&(i[0]=`${s}${this.prefix} ${i[0]}`),this.logger[r](i))}create(i){return new to(this.logger,{prefix:`${this.prefix}:${i}:`,...this.options})}clone(i){return i=i||this.options,i.prefix=i.prefix||this.prefix,new to(this.logger,i)}}var Va=new to;class io{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,d])=>{for(let h=0;h<d;h++)c(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([c,d])=>{for(let h=0;h<d;h++)c.apply(c,[i,...r])})}}class sp extends io{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 d=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):Re(s)&&d?m.push(...s.split(d)):m.push(s)));const y=eo(this.data,m);return!y&&!r&&!s&&i.indexOf(".")>-1&&(i=m[0],r=m[1],s=m.slice(2).join(".")),y||!h||!Re(s)?y:Xu(this.data?.[i]?.[r],s,d)}addResource(i,r,s,c,d={silent:!1}){const h=d.keySeparator!==void 0?d.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),rp(this.data,m,c),d.silent||this.emit("added",i,r,s,c)}addResources(i,r,s,c={silent:!1}){for(const d in s)(Re(s[d])||Array.isArray(s[d]))&&this.addResource(i,r,d,s[d],{silent:!0});c.silent||this.emit("added",i,r,s)}addResourceBundle(i,r,s,c,d,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=eo(this.data,m)||{};h.skipCopy||(s=JSON.parse(JSON.stringify(s))),c?zg(y,s,d):y={...y,...s},rp(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 Tg={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,i,r,s,c){return n.forEach(d=>{i=this.processors[d]?.process(i,r,s,c)??i}),i}};const Og=Symbol("i18next/PATH_KEY");function a0(){const n=[],i=Object.create(null);let r;return i.get=(s,c)=>(r?.revoke?.(),c===Og?n:(n.push(c),r=Proxy.revocable(s,i),r.proxy)),Proxy.revocable(Object.create(null),i).proxy}function Qu(n,i){const{[Og]:r}=n(a0());return r.join(i?.keySeparator??".")}const op={},Cu=n=>!Re(n)&&typeof n!="boolean"&&typeof n!="number";class ao extends io{constructor(i,r={}){super(),Kv(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],i,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Va.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 d=Cu(c.res);return!(s.returnObjects===!1&&d)}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 d=r.ns||this.options.defaultNS||[];const h=s&&i.indexOf(s)>-1,m=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!e0(i,s,c);if(h&&!m){const y=i.match(this.interpolator.nestingRegexp);if(y&&y.length>0)return{key:i,namespaces:Re(d)?[d]:d};const p=i.split(s);(s!==c||s===c&&this.options.ns.indexOf(p[0])>-1)&&(d=p.shift()),i=p.join(c)}return{key:i,namespaces:Re(d)?[d]:d}}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=Qu(i,{...this.options,...c})),Array.isArray(i)||(i=[String(i)]);const d=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 b=c.nsSeparator!==void 0?c.nsSeparator:this.options.nsSeparator;b===void 0&&(b=":");const x=c.lng||this.language,_=c.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(x?.toLowerCase()==="cimode")return _?d?{res:`${p}${b}${m}`,usedKey:m,exactUsedKey:m,usedLng:x,usedNS:p,usedParams:this.getUsedParamsDetails(c)}:`${p}${b}${m}`:d?{res:m,usedKey:m,exactUsedKey:m,usedLng:x,usedNS:p,usedParams:this.getUsedParamsDetails(c)}:m;const j=this.resolve(i,c);let R=j?.res;const M=j?.usedKey||m,L=j?.exactUsedKey||m,Q=["[object Number]","[object Function]","[object RegExp]"],G=c.joinArrays!==void 0?c.joinArrays:this.options.joinArrays,K=!this.i18nFormat||this.i18nFormat.handleAsObject,re=c.count!==void 0&&!Re(c.count),le=ao.hasDefaultValue(c),ce=re?this.pluralResolver.getSuffix(x,c.count,c):"",I=c.ordinal&&re?this.pluralResolver.getSuffix(x,c.count,{ordinal:!1}):"",N=re&&!c.ordinal&&c.count===0,X=N&&c[`defaultValue${this.options.pluralSeparator}zero`]||c[`defaultValue${ce}`]||c[`defaultValue${I}`]||c.defaultValue;let F=R;K&&!R&&le&&(F=X);const P=Cu(F),ne=Object.prototype.toString.apply(F);if(K&&F&&P&&Q.indexOf(ne)<0&&!(Re(G)&&Array.isArray(F))){if(!c.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const J=this.options.returnedObjectHandler?this.options.returnedObjectHandler(M,F,{...c,ns:y}):`key '${m} (${this.language})' returned an object instead of string.`;return d?(j.res=J,j.usedParams=this.getUsedParamsDetails(c),j):J}if(h){const J=Array.isArray(F),ee=J?[]:{},pe=J?L:M;for(const D in F)if(Object.prototype.hasOwnProperty.call(F,D)){const W=`${pe}${h}${D}`;le&&!R?ee[D]=this.translate(W,{...c,defaultValue:Cu(X)?X[D]:void 0,joinArrays:!1,ns:y}):ee[D]=this.translate(W,{...c,joinArrays:!1,ns:y}),ee[D]===W&&(ee[D]=F[D])}R=ee}}else if(K&&Re(G)&&Array.isArray(R))R=R.join(G),R&&(R=this.extendTranslation(R,i,c,s));else{let J=!1,ee=!1;!this.isValidLookup(R)&&le&&(J=!0,R=X),this.isValidLookup(R)||(ee=!0,R=m);const D=(c.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&ee?void 0:R,W=le&&X!==R&&this.options.updateMissing;if(ee||J||W){if(this.logger.log(W?"updateKey":"missingKey",x,p,m,W?X:R),h){const E=this.resolve(m,{...c,keySeparator:!1});E&&E.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 V=this.languageUtils.getFallbackCodes(this.options.fallbackLng,c.lng||this.language);if(this.options.saveMissingTo==="fallback"&&V&&V[0])for(let E=0;E<V.length;E++)ue.push(V[E]);else this.options.saveMissingTo==="all"?ue=this.languageUtils.toResolveHierarchy(c.lng||this.language):ue.push(c.lng||this.language);const fe=(E,B,te)=>{const se=le&&te!==R?te:D;this.options.missingKeyHandler?this.options.missingKeyHandler(E,p,B,se,W,c):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(E,p,B,se,W,c),this.emit("missingKey",E,p,B,R)};this.options.saveMissing&&(this.options.saveMissingPlurals&&re?ue.forEach(E=>{const B=this.pluralResolver.getSuffixes(E,c);N&&c[`defaultValue${this.options.pluralSeparator}zero`]&&B.indexOf(`${this.options.pluralSeparator}zero`)<0&&B.push(`${this.options.pluralSeparator}zero`),B.forEach(te=>{fe([E],m+te,c[`defaultValue${te}`]||X)})}):fe(ue,m,X))}R=this.extendTranslation(R,i,c,j,s),ee&&R===m&&this.options.appendNamespaceToMissingKey&&(R=`${p}${b}${m}`),(ee||J)&&this.options.parseMissingKeyHandler&&(R=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${p}${b}${m}`:m,J?R:void 0,c))}return d?(j.res=R,j.usedParams=this.getUsedParamsDetails(c),j):R}extendTranslation(i,r,s,c,d){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=Re(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 b=s.replace&&!Re(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(b={...this.options.interpolation.defaultVariables,...b}),i=this.interpolator.interpolate(i,b,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)=>d?.[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=Re(h)?[h]:h;return i!=null&&m?.length&&s.applyPostProcessor!==!1&&(i=Tg.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,d,h,m;return Re(i)&&(i=[i]),i.forEach(y=>{if(this.isValidLookup(s))return;const p=this.extractFromKey(y,r),b=p.key;c=b;let x=p.namespaces;this.options.fallbackNS&&(x=x.concat(this.options.fallbackNS));const _=r.count!==void 0&&!Re(r.count),j=_&&!r.ordinal&&r.count===0,R=r.context!==void 0&&(Re(r.context)||typeof r.context=="number")&&r.context!=="",M=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);x.forEach(L=>{this.isValidLookup(s)||(m=L,!op[`${M[0]}-${L}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(m)&&(op[`${M[0]}-${L}`]=!0,this.logger.warn(`key "${c}" for languages "${M.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!!!")),M.forEach(Q=>{if(this.isValidLookup(s))return;h=Q;const G=[b];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(G,b,Q,L,r);else{let re;_&&(re=this.pluralResolver.getSuffix(Q,r.count,r));const le=`${this.options.pluralSeparator}zero`,ce=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(_&&(r.ordinal&&re.indexOf(ce)===0&&G.push(b+re.replace(ce,this.options.pluralSeparator)),G.push(b+re),j&&G.push(b+le)),R){const I=`${b}${this.options.contextSeparator||"_"}${r.context}`;G.push(I),_&&(r.ordinal&&re.indexOf(ce)===0&&G.push(I+re.replace(ce,this.options.pluralSeparator)),G.push(I+re),j&&G.push(I+le))}}let K;for(;K=G.pop();)this.isValidLookup(s)||(d=K,s=this.getResource(Q,L,K,r))}))})}),{res:s,usedKey:c,exactUsedKey:d,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&&!Re(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 d of r)delete c[d]}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 cp{constructor(i){this.options=i,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Va.create("languageUtils")}getScriptPartFromCode(i){if(i=pr(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=pr(i),!i||i.indexOf("-")<0)return i;const r=i.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(i){if(Re(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 d=this.getLanguagePartFromCode(s);if(this.isSupportedCode(d))return r=d;r=this.options.supportedLngs.find(h=>{if(h===d)return h;if(!(h.indexOf("-")<0&&d.indexOf("-")<0)&&(h.indexOf("-")>0&&d.indexOf("-")<0&&h.substring(0,h.indexOf("-"))===d||h.indexOf(d)===0&&d.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)),Re(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=[],d=h=>{h&&(this.isSupportedCode(h)?c.push(h):this.logger.warn(`rejecting language code not found in supportedLngs: ${h}`))};return Re(i)&&(i.indexOf("-")>-1||i.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&d(this.formatLanguageCode(i)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&d(this.getScriptPartFromCode(i)),this.options.load!=="currentOnly"&&d(this.getLanguagePartFromCode(i))):Re(i)&&d(this.formatLanguageCode(i)),s.forEach(h=>{c.indexOf(h)<0&&d(this.formatLanguageCode(h))}),c}}const up={zero:0,one:1,two:2,few:3,many:4,other:5},dp={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class n0{constructor(i,r={}){this.languageUtils=i,this.options=r,this.logger=Va.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(i,r={}){const s=pr(i==="dev"?"en":i),c=r.ordinal?"ordinal":"cardinal",d=JSON.stringify({cleanedCode:s,type:c});if(d in this.pluralRulesCache)return this.pluralRulesCache[d];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!"),dp;if(!i.match(/-|_/))return dp;const y=this.languageUtils.getLanguagePartFromCode(i);h=this.getRule(y,r)}return this.pluralRulesCache[d]=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,d)=>up[c]-up[d]).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 fp=(n,i,r,s=".",c=!0)=>{let d=Zv(n,i,r);return!d&&c&&Re(r)&&(d=Xu(n,r,s),d===void 0&&(d=Xu(i,r,s))),d},Ru=n=>n.replace(/\$/g,"$$$$");class hp{constructor(i={}){this.logger=Va.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:d,prefixEscaped:h,suffix:m,suffixEscaped:y,formatSeparator:p,unescapeSuffix:b,unescapePrefix:x,nestingPrefix:_,nestingPrefixEscaped:j,nestingSuffix:R,nestingSuffixEscaped:M,nestingOptionsSeparator:L,maxReplaces:Q,alwaysFormat:G}=i.interpolation;this.escape=r!==void 0?r:Jv,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=c!==void 0?c:!1,this.prefix=d?pl(d):h||"{{",this.suffix=m?pl(m):y||"}}",this.formatSeparator=p||",",this.unescapePrefix=b?"":x||"-",this.unescapeSuffix=this.unescapePrefix?"":b||"",this.nestingPrefix=_?pl(_):j||pl("$t("),this.nestingSuffix=R?pl(R):M||pl(")"),this.nestingOptionsSeparator=L||",",this.maxReplaces=Q||1e3,this.alwaysFormat=G!==void 0?G:!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 d,h,m;const y=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},p=j=>{if(j.indexOf(this.formatSeparator)<0){const Q=fp(r,y,j,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(Q,void 0,s,{...c,...r,interpolationkey:j}):Q}const R=j.split(this.formatSeparator),M=R.shift().trim(),L=R.join(this.formatSeparator).trim();return this.format(fp(r,y,M,this.options.keySeparator,this.options.ignoreJSONStructure),L,s,{...c,...r,interpolationkey:M})};this.resetRegExp();const b=c?.missingInterpolationHandler||this.options.missingInterpolationHandler,x=c?.interpolation?.skipOnVariables!==void 0?c.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:j=>Ru(j)},{regex:this.regexp,safeValue:j=>this.escapeValue?Ru(this.escape(j)):Ru(j)}].forEach(j=>{for(m=0;d=j.regex.exec(i);){const R=d[1].trim();if(h=p(R),h===void 0)if(typeof b=="function"){const L=b(i,d,c);h=Re(L)?L:""}else if(c&&Object.prototype.hasOwnProperty.call(c,R))h="";else if(x){h=d[0];continue}else this.logger.warn(`missed to pass in variable ${R} for interpolating ${i}`),h="";else!Re(h)&&!this.useRawValueToEscape&&(h=np(h));const M=j.safeValue(h);if(i=i.replace(d[0],M),x?(j.regex.lastIndex+=h.length,j.regex.lastIndex-=d[0].length):j.regex.lastIndex=0,m++,m>=this.maxReplaces)break}}),i}nest(i,r,s={}){let c,d,h;const m=(y,p)=>{const b=this.nestingOptionsSeparator;if(y.indexOf(b)<0)return y;const x=y.split(new RegExp(`${pl(b)}[ ]*{`));let _=`{${x[1]}`;y=x[0],_=this.interpolate(_,h);const j=_.match(/'/g),R=_.match(/"/g);((j?.length??0)%2===0&&!R||(R?.length??0)%2!==0)&&(_=_.replace(/'/g,'"'));try{h=JSON.parse(_),p&&(h={...p,...h})}catch(M){return this.logger.warn(`failed parsing options string in nesting for key ${y}`,M),`${y}${b}${_}`}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&&!Re(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(b=>b.trim()).filter(Boolean),c[1]=c[1].slice(0,p)),d=r(m.call(this,c[1].trim(),h),h),d&&c[0]===i&&!Re(d))return d;Re(d)||(d=np(d)),d||(this.logger.warn(`missed to resolve ${c[1]} for nesting ${i}`),d=""),y.length&&(d=y.reduce((b,x)=>this.format(b,x,s.lng,{...s,interpolationkey:c[1].trim()}),d.trim())),i=i.replace(c[0],d),this.regexp.lastIndex=0}return i}}const l0=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,""),b=m.trim();r[b]||(r[b]=p),p==="false"&&(r[b]=!1),p==="true"&&(r[b]=!0),isNaN(p)||(r[b]=parseInt(p,10))}})}return{formatName:i,formatOptions:r}},mp=n=>{const i={};return(r,s,c)=>{let d=c;c&&c.interpolationkey&&c.formatParams&&c.formatParams[c.interpolationkey]&&c[c.interpolationkey]&&(d={...d,[c.interpolationkey]:void 0});const h=s+JSON.stringify(d);let m=i[h];return m||(m=n(pr(s),c),i[h]=m),m(r)}},i0=n=>(i,r,s)=>n(pr(r),s)(i);class r0{constructor(i={}){this.logger=Va.create("formatter"),this.options=i,this.init(i)}init(i,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const s=r.cacheInBuiltFormats?mp:i0;this.formats={number:s((c,d)=>{const h=new Intl.NumberFormat(c,{...d});return m=>h.format(m)}),currency:s((c,d)=>{const h=new Intl.NumberFormat(c,{...d,style:"currency"});return m=>h.format(m)}),datetime:s((c,d)=>{const h=new Intl.DateTimeFormat(c,{...d});return m=>h.format(m)}),relativetime:s((c,d)=>{const h=new Intl.RelativeTimeFormat(c,{...d});return m=>h.format(m,d.range||"day")}),list:s((c,d)=>{const h=new Intl.ListFormat(c,{...d});return m=>h.format(m)})}}add(i,r){this.formats[i.toLowerCase().trim()]=r}addCached(i,r){this.formats[i.toLowerCase().trim()]=mp(r)}format(i,r,s,c={}){const d=r.split(this.formatSeparator);if(d.length>1&&d[0].indexOf("(")>1&&d[0].indexOf(")")<0&&d.find(m=>m.indexOf(")")>-1)){const m=d.findIndex(y=>y.indexOf(")")>-1);d[0]=[d[0],...d.splice(1,m)].join(this.formatSeparator)}return d.reduce((m,y)=>{const{formatName:p,formatOptions:b}=l0(y);if(this.formats[p]){let x=m;try{const _=c?.formatParams?.[c.interpolationkey]||{},j=_.locale||_.lng||c.locale||c.lng||s;x=this.formats[p](m,j,{...b,...c,..._})}catch(_){this.logger.warn(_)}return x}else this.logger.warn(`there was no format function for ${p}`);return m},i)}}const s0=(n,i)=>{n.pending[i]!==void 0&&(delete n.pending[i],n.pendingCount--)};class o0 extends io{constructor(i,r,s,c={}){super(),this.backend=i,this.store=r,this.services=s,this.languageUtils=s.languageUtils,this.options=c,this.logger=Va.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 d={},h={},m={},y={};return i.forEach(p=>{let b=!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,b=!1,h[_]===void 0&&(h[_]=!0),d[_]===void 0&&(d[_]=!0),y[x]===void 0&&(y[x]=!0)))}),b||(m[p]=!0)}),(Object.keys(d).length||Object.keys(h).length)&&this.queue.push({pending:h,pendingCount:Object.keys(h).length,loaded:{},errors:[],callback:c}),{toLoad:Object.keys(d),pending:Object.keys(h),toLoadLanguages:Object.keys(m),toLoadNamespaces:Object.keys(y)}}loaded(i,r,s){const c=i.split("|"),d=c[0],h=c[1];r&&this.emit("failedLoading",d,h,r),!r&&s&&this.store.addResourceBundle(d,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=>{Qv(y.loaded,[d],h),s0(y,i),r&&y.errors.push(r),y.pendingCount===0&&!y.done&&(Object.keys(y.loaded).forEach(p=>{m[p]||(m[p]={});const b=y.loaded[p];b.length&&b.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,d=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:d,callback:h});return}this.readingCalls++;const m=(p,b)=>{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&&b&&c<this.maxRetries){setTimeout(()=>{this.read.call(this,i,r,s,c+1,d*2,h)},d);return}h(p,b)},y=this.backend[s].bind(this.backend);if(y.length===2){try{const p=y(i,r);p&&typeof p.then=="function"?p.then(b=>m(null,b)).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();Re(i)&&(i=this.languageUtils.toResolveHierarchy(i)),Re(r)&&(r=[r]);const d=this.queueLoad(i,r,s,c);if(!d.toLoad.length)return d.pending.length||c(),null;d.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],d=s[1];this.read(c,d,"read",void 0,void 0,(h,m)=>{h&&this.logger.warn(`${r}loading namespace ${d} for language ${c} failed`,h),!h&&m&&this.logger.log(`${r}loaded namespace ${d} for language ${c}`,m),this.loaded(i,h,m)})}saveMissing(i,r,s,c,d,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:d},p=this.backend.create.bind(this.backend);if(p.length<6)try{let b;p.length===5?b=p(i,r,s,c,y):b=p(i,r,s,c),b&&typeof b.then=="function"?b.then(x=>m(null,x)).catch(m):m(null,b)}catch(b){m(b)}else p(i,r,s,c,m,y)}!i||!i[0]||this.store.addResource(i[0],r,s,c)}}}const zu=()=>({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]),Re(n[1])&&(i.defaultValue=n[1]),Re(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}),pp=n=>(Re(n.ns)&&(n.ns=[n.ns]),Re(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),Re(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),$s=()=>{},c0=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(r=>{typeof n[r]=="function"&&(n[r]=n[r].bind(n))})},Mg="__i18next_supportNoticeShown",u0=()=>typeof globalThis<"u"&&!!globalThis[Mg],d0=()=>{typeof globalThis<"u"&&(globalThis[Mg]=!0)},f0=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 hr extends io{constructor(i={},r){if(super(),this.options=pp(i),this.services={},this.logger=Va,this.modules={external:[]},c0(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&&(Re(i.ns)?i.defaultNS=i.ns:i.ns.indexOf("translation")<0&&(i.defaultNS=i.ns[0]));const s=zu();this.options={...s,...this.options,...pp(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&&!f0(this)&&!u0()&&(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 💙"),d0());const c=p=>p?typeof p=="function"?new p:p:null;if(!this.options.isClone){this.modules.logger?Va.init(c(this.modules.logger),this.options):Va.init(null,this.options);let p;this.modules.formatter?p=this.modules.formatter:p=r0;const b=new cp(this.options);this.store=new sp(this.options.resources,this.options);const x=this.services;x.logger=Va,x.resourceStore=this.store,x.languageUtils=b,x.pluralResolver=new n0(b,{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 hp(this.options),x.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},x.backendConnector=new o0(c(this.modules.backend),x.resourceStore,x,this.options),x.backendConnector.on("*",(j,...R)=>{this.emit(j,...R)}),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 ao(this.services,this.options),this.translator.on("*",(j,...R)=>{this.emit(j,...R)}),this.modules.external.forEach(j=>{j.init&&j.init(this)})}if(this.format=this.options.interpolation.format,r||(r=$s),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]=(...b)=>this.store[p](...b)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(p=>{this[p]=(...b)=>(this.store[p](...b),this)});const m=lr(),y=()=>{const p=(b,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(b,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=$s){let s=r;const c=Re(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 d=[],h=m=>{if(!m||m==="cimode")return;this.services.languageUtils.toResolveHierarchy(m).forEach(p=>{p!=="cimode"&&d.indexOf(p)<0&&d.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(d,this.options.ns,m=>{!m&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(m)})}else s(null)}reloadResources(i,r,s){const c=lr();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=$s),this.services.backendConnector.reload(i,r,d=>{c.resolve(),s(d)}),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"&&Tg.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=lr();this.emit("languageChanging",i);const c=m=>{this.language=m,this.languages=this.services.languageUtils.toResolveHierarchy(m),this.resolvedLanguage=void 0,this.setResolvedLanguage(m)},d=(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=Re(m)?m:m&&m[0],p=this.store.hasLanguageSomeTranslations(y)?y:this.services.languageUtils.getBestMatchFromCodes(Re(m)?[m]:m);p&&(this.language||c(p),this.translator.language||this.translator.changeLanguage(p),this.services.languageDetector?.cacheUserLanguage?.(p)),this.loadResources(p,b=>{d(b,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=(d,h,...m)=>{let y;typeof h!="object"?y=this.options.overloadTranslationOptionHandler([d,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 b;return y.keyPrefix&&Array.isArray(d)?b=d.map(x=>(typeof x=="function"&&(x=Qu(x,{...this.options,...h})),`${y.keyPrefix}${p}${x}`)):(typeof d=="function"&&(d=Qu(d,{...this.options,...h})),b=y.keyPrefix?`${y.keyPrefix}${p}${d}`:d),this.t(b,y)};return Re(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,d=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(d,i)))}loadNamespaces(i,r){const s=lr();return this.options.ns?(Re(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=lr();Re(i)&&(i=[i]);const c=this.options.preload||[],d=i.filter(h=>c.indexOf(h)<0&&this.services.languageUtils.isSupportedCode(h));return d.length?(this.options.preload=c.concat(d),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 d=c.getTextInfo();if(d&&d.direction)return d.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 cp(zu());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 hr(i,r);return s.createInstance=hr.createInstance,s}cloneInstance(i={},r=$s){const s=i.forkResourceStore;s&&delete i.forkResourceStore;const c={...this.options,...i,isClone:!0},d=new hr(c);if((i.debug!==void 0||i.prefix!==void 0)&&(d.logger=d.logger.clone(i)),["store","services","language"].forEach(m=>{d[m]=this[m]}),d.services={...this.services},d.services.utils={hasLoadedNamespace:d.hasLoadedNamespace.bind(d)},s){const m=Object.keys(this.store.data).reduce((y,p)=>(y[p]={...this.store.data[p]},y[p]=Object.keys(y[p]).reduce((b,x)=>(b[x]={...y[p][x]},b),y[p]),y),{});d.store=new sp(m,c),d.services.resourceStore=d.store}if(i.interpolation){const y={...zu().interpolation,...this.options.interpolation,...i.interpolation},p={...c,interpolation:y};d.services.interpolator=new hp(p)}return d.translator=new ao(d.services,c),d.translator.on("*",(m,...y)=>{d.emit(m,...y)}),d.init(c,r),d.translator.options=c,d.translator.backendConnector.services.utils={hasLoadedNamespace:d.hasLoadedNamespace.bind(d)},d}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const $t=hr.createInstance();$t.createInstance;$t.dir;$t.init;$t.loadResources;$t.reloadResources;$t.use;$t.changeLanguage;$t.getFixedT;$t.t;$t.exists;$t.setDefaultNamespace;$t.hasLoadedNamespace;$t.loadNamespaces;$t.loadLanguages;var Tu={exports:{}},Te={};var gp;function h0(){if(gp)return Te;gp=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"),d=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"),b=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),_=Symbol.iterator;function j(E){return E===null||typeof E!="object"?null:(E=_&&E[_]||E["@@iterator"],typeof E=="function"?E:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,L={};function Q(E,B,te){this.props=E,this.context=B,this.refs=L,this.updater=te||R}Q.prototype.isReactComponent={},Q.prototype.setState=function(E,B){if(typeof E!="object"&&typeof E!="function"&&E!=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,E,B,"setState")},Q.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function G(){}G.prototype=Q.prototype;function K(E,B,te){this.props=E,this.context=B,this.refs=L,this.updater=te||R}var re=K.prototype=new G;re.constructor=K,M(re,Q.prototype),re.isPureReactComponent=!0;var le=Array.isArray;function ce(){}var I={H:null,A:null,T:null,S:null},N=Object.prototype.hasOwnProperty;function X(E,B,te){var se=te.ref;return{$$typeof:n,type:E,key:B,ref:se!==void 0?se:null,props:te}}function F(E,B){return X(E.type,B,E.props)}function P(E){return typeof E=="object"&&E!==null&&E.$$typeof===n}function ne(E){var B={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(te){return B[te]})}var J=/\/+/g;function ee(E,B){return typeof E=="object"&&E!==null&&E.key!=null?ne(""+E.key):B.toString(36)}function pe(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(ce,ce):(E.status="pending",E.then(function(B){E.status==="pending"&&(E.status="fulfilled",E.value=B)},function(B){E.status==="pending"&&(E.status="rejected",E.reason=B)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function D(E,B,te,se,Se){var Ne=typeof E;(Ne==="undefined"||Ne==="boolean")&&(E=null);var ze=!1;if(E===null)ze=!0;else switch(Ne){case"bigint":case"string":case"number":ze=!0;break;case"object":switch(E.$$typeof){case n:case i:ze=!0;break;case b:return ze=E._init,D(ze(E._payload),B,te,se,Se)}}if(ze)return Se=Se(E),ze=se===""?"."+ee(E,0):se,le(Se)?(te="",ze!=null&&(te=ze.replace(J,"$&/")+"/"),D(Se,B,te,"",function(wt){return wt})):Se!=null&&(P(Se)&&(Se=F(Se,te+(Se.key==null||E&&E.key===Se.key?"":(""+Se.key).replace(J,"$&/")+"/")+ze)),B.push(Se)),1;ze=0;var lt=se===""?".":se+":";if(le(E))for(var he=0;he<E.length;he++)se=E[he],Ne=lt+ee(se,he),ze+=D(se,B,te,Ne,Se);else if(he=j(E),typeof he=="function")for(E=he.call(E),he=0;!(se=E.next()).done;)se=se.value,Ne=lt+ee(se,he++),ze+=D(se,B,te,Ne,Se);else if(Ne==="object"){if(typeof E.then=="function")return D(pe(E),B,te,se,Se);throw B=String(E),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return ze}function W(E,B,te){if(E==null)return E;var se=[],Se=0;return D(E,se,"","",function(Ne){return B.call(te,Ne,Se++)}),se}function ue(E){if(E._status===-1){var B=E._result;B=B(),B.then(function(te){(E._status===0||E._status===-1)&&(E._status=1,E._result=te)},function(te){(E._status===0||E._status===-1)&&(E._status=2,E._result=te)}),E._status===-1&&(E._status=0,E._result=B)}if(E._status===1)return E._result.default;throw E._result}var V=typeof reportError=="function"?reportError:function(E){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=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(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",E);return}console.error(E)},fe={map:W,forEach:function(E,B,te){W(E,function(){B.apply(this,arguments)},te)},count:function(E){var B=0;return W(E,function(){B++}),B},toArray:function(E){return W(E,function(B){return B})||[]},only:function(E){if(!P(E))throw Error("React.Children.only expected to receive a single React element child.");return E}};return Te.Activity=x,Te.Children=fe,Te.Component=Q,Te.Fragment=r,Te.Profiler=c,Te.PureComponent=K,Te.StrictMode=s,Te.Suspense=y,Te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,Te.__COMPILER_RUNTIME={__proto__:null,c:function(E){return I.H.useMemoCache(E)}},Te.cache=function(E){return function(){return E.apply(null,arguments)}},Te.cacheSignal=function(){return null},Te.cloneElement=function(E,B,te){if(E==null)throw Error("The argument must be a React element, but you passed "+E+".");var se=M({},E.props),Se=E.key;if(B!=null)for(Ne in B.key!==void 0&&(Se=""+B.key),B)!N.call(B,Ne)||Ne==="key"||Ne==="__self"||Ne==="__source"||Ne==="ref"&&B.ref===void 0||(se[Ne]=B[Ne]);var Ne=arguments.length-2;if(Ne===1)se.children=te;else if(1<Ne){for(var ze=Array(Ne),lt=0;lt<Ne;lt++)ze[lt]=arguments[lt+2];se.children=ze}return X(E.type,Se,se)},Te.createContext=function(E){return E={$$typeof:h,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null},E.Provider=E,E.Consumer={$$typeof:d,_context:E},E},Te.createElement=function(E,B,te){var se,Se={},Ne=null;if(B!=null)for(se in B.key!==void 0&&(Ne=""+B.key),B)N.call(B,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(Se[se]=B[se]);var ze=arguments.length-2;if(ze===1)Se.children=te;else if(1<ze){for(var lt=Array(ze),he=0;he<ze;he++)lt[he]=arguments[he+2];Se.children=lt}if(E&&E.defaultProps)for(se in ze=E.defaultProps,ze)Se[se]===void 0&&(Se[se]=ze[se]);return X(E,Ne,Se)},Te.createRef=function(){return{current:null}},Te.forwardRef=function(E){return{$$typeof:m,render:E}},Te.isValidElement=P,Te.lazy=function(E){return{$$typeof:b,_payload:{_status:-1,_result:E},_init:ue}},Te.memo=function(E,B){return{$$typeof:p,type:E,compare:B===void 0?null:B}},Te.startTransition=function(E){var B=I.T,te={};I.T=te;try{var se=E(),Se=I.S;Se!==null&&Se(te,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(ce,V)}catch(Ne){V(Ne)}finally{B!==null&&te.types!==null&&(B.types=te.types),I.T=B}},Te.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},Te.use=function(E){return I.H.use(E)},Te.useActionState=function(E,B,te){return I.H.useActionState(E,B,te)},Te.useCallback=function(E,B){return I.H.useCallback(E,B)},Te.useContext=function(E){return I.H.useContext(E)},Te.useDebugValue=function(){},Te.useDeferredValue=function(E,B){return I.H.useDeferredValue(E,B)},Te.useEffect=function(E,B){return I.H.useEffect(E,B)},Te.useEffectEvent=function(E){return I.H.useEffectEvent(E)},Te.useId=function(){return I.H.useId()},Te.useImperativeHandle=function(E,B,te){return I.H.useImperativeHandle(E,B,te)},Te.useInsertionEffect=function(E,B){return I.H.useInsertionEffect(E,B)},Te.useLayoutEffect=function(E,B){return I.H.useLayoutEffect(E,B)},Te.useMemo=function(E,B){return I.H.useMemo(E,B)},Te.useOptimistic=function(E,B){return I.H.useOptimistic(E,B)},Te.useReducer=function(E,B,te){return I.H.useReducer(E,B,te)},Te.useRef=function(E){return I.H.useRef(E)},Te.useState=function(E){return I.H.useState(E)},Te.useSyncExternalStore=function(E,B,te){return I.H.useSyncExternalStore(E,B,te)},Te.useTransition=function(){return I.H.useTransition()},Te.version="19.2.4",Te}var yp;function ro(){return yp||(yp=1,Tu.exports=h0()),Tu.exports}var v=ro();const si=Vv(v),m0=Yv({__proto__:null,default:si},[v]),p0=(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);yl(c[0])&&(c[0]=`react-i18next:: ${c[0]}`),n?.services?.logger?.warn?n.services.logger.warn(...c):console?.warn&&console.warn(...c)},xp={},Dg=(n,i,r,s)=>{yl(r)&&xp[r]||(yl(r)&&(xp[r]=new Date),p0(n,i,r,s))},Ag=(n,i)=>()=>{if(n.isInitialized)i();else{const r=()=>{setTimeout(()=>{n.off("initialized",r)},0),i()};n.on("initialized",r)}},Zu=(n,i,r)=>{n.loadNamespaces(i,Ag(n,r))},vp=(n,i,r,s)=>{if(yl(r)&&(r=[r]),n.options.preload&&n.options.preload.indexOf(i)>-1)return Zu(n,r,s);r.forEach(c=>{n.options.ns.indexOf(c)<0&&n.options.ns.push(c)}),n.loadLanguages(i,Ag(n,s))},g0=(n,i,r={})=>!i.languages||!i.languages.length?(Dg(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}}),yl=n=>typeof n=="string",y0=n=>typeof n=="object"&&n!==null,x0=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,v0={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},b0=n=>v0[n],S0=n=>n.replace(x0,b0);let Fu={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:S0,transDefaultProps:void 0};const _0=(n={})=>{Fu={...Fu,...n}},j0=()=>Fu;let Lg;const N0=n=>{Lg=n},E0=()=>Lg,w0={type:"3rdParty",init(n){_0(n.options.react),N0(n)}},C0=v.createContext();class R0{constructor(){this.usedNamespaces={}}addUsedNamespaces(i){i.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var Ou={exports:{}},Mu={};var bp;function z0(){if(bp)return Mu;bp=1;var n=ro();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,d=n.useLayoutEffect,h=n.useDebugValue;function m(x,_){var j=_(),R=s({inst:{value:j,getSnapshot:_}}),M=R[0].inst,L=R[1];return d(function(){M.value=j,M.getSnapshot=_,y(M)&&L({inst:M})},[x,j,_]),c(function(){return y(M)&&L({inst:M}),x(function(){y(M)&&L({inst:M})})},[x]),h(j),j}function y(x){var _=x.getSnapshot;x=x.value;try{var j=_();return!r(x,j)}catch{return!0}}function p(x,_){return _()}var b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:m;return Mu.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:b,Mu}var Sp;function T0(){return Sp||(Sp=1,Ou.exports=z0()),Ou.exports}var O0=T0();const M0=(n,i)=>yl(i)?i:y0(i)&&yl(i.defaultValue)?i.defaultValue:Array.isArray(n)?n[n.length-1]:n,D0={t:M0,ready:!1},A0=()=>()=>{},Ce=(n,i={})=>{const{i18n:r}=i,{i18n:s,defaultNS:c}=v.useContext(C0)||{},d=r||s||E0();d&&!d.reportNamespaces&&(d.reportNamespaces=new R0),d||Dg(d,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const h=v.useMemo(()=>({...j0(),...d?.options?.react,...i}),[d,i]),{useSuspense:m,keyPrefix:y}=h,p=c||d?.options?.defaultNS,b=yl(p)?[p]:p||["translation"],x=v.useMemo(()=>b,b);d?.reportNamespaces?.addUsedNamespaces?.(x);const _=v.useRef(0),j=v.useCallback(X=>{if(!d)return A0;const{bindI18n:F,bindI18nStore:P}=h,ne=()=>{_.current+=1,X()};return F&&d.on(F,ne),P&&d.store.on(P,ne),()=>{F&&F.split(" ").forEach(J=>d.off(J,ne)),P&&P.split(" ").forEach(J=>d.store.off(J,ne))}},[d,h]),R=v.useRef(),M=v.useCallback(()=>{if(!d)return D0;const X=!!(d.isInitialized||d.initializedStoreOnce)&&x.every(pe=>g0(pe,d,h)),F=i.lng||d.language,P=_.current,ne=R.current;if(ne&&ne.ready===X&&ne.lng===F&&ne.keyPrefix===y&&ne.revision===P)return ne;const ee={t:d.getFixedT(F,h.nsMode==="fallback"?x:x[0],y),ready:X,lng:F,keyPrefix:y,revision:P};return R.current=ee,ee},[d,x,y,h,i.lng]),[L,Q]=v.useState(0),{t:G,ready:K}=O0.useSyncExternalStore(j,M,M);v.useEffect(()=>{if(d&&!K&&!m){const X=()=>Q(F=>F+1);i.lng?vp(d,i.lng,x,X):Zu(d,x,X)}},[d,i.lng,x,K,m,L]);const re=d||{},le=v.useRef(null),ce=v.useRef(),I=X=>{const F=Object.getOwnPropertyDescriptors(X);F.__original&&delete F.__original;const P=Object.create(Object.getPrototypeOf(X),F);if(!Object.prototype.hasOwnProperty.call(P,"__original"))try{Object.defineProperty(P,"__original",{value:X,writable:!1,enumerable:!1,configurable:!1})}catch{}return P},N=v.useMemo(()=>{const X=re,F=X?.language;let P=X;X&&(le.current&&le.current.__original===X?ce.current!==F?(P=I(X),le.current=P,ce.current=F):P=le.current:(P=I(X),le.current=P,ce.current=F));const ne=[G,P,K];return ne.t=G,ne.i18n=P,ne.ready=K,ne},[G,re,K,re.resolvedLanguage,re.language,re.languages]);if(d&&m&&!K)throw new Promise(X=>{const F=()=>X();i.lng?vp(d,i.lng,x,F):Zu(d,x,F)});return N},{slice:L0,forEach:k0}=[];function U0(n){return k0.call(L0.call(arguments,1),i=>{if(i)for(const r in i)n[r]===void 0&&(n[r]=i[r])}),n}function H0(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 _p=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,B0=function(n,i){const s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},c=encodeURIComponent(i);let d=`${n}=${c}`;if(s.maxAge>0){const h=s.maxAge-0;if(Number.isNaN(h))throw new Error("maxAge should be a Number");d+=`; Max-Age=${Math.floor(h)}`}if(s.domain){if(!_p.test(s.domain))throw new TypeError("option domain is invalid");d+=`; Domain=${s.domain}`}if(s.path){if(!_p.test(s.path))throw new TypeError("option path is invalid");d+=`; Path=${s.path}`}if(s.expires){if(typeof s.expires.toUTCString!="function")throw new TypeError("option expires is invalid");d+=`; Expires=${s.expires.toUTCString()}`}if(s.httpOnly&&(d+="; HttpOnly"),s.secure&&(d+="; Secure"),s.sameSite)switch(typeof s.sameSite=="string"?s.sameSite.toLowerCase():s.sameSite){case!0:d+="; SameSite=Strict";break;case"lax":d+="; SameSite=Lax";break;case"strict":d+="; SameSite=Strict";break;case"none":d+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s.partitioned&&(d+="; Partitioned"),d},jp={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=B0(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 q0={name:"cookie",lookup(n){let{lookupCookie:i}=n;if(i&&typeof document<"u")return jp.read(i)||void 0},cacheUserLanguage(n,i){let{lookupCookie:r,cookieMinutes:s,cookieDomain:c,cookieOptions:d}=i;r&&typeof document<"u"&&jp.create(r,n,s,c,d)}},Y0={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 d=s.substring(1).split("&");for(let h=0;h<d.length;h++){const m=d[h].indexOf("=");m>0&&d[h].substring(0,m)===i&&(r=d[h].substring(m+1))}}return r}},V0={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 d=c.substring(1);if(i){const h=d.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 li=null;const Np=()=>{if(li!==null)return li;try{if(li=typeof window<"u"&&window.localStorage!==null,!li)return!1;const n="i18next.translate.boo";window.localStorage.setItem(n,"foo"),window.localStorage.removeItem(n)}catch{li=!1}return li};var G0={name:"localStorage",lookup(n){let{lookupLocalStorage:i}=n;if(i&&Np())return window.localStorage.getItem(i)||void 0},cacheUserLanguage(n,i){let{lookupLocalStorage:r}=i;r&&Np()&&window.localStorage.setItem(r,n)}};let ii=null;const Ep=()=>{if(ii!==null)return ii;try{if(ii=typeof window<"u"&&window.sessionStorage!==null,!ii)return!1;const n="i18next.translate.boo";window.sessionStorage.setItem(n,"foo"),window.sessionStorage.removeItem(n)}catch{ii=!1}return ii};var $0={name:"sessionStorage",lookup(n){let{lookupSessionStorage:i}=n;if(i&&Ep())return window.sessionStorage.getItem(i)||void 0},cacheUserLanguage(n,i){let{lookupSessionStorage:r}=i;r&&Ep()&&window.sessionStorage.setItem(r,n)}},K0={name:"navigator",lookup(n){const i=[];if(typeof navigator<"u"){const{languages:r,userLanguage:s,language:c}=navigator;if(r)for(let d=0;d<r.length;d++)i.push(r[d]);s&&i.push(s),c&&i.push(c)}return i.length>0?i:void 0}},X0={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}},Q0={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}},Z0={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 kg=!1;try{document.cookie,kg=!0}catch{}const Ug=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];kg||Ug.splice(1,1);const F0=()=>({order:Ug,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:n=>n});class Hg{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=U0(r,this.options||{},F0()),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(q0),this.addDetector(Y0),this.addDetector(G0),this.addDetector($0),this.addDetector(K0),this.addDetector(X0),this.addDetector(Q0),this.addDetector(Z0),this.addDetector(V0)}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&&!H0(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)}))}}Hg.type="languageDetector";const J0={"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.copyright_compact":"@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.loading_repo":"Loading repository info...","sources.import.loading_repo_slow":"Large repositories (>10 GB) may take 5–10 seconds...","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":"Repositories (skipped)","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_code_packages_tip":"Supported: package.json, pyproject.toml, setup.py, go.mod, Cargo.toml, pom.xml, build.gradle","sources.import.dir_doc_files":"Documents","sources.import.dir_doc_files_tip":"Supported: Markdown (.md)","sources.import.dir_total_files":"Total Files","sources.import.dir_total_dirs":"Directories","sources.import.dir_git_skip_hint":"Git repos are skipped. Use 'Import Repository' instead.","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."},W0={"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.copyright_compact":"@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.loading_repo":"正在加载仓库信息...","sources.import.loading_repo_slow":"大型仓库(>10 GB)可能需要 5~10 秒...","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":"仓库(已跳过)","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_code_packages_tip":"支持:package.json、pyproject.toml、setup.py、go.mod、Cargo.toml、pom.xml、build.gradle","sources.import.dir_doc_files":"文档","sources.import.dir_doc_files_tip":"支持:Markdown (.md)","sources.import.dir_total_files":"文件总数","sources.import.dir_total_dirs":"目录","sources.import.dir_git_skip_hint":"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 版本中推出,敬请期待。"};$t.use(Hg).use(w0).init({resources:{en:{translation:J0},zh:{translation:W0}},fallbackLng:"en",interpolation:{escapeValue:!1},detection:{order:["localStorage"],caches:["localStorage"],lookupLocalStorage:"lang"}});var Du={exports:{}},ir={},Au={exports:{}},Lu={};var wp;function P0(){return wp||(wp=1,(function(n){function i(D,W){var ue=D.length;D.push(W);e:for(;0<ue;){var V=ue-1>>>1,fe=D[V];if(0<c(fe,W))D[V]=W,D[ue]=fe,ue=V;else break e}}function r(D){return D.length===0?null:D[0]}function s(D){if(D.length===0)return null;var W=D[0],ue=D.pop();if(ue!==W){D[0]=ue;e:for(var V=0,fe=D.length,E=fe>>>1;V<E;){var B=2*(V+1)-1,te=D[B],se=B+1,Se=D[se];if(0>c(te,ue))se<fe&&0>c(Se,te)?(D[V]=Se,D[se]=ue,V=se):(D[V]=te,D[B]=ue,V=B);else if(se<fe&&0>c(Se,ue))D[V]=Se,D[se]=ue,V=se;else break e}}return W}function c(D,W){var ue=D.sortIndex-W.sortIndex;return ue!==0?ue:D.id-W.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var h=Date,m=h.now();n.unstable_now=function(){return h.now()-m}}var y=[],p=[],b=1,x=null,_=3,j=!1,R=!1,M=!1,L=!1,Q=typeof setTimeout=="function"?setTimeout:null,G=typeof clearTimeout=="function"?clearTimeout:null,K=typeof setImmediate<"u"?setImmediate:null;function re(D){for(var W=r(p);W!==null;){if(W.callback===null)s(p);else if(W.startTime<=D)s(p),W.sortIndex=W.expirationTime,i(y,W);else break;W=r(p)}}function le(D){if(M=!1,re(D),!R)if(r(y)!==null)R=!0,ce||(ce=!0,ne());else{var W=r(p);W!==null&&pe(le,W.startTime-D)}}var ce=!1,I=-1,N=5,X=-1;function F(){return L?!0:!(n.unstable_now()-X<N)}function P(){if(L=!1,ce){var D=n.unstable_now();X=D;var W=!0;try{e:{R=!1,M&&(M=!1,G(I),I=-1),j=!0;var ue=_;try{t:{for(re(D),x=r(y);x!==null&&!(x.expirationTime>D&&F());){var V=x.callback;if(typeof V=="function"){x.callback=null,_=x.priorityLevel;var fe=V(x.expirationTime<=D);if(D=n.unstable_now(),typeof fe=="function"){x.callback=fe,re(D),W=!0;break t}x===r(y)&&s(y),re(D)}else s(y);x=r(y)}if(x!==null)W=!0;else{var E=r(p);E!==null&&pe(le,E.startTime-D),W=!1}}break e}finally{x=null,_=ue,j=!1}W=void 0}}finally{W?ne():ce=!1}}}var ne;if(typeof K=="function")ne=function(){K(P)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,ee=J.port2;J.port1.onmessage=P,ne=function(){ee.postMessage(null)}}else ne=function(){Q(P,0)};function pe(D,W){I=Q(function(){D(n.unstable_now())},W)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(D){D.callback=null},n.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<D?Math.floor(1e3/D):5},n.unstable_getCurrentPriorityLevel=function(){return _},n.unstable_next=function(D){switch(_){case 1:case 2:case 3:var W=3;break;default:W=_}var ue=_;_=W;try{return D()}finally{_=ue}},n.unstable_requestPaint=function(){L=!0},n.unstable_runWithPriority=function(D,W){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var ue=_;_=D;try{return W()}finally{_=ue}},n.unstable_scheduleCallback=function(D,W,ue){var V=n.unstable_now();switch(typeof ue=="object"&&ue!==null?(ue=ue.delay,ue=typeof ue=="number"&&0<ue?V+ue:V):ue=V,D){case 1:var fe=-1;break;case 2:fe=250;break;case 5:fe=1073741823;break;case 4:fe=1e4;break;default:fe=5e3}return fe=ue+fe,D={id:b++,callback:W,priorityLevel:D,startTime:ue,expirationTime:fe,sortIndex:-1},ue>V?(D.sortIndex=ue,i(p,D),r(y)===null&&D===r(p)&&(M?(G(I),I=-1):M=!0,pe(le,ue-V))):(D.sortIndex=fe,i(y,D),R||j||(R=!0,ce||(ce=!0,ne()))),D},n.unstable_shouldYield=F,n.unstable_wrapCallback=function(D){var W=_;return function(){var ue=_;_=W;try{return D.apply(this,arguments)}finally{_=ue}}}})(Lu)),Lu}var Cp;function I0(){return Cp||(Cp=1,Au.exports=P0()),Au.exports}var ku={exports:{}},kt={};var Rp;function eb(){if(Rp)return kt;Rp=1;var n=ro();function i(y){var p="https://react.dev/errors/"+y;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)p+="&args[]="+encodeURIComponent(arguments[b])}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 d(y,p,b){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:b}}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 kt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,kt.createPortal=function(y,p){var b=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 d(y,p,null,b)},kt.flushSync=function(y){var p=h.T,b=s.p;try{if(h.T=null,s.p=2,y)return y()}finally{h.T=p,s.p=b,s.d.f()}},kt.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))},kt.prefetchDNS=function(y){typeof y=="string"&&s.d.D(y)},kt.preinit=function(y,p){if(typeof y=="string"&&p&&typeof p.as=="string"){var b=p.as,x=m(b,p.crossOrigin),_=typeof p.integrity=="string"?p.integrity:void 0,j=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;b==="style"?s.d.S(y,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:x,integrity:_,fetchPriority:j}):b==="script"&&s.d.X(y,{crossOrigin:x,integrity:_,fetchPriority:j,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},kt.preinitModule=function(y,p){if(typeof y=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var b=m(p.as,p.crossOrigin);s.d.M(y,{crossOrigin:b,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)},kt.preload=function(y,p){if(typeof y=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var b=p.as,x=m(b,p.crossOrigin);s.d.L(y,b,{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})}},kt.preloadModule=function(y,p){if(typeof y=="string")if(p){var b=m(p.as,p.crossOrigin);s.d.m(y,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else s.d.m(y)},kt.requestFormReset=function(y){s.d.r(y)},kt.unstable_batchedUpdates=function(y,p){return y(p)},kt.useFormState=function(y,p,b){return h.H.useFormState(y,p,b)},kt.useFormStatus=function(){return h.H.useHostTransitionStatus()},kt.version="19.2.4",kt}var zp;function tb(){if(zp)return ku.exports;zp=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(),ku.exports=eb(),ku.exports}var Tp;function ab(){if(Tp)return ir;Tp=1;var n=I0(),i=ro(),r=tb();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 d(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(d(e)!==e)throw Error(s(188))}function p(e){var t=e.alternate;if(!t){if(t=d(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,S=o.child;S;){if(S===a){g=!0,a=o,l=u;break}if(S===l){g=!0,l=o,a=u;break}S=S.sibling}if(!g){for(S=u.child;S;){if(S===a){g=!0,a=u,l=o;break}if(S===l){g=!0,l=u,a=o;break}S=S.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 b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var x=Object.assign,_=Symbol.for("react.element"),j=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),G=Symbol.for("react.consumer"),K=Symbol.for("react.context"),re=Symbol.for("react.forward_ref"),le=Symbol.for("react.suspense"),ce=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),F=Symbol.for("react.memo_cache_sentinel"),P=Symbol.iterator;function ne(e){return e===null||typeof e!="object"?null:(e=P&&e[P]||e["@@iterator"],typeof e=="function"?e:null)}var J=Symbol.for("react.client.reference");function ee(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===J?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case M:return"Fragment";case Q:return"Profiler";case L:return"StrictMode";case le:return"Suspense";case ce:return"SuspenseList";case X:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case R:return"Portal";case K:return e.displayName||"Context";case G:return(e._context.displayName||"Context")+".Consumer";case re:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case I:return t=e.displayName||null,t!==null?t:ee(e.type)||"Memo";case N:t=e._payload,e=e._init;try{return ee(e(t))}catch{}}return null}var pe=Array.isArray,D=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue={pending:!1,data:null,method:null,action:null},V=[],fe=-1;function E(e){return{current:e}}function B(e){0>fe||(e.current=V[fe],V[fe]=null,fe--)}function te(e,t){fe++,V[fe]=e.current,e.current=t}var se=E(null),Se=E(null),Ne=E(null),ze=E(null);function lt(e,t){switch(te(Ne,t),te(Se,e),te(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Nm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Nm(t),e=Em(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(se),te(se,e)}function he(){B(se),B(Se),B(Ne)}function wt(e){e.memoizedState!==null&&te(ze,e);var t=se.current,a=Em(t,e.type);t!==a&&(te(Se,e),te(se,a))}function Kt(e){Se.current===e&&(B(se),B(Se)),ze.current===e&&(B(ze),Ii._currentValue=ue)}var It,at;function de(e){if(It===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);It=t&&t[1]||"",at=-1<a.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+It+e+at}var Le=!1;function ut(e,t){if(!e||Le)return"";Le=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(q){var U=q}Reflect.construct(e,[],Z)}else{try{Z.call()}catch(q){U=q}e.call(Z.prototype)}}else{try{throw Error()}catch(q){U=q}(Z=e())&&typeof Z.catch=="function"&&Z.catch(function(){})}}catch(q){if(q&&U&&typeof q.stack=="string")return[q.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],S=u[1];if(g&&S){var w=g.split(`
|
|
4
|
+
`),k=S.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 Y=`
|
|
6
|
+
`+w[l].replace(" at new "," at ");return e.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",e.displayName)),Y}while(1<=l&&0<=o);break}}}finally{Le=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?de(a):""}function pt(e,t){switch(e.tag){case 26:case 27:case 5:return de(e.type);case 16:return de("Lazy");case 13:return e.child!==t&&t!==null?de("Suspense Fallback"):de("Suspense");case 19:return de("SuspenseList");case 0:case 15:return ut(e.type,!1);case 11:return ut(e.type.render,!1);case 1:return ut(e.type,!0);case 31:return de("Activity");default:return""}}function $e(e){try{var t="",a=null;do t+=pt(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
|
|
7
|
+
Error generating stack: `+l.message+`
|
|
8
|
+
`+l.stack}}var ea=Object.prototype.hasOwnProperty,ta=n.unstable_scheduleCallback,wa=n.unstable_cancelCallback,pn=n.unstable_shouldYield,Zn=n.unstable_requestPaint,qt=n.unstable_now,Ka=n.unstable_getCurrentPriorityLevel,gn=n.unstable_ImmediatePriority,mi=n.unstable_UserBlockingPriority,yn=n.unstable_NormalPriority,Ca=n.unstable_LowPriority,da=n.unstable_IdlePriority,Cr=n.log,yo=n.unstable_setDisableYieldValue,Xa=null,Yt=null;function Ct(e){if(typeof Cr=="function"&&yo(e),Yt&&typeof Yt.setStrictMode=="function")try{Yt.setStrictMode(Xa,e)}catch{}}var At=Math.clz32?Math.clz32:xo,Rr=Math.log,zr=Math.LN2;function xo(e){return e>>>=0,e===0?32:31-(Rr(e)/zr|0)|0}var Fn=256,Qa=262144,Jn=4194304;function Ra(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072: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 Sl(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 S=l&134217727;return S!==0?(l=S&~u,l!==0?o=Ra(l):(g&=S,g!==0?o=Ra(g):a||(a=S&~e,a!==0&&(o=Ra(a))))):(S=l&~u,S!==0?o=Ra(S):g!==0?o=Ra(g):a||(a=l&~e,a!==0&&(o=Ra(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 xn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function vo(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 pi(){var e=Jn;return Jn<<=1,(Jn&62914560)===0&&(Jn=4194304),e}function vn(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function La(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Tr(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 S=e.entanglements,w=e.expirationTimes,k=e.hiddenUpdates;for(a=g&~a;0<a;){var Y=31-At(a),Z=1<<Y;S[Y]=0,w[Y]=-1;var U=k[Y];if(U!==null)for(k[Y]=null,Y=0;Y<U.length;Y++){var q=U[Y];q!==null&&(q.lane&=-536870913)}a&=~Z}l!==0&&Or(e,l,0),u!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=u&~(g&~t))}function Or(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-At(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function Mr(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-At(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:T(a),(a&(e.suspendedLanes|t))!==0?0:a}function T(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 H(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ae(){var e=W.p;return e!==0?e:(e=window.event,e===void 0?32:Zm(e.type))}function ie(e,t){var a=W.p;try{return W.p=e,t()}finally{W.p=a}}var ye=Math.random().toString(36).slice(2),oe="__reactFiber$"+ye,me="__reactProps$"+ye,ge="__reactContainer$"+ye,_e="__reactEvents$"+ye,Ee="__reactListeners$"+ye,be="__reactHandles$"+ye,Ke="__reactResources$"+ye,ke="__reactMarker$"+ye;function et(e){delete e[oe],delete e[me],delete e[_e],delete e[Ee],delete e[be]}function it(e){var t=e[oe];if(t)return t;for(var a=e.parentNode;a;){if(t=a[ge]||a[oe]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Mm(e);e!==null;){if(a=e[oe])return a;e=Mm(e)}return t}e=a,a=e.parentNode}return null}function dt(e){if(e=e[oe]||e[ge]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ge(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function Nt(e){var t=e[Ke];return t||(t=e[Ke]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function nt(e){e[ke]=!0}var bn=new Set,za={};function Rt(e,t){ka(e,t),ka(e+"Capture",t)}function ka(e,t){for(za[e]=t,e=0;e<t.length;e++)bn.add(t[e])}var Wn=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]*$"),Ua={},Pn={};function _l(e){return ea.call(Pn,e)?!0:ea.call(Ua,e)?!1:Wn.test(e)?Pn[e]=!0:(Ua[e]=!0,!1)}function Ue(e,t,a){if(_l(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 gt(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 Lt(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 vt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function rt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function jl(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 Nl(e){if(!e._valueTracker){var t=rt(e)?"checked":"value";e._valueTracker=jl(e,t,""+e[t])}}function Dr(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=rt(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function Ar(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 Ly=/[\n"\\]/g;function fa(e){return e.replace(Ly,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function bo(e,t,a,l,o,u,g,S){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=""+vt(t)):e.value!==""+vt(t)&&(e.value=""+vt(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?So(e,g,vt(t)):a!=null?So(e,g,vt(a)):l!=null&&e.removeAttribute("value"),o==null&&u!=null&&(e.defaultChecked=!!u),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+vt(S):e.removeAttribute("name")}function yd(e,t,a,l,o,u,g,S){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)){Nl(e);return}a=a!=null?""+vt(a):"",t=t!=null?""+vt(t):a,S||t===e.value||(e.value=t),e.defaultValue=t}l=l??o,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=S?e.checked:!!l,e.defaultChecked=!!l,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),Nl(e)}function So(e,t,a){t==="number"&&Ar(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function El(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=""+vt(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 xd(e,t,a){if(t!=null&&(t=""+vt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+vt(a):""}function vd(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(s(92));if(pe(l)){if(1<l.length)throw Error(s(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=vt(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),Nl(e)}function wl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var ky=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 bd(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||ky.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Sd(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&&bd(e,o,l)}else for(var u in t)t.hasOwnProperty(u)&&bd(e,u,t[u])}function _o(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 Uy=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"]]),Hy=/^[\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 Lr(e){return Hy.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Za(){}var jo=null;function No(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Cl=null,Rl=null;function _d(e){var t=dt(e);if(t&&(e=t.stateNode)){var a=e[me]||null;e:switch(e=t.stateNode,t.type){case"input":if(bo(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="'+fa(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var o=l[me]||null;if(!o)throw Error(s(90));bo(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&&Dr(l)}break e;case"textarea":xd(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&El(e,!!a.multiple,t,!1)}}}var Eo=!1;function jd(e,t,a){if(Eo)return e(t,a);Eo=!0;try{var l=e(t);return l}finally{if(Eo=!1,(Cl!==null||Rl!==null)&&(_s(),Cl&&(t=Cl,e=Rl,Rl=Cl=null,_d(t),e)))for(t=0;t<e.length;t++)_d(e[t])}}function gi(e,t){var a=e.stateNode;if(a===null)return null;var l=a[me]||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 Fa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),wo=!1;if(Fa)try{var yi={};Object.defineProperty(yi,"passive",{get:function(){wo=!0}}),window.addEventListener("test",yi,yi),window.removeEventListener("test",yi,yi)}catch{wo=!1}var Sn=null,Co=null,kr=null;function Nd(){if(kr)return kr;var e,t=Co,a=t.length,l,o="value"in Sn?Sn.value:Sn.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 kr=o.slice(e,1<l?1-l:void 0)}function Ur(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 Hr(){return!0}function Ed(){return!1}function Xt(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 S in e)e.hasOwnProperty(S)&&(a=e[S],this[S]=a?a(u):u[S]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Hr:Ed,this.isPropagationStopped=Ed,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=Hr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Hr)},persist:function(){},isPersistent:Hr}),t}var In={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Br=Xt(In),xi=x({},In,{view:0,detail:0}),By=Xt(xi),Ro,zo,vi,qr=x({},xi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Oo,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!==vi&&(vi&&e.type==="mousemove"?(Ro=e.screenX-vi.screenX,zo=e.screenY-vi.screenY):zo=Ro=0,vi=e),Ro)},movementY:function(e){return"movementY"in e?e.movementY:zo}}),wd=Xt(qr),qy=x({},qr,{dataTransfer:0}),Yy=Xt(qy),Vy=x({},xi,{relatedTarget:0}),To=Xt(Vy),Gy=x({},In,{animationName:0,elapsedTime:0,pseudoElement:0}),$y=Xt(Gy),Ky=x({},In,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Xy=Xt(Ky),Qy=x({},In,{data:0}),Cd=Xt(Qy),Zy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Fy={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"},Jy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Wy(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Jy[e])?!!t[e]:!1}function Oo(){return Wy}var Py=x({},xi,{key:function(e){if(e.key){var t=Zy[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ur(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Fy[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Oo,charCode:function(e){return e.type==="keypress"?Ur(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ur(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Iy=Xt(Py),ex=x({},qr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Rd=Xt(ex),tx=x({},xi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Oo}),ax=Xt(tx),nx=x({},In,{propertyName:0,elapsedTime:0,pseudoElement:0}),lx=Xt(nx),ix=x({},qr,{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}),rx=Xt(ix),sx=x({},In,{newState:0,oldState:0}),ox=Xt(sx),cx=[9,13,27,32],Mo=Fa&&"CompositionEvent"in window,bi=null;Fa&&"documentMode"in document&&(bi=document.documentMode);var ux=Fa&&"TextEvent"in window&&!bi,zd=Fa&&(!Mo||bi&&8<bi&&11>=bi),Td=" ",Od=!1;function Md(e,t){switch(e){case"keyup":return cx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Dd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zl=!1;function dx(e,t){switch(e){case"compositionend":return Dd(t);case"keypress":return t.which!==32?null:(Od=!0,Td);case"textInput":return e=t.data,e===Td&&Od?null:e;default:return null}}function fx(e,t){if(zl)return e==="compositionend"||!Mo&&Md(e,t)?(e=Nd(),kr=Co=Sn=null,zl=!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 zd&&t.locale!=="ko"?null:t.data;default:return null}}var hx={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 Ad(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!hx[e.type]:t==="textarea"}function Ld(e,t,a,l){Cl?Rl?Rl.push(l):Rl=[l]:Cl=l,t=zs(t,"onChange"),0<t.length&&(a=new Br("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var Si=null,_i=null;function mx(e){xm(e,0)}function Yr(e){var t=Ge(e);if(Dr(t))return e}function kd(e,t){if(e==="change")return t}var Ud=!1;if(Fa){var Do;if(Fa){var Ao="oninput"in document;if(!Ao){var Hd=document.createElement("div");Hd.setAttribute("oninput","return;"),Ao=typeof Hd.oninput=="function"}Do=Ao}else Do=!1;Ud=Do&&(!document.documentMode||9<document.documentMode)}function Bd(){Si&&(Si.detachEvent("onpropertychange",qd),_i=Si=null)}function qd(e){if(e.propertyName==="value"&&Yr(_i)){var t=[];Ld(t,_i,e,No(e)),jd(mx,t)}}function px(e,t,a){e==="focusin"?(Bd(),Si=t,_i=a,Si.attachEvent("onpropertychange",qd)):e==="focusout"&&Bd()}function gx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Yr(_i)}function yx(e,t){if(e==="click")return Yr(t)}function xx(e,t){if(e==="input"||e==="change")return Yr(t)}function vx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var aa=typeof Object.is=="function"?Object.is:vx;function ji(e,t){if(aa(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(!ea.call(t,o)||!aa(e[o],t[o]))return!1}return!0}function Yd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Vd(e,t){var a=Yd(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=Yd(a)}}function Gd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Gd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function $d(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ar(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=Ar(e.document)}return t}function Lo(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 bx=Fa&&"documentMode"in document&&11>=document.documentMode,Tl=null,ko=null,Ni=null,Uo=!1;function Kd(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Uo||Tl==null||Tl!==Ar(l)||(l=Tl,"selectionStart"in l&&Lo(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}),Ni&&ji(Ni,l)||(Ni=l,l=zs(ko,"onSelect"),0<l.length&&(t=new Br("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=Tl)))}function el(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Ol={animationend:el("Animation","AnimationEnd"),animationiteration:el("Animation","AnimationIteration"),animationstart:el("Animation","AnimationStart"),transitionrun:el("Transition","TransitionRun"),transitionstart:el("Transition","TransitionStart"),transitioncancel:el("Transition","TransitionCancel"),transitionend:el("Transition","TransitionEnd")},Ho={},Xd={};Fa&&(Xd=document.createElement("div").style,"AnimationEvent"in window||(delete Ol.animationend.animation,delete Ol.animationiteration.animation,delete Ol.animationstart.animation),"TransitionEvent"in window||delete Ol.transitionend.transition);function tl(e){if(Ho[e])return Ho[e];if(!Ol[e])return e;var t=Ol[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Xd)return Ho[e]=t[a];return e}var Qd=tl("animationend"),Zd=tl("animationiteration"),Fd=tl("animationstart"),Sx=tl("transitionrun"),_x=tl("transitionstart"),jx=tl("transitioncancel"),Jd=tl("transitionend"),Wd=new Map,Bo="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(" ");Bo.push("scrollEnd");function Ta(e,t){Wd.set(e,t),Rt(t,[e])}var Vr=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)},ha=[],Ml=0,qo=0;function Gr(){for(var e=Ml,t=qo=Ml=0;t<e;){var a=ha[t];ha[t++]=null;var l=ha[t];ha[t++]=null;var o=ha[t];ha[t++]=null;var u=ha[t];if(ha[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&&Pd(a,o,u)}}function $r(e,t,a,l){ha[Ml++]=e,ha[Ml++]=t,ha[Ml++]=a,ha[Ml++]=l,qo|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Yo(e,t,a,l){return $r(e,t,a,l),Kr(e)}function al(e,t){return $r(e,null,null,t),Kr(e)}function Pd(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-At(a),e=u.hiddenUpdates,l=e[o],l===null?e[o]=[t]:l.push(t),t.lane=a|536870912),u):null}function Kr(e){if(50<Xi)throw Xi=0,Jc=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Dl={};function Nx(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 na(e,t,a,l){return new Nx(e,t,a,l)}function Vo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ja(e,t){var a=e.alternate;return a===null?(a=na(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 Id(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 Xr(e,t,a,l,o,u){var g=0;if(l=e,typeof e=="function")Vo(e)&&(g=1);else if(typeof e=="string")g=zv(e,a,se.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case X:return e=na(31,a,t,o),e.elementType=X,e.lanes=u,e;case M:return nl(a.children,o,u,t);case L:g=8,o|=24;break;case Q:return e=na(12,a,t,o|2),e.elementType=Q,e.lanes=u,e;case le:return e=na(13,a,t,o),e.elementType=le,e.lanes=u,e;case ce:return e=na(19,a,t,o),e.elementType=ce,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case K:g=10;break e;case G:g=9;break e;case re:g=11;break e;case I:g=14;break e;case N:g=16,l=null;break e}g=29,a=Error(s(130,e===null?"null":typeof e,"")),l=null}return t=na(g,a,t,o),t.elementType=e,t.type=l,t.lanes=u,t}function nl(e,t,a,l){return e=na(7,e,l,t),e.lanes=a,e}function Go(e,t,a){return e=na(6,e,null,t),e.lanes=a,e}function ef(e){var t=na(18,null,null,0);return t.stateNode=e,t}function $o(e,t,a){return t=na(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var tf=new WeakMap;function ma(e,t){if(typeof e=="object"&&e!==null){var a=tf.get(e);return a!==void 0?a:(t={value:e,source:t,stack:$e(t)},tf.set(e,t),t)}return{value:e,source:t,stack:$e(t)}}var Al=[],Ll=0,Qr=null,Ei=0,pa=[],ga=0,_n=null,Ha=1,Ba="";function Wa(e,t){Al[Ll++]=Ei,Al[Ll++]=Qr,Qr=e,Ei=t}function af(e,t,a){pa[ga++]=Ha,pa[ga++]=Ba,pa[ga++]=_n,_n=e;var l=Ha;e=Ba;var o=32-At(l)-1;l&=~(1<<o),a+=1;var u=32-At(t)+o;if(30<u){var g=o-o%5;u=(l&(1<<g)-1).toString(32),l>>=g,o-=g,Ha=1<<32-At(t)+o|a<<o|l,Ba=u+e}else Ha=1<<u|a<<o|l,Ba=e}function Ko(e){e.return!==null&&(Wa(e,1),af(e,1,0))}function Xo(e){for(;e===Qr;)Qr=Al[--Ll],Al[Ll]=null,Ei=Al[--Ll],Al[Ll]=null;for(;e===_n;)_n=pa[--ga],pa[ga]=null,Ba=pa[--ga],pa[ga]=null,Ha=pa[--ga],pa[ga]=null}function nf(e,t){pa[ga++]=Ha,pa[ga++]=Ba,pa[ga++]=_n,Ha=t.id,Ba=t.overflow,_n=e}var Tt=null,st=null,Ve=!1,jn=null,ya=!1,Qo=Error(s(519));function Nn(e){var t=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw wi(ma(t,e)),Qo}function lf(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[oe]=e,t[me]=l,a){case"dialog":Be("cancel",t),Be("close",t);break;case"iframe":case"object":case"embed":Be("load",t);break;case"video":case"audio":for(a=0;a<Zi.length;a++)Be(Zi[a],t);break;case"source":Be("error",t);break;case"img":case"image":case"link":Be("error",t),Be("load",t);break;case"details":Be("toggle",t);break;case"input":Be("invalid",t),yd(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Be("invalid",t);break;case"textarea":Be("invalid",t),vd(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||_m(t.textContent,a)?(l.popover!=null&&(Be("beforetoggle",t),Be("toggle",t)),l.onScroll!=null&&Be("scroll",t),l.onScrollEnd!=null&&Be("scrollend",t),l.onClick!=null&&(t.onclick=Za),t=!0):t=!1,t||Nn(e,!0)}function rf(e){for(Tt=e.return;Tt;)switch(Tt.tag){case 5:case 31:case 13:ya=!1;return;case 27:case 3:ya=!0;return;default:Tt=Tt.return}}function kl(e){if(e!==Tt)return!1;if(!Ve)return rf(e),Ve=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||du(e.type,e.memoizedProps)),a=!a),a&&st&&Nn(e),rf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));st=Om(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));st=Om(e)}else t===27?(t=st,Hn(e.type)?(e=gu,gu=null,st=e):st=t):st=Tt?va(e.stateNode.nextSibling):null;return!0}function ll(){st=Tt=null,Ve=!1}function Zo(){var e=jn;return e!==null&&(Jt===null?Jt=e:Jt.push.apply(Jt,e),jn=null),e}function wi(e){jn===null?jn=[e]:jn.push(e)}var Fo=E(null),il=null,Pa=null;function En(e,t,a){te(Fo,t._currentValue),t._currentValue=a}function Ia(e){e._currentValue=Fo.current,B(Fo)}function Jo(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 Wo(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 S=u;u=o;for(var w=0;w<t.length;w++)if(S.context===t[w]){u.lanes|=a,S=u.alternate,S!==null&&(S.lanes|=a),Jo(u.return,a,e),l||(g=null);break e}u=S.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),Jo(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 Ul(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 S=o.type;aa(o.pendingProps.value,g.value)||(e!==null?e.push(S):e=[S])}}else if(o===ze.current){if(g=o.alternate,g===null)throw Error(s(387));g.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(Ii):e=[Ii])}o=o.return}e!==null&&Wo(t,e,a,l),t.flags|=262144}function Zr(e){for(e=e.firstContext;e!==null;){if(!aa(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function rl(e){il=e,Pa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ot(e){return sf(il,e)}function Fr(e,t){return il===null&&rl(e),sf(e,t)}function sf(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Pa===null){if(e===null)throw Error(s(308));Pa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Pa=Pa.next=t;return a}var Ex=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()})}},wx=n.unstable_scheduleCallback,Cx=n.unstable_NormalPriority,bt={$$typeof:K,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Po(){return{controller:new Ex,data:new Map,refCount:0}}function Ci(e){e.refCount--,e.refCount===0&&wx(Cx,function(){e.controller.abort()})}var Ri=null,Io=0,Hl=0,Bl=null;function Rx(e,t){if(Ri===null){var a=Ri=[];Io=0,Hl=au(),Bl={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Io++,t.then(of,of),t}function of(){if(--Io===0&&Ri!==null){Bl!==null&&(Bl.status="fulfilled");var e=Ri;Ri=null,Hl=0,Bl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function zx(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 cf=D.S;D.S=function(e,t){Xh=qt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Rx(e,t),cf!==null&&cf(e,t)};var sl=E(null);function ec(){var e=sl.current;return e!==null?e:tt.pooledCache}function Jr(e,t){t===null?te(sl,sl.current):te(sl,t.pool)}function uf(){var e=ec();return e===null?null:{parent:bt._currentValue,pool:e}}var ql=Error(s(460)),tc=Error(s(474)),Wr=Error(s(542)),Pr={then:function(){}};function df(e){return e=e.status,e==="fulfilled"||e==="rejected"}function ff(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Za,Za),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,mf(e),e;default:if(typeof t.status=="string")t.then(Za,Za);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,mf(e),e}throw cl=t,ql}}function ol(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(cl=a,ql):a}}var cl=null;function hf(){if(cl===null)throw Error(s(459));var e=cl;return cl=null,e}function mf(e){if(e===ql||e===Wr)throw Error(s(483))}var Yl=null,zi=0;function Ir(e){var t=zi;return zi+=1,Yl===null&&(Yl=[]),ff(Yl,e,t)}function Ti(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function es(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 pf(e){function t(O,z){if(e){var A=O.deletions;A===null?(O.deletions=[z],O.flags|=16):A.push(z)}}function a(O,z){if(!e)return null;for(;z!==null;)t(O,z),z=z.sibling;return null}function l(O){for(var z=new Map;O!==null;)O.key!==null?z.set(O.key,O):z.set(O.index,O),O=O.sibling;return z}function o(O,z){return O=Ja(O,z),O.index=0,O.sibling=null,O}function u(O,z,A){return O.index=A,e?(A=O.alternate,A!==null?(A=A.index,A<z?(O.flags|=67108866,z):A):(O.flags|=67108866,z)):(O.flags|=1048576,z)}function g(O){return e&&O.alternate===null&&(O.flags|=67108866),O}function S(O,z,A,$){return z===null||z.tag!==6?(z=Go(A,O.mode,$),z.return=O,z):(z=o(z,A),z.return=O,z)}function w(O,z,A,$){var je=A.type;return je===M?Y(O,z,A.props.children,$,A.key):z!==null&&(z.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===N&&ol(je)===z.type)?(z=o(z,A.props),Ti(z,A),z.return=O,z):(z=Xr(A.type,A.key,A.props,null,O.mode,$),Ti(z,A),z.return=O,z)}function k(O,z,A,$){return z===null||z.tag!==4||z.stateNode.containerInfo!==A.containerInfo||z.stateNode.implementation!==A.implementation?(z=$o(A,O.mode,$),z.return=O,z):(z=o(z,A.children||[]),z.return=O,z)}function Y(O,z,A,$,je){return z===null||z.tag!==7?(z=nl(A,O.mode,$,je),z.return=O,z):(z=o(z,A),z.return=O,z)}function Z(O,z,A){if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return z=Go(""+z,O.mode,A),z.return=O,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case j:return A=Xr(z.type,z.key,z.props,null,O.mode,A),Ti(A,z),A.return=O,A;case R:return z=$o(z,O.mode,A),z.return=O,z;case N:return z=ol(z),Z(O,z,A)}if(pe(z)||ne(z))return z=nl(z,O.mode,A,null),z.return=O,z;if(typeof z.then=="function")return Z(O,Ir(z),A);if(z.$$typeof===K)return Z(O,Fr(O,z),A);es(O,z)}return null}function U(O,z,A,$){var je=z!==null?z.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return je!==null?null:S(O,z,""+A,$);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case j:return A.key===je?w(O,z,A,$):null;case R:return A.key===je?k(O,z,A,$):null;case N:return A=ol(A),U(O,z,A,$)}if(pe(A)||ne(A))return je!==null?null:Y(O,z,A,$,null);if(typeof A.then=="function")return U(O,z,Ir(A),$);if(A.$$typeof===K)return U(O,z,Fr(O,A),$);es(O,A)}return null}function q(O,z,A,$,je){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return O=O.get(A)||null,S(z,O,""+$,je);if(typeof $=="object"&&$!==null){switch($.$$typeof){case j:return O=O.get($.key===null?A:$.key)||null,w(z,O,$,je);case R:return O=O.get($.key===null?A:$.key)||null,k(z,O,$,je);case N:return $=ol($),q(O,z,A,$,je)}if(pe($)||ne($))return O=O.get(A)||null,Y(z,O,$,je,null);if(typeof $.then=="function")return q(O,z,A,Ir($),je);if($.$$typeof===K)return q(O,z,A,Fr(z,$),je);es(z,$)}return null}function xe(O,z,A,$){for(var je=null,Xe=null,ve=z,De=z=0,Ye=null;ve!==null&&De<A.length;De++){ve.index>De?(Ye=ve,ve=null):Ye=ve.sibling;var Qe=U(O,ve,A[De],$);if(Qe===null){ve===null&&(ve=Ye);break}e&&ve&&Qe.alternate===null&&t(O,ve),z=u(Qe,z,De),Xe===null?je=Qe:Xe.sibling=Qe,Xe=Qe,ve=Ye}if(De===A.length)return a(O,ve),Ve&&Wa(O,De),je;if(ve===null){for(;De<A.length;De++)ve=Z(O,A[De],$),ve!==null&&(z=u(ve,z,De),Xe===null?je=ve:Xe.sibling=ve,Xe=ve);return Ve&&Wa(O,De),je}for(ve=l(ve);De<A.length;De++)Ye=q(ve,O,De,A[De],$),Ye!==null&&(e&&Ye.alternate!==null&&ve.delete(Ye.key===null?De:Ye.key),z=u(Ye,z,De),Xe===null?je=Ye:Xe.sibling=Ye,Xe=Ye);return e&&ve.forEach(function(Gn){return t(O,Gn)}),Ve&&Wa(O,De),je}function we(O,z,A,$){if(A==null)throw Error(s(151));for(var je=null,Xe=null,ve=z,De=z=0,Ye=null,Qe=A.next();ve!==null&&!Qe.done;De++,Qe=A.next()){ve.index>De?(Ye=ve,ve=null):Ye=ve.sibling;var Gn=U(O,ve,Qe.value,$);if(Gn===null){ve===null&&(ve=Ye);break}e&&ve&&Gn.alternate===null&&t(O,ve),z=u(Gn,z,De),Xe===null?je=Gn:Xe.sibling=Gn,Xe=Gn,ve=Ye}if(Qe.done)return a(O,ve),Ve&&Wa(O,De),je;if(ve===null){for(;!Qe.done;De++,Qe=A.next())Qe=Z(O,Qe.value,$),Qe!==null&&(z=u(Qe,z,De),Xe===null?je=Qe:Xe.sibling=Qe,Xe=Qe);return Ve&&Wa(O,De),je}for(ve=l(ve);!Qe.done;De++,Qe=A.next())Qe=q(ve,O,De,Qe.value,$),Qe!==null&&(e&&Qe.alternate!==null&&ve.delete(Qe.key===null?De:Qe.key),z=u(Qe,z,De),Xe===null?je=Qe:Xe.sibling=Qe,Xe=Qe);return e&&ve.forEach(function(qv){return t(O,qv)}),Ve&&Wa(O,De),je}function Ie(O,z,A,$){if(typeof A=="object"&&A!==null&&A.type===M&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case j:e:{for(var je=A.key;z!==null;){if(z.key===je){if(je=A.type,je===M){if(z.tag===7){a(O,z.sibling),$=o(z,A.props.children),$.return=O,O=$;break e}}else if(z.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===N&&ol(je)===z.type){a(O,z.sibling),$=o(z,A.props),Ti($,A),$.return=O,O=$;break e}a(O,z);break}else t(O,z);z=z.sibling}A.type===M?($=nl(A.props.children,O.mode,$,A.key),$.return=O,O=$):($=Xr(A.type,A.key,A.props,null,O.mode,$),Ti($,A),$.return=O,O=$)}return g(O);case R:e:{for(je=A.key;z!==null;){if(z.key===je)if(z.tag===4&&z.stateNode.containerInfo===A.containerInfo&&z.stateNode.implementation===A.implementation){a(O,z.sibling),$=o(z,A.children||[]),$.return=O,O=$;break e}else{a(O,z);break}else t(O,z);z=z.sibling}$=$o(A,O.mode,$),$.return=O,O=$}return g(O);case N:return A=ol(A),Ie(O,z,A,$)}if(pe(A))return xe(O,z,A,$);if(ne(A)){if(je=ne(A),typeof je!="function")throw Error(s(150));return A=je.call(A),we(O,z,A,$)}if(typeof A.then=="function")return Ie(O,z,Ir(A),$);if(A.$$typeof===K)return Ie(O,z,Fr(O,A),$);es(O,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,z!==null&&z.tag===6?(a(O,z.sibling),$=o(z,A),$.return=O,O=$):(a(O,z),$=Go(A,O.mode,$),$.return=O,O=$),g(O)):a(O,z)}return function(O,z,A,$){try{zi=0;var je=Ie(O,z,A,$);return Yl=null,je}catch(ve){if(ve===ql||ve===Wr)throw ve;var Xe=na(29,ve,null,O.mode);return Xe.lanes=$,Xe.return=O,Xe}}}var ul=pf(!0),gf=pf(!1),wn=!1;function ac(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function nc(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 Cn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Rn(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ze&2)!==0){var o=l.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),l.pending=t,t=Kr(e),Pd(e,null,a),t}return $r(e,l,t,a),Kr(e)}function Oi(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,Mr(e,a)}}function lc(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 ic=!1;function Mi(){if(ic){var e=Bl;if(e!==null)throw e}}function Di(e,t,a,l){ic=!1;var o=e.updateQueue;wn=!1;var u=o.firstBaseUpdate,g=o.lastBaseUpdate,S=o.shared.pending;if(S!==null){o.shared.pending=null;var w=S,k=w.next;w.next=null,g===null?u=k:g.next=k,g=w;var Y=e.alternate;Y!==null&&(Y=Y.updateQueue,S=Y.lastBaseUpdate,S!==g&&(S===null?Y.firstBaseUpdate=k:S.next=k,Y.lastBaseUpdate=w))}if(u!==null){var Z=o.baseState;g=0,Y=k=w=null,S=u;do{var U=S.lane&-536870913,q=U!==S.lane;if(q?(qe&U)===U:(l&U)===U){U!==0&&U===Hl&&(ic=!0),Y!==null&&(Y=Y.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var xe=e,we=S;U=t;var Ie=a;switch(we.tag){case 1:if(xe=we.payload,typeof xe=="function"){Z=xe.call(Ie,Z,U);break e}Z=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=we.payload,U=typeof xe=="function"?xe.call(Ie,Z,U):xe,U==null)break e;Z=x({},Z,U);break e;case 2:wn=!0}}U=S.callback,U!==null&&(e.flags|=64,q&&(e.flags|=8192),q=o.callbacks,q===null?o.callbacks=[U]:q.push(U))}else q={lane:U,tag:S.tag,payload:S.payload,callback:S.callback,next:null},Y===null?(k=Y=q,w=Z):Y=Y.next=q,g|=U;if(S=S.next,S===null){if(S=o.shared.pending,S===null)break;q=S,S=q.next,q.next=null,o.lastBaseUpdate=q,o.shared.pending=null}}while(!0);Y===null&&(w=Z),o.baseState=w,o.firstBaseUpdate=k,o.lastBaseUpdate=Y,u===null&&(o.shared.lanes=0),Dn|=g,e.lanes=g,e.memoizedState=Z}}function yf(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function xf(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)yf(a[e],t)}var Vl=E(null),ts=E(0);function vf(e,t){e=cn,te(ts,e),te(Vl,t),cn=e|t.baseLanes}function rc(){te(ts,cn),te(Vl,Vl.current)}function sc(){cn=ts.current,B(Vl),B(ts)}var la=E(null),xa=null;function zn(e){var t=e.alternate;te(yt,yt.current&1),te(la,e),xa===null&&(t===null||Vl.current!==null||t.memoizedState!==null)&&(xa=e)}function oc(e){te(yt,yt.current),te(la,e),xa===null&&(xa=e)}function bf(e){e.tag===22?(te(yt,yt.current),te(la,e),xa===null&&(xa=e)):Tn()}function Tn(){te(yt,yt.current),te(la,la.current)}function ia(e){B(la),xa===e&&(xa=null),B(yt)}var yt=E(0);function as(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||mu(a)||pu(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 en=0,Me=null,We=null,St=null,ns=!1,Gl=!1,dl=!1,ls=0,Ai=0,$l=null,Tx=0;function ft(){throw Error(s(321))}function cc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!aa(e[a],t[a]))return!1;return!0}function uc(e,t,a,l,o,u){return en=u,Me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?nh:Ec,dl=!1,u=a(l,o),dl=!1,Gl&&(u=_f(t,a,l,o)),Sf(e),u}function Sf(e){D.H=Ui;var t=We!==null&&We.next!==null;if(en=0,St=We=Me=null,ns=!1,Ai=0,$l=null,t)throw Error(s(300));e===null||_t||(e=e.dependencies,e!==null&&Zr(e)&&(_t=!0))}function _f(e,t,a,l){Me=e;var o=0;do{if(Gl&&($l=null),Ai=0,Gl=!1,25<=o)throw Error(s(301));if(o+=1,St=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)}D.H=lh,u=t(a,l)}while(Gl);return u}function Ox(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?Li(t):t,e=e.useState()[0],(We!==null?We.memoizedState:null)!==e&&(Me.flags|=1024),t}function dc(){var e=ls!==0;return ls=0,e}function fc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function hc(e){if(ns){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ns=!1}en=0,St=We=Me=null,Gl=!1,Ai=ls=0,$l=null}function Vt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return St===null?Me.memoizedState=St=e:St=St.next=e,St}function xt(){if(We===null){var e=Me.alternate;e=e!==null?e.memoizedState:null}else e=We.next;var t=St===null?Me.memoizedState:St.next;if(t!==null)St=t,We=e;else{if(e===null)throw Me.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},St===null?Me.memoizedState=St=e:St=St.next=e}return St}function is(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Li(e){var t=Ai;return Ai+=1,$l===null&&($l=[]),e=ff($l,e,t),t=Me,(St===null?t.memoizedState:St.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?nh:Ec),e}function rs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Li(e);if(e.$$typeof===K)return Ot(e)}throw Error(s(438,String(e)))}function mc(e){var t=null,a=Me.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=Me.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=is(),Me.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]=F;return t.index++,a}function tn(e,t){return typeof t=="function"?t(e):t}function ss(e){var t=xt();return pc(t,We,e)}function pc(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 S=g=null,w=null,k=t,Y=!1;do{var Z=k.lane&-536870913;if(Z!==k.lane?(qe&Z)===Z:(en&Z)===Z){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}),Z===Hl&&(Y=!0);else if((en&U)===U){k=k.next,U===Hl&&(Y=!0);continue}else Z={lane:0,revertLane:k.revertLane,gesture:null,action:k.action,hasEagerState:k.hasEagerState,eagerState:k.eagerState,next:null},w===null?(S=w=Z,g=u):w=w.next=Z,Me.lanes|=U,Dn|=U;Z=k.action,dl&&a(u,Z),u=k.hasEagerState?k.eagerState:a(u,Z)}else U={lane:Z,revertLane:k.revertLane,gesture:k.gesture,action:k.action,hasEagerState:k.hasEagerState,eagerState:k.eagerState,next:null},w===null?(S=w=U,g=u):w=w.next=U,Me.lanes|=Z,Dn|=Z;k=k.next}while(k!==null&&k!==t);if(w===null?g=u:w.next=S,!aa(u,e.memoizedState)&&(_t=!0,Y&&(a=Bl,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 gc(e){var t=xt(),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);aa(u,t.memoizedState)||(_t=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,l]}function jf(e,t,a){var l=Me,o=xt(),u=Ve;if(u){if(a===void 0)throw Error(s(407));a=a()}else a=t();var g=!aa((We||o).memoizedState,a);if(g&&(o.memoizedState=a,_t=!0),o=o.queue,vc(wf.bind(null,l,o,e),[e]),o.getSnapshot!==t||g||St!==null&&St.memoizedState.tag&1){if(l.flags|=2048,Kl(9,{destroy:void 0},Ef.bind(null,l,o,a,t),null),tt===null)throw Error(s(349));u||(en&127)!==0||Nf(l,t,a)}return a}function Nf(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Me.updateQueue,t===null?(t=is(),Me.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Ef(e,t,a,l){t.value=a,t.getSnapshot=l,Cf(t)&&Rf(e)}function wf(e,t,a){return a(function(){Cf(t)&&Rf(e)})}function Cf(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!aa(e,a)}catch{return!0}}function Rf(e){var t=al(e,2);t!==null&&Wt(t,e,2)}function yc(e){var t=Vt();if(typeof e=="function"){var a=e;if(e=a(),dl){Ct(!0);try{a()}finally{Ct(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:tn,lastRenderedState:e},t}function zf(e,t,a,l){return e.baseState=a,pc(e,We,typeof l=="function"?l:tn)}function Mx(e,t,a,l,o){if(us(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)}};D.T!==null?a(!0):u.isTransition=!1,l(u),a=t.pending,a===null?(u.next=t.pending=u,Tf(t,u)):(u.next=a.next,t.pending=a.next=u)}}function Tf(e,t){var a=t.action,l=t.payload,o=e.state;if(t.isTransition){var u=D.T,g={};D.T=g;try{var S=a(o,l),w=D.S;w!==null&&w(g,S),Of(e,t,S)}catch(k){xc(e,t,k)}finally{u!==null&&g.types!==null&&(u.types=g.types),D.T=u}}else try{u=a(o,l),Of(e,t,u)}catch(k){xc(e,t,k)}}function Of(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Mf(e,t,l)},function(l){return xc(e,t,l)}):Mf(e,t,a)}function Mf(e,t,a){t.status="fulfilled",t.value=a,Df(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Tf(e,a)))}function xc(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,Df(t),t=t.next;while(t!==l)}e.action=null}function Df(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Af(e,t){return t}function Lf(e,t){if(Ve){var a=tt.formState;if(a!==null){e:{var l=Me;if(Ve){if(st){t:{for(var o=st,u=ya;o.nodeType!==8;){if(!u){o=null;break t}if(o=va(o.nextSibling),o===null){o=null;break t}}u=o.data,o=u==="F!"||u==="F"?o:null}if(o){st=va(o.nextSibling),l=o.data==="F!";break e}}Nn(l)}l=!1}l&&(t=a[0])}}return a=Vt(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Af,lastRenderedState:t},a.queue=l,a=eh.bind(null,Me,l),l.dispatch=a,l=yc(!1),u=Nc.bind(null,Me,!1,l.queue),l=Vt(),o={state:t,dispatch:null,action:e,pending:null},l.queue=o,a=Mx.bind(null,Me,o,u,a),o.dispatch=a,l.memoizedState=e,[t,a,!1]}function kf(e){var t=xt();return Uf(t,We,e)}function Uf(e,t,a){if(t=pc(e,t,Af)[0],e=ss(tn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Li(t)}catch(g){throw g===ql?Wr:g}else l=t;t=xt();var o=t.queue,u=o.dispatch;return a!==t.memoizedState&&(Me.flags|=2048,Kl(9,{destroy:void 0},Dx.bind(null,o,a),null)),[l,u,e]}function Dx(e,t){e.action=t}function Hf(e){var t=xt(),a=We;if(a!==null)return Uf(t,a,e);xt(),t=t.memoizedState,a=xt();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function Kl(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=Me.updateQueue,t===null&&(t=is(),Me.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 Bf(){return xt().memoizedState}function os(e,t,a,l){var o=Vt();Me.flags|=e,o.memoizedState=Kl(1|t,{destroy:void 0},a,l===void 0?null:l)}function cs(e,t,a,l){var o=xt();l=l===void 0?null:l;var u=o.memoizedState.inst;We!==null&&l!==null&&cc(l,We.memoizedState.deps)?o.memoizedState=Kl(t,u,a,l):(Me.flags|=e,o.memoizedState=Kl(1|t,u,a,l))}function qf(e,t){os(8390656,8,e,t)}function vc(e,t){cs(2048,8,e,t)}function Ax(e){Me.flags|=4;var t=Me.updateQueue;if(t===null)t=is(),Me.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Yf(e){var t=xt().memoizedState;return Ax({ref:t,nextImpl:e}),function(){if((Ze&2)!==0)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function Vf(e,t){return cs(4,2,e,t)}function Gf(e,t){return cs(4,4,e,t)}function $f(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 Kf(e,t,a){a=a!=null?a.concat([e]):null,cs(4,4,$f.bind(null,t,e),a)}function bc(){}function Xf(e,t){var a=xt();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&cc(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function Qf(e,t){var a=xt();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&cc(t,l[1]))return l[0];if(l=e(),dl){Ct(!0);try{e()}finally{Ct(!1)}}return a.memoizedState=[l,t],l}function Sc(e,t,a){return a===void 0||(en&1073741824)!==0&&(qe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Zh(),Me.lanes|=e,Dn|=e,a)}function Zf(e,t,a,l){return aa(a,t)?a:Vl.current!==null?(e=Sc(e,a,l),aa(e,t)||(_t=!0),e):(en&42)===0||(en&1073741824)!==0&&(qe&261930)===0?(_t=!0,e.memoizedState=a):(e=Zh(),Me.lanes|=e,Dn|=e,t)}function Ff(e,t,a,l,o){var u=W.p;W.p=u!==0&&8>u?u:8;var g=D.T,S={};D.T=S,Nc(e,!1,t,a);try{var w=o(),k=D.S;if(k!==null&&k(S,w),w!==null&&typeof w=="object"&&typeof w.then=="function"){var Y=zx(w,l);ki(e,t,Y,oa(e))}else ki(e,t,l,oa(e))}catch(Z){ki(e,t,{then:function(){},status:"rejected",reason:Z},oa())}finally{W.p=u,g!==null&&S.types!==null&&(g.types=S.types),D.T=g}}function Lx(){}function _c(e,t,a,l){if(e.tag!==5)throw Error(s(476));var o=Jf(e).queue;Ff(e,o,t,ue,a===null?Lx:function(){return Wf(e),a(l)})}function Jf(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:tn,lastRenderedState:ue},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:tn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Wf(e){var t=Jf(e);t.next===null&&(t=e.alternate.memoizedState),ki(e,t.next.queue,{},oa())}function jc(){return Ot(Ii)}function Pf(){return xt().memoizedState}function If(){return xt().memoizedState}function kx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=oa();e=Cn(a);var l=Rn(t,e,a);l!==null&&(Wt(l,t,a),Oi(l,t,a)),t={cache:Po()},e.payload=t;return}t=t.return}}function Ux(e,t,a){var l=oa();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},us(e)?th(t,a):(a=Yo(e,t,a,l),a!==null&&(Wt(a,e,l),ah(a,t,l)))}function eh(e,t,a){var l=oa();ki(e,t,a,l)}function ki(e,t,a,l){var o={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(us(e))th(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,S=u(g,a);if(o.hasEagerState=!0,o.eagerState=S,aa(S,g))return $r(e,t,o,0),tt===null&&Gr(),!1}catch{}if(a=Yo(e,t,o,l),a!==null)return Wt(a,e,l),ah(a,t,l),!0}return!1}function Nc(e,t,a,l){if(l={lane:2,revertLane:au(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},us(e)){if(t)throw Error(s(479))}else t=Yo(e,a,l,2),t!==null&&Wt(t,e,2)}function us(e){var t=e.alternate;return e===Me||t!==null&&t===Me}function th(e,t){Gl=ns=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function ah(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Mr(e,a)}}var Ui={readContext:Ot,use:rs,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useLayoutEffect:ft,useInsertionEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useSyncExternalStore:ft,useId:ft,useHostTransitionStatus:ft,useFormState:ft,useActionState:ft,useOptimistic:ft,useMemoCache:ft,useCacheRefresh:ft};Ui.useEffectEvent=ft;var nh={readContext:Ot,use:rs,useCallback:function(e,t){return Vt().memoizedState=[e,t===void 0?null:t],e},useContext:Ot,useEffect:qf,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,os(4194308,4,$f.bind(null,t,e),a)},useLayoutEffect:function(e,t){return os(4194308,4,e,t)},useInsertionEffect:function(e,t){os(4,2,e,t)},useMemo:function(e,t){var a=Vt();t=t===void 0?null:t;var l=e();if(dl){Ct(!0);try{e()}finally{Ct(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=Vt();if(a!==void 0){var o=a(t);if(dl){Ct(!0);try{a(t)}finally{Ct(!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=Ux.bind(null,Me,e),[l.memoizedState,e]},useRef:function(e){var t=Vt();return e={current:e},t.memoizedState=e},useState:function(e){e=yc(e);var t=e.queue,a=eh.bind(null,Me,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:bc,useDeferredValue:function(e,t){var a=Vt();return Sc(a,e,t)},useTransition:function(){var e=yc(!1);return e=Ff.bind(null,Me,e.queue,!0,!1),Vt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=Me,o=Vt();if(Ve){if(a===void 0)throw Error(s(407));a=a()}else{if(a=t(),tt===null)throw Error(s(349));(qe&127)!==0||Nf(l,t,a)}o.memoizedState=a;var u={value:a,getSnapshot:t};return o.queue=u,qf(wf.bind(null,l,u,e),[e]),l.flags|=2048,Kl(9,{destroy:void 0},Ef.bind(null,l,u,a,t),null),a},useId:function(){var e=Vt(),t=tt.identifierPrefix;if(Ve){var a=Ba,l=Ha;a=(l&~(1<<32-At(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=ls++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Tx++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:jc,useFormState:Lf,useActionState:Lf,useOptimistic:function(e){var t=Vt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Nc.bind(null,Me,!0,a),a.dispatch=t,[e,t]},useMemoCache:mc,useCacheRefresh:function(){return Vt().memoizedState=kx.bind(null,Me)},useEffectEvent:function(e){var t=Vt(),a={impl:e};return t.memoizedState=a,function(){if((Ze&2)!==0)throw Error(s(440));return a.impl.apply(void 0,arguments)}}},Ec={readContext:Ot,use:rs,useCallback:Xf,useContext:Ot,useEffect:vc,useImperativeHandle:Kf,useInsertionEffect:Vf,useLayoutEffect:Gf,useMemo:Qf,useReducer:ss,useRef:Bf,useState:function(){return ss(tn)},useDebugValue:bc,useDeferredValue:function(e,t){var a=xt();return Zf(a,We.memoizedState,e,t)},useTransition:function(){var e=ss(tn)[0],t=xt().memoizedState;return[typeof e=="boolean"?e:Li(e),t]},useSyncExternalStore:jf,useId:Pf,useHostTransitionStatus:jc,useFormState:kf,useActionState:kf,useOptimistic:function(e,t){var a=xt();return zf(a,We,e,t)},useMemoCache:mc,useCacheRefresh:If};Ec.useEffectEvent=Yf;var lh={readContext:Ot,use:rs,useCallback:Xf,useContext:Ot,useEffect:vc,useImperativeHandle:Kf,useInsertionEffect:Vf,useLayoutEffect:Gf,useMemo:Qf,useReducer:gc,useRef:Bf,useState:function(){return gc(tn)},useDebugValue:bc,useDeferredValue:function(e,t){var a=xt();return We===null?Sc(a,e,t):Zf(a,We.memoizedState,e,t)},useTransition:function(){var e=gc(tn)[0],t=xt().memoizedState;return[typeof e=="boolean"?e:Li(e),t]},useSyncExternalStore:jf,useId:Pf,useHostTransitionStatus:jc,useFormState:Hf,useActionState:Hf,useOptimistic:function(e,t){var a=xt();return We!==null?zf(a,We,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:mc,useCacheRefresh:If};lh.useEffectEvent=Yf;function wc(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 Cc={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=oa(),o=Cn(l);o.payload=t,a!=null&&(o.callback=a),t=Rn(e,o,l),t!==null&&(Wt(t,e,l),Oi(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=oa(),o=Cn(l);o.tag=1,o.payload=t,a!=null&&(o.callback=a),t=Rn(e,o,l),t!==null&&(Wt(t,e,l),Oi(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=oa(),l=Cn(a);l.tag=2,t!=null&&(l.callback=t),t=Rn(e,l,a),t!==null&&(Wt(t,e,a),Oi(t,e,a))}};function ih(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?!ji(a,l)||!ji(o,u):!0}function rh(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&&Cc.enqueueReplaceState(t,t.state,null)}function fl(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 sh(e){Vr(e)}function oh(e){console.error(e)}function ch(e){Vr(e)}function ds(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function uh(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 Rc(e,t,a){return a=Cn(a),a.tag=3,a.payload={element:null},a.callback=function(){ds(e,t)},a}function dh(e){return e=Cn(e),e.tag=3,e}function fh(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(){uh(t,a,l)}}var g=a.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){uh(t,a,l),typeof o!="function"&&(An===null?An=new Set([this]):An.add(this));var S=l.stack;this.componentDidCatch(l.value,{componentStack:S!==null?S:""})})}function Hx(e,t,a,l,o){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&Ul(t,a,o,!0),a=la.current,a!==null){switch(a.tag){case 31:case 13:return xa===null?js():a.alternate===null&&ht===0&&(ht=3),a.flags&=-257,a.flags|=65536,a.lanes=o,l===Pr?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),Ic(e,l,o)),!1;case 22:return a.flags|=65536,l===Pr?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)),Ic(e,l,o)),!1}throw Error(s(435,a.tag))}return Ic(e,l,o),js(),!1}if(Ve)return t=la.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,l!==Qo&&(e=Error(s(422),{cause:l}),wi(ma(e,a)))):(l!==Qo&&(t=Error(s(423),{cause:l}),wi(ma(t,a))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,l=ma(l,a),o=Rc(e.stateNode,l,o),lc(e,o),ht!==4&&(ht=2)),!1;var u=Error(s(520),{cause:l});if(u=ma(u,a),Ki===null?Ki=[u]:Ki.push(u),ht!==4&&(ht=2),t===null)return!0;l=ma(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=o&-o,a.lanes|=e,e=Rc(a.stateNode,l,e),lc(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"&&(An===null||!An.has(u))))return a.flags|=65536,o&=-o,a.lanes|=o,o=dh(o),fh(o,e,a,l),lc(a,o),!1}a=a.return}while(a!==null);return!1}var zc=Error(s(461)),_t=!1;function Mt(e,t,a,l){t.child=e===null?gf(t,null,a,l):ul(t,e.child,a,l)}function hh(e,t,a,l,o){a=a.render;var u=t.ref;if("ref"in l){var g={};for(var S in l)S!=="ref"&&(g[S]=l[S])}else g=l;return rl(t),l=uc(e,t,a,g,u,o),S=dc(),e!==null&&!_t?(fc(e,t,o),an(e,t,o)):(Ve&&S&&Ko(t),t.flags|=1,Mt(e,t,l,o),t.child)}function mh(e,t,a,l,o){if(e===null){var u=a.type;return typeof u=="function"&&!Vo(u)&&u.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=u,ph(e,t,u,l,o)):(e=Xr(a.type,null,l,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Uc(e,o)){var g=u.memoizedProps;if(a=a.compare,a=a!==null?a:ji,a(g,l)&&e.ref===t.ref)return an(e,t,o)}return t.flags|=1,e=Ja(u,l),e.ref=t.ref,e.return=t,t.child=e}function ph(e,t,a,l,o){if(e!==null){var u=e.memoizedProps;if(ji(u,l)&&e.ref===t.ref)if(_t=!1,t.pendingProps=l=u,Uc(e,o))(e.flags&131072)!==0&&(_t=!0);else return t.lanes=e.lanes,an(e,t,o)}return Tc(e,t,a,l,o)}function gh(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 yh(e,t,u,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Jr(t,u!==null?u.cachePool:null),u!==null?vf(t,u):rc(),bf(t);else return l=t.lanes=536870912,yh(e,t,u!==null?u.baseLanes|a:a,a,l)}else u!==null?(Jr(t,u.cachePool),vf(t,u),Tn(),t.memoizedState=null):(e!==null&&Jr(t,null),rc(),Tn());return Mt(e,t,o,a),t.child}function Hi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function yh(e,t,a,l,o){var u=ec();return u=u===null?null:{parent:bt._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&Jr(t,null),rc(),bf(t),e!==null&&Ul(e,t,l,!0),t.childLanes=o,null}function fs(e,t){return t=ms({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function xh(e,t,a){return ul(t,e.child,null,a),e=fs(t,t.pendingProps),e.flags|=2,ia(t),t.memoizedState=null,e}function Bx(e,t,a){var l=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ve){if(l.mode==="hidden")return e=fs(t,l),t.lanes=536870912,Hi(null,e);if(oc(t),(e=st)?(e=Tm(e,ya),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_n!==null?{id:Ha,overflow:Ba}:null,retryLane:536870912,hydrationErrors:null},a=ef(e),a.return=t,t.child=a,Tt=t,st=null)):e=null,e===null)throw Nn(t);return t.lanes=536870912,null}return fs(t,l)}var u=e.memoizedState;if(u!==null){var g=u.dehydrated;if(oc(t),o)if(t.flags&256)t.flags&=-257,t=xh(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558));else if(_t||Ul(e,t,a,!1),o=(a&e.childLanes)!==0,_t||o){if(l=tt,l!==null&&(g=C(l,a),g!==0&&g!==u.retryLane))throw u.retryLane=g,al(e,g),Wt(l,e,g),zc;js(),t=xh(e,t,a)}else e=u.treeContext,st=va(g.nextSibling),Tt=t,Ve=!0,jn=null,ya=!1,e!==null&&nf(t,e),t=fs(t,l),t.flags|=4096;return t}return e=Ja(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function hs(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 Tc(e,t,a,l,o){return rl(t),a=uc(e,t,a,l,void 0,o),l=dc(),e!==null&&!_t?(fc(e,t,o),an(e,t,o)):(Ve&&l&&Ko(t),t.flags|=1,Mt(e,t,a,o),t.child)}function vh(e,t,a,l,o,u){return rl(t),t.updateQueue=null,a=_f(t,l,a,o),Sf(e),l=dc(),e!==null&&!_t?(fc(e,t,u),an(e,t,u)):(Ve&&l&&Ko(t),t.flags|=1,Mt(e,t,a,u),t.child)}function bh(e,t,a,l,o){if(rl(t),t.stateNode===null){var u=Dl,g=a.contextType;typeof g=="object"&&g!==null&&(u=Ot(g)),u=new a(l,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Cc,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=l,u.state=t.memoizedState,u.refs={},ac(t),g=a.contextType,u.context=typeof g=="object"&&g!==null?Ot(g):Dl,u.state=t.memoizedState,g=a.getDerivedStateFromProps,typeof g=="function"&&(wc(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&&Cc.enqueueReplaceState(u,u.state,null),Di(t,l,u,o),Mi(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){u=t.stateNode;var S=t.memoizedProps,w=fl(a,S);u.props=w;var k=u.context,Y=a.contextType;g=Dl,typeof Y=="object"&&Y!==null&&(g=Ot(Y));var Z=a.getDerivedStateFromProps;Y=typeof Z=="function"||typeof u.getSnapshotBeforeUpdate=="function",S=t.pendingProps!==S,Y||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(S||k!==g)&&rh(t,u,l,g),wn=!1;var U=t.memoizedState;u.state=U,Di(t,l,u,o),Mi(),k=t.memoizedState,S||U!==k||wn?(typeof Z=="function"&&(wc(t,a,Z,l),k=t.memoizedState),(w=wn||ih(t,a,w,l,U,k,g))?(Y||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,nc(e,t),g=t.memoizedProps,Y=fl(a,g),u.props=Y,Z=t.pendingProps,U=u.context,k=a.contextType,w=Dl,typeof k=="object"&&k!==null&&(w=Ot(k)),S=a.getDerivedStateFromProps,(k=typeof S=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(g!==Z||U!==w)&&rh(t,u,l,w),wn=!1,U=t.memoizedState,u.state=U,Di(t,l,u,o),Mi();var q=t.memoizedState;g!==Z||U!==q||wn||e!==null&&e.dependencies!==null&&Zr(e.dependencies)?(typeof S=="function"&&(wc(t,a,S,l),q=t.memoizedState),(Y=wn||ih(t,a,Y,l,U,q,w)||e!==null&&e.dependencies!==null&&Zr(e.dependencies))?(k||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(l,q,w),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(l,q,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=q),u.props=l,u.state=q,u.context=w,l=Y):(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,hs(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=ul(t,e.child,null,o),t.child=ul(t,null,a,o)):Mt(e,t,a,o),t.memoizedState=u.state,e=t.child):e=an(e,t,o),e}function Sh(e,t,a,l){return ll(),t.flags|=256,Mt(e,t,a,l),t.child}var Oc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Mc(e){return{baseLanes:e,cachePool:uf()}}function Dc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=sa),e}function _h(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:(yt.current&2)!==0),g&&(o=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ve){if(o?zn(t):Tn(),(e=st)?(e=Tm(e,ya),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_n!==null?{id:Ha,overflow:Ba}:null,retryLane:536870912,hydrationErrors:null},a=ef(e),a.return=t,t.child=a,Tt=t,st=null)):e=null,e===null)throw Nn(t);return pu(e)?t.lanes=32:t.lanes=536870912,null}var S=l.children;return l=l.fallback,o?(Tn(),o=t.mode,S=ms({mode:"hidden",children:S},o),l=nl(l,o,a,null),S.return=t,l.return=t,S.sibling=l,t.child=S,l=t.child,l.memoizedState=Mc(a),l.childLanes=Dc(e,g,a),t.memoizedState=Oc,Hi(null,l)):(zn(t),Ac(t,S))}var w=e.memoizedState;if(w!==null&&(S=w.dehydrated,S!==null)){if(u)t.flags&256?(zn(t),t.flags&=-257,t=Lc(e,t,a)):t.memoizedState!==null?(Tn(),t.child=e.child,t.flags|=128,t=null):(Tn(),S=l.fallback,o=t.mode,l=ms({mode:"visible",children:l.children},o),S=nl(S,o,a,null),S.flags|=2,l.return=t,S.return=t,l.sibling=S,t.child=l,ul(t,e.child,null,a),l=t.child,l.memoizedState=Mc(a),l.childLanes=Dc(e,g,a),t.memoizedState=Oc,t=Hi(null,l));else if(zn(t),pu(S)){if(g=S.nextSibling&&S.nextSibling.dataset,g)var k=g.dgst;g=k,l=Error(s(419)),l.stack="",l.digest=g,wi({value:l,source:null,stack:null}),t=Lc(e,t,a)}else if(_t||Ul(e,t,a,!1),g=(a&e.childLanes)!==0,_t||g){if(g=tt,g!==null&&(l=C(g,a),l!==0&&l!==w.retryLane))throw w.retryLane=l,al(e,l),Wt(g,e,l),zc;mu(S)||js(),t=Lc(e,t,a)}else mu(S)?(t.flags|=192,t.child=e.child,t=null):(e=w.treeContext,st=va(S.nextSibling),Tt=t,Ve=!0,jn=null,ya=!1,e!==null&&nf(t,e),t=Ac(t,l.children),t.flags|=4096);return t}return o?(Tn(),S=l.fallback,o=t.mode,w=e.child,k=w.sibling,l=Ja(w,{mode:"hidden",children:l.children}),l.subtreeFlags=w.subtreeFlags&65011712,k!==null?S=Ja(k,S):(S=nl(S,o,a,null),S.flags|=2),S.return=t,l.return=t,l.sibling=S,t.child=l,Hi(null,l),l=t.child,S=e.child.memoizedState,S===null?S=Mc(a):(o=S.cachePool,o!==null?(w=bt._currentValue,o=o.parent!==w?{parent:w,pool:w}:o):o=uf(),S={baseLanes:S.baseLanes|a,cachePool:o}),l.memoizedState=S,l.childLanes=Dc(e,g,a),t.memoizedState=Oc,Hi(e.child,l)):(zn(t),a=e.child,e=a.sibling,a=Ja(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 Ac(e,t){return t=ms({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ms(e,t){return e=na(22,e,null,t),e.lanes=0,e}function Lc(e,t,a){return ul(t,e.child,null,a),e=Ac(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function jh(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Jo(e.return,t,a)}function kc(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 Nh(e,t,a){var l=t.pendingProps,o=l.revealOrder,u=l.tail;l=l.children;var g=yt.current,S=(g&2)!==0;if(S?(g=g&1|2,t.flags|=128):g&=1,te(yt,g),Mt(e,t,l,a),l=Ve?Ei:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&jh(e,a,t);else if(e.tag===19)jh(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&&as(e)===null&&(o=a),a=a.sibling;a=o,a===null?(o=t.child,t.child=null):(o=a.sibling,a.sibling=null),kc(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&&as(e)===null){t.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}kc(t,!0,a,null,u,l);break;case"together":kc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function an(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Dn|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Ul(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=Ja(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Ja(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Uc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Zr(e)))}function qx(e,t,a){switch(t.tag){case 3:lt(t,t.stateNode.containerInfo),En(t,bt,e.memoizedState.cache),ll();break;case 27:case 5:wt(t);break;case 4:lt(t,t.stateNode.containerInfo);break;case 10:En(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,oc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(zn(t),t.flags|=128,null):(a&t.child.childLanes)!==0?_h(e,t,a):(zn(t),e=an(e,t,a),e!==null?e.sibling:null);zn(t);break;case 19:var o=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(Ul(e,t,a,!1),l=(a&t.childLanes)!==0),o){if(l)return Nh(e,t,a);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),te(yt,yt.current),l)break;return null;case 22:return t.lanes=0,gh(e,t,a,t.pendingProps);case 24:En(t,bt,e.memoizedState.cache)}return an(e,t,a)}function Eh(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)_t=!0;else{if(!Uc(e,a)&&(t.flags&128)===0)return _t=!1,qx(e,t,a);_t=(e.flags&131072)!==0}else _t=!1,Ve&&(t.flags&1048576)!==0&&af(t,Ei,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=ol(t.elementType),t.type=e,typeof e=="function")Vo(e)?(l=fl(e,l),t.tag=1,t=bh(null,t,e,l,a)):(t.tag=0,t=Tc(null,t,e,l,a));else{if(e!=null){var o=e.$$typeof;if(o===re){t.tag=11,t=hh(null,t,e,l,a);break e}else if(o===I){t.tag=14,t=mh(null,t,e,l,a);break e}}throw t=ee(e)||e,Error(s(306,t,""))}}return t;case 0:return Tc(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,o=fl(l,t.pendingProps),bh(e,t,l,o,a);case 3:e:{if(lt(t,t.stateNode.containerInfo),e===null)throw Error(s(387));l=t.pendingProps;var u=t.memoizedState;o=u.element,nc(e,t),Di(t,l,null,a);var g=t.memoizedState;if(l=g.cache,En(t,bt,l),l!==u.cache&&Wo(t,[bt],a,!0),Mi(),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=Sh(e,t,l,a);break e}else if(l!==o){o=ma(Error(s(424)),t),wi(o),t=Sh(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,st=va(e.firstChild),Tt=t,Ve=!0,jn=null,ya=!0,a=gf(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(ll(),l===o){t=an(e,t,a);break e}Mt(e,t,l,a)}t=t.child}return t;case 26:return hs(e,t),e===null?(a=km(t.type,null,t.pendingProps,null))?t.memoizedState=a:Ve||(a=t.type,e=t.pendingProps,l=Ts(Ne.current).createElement(a),l[oe]=t,l[me]=e,Dt(l,a,e),nt(l),t.stateNode=l):t.memoizedState=km(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return wt(t),e===null&&Ve&&(l=t.stateNode=Dm(t.type,t.pendingProps,Ne.current),Tt=t,ya=!0,o=st,Hn(t.type)?(gu=o,st=va(l.firstChild)):st=o),Mt(e,t,t.pendingProps.children,a),hs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ve&&((o=l=st)&&(l=gv(l,t.type,t.pendingProps,ya),l!==null?(t.stateNode=l,Tt=t,st=va(l.firstChild),ya=!1,o=!0):o=!1),o||Nn(t)),wt(t),o=t.type,u=t.pendingProps,g=e!==null?e.memoizedProps:null,l=u.children,du(o,u)?l=null:g!==null&&du(o,g)&&(t.flags|=32),t.memoizedState!==null&&(o=uc(e,t,Ox,null,null,a),Ii._currentValue=o),hs(e,t),Mt(e,t,l,a),t.child;case 6:return e===null&&Ve&&((e=a=st)&&(a=yv(a,t.pendingProps,ya),a!==null?(t.stateNode=a,Tt=t,st=null,e=!0):e=!1),e||Nn(t)),null;case 13:return _h(e,t,a);case 4:return lt(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=ul(t,null,l,a):Mt(e,t,l,a),t.child;case 11:return hh(e,t,t.type,t.pendingProps,a);case 7:return Mt(e,t,t.pendingProps,a),t.child;case 8:return Mt(e,t,t.pendingProps.children,a),t.child;case 12:return Mt(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,En(t,t.type,l.value),Mt(e,t,l.children,a),t.child;case 9:return o=t.type._context,l=t.pendingProps.children,rl(t),o=Ot(o),l=l(o),t.flags|=1,Mt(e,t,l,a),t.child;case 14:return mh(e,t,t.type,t.pendingProps,a);case 15:return ph(e,t,t.type,t.pendingProps,a);case 19:return Nh(e,t,a);case 31:return Bx(e,t,a);case 22:return gh(e,t,a,t.pendingProps);case 24:return rl(t),l=Ot(bt),e===null?(o=ec(),o===null&&(o=tt,u=Po(),o.pooledCache=u,u.refCount++,u!==null&&(o.pooledCacheLanes|=a),o=u),t.memoizedState={parent:l,cache:o},ac(t),En(t,bt,o)):((e.lanes&a)!==0&&(nc(e,t),Di(t,null,null,a),Mi()),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),En(t,bt,l)):(l=u.cache,En(t,bt,l),l!==o.cache&&Wo(t,[bt],a,!0))),Mt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function nn(e){e.flags|=4}function Hc(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(Ph())e.flags|=8192;else throw cl=Pr,tc}else e.flags&=-16777217}function wh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ym(t))if(Ph())e.flags|=8192;else throw cl=Pr,tc}function ps(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?pi():536870912,e.lanes|=t,Fl|=t)}function Bi(e,t){if(!Ve)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 ot(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 Yx(e,t,a){var l=t.pendingProps;switch(Xo(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ot(t),null;case 1:return ot(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Ia(bt),he(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(kl(t)?nn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Zo())),ot(t),null;case 26:var o=t.type,u=t.memoizedState;return e===null?(nn(t),u!==null?(ot(t),wh(t,u)):(ot(t),Hc(t,o,null,l,a))):u?u!==e.memoizedState?(nn(t),ot(t),wh(t,u)):(ot(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&nn(t),ot(t),Hc(t,o,e,l,a)),null;case 27:if(Kt(t),a=Ne.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&nn(t);else{if(!l){if(t.stateNode===null)throw Error(s(166));return ot(t),null}e=se.current,kl(t)?lf(t):(e=Dm(o,l,a),t.stateNode=e,nn(t))}return ot(t),null;case 5:if(Kt(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&nn(t);else{if(!l){if(t.stateNode===null)throw Error(s(166));return ot(t),null}if(u=se.current,kl(t))lf(t);else{var g=Ts(Ne.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[me]=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(Dt(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&&nn(t)}}return ot(t),Hc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&nn(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(s(166));if(e=Ne.current,kl(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,o=Tt,o!==null)switch(o.tag){case 27:case 5:l=o.memoizedProps}e[oe]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||_m(e.nodeValue,a)),e||Nn(t,!0)}else e=Ts(e).createTextNode(l),e[oe]=t,t.stateNode=e}return ot(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=kl(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 ll(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ot(t),e=!1}else a=Zo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(ia(t),t):(ia(t),null);if((t.flags&128)!==0)throw Error(s(558))}return ot(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=kl(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 ll(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ot(t),o=!1}else o=Zo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(ia(t),t):(ia(t),null)}return ia(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),ps(t,t.updateQueue),ot(t),null);case 4:return he(),e===null&&ru(t.stateNode.containerInfo),ot(t),null;case 10:return Ia(t.type),ot(t),null;case 19:if(B(yt),l=t.memoizedState,l===null)return ot(t),null;if(o=(t.flags&128)!==0,u=l.rendering,u===null)if(o)Bi(l,!1);else{if(ht!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=as(e),u!==null){for(t.flags|=128,Bi(l,!1),e=u.updateQueue,t.updateQueue=e,ps(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Id(a,e),a=a.sibling;return te(yt,yt.current&1|2),Ve&&Wa(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&qt()>bs&&(t.flags|=128,o=!0,Bi(l,!1),t.lanes=4194304)}else{if(!o)if(e=as(u),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,ps(t,e),Bi(l,!0),l.tail===null&&l.tailMode==="hidden"&&!u.alternate&&!Ve)return ot(t),null}else 2*qt()-l.renderingStartTime>bs&&a!==536870912&&(t.flags|=128,o=!0,Bi(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=qt(),e.sibling=null,a=yt.current,te(yt,o?a&1|2:a&1),Ve&&Wa(t,l.treeForkCount),e):(ot(t),null);case 22:case 23:return ia(t),sc(),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&&(ot(t),t.subtreeFlags&6&&(t.flags|=8192)):ot(t),a=t.updateQueue,a!==null&&ps(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&&B(sl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Ia(bt),ot(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function Vx(e,t){switch(Xo(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ia(bt),he(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Kt(t),null;case 31:if(t.memoizedState!==null){if(ia(t),t.alternate===null)throw Error(s(340));ll()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ia(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));ll()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(yt),null;case 4:return he(),null;case 10:return Ia(t.type),null;case 22:case 23:return ia(t),sc(),e!==null&&B(sl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ia(bt),null;case 25:return null;default:return null}}function Ch(e,t){switch(Xo(t),t.tag){case 3:Ia(bt),he();break;case 26:case 27:case 5:Kt(t);break;case 4:he();break;case 31:t.memoizedState!==null&&ia(t);break;case 13:ia(t);break;case 19:B(yt);break;case 10:Ia(t.type);break;case 22:case 23:ia(t),sc(),e!==null&&B(sl);break;case 24:Ia(bt)}}function qi(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(S){Je(t,t.return,S)}}function On(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,S=g.destroy;if(S!==void 0){g.destroy=void 0,o=t;var w=a,k=S;try{k()}catch(Y){Je(o,w,Y)}}}l=l.next}while(l!==u)}}catch(Y){Je(t,t.return,Y)}}function Rh(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{xf(t,a)}catch(l){Je(e,e.return,l)}}}function zh(e,t,a){a.props=fl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Je(e,t,l)}}function Yi(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){Je(e,t,o)}}function qa(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(o){Je(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){Je(e,t,o)}else a.current=null}function Th(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){Je(e,e.return,o)}}function Bc(e,t,a){try{var l=e.stateNode;uv(l,e.type,a,t),l[me]=t}catch(o){Je(e,e.return,o)}}function Oh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Hn(e.type)||e.tag===4}function qc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Oh(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&&Hn(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 Yc(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=Za));else if(l!==4&&(l===27&&Hn(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Yc(e,t,a),e=e.sibling;e!==null;)Yc(e,t,a),e=e.sibling}function gs(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&&Hn(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(gs(e,t,a),e=e.sibling;e!==null;)gs(e,t,a),e=e.sibling}function Mh(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);Dt(t,l,a),t[oe]=e,t[me]=a}catch(u){Je(e,e.return,u)}}var ln=!1,jt=!1,Vc=!1,Dh=typeof WeakSet=="function"?WeakSet:Set,zt=null;function Gx(e,t){if(e=e.containerInfo,cu=Us,e=$d(e),Lo(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,S=-1,w=-1,k=0,Y=0,Z=e,U=null;t:for(;;){for(var q;Z!==a||o!==0&&Z.nodeType!==3||(S=g+o),Z!==u||l!==0&&Z.nodeType!==3||(w=g+l),Z.nodeType===3&&(g+=Z.nodeValue.length),(q=Z.firstChild)!==null;)U=Z,Z=q;for(;;){if(Z===e)break t;if(U===a&&++k===o&&(S=g),U===u&&++Y===l&&(w=g),(q=Z.nextSibling)!==null)break;Z=U,U=Z.parentNode}Z=q}a=S===-1||w===-1?null:{start:S,end:w}}else a=null}a=a||{start:0,end:0}}else a=null;for(uu={focusedElem:e,selectionRange:a},Us=!1,zt=t;zt!==null;)if(t=zt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,zt=e;else for(;zt!==null;){switch(t=zt,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 xe=fl(a.type,o);e=l.getSnapshotBeforeUpdate(xe,u),l.__reactInternalSnapshotBeforeUpdate=e}catch(we){Je(a,a.return,we)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)hu(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":hu(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,zt=e;break}zt=t.return}}function Ah(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:sn(e,a),l&4&&qi(5,a);break;case 1:if(sn(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(g){Je(a,a.return,g)}else{var o=fl(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){Je(a,a.return,g)}}l&64&&Rh(a),l&512&&Yi(a,a.return);break;case 3:if(sn(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{xf(e,t)}catch(g){Je(a,a.return,g)}}break;case 27:t===null&&l&4&&Mh(a);case 26:case 5:sn(e,a),t===null&&l&4&&Th(a),l&512&&Yi(a,a.return);break;case 12:sn(e,a);break;case 31:sn(e,a),l&4&&Uh(e,a);break;case 13:sn(e,a),l&4&&Hh(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Px.bind(null,a),xv(e,a))));break;case 22:if(l=a.memoizedState!==null||ln,!l){t=t!==null&&t.memoizedState!==null||jt,o=ln;var u=jt;ln=l,(jt=t)&&!u?on(e,a,(a.subtreeFlags&8772)!==0):sn(e,a),ln=o,jt=u}break;case 30:break;default:sn(e,a)}}function Lh(e){var t=e.alternate;t!==null&&(e.alternate=null,Lh(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 ct=null,Qt=!1;function rn(e,t,a){for(a=a.child;a!==null;)kh(e,t,a),a=a.sibling}function kh(e,t,a){if(Yt&&typeof Yt.onCommitFiberUnmount=="function")try{Yt.onCommitFiberUnmount(Xa,a)}catch{}switch(a.tag){case 26:jt||qa(a,t),rn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:jt||qa(a,t);var l=ct,o=Qt;Hn(a.type)&&(ct=a.stateNode,Qt=!1),rn(e,t,a),Ji(a.stateNode),ct=l,Qt=o;break;case 5:jt||qa(a,t);case 6:if(l=ct,o=Qt,ct=null,rn(e,t,a),ct=l,Qt=o,ct!==null)if(Qt)try{(ct.nodeType===9?ct.body:ct.nodeName==="HTML"?ct.ownerDocument.body:ct).removeChild(a.stateNode)}catch(u){Je(a,t,u)}else try{ct.removeChild(a.stateNode)}catch(u){Je(a,t,u)}break;case 18:ct!==null&&(Qt?(e=ct,Rm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),ni(e)):Rm(ct,a.stateNode));break;case 4:l=ct,o=Qt,ct=a.stateNode.containerInfo,Qt=!0,rn(e,t,a),ct=l,Qt=o;break;case 0:case 11:case 14:case 15:On(2,a,t),jt||On(4,a,t),rn(e,t,a);break;case 1:jt||(qa(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&zh(a,t,l)),rn(e,t,a);break;case 21:rn(e,t,a);break;case 22:jt=(l=jt)||a.memoizedState!==null,rn(e,t,a),jt=l;break;default:rn(e,t,a)}}function Uh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ni(e)}catch(a){Je(t,t.return,a)}}}function Hh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ni(e)}catch(a){Je(t,t.return,a)}}function $x(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Dh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Dh),t;default:throw Error(s(435,e.tag))}}function ys(e,t){var a=$x(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var o=Ix.bind(null,e,l);l.then(o,o)}})}function Zt(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,S=g;e:for(;S!==null;){switch(S.tag){case 27:if(Hn(S.type)){ct=S.stateNode,Qt=!1;break e}break;case 5:ct=S.stateNode,Qt=!1;break e;case 3:case 4:ct=S.stateNode.containerInfo,Qt=!0;break e}S=S.return}if(ct===null)throw Error(s(160));kh(u,g,o),ct=null,Qt=!1,u=o.alternate,u!==null&&(u.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Bh(t,e),t=t.sibling}var Oa=null;function Bh(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Zt(t,e),Ft(e),l&4&&(On(3,e,e.return),qi(3,e),On(5,e,e.return));break;case 1:Zt(t,e),Ft(e),l&512&&(jt||a===null||qa(a,a.return)),l&64&&ln&&(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=Oa;if(Zt(t,e),Ft(e),l&512&&(jt||a===null||qa(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[ke]||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"))),Dt(u,l,a),u[oe]=e,nt(u),l=u;break e;case"link":var g=Bm("link","href",o).get(l+(a.href||""));if(g){for(var S=0;S<g.length;S++)if(u=g[S],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(S,1);break t}}u=o.createElement(l),Dt(u,l,a),o.head.appendChild(u);break;case"meta":if(g=Bm("meta","content",o).get(l+(a.content||""))){for(S=0;S<g.length;S++)if(u=g[S],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(S,1);break t}}u=o.createElement(l),Dt(u,l,a),o.head.appendChild(u);break;default:throw Error(s(468,l))}u[oe]=e,nt(u),l=u}e.stateNode=l}else qm(o,e.type,e.stateNode);else e.stateNode=Hm(o,l,e.memoizedProps);else u!==l?(u===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):u.count--,l===null?qm(o,e.type,e.stateNode):Hm(o,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Bc(e,e.memoizedProps,a.memoizedProps)}break;case 27:Zt(t,e),Ft(e),l&512&&(jt||a===null||qa(a,a.return)),a!==null&&l&4&&Bc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Zt(t,e),Ft(e),l&512&&(jt||a===null||qa(a,a.return)),e.flags&32){o=e.stateNode;try{wl(o,"")}catch(xe){Je(e,e.return,xe)}}l&4&&e.stateNode!=null&&(o=e.memoizedProps,Bc(e,o,a!==null?a.memoizedProps:o)),l&1024&&(Vc=!0);break;case 6:if(Zt(t,e),Ft(e),l&4){if(e.stateNode===null)throw Error(s(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(xe){Je(e,e.return,xe)}}break;case 3:if(Ds=null,o=Oa,Oa=Os(t.containerInfo),Zt(t,e),Oa=o,Ft(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{ni(t.containerInfo)}catch(xe){Je(e,e.return,xe)}Vc&&(Vc=!1,qh(e));break;case 4:l=Oa,Oa=Os(e.stateNode.containerInfo),Zt(t,e),Ft(e),Oa=l;break;case 12:Zt(t,e),Ft(e);break;case 31:Zt(t,e),Ft(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ys(e,l)));break;case 13:Zt(t,e),Ft(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(vs=qt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ys(e,l)));break;case 22:o=e.memoizedState!==null;var w=a!==null&&a.memoizedState!==null,k=ln,Y=jt;if(ln=k||o,jt=Y||w,Zt(t,e),jt=Y,ln=k,Ft(e),l&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(a===null||w||ln||jt||hl(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{S=w.stateNode;var Z=w.memoizedProps.style,U=Z!=null&&Z.hasOwnProperty("display")?Z.display:null;S.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(xe){Je(w,w.return,xe)}}}else if(t.tag===6){if(a===null){w=t;try{w.stateNode.nodeValue=o?"":w.memoizedProps}catch(xe){Je(w,w.return,xe)}}}else if(t.tag===18){if(a===null){w=t;try{var q=w.stateNode;o?zm(q,!0):zm(w.stateNode,!1)}catch(xe){Je(w,w.return,xe)}}}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,ys(e,a))));break;case 19:Zt(t,e),Ft(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ys(e,l)));break;case 30:break;case 21:break;default:Zt(t,e),Ft(e)}}function Ft(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(Oh(l)){a=l;break}l=l.return}if(a==null)throw Error(s(160));switch(a.tag){case 27:var o=a.stateNode,u=qc(e);gs(e,u,o);break;case 5:var g=a.stateNode;a.flags&32&&(wl(g,""),a.flags&=-33);var S=qc(e);gs(e,S,g);break;case 3:case 4:var w=a.stateNode.containerInfo,k=qc(e);Yc(e,k,w);break;default:throw Error(s(161))}}catch(Y){Je(e,e.return,Y)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function qh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;qh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function sn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Ah(e,t.alternate,t),t=t.sibling}function hl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:On(4,t,t.return),hl(t);break;case 1:qa(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&zh(t,t.return,a),hl(t);break;case 27:Ji(t.stateNode);case 26:case 5:qa(t,t.return),hl(t);break;case 22:t.memoizedState===null&&hl(t);break;case 30:hl(t);break;default:hl(t)}e=e.sibling}}function on(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:on(o,u,a),qi(4,u);break;case 1:if(on(o,u,a),l=u,o=l.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(k){Je(l,l.return,k)}if(l=u,o=l.updateQueue,o!==null){var S=l.stateNode;try{var w=o.shared.hiddenCallbacks;if(w!==null)for(o.shared.hiddenCallbacks=null,o=0;o<w.length;o++)yf(w[o],S)}catch(k){Je(l,l.return,k)}}a&&g&64&&Rh(u),Yi(u,u.return);break;case 27:Mh(u);case 26:case 5:on(o,u,a),a&&l===null&&g&4&&Th(u),Yi(u,u.return);break;case 12:on(o,u,a);break;case 31:on(o,u,a),a&&g&4&&Uh(o,u);break;case 13:on(o,u,a),a&&g&4&&Hh(o,u);break;case 22:u.memoizedState===null&&on(o,u,a),Yi(u,u.return);break;case 30:break;default:on(o,u,a)}t=t.sibling}}function Gc(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&&Ci(a))}function $c(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ci(e))}function Ma(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Yh(e,t,a,l),t=t.sibling}function Yh(e,t,a,l){var o=t.flags;switch(t.tag){case 0:case 11:case 15:Ma(e,t,a,l),o&2048&&qi(9,t);break;case 1:Ma(e,t,a,l);break;case 3:Ma(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&&Ci(e)));break;case 12:if(o&2048){Ma(e,t,a,l),e=t.stateNode;try{var u=t.memoizedProps,g=u.id,S=u.onPostCommit;typeof S=="function"&&S(g,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(w){Je(t,t.return,w)}}else Ma(e,t,a,l);break;case 31:Ma(e,t,a,l);break;case 13:Ma(e,t,a,l);break;case 23:break;case 22:u=t.stateNode,g=t.alternate,t.memoizedState!==null?u._visibility&2?Ma(e,t,a,l):Vi(e,t):u._visibility&2?Ma(e,t,a,l):(u._visibility|=2,Xl(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),o&2048&&Gc(g,t);break;case 24:Ma(e,t,a,l),o&2048&&$c(t.alternate,t);break;default:Ma(e,t,a,l)}}function Xl(e,t,a,l,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,g=t,S=a,w=l,k=g.flags;switch(g.tag){case 0:case 11:case 15:Xl(u,g,S,w,o),qi(8,g);break;case 23:break;case 22:var Y=g.stateNode;g.memoizedState!==null?Y._visibility&2?Xl(u,g,S,w,o):Vi(u,g):(Y._visibility|=2,Xl(u,g,S,w,o)),o&&k&2048&&Gc(g.alternate,g);break;case 24:Xl(u,g,S,w,o),o&&k&2048&&$c(g.alternate,g);break;default:Xl(u,g,S,w,o)}t=t.sibling}}function Vi(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:Vi(a,l),o&2048&&Gc(l.alternate,l);break;case 24:Vi(a,l),o&2048&&$c(l.alternate,l);break;default:Vi(a,l)}t=t.sibling}}var Gi=8192;function Ql(e,t,a){if(e.subtreeFlags&Gi)for(e=e.child;e!==null;)Vh(e,t,a),e=e.sibling}function Vh(e,t,a){switch(e.tag){case 26:Ql(e,t,a),e.flags&Gi&&e.memoizedState!==null&&Tv(a,Oa,e.memoizedState,e.memoizedProps);break;case 5:Ql(e,t,a);break;case 3:case 4:var l=Oa;Oa=Os(e.stateNode.containerInfo),Ql(e,t,a),Oa=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Gi,Gi=16777216,Ql(e,t,a),Gi=l):Ql(e,t,a));break;default:Ql(e,t,a)}}function Gh(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 $i(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];zt=l,Kh(l,e)}Gh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)$h(e),e=e.sibling}function $h(e){switch(e.tag){case 0:case 11:case 15:$i(e),e.flags&2048&&On(9,e,e.return);break;case 3:$i(e);break;case 12:$i(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,xs(e)):$i(e);break;default:$i(e)}}function xs(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];zt=l,Kh(l,e)}Gh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:On(8,t,t.return),xs(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,xs(t));break;default:xs(t)}e=e.sibling}}function Kh(e,t){for(;zt!==null;){var a=zt;switch(a.tag){case 0:case 11:case 15:On(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:Ci(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,zt=l;else e:for(a=e;zt!==null;){l=zt;var o=l.sibling,u=l.return;if(Lh(l),l===a){zt=null;break e}if(o!==null){o.return=u,zt=o;break e}zt=u}}}var Kx={getCacheForType:function(e){var t=Ot(bt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Ot(bt).controller.signal}},Xx=typeof WeakMap=="function"?WeakMap:Map,Ze=0,tt=null,He=null,qe=0,Fe=0,ra=null,Mn=!1,Zl=!1,Kc=!1,cn=0,ht=0,Dn=0,ml=0,Xc=0,sa=0,Fl=0,Ki=null,Jt=null,Qc=!1,vs=0,Xh=0,bs=1/0,Ss=null,An=null,Et=0,Ln=null,Jl=null,un=0,Zc=0,Fc=null,Qh=null,Xi=0,Jc=null;function oa(){return(Ze&2)!==0&&qe!==0?qe&-qe:D.T!==null?au():ae()}function Zh(){if(sa===0)if((qe&536870912)===0||Ve){var e=Qa;Qa<<=1,(Qa&3932160)===0&&(Qa=262144),sa=e}else sa=536870912;return e=la.current,e!==null&&(e.flags|=32),sa}function Wt(e,t,a){(e===tt&&(Fe===2||Fe===9)||e.cancelPendingCommit!==null)&&(Wl(e,0),kn(e,qe,sa,!1)),La(e,a),((Ze&2)===0||e!==tt)&&(e===tt&&((Ze&2)===0&&(ml|=a),ht===4&&kn(e,qe,sa,!1)),Ya(e))}function Fh(e,t,a){if((Ze&6)!==0)throw Error(s(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||xn(e,t),o=l?Fx(e,t):Pc(e,t,!0),u=l;do{if(o===0){Zl&&!l&&kn(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!Qx(a)){o=Pc(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 S=e;o=Ki;var w=S.current.memoizedState.isDehydrated;if(w&&(Wl(S,g).flags|=256),g=Pc(S,g,!1),g!==2){if(Kc&&!w){S.errorRecoveryDisabledLanes|=u,ml|=u,o=4;break e}u=Jt,Jt=o,u!==null&&(Jt===null?Jt=u:Jt.push.apply(Jt,u))}o=g}if(u=!1,o!==2)continue}}if(o===1){Wl(e,0),kn(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:kn(l,t,sa,!Mn);break e;case 2:Jt=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(o=vs+300-qt(),10<o)){if(kn(l,t,sa,!Mn),Sl(l,0,!0)!==0)break e;un=t,l.timeoutHandle=wm(Jh.bind(null,l,a,Jt,Ss,Qc,t,sa,ml,Fl,Mn,u,"Throttled",-0,0),o);break e}Jh(l,a,Jt,Ss,Qc,t,sa,ml,Fl,Mn,u,null,-0,0)}}break}while(!0);Ya(e)}function Jh(e,t,a,l,o,u,g,S,w,k,Y,Z,U,q){if(e.timeoutHandle=-1,Z=t.subtreeFlags,Z&8192||(Z&16785408)===16785408){Z={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Za},Vh(t,u,Z);var xe=(u&62914560)===u?vs-qt():(u&4194048)===u?Xh-qt():0;if(xe=Ov(Z,xe),xe!==null){un=u,e.cancelPendingCommit=xe(lm.bind(null,e,t,u,a,l,o,g,S,w,Y,Z,null,U,q)),kn(e,u,g,!k);return}}lm(e,t,u,a,l,o,g,S,w)}function Qx(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(!aa(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 kn(e,t,a,l){t&=~Xc,t&=~ml,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var o=t;0<o;){var u=31-At(o),g=1<<u;l[u]=-1,o&=~g}a!==0&&Or(e,a,t)}function _s(){return(Ze&6)===0?(Qi(0),!1):!0}function Wc(){if(He!==null){if(Fe===0)var e=He.return;else e=He,Pa=il=null,hc(e),Yl=null,zi=0,e=He;for(;e!==null;)Ch(e.alternate,e),e=e.return;He=null}}function Wl(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,hv(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),un=0,Wc(),tt=e,He=a=Ja(e.current,null),qe=t,Fe=0,ra=null,Mn=!1,Zl=xn(e,t),Kc=!1,Fl=sa=Xc=ml=Dn=ht=0,Jt=Ki=null,Qc=!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-At(l),u=1<<o;t|=e[o],l&=~u}return cn=t,Gr(),a}function Wh(e,t){Me=null,D.H=Ui,t===ql||t===Wr?(t=hf(),Fe=3):t===tc?(t=hf(),Fe=4):Fe=t===zc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,ra=t,He===null&&(ht=1,ds(e,ma(t,e.current)))}function Ph(){var e=la.current;return e===null?!0:(qe&4194048)===qe?xa===null:(qe&62914560)===qe||(qe&536870912)!==0?e===xa:!1}function Ih(){var e=D.H;return D.H=Ui,e===null?Ui:e}function em(){var e=D.A;return D.A=Kx,e}function js(){ht=4,Mn||(qe&4194048)!==qe&&la.current!==null||(Zl=!0),(Dn&134217727)===0&&(ml&134217727)===0||tt===null||kn(tt,qe,sa,!1)}function Pc(e,t,a){var l=Ze;Ze|=2;var o=Ih(),u=em();(tt!==e||qe!==t)&&(Ss=null,Wl(e,t)),t=!1;var g=ht;e:do try{if(Fe!==0&&He!==null){var S=He,w=ra;switch(Fe){case 8:Wc(),g=6;break e;case 3:case 2:case 9:case 6:la.current===null&&(t=!0);var k=Fe;if(Fe=0,ra=null,Pl(e,S,w,k),a&&Zl){g=0;break e}break;default:k=Fe,Fe=0,ra=null,Pl(e,S,w,k)}}Zx(),g=ht;break}catch(Y){Wh(e,Y)}while(!0);return t&&e.shellSuspendCounter++,Pa=il=null,Ze=l,D.H=o,D.A=u,He===null&&(tt=null,qe=0,Gr()),g}function Zx(){for(;He!==null;)tm(He)}function Fx(e,t){var a=Ze;Ze|=2;var l=Ih(),o=em();tt!==e||qe!==t?(Ss=null,bs=qt()+500,Wl(e,t)):Zl=xn(e,t);e:do try{if(Fe!==0&&He!==null){t=He;var u=ra;t:switch(Fe){case 1:Fe=0,ra=null,Pl(e,t,u,1);break;case 2:case 9:if(df(u)){Fe=0,ra=null,am(t);break}t=function(){Fe!==2&&Fe!==9||tt!==e||(Fe=7),Ya(e)},u.then(t,t);break e;case 3:Fe=7;break e;case 4:Fe=5;break e;case 7:df(u)?(Fe=0,ra=null,am(t)):(Fe=0,ra=null,Pl(e,t,u,7));break;case 5:var g=null;switch(He.tag){case 26:g=He.memoizedState;case 5:case 27:var S=He;if(g?Ym(g):S.stateNode.complete){Fe=0,ra=null;var w=S.sibling;if(w!==null)He=w;else{var k=S.return;k!==null?(He=k,Ns(k)):He=null}break t}}Fe=0,ra=null,Pl(e,t,u,5);break;case 6:Fe=0,ra=null,Pl(e,t,u,6);break;case 8:Wc(),ht=6;break e;default:throw Error(s(462))}}Jx();break}catch(Y){Wh(e,Y)}while(!0);return Pa=il=null,D.H=l,D.A=o,Ze=a,He!==null?0:(tt=null,qe=0,Gr(),ht)}function Jx(){for(;He!==null&&!pn();)tm(He)}function tm(e){var t=Eh(e.alternate,e,cn);e.memoizedProps=e.pendingProps,t===null?Ns(e):He=t}function am(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=vh(a,t,t.pendingProps,t.type,void 0,qe);break;case 11:t=vh(a,t,t.pendingProps,t.type.render,t.ref,qe);break;case 5:hc(t);default:Ch(a,t),t=He=Id(t,cn),t=Eh(a,t,cn)}e.memoizedProps=e.pendingProps,t===null?Ns(e):He=t}function Pl(e,t,a,l){Pa=il=null,hc(t),Yl=null,zi=0;var o=t.return;try{if(Hx(e,o,t,a,qe)){ht=1,ds(e,ma(a,e.current)),He=null;return}}catch(u){if(o!==null)throw He=o,u;ht=1,ds(e,ma(a,e.current)),He=null;return}t.flags&32768?(Ve||l===1?e=!0:Zl||(qe&536870912)!==0?e=!1:(Mn=e=!0,(l===2||l===9||l===3||l===6)&&(l=la.current,l!==null&&l.tag===13&&(l.flags|=16384))),nm(t,e)):Ns(t)}function Ns(e){var t=e;do{if((t.flags&32768)!==0){nm(t,Mn);return}e=t.return;var a=Yx(t.alternate,t,cn);if(a!==null){He=a;return}if(t=t.sibling,t!==null){He=t;return}He=t=e}while(t!==null);ht===0&&(ht=5)}function nm(e,t){do{var a=Vx(e.alternate,e);if(a!==null){a.flags&=32767,He=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){He=e;return}He=e=a}while(e!==null);ht=6,He=null}function lm(e,t,a,l,o,u,g,S,w){e.cancelPendingCommit=null;do Es();while(Et!==0);if((Ze&6)!==0)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(u=t.lanes|t.childLanes,u|=qo,Tr(e,a,u,g,S,w),e===tt&&(He=tt=null,qe=0),Jl=t,Ln=e,un=a,Zc=u,Fc=o,Qh=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,ev(yn,function(){return cm(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=D.T,D.T=null,o=W.p,W.p=2,g=Ze,Ze|=4;try{Gx(e,t,a)}finally{Ze=g,W.p=o,D.T=l}}Et=1,im(),rm(),sm()}}function im(){if(Et===1){Et=0;var e=Ln,t=Jl,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=D.T,D.T=null;var l=W.p;W.p=2;var o=Ze;Ze|=4;try{Bh(t,e);var u=uu,g=$d(e.containerInfo),S=u.focusedElem,w=u.selectionRange;if(g!==S&&S&&S.ownerDocument&&Gd(S.ownerDocument.documentElement,S)){if(w!==null&&Lo(S)){var k=w.start,Y=w.end;if(Y===void 0&&(Y=k),"selectionStart"in S)S.selectionStart=k,S.selectionEnd=Math.min(Y,S.value.length);else{var Z=S.ownerDocument||document,U=Z&&Z.defaultView||window;if(U.getSelection){var q=U.getSelection(),xe=S.textContent.length,we=Math.min(w.start,xe),Ie=w.end===void 0?we:Math.min(w.end,xe);!q.extend&&we>Ie&&(g=Ie,Ie=we,we=g);var O=Vd(S,we),z=Vd(S,Ie);if(O&&z&&(q.rangeCount!==1||q.anchorNode!==O.node||q.anchorOffset!==O.offset||q.focusNode!==z.node||q.focusOffset!==z.offset)){var A=Z.createRange();A.setStart(O.node,O.offset),q.removeAllRanges(),we>Ie?(q.addRange(A),q.extend(z.node,z.offset)):(A.setEnd(z.node,z.offset),q.addRange(A))}}}}for(Z=[],q=S;q=q.parentNode;)q.nodeType===1&&Z.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<Z.length;S++){var $=Z[S];$.element.scrollLeft=$.left,$.element.scrollTop=$.top}}Us=!!cu,uu=cu=null}finally{Ze=o,W.p=l,D.T=a}}e.current=t,Et=2}}function rm(){if(Et===2){Et=0;var e=Ln,t=Jl,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=D.T,D.T=null;var l=W.p;W.p=2;var o=Ze;Ze|=4;try{Ah(e,t.alternate,t)}finally{Ze=o,W.p=l,D.T=a}}Et=3}}function sm(){if(Et===4||Et===3){Et=0,Zn();var e=Ln,t=Jl,a=un,l=Qh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Et=5:(Et=0,Jl=Ln=null,om(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(An=null),H(a),t=t.stateNode,Yt&&typeof Yt.onCommitFiberRoot=="function")try{Yt.onCommitFiberRoot(Xa,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=D.T,o=W.p,W.p=2,D.T=null;try{for(var u=e.onRecoverableError,g=0;g<l.length;g++){var S=l[g];u(S.value,{componentStack:S.stack})}}finally{D.T=t,W.p=o}}(un&3)!==0&&Es(),Ya(e),o=e.pendingLanes,(a&261930)!==0&&(o&42)!==0?e===Jc?Xi++:(Xi=0,Jc=e):Xi=0,Qi(0)}}function om(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ci(t)))}function Es(){return im(),rm(),sm(),cm()}function cm(){if(Et!==5)return!1;var e=Ln,t=Zc;Zc=0;var a=H(un),l=D.T,o=W.p;try{W.p=32>a?32:a,D.T=null,a=Fc,Fc=null;var u=Ln,g=un;if(Et=0,Jl=Ln=null,un=0,(Ze&6)!==0)throw Error(s(331));var S=Ze;if(Ze|=4,$h(u.current),Yh(u,u.current,g,a),Ze=S,Qi(0,!1),Yt&&typeof Yt.onPostCommitFiberRoot=="function")try{Yt.onPostCommitFiberRoot(Xa,u)}catch{}return!0}finally{W.p=o,D.T=l,om(e,t)}}function um(e,t,a){t=ma(a,t),t=Rc(e.stateNode,t,2),e=Rn(e,t,2),e!==null&&(La(e,2),Ya(e))}function Je(e,t,a){if(e.tag===3)um(e,e,a);else for(;t!==null;){if(t.tag===3){um(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(An===null||!An.has(l))){e=ma(a,e),a=dh(2),l=Rn(t,a,2),l!==null&&(fh(a,l,t,e),La(l,2),Ya(l));break}}t=t.return}}function Ic(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Xx;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)||(Kc=!0,o.add(a),e=Wx.bind(null,e,t,a),t.then(e,e))}function Wx(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,tt===e&&(qe&a)===a&&(ht===4||ht===3&&(qe&62914560)===qe&&300>qt()-vs?(Ze&2)===0&&Wl(e,0):Xc|=a,Fl===qe&&(Fl=0)),Ya(e)}function dm(e,t){t===0&&(t=pi()),e=al(e,t),e!==null&&(La(e,t),Ya(e))}function Px(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),dm(e,a)}function Ix(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),dm(e,a)}function ev(e,t){return ta(e,t)}var ws=null,Il=null,eu=!1,Cs=!1,tu=!1,Un=0;function Ya(e){e!==Il&&e.next===null&&(Il===null?ws=Il=e:Il=Il.next=e),Cs=!0,eu||(eu=!0,av())}function Qi(e,t){if(!tu&&Cs){tu=!0;do for(var a=!1,l=ws;l!==null;){if(e!==0){var o=l.pendingLanes;if(o===0)var u=0;else{var g=l.suspendedLanes,S=l.pingedLanes;u=(1<<31-At(42|e)+1)-1,u&=o&~(g&~S),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,pm(l,u))}else u=qe,u=Sl(l,l===tt?u:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(u&3)===0||xn(l,u)||(a=!0,pm(l,u));l=l.next}while(a);tu=!1}}function tv(){fm()}function fm(){Cs=eu=!1;var e=0;Un!==0&&fv()&&(e=Un);for(var t=qt(),a=null,l=ws;l!==null;){var o=l.next,u=hm(l,t);u===0?(l.next=null,a===null?ws=o:a.next=o,o===null&&(Il=a)):(a=l,(e!==0||(u&3)!==0)&&(Cs=!0)),l=o}Et!==0&&Et!==5||Qi(e),Un!==0&&(Un=0)}function hm(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var g=31-At(u),S=1<<g,w=o[g];w===-1?((S&a)===0||(S&l)!==0)&&(o[g]=vo(S,t)):w<=t&&(e.expiredLanes|=S),u&=~S}if(t=tt,a=qe,a=Sl(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(Fe===2||Fe===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&wa(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||xn(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&wa(l),H(a)){case 2:case 8:a=mi;break;case 32:a=yn;break;case 268435456:a=da;break;default:a=yn}return l=mm.bind(null,e),a=ta(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&wa(l),e.callbackPriority=2,e.callbackNode=null,2}function mm(e,t){if(Et!==0&&Et!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Es()&&e.callbackNode!==a)return null;var l=qe;return l=Sl(e,e===tt?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Fh(e,l,t),hm(e,qt()),e.callbackNode!=null&&e.callbackNode===a?mm.bind(null,e):null)}function pm(e,t){if(Es())return null;Fh(e,t,!0)}function av(){mv(function(){(Ze&6)!==0?ta(gn,tv):fm()})}function au(){if(Un===0){var e=Hl;e===0&&(e=Fn,Fn<<=1,(Fn&261888)===0&&(Fn=256)),Un=e}return Un}function gm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Lr(""+e)}function ym(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 nv(e,t,a,l,o){if(t==="submit"&&a&&a.stateNode===o){var u=gm((o[me]||null).action),g=l.submitter;g&&(t=(t=g[me]||null)?gm(t.formAction):g.getAttribute("formAction"),t!==null&&(u=t,g=null));var S=new Br("action","action",null,l,o);e.push({event:S,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Un!==0){var w=g?ym(o,g):new FormData(o);_c(a,{pending:!0,data:w,method:o.method,action:u},null,w)}}else typeof u=="function"&&(S.preventDefault(),w=g?ym(o,g):new FormData(o),_c(a,{pending:!0,data:w,method:o.method,action:u},u,w))},currentTarget:o}]})}}for(var nu=0;nu<Bo.length;nu++){var lu=Bo[nu],lv=lu.toLowerCase(),iv=lu[0].toUpperCase()+lu.slice(1);Ta(lv,"on"+iv)}Ta(Qd,"onAnimationEnd"),Ta(Zd,"onAnimationIteration"),Ta(Fd,"onAnimationStart"),Ta("dblclick","onDoubleClick"),Ta("focusin","onFocus"),Ta("focusout","onBlur"),Ta(Sx,"onTransitionRun"),Ta(_x,"onTransitionStart"),Ta(jx,"onTransitionCancel"),Ta(Jd,"onTransitionEnd"),ka("onMouseEnter",["mouseout","mouseover"]),ka("onMouseLeave",["mouseout","mouseover"]),ka("onPointerEnter",["pointerout","pointerover"]),ka("onPointerLeave",["pointerout","pointerover"]),Rt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Rt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Rt("onBeforeInput",["compositionend","keypress","textInput","paste"]),Rt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Rt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Rt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Zi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),rv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Zi));function xm(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 S=l[g],w=S.instance,k=S.currentTarget;if(S=S.listener,w!==u&&o.isPropagationStopped())break e;u=S,o.currentTarget=k;try{u(o)}catch(Y){Vr(Y)}o.currentTarget=null,u=w}else for(g=0;g<l.length;g++){if(S=l[g],w=S.instance,k=S.currentTarget,S=S.listener,w!==u&&o.isPropagationStopped())break e;u=S,o.currentTarget=k;try{u(o)}catch(Y){Vr(Y)}o.currentTarget=null,u=w}}}}function Be(e,t){var a=t[_e];a===void 0&&(a=t[_e]=new Set);var l=e+"__bubble";a.has(l)||(vm(t,e,2,!1),a.add(l))}function iu(e,t,a){var l=0;t&&(l|=4),vm(a,e,l,t)}var Rs="_reactListening"+Math.random().toString(36).slice(2);function ru(e){if(!e[Rs]){e[Rs]=!0,bn.forEach(function(a){a!=="selectionchange"&&(rv.has(a)||iu(a,!1,e),iu(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Rs]||(t[Rs]=!0,iu("selectionchange",!1,t))}}function vm(e,t,a,l){switch(Zm(t)){case 2:var o=Av;break;case 8:o=Lv;break;default:o=Su}a=o.bind(null,t,a,e),o=void 0,!wo||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 su(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 S=l.stateNode.containerInfo;if(S===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(;S!==null;){if(g=it(S),g===null)return;if(w=g.tag,w===5||w===6||w===26||w===27){l=u=g;continue e}S=S.parentNode}}l=l.return}jd(function(){var k=u,Y=No(a),Z=[];e:{var U=Wd.get(e);if(U!==void 0){var q=Br,xe=e;switch(e){case"keypress":if(Ur(a)===0)break e;case"keydown":case"keyup":q=Iy;break;case"focusin":xe="focus",q=To;break;case"focusout":xe="blur",q=To;break;case"beforeblur":case"afterblur":q=To;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":q=wd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=Yy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=ax;break;case Qd:case Zd:case Fd:q=$y;break;case Jd:q=lx;break;case"scroll":case"scrollend":q=By;break;case"wheel":q=rx;break;case"copy":case"cut":case"paste":q=Xy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=Rd;break;case"toggle":case"beforetoggle":q=ox}var we=(t&4)!==0,Ie=!we&&(e==="scroll"||e==="scrollend"),O=we?U!==null?U+"Capture":null:U;we=[];for(var z=k,A;z!==null;){var $=z;if(A=$.stateNode,$=$.tag,$!==5&&$!==26&&$!==27||A===null||O===null||($=gi(z,O),$!=null&&we.push(Fi(z,$,A))),Ie)break;z=z.return}0<we.length&&(U=new q(U,xe,null,a,Y),Z.push({event:U,listeners:we}))}}if((t&7)===0){e:{if(U=e==="mouseover"||e==="pointerover",q=e==="mouseout"||e==="pointerout",U&&a!==jo&&(xe=a.relatedTarget||a.fromElement)&&(it(xe)||xe[ge]))break e;if((q||U)&&(U=Y.window===Y?Y:(U=Y.ownerDocument)?U.defaultView||U.parentWindow:window,q?(xe=a.relatedTarget||a.toElement,q=k,xe=xe?it(xe):null,xe!==null&&(Ie=d(xe),we=xe.tag,xe!==Ie||we!==5&&we!==27&&we!==6)&&(xe=null)):(q=null,xe=k),q!==xe)){if(we=wd,$="onMouseLeave",O="onMouseEnter",z="mouse",(e==="pointerout"||e==="pointerover")&&(we=Rd,$="onPointerLeave",O="onPointerEnter",z="pointer"),Ie=q==null?U:Ge(q),A=xe==null?U:Ge(xe),U=new we($,z+"leave",q,a,Y),U.target=Ie,U.relatedTarget=A,$=null,it(Y)===k&&(we=new we(O,z+"enter",xe,a,Y),we.target=A,we.relatedTarget=Ie,$=we),Ie=$,q&&xe)t:{for(we=sv,O=q,z=xe,A=0,$=O;$;$=we($))A++;$=0;for(var je=z;je;je=we(je))$++;for(;0<A-$;)O=we(O),A--;for(;0<$-A;)z=we(z),$--;for(;A--;){if(O===z||z!==null&&O===z.alternate){we=O;break t}O=we(O),z=we(z)}we=null}else we=null;q!==null&&bm(Z,U,q,we,!1),xe!==null&&Ie!==null&&bm(Z,Ie,xe,we,!0)}}e:{if(U=k?Ge(k):window,q=U.nodeName&&U.nodeName.toLowerCase(),q==="select"||q==="input"&&U.type==="file")var Xe=kd;else if(Ad(U))if(Ud)Xe=xx;else{Xe=gx;var ve=px}else q=U.nodeName,!q||q.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?k&&_o(k.elementType)&&(Xe=kd):Xe=yx;if(Xe&&(Xe=Xe(e,k))){Ld(Z,Xe,a,Y);break e}ve&&ve(e,U,k),e==="focusout"&&k&&U.type==="number"&&k.memoizedProps.value!=null&&So(U,"number",U.value)}switch(ve=k?Ge(k):window,e){case"focusin":(Ad(ve)||ve.contentEditable==="true")&&(Tl=ve,ko=k,Ni=null);break;case"focusout":Ni=ko=Tl=null;break;case"mousedown":Uo=!0;break;case"contextmenu":case"mouseup":case"dragend":Uo=!1,Kd(Z,a,Y);break;case"selectionchange":if(bx)break;case"keydown":case"keyup":Kd(Z,a,Y)}var De;if(Mo)e:{switch(e){case"compositionstart":var Ye="onCompositionStart";break e;case"compositionend":Ye="onCompositionEnd";break e;case"compositionupdate":Ye="onCompositionUpdate";break e}Ye=void 0}else zl?Md(e,a)&&(Ye="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ye="onCompositionStart");Ye&&(zd&&a.locale!=="ko"&&(zl||Ye!=="onCompositionStart"?Ye==="onCompositionEnd"&&zl&&(De=Nd()):(Sn=Y,Co="value"in Sn?Sn.value:Sn.textContent,zl=!0)),ve=zs(k,Ye),0<ve.length&&(Ye=new Cd(Ye,e,null,a,Y),Z.push({event:Ye,listeners:ve}),De?Ye.data=De:(De=Dd(a),De!==null&&(Ye.data=De)))),(De=ux?dx(e,a):fx(e,a))&&(Ye=zs(k,"onBeforeInput"),0<Ye.length&&(ve=new Cd("onBeforeInput","beforeinput",null,a,Y),Z.push({event:ve,listeners:Ye}),ve.data=De)),nv(Z,e,k,a,Y)}xm(Z,t)})}function Fi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function zs(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=gi(e,a),o!=null&&l.unshift(Fi(e,o,u)),o=gi(e,t),o!=null&&l.push(Fi(e,o,u))),e.tag===3)return l;e=e.return}return[]}function sv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function bm(e,t,a,l,o){for(var u=t._reactName,g=[];a!==null&&a!==l;){var S=a,w=S.alternate,k=S.stateNode;if(S=S.tag,w!==null&&w===l)break;S!==5&&S!==26&&S!==27||k===null||(w=k,o?(k=gi(a,u),k!=null&&g.unshift(Fi(a,k,w))):o||(k=gi(a,u),k!=null&&g.push(Fi(a,k,w)))),a=a.return}g.length!==0&&e.push({event:t,listeners:g})}var ov=/\r\n?/g,cv=/\u0000|\uFFFD/g;function Sm(e){return(typeof e=="string"?e:""+e).replace(ov,`
|
|
9
|
+
`).replace(cv,"")}function _m(e,t){return t=Sm(t),Sm(e)===t}function Pe(e,t,a,l,o,u){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||wl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&wl(e,""+l);break;case"className":gt(e,"class",l);break;case"tabIndex":gt(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":gt(e,a,l);break;case"style":Sd(e,l,u);break;case"data":if(t!=="object"){gt(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=Lr(""+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=Lr(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Za);break;case"onScroll":l!=null&&Be("scroll",e);break;case"onScrollEnd":l!=null&&Be("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=Lr(""+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":Be("beforetoggle",e),Be("toggle",e),Ue(e,"popover",l);break;case"xlinkActuate":Lt(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Lt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Lt(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Lt(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Lt(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Lt(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Lt(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Lt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Lt(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Ue(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=Uy.get(a)||a,Ue(e,a,l))}}function ou(e,t,a,l,o,u){switch(a){case"style":Sd(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"?wl(e,l):(typeof l=="number"||typeof l=="bigint")&&wl(e,""+l);break;case"onScroll":l!=null&&Be("scroll",e);break;case"onScrollEnd":l!=null&&Be("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Za);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!za.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[me]||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,""):Ue(e,a,l)}}}function Dt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Be("error",e),Be("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":Be("invalid",e);var S=u=g=o=null,w=null,k=null;for(l in a)if(a.hasOwnProperty(l)){var Y=a[l];if(Y!=null)switch(l){case"name":o=Y;break;case"type":g=Y;break;case"checked":w=Y;break;case"defaultChecked":k=Y;break;case"value":u=Y;break;case"defaultValue":S=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(s(137,t));break;default:Pe(e,t,l,Y,a,null)}}yd(e,u,S,w,k,g,o,!1);return;case"select":Be("invalid",e),l=g=u=null;for(o in a)if(a.hasOwnProperty(o)&&(S=a[o],S!=null))switch(o){case"value":u=S;break;case"defaultValue":g=S;break;case"multiple":l=S;default:Pe(e,t,o,S,a,null)}t=u,a=g,e.multiple=!!l,t!=null?El(e,!!l,t,!1):a!=null&&El(e,!!l,a,!0);return;case"textarea":Be("invalid",e),u=o=l=null;for(g in a)if(a.hasOwnProperty(g)&&(S=a[g],S!=null))switch(g){case"value":l=S;break;case"defaultValue":o=S;break;case"children":u=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(s(91));break;default:Pe(e,t,g,S,a,null)}vd(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":Be("beforetoggle",e),Be("toggle",e),Be("cancel",e),Be("close",e);break;case"iframe":case"object":Be("load",e);break;case"video":case"audio":for(l=0;l<Zi.length;l++)Be(Zi[l],e);break;case"image":Be("error",e),Be("load",e);break;case"details":Be("toggle",e);break;case"embed":case"source":case"link":Be("error",e),Be("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(_o(t)){for(Y in a)a.hasOwnProperty(Y)&&(l=a[Y],l!==void 0&&ou(e,t,Y,l,a,void 0));return}}for(S in a)a.hasOwnProperty(S)&&(l=a[S],l!=null&&Pe(e,t,S,l,a,null))}function uv(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,S=null,w=null,k=null,Y=null;for(q in a){var Z=a[q];if(a.hasOwnProperty(q)&&Z!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":w=Z;default:l.hasOwnProperty(q)||Pe(e,t,q,null,l,Z)}}for(var U in l){var q=l[U];if(Z=a[U],l.hasOwnProperty(U)&&(q!=null||Z!=null))switch(U){case"type":u=q;break;case"name":o=q;break;case"checked":k=q;break;case"defaultChecked":Y=q;break;case"value":g=q;break;case"defaultValue":S=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(s(137,t));break;default:q!==Z&&Pe(e,t,U,q,l,Z)}}bo(e,g,S,w,k,Y,u,o);return;case"select":q=g=S=U=null;for(u in a)if(w=a[u],a.hasOwnProperty(u)&&w!=null)switch(u){case"value":break;case"multiple":q=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":S=u;break;case"multiple":g=u;default:u!==w&&Pe(e,t,o,u,l,w)}t=S,a=g,l=q,U!=null?El(e,!!a,U,!1):!!l!=!!a&&(t!=null?El(e,!!a,t,!0):El(e,!!a,a?[]:"",!1));return;case"textarea":q=U=null;for(S in a)if(o=a[S],a.hasOwnProperty(S)&&o!=null&&!l.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Pe(e,t,S,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":q=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)}xd(e,U,q);return;case"option":for(var xe in a)U=a[xe],a.hasOwnProperty(xe)&&U!=null&&!l.hasOwnProperty(xe)&&(xe==="selected"?e.selected=!1:Pe(e,t,xe,null,l,U));for(w in l)U=l[w],q=a[w],l.hasOwnProperty(w)&&U!==q&&(U!=null||q!=null)&&(w==="selected"?e.selected=U&&typeof U!="function"&&typeof U!="symbol":Pe(e,t,w,U,l,q));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 we in a)U=a[we],a.hasOwnProperty(we)&&U!=null&&!l.hasOwnProperty(we)&&Pe(e,t,we,null,l,U);for(k in l)if(U=l[k],q=a[k],l.hasOwnProperty(k)&&U!==q&&(U!=null||q!=null))switch(k){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(s(137,t));break;default:Pe(e,t,k,U,l,q)}return;default:if(_o(t)){for(var Ie in a)U=a[Ie],a.hasOwnProperty(Ie)&&U!==void 0&&!l.hasOwnProperty(Ie)&&ou(e,t,Ie,void 0,l,U);for(Y in l)U=l[Y],q=a[Y],!l.hasOwnProperty(Y)||U===q||U===void 0&&q===void 0||ou(e,t,Y,U,l,q);return}}for(var O in a)U=a[O],a.hasOwnProperty(O)&&U!=null&&!l.hasOwnProperty(O)&&Pe(e,t,O,null,l,U);for(Z in l)U=l[Z],q=a[Z],!l.hasOwnProperty(Z)||U===q||U==null&&q==null||Pe(e,t,Z,U,l,q)}function jm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function dv(){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,S=o.duration;if(u&&S&&jm(g)){for(g=0,S=o.responseEnd,l+=1;l<a.length;l++){var w=a[l],k=w.startTime;if(k>S)break;var Y=w.transferSize,Z=w.initiatorType;Y&&jm(Z)&&(w=w.responseEnd,g+=Y*(w<S?1:(S-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 cu=null,uu=null;function Ts(e){return e.nodeType===9?e:e.ownerDocument}function Nm(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 Em(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 du(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 fu=null;function fv(){var e=window.event;return e&&e.type==="popstate"?e===fu?!1:(fu=e,!0):(fu=null,!1)}var wm=typeof setTimeout=="function"?setTimeout:void 0,hv=typeof clearTimeout=="function"?clearTimeout:void 0,Cm=typeof Promise=="function"?Promise:void 0,mv=typeof queueMicrotask=="function"?queueMicrotask:typeof Cm<"u"?function(e){return Cm.resolve(null).then(e).catch(pv)}:wm;function pv(e){setTimeout(function(){throw e})}function Hn(e){return e==="head"}function Rm(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),ni(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")Ji(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Ji(a);for(var u=a.firstChild;u;){var g=u.nextSibling,S=u.nodeName;u[ke]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&u.rel.toLowerCase()==="stylesheet"||a.removeChild(u),u=g}}else a==="body"&&Ji(e.ownerDocument.body);a=o}while(a);ni(t)}function zm(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 hu(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":hu(a),et(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function gv(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[ke])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=va(e.nextSibling),e===null)break}return null}function yv(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=va(e.nextSibling),e===null))return null;return e}function Tm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=va(e.nextSibling),e===null))return null;return e}function mu(e){return e.data==="$?"||e.data==="$~"}function pu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function xv(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 va(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 gu=null;function Om(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return va(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Mm(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 Dm(e,t,a){switch(t=Ts(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 Ji(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);et(e)}var ba=new Map,Am=new Set;function Os(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var dn=W.d;W.d={f:vv,r:bv,D:Sv,C:_v,L:jv,m:Nv,X:wv,S:Ev,M:Cv};function vv(){var e=dn.f(),t=_s();return e||t}function bv(e){var t=dt(e);t!==null&&t.tag===5&&t.type==="form"?Wf(t):dn.r(e)}var ei=typeof document>"u"?null:document;function Lm(e,t,a){var l=ei;if(l&&typeof t=="string"&&t){var o=fa(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),Am.has(o)||(Am.add(o),e={rel:e,crossOrigin:a,href:t},l.querySelector(o)===null&&(t=l.createElement("link"),Dt(t,"link",e),nt(t),l.head.appendChild(t)))}}function Sv(e){dn.D(e),Lm("dns-prefetch",e,null)}function _v(e,t){dn.C(e,t),Lm("preconnect",e,t)}function jv(e,t,a){dn.L(e,t,a);var l=ei;if(l&&e&&t){var o='link[rel="preload"][as="'+fa(t)+'"]';t==="image"&&a&&a.imageSrcSet?(o+='[imagesrcset="'+fa(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(o+='[imagesizes="'+fa(a.imageSizes)+'"]')):o+='[href="'+fa(e)+'"]';var u=o;switch(t){case"style":u=ti(e);break;case"script":u=ai(e)}ba.has(u)||(e=x({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),ba.set(u,e),l.querySelector(o)!==null||t==="style"&&l.querySelector(Wi(u))||t==="script"&&l.querySelector(Pi(u))||(t=l.createElement("link"),Dt(t,"link",e),nt(t),l.head.appendChild(t)))}}function Nv(e,t){dn.m(e,t);var a=ei;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+fa(l)+'"][href="'+fa(e)+'"]',u=o;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=ai(e)}if(!ba.has(u)&&(e=x({rel:"modulepreload",href:e},t),ba.set(u,e),a.querySelector(o)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Pi(u)))return}l=a.createElement("link"),Dt(l,"link",e),nt(l),a.head.appendChild(l)}}}function Ev(e,t,a){dn.S(e,t,a);var l=ei;if(l&&e){var o=Nt(l).hoistableStyles,u=ti(e);t=t||"default";var g=o.get(u);if(!g){var S={loading:0,preload:null};if(g=l.querySelector(Wi(u)))S.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},a),(a=ba.get(u))&&yu(e,a);var w=g=l.createElement("link");nt(w),Dt(w,"link",e),w._p=new Promise(function(k,Y){w.onload=k,w.onerror=Y}),w.addEventListener("load",function(){S.loading|=1}),w.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Ms(g,t,l)}g={type:"stylesheet",instance:g,count:1,state:S},o.set(u,g)}}}function wv(e,t){dn.X(e,t);var a=ei;if(a&&e){var l=Nt(a).hoistableScripts,o=ai(e),u=l.get(o);u||(u=a.querySelector(Pi(o)),u||(e=x({src:e,async:!0},t),(t=ba.get(o))&&xu(e,t),u=a.createElement("script"),nt(u),Dt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(o,u))}}function Cv(e,t){dn.M(e,t);var a=ei;if(a&&e){var l=Nt(a).hoistableScripts,o=ai(e),u=l.get(o);u||(u=a.querySelector(Pi(o)),u||(e=x({src:e,async:!0,type:"module"},t),(t=ba.get(o))&&xu(e,t),u=a.createElement("script"),nt(u),Dt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(o,u))}}function km(e,t,a,l){var o=(o=Ne.current)?Os(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=ti(a.href),a=Nt(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=ti(a.href);var u=Nt(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(Wi(e)))&&!u._p&&(g.instance=u,g.state.loading=5),ba.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},ba.set(e,a),u||Rv(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=ai(a),a=Nt(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 ti(e){return'href="'+fa(e)+'"'}function Wi(e){return'link[rel="stylesheet"]['+e+"]"}function Um(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function Rv(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}),Dt(t,"link",a),nt(t),e.head.appendChild(t))}function ai(e){return'[src="'+fa(e)+'"]'}function Pi(e){return"script[async]"+e}function Hm(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+fa(a.href)+'"]');if(l)return t.instance=l,nt(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"),nt(l),Dt(l,"style",o),Ms(l,a.precedence,e),t.instance=l;case"stylesheet":o=ti(a.href);var u=e.querySelector(Wi(o));if(u)return t.state.loading|=4,t.instance=u,nt(u),u;l=Um(a),(o=ba.get(o))&&yu(l,o),u=(e.ownerDocument||e).createElement("link"),nt(u);var g=u;return g._p=new Promise(function(S,w){g.onload=S,g.onerror=w}),Dt(u,"link",l),t.state.loading|=4,Ms(u,a.precedence,e),t.instance=u;case"script":return u=ai(a.src),(o=e.querySelector(Pi(u)))?(t.instance=o,nt(o),o):(l=a,(o=ba.get(u))&&(l=x({},a),xu(l,o)),e=e.ownerDocument||e,o=e.createElement("script"),nt(o),Dt(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,Ms(l,a.precedence,e));return t.instance}function Ms(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 S=l[g];if(S.dataset.precedence===t)u=S;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 yu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function xu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ds=null;function Bm(e,t,a){if(Ds===null){var l=new Map,o=Ds=new Map;o.set(a,l)}else o=Ds,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[ke]||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 S=l.get(g);S?S.push(u):l.set(g,[u])}}return l}function qm(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function zv(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 Ym(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Tv(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=ti(l.href),u=t.querySelector(Wi(o));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=As.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=u,nt(u);return}u=t.ownerDocument||t,l=Um(l),(o=ba.get(o))&&yu(l,o),u=u.createElement("link"),nt(u);var g=u;g._p=new Promise(function(S,w){g.onload=S,g.onerror=w}),Dt(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=As.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var vu=0;function Ov(e,t){return e.stylesheets&&e.count===0&&ks(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&ks(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&vu===0&&(vu=62500*dv());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ks(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>vu?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(o)}}:null}function As(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ks(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ls=null;function ks(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ls=new Map,t.forEach(Mv,e),Ls=null,As.call(e))}function Mv(e,t){if(!(t.state.loading&4)){var a=Ls.get(e);if(a)var l=a.get(null);else{a=new Map,Ls.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=As.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 Ii={$$typeof:K,Provider:null,Consumer:null,_currentValue:ue,_currentValue2:ue,_threadCount:0};function Dv(e,t,a,l,o,u,g,S,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=vn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vn(0),this.hiddenUpdates=vn(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 Vm(e,t,a,l,o,u,g,S,w,k,Y,Z){return e=new Dv(e,t,a,g,w,k,Y,Z,S),t=1,u===!0&&(t|=24),u=na(3,null,null,t),e.current=u,u.stateNode=e,t=Po(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:l,isDehydrated:a,cache:t},ac(u),e}function Gm(e){return e?(e=Dl,e):Dl}function $m(e,t,a,l,o,u){o=Gm(o),l.context===null?l.context=o:l.pendingContext=o,l=Cn(t),l.payload={element:a},u=u===void 0?null:u,u!==null&&(l.callback=u),a=Rn(e,l,t),a!==null&&(Wt(a,e,t),Oi(a,e,t))}function Km(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function bu(e,t){Km(e,t),(e=e.alternate)&&Km(e,t)}function Xm(e){if(e.tag===13||e.tag===31){var t=al(e,67108864);t!==null&&Wt(t,e,67108864),bu(e,67108864)}}function Qm(e){if(e.tag===13||e.tag===31){var t=oa();t=T(t);var a=al(e,t);a!==null&&Wt(a,e,t),bu(e,t)}}var Us=!0;function Av(e,t,a,l){var o=D.T;D.T=null;var u=W.p;try{W.p=2,Su(e,t,a,l)}finally{W.p=u,D.T=o}}function Lv(e,t,a,l){var o=D.T;D.T=null;var u=W.p;try{W.p=8,Su(e,t,a,l)}finally{W.p=u,D.T=o}}function Su(e,t,a,l){if(Us){var o=_u(l);if(o===null)su(e,t,l,Hs,a),Fm(e,l);else if(Uv(o,e,t,a,l))l.stopPropagation();else if(Fm(e,l),t&4&&-1<kv.indexOf(e)){for(;o!==null;){var u=dt(o);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var g=Ra(u.pendingLanes);if(g!==0){var S=u;for(S.pendingLanes|=2,S.entangledLanes|=2;g;){var w=1<<31-At(g);S.entanglements[1]|=w,g&=~w}Ya(u),(Ze&6)===0&&(bs=qt()+500,Qi(0))}}break;case 31:case 13:S=al(u,2),S!==null&&Wt(S,u,2),_s(),bu(u,2)}if(u=_u(l),u===null&&su(e,t,l,Hs,a),u===o)break;o=u}o!==null&&l.stopPropagation()}else su(e,t,l,null,a)}}function _u(e){return e=No(e),ju(e)}var Hs=null;function ju(e){if(Hs=null,e=it(e),e!==null){var t=d(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 Hs=e,null}function Zm(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(Ka()){case gn:return 2;case mi:return 8;case yn:case Ca:return 32;case da:return 268435456;default:return 32}default:return 32}}var Nu=!1,Bn=null,qn=null,Yn=null,er=new Map,tr=new Map,Vn=[],kv="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 Fm(e,t){switch(e){case"focusin":case"focusout":Bn=null;break;case"dragenter":case"dragleave":qn=null;break;case"mouseover":case"mouseout":Yn=null;break;case"pointerover":case"pointerout":er.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":tr.delete(t.pointerId)}}function ar(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=dt(t),t!==null&&Xm(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Uv(e,t,a,l,o){switch(t){case"focusin":return Bn=ar(Bn,e,t,a,l,o),!0;case"dragenter":return qn=ar(qn,e,t,a,l,o),!0;case"mouseover":return Yn=ar(Yn,e,t,a,l,o),!0;case"pointerover":var u=o.pointerId;return er.set(u,ar(er.get(u)||null,e,t,a,l,o)),!0;case"gotpointercapture":return u=o.pointerId,tr.set(u,ar(tr.get(u)||null,e,t,a,l,o)),!0}return!1}function Jm(e){var t=it(e.target);if(t!==null){var a=d(t);if(a!==null){if(t=a.tag,t===13){if(t=h(a),t!==null){e.blockedOn=t,ie(e.priority,function(){Qm(a)});return}}else if(t===31){if(t=m(a),t!==null){e.blockedOn=t,ie(e.priority,function(){Qm(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 Bs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=_u(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);jo=l,a.target.dispatchEvent(l),jo=null}else return t=dt(a),t!==null&&Xm(t),e.blockedOn=a,!1;t.shift()}return!0}function Wm(e,t,a){Bs(e)&&a.delete(t)}function Hv(){Nu=!1,Bn!==null&&Bs(Bn)&&(Bn=null),qn!==null&&Bs(qn)&&(qn=null),Yn!==null&&Bs(Yn)&&(Yn=null),er.forEach(Wm),tr.forEach(Wm)}function qs(e,t){e.blockedOn===t&&(e.blockedOn=null,Nu||(Nu=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Hv)))}var Ys=null;function Pm(e){Ys!==e&&(Ys=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Ys===e&&(Ys=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(ju(l||a)===null)continue;break}var u=dt(a);u!==null&&(e.splice(t,3),t-=3,_c(u,{pending:!0,data:o,method:a.method,action:l},l,o))}}))}function ni(e){function t(w){return qs(w,e)}Bn!==null&&qs(Bn,e),qn!==null&&qs(qn,e),Yn!==null&&qs(Yn,e),er.forEach(t),tr.forEach(t);for(var a=0;a<Vn.length;a++){var l=Vn[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Vn.length&&(a=Vn[0],a.blockedOn===null);)Jm(a),a.blockedOn===null&&Vn.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[me]||null;if(typeof u=="function")g||Pm(a);else if(g){var S=null;if(u&&u.hasAttribute("formAction")){if(o=u,g=u[me]||null)S=g.formAction;else if(ju(o)!==null)continue}else S=g.action;typeof S=="function"?a[l+1]=S:(a.splice(l,3),l-=3),Pm(a)}}}function Im(){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 Eu(e){this._internalRoot=e}Vs.prototype.render=Eu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var a=t.current,l=oa();$m(a,l,e,t,null,null)},Vs.prototype.unmount=Eu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;$m(e.current,2,null,e,null,null),_s(),t[ge]=null}};function Vs(e){this._internalRoot=e}Vs.prototype.unstable_scheduleHydration=function(e){if(e){var t=ae();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Vn.length&&t!==0&&t<Vn[a].priority;a++);Vn.splice(a,0,e),a===0&&Jm(e)}};var ep=i.version;if(ep!=="19.2.4")throw Error(s(527,ep,"19.2.4"));W.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?b(e):null,e=e===null?null:e.stateNode,e};var Bv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Gs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gs.isDisabled&&Gs.supportsFiber)try{Xa=Gs.inject(Bv),Yt=Gs}catch{}}return ir.createRoot=function(e,t){if(!c(e))throw Error(s(299));var a=!1,l="",o=sh,u=oh,g=ch;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=Vm(e,1,!1,null,null,a,l,null,o,u,g,Im),e[ge]=t.current,ru(e),new Eu(t)},ir.hydrateRoot=function(e,t,a){if(!c(e))throw Error(s(299));var l=!1,o="",u=sh,g=oh,S=ch,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&&(S=a.onRecoverableError),a.formState!==void 0&&(w=a.formState)),t=Vm(e,1,!0,t,a??null,l,o,w,u,g,S,Im),t.context=Gm(null),a=t.current,l=oa(),l=T(l),o=Cn(l),o.callback=null,Rn(a,o,l),a=l,t.current.lanes=a,La(t,a),Ya(t),e[ge]=t.current,ru(e),new Vs(t)},ir.version="19.2.4",ir}var Op;function nb(){if(Op)return Du.exports;Op=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(),Du.exports=ab(),Du.exports}var lb=nb();var Bg=n=>{throw TypeError(n)},ib=(n,i,r)=>i.has(n)||Bg("Cannot "+r),Uu=(n,i,r)=>(ib(n,i,"read from private field"),r?r.call(n):i.get(n)),rb=(n,i,r)=>i.has(n)?Bg("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(n):i.set(n,r),Mp="popstate";function Dp(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function sb(n={}){function i(s,c){let d=c.state?.masked,{pathname:h,search:m,hash:y}=d||s.location;return gr("",{pathname:h,search:m,hash:y},c.state&&c.state.usr||null,c.state&&c.state.key||"default",d?{pathname:s.location.pathname,search:s.location.search,hash:s.location.hash}:void 0)}function r(s,c){return typeof c=="string"?c:Ga(c)}return cb(i,r,null,n)}function Ae(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function mt(n,i){if(!n){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function ob(){return Math.random().toString(36).substring(2,10)}function Ap(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 gr(n,i,r=null,s,c){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof i=="string"?mn(i):i,state:r,key:i&&i.key||s||ob(),unstable_mask:c}}function Ga({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 mn(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 cb(n,i,r,s={}){let{window:c=document.defaultView,v5Compat:d=!1}=s,h=c.history,m="POP",y=null,p=b();p==null&&(p=0,h.replaceState({...h.state,idx:p},""));function b(){return(h.state||{idx:null}).idx}function x(){m="POP";let L=b(),Q=L==null?null:L-p;p=L,y&&y({action:m,location:M.location,delta:Q})}function _(L,Q){m="PUSH";let G=Dp(L)?L:gr(M.location,L,Q);p=b()+1;let K=Ap(G,p),re=M.createHref(G.unstable_mask||G);try{h.pushState(K,"",re)}catch(le){if(le instanceof DOMException&&le.name==="DataCloneError")throw le;c.location.assign(re)}d&&y&&y({action:m,location:M.location,delta:1})}function j(L,Q){m="REPLACE";let G=Dp(L)?L:gr(M.location,L,Q);p=b();let K=Ap(G,p),re=M.createHref(G.unstable_mask||G);h.replaceState(K,"",re),d&&y&&y({action:m,location:M.location,delta:0})}function R(L){return qg(L)}let M={get action(){return m},get location(){return n(c,h)},listen(L){if(y)throw new Error("A history only accepts one active listener");return c.addEventListener(Mp,x),y=L,()=>{c.removeEventListener(Mp,x),y=null}},createHref(L){return i(c,L)},createURL:R,encodeLocation(L){let Q=R(L);return{pathname:Q.pathname,search:Q.search,hash:Q.hash}},push:_,replace:j,go(L){return h.go(L)}};return M}function qg(n,i=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Ae(r,"No window.location.(origin|href) available to create URL");let s=typeof n=="string"?n:Ga(n);return s=s.replace(/ $/,"%20"),!i&&s.startsWith("//")&&(s=r+s),new URL(s,r)}var ur,Lp=class{constructor(n){if(rb(this,ur,new Map),n)for(let[i,r]of n)this.set(i,r)}get(n){if(Uu(this,ur).has(n))return Uu(this,ur).get(n);if(n.defaultValue!==void 0)return n.defaultValue;throw new Error("No value found for context")}set(n,i){Uu(this,ur).set(n,i)}};ur=new WeakMap;var ub=new Set(["lazy","caseSensitive","path","id","index","children"]);function db(n){return ub.has(n)}var fb=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function hb(n){return fb.has(n)}function mb(n){return n.index===!0}function yr(n,i,r=[],s={},c=!1){return n.map((d,h)=>{let m=[...r,String(h)],y=typeof d.id=="string"?d.id:m.join("-");if(Ae(d.index!==!0||!d.children,"Cannot specify children on an index route"),Ae(c||!s[y],`Found a route id collision on id "${y}". Route id's must be globally unique within Data Router usages`),mb(d)){let p={...d,id:y};return s[y]=kp(p,i(p)),p}else{let p={...d,id:y,children:void 0};return s[y]=kp(p,i(p)),d.children&&(p.children=yr(d.children,i,m,s,c)),p}})}function kp(n,i){return Object.assign(n,{...i,...typeof i.lazy=="object"&&i.lazy!=null?{lazy:{...n.lazy,...i.lazy}}:{}})}function $n(n,i,r="/"){return dr(n,i,r,!1)}function dr(n,i,r,s){let c=typeof i=="string"?mn(i):i,d=ja(c.pathname||"/",r);if(d==null)return null;let h=Yg(n);gb(h);let m=null;for(let y=0;m==null&&y<h.length;++y){let p=Cb(d);m=Eb(h[y],p,s)}return m}function pb(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 Yg(n,i=[],r=[],s="",c=!1){let d=(h,m,y=c,p)=>{let b={relativePath:p===void 0?h.path||"":p,caseSensitive:h.caseSensitive===!0,childrenIndex:m,route:h};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(s)&&y)return;Ae(b.relativePath.startsWith(s),`Absolute route path "${b.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(s.length)}let x=Da([s,b.relativePath]),_=r.concat(b);h.children&&h.children.length>0&&(Ae(h.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),Yg(h.children,i,_,x,y)),!(h.path==null&&!h.index)&&i.push({path:x,score:jb(x,h.index),routesMeta:_})};return n.forEach((h,m)=>{if(h.path===""||!h.path?.includes("?"))d(h,m);else for(let y of Vg(h.path))d(h,m,!0,y)}),i}function Vg(n){let i=n.split("/");if(i.length===0)return[];let[r,...s]=i,c=r.endsWith("?"),d=r.replace(/\?$/,"");if(s.length===0)return c?[d,""]:[d];let h=Vg(s.join("/")),m=[];return m.push(...h.map(y=>y===""?d:[d,y].join("/"))),c&&m.push(...h),m.map(y=>n.startsWith("/")&&y===""?"/":y)}function gb(n){n.sort((i,r)=>i.score!==r.score?r.score-i.score:Nb(i.routesMeta.map(s=>s.childrenIndex),r.routesMeta.map(s=>s.childrenIndex)))}var yb=/^:[\w-]+$/,xb=3,vb=2,bb=1,Sb=10,_b=-2,Up=n=>n==="*";function jb(n,i){let r=n.split("/"),s=r.length;return r.some(Up)&&(s+=_b),i&&(s+=vb),r.filter(c=>!Up(c)).reduce((c,d)=>c+(yb.test(d)?xb:d===""?bb:Sb),s)}function Nb(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 Eb(n,i,r=!1){let{routesMeta:s}=n,c={},d="/",h=[];for(let m=0;m<s.length;++m){let y=s[m],p=m===s.length-1,b=d==="/"?i:i.slice(d.length)||"/",x=no({path:y.relativePath,caseSensitive:y.caseSensitive,end:p},b),_=y.route;if(!x&&p&&r&&!s[s.length-1].route.index&&(x=no({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},b)),!x)return null;Object.assign(c,x.params),h.push({params:c,pathname:Da([d,x.pathname]),pathnameBase:Tb(Da([d,x.pathnameBase])),route:_}),x.pathnameBase!=="/"&&(d=Da([d,x.pathnameBase]))}return h}function no(n,i){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[r,s]=wb(n.path,n.caseSensitive,n.end),c=i.match(r);if(!c)return null;let d=c[0],h=d.replace(/(.)\/+$/,"$1"),m=c.slice(1);return{params:s.reduce((p,{paramName:b,isOptional:x},_)=>{if(b==="*"){let R=m[_]||"";h=d.slice(0,d.length-R.length).replace(/(.)\/+$/,"$1")}const j=m[_];return x&&!j?p[b]=void 0:p[b]=(j||"").replace(/%2F/g,"/"),p},{}),pathname:d,pathnameBase:h,pattern:n}}function wb(n,i=!1,r=!0){mt(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,b)=>{if(s.push({paramName:m,isOptional:y!=null}),y){let x=b.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 Cb(n){try{return n.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return mt(!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 ja(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 Rb({basename:n,pathname:i}){return i==="/"?n:Da([n,i])}var Gg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ld=n=>Gg.test(n);function zb(n,i="/"){let{pathname:r,search:s="",hash:c=""}=typeof n=="string"?mn(n):n,d;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?d=Hp(r.substring(1),"/"):d=Hp(r,i)):d=i,{pathname:d,search:Ob(s),hash:Mb(c)}}function Hp(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 Hu(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 $g(n){return n.filter((i,r)=>r===0||i.route.path&&i.route.path.length>0)}function so(n){let i=$g(n);return i.map((r,s)=>s===i.length-1?r.pathname:r.pathnameBase)}function br(n,i,r,s=!1){let c;typeof n=="string"?c=mn(n):(c={...n},Ae(!c.pathname||!c.pathname.includes("?"),Hu("?","pathname","search",c)),Ae(!c.pathname||!c.pathname.includes("#"),Hu("#","pathname","hash",c)),Ae(!c.search||!c.search.includes("#"),Hu("#","search","hash",c)));let d=n===""||c.pathname==="",h=d?"/":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=zb(c,m),p=h&&h!=="/"&&h.endsWith("/"),b=(d||h===".")&&r.endsWith("/");return!y.pathname.endsWith("/")&&(p||b)&&(y.pathname+="/"),y}var Da=n=>n.join("/").replace(/\/\/+/g,"/"),Tb=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Ob=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Mb=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,Sr=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 xr(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function _r(n){return n.map(i=>i.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Kg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Xg(n,i){let r=n;if(typeof r!="string"||!Gg.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let s=r,c=!1;if(Kg)try{let d=new URL(window.location.href),h=r.startsWith("//")?new URL(d.protocol+r):new URL(r),m=ja(h.pathname,i);h.origin===d.origin&&m!=null?r=m+h.search+h.hash:c=!0}catch{mt(!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 Xn=Symbol("Uninstrumented");function Db(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(d){let h=Object.keys(r);for(let m of h)d[m]&&r[m].push(d[m])}}));let s={};if(typeof i.lazy=="function"&&r.lazy.length>0){let c=oi(r.lazy,i.lazy,()=>{});c&&(s.lazy=c)}if(typeof i.lazy=="object"){let c=i.lazy;["middleware","loader","action"].forEach(d=>{let h=c[d],m=r[`lazy.${d}`];if(typeof h=="function"&&m.length>0){let y=oi(m,h,()=>{});y&&(s.lazy=Object.assign(s.lazy||{},{[d]:y}))}})}return["loader","action"].forEach(c=>{let d=i[c];if(typeof d=="function"&&r[c].length>0){let h=d[Xn]??d,m=oi(r[c],h,(...y)=>Bp(y[0]));m&&(c==="loader"&&h.hydrate===!0&&(m.hydrate=!0),m[Xn]=h,s[c]=m)}}),i.middleware&&i.middleware.length>0&&r.middleware.length>0&&(s.middleware=i.middleware.map(c=>{let d=c[Xn]??c,h=oi(r.middleware,d,(...m)=>Bp(m[0]));return h?(h[Xn]=d,h):c})),s}function Ab(n,i){let r={navigate:[],fetch:[]};if(i.forEach(s=>s({instrument(c){let d=Object.keys(c);for(let h of d)c[h]&&r[h].push(c[h])}})),r.navigate.length>0){let s=n.navigate[Xn]??n.navigate,c=oi(r.navigate,s,(...d)=>{let[h,m]=d;return{to:typeof h=="number"||typeof h=="string"?h:h?Ga(h):".",...qp(n,m??{})}});c&&(c[Xn]=s,n.navigate=c)}if(r.fetch.length>0){let s=n.fetch[Xn]??n.fetch,c=oi(r.fetch,s,(...d)=>{let[h,,m,y]=d;return{href:m??".",fetcherKey:h,...qp(n,y??{})}});c&&(c[Xn]=s,n.fetch=c)}return n}function oi(n,i,r){return n.length===0?null:async(...s)=>{let c=await Qg(n,r(...s),()=>i(...s),n.length-1);if(c.type==="error")throw c.value;return c.value}}async function Qg(n,i,r,s){let c=n[s],d;if(c){let h,m=async()=>(h?console.error("You cannot call instrumented handlers more than once"):h=Qg(n,i,r,s-1),d=await h,Ae(d,"Expected a result"),d.type==="error"&&d.value instanceof Error?{status:"error",error:d.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{d={type:"success",value:await r()}}catch(h){d={type:"error",value:h}}return d||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Bp(n){let{request:i,context:r,params:s,unstable_pattern:c}=n;return{request:Lb(i),params:{...s},unstable_pattern:c,context:kb(r)}}function qp(n,i){return{currentUrl:Ga(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 Lb(n){return{method:n.method,url:n.url,headers:{get:(...i)=>n.headers.get(...i)}}}function kb(n){if(Hb(n)){let i={...n};return Object.freeze(i),i}else return{get:i=>n.get(i)}}var Ub=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Hb(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")===Ub}var Zg=["POST","PUT","PATCH","DELETE"],Bb=new Set(Zg),qb=["GET",...Zg],Yb=new Set(qb),Fg=new Set([301,302,303,307,308]),Vb=new Set([307,308]),Bu={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Gb={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},rr={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},$b=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),Jg="remix-router-transitions",Wg=Symbol("ResetLoaderData");function Kb(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";Ae(n.routes.length>0,"You must provide a non-empty routes array to createRouter");let s=n.hydrationRouteProperties||[],c=n.mapRouteProperties||$b,d=c;if(n.unstable_instrumentations){let C=n.unstable_instrumentations;d=T=>({...c(T),...Db(C.map(H=>H.route).filter(Boolean),T)})}let h={},m=yr(n.routes,d,void 0,h),y,p=n.basename||"/";p.startsWith("/")||(p=`/${p}`);let b=n.dataStrategy||Jb,x={...n.future},_=null,j=new Set,R=null,M=null,L=null,Q=n.hydrationData!=null,G=$n(m,n.history.location,p),K=!1,re=null,le,ce;if(G==null&&!n.patchRoutesOnNavigation){let C=Sa(404,{pathname:n.history.location.pathname}),{matches:T,route:H}=Ks(m);le=!0,ce=!le,G=T,re={[H.id]:C}}else if(G&&!n.hydrationData&&vn(G,m,n.history.location.pathname).active&&(G=null),G)if(G.some(C=>C.route.lazy))le=!1,ce=!le;else if(!G.some(C=>id(C.route)))le=!0,ce=!le;else{let C=n.hydrationData?n.hydrationData.loaderData:null,T=n.hydrationData?n.hydrationData.errors:null,H=G;if(T){let ae=G.findIndex(ie=>T[ie.route.id]!==void 0);H=H.slice(0,ae+1)}ce=!1,le=H.every(ae=>{let ie=Pg(ae.route,C,T);return ce=ce||ie.renderFallback,!ie.shouldLoad})}else{le=!1,ce=!le,G=[];let C=vn(null,m,n.history.location.pathname);C.active&&C.matches&&(K=!0,G=C.matches)}let I,N={historyAction:n.history.action,location:n.history.location,matches:G,initialized:le,renderFallback:ce,navigation:Bu,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||re,fetchers:new Map,blockers:new Map},X="POP",F=null,P=!1,ne,J=!1,ee=new Map,pe=null,D=!1,W=!1,ue=new Set,V=new Map,fe=0,E=-1,B=new Map,te=new Set,se=new Map,Se=new Map,Ne=new Set,ze=new Map,lt,he=null;function wt(){if(_=n.history.listen(({action:C,location:T,delta:H})=>{if(lt){lt(),lt=void 0;return}mt(ze.size===0||H!=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 ae=Jn({currentLocation:N.location,nextLocation:T,historyAction:C});if(ae&&H!=null){let ie=new Promise(ye=>{lt=ye});n.history.go(H*-1),Qa(ae,{state:"blocked",location:T,proceed(){Qa(ae,{state:"proceeding",proceed:void 0,reset:void 0,location:T}),ie.then(()=>n.history.go(H))},reset(){let ye=new Map(N.blockers);ye.set(ae,rr),at({blockers:ye})}}),F?.resolve(),F=null;return}return pt(C,T)}),r){m1(i,ee);let C=()=>p1(i,ee);i.addEventListener("pagehide",C),pe=()=>i.removeEventListener("pagehide",C)}return N.initialized||pt("POP",N.location,{initialHydration:!0}),I}function Kt(){_&&_(),pe&&pe(),j.clear(),ne&&ne.abort(),N.fetchers.forEach((C,T)=>Xa(T)),N.blockers.forEach((C,T)=>Fn(T))}function It(C){return j.add(C),()=>j.delete(C)}function at(C,T={}){C.matches&&(C.matches=C.matches.map(ie=>{let ye=h[ie.route.id],oe=ie.route;return oe.element!==ye.element||oe.errorElement!==ye.errorElement||oe.hydrateFallbackElement!==ye.hydrateFallbackElement?{...ie,route:ye}:ie})),N={...N,...C};let H=[],ae=[];N.fetchers.forEach((ie,ye)=>{ie.state==="idle"&&(Ne.has(ye)?H.push(ye):ae.push(ye))}),Ne.forEach(ie=>{!N.fetchers.has(ie)&&!V.has(ie)&&H.push(ie)}),[...j].forEach(ie=>ie(N,{deletedFetchers:H,newErrors:C.errors??null,viewTransitionOpts:T.viewTransitionOpts,flushSync:T.flushSync===!0})),H.forEach(ie=>Xa(ie)),ae.forEach(ie=>N.fetchers.delete(ie))}function de(C,T,{flushSync:H}={}){let ae=N.actionData!=null&&N.navigation.formMethod!=null&&Ut(N.navigation.formMethod)&&N.navigation.state==="loading"&&C.state?._isRedirect!==!0,ie;T.actionData?Object.keys(T.actionData).length>0?ie=T.actionData:ie=null:ae?ie=N.actionData:ie=null;let ye=T.loaderData?Jp(N.loaderData,T.loaderData,T.matches||[],T.errors):N.loaderData,oe=N.blockers;oe.size>0&&(oe=new Map(oe),oe.forEach((Ee,be)=>oe.set(be,rr)));let me=D?!1:pi(C,T.matches||N.matches),ge=P===!0||N.navigation.formMethod!=null&&Ut(N.navigation.formMethod)&&C.state?._isRedirect!==!0;y&&(m=y,y=void 0),D||X==="POP"||(X==="PUSH"?n.history.push(C,C.state):X==="REPLACE"&&n.history.replace(C,C.state));let _e;if(X==="POP"){let Ee=ee.get(N.location.pathname);Ee&&Ee.has(C.pathname)?_e={currentLocation:N.location,nextLocation:C}:ee.has(C.pathname)&&(_e={currentLocation:C,nextLocation:N.location})}else if(J){let Ee=ee.get(N.location.pathname);Ee?Ee.add(C.pathname):(Ee=new Set([C.pathname]),ee.set(N.location.pathname,Ee)),_e={currentLocation:N.location,nextLocation:C}}at({...T,actionData:ie,loaderData:ye,historyAction:X,location:C,initialized:!0,renderFallback:!1,navigation:Bu,revalidation:"idle",restoreScrollPosition:me,preventScrollReset:ge,blockers:oe},{viewTransitionOpts:_e,flushSync:H===!0}),X="POP",P=!1,J=!1,D=!1,W=!1,F?.resolve(),F=null,he?.resolve(),he=null}async function Le(C,T){if(F?.resolve(),F=null,typeof C=="number"){F||(F=eg());let et=F.promise;return n.history.go(C),et}let H=Ju(N.location,N.matches,p,C,T?.fromRouteId,T?.relative),{path:ae,submission:ie,error:ye}=Yp(!1,H,T),oe;T?.unstable_mask&&(oe={pathname:"",search:"",hash:"",...typeof T.unstable_mask=="string"?mn(T.unstable_mask):{...N.location.unstable_mask,...T.unstable_mask}});let me=N.location,ge=gr(me,ae,T&&T.state,void 0,oe);ge={...ge,...n.history.encodeLocation(ge)};let _e=T&&T.replace!=null?T.replace:void 0,Ee="PUSH";_e===!0?Ee="REPLACE":_e===!1||ie!=null&&Ut(ie.formMethod)&&ie.formAction===N.location.pathname+N.location.search&&(Ee="REPLACE");let be=T&&"preventScrollReset"in T?T.preventScrollReset===!0:void 0,Ke=(T&&T.flushSync)===!0,ke=Jn({currentLocation:me,nextLocation:ge,historyAction:Ee});if(ke){Qa(ke,{state:"blocked",location:ge,proceed(){Qa(ke,{state:"proceeding",proceed:void 0,reset:void 0,location:ge}),Le(C,T)},reset(){let et=new Map(N.blockers);et.set(ke,rr),at({blockers:et})}});return}await pt(Ee,ge,{submission:ie,pendingError:ye,preventScrollReset:be,replace:T&&T.replace,enableViewTransition:T&&T.viewTransition,flushSync:Ke,callSiteDefaultShouldRevalidate:T&&T.unstable_defaultShouldRevalidate})}function ut(){he||(he=eg()),yn(),at({revalidation:"loading"});let C=he.promise;return N.navigation.state==="submitting"?C:N.navigation.state==="idle"?(pt(N.historyAction,N.location,{startUninterruptedRevalidation:!0}),C):(pt(X||N.historyAction,N.navigation.location,{overrideNavigation:N.navigation,enableViewTransition:J===!0}),C)}async function pt(C,T,H){ne&&ne.abort(),ne=null,X=C,D=(H&&H.startUninterruptedRevalidation)===!0,vo(N.location,N.matches),P=(H&&H.preventScrollReset)===!0,J=(H&&H.enableViewTransition)===!0;let ae=y||m,ie=H&&H.overrideNavigation,ye=H?.initialHydration&&N.matches&&N.matches.length>0&&!K?N.matches:$n(ae,T,p),oe=(H&&H.flushSync)===!0;if(ye&&N.initialized&&!W&&l1(N.location,T)&&!(H&&H.submission&&Ut(H.submission.formMethod))){de(T,{matches:ye},{flushSync:oe});return}let me=vn(ye,ae,T.pathname);if(me.active&&me.matches&&(ye=me.matches),!ye){let{error:it,notFoundMatches:dt,route:Ge}=Ra(T.pathname);de(T,{matches:dt,loaderData:{},errors:{[Ge.id]:it}},{flushSync:oe});return}ne=new AbortController;let ge=ri(n.history,T,ne.signal,H&&H.submission),_e=n.getContext?await n.getContext():new Lp,Ee;if(H&&H.pendingError)Ee=[Kn(ye).route.id,{type:"error",error:H.pendingError}];else if(H&&H.submission&&Ut(H.submission.formMethod)){let it=await $e(ge,T,H.submission,ye,_e,me.active,H&&H.initialHydration===!0,{replace:H.replace,flushSync:oe});if(it.shortCircuited)return;if(it.pendingActionResult){let[dt,Ge]=it.pendingActionResult;if(ca(Ge)&&xr(Ge.error)&&Ge.error.status===404){ne=null,de(T,{matches:it.matches,loaderData:{},errors:{[dt]:Ge.error}});return}}ye=it.matches||ye,Ee=it.pendingActionResult,ie=qu(T,H.submission),oe=!1,me.active=!1,ge=ri(n.history,ge.url,ge.signal)}let{shortCircuited:be,matches:Ke,loaderData:ke,errors:et}=await ea(ge,T,ye,_e,me.active,ie,H&&H.submission,H&&H.fetcherSubmission,H&&H.replace,H&&H.initialHydration===!0,oe,Ee,H&&H.callSiteDefaultShouldRevalidate);be||(ne=null,de(T,{matches:Ke||ye,...Wp(Ee),loaderData:ke,errors:et}))}async function $e(C,T,H,ae,ie,ye,oe,me={}){yn();let ge=f1(T,H);if(at({navigation:ge},{flushSync:me.flushSync===!0}),ye){let be=await La(ae,T.pathname,C.signal);if(be.type==="aborted")return{shortCircuited:!0};if(be.type==="error"){if(be.partialMatches.length===0){let{matches:ke,route:et}=Ks(m);return{matches:ke,pendingActionResult:[et.id,{type:"error",error:be.error}]}}let Ke=Kn(be.partialMatches).route.id;return{matches:be.partialMatches,pendingActionResult:[Ke,{type:"error",error:be.error}]}}else if(be.matches)ae=be.matches;else{let{notFoundMatches:Ke,error:ke,route:et}=Ra(T.pathname);return{matches:Ke,pendingActionResult:[et.id,{type:"error",error:ke}]}}}let _e,Ee=Ws(ae,T);if(!Ee.route.action&&!Ee.route.lazy)_e={type:"error",error:Sa(405,{method:C.method,pathname:T.pathname,routeId:Ee.route.id})};else{let be=ci(d,h,C,ae,Ee,oe?[]:s,ie),Ke=await gn(C,be,ie,null);if(_e=Ke[Ee.route.id],!_e){for(let ke of ae)if(Ke[ke.route.id]){_e=Ke[ke.route.id];break}}if(C.signal.aborted)return{shortCircuited:!0}}if(gl(_e)){let be;return me&&me.replace!=null?be=me.replace:be=Qp(_e.response.headers.get("Location"),new URL(C.url),p,n.history)===N.location.pathname+N.location.search,await Ka(C,_e,!0,{submission:H,replace:be}),{shortCircuited:!0}}if(ca(_e)){let be=Kn(ae,Ee.route.id);return(me&&me.replace)!==!0&&(X="PUSH"),{matches:ae,pendingActionResult:[be.route.id,_e,Ee.route.id]}}return{matches:ae,pendingActionResult:[Ee.route.id,_e]}}async function ea(C,T,H,ae,ie,ye,oe,me,ge,_e,Ee,be,Ke){let ke=ye||qu(T,oe),et=oe||me||Ip(ke),it=!D&&!_e;if(ie){if(it){let gt=ta(be);at({navigation:ke,...gt!==void 0?{actionData:gt}:{}},{flushSync:Ee})}let Ue=await La(H,T.pathname,C.signal);if(Ue.type==="aborted")return{shortCircuited:!0};if(Ue.type==="error"){if(Ue.partialMatches.length===0){let{matches:Lt,route:vt}=Ks(m);return{matches:Lt,loaderData:{},errors:{[vt.id]:Ue.error}}}let gt=Kn(Ue.partialMatches).route.id;return{matches:Ue.partialMatches,loaderData:{},errors:{[gt]:Ue.error}}}else if(Ue.matches)H=Ue.matches;else{let{error:gt,notFoundMatches:Lt,route:vt}=Ra(T.pathname);return{matches:Lt,loaderData:{},errors:{[vt.id]:gt}}}}let dt=y||m,{dsMatches:Ge,revalidatingFetchers:Nt}=Vp(C,ae,d,h,n.history,N,H,et,T,_e?[]:s,_e===!0,W,ue,Ne,se,te,dt,p,n.patchRoutesOnNavigation!=null,be,Ke);if(E=++fe,!n.dataStrategy&&!Ge.some(Ue=>Ue.shouldLoad)&&!Ge.some(Ue=>Ue.route.middleware&&Ue.route.middleware.length>0)&&Nt.length===0){let Ue=Rr();return de(T,{matches:H,loaderData:{},errors:be&&ca(be[1])?{[be[0]]:be[1].error}:null,...Wp(be),...Ue?{fetchers:new Map(N.fetchers)}:{}},{flushSync:Ee}),{shortCircuited:!0}}if(it){let Ue={};if(!ie){Ue.navigation=ke;let gt=ta(be);gt!==void 0&&(Ue.actionData=gt)}Nt.length>0&&(Ue.fetchers=wa(Nt)),at(Ue,{flushSync:Ee})}Nt.forEach(Ue=>{Ct(Ue.key),Ue.controller&&V.set(Ue.key,Ue.controller)});let nt=()=>Nt.forEach(Ue=>Ct(Ue.key));ne&&ne.signal.addEventListener("abort",nt);let{loaderResults:bn,fetcherResults:za}=await mi(Ge,Nt,C,ae);if(C.signal.aborted)return{shortCircuited:!0};ne&&ne.signal.removeEventListener("abort",nt),Nt.forEach(Ue=>V.delete(Ue.key));let Rt=Xs(bn);if(Rt)return await Ka(C,Rt.result,!0,{replace:ge}),{shortCircuited:!0};if(Rt=Xs(za),Rt)return te.add(Rt.key),await Ka(C,Rt.result,!0,{replace:ge}),{shortCircuited:!0};let{loaderData:ka,errors:Wn}=Fp(N,H,bn,be,Nt,za);_e&&N.errors&&(Wn={...N.errors,...Wn});let Ua=Rr(),Pn=zr(E),_l=Ua||Pn||Nt.length>0;return{matches:H,loaderData:ka,errors:Wn,..._l?{fetchers:new Map(N.fetchers)}:{}}}function ta(C){if(C&&!ca(C[1]))return{[C[0]]:C[1].data};if(N.actionData)return Object.keys(N.actionData).length===0?null:N.actionData}function wa(C){return C.forEach(T=>{let H=N.fetchers.get(T.key),ae=sr(void 0,H?H.data:void 0);N.fetchers.set(T.key,ae)}),new Map(N.fetchers)}async function pn(C,T,H,ae){Ct(C);let ie=(ae&&ae.flushSync)===!0,ye=y||m,oe=Ju(N.location,N.matches,p,H,T,ae?.relative),me=$n(ye,oe,p),ge=vn(me,ye,oe);if(ge.active&&ge.matches&&(me=ge.matches),!me){da(C,T,Sa(404,{pathname:oe}),{flushSync:ie});return}let{path:_e,submission:Ee,error:be}=Yp(!0,oe,ae);if(be){da(C,T,be,{flushSync:ie});return}let Ke=n.getContext?await n.getContext():new Lp,ke=(ae&&ae.preventScrollReset)===!0;if(Ee&&Ut(Ee.formMethod)){await Zn(C,T,_e,me,Ke,ge.active,ie,ke,Ee,ae&&ae.unstable_defaultShouldRevalidate);return}se.set(C,{routeId:T,path:_e}),await qt(C,T,_e,me,Ke,ge.active,ie,ke,Ee)}async function Zn(C,T,H,ae,ie,ye,oe,me,ge,_e){yn(),se.delete(C);let Ee=N.fetchers.get(C);Ca(C,h1(ge,Ee),{flushSync:oe});let be=new AbortController,Ke=ri(n.history,H,be.signal,ge);if(ye){let rt=await La(ae,new URL(Ke.url).pathname,Ke.signal,C);if(rt.type==="aborted")return;if(rt.type==="error"){da(C,T,rt.error,{flushSync:oe});return}else if(rt.matches)ae=rt.matches;else{da(C,T,Sa(404,{pathname:H}),{flushSync:oe});return}}let ke=Ws(ae,H);if(!ke.route.action&&!ke.route.lazy){let rt=Sa(405,{method:ge.formMethod,pathname:H,routeId:T});da(C,T,rt,{flushSync:oe});return}V.set(C,be);let et=fe,it=ci(d,h,Ke,ae,ke,s,ie),dt=await gn(Ke,it,ie,C),Ge=dt[ke.route.id];if(!Ge){for(let rt of it)if(dt[rt.route.id]){Ge=dt[rt.route.id];break}}if(Ke.signal.aborted){V.get(C)===be&&V.delete(C);return}if(Ne.has(C)){if(gl(Ge)||ca(Ge)){Ca(C,fn(void 0));return}}else{if(gl(Ge))if(V.delete(C),E>et){Ca(C,fn(void 0));return}else return te.add(C),Ca(C,sr(ge)),Ka(Ke,Ge,!1,{fetcherSubmission:ge,preventScrollReset:me});if(ca(Ge)){da(C,T,Ge.error);return}}let Nt=N.navigation.location||N.location,nt=ri(n.history,Nt,be.signal),bn=y||m,za=N.navigation.state!=="idle"?$n(bn,N.navigation.location,p):N.matches;Ae(za,"Didn't find any matches after fetcher action");let Rt=++fe;B.set(C,Rt);let ka=sr(ge,Ge.data);N.fetchers.set(C,ka);let{dsMatches:Wn,revalidatingFetchers:Ua}=Vp(nt,ie,d,h,n.history,N,za,ge,Nt,s,!1,W,ue,Ne,se,te,bn,p,n.patchRoutesOnNavigation!=null,[ke.route.id,Ge],_e);Ua.filter(rt=>rt.key!==C).forEach(rt=>{let jl=rt.key,Nl=N.fetchers.get(jl),Dr=sr(void 0,Nl?Nl.data:void 0);N.fetchers.set(jl,Dr),Ct(jl),rt.controller&&V.set(jl,rt.controller)}),at({fetchers:new Map(N.fetchers)});let Pn=()=>Ua.forEach(rt=>Ct(rt.key));be.signal.addEventListener("abort",Pn);let{loaderResults:_l,fetcherResults:Ue}=await mi(Wn,Ua,nt,ie);if(be.signal.aborted)return;if(be.signal.removeEventListener("abort",Pn),B.delete(C),V.delete(C),Ua.forEach(rt=>V.delete(rt.key)),N.fetchers.has(C)){let rt=fn(Ge.data);N.fetchers.set(C,rt)}let gt=Xs(_l);if(gt)return Ka(nt,gt.result,!1,{preventScrollReset:me});if(gt=Xs(Ue),gt)return te.add(gt.key),Ka(nt,gt.result,!1,{preventScrollReset:me});let{loaderData:Lt,errors:vt}=Fp(N,za,_l,void 0,Ua,Ue);zr(Rt),N.navigation.state==="loading"&&Rt>E?(Ae(X,"Expected pending action"),ne&&ne.abort(),de(N.navigation.location,{matches:za,loaderData:Lt,errors:vt,fetchers:new Map(N.fetchers)})):(at({errors:vt,loaderData:Jp(N.loaderData,Lt,za,vt),fetchers:new Map(N.fetchers)}),W=!1)}async function qt(C,T,H,ae,ie,ye,oe,me,ge){let _e=N.fetchers.get(C);Ca(C,sr(ge,_e?_e.data:void 0),{flushSync:oe});let Ee=new AbortController,be=ri(n.history,H,Ee.signal);if(ye){let Ge=await La(ae,new URL(be.url).pathname,be.signal,C);if(Ge.type==="aborted")return;if(Ge.type==="error"){da(C,T,Ge.error,{flushSync:oe});return}else if(Ge.matches)ae=Ge.matches;else{da(C,T,Sa(404,{pathname:H}),{flushSync:oe});return}}let Ke=Ws(ae,H);V.set(C,Ee);let ke=fe,et=ci(d,h,be,ae,Ke,s,ie),dt=(await gn(be,et,ie,C))[Ke.route.id];if(V.get(C)===Ee&&V.delete(C),!be.signal.aborted){if(Ne.has(C)){Ca(C,fn(void 0));return}if(gl(dt))if(E>ke){Ca(C,fn(void 0));return}else{te.add(C),await Ka(be,dt,!1,{preventScrollReset:me});return}if(ca(dt)){da(C,T,dt.error);return}Ca(C,fn(dt.data))}}async function Ka(C,T,H,{submission:ae,fetcherSubmission:ie,preventScrollReset:ye,replace:oe}={}){H||(F?.resolve(),F=null),T.response.headers.has("X-Remix-Revalidate")&&(W=!0);let me=T.response.headers.get("Location");Ae(me,"Expected a Location header on the redirect Response"),me=Qp(me,new URL(C.url),p,n.history);let ge=gr(N.location,me,{_isRedirect:!0});if(r){let et=!1;if(T.response.headers.has("X-Remix-Reload-Document"))et=!0;else if(ld(me)){const it=qg(me,!0);et=it.origin!==i.location.origin||ja(it.pathname,p)==null}if(et){oe?i.location.replace(me):i.location.assign(me);return}}ne=null;let _e=oe===!0||T.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Ee,formAction:be,formEncType:Ke}=N.navigation;!ae&&!ie&&Ee&&be&&Ke&&(ae=Ip(N.navigation));let ke=ae||ie;if(Vb.has(T.response.status)&&ke&&Ut(ke.formMethod))await pt(_e,ge,{submission:{...ke,formAction:me},preventScrollReset:ye||P,enableViewTransition:H?J:void 0});else{let et=qu(ge,ae);await pt(_e,ge,{overrideNavigation:et,fetcherSubmission:ie,preventScrollReset:ye||P,enableViewTransition:H?J:void 0})}}async function gn(C,T,H,ae){let ie,ye={};try{ie=await Pb(b,C,T,ae,H,!1)}catch(oe){return T.filter(me=>me.shouldLoad).forEach(me=>{ye[me.route.id]={type:"error",error:oe}}),ye}if(C.signal.aborted)return ye;if(!Ut(C.method))for(let oe of T){if(ie[oe.route.id]?.type==="error")break;!ie.hasOwnProperty(oe.route.id)&&!N.loaderData.hasOwnProperty(oe.route.id)&&(!N.errors||!N.errors.hasOwnProperty(oe.route.id))&&oe.shouldCallHandler()&&(ie[oe.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${oe.route.id}`)})}for(let[oe,me]of Object.entries(ie))if(o1(me)){let ge=me.result;ye[oe]={type:"redirect",response:a1(ge,C,oe,T,p)}}else ye[oe]=await t1(me);return ye}async function mi(C,T,H,ae){let ie=gn(H,C,ae,null),ye=Promise.all(T.map(async ge=>{if(ge.matches&&ge.match&&ge.request&&ge.controller){let Ee=(await gn(ge.request,ge.matches,ae,ge.key))[ge.match.route.id];return{[ge.key]:Ee}}else return Promise.resolve({[ge.key]:{type:"error",error:Sa(404,{pathname:ge.path})}})})),oe=await ie,me=(await ye).reduce((ge,_e)=>Object.assign(ge,_e),{});return{loaderResults:oe,fetcherResults:me}}function yn(){W=!0,se.forEach((C,T)=>{V.has(T)&&ue.add(T),Ct(T)})}function Ca(C,T,H={}){N.fetchers.set(C,T),at({fetchers:new Map(N.fetchers)},{flushSync:(H&&H.flushSync)===!0})}function da(C,T,H,ae={}){let ie=Kn(N.matches,T);Xa(C),at({errors:{[ie.route.id]:H},fetchers:new Map(N.fetchers)},{flushSync:(ae&&ae.flushSync)===!0})}function Cr(C){return Se.set(C,(Se.get(C)||0)+1),Ne.has(C)&&Ne.delete(C),N.fetchers.get(C)||Gb}function yo(C,T){Ct(C,T?.reason),Ca(C,fn(null))}function Xa(C){let T=N.fetchers.get(C);V.has(C)&&!(T&&T.state==="loading"&&B.has(C))&&Ct(C),se.delete(C),B.delete(C),te.delete(C),Ne.delete(C),ue.delete(C),N.fetchers.delete(C)}function Yt(C){let T=(Se.get(C)||0)-1;T<=0?(Se.delete(C),Ne.add(C)):Se.set(C,T),at({fetchers:new Map(N.fetchers)})}function Ct(C,T){let H=V.get(C);H&&(H.abort(T),V.delete(C))}function At(C){for(let T of C){let H=Cr(T),ae=fn(H.data);N.fetchers.set(T,ae)}}function Rr(){let C=[],T=!1;for(let H of te){let ae=N.fetchers.get(H);Ae(ae,`Expected fetcher: ${H}`),ae.state==="loading"&&(te.delete(H),C.push(H),T=!0)}return At(C),T}function zr(C){let T=[];for(let[H,ae]of B)if(ae<C){let ie=N.fetchers.get(H);Ae(ie,`Expected fetcher: ${H}`),ie.state==="loading"&&(Ct(H),B.delete(H),T.push(H))}return At(T),T.length>0}function xo(C,T){let H=N.blockers.get(C)||rr;return ze.get(C)!==T&&ze.set(C,T),H}function Fn(C){N.blockers.delete(C),ze.delete(C)}function Qa(C,T){let H=N.blockers.get(C)||rr;Ae(H.state==="unblocked"&&T.state==="blocked"||H.state==="blocked"&&T.state==="blocked"||H.state==="blocked"&&T.state==="proceeding"||H.state==="blocked"&&T.state==="unblocked"||H.state==="proceeding"&&T.state==="unblocked",`Invalid blocker state transition: ${H.state} -> ${T.state}`);let ae=new Map(N.blockers);ae.set(C,T),at({blockers:ae})}function Jn({currentLocation:C,nextLocation:T,historyAction:H}){if(ze.size===0)return;ze.size>1&&mt(!1,"A router only supports one blocker at a time");let ae=Array.from(ze.entries()),[ie,ye]=ae[ae.length-1],oe=N.blockers.get(ie);if(!(oe&&oe.state==="proceeding")&&ye({currentLocation:C,nextLocation:T,historyAction:H}))return ie}function Ra(C){let T=Sa(404,{pathname:C}),H=y||m,{matches:ae,route:ie}=Ks(H);return{notFoundMatches:ae,route:ie,error:T}}function Sl(C,T,H){if(R=C,L=T,M=H||null,!Q&&N.navigation===Bu){Q=!0;let ae=pi(N.location,N.matches);ae!=null&&at({restoreScrollPosition:ae})}return()=>{R=null,L=null,M=null}}function xn(C,T){return M&&M(C,T.map(ae=>pb(ae,N.loaderData)))||C.key}function vo(C,T){if(R&&L){let H=xn(C,T);R[H]=L()}}function pi(C,T){if(R){let H=xn(C,T),ae=R[H];if(typeof ae=="number")return ae}return null}function vn(C,T,H){if(n.patchRoutesOnNavigation)if(C){if(Object.keys(C[0].params).length>0)return{active:!0,matches:dr(T,H,p,!0)}}else return{active:!0,matches:dr(T,H,p,!0)||[]};return{active:!1,matches:null}}async function La(C,T,H,ae){if(!n.patchRoutesOnNavigation)return{type:"success",matches:C};let ie=C;for(;;){let ye=y==null,oe=y||m,me=h;try{await n.patchRoutesOnNavigation({signal:H,path:T,matches:ie,fetcherKey:ae,patch:(Ee,be)=>{H.aborted||Gp(Ee,be,oe,me,d,!1)}})}catch(Ee){return{type:"error",error:Ee,partialMatches:ie}}finally{ye&&!H.aborted&&(m=[...m])}if(H.aborted)return{type:"aborted"};let ge=$n(oe,T,p),_e=null;if(ge){if(Object.keys(ge[0].params).length===0)return{type:"success",matches:ge};if(_e=dr(oe,T,p,!0),!(_e&&ie.length<_e.length&&Tr(ie,_e.slice(0,ie.length))))return{type:"success",matches:ge}}if(_e||(_e=dr(oe,T,p,!0)),!_e||Tr(ie,_e))return{type:"success",matches:null};ie=_e}}function Tr(C,T){return C.length===T.length&&C.every((H,ae)=>H.route.id===T[ae].route.id)}function Or(C){h={},y=yr(C,d,void 0,h)}function Mr(C,T,H=!1){let ae=y==null;Gp(C,T,y||m,h,d,H),ae&&(m=[...m],at({}))}return I={get basename(){return p},get future(){return x},get state(){return N},get routes(){return m},get window(){return i},initialize:wt,subscribe:It,enableScrollRestoration:Sl,navigate:Le,fetch:pn,revalidate:ut,createHref:C=>n.history.createHref(C),encodeLocation:C=>n.history.encodeLocation(C),getFetcher:Cr,resetFetcher:yo,deleteFetcher:Yt,dispose:Kt,getBlocker:xo,deleteBlocker:Fn,patchRoutes:Mr,_internalFetchControllers:V,_internalSetRoutes:Or,_internalSetStateDoNotUseOrYouWillBreakYourApp(C){at(C)}},n.unstable_instrumentations&&(I=Ab(I,n.unstable_instrumentations.map(C=>C.router).filter(Boolean))),I}function Xb(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function Ju(n,i,r,s,c,d){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=br(s||".",so(h),ja(n.pathname,r)||n.pathname,d==="path");if(s==null&&(y.search=n.search,y.hash=n.hash),(s==null||s===""||s===".")&&m){let p=sd(y.search);if(m.route.index&&!p)y.search=y.search?y.search.replace(/^\?/,"?index&"):"?index";else if(!m.route.index&&p){let b=new URLSearchParams(y.search),x=b.getAll("index");b.delete("index"),x.filter(j=>j).forEach(j=>b.append("index",j));let _=b.toString();y.search=_?`?${_}`:""}}return r!=="/"&&(y.pathname=Rb({basename:r,pathname:y.pathname})),Ga(y)}function Yp(n,i,r){if(!r||!Xb(r))return{path:i};if(r.formMethod&&!d1(r.formMethod))return{path:i,error:Sa(405,{method:r.formMethod})};let s=()=>({path:i,error:Sa(400,{type:"invalid-body"})}),d=(r.formMethod||"get").toUpperCase(),h=ly(i);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Ut(d))return s();let x=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((_,[j,R])=>`${_}${j}=${R}
|
|
10
|
+
`,""):String(r.body);return{path:i,submission:{formMethod:d,formAction:h,formEncType:r.formEncType,formData:void 0,json:void 0,text:x}}}else if(r.formEncType==="application/json"){if(!Ut(d))return s();try{let x=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:i,submission:{formMethod:d,formAction:h,formEncType:r.formEncType,formData:void 0,json:x,text:void 0}}}catch{return s()}}}Ae(typeof FormData=="function","FormData is not available in this environment");let m,y;if(r.formData)m=Pu(r.formData),y=r.formData;else if(r.body instanceof FormData)m=Pu(r.body),y=r.body;else if(r.body instanceof URLSearchParams)m=r.body,y=Zp(m);else if(r.body==null)m=new URLSearchParams,y=new FormData;else try{m=new URLSearchParams(r.body),y=Zp(m)}catch{return s()}let p={formMethod:d,formAction:h,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:y,json:void 0,text:void 0};if(Ut(p.formMethod))return{path:i,submission:p};let b=mn(i);return n&&b.search&&sd(b.search)&&m.append("index",""),b.search=`?${m}`,{path:Ga(b),submission:p}}function Vp(n,i,r,s,c,d,h,m,y,p,b,x,_,j,R,M,L,Q,G,K,re){let le=K?ca(K[1])?K[1].error:K[1].data:void 0,ce=c.createURL(d.location),I=c.createURL(y),N;if(b&&d.errors){let pe=Object.keys(d.errors)[0];N=h.findIndex(D=>D.route.id===pe)}else if(K&&ca(K[1])){let pe=K[0];N=h.findIndex(D=>D.route.id===pe)-1}let X=K?K[1].statusCode:void 0,F=X&&X>=400,P={currentUrl:ce,currentParams:d.matches[0]?.params||{},nextUrl:I,nextParams:h[0].params,...m,actionResult:le,actionStatus:X},ne=_r(h),J=h.map((pe,D)=>{let{route:W}=pe,ue=null;if(N!=null&&D>N)ue=!1;else if(W.lazy)ue=!0;else if(!id(W))ue=!1;else if(b){let{shouldLoad:B}=Pg(W,d.loaderData,d.errors);ue=B}else Qb(d.loaderData,d.matches[D],pe)&&(ue=!0);if(ue!==null)return Wu(r,s,n,ne,pe,p,i,ue);let V=!1;typeof re=="boolean"?V=re:F?V=!1:(x||ce.pathname+ce.search===I.pathname+I.search||ce.search!==I.search||Zb(d.matches[D],pe))&&(V=!0);let fe={...P,defaultShouldRevalidate:V},E=mr(pe,fe);return Wu(r,s,n,ne,pe,p,i,E,fe,re)}),ee=[];return R.forEach((pe,D)=>{if(b||!h.some(se=>se.route.id===pe.routeId)||j.has(D))return;let W=d.fetchers.get(D),ue=W&&W.state!=="idle"&&W.data===void 0,V=$n(L,pe.path,Q);if(!V){if(G&&ue)return;ee.push({key:D,routeId:pe.routeId,path:pe.path,matches:null,match:null,request:null,controller:null});return}if(M.has(D))return;let fe=Ws(V,pe.path),E=new AbortController,B=ri(c,pe.path,E.signal),te=null;if(_.has(D))_.delete(D),te=ci(r,s,B,V,fe,p,i);else if(ue)x&&(te=ci(r,s,B,V,fe,p,i));else{let se;typeof re=="boolean"?se=re:F?se=!1:se=x;let Se={...P,defaultShouldRevalidate:se};mr(fe,Se)&&(te=ci(r,s,B,V,fe,p,i,Se))}te&&ee.push({key:D,routeId:pe.routeId,path:pe.path,matches:te,match:fe,request:B,controller:E})}),{dsMatches:J,revalidatingFetchers:ee}}function id(n){return n.loader!=null||n.middleware!=null&&n.middleware.length>0}function Pg(n,i,r){if(n.lazy)return{shouldLoad:!0,renderFallback:!0};if(!id(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 d=!s&&!c;return{shouldLoad:d,renderFallback:d}}function Qb(n,i,r){let s=!i||r.route.id!==i.route.id,c=!n.hasOwnProperty(r.route.id);return s||c}function Zb(n,i){let r=n.route.path;return n.pathname!==i.pathname||r!=null&&r.endsWith("*")&&n.params["*"]!==i.params["*"]}function mr(n,i){if(n.route.shouldRevalidate){let r=n.route.shouldRevalidate(i);if(typeof r=="boolean")return r}return i.defaultShouldRevalidate}function Gp(n,i,r,s,c,d){let h;if(n){let p=s[n];Ae(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 b=h.find(x=>Ig(p,x));b?y.push({existingRoute:b,newRoute:p}):m.push(p)}),m.length>0){let p=yr(m,c,[n||"_","patch",String(h?.length||"0")],s);h.push(...p)}if(d&&y.length>0)for(let p=0;p<y.length;p++){let{existingRoute:b,newRoute:x}=y[p],_=b,[j]=yr([x],c,[],{},!0);Object.assign(_,{element:j.element?j.element:_.element,errorElement:j.errorElement?j.errorElement:_.errorElement,hydrateFallbackElement:j.hydrateFallbackElement?j.hydrateFallbackElement:_.hydrateFallbackElement})}}function Ig(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=>Ig(r,c)))??!1:!1}var $p=new WeakMap,ey=({key:n,route:i,manifest:r,mapRouteProperties:s})=>{let c=r[i.id];if(Ae(c,"No route found in manifest"),!c.lazy||typeof c.lazy!="object")return;let d=c.lazy[n];if(!d)return;let h=$p.get(c);h||(h={},$p.set(c,h));let m=h[n];if(m)return m;let y=(async()=>{let p=db(n),x=c[n]!==void 0&&n!=="hasErrorBoundary";if(p)mt(!p,"Route property "+n+" is not a supported lazy route property. This property will be ignored."),h[n]=Promise.resolve();else if(x)mt(!1,`Route "${c.id}" has a static property "${n}" defined. The lazy property will be ignored.`);else{let _=await d();_!=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},Kp=new WeakMap;function Fb(n,i,r,s,c){let d=r[n.id];if(Ae(d,"No route found in manifest"),!n.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof n.lazy=="function"){let b=Kp.get(d);if(b)return{lazyRoutePromise:b,lazyHandlerPromise:b};let x=(async()=>{Ae(typeof n.lazy=="function","No lazy route function found");let _=await n.lazy(),j={};for(let R in _){let M=_[R];if(M===void 0)continue;let L=hb(R),G=d[R]!==void 0&&R!=="hasErrorBoundary";L?mt(!L,"Route property "+R+" is not a supported property to be returned from a lazy route function. This property will be ignored."):G?mt(!G,`Route "${d.id}" has a static property "${R}" defined but its lazy function is also returning a value for this property. The lazy route property "${R}" will be ignored.`):j[R]=M}Object.assign(d,j),Object.assign(d,{...s(d),lazy:void 0})})();return Kp.set(d,x),x.catch(()=>{}),{lazyRoutePromise:x,lazyHandlerPromise:x}}let h=Object.keys(n.lazy),m=[],y;for(let b of h){if(c&&c.includes(b))continue;let x=ey({key:b,route:n,manifest:r,mapRouteProperties:s});x&&(m.push(x),b===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 Xp(n){let i=n.matches.filter(c=>c.shouldLoad),r={};return(await Promise.all(i.map(c=>c.resolve()))).forEach((c,d)=>{r[i[d].route.id]=c}),r}async function Jb(n){return n.matches.some(i=>i.route.middleware)?ty(n,()=>Xp(n)):Xp(n)}function ty(n,i){return Wb(n,i,s=>{if(u1(s))throw s;return s},r1,r);function r(s,c,d){if(d)return Promise.resolve(Object.assign(d.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=Kn(h,h[m].route.id).route.id;return Promise.resolve({[y]:{type:"error",result:s}})}}}async function Wb(n,i,r,s,c){let{matches:d,request:h,params:m,context:y,unstable_pattern:p}=n,b=d.flatMap(_=>_.route.middleware?_.route.middleware.map(j=>[_.route.id,j]):[]);return await ay({request:h,params:m,context:y,unstable_pattern:p},b,i,r,s,c)}async function ay(n,i,r,s,c,d,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,b]=y,x,_=async()=>{if(x)throw new Error("You may only call `next()` once per middleware");try{return x={value:await ay(n,i,r,s,c,d,h+1)},x.value}catch(j){return x={value:await d(j,p,x)},x.value}};try{let j=await b(n,_),R=j!=null?s(j):void 0;return c(R)?R:x?R??x.value:(x={value:await _()},x.value)}catch(j){return await d(j,p,x)}}function ny(n,i,r,s,c){let d=ey({key:"middleware",route:s.route,manifest:i,mapRouteProperties:n}),h=Fb(s.route,Ut(r.method)?"action":"loader",i,n,c);return{middleware:d,route:h.lazyRoutePromise,handler:h.lazyHandlerPromise}}function Wu(n,i,r,s,c,d,h,m,y=null,p){let b=!1,x=ny(n,i,r,c,d);return{...c,_lazyPromises:x,shouldLoad:m,shouldRevalidateArgs:y,shouldCallHandler(_){return b=!0,y?typeof p=="boolean"?mr(c,{...y,defaultShouldRevalidate:p}):typeof _=="boolean"?mr(c,{...y,defaultShouldRevalidate:_}):mr(c,y):m},resolve(_){let{lazy:j,loader:R,middleware:M}=c.route,L=b||m||_&&!Ut(r.method)&&(j||R),Q=M&&M.length>0&&!R&&!j;return L&&(Ut(r.method)||!Q)?Ib({request:r,unstable_pattern:s,match:c,lazyHandlerPromise:x?.handler,lazyRoutePromise:x?.route,handlerOverride:_,scopedContext:h}):Promise.resolve({type:"data",result:void 0})}}}function ci(n,i,r,s,c,d,h,m=null){return s.map(y=>y.route.id!==c.route.id?{...y,shouldLoad:!1,shouldRevalidateArgs:m,shouldCallHandler:()=>!1,_lazyPromises:ny(n,i,r,y,d),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Wu(n,i,r,_r(s),y,d,h,!0,m))}async function Pb(n,i,r,s,c,d){r.some(p=>p._lazyPromises?.middleware)&&await Promise.all(r.map(p=>p._lazyPromises?.middleware));let h={request:i,unstable_pattern:_r(r),params:r[0].params,context:c,matches:r},y=await n({...h,fetcherKey:s,runClientMiddleware:p=>{let b=h;return ty(b,()=>p({...b,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 Ib({request:n,unstable_pattern:i,match:r,lazyHandlerPromise:s,lazyRoutePromise:c,handlerOverride:d,scopedContext:h}){let m,y,p=Ut(n.method),b=p?"action":"loader",x=_=>{let j,R=new Promise((Q,G)=>j=G);y=()=>j(),n.signal.addEventListener("abort",y);let M=Q=>typeof _!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${b}" [routeId: ${r.route.id}]`)):_({request:n,unstable_pattern:i,params:r.params,context:h},...Q!==void 0?[Q]:[]),L=(async()=>{try{return{type:"data",result:await(d?d(G=>M(G)):M())}}catch(Q){return{type:"error",result:Q}}})();return Promise.race([L,R])};try{let _=p?r.route.action:r.route.loader;if(s||c)if(_){let j,[R]=await Promise.all([x(_).catch(M=>{j=M}),s,c]);if(j!==void 0)throw j;m=R}else{await s;let j=p?r.route.action:r.route.loader;if(j)[m]=await Promise.all([x(j),c]);else if(b==="action"){let R=new URL(n.url),M=R.pathname+R.search;throw Sa(405,{method:n.method,pathname:M,routeId:r.route.id})}else return{type:"data",result:void 0}}else if(_)m=await x(_);else{let j=new URL(n.url),R=j.pathname+j.search;throw Sa(404,{pathname:R})}}catch(_){return{type:"error",result:_}}finally{y&&n.signal.removeEventListener("abort",y)}return m}async function e1(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 t1(n){let{result:i,type:r}=n;if(rd(i)){let s;try{s=await e1(i)}catch(c){return{type:"error",error:c}}return r==="error"?{type:"error",error:new Sr(i.status,i.statusText,s),statusCode:i.status,headers:i.headers}:{type:"data",data:s,statusCode:i.status,headers:i.headers}}return r==="error"?Pp(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:i1(i),statusCode:xr(i)?i.status:void 0,headers:i.init?.headers?new Headers(i.init.headers):void 0}:{type:"error",error:i,statusCode:xr(i)?i.status:void 0}:Pp(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 a1(n,i,r,s,c){let d=n.headers.get("Location");if(Ae(d,"Redirects returned/thrown from loaders/actions must have a Location header"),!ld(d)){let h=s.slice(0,s.findIndex(m=>m.route.id===r)+1);d=Ju(new URL(i.url),h,c,d),n.headers.set("Location",d)}return n}function Qp(n,i,r,s){let c=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(ld(n)){let d=n,h=d.startsWith("//")?new URL(i.protocol+d):new URL(d);if(c.includes(h.protocol))throw new Error("Invalid redirect location");let m=ja(h.pathname,r)!=null;if(h.origin===i.origin&&m)return h.pathname+h.search+h.hash}try{let d=s.createURL(n);if(c.includes(d.protocol))throw new Error("Invalid redirect location")}catch{}return n}function ri(n,i,r,s){let c=n.createURL(ly(i)).toString(),d={signal:r};if(s&&Ut(s.formMethod)){let{formMethod:h,formEncType:m}=s;d.method=h.toUpperCase(),m==="application/json"?(d.headers=new Headers({"Content-Type":m}),d.body=JSON.stringify(s.json)):m==="text/plain"?d.body=s.text:m==="application/x-www-form-urlencoded"&&s.formData?d.body=Pu(s.formData):d.body=s.formData}return new Request(c,d)}function Pu(n){let i=new URLSearchParams;for(let[r,s]of n.entries())i.append(r,typeof s=="string"?s:s.name);return i}function Zp(n){let i=new FormData;for(let[r,s]of n.entries())i.append(r,s);return i}function n1(n,i,r,s=!1,c=!1){let d={},h=null,m,y=!1,p={},b=r&&ca(r[1])?r[1].error:void 0;return n.forEach(x=>{if(!(x.route.id in i))return;let _=x.route.id,j=i[_];if(Ae(!gl(j),"Cannot handle redirect results in processLoaderData"),ca(j)){let R=j.error;if(b!==void 0&&(R=b,b=void 0),h=h||{},c)h[_]=R;else{let M=Kn(n,_);h[M.route.id]==null&&(h[M.route.id]=R)}s||(d[_]=Wg),y||(y=!0,m=xr(j.error)?j.error.status:500),j.headers&&(p[_]=j.headers)}else d[_]=j.data,j.statusCode&&j.statusCode!==200&&!y&&(m=j.statusCode),j.headers&&(p[_]=j.headers)}),b!==void 0&&r&&(h={[r[0]]:b},r[2]&&(d[r[2]]=void 0)),{loaderData:d,errors:h,statusCode:m||200,loaderHeaders:p}}function Fp(n,i,r,s,c,d){let{loaderData:h,errors:m}=n1(i,r,s);return c.filter(y=>!y.matches||y.matches.some(p=>p.shouldLoad)).forEach(y=>{let{key:p,match:b,controller:x}=y;if(x&&x.signal.aborted)return;let _=d[p];if(Ae(_,"Did not find corresponding fetcher result"),ca(_)){let j=Kn(n.matches,b?.route.id);m&&m[j.route.id]||(m={...m,[j.route.id]:_.error}),n.fetchers.delete(p)}else if(gl(_))Ae(!1,"Unhandled fetcher revalidation redirect");else{let j=fn(_.data);n.fetchers.set(p,j)}}),{loaderData:h,errors:m}}function Jp(n,i,r,s){let c=Object.entries(i).filter(([,d])=>d!==Wg).reduce((d,[h,m])=>(d[h]=m,d),{});for(let d of r){let h=d.route.id;if(!i.hasOwnProperty(h)&&n.hasOwnProperty(h)&&d.route.loader&&(c[h]=n[h]),s&&s.hasOwnProperty(h))break}return c}function Wp(n){return n?ca(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function Kn(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 Ks(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 Sa(n,{pathname:i,routeId:r,method:s,type:c,message:d}={}){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 Sr(n||500,h,new Error(m),!0)}function Xs(n){let i=Object.entries(n);for(let r=i.length-1;r>=0;r--){let[s,c]=i[r];if(gl(c))return{key:s,result:c}}}function ly(n){let i=typeof n=="string"?mn(n):n;return Ga({...i,hash:""})}function l1(n,i){return n.pathname!==i.pathname||n.search!==i.search?!1:n.hash===""?i.hash!=="":n.hash===i.hash?!0:i.hash!==""}function i1(n){return new Sr(n.init?.status??500,n.init?.statusText??"Internal Server Error",n.data)}function r1(n){return n!=null&&typeof n=="object"&&Object.entries(n).every(([i,r])=>typeof i=="string"&&s1(r))}function s1(n){return n!=null&&typeof n=="object"&&"type"in n&&"result"in n&&(n.type==="data"||n.type==="error")}function o1(n){return rd(n.result)&&Fg.has(n.result.status)}function ca(n){return n.type==="error"}function gl(n){return(n&&n.type)==="redirect"}function Pp(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function rd(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function c1(n){return Fg.has(n)}function u1(n){return rd(n)&&c1(n.status)&&n.headers.has("Location")}function d1(n){return Yb.has(n.toUpperCase())}function Ut(n){return Bb.has(n.toUpperCase())}function sd(n){return new URLSearchParams(n).getAll("index").some(i=>i==="")}function Ws(n,i){let r=typeof i=="string"?mn(i).search:i.search;if(n[n.length-1].route.index&&sd(r||""))return n[n.length-1];let s=$g(n);return s[s.length-1]}function Ip(n){let{formMethod:i,formAction:r,formEncType:s,text:c,formData:d,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(d!=null)return{formMethod:i,formAction:r,formEncType:s,formData:d,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 qu(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 f1(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 sr(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 h1(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 fn(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 m1(n,i){try{let r=n.sessionStorage.getItem(Jg);if(r){let s=JSON.parse(r);for(let[c,d]of Object.entries(s||{}))d&&Array.isArray(d)&&i.set(c,new Set(d||[]))}}catch{}}function p1(n,i){if(i.size>0){let r={};for(let[s,c]of i)r[s]=[...c];try{n.sessionStorage.setItem(Jg,JSON.stringify(r))}catch(s){mt(!1,`Failed to save applied view transitions in sessionStorage (${s}).`)}}}function eg(){let n,i,r=new Promise((s,c)=>{n=async d=>{s(d);try{await r}catch{}},i=async d=>{c(d);try{await r}catch{}}});return{promise:r,resolve:n,reject:i}}var bl=v.createContext(null);bl.displayName="DataRouter";var jr=v.createContext(null);jr.displayName="DataRouterState";var iy=v.createContext(!1);function g1(){return v.useContext(iy)}var od=v.createContext({isTransitioning:!1});od.displayName="ViewTransition";var ry=v.createContext(new Map);ry.displayName="Fetchers";var y1=v.createContext(null);y1.displayName="Await";var ua=v.createContext(null);ua.displayName="Navigation";var oo=v.createContext(null);oo.displayName="Location";var Na=v.createContext({outlet:null,matches:[],isDataRoute:!1});Na.displayName="Route";var cd=v.createContext(null);cd.displayName="RouteError";var sy="REACT_ROUTER_ERROR",x1="REDIRECT",v1="ROUTE_ERROR_RESPONSE";function b1(n){if(n.startsWith(`${sy}:${x1}:{`))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 S1(n){if(n.startsWith(`${sy}:${v1}:{`))try{let i=JSON.parse(n.slice(40));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string")return new Sr(i.status,i.statusText,i.data)}catch{}}function _1(n,{relative:i}={}){Ae(fi(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:s}=v.useContext(ua),{hash:c,pathname:d,search:h}=Nr(n,{relative:i}),m=d;return r!=="/"&&(m=d==="/"?r:Da([r,d])),s.createHref({pathname:m,search:h,hash:c})}function fi(){return v.useContext(oo)!=null}function Aa(){return Ae(fi(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(oo).location}var oy="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function cy(n){v.useContext(ua).static||v.useLayoutEffect(n)}function Qn(){let{isDataRoute:n}=v.useContext(Na);return n?U1():j1()}function j1(){Ae(fi(),"useNavigate() may be used only in the context of a <Router> component.");let n=v.useContext(bl),{basename:i,navigator:r}=v.useContext(ua),{matches:s}=v.useContext(Na),{pathname:c}=Aa(),d=JSON.stringify(so(s)),h=v.useRef(!1);return cy(()=>{h.current=!0}),v.useCallback((y,p={})=>{if(mt(h.current,oy),!h.current)return;if(typeof y=="number"){r.go(y);return}let b=br(y,JSON.parse(d),c,p.relative==="path");n==null&&i!=="/"&&(b.pathname=b.pathname==="/"?i:Da([i,b.pathname])),(p.replace?r.replace:r.push)(b,p.state,p)},[i,r,d,c,n])}var N1=v.createContext(null);function E1(n){let i=v.useContext(Na).outlet;return v.useMemo(()=>i&&v.createElement(N1.Provider,{value:n},i),[i,n])}function co(){let{matches:n}=v.useContext(Na),i=n[n.length-1];return i?i.params:{}}function Nr(n,{relative:i}={}){let{matches:r}=v.useContext(Na),{pathname:s}=Aa(),c=JSON.stringify(so(r));return v.useMemo(()=>br(n,JSON.parse(c),s,i==="path"),[n,c,s,i])}function w1(n,i,r){Ae(fi(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=v.useContext(ua),{matches:c}=v.useContext(Na),d=c[c.length-1],h=d?d.params:{},m=d?d.pathname:"/",y=d?d.pathnameBase:"/",p=d&&d.route;{let L=p&&p.path||"";dy(m,!p||L.endsWith("*")||L.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${L}">) 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="${L}"> to <Route path="${L==="/"?"*":`${L}/*`}">.`)}let b=Aa(),x;x=b;let _=x.pathname||"/",j=_;if(y!=="/"){let L=y.replace(/^\//,"").split("/");j="/"+_.replace(/^\//,"").split("/").slice(L.length).join("/")}let R=$n(n,{pathname:j});return mt(p||R!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),mt(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${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.`),O1(R&&R.map(L=>Object.assign({},L,{params:Object.assign({},h,L.params),pathname:Da([y,s.encodeLocation?s.encodeLocation(L.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:L.pathname]),pathnameBase:L.pathnameBase==="/"?y:Da([y,s.encodeLocation?s.encodeLocation(L.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:L.pathnameBase])})),c,r)}function C1(){let n=k1(),i=xr(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},d={padding:"2px 4px",backgroundColor:s},h=null;return console.error("Error handled by React Router default ErrorBoundary:",n),h=v.createElement(v.Fragment,null,v.createElement("p",null,"💿 Hey developer 👋"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:d},"ErrorBoundary")," or"," ",v.createElement("code",{style:d},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},i),r?v.createElement("pre",{style:c},r):null,h)}var R1=v.createElement(C1,null),uy=class extends v.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,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=S1(n.digest);r&&(n=r)}let i=n!==void 0?v.createElement(Na.Provider,{value:this.props.routeContext},v.createElement(cd.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?v.createElement(z1,{error:n},i):i}};uy.contextType=iy;var Yu=new WeakMap;function z1({children:n,error:i}){let{basename:r}=v.useContext(ua);if(typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){let s=b1(i.digest);if(s){let c=Yu.get(i);if(c)throw c;let d=Xg(s.location,r);if(Kg&&!Yu.get(i))if(d.isExternal||s.reloadDocument)window.location.href=d.absoluteURL||d.to;else{const h=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(d.to,{replace:s.replace}));throw Yu.set(i,h),h}return v.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d.absoluteURL||d.to}`})}}return n}function T1({routeContext:n,match:i,children:r}){let s=v.useContext(bl);return s&&s.static&&s.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=i.route.id),v.createElement(Na.Provider,{value:n},r)}function O1(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,d=s?.errors;if(d!=null){let b=c.findIndex(x=>x.route.id&&d?.[x.route.id]!==void 0);Ae(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),c=c.slice(0,Math.min(c.length,b+1))}let h=!1,m=-1;if(r&&s){h=s.renderFallback;for(let b=0;b<c.length;b++){let x=c[b];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(m=b),x.route.id){let{loaderData:_,errors:j}=s,R=x.route.loader&&!_.hasOwnProperty(x.route.id)&&(!j||j[x.route.id]===void 0);if(x.route.lazy||R){r.isStatic&&(h=!0),m>=0?c=c.slice(0,m+1):c=[c[0]];break}}}}let y=r?.onError,p=s&&y?(b,x)=>{y(b,{location:s.location,params:s.matches?.[0]?.params??{},unstable_pattern:_r(s.matches),errorInfo:x})}:void 0;return c.reduceRight((b,x,_)=>{let j,R=!1,M=null,L=null;s&&(j=d&&x.route.id?d[x.route.id]:void 0,M=x.route.errorElement||R1,h&&(m<0&&_===0?(dy("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),R=!0,L=null):m===_&&(R=!0,L=x.route.hydrateFallbackElement||null)));let Q=i.concat(c.slice(0,_+1)),G=()=>{let K;return j?K=M:R?K=L:x.route.Component?K=v.createElement(x.route.Component,null):x.route.element?K=x.route.element:K=b,v.createElement(T1,{match:x,routeContext:{outlet:b,matches:Q,isDataRoute:s!=null},children:K})};return s&&(x.route.ErrorBoundary||x.route.errorElement||_===0)?v.createElement(uy,{location:s.location,revalidation:s.revalidation,component:M,error:j,children:G(),routeContext:{outlet:null,matches:Q,isDataRoute:!0},onError:p}):G()},null)}function ud(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function M1(n){let i=v.useContext(bl);return Ae(i,ud(n)),i}function D1(n){let i=v.useContext(jr);return Ae(i,ud(n)),i}function A1(n){let i=v.useContext(Na);return Ae(i,ud(n)),i}function dd(n){let i=A1(n),r=i.matches[i.matches.length-1];return Ae(r.route.id,`${n} can only be used on routes that contain a unique "id"`),r.route.id}function L1(){return dd("useRouteId")}function k1(){let n=v.useContext(cd),i=D1("useRouteError"),r=dd("useRouteError");return n!==void 0?n:i.errors?.[r]}function U1(){let{router:n}=M1("useNavigate"),i=dd("useNavigate"),r=v.useRef(!1);return cy(()=>{r.current=!0}),v.useCallback(async(c,d={})=>{mt(r.current,oy),r.current&&(typeof c=="number"?await n.navigate(c):await n.navigate(c,{fromRouteId:i,...d}))},[n,i])}var tg={};function dy(n,i,r){!i&&!tg[n]&&(tg[n]=!0,mt(!1,r))}var ag={};function ng(n,i){!n&&!ag[i]&&(ag[i]=!0,console.warn(i))}var H1="useOptimistic",lg=m0[H1],B1=()=>{};function q1(n){return lg?lg(n):[n,B1]}function Y1(n){let i={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&mt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(i,{element:v.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&mt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(i,{hydrateFallbackElement:v.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&mt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(i,{errorElement:v.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),i}var V1=["HydrateFallback","hydrateFallbackElement"],G1=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 $1({router:n,flushSync:i,onError:r,unstable_useTransitions:s}){s=g1()||s;let[d,h]=v.useState(n.state),[m,y]=q1(d),[p,b]=v.useState(),[x,_]=v.useState({isTransitioning:!1}),[j,R]=v.useState(),[M,L]=v.useState(),[Q,G]=v.useState(),K=v.useRef(new Map),re=v.useCallback((N,{deletedFetchers:X,newErrors:F,flushSync:P,viewTransitionOpts:ne})=>{F&&r&&Object.values(F).forEach(ee=>r(ee,{location:N.location,params:N.matches[0]?.params??{},unstable_pattern:_r(N.matches)})),N.fetchers.forEach((ee,pe)=>{ee.data!==void 0&&K.current.set(pe,ee.data)}),X.forEach(ee=>K.current.delete(ee)),ng(P===!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 J=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(ng(ne==null||J,"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."),!ne||!J){i&&P?i(()=>h(N)):s===!1?h(N):v.startTransition(()=>{s===!0&&y(ee=>ig(ee,N)),h(N)});return}if(i&&P){i(()=>{M&&(j?.resolve(),M.skipTransition()),_({isTransitioning:!0,flushSync:!0,currentLocation:ne.currentLocation,nextLocation:ne.nextLocation})});let ee=n.window.document.startViewTransition(()=>{i(()=>h(N))});ee.finished.finally(()=>{i(()=>{R(void 0),L(void 0),b(void 0),_({isTransitioning:!1})})}),i(()=>L(ee));return}M?(j?.resolve(),M.skipTransition(),G({state:N,currentLocation:ne.currentLocation,nextLocation:ne.nextLocation})):(b(N),_({isTransitioning:!0,flushSync:!1,currentLocation:ne.currentLocation,nextLocation:ne.nextLocation}))},[n.window,i,M,j,s,y,r]);v.useLayoutEffect(()=>n.subscribe(re),[n,re]),v.useEffect(()=>{x.isTransitioning&&!x.flushSync&&R(new G1)},[x]),v.useEffect(()=>{if(j&&p&&n.window){let N=p,X=j.promise,F=n.window.document.startViewTransition(async()=>{s===!1?h(N):v.startTransition(()=>{s===!0&&y(P=>ig(P,N)),h(N)}),await X});F.finished.finally(()=>{R(void 0),L(void 0),b(void 0),_({isTransitioning:!1})}),L(F)}},[p,j,n.window,s,y]),v.useEffect(()=>{j&&p&&m.location.key===p.location.key&&j.resolve()},[j,M,m.location,p]),v.useEffect(()=>{!x.isTransitioning&&Q&&(b(Q.state),_({isTransitioning:!0,flushSync:!1,currentLocation:Q.currentLocation,nextLocation:Q.nextLocation}),G(void 0))},[x.isTransitioning,Q]);let le=v.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:N=>n.navigate(N),push:(N,X,F)=>n.navigate(N,{state:X,preventScrollReset:F?.preventScrollReset}),replace:(N,X,F)=>n.navigate(N,{replace:!0,state:X,preventScrollReset:F?.preventScrollReset})}),[n]),ce=n.basename||"/",I=v.useMemo(()=>({router:n,navigator:le,static:!1,basename:ce,onError:r}),[n,le,ce,r]);return v.createElement(v.Fragment,null,v.createElement(bl.Provider,{value:I},v.createElement(jr.Provider,{value:m},v.createElement(ry.Provider,{value:K.current},v.createElement(od.Provider,{value:x},v.createElement(Q1,{basename:ce,location:m.location,navigationType:m.historyAction,navigator:le,unstable_useTransitions:s},v.createElement(K1,{routes:n.routes,future:n.future,state:m,isStatic:!1,onError:r})))))),null)}function ig(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 K1=v.memo(X1);function X1({routes:n,future:i,state:r,isStatic:s,onError:c}){return w1(n,void 0,{state:r,isStatic:s,onError:c})}function rg({to:n,replace:i,state:r,relative:s}){Ae(fi(),"<Navigate> may be used only in the context of a <Router> component.");let{static:c}=v.useContext(ua);mt(!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:d}=v.useContext(Na),{pathname:h}=Aa(),m=Qn(),y=br(n,so(d),h,s==="path"),p=JSON.stringify(y);return v.useEffect(()=>{m(JSON.parse(p),{replace:i,state:r,relative:s})},[m,p,s,i,r]),null}function fy(n){return E1(n.context)}function Q1({basename:n="/",children:i=null,location:r,navigationType:s="POP",navigator:c,static:d=!1,unstable_useTransitions:h}){Ae(!fi(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=n.replace(/^\/*/,"/"),y=v.useMemo(()=>({basename:m,navigator:c,static:d,unstable_useTransitions:h,future:{}}),[m,c,d,h]);typeof r=="string"&&(r=mn(r));let{pathname:p="/",search:b="",hash:x="",state:_=null,key:j="default",unstable_mask:R}=r,M=v.useMemo(()=>{let L=ja(p,m);return L==null?null:{location:{pathname:L,search:b,hash:x,state:_,key:j,unstable_mask:R},navigationType:s}},[m,p,b,x,_,j,s,R]);return mt(M!=null,`<Router basename="${m}"> is not able to match the URL "${p}${b}${x}" because it does not start with the basename, so the <Router> won't render anything.`),M==null?null:v.createElement(ua.Provider,{value:y},v.createElement(oo.Provider,{children:i,value:M}))}var Ps="get",Is="application/x-www-form-urlencoded";function uo(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function Z1(n){return uo(n)&&n.tagName.toLowerCase()==="button"}function F1(n){return uo(n)&&n.tagName.toLowerCase()==="form"}function J1(n){return uo(n)&&n.tagName.toLowerCase()==="input"}function W1(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function P1(n,i){return n.button===0&&(!i||i==="_self")&&!W1(n)}function Iu(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 I1(n,i){let r=Iu(n);return i&&i.forEach((s,c)=>{r.has(c)||i.getAll(c).forEach(d=>{r.append(c,d)})}),r}var Qs=null;function e2(){if(Qs===null)try{new FormData(document.createElement("form"),0),Qs=!1}catch{Qs=!0}return Qs}var t2=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Vu(n){return n!=null&&!t2.has(n)?(mt(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Is}"`),null):n}function a2(n,i){let r,s,c,d,h;if(F1(n)){let m=n.getAttribute("action");s=m?ja(m,i):null,r=n.getAttribute("method")||Ps,c=Vu(n.getAttribute("enctype"))||Is,d=new FormData(n)}else if(Z1(n)||J1(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?ja(y,i):null,r=n.getAttribute("formmethod")||m.getAttribute("method")||Ps,c=Vu(n.getAttribute("formenctype"))||Vu(m.getAttribute("enctype"))||Is,d=new FormData(m,n),!e2()){let{name:p,type:b,value:x}=n;if(b==="image"){let _=p?`${p}.`:"";d.append(`${_}x`,"0"),d.append(`${_}y`,"0")}else p&&d.append(p,x)}}else{if(uo(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Ps,s=null,c=Is,h=n}return d&&c==="text/plain"&&(h=d,d=void 0),{action:s,method:r.toLowerCase(),encType:c,formData:d,body:h}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function fd(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function n2(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&&ja(c.pathname,i)==="/"?c.pathname=`${i.replace(/\/$/,"")}/_root.${s}`:c.pathname=`${c.pathname.replace(/\/$/,"")}.${s}`,c}async function l2(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 i2(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 r2(n,i,r){let s=await Promise.all(n.map(async c=>{let d=i.routes[c.route.id];if(d){let h=await l2(d,r);return h.links?h.links():[]}return[]}));return u2(s.flat(1).filter(i2).filter(c=>c.rel==="stylesheet"||c.rel==="preload").map(c=>c.rel==="stylesheet"?{...c,rel:"prefetch",as:"style"}:{...c,rel:"prefetch"}))}function sg(n,i,r,s,c,d){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 d==="assets"?i.filter((y,p)=>h(y,p)||m(y,p)):d==="data"?i.filter((y,p)=>{let b=s.routes[y.route.id];if(!b||!b.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 s2(n,i,{includeHydrateFallback:r}={}){return o2(n.map(s=>{let c=i.routes[s.route.id];if(!c)return[];let d=[c.module];return c.clientActionModule&&(d=d.concat(c.clientActionModule)),c.clientLoaderModule&&(d=d.concat(c.clientLoaderModule)),r&&c.hydrateFallbackModule&&(d=d.concat(c.hydrateFallbackModule)),c.imports&&(d=d.concat(c.imports)),d}).flat(1))}function o2(n){return[...new Set(n)]}function c2(n){let i={},r=Object.keys(n).sort();for(let s of r)i[s]=n[s];return i}function u2(n,i){let r=new Set;return new Set(i),n.reduce((s,c)=>{let d=JSON.stringify(c2(c));return r.has(d)||(r.add(d),s.push({key:d,link:c})),s},[])}function hy(){let n=v.useContext(bl);return fd(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function d2(){let n=v.useContext(jr);return fd(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var hd=v.createContext(void 0);hd.displayName="FrameworkContext";function my(){let n=v.useContext(hd);return fd(n,"You must render this element inside a <HydratedRouter> element"),n}function f2(n,i){let r=v.useContext(hd),[s,c]=v.useState(!1),[d,h]=v.useState(!1),{onFocus:m,onBlur:y,onMouseEnter:p,onMouseLeave:b,onTouchStart:x}=i,_=v.useRef(null);v.useEffect(()=>{if(n==="render"&&h(!0),n==="viewport"){let M=Q=>{Q.forEach(G=>{h(G.isIntersecting)})},L=new IntersectionObserver(M,{threshold:.5});return _.current&&L.observe(_.current),()=>{L.disconnect()}}},[n]),v.useEffect(()=>{if(s){let M=setTimeout(()=>{h(!0)},100);return()=>{clearTimeout(M)}}},[s]);let j=()=>{c(!0)},R=()=>{c(!1),h(!1)};return r?n!=="intent"?[d,_,{}]:[d,_,{onFocus:or(m,j),onBlur:or(y,R),onMouseEnter:or(p,j),onMouseLeave:or(b,R),onTouchStart:or(x,j)}]:[!1,_,{}]}function or(n,i){return r=>{n&&n(r),r.defaultPrevented||i(r)}}function h2({page:n,...i}){let{router:r}=hy(),s=v.useMemo(()=>$n(r.routes,n,r.basename),[r.routes,n,r.basename]);return s?v.createElement(p2,{page:n,matches:s,...i}):null}function m2(n){let{manifest:i,routeModules:r}=my(),[s,c]=v.useState([]);return v.useEffect(()=>{let d=!1;return r2(n,i,r).then(h=>{d||c(h)}),()=>{d=!0}},[n,i,r]),s}function p2({page:n,matches:i,...r}){let s=Aa(),{future:c,manifest:d,routeModules:h}=my(),{basename:m}=hy(),{loaderData:y,matches:p}=d2(),b=v.useMemo(()=>sg(n,i,p,d,s,"data"),[n,i,p,d,s]),x=v.useMemo(()=>sg(n,i,p,d,s,"assets"),[n,i,p,d,s]),_=v.useMemo(()=>{if(n===s.pathname+s.search+s.hash)return[];let M=new Set,L=!1;if(i.forEach(G=>{let K=d.routes[G.route.id];!K||!K.hasLoader||(!b.some(re=>re.route.id===G.route.id)&&G.route.id in y&&h[G.route.id]?.shouldRevalidate||K.hasClientLoader?L=!0:M.add(G.route.id))}),M.size===0)return[];let Q=n2(n,m,c.unstable_trailingSlashAwareDataRequests,"data");return L&&M.size>0&&Q.searchParams.set("_routes",i.filter(G=>M.has(G.route.id)).map(G=>G.route.id).join(",")),[Q.pathname+Q.search]},[m,c.unstable_trailingSlashAwareDataRequests,y,s,d,b,i,n,h]),j=v.useMemo(()=>s2(x,d),[x,d]),R=m2(x);return v.createElement(v.Fragment,null,_.map(M=>v.createElement("link",{key:M,rel:"prefetch",as:"fetch",href:M,...r})),j.map(M=>v.createElement("link",{key:M,rel:"modulepreload",href:M,...r})),R.map(({key:M,link:L})=>v.createElement("link",{key:M,nonce:r.nonce,...L,crossOrigin:L.crossOrigin??r.crossOrigin})))}function g2(...n){return i=>{n.forEach(r=>{typeof r=="function"?r(i):r!=null&&(r.current=i)})}}var y2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{y2&&(window.__reactRouterVersion="7.13.1")}catch{}function x2(n,i){return Kb({basename:i?.basename,getContext:i?.getContext,future:i?.future,history:sb({window:i?.window}),hydrationData:v2(),routes:n,mapRouteProperties:Y1,hydrationRouteProperties:V1,dataStrategy:i?.dataStrategy,patchRoutesOnNavigation:i?.patchRoutesOnNavigation,window:i?.window,unstable_instrumentations:i?.unstable_instrumentations}).initialize()}function v2(){let n=window?.__staticRouterHydrationData;return n&&n.errors&&(n={...n,errors:b2(n.errors)}),n}function b2(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 Sr(c.status,c.statusText,c.data,c.internal===!0);else if(c&&c.__type==="Error"){if(c.__subType){let d=window[c.__subType];if(typeof d=="function")try{let h=new d(c.message);h.stack="",r[s]=h}catch{}}if(r[s]==null){let d=new Error(c.message);d.stack="",r[s]=d}}else r[s]=c;return r}var py=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Pt=v.forwardRef(function({onClick:i,discover:r="render",prefetch:s="none",relative:c,reloadDocument:d,replace:h,unstable_mask:m,state:y,target:p,to:b,preventScrollReset:x,viewTransition:_,unstable_defaultShouldRevalidate:j,...R},M){let{basename:L,navigator:Q,unstable_useTransitions:G}=v.useContext(ua),K=typeof b=="string"&&py.test(b),re=Xg(b,L);b=re.to;let le=_1(b,{relative:c}),ce=Aa(),I=null;if(m){let pe=br(m,[],ce.unstable_mask?ce.unstable_mask.pathname:"/",!0);L!=="/"&&(pe.pathname=pe.pathname==="/"?L:Da([L,pe.pathname])),I=Q.createHref(pe)}let[N,X,F]=f2(s,R),P=j2(b,{replace:h,unstable_mask:m,state:y,target:p,preventScrollReset:x,relative:c,viewTransition:_,unstable_defaultShouldRevalidate:j,unstable_useTransitions:G});function ne(pe){i&&i(pe),pe.defaultPrevented||P(pe)}let J=!(re.isExternal||d),ee=v.createElement("a",{...R,...F,href:(J?I:void 0)||re.absoluteURL||le,onClick:J?ne:i,ref:g2(M,X),target:p,"data-discover":!K&&r==="render"?"true":void 0});return N&&!K?v.createElement(v.Fragment,null,ee,v.createElement(h2,{page:le})):ee});Pt.displayName="Link";var vr=v.forwardRef(function({"aria-current":i="page",caseSensitive:r=!1,className:s="",end:c=!1,style:d,to:h,viewTransition:m,children:y,...p},b){let x=Nr(h,{relative:p.relative}),_=Aa(),j=v.useContext(jr),{navigator:R,basename:M}=v.useContext(ua),L=j!=null&&R2(x)&&m===!0,Q=R.encodeLocation?R.encodeLocation(x).pathname:x.pathname,G=_.pathname,K=j&&j.navigation&&j.navigation.location?j.navigation.location.pathname:null;r||(G=G.toLowerCase(),K=K?K.toLowerCase():null,Q=Q.toLowerCase()),K&&M&&(K=ja(K,M)||K);const re=Q!=="/"&&Q.endsWith("/")?Q.length-1:Q.length;let le=G===Q||!c&&G.startsWith(Q)&&G.charAt(re)==="/",ce=K!=null&&(K===Q||!c&&K.startsWith(Q)&&K.charAt(Q.length)==="/"),I={isActive:le,isPending:ce,isTransitioning:L},N=le?i:void 0,X;typeof s=="function"?X=s(I):X=[s,le?"active":null,ce?"pending":null,L?"transitioning":null].filter(Boolean).join(" ");let F=typeof d=="function"?d(I):d;return v.createElement(Pt,{...p,"aria-current":N,className:X,ref:b,style:F,to:h,viewTransition:m},typeof y=="function"?y(I):y)});vr.displayName="NavLink";var S2=v.forwardRef(({discover:n="render",fetcherKey:i,navigate:r,reloadDocument:s,replace:c,state:d,method:h=Ps,action:m,onSubmit:y,relative:p,preventScrollReset:b,viewTransition:x,unstable_defaultShouldRevalidate:_,...j},R)=>{let{unstable_useTransitions:M}=v.useContext(ua),L=w2(),Q=C2(m,{relative:p}),G=h.toLowerCase()==="get"?"get":"post",K=typeof m=="string"&&py.test(m),re=le=>{if(y&&y(le),le.defaultPrevented)return;le.preventDefault();let ce=le.nativeEvent.submitter,I=ce?.getAttribute("formmethod")||h,N=()=>L(ce||le.currentTarget,{fetcherKey:i,method:I,navigate:r,replace:c,state:d,relative:p,preventScrollReset:b,viewTransition:x,unstable_defaultShouldRevalidate:_});M&&r!==!1?v.startTransition(()=>N()):N()};return v.createElement("form",{ref:R,method:G,action:Q,onSubmit:s?y:re,...j,"data-discover":!K&&n==="render"?"true":void 0})});S2.displayName="Form";function _2(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function gy(n){let i=v.useContext(bl);return Ae(i,_2(n)),i}function j2(n,{target:i,replace:r,unstable_mask:s,state:c,preventScrollReset:d,relative:h,viewTransition:m,unstable_defaultShouldRevalidate:y,unstable_useTransitions:p}={}){let b=Qn(),x=Aa(),_=Nr(n,{relative:h});return v.useCallback(j=>{if(P1(j,i)){j.preventDefault();let R=r!==void 0?r:Ga(x)===Ga(_),M=()=>b(n,{replace:R,unstable_mask:s,state:c,preventScrollReset:d,relative:h,viewTransition:m,unstable_defaultShouldRevalidate:y});p?v.startTransition(()=>M()):M()}},[x,b,_,r,s,c,i,n,d,h,m,y,p])}function yy(n){mt(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=v.useRef(Iu(n)),r=v.useRef(!1),s=Aa(),c=v.useMemo(()=>I1(s.search,r.current?null:i.current),[s.search]),d=Qn(),h=v.useCallback((m,y)=>{const p=Iu(typeof m=="function"?m(new URLSearchParams(c)):m);r.current=!0,d("?"+p,y)},[d,c]);return[c,h]}var N2=0,E2=()=>`__${String(++N2)}__`;function w2(){let{router:n}=gy("useSubmit"),{basename:i}=v.useContext(ua),r=L1(),s=n.fetch,c=n.navigate;return v.useCallback(async(d,h={})=>{let{action:m,method:y,encType:p,formData:b,body:x}=a2(d,i);if(h.navigate===!1){let _=h.fetcherKey||E2();await s(_,r,h.action||m,{unstable_defaultShouldRevalidate:h.unstable_defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:b,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:b,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 C2(n,{relative:i}={}){let{basename:r}=v.useContext(ua),s=v.useContext(Na);Ae(s,"useFormAction must be used inside a RouteContext");let[c]=s.matches.slice(-1),d={...Nr(n||".",{relative:i})},h=Aa();if(n==null){d.search=h.search;let m=new URLSearchParams(d.search),y=m.getAll("index");if(y.some(b=>b==="")){m.delete("index"),y.filter(x=>x).forEach(x=>m.append("index",x));let b=m.toString();d.search=b?`?${b}`:""}}return(!n||n===".")&&c.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(d.pathname=d.pathname==="/"?r:Da([r,d.pathname])),Ga(d)}function R2(n,{relative:i}={}){let r=v.useContext(od);Ae(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=gy("useViewTransitionState"),c=Nr(n,{relative:i});if(!r.isTransitioning)return!1;let d=ja(r.currentLocation.pathname,s)||r.currentLocation.pathname,h=ja(r.nextLocation.pathname,s)||r.nextLocation.pathname;return no(c.pathname,h)!=null||no(c.pathname,d)!=null}const xy=(...n)=>n.filter((i,r,s)=>!!i&&i.trim()!==""&&s.indexOf(i)===r).join(" ").trim();const z2=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const T2=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,r,s)=>s?s.toUpperCase():r.toLowerCase());const og=n=>{const i=T2(n);return i.charAt(0).toUpperCase()+i.slice(1)};var O2={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 M2=n=>{for(const i in n)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1};const D2=v.forwardRef(({color:n="currentColor",size:i=24,strokeWidth:r=2,absoluteStrokeWidth:s,className:c="",children:d,iconNode:h,...m},y)=>v.createElement("svg",{ref:y,...O2,width:i,height:i,stroke:n,strokeWidth:s?Number(r)*24/Number(i):r,className:xy("lucide",c),...!d&&!M2(m)&&{"aria-hidden":"true"},...m},[...h.map(([p,b])=>v.createElement(p,b)),...Array.isArray(d)?d:[d]]));const Oe=(n,i)=>{const r=v.forwardRef(({className:s,...c},d)=>v.createElement(D2,{ref:d,iconNode:i,className:xy(`lucide-${z2(og(n))}`,`lucide-${n}`,s),...c}));return r.displayName=og(n),r};const A2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],vy=Oe("arrow-right",A2);const L2=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],cg=Oe("arrow-up-right",L2);const k2=[["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"}]],U2=Oe("boxes",k2);const H2=[["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"}]],B2=Oe("brain",H2);const q2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ui=Oe("check",q2);const Y2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],fo=Oe("chevron-down",Y2);const V2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],hn=Oe("chevron-right",V2);const G2=[["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"}]],md=Oe("circle-alert",G2);const $2=[["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"}]],ug=Oe("copy",$2);const K2=[["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"}]],X2=Oe("database",K2);const Q2=[["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"}]],Z2=Oe("file-spreadsheet",Q2);const F2=[["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"}]],xl=Oe("file-text",F2);const J2=[["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"}]],by=Oe("file",J2);const W2=[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]],P2=Oe("files",W2);const I2=[["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"}]],pd=Oe("folder-git-2",I2);const eS=[["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"}]],tS=Oe("folder-input",eS);const aS=[["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"}]],nS=Oe("folder-open",aS);const lS=[["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"}]],Sy=Oe("folder-plus",lS);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"}]],_a=Oe("folder",iS);const rS=[["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"}]],lo=Oe("git-branch",rS);const sS=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],ed=Oe("git-commit-horizontal",sS);const oS=[["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"}]],td=Oe("github",oS);const cS=[["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"}]],uS=Oe("globe",cS);const dS=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],fS=Oe("info",dS);const hS=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],mS=Oe("list-filter",hS);const pS=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Gt=Oe("loader-circle",pS);const gS=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],yS=Oe("menu",gS);const xS=[["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"}]],vS=Oe("monitor",xS);const bS=[["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"}]],SS=Oe("moon",bS);const _S=[["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"}]],di=Oe("package",_S);const jS=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],NS=Oe("panel-left",jS);const ES=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],wS=Oe("pencil",ES);const CS=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],_y=Oe("plus",CS);const RS=[["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"}]],zS=Oe("refresh-cw",RS);const TS=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],OS=Oe("search",TS);const MS=[["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"}]],DS=Oe("settings",MS);const AS=[["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"}]],LS=Oe("share-2",AS);const kS=[["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"}]],US=Oe("sparkles",kS);const HS=[["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"}]],BS=Oe("sun",HS);const qS=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],YS=Oe("trash-2",qS);const VS=[["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"}]],GS=Oe("upload",VS);const $S=[["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"}]],KS=Oe("users",$S);const XS=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],gd=Oe("x",XS),dg=n=>{let i;const r=new Set,s=(p,b)=>{const x=typeof p=="function"?p(i):p;if(!Object.is(x,i)){const _=i;i=b??(typeof x!="object"||x===null)?x:Object.assign({},i,x),r.forEach(j=>j(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},QS=(n=>n?dg(n):dg),ZS=n=>n;function FS(n,i=ZS){const r=si.useSyncExternalStore(n.subscribe,si.useCallback(()=>i(n.getState()),[n,i]),si.useCallback(()=>i(n.getInitialState()),[n,i]));return si.useDebugValue(r),r}const fg=n=>{const i=QS(n),r=s=>FS(i,s);return Object.assign(r,i),r},ho=(n=>n?fg(n):fg),JS="/api/v1";class ad extends Error{constructor(i,r,s){super(s),this.status=i,this.code=r,this.name="ApiError"}}async function Zs(n,i,r,s){let c=`${JS}${i}`;if(s){const m=new URLSearchParams(s).toString();m&&(c+=`?${m}`)}const d={method:n,headers:{"Content-Type":"application/json"}};r!==void 0&&(d.body=JSON.stringify(r));const h=await fetch(c,d);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 ad(h.status,m,y)}return h.json()}const Ht={get(n,i){return Zs("GET",n,void 0,i)},post(n,i){return Zs("POST",n,i)},put(n,i){return Zs("PUT",n,i)},delete(n){return Zs("DELETE",n)}},WS=3e4,PS=1e3,IS=3e4;class e4{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 d of c)d(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()}))},WS)}stopHeartbeat(){this.heartbeatTimer&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=null)}scheduleReconnect(){if(this.reconnectTimer)return;const i=Math.min(PS*2**this.reconnectAttempt,IS);this.reconnectAttempt++,this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.open()},i)}clearTimers(){this.stopHeartbeat(),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}}const $a=new e4,vl=ho(n=>({status:"disconnected",onlineCount:0,connections:[],setStatus:i=>n({status:i}),fetchDaemonStatus:async()=>{try{const i=await Ht.get("/daemons/status");n({onlineCount:i.online_count,connections:i.connections})}catch{}}})),t4=n=>n==="connecting"?"disconnected":n;$a.onStatusChange(n=>{vl.getState().setStatus(t4(n))});$a.on("ws:daemon:connected",n=>{const i=n;vl.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 d=[...r.connections,c];return{connections:d,onlineCount:d.length}})});$a.on("ws:daemon:status",n=>{const i=n;vl.setState(r=>{if(i.is_online){if(r.connections.some(m=>m.machine_id===i.machine_id))return r;const d={machine_id:i.machine_id};i.lib_id&&(d.lib_id=i.lib_id);const h=[...r.connections,d];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 mo="lib_cloud_default",Bt=ho((n,i)=>({libraries:[],loading:!1,error:null,fetchLibraries:async()=>{n({loading:!0,error:null});try{const r=await Ht.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 Ht.post("/libraries",r);return n(c=>({libraries:[...c.libraries,s]})),s},deleteLibrary:async r=>{await Ht.delete(`/libraries/${r}`),n(s=>({libraries:s.libraries.filter(c=>c.id!==r)}))},updateLibraryName:async(r,s)=>{const c=await Ht.put(`/libraries/${r}`,{name:s});n(d=>({libraries:d.libraries.map(h=>h.id===r?c:h)}))},_updateLibraryOnline:(r,s)=>{n(c=>({libraries:c.libraries.map(d=>d.id===r?{...d,is_online:s}:d)}))},_refreshLibrary:async r=>{try{const s=await Ht.get(`/libraries/${r}`);n(c=>({libraries:c.libraries.map(d=>d.id===r?s:d)}))}catch{i().fetchLibraries()}}})),Er=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]},a4=n=>n.libraries.filter(i=>i.type==="daemon");$a.on("ws:daemon:status",n=>{const i=n;i.lib_id&&Bt.getState()._updateLibraryOnline(i.lib_id,i.is_online),Bt.getState().fetchLibraries()});$a.on("ws:daemon:connected",n=>{const i=n;i.lib_id&&Bt.getState()._updateLibraryOnline(i.lib_id,!0),Bt.getState().fetchLibraries()});$a.on("ws:library:updated",n=>{const i=n;Bt.getState()._refreshLibrary(i.library_id)});const hg=n=>Symbol.iterator in n,mg=n=>"entries"in n,pg=(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,d]of r)if(!s.has(c)||!Object.is(d,s.get(c)))return!1;return!0},n4=(n,i)=>{const r=n[Symbol.iterator](),s=i[Symbol.iterator]();let c=r.next(),d=s.next();for(;!c.done&&!d.done;){if(!Object.is(c.value,d.value))return!1;c=r.next(),d=s.next()}return!!c.done&&!!d.done};function l4(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:hg(n)&&hg(i)?mg(n)&&mg(i)?pg(n,i):n4(n,i):pg({entries:()=>Object.entries(n)},{entries:()=>Object.entries(i)})}function hi(n){const i=si.useRef(void 0);return r=>{const s=n(r);return l4(i.current,s)?i.current:i.current=s}}function nd(){const{t:n}=Ce(),i=vl(h=>h.onlineCount),r=vl(h=>h.connections.length);if(Bt(hi(a4)).length===0)return null;const c=i>0,d=c?n("sources.header.daemon_status",{online:i,total:r}):n("sources.header.all_offline");return f.jsxs("div",{className:"group relative flex items-center",title:d,children:[f.jsx("span",{className:`inline-block h-[7px] w-[7px] rounded-full ${c?"bg-c4a-success":"bg-c4a-error"}`}),f.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:d})]})}const gg=[{to:"/",labelKey:"nav.home"},{to:"/studio",labelKey:"nav.studio"},{to:"/docs",labelKey:"nav.docs"}];function i4(){const{t:n}=Ce(),[i,r]=v.useState(!1);return f.jsxs("header",{className:"sticky top-0 z-40 border-b border-c4a-border-subtle bg-c4a-bg-base/95 backdrop-blur-sm",children:[f.jsxs("div",{className:"flex h-14 items-center justify-between px-4",children:[f.jsxs(Pt,{to:"/",className:"flex items-center gap-2 text-c4a-text-primary",children:[f.jsx("span",{className:"font-mono text-lg font-bold text-c4a-accent",children:"C4A"}),f.jsx("span",{className:"hidden font-mono text-sm font-semibold uppercase tracking-tight md:inline",children:"Context4AI"})]}),f.jsxs("div",{className:"hidden items-center gap-6 md:flex",children:[f.jsx("nav",{className:"flex items-center gap-4",children:gg.map(({to:s,labelKey:c})=>f.jsx(vr,{to:s,end:s==="/",className:({isActive:d})=>`font-mono text-xs uppercase tracking-tight transition-colors duration-150 ${d?"text-c4a-accent":"text-c4a-text-secondary hover:text-c4a-text-primary"}`,children:n(c)},s))}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(nd,{}),f.jsx(Pt,{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")})]})]}),f.jsx("button",{onClick:()=>r(!i),className:"text-c4a-text-secondary md:hidden",children:i?f.jsx(gd,{size:20}):f.jsx(yS,{size:20})})]}),i&&f.jsxs("div",{className:"border-t border-c4a-border-subtle bg-c4a-bg-surface px-4 pb-4 pt-2 md:hidden",children:[f.jsx("nav",{className:"flex flex-col gap-2",children:gg.map(({to:s,labelKey:c})=>f.jsx(vr,{to:s,end:s==="/",onClick:()=>r(!1),className:({isActive:d})=>`block py-2 font-mono text-xs uppercase tracking-tight transition-colors duration-150 ${d?"text-c4a-accent":"text-c4a-text-secondary hover:text-c4a-text-primary"}`,children:n(c)},s))}),f.jsx("div",{className:"mt-2 border-t border-c4a-border-subtle pt-2",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(nd,{}),f.jsx(Pt,{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 r4(n){return n==="system"&&typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":n==="system"?"dark":n}function jy(n){if(typeof window>"u")return;const i=r4(n);document.documentElement.setAttribute("data-theme",i),localStorage.setItem("theme",n)}function s4(){try{return localStorage.getItem("theme")||"system"}catch{return"system"}}const Ny=ho(n=>({theme:s4(),setTheme:i=>{jy(i),n({theme:i})}}));let yg=!1;function o4(){if(yg||typeof window>"u")return;yg=!0;const n=window.matchMedia("(prefers-color-scheme: dark)"),i=()=>{const{theme:r}=Ny.getState();r==="system"&&jy("system")};n.addEventListener("change",i)}o4();const c4=[{mode:"light",icon:BS,labelKey:"footer.theme.light"},{mode:"dark",icon:SS,labelKey:"footer.theme.dark"},{mode:"system",icon:vS,labelKey:"footer.theme.system"}];function Ey(){const{t:n}=Ce(),{theme:i,setTheme:r}=Ny();return f.jsx("div",{className:"flex items-center gap-1",children:c4.map(({mode:s,icon:c,labelKey:d})=>f.jsx("button",{onClick:()=>r(s),title:n(d),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:f.jsx(c,{size:14})},s))})}function wy(){const{i18n:n}=Ce(),i=()=>{const r=n.language==="en"?"zh":"en";n.changeLanguage(r)};return f.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"})}function Cy({compact:n}){const{t:i}=Ce(),r=new Date().getFullYear(),s=n?"footer.copyright_compact":"footer.copyright";return f.jsx("p",{className:"font-mono text-[11px] text-c4a-text-muted",children:i(s,{year:r})})}const u4="_brandIcon_1c7st_1",d4="_iconPulse_1c7st_35",xg={brandIcon:u4,iconPulse:d4};function f4({variant:n}){const{t:i}=Ce(),r=n==="studio"?"bg-c4a-bg-surface":"bg-c4a-bg-base";return f.jsx("footer",{className:`border-t border-c4a-border-subtle ${r} px-4 py-4`,children:f.jsxs("div",{className:"flex items-end justify-between gap-4",children:[f.jsxs("div",{className:"hidden items-center gap-3 md:flex",children:[f.jsx("div",{className:xg.brandIcon,children:f.jsx("span",{className:xg.iconPulse,children:"C4A"})}),f.jsxs("div",{className:"flex flex-col",children:[f.jsx("span",{className:"font-mono text-xs font-semibold uppercase tracking-tight text-c4a-text-primary",children:"Context4AI"}),f.jsx("span",{className:"font-mono text-[10px] uppercase tracking-wider text-c4a-text-muted",children:i("footer.tagline")})]})]}),f.jsxs("div",{className:"ml-auto flex flex-col items-end gap-2",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(Ey,{}),f.jsx(wy,{})]}),f.jsx(Cy,{})]})]})})}function h4(){return f.jsxs("div",{className:"flex min-h-screen flex-col",children:[f.jsx(i4,{}),f.jsx("main",{className:"mx-auto flex w-full max-w-[1200px] flex-1 flex-col px-4",children:f.jsx(fy,{})}),f.jsx(f4,{})]})}function m4({onToggleSidebar:n}){const{t:i}=Ce();return f.jsx("header",{className:"sticky top-0 z-40 border-b border-c4a-border-subtle bg-c4a-bg-surface/95 backdrop-blur-sm",children:f.jsxs("div",{className:"relative flex h-14 items-center justify-between px-4",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[n&&f.jsx("button",{onClick:n,className:"text-c4a-text-secondary transition-colors duration-150 hover:text-c4a-text-primary md:hidden",children:f.jsx(NS,{size:20})}),f.jsxs(Pt,{to:"/",className:"hidden items-center gap-2 text-c4a-text-primary md:flex",children:[f.jsx("span",{className:"font-mono text-lg font-bold text-c4a-accent",children:"C4A"}),f.jsx("span",{className:"font-mono text-sm font-semibold uppercase tracking-tight",children:"Context4AI"})]})]}),f.jsx(Pt,{to:"/",className:"absolute left-1/2 flex -translate-x-1/2 items-center gap-2 text-c4a-text-primary md:hidden",children:f.jsx("span",{className:"font-mono text-lg font-bold text-c4a-accent",children:"C4A"})}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(nd,{}),f.jsx(Pt,{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 Ry({currentName:n,onConfirm:i,onCancel:r,error:s}){const[c,d]=v.useState(n),h=v.useRef(null);v.useEffect(()=>{h.current?.select()},[]);const m=v.useCallback(()=>{const p=c.trim();p&&p!==n?i(p):r()},[c,n,i,r]),y=v.useCallback(p=>{p.key==="Enter"?(p.preventDefault(),m()):p.key==="Escape"&&r()},[m,r]);return f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx("input",{ref:h,value:c,onChange:p=>d(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}),f.jsx("button",{onClick:p=>{p.stopPropagation(),m()},className:"rounded p-0.5 text-c4a-success hover:bg-c4a-bg-hover",children:f.jsx(ui,{size:14})}),f.jsx("button",{onClick:p=>{p.stopPropagation(),r()},className:"rounded p-0.5 text-c4a-error hover:bg-c4a-bg-hover",children:f.jsx(gd,{size:14})}),s&&f.jsx("span",{className:"ml-1 text-xs text-c4a-error",children:s})]})}function zy({target:n,onConfirm:i,onCancel:r}){const{t:s}=Ce(),c=v.useRef(null);v.useEffect(()=>{const h=m=>{m.key==="Escape"&&r()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r]);const d=v.useCallback(h=>{c.current&&!c.current.contains(h.target)&&r()},[r]);return f.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:d,children:f.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:[f.jsx("h3",{className:"font-mono text-sm font-bold uppercase text-c4a-text-primary",children:s("sources.delete.confirm_title")}),f.jsxs("div",{className:"mt-4 space-y-3 text-sm text-c4a-text-secondary",children:[n.type==="resource"&&f.jsxs(f.Fragment,{children:[f.jsx("p",{children:s("sources.delete.resource",{name:n.name})}),f.jsx("p",{children:s("sources.delete.resource_impact")}),f.jsx("p",{className:"text-c4a-warning",children:s("sources.delete.session_warning")}),f.jsx("p",{children:s("sources.delete.entity_safe")})]}),n.type==="folder"&&f.jsxs(f.Fragment,{children:[f.jsx("p",{children:s("sources.delete.folder",{name:n.name})}),f.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")}),f.jsx("p",{className:"text-c4a-warning",children:s("sources.delete.irreversible")})]}),n.type==="repo"&&f.jsxs(f.Fragment,{children:[f.jsx("p",{children:s("sources.delete.repo",{name:n.name,library:n.libraryName})}),f.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")}),f.jsx("p",{children:s("sources.delete.local_safe")}),f.jsx("p",{children:s("sources.delete.entity_safe")})]}),n.type==="client"&&f.jsxs(f.Fragment,{children:[f.jsx("p",{children:s("sources.delete.client",{name:n.name})}),f.jsx("p",{children:s("sources.delete.client_impact")}),f.jsx("p",{children:s("sources.delete.local_safe")}),f.jsx("p",{children:s("sources.delete.entity_safe")}),f.jsx("p",{className:"text-c4a-warning",children:s("sources.delete.irreversible")}),f.jsx("p",{className:"text-c4a-text-muted",children:s("sources.delete.client_reregister")})]})]}),f.jsxs("div",{className:"mt-6 flex justify-end gap-2",children:[f.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")}),f.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 Ty="lib_cloud_default",p4=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"}`,g4=[{to:"/studio/modeling",icon:U2,i18nKey:"studio.sidebar.modeling"},{to:"/studio/brain",icon:B2,i18nKey:"studio.sidebar.brain"},{to:"/studio/discovery",icon:OS,i18nKey:"studio.sidebar.discovery"},{to:"/studio/sharing",icon:LS,i18nKey:"studio.sidebar.sharing"},{to:"/studio/collaboration",icon:KS,i18nKey:"studio.sidebar.collaboration"},{to:"/studio/settings",icon:DS,i18nKey:"studio.sidebar.settings"}];function y4({state:n,onClose:i,onRename:r,onDelete:s}){const{t:c}=Ce(),d=v.useRef(null);v.useEffect(()=>{const m=y=>{d.current&&!d.current.contains(y.target)&&i()};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[i]);const h=n.library.id===Ty;return f.jsxs("div",{ref:d,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:[f.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&&f.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 vg({onNavigate:n}){const{t:i}=Ce(),r=Aa(),s=Qn(),c=Bt(hi(Er)),d=Bt(P=>P.updateLibraryName),h=Bt(P=>P.deleteLibrary),m=r.pathname.startsWith("/studio/sources")||r.pathname.startsWith("/studio/source/"),[y,p]=v.useState(m),[b,x]=v.useState(null),[_,j]=v.useState(null),[R,M]=v.useState(null),[L,Q]=v.useState(null);v.useEffect(()=>{m&&p(!0)},[m]);const G=v.useCallback((P,ne)=>{P.preventDefault(),x({x:P.clientX,y:P.clientY,library:ne})},[]),K=v.useCallback(()=>x(null),[]),re=v.useCallback(P=>{j(P.id),M(null)},[]),le=v.useCallback(async P=>{if(_)try{await d(_,P),j(null),M(null)}catch(ne){const J=ne instanceof Error?ne.message:String(ne);M(J)}},[_,d]),ce=v.useCallback(()=>{j(null),M(null)},[]),I=v.useCallback(P=>{Q(P)},[]),N=v.useCallback(async()=>{if(L){try{await h(L.id),r.pathname.includes(L.id)&&s("/studio/sources")}catch{}Q(null)}},[L,h,r.pathname,s]),X=v.useCallback(()=>{Q(null)},[]),F=P=>P.id===Ty?i("sources.library.default_cloud_name"):P.name;return f.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:[f.jsxs("nav",{className:"flex flex-col gap-1",children:[f.jsxs("div",{className:"group/sources",children:[f.jsxs("button",{onClick:()=>p(P=>!P),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:[f.jsx(X2,{size:14}),i("studio.sidebar.sources"),f.jsx("span",{role:"button",tabIndex:0,onClick:P=>{P.stopPropagation(),s("/studio/sources/add-client"),n?.()},onKeyDown:P=>{(P.key==="Enter"||P.key===" ")&&(P.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:f.jsx(_y,{size:12})}),f.jsx("span",{className:"ml-auto shrink-0",children:y?f.jsx(fo,{size:12}):f.jsx(hn,{size:12})})]}),y&&f.jsx("div",{className:"mt-0.5 flex flex-col gap-0.5",children:c.map(P=>{const ne=_===P.id,J=F(P);return ne?f.jsx("div",{className:"py-1.5 pl-8 pr-3",onClick:ee=>ee.stopPropagation(),children:f.jsx(Ry,{currentName:J,onConfirm:le,onCancel:ce,error:R})},P.id):f.jsxs(vr,{to:`/studio/sources/${P.id}`,onClick:n,onContextMenu:ee=>G(ee,P),className:({isActive:ee})=>`flex items-center gap-2 rounded py-1.5 pl-8 pr-3 font-mono text-xs tracking-tight transition-colors duration-150 ${ee?"bg-c4a-bg-active text-c4a-accent":"text-c4a-text-secondary hover:bg-c4a-bg-hover hover:text-c4a-text-primary"}`,children:[f.jsx("span",{className:"truncate",children:J}),P.type==="daemon"&&f.jsx("span",{className:`ml-auto h-[7px] w-[7px] shrink-0 rounded-full ${P.is_online?"bg-c4a-success":"bg-c4a-error"}`})]},P.id)})})]}),g4.map(({to:P,icon:ne,i18nKey:J})=>f.jsxs(vr,{to:P,onClick:n,className:({isActive:ee})=>p4(ee),children:[f.jsx(ne,{size:14}),i(J)]},P))]}),f.jsxs("div",{className:"mt-auto flex flex-col gap-2 pt-3",children:[f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx(Ey,{}),f.jsx(wy,{})]}),f.jsx(Cy,{compact:!0})]}),b&&f.jsx(y4,{state:b,onClose:K,onRename:re,onDelete:I}),L&&f.jsx(zy,{target:{type:"client",name:F(L)},onConfirm:N,onCancel:X})]})}function x4(){const[n,i]=v.useState(!1);return v.useEffect(()=>{Bt.getState().fetchLibraries(),vl.getState().fetchDaemonStatus()},[]),v.useEffect(()=>$a.onStatusChange(r=>{r==="connected"&&(Bt.getState().fetchLibraries(),vl.getState().fetchDaemonStatus())}),[]),f.jsxs("div",{className:"flex h-screen flex-col overflow-hidden",children:[f.jsx(m4,{onToggleSidebar:()=>i(!n)}),f.jsxs("div",{className:"flex min-h-0 flex-1",children:[f.jsx("div",{className:"hidden md:block",children:f.jsx(vg,{})}),n&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"fixed inset-0 top-14 z-30 bg-black/40 md:hidden",onClick:()=>i(!1)}),f.jsx("div",{className:"fixed bottom-0 left-0 top-14 z-30 md:hidden",children:f.jsx(vg,{onNavigate:()=>i(!1)})})]}),f.jsx("main",{className:"flex min-h-0 flex-1 flex-col overflow-x-hidden",children:f.jsx(fy,{})})]})]})}function v4(){const{t:n}=Ce();return f.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center py-20 text-center",children:[f.jsx("h1",{className:"font-mono text-4xl font-bold uppercase tracking-wide text-c4a-text-primary md:text-5xl",children:n("home.hero.title")}),f.jsx("p",{className:"mt-6 max-w-lg text-base text-c4a-text-secondary",children:n("home.hero.description")}),f.jsxs("div",{className:"mt-10 flex items-center gap-4",children:[f.jsxs(Pt,{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"),f.jsx(vy,{size:14})]}),f.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 Ea({title:n,version:i,description:r}){const{t:s}=Ce();return f.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:f.jsxs("div",{className:"max-w-md text-center",children:[f.jsx("h2",{className:"font-mono text-2xl font-bold uppercase text-c4a-text-primary",children:n}),i&&f.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})}),f.jsx("p",{className:"mt-4 text-sm text-c4a-text-secondary",children:r})]})})}function b4(){const{t:n}=Ce();return f.jsx(Ea,{title:n("page.login.title"),version:"0.5.0",description:n("page.login.description")})}function S4(){const{t:n}=Ce();return f.jsx(Ea,{title:n("page.docs.title"),version:"0.4.13",description:n("page.docs.description")})}function _4(){const{t:n}=Ce();return f.jsxs("div",{className:"flex min-h-screen flex-col items-center justify-center bg-c4a-bg-base p-8 text-center",children:[f.jsx("h1",{className:"font-mono text-6xl font-bold text-c4a-accent",children:n("notfound.title")}),f.jsx("p",{className:"mt-4 text-base text-c4a-text-secondary",children:n("notfound.description")}),f.jsx(Pt,{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 j4(){const{t:n}=Ce();return f.jsx(Ea,{title:n("page.modeling.title"),version:"0.4.16",description:n("page.modeling.description")})}function N4(){const{t:n}=Ce();return f.jsx(Ea,{title:n("page.brain.title"),version:"0.4.18",description:n("page.brain.description")})}function E4(){const{t:n}=Ce();return f.jsx(Ea,{title:n("page.discovery.title"),version:"0.6.x",description:n("page.discovery.description")})}function w4(){const{t:n}=Ce();return f.jsx(Ea,{title:n("page.sharing.title"),version:"0.4.39",description:n("page.sharing.description")})}function C4(){const{t:n}=Ce();return f.jsx(Ea,{title:n("page.collaboration.title"),version:"0.5.x",description:n("page.collaboration.description")})}function R4(){const{t:n}=Ce();return f.jsx(Ea,{title:n("page.settings.title"),version:"0.5.x",description:n("page.settings.description")})}function z4(){const{t:n}=Ce();return f.jsx(Ea,{title:n("page.code_setup.title"),version:"0.4.13",description:n("page.code_setup.description")})}function T4(){const{t:n}=Ce();return f.jsx(Ea,{title:n("page.code_compile.title"),version:"0.4.13",description:n("page.code_compile.description")})}function O4(){const{t:n}=Ce();return f.jsx(Ea,{title:n("page.code_review.title"),version:"0.4.14",description:n("page.code_review.description")})}function M4(){const{t:n}=Ce();return f.jsx(Ea,{title:n("page.code_result.title"),version:"0.4.14",description:n("page.code_result.description")})}const po=(n,i)=>{for(const r of n){if(r.path===i)return r;if(r.children){const s=po(r.children,i);if(s)return s}}return null},D4=(n,i)=>i===""?n:po(n,i)?.children??[],Oy=(n,i)=>{if(!i)return[];const r=i.split("/"),s=[];let c="";for(const d of r){c=c?`${c}/${d}`:d;const h=po(n,c);h&&s.push(h)}return s},go=ho(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 d=await Ht.get("/sources",c);n({rootSources:d.items,total:d.total,limit:d.limit,offset:d.offset,loading:!1})}catch(c){n({error:c instanceof Error?c.message:"Failed to load sources",loading:!1})}},fetchRootSource:async i=>{const r=await Ht.get(`/sources/${i}`);return n({currentRoot:r}),r},createSource:async i=>await Ht.post("/sources",i),addTreeNode:async(i,r)=>{const s=await Ht.post(`/sources/${i}/tree`,r);return n(c=>({rootSources:c.rootSources.map(d=>d.id===i?s:d),currentRoot:c.currentRoot?.id===i?s:c.currentRoot})),s},updateSource:async(i,r)=>{const s=await Ht.put(`/sources/${i}`,r);n(c=>({rootSources:c.rootSources.map(d=>d.id===i?s:d),currentRoot:c.currentRoot?.id===i?s:c.currentRoot}))},deleteSource:async i=>{await Ht.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 wr({segments:n}){const{t:i}=Ce(),r=v.useRef(null),s=v.useRef(null),[c,d]=v.useState(0),h=[{label:i("sources.breadcrumb.sources")},...n],m=Math.max(0,h.length-3);v.useEffect(()=>{const p=r.current,b=s.current;if(!p||!b)return;const x=()=>{const j=p.clientWidth,R=Array.from(b.children);if(R.length===0)return;const M=R.map(I=>I.offsetWidth),L=4;if(M.reduce((I,N)=>I+N,0)+L*(M.length-1)<=j){d(0);return}const G=20,K=(M[0]??0)+(M[1]??0)+L,re=M[M.length-1]??0,le=K+L+G+L+re;let ce=m;for(let I=1;I<=m;I++){let N=0;for(let X=2+I;X<M.length-1;X++)N+=M[X]+L;if(le+N<=j){ce=I;break}}d(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),b=h[h.length-1],x=h.slice(2+c,h.length-1);return[...p,{label:"…"},...x,b]})();return f.jsxs("div",{ref:r,className:"relative min-w-0 overflow-hidden",children:[f.jsx("nav",{className:"flex min-h-8 items-center gap-1 font-mono text-xs text-c4a-text-muted",children:y.map((p,b)=>{const x=b===y.length-1;return f.jsxs("span",{className:"flex shrink-0 items-center gap-1",children:[b>0&&f.jsx(hn,{size:12,className:"shrink-0 text-c4a-text-muted"}),p.to&&!x?f.jsx(Pt,{to:p.to,className:"cursor-pointer whitespace-nowrap transition-colors hover:text-c4a-text-primary",children:p.label}):f.jsx("span",{className:`whitespace-nowrap ${x?"text-c4a-text-primary":""}`,children:p.label})]},b)})}),f.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,b)=>f.jsxs("span",{className:"flex shrink-0 items-center gap-1",children:[b>0&&f.jsx(hn,{size:12}),f.jsx("span",{className:"whitespace-nowrap",children:p.label})]},b))})]})}const A4=["all","indexed","not_indexed"];function L4({value:n,onChange:i}){const{t:r}=Ce(),[s,c]=v.useState(!1),d=v.useRef(null),h=v.useRef(null),m={all:r("sources.filter.all"),indexed:r("sources.filter.indexed"),not_indexed:r("sources.filter.not_indexed")},y=v.useCallback(x=>{d.current&&!d.current.contains(x.target)&&c(!1)},[]);v.useEffect(()=>{if(s)return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[s,y]);const p=v.useCallback(()=>{h.current&&(clearTimeout(h.current),h.current=null),c(!0)},[]),b=v.useCallback(()=>{h.current=setTimeout(()=>c(!1),150)},[]);return f.jsxs("div",{ref:d,className:"relative",onMouseEnter:p,onMouseLeave:b,children:[f.jsxs("button",{className:"flex items-center gap-1.5 rounded border border-c4a-border-default bg-c4a-bg-surface p-1 font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary sm:px-2 sm:py-1",children:[f.jsx(mS,{size:12}),f.jsx("span",{className:"hidden sm:inline",children:m[n]}),f.jsx(fo,{size:12,className:"hidden transition-transform sm:block"})]}),s&&f.jsx("div",{className:"absolute right-0 top-full z-20 mt-1 min-w-[120px] rounded border border-c4a-border-default bg-c4a-bg-elevated py-1 shadow-c4a-lg",children:A4.map(x=>f.jsxs("button",{onClick:()=>{i(x),c(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left font-mono text-xs transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary ${x===n?"text-c4a-accent":"text-c4a-text-secondary"}`,children:[f.jsx(ui,{size:12,className:x===n?"opacity-100":"opacity-0"}),m[x]]},x))})]})}function k4({source:n,isDaemonLibrary:i}){return n.kind==="folder"?i?f.jsx(nS,{size:16,className:"shrink-0 text-c4a-text-muted"}):f.jsx(_a,{size:16,className:"shrink-0 text-c4a-text-muted"}):n.source_type==="code"?f.jsx(di,{size:16,className:"shrink-0 text-c4a-accent"}):f.jsx(xl,{size:16,className:"shrink-0 text-c4a-text-secondary"})}function bg({status:n}){const{t:i}=Ce(),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 f.jsx("span",{className:`rounded px-1.5 py-0.5 font-mono text-[10px] uppercase ${r[n]}`,children:i(s[n])})}function U4({type:n}){const{t:i}=Ce(),r=n==="code"?"sources.type.code":"sources.type.doc";return f.jsx("span",{className:"font-mono text-[10px] uppercase text-c4a-text-muted",children:i(r)})}function Sg({source:n,displayName:i,childCount:r,isDaemonLibrary:s,isRepoRoot:c,onClick:d,onRename:h,onDelete:m}){const{t:y}=Ce(),[p,b]=v.useState(!1),[x,_]=v.useState(null),j=v.useCallback(async Q=>{if(!h)return;const G=await h(Q);G?_(G):(b(!1),_(null))},[h]),R=v.useCallback(()=>{b(!1),_(null)},[]),M=!c&&h,L=m;return f.jsxs("div",{className:"group flex items-center gap-3 rounded pl-3 pr-5 py-2 transition-colors hover:bg-c4a-bg-hover cursor-pointer",onClick:p?void 0:d,children:[f.jsx(k4,{source:n,isDaemonLibrary:s??!1}),p?f.jsx("div",{className:"min-w-0 flex-1",onClick:Q=>Q.stopPropagation(),children:f.jsx(Ry,{currentName:n.name,onConfirm:j,onCancel:R,error:x})}):f.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-c4a-text-primary",children:i??n.name}),f.jsxs("div",{className:"hidden items-center gap-2 md:flex",children:[n.kind==="folder"&&r!==void 0&&f.jsx("span",{className:"font-mono text-xs text-c4a-text-muted",children:y("common.items",{count:r})}),n.kind==="source"&&f.jsxs(f.Fragment,{children:[f.jsx(bg,{status:n.index_status}),n.source_type&&f.jsx(U4,{type:n.source_type})]})]}),f.jsx("div",{className:"flex items-center gap-2 md:hidden",children:n.kind==="source"&&f.jsx(bg,{status:n.index_status})}),(M||L)&&f.jsxs("div",{className:"flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:[M&&f.jsx("button",{title:y("sources.actions.rename"),onClick:Q=>{Q.stopPropagation(),b(!0)},className:"rounded p-1 text-c4a-text-muted transition-colors hover:text-c4a-accent",children:f.jsx(wS,{size:14})}),L&&f.jsx("button",{title:y("sources.actions.delete"),onClick:Q=>{Q.stopPropagation(),m()},className:"rounded p-1 text-c4a-text-muted transition-colors hover:text-c4a-accent",children:f.jsx(YS,{size:14})})]})]})}function H4({onConfirm:n,onCancel:i,error:r}){const{t:s}=Ce(),[c,d]=v.useState(""),h=v.useRef(null),m=v.useRef(null);v.useEffect(()=>{h.current?.focus()},[]),v.useEffect(()=>{const x=_=>{_.key==="Escape"&&i()};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[i]);const y=v.useCallback(x=>{m.current&&!m.current.contains(x.target)&&i()},[i]),p=v.useCallback(()=>{const x=c.trim();x&&n(x)},[c,n]),b=v.useCallback(x=>{x.key==="Enter"&&(x.preventDefault(),p())},[p]);return f.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:y,children:f.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:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(Sy,{size:16,className:"shrink-0 text-c4a-accent"}),f.jsx("h3",{className:"font-mono text-sm font-bold uppercase text-c4a-text-primary",children:s("sources.actions.new_folder")})]}),f.jsxs("div",{className:"mt-4",children:[f.jsx("input",{ref:h,value:c,onChange:x=>d(x.target.value),onKeyDown:b,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&&f.jsx("p",{className:"mt-2 text-xs text-c4a-error",children:r})]}),f.jsxs("div",{className:"mt-6 flex justify-end gap-2",children:[f.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")}),f.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 _g({label:n,icon:i,items:r}){const[s,c]=v.useState(!1),d=v.useRef(null),h=v.useRef(null),m=v.useCallback(b=>{d.current&&!d.current.contains(b.target)&&c(!1)},[]);v.useEffect(()=>{if(s)return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[s,m]);const y=v.useCallback(()=>{h.current&&(clearTimeout(h.current),h.current=null),c(!0)},[]),p=v.useCallback(()=>{h.current=setTimeout(()=>c(!1),150)},[]);return f.jsxs("div",{ref:d,className:"relative",onMouseEnter:y,onMouseLeave:p,children:[f.jsxs("button",{className:"flex items-center gap-1.5 rounded border border-c4a-border-default bg-c4a-bg-surface p-1 font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary sm:px-2 sm:py-1",children:[i,f.jsx("span",{className:"hidden sm:inline",children:n}),f.jsx(fo,{size:12,className:"hidden transition-transform sm:block"})]}),s&&f.jsx("div",{className:"absolute left-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(b=>f.jsxs("button",{onClick:()=>{b.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:[b.icon,b.label]},b.label))})]})}function B4({onClose:n}){const{t:i}=Ce(),r=v.useRef(null),s=v.useCallback(c=>{r.current&&!r.current.contains(c.target)&&n()},[n]);return f.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:s,children:f.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:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(US,{size:18,className:"text-c4a-accent"}),f.jsx("h3",{className:"font-mono text-sm font-bold uppercase text-c4a-text-primary",children:i("sources.upgrade.title")})]}),f.jsx("p",{className:"mt-3 text-sm text-c4a-text-secondary",children:i("sources.upgrade.description")}),f.jsx("div",{className:"mt-6 flex justify-end",children:f.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 q4({pathLabel:n,loading:i,onNavigateUp:r,children:s}){return f.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:[f.jsx("p",{className:"min-w-0 truncate font-mono text-xs text-c4a-text-muted",children:n}),f.jsx("hr",{className:"my-3 border-c4a-border-subtle"}),f.jsx("div",{className:"c4a-scrollbar flex min-h-0 flex-1 flex-col overflow-y-auto",children:i?f.jsx("div",{className:"flex flex-1 items-center justify-center py-8",children:f.jsx(Gt,{size:14,className:"animate-spin text-c4a-text-muted"})}):f.jsxs(f.Fragment,{children:[r&&f.jsxs("button",{onClick:r,className:"flex w-full cursor-pointer items-center gap-3 rounded pl-3 pr-5 py-2 text-left text-sm text-c4a-text-primary transition-colors hover:bg-c4a-bg-hover",children:[f.jsx(_a,{size:16,className:"shrink-0 text-c4a-text-muted"}),f.jsx("span",{children:".."})]}),s]})})]})}function Y4({library:n,onNewFolder:i,onImportRepo:r,onImportDir:s,onUpgrade:c}){const{t:d}=Ce(),h=n.type==="daemon";return f.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:f.jsxs("div",{className:"max-w-2xl text-center",children:[f.jsx("h3",{className:"font-mono text-lg font-bold uppercase text-c4a-text-primary",children:d(h?"sources.empty.daemon.title":"sources.empty.cloud.title")}),f.jsx("p",{className:"mt-3 text-sm text-c4a-text-secondary",children:d(h?"sources.empty.daemon.description":"sources.empty.cloud.description")}),f.jsx("div",{className:"mt-6 flex justify-center gap-3",children:h?f.jsxs(f.Fragment,{children:[s&&f.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:d("sources.actions.import_dir")}),r&&f.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:d("sources.actions.import_repo")})]}):f.jsxs(f.Fragment,{children:[f.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:d("sources.actions.new_folder")}),c&&f.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:d("sources.actions.import_repo_url")})]})})]})})}function V4(){const{t:n}=Ce();return f.jsxs("div",{className:"rounded border border-c4a-border-subtle bg-c4a-bg-surface p-6 text-center",children:[f.jsx("h4",{className:"font-mono text-sm font-bold text-c4a-text-primary",children:n("sources.empty.indexed.title")}),f.jsx("p",{className:"mt-2 text-xs text-c4a-text-secondary",children:n("sources.empty.indexed.description")})]})}const jg=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 G4(){const{t:n}=Ce(),i=Qn(),{libId:r}=co(),[s,c]=yy(),d=s.get("rootId")||null,h=s.get("path")||"",y=Bt(hi(Er)).find(de=>de.id===r),{rootSources:p,currentRoot:b,loading:x,filter:_,fetchRootSources:j,fetchRootSource:R,createSource:M,addTreeNode:L,updateSource:Q,deleteSource:G,setFilter:K}=go(),[re,le]=v.useState(!1),[ce,I]=v.useState(null),[N,X]=v.useState(null),[F,P]=v.useState(null),[ne,J]=v.useState(!1);v.useEffect(()=>{r&&j({library_id:r})},[r,j]),v.useEffect(()=>{d&&R(d)},[d,R]);const ee=d!==null,pe=v.useMemo(()=>ee?b?[...D4(b.tree,h)].sort((ut,pt)=>ut.kind!==pt.kind?ut.kind==="folder"?-1:1:ut.name.localeCompare(pt.name)).map(ut=>({type:"node",root:b,node:ut})):[]:[...p].sort((pt,$e)=>new Date(pt.created_at).getTime()-new Date($e.created_at).getTime()).map(pt=>({type:"root",root:pt,node:null})),[ee,p,b,h]),D=v.useMemo(()=>_==="all"?pe:pe.filter(de=>de.type==="root"||!de.node||de.node.kind==="folder"?!0:_==="indexed"?de.node.index_status==="indexed":de.node.index_status==="none"||!de.node.index_status),[pe,_]),W=y?.type==="daemon",ue=y?.type==="cloud",V=W&&!ee,fe=v.useMemo(()=>{if(!y)return[];const de=[{label:y.id===mo?n("sources.library.default_cloud_name"):y.name,to:`/studio/sources/${y.id}`}];return ee&&b&&(de.push({label:b.name,to:`/studio/sources/${y.id}?rootId=${b.id}`}),h&&Oy(b.tree,h).forEach(ut=>{de.push({label:ut.name,to:`/studio/sources/${y.id}?rootId=${b.id}&path=${encodeURIComponent(ut.path)}`})})),de},[y,ee,b,h,n]),E=v.useCallback(async de=>{if(r)try{ee&&d?await L(d,{parent_path:h,kind:"folder",name:de}):(await M({library_id:r,kind:"folder",name:de}),j({library_id:r})),le(!1),I(null)}catch(Le){Le instanceof ad&&Le.status===409&&I(n("sources.error.name_conflict",{name:de}))}},[r,ee,d,h,M,L,j,n]),B=v.useCallback(de=>{r&&(de.type==="root"?c({rootId:de.root.id}):de.node&&(de.node.kind==="folder"?c({rootId:de.root.id,path:de.node.path}):i(`/studio/source/${de.root.id}?path=${encodeURIComponent(de.node.path)}`)))},[r,i,c]),te=v.useCallback(()=>{if(!(!d||!r))if(h){const de=h.split("/");de.pop();const Le=de.join("/");c(Le?{rootId:d,path:Le}:{rootId:d})}else c({})},[d,r,h,c]),se=v.useCallback(async(de,Le)=>{try{return await Q(de,{name:Le}),j({library_id:r}),null}catch(ut){return ut instanceof ad&&ut.status===409?n("sources.error.name_conflict",{name:Le}):null}},[r,Q,j,n]),Se=v.useCallback(de=>{if(de.type==="root"){P(de.root.id);const Le=de.root.tree.length>0?jg({children:de.root.tree}):void 0;X(W?{type:"repo",name:de.root.name,libraryName:y.name,...Le?{packageCount:Le.codeSources,docCount:Le.docSources}:{}}:{type:"folder",name:de.root.name,...Le?{folderCount:Le.folders,sourceCount:Le.sources}:{}})}},[W,y]),Ne=v.useCallback(async()=>{if(!(!F||!r))try{await G(F),X(null),P(null),j({library_id:r})}catch{}},[F,r,G,j]),ze=v.useCallback(()=>{r&&i(`/studio/sources/import/${r}`)},[r,i]),lt=v.useCallback(()=>{r&&i(`/studio/sources/import-dir/${r}`)},[r,i]);if(!y)return f.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:f.jsx("p",{className:"text-sm text-c4a-text-muted",children:n("common.loading")})});const he=p.length===0&&_==="all"&&!x&&!ee,wt=D.filter(de=>de.type==="node"&&de.node?.kind==="source").length===0&&_==="indexed"&&!x,Kt=!V,It=ue,at=V;return f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col p-4 md:p-6",children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[f.jsx("div",{className:"min-w-0 flex-1",children:f.jsx(wr,{segments:fe})}),f.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[It&&f.jsxs(f.Fragment,{children:[f.jsx(_g,{label:n("sources.actions.upload"),icon:f.jsx(GS,{size:14}),items:[{label:n("sources.actions.upload_md"),icon:f.jsx(xl,{size:14}),onClick:()=>J(!0)}]}),f.jsx(_g,{label:n("sources.actions.add"),icon:f.jsx(_y,{size:14}),items:[{label:n("sources.actions.add_folder"),icon:f.jsx(Sy,{size:14}),onClick:()=>le(!0)},{label:n("sources.actions.add_web"),icon:f.jsx(uS,{size:14}),onClick:()=>J(!0)},{label:n("sources.actions.add_feishu"),icon:f.jsx(Z2,{size:14}),onClick:()=>J(!0)}]}),f.jsxs("button",{onClick:()=>J(!0),className:"flex items-center gap-1.5 rounded border border-c4a-border-default bg-c4a-bg-surface p-1 font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary sm:px-2 sm:py-1",children:[f.jsx(cg,{size:14}),f.jsx("span",{className:"hidden sm:inline",children:n("sources.actions.import_repo_url")})]})]}),at&&f.jsxs(f.Fragment,{children:[f.jsxs("button",{onClick:lt,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 p-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 sm:px-2 sm:py-1",children:[f.jsx(tS,{size:14}),f.jsx("span",{className:"hidden sm:inline",children:n("sources.actions.import_dir")})]}),f.jsxs("button",{onClick:ze,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 p-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 sm:px-2 sm:py-1",children:[f.jsx(cg,{size:14}),f.jsx("span",{className:"hidden sm:inline",children:n("sources.actions.import_repo")})]})]}),Kt&&f.jsx(L4,{value:_,onChange:K})]})]}),he?f.jsx(Y4,{library:y,onNewFolder:()=>le(!0),...W?{onImportRepo:ze,onImportDir:lt}:{},...ue?{onUpgrade:()=>J(!0)}:{}}):f.jsx(q4,{pathLabel:fe.map(de=>de.label).join(" / "),loading:x,onNavigateUp:ee?te:void 0,children:D.length===0?wt?f.jsx(V4,{}):ee?null:f.jsx("p",{className:"py-8 text-center text-xs text-c4a-text-muted",children:n("common.items",{count:0})}):f.jsx("div",{className:"flex flex-col gap-0.5",children:D.map(de=>{if(de.type==="root"){const $e=de.root,ea=W,ta=ea?$e.metadata?.local_path:void 0,wa=$e.tree.length>0?jg({children:$e.tree}):void 0,pn=wa?wa.folders+wa.sources:0;return f.jsx(Sg,{source:{id:$e.id,library_id:$e.library_id,owner_id:$e.owner_id,path:"",kind:$e.kind,source_type:$e.source_type,name:$e.name,content_hash:$e.content_hash,metadata:$e.metadata,index_status:$e.index_status,created_at:$e.created_at,updated_at:$e.updated_at},...typeof ta=="string"?{displayName:ta}:{},...pn>0?{childCount:pn}:{},isDaemonLibrary:W??!1,isRepoRoot:ea,onClick:()=>B(de),onRename:Zn=>se($e.id,Zn),onDelete:()=>Se(de)},$e.id)}const Le=de.node,ut=`${de.root.id}:${Le.path}`,pt=Le.kind==="folder"&&Le.children?Le.children.length:void 0;return f.jsx(Sg,{source:{id:de.root.id,library_id:de.root.library_id,owner_id:de.root.owner_id,path:Le.path,kind:Le.kind,source_type:Le.source_type??null,name:Le.name,content_hash:null,metadata:Le.metadata??null,index_status:Le.index_status??"none",created_at:de.root.created_at,updated_at:de.root.updated_at},...pt!==void 0?{childCount:pt}:{},isDaemonLibrary:W??!1,onClick:()=>B(de)},ut)})})}),re&&f.jsx(H4,{onConfirm:E,onCancel:()=>{le(!1),I(null)},error:ce}),ne&&f.jsx(B4,{onClose:()=>J(!1)}),N&&f.jsx(zy,{target:N,onConfirm:Ne,onCancel:()=>{X(null),P(null)}})]})}function My(){const{t:n}=Ce(),[i,r]=v.useState(!1),[s,c]=v.useState(null),d=v.useRef(),h=v.useRef(),m=window.location.host,y=`c4a-daemon --server ${m} --allow <dir1> <dir2>`,p=`c4a-daemon --server ${m}`,b=v.useCallback((j,R)=>{navigator.clipboard.writeText(j),c(R),clearTimeout(d.current),d.current=setTimeout(()=>c(null),1500)},[]),x=v.useCallback(()=>{clearTimeout(h.current),r(!0)},[]),_=v.useCallback(()=>{h.current=setTimeout(()=>r(!1),150)},[]);return f.jsxs("span",{className:"relative",onMouseEnter:x,onMouseLeave:_,children:[f.jsx(md,{size:12,className:"text-c4a-warning"}),i&&f.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:[f.jsx("span",{className:"block whitespace-nowrap font-mono text-xs text-c4a-text-secondary",children:n("sources.import.allowed_dirs_tooltip_restrict")}),f.jsxs("span",{className:"mt-1 flex items-center gap-1.5 whitespace-nowrap",children:[f.jsx("span",{className:"font-mono text-xs text-c4a-accent",children:y}),f.jsx("button",{onClick:()=>b(y,0),className:"shrink-0 rounded p-0.5 text-c4a-accent transition-colors hover:bg-c4a-bg-hover",title:"Copy",children:s===0?f.jsx(ui,{size:10}):f.jsx(ug,{size:10})})]}),f.jsx("span",{className:"mt-2 block whitespace-nowrap font-mono text-xs text-c4a-text-secondary",children:n("sources.import.allowed_dirs_tooltip_all")}),f.jsxs("span",{className:"mt-1 flex items-center gap-1.5 whitespace-nowrap",children:[f.jsx("span",{className:"font-mono text-xs text-c4a-accent",children:p}),f.jsx("button",{onClick:()=>b(p,1),className:"shrink-0 rounded p-0.5 text-c4a-accent transition-colors hover:bg-c4a-bg-hover",title:"Copy",children:s===1?f.jsx(ui,{size:10}):f.jsx(ug,{size:10})})]})]})]})}function Dy({open:n,onClose:i,rpc:r,onNavigate:s,defaultPath:c}){const{t:d}=Ce(),[h,m]=v.useState(c??""),[y,p]=v.useState(null),[b,x]=v.useState(!1),_=v.useRef(null);v.useEffect(()=>{c&&!h&&m(c)},[c]);const j=v.useCallback(async()=>{const M=h.trim();if(M){x(!0),p(null);try{(await r("fs/exists",{path:M})).exists?(s(M),m(c??""),p(null),i()):p(d("sources.import.wildcard_path_not_found"))}catch(L){p(L instanceof Error?L.message:String(L))}finally{x(!1)}}},[h,r,d,s,i]),R=v.useCallback(()=>{m(c??""),p(null),i()},[i,c]);return n?f.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",children:f.jsxs("div",{className:"w-full max-w-md rounded-lg border border-c4a-border-default bg-c4a-bg-surface p-5 shadow-xl",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h3",{className:"font-mono text-sm font-medium text-c4a-text-primary",children:d("sources.import.wildcard_go_title")}),f.jsx("button",{onClick:R,className:"rounded p-1 text-c4a-text-muted transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-secondary",children:f.jsx(gd,{size:14})})]}),f.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[f.jsx("input",{ref:_,type:"text",value:h,onChange:M=>{m(M.target.value),p(null)},onKeyDown:M=>{M.key==="Enter"&&j()},placeholder:d("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"}),f.jsxs("button",{onClick:j,disabled:b||!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:[b?f.jsx(Gt,{size:12,className:"animate-spin"}):f.jsx(vy,{size:12}),d("sources.import.wildcard_go")]})]}),y&&f.jsx("p",{className:"mt-2 text-xs text-c4a-error",children:y})]})}):null}function Ay(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 $4(n,i){return`${n}/tree/${encodeURIComponent(i)}`}function K4(n,i){return`${n}/commit/${i}`}function X4({rpc:n,selectedPath:i,onSelect:r,allowedPaths:s,importedPaths:c}){const{t:d}=Ce(),h=!!s&&s.length>0,m=h&&s.length===1&&s[0]==="*",[y,p]=v.useState(h),[b,x]=v.useState(h&&!m?"":"/"),[_,j]=v.useState([]),[R,M]=v.useState(!1),[L,Q]=v.useState(null),[G,K]=v.useState(null);v.useEffect(()=>{if(h&&!m)return;let V=!1;return(async()=>{try{const fe=await n("fs/homeDir",{});V||K(fe.home_dir)}catch{V||K("/")}})(),()=>{V=!0}},[h,m,n]);const[re,le]=v.useState(!1),ce=v.useCallback(async V=>{M(!0),Q(null);try{const fe=await n("fs/listTree",{path:V,depth:1});j(fe.entries||[]),x(V),p(!1)}catch(fe){const E=fe instanceof Error?fe.message:String(fe);Q(E)}finally{M(!1)}},[n]);v.useEffect(()=>{h&&!m||G!==null&&ce(G)},[G]);const[I,N]=v.useState(null),[X,F]=v.useState(null),[P,ne]=v.useState(!1);v.useEffect(()=>{if(!i){F(null),ne(!1);return}F(null),ne(!0);let V=!1;return(async()=>{try{const fe=await n("fs/repoStatus",{path:i});V||(F({branch:fe.branch,hash:fe.head_hash,remoteUrl:fe.remote_url}),ne(!1))}catch{V||(F(null),ne(!1))}})(),()=>{V=!0}},[i,n]);const J=v.useMemo(()=>X?.remoteUrl?Ay(X.remoteUrl):null,[X?.remoteUrl]),ee=v.useMemo(()=>new Set(c??[]),[c]),pe=v.useCallback(V=>{if(V.type==="directory")if(V.is_git_repo){if(ee.has(V.path))return;N(null),r(V.path,V.name)}else N(V.path),ce(V.path)},[r,ce,ee]),D=v.useCallback(()=>{if(h&&!m&&s.some(E=>E===b)){p(!0),x(""),j([]),Q(null),N(null);return}const V=b.split("/").slice(0,-1).join("/")||"/";N(null),ce(V)},[b,ce,h,m,s]),W=v.useMemo(()=>_.filter(V=>V.type==="directory").sort((V,fe)=>V.is_git_repo&&!fe.is_git_repo?-1:!V.is_git_repo&&fe.is_git_repo?1:V.name.localeCompare(fe.name)),[_]),ue=v.useMemo(()=>_.filter(V=>V.type==="file").sort((V,fe)=>V.name.localeCompare(fe.name)),[_]);return f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col rounded border border-c4a-border-default bg-c4a-bg-surface p-4",children:[f.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-1",children:[y?f.jsxs("p",{className:"flex items-center gap-1.5 font-mono text-xs text-c4a-text-muted",children:[f.jsx("span",{children:d("sources.import.allowed_dirs")}),f.jsx(My,{})]}):f.jsx("p",{className:"min-w-0 shrink truncate font-mono text-xs text-c4a-text-muted",children:b}),i&&P?f.jsxs("div",{className:"flex shrink-0 items-center gap-1.5 font-mono text-xs text-c4a-accent",children:[f.jsx(Gt,{size:12,className:"animate-spin"}),f.jsx("span",{children:d("common.loading")})]}):i&&X?f.jsxs("div",{className:"flex shrink-0 items-center gap-1.5 font-mono text-xs leading-none text-c4a-accent",children:[J?f.jsxs("a",{href:J.repoUrl,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 hover:underline",title:J.repoUrl,children:[f.jsx(td,{size:12,className:"shrink-0"}),f.jsx("span",{children:J.slug})]}):f.jsxs(f.Fragment,{children:[f.jsx(td,{size:12,className:"shrink-0"}),f.jsx("span",{children:i.split("/").pop()||i})]}),f.jsx("span",{className:"text-c4a-text-muted",children:"/"}),J?f.jsxs("a",{href:$4(J.repoUrl,X.branch),target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 hover:underline",children:[f.jsx(lo,{size:10,className:"shrink-0"}),f.jsx("span",{children:X.branch})]}):f.jsxs("span",{className:"flex items-center gap-1",children:[f.jsx(lo,{size:10,className:"shrink-0"}),f.jsx("span",{children:X.branch})]}),f.jsx("span",{className:"text-c4a-text-muted",children:"/"}),J?f.jsx("a",{href:K4(J.repoUrl,X.hash),target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:X.hash.slice(0,7)}):f.jsx("span",{children:X.hash.slice(0,7)})]}):!i&&m&&y?f.jsx("button",{onClick:()=>le(!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:d("sources.import.wildcard_goto")}):null]}),f.jsx("hr",{className:"my-3 border-c4a-border-subtle"}),y?m?f.jsx("div",{className:"min-h-0 flex-1 c4a-scrollbar overflow-y-auto",children:G&&f.jsxs("button",{onClick:()=>ce(G),className:"flex w-full items-center gap-2 rounded pl-2 pr-4 py-1.5 text-left text-sm text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:[f.jsx(_a,{size:14,className:"shrink-0"}),f.jsxs("span",{className:"truncate",children:[G,f.jsxs("span",{className:"ml-1.5 text-c4a-text-muted",children:["(",d("sources.import.wildcard_home"),")"]})]}),f.jsx(hn,{size:12,className:"shrink-0 text-c4a-text-muted"})]})}):f.jsx("div",{className:"min-h-0 flex-1 c4a-scrollbar overflow-y-auto",children:s.map(V=>f.jsxs("button",{onClick:()=>ce(V),className:"flex w-full items-center gap-2 rounded pl-2 pr-4 py-1.5 text-left text-sm text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:[f.jsx(_a,{size:14,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:V}),f.jsx(hn,{size:12,className:"shrink-0 text-c4a-text-muted"})]},V))}):L&&!R?f.jsx("p",{className:"py-4 text-xs text-c4a-error",children:L}):f.jsxs("div",{className:"relative min-h-[5rem] min-h-0 flex-1 c4a-scrollbar overflow-y-auto",children:[R&&f.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-c4a-bg-surface/60",children:f.jsx(Gt,{size:14,className:"animate-spin text-c4a-text-muted"})}),b!=="/"&&f.jsxs("button",{onClick:D,disabled:R,className:"flex w-full items-center gap-2 rounded pl-2 pr-4 py-1.5 text-left text-sm text-c4a-text-secondary hover:bg-c4a-bg-hover disabled:pointer-events-none",children:[f.jsx(_a,{size:14}),f.jsx("span",{children:".."})]}),W.map(V=>{const fe=V.is_git_repo&&ee.has(V.path),E=V.is_git_repo?pd:_a;return f.jsxs("div",{className:`flex w-full items-center rounded pl-2 pr-4 text-left text-sm transition-colors ${fe?"cursor-not-allowed text-c4a-accent/60":i===V.path?"bg-c4a-accent/10 text-c4a-accent":"text-c4a-text-secondary hover:bg-c4a-accent/10 hover:text-c4a-accent"}`,children:[f.jsxs("button",{onClick:()=>pe(V),disabled:fe||R,className:"flex flex-1 items-center gap-2 px-2 py-1.5",children:[f.jsx(E,{size:14,className:"shrink-0"}),f.jsx("span",{className:"flex-1 truncate text-left",children:V.name}),fe&&f.jsx("span",{className:"rounded bg-c4a-accent/10 px-1.5 py-0.5 font-mono text-[10px] text-c4a-accent/60",children:d("sources.import.already_imported")})]}),!fe&&f.jsx("button",{onClick:B=>{B.stopPropagation(),ce(V.path)},disabled:R,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:V.path,children:f.jsx(hn,{size:12})})]},V.path)}),ue.map(V=>f.jsxs("div",{className:"flex w-full items-center gap-2 pl-2 pr-4 py-1.5 text-sm text-c4a-text-muted",children:[f.jsx(by,{size:14,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:V.name})]},V.path)),_.length===0&&!R&&f.jsx("p",{className:"py-4 text-center text-xs text-c4a-text-muted",children:d("sources.import.no_entries")})]}),I&&!i&&f.jsx("p",{className:"mt-3 text-xs text-c4a-warning",children:d("sources.import.not_git")}),f.jsx(Dy,{open:re,onClose:()=>le(!1),rpc:n,onNavigate:ce,defaultPath:G??void 0})]})}function Ng({value:n,options:i,onChange:r,icon:s,maxHeight:c="max-h-60"}){const[d,h]=v.useState(!1),m=v.useRef(null),y=v.useRef(null),p=v.useCallback(j=>{m.current&&!m.current.contains(j.target)&&h(!1)},[]);v.useEffect(()=>{if(d)return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[d,p]);const b=v.useCallback(()=>{y.current&&(clearTimeout(y.current),y.current=null),h(!0)},[]),x=v.useCallback(()=>{y.current=setTimeout(()=>h(!1),150)},[]),_=i.find(j=>j.value===n);return f.jsxs("div",{ref:m,className:"relative",onMouseEnter:b,onMouseLeave:x,children:[f.jsxs("button",{onClick:()=>h(j=>!j),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 text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary",children:[s,f.jsx("span",{className:"max-w-[200px] truncate",children:_?.label??n}),f.jsx(fo,{size:12,className:`shrink-0 transition-transform ${d?"rotate-180":""}`})]}),d&&f.jsx("div",{className:`absolute left-0 top-full z-20 mt-1 min-w-[180px] max-w-[360px] rounded border border-c4a-border-default bg-c4a-bg-elevated py-1 shadow-c4a-lg ${c} c4a-scrollbar overflow-y-auto`,children:i.map(j=>f.jsxs("button",{onClick:()=>{r(j.value),h(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left font-mono text-xs transition-colors hover:bg-c4a-bg-hover ${j.value===n?"text-c4a-accent":"text-c4a-text-secondary hover:text-c4a-text-primary"}`,children:[f.jsx(ui,{size:12,className:`shrink-0 ${j.value===n?"opacity-100":"opacity-0"}`}),f.jsx("span",{className:"truncate",children:j.label})]},j.value))})]})}const Q4=/\.md$/i,Gu=100,Z4=(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 F4({rpc:n,repoPath:i,onReady:r,onBusyChange:s}){const{t:c}=Ce(),[d,h]=v.useState(""),[m,y]=v.useState([]),[p,b]=v.useState(""),[x,_]=v.useState([]),[j,R]=v.useState(!1),[M,L]=v.useState(!0),[Q,G]=v.useState(!1),[K,re]=v.useState(!1),[le,ce]=v.useState([]),[I,N]=v.useState([]),[,X]=v.useState([]),[F,P]=v.useState(),ne=v.useMemo(()=>F?Ay(F):null,[F]),[J,ee]=v.useState("packages"),[pe,D]=v.useState(Gu),W=v.useRef(null),ue=v.useRef(null);v.useEffect(()=>{if(!M){G(!1);return}const he=setTimeout(()=>G(!0),2e3);return()=>clearTimeout(he)},[M]),v.useEffect(()=>{D(Gu),ue.current?.scrollTo(0,0)},[J]),v.useEffect(()=>{const he=W.current;if(!he)return;const wt=J==="packages"?le.length:I.length;if(pe>=wt)return;const Kt=new IntersectionObserver(It=>{It[0]?.isIntersecting&&D(at=>Math.min(at+Gu,wt))},{root:ue.current,threshold:.1});return Kt.observe(he),()=>Kt.disconnect()},[J,pe,le.length,I.length]);const V=v.useCallback(async(he,wt)=>{re(!0),s?.(!0);try{const Kt=await n("fs/repoScan",{path:i,hash:he}),It=Kt.files||[],at=Kt.manifests||[];X(It);const de=[];for(const $e of at){const ea=$e.path.split("/"),ta=ea.slice(0,-1).join("/")||".",wa=ea.length===1||$e.path==="package.json",pn=ta==="."?i.split("/").pop()||"root":ea[ea.length-2]||ta,Zn=Z4($e.path,$e.content);de.push({name:Zn||pn,path:ta,isRoot:wa})}const Le=It.filter($e=>Q4.test($e.path)).map($e=>$e.path);N(Le),ce(de);const ut=wt?.branch??d,pt=wt?.isDirty??j;r({branch:ut,commit:he,isDirty:pt,repoFiles:It,packages:de,mdFiles:Le,repoFileContents:at})}catch{}finally{re(!1),s?.(!1)}},[n,i,d,j,r,s]);v.useEffect(()=>{(async()=>{L(!0),s?.(!0);try{const he=await n("fs/repoStatus",{path:i});h(he.branch),y(he.branches||[he.branch]),b(he.head_hash),R(he.is_dirty),P(he.remote_url),_(he.commits||[{hash:he.head_hash,message:"HEAD"}]),await V(he.head_hash,{branch:he.branch,isDirty:he.is_dirty})}catch{}finally{L(!1),s?.(!1)}})()},[i]),v.useEffect(()=>{r({branch:d,commit:p,isDirty:j,packages:le,mdFiles:I,repoFileContents:[]})},[d,p,j]);const fe=v.useCallback(async he=>{h(he);try{const wt=await n("fs/repoStatus",{path:i});b(wt.head_hash),await V(wt.head_hash)}catch{}},[i,n,V]),E=d&&d!=="main"&&d!=="master",B=i.split("/").pop()||i;if(M)return f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col items-center justify-center",children:[f.jsx(Gt,{size:20,className:"animate-spin text-c4a-accent"}),Q&&f.jsx("p",{className:"mt-3 font-mono text-xs text-c4a-accent",children:c("sources.import.loading_repo_slow")})]});const te=m.map(he=>({value:he,label:he})),se=x.map(he=>({value:he.hash,label:`${he.hash.slice(0,7)} ${he.message!=="HEAD"?`— ${he.message.slice(0,50)}`:""}`.trim()})),Se=x.length<=1,Ne=J==="packages"?le:I,ze=Ne.slice(0,pe),lt=pe<Ne.length;return f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[f.jsxs("div",{className:"shrink-0",children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1",children:[f.jsx("span",{className:"flex items-center gap-1.5",children:ne?f.jsxs("a",{href:ne.repoUrl,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 font-mono text-sm font-bold text-c4a-accent hover:underline",children:[f.jsx(td,{size:14,className:"shrink-0"}),B]}):f.jsx("span",{className:"font-mono text-sm font-bold text-c4a-accent",children:B})}),f.jsx("span",{className:"hidden font-mono text-xs text-c4a-text-muted sm:inline",children:i}),f.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[f.jsx(Ng,{value:d,options:te,onChange:fe,icon:f.jsx(lo,{size:12})}),Se?f.jsxs("span",{className:"hidden items-center gap-1.5 rounded border border-c4a-border-default bg-c4a-bg-surface px-2 py-1 font-mono text-xs text-c4a-text-muted sm:flex",children:[f.jsx(ed,{size:12}),p.slice(0,7)]}):f.jsx("div",{className:"hidden sm:block",children:f.jsx(Ng,{value:p,options:se,onChange:he=>{b(he),V(he)},icon:f.jsx(ed,{size:12})})})]})]}),(E||j)&&f.jsxs("div",{className:"mt-2 flex flex-wrap gap-x-4 gap-y-1",children:[E&&f.jsxs("p",{className:"flex items-center gap-1 text-xs text-c4a-info",children:[f.jsx(fS,{size:12}),c("sources.import.branch_warning",{branch:d})]}),j&&f.jsxs("p",{className:"flex items-center gap-1 text-xs text-c4a-warning",children:[f.jsx(md,{size:12}),c("sources.import.uncommitted_warning")]})]})]}),f.jsxs("div",{className:"mt-4 flex min-h-0 flex-1 flex-col rounded border border-c4a-border-default bg-c4a-bg-surface",children:[f.jsxs("div",{className:"flex shrink-0 items-center justify-between px-4 py-3",children:[f.jsx("p",{className:"hidden font-mono text-xs text-c4a-text-primary sm:block",children:K?f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(Gt,{size:12,className:"animate-spin text-c4a-text-muted"}),f.jsx("span",{className:"text-c4a-text-muted",children:"Analyzing repository..."})]}):le.length>0?c("sources.import.recognized",{packages:le.length,docs:I.length}):c("sources.import.no_packages")}),!K&&(le.length>0||I.length>0)&&f.jsxs("div",{className:"flex rounded border border-c4a-border-subtle",children:[f.jsxs("button",{onClick:()=>ee("packages"),className:`flex items-center gap-1 px-2.5 py-1 text-xs transition-colors ${J==="packages"?"bg-c4a-accent/10 text-c4a-accent":"text-c4a-text-muted hover:text-c4a-text-secondary"}`,children:[f.jsx(di,{size:13}),f.jsx("span",{className:"font-mono",children:le.length})]}),f.jsxs("button",{onClick:()=>ee("docs"),className:`flex items-center gap-1 border-l border-c4a-border-subtle px-2.5 py-1 text-xs transition-colors ${J==="docs"?"bg-c4a-accent/10 text-c4a-accent":"text-c4a-text-muted hover:text-c4a-text-secondary"}`,children:[f.jsx(xl,{size:13}),f.jsx("span",{className:"font-mono",children:I.length})]})]})]}),f.jsx("hr",{className:"border-c4a-border-subtle"}),f.jsx("div",{ref:ue,className:"min-h-0 flex-1 c4a-scrollbar overflow-y-auto px-2 py-1",children:K?f.jsx("div",{className:"flex items-center justify-center py-8",children:f.jsx(Gt,{size:14,className:"animate-spin text-c4a-text-muted"})}):Ne.length===0?f.jsx("p",{className:"py-8 text-center text-xs text-c4a-text-muted",children:J==="packages"?c("sources.import.no_packages"):"—"}):f.jsxs(f.Fragment,{children:[J==="packages"?ze.map(he=>f.jsxs("div",{className:"flex items-center gap-2 rounded pl-2 pr-4 py-1 text-xs",children:[f.jsx(di,{size:14,className:"shrink-0 text-c4a-accent"}),f.jsx("span",{className:"text-c4a-text-primary",children:he.name}),f.jsx("span",{className:"hidden truncate text-c4a-text-muted sm:inline",children:he.path}),he.isRoot&&f.jsx("span",{className:"rounded bg-c4a-bg-active px-1 py-0.5 font-mono text-[10px] text-c4a-text-muted",children:"root"})]},he.path)):ze.map(he=>f.jsxs("div",{className:"flex items-center gap-2 rounded pl-2 pr-4 py-1 text-xs",children:[f.jsx(xl,{size:14,className:"shrink-0 text-c4a-text-secondary"}),f.jsx("span",{className:"truncate text-c4a-text-primary",children:he})]},he)),lt&&f.jsx("div",{ref:W,className:"h-4"})]})})]})]})}function J4({importState:n,libraryName:i,importing:r}){const{t:s}=Ce(),c=n.repoName||n.repoPath.split("/").pop()||"";return f.jsxs("div",{className:"rounded border border-c4a-border-default bg-c4a-bg-surface p-6",children:[f.jsx("p",{className:"text-sm text-c4a-text-secondary",children:s("sources.import.confirm_heading",{name:i})}),f.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-x-3 gap-y-1",children:[f.jsx("span",{className:"font-mono text-sm font-bold text-c4a-accent",children:c}),f.jsx("span",{className:"font-mono text-xs text-c4a-text-muted",children:n.repoPath})]}),f.jsxs("div",{className:"mt-4 grid grid-cols-2 gap-3 sm:grid-cols-4",children:[f.jsx(Fs,{icon:f.jsx(lo,{size:14}),label:s("sources.import.branch"),value:n.branch}),f.jsx(Fs,{icon:f.jsx(ed,{size:14}),label:s("sources.import.commit"),value:n.commit.slice(0,7)}),f.jsx(Fs,{icon:f.jsx(di,{size:14}),label:s("sources.import.packages"),value:String(n.packages.length),tooltip:s("sources.import.dir_code_packages_tip")}),f.jsx(Fs,{icon:f.jsx(xl,{size:14}),label:s("sources.import.documents"),value:String(n.mdFiles.length),tooltip:s("sources.import.dir_doc_files_tip")})]}),r&&f.jsxs("div",{className:"mt-4 flex items-center justify-center gap-2 rounded bg-c4a-bg-base p-3",children:[f.jsx(Gt,{size:14,className:"animate-spin text-c4a-accent"}),f.jsx("p",{className:"font-mono text-xs text-c4a-accent",children:s("sources.import.importing")})]})]})}function Fs({icon:n,label:i,value:r,tooltip:s}){return f.jsxs("div",{className:"group/stat relative rounded border border-c4a-border-subtle bg-c4a-bg-base p-3",children:[f.jsxs("div",{className:"flex items-center gap-1.5 text-c4a-text-muted",children:[n,f.jsx("span",{className:"font-mono text-[10px] uppercase",children:i})]}),f.jsx("p",{className:"mt-1 truncate font-mono text-sm font-bold text-c4a-text-primary",title:r,children:r}),s&&f.jsx("div",{className:"pointer-events-none absolute bottom-full left-0 z-30 mb-1.5 hidden w-max max-w-[260px] rounded border border-c4a-border-default bg-c4a-bg-elevated px-2.5 py-1.5 text-[11px] leading-relaxed text-c4a-text-secondary shadow-c4a-lg group-hover/stat:block",children:s})]})}function W4(){const{t:n}=Ce(),i=Qn(),{libId:r}=co(),c=Bt(hi(Er)).find(N=>N.id===r),d=go(N=>N.createSource),[h,m]=v.useState(1),[y,p]=v.useState(!1),[b,x]=v.useState(!1),[_,j]=v.useState({repoPath:"",repoName:"",branch:"",branches:[],commit:"",commits:[],isDirty:!1,repoFiles:[],packages:[],mdFiles:[],repoFileContents:[]}),R=c?.is_online??!1,[M,L]=v.useState([]);v.useEffect(()=>{if(!r)return;let N=!1;return(async()=>{try{const X=await Ht.get("/sources",{library_id:r,limit:"500"});if(N)return;const F=X.items.map(P=>{const ne=P.metadata;return typeof ne?.local_path=="string"?ne.local_path:null}).filter(P=>P!==null);L(F)}catch{}})(),()=>{N=!0}},[r]);const Q=v.useMemo(()=>{const N=c?.config;return!N||!Array.isArray(N.allowed_paths)?[]:N.allowed_paths},[c]),G=v.useCallback(async(N,X)=>{if(!r)throw new Error("No library");const F=await Ht.post(`/libraries/${r}/rpc`,{method:N,params:X});if(F.error){const P=F.error;throw new Error(P.message??JSON.stringify(F.error))}return F.result??F},[r]),K=v.useCallback((N,X)=>{j(F=>({...F,repoPath:N,repoName:X}))},[]),re=v.useCallback(N=>{j(X=>({...X,...N}))},[]),le=v.useCallback(async()=>{if(r){p(!0);try{const N=await d({library_id:r,repo_name:_.repoName,repo_root_path:_.repoPath,repo_branch:_.branch,repo_commit:_.commit,repo_files:_.repoFiles.map(F=>F.path),repo_file_contents:_.repoFileContents}),X=Array.isArray(N)?N[0]:N;X?.id?i(`/studio/sources/${r}?rootId=${X.id}`):i(`/studio/sources/${r}`)}catch{p(!1)}}},[r,_,d,i]),ce=v.useMemo(()=>h===1?!!_.repoPath:h===2?!!_.commit:!0,[h,_]),I=v.useMemo(()=>c?[{label:c.id===mo?n("sources.library.default_cloud_name"):c.name,to:`/studio/sources/${c.id}`},{label:n("sources.import.title")}]:[],[c,n]);return c?f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col p-4 md:p-6",children:[f.jsx("div",{className:"shrink-0",children:f.jsx(wr,{segments:I})}),f.jsxs("div",{className:"mt-3 flex shrink-0 items-center gap-2 font-mono text-sm sm:mt-6 md:gap-3",children:[f.jsx($u,{active:h>=1,current:h===1}),f.jsx("span",{className:h===1?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.step.select")}),f.jsx(Eg,{}),f.jsx($u,{active:h>=2,current:h===2}),f.jsx("span",{className:h===2?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.step.version")}),f.jsx(Eg,{}),f.jsx($u,{active:h>=3,current:h===3}),f.jsx("span",{className:h===3?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.step.confirm")})]}),f.jsx("div",{className:"mt-3 flex min-h-0 flex-1 flex-col sm:mt-6",children:R?f.jsxs(f.Fragment,{children:[h===1&&f.jsx(X4,{rpc:G,selectedPath:_.repoPath,onSelect:K,allowedPaths:Q,importedPaths:M}),h===2&&f.jsx(F4,{rpc:G,repoPath:_.repoPath,onReady:re,onBusyChange:x}),h===3&&f.jsx(J4,{importState:_,libraryName:c.name,importing:y})]}):f.jsx(P4,{libraryName:c.name})}),R&&f.jsxs("div",{className:"mt-3 flex shrink-0 items-center gap-4 sm:mt-6",children:[f.jsx("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-c4a-text-muted line-clamp-1 sm:line-clamp-none",title:n("sources.safety.notice.repo"),onClick:N=>N.currentTarget.classList.toggle("line-clamp-1"),children:n("sources.safety.notice.repo")}),f.jsxs("div",{className:"flex shrink-0 gap-2",children:[h>1&&f.jsx("button",{onClick:()=>m(N=>N-1),disabled:y||b,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?f.jsx("button",{onClick:()=>m(N=>N+1),disabled:!ce||b,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")}):f.jsxs("button",{onClick:le,disabled:y||b,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&&f.jsx(Gt,{size:12,className:"animate-spin"}),n(y?"sources.import.importing":"sources.import.step.confirm")]})]})]})]}):f.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:f.jsx("p",{className:"text-sm text-c4a-text-muted",children:n("common.loading")})})}function $u({active:n,current:i}){return f.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 Eg(){return f.jsx("span",{className:"h-px flex-1 bg-c4a-border-default"})}function P4({libraryName:n}){const{t:i}=Ce();return f.jsxs("div",{className:"rounded border border-c4a-warning/30 bg-c4a-bg-surface p-6 text-center",children:[f.jsx("p",{className:"text-sm text-c4a-warning",children:i("sources.import.daemon_offline",{name:n})}),f.jsx(Pt,{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 wg=(n,i)=>{let r=0,s=0,c=0;const d=[],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;d.push(p)}};return h(n),{files:r,dirs:s,gitRepos:c,mdFiles:d}};function I4({rpc:n,selectedPath:i,onSelect:r,allowedPaths:s,importedPaths:c}){const{t:d}=Ce(),h=!!s&&s.length>0,m=h&&s.length===1&&s[0]==="*",[y,p]=v.useState(h),[b,x]=v.useState(h&&!m?"":"/"),[_,j]=v.useState([]),[R,M]=v.useState(!1),[L,Q]=v.useState(null),G=v.useMemo(()=>new Set(c??[]),[c]),[K,re]=v.useState(null);v.useEffect(()=>{if(h&&!m)return;let J=!1;return(async()=>{try{const ee=await n("fs/homeDir",{});J||re(ee.home_dir)}catch{J||re("/")}})(),()=>{J=!0}},[h,m,n]);const[le,ce]=v.useState(!1),I=v.useCallback(async J=>{M(!0),Q(null);try{const ee=await n("fs/listTree",{path:J,depth:1});j(ee.entries||[]),x(J),p(!1)}catch(ee){const pe=ee instanceof Error?ee.message:String(ee);Q(pe)}finally{M(!1)}},[n]);v.useEffect(()=>{h&&!m||K!==null&&I(K)},[K]);const N=v.useCallback(J=>{if(J.type!=="directory"||G.has(J.path))return;const ee=wg(J.children||[],J.path);r(J.path,J.name,ee),I(J.path)},[r,I,G]),X=v.useCallback(()=>{if(h&&!m&&s.some(pe=>pe===b)){p(!0),x(""),j([]),Q(null);return}const J=b.split("/").slice(0,-1).join("/")||"/";I(J)},[b,I,h,m,s]);v.useEffect(()=>{if(b&&!y&&_.length>=0&&!R){const J=b.split("/").pop()||b,ee=wg(_,b);r(b,J,ee)}},[b,y,_,R]);const F=v.useMemo(()=>i?i.split("/").pop()||i:"",[i]),P=v.useMemo(()=>_.filter(J=>J.type==="directory").sort((J,ee)=>J.is_git_repo&&!ee.is_git_repo?-1:!J.is_git_repo&&ee.is_git_repo?1:J.name.localeCompare(ee.name)),[_]),ne=v.useMemo(()=>_.filter(J=>J.type==="file").sort((J,ee)=>J.name.localeCompare(ee.name)),[_]);return f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col rounded border border-c4a-border-default bg-c4a-bg-surface p-4",children:[f.jsxs("div",{className:"flex items-center justify-between gap-4",children:[y?f.jsxs("p",{className:"flex items-center gap-1.5 font-mono text-xs text-c4a-text-muted",children:[f.jsx("span",{children:d("sources.import.allowed_dirs")}),f.jsx(My,{})]}):f.jsx("p",{className:"min-w-0 truncate font-mono text-xs text-c4a-text-muted",children:b}),i?f.jsxs("p",{className:"flex shrink-0 items-center gap-2 font-mono text-xs text-c4a-accent",children:[f.jsx(_a,{size:12}),f.jsx("span",{children:F})]}):m&&y?f.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:d("sources.import.wildcard_goto")}):null]}),f.jsx("hr",{className:"my-3 border-c4a-border-subtle"}),y?m?f.jsx("div",{className:"min-h-0 flex-1 c4a-scrollbar overflow-y-auto",children:K&&f.jsxs("button",{onClick:()=>I(K),className:"flex w-full items-center gap-2 rounded pl-2 pr-4 py-1.5 text-left text-sm text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:[f.jsx(_a,{size:14,className:"shrink-0"}),f.jsxs("span",{className:"truncate",children:[K,f.jsxs("span",{className:"ml-1.5 text-c4a-text-muted",children:["(",d("sources.import.wildcard_home"),")"]})]}),f.jsx(hn,{size:12,className:"shrink-0 text-c4a-text-muted"})]})}):f.jsx("div",{className:"min-h-0 flex-1 c4a-scrollbar overflow-y-auto",children:s.map(J=>f.jsxs("button",{onClick:()=>I(J),className:"flex w-full items-center gap-2 rounded pl-2 pr-4 py-1.5 text-left text-sm text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:[f.jsx(_a,{size:14,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:J}),f.jsx(hn,{size:12,className:"shrink-0 text-c4a-text-muted"})]},J))}):L&&!R?f.jsx("p",{className:"py-4 text-xs text-c4a-error",children:L}):f.jsxs("div",{className:"relative min-h-[5rem] min-h-0 flex-1 c4a-scrollbar overflow-y-auto",children:[R&&f.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-c4a-bg-surface/60",children:f.jsx(Gt,{size:14,className:"animate-spin text-c4a-text-muted"})}),b!=="/"&&f.jsxs("button",{onClick:X,disabled:R,className:"flex w-full items-center gap-2 rounded pl-2 pr-4 py-1.5 text-left text-sm text-c4a-text-secondary hover:bg-c4a-bg-hover disabled:pointer-events-none",children:[f.jsx(_a,{size:14}),f.jsx("span",{children:".."})]}),P.map(J=>{const ee=G.has(J.path),pe=J.is_git_repo?pd:_a;return f.jsxs("button",{onClick:()=>N(J),disabled:ee||R,className:`flex w-full items-center gap-2 rounded pl-2 pr-4 py-1.5 text-left text-sm transition-colors ${ee?"cursor-not-allowed text-c4a-accent/60":i===J.path?"bg-c4a-accent/10 text-c4a-accent":"text-c4a-text-secondary hover:bg-c4a-bg-hover"}`,children:[f.jsx(pe,{size:14,className:"shrink-0"}),f.jsx("span",{className:"flex-1 truncate",children:J.name}),ee&&f.jsx("span",{className:"rounded bg-c4a-accent/10 px-1.5 py-0.5 font-mono text-[10px] text-c4a-accent/60",children:d("sources.import.already_imported")}),f.jsx(hn,{size:12,className:"shrink-0 text-c4a-text-muted"})]},J.path)}),ne.map(J=>f.jsxs("div",{className:"flex w-full items-center gap-2 pl-2 pr-4 py-1.5 text-sm text-c4a-text-muted",children:[f.jsx(by,{size:14,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:J.name})]},J.path)),_.length===0&&!R&&f.jsx("p",{className:"py-4 text-center text-xs text-c4a-text-muted",children:d("sources.import.no_entries")})]}),f.jsx(Dy,{open:le,onClose:()=>ce(!1),rpc:n,onNavigate:I,defaultPath:K??void 0})]})}const e_=new Set(["package.json","pyproject.toml","setup.py","go.mod","cargo.toml","pom.xml","build.gradle"]),t_=n=>{let i=0,r=0,s=0,c=0,d=0;const h=new Set;for(const m of n)if(m.type==="directory")r++,m.is_git_repo&&d++;else{i++,m.path.toLowerCase().endsWith(".md")&&c++;const p=m.path.split("/").pop();if(p&&e_.has(p.toLowerCase())){const b=m.path.split("/").slice(0,-1).join("/");n.some(_=>_.type==="directory"&&_.is_git_repo&&(b===_.path||b.startsWith(`${_.path}/`)))||h.add(b)}}return s=h.size,{totalFiles:i,totalDirs:r,codePackages:s,docFiles:c,gitRepos:d}};function a_({dirPath:n,rpc:i,importing:r,onScanComplete:s,onBusyChange:c}){const{t:d}=Ce(),[h,m]=v.useState(!1),[y,p]=v.useState(null),[b,x]=v.useState(null),_=v.useCallback(async()=>{m(!0),c?.(!0),p(null),x(null);try{const j=await i("fs/dirScan",{path:n}),R=j.entries||[],M=j.manifests||[],L=t_(R);x(L),s(R,L,M)}catch(j){const R=j instanceof Error?j.message:String(j);p(R)}finally{m(!1),c?.(!1)}},[n,i,s,c]);return v.useEffect(()=>{_()},[_]),f.jsxs("div",{className:"rounded border border-c4a-border-default bg-c4a-bg-surface p-6",children:[f.jsx("p",{className:"font-mono text-xs text-c4a-text-muted",children:n}),f.jsx("div",{className:"mt-3 border-t border-c4a-border-subtle"}),h&&f.jsxs("div",{className:"mt-6 flex items-center justify-center gap-2 rounded bg-c4a-bg-base p-4",children:[f.jsx(Gt,{size:14,className:"animate-spin text-c4a-accent"}),f.jsx("p",{className:"font-mono text-xs text-c4a-accent",children:d("sources.import.dir_scanning")})]}),y&&f.jsxs("div",{className:"mt-6",children:[f.jsxs("p",{className:"flex items-start gap-2 text-xs text-c4a-error",children:[f.jsx(md,{size:14,className:"mt-0.5 shrink-0"}),d("sources.import.dir_scan_error")]}),f.jsx("p",{className:"mt-1 text-xs text-c4a-text-muted",children:y}),f.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:[f.jsx(zS,{size:12}),d("sources.import.dir_scan_retry")]})]}),b&&!h&&!y&&f.jsxs("div",{className:"mt-6 space-y-3",children:[f.jsxs("p",{className:"font-mono text-sm uppercase text-c4a-accent",children:[d("sources.import.dir_scan_complete"),"!"]}),f.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-3 lg:grid-cols-5",children:[f.jsx(cr,{icon:f.jsx(xl,{size:14}),label:d("sources.import.dir_doc_files"),value:b.docFiles,tooltip:d("sources.import.dir_doc_files_tip")}),f.jsx(cr,{icon:f.jsx(di,{size:14}),label:d("sources.import.dir_code_packages"),value:b.codePackages,tooltip:d("sources.import.dir_code_packages_tip")}),b.gitRepos>0&&f.jsx(cr,{icon:f.jsx(pd,{size:14}),label:d("sources.import.dir_git_repos"),value:b.gitRepos}),f.jsx(cr,{icon:f.jsx(_a,{size:14}),label:d("sources.import.dir_total_dirs"),value:b.totalDirs}),f.jsx(cr,{icon:f.jsx(P2,{size:14}),label:d("sources.import.dir_total_files"),value:b.totalFiles})]}),b.gitRepos>0&&f.jsx("p",{className:"text-xs text-c4a-warning",children:d("sources.import.dir_git_skip_hint",{count:b.gitRepos})})]}),r&&f.jsxs("div",{className:"mt-4 flex items-center justify-center gap-2 rounded bg-c4a-bg-base p-3",children:[f.jsx(Gt,{size:14,className:"animate-spin text-c4a-accent"}),f.jsx("p",{className:"font-mono text-xs text-c4a-accent",children:d("sources.import.importing")})]})]})}function cr({icon:n,label:i,value:r,tooltip:s}){return f.jsxs("div",{className:"group/stat relative rounded border border-c4a-border-subtle bg-c4a-bg-base p-3",children:[f.jsxs("div",{className:"flex items-center gap-1.5 text-c4a-text-muted",children:[n,f.jsx("span",{className:"font-mono text-[10px] uppercase",children:i})]}),f.jsx("p",{className:"mt-1 font-mono text-lg font-bold text-c4a-text-primary",children:r}),s&&f.jsx("div",{className:"pointer-events-none absolute bottom-full left-0 z-30 mb-1.5 hidden w-max max-w-[260px] rounded border border-c4a-border-default bg-c4a-bg-elevated px-2.5 py-1.5 text-[11px] leading-relaxed text-c4a-text-secondary shadow-c4a-lg group-hover/stat:block",children:s})]})}function n_(){const{t:n}=Ce(),i=Qn(),{libId:r}=co(),c=Bt(hi(Er)).find(N=>N.id===r),d=go(N=>N.createSource),[h,m]=v.useState(1),[y,p]=v.useState(!1),[b,x]=v.useState(!1),[_,j]=v.useState({dirPath:"",dirName:"",fileCount:0,subDirCount:0,gitRepoCount:0,mdFiles:[],scanEntries:[],scanStats:null,manifests:[]}),R=c?.is_online??!1,[M,L]=v.useState([]);v.useEffect(()=>{if(!r)return;let N=!1;return(async()=>{try{const X=await Ht.get("/sources",{library_id:r,limit:"500"});if(N)return;const F=X.items.map(P=>{const ne=P.metadata;return typeof ne?.local_path=="string"?ne.local_path:null}).filter(P=>P!==null);L(F)}catch{}})(),()=>{N=!0}},[r]);const Q=v.useMemo(()=>{const N=c?.config;return!N||!Array.isArray(N.allowed_paths)?[]:N.allowed_paths},[c]),G=v.useCallback(async(N,X)=>{if(!r)throw new Error("No library");const F=await Ht.post(`/libraries/${r}/rpc`,{method:N,params:X});if(F.error){const P=F.error;throw new Error(P.message??JSON.stringify(F.error))}return F.result??F},[r]),K=v.useCallback((N,X,F)=>{j(P=>({...P,dirPath:N,dirName:X,fileCount:F.files,subDirCount:F.dirs,gitRepoCount:F.gitRepos,mdFiles:F.mdFiles}))},[]),re=v.useCallback((N,X,F)=>{j(P=>({...P,scanEntries:N,scanStats:X,manifests:F}))},[]),le=v.useCallback(async()=>{if(r){p(!0);try{const N=await d({library_id:r,dir_files:_.scanEntries,dir_name:_.dirName,dir_path:_.dirPath,dir_file_contents:_.manifests}),X=Array.isArray(N)?N[0]:N;X?.id?i(`/studio/sources/${r}?rootId=${X.id}`):i(`/studio/sources/${r}`)}catch{p(!1)}}},[r,_,d,i]),ce=v.useMemo(()=>h===1?!!_.dirPath:h===2?_.scanEntries.length>0:!0,[h,_]),I=v.useMemo(()=>c?[{label:c.id===mo?n("sources.library.default_cloud_name"):c.name,to:`/studio/sources/${c.id}`},{label:n("sources.import.dir_title")}]:[],[c,n]);return c?f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col p-4 md:p-6",children:[f.jsx("div",{className:"shrink-0",children:f.jsx(wr,{segments:I})}),f.jsxs("div",{className:"mt-3 flex shrink-0 items-center gap-2 font-mono text-sm sm:mt-6 md:gap-3",children:[f.jsx(Cg,{active:h>=1,current:h===1}),f.jsx("span",{className:h===1?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.dir_step.select")}),f.jsx(l_,{}),f.jsx(Cg,{active:h>=2,current:h===2}),f.jsx("span",{className:h===2?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.dir_step.confirm")})]}),f.jsx("div",{className:"mt-3 flex min-h-0 flex-1 flex-col sm:mt-6",children:R?f.jsxs(f.Fragment,{children:[h===1&&f.jsx(I4,{rpc:G,selectedPath:_.dirPath,onSelect:K,allowedPaths:Q,importedPaths:M}),h===2&&f.jsx(a_,{dirPath:_.dirPath,rpc:G,importing:y,onScanComplete:re,onBusyChange:x})]}):f.jsx(i_,{libraryName:c.name})}),R&&f.jsxs("div",{className:"mt-3 flex shrink-0 items-center gap-4 sm:mt-6",children:[f.jsx("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-c4a-text-muted line-clamp-1 sm:line-clamp-none",title:n("sources.safety.notice.dir"),onClick:N=>N.currentTarget.classList.toggle("line-clamp-1"),children:n("sources.safety.notice.dir")}),f.jsxs("div",{className:"flex shrink-0 gap-2",children:[h>1&&f.jsx("button",{onClick:()=>m(N=>N-1),disabled:y||b,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?f.jsx("button",{onClick:()=>m(N=>N+1),disabled:!ce||b,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")}):f.jsxs("button",{onClick:le,disabled:y||b||!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&&f.jsx(Gt,{size:12,className:"animate-spin"}),n(y?"sources.import.importing":"sources.import.dir_step.confirm")]})]})]})]}):f.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:f.jsx("p",{className:"text-sm text-c4a-text-muted",children:n("common.loading")})})}function Cg({active:n,current:i}){return f.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 l_(){return f.jsx("span",{className:"h-px flex-1 bg-c4a-border-default"})}function i_({libraryName:n}){const{t:i}=Ce();return f.jsxs("div",{className:"rounded border border-c4a-warning/30 bg-c4a-bg-surface p-6 text-center",children:[f.jsx("p",{className:"text-sm text-c4a-warning",children:i("sources.import.daemon_offline",{name:n})}),f.jsx(Pt,{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 r_(){const{t:n}=Ce(),i=Qn(),r=Bt(_=>_.createLibrary),[s,c]=v.useState("waiting"),[d,h]=v.useState(null),[m,y]=v.useState(""),[p,b]=v.useState(!1);v.useEffect(()=>$a.on("ws:daemon:connected",j=>{const R=j;h(R),y(R.machine_id),c(R.needs_registration?"new_client":"reconnected")}),[]);const x=v.useCallback(async()=>{if(d){b(!0);try{const _=await r({type:"daemon",name:m||d.machine_id,config:{machine_id:d.machine_id,os:d.os||"",daemon_version:d.daemon_version||""}});i(`/studio/sources/${_.id}`)}catch{b(!1)}}},[d,m,r,i]);return f.jsxs("div",{className:"flex flex-1 flex-col p-4 md:p-6",children:[f.jsx(wr,{segments:[{label:n("sources.add_client.title")}]}),f.jsx("p",{className:"mt-4 text-sm text-c4a-text-secondary",children:n("sources.add_client.description")}),f.jsx("div",{className:"mt-6 rounded border border-c4a-border-default bg-c4a-bg-surface p-5",children:f.jsxs("ol",{className:"space-y-4 text-sm text-c4a-text-secondary",children:[f.jsxs("li",{children:[f.jsxs("span",{className:"font-mono text-xs font-bold text-c4a-text-primary",children:["1. ",n("sources.add_client.step1")]}),f.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"})]}),f.jsxs("li",{children:[f.jsxs("span",{className:"font-mono text-xs font-bold text-c4a-text-primary",children:["2. ",n("sources.add_client.step2")]}),f.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 ./`})]}),f.jsxs("li",{children:[f.jsxs("span",{className:"font-mono text-xs font-bold text-c4a-text-primary",children:["3. ",n("sources.add_client.step3")]}),f.jsx("p",{className:"mt-1 text-xs text-c4a-text-muted",children:n("sources.add_client.step3_desc")})]})]})}),f.jsxs("div",{className:"mt-6 rounded border border-c4a-border-default bg-c4a-bg-surface p-5",children:[s==="waiting"&&f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(Gt,{size:16,className:"animate-spin text-c4a-warning"}),f.jsx("span",{className:"text-sm text-c4a-warning",children:n("sources.add_client.waiting")})]}),s==="new_client"&&d&&f.jsxs("div",{className:"space-y-4",children:[f.jsx("h3",{className:"font-mono text-sm font-bold text-c4a-text-primary",children:n("sources.add_client.detected")}),f.jsxs("div",{className:"space-y-2 text-sm",children:[f.jsx(Ku,{label:n("sources.add_client.machine_name"),value:d.machine_id}),d.os&&f.jsx(Ku,{label:n("sources.add_client.os"),value:d.os}),d.daemon_version&&f.jsx(Ku,{label:n("sources.add_client.daemon_version"),value:d.daemon_version})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"w-32 font-mono text-xs text-c4a-text-muted",children:n("sources.add_client.client_name")}),f.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"})]}),f.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[f.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")}),f.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&&f.jsx(Gt,{size:12,className:"animate-spin"}),n("sources.add_client.confirm")]})]})]}),s==="reconnected"&&d&&f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(ui,{size:16,className:"text-c4a-success"}),f.jsx("span",{className:"text-sm text-c4a-text-primary",children:n("sources.add_client.reconnected",{name:d.machine_id})})]}),d.lib_id&&f.jsx(Pt,{to:`/studio/sources/${d.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:d.machine_id})})]})]})]})}function Ku({label:n,value:i}){return f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"w-32 font-mono text-xs text-c4a-text-muted",children:n}),f.jsx("span",{className:"font-mono text-xs text-c4a-text-primary",children:i})]})}function s_(){const{t:n}=Ce(),{sourceUuid:i}=co(),[r]=yy(),s=r.get("path")||"",{currentRoot:c,loading:d,fetchRootSource:h}=go(),m=Bt(hi(Er)),[y,p]=v.useState("original");v.useEffect(()=>{i&&h(i)},[i,h]);const b=v.useMemo(()=>!c||!s?null:po(c.tree,s),[c,s]),x=m.find(K=>K.id===c?.library_id),_=b?.metadata,j=_?Object.fromEntries(Object.entries(_).map(([K,re])=>[K,String(re??"")])):null,R=b?.source_type==="code",M=b?.name??c?.name??"",L=b?.source_type??null,Q=v.useMemo(()=>{if(!c||!x)return[];const K=[{label:x.id===mo?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 re=Oy(c.tree,s);for(let le=0;le<re.length-1;le++){const ce=re[le];K.push({label:ce.name,to:`/studio/sources/${x.id}?rootId=${c.id}&path=${encodeURIComponent(ce.path)}`})}re.length>0&&K.push({label:re[re.length-1].name})}return K},[c,x,s,n]),G=[{key:"original",label:n(R?"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 d||!c||!b?f.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:f.jsx("p",{className:"text-sm text-c4a-text-muted",children:n("common.loading")})}):f.jsxs("div",{className:"flex flex-1 flex-col p-4 md:p-6",children:[f.jsx(wr,{segments:Q}),f.jsxs("div",{className:"mt-4 flex items-center gap-2",children:[R?f.jsx(di,{size:20,className:"text-c4a-accent"}):f.jsx(xl,{size:20,className:"text-c4a-text-secondary"}),f.jsx("h1",{className:"font-mono text-xl font-bold text-c4a-text-primary",children:M})]}),f.jsxs("div",{className:"mt-2 flex flex-wrap gap-4 text-xs text-c4a-text-muted",children:[f.jsxs("span",{children:[n("sources.detail.type"),":"," ",f.jsx("span",{className:"text-c4a-text-secondary",children:n(L==="code"?"sources.type.code":"sources.type.doc")})]}),R&&j?.relative_path&&f.jsxs("span",{children:[n("sources.detail.path"),":"," ",f.jsx("span",{className:"font-mono text-c4a-text-secondary",children:j.relative_path})]}),!R&&f.jsxs("span",{children:[n("sources.detail.origin"),":"," ",f.jsx("span",{className:"text-c4a-text-secondary",children:x?.type==="daemon"?n("sources.detail.origin.local"):n("sources.detail.origin.upload")})]}),f.jsxs("span",{children:[n("sources.detail.status"),":"," ",f.jsx("span",{className:"text-c4a-text-secondary",children:n(`sources.status.${b.index_status??"none"}`)})]})]}),R&&j&&f.jsx("div",{className:"mt-4 rounded border border-c4a-border-subtle bg-c4a-bg-surface p-4",children:f.jsxs("div",{className:"grid grid-cols-2 gap-x-8 gap-y-2 text-xs md:grid-cols-4",children:[j.repo_name&&f.jsx(Js,{label:n("sources.detail.repo"),value:j.repo_name}),j.pinned_branch&&f.jsx(Js,{label:n("sources.detail.branch"),value:j.pinned_branch}),j.pinned_hash&&f.jsx(Js,{label:n("sources.detail.commit"),value:j.pinned_hash.slice(0,7)}),j.tech_stack&&f.jsx(Js,{label:n("sources.detail.tech_stack"),value:j.tech_stack})]})}),f.jsx("div",{className:"mt-6 flex border-b border-c4a-border-subtle",children:G.map(K=>f.jsx("button",{onClick:()=>p(K.key),className:`border-b-2 px-4 py-2 font-mono text-xs uppercase transition-colors ${y===K.key?"border-c4a-accent text-c4a-accent":"border-transparent text-c4a-text-muted hover:text-c4a-text-secondary"}`,children:K.label},K.key))}),f.jsxs("div",{className:"mt-4 flex-1",children:[y==="original"&&f.jsx(o_,{node:b,isCode:R}),y==="digest"&&f.jsx(Rg,{message:n("sources.detail.digest_placeholder")}),y==="modeling"&&f.jsx(Rg,{message:n("sources.detail.modeling_placeholder")})]})]})}function Js({label:n,value:i}){return f.jsxs("div",{children:[f.jsx("span",{className:"text-c4a-text-muted",children:n}),f.jsx("p",{className:"mt-0.5 font-mono text-c4a-text-primary",children:i})]})}function o_({node:n,isCode:i}){const{t:r}=Ce(),s=n.metadata;return i?f.jsxs("div",{className:"space-y-4 text-sm text-c4a-text-secondary",children:[!!s?.description&&f.jsx("p",{children:String(s.description)}),!!s?.dependencies&&f.jsxs("div",{children:[f.jsx("h4",{className:"font-mono text-xs font-bold uppercase text-c4a-text-primary",children:r("sources.detail.dependencies")}),f.jsx("div",{className:"mt-2 rounded bg-c4a-bg-surface p-3 font-mono text-xs",children:Object.entries(s.dependencies).map(([c,d])=>f.jsxs("div",{className:"flex justify-between py-0.5",children:[f.jsx("span",{className:"text-c4a-text-primary",children:c}),f.jsx("span",{className:"text-c4a-text-muted",children:d})]},c))})]}),!s?.description&&!s?.dependencies&&f.jsx("p",{className:"text-c4a-text-muted",children:r("sources.detail.original_code_placeholder")})]}):f.jsx("div",{className:"prose prose-invert max-w-none text-sm text-c4a-text-secondary",children:f.jsx("p",{className:"text-c4a-text-muted",children:r("sources.detail.original_doc_placeholder")})})}function Rg({message:n}){return f.jsx("div",{className:"flex items-center justify-center rounded border border-dashed border-c4a-border-subtle p-12",children:f.jsx("p",{className:"text-center text-sm text-c4a-text-muted",children:n})})}const c_="lib_cloud_default",u_=x2([{element:f.jsx(h4,{}),children:[{path:"/",element:f.jsx(v4,{})},{path:"/login",element:f.jsx(b4,{})},{path:"/docs",element:f.jsx(S4,{})}]},{path:"/studio",element:f.jsx(x4,{}),children:[{index:!0,element:f.jsx(rg,{to:"/studio/sources",replace:!0})},{path:"sources",element:f.jsx(rg,{to:`/studio/sources/${c_}`,replace:!0})},{path:"sources/add-client",element:f.jsx(r_,{})},{path:"sources/import/:libId",element:f.jsx(W4,{})},{path:"sources/import-dir/:libId",element:f.jsx(n_,{})},{path:"sources/:libId",element:f.jsx(G4,{})},{path:"source/:sourceUuid",element:f.jsx(s_,{})},{path:"modeling",element:f.jsx(j4,{})},{path:"modeling/code/setup",element:f.jsx(z4,{})},{path:"modeling/code/compile",element:f.jsx(T4,{})},{path:"modeling/code/review",element:f.jsx(O4,{})},{path:"modeling/code/result",element:f.jsx(M4,{})},{path:"brain",element:f.jsx(N4,{})},{path:"discovery",element:f.jsx(E4,{})},{path:"sharing",element:f.jsx(w4,{})},{path:"collaboration",element:f.jsx(C4,{})},{path:"settings",element:f.jsx(R4,{})}]},{path:"*",element:f.jsx(_4,{})}]);function d_(){return v.useEffect(()=>{const i=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`;return $a.connect(i),()=>{$a.disconnect()}},[]),f.jsx($1,{router:u_})}lb.createRoot(document.getElementById("root")).render(f.jsx(v.StrictMode,{children:f.jsx(d_,{})}));
|