@c4a/server-cli 0.4.11-beta.1 → 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.
Files changed (67) hide show
  1. package/index.js +795 -3402
  2. package/package.json +1 -1
  3. package/serve.js +3223 -4183
  4. package/web/assets/index--UyZtsHr.js +238 -0
  5. package/web/assets/index-15FuETM5.js +238 -0
  6. package/web/assets/index-1O90ZcBt.js +238 -0
  7. package/web/assets/index-2ZaXHlEm.js +12 -0
  8. package/web/assets/index-5SgaIe6K.js +238 -0
  9. package/web/assets/index-69TE-Dt9.js +238 -0
  10. package/web/assets/index-6qWMAJjW.js +12 -0
  11. package/web/assets/index-8bavzcKH.js +238 -0
  12. package/web/assets/index-B2JcVRax.js +238 -0
  13. package/web/assets/index-B3a1j3cz.js +238 -0
  14. package/web/assets/index-B6EqO_Cg.js +12 -0
  15. package/web/assets/index-B7OJ5sV_.js +238 -0
  16. package/web/assets/index-B9YWtkC-.js +12 -0
  17. package/web/assets/index-BD162a_1.js +238 -0
  18. package/web/assets/index-BF50bkqY.css +1 -0
  19. package/web/assets/index-BPMcNaXa.css +1 -0
  20. package/web/assets/index-BPlwhwPb.css +1 -0
  21. package/web/assets/index-BW9aouHt.js +238 -0
  22. package/web/assets/index-BbZvxZvZ.css +1 -0
  23. package/web/assets/index-BkYFml7g.css +1 -0
  24. package/web/assets/index-Bnn0CunM.js +238 -0
  25. package/web/assets/index-BosC7CbW.css +1 -0
  26. package/web/assets/index-BrJa-9jA.css +1 -0
  27. package/web/assets/index-C63Z-8cw.js +238 -0
  28. package/web/assets/index-C6ydhyiL.js +238 -0
  29. package/web/assets/index-CAXoXe3-.css +1 -0
  30. package/web/assets/index-CDG7D9Wo.css +1 -0
  31. package/web/assets/index-CNruo9jb.js +238 -0
  32. package/web/assets/index-CUGq5bZG.js +12 -0
  33. package/web/assets/index-CVB_F0xd.js +238 -0
  34. package/web/assets/index-CVct6UjO.css +1 -0
  35. package/web/assets/index-CX2QKHgP.js +12 -0
  36. package/web/assets/index-Cok56quU.css +1 -0
  37. package/web/assets/index-Ct-X2M8U.js +12 -0
  38. package/web/assets/index-CtnVCeI7.css +1 -0
  39. package/web/assets/index-Cu6ttPtz.js +12 -0
  40. package/web/assets/index-CvTLDILA.css +1 -0
  41. package/web/assets/index-D0x9zuj2.js +238 -0
  42. package/web/assets/index-D3-qG0Hp.js +238 -0
  43. package/web/assets/index-D3UsEQTE.css +1 -0
  44. package/web/assets/index-D5WvCk3U.js +238 -0
  45. package/web/assets/index-D6QqUdMz.css +1 -0
  46. package/web/assets/index-D7EkgIsu.js +12 -0
  47. package/web/assets/index-DB_YWOXK.js +12 -0
  48. package/web/assets/index-DBaysFVi.css +1 -0
  49. package/web/assets/index-DGYdHfUt.js +238 -0
  50. package/web/assets/index-DIzfj2PR.css +1 -0
  51. package/web/assets/index-DJiYLRIW.css +1 -0
  52. package/web/assets/index-DQcztEye.js +238 -0
  53. package/web/assets/index-DSnxWXVs.css +1 -0
  54. package/web/assets/index-DX1UQEJF.css +1 -0
  55. package/web/assets/index-DgtV8nwc.js +238 -0
  56. package/web/assets/index-DqdyIshw.js +12 -0
  57. package/web/assets/index-DyF2kEj9.js +238 -0
  58. package/web/assets/index-H6Rs5Fbq.js +12 -0
  59. package/web/assets/index-O5LI2GNV.js +238 -0
  60. package/web/assets/index-SnFvyzm_.css +1 -0
  61. package/web/assets/index-bnfl0N-T.css +1 -0
  62. package/web/assets/index-cMgxghVE.css +1 -0
  63. package/web/assets/index-dDuVahj-.js +12 -0
  64. package/web/assets/index-fG23cf-l.js +238 -0
  65. package/web/assets/index-it-5oMch.css +1 -0
  66. package/web/assets/index-yq497d-W.js +12 -0
  67. package/web/index.html +2 -2
@@ -0,0 +1,12 @@
1
+ function yx(l,i){for(var r=0;r<i.length;r++){const s=i[r];if(typeof s!="string"&&!Array.isArray(s)){for(const u in s)if(u!=="default"&&!(u in l)){const f=Object.getOwnPropertyDescriptor(s,u);f&&Object.defineProperty(l,u,f.get?f:{enumerable:!0,get:()=>s[u]})}}}return Object.freeze(Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))s(u);new MutationObserver(u=>{for(const f of u)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&s(d)}).observe(document,{childList:!0,subtree:!0});function r(u){const f={};return u.integrity&&(f.integrity=u.integrity),u.referrerPolicy&&(f.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?f.credentials="include":u.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function s(u){if(u.ep)return;u.ep=!0;const f=r(u);fetch(u.href,f)}})();function vx(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var yc={exports:{}},$i={};var Gm;function xx(){if(Gm)return $i;Gm=1;var l=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(s,u,f){var d=null;if(f!==void 0&&(d=""+f),u.key!==void 0&&(d=""+u.key),"key"in u){f={};for(var m in u)m!=="key"&&(f[m]=u[m])}else f=u;return u=f.ref,{$$typeof:l,type:s,key:d,ref:u!==void 0?u:null,props:f}}return $i.Fragment=i,$i.jsx=r,$i.jsxs=r,$i}var Km;function bx(){return Km||(Km=1,yc.exports=xx()),yc.exports}var g=bx();const je=l=>typeof l=="string",Ji=()=>{let l,i;const r=new Promise((s,u)=>{l=s,i=u});return r.resolve=l,r.reject=i,r},Xm=l=>l==null?"":""+l,Sx=(l,i,r)=>{l.forEach(s=>{i[s]&&(r[s]=i[s])})},Ex=/###/g,Qm=l=>l&&l.indexOf("###")>-1?l.replace(Ex,"."):l,Zm=l=>!l||je(l),nr=(l,i,r)=>{const s=je(i)?i.split("."):i;let u=0;for(;u<s.length-1;){if(Zm(l))return{};const f=Qm(s[u]);!l[f]&&r&&(l[f]=new r),Object.prototype.hasOwnProperty.call(l,f)?l=l[f]:l={},++u}return Zm(l)?{}:{obj:l,k:Qm(s[u])}},$m=(l,i,r)=>{const{obj:s,k:u}=nr(l,i,Object);if(s!==void 0||i.length===1){s[u]=r;return}let f=i[i.length-1],d=i.slice(0,i.length-1),m=nr(l,d,Object);for(;m.obj===void 0&&d.length;)f=`${d[d.length-1]}.${f}`,d=d.slice(0,d.length-1),m=nr(l,d,Object),m?.obj&&typeof m.obj[`${m.k}.${f}`]<"u"&&(m.obj=void 0);m.obj[`${m.k}.${f}`]=r},_x=(l,i,r,s)=>{const{obj:u,k:f}=nr(l,i,Object);u[f]=u[f]||[],u[f].push(r)},Xs=(l,i)=>{const{obj:r,k:s}=nr(l,i);if(r&&Object.prototype.hasOwnProperty.call(r,s))return r[s]},Nx=(l,i,r)=>{const s=Xs(l,r);return s!==void 0?s:Xs(i,r)},ug=(l,i,r)=>{for(const s in i)s!=="__proto__"&&s!=="constructor"&&(s in l?je(l[s])||l[s]instanceof String||je(i[s])||i[s]instanceof String?r&&(l[s]=i[s]):ug(l[s],i[s],r):l[s]=i[s]);return l},nl=l=>l.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var jx={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const wx=l=>je(l)?l.replace(/[&<>"'\/]/g,i=>jx[i]):l;class Rx{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 Cx=[" ",",","?","!",";"],Ox=new Rx(20),Tx=(l,i,r)=>{i=i||"",r=r||"";const s=Cx.filter(d=>i.indexOf(d)<0&&r.indexOf(d)<0);if(s.length===0)return!0;const u=Ox.getRegExp(`(${s.map(d=>d==="?"?"\\?":d).join("|")})`);let f=!u.test(l);if(!f){const d=l.indexOf(r);d>0&&!u.test(l.substring(0,d))&&(f=!0)}return f},Uc=(l,i,r=".")=>{if(!l)return;if(l[i])return Object.prototype.hasOwnProperty.call(l,i)?l[i]:void 0;const s=i.split(r);let u=l;for(let f=0;f<s.length;){if(!u||typeof u!="object")return;let d,m="";for(let y=f;y<s.length;++y)if(y!==f&&(m+=r),m+=s[y],d=u[m],d!==void 0){if(["string","number","boolean"].indexOf(typeof d)>-1&&y<s.length-1)continue;f+=y-f+1;break}u=d}return u},rr=l=>l?.replace("_","-"),zx={type:"logger",log(l){this.output("log",l)},warn(l){this.output("warn",l)},error(l){this.output("error",l)},output(l,i){console?.[l]?.apply?.(console,i)}};class Qs{constructor(i,r={}){this.init(i,r)}init(i,r={}){this.prefix=r.prefix||"i18next:",this.logger=i||zx,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,u){return u&&!this.debug?null:(je(i[0])&&(i[0]=`${s}${this.prefix} ${i[0]}`),this.logger[r](i))}create(i){return new Qs(this.logger,{prefix:`${this.prefix}:${i}:`,...this.options})}clone(i){return i=i||this.options,i.prefix=i.prefix||this.prefix,new Qs(this.logger,i)}}var Ma=new Qs;class Js{constructor(){this.observers={}}on(i,r){return i.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const u=this.observers[s].get(r)||0;this.observers[s].set(r,u+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(([u,f])=>{for(let d=0;d<f;d++)u(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([u,f])=>{for(let d=0;d<f;d++)u.apply(u,[i,...r])})}}class Jm extends Js{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,u={}){const f=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator,d=u.ignoreJSONStructure!==void 0?u.ignoreJSONStructure:this.options.ignoreJSONStructure;let m;i.indexOf(".")>-1?m=i.split("."):(m=[i,r],s&&(Array.isArray(s)?m.push(...s):je(s)&&f?m.push(...s.split(f)):m.push(s)));const y=Xs(this.data,m);return!y&&!r&&!s&&i.indexOf(".")>-1&&(i=m[0],r=m[1],s=m.slice(2).join(".")),y||!d||!je(s)?y:Uc(this.data?.[i]?.[r],s,f)}addResource(i,r,s,u,f={silent:!1}){const d=f.keySeparator!==void 0?f.keySeparator:this.options.keySeparator;let m=[i,r];s&&(m=m.concat(d?s.split(d):s)),i.indexOf(".")>-1&&(m=i.split("."),u=r,r=m[1]),this.addNamespaces(r),$m(this.data,m,u),f.silent||this.emit("added",i,r,s,u)}addResources(i,r,s,u={silent:!1}){for(const f in s)(je(s[f])||Array.isArray(s[f]))&&this.addResource(i,r,f,s[f],{silent:!0});u.silent||this.emit("added",i,r,s)}addResourceBundle(i,r,s,u,f,d={silent:!1,skipCopy:!1}){let m=[i,r];i.indexOf(".")>-1&&(m=i.split("."),u=s,s=r,r=m[1]),this.addNamespaces(r);let y=Xs(this.data,m)||{};d.skipCopy||(s=JSON.parse(JSON.stringify(s))),u?ug(y,s,f):y={...y,...s},$m(this.data,m,y),d.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(u=>r[u]&&Object.keys(r[u]).length>0)}toJSON(){return this.data}}var cg={processors:{},addPostProcessor(l){this.processors[l.name]=l},handle(l,i,r,s,u){return l.forEach(f=>{i=this.processors[f]?.process(i,r,s,u)??i}),i}};const fg=Symbol("i18next/PATH_KEY");function Mx(){const l=[],i=Object.create(null);let r;return i.get=(s,u)=>(r?.revoke?.(),u===fg?l:(l.push(u),r=Proxy.revocable(s,i),r.proxy)),Proxy.revocable(Object.create(null),i).proxy}function Hc(l,i){const{[fg]:r}=l(Mx());return r.join(i?.keySeparator??".")}const Fm={},vc=l=>!je(l)&&typeof l!="boolean"&&typeof l!="number";class Zs extends Js{constructor(i,r={}){super(),Sx(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],i,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Ma.create("translator")}changeLanguage(i){i&&(this.language=i)}exists(i,r={interpolation:{}}){const s={...r};if(i==null)return!1;const u=this.resolve(i,s);if(u?.res===void 0)return!1;const f=vc(u.res);return!(s.returnObjects===!1&&f)}extractFromKey(i,r){let s=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const u=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let f=r.ns||this.options.defaultNS||[];const d=s&&i.indexOf(s)>-1,m=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!Tx(i,s,u);if(d&&!m){const y=i.match(this.interpolator.nestingRegexp);if(y&&y.length>0)return{key:i,namespaces:je(f)?[f]:f};const p=i.split(s);(s!==u||s===u&&this.options.ns.indexOf(p[0])>-1)&&(f=p.shift()),i=p.join(u)}return{key:i,namespaces:je(f)?[f]:f}}translate(i,r,s){let u=typeof r=="object"?{...r}:r;if(typeof u!="object"&&this.options.overloadTranslationOptionHandler&&(u=this.options.overloadTranslationOptionHandler(arguments)),typeof u=="object"&&(u={...u}),u||(u={}),i==null)return"";typeof i=="function"&&(i=Hc(i,{...this.options,...u})),Array.isArray(i)||(i=[String(i)]);const f=u.returnDetails!==void 0?u.returnDetails:this.options.returnDetails,d=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator,{key:m,namespaces:y}=this.extractFromKey(i[i.length-1],u),p=y[y.length-1];let b=u.nsSeparator!==void 0?u.nsSeparator:this.options.nsSeparator;b===void 0&&(b=":");const v=u.lng||this.language,E=u.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(v?.toLowerCase()==="cimode")return E?f?{res:`${p}${b}${m}`,usedKey:m,exactUsedKey:m,usedLng:v,usedNS:p,usedParams:this.getUsedParamsDetails(u)}:`${p}${b}${m}`:f?{res:m,usedKey:m,exactUsedKey:m,usedLng:v,usedNS:p,usedParams:this.getUsedParamsDetails(u)}:m;const _=this.resolve(i,u);let C=_?.res;const U=_?.usedKey||m,D=_?.exactUsedKey||m,K=["[object Number]","[object Function]","[object RegExp]"],B=u.joinArrays!==void 0?u.joinArrays:this.options.joinArrays,$=!this.i18nFormat||this.i18nFormat.handleAsObject,te=u.count!==void 0&&!je(u.count),ie=Zs.hasDefaultValue(u),he=te?this.pluralResolver.getSuffix(v,u.count,u):"",ae=u.ordinal&&te?this.pluralResolver.getSuffix(v,u.count,{ordinal:!1}):"",z=te&&!u.ordinal&&u.count===0,le=z&&u[`defaultValue${this.options.pluralSeparator}zero`]||u[`defaultValue${he}`]||u[`defaultValue${ae}`]||u.defaultValue;let re=C;$&&!C&&ie&&(re=le);const ye=vc(re),Z=Object.prototype.toString.apply(re);if($&&re&&ye&&K.indexOf(Z)<0&&!(je(B)&&Array.isArray(re))){if(!u.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const we=this.options.returnedObjectHandler?this.options.returnedObjectHandler(U,re,{...u,ns:y}):`key '${m} (${this.language})' returned an object instead of string.`;return f?(_.res=we,_.usedParams=this.getUsedParamsDetails(u),_):we}if(d){const we=Array.isArray(re),me=we?[]:{},pe=we?D:U;for(const M in re)if(Object.prototype.hasOwnProperty.call(re,M)){const Q=`${pe}${d}${M}`;ie&&!C?me[M]=this.translate(Q,{...u,defaultValue:vc(le)?le[M]:void 0,joinArrays:!1,ns:y}):me[M]=this.translate(Q,{...u,joinArrays:!1,ns:y}),me[M]===Q&&(me[M]=re[M])}C=me}}else if($&&je(B)&&Array.isArray(C))C=C.join(B),C&&(C=this.extendTranslation(C,i,u,s));else{let we=!1,me=!1;!this.isValidLookup(C)&&ie&&(we=!0,C=le),this.isValidLookup(C)||(me=!0,C=m);const M=(u.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&me?void 0:C,Q=ie&&le!==C&&this.options.updateMissing;if(me||we||Q){if(this.logger.log(Q?"updateKey":"missingKey",v,p,m,Q?le:C),d){const j=this.resolve(m,{...u,keySeparator:!1});j&&j.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 ne=[];const P=this.languageUtils.getFallbackCodes(this.options.fallbackLng,u.lng||this.language);if(this.options.saveMissingTo==="fallback"&&P&&P[0])for(let j=0;j<P.length;j++)ne.push(P[j]);else this.options.saveMissingTo==="all"?ne=this.languageUtils.toResolveHierarchy(u.lng||this.language):ne.push(u.lng||this.language);const Ee=(j,Y,F)=>{const ee=ie&&F!==C?F:M;this.options.missingKeyHandler?this.options.missingKeyHandler(j,p,Y,ee,Q,u):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(j,p,Y,ee,Q,u),this.emit("missingKey",j,p,Y,C)};this.options.saveMissing&&(this.options.saveMissingPlurals&&te?ne.forEach(j=>{const Y=this.pluralResolver.getSuffixes(j,u);z&&u[`defaultValue${this.options.pluralSeparator}zero`]&&Y.indexOf(`${this.options.pluralSeparator}zero`)<0&&Y.push(`${this.options.pluralSeparator}zero`),Y.forEach(F=>{Ee([j],m+F,u[`defaultValue${F}`]||le)})}):Ee(ne,m,le))}C=this.extendTranslation(C,i,u,_,s),me&&C===m&&this.options.appendNamespaceToMissingKey&&(C=`${p}${b}${m}`),(me||we)&&this.options.parseMissingKeyHandler&&(C=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${p}${b}${m}`:m,we?C:void 0,u))}return f?(_.res=C,_.usedParams=this.getUsedParamsDetails(u),_):C}extendTranslation(i,r,s,u,f){if(this.i18nFormat?.parse)i=this.i18nFormat.parse(i,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||u.usedLng,u.usedNS,u.usedKey,{resolved:u});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const y=je(i)&&(s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let p;if(y){const v=i.match(this.interpolator.nestingRegexp);p=v&&v.length}let b=s.replace&&!je(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||u.usedLng,s),y){const v=i.match(this.interpolator.nestingRegexp),E=v&&v.length;p<E&&(s.nest=!1)}!s.lng&&u&&u.res&&(s.lng=this.language||u.usedLng),s.nest!==!1&&(i=this.interpolator.nest(i,(...v)=>f?.[0]===v[0]&&!s.context?(this.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${r[0]}`),null):this.translate(...v,r),s)),s.interpolation&&this.interpolator.reset()}const d=s.postProcess||this.options.postProcess,m=je(d)?[d]:d;return i!=null&&m?.length&&s.applyPostProcessor!==!1&&(i=cg.handle(m,i,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...u,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),i}resolve(i,r={}){let s,u,f,d,m;return je(i)&&(i=[i]),i.forEach(y=>{if(this.isValidLookup(s))return;const p=this.extractFromKey(y,r),b=p.key;u=b;let v=p.namespaces;this.options.fallbackNS&&(v=v.concat(this.options.fallbackNS));const E=r.count!==void 0&&!je(r.count),_=E&&!r.ordinal&&r.count===0,C=r.context!==void 0&&(je(r.context)||typeof r.context=="number")&&r.context!=="",U=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);v.forEach(D=>{this.isValidLookup(s)||(m=D,!Fm[`${U[0]}-${D}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(m)&&(Fm[`${U[0]}-${D}`]=!0,this.logger.warn(`key "${u}" for languages "${U.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!!!")),U.forEach(K=>{if(this.isValidLookup(s))return;d=K;const B=[b];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(B,b,K,D,r);else{let te;E&&(te=this.pluralResolver.getSuffix(K,r.count,r));const ie=`${this.options.pluralSeparator}zero`,he=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(E&&(r.ordinal&&te.indexOf(he)===0&&B.push(b+te.replace(he,this.options.pluralSeparator)),B.push(b+te),_&&B.push(b+ie)),C){const ae=`${b}${this.options.contextSeparator||"_"}${r.context}`;B.push(ae),E&&(r.ordinal&&te.indexOf(he)===0&&B.push(ae+te.replace(he,this.options.pluralSeparator)),B.push(ae+te),_&&B.push(ae+ie))}}let $;for(;$=B.pop();)this.isValidLookup(s)||(f=$,s=this.getResource(K,D,$,r))}))})}),{res:s,usedKey:u,exactUsedKey:f,usedLng:d,usedNS:m}}isValidLookup(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}getResource(i,r,s,u={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(i,r,s,u):this.resourceStore.getResource(i,r,s,u)}getUsedParamsDetails(i={}){const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=i.replace&&!je(i.replace);let u=s?i.replace:i;if(s&&typeof i.count<"u"&&(u.count=i.count),this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),!s){u={...u};for(const f of r)delete u[f]}return u}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 Wm{constructor(i){this.options=i,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ma.create("languageUtils")}getScriptPartFromCode(i){if(i=rr(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=rr(i),!i||i.indexOf("-")<0)return i;const r=i.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(i){if(je(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 u=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(u))&&(r=u)}),!r&&this.options.supportedLngs&&i.forEach(s=>{if(r)return;const u=this.getScriptPartFromCode(s);if(this.isSupportedCode(u))return r=u;const f=this.getLanguagePartFromCode(s);if(this.isSupportedCode(f))return r=f;r=this.options.supportedLngs.find(d=>{if(d===f)return d;if(!(d.indexOf("-")<0&&f.indexOf("-")<0)&&(d.indexOf("-")>0&&f.indexOf("-")<0&&d.substring(0,d.indexOf("-"))===f||d.indexOf(f)===0&&f.length>1))return d})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(i,r){if(!i)return[];if(typeof i=="function"&&(i=i(r)),je(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),u=[],f=d=>{d&&(this.isSupportedCode(d)?u.push(d):this.logger.warn(`rejecting language code not found in supportedLngs: ${d}`))};return je(i)&&(i.indexOf("-")>-1||i.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&f(this.formatLanguageCode(i)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&f(this.getScriptPartFromCode(i)),this.options.load!=="currentOnly"&&f(this.getLanguagePartFromCode(i))):je(i)&&f(this.formatLanguageCode(i)),s.forEach(d=>{u.indexOf(d)<0&&f(this.formatLanguageCode(d))}),u}}const Pm={zero:0,one:1,two:2,few:3,many:4,other:5},Im={select:l=>l===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Dx{constructor(i,r={}){this.languageUtils=i,this.options=r,this.logger=Ma.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(i,r={}){const s=rr(i==="dev"?"en":i),u=r.ordinal?"ordinal":"cardinal",f=JSON.stringify({cleanedCode:s,type:u});if(f in this.pluralRulesCache)return this.pluralRulesCache[f];let d;try{d=new Intl.PluralRules(s,{type:u})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),Im;if(!i.match(/-|_/))return Im;const y=this.languageUtils.getLanguagePartFromCode(i);d=this.getRule(y,r)}return this.pluralRulesCache[f]=d,d}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(u=>`${r}${u}`)}getSuffixes(i,r={}){let s=this.getRule(i,r);return s||(s=this.getRule("dev",r)),s?s.resolvedOptions().pluralCategories.sort((u,f)=>Pm[u]-Pm[f]).map(u=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${u}`):[]}getSuffix(i,r,s={}){const u=this.getRule(i,s);return u?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${u.select(r)}`:(this.logger.warn(`no plural rule found for: ${i}`),this.getSuffix("dev",r,s))}}const ep=(l,i,r,s=".",u=!0)=>{let f=Nx(l,i,r);return!f&&u&&je(r)&&(f=Uc(l,r,s),f===void 0&&(f=Uc(i,r,s))),f},xc=l=>l.replace(/\$/g,"$$$$");class tp{constructor(i={}){this.logger=Ma.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:u,prefix:f,prefixEscaped:d,suffix:m,suffixEscaped:y,formatSeparator:p,unescapeSuffix:b,unescapePrefix:v,nestingPrefix:E,nestingPrefixEscaped:_,nestingSuffix:C,nestingSuffixEscaped:U,nestingOptionsSeparator:D,maxReplaces:K,alwaysFormat:B}=i.interpolation;this.escape=r!==void 0?r:wx,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=u!==void 0?u:!1,this.prefix=f?nl(f):d||"{{",this.suffix=m?nl(m):y||"}}",this.formatSeparator=p||",",this.unescapePrefix=b?"":v||"-",this.unescapeSuffix=this.unescapePrefix?"":b||"",this.nestingPrefix=E?nl(E):_||nl("$t("),this.nestingSuffix=C?nl(C):U||nl(")"),this.nestingOptionsSeparator=D||",",this.maxReplaces=K||1e3,this.alwaysFormat=B!==void 0?B:!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,u){let f,d,m;const y=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},p=_=>{if(_.indexOf(this.formatSeparator)<0){const K=ep(r,y,_,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(K,void 0,s,{...u,...r,interpolationkey:_}):K}const C=_.split(this.formatSeparator),U=C.shift().trim(),D=C.join(this.formatSeparator).trim();return this.format(ep(r,y,U,this.options.keySeparator,this.options.ignoreJSONStructure),D,s,{...u,...r,interpolationkey:U})};this.resetRegExp();const b=u?.missingInterpolationHandler||this.options.missingInterpolationHandler,v=u?.interpolation?.skipOnVariables!==void 0?u.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:_=>xc(_)},{regex:this.regexp,safeValue:_=>this.escapeValue?xc(this.escape(_)):xc(_)}].forEach(_=>{for(m=0;f=_.regex.exec(i);){const C=f[1].trim();if(d=p(C),d===void 0)if(typeof b=="function"){const D=b(i,f,u);d=je(D)?D:""}else if(u&&Object.prototype.hasOwnProperty.call(u,C))d="";else if(v){d=f[0];continue}else this.logger.warn(`missed to pass in variable ${C} for interpolating ${i}`),d="";else!je(d)&&!this.useRawValueToEscape&&(d=Xm(d));const U=_.safeValue(d);if(i=i.replace(f[0],U),v?(_.regex.lastIndex+=d.length,_.regex.lastIndex-=f[0].length):_.regex.lastIndex=0,m++,m>=this.maxReplaces)break}}),i}nest(i,r,s={}){let u,f,d;const m=(y,p)=>{const b=this.nestingOptionsSeparator;if(y.indexOf(b)<0)return y;const v=y.split(new RegExp(`${nl(b)}[ ]*{`));let E=`{${v[1]}`;y=v[0],E=this.interpolate(E,d);const _=E.match(/'/g),C=E.match(/"/g);((_?.length??0)%2===0&&!C||(C?.length??0)%2!==0)&&(E=E.replace(/'/g,'"'));try{d=JSON.parse(E),p&&(d={...p,...d})}catch(U){return this.logger.warn(`failed parsing options string in nesting for key ${y}`,U),`${y}${b}${E}`}return d.defaultValue&&d.defaultValue.indexOf(this.prefix)>-1&&delete d.defaultValue,y};for(;u=this.nestingRegexp.exec(i);){let y=[];d={...s},d=d.replace&&!je(d.replace)?d.replace:d,d.applyPostProcessor=!1,delete d.defaultValue;const p=/{.*}/.test(u[1])?u[1].lastIndexOf("}")+1:u[1].indexOf(this.formatSeparator);if(p!==-1&&(y=u[1].slice(p).split(this.formatSeparator).map(b=>b.trim()).filter(Boolean),u[1]=u[1].slice(0,p)),f=r(m.call(this,u[1].trim(),d),d),f&&u[0]===i&&!je(f))return f;je(f)||(f=Xm(f)),f||(this.logger.warn(`missed to resolve ${u[1]} for nesting ${i}`),f=""),y.length&&(f=y.reduce((b,v)=>this.format(b,v,s.lng,{...s,interpolationkey:u[1].trim()}),f.trim())),i=i.replace(u[0],f),this.regexp.lastIndex=0}return i}}const Ax=l=>{let i=l.toLowerCase().trim();const r={};if(l.indexOf("(")>-1){const s=l.split("(");i=s[0].toLowerCase().trim();const u=s[1].substring(0,s[1].length-1);i==="currency"&&u.indexOf(":")<0?r.currency||(r.currency=u.trim()):i==="relativetime"&&u.indexOf(":")<0?r.range||(r.range=u.trim()):u.split(";").forEach(d=>{if(d){const[m,...y]=d.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}},ap=l=>{const i={};return(r,s,u)=>{let f=u;u&&u.interpolationkey&&u.formatParams&&u.formatParams[u.interpolationkey]&&u[u.interpolationkey]&&(f={...f,[u.interpolationkey]:void 0});const d=s+JSON.stringify(f);let m=i[d];return m||(m=l(rr(s),u),i[d]=m),m(r)}},Lx=l=>(i,r,s)=>l(rr(r),s)(i);class Ux{constructor(i={}){this.logger=Ma.create("formatter"),this.options=i,this.init(i)}init(i,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const s=r.cacheInBuiltFormats?ap:Lx;this.formats={number:s((u,f)=>{const d=new Intl.NumberFormat(u,{...f});return m=>d.format(m)}),currency:s((u,f)=>{const d=new Intl.NumberFormat(u,{...f,style:"currency"});return m=>d.format(m)}),datetime:s((u,f)=>{const d=new Intl.DateTimeFormat(u,{...f});return m=>d.format(m)}),relativetime:s((u,f)=>{const d=new Intl.RelativeTimeFormat(u,{...f});return m=>d.format(m,f.range||"day")}),list:s((u,f)=>{const d=new Intl.ListFormat(u,{...f});return m=>d.format(m)})}}add(i,r){this.formats[i.toLowerCase().trim()]=r}addCached(i,r){this.formats[i.toLowerCase().trim()]=ap(r)}format(i,r,s,u={}){const f=r.split(this.formatSeparator);if(f.length>1&&f[0].indexOf("(")>1&&f[0].indexOf(")")<0&&f.find(m=>m.indexOf(")")>-1)){const m=f.findIndex(y=>y.indexOf(")")>-1);f[0]=[f[0],...f.splice(1,m)].join(this.formatSeparator)}return f.reduce((m,y)=>{const{formatName:p,formatOptions:b}=Ax(y);if(this.formats[p]){let v=m;try{const E=u?.formatParams?.[u.interpolationkey]||{},_=E.locale||E.lng||u.locale||u.lng||s;v=this.formats[p](m,_,{...b,...u,...E})}catch(E){this.logger.warn(E)}return v}else this.logger.warn(`there was no format function for ${p}`);return m},i)}}const Hx=(l,i)=>{l.pending[i]!==void 0&&(delete l.pending[i],l.pendingCount--)};class kx extends Js{constructor(i,r,s,u={}){super(),this.backend=i,this.store=r,this.services=s,this.languageUtils=s.languageUtils,this.options=u,this.logger=Ma.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=u.maxParallelReads||10,this.readingCalls=0,this.maxRetries=u.maxRetries>=0?u.maxRetries:5,this.retryTimeout=u.retryTimeout>=1?u.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(s,u.backend,u)}queueLoad(i,r,s,u){const f={},d={},m={},y={};return i.forEach(p=>{let b=!0;r.forEach(v=>{const E=`${p}|${v}`;!s.reload&&this.store.hasResourceBundle(p,v)?this.state[E]=2:this.state[E]<0||(this.state[E]===1?d[E]===void 0&&(d[E]=!0):(this.state[E]=1,b=!1,d[E]===void 0&&(d[E]=!0),f[E]===void 0&&(f[E]=!0),y[v]===void 0&&(y[v]=!0)))}),b||(m[p]=!0)}),(Object.keys(f).length||Object.keys(d).length)&&this.queue.push({pending:d,pendingCount:Object.keys(d).length,loaded:{},errors:[],callback:u}),{toLoad:Object.keys(f),pending:Object.keys(d),toLoadLanguages:Object.keys(m),toLoadNamespaces:Object.keys(y)}}loaded(i,r,s){const u=i.split("|"),f=u[0],d=u[1];r&&this.emit("failedLoading",f,d,r),!r&&s&&this.store.addResourceBundle(f,d,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=>{_x(y.loaded,[f],d),Hx(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(v=>{m[p][v]===void 0&&(m[p][v]=!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,u=0,f=this.retryTimeout,d){if(!i.length)return d(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:r,fcName:s,tried:u,wait:f,callback:d});return}this.readingCalls++;const m=(p,b)=>{if(this.readingCalls--,this.waitingReads.length>0){const v=this.waitingReads.shift();this.read(v.lng,v.ns,v.fcName,v.tried,v.wait,v.callback)}if(p&&b&&u<this.maxRetries){setTimeout(()=>{this.read.call(this,i,r,s,u+1,f*2,d)},f);return}d(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={},u){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),u&&u();je(i)&&(i=this.languageUtils.toResolveHierarchy(i)),je(r)&&(r=[r]);const f=this.queueLoad(i,r,s,u);if(!f.toLoad.length)return f.pending.length||u(),null;f.toLoad.forEach(d=>{this.loadOne(d)})}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("|"),u=s[0],f=s[1];this.read(u,f,"read",void 0,void 0,(d,m)=>{d&&this.logger.warn(`${r}loading namespace ${f} for language ${u} failed`,d),!d&&m&&this.logger.log(`${r}loaded namespace ${f} for language ${u}`,m),this.loaded(i,d,m)})}saveMissing(i,r,s,u,f,d={},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={...d,isUpdate:f},p=this.backend.create.bind(this.backend);if(p.length<6)try{let b;p.length===5?b=p(i,r,s,u,y):b=p(i,r,s,u),b&&typeof b.then=="function"?b.then(v=>m(null,v)).catch(m):m(null,b)}catch(b){m(b)}else p(i,r,s,u,m,y)}!i||!i[0]||this.store.addResource(i[0],r,s,u)}}}const bc=()=>({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:l=>{let i={};if(typeof l[1]=="object"&&(i=l[1]),je(l[1])&&(i.defaultValue=l[1]),je(l[2])&&(i.tDescription=l[2]),typeof l[2]=="object"||typeof l[3]=="object"){const r=l[3]||l[2];Object.keys(r).forEach(s=>{i[s]=r[s]})}return i},interpolation:{escapeValue:!0,format:l=>l,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),np=l=>(je(l.ns)&&(l.ns=[l.ns]),je(l.fallbackLng)&&(l.fallbackLng=[l.fallbackLng]),je(l.fallbackNS)&&(l.fallbackNS=[l.fallbackNS]),l.supportedLngs?.indexOf?.("cimode")<0&&(l.supportedLngs=l.supportedLngs.concat(["cimode"])),typeof l.initImmediate=="boolean"&&(l.initAsync=l.initImmediate),l),Ls=()=>{},Bx=l=>{Object.getOwnPropertyNames(Object.getPrototypeOf(l)).forEach(r=>{typeof l[r]=="function"&&(l[r]=l[r].bind(l))})},dg="__i18next_supportNoticeShown",qx=()=>typeof globalThis<"u"&&!!globalThis[dg],Yx=()=>{typeof globalThis<"u"&&(globalThis[dg]=!0)},Vx=l=>!!(l?.modules?.backend?.name?.indexOf("Locize")>0||l?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||l?.options?.backend?.backends&&l.options.backend.backends.some(i=>i?.name?.indexOf("Locize")>0||i?.constructor?.name?.indexOf("Locize")>0)||l?.options?.backend?.projectId||l?.options?.backend?.backendOptions&&l.options.backend.backendOptions.some(i=>i?.projectId));class lr extends Js{constructor(i={},r){if(super(),this.options=np(i),this.services={},this.logger=Ma,this.modules={external:[]},Bx(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&&(je(i.ns)?i.defaultNS=i.ns:i.ns.indexOf("translation")<0&&(i.defaultNS=i.ns[0]));const s=bc();this.options={...s,...this.options,...np(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&&!Vx(this)&&!qx()&&(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 💙"),Yx());const u=p=>p?typeof p=="function"?new p:p:null;if(!this.options.isClone){this.modules.logger?Ma.init(u(this.modules.logger),this.options):Ma.init(null,this.options);let p;this.modules.formatter?p=this.modules.formatter:p=Ux;const b=new Wm(this.options);this.store=new Jm(this.options.resources,this.options);const v=this.services;v.logger=Ma,v.resourceStore=this.store,v.languageUtils=b,v.pluralResolver=new Dx(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)&&(v.formatter=u(p),v.formatter.init&&v.formatter.init(v,this.options),this.options.interpolation.format=v.formatter.format.bind(v.formatter)),v.interpolator=new tp(this.options),v.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},v.backendConnector=new kx(u(this.modules.backend),v.resourceStore,v,this.options),v.backendConnector.on("*",(_,...C)=>{this.emit(_,...C)}),this.modules.languageDetector&&(v.languageDetector=u(this.modules.languageDetector),v.languageDetector.init&&v.languageDetector.init(v,this.options.detection,this.options)),this.modules.i18nFormat&&(v.i18nFormat=u(this.modules.i18nFormat),v.i18nFormat.init&&v.i18nFormat.init(this)),this.translator=new Zs(this.services,this.options),this.translator.on("*",(_,...C)=>{this.emit(_,...C)}),this.modules.external.forEach(_=>{_.init&&_.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Ls),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=Ji(),y=()=>{const p=(b,v)=>{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(v),r(b,v)};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=Ls){let s=r;const u=je(i)?i:this.language;if(typeof i=="function"&&(s=i),!this.options.resources||this.options.partialBundledLanguages){if(u?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const f=[],d=m=>{if(!m||m==="cimode")return;this.services.languageUtils.toResolveHierarchy(m).forEach(p=>{p!=="cimode"&&f.indexOf(p)<0&&f.push(p)})};u?d(u):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(y=>d(y)),this.options.preload?.forEach?.(m=>d(m)),this.services.backendConnector.load(f,this.options.ns,m=>{!m&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(m)})}else s(null)}reloadResources(i,r,s){const u=Ji();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=Ls),this.services.backendConnector.reload(i,r,f=>{u.resolve(),s(f)}),u}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"&&cg.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=Ji();this.emit("languageChanging",i);const u=m=>{this.language=m,this.languages=this.services.languageUtils.toResolveHierarchy(m),this.resolvedLanguage=void 0,this.setResolvedLanguage(m)},f=(m,y)=>{y?this.isLanguageChangingTo===i&&(u(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))},d=m=>{!i&&!m&&this.services.languageDetector&&(m=[]);const y=je(m)?m:m&&m[0],p=this.store.hasLanguageSomeTranslations(y)?y:this.services.languageUtils.getBestMatchFromCodes(je(m)?[m]:m);p&&(this.language||u(p),this.translator.language||this.translator.changeLanguage(p),this.services.languageDetector?.cacheUserLanguage?.(p)),this.loadResources(p,b=>{f(b,p)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?d(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(d):this.services.languageDetector.detect(d):d(i),s}getFixedT(i,r,s){const u=(f,d,...m)=>{let y;typeof d!="object"?y=this.options.overloadTranslationOptionHandler([f,d].concat(m)):y={...d},y.lng=y.lng||u.lng,y.lngs=y.lngs||u.lngs,y.ns=y.ns||u.ns,y.keyPrefix!==""&&(y.keyPrefix=y.keyPrefix||s||u.keyPrefix);const p=this.options.keySeparator||".";let b;return y.keyPrefix&&Array.isArray(f)?b=f.map(v=>(typeof v=="function"&&(v=Hc(v,{...this.options,...d})),`${y.keyPrefix}${p}${v}`)):(typeof f=="function"&&(f=Hc(f,{...this.options,...d})),b=y.keyPrefix?`${y.keyPrefix}${p}${f}`:f),this.t(b,y)};return je(i)?u.lng=i:u.lngs=i,u.ns=r,u.keyPrefix=s,u}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],u=this.options?this.options.fallbackLng:!1,f=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const d=(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,d);if(m!==void 0)return m}return!!(this.hasResourceBundle(s,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||d(s,i)&&(!u||d(f,i)))}loadNamespaces(i,r){const s=Ji();return this.options.ns?(je(i)&&(i=[i]),i.forEach(u=>{this.options.ns.indexOf(u)<0&&this.options.ns.push(u)}),this.loadResources(u=>{s.resolve(),r&&r(u)}),s):(r&&r(),Promise.resolve())}loadLanguages(i,r){const s=Ji();je(i)&&(i=[i]);const u=this.options.preload||[],f=i.filter(d=>u.indexOf(d)<0&&this.services.languageUtils.isSupportedCode(d));return f.length?(this.options.preload=u.concat(f),this.loadResources(d=>{s.resolve(),r&&r(d)}),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 u=new Intl.Locale(i);if(u&&u.getTextInfo){const f=u.getTextInfo();if(f&&f.direction)return f.direction}}catch{}const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],s=this.services?.languageUtils||new Wm(bc());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 lr(i,r);return s.createInstance=lr.createInstance,s}cloneInstance(i={},r=Ls){const s=i.forkResourceStore;s&&delete i.forkResourceStore;const u={...this.options,...i,isClone:!0},f=new lr(u);if((i.debug!==void 0||i.prefix!==void 0)&&(f.logger=f.logger.clone(i)),["store","services","language"].forEach(m=>{f[m]=this[m]}),f.services={...this.services},f.services.utils={hasLoadedNamespace:f.hasLoadedNamespace.bind(f)},s){const m=Object.keys(this.store.data).reduce((y,p)=>(y[p]={...this.store.data[p]},y[p]=Object.keys(y[p]).reduce((b,v)=>(b[v]={...y[p][v]},b),y[p]),y),{});f.store=new Jm(m,u),f.services.resourceStore=f.store}if(i.interpolation){const y={...bc().interpolation,...this.options.interpolation,...i.interpolation},p={...u,interpolation:y};f.services.interpolator=new tp(p)}return f.translator=new Zs(f.services,u),f.translator.on("*",(m,...y)=>{f.emit(m,...y)}),f.init(u,r),f.translator.options=u,f.translator.backendConnector.services.utils={hasLoadedNamespace:f.hasLoadedNamespace.bind(f)},f}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Ht=lr.createInstance();Ht.createInstance;Ht.dir;Ht.init;Ht.loadResources;Ht.reloadResources;Ht.use;Ht.changeLanguage;Ht.getFixedT;Ht.t;Ht.exists;Ht.setDefaultNamespace;Ht.hasLoadedNamespace;Ht.loadNamespaces;Ht.loadLanguages;var Sc={exports:{}},Re={};var lp;function Gx(){if(lp)return Re;lp=1;var l=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),d=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"),v=Symbol.for("react.activity"),E=Symbol.iterator;function _(j){return j===null||typeof j!="object"?null:(j=E&&j[E]||j["@@iterator"],typeof j=="function"?j:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},U=Object.assign,D={};function K(j,Y,F){this.props=j,this.context=Y,this.refs=D,this.updater=F||C}K.prototype.isReactComponent={},K.prototype.setState=function(j,Y){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,Y,"setState")},K.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function B(){}B.prototype=K.prototype;function $(j,Y,F){this.props=j,this.context=Y,this.refs=D,this.updater=F||C}var te=$.prototype=new B;te.constructor=$,U(te,K.prototype),te.isPureReactComponent=!0;var ie=Array.isArray;function he(){}var ae={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function le(j,Y,F){var ee=F.ref;return{$$typeof:l,type:j,key:Y,ref:ee!==void 0?ee:null,props:F}}function re(j,Y){return le(j.type,Y,j.props)}function ye(j){return typeof j=="object"&&j!==null&&j.$$typeof===l}function Z(j){var Y={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(F){return Y[F]})}var we=/\/+/g;function me(j,Y){return typeof j=="object"&&j!==null&&j.key!=null?Z(""+j.key):Y.toString(36)}function pe(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(he,he):(j.status="pending",j.then(function(Y){j.status==="pending"&&(j.status="fulfilled",j.value=Y)},function(Y){j.status==="pending"&&(j.status="rejected",j.reason=Y)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function M(j,Y,F,ee,be){var _e=typeof j;(_e==="undefined"||_e==="boolean")&&(j=null);var Te=!1;if(j===null)Te=!0;else switch(_e){case"bigint":case"string":case"number":Te=!0;break;case"object":switch(j.$$typeof){case l:case i:Te=!0;break;case b:return Te=j._init,M(Te(j._payload),Y,F,ee,be)}}if(Te)return be=be(j),Te=ee===""?"."+me(j,0):ee,ie(be)?(F="",Te!=null&&(F=Te.replace(we,"$&/")+"/"),M(be,Y,F,"",function(ze){return ze})):be!=null&&(ye(be)&&(be=re(be,F+(be.key==null||j&&j.key===be.key?"":(""+be.key).replace(we,"$&/")+"/")+Te)),Y.push(be)),1;Te=0;var rt=ee===""?".":ee+":";if(ie(j))for(var se=0;se<j.length;se++)ee=j[se],_e=rt+me(ee,se),Te+=M(ee,Y,F,_e,be);else if(se=_(j),typeof se=="function")for(j=se.call(j),se=0;!(ee=j.next()).done;)ee=ee.value,_e=rt+me(ee,se++),Te+=M(ee,Y,F,_e,be);else if(_e==="object"){if(typeof j.then=="function")return M(pe(j),Y,F,ee,be);throw Y=String(j),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return Te}function Q(j,Y,F){if(j==null)return j;var ee=[],be=0;return M(j,ee,"","",function(_e){return Y.call(F,_e,be++)}),ee}function ne(j){if(j._status===-1){var Y=j._result;Y=Y(),Y.then(function(F){(j._status===0||j._status===-1)&&(j._status=1,j._result=F)},function(F){(j._status===0||j._status===-1)&&(j._status=2,j._result=F)}),j._status===-1&&(j._status=0,j._result=Y)}if(j._status===1)return j._result.default;throw j._result}var P=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},Ee={map:Q,forEach:function(j,Y,F){Q(j,function(){Y.apply(this,arguments)},F)},count:function(j){var Y=0;return Q(j,function(){Y++}),Y},toArray:function(j){return Q(j,function(Y){return Y})||[]},only:function(j){if(!ye(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return Re.Activity=v,Re.Children=Ee,Re.Component=K,Re.Fragment=r,Re.Profiler=u,Re.PureComponent=$,Re.StrictMode=s,Re.Suspense=y,Re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ae,Re.__COMPILER_RUNTIME={__proto__:null,c:function(j){return ae.H.useMemoCache(j)}},Re.cache=function(j){return function(){return j.apply(null,arguments)}},Re.cacheSignal=function(){return null},Re.cloneElement=function(j,Y,F){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var ee=U({},j.props),be=j.key;if(Y!=null)for(_e in Y.key!==void 0&&(be=""+Y.key),Y)!z.call(Y,_e)||_e==="key"||_e==="__self"||_e==="__source"||_e==="ref"&&Y.ref===void 0||(ee[_e]=Y[_e]);var _e=arguments.length-2;if(_e===1)ee.children=F;else if(1<_e){for(var Te=Array(_e),rt=0;rt<_e;rt++)Te[rt]=arguments[rt+2];ee.children=Te}return le(j.type,be,ee)},Re.createContext=function(j){return j={$$typeof:d,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:f,_context:j},j},Re.createElement=function(j,Y,F){var ee,be={},_e=null;if(Y!=null)for(ee in Y.key!==void 0&&(_e=""+Y.key),Y)z.call(Y,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(be[ee]=Y[ee]);var Te=arguments.length-2;if(Te===1)be.children=F;else if(1<Te){for(var rt=Array(Te),se=0;se<Te;se++)rt[se]=arguments[se+2];be.children=rt}if(j&&j.defaultProps)for(ee in Te=j.defaultProps,Te)be[ee]===void 0&&(be[ee]=Te[ee]);return le(j,_e,be)},Re.createRef=function(){return{current:null}},Re.forwardRef=function(j){return{$$typeof:m,render:j}},Re.isValidElement=ye,Re.lazy=function(j){return{$$typeof:b,_payload:{_status:-1,_result:j},_init:ne}},Re.memo=function(j,Y){return{$$typeof:p,type:j,compare:Y===void 0?null:Y}},Re.startTransition=function(j){var Y=ae.T,F={};ae.T=F;try{var ee=j(),be=ae.S;be!==null&&be(F,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(he,P)}catch(_e){P(_e)}finally{Y!==null&&F.types!==null&&(Y.types=F.types),ae.T=Y}},Re.unstable_useCacheRefresh=function(){return ae.H.useCacheRefresh()},Re.use=function(j){return ae.H.use(j)},Re.useActionState=function(j,Y,F){return ae.H.useActionState(j,Y,F)},Re.useCallback=function(j,Y){return ae.H.useCallback(j,Y)},Re.useContext=function(j){return ae.H.useContext(j)},Re.useDebugValue=function(){},Re.useDeferredValue=function(j,Y){return ae.H.useDeferredValue(j,Y)},Re.useEffect=function(j,Y){return ae.H.useEffect(j,Y)},Re.useEffectEvent=function(j){return ae.H.useEffectEvent(j)},Re.useId=function(){return ae.H.useId()},Re.useImperativeHandle=function(j,Y,F){return ae.H.useImperativeHandle(j,Y,F)},Re.useInsertionEffect=function(j,Y){return ae.H.useInsertionEffect(j,Y)},Re.useLayoutEffect=function(j,Y){return ae.H.useLayoutEffect(j,Y)},Re.useMemo=function(j,Y){return ae.H.useMemo(j,Y)},Re.useOptimistic=function(j,Y){return ae.H.useOptimistic(j,Y)},Re.useReducer=function(j,Y,F){return ae.H.useReducer(j,Y,F)},Re.useRef=function(j){return ae.H.useRef(j)},Re.useState=function(j){return ae.H.useState(j)},Re.useSyncExternalStore=function(j,Y,F){return ae.H.useSyncExternalStore(j,Y,F)},Re.useTransition=function(){return ae.H.useTransition()},Re.version="19.2.4",Re}var ip;function Fs(){return ip||(ip=1,Sc.exports=Gx()),Sc.exports}var S=Fs();const Fl=vx(S),Kx=yx({__proto__:null,default:Fl},[S]),Xx=(l,i,r,s)=>{const u=[r,{code:i,...s||{}}];if(l?.services?.logger?.forward)return l.services.logger.forward(u,"warn","react-i18next::",!0);il(u[0])&&(u[0]=`react-i18next:: ${u[0]}`),l?.services?.logger?.warn?l.services.logger.warn(...u):console?.warn&&console.warn(...u)},rp={},hg=(l,i,r,s)=>{il(r)&&rp[r]||(il(r)&&(rp[r]=new Date),Xx(l,i,r,s))},mg=(l,i)=>()=>{if(l.isInitialized)i();else{const r=()=>{setTimeout(()=>{l.off("initialized",r)},0),i()};l.on("initialized",r)}},kc=(l,i,r)=>{l.loadNamespaces(i,mg(l,r))},sp=(l,i,r,s)=>{if(il(r)&&(r=[r]),l.options.preload&&l.options.preload.indexOf(i)>-1)return kc(l,r,s);r.forEach(u=>{l.options.ns.indexOf(u)<0&&l.options.ns.push(u)}),l.loadLanguages(i,mg(l,s))},Qx=(l,i,r={})=>!i.languages||!i.languages.length?(hg(i,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:i.languages}),!0):i.hasLoadedNamespace(l,{lng:r.lng,precheck:(s,u)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!u(s.isLanguageChangingTo,l))return!1}}),il=l=>typeof l=="string",Zx=l=>typeof l=="object"&&l!==null,$x=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Jx={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},Fx=l=>Jx[l],Wx=l=>l.replace($x,Fx);let Bc={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Wx,transDefaultProps:void 0};const Px=(l={})=>{Bc={...Bc,...l}},Ix=()=>Bc;let pg;const e0=l=>{pg=l},t0=()=>pg,a0={type:"3rdParty",init(l){Px(l.options.react),e0(l)}},n0=S.createContext();class l0{constructor(){this.usedNamespaces={}}addUsedNamespaces(i){i.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var Ec={exports:{}},_c={};var op;function i0(){if(op)return _c;op=1;var l=Fs();function i(v,E){return v===E&&(v!==0||1/v===1/E)||v!==v&&E!==E}var r=typeof Object.is=="function"?Object.is:i,s=l.useState,u=l.useEffect,f=l.useLayoutEffect,d=l.useDebugValue;function m(v,E){var _=E(),C=s({inst:{value:_,getSnapshot:E}}),U=C[0].inst,D=C[1];return f(function(){U.value=_,U.getSnapshot=E,y(U)&&D({inst:U})},[v,_,E]),u(function(){return y(U)&&D({inst:U}),v(function(){y(U)&&D({inst:U})})},[v]),d(_),_}function y(v){var E=v.getSnapshot;v=v.value;try{var _=E();return!r(v,_)}catch{return!0}}function p(v,E){return E()}var b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:m;return _c.useSyncExternalStore=l.useSyncExternalStore!==void 0?l.useSyncExternalStore:b,_c}var up;function r0(){return up||(up=1,Ec.exports=i0()),Ec.exports}var s0=r0();const o0=(l,i)=>il(i)?i:Zx(i)&&il(i.defaultValue)?i.defaultValue:Array.isArray(l)?l[l.length-1]:l,u0={t:o0,ready:!1},c0=()=>()=>{},Me=(l,i={})=>{const{i18n:r}=i,{i18n:s,defaultNS:u}=S.useContext(n0)||{},f=r||s||t0();f&&!f.reportNamespaces&&(f.reportNamespaces=new l0),f||hg(f,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const d=S.useMemo(()=>({...Ix(),...f?.options?.react,...i}),[f,i]),{useSuspense:m,keyPrefix:y}=d,p=u||f?.options?.defaultNS,b=il(p)?[p]:p||["translation"],v=S.useMemo(()=>b,b);f?.reportNamespaces?.addUsedNamespaces?.(v);const E=S.useRef(0),_=S.useCallback(le=>{if(!f)return c0;const{bindI18n:re,bindI18nStore:ye}=d,Z=()=>{E.current+=1,le()};return re&&f.on(re,Z),ye&&f.store.on(ye,Z),()=>{re&&re.split(" ").forEach(we=>f.off(we,Z)),ye&&ye.split(" ").forEach(we=>f.store.off(we,Z))}},[f,d]),C=S.useRef(),U=S.useCallback(()=>{if(!f)return u0;const le=!!(f.isInitialized||f.initializedStoreOnce)&&v.every(pe=>Qx(pe,f,d)),re=i.lng||f.language,ye=E.current,Z=C.current;if(Z&&Z.ready===le&&Z.lng===re&&Z.keyPrefix===y&&Z.revision===ye)return Z;const me={t:f.getFixedT(re,d.nsMode==="fallback"?v:v[0],y),ready:le,lng:re,keyPrefix:y,revision:ye};return C.current=me,me},[f,v,y,d,i.lng]),[D,K]=S.useState(0),{t:B,ready:$}=s0.useSyncExternalStore(_,U,U);S.useEffect(()=>{if(f&&!$&&!m){const le=()=>K(re=>re+1);i.lng?sp(f,i.lng,v,le):kc(f,v,le)}},[f,i.lng,v,$,m,D]);const te=f||{},ie=S.useRef(null),he=S.useRef(),ae=le=>{const re=Object.getOwnPropertyDescriptors(le);re.__original&&delete re.__original;const ye=Object.create(Object.getPrototypeOf(le),re);if(!Object.prototype.hasOwnProperty.call(ye,"__original"))try{Object.defineProperty(ye,"__original",{value:le,writable:!1,enumerable:!1,configurable:!1})}catch{}return ye},z=S.useMemo(()=>{const le=te,re=le?.language;let ye=le;le&&(ie.current&&ie.current.__original===le?he.current!==re?(ye=ae(le),ie.current=ye,he.current=re):ye=ie.current:(ye=ae(le),ie.current=ye,he.current=re));const Z=[B,ye,$];return Z.t=B,Z.i18n=ye,Z.ready=$,Z},[B,te,$,te.resolvedLanguage,te.language,te.languages]);if(f&&m&&!$)throw new Promise(le=>{const re=()=>le();i.lng?sp(f,i.lng,v,re):kc(f,v,re)});return z},{slice:f0,forEach:d0}=[];function h0(l){return d0.call(f0.call(arguments,1),i=>{if(i)for(const r in i)l[r]===void 0&&(l[r]=i[r])}),l}function m0(l){return typeof l!="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(l))}const cp=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,p0=function(l,i){const s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},u=encodeURIComponent(i);let f=`${l}=${u}`;if(s.maxAge>0){const d=s.maxAge-0;if(Number.isNaN(d))throw new Error("maxAge should be a Number");f+=`; Max-Age=${Math.floor(d)}`}if(s.domain){if(!cp.test(s.domain))throw new TypeError("option domain is invalid");f+=`; Domain=${s.domain}`}if(s.path){if(!cp.test(s.path))throw new TypeError("option path is invalid");f+=`; Path=${s.path}`}if(s.expires){if(typeof s.expires.toUTCString!="function")throw new TypeError("option expires is invalid");f+=`; Expires=${s.expires.toUTCString()}`}if(s.httpOnly&&(f+="; HttpOnly"),s.secure&&(f+="; Secure"),s.sameSite)switch(typeof s.sameSite=="string"?s.sameSite.toLowerCase():s.sameSite){case!0:f+="; SameSite=Strict";break;case"lax":f+="; SameSite=Lax";break;case"strict":f+="; SameSite=Strict";break;case"none":f+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s.partitioned&&(f+="; Partitioned"),f},fp={create(l,i,r,s){let u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(u.expires=new Date,u.expires.setTime(u.expires.getTime()+r*60*1e3)),s&&(u.domain=s),document.cookie=p0(l,i,u)},read(l){const i=`${l}=`,r=document.cookie.split(";");for(let s=0;s<r.length;s++){let u=r[s];for(;u.charAt(0)===" ";)u=u.substring(1,u.length);if(u.indexOf(i)===0)return u.substring(i.length,u.length)}return null},remove(l,i){this.create(l,"",-1,i)}};var g0={name:"cookie",lookup(l){let{lookupCookie:i}=l;if(i&&typeof document<"u")return fp.read(i)||void 0},cacheUserLanguage(l,i){let{lookupCookie:r,cookieMinutes:s,cookieDomain:u,cookieOptions:f}=i;r&&typeof document<"u"&&fp.create(r,l,s,u,f)}},y0={name:"querystring",lookup(l){let{lookupQuerystring:i}=l,r;if(typeof window<"u"){let{search:s}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(s=window.location.hash.substring(window.location.hash.indexOf("?")));const f=s.substring(1).split("&");for(let d=0;d<f.length;d++){const m=f[d].indexOf("=");m>0&&f[d].substring(0,m)===i&&(r=f[d].substring(m+1))}}return r}},v0={name:"hash",lookup(l){let{lookupHash:i,lookupFromHashIndex:r}=l,s;if(typeof window<"u"){const{hash:u}=window.location;if(u&&u.length>2){const f=u.substring(1);if(i){const d=f.split("&");for(let m=0;m<d.length;m++){const y=d[m].indexOf("=");y>0&&d[m].substring(0,y)===i&&(s=d[m].substring(y+1))}}if(s)return s;if(!s&&r>-1){const d=u.match(/\/([a-zA-Z-]*)/g);return Array.isArray(d)?d[typeof r=="number"?r:0]?.replace("/",""):void 0}}}return s}};let Zl=null;const dp=()=>{if(Zl!==null)return Zl;try{if(Zl=typeof window<"u"&&window.localStorage!==null,!Zl)return!1;const l="i18next.translate.boo";window.localStorage.setItem(l,"foo"),window.localStorage.removeItem(l)}catch{Zl=!1}return Zl};var x0={name:"localStorage",lookup(l){let{lookupLocalStorage:i}=l;if(i&&dp())return window.localStorage.getItem(i)||void 0},cacheUserLanguage(l,i){let{lookupLocalStorage:r}=i;r&&dp()&&window.localStorage.setItem(r,l)}};let $l=null;const hp=()=>{if($l!==null)return $l;try{if($l=typeof window<"u"&&window.sessionStorage!==null,!$l)return!1;const l="i18next.translate.boo";window.sessionStorage.setItem(l,"foo"),window.sessionStorage.removeItem(l)}catch{$l=!1}return $l};var b0={name:"sessionStorage",lookup(l){let{lookupSessionStorage:i}=l;if(i&&hp())return window.sessionStorage.getItem(i)||void 0},cacheUserLanguage(l,i){let{lookupSessionStorage:r}=i;r&&hp()&&window.sessionStorage.setItem(r,l)}},S0={name:"navigator",lookup(l){const i=[];if(typeof navigator<"u"){const{languages:r,userLanguage:s,language:u}=navigator;if(r)for(let f=0;f<r.length;f++)i.push(r[f]);s&&i.push(s),u&&i.push(u)}return i.length>0?i:void 0}},E0={name:"htmlTag",lookup(l){let{htmlTag:i}=l,r;const s=i||(typeof document<"u"?document.documentElement:null);return s&&typeof s.getAttribute=="function"&&(r=s.getAttribute("lang")),r}},_0={name:"path",lookup(l){let{lookupFromPathIndex:i}=l;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}},N0={name:"subdomain",lookup(l){let{lookupFromSubdomainIndex:i}=l;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 gg=!1;try{document.cookie,gg=!0}catch{}const yg=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];gg||yg.splice(1,1);const j0=()=>({order:yg,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:l=>l});class vg{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=h0(r,this.options||{},j0()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=u=>u.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=s,this.addDetector(g0),this.addDetector(y0),this.addDetector(x0),this.addDetector(b0),this.addDetector(S0),this.addDetector(E0),this.addDetector(_0),this.addDetector(N0),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 u=this.detectors[s].lookup(this.options);u&&typeof u=="string"&&(u=[u]),u&&(r=r.concat(u))}}),r=r.filter(s=>s!=null&&!m0(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)}))}}vg.type="languageDetector";const w0={"nav.home":"Home","nav.studio":"Studio","nav.docs":"Docs","nav.login":"Login","nav.logout":"Logout","header.status.connected":"Connected","header.status.disconnected":"Disconnected","header.status.reconnecting":"Reconnecting","footer.copyright":"GitHub · @Context4AI {{year}}. All rights reserved.","footer.tagline":"Knowledge Factory","footer.theme.dark":"Dark","footer.theme.light":"Light","footer.theme.system":"System","studio.sidebar.sources":"Sources","studio.sidebar.modeling":"Modeling","studio.sidebar.brain":"Brain","studio.sidebar.discovery":"Discovery","studio.sidebar.sharing":"Sharing","studio.sidebar.collaboration":"Collaboration","studio.sidebar.settings":"Settings","placeholder.coming":"Coming in {{version}}","page.login.title":"Login","page.login.description":"Authentication and user management.","page.docs.title":"Docs","page.docs.description":"Public documentation portal.","page.sources.title":"Sources","page.sources.description":"Add code repositories, documents, and other input materials for your brain to index.","page.modeling.title":"Modeling","page.modeling.description":"Model indexed content with AI — only what stands up to scrutiny gets written to the knowledge graph.","page.brain.title":"Brain","page.brain.description":"All modeled knowledge lives here — browse, search, analyze, and use it anytime.","page.discovery.title":"Discovery","page.discovery.description":"Explore knowledge curated by others and add what's useful to your own brain.","page.sharing.title":"Sharing","page.sharing.description":"Package and export knowledge from your brain for others and AI to use directly.","page.collaboration.title":"Collaboration","page.collaboration.description":"Stay in sync with other brains — get notified on updates, no manual transfer needed.","page.settings.title":"Settings","page.settings.description":"Manage workspace members and configuration.","page.code_setup.title":"Code Setup","page.code_setup.description":"Repository selection and configuration for code modeling.","page.code_compile.title":"Code Compile","page.code_compile.description":"Compilation progress tracking for code modeling.","page.code_review.title":"Code Review","page.code_review.description":"Review and approve modeling results.","page.code_result.title":"Code Result","page.code_result.description":"View final modeling results and generated knowledge graph.","home.hero.title":"Context For AI","home.hero.description":"Transform code repositories and business documents into structured knowledge graphs.","home.hero.cta.studio":"Enter Studio","home.hero.cta.github":"GitHub","notfound.title":"404","notfound.description":"The page you're looking for doesn't exist.","notfound.back":"Back to Home","sources.menu.add_client":"Add Client","sources.menu.online":"online","sources.menu.offline":"offline","sources.library.default_cloud_name":"Personal Cloud","sources.library.rename":"Rename","sources.library.rename_placeholder":"Enter library name","sources.header.daemon_status":"{{online}}/{{total}} online","sources.header.all_offline":"All offline","sources.actions.new_folder":"New Folder","sources.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. (Document upload coming soon)","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.safety.notice":"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.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.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.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.status":"Status","sources.detail.repo":"Repository","sources.detail.branch":"Branch","sources.detail.commit":"Commit","sources.detail.tech_stack":"Tech stack","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.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.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.breadcrumb.sources":"Sources","common.cancel":"Cancel","common.confirm":"Confirm","common.back":"Back","common.next":"Next","common.previous":"Previous","common.items":"{{count}} items"},R0={"nav.home":"首页","nav.studio":"工作台","nav.docs":"文档","nav.login":"登录","nav.logout":"退出登录","header.status.connected":"已连接","header.status.disconnected":"已断开","header.status.reconnecting":"重连中","footer.copyright":"GitHub · @Context4AI {{year}}. 版权所有 ","footer.tagline":"知识工厂","footer.theme.dark":"暗色","footer.theme.light":"亮色","footer.theme.system":"跟随系统","studio.sidebar.sources":"知识索引","studio.sidebar.modeling":"知识建模","studio.sidebar.brain":"知识大脑","studio.sidebar.discovery":"发现知识","studio.sidebar.sharing":"分享知识","studio.sidebar.collaboration":"知识协同","studio.sidebar.settings":"设置","placeholder.coming":"计划在 {{version}} 版本实现","page.login.title":"登录","page.login.description":"身份验证与用户管理。","page.docs.title":"文档","page.docs.description":"公开文档门户。","page.sources.title":"知识索引","page.sources.description":"添加代码仓库、文档等输入材料,让大脑完成初步索引。","page.modeling.title":"知识建模","page.modeling.description":"和 AI 一起对索引内容建模,只有经得起推敲的才写入知识图谱。","page.brain.title":"知识大脑","page.brain.description":"建模完成的全部知识都在这里——浏览、搜索、分析,随时调用。","page.discovery.title":"发现知识","page.discovery.description":"看看别人整理好的知识,发现有用的一键补充到自己的大脑。","page.sharing.title":"分享知识","page.sharing.description":"把大脑中的知识打包输出,让别人和 AI 都能直接使用。","page.collaboration.title":"知识协同","page.collaboration.description":"和其他大脑保持同步,知识更新时自动通知,不用手动搬运。","page.settings.title":"设置","page.settings.description":"管理大脑的成员和配置。","page.code_setup.title":"代码设置","page.code_setup.description":"代码建模的仓库选择与配置。","page.code_compile.title":"代码编译","page.code_compile.description":"代码建模的编译进度追踪。","page.code_review.title":"代码审查","page.code_review.description":"审查并确认建模结果。","page.code_result.title":"代码结果","page.code_result.description":"查看最终建模结果与生成的知识图谱。","home.hero.title":"Context For AI","home.hero.description":"将代码仓库和业务文档转化为结构化知识图谱。","home.hero.cta.studio":"进入工作台","home.hero.cta.github":"GitHub","notfound.title":"404","notfound.description":"您访问的页面不存在。","notfound.back":"返回首页","sources.menu.add_client":"添加客户端","sources.menu.online":"在线","sources.menu.offline":"离线","sources.library.default_cloud_name":"个人云","sources.library.rename":"重命名","sources.library.rename_placeholder":"输入名称","sources.header.daemon_status":"{{online}}/{{total}} 在线","sources.header.all_offline":"全部离线","sources.actions.new_folder":"新建文件夹","sources.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.safety.notice":"你的代码保有绝对隐私。源代码永远不会离开你的电脑,系统仅提取用于知识建模的结构化摘要(函数签名、依赖关系等)。","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.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.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.status":"状态","sources.detail.repo":"仓库","sources.detail.branch":"分支","sources.detail.commit":"提交","sources.detail.tech_stack":"技术栈","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.irreversible":"此操作不可撤销。","sources.delete.repo":"确定要从 {{library}} 中移除仓库 {{name}}?","sources.delete.repo_impact":"将删除:{{packages}} 个包的索引记录、{{docs}} 篇文档的索引记录。","sources.delete.local_safe":"本地文件不受影响。","sources.delete.client":"确定要删除客户端 {{name}}?","sources.delete.client_impact":"该客户端下的所有已导入仓库记录和相关索引数据将被删除。","sources.delete.client_reregister":"该客户端下次连接时将触发重新注册。","sources.error.name_conflict":'该目录下已存在同名项"{{name}}"。',"sources.breadcrumb.sources":"知识索引","common.cancel":"取消","common.confirm":"确认","common.back":"返回","common.next":"下一步","common.previous":"上一步","common.items":"{{count}} 项"};Ht.use(vg).use(a0).init({resources:{en:{translation:w0},zh:{translation:R0}},fallbackLng:"en",interpolation:{escapeValue:!1},detection:{order:["localStorage"],caches:["localStorage"],lookupLocalStorage:"lang"}});var Nc={exports:{}},Fi={},jc={exports:{}},wc={};var mp;function C0(){return mp||(mp=1,(function(l){function i(M,Q){var ne=M.length;M.push(Q);e:for(;0<ne;){var P=ne-1>>>1,Ee=M[P];if(0<u(Ee,Q))M[P]=Q,M[ne]=Ee,ne=P;else break e}}function r(M){return M.length===0?null:M[0]}function s(M){if(M.length===0)return null;var Q=M[0],ne=M.pop();if(ne!==Q){M[0]=ne;e:for(var P=0,Ee=M.length,j=Ee>>>1;P<j;){var Y=2*(P+1)-1,F=M[Y],ee=Y+1,be=M[ee];if(0>u(F,ne))ee<Ee&&0>u(be,F)?(M[P]=be,M[ee]=ne,P=ee):(M[P]=F,M[Y]=ne,P=Y);else if(ee<Ee&&0>u(be,ne))M[P]=be,M[ee]=ne,P=ee;else break e}}return Q}function u(M,Q){var ne=M.sortIndex-Q.sortIndex;return ne!==0?ne:M.id-Q.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;l.unstable_now=function(){return f.now()}}else{var d=Date,m=d.now();l.unstable_now=function(){return d.now()-m}}var y=[],p=[],b=1,v=null,E=3,_=!1,C=!1,U=!1,D=!1,K=typeof setTimeout=="function"?setTimeout:null,B=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function te(M){for(var Q=r(p);Q!==null;){if(Q.callback===null)s(p);else if(Q.startTime<=M)s(p),Q.sortIndex=Q.expirationTime,i(y,Q);else break;Q=r(p)}}function ie(M){if(U=!1,te(M),!C)if(r(y)!==null)C=!0,he||(he=!0,Z());else{var Q=r(p);Q!==null&&pe(ie,Q.startTime-M)}}var he=!1,ae=-1,z=5,le=-1;function re(){return D?!0:!(l.unstable_now()-le<z)}function ye(){if(D=!1,he){var M=l.unstable_now();le=M;var Q=!0;try{e:{C=!1,U&&(U=!1,B(ae),ae=-1),_=!0;var ne=E;try{t:{for(te(M),v=r(y);v!==null&&!(v.expirationTime>M&&re());){var P=v.callback;if(typeof P=="function"){v.callback=null,E=v.priorityLevel;var Ee=P(v.expirationTime<=M);if(M=l.unstable_now(),typeof Ee=="function"){v.callback=Ee,te(M),Q=!0;break t}v===r(y)&&s(y),te(M)}else s(y);v=r(y)}if(v!==null)Q=!0;else{var j=r(p);j!==null&&pe(ie,j.startTime-M),Q=!1}}break e}finally{v=null,E=ne,_=!1}Q=void 0}}finally{Q?Z():he=!1}}}var Z;if(typeof $=="function")Z=function(){$(ye)};else if(typeof MessageChannel<"u"){var we=new MessageChannel,me=we.port2;we.port1.onmessage=ye,Z=function(){me.postMessage(null)}}else Z=function(){K(ye,0)};function pe(M,Q){ae=K(function(){M(l.unstable_now())},Q)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(M){M.callback=null},l.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<M?Math.floor(1e3/M):5},l.unstable_getCurrentPriorityLevel=function(){return E},l.unstable_next=function(M){switch(E){case 1:case 2:case 3:var Q=3;break;default:Q=E}var ne=E;E=Q;try{return M()}finally{E=ne}},l.unstable_requestPaint=function(){D=!0},l.unstable_runWithPriority=function(M,Q){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var ne=E;E=M;try{return Q()}finally{E=ne}},l.unstable_scheduleCallback=function(M,Q,ne){var P=l.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?P+ne:P):ne=P,M){case 1:var Ee=-1;break;case 2:Ee=250;break;case 5:Ee=1073741823;break;case 4:Ee=1e4;break;default:Ee=5e3}return Ee=ne+Ee,M={id:b++,callback:Q,priorityLevel:M,startTime:ne,expirationTime:Ee,sortIndex:-1},ne>P?(M.sortIndex=ne,i(p,M),r(y)===null&&M===r(p)&&(U?(B(ae),ae=-1):U=!0,pe(ie,ne-P))):(M.sortIndex=Ee,i(y,M),C||_||(C=!0,he||(he=!0,Z()))),M},l.unstable_shouldYield=re,l.unstable_wrapCallback=function(M){var Q=E;return function(){var ne=E;E=Q;try{return M.apply(this,arguments)}finally{E=ne}}}})(wc)),wc}var pp;function O0(){return pp||(pp=1,jc.exports=C0()),jc.exports}var Rc={exports:{}},Mt={};var gp;function T0(){if(gp)return Mt;gp=1;var l=Fs();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},u=Symbol.for("react.portal");function f(y,p,b){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:v==null?null:""+v,children:y,containerInfo:p,implementation:b}}var d=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(y,p){if(y==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Mt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,Mt.createPortal=function(y,p){var 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 f(y,p,null,b)},Mt.flushSync=function(y){var p=d.T,b=s.p;try{if(d.T=null,s.p=2,y)return y()}finally{d.T=p,s.p=b,s.d.f()}},Mt.preconnect=function(y,p){typeof y=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,s.d.C(y,p))},Mt.prefetchDNS=function(y){typeof y=="string"&&s.d.D(y)},Mt.preinit=function(y,p){if(typeof y=="string"&&p&&typeof p.as=="string"){var b=p.as,v=m(b,p.crossOrigin),E=typeof p.integrity=="string"?p.integrity:void 0,_=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;b==="style"?s.d.S(y,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:v,integrity:E,fetchPriority:_}):b==="script"&&s.d.X(y,{crossOrigin:v,integrity:E,fetchPriority:_,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Mt.preinitModule=function(y,p){if(typeof y=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var 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)},Mt.preload=function(y,p){if(typeof y=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var b=p.as,v=m(b,p.crossOrigin);s.d.L(y,b,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Mt.preloadModule=function(y,p){if(typeof y=="string")if(p){var 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)},Mt.requestFormReset=function(y){s.d.r(y)},Mt.unstable_batchedUpdates=function(y,p){return y(p)},Mt.useFormState=function(y,p,b){return d.H.useFormState(y,p,b)},Mt.useFormStatus=function(){return d.H.useHostTransitionStatus()},Mt.version="19.2.4",Mt}var yp;function z0(){if(yp)return Rc.exports;yp=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(i){console.error(i)}}return l(),Rc.exports=T0(),Rc.exports}var vp;function M0(){if(vp)return Fi;vp=1;var l=O0(),i=Fs(),r=z0();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 u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(f(e)!==e)throw Error(s(188))}function p(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(s(188));return t!==e?null:e}for(var a=e,n=t;;){var o=a.return;if(o===null)break;var c=o.alternate;if(c===null){if(n=o.return,n!==null){a=n;continue}break}if(o.child===c.child){for(c=o.child;c;){if(c===a)return y(o),e;if(c===n)return y(o),t;c=c.sibling}throw Error(s(188))}if(a.return!==n.return)a=o,n=c;else{for(var h=!1,x=o.child;x;){if(x===a){h=!0,a=o,n=c;break}if(x===n){h=!0,n=o,a=c;break}x=x.sibling}if(!h){for(x=c.child;x;){if(x===a){h=!0,a=c,n=o;break}if(x===n){h=!0,n=c,a=o;break}x=x.sibling}if(!h)throw Error(s(189))}}if(a.alternate!==n)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 v=Object.assign,E=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),U=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),$=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),ie=Symbol.for("react.suspense"),he=Symbol.for("react.suspense_list"),ae=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),le=Symbol.for("react.activity"),re=Symbol.for("react.memo_cache_sentinel"),ye=Symbol.iterator;function Z(e){return e===null||typeof e!="object"?null:(e=ye&&e[ye]||e["@@iterator"],typeof e=="function"?e:null)}var we=Symbol.for("react.client.reference");function me(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===we?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case U:return"Fragment";case K:return"Profiler";case D:return"StrictMode";case ie:return"Suspense";case he:return"SuspenseList";case le:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case $:return e.displayName||"Context";case B:return(e._context.displayName||"Context")+".Consumer";case te:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ae:return t=e.displayName||null,t!==null?t:me(e.type)||"Memo";case z:t=e._payload,e=e._init;try{return me(e(t))}catch{}}return null}var pe=Array.isArray,M=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},P=[],Ee=-1;function j(e){return{current:e}}function Y(e){0>Ee||(e.current=P[Ee],P[Ee]=null,Ee--)}function F(e,t){Ee++,P[Ee]=e.current,e.current=t}var ee=j(null),be=j(null),_e=j(null),Te=j(null);function rt(e,t){switch(F(_e,t),F(be,e),F(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?dm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=dm(t),e=hm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Y(ee),F(ee,e)}function se(){Y(ee),Y(be),Y(_e)}function ze(e){e.memoizedState!==null&&F(Te,e);var t=ee.current,a=hm(t,e.type);t!==a&&(F(be,e),F(ee,a))}function st(e){be.current===e&&(Y(ee),Y(be)),Te.current===e&&(Y(Te),Ki._currentValue=ne)}var Na,bt;function kt(e){if(Na===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Na=t&&t[1]||"",bt=-1<a.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+Na+e+bt}var ol=!1;function ai(e,t){if(!e||ol)return"";ol=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(q){var H=q}Reflect.construct(e,[],X)}else{try{X.call()}catch(q){H=q}e.call(X.prototype)}}else{try{throw Error()}catch(q){H=q}(X=e())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(q){if(q&&H&&typeof q.stack=="string")return[q.stack,H.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=n.DetermineComponentFrameRoot(),h=c[0],x=c[1];if(h&&x){var N=h.split(`
4
+ `),L=x.split(`
5
+ `);for(o=n=0;n<N.length&&!N[n].includes("DetermineComponentFrameRoot");)n++;for(;o<L.length&&!L[o].includes("DetermineComponentFrameRoot");)o++;if(n===N.length||o===L.length)for(n=N.length-1,o=L.length-1;1<=n&&0<=o&&N[n]!==L[o];)o--;for(;1<=n&&0<=o;n--,o--)if(N[n]!==L[o]){if(n!==1||o!==1)do if(n--,o--,0>o||N[n]!==L[o]){var V=`
6
+ `+N[n].replace(" at new "," at ");return e.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",e.displayName)),V}while(1<=n&&0<=o);break}}}finally{ol=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?kt(a):""}function La(e,t){switch(e.tag){case 26:case 27:case 5:return kt(e.type);case 16:return kt("Lazy");case 13:return e.child!==t&&t!==null?kt("Suspense Fallback"):kt("Suspense");case 19:return kt("SuspenseList");case 0:case 15:return ai(e.type,!1);case 11:return ai(e.type.render,!1);case 1:return ai(e.type,!0);case 31:return kt("Activity");default:return""}}function yr(e){try{var t="",a=null;do t+=La(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
7
+ Error generating stack: `+n.message+`
8
+ `+n.stack}}var ni=Object.prototype.hasOwnProperty,ul=l.unstable_scheduleCallback,li=l.unstable_cancelCallback,io=l.unstable_shouldYield,ro=l.unstable_requestPaint,At=l.unstable_now,Ua=l.unstable_getCurrentPriorityLevel,rn=l.unstable_ImmediatePriority,ii=l.unstable_UserBlockingPriority,sn=l.unstable_NormalPriority,ga=l.unstable_LowPriority,aa=l.unstable_IdlePriority,vr=l.log,so=l.unstable_setDisableYieldValue,Ha=null,Lt=null;function _t(e){if(typeof vr=="function"&&so(e),Lt&&typeof Lt.setStrictMode=="function")try{Lt.setStrictMode(Ha,e)}catch{}}var Tt=Math.clz32?Math.clz32:oo,xr=Math.log,br=Math.LN2;function oo(e){return e>>>=0,e===0?32:31-(xr(e)/br|0)|0}var Hn=256,ka=262144,kn=4194304;function ya(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 cl(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var o=0,c=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var x=n&134217727;return x!==0?(n=x&~c,n!==0?o=ya(n):(h&=x,h!==0?o=ya(h):a||(a=x&~e,a!==0&&(o=ya(a))))):(x=n&~c,x!==0?o=ya(x):h!==0?o=ya(h):a||(a=n&~e,a!==0&&(o=ya(a)))),o===0?0:t!==0&&t!==o&&(t&c)===0&&(c=o&-o,a=t&-t,c>=a||c===32&&(a&4194048)!==0)?t:o}function on(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function uo(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 ri(){var e=kn;return kn<<=1,(kn&62914560)===0&&(kn=4194304),e}function un(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function ja(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Sr(e,t,a,n,o,c){var h=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 x=e.entanglements,N=e.expirationTimes,L=e.hiddenUpdates;for(a=h&~a;0<a;){var V=31-Tt(a),X=1<<V;x[V]=0,N[V]=-1;var H=L[V];if(H!==null)for(L[V]=null,V=0;V<H.length;V++){var q=H[V];q!==null&&(q.lane&=-536870913)}a&=~X}n!==0&&Er(e,n,0),c!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=c&~(h&~t))}function Er(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-Tt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function _r(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-Tt(a),o=1<<n;o&t|e[n]&t&&(e[n]|=t),a&=~o}}function w(e,t){var a=t&-t;return a=(a&42)!==0?1:O(a),(a&(e.suspendedLanes|t))!==0?0:a}function O(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function k(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function J(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:Um(e.type))}function W(e,t){var a=Q.p;try{return Q.p=e,t()}finally{Q.p=a}}var ce=Math.random().toString(36).slice(2),I="__reactFiber$"+ce,oe="__reactProps$"+ce,ue="__reactContainer$"+ce,ve="__reactEvents$"+ce,Se="__reactListeners$"+ce,ge="__reactHandles$"+ce,Ve="__reactResources$"+ce,Ae="__reactMarker$"+ce;function Pe(e){delete e[I],delete e[oe],delete e[ve],delete e[Se],delete e[ge]}function tt(e){var t=e[I];if(t)return t;for(var a=e.parentNode;a;){if(t=a[ue]||a[I]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=bm(e);e!==null;){if(a=e[I])return a;e=bm(e)}return t}e=a,a=e.parentNode}return null}function ot(e){if(e=e[I]||e[ue]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ye(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function St(e){var t=e[Ve];return t||(t=e[Ve]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function et(e){e[Ae]=!0}var cn=new Set,va={};function Nt(e,t){wa(e,t),wa(e+"Capture",t)}function wa(e,t){for(va[e]=t,e=0;e<t.length;e++)cn.add(t[e])}var Bn=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]*$"),Ra={},qn={};function fl(e){return ni.call(qn,e)?!0:ni.call(Ra,e)?!1:Bn.test(e)?qn[e]=!0:(Ra[e]=!0,!1)}function Le(e,t,a){if(fl(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function dt(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 zt(e,t,a,n){if(n===null)e.removeAttribute(a);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+n)}}function pt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function at(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function dl(e,t,a){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,c=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(h){a=""+h,c.call(this,h)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(h){a=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function hl(e){if(!e._valueTracker){var t=at(e)?"checked":"value";e._valueTracker=dl(e,t,""+e[t])}}function Nr(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=at(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function jr(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 fy=/[\n"\\]/g;function na(e){return e.replace(fy,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function co(e,t,a,n,o,c,h,x){e.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.type=h:e.removeAttribute("type"),t!=null?h==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+pt(t)):e.value!==""+pt(t)&&(e.value=""+pt(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?fo(e,h,pt(t)):a!=null?fo(e,h,pt(a)):n!=null&&e.removeAttribute("value"),o==null&&c!=null&&(e.defaultChecked=!!c),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+pt(x):e.removeAttribute("name")}function rf(e,t,a,n,o,c,h,x){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||a!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){hl(e);return}a=a!=null?""+pt(a):"",t=t!=null?""+pt(t):a,x||t===e.value||(e.value=t),e.defaultValue=t}n=n??o,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=x?e.checked:!!n,e.defaultChecked=!!n,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),hl(e)}function fo(e,t,a){t==="number"&&jr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function ml(e,t,a,n){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&&n&&(e[a].defaultSelected=!0)}else{for(a=""+pt(a),t=null,o=0;o<e.length;o++){if(e[o].value===a){e[o].selected=!0,n&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function sf(e,t,a){if(t!=null&&(t=""+pt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+pt(a):""}function of(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(s(92));if(pe(n)){if(1<n.length)throw Error(s(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=pt(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n),hl(e)}function pl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var dy=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 uf(e,t,a){var n=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,a):typeof a!="number"||a===0||dy.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function cf(e,t,a){if(t!=null&&typeof t!="object")throw Error(s(62));if(e=e.style,a!=null){for(var n in a)!a.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var o in t)n=t[o],t.hasOwnProperty(o)&&a[o]!==n&&uf(e,o,n)}else for(var c in t)t.hasOwnProperty(c)&&uf(e,c,t[c])}function ho(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 hy=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"]]),my=/^[\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 wr(e){return my.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ba(){}var mo=null;function po(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var gl=null,yl=null;function ff(e){var t=ot(e);if(t&&(e=t.stateNode)){var a=e[oe]||null;e:switch(e=t.stateNode,t.type){case"input":if(co(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="'+na(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var o=n[oe]||null;if(!o)throw Error(s(90));co(n,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&Nr(n)}break e;case"textarea":sf(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&ml(e,!!a.multiple,t,!1)}}}var go=!1;function df(e,t,a){if(go)return e(t,a);go=!0;try{var n=e(t);return n}finally{if(go=!1,(gl!==null||yl!==null)&&(hs(),gl&&(t=gl,e=yl,yl=gl=null,ff(t),e)))for(t=0;t<e.length;t++)ff(e[t])}}function si(e,t){var a=e.stateNode;if(a===null)return null;var n=a[oe]||null;if(n===null)return null;a=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(s(231,t,typeof a));return a}var qa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yo=!1;if(qa)try{var oi={};Object.defineProperty(oi,"passive",{get:function(){yo=!0}}),window.addEventListener("test",oi,oi),window.removeEventListener("test",oi,oi)}catch{yo=!1}var fn=null,vo=null,Rr=null;function hf(){if(Rr)return Rr;var e,t=vo,a=t.length,n,o="value"in fn?fn.value:fn.textContent,c=o.length;for(e=0;e<a&&t[e]===o[e];e++);var h=a-e;for(n=1;n<=h&&t[a-n]===o[c-n];n++);return Rr=o.slice(e,1<n?1-n:void 0)}function Cr(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 Or(){return!0}function mf(){return!1}function Bt(e){function t(a,n,o,c,h){this._reactName=a,this._targetInst=o,this.type=n,this.nativeEvent=c,this.target=h,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(a=e[x],this[x]=a?a(c):c[x]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Or:mf,this.isPropagationStopped=mf,this}return v(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=Or)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Or)},persist:function(){},isPersistent:Or}),t}var Yn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Tr=Bt(Yn),ui=v({},Yn,{view:0,detail:0}),py=Bt(ui),xo,bo,ci,zr=v({},ui,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Eo,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!==ci&&(ci&&e.type==="mousemove"?(xo=e.screenX-ci.screenX,bo=e.screenY-ci.screenY):bo=xo=0,ci=e),xo)},movementY:function(e){return"movementY"in e?e.movementY:bo}}),pf=Bt(zr),gy=v({},zr,{dataTransfer:0}),yy=Bt(gy),vy=v({},ui,{relatedTarget:0}),So=Bt(vy),xy=v({},Yn,{animationName:0,elapsedTime:0,pseudoElement:0}),by=Bt(xy),Sy=v({},Yn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ey=Bt(Sy),_y=v({},Yn,{data:0}),gf=Bt(_y),Ny={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jy={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"},wy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ry(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=wy[e])?!!t[e]:!1}function Eo(){return Ry}var Cy=v({},ui,{key:function(e){if(e.key){var t=Ny[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Cr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?jy[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Eo,charCode:function(e){return e.type==="keypress"?Cr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Cr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Oy=Bt(Cy),Ty=v({},zr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yf=Bt(Ty),zy=v({},ui,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Eo}),My=Bt(zy),Dy=v({},Yn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ay=Bt(Dy),Ly=v({},zr,{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}),Uy=Bt(Ly),Hy=v({},Yn,{newState:0,oldState:0}),ky=Bt(Hy),By=[9,13,27,32],_o=qa&&"CompositionEvent"in window,fi=null;qa&&"documentMode"in document&&(fi=document.documentMode);var qy=qa&&"TextEvent"in window&&!fi,vf=qa&&(!_o||fi&&8<fi&&11>=fi),xf=" ",bf=!1;function Sf(e,t){switch(e){case"keyup":return By.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ef(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var vl=!1;function Yy(e,t){switch(e){case"compositionend":return Ef(t);case"keypress":return t.which!==32?null:(bf=!0,xf);case"textInput":return e=t.data,e===xf&&bf?null:e;default:return null}}function Vy(e,t){if(vl)return e==="compositionend"||!_o&&Sf(e,t)?(e=hf(),Rr=vo=fn=null,vl=!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 vf&&t.locale!=="ko"?null:t.data;default:return null}}var Gy={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 _f(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Gy[e.type]:t==="textarea"}function Nf(e,t,a,n){gl?yl?yl.push(n):yl=[n]:gl=n,t=bs(t,"onChange"),0<t.length&&(a=new Tr("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var di=null,hi=null;function Ky(e){rm(e,0)}function Mr(e){var t=Ye(e);if(Nr(t))return e}function jf(e,t){if(e==="change")return t}var wf=!1;if(qa){var No;if(qa){var jo="oninput"in document;if(!jo){var Rf=document.createElement("div");Rf.setAttribute("oninput","return;"),jo=typeof Rf.oninput=="function"}No=jo}else No=!1;wf=No&&(!document.documentMode||9<document.documentMode)}function Cf(){di&&(di.detachEvent("onpropertychange",Of),hi=di=null)}function Of(e){if(e.propertyName==="value"&&Mr(hi)){var t=[];Nf(t,hi,e,po(e)),df(Ky,t)}}function Xy(e,t,a){e==="focusin"?(Cf(),di=t,hi=a,di.attachEvent("onpropertychange",Of)):e==="focusout"&&Cf()}function Qy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Mr(hi)}function Zy(e,t){if(e==="click")return Mr(t)}function $y(e,t){if(e==="input"||e==="change")return Mr(t)}function Jy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Zt=typeof Object.is=="function"?Object.is:Jy;function mi(e,t){if(Zt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),n=Object.keys(t);if(a.length!==n.length)return!1;for(n=0;n<a.length;n++){var o=a[n];if(!ni.call(t,o)||!Zt(e[o],t[o]))return!1}return!0}function Tf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zf(e,t){var a=Tf(e);e=0;for(var n;a;){if(a.nodeType===3){if(n=e+a.textContent.length,e<=t&&n>=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Tf(a)}}function Mf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Mf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Df(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=jr(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=jr(e.document)}return t}function wo(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 Fy=qa&&"documentMode"in document&&11>=document.documentMode,xl=null,Ro=null,pi=null,Co=!1;function Af(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Co||xl==null||xl!==jr(n)||(n=xl,"selectionStart"in n&&wo(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),pi&&mi(pi,n)||(pi=n,n=bs(Ro,"onSelect"),0<n.length&&(t=new Tr("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=xl)))}function Vn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var bl={animationend:Vn("Animation","AnimationEnd"),animationiteration:Vn("Animation","AnimationIteration"),animationstart:Vn("Animation","AnimationStart"),transitionrun:Vn("Transition","TransitionRun"),transitionstart:Vn("Transition","TransitionStart"),transitioncancel:Vn("Transition","TransitionCancel"),transitionend:Vn("Transition","TransitionEnd")},Oo={},Lf={};qa&&(Lf=document.createElement("div").style,"AnimationEvent"in window||(delete bl.animationend.animation,delete bl.animationiteration.animation,delete bl.animationstart.animation),"TransitionEvent"in window||delete bl.transitionend.transition);function Gn(e){if(Oo[e])return Oo[e];if(!bl[e])return e;var t=bl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Lf)return Oo[e]=t[a];return e}var Uf=Gn("animationend"),Hf=Gn("animationiteration"),kf=Gn("animationstart"),Wy=Gn("transitionrun"),Py=Gn("transitionstart"),Iy=Gn("transitioncancel"),Bf=Gn("transitionend"),qf=new Map,To="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(" ");To.push("scrollEnd");function xa(e,t){qf.set(e,t),Nt(t,[e])}var Dr=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)},la=[],Sl=0,zo=0;function Ar(){for(var e=Sl,t=zo=Sl=0;t<e;){var a=la[t];la[t++]=null;var n=la[t];la[t++]=null;var o=la[t];la[t++]=null;var c=la[t];if(la[t++]=null,n!==null&&o!==null){var h=n.pending;h===null?o.next=o:(o.next=h.next,h.next=o),n.pending=o}c!==0&&Yf(a,o,c)}}function Lr(e,t,a,n){la[Sl++]=e,la[Sl++]=t,la[Sl++]=a,la[Sl++]=n,zo|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function Mo(e,t,a,n){return Lr(e,t,a,n),Ur(e)}function Kn(e,t){return Lr(e,null,null,t),Ur(e)}function Yf(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var o=!1,c=e.return;c!==null;)c.childLanes|=a,n=c.alternate,n!==null&&(n.childLanes|=a),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(o=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,o&&t!==null&&(o=31-Tt(a),e=c.hiddenUpdates,n=e[o],n===null?e[o]=[t]:n.push(t),t.lane=a|536870912),c):null}function Ur(e){if(50<Hi)throw Hi=0,Yu=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var El={};function ev(e,t,a,n){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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $t(e,t,a,n){return new ev(e,t,a,n)}function Do(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ya(e,t){var a=e.alternate;return a===null?(a=$t(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 Vf(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 Hr(e,t,a,n,o,c){var h=0;if(n=e,typeof e=="function")Do(e)&&(h=1);else if(typeof e=="string")h=ix(e,a,ee.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case le:return e=$t(31,a,t,o),e.elementType=le,e.lanes=c,e;case U:return Xn(a.children,o,c,t);case D:h=8,o|=24;break;case K:return e=$t(12,a,t,o|2),e.elementType=K,e.lanes=c,e;case ie:return e=$t(13,a,t,o),e.elementType=ie,e.lanes=c,e;case he:return e=$t(19,a,t,o),e.elementType=he,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case $:h=10;break e;case B:h=9;break e;case te:h=11;break e;case ae:h=14;break e;case z:h=16,n=null;break e}h=29,a=Error(s(130,e===null?"null":typeof e,"")),n=null}return t=$t(h,a,t,o),t.elementType=e,t.type=n,t.lanes=c,t}function Xn(e,t,a,n){return e=$t(7,e,n,t),e.lanes=a,e}function Ao(e,t,a){return e=$t(6,e,null,t),e.lanes=a,e}function Gf(e){var t=$t(18,null,null,0);return t.stateNode=e,t}function Lo(e,t,a){return t=$t(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Kf=new WeakMap;function ia(e,t){if(typeof e=="object"&&e!==null){var a=Kf.get(e);return a!==void 0?a:(t={value:e,source:t,stack:yr(t)},Kf.set(e,t),t)}return{value:e,source:t,stack:yr(t)}}var _l=[],Nl=0,kr=null,gi=0,ra=[],sa=0,dn=null,Ca=1,Oa="";function Va(e,t){_l[Nl++]=gi,_l[Nl++]=kr,kr=e,gi=t}function Xf(e,t,a){ra[sa++]=Ca,ra[sa++]=Oa,ra[sa++]=dn,dn=e;var n=Ca;e=Oa;var o=32-Tt(n)-1;n&=~(1<<o),a+=1;var c=32-Tt(t)+o;if(30<c){var h=o-o%5;c=(n&(1<<h)-1).toString(32),n>>=h,o-=h,Ca=1<<32-Tt(t)+o|a<<o|n,Oa=c+e}else Ca=1<<c|a<<o|n,Oa=e}function Uo(e){e.return!==null&&(Va(e,1),Xf(e,1,0))}function Ho(e){for(;e===kr;)kr=_l[--Nl],_l[Nl]=null,gi=_l[--Nl],_l[Nl]=null;for(;e===dn;)dn=ra[--sa],ra[sa]=null,Oa=ra[--sa],ra[sa]=null,Ca=ra[--sa],ra[sa]=null}function Qf(e,t){ra[sa++]=Ca,ra[sa++]=Oa,ra[sa++]=dn,Ca=t.id,Oa=t.overflow,dn=e}var wt=null,nt=null,qe=!1,hn=null,oa=!1,ko=Error(s(519));function mn(e){var t=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw yi(ia(t,e)),ko}function Zf(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[I]=e,t[oe]=n,a){case"dialog":He("cancel",t),He("close",t);break;case"iframe":case"object":case"embed":He("load",t);break;case"video":case"audio":for(a=0;a<Bi.length;a++)He(Bi[a],t);break;case"source":He("error",t);break;case"img":case"image":case"link":He("error",t),He("load",t);break;case"details":He("toggle",t);break;case"input":He("invalid",t),rf(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":He("invalid",t);break;case"textarea":He("invalid",t),of(t,n.value,n.defaultValue,n.children)}a=n.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||n.suppressHydrationWarning===!0||cm(t.textContent,a)?(n.popover!=null&&(He("beforetoggle",t),He("toggle",t)),n.onScroll!=null&&He("scroll",t),n.onScrollEnd!=null&&He("scrollend",t),n.onClick!=null&&(t.onclick=Ba),t=!0):t=!1,t||mn(e,!0)}function $f(e){for(wt=e.return;wt;)switch(wt.tag){case 5:case 31:case 13:oa=!1;return;case 27:case 3:oa=!0;return;default:wt=wt.return}}function jl(e){if(e!==wt)return!1;if(!qe)return $f(e),qe=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||ac(e.type,e.memoizedProps)),a=!a),a&&nt&&mn(e),$f(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));nt=xm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));nt=xm(e)}else t===27?(t=nt,Cn(e.type)?(e=sc,sc=null,nt=e):nt=t):nt=wt?ca(e.stateNode.nextSibling):null;return!0}function Qn(){nt=wt=null,qe=!1}function Bo(){var e=hn;return e!==null&&(Gt===null?Gt=e:Gt.push.apply(Gt,e),hn=null),e}function yi(e){hn===null?hn=[e]:hn.push(e)}var qo=j(null),Zn=null,Ga=null;function pn(e,t,a){F(qo,t._currentValue),t._currentValue=a}function Ka(e){e._currentValue=qo.current,Y(qo)}function Yo(e,t,a){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===a)break;e=e.return}}function Vo(e,t,a,n){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var c=o.dependencies;if(c!==null){var h=o.child;c=c.firstContext;e:for(;c!==null;){var x=c;c=o;for(var N=0;N<t.length;N++)if(x.context===t[N]){c.lanes|=a,x=c.alternate,x!==null&&(x.lanes|=a),Yo(c.return,a,e),n||(h=null);break e}c=x.next}}else if(o.tag===18){if(h=o.return,h===null)throw Error(s(341));h.lanes|=a,c=h.alternate,c!==null&&(c.lanes|=a),Yo(h,a,e),h=null}else h=o.child;if(h!==null)h.return=o;else for(h=o;h!==null;){if(h===e){h=null;break}if(o=h.sibling,o!==null){o.return=h.return,h=o;break}h=h.return}o=h}}function wl(e,t,a,n){e=null;for(var o=t,c=!1;o!==null;){if(!c){if((o.flags&524288)!==0)c=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var h=o.alternate;if(h===null)throw Error(s(387));if(h=h.memoizedProps,h!==null){var x=o.type;Zt(o.pendingProps.value,h.value)||(e!==null?e.push(x):e=[x])}}else if(o===Te.current){if(h=o.alternate,h===null)throw Error(s(387));h.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(Ki):e=[Ki])}o=o.return}e!==null&&Vo(t,e,a,n),t.flags|=262144}function Br(e){for(e=e.firstContext;e!==null;){if(!Zt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function $n(e){Zn=e,Ga=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Rt(e){return Jf(Zn,e)}function qr(e,t){return Zn===null&&$n(e),Jf(e,t)}function Jf(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Ga===null){if(e===null)throw Error(s(308));Ga=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ga=Ga.next=t;return a}var tv=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},av=l.unstable_scheduleCallback,nv=l.unstable_NormalPriority,gt={$$typeof:$,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Go(){return{controller:new tv,data:new Map,refCount:0}}function vi(e){e.refCount--,e.refCount===0&&av(nv,function(){e.controller.abort()})}var xi=null,Ko=0,Rl=0,Cl=null;function lv(e,t){if(xi===null){var a=xi=[];Ko=0,Rl=Zu(),Cl={status:"pending",value:void 0,then:function(n){a.push(n)}}}return Ko++,t.then(Ff,Ff),t}function Ff(){if(--Ko===0&&xi!==null){Cl!==null&&(Cl.status="fulfilled");var e=xi;xi=null,Rl=0,Cl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function iv(e,t){var a=[],n={status:"pending",value:null,reason:null,then:function(o){a.push(o)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var o=0;o<a.length;o++)(0,a[o])(t)},function(o){for(n.status="rejected",n.reason=o,o=0;o<a.length;o++)(0,a[o])(void 0)}),n}var Wf=M.S;M.S=function(e,t){Ah=At(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&lv(e,t),Wf!==null&&Wf(e,t)};var Jn=j(null);function Xo(){var e=Jn.current;return e!==null?e:Ie.pooledCache}function Yr(e,t){t===null?F(Jn,Jn.current):F(Jn,t.pool)}function Pf(){var e=Xo();return e===null?null:{parent:gt._currentValue,pool:e}}var Ol=Error(s(460)),Qo=Error(s(474)),Vr=Error(s(542)),Gr={then:function(){}};function If(e){return e=e.status,e==="fulfilled"||e==="rejected"}function ed(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Ba,Ba),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ad(e),e;default:if(typeof t.status=="string")t.then(Ba,Ba);else{if(e=Ie,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=n}},function(n){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ad(e),e}throw Wn=t,Ol}}function Fn(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Wn=a,Ol):a}}var Wn=null;function td(){if(Wn===null)throw Error(s(459));var e=Wn;return Wn=null,e}function ad(e){if(e===Ol||e===Vr)throw Error(s(483))}var Tl=null,bi=0;function Kr(e){var t=bi;return bi+=1,Tl===null&&(Tl=[]),ed(Tl,e,t)}function Si(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Xr(e,t){throw t.$$typeof===E?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function nd(e){function t(T,R){if(e){var A=T.deletions;A===null?(T.deletions=[R],T.flags|=16):A.push(R)}}function a(T,R){if(!e)return null;for(;R!==null;)t(T,R),R=R.sibling;return null}function n(T){for(var R=new Map;T!==null;)T.key!==null?R.set(T.key,T):R.set(T.index,T),T=T.sibling;return R}function o(T,R){return T=Ya(T,R),T.index=0,T.sibling=null,T}function c(T,R,A){return T.index=A,e?(A=T.alternate,A!==null?(A=A.index,A<R?(T.flags|=67108866,R):A):(T.flags|=67108866,R)):(T.flags|=1048576,R)}function h(T){return e&&T.alternate===null&&(T.flags|=67108866),T}function x(T,R,A,G){return R===null||R.tag!==6?(R=Ao(A,T.mode,G),R.return=T,R):(R=o(R,A),R.return=T,R)}function N(T,R,A,G){var xe=A.type;return xe===U?V(T,R,A.props.children,G,A.key):R!==null&&(R.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===z&&Fn(xe)===R.type)?(R=o(R,A.props),Si(R,A),R.return=T,R):(R=Hr(A.type,A.key,A.props,null,T.mode,G),Si(R,A),R.return=T,R)}function L(T,R,A,G){return R===null||R.tag!==4||R.stateNode.containerInfo!==A.containerInfo||R.stateNode.implementation!==A.implementation?(R=Lo(A,T.mode,G),R.return=T,R):(R=o(R,A.children||[]),R.return=T,R)}function V(T,R,A,G,xe){return R===null||R.tag!==7?(R=Xn(A,T.mode,G,xe),R.return=T,R):(R=o(R,A),R.return=T,R)}function X(T,R,A){if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return R=Ao(""+R,T.mode,A),R.return=T,R;if(typeof R=="object"&&R!==null){switch(R.$$typeof){case _:return A=Hr(R.type,R.key,R.props,null,T.mode,A),Si(A,R),A.return=T,A;case C:return R=Lo(R,T.mode,A),R.return=T,R;case z:return R=Fn(R),X(T,R,A)}if(pe(R)||Z(R))return R=Xn(R,T.mode,A,null),R.return=T,R;if(typeof R.then=="function")return X(T,Kr(R),A);if(R.$$typeof===$)return X(T,qr(T,R),A);Xr(T,R)}return null}function H(T,R,A,G){var xe=R!==null?R.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return xe!==null?null:x(T,R,""+A,G);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case _:return A.key===xe?N(T,R,A,G):null;case C:return A.key===xe?L(T,R,A,G):null;case z:return A=Fn(A),H(T,R,A,G)}if(pe(A)||Z(A))return xe!==null?null:V(T,R,A,G,null);if(typeof A.then=="function")return H(T,R,Kr(A),G);if(A.$$typeof===$)return H(T,R,qr(T,A),G);Xr(T,A)}return null}function q(T,R,A,G,xe){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return T=T.get(A)||null,x(R,T,""+G,xe);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case _:return T=T.get(G.key===null?A:G.key)||null,N(R,T,G,xe);case C:return T=T.get(G.key===null?A:G.key)||null,L(R,T,G,xe);case z:return G=Fn(G),q(T,R,A,G,xe)}if(pe(G)||Z(G))return T=T.get(A)||null,V(R,T,G,xe,null);if(typeof G.then=="function")return q(T,R,A,Kr(G),xe);if(G.$$typeof===$)return q(T,R,A,qr(R,G),xe);Xr(R,G)}return null}function fe(T,R,A,G){for(var xe=null,Ge=null,de=R,Oe=R=0,Be=null;de!==null&&Oe<A.length;Oe++){de.index>Oe?(Be=de,de=null):Be=de.sibling;var Ke=H(T,de,A[Oe],G);if(Ke===null){de===null&&(de=Be);break}e&&de&&Ke.alternate===null&&t(T,de),R=c(Ke,R,Oe),Ge===null?xe=Ke:Ge.sibling=Ke,Ge=Ke,de=Be}if(Oe===A.length)return a(T,de),qe&&Va(T,Oe),xe;if(de===null){for(;Oe<A.length;Oe++)de=X(T,A[Oe],G),de!==null&&(R=c(de,R,Oe),Ge===null?xe=de:Ge.sibling=de,Ge=de);return qe&&Va(T,Oe),xe}for(de=n(de);Oe<A.length;Oe++)Be=q(de,T,Oe,A[Oe],G),Be!==null&&(e&&Be.alternate!==null&&de.delete(Be.key===null?Oe:Be.key),R=c(Be,R,Oe),Ge===null?xe=Be:Ge.sibling=Be,Ge=Be);return e&&de.forEach(function(Dn){return t(T,Dn)}),qe&&Va(T,Oe),xe}function Ne(T,R,A,G){if(A==null)throw Error(s(151));for(var xe=null,Ge=null,de=R,Oe=R=0,Be=null,Ke=A.next();de!==null&&!Ke.done;Oe++,Ke=A.next()){de.index>Oe?(Be=de,de=null):Be=de.sibling;var Dn=H(T,de,Ke.value,G);if(Dn===null){de===null&&(de=Be);break}e&&de&&Dn.alternate===null&&t(T,de),R=c(Dn,R,Oe),Ge===null?xe=Dn:Ge.sibling=Dn,Ge=Dn,de=Be}if(Ke.done)return a(T,de),qe&&Va(T,Oe),xe;if(de===null){for(;!Ke.done;Oe++,Ke=A.next())Ke=X(T,Ke.value,G),Ke!==null&&(R=c(Ke,R,Oe),Ge===null?xe=Ke:Ge.sibling=Ke,Ge=Ke);return qe&&Va(T,Oe),xe}for(de=n(de);!Ke.done;Oe++,Ke=A.next())Ke=q(de,T,Oe,Ke.value,G),Ke!==null&&(e&&Ke.alternate!==null&&de.delete(Ke.key===null?Oe:Ke.key),R=c(Ke,R,Oe),Ge===null?xe=Ke:Ge.sibling=Ke,Ge=Ke);return e&&de.forEach(function(gx){return t(T,gx)}),qe&&Va(T,Oe),xe}function We(T,R,A,G){if(typeof A=="object"&&A!==null&&A.type===U&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case _:e:{for(var xe=A.key;R!==null;){if(R.key===xe){if(xe=A.type,xe===U){if(R.tag===7){a(T,R.sibling),G=o(R,A.props.children),G.return=T,T=G;break e}}else if(R.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===z&&Fn(xe)===R.type){a(T,R.sibling),G=o(R,A.props),Si(G,A),G.return=T,T=G;break e}a(T,R);break}else t(T,R);R=R.sibling}A.type===U?(G=Xn(A.props.children,T.mode,G,A.key),G.return=T,T=G):(G=Hr(A.type,A.key,A.props,null,T.mode,G),Si(G,A),G.return=T,T=G)}return h(T);case C:e:{for(xe=A.key;R!==null;){if(R.key===xe)if(R.tag===4&&R.stateNode.containerInfo===A.containerInfo&&R.stateNode.implementation===A.implementation){a(T,R.sibling),G=o(R,A.children||[]),G.return=T,T=G;break e}else{a(T,R);break}else t(T,R);R=R.sibling}G=Lo(A,T.mode,G),G.return=T,T=G}return h(T);case z:return A=Fn(A),We(T,R,A,G)}if(pe(A))return fe(T,R,A,G);if(Z(A)){if(xe=Z(A),typeof xe!="function")throw Error(s(150));return A=xe.call(A),Ne(T,R,A,G)}if(typeof A.then=="function")return We(T,R,Kr(A),G);if(A.$$typeof===$)return We(T,R,qr(T,A),G);Xr(T,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,R!==null&&R.tag===6?(a(T,R.sibling),G=o(R,A),G.return=T,T=G):(a(T,R),G=Ao(A,T.mode,G),G.return=T,T=G),h(T)):a(T,R)}return function(T,R,A,G){try{bi=0;var xe=We(T,R,A,G);return Tl=null,xe}catch(de){if(de===Ol||de===Vr)throw de;var Ge=$t(29,de,null,T.mode);return Ge.lanes=G,Ge.return=T,Ge}}}var Pn=nd(!0),ld=nd(!1),gn=!1;function Zo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function $o(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 yn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function vn(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Xe&2)!==0){var o=n.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),n.pending=t,t=Ur(e),Yf(e,null,a),t}return Lr(e,n,t,a),Ur(e)}function Ei(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,_r(e,a)}}function Jo(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var o=null,c=null;if(a=a.firstBaseUpdate,a!==null){do{var h={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};c===null?o=c=h:c=c.next=h,a=a.next}while(a!==null);c===null?o=c=t:c=c.next=t}else o=c=t;a={baseState:n.baseState,firstBaseUpdate:o,lastBaseUpdate:c,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Fo=!1;function _i(){if(Fo){var e=Cl;if(e!==null)throw e}}function Ni(e,t,a,n){Fo=!1;var o=e.updateQueue;gn=!1;var c=o.firstBaseUpdate,h=o.lastBaseUpdate,x=o.shared.pending;if(x!==null){o.shared.pending=null;var N=x,L=N.next;N.next=null,h===null?c=L:h.next=L,h=N;var V=e.alternate;V!==null&&(V=V.updateQueue,x=V.lastBaseUpdate,x!==h&&(x===null?V.firstBaseUpdate=L:x.next=L,V.lastBaseUpdate=N))}if(c!==null){var X=o.baseState;h=0,V=L=N=null,x=c;do{var H=x.lane&-536870913,q=H!==x.lane;if(q?(ke&H)===H:(n&H)===H){H!==0&&H===Rl&&(Fo=!0),V!==null&&(V=V.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var fe=e,Ne=x;H=t;var We=a;switch(Ne.tag){case 1:if(fe=Ne.payload,typeof fe=="function"){X=fe.call(We,X,H);break e}X=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=Ne.payload,H=typeof fe=="function"?fe.call(We,X,H):fe,H==null)break e;X=v({},X,H);break e;case 2:gn=!0}}H=x.callback,H!==null&&(e.flags|=64,q&&(e.flags|=8192),q=o.callbacks,q===null?o.callbacks=[H]:q.push(H))}else q={lane:H,tag:x.tag,payload:x.payload,callback:x.callback,next:null},V===null?(L=V=q,N=X):V=V.next=q,h|=H;if(x=x.next,x===null){if(x=o.shared.pending,x===null)break;q=x,x=q.next,q.next=null,o.lastBaseUpdate=q,o.shared.pending=null}}while(!0);V===null&&(N=X),o.baseState=N,o.firstBaseUpdate=L,o.lastBaseUpdate=V,c===null&&(o.shared.lanes=0),_n|=h,e.lanes=h,e.memoizedState=X}}function id(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function rd(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)id(a[e],t)}var zl=j(null),Qr=j(0);function sd(e,t){e=Ia,F(Qr,e),F(zl,t),Ia=e|t.baseLanes}function Wo(){F(Qr,Ia),F(zl,zl.current)}function Po(){Ia=Qr.current,Y(zl),Y(Qr)}var Jt=j(null),ua=null;function xn(e){var t=e.alternate;F(ht,ht.current&1),F(Jt,e),ua===null&&(t===null||zl.current!==null||t.memoizedState!==null)&&(ua=e)}function Io(e){F(ht,ht.current),F(Jt,e),ua===null&&(ua=e)}function od(e){e.tag===22?(F(ht,ht.current),F(Jt,e),ua===null&&(ua=e)):bn()}function bn(){F(ht,ht.current),F(Jt,Jt.current)}function Ft(e){Y(Jt),ua===e&&(ua=null),Y(ht)}var ht=j(0);function Zr(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||ic(a)||rc(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 Xa=0,Ce=null,Je=null,yt=null,$r=!1,Ml=!1,In=!1,Jr=0,ji=0,Dl=null,rv=0;function ut(){throw Error(s(321))}function eu(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Zt(e[a],t[a]))return!1;return!0}function tu(e,t,a,n,o,c){return Xa=c,Ce=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?Xd:gu,In=!1,c=a(n,o),In=!1,Ml&&(c=cd(t,a,n,o)),ud(e),c}function ud(e){M.H=Ci;var t=Je!==null&&Je.next!==null;if(Xa=0,yt=Je=Ce=null,$r=!1,ji=0,Dl=null,t)throw Error(s(300));e===null||vt||(e=e.dependencies,e!==null&&Br(e)&&(vt=!0))}function cd(e,t,a,n){Ce=e;var o=0;do{if(Ml&&(Dl=null),ji=0,Ml=!1,25<=o)throw Error(s(301));if(o+=1,yt=Je=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}M.H=Qd,c=t(a,n)}while(Ml);return c}function sv(){var e=M.H,t=e.useState()[0];return t=typeof t.then=="function"?wi(t):t,e=e.useState()[0],(Je!==null?Je.memoizedState:null)!==e&&(Ce.flags|=1024),t}function au(){var e=Jr!==0;return Jr=0,e}function nu(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function lu(e){if($r){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}$r=!1}Xa=0,yt=Je=Ce=null,Ml=!1,ji=Jr=0,Dl=null}function Ut(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yt===null?Ce.memoizedState=yt=e:yt=yt.next=e,yt}function mt(){if(Je===null){var e=Ce.alternate;e=e!==null?e.memoizedState:null}else e=Je.next;var t=yt===null?Ce.memoizedState:yt.next;if(t!==null)yt=t,Je=e;else{if(e===null)throw Ce.alternate===null?Error(s(467)):Error(s(310));Je=e,e={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},yt===null?Ce.memoizedState=yt=e:yt=yt.next=e}return yt}function Fr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function wi(e){var t=ji;return ji+=1,Dl===null&&(Dl=[]),e=ed(Dl,e,t),t=Ce,(yt===null?t.memoizedState:yt.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?Xd:gu),e}function Wr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return wi(e);if(e.$$typeof===$)return Rt(e)}throw Error(s(438,String(e)))}function iu(e){var t=null,a=Ce.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=Ce.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Fr(),Ce.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),n=0;n<e;n++)a[n]=re;return t.index++,a}function Qa(e,t){return typeof t=="function"?t(e):t}function Pr(e){var t=mt();return ru(t,Je,e)}function ru(e,t,a){var n=e.queue;if(n===null)throw Error(s(311));n.lastRenderedReducer=a;var o=e.baseQueue,c=n.pending;if(c!==null){if(o!==null){var h=o.next;o.next=c.next,c.next=h}t.baseQueue=o=c,n.pending=null}if(c=e.baseState,o===null)e.memoizedState=c;else{t=o.next;var x=h=null,N=null,L=t,V=!1;do{var X=L.lane&-536870913;if(X!==L.lane?(ke&X)===X:(Xa&X)===X){var H=L.revertLane;if(H===0)N!==null&&(N=N.next={lane:0,revertLane:0,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),X===Rl&&(V=!0);else if((Xa&H)===H){L=L.next,H===Rl&&(V=!0);continue}else X={lane:0,revertLane:L.revertLane,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},N===null?(x=N=X,h=c):N=N.next=X,Ce.lanes|=H,_n|=H;X=L.action,In&&a(c,X),c=L.hasEagerState?L.eagerState:a(c,X)}else H={lane:X,revertLane:L.revertLane,gesture:L.gesture,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},N===null?(x=N=H,h=c):N=N.next=H,Ce.lanes|=X,_n|=X;L=L.next}while(L!==null&&L!==t);if(N===null?h=c:N.next=x,!Zt(c,e.memoizedState)&&(vt=!0,V&&(a=Cl,a!==null)))throw a;e.memoizedState=c,e.baseState=h,e.baseQueue=N,n.lastRenderedState=c}return o===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function su(e){var t=mt(),a=t.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=e;var n=a.dispatch,o=a.pending,c=t.memoizedState;if(o!==null){a.pending=null;var h=o=o.next;do c=e(c,h.action),h=h.next;while(h!==o);Zt(c,t.memoizedState)||(vt=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),a.lastRenderedState=c}return[c,n]}function fd(e,t,a){var n=Ce,o=mt(),c=qe;if(c){if(a===void 0)throw Error(s(407));a=a()}else a=t();var h=!Zt((Je||o).memoizedState,a);if(h&&(o.memoizedState=a,vt=!0),o=o.queue,cu(md.bind(null,n,o,e),[e]),o.getSnapshot!==t||h||yt!==null&&yt.memoizedState.tag&1){if(n.flags|=2048,Al(9,{destroy:void 0},hd.bind(null,n,o,a,t),null),Ie===null)throw Error(s(349));c||(Xa&127)!==0||dd(n,t,a)}return a}function dd(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Ce.updateQueue,t===null?(t=Fr(),Ce.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function hd(e,t,a,n){t.value=a,t.getSnapshot=n,pd(t)&&gd(e)}function md(e,t,a){return a(function(){pd(t)&&gd(e)})}function pd(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Zt(e,a)}catch{return!0}}function gd(e){var t=Kn(e,2);t!==null&&Kt(t,e,2)}function ou(e){var t=Ut();if(typeof e=="function"){var a=e;if(e=a(),In){_t(!0);try{a()}finally{_t(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qa,lastRenderedState:e},t}function yd(e,t,a,n){return e.baseState=a,ru(e,Je,typeof n=="function"?n:Qa)}function ov(e,t,a,n,o){if(ts(e))throw Error(s(485));if(e=t.action,e!==null){var c={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){c.listeners.push(h)}};M.T!==null?a(!0):c.isTransition=!1,n(c),a=t.pending,a===null?(c.next=t.pending=c,vd(t,c)):(c.next=a.next,t.pending=a.next=c)}}function vd(e,t){var a=t.action,n=t.payload,o=e.state;if(t.isTransition){var c=M.T,h={};M.T=h;try{var x=a(o,n),N=M.S;N!==null&&N(h,x),xd(e,t,x)}catch(L){uu(e,t,L)}finally{c!==null&&h.types!==null&&(c.types=h.types),M.T=c}}else try{c=a(o,n),xd(e,t,c)}catch(L){uu(e,t,L)}}function xd(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){bd(e,t,n)},function(n){return uu(e,t,n)}):bd(e,t,a)}function bd(e,t,a){t.status="fulfilled",t.value=a,Sd(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,vd(e,a)))}function uu(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,Sd(t),t=t.next;while(t!==n)}e.action=null}function Sd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ed(e,t){return t}function _d(e,t){if(qe){var a=Ie.formState;if(a!==null){e:{var n=Ce;if(qe){if(nt){t:{for(var o=nt,c=oa;o.nodeType!==8;){if(!c){o=null;break t}if(o=ca(o.nextSibling),o===null){o=null;break t}}c=o.data,o=c==="F!"||c==="F"?o:null}if(o){nt=ca(o.nextSibling),n=o.data==="F!";break e}}mn(n)}n=!1}n&&(t=a[0])}}return a=Ut(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ed,lastRenderedState:t},a.queue=n,a=Vd.bind(null,Ce,n),n.dispatch=a,n=ou(!1),c=pu.bind(null,Ce,!1,n.queue),n=Ut(),o={state:t,dispatch:null,action:e,pending:null},n.queue=o,a=ov.bind(null,Ce,o,c,a),o.dispatch=a,n.memoizedState=e,[t,a,!1]}function Nd(e){var t=mt();return jd(t,Je,e)}function jd(e,t,a){if(t=ru(e,t,Ed)[0],e=Pr(Qa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=wi(t)}catch(h){throw h===Ol?Vr:h}else n=t;t=mt();var o=t.queue,c=o.dispatch;return a!==t.memoizedState&&(Ce.flags|=2048,Al(9,{destroy:void 0},uv.bind(null,o,a),null)),[n,c,e]}function uv(e,t){e.action=t}function wd(e){var t=mt(),a=Je;if(a!==null)return jd(t,a,e);mt(),t=t.memoizedState,a=mt();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function Al(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=Ce.updateQueue,t===null&&(t=Fr(),Ce.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(n=a.next,a.next=e,e.next=n,t.lastEffect=e),e}function Rd(){return mt().memoizedState}function Ir(e,t,a,n){var o=Ut();Ce.flags|=e,o.memoizedState=Al(1|t,{destroy:void 0},a,n===void 0?null:n)}function es(e,t,a,n){var o=mt();n=n===void 0?null:n;var c=o.memoizedState.inst;Je!==null&&n!==null&&eu(n,Je.memoizedState.deps)?o.memoizedState=Al(t,c,a,n):(Ce.flags|=e,o.memoizedState=Al(1|t,c,a,n))}function Cd(e,t){Ir(8390656,8,e,t)}function cu(e,t){es(2048,8,e,t)}function cv(e){Ce.flags|=4;var t=Ce.updateQueue;if(t===null)t=Fr(),Ce.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Od(e){var t=mt().memoizedState;return cv({ref:t,nextImpl:e}),function(){if((Xe&2)!==0)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function Td(e,t){return es(4,2,e,t)}function zd(e,t){return es(4,4,e,t)}function Md(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 Dd(e,t,a){a=a!=null?a.concat([e]):null,es(4,4,Md.bind(null,t,e),a)}function fu(){}function Ad(e,t){var a=mt();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&eu(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function Ld(e,t){var a=mt();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&eu(t,n[1]))return n[0];if(n=e(),In){_t(!0);try{e()}finally{_t(!1)}}return a.memoizedState=[n,t],n}function du(e,t,a){return a===void 0||(Xa&1073741824)!==0&&(ke&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Uh(),Ce.lanes|=e,_n|=e,a)}function Ud(e,t,a,n){return Zt(a,t)?a:zl.current!==null?(e=du(e,a,n),Zt(e,t)||(vt=!0),e):(Xa&42)===0||(Xa&1073741824)!==0&&(ke&261930)===0?(vt=!0,e.memoizedState=a):(e=Uh(),Ce.lanes|=e,_n|=e,t)}function Hd(e,t,a,n,o){var c=Q.p;Q.p=c!==0&&8>c?c:8;var h=M.T,x={};M.T=x,pu(e,!1,t,a);try{var N=o(),L=M.S;if(L!==null&&L(x,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var V=iv(N,n);Ri(e,t,V,It(e))}else Ri(e,t,n,It(e))}catch(X){Ri(e,t,{then:function(){},status:"rejected",reason:X},It())}finally{Q.p=c,h!==null&&x.types!==null&&(h.types=x.types),M.T=h}}function fv(){}function hu(e,t,a,n){if(e.tag!==5)throw Error(s(476));var o=kd(e).queue;Hd(e,o,t,ne,a===null?fv:function(){return Bd(e),a(n)})}function kd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qa,lastRenderedState:ne},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qa,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Bd(e){var t=kd(e);t.next===null&&(t=e.alternate.memoizedState),Ri(e,t.next.queue,{},It())}function mu(){return Rt(Ki)}function qd(){return mt().memoizedState}function Yd(){return mt().memoizedState}function dv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=It();e=yn(a);var n=vn(t,e,a);n!==null&&(Kt(n,t,a),Ei(n,t,a)),t={cache:Go()},e.payload=t;return}t=t.return}}function hv(e,t,a){var n=It();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ts(e)?Gd(t,a):(a=Mo(e,t,a,n),a!==null&&(Kt(a,e,n),Kd(a,t,n)))}function Vd(e,t,a){var n=It();Ri(e,t,a,n)}function Ri(e,t,a,n){var o={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ts(e))Gd(t,o);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var h=t.lastRenderedState,x=c(h,a);if(o.hasEagerState=!0,o.eagerState=x,Zt(x,h))return Lr(e,t,o,0),Ie===null&&Ar(),!1}catch{}if(a=Mo(e,t,o,n),a!==null)return Kt(a,e,n),Kd(a,t,n),!0}return!1}function pu(e,t,a,n){if(n={lane:2,revertLane:Zu(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ts(e)){if(t)throw Error(s(479))}else t=Mo(e,a,n,2),t!==null&&Kt(t,e,2)}function ts(e){var t=e.alternate;return e===Ce||t!==null&&t===Ce}function Gd(e,t){Ml=$r=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Kd(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,_r(e,a)}}var Ci={readContext:Rt,use:Wr,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useLayoutEffect:ut,useInsertionEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useSyncExternalStore:ut,useId:ut,useHostTransitionStatus:ut,useFormState:ut,useActionState:ut,useOptimistic:ut,useMemoCache:ut,useCacheRefresh:ut};Ci.useEffectEvent=ut;var Xd={readContext:Rt,use:Wr,useCallback:function(e,t){return Ut().memoizedState=[e,t===void 0?null:t],e},useContext:Rt,useEffect:Cd,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Ir(4194308,4,Md.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Ir(4194308,4,e,t)},useInsertionEffect:function(e,t){Ir(4,2,e,t)},useMemo:function(e,t){var a=Ut();t=t===void 0?null:t;var n=e();if(In){_t(!0);try{e()}finally{_t(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=Ut();if(a!==void 0){var o=a(t);if(In){_t(!0);try{a(t)}finally{_t(!1)}}}else o=t;return n.memoizedState=n.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},n.queue=e,e=e.dispatch=hv.bind(null,Ce,e),[n.memoizedState,e]},useRef:function(e){var t=Ut();return e={current:e},t.memoizedState=e},useState:function(e){e=ou(e);var t=e.queue,a=Vd.bind(null,Ce,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:fu,useDeferredValue:function(e,t){var a=Ut();return du(a,e,t)},useTransition:function(){var e=ou(!1);return e=Hd.bind(null,Ce,e.queue,!0,!1),Ut().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=Ce,o=Ut();if(qe){if(a===void 0)throw Error(s(407));a=a()}else{if(a=t(),Ie===null)throw Error(s(349));(ke&127)!==0||dd(n,t,a)}o.memoizedState=a;var c={value:a,getSnapshot:t};return o.queue=c,Cd(md.bind(null,n,c,e),[e]),n.flags|=2048,Al(9,{destroy:void 0},hd.bind(null,n,c,a,t),null),a},useId:function(){var e=Ut(),t=Ie.identifierPrefix;if(qe){var a=Oa,n=Ca;a=(n&~(1<<32-Tt(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Jr++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=rv++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:mu,useFormState:_d,useActionState:_d,useOptimistic:function(e){var t=Ut();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=pu.bind(null,Ce,!0,a),a.dispatch=t,[e,t]},useMemoCache:iu,useCacheRefresh:function(){return Ut().memoizedState=dv.bind(null,Ce)},useEffectEvent:function(e){var t=Ut(),a={impl:e};return t.memoizedState=a,function(){if((Xe&2)!==0)throw Error(s(440));return a.impl.apply(void 0,arguments)}}},gu={readContext:Rt,use:Wr,useCallback:Ad,useContext:Rt,useEffect:cu,useImperativeHandle:Dd,useInsertionEffect:Td,useLayoutEffect:zd,useMemo:Ld,useReducer:Pr,useRef:Rd,useState:function(){return Pr(Qa)},useDebugValue:fu,useDeferredValue:function(e,t){var a=mt();return Ud(a,Je.memoizedState,e,t)},useTransition:function(){var e=Pr(Qa)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:wi(e),t]},useSyncExternalStore:fd,useId:qd,useHostTransitionStatus:mu,useFormState:Nd,useActionState:Nd,useOptimistic:function(e,t){var a=mt();return yd(a,Je,e,t)},useMemoCache:iu,useCacheRefresh:Yd};gu.useEffectEvent=Od;var Qd={readContext:Rt,use:Wr,useCallback:Ad,useContext:Rt,useEffect:cu,useImperativeHandle:Dd,useInsertionEffect:Td,useLayoutEffect:zd,useMemo:Ld,useReducer:su,useRef:Rd,useState:function(){return su(Qa)},useDebugValue:fu,useDeferredValue:function(e,t){var a=mt();return Je===null?du(a,e,t):Ud(a,Je.memoizedState,e,t)},useTransition:function(){var e=su(Qa)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:wi(e),t]},useSyncExternalStore:fd,useId:qd,useHostTransitionStatus:mu,useFormState:wd,useActionState:wd,useOptimistic:function(e,t){var a=mt();return Je!==null?yd(a,Je,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:iu,useCacheRefresh:Yd};Qd.useEffectEvent=Od;function yu(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:v({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var vu={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=It(),o=yn(n);o.payload=t,a!=null&&(o.callback=a),t=vn(e,o,n),t!==null&&(Kt(t,e,n),Ei(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=It(),o=yn(n);o.tag=1,o.payload=t,a!=null&&(o.callback=a),t=vn(e,o,n),t!==null&&(Kt(t,e,n),Ei(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=It(),n=yn(a);n.tag=2,t!=null&&(n.callback=t),t=vn(e,n,a),t!==null&&(Kt(t,e,a),Ei(t,e,a))}};function Zd(e,t,a,n,o,c,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,c,h):t.prototype&&t.prototype.isPureReactComponent?!mi(a,n)||!mi(o,c):!0}function $d(e,t,a,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,n),t.state!==e&&vu.enqueueReplaceState(t,t.state,null)}function el(e,t){var a=t;if("ref"in t){a={};for(var n in t)n!=="ref"&&(a[n]=t[n])}if(e=e.defaultProps){a===t&&(a=v({},a));for(var o in e)a[o]===void 0&&(a[o]=e[o])}return a}function Jd(e){Dr(e)}function Fd(e){console.error(e)}function Wd(e){Dr(e)}function as(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Pd(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function xu(e,t,a){return a=yn(a),a.tag=3,a.payload={element:null},a.callback=function(){as(e,t)},a}function Id(e){return e=yn(e),e.tag=3,e}function eh(e,t,a,n){var o=a.type.getDerivedStateFromError;if(typeof o=="function"){var c=n.value;e.payload=function(){return o(c)},e.callback=function(){Pd(t,a,n)}}var h=a.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){Pd(t,a,n),typeof o!="function"&&(Nn===null?Nn=new Set([this]):Nn.add(this));var x=n.stack;this.componentDidCatch(n.value,{componentStack:x!==null?x:""})})}function mv(e,t,a,n,o){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&wl(t,a,o,!0),a=Jt.current,a!==null){switch(a.tag){case 31:case 13:return ua===null?ms():a.alternate===null&&ct===0&&(ct=3),a.flags&=-257,a.flags|=65536,a.lanes=o,n===Gr?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),Ku(e,n,o)),!1;case 22:return a.flags|=65536,n===Gr?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([n]):a.add(n)),Ku(e,n,o)),!1}throw Error(s(435,a.tag))}return Ku(e,n,o),ms(),!1}if(qe)return t=Jt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,n!==ko&&(e=Error(s(422),{cause:n}),yi(ia(e,a)))):(n!==ko&&(t=Error(s(423),{cause:n}),yi(ia(t,a))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,n=ia(n,a),o=xu(e.stateNode,n,o),Jo(e,o),ct!==4&&(ct=2)),!1;var c=Error(s(520),{cause:n});if(c=ia(c,a),Ui===null?Ui=[c]:Ui.push(c),ct!==4&&(ct=2),t===null)return!0;n=ia(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=o&-o,a.lanes|=e,e=xu(a.stateNode,n,e),Jo(a,e),!1;case 1:if(t=a.type,c=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(Nn===null||!Nn.has(c))))return a.flags|=65536,o&=-o,a.lanes|=o,o=Id(o),eh(o,e,a,n),Jo(a,o),!1}a=a.return}while(a!==null);return!1}var bu=Error(s(461)),vt=!1;function Ct(e,t,a,n){t.child=e===null?ld(t,null,a,n):Pn(t,e.child,a,n)}function th(e,t,a,n,o){a=a.render;var c=t.ref;if("ref"in n){var h={};for(var x in n)x!=="ref"&&(h[x]=n[x])}else h=n;return $n(t),n=tu(e,t,a,h,c,o),x=au(),e!==null&&!vt?(nu(e,t,o),Za(e,t,o)):(qe&&x&&Uo(t),t.flags|=1,Ct(e,t,n,o),t.child)}function ah(e,t,a,n,o){if(e===null){var c=a.type;return typeof c=="function"&&!Do(c)&&c.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=c,nh(e,t,c,n,o)):(e=Hr(a.type,null,n,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!Cu(e,o)){var h=c.memoizedProps;if(a=a.compare,a=a!==null?a:mi,a(h,n)&&e.ref===t.ref)return Za(e,t,o)}return t.flags|=1,e=Ya(c,n),e.ref=t.ref,e.return=t,t.child=e}function nh(e,t,a,n,o){if(e!==null){var c=e.memoizedProps;if(mi(c,n)&&e.ref===t.ref)if(vt=!1,t.pendingProps=n=c,Cu(e,o))(e.flags&131072)!==0&&(vt=!0);else return t.lanes=e.lanes,Za(e,t,o)}return Su(e,t,a,n,o)}function lh(e,t,a,n){var o=n.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|a:a,e!==null){for(n=t.child=e.child,o=0;n!==null;)o=o|n.lanes|n.childLanes,n=n.sibling;n=o&~c}else n=0,t.child=null;return ih(e,t,c,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Yr(t,c!==null?c.cachePool:null),c!==null?sd(t,c):Wo(),od(t);else return n=t.lanes=536870912,ih(e,t,c!==null?c.baseLanes|a:a,a,n)}else c!==null?(Yr(t,c.cachePool),sd(t,c),bn(),t.memoizedState=null):(e!==null&&Yr(t,null),Wo(),bn());return Ct(e,t,o,a),t.child}function Oi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ih(e,t,a,n,o){var c=Xo();return c=c===null?null:{parent:gt._currentValue,pool:c},t.memoizedState={baseLanes:a,cachePool:c},e!==null&&Yr(t,null),Wo(),od(t),e!==null&&wl(e,t,n,!0),t.childLanes=o,null}function ns(e,t){return t=is({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function rh(e,t,a){return Pn(t,e.child,null,a),e=ns(t,t.pendingProps),e.flags|=2,Ft(t),t.memoizedState=null,e}function pv(e,t,a){var n=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(qe){if(n.mode==="hidden")return e=ns(t,n),t.lanes=536870912,Oi(null,e);if(Io(t),(e=nt)?(e=vm(e,oa),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:dn!==null?{id:Ca,overflow:Oa}:null,retryLane:536870912,hydrationErrors:null},a=Gf(e),a.return=t,t.child=a,wt=t,nt=null)):e=null,e===null)throw mn(t);return t.lanes=536870912,null}return ns(t,n)}var c=e.memoizedState;if(c!==null){var h=c.dehydrated;if(Io(t),o)if(t.flags&256)t.flags&=-257,t=rh(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558));else if(vt||wl(e,t,a,!1),o=(a&e.childLanes)!==0,vt||o){if(n=Ie,n!==null&&(h=w(n,a),h!==0&&h!==c.retryLane))throw c.retryLane=h,Kn(e,h),Kt(n,e,h),bu;ms(),t=rh(e,t,a)}else e=c.treeContext,nt=ca(h.nextSibling),wt=t,qe=!0,hn=null,oa=!1,e!==null&&Qf(t,e),t=ns(t,n),t.flags|=4096;return t}return e=Ya(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ls(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 Su(e,t,a,n,o){return $n(t),a=tu(e,t,a,n,void 0,o),n=au(),e!==null&&!vt?(nu(e,t,o),Za(e,t,o)):(qe&&n&&Uo(t),t.flags|=1,Ct(e,t,a,o),t.child)}function sh(e,t,a,n,o,c){return $n(t),t.updateQueue=null,a=cd(t,n,a,o),ud(e),n=au(),e!==null&&!vt?(nu(e,t,c),Za(e,t,c)):(qe&&n&&Uo(t),t.flags|=1,Ct(e,t,a,c),t.child)}function oh(e,t,a,n,o){if($n(t),t.stateNode===null){var c=El,h=a.contextType;typeof h=="object"&&h!==null&&(c=Rt(h)),c=new a(n,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=vu,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=n,c.state=t.memoizedState,c.refs={},Zo(t),h=a.contextType,c.context=typeof h=="object"&&h!==null?Rt(h):El,c.state=t.memoizedState,h=a.getDerivedStateFromProps,typeof h=="function"&&(yu(t,a,h,n),c.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(h=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),h!==c.state&&vu.enqueueReplaceState(c,c.state,null),Ni(t,n,c,o),_i(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){c=t.stateNode;var x=t.memoizedProps,N=el(a,x);c.props=N;var L=c.context,V=a.contextType;h=El,typeof V=="object"&&V!==null&&(h=Rt(V));var X=a.getDerivedStateFromProps;V=typeof X=="function"||typeof c.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,V||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(x||L!==h)&&$d(t,c,n,h),gn=!1;var H=t.memoizedState;c.state=H,Ni(t,n,c,o),_i(),L=t.memoizedState,x||H!==L||gn?(typeof X=="function"&&(yu(t,a,X,n),L=t.memoizedState),(N=gn||Zd(t,a,N,n,H,L,h))?(V||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=L),c.props=n,c.state=L,c.context=h,n=N):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{c=t.stateNode,$o(e,t),h=t.memoizedProps,V=el(a,h),c.props=V,X=t.pendingProps,H=c.context,L=a.contextType,N=El,typeof L=="object"&&L!==null&&(N=Rt(L)),x=a.getDerivedStateFromProps,(L=typeof x=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(h!==X||H!==N)&&$d(t,c,n,N),gn=!1,H=t.memoizedState,c.state=H,Ni(t,n,c,o),_i();var q=t.memoizedState;h!==X||H!==q||gn||e!==null&&e.dependencies!==null&&Br(e.dependencies)?(typeof x=="function"&&(yu(t,a,x,n),q=t.memoizedState),(V=gn||Zd(t,a,V,n,H,q,N)||e!==null&&e.dependencies!==null&&Br(e.dependencies))?(L||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(n,q,N),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(n,q,N)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||h===e.memoizedProps&&H===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&H===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=q),c.props=n,c.state=q,c.context=N,n=V):(typeof c.componentDidUpdate!="function"||h===e.memoizedProps&&H===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&H===e.memoizedState||(t.flags|=1024),n=!1)}return c=n,ls(e,t),n=(t.flags&128)!==0,c||n?(c=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&n?(t.child=Pn(t,e.child,null,o),t.child=Pn(t,null,a,o)):Ct(e,t,a,o),t.memoizedState=c.state,e=t.child):e=Za(e,t,o),e}function uh(e,t,a,n){return Qn(),t.flags|=256,Ct(e,t,a,n),t.child}var Eu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _u(e){return{baseLanes:e,cachePool:Pf()}}function Nu(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Pt),e}function ch(e,t,a){var n=t.pendingProps,o=!1,c=(t.flags&128)!==0,h;if((h=c)||(h=e!==null&&e.memoizedState===null?!1:(ht.current&2)!==0),h&&(o=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(qe){if(o?xn(t):bn(),(e=nt)?(e=vm(e,oa),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:dn!==null?{id:Ca,overflow:Oa}:null,retryLane:536870912,hydrationErrors:null},a=Gf(e),a.return=t,t.child=a,wt=t,nt=null)):e=null,e===null)throw mn(t);return rc(e)?t.lanes=32:t.lanes=536870912,null}var x=n.children;return n=n.fallback,o?(bn(),o=t.mode,x=is({mode:"hidden",children:x},o),n=Xn(n,o,a,null),x.return=t,n.return=t,x.sibling=n,t.child=x,n=t.child,n.memoizedState=_u(a),n.childLanes=Nu(e,h,a),t.memoizedState=Eu,Oi(null,n)):(xn(t),ju(t,x))}var N=e.memoizedState;if(N!==null&&(x=N.dehydrated,x!==null)){if(c)t.flags&256?(xn(t),t.flags&=-257,t=wu(e,t,a)):t.memoizedState!==null?(bn(),t.child=e.child,t.flags|=128,t=null):(bn(),x=n.fallback,o=t.mode,n=is({mode:"visible",children:n.children},o),x=Xn(x,o,a,null),x.flags|=2,n.return=t,x.return=t,n.sibling=x,t.child=n,Pn(t,e.child,null,a),n=t.child,n.memoizedState=_u(a),n.childLanes=Nu(e,h,a),t.memoizedState=Eu,t=Oi(null,n));else if(xn(t),rc(x)){if(h=x.nextSibling&&x.nextSibling.dataset,h)var L=h.dgst;h=L,n=Error(s(419)),n.stack="",n.digest=h,yi({value:n,source:null,stack:null}),t=wu(e,t,a)}else if(vt||wl(e,t,a,!1),h=(a&e.childLanes)!==0,vt||h){if(h=Ie,h!==null&&(n=w(h,a),n!==0&&n!==N.retryLane))throw N.retryLane=n,Kn(e,n),Kt(h,e,n),bu;ic(x)||ms(),t=wu(e,t,a)}else ic(x)?(t.flags|=192,t.child=e.child,t=null):(e=N.treeContext,nt=ca(x.nextSibling),wt=t,qe=!0,hn=null,oa=!1,e!==null&&Qf(t,e),t=ju(t,n.children),t.flags|=4096);return t}return o?(bn(),x=n.fallback,o=t.mode,N=e.child,L=N.sibling,n=Ya(N,{mode:"hidden",children:n.children}),n.subtreeFlags=N.subtreeFlags&65011712,L!==null?x=Ya(L,x):(x=Xn(x,o,a,null),x.flags|=2),x.return=t,n.return=t,n.sibling=x,t.child=n,Oi(null,n),n=t.child,x=e.child.memoizedState,x===null?x=_u(a):(o=x.cachePool,o!==null?(N=gt._currentValue,o=o.parent!==N?{parent:N,pool:N}:o):o=Pf(),x={baseLanes:x.baseLanes|a,cachePool:o}),n.memoizedState=x,n.childLanes=Nu(e,h,a),t.memoizedState=Eu,Oi(e.child,n)):(xn(t),a=e.child,e=a.sibling,a=Ya(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(h=t.deletions,h===null?(t.deletions=[e],t.flags|=16):h.push(e)),t.child=a,t.memoizedState=null,a)}function ju(e,t){return t=is({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function is(e,t){return e=$t(22,e,null,t),e.lanes=0,e}function wu(e,t,a){return Pn(t,e.child,null,a),e=ju(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function fh(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Yo(e.return,t,a)}function Ru(e,t,a,n,o,c){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:o,treeForkCount:c}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=n,h.tail=a,h.tailMode=o,h.treeForkCount=c)}function dh(e,t,a){var n=t.pendingProps,o=n.revealOrder,c=n.tail;n=n.children;var h=ht.current,x=(h&2)!==0;if(x?(h=h&1|2,t.flags|=128):h&=1,F(ht,h),Ct(e,t,n,a),n=qe?gi:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&fh(e,a,t);else if(e.tag===19)fh(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&&Zr(e)===null&&(o=a),a=a.sibling;a=o,a===null?(o=t.child,t.child=null):(o=a.sibling,a.sibling=null),Ru(t,!1,o,a,c,n);break;case"backwards":case"unstable_legacy-backwards":for(a=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Zr(e)===null){t.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}Ru(t,!0,a,null,c,n);break;case"together":Ru(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function Za(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),_n|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(wl(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=Ya(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Ya(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Cu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Br(e)))}function gv(e,t,a){switch(t.tag){case 3:rt(t,t.stateNode.containerInfo),pn(t,gt,e.memoizedState.cache),Qn();break;case 27:case 5:ze(t);break;case 4:rt(t,t.stateNode.containerInfo);break;case 10:pn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Io(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(xn(t),t.flags|=128,null):(a&t.child.childLanes)!==0?ch(e,t,a):(xn(t),e=Za(e,t,a),e!==null?e.sibling:null);xn(t);break;case 19:var o=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(wl(e,t,a,!1),n=(a&t.childLanes)!==0),o){if(n)return dh(e,t,a);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),F(ht,ht.current),n)break;return null;case 22:return t.lanes=0,lh(e,t,a,t.pendingProps);case 24:pn(t,gt,e.memoizedState.cache)}return Za(e,t,a)}function hh(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)vt=!0;else{if(!Cu(e,a)&&(t.flags&128)===0)return vt=!1,gv(e,t,a);vt=(e.flags&131072)!==0}else vt=!1,qe&&(t.flags&1048576)!==0&&Xf(t,gi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=Fn(t.elementType),t.type=e,typeof e=="function")Do(e)?(n=el(e,n),t.tag=1,t=oh(null,t,e,n,a)):(t.tag=0,t=Su(null,t,e,n,a));else{if(e!=null){var o=e.$$typeof;if(o===te){t.tag=11,t=th(null,t,e,n,a);break e}else if(o===ae){t.tag=14,t=ah(null,t,e,n,a);break e}}throw t=me(e)||e,Error(s(306,t,""))}}return t;case 0:return Su(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,o=el(n,t.pendingProps),oh(e,t,n,o,a);case 3:e:{if(rt(t,t.stateNode.containerInfo),e===null)throw Error(s(387));n=t.pendingProps;var c=t.memoizedState;o=c.element,$o(e,t),Ni(t,n,null,a);var h=t.memoizedState;if(n=h.cache,pn(t,gt,n),n!==c.cache&&Vo(t,[gt],a,!0),_i(),n=h.element,c.isDehydrated)if(c={element:n,isDehydrated:!1,cache:h.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=uh(e,t,n,a);break e}else if(n!==o){o=ia(Error(s(424)),t),yi(o),t=uh(e,t,n,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,nt=ca(e.firstChild),wt=t,qe=!0,hn=null,oa=!0,a=ld(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Qn(),n===o){t=Za(e,t,a);break e}Ct(e,t,n,a)}t=t.child}return t;case 26:return ls(e,t),e===null?(a=Nm(t.type,null,t.pendingProps,null))?t.memoizedState=a:qe||(a=t.type,e=t.pendingProps,n=Ss(_e.current).createElement(a),n[I]=t,n[oe]=e,Ot(n,a,e),et(n),t.stateNode=n):t.memoizedState=Nm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ze(t),e===null&&qe&&(n=t.stateNode=Sm(t.type,t.pendingProps,_e.current),wt=t,oa=!0,o=nt,Cn(t.type)?(sc=o,nt=ca(n.firstChild)):nt=o),Ct(e,t,t.pendingProps.children,a),ls(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&qe&&((o=n=nt)&&(n=Qv(n,t.type,t.pendingProps,oa),n!==null?(t.stateNode=n,wt=t,nt=ca(n.firstChild),oa=!1,o=!0):o=!1),o||mn(t)),ze(t),o=t.type,c=t.pendingProps,h=e!==null?e.memoizedProps:null,n=c.children,ac(o,c)?n=null:h!==null&&ac(o,h)&&(t.flags|=32),t.memoizedState!==null&&(o=tu(e,t,sv,null,null,a),Ki._currentValue=o),ls(e,t),Ct(e,t,n,a),t.child;case 6:return e===null&&qe&&((e=a=nt)&&(a=Zv(a,t.pendingProps,oa),a!==null?(t.stateNode=a,wt=t,nt=null,e=!0):e=!1),e||mn(t)),null;case 13:return ch(e,t,a);case 4:return rt(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Pn(t,null,n,a):Ct(e,t,n,a),t.child;case 11:return th(e,t,t.type,t.pendingProps,a);case 7:return Ct(e,t,t.pendingProps,a),t.child;case 8:return Ct(e,t,t.pendingProps.children,a),t.child;case 12:return Ct(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,pn(t,t.type,n.value),Ct(e,t,n.children,a),t.child;case 9:return o=t.type._context,n=t.pendingProps.children,$n(t),o=Rt(o),n=n(o),t.flags|=1,Ct(e,t,n,a),t.child;case 14:return ah(e,t,t.type,t.pendingProps,a);case 15:return nh(e,t,t.type,t.pendingProps,a);case 19:return dh(e,t,a);case 31:return pv(e,t,a);case 22:return lh(e,t,a,t.pendingProps);case 24:return $n(t),n=Rt(gt),e===null?(o=Xo(),o===null&&(o=Ie,c=Go(),o.pooledCache=c,c.refCount++,c!==null&&(o.pooledCacheLanes|=a),o=c),t.memoizedState={parent:n,cache:o},Zo(t),pn(t,gt,o)):((e.lanes&a)!==0&&($o(e,t),Ni(t,null,null,a),_i()),o=e.memoizedState,c=t.memoizedState,o.parent!==n?(o={parent:n,cache:n},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),pn(t,gt,n)):(n=c.cache,pn(t,gt,n),n!==o.cache&&Vo(t,[gt],a,!0))),Ct(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function $a(e){e.flags|=4}function Ou(e,t,a,n,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(qh())e.flags|=8192;else throw Wn=Gr,Qo}else e.flags&=-16777217}function mh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Om(t))if(qh())e.flags|=8192;else throw Wn=Gr,Qo}function rs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ri():536870912,e.lanes|=t,kl|=t)}function Ti(e,t){if(!qe)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 n=null;a!==null;)a.alternate!==null&&(n=a),a=a.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function lt(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var o=e.child;o!==null;)a|=o.lanes|o.childLanes,n|=o.subtreeFlags&65011712,n|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)a|=o.lanes|o.childLanes,n|=o.subtreeFlags,n|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function yv(e,t,a){var n=t.pendingProps;switch(Ho(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lt(t),null;case 1:return lt(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ka(gt),se(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(jl(t)?$a(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Bo())),lt(t),null;case 26:var o=t.type,c=t.memoizedState;return e===null?($a(t),c!==null?(lt(t),mh(t,c)):(lt(t),Ou(t,o,null,n,a))):c?c!==e.memoizedState?($a(t),lt(t),mh(t,c)):(lt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&$a(t),lt(t),Ou(t,o,e,n,a)),null;case 27:if(st(t),a=_e.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&$a(t);else{if(!n){if(t.stateNode===null)throw Error(s(166));return lt(t),null}e=ee.current,jl(t)?Zf(t):(e=Sm(o,n,a),t.stateNode=e,$a(t))}return lt(t),null;case 5:if(st(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&$a(t);else{if(!n){if(t.stateNode===null)throw Error(s(166));return lt(t),null}if(c=ee.current,jl(t))Zf(t);else{var h=Ss(_e.current);switch(c){case 1:c=h.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:c=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":c=h.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":c=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":c=h.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof n.is=="string"?h.createElement("select",{is:n.is}):h.createElement("select"),n.multiple?c.multiple=!0:n.size&&(c.size=n.size);break;default:c=typeof n.is=="string"?h.createElement(o,{is:n.is}):h.createElement(o)}}c[I]=t,c[oe]=n;e:for(h=t.child;h!==null;){if(h.tag===5||h.tag===6)c.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}t.stateNode=c;e:switch(Ot(c,o,n),o){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&$a(t)}}return lt(t),Ou(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&$a(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(s(166));if(e=_e.current,jl(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,o=wt,o!==null)switch(o.tag){case 27:case 5:n=o.memoizedProps}e[I]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||cm(e.nodeValue,a)),e||mn(t,!0)}else e=Ss(e).createTextNode(n),e[I]=t,t.stateNode=e}return lt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=jl(t),a!==null){if(e===null){if(!n)throw Error(s(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(557));e[I]=t}else Qn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;lt(t),e=!1}else a=Bo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Ft(t),t):(Ft(t),null);if((t.flags&128)!==0)throw Error(s(558))}return lt(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=jl(t),n!==null&&n.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[I]=t}else Qn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;lt(t),o=!1}else o=Bo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(Ft(t),t):(Ft(t),null)}return Ft(t),(t.flags&128)!==0?(t.lanes=a,t):(a=n!==null,e=e!==null&&e.memoizedState!==null,a&&(n=t.child,o=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(o=n.alternate.memoizedState.cachePool.pool),c=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(c=n.memoizedState.cachePool.pool),c!==o&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),rs(t,t.updateQueue),lt(t),null);case 4:return se(),e===null&&Wu(t.stateNode.containerInfo),lt(t),null;case 10:return Ka(t.type),lt(t),null;case 19:if(Y(ht),n=t.memoizedState,n===null)return lt(t),null;if(o=(t.flags&128)!==0,c=n.rendering,c===null)if(o)Ti(n,!1);else{if(ct!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Zr(e),c!==null){for(t.flags|=128,Ti(n,!1),e=c.updateQueue,t.updateQueue=e,rs(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Vf(a,e),a=a.sibling;return F(ht,ht.current&1|2),qe&&Va(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&At()>fs&&(t.flags|=128,o=!0,Ti(n,!1),t.lanes=4194304)}else{if(!o)if(e=Zr(c),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,rs(t,e),Ti(n,!0),n.tail===null&&n.tailMode==="hidden"&&!c.alternate&&!qe)return lt(t),null}else 2*At()-n.renderingStartTime>fs&&a!==536870912&&(t.flags|=128,o=!0,Ti(n,!1),t.lanes=4194304);n.isBackwards?(c.sibling=t.child,t.child=c):(e=n.last,e!==null?e.sibling=c:t.child=c,n.last=c)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=At(),e.sibling=null,a=ht.current,F(ht,o?a&1|2:a&1),qe&&Va(t,n.treeForkCount),e):(lt(t),null);case 22:case 23:return Ft(t),Po(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(a&536870912)!==0&&(t.flags&128)===0&&(lt(t),t.subtreeFlags&6&&(t.flags|=8192)):lt(t),a=t.updateQueue,a!==null&&rs(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&Y(Jn),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Ka(gt),lt(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function vv(e,t){switch(Ho(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ka(gt),se(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return st(t),null;case 31:if(t.memoizedState!==null){if(Ft(t),t.alternate===null)throw Error(s(340));Qn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ft(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Qn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Y(ht),null;case 4:return se(),null;case 10:return Ka(t.type),null;case 22:case 23:return Ft(t),Po(),e!==null&&Y(Jn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ka(gt),null;case 25:return null;default:return null}}function ph(e,t){switch(Ho(t),t.tag){case 3:Ka(gt),se();break;case 26:case 27:case 5:st(t);break;case 4:se();break;case 31:t.memoizedState!==null&&Ft(t);break;case 13:Ft(t);break;case 19:Y(ht);break;case 10:Ka(t.type);break;case 22:case 23:Ft(t),Po(),e!==null&&Y(Jn);break;case 24:Ka(gt)}}function zi(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var o=n.next;a=o;do{if((a.tag&e)===e){n=void 0;var c=a.create,h=a.inst;n=c(),h.destroy=n}a=a.next}while(a!==o)}}catch(x){$e(t,t.return,x)}}function Sn(e,t,a){try{var n=t.updateQueue,o=n!==null?n.lastEffect:null;if(o!==null){var c=o.next;n=c;do{if((n.tag&e)===e){var h=n.inst,x=h.destroy;if(x!==void 0){h.destroy=void 0,o=t;var N=a,L=x;try{L()}catch(V){$e(o,N,V)}}}n=n.next}while(n!==c)}}catch(V){$e(t,t.return,V)}}function gh(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{rd(t,a)}catch(n){$e(e,e.return,n)}}}function yh(e,t,a){a.props=el(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){$e(e,t,n)}}function Mi(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof a=="function"?e.refCleanup=a(n):a.current=n}}catch(o){$e(e,t,o)}}function Ta(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(o){$e(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){$e(e,t,o)}else a.current=null}function vh(e){var t=e.type,a=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break e;case"img":a.src?n.src=a.src:a.srcSet&&(n.srcset=a.srcSet)}}catch(o){$e(e,e.return,o)}}function Tu(e,t,a){try{var n=e.stateNode;qv(n,e.type,a,t),n[oe]=t}catch(o){$e(e,e.return,o)}}function xh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Cn(e.type)||e.tag===4}function zu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||xh(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&&Cn(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 Mu(e,t,a){var n=e.tag;if(n===5||n===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=Ba));else if(n!==4&&(n===27&&Cn(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Mu(e,t,a),e=e.sibling;e!==null;)Mu(e,t,a),e=e.sibling}function ss(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&Cn(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(ss(e,t,a),e=e.sibling;e!==null;)ss(e,t,a),e=e.sibling}function bh(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);Ot(t,n,a),t[I]=e,t[oe]=a}catch(c){$e(e,e.return,c)}}var Ja=!1,xt=!1,Du=!1,Sh=typeof WeakSet=="function"?WeakSet:Set,jt=null;function xv(e,t){if(e=e.containerInfo,ec=Cs,e=Df(e),wo(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var o=n.anchorOffset,c=n.focusNode;n=n.focusOffset;try{a.nodeType,c.nodeType}catch{a=null;break e}var h=0,x=-1,N=-1,L=0,V=0,X=e,H=null;t:for(;;){for(var q;X!==a||o!==0&&X.nodeType!==3||(x=h+o),X!==c||n!==0&&X.nodeType!==3||(N=h+n),X.nodeType===3&&(h+=X.nodeValue.length),(q=X.firstChild)!==null;)H=X,X=q;for(;;){if(X===e)break t;if(H===a&&++L===o&&(x=h),H===c&&++V===n&&(N=h),(q=X.nextSibling)!==null)break;X=H,H=X.parentNode}X=q}a=x===-1||N===-1?null:{start:x,end:N}}else a=null}a=a||{start:0,end:0}}else a=null;for(tc={focusedElem:e,selectionRange:a},Cs=!1,jt=t;jt!==null;)if(t=jt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,jt=e;else for(;jt!==null;){switch(t=jt,c=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&&c!==null){e=void 0,a=t,o=c.memoizedProps,c=c.memoizedState,n=a.stateNode;try{var fe=el(a.type,o);e=n.getSnapshotBeforeUpdate(fe,c),n.__reactInternalSnapshotBeforeUpdate=e}catch(Ne){$e(a,a.return,Ne)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)lc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":lc(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,jt=e;break}jt=t.return}}function Eh(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:Wa(e,a),n&4&&zi(5,a);break;case 1:if(Wa(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(h){$e(a,a.return,h)}else{var o=el(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){$e(a,a.return,h)}}n&64&&gh(a),n&512&&Mi(a,a.return);break;case 3:if(Wa(e,a),n&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{rd(e,t)}catch(h){$e(a,a.return,h)}}break;case 27:t===null&&n&4&&bh(a);case 26:case 5:Wa(e,a),t===null&&n&4&&vh(a),n&512&&Mi(a,a.return);break;case 12:Wa(e,a);break;case 31:Wa(e,a),n&4&&jh(e,a);break;case 13:Wa(e,a),n&4&&wh(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Cv.bind(null,a),$v(e,a))));break;case 22:if(n=a.memoizedState!==null||Ja,!n){t=t!==null&&t.memoizedState!==null||xt,o=Ja;var c=xt;Ja=n,(xt=t)&&!c?Pa(e,a,(a.subtreeFlags&8772)!==0):Wa(e,a),Ja=o,xt=c}break;case 30:break;default:Wa(e,a)}}function _h(e){var t=e.alternate;t!==null&&(e.alternate=null,_h(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Pe(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 it=null,qt=!1;function Fa(e,t,a){for(a=a.child;a!==null;)Nh(e,t,a),a=a.sibling}function Nh(e,t,a){if(Lt&&typeof Lt.onCommitFiberUnmount=="function")try{Lt.onCommitFiberUnmount(Ha,a)}catch{}switch(a.tag){case 26:xt||Ta(a,t),Fa(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:xt||Ta(a,t);var n=it,o=qt;Cn(a.type)&&(it=a.stateNode,qt=!1),Fa(e,t,a),Yi(a.stateNode),it=n,qt=o;break;case 5:xt||Ta(a,t);case 6:if(n=it,o=qt,it=null,Fa(e,t,a),it=n,qt=o,it!==null)if(qt)try{(it.nodeType===9?it.body:it.nodeName==="HTML"?it.ownerDocument.body:it).removeChild(a.stateNode)}catch(c){$e(a,t,c)}else try{it.removeChild(a.stateNode)}catch(c){$e(a,t,c)}break;case 18:it!==null&&(qt?(e=it,gm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Ql(e)):gm(it,a.stateNode));break;case 4:n=it,o=qt,it=a.stateNode.containerInfo,qt=!0,Fa(e,t,a),it=n,qt=o;break;case 0:case 11:case 14:case 15:Sn(2,a,t),xt||Sn(4,a,t),Fa(e,t,a);break;case 1:xt||(Ta(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&yh(a,t,n)),Fa(e,t,a);break;case 21:Fa(e,t,a);break;case 22:xt=(n=xt)||a.memoizedState!==null,Fa(e,t,a),xt=n;break;default:Fa(e,t,a)}}function jh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ql(e)}catch(a){$e(t,t.return,a)}}}function wh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ql(e)}catch(a){$e(t,t.return,a)}}function bv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Sh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Sh),t;default:throw Error(s(435,e.tag))}}function os(e,t){var a=bv(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var o=Ov.bind(null,e,n);n.then(o,o)}})}function Yt(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var o=a[n],c=e,h=t,x=h;e:for(;x!==null;){switch(x.tag){case 27:if(Cn(x.type)){it=x.stateNode,qt=!1;break e}break;case 5:it=x.stateNode,qt=!1;break e;case 3:case 4:it=x.stateNode.containerInfo,qt=!0;break e}x=x.return}if(it===null)throw Error(s(160));Nh(c,h,o),it=null,qt=!1,c=o.alternate,c!==null&&(c.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Rh(t,e),t=t.sibling}var ba=null;function Rh(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Yt(t,e),Vt(e),n&4&&(Sn(3,e,e.return),zi(3,e),Sn(5,e,e.return));break;case 1:Yt(t,e),Vt(e),n&512&&(xt||a===null||Ta(a,a.return)),n&64&&Ja&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?n:a.concat(n))));break;case 26:var o=ba;if(Yt(t,e),Vt(e),n&512&&(xt||a===null||Ta(a,a.return)),n&4){var c=a!==null?a.memoizedState:null;if(n=e.memoizedState,a===null)if(n===null)if(e.stateNode===null){e:{n=e.type,a=e.memoizedProps,o=o.ownerDocument||o;t:switch(n){case"title":c=o.getElementsByTagName("title")[0],(!c||c[Ae]||c[I]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=o.createElement(n),o.head.insertBefore(c,o.querySelector("head > title"))),Ot(c,n,a),c[I]=e,et(c),n=c;break e;case"link":var h=Rm("link","href",o).get(n+(a.href||""));if(h){for(var x=0;x<h.length;x++)if(c=h[x],c.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&c.getAttribute("rel")===(a.rel==null?null:a.rel)&&c.getAttribute("title")===(a.title==null?null:a.title)&&c.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){h.splice(x,1);break t}}c=o.createElement(n),Ot(c,n,a),o.head.appendChild(c);break;case"meta":if(h=Rm("meta","content",o).get(n+(a.content||""))){for(x=0;x<h.length;x++)if(c=h[x],c.getAttribute("content")===(a.content==null?null:""+a.content)&&c.getAttribute("name")===(a.name==null?null:a.name)&&c.getAttribute("property")===(a.property==null?null:a.property)&&c.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&c.getAttribute("charset")===(a.charSet==null?null:a.charSet)){h.splice(x,1);break t}}c=o.createElement(n),Ot(c,n,a),o.head.appendChild(c);break;default:throw Error(s(468,n))}c[I]=e,et(c),n=c}e.stateNode=n}else Cm(o,e.type,e.stateNode);else e.stateNode=wm(o,n,e.memoizedProps);else c!==n?(c===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):c.count--,n===null?Cm(o,e.type,e.stateNode):wm(o,n,e.memoizedProps)):n===null&&e.stateNode!==null&&Tu(e,e.memoizedProps,a.memoizedProps)}break;case 27:Yt(t,e),Vt(e),n&512&&(xt||a===null||Ta(a,a.return)),a!==null&&n&4&&Tu(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Yt(t,e),Vt(e),n&512&&(xt||a===null||Ta(a,a.return)),e.flags&32){o=e.stateNode;try{pl(o,"")}catch(fe){$e(e,e.return,fe)}}n&4&&e.stateNode!=null&&(o=e.memoizedProps,Tu(e,o,a!==null?a.memoizedProps:o)),n&1024&&(Du=!0);break;case 6:if(Yt(t,e),Vt(e),n&4){if(e.stateNode===null)throw Error(s(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(fe){$e(e,e.return,fe)}}break;case 3:if(Ns=null,o=ba,ba=Es(t.containerInfo),Yt(t,e),ba=o,Vt(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{Ql(t.containerInfo)}catch(fe){$e(e,e.return,fe)}Du&&(Du=!1,Ch(e));break;case 4:n=ba,ba=Es(e.stateNode.containerInfo),Yt(t,e),Vt(e),ba=n;break;case 12:Yt(t,e),Vt(e);break;case 31:Yt(t,e),Vt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,os(e,n)));break;case 13:Yt(t,e),Vt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(cs=At()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,os(e,n)));break;case 22:o=e.memoizedState!==null;var N=a!==null&&a.memoizedState!==null,L=Ja,V=xt;if(Ja=L||o,xt=V||N,Yt(t,e),xt=V,Ja=L,Vt(e),n&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(a===null||N||Ja||xt||tl(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){N=a=t;try{if(c=N.stateNode,o)h=c.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{x=N.stateNode;var X=N.memoizedProps.style,H=X!=null&&X.hasOwnProperty("display")?X.display:null;x.style.display=H==null||typeof H=="boolean"?"":(""+H).trim()}}catch(fe){$e(N,N.return,fe)}}}else if(t.tag===6){if(a===null){N=t;try{N.stateNode.nodeValue=o?"":N.memoizedProps}catch(fe){$e(N,N.return,fe)}}}else if(t.tag===18){if(a===null){N=t;try{var q=N.stateNode;o?ym(q,!0):ym(N.stateNode,!1)}catch(fe){$e(N,N.return,fe)}}}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}n&4&&(n=e.updateQueue,n!==null&&(a=n.retryQueue,a!==null&&(n.retryQueue=null,os(e,a))));break;case 19:Yt(t,e),Vt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,os(e,n)));break;case 30:break;case 21:break;default:Yt(t,e),Vt(e)}}function Vt(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(xh(n)){a=n;break}n=n.return}if(a==null)throw Error(s(160));switch(a.tag){case 27:var o=a.stateNode,c=zu(e);ss(e,c,o);break;case 5:var h=a.stateNode;a.flags&32&&(pl(h,""),a.flags&=-33);var x=zu(e);ss(e,x,h);break;case 3:case 4:var N=a.stateNode.containerInfo,L=zu(e);Mu(e,L,N);break;default:throw Error(s(161))}}catch(V){$e(e,e.return,V)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ch(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ch(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Wa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Eh(e,t.alternate,t),t=t.sibling}function tl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Sn(4,t,t.return),tl(t);break;case 1:Ta(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&yh(t,t.return,a),tl(t);break;case 27:Yi(t.stateNode);case 26:case 5:Ta(t,t.return),tl(t);break;case 22:t.memoizedState===null&&tl(t);break;case 30:tl(t);break;default:tl(t)}e=e.sibling}}function Pa(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,o=e,c=t,h=c.flags;switch(c.tag){case 0:case 11:case 15:Pa(o,c,a),zi(4,c);break;case 1:if(Pa(o,c,a),n=c,o=n.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(L){$e(n,n.return,L)}if(n=c,o=n.updateQueue,o!==null){var x=n.stateNode;try{var N=o.shared.hiddenCallbacks;if(N!==null)for(o.shared.hiddenCallbacks=null,o=0;o<N.length;o++)id(N[o],x)}catch(L){$e(n,n.return,L)}}a&&h&64&&gh(c),Mi(c,c.return);break;case 27:bh(c);case 26:case 5:Pa(o,c,a),a&&n===null&&h&4&&vh(c),Mi(c,c.return);break;case 12:Pa(o,c,a);break;case 31:Pa(o,c,a),a&&h&4&&jh(o,c);break;case 13:Pa(o,c,a),a&&h&4&&wh(o,c);break;case 22:c.memoizedState===null&&Pa(o,c,a),Mi(c,c.return);break;case 30:break;default:Pa(o,c,a)}t=t.sibling}}function Au(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&&vi(a))}function Lu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&vi(e))}function Sa(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Oh(e,t,a,n),t=t.sibling}function Oh(e,t,a,n){var o=t.flags;switch(t.tag){case 0:case 11:case 15:Sa(e,t,a,n),o&2048&&zi(9,t);break;case 1:Sa(e,t,a,n);break;case 3:Sa(e,t,a,n),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&vi(e)));break;case 12:if(o&2048){Sa(e,t,a,n),e=t.stateNode;try{var c=t.memoizedProps,h=c.id,x=c.onPostCommit;typeof x=="function"&&x(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(N){$e(t,t.return,N)}}else Sa(e,t,a,n);break;case 31:Sa(e,t,a,n);break;case 13:Sa(e,t,a,n);break;case 23:break;case 22:c=t.stateNode,h=t.alternate,t.memoizedState!==null?c._visibility&2?Sa(e,t,a,n):Di(e,t):c._visibility&2?Sa(e,t,a,n):(c._visibility|=2,Ll(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),o&2048&&Au(h,t);break;case 24:Sa(e,t,a,n),o&2048&&Lu(t.alternate,t);break;default:Sa(e,t,a,n)}}function Ll(e,t,a,n,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,h=t,x=a,N=n,L=h.flags;switch(h.tag){case 0:case 11:case 15:Ll(c,h,x,N,o),zi(8,h);break;case 23:break;case 22:var V=h.stateNode;h.memoizedState!==null?V._visibility&2?Ll(c,h,x,N,o):Di(c,h):(V._visibility|=2,Ll(c,h,x,N,o)),o&&L&2048&&Au(h.alternate,h);break;case 24:Ll(c,h,x,N,o),o&&L&2048&&Lu(h.alternate,h);break;default:Ll(c,h,x,N,o)}t=t.sibling}}function Di(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,o=n.flags;switch(n.tag){case 22:Di(a,n),o&2048&&Au(n.alternate,n);break;case 24:Di(a,n),o&2048&&Lu(n.alternate,n);break;default:Di(a,n)}t=t.sibling}}var Ai=8192;function Ul(e,t,a){if(e.subtreeFlags&Ai)for(e=e.child;e!==null;)Th(e,t,a),e=e.sibling}function Th(e,t,a){switch(e.tag){case 26:Ul(e,t,a),e.flags&Ai&&e.memoizedState!==null&&rx(a,ba,e.memoizedState,e.memoizedProps);break;case 5:Ul(e,t,a);break;case 3:case 4:var n=ba;ba=Es(e.stateNode.containerInfo),Ul(e,t,a),ba=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Ai,Ai=16777216,Ul(e,t,a),Ai=n):Ul(e,t,a));break;default:Ul(e,t,a)}}function zh(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 Li(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];jt=n,Dh(n,e)}zh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Mh(e),e=e.sibling}function Mh(e){switch(e.tag){case 0:case 11:case 15:Li(e),e.flags&2048&&Sn(9,e,e.return);break;case 3:Li(e);break;case 12:Li(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,us(e)):Li(e);break;default:Li(e)}}function us(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];jt=n,Dh(n,e)}zh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Sn(8,t,t.return),us(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,us(t));break;default:us(t)}e=e.sibling}}function Dh(e,t){for(;jt!==null;){var a=jt;switch(a.tag){case 0:case 11:case 15:Sn(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var n=a.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:vi(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,jt=n;else e:for(a=e;jt!==null;){n=jt;var o=n.sibling,c=n.return;if(_h(n),n===a){jt=null;break e}if(o!==null){o.return=c,jt=o;break e}jt=c}}}var Sv={getCacheForType:function(e){var t=Rt(gt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Rt(gt).controller.signal}},Ev=typeof WeakMap=="function"?WeakMap:Map,Xe=0,Ie=null,Ue=null,ke=0,Ze=0,Wt=null,En=!1,Hl=!1,Uu=!1,Ia=0,ct=0,_n=0,al=0,Hu=0,Pt=0,kl=0,Ui=null,Gt=null,ku=!1,cs=0,Ah=0,fs=1/0,ds=null,Nn=null,Et=0,jn=null,Bl=null,en=0,Bu=0,qu=null,Lh=null,Hi=0,Yu=null;function It(){return(Xe&2)!==0&&ke!==0?ke&-ke:M.T!==null?Zu():J()}function Uh(){if(Pt===0)if((ke&536870912)===0||qe){var e=ka;ka<<=1,(ka&3932160)===0&&(ka=262144),Pt=e}else Pt=536870912;return e=Jt.current,e!==null&&(e.flags|=32),Pt}function Kt(e,t,a){(e===Ie&&(Ze===2||Ze===9)||e.cancelPendingCommit!==null)&&(ql(e,0),wn(e,ke,Pt,!1)),ja(e,a),((Xe&2)===0||e!==Ie)&&(e===Ie&&((Xe&2)===0&&(al|=a),ct===4&&wn(e,ke,Pt,!1)),za(e))}function Hh(e,t,a){if((Xe&6)!==0)throw Error(s(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||on(e,t),o=n?jv(e,t):Gu(e,t,!0),c=n;do{if(o===0){Hl&&!n&&wn(e,t,0,!1);break}else{if(a=e.current.alternate,c&&!_v(a)){o=Gu(e,t,!1),c=!1;continue}if(o===2){if(c=t,e.errorRecoveryDisabledLanes&c)var h=0;else h=e.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){t=h;e:{var x=e;o=Ui;var N=x.current.memoizedState.isDehydrated;if(N&&(ql(x,h).flags|=256),h=Gu(x,h,!1),h!==2){if(Uu&&!N){x.errorRecoveryDisabledLanes|=c,al|=c,o=4;break e}c=Gt,Gt=o,c!==null&&(Gt===null?Gt=c:Gt.push.apply(Gt,c))}o=h}if(c=!1,o!==2)continue}}if(o===1){ql(e,0),wn(e,t,0,!0);break}e:{switch(n=e,c=o,c){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:wn(n,t,Pt,!En);break e;case 2:Gt=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(o=cs+300-At(),10<o)){if(wn(n,t,Pt,!En),cl(n,0,!0)!==0)break e;en=t,n.timeoutHandle=mm(kh.bind(null,n,a,Gt,ds,ku,t,Pt,al,kl,En,c,"Throttled",-0,0),o);break e}kh(n,a,Gt,ds,ku,t,Pt,al,kl,En,c,null,-0,0)}}break}while(!0);za(e)}function kh(e,t,a,n,o,c,h,x,N,L,V,X,H,q){if(e.timeoutHandle=-1,X=t.subtreeFlags,X&8192||(X&16785408)===16785408){X={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ba},Th(t,c,X);var fe=(c&62914560)===c?cs-At():(c&4194048)===c?Ah-At():0;if(fe=sx(X,fe),fe!==null){en=c,e.cancelPendingCommit=fe(Qh.bind(null,e,t,c,a,n,o,h,x,N,V,X,null,H,q)),wn(e,c,h,!L);return}}Qh(e,t,c,a,n,o,h,x,N)}function _v(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 n=0;n<a.length;n++){var o=a[n],c=o.getSnapshot;o=o.value;try{if(!Zt(c(),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 wn(e,t,a,n){t&=~Hu,t&=~al,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var o=t;0<o;){var c=31-Tt(o),h=1<<c;n[c]=-1,o&=~h}a!==0&&Er(e,a,t)}function hs(){return(Xe&6)===0?(ki(0),!1):!0}function Vu(){if(Ue!==null){if(Ze===0)var e=Ue.return;else e=Ue,Ga=Zn=null,lu(e),Tl=null,bi=0,e=Ue;for(;e!==null;)ph(e.alternate,e),e=e.return;Ue=null}}function ql(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Gv(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),en=0,Vu(),Ie=e,Ue=a=Ya(e.current,null),ke=t,Ze=0,Wt=null,En=!1,Hl=on(e,t),Uu=!1,kl=Pt=Hu=al=_n=ct=0,Gt=Ui=null,ku=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var o=31-Tt(n),c=1<<o;t|=e[o],n&=~c}return Ia=t,Ar(),a}function Bh(e,t){Ce=null,M.H=Ci,t===Ol||t===Vr?(t=td(),Ze=3):t===Qo?(t=td(),Ze=4):Ze=t===bu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Wt=t,Ue===null&&(ct=1,as(e,ia(t,e.current)))}function qh(){var e=Jt.current;return e===null?!0:(ke&4194048)===ke?ua===null:(ke&62914560)===ke||(ke&536870912)!==0?e===ua:!1}function Yh(){var e=M.H;return M.H=Ci,e===null?Ci:e}function Vh(){var e=M.A;return M.A=Sv,e}function ms(){ct=4,En||(ke&4194048)!==ke&&Jt.current!==null||(Hl=!0),(_n&134217727)===0&&(al&134217727)===0||Ie===null||wn(Ie,ke,Pt,!1)}function Gu(e,t,a){var n=Xe;Xe|=2;var o=Yh(),c=Vh();(Ie!==e||ke!==t)&&(ds=null,ql(e,t)),t=!1;var h=ct;e:do try{if(Ze!==0&&Ue!==null){var x=Ue,N=Wt;switch(Ze){case 8:Vu(),h=6;break e;case 3:case 2:case 9:case 6:Jt.current===null&&(t=!0);var L=Ze;if(Ze=0,Wt=null,Yl(e,x,N,L),a&&Hl){h=0;break e}break;default:L=Ze,Ze=0,Wt=null,Yl(e,x,N,L)}}Nv(),h=ct;break}catch(V){Bh(e,V)}while(!0);return t&&e.shellSuspendCounter++,Ga=Zn=null,Xe=n,M.H=o,M.A=c,Ue===null&&(Ie=null,ke=0,Ar()),h}function Nv(){for(;Ue!==null;)Gh(Ue)}function jv(e,t){var a=Xe;Xe|=2;var n=Yh(),o=Vh();Ie!==e||ke!==t?(ds=null,fs=At()+500,ql(e,t)):Hl=on(e,t);e:do try{if(Ze!==0&&Ue!==null){t=Ue;var c=Wt;t:switch(Ze){case 1:Ze=0,Wt=null,Yl(e,t,c,1);break;case 2:case 9:if(If(c)){Ze=0,Wt=null,Kh(t);break}t=function(){Ze!==2&&Ze!==9||Ie!==e||(Ze=7),za(e)},c.then(t,t);break e;case 3:Ze=7;break e;case 4:Ze=5;break e;case 7:If(c)?(Ze=0,Wt=null,Kh(t)):(Ze=0,Wt=null,Yl(e,t,c,7));break;case 5:var h=null;switch(Ue.tag){case 26:h=Ue.memoizedState;case 5:case 27:var x=Ue;if(h?Om(h):x.stateNode.complete){Ze=0,Wt=null;var N=x.sibling;if(N!==null)Ue=N;else{var L=x.return;L!==null?(Ue=L,ps(L)):Ue=null}break t}}Ze=0,Wt=null,Yl(e,t,c,5);break;case 6:Ze=0,Wt=null,Yl(e,t,c,6);break;case 8:Vu(),ct=6;break e;default:throw Error(s(462))}}wv();break}catch(V){Bh(e,V)}while(!0);return Ga=Zn=null,M.H=n,M.A=o,Xe=a,Ue!==null?0:(Ie=null,ke=0,Ar(),ct)}function wv(){for(;Ue!==null&&!io();)Gh(Ue)}function Gh(e){var t=hh(e.alternate,e,Ia);e.memoizedProps=e.pendingProps,t===null?ps(e):Ue=t}function Kh(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=sh(a,t,t.pendingProps,t.type,void 0,ke);break;case 11:t=sh(a,t,t.pendingProps,t.type.render,t.ref,ke);break;case 5:lu(t);default:ph(a,t),t=Ue=Vf(t,Ia),t=hh(a,t,Ia)}e.memoizedProps=e.pendingProps,t===null?ps(e):Ue=t}function Yl(e,t,a,n){Ga=Zn=null,lu(t),Tl=null,bi=0;var o=t.return;try{if(mv(e,o,t,a,ke)){ct=1,as(e,ia(a,e.current)),Ue=null;return}}catch(c){if(o!==null)throw Ue=o,c;ct=1,as(e,ia(a,e.current)),Ue=null;return}t.flags&32768?(qe||n===1?e=!0:Hl||(ke&536870912)!==0?e=!1:(En=e=!0,(n===2||n===9||n===3||n===6)&&(n=Jt.current,n!==null&&n.tag===13&&(n.flags|=16384))),Xh(t,e)):ps(t)}function ps(e){var t=e;do{if((t.flags&32768)!==0){Xh(t,En);return}e=t.return;var a=yv(t.alternate,t,Ia);if(a!==null){Ue=a;return}if(t=t.sibling,t!==null){Ue=t;return}Ue=t=e}while(t!==null);ct===0&&(ct=5)}function Xh(e,t){do{var a=vv(e.alternate,e);if(a!==null){a.flags&=32767,Ue=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ue=e;return}Ue=e=a}while(e!==null);ct=6,Ue=null}function Qh(e,t,a,n,o,c,h,x,N){e.cancelPendingCommit=null;do gs();while(Et!==0);if((Xe&6)!==0)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(c=t.lanes|t.childLanes,c|=zo,Sr(e,a,c,h,x,N),e===Ie&&(Ue=Ie=null,ke=0),Bl=t,jn=e,en=a,Bu=c,qu=o,Lh=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Tv(sn,function(){return Wh(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=M.T,M.T=null,o=Q.p,Q.p=2,h=Xe,Xe|=4;try{xv(e,t,a)}finally{Xe=h,Q.p=o,M.T=n}}Et=1,Zh(),$h(),Jh()}}function Zh(){if(Et===1){Et=0;var e=jn,t=Bl,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=M.T,M.T=null;var n=Q.p;Q.p=2;var o=Xe;Xe|=4;try{Rh(t,e);var c=tc,h=Df(e.containerInfo),x=c.focusedElem,N=c.selectionRange;if(h!==x&&x&&x.ownerDocument&&Mf(x.ownerDocument.documentElement,x)){if(N!==null&&wo(x)){var L=N.start,V=N.end;if(V===void 0&&(V=L),"selectionStart"in x)x.selectionStart=L,x.selectionEnd=Math.min(V,x.value.length);else{var X=x.ownerDocument||document,H=X&&X.defaultView||window;if(H.getSelection){var q=H.getSelection(),fe=x.textContent.length,Ne=Math.min(N.start,fe),We=N.end===void 0?Ne:Math.min(N.end,fe);!q.extend&&Ne>We&&(h=We,We=Ne,Ne=h);var T=zf(x,Ne),R=zf(x,We);if(T&&R&&(q.rangeCount!==1||q.anchorNode!==T.node||q.anchorOffset!==T.offset||q.focusNode!==R.node||q.focusOffset!==R.offset)){var A=X.createRange();A.setStart(T.node,T.offset),q.removeAllRanges(),Ne>We?(q.addRange(A),q.extend(R.node,R.offset)):(A.setEnd(R.node,R.offset),q.addRange(A))}}}}for(X=[],q=x;q=q.parentNode;)q.nodeType===1&&X.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<X.length;x++){var G=X[x];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}Cs=!!ec,tc=ec=null}finally{Xe=o,Q.p=n,M.T=a}}e.current=t,Et=2}}function $h(){if(Et===2){Et=0;var e=jn,t=Bl,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=M.T,M.T=null;var n=Q.p;Q.p=2;var o=Xe;Xe|=4;try{Eh(e,t.alternate,t)}finally{Xe=o,Q.p=n,M.T=a}}Et=3}}function Jh(){if(Et===4||Et===3){Et=0,ro();var e=jn,t=Bl,a=en,n=Lh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Et=5:(Et=0,Bl=jn=null,Fh(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(Nn=null),k(a),t=t.stateNode,Lt&&typeof Lt.onCommitFiberRoot=="function")try{Lt.onCommitFiberRoot(Ha,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=M.T,o=Q.p,Q.p=2,M.T=null;try{for(var c=e.onRecoverableError,h=0;h<n.length;h++){var x=n[h];c(x.value,{componentStack:x.stack})}}finally{M.T=t,Q.p=o}}(en&3)!==0&&gs(),za(e),o=e.pendingLanes,(a&261930)!==0&&(o&42)!==0?e===Yu?Hi++:(Hi=0,Yu=e):Hi=0,ki(0)}}function Fh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,vi(t)))}function gs(){return Zh(),$h(),Jh(),Wh()}function Wh(){if(Et!==5)return!1;var e=jn,t=Bu;Bu=0;var a=k(en),n=M.T,o=Q.p;try{Q.p=32>a?32:a,M.T=null,a=qu,qu=null;var c=jn,h=en;if(Et=0,Bl=jn=null,en=0,(Xe&6)!==0)throw Error(s(331));var x=Xe;if(Xe|=4,Mh(c.current),Oh(c,c.current,h,a),Xe=x,ki(0,!1),Lt&&typeof Lt.onPostCommitFiberRoot=="function")try{Lt.onPostCommitFiberRoot(Ha,c)}catch{}return!0}finally{Q.p=o,M.T=n,Fh(e,t)}}function Ph(e,t,a){t=ia(a,t),t=xu(e.stateNode,t,2),e=vn(e,t,2),e!==null&&(ja(e,2),za(e))}function $e(e,t,a){if(e.tag===3)Ph(e,e,a);else for(;t!==null;){if(t.tag===3){Ph(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Nn===null||!Nn.has(n))){e=ia(a,e),a=Id(2),n=vn(t,a,2),n!==null&&(eh(a,n,t,e),ja(n,2),za(n));break}}t=t.return}}function Ku(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new Ev;var o=new Set;n.set(t,o)}else o=n.get(t),o===void 0&&(o=new Set,n.set(t,o));o.has(a)||(Uu=!0,o.add(a),e=Rv.bind(null,e,t,a),t.then(e,e))}function Rv(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ie===e&&(ke&a)===a&&(ct===4||ct===3&&(ke&62914560)===ke&&300>At()-cs?(Xe&2)===0&&ql(e,0):Hu|=a,kl===ke&&(kl=0)),za(e)}function Ih(e,t){t===0&&(t=ri()),e=Kn(e,t),e!==null&&(ja(e,t),za(e))}function Cv(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Ih(e,a)}function Ov(e,t){var a=0;switch(e.tag){case 31:case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(a=o.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(s(314))}n!==null&&n.delete(t),Ih(e,a)}function Tv(e,t){return ul(e,t)}var ys=null,Vl=null,Xu=!1,vs=!1,Qu=!1,Rn=0;function za(e){e!==Vl&&e.next===null&&(Vl===null?ys=Vl=e:Vl=Vl.next=e),vs=!0,Xu||(Xu=!0,Mv())}function ki(e,t){if(!Qu&&vs){Qu=!0;do for(var a=!1,n=ys;n!==null;){if(e!==0){var o=n.pendingLanes;if(o===0)var c=0;else{var h=n.suspendedLanes,x=n.pingedLanes;c=(1<<31-Tt(42|e)+1)-1,c&=o&~(h&~x),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(a=!0,nm(n,c))}else c=ke,c=cl(n,n===Ie?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(c&3)===0||on(n,c)||(a=!0,nm(n,c));n=n.next}while(a);Qu=!1}}function zv(){em()}function em(){vs=Xu=!1;var e=0;Rn!==0&&Vv()&&(e=Rn);for(var t=At(),a=null,n=ys;n!==null;){var o=n.next,c=tm(n,t);c===0?(n.next=null,a===null?ys=o:a.next=o,o===null&&(Vl=a)):(a=n,(e!==0||(c&3)!==0)&&(vs=!0)),n=o}Et!==0&&Et!==5||ki(e),Rn!==0&&(Rn=0)}function tm(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,o=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var h=31-Tt(c),x=1<<h,N=o[h];N===-1?((x&a)===0||(x&n)!==0)&&(o[h]=uo(x,t)):N<=t&&(e.expiredLanes|=x),c&=~x}if(t=Ie,a=ke,a=cl(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(Ze===2||Ze===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&li(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||on(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&li(n),k(a)){case 2:case 8:a=ii;break;case 32:a=sn;break;case 268435456:a=aa;break;default:a=sn}return n=am.bind(null,e),a=ul(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&li(n),e.callbackPriority=2,e.callbackNode=null,2}function am(e,t){if(Et!==0&&Et!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(gs()&&e.callbackNode!==a)return null;var n=ke;return n=cl(e,e===Ie?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Hh(e,n,t),tm(e,At()),e.callbackNode!=null&&e.callbackNode===a?am.bind(null,e):null)}function nm(e,t){if(gs())return null;Hh(e,t,!0)}function Mv(){Kv(function(){(Xe&6)!==0?ul(rn,zv):em()})}function Zu(){if(Rn===0){var e=Rl;e===0&&(e=Hn,Hn<<=1,(Hn&261888)===0&&(Hn=256)),Rn=e}return Rn}function lm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:wr(""+e)}function im(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 Dv(e,t,a,n,o){if(t==="submit"&&a&&a.stateNode===o){var c=lm((o[oe]||null).action),h=n.submitter;h&&(t=(t=h[oe]||null)?lm(t.formAction):h.getAttribute("formAction"),t!==null&&(c=t,h=null));var x=new Tr("action","action",null,n,o);e.push({event:x,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Rn!==0){var N=h?im(o,h):new FormData(o);hu(a,{pending:!0,data:N,method:o.method,action:c},null,N)}}else typeof c=="function"&&(x.preventDefault(),N=h?im(o,h):new FormData(o),hu(a,{pending:!0,data:N,method:o.method,action:c},c,N))},currentTarget:o}]})}}for(var $u=0;$u<To.length;$u++){var Ju=To[$u],Av=Ju.toLowerCase(),Lv=Ju[0].toUpperCase()+Ju.slice(1);xa(Av,"on"+Lv)}xa(Uf,"onAnimationEnd"),xa(Hf,"onAnimationIteration"),xa(kf,"onAnimationStart"),xa("dblclick","onDoubleClick"),xa("focusin","onFocus"),xa("focusout","onBlur"),xa(Wy,"onTransitionRun"),xa(Py,"onTransitionStart"),xa(Iy,"onTransitionCancel"),xa(Bf,"onTransitionEnd"),wa("onMouseEnter",["mouseout","mouseover"]),wa("onMouseLeave",["mouseout","mouseover"]),wa("onPointerEnter",["pointerout","pointerover"]),wa("onPointerLeave",["pointerout","pointerover"]),Nt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Nt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Nt("onBeforeInput",["compositionend","keypress","textInput","paste"]),Nt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Nt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Nt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Bi="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(" "),Uv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Bi));function rm(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],o=n.event;n=n.listeners;e:{var c=void 0;if(t)for(var h=n.length-1;0<=h;h--){var x=n[h],N=x.instance,L=x.currentTarget;if(x=x.listener,N!==c&&o.isPropagationStopped())break e;c=x,o.currentTarget=L;try{c(o)}catch(V){Dr(V)}o.currentTarget=null,c=N}else for(h=0;h<n.length;h++){if(x=n[h],N=x.instance,L=x.currentTarget,x=x.listener,N!==c&&o.isPropagationStopped())break e;c=x,o.currentTarget=L;try{c(o)}catch(V){Dr(V)}o.currentTarget=null,c=N}}}}function He(e,t){var a=t[ve];a===void 0&&(a=t[ve]=new Set);var n=e+"__bubble";a.has(n)||(sm(t,e,2,!1),a.add(n))}function Fu(e,t,a){var n=0;t&&(n|=4),sm(a,e,n,t)}var xs="_reactListening"+Math.random().toString(36).slice(2);function Wu(e){if(!e[xs]){e[xs]=!0,cn.forEach(function(a){a!=="selectionchange"&&(Uv.has(a)||Fu(a,!1,e),Fu(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xs]||(t[xs]=!0,Fu("selectionchange",!1,t))}}function sm(e,t,a,n){switch(Um(t)){case 2:var o=cx;break;case 8:o=fx;break;default:o=dc}a=o.bind(null,t,a,e),o=void 0,!yo||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),n?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 Pu(e,t,a,n,o){var c=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var h=n.tag;if(h===3||h===4){var x=n.stateNode.containerInfo;if(x===o)break;if(h===4)for(h=n.return;h!==null;){var N=h.tag;if((N===3||N===4)&&h.stateNode.containerInfo===o)return;h=h.return}for(;x!==null;){if(h=tt(x),h===null)return;if(N=h.tag,N===5||N===6||N===26||N===27){n=c=h;continue e}x=x.parentNode}}n=n.return}df(function(){var L=c,V=po(a),X=[];e:{var H=qf.get(e);if(H!==void 0){var q=Tr,fe=e;switch(e){case"keypress":if(Cr(a)===0)break e;case"keydown":case"keyup":q=Oy;break;case"focusin":fe="focus",q=So;break;case"focusout":fe="blur",q=So;break;case"beforeblur":case"afterblur":q=So;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=pf;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=My;break;case Uf:case Hf:case kf:q=by;break;case Bf:q=Ay;break;case"scroll":case"scrollend":q=py;break;case"wheel":q=Uy;break;case"copy":case"cut":case"paste":q=Ey;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=yf;break;case"toggle":case"beforetoggle":q=ky}var Ne=(t&4)!==0,We=!Ne&&(e==="scroll"||e==="scrollend"),T=Ne?H!==null?H+"Capture":null:H;Ne=[];for(var R=L,A;R!==null;){var G=R;if(A=G.stateNode,G=G.tag,G!==5&&G!==26&&G!==27||A===null||T===null||(G=si(R,T),G!=null&&Ne.push(qi(R,G,A))),We)break;R=R.return}0<Ne.length&&(H=new q(H,fe,null,a,V),X.push({event:H,listeners:Ne}))}}if((t&7)===0){e:{if(H=e==="mouseover"||e==="pointerover",q=e==="mouseout"||e==="pointerout",H&&a!==mo&&(fe=a.relatedTarget||a.fromElement)&&(tt(fe)||fe[ue]))break e;if((q||H)&&(H=V.window===V?V:(H=V.ownerDocument)?H.defaultView||H.parentWindow:window,q?(fe=a.relatedTarget||a.toElement,q=L,fe=fe?tt(fe):null,fe!==null&&(We=f(fe),Ne=fe.tag,fe!==We||Ne!==5&&Ne!==27&&Ne!==6)&&(fe=null)):(q=null,fe=L),q!==fe)){if(Ne=pf,G="onMouseLeave",T="onMouseEnter",R="mouse",(e==="pointerout"||e==="pointerover")&&(Ne=yf,G="onPointerLeave",T="onPointerEnter",R="pointer"),We=q==null?H:Ye(q),A=fe==null?H:Ye(fe),H=new Ne(G,R+"leave",q,a,V),H.target=We,H.relatedTarget=A,G=null,tt(V)===L&&(Ne=new Ne(T,R+"enter",fe,a,V),Ne.target=A,Ne.relatedTarget=We,G=Ne),We=G,q&&fe)t:{for(Ne=Hv,T=q,R=fe,A=0,G=T;G;G=Ne(G))A++;G=0;for(var xe=R;xe;xe=Ne(xe))G++;for(;0<A-G;)T=Ne(T),A--;for(;0<G-A;)R=Ne(R),G--;for(;A--;){if(T===R||R!==null&&T===R.alternate){Ne=T;break t}T=Ne(T),R=Ne(R)}Ne=null}else Ne=null;q!==null&&om(X,H,q,Ne,!1),fe!==null&&We!==null&&om(X,We,fe,Ne,!0)}}e:{if(H=L?Ye(L):window,q=H.nodeName&&H.nodeName.toLowerCase(),q==="select"||q==="input"&&H.type==="file")var Ge=jf;else if(_f(H))if(wf)Ge=$y;else{Ge=Qy;var de=Xy}else q=H.nodeName,!q||q.toLowerCase()!=="input"||H.type!=="checkbox"&&H.type!=="radio"?L&&ho(L.elementType)&&(Ge=jf):Ge=Zy;if(Ge&&(Ge=Ge(e,L))){Nf(X,Ge,a,V);break e}de&&de(e,H,L),e==="focusout"&&L&&H.type==="number"&&L.memoizedProps.value!=null&&fo(H,"number",H.value)}switch(de=L?Ye(L):window,e){case"focusin":(_f(de)||de.contentEditable==="true")&&(xl=de,Ro=L,pi=null);break;case"focusout":pi=Ro=xl=null;break;case"mousedown":Co=!0;break;case"contextmenu":case"mouseup":case"dragend":Co=!1,Af(X,a,V);break;case"selectionchange":if(Fy)break;case"keydown":case"keyup":Af(X,a,V)}var Oe;if(_o)e:{switch(e){case"compositionstart":var Be="onCompositionStart";break e;case"compositionend":Be="onCompositionEnd";break e;case"compositionupdate":Be="onCompositionUpdate";break e}Be=void 0}else vl?Sf(e,a)&&(Be="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Be="onCompositionStart");Be&&(vf&&a.locale!=="ko"&&(vl||Be!=="onCompositionStart"?Be==="onCompositionEnd"&&vl&&(Oe=hf()):(fn=V,vo="value"in fn?fn.value:fn.textContent,vl=!0)),de=bs(L,Be),0<de.length&&(Be=new gf(Be,e,null,a,V),X.push({event:Be,listeners:de}),Oe?Be.data=Oe:(Oe=Ef(a),Oe!==null&&(Be.data=Oe)))),(Oe=qy?Yy(e,a):Vy(e,a))&&(Be=bs(L,"onBeforeInput"),0<Be.length&&(de=new gf("onBeforeInput","beforeinput",null,a,V),X.push({event:de,listeners:Be}),de.data=Oe)),Dv(X,e,L,a,V)}rm(X,t)})}function qi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function bs(e,t){for(var a=t+"Capture",n=[];e!==null;){var o=e,c=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||c===null||(o=si(e,a),o!=null&&n.unshift(qi(e,o,c)),o=si(e,t),o!=null&&n.push(qi(e,o,c))),e.tag===3)return n;e=e.return}return[]}function Hv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function om(e,t,a,n,o){for(var c=t._reactName,h=[];a!==null&&a!==n;){var x=a,N=x.alternate,L=x.stateNode;if(x=x.tag,N!==null&&N===n)break;x!==5&&x!==26&&x!==27||L===null||(N=L,o?(L=si(a,c),L!=null&&h.unshift(qi(a,L,N))):o||(L=si(a,c),L!=null&&h.push(qi(a,L,N)))),a=a.return}h.length!==0&&e.push({event:t,listeners:h})}var kv=/\r\n?/g,Bv=/\u0000|\uFFFD/g;function um(e){return(typeof e=="string"?e:""+e).replace(kv,`
9
+ `).replace(Bv,"")}function cm(e,t){return t=um(t),um(e)===t}function Fe(e,t,a,n,o,c){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||pl(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&pl(e,""+n);break;case"className":dt(e,"class",n);break;case"tabIndex":dt(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":dt(e,a,n);break;case"style":cf(e,n,c);break;case"data":if(t!=="object"){dt(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=wr(""+n),e.setAttribute(a,n);break;case"action":case"formAction":if(typeof n=="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 c=="function"&&(a==="formAction"?(t!=="input"&&Fe(e,t,"name",o.name,o,null),Fe(e,t,"formEncType",o.formEncType,o,null),Fe(e,t,"formMethod",o.formMethod,o,null),Fe(e,t,"formTarget",o.formTarget,o,null)):(Fe(e,t,"encType",o.encType,o,null),Fe(e,t,"method",o.method,o,null),Fe(e,t,"target",o.target,o,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=wr(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=Ba);break;case"onScroll":n!=null&&He("scroll",e);break;case"onScrollEnd":n!=null&&He("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(s(61));if(a=n.__html,a!=null){if(o.children!=null)throw Error(s(60));e.innerHTML=a}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}a=wr(""+n),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":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""+n):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":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":n===!0?e.setAttribute(a,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,n):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(a,n):e.removeAttribute(a);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(a):e.setAttribute(a,n);break;case"popover":He("beforetoggle",e),He("toggle",e),Le(e,"popover",n);break;case"xlinkActuate":zt(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":zt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":zt(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":zt(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":zt(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":zt(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":zt(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":zt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":zt(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Le(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=hy.get(a)||a,Le(e,a,n))}}function Iu(e,t,a,n,o,c){switch(a){case"style":cf(e,n,c);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(s(61));if(a=n.__html,a!=null){if(o.children!=null)throw Error(s(60));e.innerHTML=a}}break;case"children":typeof n=="string"?pl(e,n):(typeof n=="number"||typeof n=="bigint")&&pl(e,""+n);break;case"onScroll":n!=null&&He("scroll",e);break;case"onScrollEnd":n!=null&&He("scrollend",e);break;case"onClick":n!=null&&(e.onclick=Ba);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!va.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(o=a.endsWith("Capture"),t=a.slice(2,o?a.length-7:void 0),c=e[oe]||null,c=c!=null?c[a]:null,typeof c=="function"&&e.removeEventListener(t,c,o),typeof n=="function")){typeof c!="function"&&c!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,o);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):Le(e,a,n)}}}function Ot(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":He("error",e),He("load",e);var n=!1,o=!1,c;for(c in a)if(a.hasOwnProperty(c)){var h=a[c];if(h!=null)switch(c){case"src":n=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Fe(e,t,c,h,a,null)}}o&&Fe(e,t,"srcSet",a.srcSet,a,null),n&&Fe(e,t,"src",a.src,a,null);return;case"input":He("invalid",e);var x=c=h=o=null,N=null,L=null;for(n in a)if(a.hasOwnProperty(n)){var V=a[n];if(V!=null)switch(n){case"name":o=V;break;case"type":h=V;break;case"checked":N=V;break;case"defaultChecked":L=V;break;case"value":c=V;break;case"defaultValue":x=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(s(137,t));break;default:Fe(e,t,n,V,a,null)}}rf(e,c,x,N,L,h,o,!1);return;case"select":He("invalid",e),n=h=c=null;for(o in a)if(a.hasOwnProperty(o)&&(x=a[o],x!=null))switch(o){case"value":c=x;break;case"defaultValue":h=x;break;case"multiple":n=x;default:Fe(e,t,o,x,a,null)}t=c,a=h,e.multiple=!!n,t!=null?ml(e,!!n,t,!1):a!=null&&ml(e,!!n,a,!0);return;case"textarea":He("invalid",e),c=o=n=null;for(h in a)if(a.hasOwnProperty(h)&&(x=a[h],x!=null))switch(h){case"value":n=x;break;case"defaultValue":o=x;break;case"children":c=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(s(91));break;default:Fe(e,t,h,x,a,null)}of(e,n,o,c);return;case"option":for(N in a)a.hasOwnProperty(N)&&(n=a[N],n!=null)&&(N==="selected"?e.selected=n&&typeof n!="function"&&typeof n!="symbol":Fe(e,t,N,n,a,null));return;case"dialog":He("beforetoggle",e),He("toggle",e),He("cancel",e),He("close",e);break;case"iframe":case"object":He("load",e);break;case"video":case"audio":for(n=0;n<Bi.length;n++)He(Bi[n],e);break;case"image":He("error",e),He("load",e);break;case"details":He("toggle",e);break;case"embed":case"source":case"link":He("error",e),He("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(L in a)if(a.hasOwnProperty(L)&&(n=a[L],n!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Fe(e,t,L,n,a,null)}return;default:if(ho(t)){for(V in a)a.hasOwnProperty(V)&&(n=a[V],n!==void 0&&Iu(e,t,V,n,a,void 0));return}}for(x in a)a.hasOwnProperty(x)&&(n=a[x],n!=null&&Fe(e,t,x,n,a,null))}function qv(e,t,a,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,c=null,h=null,x=null,N=null,L=null,V=null;for(q in a){var X=a[q];if(a.hasOwnProperty(q)&&X!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":N=X;default:n.hasOwnProperty(q)||Fe(e,t,q,null,n,X)}}for(var H in n){var q=n[H];if(X=a[H],n.hasOwnProperty(H)&&(q!=null||X!=null))switch(H){case"type":c=q;break;case"name":o=q;break;case"checked":L=q;break;case"defaultChecked":V=q;break;case"value":h=q;break;case"defaultValue":x=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(s(137,t));break;default:q!==X&&Fe(e,t,H,q,n,X)}}co(e,h,x,N,L,V,c,o);return;case"select":q=h=x=H=null;for(c in a)if(N=a[c],a.hasOwnProperty(c)&&N!=null)switch(c){case"value":break;case"multiple":q=N;default:n.hasOwnProperty(c)||Fe(e,t,c,null,n,N)}for(o in n)if(c=n[o],N=a[o],n.hasOwnProperty(o)&&(c!=null||N!=null))switch(o){case"value":H=c;break;case"defaultValue":x=c;break;case"multiple":h=c;default:c!==N&&Fe(e,t,o,c,n,N)}t=x,a=h,n=q,H!=null?ml(e,!!a,H,!1):!!n!=!!a&&(t!=null?ml(e,!!a,t,!0):ml(e,!!a,a?[]:"",!1));return;case"textarea":q=H=null;for(x in a)if(o=a[x],a.hasOwnProperty(x)&&o!=null&&!n.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:Fe(e,t,x,null,n,o)}for(h in n)if(o=n[h],c=a[h],n.hasOwnProperty(h)&&(o!=null||c!=null))switch(h){case"value":H=o;break;case"defaultValue":q=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(s(91));break;default:o!==c&&Fe(e,t,h,o,n,c)}sf(e,H,q);return;case"option":for(var fe in a)H=a[fe],a.hasOwnProperty(fe)&&H!=null&&!n.hasOwnProperty(fe)&&(fe==="selected"?e.selected=!1:Fe(e,t,fe,null,n,H));for(N in n)H=n[N],q=a[N],n.hasOwnProperty(N)&&H!==q&&(H!=null||q!=null)&&(N==="selected"?e.selected=H&&typeof H!="function"&&typeof H!="symbol":Fe(e,t,N,H,n,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 Ne in a)H=a[Ne],a.hasOwnProperty(Ne)&&H!=null&&!n.hasOwnProperty(Ne)&&Fe(e,t,Ne,null,n,H);for(L in n)if(H=n[L],q=a[L],n.hasOwnProperty(L)&&H!==q&&(H!=null||q!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(s(137,t));break;default:Fe(e,t,L,H,n,q)}return;default:if(ho(t)){for(var We in a)H=a[We],a.hasOwnProperty(We)&&H!==void 0&&!n.hasOwnProperty(We)&&Iu(e,t,We,void 0,n,H);for(V in n)H=n[V],q=a[V],!n.hasOwnProperty(V)||H===q||H===void 0&&q===void 0||Iu(e,t,V,H,n,q);return}}for(var T in a)H=a[T],a.hasOwnProperty(T)&&H!=null&&!n.hasOwnProperty(T)&&Fe(e,t,T,null,n,H);for(X in n)H=n[X],q=a[X],!n.hasOwnProperty(X)||H===q||H==null&&q==null||Fe(e,t,X,H,n,q)}function fm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Yv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),n=0;n<a.length;n++){var o=a[n],c=o.transferSize,h=o.initiatorType,x=o.duration;if(c&&x&&fm(h)){for(h=0,x=o.responseEnd,n+=1;n<a.length;n++){var N=a[n],L=N.startTime;if(L>x)break;var V=N.transferSize,X=N.initiatorType;V&&fm(X)&&(N=N.responseEnd,h+=V*(N<x?1:(x-L)/(N-L)))}if(--n,t+=8*(c+h)/(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 ec=null,tc=null;function Ss(e){return e.nodeType===9?e:e.ownerDocument}function dm(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 hm(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 ac(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 nc=null;function Vv(){var e=window.event;return e&&e.type==="popstate"?e===nc?!1:(nc=e,!0):(nc=null,!1)}var mm=typeof setTimeout=="function"?setTimeout:void 0,Gv=typeof clearTimeout=="function"?clearTimeout:void 0,pm=typeof Promise=="function"?Promise:void 0,Kv=typeof queueMicrotask=="function"?queueMicrotask:typeof pm<"u"?function(e){return pm.resolve(null).then(e).catch(Xv)}:mm;function Xv(e){setTimeout(function(){throw e})}function Cn(e){return e==="head"}function gm(e,t){var a=t,n=0;do{var o=a.nextSibling;if(e.removeChild(a),o&&o.nodeType===8)if(a=o.data,a==="/$"||a==="/&"){if(n===0){e.removeChild(o),Ql(t);return}n--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")n++;else if(a==="html")Yi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Yi(a);for(var c=a.firstChild;c;){var h=c.nextSibling,x=c.nodeName;c[Ae]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&c.rel.toLowerCase()==="stylesheet"||a.removeChild(c),c=h}}else a==="body"&&Yi(e.ownerDocument.body);a=o}while(a);Ql(t)}function ym(e,t){var a=e;e=0;do{var n=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||""),n&&n.nodeType===8)if(a=n.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=n}while(a)}function lc(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":lc(a),Pe(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Qv(e,t,a,n){for(;e.nodeType===1;){var o=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[Ae])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==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(c=e.getAttribute("src"),(c!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=ca(e.nextSibling),e===null)break}return null}function Zv(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=ca(e.nextSibling),e===null))return null;return e}function vm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ca(e.nextSibling),e===null))return null;return e}function ic(e){return e.data==="$?"||e.data==="$~"}function rc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function $v(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var n=function(){t(),a.removeEventListener("DOMContentLoaded",n)};a.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function ca(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 sc=null;function xm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return ca(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function bm(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 Sm(e,t,a){switch(t=Ss(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 Yi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Pe(e)}var fa=new Map,Em=new Set;function Es(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var tn=Q.d;Q.d={f:Jv,r:Fv,D:Wv,C:Pv,L:Iv,m:ex,X:ax,S:tx,M:nx};function Jv(){var e=tn.f(),t=hs();return e||t}function Fv(e){var t=ot(e);t!==null&&t.tag===5&&t.type==="form"?Bd(t):tn.r(e)}var Gl=typeof document>"u"?null:document;function _m(e,t,a){var n=Gl;if(n&&typeof t=="string"&&t){var o=na(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),Em.has(o)||(Em.add(o),e={rel:e,crossOrigin:a,href:t},n.querySelector(o)===null&&(t=n.createElement("link"),Ot(t,"link",e),et(t),n.head.appendChild(t)))}}function Wv(e){tn.D(e),_m("dns-prefetch",e,null)}function Pv(e,t){tn.C(e,t),_m("preconnect",e,t)}function Iv(e,t,a){tn.L(e,t,a);var n=Gl;if(n&&e&&t){var o='link[rel="preload"][as="'+na(t)+'"]';t==="image"&&a&&a.imageSrcSet?(o+='[imagesrcset="'+na(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(o+='[imagesizes="'+na(a.imageSizes)+'"]')):o+='[href="'+na(e)+'"]';var c=o;switch(t){case"style":c=Kl(e);break;case"script":c=Xl(e)}fa.has(c)||(e=v({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),fa.set(c,e),n.querySelector(o)!==null||t==="style"&&n.querySelector(Vi(c))||t==="script"&&n.querySelector(Gi(c))||(t=n.createElement("link"),Ot(t,"link",e),et(t),n.head.appendChild(t)))}}function ex(e,t){tn.m(e,t);var a=Gl;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+na(n)+'"][href="'+na(e)+'"]',c=o;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Xl(e)}if(!fa.has(c)&&(e=v({rel:"modulepreload",href:e},t),fa.set(c,e),a.querySelector(o)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Gi(c)))return}n=a.createElement("link"),Ot(n,"link",e),et(n),a.head.appendChild(n)}}}function tx(e,t,a){tn.S(e,t,a);var n=Gl;if(n&&e){var o=St(n).hoistableStyles,c=Kl(e);t=t||"default";var h=o.get(c);if(!h){var x={loading:0,preload:null};if(h=n.querySelector(Vi(c)))x.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},a),(a=fa.get(c))&&oc(e,a);var N=h=n.createElement("link");et(N),Ot(N,"link",e),N._p=new Promise(function(L,V){N.onload=L,N.onerror=V}),N.addEventListener("load",function(){x.loading|=1}),N.addEventListener("error",function(){x.loading|=2}),x.loading|=4,_s(h,t,n)}h={type:"stylesheet",instance:h,count:1,state:x},o.set(c,h)}}}function ax(e,t){tn.X(e,t);var a=Gl;if(a&&e){var n=St(a).hoistableScripts,o=Xl(e),c=n.get(o);c||(c=a.querySelector(Gi(o)),c||(e=v({src:e,async:!0},t),(t=fa.get(o))&&uc(e,t),c=a.createElement("script"),et(c),Ot(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(o,c))}}function nx(e,t){tn.M(e,t);var a=Gl;if(a&&e){var n=St(a).hoistableScripts,o=Xl(e),c=n.get(o);c||(c=a.querySelector(Gi(o)),c||(e=v({src:e,async:!0,type:"module"},t),(t=fa.get(o))&&uc(e,t),c=a.createElement("script"),et(c),Ot(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(o,c))}}function Nm(e,t,a,n){var o=(o=_e.current)?Es(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=Kl(a.href),a=St(o).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Kl(a.href);var c=St(o).hoistableStyles,h=c.get(e);if(h||(o=o.ownerDocument||o,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,h),(c=o.querySelector(Vi(e)))&&!c._p&&(h.instance=c,h.state.loading=5),fa.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},fa.set(e,a),c||lx(o,e,a,h.state))),t&&n===null)throw Error(s(528,""));return h}if(t&&n!==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=Xl(a),a=St(o).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Kl(e){return'href="'+na(e)+'"'}function Vi(e){return'link[rel="stylesheet"]['+e+"]"}function jm(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function lx(e,t,a,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),Ot(t,"link",a),et(t),e.head.appendChild(t))}function Xl(e){return'[src="'+na(e)+'"]'}function Gi(e){return"script[async]"+e}function wm(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+na(a.href)+'"]');if(n)return t.instance=n,et(n),n;var o=v({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),et(n),Ot(n,"style",o),_s(n,a.precedence,e),t.instance=n;case"stylesheet":o=Kl(a.href);var c=e.querySelector(Vi(o));if(c)return t.state.loading|=4,t.instance=c,et(c),c;n=jm(a),(o=fa.get(o))&&oc(n,o),c=(e.ownerDocument||e).createElement("link"),et(c);var h=c;return h._p=new Promise(function(x,N){h.onload=x,h.onerror=N}),Ot(c,"link",n),t.state.loading|=4,_s(c,a.precedence,e),t.instance=c;case"script":return c=Xl(a.src),(o=e.querySelector(Gi(c)))?(t.instance=o,et(o),o):(n=a,(o=fa.get(c))&&(n=v({},a),uc(n,o)),e=e.ownerDocument||e,o=e.createElement("script"),et(o),Ot(o,"link",n),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&&(n=t.instance,t.state.loading|=4,_s(n,a.precedence,e));return t.instance}function _s(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=n.length?n[n.length-1]:null,c=o,h=0;h<n.length;h++){var x=n[h];if(x.dataset.precedence===t)c=x;else if(c!==o)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function oc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function uc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ns=null;function Rm(e,t,a){if(Ns===null){var n=new Map,o=Ns=new Map;o.set(a,n)}else o=Ns,n=o.get(a),n||(n=new Map,o.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),o=0;o<a.length;o++){var c=a[o];if(!(c[Ae]||c[I]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var h=c.getAttribute(t)||"";h=e+h;var x=n.get(h);x?x.push(c):n.set(h,[c])}}return n}function Cm(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function ix(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 Om(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function rx(e,t,a,n){if(a.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var o=Kl(n.href),c=t.querySelector(Vi(o));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=js.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=c,et(c);return}c=t.ownerDocument||t,n=jm(n),(o=fa.get(o))&&oc(n,o),c=c.createElement("link"),et(c);var h=c;h._p=new Promise(function(x,N){h.onload=x,h.onerror=N}),Ot(c,"link",n),a.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=js.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var cc=0;function sx(e,t){return e.stylesheets&&e.count===0&&Rs(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&Rs(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&cc===0&&(cc=62500*Yv());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Rs(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>cc?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(o)}}:null}function js(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Rs(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ws=null;function Rs(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ws=new Map,t.forEach(ox,e),ws=null,js.call(e))}function ox(e,t){if(!(t.state.loading&4)){var a=ws.get(e);if(a)var n=a.get(null);else{a=new Map,ws.set(e,a);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<o.length;c++){var h=o[c];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(a.set(h.dataset.precedence,h),n=h)}n&&a.set(null,n)}o=t.instance,h=o.getAttribute("data-precedence"),c=a.get(h)||n,c===n&&a.set(null,o),a.set(h,o),this.count++,n=js.bind(this),o.addEventListener("load",n),o.addEventListener("error",n),c?c.parentNode.insertBefore(o,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var Ki={$$typeof:$,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function ux(e,t,a,n,o,c,h,x,N){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=un(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=un(0),this.hiddenUpdates=un(null),this.identifierPrefix=n,this.onUncaughtError=o,this.onCaughtError=c,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.incompleteTransitions=new Map}function Tm(e,t,a,n,o,c,h,x,N,L,V,X){return e=new ux(e,t,a,h,N,L,V,X,x),t=1,c===!0&&(t|=24),c=$t(3,null,null,t),e.current=c,c.stateNode=e,t=Go(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:n,isDehydrated:a,cache:t},Zo(c),e}function zm(e){return e?(e=El,e):El}function Mm(e,t,a,n,o,c){o=zm(o),n.context===null?n.context=o:n.pendingContext=o,n=yn(t),n.payload={element:a},c=c===void 0?null:c,c!==null&&(n.callback=c),a=vn(e,n,t),a!==null&&(Kt(a,e,t),Ei(a,e,t))}function Dm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function fc(e,t){Dm(e,t),(e=e.alternate)&&Dm(e,t)}function Am(e){if(e.tag===13||e.tag===31){var t=Kn(e,67108864);t!==null&&Kt(t,e,67108864),fc(e,67108864)}}function Lm(e){if(e.tag===13||e.tag===31){var t=It();t=O(t);var a=Kn(e,t);a!==null&&Kt(a,e,t),fc(e,t)}}var Cs=!0;function cx(e,t,a,n){var o=M.T;M.T=null;var c=Q.p;try{Q.p=2,dc(e,t,a,n)}finally{Q.p=c,M.T=o}}function fx(e,t,a,n){var o=M.T;M.T=null;var c=Q.p;try{Q.p=8,dc(e,t,a,n)}finally{Q.p=c,M.T=o}}function dc(e,t,a,n){if(Cs){var o=hc(n);if(o===null)Pu(e,t,n,Os,a),Hm(e,n);else if(hx(o,e,t,a,n))n.stopPropagation();else if(Hm(e,n),t&4&&-1<dx.indexOf(e)){for(;o!==null;){var c=ot(o);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var h=ya(c.pendingLanes);if(h!==0){var x=c;for(x.pendingLanes|=2,x.entangledLanes|=2;h;){var N=1<<31-Tt(h);x.entanglements[1]|=N,h&=~N}za(c),(Xe&6)===0&&(fs=At()+500,ki(0))}}break;case 31:case 13:x=Kn(c,2),x!==null&&Kt(x,c,2),hs(),fc(c,2)}if(c=hc(n),c===null&&Pu(e,t,n,Os,a),c===o)break;o=c}o!==null&&n.stopPropagation()}else Pu(e,t,n,null,a)}}function hc(e){return e=po(e),mc(e)}var Os=null;function mc(e){if(Os=null,e=tt(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=d(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 Os=e,null}function Um(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(Ua()){case rn:return 2;case ii:return 8;case sn:case ga:return 32;case aa:return 268435456;default:return 32}default:return 32}}var pc=!1,On=null,Tn=null,zn=null,Xi=new Map,Qi=new Map,Mn=[],dx="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 Hm(e,t){switch(e){case"focusin":case"focusout":On=null;break;case"dragenter":case"dragleave":Tn=null;break;case"mouseover":case"mouseout":zn=null;break;case"pointerover":case"pointerout":Xi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qi.delete(t.pointerId)}}function Zi(e,t,a,n,o,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:c,targetContainers:[o]},t!==null&&(t=ot(t),t!==null&&Am(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function hx(e,t,a,n,o){switch(t){case"focusin":return On=Zi(On,e,t,a,n,o),!0;case"dragenter":return Tn=Zi(Tn,e,t,a,n,o),!0;case"mouseover":return zn=Zi(zn,e,t,a,n,o),!0;case"pointerover":var c=o.pointerId;return Xi.set(c,Zi(Xi.get(c)||null,e,t,a,n,o)),!0;case"gotpointercapture":return c=o.pointerId,Qi.set(c,Zi(Qi.get(c)||null,e,t,a,n,o)),!0}return!1}function km(e){var t=tt(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=d(a),t!==null){e.blockedOn=t,W(e.priority,function(){Lm(a)});return}}else if(t===31){if(t=m(a),t!==null){e.blockedOn=t,W(e.priority,function(){Lm(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 Ts(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=hc(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);mo=n,a.target.dispatchEvent(n),mo=null}else return t=ot(a),t!==null&&Am(t),e.blockedOn=a,!1;t.shift()}return!0}function Bm(e,t,a){Ts(e)&&a.delete(t)}function mx(){pc=!1,On!==null&&Ts(On)&&(On=null),Tn!==null&&Ts(Tn)&&(Tn=null),zn!==null&&Ts(zn)&&(zn=null),Xi.forEach(Bm),Qi.forEach(Bm)}function zs(e,t){e.blockedOn===t&&(e.blockedOn=null,pc||(pc=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,mx)))}var Ms=null;function qm(e){Ms!==e&&(Ms=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){Ms===e&&(Ms=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],o=e[t+2];if(typeof n!="function"){if(mc(n||a)===null)continue;break}var c=ot(a);c!==null&&(e.splice(t,3),t-=3,hu(c,{pending:!0,data:o,method:a.method,action:n},n,o))}}))}function Ql(e){function t(N){return zs(N,e)}On!==null&&zs(On,e),Tn!==null&&zs(Tn,e),zn!==null&&zs(zn,e),Xi.forEach(t),Qi.forEach(t);for(var a=0;a<Mn.length;a++){var n=Mn[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Mn.length&&(a=Mn[0],a.blockedOn===null);)km(a),a.blockedOn===null&&Mn.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var o=a[n],c=a[n+1],h=o[oe]||null;if(typeof c=="function")h||qm(a);else if(h){var x=null;if(c&&c.hasAttribute("formAction")){if(o=c,h=c[oe]||null)x=h.formAction;else if(mc(o)!==null)continue}else x=h.action;typeof x=="function"?a[n+1]=x:(a.splice(n,3),n-=3),qm(a)}}}function Ym(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(h){return o=h})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),n||setTimeout(a,20)}function a(){if(!n&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function gc(e){this._internalRoot=e}Ds.prototype.render=gc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var a=t.current,n=It();Mm(a,n,e,t,null,null)},Ds.prototype.unmount=gc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Mm(e.current,2,null,e,null,null),hs(),t[ue]=null}};function Ds(e){this._internalRoot=e}Ds.prototype.unstable_scheduleHydration=function(e){if(e){var t=J();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Mn.length&&t!==0&&t<Mn[a].priority;a++);Mn.splice(a,0,e),a===0&&km(e)}};var Vm=i.version;if(Vm!=="19.2.4")throw Error(s(527,Vm,"19.2.4"));Q.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 px={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var As=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!As.isDisabled&&As.supportsFiber)try{Ha=As.inject(px),Lt=As}catch{}}return Fi.createRoot=function(e,t){if(!u(e))throw Error(s(299));var a=!1,n="",o=Jd,c=Fd,h=Wd;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=Tm(e,1,!1,null,null,a,n,null,o,c,h,Ym),e[ue]=t.current,Wu(e),new gc(t)},Fi.hydrateRoot=function(e,t,a){if(!u(e))throw Error(s(299));var n=!1,o="",c=Jd,h=Fd,x=Wd,N=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(c=a.onUncaughtError),a.onCaughtError!==void 0&&(h=a.onCaughtError),a.onRecoverableError!==void 0&&(x=a.onRecoverableError),a.formState!==void 0&&(N=a.formState)),t=Tm(e,1,!0,t,a??null,n,o,N,c,h,x,Ym),t.context=zm(null),a=t.current,n=It(),n=O(n),o=yn(n),o.callback=null,vn(a,o,n),a=n,t.current.lanes=a,ja(t,a),za(t),e[ue]=t.current,Wu(e),new Ds(t)},Fi.version="19.2.4",Fi}var xp;function D0(){if(xp)return Nc.exports;xp=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(i){console.error(i)}}return l(),Nc.exports=M0(),Nc.exports}var A0=D0();var xg=l=>{throw TypeError(l)},L0=(l,i,r)=>i.has(l)||xg("Cannot "+r),Cc=(l,i,r)=>(L0(l,i,"read from private field"),r?r.call(l):i.get(l)),U0=(l,i,r)=>i.has(l)?xg("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(l):i.set(l,r),bp="popstate";function Sp(l){return typeof l=="object"&&l!=null&&"pathname"in l&&"search"in l&&"hash"in l&&"state"in l&&"key"in l}function H0(l={}){function i(s,u){let f=u.state?.masked,{pathname:d,search:m,hash:y}=f||s.location;return sr("",{pathname:d,search:m,hash:y},u.state&&u.state.usr||null,u.state&&u.state.key||"default",f?{pathname:s.location.pathname,search:s.location.search,hash:s.location.hash}:void 0)}function r(s,u){return typeof u=="string"?u:Da(u)}return B0(i,r,null,l)}function De(l,i){if(l===!1||l===null||typeof l>"u")throw new Error(i)}function ft(l,i){if(!l){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function k0(){return Math.random().toString(36).substring(2,10)}function Ep(l,i){return{usr:l.state,key:l.key,idx:i,masked:l.unstable_mask?{pathname:l.pathname,search:l.search,hash:l.hash}:void 0}}function sr(l,i,r=null,s,u){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof i=="string"?ln(i):i,state:r,key:i&&i.key||s||k0(),unstable_mask:u}}function Da({pathname:l="/",search:i="",hash:r=""}){return i&&i!=="?"&&(l+=i.charAt(0)==="?"?i:"?"+i),r&&r!=="#"&&(l+=r.charAt(0)==="#"?r:"#"+r),l}function ln(l){let i={};if(l){let r=l.indexOf("#");r>=0&&(i.hash=l.substring(r),l=l.substring(0,r));let s=l.indexOf("?");s>=0&&(i.search=l.substring(s),l=l.substring(0,s)),l&&(i.pathname=l)}return i}function B0(l,i,r,s={}){let{window:u=document.defaultView,v5Compat:f=!1}=s,d=u.history,m="POP",y=null,p=b();p==null&&(p=0,d.replaceState({...d.state,idx:p},""));function b(){return(d.state||{idx:null}).idx}function v(){m="POP";let D=b(),K=D==null?null:D-p;p=D,y&&y({action:m,location:U.location,delta:K})}function E(D,K){m="PUSH";let B=Sp(D)?D:sr(U.location,D,K);p=b()+1;let $=Ep(B,p),te=U.createHref(B.unstable_mask||B);try{d.pushState($,"",te)}catch(ie){if(ie instanceof DOMException&&ie.name==="DataCloneError")throw ie;u.location.assign(te)}f&&y&&y({action:m,location:U.location,delta:1})}function _(D,K){m="REPLACE";let B=Sp(D)?D:sr(U.location,D,K);p=b();let $=Ep(B,p),te=U.createHref(B.unstable_mask||B);d.replaceState($,"",te),f&&y&&y({action:m,location:U.location,delta:0})}function C(D){return bg(D)}let U={get action(){return m},get location(){return l(u,d)},listen(D){if(y)throw new Error("A history only accepts one active listener");return u.addEventListener(bp,v),y=D,()=>{u.removeEventListener(bp,v),y=null}},createHref(D){return i(u,D)},createURL:C,encodeLocation(D){let K=C(D);return{pathname:K.pathname,search:K.search,hash:K.hash}},push:E,replace:_,go(D){return d.go(D)}};return U}function bg(l,i=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),De(r,"No window.location.(origin|href) available to create URL");let s=typeof l=="string"?l:Da(l);return s=s.replace(/ $/,"%20"),!i&&s.startsWith("//")&&(s=r+s),new URL(s,r)}var tr,_p=class{constructor(l){if(U0(this,tr,new Map),l)for(let[i,r]of l)this.set(i,r)}get(l){if(Cc(this,tr).has(l))return Cc(this,tr).get(l);if(l.defaultValue!==void 0)return l.defaultValue;throw new Error("No value found for context")}set(l,i){Cc(this,tr).set(l,i)}};tr=new WeakMap;var q0=new Set(["lazy","caseSensitive","path","id","index","children"]);function Y0(l){return q0.has(l)}var V0=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function G0(l){return V0.has(l)}function K0(l){return l.index===!0}function or(l,i,r=[],s={},u=!1){return l.map((f,d)=>{let m=[...r,String(d)],y=typeof f.id=="string"?f.id:m.join("-");if(De(f.index!==!0||!f.children,"Cannot specify children on an index route"),De(u||!s[y],`Found a route id collision on id "${y}". Route id's must be globally unique within Data Router usages`),K0(f)){let p={...f,id:y};return s[y]=Np(p,i(p)),p}else{let p={...f,id:y,children:void 0};return s[y]=Np(p,i(p)),f.children&&(p.children=or(f.children,i,m,s,u)),p}})}function Np(l,i){return Object.assign(l,{...i,...typeof i.lazy=="object"&&i.lazy!=null?{lazy:{...l.lazy,...i.lazy}}:{}})}function An(l,i,r="/"){return ar(l,i,r,!1)}function ar(l,i,r,s){let u=typeof i=="string"?ln(i):i,f=ha(u.pathname||"/",r);if(f==null)return null;let d=Sg(l);Q0(d);let m=null;for(let y=0;m==null&&y<d.length;++y){let p=nb(f);m=tb(d[y],p,s)}return m}function X0(l,i){let{route:r,pathname:s,params:u}=l;return{id:r.id,pathname:s,params:u,data:i[r.id],loaderData:i[r.id],handle:r.handle}}function Sg(l,i=[],r=[],s="",u=!1){let f=(d,m,y=u,p)=>{let b={relativePath:p===void 0?d.path||"":p,caseSensitive:d.caseSensitive===!0,childrenIndex:m,route:d};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(s)&&y)return;De(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 v=Ea([s,b.relativePath]),E=r.concat(b);d.children&&d.children.length>0&&(De(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),Sg(d.children,i,E,v,y)),!(d.path==null&&!d.index)&&i.push({path:v,score:I0(v,d.index),routesMeta:E})};return l.forEach((d,m)=>{if(d.path===""||!d.path?.includes("?"))f(d,m);else for(let y of Eg(d.path))f(d,m,!0,y)}),i}function Eg(l){let i=l.split("/");if(i.length===0)return[];let[r,...s]=i,u=r.endsWith("?"),f=r.replace(/\?$/,"");if(s.length===0)return u?[f,""]:[f];let d=Eg(s.join("/")),m=[];return m.push(...d.map(y=>y===""?f:[f,y].join("/"))),u&&m.push(...d),m.map(y=>l.startsWith("/")&&y===""?"/":y)}function Q0(l){l.sort((i,r)=>i.score!==r.score?r.score-i.score:eb(i.routesMeta.map(s=>s.childrenIndex),r.routesMeta.map(s=>s.childrenIndex)))}var Z0=/^:[\w-]+$/,$0=3,J0=2,F0=1,W0=10,P0=-2,jp=l=>l==="*";function I0(l,i){let r=l.split("/"),s=r.length;return r.some(jp)&&(s+=P0),i&&(s+=J0),r.filter(u=>!jp(u)).reduce((u,f)=>u+(Z0.test(f)?$0:f===""?F0:W0),s)}function eb(l,i){return l.length===i.length&&l.slice(0,-1).every((s,u)=>s===i[u])?l[l.length-1]-i[i.length-1]:0}function tb(l,i,r=!1){let{routesMeta:s}=l,u={},f="/",d=[];for(let m=0;m<s.length;++m){let y=s[m],p=m===s.length-1,b=f==="/"?i:i.slice(f.length)||"/",v=$s({path:y.relativePath,caseSensitive:y.caseSensitive,end:p},b),E=y.route;if(!v&&p&&r&&!s[s.length-1].route.index&&(v=$s({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},b)),!v)return null;Object.assign(u,v.params),d.push({params:u,pathname:Ea([f,v.pathname]),pathnameBase:rb(Ea([f,v.pathnameBase])),route:E}),v.pathnameBase!=="/"&&(f=Ea([f,v.pathnameBase]))}return d}function $s(l,i){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[r,s]=ab(l.path,l.caseSensitive,l.end),u=i.match(r);if(!u)return null;let f=u[0],d=f.replace(/(.)\/+$/,"$1"),m=u.slice(1);return{params:s.reduce((p,{paramName:b,isOptional:v},E)=>{if(b==="*"){let C=m[E]||"";d=f.slice(0,f.length-C.length).replace(/(.)\/+$/,"$1")}const _=m[E];return v&&!_?p[b]=void 0:p[b]=(_||"").replace(/%2F/g,"/"),p},{}),pathname:f,pathnameBase:d,pattern:l}}function ab(l,i=!1,r=!0){ft(l==="*"||!l.endsWith("*")||l.endsWith("/*"),`Route path "${l}" will be treated as if it were "${l.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${l.replace(/\*$/,"/*")}".`);let s=[],u="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,m,y,p,b)=>{if(s.push({paramName:m,isOptional:y!=null}),y){let v=b.charAt(p+d.length);return v&&v!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return l.endsWith("*")?(s.push({paramName:"*"}),u+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?u+="\\/*$":l!==""&&l!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,i?void 0:"i"),s]}function nb(l){try{return l.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return ft(!1,`The URL path "${l}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${i}).`),l}}function ha(l,i){if(i==="/")return l;if(!l.toLowerCase().startsWith(i.toLowerCase()))return null;let r=i.endsWith("/")?i.length-1:i.length,s=l.charAt(r);return s&&s!=="/"?null:l.slice(r)||"/"}function lb({basename:l,pathname:i}){return i==="/"?l:Ea([l,i])}var _g=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Xc=l=>_g.test(l);function ib(l,i="/"){let{pathname:r,search:s="",hash:u=""}=typeof l=="string"?ln(l):l,f;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?f=wp(r.substring(1),"/"):f=wp(r,i)):f=i,{pathname:f,search:sb(s),hash:ob(u)}}function wp(l,i){let r=i.replace(/\/+$/,"").split("/");return l.split("/").forEach(u=>{u===".."?r.length>1&&r.pop():u!=="."&&r.push(u)}),r.length>1?r.join("/"):"/"}function Oc(l,i,r,s){return`Cannot include a '${l}' 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 Ng(l){return l.filter((i,r)=>r===0||i.route.path&&i.route.path.length>0)}function Ws(l){let i=Ng(l);return i.map((r,s)=>s===i.length-1?r.pathname:r.pathnameBase)}function dr(l,i,r,s=!1){let u;typeof l=="string"?u=ln(l):(u={...l},De(!u.pathname||!u.pathname.includes("?"),Oc("?","pathname","search",u)),De(!u.pathname||!u.pathname.includes("#"),Oc("#","pathname","hash",u)),De(!u.search||!u.search.includes("#"),Oc("#","search","hash",u)));let f=l===""||u.pathname==="",d=f?"/":u.pathname,m;if(d==null)m=r;else{let v=i.length-1;if(!s&&d.startsWith("..")){let E=d.split("/");for(;E[0]==="..";)E.shift(),v-=1;u.pathname=E.join("/")}m=v>=0?i[v]:"/"}let y=ib(u,m),p=d&&d!=="/"&&d.endsWith("/"),b=(f||d===".")&&r.endsWith("/");return!y.pathname.endsWith("/")&&(p||b)&&(y.pathname+="/"),y}var Ea=l=>l.join("/").replace(/\/\/+/g,"/"),rb=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),sb=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,ob=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l,hr=class{constructor(l,i,r,s=!1){this.status=l,this.statusText=i||"",this.internal=s,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function ur(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}function mr(l){return l.map(i=>i.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var jg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function wg(l,i){let r=l;if(typeof r!="string"||!_g.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let s=r,u=!1;if(jg)try{let f=new URL(window.location.href),d=r.startsWith("//")?new URL(f.protocol+r):new URL(r),m=ha(d.pathname,i);d.origin===f.origin&&m!=null?r=m+d.search+d.hash:u=!0}catch{ft(!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:u,to:r}}var Un=Symbol("Uninstrumented");function ub(l,i){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};l.forEach(u=>u({id:i.id,index:i.index,path:i.path,instrument(f){let d=Object.keys(r);for(let m of d)f[m]&&r[m].push(f[m])}}));let s={};if(typeof i.lazy=="function"&&r.lazy.length>0){let u=Wl(r.lazy,i.lazy,()=>{});u&&(s.lazy=u)}if(typeof i.lazy=="object"){let u=i.lazy;["middleware","loader","action"].forEach(f=>{let d=u[f],m=r[`lazy.${f}`];if(typeof d=="function"&&m.length>0){let y=Wl(m,d,()=>{});y&&(s.lazy=Object.assign(s.lazy||{},{[f]:y}))}})}return["loader","action"].forEach(u=>{let f=i[u];if(typeof f=="function"&&r[u].length>0){let d=f[Un]??f,m=Wl(r[u],d,(...y)=>Rp(y[0]));m&&(u==="loader"&&d.hydrate===!0&&(m.hydrate=!0),m[Un]=d,s[u]=m)}}),i.middleware&&i.middleware.length>0&&r.middleware.length>0&&(s.middleware=i.middleware.map(u=>{let f=u[Un]??u,d=Wl(r.middleware,f,(...m)=>Rp(m[0]));return d?(d[Un]=f,d):u})),s}function cb(l,i){let r={navigate:[],fetch:[]};if(i.forEach(s=>s({instrument(u){let f=Object.keys(u);for(let d of f)u[d]&&r[d].push(u[d])}})),r.navigate.length>0){let s=l.navigate[Un]??l.navigate,u=Wl(r.navigate,s,(...f)=>{let[d,m]=f;return{to:typeof d=="number"||typeof d=="string"?d:d?Da(d):".",...Cp(l,m??{})}});u&&(u[Un]=s,l.navigate=u)}if(r.fetch.length>0){let s=l.fetch[Un]??l.fetch,u=Wl(r.fetch,s,(...f)=>{let[d,,m,y]=f;return{href:m??".",fetcherKey:d,...Cp(l,y??{})}});u&&(u[Un]=s,l.fetch=u)}return l}function Wl(l,i,r){return l.length===0?null:async(...s)=>{let u=await Rg(l,r(...s),()=>i(...s),l.length-1);if(u.type==="error")throw u.value;return u.value}}async function Rg(l,i,r,s){let u=l[s],f;if(u){let d,m=async()=>(d?console.error("You cannot call instrumented handlers more than once"):d=Rg(l,i,r,s-1),f=await d,De(f,"Expected a result"),f.type==="error"&&f.value instanceof Error?{status:"error",error:f.value}:{status:"success",error:void 0});try{await u(m,i)}catch(y){console.error("An instrumentation function threw an error:",y)}d||await m(),await d}else try{f={type:"success",value:await r()}}catch(d){f={type:"error",value:d}}return f||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Rp(l){let{request:i,context:r,params:s,unstable_pattern:u}=l;return{request:fb(i),params:{...s},unstable_pattern:u,context:db(r)}}function Cp(l,i){return{currentUrl:Da(l.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 fb(l){return{method:l.method,url:l.url,headers:{get:(...i)=>l.headers.get(...i)}}}function db(l){if(mb(l)){let i={...l};return Object.freeze(i),i}else return{get:i=>l.get(i)}}var hb=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function mb(l){if(l===null||typeof l!="object")return!1;const i=Object.getPrototypeOf(l);return i===Object.prototype||i===null||Object.getOwnPropertyNames(i).sort().join("\0")===hb}var Cg=["POST","PUT","PATCH","DELETE"],pb=new Set(Cg),gb=["GET",...Cg],yb=new Set(gb),Og=new Set([301,302,303,307,308]),vb=new Set([307,308]),Tc={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},xb={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Wi={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},bb=l=>({hasErrorBoundary:!!l.hasErrorBoundary}),Tg="remix-router-transitions",zg=Symbol("ResetLoaderData");function Sb(l){const i=l.window?l.window:typeof window<"u"?window:void 0,r=typeof i<"u"&&typeof i.document<"u"&&typeof i.document.createElement<"u";De(l.routes.length>0,"You must provide a non-empty routes array to createRouter");let s=l.hydrationRouteProperties||[],u=l.mapRouteProperties||bb,f=u;if(l.unstable_instrumentations){let w=l.unstable_instrumentations;f=O=>({...u(O),...ub(w.map(k=>k.route).filter(Boolean),O)})}let d={},m=or(l.routes,f,void 0,d),y,p=l.basename||"/";p.startsWith("/")||(p=`/${p}`);let b=l.dataStrategy||wb,v={...l.future},E=null,_=new Set,C=null,U=null,D=null,K=l.hydrationData!=null,B=An(m,l.history.location,p),$=!1,te=null,ie,he;if(B==null&&!l.patchRoutesOnNavigation){let w=da(404,{pathname:l.history.location.pathname}),{matches:O,route:k}=Us(m);ie=!0,he=!ie,B=O,te={[k.id]:w}}else if(B&&!l.hydrationData&&un(B,m,l.history.location.pathname).active&&(B=null),B)if(B.some(w=>w.route.lazy))ie=!1,he=!ie;else if(!B.some(w=>Qc(w.route)))ie=!0,he=!ie;else{let w=l.hydrationData?l.hydrationData.loaderData:null,O=l.hydrationData?l.hydrationData.errors:null,k=B;if(O){let J=B.findIndex(W=>O[W.route.id]!==void 0);k=k.slice(0,J+1)}he=!1,ie=k.every(J=>{let W=Mg(J.route,w,O);return he=he||W.renderFallback,!W.shouldLoad})}else{ie=!1,he=!ie,B=[];let w=un(null,m,l.history.location.pathname);w.active&&w.matches&&($=!0,B=w.matches)}let ae,z={historyAction:l.history.action,location:l.history.location,matches:B,initialized:ie,renderFallback:he,navigation:Tc,restoreScrollPosition:l.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:l.hydrationData&&l.hydrationData.loaderData||{},actionData:l.hydrationData&&l.hydrationData.actionData||null,errors:l.hydrationData&&l.hydrationData.errors||te,fetchers:new Map,blockers:new Map},le="POP",re=null,ye=!1,Z,we=!1,me=new Map,pe=null,M=!1,Q=!1,ne=new Set,P=new Map,Ee=0,j=-1,Y=new Map,F=new Set,ee=new Map,be=new Map,_e=new Set,Te=new Map,rt,se=null;function ze(){if(E=l.history.listen(({action:w,location:O,delta:k})=>{if(rt){rt(),rt=void 0;return}ft(Te.size===0||k!=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 J=kn({currentLocation:z.location,nextLocation:O,historyAction:w});if(J&&k!=null){let W=new Promise(ce=>{rt=ce});l.history.go(k*-1),ka(J,{state:"blocked",location:O,proceed(){ka(J,{state:"proceeding",proceed:void 0,reset:void 0,location:O}),W.then(()=>l.history.go(k))},reset(){let ce=new Map(z.blockers);ce.set(J,Wi),bt({blockers:ce})}}),re?.resolve(),re=null;return}return La(w,O)}),r){Kb(i,me);let w=()=>Xb(i,me);i.addEventListener("pagehide",w),pe=()=>i.removeEventListener("pagehide",w)}return z.initialized||La("POP",z.location,{initialHydration:!0}),ae}function st(){E&&E(),pe&&pe(),_.clear(),Z&&Z.abort(),z.fetchers.forEach((w,O)=>Ha(O)),z.blockers.forEach((w,O)=>Hn(O))}function Na(w){return _.add(w),()=>_.delete(w)}function bt(w,O={}){w.matches&&(w.matches=w.matches.map(W=>{let ce=d[W.route.id],I=W.route;return I.element!==ce.element||I.errorElement!==ce.errorElement||I.hydrateFallbackElement!==ce.hydrateFallbackElement?{...W,route:ce}:W})),z={...z,...w};let k=[],J=[];z.fetchers.forEach((W,ce)=>{W.state==="idle"&&(_e.has(ce)?k.push(ce):J.push(ce))}),_e.forEach(W=>{!z.fetchers.has(W)&&!P.has(W)&&k.push(W)}),[..._].forEach(W=>W(z,{deletedFetchers:k,newErrors:w.errors??null,viewTransitionOpts:O.viewTransitionOpts,flushSync:O.flushSync===!0})),k.forEach(W=>Ha(W)),J.forEach(W=>z.fetchers.delete(W))}function kt(w,O,{flushSync:k}={}){let J=z.actionData!=null&&z.navigation.formMethod!=null&&Dt(z.navigation.formMethod)&&z.navigation.state==="loading"&&w.state?._isRedirect!==!0,W;O.actionData?Object.keys(O.actionData).length>0?W=O.actionData:W=null:J?W=z.actionData:W=null;let ce=O.loaderData?kp(z.loaderData,O.loaderData,O.matches||[],O.errors):z.loaderData,I=z.blockers;I.size>0&&(I=new Map(I),I.forEach((Se,ge)=>I.set(ge,Wi)));let oe=M?!1:ri(w,O.matches||z.matches),ue=ye===!0||z.navigation.formMethod!=null&&Dt(z.navigation.formMethod)&&w.state?._isRedirect!==!0;y&&(m=y,y=void 0),M||le==="POP"||(le==="PUSH"?l.history.push(w,w.state):le==="REPLACE"&&l.history.replace(w,w.state));let ve;if(le==="POP"){let Se=me.get(z.location.pathname);Se&&Se.has(w.pathname)?ve={currentLocation:z.location,nextLocation:w}:me.has(w.pathname)&&(ve={currentLocation:w,nextLocation:z.location})}else if(we){let Se=me.get(z.location.pathname);Se?Se.add(w.pathname):(Se=new Set([w.pathname]),me.set(z.location.pathname,Se)),ve={currentLocation:z.location,nextLocation:w}}bt({...O,actionData:W,loaderData:ce,historyAction:le,location:w,initialized:!0,renderFallback:!1,navigation:Tc,revalidation:"idle",restoreScrollPosition:oe,preventScrollReset:ue,blockers:I},{viewTransitionOpts:ve,flushSync:k===!0}),le="POP",ye=!1,we=!1,M=!1,Q=!1,re?.resolve(),re=null,se?.resolve(),se=null}async function ol(w,O){if(re?.resolve(),re=null,typeof w=="number"){re||(re=Vp());let Pe=re.promise;return l.history.go(w),Pe}let k=qc(z.location,z.matches,p,w,O?.fromRouteId,O?.relative),{path:J,submission:W,error:ce}=Op(!1,k,O),I;O?.unstable_mask&&(I={pathname:"",search:"",hash:"",...typeof O.unstable_mask=="string"?ln(O.unstable_mask):{...z.location.unstable_mask,...O.unstable_mask}});let oe=z.location,ue=sr(oe,J,O&&O.state,void 0,I);ue={...ue,...l.history.encodeLocation(ue)};let ve=O&&O.replace!=null?O.replace:void 0,Se="PUSH";ve===!0?Se="REPLACE":ve===!1||W!=null&&Dt(W.formMethod)&&W.formAction===z.location.pathname+z.location.search&&(Se="REPLACE");let ge=O&&"preventScrollReset"in O?O.preventScrollReset===!0:void 0,Ve=(O&&O.flushSync)===!0,Ae=kn({currentLocation:oe,nextLocation:ue,historyAction:Se});if(Ae){ka(Ae,{state:"blocked",location:ue,proceed(){ka(Ae,{state:"proceeding",proceed:void 0,reset:void 0,location:ue}),ol(w,O)},reset(){let Pe=new Map(z.blockers);Pe.set(Ae,Wi),bt({blockers:Pe})}});return}await La(Se,ue,{submission:W,pendingError:ce,preventScrollReset:ge,replace:O&&O.replace,enableViewTransition:O&&O.viewTransition,flushSync:Ve,callSiteDefaultShouldRevalidate:O&&O.unstable_defaultShouldRevalidate})}function ai(){se||(se=Vp()),sn(),bt({revalidation:"loading"});let w=se.promise;return z.navigation.state==="submitting"?w:z.navigation.state==="idle"?(La(z.historyAction,z.location,{startUninterruptedRevalidation:!0}),w):(La(le||z.historyAction,z.navigation.location,{overrideNavigation:z.navigation,enableViewTransition:we===!0}),w)}async function La(w,O,k){Z&&Z.abort(),Z=null,le=w,M=(k&&k.startUninterruptedRevalidation)===!0,uo(z.location,z.matches),ye=(k&&k.preventScrollReset)===!0,we=(k&&k.enableViewTransition)===!0;let J=y||m,W=k&&k.overrideNavigation,ce=k?.initialHydration&&z.matches&&z.matches.length>0&&!$?z.matches:An(J,O,p),I=(k&&k.flushSync)===!0;if(ce&&z.initialized&&!Q&&Ab(z.location,O)&&!(k&&k.submission&&Dt(k.submission.formMethod))){kt(O,{matches:ce},{flushSync:I});return}let oe=un(ce,J,O.pathname);if(oe.active&&oe.matches&&(ce=oe.matches),!ce){let{error:tt,notFoundMatches:ot,route:Ye}=ya(O.pathname);kt(O,{matches:ot,loaderData:{},errors:{[Ye.id]:tt}},{flushSync:I});return}Z=new AbortController;let ue=Jl(l.history,O,Z.signal,k&&k.submission),ve=l.getContext?await l.getContext():new _p,Se;if(k&&k.pendingError)Se=[Ln(ce).route.id,{type:"error",error:k.pendingError}];else if(k&&k.submission&&Dt(k.submission.formMethod)){let tt=await yr(ue,O,k.submission,ce,ve,oe.active,k&&k.initialHydration===!0,{replace:k.replace,flushSync:I});if(tt.shortCircuited)return;if(tt.pendingActionResult){let[ot,Ye]=tt.pendingActionResult;if(ea(Ye)&&ur(Ye.error)&&Ye.error.status===404){Z=null,kt(O,{matches:tt.matches,loaderData:{},errors:{[ot]:Ye.error}});return}}ce=tt.matches||ce,Se=tt.pendingActionResult,W=zc(O,k.submission),I=!1,oe.active=!1,ue=Jl(l.history,ue.url,ue.signal)}let{shortCircuited:ge,matches:Ve,loaderData:Ae,errors:Pe}=await ni(ue,O,ce,ve,oe.active,W,k&&k.submission,k&&k.fetcherSubmission,k&&k.replace,k&&k.initialHydration===!0,I,Se,k&&k.callSiteDefaultShouldRevalidate);ge||(Z=null,kt(O,{matches:Ve||ce,...Bp(Se),loaderData:Ae,errors:Pe}))}async function yr(w,O,k,J,W,ce,I,oe={}){sn();let ue=Vb(O,k);if(bt({navigation:ue},{flushSync:oe.flushSync===!0}),ce){let ge=await ja(J,O.pathname,w.signal);if(ge.type==="aborted")return{shortCircuited:!0};if(ge.type==="error"){if(ge.partialMatches.length===0){let{matches:Ae,route:Pe}=Us(m);return{matches:Ae,pendingActionResult:[Pe.id,{type:"error",error:ge.error}]}}let Ve=Ln(ge.partialMatches).route.id;return{matches:ge.partialMatches,pendingActionResult:[Ve,{type:"error",error:ge.error}]}}else if(ge.matches)J=ge.matches;else{let{notFoundMatches:Ve,error:Ae,route:Pe}=ya(O.pathname);return{matches:Ve,pendingActionResult:[Pe.id,{type:"error",error:Ae}]}}}let ve,Se=Ys(J,O);if(!Se.route.action&&!Se.route.lazy)ve={type:"error",error:da(405,{method:w.method,pathname:O.pathname,routeId:Se.route.id})};else{let ge=Pl(f,d,w,J,Se,I?[]:s,W),Ve=await rn(w,ge,W,null);if(ve=Ve[Se.route.id],!ve){for(let Ae of J)if(Ve[Ae.route.id]){ve=Ve[Ae.route.id];break}}if(w.signal.aborted)return{shortCircuited:!0}}if(ll(ve)){let ge;return oe&&oe.replace!=null?ge=oe.replace:ge=Lp(ve.response.headers.get("Location"),new URL(w.url),p,l.history)===z.location.pathname+z.location.search,await Ua(w,ve,!0,{submission:k,replace:ge}),{shortCircuited:!0}}if(ea(ve)){let ge=Ln(J,Se.route.id);return(oe&&oe.replace)!==!0&&(le="PUSH"),{matches:J,pendingActionResult:[ge.route.id,ve,Se.route.id]}}return{matches:J,pendingActionResult:[Se.route.id,ve]}}async function ni(w,O,k,J,W,ce,I,oe,ue,ve,Se,ge,Ve){let Ae=ce||zc(O,I),Pe=I||oe||Yp(Ae),tt=!M&&!ve;if(W){if(tt){let dt=ul(ge);bt({navigation:Ae,...dt!==void 0?{actionData:dt}:{}},{flushSync:Se})}let Le=await ja(k,O.pathname,w.signal);if(Le.type==="aborted")return{shortCircuited:!0};if(Le.type==="error"){if(Le.partialMatches.length===0){let{matches:zt,route:pt}=Us(m);return{matches:zt,loaderData:{},errors:{[pt.id]:Le.error}}}let dt=Ln(Le.partialMatches).route.id;return{matches:Le.partialMatches,loaderData:{},errors:{[dt]:Le.error}}}else if(Le.matches)k=Le.matches;else{let{error:dt,notFoundMatches:zt,route:pt}=ya(O.pathname);return{matches:zt,loaderData:{},errors:{[pt.id]:dt}}}}let ot=y||m,{dsMatches:Ye,revalidatingFetchers:St}=Tp(w,J,f,d,l.history,z,k,Pe,O,ve?[]:s,ve===!0,Q,ne,_e,ee,F,ot,p,l.patchRoutesOnNavigation!=null,ge,Ve);if(j=++Ee,!l.dataStrategy&&!Ye.some(Le=>Le.shouldLoad)&&!Ye.some(Le=>Le.route.middleware&&Le.route.middleware.length>0)&&St.length===0){let Le=xr();return kt(O,{matches:k,loaderData:{},errors:ge&&ea(ge[1])?{[ge[0]]:ge[1].error}:null,...Bp(ge),...Le?{fetchers:new Map(z.fetchers)}:{}},{flushSync:Se}),{shortCircuited:!0}}if(tt){let Le={};if(!W){Le.navigation=Ae;let dt=ul(ge);dt!==void 0&&(Le.actionData=dt)}St.length>0&&(Le.fetchers=li(St)),bt(Le,{flushSync:Se})}St.forEach(Le=>{_t(Le.key),Le.controller&&P.set(Le.key,Le.controller)});let et=()=>St.forEach(Le=>_t(Le.key));Z&&Z.signal.addEventListener("abort",et);let{loaderResults:cn,fetcherResults:va}=await ii(Ye,St,w,J);if(w.signal.aborted)return{shortCircuited:!0};Z&&Z.signal.removeEventListener("abort",et),St.forEach(Le=>P.delete(Le.key));let Nt=Hs(cn);if(Nt)return await Ua(w,Nt.result,!0,{replace:ue}),{shortCircuited:!0};if(Nt=Hs(va),Nt)return F.add(Nt.key),await Ua(w,Nt.result,!0,{replace:ue}),{shortCircuited:!0};let{loaderData:wa,errors:Bn}=Hp(z,k,cn,ge,St,va);ve&&z.errors&&(Bn={...z.errors,...Bn});let Ra=xr(),qn=br(j),fl=Ra||qn||St.length>0;return{matches:k,loaderData:wa,errors:Bn,...fl?{fetchers:new Map(z.fetchers)}:{}}}function ul(w){if(w&&!ea(w[1]))return{[w[0]]:w[1].data};if(z.actionData)return Object.keys(z.actionData).length===0?null:z.actionData}function li(w){return w.forEach(O=>{let k=z.fetchers.get(O.key),J=Pi(void 0,k?k.data:void 0);z.fetchers.set(O.key,J)}),new Map(z.fetchers)}async function io(w,O,k,J){_t(w);let W=(J&&J.flushSync)===!0,ce=y||m,I=qc(z.location,z.matches,p,k,O,J?.relative),oe=An(ce,I,p),ue=un(oe,ce,I);if(ue.active&&ue.matches&&(oe=ue.matches),!oe){aa(w,O,da(404,{pathname:I}),{flushSync:W});return}let{path:ve,submission:Se,error:ge}=Op(!0,I,J);if(ge){aa(w,O,ge,{flushSync:W});return}let Ve=l.getContext?await l.getContext():new _p,Ae=(J&&J.preventScrollReset)===!0;if(Se&&Dt(Se.formMethod)){await ro(w,O,ve,oe,Ve,ue.active,W,Ae,Se,J&&J.unstable_defaultShouldRevalidate);return}ee.set(w,{routeId:O,path:ve}),await At(w,O,ve,oe,Ve,ue.active,W,Ae,Se)}async function ro(w,O,k,J,W,ce,I,oe,ue,ve){sn(),ee.delete(w);let Se=z.fetchers.get(w);ga(w,Gb(ue,Se),{flushSync:I});let ge=new AbortController,Ve=Jl(l.history,k,ge.signal,ue);if(ce){let at=await ja(J,new URL(Ve.url).pathname,Ve.signal,w);if(at.type==="aborted")return;if(at.type==="error"){aa(w,O,at.error,{flushSync:I});return}else if(at.matches)J=at.matches;else{aa(w,O,da(404,{pathname:k}),{flushSync:I});return}}let Ae=Ys(J,k);if(!Ae.route.action&&!Ae.route.lazy){let at=da(405,{method:ue.formMethod,pathname:k,routeId:O});aa(w,O,at,{flushSync:I});return}P.set(w,ge);let Pe=Ee,tt=Pl(f,d,Ve,J,Ae,s,W),ot=await rn(Ve,tt,W,w),Ye=ot[Ae.route.id];if(!Ye){for(let at of tt)if(ot[at.route.id]){Ye=ot[at.route.id];break}}if(Ve.signal.aborted){P.get(w)===ge&&P.delete(w);return}if(_e.has(w)){if(ll(Ye)||ea(Ye)){ga(w,an(void 0));return}}else{if(ll(Ye))if(P.delete(w),j>Pe){ga(w,an(void 0));return}else return F.add(w),ga(w,Pi(ue)),Ua(Ve,Ye,!1,{fetcherSubmission:ue,preventScrollReset:oe});if(ea(Ye)){aa(w,O,Ye.error);return}}let St=z.navigation.location||z.location,et=Jl(l.history,St,ge.signal),cn=y||m,va=z.navigation.state!=="idle"?An(cn,z.navigation.location,p):z.matches;De(va,"Didn't find any matches after fetcher action");let Nt=++Ee;Y.set(w,Nt);let wa=Pi(ue,Ye.data);z.fetchers.set(w,wa);let{dsMatches:Bn,revalidatingFetchers:Ra}=Tp(et,W,f,d,l.history,z,va,ue,St,s,!1,Q,ne,_e,ee,F,cn,p,l.patchRoutesOnNavigation!=null,[Ae.route.id,Ye],ve);Ra.filter(at=>at.key!==w).forEach(at=>{let dl=at.key,hl=z.fetchers.get(dl),Nr=Pi(void 0,hl?hl.data:void 0);z.fetchers.set(dl,Nr),_t(dl),at.controller&&P.set(dl,at.controller)}),bt({fetchers:new Map(z.fetchers)});let qn=()=>Ra.forEach(at=>_t(at.key));ge.signal.addEventListener("abort",qn);let{loaderResults:fl,fetcherResults:Le}=await ii(Bn,Ra,et,W);if(ge.signal.aborted)return;if(ge.signal.removeEventListener("abort",qn),Y.delete(w),P.delete(w),Ra.forEach(at=>P.delete(at.key)),z.fetchers.has(w)){let at=an(Ye.data);z.fetchers.set(w,at)}let dt=Hs(fl);if(dt)return Ua(et,dt.result,!1,{preventScrollReset:oe});if(dt=Hs(Le),dt)return F.add(dt.key),Ua(et,dt.result,!1,{preventScrollReset:oe});let{loaderData:zt,errors:pt}=Hp(z,va,fl,void 0,Ra,Le);br(Nt),z.navigation.state==="loading"&&Nt>j?(De(le,"Expected pending action"),Z&&Z.abort(),kt(z.navigation.location,{matches:va,loaderData:zt,errors:pt,fetchers:new Map(z.fetchers)})):(bt({errors:pt,loaderData:kp(z.loaderData,zt,va,pt),fetchers:new Map(z.fetchers)}),Q=!1)}async function At(w,O,k,J,W,ce,I,oe,ue){let ve=z.fetchers.get(w);ga(w,Pi(ue,ve?ve.data:void 0),{flushSync:I});let Se=new AbortController,ge=Jl(l.history,k,Se.signal);if(ce){let Ye=await ja(J,new URL(ge.url).pathname,ge.signal,w);if(Ye.type==="aborted")return;if(Ye.type==="error"){aa(w,O,Ye.error,{flushSync:I});return}else if(Ye.matches)J=Ye.matches;else{aa(w,O,da(404,{pathname:k}),{flushSync:I});return}}let Ve=Ys(J,k);P.set(w,Se);let Ae=Ee,Pe=Pl(f,d,ge,J,Ve,s,W),ot=(await rn(ge,Pe,W,w))[Ve.route.id];if(P.get(w)===Se&&P.delete(w),!ge.signal.aborted){if(_e.has(w)){ga(w,an(void 0));return}if(ll(ot))if(j>Ae){ga(w,an(void 0));return}else{F.add(w),await Ua(ge,ot,!1,{preventScrollReset:oe});return}if(ea(ot)){aa(w,O,ot.error);return}ga(w,an(ot.data))}}async function Ua(w,O,k,{submission:J,fetcherSubmission:W,preventScrollReset:ce,replace:I}={}){k||(re?.resolve(),re=null),O.response.headers.has("X-Remix-Revalidate")&&(Q=!0);let oe=O.response.headers.get("Location");De(oe,"Expected a Location header on the redirect Response"),oe=Lp(oe,new URL(w.url),p,l.history);let ue=sr(z.location,oe,{_isRedirect:!0});if(r){let Pe=!1;if(O.response.headers.has("X-Remix-Reload-Document"))Pe=!0;else if(Xc(oe)){const tt=bg(oe,!0);Pe=tt.origin!==i.location.origin||ha(tt.pathname,p)==null}if(Pe){I?i.location.replace(oe):i.location.assign(oe);return}}Z=null;let ve=I===!0||O.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Se,formAction:ge,formEncType:Ve}=z.navigation;!J&&!W&&Se&&ge&&Ve&&(J=Yp(z.navigation));let Ae=J||W;if(vb.has(O.response.status)&&Ae&&Dt(Ae.formMethod))await La(ve,ue,{submission:{...Ae,formAction:oe},preventScrollReset:ce||ye,enableViewTransition:k?we:void 0});else{let Pe=zc(ue,J);await La(ve,ue,{overrideNavigation:Pe,fetcherSubmission:W,preventScrollReset:ce||ye,enableViewTransition:k?we:void 0})}}async function rn(w,O,k,J){let W,ce={};try{W=await Cb(b,w,O,J,k,!1)}catch(I){return O.filter(oe=>oe.shouldLoad).forEach(oe=>{ce[oe.route.id]={type:"error",error:I}}),ce}if(w.signal.aborted)return ce;if(!Dt(w.method))for(let I of O){if(W[I.route.id]?.type==="error")break;!W.hasOwnProperty(I.route.id)&&!z.loaderData.hasOwnProperty(I.route.id)&&(!z.errors||!z.errors.hasOwnProperty(I.route.id))&&I.shouldCallHandler()&&(W[I.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${I.route.id}`)})}for(let[I,oe]of Object.entries(W))if(kb(oe)){let ue=oe.result;ce[I]={type:"redirect",response:Mb(ue,w,I,O,p)}}else ce[I]=await zb(oe);return ce}async function ii(w,O,k,J){let W=rn(k,w,J,null),ce=Promise.all(O.map(async ue=>{if(ue.matches&&ue.match&&ue.request&&ue.controller){let Se=(await rn(ue.request,ue.matches,J,ue.key))[ue.match.route.id];return{[ue.key]:Se}}else return Promise.resolve({[ue.key]:{type:"error",error:da(404,{pathname:ue.path})}})})),I=await W,oe=(await ce).reduce((ue,ve)=>Object.assign(ue,ve),{});return{loaderResults:I,fetcherResults:oe}}function sn(){Q=!0,ee.forEach((w,O)=>{P.has(O)&&ne.add(O),_t(O)})}function ga(w,O,k={}){z.fetchers.set(w,O),bt({fetchers:new Map(z.fetchers)},{flushSync:(k&&k.flushSync)===!0})}function aa(w,O,k,J={}){let W=Ln(z.matches,O);Ha(w),bt({errors:{[W.route.id]:k},fetchers:new Map(z.fetchers)},{flushSync:(J&&J.flushSync)===!0})}function vr(w){return be.set(w,(be.get(w)||0)+1),_e.has(w)&&_e.delete(w),z.fetchers.get(w)||xb}function so(w,O){_t(w,O?.reason),ga(w,an(null))}function Ha(w){let O=z.fetchers.get(w);P.has(w)&&!(O&&O.state==="loading"&&Y.has(w))&&_t(w),ee.delete(w),Y.delete(w),F.delete(w),_e.delete(w),ne.delete(w),z.fetchers.delete(w)}function Lt(w){let O=(be.get(w)||0)-1;O<=0?(be.delete(w),_e.add(w)):be.set(w,O),bt({fetchers:new Map(z.fetchers)})}function _t(w,O){let k=P.get(w);k&&(k.abort(O),P.delete(w))}function Tt(w){for(let O of w){let k=vr(O),J=an(k.data);z.fetchers.set(O,J)}}function xr(){let w=[],O=!1;for(let k of F){let J=z.fetchers.get(k);De(J,`Expected fetcher: ${k}`),J.state==="loading"&&(F.delete(k),w.push(k),O=!0)}return Tt(w),O}function br(w){let O=[];for(let[k,J]of Y)if(J<w){let W=z.fetchers.get(k);De(W,`Expected fetcher: ${k}`),W.state==="loading"&&(_t(k),Y.delete(k),O.push(k))}return Tt(O),O.length>0}function oo(w,O){let k=z.blockers.get(w)||Wi;return Te.get(w)!==O&&Te.set(w,O),k}function Hn(w){z.blockers.delete(w),Te.delete(w)}function ka(w,O){let k=z.blockers.get(w)||Wi;De(k.state==="unblocked"&&O.state==="blocked"||k.state==="blocked"&&O.state==="blocked"||k.state==="blocked"&&O.state==="proceeding"||k.state==="blocked"&&O.state==="unblocked"||k.state==="proceeding"&&O.state==="unblocked",`Invalid blocker state transition: ${k.state} -> ${O.state}`);let J=new Map(z.blockers);J.set(w,O),bt({blockers:J})}function kn({currentLocation:w,nextLocation:O,historyAction:k}){if(Te.size===0)return;Te.size>1&&ft(!1,"A router only supports one blocker at a time");let J=Array.from(Te.entries()),[W,ce]=J[J.length-1],I=z.blockers.get(W);if(!(I&&I.state==="proceeding")&&ce({currentLocation:w,nextLocation:O,historyAction:k}))return W}function ya(w){let O=da(404,{pathname:w}),k=y||m,{matches:J,route:W}=Us(k);return{notFoundMatches:J,route:W,error:O}}function cl(w,O,k){if(C=w,D=O,U=k||null,!K&&z.navigation===Tc){K=!0;let J=ri(z.location,z.matches);J!=null&&bt({restoreScrollPosition:J})}return()=>{C=null,D=null,U=null}}function on(w,O){return U&&U(w,O.map(J=>X0(J,z.loaderData)))||w.key}function uo(w,O){if(C&&D){let k=on(w,O);C[k]=D()}}function ri(w,O){if(C){let k=on(w,O),J=C[k];if(typeof J=="number")return J}return null}function un(w,O,k){if(l.patchRoutesOnNavigation)if(w){if(Object.keys(w[0].params).length>0)return{active:!0,matches:ar(O,k,p,!0)}}else return{active:!0,matches:ar(O,k,p,!0)||[]};return{active:!1,matches:null}}async function ja(w,O,k,J){if(!l.patchRoutesOnNavigation)return{type:"success",matches:w};let W=w;for(;;){let ce=y==null,I=y||m,oe=d;try{await l.patchRoutesOnNavigation({signal:k,path:O,matches:W,fetcherKey:J,patch:(Se,ge)=>{k.aborted||zp(Se,ge,I,oe,f,!1)}})}catch(Se){return{type:"error",error:Se,partialMatches:W}}finally{ce&&!k.aborted&&(m=[...m])}if(k.aborted)return{type:"aborted"};let ue=An(I,O,p),ve=null;if(ue){if(Object.keys(ue[0].params).length===0)return{type:"success",matches:ue};if(ve=ar(I,O,p,!0),!(ve&&W.length<ve.length&&Sr(W,ve.slice(0,W.length))))return{type:"success",matches:ue}}if(ve||(ve=ar(I,O,p,!0)),!ve||Sr(W,ve))return{type:"success",matches:null};W=ve}}function Sr(w,O){return w.length===O.length&&w.every((k,J)=>k.route.id===O[J].route.id)}function Er(w){d={},y=or(w,f,void 0,d)}function _r(w,O,k=!1){let J=y==null;zp(w,O,y||m,d,f,k),J&&(m=[...m],bt({}))}return ae={get basename(){return p},get future(){return v},get state(){return z},get routes(){return m},get window(){return i},initialize:ze,subscribe:Na,enableScrollRestoration:cl,navigate:ol,fetch:io,revalidate:ai,createHref:w=>l.history.createHref(w),encodeLocation:w=>l.history.encodeLocation(w),getFetcher:vr,resetFetcher:so,deleteFetcher:Lt,dispose:st,getBlocker:oo,deleteBlocker:Hn,patchRoutes:_r,_internalFetchControllers:P,_internalSetRoutes:Er,_internalSetStateDoNotUseOrYouWillBreakYourApp(w){bt(w)}},l.unstable_instrumentations&&(ae=cb(ae,l.unstable_instrumentations.map(w=>w.router).filter(Boolean))),ae}function Eb(l){return l!=null&&("formData"in l&&l.formData!=null||"body"in l&&l.body!==void 0)}function qc(l,i,r,s,u,f){let d,m;if(u){d=[];for(let p of i)if(d.push(p),p.route.id===u){m=p;break}}else d=i,m=i[i.length-1];let y=dr(s||".",Ws(d),ha(l.pathname,r)||l.pathname,f==="path");if(s==null&&(y.search=l.search,y.hash=l.hash),(s==null||s===""||s===".")&&m){let p=$c(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),v=b.getAll("index");b.delete("index"),v.filter(_=>_).forEach(_=>b.append("index",_));let E=b.toString();y.search=E?`?${E}`:""}}return r!=="/"&&(y.pathname=lb({basename:r,pathname:y.pathname})),Da(y)}function Op(l,i,r){if(!r||!Eb(r))return{path:i};if(r.formMethod&&!Yb(r.formMethod))return{path:i,error:da(405,{method:r.formMethod})};let s=()=>({path:i,error:da(400,{type:"invalid-body"})}),f=(r.formMethod||"get").toUpperCase(),d=kg(i);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Dt(f))return s();let v=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((E,[_,C])=>`${E}${_}=${C}
10
+ `,""):String(r.body);return{path:i,submission:{formMethod:f,formAction:d,formEncType:r.formEncType,formData:void 0,json:void 0,text:v}}}else if(r.formEncType==="application/json"){if(!Dt(f))return s();try{let v=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:i,submission:{formMethod:f,formAction:d,formEncType:r.formEncType,formData:void 0,json:v,text:void 0}}}catch{return s()}}}De(typeof FormData=="function","FormData is not available in this environment");let m,y;if(r.formData)m=Vc(r.formData),y=r.formData;else if(r.body instanceof FormData)m=Vc(r.body),y=r.body;else if(r.body instanceof URLSearchParams)m=r.body,y=Up(m);else if(r.body==null)m=new URLSearchParams,y=new FormData;else try{m=new URLSearchParams(r.body),y=Up(m)}catch{return s()}let p={formMethod:f,formAction:d,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:y,json:void 0,text:void 0};if(Dt(p.formMethod))return{path:i,submission:p};let b=ln(i);return l&&b.search&&$c(b.search)&&m.append("index",""),b.search=`?${m}`,{path:Da(b),submission:p}}function Tp(l,i,r,s,u,f,d,m,y,p,b,v,E,_,C,U,D,K,B,$,te){let ie=$?ea($[1])?$[1].error:$[1].data:void 0,he=u.createURL(f.location),ae=u.createURL(y),z;if(b&&f.errors){let pe=Object.keys(f.errors)[0];z=d.findIndex(M=>M.route.id===pe)}else if($&&ea($[1])){let pe=$[0];z=d.findIndex(M=>M.route.id===pe)-1}let le=$?$[1].statusCode:void 0,re=le&&le>=400,ye={currentUrl:he,currentParams:f.matches[0]?.params||{},nextUrl:ae,nextParams:d[0].params,...m,actionResult:ie,actionStatus:le},Z=mr(d),we=d.map((pe,M)=>{let{route:Q}=pe,ne=null;if(z!=null&&M>z)ne=!1;else if(Q.lazy)ne=!0;else if(!Qc(Q))ne=!1;else if(b){let{shouldLoad:Y}=Mg(Q,f.loaderData,f.errors);ne=Y}else _b(f.loaderData,f.matches[M],pe)&&(ne=!0);if(ne!==null)return Yc(r,s,l,Z,pe,p,i,ne);let P=!1;typeof te=="boolean"?P=te:re?P=!1:(v||he.pathname+he.search===ae.pathname+ae.search||he.search!==ae.search||Nb(f.matches[M],pe))&&(P=!0);let Ee={...ye,defaultShouldRevalidate:P},j=ir(pe,Ee);return Yc(r,s,l,Z,pe,p,i,j,Ee,te)}),me=[];return C.forEach((pe,M)=>{if(b||!d.some(ee=>ee.route.id===pe.routeId)||_.has(M))return;let Q=f.fetchers.get(M),ne=Q&&Q.state!=="idle"&&Q.data===void 0,P=An(D,pe.path,K);if(!P){if(B&&ne)return;me.push({key:M,routeId:pe.routeId,path:pe.path,matches:null,match:null,request:null,controller:null});return}if(U.has(M))return;let Ee=Ys(P,pe.path),j=new AbortController,Y=Jl(u,pe.path,j.signal),F=null;if(E.has(M))E.delete(M),F=Pl(r,s,Y,P,Ee,p,i);else if(ne)v&&(F=Pl(r,s,Y,P,Ee,p,i));else{let ee;typeof te=="boolean"?ee=te:re?ee=!1:ee=v;let be={...ye,defaultShouldRevalidate:ee};ir(Ee,be)&&(F=Pl(r,s,Y,P,Ee,p,i,be))}F&&me.push({key:M,routeId:pe.routeId,path:pe.path,matches:F,match:Ee,request:Y,controller:j})}),{dsMatches:we,revalidatingFetchers:me}}function Qc(l){return l.loader!=null||l.middleware!=null&&l.middleware.length>0}function Mg(l,i,r){if(l.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Qc(l))return{shouldLoad:!1,renderFallback:!1};let s=i!=null&&l.id in i,u=r!=null&&r[l.id]!==void 0;if(!s&&u)return{shouldLoad:!1,renderFallback:!1};if(typeof l.loader=="function"&&l.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!s};let f=!s&&!u;return{shouldLoad:f,renderFallback:f}}function _b(l,i,r){let s=!i||r.route.id!==i.route.id,u=!l.hasOwnProperty(r.route.id);return s||u}function Nb(l,i){let r=l.route.path;return l.pathname!==i.pathname||r!=null&&r.endsWith("*")&&l.params["*"]!==i.params["*"]}function ir(l,i){if(l.route.shouldRevalidate){let r=l.route.shouldRevalidate(i);if(typeof r=="boolean")return r}return i.defaultShouldRevalidate}function zp(l,i,r,s,u,f){let d;if(l){let p=s[l];De(p,`No route found to patch children into: routeId = ${l}`),p.children||(p.children=[]),d=p.children}else d=r;let m=[],y=[];if(i.forEach(p=>{let b=d.find(v=>Dg(p,v));b?y.push({existingRoute:b,newRoute:p}):m.push(p)}),m.length>0){let p=or(m,u,[l||"_","patch",String(d?.length||"0")],s);d.push(...p)}if(f&&y.length>0)for(let p=0;p<y.length;p++){let{existingRoute:b,newRoute:v}=y[p],E=b,[_]=or([v],u,[],{},!0);Object.assign(E,{element:_.element?_.element:E.element,errorElement:_.errorElement?_.errorElement:E.errorElement,hydrateFallbackElement:_.hydrateFallbackElement?_.hydrateFallbackElement:E.hydrateFallbackElement})}}function Dg(l,i){return"id"in l&&"id"in i&&l.id===i.id?!0:l.index===i.index&&l.path===i.path&&l.caseSensitive===i.caseSensitive?(!l.children||l.children.length===0)&&(!i.children||i.children.length===0)?!0:l.children?.every((r,s)=>i.children?.some(u=>Dg(r,u)))??!1:!1}var Mp=new WeakMap,Ag=({key:l,route:i,manifest:r,mapRouteProperties:s})=>{let u=r[i.id];if(De(u,"No route found in manifest"),!u.lazy||typeof u.lazy!="object")return;let f=u.lazy[l];if(!f)return;let d=Mp.get(u);d||(d={},Mp.set(u,d));let m=d[l];if(m)return m;let y=(async()=>{let p=Y0(l),v=u[l]!==void 0&&l!=="hasErrorBoundary";if(p)ft(!p,"Route property "+l+" is not a supported lazy route property. This property will be ignored."),d[l]=Promise.resolve();else if(v)ft(!1,`Route "${u.id}" has a static property "${l}" defined. The lazy property will be ignored.`);else{let E=await f();E!=null&&(Object.assign(u,{[l]:E}),Object.assign(u,s(u)))}typeof u.lazy=="object"&&(u.lazy[l]=void 0,Object.values(u.lazy).every(E=>E===void 0)&&(u.lazy=void 0))})();return d[l]=y,y},Dp=new WeakMap;function jb(l,i,r,s,u){let f=r[l.id];if(De(f,"No route found in manifest"),!l.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof l.lazy=="function"){let b=Dp.get(f);if(b)return{lazyRoutePromise:b,lazyHandlerPromise:b};let v=(async()=>{De(typeof l.lazy=="function","No lazy route function found");let E=await l.lazy(),_={};for(let C in E){let U=E[C];if(U===void 0)continue;let D=G0(C),B=f[C]!==void 0&&C!=="hasErrorBoundary";D?ft(!D,"Route property "+C+" is not a supported property to be returned from a lazy route function. This property will be ignored."):B?ft(!B,`Route "${f.id}" has a static property "${C}" defined but its lazy function is also returning a value for this property. The lazy route property "${C}" will be ignored.`):_[C]=U}Object.assign(f,_),Object.assign(f,{...s(f),lazy:void 0})})();return Dp.set(f,v),v.catch(()=>{}),{lazyRoutePromise:v,lazyHandlerPromise:v}}let d=Object.keys(l.lazy),m=[],y;for(let b of d){if(u&&u.includes(b))continue;let v=Ag({key:b,route:l,manifest:r,mapRouteProperties:s});v&&(m.push(v),b===i&&(y=v))}let p=m.length>0?Promise.all(m).then(()=>{}):void 0;return p?.catch(()=>{}),y?.catch(()=>{}),{lazyRoutePromise:p,lazyHandlerPromise:y}}async function Ap(l){let i=l.matches.filter(u=>u.shouldLoad),r={};return(await Promise.all(i.map(u=>u.resolve()))).forEach((u,f)=>{r[i[f].route.id]=u}),r}async function wb(l){return l.matches.some(i=>i.route.middleware)?Lg(l,()=>Ap(l)):Ap(l)}function Lg(l,i){return Rb(l,i,s=>{if(qb(s))throw s;return s},Ub,r);function r(s,u,f){if(f)return Promise.resolve(Object.assign(f.value,{[u]:{type:"error",result:s}}));{let{matches:d}=l,m=Math.min(Math.max(d.findIndex(p=>p.route.id===u),0),Math.max(d.findIndex(p=>p.shouldCallHandler()),0)),y=Ln(d,d[m].route.id).route.id;return Promise.resolve({[y]:{type:"error",result:s}})}}}async function Rb(l,i,r,s,u){let{matches:f,request:d,params:m,context:y,unstable_pattern:p}=l,b=f.flatMap(E=>E.route.middleware?E.route.middleware.map(_=>[E.route.id,_]):[]);return await Ug({request:d,params:m,context:y,unstable_pattern:p},b,i,r,s,u)}async function Ug(l,i,r,s,u,f,d=0){let{request:m}=l;if(m.signal.aborted)throw m.signal.reason??new Error(`Request aborted: ${m.method} ${m.url}`);let y=i[d];if(!y)return await r();let[p,b]=y,v,E=async()=>{if(v)throw new Error("You may only call `next()` once per middleware");try{return v={value:await Ug(l,i,r,s,u,f,d+1)},v.value}catch(_){return v={value:await f(_,p,v)},v.value}};try{let _=await b(l,E),C=_!=null?s(_):void 0;return u(C)?C:v?C??v.value:(v={value:await E()},v.value)}catch(_){return await f(_,p,v)}}function Hg(l,i,r,s,u){let f=Ag({key:"middleware",route:s.route,manifest:i,mapRouteProperties:l}),d=jb(s.route,Dt(r.method)?"action":"loader",i,l,u);return{middleware:f,route:d.lazyRoutePromise,handler:d.lazyHandlerPromise}}function Yc(l,i,r,s,u,f,d,m,y=null,p){let b=!1,v=Hg(l,i,r,u,f);return{...u,_lazyPromises:v,shouldLoad:m,shouldRevalidateArgs:y,shouldCallHandler(E){return b=!0,y?typeof p=="boolean"?ir(u,{...y,defaultShouldRevalidate:p}):typeof E=="boolean"?ir(u,{...y,defaultShouldRevalidate:E}):ir(u,y):m},resolve(E){let{lazy:_,loader:C,middleware:U}=u.route,D=b||m||E&&!Dt(r.method)&&(_||C),K=U&&U.length>0&&!C&&!_;return D&&(Dt(r.method)||!K)?Ob({request:r,unstable_pattern:s,match:u,lazyHandlerPromise:v?.handler,lazyRoutePromise:v?.route,handlerOverride:E,scopedContext:d}):Promise.resolve({type:"data",result:void 0})}}}function Pl(l,i,r,s,u,f,d,m=null){return s.map(y=>y.route.id!==u.route.id?{...y,shouldLoad:!1,shouldRevalidateArgs:m,shouldCallHandler:()=>!1,_lazyPromises:Hg(l,i,r,y,f),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Yc(l,i,r,mr(s),y,f,d,!0,m))}async function Cb(l,i,r,s,u,f){r.some(p=>p._lazyPromises?.middleware)&&await Promise.all(r.map(p=>p._lazyPromises?.middleware));let d={request:i,unstable_pattern:mr(r),params:r[0].params,context:u,matches:r},y=await l({...d,fetcherKey:s,runClientMiddleware:p=>{let b=d;return Lg(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 Ob({request:l,unstable_pattern:i,match:r,lazyHandlerPromise:s,lazyRoutePromise:u,handlerOverride:f,scopedContext:d}){let m,y,p=Dt(l.method),b=p?"action":"loader",v=E=>{let _,C=new Promise((K,B)=>_=B);y=()=>_(),l.signal.addEventListener("abort",y);let U=K=>typeof E!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${b}" [routeId: ${r.route.id}]`)):E({request:l,unstable_pattern:i,params:r.params,context:d},...K!==void 0?[K]:[]),D=(async()=>{try{return{type:"data",result:await(f?f(B=>U(B)):U())}}catch(K){return{type:"error",result:K}}})();return Promise.race([D,C])};try{let E=p?r.route.action:r.route.loader;if(s||u)if(E){let _,[C]=await Promise.all([v(E).catch(U=>{_=U}),s,u]);if(_!==void 0)throw _;m=C}else{await s;let _=p?r.route.action:r.route.loader;if(_)[m]=await Promise.all([v(_),u]);else if(b==="action"){let C=new URL(l.url),U=C.pathname+C.search;throw da(405,{method:l.method,pathname:U,routeId:r.route.id})}else return{type:"data",result:void 0}}else if(E)m=await v(E);else{let _=new URL(l.url),C=_.pathname+_.search;throw da(404,{pathname:C})}}catch(E){return{type:"error",result:E}}finally{y&&l.signal.removeEventListener("abort",y)}return m}async function Tb(l){let i=l.headers.get("Content-Type");return i&&/\bapplication\/json\b/.test(i)?l.body==null?null:l.json():l.text()}async function zb(l){let{result:i,type:r}=l;if(Zc(i)){let s;try{s=await Tb(i)}catch(u){return{type:"error",error:u}}return r==="error"?{type:"error",error:new hr(i.status,i.statusText,s),statusCode:i.status,headers:i.headers}:{type:"data",data:s,statusCode:i.status,headers:i.headers}}return r==="error"?qp(i)?i.data instanceof Error?{type:"error",error:i.data,statusCode:i.init?.status,headers:i.init?.headers?new Headers(i.init.headers):void 0}:{type:"error",error:Lb(i),statusCode:ur(i)?i.status:void 0,headers:i.init?.headers?new Headers(i.init.headers):void 0}:{type:"error",error:i,statusCode:ur(i)?i.status:void 0}:qp(i)?{type:"data",data:i.data,statusCode:i.init?.status,headers:i.init?.headers?new Headers(i.init.headers):void 0}:{type:"data",data:i}}function Mb(l,i,r,s,u){let f=l.headers.get("Location");if(De(f,"Redirects returned/thrown from loaders/actions must have a Location header"),!Xc(f)){let d=s.slice(0,s.findIndex(m=>m.route.id===r)+1);f=qc(new URL(i.url),d,u,f),l.headers.set("Location",f)}return l}function Lp(l,i,r,s){let u=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(Xc(l)){let f=l,d=f.startsWith("//")?new URL(i.protocol+f):new URL(f);if(u.includes(d.protocol))throw new Error("Invalid redirect location");let m=ha(d.pathname,r)!=null;if(d.origin===i.origin&&m)return d.pathname+d.search+d.hash}try{let f=s.createURL(l);if(u.includes(f.protocol))throw new Error("Invalid redirect location")}catch{}return l}function Jl(l,i,r,s){let u=l.createURL(kg(i)).toString(),f={signal:r};if(s&&Dt(s.formMethod)){let{formMethod:d,formEncType:m}=s;f.method=d.toUpperCase(),m==="application/json"?(f.headers=new Headers({"Content-Type":m}),f.body=JSON.stringify(s.json)):m==="text/plain"?f.body=s.text:m==="application/x-www-form-urlencoded"&&s.formData?f.body=Vc(s.formData):f.body=s.formData}return new Request(u,f)}function Vc(l){let i=new URLSearchParams;for(let[r,s]of l.entries())i.append(r,typeof s=="string"?s:s.name);return i}function Up(l){let i=new FormData;for(let[r,s]of l.entries())i.append(r,s);return i}function Db(l,i,r,s=!1,u=!1){let f={},d=null,m,y=!1,p={},b=r&&ea(r[1])?r[1].error:void 0;return l.forEach(v=>{if(!(v.route.id in i))return;let E=v.route.id,_=i[E];if(De(!ll(_),"Cannot handle redirect results in processLoaderData"),ea(_)){let C=_.error;if(b!==void 0&&(C=b,b=void 0),d=d||{},u)d[E]=C;else{let U=Ln(l,E);d[U.route.id]==null&&(d[U.route.id]=C)}s||(f[E]=zg),y||(y=!0,m=ur(_.error)?_.error.status:500),_.headers&&(p[E]=_.headers)}else f[E]=_.data,_.statusCode&&_.statusCode!==200&&!y&&(m=_.statusCode),_.headers&&(p[E]=_.headers)}),b!==void 0&&r&&(d={[r[0]]:b},r[2]&&(f[r[2]]=void 0)),{loaderData:f,errors:d,statusCode:m||200,loaderHeaders:p}}function Hp(l,i,r,s,u,f){let{loaderData:d,errors:m}=Db(i,r,s);return u.filter(y=>!y.matches||y.matches.some(p=>p.shouldLoad)).forEach(y=>{let{key:p,match:b,controller:v}=y;if(v&&v.signal.aborted)return;let E=f[p];if(De(E,"Did not find corresponding fetcher result"),ea(E)){let _=Ln(l.matches,b?.route.id);m&&m[_.route.id]||(m={...m,[_.route.id]:E.error}),l.fetchers.delete(p)}else if(ll(E))De(!1,"Unhandled fetcher revalidation redirect");else{let _=an(E.data);l.fetchers.set(p,_)}}),{loaderData:d,errors:m}}function kp(l,i,r,s){let u=Object.entries(i).filter(([,f])=>f!==zg).reduce((f,[d,m])=>(f[d]=m,f),{});for(let f of r){let d=f.route.id;if(!i.hasOwnProperty(d)&&l.hasOwnProperty(d)&&f.route.loader&&(u[d]=l[d]),s&&s.hasOwnProperty(d))break}return u}function Bp(l){return l?ea(l[1])?{actionData:{}}:{actionData:{[l[0]]:l[1].data}}:{}}function Ln(l,i){return(i?l.slice(0,l.findIndex(s=>s.route.id===i)+1):[...l]).reverse().find(s=>s.route.hasErrorBoundary===!0)||l[0]}function Us(l){let i=l.length===1?l[0]:l.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:i}],route:i}}function da(l,{pathname:i,routeId:r,method:s,type:u,message:f}={}){let d="Unknown Server Error",m="Unknown @remix-run/router error";return l===400?(d="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.`:u==="invalid-body"&&(m="Unable to encode submission body")):l===403?(d="Forbidden",m=`Route "${r}" does not match URL "${i}"`):l===404?(d="Not Found",m=`No route matches URL "${i}"`):l===405&&(d="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 hr(l||500,d,new Error(m),!0)}function Hs(l){let i=Object.entries(l);for(let r=i.length-1;r>=0;r--){let[s,u]=i[r];if(ll(u))return{key:s,result:u}}}function kg(l){let i=typeof l=="string"?ln(l):l;return Da({...i,hash:""})}function Ab(l,i){return l.pathname!==i.pathname||l.search!==i.search?!1:l.hash===""?i.hash!=="":l.hash===i.hash?!0:i.hash!==""}function Lb(l){return new hr(l.init?.status??500,l.init?.statusText??"Internal Server Error",l.data)}function Ub(l){return l!=null&&typeof l=="object"&&Object.entries(l).every(([i,r])=>typeof i=="string"&&Hb(r))}function Hb(l){return l!=null&&typeof l=="object"&&"type"in l&&"result"in l&&(l.type==="data"||l.type==="error")}function kb(l){return Zc(l.result)&&Og.has(l.result.status)}function ea(l){return l.type==="error"}function ll(l){return(l&&l.type)==="redirect"}function qp(l){return typeof l=="object"&&l!=null&&"type"in l&&"data"in l&&"init"in l&&l.type==="DataWithResponseInit"}function Zc(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.headers=="object"&&typeof l.body<"u"}function Bb(l){return Og.has(l)}function qb(l){return Zc(l)&&Bb(l.status)&&l.headers.has("Location")}function Yb(l){return yb.has(l.toUpperCase())}function Dt(l){return pb.has(l.toUpperCase())}function $c(l){return new URLSearchParams(l).getAll("index").some(i=>i==="")}function Ys(l,i){let r=typeof i=="string"?ln(i).search:i.search;if(l[l.length-1].route.index&&$c(r||""))return l[l.length-1];let s=Ng(l);return s[s.length-1]}function Yp(l){let{formMethod:i,formAction:r,formEncType:s,text:u,formData:f,json:d}=l;if(!(!i||!r||!s)){if(u!=null)return{formMethod:i,formAction:r,formEncType:s,formData:void 0,json:void 0,text:u};if(f!=null)return{formMethod:i,formAction:r,formEncType:s,formData:f,json:void 0,text:void 0};if(d!==void 0)return{formMethod:i,formAction:r,formEncType:s,formData:void 0,json:d,text:void 0}}}function zc(l,i){return i?{state:"loading",location:l,formMethod:i.formMethod,formAction:i.formAction,formEncType:i.formEncType,formData:i.formData,json:i.json,text:i.text}:{state:"loading",location:l,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Vb(l,i){return{state:"submitting",location:l,formMethod:i.formMethod,formAction:i.formAction,formEncType:i.formEncType,formData:i.formData,json:i.json,text:i.text}}function Pi(l,i){return l?{state:"loading",formMethod:l.formMethod,formAction:l.formAction,formEncType:l.formEncType,formData:l.formData,json:l.json,text:l.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 Gb(l,i){return{state:"submitting",formMethod:l.formMethod,formAction:l.formAction,formEncType:l.formEncType,formData:l.formData,json:l.json,text:l.text,data:i?i.data:void 0}}function an(l){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:l}}function Kb(l,i){try{let r=l.sessionStorage.getItem(Tg);if(r){let s=JSON.parse(r);for(let[u,f]of Object.entries(s||{}))f&&Array.isArray(f)&&i.set(u,new Set(f||[]))}}catch{}}function Xb(l,i){if(i.size>0){let r={};for(let[s,u]of i)r[s]=[...u];try{l.sessionStorage.setItem(Tg,JSON.stringify(r))}catch(s){ft(!1,`Failed to save applied view transitions in sessionStorage (${s}).`)}}}function Vp(){let l,i,r=new Promise((s,u)=>{l=async f=>{s(f);try{await r}catch{}},i=async f=>{u(f);try{await r}catch{}}});return{promise:r,resolve:l,reject:i}}var rl=S.createContext(null);rl.displayName="DataRouter";var pr=S.createContext(null);pr.displayName="DataRouterState";var Bg=S.createContext(!1);function Qb(){return S.useContext(Bg)}var Jc=S.createContext({isTransitioning:!1});Jc.displayName="ViewTransition";var qg=S.createContext(new Map);qg.displayName="Fetchers";var Zb=S.createContext(null);Zb.displayName="Await";var ta=S.createContext(null);ta.displayName="Navigation";var Ps=S.createContext(null);Ps.displayName="Location";var ma=S.createContext({outlet:null,matches:[],isDataRoute:!1});ma.displayName="Route";var Fc=S.createContext(null);Fc.displayName="RouteError";var Yg="REACT_ROUTER_ERROR",$b="REDIRECT",Jb="ROUTE_ERROR_RESPONSE";function Fb(l){if(l.startsWith(`${Yg}:${$b}:{`))try{let i=JSON.parse(l.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 Wb(l){if(l.startsWith(`${Yg}:${Jb}:{`))try{let i=JSON.parse(l.slice(40));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string")return new hr(i.status,i.statusText,i.data)}catch{}}function Pb(l,{relative:i}={}){De(ti(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:s}=S.useContext(ta),{hash:u,pathname:f,search:d}=gr(l,{relative:i}),m=f;return r!=="/"&&(m=f==="/"?r:Ea([r,f])),s.createHref({pathname:m,search:d,hash:u})}function ti(){return S.useContext(Ps)!=null}function _a(){return De(ti(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(Ps).location}var Vg="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Gg(l){S.useContext(ta).static||S.useLayoutEffect(l)}function sl(){let{isDataRoute:l}=S.useContext(ma);return l?h1():Ib()}function Ib(){De(ti(),"useNavigate() may be used only in the context of a <Router> component.");let l=S.useContext(rl),{basename:i,navigator:r}=S.useContext(ta),{matches:s}=S.useContext(ma),{pathname:u}=_a(),f=JSON.stringify(Ws(s)),d=S.useRef(!1);return Gg(()=>{d.current=!0}),S.useCallback((y,p={})=>{if(ft(d.current,Vg),!d.current)return;if(typeof y=="number"){r.go(y);return}let b=dr(y,JSON.parse(f),u,p.relative==="path");l==null&&i!=="/"&&(b.pathname=b.pathname==="/"?i:Ea([i,b.pathname])),(p.replace?r.replace:r.push)(b,p.state,p)},[i,r,f,u,l])}var e1=S.createContext(null);function t1(l){let i=S.useContext(ma).outlet;return S.useMemo(()=>i&&S.createElement(e1.Provider,{value:l},i),[i,l])}function Wc(){let{matches:l}=S.useContext(ma),i=l[l.length-1];return i?i.params:{}}function gr(l,{relative:i}={}){let{matches:r}=S.useContext(ma),{pathname:s}=_a(),u=JSON.stringify(Ws(r));return S.useMemo(()=>dr(l,JSON.parse(u),s,i==="path"),[l,u,s,i])}function a1(l,i,r){De(ti(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=S.useContext(ta),{matches:u}=S.useContext(ma),f=u[u.length-1],d=f?f.params:{},m=f?f.pathname:"/",y=f?f.pathnameBase:"/",p=f&&f.route;{let D=p&&p.path||"";Xg(m,!p||D.endsWith("*")||D.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${D}">) 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="${D}"> to <Route path="${D==="/"?"*":`${D}/*`}">.`)}let b=_a(),v;v=b;let E=v.pathname||"/",_=E;if(y!=="/"){let D=y.replace(/^\//,"").split("/");_="/"+E.replace(/^\//,"").split("/").slice(D.length).join("/")}let C=An(l,{pathname:_});return ft(p||C!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),ft(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.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.`),s1(C&&C.map(D=>Object.assign({},D,{params:Object.assign({},d,D.params),pathname:Ea([y,s.encodeLocation?s.encodeLocation(D.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:D.pathname]),pathnameBase:D.pathnameBase==="/"?y:Ea([y,s.encodeLocation?s.encodeLocation(D.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:D.pathnameBase])})),u,r)}function n1(){let l=d1(),i=ur(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),r=l instanceof Error?l.stack:null,s="rgba(200,200,200, 0.5)",u={padding:"0.5rem",backgroundColor:s},f={padding:"2px 4px",backgroundColor:s},d=null;return console.error("Error handled by React Router default ErrorBoundary:",l),d=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:f},"ErrorBoundary")," or"," ",S.createElement("code",{style:f},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},i),r?S.createElement("pre",{style:u},r):null,d)}var l1=S.createElement(n1,null),Kg=class extends S.Component{constructor(l){super(l),this.state={location:l.location,revalidation:l.revalidation,error:l.error}}static getDerivedStateFromError(l){return{error:l}}static getDerivedStateFromProps(l,i){return i.location!==l.location||i.revalidation!=="idle"&&l.revalidation==="idle"?{error:l.error,location:l.location,revalidation:l.revalidation}:{error:l.error!==void 0?l.error:i.error,location:i.location,revalidation:l.revalidation||i.revalidation}}componentDidCatch(l,i){this.props.onError?this.props.onError(l,i):console.error("React Router caught the following error during render",l)}render(){let l=this.state.error;if(this.context&&typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){const r=Wb(l.digest);r&&(l=r)}let i=l!==void 0?S.createElement(ma.Provider,{value:this.props.routeContext},S.createElement(Fc.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?S.createElement(i1,{error:l},i):i}};Kg.contextType=Bg;var Mc=new WeakMap;function i1({children:l,error:i}){let{basename:r}=S.useContext(ta);if(typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){let s=Fb(i.digest);if(s){let u=Mc.get(i);if(u)throw u;let f=wg(s.location,r);if(jg&&!Mc.get(i))if(f.isExternal||s.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:s.replace}));throw Mc.set(i,d),d}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return l}function r1({routeContext:l,match:i,children:r}){let s=S.useContext(rl);return s&&s.static&&s.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=i.route.id),S.createElement(ma.Provider,{value:l},r)}function s1(l,i=[],r){let s=r?.state;if(l==null){if(!s)return null;if(s.errors)l=s.matches;else if(i.length===0&&!s.initialized&&s.matches.length>0)l=s.matches;else return null}let u=l,f=s?.errors;if(f!=null){let b=u.findIndex(v=>v.route.id&&f?.[v.route.id]!==void 0);De(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),u=u.slice(0,Math.min(u.length,b+1))}let d=!1,m=-1;if(r&&s){d=s.renderFallback;for(let b=0;b<u.length;b++){let v=u[b];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(m=b),v.route.id){let{loaderData:E,errors:_}=s,C=v.route.loader&&!E.hasOwnProperty(v.route.id)&&(!_||_[v.route.id]===void 0);if(v.route.lazy||C){r.isStatic&&(d=!0),m>=0?u=u.slice(0,m+1):u=[u[0]];break}}}}let y=r?.onError,p=s&&y?(b,v)=>{y(b,{location:s.location,params:s.matches?.[0]?.params??{},unstable_pattern:mr(s.matches),errorInfo:v})}:void 0;return u.reduceRight((b,v,E)=>{let _,C=!1,U=null,D=null;s&&(_=f&&v.route.id?f[v.route.id]:void 0,U=v.route.errorElement||l1,d&&(m<0&&E===0?(Xg("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,D=null):m===E&&(C=!0,D=v.route.hydrateFallbackElement||null)));let K=i.concat(u.slice(0,E+1)),B=()=>{let $;return _?$=U:C?$=D:v.route.Component?$=S.createElement(v.route.Component,null):v.route.element?$=v.route.element:$=b,S.createElement(r1,{match:v,routeContext:{outlet:b,matches:K,isDataRoute:s!=null},children:$})};return s&&(v.route.ErrorBoundary||v.route.errorElement||E===0)?S.createElement(Kg,{location:s.location,revalidation:s.revalidation,component:U,error:_,children:B(),routeContext:{outlet:null,matches:K,isDataRoute:!0},onError:p}):B()},null)}function Pc(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function o1(l){let i=S.useContext(rl);return De(i,Pc(l)),i}function u1(l){let i=S.useContext(pr);return De(i,Pc(l)),i}function c1(l){let i=S.useContext(ma);return De(i,Pc(l)),i}function Ic(l){let i=c1(l),r=i.matches[i.matches.length-1];return De(r.route.id,`${l} can only be used on routes that contain a unique "id"`),r.route.id}function f1(){return Ic("useRouteId")}function d1(){let l=S.useContext(Fc),i=u1("useRouteError"),r=Ic("useRouteError");return l!==void 0?l:i.errors?.[r]}function h1(){let{router:l}=o1("useNavigate"),i=Ic("useNavigate"),r=S.useRef(!1);return Gg(()=>{r.current=!0}),S.useCallback(async(u,f={})=>{ft(r.current,Vg),r.current&&(typeof u=="number"?await l.navigate(u):await l.navigate(u,{fromRouteId:i,...f}))},[l,i])}var Gp={};function Xg(l,i,r){!i&&!Gp[l]&&(Gp[l]=!0,ft(!1,r))}var Kp={};function Xp(l,i){!l&&!Kp[i]&&(Kp[i]=!0,console.warn(i))}var m1="useOptimistic",Qp=Kx[m1],p1=()=>{};function g1(l){return Qp?Qp(l):[l,p1]}function y1(l){let i={hasErrorBoundary:l.hasErrorBoundary||l.ErrorBoundary!=null||l.errorElement!=null};return l.Component&&(l.element&&ft(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(i,{element:S.createElement(l.Component),Component:void 0})),l.HydrateFallback&&(l.hydrateFallbackElement&&ft(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(i,{hydrateFallbackElement:S.createElement(l.HydrateFallback),HydrateFallback:void 0})),l.ErrorBoundary&&(l.errorElement&&ft(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(i,{errorElement:S.createElement(l.ErrorBoundary),ErrorBoundary:void 0})),i}var v1=["HydrateFallback","hydrateFallbackElement"],x1=class{constructor(){this.status="pending",this.promise=new Promise((l,i)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",l(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",i(r))}})}};function b1({router:l,flushSync:i,onError:r,unstable_useTransitions:s}){s=Qb()||s;let[f,d]=S.useState(l.state),[m,y]=g1(f),[p,b]=S.useState(),[v,E]=S.useState({isTransitioning:!1}),[_,C]=S.useState(),[U,D]=S.useState(),[K,B]=S.useState(),$=S.useRef(new Map),te=S.useCallback((z,{deletedFetchers:le,newErrors:re,flushSync:ye,viewTransitionOpts:Z})=>{re&&r&&Object.values(re).forEach(me=>r(me,{location:z.location,params:z.matches[0]?.params??{},unstable_pattern:mr(z.matches)})),z.fetchers.forEach((me,pe)=>{me.data!==void 0&&$.current.set(pe,me.data)}),le.forEach(me=>$.current.delete(me)),Xp(ye===!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 we=l.window!=null&&l.window.document!=null&&typeof l.window.document.startViewTransition=="function";if(Xp(Z==null||we,"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."),!Z||!we){i&&ye?i(()=>d(z)):s===!1?d(z):S.startTransition(()=>{s===!0&&y(me=>Zp(me,z)),d(z)});return}if(i&&ye){i(()=>{U&&(_?.resolve(),U.skipTransition()),E({isTransitioning:!0,flushSync:!0,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation})});let me=l.window.document.startViewTransition(()=>{i(()=>d(z))});me.finished.finally(()=>{i(()=>{C(void 0),D(void 0),b(void 0),E({isTransitioning:!1})})}),i(()=>D(me));return}U?(_?.resolve(),U.skipTransition(),B({state:z,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation})):(b(z),E({isTransitioning:!0,flushSync:!1,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation}))},[l.window,i,U,_,s,y,r]);S.useLayoutEffect(()=>l.subscribe(te),[l,te]),S.useEffect(()=>{v.isTransitioning&&!v.flushSync&&C(new x1)},[v]),S.useEffect(()=>{if(_&&p&&l.window){let z=p,le=_.promise,re=l.window.document.startViewTransition(async()=>{s===!1?d(z):S.startTransition(()=>{s===!0&&y(ye=>Zp(ye,z)),d(z)}),await le});re.finished.finally(()=>{C(void 0),D(void 0),b(void 0),E({isTransitioning:!1})}),D(re)}},[p,_,l.window,s,y]),S.useEffect(()=>{_&&p&&m.location.key===p.location.key&&_.resolve()},[_,U,m.location,p]),S.useEffect(()=>{!v.isTransitioning&&K&&(b(K.state),E({isTransitioning:!0,flushSync:!1,currentLocation:K.currentLocation,nextLocation:K.nextLocation}),B(void 0))},[v.isTransitioning,K]);let ie=S.useMemo(()=>({createHref:l.createHref,encodeLocation:l.encodeLocation,go:z=>l.navigate(z),push:(z,le,re)=>l.navigate(z,{state:le,preventScrollReset:re?.preventScrollReset}),replace:(z,le,re)=>l.navigate(z,{replace:!0,state:le,preventScrollReset:re?.preventScrollReset})}),[l]),he=l.basename||"/",ae=S.useMemo(()=>({router:l,navigator:ie,static:!1,basename:he,onError:r}),[l,ie,he,r]);return S.createElement(S.Fragment,null,S.createElement(rl.Provider,{value:ae},S.createElement(pr.Provider,{value:m},S.createElement(qg.Provider,{value:$.current},S.createElement(Jc.Provider,{value:v},S.createElement(_1,{basename:he,location:m.location,navigationType:m.historyAction,navigator:ie,unstable_useTransitions:s},S.createElement(S1,{routes:l.routes,future:l.future,state:m,isStatic:!1,onError:r})))))),null)}function Zp(l,i){return{...l,navigation:i.navigation.state!=="idle"?i.navigation:l.navigation,revalidation:i.revalidation!=="idle"?i.revalidation:l.revalidation,actionData:i.navigation.state!=="submitting"?i.actionData:l.actionData,fetchers:i.fetchers}}var S1=S.memo(E1);function E1({routes:l,future:i,state:r,isStatic:s,onError:u}){return a1(l,void 0,{state:r,isStatic:s,onError:u})}function $p({to:l,replace:i,state:r,relative:s}){De(ti(),"<Navigate> may be used only in the context of a <Router> component.");let{static:u}=S.useContext(ta);ft(!u,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:f}=S.useContext(ma),{pathname:d}=_a(),m=sl(),y=dr(l,Ws(f),d,s==="path"),p=JSON.stringify(y);return S.useEffect(()=>{m(JSON.parse(p),{replace:i,state:r,relative:s})},[m,p,s,i,r]),null}function Qg(l){return t1(l.context)}function _1({basename:l="/",children:i=null,location:r,navigationType:s="POP",navigator:u,static:f=!1,unstable_useTransitions:d}){De(!ti(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=l.replace(/^\/*/,"/"),y=S.useMemo(()=>({basename:m,navigator:u,static:f,unstable_useTransitions:d,future:{}}),[m,u,f,d]);typeof r=="string"&&(r=ln(r));let{pathname:p="/",search:b="",hash:v="",state:E=null,key:_="default",unstable_mask:C}=r,U=S.useMemo(()=>{let D=ha(p,m);return D==null?null:{location:{pathname:D,search:b,hash:v,state:E,key:_,unstable_mask:C},navigationType:s}},[m,p,b,v,E,_,s,C]);return ft(U!=null,`<Router basename="${m}"> is not able to match the URL "${p}${b}${v}" because it does not start with the basename, so the <Router> won't render anything.`),U==null?null:S.createElement(ta.Provider,{value:y},S.createElement(Ps.Provider,{children:i,value:U}))}var Vs="get",Gs="application/x-www-form-urlencoded";function Is(l){return typeof HTMLElement<"u"&&l instanceof HTMLElement}function N1(l){return Is(l)&&l.tagName.toLowerCase()==="button"}function j1(l){return Is(l)&&l.tagName.toLowerCase()==="form"}function w1(l){return Is(l)&&l.tagName.toLowerCase()==="input"}function R1(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function C1(l,i){return l.button===0&&(!i||i==="_self")&&!R1(l)}function Gc(l=""){return new URLSearchParams(typeof l=="string"||Array.isArray(l)||l instanceof URLSearchParams?l:Object.keys(l).reduce((i,r)=>{let s=l[r];return i.concat(Array.isArray(s)?s.map(u=>[r,u]):[[r,s]])},[]))}function O1(l,i){let r=Gc(l);return i&&i.forEach((s,u)=>{r.has(u)||i.getAll(u).forEach(f=>{r.append(u,f)})}),r}var ks=null;function T1(){if(ks===null)try{new FormData(document.createElement("form"),0),ks=!1}catch{ks=!0}return ks}var z1=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Dc(l){return l!=null&&!z1.has(l)?(ft(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Gs}"`),null):l}function M1(l,i){let r,s,u,f,d;if(j1(l)){let m=l.getAttribute("action");s=m?ha(m,i):null,r=l.getAttribute("method")||Vs,u=Dc(l.getAttribute("enctype"))||Gs,f=new FormData(l)}else if(N1(l)||w1(l)&&(l.type==="submit"||l.type==="image")){let m=l.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=l.getAttribute("formaction")||m.getAttribute("action");if(s=y?ha(y,i):null,r=l.getAttribute("formmethod")||m.getAttribute("method")||Vs,u=Dc(l.getAttribute("formenctype"))||Dc(m.getAttribute("enctype"))||Gs,f=new FormData(m,l),!T1()){let{name:p,type:b,value:v}=l;if(b==="image"){let E=p?`${p}.`:"";f.append(`${E}x`,"0"),f.append(`${E}y`,"0")}else p&&f.append(p,v)}}else{if(Is(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Vs,s=null,u=Gs,d=l}return f&&u==="text/plain"&&(d=f,f=void 0),{action:s,method:r.toLowerCase(),encType:u,formData:f,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ef(l,i){if(l===!1||l===null||typeof l>"u")throw new Error(i)}function D1(l,i,r,s){let u=typeof l=="string"?new URL(l,typeof window>"u"?"server://singlefetch/":window.location.origin):l;return r?u.pathname.endsWith("/")?u.pathname=`${u.pathname}_.${s}`:u.pathname=`${u.pathname}.${s}`:u.pathname==="/"?u.pathname=`_root.${s}`:i&&ha(u.pathname,i)==="/"?u.pathname=`${i.replace(/\/$/,"")}/_root.${s}`:u.pathname=`${u.pathname.replace(/\/$/,"")}.${s}`,u}async function A1(l,i){if(l.id in i)return i[l.id];try{let r=await import(l.module);return i[l.id]=r,r}catch(r){return console.error(`Error loading route module \`${l.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function L1(l){return l==null?!1:l.href==null?l.rel==="preload"&&typeof l.imageSrcSet=="string"&&typeof l.imageSizes=="string":typeof l.rel=="string"&&typeof l.href=="string"}async function U1(l,i,r){let s=await Promise.all(l.map(async u=>{let f=i.routes[u.route.id];if(f){let d=await A1(f,r);return d.links?d.links():[]}return[]}));return q1(s.flat(1).filter(L1).filter(u=>u.rel==="stylesheet"||u.rel==="preload").map(u=>u.rel==="stylesheet"?{...u,rel:"prefetch",as:"style"}:{...u,rel:"prefetch"}))}function Jp(l,i,r,s,u,f){let d=(y,p)=>r[p]?y.route.id!==r[p].route.id:!0,m=(y,p)=>r[p].pathname!==y.pathname||r[p].route.path?.endsWith("*")&&r[p].params["*"]!==y.params["*"];return f==="assets"?i.filter((y,p)=>d(y,p)||m(y,p)):f==="data"?i.filter((y,p)=>{let b=s.routes[y.route.id];if(!b||!b.hasLoader)return!1;if(d(y,p)||m(y,p))return!0;if(y.route.shouldRevalidate){let v=y.route.shouldRevalidate({currentUrl:new URL(u.pathname+u.search+u.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(l,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function H1(l,i,{includeHydrateFallback:r}={}){return k1(l.map(s=>{let u=i.routes[s.route.id];if(!u)return[];let f=[u.module];return u.clientActionModule&&(f=f.concat(u.clientActionModule)),u.clientLoaderModule&&(f=f.concat(u.clientLoaderModule)),r&&u.hydrateFallbackModule&&(f=f.concat(u.hydrateFallbackModule)),u.imports&&(f=f.concat(u.imports)),f}).flat(1))}function k1(l){return[...new Set(l)]}function B1(l){let i={},r=Object.keys(l).sort();for(let s of r)i[s]=l[s];return i}function q1(l,i){let r=new Set;return new Set(i),l.reduce((s,u)=>{let f=JSON.stringify(B1(u));return r.has(f)||(r.add(f),s.push({key:f,link:u})),s},[])}function Zg(){let l=S.useContext(rl);return ef(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function Y1(){let l=S.useContext(pr);return ef(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var tf=S.createContext(void 0);tf.displayName="FrameworkContext";function $g(){let l=S.useContext(tf);return ef(l,"You must render this element inside a <HydratedRouter> element"),l}function V1(l,i){let r=S.useContext(tf),[s,u]=S.useState(!1),[f,d]=S.useState(!1),{onFocus:m,onBlur:y,onMouseEnter:p,onMouseLeave:b,onTouchStart:v}=i,E=S.useRef(null);S.useEffect(()=>{if(l==="render"&&d(!0),l==="viewport"){let U=K=>{K.forEach(B=>{d(B.isIntersecting)})},D=new IntersectionObserver(U,{threshold:.5});return E.current&&D.observe(E.current),()=>{D.disconnect()}}},[l]),S.useEffect(()=>{if(s){let U=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(U)}}},[s]);let _=()=>{u(!0)},C=()=>{u(!1),d(!1)};return r?l!=="intent"?[f,E,{}]:[f,E,{onFocus:Ii(m,_),onBlur:Ii(y,C),onMouseEnter:Ii(p,_),onMouseLeave:Ii(b,C),onTouchStart:Ii(v,_)}]:[!1,E,{}]}function Ii(l,i){return r=>{l&&l(r),r.defaultPrevented||i(r)}}function G1({page:l,...i}){let{router:r}=Zg(),s=S.useMemo(()=>An(r.routes,l,r.basename),[r.routes,l,r.basename]);return s?S.createElement(X1,{page:l,matches:s,...i}):null}function K1(l){let{manifest:i,routeModules:r}=$g(),[s,u]=S.useState([]);return S.useEffect(()=>{let f=!1;return U1(l,i,r).then(d=>{f||u(d)}),()=>{f=!0}},[l,i,r]),s}function X1({page:l,matches:i,...r}){let s=_a(),{future:u,manifest:f,routeModules:d}=$g(),{basename:m}=Zg(),{loaderData:y,matches:p}=Y1(),b=S.useMemo(()=>Jp(l,i,p,f,s,"data"),[l,i,p,f,s]),v=S.useMemo(()=>Jp(l,i,p,f,s,"assets"),[l,i,p,f,s]),E=S.useMemo(()=>{if(l===s.pathname+s.search+s.hash)return[];let U=new Set,D=!1;if(i.forEach(B=>{let $=f.routes[B.route.id];!$||!$.hasLoader||(!b.some(te=>te.route.id===B.route.id)&&B.route.id in y&&d[B.route.id]?.shouldRevalidate||$.hasClientLoader?D=!0:U.add(B.route.id))}),U.size===0)return[];let K=D1(l,m,u.unstable_trailingSlashAwareDataRequests,"data");return D&&U.size>0&&K.searchParams.set("_routes",i.filter(B=>U.has(B.route.id)).map(B=>B.route.id).join(",")),[K.pathname+K.search]},[m,u.unstable_trailingSlashAwareDataRequests,y,s,f,b,i,l,d]),_=S.useMemo(()=>H1(v,f),[v,f]),C=K1(v);return S.createElement(S.Fragment,null,E.map(U=>S.createElement("link",{key:U,rel:"prefetch",as:"fetch",href:U,...r})),_.map(U=>S.createElement("link",{key:U,rel:"modulepreload",href:U,...r})),C.map(({key:U,link:D})=>S.createElement("link",{key:U,nonce:r.nonce,...D,crossOrigin:D.crossOrigin??r.crossOrigin})))}function Q1(...l){return i=>{l.forEach(r=>{typeof r=="function"?r(i):r!=null&&(r.current=i)})}}var Z1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Z1&&(window.__reactRouterVersion="7.13.1")}catch{}function $1(l,i){return Sb({basename:i?.basename,getContext:i?.getContext,future:i?.future,history:H0({window:i?.window}),hydrationData:J1(),routes:l,mapRouteProperties:y1,hydrationRouteProperties:v1,dataStrategy:i?.dataStrategy,patchRoutesOnNavigation:i?.patchRoutesOnNavigation,window:i?.window,unstable_instrumentations:i?.unstable_instrumentations}).initialize()}function J1(){let l=window?.__staticRouterHydrationData;return l&&l.errors&&(l={...l,errors:F1(l.errors)}),l}function F1(l){if(!l)return null;let i=Object.entries(l),r={};for(let[s,u]of i)if(u&&u.__type==="RouteErrorResponse")r[s]=new hr(u.status,u.statusText,u.data,u.internal===!0);else if(u&&u.__type==="Error"){if(u.__subType){let f=window[u.__subType];if(typeof f=="function")try{let d=new f(u.message);d.stack="",r[s]=d}catch{}}if(r[s]==null){let f=new Error(u.message);f.stack="",r[s]=f}}else r[s]=u;return r}var Jg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Qt=S.forwardRef(function({onClick:i,discover:r="render",prefetch:s="none",relative:u,reloadDocument:f,replace:d,unstable_mask:m,state:y,target:p,to:b,preventScrollReset:v,viewTransition:E,unstable_defaultShouldRevalidate:_,...C},U){let{basename:D,navigator:K,unstable_useTransitions:B}=S.useContext(ta),$=typeof b=="string"&&Jg.test(b),te=wg(b,D);b=te.to;let ie=Pb(b,{relative:u}),he=_a(),ae=null;if(m){let pe=dr(m,[],he.unstable_mask?he.unstable_mask.pathname:"/",!0);D!=="/"&&(pe.pathname=pe.pathname==="/"?D:Ea([D,pe.pathname])),ae=K.createHref(pe)}let[z,le,re]=V1(s,C),ye=I1(b,{replace:d,unstable_mask:m,state:y,target:p,preventScrollReset:v,relative:u,viewTransition:E,unstable_defaultShouldRevalidate:_,unstable_useTransitions:B});function Z(pe){i&&i(pe),pe.defaultPrevented||ye(pe)}let we=!(te.isExternal||f),me=S.createElement("a",{...C,...re,href:(we?ae:void 0)||te.absoluteURL||ie,onClick:we?Z:i,ref:Q1(U,le),target:p,"data-discover":!$&&r==="render"?"true":void 0});return z&&!$?S.createElement(S.Fragment,null,me,S.createElement(G1,{page:ie})):me});Qt.displayName="Link";var cr=S.forwardRef(function({"aria-current":i="page",caseSensitive:r=!1,className:s="",end:u=!1,style:f,to:d,viewTransition:m,children:y,...p},b){let v=gr(d,{relative:p.relative}),E=_a(),_=S.useContext(pr),{navigator:C,basename:U}=S.useContext(ta),D=_!=null&&iS(v)&&m===!0,K=C.encodeLocation?C.encodeLocation(v).pathname:v.pathname,B=E.pathname,$=_&&_.navigation&&_.navigation.location?_.navigation.location.pathname:null;r||(B=B.toLowerCase(),$=$?$.toLowerCase():null,K=K.toLowerCase()),$&&U&&($=ha($,U)||$);const te=K!=="/"&&K.endsWith("/")?K.length-1:K.length;let ie=B===K||!u&&B.startsWith(K)&&B.charAt(te)==="/",he=$!=null&&($===K||!u&&$.startsWith(K)&&$.charAt(K.length)==="/"),ae={isActive:ie,isPending:he,isTransitioning:D},z=ie?i:void 0,le;typeof s=="function"?le=s(ae):le=[s,ie?"active":null,he?"pending":null,D?"transitioning":null].filter(Boolean).join(" ");let re=typeof f=="function"?f(ae):f;return S.createElement(Qt,{...p,"aria-current":z,className:le,ref:b,style:re,to:d,viewTransition:m},typeof y=="function"?y(ae):y)});cr.displayName="NavLink";var W1=S.forwardRef(({discover:l="render",fetcherKey:i,navigate:r,reloadDocument:s,replace:u,state:f,method:d=Vs,action:m,onSubmit:y,relative:p,preventScrollReset:b,viewTransition:v,unstable_defaultShouldRevalidate:E,..._},C)=>{let{unstable_useTransitions:U}=S.useContext(ta),D=nS(),K=lS(m,{relative:p}),B=d.toLowerCase()==="get"?"get":"post",$=typeof m=="string"&&Jg.test(m),te=ie=>{if(y&&y(ie),ie.defaultPrevented)return;ie.preventDefault();let he=ie.nativeEvent.submitter,ae=he?.getAttribute("formmethod")||d,z=()=>D(he||ie.currentTarget,{fetcherKey:i,method:ae,navigate:r,replace:u,state:f,relative:p,preventScrollReset:b,viewTransition:v,unstable_defaultShouldRevalidate:E});U&&r!==!1?S.startTransition(()=>z()):z()};return S.createElement("form",{ref:C,method:B,action:K,onSubmit:s?y:te,..._,"data-discover":!$&&l==="render"?"true":void 0})});W1.displayName="Form";function P1(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Fg(l){let i=S.useContext(rl);return De(i,P1(l)),i}function I1(l,{target:i,replace:r,unstable_mask:s,state:u,preventScrollReset:f,relative:d,viewTransition:m,unstable_defaultShouldRevalidate:y,unstable_useTransitions:p}={}){let b=sl(),v=_a(),E=gr(l,{relative:d});return S.useCallback(_=>{if(C1(_,i)){_.preventDefault();let C=r!==void 0?r:Da(v)===Da(E),U=()=>b(l,{replace:C,unstable_mask:s,state:u,preventScrollReset:f,relative:d,viewTransition:m,unstable_defaultShouldRevalidate:y});p?S.startTransition(()=>U()):U()}},[v,b,E,r,s,u,i,l,f,d,m,y,p])}function eS(l){ft(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=S.useRef(Gc(l)),r=S.useRef(!1),s=_a(),u=S.useMemo(()=>O1(s.search,r.current?null:i.current),[s.search]),f=sl(),d=S.useCallback((m,y)=>{const p=Gc(typeof m=="function"?m(new URLSearchParams(u)):m);r.current=!0,f("?"+p,y)},[f,u]);return[u,d]}var tS=0,aS=()=>`__${String(++tS)}__`;function nS(){let{router:l}=Fg("useSubmit"),{basename:i}=S.useContext(ta),r=f1(),s=l.fetch,u=l.navigate;return S.useCallback(async(f,d={})=>{let{action:m,method:y,encType:p,formData:b,body:v}=M1(f,i);if(d.navigate===!1){let E=d.fetcherKey||aS();await s(E,r,d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:b,body:v,formMethod:d.method||y,formEncType:d.encType||p,flushSync:d.flushSync})}else await u(d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:b,body:v,formMethod:d.method||y,formEncType:d.encType||p,replace:d.replace,state:d.state,fromRouteId:r,flushSync:d.flushSync,viewTransition:d.viewTransition})},[s,u,i,r])}function lS(l,{relative:i}={}){let{basename:r}=S.useContext(ta),s=S.useContext(ma);De(s,"useFormAction must be used inside a RouteContext");let[u]=s.matches.slice(-1),f={...gr(l||".",{relative:i})},d=_a();if(l==null){f.search=d.search;let m=new URLSearchParams(f.search),y=m.getAll("index");if(y.some(b=>b==="")){m.delete("index"),y.filter(v=>v).forEach(v=>m.append("index",v));let b=m.toString();f.search=b?`?${b}`:""}}return(!l||l===".")&&u.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(f.pathname=f.pathname==="/"?r:Ea([r,f.pathname])),Da(f)}function iS(l,{relative:i}={}){let r=S.useContext(Jc);De(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=Fg("useViewTransitionState"),u=gr(l,{relative:i});if(!r.isTransitioning)return!1;let f=ha(r.currentLocation.pathname,s)||r.currentLocation.pathname,d=ha(r.nextLocation.pathname,s)||r.nextLocation.pathname;return $s(u.pathname,d)!=null||$s(u.pathname,f)!=null}const Wg=(...l)=>l.filter((i,r,s)=>!!i&&i.trim()!==""&&s.indexOf(i)===r).join(" ").trim();const rS=l=>l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const sS=l=>l.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,r,s)=>s?s.toUpperCase():r.toLowerCase());const Fp=l=>{const i=sS(l);return i.charAt(0).toUpperCase()+i.slice(1)};var oS={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 uS=l=>{for(const i in l)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1};const cS=S.forwardRef(({color:l="currentColor",size:i=24,strokeWidth:r=2,absoluteStrokeWidth:s,className:u="",children:f,iconNode:d,...m},y)=>S.createElement("svg",{ref:y,...oS,width:i,height:i,stroke:l,strokeWidth:s?Number(r)*24/Number(i):r,className:Wg("lucide",u),...!f&&!uS(m)&&{"aria-hidden":"true"},...m},[...d.map(([p,b])=>S.createElement(p,b)),...Array.isArray(f)?f:[f]]));const Qe=(l,i)=>{const r=S.forwardRef(({className:s,...u},f)=>S.createElement(cS,{ref:f,iconNode:i,className:Wg(`lucide-${rS(Fp(l))}`,`lucide-${l}`,s),...u}));return r.displayName=Fp(l),r};const fS=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Pg=Qe("arrow-left",fS);const dS=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],hS=Qe("arrow-right",dS);const mS=[["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"}]],pS=Qe("boxes",mS);const gS=[["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"}]],yS=Qe("brain",gS);const vS=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ig=Qe("check",vS);const xS=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ey=Qe("chevron-down",xS);const bS=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],eo=Qe("chevron-right",bS);const SS=[["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"}]],ES=Qe("circle-alert",SS);const _S=[["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"}]],NS=Qe("database",_S);const jS=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],wS=Qe("download",jS);const RS=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],CS=Qe("ellipsis",RS);const OS=[["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"}]],af=Qe("file-text",OS);const TS=[["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"}]],zS=Qe("folder-open",TS);const MS=[["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"}]],ty=Qe("folder-plus",MS);const DS=[["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"}]],fr=Qe("folder",DS);const AS=[["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"}]],LS=Qe("git-branch",AS);const US=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],to=Qe("info",US);const HS=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Il=Qe("loader-circle",HS);const kS=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],BS=Qe("menu",kS);const qS=[["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"}]],YS=Qe("monitor",qS);const VS=[["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"}]],GS=Qe("moon",VS);const KS=[["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"}]],nf=Qe("package",KS);const XS=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],QS=Qe("panel-left",XS);const ZS=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],$S=Qe("plus",ZS);const JS=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],FS=Qe("search",JS);const WS=[["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"}]],PS=Qe("settings",WS);const IS=[["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"}]],e2=Qe("share-2",IS);const t2=[["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"}]],a2=Qe("sun",t2);const n2=[["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"}]],l2=Qe("users",n2);const i2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ay=Qe("x",i2),Wp=l=>{let i;const r=new Set,s=(p,b)=>{const v=typeof p=="function"?p(i):p;if(!Object.is(v,i)){const E=i;i=b??(typeof v!="object"||v===null)?v:Object.assign({},i,v),r.forEach(_=>_(i,E))}},u=()=>i,m={setState:s,getState:u,getInitialState:()=>y,subscribe:p=>(r.add(p),()=>r.delete(p))},y=i=l(s,u,m);return m},r2=(l=>l?Wp(l):Wp),s2=l=>l;function o2(l,i=s2){const r=Fl.useSyncExternalStore(l.subscribe,Fl.useCallback(()=>i(l.getState()),[l,i]),Fl.useCallback(()=>i(l.getInitialState()),[l,i]));return Fl.useDebugValue(r),r}const Pp=l=>{const i=r2(l),r=s=>o2(i,s);return Object.assign(r,i),r},ao=(l=>l?Pp(l):Pp),u2="/api/v1";class Ks extends Error{constructor(i,r,s){super(s),this.status=i,this.code=r,this.name="ApiError"}}async function Bs(l,i,r,s){let u=`${u2}${i}`;if(s){const m=new URLSearchParams(s).toString();m&&(u+=`?${m}`)}const f={method:l,headers:{"Content-Type":"application/json"}};r!==void 0&&(f.body=JSON.stringify(r));const d=await fetch(u,f);if(!d.ok){let m="UNKNOWN",y=d.statusText;try{const p=await d.json();p.code&&(m=p.code),p.message&&(y=p.message)}catch{}throw new Ks(d.status,m,y)}return d.json()}const Xt={get(l,i){return Bs("GET",l,void 0,i)},post(l,i){return Bs("POST",l,i)},put(l,i){return Bs("PUT",l,i)},delete(l){return Bs("DELETE",l)}},c2=3e4,f2=1e3,d2=3e4;class h2{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 u=this.handlers.get(s.event);if(u)for(const f of u)f(s.payload)}catch{}},i.onclose=()=>{this.stopHeartbeat(),this.intentionalClose||(this.setStatus("reconnecting"),this.scheduleReconnect())},i.onerror=()=>{},this.ws=i}startHeartbeat(){this.stopHeartbeat(),this.heartbeatTimer=setInterval(()=>{this.ws?.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify({event:"ping",payload:null,timestamp:Date.now()}))},c2)}stopHeartbeat(){this.heartbeatTimer&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=null)}scheduleReconnect(){if(this.reconnectTimer)return;const i=Math.min(f2*2**this.reconnectAttempt,d2);this.reconnectAttempt++,this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.open()},i)}clearTimers(){this.stopHeartbeat(),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}}const nn=new h2,ei=ao(l=>({status:"disconnected",onlineCount:0,connections:[],setStatus:i=>l({status:i}),fetchDaemonStatus:async()=>{try{const i=await Xt.get("/daemons/status");l({onlineCount:i.online_count,connections:i.connections})}catch{}}})),m2=l=>l==="connecting"?"disconnected":l;nn.onStatusChange(l=>{ei.getState().setStatus(m2(l))});nn.on("ws:daemon:connected",l=>{const i=l;ei.setState(r=>{if(r.connections.some(d=>d.machine_id===i.machine_id))return r;const u={machine_id:i.machine_id};i.lib_id&&(u.lib_id=i.lib_id);const f=[...r.connections,u];return{connections:f,onlineCount:f.length}})});nn.on("ws:daemon:status",l=>{const i=l;ei.setState(r=>{if(i.is_online){if(r.connections.some(m=>m.machine_id===i.machine_id))return r;const f={machine_id:i.machine_id};i.lib_id&&(f.lib_id=i.lib_id);const d=[...r.connections,f];return{connections:d,onlineCount:d.length}}const s=r.connections.filter(u=>u.machine_id!==i.machine_id);return{connections:s,onlineCount:s.length}})});function Kc(){const{t:l}=Me(),i=ei(f=>f.onlineCount),r=ei(f=>f.connections.length),s=i>0,u=s?l("sources.header.daemon_status",{online:i,total:r}):l("sources.header.all_offline");return g.jsxs("div",{className:"group relative flex items-center",title:u,children:[g.jsx("span",{className:`inline-block h-[7px] w-[7px] rounded-full ${s?"bg-c4a-success":"bg-c4a-error"}`}),g.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:u})]})}const Ip=[{to:"/",labelKey:"nav.home"},{to:"/studio",labelKey:"nav.studio"},{to:"/docs",labelKey:"nav.docs"}];function p2(){const{t:l}=Me(),[i,r]=S.useState(!1);return g.jsxs("header",{className:"sticky top-0 z-40 border-b border-c4a-border-subtle bg-c4a-bg-base/95 backdrop-blur-sm",children:[g.jsxs("div",{className:"flex h-14 items-center justify-between px-4",children:[g.jsxs(Qt,{to:"/",className:"flex items-center gap-2 text-c4a-text-primary",children:[g.jsx("span",{className:"font-mono text-lg font-bold text-c4a-accent",children:"C4A"}),g.jsx("span",{className:"hidden font-mono text-sm font-semibold uppercase tracking-tight md:inline",children:"Context4AI"})]}),g.jsxs("div",{className:"hidden items-center gap-6 md:flex",children:[g.jsx("nav",{className:"flex items-center gap-4",children:Ip.map(({to:s,labelKey:u})=>g.jsx(cr,{to:s,end:s==="/",className:({isActive:f})=>`font-mono text-xs uppercase tracking-tight transition-colors duration-150 ${f?"text-c4a-accent":"text-c4a-text-secondary hover:text-c4a-text-primary"}`,children:l(u)},s))}),g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx(Kc,{}),g.jsx(Qt,{to:"/login",className:"font-mono text-xs uppercase tracking-tight text-c4a-text-muted transition-colors duration-150 hover:text-c4a-text-primary",children:l("nav.login")})]})]}),g.jsx("button",{onClick:()=>r(!i),className:"text-c4a-text-secondary md:hidden",children:i?g.jsx(ay,{size:20}):g.jsx(BS,{size:20})})]}),i&&g.jsxs("div",{className:"border-t border-c4a-border-subtle bg-c4a-bg-surface px-4 pb-4 pt-2 md:hidden",children:[g.jsx("nav",{className:"flex flex-col gap-2",children:Ip.map(({to:s,labelKey:u})=>g.jsx(cr,{to:s,end:s==="/",onClick:()=>r(!1),className:({isActive:f})=>`block py-2 font-mono text-xs uppercase tracking-tight transition-colors duration-150 ${f?"text-c4a-accent":"text-c4a-text-secondary hover:text-c4a-text-primary"}`,children:l(u)},s))}),g.jsx("div",{className:"mt-2 border-t border-c4a-border-subtle pt-2",children:g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx(Kc,{}),g.jsx(Qt,{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:l("nav.login")})]})})]})]})}function g2(l){return l==="system"&&typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":l==="system"?"dark":l}function ny(l){if(typeof window>"u")return;const i=g2(l);document.documentElement.setAttribute("data-theme",i),localStorage.setItem("theme",l)}function y2(){try{return localStorage.getItem("theme")||"system"}catch{return"system"}}const ly=ao(l=>({theme:y2(),setTheme:i=>{ny(i),l({theme:i})}}));let eg=!1;function v2(){if(eg||typeof window>"u")return;eg=!0;const l=window.matchMedia("(prefers-color-scheme: dark)"),i=()=>{const{theme:r}=ly.getState();r==="system"&&ny("system")};l.addEventListener("change",i)}v2();const x2=[{mode:"light",icon:a2,labelKey:"footer.theme.light"},{mode:"dark",icon:GS,labelKey:"footer.theme.dark"},{mode:"system",icon:YS,labelKey:"footer.theme.system"}];function b2(){const{t:l}=Me(),{theme:i,setTheme:r}=ly();return g.jsx("div",{className:"flex items-center gap-1",children:x2.map(({mode:s,icon:u,labelKey:f})=>g.jsx("button",{onClick:()=>r(s),title:l(f),className:`cursor-pointer rounded p-1.5 transition-colors duration-150 ${i===s?"bg-c4a-bg-active text-c4a-accent":"text-c4a-text-muted hover:text-c4a-text-secondary hover:bg-c4a-bg-hover"}`,children:g.jsx(u,{size:14})},s))})}function S2(){const{i18n:l}=Me(),i=()=>{const r=l.language==="en"?"zh":"en";l.changeLanguage(r)};return g.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:l.language==="en"?"CN":"EN"})}const E2="_brandIcon_1c7st_1",_2="_iconPulse_1c7st_35",tg={brandIcon:E2,iconPulse:_2};function iy(){const{t:l}=Me(),i=new Date().getFullYear();return g.jsx("footer",{className:"border-t border-c4a-border-subtle bg-c4a-bg-base px-4 py-4",children:g.jsxs("div",{className:"flex items-end justify-between gap-4",children:[g.jsxs("div",{className:"hidden items-center gap-3 md:flex",children:[g.jsx("div",{className:tg.brandIcon,children:g.jsx("span",{className:tg.iconPulse,children:"C4A"})}),g.jsxs("div",{className:"flex flex-col",children:[g.jsx("span",{className:"font-mono text-xs font-semibold uppercase tracking-tight text-c4a-text-primary",children:"Context4AI"}),g.jsx("span",{className:"font-mono text-[10px] uppercase tracking-wider text-c4a-text-muted",children:l("footer.tagline")})]})]}),g.jsxs("div",{className:"ml-auto flex flex-col items-end gap-2",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(b2,{}),g.jsx(S2,{})]}),g.jsx("p",{className:"font-mono text-[11px] text-c4a-text-muted",children:l("footer.copyright",{year:i})})]})]})})}function N2(){return g.jsxs("div",{className:"flex min-h-screen flex-col",children:[g.jsx(p2,{}),g.jsx("main",{className:"mx-auto flex w-full max-w-[1200px] flex-1 flex-col px-4",children:g.jsx(Qg,{})}),g.jsx(iy,{})]})}function j2({onToggleSidebar:l}){const{t:i}=Me();return g.jsx("header",{className:"sticky top-0 z-40 border-b border-c4a-border-subtle bg-c4a-bg-base/95 backdrop-blur-sm",children:g.jsxs("div",{className:"flex h-14 items-center justify-between px-4",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[l&&g.jsx("button",{onClick:l,className:"text-c4a-text-secondary transition-colors duration-150 hover:text-c4a-text-primary md:hidden",children:g.jsx(QS,{size:20})}),g.jsxs(Qt,{to:"/",className:"flex items-center gap-2 text-c4a-text-primary",children:[g.jsx("span",{className:"font-mono text-lg font-bold text-c4a-accent",children:"C4A"}),g.jsx("span",{className:"hidden font-mono text-sm font-semibold uppercase tracking-tight md:inline",children:"Context4AI"})]})]}),g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx(Kc,{}),g.jsx(Qt,{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")})]})]})})}const ag=l=>Symbol.iterator in l,ng=l=>"entries"in l,lg=(l,i)=>{const r=l instanceof Map?l:new Map(l.entries()),s=i instanceof Map?i:new Map(i.entries());if(r.size!==s.size)return!1;for(const[u,f]of r)if(!s.has(u)||!Object.is(f,s.get(u)))return!1;return!0},w2=(l,i)=>{const r=l[Symbol.iterator](),s=i[Symbol.iterator]();let u=r.next(),f=s.next();for(;!u.done&&!f.done;){if(!Object.is(u.value,f.value))return!1;u=r.next(),f=s.next()}return!!u.done&&!!f.done};function R2(l,i){return Object.is(l,i)?!0:typeof l!="object"||l===null||typeof i!="object"||i===null||Object.getPrototypeOf(l)!==Object.getPrototypeOf(i)?!1:ag(l)&&ag(i)?ng(l)&&ng(i)?lg(l,i):w2(l,i):lg({entries:()=>Object.entries(l)},{entries:()=>Object.entries(i)})}function no(l){const i=Fl.useRef(void 0);return r=>{const s=l(r);return R2(i.current,s)?i.current:i.current=s}}const ry="lib_cloud_default",Aa=ao((l,i)=>({libraries:[],loading:!1,error:null,fetchLibraries:async()=>{l({loading:!0,error:null});try{const r=await Xt.get("/libraries");l({libraries:r,loading:!1})}catch(r){l({error:r instanceof Error?r.message:"Failed to load libraries",loading:!1})}},createLibrary:async r=>{const s=await Xt.post("/libraries",r);return l(u=>({libraries:[...u.libraries,s]})),s},deleteLibrary:async r=>{await Xt.delete(`/libraries/${r}`),l(s=>({libraries:s.libraries.filter(u=>u.id!==r)}))},updateLibraryName:async(r,s)=>{const u=await Xt.put(`/libraries/${r}`,{name:s});l(f=>({libraries:f.libraries.map(d=>d.id===r?u:d)}))},_updateLibraryOnline:(r,s)=>{l(u=>({libraries:u.libraries.map(f=>f.id===r?{...f,is_online:s}:f)}))},_refreshLibrary:async r=>{try{const s=await Xt.get(`/libraries/${r}`);l(u=>({libraries:u.libraries.map(f=>f.id===r?s:f)}))}catch{i().fetchLibraries()}}})),lo=l=>{const i=l.libraries.filter(s=>s.type==="cloud").sort((s,u)=>s.created_at.localeCompare(u.created_at)),r=l.libraries.filter(s=>s.type==="daemon").sort((s,u)=>s.name.localeCompare(u.name));return[...i,...r]};nn.on("ws:daemon:status",l=>{const i=l;i.lib_id&&Aa.getState()._updateLibraryOnline(i.lib_id,i.is_online)});nn.on("ws:daemon:connected",l=>{const i=l;i.lib_id&&Aa.getState()._updateLibraryOnline(i.lib_id,!0),Aa.getState().fetchLibraries()});nn.on("ws:library:updated",l=>{const i=l;Aa.getState()._refreshLibrary(i.library_id)});const sy="lib_cloud_default",C2=l=>`flex items-center gap-2 rounded px-3 py-2 font-mono text-xs uppercase tracking-tight transition-colors duration-150 ${l?"bg-c4a-bg-active text-c4a-accent":"text-c4a-text-secondary hover:bg-c4a-bg-hover hover:text-c4a-text-primary"}`,O2=[{to:"/studio/modeling",icon:pS,i18nKey:"studio.sidebar.modeling"},{to:"/studio/brain",icon:yS,i18nKey:"studio.sidebar.brain"},{to:"/studio/discovery",icon:FS,i18nKey:"studio.sidebar.discovery"},{to:"/studio/sharing",icon:e2,i18nKey:"studio.sidebar.sharing"},{to:"/studio/collaboration",icon:l2,i18nKey:"studio.sidebar.collaboration"},{to:"/studio/settings",icon:PS,i18nKey:"studio.sidebar.settings"}];function T2({state:l,onClose:i}){const{t:r}=Me(),s=S.useRef(null);S.useEffect(()=>{const f=d=>{s.current&&!s.current.contains(d.target)&&i()};return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[i]);const u=l.library.id===sy;return g.jsxs("div",{ref:s,className:"fixed z-50 min-w-[140px] rounded border border-c4a-border-default bg-c4a-bg-elevated py-1 shadow-lg",style:{top:l.y,left:l.x},children:[g.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:()=>{console.log("[stub] rename library",l.library.id),i()},children:r("sources.library.rename")}),!u&&g.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:()=>{console.log("[stub] delete library",l.library.id),i()},children:r("sources.actions.delete")})]})}function ig({onNavigate:l}){const{t:i}=Me(),r=_a(),s=sl(),u=Aa(no(lo)),f=r.pathname.startsWith("/studio/sources")||r.pathname.startsWith("/studio/source/"),[d,m]=S.useState(f),[y,p]=S.useState(null);S.useEffect(()=>{f&&m(!0)},[f]);const b=S.useCallback((_,C)=>{_.preventDefault(),p({x:_.clientX,y:_.clientY,library:C})},[]),v=S.useCallback(()=>p(null),[]),E=_=>_.id===sy?i("sources.library.default_cloud_name"):_.name;return g.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:[g.jsxs("nav",{className:"flex flex-col gap-1",children:[g.jsxs("div",{className:"group/sources",children:[g.jsxs("button",{onClick:()=>m(_=>!_),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 ${f?"text-c4a-accent":"text-c4a-text-secondary hover:text-c4a-text-primary"}`,children:[g.jsx(NS,{size:14}),i("studio.sidebar.sources"),g.jsx("span",{role:"button",tabIndex:0,onClick:_=>{_.stopPropagation(),s("/studio/sources/add-client"),l?.()},onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&(_.stopPropagation(),s("/studio/sources/add-client"),l?.())},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:g.jsx($S,{size:12})}),g.jsx("span",{className:"ml-auto shrink-0",children:d?g.jsx(ey,{size:12}):g.jsx(eo,{size:12})})]}),d&&g.jsx("div",{className:"mt-0.5 flex flex-col gap-0.5",children:u.map(_=>g.jsxs(cr,{to:`/studio/sources/${_.id}`,onClick:l,onContextMenu:C=>b(C,_),className:({isActive:C})=>`flex items-center gap-2 rounded py-1.5 pl-8 pr-3 font-mono text-xs tracking-tight transition-colors duration-150 ${C?"bg-c4a-bg-active text-c4a-accent":"text-c4a-text-secondary hover:bg-c4a-bg-hover hover:text-c4a-text-primary"}`,children:[g.jsx("span",{className:"truncate",children:E(_)}),_.type==="daemon"&&g.jsx("span",{className:`ml-auto h-2 w-2 shrink-0 rounded-full ${_.is_online?"bg-c4a-success":"bg-c4a-error"}`})]},_.id))})]}),O2.map(({to:_,icon:C,i18nKey:U})=>g.jsxs(cr,{to:_,onClick:l,className:({isActive:D})=>C2(D),children:[g.jsx(C,{size:14}),i(U)]},_))]}),y&&g.jsx(T2,{state:y,onClose:v})]})}function z2(){const[l,i]=S.useState(!1);return S.useEffect(()=>{Aa.getState().fetchLibraries(),ei.getState().fetchDaemonStatus()},[]),g.jsxs("div",{className:"flex min-h-screen flex-col",children:[g.jsx(j2,{onToggleSidebar:()=>i(!l)}),g.jsxs("div",{className:"flex flex-1",children:[g.jsx("div",{className:"hidden md:block",children:g.jsx(ig,{})}),l&&g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"fixed inset-0 top-14 z-30 bg-black/40 md:hidden",onClick:()=>i(!1)}),g.jsx("div",{className:"fixed bottom-0 left-0 top-14 z-30 md:hidden",children:g.jsx(ig,{onNavigate:()=>i(!1)})})]}),g.jsx("main",{className:"flex flex-1 flex-col overflow-x-hidden",children:g.jsx(Qg,{})})]}),g.jsx(iy,{})]})}function M2(){const{t:l}=Me();return g.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center py-20 text-center",children:[g.jsx("h1",{className:"font-mono text-4xl font-bold uppercase tracking-wide text-c4a-text-primary md:text-5xl",children:l("home.hero.title")}),g.jsx("p",{className:"mt-6 max-w-lg text-base text-c4a-text-secondary",children:l("home.hero.description")}),g.jsxs("div",{className:"mt-10 flex items-center gap-4",children:[g.jsxs(Qt,{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:[l("home.hero.cta.studio"),g.jsx(hS,{size:14})]}),g.jsx("a",{href:"https://github.com/anthropics/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:l("home.hero.cta.github")})]})]})}function pa({title:l,version:i,description:r}){const{t:s}=Me();return g.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:g.jsxs("div",{className:"max-w-md text-center",children:[g.jsx("h2",{className:"font-mono text-2xl font-bold uppercase text-c4a-text-primary",children:l}),i&&g.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})}),g.jsx("p",{className:"mt-4 text-sm text-c4a-text-secondary",children:r})]})})}function D2(){const{t:l}=Me();return g.jsx(pa,{title:l("page.login.title"),version:"0.5.0",description:l("page.login.description")})}function A2(){const{t:l}=Me();return g.jsx(pa,{title:l("page.docs.title"),version:"0.4.13",description:l("page.docs.description")})}function L2(){const{t:l}=Me();return g.jsxs("div",{className:"flex min-h-screen flex-col items-center justify-center bg-c4a-bg-base p-8 text-center",children:[g.jsx("h1",{className:"font-mono text-6xl font-bold text-c4a-accent",children:l("notfound.title")}),g.jsx("p",{className:"mt-4 text-base text-c4a-text-secondary",children:l("notfound.description")}),g.jsx(Qt,{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:l("notfound.back")})]})}function U2(){const{t:l}=Me();return g.jsx(pa,{title:l("page.modeling.title"),version:"0.4.16",description:l("page.modeling.description")})}function H2(){const{t:l}=Me();return g.jsx(pa,{title:l("page.brain.title"),version:"0.4.18",description:l("page.brain.description")})}function k2(){const{t:l}=Me();return g.jsx(pa,{title:l("page.discovery.title"),version:"0.6.x",description:l("page.discovery.description")})}function B2(){const{t:l}=Me();return g.jsx(pa,{title:l("page.sharing.title"),version:"0.4.39",description:l("page.sharing.description")})}function q2(){const{t:l}=Me();return g.jsx(pa,{title:l("page.collaboration.title"),version:"0.5.x",description:l("page.collaboration.description")})}function Y2(){const{t:l}=Me();return g.jsx(pa,{title:l("page.settings.title"),version:"0.5.x",description:l("page.settings.description")})}function V2(){const{t:l}=Me();return g.jsx(pa,{title:l("page.code_setup.title"),version:"0.4.13",description:l("page.code_setup.description")})}function G2(){const{t:l}=Me();return g.jsx(pa,{title:l("page.code_compile.title"),version:"0.4.13",description:l("page.code_compile.description")})}function K2(){const{t:l}=Me();return g.jsx(pa,{title:l("page.code_review.title"),version:"0.4.14",description:l("page.code_review.description")})}function X2(){const{t:l}=Me();return g.jsx(pa,{title:l("page.code_result.title"),version:"0.4.14",description:l("page.code_result.description")})}const lf=ao(l=>({sources:[],currentSource:null,loading:!1,error:null,total:0,limit:100,offset:0,filter:"all",fetchSources:async({library_id:i,parent_id:r,limit:s,offset:u})=>{l({loading:!0,error:null});try{const f={library_id:i};r!=null&&(f.parent_id=r),s!==void 0&&(f.limit=String(s)),u!==void 0&&(f.offset=String(u));const d=await Xt.get("/sources",f);l({sources:d.items,total:d.total,limit:d.limit,offset:d.offset,loading:!1})}catch(f){l({error:f instanceof Error?f.message:"Failed to load sources",loading:!1})}},fetchChildren:async i=>await Xt.get(`/sources/${i}/children`),fetchSource:async i=>{l({loading:!0,error:null});try{const r=await Xt.get(`/sources/${i}`);l({currentSource:r,loading:!1})}catch(r){l({error:r instanceof Error?r.message:"Failed to load source",loading:!1})}},createSource:async i=>await Xt.post("/sources",i),updateSource:async(i,r)=>{const s=await Xt.put(`/sources/${i}`,r);l(u=>({sources:u.sources.map(f=>f.id===i?s:f),currentSource:u.currentSource?.id===i?s:u.currentSource}))},deleteSource:async i=>{await Xt.delete(`/sources/${i}`),l(r=>({sources:r.sources.filter(s=>s.id!==i),currentSource:r.currentSource?.id===i?null:r.currentSource}))},setFilter:i=>l({filter:i}),clearSources:()=>l({sources:[],currentSource:null,total:0,offset:0})}));function oy({segments:l}){const{t:i}=Me(),r=[{label:i("sources.breadcrumb.sources"),to:"/studio/sources"},...l],s=r.length>4?[r[0],{label:"..."},r[r.length-2],r[r.length-1]]:r;return g.jsx("nav",{className:"flex items-center gap-1 font-mono text-xs text-c4a-text-muted",children:s.map((u,f)=>{const d=f===s.length-1;return g.jsxs("span",{className:"flex items-center gap-1",children:[f>0&&g.jsx(eo,{size:12,className:"text-c4a-text-muted"}),u.to&&!d?g.jsx(Qt,{to:u.to,className:"transition-colors hover:text-c4a-text-primary",children:u.label}):g.jsx("span",{className:d?"text-c4a-text-primary":"",children:u.label})]},f)})})}const Q2=["all","indexed","not_indexed"];function Z2({value:l,onChange:i}){const{t:r}=Me(),s={all:r("sources.filter.all"),indexed:r("sources.filter.indexed"),not_indexed:r("sources.filter.not_indexed")};return g.jsx("select",{value:l,onChange:u=>i(u.target.value),className:"rounded border border-c4a-border-default bg-c4a-bg-surface px-2 py-1 font-mono text-xs text-c4a-text-secondary outline-none transition-colors hover:border-c4a-border-strong focus:border-c4a-accent",children:Q2.map(u=>g.jsx("option",{value:u,children:s[u]},u))})}function $2({source:l,isDaemonLibrary:i}){return l.kind==="folder"?i?g.jsx(zS,{size:16,className:"shrink-0 text-c4a-text-muted"}):g.jsx(fr,{size:16,className:"shrink-0 text-c4a-text-muted"}):l.source_type==="code"?g.jsx(nf,{size:16,className:"shrink-0 text-c4a-accent"}):g.jsx(af,{size:16,className:"shrink-0 text-c4a-text-secondary"})}function rg({status:l}){const{t:i}=Me(),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 g.jsx("span",{className:`rounded px-1.5 py-0.5 font-mono text-[10px] uppercase ${r[l]}`,children:i(s[l])})}function J2({type:l}){const{t:i}=Me(),r=l==="code"?"sources.type.code":"sources.type.doc";return g.jsx("span",{className:"font-mono text-[10px] uppercase text-c4a-text-muted",children:i(r)})}function F2({source:l,childCount:i,isDaemonLibrary:r,isRepoRoot:s,onClick:u,onRename:f,onMoveTo:d,onDelete:m}){const{t:y}=Me(),[p,b]=S.useState(!1),v=S.useRef(null);S.useEffect(()=>{if(!p)return;const K=B=>{v.current&&!v.current.contains(B.target)&&b(!1)};return document.addEventListener("mousedown",K),()=>document.removeEventListener("mousedown",K)},[p]);const E=S.useCallback(K=>{K.preventDefault(),b(!0)},[]),_=!s&&f,C=l.kind==="source"&&!s&&d,U=m,D=_||C||U;return g.jsxs("div",{className:"group flex items-center gap-3 rounded px-3 py-2 transition-colors hover:bg-c4a-bg-hover cursor-pointer",onClick:u,onContextMenu:E,children:[g.jsx($2,{source:l,isDaemonLibrary:r??!1}),g.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-c4a-text-primary",children:l.name}),g.jsxs("div",{className:"hidden items-center gap-2 md:flex",children:[l.kind==="folder"&&i!==void 0&&g.jsx("span",{className:"font-mono text-xs text-c4a-text-muted",children:y("common.items",{count:i})}),l.kind==="source"&&g.jsxs(g.Fragment,{children:[g.jsx(rg,{status:l.index_status}),l.source_type&&g.jsx(J2,{type:l.source_type})]})]}),g.jsx("div",{className:"flex items-center gap-2 md:hidden",children:l.kind==="source"&&g.jsx(rg,{status:l.index_status})}),D&&g.jsxs("div",{className:"relative",ref:v,children:[g.jsx("button",{onClick:K=>{K.stopPropagation(),b(B=>!B)},className:"rounded p-1 text-c4a-text-muted opacity-0 transition-opacity hover:bg-c4a-bg-active hover:text-c4a-text-primary group-hover:opacity-100",children:g.jsx(CS,{size:14})}),p&&g.jsxs("div",{className:"absolute right-0 top-full z-50 mt-1 min-w-[140px] rounded border border-c4a-border-default bg-c4a-bg-elevated py-1 shadow-lg",children:[_&&g.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:K=>{K.stopPropagation(),b(!1);const B=prompt(y("sources.library.rename_placeholder"),l.name);B&&B!==l.name&&f(B)},children:y("sources.actions.rename")}),C&&g.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:K=>{K.stopPropagation(),b(!1),d()},children:y("sources.actions.move_to")}),U&&g.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:K=>{K.stopPropagation(),b(!1),m()},children:y("sources.actions.delete")})]})]})]})}function W2({currentName:l,onConfirm:i,onCancel:r,error:s}){const[u,f]=S.useState(l),d=S.useRef(null);S.useEffect(()=>{d.current?.select()},[]);const m=S.useCallback(()=>{const p=u.trim();p&&p!==l?i(p):r()},[u,l,i,r]),y=S.useCallback(p=>{p.key==="Enter"?(p.preventDefault(),m()):p.key==="Escape"&&r()},[m,r]);return g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx("input",{ref:d,value:u,onChange:p=>f(p.target.value),onKeyDown:y,onBlur:m,className:"min-w-0 flex-1 rounded border border-c4a-accent bg-c4a-bg-surface px-2 py-1 text-sm text-c4a-text-primary outline-none",autoFocus:!0}),g.jsx("button",{onClick:p=>{p.stopPropagation(),m()},className:"rounded p-0.5 text-c4a-success hover:bg-c4a-bg-hover",children:g.jsx(Ig,{size:14})}),g.jsx("button",{onClick:p=>{p.stopPropagation(),r()},className:"rounded p-0.5 text-c4a-error hover:bg-c4a-bg-hover",children:g.jsx(ay,{size:14})}),s&&g.jsx("span",{className:"ml-1 text-xs text-c4a-error",children:s})]})}function P2({target:l,onConfirm:i,onCancel:r}){const{t:s}=Me(),u=S.useRef(null);S.useEffect(()=>{const d=m=>{m.key==="Escape"&&r()};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[r]);const f=S.useCallback(d=>{u.current&&!u.current.contains(d.target)&&r()},[r]);return g.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:f,children:g.jsxs("div",{ref:u,className:"mx-4 w-full max-w-md rounded border border-c4a-border-default bg-c4a-bg-elevated p-6 shadow-c4a-lg",children:[g.jsx("h3",{className:"font-mono text-sm font-bold uppercase text-c4a-text-primary",children:s("sources.delete.confirm_title")}),g.jsxs("div",{className:"mt-4 space-y-3 text-sm text-c4a-text-secondary",children:[l.type==="resource"&&g.jsxs(g.Fragment,{children:[g.jsx("p",{children:s("sources.delete.resource",{name:l.name})}),g.jsx("p",{children:s("sources.delete.resource_impact")}),g.jsx("p",{className:"text-c4a-warning",children:s("sources.delete.session_warning")}),g.jsx("p",{children:s("sources.delete.entity_safe")})]}),l.type==="folder"&&g.jsxs(g.Fragment,{children:[g.jsx("p",{children:s("sources.delete.folder",{name:l.name})}),g.jsx("p",{children:s("sources.delete.folder_impact",{folders:l.folderCount??"?",sources:l.sourceCount??"?"})}),g.jsx("p",{className:"text-c4a-warning",children:s("sources.delete.irreversible")})]}),l.type==="repo"&&g.jsxs(g.Fragment,{children:[g.jsx("p",{children:s("sources.delete.repo",{name:l.name,library:l.libraryName})}),g.jsx("p",{children:s("sources.delete.repo_impact",{packages:l.packageCount??"?",docs:l.docCount??"?"})}),g.jsx("p",{children:s("sources.delete.local_safe")}),g.jsx("p",{children:s("sources.delete.entity_safe")})]}),l.type==="client"&&g.jsxs(g.Fragment,{children:[g.jsx("p",{children:s("sources.delete.client",{name:l.name})}),g.jsx("p",{children:s("sources.delete.client_impact")}),g.jsx("p",{children:s("sources.delete.local_safe")}),g.jsx("p",{children:s("sources.delete.entity_safe")}),g.jsx("p",{className:"text-c4a-warning",children:s("sources.delete.irreversible")}),g.jsx("p",{className:"text-c4a-text-muted",children:s("sources.delete.client_reregister")})]})]}),g.jsxs("div",{className:"mt-6 flex justify-end gap-2",children:[g.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")}),g.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")})]})]})})}function I2({libraryId:l,currentParentId:i,sourceId:r,onConfirm:s,onCancel:u,error:f}){const{t:d}=Me(),m=S.useRef(null),[y,p]=S.useState(null),[b,v]=S.useState([]),[E,_]=S.useState(!0);S.useEffect(()=>{const B=$=>{$.key==="Escape"&&u()};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[u]),S.useEffect(()=>{C()},[l]);const C=async()=>{try{const $=(await Xt.get("/sources",{library_id:l,kind:"folder",limit:"500"})).items.filter(ie=>ie.id!==r),te=$.filter(ie=>ie.parent_id===null).map(ie=>U(ie,$));v(te)}catch{}finally{_(!1)}},U=(B,$)=>{const te=$.filter(ie=>ie.parent_id===B.id).map(ie=>U(ie,$));return{id:B.id,name:B.name,children:te,expanded:!1,loaded:!0}},D=S.useCallback(B=>{v($=>cy($,B))},[]),K=S.useCallback(B=>{m.current&&!m.current.contains(B.target)&&u()},[u]);return g.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:K,children:g.jsxs("div",{ref:m,className:"mx-4 w-full max-w-sm rounded border border-c4a-border-default bg-c4a-bg-elevated p-6 shadow-c4a-lg",children:[g.jsx("h3",{className:"font-mono text-sm font-bold uppercase text-c4a-text-primary",children:d("sources.actions.move_to")}),g.jsx("div",{className:"mt-4 max-h-60 overflow-y-auto",children:E?g.jsx("p",{className:"text-xs text-c4a-text-muted",children:"Loading..."}):g.jsxs(g.Fragment,{children:[g.jsxs("button",{onClick:()=>p(null),className:`flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-sm ${y===null?"bg-c4a-accent/10 text-c4a-accent":"text-c4a-text-secondary hover:bg-c4a-bg-hover"} ${i===null?"opacity-40 pointer-events-none":""}`,children:[g.jsx(fr,{size:14}),"/ (",d("sources.breadcrumb.sources"),")"]}),b.map(B=>g.jsx(uy,{node:B,depth:1,selected:y,currentParentId:i,onSelect:p,onToggle:D},B.id))]})}),f&&g.jsx("p",{className:"mt-2 text-xs text-c4a-error",children:f}),g.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[g.jsx("button",{onClick:u,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:d("common.cancel")}),g.jsx("button",{onClick:()=>s(y),className:"rounded bg-c4a-accent px-3 py-1.5 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover",children:d("common.confirm")})]})]})})}function uy({node:l,depth:i,selected:r,currentParentId:s,onSelect:u,onToggle:f}){const d=l.id===s,m=r===l.id,y=l.children.length>0;return g.jsxs("div",{children:[g.jsxs("button",{onClick:()=>{d||u(l.id)},className:`flex w-full items-center gap-1 rounded px-2 py-1.5 text-left text-sm ${m?"bg-c4a-accent/10 text-c4a-accent":"text-c4a-text-secondary hover:bg-c4a-bg-hover"} ${d?"opacity-40 pointer-events-none":""}`,style:{paddingLeft:`${i*16+8}px`},children:[y?g.jsx("span",{onClick:p=>{p.stopPropagation(),f(l.id)},className:"shrink-0",children:l.expanded?g.jsx(ey,{size:12}):g.jsx(eo,{size:12})}):g.jsx("span",{className:"w-3 shrink-0"}),g.jsx(fr,{size:14,className:"shrink-0"}),g.jsx("span",{className:"truncate",children:l.name})]}),l.expanded&&l.children.map(p=>g.jsx(uy,{node:p,depth:i+1,selected:r,currentParentId:s,onSelect:u,onToggle:f},p.id))]})}function cy(l,i){return l.map(r=>r.id===i?{...r,expanded:!r.expanded}:r.children.length>0?{...r,children:cy(r.children,i)}:r)}function e4({onConfirm:l,onCancel:i}){return g.jsxs("div",{className:"flex items-center gap-3 rounded bg-c4a-bg-hover px-3 py-2",children:[g.jsx(ty,{size:16,className:"shrink-0 text-c4a-accent"}),g.jsx(W2,{currentName:"",onConfirm:l,onCancel:i})]})}function t4({library:l,onNewFolder:i,onImportRepo:r}){const{t:s}=Me(),u=l.type==="daemon";return g.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:g.jsxs("div",{className:"max-w-md text-center",children:[g.jsx("h3",{className:"font-mono text-lg font-bold uppercase text-c4a-text-primary",children:s(u?"sources.empty.daemon.title":"sources.empty.cloud.title")}),g.jsx("p",{className:"mt-3 text-sm text-c4a-text-secondary",children:s(u?"sources.empty.daemon.description":"sources.empty.cloud.description")}),g.jsx("div",{className:"mt-6 flex justify-center gap-3",children:u&&r?g.jsx("button",{onClick:r,disabled:!l.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:s("sources.actions.import_repo")}):g.jsx("button",{onClick:i,className:"rounded bg-c4a-accent px-4 py-2 font-mono text-xs uppercase text-white transition-colors hover:bg-c4a-accent-hover",children:s("sources.actions.new_folder")})}),u&&g.jsxs("p",{className:"mt-6 flex items-start gap-2 text-left text-xs text-c4a-text-muted",children:[g.jsx(to,{size:14,className:"mt-0.5 shrink-0 text-c4a-info"}),s("sources.safety.notice")]})]})})}function a4(){const{t:l}=Me();return g.jsxs("div",{className:"rounded border border-c4a-border-subtle bg-c4a-bg-surface p-6 text-center",children:[g.jsx("h4",{className:"font-mono text-sm font-bold text-c4a-text-primary",children:l("sources.empty.indexed.title")}),g.jsx("p",{className:"mt-2 text-xs text-c4a-text-secondary",children:l("sources.empty.indexed.description")})]})}function n4(){const{t:l}=Me(),i=sl(),{libId:r}=Wc(),[s,u]=eS(),f=s.get("path")||null,m=Aa(no(lo)).find(se=>se.id===r),{sources:y,loading:p,filter:b,fetchSources:v,fetchChildren:E,createSource:_,updateSource:C,deleteSource:U,setFilter:D}=lf(),[K,B]=S.useState(!1),[$,te]=S.useState(null),[ie,he]=S.useState(null),[ae,z]=S.useState(null),[le,re]=S.useState(null),[ye,Z]=S.useState({}),[we,me]=S.useState([]);S.useEffect(()=>{r&&v({library_id:r,parent_id:f})},[r,f,v]),S.useEffect(()=>{if(!f){me([]);return}(async()=>{const se=[];let ze=f;for(;ze;)try{const st=await fetch(`/api/v1/sources/${ze}`);if(!st.ok)break;const Na=await st.json();se.unshift(Na),ze=Na.parent_id}catch{break}me(se)})()},[f]),S.useEffect(()=>{y.filter(ze=>ze.kind==="folder").forEach(async ze=>{try{const st=await E(ze.id);Z(Na=>({...Na,[ze.id]:st.length}))}catch{}})},[y,E]);const pe=S.useMemo(()=>{const se=[...y].sort((ze,st)=>ze.kind!==st.kind?ze.kind==="folder"?-1:1:ze.name.localeCompare(st.name));return b==="all"?se:se.filter(ze=>ze.kind==="folder"?!0:b==="indexed"?ze.index_status==="indexed":ze.index_status==="none")},[y,b]),M=m?.type==="daemon",Q=M&&f!==null,ne=S.useMemo(()=>{if(!m)return[];const se=[{label:m.id===ry?l("sources.library.default_cloud_name"):m.name,to:`/studio/sources/${m.id}`}];return we.forEach(ze=>{se.push({label:ze.name,to:`/studio/sources/${m.id}?path=${ze.id}`})}),se},[m,we,l]),P=S.useCallback(async se=>{if(r)try{await _({library_id:r,parent_id:f,kind:"folder",name:se}),B(!1),v({library_id:r,parent_id:f})}catch(ze){ze instanceof Ks&&ze.status===409&&alert(l("sources.error.name_conflict",{name:se}))}},[r,f,_,v,l]),Ee=S.useCallback(se=>{se.kind==="folder"?u({path:se.id}):i(`/studio/source/${se.id}`)},[i,u]),j=S.useCallback(async(se,ze)=>{try{await C(se.id,{name:ze}),v({library_id:r,parent_id:f})}catch(st){st instanceof Ks&&st.status===409&&alert(l("sources.error.name_conflict",{name:ze}))}},[r,f,C,v,l]),Y=S.useCallback(se=>{if(he(se.id),se.kind==="folder"){const ze=se.parent_id===null;if(M&&ze)te({type:"repo",name:se.name,libraryName:m.name});else{const st=ye[se.id];te({type:"folder",name:se.name,...st!==void 0?{folderCount:st}:{}})}}else te({type:"resource",name:se.name})},[M,m,ye]),F=S.useCallback(async()=>{if(!(!ie||!r))try{await U(ie),te(null),he(null),v({library_id:r,parent_id:f})}catch{}},[ie,r,f,U,v]),ee=S.useCallback(async se=>{if(!(!ae||!r))try{await C(ae.id,{parent_id:se}),z(null),re(null),v({library_id:r,parent_id:f})}catch(ze){ze instanceof Ks&&ze.status===409&&re(l("sources.error.name_conflict",{name:ae.name}))}},[ae,r,f,C,v,l]),be=S.useCallback(()=>{r&&i(`/studio/sources/import/${r}`)},[r,i]);if(!m)return g.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:g.jsx("p",{className:"text-sm text-c4a-text-muted",children:"Loading..."})});const _e=M,Te=y.length===0&&b==="all"&&!p&&!f,rt=pe.filter(se=>se.kind==="source").length===0&&b==="indexed"&&!p;return g.jsxs("div",{className:"flex flex-1 flex-col p-4 md:p-6",children:[g.jsx(oy,{segments:ne}),g.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:[g.jsxs("button",{onClick:()=>B(!0),className:"flex items-center gap-1.5 rounded border border-c4a-border-default px-3 py-1.5 font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary",children:[g.jsx(ty,{size:14}),l("sources.actions.new_folder")]}),_e&&g.jsxs("button",{onClick:be,disabled:!m.is_online,title:m.is_online?void 0:l("sources.import.daemon_offline",{name:m.name}),className:"flex items-center gap-1.5 rounded border border-c4a-border-default px-3 py-1.5 font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary disabled:cursor-not-allowed disabled:opacity-40",children:[g.jsx(wS,{size:14}),l("sources.actions.import_repo")]}),g.jsx("div",{className:"ml-auto",children:g.jsx(Z2,{value:b,onChange:D})})]}),Te?g.jsx(t4,{library:m,onNewFolder:()=>B(!0),..._e?{onImportRepo:be}:{}}):g.jsxs("div",{className:"mt-4 flex flex-col gap-0.5",children:[K&&g.jsx(e4,{onConfirm:P,onCancel:()=>B(!1)}),p?g.jsx("p",{className:"py-8 text-center text-xs text-c4a-text-muted",children:"Loading..."}):pe.length===0?rt?g.jsx(a4,{}):g.jsx("p",{className:"py-8 text-center text-xs text-c4a-text-muted",children:l("common.items",{count:0})}):pe.map(se=>{const ze=M&&se.parent_id===null&&se.kind==="folder";return g.jsx(F2,{source:se,...ye[se.id]!==void 0?{childCount:ye[se.id]}:{},isDaemonLibrary:M??!1,isRepoRoot:ze,onClick:()=>Ee(se),...Q?{}:{onRename:st=>j(se,st)},...se.kind==="source"&&!Q?{onMoveTo:()=>z(se)}:{},onDelete:()=>Y(se)},se.id)})]}),$&&g.jsx(P2,{target:$,onConfirm:F,onCancel:()=>{te(null),he(null)}}),ae&&r&&g.jsx(I2,{libraryId:r,currentParentId:ae.parent_id,sourceId:ae.id,onConfirm:ee,onCancel:()=>{z(null),re(null)},error:le})]})}function l4({rpc:l,selectedPath:i,onSelect:r}){const{t:s}=Me(),[u,f]=S.useState("/"),[d,m]=S.useState([]),[y,p]=S.useState(!1),[b,v]=S.useState(null),E=S.useCallback(async D=>{p(!0),v(null);try{const K=await l("fs/listTree",{path:D,depth:2});m(K.entries||[]),f(D)}catch(K){v(String(K))}finally{p(!1)}},[l]);S.useEffect(()=>{E("/")},[E]);const _=S.useCallback(D=>{D.type==="directory"&&(D.is_git_repo?r(D.path,D.name):E(D.path))},[r,E]),C=S.useCallback(()=>{const D=u.split("/").slice(0,-1).join("/")||"/";E(D)},[u,E]),U=i&&d.find(D=>D.path===i&&!D.is_git_repo);return g.jsxs("div",{className:"rounded border border-c4a-border-default bg-c4a-bg-surface p-4",children:[g.jsx("h3",{className:"font-mono text-sm font-bold text-c4a-text-primary",children:s("sources.import.select_root")}),g.jsxs("p",{className:"mt-2 font-mono text-xs text-c4a-text-muted",children:[s("sources.import.current_path"),": ",u]}),y?g.jsxs("div",{className:"flex items-center gap-2 py-8",children:[g.jsx(Il,{size:14,className:"animate-spin text-c4a-text-muted"}),g.jsx("span",{className:"text-xs text-c4a-text-muted",children:"Loading..."})]}):b?g.jsx("p",{className:"py-4 text-xs text-c4a-error",children:b}):g.jsxs("div",{className:"mt-3 max-h-80 overflow-y-auto",children:[u!=="/"&&g.jsxs("button",{onClick:C,className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-sm text-c4a-text-secondary hover:bg-c4a-bg-hover",children:[g.jsx(fr,{size:14}),g.jsx("span",{children:".."})]}),d.filter(D=>D.type==="directory").sort((D,K)=>D.name.localeCompare(K.name)).map(D=>g.jsxs("button",{onClick:()=>_(D),className:`flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-sm transition-colors ${i===D.path?"bg-c4a-accent/10 text-c4a-accent":"text-c4a-text-secondary hover:bg-c4a-bg-hover"}`,children:[g.jsx(fr,{size:14,className:"shrink-0"}),g.jsx("span",{className:"flex-1 truncate",children:D.name}),D.is_git_repo&&g.jsxs("span",{className:"flex items-center gap-1 rounded bg-c4a-bg-active px-1.5 py-0.5 font-mono text-[10px] text-c4a-text-muted",children:[g.jsx(LS,{size:10}),"Git"]}),!D.is_git_repo&&g.jsx(eo,{size:12,className:"shrink-0 text-c4a-text-muted"})]},D.path)),d.filter(D=>D.type==="directory").length===0&&g.jsx("p",{className:"py-4 text-center text-xs text-c4a-text-muted",children:"No directories found"})]}),U&&g.jsx("p",{className:"mt-3 text-xs text-c4a-warning",children:s("sources.import.not_git")})]})}const i4=["package.json","pyproject.toml","go.mod","Cargo.toml","pom.xml","build.gradle"],r4=/\.md$/i;function s4({rpc:l,repoPath:i,onReady:r}){const{t:s}=Me(),[u,f]=S.useState(""),[d,m]=S.useState([]),[y,p]=S.useState(""),[b,v]=S.useState([]),[E,_]=S.useState(!1),[C,U]=S.useState(!0),[D,K]=S.useState(!1),[B,$]=S.useState([]),[te,ie]=S.useState([]),[,he]=S.useState([]),[ae,z]=S.useState([]);S.useEffect(()=>{(async()=>{U(!0);try{const Z=await l("fs/repoStatus",{path:i});f(Z.branch),m(Z.branches||[Z.branch]),p(Z.head_hash),_(Z.is_dirty),v(Z.commits||[{hash:Z.head_hash,message:"HEAD"}]),await le(Z.head_hash)}catch{}finally{U(!1)}})()},[i]);const le=S.useCallback(async Z=>{K(!0);try{const me=(await l("fs/repoTree",{path:i,hash:Z})).files||[];he(me);const pe=me.filter(P=>i4.some(Ee=>{const j=P.path.split("/");return j[j.length-1]===Ee})),M=me.filter(P=>r4.test(P.path)).filter(P=>P.path.split("/").length<=2).map(P=>P.path);ie(M);const Q=[],ne=[];await Promise.all(pe.map(async P=>{try{const Ee=await l("fs/readFile",{path:`${i}/${P.path}`});Q.push({path:P.path,content:Ee.content});const j=o4(P.path,Ee.content);ne.push({name:j||P.path,path:P.path.split("/").slice(0,-1).join("/")||".",isRoot:P.path.split("/").length===1||P.path==="package.json"})}catch{ne.push({name:P.path,path:P.path.split("/").slice(0,-1).join("/")||"."})}})),$(ne),z(Q),r({branch:u,commit:Z,isDirty:E,repoFiles:me,packages:ne,mdFiles:M,repoFileContents:Q})}catch{}finally{K(!1)}},[l,i,u,E,r]);S.useEffect(()=>{r({branch:u,commit:y,isDirty:E,packages:B,mdFiles:te,repoFileContents:ae})},[u,y,E]);const re=S.useCallback(async Z=>{f(Z);try{const we=await l("fs/repoStatus",{path:i});p(we.head_hash),await le(we.head_hash)}catch{}},[i,l,le]),ye=u&&u!=="main"&&u!=="master";return C?g.jsx("div",{className:"flex items-center justify-center py-12",children:g.jsx(Il,{size:20,className:"animate-spin text-c4a-text-muted"})}):g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"rounded border border-c4a-border-default bg-c4a-bg-surface p-4",children:[g.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[g.jsxs("div",{children:[g.jsx("span",{className:"font-mono text-xs text-c4a-text-muted",children:s("sources.detail.repo")}),g.jsx("p",{className:"mt-0.5 font-mono text-xs text-c4a-text-primary",children:i.split("/").pop()})]}),g.jsxs("div",{children:[g.jsx("span",{className:"font-mono text-xs text-c4a-text-muted",children:s("sources.import.current_path")}),g.jsx("p",{className:"mt-0.5 font-mono text-xs text-c4a-text-primary",children:i})]})]}),g.jsxs("div",{className:"mt-4 grid grid-cols-2 gap-4",children:[g.jsxs("div",{children:[g.jsx("label",{className:"font-mono text-xs text-c4a-text-muted",children:s("sources.import.branch")}),g.jsx("select",{value:u,onChange:Z=>re(Z.target.value),className:"mt-1 w-full rounded border border-c4a-border-default bg-c4a-bg-base px-2 py-1 font-mono text-xs text-c4a-text-primary outline-none focus:border-c4a-accent",children:d.map(Z=>g.jsx("option",{value:Z,children:Z},Z))})]}),g.jsxs("div",{children:[g.jsx("label",{className:"font-mono text-xs text-c4a-text-muted",children:s("sources.import.commit")}),g.jsx("select",{value:y,onChange:Z=>{p(Z.target.value),le(Z.target.value)},className:"mt-1 w-full rounded border border-c4a-border-default bg-c4a-bg-base px-2 py-1 font-mono text-xs text-c4a-text-primary outline-none focus:border-c4a-accent",children:b.map(Z=>g.jsxs("option",{value:Z.hash,children:[Z.hash.slice(0,7)," - ",Z.message.slice(0,60)]},Z.hash))})]})]}),g.jsxs("div",{className:"mt-3 space-y-1",children:[ye&&g.jsxs("p",{className:"flex items-center gap-1 text-xs text-c4a-info",children:[g.jsx(to,{size:12}),s("sources.import.branch_warning",{branch:u})]}),E&&g.jsxs("p",{className:"flex items-center gap-1 text-xs text-c4a-warning",children:[g.jsx(ES,{size:12}),s("sources.import.uncommitted_warning")]})]})]}),g.jsx("div",{className:"rounded border border-c4a-border-default bg-c4a-bg-surface p-4",children:D?g.jsxs("div",{className:"flex items-center gap-2 py-4",children:[g.jsx(Il,{size:14,className:"animate-spin text-c4a-text-muted"}),g.jsx("span",{className:"text-xs text-c4a-text-muted",children:"Analyzing repository..."})]}):g.jsxs(g.Fragment,{children:[g.jsx("p",{className:"font-mono text-xs text-c4a-text-primary",children:B.length>0?s("sources.import.recognized",{packages:B.length,docs:te.length}):s("sources.import.no_packages")}),B.length>0&&g.jsx("div",{className:"mt-3 space-y-1",children:B.map(Z=>g.jsxs("div",{className:"flex items-center gap-2 rounded px-2 py-1 text-xs",children:[g.jsx(nf,{size:14,className:"shrink-0 text-c4a-accent"}),g.jsx("span",{className:"text-c4a-text-primary",children:Z.name}),g.jsx("span",{className:"text-c4a-text-muted",children:Z.path}),Z.isRoot&&g.jsx("span",{className:"rounded bg-c4a-bg-active px-1 py-0.5 font-mono text-[10px] text-c4a-text-muted",children:"root"})]},Z.path))}),te.length>0&&g.jsx("div",{className:"mt-3 space-y-1",children:te.map(Z=>g.jsxs("div",{className:"flex items-center gap-2 rounded px-2 py-1 text-xs",children:[g.jsx(af,{size:14,className:"shrink-0 text-c4a-text-secondary"}),g.jsx("span",{className:"text-c4a-text-primary",children:Z})]},Z))})]})})]})}function o4(l,i){const r=l.split("/").pop()||"";try{if(r==="package.json")return JSON.parse(i).name||null;if(r==="go.mod")return i.match(/^module\s+(.+)$/m)?.[1]||null;if(r==="Cargo.toml")return i.match(/name\s*=\s*"([^"]+)"/)?.[1]||null;if(r==="pyproject.toml")return i.match(/name\s*=\s*"([^"]+)"/)?.[1]||null}catch{}return null}function u4({importState:l,importing:i}){const{t:r}=Me();return g.jsxs("div",{className:"rounded border border-c4a-border-default bg-c4a-bg-surface p-6",children:[g.jsx("p",{className:"text-sm text-c4a-text-secondary",children:r("sources.import.step.confirm")}),g.jsxs("div",{className:"mt-4 space-y-2 text-sm",children:[g.jsx(er,{label:r("sources.detail.repo"),value:l.repoName}),g.jsx(er,{label:r("sources.import.branch"),value:l.branch}),g.jsx(er,{label:r("sources.import.commit"),value:l.commit.slice(0,7)}),g.jsx(er,{label:"Packages",value:String(l.packages.length)}),g.jsx(er,{label:"Documents",value:String(l.mdFiles.length)})]}),g.jsxs("p",{className:"mt-6 flex items-start gap-2 text-xs text-c4a-text-muted",children:[g.jsx(to,{size:14,className:"mt-0.5 shrink-0 text-c4a-info"}),r("sources.safety.notice")]}),i&&g.jsx("div",{className:"mt-4 rounded bg-c4a-bg-base p-3 text-center",children:g.jsx("p",{className:"font-mono text-xs text-c4a-accent",children:r("sources.import.importing")})})]})}function er({label:l,value:i}){return g.jsxs("div",{className:"flex items-center gap-4",children:[g.jsx("span",{className:"w-24 font-mono text-xs text-c4a-text-muted",children:l}),g.jsx("span",{className:"font-mono text-xs text-c4a-text-primary",children:i})]})}function c4(){const{t:l}=Me(),i=sl(),{libId:r}=Wc(),u=Aa(no(lo)).find(B=>B.id===r),f=lf(B=>B.createSource),[d,m]=S.useState(1),[y,p]=S.useState(!1),[b,v]=S.useState({repoPath:"",repoName:"",branch:"",branches:[],commit:"",commits:[],isDirty:!1,repoFiles:[],packages:[],mdFiles:[],repoFileContents:[]}),E=u?.is_online??!1,_=S.useCallback(async(B,$)=>{if(!r)throw new Error("No library");const te=await Xt.post(`/libraries/${r}/rpc`,{method:B,params:$});if(te.error)throw te.error;return te.result??te},[r]),C=S.useCallback((B,$)=>{v(te=>({...te,repoPath:B,repoName:$}))},[]),U=S.useCallback(B=>{v($=>({...$,...B}))},[]),D=S.useCallback(async()=>{if(r){p(!0);try{await f({library_id:r,repo_name:b.repoName,repo_root_path:b.repoPath,repo_branch:b.branch,repo_commit:b.commit,repo_files:b.repoFiles.map(B=>B.path),repo_file_contents:b.repoFileContents}),i(`/studio/sources/${r}`)}catch{p(!1)}}},[r,b,f,i]),K=S.useMemo(()=>d===1?!!b.repoPath:d===2?b.repoFiles.length>0:!0,[d,b]);return u?g.jsxs("div",{className:"flex flex-1 flex-col p-4 md:p-6",children:[g.jsxs(Qt,{to:`/studio/sources/${r}`,className:"flex items-center gap-1 font-mono text-xs text-c4a-text-muted transition-colors hover:text-c4a-text-primary",children:[g.jsx(Pg,{size:14}),l("common.back")," ",u.name]}),g.jsx("h1",{className:"mt-4 font-mono text-xl font-bold uppercase text-c4a-text-primary",children:l("sources.import.title")}),g.jsxs("p",{className:"mt-3 flex items-start gap-2 text-xs text-c4a-text-muted",children:[g.jsx(to,{size:14,className:"mt-0.5 shrink-0 text-c4a-info"}),l("sources.safety.notice")]}),g.jsxs("div",{className:"mt-6 flex items-center gap-2 font-mono text-xs",children:[g.jsx(Ac,{active:d>=1,current:d===1}),g.jsx("span",{className:d===1?"text-c4a-accent":"text-c4a-text-muted",children:l("sources.import.step.select")}),g.jsx(sg,{}),g.jsx(Ac,{active:d>=2,current:d===2}),g.jsx("span",{className:d===2?"text-c4a-accent":"text-c4a-text-muted",children:l("sources.import.step.version")}),g.jsx(sg,{}),g.jsx(Ac,{active:d>=3,current:d===3}),g.jsx("span",{className:d===3?"text-c4a-accent":"text-c4a-text-muted",children:l("sources.import.step.confirm")})]}),g.jsx("div",{className:"mt-6 flex-1",children:E?g.jsxs(g.Fragment,{children:[d===1&&g.jsx(l4,{rpc:_,selectedPath:b.repoPath,onSelect:C}),d===2&&g.jsx(s4,{rpc:_,repoPath:b.repoPath,onReady:U}),d===3&&g.jsx(u4,{importState:b,libraryName:u.name,importing:y})]}):g.jsx(f4,{libraryName:u.name})}),E&&g.jsxs("div",{className:"mt-6 flex justify-end gap-2 border-t border-c4a-border-subtle pt-4",children:[d>1&&g.jsx("button",{onClick:()=>m(B=>B-1),disabled:y,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:l("common.previous")}),d<3?g.jsx("button",{onClick:()=>m(B=>B+1),disabled:!K,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:l("common.next")}):g.jsxs("button",{onClick:D,disabled:y,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&&g.jsx(Il,{size:12,className:"animate-spin"}),l(y?"sources.import.importing":"sources.import.step.confirm")]})]})]}):g.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:g.jsx("p",{className:"text-sm text-c4a-text-muted",children:"Loading..."})})}function Ac({active:l,current:i}){return g.jsx("span",{className:`inline-block h-2.5 w-2.5 rounded-full border-2 ${i?"border-c4a-accent bg-c4a-accent":l?"border-c4a-accent bg-transparent":"border-c4a-border-default bg-transparent"}`})}function sg(){return g.jsx("span",{className:"h-px w-6 bg-c4a-border-default"})}function f4({libraryName:l}){const{t:i}=Me();return g.jsxs("div",{className:"rounded border border-c4a-warning/30 bg-c4a-bg-surface p-6 text-center",children:[g.jsx("p",{className:"text-sm text-c4a-warning",children:i("sources.import.daemon_offline",{name:l})}),g.jsx(Qt,{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 d4(){const{t:l}=Me(),i=sl(),r=Aa(E=>E.createLibrary),[s,u]=S.useState("waiting"),[f,d]=S.useState(null),[m,y]=S.useState(""),[p,b]=S.useState(!1);S.useEffect(()=>nn.on("ws:daemon:connected",_=>{const C=_;d(C),y(C.machine_id),u(C.needs_registration?"new_client":"reconnected")}),[]);const v=S.useCallback(async()=>{if(f){b(!0);try{const E=await r({type:"daemon",name:m||f.machine_id,config:{machine_id:f.machine_id,os:f.os||"",daemon_version:f.daemon_version||""}});i(`/studio/sources/${E.id}`)}catch{b(!1)}}},[f,m,r,i]);return g.jsxs("div",{className:"flex flex-1 flex-col p-4 md:p-6",children:[g.jsxs(Qt,{to:"/studio/sources",className:"flex items-center gap-1 font-mono text-xs text-c4a-text-muted transition-colors hover:text-c4a-text-primary",children:[g.jsx(Pg,{size:14}),l("common.back")]}),g.jsx("h1",{className:"mt-4 font-mono text-xl font-bold uppercase text-c4a-text-primary",children:l("sources.add_client.title")}),g.jsx("p",{className:"mt-2 text-sm text-c4a-text-secondary",children:l("sources.add_client.description")}),g.jsx("div",{className:"mt-6 rounded border border-c4a-border-default bg-c4a-bg-surface p-5",children:g.jsxs("ol",{className:"space-y-4 text-sm text-c4a-text-secondary",children:[g.jsxs("li",{children:[g.jsxs("span",{className:"font-mono text-xs font-bold text-c4a-text-primary",children:["1. ",l("sources.add_client.step1")]}),g.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"})]}),g.jsxs("li",{children:[g.jsxs("span",{className:"font-mono text-xs font-bold text-c4a-text-primary",children:["2. ",l("sources.add_client.step2")]}),g.jsx("pre",{className:"mt-1 rounded bg-c4a-bg-base px-3 py-2 font-mono text-xs text-c4a-accent",children:"c4a-daemon --allow ./your-project"}),g.jsx("p",{className:"mt-1 text-xs text-c4a-text-muted",children:"# c4a-daemon --server example.com --allow ."})]}),g.jsxs("li",{children:[g.jsxs("span",{className:"font-mono text-xs font-bold text-c4a-text-primary",children:["3. ",l("sources.add_client.step3")]}),g.jsx("p",{className:"mt-1 text-xs text-c4a-text-muted",children:l("sources.add_client.step3_desc")})]})]})}),g.jsxs("div",{className:"mt-6 rounded border border-c4a-border-default bg-c4a-bg-surface p-5",children:[s==="waiting"&&g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx(Il,{size:16,className:"animate-spin text-c4a-text-muted"}),g.jsx("span",{className:"text-sm text-c4a-text-muted",children:l("sources.add_client.waiting")})]}),s==="new_client"&&f&&g.jsxs("div",{className:"space-y-4",children:[g.jsx("h3",{className:"font-mono text-sm font-bold text-c4a-text-primary",children:l("sources.add_client.detected")}),g.jsxs("div",{className:"space-y-2 text-sm",children:[g.jsx(Lc,{label:l("sources.add_client.machine_name"),value:f.machine_id}),f.os&&g.jsx(Lc,{label:l("sources.add_client.os"),value:f.os}),f.daemon_version&&g.jsx(Lc,{label:l("sources.add_client.daemon_version"),value:f.daemon_version})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"w-32 font-mono text-xs text-c4a-text-muted",children:l("sources.add_client.client_name")}),g.jsx("input",{value:m,onChange:E=>y(E.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"})]}),g.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[g.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:l("common.cancel")}),g.jsxs("button",{onClick:v,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&&g.jsx(Il,{size:12,className:"animate-spin"}),l("sources.add_client.confirm")]})]})]}),s==="reconnected"&&f&&g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Ig,{size:16,className:"text-c4a-success"}),g.jsx("span",{className:"text-sm text-c4a-text-primary",children:l("sources.add_client.reconnected",{name:f.machine_id})})]}),f.lib_id&&g.jsx(Qt,{to:`/studio/sources/${f.lib_id}`,className:"inline-block rounded bg-c4a-accent px-3 py-1.5 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover",children:l("sources.add_client.go_to",{name:f.machine_id})})]})]})]})}function Lc({label:l,value:i}){return g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"w-32 font-mono text-xs text-c4a-text-muted",children:l}),g.jsx("span",{className:"font-mono text-xs text-c4a-text-primary",children:i})]})}function h4(){const{t:l}=Me(),{sourceUuid:i}=Wc(),{currentSource:r,loading:s,fetchSource:u}=lf(),f=Aa(no(lo)),[d,m]=S.useState("original"),[y,p]=S.useState([]);S.useEffect(()=>{i&&u(i)},[i,u]),S.useEffect(()=>{r&&(async()=>{const U=[];let D=r.parent_id;for(;D;)try{const K=await fetch(`/api/v1/sources/${D}`);if(!K.ok)break;const B=await K.json();U.unshift(B),D=B.parent_id}catch{break}p(U)})()},[r]);const b=f.find(U=>U.id===r?.library_id),v=r?.metadata?Object.fromEntries(Object.entries(r.metadata).map(([U,D])=>[U,String(D??"")])):null,E=r?.source_type==="code",_=S.useMemo(()=>{if(!r||!b)return[];const U=[{label:b.id===ry?l("sources.library.default_cloud_name"):b.name,to:`/studio/sources/${b.id}`}];return y.forEach(D=>{U.push({label:D.name,to:`/studio/sources/${b.id}?path=${D.id}`})}),U.push({label:r.name}),U},[r,b,y,l]),C=[{key:"original",label:l("sources.detail.tab.original")},{key:"digest",label:l("sources.detail.tab.digest")},{key:"modeling",label:l("sources.detail.tab.modeling")}];return s||!r?g.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:g.jsx("p",{className:"text-sm text-c4a-text-muted",children:"Loading..."})}):g.jsxs("div",{className:"flex flex-1 flex-col p-4 md:p-6",children:[g.jsx(oy,{segments:_}),g.jsxs("div",{className:"mt-4 flex items-center gap-2",children:[E?g.jsx(nf,{size:20,className:"text-c4a-accent"}):g.jsx(af,{size:20,className:"text-c4a-text-secondary"}),g.jsx("h1",{className:"font-mono text-xl font-bold text-c4a-text-primary",children:r.name})]}),g.jsxs("div",{className:"mt-2 flex flex-wrap gap-4 text-xs text-c4a-text-muted",children:[g.jsxs("span",{children:[l("sources.detail.type"),":"," ",g.jsx("span",{className:"text-c4a-text-secondary",children:r.source_type==="code"?l("sources.type.code"):l("sources.type.doc")})]}),g.jsxs("span",{children:[l("sources.detail.status"),":"," ",g.jsx("span",{className:"text-c4a-text-secondary",children:l(`sources.status.${r.index_status}`)})]})]}),E&&v&&g.jsx("div",{className:"mt-4 rounded border border-c4a-border-subtle bg-c4a-bg-surface p-4",children:g.jsxs("div",{className:"grid grid-cols-2 gap-x-8 gap-y-2 text-xs md:grid-cols-4",children:[v.repo_name&&g.jsx(qs,{label:l("sources.detail.repo"),value:v.repo_name}),v.pinned_branch&&g.jsx(qs,{label:l("sources.detail.branch"),value:v.pinned_branch}),v.pinned_hash&&g.jsx(qs,{label:l("sources.detail.commit"),value:v.pinned_hash.slice(0,7)}),v.tech_stack&&g.jsx(qs,{label:l("sources.detail.tech_stack"),value:v.tech_stack})]})}),g.jsx("div",{className:"mt-6 flex border-b border-c4a-border-subtle",children:C.map(U=>g.jsx("button",{onClick:()=>m(U.key),className:`border-b-2 px-4 py-2 font-mono text-xs uppercase transition-colors ${d===U.key?"border-c4a-accent text-c4a-accent":"border-transparent text-c4a-text-muted hover:text-c4a-text-secondary"}`,children:U.label},U.key))}),g.jsxs("div",{className:"mt-4 flex-1",children:[d==="original"&&g.jsx(m4,{source:r,isCode:E}),d==="digest"&&g.jsx(og,{message:l("sources.detail.digest_placeholder")}),d==="modeling"&&g.jsx(og,{message:l("sources.detail.modeling_placeholder")})]})]})}function qs({label:l,value:i}){return g.jsxs("div",{children:[g.jsx("span",{className:"text-c4a-text-muted",children:l}),g.jsx("p",{className:"mt-0.5 font-mono text-c4a-text-primary",children:i})]})}function m4({source:l,isCode:i}){const r=l.metadata;return i?g.jsxs("div",{className:"space-y-4 text-sm text-c4a-text-secondary",children:[!!r?.description&&g.jsx("p",{children:String(r.description)}),!!r?.dependencies&&g.jsxs("div",{children:[g.jsx("h4",{className:"font-mono text-xs font-bold uppercase text-c4a-text-primary",children:"Dependencies"}),g.jsx("div",{className:"mt-2 rounded bg-c4a-bg-surface p-3 font-mono text-xs",children:Object.entries(r.dependencies).map(([s,u])=>g.jsxs("div",{className:"flex justify-between py-0.5",children:[g.jsx("span",{className:"text-c4a-text-primary",children:s}),g.jsx("span",{className:"text-c4a-text-muted",children:u})]},s))})]}),!r?.description&&!r?.dependencies&&g.jsx("p",{className:"text-c4a-text-muted",children:"Package overview will be available after indexing."})]}):g.jsx("div",{className:"prose prose-invert max-w-none text-sm text-c4a-text-secondary",children:g.jsx("p",{className:"text-c4a-text-muted",children:"Document content will be available after upload."})})}function og({message:l}){return g.jsx("div",{className:"flex items-center justify-center rounded border border-dashed border-c4a-border-subtle p-12",children:g.jsx("p",{className:"text-center text-sm text-c4a-text-muted",children:l})})}const p4="lib_cloud_default",g4=$1([{element:g.jsx(N2,{}),children:[{path:"/",element:g.jsx(M2,{})},{path:"/login",element:g.jsx(D2,{})},{path:"/docs",element:g.jsx(A2,{})}]},{path:"/studio",element:g.jsx(z2,{}),children:[{index:!0,element:g.jsx($p,{to:"/studio/sources",replace:!0})},{path:"sources",element:g.jsx($p,{to:`/studio/sources/${p4}`,replace:!0})},{path:"sources/add-client",element:g.jsx(d4,{})},{path:"sources/import/:libId",element:g.jsx(c4,{})},{path:"sources/:libId",element:g.jsx(n4,{})},{path:"source/:sourceUuid",element:g.jsx(h4,{})},{path:"modeling",element:g.jsx(U2,{})},{path:"modeling/code/setup",element:g.jsx(V2,{})},{path:"modeling/code/compile",element:g.jsx(G2,{})},{path:"modeling/code/review",element:g.jsx(K2,{})},{path:"modeling/code/result",element:g.jsx(X2,{})},{path:"brain",element:g.jsx(H2,{})},{path:"discovery",element:g.jsx(k2,{})},{path:"sharing",element:g.jsx(B2,{})},{path:"collaboration",element:g.jsx(q2,{})},{path:"settings",element:g.jsx(Y2,{})}]},{path:"*",element:g.jsx(L2,{})}]);function y4(){return S.useEffect(()=>{const i=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`;return nn.connect(i),()=>{nn.disconnect()}},[]),g.jsx(b1,{router:g4})}A0.createRoot(document.getElementById("root")).render(g.jsx(S.StrictMode,{children:g.jsx(y4,{})}));