@dedenlabs/claude-code-router-cli 2.0.3 → 2.0.4

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.
@@ -0,0 +1,464 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>CCR UI</title>
7
+ <script type="module" crossorigin>function JS(t,a){for(var l=0;l<a.length;l++){const o=a[l];if(typeof o!="string"&&!Array.isArray(o)){for(const s in o)if(s!=="default"&&!(s in t)){const c=Object.getOwnPropertyDescriptor(o,s);c&&Object.defineProperty(t,s,c.get?c:{enumerable:!0,get:()=>o[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const c of s)if(c.type==="childList")for(const f of c.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function l(s){const c={};return s.integrity&&(c.integrity=s.integrity),s.referrerPolicy&&(c.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?c.credentials="include":s.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function o(s){if(s.ep)return;s.ep=!0;const c=l(s);fetch(s.href,c)}})();function Sx(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var hf={exports:{}},ci={};/**
8
+ * @license React
9
+ * react-jsx-runtime.production.js
10
+ *
11
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
12
+ *
13
+ * This source code is licensed under the MIT license found in the
14
+ * LICENSE file in the root directory of this source tree.
15
+ */var kv;function WS(){if(kv)return ci;kv=1;var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function l(o,s,c){var f=null;if(c!==void 0&&(f=""+c),s.key!==void 0&&(f=""+s.key),"key"in s){c={};for(var m in s)m!=="key"&&(c[m]=s[m])}else c=s;return s=c.ref,{$$typeof:t,type:o,key:f,ref:s!==void 0?s:null,props:c}}return ci.Fragment=a,ci.jsx=l,ci.jsxs=l,ci}var Dv;function ej(){return Dv||(Dv=1,hf.exports=WS()),hf.exports}var u=ej();const Ve=t=>typeof t=="string",ui=()=>{let t,a;const l=new Promise((o,s)=>{t=o,a=s});return l.resolve=t,l.reject=a,l},Lv=t=>t==null?"":""+t,tj=(t,a,l)=>{t.forEach(o=>{a[o]&&(l[o]=a[o])})},nj=/###/g,zv=t=>t&&t.indexOf("###")>-1?t.replace(nj,"."):t,Uv=t=>!t||Ve(t),wi=(t,a,l)=>{const o=Ve(a)?a.split("."):a;let s=0;for(;s<o.length-1;){if(Uv(t))return{};const c=zv(o[s]);!t[c]&&l&&(t[c]=new l),Object.prototype.hasOwnProperty.call(t,c)?t=t[c]:t={},++s}return Uv(t)?{}:{obj:t,k:zv(o[s])}},Pv=(t,a,l)=>{const{obj:o,k:s}=wi(t,a,Object);if(o!==void 0||a.length===1){o[s]=l;return}let c=a[a.length-1],f=a.slice(0,a.length-1),m=wi(t,f,Object);for(;m.obj===void 0&&f.length;)c=`${f[f.length-1]}.${c}`,f=f.slice(0,f.length-1),m=wi(t,f,Object),m?.obj&&typeof m.obj[`${m.k}.${c}`]<"u"&&(m.obj=void 0);m.obj[`${m.k}.${c}`]=l},aj=(t,a,l,o)=>{const{obj:s,k:c}=wi(t,a,Object);s[c]=s[c]||[],s[c].push(l)},Nc=(t,a)=>{const{obj:l,k:o}=wi(t,a);if(l&&Object.prototype.hasOwnProperty.call(l,o))return l[o]},rj=(t,a,l)=>{const o=Nc(t,l);return o!==void 0?o:Nc(a,l)},jx=(t,a,l)=>{for(const o in a)o!=="__proto__"&&o!=="constructor"&&(o in t?Ve(t[o])||t[o]instanceof String||Ve(a[o])||a[o]instanceof String?l&&(t[o]=a[o]):jx(t[o],a[o],l):t[o]=a[o]);return t},Pl=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var lj={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const oj=t=>Ve(t)?t.replace(/[&<>"'\/]/g,a=>lj[a]):t;class ij{constructor(a){this.capacity=a,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(a){const l=this.regExpMap.get(a);if(l!==void 0)return l;const o=new RegExp(a);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(a,o),this.regExpQueue.push(a),o}}const sj=[" ",",","?","!",";"],cj=new ij(20),uj=(t,a,l)=>{a=a||"",l=l||"";const o=sj.filter(f=>a.indexOf(f)<0&&l.indexOf(f)<0);if(o.length===0)return!0;const s=cj.getRegExp(`(${o.map(f=>f==="?"?"\\?":f).join("|")})`);let c=!s.test(t);if(!c){const f=t.indexOf(l);f>0&&!s.test(t.substring(0,f))&&(c=!0)}return c},Gf=(t,a,l=".")=>{if(!t)return;if(t[a])return Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;const o=a.split(l);let s=t;for(let c=0;c<o.length;){if(!s||typeof s!="object")return;let f,m="";for(let g=c;g<o.length;++g)if(g!==c&&(m+=l),m+=o[g],f=s[m],f!==void 0){if(["string","number","boolean"].indexOf(typeof f)>-1&&g<o.length-1)continue;c+=g-c+1;break}s=f}return s},Ni=t=>t?.replace("_","-"),dj={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,a){console?.[t]?.apply?.(console,a)}};class Cc{constructor(a,l={}){this.init(a,l)}init(a,l={}){this.prefix=l.prefix||"i18next:",this.logger=a||dj,this.options=l,this.debug=l.debug}log(...a){return this.forward(a,"log","",!0)}warn(...a){return this.forward(a,"warn","",!0)}error(...a){return this.forward(a,"error","")}deprecate(...a){return this.forward(a,"warn","WARNING DEPRECATED: ",!0)}forward(a,l,o,s){return s&&!this.debug?null:(Ve(a[0])&&(a[0]=`${o}${this.prefix} ${a[0]}`),this.logger[l](a))}create(a){return new Cc(this.logger,{prefix:`${this.prefix}:${a}:`,...this.options})}clone(a){return a=a||this.options,a.prefix=a.prefix||this.prefix,new Cc(this.logger,a)}}var ra=new Cc;class Hc{constructor(){this.observers={}}on(a,l){return a.split(" ").forEach(o=>{this.observers[o]||(this.observers[o]=new Map);const s=this.observers[o].get(l)||0;this.observers[o].set(l,s+1)}),this}off(a,l){if(this.observers[a]){if(!l){delete this.observers[a];return}this.observers[a].delete(l)}}emit(a,...l){this.observers[a]&&Array.from(this.observers[a].entries()).forEach(([s,c])=>{for(let f=0;f<c;f++)s(...l)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,c])=>{for(let f=0;f<c;f++)s.apply(s,[a,...l])})}}class Hv extends Hc{constructor(a,l={ns:["translation"],defaultNS:"translation"}){super(),this.data=a||{},this.options=l,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(a){this.options.ns.indexOf(a)<0&&this.options.ns.push(a)}removeNamespaces(a){const l=this.options.ns.indexOf(a);l>-1&&this.options.ns.splice(l,1)}getResource(a,l,o,s={}){const c=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,f=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let m;a.indexOf(".")>-1?m=a.split("."):(m=[a,l],o&&(Array.isArray(o)?m.push(...o):Ve(o)&&c?m.push(...o.split(c)):m.push(o)));const g=Nc(this.data,m);return!g&&!l&&!o&&a.indexOf(".")>-1&&(a=m[0],l=m[1],o=m.slice(2).join(".")),g||!f||!Ve(o)?g:Gf(this.data?.[a]?.[l],o,c)}addResource(a,l,o,s,c={silent:!1}){const f=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator;let m=[a,l];o&&(m=m.concat(f?o.split(f):o)),a.indexOf(".")>-1&&(m=a.split("."),s=l,l=m[1]),this.addNamespaces(l),Pv(this.data,m,s),c.silent||this.emit("added",a,l,o,s)}addResources(a,l,o,s={silent:!1}){for(const c in o)(Ve(o[c])||Array.isArray(o[c]))&&this.addResource(a,l,c,o[c],{silent:!0});s.silent||this.emit("added",a,l,o)}addResourceBundle(a,l,o,s,c,f={silent:!1,skipCopy:!1}){let m=[a,l];a.indexOf(".")>-1&&(m=a.split("."),s=o,o=l,l=m[1]),this.addNamespaces(l);let g=Nc(this.data,m)||{};f.skipCopy||(o=JSON.parse(JSON.stringify(o))),s?jx(g,o,c):g={...g,...o},Pv(this.data,m,g),f.silent||this.emit("added",a,l,o)}removeResourceBundle(a,l){this.hasResourceBundle(a,l)&&delete this.data[a][l],this.removeNamespaces(l),this.emit("removed",a,l)}hasResourceBundle(a,l){return this.getResource(a,l)!==void 0}getResourceBundle(a,l){return l||(l=this.options.defaultNS),this.getResource(a,l)}getDataByLanguage(a){return this.data[a]}hasLanguageSomeTranslations(a){const l=this.getDataByLanguage(a);return!!(l&&Object.keys(l)||[]).find(s=>l[s]&&Object.keys(l[s]).length>0)}toJSON(){return this.data}}var Nx={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,a,l,o,s){return t.forEach(c=>{a=this.processors[c]?.process(a,l,o,s)??a}),a}};const Bv={},$v=t=>!Ve(t)&&typeof t!="boolean"&&typeof t!="number";class Ec extends Hc{constructor(a,l={}){super(),tj(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],a,this),this.options=l,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ra.create("translator")}changeLanguage(a){a&&(this.language=a)}exists(a,l={interpolation:{}}){const o={...l};return a==null?!1:this.resolve(a,o)?.res!==void 0}extractFromKey(a,l){let o=l.nsSeparator!==void 0?l.nsSeparator:this.options.nsSeparator;o===void 0&&(o=":");const s=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator;let c=l.ns||this.options.defaultNS||[];const f=o&&a.indexOf(o)>-1,m=!this.options.userDefinedKeySeparator&&!l.keySeparator&&!this.options.userDefinedNsSeparator&&!l.nsSeparator&&!uj(a,o,s);if(f&&!m){const g=a.match(this.interpolator.nestingRegexp);if(g&&g.length>0)return{key:a,namespaces:Ve(c)?[c]:c};const h=a.split(o);(o!==s||o===s&&this.options.ns.indexOf(h[0])>-1)&&(c=h.shift()),a=h.join(s)}return{key:a,namespaces:Ve(c)?[c]:c}}translate(a,l,o){let s=typeof l=="object"?{...l}:l;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(s={...s}),s||(s={}),a==null)return"";Array.isArray(a)||(a=[String(a)]);const c=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,f=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:m,namespaces:g}=this.extractFromKey(a[a.length-1],s),h=g[g.length-1];let v=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;v===void 0&&(v=":");const x=s.lng||this.language,S=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(x?.toLowerCase()==="cimode")return S?c?{res:`${h}${v}${m}`,usedKey:m,exactUsedKey:m,usedLng:x,usedNS:h,usedParams:this.getUsedParamsDetails(s)}:`${h}${v}${m}`:c?{res:m,usedKey:m,exactUsedKey:m,usedLng:x,usedNS:h,usedParams:this.getUsedParamsDetails(s)}:m;const b=this.resolve(a,s);let j=b?.res;const C=b?.usedKey||m,_=b?.exactUsedKey||m,E=["[object Number]","[object Function]","[object RegExp]"],A=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,M=!this.i18nFormat||this.i18nFormat.handleAsObject,z=s.count!==void 0&&!Ve(s.count),D=Ec.hasDefaultValue(s),R=z?this.pluralResolver.getSuffix(x,s.count,s):"",P=s.ordinal&&z?this.pluralResolver.getSuffix(x,s.count,{ordinal:!1}):"",B=z&&!s.ordinal&&s.count===0,ne=B&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${R}`]||s[`defaultValue${P}`]||s.defaultValue;let re=j;M&&!j&&D&&(re=ne);const O=$v(re),q=Object.prototype.toString.apply(re);if(M&&re&&O&&E.indexOf(q)<0&&!(Ve(A)&&Array.isArray(re))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const ee=this.options.returnedObjectHandler?this.options.returnedObjectHandler(C,re,{...s,ns:g}):`key '${m} (${this.language})' returned an object instead of string.`;return c?(b.res=ee,b.usedParams=this.getUsedParamsDetails(s),b):ee}if(f){const ee=Array.isArray(re),V=ee?[]:{},ae=ee?_:C;for(const T in re)if(Object.prototype.hasOwnProperty.call(re,T)){const Z=`${ae}${f}${T}`;D&&!j?V[T]=this.translate(Z,{...s,defaultValue:$v(ne)?ne[T]:void 0,joinArrays:!1,ns:g}):V[T]=this.translate(Z,{...s,joinArrays:!1,ns:g}),V[T]===Z&&(V[T]=re[T])}j=V}}else if(M&&Ve(A)&&Array.isArray(j))j=j.join(A),j&&(j=this.extendTranslation(j,a,s,o));else{let ee=!1,V=!1;!this.isValidLookup(j)&&D&&(ee=!0,j=ne),this.isValidLookup(j)||(V=!0,j=m);const T=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&V?void 0:j,Z=D&&ne!==j&&this.options.updateMissing;if(V||ee||Z){if(this.logger.log(Z?"updateKey":"missingKey",x,h,m,Z?ne:j),f){const K=this.resolve(m,{...s,keySeparator:!1});K&&K.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let I=[];const be=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&be&&be[0])for(let K=0;K<be.length;K++)I.push(be[K]);else this.options.saveMissingTo==="all"?I=this.languageUtils.toResolveHierarchy(s.lng||this.language):I.push(s.lng||this.language);const k=(K,$,Q)=>{const ie=D&&Q!==j?Q:T;this.options.missingKeyHandler?this.options.missingKeyHandler(K,h,$,ie,Z,s):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(K,h,$,ie,Z,s),this.emit("missingKey",K,h,$,j)};this.options.saveMissing&&(this.options.saveMissingPlurals&&z?I.forEach(K=>{const $=this.pluralResolver.getSuffixes(K,s);B&&s[`defaultValue${this.options.pluralSeparator}zero`]&&$.indexOf(`${this.options.pluralSeparator}zero`)<0&&$.push(`${this.options.pluralSeparator}zero`),$.forEach(Q=>{k([K],m+Q,s[`defaultValue${Q}`]||ne)})}):k(I,m,ne))}j=this.extendTranslation(j,a,s,b,o),V&&j===m&&this.options.appendNamespaceToMissingKey&&(j=`${h}${v}${m}`),(V||ee)&&this.options.parseMissingKeyHandler&&(j=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${h}${v}${m}`:m,ee?j:void 0,s))}return c?(b.res=j,b.usedParams=this.getUsedParamsDetails(s),b):j}extendTranslation(a,l,o,s,c){if(this.i18nFormat?.parse)a=this.i18nFormat.parse(a,{...this.options.interpolation.defaultVariables,...o},o.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!o.skipInterpolation){o.interpolation&&this.interpolator.init({...o,interpolation:{...this.options.interpolation,...o.interpolation}});const g=Ve(a)&&(o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let h;if(g){const x=a.match(this.interpolator.nestingRegexp);h=x&&x.length}let v=o.replace&&!Ve(o.replace)?o.replace:o;if(this.options.interpolation.defaultVariables&&(v={...this.options.interpolation.defaultVariables,...v}),a=this.interpolator.interpolate(a,v,o.lng||this.language||s.usedLng,o),g){const x=a.match(this.interpolator.nestingRegexp),S=x&&x.length;h<S&&(o.nest=!1)}!o.lng&&s&&s.res&&(o.lng=this.language||s.usedLng),o.nest!==!1&&(a=this.interpolator.nest(a,(...x)=>c?.[0]===x[0]&&!o.context?(this.logger.warn(`It seems you are nesting recursively key: ${x[0]} in key: ${l[0]}`),null):this.translate(...x,l),o)),o.interpolation&&this.interpolator.reset()}const f=o.postProcess||this.options.postProcess,m=Ve(f)?[f]:f;return a!=null&&m?.length&&o.applyPostProcessor!==!1&&(a=Nx.handle(m,a,l,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(o)},...o}:o,this)),a}resolve(a,l={}){let o,s,c,f,m;return Ve(a)&&(a=[a]),a.forEach(g=>{if(this.isValidLookup(o))return;const h=this.extractFromKey(g,l),v=h.key;s=v;let x=h.namespaces;this.options.fallbackNS&&(x=x.concat(this.options.fallbackNS));const S=l.count!==void 0&&!Ve(l.count),b=S&&!l.ordinal&&l.count===0,j=l.context!==void 0&&(Ve(l.context)||typeof l.context=="number")&&l.context!=="",C=l.lngs?l.lngs:this.languageUtils.toResolveHierarchy(l.lng||this.language,l.fallbackLng);x.forEach(_=>{this.isValidLookup(o)||(m=_,!Bv[`${C[0]}-${_}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(m)&&(Bv[`${C[0]}-${_}`]=!0,this.logger.warn(`key "${s}" for languages "${C.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!!!")),C.forEach(E=>{if(this.isValidLookup(o))return;f=E;const A=[v];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(A,v,E,_,l);else{let z;S&&(z=this.pluralResolver.getSuffix(E,l.count,l));const D=`${this.options.pluralSeparator}zero`,R=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(S&&(A.push(v+z),l.ordinal&&z.indexOf(R)===0&&A.push(v+z.replace(R,this.options.pluralSeparator)),b&&A.push(v+D)),j){const P=`${v}${this.options.contextSeparator}${l.context}`;A.push(P),S&&(A.push(P+z),l.ordinal&&z.indexOf(R)===0&&A.push(P+z.replace(R,this.options.pluralSeparator)),b&&A.push(P+D))}}let M;for(;M=A.pop();)this.isValidLookup(o)||(c=M,o=this.getResource(E,_,M,l))}))})}),{res:o,usedKey:s,exactUsedKey:c,usedLng:f,usedNS:m}}isValidLookup(a){return a!==void 0&&!(!this.options.returnNull&&a===null)&&!(!this.options.returnEmptyString&&a==="")}getResource(a,l,o,s={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(a,l,o,s):this.resourceStore.getResource(a,l,o,s)}getUsedParamsDetails(a={}){const l=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],o=a.replace&&!Ve(a.replace);let s=o?a.replace:a;if(o&&typeof a.count<"u"&&(s.count=a.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!o){s={...s};for(const c of l)delete s[c]}return s}static hasDefaultValue(a){const l="defaultValue";for(const o in a)if(Object.prototype.hasOwnProperty.call(a,o)&&l===o.substring(0,l.length)&&a[o]!==void 0)return!0;return!1}}class Fv{constructor(a){this.options=a,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ra.create("languageUtils")}getScriptPartFromCode(a){if(a=Ni(a),!a||a.indexOf("-")<0)return null;const l=a.split("-");return l.length===2||(l.pop(),l[l.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(l.join("-"))}getLanguagePartFromCode(a){if(a=Ni(a),!a||a.indexOf("-")<0)return a;const l=a.split("-");return this.formatLanguageCode(l[0])}formatLanguageCode(a){if(Ve(a)&&a.indexOf("-")>-1){let l;try{l=Intl.getCanonicalLocales(a)[0]}catch{}return l&&this.options.lowerCaseLng&&(l=l.toLowerCase()),l||(this.options.lowerCaseLng?a.toLowerCase():a)}return this.options.cleanCode||this.options.lowerCaseLng?a.toLowerCase():a}isSupportedCode(a){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(a=this.getLanguagePartFromCode(a)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(a)>-1}getBestMatchFromCodes(a){if(!a)return null;let l;return a.forEach(o=>{if(l)return;const s=this.formatLanguageCode(o);(!this.options.supportedLngs||this.isSupportedCode(s))&&(l=s)}),!l&&this.options.supportedLngs&&a.forEach(o=>{if(l)return;const s=this.getScriptPartFromCode(o);if(this.isSupportedCode(s))return l=s;const c=this.getLanguagePartFromCode(o);if(this.isSupportedCode(c))return l=c;l=this.options.supportedLngs.find(f=>{if(f===c)return f;if(!(f.indexOf("-")<0&&c.indexOf("-")<0)&&(f.indexOf("-")>0&&c.indexOf("-")<0&&f.substring(0,f.indexOf("-"))===c||f.indexOf(c)===0&&c.length>1))return f})}),l||(l=this.getFallbackCodes(this.options.fallbackLng)[0]),l}getFallbackCodes(a,l){if(!a)return[];if(typeof a=="function"&&(a=a(l)),Ve(a)&&(a=[a]),Array.isArray(a))return a;if(!l)return a.default||[];let o=a[l];return o||(o=a[this.getScriptPartFromCode(l)]),o||(o=a[this.formatLanguageCode(l)]),o||(o=a[this.getLanguagePartFromCode(l)]),o||(o=a.default),o||[]}toResolveHierarchy(a,l){const o=this.getFallbackCodes((l===!1?[]:l)||this.options.fallbackLng||[],a),s=[],c=f=>{f&&(this.isSupportedCode(f)?s.push(f):this.logger.warn(`rejecting language code not found in supportedLngs: ${f}`))};return Ve(a)&&(a.indexOf("-")>-1||a.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&c(this.formatLanguageCode(a)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&c(this.getScriptPartFromCode(a)),this.options.load!=="currentOnly"&&c(this.getLanguagePartFromCode(a))):Ve(a)&&c(this.formatLanguageCode(a)),o.forEach(f=>{s.indexOf(f)<0&&c(this.formatLanguageCode(f))}),s}}const qv={zero:0,one:1,two:2,few:3,many:4,other:5},Vv={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class fj{constructor(a,l={}){this.languageUtils=a,this.options=l,this.logger=ra.create("pluralResolver"),this.pluralRulesCache={}}addRule(a,l){this.rules[a]=l}clearCache(){this.pluralRulesCache={}}getRule(a,l={}){const o=Ni(a==="dev"?"en":a),s=l.ordinal?"ordinal":"cardinal",c=JSON.stringify({cleanedCode:o,type:s});if(c in this.pluralRulesCache)return this.pluralRulesCache[c];let f;try{f=new Intl.PluralRules(o,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Vv;if(!a.match(/-|_/))return Vv;const g=this.languageUtils.getLanguagePartFromCode(a);f=this.getRule(g,l)}return this.pluralRulesCache[c]=f,f}needsPlural(a,l={}){let o=this.getRule(a,l);return o||(o=this.getRule("dev",l)),o?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(a,l,o={}){return this.getSuffixes(a,o).map(s=>`${l}${s}`)}getSuffixes(a,l={}){let o=this.getRule(a,l);return o||(o=this.getRule("dev",l)),o?o.resolvedOptions().pluralCategories.sort((s,c)=>qv[s]-qv[c]).map(s=>`${this.options.prepend}${l.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(a,l,o={}){const s=this.getRule(a,o);return s?`${this.options.prepend}${o.ordinal?`ordinal${this.options.prepend}`:""}${s.select(l)}`:(this.logger.warn(`no plural rule found for: ${a}`),this.getSuffix("dev",l,o))}}const Iv=(t,a,l,o=".",s=!0)=>{let c=rj(t,a,l);return!c&&s&&Ve(l)&&(c=Gf(t,l,o),c===void 0&&(c=Gf(a,l,o))),c},mf=t=>t.replace(/\$/g,"$$$$");class hj{constructor(a={}){this.logger=ra.create("interpolator"),this.options=a,this.format=a?.interpolation?.format||(l=>l),this.init(a)}init(a={}){a.interpolation||(a.interpolation={escapeValue:!0});const{escape:l,escapeValue:o,useRawValueToEscape:s,prefix:c,prefixEscaped:f,suffix:m,suffixEscaped:g,formatSeparator:h,unescapeSuffix:v,unescapePrefix:x,nestingPrefix:S,nestingPrefixEscaped:b,nestingSuffix:j,nestingSuffixEscaped:C,nestingOptionsSeparator:_,maxReplaces:E,alwaysFormat:A}=a.interpolation;this.escape=l!==void 0?l:oj,this.escapeValue=o!==void 0?o:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=c?Pl(c):f||"{{",this.suffix=m?Pl(m):g||"}}",this.formatSeparator=h||",",this.unescapePrefix=v?"":x||"-",this.unescapeSuffix=this.unescapePrefix?"":v||"",this.nestingPrefix=S?Pl(S):b||Pl("$t("),this.nestingSuffix=j?Pl(j):C||Pl(")"),this.nestingOptionsSeparator=_||",",this.maxReplaces=E||1e3,this.alwaysFormat=A!==void 0?A:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const a=(l,o)=>l?.source===o?(l.lastIndex=0,l):new RegExp(o,"g");this.regexp=a(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=a(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=a(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(a,l,o,s){let c,f,m;const g=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=b=>{if(b.indexOf(this.formatSeparator)<0){const E=Iv(l,g,b,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(E,void 0,o,{...s,...l,interpolationkey:b}):E}const j=b.split(this.formatSeparator),C=j.shift().trim(),_=j.join(this.formatSeparator).trim();return this.format(Iv(l,g,C,this.options.keySeparator,this.options.ignoreJSONStructure),_,o,{...s,...l,interpolationkey:C})};this.resetRegExp();const v=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,x=s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:b=>mf(b)},{regex:this.regexp,safeValue:b=>this.escapeValue?mf(this.escape(b)):mf(b)}].forEach(b=>{for(m=0;c=b.regex.exec(a);){const j=c[1].trim();if(f=h(j),f===void 0)if(typeof v=="function"){const _=v(a,c,s);f=Ve(_)?_:""}else if(s&&Object.prototype.hasOwnProperty.call(s,j))f="";else if(x){f=c[0];continue}else this.logger.warn(`missed to pass in variable ${j} for interpolating ${a}`),f="";else!Ve(f)&&!this.useRawValueToEscape&&(f=Lv(f));const C=b.safeValue(f);if(a=a.replace(c[0],C),x?(b.regex.lastIndex+=f.length,b.regex.lastIndex-=c[0].length):b.regex.lastIndex=0,m++,m>=this.maxReplaces)break}}),a}nest(a,l,o={}){let s,c,f;const m=(g,h)=>{const v=this.nestingOptionsSeparator;if(g.indexOf(v)<0)return g;const x=g.split(new RegExp(`${v}[ ]*{`));let S=`{${x[1]}`;g=x[0],S=this.interpolate(S,f);const b=S.match(/'/g),j=S.match(/"/g);((b?.length??0)%2===0&&!j||j.length%2!==0)&&(S=S.replace(/'/g,'"'));try{f=JSON.parse(S),h&&(f={...h,...f})}catch(C){return this.logger.warn(`failed parsing options string in nesting for key ${g}`,C),`${g}${v}${S}`}return f.defaultValue&&f.defaultValue.indexOf(this.prefix)>-1&&delete f.defaultValue,g};for(;s=this.nestingRegexp.exec(a);){let g=[];f={...o},f=f.replace&&!Ve(f.replace)?f.replace:f,f.applyPostProcessor=!1,delete f.defaultValue;const h=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(h!==-1&&(g=s[1].slice(h).split(this.formatSeparator).map(v=>v.trim()).filter(Boolean),s[1]=s[1].slice(0,h)),c=l(m.call(this,s[1].trim(),f),f),c&&s[0]===a&&!Ve(c))return c;Ve(c)||(c=Lv(c)),c||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${a}`),c=""),g.length&&(c=g.reduce((v,x)=>this.format(v,x,o.lng,{...o,interpolationkey:s[1].trim()}),c.trim())),a=a.replace(s[0],c),this.regexp.lastIndex=0}return a}}const mj=t=>{let a=t.toLowerCase().trim();const l={};if(t.indexOf("(")>-1){const o=t.split("(");a=o[0].toLowerCase().trim();const s=o[1].substring(0,o[1].length-1);a==="currency"&&s.indexOf(":")<0?l.currency||(l.currency=s.trim()):a==="relativetime"&&s.indexOf(":")<0?l.range||(l.range=s.trim()):s.split(";").forEach(f=>{if(f){const[m,...g]=f.split(":"),h=g.join(":").trim().replace(/^'+|'+$/g,""),v=m.trim();l[v]||(l[v]=h),h==="false"&&(l[v]=!1),h==="true"&&(l[v]=!0),isNaN(h)||(l[v]=parseInt(h,10))}})}return{formatName:a,formatOptions:l}},Gv=t=>{const a={};return(l,o,s)=>{let c=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(c={...c,[s.interpolationkey]:void 0});const f=o+JSON.stringify(c);let m=a[f];return m||(m=t(Ni(o),s),a[f]=m),m(l)}},pj=t=>(a,l,o)=>t(Ni(l),o)(a);class gj{constructor(a={}){this.logger=ra.create("formatter"),this.options=a,this.init(a)}init(a,l={interpolation:{}}){this.formatSeparator=l.interpolation.formatSeparator||",";const o=l.cacheInBuiltFormats?Gv:pj;this.formats={number:o((s,c)=>{const f=new Intl.NumberFormat(s,{...c});return m=>f.format(m)}),currency:o((s,c)=>{const f=new Intl.NumberFormat(s,{...c,style:"currency"});return m=>f.format(m)}),datetime:o((s,c)=>{const f=new Intl.DateTimeFormat(s,{...c});return m=>f.format(m)}),relativetime:o((s,c)=>{const f=new Intl.RelativeTimeFormat(s,{...c});return m=>f.format(m,c.range||"day")}),list:o((s,c)=>{const f=new Intl.ListFormat(s,{...c});return m=>f.format(m)})}}add(a,l){this.formats[a.toLowerCase().trim()]=l}addCached(a,l){this.formats[a.toLowerCase().trim()]=Gv(l)}format(a,l,o,s={}){const c=l.split(this.formatSeparator);if(c.length>1&&c[0].indexOf("(")>1&&c[0].indexOf(")")<0&&c.find(m=>m.indexOf(")")>-1)){const m=c.findIndex(g=>g.indexOf(")")>-1);c[0]=[c[0],...c.splice(1,m)].join(this.formatSeparator)}return c.reduce((m,g)=>{const{formatName:h,formatOptions:v}=mj(g);if(this.formats[h]){let x=m;try{const S=s?.formatParams?.[s.interpolationkey]||{},b=S.locale||S.lng||s.locale||s.lng||o;x=this.formats[h](m,b,{...v,...s,...S})}catch(S){this.logger.warn(S)}return x}else this.logger.warn(`there was no format function for ${h}`);return m},a)}}const vj=(t,a)=>{t.pending[a]!==void 0&&(delete t.pending[a],t.pendingCount--)};class yj extends Hc{constructor(a,l,o,s={}){super(),this.backend=a,this.store=l,this.services=o,this.languageUtils=o.languageUtils,this.options=s,this.logger=ra.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(o,s.backend,s)}queueLoad(a,l,o,s){const c={},f={},m={},g={};return a.forEach(h=>{let v=!0;l.forEach(x=>{const S=`${h}|${x}`;!o.reload&&this.store.hasResourceBundle(h,x)?this.state[S]=2:this.state[S]<0||(this.state[S]===1?f[S]===void 0&&(f[S]=!0):(this.state[S]=1,v=!1,f[S]===void 0&&(f[S]=!0),c[S]===void 0&&(c[S]=!0),g[x]===void 0&&(g[x]=!0)))}),v||(m[h]=!0)}),(Object.keys(c).length||Object.keys(f).length)&&this.queue.push({pending:f,pendingCount:Object.keys(f).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(c),pending:Object.keys(f),toLoadLanguages:Object.keys(m),toLoadNamespaces:Object.keys(g)}}loaded(a,l,o){const s=a.split("|"),c=s[0],f=s[1];l&&this.emit("failedLoading",c,f,l),!l&&o&&this.store.addResourceBundle(c,f,o,void 0,void 0,{skipCopy:!0}),this.state[a]=l?-1:2,l&&o&&(this.state[a]=0);const m={};this.queue.forEach(g=>{aj(g.loaded,[c],f),vj(g,a),l&&g.errors.push(l),g.pendingCount===0&&!g.done&&(Object.keys(g.loaded).forEach(h=>{m[h]||(m[h]={});const v=g.loaded[h];v.length&&v.forEach(x=>{m[h][x]===void 0&&(m[h][x]=!0)})}),g.done=!0,g.errors.length?g.callback(g.errors):g.callback())}),this.emit("loaded",m),this.queue=this.queue.filter(g=>!g.done)}read(a,l,o,s=0,c=this.retryTimeout,f){if(!a.length)return f(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:a,ns:l,fcName:o,tried:s,wait:c,callback:f});return}this.readingCalls++;const m=(h,v)=>{if(this.readingCalls--,this.waitingReads.length>0){const x=this.waitingReads.shift();this.read(x.lng,x.ns,x.fcName,x.tried,x.wait,x.callback)}if(h&&v&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,a,l,o,s+1,c*2,f)},c);return}f(h,v)},g=this.backend[o].bind(this.backend);if(g.length===2){try{const h=g(a,l);h&&typeof h.then=="function"?h.then(v=>m(null,v)).catch(m):m(null,h)}catch(h){m(h)}return}return g(a,l,m)}prepareLoading(a,l,o={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();Ve(a)&&(a=this.languageUtils.toResolveHierarchy(a)),Ve(l)&&(l=[l]);const c=this.queueLoad(a,l,o,s);if(!c.toLoad.length)return c.pending.length||s(),null;c.toLoad.forEach(f=>{this.loadOne(f)})}load(a,l,o){this.prepareLoading(a,l,{},o)}reload(a,l,o){this.prepareLoading(a,l,{reload:!0},o)}loadOne(a,l=""){const o=a.split("|"),s=o[0],c=o[1];this.read(s,c,"read",void 0,void 0,(f,m)=>{f&&this.logger.warn(`${l}loading namespace ${c} for language ${s} failed`,f),!f&&m&&this.logger.log(`${l}loaded namespace ${c} for language ${s}`,m),this.loaded(a,f,m)})}saveMissing(a,l,o,s,c,f={},m=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(l)){this.logger.warn(`did not save key "${o}" as the namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(o==null||o==="")){if(this.backend?.create){const g={...f,isUpdate:c},h=this.backend.create.bind(this.backend);if(h.length<6)try{let v;h.length===5?v=h(a,l,o,s,g):v=h(a,l,o,s),v&&typeof v.then=="function"?v.then(x=>m(null,x)).catch(m):m(null,v)}catch(v){m(v)}else h(a,l,o,s,m,g)}!a||!a[0]||this.store.addResource(a[0],l,o,s)}}}const Yv=()=>({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:t=>{let a={};if(typeof t[1]=="object"&&(a=t[1]),Ve(t[1])&&(a.defaultValue=t[1]),Ve(t[2])&&(a.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const l=t[3]||t[2];Object.keys(l).forEach(o=>{a[o]=l[o]})}return a},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Kv=t=>(Ve(t.ns)&&(t.ns=[t.ns]),Ve(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),Ve(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs?.indexOf?.("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),typeof t.initImmediate=="boolean"&&(t.initAsync=t.initImmediate),t),Ws=()=>{},xj=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(l=>{typeof t[l]=="function"&&(t[l]=t[l].bind(t))})};class Ci extends Hc{constructor(a={},l){if(super(),this.options=Kv(a),this.services={},this.logger=ra,this.modules={external:[]},xj(this),l&&!this.isInitialized&&!a.isClone){if(!this.options.initAsync)return this.init(a,l),this;setTimeout(()=>{this.init(a,l)},0)}}init(a={},l){this.isInitializing=!0,typeof a=="function"&&(l=a,a={}),a.defaultNS==null&&a.ns&&(Ve(a.ns)?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));const o=Yv();this.options={...o,...this.options,...Kv(a)},this.options.interpolation={...o.interpolation,...this.options.interpolation},a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator);const s=h=>h?typeof h=="function"?new h:h:null;if(!this.options.isClone){this.modules.logger?ra.init(s(this.modules.logger),this.options):ra.init(null,this.options);let h;this.modules.formatter?h=this.modules.formatter:h=gj;const v=new Fv(this.options);this.store=new Hv(this.options.resources,this.options);const x=this.services;x.logger=ra,x.resourceStore=this.store,x.languageUtils=v,x.pluralResolver=new fj(v,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==o.interpolation.format&&this.logger.warn("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),h&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(x.formatter=s(h),x.formatter.init&&x.formatter.init(x,this.options),this.options.interpolation.format=x.formatter.format.bind(x.formatter)),x.interpolator=new hj(this.options),x.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},x.backendConnector=new yj(s(this.modules.backend),x.resourceStore,x,this.options),x.backendConnector.on("*",(b,...j)=>{this.emit(b,...j)}),this.modules.languageDetector&&(x.languageDetector=s(this.modules.languageDetector),x.languageDetector.init&&x.languageDetector.init(x,this.options.detection,this.options)),this.modules.i18nFormat&&(x.i18nFormat=s(this.modules.i18nFormat),x.i18nFormat.init&&x.i18nFormat.init(this)),this.translator=new Ec(this.services,this.options),this.translator.on("*",(b,...j)=>{this.emit(b,...j)}),this.modules.external.forEach(b=>{b.init&&b.init(this)})}if(this.format=this.options.interpolation.format,l||(l=Ws),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.length>0&&h[0]!=="dev"&&(this.options.lng=h[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(h=>{this[h]=(...v)=>this.store[h](...v)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(h=>{this[h]=(...v)=>(this.store[h](...v),this)});const m=ui(),g=()=>{const h=(v,x)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),m.resolve(x),l(v,x)};if(this.languages&&!this.isInitialized)return h(null,this.t.bind(this));this.changeLanguage(this.options.lng,h)};return this.options.resources||!this.options.initAsync?g():setTimeout(g,0),m}loadResources(a,l=Ws){let o=l;const s=Ve(a)?a:this.language;if(typeof a=="function"&&(o=a),!this.options.resources||this.options.partialBundledLanguages){if(s?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return o();const c=[],f=m=>{if(!m||m==="cimode")return;this.services.languageUtils.toResolveHierarchy(m).forEach(h=>{h!=="cimode"&&c.indexOf(h)<0&&c.push(h)})};s?f(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(g=>f(g)),this.options.preload?.forEach?.(m=>f(m)),this.services.backendConnector.load(c,this.options.ns,m=>{!m&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),o(m)})}else o(null)}reloadResources(a,l,o){const s=ui();return typeof a=="function"&&(o=a,a=void 0),typeof l=="function"&&(o=l,l=void 0),a||(a=this.languages),l||(l=this.options.ns),o||(o=Ws),this.services.backendConnector.reload(a,l,c=>{s.resolve(),o(c)}),s}use(a){if(!a)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!a.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return a.type==="backend"&&(this.modules.backend=a),(a.type==="logger"||a.log&&a.warn&&a.error)&&(this.modules.logger=a),a.type==="languageDetector"&&(this.modules.languageDetector=a),a.type==="i18nFormat"&&(this.modules.i18nFormat=a),a.type==="postProcessor"&&Nx.addPostProcessor(a),a.type==="formatter"&&(this.modules.formatter=a),a.type==="3rdParty"&&this.modules.external.push(a),this}setResolvedLanguage(a){if(!(!a||!this.languages)&&!(["cimode","dev"].indexOf(a)>-1)){for(let l=0;l<this.languages.length;l++){const o=this.languages[l];if(!(["cimode","dev"].indexOf(o)>-1)&&this.store.hasLanguageSomeTranslations(o)){this.resolvedLanguage=o;break}}!this.resolvedLanguage&&this.languages.indexOf(a)<0&&this.store.hasLanguageSomeTranslations(a)&&(this.resolvedLanguage=a,this.languages.unshift(a))}}changeLanguage(a,l){this.isLanguageChangingTo=a;const o=ui();this.emit("languageChanging",a);const s=m=>{this.language=m,this.languages=this.services.languageUtils.toResolveHierarchy(m),this.resolvedLanguage=void 0,this.setResolvedLanguage(m)},c=(m,g)=>{g?this.isLanguageChangingTo===a&&(s(g),this.translator.changeLanguage(g),this.isLanguageChangingTo=void 0,this.emit("languageChanged",g),this.logger.log("languageChanged",g)):this.isLanguageChangingTo=void 0,o.resolve((...h)=>this.t(...h)),l&&l(m,(...h)=>this.t(...h))},f=m=>{!a&&!m&&this.services.languageDetector&&(m=[]);const g=Ve(m)?m:m&&m[0],h=this.store.hasLanguageSomeTranslations(g)?g:this.services.languageUtils.getBestMatchFromCodes(Ve(m)?[m]:m);h&&(this.language||s(h),this.translator.language||this.translator.changeLanguage(h),this.services.languageDetector?.cacheUserLanguage?.(h)),this.loadResources(h,v=>{c(v,h)})};return!a&&this.services.languageDetector&&!this.services.languageDetector.async?f(this.services.languageDetector.detect()):!a&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(f):this.services.languageDetector.detect(f):f(a),o}getFixedT(a,l,o){const s=(c,f,...m)=>{let g;typeof f!="object"?g=this.options.overloadTranslationOptionHandler([c,f].concat(m)):g={...f},g.lng=g.lng||s.lng,g.lngs=g.lngs||s.lngs,g.ns=g.ns||s.ns,g.keyPrefix!==""&&(g.keyPrefix=g.keyPrefix||o||s.keyPrefix);const h=this.options.keySeparator||".";let v;return g.keyPrefix&&Array.isArray(c)?v=c.map(x=>`${g.keyPrefix}${h}${x}`):v=g.keyPrefix?`${g.keyPrefix}${h}${c}`:c,this.t(v,g)};return Ve(a)?s.lng=a:s.lngs=a,s.ns=l,s.keyPrefix=o,s}t(...a){return this.translator?.translate(...a)}exists(...a){return this.translator?.exists(...a)}setDefaultNamespace(a){this.options.defaultNS=a}hasLoadedNamespace(a,l={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const o=l.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,c=this.languages[this.languages.length-1];if(o.toLowerCase()==="cimode")return!0;const f=(m,g)=>{const h=this.services.backendConnector.state[`${m}|${g}`];return h===-1||h===0||h===2};if(l.precheck){const m=l.precheck(this,f);if(m!==void 0)return m}return!!(this.hasResourceBundle(o,a)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||f(o,a)&&(!s||f(c,a)))}loadNamespaces(a,l){const o=ui();return this.options.ns?(Ve(a)&&(a=[a]),a.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{o.resolve(),l&&l(s)}),o):(l&&l(),Promise.resolve())}loadLanguages(a,l){const o=ui();Ve(a)&&(a=[a]);const s=this.options.preload||[],c=a.filter(f=>s.indexOf(f)<0&&this.services.languageUtils.isSupportedCode(f));return c.length?(this.options.preload=s.concat(c),this.loadResources(f=>{o.resolve(),l&&l(f)}),o):(l&&l(),Promise.resolve())}dir(a){if(a||(a=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!a)return"rtl";try{const s=new Intl.Locale(a);if(s&&s.getTextInfo){const c=s.getTextInfo();if(c&&c.direction)return c.direction}}catch{}const l=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],o=this.services?.languageUtils||new Fv(Yv());return a.toLowerCase().indexOf("-latn")>1?"ltr":l.indexOf(o.getLanguagePartFromCode(a))>-1||a.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(a={},l){return new Ci(a,l)}cloneInstance(a={},l=Ws){const o=a.forkResourceStore;o&&delete a.forkResourceStore;const s={...this.options,...a,isClone:!0},c=new Ci(s);if((a.debug!==void 0||a.prefix!==void 0)&&(c.logger=c.logger.clone(a)),["store","services","language"].forEach(m=>{c[m]=this[m]}),c.services={...this.services},c.services.utils={hasLoadedNamespace:c.hasLoadedNamespace.bind(c)},o){const m=Object.keys(this.store.data).reduce((g,h)=>(g[h]={...this.store.data[h]},g[h]=Object.keys(g[h]).reduce((v,x)=>(v[x]={...g[h][x]},v),g[h]),g),{});c.store=new Hv(m,s),c.services.resourceStore=c.store}return c.translator=new Ec(c.services,s),c.translator.on("*",(m,...g)=>{c.emit(m,...g)}),c.init(s,l),c.translator.options=s,c.translator.backendConnector.services.utils={hasLoadedNamespace:c.hasLoadedNamespace.bind(c)},c}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Xt=Ci.createInstance();Xt.createInstance=Ci.createInstance;Xt.createInstance;Xt.dir;Xt.init;Xt.loadResources;Xt.reloadResources;Xt.use;Xt.changeLanguage;Xt.getFixedT;Xt.t;Xt.exists;Xt.setDefaultNamespace;Xt.hasLoadedNamespace;Xt.loadNamespaces;Xt.loadLanguages;var pf={exports:{}},Ge={};/**
16
+ * @license React
17
+ * react.production.js
18
+ *
19
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
20
+ *
21
+ * This source code is licensed under the MIT license found in the
22
+ * LICENSE file in the root directory of this source tree.
23
+ */var Xv;function bj(){if(Xv)return Ge;Xv=1;var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),f=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),x=Symbol.iterator;function S(k){return k===null||typeof k!="object"?null:(k=x&&k[x]||k["@@iterator"],typeof k=="function"?k:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,C={};function _(k,K,$){this.props=k,this.context=K,this.refs=C,this.updater=$||b}_.prototype.isReactComponent={},_.prototype.setState=function(k,K){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,K,"setState")},_.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function E(){}E.prototype=_.prototype;function A(k,K,$){this.props=k,this.context=K,this.refs=C,this.updater=$||b}var M=A.prototype=new E;M.constructor=A,j(M,_.prototype),M.isPureReactComponent=!0;var z=Array.isArray,D={H:null,A:null,T:null,S:null,V:null},R=Object.prototype.hasOwnProperty;function P(k,K,$,Q,ie,me){return $=me.ref,{$$typeof:t,type:k,key:K,ref:$!==void 0?$:null,props:me}}function B(k,K){return P(k.type,K,void 0,void 0,void 0,k.props)}function ne(k){return typeof k=="object"&&k!==null&&k.$$typeof===t}function re(k){var K={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function($){return K[$]})}var O=/\/+/g;function q(k,K){return typeof k=="object"&&k!==null&&k.key!=null?re(""+k.key):K.toString(36)}function ee(){}function V(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(ee,ee):(k.status="pending",k.then(function(K){k.status==="pending"&&(k.status="fulfilled",k.value=K)},function(K){k.status==="pending"&&(k.status="rejected",k.reason=K)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function ae(k,K,$,Q,ie){var me=typeof k;(me==="undefined"||me==="boolean")&&(k=null);var ge=!1;if(k===null)ge=!0;else switch(me){case"bigint":case"string":case"number":ge=!0;break;case"object":switch(k.$$typeof){case t:case a:ge=!0;break;case v:return ge=k._init,ae(ge(k._payload),K,$,Q,ie)}}if(ge)return ie=ie(k),ge=Q===""?"."+q(k,0):Q,z(ie)?($="",ge!=null&&($=ge.replace(O,"$&/")+"/"),ae(ie,K,$,"",function(le){return le})):ie!=null&&(ne(ie)&&(ie=B(ie,$+(ie.key==null||k&&k.key===ie.key?"":(""+ie.key).replace(O,"$&/")+"/")+ge)),K.push(ie)),1;ge=0;var we=Q===""?".":Q+":";if(z(k))for(var Ue=0;Ue<k.length;Ue++)Q=k[Ue],me=we+q(Q,Ue),ge+=ae(Q,K,$,me,ie);else if(Ue=S(k),typeof Ue=="function")for(k=Ue.call(k),Ue=0;!(Q=k.next()).done;)Q=Q.value,me=we+q(Q,Ue++),ge+=ae(Q,K,$,me,ie);else if(me==="object"){if(typeof k.then=="function")return ae(V(k),K,$,Q,ie);throw K=String(k),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.")}return ge}function T(k,K,$){if(k==null)return k;var Q=[],ie=0;return ae(k,Q,"","",function(me){return K.call($,me,ie++)}),Q}function Z(k){if(k._status===-1){var K=k._result;K=K(),K.then(function($){(k._status===0||k._status===-1)&&(k._status=1,k._result=$)},function($){(k._status===0||k._status===-1)&&(k._status=2,k._result=$)}),k._status===-1&&(k._status=0,k._result=K)}if(k._status===1)return k._result.default;throw k._result}var I=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var K=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent(K))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)};function be(){}return Ge.Children={map:T,forEach:function(k,K,$){T(k,function(){K.apply(this,arguments)},$)},count:function(k){var K=0;return T(k,function(){K++}),K},toArray:function(k){return T(k,function(K){return K})||[]},only:function(k){if(!ne(k))throw Error("React.Children.only expected to receive a single React element child.");return k}},Ge.Component=_,Ge.Fragment=l,Ge.Profiler=s,Ge.PureComponent=A,Ge.StrictMode=o,Ge.Suspense=g,Ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,Ge.__COMPILER_RUNTIME={__proto__:null,c:function(k){return D.H.useMemoCache(k)}},Ge.cache=function(k){return function(){return k.apply(null,arguments)}},Ge.cloneElement=function(k,K,$){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var Q=j({},k.props),ie=k.key,me=void 0;if(K!=null)for(ge in K.ref!==void 0&&(me=void 0),K.key!==void 0&&(ie=""+K.key),K)!R.call(K,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&K.ref===void 0||(Q[ge]=K[ge]);var ge=arguments.length-2;if(ge===1)Q.children=$;else if(1<ge){for(var we=Array(ge),Ue=0;Ue<ge;Ue++)we[Ue]=arguments[Ue+2];Q.children=we}return P(k.type,ie,void 0,void 0,me,Q)},Ge.createContext=function(k){return k={$$typeof:f,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:c,_context:k},k},Ge.createElement=function(k,K,$){var Q,ie={},me=null;if(K!=null)for(Q in K.key!==void 0&&(me=""+K.key),K)R.call(K,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(ie[Q]=K[Q]);var ge=arguments.length-2;if(ge===1)ie.children=$;else if(1<ge){for(var we=Array(ge),Ue=0;Ue<ge;Ue++)we[Ue]=arguments[Ue+2];ie.children=we}if(k&&k.defaultProps)for(Q in ge=k.defaultProps,ge)ie[Q]===void 0&&(ie[Q]=ge[Q]);return P(k,me,void 0,void 0,null,ie)},Ge.createRef=function(){return{current:null}},Ge.forwardRef=function(k){return{$$typeof:m,render:k}},Ge.isValidElement=ne,Ge.lazy=function(k){return{$$typeof:v,_payload:{_status:-1,_result:k},_init:Z}},Ge.memo=function(k,K){return{$$typeof:h,type:k,compare:K===void 0?null:K}},Ge.startTransition=function(k){var K=D.T,$={};D.T=$;try{var Q=k(),ie=D.S;ie!==null&&ie($,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then(be,I)}catch(me){I(me)}finally{D.T=K}},Ge.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},Ge.use=function(k){return D.H.use(k)},Ge.useActionState=function(k,K,$){return D.H.useActionState(k,K,$)},Ge.useCallback=function(k,K){return D.H.useCallback(k,K)},Ge.useContext=function(k){return D.H.useContext(k)},Ge.useDebugValue=function(){},Ge.useDeferredValue=function(k,K){return D.H.useDeferredValue(k,K)},Ge.useEffect=function(k,K,$){var Q=D.H;if(typeof $=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return Q.useEffect(k,K)},Ge.useId=function(){return D.H.useId()},Ge.useImperativeHandle=function(k,K,$){return D.H.useImperativeHandle(k,K,$)},Ge.useInsertionEffect=function(k,K){return D.H.useInsertionEffect(k,K)},Ge.useLayoutEffect=function(k,K){return D.H.useLayoutEffect(k,K)},Ge.useMemo=function(k,K){return D.H.useMemo(k,K)},Ge.useOptimistic=function(k,K){return D.H.useOptimistic(k,K)},Ge.useReducer=function(k,K,$){return D.H.useReducer(k,K,$)},Ge.useRef=function(k){return D.H.useRef(k)},Ge.useState=function(k){return D.H.useState(k)},Ge.useSyncExternalStore=function(k,K,$){return D.H.useSyncExternalStore(k,K,$)},Ge.useTransition=function(){return D.H.useTransition()},Ge.version="19.1.1",Ge}var Qv;function xh(){return Qv||(Qv=1,pf.exports=bj()),pf.exports}var y=xh();const ot=Sx(y),Cx=JS({__proto__:null,default:ot},[y]),wj=(t,a,l,o)=>{const s=[l,{code:a,...o||{}}];if(t?.services?.logger?.forward)return t.services.logger.forward(s,"warn","react-i18next::",!0);Kr(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),t?.services?.logger?.warn?t.services.logger.warn(...s):console?.warn&&console.warn(...s)},Zv={},Yf=(t,a,l,o)=>{Kr(l)&&Zv[l]||(Kr(l)&&(Zv[l]=new Date),wj(t,a,l,o))},Ex=(t,a)=>()=>{if(t.isInitialized)a();else{const l=()=>{setTimeout(()=>{t.off("initialized",l)},0),a()};t.on("initialized",l)}},Kf=(t,a,l)=>{t.loadNamespaces(a,Ex(t,l))},Jv=(t,a,l,o)=>{if(Kr(l)&&(l=[l]),t.options.preload&&t.options.preload.indexOf(a)>-1)return Kf(t,l,o);l.forEach(s=>{t.options.ns.indexOf(s)<0&&t.options.ns.push(s)}),t.loadLanguages(a,Ex(t,o))},Sj=(t,a,l={})=>!a.languages||!a.languages.length?(Yf(a,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:a.languages}),!0):a.hasLoadedNamespace(t,{lng:l.lng,precheck:(o,s)=>{if(l.bindI18n&&l.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!s(o.isLanguageChangingTo,t))return!1}}),Kr=t=>typeof t=="string",jj=t=>typeof t=="object"&&t!==null,Nj=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Cj={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},Ej=t=>Cj[t],_j=t=>t.replace(Nj,Ej);let Xf={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:_j};const Rj=(t={})=>{Xf={...Xf,...t}},Oj=()=>Xf;let _x;const Aj=t=>{_x=t},Tj=()=>_x,Mj={type:"3rdParty",init(t){Rj(t.options.react),Aj(t)}},kj=y.createContext();class Dj{constructor(){this.usedNamespaces={}}addUsedNamespaces(a){a.forEach(l=>{this.usedNamespaces[l]||(this.usedNamespaces[l]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Lj=(t,a)=>{const l=y.useRef();return y.useEffect(()=>{l.current=t},[t,a]),l.current},Rx=(t,a,l,o)=>t.getFixedT(a,l,o),zj=(t,a,l,o)=>y.useCallback(Rx(t,a,l,o),[t,a,l,o]),zn=(t,a={})=>{const{i18n:l}=a,{i18n:o,defaultNS:s}=y.useContext(kj)||{},c=l||o||Tj();if(c&&!c.reportNamespaces&&(c.reportNamespaces=new Dj),!c){Yf(c,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const z=(R,P)=>Kr(P)?P:jj(P)&&Kr(P.defaultValue)?P.defaultValue:Array.isArray(R)?R[R.length-1]:R,D=[z,{},!1];return D.t=z,D.i18n={},D.ready=!1,D}c.options.react?.wait&&Yf(c,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const f={...Oj(),...c.options.react,...a},{useSuspense:m,keyPrefix:g}=f;let h=s||c.options?.defaultNS;h=Kr(h)?[h]:h||["translation"],c.reportNamespaces.addUsedNamespaces?.(h);const v=(c.isInitialized||c.initializedStoreOnce)&&h.every(z=>Sj(z,c,f)),x=zj(c,a.lng||null,f.nsMode==="fallback"?h:h[0],g),S=()=>x,b=()=>Rx(c,a.lng||null,f.nsMode==="fallback"?h:h[0],g),[j,C]=y.useState(S);let _=h.join();a.lng&&(_=`${a.lng}${_}`);const E=Lj(_),A=y.useRef(!0);y.useEffect(()=>{const{bindI18n:z,bindI18nStore:D}=f;A.current=!0,!v&&!m&&(a.lng?Jv(c,a.lng,h,()=>{A.current&&C(b)}):Kf(c,h,()=>{A.current&&C(b)})),v&&E&&E!==_&&A.current&&C(b);const R=()=>{A.current&&C(b)};return z&&c?.on(z,R),D&&c?.store.on(D,R),()=>{A.current=!1,c&&z&&z?.split(" ").forEach(P=>c.off(P,R)),D&&c&&D.split(" ").forEach(P=>c.store.off(P,R))}},[c,_]),y.useEffect(()=>{A.current&&v&&C(S)},[c,g,v]);const M=[j,c,v];if(M.t=j,M.i18n=c,M.ready=v,v||!v&&!m)return M;throw new Promise(z=>{a.lng?Jv(c,a.lng,h,()=>z()):Kf(c,h,()=>z())})},{slice:Uj,forEach:Pj}=[];function Hj(t){return Pj.call(Uj.call(arguments,1),a=>{if(a)for(const l in a)t[l]===void 0&&(t[l]=a[l])}),t}function Bj(t){return typeof t!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(l=>l.test(t))}const Wv=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,$j=function(t,a){const o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},s=encodeURIComponent(a);let c=`${t}=${s}`;if(o.maxAge>0){const f=o.maxAge-0;if(Number.isNaN(f))throw new Error("maxAge should be a Number");c+=`; Max-Age=${Math.floor(f)}`}if(o.domain){if(!Wv.test(o.domain))throw new TypeError("option domain is invalid");c+=`; Domain=${o.domain}`}if(o.path){if(!Wv.test(o.path))throw new TypeError("option path is invalid");c+=`; Path=${o.path}`}if(o.expires){if(typeof o.expires.toUTCString!="function")throw new TypeError("option expires is invalid");c+=`; Expires=${o.expires.toUTCString()}`}if(o.httpOnly&&(c+="; HttpOnly"),o.secure&&(c+="; Secure"),o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:c+="; SameSite=Strict";break;case"lax":c+="; SameSite=Lax";break;case"strict":c+="; SameSite=Strict";break;case"none":c+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o.partitioned&&(c+="; Partitioned"),c},ey={create(t,a,l,o){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};l&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+l*60*1e3)),o&&(s.domain=o),document.cookie=$j(t,a,s)},read(t){const a=`${t}=`,l=document.cookie.split(";");for(let o=0;o<l.length;o++){let s=l[o];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(a)===0)return s.substring(a.length,s.length)}return null},remove(t,a){this.create(t,"",-1,a)}};var Fj={name:"cookie",lookup(t){let{lookupCookie:a}=t;if(a&&typeof document<"u")return ey.read(a)||void 0},cacheUserLanguage(t,a){let{lookupCookie:l,cookieMinutes:o,cookieDomain:s,cookieOptions:c}=a;l&&typeof document<"u"&&ey.create(l,t,o,s,c)}},qj={name:"querystring",lookup(t){let{lookupQuerystring:a}=t,l;if(typeof window<"u"){let{search:o}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const c=o.substring(1).split("&");for(let f=0;f<c.length;f++){const m=c[f].indexOf("=");m>0&&c[f].substring(0,m)===a&&(l=c[f].substring(m+1))}}return l}},Vj={name:"hash",lookup(t){let{lookupHash:a,lookupFromHashIndex:l}=t,o;if(typeof window<"u"){const{hash:s}=window.location;if(s&&s.length>2){const c=s.substring(1);if(a){const f=c.split("&");for(let m=0;m<f.length;m++){const g=f[m].indexOf("=");g>0&&f[m].substring(0,g)===a&&(o=f[m].substring(g+1))}}if(o)return o;if(!o&&l>-1){const f=s.match(/\/([a-zA-Z-]*)/g);return Array.isArray(f)?f[typeof l=="number"?l:0]?.replace("/",""):void 0}}}return o}};let Hl=null;const ty=()=>{if(Hl!==null)return Hl;try{if(Hl=typeof window<"u"&&window.localStorage!==null,!Hl)return!1;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Hl=!1}return Hl};var Ij={name:"localStorage",lookup(t){let{lookupLocalStorage:a}=t;if(a&&ty())return window.localStorage.getItem(a)||void 0},cacheUserLanguage(t,a){let{lookupLocalStorage:l}=a;l&&ty()&&window.localStorage.setItem(l,t)}};let Bl=null;const ny=()=>{if(Bl!==null)return Bl;try{if(Bl=typeof window<"u"&&window.sessionStorage!==null,!Bl)return!1;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{Bl=!1}return Bl};var Gj={name:"sessionStorage",lookup(t){let{lookupSessionStorage:a}=t;if(a&&ny())return window.sessionStorage.getItem(a)||void 0},cacheUserLanguage(t,a){let{lookupSessionStorage:l}=a;l&&ny()&&window.sessionStorage.setItem(l,t)}},Yj={name:"navigator",lookup(t){const a=[];if(typeof navigator<"u"){const{languages:l,userLanguage:o,language:s}=navigator;if(l)for(let c=0;c<l.length;c++)a.push(l[c]);o&&a.push(o),s&&a.push(s)}return a.length>0?a:void 0}},Kj={name:"htmlTag",lookup(t){let{htmlTag:a}=t,l;const o=a||(typeof document<"u"?document.documentElement:null);return o&&typeof o.getAttribute=="function"&&(l=o.getAttribute("lang")),l}},Xj={name:"path",lookup(t){let{lookupFromPathIndex:a}=t;if(typeof window>"u")return;const l=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(l)?l[typeof a=="number"?a:0]?.replace("/",""):void 0}},Qj={name:"subdomain",lookup(t){let{lookupFromSubdomainIndex:a}=t;const l=typeof a=="number"?a+1:1,o=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(o)return o[l]}};let Ox=!1;try{document.cookie,Ox=!0}catch{}const Ax=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Ox||Ax.splice(1,1);const Zj=()=>({order:Ax,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t});class Tx{constructor(a){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(a,l)}init(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=a,this.options=Hj(l,this.options||{},Zj()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=o,this.addDetector(Fj),this.addDetector(qj),this.addDetector(Ij),this.addDetector(Gj),this.addDetector(Yj),this.addDetector(Kj),this.addDetector(Xj),this.addDetector(Qj),this.addDetector(Vj)}addDetector(a){return this.detectors[a.name]=a,this}detect(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,l=[];return a.forEach(o=>{if(this.detectors[o]){let s=this.detectors[o].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(l=l.concat(s))}}),l=l.filter(o=>o!=null&&!Bj(o)).map(o=>this.options.convertDetectedLanguage(o)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?l:l.length>0?l[0]:null}cacheUserLanguage(a){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;l&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(a)>-1||l.forEach(o=>{this.detectors[o]&&this.detectors[o].cacheUserLanguage(a,this.options)}))}}Tx.type="languageDetector";const Jj={yes:"Yes",no:"No"},Wj={title:"Claude Code Router",save:"Save",save_and_restart:"Save and Restart",cancel:"Cancel",edit:"Edit",remove:"Remove",delete:"Delete",settings:"Settings",selectFile:"Select File",config_saved_success:"Config saved successfully",config_saved_failed:"Failed to save config",config_saved_restart_success:"Config saved and service restarted successfully",config_saved_restart_failed:"Failed to save config and restart service",new_version_available:"New Version Available",update_description:"A new version is available. Please review the changelog and update to get the latest features and improvements.",no_changelog_available:"No changelog available",later:"Later",update_now:"Update Now",no_updates_available:"No updates available",update_check_failed:"Failed to check for updates",update_successful:"Update successful",update_failed:"Update failed"},eN={title:"Sign in to your account",description:"Enter your API key to access the configuration panel",apiKey:"API Key",apiKeyPlaceholder:"Enter your API key",signIn:"Sign In",invalidApiKey:"Invalid API key",configError:"Configuration not loaded",validating:"Validating API key..."},tN={title:"General Settings",log:"Enable Logging",log_level:"Log Level",claude_path:"Claude Path",host:"Host",port:"Port",apikey:"API Key",timeout:"API Timeout (ms)",proxy_url:"Proxy URL",custom_router_path:"Custom Router Script Path",custom_router_path_placeholder:"Enter absolute path to custom router script file"},nN={title:"Custom Transformers",path:"Path",project:"Project",remove:"Remove",add:"Add Custom Transformer",edit:"Edit Custom Transformer",delete:"Delete Custom Transformer",delete_transformer_confirm:"Are you sure you want to delete this custom transformer?",parameters:"Parameters"},aN={title:"Providers",name:"Name",api_base_url:"API Full URL",api_key:"API Key",models:"Models",models_placeholder:"Enter model name and press Enter to add",add_model:"Add Model",select_models:"Select Models",remove:"Remove",add:"Add Provider",edit:"Edit Provider",delete:"Delete",cancel:"Cancel",delete_provider_confirm:"Are you sure you want to delete this provider?",test_connectivity:"Test Connectivity",testing:"Testing...",connection_successful:"Connection successful!",connection_failed:"Connection failed!",missing_credentials:"Missing API base URL or API key",fetch_available_models:"Fetch available models",fetching_models:"Fetching models...",fetch_models_failed:"Failed to fetch models",transformers:"Transformers",select_transformer:"Select Transformer",no_transformers:"No transformers available",provider_transformer:"Provider Transformer",model_transformers:"Model Transformers",transformer_parameters:"Transformer Parameters",add_parameter:"Add Parameter",parameter_name:"Parameter Name",parameter_value:"Parameter Value",selected_transformers:"Selected Transformers",import_from_template:"Import from template",no_templates_found:"No templates found",select_template:"Select a template...",api_key_required:"API Key is required",name_required:"Name is required",name_duplicate:"A provider with this name already exists",search:"Search providers..."},rN={title:"Router",default:"Default",background:"Background",think:"Think",longContext:"Long Context",longContextThreshold:"Context Threshold",webSearch:"Web Search",image:"Image",forceUseImageAgent:"Force Use Image Agent",selectModel:"Select a model...",searchModel:"Search model...",noModelFound:"No model found."},lN={title:"JSON Editor",save:"Save",saving:"Saving...",cancel:"Cancel",save_failed:"Failed to save config",save_and_restart:"Save & Restart"},oN={title:"Status Line Configuration",enable:"Enable Status Line",theme:"Theme Style",theme_default:"Default",theme_powerline:"Powerline",modules:"Modules",module_type:"Type",module_icon:"Icon",module_text:"Text",module_color:"Color",module_background:"Background",module_text_description:"Enter display text, variables can be used:",module_color_description:"Select text color",module_background_description:"Select background color (optional)",module_script_path:"Script Path",module_script_path_description:"Enter the absolute path of the Node.js script file",add_module:"Add Module",remove_module:"Remove Module",delete_module:"Delete Module",preview:"Preview",components:"Components",properties:"Properties",workDir:"Working Directory",gitBranch:"Git Branch",model:"Model",usage:"Usage",script:"Script",background_none:"None",color_black:"Black",color_red:"Red",color_green:"Green",color_yellow:"Yellow",color_blue:"Blue",color_magenta:"Magenta",color_cyan:"Cyan",color_white:"White",color_bright_black:"Bright Black",color_bright_red:"Bright Red",color_bright_green:"Bright Green",color_bright_yellow:"Bright Yellow",color_bright_blue:"Bright Blue",color_bright_magenta:"Bright Magenta",color_bright_cyan:"Bright Cyan",color_bright_white:"Bright White",font_placeholder:"Select Font",theme_placeholder:"Select Theme Style",icon_placeholder:"Paste icon or search by name...",icon_description:"Enter icon character, paste icon, or search icons (optional)",text_placeholder:"e.g.: {{workDirName}}",script_placeholder:"e.g.: /path/to/your/script.js",drag_hint:"Drag components here to configure",select_hint:"Select a component to configure",no_icons_found:"No icons found",no_icons_available:"No icons available",import_export:"Import/Export",import:"Import Config",export:"Export Config",download_template:"Download Template",import_export_help:"Export current configuration as a JSON file, or import configuration from a JSON file. You can also download a configuration template for reference.",export_success:"Configuration exported successfully",export_failed:"Failed to export configuration",import_success:"Configuration imported successfully",import_failed:"Failed to import configuration",invalid_config:"Invalid configuration file",template_download_success:"Template downloaded successfully",template_download_success_desc:"Configuration template has been downloaded to your device",template_download_failed:"Failed to download template"},iN={placeholder:"Select color...",title:"Color Picker",clear:"Clear",no_color_selected:"No color selected",custom_color:"Custom Color",apply:"Apply",hex_input_help:"Enter hex color value (e.g.: #FF0000)"},sN={title:"Log Viewer",close:"Close",download:"Download",clear:"Clear",auto_refresh_on:"Auto Refresh On",auto_refresh_off:"Auto Refresh Off",load_failed:"Failed to load logs",no_logs_available:"No logs available",logs_cleared:"Logs cleared successfully",clear_failed:"Failed to clear logs",logs_downloaded:"Logs downloaded successfully",back_to_files:"Back to Files",select_file:"Select a log file to view",no_log_files_available:"No log files available",load_files_failed:"Failed to load log files",group_by_req_id:"Group by Request ID",grouped_on:"Grouped",request_groups:"Request Groups",total_requests:"Total Requests",total_logs:"Total Logs",request:"Request",logs:"logs",first_log:"First Log",last_log:"Last Log",back_to_all_logs:"Back to All Logs",worker_error:"Worker error",worker_init_failed:"Failed to initialize worker",grouping_not_supported:"Log grouping not supported by server",back:"Back"},cN={common:Jj,app:Wj,login:eN,toplevel:tN,transformers:nN,providers:aN,router:rN,json_editor:lN,statusline:oN,color_picker:iN,log_viewer:sN},uN={yes:"是",no:"否"},dN={title:"Claude Code Router",save:"保存",save_and_restart:"保存并重启",cancel:"取消",edit:"编辑",remove:"移除",delete:"删除",settings:"设置",selectFile:"选择文件",config_saved_success:"配置保存成功",config_saved_failed:"配置保存失败",config_saved_restart_success:"配置保存并服务重启成功",config_saved_restart_failed:"配置保存并服务重启失败",new_version_available:"有新版本可用",update_description:"发现新版本。请查看更新日志并更新以获取最新功能和改进。",no_changelog_available:"暂无更新日志",later:"稍后再说",update_now:"立即更新",no_updates_available:"当前已是最新版本",update_check_failed:"检查更新失败",update_successful:"更新成功",update_failed:"更新失败"},fN={title:"登录到您的账户",description:"请输入您的API密钥以访问配置面板",apiKey:"API密钥",apiKeyPlaceholder:"请输入您的API密钥",signIn:"登录",invalidApiKey:"API密钥无效",configError:"配置未加载",validating:"正在验证API密钥..."},hN={title:"通用设置",log:"启用日志",log_level:"日志级别",claude_path:"Claude 路径",host:"主机",port:"端口",apikey:"API 密钥",timeout:"API 超时时间 (毫秒)",proxy_url:"代理地址",custom_router_path:"自定义路由脚本路径",custom_router_path_placeholder:"输入自定义路由脚本文件的绝对路径"},mN={title:"自定义转换器",path:"路径",project:"项目",remove:"移除",add:"添加自定义转换器",edit:"编辑自定义转换器",delete:"删除自定义转换器",delete_transformer_confirm:"您确定要删除此自定义转换器吗?",parameters:"参数"},pN={title:"供应商",name:"名称",api_base_url:"API 完整地址",api_key:"API 密钥",models:"模型",models_placeholder:"输入模型名称并按回车键添加",add_model:"添加模型",select_models:"选择模型",remove:"移除",add:"添加供应商",edit:"编辑供应商",delete:"删除",cancel:"取消",delete_provider_confirm:"您确定要删除此供应商吗?",test_connectivity:"测试连通性",testing:"测试中...",connection_successful:"连接成功!",connection_failed:"连接失败!",missing_credentials:"缺少 API 基础地址或 API 密钥",fetch_available_models:"获取可用模型",fetching_models:"获取模型中...",fetch_models_failed:"获取模型失败",transformers:"转换器",select_transformer:"选择转换器",no_transformers:"无可用转换器",provider_transformer:"供应商转换器",model_transformers:"模型转换器",transformer_parameters:"转换器参数",add_parameter:"添加参数",parameter_name:"参数名称",parameter_value:"参数值",selected_transformers:"已选转换器",import_from_template:"从模板导入",no_templates_found:"未找到模板",select_template:"选择一个模板...",api_key_required:"API 密钥为必填项",name_required:"名称为必填项",name_duplicate:"已存在同名供应商",search:"搜索供应商..."},gN={title:"路由",default:"默认",background:"后台",think:"思考",longContext:"长上下文",longContextThreshold:"上下文阈值",webSearch:"网络搜索",image:"图像",forceUseImageAgent:"强制使用图像代理",selectModel:"选择一个模型...",searchModel:"搜索模型...",noModelFound:"未找到模型."},vN={title:"JSON 编辑器",save:"保存",saving:"保存中...",cancel:"取消",save_failed:"配置保存失败",save_and_restart:"保存并重启"},yN={title:"状态栏配置",enable:"启用状态栏",theme:"主题样式",theme_default:"默认",theme_powerline:"Powerline",modules:"模块",module_type:"类型",module_icon:"图标",module_text:"文本",module_color:"颜色",module_background:"背景",module_text_description:"输入显示文本,可使用变量:",module_color_description:"选择文字颜色",module_background_description:"选择背景颜色(可选)",module_script_path:"脚本路径",module_script_path_description:"输入Node.js脚本文件的绝对路径",add_module:"添加模块",remove_module:"移除模块",delete_module:"删除组件",preview:"预览",components:"组件",properties:"属性",workDir:"工作目录",gitBranch:"Git分支",model:"模型",usage:"使用情况",script:"脚本",background_none:"无",color_black:"黑色",color_red:"红色",color_green:"绿色",color_yellow:"黄色",color_blue:"蓝色",color_magenta:"品红",color_cyan:"青色",color_white:"白色",color_bright_black:"亮黑色",color_bright_red:"亮红色",color_bright_green:"亮绿色",color_bright_yellow:"亮黄色",color_bright_blue:"亮蓝色",color_bright_magenta:"亮品红",color_bright_cyan:"亮青色",color_bright_white:"亮白色",font_placeholder:"选择字体",theme_placeholder:"选择主题样式",icon_placeholder:"粘贴图标或输入名称搜索...",icon_description:"输入图标字符、粘贴图标或搜索图标(可选)",text_placeholder:"例如: {{workDirName}}",script_placeholder:"例如: /path/to/your/script.js",drag_hint:"拖拽组件到此处进行配置",select_hint:"选择一个组件进行配置",no_icons_found:"未找到图标",no_icons_available:"暂无可用图标",import_export:"导入/导出",import:"导入配置",export:"导出配置",download_template:"下载模板",import_export_help:"导出当前配置为JSON文件,或从JSON文件导入配置。您也可以下载配置模板作为参考。",export_success:"配置导出成功",export_failed:"配置导出失败",import_success:"配置导入成功",import_failed:"配置导入失败",invalid_config:"无效的配置文件",template_download_success:"模板下载成功",template_download_success_desc:"配置模板已下载到您的设备",template_download_failed:"模板下载失败"},xN={placeholder:"选择颜色...",title:"颜色选择器",clear:"清除",no_color_selected:"未选择颜色",custom_color:"自定义颜色",apply:"应用",hex_input_help:"输入十六进制颜色值 (例如: #FF0000)"},bN={title:"日志查看器",close:"关闭",download:"下载",clear:"清除",auto_refresh_on:"自动刷新开启",auto_refresh_off:"自动刷新关闭",load_failed:"加载日志失败",no_logs_available:"暂无日志",logs_cleared:"日志清除成功",clear_failed:"清除日志失败",logs_downloaded:"日志下载成功",back_to_files:"返回文件列表",select_file:"选择要查看的日志文件",no_log_files_available:"暂无日志文件",load_files_failed:"加载日志文件失败",group_by_req_id:"按请求ID分组",grouped_on:"已分组",request_groups:"请求组",total_requests:"总请求数",total_logs:"总日志数",request:"请求",logs:"条日志",first_log:"首条日志",last_log:"末条日志",back_to_all_logs:"返回所有日志",worker_error:"Worker错误",worker_init_failed:"Worker初始化失败",grouping_not_supported:"服务器不支持日志分组",back:"返回"},wN={common:uN,app:dN,login:fN,toplevel:hN,transformers:mN,providers:pN,router:gN,json_editor:vN,statusline:yN,color_picker:xN,log_viewer:bN},SN={en:{translation:cN},zh:{translation:wN}};Xt.use(Tx).use(Mj).init({resources:SN,fallbackLng:"en",interpolation:{escapeValue:!1}});var gf={exports:{}},di={},vf={exports:{}},yf={};/**
24
+ * @license React
25
+ * scheduler.production.js
26
+ *
27
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
28
+ *
29
+ * This source code is licensed under the MIT license found in the
30
+ * LICENSE file in the root directory of this source tree.
31
+ */var ay;function jN(){return ay||(ay=1,function(t){function a(T,Z){var I=T.length;T.push(Z);e:for(;0<I;){var be=I-1>>>1,k=T[be];if(0<s(k,Z))T[be]=Z,T[I]=k,I=be;else break e}}function l(T){return T.length===0?null:T[0]}function o(T){if(T.length===0)return null;var Z=T[0],I=T.pop();if(I!==Z){T[0]=I;e:for(var be=0,k=T.length,K=k>>>1;be<K;){var $=2*(be+1)-1,Q=T[$],ie=$+1,me=T[ie];if(0>s(Q,I))ie<k&&0>s(me,Q)?(T[be]=me,T[ie]=I,be=ie):(T[be]=Q,T[$]=I,be=$);else if(ie<k&&0>s(me,I))T[be]=me,T[ie]=I,be=ie;else break e}}return Z}function s(T,Z){var I=T.sortIndex-Z.sortIndex;return I!==0?I:T.id-Z.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var f=Date,m=f.now();t.unstable_now=function(){return f.now()-m}}var g=[],h=[],v=1,x=null,S=3,b=!1,j=!1,C=!1,_=!1,E=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function z(T){for(var Z=l(h);Z!==null;){if(Z.callback===null)o(h);else if(Z.startTime<=T)o(h),Z.sortIndex=Z.expirationTime,a(g,Z);else break;Z=l(h)}}function D(T){if(C=!1,z(T),!j)if(l(g)!==null)j=!0,R||(R=!0,q());else{var Z=l(h);Z!==null&&ae(D,Z.startTime-T)}}var R=!1,P=-1,B=5,ne=-1;function re(){return _?!0:!(t.unstable_now()-ne<B)}function O(){if(_=!1,R){var T=t.unstable_now();ne=T;var Z=!0;try{e:{j=!1,C&&(C=!1,A(P),P=-1),b=!0;var I=S;try{t:{for(z(T),x=l(g);x!==null&&!(x.expirationTime>T&&re());){var be=x.callback;if(typeof be=="function"){x.callback=null,S=x.priorityLevel;var k=be(x.expirationTime<=T);if(T=t.unstable_now(),typeof k=="function"){x.callback=k,z(T),Z=!0;break t}x===l(g)&&o(g),z(T)}else o(g);x=l(g)}if(x!==null)Z=!0;else{var K=l(h);K!==null&&ae(D,K.startTime-T),Z=!1}}break e}finally{x=null,S=I,b=!1}Z=void 0}}finally{Z?q():R=!1}}}var q;if(typeof M=="function")q=function(){M(O)};else if(typeof MessageChannel<"u"){var ee=new MessageChannel,V=ee.port2;ee.port1.onmessage=O,q=function(){V.postMessage(null)}}else q=function(){E(O,0)};function ae(T,Z){P=E(function(){T(t.unstable_now())},Z)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(T){T.callback=null},t.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<T?Math.floor(1e3/T):5},t.unstable_getCurrentPriorityLevel=function(){return S},t.unstable_next=function(T){switch(S){case 1:case 2:case 3:var Z=3;break;default:Z=S}var I=S;S=Z;try{return T()}finally{S=I}},t.unstable_requestPaint=function(){_=!0},t.unstable_runWithPriority=function(T,Z){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var I=S;S=T;try{return Z()}finally{S=I}},t.unstable_scheduleCallback=function(T,Z,I){var be=t.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?be+I:be):I=be,T){case 1:var k=-1;break;case 2:k=250;break;case 5:k=1073741823;break;case 4:k=1e4;break;default:k=5e3}return k=I+k,T={id:v++,callback:Z,priorityLevel:T,startTime:I,expirationTime:k,sortIndex:-1},I>be?(T.sortIndex=I,a(h,T),l(g)===null&&T===l(h)&&(C?(A(P),P=-1):C=!0,ae(D,I-be))):(T.sortIndex=k,a(g,T),j||b||(j=!0,R||(R=!0,q()))),T},t.unstable_shouldYield=re,t.unstable_wrapCallback=function(T){var Z=S;return function(){var I=S;S=Z;try{return T.apply(this,arguments)}finally{S=I}}}}(yf)),yf}var ry;function NN(){return ry||(ry=1,vf.exports=jN()),vf.exports}var xf={exports:{}},Kt={};/**
32
+ * @license React
33
+ * react-dom.production.js
34
+ *
35
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
36
+ *
37
+ * This source code is licensed under the MIT license found in the
38
+ * LICENSE file in the root directory of this source tree.
39
+ */var ly;function CN(){if(ly)return Kt;ly=1;var t=xh();function a(g){var h="https://react.dev/errors/"+g;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)h+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+g+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var o={d:{f:l,r:function(){throw Error(a(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},s=Symbol.for("react.portal");function c(g,h,v){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:x==null?null:""+x,children:g,containerInfo:h,implementation:v}}var f=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(g,h){if(g==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Kt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Kt.createPortal=function(g,h){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(a(299));return c(g,h,null,v)},Kt.flushSync=function(g){var h=f.T,v=o.p;try{if(f.T=null,o.p=2,g)return g()}finally{f.T=h,o.p=v,o.d.f()}},Kt.preconnect=function(g,h){typeof g=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(g,h))},Kt.prefetchDNS=function(g){typeof g=="string"&&o.d.D(g)},Kt.preinit=function(g,h){if(typeof g=="string"&&h&&typeof h.as=="string"){var v=h.as,x=m(v,h.crossOrigin),S=typeof h.integrity=="string"?h.integrity:void 0,b=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;v==="style"?o.d.S(g,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:x,integrity:S,fetchPriority:b}):v==="script"&&o.d.X(g,{crossOrigin:x,integrity:S,fetchPriority:b,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Kt.preinitModule=function(g,h){if(typeof g=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var v=m(h.as,h.crossOrigin);o.d.M(g,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&o.d.M(g)},Kt.preload=function(g,h){if(typeof g=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var v=h.as,x=m(v,h.crossOrigin);o.d.L(g,v,{crossOrigin:x,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Kt.preloadModule=function(g,h){if(typeof g=="string")if(h){var v=m(h.as,h.crossOrigin);o.d.m(g,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else o.d.m(g)},Kt.requestFormReset=function(g){o.d.r(g)},Kt.unstable_batchedUpdates=function(g,h){return g(h)},Kt.useFormState=function(g,h,v){return f.H.useFormState(g,h,v)},Kt.useFormStatus=function(){return f.H.useHostTransitionStatus()},Kt.version="19.1.1",Kt}var oy;function Mx(){if(oy)return xf.exports;oy=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(a){console.error(a)}}return t(),xf.exports=CN(),xf.exports}/**
40
+ * @license React
41
+ * react-dom-client.production.js
42
+ *
43
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
44
+ *
45
+ * This source code is licensed under the MIT license found in the
46
+ * LICENSE file in the root directory of this source tree.
47
+ */var iy;function EN(){if(iy)return di;iy=1;var t=NN(),a=xh(),l=Mx();function o(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)n+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var n=e,r=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(r=n.return),e=n.return;while(e)}return n.tag===3?r:null}function f(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function m(e){if(c(e)!==e)throw Error(o(188))}function g(e){var n=e.alternate;if(!n){if(n=c(e),n===null)throw Error(o(188));return n!==e?null:e}for(var r=e,i=n;;){var d=r.return;if(d===null)break;var p=d.alternate;if(p===null){if(i=d.return,i!==null){r=i;continue}break}if(d.child===p.child){for(p=d.child;p;){if(p===r)return m(d),e;if(p===i)return m(d),n;p=p.sibling}throw Error(o(188))}if(r.return!==i.return)r=d,i=p;else{for(var w=!1,N=d.child;N;){if(N===r){w=!0,r=d,i=p;break}if(N===i){w=!0,i=d,r=p;break}N=N.sibling}if(!w){for(N=p.child;N;){if(N===r){w=!0,r=p,i=d;break}if(N===i){w=!0,i=p,r=d;break}N=N.sibling}if(!w)throw Error(o(189))}}if(r.alternate!==i)throw Error(o(190))}if(r.tag!==3)throw Error(o(188));return r.stateNode.current===r?e:n}function h(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=h(e),n!==null)return n;e=e.sibling}return null}var v=Object.assign,x=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),E=Symbol.for("react.provider"),A=Symbol.for("react.consumer"),M=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),re=Symbol.for("react.memo_cache_sentinel"),O=Symbol.iterator;function q(e){return e===null||typeof e!="object"?null:(e=O&&e[O]||e["@@iterator"],typeof e=="function"?e:null)}var ee=Symbol.for("react.client.reference");function V(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ee?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case _:return"Profiler";case C:return"StrictMode";case D:return"Suspense";case R:return"SuspenseList";case ne:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case b:return"Portal";case M:return(e.displayName||"Context")+".Provider";case A:return(e._context.displayName||"Context")+".Consumer";case z:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P:return n=e.displayName||null,n!==null?n:V(e.type)||"Memo";case B:n=e._payload,e=e._init;try{return V(e(n))}catch{}}return null}var ae=Array.isArray,T=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},be=[],k=-1;function K(e){return{current:e}}function $(e){0>k||(e.current=be[k],be[k]=null,k--)}function Q(e,n){k++,be[k]=e.current,e.current=n}var ie=K(null),me=K(null),ge=K(null),we=K(null);function Ue(e,n){switch(Q(ge,n),Q(me,e),Q(ie,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?iv(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=iv(n),e=sv(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}$(ie),Q(ie,e)}function le(){$(ie),$(me),$(ge)}function Se(e){e.memoizedState!==null&&Q(we,e);var n=ie.current,r=sv(n,e.type);n!==r&&(Q(me,e),Q(ie,r))}function Be(e){me.current===e&&($(ie),$(me)),we.current===e&&($(we),ri._currentValue=I)}var rt=Object.prototype.hasOwnProperty,Ee=t.unstable_scheduleCallback,bt=t.unstable_cancelCallback,ue=t.unstable_shouldYield,de=t.unstable_requestPaint,he=t.unstable_now,ve=t.unstable_getCurrentPriorityLevel,Me=t.unstable_ImmediatePriority,$e=t.unstable_UserBlockingPriority,qe=t.unstable_NormalPriority,lt=t.unstable_LowPriority,Qt=t.unstable_IdlePriority,tl=t.log,mo=t.unstable_setDisableYieldValue,Wt=null,wt=null;function Un(e){if(typeof tl=="function"&&mo(e),wt&&typeof wt.setStrictMode=="function")try{wt.setStrictMode(Wt,e)}catch{}}var Ft=Math.clz32?Math.clz32:Hi,su=Math.log,Xn=Math.LN2;function Hi(e){return e>>>=0,e===0?32:31-(su(e)/Xn|0)|0}var Sr=256,jr=4194304;function pa(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Nr(e,n,r){var i=e.pendingLanes;if(i===0)return 0;var d=0,p=e.suspendedLanes,w=e.pingedLanes;e=e.warmLanes;var N=i&134217727;return N!==0?(i=N&~p,i!==0?d=pa(i):(w&=N,w!==0?d=pa(w):r||(r=N&~e,r!==0&&(d=pa(r))))):(N=i&~p,N!==0?d=pa(N):w!==0?d=pa(w):r||(r=i&~e,r!==0&&(d=pa(r)))),d===0?0:n!==0&&n!==d&&(n&p)===0&&(p=d&-d,r=n&-n,p>=r||p===32&&(r&4194048)!==0)?n:d}function Qn(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function Bi(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 nl(){var e=Sr;return Sr<<=1,(Sr&4194048)===0&&(Sr=256),e}function $i(){var e=jr;return jr<<=1,(jr&62914560)===0&&(jr=4194304),e}function al(e){for(var n=[],r=0;31>r;r++)n.push(e);return n}function Cr(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Fi(e,n,r,i,d,p){var w=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var N=e.entanglements,L=e.expirationTimes,X=e.hiddenUpdates;for(r=w&~r;0<r;){var oe=31-Ft(r),ce=1<<oe;N[oe]=0,L[oe]=-1;var J=X[oe];if(J!==null)for(X[oe]=null,oe=0;oe<J.length;oe++){var W=J[oe];W!==null&&(W.lane&=-536870913)}r&=~ce}i!==0&&Er(e,i,0),p!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=p&~(w&~n))}function Er(e,n,r){e.pendingLanes|=n,e.suspendedLanes&=~n;var i=31-Ft(n);e.entangledLanes|=n,e.entanglements[i]=e.entanglements[i]|1073741824|r&4194090}function _r(e,n){var r=e.entangledLanes|=n;for(e=e.entanglements;r;){var i=31-Ft(r),d=1<<i;d&n|e[i]&n&&(e[i]|=n),r&=~d}}function po(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 go(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function U(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:_v(e.type))}function G(e,n){var r=Z.p;try{return Z.p=e,n()}finally{Z.p=r}}var te=Math.random().toString(36).slice(2),fe="__reactFiber$"+te,pe="__reactProps$"+te,_e="__reactContainer$"+te,Ae="__reactEvents$"+te,Re="__reactListeners$"+te,De="__reactHandles$"+te,Le="__reactResources$"+te,Oe="__reactMarker$"+te;function Te(e){delete e[fe],delete e[pe],delete e[Ae],delete e[Re],delete e[De]}function Ye(e){var n=e[fe];if(n)return n;for(var r=e.parentNode;r;){if(n=r[_e]||r[fe]){if(r=n.alternate,n.child!==null||r!==null&&r.child!==null)for(e=fv(e);e!==null;){if(r=e[fe])return r;e=fv(e)}return n}e=r,r=e.parentNode}return null}function ut(e){if(e=e[fe]||e[_e]){var n=e.tag;if(n===5||n===6||n===13||n===26||n===27||n===3)return e}return null}function Nt(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(o(33))}function Ct(e){var n=e[Le];return n||(n=e[Le]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Ie(e){e[Oe]=!0}var ht=new Set,Zn={};function on(e,n){Zt(e,n),Zt(e+"Capture",n)}function Zt(e,n){for(Zn[e]=n,e=0;e<n.length;e++)ht.add(n[e])}var wn=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),rl={},$a={};function ga(e){return rt.call($a,e)?!0:rt.call(rl,e)?!1:wn.test(e)?$a[e]=!0:(rl[e]=!0,!1)}function va(e,n,r){if(ga(n))if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var i=n.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+r)}}function ya(e,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+r)}}function Qe(e,n,r,i){if(i===null)e.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(n,r,""+i)}}var Tt,Rr;function Sn(e){if(Tt===void 0)try{throw Error()}catch(r){var n=r.stack.trim().match(/\n( *(at )?)/);Tt=n&&n[1]||"",Rr=-1<r.stack.indexOf(`
48
+ at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
49
+ `+Tt+e+Rr}var St=!1;function Fa(e,n){if(!e||St)return"";St=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(n){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(W){var J=W}Reflect.construct(e,[],ce)}else{try{ce.call()}catch(W){J=W}e.call(ce.prototype)}}else{try{throw Error()}catch(W){J=W}(ce=e())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(W){if(W&&J&&typeof W.stack=="string")return[W.stack,J.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=i.DetermineComponentFrameRoot(),w=p[0],N=p[1];if(w&&N){var L=w.split(`
50
+ `),X=N.split(`
51
+ `);for(d=i=0;i<L.length&&!L[i].includes("DetermineComponentFrameRoot");)i++;for(;d<X.length&&!X[d].includes("DetermineComponentFrameRoot");)d++;if(i===L.length||d===X.length)for(i=L.length-1,d=X.length-1;1<=i&&0<=d&&L[i]!==X[d];)d--;for(;1<=i&&0<=d;i--,d--)if(L[i]!==X[d]){if(i!==1||d!==1)do if(i--,d--,0>d||L[i]!==X[d]){var oe=`
52
+ `+L[i].replace(" at new "," at ");return e.displayName&&oe.includes("<anonymous>")&&(oe=oe.replace("<anonymous>",e.displayName)),oe}while(1<=i&&0<=d);break}}}finally{St=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?Sn(r):""}function qi(e){switch(e.tag){case 26:case 27:case 5:return Sn(e.type);case 16:return Sn("Lazy");case 13:return Sn("Suspense");case 19:return Sn("SuspenseList");case 0:case 15:return Fa(e.type,!1);case 11:return Fa(e.type.render,!1);case 1:return Fa(e.type,!0);case 31:return Sn("Activity");default:return""}}function Vi(e){try{var n="";do n+=qi(e),e=e.return;while(e);return n}catch(r){return`
53
+ Error generating stack: `+r.message+`
54
+ `+r.stack}}function jn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function nm(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Y1(e){var n=nm(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),i=""+e[n];if(!e.hasOwnProperty(n)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var d=r.get,p=r.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return d.call(this)},set:function(w){i=""+w,p.call(this,w)}}),Object.defineProperty(e,n,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(w){i=""+w},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Ii(e){e._valueTracker||(e._valueTracker=Y1(e))}function am(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var r=n.getValue(),i="";return e&&(i=nm(e)?e.checked?"true":"false":e.value),e=i,e!==r?(n.setValue(e),!0):!1}function Gi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var K1=/[\n"\\]/g;function Nn(e){return e.replace(K1,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function cu(e,n,r,i,d,p,w,N){e.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?e.type=w:e.removeAttribute("type"),n!=null?w==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+jn(n)):e.value!==""+jn(n)&&(e.value=""+jn(n)):w!=="submit"&&w!=="reset"||e.removeAttribute("value"),n!=null?uu(e,w,jn(n)):r!=null?uu(e,w,jn(r)):i!=null&&e.removeAttribute("value"),d==null&&p!=null&&(e.defaultChecked=!!p),d!=null&&(e.checked=d&&typeof d!="function"&&typeof d!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?e.name=""+jn(N):e.removeAttribute("name")}function rm(e,n,r,i,d,p,w,N){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.type=p),n!=null||r!=null){if(!(p!=="submit"&&p!=="reset"||n!=null))return;r=r!=null?""+jn(r):"",n=n!=null?""+jn(n):r,N||n===e.value||(e.value=n),e.defaultValue=n}i=i??d,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=N?e.checked:!!i,e.defaultChecked=!!i,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(e.name=w)}function uu(e,n,r){n==="number"&&Gi(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function ll(e,n,r,i){if(e=e.options,n){n={};for(var d=0;d<r.length;d++)n["$"+r[d]]=!0;for(r=0;r<e.length;r++)d=n.hasOwnProperty("$"+e[r].value),e[r].selected!==d&&(e[r].selected=d),d&&i&&(e[r].defaultSelected=!0)}else{for(r=""+jn(r),n=null,d=0;d<e.length;d++){if(e[d].value===r){e[d].selected=!0,i&&(e[d].defaultSelected=!0);return}n!==null||e[d].disabled||(n=e[d])}n!==null&&(n.selected=!0)}}function lm(e,n,r){if(n!=null&&(n=""+jn(n),n!==e.value&&(e.value=n),r==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=r!=null?""+jn(r):""}function om(e,n,r,i){if(n==null){if(i!=null){if(r!=null)throw Error(o(92));if(ae(i)){if(1<i.length)throw Error(o(93));i=i[0]}r=i}r==null&&(r=""),n=r}r=jn(n),e.defaultValue=r,i=e.textContent,i===r&&i!==""&&i!==null&&(e.value=i)}function ol(e,n){if(n){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=n;return}}e.textContent=n}var X1=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 im(e,n,r){var i=n.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?i?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":i?e.setProperty(n,r):typeof r!="number"||r===0||X1.has(n)?n==="float"?e.cssFloat=r:e[n]=(""+r).trim():e[n]=r+"px"}function sm(e,n,r){if(n!=null&&typeof n!="object")throw Error(o(62));if(e=e.style,r!=null){for(var i in r)!r.hasOwnProperty(i)||n!=null&&n.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var d in n)i=n[d],n.hasOwnProperty(d)&&r[d]!==i&&im(e,d,i)}else for(var p in n)n.hasOwnProperty(p)&&im(e,p,n[p])}function du(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 Q1=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"]]),Z1=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Yi(e){return Z1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var fu=null;function hu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var il=null,sl=null;function cm(e){var n=ut(e);if(n&&(e=n.stateNode)){var r=e[pe]||null;e:switch(e=n.stateNode,n.type){case"input":if(cu(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),n=r.name,r.type==="radio"&&n!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+Nn(""+n)+'"][type="radio"]'),n=0;n<r.length;n++){var i=r[n];if(i!==e&&i.form===e.form){var d=i[pe]||null;if(!d)throw Error(o(90));cu(i,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(n=0;n<r.length;n++)i=r[n],i.form===e.form&&am(i)}break e;case"textarea":lm(e,r.value,r.defaultValue);break e;case"select":n=r.value,n!=null&&ll(e,!!r.multiple,n,!1)}}}var mu=!1;function um(e,n,r){if(mu)return e(n,r);mu=!0;try{var i=e(n);return i}finally{if(mu=!1,(il!==null||sl!==null)&&(Ms(),il&&(n=il,e=sl,sl=il=null,cm(n),e)))for(n=0;n<e.length;n++)cm(e[n])}}function vo(e,n){var r=e.stateNode;if(r===null)return null;var i=r[pe]||null;if(i===null)return null;r=i[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(o(231,n,typeof r));return r}var xa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pu=!1;if(xa)try{var yo={};Object.defineProperty(yo,"passive",{get:function(){pu=!0}}),window.addEventListener("test",yo,yo),window.removeEventListener("test",yo,yo)}catch{pu=!1}var qa=null,gu=null,Ki=null;function dm(){if(Ki)return Ki;var e,n=gu,r=n.length,i,d="value"in qa?qa.value:qa.textContent,p=d.length;for(e=0;e<r&&n[e]===d[e];e++);var w=r-e;for(i=1;i<=w&&n[r-i]===d[p-i];i++);return Ki=d.slice(e,1<i?1-i:void 0)}function Xi(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Qi(){return!0}function fm(){return!1}function en(e){function n(r,i,d,p,w){this._reactName=r,this._targetInst=d,this.type=i,this.nativeEvent=p,this.target=w,this.currentTarget=null;for(var N in e)e.hasOwnProperty(N)&&(r=e[N],this[N]=r?r(p):p[N]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?Qi:fm,this.isPropagationStopped=fm,this}return v(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Qi)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Qi)},persist:function(){},isPersistent:Qi}),n}var Or={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zi=en(Or),xo=v({},Or,{view:0,detail:0}),J1=en(xo),vu,yu,bo,Ji=v({},xo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bu,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!==bo&&(bo&&e.type==="mousemove"?(vu=e.screenX-bo.screenX,yu=e.screenY-bo.screenY):yu=vu=0,bo=e),vu)},movementY:function(e){return"movementY"in e?e.movementY:yu}}),hm=en(Ji),W1=v({},Ji,{dataTransfer:0}),ew=en(W1),tw=v({},xo,{relatedTarget:0}),xu=en(tw),nw=v({},Or,{animationName:0,elapsedTime:0,pseudoElement:0}),aw=en(nw),rw=v({},Or,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),lw=en(rw),ow=v({},Or,{data:0}),mm=en(ow),iw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},sw={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"},cw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function uw(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=cw[e])?!!n[e]:!1}function bu(){return uw}var dw=v({},xo,{key:function(e){if(e.key){var n=iw[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Xi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?sw[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bu,charCode:function(e){return e.type==="keypress"?Xi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Xi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),fw=en(dw),hw=v({},Ji,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),pm=en(hw),mw=v({},xo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bu}),pw=en(mw),gw=v({},Or,{propertyName:0,elapsedTime:0,pseudoElement:0}),vw=en(gw),yw=v({},Ji,{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}),xw=en(yw),bw=v({},Or,{newState:0,oldState:0}),ww=en(bw),Sw=[9,13,27,32],wu=xa&&"CompositionEvent"in window,wo=null;xa&&"documentMode"in document&&(wo=document.documentMode);var jw=xa&&"TextEvent"in window&&!wo,gm=xa&&(!wu||wo&&8<wo&&11>=wo),vm=" ",ym=!1;function xm(e,n){switch(e){case"keyup":return Sw.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var cl=!1;function Nw(e,n){switch(e){case"compositionend":return bm(n);case"keypress":return n.which!==32?null:(ym=!0,vm);case"textInput":return e=n.data,e===vm&&ym?null:e;default:return null}}function Cw(e,n){if(cl)return e==="compositionend"||!wu&&xm(e,n)?(e=dm(),Ki=gu=qa=null,cl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return gm&&n.locale!=="ko"?null:n.data;default:return null}}var Ew={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 wm(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!Ew[e.type]:n==="textarea"}function Sm(e,n,r,i){il?sl?sl.push(i):sl=[i]:il=i,n=Ps(n,"onChange"),0<n.length&&(r=new Zi("onChange","change",null,r,i),e.push({event:r,listeners:n}))}var So=null,jo=null;function _w(e){nv(e,0)}function Wi(e){var n=Nt(e);if(am(n))return e}function jm(e,n){if(e==="change")return n}var Nm=!1;if(xa){var Su;if(xa){var ju="oninput"in document;if(!ju){var Cm=document.createElement("div");Cm.setAttribute("oninput","return;"),ju=typeof Cm.oninput=="function"}Su=ju}else Su=!1;Nm=Su&&(!document.documentMode||9<document.documentMode)}function Em(){So&&(So.detachEvent("onpropertychange",_m),jo=So=null)}function _m(e){if(e.propertyName==="value"&&Wi(jo)){var n=[];Sm(n,jo,e,hu(e)),um(_w,n)}}function Rw(e,n,r){e==="focusin"?(Em(),So=n,jo=r,So.attachEvent("onpropertychange",_m)):e==="focusout"&&Em()}function Ow(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Wi(jo)}function Aw(e,n){if(e==="click")return Wi(n)}function Tw(e,n){if(e==="input"||e==="change")return Wi(n)}function Mw(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var sn=typeof Object.is=="function"?Object.is:Mw;function No(e,n){if(sn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var r=Object.keys(e),i=Object.keys(n);if(r.length!==i.length)return!1;for(i=0;i<r.length;i++){var d=r[i];if(!rt.call(n,d)||!sn(e[d],n[d]))return!1}return!0}function Rm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Om(e,n){var r=Rm(e);e=0;for(var i;r;){if(r.nodeType===3){if(i=e+r.textContent.length,e<=n&&i>=n)return{node:r,offset:n-e};e=i}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Rm(r)}}function Am(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Am(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Tm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Gi(e.document);n instanceof e.HTMLIFrameElement;){try{var r=typeof n.contentWindow.location.href=="string"}catch{r=!1}if(r)e=n.contentWindow;else break;n=Gi(e.document)}return n}function Nu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var kw=xa&&"documentMode"in document&&11>=document.documentMode,ul=null,Cu=null,Co=null,Eu=!1;function Mm(e,n,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Eu||ul==null||ul!==Gi(i)||(i=ul,"selectionStart"in i&&Nu(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Co&&No(Co,i)||(Co=i,i=Ps(Cu,"onSelect"),0<i.length&&(n=new Zi("onSelect","select",null,n,r),e.push({event:n,listeners:i}),n.target=ul)))}function Ar(e,n){var r={};return r[e.toLowerCase()]=n.toLowerCase(),r["Webkit"+e]="webkit"+n,r["Moz"+e]="moz"+n,r}var dl={animationend:Ar("Animation","AnimationEnd"),animationiteration:Ar("Animation","AnimationIteration"),animationstart:Ar("Animation","AnimationStart"),transitionrun:Ar("Transition","TransitionRun"),transitionstart:Ar("Transition","TransitionStart"),transitioncancel:Ar("Transition","TransitionCancel"),transitionend:Ar("Transition","TransitionEnd")},_u={},km={};xa&&(km=document.createElement("div").style,"AnimationEvent"in window||(delete dl.animationend.animation,delete dl.animationiteration.animation,delete dl.animationstart.animation),"TransitionEvent"in window||delete dl.transitionend.transition);function Tr(e){if(_u[e])return _u[e];if(!dl[e])return e;var n=dl[e],r;for(r in n)if(n.hasOwnProperty(r)&&r in km)return _u[e]=n[r];return e}var Dm=Tr("animationend"),Lm=Tr("animationiteration"),zm=Tr("animationstart"),Dw=Tr("transitionrun"),Lw=Tr("transitionstart"),zw=Tr("transitioncancel"),Um=Tr("transitionend"),Pm=new Map,Ru="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(" ");Ru.push("scrollEnd");function Pn(e,n){Pm.set(e,n),on(n,[e])}var Hm=new WeakMap;function Cn(e,n){if(typeof e=="object"&&e!==null){var r=Hm.get(e);return r!==void 0?r:(n={value:e,source:n,stack:Vi(n)},Hm.set(e,n),n)}return{value:e,source:n,stack:Vi(n)}}var En=[],fl=0,Ou=0;function es(){for(var e=fl,n=Ou=fl=0;n<e;){var r=En[n];En[n++]=null;var i=En[n];En[n++]=null;var d=En[n];En[n++]=null;var p=En[n];if(En[n++]=null,i!==null&&d!==null){var w=i.pending;w===null?d.next=d:(d.next=w.next,w.next=d),i.pending=d}p!==0&&Bm(r,d,p)}}function ts(e,n,r,i){En[fl++]=e,En[fl++]=n,En[fl++]=r,En[fl++]=i,Ou|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function Au(e,n,r,i){return ts(e,n,r,i),ns(e)}function hl(e,n){return ts(e,null,null,n),ns(e)}function Bm(e,n,r){e.lanes|=r;var i=e.alternate;i!==null&&(i.lanes|=r);for(var d=!1,p=e.return;p!==null;)p.childLanes|=r,i=p.alternate,i!==null&&(i.childLanes|=r),p.tag===22&&(e=p.stateNode,e===null||e._visibility&1||(d=!0)),e=p,p=p.return;return e.tag===3?(p=e.stateNode,d&&n!==null&&(d=31-Ft(r),e=p.hiddenUpdates,i=e[d],i===null?e[d]=[n]:i.push(n),n.lane=r|536870912),p):null}function ns(e){if(50<Qo)throw Qo=0,zd=null,Error(o(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var ml={};function Uw(e,n,r,i){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function cn(e,n,r,i){return new Uw(e,n,r,i)}function Tu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ba(e,n){var r=e.alternate;return r===null?(r=cn(e.tag,n,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=n,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,n=e.dependencies,r.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function $m(e,n){e.flags&=65011714;var r=e.alternate;return r===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,n=r.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function as(e,n,r,i,d,p){var w=0;if(i=e,typeof e=="function")Tu(e)&&(w=1);else if(typeof e=="string")w=HS(e,r,ie.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ne:return e=cn(31,r,n,d),e.elementType=ne,e.lanes=p,e;case j:return Mr(r.children,d,p,n);case C:w=8,d|=24;break;case _:return e=cn(12,r,n,d|2),e.elementType=_,e.lanes=p,e;case D:return e=cn(13,r,n,d),e.elementType=D,e.lanes=p,e;case R:return e=cn(19,r,n,d),e.elementType=R,e.lanes=p,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case E:case M:w=10;break e;case A:w=9;break e;case z:w=11;break e;case P:w=14;break e;case B:w=16,i=null;break e}w=29,r=Error(o(130,e===null?"null":typeof e,"")),i=null}return n=cn(w,r,n,d),n.elementType=e,n.type=i,n.lanes=p,n}function Mr(e,n,r,i){return e=cn(7,e,i,n),e.lanes=r,e}function Mu(e,n,r){return e=cn(6,e,null,n),e.lanes=r,e}function ku(e,n,r){return n=cn(4,e.children!==null?e.children:[],e.key,n),n.lanes=r,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var pl=[],gl=0,rs=null,ls=0,_n=[],Rn=0,kr=null,wa=1,Sa="";function Dr(e,n){pl[gl++]=ls,pl[gl++]=rs,rs=e,ls=n}function Fm(e,n,r){_n[Rn++]=wa,_n[Rn++]=Sa,_n[Rn++]=kr,kr=e;var i=wa;e=Sa;var d=32-Ft(i)-1;i&=~(1<<d),r+=1;var p=32-Ft(n)+d;if(30<p){var w=d-d%5;p=(i&(1<<w)-1).toString(32),i>>=w,d-=w,wa=1<<32-Ft(n)+d|r<<d|i,Sa=p+e}else wa=1<<p|r<<d|i,Sa=e}function Du(e){e.return!==null&&(Dr(e,1),Fm(e,1,0))}function Lu(e){for(;e===rs;)rs=pl[--gl],pl[gl]=null,ls=pl[--gl],pl[gl]=null;for(;e===kr;)kr=_n[--Rn],_n[Rn]=null,Sa=_n[--Rn],_n[Rn]=null,wa=_n[--Rn],_n[Rn]=null}var Jt=null,Et=null,ct=!1,Lr=null,Jn=!1,zu=Error(o(519));function zr(e){var n=Error(o(418,""));throw Ro(Cn(n,e)),zu}function qm(e){var n=e.stateNode,r=e.type,i=e.memoizedProps;switch(n[fe]=e,n[pe]=i,r){case"dialog":et("cancel",n),et("close",n);break;case"iframe":case"object":case"embed":et("load",n);break;case"video":case"audio":for(r=0;r<Jo.length;r++)et(Jo[r],n);break;case"source":et("error",n);break;case"img":case"image":case"link":et("error",n),et("load",n);break;case"details":et("toggle",n);break;case"input":et("invalid",n),rm(n,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0),Ii(n);break;case"select":et("invalid",n);break;case"textarea":et("invalid",n),om(n,i.value,i.defaultValue,i.children),Ii(n)}r=i.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||n.textContent===""+r||i.suppressHydrationWarning===!0||ov(n.textContent,r)?(i.popover!=null&&(et("beforetoggle",n),et("toggle",n)),i.onScroll!=null&&et("scroll",n),i.onScrollEnd!=null&&et("scrollend",n),i.onClick!=null&&(n.onclick=Hs),n=!0):n=!1,n||zr(e)}function Vm(e){for(Jt=e.return;Jt;)switch(Jt.tag){case 5:case 13:Jn=!1;return;case 27:case 3:Jn=!0;return;default:Jt=Jt.return}}function Eo(e){if(e!==Jt)return!1;if(!ct)return Vm(e),ct=!0,!1;var n=e.tag,r;if((r=n!==3&&n!==27)&&((r=n===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||Jd(e.type,e.memoizedProps)),r=!r),r&&Et&&zr(e),Vm(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8)if(r=e.data,r==="/$"){if(n===0){Et=Bn(e.nextSibling);break e}n--}else r!=="$"&&r!=="$!"&&r!=="$?"||n++;e=e.nextSibling}Et=null}}else n===27?(n=Et,lr(e.type)?(e=nf,nf=null,Et=e):Et=n):Et=Jt?Bn(e.stateNode.nextSibling):null;return!0}function _o(){Et=Jt=null,ct=!1}function Im(){var e=Lr;return e!==null&&(an===null?an=e:an.push.apply(an,e),Lr=null),e}function Ro(e){Lr===null?Lr=[e]:Lr.push(e)}var Uu=K(null),Ur=null,ja=null;function Va(e,n,r){Q(Uu,n._currentValue),n._currentValue=r}function Na(e){e._currentValue=Uu.current,$(Uu)}function Pu(e,n,r){for(;e!==null;){var i=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,i!==null&&(i.childLanes|=n)):i!==null&&(i.childLanes&n)!==n&&(i.childLanes|=n),e===r)break;e=e.return}}function Hu(e,n,r,i){var d=e.child;for(d!==null&&(d.return=e);d!==null;){var p=d.dependencies;if(p!==null){var w=d.child;p=p.firstContext;e:for(;p!==null;){var N=p;p=d;for(var L=0;L<n.length;L++)if(N.context===n[L]){p.lanes|=r,N=p.alternate,N!==null&&(N.lanes|=r),Pu(p.return,r,e),i||(w=null);break e}p=N.next}}else if(d.tag===18){if(w=d.return,w===null)throw Error(o(341));w.lanes|=r,p=w.alternate,p!==null&&(p.lanes|=r),Pu(w,r,e),w=null}else w=d.child;if(w!==null)w.return=d;else for(w=d;w!==null;){if(w===e){w=null;break}if(d=w.sibling,d!==null){d.return=w.return,w=d;break}w=w.return}d=w}}function Oo(e,n,r,i){e=null;for(var d=n,p=!1;d!==null;){if(!p){if((d.flags&524288)!==0)p=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var w=d.alternate;if(w===null)throw Error(o(387));if(w=w.memoizedProps,w!==null){var N=d.type;sn(d.pendingProps.value,w.value)||(e!==null?e.push(N):e=[N])}}else if(d===we.current){if(w=d.alternate,w===null)throw Error(o(387));w.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(e!==null?e.push(ri):e=[ri])}d=d.return}e!==null&&Hu(n,e,r,i),n.flags|=262144}function os(e){for(e=e.firstContext;e!==null;){if(!sn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Pr(e){Ur=e,ja=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Yt(e){return Gm(Ur,e)}function is(e,n){return Ur===null&&Pr(e),Gm(e,n)}function Gm(e,n){var r=n._currentValue;if(n={context:n,memoizedValue:r,next:null},ja===null){if(e===null)throw Error(o(308));ja=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else ja=ja.next=n;return r}var Pw=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(r,i){e.push(i)}};this.abort=function(){n.aborted=!0,e.forEach(function(r){return r()})}},Hw=t.unstable_scheduleCallback,Bw=t.unstable_NormalPriority,Dt={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Bu(){return{controller:new Pw,data:new Map,refCount:0}}function Ao(e){e.refCount--,e.refCount===0&&Hw(Bw,function(){e.controller.abort()})}var To=null,$u=0,vl=0,yl=null;function $w(e,n){if(To===null){var r=To=[];$u=0,vl=qd(),yl={status:"pending",value:void 0,then:function(i){r.push(i)}}}return $u++,n.then(Ym,Ym),n}function Ym(){if(--$u===0&&To!==null){yl!==null&&(yl.status="fulfilled");var e=To;To=null,vl=0,yl=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function Fw(e,n){var r=[],i={status:"pending",value:null,reason:null,then:function(d){r.push(d)}};return e.then(function(){i.status="fulfilled",i.value=n;for(var d=0;d<r.length;d++)(0,r[d])(n)},function(d){for(i.status="rejected",i.reason=d,d=0;d<r.length;d++)(0,r[d])(void 0)}),i}var Km=T.S;T.S=function(e,n){typeof n=="object"&&n!==null&&typeof n.then=="function"&&$w(e,n),Km!==null&&Km(e,n)};var Hr=K(null);function Fu(){var e=Hr.current;return e!==null?e:yt.pooledCache}function ss(e,n){n===null?Q(Hr,Hr.current):Q(Hr,n.pool)}function Xm(){var e=Fu();return e===null?null:{parent:Dt._currentValue,pool:e}}var Mo=Error(o(460)),Qm=Error(o(474)),cs=Error(o(542)),qu={then:function(){}};function Zm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function us(){}function Jm(e,n,r){switch(r=e[r],r===void 0?e.push(n):r!==n&&(n.then(us,us),n=r),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,ep(e),e;default:if(typeof n.status=="string")n.then(us,us);else{if(e=yt,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=n,e.status="pending",e.then(function(i){if(n.status==="pending"){var d=n;d.status="fulfilled",d.value=i}},function(i){if(n.status==="pending"){var d=n;d.status="rejected",d.reason=i}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,ep(e),e}throw ko=n,Mo}}var ko=null;function Wm(){if(ko===null)throw Error(o(459));var e=ko;return ko=null,e}function ep(e){if(e===Mo||e===cs)throw Error(o(483))}var Ia=!1;function Vu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Iu(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ga(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ya(e,n,r){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(dt&2)!==0){var d=i.pending;return d===null?n.next=n:(n.next=d.next,d.next=n),i.pending=n,n=ns(e),Bm(e,null,r),n}return ts(e,i,n,r),ns(e)}function Do(e,n,r){if(n=n.updateQueue,n!==null&&(n=n.shared,(r&4194048)!==0)){var i=n.lanes;i&=e.pendingLanes,r|=i,n.lanes=r,_r(e,r)}}function Gu(e,n){var r=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,r===i)){var d=null,p=null;if(r=r.firstBaseUpdate,r!==null){do{var w={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};p===null?d=p=w:p=p.next=w,r=r.next}while(r!==null);p===null?d=p=n:p=p.next=n}else d=p=n;r={baseState:i.baseState,firstBaseUpdate:d,lastBaseUpdate:p,shared:i.shared,callbacks:i.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=n:e.next=n,r.lastBaseUpdate=n}var Yu=!1;function Lo(){if(Yu){var e=yl;if(e!==null)throw e}}function zo(e,n,r,i){Yu=!1;var d=e.updateQueue;Ia=!1;var p=d.firstBaseUpdate,w=d.lastBaseUpdate,N=d.shared.pending;if(N!==null){d.shared.pending=null;var L=N,X=L.next;L.next=null,w===null?p=X:w.next=X,w=L;var oe=e.alternate;oe!==null&&(oe=oe.updateQueue,N=oe.lastBaseUpdate,N!==w&&(N===null?oe.firstBaseUpdate=X:N.next=X,oe.lastBaseUpdate=L))}if(p!==null){var ce=d.baseState;w=0,oe=X=L=null,N=p;do{var J=N.lane&-536870913,W=J!==N.lane;if(W?(tt&J)===J:(i&J)===J){J!==0&&J===vl&&(Yu=!0),oe!==null&&(oe=oe.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var Fe=e,ze=N;J=n;var gt=r;switch(ze.tag){case 1:if(Fe=ze.payload,typeof Fe=="function"){ce=Fe.call(gt,ce,J);break e}ce=Fe;break e;case 3:Fe.flags=Fe.flags&-65537|128;case 0:if(Fe=ze.payload,J=typeof Fe=="function"?Fe.call(gt,ce,J):Fe,J==null)break e;ce=v({},ce,J);break e;case 2:Ia=!0}}J=N.callback,J!==null&&(e.flags|=64,W&&(e.flags|=8192),W=d.callbacks,W===null?d.callbacks=[J]:W.push(J))}else W={lane:J,tag:N.tag,payload:N.payload,callback:N.callback,next:null},oe===null?(X=oe=W,L=ce):oe=oe.next=W,w|=J;if(N=N.next,N===null){if(N=d.shared.pending,N===null)break;W=N,N=W.next,W.next=null,d.lastBaseUpdate=W,d.shared.pending=null}}while(!0);oe===null&&(L=ce),d.baseState=L,d.firstBaseUpdate=X,d.lastBaseUpdate=oe,p===null&&(d.shared.lanes=0),tr|=w,e.lanes=w,e.memoizedState=ce}}function tp(e,n){if(typeof e!="function")throw Error(o(191,e));e.call(n)}function np(e,n){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)tp(r[e],n)}var xl=K(null),ds=K(0);function ap(e,n){e=Ta,Q(ds,e),Q(xl,n),Ta=e|n.baseLanes}function Ku(){Q(ds,Ta),Q(xl,xl.current)}function Xu(){Ta=ds.current,$(xl),$(ds)}var Ka=0,Ke=null,mt=null,Mt=null,fs=!1,bl=!1,Br=!1,hs=0,Uo=0,wl=null,qw=0;function Ot(){throw Error(o(321))}function Qu(e,n){if(n===null)return!1;for(var r=0;r<n.length&&r<e.length;r++)if(!sn(e[r],n[r]))return!1;return!0}function Zu(e,n,r,i,d,p){return Ka=p,Ke=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,T.H=e===null||e.memoizedState===null?Bp:$p,Br=!1,p=r(i,d),Br=!1,bl&&(p=lp(n,r,i,d)),rp(e),p}function rp(e){T.H=xs;var n=mt!==null&&mt.next!==null;if(Ka=0,Mt=mt=Ke=null,fs=!1,Uo=0,wl=null,n)throw Error(o(300));e===null||Pt||(e=e.dependencies,e!==null&&os(e)&&(Pt=!0))}function lp(e,n,r,i){Ke=e;var d=0;do{if(bl&&(wl=null),Uo=0,bl=!1,25<=d)throw Error(o(301));if(d+=1,Mt=mt=null,e.updateQueue!=null){var p=e.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}T.H=Qw,p=n(r,i)}while(bl);return p}function Vw(){var e=T.H,n=e.useState()[0];return n=typeof n.then=="function"?Po(n):n,e=e.useState()[0],(mt!==null?mt.memoizedState:null)!==e&&(Ke.flags|=1024),n}function Ju(){var e=hs!==0;return hs=0,e}function Wu(e,n,r){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~r}function ed(e){if(fs){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}fs=!1}Ka=0,Mt=mt=Ke=null,bl=!1,Uo=hs=0,wl=null}function tn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mt===null?Ke.memoizedState=Mt=e:Mt=Mt.next=e,Mt}function kt(){if(mt===null){var e=Ke.alternate;e=e!==null?e.memoizedState:null}else e=mt.next;var n=Mt===null?Ke.memoizedState:Mt.next;if(n!==null)Mt=n,mt=e;else{if(e===null)throw Ke.alternate===null?Error(o(467)):Error(o(310));mt=e,e={memoizedState:mt.memoizedState,baseState:mt.baseState,baseQueue:mt.baseQueue,queue:mt.queue,next:null},Mt===null?Ke.memoizedState=Mt=e:Mt=Mt.next=e}return Mt}function td(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Po(e){var n=Uo;return Uo+=1,wl===null&&(wl=[]),e=Jm(wl,e,n),n=Ke,(Mt===null?n.memoizedState:Mt.next)===null&&(n=n.alternate,T.H=n===null||n.memoizedState===null?Bp:$p),e}function ms(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Po(e);if(e.$$typeof===M)return Yt(e)}throw Error(o(438,String(e)))}function nd(e){var n=null,r=Ke.updateQueue;if(r!==null&&(n=r.memoCache),n==null){var i=Ke.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(n={data:i.data.map(function(d){return d.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),r===null&&(r=td(),Ke.updateQueue=r),r.memoCache=n,r=n.data[n.index],r===void 0)for(r=n.data[n.index]=Array(e),i=0;i<e;i++)r[i]=re;return n.index++,r}function Ca(e,n){return typeof n=="function"?n(e):n}function ps(e){var n=kt();return ad(n,mt,e)}function ad(e,n,r){var i=e.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=r;var d=e.baseQueue,p=i.pending;if(p!==null){if(d!==null){var w=d.next;d.next=p.next,p.next=w}n.baseQueue=d=p,i.pending=null}if(p=e.baseState,d===null)e.memoizedState=p;else{n=d.next;var N=w=null,L=null,X=n,oe=!1;do{var ce=X.lane&-536870913;if(ce!==X.lane?(tt&ce)===ce:(Ka&ce)===ce){var J=X.revertLane;if(J===0)L!==null&&(L=L.next={lane:0,revertLane:0,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),ce===vl&&(oe=!0);else if((Ka&J)===J){X=X.next,J===vl&&(oe=!0);continue}else ce={lane:0,revertLane:X.revertLane,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},L===null?(N=L=ce,w=p):L=L.next=ce,Ke.lanes|=J,tr|=J;ce=X.action,Br&&r(p,ce),p=X.hasEagerState?X.eagerState:r(p,ce)}else J={lane:ce,revertLane:X.revertLane,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},L===null?(N=L=J,w=p):L=L.next=J,Ke.lanes|=ce,tr|=ce;X=X.next}while(X!==null&&X!==n);if(L===null?w=p:L.next=N,!sn(p,e.memoizedState)&&(Pt=!0,oe&&(r=yl,r!==null)))throw r;e.memoizedState=p,e.baseState=w,e.baseQueue=L,i.lastRenderedState=p}return d===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function rd(e){var n=kt(),r=n.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=e;var i=r.dispatch,d=r.pending,p=n.memoizedState;if(d!==null){r.pending=null;var w=d=d.next;do p=e(p,w.action),w=w.next;while(w!==d);sn(p,n.memoizedState)||(Pt=!0),n.memoizedState=p,n.baseQueue===null&&(n.baseState=p),r.lastRenderedState=p}return[p,i]}function op(e,n,r){var i=Ke,d=kt(),p=ct;if(p){if(r===void 0)throw Error(o(407));r=r()}else r=n();var w=!sn((mt||d).memoizedState,r);w&&(d.memoizedState=r,Pt=!0),d=d.queue;var N=cp.bind(null,i,d,e);if(Ho(2048,8,N,[e]),d.getSnapshot!==n||w||Mt!==null&&Mt.memoizedState.tag&1){if(i.flags|=2048,Sl(9,gs(),sp.bind(null,i,d,r,n),null),yt===null)throw Error(o(349));p||(Ka&124)!==0||ip(i,n,r)}return r}function ip(e,n,r){e.flags|=16384,e={getSnapshot:n,value:r},n=Ke.updateQueue,n===null?(n=td(),Ke.updateQueue=n,n.stores=[e]):(r=n.stores,r===null?n.stores=[e]:r.push(e))}function sp(e,n,r,i){n.value=r,n.getSnapshot=i,up(n)&&dp(e)}function cp(e,n,r){return r(function(){up(n)&&dp(e)})}function up(e){var n=e.getSnapshot;e=e.value;try{var r=n();return!sn(e,r)}catch{return!0}}function dp(e){var n=hl(e,2);n!==null&&mn(n,e,2)}function ld(e){var n=tn();if(typeof e=="function"){var r=e;if(e=r(),Br){Un(!0);try{r()}finally{Un(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ca,lastRenderedState:e},n}function fp(e,n,r,i){return e.baseState=r,ad(e,mt,typeof i=="function"?i:Ca)}function Iw(e,n,r,i,d){if(ys(e))throw Error(o(485));if(e=n.action,e!==null){var p={payload:d,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){p.listeners.push(w)}};T.T!==null?r(!0):p.isTransition=!1,i(p),r=n.pending,r===null?(p.next=n.pending=p,hp(n,p)):(p.next=r.next,n.pending=r.next=p)}}function hp(e,n){var r=n.action,i=n.payload,d=e.state;if(n.isTransition){var p=T.T,w={};T.T=w;try{var N=r(d,i),L=T.S;L!==null&&L(w,N),mp(e,n,N)}catch(X){od(e,n,X)}finally{T.T=p}}else try{p=r(d,i),mp(e,n,p)}catch(X){od(e,n,X)}}function mp(e,n,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(i){pp(e,n,i)},function(i){return od(e,n,i)}):pp(e,n,r)}function pp(e,n,r){n.status="fulfilled",n.value=r,gp(n),e.state=r,n=e.pending,n!==null&&(r=n.next,r===n?e.pending=null:(r=r.next,n.next=r,hp(e,r)))}function od(e,n,r){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do n.status="rejected",n.reason=r,gp(n),n=n.next;while(n!==i)}e.action=null}function gp(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function vp(e,n){return n}function yp(e,n){if(ct){var r=yt.formState;if(r!==null){e:{var i=Ke;if(ct){if(Et){t:{for(var d=Et,p=Jn;d.nodeType!==8;){if(!p){d=null;break t}if(d=Bn(d.nextSibling),d===null){d=null;break t}}p=d.data,d=p==="F!"||p==="F"?d:null}if(d){Et=Bn(d.nextSibling),i=d.data==="F!";break e}}zr(i)}i=!1}i&&(n=r[0])}}return r=tn(),r.memoizedState=r.baseState=n,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vp,lastRenderedState:n},r.queue=i,r=Up.bind(null,Ke,i),i.dispatch=r,i=ld(!1),p=dd.bind(null,Ke,!1,i.queue),i=tn(),d={state:n,dispatch:null,action:e,pending:null},i.queue=d,r=Iw.bind(null,Ke,d,p,r),d.dispatch=r,i.memoizedState=e,[n,r,!1]}function xp(e){var n=kt();return bp(n,mt,e)}function bp(e,n,r){if(n=ad(e,n,vp)[0],e=ps(Ca)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var i=Po(n)}catch(w){throw w===Mo?cs:w}else i=n;n=kt();var d=n.queue,p=d.dispatch;return r!==n.memoizedState&&(Ke.flags|=2048,Sl(9,gs(),Gw.bind(null,d,r),null)),[i,p,e]}function Gw(e,n){e.action=n}function wp(e){var n=kt(),r=mt;if(r!==null)return bp(n,r,e);kt(),n=n.memoizedState,r=kt();var i=r.queue.dispatch;return r.memoizedState=e,[n,i,!1]}function Sl(e,n,r,i){return e={tag:e,create:r,deps:i,inst:n,next:null},n=Ke.updateQueue,n===null&&(n=td(),Ke.updateQueue=n),r=n.lastEffect,r===null?n.lastEffect=e.next=e:(i=r.next,r.next=e,e.next=i,n.lastEffect=e),e}function gs(){return{destroy:void 0,resource:void 0}}function Sp(){return kt().memoizedState}function vs(e,n,r,i){var d=tn();i=i===void 0?null:i,Ke.flags|=e,d.memoizedState=Sl(1|n,gs(),r,i)}function Ho(e,n,r,i){var d=kt();i=i===void 0?null:i;var p=d.memoizedState.inst;mt!==null&&i!==null&&Qu(i,mt.memoizedState.deps)?d.memoizedState=Sl(n,p,r,i):(Ke.flags|=e,d.memoizedState=Sl(1|n,p,r,i))}function jp(e,n){vs(8390656,8,e,n)}function Np(e,n){Ho(2048,8,e,n)}function Cp(e,n){return Ho(4,2,e,n)}function Ep(e,n){return Ho(4,4,e,n)}function _p(e,n){if(typeof n=="function"){e=e();var r=n(e);return function(){typeof r=="function"?r():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function Rp(e,n,r){r=r!=null?r.concat([e]):null,Ho(4,4,_p.bind(null,n,e),r)}function id(){}function Op(e,n){var r=kt();n=n===void 0?null:n;var i=r.memoizedState;return n!==null&&Qu(n,i[1])?i[0]:(r.memoizedState=[e,n],e)}function Ap(e,n){var r=kt();n=n===void 0?null:n;var i=r.memoizedState;if(n!==null&&Qu(n,i[1]))return i[0];if(i=e(),Br){Un(!0);try{e()}finally{Un(!1)}}return r.memoizedState=[i,n],i}function sd(e,n,r){return r===void 0||(Ka&1073741824)!==0?e.memoizedState=n:(e.memoizedState=r,e=kg(),Ke.lanes|=e,tr|=e,r)}function Tp(e,n,r,i){return sn(r,n)?r:xl.current!==null?(e=sd(e,r,i),sn(e,n)||(Pt=!0),e):(Ka&42)===0?(Pt=!0,e.memoizedState=r):(e=kg(),Ke.lanes|=e,tr|=e,n)}function Mp(e,n,r,i,d){var p=Z.p;Z.p=p!==0&&8>p?p:8;var w=T.T,N={};T.T=N,dd(e,!1,n,r);try{var L=d(),X=T.S;if(X!==null&&X(N,L),L!==null&&typeof L=="object"&&typeof L.then=="function"){var oe=Fw(L,i);Bo(e,n,oe,hn(e))}else Bo(e,n,i,hn(e))}catch(ce){Bo(e,n,{then:function(){},status:"rejected",reason:ce},hn())}finally{Z.p=p,T.T=w}}function Yw(){}function cd(e,n,r,i){if(e.tag!==5)throw Error(o(476));var d=kp(e).queue;Mp(e,d,n,I,r===null?Yw:function(){return Dp(e),r(i)})}function kp(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ca,lastRenderedState:I},next:null};var r={};return n.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ca,lastRenderedState:r},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Dp(e){var n=kp(e).next.queue;Bo(e,n,{},hn())}function ud(){return Yt(ri)}function Lp(){return kt().memoizedState}function zp(){return kt().memoizedState}function Kw(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var r=hn();e=Ga(r);var i=Ya(n,e,r);i!==null&&(mn(i,n,r),Do(i,n,r)),n={cache:Bu()},e.payload=n;return}n=n.return}}function Xw(e,n,r){var i=hn();r={lane:i,revertLane:0,action:r,hasEagerState:!1,eagerState:null,next:null},ys(e)?Pp(n,r):(r=Au(e,n,r,i),r!==null&&(mn(r,e,i),Hp(r,n,i)))}function Up(e,n,r){var i=hn();Bo(e,n,r,i)}function Bo(e,n,r,i){var d={lane:i,revertLane:0,action:r,hasEagerState:!1,eagerState:null,next:null};if(ys(e))Pp(n,d);else{var p=e.alternate;if(e.lanes===0&&(p===null||p.lanes===0)&&(p=n.lastRenderedReducer,p!==null))try{var w=n.lastRenderedState,N=p(w,r);if(d.hasEagerState=!0,d.eagerState=N,sn(N,w))return ts(e,n,d,0),yt===null&&es(),!1}catch{}finally{}if(r=Au(e,n,d,i),r!==null)return mn(r,e,i),Hp(r,n,i),!0}return!1}function dd(e,n,r,i){if(i={lane:2,revertLane:qd(),action:i,hasEagerState:!1,eagerState:null,next:null},ys(e)){if(n)throw Error(o(479))}else n=Au(e,r,i,2),n!==null&&mn(n,e,2)}function ys(e){var n=e.alternate;return e===Ke||n!==null&&n===Ke}function Pp(e,n){bl=fs=!0;var r=e.pending;r===null?n.next=n:(n.next=r.next,r.next=n),e.pending=n}function Hp(e,n,r){if((r&4194048)!==0){var i=n.lanes;i&=e.pendingLanes,r|=i,n.lanes=r,_r(e,r)}}var xs={readContext:Yt,use:ms,useCallback:Ot,useContext:Ot,useEffect:Ot,useImperativeHandle:Ot,useLayoutEffect:Ot,useInsertionEffect:Ot,useMemo:Ot,useReducer:Ot,useRef:Ot,useState:Ot,useDebugValue:Ot,useDeferredValue:Ot,useTransition:Ot,useSyncExternalStore:Ot,useId:Ot,useHostTransitionStatus:Ot,useFormState:Ot,useActionState:Ot,useOptimistic:Ot,useMemoCache:Ot,useCacheRefresh:Ot},Bp={readContext:Yt,use:ms,useCallback:function(e,n){return tn().memoizedState=[e,n===void 0?null:n],e},useContext:Yt,useEffect:jp,useImperativeHandle:function(e,n,r){r=r!=null?r.concat([e]):null,vs(4194308,4,_p.bind(null,n,e),r)},useLayoutEffect:function(e,n){return vs(4194308,4,e,n)},useInsertionEffect:function(e,n){vs(4,2,e,n)},useMemo:function(e,n){var r=tn();n=n===void 0?null:n;var i=e();if(Br){Un(!0);try{e()}finally{Un(!1)}}return r.memoizedState=[i,n],i},useReducer:function(e,n,r){var i=tn();if(r!==void 0){var d=r(n);if(Br){Un(!0);try{r(n)}finally{Un(!1)}}}else d=n;return i.memoizedState=i.baseState=d,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:d},i.queue=e,e=e.dispatch=Xw.bind(null,Ke,e),[i.memoizedState,e]},useRef:function(e){var n=tn();return e={current:e},n.memoizedState=e},useState:function(e){e=ld(e);var n=e.queue,r=Up.bind(null,Ke,n);return n.dispatch=r,[e.memoizedState,r]},useDebugValue:id,useDeferredValue:function(e,n){var r=tn();return sd(r,e,n)},useTransition:function(){var e=ld(!1);return e=Mp.bind(null,Ke,e.queue,!0,!1),tn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,r){var i=Ke,d=tn();if(ct){if(r===void 0)throw Error(o(407));r=r()}else{if(r=n(),yt===null)throw Error(o(349));(tt&124)!==0||ip(i,n,r)}d.memoizedState=r;var p={value:r,getSnapshot:n};return d.queue=p,jp(cp.bind(null,i,p,e),[e]),i.flags|=2048,Sl(9,gs(),sp.bind(null,i,p,r,n),null),r},useId:function(){var e=tn(),n=yt.identifierPrefix;if(ct){var r=Sa,i=wa;r=(i&~(1<<32-Ft(i)-1)).toString(32)+r,n="«"+n+"R"+r,r=hs++,0<r&&(n+="H"+r.toString(32)),n+="»"}else r=qw++,n="«"+n+"r"+r.toString(32)+"»";return e.memoizedState=n},useHostTransitionStatus:ud,useFormState:yp,useActionState:yp,useOptimistic:function(e){var n=tn();n.memoizedState=n.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=r,n=dd.bind(null,Ke,!0,r),r.dispatch=n,[e,n]},useMemoCache:nd,useCacheRefresh:function(){return tn().memoizedState=Kw.bind(null,Ke)}},$p={readContext:Yt,use:ms,useCallback:Op,useContext:Yt,useEffect:Np,useImperativeHandle:Rp,useInsertionEffect:Cp,useLayoutEffect:Ep,useMemo:Ap,useReducer:ps,useRef:Sp,useState:function(){return ps(Ca)},useDebugValue:id,useDeferredValue:function(e,n){var r=kt();return Tp(r,mt.memoizedState,e,n)},useTransition:function(){var e=ps(Ca)[0],n=kt().memoizedState;return[typeof e=="boolean"?e:Po(e),n]},useSyncExternalStore:op,useId:Lp,useHostTransitionStatus:ud,useFormState:xp,useActionState:xp,useOptimistic:function(e,n){var r=kt();return fp(r,mt,e,n)},useMemoCache:nd,useCacheRefresh:zp},Qw={readContext:Yt,use:ms,useCallback:Op,useContext:Yt,useEffect:Np,useImperativeHandle:Rp,useInsertionEffect:Cp,useLayoutEffect:Ep,useMemo:Ap,useReducer:rd,useRef:Sp,useState:function(){return rd(Ca)},useDebugValue:id,useDeferredValue:function(e,n){var r=kt();return mt===null?sd(r,e,n):Tp(r,mt.memoizedState,e,n)},useTransition:function(){var e=rd(Ca)[0],n=kt().memoizedState;return[typeof e=="boolean"?e:Po(e),n]},useSyncExternalStore:op,useId:Lp,useHostTransitionStatus:ud,useFormState:wp,useActionState:wp,useOptimistic:function(e,n){var r=kt();return mt!==null?fp(r,mt,e,n):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:nd,useCacheRefresh:zp},jl=null,$o=0;function bs(e){var n=$o;return $o+=1,jl===null&&(jl=[]),Jm(jl,e,n)}function Fo(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function ws(e,n){throw n.$$typeof===x?Error(o(525)):(e=Object.prototype.toString.call(n),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Fp(e){var n=e._init;return n(e._payload)}function qp(e){function n(F,H){if(e){var Y=F.deletions;Y===null?(F.deletions=[H],F.flags|=16):Y.push(H)}}function r(F,H){if(!e)return null;for(;H!==null;)n(F,H),H=H.sibling;return null}function i(F){for(var H=new Map;F!==null;)F.key!==null?H.set(F.key,F):H.set(F.index,F),F=F.sibling;return H}function d(F,H){return F=ba(F,H),F.index=0,F.sibling=null,F}function p(F,H,Y){return F.index=Y,e?(Y=F.alternate,Y!==null?(Y=Y.index,Y<H?(F.flags|=67108866,H):Y):(F.flags|=67108866,H)):(F.flags|=1048576,H)}function w(F){return e&&F.alternate===null&&(F.flags|=67108866),F}function N(F,H,Y,se){return H===null||H.tag!==6?(H=Mu(Y,F.mode,se),H.return=F,H):(H=d(H,Y),H.return=F,H)}function L(F,H,Y,se){var je=Y.type;return je===j?oe(F,H,Y.props.children,se,Y.key):H!==null&&(H.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===B&&Fp(je)===H.type)?(H=d(H,Y.props),Fo(H,Y),H.return=F,H):(H=as(Y.type,Y.key,Y.props,null,F.mode,se),Fo(H,Y),H.return=F,H)}function X(F,H,Y,se){return H===null||H.tag!==4||H.stateNode.containerInfo!==Y.containerInfo||H.stateNode.implementation!==Y.implementation?(H=ku(Y,F.mode,se),H.return=F,H):(H=d(H,Y.children||[]),H.return=F,H)}function oe(F,H,Y,se,je){return H===null||H.tag!==7?(H=Mr(Y,F.mode,se,je),H.return=F,H):(H=d(H,Y),H.return=F,H)}function ce(F,H,Y){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return H=Mu(""+H,F.mode,Y),H.return=F,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case S:return Y=as(H.type,H.key,H.props,null,F.mode,Y),Fo(Y,H),Y.return=F,Y;case b:return H=ku(H,F.mode,Y),H.return=F,H;case B:var se=H._init;return H=se(H._payload),ce(F,H,Y)}if(ae(H)||q(H))return H=Mr(H,F.mode,Y,null),H.return=F,H;if(typeof H.then=="function")return ce(F,bs(H),Y);if(H.$$typeof===M)return ce(F,is(F,H),Y);ws(F,H)}return null}function J(F,H,Y,se){var je=H!==null?H.key:null;if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return je!==null?null:N(F,H,""+Y,se);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case S:return Y.key===je?L(F,H,Y,se):null;case b:return Y.key===je?X(F,H,Y,se):null;case B:return je=Y._init,Y=je(Y._payload),J(F,H,Y,se)}if(ae(Y)||q(Y))return je!==null?null:oe(F,H,Y,se,null);if(typeof Y.then=="function")return J(F,H,bs(Y),se);if(Y.$$typeof===M)return J(F,H,is(F,Y),se);ws(F,Y)}return null}function W(F,H,Y,se,je){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return F=F.get(Y)||null,N(H,F,""+se,je);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case S:return F=F.get(se.key===null?Y:se.key)||null,L(H,F,se,je);case b:return F=F.get(se.key===null?Y:se.key)||null,X(H,F,se,je);case B:var Ze=se._init;return se=Ze(se._payload),W(F,H,Y,se,je)}if(ae(se)||q(se))return F=F.get(Y)||null,oe(H,F,se,je,null);if(typeof se.then=="function")return W(F,H,Y,bs(se),je);if(se.$$typeof===M)return W(F,H,Y,is(H,se),je);ws(H,se)}return null}function Fe(F,H,Y,se){for(var je=null,Ze=null,ke=H,Pe=H=0,Bt=null;ke!==null&&Pe<Y.length;Pe++){ke.index>Pe?(Bt=ke,ke=null):Bt=ke.sibling;var st=J(F,ke,Y[Pe],se);if(st===null){ke===null&&(ke=Bt);break}e&&ke&&st.alternate===null&&n(F,ke),H=p(st,H,Pe),Ze===null?je=st:Ze.sibling=st,Ze=st,ke=Bt}if(Pe===Y.length)return r(F,ke),ct&&Dr(F,Pe),je;if(ke===null){for(;Pe<Y.length;Pe++)ke=ce(F,Y[Pe],se),ke!==null&&(H=p(ke,H,Pe),Ze===null?je=ke:Ze.sibling=ke,Ze=ke);return ct&&Dr(F,Pe),je}for(ke=i(ke);Pe<Y.length;Pe++)Bt=W(ke,F,Pe,Y[Pe],se),Bt!==null&&(e&&Bt.alternate!==null&&ke.delete(Bt.key===null?Pe:Bt.key),H=p(Bt,H,Pe),Ze===null?je=Bt:Ze.sibling=Bt,Ze=Bt);return e&&ke.forEach(function(ur){return n(F,ur)}),ct&&Dr(F,Pe),je}function ze(F,H,Y,se){if(Y==null)throw Error(o(151));for(var je=null,Ze=null,ke=H,Pe=H=0,Bt=null,st=Y.next();ke!==null&&!st.done;Pe++,st=Y.next()){ke.index>Pe?(Bt=ke,ke=null):Bt=ke.sibling;var ur=J(F,ke,st.value,se);if(ur===null){ke===null&&(ke=Bt);break}e&&ke&&ur.alternate===null&&n(F,ke),H=p(ur,H,Pe),Ze===null?je=ur:Ze.sibling=ur,Ze=ur,ke=Bt}if(st.done)return r(F,ke),ct&&Dr(F,Pe),je;if(ke===null){for(;!st.done;Pe++,st=Y.next())st=ce(F,st.value,se),st!==null&&(H=p(st,H,Pe),Ze===null?je=st:Ze.sibling=st,Ze=st);return ct&&Dr(F,Pe),je}for(ke=i(ke);!st.done;Pe++,st=Y.next())st=W(ke,F,Pe,st.value,se),st!==null&&(e&&st.alternate!==null&&ke.delete(st.key===null?Pe:st.key),H=p(st,H,Pe),Ze===null?je=st:Ze.sibling=st,Ze=st);return e&&ke.forEach(function(ZS){return n(F,ZS)}),ct&&Dr(F,Pe),je}function gt(F,H,Y,se){if(typeof Y=="object"&&Y!==null&&Y.type===j&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case S:e:{for(var je=Y.key;H!==null;){if(H.key===je){if(je=Y.type,je===j){if(H.tag===7){r(F,H.sibling),se=d(H,Y.props.children),se.return=F,F=se;break e}}else if(H.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===B&&Fp(je)===H.type){r(F,H.sibling),se=d(H,Y.props),Fo(se,Y),se.return=F,F=se;break e}r(F,H);break}else n(F,H);H=H.sibling}Y.type===j?(se=Mr(Y.props.children,F.mode,se,Y.key),se.return=F,F=se):(se=as(Y.type,Y.key,Y.props,null,F.mode,se),Fo(se,Y),se.return=F,F=se)}return w(F);case b:e:{for(je=Y.key;H!==null;){if(H.key===je)if(H.tag===4&&H.stateNode.containerInfo===Y.containerInfo&&H.stateNode.implementation===Y.implementation){r(F,H.sibling),se=d(H,Y.children||[]),se.return=F,F=se;break e}else{r(F,H);break}else n(F,H);H=H.sibling}se=ku(Y,F.mode,se),se.return=F,F=se}return w(F);case B:return je=Y._init,Y=je(Y._payload),gt(F,H,Y,se)}if(ae(Y))return Fe(F,H,Y,se);if(q(Y)){if(je=q(Y),typeof je!="function")throw Error(o(150));return Y=je.call(Y),ze(F,H,Y,se)}if(typeof Y.then=="function")return gt(F,H,bs(Y),se);if(Y.$$typeof===M)return gt(F,H,is(F,Y),se);ws(F,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint"?(Y=""+Y,H!==null&&H.tag===6?(r(F,H.sibling),se=d(H,Y),se.return=F,F=se):(r(F,H),se=Mu(Y,F.mode,se),se.return=F,F=se),w(F)):r(F,H)}return function(F,H,Y,se){try{$o=0;var je=gt(F,H,Y,se);return jl=null,je}catch(ke){if(ke===Mo||ke===cs)throw ke;var Ze=cn(29,ke,null,F.mode);return Ze.lanes=se,Ze.return=F,Ze}finally{}}}var Nl=qp(!0),Vp=qp(!1),On=K(null),Wn=null;function Xa(e){var n=e.alternate;Q(Lt,Lt.current&1),Q(On,e),Wn===null&&(n===null||xl.current!==null||n.memoizedState!==null)&&(Wn=e)}function Ip(e){if(e.tag===22){if(Q(Lt,Lt.current),Q(On,e),Wn===null){var n=e.alternate;n!==null&&n.memoizedState!==null&&(Wn=e)}}else Qa()}function Qa(){Q(Lt,Lt.current),Q(On,On.current)}function Ea(e){$(On),Wn===e&&(Wn=null),$(Lt)}var Lt=K(0);function Ss(e){for(var n=e;n!==null;){if(n.tag===13){var r=n.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||tf(r)))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}function fd(e,n,r,i){n=e.memoizedState,r=r(i,n),r=r==null?n:v({},n,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var hd={enqueueSetState:function(e,n,r){e=e._reactInternals;var i=hn(),d=Ga(i);d.payload=n,r!=null&&(d.callback=r),n=Ya(e,d,i),n!==null&&(mn(n,e,i),Do(n,e,i))},enqueueReplaceState:function(e,n,r){e=e._reactInternals;var i=hn(),d=Ga(i);d.tag=1,d.payload=n,r!=null&&(d.callback=r),n=Ya(e,d,i),n!==null&&(mn(n,e,i),Do(n,e,i))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var r=hn(),i=Ga(r);i.tag=2,n!=null&&(i.callback=n),n=Ya(e,i,r),n!==null&&(mn(n,e,r),Do(n,e,r))}};function Gp(e,n,r,i,d,p,w){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,p,w):n.prototype&&n.prototype.isPureReactComponent?!No(r,i)||!No(d,p):!0}function Yp(e,n,r,i){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(r,i),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(r,i),n.state!==e&&hd.enqueueReplaceState(n,n.state,null)}function $r(e,n){var r=n;if("ref"in n){r={};for(var i in n)i!=="ref"&&(r[i]=n[i])}if(e=e.defaultProps){r===n&&(r=v({},r));for(var d in e)r[d]===void 0&&(r[d]=e[d])}return r}var js=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=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(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function Kp(e){js(e)}function Xp(e){console.error(e)}function Qp(e){js(e)}function Ns(e,n){try{var r=e.onUncaughtError;r(n.value,{componentStack:n.stack})}catch(i){setTimeout(function(){throw i})}}function Zp(e,n,r){try{var i=e.onCaughtError;i(r.value,{componentStack:r.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function md(e,n,r){return r=Ga(r),r.tag=3,r.payload={element:null},r.callback=function(){Ns(e,n)},r}function Jp(e){return e=Ga(e),e.tag=3,e}function Wp(e,n,r,i){var d=r.type.getDerivedStateFromError;if(typeof d=="function"){var p=i.value;e.payload=function(){return d(p)},e.callback=function(){Zp(n,r,i)}}var w=r.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(e.callback=function(){Zp(n,r,i),typeof d!="function"&&(nr===null?nr=new Set([this]):nr.add(this));var N=i.stack;this.componentDidCatch(i.value,{componentStack:N!==null?N:""})})}function Zw(e,n,r,i,d){if(r.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(n=r.alternate,n!==null&&Oo(n,r,d,!0),r=On.current,r!==null){switch(r.tag){case 13:return Wn===null?Pd():r.alternate===null&&_t===0&&(_t=3),r.flags&=-257,r.flags|=65536,r.lanes=d,i===qu?r.flags|=16384:(n=r.updateQueue,n===null?r.updateQueue=new Set([i]):n.add(i),Bd(e,i,d)),!1;case 22:return r.flags|=65536,i===qu?r.flags|=16384:(n=r.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([i])},r.updateQueue=n):(r=n.retryQueue,r===null?n.retryQueue=new Set([i]):r.add(i)),Bd(e,i,d)),!1}throw Error(o(435,r.tag))}return Bd(e,i,d),Pd(),!1}if(ct)return n=On.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=d,i!==zu&&(e=Error(o(422),{cause:i}),Ro(Cn(e,r)))):(i!==zu&&(n=Error(o(423),{cause:i}),Ro(Cn(n,r))),e=e.current.alternate,e.flags|=65536,d&=-d,e.lanes|=d,i=Cn(i,r),d=md(e.stateNode,i,d),Gu(e,d),_t!==4&&(_t=2)),!1;var p=Error(o(520),{cause:i});if(p=Cn(p,r),Xo===null?Xo=[p]:Xo.push(p),_t!==4&&(_t=2),n===null)return!0;i=Cn(i,r),r=n;do{switch(r.tag){case 3:return r.flags|=65536,e=d&-d,r.lanes|=e,e=md(r.stateNode,i,e),Gu(r,e),!1;case 1:if(n=r.type,p=r.stateNode,(r.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(nr===null||!nr.has(p))))return r.flags|=65536,d&=-d,r.lanes|=d,d=Jp(d),Wp(d,e,r,i),Gu(r,d),!1}r=r.return}while(r!==null);return!1}var eg=Error(o(461)),Pt=!1;function qt(e,n,r,i){n.child=e===null?Vp(n,null,r,i):Nl(n,e.child,r,i)}function tg(e,n,r,i,d){r=r.render;var p=n.ref;if("ref"in i){var w={};for(var N in i)N!=="ref"&&(w[N]=i[N])}else w=i;return Pr(n),i=Zu(e,n,r,w,p,d),N=Ju(),e!==null&&!Pt?(Wu(e,n,d),_a(e,n,d)):(ct&&N&&Du(n),n.flags|=1,qt(e,n,i,d),n.child)}function ng(e,n,r,i,d){if(e===null){var p=r.type;return typeof p=="function"&&!Tu(p)&&p.defaultProps===void 0&&r.compare===null?(n.tag=15,n.type=p,ag(e,n,p,i,d)):(e=as(r.type,null,i,n,n.mode,d),e.ref=n.ref,e.return=n,n.child=e)}if(p=e.child,!Sd(e,d)){var w=p.memoizedProps;if(r=r.compare,r=r!==null?r:No,r(w,i)&&e.ref===n.ref)return _a(e,n,d)}return n.flags|=1,e=ba(p,i),e.ref=n.ref,e.return=n,n.child=e}function ag(e,n,r,i,d){if(e!==null){var p=e.memoizedProps;if(No(p,i)&&e.ref===n.ref)if(Pt=!1,n.pendingProps=i=p,Sd(e,d))(e.flags&131072)!==0&&(Pt=!0);else return n.lanes=e.lanes,_a(e,n,d)}return pd(e,n,r,i,d)}function rg(e,n,r){var i=n.pendingProps,d=i.children,p=e!==null?e.memoizedState:null;if(i.mode==="hidden"){if((n.flags&128)!==0){if(i=p!==null?p.baseLanes|r:r,e!==null){for(d=n.child=e.child,p=0;d!==null;)p=p|d.lanes|d.childLanes,d=d.sibling;n.childLanes=p&~i}else n.childLanes=0,n.child=null;return lg(e,n,i,r)}if((r&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&ss(n,p!==null?p.cachePool:null),p!==null?ap(n,p):Ku(),Ip(n);else return n.lanes=n.childLanes=536870912,lg(e,n,p!==null?p.baseLanes|r:r,r)}else p!==null?(ss(n,p.cachePool),ap(n,p),Qa(),n.memoizedState=null):(e!==null&&ss(n,null),Ku(),Qa());return qt(e,n,d,r),n.child}function lg(e,n,r,i){var d=Fu();return d=d===null?null:{parent:Dt._currentValue,pool:d},n.memoizedState={baseLanes:r,cachePool:d},e!==null&&ss(n,null),Ku(),Ip(n),e!==null&&Oo(e,n,i,!0),null}function Cs(e,n){var r=n.ref;if(r===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(o(284));(e===null||e.ref!==r)&&(n.flags|=4194816)}}function pd(e,n,r,i,d){return Pr(n),r=Zu(e,n,r,i,void 0,d),i=Ju(),e!==null&&!Pt?(Wu(e,n,d),_a(e,n,d)):(ct&&i&&Du(n),n.flags|=1,qt(e,n,r,d),n.child)}function og(e,n,r,i,d,p){return Pr(n),n.updateQueue=null,r=lp(n,i,r,d),rp(e),i=Ju(),e!==null&&!Pt?(Wu(e,n,p),_a(e,n,p)):(ct&&i&&Du(n),n.flags|=1,qt(e,n,r,p),n.child)}function ig(e,n,r,i,d){if(Pr(n),n.stateNode===null){var p=ml,w=r.contextType;typeof w=="object"&&w!==null&&(p=Yt(w)),p=new r(i,p),n.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=hd,n.stateNode=p,p._reactInternals=n,p=n.stateNode,p.props=i,p.state=n.memoizedState,p.refs={},Vu(n),w=r.contextType,p.context=typeof w=="object"&&w!==null?Yt(w):ml,p.state=n.memoizedState,w=r.getDerivedStateFromProps,typeof w=="function"&&(fd(n,r,w,i),p.state=n.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(w=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),w!==p.state&&hd.enqueueReplaceState(p,p.state,null),zo(n,i,p,d),Lo(),p.state=n.memoizedState),typeof p.componentDidMount=="function"&&(n.flags|=4194308),i=!0}else if(e===null){p=n.stateNode;var N=n.memoizedProps,L=$r(r,N);p.props=L;var X=p.context,oe=r.contextType;w=ml,typeof oe=="object"&&oe!==null&&(w=Yt(oe));var ce=r.getDerivedStateFromProps;oe=typeof ce=="function"||typeof p.getSnapshotBeforeUpdate=="function",N=n.pendingProps!==N,oe||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(N||X!==w)&&Yp(n,p,i,w),Ia=!1;var J=n.memoizedState;p.state=J,zo(n,i,p,d),Lo(),X=n.memoizedState,N||J!==X||Ia?(typeof ce=="function"&&(fd(n,r,ce,i),X=n.memoizedState),(L=Ia||Gp(n,r,L,i,J,X,w))?(oe||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(n.flags|=4194308)):(typeof p.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=i,n.memoizedState=X),p.props=i,p.state=X,p.context=w,i=L):(typeof p.componentDidMount=="function"&&(n.flags|=4194308),i=!1)}else{p=n.stateNode,Iu(e,n),w=n.memoizedProps,oe=$r(r,w),p.props=oe,ce=n.pendingProps,J=p.context,X=r.contextType,L=ml,typeof X=="object"&&X!==null&&(L=Yt(X)),N=r.getDerivedStateFromProps,(X=typeof N=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(w!==ce||J!==L)&&Yp(n,p,i,L),Ia=!1,J=n.memoizedState,p.state=J,zo(n,i,p,d),Lo();var W=n.memoizedState;w!==ce||J!==W||Ia||e!==null&&e.dependencies!==null&&os(e.dependencies)?(typeof N=="function"&&(fd(n,r,N,i),W=n.memoizedState),(oe=Ia||Gp(n,r,oe,i,J,W,L)||e!==null&&e.dependencies!==null&&os(e.dependencies))?(X||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(i,W,L),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(i,W,L)),typeof p.componentDidUpdate=="function"&&(n.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof p.componentDidUpdate!="function"||w===e.memoizedProps&&J===e.memoizedState||(n.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||w===e.memoizedProps&&J===e.memoizedState||(n.flags|=1024),n.memoizedProps=i,n.memoizedState=W),p.props=i,p.state=W,p.context=L,i=oe):(typeof p.componentDidUpdate!="function"||w===e.memoizedProps&&J===e.memoizedState||(n.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||w===e.memoizedProps&&J===e.memoizedState||(n.flags|=1024),i=!1)}return p=i,Cs(e,n),i=(n.flags&128)!==0,p||i?(p=n.stateNode,r=i&&typeof r.getDerivedStateFromError!="function"?null:p.render(),n.flags|=1,e!==null&&i?(n.child=Nl(n,e.child,null,d),n.child=Nl(n,null,r,d)):qt(e,n,r,d),n.memoizedState=p.state,e=n.child):e=_a(e,n,d),e}function sg(e,n,r,i){return _o(),n.flags|=256,qt(e,n,r,i),n.child}var gd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vd(e){return{baseLanes:e,cachePool:Xm()}}function yd(e,n,r){return e=e!==null?e.childLanes&~r:0,n&&(e|=An),e}function cg(e,n,r){var i=n.pendingProps,d=!1,p=(n.flags&128)!==0,w;if((w=p)||(w=e!==null&&e.memoizedState===null?!1:(Lt.current&2)!==0),w&&(d=!0,n.flags&=-129),w=(n.flags&32)!==0,n.flags&=-33,e===null){if(ct){if(d?Xa(n):Qa(),ct){var N=Et,L;if(L=N){e:{for(L=N,N=Jn;L.nodeType!==8;){if(!N){N=null;break e}if(L=Bn(L.nextSibling),L===null){N=null;break e}}N=L}N!==null?(n.memoizedState={dehydrated:N,treeContext:kr!==null?{id:wa,overflow:Sa}:null,retryLane:536870912,hydrationErrors:null},L=cn(18,null,null,0),L.stateNode=N,L.return=n,n.child=L,Jt=n,Et=null,L=!0):L=!1}L||zr(n)}if(N=n.memoizedState,N!==null&&(N=N.dehydrated,N!==null))return tf(N)?n.lanes=32:n.lanes=536870912,null;Ea(n)}return N=i.children,i=i.fallback,d?(Qa(),d=n.mode,N=Es({mode:"hidden",children:N},d),i=Mr(i,d,r,null),N.return=n,i.return=n,N.sibling=i,n.child=N,d=n.child,d.memoizedState=vd(r),d.childLanes=yd(e,w,r),n.memoizedState=gd,i):(Xa(n),xd(n,N))}if(L=e.memoizedState,L!==null&&(N=L.dehydrated,N!==null)){if(p)n.flags&256?(Xa(n),n.flags&=-257,n=bd(e,n,r)):n.memoizedState!==null?(Qa(),n.child=e.child,n.flags|=128,n=null):(Qa(),d=i.fallback,N=n.mode,i=Es({mode:"visible",children:i.children},N),d=Mr(d,N,r,null),d.flags|=2,i.return=n,d.return=n,i.sibling=d,n.child=i,Nl(n,e.child,null,r),i=n.child,i.memoizedState=vd(r),i.childLanes=yd(e,w,r),n.memoizedState=gd,n=d);else if(Xa(n),tf(N)){if(w=N.nextSibling&&N.nextSibling.dataset,w)var X=w.dgst;w=X,i=Error(o(419)),i.stack="",i.digest=w,Ro({value:i,source:null,stack:null}),n=bd(e,n,r)}else if(Pt||Oo(e,n,r,!1),w=(r&e.childLanes)!==0,Pt||w){if(w=yt,w!==null&&(i=r&-r,i=(i&42)!==0?1:po(i),i=(i&(w.suspendedLanes|r))!==0?0:i,i!==0&&i!==L.retryLane))throw L.retryLane=i,hl(e,i),mn(w,e,i),eg;N.data==="$?"||Pd(),n=bd(e,n,r)}else N.data==="$?"?(n.flags|=192,n.child=e.child,n=null):(e=L.treeContext,Et=Bn(N.nextSibling),Jt=n,ct=!0,Lr=null,Jn=!1,e!==null&&(_n[Rn++]=wa,_n[Rn++]=Sa,_n[Rn++]=kr,wa=e.id,Sa=e.overflow,kr=n),n=xd(n,i.children),n.flags|=4096);return n}return d?(Qa(),d=i.fallback,N=n.mode,L=e.child,X=L.sibling,i=ba(L,{mode:"hidden",children:i.children}),i.subtreeFlags=L.subtreeFlags&65011712,X!==null?d=ba(X,d):(d=Mr(d,N,r,null),d.flags|=2),d.return=n,i.return=n,i.sibling=d,n.child=i,i=d,d=n.child,N=e.child.memoizedState,N===null?N=vd(r):(L=N.cachePool,L!==null?(X=Dt._currentValue,L=L.parent!==X?{parent:X,pool:X}:L):L=Xm(),N={baseLanes:N.baseLanes|r,cachePool:L}),d.memoizedState=N,d.childLanes=yd(e,w,r),n.memoizedState=gd,i):(Xa(n),r=e.child,e=r.sibling,r=ba(r,{mode:"visible",children:i.children}),r.return=n,r.sibling=null,e!==null&&(w=n.deletions,w===null?(n.deletions=[e],n.flags|=16):w.push(e)),n.child=r,n.memoizedState=null,r)}function xd(e,n){return n=Es({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function Es(e,n){return e=cn(22,e,null,n),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function bd(e,n,r){return Nl(n,e.child,null,r),e=xd(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function ug(e,n,r){e.lanes|=n;var i=e.alternate;i!==null&&(i.lanes|=n),Pu(e.return,n,r)}function wd(e,n,r,i,d){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:i,tail:r,tailMode:d}:(p.isBackwards=n,p.rendering=null,p.renderingStartTime=0,p.last=i,p.tail=r,p.tailMode=d)}function dg(e,n,r){var i=n.pendingProps,d=i.revealOrder,p=i.tail;if(qt(e,n,i.children,r),i=Lt.current,(i&2)!==0)i=i&1|2,n.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ug(e,r,n);else if(e.tag===19)ug(e,r,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}switch(Q(Lt,i),d){case"forwards":for(r=n.child,d=null;r!==null;)e=r.alternate,e!==null&&Ss(e)===null&&(d=r),r=r.sibling;r=d,r===null?(d=n.child,n.child=null):(d=r.sibling,r.sibling=null),wd(n,!1,d,r,p);break;case"backwards":for(r=null,d=n.child,n.child=null;d!==null;){if(e=d.alternate,e!==null&&Ss(e)===null){n.child=d;break}e=d.sibling,d.sibling=r,r=d,d=e}wd(n,!0,r,null,p);break;case"together":wd(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function _a(e,n,r){if(e!==null&&(n.dependencies=e.dependencies),tr|=n.lanes,(r&n.childLanes)===0)if(e!==null){if(Oo(e,n,r,!1),(r&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(o(153));if(n.child!==null){for(e=n.child,r=ba(e,e.pendingProps),n.child=r,r.return=n;e.sibling!==null;)e=e.sibling,r=r.sibling=ba(e,e.pendingProps),r.return=n;r.sibling=null}return n.child}function Sd(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&os(e)))}function Jw(e,n,r){switch(n.tag){case 3:Ue(n,n.stateNode.containerInfo),Va(n,Dt,e.memoizedState.cache),_o();break;case 27:case 5:Se(n);break;case 4:Ue(n,n.stateNode.containerInfo);break;case 10:Va(n,n.type,n.memoizedProps.value);break;case 13:var i=n.memoizedState;if(i!==null)return i.dehydrated!==null?(Xa(n),n.flags|=128,null):(r&n.child.childLanes)!==0?cg(e,n,r):(Xa(n),e=_a(e,n,r),e!==null?e.sibling:null);Xa(n);break;case 19:var d=(e.flags&128)!==0;if(i=(r&n.childLanes)!==0,i||(Oo(e,n,r,!1),i=(r&n.childLanes)!==0),d){if(i)return dg(e,n,r);n.flags|=128}if(d=n.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),Q(Lt,Lt.current),i)break;return null;case 22:case 23:return n.lanes=0,rg(e,n,r);case 24:Va(n,Dt,e.memoizedState.cache)}return _a(e,n,r)}function fg(e,n,r){if(e!==null)if(e.memoizedProps!==n.pendingProps)Pt=!0;else{if(!Sd(e,r)&&(n.flags&128)===0)return Pt=!1,Jw(e,n,r);Pt=(e.flags&131072)!==0}else Pt=!1,ct&&(n.flags&1048576)!==0&&Fm(n,ls,n.index);switch(n.lanes=0,n.tag){case 16:e:{e=n.pendingProps;var i=n.elementType,d=i._init;if(i=d(i._payload),n.type=i,typeof i=="function")Tu(i)?(e=$r(i,e),n.tag=1,n=ig(null,n,i,e,r)):(n.tag=0,n=pd(null,n,i,e,r));else{if(i!=null){if(d=i.$$typeof,d===z){n.tag=11,n=tg(null,n,i,e,r);break e}else if(d===P){n.tag=14,n=ng(null,n,i,e,r);break e}}throw n=V(i)||i,Error(o(306,n,""))}}return n;case 0:return pd(e,n,n.type,n.pendingProps,r);case 1:return i=n.type,d=$r(i,n.pendingProps),ig(e,n,i,d,r);case 3:e:{if(Ue(n,n.stateNode.containerInfo),e===null)throw Error(o(387));i=n.pendingProps;var p=n.memoizedState;d=p.element,Iu(e,n),zo(n,i,null,r);var w=n.memoizedState;if(i=w.cache,Va(n,Dt,i),i!==p.cache&&Hu(n,[Dt],r,!0),Lo(),i=w.element,p.isDehydrated)if(p={element:i,isDehydrated:!1,cache:w.cache},n.updateQueue.baseState=p,n.memoizedState=p,n.flags&256){n=sg(e,n,i,r);break e}else if(i!==d){d=Cn(Error(o(424)),n),Ro(d),n=sg(e,n,i,r);break e}else{switch(e=n.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Et=Bn(e.firstChild),Jt=n,ct=!0,Lr=null,Jn=!0,r=Vp(n,null,i,r),n.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling}else{if(_o(),i===d){n=_a(e,n,r);break e}qt(e,n,i,r)}n=n.child}return n;case 26:return Cs(e,n),e===null?(r=gv(n.type,null,n.pendingProps,null))?n.memoizedState=r:ct||(r=n.type,e=n.pendingProps,i=Bs(ge.current).createElement(r),i[fe]=n,i[pe]=e,It(i,r,e),Ie(i),n.stateNode=i):n.memoizedState=gv(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return Se(n),e===null&&ct&&(i=n.stateNode=hv(n.type,n.pendingProps,ge.current),Jt=n,Jn=!0,d=Et,lr(n.type)?(nf=d,Et=Bn(i.firstChild)):Et=d),qt(e,n,n.pendingProps.children,r),Cs(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&ct&&((d=i=Et)&&(i=ES(i,n.type,n.pendingProps,Jn),i!==null?(n.stateNode=i,Jt=n,Et=Bn(i.firstChild),Jn=!1,d=!0):d=!1),d||zr(n)),Se(n),d=n.type,p=n.pendingProps,w=e!==null?e.memoizedProps:null,i=p.children,Jd(d,p)?i=null:w!==null&&Jd(d,w)&&(n.flags|=32),n.memoizedState!==null&&(d=Zu(e,n,Vw,null,null,r),ri._currentValue=d),Cs(e,n),qt(e,n,i,r),n.child;case 6:return e===null&&ct&&((e=r=Et)&&(r=_S(r,n.pendingProps,Jn),r!==null?(n.stateNode=r,Jt=n,Et=null,e=!0):e=!1),e||zr(n)),null;case 13:return cg(e,n,r);case 4:return Ue(n,n.stateNode.containerInfo),i=n.pendingProps,e===null?n.child=Nl(n,null,i,r):qt(e,n,i,r),n.child;case 11:return tg(e,n,n.type,n.pendingProps,r);case 7:return qt(e,n,n.pendingProps,r),n.child;case 8:return qt(e,n,n.pendingProps.children,r),n.child;case 12:return qt(e,n,n.pendingProps.children,r),n.child;case 10:return i=n.pendingProps,Va(n,n.type,i.value),qt(e,n,i.children,r),n.child;case 9:return d=n.type._context,i=n.pendingProps.children,Pr(n),d=Yt(d),i=i(d),n.flags|=1,qt(e,n,i,r),n.child;case 14:return ng(e,n,n.type,n.pendingProps,r);case 15:return ag(e,n,n.type,n.pendingProps,r);case 19:return dg(e,n,r);case 31:return i=n.pendingProps,r=n.mode,i={mode:i.mode,children:i.children},e===null?(r=Es(i,r),r.ref=n.ref,n.child=r,r.return=n,n=r):(r=ba(e.child,i),r.ref=n.ref,n.child=r,r.return=n,n=r),n;case 22:return rg(e,n,r);case 24:return Pr(n),i=Yt(Dt),e===null?(d=Fu(),d===null&&(d=yt,p=Bu(),d.pooledCache=p,p.refCount++,p!==null&&(d.pooledCacheLanes|=r),d=p),n.memoizedState={parent:i,cache:d},Vu(n),Va(n,Dt,d)):((e.lanes&r)!==0&&(Iu(e,n),zo(n,null,null,r),Lo()),d=e.memoizedState,p=n.memoizedState,d.parent!==i?(d={parent:i,cache:i},n.memoizedState=d,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=d),Va(n,Dt,i)):(i=p.cache,Va(n,Dt,i),i!==d.cache&&Hu(n,[Dt],r,!0))),qt(e,n,n.pendingProps.children,r),n.child;case 29:throw n.pendingProps}throw Error(o(156,n.tag))}function Ra(e){e.flags|=4}function hg(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!wv(n)){if(n=On.current,n!==null&&((tt&4194048)===tt?Wn!==null:(tt&62914560)!==tt&&(tt&536870912)===0||n!==Wn))throw ko=qu,Qm;e.flags|=8192}}function _s(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?$i():536870912,e.lanes|=n,Rl|=n)}function qo(e,n){if(!ct)switch(e.tailMode){case"hidden":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function jt(e){var n=e.alternate!==null&&e.alternate.child===e.child,r=0,i=0;if(n)for(var d=e.child;d!==null;)r|=d.lanes|d.childLanes,i|=d.subtreeFlags&65011712,i|=d.flags&65011712,d.return=e,d=d.sibling;else for(d=e.child;d!==null;)r|=d.lanes|d.childLanes,i|=d.subtreeFlags,i|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=i,e.childLanes=r,n}function Ww(e,n,r){var i=n.pendingProps;switch(Lu(n),n.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return jt(n),null;case 1:return jt(n),null;case 3:return r=n.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),n.memoizedState.cache!==i&&(n.flags|=2048),Na(Dt),le(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Eo(n)?Ra(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Im())),jt(n),null;case 26:return r=n.memoizedState,e===null?(Ra(n),r!==null?(jt(n),hg(n,r)):(jt(n),n.flags&=-16777217)):r?r!==e.memoizedState?(Ra(n),jt(n),hg(n,r)):(jt(n),n.flags&=-16777217):(e.memoizedProps!==i&&Ra(n),jt(n),n.flags&=-16777217),null;case 27:Be(n),r=ge.current;var d=n.type;if(e!==null&&n.stateNode!=null)e.memoizedProps!==i&&Ra(n);else{if(!i){if(n.stateNode===null)throw Error(o(166));return jt(n),null}e=ie.current,Eo(n)?qm(n):(e=hv(d,i,r),n.stateNode=e,Ra(n))}return jt(n),null;case 5:if(Be(n),r=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==i&&Ra(n);else{if(!i){if(n.stateNode===null)throw Error(o(166));return jt(n),null}if(e=ie.current,Eo(n))qm(n);else{switch(d=Bs(ge.current),e){case 1:e=d.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:e=d.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":e=d.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":e=d.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":e=d.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof i.is=="string"?d.createElement("select",{is:i.is}):d.createElement("select"),i.multiple?e.multiple=!0:i.size&&(e.size=i.size);break;default:e=typeof i.is=="string"?d.createElement(r,{is:i.is}):d.createElement(r)}}e[fe]=n,e[pe]=i;e:for(d=n.child;d!==null;){if(d.tag===5||d.tag===6)e.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===n)break e;for(;d.sibling===null;){if(d.return===null||d.return===n)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}n.stateNode=e;e:switch(It(e,r,i),r){case"button":case"input":case"select":case"textarea":e=!!i.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Ra(n)}}return jt(n),n.flags&=-16777217,null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==i&&Ra(n);else{if(typeof i!="string"&&n.stateNode===null)throw Error(o(166));if(e=ge.current,Eo(n)){if(e=n.stateNode,r=n.memoizedProps,i=null,d=Jt,d!==null)switch(d.tag){case 27:case 5:i=d.memoizedProps}e[fe]=n,e=!!(e.nodeValue===r||i!==null&&i.suppressHydrationWarning===!0||ov(e.nodeValue,r)),e||zr(n)}else e=Bs(e).createTextNode(i),e[fe]=n,n.stateNode=e}return jt(n),null;case 13:if(i=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(d=Eo(n),i!==null&&i.dehydrated!==null){if(e===null){if(!d)throw Error(o(318));if(d=n.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(o(317));d[fe]=n}else _o(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;jt(n),d=!1}else d=Im(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=d),d=!0;if(!d)return n.flags&256?(Ea(n),n):(Ea(n),null)}if(Ea(n),(n.flags&128)!==0)return n.lanes=r,n;if(r=i!==null,e=e!==null&&e.memoizedState!==null,r){i=n.child,d=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(d=i.alternate.memoizedState.cachePool.pool);var p=null;i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(p=i.memoizedState.cachePool.pool),p!==d&&(i.flags|=2048)}return r!==e&&r&&(n.child.flags|=8192),_s(n,n.updateQueue),jt(n),null;case 4:return le(),e===null&&Yd(n.stateNode.containerInfo),jt(n),null;case 10:return Na(n.type),jt(n),null;case 19:if($(Lt),d=n.memoizedState,d===null)return jt(n),null;if(i=(n.flags&128)!==0,p=d.rendering,p===null)if(i)qo(d,!1);else{if(_t!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(p=Ss(e),p!==null){for(n.flags|=128,qo(d,!1),e=p.updateQueue,n.updateQueue=e,_s(n,e),n.subtreeFlags=0,e=r,r=n.child;r!==null;)$m(r,e),r=r.sibling;return Q(Lt,Lt.current&1|2),n.child}e=e.sibling}d.tail!==null&&he()>As&&(n.flags|=128,i=!0,qo(d,!1),n.lanes=4194304)}else{if(!i)if(e=Ss(p),e!==null){if(n.flags|=128,i=!0,e=e.updateQueue,n.updateQueue=e,_s(n,e),qo(d,!0),d.tail===null&&d.tailMode==="hidden"&&!p.alternate&&!ct)return jt(n),null}else 2*he()-d.renderingStartTime>As&&r!==536870912&&(n.flags|=128,i=!0,qo(d,!1),n.lanes=4194304);d.isBackwards?(p.sibling=n.child,n.child=p):(e=d.last,e!==null?e.sibling=p:n.child=p,d.last=p)}return d.tail!==null?(n=d.tail,d.rendering=n,d.tail=n.sibling,d.renderingStartTime=he(),n.sibling=null,e=Lt.current,Q(Lt,i?e&1|2:e&1),n):(jt(n),null);case 22:case 23:return Ea(n),Xu(),i=n.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(n.flags|=8192):i&&(n.flags|=8192),i?(r&536870912)!==0&&(n.flags&128)===0&&(jt(n),n.subtreeFlags&6&&(n.flags|=8192)):jt(n),r=n.updateQueue,r!==null&&_s(n,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),i=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),i!==r&&(n.flags|=2048),e!==null&&$(Hr),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),n.memoizedState.cache!==r&&(n.flags|=2048),Na(Dt),jt(n),null;case 25:return null;case 30:return null}throw Error(o(156,n.tag))}function eS(e,n){switch(Lu(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Na(Dt),le(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Be(n),null;case 13:if(Ea(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(o(340));_o()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return $(Lt),null;case 4:return le(),null;case 10:return Na(n.type),null;case 22:case 23:return Ea(n),Xu(),e!==null&&$(Hr),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Na(Dt),null;case 25:return null;default:return null}}function mg(e,n){switch(Lu(n),n.tag){case 3:Na(Dt),le();break;case 26:case 27:case 5:Be(n);break;case 4:le();break;case 13:Ea(n);break;case 19:$(Lt);break;case 10:Na(n.type);break;case 22:case 23:Ea(n),Xu(),e!==null&&$(Hr);break;case 24:Na(Dt)}}function Vo(e,n){try{var r=n.updateQueue,i=r!==null?r.lastEffect:null;if(i!==null){var d=i.next;r=d;do{if((r.tag&e)===e){i=void 0;var p=r.create,w=r.inst;i=p(),w.destroy=i}r=r.next}while(r!==d)}}catch(N){vt(n,n.return,N)}}function Za(e,n,r){try{var i=n.updateQueue,d=i!==null?i.lastEffect:null;if(d!==null){var p=d.next;i=p;do{if((i.tag&e)===e){var w=i.inst,N=w.destroy;if(N!==void 0){w.destroy=void 0,d=n;var L=r,X=N;try{X()}catch(oe){vt(d,L,oe)}}}i=i.next}while(i!==p)}}catch(oe){vt(n,n.return,oe)}}function pg(e){var n=e.updateQueue;if(n!==null){var r=e.stateNode;try{np(n,r)}catch(i){vt(e,e.return,i)}}}function gg(e,n,r){r.props=$r(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(i){vt(e,n,i)}}function Io(e,n){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof r=="function"?e.refCleanup=r(i):r.current=i}}catch(d){vt(e,n,d)}}function ea(e,n){var r=e.ref,i=e.refCleanup;if(r!==null)if(typeof i=="function")try{i()}catch(d){vt(e,n,d)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(d){vt(e,n,d)}else r.current=null}function vg(e){var n=e.type,r=e.memoizedProps,i=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":r.autoFocus&&i.focus();break e;case"img":r.src?i.src=r.src:r.srcSet&&(i.srcset=r.srcSet)}}catch(d){vt(e,e.return,d)}}function jd(e,n,r){try{var i=e.stateNode;wS(i,e.type,r,n),i[pe]=n}catch(d){vt(e,e.return,d)}}function yg(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&lr(e.type)||e.tag===4}function Nd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||yg(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&&lr(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 Cd(e,n,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,n?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,n):(n=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,n.appendChild(e),r=r._reactRootContainer,r!=null||n.onclick!==null||(n.onclick=Hs));else if(i!==4&&(i===27&&lr(e.type)&&(r=e.stateNode,n=null),e=e.child,e!==null))for(Cd(e,n,r),e=e.sibling;e!==null;)Cd(e,n,r),e=e.sibling}function Rs(e,n,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,n?r.insertBefore(e,n):r.appendChild(e);else if(i!==4&&(i===27&&lr(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(Rs(e,n,r),e=e.sibling;e!==null;)Rs(e,n,r),e=e.sibling}function xg(e){var n=e.stateNode,r=e.memoizedProps;try{for(var i=e.type,d=n.attributes;d.length;)n.removeAttributeNode(d[0]);It(n,i,r),n[fe]=e,n[pe]=r}catch(p){vt(e,e.return,p)}}var Oa=!1,At=!1,Ed=!1,bg=typeof WeakSet=="function"?WeakSet:Set,Ht=null;function tS(e,n){if(e=e.containerInfo,Qd=Gs,e=Tm(e),Nu(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var d=i.anchorOffset,p=i.focusNode;i=i.focusOffset;try{r.nodeType,p.nodeType}catch{r=null;break e}var w=0,N=-1,L=-1,X=0,oe=0,ce=e,J=null;t:for(;;){for(var W;ce!==r||d!==0&&ce.nodeType!==3||(N=w+d),ce!==p||i!==0&&ce.nodeType!==3||(L=w+i),ce.nodeType===3&&(w+=ce.nodeValue.length),(W=ce.firstChild)!==null;)J=ce,ce=W;for(;;){if(ce===e)break t;if(J===r&&++X===d&&(N=w),J===p&&++oe===i&&(L=w),(W=ce.nextSibling)!==null)break;ce=J,J=ce.parentNode}ce=W}r=N===-1||L===-1?null:{start:N,end:L}}else r=null}r=r||{start:0,end:0}}else r=null;for(Zd={focusedElem:e,selectionRange:r},Gs=!1,Ht=n;Ht!==null;)if(n=Ht,e=n.child,(n.subtreeFlags&1024)!==0&&e!==null)e.return=n,Ht=e;else for(;Ht!==null;){switch(n=Ht,p=n.alternate,e=n.flags,n.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&p!==null){e=void 0,r=n,d=p.memoizedProps,p=p.memoizedState,i=r.stateNode;try{var Fe=$r(r.type,d,r.elementType===r.type);e=i.getSnapshotBeforeUpdate(Fe,p),i.__reactInternalSnapshotBeforeUpdate=e}catch(ze){vt(r,r.return,ze)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,r=e.nodeType,r===9)ef(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ef(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=n.sibling,e!==null){e.return=n.return,Ht=e;break}Ht=n.return}}function wg(e,n,r){var i=r.flags;switch(r.tag){case 0:case 11:case 15:Ja(e,r),i&4&&Vo(5,r);break;case 1:if(Ja(e,r),i&4)if(e=r.stateNode,n===null)try{e.componentDidMount()}catch(w){vt(r,r.return,w)}else{var d=$r(r.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(d,n,e.__reactInternalSnapshotBeforeUpdate)}catch(w){vt(r,r.return,w)}}i&64&&pg(r),i&512&&Io(r,r.return);break;case 3:if(Ja(e,r),i&64&&(e=r.updateQueue,e!==null)){if(n=null,r.child!==null)switch(r.child.tag){case 27:case 5:n=r.child.stateNode;break;case 1:n=r.child.stateNode}try{np(e,n)}catch(w){vt(r,r.return,w)}}break;case 27:n===null&&i&4&&xg(r);case 26:case 5:Ja(e,r),n===null&&i&4&&vg(r),i&512&&Io(r,r.return);break;case 12:Ja(e,r);break;case 13:Ja(e,r),i&4&&Ng(e,r),i&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=uS.bind(null,r),RS(e,r))));break;case 22:if(i=r.memoizedState!==null||Oa,!i){n=n!==null&&n.memoizedState!==null||At,d=Oa;var p=At;Oa=i,(At=n)&&!p?Wa(e,r,(r.subtreeFlags&8772)!==0):Ja(e,r),Oa=d,At=p}break;case 30:break;default:Ja(e,r)}}function Sg(e){var n=e.alternate;n!==null&&(e.alternate=null,Sg(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Te(n)),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 xt=null,nn=!1;function Aa(e,n,r){for(r=r.child;r!==null;)jg(e,n,r),r=r.sibling}function jg(e,n,r){if(wt&&typeof wt.onCommitFiberUnmount=="function")try{wt.onCommitFiberUnmount(Wt,r)}catch{}switch(r.tag){case 26:At||ea(r,n),Aa(e,n,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:At||ea(r,n);var i=xt,d=nn;lr(r.type)&&(xt=r.stateNode,nn=!1),Aa(e,n,r),ei(r.stateNode),xt=i,nn=d;break;case 5:At||ea(r,n);case 6:if(i=xt,d=nn,xt=null,Aa(e,n,r),xt=i,nn=d,xt!==null)if(nn)try{(xt.nodeType===9?xt.body:xt.nodeName==="HTML"?xt.ownerDocument.body:xt).removeChild(r.stateNode)}catch(p){vt(r,n,p)}else try{xt.removeChild(r.stateNode)}catch(p){vt(r,n,p)}break;case 18:xt!==null&&(nn?(e=xt,dv(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),si(e)):dv(xt,r.stateNode));break;case 4:i=xt,d=nn,xt=r.stateNode.containerInfo,nn=!0,Aa(e,n,r),xt=i,nn=d;break;case 0:case 11:case 14:case 15:At||Za(2,r,n),At||Za(4,r,n),Aa(e,n,r);break;case 1:At||(ea(r,n),i=r.stateNode,typeof i.componentWillUnmount=="function"&&gg(r,n,i)),Aa(e,n,r);break;case 21:Aa(e,n,r);break;case 22:At=(i=At)||r.memoizedState!==null,Aa(e,n,r),At=i;break;default:Aa(e,n,r)}}function Ng(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{si(e)}catch(r){vt(n,n.return,r)}}function nS(e){switch(e.tag){case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new bg),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new bg),n;default:throw Error(o(435,e.tag))}}function _d(e,n){var r=nS(e);n.forEach(function(i){var d=dS.bind(null,e,i);r.has(i)||(r.add(i),i.then(d,d))})}function un(e,n){var r=n.deletions;if(r!==null)for(var i=0;i<r.length;i++){var d=r[i],p=e,w=n,N=w;e:for(;N!==null;){switch(N.tag){case 27:if(lr(N.type)){xt=N.stateNode,nn=!1;break e}break;case 5:xt=N.stateNode,nn=!1;break e;case 3:case 4:xt=N.stateNode.containerInfo,nn=!0;break e}N=N.return}if(xt===null)throw Error(o(160));jg(p,w,d),xt=null,nn=!1,p=d.alternate,p!==null&&(p.return=null),d.return=null}if(n.subtreeFlags&13878)for(n=n.child;n!==null;)Cg(n,e),n=n.sibling}var Hn=null;function Cg(e,n){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:un(n,e),dn(e),i&4&&(Za(3,e,e.return),Vo(3,e),Za(5,e,e.return));break;case 1:un(n,e),dn(e),i&512&&(At||r===null||ea(r,r.return)),i&64&&Oa&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?i:r.concat(i))));break;case 26:var d=Hn;if(un(n,e),dn(e),i&512&&(At||r===null||ea(r,r.return)),i&4){var p=r!==null?r.memoizedState:null;if(i=e.memoizedState,r===null)if(i===null)if(e.stateNode===null){e:{i=e.type,r=e.memoizedProps,d=d.ownerDocument||d;t:switch(i){case"title":p=d.getElementsByTagName("title")[0],(!p||p[Oe]||p[fe]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=d.createElement(i),d.head.insertBefore(p,d.querySelector("head > title"))),It(p,i,r),p[fe]=e,Ie(p),i=p;break e;case"link":var w=xv("link","href",d).get(i+(r.href||""));if(w){for(var N=0;N<w.length;N++)if(p=w[N],p.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&p.getAttribute("rel")===(r.rel==null?null:r.rel)&&p.getAttribute("title")===(r.title==null?null:r.title)&&p.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){w.splice(N,1);break t}}p=d.createElement(i),It(p,i,r),d.head.appendChild(p);break;case"meta":if(w=xv("meta","content",d).get(i+(r.content||""))){for(N=0;N<w.length;N++)if(p=w[N],p.getAttribute("content")===(r.content==null?null:""+r.content)&&p.getAttribute("name")===(r.name==null?null:r.name)&&p.getAttribute("property")===(r.property==null?null:r.property)&&p.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&p.getAttribute("charset")===(r.charSet==null?null:r.charSet)){w.splice(N,1);break t}}p=d.createElement(i),It(p,i,r),d.head.appendChild(p);break;default:throw Error(o(468,i))}p[fe]=e,Ie(p),i=p}e.stateNode=i}else bv(d,e.type,e.stateNode);else e.stateNode=yv(d,i,e.memoizedProps);else p!==i?(p===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):p.count--,i===null?bv(d,e.type,e.stateNode):yv(d,i,e.memoizedProps)):i===null&&e.stateNode!==null&&jd(e,e.memoizedProps,r.memoizedProps)}break;case 27:un(n,e),dn(e),i&512&&(At||r===null||ea(r,r.return)),r!==null&&i&4&&jd(e,e.memoizedProps,r.memoizedProps);break;case 5:if(un(n,e),dn(e),i&512&&(At||r===null||ea(r,r.return)),e.flags&32){d=e.stateNode;try{ol(d,"")}catch(W){vt(e,e.return,W)}}i&4&&e.stateNode!=null&&(d=e.memoizedProps,jd(e,d,r!==null?r.memoizedProps:d)),i&1024&&(Ed=!0);break;case 6:if(un(n,e),dn(e),i&4){if(e.stateNode===null)throw Error(o(162));i=e.memoizedProps,r=e.stateNode;try{r.nodeValue=i}catch(W){vt(e,e.return,W)}}break;case 3:if(qs=null,d=Hn,Hn=$s(n.containerInfo),un(n,e),Hn=d,dn(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{si(n.containerInfo)}catch(W){vt(e,e.return,W)}Ed&&(Ed=!1,Eg(e));break;case 4:i=Hn,Hn=$s(e.stateNode.containerInfo),un(n,e),dn(e),Hn=i;break;case 12:un(n,e),dn(e);break;case 13:un(n,e),dn(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(kd=he()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,_d(e,i)));break;case 22:d=e.memoizedState!==null;var L=r!==null&&r.memoizedState!==null,X=Oa,oe=At;if(Oa=X||d,At=oe||L,un(n,e),At=oe,Oa=X,dn(e),i&8192)e:for(n=e.stateNode,n._visibility=d?n._visibility&-2:n._visibility|1,d&&(r===null||L||Oa||At||Fr(e)),r=null,n=e;;){if(n.tag===5||n.tag===26){if(r===null){L=r=n;try{if(p=L.stateNode,d)w=p.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{N=L.stateNode;var ce=L.memoizedProps.style,J=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;N.style.display=J==null||typeof J=="boolean"?"":(""+J).trim()}}catch(W){vt(L,L.return,W)}}}else if(n.tag===6){if(r===null){L=n;try{L.stateNode.nodeValue=d?"":L.memoizedProps}catch(W){vt(L,L.return,W)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;r===n&&(r=null),n=n.return}r===n&&(r=null),n.sibling.return=n.return,n=n.sibling}i&4&&(i=e.updateQueue,i!==null&&(r=i.retryQueue,r!==null&&(i.retryQueue=null,_d(e,r))));break;case 19:un(n,e),dn(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,_d(e,i)));break;case 30:break;case 21:break;default:un(n,e),dn(e)}}function dn(e){var n=e.flags;if(n&2){try{for(var r,i=e.return;i!==null;){if(yg(i)){r=i;break}i=i.return}if(r==null)throw Error(o(160));switch(r.tag){case 27:var d=r.stateNode,p=Nd(e);Rs(e,p,d);break;case 5:var w=r.stateNode;r.flags&32&&(ol(w,""),r.flags&=-33);var N=Nd(e);Rs(e,N,w);break;case 3:case 4:var L=r.stateNode.containerInfo,X=Nd(e);Cd(e,X,L);break;default:throw Error(o(161))}}catch(oe){vt(e,e.return,oe)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Eg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;Eg(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function Ja(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)wg(e,n.alternate,n),n=n.sibling}function Fr(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:Za(4,n,n.return),Fr(n);break;case 1:ea(n,n.return);var r=n.stateNode;typeof r.componentWillUnmount=="function"&&gg(n,n.return,r),Fr(n);break;case 27:ei(n.stateNode);case 26:case 5:ea(n,n.return),Fr(n);break;case 22:n.memoizedState===null&&Fr(n);break;case 30:Fr(n);break;default:Fr(n)}e=e.sibling}}function Wa(e,n,r){for(r=r&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var i=n.alternate,d=e,p=n,w=p.flags;switch(p.tag){case 0:case 11:case 15:Wa(d,p,r),Vo(4,p);break;case 1:if(Wa(d,p,r),i=p,d=i.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(X){vt(i,i.return,X)}if(i=p,d=i.updateQueue,d!==null){var N=i.stateNode;try{var L=d.shared.hiddenCallbacks;if(L!==null)for(d.shared.hiddenCallbacks=null,d=0;d<L.length;d++)tp(L[d],N)}catch(X){vt(i,i.return,X)}}r&&w&64&&pg(p),Io(p,p.return);break;case 27:xg(p);case 26:case 5:Wa(d,p,r),r&&i===null&&w&4&&vg(p),Io(p,p.return);break;case 12:Wa(d,p,r);break;case 13:Wa(d,p,r),r&&w&4&&Ng(d,p);break;case 22:p.memoizedState===null&&Wa(d,p,r),Io(p,p.return);break;case 30:break;default:Wa(d,p,r)}n=n.sibling}}function Rd(e,n){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&Ao(r))}function Od(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Ao(e))}function ta(e,n,r,i){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)_g(e,n,r,i),n=n.sibling}function _g(e,n,r,i){var d=n.flags;switch(n.tag){case 0:case 11:case 15:ta(e,n,r,i),d&2048&&Vo(9,n);break;case 1:ta(e,n,r,i);break;case 3:ta(e,n,r,i),d&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Ao(e)));break;case 12:if(d&2048){ta(e,n,r,i),e=n.stateNode;try{var p=n.memoizedProps,w=p.id,N=p.onPostCommit;typeof N=="function"&&N(w,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(L){vt(n,n.return,L)}}else ta(e,n,r,i);break;case 13:ta(e,n,r,i);break;case 23:break;case 22:p=n.stateNode,w=n.alternate,n.memoizedState!==null?p._visibility&2?ta(e,n,r,i):Go(e,n):p._visibility&2?ta(e,n,r,i):(p._visibility|=2,Cl(e,n,r,i,(n.subtreeFlags&10256)!==0)),d&2048&&Rd(w,n);break;case 24:ta(e,n,r,i),d&2048&&Od(n.alternate,n);break;default:ta(e,n,r,i)}}function Cl(e,n,r,i,d){for(d=d&&(n.subtreeFlags&10256)!==0,n=n.child;n!==null;){var p=e,w=n,N=r,L=i,X=w.flags;switch(w.tag){case 0:case 11:case 15:Cl(p,w,N,L,d),Vo(8,w);break;case 23:break;case 22:var oe=w.stateNode;w.memoizedState!==null?oe._visibility&2?Cl(p,w,N,L,d):Go(p,w):(oe._visibility|=2,Cl(p,w,N,L,d)),d&&X&2048&&Rd(w.alternate,w);break;case 24:Cl(p,w,N,L,d),d&&X&2048&&Od(w.alternate,w);break;default:Cl(p,w,N,L,d)}n=n.sibling}}function Go(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var r=e,i=n,d=i.flags;switch(i.tag){case 22:Go(r,i),d&2048&&Rd(i.alternate,i);break;case 24:Go(r,i),d&2048&&Od(i.alternate,i);break;default:Go(r,i)}n=n.sibling}}var Yo=8192;function El(e){if(e.subtreeFlags&Yo)for(e=e.child;e!==null;)Rg(e),e=e.sibling}function Rg(e){switch(e.tag){case 26:El(e),e.flags&Yo&&e.memoizedState!==null&&$S(Hn,e.memoizedState,e.memoizedProps);break;case 5:El(e);break;case 3:case 4:var n=Hn;Hn=$s(e.stateNode.containerInfo),El(e),Hn=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Yo,Yo=16777216,El(e),Yo=n):El(e));break;default:El(e)}}function Og(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function Ko(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];Ht=i,Tg(i,e)}Og(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ag(e),e=e.sibling}function Ag(e){switch(e.tag){case 0:case 11:case 15:Ko(e),e.flags&2048&&Za(9,e,e.return);break;case 3:Ko(e);break;case 12:Ko(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,Os(e)):Ko(e);break;default:Ko(e)}}function Os(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];Ht=i,Tg(i,e)}Og(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Za(8,n,n.return),Os(n);break;case 22:r=n.stateNode,r._visibility&2&&(r._visibility&=-3,Os(n));break;default:Os(n)}e=e.sibling}}function Tg(e,n){for(;Ht!==null;){var r=Ht;switch(r.tag){case 0:case 11:case 15:Za(8,r,n);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var i=r.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:Ao(r.memoizedState.cache)}if(i=r.child,i!==null)i.return=r,Ht=i;else e:for(r=e;Ht!==null;){i=Ht;var d=i.sibling,p=i.return;if(Sg(i),i===r){Ht=null;break e}if(d!==null){d.return=p,Ht=d;break e}Ht=p}}}var aS={getCacheForType:function(e){var n=Yt(Dt),r=n.data.get(e);return r===void 0&&(r=e(),n.data.set(e,r)),r}},rS=typeof WeakMap=="function"?WeakMap:Map,dt=0,yt=null,We=null,tt=0,ft=0,fn=null,er=!1,_l=!1,Ad=!1,Ta=0,_t=0,tr=0,qr=0,Td=0,An=0,Rl=0,Xo=null,an=null,Md=!1,kd=0,As=1/0,Ts=null,nr=null,Vt=0,ar=null,Ol=null,Al=0,Dd=0,Ld=null,Mg=null,Qo=0,zd=null;function hn(){if((dt&2)!==0&&tt!==0)return tt&-tt;if(T.T!==null){var e=vl;return e!==0?e:qd()}return U()}function kg(){An===0&&(An=(tt&536870912)===0||ct?nl():536870912);var e=On.current;return e!==null&&(e.flags|=32),An}function mn(e,n,r){(e===yt&&(ft===2||ft===9)||e.cancelPendingCommit!==null)&&(Tl(e,0),rr(e,tt,An,!1)),Cr(e,r),((dt&2)===0||e!==yt)&&(e===yt&&((dt&2)===0&&(qr|=r),_t===4&&rr(e,tt,An,!1)),na(e))}function Dg(e,n,r){if((dt&6)!==0)throw Error(o(327));var i=!r&&(n&124)===0&&(n&e.expiredLanes)===0||Qn(e,n),d=i?iS(e,n):Hd(e,n,!0),p=i;do{if(d===0){_l&&!i&&rr(e,n,0,!1);break}else{if(r=e.current.alternate,p&&!lS(r)){d=Hd(e,n,!1),p=!1;continue}if(d===2){if(p=n,e.errorRecoveryDisabledLanes&p)var w=0;else w=e.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){n=w;e:{var N=e;d=Xo;var L=N.current.memoizedState.isDehydrated;if(L&&(Tl(N,w).flags|=256),w=Hd(N,w,!1),w!==2){if(Ad&&!L){N.errorRecoveryDisabledLanes|=p,qr|=p,d=4;break e}p=an,an=d,p!==null&&(an===null?an=p:an.push.apply(an,p))}d=w}if(p=!1,d!==2)continue}}if(d===1){Tl(e,0),rr(e,n,0,!0);break}e:{switch(i=e,p=d,p){case 0:case 1:throw Error(o(345));case 4:if((n&4194048)!==n)break;case 6:rr(i,n,An,!er);break e;case 2:an=null;break;case 3:case 5:break;default:throw Error(o(329))}if((n&62914560)===n&&(d=kd+300-he(),10<d)){if(rr(i,n,An,!er),Nr(i,0,!0)!==0)break e;i.timeoutHandle=cv(Lg.bind(null,i,r,an,Ts,Md,n,An,qr,Rl,er,p,2,-0,0),d);break e}Lg(i,r,an,Ts,Md,n,An,qr,Rl,er,p,0,-0,0)}}break}while(!0);na(e)}function Lg(e,n,r,i,d,p,w,N,L,X,oe,ce,J,W){if(e.timeoutHandle=-1,ce=n.subtreeFlags,(ce&8192||(ce&16785408)===16785408)&&(ai={stylesheets:null,count:0,unsuspend:BS},Rg(n),ce=FS(),ce!==null)){e.cancelPendingCommit=ce(Fg.bind(null,e,n,p,r,i,d,w,N,L,oe,1,J,W)),rr(e,p,w,!X);return}Fg(e,n,p,r,i,d,w,N,L)}function lS(e){for(var n=e;;){var r=n.tag;if((r===0||r===11||r===15)&&n.flags&16384&&(r=n.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var i=0;i<r.length;i++){var d=r[i],p=d.getSnapshot;d=d.value;try{if(!sn(p(),d))return!1}catch{return!1}}if(r=n.child,n.subtreeFlags&16384&&r!==null)r.return=n,n=r;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function rr(e,n,r,i){n&=~Td,n&=~qr,e.suspendedLanes|=n,e.pingedLanes&=~n,i&&(e.warmLanes|=n),i=e.expirationTimes;for(var d=n;0<d;){var p=31-Ft(d),w=1<<p;i[p]=-1,d&=~w}r!==0&&Er(e,r,n)}function Ms(){return(dt&6)===0?(Zo(0),!1):!0}function Ud(){if(We!==null){if(ft===0)var e=We.return;else e=We,ja=Ur=null,ed(e),jl=null,$o=0,e=We;for(;e!==null;)mg(e.alternate,e),e=e.return;We=null}}function Tl(e,n){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,jS(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),Ud(),yt=e,We=r=ba(e.current,null),tt=n,ft=0,fn=null,er=!1,_l=Qn(e,n),Ad=!1,Rl=An=Td=qr=tr=_t=0,an=Xo=null,Md=!1,(n&8)!==0&&(n|=n&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=n;0<i;){var d=31-Ft(i),p=1<<d;n|=e[d],i&=~p}return Ta=n,es(),r}function zg(e,n){Ke=null,T.H=xs,n===Mo||n===cs?(n=Wm(),ft=3):n===Qm?(n=Wm(),ft=4):ft=n===eg?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,fn=n,We===null&&(_t=1,Ns(e,Cn(n,e.current)))}function Ug(){var e=T.H;return T.H=xs,e===null?xs:e}function Pg(){var e=T.A;return T.A=aS,e}function Pd(){_t=4,er||(tt&4194048)!==tt&&On.current!==null||(_l=!0),(tr&134217727)===0&&(qr&134217727)===0||yt===null||rr(yt,tt,An,!1)}function Hd(e,n,r){var i=dt;dt|=2;var d=Ug(),p=Pg();(yt!==e||tt!==n)&&(Ts=null,Tl(e,n)),n=!1;var w=_t;e:do try{if(ft!==0&&We!==null){var N=We,L=fn;switch(ft){case 8:Ud(),w=6;break e;case 3:case 2:case 9:case 6:On.current===null&&(n=!0);var X=ft;if(ft=0,fn=null,Ml(e,N,L,X),r&&_l){w=0;break e}break;default:X=ft,ft=0,fn=null,Ml(e,N,L,X)}}oS(),w=_t;break}catch(oe){zg(e,oe)}while(!0);return n&&e.shellSuspendCounter++,ja=Ur=null,dt=i,T.H=d,T.A=p,We===null&&(yt=null,tt=0,es()),w}function oS(){for(;We!==null;)Hg(We)}function iS(e,n){var r=dt;dt|=2;var i=Ug(),d=Pg();yt!==e||tt!==n?(Ts=null,As=he()+500,Tl(e,n)):_l=Qn(e,n);e:do try{if(ft!==0&&We!==null){n=We;var p=fn;t:switch(ft){case 1:ft=0,fn=null,Ml(e,n,p,1);break;case 2:case 9:if(Zm(p)){ft=0,fn=null,Bg(n);break}n=function(){ft!==2&&ft!==9||yt!==e||(ft=7),na(e)},p.then(n,n);break e;case 3:ft=7;break e;case 4:ft=5;break e;case 7:Zm(p)?(ft=0,fn=null,Bg(n)):(ft=0,fn=null,Ml(e,n,p,7));break;case 5:var w=null;switch(We.tag){case 26:w=We.memoizedState;case 5:case 27:var N=We;if(!w||wv(w)){ft=0,fn=null;var L=N.sibling;if(L!==null)We=L;else{var X=N.return;X!==null?(We=X,ks(X)):We=null}break t}}ft=0,fn=null,Ml(e,n,p,5);break;case 6:ft=0,fn=null,Ml(e,n,p,6);break;case 8:Ud(),_t=6;break e;default:throw Error(o(462))}}sS();break}catch(oe){zg(e,oe)}while(!0);return ja=Ur=null,T.H=i,T.A=d,dt=r,We!==null?0:(yt=null,tt=0,es(),_t)}function sS(){for(;We!==null&&!ue();)Hg(We)}function Hg(e){var n=fg(e.alternate,e,Ta);e.memoizedProps=e.pendingProps,n===null?ks(e):We=n}function Bg(e){var n=e,r=n.alternate;switch(n.tag){case 15:case 0:n=og(r,n,n.pendingProps,n.type,void 0,tt);break;case 11:n=og(r,n,n.pendingProps,n.type.render,n.ref,tt);break;case 5:ed(n);default:mg(r,n),n=We=$m(n,Ta),n=fg(r,n,Ta)}e.memoizedProps=e.pendingProps,n===null?ks(e):We=n}function Ml(e,n,r,i){ja=Ur=null,ed(n),jl=null,$o=0;var d=n.return;try{if(Zw(e,d,n,r,tt)){_t=1,Ns(e,Cn(r,e.current)),We=null;return}}catch(p){if(d!==null)throw We=d,p;_t=1,Ns(e,Cn(r,e.current)),We=null;return}n.flags&32768?(ct||i===1?e=!0:_l||(tt&536870912)!==0?e=!1:(er=e=!0,(i===2||i===9||i===3||i===6)&&(i=On.current,i!==null&&i.tag===13&&(i.flags|=16384))),$g(n,e)):ks(n)}function ks(e){var n=e;do{if((n.flags&32768)!==0){$g(n,er);return}e=n.return;var r=Ww(n.alternate,n,Ta);if(r!==null){We=r;return}if(n=n.sibling,n!==null){We=n;return}We=n=e}while(n!==null);_t===0&&(_t=5)}function $g(e,n){do{var r=eS(e.alternate,e);if(r!==null){r.flags&=32767,We=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!n&&(e=e.sibling,e!==null)){We=e;return}We=e=r}while(e!==null);_t=6,We=null}function Fg(e,n,r,i,d,p,w,N,L){e.cancelPendingCommit=null;do Ds();while(Vt!==0);if((dt&6)!==0)throw Error(o(327));if(n!==null){if(n===e.current)throw Error(o(177));if(p=n.lanes|n.childLanes,p|=Ou,Fi(e,r,p,w,N,L),e===yt&&(We=yt=null,tt=0),Ol=n,ar=e,Al=r,Dd=p,Ld=d,Mg=i,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,fS(qe,function(){return Yg(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||i){i=T.T,T.T=null,d=Z.p,Z.p=2,w=dt,dt|=4;try{tS(e,n,r)}finally{dt=w,Z.p=d,T.T=i}}Vt=1,qg(),Vg(),Ig()}}function qg(){if(Vt===1){Vt=0;var e=ar,n=Ol,r=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||r){r=T.T,T.T=null;var i=Z.p;Z.p=2;var d=dt;dt|=4;try{Cg(n,e);var p=Zd,w=Tm(e.containerInfo),N=p.focusedElem,L=p.selectionRange;if(w!==N&&N&&N.ownerDocument&&Am(N.ownerDocument.documentElement,N)){if(L!==null&&Nu(N)){var X=L.start,oe=L.end;if(oe===void 0&&(oe=X),"selectionStart"in N)N.selectionStart=X,N.selectionEnd=Math.min(oe,N.value.length);else{var ce=N.ownerDocument||document,J=ce&&ce.defaultView||window;if(J.getSelection){var W=J.getSelection(),Fe=N.textContent.length,ze=Math.min(L.start,Fe),gt=L.end===void 0?ze:Math.min(L.end,Fe);!W.extend&&ze>gt&&(w=gt,gt=ze,ze=w);var F=Om(N,ze),H=Om(N,gt);if(F&&H&&(W.rangeCount!==1||W.anchorNode!==F.node||W.anchorOffset!==F.offset||W.focusNode!==H.node||W.focusOffset!==H.offset)){var Y=ce.createRange();Y.setStart(F.node,F.offset),W.removeAllRanges(),ze>gt?(W.addRange(Y),W.extend(H.node,H.offset)):(Y.setEnd(H.node,H.offset),W.addRange(Y))}}}}for(ce=[],W=N;W=W.parentNode;)W.nodeType===1&&ce.push({element:W,left:W.scrollLeft,top:W.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<ce.length;N++){var se=ce[N];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}Gs=!!Qd,Zd=Qd=null}finally{dt=d,Z.p=i,T.T=r}}e.current=n,Vt=2}}function Vg(){if(Vt===2){Vt=0;var e=ar,n=Ol,r=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||r){r=T.T,T.T=null;var i=Z.p;Z.p=2;var d=dt;dt|=4;try{wg(e,n.alternate,n)}finally{dt=d,Z.p=i,T.T=r}}Vt=3}}function Ig(){if(Vt===4||Vt===3){Vt=0,de();var e=ar,n=Ol,r=Al,i=Mg;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Vt=5:(Vt=0,Ol=ar=null,Gg(e,e.pendingLanes));var d=e.pendingLanes;if(d===0&&(nr=null),go(r),n=n.stateNode,wt&&typeof wt.onCommitFiberRoot=="function")try{wt.onCommitFiberRoot(Wt,n,void 0,(n.current.flags&128)===128)}catch{}if(i!==null){n=T.T,d=Z.p,Z.p=2,T.T=null;try{for(var p=e.onRecoverableError,w=0;w<i.length;w++){var N=i[w];p(N.value,{componentStack:N.stack})}}finally{T.T=n,Z.p=d}}(Al&3)!==0&&Ds(),na(e),d=e.pendingLanes,(r&4194090)!==0&&(d&42)!==0?e===zd?Qo++:(Qo=0,zd=e):Qo=0,Zo(0)}}function Gg(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Ao(n)))}function Ds(e){return qg(),Vg(),Ig(),Yg()}function Yg(){if(Vt!==5)return!1;var e=ar,n=Dd;Dd=0;var r=go(Al),i=T.T,d=Z.p;try{Z.p=32>r?32:r,T.T=null,r=Ld,Ld=null;var p=ar,w=Al;if(Vt=0,Ol=ar=null,Al=0,(dt&6)!==0)throw Error(o(331));var N=dt;if(dt|=4,Ag(p.current),_g(p,p.current,w,r),dt=N,Zo(0,!1),wt&&typeof wt.onPostCommitFiberRoot=="function")try{wt.onPostCommitFiberRoot(Wt,p)}catch{}return!0}finally{Z.p=d,T.T=i,Gg(e,n)}}function Kg(e,n,r){n=Cn(r,n),n=md(e.stateNode,n,2),e=Ya(e,n,2),e!==null&&(Cr(e,2),na(e))}function vt(e,n,r){if(e.tag===3)Kg(e,e,r);else for(;n!==null;){if(n.tag===3){Kg(n,e,r);break}else if(n.tag===1){var i=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(nr===null||!nr.has(i))){e=Cn(r,e),r=Jp(2),i=Ya(n,r,2),i!==null&&(Wp(r,i,n,e),Cr(i,2),na(i));break}}n=n.return}}function Bd(e,n,r){var i=e.pingCache;if(i===null){i=e.pingCache=new rS;var d=new Set;i.set(n,d)}else d=i.get(n),d===void 0&&(d=new Set,i.set(n,d));d.has(r)||(Ad=!0,d.add(r),e=cS.bind(null,e,n,r),n.then(e,e))}function cS(e,n,r){var i=e.pingCache;i!==null&&i.delete(n),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,yt===e&&(tt&r)===r&&(_t===4||_t===3&&(tt&62914560)===tt&&300>he()-kd?(dt&2)===0&&Tl(e,0):Td|=r,Rl===tt&&(Rl=0)),na(e)}function Xg(e,n){n===0&&(n=$i()),e=hl(e,n),e!==null&&(Cr(e,n),na(e))}function uS(e){var n=e.memoizedState,r=0;n!==null&&(r=n.retryLane),Xg(e,r)}function dS(e,n){var r=0;switch(e.tag){case 13:var i=e.stateNode,d=e.memoizedState;d!==null&&(r=d.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(o(314))}i!==null&&i.delete(n),Xg(e,r)}function fS(e,n){return Ee(e,n)}var Ls=null,kl=null,$d=!1,zs=!1,Fd=!1,Vr=0;function na(e){e!==kl&&e.next===null&&(kl===null?Ls=kl=e:kl=kl.next=e),zs=!0,$d||($d=!0,mS())}function Zo(e,n){if(!Fd&&zs){Fd=!0;do for(var r=!1,i=Ls;i!==null;){if(e!==0){var d=i.pendingLanes;if(d===0)var p=0;else{var w=i.suspendedLanes,N=i.pingedLanes;p=(1<<31-Ft(42|e)+1)-1,p&=d&~(w&~N),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(r=!0,Wg(i,p))}else p=tt,p=Nr(i,i===yt?p:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(p&3)===0||Qn(i,p)||(r=!0,Wg(i,p));i=i.next}while(r);Fd=!1}}function hS(){Qg()}function Qg(){zs=$d=!1;var e=0;Vr!==0&&(SS()&&(e=Vr),Vr=0);for(var n=he(),r=null,i=Ls;i!==null;){var d=i.next,p=Zg(i,n);p===0?(i.next=null,r===null?Ls=d:r.next=d,d===null&&(kl=r)):(r=i,(e!==0||(p&3)!==0)&&(zs=!0)),i=d}Zo(e)}function Zg(e,n){for(var r=e.suspendedLanes,i=e.pingedLanes,d=e.expirationTimes,p=e.pendingLanes&-62914561;0<p;){var w=31-Ft(p),N=1<<w,L=d[w];L===-1?((N&r)===0||(N&i)!==0)&&(d[w]=Bi(N,n)):L<=n&&(e.expiredLanes|=N),p&=~N}if(n=yt,r=tt,r=Nr(e,e===n?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,r===0||e===n&&(ft===2||ft===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&bt(i),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||Qn(e,r)){if(n=r&-r,n===e.callbackPriority)return n;switch(i!==null&&bt(i),go(r)){case 2:case 8:r=$e;break;case 32:r=qe;break;case 268435456:r=Qt;break;default:r=qe}return i=Jg.bind(null,e),r=Ee(r,i),e.callbackPriority=n,e.callbackNode=r,n}return i!==null&&i!==null&&bt(i),e.callbackPriority=2,e.callbackNode=null,2}function Jg(e,n){if(Vt!==0&&Vt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(Ds()&&e.callbackNode!==r)return null;var i=tt;return i=Nr(e,e===yt?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(Dg(e,i,n),Zg(e,he()),e.callbackNode!=null&&e.callbackNode===r?Jg.bind(null,e):null)}function Wg(e,n){if(Ds())return null;Dg(e,n,!0)}function mS(){NS(function(){(dt&6)!==0?Ee(Me,hS):Qg()})}function qd(){return Vr===0&&(Vr=nl()),Vr}function ev(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Yi(""+e)}function tv(e,n){var r=n.ownerDocument.createElement("input");return r.name=n.name,r.value=n.value,e.id&&r.setAttribute("form",e.id),n.parentNode.insertBefore(r,n),e=new FormData(e),r.parentNode.removeChild(r),e}function pS(e,n,r,i,d){if(n==="submit"&&r&&r.stateNode===d){var p=ev((d[pe]||null).action),w=i.submitter;w&&(n=(n=w[pe]||null)?ev(n.formAction):w.getAttribute("formAction"),n!==null&&(p=n,w=null));var N=new Zi("action","action",null,i,d);e.push({event:N,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(Vr!==0){var L=w?tv(d,w):new FormData(d);cd(r,{pending:!0,data:L,method:d.method,action:p},null,L)}}else typeof p=="function"&&(N.preventDefault(),L=w?tv(d,w):new FormData(d),cd(r,{pending:!0,data:L,method:d.method,action:p},p,L))},currentTarget:d}]})}}for(var Vd=0;Vd<Ru.length;Vd++){var Id=Ru[Vd],gS=Id.toLowerCase(),vS=Id[0].toUpperCase()+Id.slice(1);Pn(gS,"on"+vS)}Pn(Dm,"onAnimationEnd"),Pn(Lm,"onAnimationIteration"),Pn(zm,"onAnimationStart"),Pn("dblclick","onDoubleClick"),Pn("focusin","onFocus"),Pn("focusout","onBlur"),Pn(Dw,"onTransitionRun"),Pn(Lw,"onTransitionStart"),Pn(zw,"onTransitionCancel"),Pn(Um,"onTransitionEnd"),Zt("onMouseEnter",["mouseout","mouseover"]),Zt("onMouseLeave",["mouseout","mouseover"]),Zt("onPointerEnter",["pointerout","pointerover"]),Zt("onPointerLeave",["pointerout","pointerover"]),on("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),on("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),on("onBeforeInput",["compositionend","keypress","textInput","paste"]),on("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),on("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),on("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Jo="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(" "),yS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Jo));function nv(e,n){n=(n&4)!==0;for(var r=0;r<e.length;r++){var i=e[r],d=i.event;i=i.listeners;e:{var p=void 0;if(n)for(var w=i.length-1;0<=w;w--){var N=i[w],L=N.instance,X=N.currentTarget;if(N=N.listener,L!==p&&d.isPropagationStopped())break e;p=N,d.currentTarget=X;try{p(d)}catch(oe){js(oe)}d.currentTarget=null,p=L}else for(w=0;w<i.length;w++){if(N=i[w],L=N.instance,X=N.currentTarget,N=N.listener,L!==p&&d.isPropagationStopped())break e;p=N,d.currentTarget=X;try{p(d)}catch(oe){js(oe)}d.currentTarget=null,p=L}}}}function et(e,n){var r=n[Ae];r===void 0&&(r=n[Ae]=new Set);var i=e+"__bubble";r.has(i)||(av(n,e,2,!1),r.add(i))}function Gd(e,n,r){var i=0;n&&(i|=4),av(r,e,i,n)}var Us="_reactListening"+Math.random().toString(36).slice(2);function Yd(e){if(!e[Us]){e[Us]=!0,ht.forEach(function(r){r!=="selectionchange"&&(yS.has(r)||Gd(r,!1,e),Gd(r,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Us]||(n[Us]=!0,Gd("selectionchange",!1,n))}}function av(e,n,r,i){switch(_v(n)){case 2:var d=IS;break;case 8:d=GS;break;default:d=sf}r=d.bind(null,n,r,e),d=void 0,!pu||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(d=!0),i?d!==void 0?e.addEventListener(n,r,{capture:!0,passive:d}):e.addEventListener(n,r,!0):d!==void 0?e.addEventListener(n,r,{passive:d}):e.addEventListener(n,r,!1)}function Kd(e,n,r,i,d){var p=i;if((n&1)===0&&(n&2)===0&&i!==null)e:for(;;){if(i===null)return;var w=i.tag;if(w===3||w===4){var N=i.stateNode.containerInfo;if(N===d)break;if(w===4)for(w=i.return;w!==null;){var L=w.tag;if((L===3||L===4)&&w.stateNode.containerInfo===d)return;w=w.return}for(;N!==null;){if(w=Ye(N),w===null)return;if(L=w.tag,L===5||L===6||L===26||L===27){i=p=w;continue e}N=N.parentNode}}i=i.return}um(function(){var X=p,oe=hu(r),ce=[];e:{var J=Pm.get(e);if(J!==void 0){var W=Zi,Fe=e;switch(e){case"keypress":if(Xi(r)===0)break e;case"keydown":case"keyup":W=fw;break;case"focusin":Fe="focus",W=xu;break;case"focusout":Fe="blur",W=xu;break;case"beforeblur":case"afterblur":W=xu;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":W=hm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":W=ew;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":W=pw;break;case Dm:case Lm:case zm:W=aw;break;case Um:W=vw;break;case"scroll":case"scrollend":W=J1;break;case"wheel":W=xw;break;case"copy":case"cut":case"paste":W=lw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":W=pm;break;case"toggle":case"beforetoggle":W=ww}var ze=(n&4)!==0,gt=!ze&&(e==="scroll"||e==="scrollend"),F=ze?J!==null?J+"Capture":null:J;ze=[];for(var H=X,Y;H!==null;){var se=H;if(Y=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||Y===null||F===null||(se=vo(H,F),se!=null&&ze.push(Wo(H,se,Y))),gt)break;H=H.return}0<ze.length&&(J=new W(J,Fe,null,r,oe),ce.push({event:J,listeners:ze}))}}if((n&7)===0){e:{if(J=e==="mouseover"||e==="pointerover",W=e==="mouseout"||e==="pointerout",J&&r!==fu&&(Fe=r.relatedTarget||r.fromElement)&&(Ye(Fe)||Fe[_e]))break e;if((W||J)&&(J=oe.window===oe?oe:(J=oe.ownerDocument)?J.defaultView||J.parentWindow:window,W?(Fe=r.relatedTarget||r.toElement,W=X,Fe=Fe?Ye(Fe):null,Fe!==null&&(gt=c(Fe),ze=Fe.tag,Fe!==gt||ze!==5&&ze!==27&&ze!==6)&&(Fe=null)):(W=null,Fe=X),W!==Fe)){if(ze=hm,se="onMouseLeave",F="onMouseEnter",H="mouse",(e==="pointerout"||e==="pointerover")&&(ze=pm,se="onPointerLeave",F="onPointerEnter",H="pointer"),gt=W==null?J:Nt(W),Y=Fe==null?J:Nt(Fe),J=new ze(se,H+"leave",W,r,oe),J.target=gt,J.relatedTarget=Y,se=null,Ye(oe)===X&&(ze=new ze(F,H+"enter",Fe,r,oe),ze.target=Y,ze.relatedTarget=gt,se=ze),gt=se,W&&Fe)t:{for(ze=W,F=Fe,H=0,Y=ze;Y;Y=Dl(Y))H++;for(Y=0,se=F;se;se=Dl(se))Y++;for(;0<H-Y;)ze=Dl(ze),H--;for(;0<Y-H;)F=Dl(F),Y--;for(;H--;){if(ze===F||F!==null&&ze===F.alternate)break t;ze=Dl(ze),F=Dl(F)}ze=null}else ze=null;W!==null&&rv(ce,J,W,ze,!1),Fe!==null&&gt!==null&&rv(ce,gt,Fe,ze,!0)}}e:{if(J=X?Nt(X):window,W=J.nodeName&&J.nodeName.toLowerCase(),W==="select"||W==="input"&&J.type==="file")var je=jm;else if(wm(J))if(Nm)je=Tw;else{je=Ow;var Ze=Rw}else W=J.nodeName,!W||W.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?X&&du(X.elementType)&&(je=jm):je=Aw;if(je&&(je=je(e,X))){Sm(ce,je,r,oe);break e}Ze&&Ze(e,J,X),e==="focusout"&&X&&J.type==="number"&&X.memoizedProps.value!=null&&uu(J,"number",J.value)}switch(Ze=X?Nt(X):window,e){case"focusin":(wm(Ze)||Ze.contentEditable==="true")&&(ul=Ze,Cu=X,Co=null);break;case"focusout":Co=Cu=ul=null;break;case"mousedown":Eu=!0;break;case"contextmenu":case"mouseup":case"dragend":Eu=!1,Mm(ce,r,oe);break;case"selectionchange":if(kw)break;case"keydown":case"keyup":Mm(ce,r,oe)}var ke;if(wu)e:{switch(e){case"compositionstart":var Pe="onCompositionStart";break e;case"compositionend":Pe="onCompositionEnd";break e;case"compositionupdate":Pe="onCompositionUpdate";break e}Pe=void 0}else cl?xm(e,r)&&(Pe="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(Pe="onCompositionStart");Pe&&(gm&&r.locale!=="ko"&&(cl||Pe!=="onCompositionStart"?Pe==="onCompositionEnd"&&cl&&(ke=dm()):(qa=oe,gu="value"in qa?qa.value:qa.textContent,cl=!0)),Ze=Ps(X,Pe),0<Ze.length&&(Pe=new mm(Pe,e,null,r,oe),ce.push({event:Pe,listeners:Ze}),ke?Pe.data=ke:(ke=bm(r),ke!==null&&(Pe.data=ke)))),(ke=jw?Nw(e,r):Cw(e,r))&&(Pe=Ps(X,"onBeforeInput"),0<Pe.length&&(Ze=new mm("onBeforeInput","beforeinput",null,r,oe),ce.push({event:Ze,listeners:Pe}),Ze.data=ke)),pS(ce,e,X,r,oe)}nv(ce,n)})}function Wo(e,n,r){return{instance:e,listener:n,currentTarget:r}}function Ps(e,n){for(var r=n+"Capture",i=[];e!==null;){var d=e,p=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||p===null||(d=vo(e,r),d!=null&&i.unshift(Wo(e,d,p)),d=vo(e,n),d!=null&&i.push(Wo(e,d,p))),e.tag===3)return i;e=e.return}return[]}function Dl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function rv(e,n,r,i,d){for(var p=n._reactName,w=[];r!==null&&r!==i;){var N=r,L=N.alternate,X=N.stateNode;if(N=N.tag,L!==null&&L===i)break;N!==5&&N!==26&&N!==27||X===null||(L=X,d?(X=vo(r,p),X!=null&&w.unshift(Wo(r,X,L))):d||(X=vo(r,p),X!=null&&w.push(Wo(r,X,L)))),r=r.return}w.length!==0&&e.push({event:n,listeners:w})}var xS=/\r\n?/g,bS=/\u0000|\uFFFD/g;function lv(e){return(typeof e=="string"?e:""+e).replace(xS,`
55
+ `).replace(bS,"")}function ov(e,n){return n=lv(n),lv(e)===n}function Hs(){}function pt(e,n,r,i,d,p){switch(r){case"children":typeof i=="string"?n==="body"||n==="textarea"&&i===""||ol(e,i):(typeof i=="number"||typeof i=="bigint")&&n!=="body"&&ol(e,""+i);break;case"className":ya(e,"class",i);break;case"tabIndex":ya(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":ya(e,r,i);break;case"style":sm(e,i,p);break;case"data":if(n!=="object"){ya(e,"data",i);break}case"src":case"href":if(i===""&&(n!=="a"||r!=="href")){e.removeAttribute(r);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(r);break}i=Yi(""+i),e.setAttribute(r,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(r,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof p=="function"&&(r==="formAction"?(n!=="input"&&pt(e,n,"name",d.name,d,null),pt(e,n,"formEncType",d.formEncType,d,null),pt(e,n,"formMethod",d.formMethod,d,null),pt(e,n,"formTarget",d.formTarget,d,null)):(pt(e,n,"encType",d.encType,d,null),pt(e,n,"method",d.method,d,null),pt(e,n,"target",d.target,d,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(r);break}i=Yi(""+i),e.setAttribute(r,i);break;case"onClick":i!=null&&(e.onclick=Hs);break;case"onScroll":i!=null&&et("scroll",e);break;case"onScrollEnd":i!=null&&et("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(r=i.__html,r!=null){if(d.children!=null)throw Error(o(60));e.innerHTML=r}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}r=Yi(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(r,""+i):e.removeAttribute(r);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":i===!0?e.setAttribute(r,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(r,i):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(r,i):e.removeAttribute(r);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(r):e.setAttribute(r,i);break;case"popover":et("beforetoggle",e),et("toggle",e),va(e,"popover",i);break;case"xlinkActuate":Qe(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":Qe(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":Qe(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":Qe(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":Qe(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":Qe(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":Qe(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":Qe(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":Qe(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":va(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=Q1.get(r)||r,va(e,r,i))}}function Xd(e,n,r,i,d,p){switch(r){case"style":sm(e,i,p);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(r=i.__html,r!=null){if(d.children!=null)throw Error(o(60));e.innerHTML=r}}break;case"children":typeof i=="string"?ol(e,i):(typeof i=="number"||typeof i=="bigint")&&ol(e,""+i);break;case"onScroll":i!=null&&et("scroll",e);break;case"onScrollEnd":i!=null&&et("scrollend",e);break;case"onClick":i!=null&&(e.onclick=Hs);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Zn.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(d=r.endsWith("Capture"),n=r.slice(2,d?r.length-7:void 0),p=e[pe]||null,p=p!=null?p[r]:null,typeof p=="function"&&e.removeEventListener(n,p,d),typeof i=="function")){typeof p!="function"&&p!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(n,i,d);break e}r in e?e[r]=i:i===!0?e.setAttribute(r,""):va(e,r,i)}}}function It(e,n,r){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":et("error",e),et("load",e);var i=!1,d=!1,p;for(p in r)if(r.hasOwnProperty(p)){var w=r[p];if(w!=null)switch(p){case"src":i=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,n));default:pt(e,n,p,w,r,null)}}d&&pt(e,n,"srcSet",r.srcSet,r,null),i&&pt(e,n,"src",r.src,r,null);return;case"input":et("invalid",e);var N=p=w=d=null,L=null,X=null;for(i in r)if(r.hasOwnProperty(i)){var oe=r[i];if(oe!=null)switch(i){case"name":d=oe;break;case"type":w=oe;break;case"checked":L=oe;break;case"defaultChecked":X=oe;break;case"value":p=oe;break;case"defaultValue":N=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(o(137,n));break;default:pt(e,n,i,oe,r,null)}}rm(e,p,N,L,X,w,d,!1),Ii(e);return;case"select":et("invalid",e),i=w=p=null;for(d in r)if(r.hasOwnProperty(d)&&(N=r[d],N!=null))switch(d){case"value":p=N;break;case"defaultValue":w=N;break;case"multiple":i=N;default:pt(e,n,d,N,r,null)}n=p,r=w,e.multiple=!!i,n!=null?ll(e,!!i,n,!1):r!=null&&ll(e,!!i,r,!0);return;case"textarea":et("invalid",e),p=d=i=null;for(w in r)if(r.hasOwnProperty(w)&&(N=r[w],N!=null))switch(w){case"value":i=N;break;case"defaultValue":d=N;break;case"children":p=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(o(91));break;default:pt(e,n,w,N,r,null)}om(e,i,d,p),Ii(e);return;case"option":for(L in r)if(r.hasOwnProperty(L)&&(i=r[L],i!=null))switch(L){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:pt(e,n,L,i,r,null)}return;case"dialog":et("beforetoggle",e),et("toggle",e),et("cancel",e),et("close",e);break;case"iframe":case"object":et("load",e);break;case"video":case"audio":for(i=0;i<Jo.length;i++)et(Jo[i],e);break;case"image":et("error",e),et("load",e);break;case"details":et("toggle",e);break;case"embed":case"source":case"link":et("error",e),et("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(X in r)if(r.hasOwnProperty(X)&&(i=r[X],i!=null))switch(X){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,n));default:pt(e,n,X,i,r,null)}return;default:if(du(n)){for(oe in r)r.hasOwnProperty(oe)&&(i=r[oe],i!==void 0&&Xd(e,n,oe,i,r,void 0));return}}for(N in r)r.hasOwnProperty(N)&&(i=r[N],i!=null&&pt(e,n,N,i,r,null))}function wS(e,n,r,i){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,p=null,w=null,N=null,L=null,X=null,oe=null;for(W in r){var ce=r[W];if(r.hasOwnProperty(W)&&ce!=null)switch(W){case"checked":break;case"value":break;case"defaultValue":L=ce;default:i.hasOwnProperty(W)||pt(e,n,W,null,i,ce)}}for(var J in i){var W=i[J];if(ce=r[J],i.hasOwnProperty(J)&&(W!=null||ce!=null))switch(J){case"type":p=W;break;case"name":d=W;break;case"checked":X=W;break;case"defaultChecked":oe=W;break;case"value":w=W;break;case"defaultValue":N=W;break;case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(o(137,n));break;default:W!==ce&&pt(e,n,J,W,i,ce)}}cu(e,w,N,L,X,oe,p,d);return;case"select":W=w=N=J=null;for(p in r)if(L=r[p],r.hasOwnProperty(p)&&L!=null)switch(p){case"value":break;case"multiple":W=L;default:i.hasOwnProperty(p)||pt(e,n,p,null,i,L)}for(d in i)if(p=i[d],L=r[d],i.hasOwnProperty(d)&&(p!=null||L!=null))switch(d){case"value":J=p;break;case"defaultValue":N=p;break;case"multiple":w=p;default:p!==L&&pt(e,n,d,p,i,L)}n=N,r=w,i=W,J!=null?ll(e,!!r,J,!1):!!i!=!!r&&(n!=null?ll(e,!!r,n,!0):ll(e,!!r,r?[]:"",!1));return;case"textarea":W=J=null;for(N in r)if(d=r[N],r.hasOwnProperty(N)&&d!=null&&!i.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:pt(e,n,N,null,i,d)}for(w in i)if(d=i[w],p=r[w],i.hasOwnProperty(w)&&(d!=null||p!=null))switch(w){case"value":J=d;break;case"defaultValue":W=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(o(91));break;default:d!==p&&pt(e,n,w,d,i,p)}lm(e,J,W);return;case"option":for(var Fe in r)if(J=r[Fe],r.hasOwnProperty(Fe)&&J!=null&&!i.hasOwnProperty(Fe))switch(Fe){case"selected":e.selected=!1;break;default:pt(e,n,Fe,null,i,J)}for(L in i)if(J=i[L],W=r[L],i.hasOwnProperty(L)&&J!==W&&(J!=null||W!=null))switch(L){case"selected":e.selected=J&&typeof J!="function"&&typeof J!="symbol";break;default:pt(e,n,L,J,i,W)}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 ze in r)J=r[ze],r.hasOwnProperty(ze)&&J!=null&&!i.hasOwnProperty(ze)&&pt(e,n,ze,null,i,J);for(X in i)if(J=i[X],W=r[X],i.hasOwnProperty(X)&&J!==W&&(J!=null||W!=null))switch(X){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(o(137,n));break;default:pt(e,n,X,J,i,W)}return;default:if(du(n)){for(var gt in r)J=r[gt],r.hasOwnProperty(gt)&&J!==void 0&&!i.hasOwnProperty(gt)&&Xd(e,n,gt,void 0,i,J);for(oe in i)J=i[oe],W=r[oe],!i.hasOwnProperty(oe)||J===W||J===void 0&&W===void 0||Xd(e,n,oe,J,i,W);return}}for(var F in r)J=r[F],r.hasOwnProperty(F)&&J!=null&&!i.hasOwnProperty(F)&&pt(e,n,F,null,i,J);for(ce in i)J=i[ce],W=r[ce],!i.hasOwnProperty(ce)||J===W||J==null&&W==null||pt(e,n,ce,J,i,W)}var Qd=null,Zd=null;function Bs(e){return e.nodeType===9?e:e.ownerDocument}function iv(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 sv(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function Jd(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Wd=null;function SS(){var e=window.event;return e&&e.type==="popstate"?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var cv=typeof setTimeout=="function"?setTimeout:void 0,jS=typeof clearTimeout=="function"?clearTimeout:void 0,uv=typeof Promise=="function"?Promise:void 0,NS=typeof queueMicrotask=="function"?queueMicrotask:typeof uv<"u"?function(e){return uv.resolve(null).then(e).catch(CS)}:cv;function CS(e){setTimeout(function(){throw e})}function lr(e){return e==="head"}function dv(e,n){var r=n,i=0,d=0;do{var p=r.nextSibling;if(e.removeChild(r),p&&p.nodeType===8)if(r=p.data,r==="/$"){if(0<i&&8>i){r=i;var w=e.ownerDocument;if(r&1&&ei(w.documentElement),r&2&&ei(w.body),r&4)for(r=w.head,ei(r),w=r.firstChild;w;){var N=w.nextSibling,L=w.nodeName;w[Oe]||L==="SCRIPT"||L==="STYLE"||L==="LINK"&&w.rel.toLowerCase()==="stylesheet"||r.removeChild(w),w=N}}if(d===0){e.removeChild(p),si(n);return}d--}else r==="$"||r==="$?"||r==="$!"?d++:i=r.charCodeAt(0)-48;else i=0;r=p}while(r);si(n)}function ef(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var r=n;switch(n=n.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":ef(r),Te(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function ES(e,n,r,i){for(;e.nodeType===1;){var d=r;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[Oe])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(p=e.getAttribute("rel"),p==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(p!==d.rel||e.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||e.getAttribute("title")!==(d.title==null?null:d.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(p=e.getAttribute("src"),(p!==(d.src==null?null:d.src)||e.getAttribute("type")!==(d.type==null?null:d.type)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&p&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var p=d.name==null?null:""+d.name;if(d.type==="hidden"&&e.getAttribute("name")===p)return e}else return e;if(e=Bn(e.nextSibling),e===null)break}return null}function _S(e,n,r){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=Bn(e.nextSibling),e===null))return null;return e}function tf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function RS(e,n){var r=e.ownerDocument;if(e.data!=="$?"||r.readyState==="complete")n();else{var i=function(){n(),r.removeEventListener("DOMContentLoaded",i)};r.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function Bn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="F!"||n==="F")break;if(n==="/$")return null}}return e}var nf=null;function fv(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(n===0)return e;n--}else r==="/$"&&n++}e=e.previousSibling}return null}function hv(e,n,r){switch(n=Bs(r),e){case"html":if(e=n.documentElement,!e)throw Error(o(452));return e;case"head":if(e=n.head,!e)throw Error(o(453));return e;case"body":if(e=n.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function ei(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Te(e)}var Tn=new Map,mv=new Set;function $s(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ma=Z.d;Z.d={f:OS,r:AS,D:TS,C:MS,L:kS,m:DS,X:zS,S:LS,M:US};function OS(){var e=Ma.f(),n=Ms();return e||n}function AS(e){var n=ut(e);n!==null&&n.tag===5&&n.type==="form"?Dp(n):Ma.r(e)}var Ll=typeof document>"u"?null:document;function pv(e,n,r){var i=Ll;if(i&&typeof n=="string"&&n){var d=Nn(n);d='link[rel="'+e+'"][href="'+d+'"]',typeof r=="string"&&(d+='[crossorigin="'+r+'"]'),mv.has(d)||(mv.add(d),e={rel:e,crossOrigin:r,href:n},i.querySelector(d)===null&&(n=i.createElement("link"),It(n,"link",e),Ie(n),i.head.appendChild(n)))}}function TS(e){Ma.D(e),pv("dns-prefetch",e,null)}function MS(e,n){Ma.C(e,n),pv("preconnect",e,n)}function kS(e,n,r){Ma.L(e,n,r);var i=Ll;if(i&&e&&n){var d='link[rel="preload"][as="'+Nn(n)+'"]';n==="image"&&r&&r.imageSrcSet?(d+='[imagesrcset="'+Nn(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(d+='[imagesizes="'+Nn(r.imageSizes)+'"]')):d+='[href="'+Nn(e)+'"]';var p=d;switch(n){case"style":p=zl(e);break;case"script":p=Ul(e)}Tn.has(p)||(e=v({rel:"preload",href:n==="image"&&r&&r.imageSrcSet?void 0:e,as:n},r),Tn.set(p,e),i.querySelector(d)!==null||n==="style"&&i.querySelector(ti(p))||n==="script"&&i.querySelector(ni(p))||(n=i.createElement("link"),It(n,"link",e),Ie(n),i.head.appendChild(n)))}}function DS(e,n){Ma.m(e,n);var r=Ll;if(r&&e){var i=n&&typeof n.as=="string"?n.as:"script",d='link[rel="modulepreload"][as="'+Nn(i)+'"][href="'+Nn(e)+'"]',p=d;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=Ul(e)}if(!Tn.has(p)&&(e=v({rel:"modulepreload",href:e},n),Tn.set(p,e),r.querySelector(d)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(ni(p)))return}i=r.createElement("link"),It(i,"link",e),Ie(i),r.head.appendChild(i)}}}function LS(e,n,r){Ma.S(e,n,r);var i=Ll;if(i&&e){var d=Ct(i).hoistableStyles,p=zl(e);n=n||"default";var w=d.get(p);if(!w){var N={loading:0,preload:null};if(w=i.querySelector(ti(p)))N.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":n},r),(r=Tn.get(p))&&af(e,r);var L=w=i.createElement("link");Ie(L),It(L,"link",e),L._p=new Promise(function(X,oe){L.onload=X,L.onerror=oe}),L.addEventListener("load",function(){N.loading|=1}),L.addEventListener("error",function(){N.loading|=2}),N.loading|=4,Fs(w,n,i)}w={type:"stylesheet",instance:w,count:1,state:N},d.set(p,w)}}}function zS(e,n){Ma.X(e,n);var r=Ll;if(r&&e){var i=Ct(r).hoistableScripts,d=Ul(e),p=i.get(d);p||(p=r.querySelector(ni(d)),p||(e=v({src:e,async:!0},n),(n=Tn.get(d))&&rf(e,n),p=r.createElement("script"),Ie(p),It(p,"link",e),r.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},i.set(d,p))}}function US(e,n){Ma.M(e,n);var r=Ll;if(r&&e){var i=Ct(r).hoistableScripts,d=Ul(e),p=i.get(d);p||(p=r.querySelector(ni(d)),p||(e=v({src:e,async:!0,type:"module"},n),(n=Tn.get(d))&&rf(e,n),p=r.createElement("script"),Ie(p),It(p,"link",e),r.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},i.set(d,p))}}function gv(e,n,r,i){var d=(d=ge.current)?$s(d):null;if(!d)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(n=zl(r.href),r=Ct(d).hoistableStyles,i=r.get(n),i||(i={type:"style",instance:null,count:0,state:null},r.set(n,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=zl(r.href);var p=Ct(d).hoistableStyles,w=p.get(e);if(w||(d=d.ownerDocument||d,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(e,w),(p=d.querySelector(ti(e)))&&!p._p&&(w.instance=p,w.state.loading=5),Tn.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},Tn.set(e,r),p||PS(d,e,r,w.state))),n&&i===null)throw Error(o(528,""));return w}if(n&&i!==null)throw Error(o(529,""));return null;case"script":return n=r.async,r=r.src,typeof r=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Ul(r),r=Ct(d).hoistableScripts,i=r.get(n),i||(i={type:"script",instance:null,count:0,state:null},r.set(n,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function zl(e){return'href="'+Nn(e)+'"'}function ti(e){return'link[rel="stylesheet"]['+e+"]"}function vv(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function PS(e,n,r,i){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?i.loading=1:(n=e.createElement("link"),i.preload=n,n.addEventListener("load",function(){return i.loading|=1}),n.addEventListener("error",function(){return i.loading|=2}),It(n,"link",r),Ie(n),e.head.appendChild(n))}function Ul(e){return'[src="'+Nn(e)+'"]'}function ni(e){return"script[async]"+e}function yv(e,n,r){if(n.count++,n.instance===null)switch(n.type){case"style":var i=e.querySelector('style[data-href~="'+Nn(r.href)+'"]');if(i)return n.instance=i,Ie(i),i;var d=v({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),Ie(i),It(i,"style",d),Fs(i,r.precedence,e),n.instance=i;case"stylesheet":d=zl(r.href);var p=e.querySelector(ti(d));if(p)return n.state.loading|=4,n.instance=p,Ie(p),p;i=vv(r),(d=Tn.get(d))&&af(i,d),p=(e.ownerDocument||e).createElement("link"),Ie(p);var w=p;return w._p=new Promise(function(N,L){w.onload=N,w.onerror=L}),It(p,"link",i),n.state.loading|=4,Fs(p,r.precedence,e),n.instance=p;case"script":return p=Ul(r.src),(d=e.querySelector(ni(p)))?(n.instance=d,Ie(d),d):(i=r,(d=Tn.get(p))&&(i=v({},r),rf(i,d)),e=e.ownerDocument||e,d=e.createElement("script"),Ie(d),It(d,"link",i),e.head.appendChild(d),n.instance=d);case"void":return null;default:throw Error(o(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(i=n.instance,n.state.loading|=4,Fs(i,r.precedence,e));return n.instance}function Fs(e,n,r){for(var i=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=i.length?i[i.length-1]:null,p=d,w=0;w<i.length;w++){var N=i[w];if(N.dataset.precedence===n)p=N;else if(p!==d)break}p?p.parentNode.insertBefore(e,p.nextSibling):(n=r.nodeType===9?r.head:r,n.insertBefore(e,n.firstChild))}function af(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function rf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var qs=null;function xv(e,n,r){if(qs===null){var i=new Map,d=qs=new Map;d.set(r,i)}else d=qs,i=d.get(r),i||(i=new Map,d.set(r,i));if(i.has(e))return i;for(i.set(e,null),r=r.getElementsByTagName(e),d=0;d<r.length;d++){var p=r[d];if(!(p[Oe]||p[fe]||e==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var w=p.getAttribute(n)||"";w=e+w;var N=i.get(w);N?N.push(p):i.set(w,[p])}}return i}function bv(e,n,r){e=e.ownerDocument||e,e.head.insertBefore(r,n==="title"?e.querySelector("head > title"):null)}function HS(e,n,r){if(r===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return e=n.disabled,typeof n.precedence=="string"&&e==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function wv(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var ai=null;function BS(){}function $S(e,n,r){if(ai===null)throw Error(o(475));var i=ai;if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var d=zl(r.href),p=e.querySelector(ti(d));if(p){e=p._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(i.count++,i=Vs.bind(i),e.then(i,i)),n.state.loading|=4,n.instance=p,Ie(p);return}p=e.ownerDocument||e,r=vv(r),(d=Tn.get(d))&&af(r,d),p=p.createElement("link"),Ie(p);var w=p;w._p=new Promise(function(N,L){w.onload=N,w.onerror=L}),It(p,"link",r),n.instance=p}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(n,e),(e=n.state.preload)&&(n.state.loading&3)===0&&(i.count++,n=Vs.bind(i),e.addEventListener("load",n),e.addEventListener("error",n))}}function FS(){if(ai===null)throw Error(o(475));var e=ai;return e.stylesheets&&e.count===0&&lf(e,e.stylesheets),0<e.count?function(n){var r=setTimeout(function(){if(e.stylesheets&&lf(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r)}}:null}function Vs(){if(this.count--,this.count===0){if(this.stylesheets)lf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Is=null;function lf(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Is=new Map,n.forEach(qS,e),Is=null,Vs.call(e))}function qS(e,n){if(!(n.state.loading&4)){var r=Is.get(e);if(r)var i=r.get(null);else{r=new Map,Is.set(e,r);for(var d=e.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<d.length;p++){var w=d[p];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(r.set(w.dataset.precedence,w),i=w)}i&&r.set(null,i)}d=n.instance,w=d.getAttribute("data-precedence"),p=r.get(w)||i,p===i&&r.set(null,d),r.set(w,d),this.count++,i=Vs.bind(this),d.addEventListener("load",i),d.addEventListener("error",i),p?p.parentNode.insertBefore(d,p.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(d,e.firstChild)),n.state.loading|=4}}var ri={$$typeof:M,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function VS(e,n,r,i,d,p,w,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=al(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=al(0),this.hiddenUpdates=al(null),this.identifierPrefix=i,this.onUncaughtError=d,this.onCaughtError=p,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.incompleteTransitions=new Map}function Sv(e,n,r,i,d,p,w,N,L,X,oe,ce){return e=new VS(e,n,r,w,N,L,X,ce),n=1,p===!0&&(n|=24),p=cn(3,null,null,n),e.current=p,p.stateNode=e,n=Bu(),n.refCount++,e.pooledCache=n,n.refCount++,p.memoizedState={element:i,isDehydrated:r,cache:n},Vu(p),e}function jv(e){return e?(e=ml,e):ml}function Nv(e,n,r,i,d,p){d=jv(d),i.context===null?i.context=d:i.pendingContext=d,i=Ga(n),i.payload={element:r},p=p===void 0?null:p,p!==null&&(i.callback=p),r=Ya(e,i,n),r!==null&&(mn(r,e,n),Do(r,e,n))}function Cv(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<n?r:n}}function of(e,n){Cv(e,n),(e=e.alternate)&&Cv(e,n)}function Ev(e){if(e.tag===13){var n=hl(e,67108864);n!==null&&mn(n,e,67108864),of(e,67108864)}}var Gs=!0;function IS(e,n,r,i){var d=T.T;T.T=null;var p=Z.p;try{Z.p=2,sf(e,n,r,i)}finally{Z.p=p,T.T=d}}function GS(e,n,r,i){var d=T.T;T.T=null;var p=Z.p;try{Z.p=8,sf(e,n,r,i)}finally{Z.p=p,T.T=d}}function sf(e,n,r,i){if(Gs){var d=cf(i);if(d===null)Kd(e,n,i,Ys,r),Rv(e,i);else if(KS(d,e,n,r,i))i.stopPropagation();else if(Rv(e,i),n&4&&-1<YS.indexOf(e)){for(;d!==null;){var p=ut(d);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var w=pa(p.pendingLanes);if(w!==0){var N=p;for(N.pendingLanes|=2,N.entangledLanes|=2;w;){var L=1<<31-Ft(w);N.entanglements[1]|=L,w&=~L}na(p),(dt&6)===0&&(As=he()+500,Zo(0))}}break;case 13:N=hl(p,2),N!==null&&mn(N,p,2),Ms(),of(p,2)}if(p=cf(i),p===null&&Kd(e,n,i,Ys,r),p===d)break;d=p}d!==null&&i.stopPropagation()}else Kd(e,n,i,null,r)}}function cf(e){return e=hu(e),uf(e)}var Ys=null;function uf(e){if(Ys=null,e=Ye(e),e!==null){var n=c(e);if(n===null)e=null;else{var r=n.tag;if(r===13){if(e=f(n),e!==null)return e;e=null}else if(r===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return Ys=e,null}function _v(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(ve()){case Me:return 2;case $e:return 8;case qe:case lt:return 32;case Qt:return 268435456;default:return 32}default:return 32}}var df=!1,or=null,ir=null,sr=null,li=new Map,oi=new Map,cr=[],YS="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 Rv(e,n){switch(e){case"focusin":case"focusout":or=null;break;case"dragenter":case"dragleave":ir=null;break;case"mouseover":case"mouseout":sr=null;break;case"pointerover":case"pointerout":li.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":oi.delete(n.pointerId)}}function ii(e,n,r,i,d,p){return e===null||e.nativeEvent!==p?(e={blockedOn:n,domEventName:r,eventSystemFlags:i,nativeEvent:p,targetContainers:[d]},n!==null&&(n=ut(n),n!==null&&Ev(n)),e):(e.eventSystemFlags|=i,n=e.targetContainers,d!==null&&n.indexOf(d)===-1&&n.push(d),e)}function KS(e,n,r,i,d){switch(n){case"focusin":return or=ii(or,e,n,r,i,d),!0;case"dragenter":return ir=ii(ir,e,n,r,i,d),!0;case"mouseover":return sr=ii(sr,e,n,r,i,d),!0;case"pointerover":var p=d.pointerId;return li.set(p,ii(li.get(p)||null,e,n,r,i,d)),!0;case"gotpointercapture":return p=d.pointerId,oi.set(p,ii(oi.get(p)||null,e,n,r,i,d)),!0}return!1}function Ov(e){var n=Ye(e.target);if(n!==null){var r=c(n);if(r!==null){if(n=r.tag,n===13){if(n=f(r),n!==null){e.blockedOn=n,G(e.priority,function(){if(r.tag===13){var i=hn();i=po(i);var d=hl(r,i);d!==null&&mn(d,r,i),of(r,i)}});return}}else if(n===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ks(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var r=cf(e.nativeEvent);if(r===null){r=e.nativeEvent;var i=new r.constructor(r.type,r);fu=i,r.target.dispatchEvent(i),fu=null}else return n=ut(r),n!==null&&Ev(n),e.blockedOn=r,!1;n.shift()}return!0}function Av(e,n,r){Ks(e)&&r.delete(n)}function XS(){df=!1,or!==null&&Ks(or)&&(or=null),ir!==null&&Ks(ir)&&(ir=null),sr!==null&&Ks(sr)&&(sr=null),li.forEach(Av),oi.forEach(Av)}function Xs(e,n){e.blockedOn===n&&(e.blockedOn=null,df||(df=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,XS)))}var Qs=null;function Tv(e){Qs!==e&&(Qs=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Qs===e&&(Qs=null);for(var n=0;n<e.length;n+=3){var r=e[n],i=e[n+1],d=e[n+2];if(typeof i!="function"){if(uf(i||r)===null)continue;break}var p=ut(r);p!==null&&(e.splice(n,3),n-=3,cd(p,{pending:!0,data:d,method:r.method,action:i},i,d))}}))}function si(e){function n(L){return Xs(L,e)}or!==null&&Xs(or,e),ir!==null&&Xs(ir,e),sr!==null&&Xs(sr,e),li.forEach(n),oi.forEach(n);for(var r=0;r<cr.length;r++){var i=cr[r];i.blockedOn===e&&(i.blockedOn=null)}for(;0<cr.length&&(r=cr[0],r.blockedOn===null);)Ov(r),r.blockedOn===null&&cr.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(i=0;i<r.length;i+=3){var d=r[i],p=r[i+1],w=d[pe]||null;if(typeof p=="function")w||Tv(r);else if(w){var N=null;if(p&&p.hasAttribute("formAction")){if(d=p,w=p[pe]||null)N=w.formAction;else if(uf(d)!==null)continue}else N=w.action;typeof N=="function"?r[i+1]=N:(r.splice(i,3),i-=3),Tv(r)}}}function ff(e){this._internalRoot=e}Zs.prototype.render=ff.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(o(409));var r=n.current,i=hn();Nv(r,i,e,n,null,null)},Zs.prototype.unmount=ff.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Nv(e.current,2,null,e,null,null),Ms(),n[_e]=null}};function Zs(e){this._internalRoot=e}Zs.prototype.unstable_scheduleHydration=function(e){if(e){var n=U();e={blockedOn:null,target:e,priority:n};for(var r=0;r<cr.length&&n!==0&&n<cr[r].priority;r++);cr.splice(r,0,e),r===0&&Ov(e)}};var Mv=a.version;if(Mv!=="19.1.1")throw Error(o(527,Mv,"19.1.1"));Z.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=g(n),e=e!==null?h(e):null,e=e===null?null:e.stateNode,e};var QS={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Js=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Js.isDisabled&&Js.supportsFiber)try{Wt=Js.inject(QS),wt=Js}catch{}}return di.createRoot=function(e,n){if(!s(e))throw Error(o(299));var r=!1,i="",d=Kp,p=Xp,w=Qp,N=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(d=n.onUncaughtError),n.onCaughtError!==void 0&&(p=n.onCaughtError),n.onRecoverableError!==void 0&&(w=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(N=n.unstable_transitionCallbacks)),n=Sv(e,1,!1,null,null,r,i,d,p,w,N,null),e[_e]=n.current,Yd(e),new ff(n)},di.hydrateRoot=function(e,n,r){if(!s(e))throw Error(o(299));var i=!1,d="",p=Kp,w=Xp,N=Qp,L=null,X=null;return r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(d=r.identifierPrefix),r.onUncaughtError!==void 0&&(p=r.onUncaughtError),r.onCaughtError!==void 0&&(w=r.onCaughtError),r.onRecoverableError!==void 0&&(N=r.onRecoverableError),r.unstable_transitionCallbacks!==void 0&&(L=r.unstable_transitionCallbacks),r.formState!==void 0&&(X=r.formState)),n=Sv(e,1,!0,n,r??null,i,d,p,w,N,L,X),n.context=jv(null),r=n.current,i=hn(),i=po(i),d=Ga(i),d.callback=null,Ya(r,d,i),r=i,n.current.lanes=r,Cr(n,r),na(n),e[_e]=n.current,Yd(e),new Zs(n)},di.version="19.1.1",di}var sy;function _N(){if(sy)return gf.exports;sy=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(a){console.error(a)}}return t(),gf.exports=EN(),gf.exports}var RN=_N();/**
56
+ * react-router v7.7.1
57
+ *
58
+ * Copyright (c) Remix Software Inc.
59
+ *
60
+ * This source code is licensed under the MIT license found in the
61
+ * LICENSE.md file in the root directory of this source tree.
62
+ *
63
+ * @license MIT
64
+ */var kx=t=>{throw TypeError(t)},ON=(t,a,l)=>a.has(t)||kx("Cannot "+l),bf=(t,a,l)=>(ON(t,a,"read from private field"),l?l.call(t):a.get(t)),AN=(t,a,l)=>a.has(t)?kx("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(t):a.set(t,l);function TN(t={}){let{initialEntries:a=["/"],initialIndex:l,v5Compat:o=!1}=t,s;s=a.map((b,j)=>v(b,typeof b=="string"?null:b.state,j===0?"default":void 0));let c=g(l??s.length-1),f="POP",m=null;function g(b){return Math.min(Math.max(b,0),s.length-1)}function h(){return s[c]}function v(b,j=null,C){let _=Qf(s?h().pathname:"/",b,j,C);return Rt(_.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(b)}`),_}function x(b){return typeof b=="string"?b:gr(b)}return{get index(){return c},get action(){return f},get location(){return h()},createHref:x,createURL(b){return new URL(x(b),"http://localhost")},encodeLocation(b){let j=typeof b=="string"?Pa(b):b;return{pathname:j.pathname||"",search:j.search||"",hash:j.hash||""}},push(b,j){f="PUSH";let C=v(b,j);c+=1,s.splice(c,s.length,C),o&&m&&m({action:f,location:C,delta:1})},replace(b,j){f="REPLACE";let C=v(b,j);s[c]=C,o&&m&&m({action:f,location:C,delta:0})},go(b){f="POP";let j=g(c+b),C=s[j];c=j,m&&m({action:f,location:C,delta:b})},listen(b){return m=b,()=>{m=null}}}}function Je(t,a){if(t===!1||t===null||typeof t>"u")throw new Error(a)}function Rt(t,a){if(!t){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function MN(){return Math.random().toString(36).substring(2,10)}function Qf(t,a,l=null,o){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof a=="string"?Pa(a):a,state:l,key:a&&a.key||o||MN()}}function gr({pathname:t="/",search:a="",hash:l=""}){return a&&a!=="?"&&(t+=a.charAt(0)==="?"?a:"?"+a),l&&l!=="#"&&(t+=l.charAt(0)==="#"?l:"#"+l),t}function Pa(t){let a={};if(t){let l=t.indexOf("#");l>=0&&(a.hash=t.substring(l),t=t.substring(0,l));let o=t.indexOf("?");o>=0&&(a.search=t.substring(o),t=t.substring(0,o)),t&&(a.pathname=t)}return a}function kN(t,a=!1){let l="http://localhost";typeof window<"u"&&(l=window.location.origin!=="null"?window.location.origin:window.location.href),Je(l,"No window.location.(origin|href) available to create URL");let o=typeof t=="string"?t:gr(t);return o=o.replace(/ $/,"%20"),!a&&o.startsWith("//")&&(o=l+o),new URL(o,l)}var vi,cy=class{constructor(t){if(AN(this,vi,new Map),t)for(let[a,l]of t)this.set(a,l)}get(t){if(bf(this,vi).has(t))return bf(this,vi).get(t);if(t.defaultValue!==void 0)return t.defaultValue;throw new Error("No value found for context")}set(t,a){bf(this,vi).set(t,a)}};vi=new WeakMap;var DN=new Set(["lazy","caseSensitive","path","id","index","children"]);function LN(t){return DN.has(t)}var zN=new Set(["lazy","caseSensitive","path","id","index","unstable_middleware","children"]);function UN(t){return zN.has(t)}function PN(t){return t.index===!0}function Ei(t,a,l=[],o={},s=!1){return t.map((c,f)=>{let m=[...l,String(f)],g=typeof c.id=="string"?c.id:m.join("-");if(Je(c.index!==!0||!c.children,"Cannot specify children on an index route"),Je(s||!o[g],`Found a route id collision on id "${g}". Route id's must be globally unique within Data Router usages`),PN(c)){let h={...c,...a(c),id:g};return o[g]=h,h}else{let h={...c,...a(c),id:g,children:void 0};return o[g]=h,c.children&&(h.children=Ei(c.children,a,m,o,s)),h}})}function mr(t,a,l="/"){return gc(t,a,l,!1)}function gc(t,a,l,o){let s=typeof a=="string"?Pa(a):a,c=Ln(s.pathname||"/",l);if(c==null)return null;let f=Dx(t);BN(f);let m=null;for(let g=0;m==null&&g<f.length;++g){let h=ZN(c);m=XN(f[g],h,o)}return m}function HN(t,a){let{route:l,pathname:o,params:s}=t;return{id:l.id,pathname:o,params:s,data:a[l.id],handle:l.handle}}function Dx(t,a=[],l=[],o=""){let s=(c,f,m)=>{let g={relativePath:m===void 0?c.path||"":m,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};g.relativePath.startsWith("/")&&(Je(g.relativePath.startsWith(o),`Absolute route path "${g.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(o.length));let h=oa([o,g.relativePath]),v=l.concat(g);c.children&&c.children.length>0&&(Je(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),Dx(c.children,a,v,h)),!(c.path==null&&!c.index)&&a.push({path:h,score:YN(h,c.index),routesMeta:v})};return t.forEach((c,f)=>{if(c.path===""||!c.path?.includes("?"))s(c,f);else for(let m of Lx(c.path))s(c,f,m)}),a}function Lx(t){let a=t.split("/");if(a.length===0)return[];let[l,...o]=a,s=l.endsWith("?"),c=l.replace(/\?$/,"");if(o.length===0)return s?[c,""]:[c];let f=Lx(o.join("/")),m=[];return m.push(...f.map(g=>g===""?c:[c,g].join("/"))),s&&m.push(...f),m.map(g=>t.startsWith("/")&&g===""?"/":g)}function BN(t){t.sort((a,l)=>a.score!==l.score?l.score-a.score:KN(a.routesMeta.map(o=>o.childrenIndex),l.routesMeta.map(o=>o.childrenIndex)))}var $N=/^:[\w-]+$/,FN=3,qN=2,VN=1,IN=10,GN=-2,uy=t=>t==="*";function YN(t,a){let l=t.split("/"),o=l.length;return l.some(uy)&&(o+=GN),a&&(o+=qN),l.filter(s=>!uy(s)).reduce((s,c)=>s+($N.test(c)?FN:c===""?VN:IN),o)}function KN(t,a){return t.length===a.length&&t.slice(0,-1).every((o,s)=>o===a[s])?t[t.length-1]-a[a.length-1]:0}function XN(t,a,l=!1){let{routesMeta:o}=t,s={},c="/",f=[];for(let m=0;m<o.length;++m){let g=o[m],h=m===o.length-1,v=c==="/"?a:a.slice(c.length)||"/",x=_c({path:g.relativePath,caseSensitive:g.caseSensitive,end:h},v),S=g.route;if(!x&&h&&l&&!o[o.length-1].route.index&&(x=_c({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},v)),!x)return null;Object.assign(s,x.params),f.push({params:s,pathname:oa([c,x.pathname]),pathnameBase:t2(oa([c,x.pathnameBase])),route:S}),x.pathnameBase!=="/"&&(c=oa([c,x.pathnameBase]))}return f}function _c(t,a){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[l,o]=QN(t.path,t.caseSensitive,t.end),s=a.match(l);if(!s)return null;let c=s[0],f=c.replace(/(.)\/+$/,"$1"),m=s.slice(1);return{params:o.reduce((h,{paramName:v,isOptional:x},S)=>{if(v==="*"){let j=m[S]||"";f=c.slice(0,c.length-j.length).replace(/(.)\/+$/,"$1")}const b=m[S];return x&&!b?h[v]=void 0:h[v]=(b||"").replace(/%2F/g,"/"),h},{}),pathname:c,pathnameBase:f,pattern:t}}function QN(t,a=!1,l=!0){Rt(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let o=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,m,g)=>(o.push({paramName:m,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(o.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):l?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,a?void 0:"i"),o]}function ZN(t){try{return t.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return Rt(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${a}).`),t}}function Ln(t,a){if(a==="/")return t;if(!t.toLowerCase().startsWith(a.toLowerCase()))return null;let l=a.endsWith("/")?a.length-1:a.length,o=t.charAt(l);return o&&o!=="/"?null:t.slice(l)||"/"}function JN({basename:t,pathname:a}){return a==="/"?t:oa([t,a])}function WN(t,a="/"){let{pathname:l,search:o="",hash:s=""}=typeof t=="string"?Pa(t):t;return{pathname:l?l.startsWith("/")?l:e2(l,a):a,search:n2(o),hash:a2(s)}}function e2(t,a){let l=a.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?l.length>1&&l.pop():s!=="."&&l.push(s)}),l.length>1?l.join("/"):"/"}function wf(t,a,l,o){return`Cannot include a '${t}' character in a manually specified \`to.${a}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${l}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function zx(t){return t.filter((a,l)=>l===0||a.route.path&&a.route.path.length>0)}function Bc(t){let a=zx(t);return a.map((l,o)=>o===a.length-1?l.pathname:l.pathnameBase)}function $c(t,a,l,o=!1){let s;typeof t=="string"?s=Pa(t):(s={...t},Je(!s.pathname||!s.pathname.includes("?"),wf("?","pathname","search",s)),Je(!s.pathname||!s.pathname.includes("#"),wf("#","pathname","hash",s)),Je(!s.search||!s.search.includes("#"),wf("#","search","hash",s)));let c=t===""||s.pathname==="",f=c?"/":s.pathname,m;if(f==null)m=l;else{let x=a.length-1;if(!o&&f.startsWith("..")){let S=f.split("/");for(;S[0]==="..";)S.shift(),x-=1;s.pathname=S.join("/")}m=x>=0?a[x]:"/"}let g=WN(s,m),h=f&&f!=="/"&&f.endsWith("/"),v=(c||f===".")&&l.endsWith("/");return!g.pathname.endsWith("/")&&(h||v)&&(g.pathname+="/"),g}var oa=t=>t.join("/").replace(/\/\/+/g,"/"),t2=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),n2=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,a2=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,Zf=class{constructor(t,a,l,o=!1){this.status=t,this.statusText=a||"",this.internal=o,l instanceof Error?(this.data=l.toString(),this.error=l):this.data=l}};function _i(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}var Ux=["POST","PUT","PATCH","DELETE"],r2=new Set(Ux),l2=["GET",...Ux],o2=new Set(l2),i2=new Set([301,302,303,307,308]),s2=new Set([307,308]),Sf={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},c2={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},fi={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},u2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,bh=t=>u2.test(t),d2=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),Px="remix-router-transitions",Hx=Symbol("ResetLoaderData");function f2(t){const a=t.window?t.window:typeof window<"u"?window:void 0,l=typeof a<"u"&&typeof a.document<"u"&&typeof a.document.createElement<"u";Je(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let o=t.hydrationRouteProperties||[],s=t.mapRouteProperties||d2,c={},f=Ei(t.routes,s,void 0,c),m,g=t.basename||"/",h=t.dataStrategy||v2,v={unstable_middleware:!1,...t.future},x=null,S=new Set,b=null,j=null,C=null,_=t.hydrationData!=null,E=mr(f,t.history.location,g),A=!1,M=null,z;if(E==null&&!t.patchRoutesOnNavigation){let U=Mn(404,{pathname:t.history.location.pathname}),{matches:G,route:te}=Sy(f);z=!0,E=G,M={[te.id]:U}}else if(E&&!t.hydrationData&&Er(E,f,t.history.location.pathname).active&&(E=null),E)if(E.some(U=>U.route.lazy))z=!1;else if(!E.some(U=>U.route.loader))z=!0;else{let U=t.hydrationData?t.hydrationData.loaderData:null,G=t.hydrationData?t.hydrationData.errors:null;if(G){let te=E.findIndex(fe=>G[fe.route.id]!==void 0);z=E.slice(0,te+1).every(fe=>!Wf(fe.route,U,G))}else z=E.every(te=>!Wf(te.route,U,G))}else{z=!1,E=[];let U=Er(null,f,t.history.location.pathname);U.active&&U.matches&&(A=!0,E=U.matches)}let D,R={historyAction:t.history.action,location:t.history.location,matches:E,initialized:z,navigation:Sf,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||M,fetchers:new Map,blockers:new Map},P="POP",B=!1,ne,re=!1,O=new Map,q=null,ee=!1,V=!1,ae=new Set,T=new Map,Z=0,I=-1,be=new Map,k=new Set,K=new Map,$=new Map,Q=new Set,ie=new Map,me,ge=null;function we(){if(x=t.history.listen(({action:U,location:G,delta:te})=>{if(me){me(),me=void 0;return}Rt(ie.size===0||te!=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 fe=Bi({currentLocation:R.location,nextLocation:G,historyAction:U});if(fe&&te!=null){let pe=new Promise(_e=>{me=_e});t.history.go(te*-1),Qn(fe,{state:"blocked",location:G,proceed(){Qn(fe,{state:"proceeding",proceed:void 0,reset:void 0,location:G}),pe.then(()=>t.history.go(te))},reset(){let _e=new Map(R.blockers);_e.set(fe,fi),Se({blockers:_e})}});return}return bt(U,G)}),l){R2(a,O);let U=()=>O2(a,O);a.addEventListener("pagehide",U),q=()=>a.removeEventListener("pagehide",U)}return R.initialized||bt("POP",R.location,{initialHydration:!0}),D}function Ue(){x&&x(),q&&q(),S.clear(),ne&&ne.abort(),R.fetchers.forEach((U,G)=>Ft(G)),R.blockers.forEach((U,G)=>Nr(G))}function le(U){return S.add(U),()=>S.delete(U)}function Se(U,G={}){U.matches&&(U.matches=U.matches.map(pe=>{let _e=c[pe.route.id],Ae=pe.route;return Ae.element!==_e.element||Ae.errorElement!==_e.errorElement||Ae.hydrateFallbackElement!==_e.hydrateFallbackElement?{...pe,route:_e}:pe})),R={...R,...U};let te=[],fe=[];R.fetchers.forEach((pe,_e)=>{pe.state==="idle"&&(Q.has(_e)?te.push(_e):fe.push(_e))}),Q.forEach(pe=>{!R.fetchers.has(pe)&&!T.has(pe)&&te.push(pe)}),[...S].forEach(pe=>pe(R,{deletedFetchers:te,viewTransitionOpts:G.viewTransitionOpts,flushSync:G.flushSync===!0})),te.forEach(pe=>Ft(pe)),fe.forEach(pe=>R.fetchers.delete(pe))}function Be(U,G,{flushSync:te}={}){let fe=R.actionData!=null&&R.navigation.formMethod!=null&&rn(R.navigation.formMethod)&&R.navigation.state==="loading"&&U.state?._isRedirect!==!0,pe;G.actionData?Object.keys(G.actionData).length>0?pe=G.actionData:pe=null:fe?pe=R.actionData:pe=null;let _e=G.loaderData?by(R.loaderData,G.loaderData,G.matches||[],G.errors):R.loaderData,Ae=R.blockers;Ae.size>0&&(Ae=new Map(Ae),Ae.forEach((Oe,Te)=>Ae.set(Te,fi)));let Re=ee?!1:Fi(U,G.matches||R.matches),De=B===!0||R.navigation.formMethod!=null&&rn(R.navigation.formMethod)&&U.state?._isRedirect!==!0;m&&(f=m,m=void 0),ee||P==="POP"||(P==="PUSH"?t.history.push(U,U.state):P==="REPLACE"&&t.history.replace(U,U.state));let Le;if(P==="POP"){let Oe=O.get(R.location.pathname);Oe&&Oe.has(U.pathname)?Le={currentLocation:R.location,nextLocation:U}:O.has(U.pathname)&&(Le={currentLocation:U,nextLocation:R.location})}else if(re){let Oe=O.get(R.location.pathname);Oe?Oe.add(U.pathname):(Oe=new Set([U.pathname]),O.set(R.location.pathname,Oe)),Le={currentLocation:R.location,nextLocation:U}}Se({...G,actionData:pe,loaderData:_e,historyAction:P,location:U,initialized:!0,navigation:Sf,revalidation:"idle",restoreScrollPosition:Re,preventScrollReset:De,blockers:Ae},{viewTransitionOpts:Le,flushSync:te===!0}),P="POP",B=!1,re=!1,ee=!1,V=!1,ge?.resolve(),ge=null}async function rt(U,G){if(typeof U=="number"){t.history.go(U);return}let te=Jf(R.location,R.matches,g,U,G?.fromRouteId,G?.relative),{path:fe,submission:pe,error:_e}=dy(!1,te,G),Ae=R.location,Re=Qf(R.location,fe,G&&G.state);Re={...Re,...t.history.encodeLocation(Re)};let De=G&&G.replace!=null?G.replace:void 0,Le="PUSH";De===!0?Le="REPLACE":De===!1||pe!=null&&rn(pe.formMethod)&&pe.formAction===R.location.pathname+R.location.search&&(Le="REPLACE");let Oe=G&&"preventScrollReset"in G?G.preventScrollReset===!0:void 0,Te=(G&&G.flushSync)===!0,Ye=Bi({currentLocation:Ae,nextLocation:Re,historyAction:Le});if(Ye){Qn(Ye,{state:"blocked",location:Re,proceed(){Qn(Ye,{state:"proceeding",proceed:void 0,reset:void 0,location:Re}),rt(U,G)},reset(){let ut=new Map(R.blockers);ut.set(Ye,fi),Se({blockers:ut})}});return}await bt(Le,Re,{submission:pe,pendingError:_e,preventScrollReset:Oe,replace:G&&G.replace,enableViewTransition:G&&G.viewTransition,flushSync:Te})}function Ee(){ge||(ge=A2()),mo(),Se({revalidation:"loading"});let U=ge.promise;return R.navigation.state==="submitting"?U:R.navigation.state==="idle"?(bt(R.historyAction,R.location,{startUninterruptedRevalidation:!0}),U):(bt(P||R.historyAction,R.navigation.location,{overrideNavigation:R.navigation,enableViewTransition:re===!0}),U)}async function bt(U,G,te){ne&&ne.abort(),ne=null,P=U,ee=(te&&te.startUninterruptedRevalidation)===!0,Cr(R.location,R.matches),B=(te&&te.preventScrollReset)===!0,re=(te&&te.enableViewTransition)===!0;let fe=m||f,pe=te&&te.overrideNavigation,_e=te?.initialHydration&&R.matches&&R.matches.length>0&&!A?R.matches:mr(fe,G,g),Ae=(te&&te.flushSync)===!0;if(_e&&R.initialized&&!V&&j2(R.location,G)&&!(te&&te.submission&&rn(te.submission.formMethod))){Be(G,{matches:_e},{flushSync:Ae});return}let Re=Er(_e,fe,G.pathname);if(Re.active&&Re.matches&&(_e=Re.matches),!_e){let{error:Ct,notFoundMatches:Ie,route:ht}=nl(G.pathname);Be(G,{matches:Ie,loaderData:{},errors:{[ht.id]:Ct}},{flushSync:Ae});return}ne=new AbortController;let De=Il(t.history,G,ne.signal,te&&te.submission),Le=new cy(t.unstable_getContext?await t.unstable_getContext():void 0),Oe;if(te&&te.pendingError)Oe=[Gr(_e).route.id,{type:"error",error:te.pendingError}];else if(te&&te.submission&&rn(te.submission.formMethod)){let Ct=await ue(De,G,te.submission,_e,Le,Re.active,te&&te.initialHydration===!0,{replace:te.replace,flushSync:Ae});if(Ct.shortCircuited)return;if(Ct.pendingActionResult){let[Ie,ht]=Ct.pendingActionResult;if(pn(ht)&&_i(ht.error)&&ht.error.status===404){ne=null,Be(G,{matches:Ct.matches,loaderData:{},errors:{[Ie]:ht.error}});return}}_e=Ct.matches||_e,Oe=Ct.pendingActionResult,pe=jf(G,te.submission),Ae=!1,Re.active=!1,De=Il(t.history,De.url,De.signal)}let{shortCircuited:Te,matches:Ye,loaderData:ut,errors:Nt}=await de(De,G,_e,Le,Re.active,pe,te&&te.submission,te&&te.fetcherSubmission,te&&te.replace,te&&te.initialHydration===!0,Ae,Oe);Te||(ne=null,Be(G,{matches:Ye||_e,...wy(Oe),loaderData:ut,errors:Nt}))}async function ue(U,G,te,fe,pe,_e,Ae,Re={}){mo();let De=E2(G,te);if(Se({navigation:De},{flushSync:Re.flushSync===!0}),_e){let Te=await _r(fe,G.pathname,U.signal);if(Te.type==="aborted")return{shortCircuited:!0};if(Te.type==="error"){let Ye=Gr(Te.partialMatches).route.id;return{matches:Te.partialMatches,pendingActionResult:[Ye,{type:"error",error:Te.error}]}}else if(Te.matches)fe=Te.matches;else{let{notFoundMatches:Ye,error:ut,route:Nt}=nl(G.pathname);return{matches:Ye,pendingActionResult:[Nt.id,{type:"error",error:ut}]}}}let Le,Oe=vc(fe,G);if(!Oe.route.action&&!Oe.route.lazy)Le={type:"error",error:Mn(405,{method:U.method,pathname:G.pathname,routeId:Oe.route.id})};else{let Te=Xl(s,c,U,fe,Oe,Ae?[]:o,pe),Ye=await Qt(U,Te,pe,null);if(Le=Ye[Oe.route.id],!Le){for(let ut of fe)if(Ye[ut.route.id]){Le=Ye[ut.route.id];break}}if(U.signal.aborted)return{shortCircuited:!0}}if(Yr(Le)){let Te;return Re&&Re.replace!=null?Te=Re.replace:Te=vy(Le.response.headers.get("Location"),new URL(U.url),g)===R.location.pathname+R.location.search,await lt(U,Le,!0,{submission:te,replace:Te}),{shortCircuited:!0}}if(pn(Le)){let Te=Gr(fe,Oe.route.id);return(Re&&Re.replace)!==!0&&(P="PUSH"),{matches:fe,pendingActionResult:[Te.route.id,Le,Oe.route.id]}}return{matches:fe,pendingActionResult:[Oe.route.id,Le]}}async function de(U,G,te,fe,pe,_e,Ae,Re,De,Le,Oe,Te){let Ye=_e||jf(G,Ae),ut=Ae||Re||Ny(Ye),Nt=!ee&&!Le;if(pe){if(Nt){let Tt=he(Te);Se({navigation:Ye,...Tt!==void 0?{actionData:Tt}:{}},{flushSync:Oe})}let Qe=await _r(te,G.pathname,U.signal);if(Qe.type==="aborted")return{shortCircuited:!0};if(Qe.type==="error"){let Tt=Gr(Qe.partialMatches).route.id;return{matches:Qe.partialMatches,loaderData:{},errors:{[Tt]:Qe.error}}}else if(Qe.matches)te=Qe.matches;else{let{error:Tt,notFoundMatches:Rr,route:Sn}=nl(G.pathname);return{matches:Rr,loaderData:{},errors:{[Sn.id]:Tt}}}}let Ct=m||f,{dsMatches:Ie,revalidatingFetchers:ht}=fy(U,fe,s,c,t.history,R,te,ut,G,Le?[]:o,Le===!0,V,ae,Q,K,k,Ct,g,t.patchRoutesOnNavigation!=null,Te);if(I=++Z,!t.dataStrategy&&!Ie.some(Qe=>Qe.shouldLoad)&&ht.length===0){let Qe=Sr();return Be(G,{matches:te,loaderData:{},errors:Te&&pn(Te[1])?{[Te[0]]:Te[1].error}:null,...wy(Te),...Qe?{fetchers:new Map(R.fetchers)}:{}},{flushSync:Oe}),{shortCircuited:!0}}if(Nt){let Qe={};if(!pe){Qe.navigation=Ye;let Tt=he(Te);Tt!==void 0&&(Qe.actionData=Tt)}ht.length>0&&(Qe.fetchers=ve(ht)),Se(Qe,{flushSync:Oe})}ht.forEach(Qe=>{Xn(Qe.key),Qe.controller&&T.set(Qe.key,Qe.controller)});let Zn=()=>ht.forEach(Qe=>Xn(Qe.key));ne&&ne.signal.addEventListener("abort",Zn);let{loaderResults:on,fetcherResults:Zt}=await tl(Ie,ht,U,fe);if(U.signal.aborted)return{shortCircuited:!0};ne&&ne.signal.removeEventListener("abort",Zn),ht.forEach(Qe=>T.delete(Qe.key));let wn=ec(on);if(wn)return await lt(U,wn.result,!0,{replace:De}),{shortCircuited:!0};if(wn=ec(Zt),wn)return k.add(wn.key),await lt(U,wn.result,!0,{replace:De}),{shortCircuited:!0};let{loaderData:rl,errors:$a}=xy(R,te,on,Te,ht,Zt);Le&&R.errors&&($a={...R.errors,...$a});let ga=Sr(),va=jr(I),ya=ga||va||ht.length>0;return{matches:te,loaderData:rl,errors:$a,...ya?{fetchers:new Map(R.fetchers)}:{}}}function he(U){if(U&&!pn(U[1]))return{[U[0]]:U[1].data};if(R.actionData)return Object.keys(R.actionData).length===0?null:R.actionData}function ve(U){return U.forEach(G=>{let te=R.fetchers.get(G.key),fe=hi(void 0,te?te.data:void 0);R.fetchers.set(G.key,fe)}),new Map(R.fetchers)}async function Me(U,G,te,fe){Xn(U);let pe=(fe&&fe.flushSync)===!0,_e=m||f,Ae=Jf(R.location,R.matches,g,te,G,fe?.relative),Re=mr(_e,Ae,g),De=Er(Re,_e,Ae);if(De.active&&De.matches&&(Re=De.matches),!Re){wt(U,G,Mn(404,{pathname:Ae}),{flushSync:pe});return}let{path:Le,submission:Oe,error:Te}=dy(!0,Ae,fe);if(Te){wt(U,G,Te,{flushSync:pe});return}let Ye=new cy(t.unstable_getContext?await t.unstable_getContext():void 0),ut=(fe&&fe.preventScrollReset)===!0;if(Oe&&rn(Oe.formMethod)){await $e(U,G,Le,Re,Ye,De.active,pe,ut,Oe);return}K.set(U,{routeId:G,path:Le}),await qe(U,G,Le,Re,Ye,De.active,pe,ut,Oe)}async function $e(U,G,te,fe,pe,_e,Ae,Re,De){mo(),K.delete(U);let Le=R.fetchers.get(U);Wt(U,_2(De,Le),{flushSync:Ae});let Oe=new AbortController,Te=Il(t.history,te,Oe.signal,De);if(_e){let St=await _r(fe,new URL(Te.url).pathname,Te.signal,U);if(St.type==="aborted")return;if(St.type==="error"){wt(U,G,St.error,{flushSync:Ae});return}else if(St.matches)fe=St.matches;else{wt(U,G,Mn(404,{pathname:te}),{flushSync:Ae});return}}let Ye=vc(fe,te);if(!Ye.route.action&&!Ye.route.lazy){let St=Mn(405,{method:De.formMethod,pathname:te,routeId:G});wt(U,G,St,{flushSync:Ae});return}T.set(U,Oe);let ut=Z,Nt=Xl(s,c,Te,fe,Ye,o,pe),Ie=(await Qt(Te,Nt,pe,U))[Ye.route.id];if(Te.signal.aborted){T.get(U)===Oe&&T.delete(U);return}if(Q.has(U)){if(Yr(Ie)||pn(Ie)){Wt(U,fr(void 0));return}}else{if(Yr(Ie))if(T.delete(U),I>ut){Wt(U,fr(void 0));return}else return k.add(U),Wt(U,hi(De)),lt(Te,Ie,!1,{fetcherSubmission:De,preventScrollReset:Re});if(pn(Ie)){wt(U,G,Ie.error);return}}let ht=R.navigation.location||R.location,Zn=Il(t.history,ht,Oe.signal),on=m||f,Zt=R.navigation.state!=="idle"?mr(on,R.navigation.location,g):R.matches;Je(Zt,"Didn't find any matches after fetcher action");let wn=++Z;be.set(U,wn);let rl=hi(De,Ie.data);R.fetchers.set(U,rl);let{dsMatches:$a,revalidatingFetchers:ga}=fy(Zn,pe,s,c,t.history,R,Zt,De,ht,o,!1,V,ae,Q,K,k,on,g,t.patchRoutesOnNavigation!=null,[Ye.route.id,Ie]);ga.filter(St=>St.key!==U).forEach(St=>{let Fa=St.key,qi=R.fetchers.get(Fa),Vi=hi(void 0,qi?qi.data:void 0);R.fetchers.set(Fa,Vi),Xn(Fa),St.controller&&T.set(Fa,St.controller)}),Se({fetchers:new Map(R.fetchers)});let va=()=>ga.forEach(St=>Xn(St.key));Oe.signal.addEventListener("abort",va);let{loaderResults:ya,fetcherResults:Qe}=await tl($a,ga,Zn,pe);if(Oe.signal.aborted)return;if(Oe.signal.removeEventListener("abort",va),be.delete(U),T.delete(U),ga.forEach(St=>T.delete(St.key)),R.fetchers.has(U)){let St=fr(Ie.data);R.fetchers.set(U,St)}let Tt=ec(ya);if(Tt)return lt(Zn,Tt.result,!1,{preventScrollReset:Re});if(Tt=ec(Qe),Tt)return k.add(Tt.key),lt(Zn,Tt.result,!1,{preventScrollReset:Re});let{loaderData:Rr,errors:Sn}=xy(R,Zt,ya,void 0,ga,Qe);jr(wn),R.navigation.state==="loading"&&wn>I?(Je(P,"Expected pending action"),ne&&ne.abort(),Be(R.navigation.location,{matches:Zt,loaderData:Rr,errors:Sn,fetchers:new Map(R.fetchers)})):(Se({errors:Sn,loaderData:by(R.loaderData,Rr,Zt,Sn),fetchers:new Map(R.fetchers)}),V=!1)}async function qe(U,G,te,fe,pe,_e,Ae,Re,De){let Le=R.fetchers.get(U);Wt(U,hi(De,Le?Le.data:void 0),{flushSync:Ae});let Oe=new AbortController,Te=Il(t.history,te,Oe.signal);if(_e){let ht=await _r(fe,new URL(Te.url).pathname,Te.signal,U);if(ht.type==="aborted")return;if(ht.type==="error"){wt(U,G,ht.error,{flushSync:Ae});return}else if(ht.matches)fe=ht.matches;else{wt(U,G,Mn(404,{pathname:te}),{flushSync:Ae});return}}let Ye=vc(fe,te);T.set(U,Oe);let ut=Z,Nt=Xl(s,c,Te,fe,Ye,o,pe),Ie=(await Qt(Te,Nt,pe,U))[Ye.route.id];if(T.get(U)===Oe&&T.delete(U),!Te.signal.aborted){if(Q.has(U)){Wt(U,fr(void 0));return}if(Yr(Ie))if(I>ut){Wt(U,fr(void 0));return}else{k.add(U),await lt(Te,Ie,!1,{preventScrollReset:Re});return}if(pn(Ie)){wt(U,G,Ie.error);return}Wt(U,fr(Ie.data))}}async function lt(U,G,te,{submission:fe,fetcherSubmission:pe,preventScrollReset:_e,replace:Ae}={}){G.response.headers.has("X-Remix-Revalidate")&&(V=!0);let Re=G.response.headers.get("Location");Je(Re,"Expected a Location header on the redirect Response"),Re=vy(Re,new URL(U.url),g);let De=Qf(R.location,Re,{_isRedirect:!0});if(l){let Nt=!1;if(G.response.headers.has("X-Remix-Reload-Document"))Nt=!0;else if(bh(Re)){const Ct=kN(Re,!0);Nt=Ct.origin!==a.location.origin||Ln(Ct.pathname,g)==null}if(Nt){Ae?a.location.replace(Re):a.location.assign(Re);return}}ne=null;let Le=Ae===!0||G.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Oe,formAction:Te,formEncType:Ye}=R.navigation;!fe&&!pe&&Oe&&Te&&Ye&&(fe=Ny(R.navigation));let ut=fe||pe;if(s2.has(G.response.status)&&ut&&rn(ut.formMethod))await bt(Le,De,{submission:{...ut,formAction:Re},preventScrollReset:_e||B,enableViewTransition:te?re:void 0});else{let Nt=jf(De,fe);await bt(Le,De,{overrideNavigation:Nt,fetcherSubmission:pe,preventScrollReset:_e||B,enableViewTransition:te?re:void 0})}}async function Qt(U,G,te,fe){let pe,_e={};try{pe=await y2(h,U,G,fe,te,!1)}catch(Ae){return G.filter(Re=>Re.shouldLoad).forEach(Re=>{_e[Re.route.id]={type:"error",error:Ae}}),_e}if(U.signal.aborted)return _e;for(let[Ae,Re]of Object.entries(pe))if(N2(Re)){let De=Re.result;_e[Ae]={type:"redirect",response:w2(De,U,Ae,G,g)}}else _e[Ae]=await b2(Re);return _e}async function tl(U,G,te,fe){let pe=Qt(te,U,fe,null),_e=Promise.all(G.map(async De=>{if(De.matches&&De.match&&De.request&&De.controller){let Oe=(await Qt(De.request,De.matches,fe,De.key))[De.match.route.id];return{[De.key]:Oe}}else return Promise.resolve({[De.key]:{type:"error",error:Mn(404,{pathname:De.path})}})})),Ae=await pe,Re=(await _e).reduce((De,Le)=>Object.assign(De,Le),{});return{loaderResults:Ae,fetcherResults:Re}}function mo(){V=!0,K.forEach((U,G)=>{T.has(G)&&ae.add(G),Xn(G)})}function Wt(U,G,te={}){R.fetchers.set(U,G),Se({fetchers:new Map(R.fetchers)},{flushSync:(te&&te.flushSync)===!0})}function wt(U,G,te,fe={}){let pe=Gr(R.matches,G);Ft(U),Se({errors:{[pe.route.id]:te},fetchers:new Map(R.fetchers)},{flushSync:(fe&&fe.flushSync)===!0})}function Un(U){return $.set(U,($.get(U)||0)+1),Q.has(U)&&Q.delete(U),R.fetchers.get(U)||c2}function Ft(U){let G=R.fetchers.get(U);T.has(U)&&!(G&&G.state==="loading"&&be.has(U))&&Xn(U),K.delete(U),be.delete(U),k.delete(U),Q.delete(U),ae.delete(U),R.fetchers.delete(U)}function su(U){let G=($.get(U)||0)-1;G<=0?($.delete(U),Q.add(U)):$.set(U,G),Se({fetchers:new Map(R.fetchers)})}function Xn(U){let G=T.get(U);G&&(G.abort(),T.delete(U))}function Hi(U){for(let G of U){let te=Un(G),fe=fr(te.data);R.fetchers.set(G,fe)}}function Sr(){let U=[],G=!1;for(let te of k){let fe=R.fetchers.get(te);Je(fe,`Expected fetcher: ${te}`),fe.state==="loading"&&(k.delete(te),U.push(te),G=!0)}return Hi(U),G}function jr(U){let G=[];for(let[te,fe]of be)if(fe<U){let pe=R.fetchers.get(te);Je(pe,`Expected fetcher: ${te}`),pe.state==="loading"&&(Xn(te),be.delete(te),G.push(te))}return Hi(G),G.length>0}function pa(U,G){let te=R.blockers.get(U)||fi;return ie.get(U)!==G&&ie.set(U,G),te}function Nr(U){R.blockers.delete(U),ie.delete(U)}function Qn(U,G){let te=R.blockers.get(U)||fi;Je(te.state==="unblocked"&&G.state==="blocked"||te.state==="blocked"&&G.state==="blocked"||te.state==="blocked"&&G.state==="proceeding"||te.state==="blocked"&&G.state==="unblocked"||te.state==="proceeding"&&G.state==="unblocked",`Invalid blocker state transition: ${te.state} -> ${G.state}`);let fe=new Map(R.blockers);fe.set(U,G),Se({blockers:fe})}function Bi({currentLocation:U,nextLocation:G,historyAction:te}){if(ie.size===0)return;ie.size>1&&Rt(!1,"A router only supports one blocker at a time");let fe=Array.from(ie.entries()),[pe,_e]=fe[fe.length-1],Ae=R.blockers.get(pe);if(!(Ae&&Ae.state==="proceeding")&&_e({currentLocation:U,nextLocation:G,historyAction:te}))return pe}function nl(U){let G=Mn(404,{pathname:U}),te=m||f,{matches:fe,route:pe}=Sy(te);return{notFoundMatches:fe,route:pe,error:G}}function $i(U,G,te){if(b=U,C=G,j=te||null,!_&&R.navigation===Sf){_=!0;let fe=Fi(R.location,R.matches);fe!=null&&Se({restoreScrollPosition:fe})}return()=>{b=null,C=null,j=null}}function al(U,G){return j&&j(U,G.map(fe=>HN(fe,R.loaderData)))||U.key}function Cr(U,G){if(b&&C){let te=al(U,G);b[te]=C()}}function Fi(U,G){if(b){let te=al(U,G),fe=b[te];if(typeof fe=="number")return fe}return null}function Er(U,G,te){if(t.patchRoutesOnNavigation)if(U){if(Object.keys(U[0].params).length>0)return{active:!0,matches:gc(G,te,g,!0)}}else return{active:!0,matches:gc(G,te,g,!0)||[]};return{active:!1,matches:null}}async function _r(U,G,te,fe){if(!t.patchRoutesOnNavigation)return{type:"success",matches:U};let pe=U;for(;;){let _e=m==null,Ae=m||f,Re=c;try{await t.patchRoutesOnNavigation({signal:te,path:G,matches:pe,fetcherKey:fe,patch:(Oe,Te)=>{te.aborted||hy(Oe,Te,Ae,Re,s,!1)}})}catch(Oe){return{type:"error",error:Oe,partialMatches:pe}}finally{_e&&!te.aborted&&(f=[...f])}if(te.aborted)return{type:"aborted"};let De=mr(Ae,G,g);if(De)return{type:"success",matches:De};let Le=gc(Ae,G,g,!0);if(!Le||pe.length===Le.length&&pe.every((Oe,Te)=>Oe.route.id===Le[Te].route.id))return{type:"success",matches:null};pe=Le}}function po(U){c={},m=Ei(U,s,void 0,c)}function go(U,G,te=!1){let fe=m==null;hy(U,G,m||f,c,s,te),fe&&(f=[...f],Se({}))}return D={get basename(){return g},get future(){return v},get state(){return R},get routes(){return f},get window(){return a},initialize:we,subscribe:le,enableScrollRestoration:$i,navigate:rt,fetch:Me,revalidate:Ee,createHref:U=>t.history.createHref(U),encodeLocation:U=>t.history.encodeLocation(U),getFetcher:Un,deleteFetcher:su,dispose:Ue,getBlocker:pa,deleteBlocker:Nr,patchRoutes:go,_internalFetchControllers:T,_internalSetRoutes:po,_internalSetStateDoNotUseOrYouWillBreakYourApp(U){Se(U)}},D}function h2(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function Jf(t,a,l,o,s,c){let f,m;if(s){f=[];for(let h of a)if(f.push(h),h.route.id===s){m=h;break}}else f=a,m=a[a.length-1];let g=$c(o||".",Bc(f),Ln(t.pathname,l)||t.pathname,c==="path");if(o==null&&(g.search=t.search,g.hash=t.hash),(o==null||o===""||o===".")&&m){let h=wh(g.search);if(m.route.index&&!h)g.search=g.search?g.search.replace(/^\?/,"?index&"):"?index";else if(!m.route.index&&h){let v=new URLSearchParams(g.search),x=v.getAll("index");v.delete("index"),x.filter(b=>b).forEach(b=>v.append("index",b));let S=v.toString();g.search=S?`?${S}`:""}}return l!=="/"&&(g.pathname=JN({basename:l,pathname:g.pathname})),gr(g)}function dy(t,a,l){if(!l||!h2(l))return{path:a};if(l.formMethod&&!C2(l.formMethod))return{path:a,error:Mn(405,{method:l.formMethod})};let o=()=>({path:a,error:Mn(400,{type:"invalid-body"})}),c=(l.formMethod||"get").toUpperCase(),f=Ix(a);if(l.body!==void 0){if(l.formEncType==="text/plain"){if(!rn(c))return o();let x=typeof l.body=="string"?l.body:l.body instanceof FormData||l.body instanceof URLSearchParams?Array.from(l.body.entries()).reduce((S,[b,j])=>`${S}${b}=${j}
65
+ `,""):String(l.body);return{path:a,submission:{formMethod:c,formAction:f,formEncType:l.formEncType,formData:void 0,json:void 0,text:x}}}else if(l.formEncType==="application/json"){if(!rn(c))return o();try{let x=typeof l.body=="string"?JSON.parse(l.body):l.body;return{path:a,submission:{formMethod:c,formAction:f,formEncType:l.formEncType,formData:void 0,json:x,text:void 0}}}catch{return o()}}}Je(typeof FormData=="function","FormData is not available in this environment");let m,g;if(l.formData)m=th(l.formData),g=l.formData;else if(l.body instanceof FormData)m=th(l.body),g=l.body;else if(l.body instanceof URLSearchParams)m=l.body,g=yy(m);else if(l.body==null)m=new URLSearchParams,g=new FormData;else try{m=new URLSearchParams(l.body),g=yy(m)}catch{return o()}let h={formMethod:c,formAction:f,formEncType:l&&l.formEncType||"application/x-www-form-urlencoded",formData:g,json:void 0,text:void 0};if(rn(h.formMethod))return{path:a,submission:h};let v=Pa(a);return t&&v.search&&wh(v.search)&&m.append("index",""),v.search=`?${m}`,{path:gr(v),submission:h}}function fy(t,a,l,o,s,c,f,m,g,h,v,x,S,b,j,C,_,E,A,M){let z=M?pn(M[1])?M[1].error:M[1].data:void 0,D=s.createURL(c.location),R=s.createURL(g),P;if(v&&c.errors){let ee=Object.keys(c.errors)[0];P=f.findIndex(V=>V.route.id===ee)}else if(M&&pn(M[1])){let ee=M[0];P=f.findIndex(V=>V.route.id===ee)-1}let B=M?M[1].statusCode:void 0,ne=B&&B>=400,re={currentUrl:D,currentParams:c.matches[0]?.params||{},nextUrl:R,nextParams:f[0].params,...m,actionResult:z,actionStatus:B},O=f.map((ee,V)=>{let{route:ae}=ee,T=null;if(P!=null&&V>P?T=!1:ae.lazy?T=!0:ae.loader==null?T=!1:v?T=Wf(ae,c.loaderData,c.errors):m2(c.loaderData,c.matches[V],ee)&&(T=!0),T!==null)return eh(l,o,t,ee,h,a,T);let Z=ne?!1:x||D.pathname+D.search===R.pathname+R.search||D.search!==R.search||p2(c.matches[V],ee),I={...re,defaultShouldRevalidate:Z},be=Rc(ee,I);return eh(l,o,t,ee,h,a,be,I)}),q=[];return j.forEach((ee,V)=>{if(v||!f.some($=>$.route.id===ee.routeId)||b.has(V))return;let ae=c.fetchers.get(V),T=ae&&ae.state!=="idle"&&ae.data===void 0,Z=mr(_,ee.path,E);if(!Z){if(A&&T)return;q.push({key:V,routeId:ee.routeId,path:ee.path,matches:null,match:null,request:null,controller:null});return}if(C.has(V))return;let I=vc(Z,ee.path),be=new AbortController,k=Il(s,ee.path,be.signal),K=null;if(S.has(V))S.delete(V),K=Xl(l,o,k,Z,I,h,a);else if(T)x&&(K=Xl(l,o,k,Z,I,h,a));else{let $={...re,defaultShouldRevalidate:ne?!1:x};Rc(I,$)&&(K=Xl(l,o,k,Z,I,h,a,$))}K&&q.push({key:V,routeId:ee.routeId,path:ee.path,matches:K,match:I,request:k,controller:be})}),{dsMatches:O,revalidatingFetchers:q}}function Wf(t,a,l){if(t.lazy)return!0;if(!t.loader)return!1;let o=a!=null&&t.id in a,s=l!=null&&l[t.id]!==void 0;return!o&&s?!1:typeof t.loader=="function"&&t.loader.hydrate===!0?!0:!o&&!s}function m2(t,a,l){let o=!a||l.route.id!==a.route.id,s=!t.hasOwnProperty(l.route.id);return o||s}function p2(t,a){let l=t.route.path;return t.pathname!==a.pathname||l!=null&&l.endsWith("*")&&t.params["*"]!==a.params["*"]}function Rc(t,a){if(t.route.shouldRevalidate){let l=t.route.shouldRevalidate(a);if(typeof l=="boolean")return l}return a.defaultShouldRevalidate}function hy(t,a,l,o,s,c){let f;if(t){let h=o[t];Je(h,`No route found to patch children into: routeId = ${t}`),h.children||(h.children=[]),f=h.children}else f=l;let m=[],g=[];if(a.forEach(h=>{let v=f.find(x=>Bx(h,x));v?g.push({existingRoute:v,newRoute:h}):m.push(h)}),m.length>0){let h=Ei(m,s,[t||"_","patch",String(f?.length||"0")],o);f.push(...h)}if(c&&g.length>0)for(let h=0;h<g.length;h++){let{existingRoute:v,newRoute:x}=g[h],S=v,[b]=Ei([x],s,[],{},!0);Object.assign(S,{element:b.element?b.element:S.element,errorElement:b.errorElement?b.errorElement:S.errorElement,hydrateFallbackElement:b.hydrateFallbackElement?b.hydrateFallbackElement:S.hydrateFallbackElement})}}function Bx(t,a){return"id"in t&&"id"in a&&t.id===a.id?!0:t.index===a.index&&t.path===a.path&&t.caseSensitive===a.caseSensitive?(!t.children||t.children.length===0)&&(!a.children||a.children.length===0)?!0:t.children.every((l,o)=>a.children?.some(s=>Bx(l,s))):!1}var my=new WeakMap,$x=({key:t,route:a,manifest:l,mapRouteProperties:o})=>{let s=l[a.id];if(Je(s,"No route found in manifest"),!s.lazy||typeof s.lazy!="object")return;let c=s.lazy[t];if(!c)return;let f=my.get(s);f||(f={},my.set(s,f));let m=f[t];if(m)return m;let g=(async()=>{let h=LN(t),x=s[t]!==void 0&&t!=="hasErrorBoundary";if(h)Rt(!h,"Route property "+t+" is not a supported lazy route property. This property will be ignored."),f[t]=Promise.resolve();else if(x)Rt(!1,`Route "${s.id}" has a static property "${t}" defined. The lazy property will be ignored.`);else{let S=await c();S!=null&&(Object.assign(s,{[t]:S}),Object.assign(s,o(s)))}typeof s.lazy=="object"&&(s.lazy[t]=void 0,Object.values(s.lazy).every(S=>S===void 0)&&(s.lazy=void 0))})();return f[t]=g,g},py=new WeakMap;function g2(t,a,l,o,s){let c=l[t.id];if(Je(c,"No route found in manifest"),!t.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof t.lazy=="function"){let v=py.get(c);if(v)return{lazyRoutePromise:v,lazyHandlerPromise:v};let x=(async()=>{Je(typeof t.lazy=="function","No lazy route function found");let S=await t.lazy(),b={};for(let j in S){let C=S[j];if(C===void 0)continue;let _=UN(j),A=c[j]!==void 0&&j!=="hasErrorBoundary";_?Rt(!_,"Route property "+j+" is not a supported property to be returned from a lazy route function. This property will be ignored."):A?Rt(!A,`Route "${c.id}" has a static property "${j}" defined but its lazy function is also returning a value for this property. The lazy route property "${j}" will be ignored.`):b[j]=C}Object.assign(c,b),Object.assign(c,{...o(c),lazy:void 0})})();return py.set(c,x),x.catch(()=>{}),{lazyRoutePromise:x,lazyHandlerPromise:x}}let f=Object.keys(t.lazy),m=[],g;for(let v of f){if(s&&s.includes(v))continue;let x=$x({key:v,route:t,manifest:l,mapRouteProperties:o});x&&(m.push(x),v===a&&(g=x))}let h=m.length>0?Promise.all(m).then(()=>{}):void 0;return h?.catch(()=>{}),g?.catch(()=>{}),{lazyRoutePromise:h,lazyHandlerPromise:g}}async function gy(t){let a=t.matches.filter(s=>s.shouldLoad),l={};return(await Promise.all(a.map(s=>s.resolve()))).forEach((s,c)=>{l[a[c].route.id]=s}),l}async function v2(t){return t.matches.some(a=>a.route.unstable_middleware)?Fx(t,!1,()=>gy(t),(a,l)=>({[l]:{type:"error",result:a}})):gy(t)}async function Fx(t,a,l,o){let{matches:s,request:c,params:f,context:m}=t,g={handlerResult:void 0};try{let h=s.flatMap(x=>x.route.unstable_middleware?x.route.unstable_middleware.map(S=>[x.route.id,S]):[]),v=await qx({request:c,params:f,context:m},h,a,g,l);return a?v:g.handlerResult}catch(h){if(!g.middlewareError)throw h;let v=await o(g.middlewareError.error,g.middlewareError.routeId);return g.handlerResult?Object.assign(g.handlerResult,v):v}}async function qx(t,a,l,o,s,c=0){let{request:f}=t;if(f.signal.aborted)throw f.signal.reason?f.signal.reason:new Error(`Request aborted without an \`AbortSignal.reason\`: ${f.method} ${f.url}`);let m=a[c];if(!m)return o.handlerResult=await s(),o.handlerResult;let[g,h]=m,v=!1,x,S=async()=>{if(v)throw new Error("You may only call `next()` once per middleware");v=!0,await qx(t,a,l,o,s,c+1)};try{let b=await h({request:t.request,params:t.params,context:t.context},S);return v?b===void 0?x:b:S()}catch(b){throw o.middlewareError?o.middlewareError.error!==b&&(o.middlewareError={routeId:g,error:b}):o.middlewareError={routeId:g,error:b},b}}function Vx(t,a,l,o,s){let c=$x({key:"unstable_middleware",route:o.route,manifest:a,mapRouteProperties:t}),f=g2(o.route,rn(l.method)?"action":"loader",a,t,s);return{middleware:c,route:f.lazyRoutePromise,handler:f.lazyHandlerPromise}}function eh(t,a,l,o,s,c,f,m=null){let g=!1,h=Vx(t,a,l,o,s);return{...o,_lazyPromises:h,shouldLoad:f,unstable_shouldRevalidateArgs:m,unstable_shouldCallHandler(v){return g=!0,m?typeof v=="boolean"?Rc(o,{...m,defaultShouldRevalidate:v}):Rc(o,m):f},resolve(v){return g||f||v&&!rn(l.method)&&(o.route.lazy||o.route.loader)?x2({request:l,match:o,lazyHandlerPromise:h?.handler,lazyRoutePromise:h?.route,handlerOverride:v,scopedContext:c}):Promise.resolve({type:"data",result:void 0})}}}function Xl(t,a,l,o,s,c,f,m=null){return o.map(g=>g.route.id!==s.route.id?{...g,shouldLoad:!1,unstable_shouldRevalidateArgs:m,unstable_shouldCallHandler:()=>!1,_lazyPromises:Vx(t,a,l,g,c),resolve:()=>Promise.resolve({type:"data",result:void 0})}:eh(t,a,l,g,c,f,!0,m))}async function y2(t,a,l,o,s,c){l.some(h=>h._lazyPromises?.middleware)&&await Promise.all(l.map(h=>h._lazyPromises?.middleware));let f={request:a,params:l[0].params,context:s,matches:l},g=await t({...f,fetcherKey:o,unstable_runClientMiddleware:h=>{let v=f;return Fx(v,!1,()=>h({...v,fetcherKey:o,unstable_runClientMiddleware:()=>{throw new Error("Cannot call `unstable_runClientMiddleware()` from within an `unstable_runClientMiddleware` handler")}}),(x,S)=>({[S]:{type:"error",result:x}}))}});try{await Promise.all(l.flatMap(h=>[h._lazyPromises?.handler,h._lazyPromises?.route]))}catch{}return g}async function x2({request:t,match:a,lazyHandlerPromise:l,lazyRoutePromise:o,handlerOverride:s,scopedContext:c}){let f,m,g=rn(t.method),h=g?"action":"loader",v=x=>{let S,b=new Promise((_,E)=>S=E);m=()=>S(),t.signal.addEventListener("abort",m);let j=_=>typeof x!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${h}" [routeId: ${a.route.id}]`)):x({request:t,params:a.params,context:c},..._!==void 0?[_]:[]),C=(async()=>{try{return{type:"data",result:await(s?s(E=>j(E)):j())}}catch(_){return{type:"error",result:_}}})();return Promise.race([C,b])};try{let x=g?a.route.action:a.route.loader;if(l||o)if(x){let S,[b]=await Promise.all([v(x).catch(j=>{S=j}),l,o]);if(S!==void 0)throw S;f=b}else{await l;let S=g?a.route.action:a.route.loader;if(S)[f]=await Promise.all([v(S),o]);else if(h==="action"){let b=new URL(t.url),j=b.pathname+b.search;throw Mn(405,{method:t.method,pathname:j,routeId:a.route.id})}else return{type:"data",result:void 0}}else if(x)f=await v(x);else{let S=new URL(t.url),b=S.pathname+S.search;throw Mn(404,{pathname:b})}}catch(x){return{type:"error",result:x}}finally{m&&t.signal.removeEventListener("abort",m)}return f}async function b2(t){let{result:a,type:l}=t;if(Gx(a)){let o;try{let s=a.headers.get("Content-Type");s&&/\bapplication\/json\b/.test(s)?a.body==null?o=null:o=await a.json():o=await a.text()}catch(s){return{type:"error",error:s}}return l==="error"?{type:"error",error:new Zf(a.status,a.statusText,o),statusCode:a.status,headers:a.headers}:{type:"data",data:o,statusCode:a.status,headers:a.headers}}return l==="error"?jy(a)?a.data instanceof Error?{type:"error",error:a.data,statusCode:a.init?.status,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"error",error:new Zf(a.init?.status||500,void 0,a.data),statusCode:_i(a)?a.status:void 0,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"error",error:a,statusCode:_i(a)?a.status:void 0}:jy(a)?{type:"data",data:a.data,statusCode:a.init?.status,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"data",data:a}}function w2(t,a,l,o,s){let c=t.headers.get("Location");if(Je(c,"Redirects returned/thrown from loaders/actions must have a Location header"),!bh(c)){let f=o.slice(0,o.findIndex(m=>m.route.id===l)+1);c=Jf(new URL(a.url),f,s,c),t.headers.set("Location",c)}return t}function vy(t,a,l){if(bh(t)){let o=t,s=o.startsWith("//")?new URL(a.protocol+o):new URL(o),c=Ln(s.pathname,l)!=null;if(s.origin===a.origin&&c)return s.pathname+s.search+s.hash}return t}function Il(t,a,l,o){let s=t.createURL(Ix(a)).toString(),c={signal:l};if(o&&rn(o.formMethod)){let{formMethod:f,formEncType:m}=o;c.method=f.toUpperCase(),m==="application/json"?(c.headers=new Headers({"Content-Type":m}),c.body=JSON.stringify(o.json)):m==="text/plain"?c.body=o.text:m==="application/x-www-form-urlencoded"&&o.formData?c.body=th(o.formData):c.body=o.formData}return new Request(s,c)}function th(t){let a=new URLSearchParams;for(let[l,o]of t.entries())a.append(l,typeof o=="string"?o:o.name);return a}function yy(t){let a=new FormData;for(let[l,o]of t.entries())a.append(l,o);return a}function S2(t,a,l,o=!1,s=!1){let c={},f=null,m,g=!1,h={},v=l&&pn(l[1])?l[1].error:void 0;return t.forEach(x=>{if(!(x.route.id in a))return;let S=x.route.id,b=a[S];if(Je(!Yr(b),"Cannot handle redirect results in processLoaderData"),pn(b)){let j=b.error;if(v!==void 0&&(j=v,v=void 0),f=f||{},s)f[S]=j;else{let C=Gr(t,S);f[C.route.id]==null&&(f[C.route.id]=j)}o||(c[S]=Hx),g||(g=!0,m=_i(b.error)?b.error.status:500),b.headers&&(h[S]=b.headers)}else c[S]=b.data,b.statusCode&&b.statusCode!==200&&!g&&(m=b.statusCode),b.headers&&(h[S]=b.headers)}),v!==void 0&&l&&(f={[l[0]]:v},l[2]&&(c[l[2]]=void 0)),{loaderData:c,errors:f,statusCode:m||200,loaderHeaders:h}}function xy(t,a,l,o,s,c){let{loaderData:f,errors:m}=S2(a,l,o);return s.filter(g=>!g.matches||g.matches.some(h=>h.shouldLoad)).forEach(g=>{let{key:h,match:v,controller:x}=g,S=c[h];if(Je(S,"Did not find corresponding fetcher result"),!(x&&x.signal.aborted))if(pn(S)){let b=Gr(t.matches,v?.route.id);m&&m[b.route.id]||(m={...m,[b.route.id]:S.error}),t.fetchers.delete(h)}else if(Yr(S))Je(!1,"Unhandled fetcher revalidation redirect");else{let b=fr(S.data);t.fetchers.set(h,b)}}),{loaderData:f,errors:m}}function by(t,a,l,o){let s=Object.entries(a).filter(([,c])=>c!==Hx).reduce((c,[f,m])=>(c[f]=m,c),{});for(let c of l){let f=c.route.id;if(!a.hasOwnProperty(f)&&t.hasOwnProperty(f)&&c.route.loader&&(s[f]=t[f]),o&&o.hasOwnProperty(f))break}return s}function wy(t){return t?pn(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function Gr(t,a){return(a?t.slice(0,t.findIndex(o=>o.route.id===a)+1):[...t]).reverse().find(o=>o.route.hasErrorBoundary===!0)||t[0]}function Sy(t){let a=t.length===1?t[0]:t.find(l=>l.index||!l.path||l.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:a}],route:a}}function Mn(t,{pathname:a,routeId:l,method:o,type:s,message:c}={}){let f="Unknown Server Error",m="Unknown @remix-run/router error";return t===400?(f="Bad Request",o&&a&&l?m=`You made a ${o} request to "${a}" but did not provide a \`loader\` for route "${l}", so there is no way to handle the request.`:s==="invalid-body"&&(m="Unable to encode submission body")):t===403?(f="Forbidden",m=`Route "${l}" does not match URL "${a}"`):t===404?(f="Not Found",m=`No route matches URL "${a}"`):t===405&&(f="Method Not Allowed",o&&a&&l?m=`You made a ${o.toUpperCase()} request to "${a}" but did not provide an \`action\` for route "${l}", so there is no way to handle the request.`:o&&(m=`Invalid request method "${o.toUpperCase()}"`)),new Zf(t||500,f,new Error(m),!0)}function ec(t){let a=Object.entries(t);for(let l=a.length-1;l>=0;l--){let[o,s]=a[l];if(Yr(s))return{key:o,result:s}}}function Ix(t){let a=typeof t=="string"?Pa(t):t;return gr({...a,hash:""})}function j2(t,a){return t.pathname!==a.pathname||t.search!==a.search?!1:t.hash===""?a.hash!=="":t.hash===a.hash?!0:a.hash!==""}function N2(t){return Gx(t.result)&&i2.has(t.result.status)}function pn(t){return t.type==="error"}function Yr(t){return(t&&t.type)==="redirect"}function jy(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function Gx(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function C2(t){return o2.has(t.toUpperCase())}function rn(t){return r2.has(t.toUpperCase())}function wh(t){return new URLSearchParams(t).getAll("index").some(a=>a==="")}function vc(t,a){let l=typeof a=="string"?Pa(a).search:a.search;if(t[t.length-1].route.index&&wh(l||""))return t[t.length-1];let o=zx(t);return o[o.length-1]}function Ny(t){let{formMethod:a,formAction:l,formEncType:o,text:s,formData:c,json:f}=t;if(!(!a||!l||!o)){if(s!=null)return{formMethod:a,formAction:l,formEncType:o,formData:void 0,json:void 0,text:s};if(c!=null)return{formMethod:a,formAction:l,formEncType:o,formData:c,json:void 0,text:void 0};if(f!==void 0)return{formMethod:a,formAction:l,formEncType:o,formData:void 0,json:f,text:void 0}}}function jf(t,a){return a?{state:"loading",location:t,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function E2(t,a){return{state:"submitting",location:t,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}}function hi(t,a){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:a}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:a}}function _2(t,a){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:a?a.data:void 0}}function fr(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function R2(t,a){try{let l=t.sessionStorage.getItem(Px);if(l){let o=JSON.parse(l);for(let[s,c]of Object.entries(o||{}))c&&Array.isArray(c)&&a.set(s,new Set(c||[]))}}catch{}}function O2(t,a){if(a.size>0){let l={};for(let[o,s]of a)l[o]=[...s];try{t.sessionStorage.setItem(Px,JSON.stringify(l))}catch(o){Rt(!1,`Failed to save applied view transitions in sessionStorage (${o}).`)}}}function A2(){let t,a,l=new Promise((o,s)=>{t=async c=>{o(c);try{await l}catch{}},a=async c=>{s(c);try{await l}catch{}}});return{promise:l,resolve:t,reject:a}}var el=y.createContext(null);el.displayName="DataRouter";var Mi=y.createContext(null);Mi.displayName="DataRouterState";y.createContext(!1);var Sh=y.createContext({isTransitioning:!1});Sh.displayName="ViewTransition";var Yx=y.createContext(new Map);Yx.displayName="Fetchers";var T2=y.createContext(null);T2.displayName="Await";var Yn=y.createContext(null);Yn.displayName="Navigation";var Fc=y.createContext(null);Fc.displayName="Location";var ha=y.createContext({outlet:null,matches:[],isDataRoute:!1});ha.displayName="Route";var jh=y.createContext(null);jh.displayName="RouteError";function M2(t,{relative:a}={}){Je(ro(),"useHref() may be used only in the context of a <Router> component.");let{basename:l,navigator:o}=y.useContext(Yn),{hash:s,pathname:c,search:f}=ki(t,{relative:a}),m=c;return l!=="/"&&(m=c==="/"?l:oa([l,c])),o.createHref({pathname:m,search:f,hash:s})}function ro(){return y.useContext(Fc)!=null}function Ha(){return Je(ro(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(Fc).location}var Kx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Xx(t){y.useContext(Yn).static||y.useLayoutEffect(t)}function lo(){let{isDataRoute:t}=y.useContext(ha);return t?I2():k2()}function k2(){Je(ro(),"useNavigate() may be used only in the context of a <Router> component.");let t=y.useContext(el),{basename:a,navigator:l}=y.useContext(Yn),{matches:o}=y.useContext(ha),{pathname:s}=Ha(),c=JSON.stringify(Bc(o)),f=y.useRef(!1);return Xx(()=>{f.current=!0}),y.useCallback((g,h={})=>{if(Rt(f.current,Kx),!f.current)return;if(typeof g=="number"){l.go(g);return}let v=$c(g,JSON.parse(c),s,h.relative==="path");t==null&&a!=="/"&&(v.pathname=v.pathname==="/"?a:oa([a,v.pathname])),(h.replace?l.replace:l.push)(v,h.state,h)},[a,l,c,s,t])}y.createContext(null);function ki(t,{relative:a}={}){let{matches:l}=y.useContext(ha),{pathname:o}=Ha(),s=JSON.stringify(Bc(l));return y.useMemo(()=>$c(t,JSON.parse(s),o,a==="path"),[t,s,o,a])}function D2(t,a,l,o){Je(ro(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=y.useContext(Yn),{matches:c}=y.useContext(ha),f=c[c.length-1],m=f?f.params:{},g=f?f.pathname:"/",h=f?f.pathnameBase:"/",v=f&&f.route;{let E=v&&v.path||"";Qx(g,!v||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${E}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
66
+
67
+ Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let x=Ha(),S;S=x;let b=S.pathname||"/",j=b;if(h!=="/"){let E=h.replace(/^\//,"").split("/");j="/"+b.replace(/^\//,"").split("/").slice(E.length).join("/")}let C=mr(t,{pathname:j});return Rt(v||C!=null,`No routes matched location "${S.pathname}${S.search}${S.hash}" `),Rt(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 "${S.pathname}${S.search}${S.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),H2(C&&C.map(E=>Object.assign({},E,{params:Object.assign({},m,E.params),pathname:oa([h,s.encodeLocation?s.encodeLocation(E.pathname).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?h:oa([h,s.encodeLocation?s.encodeLocation(E.pathnameBase).pathname:E.pathnameBase])})),c,l,o)}function L2(){let t=V2(),a=_i(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),l=t instanceof Error?t.stack:null,o="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:o},c={padding:"2px 4px",backgroundColor:o},f=null;return console.error("Error handled by React Router default ErrorBoundary:",t),f=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:c},"ErrorBoundary")," or"," ",y.createElement("code",{style:c},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},a),l?y.createElement("pre",{style:s},l):null,f)}var z2=y.createElement(L2,null),U2=class extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,a){return a.location!==t.location||a.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:a.error,location:a.location,revalidation:t.revalidation||a.revalidation}}componentDidCatch(t,a){console.error("React Router caught the following error during render",t,a)}render(){return this.state.error!==void 0?y.createElement(ha.Provider,{value:this.props.routeContext},y.createElement(jh.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function P2({routeContext:t,match:a,children:l}){let o=y.useContext(el);return o&&o.static&&o.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=a.route.id),y.createElement(ha.Provider,{value:t},l)}function H2(t,a=[],l=null,o=null){if(t==null){if(!l)return null;if(l.errors)t=l.matches;else if(a.length===0&&!l.initialized&&l.matches.length>0)t=l.matches;else return null}let s=t,c=l?.errors;if(c!=null){let g=s.findIndex(h=>h.route.id&&c?.[h.route.id]!==void 0);Je(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),s=s.slice(0,Math.min(s.length,g+1))}let f=!1,m=-1;if(l)for(let g=0;g<s.length;g++){let h=s[g];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(m=g),h.route.id){let{loaderData:v,errors:x}=l,S=h.route.loader&&!v.hasOwnProperty(h.route.id)&&(!x||x[h.route.id]===void 0);if(h.route.lazy||S){f=!0,m>=0?s=s.slice(0,m+1):s=[s[0]];break}}}return s.reduceRight((g,h,v)=>{let x,S=!1,b=null,j=null;l&&(x=c&&h.route.id?c[h.route.id]:void 0,b=h.route.errorElement||z2,f&&(m<0&&v===0?(Qx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,j=null):m===v&&(S=!0,j=h.route.hydrateFallbackElement||null)));let C=a.concat(s.slice(0,v+1)),_=()=>{let E;return x?E=b:S?E=j:h.route.Component?E=y.createElement(h.route.Component,null):h.route.element?E=h.route.element:E=g,y.createElement(P2,{match:h,routeContext:{outlet:g,matches:C,isDataRoute:l!=null},children:E})};return l&&(h.route.ErrorBoundary||h.route.errorElement||v===0)?y.createElement(U2,{location:l.location,revalidation:l.revalidation,component:b,error:x,children:_(),routeContext:{outlet:null,matches:C,isDataRoute:!0}}):_()},null)}function Nh(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function B2(t){let a=y.useContext(el);return Je(a,Nh(t)),a}function $2(t){let a=y.useContext(Mi);return Je(a,Nh(t)),a}function F2(t){let a=y.useContext(ha);return Je(a,Nh(t)),a}function Ch(t){let a=F2(t),l=a.matches[a.matches.length-1];return Je(l.route.id,`${t} can only be used on routes that contain a unique "id"`),l.route.id}function q2(){return Ch("useRouteId")}function V2(){let t=y.useContext(jh),a=$2("useRouteError"),l=Ch("useRouteError");return t!==void 0?t:a.errors?.[l]}function I2(){let{router:t}=B2("useNavigate"),a=Ch("useNavigate"),l=y.useRef(!1);return Xx(()=>{l.current=!0}),y.useCallback(async(s,c={})=>{Rt(l.current,Kx),l.current&&(typeof s=="number"?t.navigate(s):await t.navigate(s,{fromRouteId:a,...c}))},[t,a])}var Cy={};function Qx(t,a,l){!a&&!Cy[t]&&(Cy[t]=!0,Rt(!1,l))}var Ey={};function _y(t,a){!t&&!Ey[a]&&(Ey[a]=!0,console.warn(a))}function G2(t){let a={hasErrorBoundary:t.hasErrorBoundary||t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&(t.element&&Rt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(a,{element:y.createElement(t.Component),Component:void 0})),t.HydrateFallback&&(t.hydrateFallbackElement&&Rt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(a,{hydrateFallbackElement:y.createElement(t.HydrateFallback),HydrateFallback:void 0})),t.ErrorBoundary&&(t.errorElement&&Rt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(a,{errorElement:y.createElement(t.ErrorBoundary),ErrorBoundary:void 0})),a}var Y2=["HydrateFallback","hydrateFallbackElement"];function K2(t,a){return f2({basename:a?.basename,unstable_getContext:a?.unstable_getContext,future:a?.future,history:TN({initialEntries:a?.initialEntries,initialIndex:a?.initialIndex}),hydrationData:a?.hydrationData,routes:t,hydrationRouteProperties:Y2,mapRouteProperties:G2,dataStrategy:a?.dataStrategy,patchRoutesOnNavigation:a?.patchRoutesOnNavigation}).initialize()}var X2=class{constructor(){this.status="pending",this.promise=new Promise((t,a)=>{this.resolve=l=>{this.status==="pending"&&(this.status="resolved",t(l))},this.reject=l=>{this.status==="pending"&&(this.status="rejected",a(l))}})}};function Q2({router:t,flushSync:a}){let[l,o]=y.useState(t.state),[s,c]=y.useState(),[f,m]=y.useState({isTransitioning:!1}),[g,h]=y.useState(),[v,x]=y.useState(),[S,b]=y.useState(),j=y.useRef(new Map),C=y.useCallback((M,{deletedFetchers:z,flushSync:D,viewTransitionOpts:R})=>{M.fetchers.forEach((B,ne)=>{B.data!==void 0&&j.current.set(ne,B.data)}),z.forEach(B=>j.current.delete(B)),_y(D===!1||a!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let P=t.window!=null&&t.window.document!=null&&typeof t.window.document.startViewTransition=="function";if(_y(R==null||P,"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."),!R||!P){a&&D?a(()=>o(M)):y.startTransition(()=>o(M));return}if(a&&D){a(()=>{v&&(g&&g.resolve(),v.skipTransition()),m({isTransitioning:!0,flushSync:!0,currentLocation:R.currentLocation,nextLocation:R.nextLocation})});let B=t.window.document.startViewTransition(()=>{a(()=>o(M))});B.finished.finally(()=>{a(()=>{h(void 0),x(void 0),c(void 0),m({isTransitioning:!1})})}),a(()=>x(B));return}v?(g&&g.resolve(),v.skipTransition(),b({state:M,currentLocation:R.currentLocation,nextLocation:R.nextLocation})):(c(M),m({isTransitioning:!0,flushSync:!1,currentLocation:R.currentLocation,nextLocation:R.nextLocation}))},[t.window,a,v,g]);y.useLayoutEffect(()=>t.subscribe(C),[t,C]),y.useEffect(()=>{f.isTransitioning&&!f.flushSync&&h(new X2)},[f]),y.useEffect(()=>{if(g&&s&&t.window){let M=s,z=g.promise,D=t.window.document.startViewTransition(async()=>{y.startTransition(()=>o(M)),await z});D.finished.finally(()=>{h(void 0),x(void 0),c(void 0),m({isTransitioning:!1})}),x(D)}},[s,g,t.window]),y.useEffect(()=>{g&&s&&l.location.key===s.location.key&&g.resolve()},[g,v,l.location,s]),y.useEffect(()=>{!f.isTransitioning&&S&&(c(S.state),m({isTransitioning:!0,flushSync:!1,currentLocation:S.currentLocation,nextLocation:S.nextLocation}),b(void 0))},[f.isTransitioning,S]);let _=y.useMemo(()=>({createHref:t.createHref,encodeLocation:t.encodeLocation,go:M=>t.navigate(M),push:(M,z,D)=>t.navigate(M,{state:z,preventScrollReset:D?.preventScrollReset}),replace:(M,z,D)=>t.navigate(M,{replace:!0,state:z,preventScrollReset:D?.preventScrollReset})}),[t]),E=t.basename||"/",A=y.useMemo(()=>({router:t,navigator:_,static:!1,basename:E}),[t,_,E]);return y.createElement(y.Fragment,null,y.createElement(el.Provider,{value:A},y.createElement(Mi.Provider,{value:l},y.createElement(Yx.Provider,{value:j.current},y.createElement(Sh.Provider,{value:f},y.createElement(eC,{basename:E,location:l.location,navigationType:l.historyAction,navigator:_},y.createElement(Z2,{routes:t.routes,future:t.future,state:l})))))),null)}var Z2=y.memo(J2);function J2({routes:t,future:a,state:l}){return D2(t,void 0,l,a)}function W2({to:t,replace:a,state:l,relative:o}){Je(ro(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=y.useContext(Yn);Rt(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:c}=y.useContext(ha),{pathname:f}=Ha(),m=lo(),g=$c(t,Bc(c),f,o==="path"),h=JSON.stringify(g);return y.useEffect(()=>{m(JSON.parse(h),{replace:a,state:l,relative:o})},[m,h,o,a,l]),null}function eC({basename:t="/",children:a=null,location:l,navigationType:o="POP",navigator:s,static:c=!1}){Je(!ro(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=t.replace(/^\/*/,"/"),m=y.useMemo(()=>({basename:f,navigator:s,static:c,future:{}}),[f,s,c]);typeof l=="string"&&(l=Pa(l));let{pathname:g="/",search:h="",hash:v="",state:x=null,key:S="default"}=l,b=y.useMemo(()=>{let j=Ln(g,f);return j==null?null:{location:{pathname:j,search:h,hash:v,state:x,key:S},navigationType:o}},[f,g,h,v,x,S,o]);return Rt(b!=null,`<Router basename="${f}"> is not able to match the URL "${g}${h}${v}" because it does not start with the basename, so the <Router> won't render anything.`),b==null?null:y.createElement(Yn.Provider,{value:m},y.createElement(Fc.Provider,{children:a,value:b}))}var yc="get",xc="application/x-www-form-urlencoded";function qc(t){return t!=null&&typeof t.tagName=="string"}function tC(t){return qc(t)&&t.tagName.toLowerCase()==="button"}function nC(t){return qc(t)&&t.tagName.toLowerCase()==="form"}function aC(t){return qc(t)&&t.tagName.toLowerCase()==="input"}function rC(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function lC(t,a){return t.button===0&&(!a||a==="_self")&&!rC(t)}var tc=null;function oC(){if(tc===null)try{new FormData(document.createElement("form"),0),tc=!1}catch{tc=!0}return tc}var iC=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Nf(t){return t!=null&&!iC.has(t)?(Rt(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${xc}"`),null):t}function sC(t,a){let l,o,s,c,f;if(nC(t)){let m=t.getAttribute("action");o=m?Ln(m,a):null,l=t.getAttribute("method")||yc,s=Nf(t.getAttribute("enctype"))||xc,c=new FormData(t)}else if(tC(t)||aC(t)&&(t.type==="submit"||t.type==="image")){let m=t.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=t.getAttribute("formaction")||m.getAttribute("action");if(o=g?Ln(g,a):null,l=t.getAttribute("formmethod")||m.getAttribute("method")||yc,s=Nf(t.getAttribute("formenctype"))||Nf(m.getAttribute("enctype"))||xc,c=new FormData(m,t),!oC()){let{name:h,type:v,value:x}=t;if(v==="image"){let S=h?`${h}.`:"";c.append(`${S}x`,"0"),c.append(`${S}y`,"0")}else h&&c.append(h,x)}}else{if(qc(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');l=yc,o=null,s=xc,f=t}return c&&s==="text/plain"&&(f=c,c=void 0),{action:o,method:l.toLowerCase(),encType:s,formData:c,body:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Eh(t,a){if(t===!1||t===null||typeof t>"u")throw new Error(a)}function cC(t,a,l){let o=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return o.pathname==="/"?o.pathname=`_root.${l}`:a&&Ln(o.pathname,a)==="/"?o.pathname=`${a.replace(/\/$/,"")}/_root.${l}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${l}`,o}async function uC(t,a){if(t.id in a)return a[t.id];try{let l=await import(t.module);return a[t.id]=l,l}catch(l){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(l),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function dC(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function fC(t,a,l){let o=await Promise.all(t.map(async s=>{let c=a.routes[s.route.id];if(c){let f=await uC(c,l);return f.links?f.links():[]}return[]}));return gC(o.flat(1).filter(dC).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function Ry(t,a,l,o,s,c){let f=(g,h)=>l[h]?g.route.id!==l[h].route.id:!0,m=(g,h)=>l[h].pathname!==g.pathname||l[h].route.path?.endsWith("*")&&l[h].params["*"]!==g.params["*"];return c==="assets"?a.filter((g,h)=>f(g,h)||m(g,h)):c==="data"?a.filter((g,h)=>{let v=o.routes[g.route.id];if(!v||!v.hasLoader)return!1;if(f(g,h)||m(g,h))return!0;if(g.route.shouldRevalidate){let x=g.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:l[0]?.params||{},nextUrl:new URL(t,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function hC(t,a,{includeHydrateFallback:l}={}){return mC(t.map(o=>{let s=a.routes[o.route.id];if(!s)return[];let c=[s.module];return s.clientActionModule&&(c=c.concat(s.clientActionModule)),s.clientLoaderModule&&(c=c.concat(s.clientLoaderModule)),l&&s.hydrateFallbackModule&&(c=c.concat(s.hydrateFallbackModule)),s.imports&&(c=c.concat(s.imports)),c}).flat(1))}function mC(t){return[...new Set(t)]}function pC(t){let a={},l=Object.keys(t).sort();for(let o of l)a[o]=t[o];return a}function gC(t,a){let l=new Set;return new Set(a),t.reduce((o,s)=>{let c=JSON.stringify(pC(s));return l.has(c)||(l.add(c),o.push({key:c,link:s})),o},[])}function Zx(){let t=y.useContext(el);return Eh(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function vC(){let t=y.useContext(Mi);return Eh(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var _h=y.createContext(void 0);_h.displayName="FrameworkContext";function Jx(){let t=y.useContext(_h);return Eh(t,"You must render this element inside a <HydratedRouter> element"),t}function yC(t,a){let l=y.useContext(_h),[o,s]=y.useState(!1),[c,f]=y.useState(!1),{onFocus:m,onBlur:g,onMouseEnter:h,onMouseLeave:v,onTouchStart:x}=a,S=y.useRef(null);y.useEffect(()=>{if(t==="render"&&f(!0),t==="viewport"){let C=E=>{E.forEach(A=>{f(A.isIntersecting)})},_=new IntersectionObserver(C,{threshold:.5});return S.current&&_.observe(S.current),()=>{_.disconnect()}}},[t]),y.useEffect(()=>{if(o){let C=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(C)}}},[o]);let b=()=>{s(!0)},j=()=>{s(!1),f(!1)};return l?t!=="intent"?[c,S,{}]:[c,S,{onFocus:mi(m,b),onBlur:mi(g,j),onMouseEnter:mi(h,b),onMouseLeave:mi(v,j),onTouchStart:mi(x,b)}]:[!1,S,{}]}function mi(t,a){return l=>{t&&t(l),l.defaultPrevented||a(l)}}function xC({page:t,...a}){let{router:l}=Zx(),o=y.useMemo(()=>mr(l.routes,t,l.basename),[l.routes,t,l.basename]);return o?y.createElement(wC,{page:t,matches:o,...a}):null}function bC(t){let{manifest:a,routeModules:l}=Jx(),[o,s]=y.useState([]);return y.useEffect(()=>{let c=!1;return fC(t,a,l).then(f=>{c||s(f)}),()=>{c=!0}},[t,a,l]),o}function wC({page:t,matches:a,...l}){let o=Ha(),{manifest:s,routeModules:c}=Jx(),{basename:f}=Zx(),{loaderData:m,matches:g}=vC(),h=y.useMemo(()=>Ry(t,a,g,s,o,"data"),[t,a,g,s,o]),v=y.useMemo(()=>Ry(t,a,g,s,o,"assets"),[t,a,g,s,o]),x=y.useMemo(()=>{if(t===o.pathname+o.search+o.hash)return[];let j=new Set,C=!1;if(a.forEach(E=>{let A=s.routes[E.route.id];!A||!A.hasLoader||(!h.some(M=>M.route.id===E.route.id)&&E.route.id in m&&c[E.route.id]?.shouldRevalidate||A.hasClientLoader?C=!0:j.add(E.route.id))}),j.size===0)return[];let _=cC(t,f,"data");return C&&j.size>0&&_.searchParams.set("_routes",a.filter(E=>j.has(E.route.id)).map(E=>E.route.id).join(",")),[_.pathname+_.search]},[f,m,o,s,h,a,t,c]),S=y.useMemo(()=>hC(v,s),[v,s]),b=bC(v);return y.createElement(y.Fragment,null,x.map(j=>y.createElement("link",{key:j,rel:"prefetch",as:"fetch",href:j,...l})),S.map(j=>y.createElement("link",{key:j,rel:"modulepreload",href:j,...l})),b.map(({key:j,link:C})=>y.createElement("link",{key:j,...C})))}function SC(...t){return a=>{t.forEach(l=>{typeof l=="function"?l(a):l!=null&&(l.current=a)})}}var Wx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Wx&&(window.__reactRouterVersion="7.7.1")}catch{}var eb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,tb=y.forwardRef(function({onClick:a,discover:l="render",prefetch:o="none",relative:s,reloadDocument:c,replace:f,state:m,target:g,to:h,preventScrollReset:v,viewTransition:x,...S},b){let{basename:j}=y.useContext(Yn),C=typeof h=="string"&&eb.test(h),_,E=!1;if(typeof h=="string"&&C&&(_=h,Wx))try{let ne=new URL(window.location.href),re=h.startsWith("//")?new URL(ne.protocol+h):new URL(h),O=Ln(re.pathname,j);re.origin===ne.origin&&O!=null?h=O+re.search+re.hash:E=!0}catch{Rt(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let A=M2(h,{relative:s}),[M,z,D]=yC(o,S),R=EC(h,{replace:f,state:m,target:g,preventScrollReset:v,relative:s,viewTransition:x});function P(ne){a&&a(ne),ne.defaultPrevented||R(ne)}let B=y.createElement("a",{...S,...D,href:_||A,onClick:E||c?a:P,ref:SC(b,z),target:g,"data-discover":!C&&l==="render"?"true":void 0});return M&&!C?y.createElement(y.Fragment,null,B,y.createElement(xC,{page:A})):B});tb.displayName="Link";var jC=y.forwardRef(function({"aria-current":a="page",caseSensitive:l=!1,className:o="",end:s=!1,style:c,to:f,viewTransition:m,children:g,...h},v){let x=ki(f,{relative:h.relative}),S=Ha(),b=y.useContext(Mi),{navigator:j,basename:C}=y.useContext(Yn),_=b!=null&&TC(x)&&m===!0,E=j.encodeLocation?j.encodeLocation(x).pathname:x.pathname,A=S.pathname,M=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;l||(A=A.toLowerCase(),M=M?M.toLowerCase():null,E=E.toLowerCase()),M&&C&&(M=Ln(M,C)||M);const z=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let D=A===E||!s&&A.startsWith(E)&&A.charAt(z)==="/",R=M!=null&&(M===E||!s&&M.startsWith(E)&&M.charAt(E.length)==="/"),P={isActive:D,isPending:R,isTransitioning:_},B=D?a:void 0,ne;typeof o=="function"?ne=o(P):ne=[o,D?"active":null,R?"pending":null,_?"transitioning":null].filter(Boolean).join(" ");let re=typeof c=="function"?c(P):c;return y.createElement(tb,{...h,"aria-current":B,className:ne,ref:v,style:re,to:f,viewTransition:m},typeof g=="function"?g(P):g)});jC.displayName="NavLink";var NC=y.forwardRef(({discover:t="render",fetcherKey:a,navigate:l,reloadDocument:o,replace:s,state:c,method:f=yc,action:m,onSubmit:g,relative:h,preventScrollReset:v,viewTransition:x,...S},b)=>{let j=OC(),C=AC(m,{relative:h}),_=f.toLowerCase()==="get"?"get":"post",E=typeof m=="string"&&eb.test(m),A=M=>{if(g&&g(M),M.defaultPrevented)return;M.preventDefault();let z=M.nativeEvent.submitter,D=z?.getAttribute("formmethod")||f;j(z||M.currentTarget,{fetcherKey:a,method:D,navigate:l,replace:s,state:c,relative:h,preventScrollReset:v,viewTransition:x})};return y.createElement("form",{ref:b,method:_,action:C,onSubmit:o?g:A,...S,"data-discover":!E&&t==="render"?"true":void 0})});NC.displayName="Form";function CC(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function nb(t){let a=y.useContext(el);return Je(a,CC(t)),a}function EC(t,{target:a,replace:l,state:o,preventScrollReset:s,relative:c,viewTransition:f}={}){let m=lo(),g=Ha(),h=ki(t,{relative:c});return y.useCallback(v=>{if(lC(v,a)){v.preventDefault();let x=l!==void 0?l:gr(g)===gr(h);m(t,{replace:x,state:o,preventScrollReset:s,relative:c,viewTransition:f})}},[g,m,h,l,o,a,t,s,c,f])}var _C=0,RC=()=>`__${String(++_C)}__`;function OC(){let{router:t}=nb("useSubmit"),{basename:a}=y.useContext(Yn),l=q2();return y.useCallback(async(o,s={})=>{let{action:c,method:f,encType:m,formData:g,body:h}=sC(o,a);if(s.navigate===!1){let v=s.fetcherKey||RC();await t.fetch(v,l,s.action||c,{preventScrollReset:s.preventScrollReset,formData:g,body:h,formMethod:s.method||f,formEncType:s.encType||m,flushSync:s.flushSync})}else await t.navigate(s.action||c,{preventScrollReset:s.preventScrollReset,formData:g,body:h,formMethod:s.method||f,formEncType:s.encType||m,replace:s.replace,state:s.state,fromRouteId:l,flushSync:s.flushSync,viewTransition:s.viewTransition})},[t,a,l])}function AC(t,{relative:a}={}){let{basename:l}=y.useContext(Yn),o=y.useContext(ha);Je(o,"useFormAction must be used inside a RouteContext");let[s]=o.matches.slice(-1),c={...ki(t||".",{relative:a})},f=Ha();if(t==null){c.search=f.search;let m=new URLSearchParams(c.search),g=m.getAll("index");if(g.some(v=>v==="")){m.delete("index"),g.filter(x=>x).forEach(x=>m.append("index",x));let v=m.toString();c.search=v?`?${v}`:""}}return(!t||t===".")&&s.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),l!=="/"&&(c.pathname=c.pathname==="/"?l:oa([l,c.pathname])),gr(c)}function TC(t,{relative:a}={}){let l=y.useContext(Sh);Je(l!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=nb("useViewTransitionState"),s=ki(t,{relative:a});if(!l.isTransitioning)return!1;let c=Ln(l.currentLocation.pathname,o)||l.currentLocation.pathname,f=Ln(l.nextLocation.pathname,o)||l.nextLocation.pathname;return _c(s.pathname,f)!=null||_c(s.pathname,c)!=null}var Vc=Mx();const MC=Sx(Vc);function kC(t){return y.createElement(Q2,{flushSync:Vc.flushSync,...t})}function ln(t,a,{checkForDefaultPrevented:l=!0}={}){return function(s){if(t?.(s),l===!1||!s.defaultPrevented)return a?.(s)}}function Oy(t,a){if(typeof t=="function")return t(a);t!=null&&(t.current=a)}function Xr(...t){return a=>{let l=!1;const o=t.map(s=>{const c=Oy(s,a);return!l&&typeof c=="function"&&(l=!0),c});if(l)return()=>{for(let s=0;s<o.length;s++){const c=o[s];typeof c=="function"?c():Oy(t[s],null)}}}}function Ut(...t){return y.useCallback(Xr(...t),t)}function DC(t,a){const l=y.createContext(a),o=c=>{const{children:f,...m}=c,g=y.useMemo(()=>m,Object.values(m));return u.jsx(l.Provider,{value:g,children:f})};o.displayName=t+"Provider";function s(c){const f=y.useContext(l);if(f)return f;if(a!==void 0)return a;throw new Error(`\`${c}\` must be used within \`${t}\``)}return[o,s]}function br(t,a=[]){let l=[];function o(c,f){const m=y.createContext(f),g=l.length;l=[...l,f];const h=x=>{const{scope:S,children:b,...j}=x,C=S?.[t]?.[g]||m,_=y.useMemo(()=>j,Object.values(j));return u.jsx(C.Provider,{value:_,children:b})};h.displayName=c+"Provider";function v(x,S){const b=S?.[t]?.[g]||m,j=y.useContext(b);if(j)return j;if(f!==void 0)return f;throw new Error(`\`${x}\` must be used within \`${c}\``)}return[h,v]}const s=()=>{const c=l.map(f=>y.createContext(f));return function(m){const g=m?.[t]||c;return y.useMemo(()=>({[`__scope${t}`]:{...m,[t]:g}}),[m,g])}};return s.scopeName=t,[o,LC(s,...a)]}function LC(...t){const a=t[0];if(t.length===1)return a;const l=()=>{const o=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(c){const f=o.reduce((m,{useScope:g,scopeName:h})=>{const x=g(c)[`__scope${h}`];return{...m,...x}},{});return y.useMemo(()=>({[`__scope${a.scopeName}`]:f}),[f])}};return l.scopeName=a.scopeName,l}var bn=globalThis?.document?y.useLayoutEffect:()=>{},zC=Cx[" useId ".trim().toString()]||(()=>{}),UC=0;function yn(t){const[a,l]=y.useState(zC());return bn(()=>{l(o=>o??String(UC++))},[t]),t||(a?`radix-${a}`:"")}var PC=Cx[" useInsertionEffect ".trim().toString()]||bn;function oo({prop:t,defaultProp:a,onChange:l=()=>{},caller:o}){const[s,c,f]=HC({defaultProp:a,onChange:l}),m=t!==void 0,g=m?t:s;{const v=y.useRef(t!==void 0);y.useEffect(()=>{const x=v.current;x!==m&&console.warn(`${o} is changing from ${x?"controlled":"uncontrolled"} to ${m?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),v.current=m},[m,o])}const h=y.useCallback(v=>{if(m){const x=BC(v)?v(t):v;x!==t&&f.current?.(x)}else c(v)},[m,t,c,f]);return[g,h]}function HC({defaultProp:t,onChange:a}){const[l,o]=y.useState(t),s=y.useRef(l),c=y.useRef(a);return PC(()=>{c.current=a},[a]),y.useEffect(()=>{s.current!==l&&(c.current?.(l),s.current=l)},[l,s]),[l,o,c]}function BC(t){return typeof t=="function"}function to(t){const a=FC(t),l=y.forwardRef((o,s)=>{const{children:c,...f}=o,m=y.Children.toArray(c),g=m.find(VC);if(g){const h=g.props.children,v=m.map(x=>x===g?y.Children.count(h)>1?y.Children.only(null):y.isValidElement(h)?h.props.children:null:x);return u.jsx(a,{...f,ref:s,children:y.isValidElement(h)?y.cloneElement(h,void 0,v):null})}return u.jsx(a,{...f,ref:s,children:c})});return l.displayName=`${t}.Slot`,l}var $C=to("Slot");function FC(t){const a=y.forwardRef((l,o)=>{const{children:s,...c}=l;if(y.isValidElement(s)){const f=GC(s),m=IC(c,s.props);return s.type!==y.Fragment&&(m.ref=o?Xr(o,f):f),y.cloneElement(s,m)}return y.Children.count(s)>1?y.Children.only(null):null});return a.displayName=`${t}.SlotClone`,a}var qC=Symbol("radix.slottable");function VC(t){return y.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===qC}function IC(t,a){const l={...a};for(const o in a){const s=t[o],c=a[o];/^on[A-Z]/.test(o)?s&&c?l[o]=(...m)=>{const g=c(...m);return s(...m),g}:s&&(l[o]=s):o==="style"?l[o]={...s,...c}:o==="className"&&(l[o]=[s,c].filter(Boolean).join(" "))}return{...t,...l}}function GC(t){let a=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,l=a&&"isReactWarning"in a&&a.isReactWarning;return l?t.ref:(a=Object.getOwnPropertyDescriptor(t,"ref")?.get,l=a&&"isReactWarning"in a&&a.isReactWarning,l?t.props.ref:t.props.ref||t.ref)}var YC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],nt=YC.reduce((t,a)=>{const l=to(`Primitive.${a}`),o=y.forwardRef((s,c)=>{const{asChild:f,...m}=s,g=f?l:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(g,{...m,ref:c})});return o.displayName=`Primitive.${a}`,{...t,[a]:o}},{});function KC(t,a){t&&Vc.flushSync(()=>t.dispatchEvent(a))}function Qr(t){const a=y.useRef(t);return y.useEffect(()=>{a.current=t}),y.useMemo(()=>(...l)=>a.current?.(...l),[])}function XC(t,a=globalThis?.document){const l=Qr(t);y.useEffect(()=>{const o=s=>{s.key==="Escape"&&l(s)};return a.addEventListener("keydown",o,{capture:!0}),()=>a.removeEventListener("keydown",o,{capture:!0})},[l,a])}var QC="DismissableLayer",nh="dismissableLayer.update",ZC="dismissableLayer.pointerDownOutside",JC="dismissableLayer.focusOutside",Ay,ab=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Rh=y.forwardRef((t,a)=>{const{disableOutsidePointerEvents:l=!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:f,onDismiss:m,...g}=t,h=y.useContext(ab),[v,x]=y.useState(null),S=v?.ownerDocument??globalThis?.document,[,b]=y.useState({}),j=Ut(a,P=>x(P)),C=Array.from(h.layers),[_]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),E=C.indexOf(_),A=v?C.indexOf(v):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,z=A>=E,D=tE(P=>{const B=P.target,ne=[...h.branches].some(re=>re.contains(B));!z||ne||(s?.(P),f?.(P),P.defaultPrevented||m?.())},S),R=nE(P=>{const B=P.target;[...h.branches].some(re=>re.contains(B))||(c?.(P),f?.(P),P.defaultPrevented||m?.())},S);return XC(P=>{A===h.layers.size-1&&(o?.(P),!P.defaultPrevented&&m&&(P.preventDefault(),m()))},S),y.useEffect(()=>{if(v)return l&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(Ay=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(v)),h.layers.add(v),Ty(),()=>{l&&h.layersWithOutsidePointerEventsDisabled.size===1&&(S.body.style.pointerEvents=Ay)}},[v,S,l,h]),y.useEffect(()=>()=>{v&&(h.layers.delete(v),h.layersWithOutsidePointerEventsDisabled.delete(v),Ty())},[v,h]),y.useEffect(()=>{const P=()=>b({});return document.addEventListener(nh,P),()=>document.removeEventListener(nh,P)},[]),u.jsx(nt.div,{...g,ref:j,style:{pointerEvents:M?z?"auto":"none":void 0,...t.style},onFocusCapture:ln(t.onFocusCapture,R.onFocusCapture),onBlurCapture:ln(t.onBlurCapture,R.onBlurCapture),onPointerDownCapture:ln(t.onPointerDownCapture,D.onPointerDownCapture)})});Rh.displayName=QC;var WC="DismissableLayerBranch",eE=y.forwardRef((t,a)=>{const l=y.useContext(ab),o=y.useRef(null),s=Ut(a,o);return y.useEffect(()=>{const c=o.current;if(c)return l.branches.add(c),()=>{l.branches.delete(c)}},[l.branches]),u.jsx(nt.div,{...t,ref:s})});eE.displayName=WC;function tE(t,a=globalThis?.document){const l=Qr(t),o=y.useRef(!1),s=y.useRef(()=>{});return y.useEffect(()=>{const c=m=>{if(m.target&&!o.current){let g=function(){rb(ZC,l,h,{discrete:!0})};const h={originalEvent:m};m.pointerType==="touch"?(a.removeEventListener("click",s.current),s.current=g,a.addEventListener("click",s.current,{once:!0})):g()}else a.removeEventListener("click",s.current);o.current=!1},f=window.setTimeout(()=>{a.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(f),a.removeEventListener("pointerdown",c),a.removeEventListener("click",s.current)}},[a,l]),{onPointerDownCapture:()=>o.current=!0}}function nE(t,a=globalThis?.document){const l=Qr(t),o=y.useRef(!1);return y.useEffect(()=>{const s=c=>{c.target&&!o.current&&rb(JC,l,{originalEvent:c},{discrete:!1})};return a.addEventListener("focusin",s),()=>a.removeEventListener("focusin",s)},[a,l]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Ty(){const t=new CustomEvent(nh);document.dispatchEvent(t)}function rb(t,a,l,{discrete:o}){const s=l.originalEvent.target,c=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:l});a&&s.addEventListener(t,a,{once:!0}),o?KC(s,c):s.dispatchEvent(c)}var Cf="focusScope.autoFocusOnMount",Ef="focusScope.autoFocusOnUnmount",My={bubbles:!1,cancelable:!0},aE="FocusScope",Oh=y.forwardRef((t,a)=>{const{loop:l=!1,trapped:o=!1,onMountAutoFocus:s,onUnmountAutoFocus:c,...f}=t,[m,g]=y.useState(null),h=Qr(s),v=Qr(c),x=y.useRef(null),S=Ut(a,C=>g(C)),b=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(o){let C=function(M){if(b.paused||!m)return;const z=M.target;m.contains(z)?x.current=z:hr(x.current,{select:!0})},_=function(M){if(b.paused||!m)return;const z=M.relatedTarget;z!==null&&(m.contains(z)||hr(x.current,{select:!0}))},E=function(M){if(document.activeElement===document.body)for(const D of M)D.removedNodes.length>0&&hr(m)};document.addEventListener("focusin",C),document.addEventListener("focusout",_);const A=new MutationObserver(E);return m&&A.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",_),A.disconnect()}}},[o,m,b.paused]),y.useEffect(()=>{if(m){Dy.add(b);const C=document.activeElement;if(!m.contains(C)){const E=new CustomEvent(Cf,My);m.addEventListener(Cf,h),m.dispatchEvent(E),E.defaultPrevented||(rE(cE(lb(m)),{select:!0}),document.activeElement===C&&hr(m))}return()=>{m.removeEventListener(Cf,h),setTimeout(()=>{const E=new CustomEvent(Ef,My);m.addEventListener(Ef,v),m.dispatchEvent(E),E.defaultPrevented||hr(C??document.body,{select:!0}),m.removeEventListener(Ef,v),Dy.remove(b)},0)}}},[m,h,v,b]);const j=y.useCallback(C=>{if(!l&&!o||b.paused)return;const _=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,E=document.activeElement;if(_&&E){const A=C.currentTarget,[M,z]=lE(A);M&&z?!C.shiftKey&&E===z?(C.preventDefault(),l&&hr(M,{select:!0})):C.shiftKey&&E===M&&(C.preventDefault(),l&&hr(z,{select:!0})):E===A&&C.preventDefault()}},[l,o,b.paused]);return u.jsx(nt.div,{tabIndex:-1,...f,ref:S,onKeyDown:j})});Oh.displayName=aE;function rE(t,{select:a=!1}={}){const l=document.activeElement;for(const o of t)if(hr(o,{select:a}),document.activeElement!==l)return}function lE(t){const a=lb(t),l=ky(a,t),o=ky(a.reverse(),t);return[l,o]}function lb(t){const a=[],l=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const s=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||s?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;l.nextNode();)a.push(l.currentNode);return a}function ky(t,a){for(const l of t)if(!oE(l,{upTo:a}))return l}function oE(t,{upTo:a}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(a!==void 0&&t===a)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function iE(t){return t instanceof HTMLInputElement&&"select"in t}function hr(t,{select:a=!1}={}){if(t&&t.focus){const l=document.activeElement;t.focus({preventScroll:!0}),t!==l&&iE(t)&&a&&t.select()}}var Dy=sE();function sE(){let t=[];return{add(a){const l=t[0];a!==l&&l?.pause(),t=Ly(t,a),t.unshift(a)},remove(a){t=Ly(t,a),t[0]?.resume()}}}function Ly(t,a){const l=[...t],o=l.indexOf(a);return o!==-1&&l.splice(o,1),l}function cE(t){return t.filter(a=>a.tagName!=="A")}var uE="Portal",Ah=y.forwardRef((t,a)=>{const{container:l,...o}=t,[s,c]=y.useState(!1);bn(()=>c(!0),[]);const f=l||s&&globalThis?.document?.body;return f?MC.createPortal(u.jsx(nt.div,{...o,ref:a}),f):null});Ah.displayName=uE;function dE(t,a){return y.useReducer((l,o)=>a[l][o]??l,t)}var io=t=>{const{present:a,children:l}=t,o=fE(a),s=typeof l=="function"?l({present:o.isPresent}):y.Children.only(l),c=Ut(o.ref,hE(s));return typeof l=="function"||o.isPresent?y.cloneElement(s,{ref:c}):null};io.displayName="Presence";function fE(t){const[a,l]=y.useState(),o=y.useRef(null),s=y.useRef(t),c=y.useRef("none"),f=t?"mounted":"unmounted",[m,g]=dE(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const h=nc(o.current);c.current=m==="mounted"?h:"none"},[m]),bn(()=>{const h=o.current,v=s.current;if(v!==t){const S=c.current,b=nc(h);t?g("MOUNT"):b==="none"||h?.display==="none"?g("UNMOUNT"):g(v&&S!==b?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,g]),bn(()=>{if(a){let h;const v=a.ownerDocument.defaultView??window,x=b=>{const C=nc(o.current).includes(b.animationName);if(b.target===a&&C&&(g("ANIMATION_END"),!s.current)){const _=a.style.animationFillMode;a.style.animationFillMode="forwards",h=v.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=_)})}},S=b=>{b.target===a&&(c.current=nc(o.current))};return a.addEventListener("animationstart",S),a.addEventListener("animationcancel",x),a.addEventListener("animationend",x),()=>{v.clearTimeout(h),a.removeEventListener("animationstart",S),a.removeEventListener("animationcancel",x),a.removeEventListener("animationend",x)}}else g("ANIMATION_END")},[a,g]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:y.useCallback(h=>{o.current=h?getComputedStyle(h):null,l(h)},[])}}function nc(t){return t?.animationName||"none"}function hE(t){let a=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,l=a&&"isReactWarning"in a&&a.isReactWarning;return l?t.ref:(a=Object.getOwnPropertyDescriptor(t,"ref")?.get,l=a&&"isReactWarning"in a&&a.isReactWarning,l?t.props.ref:t.props.ref||t.ref)}var _f=0;function ob(){y.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??zy()),document.body.insertAdjacentElement("beforeend",t[1]??zy()),_f++,()=>{_f===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(a=>a.remove()),_f--}},[])}function zy(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var aa=function(){return aa=Object.assign||function(a){for(var l,o=1,s=arguments.length;o<s;o++){l=arguments[o];for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(a[c]=l[c])}return a},aa.apply(this,arguments)};function ib(t,a){var l={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&a.indexOf(o)<0&&(l[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,o=Object.getOwnPropertySymbols(t);s<o.length;s++)a.indexOf(o[s])<0&&Object.prototype.propertyIsEnumerable.call(t,o[s])&&(l[o[s]]=t[o[s]]);return l}function mE(t,a,l){if(l||arguments.length===2)for(var o=0,s=a.length,c;o<s;o++)(c||!(o in a))&&(c||(c=Array.prototype.slice.call(a,0,o)),c[o]=a[o]);return t.concat(c||Array.prototype.slice.call(a))}var bc="right-scroll-bar-position",wc="width-before-scroll-bar",pE="with-scroll-bars-hidden",gE="--removed-body-scroll-bar-size";function Rf(t,a){return typeof t=="function"?t(a):t&&(t.current=a),t}function vE(t,a){var l=y.useState(function(){return{value:t,callback:a,facade:{get current(){return l.value},set current(o){var s=l.value;s!==o&&(l.value=o,l.callback(o,s))}}}})[0];return l.callback=a,l.facade}var yE=typeof window<"u"?y.useLayoutEffect:y.useEffect,Uy=new WeakMap;function xE(t,a){var l=vE(null,function(o){return t.forEach(function(s){return Rf(s,o)})});return yE(function(){var o=Uy.get(l);if(o){var s=new Set(o),c=new Set(t),f=l.current;s.forEach(function(m){c.has(m)||Rf(m,null)}),c.forEach(function(m){s.has(m)||Rf(m,f)})}Uy.set(l,t)},[t]),l}function bE(t){return t}function wE(t,a){a===void 0&&(a=bE);var l=[],o=!1,s={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return l.length?l[l.length-1]:t},useMedium:function(c){var f=a(c,o);return l.push(f),function(){l=l.filter(function(m){return m!==f})}},assignSyncMedium:function(c){for(o=!0;l.length;){var f=l;l=[],f.forEach(c)}l={push:function(m){return c(m)},filter:function(){return l}}},assignMedium:function(c){o=!0;var f=[];if(l.length){var m=l;l=[],m.forEach(c),f=l}var g=function(){var v=f;f=[],v.forEach(c)},h=function(){return Promise.resolve().then(g)};h(),l={push:function(v){f.push(v),h()},filter:function(v){return f=f.filter(v),l}}}};return s}function SE(t){t===void 0&&(t={});var a=wE(null);return a.options=aa({async:!0,ssr:!1},t),a}var sb=function(t){var a=t.sideCar,l=ib(t,["sideCar"]);if(!a)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=a.read();if(!o)throw new Error("Sidecar medium not found");return y.createElement(o,aa({},l))};sb.isSideCarExport=!0;function jE(t,a){return t.useMedium(a),sb}var cb=SE(),Of=function(){},Ic=y.forwardRef(function(t,a){var l=y.useRef(null),o=y.useState({onScrollCapture:Of,onWheelCapture:Of,onTouchMoveCapture:Of}),s=o[0],c=o[1],f=t.forwardProps,m=t.children,g=t.className,h=t.removeScrollBar,v=t.enabled,x=t.shards,S=t.sideCar,b=t.noRelative,j=t.noIsolation,C=t.inert,_=t.allowPinchZoom,E=t.as,A=E===void 0?"div":E,M=t.gapMode,z=ib(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=S,R=xE([l,a]),P=aa(aa({},z),s);return y.createElement(y.Fragment,null,v&&y.createElement(D,{sideCar:cb,removeScrollBar:h,shards:x,noRelative:b,noIsolation:j,inert:C,setCallbacks:c,allowPinchZoom:!!_,lockRef:l,gapMode:M}),f?y.cloneElement(y.Children.only(m),aa(aa({},P),{ref:R})):y.createElement(A,aa({},P,{className:g,ref:R}),m))});Ic.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ic.classNames={fullWidth:wc,zeroRight:bc};var NE=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function CE(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var a=NE();return a&&t.setAttribute("nonce",a),t}function EE(t,a){t.styleSheet?t.styleSheet.cssText=a:t.appendChild(document.createTextNode(a))}function _E(t){var a=document.head||document.getElementsByTagName("head")[0];a.appendChild(t)}var RE=function(){var t=0,a=null;return{add:function(l){t==0&&(a=CE())&&(EE(a,l),_E(a)),t++},remove:function(){t--,!t&&a&&(a.parentNode&&a.parentNode.removeChild(a),a=null)}}},OE=function(){var t=RE();return function(a,l){y.useEffect(function(){return t.add(a),function(){t.remove()}},[a&&l])}},ub=function(){var t=OE(),a=function(l){var o=l.styles,s=l.dynamic;return t(o,s),null};return a},AE={left:0,top:0,right:0,gap:0},Af=function(t){return parseInt(t||"",10)||0},TE=function(t){var a=window.getComputedStyle(document.body),l=a[t==="padding"?"paddingLeft":"marginLeft"],o=a[t==="padding"?"paddingTop":"marginTop"],s=a[t==="padding"?"paddingRight":"marginRight"];return[Af(l),Af(o),Af(s)]},ME=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return AE;var a=TE(t),l=document.documentElement.clientWidth,o=window.innerWidth;return{left:a[0],top:a[1],right:a[2],gap:Math.max(0,o-l+a[2]-a[0])}},kE=ub(),Ql="data-scroll-locked",DE=function(t,a,l,o){var s=t.left,c=t.top,f=t.right,m=t.gap;return l===void 0&&(l="margin"),`
68
+ .`.concat(pE,` {
69
+ overflow: hidden `).concat(o,`;
70
+ padding-right: `).concat(m,"px ").concat(o,`;
71
+ }
72
+ body[`).concat(Ql,`] {
73
+ overflow: hidden `).concat(o,`;
74
+ overscroll-behavior: contain;
75
+ `).concat([a&&"position: relative ".concat(o,";"),l==="margin"&&`
76
+ padding-left: `.concat(s,`px;
77
+ padding-top: `).concat(c,`px;
78
+ padding-right: `).concat(f,`px;
79
+ margin-left:0;
80
+ margin-top:0;
81
+ margin-right: `).concat(m,"px ").concat(o,`;
82
+ `),l==="padding"&&"padding-right: ".concat(m,"px ").concat(o,";")].filter(Boolean).join(""),`
83
+ }
84
+
85
+ .`).concat(bc,` {
86
+ right: `).concat(m,"px ").concat(o,`;
87
+ }
88
+
89
+ .`).concat(wc,` {
90
+ margin-right: `).concat(m,"px ").concat(o,`;
91
+ }
92
+
93
+ .`).concat(bc," .").concat(bc,` {
94
+ right: 0 `).concat(o,`;
95
+ }
96
+
97
+ .`).concat(wc," .").concat(wc,` {
98
+ margin-right: 0 `).concat(o,`;
99
+ }
100
+
101
+ body[`).concat(Ql,`] {
102
+ `).concat(gE,": ").concat(m,`px;
103
+ }
104
+ `)},Py=function(){var t=parseInt(document.body.getAttribute(Ql)||"0",10);return isFinite(t)?t:0},LE=function(){y.useEffect(function(){return document.body.setAttribute(Ql,(Py()+1).toString()),function(){var t=Py()-1;t<=0?document.body.removeAttribute(Ql):document.body.setAttribute(Ql,t.toString())}},[])},zE=function(t){var a=t.noRelative,l=t.noImportant,o=t.gapMode,s=o===void 0?"margin":o;LE();var c=y.useMemo(function(){return ME(s)},[s]);return y.createElement(kE,{styles:DE(c,!a,s,l?"":"!important")})},ah=!1;if(typeof window<"u")try{var ac=Object.defineProperty({},"passive",{get:function(){return ah=!0,!0}});window.addEventListener("test",ac,ac),window.removeEventListener("test",ac,ac)}catch{ah=!1}var $l=ah?{passive:!1}:!1,UE=function(t){return t.tagName==="TEXTAREA"},db=function(t,a){if(!(t instanceof Element))return!1;var l=window.getComputedStyle(t);return l[a]!=="hidden"&&!(l.overflowY===l.overflowX&&!UE(t)&&l[a]==="visible")},PE=function(t){return db(t,"overflowY")},HE=function(t){return db(t,"overflowX")},Hy=function(t,a){var l=a.ownerDocument,o=a;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var s=fb(t,o);if(s){var c=hb(t,o),f=c[1],m=c[2];if(f>m)return!0}o=o.parentNode}while(o&&o!==l.body);return!1},BE=function(t){var a=t.scrollTop,l=t.scrollHeight,o=t.clientHeight;return[a,l,o]},$E=function(t){var a=t.scrollLeft,l=t.scrollWidth,o=t.clientWidth;return[a,l,o]},fb=function(t,a){return t==="v"?PE(a):HE(a)},hb=function(t,a){return t==="v"?BE(a):$E(a)},FE=function(t,a){return t==="h"&&a==="rtl"?-1:1},qE=function(t,a,l,o,s){var c=FE(t,window.getComputedStyle(a).direction),f=c*o,m=l.target,g=a.contains(m),h=!1,v=f>0,x=0,S=0;do{if(!m)break;var b=hb(t,m),j=b[0],C=b[1],_=b[2],E=C-_-c*j;(j||E)&&fb(t,m)&&(x+=E,S+=j);var A=m.parentNode;m=A&&A.nodeType===Node.DOCUMENT_FRAGMENT_NODE?A.host:A}while(!g&&m!==document.body||g&&(a.contains(m)||a===m));return(v&&Math.abs(x)<1||!v&&Math.abs(S)<1)&&(h=!0),h},rc=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},By=function(t){return[t.deltaX,t.deltaY]},$y=function(t){return t&&"current"in t?t.current:t},VE=function(t,a){return t[0]===a[0]&&t[1]===a[1]},IE=function(t){return`
105
+ .block-interactivity-`.concat(t,` {pointer-events: none;}
106
+ .allow-interactivity-`).concat(t,` {pointer-events: all;}
107
+ `)},GE=0,Fl=[];function YE(t){var a=y.useRef([]),l=y.useRef([0,0]),o=y.useRef(),s=y.useState(GE++)[0],c=y.useState(ub)[0],f=y.useRef(t);y.useEffect(function(){f.current=t},[t]),y.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var C=mE([t.lockRef.current],(t.shards||[]).map($y),!0).filter(Boolean);return C.forEach(function(_){return _.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),C.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var m=y.useCallback(function(C,_){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!f.current.allowPinchZoom;var E=rc(C),A=l.current,M="deltaX"in C?C.deltaX:A[0]-E[0],z="deltaY"in C?C.deltaY:A[1]-E[1],D,R=C.target,P=Math.abs(M)>Math.abs(z)?"h":"v";if("touches"in C&&P==="h"&&R.type==="range")return!1;var B=Hy(P,R);if(!B)return!0;if(B?D=P:(D=P==="v"?"h":"v",B=Hy(P,R)),!B)return!1;if(!o.current&&"changedTouches"in C&&(M||z)&&(o.current=D),!D)return!0;var ne=o.current||D;return qE(ne,_,C,ne==="h"?M:z)},[]),g=y.useCallback(function(C){var _=C;if(!(!Fl.length||Fl[Fl.length-1]!==c)){var E="deltaY"in _?By(_):rc(_),A=a.current.filter(function(D){return D.name===_.type&&(D.target===_.target||_.target===D.shadowParent)&&VE(D.delta,E)})[0];if(A&&A.should){_.cancelable&&_.preventDefault();return}if(!A){var M=(f.current.shards||[]).map($y).filter(Boolean).filter(function(D){return D.contains(_.target)}),z=M.length>0?m(_,M[0]):!f.current.noIsolation;z&&_.cancelable&&_.preventDefault()}}},[]),h=y.useCallback(function(C,_,E,A){var M={name:C,delta:_,target:E,should:A,shadowParent:KE(E)};a.current.push(M),setTimeout(function(){a.current=a.current.filter(function(z){return z!==M})},1)},[]),v=y.useCallback(function(C){l.current=rc(C),o.current=void 0},[]),x=y.useCallback(function(C){h(C.type,By(C),C.target,m(C,t.lockRef.current))},[]),S=y.useCallback(function(C){h(C.type,rc(C),C.target,m(C,t.lockRef.current))},[]);y.useEffect(function(){return Fl.push(c),t.setCallbacks({onScrollCapture:x,onWheelCapture:x,onTouchMoveCapture:S}),document.addEventListener("wheel",g,$l),document.addEventListener("touchmove",g,$l),document.addEventListener("touchstart",v,$l),function(){Fl=Fl.filter(function(C){return C!==c}),document.removeEventListener("wheel",g,$l),document.removeEventListener("touchmove",g,$l),document.removeEventListener("touchstart",v,$l)}},[]);var b=t.removeScrollBar,j=t.inert;return y.createElement(y.Fragment,null,j?y.createElement(c,{styles:IE(s)}):null,b?y.createElement(zE,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function KE(t){for(var a=null;t!==null;)t instanceof ShadowRoot&&(a=t.host,t=t.host),t=t.parentNode;return a}const XE=jE(cb,YE);var Th=y.forwardRef(function(t,a){return y.createElement(Ic,aa({},t,{ref:a,sideCar:XE}))});Th.classNames=Ic.classNames;var QE=function(t){if(typeof document>"u")return null;var a=Array.isArray(t)?t[0]:t;return a.ownerDocument.body},ql=new WeakMap,lc=new WeakMap,oc={},Tf=0,mb=function(t){return t&&(t.host||mb(t.parentNode))},ZE=function(t,a){return a.map(function(l){if(t.contains(l))return l;var o=mb(l);return o&&t.contains(o)?o:(console.error("aria-hidden",l,"in not contained inside",t,". Doing nothing"),null)}).filter(function(l){return!!l})},JE=function(t,a,l,o){var s=ZE(a,Array.isArray(t)?t:[t]);oc[l]||(oc[l]=new WeakMap);var c=oc[l],f=[],m=new Set,g=new Set(s),h=function(x){!x||m.has(x)||(m.add(x),h(x.parentNode))};s.forEach(h);var v=function(x){!x||g.has(x)||Array.prototype.forEach.call(x.children,function(S){if(m.has(S))v(S);else try{var b=S.getAttribute(o),j=b!==null&&b!=="false",C=(ql.get(S)||0)+1,_=(c.get(S)||0)+1;ql.set(S,C),c.set(S,_),f.push(S),C===1&&j&&lc.set(S,!0),_===1&&S.setAttribute(l,"true"),j||S.setAttribute(o,"true")}catch(E){console.error("aria-hidden: cannot operate on ",S,E)}})};return v(a),m.clear(),Tf++,function(){f.forEach(function(x){var S=ql.get(x)-1,b=c.get(x)-1;ql.set(x,S),c.set(x,b),S||(lc.has(x)||x.removeAttribute(o),lc.delete(x)),b||x.removeAttribute(l)}),Tf--,Tf||(ql=new WeakMap,ql=new WeakMap,lc=new WeakMap,oc={})}},pb=function(t,a,l){l===void 0&&(l="data-aria-hidden");var o=Array.from(Array.isArray(t)?t:[t]),s=QE(t);return s?(o.push.apply(o,Array.from(s.querySelectorAll("[aria-live], script"))),JE(o,s,l,"aria-hidden")):function(){return null}},Gc="Dialog",[gb,qk]=br(Gc),[WE,Kn]=gb(Gc),vb=t=>{const{__scopeDialog:a,children:l,open:o,defaultOpen:s,onOpenChange:c,modal:f=!0}=t,m=y.useRef(null),g=y.useRef(null),[h,v]=oo({prop:o,defaultProp:s??!1,onChange:c,caller:Gc});return u.jsx(WE,{scope:a,triggerRef:m,contentRef:g,contentId:yn(),titleId:yn(),descriptionId:yn(),open:h,onOpenChange:v,onOpenToggle:y.useCallback(()=>v(x=>!x),[v]),modal:f,children:l})};vb.displayName=Gc;var yb="DialogTrigger",e_=y.forwardRef((t,a)=>{const{__scopeDialog:l,...o}=t,s=Kn(yb,l),c=Ut(a,s.triggerRef);return u.jsx(nt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Dh(s.open),...o,ref:c,onClick:ln(t.onClick,s.onOpenToggle)})});e_.displayName=yb;var Mh="DialogPortal",[t_,xb]=gb(Mh,{forceMount:void 0}),bb=t=>{const{__scopeDialog:a,forceMount:l,children:o,container:s}=t,c=Kn(Mh,a);return u.jsx(t_,{scope:a,forceMount:l,children:y.Children.map(o,f=>u.jsx(io,{present:l||c.open,children:u.jsx(Ah,{asChild:!0,container:s,children:f})}))})};bb.displayName=Mh;var Oc="DialogOverlay",wb=y.forwardRef((t,a)=>{const l=xb(Oc,t.__scopeDialog),{forceMount:o=l.forceMount,...s}=t,c=Kn(Oc,t.__scopeDialog);return c.modal?u.jsx(io,{present:o||c.open,children:u.jsx(a_,{...s,ref:a})}):null});wb.displayName=Oc;var n_=to("DialogOverlay.RemoveScroll"),a_=y.forwardRef((t,a)=>{const{__scopeDialog:l,...o}=t,s=Kn(Oc,l);return u.jsx(Th,{as:n_,allowPinchZoom:!0,shards:[s.contentRef],children:u.jsx(nt.div,{"data-state":Dh(s.open),...o,ref:a,style:{pointerEvents:"auto",...o.style}})})}),Zr="DialogContent",Sb=y.forwardRef((t,a)=>{const l=xb(Zr,t.__scopeDialog),{forceMount:o=l.forceMount,...s}=t,c=Kn(Zr,t.__scopeDialog);return u.jsx(io,{present:o||c.open,children:c.modal?u.jsx(r_,{...s,ref:a}):u.jsx(l_,{...s,ref:a})})});Sb.displayName=Zr;var r_=y.forwardRef((t,a)=>{const l=Kn(Zr,t.__scopeDialog),o=y.useRef(null),s=Ut(a,l.contentRef,o);return y.useEffect(()=>{const c=o.current;if(c)return pb(c)},[]),u.jsx(jb,{...t,ref:s,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ln(t.onCloseAutoFocus,c=>{c.preventDefault(),l.triggerRef.current?.focus()}),onPointerDownOutside:ln(t.onPointerDownOutside,c=>{const f=c.detail.originalEvent,m=f.button===0&&f.ctrlKey===!0;(f.button===2||m)&&c.preventDefault()}),onFocusOutside:ln(t.onFocusOutside,c=>c.preventDefault())})}),l_=y.forwardRef((t,a)=>{const l=Kn(Zr,t.__scopeDialog),o=y.useRef(!1),s=y.useRef(!1);return u.jsx(jb,{...t,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{t.onCloseAutoFocus?.(c),c.defaultPrevented||(o.current||l.triggerRef.current?.focus(),c.preventDefault()),o.current=!1,s.current=!1},onInteractOutside:c=>{t.onInteractOutside?.(c),c.defaultPrevented||(o.current=!0,c.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const f=c.target;l.triggerRef.current?.contains(f)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&s.current&&c.preventDefault()}})}),jb=y.forwardRef((t,a)=>{const{__scopeDialog:l,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:c,...f}=t,m=Kn(Zr,l),g=y.useRef(null),h=Ut(a,g);return ob(),u.jsxs(u.Fragment,{children:[u.jsx(Oh,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:s,onUnmountAutoFocus:c,children:u.jsx(Rh,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionId,"aria-labelledby":m.titleId,"data-state":Dh(m.open),...f,ref:h,onDismiss:()=>m.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(o_,{titleId:m.titleId}),u.jsx(s_,{contentRef:g,descriptionId:m.descriptionId})]})]})}),kh="DialogTitle",Nb=y.forwardRef((t,a)=>{const{__scopeDialog:l,...o}=t,s=Kn(kh,l);return u.jsx(nt.h2,{id:s.titleId,...o,ref:a})});Nb.displayName=kh;var Cb="DialogDescription",Eb=y.forwardRef((t,a)=>{const{__scopeDialog:l,...o}=t,s=Kn(Cb,l);return u.jsx(nt.p,{id:s.descriptionId,...o,ref:a})});Eb.displayName=Cb;var _b="DialogClose",Rb=y.forwardRef((t,a)=>{const{__scopeDialog:l,...o}=t,s=Kn(_b,l);return u.jsx(nt.button,{type:"button",...o,ref:a,onClick:ln(t.onClick,()=>s.onOpenChange(!1))})});Rb.displayName=_b;function Dh(t){return t?"open":"closed"}var Ob="DialogTitleWarning",[Vk,Ab]=DC(Ob,{contentName:Zr,titleName:kh,docsSlug:"dialog"}),o_=({titleId:t})=>{const a=Ab(Ob),l=`\`${a.contentName}\` requires a \`${a.titleName}\` for the component to be accessible for screen reader users.
108
+
109
+ If you want to hide the \`${a.titleName}\`, you can wrap it with our VisuallyHidden component.
110
+
111
+ For more information, see https://radix-ui.com/primitives/docs/components/${a.docsSlug}`;return y.useEffect(()=>{t&&(document.getElementById(t)||console.error(l))},[l,t]),null},i_="DialogDescriptionWarning",s_=({contentRef:t,descriptionId:a})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ab(i_).contentName}}.`;return y.useEffect(()=>{const s=t.current?.getAttribute("aria-describedby");a&&s&&(document.getElementById(a)||console.warn(o))},[o,t,a]),null},Tb=vb,Mb=bb,Lh=wb,zh=Sb,kb=Nb,Db=Eb,c_=Rb;/**
112
+ * @license lucide-react v0.525.0 - ISC
113
+ *
114
+ * This source code is licensed under the ISC license.
115
+ * See the LICENSE file in the root directory of this source tree.
116
+ */const u_=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),d_=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,l,o)=>o?o.toUpperCase():l.toLowerCase()),Fy=t=>{const a=d_(t);return a.charAt(0).toUpperCase()+a.slice(1)},Lb=(...t)=>t.filter((a,l,o)=>!!a&&a.trim()!==""&&o.indexOf(a)===l).join(" ").trim(),f_=t=>{for(const a in t)if(a.startsWith("aria-")||a==="role"||a==="title")return!0};/**
117
+ * @license lucide-react v0.525.0 - ISC
118
+ *
119
+ * This source code is licensed under the ISC license.
120
+ * See the LICENSE file in the root directory of this source tree.
121
+ */var h_={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
122
+ * @license lucide-react v0.525.0 - ISC
123
+ *
124
+ * This source code is licensed under the ISC license.
125
+ * See the LICENSE file in the root directory of this source tree.
126
+ */const m_=y.forwardRef(({color:t="currentColor",size:a=24,strokeWidth:l=2,absoluteStrokeWidth:o,className:s="",children:c,iconNode:f,...m},g)=>y.createElement("svg",{ref:g,...h_,width:a,height:a,stroke:t,strokeWidth:o?Number(l)*24/Number(a):l,className:Lb("lucide",s),...!c&&!f_(m)&&{"aria-hidden":"true"},...m},[...f.map(([h,v])=>y.createElement(h,v)),...Array.isArray(c)?c:[c]]));/**
127
+ * @license lucide-react v0.525.0 - ISC
128
+ *
129
+ * This source code is licensed under the ISC license.
130
+ * See the LICENSE file in the root directory of this source tree.
131
+ */const at=(t,a)=>{const l=y.forwardRef(({className:o,...s},c)=>y.createElement(m_,{ref:c,iconNode:a,className:Lb(`lucide-${u_(Fy(t))}`,`lucide-${t}`,o),...s}));return l.displayName=Fy(t),l};/**
132
+ * @license lucide-react v0.525.0 - ISC
133
+ *
134
+ * This source code is licensed under the ISC license.
135
+ * See the LICENSE file in the root directory of this source tree.
136
+ */const p_=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],zb=at("arrow-left",p_);/**
137
+ * @license lucide-react v0.525.0 - ISC
138
+ *
139
+ * This source code is licensed under the ISC license.
140
+ * See the LICENSE file in the root directory of this source tree.
141
+ */const g_=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ub=at("check",g_);/**
142
+ * @license lucide-react v0.525.0 - ISC
143
+ *
144
+ * This source code is licensed under the ISC license.
145
+ * See the LICENSE file in the root directory of this source tree.
146
+ */const v_=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Pb=at("chevron-down",v_);/**
147
+ * @license lucide-react v0.525.0 - ISC
148
+ *
149
+ * This source code is licensed under the ISC license.
150
+ * See the LICENSE file in the root directory of this source tree.
151
+ */const y_=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],x_=at("chevron-right",y_);/**
152
+ * @license lucide-react v0.525.0 - ISC
153
+ *
154
+ * This source code is licensed under the ISC license.
155
+ * See the LICENSE file in the root directory of this source tree.
156
+ */const b_=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],w_=at("chevron-up",b_);/**
157
+ * @license lucide-react v0.525.0 - ISC
158
+ *
159
+ * This source code is licensed under the ISC license.
160
+ * See the LICENSE file in the root directory of this source tree.
161
+ */const S_=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Hb=at("chevrons-up-down",S_);/**
162
+ * @license lucide-react v0.525.0 - ISC
163
+ *
164
+ * This source code is licensed under the ISC license.
165
+ * See the LICENSE file in the root directory of this source tree.
166
+ */const j_=[["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"}]],N_=at("circle-alert",j_);/**
167
+ * @license lucide-react v0.525.0 - ISC
168
+ *
169
+ * This source code is licensed under the ISC license.
170
+ * See the LICENSE file in the root directory of this source tree.
171
+ */const C_=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]],E_=at("circle-arrow-up",C_);/**
172
+ * @license lucide-react v0.525.0 - ISC
173
+ *
174
+ * This source code is licensed under the ISC license.
175
+ * See the LICENSE file in the root directory of this source tree.
176
+ */const __=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],R_=at("circle-check-big",__);/**
177
+ * @license lucide-react v0.525.0 - ISC
178
+ *
179
+ * This source code is licensed under the ISC license.
180
+ * See the LICENSE file in the root directory of this source tree.
181
+ */const O_=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Bb=at("circle-x",O_);/**
182
+ * @license lucide-react v0.525.0 - ISC
183
+ *
184
+ * This source code is licensed under the ISC license.
185
+ * See the LICENSE file in the root directory of this source tree.
186
+ */const A_=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],T_=at("clock",A_);/**
187
+ * @license lucide-react v0.525.0 - ISC
188
+ *
189
+ * This source code is licensed under the ISC license.
190
+ * See the LICENSE file in the root directory of this source tree.
191
+ */const M_=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],k_=at("copy",M_);/**
192
+ * @license lucide-react v0.525.0 - ISC
193
+ *
194
+ * This source code is licensed under the ISC license.
195
+ * See the LICENSE file in the root directory of this source tree.
196
+ */const D_=[["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"}]],L_=at("download",D_);/**
197
+ * @license lucide-react v0.525.0 - ISC
198
+ *
199
+ * This source code is licensed under the ISC license.
200
+ * See the LICENSE file in the root directory of this source tree.
201
+ */const z_=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],U_=at("eye-off",z_);/**
202
+ * @license lucide-react v0.525.0 - ISC
203
+ *
204
+ * This source code is licensed under the ISC license.
205
+ * See the LICENSE file in the root directory of this source tree.
206
+ */const P_=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],H_=at("eye",P_);/**
207
+ * @license lucide-react v0.525.0 - ISC
208
+ *
209
+ * This source code is licensed under the ISC license.
210
+ * See the LICENSE file in the root directory of this source tree.
211
+ */const B_=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],$_=at("file-json",B_);/**
212
+ * @license lucide-react v0.525.0 - ISC
213
+ *
214
+ * This source code is licensed under the ISC license.
215
+ * See the LICENSE file in the root directory of this source tree.
216
+ */const F_=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],q_=at("file-text",F_);/**
217
+ * @license lucide-react v0.525.0 - ISC
218
+ *
219
+ * This source code is licensed under the ISC license.
220
+ * See the LICENSE file in the root directory of this source tree.
221
+ */const V_=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],Mf=at("file",V_);/**
222
+ * @license lucide-react v0.525.0 - ISC
223
+ *
224
+ * This source code is licensed under the ISC license.
225
+ * See the LICENSE file in the root directory of this source tree.
226
+ */const I_=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],rh=at("history",I_);/**
227
+ * @license lucide-react v0.525.0 - ISC
228
+ *
229
+ * This source code is licensed under the ISC license.
230
+ * See the LICENSE file in the root directory of this source tree.
231
+ */const G_=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],Y_=at("languages",G_);/**
232
+ * @license lucide-react v0.525.0 - ISC
233
+ *
234
+ * This source code is licensed under the ISC license.
235
+ * See the LICENSE file in the root directory of this source tree.
236
+ */const K_=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],X_=at("layers",K_);/**
237
+ * @license lucide-react v0.525.0 - ISC
238
+ *
239
+ * This source code is licensed under the ISC license.
240
+ * See the LICENSE file in the root directory of this source tree.
241
+ */const Q_=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]],qy=at("maximize",Q_);/**
242
+ * @license lucide-react v0.525.0 - ISC
243
+ *
244
+ * This source code is licensed under the ISC license.
245
+ * See the LICENSE file in the root directory of this source tree.
246
+ */const Z_=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Ac=at("pencil",Z_);/**
247
+ * @license lucide-react v0.525.0 - ISC
248
+ *
249
+ * This source code is licensed under the ISC license.
250
+ * See the LICENSE file in the root directory of this source tree.
251
+ */const J_=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Tc=at("plus",J_);/**
252
+ * @license lucide-react v0.525.0 - ISC
253
+ *
254
+ * This source code is licensed under the ISC license.
255
+ * See the LICENSE file in the root directory of this source tree.
256
+ */const W_=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Uh=at("refresh-cw",W_);/**
257
+ * @license lucide-react v0.525.0 - ISC
258
+ *
259
+ * This source code is licensed under the ISC license.
260
+ * See the LICENSE file in the root directory of this source tree.
261
+ */const eR=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Mc=at("save",eR);/**
262
+ * @license lucide-react v0.525.0 - ISC
263
+ *
264
+ * This source code is licensed under the ISC license.
265
+ * See the LICENSE file in the root directory of this source tree.
266
+ */const tR=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],$b=at("search",tR);/**
267
+ * @license lucide-react v0.525.0 - ISC
268
+ *
269
+ * This source code is licensed under the ISC license.
270
+ * See the LICENSE file in the root directory of this source tree.
271
+ */const nR=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],aR=at("send",nR);/**
272
+ * @license lucide-react v0.525.0 - ISC
273
+ *
274
+ * This source code is licensed under the ISC license.
275
+ * See the LICENSE file in the root directory of this source tree.
276
+ */const rR=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],lR=at("settings",rR);/**
277
+ * @license lucide-react v0.525.0 - ISC
278
+ *
279
+ * This source code is licensed under the ISC license.
280
+ * See the LICENSE file in the root directory of this source tree.
281
+ */const oR=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],iR=at("square-pen",oR);/**
282
+ * @license lucide-react v0.525.0 - ISC
283
+ *
284
+ * This source code is licensed under the ISC license.
285
+ * See the LICENSE file in the root directory of this source tree.
286
+ */const sR=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],cR=at("square",sR);/**
287
+ * @license lucide-react v0.525.0 - ISC
288
+ *
289
+ * This source code is licensed under the ISC license.
290
+ * See the LICENSE file in the root directory of this source tree.
291
+ */const uR=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],$n=at("trash-2",uR);/**
292
+ * @license lucide-react v0.525.0 - ISC
293
+ *
294
+ * This source code is licensed under the ISC license.
295
+ * See the LICENSE file in the root directory of this source tree.
296
+ */const dR=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],fR=at("triangle-alert",dR);/**
297
+ * @license lucide-react v0.525.0 - ISC
298
+ *
299
+ * This source code is licensed under the ISC license.
300
+ * See the LICENSE file in the root directory of this source tree.
301
+ */const hR=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ia=at("x",hR);function Fb(t){var a,l,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(a=0;a<s;a++)t[a]&&(l=Fb(t[a]))&&(o&&(o+=" "),o+=l)}else for(l in t)t[l]&&(o&&(o+=" "),o+=l);return o}function qb(){for(var t,a,l=0,o="",s=arguments.length;l<s;l++)(t=arguments[l])&&(a=Fb(t))&&(o&&(o+=" "),o+=a);return o}const Ph="-",mR=t=>{const a=gR(t),{conflictingClassGroups:l,conflictingClassGroupModifiers:o}=t;return{getClassGroupId:f=>{const m=f.split(Ph);return m[0]===""&&m.length!==1&&m.shift(),Vb(m,a)||pR(f)},getConflictingClassGroupIds:(f,m)=>{const g=l[f]||[];return m&&o[f]?[...g,...o[f]]:g}}},Vb=(t,a)=>{if(t.length===0)return a.classGroupId;const l=t[0],o=a.nextPart.get(l),s=o?Vb(t.slice(1),o):void 0;if(s)return s;if(a.validators.length===0)return;const c=t.join(Ph);return a.validators.find(({validator:f})=>f(c))?.classGroupId},Vy=/^\[(.+)\]$/,pR=t=>{if(Vy.test(t)){const a=Vy.exec(t)[1],l=a?.substring(0,a.indexOf(":"));if(l)return"arbitrary.."+l}},gR=t=>{const{theme:a,classGroups:l}=t,o={nextPart:new Map,validators:[]};for(const s in l)lh(l[s],o,s,a);return o},lh=(t,a,l,o)=>{t.forEach(s=>{if(typeof s=="string"){const c=s===""?a:Iy(a,s);c.classGroupId=l;return}if(typeof s=="function"){if(vR(s)){lh(s(o),a,l,o);return}a.validators.push({validator:s,classGroupId:l});return}Object.entries(s).forEach(([c,f])=>{lh(f,Iy(a,c),l,o)})})},Iy=(t,a)=>{let l=t;return a.split(Ph).forEach(o=>{l.nextPart.has(o)||l.nextPart.set(o,{nextPart:new Map,validators:[]}),l=l.nextPart.get(o)}),l},vR=t=>t.isThemeGetter,yR=t=>{if(t<1)return{get:()=>{},set:()=>{}};let a=0,l=new Map,o=new Map;const s=(c,f)=>{l.set(c,f),a++,a>t&&(a=0,o=l,l=new Map)};return{get(c){let f=l.get(c);if(f!==void 0)return f;if((f=o.get(c))!==void 0)return s(c,f),f},set(c,f){l.has(c)?l.set(c,f):s(c,f)}}},oh="!",ih=":",xR=ih.length,bR=t=>{const{prefix:a,experimentalParseClassName:l}=t;let o=s=>{const c=[];let f=0,m=0,g=0,h;for(let j=0;j<s.length;j++){let C=s[j];if(f===0&&m===0){if(C===ih){c.push(s.slice(g,j)),g=j+xR;continue}if(C==="/"){h=j;continue}}C==="["?f++:C==="]"?f--:C==="("?m++:C===")"&&m--}const v=c.length===0?s:s.substring(g),x=wR(v),S=x!==v,b=h&&h>g?h-g:void 0;return{modifiers:c,hasImportantModifier:S,baseClassName:x,maybePostfixModifierPosition:b}};if(a){const s=a+ih,c=o;o=f=>f.startsWith(s)?c(f.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:f,maybePostfixModifierPosition:void 0}}if(l){const s=o;o=c=>l({className:c,parseClassName:s})}return o},wR=t=>t.endsWith(oh)?t.substring(0,t.length-1):t.startsWith(oh)?t.substring(1):t,SR=t=>{const a=Object.fromEntries(t.orderSensitiveModifiers.map(o=>[o,!0]));return o=>{if(o.length<=1)return o;const s=[];let c=[];return o.forEach(f=>{f[0]==="["||a[f]?(s.push(...c.sort(),f),c=[]):c.push(f)}),s.push(...c.sort()),s}},jR=t=>({cache:yR(t.cacheSize),parseClassName:bR(t),sortModifiers:SR(t),...mR(t)}),NR=/\s+/,CR=(t,a)=>{const{parseClassName:l,getClassGroupId:o,getConflictingClassGroupIds:s,sortModifiers:c}=a,f=[],m=t.trim().split(NR);let g="";for(let h=m.length-1;h>=0;h-=1){const v=m[h],{isExternal:x,modifiers:S,hasImportantModifier:b,baseClassName:j,maybePostfixModifierPosition:C}=l(v);if(x){g=v+(g.length>0?" "+g:g);continue}let _=!!C,E=o(_?j.substring(0,C):j);if(!E){if(!_){g=v+(g.length>0?" "+g:g);continue}if(E=o(j),!E){g=v+(g.length>0?" "+g:g);continue}_=!1}const A=c(S).join(":"),M=b?A+oh:A,z=M+E;if(f.includes(z))continue;f.push(z);const D=s(E,_);for(let R=0;R<D.length;++R){const P=D[R];f.push(M+P)}g=v+(g.length>0?" "+g:g)}return g};function ER(){let t=0,a,l,o="";for(;t<arguments.length;)(a=arguments[t++])&&(l=Ib(a))&&(o&&(o+=" "),o+=l);return o}const Ib=t=>{if(typeof t=="string")return t;let a,l="";for(let o=0;o<t.length;o++)t[o]&&(a=Ib(t[o]))&&(l&&(l+=" "),l+=a);return l};function _R(t,...a){let l,o,s,c=f;function f(g){const h=a.reduce((v,x)=>x(v),t());return l=jR(h),o=l.cache.get,s=l.cache.set,c=m,m(g)}function m(g){const h=o(g);if(h)return h;const v=CR(g,l);return s(g,v),v}return function(){return c(ER.apply(null,arguments))}}const zt=t=>{const a=l=>l[t]||[];return a.isThemeGetter=!0,a},Gb=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Yb=/^\((?:(\w[\w-]*):)?(.+)\)$/i,RR=/^\d+\/\d+$/,OR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,AR=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,TR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,MR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,kR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Vl=t=>RR.test(t),Xe=t=>!!t&&!Number.isNaN(Number(t)),dr=t=>!!t&&Number.isInteger(Number(t)),kf=t=>t.endsWith("%")&&Xe(t.slice(0,-1)),ka=t=>OR.test(t),DR=()=>!0,LR=t=>AR.test(t)&&!TR.test(t),Kb=()=>!1,zR=t=>MR.test(t),UR=t=>kR.test(t),PR=t=>!Ne(t)&&!Ce(t),HR=t=>so(t,Zb,Kb),Ne=t=>Gb.test(t),Ir=t=>so(t,Jb,LR),Df=t=>so(t,VR,Xe),Gy=t=>so(t,Xb,Kb),BR=t=>so(t,Qb,UR),ic=t=>so(t,Wb,zR),Ce=t=>Yb.test(t),pi=t=>co(t,Jb),$R=t=>co(t,IR),Yy=t=>co(t,Xb),FR=t=>co(t,Zb),qR=t=>co(t,Qb),sc=t=>co(t,Wb,!0),so=(t,a,l)=>{const o=Gb.exec(t);return o?o[1]?a(o[1]):l(o[2]):!1},co=(t,a,l=!1)=>{const o=Yb.exec(t);return o?o[1]?a(o[1]):l:!1},Xb=t=>t==="position"||t==="percentage",Qb=t=>t==="image"||t==="url",Zb=t=>t==="length"||t==="size"||t==="bg-size",Jb=t=>t==="length",VR=t=>t==="number",IR=t=>t==="family-name",Wb=t=>t==="shadow",GR=()=>{const t=zt("color"),a=zt("font"),l=zt("text"),o=zt("font-weight"),s=zt("tracking"),c=zt("leading"),f=zt("breakpoint"),m=zt("container"),g=zt("spacing"),h=zt("radius"),v=zt("shadow"),x=zt("inset-shadow"),S=zt("text-shadow"),b=zt("drop-shadow"),j=zt("blur"),C=zt("perspective"),_=zt("aspect"),E=zt("ease"),A=zt("animate"),M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],D=()=>[...z(),Ce,Ne],R=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],B=()=>[Ce,Ne,g],ne=()=>[Vl,"full","auto",...B()],re=()=>[dr,"none","subgrid",Ce,Ne],O=()=>["auto",{span:["full",dr,Ce,Ne]},dr,Ce,Ne],q=()=>[dr,"auto",Ce,Ne],ee=()=>["auto","min","max","fr",Ce,Ne],V=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ae=()=>["start","end","center","stretch","center-safe","end-safe"],T=()=>["auto",...B()],Z=()=>[Vl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...B()],I=()=>[t,Ce,Ne],be=()=>[...z(),Yy,Gy,{position:[Ce,Ne]}],k=()=>["no-repeat",{repeat:["","x","y","space","round"]}],K=()=>["auto","cover","contain",FR,HR,{size:[Ce,Ne]}],$=()=>[kf,pi,Ir],Q=()=>["","none","full",h,Ce,Ne],ie=()=>["",Xe,pi,Ir],me=()=>["solid","dashed","dotted","double"],ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],we=()=>[Xe,kf,Yy,Gy],Ue=()=>["","none",j,Ce,Ne],le=()=>["none",Xe,Ce,Ne],Se=()=>["none",Xe,Ce,Ne],Be=()=>[Xe,Ce,Ne],rt=()=>[Vl,"full",...B()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ka],breakpoint:[ka],color:[DR],container:[ka],"drop-shadow":[ka],ease:["in","out","in-out"],font:[PR],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ka],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ka],shadow:[ka],spacing:["px",Xe],text:[ka],"text-shadow":[ka],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Vl,Ne,Ce,_]}],container:["container"],columns:[{columns:[Xe,Ne,Ce,m]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:D()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ne()}],"inset-x":[{"inset-x":ne()}],"inset-y":[{"inset-y":ne()}],start:[{start:ne()}],end:[{end:ne()}],top:[{top:ne()}],right:[{right:ne()}],bottom:[{bottom:ne()}],left:[{left:ne()}],visibility:["visible","invisible","collapse"],z:[{z:[dr,"auto",Ce,Ne]}],basis:[{basis:[Vl,"full","auto",m,...B()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Xe,Vl,"auto","initial","none",Ne]}],grow:[{grow:["",Xe,Ce,Ne]}],shrink:[{shrink:["",Xe,Ce,Ne]}],order:[{order:[dr,"first","last","none",Ce,Ne]}],"grid-cols":[{"grid-cols":re()}],"col-start-end":[{col:O()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":re()}],"row-start-end":[{row:O()}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ee()}],"auto-rows":[{"auto-rows":ee()}],gap:[{gap:B()}],"gap-x":[{"gap-x":B()}],"gap-y":[{"gap-y":B()}],"justify-content":[{justify:[...V(),"normal"]}],"justify-items":[{"justify-items":[...ae(),"normal"]}],"justify-self":[{"justify-self":["auto",...ae()]}],"align-content":[{content:["normal",...V()]}],"align-items":[{items:[...ae(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ae(),{baseline:["","last"]}]}],"place-content":[{"place-content":V()}],"place-items":[{"place-items":[...ae(),"baseline"]}],"place-self":[{"place-self":["auto",...ae()]}],p:[{p:B()}],px:[{px:B()}],py:[{py:B()}],ps:[{ps:B()}],pe:[{pe:B()}],pt:[{pt:B()}],pr:[{pr:B()}],pb:[{pb:B()}],pl:[{pl:B()}],m:[{m:T()}],mx:[{mx:T()}],my:[{my:T()}],ms:[{ms:T()}],me:[{me:T()}],mt:[{mt:T()}],mr:[{mr:T()}],mb:[{mb:T()}],ml:[{ml:T()}],"space-x":[{"space-x":B()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":B()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],w:[{w:[m,"screen",...Z()]}],"min-w":[{"min-w":[m,"screen","none",...Z()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[f]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",l,pi,Ir]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,Ce,Df]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",kf,Ne]}],"font-family":[{font:[$R,Ne,a]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,Ce,Ne]}],"line-clamp":[{"line-clamp":[Xe,"none",Ce,Df]}],leading:[{leading:[c,...B()]}],"list-image":[{"list-image":["none",Ce,Ne]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ce,Ne]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...me(),"wavy"]}],"text-decoration-thickness":[{decoration:[Xe,"from-font","auto",Ce,Ir]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[Xe,"auto",Ce,Ne]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ce,Ne]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ce,Ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:be()}],"bg-repeat":[{bg:k()}],"bg-size":[{bg:K()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},dr,Ce,Ne],radial:["",Ce,Ne],conic:[dr,Ce,Ne]},qR,BR]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:$()}],"gradient-via-pos":[{via:$()}],"gradient-to-pos":[{to:$()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:Q()}],"rounded-s":[{"rounded-s":Q()}],"rounded-e":[{"rounded-e":Q()}],"rounded-t":[{"rounded-t":Q()}],"rounded-r":[{"rounded-r":Q()}],"rounded-b":[{"rounded-b":Q()}],"rounded-l":[{"rounded-l":Q()}],"rounded-ss":[{"rounded-ss":Q()}],"rounded-se":[{"rounded-se":Q()}],"rounded-ee":[{"rounded-ee":Q()}],"rounded-es":[{"rounded-es":Q()}],"rounded-tl":[{"rounded-tl":Q()}],"rounded-tr":[{"rounded-tr":Q()}],"rounded-br":[{"rounded-br":Q()}],"rounded-bl":[{"rounded-bl":Q()}],"border-w":[{border:ie()}],"border-w-x":[{"border-x":ie()}],"border-w-y":[{"border-y":ie()}],"border-w-s":[{"border-s":ie()}],"border-w-e":[{"border-e":ie()}],"border-w-t":[{"border-t":ie()}],"border-w-r":[{"border-r":ie()}],"border-w-b":[{"border-b":ie()}],"border-w-l":[{"border-l":ie()}],"divide-x":[{"divide-x":ie()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ie()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...me(),"hidden","none"]}],"divide-style":[{divide:[...me(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...me(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Xe,Ce,Ne]}],"outline-w":[{outline:["",Xe,pi,Ir]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",v,sc,ic]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",x,sc,ic]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[Xe,Ir]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":ie()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",S,sc,ic]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[Xe,Ce,Ne]}],"mix-blend":[{"mix-blend":[...ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ge()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Xe]}],"mask-image-linear-from-pos":[{"mask-linear-from":we()}],"mask-image-linear-to-pos":[{"mask-linear-to":we()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":we()}],"mask-image-t-to-pos":[{"mask-t-to":we()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":we()}],"mask-image-r-to-pos":[{"mask-r-to":we()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":we()}],"mask-image-b-to-pos":[{"mask-b-to":we()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":we()}],"mask-image-l-to-pos":[{"mask-l-to":we()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":we()}],"mask-image-x-to-pos":[{"mask-x-to":we()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":we()}],"mask-image-y-to-pos":[{"mask-y-to":we()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[Ce,Ne]}],"mask-image-radial-from-pos":[{"mask-radial-from":we()}],"mask-image-radial-to-pos":[{"mask-radial-to":we()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":z()}],"mask-image-conic-pos":[{"mask-conic":[Xe]}],"mask-image-conic-from-pos":[{"mask-conic-from":we()}],"mask-image-conic-to-pos":[{"mask-conic-to":we()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:be()}],"mask-repeat":[{mask:k()}],"mask-size":[{mask:K()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ce,Ne]}],filter:[{filter:["","none",Ce,Ne]}],blur:[{blur:Ue()}],brightness:[{brightness:[Xe,Ce,Ne]}],contrast:[{contrast:[Xe,Ce,Ne]}],"drop-shadow":[{"drop-shadow":["","none",b,sc,ic]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",Xe,Ce,Ne]}],"hue-rotate":[{"hue-rotate":[Xe,Ce,Ne]}],invert:[{invert:["",Xe,Ce,Ne]}],saturate:[{saturate:[Xe,Ce,Ne]}],sepia:[{sepia:["",Xe,Ce,Ne]}],"backdrop-filter":[{"backdrop-filter":["","none",Ce,Ne]}],"backdrop-blur":[{"backdrop-blur":Ue()}],"backdrop-brightness":[{"backdrop-brightness":[Xe,Ce,Ne]}],"backdrop-contrast":[{"backdrop-contrast":[Xe,Ce,Ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Xe,Ce,Ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Xe,Ce,Ne]}],"backdrop-invert":[{"backdrop-invert":["",Xe,Ce,Ne]}],"backdrop-opacity":[{"backdrop-opacity":[Xe,Ce,Ne]}],"backdrop-saturate":[{"backdrop-saturate":[Xe,Ce,Ne]}],"backdrop-sepia":[{"backdrop-sepia":["",Xe,Ce,Ne]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":B()}],"border-spacing-x":[{"border-spacing-x":B()}],"border-spacing-y":[{"border-spacing-y":B()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ce,Ne]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Xe,"initial",Ce,Ne]}],ease:[{ease:["linear","initial",E,Ce,Ne]}],delay:[{delay:[Xe,Ce,Ne]}],animate:[{animate:["none",A,Ce,Ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,Ce,Ne]}],"perspective-origin":[{"perspective-origin":D()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:Se()}],"scale-x":[{"scale-x":Se()}],"scale-y":[{"scale-y":Se()}],"scale-z":[{"scale-z":Se()}],"scale-3d":["scale-3d"],skew:[{skew:Be()}],"skew-x":[{"skew-x":Be()}],"skew-y":[{"skew-y":Be()}],transform:[{transform:[Ce,Ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:D()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:rt()}],"translate-x":[{"translate-x":rt()}],"translate-y":[{"translate-y":rt()}],"translate-z":[{"translate-z":rt()}],"translate-none":["translate-none"],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ce,Ne]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ce,Ne]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[Xe,pi,Ir,Df]}],stroke:[{stroke:["none",...I()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},YR=_R(GR);function it(...t){return YR(qb(t))}const Da=Tb,KR=Mb,e0=y.forwardRef(({className:t,...a},l)=>u.jsx(Lh,{ref:l,className:it("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...a}));e0.displayName=Lh.displayName;const ca=y.forwardRef(({className:t,children:a,...l},o)=>u.jsxs(KR,{children:[u.jsx(e0,{}),u.jsxs(zh,{ref:o,className:it("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-300 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg animate-scale-in",t),...l,children:[a,u.jsxs(c_,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground transition-all-ease hover:scale-110",children:[u.jsx(ia,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ca.displayName=zh.displayName;const ua=({className:t,...a})=>u.jsx("div",{className:it("flex flex-col space-y-1.5 text-center sm:text-left",t),...a});ua.displayName="DialogHeader";const La=({className:t,...a})=>u.jsx("div",{className:it("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...a});La.displayName="DialogFooter";const da=y.forwardRef(({className:t,...a},l)=>u.jsx(kb,{ref:l,className:it("text-lg font-semibold leading-none tracking-tight",t),...a}));da.displayName=kb.displayName;const Yc=y.forwardRef(({className:t,...a},l)=>u.jsx(Db,{ref:l,className:it("text-sm text-muted-foreground",t),...a}));Yc.displayName=Db.displayName;const Ky=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Xy=qb,Kc=(t,a)=>l=>{var o;if(a?.variants==null)return Xy(t,l?.class,l?.className);const{variants:s,defaultVariants:c}=a,f=Object.keys(s).map(h=>{const v=l?.[h],x=c?.[h];if(v===null)return null;const S=Ky(v)||Ky(x);return s[h][S]}),m=l&&Object.entries(l).reduce((h,v)=>{let[x,S]=v;return S===void 0||(h[x]=S),h},{}),g=a==null||(o=a.compoundVariants)===null||o===void 0?void 0:o.reduce((h,v)=>{let{class:x,className:S,...b}=v;return Object.entries(b).every(j=>{let[C,_]=j;return Array.isArray(_)?_.includes({...c,...m}[C]):{...c,...m}[C]===_})?[...h,x,S]:h},[]);return Xy(t,f,g,l?.class,l?.className)},XR=Kc("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"border border-destructive/50 text-destructive hover:bg-destructive hover:text-destructive-foreground",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),xe=y.forwardRef(({className:t,variant:a,size:l,asChild:o=!1,...s},c)=>{const f=o?$C:"button";return u.jsx(f,{className:it(XR({variant:a,size:l,className:t})),ref:c,...s})});xe.displayName="Button";const He=y.forwardRef(({className:t,type:a,...l},o)=>{const s=a==="number",[c,f]=y.useState(l.value?.toString()||"");y.useEffect(()=>{l.value!==void 0&&f(l.value.toString())},[l.value]);const m=x=>{const S=x.target.value;s?(S===""||/^\d+$/.test(S))&&(f(S),l.onChange&&S!==""&&l.onChange(x)):(f(S),l.onChange&&l.onChange(x))},g=x=>{if(s&&c===""){const S=l.placeholder||"1";if(f(S),l.onChange){const b={...x,target:{...x.target,value:S}};l.onChange(b)}}l.onBlur&&l.onBlur(x)},h=s?"text":a,v=s?c:l.value;return u.jsx("input",{...l,type:h,value:v,onChange:m,onBlur:g,className:it("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:o})});He.displayName="Input";var QR="Label",t0=y.forwardRef((t,a)=>u.jsx(nt.label,{...t,ref:a,onMouseDown:l=>{l.target.closest("button, input, select, textarea")||(t.onMouseDown?.(l),!l.defaultPrevented&&l.detail>1&&l.preventDefault())}}));t0.displayName=QR;var n0=t0;const ZR=Kc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ye=y.forwardRef(({className:t,...a},l)=>u.jsx(n0,{ref:l,className:it(ZR(),t),...a}));ye.displayName=n0.displayName;function JR(t){const a=y.useRef({value:t,previous:t});return y.useMemo(()=>(a.current.value!==t&&(a.current.previous=a.current.value,a.current.value=t),a.current.previous),[t])}function a0(t){const[a,l]=y.useState(void 0);return bn(()=>{if(t){l({width:t.offsetWidth,height:t.offsetHeight});const o=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const c=s[0];let f,m;if("borderBoxSize"in c){const g=c.borderBoxSize,h=Array.isArray(g)?g[0]:g;f=h.inlineSize,m=h.blockSize}else f=t.offsetWidth,m=t.offsetHeight;l({width:f,height:m})});return o.observe(t,{box:"border-box"}),()=>o.unobserve(t)}else l(void 0)},[t]),a}var Xc="Switch",[WR,Ik]=br(Xc),[eO,tO]=WR(Xc),r0=y.forwardRef((t,a)=>{const{__scopeSwitch:l,name:o,checked:s,defaultChecked:c,required:f,disabled:m,value:g="on",onCheckedChange:h,form:v,...x}=t,[S,b]=y.useState(null),j=Ut(a,M=>b(M)),C=y.useRef(!1),_=S?v||!!S.closest("form"):!0,[E,A]=oo({prop:s,defaultProp:c??!1,onChange:h,caller:Xc});return u.jsxs(eO,{scope:l,checked:E,disabled:m,children:[u.jsx(nt.button,{type:"button",role:"switch","aria-checked":E,"aria-required":f,"data-state":s0(E),"data-disabled":m?"":void 0,disabled:m,value:g,...x,ref:j,onClick:ln(t.onClick,M=>{A(z=>!z),_&&(C.current=M.isPropagationStopped(),C.current||M.stopPropagation())})}),_&&u.jsx(i0,{control:S,bubbles:!C.current,name:o,value:g,checked:E,required:f,disabled:m,form:v,style:{transform:"translateX(-100%)"}})]})});r0.displayName=Xc;var l0="SwitchThumb",o0=y.forwardRef((t,a)=>{const{__scopeSwitch:l,...o}=t,s=tO(l0,l);return u.jsx(nt.span,{"data-state":s0(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:a})});o0.displayName=l0;var nO="SwitchBubbleInput",i0=y.forwardRef(({__scopeSwitch:t,control:a,checked:l,bubbles:o=!0,...s},c)=>{const f=y.useRef(null),m=Ut(f,c),g=JR(l),h=a0(a);return y.useEffect(()=>{const v=f.current;if(!v)return;const x=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(x,"checked").set;if(g!==l&&b){const j=new Event("click",{bubbles:o});b.call(v,l),v.dispatchEvent(j)}},[g,l,o]),u.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:l,...s,tabIndex:-1,ref:m,style:{...s.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});i0.displayName=nO;function s0(t){return t?"checked":"unchecked"}var c0=r0,aO=o0;const Zl=y.forwardRef(({className:t,...a},l)=>u.jsx(c0,{className:it("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-all-ease focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",t),...a,ref:l,children:u.jsx(aO,{className:it("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 transition-all-ease")})}));Zl.displayName=c0.displayName;var Qy=1,rO=.9,lO=.8,oO=.17,Lf=.1,zf=.999,iO=.9999,sO=.99,cO=/[\\\/_+.#"@\[\(\{&]/,uO=/[\\\/_+.#"@\[\(\{&]/g,dO=/[\s-]/,u0=/[\s-]/g;function sh(t,a,l,o,s,c,f){if(c===a.length)return s===t.length?Qy:sO;var m=`${s},${c}`;if(f[m]!==void 0)return f[m];for(var g=o.charAt(c),h=l.indexOf(g,s),v=0,x,S,b,j;h>=0;)x=sh(t,a,l,o,h+1,c+1,f),x>v&&(h===s?x*=Qy:cO.test(t.charAt(h-1))?(x*=lO,b=t.slice(s,h-1).match(uO),b&&s>0&&(x*=Math.pow(zf,b.length))):dO.test(t.charAt(h-1))?(x*=rO,j=t.slice(s,h-1).match(u0),j&&s>0&&(x*=Math.pow(zf,j.length))):(x*=oO,s>0&&(x*=Math.pow(zf,h-s))),t.charAt(h)!==a.charAt(c)&&(x*=iO)),(x<Lf&&l.charAt(h-1)===o.charAt(c+1)||o.charAt(c+1)===o.charAt(c)&&l.charAt(h-1)!==o.charAt(c))&&(S=sh(t,a,l,o,h+1,c+2,f),S*Lf>x&&(x=S*Lf)),x>v&&(v=x),h=l.indexOf(g,h+1);return f[m]=v,v}function Zy(t){return t.toLowerCase().replace(u0," ")}function fO(t,a,l){return t=l&&l.length>0?`${t+" "+l.join(" ")}`:t,sh(t,a,Zy(t),Zy(a),0,0,{})}var gi='[cmdk-group=""]',Uf='[cmdk-group-items=""]',hO='[cmdk-group-heading=""]',d0='[cmdk-item=""]',Jy=`${d0}:not([aria-disabled="true"])`,ch="cmdk-item-select",Gl="data-value",mO=(t,a,l)=>fO(t,a,l),f0=y.createContext(void 0),Di=()=>y.useContext(f0),h0=y.createContext(void 0),Hh=()=>y.useContext(h0),m0=y.createContext(void 0),p0=y.forwardRef((t,a)=>{let l=Yl(()=>{var $,Q;return{search:"",value:(Q=($=t.value)!=null?$:t.defaultValue)!=null?Q:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=Yl(()=>new Set),s=Yl(()=>new Map),c=Yl(()=>new Map),f=Yl(()=>new Set),m=g0(t),{label:g,children:h,value:v,onValueChange:x,filter:S,shouldFilter:b,loop:j,disablePointerSelection:C=!1,vimBindings:_=!0,...E}=t,A=yn(),M=yn(),z=yn(),D=y.useRef(null),R=CO();Jr(()=>{if(v!==void 0){let $=v.trim();l.current.value=$,P.emit()}},[v]),Jr(()=>{R(6,ee)},[]);let P=y.useMemo(()=>({subscribe:$=>(f.current.add($),()=>f.current.delete($)),snapshot:()=>l.current,setState:($,Q,ie)=>{var me,ge,we,Ue;if(!Object.is(l.current[$],Q)){if(l.current[$]=Q,$==="search")q(),re(),R(1,O);else if($==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let le=document.getElementById(z);le?le.focus():(me=document.getElementById(A))==null||me.focus()}if(R(7,()=>{var le;l.current.selectedItemId=(le=V())==null?void 0:le.id,P.emit()}),ie||R(5,ee),((ge=m.current)==null?void 0:ge.value)!==void 0){let le=Q??"";(Ue=(we=m.current).onValueChange)==null||Ue.call(we,le);return}}P.emit()}},emit:()=>{f.current.forEach($=>$())}}),[]),B=y.useMemo(()=>({value:($,Q,ie)=>{var me;Q!==((me=c.current.get($))==null?void 0:me.value)&&(c.current.set($,{value:Q,keywords:ie}),l.current.filtered.items.set($,ne(Q,ie)),R(2,()=>{re(),P.emit()}))},item:($,Q)=>(o.current.add($),Q&&(s.current.has(Q)?s.current.get(Q).add($):s.current.set(Q,new Set([$]))),R(3,()=>{q(),re(),l.current.value||O(),P.emit()}),()=>{c.current.delete($),o.current.delete($),l.current.filtered.items.delete($);let ie=V();R(4,()=>{q(),ie?.getAttribute("id")===$&&O(),P.emit()})}),group:$=>(s.current.has($)||s.current.set($,new Set),()=>{c.current.delete($),s.current.delete($)}),filter:()=>m.current.shouldFilter,label:g||t["aria-label"],getDisablePointerSelection:()=>m.current.disablePointerSelection,listId:A,inputId:z,labelId:M,listInnerRef:D}),[]);function ne($,Q){var ie,me;let ge=(me=(ie=m.current)==null?void 0:ie.filter)!=null?me:mO;return $?ge($,l.current.search,Q):0}function re(){if(!l.current.search||m.current.shouldFilter===!1)return;let $=l.current.filtered.items,Q=[];l.current.filtered.groups.forEach(me=>{let ge=s.current.get(me),we=0;ge.forEach(Ue=>{let le=$.get(Ue);we=Math.max(le,we)}),Q.push([me,we])});let ie=D.current;ae().sort((me,ge)=>{var we,Ue;let le=me.getAttribute("id"),Se=ge.getAttribute("id");return((we=$.get(Se))!=null?we:0)-((Ue=$.get(le))!=null?Ue:0)}).forEach(me=>{let ge=me.closest(Uf);ge?ge.appendChild(me.parentElement===ge?me:me.closest(`${Uf} > *`)):ie.appendChild(me.parentElement===ie?me:me.closest(`${Uf} > *`))}),Q.sort((me,ge)=>ge[1]-me[1]).forEach(me=>{var ge;let we=(ge=D.current)==null?void 0:ge.querySelector(`${gi}[${Gl}="${encodeURIComponent(me[0])}"]`);we?.parentElement.appendChild(we)})}function O(){let $=ae().find(ie=>ie.getAttribute("aria-disabled")!=="true"),Q=$?.getAttribute(Gl);P.setState("value",Q||void 0)}function q(){var $,Q,ie,me;if(!l.current.search||m.current.shouldFilter===!1){l.current.filtered.count=o.current.size;return}l.current.filtered.groups=new Set;let ge=0;for(let we of o.current){let Ue=(Q=($=c.current.get(we))==null?void 0:$.value)!=null?Q:"",le=(me=(ie=c.current.get(we))==null?void 0:ie.keywords)!=null?me:[],Se=ne(Ue,le);l.current.filtered.items.set(we,Se),Se>0&&ge++}for(let[we,Ue]of s.current)for(let le of Ue)if(l.current.filtered.items.get(le)>0){l.current.filtered.groups.add(we);break}l.current.filtered.count=ge}function ee(){var $,Q,ie;let me=V();me&&((($=me.parentElement)==null?void 0:$.firstChild)===me&&((ie=(Q=me.closest(gi))==null?void 0:Q.querySelector(hO))==null||ie.scrollIntoView({block:"nearest"})),me.scrollIntoView({block:"nearest"}))}function V(){var $;return($=D.current)==null?void 0:$.querySelector(`${d0}[aria-selected="true"]`)}function ae(){var $;return Array.from((($=D.current)==null?void 0:$.querySelectorAll(Jy))||[])}function T($){let Q=ae()[$];Q&&P.setState("value",Q.getAttribute(Gl))}function Z($){var Q;let ie=V(),me=ae(),ge=me.findIndex(Ue=>Ue===ie),we=me[ge+$];(Q=m.current)!=null&&Q.loop&&(we=ge+$<0?me[me.length-1]:ge+$===me.length?me[0]:me[ge+$]),we&&P.setState("value",we.getAttribute(Gl))}function I($){let Q=V(),ie=Q?.closest(gi),me;for(;ie&&!me;)ie=$>0?jO(ie,gi):NO(ie,gi),me=ie?.querySelector(Jy);me?P.setState("value",me.getAttribute(Gl)):Z($)}let be=()=>T(ae().length-1),k=$=>{$.preventDefault(),$.metaKey?be():$.altKey?I(1):Z(1)},K=$=>{$.preventDefault(),$.metaKey?T(0):$.altKey?I(-1):Z(-1)};return y.createElement(nt.div,{ref:a,tabIndex:-1,...E,"cmdk-root":"",onKeyDown:$=>{var Q;(Q=E.onKeyDown)==null||Q.call(E,$);let ie=$.nativeEvent.isComposing||$.keyCode===229;if(!($.defaultPrevented||ie))switch($.key){case"n":case"j":{_&&$.ctrlKey&&k($);break}case"ArrowDown":{k($);break}case"p":case"k":{_&&$.ctrlKey&&K($);break}case"ArrowUp":{K($);break}case"Home":{$.preventDefault(),T(0);break}case"End":{$.preventDefault(),be();break}case"Enter":{$.preventDefault();let me=V();if(me){let ge=new Event(ch);me.dispatchEvent(ge)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:B.inputId,id:B.labelId,style:_O},g),Qc(t,$=>y.createElement(h0.Provider,{value:P},y.createElement(f0.Provider,{value:B},$))))}),pO=y.forwardRef((t,a)=>{var l,o;let s=yn(),c=y.useRef(null),f=y.useContext(m0),m=Di(),g=g0(t),h=(o=(l=g.current)==null?void 0:l.forceMount)!=null?o:f?.forceMount;Jr(()=>{if(!h)return m.item(s,f?.id)},[h]);let v=v0(s,c,[t.value,t.children,c],t.keywords),x=Hh(),S=vr(R=>R.value&&R.value===v.current),b=vr(R=>h||m.filter()===!1?!0:R.search?R.filtered.items.get(s)>0:!0);y.useEffect(()=>{let R=c.current;if(!(!R||t.disabled))return R.addEventListener(ch,j),()=>R.removeEventListener(ch,j)},[b,t.onSelect,t.disabled]);function j(){var R,P;C(),(P=(R=g.current).onSelect)==null||P.call(R,v.current)}function C(){x.setState("value",v.current,!0)}if(!b)return null;let{disabled:_,value:E,onSelect:A,forceMount:M,keywords:z,...D}=t;return y.createElement(nt.div,{ref:Xr(c,a),...D,id:s,"cmdk-item":"",role:"option","aria-disabled":!!_,"aria-selected":!!S,"data-disabled":!!_,"data-selected":!!S,onPointerMove:_||m.getDisablePointerSelection()?void 0:C,onClick:_?void 0:j},t.children)}),gO=y.forwardRef((t,a)=>{let{heading:l,children:o,forceMount:s,...c}=t,f=yn(),m=y.useRef(null),g=y.useRef(null),h=yn(),v=Di(),x=vr(b=>s||v.filter()===!1?!0:b.search?b.filtered.groups.has(f):!0);Jr(()=>v.group(f),[]),v0(f,m,[t.value,t.heading,g]);let S=y.useMemo(()=>({id:f,forceMount:s}),[s]);return y.createElement(nt.div,{ref:Xr(m,a),...c,"cmdk-group":"",role:"presentation",hidden:x?void 0:!0},l&&y.createElement("div",{ref:g,"cmdk-group-heading":"","aria-hidden":!0,id:h},l),Qc(t,b=>y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":l?h:void 0},y.createElement(m0.Provider,{value:S},b))))}),vO=y.forwardRef((t,a)=>{let{alwaysRender:l,...o}=t,s=y.useRef(null),c=vr(f=>!f.search);return!l&&!c?null:y.createElement(nt.div,{ref:Xr(s,a),...o,"cmdk-separator":"",role:"separator"})}),yO=y.forwardRef((t,a)=>{let{onValueChange:l,...o}=t,s=t.value!=null,c=Hh(),f=vr(h=>h.search),m=vr(h=>h.selectedItemId),g=Di();return y.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),y.createElement(nt.input,{ref:a,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":g.listId,"aria-labelledby":g.labelId,"aria-activedescendant":m,id:g.inputId,type:"text",value:s?t.value:f,onChange:h=>{s||c.setState("search",h.target.value),l?.(h.target.value)}})}),xO=y.forwardRef((t,a)=>{let{children:l,label:o="Suggestions",...s}=t,c=y.useRef(null),f=y.useRef(null),m=vr(h=>h.selectedItemId),g=Di();return y.useEffect(()=>{if(f.current&&c.current){let h=f.current,v=c.current,x,S=new ResizeObserver(()=>{x=requestAnimationFrame(()=>{let b=h.offsetHeight;v.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return S.observe(h),()=>{cancelAnimationFrame(x),S.unobserve(h)}}},[]),y.createElement(nt.div,{ref:Xr(c,a),...s,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":m,"aria-label":o,id:g.listId},Qc(t,h=>y.createElement("div",{ref:Xr(f,g.listInnerRef),"cmdk-list-sizer":""},h)))}),bO=y.forwardRef((t,a)=>{let{open:l,onOpenChange:o,overlayClassName:s,contentClassName:c,container:f,...m}=t;return y.createElement(Tb,{open:l,onOpenChange:o},y.createElement(Mb,{container:f},y.createElement(Lh,{"cmdk-overlay":"",className:s}),y.createElement(zh,{"aria-label":t.label,"cmdk-dialog":"",className:c},y.createElement(p0,{ref:a,...m}))))}),wO=y.forwardRef((t,a)=>vr(l=>l.filtered.count===0)?y.createElement(nt.div,{ref:a,...t,"cmdk-empty":"",role:"presentation"}):null),SO=y.forwardRef((t,a)=>{let{progress:l,children:o,label:s="Loading...",...c}=t;return y.createElement(nt.div,{ref:a,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":l,"aria-valuemin":0,"aria-valuemax":100,"aria-label":s},Qc(t,f=>y.createElement("div",{"aria-hidden":!0},f)))}),uo=Object.assign(p0,{List:xO,Item:pO,Input:yO,Group:gO,Separator:vO,Dialog:bO,Empty:wO,Loading:SO});function jO(t,a){let l=t.nextElementSibling;for(;l;){if(l.matches(a))return l;l=l.nextElementSibling}}function NO(t,a){let l=t.previousElementSibling;for(;l;){if(l.matches(a))return l;l=l.previousElementSibling}}function g0(t){let a=y.useRef(t);return Jr(()=>{a.current=t}),a}var Jr=typeof window>"u"?y.useEffect:y.useLayoutEffect;function Yl(t){let a=y.useRef();return a.current===void 0&&(a.current=t()),a}function vr(t){let a=Hh(),l=()=>t(a.snapshot());return y.useSyncExternalStore(a.subscribe,l,l)}function v0(t,a,l,o=[]){let s=y.useRef(),c=Di();return Jr(()=>{var f;let m=(()=>{var h;for(let v of l){if(typeof v=="string")return v.trim();if(typeof v=="object"&&"current"in v)return v.current?(h=v.current.textContent)==null?void 0:h.trim():s.current}})(),g=o.map(h=>h.trim());c.value(t,m,g),(f=a.current)==null||f.setAttribute(Gl,m),s.current=m}),s}var CO=()=>{let[t,a]=y.useState(),l=Yl(()=>new Map);return Jr(()=>{l.current.forEach(o=>o()),l.current=new Map},[t]),(o,s)=>{l.current.set(o,s),a({})}};function EO(t){let a=t.type;return typeof a=="function"?a(t.props):"render"in a?a.render(t.props):t}function Qc({asChild:t,children:a},l){return t&&y.isValidElement(a)?y.cloneElement(EO(a),{ref:a.ref},l(a.props.children)):l(a)}var _O={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function y0({className:t,...a}){return u.jsx(uo,{"data-slot":"command",className:it("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),...a})}function x0({className:t,...a}){return u.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[u.jsx($b,{className:"size-4 shrink-0 opacity-50"}),u.jsx(uo.Input,{"data-slot":"command-input",className:it("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),...a})]})}function b0({className:t,...a}){return u.jsx(uo.List,{"data-slot":"command-list",className:it("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),...a})}function w0({...t}){return u.jsx(uo.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t})}function S0({className:t,...a}){return u.jsx(uo.Group,{"data-slot":"command-group",className:it("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),...a})}function j0({className:t,...a}){return u.jsx(uo.Item,{"data-slot":"command-item",className:it("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...a})}const RO=["top","right","bottom","left"],yr=Math.min,vn=Math.max,kc=Math.round,cc=Math.floor,sa=t=>({x:t,y:t}),OO={left:"right",right:"left",bottom:"top",top:"bottom"},AO={start:"end",end:"start"};function uh(t,a,l){return vn(t,yr(a,l))}function za(t,a){return typeof t=="function"?t(a):t}function Ua(t){return t.split("-")[0]}function fo(t){return t.split("-")[1]}function Bh(t){return t==="x"?"y":"x"}function $h(t){return t==="y"?"height":"width"}const TO=new Set(["top","bottom"]);function la(t){return TO.has(Ua(t))?"y":"x"}function Fh(t){return Bh(la(t))}function MO(t,a,l){l===void 0&&(l=!1);const o=fo(t),s=Fh(t),c=$h(s);let f=s==="x"?o===(l?"end":"start")?"right":"left":o==="start"?"bottom":"top";return a.reference[c]>a.floating[c]&&(f=Dc(f)),[f,Dc(f)]}function kO(t){const a=Dc(t);return[dh(t),a,dh(a)]}function dh(t){return t.replace(/start|end/g,a=>AO[a])}const Wy=["left","right"],ex=["right","left"],DO=["top","bottom"],LO=["bottom","top"];function zO(t,a,l){switch(t){case"top":case"bottom":return l?a?ex:Wy:a?Wy:ex;case"left":case"right":return a?DO:LO;default:return[]}}function UO(t,a,l,o){const s=fo(t);let c=zO(Ua(t),l==="start",o);return s&&(c=c.map(f=>f+"-"+s),a&&(c=c.concat(c.map(dh)))),c}function Dc(t){return t.replace(/left|right|bottom|top/g,a=>OO[a])}function PO(t){return{top:0,right:0,bottom:0,left:0,...t}}function N0(t){return typeof t!="number"?PO(t):{top:t,right:t,bottom:t,left:t}}function Lc(t){const{x:a,y:l,width:o,height:s}=t;return{width:o,height:s,top:l,left:a,right:a+o,bottom:l+s,x:a,y:l}}function tx(t,a,l){let{reference:o,floating:s}=t;const c=la(a),f=Fh(a),m=$h(f),g=Ua(a),h=c==="y",v=o.x+o.width/2-s.width/2,x=o.y+o.height/2-s.height/2,S=o[m]/2-s[m]/2;let b;switch(g){case"top":b={x:v,y:o.y-s.height};break;case"bottom":b={x:v,y:o.y+o.height};break;case"right":b={x:o.x+o.width,y:x};break;case"left":b={x:o.x-s.width,y:x};break;default:b={x:o.x,y:o.y}}switch(fo(a)){case"start":b[f]-=S*(l&&h?-1:1);break;case"end":b[f]+=S*(l&&h?-1:1);break}return b}const HO=async(t,a,l)=>{const{placement:o="bottom",strategy:s="absolute",middleware:c=[],platform:f}=l,m=c.filter(Boolean),g=await(f.isRTL==null?void 0:f.isRTL(a));let h=await f.getElementRects({reference:t,floating:a,strategy:s}),{x:v,y:x}=tx(h,o,g),S=o,b={},j=0;for(let C=0;C<m.length;C++){const{name:_,fn:E}=m[C],{x:A,y:M,data:z,reset:D}=await E({x:v,y:x,initialPlacement:o,placement:S,strategy:s,middlewareData:b,rects:h,platform:f,elements:{reference:t,floating:a}});v=A??v,x=M??x,b={...b,[_]:{...b[_],...z}},D&&j<=50&&(j++,typeof D=="object"&&(D.placement&&(S=D.placement),D.rects&&(h=D.rects===!0?await f.getElementRects({reference:t,floating:a,strategy:s}):D.rects),{x:v,y:x}=tx(h,S,g)),C=-1)}return{x:v,y:x,placement:S,strategy:s,middlewareData:b}};async function Ri(t,a){var l;a===void 0&&(a={});const{x:o,y:s,platform:c,rects:f,elements:m,strategy:g}=t,{boundary:h="clippingAncestors",rootBoundary:v="viewport",elementContext:x="floating",altBoundary:S=!1,padding:b=0}=za(a,t),j=N0(b),_=m[S?x==="floating"?"reference":"floating":x],E=Lc(await c.getClippingRect({element:(l=await(c.isElement==null?void 0:c.isElement(_)))==null||l?_:_.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(m.floating)),boundary:h,rootBoundary:v,strategy:g})),A=x==="floating"?{x:o,y:s,width:f.floating.width,height:f.floating.height}:f.reference,M=await(c.getOffsetParent==null?void 0:c.getOffsetParent(m.floating)),z=await(c.isElement==null?void 0:c.isElement(M))?await(c.getScale==null?void 0:c.getScale(M))||{x:1,y:1}:{x:1,y:1},D=Lc(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:A,offsetParent:M,strategy:g}):A);return{top:(E.top-D.top+j.top)/z.y,bottom:(D.bottom-E.bottom+j.bottom)/z.y,left:(E.left-D.left+j.left)/z.x,right:(D.right-E.right+j.right)/z.x}}const BO=t=>({name:"arrow",options:t,async fn(a){const{x:l,y:o,placement:s,rects:c,platform:f,elements:m,middlewareData:g}=a,{element:h,padding:v=0}=za(t,a)||{};if(h==null)return{};const x=N0(v),S={x:l,y:o},b=Fh(s),j=$h(b),C=await f.getDimensions(h),_=b==="y",E=_?"top":"left",A=_?"bottom":"right",M=_?"clientHeight":"clientWidth",z=c.reference[j]+c.reference[b]-S[b]-c.floating[j],D=S[b]-c.reference[b],R=await(f.getOffsetParent==null?void 0:f.getOffsetParent(h));let P=R?R[M]:0;(!P||!await(f.isElement==null?void 0:f.isElement(R)))&&(P=m.floating[M]||c.floating[j]);const B=z/2-D/2,ne=P/2-C[j]/2-1,re=yr(x[E],ne),O=yr(x[A],ne),q=re,ee=P-C[j]-O,V=P/2-C[j]/2+B,ae=uh(q,V,ee),T=!g.arrow&&fo(s)!=null&&V!==ae&&c.reference[j]/2-(V<q?re:O)-C[j]/2<0,Z=T?V<q?V-q:V-ee:0;return{[b]:S[b]+Z,data:{[b]:ae,centerOffset:V-ae-Z,...T&&{alignmentOffset:Z}},reset:T}}}),$O=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(a){var l,o;const{placement:s,middlewareData:c,rects:f,initialPlacement:m,platform:g,elements:h}=a,{mainAxis:v=!0,crossAxis:x=!0,fallbackPlacements:S,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:j="none",flipAlignment:C=!0,..._}=za(t,a);if((l=c.arrow)!=null&&l.alignmentOffset)return{};const E=Ua(s),A=la(m),M=Ua(m)===m,z=await(g.isRTL==null?void 0:g.isRTL(h.floating)),D=S||(M||!C?[Dc(m)]:kO(m)),R=j!=="none";!S&&R&&D.push(...UO(m,C,j,z));const P=[m,...D],B=await Ri(a,_),ne=[];let re=((o=c.flip)==null?void 0:o.overflows)||[];if(v&&ne.push(B[E]),x){const V=MO(s,f,z);ne.push(B[V[0]],B[V[1]])}if(re=[...re,{placement:s,overflows:ne}],!ne.every(V=>V<=0)){var O,q;const V=(((O=c.flip)==null?void 0:O.index)||0)+1,ae=P[V];if(ae&&(!(x==="alignment"?A!==la(ae):!1)||re.every(I=>I.overflows[0]>0&&la(I.placement)===A)))return{data:{index:V,overflows:re},reset:{placement:ae}};let T=(q=re.filter(Z=>Z.overflows[0]<=0).sort((Z,I)=>Z.overflows[1]-I.overflows[1])[0])==null?void 0:q.placement;if(!T)switch(b){case"bestFit":{var ee;const Z=(ee=re.filter(I=>{if(R){const be=la(I.placement);return be===A||be==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(be=>be>0).reduce((be,k)=>be+k,0)]).sort((I,be)=>I[1]-be[1])[0])==null?void 0:ee[0];Z&&(T=Z);break}case"initialPlacement":T=m;break}if(s!==T)return{reset:{placement:T}}}return{}}}};function nx(t,a){return{top:t.top-a.height,right:t.right-a.width,bottom:t.bottom-a.height,left:t.left-a.width}}function ax(t){return RO.some(a=>t[a]>=0)}const FO=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(a){const{rects:l}=a,{strategy:o="referenceHidden",...s}=za(t,a);switch(o){case"referenceHidden":{const c=await Ri(a,{...s,elementContext:"reference"}),f=nx(c,l.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:ax(f)}}}case"escaped":{const c=await Ri(a,{...s,altBoundary:!0}),f=nx(c,l.floating);return{data:{escapedOffsets:f,escaped:ax(f)}}}default:return{}}}}},C0=new Set(["left","top"]);async function qO(t,a){const{placement:l,platform:o,elements:s}=t,c=await(o.isRTL==null?void 0:o.isRTL(s.floating)),f=Ua(l),m=fo(l),g=la(l)==="y",h=C0.has(f)?-1:1,v=c&&g?-1:1,x=za(a,t);let{mainAxis:S,crossAxis:b,alignmentAxis:j}=typeof x=="number"?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return m&&typeof j=="number"&&(b=m==="end"?j*-1:j),g?{x:b*v,y:S*h}:{x:S*h,y:b*v}}const VO=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(a){var l,o;const{x:s,y:c,placement:f,middlewareData:m}=a,g=await qO(a,t);return f===((l=m.offset)==null?void 0:l.placement)&&(o=m.arrow)!=null&&o.alignmentOffset?{}:{x:s+g.x,y:c+g.y,data:{...g,placement:f}}}}},IO=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(a){const{x:l,y:o,placement:s}=a,{mainAxis:c=!0,crossAxis:f=!1,limiter:m={fn:_=>{let{x:E,y:A}=_;return{x:E,y:A}}},...g}=za(t,a),h={x:l,y:o},v=await Ri(a,g),x=la(Ua(s)),S=Bh(x);let b=h[S],j=h[x];if(c){const _=S==="y"?"top":"left",E=S==="y"?"bottom":"right",A=b+v[_],M=b-v[E];b=uh(A,b,M)}if(f){const _=x==="y"?"top":"left",E=x==="y"?"bottom":"right",A=j+v[_],M=j-v[E];j=uh(A,j,M)}const C=m.fn({...a,[S]:b,[x]:j});return{...C,data:{x:C.x-l,y:C.y-o,enabled:{[S]:c,[x]:f}}}}}},GO=function(t){return t===void 0&&(t={}),{options:t,fn(a){const{x:l,y:o,placement:s,rects:c,middlewareData:f}=a,{offset:m=0,mainAxis:g=!0,crossAxis:h=!0}=za(t,a),v={x:l,y:o},x=la(s),S=Bh(x);let b=v[S],j=v[x];const C=za(m,a),_=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:0,crossAxis:0,...C};if(g){const M=S==="y"?"height":"width",z=c.reference[S]-c.floating[M]+_.mainAxis,D=c.reference[S]+c.reference[M]-_.mainAxis;b<z?b=z:b>D&&(b=D)}if(h){var E,A;const M=S==="y"?"width":"height",z=C0.has(Ua(s)),D=c.reference[x]-c.floating[M]+(z&&((E=f.offset)==null?void 0:E[x])||0)+(z?0:_.crossAxis),R=c.reference[x]+c.reference[M]+(z?0:((A=f.offset)==null?void 0:A[x])||0)-(z?_.crossAxis:0);j<D?j=D:j>R&&(j=R)}return{[S]:b,[x]:j}}}},YO=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(a){var l,o;const{placement:s,rects:c,platform:f,elements:m}=a,{apply:g=()=>{},...h}=za(t,a),v=await Ri(a,h),x=Ua(s),S=fo(s),b=la(s)==="y",{width:j,height:C}=c.floating;let _,E;x==="top"||x==="bottom"?(_=x,E=S===(await(f.isRTL==null?void 0:f.isRTL(m.floating))?"start":"end")?"left":"right"):(E=x,_=S==="end"?"top":"bottom");const A=C-v.top-v.bottom,M=j-v.left-v.right,z=yr(C-v[_],A),D=yr(j-v[E],M),R=!a.middlewareData.shift;let P=z,B=D;if((l=a.middlewareData.shift)!=null&&l.enabled.x&&(B=M),(o=a.middlewareData.shift)!=null&&o.enabled.y&&(P=A),R&&!S){const re=vn(v.left,0),O=vn(v.right,0),q=vn(v.top,0),ee=vn(v.bottom,0);b?B=j-2*(re!==0||O!==0?re+O:vn(v.left,v.right)):P=C-2*(q!==0||ee!==0?q+ee:vn(v.top,v.bottom))}await g({...a,availableWidth:B,availableHeight:P});const ne=await f.getDimensions(m.floating);return j!==ne.width||C!==ne.height?{reset:{rects:!0}}:{}}}};function Zc(){return typeof window<"u"}function ho(t){return E0(t)?(t.nodeName||"").toLowerCase():"#document"}function xn(t){var a;return(t==null||(a=t.ownerDocument)==null?void 0:a.defaultView)||window}function ma(t){var a;return(a=(E0(t)?t.ownerDocument:t.document)||window.document)==null?void 0:a.documentElement}function E0(t){return Zc()?t instanceof Node||t instanceof xn(t).Node:!1}function Fn(t){return Zc()?t instanceof Element||t instanceof xn(t).Element:!1}function fa(t){return Zc()?t instanceof HTMLElement||t instanceof xn(t).HTMLElement:!1}function rx(t){return!Zc()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof xn(t).ShadowRoot}const KO=new Set(["inline","contents"]);function Li(t){const{overflow:a,overflowX:l,overflowY:o,display:s}=qn(t);return/auto|scroll|overlay|hidden|clip/.test(a+o+l)&&!KO.has(s)}const XO=new Set(["table","td","th"]);function QO(t){return XO.has(ho(t))}const ZO=[":popover-open",":modal"];function Jc(t){return ZO.some(a=>{try{return t.matches(a)}catch{return!1}})}const JO=["transform","translate","scale","rotate","perspective"],WO=["transform","translate","scale","rotate","perspective","filter"],eA=["paint","layout","strict","content"];function qh(t){const a=Vh(),l=Fn(t)?qn(t):t;return JO.some(o=>l[o]?l[o]!=="none":!1)||(l.containerType?l.containerType!=="normal":!1)||!a&&(l.backdropFilter?l.backdropFilter!=="none":!1)||!a&&(l.filter?l.filter!=="none":!1)||WO.some(o=>(l.willChange||"").includes(o))||eA.some(o=>(l.contain||"").includes(o))}function tA(t){let a=xr(t);for(;fa(a)&&!no(a);){if(qh(a))return a;if(Jc(a))return null;a=xr(a)}return null}function Vh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const nA=new Set(["html","body","#document"]);function no(t){return nA.has(ho(t))}function qn(t){return xn(t).getComputedStyle(t)}function Wc(t){return Fn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function xr(t){if(ho(t)==="html")return t;const a=t.assignedSlot||t.parentNode||rx(t)&&t.host||ma(t);return rx(a)?a.host:a}function _0(t){const a=xr(t);return no(a)?t.ownerDocument?t.ownerDocument.body:t.body:fa(a)&&Li(a)?a:_0(a)}function Oi(t,a,l){var o;a===void 0&&(a=[]),l===void 0&&(l=!0);const s=_0(t),c=s===((o=t.ownerDocument)==null?void 0:o.body),f=xn(s);if(c){const m=fh(f);return a.concat(f,f.visualViewport||[],Li(s)?s:[],m&&l?Oi(m):[])}return a.concat(s,Oi(s,[],l))}function fh(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function R0(t){const a=qn(t);let l=parseFloat(a.width)||0,o=parseFloat(a.height)||0;const s=fa(t),c=s?t.offsetWidth:l,f=s?t.offsetHeight:o,m=kc(l)!==c||kc(o)!==f;return m&&(l=c,o=f),{width:l,height:o,$:m}}function Ih(t){return Fn(t)?t:t.contextElement}function Jl(t){const a=Ih(t);if(!fa(a))return sa(1);const l=a.getBoundingClientRect(),{width:o,height:s,$:c}=R0(a);let f=(c?kc(l.width):l.width)/o,m=(c?kc(l.height):l.height)/s;return(!f||!Number.isFinite(f))&&(f=1),(!m||!Number.isFinite(m))&&(m=1),{x:f,y:m}}const aA=sa(0);function O0(t){const a=xn(t);return!Vh()||!a.visualViewport?aA:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function rA(t,a,l){return a===void 0&&(a=!1),!l||a&&l!==xn(t)?!1:a}function Wr(t,a,l,o){a===void 0&&(a=!1),l===void 0&&(l=!1);const s=t.getBoundingClientRect(),c=Ih(t);let f=sa(1);a&&(o?Fn(o)&&(f=Jl(o)):f=Jl(t));const m=rA(c,l,o)?O0(c):sa(0);let g=(s.left+m.x)/f.x,h=(s.top+m.y)/f.y,v=s.width/f.x,x=s.height/f.y;if(c){const S=xn(c),b=o&&Fn(o)?xn(o):o;let j=S,C=fh(j);for(;C&&o&&b!==j;){const _=Jl(C),E=C.getBoundingClientRect(),A=qn(C),M=E.left+(C.clientLeft+parseFloat(A.paddingLeft))*_.x,z=E.top+(C.clientTop+parseFloat(A.paddingTop))*_.y;g*=_.x,h*=_.y,v*=_.x,x*=_.y,g+=M,h+=z,j=xn(C),C=fh(j)}}return Lc({width:v,height:x,x:g,y:h})}function Gh(t,a){const l=Wc(t).scrollLeft;return a?a.left+l:Wr(ma(t)).left+l}function A0(t,a,l){l===void 0&&(l=!1);const o=t.getBoundingClientRect(),s=o.left+a.scrollLeft-(l?0:Gh(t,o)),c=o.top+a.scrollTop;return{x:s,y:c}}function lA(t){let{elements:a,rect:l,offsetParent:o,strategy:s}=t;const c=s==="fixed",f=ma(o),m=a?Jc(a.floating):!1;if(o===f||m&&c)return l;let g={scrollLeft:0,scrollTop:0},h=sa(1);const v=sa(0),x=fa(o);if((x||!x&&!c)&&((ho(o)!=="body"||Li(f))&&(g=Wc(o)),fa(o))){const b=Wr(o);h=Jl(o),v.x=b.x+o.clientLeft,v.y=b.y+o.clientTop}const S=f&&!x&&!c?A0(f,g,!0):sa(0);return{width:l.width*h.x,height:l.height*h.y,x:l.x*h.x-g.scrollLeft*h.x+v.x+S.x,y:l.y*h.y-g.scrollTop*h.y+v.y+S.y}}function oA(t){return Array.from(t.getClientRects())}function iA(t){const a=ma(t),l=Wc(t),o=t.ownerDocument.body,s=vn(a.scrollWidth,a.clientWidth,o.scrollWidth,o.clientWidth),c=vn(a.scrollHeight,a.clientHeight,o.scrollHeight,o.clientHeight);let f=-l.scrollLeft+Gh(t);const m=-l.scrollTop;return qn(o).direction==="rtl"&&(f+=vn(a.clientWidth,o.clientWidth)-s),{width:s,height:c,x:f,y:m}}function sA(t,a){const l=xn(t),o=ma(t),s=l.visualViewport;let c=o.clientWidth,f=o.clientHeight,m=0,g=0;if(s){c=s.width,f=s.height;const h=Vh();(!h||h&&a==="fixed")&&(m=s.offsetLeft,g=s.offsetTop)}return{width:c,height:f,x:m,y:g}}const cA=new Set(["absolute","fixed"]);function uA(t,a){const l=Wr(t,!0,a==="fixed"),o=l.top+t.clientTop,s=l.left+t.clientLeft,c=fa(t)?Jl(t):sa(1),f=t.clientWidth*c.x,m=t.clientHeight*c.y,g=s*c.x,h=o*c.y;return{width:f,height:m,x:g,y:h}}function lx(t,a,l){let o;if(a==="viewport")o=sA(t,l);else if(a==="document")o=iA(ma(t));else if(Fn(a))o=uA(a,l);else{const s=O0(t);o={x:a.x-s.x,y:a.y-s.y,width:a.width,height:a.height}}return Lc(o)}function T0(t,a){const l=xr(t);return l===a||!Fn(l)||no(l)?!1:qn(l).position==="fixed"||T0(l,a)}function dA(t,a){const l=a.get(t);if(l)return l;let o=Oi(t,[],!1).filter(m=>Fn(m)&&ho(m)!=="body"),s=null;const c=qn(t).position==="fixed";let f=c?xr(t):t;for(;Fn(f)&&!no(f);){const m=qn(f),g=qh(f);!g&&m.position==="fixed"&&(s=null),(c?!g&&!s:!g&&m.position==="static"&&!!s&&cA.has(s.position)||Li(f)&&!g&&T0(t,f))?o=o.filter(v=>v!==f):s=m,f=xr(f)}return a.set(t,o),o}function fA(t){let{element:a,boundary:l,rootBoundary:o,strategy:s}=t;const f=[...l==="clippingAncestors"?Jc(a)?[]:dA(a,this._c):[].concat(l),o],m=f[0],g=f.reduce((h,v)=>{const x=lx(a,v,s);return h.top=vn(x.top,h.top),h.right=yr(x.right,h.right),h.bottom=yr(x.bottom,h.bottom),h.left=vn(x.left,h.left),h},lx(a,m,s));return{width:g.right-g.left,height:g.bottom-g.top,x:g.left,y:g.top}}function hA(t){const{width:a,height:l}=R0(t);return{width:a,height:l}}function mA(t,a,l){const o=fa(a),s=ma(a),c=l==="fixed",f=Wr(t,!0,c,a);let m={scrollLeft:0,scrollTop:0};const g=sa(0);function h(){g.x=Gh(s)}if(o||!o&&!c)if((ho(a)!=="body"||Li(s))&&(m=Wc(a)),o){const b=Wr(a,!0,c,a);g.x=b.x+a.clientLeft,g.y=b.y+a.clientTop}else s&&h();c&&!o&&s&&h();const v=s&&!o&&!c?A0(s,m):sa(0),x=f.left+m.scrollLeft-g.x-v.x,S=f.top+m.scrollTop-g.y-v.y;return{x,y:S,width:f.width,height:f.height}}function Pf(t){return qn(t).position==="static"}function ox(t,a){if(!fa(t)||qn(t).position==="fixed")return null;if(a)return a(t);let l=t.offsetParent;return ma(t)===l&&(l=l.ownerDocument.body),l}function M0(t,a){const l=xn(t);if(Jc(t))return l;if(!fa(t)){let s=xr(t);for(;s&&!no(s);){if(Fn(s)&&!Pf(s))return s;s=xr(s)}return l}let o=ox(t,a);for(;o&&QO(o)&&Pf(o);)o=ox(o,a);return o&&no(o)&&Pf(o)&&!qh(o)?l:o||tA(t)||l}const pA=async function(t){const a=this.getOffsetParent||M0,l=this.getDimensions,o=await l(t.floating);return{reference:mA(t.reference,await a(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function gA(t){return qn(t).direction==="rtl"}const vA={convertOffsetParentRelativeRectToViewportRelativeRect:lA,getDocumentElement:ma,getClippingRect:fA,getOffsetParent:M0,getElementRects:pA,getClientRects:oA,getDimensions:hA,getScale:Jl,isElement:Fn,isRTL:gA};function k0(t,a){return t.x===a.x&&t.y===a.y&&t.width===a.width&&t.height===a.height}function yA(t,a){let l=null,o;const s=ma(t);function c(){var m;clearTimeout(o),(m=l)==null||m.disconnect(),l=null}function f(m,g){m===void 0&&(m=!1),g===void 0&&(g=1),c();const h=t.getBoundingClientRect(),{left:v,top:x,width:S,height:b}=h;if(m||a(),!S||!b)return;const j=cc(x),C=cc(s.clientWidth-(v+S)),_=cc(s.clientHeight-(x+b)),E=cc(v),M={rootMargin:-j+"px "+-C+"px "+-_+"px "+-E+"px",threshold:vn(0,yr(1,g))||1};let z=!0;function D(R){const P=R[0].intersectionRatio;if(P!==g){if(!z)return f();P?f(!1,P):o=setTimeout(()=>{f(!1,1e-7)},1e3)}P===1&&!k0(h,t.getBoundingClientRect())&&f(),z=!1}try{l=new IntersectionObserver(D,{...M,root:s.ownerDocument})}catch{l=new IntersectionObserver(D,M)}l.observe(t)}return f(!0),c}function xA(t,a,l,o){o===void 0&&(o={});const{ancestorScroll:s=!0,ancestorResize:c=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:g=!1}=o,h=Ih(t),v=s||c?[...h?Oi(h):[],...Oi(a)]:[];v.forEach(E=>{s&&E.addEventListener("scroll",l,{passive:!0}),c&&E.addEventListener("resize",l)});const x=h&&m?yA(h,l):null;let S=-1,b=null;f&&(b=new ResizeObserver(E=>{let[A]=E;A&&A.target===h&&b&&(b.unobserve(a),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var M;(M=b)==null||M.observe(a)})),l()}),h&&!g&&b.observe(h),b.observe(a));let j,C=g?Wr(t):null;g&&_();function _(){const E=Wr(t);C&&!k0(C,E)&&l(),C=E,j=requestAnimationFrame(_)}return l(),()=>{var E;v.forEach(A=>{s&&A.removeEventListener("scroll",l),c&&A.removeEventListener("resize",l)}),x?.(),(E=b)==null||E.disconnect(),b=null,g&&cancelAnimationFrame(j)}}const bA=VO,wA=IO,SA=$O,jA=YO,NA=FO,ix=BO,CA=GO,EA=(t,a,l)=>{const o=new Map,s={platform:vA,...l},c={...s.platform,_c:o};return HO(t,a,{...s,platform:c})};var _A=typeof document<"u",RA=function(){},Sc=_A?y.useLayoutEffect:RA;function zc(t,a){if(t===a)return!0;if(typeof t!=typeof a)return!1;if(typeof t=="function"&&t.toString()===a.toString())return!0;let l,o,s;if(t&&a&&typeof t=="object"){if(Array.isArray(t)){if(l=t.length,l!==a.length)return!1;for(o=l;o--!==0;)if(!zc(t[o],a[o]))return!1;return!0}if(s=Object.keys(t),l=s.length,l!==Object.keys(a).length)return!1;for(o=l;o--!==0;)if(!{}.hasOwnProperty.call(a,s[o]))return!1;for(o=l;o--!==0;){const c=s[o];if(!(c==="_owner"&&t.$$typeof)&&!zc(t[c],a[c]))return!1}return!0}return t!==t&&a!==a}function D0(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function sx(t,a){const l=D0(t);return Math.round(a*l)/l}function Hf(t){const a=y.useRef(t);return Sc(()=>{a.current=t}),a}function OA(t){t===void 0&&(t={});const{placement:a="bottom",strategy:l="absolute",middleware:o=[],platform:s,elements:{reference:c,floating:f}={},transform:m=!0,whileElementsMounted:g,open:h}=t,[v,x]=y.useState({x:0,y:0,strategy:l,placement:a,middlewareData:{},isPositioned:!1}),[S,b]=y.useState(o);zc(S,o)||b(o);const[j,C]=y.useState(null),[_,E]=y.useState(null),A=y.useCallback(I=>{I!==R.current&&(R.current=I,C(I))},[]),M=y.useCallback(I=>{I!==P.current&&(P.current=I,E(I))},[]),z=c||j,D=f||_,R=y.useRef(null),P=y.useRef(null),B=y.useRef(v),ne=g!=null,re=Hf(g),O=Hf(s),q=Hf(h),ee=y.useCallback(()=>{if(!R.current||!P.current)return;const I={placement:a,strategy:l,middleware:S};O.current&&(I.platform=O.current),EA(R.current,P.current,I).then(be=>{const k={...be,isPositioned:q.current!==!1};V.current&&!zc(B.current,k)&&(B.current=k,Vc.flushSync(()=>{x(k)}))})},[S,a,l,O,q]);Sc(()=>{h===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,x(I=>({...I,isPositioned:!1})))},[h]);const V=y.useRef(!1);Sc(()=>(V.current=!0,()=>{V.current=!1}),[]),Sc(()=>{if(z&&(R.current=z),D&&(P.current=D),z&&D){if(re.current)return re.current(z,D,ee);ee()}},[z,D,ee,re,ne]);const ae=y.useMemo(()=>({reference:R,floating:P,setReference:A,setFloating:M}),[A,M]),T=y.useMemo(()=>({reference:z,floating:D}),[z,D]),Z=y.useMemo(()=>{const I={position:l,left:0,top:0};if(!T.floating)return I;const be=sx(T.floating,v.x),k=sx(T.floating,v.y);return m?{...I,transform:"translate("+be+"px, "+k+"px)",...D0(T.floating)>=1.5&&{willChange:"transform"}}:{position:l,left:be,top:k}},[l,m,T.floating,v.x,v.y]);return y.useMemo(()=>({...v,update:ee,refs:ae,elements:T,floatingStyles:Z}),[v,ee,ae,T,Z])}const AA=t=>{function a(l){return{}.hasOwnProperty.call(l,"current")}return{name:"arrow",options:t,fn(l){const{element:o,padding:s}=typeof t=="function"?t(l):t;return o&&a(o)?o.current!=null?ix({element:o.current,padding:s}).fn(l):{}:o?ix({element:o,padding:s}).fn(l):{}}}},TA=(t,a)=>({...bA(t),options:[t,a]}),MA=(t,a)=>({...wA(t),options:[t,a]}),kA=(t,a)=>({...CA(t),options:[t,a]}),DA=(t,a)=>({...SA(t),options:[t,a]}),LA=(t,a)=>({...jA(t),options:[t,a]}),zA=(t,a)=>({...NA(t),options:[t,a]}),UA=(t,a)=>({...AA(t),options:[t,a]});var PA="Arrow",L0=y.forwardRef((t,a)=>{const{children:l,width:o=10,height:s=5,...c}=t;return u.jsx(nt.svg,{...c,ref:a,width:o,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?l:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});L0.displayName=PA;var HA=L0,Yh="Popper",[z0,U0]=br(Yh),[BA,P0]=z0(Yh),H0=t=>{const{__scopePopper:a,children:l}=t,[o,s]=y.useState(null);return u.jsx(BA,{scope:a,anchor:o,onAnchorChange:s,children:l})};H0.displayName=Yh;var B0="PopperAnchor",$0=y.forwardRef((t,a)=>{const{__scopePopper:l,virtualRef:o,...s}=t,c=P0(B0,l),f=y.useRef(null),m=Ut(a,f);return y.useEffect(()=>{c.onAnchorChange(o?.current||f.current)}),o?null:u.jsx(nt.div,{...s,ref:m})});$0.displayName=B0;var Kh="PopperContent",[$A,FA]=z0(Kh),F0=y.forwardRef((t,a)=>{const{__scopePopper:l,side:o="bottom",sideOffset:s=0,align:c="center",alignOffset:f=0,arrowPadding:m=0,avoidCollisions:g=!0,collisionBoundary:h=[],collisionPadding:v=0,sticky:x="partial",hideWhenDetached:S=!1,updatePositionStrategy:b="optimized",onPlaced:j,...C}=t,_=P0(Kh,l),[E,A]=y.useState(null),M=Ut(a,we=>A(we)),[z,D]=y.useState(null),R=a0(z),P=R?.width??0,B=R?.height??0,ne=o+(c!=="center"?"-"+c:""),re=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},O=Array.isArray(h)?h:[h],q=O.length>0,ee={padding:re,boundary:O.filter(VA),altBoundary:q},{refs:V,floatingStyles:ae,placement:T,isPositioned:Z,middlewareData:I}=OA({strategy:"fixed",placement:ne,whileElementsMounted:(...we)=>xA(...we,{animationFrame:b==="always"}),elements:{reference:_.anchor},middleware:[TA({mainAxis:s+B,alignmentAxis:f}),g&&MA({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?kA():void 0,...ee}),g&&DA({...ee}),LA({...ee,apply:({elements:we,rects:Ue,availableWidth:le,availableHeight:Se})=>{const{width:Be,height:rt}=Ue.reference,Ee=we.floating.style;Ee.setProperty("--radix-popper-available-width",`${le}px`),Ee.setProperty("--radix-popper-available-height",`${Se}px`),Ee.setProperty("--radix-popper-anchor-width",`${Be}px`),Ee.setProperty("--radix-popper-anchor-height",`${rt}px`)}}),z&&UA({element:z,padding:m}),IA({arrowWidth:P,arrowHeight:B}),S&&zA({strategy:"referenceHidden",...ee})]}),[be,k]=I0(T),K=Qr(j);bn(()=>{Z&&K?.()},[Z,K]);const $=I.arrow?.x,Q=I.arrow?.y,ie=I.arrow?.centerOffset!==0,[me,ge]=y.useState();return bn(()=>{E&&ge(window.getComputedStyle(E).zIndex)},[E]),u.jsx("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...ae,transform:Z?ae.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(" "),...I.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:u.jsx($A,{scope:l,placedSide:be,onArrowChange:D,arrowX:$,arrowY:Q,shouldHideArrow:ie,children:u.jsx(nt.div,{"data-side":be,"data-align":k,...C,ref:M,style:{...C.style,animation:Z?void 0:"none"}})})})});F0.displayName=Kh;var q0="PopperArrow",qA={top:"bottom",right:"left",bottom:"top",left:"right"},V0=y.forwardRef(function(a,l){const{__scopePopper:o,...s}=a,c=FA(q0,o),f=qA[c.placedSide];return u.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:u.jsx(HA,{...s,ref:l,style:{...s.style,display:"block"}})})});V0.displayName=q0;function VA(t){return t!==null}var IA=t=>({name:"transformOrigin",options:t,fn(a){const{placement:l,rects:o,middlewareData:s}=a,f=s.arrow?.centerOffset!==0,m=f?0:t.arrowWidth,g=f?0:t.arrowHeight,[h,v]=I0(l),x={start:"0%",center:"50%",end:"100%"}[v],S=(s.arrow?.x??0)+m/2,b=(s.arrow?.y??0)+g/2;let j="",C="";return h==="bottom"?(j=f?x:`${S}px`,C=`${-g}px`):h==="top"?(j=f?x:`${S}px`,C=`${o.floating.height+g}px`):h==="right"?(j=`${-g}px`,C=f?x:`${b}px`):h==="left"&&(j=`${o.floating.width+g}px`,C=f?x:`${b}px`),{data:{x:j,y:C}}}});function I0(t){const[a,l="center"]=t.split("-");return[a,l]}var GA=H0,G0=$0,YA=F0,KA=V0,eu="Popover",[Y0,Gk]=br(eu,[U0]),zi=U0(),[XA,wr]=Y0(eu),K0=t=>{const{__scopePopover:a,children:l,open:o,defaultOpen:s,onOpenChange:c,modal:f=!1}=t,m=zi(a),g=y.useRef(null),[h,v]=y.useState(!1),[x,S]=oo({prop:o,defaultProp:s??!1,onChange:c,caller:eu});return u.jsx(GA,{...m,children:u.jsx(XA,{scope:a,contentId:yn(),triggerRef:g,open:x,onOpenChange:S,onOpenToggle:y.useCallback(()=>S(b=>!b),[S]),hasCustomAnchor:h,onCustomAnchorAdd:y.useCallback(()=>v(!0),[]),onCustomAnchorRemove:y.useCallback(()=>v(!1),[]),modal:f,children:l})})};K0.displayName=eu;var X0="PopoverAnchor",QA=y.forwardRef((t,a)=>{const{__scopePopover:l,...o}=t,s=wr(X0,l),c=zi(l),{onCustomAnchorAdd:f,onCustomAnchorRemove:m}=s;return y.useEffect(()=>(f(),()=>m()),[f,m]),u.jsx(G0,{...c,...o,ref:a})});QA.displayName=X0;var Q0="PopoverTrigger",Z0=y.forwardRef((t,a)=>{const{__scopePopover:l,...o}=t,s=wr(Q0,l),c=zi(l),f=Ut(a,s.triggerRef),m=u.jsx(nt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":n1(s.open),...o,ref:f,onClick:ln(t.onClick,s.onOpenToggle)});return s.hasCustomAnchor?m:u.jsx(G0,{asChild:!0,...c,children:m})});Z0.displayName=Q0;var Xh="PopoverPortal",[ZA,JA]=Y0(Xh,{forceMount:void 0}),J0=t=>{const{__scopePopover:a,forceMount:l,children:o,container:s}=t,c=wr(Xh,a);return u.jsx(ZA,{scope:a,forceMount:l,children:u.jsx(io,{present:l||c.open,children:u.jsx(Ah,{asChild:!0,container:s,children:o})})})};J0.displayName=Xh;var ao="PopoverContent",W0=y.forwardRef((t,a)=>{const l=JA(ao,t.__scopePopover),{forceMount:o=l.forceMount,...s}=t,c=wr(ao,t.__scopePopover);return u.jsx(io,{present:o||c.open,children:c.modal?u.jsx(eT,{...s,ref:a}):u.jsx(tT,{...s,ref:a})})});W0.displayName=ao;var WA=to("PopoverContent.RemoveScroll"),eT=y.forwardRef((t,a)=>{const l=wr(ao,t.__scopePopover),o=y.useRef(null),s=Ut(a,o),c=y.useRef(!1);return y.useEffect(()=>{const f=o.current;if(f)return pb(f)},[]),u.jsx(Th,{as:WA,allowPinchZoom:!0,children:u.jsx(e1,{...t,ref:s,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ln(t.onCloseAutoFocus,f=>{f.preventDefault(),c.current||l.triggerRef.current?.focus()}),onPointerDownOutside:ln(t.onPointerDownOutside,f=>{const m=f.detail.originalEvent,g=m.button===0&&m.ctrlKey===!0,h=m.button===2||g;c.current=h},{checkForDefaultPrevented:!1}),onFocusOutside:ln(t.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1})})})}),tT=y.forwardRef((t,a)=>{const l=wr(ao,t.__scopePopover),o=y.useRef(!1),s=y.useRef(!1);return u.jsx(e1,{...t,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{t.onCloseAutoFocus?.(c),c.defaultPrevented||(o.current||l.triggerRef.current?.focus(),c.preventDefault()),o.current=!1,s.current=!1},onInteractOutside:c=>{t.onInteractOutside?.(c),c.defaultPrevented||(o.current=!0,c.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const f=c.target;l.triggerRef.current?.contains(f)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&s.current&&c.preventDefault()}})}),e1=y.forwardRef((t,a)=>{const{__scopePopover:l,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:c,disableOutsidePointerEvents:f,onEscapeKeyDown:m,onPointerDownOutside:g,onFocusOutside:h,onInteractOutside:v,...x}=t,S=wr(ao,l),b=zi(l);return ob(),u.jsx(Oh,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:s,onUnmountAutoFocus:c,children:u.jsx(Rh,{asChild:!0,disableOutsidePointerEvents:f,onInteractOutside:v,onEscapeKeyDown:m,onPointerDownOutside:g,onFocusOutside:h,onDismiss:()=>S.onOpenChange(!1),children:u.jsx(YA,{"data-state":n1(S.open),role:"dialog",id:S.contentId,...b,...x,ref:a,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),t1="PopoverClose",nT=y.forwardRef((t,a)=>{const{__scopePopover:l,...o}=t,s=wr(t1,l);return u.jsx(nt.button,{type:"button",...o,ref:a,onClick:ln(t.onClick,()=>s.onOpenChange(!1))})});nT.displayName=t1;var aT="PopoverArrow",rT=y.forwardRef((t,a)=>{const{__scopePopover:l,...o}=t,s=zi(l);return u.jsx(KA,{...s,...o,ref:a})});rT.displayName=aT;function n1(t){return t?"open":"closed"}var lT=K0,oT=Z0,iT=J0,sT=W0;function tu({...t}){return u.jsx(lT,{"data-slot":"popover",...t})}function nu({...t}){return u.jsx(oT,{"data-slot":"popover-trigger",...t})}function au({className:t,align:a="center",sideOffset:l=4,...o}){return u.jsx(iT,{children:u.jsx(sT,{"data-slot":"popover-content",align:a,sideOffset:l,className:it("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden animate-fade-in",t),...o})})}function Wl({options:t,value:a,onChange:l,placeholder:o="Select an option...",searchPlaceholder:s="Search...",emptyPlaceholder:c="No options found."}){const[f,m]=y.useState(!1),g=t.find(h=>h.value===a);return u.jsxs(tu,{open:f,onOpenChange:m,children:[u.jsx(nu,{asChild:!0,children:u.jsxs(xe,{variant:"outline",role:"combobox","aria-expanded":f,className:"w-full justify-between transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:[g?g.label:o,u.jsx(Hb,{className:"ml-2 h-4 w-4 shrink-0 opacity-50 transition-transform duration-200 group-data-[state=open]:rotate-180"})]})}),u.jsx(au,{className:"w-[--radix-popover-trigger-width] p-0 animate-fade-in",children:u.jsxs(y0,{children:[u.jsx(x0,{placeholder:s}),u.jsxs(b0,{children:[u.jsx(w0,{children:c}),u.jsx(S0,{children:t.map(h=>u.jsxs(j0,{value:h.value,onSelect:v=>{l(v===a?"":v),m(!1)},className:"transition-all-ease hover:bg-accent hover:text-accent-foreground",children:[u.jsx(Ub,{className:it("mr-2 h-4 w-4 transition-opacity",a===h.value?"opacity-100":"opacity-0")}),h.label]},h.value))})]})]})})]})}class cT{baseUrl;apiKey;tempApiKey;constructor(a="/api",l=""){this.baseUrl=a,this.apiKey=l||localStorage.getItem("apiKey")||"",this.tempApiKey=new URLSearchParams(window.location.search).get("tempApiKey")}setBaseUrl(a){this.baseUrl=a}setApiKey(a){this.apiKey=a,a?localStorage.setItem("apiKey",a):localStorage.removeItem("apiKey")}setTempApiKey(a){this.tempApiKey=a}createHeaders(a="application/json"){const l={Accept:"application/json"};return this.tempApiKey?l["X-Temp-API-Key"]=this.tempApiKey:this.apiKey&&(l["X-API-Key"]=this.apiKey),a&&(l["Content-Type"]=a),l}async apiFetch(a,l={}){const o=`${this.baseUrl}${a}`,s={...l,headers:{...this.createHeaders(),...l.headers}};try{const c=await fetch(o,s);if(c.status===401)return localStorage.removeItem("apiKey"),window.dispatchEvent(new CustomEvent("unauthorized")),new Promise(()=>{});if(!c.ok)throw new Error(`API request failed: ${c.status} ${c.statusText}`);if(c.status===204)return{};const f=await c.text();return f?JSON.parse(f):{}}catch(c){throw console.error("API request error:",c),c}}async get(a){return this.apiFetch(a,{method:"GET"})}async post(a,l){return this.apiFetch(a,{method:"POST",body:JSON.stringify(l)})}async put(a,l){return this.apiFetch(a,{method:"PUT",body:JSON.stringify(l)})}async delete(a){return this.apiFetch(a,{method:"DELETE"})}async getConfig(){return this.get("/config")}async updateConfig(a){return this.post("/config",a)}async getProviders(){return this.get("/api/providers")}async addProvider(a){return this.post("/api/providers",a)}async updateProvider(a,l){return this.post(`/api/providers/${a}`,l)}async deleteProvider(a){return this.delete(`/api/providers/${a}`)}async getTransformers(){return this.get("/api/transformers")}async addTransformer(a){return this.post("/api/transformers",a)}async updateTransformer(a,l){return this.post(`/api/transformers/${a}`,l)}async deleteTransformer(a){return this.delete(`/api/transformers/${a}`)}async getConfigNew(){return this.get("/config")}async saveConfig(a){return this.post("/config",a)}async restartService(){return this.post("/restart",{})}async checkForUpdates(){return this.get("/update/check")}async performUpdate(){return this.post("/api/update/perform",{})}async getLogFiles(){return this.get("/logs/files")}async getLogs(a){return this.get(`/logs?file=${encodeURIComponent(a)}`)}async clearLogs(a){return this.delete(`/logs?file=${encodeURIComponent(a)}`)}}const $t=new cT,a1=y.createContext(void 0);function Ba(){const t=y.useContext(a1);if(t===void 0)throw new Error("useConfig must be used within a ConfigProvider");return t}function uT({children:t}){const[a,l]=y.useState(null),[o,s]=y.useState(null),[c,f]=y.useState(!1),[m,g]=y.useState(localStorage.getItem("apiKey"));return y.useEffect(()=>{const h=()=>{g(localStorage.getItem("apiKey"))};return window.addEventListener("storage",h),()=>{window.removeEventListener("storage",h)}},[]),y.useEffect(()=>{(async()=>{f(!1),l(null),s(null)})()},[m]),y.useEffect(()=>{(async()=>{if(!c){f(!0);try{const v=await $t.getConfig(),x={LOG:typeof v.LOG=="boolean"?v.LOG:!1,LOG_LEVEL:typeof v.LOG_LEVEL=="string"?v.LOG_LEVEL:"debug",CLAUDE_PATH:typeof v.CLAUDE_PATH=="string"?v.CLAUDE_PATH:"",HOST:typeof v.HOST=="string"?v.HOST:"127.0.0.1",PORT:typeof v.PORT=="number"?v.PORT:3456,APIKEY:typeof v.APIKEY=="string"?v.APIKEY:"",API_TIMEOUT_MS:typeof v.API_TIMEOUT_MS=="string"?v.API_TIMEOUT_MS:"600000",PROXY_URL:typeof v.PROXY_URL=="string"?v.PROXY_URL:"",transformers:Array.isArray(v.transformers)?v.transformers:[],Providers:Array.isArray(v.Providers)?v.Providers:[],StatusLine:v.StatusLine&&typeof v.StatusLine=="object"?{enabled:typeof v.StatusLine.enabled=="boolean"?v.StatusLine.enabled:!1,currentStyle:typeof v.StatusLine.currentStyle=="string"?v.StatusLine.currentStyle:"default",default:v.StatusLine.default&&typeof v.StatusLine.default=="object"&&Array.isArray(v.StatusLine.default.modules)?v.StatusLine.default:{modules:[]},powerline:v.StatusLine.powerline&&typeof v.StatusLine.powerline=="object"&&Array.isArray(v.StatusLine.powerline.modules)?v.StatusLine.powerline:{modules:[]}}:{enabled:!1,currentStyle:"default",default:{modules:[]},powerline:{modules:[]}},Router:v.Router&&typeof v.Router=="object"?v.Router:{default:"",background:"",think:"",longContext:"",longContextThreshold:6e4,webSearch:"",image:""},CUSTOM_ROUTER_PATH:typeof v.CUSTOM_ROUTER_PATH=="string"?v.CUSTOM_ROUTER_PATH:""};l(x)}catch(v){console.error("Failed to fetch config:",v),v.message!=="Unauthorized"&&(l({LOG:!1,LOG_LEVEL:"debug",CLAUDE_PATH:"",HOST:"127.0.0.1",PORT:3456,APIKEY:"",API_TIMEOUT_MS:"600000",PROXY_URL:"",transformers:[],Providers:[],StatusLine:void 0,Router:{default:"",background:"",think:"",longContext:"",longContextThreshold:6e4,webSearch:"",image:""},CUSTOM_ROUTER_PATH:""}),s(v))}}})()},[c,m]),u.jsx(a1.Provider,{value:{config:a,setConfig:l,error:o},children:t})}function ru(){return(ru=Object.assign||function(t){for(var a=1;a<arguments.length;a++){var l=arguments[a];for(var o in l)Object.prototype.hasOwnProperty.call(l,o)&&(t[o]=l[o])}return t}).apply(this,arguments)}function r1(t,a){if(t==null)return{};var l,o,s={},c=Object.keys(t);for(o=0;o<c.length;o++)a.indexOf(l=c[o])>=0||(s[l]=t[l]);return s}function hh(t){var a=y.useRef(t),l=y.useRef(function(o){a.current&&a.current(o)});return a.current=t,l.current}var Ai=function(t,a,l){return a===void 0&&(a=0),l===void 0&&(l=1),t>l?l:t<a?a:t},Si=function(t){return"touches"in t},mh=function(t){return t&&t.ownerDocument.defaultView||self},cx=function(t,a,l){var o=t.getBoundingClientRect(),s=Si(a)?function(c,f){for(var m=0;m<c.length;m++)if(c[m].identifier===f)return c[m];return c[0]}(a.touches,l):a;return{left:Ai((s.pageX-(o.left+mh(t).pageXOffset))/o.width),top:Ai((s.pageY-(o.top+mh(t).pageYOffset))/o.height)}},ux=function(t){!Si(t)&&t.preventDefault()},l1=ot.memo(function(t){var a=t.onMove,l=t.onKey,o=r1(t,["onMove","onKey"]),s=y.useRef(null),c=hh(a),f=hh(l),m=y.useRef(null),g=y.useRef(!1),h=y.useMemo(function(){var b=function(_){ux(_),(Si(_)?_.touches.length>0:_.buttons>0)&&s.current?c(cx(s.current,_,m.current)):C(!1)},j=function(){return C(!1)};function C(_){var E=g.current,A=mh(s.current),M=_?A.addEventListener:A.removeEventListener;M(E?"touchmove":"mousemove",b),M(E?"touchend":"mouseup",j)}return[function(_){var E=_.nativeEvent,A=s.current;if(A&&(ux(E),!function(z,D){return D&&!Si(z)}(E,g.current)&&A)){if(Si(E)){g.current=!0;var M=E.changedTouches||[];M.length&&(m.current=M[0].identifier)}A.focus(),c(cx(A,E,m.current)),C(!0)}},function(_){var E=_.which||_.keyCode;E<37||E>40||(_.preventDefault(),f({left:E===39?.05:E===37?-.05:0,top:E===40?.05:E===38?-.05:0}))},C]},[f,c]),v=h[0],x=h[1],S=h[2];return y.useEffect(function(){return S},[S]),ot.createElement("div",ru({},o,{onTouchStart:v,onMouseDown:v,className:"react-colorful__interactive",ref:s,onKeyDown:x,tabIndex:0,role:"slider"}))}),Qh=function(t){return t.filter(Boolean).join(" ")},o1=function(t){var a=t.color,l=t.left,o=t.top,s=o===void 0?.5:o,c=Qh(["react-colorful__pointer",t.className]);return ot.createElement("div",{className:c,style:{top:100*s+"%",left:100*l+"%"}},ot.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:a}}))},Gt=function(t,a,l){return a===void 0&&(a=0),l===void 0&&(l=Math.pow(10,a)),Math.round(l*t)/l},dT=function(t){return gT(ph(t))},ph=function(t){return t[0]==="#"&&(t=t.substring(1)),t.length<6?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?Gt(parseInt(t[3]+t[3],16)/255,2):1}:{r:parseInt(t.substring(0,2),16),g:parseInt(t.substring(2,4),16),b:parseInt(t.substring(4,6),16),a:t.length===8?Gt(parseInt(t.substring(6,8),16)/255,2):1}},fT=function(t){return pT(mT(t))},hT=function(t){var a=t.s,l=t.v,o=t.a,s=(200-a)*l/100;return{h:Gt(t.h),s:Gt(s>0&&s<200?a*l/100/(s<=100?s:200-s)*100:0),l:Gt(s/2),a:Gt(o,2)}},gh=function(t){var a=hT(t);return"hsl("+a.h+", "+a.s+"%, "+a.l+"%)"},mT=function(t){var a=t.h,l=t.s,o=t.v,s=t.a;a=a/360*6,l/=100,o/=100;var c=Math.floor(a),f=o*(1-l),m=o*(1-(a-c)*l),g=o*(1-(1-a+c)*l),h=c%6;return{r:Gt(255*[o,m,f,f,g,o][h]),g:Gt(255*[g,o,o,m,f,f][h]),b:Gt(255*[f,f,g,o,o,m][h]),a:Gt(s,2)}},uc=function(t){var a=t.toString(16);return a.length<2?"0"+a:a},pT=function(t){var a=t.r,l=t.g,o=t.b,s=t.a,c=s<1?uc(Gt(255*s)):"";return"#"+uc(a)+uc(l)+uc(o)+c},gT=function(t){var a=t.r,l=t.g,o=t.b,s=t.a,c=Math.max(a,l,o),f=c-Math.min(a,l,o),m=f?c===a?(l-o)/f:c===l?2+(o-a)/f:4+(a-l)/f:0;return{h:Gt(60*(m<0?m+6:m)),s:Gt(c?f/c*100:0),v:Gt(c/255*100),a:s}},vT=ot.memo(function(t){var a=t.hue,l=t.onChange,o=Qh(["react-colorful__hue",t.className]);return ot.createElement("div",{className:o},ot.createElement(l1,{onMove:function(s){l({h:360*s.left})},onKey:function(s){l({h:Ai(a+360*s.left,0,360)})},"aria-label":"Hue","aria-valuenow":Gt(a),"aria-valuemax":"360","aria-valuemin":"0"},ot.createElement(o1,{className:"react-colorful__hue-pointer",left:a/360,color:gh({h:a,s:100,v:100,a:1})})))}),yT=ot.memo(function(t){var a=t.hsva,l=t.onChange,o={backgroundColor:gh({h:a.h,s:100,v:100,a:1})};return ot.createElement("div",{className:"react-colorful__saturation",style:o},ot.createElement(l1,{onMove:function(s){l({s:100*s.left,v:100-100*s.top})},onKey:function(s){l({s:Ai(a.s+100*s.left,0,100),v:Ai(a.v-100*s.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Gt(a.s)+"%, Brightness "+Gt(a.v)+"%"},ot.createElement(o1,{className:"react-colorful__saturation-pointer",top:1-a.v/100,left:a.s/100,color:gh(a)})))}),i1=function(t,a){if(t===a)return!0;for(var l in t)if(t[l]!==a[l])return!1;return!0},xT=function(t,a){return t.toLowerCase()===a.toLowerCase()||i1(ph(t),ph(a))};function bT(t,a,l){var o=hh(l),s=y.useState(function(){return t.toHsva(a)}),c=s[0],f=s[1],m=y.useRef({color:a,hsva:c});y.useEffect(function(){if(!t.equal(a,m.current.color)){var h=t.toHsva(a);m.current={hsva:h,color:a},f(h)}},[a,t]),y.useEffect(function(){var h;i1(c,m.current.hsva)||t.equal(h=t.fromHsva(c),m.current.color)||(m.current={hsva:c,color:h},o(h))},[c,t,o]);var g=y.useCallback(function(h){f(function(v){return Object.assign({},v,h)})},[]);return[c,g]}var wT=typeof window<"u"?y.useLayoutEffect:y.useEffect,ST=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},dx=new Map,jT=function(t){wT(function(){var a=t.current?t.current.ownerDocument:document;if(a!==void 0&&!dx.has(a)){var l=a.createElement("style");l.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,dx.set(a,l);var o=ST();o&&l.setAttribute("nonce",o),a.head.appendChild(l)}},[])},NT=function(t){var a=t.className,l=t.colorModel,o=t.color,s=o===void 0?l.defaultColor:o,c=t.onChange,f=r1(t,["className","colorModel","color","onChange"]),m=y.useRef(null);jT(m);var g=bT(l,s,c),h=g[0],v=g[1],x=Qh(["react-colorful",a]);return ot.createElement("div",ru({},f,{ref:m,className:x}),ot.createElement(yT,{hsva:h,onChange:v}),ot.createElement(vT,{hue:h.h,onChange:v,className:"react-colorful__last-control"}))},CT={defaultColor:"000",toHsva:dT,fromHsva:function(t){return fT({h:t.h,s:t.s,v:t.v,a:1})},equal:xT},ET=function(t){return ot.createElement(NT,ru({},t,{colorModel:CT}))};const _T=t=>t.startsWith("#")?t:"#000000";function fx({value:t="",onChange:a,placeholder:l,showPreview:o=!0}){const{t:s}=zn(),[c,f]=y.useState(!1),[m,g]=y.useState("");y.useEffect(()=>{t.startsWith("#")?g(t):g("")},[t]);const h=S=>{a(S)},v=S=>{const b=S.target.value;g(b),/^#[0-9A-F]{6}$/i.test(b)&&h(b)},x=_T(t);return u.jsx("div",{className:"space-y-2",children:u.jsxs(tu,{open:c,onOpenChange:f,children:[u.jsx(nu,{asChild:!0,children:u.jsx(xe,{variant:"outline",className:it("w-full justify-start text-left font-normal h-10 transition-all hover:scale-[1.02] active:scale-[0.98]",!t&&"text-muted-foreground"),children:u.jsxs("div",{className:"flex items-center gap-2 w-full",children:[o&&u.jsx("div",{className:"h-5 w-5 rounded border shadow-sm",style:{backgroundColor:x}}),u.jsx("span",{className:"truncate flex-1",children:t||l||s("color_picker.placeholder")}),u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[u.jsx("path",{d:"m7 15 5 5 5-5"}),u.jsx("path",{d:"m7 9 5-5 5 5"})]})]})})}),u.jsx(au,{className:"w-72 p-3",align:"start",children:u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("h4",{className:"text-sm font-semibold",children:s("color_picker.title")}),u.jsx(xe,{variant:"ghost",size:"sm",className:"h-6 px-2 text-xs",onClick:()=>h(""),children:s("color_picker.clear")})]}),u.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-md bg-secondary",children:[u.jsx("div",{className:"h-8 w-8 rounded border shadow-sm",style:{backgroundColor:x}}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsx("div",{className:"text-sm font-medium truncate",children:t||s("color_picker.no_color_selected")}),t&&t.startsWith("#")&&u.jsx("div",{className:"text-xs text-muted-foreground font-mono",children:t.toUpperCase()})]})]}),u.jsx("div",{className:"rounded-md overflow-hidden border",children:u.jsx(ET,{color:x,onChange:h,className:"w-full"})}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-sm font-medium",children:s("color_picker.custom_color")}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(He,{type:"text",value:m,onChange:v,placeholder:"#RRGGBB",className:"font-mono flex-1"}),u.jsx(xe,{size:"sm",onClick:()=>{m&&/^#[0-9A-F]{6}$/i.test(m)&&(h(m),f(!1))},disabled:!m||!/^#[0-9A-F]{6}$/i.test(m),children:s("color_picker.apply")})]}),u.jsx("p",{className:"text-xs text-muted-foreground",children:s("color_picker.hex_input_help")})]})]})})]})})}const RT=Kc("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function kn({className:t,variant:a,...l}){return u.jsx("div",{className:it(RT({variant:a}),t),...l})}function OT(){return{enabled:!1,currentStyle:"default",default:{modules:[{type:"workDir",icon:"󰉋",text:"{{workDirName}}",color:"bright_blue"},{type:"gitBranch",icon:"",text:"{{gitBranch}}",color:"bright_magenta"},{type:"model",icon:"󰚩",text:"{{model}}",color:"bright_cyan"},{type:"usage",icon:"↑",text:"{{inputTokens}}",color:"bright_green"},{type:"usage",icon:"↓",text:"{{outputTokens}}",color:"bright_yellow"}]},powerline:{modules:[{type:"workDir",icon:"󰉋",text:"{{workDirName}}",color:"white",background:"bg_bright_blue"},{type:"gitBranch",icon:"",text:"{{gitBranch}}",color:"white",background:"bg_bright_magenta"},{type:"model",icon:"󰚩",text:"{{model}}",color:"white",background:"bg_bright_cyan"},{type:"usage",icon:"↑",text:"{{inputTokens}}",color:"white",background:"bg_bright_green"},{type:"usage",icon:"↓",text:"{{outputTokens}}",color:"white",background:"bg_bright_yellow"}]}}}const AT={type:"workDir",icon:"󰉋",text:"{{workDirName}}",color:"bright_blue"},TT=[{label:"Hack Nerd Font Mono",value:"Hack Nerd Font Mono"},{label:"FiraCode Nerd Font Mono",value:"FiraCode Nerd Font Mono"},{label:"JetBrainsMono Nerd Font Mono",value:"JetBrainsMono Nerd Font Mono"},{label:"Monaspace Nerd Font Mono",value:"Monaspace Nerd Font Mono"},{label:"UbuntuMono Nerd Font",value:"UbuntuMono Nerd Font"}],MT=[{label:"workDir",value:"workDir"},{label:"gitBranch",value:"gitBranch"},{label:"model",value:"model"},{label:"usage",value:"usage"},{label:"script",value:"script"}],Bf={black:"text-black",red:"text-red-600",green:"text-green-600",yellow:"text-yellow-500",blue:"text-blue-500",magenta:"text-purple-500",cyan:"text-cyan-500",white:"text-white",bright_black:"text-gray-500",bright_red:"text-red-400",bright_green:"text-green-400",bright_yellow:"text-yellow-300",bright_blue:"text-blue-300",bright_magenta:"text-purple-300",bright_cyan:"text-cyan-300",bright_white:"text-white",bg_black:"bg-black",bg_red:"bg-red-600",bg_green:"bg-green-600",bg_yellow:"bg-yellow-500",bg_blue:"bg-blue-500",bg_magenta:"bg-purple-500",bg_cyan:"bg-cyan-500",bg_white:"bg-white",bg_bright_black:"bg-gray-800",bg_bright_red:"bg-red-400",bg_bright_green:"bg-green-400",bg_bright_yellow:"bg-yellow-300",bg_bright_blue:"bg-blue-300",bg_bright_magenta:"bg-purple-300",bg_bright_cyan:"bg-cyan-300",bg_bright_white:"bg-gray-100",bg_bright_orange:"bg-orange-400",bg_bright_purple:"bg-purple-400"},kT=ot.memo(({value:t,onChange:a,fontFamily:l,t:o})=>{const[s,c]=y.useState(!1),[f,m]=y.useState(t),[g,h]=y.useState([]),[v,x]=y.useState([]),[S,b]=y.useState(!1),j=ot.useRef(null),C=y.useCallback(async()=>{if(!(g.length>0)){b(!0);try{const R=await(await fetch("https://www.nerdfonts.com/assets/css/combo.css")).text(),P=/\.nf-([a-zA-Z0-9_-]+):before\s*\{\s*content:\s*"\\([0-9a-fA-F]+)";?\s*\}/g,B=[];let ne;for(;(ne=P.exec(R))!==null;){const re=`nf-${ne[1]}`,O=ne[2],q=String.fromCharCode(parseInt(O,16));B.push({className:re,unicode:O,char:q})}h(B),x(B.slice(0,200))}catch(D){console.error("Failed to load icons:",D),h([]),x([])}finally{b(!1)}}},[g.length]);y.useEffect(()=>{if(f.trim()===""){x(g.slice(0,100));return}const D=f.toLowerCase();let R=g;if(D.length===1||/[\u{2000}-\u{2FFFF}]/u.test(f)){const P=g.find(B=>B.char===f);P?R=[P]:R=g.filter(B=>B.char===f)}else R=g.filter(P=>{const B=P.className.toLowerCase(),ne=B.replace(/[_-]/g,""),re=D.replace(/[_-]/g,"");return B.includes(D)||ne.includes(re)||D.split(" ").every(O=>B.includes(O)||ne.includes(O))});x(R.slice(0,120))},[f,g]);const _=D=>{const R=D.target.value;m(R),a(R),c(!0),g.length===0&&C()},E=D=>{const R=D.clipboardData.getData("text");R&&R.length===1&&setTimeout(()=>{c(!0)},10)},A=D=>{m(D),a(D),c(!1),j.current?.focus()},M=()=>{c(!0),g.length===0&&C()},z=()=>{setTimeout(()=>c(!1),200)};return u.jsxs("div",{className:"relative",children:[u.jsx("div",{className:"relative",children:u.jsx(He,{ref:j,value:f,onChange:_,onFocus:M,onBlur:z,onPaste:E,placeholder:o("statusline.icon_placeholder"),style:{fontFamily:l+", monospace"},className:"text-lg pr-2"})}),s&&u.jsx("div",{className:"absolute z-50 mt-1 w-full max-h-72 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg",children:S?u.jsx("div",{className:"flex items-center justify-center p-8",children:u.jsxs("svg",{className:"animate-spin h-6 w-6 text-primary",viewBox:"0 0 24 24",children:[u.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none",opacity:"0.1"}),u.jsx("path",{fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}):u.jsx(u.Fragment,{children:u.jsxs("div",{className:"grid grid-cols-5 gap-2 p-2 max-h-72 overflow-y-auto",children:[v.map(D=>u.jsx("div",{className:"flex items-center justify-center p-3 text-2xl cursor-pointer hover:bg-secondary rounded transition-colors",onClick:()=>A(D.char),onMouseDown:R=>R.preventDefault(),title:`${D.char} - ${D.className}`,style:{fontFamily:l+", monospace"},children:D.char},D.className)),v.length===0&&u.jsxs("div",{className:"col-span-5 flex flex-col items-center justify-center p-8 text-muted-foreground",children:[u.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"mb-2",children:[u.jsx("circle",{cx:"11",cy:"11",r:"8"}),u.jsx("path",{d:"m21 21-4.35-4.35"})]}),u.jsx("div",{className:"text-sm",children:f?`${o("statusline.no_icons_found")} "${f}"`:o("statusline.no_icons_available")})]})]})})})]})});function DT(t,a){return t.replace(/\{\{(\w+)\}\}/g,(l,o)=>a[o]||l)}function LT(t,a=!1){const l={workDirName:"project",gitBranch:"main",model:"Claude Sonnet 4",inputTokens:"1.2k",outputTokens:"2.5k"},o=DT(t.text,l),s=t.icon||"";if(!o&&t.type!=="usage")return null;const c=g=>/^#[0-9A-F]{6}$/i.test(g);if(a){let g={},h="",v="";t.background&&(c(t.background)?(g={backgroundColor:t.background},v=t.background):(h=Bf[t.background]||"",v=t.background));let x={},S="";return t.color?c(t.color)?x={color:t.color}:S=Bf[t.color]||"text-white":S="text-white",u.jsxs("div",{className:`powerline-module px-4 ${h} ${S}`,style:{...g,...x},children:[u.jsxs("div",{className:"powerline-module-content",children:[s&&u.jsx("span",{children:s}),u.jsx("span",{children:o})]}),u.jsx("div",{className:"powerline-separator","data-current-bg":v})]})}let f={},m="";return t.color&&(c(t.color)?f={color:t.color}:m=Bf[t.color]||""),u.jsxs(u.Fragment,{children:[s&&u.jsx("span",{style:f,className:m,children:s}),u.jsx("span",{style:f,className:m,children:o})]})}function zT({isOpen:t,onOpenChange:a}){const{t:l}=zn(),{config:o,setConfig:s}=Ba(),[c,f]=y.useState(o?.StatusLine||OT()),[m,g]=y.useState(o?.StatusLine?.fontFamily||"Hack Nerd Font Mono"),[h,v]=y.useState(null),[x,S]=y.useState(new Set);y.useEffect(()=>{const O=document.createElement("style");return O.innerHTML=`
302
+ .powerline-module {
303
+ display: inline-flex;
304
+ align-items: center;
305
+ height: 28px;
306
+ position: relative;
307
+ padding: 0 8px;
308
+ overflow: visible;
309
+ }
310
+
311
+ .powerline-module-content {
312
+ display: flex;
313
+ align-items: center;
314
+ gap: 4px;
315
+ position: relative;
316
+ }
317
+
318
+ .powerline-separator {
319
+ width: 0;
320
+ height: 0;
321
+ border-top: 14px solid transparent;
322
+ border-bottom: 14px solid transparent;
323
+ border-left: 8px solid;
324
+ position: absolute;
325
+ right: -8px;
326
+ top: 0;
327
+ display: block;
328
+ }
329
+
330
+ /* 使用层级确保每个模块的三角形覆盖在下一个模块上方 */
331
+ .cursor-pointer:nth-child(1) .powerline-separator { z-index: 10; }
332
+ .cursor-pointer:nth-child(2) .powerline-separator { z-index: 9; }
333
+ .cursor-pointer:nth-child(3) .powerline-separator { z-index: 8; }
334
+ .cursor-pointer:nth-child(4) .powerline-separator { z-index: 7; }
335
+ .cursor-pointer:nth-child(5) .powerline-separator { z-index: 6; }
336
+ .cursor-pointer:nth-child(6) .powerline-separator { z-index: 5; }
337
+ .cursor-pointer:nth-child(7) .powerline-separator { z-index: 4; }
338
+ .cursor-pointer:nth-child(8) .powerline-separator { z-index: 3; }
339
+ .cursor-pointer:nth-child(9) .powerline-separator { z-index: 2; }
340
+ .cursor-pointer:nth-child(10) .powerline-separator { z-index: 1; }
341
+
342
+ .cursor-pointer:last-child .powerline-separator {
343
+ display: none;
344
+ }
345
+
346
+ /* 根据data属性动态设置颜色,确保与模块背景色一致 */
347
+ .powerline-separator[data-current-bg="bg_black"] { border-left-color: #000000; }
348
+ .powerline-separator[data-current-bg="bg_red"] { border-left-color: #dc2626; }
349
+ .powerline-separator[data-current-bg="bg_green"] { border-left-color: #16a34a; }
350
+ .powerline-separator[data-current-bg="bg_yellow"] { border-left-color: #eab308; }
351
+ .powerline-separator[data-current-bg="bg_blue"] { border-left-color: #3b82f6; }
352
+ .powerline-separator[data-current-bg="bg_magenta"] { border-left-color: #a855f7; }
353
+ .powerline-separator[data-current-bg="bg_cyan"] { border-left-color: #06b6d4; }
354
+ .powerline-separator[data-current-bg="bg_white"] { border-left-color: #ffffff; }
355
+ .powerline-separator[data-current-bg="bg_bright_black"] { border-left-color: #1f2937; }
356
+ .powerline-separator[data-current-bg="bg_bright_red"] { border-left-color: #f87171; }
357
+ .powerline-separator[data-current-bg="bg_bright_green"] { border-left-color: #4ade80; }
358
+ .powerline-separator[data-current-bg="bg_bright_yellow"] { border-left-color: #fde047; }
359
+ .powerline-separator[data-current-bg="bg_bright_blue"] { border-left-color: #93c5fd; }
360
+ .powerline-separator[data-current-bg="bg_bright_magenta"] { border-left-color: #c084fc; }
361
+ .powerline-separator[data-current-bg="bg_bright_cyan"] { border-left-color: #22d3ee; }
362
+ .powerline-separator[data-current-bg="bg_bright_white"] { border-left-color: #f3f4f6; }
363
+ .powerline-separator[data-current-bg="bg_bright_orange"] { border-left-color: #fb923c; }
364
+ .powerline-separator[data-current-bg="bg_bright_purple"] { border-left-color: #c084fc; }
365
+ `,document.head.appendChild(O),()=>{document.head.removeChild(O)}},[]),y.useEffect(()=>{const O=new Set;Object.keys(c).forEach(V=>{const ae=c[V];ae&&typeof ae=="object"&&"modules"in ae&&(ae.modules||[]).forEach(Z=>{Z.background&&/^#[0-9A-F]{6}$/i.test(Z.background)&&O.add(Z.background)})}),S(O);const q=document.createElement("style");q.id="hex-powerline-styles";let ee="";return O.forEach(V=>{const ae=parseInt(V.slice(1,3),16),T=parseInt(V.slice(3,5),16),Z=parseInt(V.slice(5,7),16);ee+=`.powerline-separator[data-current-bg="${V}"] { border-left-color: rgb(${ae}, ${T}, ${Z}); }
366
+ `}),q.innerHTML=ee,document.head.appendChild(q),()=>{const V=document.getElementById("hex-powerline-styles");V&&document.head.removeChild(V)}},[c]);const b=MT.map(O=>({...O,label:l(`statusline.${O.label}`)})),j=O=>{f(q=>({...q,currentStyle:O}))},C=(O,q,ee)=>{const V=c.currentStyle,ae=c[V],T=ae&&typeof ae=="object"&&"modules"in ae?[...ae.modules||[]]:[];T[O]&&(T[O]={...T[O],[q]:ee}),f(Z=>({...Z,[V]:{modules:T}}))},[_,E]=y.useState([]),A=()=>{E([]),o&&(s({...o,StatusLine:{...c,fontFamily:m}}),a(!1))},M=({title:O,description:q,variant:ee="default"})=>{const V=ee==="destructive";return u.jsx("div",{className:`rounded-lg border p-4 ${V?"bg-red-50 border-red-200 text-red-800":"bg-blue-50 border-blue-200 text-blue-800"}`,children:u.jsxs("div",{className:"flex",children:[u.jsx("div",{className:"flex-shrink-0",children:V?u.jsx("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}):u.jsx("svg",{className:"h-5 w-5 text-blue-400",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})}),u.jsxs("div",{className:"ml-3",children:[u.jsx("h3",{className:`text-sm font-medium ${V?"text-red-800":"text-blue-800"}`,children:O}),u.jsx("div",{className:`mt-2 text-sm ${V?"text-red-700":"text-blue-700"}`,children:q})]})]})})},z=c.currentStyle,D=c[z],R=D&&typeof D=="object"&&"modules"in D?D.modules||[]:[],P=h!==null&&R.length>h?R[h]:null,B=y.useCallback(()=>{if(h===null)return;const O=c.currentStyle,q=c[O],ee=q&&typeof q=="object"&&"modules"in q?[...q.modules||[]]:[];h>=0&&h<ee.length&&(ee.splice(h,1),f(V=>({...V,[O]:{modules:ee}})),v(null))},[h,c]),ne=m?{fontFamily:m}:{};y.useEffect(()=>{const O=q=>{h!==null&&(q.key==="Delete"||q.key==="Backspace")&&(q.preventDefault(),B())};return document.addEventListener("keydown",O),()=>{document.removeEventListener("keydown",O)}},[h,B]);const re=`${m}-${c.currentStyle}`;return u.jsx(Da,{open:t,onOpenChange:a,children:u.jsxs(ca,{className:"max-w-4xl h-[90vh] overflow-hidden sm:max-w-5xl md:max-w-6xl lg:max-w-7xl animate-in fade-in-90 slide-in-from-bottom-10 duration-300 flex flex-col",children:[u.jsx(ua,{"data-testid":"statusline-config-dialog-header",className:"border-b pb-4",children:u.jsxs(da,{className:"flex items-center",children:[u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"mr-2",children:[u.jsx("path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),u.jsx("path",{d:"M14 3v4a2 2 0 0 0 2 2h4"}),u.jsx("path",{d:"M3 12h18"})]}),l("statusline.title")]})}),_.length>0&&u.jsx("div",{className:"px-6",children:u.jsx(M,{variant:"destructive",title:"配置验证失败",description:u.jsx("ul",{className:"list-disc pl-5 space-y-1",children:_.map((O,q)=>u.jsx("li",{children:O},q))})})}),u.jsxs("div",{className:"flex flex-col gap-6 flex-1 overflow-hidden",children:[u.jsx("div",{className:"space-y-6",children:u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(ye,{htmlFor:"theme-style",className:"text-sm font-medium",children:l("statusline.theme")}),u.jsx(Wl,{options:[{label:l("statusline.theme_default"),value:"default"},{label:l("statusline.theme_powerline"),value:"powerline"}],value:c.currentStyle,onChange:j,"data-testid":"theme-selector",placeholder:l("statusline.theme_placeholder")})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(ye,{htmlFor:"font-family",className:"text-sm font-medium",children:l("statusline.module_icon")}),u.jsx(Wl,{options:TT,value:m,onChange:O=>g(O),"data-testid":"font-family-selector",placeholder:l("statusline.font_placeholder")})]})]})}),u.jsxs("div",{className:"grid grid-cols-5 gap-6 overflow-hidden flex-1",children:[u.jsxs("div",{className:"border rounded-lg flex flex-col overflow-hidden col-span-1",children:[u.jsx("h3",{className:"text-sm font-medium p-4 pb-0 mb-3",children:l("statusline.components")}),u.jsx("div",{className:"space-y-2 overflow-y-auto px-4 pb-4 flex-1",children:b.map(O=>u.jsx("div",{className:"flex items-center gap-2 p-2 border rounded cursor-move hover:bg-secondary",draggable:!0,onDragStart:q=>{q.dataTransfer.setData("moduleType",O.value)},children:u.jsx("span",{className:"text-sm",children:O.label})},O.value))})]}),u.jsxs("div",{className:"border rounded-lg p-4 flex flex-col col-span-3",children:[u.jsx("h3",{className:"text-sm font-medium mb-3",children:l("statusline.preview")}),u.jsx("div",{className:`rounded bg-black/90 text-white font-mono text-sm overflow-x-auto flex items-center border border-border p-3 py-5 shadow-inner overflow-hidden ${c.currentStyle==="powerline"?"gap-0 h-8 p-0 items-center relative":"h-5"}`,"data-testid":"statusline-preview",style:ne,onDragOver:O=>{O.preventDefault()},onDrop:O=>{O.preventDefault();const q=O.dataTransfer.getData("moduleType");if(q){const ee=c.currentStyle,V=c[ee],ae=V&&typeof V=="object"&&"modules"in V?[...V.modules||[]]:[];let T;switch(q){case"workDir":T={type:"workDir",icon:"󰉋",text:"{{workDirName}}",color:"bright_blue"};break;case"gitBranch":T={type:"gitBranch",icon:"🌿",text:"{{gitBranch}}",color:"bright_green"};break;case"model":T={type:"model",icon:"🤖",text:"{{model}}",color:"bright_yellow"};break;case"usage":T={type:"usage",icon:"📊",text:"{{inputTokens}} → {{outputTokens}}",color:"bright_magenta"};break;case"script":T={type:"script",icon:"📜",text:"Script Module",color:"bright_cyan",scriptPath:""};break;default:T={...AT,type:q}}ae.push(T),f(Z=>({...Z,[ee]:{modules:ae}}))}},children:R.length>0?u.jsx("div",{className:"flex items-center flex-wrap gap-0",children:R.map((O,q)=>u.jsx("div",{className:`cursor-pointer ${h===q?"bg-white/20":"hover:bg-white/10"} ${c.currentStyle==="powerline"?"p-0 rounded-none inline-flex overflow-visible relative":"flex items-center gap-1 px-2 py-1 rounded"}`,onClick:()=>v(q),draggable:!0,onDragStart:ee=>{ee.dataTransfer.setData("dragIndex",q.toString())},onDragOver:ee=>{ee.preventDefault()},onDrop:ee=>{ee.preventDefault();const V=parseInt(ee.dataTransfer.getData("dragIndex"));if(!isNaN(V)&&V!==q){const ae=c.currentStyle,T=c[ae],Z=T&&typeof T=="object"&&"modules"in T?[...T.modules||[]]:[];if(V>=0&&V<Z.length&&q>=0&&q<=Z.length){const[I]=Z.splice(V,1);Z.splice(q,0,I),f(be=>({...be,[ae]:{modules:Z}})),h===V?v(q):h===q&&v(V)}}},children:LT(O,c.currentStyle==="powerline")},q))}):u.jsxs("div",{className:"flex flex-col items-center justify-center w-full py-4 text-center",children:[u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-500 mb-2",children:[u.jsx("path",{d:"M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18z"}),u.jsx("path",{d:"M12 8v8"}),u.jsx("path",{d:"M8 12h8"})]}),u.jsx("span",{className:"text-gray-500 text-sm",children:l("statusline.drag_hint")})]})},re)]}),u.jsxs("div",{className:"border rounded-lg flex flex-col overflow-hidden col-span-1",children:[u.jsx("h3",{className:"text-sm font-medium p-4 pb-0 mb-3",children:l("statusline.properties")}),u.jsx("div",{className:"overflow-y-auto px-4 pb-4 flex-1",children:P&&h!==null?u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(ye,{htmlFor:"module-icon",children:l("statusline.module_icon")}),u.jsx(kT,{value:P.icon||"",onChange:O=>C(h,"icon",O),fontFamily:m,t:l},re),u.jsx("p",{className:"text-xs text-muted-foreground",children:l("statusline.icon_description")})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(ye,{htmlFor:"module-text",children:l("statusline.module_text")}),u.jsx(He,{id:"module-text",value:P.text,onChange:O=>C(h,"text",O.target.value),placeholder:l("statusline.text_placeholder")}),u.jsxs("div",{className:"text-xs text-muted-foreground",children:[u.jsx("p",{children:l("statusline.module_text_description")}),u.jsxs("div",{className:"flex flex-wrap gap-1 mt-1",children:[u.jsx(kn,{variant:"secondary",className:"text-xs py-0.5 px-1.5",children:"{{workDirName}}"}),u.jsx(kn,{variant:"secondary",className:"text-xs py-0.5 px-1.5",children:"{{gitBranch}}"}),u.jsx(kn,{variant:"secondary",className:"text-xs py-0.5 px-1.5",children:"{{model}}"}),u.jsx(kn,{variant:"secondary",className:"text-xs py-0.5 px-1.5",children:"{{inputTokens}}"}),u.jsx(kn,{variant:"secondary",className:"text-xs py-0.5 px-1.5",children:"{{outputTokens}}"})]})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(ye,{children:l("statusline.module_color")}),u.jsx(fx,{value:P.color||"",onChange:O=>C(h,"color",O)}),u.jsx("p",{className:"text-xs text-muted-foreground",children:l("statusline.module_color_description")})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(ye,{children:l("statusline.module_background")}),u.jsx(fx,{value:P.background||"",onChange:O=>C(h,"background",O)}),u.jsx("p",{className:"text-xs text-muted-foreground",children:l("statusline.module_background_description")})]}),P.type==="script"&&u.jsxs("div",{className:"space-y-2",children:[u.jsx(ye,{htmlFor:"module-script-path",children:l("statusline.module_script_path")}),u.jsx(He,{id:"module-script-path",value:P.scriptPath||"",onChange:O=>C(h,"scriptPath",O.target.value),placeholder:l("statusline.script_placeholder")}),u.jsx("p",{className:"text-xs text-muted-foreground",children:l("statusline.module_script_path_description")})]}),u.jsx(xe,{variant:"destructive",size:"sm",onClick:B,children:l("statusline.delete_module")})]}):u.jsx("div",{className:"flex items-center justify-center h-full min-h-[200px]",children:u.jsx("p",{className:"text-muted-foreground text-sm",children:l("statusline.select_hint")})})})]})]})]}),u.jsxs(La,{className:"border-t pt-4 mt-4",children:[u.jsx(xe,{variant:"outline",onClick:()=>a(!1),className:"transition-all hover:scale-105",children:l("app.cancel")}),u.jsx(xe,{onClick:A,"data-testid":"save-statusline-config",className:"transition-all hover:scale-105",children:l("app.save")})]})]})})}function UT({isOpen:t,onOpenChange:a}){const{t:l}=zn(),{config:o,setConfig:s}=Ba(),[c,f]=y.useState(!1);if(!o)return null;const m=x=>{s({...o,LOG:x})},g=x=>{s({...o,CLAUDE_PATH:x.target.value})},h=x=>{const S={enabled:x,currentStyle:o.StatusLine?.currentStyle||"default",default:o.StatusLine?.default||{modules:[]},powerline:o.StatusLine?.powerline||{modules:[]}};s({...o,StatusLine:S})},v=()=>{f(!0)};return u.jsxs(Da,{open:t,onOpenChange:a,children:[u.jsxs(ca,{"data-testid":"settings-dialog",className:"max-h-[80vh] flex flex-col p-0",children:[u.jsx(ua,{className:"p-4 pb-0",children:u.jsx(da,{children:l("toplevel.title")})}),u.jsxs("div",{className:"space-y-4 p-4 px-8 overflow-y-auto flex-1",children:[u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx(Zl,{id:"log",checked:o.LOG,onCheckedChange:m}),u.jsx(ye,{htmlFor:"log",className:"transition-all-ease hover:scale-[1.02] cursor-pointer",children:l("toplevel.log")})]}),u.jsx("div",{className:"space-y-2 border-t pt-4",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx(Zl,{id:"statusline",checked:o.StatusLine?.enabled||!1,onCheckedChange:h}),u.jsx(ye,{htmlFor:"statusline",className:"transition-all-ease hover:scale-[1.02] cursor-pointer",children:l("statusline.title")})]}),u.jsx(xe,{variant:"outline",size:"sm",onClick:v,className:"transition-all-ease hover:scale-[1.02] active:scale-[0.98]","data-testid":"statusline-config-button",children:l("app.settings")})]})}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(ye,{htmlFor:"log-level",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.log_level")}),u.jsx(Wl,{options:[{label:"fatal",value:"fatal"},{label:"error",value:"error"},{label:"warn",value:"warn"},{label:"info",value:"info"},{label:"debug",value:"debug"},{label:"trace",value:"trace"}],value:o.LOG_LEVEL,onChange:x=>s({...o,LOG_LEVEL:x})})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(ye,{htmlFor:"claude-path",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.claude_path")}),u.jsx(He,{id:"claude-path",value:o.CLAUDE_PATH,onChange:g,className:"transition-all-ease focus:scale-[1.01]"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(ye,{htmlFor:"host",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.host")}),u.jsx(He,{id:"host",value:o.HOST,onChange:x=>s({...o,HOST:x.target.value}),className:"transition-all-ease focus:scale-[1.01]"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(ye,{htmlFor:"port",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.port")}),u.jsx(He,{id:"port",type:"number",value:o.PORT,onChange:x=>s({...o,PORT:parseInt(x.target.value,10)}),className:"transition-all-ease focus:scale-[1.01]"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(ye,{htmlFor:"timeout",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.timeout")}),u.jsx(He,{id:"timeout",value:o.API_TIMEOUT_MS,onChange:x=>s({...o,API_TIMEOUT_MS:x.target.value}),className:"transition-all-ease focus:scale-[1.01]"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(ye,{htmlFor:"proxy-url",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.proxy_url")}),u.jsx(He,{id:"proxy-url",value:o.PROXY_URL,onChange:x=>s({...o,PROXY_URL:x.target.value}),placeholder:"http://127.0.0.1:7890",className:"transition-all-ease focus:scale-[1.01]"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(ye,{htmlFor:"apikey",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.apikey")}),u.jsx(He,{id:"apikey",type:"password",value:o.APIKEY,onChange:x=>s({...o,APIKEY:x.target.value}),className:"transition-all-ease focus:scale-[1.01]"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(ye,{htmlFor:"custom-router-path",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.custom_router_path")}),u.jsx(He,{id:"custom-router-path",value:o.CUSTOM_ROUTER_PATH||"",onChange:x=>s({...o,CUSTOM_ROUTER_PATH:x.target.value}),placeholder:l("toplevel.custom_router_path_placeholder"),className:"transition-all-ease focus:scale-[1.01]"})]})]}),u.jsx(La,{className:"p-4 pt-0",children:u.jsx(xe,{onClick:()=>a(!1),className:"transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:l("app.save")})})]}),u.jsx(zT,{isOpen:c,onOpenChange:f,"data-testid":"statusline-config-dialog"})]})}const Dn=y.forwardRef(({className:t,...a},l)=>u.jsx("div",{ref:l,className:it("rounded-lg border bg-card text-card-foreground shadow-sm",t),...a}));Dn.displayName="Card";const Vn=y.forwardRef(({className:t,...a},l)=>u.jsx("div",{ref:l,className:it("flex flex-col space-y-1.5 p-6",t),...a}));Vn.displayName="CardHeader";const In=y.forwardRef(({className:t,...a},l)=>u.jsx("div",{ref:l,className:it("text-2xl font-semibold leading-none tracking-tight",t),...a}));In.displayName="CardTitle";const s1=y.forwardRef(({className:t,...a},l)=>u.jsx("div",{ref:l,className:it("text-sm text-muted-foreground",t),...a}));s1.displayName="CardDescription";const Gn=y.forwardRef(({className:t,...a},l)=>u.jsx("div",{ref:l,className:it("p-6 pt-0",t),...a}));Gn.displayName="CardContent";const c1=y.forwardRef(({className:t,...a},l)=>u.jsx("div",{ref:l,className:it("flex items-center p-6 pt-0",t),...a}));c1.displayName="CardFooter";function PT({transformers:t,onEdit:a,onRemove:l}){return!t||!Array.isArray(t)?u.jsx("div",{className:"space-y-3",children:u.jsx("div",{className:"flex items-center justify-center rounded-md border bg-white p-8 text-gray-500",children:"No transformers configured"})}):u.jsx("div",{className:"space-y-3",children:t.map((o,s)=>{if(!o)return u.jsxs("div",{className:"flex items-start justify-between rounded-md border bg-white p-4 transition-all hover:shadow-md animate-slide-in hover:scale-[1.01]",children:[u.jsxs("div",{className:"flex-1 space-y-1.5",children:[u.jsx("p",{className:"text-md font-semibold text-gray-800",children:"Invalid Transformer"}),u.jsx("p",{className:"text-sm text-gray-500",children:"Transformer data is missing"})]}),u.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[u.jsx(xe,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",disabled:!0,children:u.jsx(Ac,{className:"h-4 w-4"})}),u.jsx(xe,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:u.jsx($n,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s);const c=o.path||"Unnamed Transformer",f=o.options||{},m=()=>!f||Object.keys(f).length===0?u.jsx("p",{className:"text-sm text-gray-500",children:"No parameters configured"}):u.jsx("div",{className:"flex flex-wrap gap-2 max-h-8 overflow-hidden",children:Object.entries(f).map(([g,h])=>u.jsxs("span",{className:"inline-flex items-center px-2 py-1 rounded-md bg-gray-100 text-xs font-medium text-gray-700 border",children:[u.jsxs("span",{className:"text-gray-600",children:[g,":"]}),u.jsx("span",{className:"ml-1 text-gray-800",children:String(h)})]},g))});return u.jsxs("div",{className:"flex items-start justify-between rounded-md border bg-white p-4 transition-all hover:shadow-md animate-slide-in hover:scale-[1.01]",children:[u.jsxs("div",{className:"flex-1 space-y-1.5",children:[u.jsx("p",{className:"text-md font-semibold text-gray-800",children:c}),m()]}),u.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[u.jsx(xe,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",children:u.jsx(Ac,{className:"h-4 w-4"})}),u.jsx(xe,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:u.jsx($n,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s)})})}function HT(){const{t}=zn(),{config:a,setConfig:l}=Ba(),[o,s]=y.useState(null),[c,f]=y.useState(null),[m,g]=y.useState(null);if(!a)return u.jsxs(Dn,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[u.jsx(Vn,{className:"flex flex-row items-center justify-between border-b p-4",children:u.jsx(In,{className:"text-lg",children:t("transformers.title")})}),u.jsx(Gn,{className:"flex-grow flex items-center justify-center p-4",children:u.jsx("div",{className:"text-gray-500",children:"Loading transformers configuration..."})})]});const h=Array.isArray(a.transformers)?a.transformers:[],v=()=>{g({name:"",path:"",options:{}}),s(h.length)},x=_=>{const E=[...h];E.splice(_,1),l({...a,transformers:E}),f(null)},S=(_,E,A,M)=>{if(_<h.length){const z=[...h];M!==void 0?z[_].options[M]=A:z[_][E]=A,l({...a,transformers:z})}else if(m){const z={...m};M!==void 0?z.options[M]=A:z[E]=A,g(z)}},b=o!==null?o<h.length?h[o]:m:null,j=()=>{if(m&&o===h.length){const _=[...h,m];l({...a,transformers:_})}s(null),g(null)},C=()=>{s(null),g(null)};return u.jsxs(Dn,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[u.jsxs(Vn,{className:"flex flex-row items-center justify-between border-b p-4",children:[u.jsxs(In,{className:"text-lg",children:[t("transformers.title")," ",u.jsxs("span",{className:"text-sm font-normal text-gray-500",children:["(",h.length,")"]})]}),u.jsx(xe,{onClick:v,children:t("transformers.add")})]}),u.jsx(Gn,{className:"flex-grow overflow-y-auto p-4",children:u.jsx(PT,{transformers:h,onEdit:s,onRemove:f})}),u.jsx(Da,{open:o!==null,onOpenChange:C,children:u.jsxs(ca,{children:[u.jsx(ua,{children:u.jsx(da,{children:t("transformers.edit")})}),b&&o!==null&&u.jsxs("div",{className:"space-y-4 py-4 px-6 max-h-96 overflow-y-auto",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(ye,{htmlFor:"transformer-path",children:t("transformers.path")}),u.jsx(He,{id:"transformer-path",value:b.path||"",onChange:_=>S(o,"path",_.target.value)})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx(ye,{children:t("transformers.parameters")}),u.jsx(xe,{variant:"outline",size:"sm",onClick:()=>{const _=b.options||{},E=`param${Object.keys(_).length+1}`;if(o!==null){const A={..._,[E]:""};if(o<h.length){const M=[...h];M[o].options=A,l({...a,transformers:M})}else m&&g({...m,options:A})}},children:u.jsx(Tc,{className:"h-4 w-4"})})]}),Object.entries(b.options||{}).map(([_,E])=>u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(He,{value:_,onChange:A=>{const z={...b.options||{}};if(delete z[_],z[A.target.value]=E,o!==null)if(o<h.length){const D=[...h];D[o].options=z,l({...a,transformers:D})}else m&&g({...m,options:z})},className:"flex-1"}),u.jsx(He,{value:E,onChange:A=>{o!==null&&S(o,"parameters",A.target.value,_)},className:"flex-1"}),u.jsx(xe,{variant:"outline",size:"icon",onClick:()=>{if(o!==null){const M={...b.options||{}};if(delete M[_],o<h.length){const z=[...h];z[o].options=M,l({...a,transformers:z})}else m&&g({...m,options:M})}},children:u.jsx($n,{className:"h-4 w-4"})})]},_))]})]}),u.jsxs(La,{children:[u.jsx(xe,{variant:"outline",onClick:C,children:t("app.cancel")}),u.jsx(xe,{onClick:j,children:t("app.save")})]})]})}),u.jsx(Da,{open:c!==null,onOpenChange:()=>f(null),children:u.jsxs(ca,{children:[u.jsxs(ua,{children:[u.jsx(da,{children:t("transformers.delete")}),u.jsx(Yc,{children:t("transformers.delete_transformer_confirm")})]}),u.jsxs(La,{children:[u.jsx(xe,{variant:"outline",onClick:()=>f(null),children:t("app.cancel")}),u.jsx(xe,{variant:"destructive",onClick:()=>c!==null&&x(c),children:t("app.delete")})]})]})})]})}function BT({providers:t,onEdit:a,onRemove:l}){return!t||!Array.isArray(t)?u.jsx("div",{className:"space-y-3",children:u.jsx("div",{className:"flex items-center justify-center rounded-md border bg-white p-8 text-gray-500",children:"No providers configured"})}):u.jsx("div",{className:"space-y-3",children:t.map((o,s)=>{if(!o)return u.jsxs("div",{className:"flex items-start justify-between rounded-md border bg-white p-4 transition-all hover:shadow-md animate-slide-in hover:scale-[1.01]",children:[u.jsxs("div",{className:"flex-1 space-y-1.5",children:[u.jsx("p",{className:"text-md font-semibold text-gray-800",children:"Invalid Provider"}),u.jsx("p",{className:"text-sm text-gray-500",children:"Provider data is missing"})]}),u.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[u.jsx(xe,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",disabled:!0,children:u.jsx(Ac,{className:"h-4 w-4"})}),u.jsx(xe,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:u.jsx($n,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s);const c=o.name||"Unnamed Provider",f=o.api_base_url||"No API URL",m=Array.isArray(o.models)?o.models:[];return u.jsxs("div",{className:"flex items-start justify-between rounded-md border bg-white p-4 transition-all hover:shadow-md animate-slide-in hover:scale-[1.01]",children:[u.jsxs("div",{className:"flex-1 space-y-1.5",children:[u.jsx("p",{className:"text-md font-semibold text-gray-800",children:c}),u.jsx("p",{className:"text-sm text-gray-500",children:f}),u.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:m.map((g,h)=>u.jsx(kn,{variant:"outline",className:"font-normal transition-all-ease hover:scale-105",children:g||"Unnamed Model"},h))})]}),u.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[u.jsx(xe,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",children:u.jsx(Ac,{className:"h-4 w-4"})}),u.jsx(xe,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:u.jsx($n,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s)})})}const $T=y.forwardRef(({options:t,value:a,onChange:l,onEnter:o,searchPlaceholder:s="Search...",emptyPlaceholder:c="No options found.",inputPlaceholder:f="Type or select..."},m)=>{const[g,h]=y.useState(!1),[v,x]=y.useState(a||""),S=y.useRef(null);y.useImperativeHandle(m,()=>S.current),y.useEffect(()=>{x(a||"")},[a]);const b=E=>{const A=E.target.value;x(A),l(A)},j=E=>{E.key==="Enter"&&v.trim()&&o&&(o(v.trim()),x(""))},C=E=>{x(E),l(E),o&&(o(E),x("")),h(!1)},_=()=>v;return y.useImperativeHandle(m,()=>({...S.current,value:v,getCurrentValue:_,clearInput:()=>{x(""),l("")}})),u.jsxs("div",{className:"relative",children:[u.jsx(He,{ref:S,value:v,onChange:b,onKeyDown:j,placeholder:f,className:"pr-10"}),u.jsxs(tu,{open:g,onOpenChange:h,children:[u.jsx(nu,{asChild:!0,children:u.jsx(xe,{variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",children:u.jsx(Hb,{className:"h-4 w-4 opacity-50"})})}),u.jsx(au,{className:"w-[--radix-popover-trigger-width] p-0 animate-fade-in",children:u.jsxs(y0,{children:[u.jsx(x0,{placeholder:s}),u.jsxs(b0,{children:[u.jsx(w0,{children:c}),u.jsx(S0,{children:t.map(E=>u.jsxs(j0,{value:E.value,onSelect:()=>C(E.value),className:"transition-all-ease hover:bg-accent hover:text-accent-foreground",children:[u.jsx(Ub,{className:it("mr-2 h-4 w-4 transition-opacity",a===E.value?"opacity-100":"opacity-0")}),E.label]},E.value))})]})]})})]})]})});function FT(){const{t}=zn(),{config:a,setConfig:l}=Ba(),[o,s]=y.useState(null),[c,f]=y.useState(null),[m,g]=y.useState({}),[h,v]=y.useState({}),[x,S]=y.useState({}),[b,j]=y.useState([]),[C,_]=y.useState(null),[E,A]=y.useState(!1),[M,z]=y.useState([]),[D,R]=y.useState({}),[P,B]=y.useState(null),[ne,re]=y.useState(null),[O,q]=y.useState(""),ee=y.useRef(null);if(y.useEffect(()=>{(async()=>{try{const de=await fetch("https://pub-0dc3e1677e894f07bbea11b17a29e032.r2.dev/providers.json");if(de.ok){const he=await de.json();z(he||[])}else console.error("Failed to fetch provider templates")}catch(de){console.error("Failed to fetch provider templates:",de)}})()},[]),y.useEffect(()=>{(async()=>{try{const de=await $t.get("/transformers");j(de.transformers)}catch(de){console.error("Failed to fetch transformers:",de)}})()},[]),!a)return u.jsxs(Dn,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[u.jsx(Vn,{className:"flex flex-row items-center justify-between border-b p-4",children:u.jsx(In,{className:"text-lg",children:t("providers.title")})}),u.jsx(Gn,{className:"flex-grow flex items-center justify-center p-4",children:u.jsx("div",{className:"text-gray-500",children:"Loading providers configuration..."})})]});const V=Array.isArray(a.Providers)?a.Providers:[],ae=()=>{const ue={name:"",api_base_url:"",api_key:"",models:[]};s(a.Providers.length),_(ue),A(!0),R(de=>({...de,[a.Providers.length]:!1})),B(null),re(null)},T=ue=>{const de=V.indexOf(bt[ue]),he=a.Providers[de];s(de),_(JSON.parse(JSON.stringify(he))),A(!1),R(ve=>({...ve,[de]:!1})),B(null),re(null)},Z=()=>{if(!C)return;if(!C.name||C.name.trim()===""){re(t("providers.name_required"));return}const ue=C.name.trim();if(a.Providers.some((he,ve)=>!E&&ve===o?!1:he.name.toLowerCase()===ue.toLowerCase())){re(t("providers.name_duplicate"));return}if(!C.api_key||C.api_key.trim()===""){B(t("providers.api_key_required"));return}if(B(null),re(null),o!==null&&C){const he=[...a.Providers];E?he.push(C):he[o]=C,l({...a,Providers:he})}o!==null&&R(he=>{const ve={...he};return delete ve[o],ve}),s(null),_(null),A(!1)},I=()=>{o!==null&&(g(ue=>{const de={...ue};return delete de[o],de}),R(ue=>{const de={...ue};return delete de[o],de})),s(null),_(null),A(!1),B(null),re(null)},be=ue=>{f(ue)},k=ue=>{const de=V.indexOf(bt[ue]),he=[...a.Providers];he.splice(de,1),l({...a,Providers:he}),f(null)},K=(ue,de,he)=>{if(C){const ve={...C,[de]:he};_(ve)}},$=(ue,de)=>{if(!de||!C)return;const he={...C};he.transformer||(he.transformer={use:[]}),he.transformer.use=[...he.transformer.use,de],_(he)},Q=(ue,de)=>{if(!C)return;const he={...C};if(he.transformer){const ve=[...he.transformer.use];ve.splice(de,1),he.transformer.use=ve,ve.length===0&&Object.keys(he.transformer).length===1&&delete he.transformer}_(he)},ie=(ue,de,he)=>{if(!he||!C)return;const ve={...C};ve.transformer||(ve.transformer={use:[]}),ve.transformer[de]||(ve.transformer[de]={use:[]}),ve.transformer[de].use=[...ve.transformer[de].use,he],_(ve)},me=(ue,de,he)=>{if(!C)return;const ve={...C};if(ve.transformer&&ve.transformer[de]){const Me=[...ve.transformer[de].use];Me.splice(he,1),ve.transformer[de].use=Me,Me.length===0&&Object.keys(ve.transformer[de]).length===1&&delete ve.transformer[de]}_(ve)},ge=(ue,de,he,ve)=>{if(!C)return;const Me={...C};if(Me.transformer||(Me.transformer={use:[]}),Me.transformer.use&&Me.transformer.use.length>de){const $e=Me.transformer.use[de];if(Array.isArray($e)){const qe=[...$e];if(qe.length>1&&typeof qe[1]=="object"&&qe[1]!==null){const Qt={...qe[1],[he]:ve};qe[1]=Qt}else if(qe.length>1){const lt={[he]:ve};qe.splice(1,qe.length-1,lt)}else{const lt={[he]:ve};qe.push(lt)}Me.transformer.use[de]=qe}else{const qe={[he]:ve};Me.transformer.use[de]=[$e,qe]}}_(Me)},we=(ue,de,he)=>{if(!C)return;const ve={...C};if(!ve.transformer?.use||ve.transformer.use.length<=de)return;const Me=ve.transformer.use[de];if(Array.isArray(Me)&&Me.length>1){const $e=[...Me];if(typeof $e[1]=="object"&&$e[1]!==null){const qe={...$e[1]};delete qe[he],Object.keys(qe).length===0?$e.splice(1,1):$e[1]=qe,ve.transformer.use[de]=$e,_(ve)}}},Ue=(ue,de,he,ve,Me)=>{if(!C)return;const $e={...C};if($e.transformer||($e.transformer={use:[]}),$e.transformer[de]||($e.transformer[de]={use:[]}),$e.transformer[de].use&&$e.transformer[de].use.length>he){const qe=$e.transformer[de].use[he];if(Array.isArray(qe)){const lt=[...qe];if(lt.length>1&&typeof lt[1]=="object"&&lt[1]!==null){const tl={...lt[1],[ve]:Me};lt[1]=tl}else if(lt.length>1){const Qt={[ve]:Me};lt.splice(1,lt.length-1,Qt)}else{const Qt={[ve]:Me};lt.push(Qt)}$e.transformer[de].use[he]=lt}else{const lt={[ve]:Me};$e.transformer[de].use[he]=[qe,lt]}}_($e)},le=(ue,de,he,ve)=>{if(!C)return;const Me={...C};if(!Me.transformer?.[de]?.use||Me.transformer[de].use.length<=he)return;const $e=Me.transformer[de].use[he];if(Array.isArray($e)&&$e.length>1){const qe=[...$e];if(typeof qe[1]=="object"&&qe[1]!==null){const lt={...qe[1]};delete lt[ve],Object.keys(lt).length===0?qe.splice(1,1):qe[1]=lt,Me.transformer[de].use[he]=qe,_(Me)}}},Se=(ue,de)=>{if(!de.trim()||!C)return;const he={...C},ve=Array.isArray(he.models)?[...he.models]:[];ve.includes(de.trim())||(ve.push(de.trim()),he.models=ve,_(he))},Be=ue=>{if(ue)try{const de=JSON.parse(ue);if(de){const he=C?.name,ve=JSON.parse(JSON.stringify(de));!E&&he&&(ve.name=he),_(ve)}}catch(de){console.error("Failed to parse template",de)}},rt=(ue,de)=>{if(!C)return;const he={...C},ve=Array.isArray(he.models)?[...he.models]:[];de>=0&&de<ve.length&&(ve.splice(de,1),he.models=ve,_(he))},Ee=C||(o!==null?V[o]:null),bt=V.filter(ue=>{if(!O)return!0;const de=O.toLowerCase();return ue.name&&ue.name.toLowerCase().includes(de)||ue.api_base_url&&ue.api_base_url.toLowerCase().includes(de)?!0:ue.models&&Array.isArray(ue.models)?ue.models.some(he=>he&&he.toLowerCase().includes(de)):!1});return u.jsxs(Dn,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[u.jsxs(Vn,{className:"flex flex-col border-b p-4 gap-3",children:[u.jsxs("div",{className:"flex flex-row items-center justify-between",children:[u.jsxs(In,{className:"text-lg",children:[t("providers.title")," ",u.jsxs("span",{className:"text-sm font-normal text-gray-500",children:["(",bt.length,"/",V.length,")"]})]}),u.jsx(xe,{onClick:ae,children:t("providers.add")})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("div",{className:"relative flex-1",children:[u.jsx($b,{className:"absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-500"}),u.jsx(He,{placeholder:t("providers.search"),value:O,onChange:ue=>q(ue.target.value),className:"pl-8"})]}),O&&u.jsx(xe,{variant:"ghost",size:"icon",onClick:()=>q(""),children:u.jsx(Bb,{className:"h-4 w-4"})})]})]}),u.jsx(Gn,{className:"flex-grow overflow-y-auto p-4",children:u.jsx(BT,{providers:bt,onEdit:T,onRemove:be})}),u.jsx(Da,{open:o!==null,onOpenChange:ue=>{ue||I()},children:u.jsxs(ca,{className:"max-h-[80vh] flex flex-col sm:max-w-2xl",children:[u.jsx(ua,{children:u.jsx(da,{children:t("providers.edit")})}),Ee&&o!==null&&u.jsxs("div",{className:"space-y-4 p-4 overflow-y-auto flex-grow",children:[M.length>0&&u.jsxs("div",{className:"space-y-2",children:[u.jsx(ye,{children:t("providers.import_from_template")}),u.jsx(Wl,{options:M.map(ue=>({label:ue.name,value:JSON.stringify(ue)})),value:"",onChange:Be,placeholder:t("providers.select_template"),emptyPlaceholder:t("providers.no_templates_found")})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(ye,{htmlFor:"name",children:t("providers.name")}),u.jsx(He,{id:"name",value:Ee.name||"",onChange:ue=>{K(o,"name",ue.target.value),ne&&re(null)},className:ne?"border-red-500":""}),ne&&u.jsx("p",{className:"text-sm text-red-500",children:ne})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(ye,{htmlFor:"api_base_url",children:t("providers.api_base_url")}),u.jsx(He,{id:"api_base_url",value:Ee.api_base_url||"",onChange:ue=>K(o,"api_base_url",ue.target.value)})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(ye,{htmlFor:"api_key",children:t("providers.api_key")}),u.jsxs("div",{className:"relative",children:[u.jsx(He,{id:"api_key",type:D[o||0]?"text":"password",value:Ee.api_key||"",onChange:ue=>K(o,"api_key",ue.target.value),className:P?"border-red-500":""}),u.jsx(xe,{type:"button",variant:"ghost",size:"icon",className:"absolute right-2 top-1/2 transform -translate-y-1/2 h-8 w-8",onClick:()=>{const ue=o||0;R(de=>({...de,[ue]:!de[ue]}))},children:D[o||0]?u.jsx(U_,{className:"h-4 w-4"}):u.jsx(H_,{className:"h-4 w-4"})})]}),P&&u.jsx("p",{className:"text-sm text-red-500",children:P})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(ye,{htmlFor:"models",children:t("providers.models")}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex gap-2",children:[u.jsx("div",{className:"flex-1",children:m[o]?u.jsx($T,{ref:ee,options:(Ee.models||[]).map(ue=>({label:ue,value:ue})),value:"",onChange:()=>{},onEnter:ue=>{o!==null&&Se(o,ue)},inputPlaceholder:t("providers.models_placeholder")}):u.jsx(He,{id:"models",placeholder:t("providers.models_placeholder"),onKeyDown:ue=>{ue.key==="Enter"&&ue.currentTarget.value.trim()&&o!==null&&(Se(o,ue.currentTarget.value),ue.currentTarget.value="")}})}),u.jsx(xe,{onClick:()=>{if(m[o]&&ee.current){const ue=ee.current,de=ue.getCurrentValue();de&&de.trim()&&o!==null&&(Se(o,de.trim()),ue.clearInput())}else{const ue=document.getElementById("models");ue&&ue.value.trim()&&o!==null&&(Se(o,ue.value),ue.value="")}},children:t("providers.add_model")})]}),u.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:(Ee.models||[]).map((ue,de)=>u.jsxs(kn,{variant:"outline",className:"font-normal flex items-center gap-1",children:[ue,u.jsx("button",{type:"button",className:"ml-1 rounded-full hover:bg-gray-200",onClick:()=>o!==null&&rt(o,de),children:u.jsx(ia,{className:"h-3 w-3"})})]},de))})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(ye,{children:t("providers.provider_transformer")}),u.jsx("div",{className:"flex gap-2",children:u.jsx(Wl,{options:b.map(ue=>({label:ue.name,value:ue.name})),value:"",onChange:ue=>{o!==null&&$(o,ue)},placeholder:t("providers.select_transformer"),emptyPlaceholder:t("providers.no_transformers")})}),Ee.transformer?.use&&Ee.transformer.use.length>0&&u.jsxs("div",{className:"space-y-2 mt-2",children:[u.jsx("div",{className:"text-sm font-medium text-gray-700",children:t("providers.selected_transformers")}),Ee.transformer.use.map((ue,de)=>u.jsxs("div",{className:"border rounded-md p-3",children:[u.jsxs("div",{className:"flex gap-2 items-center mb-2",children:[u.jsx("div",{className:"flex-1 bg-gray-50 rounded p-2 text-sm",children:typeof ue=="string"?ue:Array.isArray(ue)?String(ue[0]):String(ue)}),u.jsx(xe,{variant:"outline",size:"icon",onClick:()=>{o!==null&&Q(o,de)},children:u.jsx($n,{className:"h-4 w-4"})})]}),u.jsxs("div",{className:"mt-2 pl-4 border-l-2 border-gray-200",children:[u.jsx(ye,{className:"text-sm",children:t("providers.transformer_parameters")}),u.jsxs("div",{className:"space-y-2 mt-1",children:[u.jsxs("div",{className:"flex gap-2",children:[u.jsx(He,{placeholder:t("providers.parameter_name"),value:h[`provider-${o}-transformer-${de}`]?.name||"",onChange:he=>{const ve=`provider-${o}-transformer-${de}`;v(Me=>({...Me,[ve]:{...Me[ve]||{name:"",value:""},name:he.target.value}}))}}),u.jsx(He,{placeholder:t("providers.parameter_value"),value:h[`provider-${o}-transformer-${de}`]?.value||"",onChange:he=>{const ve=`provider-${o}-transformer-${de}`;v(Me=>({...Me,[ve]:{...Me[ve]||{name:"",value:""},value:he.target.value}}))}}),u.jsx(xe,{size:"sm",onClick:()=>{if(o!==null){const he=`provider-${o}-transformer-${de}`,ve=h[he];ve&&ve.name&&ve.value&&(ge(o,de,ve.name,ve.value),v(Me=>({...Me,[he]:{name:"",value:""}})))}},children:u.jsx(Tc,{className:"h-4 w-4"})})]}),(()=>{if(!Ee.transformer?.use||Ee.transformer.use.length<=de)return null;const he=Ee.transformer.use[de];let ve={};return Array.isArray(he)&&he.length>1&&typeof he[1]=="object"&&he[1]!==null&&(ve=he[1]),Object.keys(ve).length>0?u.jsx("div",{className:"space-y-1",children:Object.entries(ve).map(([Me,$e])=>u.jsxs("div",{className:"flex items-center justify-between bg-gray-50 rounded p-2",children:[u.jsxs("div",{className:"text-sm",children:[u.jsxs("span",{className:"font-medium",children:[Me,":"]})," ",String($e)]}),u.jsx(xe,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>{o!==null&&we(o,de,Me)},children:u.jsx(ia,{className:"h-3 w-3"})})]},Me))}):null})()]})]})]},de))]})]}),Ee.models&&Ee.models.length>0&&u.jsxs("div",{className:"space-y-2",children:[u.jsx(ye,{children:t("providers.model_transformers")}),u.jsx("div",{className:"space-y-3",children:(Ee.models||[]).map((ue,de)=>u.jsxs("div",{className:"border rounded-md p-3",children:[u.jsx("div",{className:"font-medium text-sm mb-2",children:ue}),u.jsx("div",{className:"flex gap-2",children:u.jsx("div",{className:"flex-1 flex gap-2",children:u.jsx(Wl,{options:b.map(he=>({label:he.name,value:he.name})),value:"",onChange:he=>{o!==null&&ie(o,ue,he)},placeholder:t("providers.select_transformer"),emptyPlaceholder:t("providers.no_transformers")})})}),Ee.transformer?.[ue]?.use&&Ee.transformer[ue].use.length>0&&u.jsxs("div",{className:"space-y-2 mt-2",children:[u.jsx("div",{className:"text-sm font-medium text-gray-700",children:t("providers.selected_transformers")}),Ee.transformer[ue].use.map((he,ve)=>u.jsxs("div",{className:"border rounded-md p-3",children:[u.jsxs("div",{className:"flex gap-2 items-center mb-2",children:[u.jsx("div",{className:"flex-1 bg-gray-50 rounded p-2 text-sm",children:typeof he=="string"?he:Array.isArray(he)?String(he[0]):String(he)}),u.jsx(xe,{variant:"outline",size:"icon",onClick:()=>{o!==null&&me(o,ue,ve)},children:u.jsx($n,{className:"h-4 w-4"})})]}),u.jsxs("div",{className:"mt-2 pl-4 border-l-2 border-gray-200",children:[u.jsx(ye,{className:"text-sm",children:t("providers.transformer_parameters")}),u.jsxs("div",{className:"space-y-2 mt-1",children:[u.jsxs("div",{className:"flex gap-2",children:[u.jsx(He,{placeholder:t("providers.parameter_name"),value:x[`model-${o}-${ue}-transformer-${ve}`]?.name||"",onChange:Me=>{const $e=`model-${o}-${ue}-transformer-${ve}`;S(qe=>({...qe,[$e]:{...qe[$e]||{name:"",value:""},name:Me.target.value}}))}}),u.jsx(He,{placeholder:t("providers.parameter_value"),value:x[`model-${o}-${ue}-transformer-${ve}`]?.value||"",onChange:Me=>{const $e=`model-${o}-${ue}-transformer-${ve}`;S(qe=>({...qe,[$e]:{...qe[$e]||{name:"",value:""},value:Me.target.value}}))}}),u.jsx(xe,{size:"sm",onClick:()=>{if(o!==null){const Me=`model-${o}-${ue}-transformer-${ve}`,$e=x[Me];$e&&$e.name&&$e.value&&(Ue(o,ue,ve,$e.name,$e.value),S(qe=>({...qe,[Me]:{name:"",value:""}})))}},children:u.jsx(Tc,{className:"h-4 w-4"})})]}),(()=>{if(!Ee.transformer?.[ue]?.use||Ee.transformer[ue].use.length<=ve)return null;const Me=Ee.transformer[ue].use[ve];let $e={};return Array.isArray(Me)&&Me.length>1&&typeof Me[1]=="object"&&Me[1]!==null&&($e=Me[1]),Object.keys($e).length>0?u.jsx("div",{className:"space-y-1",children:Object.entries($e).map(([qe,lt])=>u.jsxs("div",{className:"flex items-center justify-between bg-gray-50 rounded p-2",children:[u.jsxs("div",{className:"text-sm",children:[u.jsxs("span",{className:"font-medium",children:[qe,":"]})," ",String(lt)]}),u.jsx(xe,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>{o!==null&&le(o,ue,ve,qe)},children:u.jsx(ia,{className:"h-3 w-3"})})]},qe))}):null})()]})]})]},ve))]})]},de))})]})]}),u.jsx("div",{className:"space-y-3 mt-auto",children:u.jsx("div",{className:"flex justify-end gap-2",children:u.jsx(xe,{onClick:Z,children:t("app.save")})})})]})}),u.jsx(Da,{open:c!==null,onOpenChange:()=>f(null),children:u.jsxs(ca,{children:[u.jsxs(ua,{children:[u.jsx(da,{children:t("providers.delete")}),u.jsx(Yc,{children:t("providers.delete_provider_confirm")})]}),u.jsxs(La,{children:[u.jsx(xe,{variant:"outline",onClick:()=>f(null),children:t("providers.cancel")}),u.jsx(xe,{variant:"destructive",onClick:()=>c!==null&&k(c),children:t("providers.delete")})]})]})})]})}function $f(t,a,{checkForDefaultPrevented:l=!0}={}){return function(s){if(t?.(s),l===!1||!s.defaultPrevented)return a?.(s)}}function eo(t,a,{checkForDefaultPrevented:l=!0}={}){return function(s){if(t?.(s),l===!1||!s.defaultPrevented)return a?.(s)}}function qT(t){const a=t+"CollectionProvider",[l,o]=br(a),[s,c]=l(a,{collectionRef:{current:null},itemMap:new Map}),f=C=>{const{scope:_,children:E}=C,A=ot.useRef(null),M=ot.useRef(new Map).current;return u.jsx(s,{scope:_,itemMap:M,collectionRef:A,children:E})};f.displayName=a;const m=t+"CollectionSlot",g=to(m),h=ot.forwardRef((C,_)=>{const{scope:E,children:A}=C,M=c(m,E),z=Ut(_,M.collectionRef);return u.jsx(g,{ref:z,children:A})});h.displayName=m;const v=t+"CollectionItemSlot",x="data-radix-collection-item",S=to(v),b=ot.forwardRef((C,_)=>{const{scope:E,children:A,...M}=C,z=ot.useRef(null),D=Ut(_,z),R=c(v,E);return ot.useEffect(()=>(R.itemMap.set(z,{ref:z,...M}),()=>void R.itemMap.delete(z))),u.jsx(S,{[x]:"",ref:D,children:A})});b.displayName=v;function j(C){const _=c(t+"CollectionConsumer",C);return ot.useCallback(()=>{const A=_.collectionRef.current;if(!A)return[];const M=Array.from(A.querySelectorAll(`[${x}]`));return Array.from(_.itemMap.values()).sort((R,P)=>M.indexOf(R.ref.current)-M.indexOf(P.ref.current))},[_.collectionRef,_.itemMap])}return[{Provider:f,Slot:h,ItemSlot:b},j,o]}var VT=y.createContext(void 0);function u1(t){const a=y.useContext(VT);return t||a||"ltr"}var Ff="rovingFocusGroup.onEntryFocus",IT={bubbles:!1,cancelable:!0},Ui="RovingFocusGroup",[vh,d1,GT]=qT(Ui),[YT,f1]=br(Ui,[GT]),[KT,XT]=YT(Ui),h1=y.forwardRef((t,a)=>u.jsx(vh.Provider,{scope:t.__scopeRovingFocusGroup,children:u.jsx(vh.Slot,{scope:t.__scopeRovingFocusGroup,children:u.jsx(QT,{...t,ref:a})})}));h1.displayName=Ui;var QT=y.forwardRef((t,a)=>{const{__scopeRovingFocusGroup:l,orientation:o,loop:s=!1,dir:c,currentTabStopId:f,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:g,onEntryFocus:h,preventScrollOnEntryFocus:v=!1,...x}=t,S=y.useRef(null),b=Ut(a,S),j=u1(c),[C,_]=oo({prop:f,defaultProp:m??null,onChange:g,caller:Ui}),[E,A]=y.useState(!1),M=Qr(h),z=d1(l),D=y.useRef(!1),[R,P]=y.useState(0);return y.useEffect(()=>{const B=S.current;if(B)return B.addEventListener(Ff,M),()=>B.removeEventListener(Ff,M)},[M]),u.jsx(KT,{scope:l,orientation:o,dir:j,loop:s,currentTabStopId:C,onItemFocus:y.useCallback(B=>_(B),[_]),onItemShiftTab:y.useCallback(()=>A(!0),[]),onFocusableItemAdd:y.useCallback(()=>P(B=>B+1),[]),onFocusableItemRemove:y.useCallback(()=>P(B=>B-1),[]),children:u.jsx(nt.div,{tabIndex:E||R===0?-1:0,"data-orientation":o,...x,ref:b,style:{outline:"none",...t.style},onMouseDown:eo(t.onMouseDown,()=>{D.current=!0}),onFocus:eo(t.onFocus,B=>{const ne=!D.current;if(B.target===B.currentTarget&&ne&&!E){const re=new CustomEvent(Ff,IT);if(B.currentTarget.dispatchEvent(re),!re.defaultPrevented){const O=z().filter(T=>T.focusable),q=O.find(T=>T.active),ee=O.find(T=>T.id===C),ae=[q,ee,...O].filter(Boolean).map(T=>T.ref.current);g1(ae,v)}}D.current=!1}),onBlur:eo(t.onBlur,()=>A(!1))})})}),m1="RovingFocusGroupItem",p1=y.forwardRef((t,a)=>{const{__scopeRovingFocusGroup:l,focusable:o=!0,active:s=!1,tabStopId:c,children:f,...m}=t,g=yn(),h=c||g,v=XT(m1,l),x=v.currentTabStopId===h,S=d1(l),{onFocusableItemAdd:b,onFocusableItemRemove:j,currentTabStopId:C}=v;return y.useEffect(()=>{if(o)return b(),()=>j()},[o,b,j]),u.jsx(vh.ItemSlot,{scope:l,id:h,focusable:o,active:s,children:u.jsx(nt.span,{tabIndex:x?0:-1,"data-orientation":v.orientation,...m,ref:a,onMouseDown:eo(t.onMouseDown,_=>{o?v.onItemFocus(h):_.preventDefault()}),onFocus:eo(t.onFocus,()=>v.onItemFocus(h)),onKeyDown:eo(t.onKeyDown,_=>{if(_.key==="Tab"&&_.shiftKey){v.onItemShiftTab();return}if(_.target!==_.currentTarget)return;const E=WT(_,v.orientation,v.dir);if(E!==void 0){if(_.metaKey||_.ctrlKey||_.altKey||_.shiftKey)return;_.preventDefault();let M=S().filter(z=>z.focusable).map(z=>z.ref.current);if(E==="last")M.reverse();else if(E==="prev"||E==="next"){E==="prev"&&M.reverse();const z=M.indexOf(_.currentTarget);M=v.loop?eM(M,z+1):M.slice(z+1)}setTimeout(()=>g1(M))}}),children:typeof f=="function"?f({isCurrentTabStop:x,hasTabStop:C!=null}):f})})});p1.displayName=m1;var ZT={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function JT(t,a){return a!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function WT(t,a,l){const o=JT(t.key,l);if(!(a==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(a==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return ZT[o]}function g1(t,a=!1){const l=document.activeElement;for(const o of t)if(o===l||(o.focus({preventScroll:a}),document.activeElement!==l))return}function eM(t,a){return t.map((l,o)=>t[(a+o)%t.length])}var tM=h1,nM=p1;function aM(t,a){return y.useReducer((l,o)=>a[l][o]??l,t)}var v1=t=>{const{present:a,children:l}=t,o=rM(a),s=typeof l=="function"?l({present:o.isPresent}):y.Children.only(l),c=Ut(o.ref,lM(s));return typeof l=="function"||o.isPresent?y.cloneElement(s,{ref:c}):null};v1.displayName="Presence";function rM(t){const[a,l]=y.useState(),o=y.useRef(null),s=y.useRef(t),c=y.useRef("none"),f=t?"mounted":"unmounted",[m,g]=aM(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const h=dc(o.current);c.current=m==="mounted"?h:"none"},[m]),bn(()=>{const h=o.current,v=s.current;if(v!==t){const S=c.current,b=dc(h);t?g("MOUNT"):b==="none"||h?.display==="none"?g("UNMOUNT"):g(v&&S!==b?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,g]),bn(()=>{if(a){let h;const v=a.ownerDocument.defaultView??window,x=b=>{const C=dc(o.current).includes(CSS.escape(b.animationName));if(b.target===a&&C&&(g("ANIMATION_END"),!s.current)){const _=a.style.animationFillMode;a.style.animationFillMode="forwards",h=v.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=_)})}},S=b=>{b.target===a&&(c.current=dc(o.current))};return a.addEventListener("animationstart",S),a.addEventListener("animationcancel",x),a.addEventListener("animationend",x),()=>{v.clearTimeout(h),a.removeEventListener("animationstart",S),a.removeEventListener("animationcancel",x),a.removeEventListener("animationend",x)}}else g("ANIMATION_END")},[a,g]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:y.useCallback(h=>{o.current=h?getComputedStyle(h):null,l(h)},[])}}function dc(t){return t?.animationName||"none"}function lM(t){let a=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,l=a&&"isReactWarning"in a&&a.isReactWarning;return l?t.ref:(a=Object.getOwnPropertyDescriptor(t,"ref")?.get,l=a&&"isReactWarning"in a&&a.isReactWarning,l?t.props.ref:t.props.ref||t.ref)}var lu="Tabs",[oM,Yk]=br(lu,[f1]),y1=f1(),[iM,Zh]=oM(lu),x1=y.forwardRef((t,a)=>{const{__scopeTabs:l,value:o,onValueChange:s,defaultValue:c,orientation:f="horizontal",dir:m,activationMode:g="automatic",...h}=t,v=u1(m),[x,S]=oo({prop:o,onChange:s,defaultProp:c??"",caller:lu});return u.jsx(iM,{scope:l,baseId:yn(),value:x,onValueChange:S,orientation:f,dir:v,activationMode:g,children:u.jsx(nt.div,{dir:v,"data-orientation":f,...h,ref:a})})});x1.displayName=lu;var b1="TabsList",w1=y.forwardRef((t,a)=>{const{__scopeTabs:l,loop:o=!0,...s}=t,c=Zh(b1,l),f=y1(l);return u.jsx(tM,{asChild:!0,...f,orientation:c.orientation,dir:c.dir,loop:o,children:u.jsx(nt.div,{role:"tablist","aria-orientation":c.orientation,...s,ref:a})})});w1.displayName=b1;var S1="TabsTrigger",j1=y.forwardRef((t,a)=>{const{__scopeTabs:l,value:o,disabled:s=!1,...c}=t,f=Zh(S1,l),m=y1(l),g=E1(f.baseId,o),h=_1(f.baseId,o),v=o===f.value;return u.jsx(nM,{asChild:!0,...m,focusable:!s,active:v,children:u.jsx(nt.button,{type:"button",role:"tab","aria-selected":v,"aria-controls":h,"data-state":v?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:g,...c,ref:a,onMouseDown:$f(t.onMouseDown,x=>{!s&&x.button===0&&x.ctrlKey===!1?f.onValueChange(o):x.preventDefault()}),onKeyDown:$f(t.onKeyDown,x=>{[" ","Enter"].includes(x.key)&&f.onValueChange(o)}),onFocus:$f(t.onFocus,()=>{const x=f.activationMode!=="manual";!v&&!s&&x&&f.onValueChange(o)})})})});j1.displayName=S1;var N1="TabsContent",C1=y.forwardRef((t,a)=>{const{__scopeTabs:l,value:o,forceMount:s,children:c,...f}=t,m=Zh(N1,l),g=E1(m.baseId,o),h=_1(m.baseId,o),v=o===m.value,x=y.useRef(v);return y.useEffect(()=>{const S=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(S)},[]),u.jsx(v1,{present:s||v,children:({present:S})=>u.jsx(nt.div,{"data-state":v?"active":"inactive","data-orientation":m.orientation,role:"tabpanel","aria-labelledby":g,hidden:!S,id:h,tabIndex:0,...f,ref:a,style:{...t.style,animationDuration:x.current?"0s":void 0},children:S&&c})})});C1.displayName=N1;function E1(t,a){return`${t}-trigger-${a}`}function _1(t,a){return`${t}-content-${a}`}var sM=x1,R1=w1,O1=j1,A1=C1;const hx=sM,yh=y.forwardRef(({className:t,...a},l)=>u.jsx(R1,{ref:l,className:it("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t),...a}));yh.displayName=R1.displayName;const yi=y.forwardRef(({className:t,...a},l)=>u.jsx(O1,{ref:l,className:it("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",t),...a}));yi.displayName=O1.displayName;const xi=y.forwardRef(({className:t,...a},l)=>u.jsx(A1,{ref:l,className:it("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...a}));xi.displayName=A1.displayName;const cM=Kc("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),T1=y.forwardRef(({className:t,variant:a,...l},o)=>u.jsx("div",{ref:o,role:"alert",className:it(cM({variant:a}),t),...l}));T1.displayName="Alert";const uM=y.forwardRef(({className:t,...a},l)=>u.jsx("h5",{ref:l,className:it("mb-1 font-medium leading-none tracking-tight",t),...a}));uM.displayName="AlertTitle";const M1=y.forwardRef(({className:t,...a},l)=>u.jsx("div",{ref:l,className:it("text-sm [&_p]:leading-relaxed",t),...a}));M1.displayName="AlertDescription";function k1(t){return t?.Router?.engine==="unified"||t?.engine==="unified"}function dM(t){const a=[];return t.longContext&&a.push({name:"longContext",priority:100,enabled:!0,condition:{type:"tokenThreshold",value:t.longContextThreshold||6e4,operator:"gt"},action:{route:t.longContext,transformers:[],description:"长上下文路由:基于token阈值选择模型"}}),a.push({name:"subagent",priority:90,enabled:!0,condition:{type:"fieldExists",field:"system.1.text",operator:"contains"},action:{route:"${subagent}",transformers:[],description:"子代理路由:通过特殊标记选择模型"}}),t.background&&a.push({name:"background",priority:80,enabled:!0,condition:{type:"modelContains",value:"haiku",operator:"contains"},action:{route:t.background,transformers:[],description:"后台路由:Haiku模型自动使用轻量级模型"}}),t.webSearch&&a.push({name:"webSearch",priority:70,enabled:!0,condition:{type:"toolExists",value:"web_search",operator:"exists"},action:{route:t.webSearch,transformers:[],description:"网络搜索路由:检测到web_search工具时使用特定模型"}}),t.think&&a.push({name:"thinking",priority:60,enabled:!0,condition:{type:"fieldExists",field:"thinking",operator:"exists"},action:{route:t.think,transformers:[],description:"思考模式路由:检测thinking参数时使用特定模型"}}),a.push({name:"directMapping",priority:50,enabled:!0,condition:{type:"custom",customFunction:"directModelMapping"},action:{route:"${mappedModel}",transformers:[],description:"代号映射:将provider作为代号,映射到对应的model模型"}}),a.push({name:"userSpecified",priority:40,enabled:!0,condition:{type:"custom",customFunction:"modelContainsComma"},action:{route:"${userModel}",transformers:[],description:"用户指定路由:用户在请求中直接指定provider,model格式"}}),{engine:"unified",defaultRoute:t.default||"",rules:a,cache:{enabled:!0,maxSize:1e3,ttl:3e5},debug:{enabled:!1,logLevel:"info",logToFile:!0,logToConsole:!0},contextThreshold:{default:1e3,longContext:t.longContextThreshold||6e4}}}function fM(t){return{longContext:"长上下文",subagent:"子代理",background:"后台模型",webSearch:"网络搜索",thinking:"思考模式",directMapping:"代号映射",userSpecified:"用户指定"}[t]||t}function Jh(t){const[a,l]=y.useState(null);return y.useEffect(()=>{if(!t){l(null);return}const o=k1(t.Router);let s;o?s=t.Router:s=dM(t.Router),l({isUnified:o,routerConfig:s,providers:t.Providers||[],...t})},[t]),a}function hM(t,a){return o=>{if(!t)return;const s={...t};o.routerConfig&&(s.Router=o.routerConfig),o.providers&&(s.Providers=o.providers),Object.keys(o).forEach(c=>{["isUnified","routerConfig","providers"].includes(c)||(s[c]=o[c])}),a(s)}}function mM(t,a,{checkForDefaultPrevented:l=!0}={}){return function(s){if(t?.(s),l===!1||!s.defaultPrevented)return a?.(s)}}function pM(t,a){return y.useReducer((l,o)=>a[l][o]??l,t)}var D1=t=>{const{present:a,children:l}=t,o=gM(a),s=typeof l=="function"?l({present:o.isPresent}):y.Children.only(l),c=Ut(o.ref,vM(s));return typeof l=="function"||o.isPresent?y.cloneElement(s,{ref:c}):null};D1.displayName="Presence";function gM(t){const[a,l]=y.useState(),o=y.useRef(null),s=y.useRef(t),c=y.useRef("none"),f=t?"mounted":"unmounted",[m,g]=pM(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const h=fc(o.current);c.current=m==="mounted"?h:"none"},[m]),bn(()=>{const h=o.current,v=s.current;if(v!==t){const S=c.current,b=fc(h);t?g("MOUNT"):b==="none"||h?.display==="none"?g("UNMOUNT"):g(v&&S!==b?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,g]),bn(()=>{if(a){let h;const v=a.ownerDocument.defaultView??window,x=b=>{const C=fc(o.current).includes(CSS.escape(b.animationName));if(b.target===a&&C&&(g("ANIMATION_END"),!s.current)){const _=a.style.animationFillMode;a.style.animationFillMode="forwards",h=v.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=_)})}},S=b=>{b.target===a&&(c.current=fc(o.current))};return a.addEventListener("animationstart",S),a.addEventListener("animationcancel",x),a.addEventListener("animationend",x),()=>{v.clearTimeout(h),a.removeEventListener("animationstart",S),a.removeEventListener("animationcancel",x),a.removeEventListener("animationend",x)}}else g("ANIMATION_END")},[a,g]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:y.useCallback(h=>{o.current=h?getComputedStyle(h):null,l(h)},[])}}function fc(t){return t?.animationName||"none"}function vM(t){let a=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,l=a&&"isReactWarning"in a&&a.isReactWarning;return l?t.ref:(a=Object.getOwnPropertyDescriptor(t,"ref")?.get,l=a&&"isReactWarning"in a&&a.isReactWarning,l?t.props.ref:t.props.ref||t.ref)}var ou="Collapsible",[yM,Kk]=br(ou),[xM,Wh]=yM(ou),L1=y.forwardRef((t,a)=>{const{__scopeCollapsible:l,open:o,defaultOpen:s,disabled:c,onOpenChange:f,...m}=t,[g,h]=oo({prop:o,defaultProp:s??!1,onChange:f,caller:ou});return u.jsx(xM,{scope:l,disabled:c,contentId:yn(),open:g,onOpenToggle:y.useCallback(()=>h(v=>!v),[h]),children:u.jsx(nt.div,{"data-state":tm(g),"data-disabled":c?"":void 0,...m,ref:a})})});L1.displayName=ou;var z1="CollapsibleTrigger",U1=y.forwardRef((t,a)=>{const{__scopeCollapsible:l,...o}=t,s=Wh(z1,l);return u.jsx(nt.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":tm(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...o,ref:a,onClick:mM(t.onClick,s.onOpenToggle)})});U1.displayName=z1;var em="CollapsibleContent",P1=y.forwardRef((t,a)=>{const{forceMount:l,...o}=t,s=Wh(em,t.__scopeCollapsible);return u.jsx(D1,{present:l||s.open,children:({present:c})=>u.jsx(bM,{...o,ref:a,present:c})})});P1.displayName=em;var bM=y.forwardRef((t,a)=>{const{__scopeCollapsible:l,present:o,children:s,...c}=t,f=Wh(em,l),[m,g]=y.useState(o),h=y.useRef(null),v=Ut(a,h),x=y.useRef(0),S=x.current,b=y.useRef(0),j=b.current,C=f.open||m,_=y.useRef(C),E=y.useRef(void 0);return y.useEffect(()=>{const A=requestAnimationFrame(()=>_.current=!1);return()=>cancelAnimationFrame(A)},[]),bn(()=>{const A=h.current;if(A){E.current=E.current||{transitionDuration:A.style.transitionDuration,animationName:A.style.animationName},A.style.transitionDuration="0s",A.style.animationName="none";const M=A.getBoundingClientRect();x.current=M.height,b.current=M.width,_.current||(A.style.transitionDuration=E.current.transitionDuration,A.style.animationName=E.current.animationName),g(o)}},[f.open,o]),u.jsx(nt.div,{"data-state":tm(f.open),"data-disabled":f.disabled?"":void 0,id:f.contentId,hidden:!C,...c,ref:v,style:{"--radix-collapsible-content-height":S?`${S}px`:void 0,"--radix-collapsible-content-width":j?`${j}px`:void 0,...t.style},children:C&&s})});function tm(t){return t?"open":"closed"}var wM=L1;const SM=wM,jM=U1,NM=P1,mx=[{value:"${userModel}",label:"用户指定模型",description:"使用用户请求中原始指定的模型"},{value:"${subagent}",label:"子代理模型",description:"从系统消息中提取的子代理模型"},{value:"${mappedModel}",label:"映射模型",description:"将提供商代号映射到具体模型"}];function hc({value:t,onChange:a,modelOptions:l,readOnly:o=!1,placeholder:s="选择或输入路由目标"}){const[c,f]=y.useState(!1),[m,g]=y.useState(t),h=y.useRef(null);y.useEffect(()=>{g(t)},[t]);const v=j=>{const C=j.target.value;g(C),a(C)},x=j=>{g(j.value),a(j.value),f(!1)},S=j=>{g(j.value),a(j.value),f(!1)};y.useEffect(()=>{const j=C=>{h.current&&!h.current.contains(C.target)&&f(!1)};return document.addEventListener("mousedown",j),()=>{document.removeEventListener("mousedown",j)}},[]);const b=j=>{if(!j)return s;const C=mx.find(E=>E.value===j);if(C)return`${C.label} (${C.value})`;const _=l.find(E=>E.value===j);return _?_.label:j};return o?u.jsx("div",{className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background",children:b(t)}):u.jsxs("div",{ref:h,className:"relative",children:[u.jsxs("div",{className:"relative",children:[u.jsx(He,{value:m,onChange:v,placeholder:s,className:"pr-10",onFocus:()=>f(!0)}),u.jsx(xe,{type:"button",variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",onClick:()=>f(!c),children:c?u.jsx(w_,{className:"h-4 w-4"}):u.jsx(Pb,{className:"h-4 w-4"})})]}),c&&u.jsxs("div",{className:"absolute z-50 w-full mt-1 bg-white border border-gray-200 rounded-md shadow-lg max-h-80 overflow-y-auto",children:[u.jsxs("div",{className:"p-2",children:[u.jsx("div",{className:"text-xs font-medium text-gray-500 mb-2",children:"预设变量"}),mx.map(j=>u.jsxs("div",{className:"px-3 py-2 hover:bg-gray-100 cursor-pointer rounded",onClick:()=>x(j),children:[u.jsx("div",{className:"font-medium text-sm",children:j.label}),u.jsx("div",{className:"text-xs text-gray-500",children:j.description}),u.jsx("div",{className:"text-xs text-blue-600 mt-1 font-mono",children:j.value})]},j.value))]}),u.jsx("div",{className:"border-t border-gray-200"}),u.jsxs("div",{className:"p-2",children:[u.jsx("div",{className:"text-xs font-medium text-gray-500 mb-2",children:"可用模型"}),l.length>0?l.map(j=>u.jsx("div",{className:"px-3 py-2 hover:bg-gray-100 cursor-pointer rounded",onClick:()=>S(j),children:u.jsx("div",{className:"text-sm",children:j.label})},j.value)):u.jsx("div",{className:"px-3 py-2 text-xs text-gray-500",children:"暂无可用模型"})]})]})]})}function CM(){const{t}=zn(),{config:a,setConfig:l}=Ba(),o=Jh(a),s=hM(a,l),[c,f]=y.useState(new Set),[m,g]=y.useState(!1),[h,v]=y.useState(!1),[x,S]=y.useState(null),[b,j]=y.useState({name:"",priority:10,enabled:!0,condition:{type:"fieldExists",field:"",operator:"exists"},action:{route:"",transformers:[],description:""}}),C=O=>{if(!o)return;const q=o.routerConfig;s({routerConfig:{...q,defaultRoute:O}})},_=(O,q)=>{if(!o)return;const ee=o.routerConfig,V=ee.rules.map(ae=>ae.name===O?{...ae,enabled:q}:ae);s({routerConfig:{...ee,rules:V}})},E=(O,q)=>{if(!o)return;const ee=o.routerConfig,V=ee.rules.map(ae=>ae.name===O?{...ae,action:{...ae.action,route:q}}:ae);s({routerConfig:{...ee,rules:V}})},A=O=>{const q=new Set(c);q.has(O)?q.delete(O):q.add(O),f(q)},M=()=>{if(!o)return;const O=o.routerConfig;if(!b.name||!b.action?.route)return;const q={name:b.name,priority:b.priority||10,enabled:b.enabled!==!1,condition:b.condition,action:{route:b.action.route,transformers:b.action.transformers||[],description:b.action.description||""}};s({routerConfig:{...O,rules:[...O.rules,q]}}),j({name:"",priority:10,enabled:!0,condition:{type:"fieldExists",field:"",operator:"exists"},action:{route:"",transformers:[],description:""}}),g(!1)},z=O=>{S(O),j(O),v(!0)},D=()=>{if(!o||!x)return;const O=o.routerConfig;if(!b.name||!b.action?.route)return;const q=O.rules.map(ee=>ee.name===x.name?{name:b.name,priority:b.priority||10,enabled:b.enabled!==!1,condition:b.condition,action:{route:b.action.route,transformers:b.action.transformers||[],description:b.action.description||""}}:ee);s({routerConfig:{...O,rules:q}}),v(!1),S(null),j({name:"",priority:10,enabled:!0,condition:{type:"fieldExists",field:"",operator:"exists"},action:{route:"",transformers:[],description:""}})},R=O=>{if(!o)return;const q=o.routerConfig,ee=q.rules.filter(V=>V.name!==O);s({routerConfig:{...q,rules:ee}})},P=()=>{g(!1),v(!1),S(null),j({name:"",priority:10,enabled:!0,condition:{type:"fieldExists",field:"",operator:"exists"},action:{route:"",transformers:[],description:""}})};if(!o)return u.jsxs(Dn,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[u.jsx(Vn,{className:"border-b p-4",children:u.jsx(In,{className:"text-lg",children:t("router.unifiedTitle")})}),u.jsx(Gn,{className:"flex-grow flex items-center justify-center p-4",children:u.jsx("div",{className:"text-gray-500",children:"Loading router configuration..."})})]});const B=o.routerConfig,re=o.providers.flatMap(O=>{if(!O||!O.models)return[];const q=O.name||"Unknown Provider",ee=[];return ee.push({value:q,label:`${q} (模型自动选择)`}),O.models.forEach(V=>{ee.push({value:`${q},${V}`,label:`${q}, ${V}`})}),ee});return u.jsxs(Dn,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[u.jsxs(Vn,{className:"border-b p-4",children:[u.jsx(In,{className:"text-lg",children:t("router.unifiedTitle")}),u.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[u.jsx(kn,{variant:"secondary",children:"Unified Router Engine"}),u.jsxs("span",{className:"text-sm text-gray-500",children:[B.rules.length," rules loaded"]})]})]}),u.jsxs(Gn,{className:"flex-grow space-y-5 overflow-y-auto p-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(ye,{children:t("router.defaultRoute")}),u.jsx(hc,{value:B.defaultRoute,onChange:C,modelOptions:re,placeholder:"选择默认路由目标"})]}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx(ye,{className:"text-base font-medium",children:"路由规则"}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs(kn,{variant:"outline",children:[B.rules.length," rules"]}),u.jsxs(xe,{size:"sm",onClick:()=>g(!0),className:"h-8",children:[u.jsx(Tc,{className:"mr-1 h-4 w-4"}),"添加规则"]})]})]}),u.jsx("div",{className:"space-y-3",children:B.rules.map((O,q)=>{const ee=c.has(O.name);return u.jsx(Dn,{className:"border border-gray-200",children:u.jsxs(SM,{children:[u.jsx(jM,{className:"w-full",onClick:()=>A(O.name),children:u.jsxs("div",{className:"flex items-center justify-between p-3 hover:bg-gray-50",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[ee?u.jsx(Pb,{className:"h-4 w-4"}):u.jsx(x_,{className:"h-4 w-4"}),u.jsxs("div",{className:"text-left",children:[u.jsx("div",{className:"font-medium text-sm",children:fM(O.name)}),u.jsxs("div",{className:"text-xs text-gray-500",children:["Priority: ",O.priority||0," | Route:"," ",O.action.route]}),O.action.description&&u.jsx("div",{className:"text-xs text-blue-600 mt-1",children:O.action.description})]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Zl,{checked:O.enabled!==!1,onCheckedChange:V=>{_(O.name,V)}}),u.jsx(kn,{variant:O.enabled!==!1?"default":"secondary",children:O.enabled!==!1?"Enabled":"Disabled"}),u.jsx(xe,{variant:"ghost",size:"sm",onClick:()=>z(O),className:"h-8 w-8 p-0",children:u.jsx(iR,{className:"h-4 w-4"})}),u.jsx(xe,{variant:"ghost",size:"sm",onClick:()=>R(O.name),className:"h-8 w-8 p-0 text-red-500 hover:text-red-700",children:u.jsx($n,{className:"h-4 w-4"})})]})]})}),u.jsx(NM,{children:u.jsxs("div",{className:"px-3 pb-3 space-y-3 border-t pt-3",children:[u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx(ye,{className:"text-xs",children:"条件类型"}),u.jsx("div",{className:"text-sm text-gray-700 mt-1",children:O.condition.type})]}),u.jsxs("div",{children:[u.jsx(ye,{className:"text-xs",children:"优先级"}),u.jsx("div",{className:"text-sm text-gray-700 mt-1",children:O.priority||0})]})]}),u.jsxs("div",{children:[u.jsx(ye,{className:"text-xs",children:"路由目标"}),u.jsx("div",{className:"mt-1",children:u.jsx(hc,{value:O.action.route,onChange:V=>E(O.name,V),modelOptions:re,placeholder:"选择路由目标"})})]}),O.condition.value&&u.jsxs("div",{children:[u.jsx(ye,{className:"text-xs",children:"条件值"}),u.jsxs("div",{className:"text-sm text-gray-700 mt-1",children:[O.condition.operator," ",O.condition.value]})]}),O.action.description&&u.jsxs("div",{children:[u.jsx(ye,{className:"text-xs",children:"规则描述"}),u.jsx("div",{className:"text-sm text-gray-700 mt-1",children:O.action.description})]})]})})]})},O.name)})})]}),u.jsxs("div",{className:"space-y-3 border-t pt-4",children:[u.jsx(ye,{className:"text-base font-medium",children:"缓存设置"}),u.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[u.jsxs("div",{children:[u.jsx(ye,{className:"text-xs",children:"启用缓存"}),u.jsxs("select",{value:B.cache?.enabled!==!1?"Yes":"No",onChange:O=>{const q=O.target.value==="Yes";s({routerConfig:{...B,cache:{...B.cache,enabled:q}}})},className:"flex h-8 w-full rounded-md border border-input bg-background px-2 py-1 text-xs mt-1",children:[u.jsx("option",{value:"Yes",children:"Yes"}),u.jsx("option",{value:"No",children:"No"})]})]}),u.jsxs("div",{children:[u.jsx(ye,{className:"text-xs",children:"最大大小"}),u.jsx(He,{type:"number",value:B.cache?.maxSize||1e3,onChange:O=>{const q=parseInt(O.target.value)||1e3;s({routerConfig:{...B,cache:{...B.cache,maxSize:q}}})},className:"h-8 text-xs mt-1"})]}),u.jsxs("div",{children:[u.jsx(ye,{className:"text-xs",children:"TTL (ms)"}),u.jsx(He,{type:"number",value:B.cache?.ttl||3e5,onChange:O=>{const q=parseInt(O.target.value)||3e5;s({routerConfig:{...B,cache:{...B.cache,ttl:q}}})},className:"h-8 text-xs mt-1"})]})]})]}),u.jsxs("div",{className:"space-y-3 border-t pt-4",children:[u.jsx(ye,{className:"text-base font-medium",children:"调试设置"}),u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx(ye,{className:"text-xs",children:"启用调试"}),u.jsxs("select",{value:B.debug?.enabled?"Yes":"No",onChange:O=>{const q=O.target.value==="Yes";s({routerConfig:{...B,debug:{...B.debug,enabled:q}}})},className:"flex h-8 w-full rounded-md border border-input bg-background px-2 py-1 text-xs mt-1",children:[u.jsx("option",{value:"Yes",children:"Yes"}),u.jsx("option",{value:"No",children:"No"})]})]}),u.jsxs("div",{children:[u.jsx(ye,{className:"text-xs",children:"日志级别"}),u.jsxs("select",{value:B.debug?.logLevel||"info",onChange:O=>{const q=O.target.value;s({routerConfig:{...B,debug:{...B.debug,logLevel:q}}})},className:"flex h-8 w-full rounded-md border border-input bg-background px-2 py-1 text-xs mt-1",children:[u.jsx("option",{value:"debug",children:"debug"}),u.jsx("option",{value:"info",children:"info"}),u.jsx("option",{value:"warn",children:"warn"}),u.jsx("option",{value:"error",children:"error"})]})]})]})]})]}),u.jsx(Da,{open:m,onOpenChange:g,children:u.jsxs(ca,{className:"max-w-2xl",children:[u.jsx(ua,{children:u.jsx(da,{children:"添加新规则"})}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx(ye,{children:"规则名称"}),u.jsx(He,{value:b.name||"",onChange:O=>j({...b,name:O.target.value}),placeholder:"例如: myRule"})]}),u.jsxs("div",{children:[u.jsx(ye,{children:"优先级"}),u.jsx(He,{type:"number",value:b.priority||10,onChange:O=>j({...b,priority:parseInt(O.target.value)||10})})]})]}),u.jsxs("div",{children:[u.jsx(ye,{children:"条件类型"}),u.jsxs("select",{value:b.condition?.type||"fieldExists",onChange:O=>{const q=O.target.value;let ee={type:q};switch(q){case"tokenThreshold":ee={type:q,value:6e4,operator:"gt"};break;case"modelContains":ee={type:q,value:"haiku",operator:"contains"};break;case"toolExists":ee={type:q,value:"web_search",operator:"exists"};break;case"fieldExists":ee={type:q,field:"system.1.text",operator:"exists"};break;case"custom":ee={type:q,customFunction:"modelContainsComma"};break;case"externalFunction":ee={type:q,externalFunction:{path:"./external-rules/custom.js",functionName:"customCheck"}};break}j({...b,condition:ee})},className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[u.jsx("option",{value:"fieldExists",children:"字段存在"}),u.jsx("option",{value:"modelContains",children:"模型包含"}),u.jsx("option",{value:"toolExists",children:"工具存在"}),u.jsx("option",{value:"tokenThreshold",children:"Token阈值"}),u.jsx("option",{value:"custom",children:"自定义函数"}),u.jsx("option",{value:"externalFunction",children:"外部函数"})]})]}),b.condition?.type==="tokenThreshold"&&u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx(ye,{children:"Token数量"}),u.jsx(He,{type:"number",value:b.condition.value||6e4,onChange:O=>j({...b,condition:{...b.condition,value:parseInt(O.target.value)||6e4}}),placeholder:"输入Token阈值"})]}),u.jsxs("div",{children:[u.jsx(ye,{children:"操作符"}),u.jsxs("select",{value:b.condition.operator||"gt",onChange:O=>j({...b,condition:{...b.condition,operator:O.target.value}}),className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[u.jsx("option",{value:"gt",children:"大于"}),u.jsx("option",{value:"lt",children:"小于"}),u.jsx("option",{value:"eq",children:"等于"})]})]})]}),b.condition?.type==="modelContains"&&u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx(ye,{children:"模型名包含"}),u.jsx(He,{value:b.condition.value||"",onChange:O=>j({...b,condition:{...b.condition,value:O.target.value}}),placeholder:"例如: haiku"})]}),u.jsxs("div",{children:[u.jsx(ye,{children:"操作符"}),u.jsxs("select",{value:b.condition.operator||"contains",onChange:O=>j({...b,condition:{...b.condition,operator:O.target.value}}),className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[u.jsx("option",{value:"contains",children:"包含"}),u.jsx("option",{value:"startsWith",children:"startsWith"}),u.jsx("option",{value:"eq",children:"等于"})]})]})]}),b.condition?.type==="toolExists"&&u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx(ye,{children:"工具名称"}),u.jsx(He,{value:b.condition.value||"",onChange:O=>j({...b,condition:{...b.condition,value:O.target.value}}),placeholder:"例如: web_search"})]}),u.jsxs("div",{children:[u.jsx(ye,{children:"操作符"}),u.jsxs("select",{value:b.condition.operator||"exists",onChange:O=>j({...b,condition:{...b.condition,operator:O.target.value}}),className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[u.jsx("option",{value:"exists",children:"存在"}),u.jsx("option",{value:"contains",children:"包含"})]})]})]}),b.condition?.type==="fieldExists"&&u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx(ye,{children:"字段路径"}),u.jsx(He,{value:b.condition.field||"",onChange:O=>j({...b,condition:{...b.condition,field:O.target.value}}),placeholder:"例如: system.1.text"})]}),u.jsxs("div",{children:[u.jsx(ye,{children:"操作符"}),u.jsxs("select",{value:b.condition.operator||"exists",onChange:O=>j({...b,condition:{...b.condition,operator:O.target.value}}),className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[u.jsx("option",{value:"exists",children:"存在"}),u.jsx("option",{value:"contains",children:"包含"}),u.jsx("option",{value:"eq",children:"等于"})]})]})]}),b.condition?.type==="custom"&&u.jsxs("div",{children:[u.jsx(ye,{children:"自定义函数"}),u.jsxs("select",{value:b.condition.customFunction||"modelContainsComma",onChange:O=>j({...b,condition:{...b.condition,customFunction:O.target.value}}),className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[u.jsx("option",{value:"modelContainsComma",children:"检查模型是否包含逗号"}),u.jsx("option",{value:"directModelMapping",children:"检查是否为provider代号"})]})]}),b.condition?.type==="externalFunction"&&u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx(ye,{children:"文件路径"}),u.jsx(He,{value:b.condition.externalFunction?.path||"",onChange:O=>j({...b,condition:{...b.condition,externalFunction:{...b.condition.externalFunction,path:O.target.value}}}),placeholder:"./external-rules/custom.js"})]}),u.jsxs("div",{children:[u.jsx(ye,{children:"函数名"}),u.jsx(He,{value:b.condition.externalFunction?.functionName||"",onChange:O=>j({...b,condition:{...b.condition,externalFunction:{...b.condition.externalFunction,functionName:O.target.value}}}),placeholder:"customCheck"})]})]}),["fieldExists","modelContains","toolExists"].includes(b.condition?.type||"")&&(b.condition?.operator==="contains"||b.condition?.operator==="eq")&&u.jsxs("div",{children:[u.jsx(ye,{children:"条件值"}),u.jsx(He,{value:b.condition.value||"",onChange:O=>j({...b,condition:{...b.condition,value:O.target.value}}),placeholder:"输入条件值"})]}),u.jsxs("div",{children:[u.jsx(ye,{children:"路由目标"}),u.jsx(hc,{value:b.action?.route||"",onChange:O=>j({...b,action:{...b.action,route:O}}),modelOptions:re,placeholder:"选择或输入路由目标"})]}),u.jsxs("div",{children:[u.jsx(ye,{children:"规则描述"}),u.jsx(He,{value:b.action?.description||"",onChange:O=>j({...b,action:{...b.action,description:O.target.value}}),placeholder:"例如: 网络搜索路由:检测到web_search工具时使用特定模型"})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Zl,{checked:b.enabled!==!1,onCheckedChange:O=>j({...b,enabled:O})}),u.jsx(ye,{children:"启用规则"})]})]}),u.jsxs(La,{children:[u.jsxs(xe,{variant:"outline",onClick:P,children:[u.jsx(ia,{className:"mr-2 h-4 w-4"}),"取消"]}),u.jsxs(xe,{onClick:M,children:[u.jsx(Mc,{className:"mr-2 h-4 w-4"}),"添加规则"]})]})]})}),u.jsx(Da,{open:h,onOpenChange:v,children:u.jsxs(ca,{className:"max-w-2xl",children:[u.jsx(ua,{children:u.jsx(da,{children:"编辑规则"})}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx(ye,{children:"规则名称"}),u.jsx(He,{value:b.name||"",onChange:O=>j({...b,name:O.target.value}),placeholder:"例如: myRule"})]}),u.jsxs("div",{children:[u.jsx(ye,{children:"优先级"}),u.jsx(He,{type:"number",value:b.priority||10,onChange:O=>j({...b,priority:parseInt(O.target.value)||10})})]})]}),u.jsxs("div",{children:[u.jsx(ye,{children:"条件类型"}),u.jsxs("select",{value:b.condition?.type||"fieldExists",onChange:O=>{const q=O.target.value;let ee={type:q};switch(q){case"tokenThreshold":ee={type:q,value:6e4,operator:"gt"};break;case"modelContains":ee={type:q,value:"haiku",operator:"contains"};break;case"toolExists":ee={type:q,value:"web_search",operator:"exists"};break;case"fieldExists":ee={type:q,field:"system.1.text",operator:"exists"};break;case"custom":ee={type:q,customFunction:"modelContainsComma"};break;case"externalFunction":ee={type:q,externalFunction:{path:"./external-rules/custom.js",functionName:"customCheck"}};break}j({...b,condition:ee})},className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[u.jsx("option",{value:"fieldExists",children:"字段存在"}),u.jsx("option",{value:"modelContains",children:"模型包含"}),u.jsx("option",{value:"toolExists",children:"工具存在"}),u.jsx("option",{value:"tokenThreshold",children:"Token阈值"}),u.jsx("option",{value:"custom",children:"自定义函数"}),u.jsx("option",{value:"externalFunction",children:"外部函数"})]})]}),b.condition?.type==="tokenThreshold"&&u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx(ye,{children:"Token数量"}),u.jsx(He,{type:"number",value:b.condition.value||6e4,onChange:O=>j({...b,condition:{...b.condition,value:parseInt(O.target.value)||6e4}}),placeholder:"输入Token阈值"})]}),u.jsxs("div",{children:[u.jsx(ye,{children:"操作符"}),u.jsxs("select",{value:b.condition.operator||"gt",onChange:O=>j({...b,condition:{...b.condition,operator:O.target.value}}),className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[u.jsx("option",{value:"gt",children:"大于"}),u.jsx("option",{value:"lt",children:"小于"}),u.jsx("option",{value:"eq",children:"等于"})]})]})]}),b.condition?.type==="modelContains"&&u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx(ye,{children:"模型名包含"}),u.jsx(He,{value:b.condition.value||"",onChange:O=>j({...b,condition:{...b.condition,value:O.target.value}}),placeholder:"例如: haiku"})]}),u.jsxs("div",{children:[u.jsx(ye,{children:"操作符"}),u.jsxs("select",{value:b.condition.operator||"contains",onChange:O=>j({...b,condition:{...b.condition,operator:O.target.value}}),className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[u.jsx("option",{value:"contains",children:"包含"}),u.jsx("option",{value:"startsWith",children:"startsWith"}),u.jsx("option",{value:"eq",children:"等于"})]})]})]}),b.condition?.type==="toolExists"&&u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx(ye,{children:"工具名称"}),u.jsx(He,{value:b.condition.value||"",onChange:O=>j({...b,condition:{...b.condition,value:O.target.value}}),placeholder:"例如: web_search"})]}),u.jsxs("div",{children:[u.jsx(ye,{children:"操作符"}),u.jsxs("select",{value:b.condition.operator||"exists",onChange:O=>j({...b,condition:{...b.condition,operator:O.target.value}}),className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[u.jsx("option",{value:"exists",children:"存在"}),u.jsx("option",{value:"contains",children:"包含"})]})]})]}),b.condition?.type==="fieldExists"&&u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx(ye,{children:"字段路径"}),u.jsx(He,{value:b.condition.field||"",onChange:O=>j({...b,condition:{...b.condition,field:O.target.value}}),placeholder:"例如: system.1.text"})]}),u.jsxs("div",{children:[u.jsx(ye,{children:"操作符"}),u.jsxs("select",{value:b.condition.operator||"exists",onChange:O=>j({...b,condition:{...b.condition,operator:O.target.value}}),className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[u.jsx("option",{value:"exists",children:"存在"}),u.jsx("option",{value:"contains",children:"包含"}),u.jsx("option",{value:"eq",children:"等于"})]})]})]}),b.condition?.type==="custom"&&u.jsxs("div",{children:[u.jsx(ye,{children:"自定义函数"}),u.jsxs("select",{value:b.condition.customFunction||"modelContainsComma",onChange:O=>j({...b,condition:{...b.condition,customFunction:O.target.value}}),className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[u.jsx("option",{value:"modelContainsComma",children:"检查模型是否包含逗号"}),u.jsx("option",{value:"directModelMapping",children:"检查是否为provider代号"})]})]}),b.condition?.type==="externalFunction"&&u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx(ye,{children:"文件路径"}),u.jsx(He,{value:b.condition.externalFunction?.path||"",onChange:O=>j({...b,condition:{...b.condition,externalFunction:{...b.condition.externalFunction,path:O.target.value}}}),placeholder:"./external-rules/custom.js"})]}),u.jsxs("div",{children:[u.jsx(ye,{children:"函数名"}),u.jsx(He,{value:b.condition.externalFunction?.functionName||"",onChange:O=>j({...b,condition:{...b.condition,externalFunction:{...b.condition.externalFunction,functionName:O.target.value}}}),placeholder:"customCheck"})]})]}),["fieldExists","modelContains","toolExists"].includes(b.condition?.type||"")&&(b.condition?.operator==="contains"||b.condition?.operator==="eq")&&u.jsxs("div",{children:[u.jsx(ye,{children:"条件值"}),u.jsx(He,{value:b.condition.value||"",onChange:O=>j({...b,condition:{...b.condition,value:O.target.value}}),placeholder:"输入条件值"})]}),u.jsxs("div",{children:[u.jsx(ye,{children:"路由目标"}),u.jsx(hc,{value:b.action?.route||"",onChange:O=>j({...b,action:{...b.action,route:O}}),modelOptions:re,placeholder:"选择或输入路由目标"})]}),u.jsxs("div",{children:[u.jsx(ye,{children:"规则描述"}),u.jsx(He,{value:b.action?.description||"",onChange:O=>j({...b,action:{...b.action,description:O.target.value}}),placeholder:"例如: 网络搜索路由:检测到web_search工具时使用特定模型"})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Zl,{checked:b.enabled!==!1,onCheckedChange:O=>j({...b,enabled:O})}),u.jsx(ye,{children:"启用规则"})]})]}),u.jsxs(La,{children:[u.jsxs(xe,{variant:"outline",onClick:P,children:[u.jsx(ia,{className:"mr-2 h-4 w-4"}),"取消"]}),u.jsxs(xe,{onClick:D,children:[u.jsx(Mc,{className:"mr-2 h-4 w-4"}),"保存更改"]})]})]})})]})}function EM(){const{t}=zn(),{config:a,setConfig:l}=Ba(),o=Jh(a);if(!a||!o)return u.jsxs(Dn,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[u.jsx(Vn,{className:"border-b p-4",children:u.jsx(In,{className:"text-lg",children:t("router.title")})}),u.jsx(Gn,{className:"flex-grow flex items-center justify-center p-4",children:u.jsx("div",{className:"text-gray-500",children:"Loading router configuration..."})})]});const s=k1(o.routerConfig);return u.jsxs(Dn,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[u.jsxs(Vn,{className:"border-b p-4",children:[u.jsx(In,{className:"text-lg",children:t("router.title")}),u.jsx("div",{className:"flex items-center gap-2 mt-2",children:s?u.jsxs(u.Fragment,{children:[u.jsx(kn,{variant:"default",children:"Unified Router Engine"}),u.jsx("span",{className:"text-sm text-gray-500",children:"Advanced routing with rules"})]}):u.jsxs(u.Fragment,{children:[u.jsx(kn,{variant:"secondary",children:"Legacy Router"}),u.jsx("span",{className:"text-sm text-gray-500",children:"Basic routing configuration"})]})})]}),u.jsx(Gn,{className:"flex-grow overflow-hidden p-0",children:s?u.jsx(CM,{}):u.jsx(_M,{})})]})}function _M(){const{t}=zn(),{config:a,setConfig:l}=Ba(),o=Jh(a);if(!a||!o)return u.jsx("div",{className:"flex-grow flex items-center justify-center p-4",children:u.jsx("div",{className:"text-gray-500",children:"Loading router configuration..."})});const s=o.routerConfig,c=o.providers,f=(h,v)=>{const x={...s,[h]:v};l({...a,Router:x})},m=h=>{l({...a,forceUseImageAgent:h})},g=c.flatMap(h=>{if(!h||!h.models)return[];const v=h.name||"Unknown Provider";return h.models.map(x=>({value:`${v},${x}`,label:`${v}, ${x}`}))});return u.jsxs("div",{className:"flex-grow space-y-5 overflow-y-auto p-4",children:[u.jsxs(T1,{children:[u.jsx(fR,{className:"h-4 w-4"}),u.jsx(M1,{children:"您正在使用传统路由配置。建议升级到统一路由引擎以获得更好的功能和性能。"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(ye,{children:t("router.default")}),u.jsxs("select",{value:s.default||"",onChange:h=>f("default",h.target.value),className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[u.jsx("option",{value:"",children:"Select a model"}),g.map(h=>u.jsx("option",{value:h.value,children:h.label},h.value))]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(ye,{children:t("router.background")}),u.jsxs("select",{value:s.background||"",onChange:h=>f("background",h.target.value),className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[u.jsx("option",{value:"",children:"Select a model"}),g.map(h=>u.jsx("option",{value:h.value,children:h.label},h.value))]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(ye,{children:t("router.think")}),u.jsxs("select",{value:s.think||"",onChange:h=>f("think",h.target.value),className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[u.jsx("option",{value:"",children:"Select a model"}),g.map(h=>u.jsx("option",{value:h.value,children:h.label},h.value))]})]}),u.jsx("div",{className:"space-y-2",children:u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsxs("div",{className:"flex-1",children:[u.jsx(ye,{children:t("router.longContext")}),u.jsxs("select",{value:s.longContext||"",onChange:h=>f("longContext",h.target.value),className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[u.jsx("option",{value:"",children:"Select a model"}),g.map(h=>u.jsx("option",{value:h.value,children:h.label},h.value))]})]}),u.jsxs("div",{className:"w-48",children:[u.jsx(ye,{children:t("router.longContextThreshold")}),u.jsx(He,{type:"number",value:s.longContextThreshold||6e4,onChange:h=>f("longContextThreshold",parseInt(h.target.value)||6e4),placeholder:"60000"})]})]})}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(ye,{children:t("router.webSearch")}),u.jsxs("select",{value:s.webSearch||"",onChange:h=>f("webSearch",h.target.value),className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[u.jsx("option",{value:"",children:"Select a model"}),g.map(h=>u.jsx("option",{value:h.value,children:h.label},h.value))]})]}),u.jsx("div",{className:"space-y-2",children:u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsxs("div",{className:"flex-1",children:[u.jsxs(ye,{children:[t("router.image")," (beta)"]}),u.jsxs("select",{value:s.image||"",onChange:h=>f("image",h.target.value),className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[u.jsx("option",{value:"",children:"Select a model"}),g.map(h=>u.jsx("option",{value:h.value,children:h.label},h.value))]})]}),u.jsxs("div",{className:"w-48",children:[u.jsx(ye,{htmlFor:"forceUseImageAgent",children:t("router.forceUseImageAgent")}),u.jsxs("select",{id:"forceUseImageAgent",value:a.forceUseImageAgent?"true":"false",onChange:h=>m(h.target.value==="true"),className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[u.jsx("option",{value:"false",children:t("common.no")}),u.jsx("option",{value:"true",children:t("common.yes")})]})]})]})})]})}function RM(t,a,l){return a in t?Object.defineProperty(t,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):t[a]=l,t}function px(t,a){var l=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);a&&(o=o.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),l.push.apply(l,o)}return l}function gx(t){for(var a=1;a<arguments.length;a++){var l=arguments[a]!=null?arguments[a]:{};a%2?px(Object(l),!0).forEach(function(o){RM(t,o,l[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(l)):px(Object(l)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(l,o))})}return t}function OM(t,a){if(t==null)return{};var l={},o=Object.keys(t),s,c;for(c=0;c<o.length;c++)s=o[c],!(a.indexOf(s)>=0)&&(l[s]=t[s]);return l}function AM(t,a){if(t==null)return{};var l=OM(t,a),o,s;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);for(s=0;s<c.length;s++)o=c[s],!(a.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(t,o)&&(l[o]=t[o])}return l}function TM(t,a){return MM(t)||kM(t,a)||DM(t,a)||LM()}function MM(t){if(Array.isArray(t))return t}function kM(t,a){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(t)))){var l=[],o=!0,s=!1,c=void 0;try{for(var f=t[Symbol.iterator](),m;!(o=(m=f.next()).done)&&(l.push(m.value),!(a&&l.length===a));o=!0);}catch(g){s=!0,c=g}finally{try{!o&&f.return!=null&&f.return()}finally{if(s)throw c}}return l}}function DM(t,a){if(t){if(typeof t=="string")return vx(t,a);var l=Object.prototype.toString.call(t).slice(8,-1);if(l==="Object"&&t.constructor&&(l=t.constructor.name),l==="Map"||l==="Set")return Array.from(t);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return vx(t,a)}}function vx(t,a){(a==null||a>t.length)&&(a=t.length);for(var l=0,o=new Array(a);l<a;l++)o[l]=t[l];return o}function LM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
367
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zM(t,a,l){return a in t?Object.defineProperty(t,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):t[a]=l,t}function yx(t,a){var l=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);a&&(o=o.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),l.push.apply(l,o)}return l}function xx(t){for(var a=1;a<arguments.length;a++){var l=arguments[a]!=null?arguments[a]:{};a%2?yx(Object(l),!0).forEach(function(o){zM(t,o,l[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(l)):yx(Object(l)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(l,o))})}return t}function UM(){for(var t=arguments.length,a=new Array(t),l=0;l<t;l++)a[l]=arguments[l];return function(o){return a.reduceRight(function(s,c){return c(s)},o)}}function bi(t){return function a(){for(var l=this,o=arguments.length,s=new Array(o),c=0;c<o;c++)s[c]=arguments[c];return s.length>=t.length?t.apply(this,s):function(){for(var f=arguments.length,m=new Array(f),g=0;g<f;g++)m[g]=arguments[g];return a.apply(l,[].concat(s,m))}}}function Uc(t){return{}.toString.call(t).includes("Object")}function PM(t){return!Object.keys(t).length}function Ti(t){return typeof t=="function"}function HM(t,a){return Object.prototype.hasOwnProperty.call(t,a)}function BM(t,a){return Uc(a)||pr("changeType"),Object.keys(a).some(function(l){return!HM(t,l)})&&pr("changeField"),a}function $M(t){Ti(t)||pr("selectorType")}function FM(t){Ti(t)||Uc(t)||pr("handlerType"),Uc(t)&&Object.values(t).some(function(a){return!Ti(a)})&&pr("handlersType")}function qM(t){t||pr("initialIsRequired"),Uc(t)||pr("initialType"),PM(t)&&pr("initialContent")}function VM(t,a){throw new Error(t[a]||t.default)}var IM={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},pr=bi(VM)(IM),mc={changes:BM,selector:$M,handler:FM,initial:qM};function GM(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};mc.initial(t),mc.handler(a);var l={current:t},o=bi(XM)(l,a),s=bi(KM)(l),c=bi(mc.changes)(t),f=bi(YM)(l);function m(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(v){return v};return mc.selector(h),h(l.current)}function g(h){UM(o,s,c,f)(h)}return[m,g]}function YM(t,a){return Ti(a)?a(t.current):a}function KM(t,a){return t.current=xx(xx({},t.current),a),a}function XM(t,a,l){return Ti(a)?a(t.current):Object.keys(l).forEach(function(o){var s;return(s=a[o])===null||s===void 0?void 0:s.call(a,t.current[o])}),l}var QM={create:GM},ZM={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}};function JM(t){return function a(){for(var l=this,o=arguments.length,s=new Array(o),c=0;c<o;c++)s[c]=arguments[c];return s.length>=t.length?t.apply(this,s):function(){for(var f=arguments.length,m=new Array(f),g=0;g<f;g++)m[g]=arguments[g];return a.apply(l,[].concat(s,m))}}}function WM(t){return{}.toString.call(t).includes("Object")}function ek(t){return t||bx("configIsRequired"),WM(t)||bx("configType"),t.urls?(tk(),{paths:{vs:t.urls.monacoBase}}):t}function tk(){console.warn(H1.deprecation)}function nk(t,a){throw new Error(t[a]||t.default)}var H1={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
368
+ You are using deprecated way of configuration.
369
+
370
+ Instead of using
371
+ monaco.config({ urls: { monacoBase: '...' } })
372
+ use
373
+ monaco.config({ paths: { vs: '...' } })
374
+
375
+ For more please check the link https://github.com/suren-atoyan/monaco-loader#config
376
+ `},bx=JM(nk)(H1),ak={config:ek},rk=function(){for(var a=arguments.length,l=new Array(a),o=0;o<a;o++)l[o]=arguments[o];return function(s){return l.reduceRight(function(c,f){return f(c)},s)}};function B1(t,a){return Object.keys(a).forEach(function(l){a[l]instanceof Object&&t[l]&&Object.assign(a[l],B1(t[l],a[l]))}),gx(gx({},t),a)}var lk={type:"cancelation",msg:"operation is manually canceled"};function qf(t){var a=!1,l=new Promise(function(o,s){t.then(function(c){return a?s(lk):o(c)}),t.catch(s)});return l.cancel=function(){return a=!0},l}var ok=QM.create({config:ZM,isInitialized:!1,resolve:null,reject:null,monaco:null}),$1=TM(ok,2),Pi=$1[0],iu=$1[1];function ik(t){var a=ak.config(t),l=a.monaco,o=AM(a,["monaco"]);iu(function(s){return{config:B1(s.config,o),monaco:l}})}function sk(){var t=Pi(function(a){var l=a.monaco,o=a.isInitialized,s=a.resolve;return{monaco:l,isInitialized:o,resolve:s}});if(!t.isInitialized){if(iu({isInitialized:!0}),t.monaco)return t.resolve(t.monaco),qf(Vf);if(window.monaco&&window.monaco.editor)return F1(window.monaco),t.resolve(window.monaco),qf(Vf);rk(ck,dk)(fk)}return qf(Vf)}function ck(t){return document.body.appendChild(t)}function uk(t){var a=document.createElement("script");return t&&(a.src=t),a}function dk(t){var a=Pi(function(o){var s=o.config,c=o.reject;return{config:s,reject:c}}),l=uk("".concat(a.config.paths.vs,"/loader.js"));return l.onload=function(){return t()},l.onerror=a.reject,l}function fk(){var t=Pi(function(l){var o=l.config,s=l.resolve,c=l.reject;return{config:o,resolve:s,reject:c}}),a=window.require;a.config(t.config),a(["vs/editor/editor.main"],function(l){F1(l),t.resolve(l)},function(l){t.reject(l)})}function F1(t){Pi().monaco||iu({monaco:t})}function hk(){return Pi(function(t){var a=t.monaco;return a})}var Vf=new Promise(function(t,a){return iu({resolve:t,reject:a})}),q1={config:ik,init:sk,__getMonacoInstance:hk},mk={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},If=mk,pk={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},gk=pk;function vk({children:t}){return ot.createElement("div",{style:gk.container},t)}var yk=vk,xk=yk;function bk({width:t,height:a,isEditorReady:l,loading:o,_ref:s,className:c,wrapperProps:f}){return ot.createElement("section",{style:{...If.wrapper,width:t,height:a},...f},!l&&ot.createElement(xk,null,o),ot.createElement("div",{ref:s,style:{...If.fullWidth,...!l&&If.hide},className:c}))}var wk=bk,V1=y.memo(wk);function Sk(t){y.useEffect(t,[])}var I1=Sk;function jk(t,a,l=!0){let o=y.useRef(!0);y.useEffect(o.current||!l?()=>{o.current=!1}:t,a)}var gn=jk;function ji(){}function Kl(t,a,l,o){return Nk(t,o)||Ck(t,a,l,o)}function Nk(t,a){return t.editor.getModel(G1(t,a))}function Ck(t,a,l,o){return t.editor.createModel(a,l,o?G1(t,o):void 0)}function G1(t,a){return t.Uri.parse(a)}function Ek({original:t,modified:a,language:l,originalLanguage:o,modifiedLanguage:s,originalModelPath:c,modifiedModelPath:f,keepCurrentOriginalModel:m=!1,keepCurrentModifiedModel:g=!1,theme:h="light",loading:v="Loading...",options:x={},height:S="100%",width:b="100%",className:j,wrapperProps:C={},beforeMount:_=ji,onMount:E=ji}){let[A,M]=y.useState(!1),[z,D]=y.useState(!0),R=y.useRef(null),P=y.useRef(null),B=y.useRef(null),ne=y.useRef(E),re=y.useRef(_),O=y.useRef(!1);I1(()=>{let ae=q1.init();return ae.then(T=>(P.current=T)&&D(!1)).catch(T=>T?.type!=="cancelation"&&console.error("Monaco initialization: error:",T)),()=>R.current?V():ae.cancel()}),gn(()=>{if(R.current&&P.current){let ae=R.current.getOriginalEditor(),T=Kl(P.current,t||"",o||l||"text",c||"");T!==ae.getModel()&&ae.setModel(T)}},[c],A),gn(()=>{if(R.current&&P.current){let ae=R.current.getModifiedEditor(),T=Kl(P.current,a||"",s||l||"text",f||"");T!==ae.getModel()&&ae.setModel(T)}},[f],A),gn(()=>{let ae=R.current.getModifiedEditor();ae.getOption(P.current.editor.EditorOption.readOnly)?ae.setValue(a||""):a!==ae.getValue()&&(ae.executeEdits("",[{range:ae.getModel().getFullModelRange(),text:a||"",forceMoveMarkers:!0}]),ae.pushUndoStop())},[a],A),gn(()=>{R.current?.getModel()?.original.setValue(t||"")},[t],A),gn(()=>{let{original:ae,modified:T}=R.current.getModel();P.current.editor.setModelLanguage(ae,o||l||"text"),P.current.editor.setModelLanguage(T,s||l||"text")},[l,o,s],A),gn(()=>{P.current?.editor.setTheme(h)},[h],A),gn(()=>{R.current?.updateOptions(x)},[x],A);let q=y.useCallback(()=>{if(!P.current)return;re.current(P.current);let ae=Kl(P.current,t||"",o||l||"text",c||""),T=Kl(P.current,a||"",s||l||"text",f||"");R.current?.setModel({original:ae,modified:T})},[l,a,s,t,o,c,f]),ee=y.useCallback(()=>{!O.current&&B.current&&(R.current=P.current.editor.createDiffEditor(B.current,{automaticLayout:!0,...x}),q(),P.current?.editor.setTheme(h),M(!0),O.current=!0)},[x,h,q]);y.useEffect(()=>{A&&ne.current(R.current,P.current)},[A]),y.useEffect(()=>{!z&&!A&&ee()},[z,A,ee]);function V(){let ae=R.current?.getModel();m||ae?.original?.dispose(),g||ae?.modified?.dispose(),R.current?.dispose()}return ot.createElement(V1,{width:b,height:S,isEditorReady:A,loading:v,_ref:B,className:j,wrapperProps:C})}var _k=Ek;y.memo(_k);function Rk(t){let a=y.useRef();return y.useEffect(()=>{a.current=t},[t]),a.current}var Ok=Rk,pc=new Map;function Ak({defaultValue:t,defaultLanguage:a,defaultPath:l,value:o,language:s,path:c,theme:f="light",line:m,loading:g="Loading...",options:h={},overrideServices:v={},saveViewState:x=!0,keepCurrentModel:S=!1,width:b="100%",height:j="100%",className:C,wrapperProps:_={},beforeMount:E=ji,onMount:A=ji,onChange:M,onValidate:z=ji}){let[D,R]=y.useState(!1),[P,B]=y.useState(!0),ne=y.useRef(null),re=y.useRef(null),O=y.useRef(null),q=y.useRef(A),ee=y.useRef(E),V=y.useRef(),ae=y.useRef(o),T=Ok(c),Z=y.useRef(!1),I=y.useRef(!1);I1(()=>{let K=q1.init();return K.then($=>(ne.current=$)&&B(!1)).catch($=>$?.type!=="cancelation"&&console.error("Monaco initialization: error:",$)),()=>re.current?k():K.cancel()}),gn(()=>{let K=Kl(ne.current,t||o||"",a||s||"",c||l||"");K!==re.current?.getModel()&&(x&&pc.set(T,re.current?.saveViewState()),re.current?.setModel(K),x&&re.current?.restoreViewState(pc.get(c)))},[c],D),gn(()=>{re.current?.updateOptions(h)},[h],D),gn(()=>{!re.current||o===void 0||(re.current.getOption(ne.current.editor.EditorOption.readOnly)?re.current.setValue(o):o!==re.current.getValue()&&(I.current=!0,re.current.executeEdits("",[{range:re.current.getModel().getFullModelRange(),text:o,forceMoveMarkers:!0}]),re.current.pushUndoStop(),I.current=!1))},[o],D),gn(()=>{let K=re.current?.getModel();K&&s&&ne.current?.editor.setModelLanguage(K,s)},[s],D),gn(()=>{m!==void 0&&re.current?.revealLine(m)},[m],D),gn(()=>{ne.current?.editor.setTheme(f)},[f],D);let be=y.useCallback(()=>{if(!(!O.current||!ne.current)&&!Z.current){ee.current(ne.current);let K=c||l,$=Kl(ne.current,o||t||"",a||s||"",K||"");re.current=ne.current?.editor.create(O.current,{model:$,automaticLayout:!0,...h},v),x&&re.current.restoreViewState(pc.get(K)),ne.current.editor.setTheme(f),m!==void 0&&re.current.revealLine(m),R(!0),Z.current=!0}},[t,a,l,o,s,c,h,v,x,f,m]);y.useEffect(()=>{D&&q.current(re.current,ne.current)},[D]),y.useEffect(()=>{!P&&!D&&be()},[P,D,be]),ae.current=o,y.useEffect(()=>{D&&M&&(V.current?.dispose(),V.current=re.current?.onDidChangeModelContent(K=>{I.current||M(re.current.getValue(),K)}))},[D,M]),y.useEffect(()=>{if(D){let K=ne.current.editor.onDidChangeMarkers($=>{let Q=re.current.getModel()?.uri;if(Q&&$.find(ie=>ie.path===Q.path)){let ie=ne.current.editor.getModelMarkers({resource:Q});z?.(ie)}});return()=>{K?.dispose()}}return()=>{}},[D,z]);function k(){V.current?.dispose(),S?x&&pc.set(c,re.current.saveViewState()):re.current.getModel()?.dispose(),re.current.dispose()}return ot.createElement(V1,{width:b,height:j,isEditorReady:D,loading:g,_ref:O,className:C,wrapperProps:_})}var Tk=Ak,Mk=y.memo(Tk),Pc=Mk;function kk({open:t,onOpenChange:a,showToast:l}){const{t:o}=zn(),{config:s}=Ba(),[c,f]=y.useState(""),[m,g]=y.useState(!1),[h,v]=y.useState(!1),[x,S]=y.useState(!1),b=y.useRef(null);y.useEffect(()=>{s&&t&&f(JSON.stringify(s,null,2))},[s,t]),y.useEffect(()=>{if(t)v(!0),requestAnimationFrame(()=>{S(!0)});else{S(!1);const E=setTimeout(()=>{v(!1)},300);return()=>clearTimeout(E)}},[t]);const j=(E,A,M)=>{if(E&&typeof E=="object"&&"success"in E){const z=E;return z.success?(l&&l(z.message||A,"success"),!0):(l&&l(z.message||M,"error"),!1)}else return l&&l(A,"success"),!0},C=async()=>{if(c)try{g(!0);const E=JSON.parse(c),A=await $t.updateConfig(E);j(A,o("app.config_saved_success"),o("app.config_saved_failed"))&&a(!1)}catch(E){console.error("Failed to save config:",E),l&&l(o("app.config_saved_failed")+": "+E.message,"error")}finally{g(!1)}},_=async()=>{if(c)try{g(!0);const E=JSON.parse(c),A=await $t.updateConfig(E);if(j(A,o("app.config_saved_success"),o("app.config_saved_failed"))){const z=await $t.restartService();j(z,o("app.config_saved_restart_success"),o("app.config_saved_restart_failed")),a(!1)}}catch(E){console.error("Failed to save config and restart:",E),l&&l(o("app.config_saved_restart_failed")+": "+E.message,"error")}finally{g(!1)}};return!h&&!t?null:u.jsxs(u.Fragment,{children:[(h||t)&&u.jsx("div",{className:`fixed inset-0 z-50 transition-all duration-300 ease-out ${x&&t?"bg-black/50 opacity-100":"bg-black/0 opacity-0 pointer-events-none"}`,onClick:()=>a(!1)}),u.jsxs("div",{ref:b,className:`fixed bottom-0 left-0 right-0 z-50 flex flex-col bg-white shadow-2xl transition-all duration-300 ease-out transform ${x&&t?"translate-y-0":"translate-y-full"}`,style:{height:"100vh",maxHeight:"100vh"},children:[u.jsxs("div",{className:"flex items-center justify-between border-b p-4",children:[u.jsx("h2",{className:"text-lg font-semibold",children:o("json_editor.title")}),u.jsxs("div",{className:"flex gap-2",children:[u.jsxs(xe,{variant:"outline",size:"sm",onClick:()=>a(!1),disabled:m,children:[u.jsx(ia,{className:"h-4 w-4 mr-2"}),o("json_editor.cancel")]}),u.jsxs(xe,{variant:"outline",size:"sm",onClick:C,disabled:m,children:[u.jsx(Mc,{className:"h-4 w-4 mr-2"}),o(m?"json_editor.saving":"json_editor.save")]}),u.jsxs(xe,{variant:"default",size:"sm",onClick:_,disabled:m,children:[u.jsx(Uh,{className:"h-4 w-4 mr-2"}),o(m?"json_editor.saving":"json_editor.save_and_restart")]})]})]}),u.jsx("div",{className:"flex-1 min-h-0 bg-gray-50",children:u.jsx(Pc,{height:"100%",defaultLanguage:"json",value:c,onChange:E=>f(E||""),theme:"vs",options:{minimap:{enabled:!0},fontSize:14,scrollBeyondLastLine:!1,automaticLayout:!0,wordWrap:"on",formatOnPaste:!0,formatOnType:!0,suggest:{showKeywords:!0,showSnippets:!0}}})})]})]})}function Dk({open:t,onOpenChange:a,showToast:l}){const{t:o}=zn(),s=lo(),[c,f]=y.useState([]),[m,g]=y.useState([]),[h,v]=y.useState(null),[x,S]=y.useState(!1),[b,j]=y.useState(!1),[C,_]=y.useState(!1),[E,A]=y.useState(!1),[M,z]=y.useState(!1),[D,R]=y.useState(null),[P,B]=y.useState(null),ne=y.useRef(null),re=y.useRef(null),O=y.useRef(null),q=y.useRef(null);y.useEffect(()=>{t&&V()},[t]);const ee=()=>{const le=`
377
+ // 日志聚合Web Worker
378
+ self.onmessage = function(event) {
379
+ const { type, data } = event.data;
380
+
381
+ if (type === 'groupLogsByReqId') {
382
+ try {
383
+ const { logs } = data;
384
+
385
+ // 按reqId聚合日志
386
+ const groupedLogs = {};
387
+
388
+ logs.forEach((log, index) => {
389
+ log = JSON.parse(log);
390
+ let reqId = log.reqId || 'no-req-id';
391
+
392
+ if (!groupedLogs[reqId]) {
393
+ groupedLogs[reqId] = [];
394
+ }
395
+ groupedLogs[reqId].push(log);
396
+ });
397
+
398
+ // 按时间戳排序每个组的日志
399
+ Object.keys(groupedLogs).forEach(reqId => {
400
+ groupedLogs[reqId].sort((a, b) => a.time - b.time);
401
+ });
402
+
403
+ // 提取model信息
404
+ const extractModelInfo = (reqId) => {
405
+ const logGroup = groupedLogs[reqId];
406
+ for (const log of logGroup) {
407
+ try {
408
+ // 尝试从message字段解析JSON
409
+ if (log.type === 'request body' && log.data && log.data.model) {
410
+ return log.data.model;
411
+ }
412
+ } catch (e) {
413
+ // 解析失败,继续尝试下一条日志
414
+ }
415
+ }
416
+ return undefined;
417
+ };
418
+
419
+ // 生成摘要信息
420
+ const summary = {
421
+ totalRequests: Object.keys(groupedLogs).length,
422
+ totalLogs: logs.length,
423
+ requests: Object.keys(groupedLogs).map(reqId => ({
424
+ reqId,
425
+ logCount: groupedLogs[reqId].length,
426
+ firstLog: groupedLogs[reqId][0]?.time,
427
+ lastLog: groupedLogs[reqId][groupedLogs[reqId].length - 1]?.time,
428
+ model: extractModelInfo(reqId)
429
+ }))
430
+ };
431
+
432
+ const response = {
433
+ grouped: true,
434
+ groups: groupedLogs,
435
+ summary
436
+ };
437
+
438
+ // 发送结果回主线程
439
+ self.postMessage({
440
+ type: 'groupLogsResult',
441
+ data: response
442
+ });
443
+ } catch (error) {
444
+ // 发送错误回主线程
445
+ self.postMessage({
446
+ type: 'error',
447
+ error: error instanceof Error ? error.message : 'Unknown error occurred'
448
+ });
449
+ }
450
+ }
451
+ };
452
+ `,Se=new Blob([le],{type:"application/javascript"}),Be=URL.createObjectURL(Se);return new Worker(Be)};y.useEffect(()=>{if(typeof Worker<"u")try{O.current=ee(),O.current.onmessage=le=>{const{type:Se,data:Be,error:rt}=le.data;Se==="groupLogsResult"?R(Be):Se==="error"&&(console.error("Worker error:",rt),l&&l(o("log_viewer.worker_error")+": "+rt,"error"))},O.current.onerror=le=>{console.error("Worker error:",le),l&&l(o("log_viewer.worker_init_failed"),"error")}}catch(le){console.error("Failed to create worker:",le),l&&l(o("log_viewer.worker_init_failed"),"error")}return()=>{O.current&&(O.current.terminate(),O.current=null)}},[l,o]),y.useEffect(()=>(E&&t&&h?re.current=setInterval(()=>{ae()},5e3):re.current&&clearInterval(re.current),()=>{re.current&&clearInterval(re.current)}),[E,t,h]),y.useEffect(()=>{h&&t&&(f([]),ae())},[h,t]),y.useEffect(()=>{if(t)j(!0),requestAnimationFrame(()=>{_(!0)});else{_(!1);const le=setTimeout(()=>{j(!1)},300);return()=>clearTimeout(le)}},[t]);const V=async()=>{try{S(!0);const le=await $t.getLogFiles();le&&Array.isArray(le)?(g(le),v(null),f([])):(g([]),l&&l(o("log_viewer.no_log_files_available"),"warning"))}catch(le){console.error("Failed to load log files:",le),l&&l(o("log_viewer.load_files_failed")+": "+le.message,"error")}finally{S(!1)}},ae=async()=>{if(h)try{S(!0),R(null),B(null);const le=await $t.getLogs(h.path);le&&Array.isArray(le)?(f(le),M&&O.current?O.current.postMessage({type:"groupLogsByReqId",data:{logs:le}}):R(null)):(f([]),R(null),l&&l(o("log_viewer.no_logs_available"),"warning"))}catch(le){console.error("Failed to load logs:",le),l&&l(o("log_viewer.load_failed")+": "+le.message,"error")}finally{S(!1)}},T=async()=>{if(h)try{await $t.clearLogs(h.path),f([]),l&&l(o("log_viewer.logs_cleared"),"success")}catch(le){console.error("Failed to clear logs:",le),l&&l(o("log_viewer.clear_failed")+": "+le.message,"error")}},Z=le=>{v(le),A(!1)},I=()=>{const le=!M;z(le),le&&h&&c.length>0?O.current&&O.current.postMessage({type:"groupLogsByReqId",data:{logs:c}}):le||(R(null),B(null))},be=le=>{B(le)},k=()=>{if(!h||c.length===0)return;const le=c.join(`
453
+ `),Se=new Blob([le],{type:"text/plain"}),Be=URL.createObjectURL(Se),rt=document.createElement("a");rt.href=Be,rt.download=`${h.name}-${new Date().toISOString().split("T")[0]}.txt`,document.body.appendChild(rt),rt.click(),document.body.removeChild(rt),URL.revokeObjectURL(Be),l&&l(o("log_viewer.logs_downloaded"),"success")},K=le=>{if(le===0)return"0 Bytes";const Se=1024,Be=["Bytes","KB","MB","GB"],rt=Math.floor(Math.log(le)/Math.log(Se));return parseFloat((le/Math.pow(Se,rt)).toFixed(2))+" "+Be[rt]},$=le=>new Date(le).toLocaleString(),Q=()=>{const le=[{id:"root",label:o("log_viewer.title"),onClick:()=>{v(null),A(!1),f([]),R(null),B(null),z(!1)}}];return h&&le.push({id:"file",label:h.name,onClick:()=>{M?B(null):(B(null),R(null),z(!1))}}),P&&le.push({id:"req",label:`${o("log_viewer.request")} ${P}`,onClick:()=>{}}),le},ie=()=>P?()=>{B(null)}:h?()=>{v(null),A(!1),f([]),R(null),B(null),z(!1)}:null,me=()=>M&&D&&P&&D.groups[P]?D.groups[P].map(Se=>JSON.stringify(Se)).join(`
454
+ `):c.join(`
455
+ `),ge=()=>{const le=[];return M&&D&&P&&D.groups[P]?D.groups[P].forEach((Be,rt)=>{try{Be=JSON.parse(Be),Be.msg==="final request"&&le.push(rt+1)}catch{}}):c.forEach((Se,Be)=>{try{JSON.parse(Se).msg==="final request"&&le.push(Be+1)}catch{}}),le},we=le=>{console.log("handleDebugClick called with lineNumber:",le),console.log("Current state:",{groupByReqId:M,selectedReqId:P,logsLength:c.length});let Se=null;if(M&&D&&P&&D.groups[P]){const Be=D.groups[P];console.log("Group mode - requestLogs length:",Be.length),Se=Be[le-1],console.log("Group mode - logData:",Se)}else{console.log("Non-group mode - logs length:",c.length);try{const Be=c[le-1];console.log("Log line:",Be),Se=JSON.parse(Be),console.log("Parsed logData:",Se)}catch(Be){console.error("Failed to parse log data:",Be)}}if(Se){console.log("Navigating to debug page with logData:",Se);const Be=encodeURIComponent(JSON.stringify(Se));console.log("Encoded logDataParam length:",Be.length),s(`/debug?logData=${Be}`)}else console.error("No log data found for line:",le)},Ue=le=>{q.current=le,le.updateOptions({glyphMargin:!0});let Se=[];const Be=()=>{const bt=ge().map(ue=>({range:{startLineNumber:ue,startColumn:1,endLineNumber:ue,endColumn:1},options:{glyphMarginClassName:"debug-button-glyph",glyphMarginHoverMessage:{value:"点击调试此请求"}}}));Se=le.deltaDecorations(Se,bt)};Be(),le.onMouseDown(Ee=>{console.log("Mouse down event:",Ee.target),console.log("Event details:",{type:Ee.target.type,hasDetail:!!Ee.target.detail,glyphMarginLane:Ee.target.detail?.glyphMarginLane,offsetX:Ee.target.detail?.offsetX,glyphMarginLeft:Ee.target.detail?.glyphMarginLeft,glyphMarginWidth:Ee.target.detail?.glyphMarginWidth});const bt=Ee.target.detail&&Ee.target.detail.glyphMarginLane!==void 0&&Ee.target.detail.offsetX!==void 0&&Ee.target.detail.offsetX<=Ee.target.detail.glyphMarginLeft+Ee.target.detail.glyphMarginWidth;if(console.log("Is glyph margin click:",bt),Ee.target.position&&bt){const ue=ge();console.log("Final request lines:",ue),console.log("Clicked line number:",Ee.target.position.lineNumber),ue.includes(Ee.target.position.lineNumber)&&(console.log("Opening debug page for line:",Ee.target.position.lineNumber),we(Ee.target.position.lineNumber))}}),typeof le.onGlyphMarginClick=="function"&&le.onGlyphMarginClick(Ee=>{console.log("Glyph margin click event:",Ee),ge().includes(Ee.target.position.lineNumber)&&(console.log("Opening debug page for line (glyph):",Ee.target.position.lineNumber),we(Ee.target.position.lineNumber))}),le.onMouseMove(Ee=>{Ee.target.position&&(Ee.target.type===4||Ee.target.type==="glyph-margin")&&ge().includes(Ee.target.position.lineNumber)&&le.updateOptions({glyphMargin:!0})});const rt=setInterval(Be,1e3);return()=>{clearInterval(rt),q.current&&q.current.deltaDecorations(Se,[])}};return!b&&!t?null:u.jsxs(u.Fragment,{children:[(b||t)&&u.jsx("div",{className:`fixed inset-0 z-50 transition-all duration-300 ease-out ${C&&t?"bg-black/50 opacity-100":"bg-black/0 opacity-0 pointer-events-none"}`,onClick:()=>a(!1)}),u.jsxs("div",{ref:ne,className:`fixed bottom-0 left-0 right-0 z-50 flex flex-col bg-white shadow-2xl transition-all duration-300 ease-out transform ${C&&t?"translate-y-0":"translate-y-full"}`,style:{height:"100vh",maxHeight:"100vh"},children:[u.jsxs("div",{className:"flex items-center justify-between border-b p-4",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[ie()&&u.jsxs(xe,{variant:"ghost",size:"sm",onClick:ie(),children:[u.jsx(zb,{className:"h-4 w-4 mr-2"}),o("log_viewer.back")]}),u.jsx("nav",{className:"flex items-center space-x-1 text-sm",children:Q().map((le,Se)=>u.jsxs(ot.Fragment,{children:[Se>0&&u.jsx("span",{className:"text-gray-400 mx-1",children:"/"}),Se===Q().length-1?u.jsx("span",{className:"text-gray-900 font-medium",children:le.label}):u.jsx("button",{onClick:le.onClick,className:"text-blue-600 hover:text-blue-800 transition-colors",children:le.label})]},le.id))})]}),u.jsxs("div",{className:"flex gap-2",children:[h&&u.jsxs(u.Fragment,{children:[u.jsxs(xe,{variant:"ghost",size:"sm",onClick:I,className:M?"bg-blue-100 text-blue-700":"",children:[u.jsx(X_,{className:"h-4 w-4 mr-2"}),o(M?"log_viewer.grouped_on":"log_viewer.group_by_req_id")]}),u.jsxs(xe,{variant:"ghost",size:"sm",onClick:()=>A(!E),className:E?"bg-blue-100 text-blue-700":"",children:[u.jsx(Uh,{className:`h-4 w-4 mr-2 ${E?"animate-spin":""}`}),o(E?"log_viewer.auto_refresh_on":"log_viewer.auto_refresh_off")]}),u.jsxs(xe,{variant:"outline",size:"sm",onClick:k,disabled:c.length===0,children:[u.jsx(L_,{className:"h-4 w-4 mr-2"}),o("log_viewer.download")]}),u.jsxs(xe,{variant:"outline",size:"sm",onClick:T,disabled:c.length===0,children:[u.jsx($n,{className:"h-4 w-4 mr-2"}),o("log_viewer.clear")]})]}),u.jsxs(xe,{variant:"outline",size:"sm",onClick:()=>a(!1),children:[u.jsx(ia,{className:"h-4 w-4 mr-2"}),o("log_viewer.close")]})]})]}),u.jsx("div",{className:"flex-1 min-h-0 bg-gray-50",children:x?u.jsx("div",{className:"flex items-center justify-center h-full",children:u.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}):h?u.jsx(u.Fragment,{children:M&&D&&!P?u.jsxs("div",{className:"flex flex-col h-full p-6",children:[u.jsxs("div",{className:"mb-4 flex-shrink-0",children:[u.jsx("h3",{className:"text-lg font-medium mb-2",children:o("log_viewer.request_groups")}),u.jsxs("p",{className:"text-sm text-gray-600",children:[o("log_viewer.total_requests"),": ",D.summary.totalRequests," |",o("log_viewer.total_logs"),": ",D.summary.totalLogs]})]}),u.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto space-y-3",children:D.summary.requests.map(le=>u.jsxs("div",{className:"border rounded-lg p-4 hover:bg-gray-50 cursor-pointer transition-colors",onClick:()=>be(le.reqId),children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Mf,{className:"h-5 w-5 text-blue-600"}),u.jsx("span",{className:"font-medium text-sm",children:le.reqId}),le.model&&u.jsx("span",{className:"text-xs bg-green-100 text-green-800 px-2 py-1 rounded",children:le.model})]}),u.jsxs("span",{className:"text-xs bg-blue-100 text-blue-800 px-2 py-1 rounded",children:[le.logCount," ",o("log_viewer.logs")]})]}),u.jsxs("div",{className:"text-xs text-gray-500 space-y-1",children:[u.jsxs("div",{children:[o("log_viewer.first_log"),": ",$(le.firstLog)]}),u.jsxs("div",{children:[o("log_viewer.last_log"),": ",$(le.lastLog)]})]})]},le.reqId))})]}):u.jsx("div",{className:"relative h-full",children:u.jsx(Pc,{height:"100%",defaultLanguage:"json",value:me(),theme:"vs",options:{minimap:{enabled:!0},fontSize:14,scrollBeyondLastLine:!1,automaticLayout:!0,wordWrap:"on",readOnly:!0,lineNumbers:"on",folding:!0,renderWhitespace:"all",glyphMargin:!0},onMount:Ue})})}):u.jsxs("div",{className:"p-6",children:[u.jsx("h3",{className:"text-lg font-medium mb-4",children:o("log_viewer.select_file")}),m.length===0?u.jsxs("div",{className:"text-gray-500 text-center py-8",children:[u.jsx(Mf,{className:"h-12 w-12 mx-auto mb-4 text-gray-400"}),u.jsx("p",{children:o("log_viewer.no_log_files_available")})]}):u.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:m.map(le=>u.jsxs("div",{className:"border rounded-lg p-4 hover:bg-gray-50 cursor-pointer transition-colors",onClick:()=>Z(le),children:[u.jsx("div",{className:"flex items-start justify-between mb-2",children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Mf,{className:"h-5 w-5 text-blue-600"}),u.jsx("span",{className:"font-medium text-sm",children:le.name})]})}),u.jsxs("div",{className:"text-xs text-gray-500 space-y-1",children:[u.jsx("div",{children:K(le.size)}),u.jsx("div",{children:$(le.lastModified)})]})]},le.path))})]})})]})]})}function Lk({message:t,type:a,onClose:l}){y.useEffect(()=>{const c=setTimeout(()=>{l()},3e3);return()=>clearTimeout(c)},[l]);const o=()=>{switch(a){case"success":return u.jsx(R_,{className:"h-5 w-5 text-green-500"});case"error":return u.jsx(Bb,{className:"h-5 w-5 text-red-500"});case"warning":return u.jsx(N_,{className:"h-5 w-5 text-yellow-500"});default:return null}},s=()=>{switch(a){case"success":return"bg-green-100 border-green-200";case"error":return"bg-red-100 border-red-200";case"warning":return"bg-yellow-100 border-yellow-200";default:return"bg-gray-100 border-gray-200"}};return u.jsxs("div",{className:`fixed top-4 right-4 z-50 flex items-center justify-between p-4 rounded-lg border shadow-lg ${s()} transition-all duration-300 ease-in-out`,children:[u.jsxs("div",{className:"flex items-center space-x-2",children:[o(),u.jsx("span",{className:"text-sm font-medium",children:t})]}),u.jsx("button",{onClick:l,className:"ml-4 text-gray-500 hover:text-gray-700 focus:outline-none",children:u.jsx(ia,{className:"h-4 w-4"})})]})}function zk(){const{t,i18n:a}=zn(),l=lo(),{config:o,error:s}=Ba(),[c,f]=y.useState(!1),[m,g]=y.useState(!1),[h,v]=y.useState(!1),[x,S]=y.useState(!0),[b,j]=y.useState(null),[C,_]=y.useState(!1),[E,A]=y.useState(!1),[M,z]=y.useState(null),[D,R]=y.useState(!1),[P,B]=y.useState(!1),ne=y.useRef(!1),re=async()=>{if(!o){j({message:t("app.config_missing"),type:"error"});return}try{const V=await $t.updateConfig(o);if(console.log("Config saved successfully"),V&&typeof V=="object"&&"success"in V){const ae=V;ae.success?j({message:ae.message||t("app.config_saved_success"),type:"success"}):j({message:ae.message||t("app.config_saved_failed"),type:"error"})}else j({message:t("app.config_saved_success"),type:"success"})}catch(V){console.error("Failed to save config:",V),j({message:t("app.config_saved_failed")+": "+V.message,type:"error"})}},O=async()=>{if(!o){j({message:t("app.config_missing"),type:"error"});return}try{const V=await $t.updateConfig(o);let ae=!0;if(V&&typeof V=="object"&&"success"in V){const T=V;T.success||(ae=!1,j({message:T.message||t("app.config_saved_failed"),type:"error"}))}if(ae){const T=await $t.restartService();if(console.log("Config saved and service restarted successfully"),T&&typeof T=="object"&&"success"in T){const Z=T;Z.success&&j({message:Z.message||t("app.config_saved_restart_success"),type:"success"})}else j({message:t("app.config_saved_restart_success"),type:"success"})}}catch(V){console.error("Failed to save config and restart:",V),j({message:t("app.config_saved_restart_failed")+": "+V.message,type:"error"})}},q=y.useCallback(async(V=!0)=>{if(P&&C){V&&A(!0);return}R(!0);try{const ae=await $t.checkForUpdates();ae.hasUpdate&&ae.latestVersion&&ae.changelog?(_(!0),z({version:ae.latestVersion,changelog:ae.changelog}),V&&A(!0)):V&&j({message:t("app.no_updates_available"),type:"success"}),B(!0)}catch(ae){console.error("Failed to check for updates:",ae),V&&j({message:t("app.update_check_failed")+": "+ae.message,type:"error"})}finally{R(!1)}},[P,C,t]);y.useEffect(()=>{(async()=>{if(o){S(!1),!P&&!ne.current&&(ne.current=!0,q(!1));return}if(!localStorage.getItem("apiKey")){S(!1);return}try{await $t.getConfig()}catch(Z){console.error("Error checking auth:",Z),Z.message==="Unauthorized"&&l("/login")}finally{S(!1),!P&&!ne.current&&(ne.current=!0,q(!1))}})();const ae=()=>{l("/login")};return window.addEventListener("unauthorized",ae),()=>{window.removeEventListener("unauthorized",ae)}},[o,l,P,q]);const ee=async()=>{if(M)try{const V=await $t.performUpdate();V.success?(j({message:t("app.update_successful"),type:"success"}),_(!1),A(!1),B(!1)):j({message:t("app.update_failed")+": "+V.message,type:"error"})}catch(V){console.error("Failed to perform update:",V),j({message:t("app.update_failed")+": "+V.message,type:"error"})}};return x?u.jsx("div",{className:"h-screen bg-gray-50 font-sans flex items-center justify-center",children:u.jsx("div",{className:"text-gray-500",children:"Loading application..."})}):s?u.jsx("div",{className:"h-screen bg-gray-50 font-sans flex items-center justify-center",children:u.jsxs("div",{className:"text-red-500",children:["Error: ",s.message]})}):o?u.jsxs("div",{className:"h-screen bg-gray-50 font-sans",children:[u.jsxs("header",{className:"flex h-16 items-center justify-between border-b bg-white px-6",children:[u.jsx("h1",{className:"text-xl font-semibold text-gray-800",children:t("app.title")}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(xe,{variant:"ghost",size:"icon",onClick:()=>f(!0),className:"transition-all-ease hover:scale-110",children:u.jsx(lR,{className:"h-5 w-5"})}),u.jsx(xe,{variant:"ghost",size:"icon",onClick:()=>g(!0),className:"transition-all-ease hover:scale-110",children:u.jsx($_,{className:"h-5 w-5"})}),u.jsx(xe,{variant:"ghost",size:"icon",onClick:()=>v(!0),className:"transition-all-ease hover:scale-110",children:u.jsx(q_,{className:"h-5 w-5"})}),u.jsxs(tu,{children:[u.jsx(nu,{asChild:!0,children:u.jsx(xe,{variant:"ghost",size:"icon",className:"transition-all-ease hover:scale-110",children:u.jsx(Y_,{className:"h-5 w-5"})})}),u.jsx(au,{className:"w-32 p-2",children:u.jsxs("div",{className:"space-y-1",children:[u.jsx(xe,{variant:a.language.startsWith("en")?"default":"ghost",className:"w-full justify-start transition-all-ease hover:scale-[1.02]",onClick:()=>a.changeLanguage("en"),children:"English"}),u.jsx(xe,{variant:a.language.startsWith("zh")?"default":"ghost",className:"w-full justify-start transition-all-ease hover:scale-[1.02]",onClick:()=>a.changeLanguage("zh"),children:"中文"})]})})]}),u.jsxs(xe,{variant:"ghost",size:"icon",onClick:()=>q(!0),disabled:D,className:"transition-all-ease hover:scale-110 relative",children:[u.jsxs("div",{className:"relative",children:[u.jsx(E_,{className:"h-5 w-5"}),C&&!D&&u.jsx("div",{className:"absolute -top-1 -right-1 w-3 h-3 bg-red-500 rounded-full border-2 border-white"})]}),D&&u.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:u.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent"})})]}),u.jsxs(xe,{onClick:re,variant:"outline",className:"transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:[u.jsx(Mc,{className:"mr-2 h-4 w-4"}),t("app.save")]}),u.jsxs(xe,{onClick:O,className:"transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:[u.jsx(Uh,{className:"mr-2 h-4 w-4"}),t("app.save_and_restart")]})]})]}),u.jsxs("main",{className:"flex h-[calc(100vh-4rem)] gap-4 p-4 overflow-hidden",children:[u.jsxs("div",{className:"flex w-3/5 flex-col gap-4",children:[u.jsx("div",{className:"h-3/5",children:u.jsx(FT,{})}),u.jsx("div",{className:"flex-1 overflow-hidden",children:u.jsx(HT,{})})]}),u.jsx("div",{className:"w-2/5",children:u.jsx(EM,{})})]}),u.jsx(UT,{isOpen:c,onOpenChange:f}),u.jsx(kk,{open:m,onOpenChange:g,showToast:(V,ae)=>j({message:V,type:ae})}),u.jsx(Dk,{open:h,onOpenChange:v,showToast:(V,ae)=>j({message:V,type:ae})}),u.jsx(Da,{open:E,onOpenChange:A,children:u.jsxs(ca,{className:"max-w-2xl",children:[u.jsxs(ua,{children:[u.jsxs(da,{children:[t("app.new_version_available"),M&&u.jsxs("span",{className:"ml-2 text-sm font-normal text-muted-foreground",children:["v",M.version]})]}),u.jsx(Yc,{children:t("app.update_description")})]}),u.jsx("div",{className:"max-h-96 overflow-y-auto py-4",children:M?.changelog?u.jsx("div",{className:"whitespace-pre-wrap text-sm",children:M.changelog}):u.jsx("div",{className:"text-muted-foreground",children:t("app.no_changelog_available")})}),u.jsxs(La,{children:[u.jsx(xe,{variant:"outline",onClick:()=>A(!1),children:t("app.later")}),u.jsx(xe,{onClick:ee,children:t("app.update_now")})]})]})}),b&&u.jsx(Lk,{message:b.message,type:b.type,onClose:()=>j(null)})]}):u.jsx("div",{className:"h-screen bg-gray-50 font-sans flex items-center justify-center",children:u.jsx("div",{className:"text-gray-500",children:"Loading configuration..."})})}function Uk(){const{t}=zn(),a=lo(),[l,o]=y.useState(""),[s,c]=y.useState(""),[f,m]=y.useState(!1);y.useEffect(()=>{(async()=>{if(localStorage.getItem("apiKey")){m(!0);try{await $t.getConfig(),a("/dashboard")}catch{localStorage.removeItem("apiKey")}finally{m(!1)}}})();const v=()=>{a("/login")};return window.addEventListener("unauthorized",v),()=>{window.removeEventListener("unauthorized",v)}},[a]);const g=async h=>{h.preventDefault();try{$t.setApiKey(l),window.dispatchEvent(new StorageEvent("storage",{key:"apiKey",newValue:l,url:window.location.href})),await $t.getConfig(),a("/dashboard")}catch(v){$t.setApiKey(""),v.message&&v.message.includes("401")?c(t("login.invalidApiKey")):a("/dashboard")}};return f?u.jsx("div",{className:"flex min-h-screen items-center justify-center bg-gray-50",children:u.jsxs(Dn,{className:"w-full max-w-md",children:[u.jsx(Vn,{className:"space-y-1",children:u.jsx(In,{className:"text-2xl",children:t("login.title")})}),u.jsxs(Gn,{children:[u.jsx("div",{className:"flex justify-center py-8",children:u.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent"})}),u.jsx("p",{className:"text-center text-sm text-gray-500",children:t("login.validating")})]})]})}):u.jsx("div",{className:"flex min-h-screen items-center justify-center bg-gray-50",children:u.jsxs(Dn,{className:"w-full max-w-md",children:[u.jsxs(Vn,{className:"space-y-1",children:[u.jsx(In,{className:"text-2xl",children:t("login.title")}),u.jsx(s1,{children:t("login.description")})]}),u.jsxs("form",{onSubmit:g,children:[u.jsxs(Gn,{className:"space-y-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(ye,{htmlFor:"apiKey",children:t("login.apiKey")}),u.jsx(He,{id:"apiKey",type:"password",value:l,onChange:h=>o(h.target.value),placeholder:t("login.apiKeyPlaceholder")})]}),s&&u.jsx("div",{className:"text-sm text-red-500",children:s})]}),u.jsx(c1,{children:u.jsx(xe,{className:"w-full",type:"submit",children:t("login.signIn")})})]})]})})}class Pk{DB_NAME="RequestHistoryDB";STORE_NAME="requests";VERSION=1;async openDB(){return new Promise((a,l)=>{const o=indexedDB.open(this.DB_NAME,this.VERSION);o.onerror=()=>l(o.error),o.onsuccess=()=>a(o.result),o.onupgradeneeded=s=>{const c=s.target.result;if(!c.objectStoreNames.contains(this.STORE_NAME)){const f=c.createObjectStore(this.STORE_NAME,{keyPath:"id"});f.createIndex("timestamp","timestamp",{unique:!1}),f.createIndex("url","url",{unique:!1}),f.createIndex("method","method",{unique:!1})}}})}async saveRequest(a){const l=await this.openDB(),o={...a,id:Date.now().toString(),timestamp:new Date().toISOString()};return new Promise((s,c)=>{const g=l.transaction([this.STORE_NAME],"readwrite").objectStore(this.STORE_NAME).add(o);g.onsuccess=()=>s(),g.onerror=()=>c(g.error)})}async getRequests(a=50){const l=await this.openDB();return new Promise((o,s)=>{const g=l.transaction([this.STORE_NAME],"readonly").objectStore(this.STORE_NAME).index("timestamp").openCursor(null,"prev"),h=[];g.onsuccess=v=>{const x=v.target.result;x&&h.length<a?(h.push(x.value),x.continue()):o(h)},g.onerror=()=>s(g.error)})}async deleteRequest(a){const l=await this.openDB();return new Promise((o,s)=>{const m=l.transaction([this.STORE_NAME],"readwrite").objectStore(this.STORE_NAME).delete(a);m.onsuccess=()=>o(),m.onerror=()=>s(m.error)})}async clearAllRequests(){const a=await this.openDB();return new Promise((l,o)=>{const f=a.transaction([this.STORE_NAME],"readwrite").objectStore(this.STORE_NAME).clear();f.onsuccess=()=>l(),f.onerror=()=>o(f.error)})}}const jc=new Pk;function Hk({isOpen:t,onClose:a,onSelectRequest:l}){const[o,s]=y.useState([]),[c,f]=y.useState(!0);y.useEffect(()=>{t&&m()},[t]);const m=async()=>{try{f(!0);const x=await jc.getRequests();s(x)}catch(x){console.error("Failed to load request history:",x)}finally{f(!1)}},g=async(x,S)=>{S.stopPropagation();try{await jc.deleteRequest(x),s(b=>b.filter(j=>j.id!==x))}catch(b){console.error("Failed to delete request:",b)}},h=async()=>{if(window.confirm("确定要清空所有请求历史吗?"))try{await jc.clearAllRequests(),s([])}catch(x){console.error("Failed to clear request history:",x)}},v=x=>{const S=new Date(x),j=new Date().getTime()-S.getTime(),C=Math.floor(j/6e4);return C<1?"刚刚":C<60?`${C}分钟前`:C<1440?`${Math.floor(C/60)}小时前`:S.toLocaleDateString()};return t?u.jsxs("div",{className:"fixed inset-0 z-50",children:[u.jsx("div",{className:"absolute inset-0 bg-black bg-opacity-50",onClick:a}),u.jsxs("div",{className:"absolute right-0 top-0 h-full w-96 bg-white shadow-xl flex flex-col",children:[u.jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(rh,{className:"h-5 w-5"}),u.jsx("h2",{className:"text-lg font-semibold",children:"请求历史"})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs(xe,{variant:"outline",size:"sm",onClick:h,disabled:o.length===0,children:[u.jsx($n,{className:"h-4 w-4 mr-1"}),"清空"]}),u.jsx(xe,{variant:"ghost",size:"sm",onClick:a,children:u.jsx(ia,{className:"h-4 w-4"})})]})]}),u.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:c?u.jsx("div",{className:"flex items-center justify-center h-32 text-gray-500",children:"加载中..."}):o.length>0?u.jsx("div",{className:"space-y-2",children:o.map(x=>u.jsxs("div",{className:"p-3 bg-gray-50 rounded-lg border cursor-pointer hover:bg-gray-100 transition-colors",onClick:()=>{l(x),a()},children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"font-mono text-xs bg-gray-200 px-2 py-1 rounded",children:x.method}),u.jsx("span",{className:"text-sm font-medium truncate flex-1",children:x.url})]}),u.jsx(xe,{variant:"ghost",size:"sm",onClick:S=>g(x.id,S),className:"h-6 w-6 p-0",children:u.jsx($n,{className:"h-3 w-3"})})]}),u.jsxs("div",{className:"flex items-center justify-between text-xs text-gray-500",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:`font-mono px-1 rounded ${x.status>=200&&x.status<300?"bg-green-100 text-green-800":x.status>=400?"bg-red-100 text-red-800":"bg-yellow-100 text-yellow-800"}`,children:x.status}),u.jsxs("span",{children:[x.responseTime,"ms"]})]}),u.jsxs("div",{className:"flex items-center gap-1",children:[u.jsx(T_,{className:"h-3 w-3"}),u.jsx("span",{children:v(x.timestamp)})]})]})]},x.id))}):u.jsxs("div",{className:"text-center text-gray-500 py-8",children:[u.jsx(rh,{className:"h-12 w-12 mx-auto mb-4 text-gray-300"}),u.jsx("p",{children:"暂无请求历史"}),u.jsx("p",{className:"text-sm mt-2",children:"发送请求后会在此显示历史记录"})]})})]})]}):null}function Bk(){const t=lo(),a=Ha(),[l,o]=y.useState({url:"",method:"POST",headers:"{}",body:"{}"}),[s,c]=y.useState({status:0,responseTime:0,body:"",headers:"{}"}),[f,m]=y.useState(!1),[g,h]=y.useState(!1),[v,x]=y.useState(null),S=y.useRef(null),b=y.useRef(null),j=A=>{x(v!==A?A:null),setTimeout(()=>{S.current&&S.current.layout(),b.current&&b.current.layout()},300)};y.useEffect(()=>{const M=new URLSearchParams(a.search).get("logData");if(M)try{const z=JSON.parse(decodeURIComponent(M)),D=z.url||z.requestUrl||z.endpoint||"",R=(z.method||z.requestMethod||"POST").toUpperCase();let P={};if(z.headers)if(typeof z.headers=="string")try{P=JSON.parse(z.headers)}catch{z.headers.split(`
456
+ `).forEach(O=>{const[q,...ee]=O.split(":");q&&ee.length>0&&(P[q.trim()]=ee.join(":").trim())})}else P=z.headers;let B={},ne=null;if(z.body?ne=z.body:z.request&&z.request.body&&(ne=z.request.body),ne)if(typeof ne=="string")try{B=JSON.parse(ne)}catch{const re=ne.trim();re.startsWith("{")||re.startsWith("[")?B={raw:ne}:B={content:ne}}else typeof ne=="object"?B=ne:B={content:String(ne)};o({url:D,method:R,headers:JSON.stringify(P,null,2),body:JSON.stringify(B,null,2)}),console.log("Log data parsed successfully:",{url:D,method:R,headers:P,body:B})}catch(z){console.error("Failed to parse log data:",z),console.error("Raw log data:",M)}},[a.search]);const C=async()=>{try{m(!0);const A=JSON.parse(l.headers),M=JSON.parse(l.body),z=Date.now(),D=await fetch(l.url,{method:l.method,headers:{"Content-Type":"application/json",...A},body:l.method!=="GET"?JSON.stringify(M):void 0}),P=Date.now()-z,B={};D.headers.forEach((q,ee)=>{B[ee]=q});const ne=await D.text();let re=ne;try{const q=JSON.parse(ne);re=JSON.stringify(q,null,2)}catch{}const O=JSON.stringify(B,null,2);c({status:D.status,responseTime:P,body:re,headers:O}),await jc.saveRequest({url:l.url,method:l.method,headers:l.headers,body:l.body,status:D.status,responseTime:P,responseBody:re,responseHeaders:O})}catch(A){console.error("Request failed:",A),c({status:0,responseTime:0,body:`请求失败: ${A instanceof Error?A.message:"未知错误"}`,headers:"{}"})}finally{m(!1)}},_=A=>{o({url:A.url,method:A.method,headers:A.headers,body:A.body}),c({status:A.status,responseTime:A.responseTime,body:A.responseBody,headers:A.responseHeaders})},E=()=>{try{const A=JSON.parse(l.headers),M=JSON.parse(l.body);let z=`curl -X ${l.method} "${l.url}"`;Object.entries(A).forEach(([D,R])=>{z+=` \\
457
+ -H "${D}: ${R}"`}),l.method!=="GET"&&Object.keys(M).length>0&&(z+=` \\
458
+ -d '${JSON.stringify(M)}'`),navigator.clipboard.writeText(z),alert("cURL命令已复制到剪贴板")}catch(A){console.error("Failed to copy cURL:",A),alert("复制cURL命令失败")}};return u.jsxs("div",{className:"h-screen bg-gray-50 font-sans",children:[u.jsxs("header",{className:"flex h-16 items-center justify-between border-b bg-white px-6",children:[u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsxs(xe,{variant:"ghost",size:"sm",onClick:()=>t("/dashboard"),children:[u.jsx(zb,{className:"h-4 w-4 mr-2"}),"返回"]}),u.jsx("h1",{className:"text-xl font-semibold text-gray-800",children:"HTTP 调试器"})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs(xe,{variant:"outline",onClick:()=>h(!0),children:[u.jsx(rh,{className:"h-4 w-4 mr-2"}),"历史记录"]}),u.jsxs(xe,{variant:"outline",onClick:E,children:[u.jsx(k_,{className:"h-4 w-4 mr-2"}),"复制 cURL"]})]})]}),u.jsxs("main",{className:"flex h-[calc(100vh-4rem)] flex-col gap-4 p-4 overflow-hidden",children:[u.jsx("div",{className:"h-1/2 flex flex-col gap-4",children:u.jsxs("div",{className:"bg-white rounded-lg border p-4 flex-1 flex flex-col",children:[u.jsx("h3",{className:"font-medium mb-4",children:"请求参数配置"}),u.jsxs("div",{className:"flex flex-col gap-4 flex-1",children:[u.jsxs("div",{className:"flex gap-4 items-end",children:[u.jsxs("div",{className:"w-32",children:[u.jsx("label",{className:"block text-sm font-medium mb-1",children:"Method"}),u.jsxs("select",{className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",value:l.method,onChange:A=>o(M=>({...M,method:A.target.value})),children:[u.jsx("option",{value:"GET",children:"GET"}),u.jsx("option",{value:"POST",children:"POST"}),u.jsx("option",{value:"PUT",children:"PUT"}),u.jsx("option",{value:"DELETE",children:"DELETE"}),u.jsx("option",{value:"PATCH",children:"PATCH"})]})]}),u.jsxs("div",{className:"flex-1",children:[u.jsx("label",{className:"block text-sm font-medium mb-1",children:"URL"}),u.jsx("input",{type:"text",className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",value:l.url,onChange:A=>o(M=>({...M,url:A.target.value})),placeholder:"https://api.example.com/endpoint"})]}),u.jsx(xe,{variant:f?"destructive":"default",onClick:f?()=>{}:C,disabled:f||!l.url.trim(),children:f?u.jsxs(u.Fragment,{children:[u.jsx(cR,{className:"h-4 w-4 mr-2"}),"请求中..."]}):u.jsxs(u.Fragment,{children:[u.jsx(aR,{className:"h-4 w-4 mr-2"}),"发送请求"]})})]}),u.jsx("div",{className:"flex-1",children:u.jsxs(hx,{defaultValue:"headers",className:"h-full flex flex-col",children:[u.jsxs(yh,{className:"grid w-full grid-cols-2",children:[u.jsx(yi,{value:"headers",children:"Headers"}),u.jsx(yi,{value:"body",children:"Body"})]}),u.jsx(xi,{value:"headers",className:"flex-1 mt-2",children:u.jsxs("div",{className:`${v==="headers"?"":"h-full"} flex flex-col ${v==="headers"?"fixed bg-white w-[100vw] h-[100vh] z-[9999] top-0 left-0 p-4":""}`,children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsx("label",{className:"block text-sm font-medium",children:"Headers (JSON)"}),u.jsxs(xe,{variant:"ghost",size:"sm",onClick:()=>j("headers"),children:[u.jsx(qy,{className:"h-4 w-4 mr-1"}),v==="headers"?"退出全屏":"全屏"]})]}),u.jsx("div",{id:"fullscreen-headers",className:`${v==="headers"?"h-full":"flex-1"} border border-gray-300 rounded-md overflow-hidden relative`,children:u.jsx(Pc,{height:"100%",language:"json",value:l.headers,onChange:A=>o(M=>({...M,headers:A||"{}"})),onMount:A=>{S.current=A},options:{minimap:{enabled:v==="headers"},scrollBeyondLastLine:!1,fontSize:14,lineNumbers:"on",wordWrap:"on",automaticLayout:!0,formatOnPaste:!0,formatOnType:!0}})})]})}),u.jsx(xi,{value:"body",className:"flex-1 mt-2",children:u.jsxs("div",{className:`${v==="body"?"":"h-full"} flex flex-col ${v==="body"?"fixed bg-white w-[100vw] h-[100vh] z-[9999] top-0 left-0 p-4":""}`,children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsx("label",{className:"block text-sm font-medium",children:"Body (JSON)"}),u.jsxs(xe,{variant:"ghost",size:"sm",onClick:()=>j("body"),children:[u.jsx(qy,{className:"h-4 w-4 mr-1"}),v==="body"?"退出全屏":"全屏"]})]}),u.jsx("div",{id:"fullscreen-body",className:`${v==="body"?"h-full":"flex-1"} border border-gray-300 rounded-md overflow-hidden relative`,children:u.jsx(Pc,{height:"100%",language:"json",value:l.body,onChange:A=>o(M=>({...M,body:A||"{}"})),onMount:A=>{b.current=A},options:{minimap:{enabled:v==="body"},scrollBeyondLastLine:!1,fontSize:14,lineNumbers:"on",wordWrap:"on",automaticLayout:!0,formatOnPaste:!0,formatOnType:!0}})})]})})]})})]})]})}),u.jsx("div",{className:"h-1/2 flex flex-col gap-4",children:u.jsxs("div",{className:"flex-1 bg-white rounded-lg border p-4 flex flex-col",children:[u.jsxs("div",{className:"flex items-center justify-between mb-4",children:[u.jsx("h3",{className:"font-medium",children:"响应信息"}),s.status>0&&u.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[u.jsxs("span",{className:"flex items-center gap-1",children:["状态码: ",u.jsx("span",{className:`font-mono px-2 py-1 rounded ${s.status>=200&&s.status<300?"bg-green-100 text-green-800":s.status>=400?"bg-red-100 text-red-800":"bg-yellow-100 text-yellow-800"}`,children:s.status})]}),u.jsxs("span",{children:["响应时间: ",u.jsxs("span",{className:"font-mono",children:[s.responseTime,"ms"]})]})]})]}),s.body?u.jsx("div",{className:"flex-1",children:u.jsxs(hx,{defaultValue:"body",className:"h-full flex flex-col",children:[u.jsxs(yh,{className:"grid w-full grid-cols-2",children:[u.jsx(yi,{value:"body",children:"响应体"}),u.jsx(yi,{value:"headers",children:"响应头"})]}),u.jsx(xi,{value:"body",className:"flex-1 mt-2",children:u.jsx("div",{className:"bg-gray-50 border rounded-md p-3 h-full overflow-auto",children:u.jsx("pre",{className:"text-sm whitespace-pre-wrap",children:s.body})})}),u.jsx(xi,{value:"headers",className:"flex-1 mt-2",children:u.jsx("div",{className:"bg-gray-50 border rounded-md p-3 h-full overflow-auto",children:u.jsx("pre",{className:"text-sm",children:s.headers})})})]})}):u.jsx("div",{className:"flex-1 flex items-center justify-center text-gray-500",children:f?"发送请求中...":"发送请求后将在此显示响应"})]})})]}),u.jsx(Hk,{isOpen:g,onClose:()=>h(!1),onSelectRequest:_})]})}const wx=({children:t})=>t,$k=({children:t})=>t,Fk=K2([{path:"/",element:u.jsx(W2,{to:"/dashboard",replace:!0})},{path:"/login",element:u.jsx($k,{children:u.jsx(Uk,{})})},{path:"/dashboard",element:u.jsx(wx,{children:u.jsx(zk,{})})},{path:"/debug",element:u.jsx(wx,{children:u.jsx(Bk,{})})}],{initialEntries:["/dashboard"]});RN.createRoot(document.getElementById("root")).render(u.jsx(y.StrictMode,{children:u.jsx(uT,{children:u.jsx(kC,{router:Fk})})}));</script>
459
+ <style rel="stylesheet" crossorigin>/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-orange-400:oklch(75% .183 55.934);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-800:oklch(47.6% .114 61.907);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-800:oklch(44.8% .119 151.328);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-500:oklch(71.5% .143 215.221);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-500:oklch(62.7% .265 303.9);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--tracking-widest:.1em;--leading-relaxed:1.625;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*{outline-color:color-mix(in oklab,var(--ring)50%,transparent)}}body{background-color:var(--background);color:var(--foreground)}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background-color:#0000;border-radius:4px}::-webkit-scrollbar-thumb{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){::-webkit-scrollbar-thumb{background-color:color-mix(in oklab,var(--muted-foreground)30%,transparent)}}::-webkit-scrollbar-thumb{border-radius:4px;transition:background-color .2s}::-webkit-scrollbar-thumb:hover{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){::-webkit-scrollbar-thumb:hover{background-color:color-mix(in oklab,var(--muted-foreground)50%,transparent)}}::-webkit-scrollbar-corner{background-color:#0000}*{scrollbar-width:thin;scrollbar-color:oklch(55.6% 0 0) oklch(97% 0 0)}.dark *{scrollbar-color:oklch(70.8% 0 0) oklch(26.9% 0 0)}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.-top-1{top:calc(var(--spacing)*-1)}.top-0{top:calc(var(--spacing)*0)}.top-1\/2{top:50%}.top-4{top:calc(var(--spacing)*4)}.top-\[50\%\]{top:50%}.-right-1{right:calc(var(--spacing)*-1)}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-4{right:calc(var(--spacing)*4)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.left-2\.5{left:calc(var(--spacing)*2.5)}.left-\[50\%\]{left:50%}.z-50{z-index:50}.z-\[9999\]{z-index:9999}.col-span-1{grid-column:span 1/span 1}.col-span-3{grid-column:span 3/span 3}.col-span-5{grid-column:span 5/span 5}.-mx-1{margin-inline:calc(var(--spacing)*-1)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-auto{margin-inline:auto}.mt-0\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-auto{margin-top:auto}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-2{margin-right:calc(var(--spacing)*2)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-3{margin-left:calc(var(--spacing)*3)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.h-1\/2{height:50%}.h-3{height:calc(var(--spacing)*3)}.h-3\/5{height:60%}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-11{height:calc(var(--spacing)*11)}.h-12{height:calc(var(--spacing)*12)}.h-16{height:calc(var(--spacing)*16)}.h-32{height:calc(var(--spacing)*32)}.h-\[90vh\]{height:90vh}.h-\[100vh\]{height:100vh}.h-\[calc\(100vh-4rem\)\]{height:calc(100vh - 4rem)}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-8{max-height:calc(var(--spacing)*8)}.max-h-72{max-height:calc(var(--spacing)*72)}.max-h-80{max-height:calc(var(--spacing)*80)}.max-h-96{max-height:calc(var(--spacing)*96)}.max-h-\[80vh\]{max-height:80vh}.max-h-\[300px\]{max-height:300px}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-\[200px\]{min-height:200px}.min-h-screen{min-height:100vh}.w-2\/5{width:40%}.w-3{width:calc(var(--spacing)*3)}.w-3\/5{width:60%}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-10{width:calc(var(--spacing)*10)}.w-11{width:calc(var(--spacing)*11)}.w-12{width:calc(var(--spacing)*12)}.w-32{width:calc(var(--spacing)*32)}.w-48{width:calc(var(--spacing)*48)}.w-72{width:calc(var(--spacing)*72)}.w-96{width:calc(var(--spacing)*96)}.w-\[--radix-popover-trigger-width\]{width:--radix-popover-trigger-width}.w-\[100vw\]{width:100vw}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:calc(var(--spacing)*0)}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.origin-\(--radix-popover-content-transform-origin\){transform-origin:var(--radix-popover-content-transform-origin)}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-full{--tw-translate-y:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-move{cursor:move}.cursor-pointer{cursor:pointer}.scroll-py-1{scroll-padding-block:calc(var(--spacing)*1)}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0{gap:calc(var(--spacing)*0)}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*1)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-blue-200{border-color:var(--color-blue-200)}.border-blue-600{border-color:var(--color-blue-600)}.border-border{border-color:var(--border)}.border-current{border-color:currentColor}.border-destructive\/50{border-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.border-destructive\/50{border-color:color-mix(in oklab,var(--destructive)50%,transparent)}}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-green-200{border-color:var(--color-green-200)}.border-input{border-color:var(--input)}.border-primary{border-color:var(--primary)}.border-red-200{border-color:var(--color-red-200)}.border-red-500{border-color:var(--color-red-500)}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.border-yellow-200{border-color:var(--color-yellow-200)}.border-t-transparent{border-top-color:#0000}.bg-background{background-color:var(--background)}.bg-black{background-color:var(--color-black)}.bg-black\/0{background-color:#0000}@supports (color:color-mix(in lab,red,red)){.bg-black\/0{background-color:color-mix(in oklab,var(--color-black)0%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-black\/80{background-color:#000c}@supports (color:color-mix(in lab,red,red)){.bg-black\/80{background-color:color-mix(in oklab,var(--color-black)80%,transparent)}}.bg-black\/90{background-color:#000000e6}@supports (color:color-mix(in lab,red,red)){.bg-black\/90{background-color:color-mix(in oklab,var(--color-black)90%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-300{background-color:var(--color-blue-300)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-border{background-color:var(--border)}.bg-card{background-color:var(--card)}.bg-cyan-300{background-color:var(--color-cyan-300)}.bg-cyan-500{background-color:var(--color-cyan-500)}.bg-destructive{background-color:var(--destructive)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-400{background-color:var(--color-green-400)}.bg-green-600{background-color:var(--color-green-600)}.bg-muted{background-color:var(--muted)}.bg-orange-400{background-color:var(--color-orange-400)}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-purple-300{background-color:var(--color-purple-300)}.bg-purple-400{background-color:var(--color-purple-400)}.bg-purple-500{background-color:var(--color-purple-500)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-400{background-color:var(--color-red-400)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-600{background-color:var(--color-red-600)}.bg-secondary,.bg-secondary\/50{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.bg-secondary\/50{background-color:color-mix(in oklab,var(--secondary)50%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.bg-yellow-100{background-color:var(--color-yellow-100)}.bg-yellow-300{background-color:var(--color-yellow-300)}.bg-yellow-500{background-color:var(--color-yellow-500)}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-5{padding-block:calc(var(--spacing)*5)}.py-6{padding-block:calc(var(--spacing)*6)}.py-8{padding-block:calc(var(--spacing)*8)}.pt-0{padding-top:calc(var(--spacing)*0)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-10{padding-right:calc(var(--spacing)*10)}.pb-0{padding-bottom:calc(var(--spacing)*0)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pl-4{padding-left:calc(var(--spacing)*4)}.pl-5{padding-left:calc(var(--spacing)*5)}.pl-8{padding-left:calc(var(--spacing)*8)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-none{--tw-leading:1;line-height:1}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-black{color:var(--color-black)}.text-blue-300{color:var(--color-blue-300)}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-800{color:var(--color-blue-800)}.text-card-foreground{color:var(--card-foreground)}.text-current{color:currentColor}.text-cyan-300{color:var(--color-cyan-300)}.text-cyan-500{color:var(--color-cyan-500)}.text-destructive{color:var(--destructive)}.text-destructive-foreground{color:var(--destructive-foreground)}.text-foreground{color:var(--foreground)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-green-400{color:var(--color-green-400)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-green-800{color:var(--color-green-800)}.text-muted-foreground{color:var(--muted-foreground)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-purple-300{color:var(--color-purple-300)}.text-purple-500{color:var(--color-purple-500)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-white{color:var(--color-white)}.text-yellow-300{color:var(--color-yellow-300)}.text-yellow-500{color:var(--color-yellow-500)}.text-yellow-800{color:var(--color-yellow-800)}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-100{opacity:1}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.select-none{-webkit-user-select:none;user-select:none}.group-data-\[state\=open\]\:rotate-180:is(:where(.group)[data-state=open] *){rotate:180deg}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-70:is(:where(.peer):disabled~*){opacity:.7}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}@media (hover:hover){.hover\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\:scale-\[1\.01\]:hover{scale:1.01}.hover\:scale-\[1\.02\]:hover{scale:1.02}.hover\:bg-accent:hover{background-color:var(--accent)}.hover\:bg-destructive:hover,.hover\:bg-destructive\/80:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/80:hover{background-color:color-mix(in oklab,var(--destructive)80%,transparent)}}.hover\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\:bg-primary\/80:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/80:hover{background-color:color-mix(in oklab,var(--primary)80%,transparent)}}.hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary)90%,transparent)}}.hover\:bg-secondary:hover,.hover\:bg-secondary\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,var(--secondary)80%,transparent)}}.hover\:bg-transparent:hover{background-color:#0000}.hover\:bg-white\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/10:hover{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-blue-800:hover{color:var(--color-blue-800)}.hover\:text-destructive-foreground:hover{color:var(--destructive-foreground)}.hover\:text-gray-700:hover{color:var(--color-gray-700)}.hover\:text-red-700:hover{color:var(--color-red-700)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\:scale-\[1\.01\]:focus{scale:1.01}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:var(--ring)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color:var(--background)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:scale-\[0\.98\]:active{scale:.98}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true]{pointer-events:none}.data-\[disabled\=true\]\:opacity-50[data-disabled=true]{opacity:.5}.data-\[selected\=true\]\:bg-accent[data-selected=true]{background-color:var(--accent)}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:var(--accent-foreground)}:is(.\*\*\:data-\[slot\=command-input-wrapper\]\:h-12 *)[data-slot=command-input-wrapper]{height:calc(var(--spacing)*12)}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:var(--background)}.data-\[state\=active\]\:text-foreground[data-state=active]{color:var(--foreground)}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[state\=checked\]\:translate-x-5[data-state=checked]{--tw-translate-x:calc(var(--spacing)*5);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:var(--primary)}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:var(--accent)}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:var(--input)}@media (min-width:40rem){.sm\:col-span-2{grid-column:span 2/span 2}.sm\:max-w-2xl{max-width:var(--container-2xl)}.sm\:max-w-5xl{max-width:var(--container-5xl)}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}:where(.sm\:space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@media (min-width:48rem){.md\:max-w-6xl{max-width:var(--container-6xl)}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media (min-width:64rem){.lg\:max-w-7xl{max-width:var(--container-7xl)}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.dark\:border-destructive:is(.dark *){border-color:var(--destructive)}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-block:calc(var(--spacing)*1.5)}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:var(--muted-foreground)}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:calc(var(--spacing)*0)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:calc(var(--spacing)*5)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:calc(var(--spacing)*5)}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:calc(var(--spacing)*12)}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-block:calc(var(--spacing)*3)}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:calc(var(--spacing)*5)}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:calc(var(--spacing)*5)}.\[\&_p\]\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\[\&_svg\:not\(\[class\*\=\'text-\'\]\)\]\:text-muted-foreground svg:not([class*=text-]){color:var(--muted-foreground)}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:top-4>svg{top:calc(var(--spacing)*4)}.\[\&\>svg\]\:left-4>svg{left:calc(var(--spacing)*4)}.\[\&\>svg\]\:text-destructive>svg{color:var(--destructive)}.\[\&\>svg\]\:text-foreground>svg{color:var(--foreground)}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y:-3px;translate:var(--tw-translate-x)var(--tw-translate-y)}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:calc(var(--spacing)*7)}}:root{--radius:.625rem;--background:oklch(100% 0 0);--foreground:oklch(14.5% 0 0);--card:oklch(100% 0 0);--card-foreground:oklch(14.5% 0 0);--popover:oklch(100% 0 0);--popover-foreground:oklch(14.5% 0 0);--primary:oklch(20.5% 0 0);--primary-foreground:oklch(98.5% 0 0);--secondary:oklch(97% 0 0);--secondary-foreground:oklch(20.5% 0 0);--muted:oklch(97% 0 0);--muted-foreground:oklch(55.6% 0 0);--accent:oklch(97% 0 0);--accent-foreground:oklch(20.5% 0 0);--destructive:oklch(57.7% .245 27.325);--destructive-foreground:oklch(98.5% 0 0);--border:oklch(92.2% 0 0);--input:oklch(92.2% 0 0);--ring:oklch(70.8% 0 0);--chart-1:oklch(64.6% .222 41.116);--chart-2:oklch(60% .118 184.704);--chart-3:oklch(39.8% .07 227.392);--chart-4:oklch(82.8% .189 84.429);--chart-5:oklch(76.9% .188 70.08);--sidebar:oklch(98.5% 0 0);--sidebar-foreground:oklch(14.5% 0 0);--sidebar-primary:oklch(20.5% 0 0);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(97% 0 0);--sidebar-accent-foreground:oklch(20.5% 0 0);--sidebar-border:oklch(92.2% 0 0);--sidebar-ring:oklch(70.8% 0 0)}.dark{--background:oklch(14.5% 0 0);--foreground:oklch(98.5% 0 0);--card:oklch(20.5% 0 0);--card-foreground:oklch(98.5% 0 0);--popover:oklch(20.5% 0 0);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(92.2% 0 0);--primary-foreground:oklch(20.5% 0 0);--secondary:oklch(26.9% 0 0);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(26.9% 0 0);--muted-foreground:oklch(70.8% 0 0);--accent:oklch(26.9% 0 0);--accent-foreground:oklch(98.5% 0 0);--destructive:oklch(70.4% .191 22.216);--destructive-foreground:oklch(98.5% 0 0);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:oklch(55.6% 0 0);--chart-1:oklch(48.8% .243 264.376);--chart-2:oklch(69.6% .17 162.48);--chart-3:oklch(76.9% .188 70.08);--chart-4:oklch(62.7% .265 303.9);--chart-5:oklch(64.5% .246 16.439);--sidebar:oklch(20.5% 0 0);--sidebar-foreground:oklch(98.5% 0 0);--sidebar-primary:oklch(48.8% .243 264.376);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(26.9% 0 0);--sidebar-accent-foreground:oklch(98.5% 0 0);--sidebar-border:oklch(100% 0 0/.1);--sidebar-ring:oklch(55.6% 0 0)}.debug-button-glyph{cursor:pointer;opacity:.8;background:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23056bfe" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 20v-9"/><path d="M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z"/><path d="M14.12 3.88 16 2"/><path d="M21 21a4 4 0 0 0-3.81-4"/><path d="M21 5a4 4 0 0 1-3.55 3.97"/><path d="M22 13h-4"/><path d="M3 21a4 4 0 0 1 3.81-4"/><path d="M3 5a4 4 0 0 0 3.55 3.97"/><path d="M6 13H2"/><path d="m8 2 1.88 1.88"/><path d="M9 7.13V6a3 3 0 1 1 6 0v1.13"/></svg>') 50%/14px 14px no-repeat;transition:opacity .2s}.debug-button-glyph:hover{opacity:1}.monaco-editor .margin-view-overlays .debug-button-glyph{margin:2px 0;width:16px!important;height:16px!important;display:block!important}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes scaleIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes slideIn{0%{opacity:0;transform:translate(20px)}to{opacity:1;transform:translate(0)}}.animate-fade-in{animation:fadeIn .2s ease-out forwards}.animate-scale-in{animation:scaleIn .2s cubic-bezier(.34,1.56,.64,1) forwards}.animate-slide-in{animation:slideIn .3s cubic-bezier(.34,1.56,.64,1) forwards}.transition-all-ease{transition:all .2s cubic-bezier(.34,1.56,.64,1)}</style>
460
+ </head>
461
+ <body>
462
+ <div id="root"></div>
463
+ </body>
464
+ </html>