536 lines
2.1 MiB
536 lines
2.1 MiB
var Tse=Object.create;var WT=Object.defineProperty;var wse=Object.getOwnPropertyDescriptor;var Cse=Object.getOwnPropertyNames;var Ese=Object.getPrototypeOf,Pse=Object.prototype.hasOwnProperty;var de=(e,t)=>()=>(e&&(t=e(e=0)),t);var ne=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),qb=(e,t)=>{for(var r in t)WT(e,r,{get:t[r],enumerable:!0})},u5=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Cse(t))!Pse.call(e,n)&&n!==r&&WT(e,n,{get:()=>t[n],enumerable:!(a=wse(t,n))||a.enumerable});return e};var N=(e,t,r)=>(r=e!=null?Tse(Ese(e)):{},u5(t||!e||!e.__esModule?WT(r,"default",{value:e,enumerable:!0}):r,e)),Ase=e=>u5(WT({},"__esModule",{value:!0}),e);var d5=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var Ys=(e,t,r)=>(d5(e,t,"read from private field"),r?r.call(e):t.get(e)),f5=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},SI=(e,t,r,a)=>(d5(e,t,"write to private field"),a?a.call(e,r):t.set(e,r),r);function Bse(){let e=[],t=Object.create(null),r;return t.get=(a,n)=>(r?.revoke?.(),n===P5?e:(e.push(n),r=Proxy.revocable(a,t),r.proxy)),Proxy.revocable(Object.create(null),t).proxy}function QT(e,t){let{[P5]:r}=e(Bse());return r.join(t?.keySeparator??".")}var Zt,Hb,p5,Ise,Nse,m5,h5,$b,g5,Lse,YT,Rse,C5,cg,kse,Mse,CI,Dse,_se,Ose,EI,Gb,Fse,ug,bc,dg,JT,E5,P5,y5,TI,fg,ZT,x5,b5,PI,v5,wI,ew,Use,S5,jse,AI,zse,II,T5,w5,XT,Vse,Yp,Rs,iJe,oJe,lJe,cJe,uJe,dJe,fJe,pJe,mJe,hJe,gJe,yJe,xJe,bJe,NI=de(()=>{Zt=e=>typeof e=="string",Hb=()=>{let e,t,r=new Promise((a,n)=>{e=a,t=n});return r.resolve=e,r.reject=t,r},p5=e=>e==null?"":""+e,Ise=(e,t,r)=>{e.forEach(a=>{t[a]&&(r[a]=t[a])})},Nse=/###/g,m5=e=>e&&e.indexOf("###")>-1?e.replace(Nse,"."):e,h5=e=>!e||Zt(e),$b=(e,t,r)=>{let a=Zt(t)?t.split("."):t,n=0;for(;n<a.length-1;){if(h5(e))return{};let s=m5(a[n]);!e[s]&&r&&(e[s]=new r),Object.prototype.hasOwnProperty.call(e,s)?e=e[s]:e={},++n}return h5(e)?{}:{obj:e,k:m5(a[n])}},g5=(e,t,r)=>{let{obj:a,k:n}=$b(e,t,Object);if(a!==void 0||t.length===1){a[n]=r;return}let s=t[t.length-1],i=t.slice(0,t.length-1),o=$b(e,i,Object);for(;o.obj===void 0&&i.length;)s=`${i[i.length-1]}.${s}`,i=i.slice(0,i.length-1),o=$b(e,i,Object),o?.obj&&typeof o.obj[`${o.k}.${s}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${s}`]=r},Lse=(e,t,r,a)=>{let{obj:n,k:s}=$b(e,t,Object);n[s]=n[s]||[],n[s].push(r)},YT=(e,t)=>{let{obj:r,k:a}=$b(e,t);if(r&&Object.prototype.hasOwnProperty.call(r,a))return r[a]},Rse=(e,t,r)=>{let a=YT(e,r);return a!==void 0?a:YT(t,r)},C5=(e,t,r)=>{for(let a in t)a!=="__proto__"&&a!=="constructor"&&(a in e?Zt(e[a])||e[a]instanceof String||Zt(t[a])||t[a]instanceof String?r&&(e[a]=t[a]):C5(e[a],t[a],r):e[a]=t[a]);return e},cg=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),kse={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},Mse=e=>Zt(e)?e.replace(/[&<>"'\/]/g,t=>kse[t]):e,CI=class{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){let r=this.regExpMap.get(t);if(r!==void 0)return r;let a=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,a),this.regExpQueue.push(t),a}},Dse=[" ",",","?","!",";"],_se=new CI(20),Ose=(e,t,r)=>{t=t||"",r=r||"";let a=Dse.filter(i=>t.indexOf(i)<0&&r.indexOf(i)<0);if(a.length===0)return!0;let n=_se.getRegExp(`(${a.map(i=>i==="?"?"\\?":i).join("|")})`),s=!n.test(e);if(!s){let i=e.indexOf(r);i>0&&!n.test(e.substring(0,i))&&(s=!0)}return s},EI=(e,t,r=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let a=t.split(r),n=e;for(let s=0;s<a.length;){if(!n||typeof n!="object")return;let i,o="";for(let l=s;l<a.length;++l)if(l!==s&&(o+=r),o+=a[l],i=n[o],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&l<a.length-1)continue;s+=l-s+1;break}n=i}return n},Gb=e=>e?.replace("_","-"),Fse={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}},ug=class{constructor(t,r={}){this.init(t,r)}init(t,r={}){this.prefix=r.prefix||"i18next:",this.logger=t||Fse,this.options=r,this.debug=r.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,r,a,n){return n&&!this.debug?null:(Zt(t[0])&&(t[0]=`${a}${this.prefix} ${t[0]}`),this.logger[r](t))}create(t){return new ug(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new ug(this.logger,t)}},bc=new ug,dg=class{constructor(){this.observers={}}on(t,r){return t.split(" ").forEach(a=>{this.observers[a]||(this.observers[a]=new Map);let n=this.observers[a].get(r)||0;this.observers[a].set(r,n+1)}),this}off(t,r){if(this.observers[t]){if(!r){delete this.observers[t];return}this.observers[t].delete(r)}}emit(t,...r){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([n,s])=>{for(let i=0;i<s;i++)n(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([n,s])=>{for(let i=0;i<s;i++)n.apply(n,[t,...r])})}},JT=class extends dg{constructor(t,r={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){let r=this.options.ns.indexOf(t);r>-1&&this.options.ns.splice(r,1)}getResource(t,r,a,n={}){let s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,i=n.ignoreJSONStructure!==void 0?n.ignoreJSONStructure:this.options.ignoreJSONStructure,o;t.indexOf(".")>-1?o=t.split("."):(o=[t,r],a&&(Array.isArray(a)?o.push(...a):Zt(a)&&s?o.push(...a.split(s)):o.push(a)));let l=YT(this.data,o);return!l&&!r&&!a&&t.indexOf(".")>-1&&(t=o[0],r=o[1],a=o.slice(2).join(".")),l||!i||!Zt(a)?l:EI(this.data?.[t]?.[r],a,s)}addResource(t,r,a,n,s={silent:!1}){let i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,o=[t,r];a&&(o=o.concat(i?a.split(i):a)),t.indexOf(".")>-1&&(o=t.split("."),n=r,r=o[1]),this.addNamespaces(r),g5(this.data,o,n),s.silent||this.emit("added",t,r,a,n)}addResources(t,r,a,n={silent:!1}){for(let s in a)(Zt(a[s])||Array.isArray(a[s]))&&this.addResource(t,r,s,a[s],{silent:!0});n.silent||this.emit("added",t,r,a)}addResourceBundle(t,r,a,n,s,i={silent:!1,skipCopy:!1}){let o=[t,r];t.indexOf(".")>-1&&(o=t.split("."),n=a,a=r,r=o[1]),this.addNamespaces(r);let l=YT(this.data,o)||{};i.skipCopy||(a=JSON.parse(JSON.stringify(a))),n?C5(l,a,s):l={...l,...a},g5(this.data,o,l),i.silent||this.emit("added",t,r,a)}removeResourceBundle(t,r){this.hasResourceBundle(t,r)&&delete this.data[t][r],this.removeNamespaces(r),this.emit("removed",t,r)}hasResourceBundle(t,r){return this.getResource(t,r)!==void 0}getResourceBundle(t,r){return r||(r=this.options.defaultNS),this.getResource(t,r)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){let r=this.getDataByLanguage(t);return!!(r&&Object.keys(r)||[]).find(n=>r[n]&&Object.keys(r[n]).length>0)}toJSON(){return this.data}},E5={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,a,n){return e.forEach(s=>{t=this.processors[s]?.process(t,r,a,n)??t}),t}},P5=Symbol("i18next/PATH_KEY");y5={},TI=e=>!Zt(e)&&typeof e!="boolean"&&typeof e!="number",fg=class extends dg{constructor(t,r={}){super(),Ise(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=bc.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,r={interpolation:{}}){let a={...r};if(t==null)return!1;let n=this.resolve(t,a);if(n?.res===void 0)return!1;let s=TI(n.res);return!(a.returnObjects===!1&&s)}extractFromKey(t,r){let a=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");let n=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,s=r.ns||this.options.defaultNS||[],i=a&&t.indexOf(a)>-1,o=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!Ose(t,a,n);if(i&&!o){let l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:Zt(s)?[s]:s};let c=t.split(a);(a!==n||a===n&&this.options.ns.indexOf(c[0])>-1)&&(s=c.shift()),t=c.join(n)}return{key:t,namespaces:Zt(s)?[s]:s}}translate(t,r,a){let n=typeof r=="object"?{...r}:r;if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";typeof t=="function"&&(t=QT(t,{...this.options,...n})),Array.isArray(t)||(t=[String(t)]);let s=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(t[t.length-1],n),c=l[l.length-1],u=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;u===void 0&&(u=":");let d=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()==="cimode")return f?s?{res:`${c}${u}${o}`,usedKey:o,exactUsedKey:o,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${u}${o}`:s?{res:o,usedKey:o,exactUsedKey:o,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:o;let p=this.resolve(t,n),m=p?.res,h=p?.usedKey||o,x=p?.exactUsedKey||o,g=["[object Number]","[object Function]","[object RegExp]"],y=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,S=n.count!==void 0&&!Zt(n.count),w=fg.hasDefaultValue(n),P=S?this.pluralResolver.getSuffix(d,n.count,n):"",C=n.ordinal&&S?this.pluralResolver.getSuffix(d,n.count,{ordinal:!1}):"",I=S&&!n.ordinal&&n.count===0,R=I&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${P}`]||n[`defaultValue${C}`]||n.defaultValue,O=m;b&&!m&&w&&(O=R);let D=TI(O),W=Object.prototype.toString.apply(O);if(b&&O&&D&&g.indexOf(W)<0&&!(Zt(y)&&Array.isArray(O))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let J=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,O,{...n,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return s?(p.res=J,p.usedParams=this.getUsedParamsDetails(n),p):J}if(i){let J=Array.isArray(O),me=J?[]:{},Z=J?x:h;for(let q in O)if(Object.prototype.hasOwnProperty.call(O,q)){let V=`${Z}${i}${q}`;w&&!m?me[q]=this.translate(V,{...n,defaultValue:TI(R)?R[q]:void 0,joinArrays:!1,ns:l}):me[q]=this.translate(V,{...n,joinArrays:!1,ns:l}),me[q]===V&&(me[q]=O[q])}m=me}}else if(b&&Zt(y)&&Array.isArray(m))m=m.join(y),m&&(m=this.extendTranslation(m,t,n,a));else{let J=!1,me=!1;!this.isValidLookup(m)&&w&&(J=!0,m=R),this.isValidLookup(m)||(me=!0,m=o);let q=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&me?void 0:m,V=w&&R!==m&&this.options.updateMissing;if(me||J||V){if(this.logger.log(V?"updateKey":"missingKey",d,c,o,V?R:m),i){let ee=this.resolve(o,{...n,keySeparator:!1});ee&&ee.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 L=[],k=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&k&&k[0])for(let ee=0;ee<k.length;ee++)L.push(k[ee]);else this.options.saveMissingTo==="all"?L=this.languageUtils.toResolveHierarchy(n.lng||this.language):L.push(n.lng||this.language);let _=(ee,ie,ae)=>{let ge=w&&ae!==m?ae:q;this.options.missingKeyHandler?this.options.missingKeyHandler(ee,c,ie,ge,V,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(ee,c,ie,ge,V,n),this.emit("missingKey",ee,c,ie,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?L.forEach(ee=>{let ie=this.pluralResolver.getSuffixes(ee,n);I&&n[`defaultValue${this.options.pluralSeparator}zero`]&&ie.indexOf(`${this.options.pluralSeparator}zero`)<0&&ie.push(`${this.options.pluralSeparator}zero`),ie.forEach(ae=>{_([ee],o+ae,n[`defaultValue${ae}`]||R)})}):_(L,o,R))}m=this.extendTranslation(m,t,n,p,a),me&&m===o&&this.options.appendNamespaceToMissingKey&&(m=`${c}${u}${o}`),(me||J)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${u}${o}`:o,J?m:void 0,n))}return s?(p.res=m,p.usedParams=this.getUsedParamsDetails(n),p):m}extendTranslation(t,r,a,n,s){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...a},a.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!a.skipInterpolation){a.interpolation&&this.interpolator.init({...a,interpolation:{...this.options.interpolation,...a.interpolation}});let l=Zt(t)&&(a?.interpolation?.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),c;if(l){let d=t.match(this.interpolator.nestingRegexp);c=d&&d.length}let u=a.replace&&!Zt(a.replace)?a.replace:a;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),t=this.interpolator.interpolate(t,u,a.lng||this.language||n.usedLng,a),l){let d=t.match(this.interpolator.nestingRegexp),f=d&&d.length;c<f&&(a.nest=!1)}!a.lng&&n&&n.res&&(a.lng=this.language||n.usedLng),a.nest!==!1&&(t=this.interpolator.nest(t,(...d)=>s?.[0]===d[0]&&!a.context?(this.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${r[0]}`),null):this.translate(...d,r),a)),a.interpolation&&this.interpolator.reset()}let i=a.postProcess||this.options.postProcess,o=Zt(i)?[i]:i;return t!=null&&o?.length&&a.applyPostProcessor!==!1&&(t=E5.handle(o,t,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(a)},...a}:a,this)),t}resolve(t,r={}){let a,n,s,i,o;return Zt(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(a))return;let c=this.extractFromKey(l,r),u=c.key;n=u;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));let f=r.count!==void 0&&!Zt(r.count),p=f&&!r.ordinal&&r.count===0,m=r.context!==void 0&&(Zt(r.context)||typeof r.context=="number")&&r.context!=="",h=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);d.forEach(x=>{this.isValidLookup(a)||(o=x,!y5[`${h[0]}-${x}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(y5[`${h[0]}-${x}`]=!0,this.logger.warn(`key "${n}" for languages "${h.join(", ")}" won't get resolved as namespace "${o}" 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!!!")),h.forEach(g=>{if(this.isValidLookup(a))return;i=g;let y=[u];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(y,u,g,x,r);else{let S;f&&(S=this.pluralResolver.getSuffix(g,r.count,r));let w=`${this.options.pluralSeparator}zero`,P=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(r.ordinal&&S.indexOf(P)===0&&y.push(u+S.replace(P,this.options.pluralSeparator)),y.push(u+S),p&&y.push(u+w)),m){let C=`${u}${this.options.contextSeparator||"_"}${r.context}`;y.push(C),f&&(r.ordinal&&S.indexOf(P)===0&&y.push(C+S.replace(P,this.options.pluralSeparator)),y.push(C+S),p&&y.push(C+w))}}let b;for(;b=y.pop();)this.isValidLookup(a)||(s=b,a=this.getResource(g,x,b,r))}))})}),{res:a,usedKey:n,exactUsedKey:s,usedLng:i,usedNS:o}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,r,a,n={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,r,a,n):this.resourceStore.getResource(t,r,a,n)}getUsedParamsDetails(t={}){let r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],a=t.replace&&!Zt(t.replace),n=a?t.replace:t;if(a&&typeof t.count<"u"&&(n.count=t.count),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!a){n={...n};for(let s of r)delete n[s]}return n}static hasDefaultValue(t){let r="defaultValue";for(let a in t)if(Object.prototype.hasOwnProperty.call(t,a)&&r===a.substring(0,r.length)&&t[a]!==void 0)return!0;return!1}},ZT=class{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=bc.create("languageUtils")}getScriptPartFromCode(t){if(t=Gb(t),!t||t.indexOf("-")<0)return null;let r=t.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(t){if(t=Gb(t),!t||t.indexOf("-")<0)return t;let r=t.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(t){if(Zt(t)&&t.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(t)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let r;return t.forEach(a=>{if(r)return;let n=this.formatLanguageCode(a);(!this.options.supportedLngs||this.isSupportedCode(n))&&(r=n)}),!r&&this.options.supportedLngs&&t.forEach(a=>{if(r)return;let n=this.getScriptPartFromCode(a);if(this.isSupportedCode(n))return r=n;let s=this.getLanguagePartFromCode(a);if(this.isSupportedCode(s))return r=s;r=this.options.supportedLngs.find(i=>{if(i===s)return i;if(!(i.indexOf("-")<0&&s.indexOf("-")<0)&&(i.indexOf("-")>0&&s.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===s||i.indexOf(s)===0&&s.length>1))return i})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),Zt(t)&&(t=[t]),Array.isArray(t))return t;if(!r)return t.default||[];let a=t[r];return a||(a=t[this.getScriptPartFromCode(r)]),a||(a=t[this.formatLanguageCode(r)]),a||(a=t[this.getLanguagePartFromCode(r)]),a||(a=t.default),a||[]}toResolveHierarchy(t,r){let a=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],t),n=[],s=i=>{i&&(this.isSupportedCode(i)?n.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return Zt(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(t))):Zt(t)&&s(this.formatLanguageCode(t)),a.forEach(i=>{n.indexOf(i)<0&&s(this.formatLanguageCode(i))}),n}},x5={zero:0,one:1,two:2,few:3,many:4,other:5},b5={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})},PI=class{constructor(t,r={}){this.languageUtils=t,this.options=r,this.logger=bc.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,r){this.rules[t]=r}clearCache(){this.pluralRulesCache={}}getRule(t,r={}){let a=Gb(t==="dev"?"en":t),n=r.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:a,type:n});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let i;try{i=new Intl.PluralRules(a,{type:n})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),b5;if(!t.match(/-|_/))return b5;let l=this.languageUtils.getLanguagePartFromCode(t);i=this.getRule(l,r)}return this.pluralRulesCache[s]=i,i}needsPlural(t,r={}){let a=this.getRule(t,r);return a||(a=this.getRule("dev",r)),a?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,r,a={}){return this.getSuffixes(t,a).map(n=>`${r}${n}`)}getSuffixes(t,r={}){let a=this.getRule(t,r);return a||(a=this.getRule("dev",r)),a?a.resolvedOptions().pluralCategories.sort((n,s)=>x5[n]-x5[s]).map(n=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${n}`):[]}getSuffix(t,r,a={}){let n=this.getRule(t,a);return n?`${this.options.prepend}${a.ordinal?`ordinal${this.options.prepend}`:""}${n.select(r)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",r,a))}},v5=(e,t,r,a=".",n=!0)=>{let s=Rse(e,t,r);return!s&&n&&Zt(r)&&(s=EI(e,r,a),s===void 0&&(s=EI(t,r,a))),s},wI=e=>e.replace(/\$/g,"$$$$"),ew=class{constructor(t={}){this.logger=bc.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(r=>r),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});let{escape:r,escapeValue:a,useRawValueToEscape:n,prefix:s,prefixEscaped:i,suffix:o,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:p,nestingSuffix:m,nestingSuffixEscaped:h,nestingOptionsSeparator:x,maxReplaces:g,alwaysFormat:y}=t.interpolation;this.escape=r!==void 0?r:Mse,this.escapeValue=a!==void 0?a:!0,this.useRawValueToEscape=n!==void 0?n:!1,this.prefix=s?cg(s):i||"{{",this.suffix=o?cg(o):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=f?cg(f):p||cg("$t("),this.nestingSuffix=m?cg(m):h||cg(")"),this.nestingOptionsSeparator=x||",",this.maxReplaces=g||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let t=(r,a)=>r?.source===a?(r.lastIndex=0,r):new RegExp(a,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,r,a,n){let s,i,o,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=p=>{if(p.indexOf(this.formatSeparator)<0){let g=v5(r,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(g,void 0,a,{...n,...r,interpolationkey:p}):g}let m=p.split(this.formatSeparator),h=m.shift().trim(),x=m.join(this.formatSeparator).trim();return this.format(v5(r,l,h,this.options.keySeparator,this.options.ignoreJSONStructure),x,a,{...n,...r,interpolationkey:h})};this.resetRegExp();let u=n?.missingInterpolationHandler||this.options.missingInterpolationHandler,d=n?.interpolation?.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>wI(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?wI(this.escape(p)):wI(p)}].forEach(p=>{for(o=0;s=p.regex.exec(t);){let m=s[1].trim();if(i=c(m),i===void 0)if(typeof u=="function"){let x=u(t,s,n);i=Zt(x)?x:""}else if(n&&Object.prototype.hasOwnProperty.call(n,m))i="";else if(d){i=s[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${t}`),i="";else!Zt(i)&&!this.useRawValueToEscape&&(i=p5(i));let h=p.safeValue(i);if(t=t.replace(s[0],h),d?(p.regex.lastIndex+=i.length,p.regex.lastIndex-=s[0].length):p.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),t}nest(t,r,a={}){let n,s,i,o=(l,c)=>{let u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;let d=l.split(new RegExp(`${u}[ ]*{`)),f=`{${d[1]}`;l=d[0],f=this.interpolate(f,i);let p=f.match(/'/g),m=f.match(/"/g);((p?.length??0)%2===0&&!m||m.length%2!==0)&&(f=f.replace(/'/g,'"'));try{i=JSON.parse(f),c&&(i={...c,...i})}catch(h){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,h),`${l}${u}${f}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,l};for(;n=this.nestingRegexp.exec(t);){let l=[];i={...a},i=i.replace&&!Zt(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let c=/{.*}/.test(n[1])?n[1].lastIndexOf("}")+1:n[1].indexOf(this.formatSeparator);if(c!==-1&&(l=n[1].slice(c).split(this.formatSeparator).map(u=>u.trim()).filter(Boolean),n[1]=n[1].slice(0,c)),s=r(o.call(this,n[1].trim(),i),i),s&&n[0]===t&&!Zt(s))return s;Zt(s)||(s=p5(s)),s||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${t}`),s=""),l.length&&(s=l.reduce((u,d)=>this.format(u,d,a.lng,{...a,interpolationkey:n[1].trim()}),s.trim())),t=t.replace(n[0],s),this.regexp.lastIndex=0}return t}},Use=e=>{let t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){let a=e.split("(");t=a[0].toLowerCase().trim();let n=a[1].substring(0,a[1].length-1);t==="currency"&&n.indexOf(":")<0?r.currency||(r.currency=n.trim()):t==="relativetime"&&n.indexOf(":")<0?r.range||(r.range=n.trim()):n.split(";").forEach(i=>{if(i){let[o,...l]=i.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=o.trim();r[u]||(r[u]=c),c==="false"&&(r[u]=!1),c==="true"&&(r[u]=!0),isNaN(c)||(r[u]=parseInt(c,10))}})}return{formatName:t,formatOptions:r}},S5=e=>{let t={};return(r,a,n)=>{let s=n;n&&n.interpolationkey&&n.formatParams&&n.formatParams[n.interpolationkey]&&n[n.interpolationkey]&&(s={...s,[n.interpolationkey]:void 0});let i=a+JSON.stringify(s),o=t[i];return o||(o=e(Gb(a),n),t[i]=o),o(r)}},jse=e=>(t,r,a)=>e(Gb(r),a)(t),AI=class{constructor(t={}){this.logger=bc.create("formatter"),this.options=t,this.init(t)}init(t,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";let a=r.cacheInBuiltFormats?S5:jse;this.formats={number:a((n,s)=>{let i=new Intl.NumberFormat(n,{...s});return o=>i.format(o)}),currency:a((n,s)=>{let i=new Intl.NumberFormat(n,{...s,style:"currency"});return o=>i.format(o)}),datetime:a((n,s)=>{let i=new Intl.DateTimeFormat(n,{...s});return o=>i.format(o)}),relativetime:a((n,s)=>{let i=new Intl.RelativeTimeFormat(n,{...s});return o=>i.format(o,s.range||"day")}),list:a((n,s)=>{let i=new Intl.ListFormat(n,{...s});return o=>i.format(o)})}}add(t,r){this.formats[t.toLowerCase().trim()]=r}addCached(t,r){this.formats[t.toLowerCase().trim()]=S5(r)}format(t,r,a,n={}){let s=r.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(o=>o.indexOf(")")>-1)){let o=s.findIndex(l=>l.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,o)].join(this.formatSeparator)}return s.reduce((o,l)=>{let{formatName:c,formatOptions:u}=Use(l);if(this.formats[c]){let d=o;try{let f=n?.formatParams?.[n.interpolationkey]||{},p=f.locale||f.lng||n.locale||n.lng||a;d=this.formats[c](o,p,{...u,...n,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${c}`);return o},t)}},zse=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},II=class extends dg{constructor(t,r,a,n={}){super(),this.backend=t,this.store=r,this.services=a,this.languageUtils=a.languageUtils,this.options=n,this.logger=bc.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=n.maxParallelReads||10,this.readingCalls=0,this.maxRetries=n.maxRetries>=0?n.maxRetries:5,this.retryTimeout=n.retryTimeout>=1?n.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(a,n.backend,n)}queueLoad(t,r,a,n){let s={},i={},o={},l={};return t.forEach(c=>{let u=!0;r.forEach(d=>{let f=`${c}|${d}`;!a.reload&&this.store.hasResourceBundle(c,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?i[f]===void 0&&(i[f]=!0):(this.state[f]=1,u=!1,i[f]===void 0&&(i[f]=!0),s[f]===void 0&&(s[f]=!0),l[d]===void 0&&(l[d]=!0)))}),u||(o[c]=!0)}),(Object.keys(s).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(s),pending:Object.keys(i),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(t,r,a){let n=t.split("|"),s=n[0],i=n[1];r&&this.emit("failedLoading",s,i,r),!r&&a&&this.store.addResourceBundle(s,i,a,void 0,void 0,{skipCopy:!0}),this.state[t]=r?-1:2,r&&a&&(this.state[t]=0);let o={};this.queue.forEach(l=>{Lse(l.loaded,[s],i),zse(l,t),r&&l.errors.push(r),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{o[c]||(o[c]={});let u=l.loaded[c];u.length&&u.forEach(d=>{o[c][d]===void 0&&(o[c][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(t,r,a,n=0,s=this.retryTimeout,i){if(!t.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:r,fcName:a,tried:n,wait:s,callback:i});return}this.readingCalls++;let o=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){let d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&u&&n<this.maxRetries){setTimeout(()=>{this.read.call(this,t,r,a,n+1,s*2,i)},s);return}i(c,u)},l=this.backend[a].bind(this.backend);if(l.length===2){try{let c=l(t,r);c&&typeof c.then=="function"?c.then(u=>o(null,u)).catch(o):o(null,c)}catch(c){o(c)}return}return l(t,r,o)}prepareLoading(t,r,a={},n){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();Zt(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Zt(r)&&(r=[r]);let s=this.queueLoad(t,r,a,n);if(!s.toLoad.length)return s.pending.length||n(),null;s.toLoad.forEach(i=>{this.loadOne(i)})}load(t,r,a){this.prepareLoading(t,r,{},a)}reload(t,r,a){this.prepareLoading(t,r,{reload:!0},a)}loadOne(t,r=""){let a=t.split("|"),n=a[0],s=a[1];this.read(n,s,"read",void 0,void 0,(i,o)=>{i&&this.logger.warn(`${r}loading namespace ${s} for language ${n} failed`,i),!i&&o&&this.logger.log(`${r}loaded namespace ${s} for language ${n}`,o),this.loaded(t,i,o)})}saveMissing(t,r,a,n,s,i={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${a}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(a==null||a==="")){if(this.backend?.create){let l={...i,isUpdate:s},c=this.backend.create.bind(this.backend);if(c.length<6)try{let u;c.length===5?u=c(t,r,a,n,l):u=c(t,r,a,n),u&&typeof u.then=="function"?u.then(d=>o(null,d)).catch(o):o(null,u)}catch(u){o(u)}else c(t,r,a,n,o,l)}!t||!t[0]||this.store.addResource(t[0],r,a,n)}}},T5=()=>({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:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Zt(e[1])&&(t.defaultValue=e[1]),Zt(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){let r=e[3]||e[2];Object.keys(r).forEach(a=>{t[a]=r[a]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),w5=e=>(Zt(e.ns)&&(e.ns=[e.ns]),Zt(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Zt(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),XT=()=>{},Vse=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(r=>{typeof e[r]=="function"&&(e[r]=e[r].bind(e))})},Yp=class extends dg{constructor(t={},r){if(super(),this.options=w5(t),this.services={},this.logger=bc,this.modules={external:[]},Vse(this),r&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,r),this;setTimeout(()=>{this.init(t,r)},0)}}init(t={},r){this.isInitializing=!0,typeof t=="function"&&(r=t,t={}),t.defaultNS==null&&t.ns&&(Zt(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));let a=T5();this.options={...a,...this.options,...w5(t)},this.options.interpolation={...a.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=a.overloadTranslationOptionHandler);let n=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?bc.init(n(this.modules.logger),this.options):bc.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=AI;let u=new ZT(this.options);this.store=new JT(this.options.resources,this.options);let d=this.services;d.logger=bc,d.resourceStore=this.store,d.languageUtils=u,d.pluralResolver=new PI(u,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==a.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),c&&(!this.options.interpolation.format||this.options.interpolation.format===a.interpolation.format)&&(d.formatter=n(c),d.formatter.init&&d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new ew(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new II(n(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",(p,...m)=>{this.emit(p,...m)}),this.modules.languageDetector&&(d.languageDetector=n(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=n(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new fg(this.services,this.options),this.translator.on("*",(p,...m)=>{this.emit(p,...m)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=XT),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[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(c=>{this[c]=(...u)=>this.store[c](...u)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...u)=>(this.store[c](...u),this)});let o=Hb(),l=()=>{let c=(u,d)=>{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),o.resolve(d),r(u,d)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),o}loadResources(t,r=XT){let a=r,n=Zt(t)?t:this.language;if(typeof t=="function"&&(a=t),!this.options.resources||this.options.partialBundledLanguages){if(n?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return a();let s=[],i=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(c=>{c!=="cimode"&&s.indexOf(c)<0&&s.push(c)})};n?i(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>i(l)),this.options.preload?.forEach?.(o=>i(o)),this.services.backendConnector.load(s,this.options.ns,o=>{!o&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),a(o)})}else a(null)}reloadResources(t,r,a){let n=Hb();return typeof t=="function"&&(a=t,t=void 0),typeof r=="function"&&(a=r,r=void 0),t||(t=this.languages),r||(r=this.options.ns),a||(a=XT),this.services.backendConnector.reload(t,r,s=>{n.resolve(),a(s)}),n}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&E5.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let r=0;r<this.languages.length;r++){let a=this.languages[r];if(!(["cimode","dev"].indexOf(a)>-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,r){this.isLanguageChangingTo=t;let a=Hb();this.emit("languageChanging",t);let n=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},s=(o,l)=>{l?this.isLanguageChangingTo===t&&(n(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,a.resolve((...c)=>this.t(...c)),r&&r(o,(...c)=>this.t(...c))},i=o=>{!t&&!o&&this.services.languageDetector&&(o=[]);let l=Zt(o)?o:o&&o[0],c=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(Zt(o)?[o]:o);c&&(this.language||n(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector?.cacheUserLanguage?.(c)),this.loadResources(c,u=>{s(u,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?i(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(t),a}getFixedT(t,r,a){let n=(s,i,...o)=>{let l;typeof i!="object"?l=this.options.overloadTranslationOptionHandler([s,i].concat(o)):l={...i},l.lng=l.lng||n.lng,l.lngs=l.lngs||n.lngs,l.ns=l.ns||n.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||a||n.keyPrefix);let c=this.options.keySeparator||".",u;return l.keyPrefix&&Array.isArray(s)?u=s.map(d=>(typeof d=="function"&&(d=QT(d,{...this.options,...i})),`${l.keyPrefix}${c}${d}`)):(typeof s=="function"&&(s=QT(s,{...this.options,...i})),u=l.keyPrefix?`${l.keyPrefix}${c}${s}`:s),this.t(u,l)};return Zt(t)?n.lng=t:n.lngs=t,n.ns=r,n.keyPrefix=a,n}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,r={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;let a=r.lng||this.resolvedLanguage||this.languages[0],n=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(a.toLowerCase()==="cimode")return!0;let i=(o,l)=>{let c=this.services.backendConnector.state[`${o}|${l}`];return c===-1||c===0||c===2};if(r.precheck){let o=r.precheck(this,i);if(o!==void 0)return o}return!!(this.hasResourceBundle(a,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(a,t)&&(!n||i(s,t)))}loadNamespaces(t,r){let a=Hb();return this.options.ns?(Zt(t)&&(t=[t]),t.forEach(n=>{this.options.ns.indexOf(n)<0&&this.options.ns.push(n)}),this.loadResources(n=>{a.resolve(),r&&r(n)}),a):(r&&r(),Promise.resolve())}loadLanguages(t,r){let a=Hb();Zt(t)&&(t=[t]);let n=this.options.preload||[],s=t.filter(i=>n.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return s.length?(this.options.preload=n.concat(s),this.loadResources(i=>{a.resolve(),r&&r(i)}),a):(r&&r(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{let n=new Intl.Locale(t);if(n&&n.getTextInfo){let s=n.getTextInfo();if(s&&s.direction)return s.direction}}catch{}let r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],a=this.services?.languageUtils||new ZT(T5());return t.toLowerCase().indexOf("-latn")>1?"ltr":r.indexOf(a.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},r){let a=new Yp(t,r);return a.createInstance=Yp.createInstance,a}cloneInstance(t={},r=XT){let a=t.forkResourceStore;a&&delete t.forkResourceStore;let n={...this.options,...t,isClone:!0},s=new Yp(n);if((t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(o=>{s[o]=this[o]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},a){let o=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},l[c]=Object.keys(l[c]).reduce((u,d)=>(u[d]={...l[c][d]},u),l[c]),l),{});s.store=new JT(o,n),s.services.resourceStore=s.store}return t.interpolation&&(s.services.interpolator=new ew(n)),s.translator=new fg(s.services,n),s.translator.on("*",(o,...l)=>{s.emit(o,...l)}),s.init(n,r),s.translator.options=n,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}},Rs=Yp.createInstance(),iJe=Rs.createInstance,oJe=Rs.dir,lJe=Rs.init,cJe=Rs.loadResources,uJe=Rs.reloadResources,dJe=Rs.use,fJe=Rs.changeLanguage,pJe=Rs.getFixedT,mJe=Rs.t,hJe=Rs.exists,gJe=Rs.setDefaultNamespace,yJe=Rs.hasLoadedNamespace,xJe=Rs.loadNamespaces,bJe=Rs.loadLanguages});var F5=ne(or=>{"use strict";var kI=Symbol.for("react.transitional.element"),qse=Symbol.for("react.portal"),Hse=Symbol.for("react.fragment"),$se=Symbol.for("react.strict_mode"),Gse=Symbol.for("react.profiler"),Kse=Symbol.for("react.consumer"),Wse=Symbol.for("react.context"),Xse=Symbol.for("react.forward_ref"),Yse=Symbol.for("react.suspense"),Jse=Symbol.for("react.memo"),R5=Symbol.for("react.lazy"),Qse=Symbol.for("react.activity"),A5=Symbol.iterator;function Zse(e){return e===null||typeof e!="object"?null:(e=A5&&e[A5]||e["@@iterator"],typeof e=="function"?e:null)}var k5={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M5=Object.assign,D5={};function mg(e,t,r){this.props=e,this.context=t,this.refs=D5,this.updater=r||k5}mg.prototype.isReactComponent={};mg.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};mg.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function _5(){}_5.prototype=mg.prototype;function MI(e,t,r){this.props=e,this.context=t,this.refs=D5,this.updater=r||k5}var DI=MI.prototype=new _5;DI.constructor=MI;M5(DI,mg.prototype);DI.isPureReactComponent=!0;var I5=Array.isArray;function RI(){}var ka={H:null,A:null,T:null,S:null},O5=Object.prototype.hasOwnProperty;function _I(e,t,r){var a=r.ref;return{$$typeof:kI,type:e,key:t,ref:a!==void 0?a:null,props:r}}function eie(e,t){return _I(e.type,t,e.props)}function OI(e){return typeof e=="object"&&e!==null&&e.$$typeof===kI}function tie(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var N5=/\/+/g;function LI(e,t){return typeof e=="object"&&e!==null&&e.key!=null?tie(""+e.key):t.toString(36)}function rie(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(RI,RI):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function pg(e,t,r,a,n){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(s){case"bigint":case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case kI:case qse:i=!0;break;case R5:return i=e._init,pg(i(e._payload),t,r,a,n)}}if(i)return n=n(e),i=a===""?"."+LI(e,0):a,I5(n)?(r="",i!=null&&(r=i.replace(N5,"$&/")+"/"),pg(n,t,r,"",function(c){return c})):n!=null&&(OI(n)&&(n=eie(n,r+(n.key==null||e&&e.key===n.key?"":(""+n.key).replace(N5,"$&/")+"/")+i)),t.push(n)),1;i=0;var o=a===""?".":a+":";if(I5(e))for(var l=0;l<e.length;l++)a=e[l],s=o+LI(a,l),i+=pg(a,t,r,s,n);else if(l=Zse(e),typeof l=="function")for(e=l.call(e),l=0;!(a=e.next()).done;)a=a.value,s=o+LI(a,l++),i+=pg(a,t,r,s,n);else if(s==="object"){if(typeof e.then=="function")return pg(rie(e),t,r,a,n);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return i}function tw(e,t,r){if(e==null)return e;var a=[],n=0;return pg(e,a,"","",function(s){return t.call(r,s,n++)}),a}function aie(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var L5=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}},nie={map:tw,forEach:function(e,t,r){tw(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return tw(e,function(){t++}),t},toArray:function(e){return tw(e,function(t){return t})||[]},only:function(e){if(!OI(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};or.Activity=Qse;or.Children=nie;or.Component=mg;or.Fragment=Hse;or.Profiler=Gse;or.PureComponent=MI;or.StrictMode=$se;or.Suspense=Yse;or.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ka;or.__COMPILER_RUNTIME={__proto__:null,c:function(e){return ka.H.useMemoCache(e)}};or.cache=function(e){return function(){return e.apply(null,arguments)}};or.cacheSignal=function(){return null};or.cloneElement=function(e,t,r){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var a=M5({},e.props),n=e.key;if(t!=null)for(s in t.key!==void 0&&(n=""+t.key),t)!O5.call(t,s)||s==="key"||s==="__self"||s==="__source"||s==="ref"&&t.ref===void 0||(a[s]=t[s]);var s=arguments.length-2;if(s===1)a.children=r;else if(1<s){for(var i=Array(s),o=0;o<s;o++)i[o]=arguments[o+2];a.children=i}return _I(e.type,n,a)};or.createContext=function(e){return e={$$typeof:Wse,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:Kse,_context:e},e};or.createElement=function(e,t,r){var a,n={},s=null;if(t!=null)for(a in t.key!==void 0&&(s=""+t.key),t)O5.call(t,a)&&a!=="key"&&a!=="__self"&&a!=="__source"&&(n[a]=t[a]);var i=arguments.length-2;if(i===1)n.children=r;else if(1<i){for(var o=Array(i),l=0;l<i;l++)o[l]=arguments[l+2];n.children=o}if(e&&e.defaultProps)for(a in i=e.defaultProps,i)n[a]===void 0&&(n[a]=i[a]);return _I(e,s,n)};or.createRef=function(){return{current:null}};or.forwardRef=function(e){return{$$typeof:Xse,render:e}};or.isValidElement=OI;or.lazy=function(e){return{$$typeof:R5,_payload:{_status:-1,_result:e},_init:aie}};or.memo=function(e,t){return{$$typeof:Jse,type:e,compare:t===void 0?null:t}};or.startTransition=function(e){var t=ka.T,r={};ka.T=r;try{var a=e(),n=ka.S;n!==null&&n(r,a),typeof a=="object"&&a!==null&&typeof a.then=="function"&&a.then(RI,L5)}catch(s){L5(s)}finally{t!==null&&r.types!==null&&(t.types=r.types),ka.T=t}};or.unstable_useCacheRefresh=function(){return ka.H.useCacheRefresh()};or.use=function(e){return ka.H.use(e)};or.useActionState=function(e,t,r){return ka.H.useActionState(e,t,r)};or.useCallback=function(e,t){return ka.H.useCallback(e,t)};or.useContext=function(e){return ka.H.useContext(e)};or.useDebugValue=function(){};or.useDeferredValue=function(e,t){return ka.H.useDeferredValue(e,t)};or.useEffect=function(e,t){return ka.H.useEffect(e,t)};or.useEffectEvent=function(e){return ka.H.useEffectEvent(e)};or.useId=function(){return ka.H.useId()};or.useImperativeHandle=function(e,t,r){return ka.H.useImperativeHandle(e,t,r)};or.useInsertionEffect=function(e,t){return ka.H.useInsertionEffect(e,t)};or.useLayoutEffect=function(e,t){return ka.H.useLayoutEffect(e,t)};or.useMemo=function(e,t){return ka.H.useMemo(e,t)};or.useOptimistic=function(e,t){return ka.H.useOptimistic(e,t)};or.useReducer=function(e,t,r){return ka.H.useReducer(e,t,r)};or.useRef=function(e){return ka.H.useRef(e)};or.useState=function(e){return ka.H.useState(e)};or.useSyncExternalStore=function(e,t,r){return ka.H.useSyncExternalStore(e,t,r)};or.useTransition=function(){return ka.H.useTransition()};or.version="19.2.0"});var Le=ne((TJe,B5)=>{"use strict";B5.exports=F5()});var j5=ne((wJe,U5)=>{U5.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}});var sie,z5=de(()=>{sie=N(j5())});var rw,V5,hg,q5,aw,FI,H5,jl,BI,gg=de(()=>{rw=(e,t,r,a)=>{let n=[r,{code:t,...a||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(n,"warn","react-i18next::",!0);jl(n[0])&&(n[0]=`react-i18next:: ${n[0]}`),e?.services?.logger?.warn&&e.services.logger.warn(...n)},V5={},hg=(e,t,r,a)=>{jl(r)&&V5[r]||(jl(r)&&(V5[r]=new Date),rw(e,t,r,a))},q5=(e,t)=>()=>{if(e.isInitialized)t();else{let r=()=>{setTimeout(()=>{e.off("initialized",r)},0),t()};e.on("initialized",r)}},aw=(e,t,r)=>{e.loadNamespaces(t,q5(e,r))},FI=(e,t,r,a)=>{if(jl(r)&&(r=[r]),e.options.preload&&e.options.preload.indexOf(t)>-1)return aw(e,r,a);r.forEach(n=>{e.options.ns.indexOf(n)<0&&e.options.ns.push(n)}),e.loadLanguages(t,q5(e,a))},H5=(e,t,r={})=>!t.languages||!t.languages.length?(hg(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:r.lng,precheck:(a,n)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&a.services.backendConnector.backend&&a.isLanguageChangingTo&&!n(a.isLanguageChangingTo,e))return!1}}),jl=e=>typeof e=="string",BI=e=>typeof e=="object"&&e!==null});var iie,oie,lie,UI,jI=de(()=>{iie=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,oie={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"\xA9","©":"\xA9","®":"\xAE","®":"\xAE","…":"\u2026","…":"\u2026","/":"/","/":"/"},lie=e=>oie[e],UI=e=>e.replace(iie,lie)});var zI,nw,Kb,Wb=de(()=>{jI();zI={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:UI,transDefaultProps:void 0},nw=(e={})=>{zI={...zI,...e}},Kb=()=>zI});var $5,sw,zl,yg=de(()=>{sw=e=>{$5=e},zl=()=>$5});var Xb,VI=de(()=>{Xb=N(Le(),1);NI();z5();gg();Wb();yg();jI()});var iw,qI=de(()=>{Wb();yg();iw={type:"3rdParty",init(e){nw(e.options.react),sw(e)}}});var G5,Vd,ow,qd=de(()=>{G5=N(Le(),1);Wb();yg();qI();Vd=(0,G5.createContext)(),ow=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}});var uie,K5=de(()=>{uie=N(Le(),1);VI();qd()});var Hd,HI=de(()=>{Hd=class extends Error{constructor(t,r,a){super(t),this.name="TranslationParserError",this.position=r,this.translationString=a,Error.captureStackTrace&&Error.captureStackTrace(this,Hd)}}});var W5,die,X5,$I=de(()=>{W5={" ":"\xA0","&":"&","<":"<",">":">",""":'"',"'":"'","©":"\xA9","®":"\xAE","™":"\u2122","…":"\u2026","–":"\u2013","—":"\u2014","‘":"\u2018","’":"\u2019","‚":"\u201A","“":"\u201C","”":"\u201D","„":"\u201E","†":"\u2020","‡":"\u2021","•":"\u2022","′":"\u2032","″":"\u2033","‹":"\u2039","›":"\u203A","§":"\xA7","¶":"\xB6","·":"\xB7"," ":"\u2002"," ":"\u2003"," ":"\u2009","€":"\u20AC","£":"\xA3","¥":"\xA5","¢":"\xA2","¤":"\xA4","×":"\xD7","÷":"\xF7","−":"\u2212","±":"\xB1","≠":"\u2260","≤":"\u2264","≥":"\u2265","≈":"\u2248","≡":"\u2261","∞":"\u221E","∫":"\u222B","∑":"\u2211","∏":"\u220F","√":"\u221A","∂":"\u2202","‰":"\u2030","°":"\xB0","µ":"\xB5","←":"\u2190","↑":"\u2191","→":"\u2192","↓":"\u2193","↔":"\u2194","↵":"\u21B5","⇐":"\u21D0","⇑":"\u21D1","⇒":"\u21D2","⇓":"\u21D3","⇔":"\u21D4","α":"\u03B1","β":"\u03B2","γ":"\u03B3","δ":"\u03B4","ε":"\u03B5","ζ":"\u03B6","η":"\u03B7","θ":"\u03B8","ι":"\u03B9","κ":"\u03BA","λ":"\u03BB","μ":"\u03BC","ν":"\u03BD","ξ":"\u03BE","ο":"\u03BF","π":"\u03C0","ρ":"\u03C1","σ":"\u03C3","τ":"\u03C4","υ":"\u03C5","φ":"\u03C6","χ":"\u03C7","ψ":"\u03C8","ω":"\u03C9","Α":"\u0391","Β":"\u0392","Γ":"\u0393","Δ":"\u0394","Ε":"\u0395","Ζ":"\u0396","Η":"\u0397","Θ":"\u0398","Ι":"\u0399","Κ":"\u039A","Λ":"\u039B","Μ":"\u039C","Ν":"\u039D","Ξ":"\u039E","Ο":"\u039F","Π":"\u03A0","Ρ":"\u03A1","Σ":"\u03A3","Τ":"\u03A4","Υ":"\u03A5","Φ":"\u03A6","Χ":"\u03A7","Ψ":"\u03A8","Ω":"\u03A9","À":"\xC0","Á":"\xC1","Â":"\xC2","Ã":"\xC3","Ä":"\xC4","Å":"\xC5","Æ":"\xC6","Ç":"\xC7","È":"\xC8","É":"\xC9","Ê":"\xCA","Ë":"\xCB","Ì":"\xCC","Í":"\xCD","Î":"\xCE","Ï":"\xCF","Ð":"\xD0","Ñ":"\xD1","Ò":"\xD2","Ó":"\xD3","Ô":"\xD4","Õ":"\xD5","Ö":"\xD6","Ø":"\xD8","Ù":"\xD9","Ú":"\xDA","Û":"\xDB","Ü":"\xDC","Ý":"\xDD","Þ":"\xDE","ß":"\xDF","à":"\xE0","á":"\xE1","â":"\xE2","ã":"\xE3","ä":"\xE4","å":"\xE5","æ":"\xE6","ç":"\xE7","è":"\xE8","é":"\xE9","ê":"\xEA","ë":"\xEB","ì":"\xEC","í":"\xED","î":"\xEE","ï":"\xEF","ð":"\xF0","ñ":"\xF1","ò":"\xF2","ó":"\xF3","ô":"\xF4","õ":"\xF5","ö":"\xF6","ø":"\xF8","ù":"\xF9","ú":"\xFA","û":"\xFB","ü":"\xFC","ý":"\xFD","þ":"\xFE","ÿ":"\xFF","¡":"\xA1","¿":"\xBF","ƒ":"\u0192","ˆ":"\u02C6","˜":"\u02DC","Œ":"\u0152","œ":"\u0153","Š":"\u0160","š":"\u0161","Ÿ":"\u0178","ª":"\xAA","º":"\xBA","¯":"\xAF","´":"\xB4","¸":"\xB8","¹":"\xB9","²":"\xB2","³":"\xB3","¼":"\xBC","½":"\xBD","¾":"\xBE","♠":"\u2660","♣":"\u2663","♥":"\u2665","♦":"\u2666","◊":"\u25CA","‾":"\u203E","⁄":"\u2044","℘":"\u2118","ℑ":"\u2111","ℜ":"\u211C","ℵ":"\u2135"},die=new RegExp(Object.keys(W5).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),"g"),X5=e=>e.replace(die,t=>W5[t]).replace(/&#(\d+);/g,(t,r)=>String.fromCharCode(parseInt(r,10))).replace(/&#x([0-9a-fA-F]+);/g,(t,r)=>String.fromCharCode(parseInt(r,16)))});var Y5,GI=de(()=>{Y5=e=>{let t=[],r=0,a="",n=()=>{a&&(t.push({type:"Text",value:a,position:r-a.length}),a="")};for(;r<e.length;){let s=e[r];if(s==="<"){let i=e.slice(r).match(/^<(\d+)>/);if(i)n(),t.push({type:"TagOpen",value:i[0],position:r,tagNumber:parseInt(i[1],10)}),r+=i[0].length;else{let o=e.slice(r).match(/^<\/(\d+)>/);o?(n(),t.push({type:"TagClose",value:o[0],position:r,tagNumber:parseInt(o[1],10)}),r+=o[0].length):(a+=s,r+=1)}}else a+=s,r+=1}return n(),t}});var Yb,fie,J5,Q5=de(()=>{Yb=N(Le(),1);HI();GI();$I();fie=(e,t,r)=>{let{type:a,props:n={}}=e;if(n.children&&Array.isArray(n.children)&&r){let{children:s,...i}=n;return Yb.default.createElement(a,i,...t)}return t.length===0?Yb.default.createElement(a,n):t.length===1?Yb.default.createElement(a,n,t[0]):Yb.default.createElement(a,n,...t)},J5=(e,t=[])=>{if(!e)return[];let r=Y5(e),a=[],n=[],s=new Set,i=()=>{if(n.length===0)return t;let o=n[n.length-1];return o.declaration.props?.children&&Array.isArray(o.declaration.props.children)?o.declaration.props.children:o.declarations};if(r.forEach(o=>{switch(o.type){case"Text":{let l=X5(o.value);(n.length>0?n[n.length-1].children:a).push(l)}break;case"TagOpen":{let{tagNumber:l}=o,c=i(),u=c[l];if(!u){s.add(l);let d=`<${l}>`;(n.length>0?n[n.length-1].children:a).push(d);break}n.push({tagNumber:l,children:[],position:o.position,declaration:u,declarations:c})}break;case"TagClose":{let{tagNumber:l}=o;if(s.has(l)){let f=`</${l}>`;(n.length>0?n[n.length-1].children:a).push(f),s.delete(l);break}if(n.length===0)throw new Hd(`Unexpected closing tag </${l}> at position ${o.position}`,o.position,e);let c=n.pop();if(c.tagNumber!==l)throw new Hd(`Mismatched tags: expected </${c.tagNumber}> but got </${l}> at position ${o.position}`,o.position,e);let u=fie(c.declaration,c.children,c.declarations);(n.length>0?n[n.length-1].children:a).push(u)}break}}),n.length>0){let o=n[n.length-1];throw new Hd(`Unclosed tag <${o.tagNumber}> at position ${o.position}`,o.position,e)}return a}});var Z5=de(()=>{HI();$I();GI();Q5()});function lw({i18nKey:e,defaultTranslation:t,content:r,ns:a,values:n={},i18n:s,t:i}){let o=s||zl();if(!o)return hg(o,"NO_I18NEXT_INSTANCE","IcuTrans: You need to pass in an i18next instance using i18nextReactModule",{i18nKey:e}),Jp.default.createElement(Jp.default.Fragment,{},t);let l=i||o.t?.bind(o)||(f=>f),c=a||l.ns||o.options?.defaultNS;c=jl(c)?[c]:c||["translation"];let u=n;o.options?.interpolation?.defaultVariables&&(u=n&&Object.keys(n).length>0?{...n,...o.options.interpolation.defaultVariables}:{...o.options.interpolation.defaultVariables});let d=l(e,{defaultValue:t,...u,ns:c});try{let f=J5(d,r);return Jp.default.createElement(Jp.default.Fragment,{},...f)}catch(f){return rw(o,"ICU_TRANS_RENDER_ERROR",`IcuTrans component error for key "${e}": ${f.message}`,{i18nKey:e,error:f}),Jp.default.createElement(Jp.default.Fragment,{},d)}}var Jp,KI=de(()=>{Jp=N(Le(),1);gg();yg();Z5();lw.displayName="IcuTransWithoutContext"});function tB({i18nKey:e,defaultTranslation:t,content:r,ns:a,values:n={},i18n:s,t:i}){let{i18n:o,defaultNS:l}=(0,eB.useContext)(Vd)||{},c=s||o||zl(),u=i||c?.t.bind(c);return lw({i18nKey:e,defaultTranslation:t,content:r,ns:a||u?.ns||l||c?.options?.defaultNS,values:n,i18n:c,t:i})}var eB,rB=de(()=>{eB=N(Le(),1);KI();qd();tB.displayName="IcuTrans"});var nB=ne(aB=>{"use strict";var xg=Le();function pie(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mie=typeof Object.is=="function"?Object.is:pie,hie=xg.useState,gie=xg.useEffect,yie=xg.useLayoutEffect,xie=xg.useDebugValue;function bie(e,t){var r=t(),a=hie({inst:{value:r,getSnapshot:t}}),n=a[0].inst,s=a[1];return yie(function(){n.value=r,n.getSnapshot=t,WI(n)&&s({inst:n})},[e,r,t]),gie(function(){return WI(n)&&s({inst:n}),e(function(){WI(n)&&s({inst:n})})},[e]),xie(r),r}function WI(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!mie(e,r)}catch{return!0}}function vie(e,t){return t()}var Sie=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?vie:bie;aB.useSyncExternalStore=xg.useSyncExternalStore!==void 0?xg.useSyncExternalStore:Sie});var iB=ne((hQe,sB)=>{"use strict";sB.exports=nB()});var gs,oB,Tie,wie,Cie,ze,cw=de(()=>{gs=N(Le(),1),oB=N(iB(),1);qd();gg();Tie=(e,t)=>jl(t)?t:BI(t)&&jl(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,wie={t:Tie,ready:!1},Cie=()=>()=>{},ze=(e,t={})=>{let{i18n:r}=t,{i18n:a,defaultNS:n}=(0,gs.useContext)(Vd)||{},s=r||a||zl();s&&!s.reportNamespaces&&(s.reportNamespaces=new ow),s||hg(s,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");let i=(0,gs.useMemo)(()=>({...Kb(),...s?.options?.react,...t}),[s,t]),{useSuspense:o,keyPrefix:l}=i,c=e||n||s?.options?.defaultNS,u=jl(c)?[c]:c||["translation"],d=(0,gs.useMemo)(()=>u,u);s?.reportNamespaces?.addUsedNamespaces?.(d);let f=(0,gs.useRef)(0),p=(0,gs.useCallback)(R=>{if(!s)return Cie;let{bindI18n:O,bindI18nStore:D}=i,W=()=>{f.current+=1,R()};return O&&s.on(O,W),D&&s.store.on(D,W),()=>{O&&O.split(" ").forEach(J=>s.off(J,W)),D&&D.split(" ").forEach(J=>s.store.off(J,W))}},[s,i]),m=(0,gs.useRef)(),h=(0,gs.useCallback)(()=>{if(!s)return wie;let R=!!(s.isInitialized||s.initializedStoreOnce)&&d.every(Z=>H5(Z,s,i)),O=t.lng||s.language,D=f.current,W=m.current;if(W&&W.ready===R&&W.lng===O&&W.keyPrefix===l&&W.revision===D)return W;let me={t:s.getFixedT(O,i.nsMode==="fallback"?d:d[0],l),ready:R,lng:O,keyPrefix:l,revision:D};return m.current=me,me},[s,d,l,i,t.lng]),[x,g]=(0,gs.useState)(0),{t:y,ready:b}=(0,oB.useSyncExternalStore)(p,h,h);(0,gs.useEffect)(()=>{if(s&&!b&&!o){let R=()=>g(O=>O+1);t.lng?FI(s,t.lng,d,R):aw(s,d,R)}},[s,t.lng,d,b,o,x]);let S=s||{},w=(0,gs.useRef)(null),P=(0,gs.useRef)(),C=R=>{let O=Object.getOwnPropertyDescriptors(R);O.__original&&delete O.__original;let D=Object.create(Object.getPrototypeOf(R),O);if(!Object.prototype.hasOwnProperty.call(D,"__original"))try{Object.defineProperty(D,"__original",{value:R,writable:!1,enumerable:!1,configurable:!1})}catch{}return D},I=(0,gs.useMemo)(()=>{let R=S,O=R?.language,D=R;R&&(w.current&&w.current.__original===R?P.current!==O?(D=C(R),w.current=D,P.current=O):D=w.current:(D=C(R),w.current=D,P.current=O));let W=[y,D,b];return W.t=y,W.i18n=D,W.ready=b,W},[y,S,b,S.resolvedLanguage,S.language,S.languages]);if(s&&o&&!b)throw new Promise(R=>{let O=()=>R();t.lng?FI(s,t.lng,d,O):aw(s,d,O)});return I}});var lB,cB=de(()=>{lB=N(Le(),1);cw();gg()});var uB=de(()=>{cw()});var dB,fB=de(()=>{dB=N(Le(),1);qd()});var Pie,XI=de(()=>{Pie=N(Le(),1);qd()});var Nie,pB=de(()=>{Nie=N(Le(),1);XI();qd();gg()});var er=de(()=>{K5();VI();rB();KI();cw();cB();uB();fB();pB();XI();qI();Wb();yg();qd()});var mB,hB=de(()=>{mB={Actions:{Save:"\u4FDD\u5B58",Cancel:"\u53D6\u6D88",Confirm:"\u786E\u5B9A",Refresh:"\u5237\u65B0",Edit:"\u7F16\u8F91",Back:"\u8FD4\u56DE",Update:"\u66F4\u65B0",Clear:"\u6E05\u9664",Delete:"\u5220\u9664",StopTranslate:"\u505C\u6B62\u7FFB\u8BD1"},Status:{Success:"\u6210\u529F",Failure:"\u5931\u8D25",Loading:"\u52A0\u8F7D\u4E2D...",Reloading:"\u91CD\u8F7D\u4E2D...",Unknown:"\u672A\u77E5",Error:"\u9519\u8BEF",Ready:"\u5C31\u7EEA"},Labels:{I18n:"I18N",Themes:"\u4E3B\u9898",Plugins:"\u63D2\u4EF6",GithubUser:"GitHub \u7528\u6237",Mtime:"\u4FEE\u6539\u65F6\u95F4",Optional:"\u53EF\u9009",Or:"\u6216",NoPlugins:"\u6682\u65E0\u63D2\u4EF6",UpdatePrefix:"\u66F4\u65B0\u4E8E",Filter:"\u7B5B\u9009"},Filters:{All:"\u5168\u90E8",Translated:"\u5DF2\u7FFB\u8BD1",Untranslated:"\u672A\u7FFB\u8BD1",Applied:"\u5DF2\u5E94\u7528"},Notices:{Success:"\u6210\u529F",Failure:"\u5931\u8D25",Clear:"\u6E05\u7A7A",SaveSuccess:"\u4FDD\u5B58\u6210\u529F",SaveFail:"\u4FDD\u5B58\u5931\u8D25",SaveFailPath:"\u4FDD\u5B58\u5931\u8D25\uFF1A\u672A\u627E\u5230\u6709\u6548\u7684\u5B58\u50A8\u8DEF\u5F84",DeleteSuccess:"\u5220\u9664\u6210\u529F",TaskStopped:"\u4EFB\u52A1\u5DF2\u505C\u6B62",BatchTranslateSuccess:"\u6279\u91CF\u7FFB\u8BD1\u5B8C\u6210\uFF01",TranslateFail:"\u7FFB\u8BD1\u5931\u8D25: {{message}}",NoItemsToTranslate:"\u6CA1\u6709\u9700\u8981\u7FFB\u8BD1\u7684\u6761\u76EE",ThemeNotFound:"\u672A\u627E\u5230\u4E3B\u9898",MainNotFound:"\u672A\u627E\u5230\u6587\u4EF6 {{file}}",TaskCancelled:"\u7FFB\u8BD1\u4EFB\u52A1\u5DF2\u53D6\u6D88",Perfect:"\u72B6\u6001\u826F\u597D",NoErrors:"\u6682\u672A\u53D1\u73B0\u95EE\u9898"},Placeholders:{Search:"\u8F93\u5165\u641C\u7D22\u5173\u952E\u8BCD..."},Data:{SortAsc:"\u6B63\u5E8F",SortDesc:"\u5012\u5E8F"},Pagination:{Label:"\u5206\u9875\u5BFC\u822A",Prev:"\u4E0A\u4E00\u9875",Next:"\u4E0B\u4E00\u9875"},MoreExpect:"\u66F4\u591A\u671F\u5F85"}});var gB,yB=de(()=>{gB={Common:{Titles:{Main:"i18n \u7BA1\u7406\u4E2D\u5FC3"},Actions:{Search:"\u641C\u7D22",MoreActions:"\u66F4\u591A\u9009\u9879",Sponsor:"\u652F\u6301\u4F5C\u8005",Help:"\u4F7F\u7528\u5E2E\u52A9",HelpDoc:"\u5B98\u65B9\u6587\u6863\u6559\u7A0B",Cloud:"\u4E91\u7AEF\u8BD1\u6587",Settings:"\u7EFC\u5408\u8BBE\u7F6E",SelectSource:"\u9009\u62E9\u6570\u636E\u6E90",Apply:"\u5E94\u7528",Restore:"\u8FD8\u539F",Edit:"\u7F16\u8F91\u8BD1\u6587",Delete:"\u5220\u9664\u8BD1\u6587",OpenFolder:"\u6D4F\u89C8\u76EE\u5F55"},Placeholders:{SearchPlaceholder:"\u8F93\u5165\u641C\u7D22\u5173\u952E\u8BCD..."},Filters:{All:"\u5168\u90E8"},Labels:{Author:"\u4F5C\u8005"},Status:{Labels:{pending:"\u7B49\u5F85\u4E2D",processing:"\u5904\u7406\u4E2D",success:"\u5E94\u7528\u6210\u529F",found:"\u5DF2\u53D1\u73B0\u5339\u914D",skipped:"\u5DF2\u8DF3\u8FC7",error:"\u4EFB\u52A1\u5931\u8D25",discovered:"\u5F85\u5BA1\u9605",discovered_new:"\u53D1\u73B0\u65B0\u8BD1\u6587",discovered_update:"\u53D1\u73B0\u7248\u672C\u66F4\u65B0",up_to_date:"\u5DF2\u662F\u6700\u65B0",applied:"\u5DF2\u5E94\u7528",plugin:"\u63D2\u4EF6",theme:"\u4E3B\u9898",DiscoveryNotice:"\u53D1\u73B0\u66F4\u65B0\u65F6\u901A\u77E5",AutoApply:"\u627E\u5230\u5339\u914D\u540E\u81EA\u52A8\u5E94\u7528 (\u4E0D\u63A8\u8350)",SilentMode:"\u5B8C\u5168\u9759\u9ED8\u6A21\u5F0F",MatchStrategy:"\u5339\u914D\u4F18\u9009\u7B56\u7565",MatchStrategies:{comprehensive:"\u7EFC\u5408\u4F18\u9009 (\u63A8\u8350)",version_first:"\u7248\u672C\u6700\u63A5\u8FD1\u4F18\u5148",popularity:"\u793E\u533A\u70ED\u5EA6\u4F18\u5148",latest_update:"\u6700\u65B0\u7FFB\u8BD1\u4F18\u5148"}}},Errors:{Error:"\u9519\u8BEF",ErrorDesc:"\u8BD1\u6587\u89E3\u6790\u5F02\u5E38",FetchCommunityDataFailed:"\u83B7\u53D6\u793E\u533A\u6CE8\u518C\u8868\u6570\u636E\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC",SyncFailed:"\u4E2D\u5FC3\u5E93\u540C\u6B65\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u6216 Token \u6743\u9650",InvalidRepo:"\u65E0\u6548\u7684\u4ED3\u5E93\u5730\u5740\uFF0C\u8BF7\u786E\u4FDD\u683C\u5F0F\u4E3A owner/repo"},Notices:{ApplySuccess:"\u7FFB\u8BD1\u5E94\u7528\u6210\u529F",CopySuccess:"Registry JSON \u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F",SyncSuccess:"\u4E2D\u5FC3\u5E93\u6CE8\u518C\u8868\u540C\u6B65\u6210\u529F\uFF01"}},Plugins:{TabName:"\u63D2\u4EF6",Actions:{Extract:"\u63D0\u53D6\u8BD1\u6587",OpenSettings:"\u63D2\u4EF6\u8BBE\u7F6E",Reload:"\u91CD\u8F7D\u63D2\u4EF6",GoToEditor:"\u524D\u5F80\u7F16\u8F91\u5668",ContinueApply:"\u575A\u6301\u5E94\u7528"},Placeholders:{SearchPlugins:"\u641C\u7D22\u63D2\u4EF6..."},Filters:{Applied:"\u5DF2\u5E94\u7528",Unapplied:"\u672A\u5E94\u7528",Translated:"\u5DF2\u7FFB\u8BD1",Untranslated:"\u672A\u7FFB\u8BD1",ToExtract:"\u5F85\u63D0\u53D6"},Labels:{Auto:"\u81EA\u52A8",Admin:"\u7BA1\u7406",Mtime:"\u6700\u540E\u66F4\u65B0",SupportVer:"\u652F\u6301\u7248\u672C"},Status:{NoPlugins:"\u672A\u53D1\u73B0\u63D2\u4EF6",On:"\u5DF2\u542F\u7528",Off:"\u5DF2\u7981\u7528",Applied:"\u5DF2\u5E94\u7528",Unapplied:"\u672A\u5E94\u7528",Translated:"\u5DF2\u7FFB\u8BD1",Untranslated:"\u672A\u7FFB\u8BD1",ToExtract:"\u5F85\u63D0\u53D6",NoTrans:"\u672A\u7FFB\u8BD1",Reloading:"\u91CD\u8F7D\u4E2D..."},Dialogs:{EmptyTranslationTitle:"\u672A\u68C0\u6D4B\u5230\u7FFB\u8BD1\u5185\u5BB9",EmptyTranslationDesc:"\u5F53\u524D\u9009\u62E9\u7684\u7FFB\u8BD1\u6E90\u5C1A\u672A\u8FDB\u884C\u4EFB\u4F55\u5B9E\u8D28\u6027\u7FFB\u8BD1\uFF08\u8BD1\u6587\u4E0E\u539F\u6587\u5B8C\u5168\u4E00\u81F4\uFF09\u3002\u5E94\u7528\u6B64\u6587\u4EF6\u540E\uFF0C\u63D2\u4EF6\u754C\u9762\u8BED\u8A00\u5C06\u4E0D\u4F1A\u53D1\u751F\u4EFB\u4F55\u53D8\u5316\u3002\u5EFA\u8BAE\u60A8\u5148\u5728\u7F16\u8F91\u5668\u4E2D\u5B8C\u6210\u7FFB\u8BD1\u540E\u518D\u5E94\u7528\u3002"},Hints:{NoTransDesc:"\u6682\u65E0\u672C\u5730\u8BED\u8A00\u6570\u636E",ExtractSuccessDesc:"\u5DF2\u751F\u6210\u5F53\u524D\u7248\u672C\u7684\u7FFB\u8BD1\u6A21\u677F"},Errors:{ReloadPluginFailed:"\u63D2\u4EF6\u91CD\u542F\u5931\u8D25: {{error}}",ReloadFailed:"\u63D2\u4EF6\u91CD\u8F7D\u5931\u8D25: {{error}}",PluginNotEnabled:"\u63D2\u4EF6\u672A\u542F\u7528",LoadFailedAfterApply:"\u63D2\u4EF6\u91CD\u8F7D\u5931\u8D25\uFF0C\u53EF\u80FD\u662F\u6E90\u7801\u5B58\u5728\u8FD0\u884C\u65F6\u9519\u8BEF\u3002\u8BF7\u6309 Ctrl+Shift+I \u6253\u5F00\u63A7\u5236\u53F0\u67E5\u770B\u5177\u4F53\u62A5\u9519\u5806\u6808\u3002",SyntaxError:"JavaScript \u8BED\u6CD5\u635F\u574F\uFF0C\u5DF2\u7EC8\u6B62\u5E94\u7528: {{file}}",MainNotFound:"\u672A\u627E\u5230 main.js \u6587\u4EF6",BackupNotFound:"\u5907\u4EFD\u6587\u4EF6\u4E0D\u5B58\u5728\uFF0C\u65E0\u6CD5\u8FD8\u539F",PluginProcessFailed:"\u5904\u7406\u63D2\u4EF6 {{id}} \u65F6\u51FA\u9519"},Notices:{ApplyPluginSuccess:"{{id}} \u7FFB\u8BD1\u5E94\u7528\u6210\u529F",ReloadPlugin:"\u51C6\u5907\u91CD\u542F\u63D2\u4EF6: {{id}}",ReloadSuccess:"\u63D2\u4EF6\u91CD\u8F7D\u6210\u529F",ExtractSuccess:"\u63D0\u53D6\u6210\u529F"}},Themes:{TabName:"\u4E3B\u9898",Placeholders:{SearchThemes:"\u641C\u7D22\u4E3B\u9898..."},Labels:{ThemeActive:"\u5F53\u524D\u4E3B\u9898",Auto:"\u81EA\u52A8",Admin:"\u7BA1\u7406",Mtime:"\u6700\u540E\u66F4\u65B0",SupportVer:"\u652F\u6301\u7248\u672C"},Filters:{Applied:"\u5DF2\u5E94\u7528",Unapplied:"\u672A\u5E94\u7528",Translated:"\u5DF2\u7FFB\u8BD1",Untranslated:"\u672A\u7FFB\u8BD1",ToExtract:"\u5F85\u63D0\u53D6"},Status:{NoThemes:"\u672A\u53D1\u73B0\u4E3B\u9898",On:"\u5DF2\u542F\u7528",Off:"\u5DF2\u7981\u7528",Applied:"\u5DF2\u5E94\u7528",Unapplied:"\u672A\u5E94\u7528",Translated:"\u5DF2\u7FFB\u8BD1",Untranslated:"\u672A\u7FFB\u8BD1",ToExtract:"\u5F85\u63D0\u53D6",NoTrans:"\u672A\u7FFB\u8BD1",Reloading:"\u91CD\u8F7D\u4E2D..."},Dialogs:{EmptyTranslationTitle:"\u672A\u68C0\u6D4B\u5230\u7FFB\u8BD1\u5185\u5BB9",EmptyTranslationDesc:"\u5F53\u524D\u9009\u62E9\u7684\u7FFB\u8BD1\u6E90\u5C1A\u672A\u8FDB\u884C\u4EFB\u4F55\u5B9E\u8D28\u6027\u7FFB\u8BD1\uFF08\u8BD1\u6587\u4E0E\u539F\u6587\u5B8C\u5168\u4E00\u81F4\uFF09\u3002\u5E94\u7528\u6B64\u6587\u4EF6\u540E\uFF0C\u63D2\u4EF6\u754C\u9762\u8BED\u8A00\u5C06\u4E0D\u4F1A\u53D1\u751F\u4EFB\u4F55\u53D8\u5316\u3002\u5EFA\u8BAE\u60A8\u5148\u5728\u7F16\u8F91\u5668\u4E2D\u5B8C\u6210\u7FFB\u8BD1\u540E\u518D\u5E94\u7528\u3002"},Errors:{ThemeCssNotFound:"\u672A\u627E\u5230 theme.css \u6587\u4EF6",NoSettingsBlock:"\u672A\u627E\u5230 @settings \u5757\uFF0C\u65E0\u53EF\u7FFB\u8BD1\u5185\u5BB9",BackupNotFound:"\u5907\u4EFD\u6587\u4EF6\u4E0D\u5B58\u5728\uFF0C\u65E0\u6CD5\u8FD8\u539F"},Notices:{ThemeExtractPrefix:"\u63D0\u53D6\u8BD1\u6587",ThemeApplyPrefix:"\u4E3B\u9898\u5E94\u7528",ThemeRestorePrefix:"\u4E3B\u9898\u8FD8\u539F"}},Sources:{TabName:"\u7BA1\u7406",Table:{Name:"\u7FFB\u8BD1\u540D\u79F0/\u63D2\u4EF6",Id:"\u6E90 ID",Origin:"\u6765\u6E90",Mtime:"\u66F4\u65B0\u65F6\u95F4",Type:"\u7C7B\u578B",Actions:"\u64CD\u4F5C"},Status:{NotInstalled:"\u63D2\u4EF6\u7F3A\u5931",ThemeNotInstalled:"\u4E3B\u9898\u7F3A\u5931"},Actions:{Export:"\u5BFC\u51FA",Import:"\u5BFC\u5165",BatchDelete:"\u5220\u9664",SelectUninstalled:"\u5F02\u5E38\u9879",DeleteConfirm:"\u786E\u5B9A\u8981\u5220\u9664\u9009\u4E2D\u7684 {{count}} \u9879\u8BD1\u6587\u5417\uFF1F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\u3002",ImportSuccess:"\u6210\u529F\u5BFC\u5165 {{count}} \u9879\u8BD1\u6587",ExportSuccess:"\u8BD1\u6587\u5BFC\u51FA\u6210\u529F",SelectAll:"\u5168\u9009"},Filters:{SearchPlaceholder:"\u641C\u7D22\u7FFB\u8BD1\u6216\u63D2\u4EF6...",OriginLocal:"\u672C\u5730\u63D0\u53D6",OriginCloud:"\u4E91\u7AEF\u4E0B\u8F7D"},Stats:{Total:"\u603B\u8BD1\u6587\u6570",Selected:"\u5DF2\u9009\u4E2D"}},Auto:{TabName:"\u81EA\u52A8\u5316",Title:"\u81EA\u52A8\u5316\u670D\u52A1",Desc:"\u667A\u80FD\u63A2\u6D4B\u53EF\u7528\u7684\u63D2\u4EF6\u7FFB\u8BD1\u5E76\u8FDB\u884C\u5B89\u5168\u5BA1\u9605\u3002",Discovery:{Title:"\u53D1\u73B0\u66F4\u65B0",ReviewAction:"\u5BA1\u9605\u5E76\u5E94\u7528",IgnoreAction:"\u5FFD\u7565\u6B64\u66F4\u65B0",SafetyWarning:"\u5B89\u5168\u63D0\u9192\uFF1A\u6B64\u7FFB\u8BD1\u6765\u81EA\u793E\u533A\u4ED3\u5E93\uFF0C\u5EFA\u8BAE\u5728\u5E94\u7528\u524D\u786E\u8BA4\u6765\u6E90\u53EF\u9760\u6027\u3002",NewSource:"\u65B0\u6765\u6E90 (\u9996\u6B21\u53D1\u73B0)",HashChanged:"\u5185\u5BB9\u5DF2\u53D8\u66F4 (Hash \u4E0D\u4E00\u81F4)",TrustScore:"\u6C49\u5316\u4FE1\u8A89\u8BC4\u5206",ScoreBreakdown:{Title:"\u5339\u914D\u8D28\u91CF\u8BC4\u5206",Version:"\u7248\u672C\u517C\u5BB9",Popularity:"\u793E\u533A\u8BA4\u53EF",Freshness:"\u66F4\u65B0\u9C9C\u6D3B"}},Filters:{Title:"\u4EFB\u52A1\u7B5B\u9009"},Scoping:{Title:"\u63A2\u6D4B\u8303\u56F4"},History:{Title:"\u5B89\u5168\u5BA1\u8BA1\u65E5\u5FD7",Empty:"\u6682\u65E0\u64CD\u4F5C\u8BB0\u5F55",BatchHeader:"\u6267\u884C\u6279\u6B21\uFF1A{{id}}",TriggerDiscovery:"\u540E\u53F0\u63A2\u6D4B",TriggerManual:"\u624B\u52A8\u6267\u884C",TriggerStartup:"\u542F\u52A8\u81EA\u68C0"},Actions:{StartAuto:"\u63A2\u6D4B\u626B\u63CF",ReviewAll:"\u5168\u90E8\u5BA1\u9605\u5E76\u5E94\u7528",OneClickReview:"\u4E00\u952E\u5BA1\u9605"},Modes:{Incremental:"\u589E\u91CF\u63A2\u6D4B",Full:"\u5168\u91CF\u626B\u63CF"},Status:{Analyzing:"\u6B63\u5728\u5206\u6790\u4E91\u7AEF\u4ED3\u5E93...",AutoStarting:"\u6B63\u5728\u542F\u52A8\u5B89\u5168\u63A2\u6D4B...",ScanningInstalled:"\u6B63\u5728\u626B\u63CF\u5DF2\u5B89\u88C5\u9879 ({{count}})...",Running:"\u6B63\u5728\u63A2\u6D4B\u66F4\u65B0...",DiscoveryComplete:"\u63A2\u6D4B\u5B8C\u6210\uFF0C\u53D1\u73B0 {{count}} \u9879\u5F85\u5BA1\u9605",NoLogs:"\u6682\u65E0\u626B\u63CF\u7ED3\u679C\u8BB0\u5F55",AutoRollbacked:"\u8FD0\u884C\u5F02\u5E38\u5DF2\u81EA\u52A8\u56DE\u6EDA",BatchApply:"\u6279\u91CF\u5E94\u7528\u53D1\u73B0",BatchComplete:"\u6279\u91CF\u4EFB\u52A1\u5DF2\u7ED3\u675F: \u6210\u529F {{success}}, \u5931\u8D25 {{fail}}",SkipReasons:{Exclusion:"\u63D2\u4EF6\u5DF2\u52A0\u5165\u6392\u9664\u540D\u5355",NoMatch:"\u6240\u6709\u4FE1\u4EFB\u6E90\u4E2D\u5747\u65E0\u8BE5\u63D2\u4EF6\u8BB0\u5F55",NoVersion:"\u672A\u627E\u5230\u7B26\u5408\u8FC7\u6EE4\u6761\u4EF6\u7684\u6C49\u5316\u7248\u672C"}},QuickSettings:{Title:"\u81EA\u52A8\u5316\u7B56\u7565",AutoApply:"\u81EA\u52A8\u5E94\u7528\u7FFB\u8BD1",DiscoveryNotice:"\u540E\u53F0\u63A2\u6D4B\u4E0E\u901A\u77E5",CheckInterval:"\u63A2\u6D4B\u5468\u671F",Hours:"\u5C0F\u65F6"},Stats:{Health:"\u6C49\u5316\u5065\u5EB7\u5EA6",VaultStatus:"\u6C49\u5316\u72B6\u6001",TotalInstalled:"\u5DF2\u5B89\u88C5\u603B\u6570",AppliedCount:"\u7D2F\u8BA1\u7FFB\u8BD1\u5E94\u7528",CurrentSuccess:"\u672C\u6B21\u6210\u529F",CurrentSkipped:"\u672C\u6B21\u8DF3\u8FC7/\u5931\u8D25",Plugins:"\u63D2\u4EF6",Themes:"\u4E3B\u9898",LastCheckTime:"\u4E0A\u6B21\u68C0\u67E5\uFF1A{{time}}"},Errors:{NoCachedManifest:"\u672A\u627E\u5230\u8BE5\u63D2\u4EF6\u7684\u7F13\u5B58\u6E05\u5355",NoBestMatch:"\u6700\u4F73\u5339\u914D\u5DF2\u4E0D\u53EF\u7528",LocalApplyFailed:"\u672C\u5730\u5E94\u7528\u5931\u8D25",DownloadApplyFailed:"\u4E0B\u8F7D\u6216\u5E94\u7528\u5931\u8D25",BatchApplyFailed:"\u6279\u91CF\u5E94\u7528\u5931\u8D25"},Repos:{Title:"\u53D7\u4FE1\u4EFB\u7684\u4ED3\u5E93",AddPlaceholder:"\u6DFB\u52A0\u4ED3\u5E93 (owner/repo)...",Empty:"\u6682\u65E0\u53D7\u4FE1\u4EFB\u4ED3\u5E93",RemoveConfirm:"\u786E\u5B9A\u79FB\u9664\u8BE5\u4ED3\u5E93\u5417\uFF1F",ScanRegistry:"\u626B\u63CF\u6CE8\u518C\u8868"},Tips:{Title:"\u63D0\u793A",Desc:'\u81EA\u52A8\u5316\u626B\u63CF\u4EC5\u4F1A\u4ECE\u60A8\u4FE1\u4EFB\u7684\u4ED3\u5E93\u4E2D\u68C0\u67E5\u7FFB\u8BD1 Registry\u3002\u786E\u4FDD\u4ED3\u5E93\u5730\u5740\u683C\u5F0F\u4E3A <code className="bg-muted px-1 rounded">owner/repo</code>\u3002'}},Credits:{TabName:"\u9E23\u8C22",Title:"\u81F4\u8C22\u6240\u6709\u8D21\u732E\u8005",Subtitle:"\u611F\u8C22\u6BCF\u4E00\u4F4D\u4EE5\u4E0D\u540C\u65B9\u5F0F\u4E3A\u672C\u9879\u76EE\u4ED8\u51FA\u52AA\u529B\u7684\u4EBA\u3002",NoData:"\u6682\u672A\u52A0\u8F7D\u5230\u793E\u533A\u521B\u4F5C\u8005\u6570\u636E",StatCreators:"\u4F4D\u521B\u4F5C\u8005",StatStars:"\u4E2A\u661F\u6807",StatTranslations:"\u4EFD\u8BD1\u6587",UnitRepos:"\u4ED3\u5E93",UnitPlugins:"\u63D2\u4EF6",Footer:"\u611F\u8C22\u6240\u6709\u8D21\u732E\u8005\u7684\u65E0\u79C1\u4ED8\u51FA",ComingSoon:"\u6682\u65E0\u6570\u636E\uFF0C\u656C\u8BF7\u671F\u5F85",CatTranslation:"\u7FFB\u8BD1\u8D21\u732E\u8005",CatTranslationDesc:"\u4E3A\u63D2\u4EF6\u4E0E\u4E3B\u9898\u63D0\u4F9B\u591A\u8BED\u8A00\u7FFB\u8BD1\u7684\u793E\u533A\u6210\u5458",CatCode:"\u4EE3\u7801\u8D21\u732E\u8005",CatCodeDesc:"\u4E3A\u9879\u76EE\u63D0\u4F9B\u4EE3\u7801\u8D21\u732E\u7684\u5F00\u53D1\u8005",CatVideo:"\u89C6\u9891\u521B\u4F5C\u8005",CatVideoDesc:"\u5236\u4F5C\u6559\u7A0B\u3001\u4ECB\u7ECD\u89C6\u9891\u7684\u521B\u4F5C\u8005",CatTesting:"\u6D4B\u8BD5\u8D21\u732E\u8005",CatTestingDesc:"\u5E2E\u52A9\u53D1\u73B0\u548C\u53CD\u9988\u95EE\u9898\u7684\u6D4B\u8BD5\u4EBA\u5458",CatSuggestion:"\u5EFA\u8BAE\u8D21\u732E\u8005",CatSuggestionDesc:"\u63D0\u4F9B\u5B9D\u8D35\u610F\u89C1\u4E0E\u5EFA\u8BAE\u7684\u793E\u533A\u6210\u5458",CatSponsor:"\u7231\u53D1\u7535\u6301\u7EED\u8D5E\u52A9",CatSponsorDesc:"\u4E3A\u9879\u76EE\u6301\u7EED\u63D0\u4F9B\u7535\u529B\u7684\u91D1\u4E3B\u7238\u7238"},Admin:{TabName:"\u7BA1\u7406\u5458",Title:"\u793E\u533A\u6570\u636E\u770B\u677F",AdminControl:"\u7BA1\u7406\u5458\u63A7\u5236",Subtitle:"\u6DF1\u5EA6\u76D1\u63A7\u793E\u533A\u52A8\u6001\u4E0E\u6CE8\u518C\u8868\u6743\u91CD\u5206\u914D\u7CFB\u7EDF",SearchPlaceholder:"\u641C\u7D22\u4ED3\u5E93\u5730\u5740\u6216\u4F5C\u8005\u52CB\u7AE0...",PushToCloud:"\u63A8\u9001\u81F3\u4E91\u7AEF",ExportJson:"\u5BFC\u51FA\u6CE8\u518C\u8868 JSON",Stats:{Repos:"\u4ED3\u5E93",Stars:"\u661F\u6807",Contribs:"\u8D21\u732E\u8005",Plugins:"\u63D2\u4EF6",Translations:"\u8BCD\u6761\u7FFB\u8BD1",Commits30d:"30\u5929\u63D0\u4EA4",Langs:"\u6DB5\u76D6\u8BED\u8A00",ActivityIndex:"\u6D3B\u8DC3\u6307\u6570",Forks:"\u6D3E\u751F (Forks)",OpenIssues:"\u5F00\u653E\u8BAE\u9898",LastUpdate:"\u6700\u540E\u63A8\u9001",Size:"\u8D44\u6E90\u5360\u7528"},Leaderboard:{Title:"\u6D3B\u8DC3\u8D21\u732E\u699C",Subtitle:"\u9876\u5C16\u8D21\u732E\u8005\u4E0E\u9AD8\u6D3B\u8DC3\u5EA6\u9879\u76EE"},LanguageDistribution:{Title:"\u8BED\u8A00\u5206\u5E03\u6982\u89C8",TotalTranslations:"{{count}} \u9879\u7FFB\u8BD1"},Management:{Title:"\u4ED3\u5E93\u6CE8\u518C\u8868\u7BA1\u7406",ShowingStats:"\u5F53\u524D\u5C55\u793A {{filtered}} / {{total}} \u4E2A\u4ED3\u5E93",SyncingData:"\u6B63\u5728\u540C\u6B65\u6570\u636E\u5C42...",NoData:"\u5F53\u524D\u8F68\u9053\u672A\u53D1\u73B0\u6570\u636E",NoLicense:"\u65E0\u8BB8\u53EF\u8BC1"},Fields:{AuthorReputation:"\u4F5C\u8005\u58F0\u671B/\u52CB\u7AE0",AuthorReputationPlaceholder:"\u4F8B\u5982\uFF1A\u7FFB\u8BD1\u5DE8\u5320, \u793E\u533A\u65B0\u661F...",RegistryBadges:"\u6CE8\u518C\u8868\u6807\u7B7E (JSON)",RegistryBadgesPlaceholder:'["\u7CBE\u9009", "\u70ED\u95E8"]',FeaturedContext:"\u6DF1\u5EA6\u63A8\u8350\u7406\u7531",FeaturedContextPlaceholder:"\u5C55\u793A\u5728\u4E91\u7AEF\u9996\u9875\u7684\u6DF1\u5EA6\u63A8\u8350\u7406\u7531..."},Controls:{Official:"\u5B98\u65B9\u8BA4\u8BC1",VerifiedNode:"\u5DF2\u9A8C\u8BC1\u8282\u70B9",Featured:"\u7CBE\u9009\u63A8\u8350",HighlightedContent:"\u9AD8\u5149\u5185\u5BB9\u5C55\u793A"},ContributorsManagement:{Title:"\u8D21\u732E\u8005\u7BA1\u7406",PushToCloud:"\u63A8\u9001\u8D21\u732E\u8005",AddNew:"\u6DFB\u52A0\u8D21\u732E\u8005",Name:"\u540D\u79F0",Category:"\u7C7B\u522B",Url:"\u94FE\u63A5 URL",Github:"GitHub \u7528\u6237\u540D",Description:"\u8D21\u732E\u63CF\u8FF0",Add:"\u6DFB\u52A0",RemoveSuccess:"\u5DF2\u79FB\u9664\u8D21\u732E\u8005: {{name}}",AddSuccess:"\u5DF2\u6DFB\u52A0\u8D21\u732E\u8005: {{name}}"}}}});var xB,bB=de(()=>{xB={Titles:{Main:"\u7F16\u8F91\u5668",Sidebar:"\u64CD\u4F5C\u9762\u677F",Files:"\u8D44\u6E90\u7BA1\u7406\u5668",Stats:"\u6761\u76EE\u7EDF\u8BA1",Insert:"\u65B0\u589E\u9879",QuickActions:"\u5FEB\u6377\u64CD\u4F5C",Ai:"AI \u667A\u80FD\u7FFB\u8BD1",Ast:"AST \u7F16\u8F91",Regex:"\u8BED\u6CD5\u6821\u9A8C",Metadata:"\u5143\u6570\u636E"},Labels:{SidebarViewOptions:"\u89C6\u56FE\u9009\u9879",SidebarShowCards:"\u663E\u793A\u5361\u7247",SelectLang:"\u9009\u62E9\u8BED\u8A00",CustomLang:"\u81EA\u5B9A\u4E49\u8BED\u8A00",SelectStyle:"\u9009\u62E9\u98CE\u683C",CustomStyle:"\u81EA\u5B9A\u4E49\u98CE\u683C",PluginId:"\u63D2\u4EF6ID",ThemeName:"\u4E3B\u9898\u540D\u79F0",PathLabel:"\u6587\u4EF6\u8DEF\u5F84",PathPlaceholder:"\u5982\uFF1Astyles.css \u6216 sub/file.js",Name:"\u540D\u79F0",NamePlaceholder:"\u540D\u79F0",Desc:"\u63CF\u8FF0",DescPlaceholder:"\u63CF\u8FF0",Author:"\u4F5C\u8005",Lang:"\u8BED\u8A00",SupportedVer:"\u652F\u6301\u7248\u672C",Ver:"\u7248\u672C",Source:"\u6765\u6E90",SourceCloud:"\u4E91\u7AEF",SourceLocal:"\u672C\u5730",Checksum:"\u6821\u9A8C",BatchSize:"\u6BCF\u6279\u6570\u91CF",Concurrency:"\u5E76\u53D1\u9650\u5236",Timeout:"\u8D85\u65F6 (ms)",Overwrite:"\u8986\u76D6\u73B0\u6709\u8BD1\u6587",ClickToJump:"\u70B9\u51FB\u8DF3\u8F6C\u5230\u8BE5\u884C",RealtimeCheck:"\u5B9E\u65F6\u6821\u9A8C",AutoSave:"\u81EA\u52A8\u4FDD\u5B58",FontSize:"\u5B57\u4F53\u5927\u5C0F",ParenthesesCheck:"\u62EC\u53F7\u5339\u914D",VariableCheck:"\u53D8\u91CF\u6821\u9A8C",PunctuationCheck:"\u6807\u70B9\u68C0\u67E5",ExpectedConsumption:"\u9884\u671F\u6D88\u8017",LineNumber:"\u884C {{line}}"},Actions:{BatchTranslate:"\u5F00\u59CB\u6279\u91CF\u7FFB\u8BD1 ({{count}})",Save:"\u4FDD\u5B58",IncrementalExtract:"\u589E\u91CF\u63D0\u53D6",IncrementalExtractTip:"\u4EC5\u63D0\u53D6\u65B0\u589E\u7FFB\u8BD1\u9879",IncrementalExtractDisabledTip:"\u5F53\u524D\u8BD1\u6587\u5DF2\u5E94\u7528\uFF0C\u65E0\u6CD5\u8FDB\u884C\u589E\u91CF\u63D0\u53D6",OpenFile:"\u6253\u5F00\u5F53\u524D\u6587\u4EF6",OpenFileTip:"\u5728\u5916\u90E8\u7F16\u8F91\u5668\u4E2D\u6253\u5F00\u5F53\u524D\u6587\u4EF6",Add:"\u65B0\u589E",DeleteUntranslated:"\u6E05\u7A7A\u672A\u7FFB\u8BD1\u9879",DeleteUntranslatedTip:"\u4E00\u952E\u5220\u9664\u6240\u6709\u5C1A\u672A\u586B\u5199\u8BD1\u6587\u7684\u6761\u76EE",Source:"\u6E90\u7801",Trans:"\u8BD1\u6587",Restore:"\u8FD8\u539F",RestoreAllErrors:"\u8FD8\u539F\u6240\u6709\u5F02\u5E38\u9879",Settings:"\u914D\u7F6E",Diagnose:"\u8BED\u6CD5\u8BCA\u65AD",UnusedDiagnose:"\u5197\u4F59\u8BCA\u65AD",SecurityDiagnose:"\u5B89\u5168\u626B\u63CF",ClearDiagnose:"\u6E05\u9664\u8BCA\u65AD",StartScan:"\u5F00\u59CB\u626B\u63CF",AiFix:"AI \u4FEE\u590D",AiFixTip:"\u8BA9 AI \u5C1D\u8BD5\u4FEE\u590D\u6B64\u8BD1\u6587\u7684\u8BED\u6CD5\u9519\u8BEF",ContextAware:"\u4E0A\u4E0B\u6587\u611F\u77E5",ContextAwareTip:"\u9644\u52A0\u6E90\u7801\u4E0A\u4E0B\u6587\u4EE5\u63D0\u5347\u7FFB\u8BD1\u51C6\u786E\u5EA6"},Stats:{Title:"\u6761\u76EE\u7EDF\u8BA1",Progress:"\u7FFB\u8BD1\u8FDB\u5EA6",Overview:"\u7FFB\u8BD1\u7EDF\u8BA1",TotalItems:"\u603B\u6761\u76EE\u6570",Translated:"\u5DF2\u7FFB\u8BD1\u9879",Untranslated:"\u672A\u7FFB\u8BD1\u9879"},Ast:{Title:"AST \u7F16\u8F91",AddRule:"\u65B0\u589E AST \u89C4\u5219",SelectTypePlaceholder:"\u9009\u62E9\u8282\u70B9\u7C7B\u578B",InputNamePlaceholder:"\u8F93\u5165\u53D8\u91CF\u540D\u6216\u952E\u540D",InputSourcePlaceholder:"\u8F93\u5165\u4EE3\u7801\u539F\u6587",InputTargetPlaceholder:"\u8F93\u5165\u7FFB\u8BD1\u540E\u6587\u672C",DefaultPlaceholder:"\u9ED8\u8BA4\u4E3A\u539F\u6587: {{source}}",NodeVariable:"\u53D8\u91CF\u7533\u660E",NodeAssignment:"\u8D4B\u503C\u8BED\u53E5",NodeProperty:"\u5BF9\u8C61\u5C5E\u6027",NodeCall:"\u65B9\u6CD5\u8C03\u7528",NodeNew:"\u5B9E\u4F8B\u5316"},Regex:{Title:"\u8BED\u6CD5\u6821\u9A8C",Overview:"\u6B63\u5219\u7EDF\u8BA1",TotalItems:"\u5339\u914D\u603B\u6570",Translated:"\u5DF2\u5904\u7406\u9879",Untranslated:"\u5F85\u5904\u7406\u9879",AddRule:"\u65B0\u589E\u6B63\u5219\u89C4\u5219",InputRegexPlaceholder:"\u8F93\u5165\u6B63\u5219\u8868\u8FBE\u5F0F",InputTargetPlaceholder:"\u8F93\u5165\u66FF\u6362\u76EE\u6807",DefaultPlaceholder:"\u9ED8\u8BA4\u4E3A\u539F\u6587: {{source}}"},Table:{EmptyState:"\u6682\u65E0\u7FFB\u8BD1\u6761\u76EE",EmptyStateAst:"\u6CA1\u6709\u627E\u5230\u5339\u914D\u7684 AST \u6761\u76EE",EmptyStateRegex:"\u672A\u53D1\u73B0\u5F85\u6821\u9A8C\u7684\u8BED\u6CD5\u6761\u76EE",ColumnType:"\u7C7B\u578B",ColumnName:"\u540D\u79F0",ColumnSource:"\u539F\u6587",ColumnTarget:"\u8BD1\u6587",ColumnActions:"\u64CD\u4F5C"},Status:{ProcessingBatch:"\u6B63\u5728\u7FFB\u8BD1\u7B2C {{current}}/{{total}} \u6279...",Diagnosing:"\u6B63\u5728\u8FDB\u884C\u8BED\u6CD5\u8BCA\u65AD...",DiagnosingUnused:"\u6B63\u5728\u8FDB\u884C\u5197\u4F59\u8BCA\u65AD...",DiagnosingSecurity:"\u6B63\u5728\u8FDB\u884C\u5B89\u5168\u5BA1\u8BA1...",Applied:"\u5DF2\u5E94\u7528",NotApplied:"\u672A\u5E94\u7528",Empty:"\u6682\u65E0\u6761\u76EE",IssueCount:"\u53D1\u73B0 {{count}} \u4E2A\u95EE\u9898"},Hints:{ExtractSummary:"\u589E\u91CF\u63D0\u53D6\u5B8C\u6210\uFF0C\u65B0\u589E {{count}} \u4E2A\u6761\u76EE",DiagnosisSuccess:"\u8BCA\u65AD\u5B8C\u6210\uFF1A\u672A\u53D1\u73B0\u5BFC\u81F4\u8BED\u6CD5\u9519\u8BEF\u7684\u6761\u76EE",NoItems:"\u65E0\u53EF\u7FFB\u8BD1\u9879",NoNewItems:"\u672A\u53D1\u73B0\u65B0\u7684\u7FFB\u8BD1\u6761\u76EE"},Notices:{NoticePrefix:"\u7F16\u8F91\u5668",SuccessAdd:"\u65B0\u589E\u6210\u529F",SuccessAi:"\u7FFB\u8BD1\u6210\u529F",SuccessRestore:"\u8FD8\u539F\u6210\u529F",SuccessDelete:"\u5220\u9664\u6210\u529F",SuccessIncrementalExtract:"\u589E\u91CF\u63D0\u53D6\u5B8C\u6210",DiagnosisSuccess:"\u8BED\u6CD5\u8BCA\u65AD\u901A\u8FC7",ConfirmDeleteUnused:"\u786E\u5B9A\u5220\u9664\u8FD9\u4E9B\u5197\u4F59\u9879\u5417\uFF1F\u8BE5\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\u3002",AiFixSuccess:"AI \u4FEE\u590D\u6210\u529F"},Errors:{FailExists:`\u65B0\u589E\u5931\u8D25
|
|
\u8BD1\u6587\u4E2D\u5DF2\u5B58\u5728\u6B64\u5185\u5BB9`,SyntaxErrorTotal:"\u8BCA\u65AD\u5B8C\u6210\uFF1A\u53D1\u73B0 {{count}} \u4E2A\u8BED\u6CD5\u9519\u8BEF",UnusedTotal:"\u8BCA\u65AD\u5B8C\u6210\uFF1A\u53D1\u73B0 {{count}} \u4E2A\u672A\u5339\u914D\u7684\u5197\u4F59\u6761\u76EE",SecurityRiskTotal:"\u5B89\u5168\u9884\u8B66\uFF1A\u53D1\u73B0 {{count}} \u4E2A\u6F5C\u5728\u7684\u5B89\u5168\u98CE\u9669",SyntaxError:"\u57FA\u7840\u8BED\u6CD5\u9519\u8BEF",Unused:"\u5197\u4F59\u9879 (\u672A\u5728\u6E90\u7801\u4E2D\u8BC6\u522B\u5230)",SecurityCritical:"\u4E25\u91CD\u5B89\u5168\u5A01\u80C1",SecurityWarning:"\u53EF\u7591\u884C\u4E3A\u9884\u8B66",BracketMismatch:"\u62EC\u53F7\u914D\u5BF9\u7F3A\u5931",VariableMismatch:"\u53D8\u91CF\u5360\u4F4D\u7B26\u4E22\u5931\u6216\u4E0D\u5339\u914D",SyntaxErrorAst:"AST \u63D0\u53D6\u5931\u8D25",SyntaxErrorRegex:"\u6B63\u5219\u63D0\u53D6\u5931\u8D25",NoMetadata:"\u672A\u627E\u5230\u5143\u6570\u636E\uFF0C\u65E0\u6CD5\u8FDB\u884C\u8BCA\u65AD\u3002",NoManifest:"\u672A\u627E\u5230\u5BF9\u5E94\u6E05\u5355\uFF0C\u65E0\u6CD5\u5B9A\u4F4D\u76EE\u5F55\u3002",NotJs:"\u5F53\u524D\u9009\u62E9\u7684\u6587\u4EF6\u4E0D\u662F .js \u811A\u672C\uFF0C\u6682\u4E0D\u652F\u6301\u8BED\u6CD5\u8BCA\u65AD\u3002",NoBackup:"\u8BCA\u65AD\u5F02\u5E38\uFF1A\u672A\u627E\u5230\u5BF9\u5E94\u7684\u5907\u4EFD\u6587\u4EF6\u3002\u8BF7\u5148\u70B9\u51FB\u4E00\u6B21\u201C\u66FF\u6362\u201D\u4EE5\u521B\u5EFA\u57FA\u51C6\u5907\u4EFD\u3002",SourceError:"\u6E90\u7801\u672C\u8EAB\u5B58\u5728\u8BED\u6CD5\u9519\u8BEF\uFF0C\u65E0\u6CD5\u8FDB\u884C\u8BCA\u65AD\u3002",FileNotFound:"\u6587\u4EF6\u4E0D\u5B58\u5728",SavePathMissing:"\u4FDD\u5B58\u8DEF\u5F84\u4E0D\u5B58\u5728",TotalCount:"\u5171 {{count}} \u9879",AiFixFail:"AI \u4FEE\u590D\u5931\u8D25"},Dialogs:{ConfirmDeletePath:"\u786E\u8BA4\u5220\u9664\u8BE5\u8DEF\u5F84\uFF1F",PromptNewPath:"\u65B0\u589E\u7FFB\u8BD1\u8DEF\u5F84"}}});var vB,SB=de(()=>{vB={Actions:{PublishToCloud:"\u53D1\u5E03\u5230\u4E91\u7AEF",BackupSync:"\u5168\u91CF\u4E91\u7AEF\u5907\u4EFD\u4E0E\u6062\u590D",InitPersonalRepo:"\u521D\u59CB\u5316\u4E2A\u4EBA\u4ED3\u5E93",UpdateTranslation:"\u66F4\u65B0\u7FFB\u8BD1",NewPublish:"\u6DFB\u52A0\u53D1\u5E03",ApplyForCommunity:"\u7533\u8BF7\u52A0\u5165 Obsidian i18n \u7FFB\u8BD1\u793E\u533A\u76EE\u5F55",ViewDiff:"\u5728\u7EBF\u5DEE\u5F02\u5BF9\u6BD4",Add:"\u6DFB\u52A0",Update:"\u66F4\u65B0",Unsubscribe:"\u53D6\u6D88\u8BA2\u9605",CheckAllUpdates:"\u5168\u91CF\u68C0\u67E5\u66F4\u65B0",Recheck:"\u91CD\u65B0\u68C0\u67E5",UpdateAll:"\u4E00\u952E\u66F4\u65B0\u6240\u6709",RegisterCommunity:"\u7533\u8BF7\u52A0\u5165\u793E\u533A\u7D22\u5F15",PublishNew:"\u53D1\u5E03\u65B0\u7FFB\u8BD1",ForceRefresh:"\u5F3A\u5236\u5237\u65B0\u4E91\u7AEF\u72B6\u6001",GoPublish:"\u524D\u5F80\u53D1\u5E03\u7B2C\u4E00\u4E2A\u7FFB\u8BD1",BackToManage:"\u8FD4\u56DE\u7BA1\u7406\u4E2D\u5FC3",CreateRepo:"\u521B\u5EFA\u65B0\u4ED3\u5E93",UseExistingRepo:"\u4F7F\u7528\u5DF2\u6709\u4ED3\u5E93",StartBackup:"\u5F00\u59CB\u5907\u4EFD",StartRestore:"\u5F00\u59CB\u6062\u590D",Download:"\u4E0B\u8F7D",Overwrite:"\u8986\u76D6\u5207\u6362",ClearFilters:"\u6E05\u9664\u6240\u6709\u8FC7\u6EE4\u5668",CreateNewRepo:"\u521B\u5EFA\u65B0\u4ED3\u5E93",Delete:"\u5220\u9664",Logout:"\u9000\u51FA\u767B\u5F55",ResumeLastBackup:"\u6062\u590D\u4E0A\u6B21\u5907\u4EFD"},Status:{Published:"\u5DF2\u53D1\u5E03",Local:"\u672C\u5730",Uploaded:"\u5DF2\u4E0A\u4F20",NotDownloaded:"\u672A\u4E0B\u8F7D",Reviewing:"\u6536\u5F55\u5BA1\u6838\u4E2D",Fetching:"\u72B6\u6001\u83B7\u53D6\u4E2D",Registered:"\u5DF2\u6536\u5F55\u4E8E\u793E\u533A",Unauthorized:"\u672A\u767B\u5F55",UpToDate:"\u6700\u65B0",UpdateAvailable:"\u6709\u66F4\u65B0",SyncWithCloud:"\u4E0E\u4E91\u7AEF\u540C\u6B65",CloudDifferent:"\u672C\u5730\u4E0E\u4E91\u7AEF\u4E0D\u540C",Latest:"\u6700\u65B0",Modified:"\u6709\u4FEE\u6539",RollingBack:"\u56DE\u6EDA\u4E2D...",BackupDone:"\u2728 \u5B8C\u6210",BackupError:"\u274C \u51FA\u9519",UploadingCloud:"\u2601\uFE0F \u4E0A\u4F20\u4E2D...",DownloadingCloud:"\u{1F4E5} \u4E0B\u8F7D\u4E2D...",VerifyingRepo:"\u6B63\u5728\u9A8C\u8BC1\u4ED3\u5E93\u662F\u5426\u5B58\u5728...",InitializingStructure:"\u6B63\u5728\u521D\u59CB\u5316\u4ED3\u5E93\u7ED3\u6784...",GeneratingReadme:"\u6B63\u5728\u751F\u6210 README.md...",Initializing:"\u6B63\u5728\u521D\u59CB\u5316",CreatingRepo:"\u6B63\u5728\u521B\u5EFA\u4E2A\u4EBA\u7FFB\u8BD1\u4ED3\u5E93...",Checking:"\u6B63\u5728\u68C0\u67E5",LoadingRepo:"\u6B63\u5728\u52A0\u8F7D\u4E2A\u4EBA\u4ED3\u5E93\u6570\u636E...",LoadingContent:"\u52A0\u8F7D\u7248\u672C\u5185\u5BB9...",LoadingDiff:"\u6B63\u5728\u52A0\u8F7D\u5E76\u5BF9\u6BD4\u6570\u636E...",UploadingFile:"\u6B63\u5728\u4E0A\u4F20\u7FFB\u8BD1\u6587\u4EF6...",UpdatingIndex:"\u6B63\u5728\u66F4\u65B0\u7D22\u5F15\u6587\u4EF6...",Processing:"\u6B63\u5728\u5904\u7406",PreparingData:"\u6B63\u5728\u51C6\u5907\u5F85\u5907\u4EFD\u6570\u636E...",BulkUploading:"\u6B63\u5728\u6279\u91CF\u4E0A\u4F20 {{count}} \u4E2A\u6587\u4EF6...",UploadingBatch:"\u6B63\u5728\u4E0A\u4F20\u7B2C {{current}}/{{total}} \u6279\u6B21...",UploadingBatchLog:"\u{1F4E4} \u6B63\u5728\u4E0A\u4F20\u7B2C {{current}}/{{total}} \u6279\u6B21 (\u5171 {{count}} \u4E2A\u6587\u4EF6)...",FetchingManifest:"\u6B63\u5728\u83B7\u53D6\u4E91\u7AEF\u6E05\u5355...",ResumingBackup:"\u6B63\u5728\u6062\u590D\u4E0A\u6B21\u4E2D\u65AD\u7684\u5907\u4EFD...",FinalizingLocal:"\u6B63\u5728\u540C\u6B65\u672C\u5730\u5143\u6570\u636E...",Downloading:"\u6B63\u5728\u4E0B\u8F7D\u7FFB\u8BD1: {{title}}...",Done:"\u2728 \u5B8C\u6210",ForkAvailable:"\u6765\u81EA\u5176\u4ED6\u5E93",Cloud:"\u4E91\u7AEF",Unknown:"\u672A\u77E5\u7248\u672C",Ready:"\u5C31\u7EEA",GuestMode:"\u8BBF\u5BA2\u6A21\u5F0F"},Titles:{NewPublish:"\u6DFB\u52A0\u53D1\u5E03",Homepage:"\u4ED3\u5E93\u4E3B\u9875",DiffViewer:"\u7248\u672C\u5DEE\u5F02\u5BF9\u6BD4"},Tabs:{Community:"\u793E\u533A\u76EE\u5F55",Explore:"\u63A2\u7D22\u8D44\u6E90",Manage:"\u7BA1\u7406\u4E2D\u5FC3",Resources:"\u53D1\u5E03\u8D44\u6E90",Readme:"\u4ED3\u5E93\u4ECB\u7ECD",History:"\u5386\u53F2\u7248\u672C",Browse:"\u6D4F\u89C8\u4ED3\u5E93",Updates:"\u53EF\u7528\u66F4\u65B0"},Steps:{SelectType:"\u9009\u62E9\u7FFB\u8BD1\u7C7B\u578B",SelectTarget:"\u9009\u62E9\u76EE\u6807 {{type}}",SelectSource:"\u9009\u62E9\u7FFB\u8BD1\u6E90",CheckFiles:"\u6838\u5BF9\u672C\u5730\u6587\u4EF6",CompleteInfo:"\u5B8C\u5584\u53D1\u5E03\u4FE1\u606F",VerifyAndPublish:"\u6838\u5BF9\u5E76\u53D1\u5E03"},Tips:{ReadmeDefault:"\u6807\u9898\u5C06\u4F5C\u4E3A\u8BE5\u7FFB\u8BD1\u5728\u793E\u533A\u4E2D\u7684\u4E3B\u540D\u79F0\u3002",SelectSourceDesc:"\u8BF7\u9009\u62E9\u60A8\u8981\u53D1\u5E03\u6216\u66F4\u65B0\u7684\u672C\u5730\u7FFB\u8BD1\u6E90\u6587\u4EF6\u3002",BackupToCloud:"\u4E00\u952E\u5907\u4EFD\u5230\u4E91\u7AEF",LocalToGithub:"\u5C06\u672C\u5730\u6240\u6709\u7FFB\u8BD1\u540C\u6B65\u81F3 GitHub",RestoreFromCloud:"\u4E00\u952E\u4ECE\u4E91\u7AEF\u6062\u590D",GithubToLocal:"\u4ECE GitHub \u62C9\u53D6\u6240\u6709\u7FFB\u8BD1\u8986\u76D6\u672C\u5730",GithubRepo:"GitHub \u4ED3\u5E93",BackupDesc:"\u5168\u91CF\u5907\u4EFD\u4F1A\u5C06\u60A8\u672C\u5730\u6240\u6709\u7684\u7FFB\u8BD1\u6E90\u6587\u4EF6\u4E0A\u4F20\u5230\u60A8\u7684 GitHub \u4ED3\u5E93\u4E2D\uFF0C\u5E76\u81EA\u52A8\u66F4\u65B0\u7D22\u5F15\u3002\u5168\u91CF\u6062\u590D\u5219\u4F1A\u5C06\u4E91\u7AEF\u7684\u6700\u65B0\u7248\u672C\u540C\u6B65\u5230\u672C\u5730\u3002",BackupStep1:"\u2022 \u626B\u63CF\u5E76\u6BD4\u8F83\u672C\u5730\u6240\u6709\u7FFB\u8BD1\u6E90",BackupStep2:"\u2022 \u4E0A\u4F20\u6709\u53D8\u52A8\u7684\u6587\u4EF6\u5230 GitHub",BackupStep3:"\u2022 \u81EA\u52A8\u7EF4\u62A4 metadata.json \u7D22\u5F15",RestoreStep1:"\u2022 \u83B7\u53D6\u4E91\u7AEF metadata.json \u5217\u8868",RestoreStep2:"\u2022 \u4E0B\u8F7D\u6240\u6709\u672C\u5730\u7F3A\u5931\u6216\u65E7\u7684\u6587\u4EF6",RestoreStep3:"\u2022 \u81EA\u52A8\u5728\u672C\u5730\u6CE8\u518C\u5E76\u5E94\u7528\u4E0B\u8F7D\u7684\u7FFB\u8BD1",InitRepoDesc:"\u5728 GitHub \u4E0A\u521B\u5EFA\u4E00\u4E2A\u4E13\u95E8\u5B58\u50A8\u7FFB\u8BD1\u6587\u4EF6\u7684\u516C\u5F00\u4ED3\u5E93\uFF0C\u4EE5\u4FBF\u4E8E\u5907\u4EFD\u3001\u5171\u4EAB\u548C\u5728\u4E0D\u540C\u8BBE\u5907\u95F4\u540C\u6B65\u3002\u60A8\u53EF\u4EE5\u4F7F\u7528\u9ED8\u8BA4\u540D\u79F0\u6216\u81EA\u5B9A\u4E49\u540D\u79F0\u3002",UseExistingDesc:"\u5982\u679C\u60A8\u5DF2\u7ECF\u5728 GitHub \u4E0A\u624B\u52A8\u521B\u5EFA\u4E86\u4ED3\u5E93\uFF0C\u8BF7\u8F93\u5165\u5176\u540D\u79F0\u4EE5\u8FDB\u884C\u8FDE\u63A5\u3002\u7A0B\u5E8F\u5C06\u5C1D\u8BD5\u5728\u5176\u4E0A\u521D\u59CB\u5316\u5FC5\u8981\u7684\u76EE\u5F55\u7ED3\u6784\u3002",CheckFailRepo:"\u68C0\u67E5\u4ED3\u5E93 {{address}} \u5931\u8D25",CheckFail:"\u68C0\u67E5\u66F4\u65B0\u5931\u8D25",RepoFormatTip:"\u8BF7\u4F7F\u7528 owner/repo \u683C\u5F0F",NoSelfExplore:"\u4E0D\u80FD\u5728\u63A2\u7D22\u9875\u9762\u6D4F\u89C8\u81EA\u5DF1\u7684\u7FFB\u8BD1\u4ED3\u5E93\uFF0C\u8BF7\u524D\u5F80\u7BA1\u7406\u9875\u9762",NoTranslations:"\u8BE5\u4ED3\u5E93\u6682\u672A\u53D1\u5E03\u4EFB\u4F55\u7FFB\u8BD1\u8D44\u6E90",ManifestNotFound:"\u672A\u627E\u5230 metadata.json \u6216\u6587\u4EF6\u65E0\u6548",FetchFailManifest:"\u83B7\u53D6\u4ED3\u5E93\u6E05\u5355\u5931\u8D25",FetchCommitsFail:"\u83B7\u53D6\u63D0\u4EA4\u5386\u53F2\u5931\u8D25",UpdatedItem:"\u5DF2\u6210\u529F\u66F4\u65B0 {{title}}",AddedAndActive:"\u5DF2\u6DFB\u52A0 {{title}} \u5E76\u8BBE\u4E3A\u5F53\u524D\u6D3B\u52A8\u6E90",AddedSource:"\u5DF2\u6210\u529F\u6DFB\u52A0 {{title}}",DiscoverDesc:"\u8F93\u5165 GitHub \u4ED3\u5E93\u5730\u5740\uFF08\u5982: owner/repo\uFF09\uFF0C\u5373\u53EF\u6D4F\u89C8\u5E76\u4E0B\u8F7D\u5176\u4E2D\u5206\u4EAB\u7684 i18n \u8D44\u6E90\u3002",NoMatchesInRepo:"\u5F53\u524D\u4ED3\u5E93\u4E2D\u6CA1\u6709\u5339\u914D\u8FC7\u6EE4\u6761\u4EF6\u7684\u8D44\u6E90",NoReadme:"\u672A\u627E\u5230 README.md\u6216\u8005\u6587\u4EF6\u4E3A\u7A7A",NoReadmeDesc:"\u8BE5\u4ED3\u5E93\u4F5C\u8005\u5C1A\u672A\u63D0\u4F9B\u4ECB\u7ECD\u6587\u6863",AllLatestDesc:"\u60A8\u8BA2\u9605\u7684\u6240\u6709\u7FFB\u8BD1\u5E93\u5185\u5BB9\u5728\u672C\u5730\u5747\u4E3A\u6700\u65B0\u7248\u672C",SelectHistoryEntry:"\u8BF7\u4ECE\u6211\u7684\u7FFB\u8BD1\u5217\u8868\u4E2D\u9009\u62E9\u4E00\u4E2A\u6761\u76EE\u67E5\u770B\u5386\u53F2",LoadingCommits:"\u6B63\u5728\u83B7\u53D6\u63D0\u4EA4\u5386\u53F2...",NoCommits:"\u8BE5\u6587\u4EF6\u6682\u65E0\u63D0\u4EA4\u8BB0\u5F55",RollbackSuccessLocal:"\u56DE\u6EDA\u6210\u529F\uFF0C\u672C\u5730\u6587\u4EF6\u5DF2\u540C\u6B65\u66F4\u65B0",VersionCompareDesc:"\u5BF9\u6BD4\u672C\u5730\u6700\u65B0\u7FFB\u8BD1\u4E0E\u4E91\u7AEF\u7248\u672C\u7684\u5DEE\u5F02",PublishNoticePrefix:"\u53D1\u5E03\u63D0\u4EA4\u5C06\u76F4\u63A5\u63A8\u9001\u5230",PublishNoticeSuffix:"\u4ED3\u5E93\uFF0C\u8BF7\u786E\u4FDD\u60A8\u7684\u6388\u6743\u6709\u6548\u3002"},Labels:{ResourceCenter:"\u8D44\u6E90\u7BA1\u7406\u4E2D\u5FC3",ManageCenter:"\u4E91\u7AEF\u7BA1\u7406\u4E2D\u5FC3",PendingUpdates:"\u5F85\u5904\u7406\u7684\u66F4\u65B0",CloudCentral:"\u4E91\u7AEF\u7FFB\u8BD1\u4E2D\u5FC3",TranslationHistory:"\u7FFB\u8BD1\u5386\u53F2\u7248\u672C",BackupRestore:"\u4E91\u7AEF\u5168\u91CF\u5907\u4EFD / \u6062\u590D",Feedback:"\u53CD\u9988",AccessLimit:"\u8BBF\u95EE\u9650\u5236",Permission:"\u6743\u9650",DefaultRepoDesc:"\u8FD9\u662F\u4E00\u4E2A\u7528\u4E8E\u7FFB\u8BD1 Obsidian \u63D2\u4EF6\u7684\u5171\u5EFA\u4ED3\u5E93\u3002",Followers:"\u5173\u6CE8\u8005 (Followers)",PublicRepos:"\u516C\u5F00\u4ED3\u5E93 (Public Repos)",UploadTypePlugin:"\u63D2\u4EF6\u7FFB\u8BD1",UploadTypePluginDesc:"\u53D1\u5E03\u6216\u66F4\u65B0\u5404\u4E2A\u63D2\u4EF6\u7684 i18n \u8D44\u6E90",UploadTypeTheme:"\u4E3B\u9898\u7FFB\u8BD1",UploadTypeThemeDesc:"\u4E3A Obsidian \u4E3B\u9898\u63D0\u4F9B\u6C49\u5316\u652F\u6301",Target:"\u76EE\u6807 {{type}}",Source:"\u7FFB\u8BD1\u6E90\u6587\u4EF6",TranslationTitle:"\u663E\u793A\u540D\u79F0 (Title)",Version:"\u9002\u7528\u7248\u672C (Version)",Language:"\u8BED\u79CD",Description:"\u8BE6\u7EC6\u63CF\u8FF0 (Description)",LocalFile:"\u672C\u5730\u6587\u4EF6",RepoName:"\u4ED3\u5E93\u540D\u79F0",RepoUrlPrefix:"\u4ED3\u5E93\u9884\u89C8:",RepoDesc:"\u4ED3\u5E93\u7B80\u4ECB",RegistrationLabel:"\u{1F4CB} \u7533\u8BF7\u4FE1\u606F",RepoInfo:"\u4ED3\u5E93\u6982\u51B5",RepoAddress:"\u4ED3\u5E93\u5730\u5740",ManifestFile:"\u7D22\u5F15\u6587\u4EF6",TranslationCountLabel:"\u7FFB\u8BD1\u5305\u6570\u91CF",UnitPlugins:"\u4E2A",LanguagesCovered:"\u6DB5\u76D6\u8BED\u79CD",ReviewHelper:"\u5BA1\u6838\u8F85\u52A9",ReviewerNotes:"\u5BA1\u6838\u89C4\u5219\u8BF4\u660E",ReviewerNote1:"\u4ED3\u5E93\u5FC5\u987B\u5305\u542B\u6709\u6548\u7684 metadata.json",ReviewerNote2:"\u6587\u4EF6\u7ED3\u6784\u9700\u7B26\u5408\u6807\u51C6\uFF08/plugins/ID/zh-CN.json\uFF09",ReviewerNote3:"\u6240\u6709\u4E0A\u4F20\u7684\u6587\u4EF6\u5FC5\u987B\u80FD\u901A\u8FC7\u54C8\u5E0C\u9A8C\u8BC1",CheckManifestData:"\u67E5\u770B\u539F\u59CB manifest \u6570\u636E",IssueAutoGenerated:"\u6B64\u5DE5\u5355\u7531 i18n \u63D2\u4EF6\u81EA\u52A8\u751F\u6210",ApplyRegistration:"\u7533\u8BF7\u6536\u5F55",UpdateReadmeMsg:"chore: update README.md via i18n plugin",RemoveTranslation:"chore: remove translation",DeleteEntry:"chore: delete manifest entry",StatAssets:"\u8D44\u6E90",StatStars:"\u661F\u6807",StatForks:"\u5206\u53C9",StatIssues:"\u53CD\u9988",PublishedResources:"\u5DF2\u53D1\u5E03\u7684\u8D44\u6E90",ReadmeCustomPage:"\u4ED3\u5E93\u4ECB\u7ECD\u9884\u89C8 (README.md)",CloudActions:"\u4E91\u7AEF\u64CD\u4F5C",LocalTranslation:"\u672C\u5730\u7FFB\u8BD1",UnnamedTranslation:"\u672A\u547D\u540D\u7FFB\u8BD1",InitReadmeMsg:"chore: initial repository structure",AddTranslationMsg:"feat: add translation {{title}} for {{plugin}}",UpdateTranslationMsg:"feat: update translation {{title}} for {{plugin}}",UpdateManifestMsg:"chore: update manifest for {{plugin}}",UpdateManifestGlobalMsg:"chore: update metadata.json (global update)",BackupCommitMsg:"backup: {{title}} ({{plugin}})",BulkBackupMsg:"batch backup: {{count}} items synced",BulkBackupMsgBatch:"batch backup: (chunk {{current}}/{{total}})",ViewOnGithubTitle:"\u5728 GitHub \u4E0A\u67E5\u770B {{repo}}",NoReadmeAdded:"\u6682\u65E0 README \u4ECB\u7ECD",NoReadmeAddedDesc:"\u60A8\u53EF\u4EE5\u70B9\u51FB\u53F3\u4E0A\u89D2\u7684\u7F16\u8F91\u6309\u94AE\uFF0C\u4E3A\u60A8\u7684\u7FFB\u8BD1\u5E93\u6DFB\u52A0\u8BE6\u7EC6\u7684\u4ECB\u7ECD\u3001\u4F7F\u7528\u8BF4\u660E\u6216\u8D21\u732E\u6307\u5357\u3002",ViewHistory:"\u67E5\u770B\u5386\u53F2\u7248\u672C",DeleteCloudPkg:"\u4ECE\u4E91\u7AEF\u6C38\u4E45\u5220\u9664\u8FD9\u4E2A\u7FFB\u8BD1\u5305",FetchingResources:"\u6B63\u5728\u83B7\u53D6\u4E91\u7AEF\u8D44\u6E90...",NoRegistry:"\u6682\u65E0\u793E\u533A\u6536\u5F55",NoRegistryDesc:"\u793E\u533A\u76EE\u5F55\u76EE\u524D\u4E3A\u7A7A\uFF0C\u60A8\u53EF\u4EE5\u6210\u4E3A\u7B2C\u4E00\u4E2A\u7533\u8BF7\u52A0\u5165\u7684\u4EBA\uFF01",Leaderboard:"\u6D3B\u8DC3\u8D21\u732E\u699C",TopStars:"\u6700\u9AD8\u4EBA\u6C14\u699C",TopActive:"\u8FD1\u671F\u6D3B\u8DC3\u699C",TopPlugins:"\u9AD8\u4EA7\u4F5C\u8005\u699C",TopAuthors:"\u6D3B\u8DC3\u8BD1\u8005\u699C",Rank1:"\u7B2C\u4E00\u540D",Rank2:"\u7B2C\u4E8C\u540D",Rank3:"\u7B2C\u4E09\u540D",LeaderboardTip:"\u6392\u884C\u699C\u6570\u636E\u6BCF 24 \u5C0F\u65F6\u81EA\u52A8\u66F4\u65B0\u4E00\u6B21",DiscoverTranslations:"\u53D1\u73B0\u4E91\u7AEF\u7FFB\u8BD1\u5E93",SubscriptionRepo:"\u4E2A\u5DF2\u6536\u5F55\u4ED3\u5E93",ExploreThisRepo:"\u6D4F\u89C8\u6B64\u4ED3\u5E93\u8D44\u6E90",NoDesc:"\u6682\u65E0\u63CF\u8FF0",SubscriptionList:"\u8BA2\u9605\u5217\u8868",WaitingFetch:"\u7B49\u5F85\u83B7\u53D6...",ViewOnGithub:"\u5728 GitHub \u4E0A\u67E5\u770B {{repo}}",PleaseWait:"\u6B63\u5728\u52A0\u8F7D\uFF0C\u8BF7\u7A0D\u5019...",SourceFrom:"\u8D44\u6E90\u6765\u6E90",Commits:"\u63D0\u4EA4\u8BB0\u5F55",VersionPreview:"\u7248\u672C\u5185\u5BB9\u9884\u89C8",SelectCommitToPreview:"\u8BF7\u5728\u5DE6\u4FA7\u9009\u62E9\u4E00\u4E2A\u7248\u672C\u8FDB\u884C\u9884\u89C8",RollbackToVersion:"\u56DE\u6EDA\u5230\u6B64\u7248\u672C",RollbackTranslationMsg:"\u56DE\u6EDA\u7FFB\u8BD1: {{plugin}} \u5230\u7248\u672C {{sha}}",UpdateManifestRollbackMsg:"\u540C\u6B65\u56DE\u6EDA manifest: {{plugin}}",Added:"\u65B0\u589E",Deleted:"\u79FB\u9664",Old:"\u65E7\u503C",New:"\u65B0\u503C",TotalDiffs:"\u5171\u53D1\u73B0 {{count}} \u5904\u5DEE\u5F02",ShowingCount:" (\u5DF2\u8FC7\u6EE4\u663E\u793A {{count}} \u5904)",FileSize:"\u6587\u4EF6\u5927\u5C0F",ContentHash:"\u5185\u5BB9\u6307\u7EB9",ReportIssue:"\u62A5\u544A\u95EE\u9898",IssueTemplateBody:"\u53D1\u73B0 {{plugin}} \u7684\u7FFB\u8BD1\u5B58\u5728\u95EE\u9898...",SupportedVersions:"\u652F\u6301\u7248\u672C\u53F7",TotalTranslations:"\u5168\u5C40\u603B\u7FFB\u8BD1\u6570",TotalContributors:"\u5168\u5C40\u603B\u8D21\u732E\u8005",TotalStars:"\u661F\u6807\u603B\u8BA1",LocalResource:"\u672C\u5730\u5DF2\u5B89\u88C5\u8D44\u6E90",Official:"\u5B98\u65B9\u63A8\u8350",Featured:"\u793E\u533A\u7CBE\u9009",RecommendReason:"\u63A8\u8350\u7406\u7531",MasterTranslator:"\u7FFB\u8BD1\u5DE8\u5320",RisingStar:"\u793E\u533A\u65B0\u661F",LegendaryRepo:"\u4E07\u4F17\u77A9\u76EE"},Placeholders:{RepoName:"\u4F8B\u5982: my-obsidian-i18n-resources",SelectTarget:"\u70B9\u51FB\u9009\u62E9\u76EE\u6807 {{type}}...",InputRepoPlaceholder:"\u8BF7\u8F93\u5165\u4ED3\u5E93\u8DEF\u5F84 (owner/repo)",SelectSource:"\u8BF7\u9009\u62E9\u672C\u5730\u6E90...",SearchPublished:"\u641C\u7D22\u5DF2\u53D1\u5E03\u7684\u7FFB\u8BD1 (\u63D2\u4EF6 ID \u6216\u6807\u9898)...",ReadmeEdit:"\u53EF\u652F\u6301\u6807\u51C6\u7684 Markdown \u8BED\u6CD5...",SearchRepo:"\u641C\u7D22\u4ED3\u5E93\u3001\u4F5C\u8005\u6216\u63CF\u8FF0...",Repo:"GitHub \u4ED3\u5E93 (owner/repo)",SearchPlugins:"\u5FEB\u6377\u641C\u7D22\u5F53\u524D\u5217\u8868...",SearchDiff:"\u641C\u7D22\u5DEE\u5F02\u8BB0\u5F55..."},Dialogs:{ConfirmUpdateAll:"\u786E\u5B9A\u8981\u66F4\u65B0\u8FD9 {{count}} \u4E2A\u7FFB\u8BD1\u5417\uFF1F",ConfirmOverwrite:`\u68C0\u6D4B\u5230\u672C\u5730\u5DF2\u5B58\u5728 {{owner}} \u7684\u540C\u6E90\u7FFB\u8BD1\u5305\u3002
|
|
|
|
\u662F\u5426\u4F7F\u7528\u5F53\u524D {{newOwner}} \u7684\u7248\u672C\u8986\u76D6\u672C\u5730\u7FFB\u8BD1\uFF1F`,DeleteConfirm:`\u786E\u5B9A\u8981\u4ECE\u4E91\u7AEF\u5220\u9664\u3010{{plugin}}\u3011({{title}}) \u7684\u7FFB\u8BD1\u5305\u5417\uFF1F
|
|
\u5220\u9664\u540E\u5C06\u65E0\u6CD5\u6062\u590D\u3002`,DeleteConfirmSingle:`\u786E\u5B9A\u8981\u4ECE\u4E91\u7AEF\u5220\u9664\u6B64\u7FFB\u8BD1\u5305\u5417\uFF1F
|
|
\u5220\u9664\u540E\u5C06\u65E0\u6CD5\u6062\u590D\u3002`,RollbackConfirm:"\u786E\u5B9A\u8981\u5C06\u6B64\u6587\u4EF6\u56DE\u6EDA\u5230\u9009\u5B9A\u7684\u5386\u53F2\u7248\u672C\u5417\uFF1F\u8FD9\u4F1A\u4EA7\u751F\u4E00\u6761\u65B0\u7684\u63D0\u4EA4\u8BB0\u5F55\u5E76\u8986\u76D6\u5F53\u524D\u4E91\u7AEF\u7248\u672C\u3002",ConfirmUpdate:"\u786E\u8BA4\u8981\u66F4\u65B0\u6B64\u7FFB\u8BD1\u5305\u5417\uFF1F",ConfirmRestoreAll:`\u786E\u5B9A\u8981\u4ECE\u4E91\u7AEF\u6062\u590D\u5168\u90E8\u7FFB\u8BD1\u5417\uFF1F
|
|
\u672C\u5730\u5DF2\u6709\u7684\u540C\u540D\u7FFB\u8BD1\u6E90\u5C06\u88AB\u8986\u76D6\u3002`},Errors:{ManifestFormatError:"metadata.json \u683C\u5F0F\u9519\u8BEF",ManifestNotFound:"\u65E0\u6CD5\u89E3\u6790 metadata.json \u6216\u6587\u4EF6\u4E0D\u5B58\u5728",UserNotFound:"\u672A\u83B7\u53D6\u5230\u7528\u6237\u4FE1\u606F",CannotRegister:"\u65E0\u6CD5\u6CE8\u518C",RegistryAddrMissing:"\u793E\u533A\u7D22\u5F15\u4ED3\u5E93\u5730\u5740\u672A\u914D\u7F6E",RegistryAddrFormatError:"\u793E\u533A\u7D22\u5F15\u4ED3\u5E93\u5730\u5740\u683C\u5F0F\u9519\u8BEF",InitRepoStructFail:"\u521D\u59CB\u5316\u4ED3\u5E93\u7ED3\u6784\u5931\u8D25",CreateRepoFail:"\u521B\u5EFA\u4ED3\u5E93\u5931\u8D25",RepoNotExistOnGithub:"\u4ED3\u5E93 {{repo}} \u4E0D\u5B58\u5728\uFF0C\u8BF7\u5148\u5728 GitHub \u4E0A\u521B\u5EFA",InvalidSourceConfig:"\u672A\u627E\u5230\u6709\u6548\u7684\u7FFB\u8BD1\u6E90\u914D\u7F6E",UploadFileFail:"\u4E0A\u4F20\u6587\u4EF6\u5931\u8D25",UpdateManifestFail:"\u66F4\u65B0\u6E05\u5355\u6587\u4EF6\u5931\u8D25",UpdateIndexFail:"\u66F4\u65B0\u7D22\u5F15\u6587\u4EF6\u5931\u8D25",InitStructureFail:"\u521D\u59CB\u5316\u4ED3\u5E93\u7ED3\u6784\u5931\u8D25",CreateFail:"\u521B\u5EFA\u4ED3\u5E93\u5931\u8D25",RollbackFail:"\u56DE\u6EDA\u5931\u8D25",GetFileFail:"\u65E0\u6CD5\u83B7\u53D6\u6587\u4EF6\u5185\u5BB9",InitFailed:"\u521D\u59CB\u5316\u5931\u8D25",NoGithubUser:"\u65E0\u6CD5\u83B7\u53D6 GitHub \u7528\u6237\u4FE1\u606F",NoCreateRepoPerm:"\u6743\u9650\u4E0D\u8DB3",UploadFailed:"\u4E0A\u4F20\u5931\u8D25",LocalFileMissing:"\u672C\u5730\u7FFB\u8BD1\u6587\u4EF6\u4E22\u5931",RepoNotFound:"\u672A\u627E\u5230\u4E2A\u4EBA\u7FFB\u8BD1\u4ED3\u5E93",GetManifestFail:"\u83B7\u53D6\u4E3B\u6E05\u5355\u5931\u8D25",BackupErrorMsg:"\u{1F4A5} \u5907\u4EFD\u51FA\u9519: {{error}}",RestoreErrorMsg:"\u{1F4A5} \u6062\u590D\u51FA\u9519: {{error}}",FetchFail:"\u83B7\u53D6\u5931\u8D25",DownloadFail:"\u4E0B\u8F7D\u5931\u8D25",UploadFailItem:"\u274C {{title}} \u4E0A\u4F20\u5931\u8D25",DownloadFailItem:"\u274C {{title}} \u4E0B\u8F7D\u5931\u8D25\uFF1A\u6587\u4EF6\u4E0D\u5B58\u5728",ProcessingFailItem:"\u274C {{title}} \u5904\u7406\u5931\u8D25: {{error}}",UpdateFail:"\u66F4\u65B0 {{title}} \u5931\u8D25:",LoadDiffFail:"\u52A0\u8F7D\u5DEE\u5F02\u6570\u636E\u5931\u8D25:",BackupFail:"\u5907\u4EFD\u5931\u8D25:",RestoreFail:"\u6062\u590D\u5931\u8D25:",CheckPendingFail:"\u68C0\u67E5\u5F85\u5904\u7406\u7533\u8BF7\u5931\u8D25",ParseRegistryFail:"\u89E3\u6790\u793E\u533A\u7D22\u5F15\u5931\u8D25",RegisterFail:"\u7533\u8BF7\u6536\u5F55\u5931\u8D25",SaveReadmeFail:"\u4FDD\u5B58 README \u5931\u8D25",DeleteFail:"\u5220\u9664\u5931\u8D25",DeleteFileProblem:"\u64CD\u4F5C\u6587\u4EF6\u65F6\u9047\u5230\u95EE\u9898",CreateReadmeFail:"\u521B\u5EFA README \u5931\u8D25",FetchCommitsFail:"\u83B7\u53D6\u63D0\u4EA4\u8BB0\u5F55\u5931\u8D25",PreviewFail:"\u9884\u89C8\u8BF7\u6C42\u5931\u8D25",RepoNotExist:"\u4ED3\u5E93 {{address}} \u4E0D\u5B58\u5728",AddFail:"\u6DFB\u52A0\u5931\u8D25"},Hints:{InputRepoPlaceholder:"\u8BF7\u8F93\u5165\u4ED3\u5E93\u5730\u5740",RepoFormatTip:"\u8BF7\u8F93\u5165\u683C\u5F0F\u4E3A owner/repo \u7684\u4ED3\u5E93\u5730\u5740",NoSelfExplore:"\u4E0D\u652F\u6301\u5728\u201C\u63A2\u7D22\u201D\u9875\u6DFB\u52A0\u6216\u62C9\u53D6\u81EA\u5DF1\u7684\u5F53\u524D\u4E91\u7AEF\u4ED3\u5E93\u3002\u8BF7\u524D\u5F80\u201C\u7BA1\u7406\u201D\u9875\u64CD\u4F5C\u81EA\u5DF1\u7684\u7FFB\u8BD1\u5305\u3002",NoPublished:"\u6682\u65E0\u5DF2\u53D1\u5E03\u7684\u7FFB\u8BD1\u8D44\u6E90",NoPublishedDesc:"\u60A8\u7684\u7FFB\u8BD1\u4ED3\u5E93\u76EE\u524D\u662F\u7A7A\u7684\u3002\u60A8\u53EF\u4EE5\u70B9\u51FB\u4E0B\u65B9\u6309\u94AE\u5F00\u59CB\u53D1\u5E03\u60A8\u7684\u7B2C\u4E00\u4E2A\u7FFB\u8BD1\u5305\uFF0C\u6216\u8005\u5728\u4E91\u7AEF\u9762\u677F\u8FDB\u884C\u5907\u4EFD\u4E0E\u6062\u590D\u3002",RepoNameRequired:"\u8BF7\u8F93\u5165\u4ED3\u5E93\u540D\u79F0",RepoAlreadyInCommunity:"\u4F60\u7684\u4ED3\u5E93\u5DF2\u5728\u793E\u533A\u76EE\u5F55\u4E2D",PublishBeforeRegister:"\u8BF7\u5148\u53D1\u5E03\u81F3\u5C11\u4E00\u4E2A\u7FFB\u8BD1\u540E\u518D\u6CE8\u518C",RegistrationIntercept:"\u6CE8\u518C\u62E6\u622A",RepoAlreadyRegistered:"\u60A8\u7684\u4ED3\u5E93\u5DF2\u88AB\u793E\u533A\u6536\u5F55\uFF0C\u8BF7\u52FF\u91CD\u8907\u7533\u8BF7",RegistrationPending:"\u6B63\u5728\u7533\u8BF7\u6536\u5F55\u7684\u5DE5\u5355\u5DF2\u7ECF\u5B58\u5728\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85\u5BA1\u6838",NoLocalSourcesTip:"\u672A\u68C0\u6D4B\u5230\u5DF2\u6709\u7684\u672C\u5730{{type}}\u7FFB\u8BD1\u6E90\u6587\u4EF6\u3002\u8BF7\u5148\u4F7F\u7528\u7FFB\u8BD1\u5DE5\u5177\u751F\u6210\u7FFB\u8BD1\u3002",NoSourcesForTarget:"\u8BE5{{type}}\u4E0B\u6CA1\u6709\u4EFB\u4F55\u7FFB\u8BD1\u6E90\u6587\u4EF6",RepoNotInit:'\u5C1A\u672A\u521B\u5EFA\u4E2A\u4EBA\u4ED3\u5E93\uFF0C\u8BF7\u5148\u524D\u5F80"\u53D1\u5E03"\u9875\u521D\u59CB\u5316',NoLocalSourcesBackup:"\u672A\u53D1\u73B0\u53EF\u4F9B\u5907\u4EFD\u7684\u672C\u5730\u7FFB\u8BD1\u6E90",NoCloudData:"\u4E91\u7AEF\u4ED3\u5E93\u4E2D\u6682\u65E0\u5907\u4EFD\u6570\u636E",FetchingManifest:"\u6B63\u5728\u83B7\u53D6\u4E91\u7AEF\u6E05\u5355...",TokenRequired:"\u8BF7\u5148\u5728\u8BBE\u7F6E\u4E2D\u914D\u7F6E GitHub Token\uFF08\u5171\u5EFA\u4E91\u7AEF \u2192 \u63D0\u4EA4 Token\uFF09",LoginRequired:"\u9700\u8981\u767B\u5F55\u4EE5\u8BBF\u95EE\u4E91\u7AEF\u529F\u80FD",LoginRequiredDesc:"\u8BF7\u5728\u63D2\u4EF6\u8BBE\u7F6E\u4E2D\u914D\u7F6E\u5177\u5907 public_repo \u6743\u9650\u7684 GitHub Token\u3002\u914D\u7F6E\u5B8C\u6210\u540E\uFF0C\u60A8\u5C06\u53EF\u4EE5\u63A2\u7D22\u793E\u533A\u8D44\u6E90\u3001\u53D1\u5E03\u7FFB\u8BD1\u5E76\u53C2\u4E0E\u5171\u5EFA\u3002",GoToSettings:"\u524D\u5F80\u8BBE\u7F6E",RateLimitTitle:"GitHub \u8BBF\u95EE\u53D7\u9650",RateLimitDesc:"\u7531\u4E8E GitHub \u7684\u533F\u540D\u8BBF\u95EE\u9891\u7387\u9650\u5236\uFF08\u6BCF\u5C0F\u65F6 60 \u6B21\uFF09\uFF0C\u60A8\u76EE\u524D\u7684\u8BBF\u95EE\u5DF2\u8FBE\u4E0A\u9650\u3002\u8BF7\u5728\u8BBE\u7F6E\u4E2D\u914D\u7F6E GitHub Token \u4EE5\u83B7\u5F97\u7A33\u5B9A\u4E0D\u9650\u901F\u7684\u4F53\u9A8C\u3002",RateLimitGuide:"\u914D\u7F6E Token \u5373\u53EF\u89E3\u51B3"},Notices:{UploadSuccess:"\u4E0A\u4F20\u6210\u529F",UploadCompleteDesc:"\u5DF2\u6210\u529F\u5C06\u7FFB\u8BD1\u6587\u4EF6\u540C\u6B65\u81F3\u60A8\u7684\u4ED3\u5E93\u3002",SubmitSuccess:"\u63D0\u4EA4\u6210\u529F",RegistrationSubmittedDesc:"\u5DF2\u63D0\u4EA4\u7533\u8BF7\uFF0C\u8BF7\u7B49\u5F85\u7BA1\u7406\u5458\u5BA1\u6838\u3002",FetchSuccess:"\u83B7\u53D6\u6210\u529F",FoundTranslations:"\u5171\u627E\u5230 {{count}} \u4E2A\u8BD1\u6587\u8D44\u6E90",RepoUnsubscribed:"\u5DF2\u53D6\u6D88\u8BA2\u9605\u8BE5\u4ED3\u5E93",UpdateSuccess:"\u66F4\u65B0\u6210\u529F",DownloadSuccess:"\u4E0B\u8F7D\u6210\u529F",AllUpToDate:"\u672C\u5730\u5DF2\u662F\u6700\u65B0\u7248\u672C",UpdateComplete:"\u66F4\u65B0\u5B8C\u6210",UpdateSuccessCount:"\u6210\u529F\u66F4\u65B0\u4E86 {{count}} \u4E2A\u8BED\u8A00\u5305",RepoReadyPrefix:"\u60A8\u7684\u4ED3\u5E93\u5DF2\u5C31\u7EEA\uFF1A",FoundLocalSources:"\u53D1\u73B0 {{count}} \u4E2A\u672C\u5730\u7FFB\u8BD1\u6E90",SkipFileNotFound:"\u8DF3\u8FC7 {{title}}: \u672C\u5730\u6587\u4EF6\u4E0D\u5B58\u5728",SkipUpToDate:"\u8DF3\u8FC7 {{title}}: \u4E91\u7AEF\u5DF2\u662F\u6700\u65B0",BackupNoChanges:"\u6CA1\u6709\u53D1\u73B0\u9700\u8981\u5907\u4EFD\u7684\u65B0\u53D8\u52A8",UploadSuccessItem:"\u2705 {{title}} \u4E0A\u4F20\u6210\u529F",BackupCompleteStat:"\u5907\u4EFD\u5B8C\u6210: \u5DF2\u4E0A\u4F20 {{uploaded}} \u4E2A\uFF0C\u8DF3\u8FC7 {{skipped}} \u4E2A",BackupSuccessCount:"\u6210\u529F\u5907\u4EFD\u4E86 {{count}} \u4E2A\u7FFB\u8BD1\u5305",FoundCheckpoint:"\u53D1\u73B0\u4E0A\u6B21\u672A\u5B8C\u6210\u7684\u5907\u4EFD ({{date}})",FoundCloudSources:"\u5728\u4E91\u7AEF\u53D1\u73B0 {{count}} \u4E2A\u7FFB\u8BD1\u6E90",ItemsToUpload:"\u68C0\u6D4B\u5230\u6709 {{count}} \u4E2A\u9879\u76EE\u9700\u8981\u4E0A\u4F20\u5230\u4E91\u7AEF",SkipLocalLatest:"\u8DF3\u8FC7 {{title}}: \u672C\u5730\u5DF2\u662F\u6700\u65B0",RestoreSuccessItem:"\u2705 {{title}} \u6062\u590D\u6210\u529F",RestoreCompleteStat:"\u6062\u590D\u5B8C\u6210: \u5DF2\u540C\u6B65 {{restored}} \u4E2A\uFF0C\u8DF3\u8FC7 {{skipped}} \u4E2A",RestoreSuccessCount:"\u6210\u529F\u6062\u590D\u4E86 {{count}} \u4E2A\u7FFB\u8BD1\u5305",NoFile:"\u6587\u4EF6\u4E0D\u5B58\u5728"}}});var TB,wB=de(()=>{TB={MainTitle:"\u4F7F\u7528\u5E2E\u52A9",VideoTitle:"\u5B98\u65B9\u89C6\u9891\u6559\u7A0B",VideoDesc:"\u6F14\u793A\u63D2\u4EF6\u5168\u5957\u64CD\u4F5C\u6D41\u7A0B\uFF0C\u964D\u4F4E\u4E0A\u624B\u95E8\u69DB\uFF0C\u5FEB\u901F\u7CBE\u901A\u672C\u5730\u5316\u5DE5\u4F5C\u6D41\u3002",DocTitle:"\u5B98\u65B9\u6587\u6863\u6559\u7A0B",DocDesc:"\u5168\u65B9\u4F4D\u89E3\u6790\u5404\u9879\u529F\u80FD\u53C2\u6570\u4E0E\u8FDB\u9636\u914D\u7F6E\uFF0C\u63D0\u4F9B\u8BE6\u5C3D\u7684\u64CD\u4F5C\u4E0E\u6392\u9519\u6307\u5357\u3002",GithubTitle:"\u5F00\u6E90\u95EE\u9898\u53CD\u9988",GithubDesc:"\u8FFD\u8E2A\u9879\u76EE\u4EE3\u7801\u8FDB\u5C55\uFF0C\u63D0\u4EA4\u7F3A\u9677\u62A5\u544A\u6216\u7279\u6027\u9700\u6C42\uFF0C\u4E0E\u5F00\u53D1\u8005\u6DF1\u5EA6\u534F\u529B\u3002",PluginTitle:"\u672C\u5730\u7FFB\u8BD1\u7BA1\u7406",PluginDesc:"\u96C6\u4E2D\u7BA1\u7406\u672C\u5730\u5DF2\u88C5\u63D2\u4EF6\u7684\u7FFB\u8BD1\u7247\u6BB5\uFF0C\u4E00\u952E\u5E94\u7528\u5E76\u65E0\u7F1D\u638C\u63A7\u754C\u9762\u8BED\u8A00\u3002",CloudTitle:"\u4E91\u7AEF\u7FFB\u8BD1\u4E2D\u5FC3",CloudDesc:"\u63A5\u5165\u5168\u7403\u7FFB\u8BD1\u7F51\u7EDC\uFF0C\u53D1\u6398\u5E76\u83B7\u53D6\u7531\u793E\u533A\u6301\u7EED\u7EF4\u62A4\u7684\u7CBE\u6821\u4F18\u9009\u8BD1\u6587\u3002",TaskTitle:"\u793E\u533A\u7FFB\u8BD1\u4EFB\u52A1",TaskDesc:"\u53C2\u4E0E\u5F00\u6E90\u5171\u5EFA\u751F\u6001\uFF0C\u8BA4\u9886\u5E76\u653B\u514B\u672A\u51B3\u7684\u7FFB\u8BD1\u4EFB\u52A1\uFF0C\u5171\u4EAB\u672C\u5730\u5316\u6210\u679C\u3002",QqTitle:"QQ \u5B98\u65B9\u4EA4\u6D41\u7FA4",QqDesc:"\u56FD\u5185\u6D3B\u8DC3\u521B\u4F5C\u8005\u9635\u5730\uFF0C\u5206\u4EAB\u7FFB\u8BD1\u5FC3\u5F97\u3001\u6781\u901F\u83B7\u53D6\u4E00\u624B\u66F4\u65B0\u4E0E\u6280\u672F\u7B54\u7591\u3002",DiscordTitle:"Discord \u4EA4\u6D41\u7FA4",DiscordDesc:"\u52A0\u5165\u5168\u7403\u5316\u7684\u73A9\u5BB6\u4E0E\u5F00\u53D1\u8005\u793E\u533A\uFF0C\u5206\u4EAB\u63D2\u4EF6\u7ECF\u9A8C\uFF0C\u83B7\u53D6\u5373\u65F6\u89E3\u7B54\u3002",AfdianTitle:"\u652F\u6301\u4E0E\u8D5E\u52A9",AfdianDesc:"\u901A\u8FC7\u7231\u53D1\u7535\u8D5E\u52A9\u5F00\u53D1\u8005\uFF0C\u52A9\u529B\u63D2\u4EF6\u6301\u7EED\u8FED\u4EE3\u4E0E\u751F\u6001\u7E41\u8363\u3002",CoreFeaturesLabel:"\u6838\u5FC3\u529F\u80FD",CommunityLabel:"\u793E\u533A\u52A8\u6001",SupportLabel:"\u53CD\u9988\u4E0E\u652F\u6301",VerLabel:"\u7248\u672C",BrowseAction:"\u6D4F\u89C8",JoinAction:"\u52A0\u5165",MoreExpect:"\u66F4\u591A\u786C\u6838\u80FD\u529B\u6B63\u5728\u6301\u7EED\u6784\u5EFA\u4E2D\uFF0C\u656C\u8BF7\u671F\u5F85\u2026\u2026"}});var CB,EB=de(()=>{CB={Titles:{Tab:"\u767B\u5F55/\u6CE8\u518C",Welcome:"\u6B22\u8FCE",WelcomeBack:"\u6B22\u8FCE\u56DE\u6765"},Labels:{AccountStatus:"\u8D26\u6237\u72B6\u6001",ConnectedCloud:"\u5DF2\u8FDE\u63A5\u4E91\u7AEF",RememberMe:"\u8BB0\u4F4F\u8D26\u53F7\u5BC6\u7801",Username:"\u7528\u6237\u540D",Password:"\u5BC6\u7801",Email:"\u90AE\u7BB1",Code:"\u9A8C\u8BC1\u7801",ConfirmPassword:"\u786E\u8BA4\u5BC6\u7801",DefaultUser:"\u7528\u6237",UserId:"\u7528\u6237 ID"},Actions:{Login:"\u767B\u5F55",Logout:"\u9000\u51FA\u767B\u5F55",Register:"\u6CE8\u518C",SendCode:"\u53D1\u9001\u9A8C\u8BC1\u7801",CreateAccount:"\u521B\u5EFA\u8D26\u6237"},Status:{LoggingIn:"\u767B\u5F55\u4E2D...",Registering:"\u6CE8\u518C\u4E2D..."},Hints:{LoginDesc:"\u767B\u5F55\u60A8\u7684\u8D26\u6237\u4EE5\u8BBF\u95EE\u4E91\u7AEF\u529F\u80FD",RegisterDesc:"\u6CE8\u518C\u65B0\u8D26\u6237\u4EE5\u5F00\u59CB\u4F7F\u7528"},Notices:{SendSuccess:"\u53D1\u9001\u6210\u529F",RegSuccess:"\u6CE8\u518C\u6210\u529F\uFF0C\u8BF7\u767B\u5F55",LoggedOut:"\u5DF2\u9000\u51FA\u767B\u5F55"},Errors:{SendFail:"\u53D1\u9001\u5931\u8D25",LoginFail:"\u767B\u5F55\u5931\u8D25",RegFail:"\u6CE8\u518C\u5931\u8D25",PassMismatch:"\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4",NoEmail:"\u672A\u8BBE\u7F6E\u90AE\u7BB1",InputEmail:"\u8BF7\u8F93\u5165\u90AE\u7BB1",InputUserPass:"\u8BF7\u8F93\u5165\u7528\u6237\u540D\u548C\u5BC6\u7801",InputEmailCode:"\u8BF7\u8F93\u5165\u90AE\u7BB1\u548C\u9A8C\u8BC1\u7801"}}});var PB,AB=de(()=>{PB={Titles:{Tab:"\u7528\u6237\u534F\u8BAE",Main:"I18N \u63D2\u4EF6\u7528\u6237\u534F\u8BAE"},Hints:{Desc:"\u4F7F\u7528\u524D\u8BF7\u4ED4\u7EC6\u9605\u8BFB\u4EE5\u4E0B\u6761\u6B3E",End:"-- \u534F\u8BAE\u7ED3\u675F --",ReadThanks:"\u611F\u8C22\u60A8\u7684\u9605\u8BFB\u3002",Scroll:"\u8BF7\u5411\u4E0B\u6EDA\u52A8\u9605\u8BFB\u5B8C\u6574\u534F\u8BAE",ReadReminder:"\u8BF7\u9605\u8BFB\u5B8C\u534F\u8BAE\u4EE5\u7EE7\u7EED\u3002"},Actions:{Agree:"\u5DF2\u9605\u8BFB\u5E76\u540C\u610F",Disagree:"\u4E0D\u540C\u610F (\u9000\u51FA)"}}});var IB,NB=de(()=>{IB={Tabs:{Basis:"\u7EFC\u5408\u8BBE\u7F6E",Re:"RE \u914D\u7F6E",Ast:"AST \u914D\u7F6E",Immersive:"\u6C89\u6D78\u7FFB\u8BD1",Ai:"\u8BED\u8A00\u6A21\u578B",Share:"\u5171\u5EFA\u751F\u6001"},Basis:{UpdateHeader:"\u68C0\u67E5\u66F4\u65B0",BasisHeader:"\u57FA\u7840\u914D\u7F6E",AutoHeader:"\u81EA\u52A8\u5316\u4EFB\u52A1",ExternalHeader:"\u63A8\u8350\u63D2\u4EF6",CloudHeader:"\u4E91\u7AEF\u4E0E\u7F51\u7EDC",ResetHeader:"\u5371\u9669\u64CD\u4F5C",UpdateTitle:"\u68C0\u67E5\u66F4\u65B0",UpdateDesc:"\u542F\u52A8\u65F6\u9759\u9ED8\u68C0\u67E5\u65B0\u7248\u672C\uFF0C\u6709\u66F4\u65B0\u65F6\u5F39\u7A97\u63D0\u9192\u3002",CheckUpdatePrefix:"\u66F4\u65B0\u68C0\u67E5",CheckUpdateNotice:"\u53D1\u73B0\u65B0\u7248\u672C",SmartUpdateTitle:"\u667A\u80FD\u66F4\u65B0",SmartUpdateDesc:"\u5176\u4ED6\u63D2\u4EF6\u66F4\u65B0\u7248\u672C\u540E\uFF0C\u81EA\u52A8\u5C06\u5DF2\u6709\u8BD1\u6587\u91CD\u65B0\u5E94\u7528\uFF0C\u65E0\u9700\u624B\u52A8\u64CD\u4F5C\u3002",SmartTitle:"\u667A\u80FD\u66F4\u65B0",SmartUpdate:"\u5DF2\u81EA\u52A8\u91CD\u8F7D ",SmartPlugins:" \u4E2A\u63D2\u4EF6",LangTitle:"\u76EE\u6807\u8BED\u8A00",LangDesc:"\u4E91\u7AEF\u4E0B\u8F7D\u4E0E AI \u7FFB\u8BD1\u65F6\u9ED8\u8BA4\u4F7F\u7528\u7684\u8BED\u8A00\u3002",AutoSaveTitle:"\u81EA\u52A8\u4FDD\u5B58",AutoSaveDesc:"\u5728\u7FFB\u8BD1\u7F16\u8F91\u5668\u4E2D\u6BCF\u9694\u4E00\u6BB5\u65F6\u95F4\u81EA\u52A8\u4FDD\u5B58\u4FEE\u6539\uFF0C\u9632\u6B62\u610F\u5916\u4E22\u5931\u3002",AuthorTitle:"\u4F5C\u8005\u7F72\u540D",AuthorDesc:"\u63D0\u53D6\u8BD1\u6587\u65F6\u81EA\u52A8\u9644\u5E26\u7684\u7F72\u540D\uFF0C\u7559\u7A7A\u5219\u4E0D\u7F72\u540D\u3002",AuthorPlaceholder:"\u4F8B: Eondr",AutoApplyTitle:"\u81EA\u52A8\u5E94\u7528",AutoApplyDesc:"\u5339\u914D\u5230\u53EF\u7528\u7FFB\u8BD1\u540E\u81EA\u52A8\u6CE8\u5165\u5E76\u91CD\u8F7D\u76EE\u6807\u63D2\u4EF6\uFF0C\u5168\u7A0B\u65E0\u9700\u624B\u52A8\u5E72\u9884\u3002",AutoSilentTitle:"\u9759\u9ED8\u8FD0\u884C",AutoSilentDesc:"\u540E\u53F0\u6267\u884C\u65F6\u4E0D\u5F39\u51FA\u8FDB\u5EA6\u901A\u77E5\uFF0C\u53EA\u5728\u5B9E\u9645\u5B8C\u6210\u66F4\u65B0\u65F6\u7B80\u8981\u63D0\u9192\u3002",AutoTrustedReposTitle:"\u53D7\u4FE1\u4EFB\u6E90",AutoTrustedReposDesc:"\u4EC5\u4ECE\u8FD9\u4E9B\u4ED3\u5E93\u81EA\u52A8\u62C9\u53D6\u7FFB\u8BD1\u6587\u4EF6\uFF0C\u6BCF\u884C\u4E00\u4E2A\u5730\u5740\u3002",AutoTrustedReposPlaceholder:"\u4F8B: owner/repo",ManagerTitle:"Better Plugins Manager (BPM)",ManagerDesc:"\u5EF6\u8FDF\u52A0\u8F7D \xB7 \u5206\u7EC4\u7BA1\u7406 \xB7 GitHub \u76F4\u88C5 \xB7 \u51B2\u7A81\u68C0\u6D4B \u2014\u2014 \u4E3A\u91CD\u5EA6 Obsidian \u7528\u6237\u8BBE\u8BA1\u7684\u5168\u80FD\u63D2\u4EF6\u7BA1\u7406\u5668\u3002",ManagerBtn:"\u67E5\u770B BPM \u8BE6\u60C5",DefaultCloudRepoTitle:"\u4E91\u7AEF\u4ED3\u5E93",DefaultCloudRepoDesc:"\u7BA1\u7406\u5668\u7684\u300C\u4E91\u7AEF\u7248\u672C\u300D\u4E0B\u62C9\u6846\u5C06\u4F18\u5148\u4ECE\u6B64\u4ED3\u5E93\u83B7\u53D6\u53EF\u7528\u7FFB\u8BD1\u3002",DefaultCloudRepoPlaceholder:"\u4F8B: owner/repo",GithubProxyTitle:"\u52A0\u901F\u8282\u70B9",GithubProxyDesc:"\u4E3A\u4E0B\u8F7D\u8D44\u6E90\u9009\u4E00\u4E2A\u4EE3\u7406\uFF0C\u4E0D\u7A33\u5B9A\u5C31\u6362\u3002",ProxyDirect:"\u76F4\u8FDE",ProxyNode1:"ghp.ci",ProxyNode2:"ghproxy.net",ProxyNode5:"gh-proxy.com",ProxyNode7:"jsDelivr CDN",ProxyNode8:"jsDelivr Fastly",ProxyNode9:"jsDelivr GCore",ProxyNode10:"Statically",ProxyTestBtn:"\u6D4B\u901F",ProxyTestTooltip:"\u6D4B\u8BD5\u5F53\u524D\u8282\u70B9\u5EF6\u8FDF",ProxyTesting:"\u6D4B\u8BD5\u4E2D\u2026",ProxyTestSuccess:"\u53EF\u7528 \xB7 {{ms}}ms",ProxyTestFail:"\u4E0D\u53EF\u7528",ProxyTestErrorNotice:"\u8282\u70B9\u8D85\u65F6\u6216\u4E0D\u53EF\u8FBE",ProxySecurityNotice:"\u26A0\uFE0F \u4EE3\u7406\u4EC5\u52A0\u901F\u516C\u5171\u8D44\u6E90\u3002Token \u4E0E\u79C1\u6709\u540C\u6B65\u59CB\u7EC8\u76F4\u8FDE\uFF0C\u4E0D\u7ECF\u7B2C\u4E09\u65B9\u3002",GithubApiTimeoutHint:"\u8BF7\u6C42\u8D85\u65F6\uFF0CToken \u64CD\u4F5C\u65E0\u6CD5\u8D70\u4EE3\u7406\u3002\u8BF7\u68C0\u67E5\u7F51\u7EDC\u6216\u5F00\u542F\u7CFB\u7EDF\u4EE3\u7406\u3002",GithubApiTokenMissing:"\u8BF7\u5148\u914D\u7F6E GitHub Token",GithubApiFileNotFound:"\u6587\u4EF6\u4E0D\u5B58\u5728",GithubApiCheckFailed:"\u8FDE\u63A5\u5931\u8D25",GithubApiCheckSuccess:"\u8FDE\u63A5\u6210\u529F",ResetTitle:"\u91CD\u7F6E\u63D2\u4EF6\u65B9\u6848",ResetDesc:"\u5C06\u6240\u6709\u914D\u7F6E\u6062\u590D\u81F3\u51FA\u5382\u72B6\u6001\u3002\u6B64\u64CD\u4F5C\u4E0D\u53EF\u9006\uFF0C\u8BF7\u8C28\u614E\u64CD\u4F5C\u3002",ResetBtn:"\u91CD\u7F6E\u914D\u7F6E",ResetConfirm:"\u786E\u5B9A\u8981\u91CD\u7F6E\u6240\u6709\u63D2\u4EF6\u914D\u7F6E\u5417\uFF1F\u8FD9\u5C06\u6E05\u9664\u6240\u6709\u5DF2\u4FDD\u5B58\u7684\u8BBE\u7F6E\uFF08\u5305\u62EC API Key\u3001\u6B63\u5219\u8868\u8FBE\u5F0F\u7B49\uFF09\u3002",ResetSuccess:"\u914D\u7F6E\u5DF2\u91CD\u7F6E"},Re:{ParamsHeader:"\u6B63\u5219\u53C2\u6570",FlagTitle:"\u5339\u914D\u6807\u5FD7",FlagDesc:"\u6B63\u5219\u4FEE\u9970\u7B26\uFF0C\u5982 g(\u5168\u5C40) s(\u5355\u884C)\u3002\u5F71\u54CD\u6240\u6709\u63D0\u53D6\u89C4\u5219\u7684\u5339\u914D\u884C\u4E3A\u3002",FlagPlaceholder:"\u4F8B: gs",LenTitle:"\u957F\u5EA6\u4E0A\u9650",LenDesc:"\u8D85\u8FC7\u6B64\u957F\u5EA6\u7684\u5339\u914D\u7ED3\u679C\u5C06\u88AB\u4E22\u5F03\uFF0C\u907F\u514D\u8BEF\u6355\u5927\u6BB5\u4EE3\u7801\u3002",DataHeader:"\u63D0\u53D6\u89C4\u5219",DataEditTitle:"\u63D0\u53D6\u89C4\u5219",DataEditDesc:"\u7528\u4E8E\u4ECE\u63D2\u4EF6\u6E90\u7801\u4E2D\u6355\u83B7\u53EF\u7FFB\u8BD1\u6587\u672C\u7684\u6B63\u5219\u5217\u8868\u3002",DataPlaceholder:"\u4E00\u884C\u4E00\u6761\u6B63\u5219",RegexHeader:"\u5185\u5BB9\u8FC7\u6EE4",RejectReTitle:"\u6392\u9664\u89C4\u5219",RejectReDesc:"\u5339\u914D\u5230\u7684\u6587\u672C\u5C06\u88AB\u8DF3\u8FC7\uFF0C\u4E0D\u8FDB\u5165\u7FFB\u8BD1\u6D41\u7A0B\u3002",RejectPlaceholder:"\u4E00\u884C\u4E00\u6761\u6392\u9664\u6B63\u5219",ValidReTitle:"\u4FDD\u7559\u89C4\u5219",ValidReDesc:"\u53EA\u6709\u5339\u914D\u5230\u7684\u6587\u672C\u624D\u4F1A\u88AB\u63D0\u53D6\uFF0C\u5176\u4F59\u5168\u90E8\u5FFD\u7565\u3002",ValidPlaceholder:"\u4E00\u884C\u4E00\u6761\u4FDD\u7559\u6B63\u5219",PromptHeader:"\u7FFB\u8BD1\u63D0\u793A",PromptTitle:"\u7FFB\u8BD1 Prompt",PromptDesc:"\u6B63\u5219\u6A21\u5F0F\u4E0B\u53D1\u9001\u7ED9 LLM \u7684\u7FFB\u8BD1\u6307\u4EE4\u6A21\u677F\u3002",PromptPlaceholder:"\u8F93\u5165 Prompt \u6A21\u677F"},Ast:{ConfigHeader:"\u63D0\u53D6\u89C4\u5219",AssignTitle:"\u8D4B\u503C\u5C5E\u6027",AssignDesc:"\u5B57\u7B26\u4E32\u8D4B\u503C\u7ED9\u8FD9\u4E9B\u5C5E\u6027\u65F6\u4F1A\u88AB\u6355\u83B7\uFF0C\u5982 name\u3001description\u3002",AssignPlaceholder:"\u4E00\u884C\u4E00\u4E2A\u5C5E\u6027\u540D",FuncTitle:"\u51FD\u6570\u53C2\u6570",FuncDesc:"\u4F20\u5165\u8FD9\u4E9B\u51FD\u6570\u7684\u5B57\u7B26\u4E32\u53C2\u6570\u4F1A\u88AB\u6355\u83B7\uFF0C\u5982 setText\u3001setName\u3002",FuncPlaceholder:"\u4E00\u884C\u4E00\u4E2A\u51FD\u6570\u540D",KeyTitle:"\u5BF9\u8C61\u952E\u540D",KeyDesc:"\u5BF9\u8C61\u4E2D\u8FD9\u4E9B\u952E\u5BF9\u5E94\u7684\u503C\u4F1A\u88AB\u6355\u83B7\uFF0C\u5982 text\u3001label\u3002",KeyPlaceholder:"\u4E00\u884C\u4E00\u4E2A\u952E\u540D",RegexHeader:"\u5185\u5BB9\u8FC7\u6EE4",RejectReTitle:"\u6392\u9664\u89C4\u5219",RejectReDesc:"\u5339\u914D\u5230\u7684\u6587\u672C\u5C06\u88AB\u8DF3\u8FC7\uFF0C\u4E0D\u8FDB\u5165\u7FFB\u8BD1\u6D41\u7A0B\u3002",RejectPlaceholder:"\u4E00\u884C\u4E00\u6761\u6392\u9664\u6B63\u5219",ValidReTitle:"\u4FDD\u7559\u89C4\u5219",ValidReDesc:"\u53EA\u6709\u5339\u914D\u5230\u7684\u6587\u672C\u624D\u4F1A\u88AB\u63D0\u53D6\uFF0C\u5176\u4F59\u5168\u90E8\u5FFD\u7565\u3002",ValidPlaceholder:"\u4E00\u884C\u4E00\u6761\u4FDD\u7559\u6B63\u5219",PromptHeader:"\u7FFB\u8BD1\u63D0\u793A",PromptTitle:"\u7FFB\u8BD1 Prompt",PromptDesc:"AST \u6A21\u5F0F\u4E0B\u53D1\u9001\u7ED9 LLM \u7684\u7FFB\u8BD1\u6307\u4EE4\u6A21\u677F\u3002",PromptPlaceholder:"\u8F93\u5165 Prompt \u6A21\u677F"},Immersive:{Title:"\u542F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1",Desc:"\u5F00\u542F\u540E\uFF0C\u63D2\u4EF6\u5C06\u5BF9\u754C\u9762\u5143\u7D20\u8FDB\u884C\u5B9E\u65F6\u7FFB\u8BD1\u3002",CoreControl:"\u6C89\u6D78\u5F0F\u6E32\u67D3\u63A7\u5236",CoreControlDesc:"\u914D\u7F6E\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u5168\u5C40\u53C2\u6570\u3002",MatchTitle:"\u5305\u542B\u9009\u62E9\u5668",MatchDesc:"\u7CBE\u786E\u6307\u5B9A\u9700\u8981\u7FFB\u8BD1\u7684\u9875\u9762\u5143\u7D20 (CSS Selectors)\u3002",MatchNotice:"\u66F4\u6539\u540E\u53EF\u80FD\u9700\u8981\u91CD\u542F\u6216\u91CD\u65B0\u52A0\u8F7D\u9875\u9762\u751F\u6548\u3002",ExcludeTitle:"\u6392\u9664\u9009\u62E9\u5668",ExcludeDesc:"\u7CBE\u786E\u6307\u5B9A\u9700\u8981\u6392\u9664\u7684\u9875\u9762\u5143\u7D20\u3002",RestartNotice:"\u914D\u7F6E\u5DF2\u66F4\u65B0\uFF0C\u90E8\u5206\u4FEE\u6539\u53EF\u80FD\u9700\u8981\u91CD\u542F\u63D2\u4EF6\u540E\u751F\u6548\u3002",DescLabel:"\u63CF\u8FF0\uFF1A",MainFrameTitle:"\u6839\u8282\u70B9\u8303\u56F4",MainFrameDesc:"\u6307\u5B9A\u7FFB\u8BD1\u7684\u6839\u8282\u70B9\u8303\u56F4 (\u5982\u6307\u5B9A\u6574\u4E2A\u6587\u7AE0\u7684\u5BB9\u5668)",StayOriginalTitle:"\u4FDD\u6301\u539F\u6837\u9009\u62E9\u5668",StayOriginalDesc:"\u5339\u914D\u7684\u5143\u7D20\u5C06\u4FDD\u6301\u539F\u6837\uFF0C\u5E38\u7528\u4E8E\u8BBA\u575B\u7F51\u7AD9\u7684\u4EE3\u7801\u5757\u6216\u6807\u7B7E\u3002",ExtraBlockTitle:"\u5757\u7EA7\u5143\u7D20\u9009\u62E9\u5668",ExtraBlockDesc:"\u5339\u914D\u7684\u5143\u7D20\u5C06\u88AB\u5F53\u4F5C block \u5757\u7EA7\u5143\u7D20\u5904\u7406\uFF0C\u72EC\u5360\u4E00\u884C\u3002",ExtraInlineTitle:"\u884C\u5185\u5143\u7D20\u9009\u62E9\u5668",ExtraInlineDesc:"\u5339\u914D\u7684\u5143\u7D20\u5C06\u88AB\u5F53\u4F5C inline \u884C\u5185\u5143\u7D20\u5904\u7406\u3002",TranslationClassesTitle:"\u8BD1\u6587\u7C7B\u540D (Class)",TranslationClassesDesc:"\u4E3A\u751F\u6210\u7684\u8BD1\u6587\u5143\u7D20\u6DFB\u52A0\u989D\u5916\u7684 CSS \u7C7B\u540D\u3002",InjectedCssTitle:"\u6CE8\u5165\u81EA\u5B9A\u4E49 CSS",InjectedCssDesc:"\u5728\u9875\u9762\u4E2D\u5D4C\u5165\u989D\u5916\u7684 CSS \u6837\u5F0F\u4EE3\u7801\u3002"},Ai:{ConfigHeader:"\u670D\u52A1\u914D\u7F6E",Provider:"\u670D\u52A1\u5546",ProviderDesc:"\u9009\u62E9 LLM \u63D0\u4F9B\u5546\u3002",HomepageBtn:"\u83B7\u53D6 API Key (\u5B98\u7F51)",ProfileSelectTitle:"\u914D\u7F6E\u65B9\u6848",ProfileSelectDesc:"\u5207\u6362\u4E0D\u540C API \u65B9\u6848\uFF0C\u5982 OpenAI\u3001DeepSeek\u3001\u7845\u57FA\u6D41\u52A8\u3002",ProfileAddBtn:"\u65B0\u589E",ProfileDelBtn:"\u5220\u9664",ProfileRenameBtn:"\u91CD\u547D\u540D",ProfileNamePlaceholder:"\u65B9\u6848\u540D\u79F0",ProfileAddNotice:"\u65B9\u6848\u5DF2\u521B\u5EFA",ProfileDelConfirm:"\u5220\u9664\u540E\u65E0\u6CD5\u6062\u590D\uFF0C\u786E\u8BA4\uFF1F",ProfileRenameNotice:"\u8F93\u5165\u65B0\u540D\u79F0",ProfileNameTitle:"\u65B9\u6848\u540D\u79F0",ProfileNameDesc:"\u5F53\u524D\u65B9\u6848\u7684\u663E\u793A\u540D\u79F0\u3002",OpenaiUrlTitle:"\u63A5\u53E3\u5730\u5740",OpenaiUrlDesc:"API \u57FA\u7840\u8DEF\u5F84\uFF0C\u5982 https://api.openai.com",OpenaiUrlPlaceholder:"https://api.openai.com",OpenaiKeyTitle:"API \u5BC6\u94A5",OpenaiKeyDescTip:"\u5BC6\u94A5\u52A0\u5BC6\u5B58\u50A8\u5728\u672C\u5730\uFF0C\u4E0D\u4F1A\u4E0A\u4F20\u3002",OpenaiKeyPlaceholder:"sk-...",ResponseFormatTitle:"\u54CD\u5E94\u683C\u5F0F",ResponseFormatDesc:"LLM \u8FD4\u56DE\u6570\u636E\u7684\u89E3\u6790\u65B9\u5F0F\u3002",ResponseFormatText:"Text (\u901A\u7528)",ResponseFormatJsonObject:"JSON Object",ResponseFormatJsonSchema:"JSON Schema",ModelTitle:"\u6A21\u578B",ModelDesc:"\u7528\u4E8E\u7FFB\u8BD1\u7684\u6A21\u578B\u540D\u79F0\u3002",ModelSelectPlaceholder:"\u9009\u62E9\u5185\u7F6E\u6A21\u578B",ModelInputPlaceholder:"\u6216\u624B\u52A8\u8F93\u5165",TestHeader:"\u8FDE\u901A\u6D4B\u8BD5",TestTitle:"\u6D4B\u8BD5\u8FDE\u63A5",TestDesc:"\u9A8C\u8BC1\u5F53\u524D\u914D\u7F6E\u80FD\u5426\u6B63\u5E38\u8FDE\u63A5 AI \u670D\u52A1\u3002",TestBtn:"\u6D4B\u8BD5",TestLoading:"\u6D4B\u8BD5\u4E2D\u2026",TestStageNetwork:"\u68C0\u67E5\u7F51\u7EDC\u2026",TestStageAuth:"\u9A8C\u8BC1\u5BC6\u94A5\u2026",TestStageModel:"\u9A8C\u8BC1\u6A21\u578B\u2026",TestSuccess:"\u8FDE\u63A5\u6210\u529F\uFF0C\u914D\u7F6E\u6B63\u5E38\u3002",TestSuccessBtn:"\u901A\u8FC7",TestNoticeMissing:"\u8BF7\u586B\u5199\u63A5\u53E3\u5730\u5740\u548C\u5BC6\u94A5",TestFail:"\u8FDE\u63A5\u5931\u8D25",TestFail401:"\u5BC6\u94A5\u65E0\u6548 (401)\uFF1A\u8BF7\u68C0\u67E5 API Key\u3002",TestFail404:"\u5730\u5740\u9519\u8BEF (404)\uFF1A\u8BF7\u68C0\u67E5\u63A5\u53E3\u8DEF\u5F84\u3002",TestFail403:"\u65E0\u6743\u9650 (403)\uFF1A\u8BF7\u68C0\u67E5\u8D26\u53F7\u6743\u9650\u3002",TestFail429:"\u9891\u7387\u9650\u5236 (429)\uFF1A\u989D\u5EA6\u4E0D\u8DB3\u6216\u8BF7\u6C42\u8FC7\u5FEB\u3002",TestFail500:"\u670D\u52A1\u7AEF\u5F02\u5E38 (500)\uFF1A\u63D0\u4F9B\u5546\u670D\u52A1\u5668\u6545\u969C\u3002",TestFailTimeout:"\u8BF7\u6C42\u8D85\u65F6\uFF1A\u68C0\u67E5\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\u3002",TestFailNetwork:"\u7F51\u7EDC\u4E0D\u901A\uFF1A\u65E0\u6CD5\u8BBF\u95EE\u76EE\u6807\u670D\u52A1\u5668\u3002",TestFailModel:"\u6A21\u578B\u4E0D\u5B58\u5728\u6216\u65E0\u6743\u8BBF\u95EE\u3002",TestFailUnknown:"\u672A\u77E5\u9519\u8BEF",DiagModalTitle:"\u6DF1\u5EA6\u8BCA\u65AD\u62A5\u544A",DiagStatusHealthy:"\u5065\u5EB7",DiagStatusWarning:"\u8B66\u544A",DiagStatusFailed:"\u6545\u969C",DiagStatusPass:"\u901A\u8FC7",DiagStatusFail:"\u5931\u8D25",DiagStatusWarn:"\u8B66\u544A",DiagStatusNA:"\u2014",DiagItemEndpoint:"\u63A5\u53E3\u7AEF\u70B9",DiagItemAuth:"\u8EAB\u4EFD\u9A8C\u8BC1",DiagItemModel:"\u6A21\u578B\u53EF\u7528\u6027",DiagItemJsonMode:"JSON \u6A21\u5F0F",DiagItemJsonSchema:"\u7ED3\u6784\u5316\u8F93\u51FA",DiagItemConcurrency:"\u5E76\u53D1\u6297\u538B",DiagLatency:"\u5EF6\u8FDF",DiagStep:"\u8BCA\u65AD\u6B65\u9AA4",DiagResult:"\u7ED3\u679C",DiagRecommendation:"\u5EFA\u8BAE",DiagTipUrlV1:"\u8FDE\u63A5\u5F02\u5E38\uFF0C\u5DF2\u5C1D\u8BD5\u81EA\u52A8\u4FEE\u6B63 URL\u3002\u8BF7\u68C0\u67E5\u7F51\u7EDC\u6216\u4EE3\u7406\u3002",DiagTipModelFallback:"\u5F53\u524D\u6A21\u578B\u4E0D\u652F\u6301\u7ED3\u6784\u5316\u8F93\u51FA\u3002",DiagTipQuota:"\u914D\u989D\u53EF\u80FD\u5DF2\u8017\u5C3D\uFF0C\u8BF7\u68C0\u67E5\u670D\u52A1\u5546\u8D26\u5355\u3002",DiagItemSystemRole:"\u7CFB\u7EDF\u89D2\u8272",DiagItemTranslation:"\u7FFB\u8BD1\u6A21\u62DF",DiagStageSystemRole:"\u9A8C\u8BC1\u7CFB\u7EDF\u89D2\u8272\u2026",DiagStageTranslation:"\u6A21\u62DF\u7FFB\u8BD1\u2026",DiagStageConcurrency:"\u5E76\u53D1\u6781\u9650\u6297\u538B\u2026",DiagTipSystemRole:"\u5F53\u524D\u6A21\u578B\u4E0D\u652F\u6301 system \u89D2\u8272\u3002",DiagTipTranslationFail:"\u7FFB\u8BD1\u6A21\u62DF\u5931\u8D25\uFF0C\u8FD4\u56DE\u683C\u5F0F\u5F02\u5E38\u3002",DiagTipLatencyWarn:"\u54CD\u5E94\u5EF6\u8FDF\u63A5\u8FD1\u8D85\u65F6\u9608\u503C\uFF0C\u6279\u91CF\u7FFB\u8BD1\u65F6\u53EF\u80FD\u8D85\u65F6\u3002",DiagTipConcurrency:"\u906D\u9047\u9891\u7387\u9650\u5236 (429)\u3002\u7531\u4E8E\u5E76\u53D1\u7387\u8FC7\u9AD8\uFF0C\u5EFA\u8BAE\u5728\u57FA\u7840\u914D\u7F6E\u4E2D\u5C06\u5E76\u53D1\u6570\u964D\u81F3 1 \u6216 2\u3002",PromptHeader:"\u7FFB\u8BD1\u63D0\u793A",RegexPromptTitle:"\u6B63\u5219 Prompt",RegexPromptDesc:"\u6B63\u5219\u63D0\u53D6\u6A21\u5F0F\u4E0B\u7684\u7FFB\u8BD1\u6307\u4EE4\u6A21\u677F\u3002",RegexPromptPlaceholder:"\u8F93\u5165 Prompt \u6A21\u677F",AstPromptTitle:"AST Prompt",AstPromptDesc:"AST \u63D0\u53D6\u6A21\u5F0F\u4E0B\u7684\u7FFB\u8BD1\u6307\u4EE4\u6A21\u677F\u3002",AstPromptPlaceholder:"\u8F93\u5165 Prompt \u6A21\u677F",ThemePromptTitle:"\u4E3B\u9898 Prompt",ThemePromptDesc:"\u4E3B\u9898\u7FFB\u8BD1\u6A21\u5F0F\u4E0B\u7684\u7FFB\u8BD1\u6307\u4EE4\u6A21\u677F\u3002",ThemePromptPlaceholder:"\u8F93\u5165 Prompt \u6A21\u677F",PriceHeader:"\u8D39\u7528\u4F30\u7B97",CustomPriceTitle:"\u81EA\u5B9A\u4E49\u5355\u4EF7",CustomPriceDesc:"\u5173\u95ED\u65F6\u6309\u5185\u7F6E\u6A21\u578B\u4EF7\u683C\u4F30\u7B97\uFF087.3 \u6C47\u7387\u6298\u4EBA\u6C11\u5E01\uFF09\u3002",PriceInputTitle:"\u8F93\u5165\u5355\u4EF7 (\xA5/1M tokens)",PriceInputDesc:"\u6BCF\u767E\u4E07\u8F93\u5165 Token \u7684\u4EBA\u6C11\u5E01\u4EF7\u683C\uFF0C\u5982 gpt-4o-mini \u2248 1.1\u3002",PriceOutputTitle:"\u8F93\u51FA\u5355\u4EF7 (\xA5/1M tokens)",PriceOutputDesc:"\u6BCF\u767E\u4E07\u8F93\u51FA Token \u7684\u4EBA\u6C11\u5E01\u4EF7\u683C\uFF0C\u652F\u6301 4 \u4F4D\u5C0F\u6570\u3002",GeminiKeyTitle:"Gemini API \u5BC6\u94A5",GeminiKeyDesc:"Google AI Studio \u7684 API Key\uFF0C\u5BC6\u94A5\u52A0\u5BC6\u5B58\u50A8\u5728\u672C\u5730\u3002",GeminiKeyMissing:"\u8BF7\u5148\u914D\u7F6E Gemini API Key",OllamaUrlTitle:"Ollama \u7AEF\u70B9\u5730\u5740",OllamaUrlDesc:"\u672C\u5730 Ollama \u670D\u52A1\u7684 HTTP \u5730\u5740\uFF0C\u9ED8\u8BA4\u4E3A http://localhost:11434\u3002",OllamaModelDesc:"\u9009\u62E9\u6216\u8F93\u5165\u5DF2\u5B89\u88C5\u7684 Ollama \u6A21\u578B\u540D\u79F0\u3002",OllamaModelPlaceholder:"\u4F8B: qwen2.5 \u6216 llama3",OllamaFetchModelsBtn:"\u5237\u65B0\u6A21\u578B\u5217\u8868",OllamaNoModels:"\u672A\u68C0\u6D4B\u5230\u5DF2\u5B89\u88C5\u6A21\u578B\uFF0C\u8BF7\u5148\u901A\u8FC7 Ollama \u4E0B\u8F7D\u6A21\u578B\u3002",OllamaModelsLoaded:"\u5DF2\u52A0\u8F7D {{count}} \u4E2A\u6A21\u578B",OllamaFetchFailed:"\u65E0\u6CD5\u8FDE\u63A5 Ollama \u670D\u52A1\uFF0C\u8BF7\u68C0\u67E5\u662F\u5426\u5DF2\u542F\u52A8\u3002",OllamaConnectFail:"\u65E0\u6CD5\u8FDE\u63A5 Ollama",OllamaModelNotFound:"\u6A21\u578B {{model}} \u672A\u627E\u5230\uFF0C\u8BF7\u5148\u6267\u884C ollama pull {{model}}",DeepseekKeyTitle:"DeepSeek API \u5BC6\u94A5",DeepseekModelDesc:"\u9009\u62E9\u6216\u8F93\u5165 DeepSeek \u6A21\u578B\u540D\u79F0\u3002",ZhipuKeyTitle:"\u667A\u8C31 AI \u5BC6\u94A5 (API Key)",ZhipuModelDesc:"\u9009\u62E9\u6216\u8F93\u5165\u667A\u8C31 GLM \u7CFB\u5217\u6A21\u578B\u540D\u79F0\u3002",MoonshotKeyTitle:"\u6708\u4E4B\u6697\u9762 (Kimi) \u5BC6\u94A5",MoonshotModelDesc:"\u9009\u62E9\u6216\u8F93\u5165 Moonshot \u7CFB\u5217\u6A21\u578B\u540D\u79F0\u3002",AliyunKeyTitle:"\u901A\u4E49\u5343\u95EE (DashScope) \u5BC6\u94A5",AliyunModelDesc:"\u9009\u62E9\u6216\u8F93\u5165 Qwen \u7CFB\u5217\u6A21\u578B\u540D\u79F0\u3002",BaiduKeyTitle:"\u767E\u5EA6\u5343\u5E06 (Qianfan) \u5BC6\u94A5",BaiduModelDesc:"\u9009\u62E9\u6216\u8F93\u5165\u767E\u5EA6\u6587\u5FC3\u4E00\u8A00 (ERNIE) \u7CFB\u5217\u6A21\u578B\u540D\u79F0\u3002",BytedanceKeyTitle:"\u5B57\u8282\u8DF3\u52A8 (\u8C46\u5305/Ark) \u5BC6\u94A5",BytedanceModelDesc:"\u9009\u62E9\u6216\u8F93\u5165\u8C46\u5305\u7CFB\u5217\u6A21\u578B\u540D\u79F0\u3002",GroqKeyTitle:"Groq API \u5BC6\u94A5",GroqModelDesc:"\u9009\u62E9\u6216\u8F93\u5165 Groq \u652F\u6301\u7684\u6A21\u578B (\u5982 Llama 3)\u3002",SiliconflowKeyTitle:"SiliconFlow (\u7845\u57FA\u6D41\u52A8) \u5BC6\u94A5",SiliconflowModelDesc:"\u9009\u62E9\u6216\u8F93\u5165 SiliconFlow \u652F\u6301\u7684\u6A21\u578B (\u5982 DeepSeek-V3)\u3002",OpenrouterKeyTitle:"OpenRouter API \u5BC6\u94A5",OpenrouterModelDesc:"\u8F93\u5165 OpenRouter \u6A21\u578B\u6807\u8BC6\u7B26 (\u5982 anthropic/claude-3.5-sonnet)\u3002",DeepinfraKeyTitle:"DeepInfra API \u5BC6\u94A5",DeepinfraModelDesc:"\u9009\u62E9\u6216\u8F93\u5165 DeepInfra \u652F\u6301\u7684\u6A21\u578B (\u5982 Llama-3.3)\u3002",MistralKeyTitle:"Mistral AI API \u5BC6\u94A5",MistralModelDesc:"\u9009\u62E9\u6216\u8F93\u5165 Mistral \u5B98\u65B9\u6A21\u578B (\u5982 mistral-large-latest)\u3002",MinimaxKeyTitle:"MiniMax (\u6D77\u87BA AI) \u5BC6\u94A5",MinimaxModelDesc:"\u9009\u62E9\u6216\u8F93\u5165 MiniMax \u6A21\u578B (\u5982 abab6.5-chat)\u3002",StepfunKeyTitle:"\u9636\u8DC3\u661F\u8FB0 (StepFun) \u5BC6\u94A5",StepfunModelDesc:"\u9009\u62E9\u6216\u8F93\u5165\u9636\u8DC3\u661F\u8FB0\u6A21\u578B (\u5982 step-1-8k)\u3002"},Share:{AuthTitle:"\u8FDC\u7A0B\u4ED3\u5E93",ModeTitle:"\u8BBF\u95EE\u4EE4\u724C (Token)",ModeDesc:"\u914D\u7F6E\u7528\u4E8E\u540C\u6B65\u4E0E\u63D0\u4EA4\u7FFB\u8BD1\u7684\u4E2A\u4EBA\u8BBF\u95EE\u4EE4\u724C (PAT)\u3002",LoginSuccess:"\u5DF2\u8FDE\u63A5",TokenPlaceholder:"\u8BF7\u8F93\u5165 Token",Verifying:"\u6B63\u5728\u9A8C\u8BC1...",VerifyInsufficient:"\u6743\u9650\u4E0D\u8DB3 (\u9700 repo \u6743\u9650)",VerifyError:"\u9A8C\u8BC1\u5931\u8D25",TutorialTitle:"\u83B7\u53D6\u4EE4\u724C",TutorialTip:"\u63A8\u8350\u751F\u6210\u4EC5\u5305\u542B\u5FC5\u9700\u6743\u9650\u7684 Fine-grained Token (\u9700\u6388\u6743\u5BF9\u5E94\u6216\u5168\u90E8\u4ED3\u5E93\u7684 Contents \u8BFB\u5199\u6743\u9650)\u3002",SyncTitle:"\u540C\u6B65\u914D\u7F6E",RepoTitle:"\u76EE\u6807\u4ED3\u5E93",RepoDesc:"\u7528\u4E8E\u5B58\u50A8\u548C\u5206\u4EAB\u7FFB\u8BD1\u7684\u8FDC\u7A0B\u4ED3\u5E93\u540D\u3002",AccountTitle:"\u8D26\u6237\u7BA1\u7406",LogoutTitle:"\u9000\u51FA\u767B\u5F55",LogoutDesc:"\u6E05\u9664\u672C\u5730\u5B58\u50A8\u7684\u8EAB\u4EFD\u9A8C\u8BC1\u4FE1\u606F\u3002",LogoutBtn:"\u9000\u51FA\u767B\u5F55",LogoutSuccess:"\u5DF2\u9000\u51FA\u767B\u5F55",ProfileSelectTitle:"\u8D26\u53F7\u65B9\u6848 (Account Profile)",ProfileSelectDesc:"\u7BA1\u7406\u5E76\u5FEB\u901F\u5207\u6362\u4E0D\u540C\u7684 GitHub \u8D26\u53F7\u53CA\u5BF9\u5E94\u7684\u7FFB\u8BD1\u4ED3\u5E93\u65B9\u6848\u3002",ProfileAddBtn:"\u65B0\u589E\u8D26\u53F7",ProfileDelBtn:"\u5220\u9664\u8D26\u53F7",ProfileDelConfirm:"\u786E\u5B9A\u8981\u5220\u9664\u6B64\u8D26\u53F7\u65B9\u6848\u5417\uFF1F\u64CD\u4F5C\u65E0\u6CD5\u6062\u590D\u3002",ProfileNameTitle:"\u65B9\u6848\u6807\u8BC6\u540D",ProfileNameDesc:"\u4E3A\u5F53\u524D\u8D26\u53F7\u65B9\u6848\u81EA\u5B9A\u4E49\u4E00\u4E2A\u663E\u793A\u540D\u79F0\u4EE5\u4FBF\u533A\u5206\uFF08\u5982\uFF1A\u5DE5\u4F5C\u5F20\u53F7\u3001\u4E3B\u8D26\u53F7\u7B49\uFF09\u3002",ProfileNamePlaceholder:"\u8BF7\u8F93\u5165\u540D\u79F0...",ProfileAddNotice:"\u8D26\u53F7\u65B9\u6848\u5DF2\u521B\u5EFA"}}});var LB,RB=de(()=>{hB();yB();bB();SB();wB();EB();AB();NB();LB={Common:mB,Manager:gB,Editor:xB,Cloud:vB,Wizard:TB,Account:CB,Agreement:PB,Settings:IB}});var kB,Lie,v,Rr=de(()=>{NI();er();kB=require("obsidian");RB();Lie=()=>(kB.moment.locale()||"en").toLowerCase().startsWith("zh")?"zhCN":"en";Rs.use(iw).init({lng:Lie(),fallbackLng:"zhCN",debug:!1,interpolation:{escapeValue:!1},resources:{zhCN:{translation:LB}}});v=(e,t)=>Rs.t(e,t)});var $d,ZI,vc,uw=de(()=>{$d={assignments:["overwriteName","innerHTML","outerHTML","title","alt","placeholder","textContent","innerText","ariaLabel","nodeValue","buttonText","confirmText","cancelText","labelText"],functions:["Notice","setTitle","setContent","setName","setDesc","setButtonText","setPlaceholder","setTooltip","addOption","addOptions","addHeading","addText","setHint","setWarning","setText","appendText","createEl","createDiv","createSpan","addCommand","insertText","replaceRange","replaceSelection","log","error","warn","info","alert","confirm","prompt","renderMarkdown","setLabel","setConfirmText","setCancelText"],keys:["name","description","text","placeholder","label","tooltip","title","header","desc","message","buttontext","aria-label","heading","content","tab","caption","subtitle","summary","info","warning","error","success","hint","instructions","link","selection","annotation","search","speech","page","empty","detail","body","option","notice","confirmText","cancelText","ariaLabel","buttonText"]},ZI={REJECT_PATTERNS:[/^\s*$/,/^\d+$/,/^[\w-]+\.[\w-]+\.\w+$/,/^https?:\/\//i,/^data:image\//i,/^#([0-9a-f]{3}|[0-9a-f]{6})$/i,/^[a-z0-9]+-[a-z0-9-]+$/,/^[a-z]+[A-Z][a-zA-Z0-9]*$/,/^[A-Z_][A-Z0-9_]{3,}$/,/^(px|em|rem|vh|vw|auto)$/i,/^rgba?\(/i,/^\./,/\.(png|jpg|gif|svg|css|js|ts|md|json)$/i,/^[\w.\/\\-]+\/[\w.\/\\-]+$/],VALID_PATTERNS:[/\s/,/[^\x00-\x7F]/,/[!?,;:。!?,;:]\s*$/]},vc={patterns:["(Notice|log|error|setText|setButtonText|setName|setDesc|setPlaceholder|setTooltip|appendText|setTitle|addHeading|renderMarkdown)\\(\\s*(['\"`])((?:[^\\\\2\\\\\\\\]|\\\\\\\\.)*?)\\2\\s*\\)","(textContent|innerText|name|description|selection|annotation|link|text|search|speech|page|settings)\\s*[:=]\\s*(['\"`])((?:[^\\\\2\\\\\\\\]|\\\\\\\\.)*?)\\2"],rejectPatterns:["^\\s*$","^\\d+$","^[\\w-]+\\.[\\w-]+\\.\\w+$","^https?:\\/\\/","^data:image\\/","^#([0-9a-f]{3}|[0-9a-f]{6})$","^[a-z0-9]+-[a-z0-9-]+$","^[a-z]+[A-Z][a-zA-Z0-9]*$","^[A-Z_][A-Z0-9_]{3,}$","^(px|em|rem|vh|vw|auto)$","^rgba?\\(","^\\.","\\.(png|jpg|gif|svg|css|js|ts|md|json)$","^[\\w.\\/\\\\-]+\\/[\\w.\\/\\\\-]+$"],validPatterns:["\\s","[^\\x00-\\x7F]","[!?,;:\u3002\uFF01\uFF1F\uFF0C\uFF1B\uFF1A]\\s*$"]}});var Pw=ne(p0=>{"use strict";Object.defineProperty(p0,"__esModule",{value:!0});function Mie(e,t){if(e==null)return{};var r={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)!==-1)continue;r[a]=e[a]}return r}var Cc=class{constructor(t,r,a){this.line=void 0,this.column=void 0,this.index=void 0,this.line=t,this.column=r,this.index=a}},Tg=class{constructor(t,r){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=t,this.end=r}};function ui(e,t){let{line:r,column:a,index:n}=e;return new Cc(r,a+t,n+t)}var _B="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",Die={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:_B},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:_B}},OB={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},bw=e=>e.type==="UpdateExpression"?OB.UpdateExpression[`${e.prefix}`]:OB[e.type],_ie={AccessorIsGenerator:({kind:e})=>`A ${e}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:e})=>`Missing initializer in ${e} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:e})=>`\`${e}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:e,exportName:t})=>`A string literal cannot be used as an exported binding without \`from\`.
|
|
- Did you mean \`export { '${e}' as '${t}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:e})=>`'${e==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:e})=>`Unsyntactic ${e==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.",ImportBindingIsString:({importName:e})=>`A string literal cannot be used as an imported binding.
|
|
- Did you mean \`import { "${e}" as foo }\`?`,ImportCallArity:"`import()` requires exactly one or two arguments.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverDiscardElement:"'void' must be followed by an expression when not used in a binding position.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:e})=>`Expected number in radix ${e}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:e})=>`Escape sequence in keyword ${e}.`,InvalidIdentifier:({identifierName:e})=>`Invalid identifier ${e}.`,InvalidLhs:({ancestor:e})=>`Invalid left-hand side in ${bw(e)}.`,InvalidLhsBinding:({ancestor:e})=>`Binding invalid left-hand side in ${bw(e)}.`,InvalidLhsOptionalChaining:({ancestor:e})=>`Invalid optional chaining in the left-hand side of ${bw(e)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:e})=>`Unexpected character '${e}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:e})=>`Private name #${e} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:e})=>`Label '${e}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:e})=>`This experimental syntax requires enabling the parser plugin: ${e.map(t=>JSON.stringify(t)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:e})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${e.map(t=>JSON.stringify(t)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:e})=>`Duplicate key "${e}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:e})=>`An export name cannot include a lone surrogate, found '\\u${e.toString(16)}'.`,ModuleExportUndefined:({localName:e})=>`Export '${e}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:e})=>`Private names are only allowed in property accesses (\`obj.#${e}\`) or in \`in\` expressions (\`#${e} in obj\`).`,PrivateNameRedeclaration:({identifierName:e})=>`Duplicate private name #${e}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:e})=>`Unexpected keyword '${e}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:e})=>`Unexpected reserved word '${e}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:e,unexpected:t})=>`Unexpected token${t?` '${t}'.`:""}${e?`, expected "${e}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.",UnexpectedVoidPattern:"Unexpected void binding.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:e,onlyValidPropertyName:t})=>`The only valid meta property for ${e} is ${e}.${t}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:e})=>`Identifier '${e}' has already been declared.`,VoidPatternCatchClauseParam:"A void binding can not be the catch clause parameter. Use `try { ... } catch { ... }` if you want to discard the caught error.",VoidPatternInitializer:"A void binding may not have an initializer.",YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",YieldNotInGeneratorFunction:"'yield' is only allowed within generator functions.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},Oie={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:e})=>`Assigning to '${e}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:e})=>`Binding '${e}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},Fie={ParseExpressionEmptyInput:"Unexpected parseExpression() input: The input is empty or contains only comments.",ParseExpressionExpectsEOF:({unexpected:e})=>`Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(e)}\`.`},Bie=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),Uie=Object.assign({PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:e})=>`Invalid topic token ${e}. In order to use ${e} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${e}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:e})=>`Hack-style pipe body cannot be an unparenthesized ${bw({type:e})}; please wrap it in parentheses.`},{PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'}),jie=["message"];function FB(e,t,r){Object.defineProperty(e,t,{enumerable:!1,configurable:!0,value:r})}function zie({toMessage:e,code:t,reasonCode:r,syntaxPlugin:a}){let n=r==="MissingPlugin"||r==="MissingOneOfPlugins";{let s={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};s[r]&&(r=s[r])}return function s(i,o){let l=new SyntaxError;return l.code=t,l.reasonCode=r,l.loc=i,l.pos=i.index,l.syntaxPlugin=a,n&&(l.missingPlugin=o.missingPlugin),FB(l,"clone",function(u={}){var d;let{line:f,column:p,index:m}=(d=u.loc)!=null?d:i;return s(new Cc(f,p,m),Object.assign({},o,u.details))}),FB(l,"details",o),Object.defineProperty(l,"message",{configurable:!0,get(){let c=`${e(o)} (${i.line}:${i.column})`;return this.message=c,c},set(c){Object.defineProperty(this,"message",{value:c,writable:!0})}}),l}}function Tc(e,t){if(Array.isArray(e))return a=>Tc(a,e[0]);let r={};for(let a of Object.keys(e)){let n=e[a],s=typeof n=="string"?{message:()=>n}:typeof n=="function"?{message:n}:n,{message:i}=s,o=Mie(s,jie),l=typeof i=="string"?()=>i:i;r[a]=zie(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:a,toMessage:l},t?{syntaxPlugin:t}:{},o))}return r}var X=Object.assign({},Tc(Die),Tc(_ie),Tc(Oie),Tc(Fie),Tc`pipelineOperator`(Uie));function Vie(){return{sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,allowYieldOutsideFunction:!1,plugins:[],strictMode:void 0,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0}}function qie(e){let t=Vie();if(e==null)return t;if(e.annexB!=null&&e.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");for(let r of Object.keys(t))e[r]!=null&&(t[r]=e[r]);if(t.startLine===1)e.startIndex==null&&t.startColumn>0?t.startIndex=t.startColumn:e.startColumn==null&&t.startIndex>0&&(t.startColumn=t.startIndex);else if((e.startColumn==null||e.startIndex==null)&&e.startIndex!=null)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");if(t.sourceType==="commonjs"){if(e.allowAwaitOutsideFunction!=null)throw new Error("The `allowAwaitOutsideFunction` option cannot be used with `sourceType: 'commonjs'`.");if(e.allowReturnOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowReturnOutsideFunction: true`, please remove the `allowReturnOutsideFunction` option or use `sourceType: 'script'`.");if(e.allowNewTargetOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowNewTargetOutsideFunction: true`, please remove the `allowNewTargetOutsideFunction` option or use `sourceType: 'script'`.")}return t}var{defineProperty:Hie}=Object,BB=(e,t)=>{e&&Hie(e,t,{enumerable:!1,value:e[t]})};function a0(e){return BB(e.loc.start,"index"),BB(e.loc.end,"index"),e}var $ie=e=>class extends e{parse(){let r=a0(super.parse());return this.optionFlags&256&&(r.tokens=r.tokens.map(a0)),r}parseRegExpLiteral({pattern:r,flags:a}){let n=null;try{n=new RegExp(r,a)}catch{}let s=this.estreeParseLiteral(n);return s.regex={pattern:r,flags:a},s}parseBigIntLiteral(r){let a;try{a=BigInt(r)}catch{a=null}let n=this.estreeParseLiteral(a);return n.bigint=String(n.value||r),n}parseDecimalLiteral(r){let n=this.estreeParseLiteral(null);return n.decimal=String(n.value||r),n}estreeParseLiteral(r){return this.parseLiteral(r,"Literal")}parseStringLiteral(r){return this.estreeParseLiteral(r)}parseNumericLiteral(r){return this.estreeParseLiteral(r)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(r){return this.estreeParseLiteral(r)}estreeParseChainExpression(r,a){let n=this.startNodeAtNode(r);return n.expression=r,this.finishNodeAt(n,"ChainExpression",a)}directiveToStmt(r){let a=r.value;delete r.value,this.castNodeTo(a,"Literal"),a.raw=a.extra.raw,a.value=a.extra.expressionValue;let n=this.castNodeTo(r,"ExpressionStatement");return n.expression=a,n.directive=a.extra.rawValue,delete a.extra,n}fillOptionalPropertiesForTSESLint(r){}cloneEstreeStringLiteral(r){let{start:a,end:n,loc:s,range:i,raw:o,value:l}=r,c=Object.create(r.constructor.prototype);return c.type="Literal",c.start=a,c.end=n,c.loc=s,c.range=i,c.raw=o,c.value=l,c}initFunction(r,a){super.initFunction(r,a),r.expression=!1}checkDeclaration(r){r!=null&&this.isObjectProperty(r)?this.checkDeclaration(r.value):super.checkDeclaration(r)}getObjectOrClassMethodParams(r){return r.value.params}isValidDirective(r){var a;return r.type==="ExpressionStatement"&&r.expression.type==="Literal"&&typeof r.expression.value=="string"&&!((a=r.expression.extra)!=null&&a.parenthesized)}parseBlockBody(r,a,n,s,i){super.parseBlockBody(r,a,n,s,i);let o=r.directives.map(l=>this.directiveToStmt(l));r.body=o.concat(r.body),delete r.directives}parsePrivateName(){let r=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(r):r}convertPrivateNameToPrivateIdentifier(r){let a=super.getPrivateNameSV(r);return delete r.id,r.name=a,this.castNodeTo(r,"PrivateIdentifier")}isPrivateName(r){return this.getPluginOption("estree","classFeatures")?r.type==="PrivateIdentifier":super.isPrivateName(r)}getPrivateNameSV(r){return this.getPluginOption("estree","classFeatures")?r.name:super.getPrivateNameSV(r)}parseLiteral(r,a){let n=super.parseLiteral(r,a);return n.raw=n.extra.raw,delete n.extra,n}parseFunctionBody(r,a,n=!1){super.parseFunctionBody(r,a,n),r.expression=r.body.type!=="BlockStatement"}parseMethod(r,a,n,s,i,o,l=!1){let c=this.startNode();c.kind=r.kind,c=super.parseMethod(c,a,n,s,i,o,l),delete c.kind;let{typeParameters:u}=r;u&&(delete r.typeParameters,c.typeParameters=u,this.resetStartLocationFromNode(c,u));let d=this.castNodeTo(c,"FunctionExpression");return r.value=d,o==="ClassPrivateMethod"&&(r.computed=!1),o==="ObjectMethod"?(r.kind==="method"&&(r.kind="init"),r.shorthand=!1,this.finishNode(r,"Property")):this.finishNode(r,"MethodDefinition")}nameIsConstructor(r){return r.type==="Literal"?r.value==="constructor":super.nameIsConstructor(r)}parseClassProperty(...r){let a=super.parseClassProperty(...r);return this.getPluginOption("estree","classFeatures")&&this.castNodeTo(a,"PropertyDefinition"),a}parseClassPrivateProperty(...r){let a=super.parseClassPrivateProperty(...r);return this.getPluginOption("estree","classFeatures")&&(this.castNodeTo(a,"PropertyDefinition"),a.computed=!1),a}parseClassAccessorProperty(r){let a=super.parseClassAccessorProperty(r);return this.getPluginOption("estree","classFeatures")&&(a.abstract&&this.hasPlugin("typescript")?(delete a.abstract,this.castNodeTo(a,"TSAbstractAccessorProperty")):this.castNodeTo(a,"AccessorProperty")),a}parseObjectProperty(r,a,n,s){let i=super.parseObjectProperty(r,a,n,s);return i&&(i.kind="init",this.castNodeTo(i,"Property")),i}finishObjectProperty(r){return r.kind="init",this.finishNode(r,"Property")}isValidLVal(r,a,n,s){return r==="Property"?"value":super.isValidLVal(r,a,n,s)}isAssignable(r,a){return r!=null&&this.isObjectProperty(r)?this.isAssignable(r.value,a):super.isAssignable(r,a)}toAssignable(r,a=!1){if(r!=null&&this.isObjectProperty(r)){let{key:n,value:s}=r;this.isPrivateName(n)&&this.classScope.usePrivateName(this.getPrivateNameSV(n),n.loc.start),this.toAssignable(s,a)}else super.toAssignable(r,a)}toAssignableObjectExpressionProp(r,a,n){r.type==="Property"&&(r.kind==="get"||r.kind==="set")?this.raise(X.PatternHasAccessor,r.key):r.type==="Property"&&r.method?this.raise(X.PatternHasMethod,r.key):super.toAssignableObjectExpressionProp(r,a,n)}finishCallExpression(r,a){let n=super.finishCallExpression(r,a);if(n.callee.type==="Import"){var s;this.castNodeTo(n,"ImportExpression"),n.source=n.arguments[0],n.options=(s=n.arguments[1])!=null?s:null;{var i;n.attributes=(i=n.arguments[1])!=null?i:null}delete n.arguments,delete n.callee}else n.type==="OptionalCallExpression"?this.castNodeTo(n,"CallExpression"):n.optional=!1;return n}toReferencedArguments(r){r.type!=="ImportExpression"&&super.toReferencedArguments(r)}parseExport(r,a){let n=this.state.lastTokStartLoc,s=super.parseExport(r,a);switch(s.type){case"ExportAllDeclaration":s.exported=null;break;case"ExportNamedDeclaration":s.specifiers.length===1&&s.specifiers[0].type==="ExportNamespaceSpecifier"&&(this.castNodeTo(s,"ExportAllDeclaration"),s.exported=s.specifiers[0].exported,delete s.specifiers);case"ExportDefaultDeclaration":{var i;let{declaration:o}=s;o?.type==="ClassDeclaration"&&((i=o.decorators)==null?void 0:i.length)>0&&o.start===s.start&&this.resetStartLocation(s,n)}break}return s}stopParseSubscript(r,a){let n=super.stopParseSubscript(r,a);return a.optionalChainMember?this.estreeParseChainExpression(n,r.loc.end):n}parseMember(r,a,n,s,i){let o=super.parseMember(r,a,n,s,i);return o.type==="OptionalMemberExpression"?this.castNodeTo(o,"MemberExpression"):o.optional=!1,o}isOptionalMemberExpression(r){return r.type==="ChainExpression"?r.expression.type==="MemberExpression":super.isOptionalMemberExpression(r)}hasPropertyAsPrivateName(r){return r.type==="ChainExpression"&&(r=r.expression),super.hasPropertyAsPrivateName(r)}isObjectProperty(r){return r.type==="Property"&&r.kind==="init"&&!r.method}isObjectMethod(r){return r.type==="Property"&&(r.method||r.kind==="get"||r.kind==="set")}castNodeTo(r,a){let n=super.castNodeTo(r,a);return this.fillOptionalPropertiesForTSESLint(n),n}cloneIdentifier(r){let a=super.cloneIdentifier(r);return this.fillOptionalPropertiesForTSESLint(a),a}cloneStringLiteral(r){return r.type==="Literal"?this.cloneEstreeStringLiteral(r):super.cloneStringLiteral(r)}finishNodeAt(r,a,n){return a0(super.finishNodeAt(r,a,n))}finishNode(r,a){let n=super.finishNode(r,a);return this.fillOptionalPropertiesForTSESLint(n),n}resetStartLocation(r,a){super.resetStartLocation(r,a),a0(r)}resetEndLocation(r,a=this.state.lastTokEndLoc){super.resetEndLocation(r,a),a0(r)}},Zp=class{constructor(t,r){this.token=void 0,this.preserveSpace=void 0,this.token=t,this.preserveSpace=!!r}},Gr={brace:new Zp("{"),j_oTag:new Zp("<tag"),j_cTag:new Zp("</tag"),j_expr:new Zp("<tag>...</tag>",!0)};Gr.template=new Zp("`",!0);var xr=!0,Ze=!0,eN=!0,n0=!0,Kd=!0,Gie=!0,Tw=class{constructor(t,r={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.rightAssociative=!!r.rightAssociative,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop!=null?r.binop:null,this.updateContext=null}},PN=new Map;function Dr(e,t={}){t.keyword=e;let r=Pt(e,t);return PN.set(e,r),r}function ci(e,t){return Pt(e,{beforeExpr:xr,binop:t})}var l0=-1,Su=[],AN=[],IN=[],NN=[],LN=[],RN=[];function Pt(e,t={}){var r,a,n,s;return++l0,AN.push(e),IN.push((r=t.binop)!=null?r:-1),NN.push((a=t.beforeExpr)!=null?a:!1),LN.push((n=t.startsExpr)!=null?n:!1),RN.push((s=t.prefix)!=null?s:!1),Su.push(new Tw(e,t)),l0}function Tr(e,t={}){var r,a,n,s;return++l0,PN.set(e,l0),AN.push(e),IN.push((r=t.binop)!=null?r:-1),NN.push((a=t.beforeExpr)!=null?a:!1),LN.push((n=t.startsExpr)!=null?n:!1),RN.push((s=t.prefix)!=null?s:!1),Su.push(new Tw("name",t)),l0}var Kie={bracketL:Pt("[",{beforeExpr:xr,startsExpr:Ze}),bracketHashL:Pt("#[",{beforeExpr:xr,startsExpr:Ze}),bracketBarL:Pt("[|",{beforeExpr:xr,startsExpr:Ze}),bracketR:Pt("]"),bracketBarR:Pt("|]"),braceL:Pt("{",{beforeExpr:xr,startsExpr:Ze}),braceBarL:Pt("{|",{beforeExpr:xr,startsExpr:Ze}),braceHashL:Pt("#{",{beforeExpr:xr,startsExpr:Ze}),braceR:Pt("}"),braceBarR:Pt("|}"),parenL:Pt("(",{beforeExpr:xr,startsExpr:Ze}),parenR:Pt(")"),comma:Pt(",",{beforeExpr:xr}),semi:Pt(";",{beforeExpr:xr}),colon:Pt(":",{beforeExpr:xr}),doubleColon:Pt("::",{beforeExpr:xr}),dot:Pt("."),question:Pt("?",{beforeExpr:xr}),questionDot:Pt("?."),arrow:Pt("=>",{beforeExpr:xr}),template:Pt("template"),ellipsis:Pt("...",{beforeExpr:xr}),backQuote:Pt("`",{startsExpr:Ze}),dollarBraceL:Pt("${",{beforeExpr:xr,startsExpr:Ze}),templateTail:Pt("...`",{startsExpr:Ze}),templateNonTail:Pt("...${",{beforeExpr:xr,startsExpr:Ze}),at:Pt("@"),hash:Pt("#",{startsExpr:Ze}),interpreterDirective:Pt("#!..."),eq:Pt("=",{beforeExpr:xr,isAssign:n0}),assign:Pt("_=",{beforeExpr:xr,isAssign:n0}),slashAssign:Pt("_=",{beforeExpr:xr,isAssign:n0}),xorAssign:Pt("_=",{beforeExpr:xr,isAssign:n0}),moduloAssign:Pt("_=",{beforeExpr:xr,isAssign:n0}),incDec:Pt("++/--",{prefix:Kd,postfix:Gie,startsExpr:Ze}),bang:Pt("!",{beforeExpr:xr,prefix:Kd,startsExpr:Ze}),tilde:Pt("~",{beforeExpr:xr,prefix:Kd,startsExpr:Ze}),doubleCaret:Pt("^^",{startsExpr:Ze}),doubleAt:Pt("@@",{startsExpr:Ze}),pipeline:ci("|>",0),nullishCoalescing:ci("??",1),logicalOR:ci("||",1),logicalAND:ci("&&",2),bitwiseOR:ci("|",3),bitwiseXOR:ci("^",4),bitwiseAND:ci("&",5),equality:ci("==/!=/===/!==",6),lt:ci("</>/<=/>=",7),gt:ci("</>/<=/>=",7),relational:ci("</>/<=/>=",7),bitShift:ci("<</>>/>>>",8),bitShiftL:ci("<</>>/>>>",8),bitShiftR:ci("<</>>/>>>",8),plusMin:Pt("+/-",{beforeExpr:xr,binop:9,prefix:Kd,startsExpr:Ze}),modulo:Pt("%",{binop:10,startsExpr:Ze}),star:Pt("*",{binop:10}),slash:ci("/",10),exponent:Pt("**",{beforeExpr:xr,binop:11,rightAssociative:!0}),_in:Dr("in",{beforeExpr:xr,binop:7}),_instanceof:Dr("instanceof",{beforeExpr:xr,binop:7}),_break:Dr("break"),_case:Dr("case",{beforeExpr:xr}),_catch:Dr("catch"),_continue:Dr("continue"),_debugger:Dr("debugger"),_default:Dr("default",{beforeExpr:xr}),_else:Dr("else",{beforeExpr:xr}),_finally:Dr("finally"),_function:Dr("function",{startsExpr:Ze}),_if:Dr("if"),_return:Dr("return",{beforeExpr:xr}),_switch:Dr("switch"),_throw:Dr("throw",{beforeExpr:xr,prefix:Kd,startsExpr:Ze}),_try:Dr("try"),_var:Dr("var"),_const:Dr("const"),_with:Dr("with"),_new:Dr("new",{beforeExpr:xr,startsExpr:Ze}),_this:Dr("this",{startsExpr:Ze}),_super:Dr("super",{startsExpr:Ze}),_class:Dr("class",{startsExpr:Ze}),_extends:Dr("extends",{beforeExpr:xr}),_export:Dr("export"),_import:Dr("import",{startsExpr:Ze}),_null:Dr("null",{startsExpr:Ze}),_true:Dr("true",{startsExpr:Ze}),_false:Dr("false",{startsExpr:Ze}),_typeof:Dr("typeof",{beforeExpr:xr,prefix:Kd,startsExpr:Ze}),_void:Dr("void",{beforeExpr:xr,prefix:Kd,startsExpr:Ze}),_delete:Dr("delete",{beforeExpr:xr,prefix:Kd,startsExpr:Ze}),_do:Dr("do",{isLoop:eN,beforeExpr:xr}),_for:Dr("for",{isLoop:eN}),_while:Dr("while",{isLoop:eN}),_as:Tr("as",{startsExpr:Ze}),_assert:Tr("assert",{startsExpr:Ze}),_async:Tr("async",{startsExpr:Ze}),_await:Tr("await",{startsExpr:Ze}),_defer:Tr("defer",{startsExpr:Ze}),_from:Tr("from",{startsExpr:Ze}),_get:Tr("get",{startsExpr:Ze}),_let:Tr("let",{startsExpr:Ze}),_meta:Tr("meta",{startsExpr:Ze}),_of:Tr("of",{startsExpr:Ze}),_sent:Tr("sent",{startsExpr:Ze}),_set:Tr("set",{startsExpr:Ze}),_source:Tr("source",{startsExpr:Ze}),_static:Tr("static",{startsExpr:Ze}),_using:Tr("using",{startsExpr:Ze}),_yield:Tr("yield",{startsExpr:Ze}),_asserts:Tr("asserts",{startsExpr:Ze}),_checks:Tr("checks",{startsExpr:Ze}),_exports:Tr("exports",{startsExpr:Ze}),_global:Tr("global",{startsExpr:Ze}),_implements:Tr("implements",{startsExpr:Ze}),_intrinsic:Tr("intrinsic",{startsExpr:Ze}),_infer:Tr("infer",{startsExpr:Ze}),_is:Tr("is",{startsExpr:Ze}),_mixins:Tr("mixins",{startsExpr:Ze}),_proto:Tr("proto",{startsExpr:Ze}),_require:Tr("require",{startsExpr:Ze}),_satisfies:Tr("satisfies",{startsExpr:Ze}),_keyof:Tr("keyof",{startsExpr:Ze}),_readonly:Tr("readonly",{startsExpr:Ze}),_unique:Tr("unique",{startsExpr:Ze}),_abstract:Tr("abstract",{startsExpr:Ze}),_declare:Tr("declare",{startsExpr:Ze}),_enum:Tr("enum",{startsExpr:Ze}),_module:Tr("module",{startsExpr:Ze}),_namespace:Tr("namespace",{startsExpr:Ze}),_interface:Tr("interface",{startsExpr:Ze}),_type:Tr("type",{startsExpr:Ze}),_opaque:Tr("opaque",{startsExpr:Ze}),name:Pt("name",{startsExpr:Ze}),placeholder:Pt("%%",{startsExpr:Ze}),string:Pt("string",{startsExpr:Ze}),num:Pt("num",{startsExpr:Ze}),bigint:Pt("bigint",{startsExpr:Ze}),decimal:Pt("decimal",{startsExpr:Ze}),regexp:Pt("regexp",{startsExpr:Ze}),privateName:Pt("#name",{startsExpr:Ze}),eof:Pt("eof"),jsxName:Pt("jsxName"),jsxText:Pt("jsxText",{beforeExpr:xr}),jsxTagStart:Pt("jsxTagStart",{startsExpr:Ze}),jsxTagEnd:Pt("jsxTagEnd")};function Qr(e){return e>=93&&e<=133}function Wie(e){return e<=92}function Vl(e){return e>=58&&e<=133}function YB(e){return e>=58&&e<=137}function Xie(e){return NN[e]}function i0(e){return LN[e]}function Yie(e){return e>=29&&e<=33}function UB(e){return e>=129&&e<=131}function Jie(e){return e>=90&&e<=92}function kN(e){return e>=58&&e<=92}function Qie(e){return e>=39&&e<=59}function Zie(e){return e===34}function eoe(e){return RN[e]}function toe(e){return e>=121&&e<=123}function roe(e){return e>=124&&e<=130}function Yd(e){return AN[e]}function vw(e){return IN[e]}function aoe(e){return e===57}function ww(e){return e>=24&&e<=25}function vu(e){return Su[e]}Su[8].updateContext=e=>{e.pop()},Su[5].updateContext=Su[7].updateContext=Su[23].updateContext=e=>{e.push(Gr.brace)},Su[22].updateContext=e=>{e[e.length-1]===Gr.template?e.pop():e.push(Gr.template)},Su[143].updateContext=e=>{e.push(Gr.j_expr,Gr.j_oTag)};var MN="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",JB="\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",noe=new RegExp("["+MN+"]"),soe=new RegExp("["+MN+JB+"]");MN=JB=null;var QB=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],ioe=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239];function iN(e,t){let r=65536;for(let a=0,n=t.length;a<n;a+=2){if(r+=t[a],r>e)return!1;if(r+=t[a+1],r>=e)return!0}return!1}function wc(e){return e<65?e===36:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&noe.test(String.fromCharCode(e)):iN(e,QB)}function em(e){return e<48?e===36:e<58?!0:e<65?!1:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&soe.test(String.fromCharCode(e)):iN(e,QB)||iN(e,ioe)}var DN={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},ooe=new Set(DN.keyword),loe=new Set(DN.strict),coe=new Set(DN.strictBind);function ZB(e,t){return t&&e==="await"||e==="enum"}function e4(e,t){return ZB(e,t)||loe.has(e)}function t4(e){return coe.has(e)}function r4(e,t){return e4(e,t)||t4(e)}function uoe(e){return ooe.has(e)}function doe(e,t,r){return e===64&&t===64&&wc(r)}var foe=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function poe(e){return foe.has(e)}var c0=class{constructor(t){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=t}},u0=class{constructor(t,r){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=t,this.inModule=r}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get allowNewTarget(){return(this.currentThisScopeFlags()&512)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let t=this.currentThisScopeFlags();return(t&64)>0&&(t&2)===0}get inStaticBlock(){for(let t=this.scopeStack.length-1;;t--){let{flags:r}=this.scopeStack[t];if(r&128)return!0;if(r&1731)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get inBareCaseStatement(){return(this.currentScope().flags&256)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(t){return new c0(t)}enter(t){this.scopeStack.push(this.createScope(t))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(t){return!!(t.flags&130||!this.parser.inModule&&t.flags&1)}declareName(t,r,a){let n=this.currentScope();if(r&8||r&16){this.checkRedeclarationInScope(n,t,r,a);let s=n.names.get(t)||0;r&16?s=s|4:(n.firstLexicalName||(n.firstLexicalName=t),s=s|2),n.names.set(t,s),r&8&&this.maybeExportDefined(n,t)}else if(r&4)for(let s=this.scopeStack.length-1;s>=0&&(n=this.scopeStack[s],this.checkRedeclarationInScope(n,t,r,a),n.names.set(t,(n.names.get(t)||0)|1),this.maybeExportDefined(n,t),!(n.flags&1667));--s);this.parser.inModule&&n.flags&1&&this.undefinedExports.delete(t)}maybeExportDefined(t,r){this.parser.inModule&&t.flags&1&&this.undefinedExports.delete(r)}checkRedeclarationInScope(t,r,a,n){this.isRedeclaredInScope(t,r,a)&&this.parser.raise(X.VarRedeclaration,n,{identifierName:r})}isRedeclaredInScope(t,r,a){if(!(a&1))return!1;if(a&8)return t.names.has(r);let n=t.names.get(r)||0;return a&16?(n&2)>0||!this.treatFunctionsAsVarInScope(t)&&(n&1)>0:(n&2)>0&&!(t.flags&8&&t.firstLexicalName===r)||!this.treatFunctionsAsVarInScope(t)&&(n&4)>0}checkLocalExport(t){let{name:r}=t;this.scopeStack[0].names.has(r)||this.undefinedExports.set(r,t.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let t=this.scopeStack.length-1;;t--){let{flags:r}=this.scopeStack[t];if(r&1667)return r}}currentThisScopeFlags(){for(let t=this.scopeStack.length-1;;t--){let{flags:r}=this.scopeStack[t];if(r&1731&&!(r&4))return r}}},oN=class extends c0{constructor(...t){super(...t),this.declareFunctions=new Set}},lN=class extends u0{createScope(t){return new oN(t)}declareName(t,r,a){let n=this.currentScope();if(r&2048){this.checkRedeclarationInScope(n,t,r,a),this.maybeExportDefined(n,t),n.declareFunctions.add(t);return}super.declareName(t,r,a)}isRedeclaredInScope(t,r,a){if(super.isRedeclaredInScope(t,r,a))return!0;if(a&2048&&!t.declareFunctions.has(r)){let n=t.names.get(r);return(n&4)>0||(n&2)>0}return!1}checkLocalExport(t){this.scopeStack[0].declareFunctions.has(t.name)||super.checkLocalExport(t)}},moe=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),Ft=Tc`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:e})=>`Cannot overwrite reserved type ${e}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:e,enumName:t})=>`Boolean enum members need to be initialized. Use either \`${e} = true,\` or \`${e} = false,\` in enum \`${t}\`.`,EnumDuplicateMemberName:({memberName:e,enumName:t})=>`Enum member names need to be unique, but the name \`${e}\` has already been used before in enum \`${t}\`.`,EnumInconsistentMemberValues:({enumName:e})=>`Enum \`${e}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:e,enumName:t})=>`Enum type \`${e}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:e})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:e,memberName:t,explicitType:r})=>`Enum \`${e}\` has type \`${r}\`, so the initializer of \`${t}\` needs to be a ${r} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:e,memberName:t})=>`Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${e}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:e,memberName:t})=>`The enum member initializer for \`${t}\` needs to be a literal (either a boolean, number, or string) in enum \`${e}\`.`,EnumInvalidMemberName:({enumName:e,memberName:t,suggestion:r})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${r}\`, in enum \`${e}\`.`,EnumNumberMemberNotInitialized:({enumName:e,memberName:t})=>`Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${e}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:e})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${e}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:e})=>`Unexpected reserved type ${e}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:e,suggestion:t})=>`\`declare export ${e}\` is not supported. Use \`${t}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function hoe(e){return e.type==="DeclareExportAllDeclaration"||e.type==="DeclareExportDeclaration"&&(!e.declaration||e.declaration.type!=="TypeAlias"&&e.declaration.type!=="InterfaceDeclaration")}function jB(e){return e.importKind==="type"||e.importKind==="typeof"}var goe={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function yoe(e,t){let r=[],a=[];for(let n=0;n<e.length;n++)(t(e[n],n,e)?r:a).push(e[n]);return[r,a]}var xoe=/\*?\s*@((?:no)?flow)\b/,boe=e=>class extends e{constructor(...r){super(...r),this.flowPragma=void 0}getScopeHandler(){return lN}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}finishToken(r,a){r!==134&&r!==13&&r!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(r,a)}addComment(r){if(this.flowPragma===void 0){let a=xoe.exec(r.value);if(a)if(a[1]==="flow")this.flowPragma="flow";else if(a[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(r)}flowParseTypeInitialiser(r){let a=this.state.inType;this.state.inType=!0,this.expect(r||14);let n=this.flowParseType();return this.state.inType=a,n}flowParsePredicate(){let r=this.startNode(),a=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>a.index+1&&this.raise(Ft.UnexpectedSpaceBetweenModuloChecks,a),this.eat(10)?(r.value=super.parseExpression(),this.expect(11),this.finishNode(r,"DeclaredPredicate")):this.finishNode(r,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let r=this.state.inType;this.state.inType=!0,this.expect(14);let a=null,n=null;return this.match(54)?(this.state.inType=r,n=this.flowParsePredicate()):(a=this.flowParseType(),this.state.inType=r,this.match(54)&&(n=this.flowParsePredicate())),[a,n]}flowParseDeclareClass(r){return this.next(),this.flowParseInterfaceish(r,!0),this.finishNode(r,"DeclareClass")}flowParseDeclareFunction(r){this.next();let a=r.id=this.parseIdentifier(),n=this.startNode(),s=this.startNode();this.match(47)?n.typeParameters=this.flowParseTypeParameterDeclaration():n.typeParameters=null,this.expect(10);let i=this.flowParseFunctionTypeParams();return n.params=i.params,n.rest=i.rest,n.this=i._this,this.expect(11),[n.returnType,r.predicate]=this.flowParseTypeAndPredicateInitialiser(),s.typeAnnotation=this.finishNode(n,"FunctionTypeAnnotation"),a.typeAnnotation=this.finishNode(s,"TypeAnnotation"),this.resetEndLocation(a),this.semicolon(),this.scope.declareName(r.id.name,2048,r.id.loc.start),this.finishNode(r,"DeclareFunction")}flowParseDeclare(r,a){if(this.match(80))return this.flowParseDeclareClass(r);if(this.match(68))return this.flowParseDeclareFunction(r);if(this.match(74))return this.flowParseDeclareVariable(r);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(r):(a&&this.raise(Ft.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(r));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(r);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(r);if(this.isContextual(129))return this.flowParseDeclareInterface(r);if(this.match(82))return this.flowParseDeclareExportDeclaration(r,a);throw this.unexpected()}flowParseDeclareVariable(r){return this.next(),r.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(r.id.name,5,r.id.loc.start),this.semicolon(),this.finishNode(r,"DeclareVariable")}flowParseDeclareModule(r){this.scope.enter(0),this.match(134)?r.id=super.parseExprAtom():r.id=this.parseIdentifier();let a=r.body=this.startNode(),n=a.body=[];for(this.expect(5);!this.match(8);){let o=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(Ft.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),n.push(super.parseImport(o))):(this.expectContextual(125,Ft.UnsupportedStatementInDeclareModule),n.push(this.flowParseDeclare(o,!0)))}this.scope.exit(),this.expect(8),this.finishNode(a,"BlockStatement");let s=null,i=!1;return n.forEach(o=>{hoe(o)?(s==="CommonJS"&&this.raise(Ft.AmbiguousDeclareModuleKind,o),s="ES"):o.type==="DeclareModuleExports"&&(i&&this.raise(Ft.DuplicateDeclareModuleExports,o),s==="ES"&&this.raise(Ft.AmbiguousDeclareModuleKind,o),s="CommonJS",i=!0)}),r.kind=s||"CommonJS",this.finishNode(r,"DeclareModule")}flowParseDeclareExportDeclaration(r,a){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?r.declaration=this.flowParseDeclare(this.startNode()):(r.declaration=this.flowParseType(),this.semicolon()),r.default=!0,this.finishNode(r,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!a){let n=this.state.value;throw this.raise(Ft.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:n,suggestion:goe[n]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return r.declaration=this.flowParseDeclare(this.startNode()),r.default=!1,this.finishNode(r,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return r=this.parseExport(r,null),r.type==="ExportNamedDeclaration"?(r.default=!1,delete r.exportKind,this.castNodeTo(r,"DeclareExportDeclaration")):this.castNodeTo(r,"DeclareExportAllDeclaration");throw this.unexpected()}flowParseDeclareModuleExports(r){return this.next(),this.expectContextual(111),r.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(r,"DeclareModuleExports")}flowParseDeclareTypeAlias(r){this.next();let a=this.flowParseTypeAlias(r);return this.castNodeTo(a,"DeclareTypeAlias"),a}flowParseDeclareOpaqueType(r){this.next();let a=this.flowParseOpaqueType(r,!0);return this.castNodeTo(a,"DeclareOpaqueType"),a}flowParseDeclareInterface(r){return this.next(),this.flowParseInterfaceish(r,!1),this.finishNode(r,"DeclareInterface")}flowParseInterfaceish(r,a){if(r.id=this.flowParseRestrictedIdentifier(!a,!0),this.scope.declareName(r.id.name,a?17:8201,r.id.loc.start),this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,r.extends=[],this.eat(81))do r.extends.push(this.flowParseInterfaceExtends());while(!a&&this.eat(12));if(a){if(r.implements=[],r.mixins=[],this.eatContextual(117))do r.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do r.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}r.body=this.flowParseObjectType({allowStatic:a,allowExact:!1,allowSpread:!1,allowProto:a,allowInexact:!1})}flowParseInterfaceExtends(){let r=this.startNode();return r.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?r.typeParameters=this.flowParseTypeParameterInstantiation():r.typeParameters=null,this.finishNode(r,"InterfaceExtends")}flowParseInterface(r){return this.flowParseInterfaceish(r,!1),this.finishNode(r,"InterfaceDeclaration")}checkNotUnderscore(r){r==="_"&&this.raise(Ft.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(r,a,n){moe.has(r)&&this.raise(n?Ft.AssignReservedType:Ft.UnexpectedReservedType,a,{reservedType:r})}flowParseRestrictedIdentifier(r,a){return this.checkReservedType(this.state.value,this.state.startLoc,a),this.parseIdentifier(r)}flowParseTypeAlias(r){return r.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(r.id.name,8201,r.id.loc.start),this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,r.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(r,"TypeAlias")}flowParseOpaqueType(r,a){return this.expectContextual(130),r.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(r.id.name,8201,r.id.loc.start),this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,r.supertype=null,this.match(14)&&(r.supertype=this.flowParseTypeInitialiser(14)),r.impltype=null,a||(r.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(r,"OpaqueType")}flowParseTypeParameter(r=!1){let a=this.state.startLoc,n=this.startNode(),s=this.flowParseVariance(),i=this.flowParseTypeAnnotatableIdentifier();return n.name=i.name,n.variance=s,n.bound=i.typeAnnotation,this.match(29)?(this.eat(29),n.default=this.flowParseType()):r&&this.raise(Ft.MissingTypeParamDefault,a),this.finishNode(n,"TypeParameter")}flowParseTypeParameterDeclaration(){let r=this.state.inType,a=this.startNode();a.params=[],this.state.inType=!0,this.match(47)||this.match(143)?this.next():this.unexpected();let n=!1;do{let s=this.flowParseTypeParameter(n);a.params.push(s),s.default&&(n=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=r,this.finishNode(a,"TypeParameterDeclaration")}flowInTopLevelContext(r){if(this.curContext()!==Gr.brace){let a=this.state.context;this.state.context=[a[0]];try{return r()}finally{this.state.context=a}}else return r()}flowParseTypeParameterInstantiationInExpression(){if(this.reScan_lt()===47)return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){let r=this.startNode(),a=this.state.inType;return this.state.inType=!0,r.params=[],this.flowInTopLevelContext(()=>{this.expect(47);let n=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)r.params.push(this.flowParseType()),this.match(48)||this.expect(12);this.state.noAnonFunctionType=n}),this.state.inType=a,!this.state.inType&&this.curContext()===Gr.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(r,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(this.reScan_lt()!==47)return null;let r=this.startNode(),a=this.state.inType;for(r.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)r.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=a,this.finishNode(r,"TypeParameterInstantiation")}flowParseInterfaceType(){let r=this.startNode();if(this.expectContextual(129),r.extends=[],this.eat(81))do r.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return r.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(r,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(135)||this.match(134)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(r,a,n){return r.static=a,this.lookahead().type===14?(r.id=this.flowParseObjectPropertyKey(),r.key=this.flowParseTypeInitialiser()):(r.id=null,r.key=this.flowParseType()),this.expect(3),r.value=this.flowParseTypeInitialiser(),r.variance=n,this.finishNode(r,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(r,a){return r.static=a,r.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(r.method=!0,r.optional=!1,r.value=this.flowParseObjectTypeMethodish(this.startNodeAt(r.loc.start))):(r.method=!1,this.eat(17)&&(r.optional=!0),r.value=this.flowParseTypeInitialiser()),this.finishNode(r,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(r){for(r.params=[],r.rest=null,r.typeParameters=null,r.this=null,this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(r.this=this.flowParseFunctionTypeParam(!0),r.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)r.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(r.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),r.returnType=this.flowParseTypeInitialiser(),this.finishNode(r,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(r,a){let n=this.startNode();return r.static=a,r.value=this.flowParseObjectTypeMethodish(n),this.finishNode(r,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:r,allowExact:a,allowSpread:n,allowProto:s,allowInexact:i}){let o=this.state.inType;this.state.inType=!0;let l=this.startNode();l.callProperties=[],l.properties=[],l.indexers=[],l.internalSlots=[];let c,u,d=!1;for(a&&this.match(6)?(this.expect(6),c=9,u=!0):(this.expect(5),c=8,u=!1),l.exact=u;!this.match(c);){let p=!1,m=null,h=null,x=this.startNode();if(s&&this.isContextual(118)){let y=this.lookahead();y.type!==14&&y.type!==17&&(this.next(),m=this.state.startLoc,r=!1)}if(r&&this.isContextual(106)){let y=this.lookahead();y.type!==14&&y.type!==17&&(this.next(),p=!0)}let g=this.flowParseVariance();if(this.eat(0))m!=null&&this.unexpected(m),this.eat(0)?(g&&this.unexpected(g.loc.start),l.internalSlots.push(this.flowParseObjectTypeInternalSlot(x,p))):l.indexers.push(this.flowParseObjectTypeIndexer(x,p,g));else if(this.match(10)||this.match(47))m!=null&&this.unexpected(m),g&&this.unexpected(g.loc.start),l.callProperties.push(this.flowParseObjectTypeCallProperty(x,p));else{let y="init";if(this.isContextual(99)||this.isContextual(104)){let S=this.lookahead();YB(S.type)&&(y=this.state.value,this.next())}let b=this.flowParseObjectTypeProperty(x,p,m,g,y,n,i??!u);b===null?(d=!0,h=this.state.lastTokStartLoc):l.properties.push(b)}this.flowObjectTypeSemicolon(),h&&!this.match(8)&&!this.match(9)&&this.raise(Ft.UnexpectedExplicitInexactInObject,h)}this.expect(c),n&&(l.inexact=d);let f=this.finishNode(l,"ObjectTypeAnnotation");return this.state.inType=o,f}flowParseObjectTypeProperty(r,a,n,s,i,o,l){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(o?l||this.raise(Ft.InexactInsideExact,this.state.lastTokStartLoc):this.raise(Ft.InexactInsideNonObject,this.state.lastTokStartLoc),s&&this.raise(Ft.InexactVariance,s),null):(o||this.raise(Ft.UnexpectedSpreadType,this.state.lastTokStartLoc),n!=null&&this.unexpected(n),s&&this.raise(Ft.SpreadVariance,s),r.argument=this.flowParseType(),this.finishNode(r,"ObjectTypeSpreadProperty"));{r.key=this.flowParseObjectPropertyKey(),r.static=a,r.proto=n!=null,r.kind=i;let c=!1;return this.match(47)||this.match(10)?(r.method=!0,n!=null&&this.unexpected(n),s&&this.unexpected(s.loc.start),r.value=this.flowParseObjectTypeMethodish(this.startNodeAt(r.loc.start)),(i==="get"||i==="set")&&this.flowCheckGetterSetterParams(r),!o&&r.key.name==="constructor"&&r.value.this&&this.raise(Ft.ThisParamBannedInConstructor,r.value.this)):(i!=="init"&&this.unexpected(),r.method=!1,this.eat(17)&&(c=!0),r.value=this.flowParseTypeInitialiser(),r.variance=s),r.optional=c,this.finishNode(r,"ObjectTypeProperty")}}flowCheckGetterSetterParams(r){let a=r.kind==="get"?0:1,n=r.value.params.length+(r.value.rest?1:0);r.value.this&&this.raise(r.kind==="get"?Ft.GetterMayNotHaveThisParam:Ft.SetterMayNotHaveThisParam,r.value.this),n!==a&&this.raise(r.kind==="get"?X.BadGetterArity:X.BadSetterArity,r),r.kind==="set"&&r.value.rest&&this.raise(X.BadSetterRestParameter,r)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(r,a){r??(r=this.state.startLoc);let n=a||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let s=this.startNodeAt(r);s.qualification=n,s.id=this.flowParseRestrictedIdentifier(!0),n=this.finishNode(s,"QualifiedTypeIdentifier")}return n}flowParseGenericType(r,a){let n=this.startNodeAt(r);return n.typeParameters=null,n.id=this.flowParseQualifiedTypeIdentifier(r,a),this.match(47)&&(n.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(n,"GenericTypeAnnotation")}flowParseTypeofType(){let r=this.startNode();return this.expect(87),r.argument=this.flowParsePrimaryType(),this.finishNode(r,"TypeofTypeAnnotation")}flowParseTupleType(){let r=this.startNode();for(r.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(r.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(r,"TupleTypeAnnotation")}flowParseFunctionTypeParam(r){let a=null,n=!1,s=null,i=this.startNode(),o=this.lookahead(),l=this.state.type===78;return o.type===14||o.type===17?(l&&!r&&this.raise(Ft.ThisParamMustBeFirst,i),a=this.parseIdentifier(l),this.eat(17)&&(n=!0,l&&this.raise(Ft.ThisParamMayNotBeOptional,i)),s=this.flowParseTypeInitialiser()):s=this.flowParseType(),i.name=a,i.optional=n,i.typeAnnotation=s,this.finishNode(i,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(r){let a=this.startNodeAt(r.loc.start);return a.name=null,a.optional=!1,a.typeAnnotation=r,this.finishNode(a,"FunctionTypeParam")}flowParseFunctionTypeParams(r=[]){let a=null,n=null;for(this.match(78)&&(n=this.flowParseFunctionTypeParam(!0),n.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)r.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(a=this.flowParseFunctionTypeParam(!1)),{params:r,rest:a,_this:n}}flowIdentToTypeAnnotation(r,a,n){switch(n.name){case"any":return this.finishNode(a,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(a,"BooleanTypeAnnotation");case"mixed":return this.finishNode(a,"MixedTypeAnnotation");case"empty":return this.finishNode(a,"EmptyTypeAnnotation");case"number":return this.finishNode(a,"NumberTypeAnnotation");case"string":return this.finishNode(a,"StringTypeAnnotation");case"symbol":return this.finishNode(a,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(n.name),this.flowParseGenericType(r,n)}}flowParsePrimaryType(){let r=this.state.startLoc,a=this.startNode(),n,s,i=!1,o=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,s=this.flowParseTupleType(),this.state.noAnonFunctionType=o,s;case 47:{let l=this.startNode();return l.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),n=this.flowParseFunctionTypeParams(),l.params=n.params,l.rest=n.rest,l.this=n._this,this.expect(11),this.expect(19),l.returnType=this.flowParseType(),this.finishNode(l,"FunctionTypeAnnotation")}case 10:{let l=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(Qr(this.state.type)||this.match(78)){let c=this.lookahead().type;i=c!==17&&c!==14}else i=!0;if(i){if(this.state.noAnonFunctionType=!1,s=this.flowParseType(),this.state.noAnonFunctionType=o,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),s;this.eat(12)}return s?n=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(s)]):n=this.flowParseFunctionTypeParams(),l.params=n.params,l.rest=n.rest,l.this=n._this,this.expect(11),this.expect(19),l.returnType=this.flowParseType(),l.typeParameters=null,this.finishNode(l,"FunctionTypeAnnotation")}case 134:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return a.value=this.match(85),this.next(),this.finishNode(a,"BooleanLiteralTypeAnnotation");case 53:if(this.state.value==="-"){if(this.next(),this.match(135))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",a);if(this.match(136))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",a);throw this.raise(Ft.UnexpectedSubtractionOperand,this.state.startLoc)}throw this.unexpected();case 135:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 136:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(a,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(a,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(a,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(a,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(kN(this.state.type)){let l=Yd(this.state.type);return this.next(),super.createIdentifier(a,l)}else if(Qr(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(r,a,this.parseIdentifier())}throw this.unexpected()}flowParsePostfixType(){let r=this.state.startLoc,a=this.flowParsePrimaryType(),n=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let s=this.startNodeAt(r),i=this.eat(18);n=n||i,this.expect(0),!i&&this.match(3)?(s.elementType=a,this.next(),a=this.finishNode(s,"ArrayTypeAnnotation")):(s.objectType=a,s.indexType=this.flowParseType(),this.expect(3),n?(s.optional=i,a=this.finishNode(s,"OptionalIndexedAccessType")):a=this.finishNode(s,"IndexedAccessType"))}return a}flowParsePrefixType(){let r=this.startNode();return this.eat(17)?(r.typeAnnotation=this.flowParsePrefixType(),this.finishNode(r,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let r=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let a=this.startNodeAt(r.loc.start);return a.params=[this.reinterpretTypeAsFunctionTypeParam(r)],a.rest=null,a.this=null,a.returnType=this.flowParseType(),a.typeParameters=null,this.finishNode(a,"FunctionTypeAnnotation")}return r}flowParseIntersectionType(){let r=this.startNode();this.eat(45);let a=this.flowParseAnonFunctionWithoutParens();for(r.types=[a];this.eat(45);)r.types.push(this.flowParseAnonFunctionWithoutParens());return r.types.length===1?a:this.finishNode(r,"IntersectionTypeAnnotation")}flowParseUnionType(){let r=this.startNode();this.eat(43);let a=this.flowParseIntersectionType();for(r.types=[a];this.eat(43);)r.types.push(this.flowParseIntersectionType());return r.types.length===1?a:this.finishNode(r,"UnionTypeAnnotation")}flowParseType(){let r=this.state.inType;this.state.inType=!0;let a=this.flowParseUnionType();return this.state.inType=r,a}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value==="_"){let r=this.state.startLoc,a=this.parseIdentifier();return this.flowParseGenericType(r,a)}else return this.flowParseType()}flowParseTypeAnnotation(){let r=this.startNode();return r.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(r,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(r){let a=r?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(a.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(a)),a}typeCastToParameter(r){return r.expression.typeAnnotation=r.typeAnnotation,this.resetEndLocation(r.expression,r.typeAnnotation.loc.end),r.expression}flowParseVariance(){let r=null;return this.match(53)?(r=this.startNode(),this.state.value==="+"?r.kind="plus":r.kind="minus",this.next(),this.finishNode(r,"Variance")):r}parseFunctionBody(r,a,n=!1){if(a){this.forwardNoArrowParamsConversionAt(r,()=>super.parseFunctionBody(r,!0,n));return}super.parseFunctionBody(r,!1,n)}parseFunctionBodyAndFinish(r,a,n=!1){if(this.match(14)){let s=this.startNode();[s.typeAnnotation,r.predicate]=this.flowParseTypeAndPredicateInitialiser(),r.returnType=s.typeAnnotation?this.finishNode(s,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(r,a,n)}parseStatementLike(r){if(this.state.strict&&this.isContextual(129)){let n=this.lookahead();if(Vl(n.type)){let s=this.startNode();return this.next(),this.flowParseInterface(s)}}else if(this.isContextual(126)){let n=this.startNode();return this.next(),this.flowParseEnumDeclaration(n)}let a=super.parseStatementLike(r);return this.flowPragma===void 0&&!this.isValidDirective(a)&&(this.flowPragma=null),a}parseExpressionStatement(r,a,n){if(a.type==="Identifier"){if(a.name==="declare"){if(this.match(80)||Qr(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(r)}else if(Qr(this.state.type)){if(a.name==="interface")return this.flowParseInterface(r);if(a.name==="type")return this.flowParseTypeAlias(r);if(a.name==="opaque")return this.flowParseOpaqueType(r,!1)}}return super.parseExpressionStatement(r,a,n)}shouldParseExportDeclaration(){let{type:r}=this.state;return r===126||UB(r)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:r}=this.state;return r===126||UB(r)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(126)){let r=this.startNode();return this.next(),this.flowParseEnumDeclaration(r)}return super.parseExportDefaultExpression()}parseConditional(r,a,n){if(!this.match(17))return r;if(this.state.maybeInArrowParameters){let f=this.lookaheadCharCode();if(f===44||f===61||f===58||f===41)return this.setOptionalParametersError(n),r}this.expect(17);let s=this.state.clone(),i=this.state.noArrowAt,o=this.startNodeAt(a),{consequent:l,failed:c}=this.tryParseConditionalConsequent(),[u,d]=this.getArrowLikeExpressions(l);if(c||d.length>0){let f=[...i];if(d.length>0){this.state=s,this.state.noArrowAt=f;for(let p=0;p<d.length;p++)f.push(d[p].start);({consequent:l,failed:c}=this.tryParseConditionalConsequent()),[u,d]=this.getArrowLikeExpressions(l)}c&&u.length>1&&this.raise(Ft.AmbiguousConditionalArrow,s.startLoc),c&&u.length===1&&(this.state=s,f.push(u[0].start),this.state.noArrowAt=f,{consequent:l,failed:c}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(l,!0),this.state.noArrowAt=i,this.expect(14),o.test=r,o.consequent=l,o.alternate=this.forwardNoArrowParamsConversionAt(o,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(o,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let r=this.parseMaybeAssignAllowIn(),a=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:r,failed:a}}getArrowLikeExpressions(r,a){let n=[r],s=[];for(;n.length!==0;){let i=n.pop();i.type==="ArrowFunctionExpression"&&i.body.type!=="BlockStatement"?(i.typeParameters||!i.returnType?this.finishArrowValidation(i):s.push(i),n.push(i.body)):i.type==="ConditionalExpression"&&(n.push(i.consequent),n.push(i.alternate))}return a?(s.forEach(i=>this.finishArrowValidation(i)),[s,[]]):yoe(s,i=>i.params.every(o=>this.isAssignable(o,!0)))}finishArrowValidation(r){var a;this.toAssignableList(r.params,(a=r.extra)==null?void 0:a.trailingCommaLoc,!1),this.scope.enter(518),super.checkParams(r,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(r,a){let n;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(r.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),n=a(),this.state.noArrowParamsConversionAt.pop()):n=a(),n}parseParenItem(r,a){let n=super.parseParenItem(r,a);if(this.eat(17)&&(n.optional=!0,this.resetEndLocation(r)),this.match(14)){let s=this.startNodeAt(a);return s.expression=n,s.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(s,"TypeCastExpression")}return n}assertModuleNodeAllowed(r){r.type==="ImportDeclaration"&&(r.importKind==="type"||r.importKind==="typeof")||r.type==="ExportNamedDeclaration"&&r.exportKind==="type"||r.type==="ExportAllDeclaration"&&r.exportKind==="type"||super.assertModuleNodeAllowed(r)}parseExportDeclaration(r){if(this.isContextual(130)){r.exportKind="type";let a=this.startNode();return this.next(),this.match(5)?(r.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(r),null):this.flowParseTypeAlias(a)}else if(this.isContextual(131)){r.exportKind="type";let a=this.startNode();return this.next(),this.flowParseOpaqueType(a,!1)}else if(this.isContextual(129)){r.exportKind="type";let a=this.startNode();return this.next(),this.flowParseInterface(a)}else if(this.isContextual(126)){r.exportKind="value";let a=this.startNode();return this.next(),this.flowParseEnumDeclaration(a)}else return super.parseExportDeclaration(r)}eatExportStar(r){return super.eatExportStar(r)?!0:this.isContextual(130)&&this.lookahead().type===55?(r.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(r){let{startLoc:a}=this.state,n=super.maybeParseExportNamespaceSpecifier(r);return n&&r.exportKind==="type"&&this.unexpected(a),n}parseClassId(r,a,n){super.parseClassId(r,a,n),this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(r,a,n){let{startLoc:s}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(r,a))return;a.declare=!0}super.parseClassMember(r,a,n),a.declare&&(a.type!=="ClassProperty"&&a.type!=="ClassPrivateProperty"&&a.type!=="PropertyDefinition"?this.raise(Ft.DeclareClassElement,s):a.value&&this.raise(Ft.DeclareClassFieldInitializer,a.value))}isIterator(r){return r==="iterator"||r==="asyncIterator"}readIterator(){let r=super.readWord1(),a="@@"+r;(!this.isIterator(r)||!this.state.inType)&&this.raise(X.InvalidIdentifier,this.state.curPosition(),{identifierName:a}),this.finishToken(132,a)}getTokenFromCode(r){let a=this.input.charCodeAt(this.state.pos+1);r===123&&a===124?this.finishOp(6,2):this.state.inType&&(r===62||r===60)?this.finishOp(r===62?48:47,1):this.state.inType&&r===63?a===46?this.finishOp(18,2):this.finishOp(17,1):doe(r,a,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(r)}isAssignable(r,a){return r.type==="TypeCastExpression"?this.isAssignable(r.expression,a):super.isAssignable(r,a)}toAssignable(r,a=!1){!a&&r.type==="AssignmentExpression"&&r.left.type==="TypeCastExpression"&&(r.left=this.typeCastToParameter(r.left)),super.toAssignable(r,a)}toAssignableList(r,a,n){for(let s=0;s<r.length;s++){let i=r[s];i?.type==="TypeCastExpression"&&(r[s]=this.typeCastToParameter(i))}super.toAssignableList(r,a,n)}toReferencedList(r,a){for(let s=0;s<r.length;s++){var n;let i=r[s];i&&i.type==="TypeCastExpression"&&!((n=i.extra)!=null&&n.parenthesized)&&(r.length>1||!a)&&this.raise(Ft.TypeCastInPattern,i.typeAnnotation)}return r}parseArrayLike(r,a,n){let s=super.parseArrayLike(r,a,n);return n!=null&&!this.state.maybeInArrowParameters&&this.toReferencedList(s.elements),s}isValidLVal(r,a,n,s){return r==="TypeCastExpression"||super.isValidLVal(r,a,n,s)}parseClassProperty(r){return this.match(14)&&(r.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(r)}parseClassPrivateProperty(r){return this.match(14)&&(r.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(r)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(r){return!this.match(14)&&super.isNonstaticConstructor(r)}pushClassMethod(r,a,n,s,i,o){if(a.variance&&this.unexpected(a.variance.loc.start),delete a.variance,this.match(47)&&(a.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(r,a,n,s,i,o),a.params&&i){let l=a.params;l.length>0&&this.isThisParam(l[0])&&this.raise(Ft.ThisParamBannedInConstructor,a)}else if(a.type==="MethodDefinition"&&i&&a.value.params){let l=a.value.params;l.length>0&&this.isThisParam(l[0])&&this.raise(Ft.ThisParamBannedInConstructor,a)}}pushClassPrivateMethod(r,a,n,s){a.variance&&this.unexpected(a.variance.loc.start),delete a.variance,this.match(47)&&(a.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(r,a,n,s)}parseClassSuper(r){if(super.parseClassSuper(r),r.superClass&&(this.match(47)||this.match(51))&&(r.superTypeParameters=this.flowParseTypeParameterInstantiationInExpression()),this.isContextual(113)){this.next();let a=r.implements=[];do{let n=this.startNode();n.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?n.typeParameters=this.flowParseTypeParameterInstantiation():n.typeParameters=null,a.push(this.finishNode(n,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(r){super.checkGetterSetterParams(r);let a=this.getObjectOrClassMethodParams(r);if(a.length>0){let n=a[0];this.isThisParam(n)&&r.kind==="get"?this.raise(Ft.GetterMayNotHaveThisParam,n):this.isThisParam(n)&&this.raise(Ft.SetterMayNotHaveThisParam,n)}}parsePropertyNamePrefixOperator(r){r.variance=this.flowParseVariance()}parseObjPropValue(r,a,n,s,i,o,l){r.variance&&this.unexpected(r.variance.loc.start),delete r.variance;let c;this.match(47)&&!o&&(c=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let u=super.parseObjPropValue(r,a,n,s,i,o,l);return c&&((u.value||u).typeParameters=c),u}parseFunctionParamType(r){return this.eat(17)&&(r.type!=="Identifier"&&this.raise(Ft.PatternIsOptional,r),this.isThisParam(r)&&this.raise(Ft.ThisParamMayNotBeOptional,r),r.optional=!0),this.match(14)?r.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(r)&&this.raise(Ft.ThisParamAnnotationRequired,r),this.match(29)&&this.isThisParam(r)&&this.raise(Ft.ThisParamNoDefault,r),this.resetEndLocation(r),r}parseMaybeDefault(r,a){let n=super.parseMaybeDefault(r,a);return n.type==="AssignmentPattern"&&n.typeAnnotation&&n.right.start<n.typeAnnotation.start&&this.raise(Ft.TypeBeforeInitializer,n.typeAnnotation),n}checkImportReflection(r){super.checkImportReflection(r),r.module&&r.importKind!=="value"&&this.raise(Ft.ImportReflectionHasImportType,r.specifiers[0].loc.start)}parseImportSpecifierLocal(r,a,n){a.local=jB(r)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),r.specifiers.push(this.finishImportSpecifier(a,n))}isPotentialImportPhase(r){if(super.isPotentialImportPhase(r))return!0;if(this.isContextual(130)){if(!r)return!0;let a=this.lookaheadCharCode();return a===123||a===42}return!r&&this.isContextual(87)}applyImportPhase(r,a,n,s){if(super.applyImportPhase(r,a,n,s),a){if(!n&&this.match(65))return;r.exportKind=n==="type"?n:"value"}else n==="type"&&this.match(55)&&this.unexpected(),r.importKind=n==="type"||n==="typeof"?n:"value"}parseImportSpecifier(r,a,n,s,i){let o=r.imported,l=null;o.type==="Identifier"&&(o.name==="type"?l="type":o.name==="typeof"&&(l="typeof"));let c=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let d=this.parseIdentifier(!0);l!==null&&!Vl(this.state.type)?(r.imported=d,r.importKind=l,r.local=this.cloneIdentifier(d)):(r.imported=o,r.importKind=null,r.local=this.parseIdentifier())}else{if(l!==null&&Vl(this.state.type))r.imported=this.parseIdentifier(!0),r.importKind=l;else{if(a)throw this.raise(X.ImportBindingIsString,r,{importName:o.value});r.imported=o,r.importKind=null}this.eatContextual(93)?r.local=this.parseIdentifier():(c=!0,r.local=this.cloneIdentifier(r.imported))}let u=jB(r);return n&&u&&this.raise(Ft.ImportTypeShorthandOnlyInPureImport,r),(n||u)&&this.checkReservedType(r.local.name,r.local.loc.start,!0),c&&!n&&!u&&this.checkReservedWord(r.local.name,r.loc.start,!0,!0),this.finishImportSpecifier(r,"ImportSpecifier")}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(r,a){let n=r.kind;n!=="get"&&n!=="set"&&this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(r,a)}parseVarId(r,a){super.parseVarId(r,a),this.match(14)&&(r.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(r.id))}parseAsyncArrowFromCallExpression(r,a){if(this.match(14)){let n=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,r.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=n}return super.parseAsyncArrowFromCallExpression(r,a)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(r,a){var n;let s=null,i;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(s=this.state.clone(),i=this.tryParse(()=>super.parseMaybeAssign(r,a),s),!i.error)return i.node;let{context:c}=this.state,u=c[c.length-1];(u===Gr.j_oTag||u===Gr.j_expr)&&c.pop()}if((n=i)!=null&&n.error||this.match(47)){var o,l;s=s||this.state.clone();let c,u=this.tryParse(f=>{var p;c=this.flowParseTypeParameterDeclaration();let m=this.forwardNoArrowParamsConversionAt(c,()=>{let x=super.parseMaybeAssign(r,a);return this.resetStartLocationFromNode(x,c),x});(p=m.extra)!=null&&p.parenthesized&&f();let h=this.maybeUnwrapTypeCastExpression(m);return h.type!=="ArrowFunctionExpression"&&f(),h.typeParameters=c,this.resetStartLocationFromNode(h,c),m},s),d=null;if(u.node&&this.maybeUnwrapTypeCastExpression(u.node).type==="ArrowFunctionExpression"){if(!u.error&&!u.aborted)return u.node.async&&this.raise(Ft.UnexpectedTypeParameterBeforeAsyncArrowFunction,c),u.node;d=u.node}if((o=i)!=null&&o.node)return this.state=i.failState,i.node;if(d)return this.state=u.failState,d;throw(l=i)!=null&&l.thrown?i.error:u.thrown?u.error:this.raise(Ft.UnexpectedTokenAfterTypeParameter,c)}return super.parseMaybeAssign(r,a)}parseArrow(r){if(this.match(14)){let a=this.tryParse(()=>{let n=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let s=this.startNode();return[s.typeAnnotation,r.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=n,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),s});if(a.thrown)return null;a.error&&(this.state=a.failState),r.returnType=a.node.typeAnnotation?this.finishNode(a.node,"TypeAnnotation"):null}return super.parseArrow(r)}shouldParseArrow(r){return this.match(14)||super.shouldParseArrow(r)}setArrowFunctionParameters(r,a){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(r.start))?r.params=a:super.setArrowFunctionParameters(r,a)}checkParams(r,a,n,s=!0){if(!(n&&this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(r.start)))){for(let i=0;i<r.params.length;i++)this.isThisParam(r.params[i])&&i>0&&this.raise(Ft.ThisParamMustBeFirst,r.params[i]);super.checkParams(r,a,n,s)}}parseParenAndDistinguishExpression(r){return super.parseParenAndDistinguishExpression(r&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(r,a,n){if(r.type==="Identifier"&&r.name==="async"&&this.state.noArrowAt.includes(a.index)){this.next();let s=this.startNodeAt(a);s.callee=r,s.arguments=super.parseCallExpressionArguments(),r=this.finishNode(s,"CallExpression")}else if(r.type==="Identifier"&&r.name==="async"&&this.match(47)){let s=this.state.clone(),i=this.tryParse(l=>this.parseAsyncArrowWithTypeParameters(a)||l(),s);if(!i.error&&!i.aborted)return i.node;let o=this.tryParse(()=>super.parseSubscripts(r,a,n),s);if(o.node&&!o.error)return o.node;if(i.node)return this.state=i.failState,i.node;if(o.node)return this.state=o.failState,o.node;throw i.error||o.error}return super.parseSubscripts(r,a,n)}parseSubscript(r,a,n,s){if(this.match(18)&&this.isLookaheadToken_lt()){if(s.optionalChainMember=!0,n)return s.stop=!0,r;this.next();let i=this.startNodeAt(a);return i.callee=r,i.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(10),i.arguments=this.parseCallExpressionArguments(),i.optional=!0,this.finishCallExpression(i,!0)}else if(!n&&this.shouldParseTypes()&&(this.match(47)||this.match(51))){let i=this.startNodeAt(a);i.callee=r;let o=this.tryParse(()=>(i.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),i.arguments=super.parseCallExpressionArguments(),s.optionalChainMember&&(i.optional=!1),this.finishCallExpression(i,s.optionalChainMember)));if(o.node)return o.error&&(this.state=o.failState),o.node}return super.parseSubscript(r,a,n,s)}parseNewCallee(r){super.parseNewCallee(r);let a=null;this.shouldParseTypes()&&this.match(47)&&(a=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),r.typeArguments=a}parseAsyncArrowWithTypeParameters(r){let a=this.startNodeAt(r);if(this.parseFunctionParams(a,!1),!!this.parseArrow(a))return super.parseArrowExpression(a,void 0,!0)}readToken_mult_modulo(r){let a=this.input.charCodeAt(this.state.pos+1);if(r===42&&a===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(r)}readToken_pipe_amp(r){let a=this.input.charCodeAt(this.state.pos+1);if(r===124&&a===125){this.finishOp(9,2);return}super.readToken_pipe_amp(r)}parseTopLevel(r,a){let n=super.parseTopLevel(r,a);return this.state.hasFlowComment&&this.raise(Ft.UnterminatedFlowComment,this.state.curPosition()),n}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(Ft.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let r=this.skipFlowComment();r&&(this.state.pos+=r,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:r}=this.state,a=2;for(;[32,9].includes(this.input.charCodeAt(r+a));)a++;let n=this.input.charCodeAt(a+r),s=this.input.charCodeAt(a+r+1);return n===58&&s===58?a+2:this.input.slice(a+r,a+r+12)==="flow-include"?a+12:n===58&&s!==58?a:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(X.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(r,{enumName:a,memberName:n}){this.raise(Ft.EnumBooleanMemberNotInitialized,r,{memberName:n,enumName:a})}flowEnumErrorInvalidMemberInitializer(r,a){return this.raise(a.explicitType?a.explicitType==="symbol"?Ft.EnumInvalidMemberInitializerSymbolType:Ft.EnumInvalidMemberInitializerPrimaryType:Ft.EnumInvalidMemberInitializerUnknownType,r,a)}flowEnumErrorNumberMemberNotInitialized(r,a){this.raise(Ft.EnumNumberMemberNotInitialized,r,a)}flowEnumErrorStringMemberInconsistentlyInitialized(r,a){this.raise(Ft.EnumStringMemberInconsistentlyInitialized,r,a)}flowEnumMemberInit(){let r=this.state.startLoc,a=()=>this.match(12)||this.match(8);switch(this.state.type){case 135:{let n=this.parseNumericLiteral(this.state.value);return a()?{type:"number",loc:n.loc.start,value:n}:{type:"invalid",loc:r}}case 134:{let n=this.parseStringLiteral(this.state.value);return a()?{type:"string",loc:n.loc.start,value:n}:{type:"invalid",loc:r}}case 85:case 86:{let n=this.parseBooleanLiteral(this.match(85));return a()?{type:"boolean",loc:n.loc.start,value:n}:{type:"invalid",loc:r}}default:return{type:"invalid",loc:r}}}flowEnumMemberRaw(){let r=this.state.startLoc,a=this.parseIdentifier(!0),n=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:r};return{id:a,init:n}}flowEnumCheckExplicitTypeMismatch(r,a,n){let{explicitType:s}=a;s!==null&&s!==n&&this.flowEnumErrorInvalidMemberInitializer(r,a)}flowEnumMembers({enumName:r,explicitType:a}){let n=new Set,s={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},i=!1;for(;!this.match(8);){if(this.eat(21)){i=!0;break}let o=this.startNode(),{id:l,init:c}=this.flowEnumMemberRaw(),u=l.name;if(u==="")continue;/^[a-z]/.test(u)&&this.raise(Ft.EnumInvalidMemberName,l,{memberName:u,suggestion:u[0].toUpperCase()+u.slice(1),enumName:r}),n.has(u)&&this.raise(Ft.EnumDuplicateMemberName,l,{memberName:u,enumName:r}),n.add(u);let d={enumName:r,explicitType:a,memberName:u};switch(o.id=l,c.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(c.loc,d,"boolean"),o.init=c.value,s.booleanMembers.push(this.finishNode(o,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(c.loc,d,"number"),o.init=c.value,s.numberMembers.push(this.finishNode(o,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(c.loc,d,"string"),o.init=c.value,s.stringMembers.push(this.finishNode(o,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(c.loc,d);case"none":switch(a){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(c.loc,d);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(c.loc,d);break;default:s.defaultedMembers.push(this.finishNode(o,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:s,hasUnknownMembers:i}}flowEnumStringMembers(r,a,{enumName:n}){if(r.length===0)return a;if(a.length===0)return r;if(a.length>r.length){for(let s of r)this.flowEnumErrorStringMemberInconsistentlyInitialized(s,{enumName:n});return a}else{for(let s of a)this.flowEnumErrorStringMemberInconsistentlyInitialized(s,{enumName:n});return r}}flowEnumParseExplicitType({enumName:r}){if(!this.eatContextual(102))return null;if(!Qr(this.state.type))throw this.raise(Ft.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:r});let{value:a}=this.state;return this.next(),a!=="boolean"&&a!=="number"&&a!=="string"&&a!=="symbol"&&this.raise(Ft.EnumInvalidExplicitType,this.state.startLoc,{enumName:r,invalidEnumType:a}),a}flowEnumBody(r,a){let n=a.name,s=a.loc.start,i=this.flowEnumParseExplicitType({enumName:n});this.expect(5);let{members:o,hasUnknownMembers:l}=this.flowEnumMembers({enumName:n,explicitType:i});switch(r.hasUnknownMembers=l,i){case"boolean":return r.explicitType=!0,r.members=o.booleanMembers,this.expect(8),this.finishNode(r,"EnumBooleanBody");case"number":return r.explicitType=!0,r.members=o.numberMembers,this.expect(8),this.finishNode(r,"EnumNumberBody");case"string":return r.explicitType=!0,r.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:n}),this.expect(8),this.finishNode(r,"EnumStringBody");case"symbol":return r.members=o.defaultedMembers,this.expect(8),this.finishNode(r,"EnumSymbolBody");default:{let c=()=>(r.members=[],this.expect(8),this.finishNode(r,"EnumStringBody"));r.explicitType=!1;let u=o.booleanMembers.length,d=o.numberMembers.length,f=o.stringMembers.length,p=o.defaultedMembers.length;if(!u&&!d&&!f&&!p)return c();if(!u&&!d)return r.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:n}),this.expect(8),this.finishNode(r,"EnumStringBody");if(!d&&!f&&u>=p){for(let m of o.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(m.loc.start,{enumName:n,memberName:m.id.name});return r.members=o.booleanMembers,this.expect(8),this.finishNode(r,"EnumBooleanBody")}else if(!u&&!f&&d>=p){for(let m of o.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(m.loc.start,{enumName:n,memberName:m.id.name});return r.members=o.numberMembers,this.expect(8),this.finishNode(r,"EnumNumberBody")}else return this.raise(Ft.EnumInconsistentMemberValues,s,{enumName:n}),c()}}}flowParseEnumDeclaration(r){let a=this.parseIdentifier();return r.id=a,r.body=this.flowEnumBody(this.startNode(),a),this.finishNode(r,"EnumDeclaration")}jsxParseOpeningElementAfterName(r){return this.shouldParseTypes()&&(this.match(47)||this.match(51))&&(r.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(r)}isLookaheadToken_lt(){let r=this.nextTokenStart();if(this.input.charCodeAt(r)===60){let a=this.input.charCodeAt(r+1);return a!==60&&a!==61}return!1}reScan_lt_gt(){let{type:r}=this.state;r===47?(this.state.pos-=1,this.readToken_lt()):r===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:r}=this.state;return r===51?(this.state.pos-=2,this.finishOp(47,1),47):r}maybeUnwrapTypeCastExpression(r){return r.type==="TypeCastExpression"?r.expression:r}},voe={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},Soe=/\r\n|[\r\n\u2028\u2029]/,yw=new RegExp(Soe.source,"g");function vg(e){switch(e){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function zB(e,t,r){for(let a=t;a<r;a++)if(vg(e.charCodeAt(a)))return!0;return!1}var tN=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,rN=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function Toe(e){switch(e){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}var Qp=Tc`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:e})=>`Expected corresponding JSX closing tag for <${e}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:e,HTMLEntity:t})=>`Unexpected token \`${e}\`. Did you mean \`${t}\` or \`{'${e}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"});function Wd(e){return e?e.type==="JSXOpeningFragment"||e.type==="JSXClosingFragment":!1}function bg(e){if(e.type==="JSXIdentifier")return e.name;if(e.type==="JSXNamespacedName")return e.namespace.name+":"+e.name.name;if(e.type==="JSXMemberExpression")return bg(e.object)+"."+bg(e.property);throw new Error("Node had unexpected type: "+e.type)}var woe=e=>class extends e{jsxReadToken(){let r="",a=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(Qp.UnterminatedJsxContent,this.state.startLoc);let n=this.input.charCodeAt(this.state.pos);switch(n){case 60:case 123:if(this.state.pos===this.state.start){n===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(143)):super.getTokenFromCode(n);return}r+=this.input.slice(a,this.state.pos),this.finishToken(142,r);return;case 38:r+=this.input.slice(a,this.state.pos),r+=this.jsxReadEntity(),a=this.state.pos;break;case 62:case 125:default:vg(n)?(r+=this.input.slice(a,this.state.pos),r+=this.jsxReadNewLine(!0),a=this.state.pos):++this.state.pos}}}jsxReadNewLine(r){let a=this.input.charCodeAt(this.state.pos),n;return++this.state.pos,a===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,n=r?`
|
|
`:`\r
|
|
`):n=String.fromCharCode(a),++this.state.curLine,this.state.lineStart=this.state.pos,n}jsxReadString(r){let a="",n=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(X.UnterminatedString,this.state.startLoc);let s=this.input.charCodeAt(this.state.pos);if(s===r)break;s===38?(a+=this.input.slice(n,this.state.pos),a+=this.jsxReadEntity(),n=this.state.pos):vg(s)?(a+=this.input.slice(n,this.state.pos),a+=this.jsxReadNewLine(!1),n=this.state.pos):++this.state.pos}a+=this.input.slice(n,this.state.pos++),this.finishToken(134,a)}jsxReadEntity(){let r=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let a=10;this.codePointAtPos(this.state.pos)===120&&(a=16,++this.state.pos);let n=this.readInt(a,void 0,!1,"bail");if(n!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(n)}else{let a=0,n=!1;for(;a++<10&&this.state.pos<this.length&&!(n=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(n){let s=this.input.slice(r,this.state.pos),i=voe[s];if(++this.state.pos,i)return i}}return this.state.pos=r,"&"}jsxReadWord(){let r,a=this.state.pos;do r=this.input.charCodeAt(++this.state.pos);while(em(r)||r===45);this.finishToken(141,this.input.slice(a,this.state.pos))}jsxParseIdentifier(){let r=this.startNode();return this.match(141)?r.name=this.state.value:kN(this.state.type)?r.name=Yd(this.state.type):this.unexpected(),this.next(),this.finishNode(r,"JSXIdentifier")}jsxParseNamespacedName(){let r=this.state.startLoc,a=this.jsxParseIdentifier();if(!this.eat(14))return a;let n=this.startNodeAt(r);return n.namespace=a,n.name=this.jsxParseIdentifier(),this.finishNode(n,"JSXNamespacedName")}jsxParseElementName(){let r=this.state.startLoc,a=this.jsxParseNamespacedName();if(a.type==="JSXNamespacedName")return a;for(;this.eat(16);){let n=this.startNodeAt(r);n.object=a,n.property=this.jsxParseIdentifier(),a=this.finishNode(n,"JSXMemberExpression")}return a}jsxParseAttributeValue(){let r;switch(this.state.type){case 5:return r=this.startNode(),this.setContext(Gr.brace),this.next(),r=this.jsxParseExpressionContainer(r,Gr.j_oTag),r.expression.type==="JSXEmptyExpression"&&this.raise(Qp.AttributeIsEmpty,r),r;case 143:case 134:return this.parseExprAtom();default:throw this.raise(Qp.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let r=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(r,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(r){return this.next(),r.expression=this.parseExpression(),this.setContext(Gr.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(r,"JSXSpreadChild")}jsxParseExpressionContainer(r,a){if(this.match(8))r.expression=this.jsxParseEmptyExpression();else{let n=this.parseExpression();r.expression=n}return this.setContext(a),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(r,"JSXExpressionContainer")}jsxParseAttribute(){let r=this.startNode();return this.match(5)?(this.setContext(Gr.brace),this.next(),this.expect(21),r.argument=this.parseMaybeAssignAllowIn(),this.setContext(Gr.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(r,"JSXSpreadAttribute")):(r.name=this.jsxParseNamespacedName(),r.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(r,"JSXAttribute"))}jsxParseOpeningElementAt(r){let a=this.startNodeAt(r);return this.eat(144)?this.finishNode(a,"JSXOpeningFragment"):(a.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(a))}jsxParseOpeningElementAfterName(r){let a=[];for(;!this.match(56)&&!this.match(144);)a.push(this.jsxParseAttribute());return r.attributes=a,r.selfClosing=this.eat(56),this.expect(144),this.finishNode(r,"JSXOpeningElement")}jsxParseClosingElementAt(r){let a=this.startNodeAt(r);return this.eat(144)?this.finishNode(a,"JSXClosingFragment"):(a.name=this.jsxParseElementName(),this.expect(144),this.finishNode(a,"JSXClosingElement"))}jsxParseElementAt(r){let a=this.startNodeAt(r),n=[],s=this.jsxParseOpeningElementAt(r),i=null;if(!s.selfClosing){e:for(;;)switch(this.state.type){case 143:if(r=this.state.startLoc,this.next(),this.eat(56)){i=this.jsxParseClosingElementAt(r);break e}n.push(this.jsxParseElementAt(r));break;case 142:n.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{let o=this.startNode();this.setContext(Gr.brace),this.next(),this.match(21)?n.push(this.jsxParseSpreadChild(o)):n.push(this.jsxParseExpressionContainer(o,Gr.j_expr));break}default:this.unexpected()}Wd(s)&&!Wd(i)&&i!==null?this.raise(Qp.MissingClosingTagFragment,i):!Wd(s)&&Wd(i)?this.raise(Qp.MissingClosingTagElement,i,{openingTagName:bg(s.name)}):!Wd(s)&&!Wd(i)&&bg(i.name)!==bg(s.name)&&this.raise(Qp.MissingClosingTagElement,i,{openingTagName:bg(s.name)})}if(Wd(s)?(a.openingFragment=s,a.closingFragment=i):(a.openingElement=s,a.closingElement=i),a.children=n,this.match(47))throw this.raise(Qp.UnwrappedAdjacentJSXElements,this.state.startLoc);return Wd(s)?this.finishNode(a,"JSXFragment"):this.finishNode(a,"JSXElement")}jsxParseElement(){let r=this.state.startLoc;return this.next(),this.jsxParseElementAt(r)}setContext(r){let{context:a}=this.state;a[a.length-1]=r}parseExprAtom(r){return this.match(143)?this.jsxParseElement():this.match(47)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(143),this.jsxParseElement()):super.parseExprAtom(r)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(r){let a=this.curContext();if(a===Gr.j_expr){this.jsxReadToken();return}if(a===Gr.j_oTag||a===Gr.j_cTag){if(wc(r)){this.jsxReadWord();return}if(r===62){++this.state.pos,this.finishToken(144);return}if((r===34||r===39)&&a===Gr.j_oTag){this.jsxReadString(r);return}}if(r===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(143);return}super.getTokenFromCode(r)}updateContext(r){let{context:a,type:n}=this.state;if(n===56&&r===143)a.splice(-2,2,Gr.j_cTag),this.state.canStartJSXElement=!1;else if(n===143)a.push(Gr.j_oTag);else if(n===144){let s=a[a.length-1];s===Gr.j_oTag&&r===56||s===Gr.j_cTag?(a.pop(),this.state.canStartJSXElement=a[a.length-1]===Gr.j_expr):(this.setContext(Gr.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=Xie(n)}},cN=class extends c0{constructor(...t){super(...t),this.tsNames=new Map}},uN=class extends u0{constructor(...t){super(...t),this.importsStack=[]}createScope(t){return this.importsStack.push(new Set),new cN(t)}enter(t){t===1024&&this.importsStack.push(new Set),super.enter(t)}exit(){let t=super.exit();return t===1024&&this.importsStack.pop(),t}hasImport(t,r){let a=this.importsStack.length;if(this.importsStack[a-1].has(t))return!0;if(!r&&a>1){for(let n=0;n<a-1;n++)if(this.importsStack[n].has(t))return!0}return!1}declareName(t,r,a){if(r&4096){this.hasImport(t,!0)&&this.parser.raise(X.VarRedeclaration,a,{identifierName:t}),this.importsStack[this.importsStack.length-1].add(t);return}let n=this.currentScope(),s=n.tsNames.get(t)||0;if(r&1024){this.maybeExportDefined(n,t),n.tsNames.set(t,s|16);return}super.declareName(t,r,a),r&2&&(r&1||(this.checkRedeclarationInScope(n,t,r,a),this.maybeExportDefined(n,t)),s=s|1),r&256&&(s=s|2),r&512&&(s=s|4),r&128&&(s=s|8),s&&n.tsNames.set(t,s)}isRedeclaredInScope(t,r,a){let n=t.tsNames.get(r);if((n&2)>0){if(a&256){let s=!!(a&512),i=(n&4)>0;return s!==i}return!0}return a&128&&(n&8)>0?t.names.get(r)&2?!!(a&1):!1:a&2&&(n&1)>0?!0:super.isRedeclaredInScope(t,r,a)}checkLocalExport(t){let{name:r}=t;if(this.hasImport(r))return;let a=this.scopeStack.length;for(let n=a-1;n>=0;n--){let i=this.scopeStack[n].tsNames.get(r);if((i&1)>0||(i&16)>0)return}super.checkLocalExport(t)}},dN=class{constructor(){this.stacks=[]}enter(t){this.stacks.push(t)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}};function Sw(e,t){return(e?2:0)|(t?1:0)}var fN=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}sourceToOffsetPos(t){return t+this.startIndex}offsetToSourcePos(t){return t-this.startIndex}hasPlugin(t){if(typeof t=="string")return this.plugins.has(t);{let[r,a]=t;if(!this.hasPlugin(r))return!1;let n=this.plugins.get(r);for(let s of Object.keys(a))if(n?.[s]!==a[s])return!1;return!0}}getPluginOption(t,r){var a;return(a=this.plugins.get(t))==null?void 0:a[r]}};function a4(e,t){e.trailingComments===void 0?e.trailingComments=t:e.trailingComments.unshift(...t)}function Coe(e,t){e.leadingComments===void 0?e.leadingComments=t:e.leadingComments.unshift(...t)}function d0(e,t){e.innerComments===void 0?e.innerComments=t:e.innerComments.unshift(...t)}function Xd(e,t,r){let a=null,n=t.length;for(;a===null&&n>0;)a=t[--n];a===null||a.start>r.start?d0(e,r.comments):a4(a,r.comments)}var pN=class extends fN{addComment(t){this.filename&&(t.loc.filename=this.filename);let{commentsLen:r}=this.state;this.comments.length!==r&&(this.comments.length=r),this.comments.push(t),this.state.commentsLen++}processComment(t){let{commentStack:r}=this.state,a=r.length;if(a===0)return;let n=a-1,s=r[n];s.start===t.end&&(s.leadingNode=t,n--);let{start:i}=t;for(;n>=0;n--){let o=r[n],l=o.end;if(l>i)o.containingNode=t,this.finalizeComment(o),r.splice(n,1);else{l===i&&(o.trailingNode=t);break}}}finalizeComment(t){var r;let{comments:a}=t;if(t.leadingNode!==null||t.trailingNode!==null)t.leadingNode!==null&&a4(t.leadingNode,a),t.trailingNode!==null&&Coe(t.trailingNode,a);else{let n=t.containingNode,s=t.start;if(this.input.charCodeAt(this.offsetToSourcePos(s)-1)===44)switch(n.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":Xd(n,n.properties,t);break;case"CallExpression":case"OptionalCallExpression":Xd(n,n.arguments,t);break;case"ImportExpression":Xd(n,[n.source,(r=n.options)!=null?r:null],t);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":Xd(n,n.params,t);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":Xd(n,n.elements,t);break;case"ExportNamedDeclaration":case"ImportDeclaration":Xd(n,n.specifiers,t);break;case"TSEnumDeclaration":Xd(n,n.members,t);break;case"TSEnumBody":Xd(n,n.members,t);break;default:d0(n,a)}else d0(n,a)}}finalizeRemainingComments(){let{commentStack:t}=this.state;for(let r=t.length-1;r>=0;r--)this.finalizeComment(t[r]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(t){let{commentStack:r}=this.state,{length:a}=r;if(a===0)return;let n=r[a-1];n.leadingNode===t&&(n.leadingNode=null)}takeSurroundingComments(t,r,a){let{commentStack:n}=this.state,s=n.length;if(s===0)return;let i=s-1;for(;i>=0;i--){let o=n[i],l=o.end;if(o.start===a)o.leadingNode=t;else if(l===r)o.trailingNode=t;else if(l<r)break}}},f0=class{constructor(){this.flags=1024,this.startIndex=void 0,this.curLine=void 0,this.lineStart=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.labels=[],this.commentsLen=0,this.commentStack=[],this.pos=0,this.type=140,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.context=[Gr.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}get strict(){return(this.flags&1)>0}set strict(t){t?this.flags|=1:this.flags&=-2}init({strictMode:t,sourceType:r,startIndex:a,startLine:n,startColumn:s}){this.strict=t===!1?!1:t===!0?!0:r==="module",this.startIndex=a,this.curLine=n,this.lineStart=-s,this.startLoc=this.endLoc=new Cc(n,s,a)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(t){t?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(t){t?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(t){t?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(t){t?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(t){t?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(t){t?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(t){t?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(t){t?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(t){t?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(t){t?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(t){t?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(t){t?this.flags|=4096:this.flags&=-4097}curPosition(){return new Cc(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){let t=new f0;return t.flags=this.flags,t.startIndex=this.startIndex,t.curLine=this.curLine,t.lineStart=this.lineStart,t.startLoc=this.startLoc,t.endLoc=this.endLoc,t.errors=this.errors.slice(),t.potentialArrowAt=this.potentialArrowAt,t.noArrowAt=this.noArrowAt.slice(),t.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),t.topicContext=this.topicContext,t.labels=this.labels.slice(),t.commentsLen=this.commentsLen,t.commentStack=this.commentStack.slice(),t.pos=this.pos,t.type=this.type,t.value=this.value,t.start=this.start,t.end=this.end,t.lastTokEndLoc=this.lastTokEndLoc,t.lastTokStartLoc=this.lastTokStartLoc,t.context=this.context.slice(),t.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,t.strictErrors=this.strictErrors,t.tokensLength=this.tokensLength,t}},Eoe=function(t){return t>=48&&t<=57},VB={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},xw={bin:e=>e===48||e===49,oct:e=>e>=48&&e<=55,dec:e=>e>=48&&e<=57,hex:e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102};function qB(e,t,r,a,n,s){let i=r,o=a,l=n,c="",u=null,d=r,{length:f}=t;for(;;){if(r>=f){s.unterminated(i,o,l),c+=t.slice(d,r);break}let p=t.charCodeAt(r);if(Poe(e,p,t,r)){c+=t.slice(d,r);break}if(p===92){c+=t.slice(d,r);let m=Aoe(t,r,a,n,e==="template",s);m.ch===null&&!u?u={pos:r,lineStart:a,curLine:n}:c+=m.ch,{pos:r,lineStart:a,curLine:n}=m,d=r}else p===8232||p===8233?(++r,++n,a=r):p===10||p===13?e==="template"?(c+=t.slice(d,r)+`
|
|
`,++r,p===13&&t.charCodeAt(r)===10&&++r,++n,d=a=r):s.unterminated(i,o,l):++r}return{pos:r,str:c,firstInvalidLoc:u,lineStart:a,curLine:n,containsInvalid:!!u}}function Poe(e,t,r,a){return e==="template"?t===96||t===36&&r.charCodeAt(a+1)===123:t===(e==="double"?34:39)}function Aoe(e,t,r,a,n,s){let i=!n;t++;let o=c=>({pos:t,ch:c,lineStart:r,curLine:a}),l=e.charCodeAt(t++);switch(l){case 110:return o(`
|
|
`);case 114:return o("\r");case 120:{let c;return{code:c,pos:t}=mN(e,t,r,a,2,!1,i,s),o(c===null?null:String.fromCharCode(c))}case 117:{let c;return{code:c,pos:t}=s4(e,t,r,a,i,s),o(c===null?null:String.fromCodePoint(c))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:e.charCodeAt(t)===10&&++t;case 10:r=t,++a;case 8232:case 8233:return o("");case 56:case 57:if(n)return o(null);s.strictNumericEscape(t-1,r,a);default:if(l>=48&&l<=55){let c=t-1,d=/^[0-7]+/.exec(e.slice(c,t+2))[0],f=parseInt(d,8);f>255&&(d=d.slice(0,-1),f=parseInt(d,8)),t+=d.length-1;let p=e.charCodeAt(t);if(d!=="0"||p===56||p===57){if(n)return o(null);s.strictNumericEscape(c,r,a)}return o(String.fromCharCode(f))}return o(String.fromCharCode(l))}}function mN(e,t,r,a,n,s,i,o){let l=t,c;return{n:c,pos:t}=n4(e,t,r,a,16,n,s,!1,o,!i),c===null&&(i?o.invalidEscapeSequence(l,r,a):t=l-1),{code:c,pos:t}}function n4(e,t,r,a,n,s,i,o,l,c){let u=t,d=n===16?VB.hex:VB.decBinOct,f=n===16?xw.hex:n===10?xw.dec:n===8?xw.oct:xw.bin,p=!1,m=0;for(let h=0,x=s??1/0;h<x;++h){let g=e.charCodeAt(t),y;if(g===95&&o!=="bail"){let b=e.charCodeAt(t-1),S=e.charCodeAt(t+1);if(o){if(Number.isNaN(S)||!f(S)||d.has(b)||d.has(S)){if(c)return{n:null,pos:t};l.unexpectedNumericSeparator(t,r,a)}}else{if(c)return{n:null,pos:t};l.numericSeparatorInEscapeSequence(t,r,a)}++t;continue}if(g>=97?y=g-97+10:g>=65?y=g-65+10:Eoe(g)?y=g-48:y=1/0,y>=n){if(y<=9&&c)return{n:null,pos:t};if(y<=9&&l.invalidDigit(t,r,a,n))y=0;else if(i)y=0,p=!0;else break}++t,m=m*n+y}return t===u||s!=null&&t-u!==s||p?{n:null,pos:t}:{n:m,pos:t}}function s4(e,t,r,a,n,s){let i=e.charCodeAt(t),o;if(i===123){if(++t,{code:o,pos:t}=mN(e,t,r,a,e.indexOf("}",t)-t,!0,n,s),++t,o!==null&&o>1114111)if(n)s.invalidCodePoint(t,r,a);else return{code:null,pos:t}}else({code:o,pos:t}=mN(e,t,r,a,4,!1,n,s));return{code:o,pos:t}}function s0(e,t,r){return new Cc(r,e-t,e)}var Ioe=new Set([103,109,115,105,121,117,100,118]),Sc=class{constructor(t){let r=t.startIndex||0;this.type=t.type,this.value=t.value,this.start=r+t.start,this.end=r+t.end,this.loc=new Tg(t.startLoc,t.endLoc)}},hN=class extends pN{constructor(t,r){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(a,n,s,i)=>this.optionFlags&2048?(this.raise(X.InvalidDigit,s0(a,n,s),{radix:i}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(X.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(X.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(X.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(X.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(a,n,s)=>{this.recordStrictModeErrors(X.StrictNumericEscape,s0(a,n,s))},unterminated:(a,n,s)=>{throw this.raise(X.UnterminatedString,s0(a-1,n,s))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(X.StrictNumericEscape),unterminated:(a,n,s)=>{throw this.raise(X.UnterminatedTemplate,s0(a,n,s))}}),this.state=new f0,this.state.init(t),this.input=r,this.length=r.length,this.comments=[],this.isLookahead=!1}pushToken(t){this.tokens.length=this.state.tokensLength,this.tokens.push(t),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&256&&this.pushToken(new Sc(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(t){return this.match(t)?(this.next(),!0):!1}match(t){return this.state.type===t}createLookaheadState(t){return{pos:t.pos,value:null,type:t.type,start:t.start,end:t.end,context:[this.curContext()],inType:t.inType,startLoc:t.startLoc,lastTokEndLoc:t.lastTokEndLoc,curLine:t.curLine,lineStart:t.lineStart,curPosition:t.curPosition}}lookahead(){let t=this.state;this.state=this.createLookaheadState(t),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let r=this.state;return this.state=t,r}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(t){return tN.lastIndex=t,tN.test(this.input)?tN.lastIndex:t}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(t){return this.input.charCodeAt(this.nextTokenStartSince(t))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(t){return rN.lastIndex=t,rN.test(this.input)?rN.lastIndex:t}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(t){let r=this.input.charCodeAt(t);if((r&64512)===55296&&++t<this.input.length){let a=this.input.charCodeAt(t);(a&64512)===56320&&(r=65536+((r&1023)<<10)+(a&1023))}return r}setStrict(t){this.state.strict=t,t&&(this.state.strictErrors.forEach(([r,a])=>this.raise(r,a)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(140);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(t){let r;this.isLookahead||(r=this.state.curPosition());let a=this.state.pos,n=this.input.indexOf(t,a+2);if(n===-1)throw this.raise(X.UnterminatedComment,this.state.curPosition());for(this.state.pos=n+t.length,yw.lastIndex=a+2;yw.test(this.input)&&yw.lastIndex<=n;)++this.state.curLine,this.state.lineStart=yw.lastIndex;if(this.isLookahead)return;let s={type:"CommentBlock",value:this.input.slice(a+2,n),start:this.sourceToOffsetPos(a),end:this.sourceToOffsetPos(n+t.length),loc:new Tg(r,this.state.curPosition())};return this.optionFlags&256&&this.pushToken(s),s}skipLineComment(t){let r=this.state.pos,a;this.isLookahead||(a=this.state.curPosition());let n=this.input.charCodeAt(this.state.pos+=t);if(this.state.pos<this.length)for(;!vg(n)&&++this.state.pos<this.length;)n=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let s=this.state.pos,o={type:"CommentLine",value:this.input.slice(r+t,s),start:this.sourceToOffsetPos(r),end:this.sourceToOffsetPos(s),loc:new Tg(a,this.state.curPosition())};return this.optionFlags&256&&this.pushToken(o),o}skipSpace(){let t=this.state.pos,r=this.optionFlags&4096?[]:null;e:for(;this.state.pos<this.length;){let a=this.input.charCodeAt(this.state.pos);switch(a){case 32:case 160:case 9:++this.state.pos;break;case 13:this.input.charCodeAt(this.state.pos+1)===10&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{let n=this.skipBlockComment("*/");n!==void 0&&(this.addComment(n),r?.push(n));break}case 47:{let n=this.skipLineComment(2);n!==void 0&&(this.addComment(n),r?.push(n));break}default:break e}break;default:if(Toe(a))++this.state.pos;else if(a===45&&!this.inModule&&this.optionFlags&8192){let n=this.state.pos;if(this.input.charCodeAt(n+1)===45&&this.input.charCodeAt(n+2)===62&&(t===0||this.state.lineStart>t)){let s=this.skipLineComment(3);s!==void 0&&(this.addComment(s),r?.push(s))}else break e}else if(a===60&&!this.inModule&&this.optionFlags&8192){let n=this.state.pos;if(this.input.charCodeAt(n+1)===33&&this.input.charCodeAt(n+2)===45&&this.input.charCodeAt(n+3)===45){let s=this.skipLineComment(4);s!==void 0&&(this.addComment(s),r?.push(s))}else break e}else break e}}if(r?.length>0){let a=this.state.pos,n={start:this.sourceToOffsetPos(t),end:this.sourceToOffsetPos(a),comments:r,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(n)}}finishToken(t,r){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let a=this.state.type;this.state.type=t,this.state.value=r,this.isLookahead||this.updateContext(a)}replaceToken(t){this.state.type=t,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let t=this.state.pos+1,r=this.codePointAtPos(t);if(r>=48&&r<=57)throw this.raise(X.UnexpectedDigitAfterHash,this.state.curPosition());if(r===123||r===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(r===123?X.RecordExpressionHashIncorrectStartSyntaxType:X.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,r===123?this.finishToken(7):this.finishToken(1)}else wc(r)?(++this.state.pos,this.finishToken(139,this.readWord1(r))):r===92?(++this.state.pos,this.finishToken(139,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let t=this.input.charCodeAt(this.state.pos+1);if(t>=48&&t<=57){this.readNumber(!0);return}t===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let t=this.input.charCodeAt(this.state.pos+1);if(t!==33)return!1;let r=this.state.pos;for(this.state.pos+=1;!vg(t)&&++this.state.pos<this.length;)t=this.input.charCodeAt(this.state.pos);let a=this.input.slice(r+2,this.state.pos);return this.finishToken(28,a),!0}readToken_mult_modulo(t){let r=t===42?55:54,a=1,n=this.input.charCodeAt(this.state.pos+1);t===42&&n===42&&(a++,n=this.input.charCodeAt(this.state.pos+2),r=57),n===61&&!this.state.inType&&(a++,r=t===37?33:30),this.finishOp(r,a)}readToken_pipe_amp(t){let r=this.input.charCodeAt(this.state.pos+1);if(r===t){this.input.charCodeAt(this.state.pos+2)===61?this.finishOp(30,3):this.finishOp(t===124?41:42,2);return}if(t===124){if(r===62){this.finishOp(39,2);return}if(this.hasPlugin("recordAndTuple")&&r===125){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(X.RecordExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(9);return}if(this.hasPlugin("recordAndTuple")&&r===93){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(X.TupleExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(4);return}}if(r===61){this.finishOp(30,2);return}this.finishOp(t===124?43:45,1)}readToken_caret(){let t=this.input.charCodeAt(this.state.pos+1);t===61&&!this.state.inType?this.finishOp(32,2):t===94&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])?(this.finishOp(37,2),this.input.codePointAt(this.state.pos)===94&&this.unexpected()):this.finishOp(44,1)}readToken_atSign(){this.input.charCodeAt(this.state.pos+1)===64&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}])?this.finishOp(38,2):this.finishOp(26,1)}readToken_plus_min(t){let r=this.input.charCodeAt(this.state.pos+1);if(r===t){this.finishOp(34,2);return}r===61?this.finishOp(30,2):this.finishOp(53,1)}readToken_lt(){let{pos:t}=this.state,r=this.input.charCodeAt(t+1);if(r===60){if(this.input.charCodeAt(t+2)===61){this.finishOp(30,3);return}this.finishOp(51,2);return}if(r===61){this.finishOp(49,2);return}this.finishOp(47,1)}readToken_gt(){let{pos:t}=this.state,r=this.input.charCodeAt(t+1);if(r===62){let a=this.input.charCodeAt(t+2)===62?3:2;if(this.input.charCodeAt(t+a)===61){this.finishOp(30,a+1);return}this.finishOp(52,a);return}if(r===61){this.finishOp(49,2);return}this.finishOp(48,1)}readToken_eq_excl(t){let r=this.input.charCodeAt(this.state.pos+1);if(r===61){this.finishOp(46,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(t===61&&r===62){this.state.pos+=2,this.finishToken(19);return}this.finishOp(t===61?29:35,1)}readToken_question(){let t=this.input.charCodeAt(this.state.pos+1),r=this.input.charCodeAt(this.state.pos+2);t===63?r===61?this.finishOp(30,3):this.finishOp(40,2):t===46&&!(r>=48&&r<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(t){switch(t){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(X.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(X.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let r=this.input.charCodeAt(this.state.pos+1);if(r===120||r===88){this.readRadixNumber(16);return}if(r===111||r===79){this.readRadixNumber(8);return}if(r===98||r===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(t);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(t);return;case 124:case 38:this.readToken_pipe_amp(t);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(t);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(t);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(wc(t)){this.readWord(t);return}}throw this.raise(X.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(t)})}finishOp(t,r){let a=this.input.slice(this.state.pos,this.state.pos+r);this.state.pos+=r,this.finishToken(t,a)}readRegexp(){let t=this.state.startLoc,r=this.state.start+1,a,n,{pos:s}=this.state;for(;;++s){if(s>=this.length)throw this.raise(X.UnterminatedRegExp,ui(t,1));let c=this.input.charCodeAt(s);if(vg(c))throw this.raise(X.UnterminatedRegExp,ui(t,1));if(a)a=!1;else{if(c===91)n=!0;else if(c===93&&n)n=!1;else if(c===47&&!n)break;a=c===92}}let i=this.input.slice(r,s);++s;let o="",l=()=>ui(t,s+2-r);for(;s<this.length;){let c=this.codePointAtPos(s),u=String.fromCharCode(c);if(Ioe.has(c))c===118?o.includes("u")&&this.raise(X.IncompatibleRegExpUVFlags,l()):c===117&&o.includes("v")&&this.raise(X.IncompatibleRegExpUVFlags,l()),o.includes(u)&&this.raise(X.DuplicateRegExpFlags,l());else if(em(c)||c===92)this.raise(X.MalformedRegExpFlags,l());else break;++s,o+=u}this.state.pos=s,this.finishToken(138,{pattern:i,flags:o})}readInt(t,r,a=!1,n=!0){let{n:s,pos:i}=n4(this.input,this.state.pos,this.state.lineStart,this.state.curLine,t,r,a,n,this.errorHandlers_readInt,!1);return this.state.pos=i,s}readRadixNumber(t){let r=this.state.pos,a=this.state.curPosition(),n=!1;this.state.pos+=2;let s=this.readInt(t);s==null&&this.raise(X.InvalidDigit,ui(a,2),{radix:t});let i=this.input.charCodeAt(this.state.pos);if(i===110)++this.state.pos,n=!0;else if(i===109)throw this.raise(X.InvalidDecimal,a);if(wc(this.codePointAtPos(this.state.pos)))throw this.raise(X.NumberIdentifier,this.state.curPosition());if(n){let o=this.input.slice(r,this.state.pos).replace(/[_n]/g,"");this.finishToken(136,o);return}this.finishToken(135,s)}readNumber(t){let r=this.state.pos,a=this.state.curPosition(),n=!1,s=!1,i=!1,o=!1;!t&&this.readInt(10)===null&&this.raise(X.InvalidNumber,this.state.curPosition());let l=this.state.pos-r>=2&&this.input.charCodeAt(r)===48;if(l){let p=this.input.slice(r,this.state.pos);if(this.recordStrictModeErrors(X.StrictOctalLiteral,a),!this.state.strict){let m=p.indexOf("_");m>0&&this.raise(X.ZeroDigitNumericSeparator,ui(a,m))}o=l&&!/[89]/.test(p)}let c=this.input.charCodeAt(this.state.pos);if(c===46&&!o&&(++this.state.pos,this.readInt(10),n=!0,c=this.input.charCodeAt(this.state.pos)),(c===69||c===101)&&!o&&(c=this.input.charCodeAt(++this.state.pos),(c===43||c===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(X.InvalidOrMissingExponent,a),n=!0,i=!0,c=this.input.charCodeAt(this.state.pos)),c===110&&((n||l)&&this.raise(X.InvalidBigIntLiteral,a),++this.state.pos,s=!0),c===109){this.expectPlugin("decimal",this.state.curPosition()),(i||l)&&this.raise(X.InvalidDecimal,a),++this.state.pos;var u=!0}if(wc(this.codePointAtPos(this.state.pos)))throw this.raise(X.NumberIdentifier,this.state.curPosition());let d=this.input.slice(r,this.state.pos).replace(/[_mn]/g,"");if(s){this.finishToken(136,d);return}if(u){this.finishToken(137,d);return}let f=o?parseInt(d,8):parseFloat(d);this.finishToken(135,f)}readCodePoint(t){let{code:r,pos:a}=s4(this.input,this.state.pos,this.state.lineStart,this.state.curLine,t,this.errorHandlers_readCodePoint);return this.state.pos=a,r}readString(t){let{str:r,pos:a,curLine:n,lineStart:s}=qB(t===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=a+1,this.state.lineStart=s,this.state.curLine=n,this.finishToken(134,r)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let t=this.input[this.state.pos],{str:r,firstInvalidLoc:a,pos:n,curLine:s,lineStart:i}=qB("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=n+1,this.state.lineStart=i,this.state.curLine=s,a&&(this.state.firstInvalidTemplateEscapePos=new Cc(a.curLine,a.pos-a.lineStart,this.sourceToOffsetPos(a.pos))),this.input.codePointAt(n)===96?this.finishToken(24,a?null:t+r+"`"):(this.state.pos++,this.finishToken(25,a?null:t+r+"${"))}recordStrictModeErrors(t,r){let a=r.index;this.state.strict&&!this.state.strictErrors.has(a)?this.raise(t,r):this.state.strictErrors.set(a,[t,r])}readWord1(t){this.state.containsEsc=!1;let r="",a=this.state.pos,n=this.state.pos;for(t!==void 0&&(this.state.pos+=t<=65535?1:2);this.state.pos<this.length;){let s=this.codePointAtPos(this.state.pos);if(em(s))this.state.pos+=s<=65535?1:2;else if(s===92){this.state.containsEsc=!0,r+=this.input.slice(n,this.state.pos);let i=this.state.curPosition(),o=this.state.pos===a?wc:em;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(X.MissingUnicodeEscape,this.state.curPosition()),n=this.state.pos-1;continue}++this.state.pos;let l=this.readCodePoint(!0);l!==null&&(o(l)||this.raise(X.EscapedCharNotAnIdentifier,i),r+=String.fromCodePoint(l)),n=this.state.pos}else break}return r+this.input.slice(n,this.state.pos)}readWord(t){let r=this.readWord1(t),a=PN.get(r);a!==void 0?this.finishToken(a,Yd(a)):this.finishToken(132,r)}checkKeywordEscapes(){let{type:t}=this.state;kN(t)&&this.state.containsEsc&&this.raise(X.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:Yd(t)})}raise(t,r,a={}){let n=r instanceof Cc?r:r.loc.start,s=t(n,a);if(!(this.optionFlags&2048))throw s;return this.isLookahead||this.state.errors.push(s),s}raiseOverwrite(t,r,a={}){let n=r instanceof Cc?r:r.loc.start,s=n.index,i=this.state.errors;for(let o=i.length-1;o>=0;o--){let l=i[o];if(l.loc.index===s)return i[o]=t(n,a);if(l.loc.index<s)break}return this.raise(t,r,a)}updateContext(t){}unexpected(t,r){throw this.raise(X.UnexpectedToken,t??this.state.startLoc,{expected:r?Yd(r):null})}expectPlugin(t,r){if(this.hasPlugin(t))return!0;throw this.raise(X.MissingPlugin,r??this.state.startLoc,{missingPlugin:[t]})}expectOnePlugin(t){if(!t.some(r=>this.hasPlugin(r)))throw this.raise(X.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:t})}errorBuilder(t){return(r,a,n)=>{this.raise(t,s0(r,a,n))}}},gN=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},yN=class{constructor(t){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=t}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new gN)}exit(){let t=this.stack.pop(),r=this.current();for(let[a,n]of Array.from(t.undefinedPrivateNames))r?r.undefinedPrivateNames.has(a)||r.undefinedPrivateNames.set(a,n):this.parser.raise(X.InvalidPrivateFieldResolution,n,{identifierName:a})}declarePrivateName(t,r,a){let{privateNames:n,loneAccessors:s,undefinedPrivateNames:i}=this.current(),o=n.has(t);if(r&3){let l=o&&s.get(t);if(l){let c=l&4,u=r&4,d=l&3,f=r&3;o=d===f||c!==u,o||s.delete(t)}else o||s.set(t,r)}o&&this.parser.raise(X.PrivateNameRedeclaration,a,{identifierName:t}),n.add(t),i.delete(t)}usePrivateName(t,r){let a;for(a of this.stack)if(a.privateNames.has(t))return;a?a.undefinedPrivateNames.set(t,r):this.parser.raise(X.InvalidPrivateFieldResolution,r,{identifierName:t})}},wg=class{constructor(t=0){this.type=t}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},Cw=class extends wg{constructor(t){super(t),this.declarationErrors=new Map}recordDeclarationError(t,r){let a=r.index;this.declarationErrors.set(a,[t,r])}clearDeclarationError(t){this.declarationErrors.delete(t)}iterateErrors(t){this.declarationErrors.forEach(t)}},xN=class{constructor(t){this.parser=void 0,this.stack=[new wg],this.parser=t}enter(t){this.stack.push(t)}exit(){this.stack.pop()}recordParameterInitializerError(t,r){let a=r.loc.start,{stack:n}=this,s=n.length-1,i=n[s];for(;!i.isCertainlyParameterDeclaration();){if(i.canBeArrowParameterDeclaration())i.recordDeclarationError(t,a);else return;i=n[--s]}this.parser.raise(t,a)}recordArrowParameterBindingError(t,r){let{stack:a}=this,n=a[a.length-1],s=r.loc.start;if(n.isCertainlyParameterDeclaration())this.parser.raise(t,s);else if(n.canBeArrowParameterDeclaration())n.recordDeclarationError(t,s);else return}recordAsyncArrowParametersError(t){let{stack:r}=this,a=r.length-1,n=r[a];for(;n.canBeArrowParameterDeclaration();)n.type===2&&n.recordDeclarationError(X.AwaitBindingIdentifier,t),n=r[--a]}validateAsPattern(){let{stack:t}=this,r=t[t.length-1];r.canBeArrowParameterDeclaration()&&r.iterateErrors(([a,n])=>{this.parser.raise(a,n);let s=t.length-2,i=t[s];for(;i.canBeArrowParameterDeclaration();)i.clearDeclarationError(n.index),i=t[--s]})}};function Noe(){return new wg(3)}function Loe(){return new Cw(1)}function Roe(){return new Cw(2)}function i4(){return new wg}var bN=class extends hN{addExtra(t,r,a,n=!0){if(!t)return;let{extra:s}=t;s==null&&(s={},t.extra=s),n?s[r]=a:Object.defineProperty(s,r,{enumerable:n,value:a})}isContextual(t){return this.state.type===t&&!this.state.containsEsc}isUnparsedContextual(t,r){if(this.input.startsWith(r,t)){let a=this.input.charCodeAt(t+r.length);return!(em(a)||(a&64512)===55296)}return!1}isLookaheadContextual(t){let r=this.nextTokenStart();return this.isUnparsedContextual(r,t)}eatContextual(t){return this.isContextual(t)?(this.next(),!0):!1}expectContextual(t,r){if(!this.eatContextual(t)){if(r!=null)throw this.raise(r,this.state.startLoc);this.unexpected(null,t)}}canInsertSemicolon(){return this.match(140)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return zB(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return zB(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(t=!0){(t?this.isLineTerminator():this.eat(13))||this.raise(X.MissingSemicolon,this.state.lastTokEndLoc)}expect(t,r){this.eat(t)||this.unexpected(r,t)}tryParse(t,r=this.state.clone()){let a={node:null};try{let n=t((s=null)=>{throw a.node=s,a});if(this.state.errors.length>r.errors.length){let s=this.state;return this.state=r,this.state.tokensLength=s.tokensLength,{node:n,error:s.errors[r.errors.length],thrown:!1,aborted:!1,failState:s}}return{node:n,error:null,thrown:!1,aborted:!1,failState:null}}catch(n){let s=this.state;if(this.state=r,n instanceof SyntaxError)return{node:null,error:n,thrown:!0,aborted:!1,failState:s};if(n===a)return{node:a.node,error:null,thrown:!1,aborted:!0,failState:s};throw n}}checkExpressionErrors(t,r){if(!t)return!1;let{shorthandAssignLoc:a,doubleProtoLoc:n,privateKeyLoc:s,optionalParametersLoc:i,voidPatternLoc:o}=t,l=!!a||!!n||!!i||!!s||!!o;if(!r)return l;a!=null&&this.raise(X.InvalidCoverInitializedName,a),n!=null&&this.raise(X.DuplicateProto,n),s!=null&&this.raise(X.UnexpectedPrivateField,s),i!=null&&this.unexpected(i),o!=null&&this.raise(X.InvalidCoverDiscardElement,o)}isLiteralPropertyName(){return YB(this.state.type)}isPrivateName(t){return t.type==="PrivateName"}getPrivateNameSV(t){return t.id.name}hasPropertyAsPrivateName(t){return(t.type==="MemberExpression"||t.type==="OptionalMemberExpression")&&this.isPrivateName(t.property)}isObjectProperty(t){return t.type==="ObjectProperty"}isObjectMethod(t){return t.type==="ObjectMethod"}initializeScopes(t=this.options.sourceType==="module"){let r=this.state.labels;this.state.labels=[];let a=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let n=this.inModule;this.inModule=t;let s=this.scope,i=this.getScopeHandler();this.scope=new i(this,t);let o=this.prodParam;this.prodParam=new dN;let l=this.classScope;this.classScope=new yN(this);let c=this.expressionScope;return this.expressionScope=new xN(this),()=>{this.state.labels=r,this.exportedIdentifiers=a,this.inModule=n,this.scope=s,this.prodParam=o,this.classScope=l,this.expressionScope=c}}enterInitialScopes(){let t=0;(this.inModule||this.optionFlags&1)&&(t|=2),this.optionFlags&32&&(t|=1);let r=!this.inModule&&this.options.sourceType==="commonjs";(r||this.optionFlags&2)&&(t|=4),this.prodParam.enter(t);let a=r?514:1;this.optionFlags&4&&(a|=512),this.scope.enter(a)}checkDestructuringPrivate(t){let{privateKeyLoc:r}=t;r!==null&&this.expectPlugin("destructuringPrivate",r)}},Sg=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null,this.voidPatternLoc=null}},Cg=class{constructor(t,r,a){this.type="",this.start=r,this.end=0,this.loc=new Tg(a),t?.optionFlags&128&&(this.range=[r,0]),t!=null&&t.filename&&(this.loc.filename=t.filename)}},vN=Cg.prototype;vN.__clone=function(){let e=new Cg(void 0,this.start,this.loc.start),t=Object.keys(this);for(let r=0,a=t.length;r<a;r++){let n=t[r];n!=="leadingComments"&&n!=="trailingComments"&&n!=="innerComments"&&(e[n]=this[n])}return e};var SN=class extends bN{startNode(){let t=this.state.startLoc;return new Cg(this,t.index,t)}startNodeAt(t){return new Cg(this,t.index,t)}startNodeAtNode(t){return this.startNodeAt(t.loc.start)}finishNode(t,r){return this.finishNodeAt(t,r,this.state.lastTokEndLoc)}finishNodeAt(t,r,a){return t.type=r,t.end=a.index,t.loc.end=a,this.optionFlags&128&&(t.range[1]=a.index),this.optionFlags&4096&&this.processComment(t),t}resetStartLocation(t,r){t.start=r.index,t.loc.start=r,this.optionFlags&128&&(t.range[0]=r.index)}resetEndLocation(t,r=this.state.lastTokEndLoc){t.end=r.index,t.loc.end=r,this.optionFlags&128&&(t.range[1]=r.index)}resetStartLocationFromNode(t,r){this.resetStartLocation(t,r.loc.start)}castNodeTo(t,r){return t.type=r,t}cloneIdentifier(t){let{type:r,start:a,end:n,loc:s,range:i,name:o}=t,l=Object.create(vN);return l.type=r,l.start=a,l.end=n,l.loc=s,l.range=i,l.name=o,t.extra&&(l.extra=t.extra),l}cloneStringLiteral(t){let{type:r,start:a,end:n,loc:s,range:i,extra:o}=t,l=Object.create(vN);return l.type=r,l.start=a,l.end=n,l.loc=s,l.range=i,l.extra=o,l.value=t.value,l}},TN=e=>e.type==="ParenthesizedExpression"?TN(e.expression):e,wN=class extends SN{toAssignable(t,r=!1){var a,n;let s;switch((t.type==="ParenthesizedExpression"||(a=t.extra)!=null&&a.parenthesized)&&(s=TN(t),r?s.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(X.InvalidParenthesizedAssignment,t):s.type!=="CallExpression"&&s.type!=="MemberExpression"&&!this.isOptionalMemberExpression(s)&&this.raise(X.InvalidParenthesizedAssignment,t):this.raise(X.InvalidParenthesizedAssignment,t)),t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":break;case"ObjectExpression":this.castNodeTo(t,"ObjectPattern");for(let o=0,l=t.properties.length,c=l-1;o<l;o++){var i;let u=t.properties[o],d=o===c;this.toAssignableObjectExpressionProp(u,d,r),d&&u.type==="RestElement"&&(i=t.extra)!=null&&i.trailingCommaLoc&&this.raise(X.RestTrailingComma,t.extra.trailingCommaLoc)}break;case"ObjectProperty":{let{key:o,value:l}=t;this.isPrivateName(o)&&this.classScope.usePrivateName(this.getPrivateNameSV(o),o.loc.start),this.toAssignable(l,r);break}case"SpreadElement":throw new Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.");case"ArrayExpression":this.castNodeTo(t,"ArrayPattern"),this.toAssignableList(t.elements,(n=t.extra)==null?void 0:n.trailingCommaLoc,r);break;case"AssignmentExpression":t.operator!=="="&&this.raise(X.MissingEqInAssignment,t.left.loc.end),this.castNodeTo(t,"AssignmentPattern"),delete t.operator,t.left.type==="VoidPattern"&&this.raise(X.VoidPatternInitializer,t.left),this.toAssignable(t.left,r);break;case"ParenthesizedExpression":this.toAssignable(s,r);break}}toAssignableObjectExpressionProp(t,r,a){if(t.type==="ObjectMethod")this.raise(t.kind==="get"||t.kind==="set"?X.PatternHasAccessor:X.PatternHasMethod,t.key);else if(t.type==="SpreadElement"){this.castNodeTo(t,"RestElement");let n=t.argument;this.checkToRestConversion(n,!1),this.toAssignable(n,a),r||this.raise(X.RestTrailingComma,t)}else this.toAssignable(t,a)}toAssignableList(t,r,a){let n=t.length-1;for(let s=0;s<=n;s++){let i=t[s];i&&(this.toAssignableListItem(t,s,a),i.type==="RestElement"&&(s<n?this.raise(X.RestTrailingComma,i):r&&this.raise(X.RestTrailingComma,r)))}}toAssignableListItem(t,r,a){let n=t[r];if(n.type==="SpreadElement"){this.castNodeTo(n,"RestElement");let s=n.argument;this.checkToRestConversion(s,!0),this.toAssignable(s,a)}else this.toAssignable(n,a)}isAssignable(t,r){switch(t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":return!0;case"ObjectExpression":{let a=t.properties.length-1;return t.properties.every((n,s)=>n.type!=="ObjectMethod"&&(s===a||n.type!=="SpreadElement")&&this.isAssignable(n))}case"ObjectProperty":return this.isAssignable(t.value);case"SpreadElement":return this.isAssignable(t.argument);case"ArrayExpression":return t.elements.every(a=>a===null||this.isAssignable(a));case"AssignmentExpression":return t.operator==="=";case"ParenthesizedExpression":return this.isAssignable(t.expression);case"MemberExpression":case"OptionalMemberExpression":return!r;default:return!1}}toReferencedList(t,r){return t}toReferencedListDeep(t,r){this.toReferencedList(t,r);for(let a of t)a?.type==="ArrayExpression"&&this.toReferencedListDeep(a.elements)}parseSpread(t){let r=this.startNode();return this.next(),r.argument=this.parseMaybeAssignAllowIn(t,void 0),this.finishNode(r,"SpreadElement")}parseRestBinding(){let t=this.startNode();this.next();let r=this.parseBindingAtom();return r.type==="VoidPattern"&&this.raise(X.UnexpectedVoidPattern,r),t.argument=r,this.finishNode(t,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let t=this.startNode();return this.next(),t.elements=this.parseBindingList(3,93,1),this.finishNode(t,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0);case 88:return this.parseVoidPattern(null)}return this.parseIdentifier()}parseBindingList(t,r,a){let n=a&1,s=[],i=!0;for(;!this.eat(t);)if(i?i=!1:this.expect(12),n&&this.match(12))s.push(null);else{if(this.eat(t))break;if(this.match(21)){let o=this.parseRestBinding();if((this.hasPlugin("flow")||a&2)&&(o=this.parseFunctionParamType(o)),s.push(o),!this.checkCommaAfterRest(r)){this.expect(t);break}}else{let o=[];if(a&2)for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(X.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)o.push(this.parseDecorator());s.push(this.parseBindingElement(a,o))}}return s}parseBindingRestProperty(t){return this.next(),this.hasPlugin("discardBinding")&&this.match(88)?(t.argument=this.parseVoidPattern(null),this.raise(X.UnexpectedVoidPattern,t.argument)):t.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(t,"RestElement")}parseBindingProperty(){let{type:t,startLoc:r}=this.state;if(t===21)return this.parseBindingRestProperty(this.startNode());let a=this.startNode();return t===139?(this.expectPlugin("destructuringPrivate",r),this.classScope.usePrivateName(this.state.value,r),a.key=this.parsePrivateName()):this.parsePropertyName(a),a.method=!1,this.parseObjPropValue(a,r,!1,!1,!0,!1)}parseBindingElement(t,r){let a=this.parseMaybeDefault();return(this.hasPlugin("flow")||t&2)&&this.parseFunctionParamType(a),r.length&&(a.decorators=r,this.resetStartLocationFromNode(a,r[0])),this.parseMaybeDefault(a.loc.start,a)}parseFunctionParamType(t){return t}parseMaybeDefault(t,r){if(t??(t=this.state.startLoc),r=r??this.parseBindingAtom(),!this.eat(29))return r;let a=this.startNodeAt(t);return r.type==="VoidPattern"&&this.raise(X.VoidPatternInitializer,r),a.left=r,a.right=this.parseMaybeAssignAllowIn(),this.finishNode(a,"AssignmentPattern")}isValidLVal(t,r,a,n){switch(t){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties";case"VoidPattern":return!0;case"CallExpression":if(!r&&!this.state.strict&&this.optionFlags&8192)return!0}return!1}isOptionalMemberExpression(t){return t.type==="OptionalMemberExpression"}checkLVal(t,r,a=64,n=!1,s=!1,i=!1,o=!1){var l;let c=t.type;if(this.isObjectMethod(t))return;let u=this.isOptionalMemberExpression(t);if(u||c==="MemberExpression"){u&&(this.expectPlugin("optionalChainingAssign",t.loc.start),r.type!=="AssignmentExpression"&&this.raise(X.InvalidLhsOptionalChaining,t,{ancestor:r})),a!==64&&this.raise(X.InvalidPropertyBindingPattern,t);return}if(c==="Identifier"){this.checkIdentifier(t,a,s);let{name:g}=t;n&&(n.has(g)?this.raise(X.ParamDupe,t):n.add(g));return}else c==="VoidPattern"&&r.type==="CatchClause"&&this.raise(X.VoidPatternCatchClauseParam,t);let d=TN(t);o||(o=d.type==="CallExpression"&&(d.callee.type==="Import"||d.callee.type==="Super"));let f=this.isValidLVal(c,o,!(i||(l=t.extra)!=null&&l.parenthesized)&&r.type==="AssignmentExpression",a);if(f===!0)return;if(f===!1){let g=a===64?X.InvalidLhs:X.InvalidLhsBinding;this.raise(g,t,{ancestor:r});return}let p,m;typeof f=="string"?(p=f,m=c==="ParenthesizedExpression"):[p,m]=f;let h=c==="ArrayPattern"||c==="ObjectPattern"?{type:c}:r,x=t[p];if(Array.isArray(x))for(let g of x)g&&this.checkLVal(g,h,a,n,s,m,!0);else x&&this.checkLVal(x,h,a,n,s,m,o)}checkIdentifier(t,r,a=!1){this.state.strict&&(a?r4(t.name,this.inModule):t4(t.name))&&(r===64?this.raise(X.StrictEvalArguments,t,{referenceName:t.name}):this.raise(X.StrictEvalArgumentsBinding,t,{bindingName:t.name})),r&8192&&t.name==="let"&&this.raise(X.LetInLexicalBinding,t),r&64||this.declareNameFromIdentifier(t,r)}declareNameFromIdentifier(t,r){this.scope.declareName(t.name,r,t.loc.start)}checkToRestConversion(t,r){switch(t.type){case"ParenthesizedExpression":this.checkToRestConversion(t.expression,r);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(r)break;default:this.raise(X.InvalidRestAssignmentPattern,t)}}checkCommaAfterRest(t){return this.match(12)?(this.raise(this.lookaheadCharCode()===t?X.RestTrailingComma:X.ElementAfterRest,this.state.startLoc),!0):!1}},aN=/in(?:stanceof)?|as|satisfies/y;function koe(e){if(e==null)throw new Error(`Unexpected ${e} value.`);return e}function HB(e){if(!e)throw new Error("Assert fail")}var gt=Tc`typescript`({AbstractMethodHasImplementation:({methodName:e})=>`Method '${e}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:e})=>`Property '${e}' cannot have an initializer because it is marked abstract.`,AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",AccessorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccessorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:e})=>`'declare' is not allowed in ${e}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:e})=>`Accessibility modifier already seen: '${e}'.`,DuplicateModifier:({modifier:e})=>`Duplicate modifier: '${e}'.`,EmptyHeritageClauseType:({token:e})=>`'${e}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:e})=>`'${e[0]}' modifier cannot be used with '${e[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:e})=>`Index signatures cannot have an accessibility modifier ('${e}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidHeritageClauseType:({token:e})=>`'${e}' list can only include identifiers or qualified-names with optional type arguments.`,InvalidModifierOnAwaitUsingDeclaration:e=>`'${e}' modifier cannot appear on an await using declaration.`,InvalidModifierOnTypeMember:({modifier:e})=>`'${e}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:e})=>`'${e}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:e})=>`'${e}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifierOnUsingDeclaration:e=>`'${e}' modifier cannot appear on a using declaration.`,InvalidModifiersOrder:({orderedModifiers:e})=>`'${e[0]}' modifier must precede '${e[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifier:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:e})=>`Private elements cannot have an accessibility modifier ('${e}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccessorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccessorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccessorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:e})=>`Single type parameter ${e} should have a trailing comma. Example usage: <${e},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:e})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${e}.`,UsingDeclarationInAmbientContext:e=>`'${e}' declarations are not allowed in ambient contexts.`});function Moe(e){switch(e){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function $B(e){return e==="private"||e==="public"||e==="protected"}function Doe(e){return e==="in"||e==="out"}var _oe=e=>class extends e{constructor(...r){super(...r),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:gt.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:gt.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:gt.InvalidModifierOnTypeParameter})}getScopeHandler(){return uN}tsIsIdentifier(){return Qr(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(139)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),this.hasPrecedingLineBreak()?!1:this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(106)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(r,a,n){if(!Qr(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let s=this.state.value;if(r.includes(s)){if(n&&this.match(106)||a&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return s}}tsParseModifiers({allowedModifiers:r,disallowedModifiers:a,stopOnStartOfClassStaticBlock:n,errorTemplate:s=gt.InvalidModifierOnTypeMember},i){let o=(c,u,d,f)=>{u===d&&i[f]&&this.raise(gt.InvalidModifiersOrder,c,{orderedModifiers:[d,f]})},l=(c,u,d,f)=>{(i[d]&&u===f||i[f]&&u===d)&&this.raise(gt.IncompatibleModifiers,c,{modifiers:[d,f]})};for(;;){let{startLoc:c}=this.state,u=this.tsParseModifier(r.concat(a??[]),n,i.static);if(!u)break;$B(u)?i.accessibility?this.raise(gt.DuplicateAccessibilityModifier,c,{modifier:u}):(o(c,u,u,"override"),o(c,u,u,"static"),o(c,u,u,"readonly"),i.accessibility=u):Doe(u)?(i[u]&&this.raise(gt.DuplicateModifier,c,{modifier:u}),i[u]=!0,o(c,u,"in","out")):(hasOwnProperty.call(i,u)?this.raise(gt.DuplicateModifier,c,{modifier:u}):(o(c,u,"static","readonly"),o(c,u,"static","override"),o(c,u,"override","readonly"),o(c,u,"abstract","override"),l(c,u,"declare","override"),l(c,u,"static","abstract")),i[u]=!0),a!=null&&a.includes(u)&&this.raise(s,c,{modifier:u})}}tsIsListTerminator(r){switch(r){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(r,a){let n=[];for(;!this.tsIsListTerminator(r);)n.push(a());return n}tsParseDelimitedList(r,a,n){return koe(this.tsParseDelimitedListWorker(r,a,!0,n))}tsParseDelimitedListWorker(r,a,n,s){let i=[],o=-1;for(;!this.tsIsListTerminator(r);){o=-1;let l=a();if(l==null)return;if(i.push(l),this.eat(12)){o=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(r))break;n&&this.expect(12);return}return s&&(s.value=o),i}tsParseBracketedList(r,a,n,s,i){s||(n?this.expect(0):this.expect(47));let o=this.tsParseDelimitedList(r,a,i);return n?this.expect(3):this.expect(48),o}tsParseImportType(){let r=this.startNode();return this.expect(83),this.expect(10),this.match(134)?r.argument=this.parseStringLiteral(this.state.value):(this.raise(gt.UnsupportedImportTypeArgument,this.state.startLoc),r.argument=super.parseExprAtom()),this.eat(12)?r.options=this.tsParseImportTypeOptions():r.options=null,this.expect(11),this.eat(16)&&(r.qualifier=this.tsParseEntityName(3)),this.match(47)&&(r.typeParameters=this.tsParseTypeArguments()),this.finishNode(r,"TSImportType")}tsParseImportTypeOptions(){let r=this.startNode();this.expect(5);let a=this.startNode();return this.isContextual(76)?(a.method=!1,a.key=this.parseIdentifier(!0),a.computed=!1,a.shorthand=!1):this.unexpected(null,76),this.expect(14),a.value=this.tsParseImportTypeWithPropertyValue(),r.properties=[this.finishObjectProperty(a)],this.eat(12),this.expect(8),this.finishNode(r,"ObjectExpression")}tsParseImportTypeWithPropertyValue(){let r=this.startNode(),a=[];for(this.expect(5);!this.match(8);){let n=this.state.type;Qr(n)||n===134?a.push(super.parsePropertyDefinition(null)):this.unexpected(),this.eat(12)}return r.properties=a,this.next(),this.finishNode(r,"ObjectExpression")}tsParseEntityName(r){let a;if(r&1&&this.match(78))if(r&2)a=this.parseIdentifier(!0);else{let n=this.startNode();this.next(),a=this.finishNode(n,"ThisExpression")}else a=this.parseIdentifier(!!(r&1));for(;this.eat(16);){let n=this.startNodeAtNode(a);n.left=a,n.right=this.parseIdentifier(!!(r&1)),a=this.finishNode(n,"TSQualifiedName")}return a}tsParseTypeReference(){let r=this.startNode();return r.typeName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(47)&&(r.typeParameters=this.tsParseTypeArguments()),this.finishNode(r,"TSTypeReference")}tsParseThisTypePredicate(r){this.next();let a=this.startNodeAtNode(r);return a.parameterName=r,a.typeAnnotation=this.tsParseTypeAnnotation(!1),a.asserts=!1,this.finishNode(a,"TSTypePredicate")}tsParseThisTypeNode(){let r=this.startNode();return this.next(),this.finishNode(r,"TSThisType")}tsParseTypeQuery(){let r=this.startNode();return this.expect(87),this.match(83)?r.exprName=this.tsParseImportType():r.exprName=this.tsParseEntityName(3),!this.hasPrecedingLineBreak()&&this.match(47)&&(r.typeParameters=this.tsParseTypeArguments()),this.finishNode(r,"TSTypeQuery")}tsParseTypeParameter(r){let a=this.startNode();return r(a),a.name=this.tsParseTypeParameterName(),a.constraint=this.tsEatThenParseType(81),a.default=this.tsEatThenParseType(29),this.finishNode(a,"TSTypeParameter")}tsTryParseTypeParameters(r){if(this.match(47))return this.tsParseTypeParameters(r)}tsParseTypeParameters(r){let a=this.startNode();this.match(47)||this.match(143)?this.next():this.unexpected();let n={value:-1};return a.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,r),!1,!0,n),a.params.length===0&&this.raise(gt.EmptyTypeParameters,a),n.value!==-1&&this.addExtra(a,"trailingComma",n.value),this.finishNode(a,"TSTypeParameterDeclaration")}tsFillSignature(r,a){let n=r===19,s="parameters",i="typeAnnotation";a.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),a[s]=this.tsParseBindingListForSignature(),n?a[i]=this.tsParseTypeOrTypePredicateAnnotation(r):this.match(r)&&(a[i]=this.tsParseTypeOrTypePredicateAnnotation(r))}tsParseBindingListForSignature(){let r=super.parseBindingList(11,41,2);for(let a of r){let{type:n}=a;(n==="AssignmentPattern"||n==="TSParameterProperty")&&this.raise(gt.UnsupportedSignatureParameterKind,a,{type:n})}return r}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(r,a){return this.tsFillSignature(14,a),this.tsParseTypeMemberSemicolon(),this.finishNode(a,r)}tsIsUnambiguouslyIndexSignature(){return this.next(),Qr(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(r){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let a=this.parseIdentifier();a.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(a),this.expect(3),r.parameters=[a];let n=this.tsTryParseTypeAnnotation();return n&&(r.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(r,"TSIndexSignature")}tsParsePropertyOrMethodSignature(r,a){if(this.eat(17)&&(r.optional=!0),this.match(10)||this.match(47)){a&&this.raise(gt.ReadonlyForMethodSignature,r);let n=r;n.kind&&this.match(47)&&this.raise(gt.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,n),this.tsParseTypeMemberSemicolon();let s="parameters",i="typeAnnotation";if(n.kind==="get")n[s].length>0&&(this.raise(X.BadGetterArity,this.state.curPosition()),this.isThisParam(n[s][0])&&this.raise(gt.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(n.kind==="set"){if(n[s].length!==1)this.raise(X.BadSetterArity,this.state.curPosition());else{let o=n[s][0];this.isThisParam(o)&&this.raise(gt.AccessorCannotDeclareThisParameter,this.state.curPosition()),o.type==="Identifier"&&o.optional&&this.raise(gt.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),o.type==="RestElement"&&this.raise(gt.SetAccessorCannotHaveRestParameter,this.state.curPosition())}n[i]&&this.raise(gt.SetAccessorCannotHaveReturnType,n[i])}else n.kind="method";return this.finishNode(n,"TSMethodSignature")}else{let n=r;a&&(n.readonly=!0);let s=this.tsTryParseTypeAnnotation();return s&&(n.typeAnnotation=s),this.tsParseTypeMemberSemicolon(),this.finishNode(n,"TSPropertySignature")}}tsParseTypeMember(){let r=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",r);if(this.match(77)){let n=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",r):(r.key=this.createIdentifier(n,"new"),this.tsParsePropertyOrMethodSignature(r,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},r);let a=this.tsTryParseIndexSignature(r);return a||(super.parsePropertyName(r),!r.computed&&r.key.type==="Identifier"&&(r.key.name==="get"||r.key.name==="set")&&this.tsTokenCanFollowModifier()&&(r.kind=r.key.name,super.parsePropertyName(r),!this.match(10)&&!this.match(47)&&this.unexpected(null,10)),this.tsParsePropertyOrMethodSignature(r,!!r.readonly))}tsParseTypeLiteral(){let r=this.startNode();return r.members=this.tsParseObjectTypeMembers(),this.finishNode(r,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let r=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),r}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedType(){let r=this.startNode();this.expect(5),this.match(53)?(r.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(r.readonly=!0),this.expect(0);{let a=this.startNode();a.name=this.tsParseTypeParameterName(),a.constraint=this.tsExpectThenParseType(58),r.typeParameter=this.finishNode(a,"TSTypeParameter")}return r.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(r.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(r.optional=!0),r.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(r,"TSMappedType")}tsParseTupleType(){let r=this.startNode();r.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let a=!1;return r.elementTypes.forEach(n=>{let{type:s}=n;a&&s!=="TSRestType"&&s!=="TSOptionalType"&&!(s==="TSNamedTupleMember"&&n.optional)&&this.raise(gt.OptionalTypeBeforeRequired,n),a||(a=s==="TSNamedTupleMember"&&n.optional||s==="TSOptionalType")}),this.finishNode(r,"TSTupleType")}tsParseTupleElementType(){let r=this.state.startLoc,a=this.eat(21),{startLoc:n}=this.state,s,i,o,l,u=Vl(this.state.type)?this.lookaheadCharCode():null;if(u===58)s=!0,o=!1,i=this.parseIdentifier(!0),this.expect(14),l=this.tsParseType();else if(u===63){o=!0;let d=this.state.value,f=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(s=!0,i=this.createIdentifier(this.startNodeAt(n),d),this.expect(17),this.expect(14),l=this.tsParseType()):(s=!1,l=f,this.expect(17))}else l=this.tsParseType(),o=this.eat(17),s=this.eat(14);if(s){let d;i?(d=this.startNodeAt(n),d.optional=o,d.label=i,d.elementType=l,this.eat(17)&&(d.optional=!0,this.raise(gt.TupleOptionalAfterType,this.state.lastTokStartLoc))):(d=this.startNodeAt(n),d.optional=o,this.raise(gt.InvalidTupleMemberLabel,l),d.label=l,d.elementType=this.tsParseType()),l=this.finishNode(d,"TSNamedTupleMember")}else if(o){let d=this.startNodeAt(n);d.typeAnnotation=l,l=this.finishNode(d,"TSOptionalType")}if(a){let d=this.startNodeAt(r);d.typeAnnotation=l,l=this.finishNode(d,"TSRestType")}return l}tsParseParenthesizedType(){let r=this.startNode();return this.expect(10),r.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(r,"TSParenthesizedType")}tsParseFunctionOrConstructorType(r,a){let n=this.startNode();return r==="TSConstructorType"&&(n.abstract=!!a,a&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,n)),this.finishNode(n,r)}tsParseLiteralTypeNode(){let r=this.startNode();switch(this.state.type){case 135:case 136:case 134:case 85:case 86:r.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(r,"TSLiteralType")}tsParseTemplateLiteralType(){{let r=this.startNode();return r.literal=super.parseTemplate(!1),this.finishNode(r,"TSLiteralType")}}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let r=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(r):r}tsParseNonArrayType(){switch(this.state.type){case 134:case 135:case 136:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){let r=this.startNode(),a=this.lookahead();return a.type!==135&&a.type!==136&&this.unexpected(),r.literal=this.parseMaybeUnary(),this.finishNode(r,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:r}=this.state;if(Qr(r)||r===88||r===84){let a=r===88?"TSVoidKeyword":r===84?"TSNullKeyword":Moe(this.state.value);if(a!==void 0&&this.lookaheadCharCode()!==46){let n=this.startNode();return this.next(),this.finishNode(n,a)}return this.tsParseTypeReference()}}}throw this.unexpected()}tsParseArrayTypeOrHigher(){let{startLoc:r}=this.state,a=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let n=this.startNodeAt(r);n.elementType=a,this.expect(3),a=this.finishNode(n,"TSArrayType")}else{let n=this.startNodeAt(r);n.objectType=a,n.indexType=this.tsParseType(),this.expect(3),a=this.finishNode(n,"TSIndexedAccessType")}return a}tsParseTypeOperator(){let r=this.startNode(),a=this.state.value;return this.next(),r.operator=a,r.typeAnnotation=this.tsParseTypeOperatorOrHigher(),a==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(r),this.finishNode(r,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(r){switch(r.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(gt.UnexpectedReadonly,r)}}tsParseInferType(){let r=this.startNode();this.expectContextual(115);let a=this.startNode();return a.name=this.tsParseTypeParameterName(),a.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),r.typeParameter=this.finishNode(a,"TSTypeParameter"),this.finishNode(r,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let r=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return r}}tsParseTypeOperatorOrHigher(){return toe(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(r,a,n){let s=this.startNode(),i=this.eat(n),o=[];do o.push(a());while(this.eat(n));return o.length===1&&!i?o[0]:(s.types=o,this.finishNode(s,r))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(Qr(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:r}=this.state,a=r.length;try{return this.parseObjectLike(8,!0),r.length===a}catch{return!1}}if(this.match(0)){this.next();let{errors:r}=this.state,a=r.length;try{return super.parseBindingList(3,93,1),r.length===a}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(r){return this.tsInType(()=>{let a=this.startNode();this.expect(r);let n=this.startNode(),s=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(s&&this.match(78)){let l=this.tsParseThisTypeOrThisTypePredicate();return l.type==="TSThisType"?(n.parameterName=l,n.asserts=!0,n.typeAnnotation=null,l=this.finishNode(n,"TSTypePredicate")):(this.resetStartLocationFromNode(l,n),l.asserts=!0),a.typeAnnotation=l,this.finishNode(a,"TSTypeAnnotation")}let i=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!i)return s?(n.parameterName=this.parseIdentifier(),n.asserts=s,n.typeAnnotation=null,a.typeAnnotation=this.finishNode(n,"TSTypePredicate"),this.finishNode(a,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,a);let o=this.tsParseTypeAnnotation(!1);return n.parameterName=i,n.typeAnnotation=o,n.asserts=s,a.typeAnnotation=this.finishNode(n,"TSTypePredicate"),this.finishNode(a,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let r=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),r}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;let r=this.state.containsEsc;return this.next(),!Qr(this.state.type)&&!this.match(78)?!1:(r&&this.raise(X.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(r=!0,a=this.startNode()){return this.tsInType(()=>{r&&this.expect(14),a.typeAnnotation=this.tsParseType()}),this.finishNode(a,"TSTypeAnnotation")}tsParseType(){HB(this.state.inType);let r=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return r;let a=this.startNodeAtNode(r);return a.checkType=r,a.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),a.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),a.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(a,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.isLookaheadContextual("new")}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(gt.ReservedTypeAssertion,this.state.startLoc);let r=this.startNode();return r.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),r.expression=this.parseMaybeUnary(),this.finishNode(r,"TSTypeAssertion")}tsParseHeritageClause(r){let a=this.state.startLoc,n=this.tsParseDelimitedList("HeritageClauseElement",()=>{{let s=this.startNode();return s.expression=this.tsParseEntityName(3),this.match(47)&&(s.typeParameters=this.tsParseTypeArguments()),this.finishNode(s,"TSExpressionWithTypeArguments")}});return n.length||this.raise(gt.EmptyHeritageClauseType,a,{token:r}),n}tsParseInterfaceDeclaration(r,a={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),a.declare&&(r.declare=!0),Qr(this.state.type)?(r.id=this.parseIdentifier(),this.checkIdentifier(r.id,130)):(r.id=null,this.raise(gt.MissingInterfaceName,this.state.startLoc)),r.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(r.extends=this.tsParseHeritageClause("extends"));let n=this.startNode();return n.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),r.body=this.finishNode(n,"TSInterfaceBody"),this.finishNode(r,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(r){return r.id=this.parseIdentifier(),this.checkIdentifier(r.id,2),r.typeAnnotation=this.tsInType(()=>{if(r.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookaheadCharCode()!==46){let a=this.startNode();return this.next(),this.finishNode(a,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(r,"TSTypeAliasDeclaration")}tsInTopLevelContext(r){if(this.curContext()!==Gr.brace){let a=this.state.context;this.state.context=[a[0]];try{return r()}finally{this.state.context=a}}else return r()}tsInType(r){let a=this.state.inType;this.state.inType=!0;try{return r()}finally{this.state.inType=a}}tsInDisallowConditionalTypesContext(r){let a=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return r()}finally{this.state.inDisallowConditionalTypesContext=a}}tsInAllowConditionalTypesContext(r){let a=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return r()}finally{this.state.inDisallowConditionalTypesContext=a}}tsEatThenParseType(r){if(this.match(r))return this.tsNextThenParseType()}tsExpectThenParseType(r){return this.tsInType(()=>(this.expect(r),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let r=this.startNode();return r.id=this.match(134)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(r.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(r,"TSEnumMember")}tsParseEnumDeclaration(r,a={}){return a.const&&(r.const=!0),a.declare&&(r.declare=!0),this.expectContextual(126),r.id=this.parseIdentifier(),this.checkIdentifier(r.id,r.const?8971:8459),this.expect(5),r.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(r,"TSEnumDeclaration")}tsParseEnumBody(){let r=this.startNode();return this.expect(5),r.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(r,"TSEnumBody")}tsParseModuleBlock(){let r=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(r.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(r,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(r,a=!1){if(r.id=this.parseIdentifier(),a||this.checkIdentifier(r.id,1024),this.eat(16)){let n=this.startNode();this.tsParseModuleOrNamespaceDeclaration(n,!0),r.body=n}else this.scope.enter(1024),this.prodParam.enter(0),r.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(r,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(r){return this.isContextual(112)?(r.kind="global",r.global=!0,r.id=this.parseIdentifier()):this.match(134)?(r.kind="module",r.id=super.parseStringLiteral(this.state.value)):this.unexpected(),this.match(5)?(this.scope.enter(1024),this.prodParam.enter(0),r.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(r,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(r,a,n){r.isExport=n||!1,r.id=a||this.parseIdentifier(),this.checkIdentifier(r.id,4096),this.expect(29);let s=this.tsParseModuleReference();return r.importKind==="type"&&s.type!=="TSExternalModuleReference"&&this.raise(gt.ImportAliasHasImportType,s),r.moduleReference=s,this.semicolon(),this.finishNode(r,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(0)}tsParseExternalModuleReference(){let r=this.startNode();return this.expectContextual(119),this.expect(10),this.match(134)||this.unexpected(),r.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(r,"TSExternalModuleReference")}tsLookAhead(r){let a=this.state.clone(),n=r();return this.state=a,n}tsTryParseAndCatch(r){let a=this.tryParse(n=>r()||n());if(!(a.aborted||!a.node))return a.error&&(this.state=a.failState),a.node}tsTryParse(r){let a=this.state.clone(),n=r();if(n!==void 0&&n!==!1)return n;this.state=a}tsTryParseDeclare(r){if(this.isLineTerminator())return;let a=this.state.type;return this.tsInAmbientContext(()=>{switch(a){case 68:return r.declare=!0,super.parseFunctionStatement(r,!1,!1);case 80:return r.declare=!0,this.parseClass(r,!0,!1);case 126:return this.tsParseEnumDeclaration(r,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(r);case 100:if(this.state.containsEsc)return;case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(r.declare=!0,this.parseVarStatement(r,this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(r,{const:!0,declare:!0}));case 107:if(this.isUsing())return this.raise(gt.InvalidModifierOnUsingDeclaration,this.state.startLoc,"declare"),r.declare=!0,this.parseVarStatement(r,"using",!0);break;case 96:if(this.isAwaitUsing())return this.raise(gt.InvalidModifierOnAwaitUsingDeclaration,this.state.startLoc,"declare"),r.declare=!0,this.next(),this.parseVarStatement(r,"await using",!0);break;case 129:{let n=this.tsParseInterfaceDeclaration(r,{declare:!0});if(n)return n}default:if(Qr(a))return this.tsParseDeclaration(r,this.state.type,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.type,!0,null)}tsParseDeclaration(r,a,n,s){switch(a){case 124:if(this.tsCheckLineTerminator(n)&&(this.match(80)||Qr(this.state.type)))return this.tsParseAbstractDeclaration(r,s);break;case 127:if(this.tsCheckLineTerminator(n)){if(this.match(134))return this.tsParseAmbientExternalModuleDeclaration(r);if(Qr(this.state.type))return r.kind="module",this.tsParseModuleOrNamespaceDeclaration(r)}break;case 128:if(this.tsCheckLineTerminator(n)&&Qr(this.state.type))return r.kind="namespace",this.tsParseModuleOrNamespaceDeclaration(r);break;case 130:if(this.tsCheckLineTerminator(n)&&Qr(this.state.type))return this.tsParseTypeAliasDeclaration(r);break}}tsCheckLineTerminator(r){return r?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(r){if(!this.match(47))return;let a=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let n=this.tsTryParseAndCatch(()=>{let s=this.startNodeAt(r);return s.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(s),s.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),s});if(this.state.maybeInArrowParameters=a,!!n)return super.parseArrowExpression(n,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let r=this.startNode();return r.params=this.tsInType(()=>this.tsInTopLevelContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),r.params.length===0?this.raise(gt.EmptyTypeArguments,r):!this.state.inType&&this.curContext()===Gr.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(r,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return roe(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseBindingElement(r,a){let n=a.length?a[0].loc.start:this.state.startLoc,s={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},s);let i=s.accessibility,o=s.override,l=s.readonly;!(r&4)&&(i||l||o)&&this.raise(gt.UnexpectedParameterModifier,n);let c=this.parseMaybeDefault();r&2&&this.parseFunctionParamType(c);let u=this.parseMaybeDefault(c.loc.start,c);if(i||l||o){let d=this.startNodeAt(n);return a.length&&(d.decorators=a),i&&(d.accessibility=i),l&&(d.readonly=l),o&&(d.override=o),u.type!=="Identifier"&&u.type!=="AssignmentPattern"&&this.raise(gt.UnsupportedParameterPropertyKind,d),d.parameter=u,this.finishNode(d,"TSParameterProperty")}return a.length&&(c.decorators=a),u}isSimpleParameter(r){return r.type==="TSParameterProperty"&&super.isSimpleParameter(r.parameter)||super.isSimpleParameter(r)}tsDisallowOptionalPattern(r){for(let a of r.params)a.type!=="Identifier"&&a.optional&&!this.state.isAmbientContext&&this.raise(gt.PatternIsOptional,a)}setArrowFunctionParameters(r,a,n){super.setArrowFunctionParameters(r,a,n),this.tsDisallowOptionalPattern(r)}parseFunctionBodyAndFinish(r,a,n=!1){this.match(14)&&(r.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let s=a==="FunctionDeclaration"?"TSDeclareFunction":a==="ClassMethod"||a==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return s&&!this.match(5)&&this.isLineTerminator()?this.finishNode(r,s):s==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(gt.DeclareFunctionHasImplementation,r),r.declare)?super.parseFunctionBodyAndFinish(r,s,n):(this.tsDisallowOptionalPattern(r),super.parseFunctionBodyAndFinish(r,a,n))}registerFunctionStatementId(r){!r.body&&r.id?this.checkIdentifier(r.id,1024):super.registerFunctionStatementId(r)}tsCheckForInvalidTypeCasts(r){r.forEach(a=>{a?.type==="TSTypeCastExpression"&&this.raise(gt.UnexpectedTypeAnnotation,a.typeAnnotation)})}toReferencedList(r,a){return this.tsCheckForInvalidTypeCasts(r),r}parseArrayLike(r,a,n){let s=super.parseArrayLike(r,a,n);return s.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(s.elements),s}parseSubscript(r,a,n,s){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let o=this.startNodeAt(a);return o.expression=r,this.finishNode(o,"TSNonNullExpression")}let i=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(n)return s.stop=!0,r;s.optionalChainMember=i=!0,this.next()}if(this.match(47)||this.match(51)){let o,l=this.tsTryParseAndCatch(()=>{if(!n&&this.atPossibleAsyncArrow(r)){let f=this.tsTryParseGenericAsyncArrowFunction(a);if(f)return s.stop=!0,f}let c=this.tsParseTypeArgumentsInExpression();if(!c)return;if(i&&!this.match(10)){o=this.state.curPosition();return}if(ww(this.state.type)){let f=super.parseTaggedTemplateExpression(r,a,s);return f.typeParameters=c,f}if(!n&&this.eat(10)){let f=this.startNodeAt(a);return f.callee=r,f.arguments=this.parseCallExpressionArguments(),this.tsCheckForInvalidTypeCasts(f.arguments),f.typeParameters=c,s.optionalChainMember&&(f.optional=i),this.finishCallExpression(f,s.optionalChainMember)}let u=this.state.type;if(u===48||u===52||u!==10&&i0(u)&&!this.hasPrecedingLineBreak())return;let d=this.startNodeAt(a);return d.expression=r,d.typeParameters=c,this.finishNode(d,"TSInstantiationExpression")});if(o&&this.unexpected(o,10),l)return l.type==="TSInstantiationExpression"&&((this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(gt.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),!this.match(16)&&!this.match(18)&&(l.expression=super.stopParseSubscript(r,s))),l}return super.parseSubscript(r,a,n,s)}parseNewCallee(r){var a;super.parseNewCallee(r);let{callee:n}=r;n.type==="TSInstantiationExpression"&&!((a=n.extra)!=null&&a.parenthesized)&&(r.typeParameters=n.typeParameters,r.callee=n.expression)}parseExprOp(r,a,n){let s;if(vw(58)>n&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(s=this.isContextual(120)))){let i=this.startNodeAt(a);return i.expression=r,i.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(s&&this.raise(X.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(i,s?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(i,a,n)}return super.parseExprOp(r,a,n)}checkReservedWord(r,a,n,s){this.state.isAmbientContext||super.checkReservedWord(r,a,n,s)}checkImportReflection(r){super.checkImportReflection(r),r.module&&r.importKind!=="value"&&this.raise(gt.ImportReflectionHasImportType,r.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(r){if(super.isPotentialImportPhase(r))return!0;if(this.isContextual(130)){let a=this.lookaheadCharCode();return r?a===123||a===42:a!==61}return!r&&this.isContextual(87)}applyImportPhase(r,a,n,s){super.applyImportPhase(r,a,n,s),a?r.exportKind=n==="type"?"type":"value":r.importKind=n==="type"||n==="typeof"?n:"value"}parseImport(r){if(this.match(134))return r.importKind="value",super.parseImport(r);let a;if(Qr(this.state.type)&&this.lookaheadCharCode()===61)return r.importKind="value",this.tsParseImportEqualsDeclaration(r);if(this.isContextual(130)){let n=this.parseMaybeImportPhase(r,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(r,n);a=super.parseImportSpecifiersAndAfter(r,n)}else a=super.parseImport(r);return a.importKind==="type"&&a.specifiers.length>1&&a.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(gt.TypeImportCannotSpecifyDefaultAndNamed,a),a}parseExport(r,a){if(this.match(83)){let n=r;this.next();let s=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?s=this.parseMaybeImportPhase(n,!1):n.importKind="value",this.tsParseImportEqualsDeclaration(n,s,!0)}else if(this.eat(29)){let n=r;return n.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(n,"TSExportAssignment")}else if(this.eatContextual(93)){let n=r;return this.expectContextual(128),n.id=this.parseIdentifier(),this.semicolon(),this.finishNode(n,"TSNamespaceExportDeclaration")}else return super.parseExport(r,a)}isAbstractClass(){return this.isContextual(124)&&this.isLookaheadContextual("class")}parseExportDefaultExpression(){if(this.isAbstractClass()){let r=this.startNode();return this.next(),r.abstract=!0,this.parseClass(r,!0,!0)}if(this.match(129)){let r=this.tsParseInterfaceDeclaration(this.startNode());if(r)return r}return super.parseExportDefaultExpression()}parseVarStatement(r,a,n=!1){let{isAmbientContext:s}=this.state,i=super.parseVarStatement(r,a,n||s);if(!s)return i;if(!r.declare&&(a==="using"||a==="await using"))return this.raiseOverwrite(gt.UsingDeclarationInAmbientContext,r,a),i;for(let{id:o,init:l}of i.declarations)l&&(a==="var"||a==="let"||o.typeAnnotation?this.raise(gt.InitializerNotAllowedInAmbientContext,l):Foe(l,this.hasPlugin("estree"))||this.raise(gt.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,l));return i}parseStatementContent(r,a){if(!this.state.containsEsc)switch(this.state.type){case 75:{if(this.isLookaheadContextual("enum")){let n=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(n,{const:!0})}break}case 124:case 125:{if(this.nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine()){let n=this.state.type,s=this.startNode();this.next();let i=n===125?this.tsTryParseDeclare(s):this.tsParseAbstractDeclaration(s,a);return i?(n===125&&(i.declare=!0),i):(s.expression=this.createIdentifier(this.startNodeAt(s.loc.start),n===125?"declare":"abstract"),this.semicolon(!1),this.finishNode(s,"ExpressionStatement"))}break}case 126:return this.tsParseEnumDeclaration(this.startNode());case 112:{if(this.lookaheadCharCode()===123){let s=this.startNode();return this.tsParseAmbientExternalModuleDeclaration(s)}break}case 129:{let n=this.tsParseInterfaceDeclaration(this.startNode());if(n)return n;break}case 127:{if(this.nextTokenIsIdentifierOrStringLiteralOnSameLine()){let n=this.startNode();return this.next(),this.tsParseDeclaration(n,127,!1,a)}break}case 128:{if(this.nextTokenIsIdentifierOnSameLine()){let n=this.startNode();return this.next(),this.tsParseDeclaration(n,128,!1,a)}break}case 130:{if(this.nextTokenIsIdentifierOnSameLine()){let n=this.startNode();return this.next(),this.tsParseTypeAliasDeclaration(n)}break}}return super.parseStatementContent(r,a)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(r,a){return a.some(n=>$B(n)?r.accessibility===n:!!r[n])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(r,a,n){let s=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:s,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:gt.InvalidModifierOnTypeParameterPositions},a);let i=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(a,s)&&this.raise(gt.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(r,a)):this.parseClassMemberWithIsStatic(r,a,n,!!a.static)};a.declare?this.tsInAmbientContext(i):i()}parseClassMemberWithIsStatic(r,a,n,s){let i=this.tsTryParseIndexSignature(a);if(i){r.body.push(i),a.abstract&&this.raise(gt.IndexSignatureHasAbstract,a),a.accessibility&&this.raise(gt.IndexSignatureHasAccessibility,a,{modifier:a.accessibility}),a.declare&&this.raise(gt.IndexSignatureHasDeclare,a),a.override&&this.raise(gt.IndexSignatureHasOverride,a);return}!this.state.inAbstractClass&&a.abstract&&this.raise(gt.NonAbstractClassHasAbstractMethod,a),a.override&&(n.hadSuperClass||this.raise(gt.OverrideNotInSubClass,a)),super.parseClassMemberWithIsStatic(r,a,n,s)}parsePostMemberNameModifiers(r){this.eat(17)&&(r.optional=!0),r.readonly&&this.match(10)&&this.raise(gt.ClassMethodHasReadonly,r),r.declare&&this.match(10)&&this.raise(gt.ClassMethodHasDeclare,r)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(r,a,n){if(!this.match(17))return r;if(this.state.maybeInArrowParameters){let s=this.lookaheadCharCode();if(s===44||s===61||s===58||s===41)return this.setOptionalParametersError(n),r}return super.parseConditional(r,a,n)}parseParenItem(r,a){let n=super.parseParenItem(r,a);if(this.eat(17)&&(n.optional=!0,this.resetEndLocation(r)),this.match(14)){let s=this.startNodeAt(a);return s.expression=r,s.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(s,"TSTypeCastExpression")}return r}parseExportDeclaration(r){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(r));let a=this.state.startLoc,n=this.eatContextual(125);if(n&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(gt.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let i=Qr(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(r);return i?((i.type==="TSInterfaceDeclaration"||i.type==="TSTypeAliasDeclaration"||n)&&(r.exportKind="type"),n&&i.type!=="TSImportEqualsDeclaration"&&(this.resetStartLocation(i,a),i.declare=!0),i):null}parseClassId(r,a,n,s){if((!a||n)&&this.isContextual(113))return;super.parseClassId(r,a,n,r.declare?1024:8331);let i=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);i&&(r.typeParameters=i)}parseClassPropertyAnnotation(r){r.optional||(this.eat(35)?r.definite=!0:this.eat(17)&&(r.optional=!0));let a=this.tsTryParseTypeAnnotation();a&&(r.typeAnnotation=a)}parseClassProperty(r){if(this.parseClassPropertyAnnotation(r),this.state.isAmbientContext&&!(r.readonly&&!r.typeAnnotation)&&this.match(29)&&this.raise(gt.DeclareClassFieldHasInitializer,this.state.startLoc),r.abstract&&this.match(29)){let{key:a}=r;this.raise(gt.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:a.type==="Identifier"&&!r.computed?a.name:`[${this.input.slice(this.offsetToSourcePos(a.start),this.offsetToSourcePos(a.end))}]`})}return super.parseClassProperty(r)}parseClassPrivateProperty(r){return r.abstract&&this.raise(gt.PrivateElementHasAbstract,r),r.accessibility&&this.raise(gt.PrivateElementHasAccessibility,r,{modifier:r.accessibility}),this.parseClassPropertyAnnotation(r),super.parseClassPrivateProperty(r)}parseClassAccessorProperty(r){return this.parseClassPropertyAnnotation(r),r.optional&&this.raise(gt.AccessorCannotBeOptional,r),super.parseClassAccessorProperty(r)}pushClassMethod(r,a,n,s,i,o){let l=this.tsTryParseTypeParameters(this.tsParseConstModifier);l&&i&&this.raise(gt.ConstructorHasTypeParameters,l);let{declare:c=!1,kind:u}=a;c&&(u==="get"||u==="set")&&this.raise(gt.DeclareAccessor,a,{kind:u}),l&&(a.typeParameters=l),super.pushClassMethod(r,a,n,s,i,o)}pushClassPrivateMethod(r,a,n,s){let i=this.tsTryParseTypeParameters(this.tsParseConstModifier);i&&(a.typeParameters=i),super.pushClassPrivateMethod(r,a,n,s)}declareClassPrivateMethodInScope(r,a){r.type!=="TSDeclareMethod"&&(r.type==="MethodDefinition"&&r.value.body==null||super.declareClassPrivateMethodInScope(r,a))}parseClassSuper(r){super.parseClassSuper(r),r.superClass&&(this.match(47)||this.match(51))&&(r.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(r.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(r,a,n,s,i,o,l){let c=this.tsTryParseTypeParameters(this.tsParseConstModifier);return c&&(r.typeParameters=c),super.parseObjPropValue(r,a,n,s,i,o,l)}parseFunctionParams(r,a){let n=this.tsTryParseTypeParameters(this.tsParseConstModifier);n&&(r.typeParameters=n),super.parseFunctionParams(r,a)}parseVarId(r,a){super.parseVarId(r,a),r.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(r.definite=!0);let n=this.tsTryParseTypeAnnotation();n&&(r.id.typeAnnotation=n,this.resetEndLocation(r.id))}parseAsyncArrowFromCallExpression(r,a){return this.match(14)&&(r.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(r,a)}parseMaybeAssign(r,a){var n,s,i,o,l;let c,u,d;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(c=this.state.clone(),u=this.tryParse(()=>super.parseMaybeAssign(r,a),c),!u.error)return u.node;let{context:m}=this.state,h=m[m.length-1];(h===Gr.j_oTag||h===Gr.j_expr)&&m.pop()}if(!((n=u)!=null&&n.error)&&!this.match(47))return super.parseMaybeAssign(r,a);(!c||c===this.state)&&(c=this.state.clone());let f,p=this.tryParse(m=>{var h,x;f=this.tsParseTypeParameters(this.tsParseConstModifier);let g=super.parseMaybeAssign(r,a);return(g.type!=="ArrowFunctionExpression"||(h=g.extra)!=null&&h.parenthesized)&&m(),((x=f)==null?void 0:x.params.length)!==0&&this.resetStartLocationFromNode(g,f),g.typeParameters=f,g},c);if(!p.error&&!p.aborted)return f&&this.reportReservedArrowTypeParam(f),p.node;if(!u&&(HB(!this.hasPlugin("jsx")),d=this.tryParse(()=>super.parseMaybeAssign(r,a),c),!d.error))return d.node;if((s=u)!=null&&s.node)return this.state=u.failState,u.node;if(p.node)return this.state=p.failState,f&&this.reportReservedArrowTypeParam(f),p.node;if((i=d)!=null&&i.node)return this.state=d.failState,d.node;throw((o=u)==null?void 0:o.error)||p.error||((l=d)==null?void 0:l.error)}reportReservedArrowTypeParam(r){var a;r.params.length===1&&!r.params[0].constraint&&!((a=r.extra)!=null&&a.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(gt.ReservedArrowTypeParam,r)}parseMaybeUnary(r,a){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(r,a)}parseArrow(r){if(this.match(14)){let a=this.tryParse(n=>{let s=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&n(),s});if(a.aborted)return;a.thrown||(a.error&&(this.state=a.failState),r.returnType=a.node)}return super.parseArrow(r)}parseFunctionParamType(r){this.eat(17)&&(r.optional=!0);let a=this.tsTryParseTypeAnnotation();return a&&(r.typeAnnotation=a),this.resetEndLocation(r),r}isAssignable(r,a){switch(r.type){case"TSTypeCastExpression":return this.isAssignable(r.expression,a);case"TSParameterProperty":return!0;default:return super.isAssignable(r,a)}}toAssignable(r,a=!1){switch(r.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(r,a);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":a?this.expressionScope.recordArrowParameterBindingError(gt.UnexpectedTypeCastInParameter,r):this.raise(gt.UnexpectedTypeCastInParameter,r),this.toAssignable(r.expression,a);break;case"AssignmentExpression":!a&&r.left.type==="TSTypeCastExpression"&&(r.left=this.typeCastToParameter(r.left));default:super.toAssignable(r,a)}}toAssignableParenthesizedExpression(r,a){switch(r.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(r.expression,a);break;default:super.toAssignable(r,a)}}checkToRestConversion(r,a){switch(r.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(r.expression,!1);break;default:super.checkToRestConversion(r,a)}}isValidLVal(r,a,n,s){switch(r){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(s!==64||!n)&&["expression",!0];default:return super.isValidLVal(r,a,n,s)}}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(r,a){if(this.match(47)||this.match(51)){let n=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let s=super.parseMaybeDecoratorArguments(r,a);return s.typeParameters=n,s}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(r,a)}checkCommaAfterRest(r){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===r?(this.next(),!1):super.checkCommaAfterRest(r)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(r,a){let n=super.parseMaybeDefault(r,a);return n.type==="AssignmentPattern"&&n.typeAnnotation&&n.right.start<n.typeAnnotation.start&&this.raise(gt.TypeAnnotationAfterAssign,n.typeAnnotation),n}getTokenFromCode(r){if(this.state.inType){if(r===62){this.finishOp(48,1);return}if(r===60){this.finishOp(47,1);return}}super.getTokenFromCode(r)}reScan_lt_gt(){let{type:r}=this.state;r===47?(this.state.pos-=1,this.readToken_lt()):r===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:r}=this.state;return r===51?(this.state.pos-=2,this.finishOp(47,1),47):r}toAssignableListItem(r,a,n){let s=r[a];s.type==="TSTypeCastExpression"&&(r[a]=this.typeCastToParameter(s)),super.toAssignableListItem(r,a,n)}typeCastToParameter(r){return r.expression.typeAnnotation=r.typeAnnotation,this.resetEndLocation(r.expression,r.typeAnnotation.loc.end),r.expression}shouldParseArrow(r){return this.match(14)?r.every(a=>this.isAssignable(a,!0)):super.shouldParseArrow(r)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(r){if(this.match(47)||this.match(51)){let a=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());a&&(r.typeParameters=a)}return super.jsxParseOpeningElementAfterName(r)}getGetterSetterExpectedParamCount(r){let a=super.getGetterSetterExpectedParamCount(r),s=this.getObjectOrClassMethodParams(r)[0];return s&&this.isThisParam(s)?a+1:a}parseCatchClauseParam(){let r=super.parseCatchClauseParam(),a=this.tsTryParseTypeAnnotation();return a&&(r.typeAnnotation=a,this.resetEndLocation(r)),r}tsInAmbientContext(r){let{isAmbientContext:a,strict:n}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return r()}finally{this.state.isAmbientContext=a,this.state.strict=n}}parseClass(r,a,n){let s=this.state.inAbstractClass;this.state.inAbstractClass=!!r.abstract;try{return super.parseClass(r,a,n)}finally{this.state.inAbstractClass=s}}tsParseAbstractDeclaration(r,a){if(this.match(80))return r.abstract=!0,this.maybeTakeDecorators(a,this.parseClass(r,!0,!1));if(this.isContextual(129))return this.hasFollowingLineBreak()?null:(r.abstract=!0,this.raise(gt.NonClassMethodPropertyHasAbstractModifier,r),this.tsParseInterfaceDeclaration(r));throw this.unexpected(null,80)}parseMethod(r,a,n,s,i,o,l){let c=super.parseMethod(r,a,n,s,i,o,l);if((c.abstract||c.type==="TSAbstractMethodDefinition")&&(this.hasPlugin("estree")?c.value:c).body){let{key:f}=c;this.raise(gt.AbstractMethodHasImplementation,c,{methodName:f.type==="Identifier"&&!c.computed?f.name:`[${this.input.slice(this.offsetToSourcePos(f.start),this.offsetToSourcePos(f.end))}]`})}return c}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(r,a,n,s){return!a&&s?(this.parseTypeOnlyImportExportSpecifier(r,!1,n),this.finishNode(r,"ExportSpecifier")):(r.exportKind="value",super.parseExportSpecifier(r,a,n,s))}parseImportSpecifier(r,a,n,s,i){return!a&&s?(this.parseTypeOnlyImportExportSpecifier(r,!0,n),this.finishNode(r,"ImportSpecifier")):(r.importKind="value",super.parseImportSpecifier(r,a,n,s,n?4098:4096))}parseTypeOnlyImportExportSpecifier(r,a,n){let s=a?"imported":"local",i=a?"local":"exported",o=r[s],l,c=!1,u=!0,d=o.loc.start;if(this.isContextual(93)){let p=this.parseIdentifier();if(this.isContextual(93)){let m=this.parseIdentifier();Vl(this.state.type)?(c=!0,o=p,l=a?this.parseIdentifier():this.parseModuleExportName(),u=!1):(l=m,u=!1)}else Vl(this.state.type)?(u=!1,l=a?this.parseIdentifier():this.parseModuleExportName()):(c=!0,o=p)}else Vl(this.state.type)&&(c=!0,a?(o=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(o.name,o.loc.start,!0,!0)):o=this.parseModuleExportName());c&&n&&this.raise(a?gt.TypeModifierIsUsedInTypeImports:gt.TypeModifierIsUsedInTypeExports,d),r[s]=o,r[i]=l;let f=a?"importKind":"exportKind";r[f]=c?"type":"value",u&&this.eatContextual(93)&&(r[i]=a?this.parseIdentifier():this.parseModuleExportName()),r[i]||(r[i]=this.cloneIdentifier(r[s])),a&&this.checkIdentifier(r[i],c?4098:4096)}fillOptionalPropertiesForTSESLint(r){var a,n,s,i,o,l,c,u,d,f,p,m,h,x,g,y,b,S,w,P,C,I,R,O,D,W,J,me,Z,q,V,L,k,_,ee,ie,ae,ge,ue,$,A,K,he,H,xe,Pe,Ie,Ve;switch(r.type){case"ExpressionStatement":(a=r.directive)!=null||(r.directive=void 0);return;case"RestElement":r.value=void 0;case"Identifier":case"ArrayPattern":case"AssignmentPattern":case"ObjectPattern":(n=r.decorators)!=null||(r.decorators=[]),(s=r.optional)!=null||(r.optional=!1),(i=r.typeAnnotation)!=null||(r.typeAnnotation=void 0);return;case"TSParameterProperty":(o=r.accessibility)!=null||(r.accessibility=void 0),(l=r.decorators)!=null||(r.decorators=[]),(c=r.override)!=null||(r.override=!1),(u=r.readonly)!=null||(r.readonly=!1),(d=r.static)!=null||(r.static=!1);return;case"TSEmptyBodyFunctionExpression":r.body=null;case"TSDeclareFunction":case"FunctionDeclaration":case"FunctionExpression":case"ClassMethod":case"ClassPrivateMethod":(f=r.declare)!=null||(r.declare=!1),(p=r.returnType)!=null||(r.returnType=void 0),(m=r.typeParameters)!=null||(r.typeParameters=void 0);return;case"Property":(h=r.optional)!=null||(r.optional=!1);return;case"TSMethodSignature":case"TSPropertySignature":(x=r.optional)!=null||(r.optional=!1);case"TSIndexSignature":(g=r.accessibility)!=null||(r.accessibility=void 0),(y=r.readonly)!=null||(r.readonly=!1),(b=r.static)!=null||(r.static=!1);return;case"TSAbstractPropertyDefinition":case"PropertyDefinition":case"TSAbstractAccessorProperty":case"AccessorProperty":(S=r.declare)!=null||(r.declare=!1),(w=r.definite)!=null||(r.definite=!1),(P=r.readonly)!=null||(r.readonly=!1),(C=r.typeAnnotation)!=null||(r.typeAnnotation=void 0);case"TSAbstractMethodDefinition":case"MethodDefinition":(I=r.accessibility)!=null||(r.accessibility=void 0),(R=r.decorators)!=null||(r.decorators=[]),(O=r.override)!=null||(r.override=!1),(D=r.optional)!=null||(r.optional=!1);return;case"ClassExpression":(W=r.id)!=null||(r.id=null);case"ClassDeclaration":(J=r.abstract)!=null||(r.abstract=!1),(me=r.declare)!=null||(r.declare=!1),(Z=r.decorators)!=null||(r.decorators=[]),(q=r.implements)!=null||(r.implements=[]),(V=r.superTypeArguments)!=null||(r.superTypeArguments=void 0),(L=r.typeParameters)!=null||(r.typeParameters=void 0);return;case"TSTypeAliasDeclaration":case"VariableDeclaration":(k=r.declare)!=null||(r.declare=!1);return;case"VariableDeclarator":(_=r.definite)!=null||(r.definite=!1);return;case"TSEnumDeclaration":(ee=r.const)!=null||(r.const=!1),(ie=r.declare)!=null||(r.declare=!1);return;case"TSEnumMember":(ae=r.computed)!=null||(r.computed=!1);return;case"TSImportType":(ge=r.qualifier)!=null||(r.qualifier=null),(ue=r.options)!=null||(r.options=null);return;case"TSInterfaceDeclaration":($=r.declare)!=null||(r.declare=!1),(A=r.extends)!=null||(r.extends=[]);return;case"TSMappedType":(K=r.optional)!=null||(r.optional=!1),(he=r.readonly)!=null||(r.readonly=void 0);return;case"TSModuleDeclaration":(H=r.declare)!=null||(r.declare=!1),(xe=r.global)!=null||(r.global=r.kind==="global");return;case"TSTypeParameter":(Pe=r.const)!=null||(r.const=!1),(Ie=r.in)!=null||(r.in=!1),(Ve=r.out)!=null||(r.out=!1);return}}chStartsBindingIdentifierAndNotRelationalOperator(r,a){if(wc(r)){if(aN.lastIndex=a,aN.test(this.input)){let n=this.codePointAtPos(aN.lastIndex);if(!em(n)&&n!==92)return!1}return!0}else return r===92}nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine(){let r=this.nextTokenInLineStart(),a=this.codePointAtPos(r);return this.chStartsBindingIdentifierAndNotRelationalOperator(a,r)}nextTokenIsIdentifierOrStringLiteralOnSameLine(){let r=this.nextTokenInLineStart(),a=this.codePointAtPos(r);return this.chStartsBindingIdentifier(a,r)||a===34||a===39}};function Ooe(e){if(e.type!=="MemberExpression")return!1;let{computed:t,property:r}=e;return t&&r.type!=="StringLiteral"&&(r.type!=="TemplateLiteral"||r.expressions.length>0)?!1:l4(e.object)}function Foe(e,t){var r;let{type:a}=e;if((r=e.extra)!=null&&r.parenthesized)return!1;if(t){if(a==="Literal"){let{value:n}=e;if(typeof n=="string"||typeof n=="boolean")return!0}}else if(a==="StringLiteral"||a==="BooleanLiteral")return!0;return!!(o4(e,t)||Boe(e,t)||a==="TemplateLiteral"&&e.expressions.length===0||Ooe(e))}function o4(e,t){return t?e.type==="Literal"&&(typeof e.value=="number"||"bigint"in e):e.type==="NumericLiteral"||e.type==="BigIntLiteral"}function Boe(e,t){if(e.type==="UnaryExpression"){let{operator:r,argument:a}=e;if(r==="-"&&o4(a,t))return!0}return!1}function l4(e){return e.type==="Identifier"?!0:e.type!=="MemberExpression"||e.computed?!1:l4(e.object)}var GB=Tc`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),Uoe=e=>class extends e{parsePlaceholder(r){if(this.match(133)){let a=this.startNode();return this.next(),this.assertNoSpace(),a.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(133),this.finishPlaceholder(a,r)}}finishPlaceholder(r,a){let n=r;return(!n.expectedNode||!n.type)&&(n=this.finishNode(n,"Placeholder")),n.expectedNode=a,n}getTokenFromCode(r){r===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(133,2):super.getTokenFromCode(r)}parseExprAtom(r){return this.parsePlaceholder("Expression")||super.parseExprAtom(r)}parseIdentifier(r){return this.parsePlaceholder("Identifier")||super.parseIdentifier(r)}checkReservedWord(r,a,n,s){r!==void 0&&super.checkReservedWord(r,a,n,s)}cloneIdentifier(r){let a=super.cloneIdentifier(r);return a.type==="Placeholder"&&(a.expectedNode=r.expectedNode),a}cloneStringLiteral(r){return r.type==="Placeholder"?this.cloneIdentifier(r):super.cloneStringLiteral(r)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(r,a,n,s){return r==="Placeholder"||super.isValidLVal(r,a,n,s)}toAssignable(r,a){r&&r.type==="Placeholder"&&r.expectedNode==="Expression"?r.expectedNode="Pattern":super.toAssignable(r,a)}chStartsBindingIdentifier(r,a){if(super.chStartsBindingIdentifier(r,a))return!0;let n=this.nextTokenStart();return this.input.charCodeAt(n)===37&&this.input.charCodeAt(n+1)===37}verifyBreakContinue(r,a){r.label&&r.label.type==="Placeholder"||super.verifyBreakContinue(r,a)}parseExpressionStatement(r,a){var n;if(a.type!=="Placeholder"||(n=a.extra)!=null&&n.parenthesized)return super.parseExpressionStatement(r,a);if(this.match(14)){let i=r;return i.label=this.finishPlaceholder(a,"Identifier"),this.next(),i.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(i,"LabeledStatement")}this.semicolon();let s=r;return s.name=a.name,this.finishPlaceholder(s,"Statement")}parseBlock(r,a,n){return this.parsePlaceholder("BlockStatement")||super.parseBlock(r,a,n)}parseFunctionId(r){return this.parsePlaceholder("Identifier")||super.parseFunctionId(r)}parseClass(r,a,n){let s=a?"ClassDeclaration":"ClassExpression";this.next();let i=this.state.strict,o=this.parsePlaceholder("Identifier");if(o)if(this.match(81)||this.match(133)||this.match(5))r.id=o;else{if(n||!a)return r.id=null,r.body=this.finishPlaceholder(o,"ClassBody"),this.finishNode(r,s);throw this.raise(GB.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(r,a,n);return super.parseClassSuper(r),r.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!r.superClass,i),this.finishNode(r,s)}parseExport(r,a){let n=this.parsePlaceholder("Identifier");if(!n)return super.parseExport(r,a);let s=r;if(!this.isContextual(98)&&!this.match(12))return s.specifiers=[],s.source=null,s.declaration=this.finishPlaceholder(n,"Declaration"),this.finishNode(s,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let i=this.startNode();return i.exported=n,s.specifiers=[this.finishNode(i,"ExportDefaultSpecifier")],super.parseExport(s,a)}isExportDefaultSpecifier(){if(this.match(65)){let r=this.nextTokenStart();if(this.isUnparsedContextual(r,"from")&&this.input.startsWith(Yd(133),this.nextTokenStartSince(r+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(r,a){var n;return(n=r.specifiers)!=null&&n.length?!0:super.maybeParseExportDefaultSpecifier(r,a)}checkExport(r){let{specifiers:a}=r;a!=null&&a.length&&(r.specifiers=a.filter(n=>n.exported.type==="Placeholder")),super.checkExport(r),r.specifiers=a}parseImport(r){let a=this.parsePlaceholder("Identifier");if(!a)return super.parseImport(r);if(r.specifiers=[],!this.isContextual(98)&&!this.match(12))return r.source=this.finishPlaceholder(a,"StringLiteral"),this.semicolon(),this.finishNode(r,"ImportDeclaration");let n=this.startNodeAtNode(a);return n.local=a,r.specifiers.push(this.finishNode(n,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(r)||this.parseNamedImportSpecifiers(r)),this.expectContextual(98),r.source=this.parseImportSource(),this.semicolon(),this.finishNode(r,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.offsetToSourcePos(this.state.lastTokEndLoc.index)&&this.raise(GB.UnexpectedSpace,this.state.lastTokEndLoc)}},joe=e=>class extends e{parseV8Intrinsic(){if(this.match(54)){let r=this.state.startLoc,a=this.startNode();if(this.next(),Qr(this.state.type)){let n=this.parseIdentifierName(),s=this.createIdentifier(a,n);if(this.castNodeTo(s,"V8IntrinsicIdentifier"),this.match(10))return s}this.unexpected(r)}}parseExprAtom(r){return this.parseV8Intrinsic()||super.parseExprAtom(r)}},KB=["minimal","fsharp","hack","smart"],WB=["^^","@@","^","%","#"];function zoe(e){if(e.has("decorators")){if(e.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let a=e.get("decorators").decoratorsBeforeExport;if(a!=null&&typeof a!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let n=e.get("decorators").allowCallParenthesized;if(n!=null&&typeof n!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(e.has("flow")&&e.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(e.has("placeholders")&&e.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(e.has("pipelineOperator")){var t;let a=e.get("pipelineOperator").proposal;if(!KB.includes(a)){let n=KB.map(s=>`"${s}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${n}.`)}if(a==="hack"){if(e.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(e.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let n=e.get("pipelineOperator").topicToken;if(!WB.includes(n)){let s=WB.map(i=>`"${i}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${s}.`)}{var r;if(n==="#"&&((r=e.get("recordAndTuple"))==null?void 0:r.syntaxType)==="hash")throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",e.get("recordAndTuple")])}\`.`)}}else if(a==="smart"&&((t=e.get("recordAndTuple"))==null?void 0:t.syntaxType)==="hash")throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",e.get("recordAndTuple")])}\`.`)}if(e.has("moduleAttributes")){if(e.has("deprecatedImportAssert")||e.has("importAssertions"))throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");if(e.get("moduleAttributes").version!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(e.has("importAssertions")&&e.has("deprecatedImportAssert"))throw new Error("Cannot combine importAssertions and deprecatedImportAssert plugins.");if(!e.has("deprecatedImportAssert")&&e.has("importAttributes")&&e.get("importAttributes").deprecatedAssertSyntax&&e.set("deprecatedImportAssert",{}),e.has("recordAndTuple")){let a=e.get("recordAndTuple").syntaxType;if(a!=null){let n=["hash","bar"];if(!n.includes(a))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+n.map(s=>`'${s}'`).join(", "))}}if(e.has("asyncDoExpressions")&&!e.has("doExpressions")){let a=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw a.missingPlugins="doExpressions",a}if(e.has("optionalChainingAssign")&&e.get("optionalChainingAssign").version!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.");if(e.has("discardBinding")&&e.get("discardBinding").syntaxType!=="void")throw new Error("The 'discardBinding' plugin requires a 'syntaxType' option. Currently the only supported value is 'void'.")}var c4={estree:$ie,jsx:woe,flow:boe,typescript:_oe,v8intrinsic:joe,placeholders:Uoe},Voe=Object.keys(c4),CN=class extends wN{checkProto(t,r,a,n){if(t.type==="SpreadElement"||this.isObjectMethod(t)||t.computed||t.shorthand)return a;let s=t.key;return(s.type==="Identifier"?s.name:s.value)==="__proto__"?r?(this.raise(X.RecordNoProto,s),!0):(a&&(n?n.doubleProtoLoc===null&&(n.doubleProtoLoc=s.loc.start):this.raise(X.DuplicateProto,s)),!0):a}shouldExitDescending(t,r){return t.type==="ArrowFunctionExpression"&&this.offsetToSourcePos(t.start)===r}getExpression(){if(this.enterInitialScopes(),this.nextToken(),this.match(140))throw this.raise(X.ParseExpressionEmptyInput,this.state.startLoc);let t=this.parseExpression();if(!this.match(140))throw this.raise(X.ParseExpressionExpectsEOF,this.state.startLoc,{unexpected:this.input.codePointAt(this.state.start)});return this.finalizeRemainingComments(),t.comments=this.comments,t.errors=this.state.errors,this.optionFlags&256&&(t.tokens=this.tokens),t}parseExpression(t,r){return t?this.disallowInAnd(()=>this.parseExpressionBase(r)):this.allowInAnd(()=>this.parseExpressionBase(r))}parseExpressionBase(t){let r=this.state.startLoc,a=this.parseMaybeAssign(t);if(this.match(12)){let n=this.startNodeAt(r);for(n.expressions=[a];this.eat(12);)n.expressions.push(this.parseMaybeAssign(t));return this.toReferencedList(n.expressions),this.finishNode(n,"SequenceExpression")}return a}parseMaybeAssignDisallowIn(t,r){return this.disallowInAnd(()=>this.parseMaybeAssign(t,r))}parseMaybeAssignAllowIn(t,r){return this.allowInAnd(()=>this.parseMaybeAssign(t,r))}setOptionalParametersError(t){t.optionalParametersLoc=this.state.startLoc}parseMaybeAssign(t,r){let a=this.state.startLoc,n=this.isContextual(108);if(n&&this.prodParam.hasYield){this.next();let l=this.parseYield(a);return r&&(l=r.call(this,l,a)),l}let s;t?s=!1:(t=new Sg,s=!0);let{type:i}=this.state;(i===10||Qr(i))&&(this.state.potentialArrowAt=this.state.start);let o=this.parseMaybeConditional(t);if(r&&(o=r.call(this,o,a)),Yie(this.state.type)){let l=this.startNodeAt(a),c=this.state.value;if(l.operator=c,this.match(29)){this.toAssignable(o,!0),l.left=o;let u=a.index;t.doubleProtoLoc!=null&&t.doubleProtoLoc.index>=u&&(t.doubleProtoLoc=null),t.shorthandAssignLoc!=null&&t.shorthandAssignLoc.index>=u&&(t.shorthandAssignLoc=null),t.privateKeyLoc!=null&&t.privateKeyLoc.index>=u&&(this.checkDestructuringPrivate(t),t.privateKeyLoc=null),t.voidPatternLoc!=null&&t.voidPatternLoc.index>=u&&(t.voidPatternLoc=null)}else l.left=o;return this.next(),l.right=this.parseMaybeAssign(),this.checkLVal(o,this.finishNode(l,"AssignmentExpression"),void 0,void 0,void 0,void 0,c==="||="||c==="&&="||c==="??="),l}else s&&this.checkExpressionErrors(t,!0);if(n){let{type:l}=this.state;if((this.hasPlugin("v8intrinsic")?i0(l):i0(l)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(X.YieldNotInGeneratorFunction,a),this.parseYield(a)}return o}parseMaybeConditional(t){let r=this.state.startLoc,a=this.state.potentialArrowAt,n=this.parseExprOps(t);return this.shouldExitDescending(n,a)?n:this.parseConditional(n,r,t)}parseConditional(t,r,a){if(this.eat(17)){let n=this.startNodeAt(r);return n.test=t,n.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),n.alternate=this.parseMaybeAssign(),this.finishNode(n,"ConditionalExpression")}return t}parseMaybeUnaryOrPrivate(t){return this.match(139)?this.parsePrivateName():this.parseMaybeUnary(t)}parseExprOps(t){let r=this.state.startLoc,a=this.state.potentialArrowAt,n=this.parseMaybeUnaryOrPrivate(t);return this.shouldExitDescending(n,a)?n:this.parseExprOp(n,r,-1)}parseExprOp(t,r,a){if(this.isPrivateName(t)){let s=this.getPrivateNameSV(t);(a>=vw(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(X.PrivateInExpectedIn,t,{identifierName:s}),this.classScope.usePrivateName(s,t.loc.start)}let n=this.state.type;if(Qie(n)&&(this.prodParam.hasIn||!this.match(58))){let s=vw(n);if(s>a){if(n===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return t;this.checkPipelineAtInfixOperator(t,r)}let i=this.startNodeAt(r);i.left=t,i.operator=this.state.value;let o=n===41||n===42,l=n===40;if(l&&(s=vw(42)),this.next(),n===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(X.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);i.right=this.parseExprOpRightExpr(n,s);let c=this.finishNode(i,o||l?"LogicalExpression":"BinaryExpression"),u=this.state.type;if(l&&(u===41||u===42)||o&&u===40)throw this.raise(X.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(c,r,a)}}return t}parseExprOpRightExpr(t,r){let a=this.state.startLoc;switch(t){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(r))}if(this.getPluginOption("pipelineOperator","proposal")==="smart")return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(X.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(t,r),a)});default:return this.parseExprOpBaseRightExpr(t,r)}}parseExprOpBaseRightExpr(t,r){let a=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),a,aoe(t)?r-1:r)}parseHackPipeBody(){var t;let{startLoc:r}=this.state,a=this.parseMaybeAssign();return Bie.has(a.type)&&!((t=a.extra)!=null&&t.parenthesized)&&this.raise(X.PipeUnparenthesizedBody,r,{type:a.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(X.PipeTopicUnused,r),a}checkExponentialAfterUnary(t){this.match(57)&&this.raise(X.UnexpectedTokenUnaryExponentiation,t.argument)}parseMaybeUnary(t,r){let a=this.state.startLoc,n=this.isContextual(96);if(n&&this.recordAwaitIfAllowed()){this.next();let l=this.parseAwait(a);return r||this.checkExponentialAfterUnary(l),l}let s=this.match(34),i=this.startNode();if(eoe(this.state.type)){i.operator=this.state.value,i.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let l=this.match(89);if(this.next(),i.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(t,!0),this.state.strict&&l){let c=i.argument;c.type==="Identifier"?this.raise(X.StrictDelete,i):this.hasPropertyAsPrivateName(c)&&this.raise(X.DeletePrivateField,i)}if(!s)return r||this.checkExponentialAfterUnary(i),this.finishNode(i,"UnaryExpression")}let o=this.parseUpdate(i,s,t);if(n){let{type:l}=this.state;if((this.hasPlugin("v8intrinsic")?i0(l):i0(l)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(X.AwaitNotInAsyncContext,a),this.parseAwait(a)}return o}parseUpdate(t,r,a){if(r){let i=t;return this.checkLVal(i.argument,this.finishNode(i,"UpdateExpression")),t}let n=this.state.startLoc,s=this.parseExprSubscripts(a);if(this.checkExpressionErrors(a,!1))return s;for(;Zie(this.state.type)&&!this.canInsertSemicolon();){let i=this.startNodeAt(n);i.operator=this.state.value,i.prefix=!1,i.argument=s,this.next(),this.checkLVal(s,s=this.finishNode(i,"UpdateExpression"))}return s}parseExprSubscripts(t){let r=this.state.startLoc,a=this.state.potentialArrowAt,n=this.parseExprAtom(t);return this.shouldExitDescending(n,a)?n:this.parseSubscripts(n,r)}parseSubscripts(t,r,a){let n={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(t),stop:!1};do t=this.parseSubscript(t,r,a,n),n.maybeAsyncArrow=!1;while(!n.stop);return t}parseSubscript(t,r,a,n){let{type:s}=this.state;if(!a&&s===15)return this.parseBind(t,r,a,n);if(ww(s))return this.parseTaggedTemplateExpression(t,r,n);let i=!1;if(s===18){if(a&&(this.raise(X.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return this.stopParseSubscript(t,n);n.optionalChainMember=i=!0,this.next()}if(!a&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(t,r,n,i);{let o=this.eat(0);return o||i||this.eat(16)?this.parseMember(t,r,n,o,i):this.stopParseSubscript(t,n)}}stopParseSubscript(t,r){return r.stop=!0,t}parseMember(t,r,a,n,s){let i=this.startNodeAt(r);return i.object=t,i.computed=n,n?(i.property=this.parseExpression(),this.expect(3)):this.match(139)?(t.type==="Super"&&this.raise(X.SuperPrivateField,r),this.classScope.usePrivateName(this.state.value,this.state.startLoc),i.property=this.parsePrivateName()):i.property=this.parseIdentifier(!0),a.optionalChainMember?(i.optional=s,this.finishNode(i,"OptionalMemberExpression")):this.finishNode(i,"MemberExpression")}parseBind(t,r,a,n){let s=this.startNodeAt(r);return s.object=t,this.next(),s.callee=this.parseNoCallExpr(),n.stop=!0,this.parseSubscripts(this.finishNode(s,"BindExpression"),r,a)}parseCoverCallAndAsyncArrowHead(t,r,a,n){let s=this.state.maybeInArrowParameters,i=null;this.state.maybeInArrowParameters=!0,this.next();let o=this.startNodeAt(r);o.callee=t;let{maybeAsyncArrow:l,optionalChainMember:c}=a;l&&(this.expressionScope.enter(Roe()),i=new Sg),c&&(o.optional=n),n?o.arguments=this.parseCallExpressionArguments():o.arguments=this.parseCallExpressionArguments(t.type!=="Super",o,i);let u=this.finishCallExpression(o,c);return l&&this.shouldParseAsyncArrow()&&!n?(a.stop=!0,this.checkDestructuringPrivate(i),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),u=this.parseAsyncArrowFromCallExpression(this.startNodeAt(r),u)):(l&&(this.checkExpressionErrors(i,!0),this.expressionScope.exit()),this.toReferencedArguments(u)),this.state.maybeInArrowParameters=s,u}toReferencedArguments(t,r){this.toReferencedListDeep(t.arguments,r)}parseTaggedTemplateExpression(t,r,a){let n=this.startNodeAt(r);return n.tag=t,n.quasi=this.parseTemplate(!0),a.optionalChainMember&&this.raise(X.OptionalChainingNoTemplate,r),this.finishNode(n,"TaggedTemplateExpression")}atPossibleAsyncArrow(t){return t.type==="Identifier"&&t.name==="async"&&this.state.lastTokEndLoc.index===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&this.offsetToSourcePos(t.start)===this.state.potentialArrowAt}finishCallExpression(t,r){if(t.callee.type==="Import")if(t.arguments.length===0||t.arguments.length>2)this.raise(X.ImportCallArity,t);else for(let a of t.arguments)a.type==="SpreadElement"&&this.raise(X.ImportCallSpreadArgument,a);return this.finishNode(t,r?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(t,r,a){let n=[],s=!0,i=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(11);){if(s)s=!1;else if(this.expect(12),this.match(11)){r&&this.addTrailingCommaExtraToNode(r),this.next();break}n.push(this.parseExprListItem(11,!1,a,t))}return this.state.inFSharpPipelineDirectBody=i,n}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(t,r){var a;return this.resetPreviousNodeTrailingComments(r),this.expect(19),this.parseArrowExpression(t,r.arguments,!0,(a=r.extra)==null?void 0:a.trailingCommaLoc),r.innerComments&&d0(t,r.innerComments),r.callee.trailingComments&&d0(t,r.callee.trailingComments),t}parseNoCallExpr(){let t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,!0)}parseExprAtom(t){let r,a=null,{type:n}=this.state;switch(n){case 79:return this.parseSuper();case 83:return r=this.startNode(),this.next(),this.match(16)?this.parseImportMetaPropertyOrPhaseCall(r):this.match(10)?this.optionFlags&512?this.parseImportCall(r):this.finishNode(r,"Import"):(this.raise(X.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(r,"Import"));case 78:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 135:return this.parseNumericLiteral(this.state.value);case 136:return this.parseBigIntLiteral(this.state.value);case 134:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let s=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(s)}case 0:return this.parseArrayLike(3,!1,t);case 5:return this.parseObjectLike(8,!1,!1,t);case 68:return this.parseFunctionOrFunctionSent();case 26:a=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(a,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{r=this.startNode(),this.next(),r.object=null;let s=r.callee=this.parseNoCallExpr();if(s.type==="MemberExpression")return this.finishNode(r,"BindExpression");throw this.raise(X.UnsupportedBind,s)}case 139:return this.raise(X.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let s=this.getPluginOption("pipelineOperator","proposal");if(s)return this.parseTopicReference(s);throw this.unexpected()}case 47:{let s=this.input.codePointAt(this.nextTokenStart());throw wc(s)||s===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected()}default:{if(n===137)return this.parseDecimalLiteral(this.state.value);if(n===2||n===1)return this.parseArrayLike(this.state.type===2?4:3,!0);if(n===6||n===7)return this.parseObjectLike(this.state.type===6?9:8,!1,!0)}if(Qr(n)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let s=this.state.potentialArrowAt===this.state.start,i=this.state.containsEsc,o=this.parseIdentifier();if(!i&&o.name==="async"&&!this.canInsertSemicolon()){let{type:l}=this.state;if(l===68)return this.resetPreviousNodeTrailingComments(o),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(o));if(Qr(l))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(o)):o;if(l===90)return this.resetPreviousNodeTrailingComments(o),this.parseDo(this.startNodeAtNode(o),!0)}return s&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(o),[o],!1)):o}else throw this.unexpected()}}parseTopicReferenceThenEqualsSign(t,r){let a=this.getPluginOption("pipelineOperator","proposal");if(a)return this.state.type=t,this.state.value=r,this.state.pos--,this.state.end--,this.state.endLoc=ui(this.state.endLoc,-1),this.parseTopicReference(a);throw this.unexpected()}parseTopicReference(t){let r=this.startNode(),a=this.state.startLoc,n=this.state.type;return this.next(),this.finishTopicReference(r,a,t,n)}finishTopicReference(t,r,a,n){if(this.testTopicReferenceConfiguration(a,r,n))return a==="hack"?(this.topicReferenceIsAllowedInCurrentContext()||this.raise(X.PipeTopicUnbound,r),this.registerTopicReference(),this.finishNode(t,"TopicReference")):(this.topicReferenceIsAllowedInCurrentContext()||this.raise(X.PrimaryTopicNotAllowed,r),this.registerTopicReference(),this.finishNode(t,"PipelinePrimaryTopicReference"));throw this.raise(X.PipeTopicUnconfiguredToken,r,{token:Yd(n)})}testTopicReferenceConfiguration(t,r,a){switch(t){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:Yd(a)}]);case"smart":return a===27;default:throw this.raise(X.PipeTopicRequiresHackPipes,r)}}parseAsyncArrowUnaryFunction(t){this.prodParam.enter(Sw(!0,this.prodParam.hasYield));let r=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(X.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(t,r,!0)}parseDo(t,r){this.expectPlugin("doExpressions"),r&&this.expectPlugin("asyncDoExpressions"),t.async=r,this.next();let a=this.state.labels;return this.state.labels=[],r?(this.prodParam.enter(2),t.body=this.parseBlock(),this.prodParam.exit()):t.body=this.parseBlock(),this.state.labels=a,this.finishNode(t,"DoExpression")}parseSuper(){let t=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper?this.optionFlags&16||this.raise(X.SuperNotAllowed,t):this.scope.allowSuper||this.optionFlags&16||this.raise(X.UnexpectedSuper,t),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(X.UnsupportedSuper,t),this.finishNode(t,"Super")}parsePrivateName(){let t=this.startNode(),r=this.startNodeAt(ui(this.state.startLoc,1)),a=this.state.value;return this.next(),t.id=this.createIdentifier(r,a),this.finishNode(t,"PrivateName")}parseFunctionOrFunctionSent(){let t=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let r=this.createIdentifier(this.startNodeAtNode(t),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(t,r,"sent")}return this.parseFunction(t)}parseMetaProperty(t,r,a){t.meta=r;let n=this.state.containsEsc;return t.property=this.parseIdentifier(!0),(t.property.name!==a||n)&&this.raise(X.UnsupportedMetaProperty,t.property,{target:r.name,onlyValidPropertyName:a}),this.finishNode(t,"MetaProperty")}parseImportMetaPropertyOrPhaseCall(t){if(this.next(),this.isContextual(105)||this.isContextual(97)){let r=this.isContextual(105);return this.expectPlugin(r?"sourcePhaseImports":"deferredImportEvaluation"),this.next(),t.phase=r?"source":"defer",this.parseImportCall(t)}else{let r=this.createIdentifierAt(this.startNodeAtNode(t),"import",this.state.lastTokStartLoc);return this.isContextual(101)&&(this.inModule||this.raise(X.ImportMetaOutsideModule,r),this.sawUnambiguousESM=!0),this.parseMetaProperty(t,r,"meta")}}parseLiteralAtNode(t,r,a){return this.addExtra(a,"rawValue",t),this.addExtra(a,"raw",this.input.slice(this.offsetToSourcePos(a.start),this.state.end)),a.value=t,this.next(),this.finishNode(a,r)}parseLiteral(t,r){let a=this.startNode();return this.parseLiteralAtNode(t,r,a)}parseStringLiteral(t){return this.parseLiteral(t,"StringLiteral")}parseNumericLiteral(t){return this.parseLiteral(t,"NumericLiteral")}parseBigIntLiteral(t){return this.parseLiteral(t,"BigIntLiteral")}parseDecimalLiteral(t){return this.parseLiteral(t,"DecimalLiteral")}parseRegExpLiteral(t){let r=this.startNode();return this.addExtra(r,"raw",this.input.slice(this.offsetToSourcePos(r.start),this.state.end)),r.pattern=t.pattern,r.flags=t.flags,this.next(),this.finishNode(r,"RegExpLiteral")}parseBooleanLiteral(t){let r=this.startNode();return r.value=t,this.next(),this.finishNode(r,"BooleanLiteral")}parseNullLiteral(){let t=this.startNode();return this.next(),this.finishNode(t,"NullLiteral")}parseParenAndDistinguishExpression(t){let r=this.state.startLoc,a;this.next(),this.expressionScope.enter(Loe());let n=this.state.maybeInArrowParameters,s=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let i=this.state.startLoc,o=[],l=new Sg,c=!0,u,d;for(;!this.match(11);){if(c)c=!1;else if(this.expect(12,l.optionalParametersLoc===null?null:l.optionalParametersLoc),this.match(11)){d=this.state.startLoc;break}if(this.match(21)){let m=this.state.startLoc;if(u=this.state.startLoc,o.push(this.parseParenItem(this.parseRestBinding(),m)),!this.checkCommaAfterRest(41))break}else o.push(this.parseMaybeAssignAllowInOrVoidPattern(11,l,this.parseParenItem))}let f=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=n,this.state.inFSharpPipelineDirectBody=s;let p=this.startNodeAt(r);return t&&this.shouldParseArrow(o)&&(p=this.parseArrow(p))?(this.checkDestructuringPrivate(l),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(p,o,!1),p):(this.expressionScope.exit(),o.length||this.unexpected(this.state.lastTokStartLoc),d&&this.unexpected(d),u&&this.unexpected(u),this.checkExpressionErrors(l,!0),this.toReferencedListDeep(o,!0),o.length>1?(a=this.startNodeAt(i),a.expressions=o,this.finishNode(a,"SequenceExpression"),this.resetEndLocation(a,f)):a=o[0],this.wrapParenthesis(r,a))}wrapParenthesis(t,r){if(!(this.optionFlags&1024))return this.addExtra(r,"parenthesized",!0),this.addExtra(r,"parenStart",t.index),this.takeSurroundingComments(r,t.index,this.state.lastTokEndLoc.index),r;let a=this.startNodeAt(t);return a.expression=r,this.finishNode(a,"ParenthesizedExpression")}shouldParseArrow(t){return!this.canInsertSemicolon()}parseArrow(t){if(this.eat(19))return t}parseParenItem(t,r){return t}parseNewOrNewTarget(){let t=this.startNode();if(this.next(),this.match(16)){let r=this.createIdentifier(this.startNodeAtNode(t),"new");this.next();let a=this.parseMetaProperty(t,r,"target");return this.scope.allowNewTarget||this.raise(X.UnexpectedNewTarget,a),a}return this.parseNew(t)}parseNew(t){if(this.parseNewCallee(t),this.eat(10)){let r=this.parseExprList(11);this.toReferencedList(r),t.arguments=r}else t.arguments=[];return this.finishNode(t,"NewExpression")}parseNewCallee(t){let r=this.match(83),a=this.parseNoCallExpr();t.callee=a,r&&(a.type==="Import"||a.type==="ImportExpression")&&this.raise(X.ImportCallNotNewExpression,a)}parseTemplateElement(t){let{start:r,startLoc:a,end:n,value:s}=this.state,i=r+1,o=this.startNodeAt(ui(a,1));s===null&&(t||this.raise(X.InvalidEscapeSequenceTemplate,ui(this.state.firstInvalidTemplateEscapePos,1)));let l=this.match(24),c=l?-1:-2,u=n+c;o.value={raw:this.input.slice(i,u).replace(/\r\n?/g,`
|
|
`),cooked:s===null?null:s.slice(1,c)},o.tail=l,this.next();let d=this.finishNode(o,"TemplateElement");return this.resetEndLocation(d,ui(this.state.lastTokEndLoc,c)),d}parseTemplate(t){let r=this.startNode(),a=this.parseTemplateElement(t),n=[a],s=[];for(;!a.tail;)s.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),n.push(a=this.parseTemplateElement(t));return r.expressions=s,r.quasis=n,this.finishNode(r,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,r,a,n){a&&this.expectPlugin("recordAndTuple");let s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let i=!1,o=!0,l=this.startNode();for(l.properties=[],this.next();!this.match(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){this.addTrailingCommaExtraToNode(l);break}let u;r?u=this.parseBindingProperty():(u=this.parsePropertyDefinition(n),i=this.checkProto(u,a,i,n)),a&&!this.isObjectProperty(u)&&u.type!=="SpreadElement"&&this.raise(X.InvalidRecordProperty,u),u.shorthand&&this.addExtra(u,"shorthand",!0),l.properties.push(u)}this.next(),this.state.inFSharpPipelineDirectBody=s;let c="ObjectExpression";return r?c="ObjectPattern":a&&(c="RecordExpression"),this.finishNode(l,c)}addTrailingCommaExtraToNode(t){this.addExtra(t,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(t,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(t){return!t.computed&&t.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(t){let r=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(X.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)r.push(this.parseDecorator());let a=this.startNode(),n=!1,s=!1,i;if(this.match(21))return r.length&&this.unexpected(),this.parseSpread();r.length&&(a.decorators=r,r=[]),a.method=!1,t&&(i=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(a);let l=this.state.containsEsc;if(this.parsePropertyName(a,t),!o&&!l&&this.maybeAsyncOrAccessorProp(a)){let{key:c}=a,u=c.name;u==="async"&&!this.hasPrecedingLineBreak()&&(n=!0,this.resetPreviousNodeTrailingComments(c),o=this.eat(55),this.parsePropertyName(a)),(u==="get"||u==="set")&&(s=!0,this.resetPreviousNodeTrailingComments(c),a.kind=u,this.match(55)&&(o=!0,this.raise(X.AccessorIsGenerator,this.state.curPosition(),{kind:u}),this.next()),this.parsePropertyName(a))}return this.parseObjPropValue(a,i,o,n,!1,s,t)}getGetterSetterExpectedParamCount(t){return t.kind==="get"?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){var r;let a=this.getGetterSetterExpectedParamCount(t),n=this.getObjectOrClassMethodParams(t);n.length!==a&&this.raise(t.kind==="get"?X.BadGetterArity:X.BadSetterArity,t),t.kind==="set"&&((r=n[n.length-1])==null?void 0:r.type)==="RestElement"&&this.raise(X.BadSetterRestParameter,t)}parseObjectMethod(t,r,a,n,s){if(s){let i=this.parseMethod(t,r,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(i),i}if(a||r||this.match(10))return n&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,r,a,!1,!1,"ObjectMethod")}parseObjectProperty(t,r,a,n){if(t.shorthand=!1,this.eat(14))return t.value=a?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(8,n),this.finishObjectProperty(t);if(!t.computed&&t.key.type==="Identifier"){if(this.checkReservedWord(t.key.name,t.key.loc.start,!0,!1),a)t.value=this.parseMaybeDefault(r,this.cloneIdentifier(t.key));else if(this.match(29)){let s=this.state.startLoc;n!=null?n.shorthandAssignLoc===null&&(n.shorthandAssignLoc=s):this.raise(X.InvalidCoverInitializedName,s),t.value=this.parseMaybeDefault(r,this.cloneIdentifier(t.key))}else t.value=this.cloneIdentifier(t.key);return t.shorthand=!0,this.finishObjectProperty(t)}}finishObjectProperty(t){return this.finishNode(t,"ObjectProperty")}parseObjPropValue(t,r,a,n,s,i,o){let l=this.parseObjectMethod(t,a,n,s,i)||this.parseObjectProperty(t,r,s,o);return l||this.unexpected(),l}parsePropertyName(t,r){if(this.eat(0))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:a,value:n}=this.state,s;if(Vl(a))s=this.parseIdentifier(!0);else switch(a){case 135:s=this.parseNumericLiteral(n);break;case 134:s=this.parseStringLiteral(n);break;case 136:s=this.parseBigIntLiteral(n);break;case 139:{let i=this.state.startLoc;r!=null?r.privateKeyLoc===null&&(r.privateKeyLoc=i):this.raise(X.UnexpectedPrivateField,i),s=this.parsePrivateName();break}default:if(a===137){s=this.parseDecimalLiteral(n);break}this.unexpected()}t.key=s,a!==139&&(t.computed=!1)}}initFunction(t,r){t.id=null,t.generator=!1,t.async=r}parseMethod(t,r,a,n,s,i,o=!1){this.initFunction(t,a),t.generator=r,this.scope.enter(530|(o?576:0)|(s?32:0)),this.prodParam.enter(Sw(a,t.generator)),this.parseFunctionParams(t,n);let l=this.parseFunctionBodyAndFinish(t,i,!0);return this.prodParam.exit(),this.scope.exit(),l}parseArrayLike(t,r,a){r&&this.expectPlugin("recordAndTuple");let n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let s=this.startNode();return this.next(),s.elements=this.parseExprList(t,!r,a,s),this.state.inFSharpPipelineDirectBody=n,this.finishNode(s,r?"TupleExpression":"ArrayExpression")}parseArrowExpression(t,r,a,n){this.scope.enter(518);let s=Sw(a,!1);!this.match(5)&&this.prodParam.hasIn&&(s|=8),this.prodParam.enter(s),this.initFunction(t,a);let i=this.state.maybeInArrowParameters;return r&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(t,r,n)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(t,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=i,this.finishNode(t,"ArrowFunctionExpression")}setArrowFunctionParameters(t,r,a){this.toAssignableList(r,a,!1),t.params=r}parseFunctionBodyAndFinish(t,r,a=!1){return this.parseFunctionBody(t,!1,a),this.finishNode(t,r)}parseFunctionBody(t,r,a=!1){let n=r&&!this.match(5);if(this.expressionScope.enter(i4()),n)t.body=this.parseMaybeAssign(),this.checkParams(t,!1,r,!1);else{let s=this.state.strict,i=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),t.body=this.parseBlock(!0,!1,o=>{let l=!this.isSimpleParamList(t.params);o&&l&&this.raise(X.IllegalLanguageModeDirective,(t.kind==="method"||t.kind==="constructor")&&t.key?t.key.loc.end:t);let c=!s&&this.state.strict;this.checkParams(t,!this.state.strict&&!r&&!a&&!l,r,c),this.state.strict&&t.id&&this.checkIdentifier(t.id,65,c)}),this.prodParam.exit(),this.state.labels=i}this.expressionScope.exit()}isSimpleParameter(t){return t.type==="Identifier"}isSimpleParamList(t){for(let r=0,a=t.length;r<a;r++)if(!this.isSimpleParameter(t[r]))return!1;return!0}checkParams(t,r,a,n=!0){let s=!r&&new Set,i={type:"FormalParameters"};for(let o of t.params)this.checkLVal(o,i,5,s,n)}parseExprList(t,r,a,n){let s=[],i=!0;for(;!this.eat(t);){if(i)i=!1;else if(this.expect(12),this.match(t)){n&&this.addTrailingCommaExtraToNode(n),this.next();break}s.push(this.parseExprListItem(t,r,a))}return s}parseExprListItem(t,r,a,n){let s;if(this.match(12))r||this.raise(X.UnexpectedToken,this.state.curPosition(),{unexpected:","}),s=null;else if(this.match(21)){let i=this.state.startLoc;s=this.parseParenItem(this.parseSpread(a),i)}else if(this.match(17)){this.expectPlugin("partialApplication"),n||this.raise(X.UnexpectedArgumentPlaceholder,this.state.startLoc);let i=this.startNode();this.next(),s=this.finishNode(i,"ArgumentPlaceholder")}else s=this.parseMaybeAssignAllowInOrVoidPattern(t,a,this.parseParenItem);return s}parseIdentifier(t){let r=this.startNode(),a=this.parseIdentifierName(t);return this.createIdentifier(r,a)}createIdentifier(t,r){return t.name=r,t.loc.identifierName=r,this.finishNode(t,"Identifier")}createIdentifierAt(t,r,a){return t.name=r,t.loc.identifierName=r,this.finishNodeAt(t,"Identifier",a)}parseIdentifierName(t){let r,{startLoc:a,type:n}=this.state;Vl(n)?r=this.state.value:this.unexpected();let s=Wie(n);return t?s&&this.replaceToken(132):this.checkReservedWord(r,a,s,!1),this.next(),r}checkReservedWord(t,r,a,n){if(t.length>10||!poe(t))return;if(a&&uoe(t)){this.raise(X.UnexpectedKeyword,r,{keyword:t});return}if((this.state.strict?n?r4:e4:ZB)(t,this.inModule)){this.raise(X.UnexpectedReservedWord,r,{reservedWord:t});return}else if(t==="yield"){if(this.prodParam.hasYield){this.raise(X.YieldBindingIdentifier,r);return}}else if(t==="await"){if(this.prodParam.hasAwait){this.raise(X.AwaitBindingIdentifier,r);return}if(this.scope.inStaticBlock){this.raise(X.AwaitBindingIdentifierInStaticBlock,r);return}this.expressionScope.recordAsyncArrowParametersError(r)}else if(t==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(X.ArgumentsInClass,r);return}}recordAwaitIfAllowed(){let t=this.prodParam.hasAwait;return t&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),t}parseAwait(t){let r=this.startNodeAt(t);return this.expressionScope.recordParameterInitializerError(X.AwaitExpressionFormalParameter,r),this.eat(55)&&this.raise(X.ObsoleteAwaitStar,r),!this.scope.inFunction&&!(this.optionFlags&1)&&(this.isAmbiguousPrefixOrIdentifier()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(r.argument=this.parseMaybeUnary(null,!0)),this.finishNode(r,"AwaitExpression")}isAmbiguousPrefixOrIdentifier(){if(this.hasPrecedingLineBreak())return!0;let{type:t}=this.state;return t===53||t===10||t===0||ww(t)||t===102&&!this.state.containsEsc||t===138||t===56||this.hasPlugin("v8intrinsic")&&t===54}parseYield(t){let r=this.startNodeAt(t);this.expressionScope.recordParameterInitializerError(X.YieldInParameter,r);let a=!1,n=null;if(!this.hasPrecedingLineBreak())switch(a=this.eat(55),this.state.type){case 13:case 140:case 8:case 11:case 3:case 9:case 14:case 12:if(!a)break;default:n=this.parseMaybeAssign()}return r.delegate=a,r.argument=n,this.finishNode(r,"YieldExpression")}parseImportCall(t){if(this.next(),t.source=this.parseMaybeAssignAllowIn(),t.options=null,this.eat(12)){if(this.match(11))this.addTrailingCommaExtraToNode(t.source);else if(t.options=this.parseMaybeAssignAllowIn(),this.eat(12)&&(this.addTrailingCommaExtraToNode(t.options),!this.match(11))){do this.parseMaybeAssignAllowIn();while(this.eat(12)&&!this.match(11));this.raise(X.ImportCallArity,t)}}return this.expect(11),this.finishNode(t,"ImportExpression")}checkPipelineAtInfixOperator(t,r){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&t.type==="SequenceExpression"&&this.raise(X.PipelineHeadSequenceExpression,r)}parseSmartPipelineBodyInStyle(t,r){if(this.isSimpleReference(t)){let a=this.startNodeAt(r);return a.callee=t,this.finishNode(a,"PipelineBareFunction")}else{let a=this.startNodeAt(r);return this.checkSmartPipeTopicBodyEarlyErrors(r),a.expression=t,this.finishNode(a,"PipelineTopicExpression")}}isSimpleReference(t){switch(t.type){case"MemberExpression":return!t.computed&&this.isSimpleReference(t.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(t){if(this.match(19))throw this.raise(X.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(X.PipelineTopicUnused,t)}withTopicBindingContext(t){let r=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=r}}withSmartMixTopicForbiddingContext(t){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let r=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=r}}else return t()}withSoloAwaitPermittingContext(t){let r=this.state.soloAwait;this.state.soloAwait=!0;try{return t()}finally{this.state.soloAwait=r}}allowInAnd(t){let r=this.prodParam.currentFlags();if(8&~r){this.prodParam.enter(r|8);try{return t()}finally{this.prodParam.exit()}}return t()}disallowInAnd(t){let r=this.prodParam.currentFlags();if(8&r){this.prodParam.enter(r&-9);try{return t()}finally{this.prodParam.exit()}}return t()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(t){let r=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let a=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let n=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),r,t);return this.state.inFSharpPipelineDirectBody=a,n}parseModuleExpression(){this.expectPlugin("moduleBlocks");let t=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let r=this.startNodeAt(this.state.endLoc);this.next();let a=this.initializeScopes(!0);this.enterInitialScopes();try{t.body=this.parseProgram(r,8,"module")}finally{a()}return this.finishNode(t,"ModuleExpression")}parseVoidPattern(t){this.expectPlugin("discardBinding");let r=this.startNode();return t!=null&&(t.voidPatternLoc=this.state.startLoc),this.next(),this.finishNode(r,"VoidPattern")}parseMaybeAssignAllowInOrVoidPattern(t,r,a){if(r!=null&&this.match(88)){let n=this.lookaheadCharCode();if(n===44||n===(t===3?93:t===8?125:41)||n===61)return this.parseMaybeDefault(this.state.startLoc,this.parseVoidPattern(r))}return this.parseMaybeAssignAllowIn(r,a)}parsePropertyNamePrefixOperator(t){}},nN={kind:1},qoe={kind:2},Hoe=/[\uD800-\uDFFF]/u,sN=/in(?:stanceof)?/y;function $oe(e,t,r){for(let a=0;a<e.length;a++){let n=e[a],{type:s}=n;if(typeof s=="number"){{if(s===139){let{loc:i,start:o,value:l,end:c}=n,u=o+1,d=ui(i.start,1);e.splice(a,1,new Sc({type:vu(27),value:"#",start:o,end:u,startLoc:i.start,endLoc:d}),new Sc({type:vu(132),value:l,start:u,end:c,startLoc:d,endLoc:i.end})),a++;continue}if(ww(s)){let{loc:i,start:o,value:l,end:c}=n,u=o+1,d=ui(i.start,1),f;t.charCodeAt(o-r)===96?f=new Sc({type:vu(22),value:"`",start:o,end:u,startLoc:i.start,endLoc:d}):f=new Sc({type:vu(8),value:"}",start:o,end:u,startLoc:i.start,endLoc:d});let p,m,h,x;s===24?(m=c-1,h=ui(i.end,-1),p=l===null?null:l.slice(1,-1),x=new Sc({type:vu(22),value:"`",start:m,end:c,startLoc:h,endLoc:i.end})):(m=c-2,h=ui(i.end,-2),p=l===null?null:l.slice(1,-2),x=new Sc({type:vu(23),value:"${",start:m,end:c,startLoc:h,endLoc:i.end})),e.splice(a,1,f,new Sc({type:vu(20),value:p,start:u,end:m,startLoc:d,endLoc:h}),x),a+=2;continue}}n.type=vu(s)}}return e}var EN=class extends CN{parseTopLevel(t,r){return t.program=this.parseProgram(r,140,this.options.sourceType==="module"?"module":"script"),t.comments=this.comments,this.optionFlags&256&&(t.tokens=$oe(this.tokens,this.input,this.startIndex)),this.finishNode(t,"File")}parseProgram(t,r,a){if(t.sourceType=a,t.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(t,!0,!0,r),this.inModule){if(!(this.optionFlags&64)&&this.scope.undefinedExports.size>0)for(let[s,i]of Array.from(this.scope.undefinedExports))this.raise(X.ModuleExportUndefined,i,{localName:s});this.addExtra(t,"topLevelAwait",this.state.hasTopLevelAwait)}let n;return r===140?n=this.finishNode(t,"Program"):n=this.finishNodeAt(t,"Program",ui(this.state.startLoc,-1)),n}stmtToDirective(t){let r=this.castNodeTo(t,"Directive"),a=this.castNodeTo(t.expression,"DirectiveLiteral"),n=a.value,s=this.input.slice(this.offsetToSourcePos(a.start),this.offsetToSourcePos(a.end)),i=a.value=s.slice(1,-1);return this.addExtra(a,"raw",s),this.addExtra(a,"rawValue",i),this.addExtra(a,"expressionValue",n),r.value=a,delete t.expression,r}parseInterpreterDirective(){if(!this.match(28))return null;let t=this.startNode();return t.value=this.state.value,this.next(),this.finishNode(t,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}isUsing(){return this.isContextual(107)?this.nextTokenIsIdentifierOnSameLine():!1}isForUsing(){if(!this.isContextual(107))return!1;let t=this.nextTokenInLineStart(),r=this.codePointAtPos(t);if(this.isUnparsedContextual(t,"of")){let a=this.lookaheadCharCodeSince(t+2);if(a!==61&&a!==58&&a!==59)return!1}return!!(this.chStartsBindingIdentifier(r,t)||this.isUnparsedContextual(t,"void"))}nextTokenIsIdentifierOnSameLine(){let t=this.nextTokenInLineStart(),r=this.codePointAtPos(t);return this.chStartsBindingIdentifier(r,t)}isAwaitUsing(){if(!this.isContextual(96))return!1;let t=this.nextTokenInLineStart();if(this.isUnparsedContextual(t,"using")){t=this.nextTokenInLineStartSince(t+5);let r=this.codePointAtPos(t);if(this.chStartsBindingIdentifier(r,t))return!0}return!1}chStartsBindingIdentifier(t,r){if(wc(t)){if(sN.lastIndex=r,sN.test(this.input)){let a=this.codePointAtPos(sN.lastIndex);if(!em(a)&&a!==92)return!1}return!0}else return t===92}chStartsBindingPattern(t){return t===91||t===123}hasFollowingBindingAtom(){let t=this.nextTokenStart(),r=this.codePointAtPos(t);return this.chStartsBindingPattern(r)||this.chStartsBindingIdentifier(r,t)}hasInLineFollowingBindingIdentifierOrBrace(){let t=this.nextTokenInLineStart(),r=this.codePointAtPos(t);return r===123||this.chStartsBindingIdentifier(r,t)}allowsUsing(){return(this.scope.inModule||!this.scope.inTopLevel)&&!this.scope.inBareCaseStatement}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(t=!1){let r=0;return this.options.annexB&&!this.state.strict&&(r|=4,t&&(r|=8)),this.parseStatementLike(r)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(t){let r=null;return this.match(26)&&(r=this.parseDecorators(!0)),this.parseStatementContent(t,r)}parseStatementContent(t,r){let a=this.state.type,n=this.startNode(),s=!!(t&2),i=!!(t&4),o=t&1;switch(a){case 60:return this.parseBreakContinueStatement(n,!0);case 63:return this.parseBreakContinueStatement(n,!1);case 64:return this.parseDebuggerStatement(n);case 90:return this.parseDoWhileStatement(n);case 91:return this.parseForStatement(n);case 68:if(this.lookaheadCharCode()===46)break;return i||this.raise(this.state.strict?X.StrictFunction:this.options.annexB?X.SloppyFunctionAnnexB:X.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(n,!1,!s&&i);case 80:return s||this.unexpected(),this.parseClass(this.maybeTakeDecorators(r,n),!0);case 69:return this.parseIfStatement(n);case 70:return this.parseReturnStatement(n);case 71:return this.parseSwitchStatement(n);case 72:return this.parseThrowStatement(n);case 73:return this.parseTryStatement(n);case 96:if(this.isAwaitUsing())return this.allowsUsing()?s?this.recordAwaitIfAllowed()||this.raise(X.AwaitUsingNotInAsyncContext,n):this.raise(X.UnexpectedLexicalDeclaration,n):this.raise(X.UnexpectedUsingDeclaration,n),this.next(),this.parseVarStatement(n,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.allowsUsing()?s||this.raise(X.UnexpectedLexicalDeclaration,this.state.startLoc):this.raise(X.UnexpectedUsingDeclaration,this.state.startLoc),this.parseVarStatement(n,"using");case 100:{if(this.state.containsEsc)break;let u=this.nextTokenStart(),d=this.codePointAtPos(u);if(d!==91&&(!s&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(d,u)&&d!==123))break}case 75:s||this.raise(X.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let u=this.state.value;return this.parseVarStatement(n,u)}case 92:return this.parseWhileStatement(n);case 76:return this.parseWithStatement(n);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(n);case 83:{let u=this.lookaheadCharCode();if(u===40||u===46)break}case 82:{!(this.optionFlags&8)&&!o&&this.raise(X.UnexpectedImportExport,this.state.startLoc),this.next();let u;return a===83?u=this.parseImport(n):u=this.parseExport(n,r),this.assertModuleNodeAllowed(u),u}default:if(this.isAsyncFunction())return s||this.raise(X.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(n,!0,!s&&i)}let l=this.state.value,c=this.parseExpression();return Qr(a)&&c.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(n,l,c,t):this.parseExpressionStatement(n,c,r)}assertModuleNodeAllowed(t){!(this.optionFlags&8)&&!this.inModule&&this.raise(X.ImportOutsideModule,t)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(t,r,a){if(t){var n;(n=r.decorators)!=null&&n.length?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(X.DecoratorsBeforeAfterExport,r.decorators[0]),r.decorators.unshift(...t)):r.decorators=t,this.resetStartLocationFromNode(r,t[0]),a&&this.resetStartLocationFromNode(a,r)}return r}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(t){let r=[];do r.push(this.parseDecorator());while(this.match(26));if(this.match(82))t||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(X.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(X.UnexpectedLeadingDecorator,this.state.startLoc);return r}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let t=this.startNode();if(this.next(),this.hasPlugin("decorators")){let r=this.state.startLoc,a;if(this.match(10)){let n=this.state.startLoc;this.next(),a=this.parseExpression(),this.expect(11),a=this.wrapParenthesis(n,a);let s=this.state.startLoc;t.expression=this.parseMaybeDecoratorArguments(a,n),this.getPluginOption("decorators","allowCallParenthesized")===!1&&t.expression!==a&&this.raise(X.DecoratorArgumentsOutsideParentheses,s)}else{for(a=this.parseIdentifier(!1);this.eat(16);){let n=this.startNodeAt(r);n.object=a,this.match(139)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),n.property=this.parsePrivateName()):n.property=this.parseIdentifier(!0),n.computed=!1,a=this.finishNode(n,"MemberExpression")}t.expression=this.parseMaybeDecoratorArguments(a,r)}}else t.expression=this.parseExprSubscripts();return this.finishNode(t,"Decorator")}parseMaybeDecoratorArguments(t,r){if(this.eat(10)){let a=this.startNodeAt(r);return a.callee=t,a.arguments=this.parseCallExpressionArguments(),this.toReferencedList(a.arguments),this.finishNode(a,"CallExpression")}return t}parseBreakContinueStatement(t,r){return this.next(),this.isLineTerminator()?t.label=null:(t.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(t,r),this.finishNode(t,r?"BreakStatement":"ContinueStatement")}verifyBreakContinue(t,r){let a;for(a=0;a<this.state.labels.length;++a){let n=this.state.labels[a];if((t.label==null||n.name===t.label.name)&&(n.kind!=null&&(r||n.kind===1)||t.label&&r))break}if(a===this.state.labels.length){let n=r?"BreakStatement":"ContinueStatement";this.raise(X.IllegalBreakContinue,t,{type:n})}}parseDebuggerStatement(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);let t=this.parseExpression();return this.expect(11),t}parseDoWhileStatement(t){return this.next(),this.state.labels.push(nN),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),t.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(t,"DoWhileStatement")}parseForStatement(t){this.next(),this.state.labels.push(nN);let r=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(r=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return r!==null&&this.unexpected(r),this.parseFor(t,null);let a=this.isContextual(100);{let l=this.isAwaitUsing(),c=l||this.isForUsing(),u=a&&this.hasFollowingBindingAtom()||c;if(this.match(74)||this.match(75)||u){let d=this.startNode(),f;l?(f="await using",this.recordAwaitIfAllowed()||this.raise(X.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):f=this.state.value,this.next(),this.parseVar(d,!0,f);let p=this.finishNode(d,"VariableDeclaration"),m=this.match(58);return m&&c&&this.raise(X.ForInUsing,p),(m||this.isContextual(102))&&p.declarations.length===1?this.parseForIn(t,p,r):(r!==null&&this.unexpected(r),this.parseFor(t,p))}}let n=this.isContextual(95),s=new Sg,i=this.parseExpression(!0,s),o=this.isContextual(102);if(o&&(a&&this.raise(X.ForOfLet,i),r===null&&n&&i.type==="Identifier"&&this.raise(X.ForOfAsync,i)),o||this.match(58)){this.checkDestructuringPrivate(s),this.toAssignable(i,!0);let l=o?"ForOfStatement":"ForInStatement";return this.checkLVal(i,{type:l}),this.parseForIn(t,i,r)}else this.checkExpressionErrors(s,!0);return r!==null&&this.unexpected(r),this.parseFor(t,i)}parseFunctionStatement(t,r,a){return this.next(),this.parseFunction(t,1|(a?2:0)|(r?8:0))}parseIfStatement(t){return this.next(),t.test=this.parseHeaderExpression(),t.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),t.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(t,"IfStatement")}parseReturnStatement(t){return this.prodParam.hasReturn||this.raise(X.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")}parseSwitchStatement(t){this.next(),t.discriminant=this.parseHeaderExpression();let r=t.cases=[];this.expect(5),this.state.labels.push(qoe),this.scope.enter(256);let a;for(let n;!this.match(8);)if(this.match(61)||this.match(65)){let s=this.match(61);a&&this.finishNode(a,"SwitchCase"),r.push(a=this.startNode()),a.consequent=[],this.next(),s?a.test=this.parseExpression():(n&&this.raise(X.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),n=!0,a.test=null),this.expect(14)}else a?a.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),a&&this.finishNode(a,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")}parseThrowStatement(t){return this.next(),this.hasPrecedingLineBreak()&&this.raise(X.NewlineAfterThrow,this.state.lastTokEndLoc),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")}parseCatchClauseParam(){let t=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&t.type==="Identifier"?8:0),this.checkLVal(t,{type:"CatchClause"},9),t}parseTryStatement(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(62)){let r=this.startNode();this.next(),this.match(10)?(this.expect(10),r.param=this.parseCatchClauseParam(),this.expect(11)):(r.param=null,this.scope.enter(0)),r.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),t.handler=this.finishNode(r,"CatchClause")}return t.finalizer=this.eat(67)?this.parseBlock():null,!t.handler&&!t.finalizer&&this.raise(X.NoCatchOrFinally,t),this.finishNode(t,"TryStatement")}parseVarStatement(t,r,a=!1){return this.next(),this.parseVar(t,!1,r,a),this.semicolon(),this.finishNode(t,"VariableDeclaration")}parseWhileStatement(t){return this.next(),t.test=this.parseHeaderExpression(),this.state.labels.push(nN),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(t,"WhileStatement")}parseWithStatement(t){return this.state.strict&&this.raise(X.StrictWith,this.state.startLoc),this.next(),t.object=this.parseHeaderExpression(),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(t,"WithStatement")}parseEmptyStatement(t){return this.next(),this.finishNode(t,"EmptyStatement")}parseLabeledStatement(t,r,a,n){for(let i of this.state.labels)i.name===r&&this.raise(X.LabelRedeclaration,a,{labelName:r});let s=Jie(this.state.type)?1:this.match(71)?2:null;for(let i=this.state.labels.length-1;i>=0;i--){let o=this.state.labels[i];if(o.statementStart===t.start)o.statementStart=this.sourceToOffsetPos(this.state.start),o.kind=s;else break}return this.state.labels.push({name:r,kind:s,statementStart:this.sourceToOffsetPos(this.state.start)}),t.body=n&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),t.label=a,this.finishNode(t,"LabeledStatement")}parseExpressionStatement(t,r,a){return t.expression=r,this.semicolon(),this.finishNode(t,"ExpressionStatement")}parseBlock(t=!1,r=!0,a){let n=this.startNode();return t&&this.state.strictErrors.clear(),this.expect(5),r&&this.scope.enter(0),this.parseBlockBody(n,t,!1,8,a),r&&this.scope.exit(),this.finishNode(n,"BlockStatement")}isValidDirective(t){return t.type==="ExpressionStatement"&&t.expression.type==="StringLiteral"&&!t.expression.extra.parenthesized}parseBlockBody(t,r,a,n,s){let i=t.body=[],o=t.directives=[];this.parseBlockOrModuleBlockBody(i,r?o:void 0,a,n,s)}parseBlockOrModuleBlockBody(t,r,a,n,s){let i=this.state.strict,o=!1,l=!1;for(;!this.match(n);){let c=a?this.parseModuleItem():this.parseStatementListItem();if(r&&!l){if(this.isValidDirective(c)){let u=this.stmtToDirective(c);r.push(u),!o&&u.value.value==="use strict"&&(o=!0,this.setStrict(!0));continue}l=!0,this.state.strictErrors.clear()}t.push(c)}s?.call(this,o),i||this.setStrict(!1),this.next()}parseFor(t,r){return t.init=r,this.semicolon(!1),t.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),t.update=this.match(11)?null:this.parseExpression(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,"ForStatement")}parseForIn(t,r,a){let n=this.match(58);return this.next(),n?a!==null&&this.unexpected(a):t.await=a!==null,r.type==="VariableDeclaration"&&r.declarations[0].init!=null&&(!n||!this.options.annexB||this.state.strict||r.kind!=="var"||r.declarations[0].id.type!=="Identifier")&&this.raise(X.ForInOfLoopInitializer,r,{type:n?"ForInStatement":"ForOfStatement"}),r.type==="AssignmentPattern"&&this.raise(X.InvalidLhs,r,{ancestor:{type:"ForStatement"}}),t.left=r,t.right=n?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,n?"ForInStatement":"ForOfStatement")}parseVar(t,r,a,n=!1){let s=t.declarations=[];for(t.kind=a;;){let i=this.startNode();if(this.parseVarId(i,a),i.init=this.eat(29)?r?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,i.init===null&&!n&&(i.id.type!=="Identifier"&&!(r&&(this.match(58)||this.isContextual(102)))?this.raise(X.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(a==="const"||a==="using"||a==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(X.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:a})),s.push(this.finishNode(i,"VariableDeclarator")),!this.eat(12))break}return t}parseVarId(t,r){let a=this.parseBindingAtom();r==="using"||r==="await using"?(a.type==="ArrayPattern"||a.type==="ObjectPattern")&&this.raise(X.UsingDeclarationHasBindingPattern,a.loc.start):a.type==="VoidPattern"&&this.raise(X.UnexpectedVoidPattern,a.loc.start),this.checkLVal(a,{type:"VariableDeclarator"},r==="var"?5:8201),t.id=a}parseAsyncFunctionExpression(t){return this.parseFunction(t,8)}parseFunction(t,r=0){let a=r&2,n=!!(r&1),s=n&&!(r&4),i=!!(r&8);this.initFunction(t,i),this.match(55)&&(a&&this.raise(X.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),t.generator=!0),n&&(t.id=this.parseFunctionId(s));let o=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(514),this.prodParam.enter(Sw(i,t.generator)),n||(t.id=this.parseFunctionId()),this.parseFunctionParams(t,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(t,n?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),n&&!a&&this.registerFunctionStatementId(t),this.state.maybeInArrowParameters=o,t}parseFunctionId(t){return t||Qr(this.state.type)?this.parseIdentifier():null}parseFunctionParams(t,r){this.expect(10),this.expressionScope.enter(Noe()),t.params=this.parseBindingList(11,41,2|(r?4:0)),this.expressionScope.exit()}registerFunctionStatementId(t){t.id&&this.scope.declareName(t.id.name,!this.options.annexB||this.state.strict||t.generator||t.async?this.scope.treatFunctionsAsVar?5:8201:17,t.id.loc.start)}parseClass(t,r,a){this.next();let n=this.state.strict;return this.state.strict=!0,this.parseClassId(t,r,a),this.parseClassSuper(t),t.body=this.parseClassBody(!!t.superClass,n),this.finishNode(t,r?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(t){return t.type==="Identifier"&&t.name==="constructor"||t.type==="StringLiteral"&&t.value==="constructor"}isNonstaticConstructor(t){return!t.computed&&!t.static&&this.nameIsConstructor(t.key)}parseClassBody(t,r){this.classScope.enter();let a={hadConstructor:!1,hadSuperClass:t},n=[],s=this.startNode();if(s.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(n.length>0)throw this.raise(X.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){n.push(this.parseDecorator());continue}let i=this.startNode();n.length&&(i.decorators=n,this.resetStartLocationFromNode(i,n[0]),n=[]),this.parseClassMember(s,i,a),i.kind==="constructor"&&i.decorators&&i.decorators.length>0&&this.raise(X.DecoratorConstructor,i)}}),this.state.strict=r,this.next(),n.length)throw this.raise(X.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(s,"ClassBody")}parseClassMemberFromModifier(t,r){let a=this.parseIdentifier(!0);if(this.isClassMethod()){let n=r;return n.kind="method",n.computed=!1,n.key=a,n.static=!1,this.pushClassMethod(t,n,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let n=r;return n.computed=!1,n.key=a,n.static=!1,t.body.push(this.parseClassProperty(n)),!0}return this.resetPreviousNodeTrailingComments(a),!1}parseClassMember(t,r,a){let n=this.isContextual(106);if(n){if(this.parseClassMemberFromModifier(t,r))return;if(this.eat(5)){this.parseClassStaticBlock(t,r);return}}this.parseClassMemberWithIsStatic(t,r,a,n)}parseClassMemberWithIsStatic(t,r,a,n){let s=r,i=r,o=r,l=r,c=r,u=s,d=s;if(r.static=n,this.parsePropertyNamePrefixOperator(r),this.eat(55)){u.kind="method";let g=this.match(139);if(this.parseClassElementName(u),this.parsePostMemberNameModifiers(u),g){this.pushClassPrivateMethod(t,i,!0,!1);return}this.isNonstaticConstructor(s)&&this.raise(X.ConstructorIsGenerator,s.key),this.pushClassMethod(t,s,!0,!1,!1,!1);return}let f=!this.state.containsEsc&&Qr(this.state.type),p=this.parseClassElementName(r),m=f?p.name:null,h=this.isPrivateName(p),x=this.state.startLoc;if(this.parsePostMemberNameModifiers(d),this.isClassMethod()){if(u.kind="method",h){this.pushClassPrivateMethod(t,i,!1,!1);return}let g=this.isNonstaticConstructor(s),y=!1;g&&(s.kind="constructor",a.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(X.DuplicateConstructor,p),g&&this.hasPlugin("typescript")&&r.override&&this.raise(X.OverrideOnConstructor,p),a.hadConstructor=!0,y=a.hadSuperClass),this.pushClassMethod(t,s,!1,!1,g,y)}else if(this.isClassProperty())h?this.pushClassPrivateProperty(t,l):this.pushClassProperty(t,o);else if(m==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(p);let g=this.eat(55);d.optional&&this.unexpected(x),u.kind="method";let y=this.match(139);this.parseClassElementName(u),this.parsePostMemberNameModifiers(d),y?this.pushClassPrivateMethod(t,i,g,!0):(this.isNonstaticConstructor(s)&&this.raise(X.ConstructorIsAsync,s.key),this.pushClassMethod(t,s,g,!0,!1,!1))}else if((m==="get"||m==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(p),u.kind=m;let g=this.match(139);this.parseClassElementName(s),g?this.pushClassPrivateMethod(t,i,!1,!1):(this.isNonstaticConstructor(s)&&this.raise(X.ConstructorIsAccessor,s.key),this.pushClassMethod(t,s,!1,!1,!1,!1)),this.checkGetterSetterParams(s)}else if(m==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(p);let g=this.match(139);this.parseClassElementName(o),this.pushClassAccessorProperty(t,c,g)}else this.isLineTerminator()?h?this.pushClassPrivateProperty(t,l):this.pushClassProperty(t,o):this.unexpected()}parseClassElementName(t){let{type:r,value:a}=this.state;if((r===132||r===134)&&t.static&&a==="prototype"&&this.raise(X.StaticPrototype,this.state.startLoc),r===139){a==="constructor"&&this.raise(X.ConstructorClassPrivateField,this.state.startLoc);let n=this.parsePrivateName();return t.key=n,n}return this.parsePropertyName(t),t.key}parseClassStaticBlock(t,r){var a;this.scope.enter(720);let n=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let s=r.body=[];this.parseBlockOrModuleBlockBody(s,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=n,t.body.push(this.finishNode(r,"StaticBlock")),(a=r.decorators)!=null&&a.length&&this.raise(X.DecoratorStaticBlock,r)}pushClassProperty(t,r){!r.computed&&this.nameIsConstructor(r.key)&&this.raise(X.ConstructorClassField,r.key),t.body.push(this.parseClassProperty(r))}pushClassPrivateProperty(t,r){let a=this.parseClassPrivateProperty(r);t.body.push(a),this.classScope.declarePrivateName(this.getPrivateNameSV(a.key),0,a.key.loc.start)}pushClassAccessorProperty(t,r,a){!a&&!r.computed&&this.nameIsConstructor(r.key)&&this.raise(X.ConstructorClassField,r.key);let n=this.parseClassAccessorProperty(r);t.body.push(n),a&&this.classScope.declarePrivateName(this.getPrivateNameSV(n.key),0,n.key.loc.start)}pushClassMethod(t,r,a,n,s,i){t.body.push(this.parseMethod(r,a,n,s,i,"ClassMethod",!0))}pushClassPrivateMethod(t,r,a,n){let s=this.parseMethod(r,a,n,!1,!1,"ClassPrivateMethod",!0);t.body.push(s);let i=s.kind==="get"?s.static?6:2:s.kind==="set"?s.static?5:1:0;this.declareClassPrivateMethodInScope(s,i)}declareClassPrivateMethodInScope(t,r){this.classScope.declarePrivateName(this.getPrivateNameSV(t.key),r,t.key.loc.start)}parsePostMemberNameModifiers(t){}parseClassPrivateProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassPrivateProperty")}parseClassProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassProperty")}parseClassAccessorProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassAccessorProperty")}parseInitializer(t){this.scope.enter(592),this.expressionScope.enter(i4()),this.prodParam.enter(0),t.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(t,r,a,n=8331){if(Qr(this.state.type))t.id=this.parseIdentifier(),r&&this.declareNameFromIdentifier(t.id,n);else if(a||!r)t.id=null;else throw this.raise(X.MissingClassName,this.state.startLoc)}parseClassSuper(t){t.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(t,r){let a=this.parseMaybeImportPhase(t,!0),n=this.maybeParseExportDefaultSpecifier(t,a),s=!n||this.eat(12),i=s&&this.eatExportStar(t),o=i&&this.maybeParseExportNamespaceSpecifier(t),l=s&&(!o||this.eat(12)),c=n||i;if(i&&!o){if(n&&this.unexpected(),r)throw this.raise(X.UnsupportedDecoratorExport,t);return this.parseExportFrom(t,!0),this.sawUnambiguousESM=!0,this.finishNode(t,"ExportAllDeclaration")}let u=this.maybeParseExportNamedSpecifiers(t);n&&s&&!i&&!u&&this.unexpected(null,5),o&&l&&this.unexpected(null,98);let d;if(c||u){if(d=!1,r)throw this.raise(X.UnsupportedDecoratorExport,t);this.parseExportFrom(t,c)}else d=this.maybeParseExportDeclaration(t);if(c||u||d){var f;let p=t;if(this.checkExport(p,!0,!1,!!p.source),((f=p.declaration)==null?void 0:f.type)==="ClassDeclaration")this.maybeTakeDecorators(r,p.declaration,p);else if(r)throw this.raise(X.UnsupportedDecoratorExport,t);return this.sawUnambiguousESM=!0,this.finishNode(p,"ExportNamedDeclaration")}if(this.eat(65)){let p=t,m=this.parseExportDefaultExpression();if(p.declaration=m,m.type==="ClassDeclaration")this.maybeTakeDecorators(r,m,p);else if(r)throw this.raise(X.UnsupportedDecoratorExport,t);return this.checkExport(p,!0,!0),this.sawUnambiguousESM=!0,this.finishNode(p,"ExportDefaultDeclaration")}throw this.unexpected(null,5)}eatExportStar(t){return this.eat(55)}maybeParseExportDefaultSpecifier(t,r){if(r||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",r?.loc.start);let a=r||this.parseIdentifier(!0),n=this.startNodeAtNode(a);return n.exported=a,t.specifiers=[this.finishNode(n,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(t){if(this.isContextual(93)){var r,a;(a=(r=t).specifiers)!=null||(r.specifiers=[]);let n=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),n.exported=this.parseModuleExportName(),t.specifiers.push(this.finishNode(n,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(t){if(this.match(5)){let r=t;r.specifiers||(r.specifiers=[]);let a=r.exportKind==="type";return r.specifiers.push(...this.parseExportSpecifiers(a)),r.source=null,this.hasPlugin("importAssertions")?r.assertions=[]:r.attributes=[],r.declaration=null,!0}return!1}maybeParseExportDeclaration(t){return this.shouldParseExportDeclaration()?(t.specifiers=[],t.source=null,this.hasPlugin("importAssertions")?t.assertions=[]:t.attributes=[],t.declaration=this.parseExportDeclaration(t),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let t=this.nextTokenInLineStart();return this.isUnparsedContextual(t,"function")}parseExportDefaultExpression(){let t=this.startNode();if(this.match(68))return this.next(),this.parseFunction(t,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(t,13);if(this.match(80))return this.parseClass(t,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(X.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet()||this.isUsing()||this.isAwaitUsing())throw this.raise(X.UnsupportedDefaultExport,this.state.startLoc);let r=this.parseMaybeAssignAllowIn();return this.semicolon(),r}parseExportDeclaration(t){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:t}=this.state;if(Qr(t)){if(t===95&&!this.state.containsEsc||t===100)return!1;if((t===130||t===129)&&!this.state.containsEsc){let n=this.nextTokenStart(),s=this.input.charCodeAt(n);if(s===123||this.chStartsBindingIdentifier(s,n)&&!this.input.startsWith("from",n))return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let r=this.nextTokenStart(),a=this.isUnparsedContextual(r,"from");if(this.input.charCodeAt(r)===44||Qr(this.state.type)&&a)return!0;if(this.match(65)&&a){let n=this.input.charCodeAt(this.nextTokenStartSince(r+4));return n===34||n===39}return!1}parseExportFrom(t,r){this.eatContextual(98)?(t.source=this.parseImportSource(),this.checkExport(t),this.maybeParseImportAttributes(t),this.checkJSONModuleImport(t)):r&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:t}=this.state;return t===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(X.DecoratorBeforeExport,this.state.startLoc),!0):this.isUsing()?(this.raise(X.UsingDeclarationExport,this.state.startLoc),!0):this.isAwaitUsing()?(this.raise(X.UsingDeclarationExport,this.state.startLoc),!0):t===74||t===75||t===68||t===80||this.isLet()||this.isAsyncFunction()}checkExport(t,r,a,n){if(r){var s;if(a){if(this.checkDuplicateExports(t,"default"),this.hasPlugin("exportDefaultFrom")){var i;let o=t.declaration;o.type==="Identifier"&&o.name==="from"&&o.end-o.start===4&&!((i=o.extra)!=null&&i.parenthesized)&&this.raise(X.ExportDefaultFromAsIdentifier,o)}}else if((s=t.specifiers)!=null&&s.length)for(let o of t.specifiers){let{exported:l}=o,c=l.type==="Identifier"?l.name:l.value;if(this.checkDuplicateExports(o,c),!n&&o.local){let{local:u}=o;u.type!=="Identifier"?this.raise(X.ExportBindingIsString,o,{localName:u.value,exportName:c}):(this.checkReservedWord(u.name,u.loc.start,!0,!1),this.scope.checkLocalExport(u))}}else if(t.declaration){let o=t.declaration;if(o.type==="FunctionDeclaration"||o.type==="ClassDeclaration"){let{id:l}=o;if(!l)throw new Error("Assertion failure");this.checkDuplicateExports(t,l.name)}else if(o.type==="VariableDeclaration")for(let l of o.declarations)this.checkDeclaration(l.id)}}}checkDeclaration(t){if(t.type==="Identifier")this.checkDuplicateExports(t,t.name);else if(t.type==="ObjectPattern")for(let r of t.properties)this.checkDeclaration(r);else if(t.type==="ArrayPattern")for(let r of t.elements)r&&this.checkDeclaration(r);else t.type==="ObjectProperty"?this.checkDeclaration(t.value):t.type==="RestElement"?this.checkDeclaration(t.argument):t.type==="AssignmentPattern"&&this.checkDeclaration(t.left)}checkDuplicateExports(t,r){this.exportedIdentifiers.has(r)&&(r==="default"?this.raise(X.DuplicateDefaultExport,t):this.raise(X.DuplicateExport,t,{exportName:r})),this.exportedIdentifiers.add(r)}parseExportSpecifiers(t){let r=[],a=!0;for(this.expect(5);!this.eat(8);){if(a)a=!1;else if(this.expect(12),this.eat(8))break;let n=this.isContextual(130),s=this.match(134),i=this.startNode();i.local=this.parseModuleExportName(),r.push(this.parseExportSpecifier(i,s,t,n))}return r}parseExportSpecifier(t,r,a,n){return this.eatContextual(93)?t.exported=this.parseModuleExportName():r?t.exported=this.cloneStringLiteral(t.local):t.exported||(t.exported=this.cloneIdentifier(t.local)),this.finishNode(t,"ExportSpecifier")}parseModuleExportName(){if(this.match(134)){let t=this.parseStringLiteral(this.state.value),r=Hoe.exec(t.value);return r&&this.raise(X.ModuleExportNameHasLoneSurrogate,t,{surrogateCharCode:r[0].charCodeAt(0)}),t}return this.parseIdentifier(!0)}isJSONModuleImport(t){return t.assertions!=null?t.assertions.some(({key:r,value:a})=>a.value==="json"&&(r.type==="Identifier"?r.name==="type":r.value==="type")):!1}checkImportReflection(t){let{specifiers:r}=t,a=r.length===1?r[0].type:null;if(t.phase==="source")a!=="ImportDefaultSpecifier"&&this.raise(X.SourcePhaseImportRequiresDefault,r[0].loc.start);else if(t.phase==="defer")a!=="ImportNamespaceSpecifier"&&this.raise(X.DeferImportRequiresNamespace,r[0].loc.start);else if(t.module){var n;a!=="ImportDefaultSpecifier"&&this.raise(X.ImportReflectionNotBinding,r[0].loc.start),((n=t.assertions)==null?void 0:n.length)>0&&this.raise(X.ImportReflectionHasAssertion,r[0].loc.start)}}checkJSONModuleImport(t){if(this.isJSONModuleImport(t)&&t.type!=="ExportAllDeclaration"){let{specifiers:r}=t;if(r!=null){let a=r.find(n=>{let s;if(n.type==="ExportSpecifier"?s=n.local:n.type==="ImportSpecifier"&&(s=n.imported),s!==void 0)return s.type==="Identifier"?s.name!=="default":s.value!=="default"});a!==void 0&&this.raise(X.ImportJSONBindingNotDefault,a.loc.start)}}}isPotentialImportPhase(t){return t?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(t,r,a,n){r||(a==="module"?(this.expectPlugin("importReflection",n),t.module=!0):this.hasPlugin("importReflection")&&(t.module=!1),a==="source"?(this.expectPlugin("sourcePhaseImports",n),t.phase="source"):a==="defer"?(this.expectPlugin("deferredImportEvaluation",n),t.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(t.phase=null))}parseMaybeImportPhase(t,r){if(!this.isPotentialImportPhase(r))return this.applyImportPhase(t,r,null),null;let a=this.startNode(),n=this.parseIdentifierName(!0),{type:s}=this.state;return(Vl(s)?s!==98||this.lookaheadCharCode()===102:s!==12)?(this.applyImportPhase(t,r,n,a.loc.start),null):(this.applyImportPhase(t,r,null),this.createIdentifier(a,n))}isPrecedingIdImportPhase(t){let{type:r}=this.state;return Qr(r)?r!==98||this.lookaheadCharCode()===102:r!==12}parseImport(t){return this.match(134)?this.parseImportSourceAndAttributes(t):this.parseImportSpecifiersAndAfter(t,this.parseMaybeImportPhase(t,!1))}parseImportSpecifiersAndAfter(t,r){t.specifiers=[];let n=!this.maybeParseDefaultImportSpecifier(t,r)||this.eat(12),s=n&&this.maybeParseStarImportSpecifier(t);return n&&!s&&this.parseNamedImportSpecifiers(t),this.expectContextual(98),this.parseImportSourceAndAttributes(t)}parseImportSourceAndAttributes(t){var r;return(r=t.specifiers)!=null||(t.specifiers=[]),t.source=this.parseImportSource(),this.maybeParseImportAttributes(t),this.checkImportReflection(t),this.checkJSONModuleImport(t),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.match(134)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(t,r,a){r.local=this.parseIdentifier(),t.specifiers.push(this.finishImportSpecifier(r,a))}finishImportSpecifier(t,r,a=8201){return this.checkLVal(t.local,{type:r},a),this.finishNode(t,r)}parseImportAttributes(){this.expect(5);let t=[],r=new Set;do{if(this.match(8))break;let a=this.startNode(),n=this.state.value;if(r.has(n)&&this.raise(X.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:n}),r.add(n),this.match(134)?a.key=this.parseStringLiteral(n):a.key=this.parseIdentifier(!0),this.expect(14),!this.match(134))throw this.raise(X.ModuleAttributeInvalidValue,this.state.startLoc);a.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(a,"ImportAttribute"))}while(this.eat(12));return this.expect(8),t}parseModuleAttributes(){let t=[],r=new Set;do{let a=this.startNode();if(a.key=this.parseIdentifier(!0),a.key.name!=="type"&&this.raise(X.ModuleAttributeDifferentFromType,a.key),r.has(a.key.name)&&this.raise(X.ModuleAttributesWithDuplicateKeys,a.key,{key:a.key.name}),r.add(a.key.name),this.expect(14),!this.match(134))throw this.raise(X.ModuleAttributeInvalidValue,this.state.startLoc);a.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(a,"ImportAttribute"))}while(this.eat(12));return t}maybeParseImportAttributes(t){let r;var a=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?(r=this.parseModuleAttributes(),this.addExtra(t,"deprecatedWithLegacySyntax",!0)):r=this.parseImportAttributes(),a=!0}else this.isContextual(94)&&!this.hasPrecedingLineBreak()?(!this.hasPlugin("deprecatedImportAssert")&&!this.hasPlugin("importAssertions")&&this.raise(X.ImportAttributesUseAssert,this.state.startLoc),this.hasPlugin("importAssertions")||this.addExtra(t,"deprecatedAssertSyntax",!0),this.next(),r=this.parseImportAttributes()):r=[];!a&&this.hasPlugin("importAssertions")?t.assertions=r:t.attributes=r}maybeParseDefaultImportSpecifier(t,r){if(r){let a=this.startNodeAtNode(r);return a.local=r,t.specifiers.push(this.finishImportSpecifier(a,"ImportDefaultSpecifier")),!0}else if(Vl(this.state.type))return this.parseImportSpecifierLocal(t,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(t){if(this.match(55)){let r=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(t,r,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(t){let r=!0;for(this.expect(5);!this.eat(8);){if(r)r=!1;else{if(this.eat(14))throw this.raise(X.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let a=this.startNode(),n=this.match(134),s=this.isContextual(130);a.imported=this.parseModuleExportName();let i=this.parseImportSpecifier(a,n,t.importKind==="type"||t.importKind==="typeof",s,void 0);t.specifiers.push(i)}}parseImportSpecifier(t,r,a,n,s){if(this.eatContextual(93))t.local=this.parseIdentifier();else{let{imported:i}=t;if(r)throw this.raise(X.ImportBindingIsString,t,{importName:i.value});this.checkReservedWord(i.name,t.loc.start,!0,!0),t.local||(t.local=this.cloneIdentifier(i))}return this.finishImportSpecifier(t,"ImportSpecifier",s)}isThisParam(t){return t.type==="Identifier"&&t.name==="this"}},Ew=class extends EN{constructor(t,r,a){let n=qie(t);super(n,r),this.options=n,this.initializeScopes(),this.plugins=a,this.filename=n.sourceFilename,this.startIndex=n.startIndex;let s=0;n.allowAwaitOutsideFunction&&(s|=1),n.allowReturnOutsideFunction&&(s|=2),n.allowImportExportEverywhere&&(s|=8),n.allowSuperOutsideMethod&&(s|=16),n.allowUndeclaredExports&&(s|=64),n.allowNewTargetOutsideFunction&&(s|=4),n.allowYieldOutsideFunction&&(s|=32),n.ranges&&(s|=128),n.tokens&&(s|=256),n.createImportExpressions&&(s|=512),n.createParenthesizedExpressions&&(s|=1024),n.errorRecovery&&(s|=2048),n.attachComment&&(s|=4096),n.annexB&&(s|=8192),this.optionFlags=s}getScopeHandler(){return u0}parse(){this.enterInitialScopes();let t=this.startNode(),r=this.startNode();this.nextToken(),t.errors=null;let a=this.parseTopLevel(t,r);return a.errors=this.state.errors,a.comments.length=this.state.commentsLen,a}};function Goe(e,t){var r;if(((r=t)==null?void 0:r.sourceType)==="unambiguous"){t=Object.assign({},t);try{t.sourceType="module";let a=o0(t,e),n=a.parse();if(a.sawUnambiguousESM)return n;if(a.ambiguousScriptDifferentAst)try{return t.sourceType="script",o0(t,e).parse()}catch{}else n.program.sourceType="script";return n}catch(a){try{return t.sourceType="script",o0(t,e).parse()}catch{}throw a}}else return o0(t,e).parse()}function Koe(e,t){let r=o0(t,e);return r.options.strictMode&&(r.state.strict=!0),r.getExpression()}function Woe(e){let t={};for(let r of Object.keys(e))t[r]=vu(e[r]);return t}var Xoe=Woe(Kie);function o0(e,t){let r=Ew,a=new Map;if(e!=null&&e.plugins){for(let n of e.plugins){let s,i;typeof n=="string"?s=n:[s,i]=n,a.has(s)||a.set(s,i||{})}zoe(a),r=Yoe(a)}return new r(e,t,a)}var XB=new Map;function Yoe(e){let t=[];for(let n of Voe)e.has(n)&&t.push(n);let r=t.join("|"),a=XB.get(r);if(!a){a=Ew;for(let n of t)a=c4[n](a);XB.set(r,a)}return a}p0.parse=Goe;p0.parseExpression=Koe;p0.tokTypes=Xoe});var _N=ne(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.Var=Er.User=Er.Statement=Er.SpreadProperty=Er.Scope=Er.RestProperty=Er.ReferencedMemberExpression=Er.ReferencedIdentifier=Er.Referenced=Er.Pure=Er.NumericLiteralTypeAnnotation=Er.Generated=Er.ForAwaitStatement=Er.Flow=Er.Expression=Er.ExistentialTypeParam=Er.BlockScoped=Er.BindingIdentifier=void 0;var aet=Er.ReferencedIdentifier=["Identifier","JSXIdentifier"],net=Er.ReferencedMemberExpression=["MemberExpression"],set=Er.BindingIdentifier=["Identifier"],iet=Er.Statement=["Statement"],oet=Er.Expression=["Expression"],cet=Er.Scope=["Scopable","Pattern"],uet=Er.Referenced=null,det=Er.BlockScoped=["FunctionDeclaration","ClassDeclaration","VariableDeclaration"],fet=Er.Var=["VariableDeclaration"],pet=Er.User=null,met=Er.Generated=null,het=Er.Pure=null,get=Er.Flow=["Flow","ImportDeclaration","ExportDeclaration","ImportSpecifier"],yet=Er.RestProperty=["RestElement"],xet=Er.SpreadProperty=["RestElement"],bet=Er.ExistentialTypeParam=["ExistsTypeAnnotation"],vet=Er.NumericLiteralTypeAnnotation=["NumberLiteralTypeAnnotation"],Tet=Er.ForAwaitStatement=["ForOfStatement"]});var d4=ne((Cet,u4)=>{var Eg=1e3,Pg=Eg*60,Ag=Pg*60,tm=Ag*24,Joe=tm*7,Qoe=tm*365.25;u4.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return Zoe(e);if(r==="number"&&isFinite(e))return t.long?tle(e):ele(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Zoe(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),a=(t[2]||"ms").toLowerCase();switch(a){case"years":case"year":case"yrs":case"yr":case"y":return r*Qoe;case"weeks":case"week":case"w":return r*Joe;case"days":case"day":case"d":return r*tm;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Ag;case"minutes":case"minute":case"mins":case"min":case"m":return r*Pg;case"seconds":case"second":case"secs":case"sec":case"s":return r*Eg;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function ele(e){var t=Math.abs(e);return t>=tm?Math.round(e/tm)+"d":t>=Ag?Math.round(e/Ag)+"h":t>=Pg?Math.round(e/Pg)+"m":t>=Eg?Math.round(e/Eg)+"s":e+"ms"}function tle(e){var t=Math.abs(e);return t>=tm?Aw(e,t,tm,"day"):t>=Ag?Aw(e,t,Ag,"hour"):t>=Pg?Aw(e,t,Pg,"minute"):t>=Eg?Aw(e,t,Eg,"second"):e+" ms"}function Aw(e,t,r,a){var n=t>=r*1.5;return Math.round(e/r)+" "+a+(n?"s":"")}});var p4=ne((Eet,f4)=>{function rle(e){r.debug=r,r.default=r,r.coerce=l,r.disable=i,r.enable=n,r.enabled=o,r.humanize=d4(),r.destroy=c,Object.keys(e).forEach(u=>{r[u]=e[u]}),r.names=[],r.skips=[],r.formatters={};function t(u){let d=0;for(let f=0;f<u.length;f++)d=(d<<5)-d+u.charCodeAt(f),d|=0;return r.colors[Math.abs(d)%r.colors.length]}r.selectColor=t;function r(u){let d,f=null,p,m;function h(...x){if(!h.enabled)return;let g=h,y=Number(new Date),b=y-(d||y);g.diff=b,g.prev=d,g.curr=y,d=y,x[0]=r.coerce(x[0]),typeof x[0]!="string"&&x.unshift("%O");let S=0;x[0]=x[0].replace(/%([a-zA-Z%])/g,(P,C)=>{if(P==="%%")return"%";S++;let I=r.formatters[C];if(typeof I=="function"){let R=x[S];P=I.call(g,R),x.splice(S,1),S--}return P}),r.formatArgs.call(g,x),(g.log||r.log).apply(g,x)}return h.namespace=u,h.useColors=r.useColors(),h.color=r.selectColor(u),h.extend=a,h.destroy=r.destroy,Object.defineProperty(h,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(p!==r.namespaces&&(p=r.namespaces,m=r.enabled(u)),m),set:x=>{f=x}}),typeof r.init=="function"&&r.init(h),h}function a(u,d){let f=r(this.namespace+(typeof d>"u"?":":d)+u);return f.log=this.log,f}function n(u){r.save(u),r.namespaces=u,r.names=[],r.skips=[];let d=(typeof u=="string"?u:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let f of d)f[0]==="-"?r.skips.push(f.slice(1)):r.names.push(f)}function s(u,d){let f=0,p=0,m=-1,h=0;for(;f<u.length;)if(p<d.length&&(d[p]===u[f]||d[p]==="*"))d[p]==="*"?(m=p,h=f,p++):(f++,p++);else if(m!==-1)p=m+1,h++,f=h;else return!1;for(;p<d.length&&d[p]==="*";)p++;return p===d.length}function i(){let u=[...r.names,...r.skips.map(d=>"-"+d)].join(",");return r.enable(""),u}function o(u){for(let d of r.skips)if(s(u,d))return!1;for(let d of r.names)if(s(u,d))return!0;return!1}function l(u){return u instanceof Error?u.stack||u.message:u}function c(){}return r.enable(r.load()),r}f4.exports=rle});var m4=ne((Ui,Iw)=>{Ui.formatArgs=nle;Ui.save=sle;Ui.load=ile;Ui.useColors=ale;Ui.storage=ole();Ui.destroy=(()=>{let e=!1;return()=>{e||(e=!0)}})();Ui.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function ale(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function nle(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Iw.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,a=0;e[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(r++,n==="%c"&&(a=r))}),e.splice(a,0,t)}Ui.log=console.debug||console.log||(()=>{});function sle(e){try{e?Ui.storage.setItem("debug",e):Ui.storage.removeItem("debug")}catch{}}function ile(){let e;try{e=Ui.storage.getItem("debug")||Ui.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function ole(){try{return localStorage}catch{}}Iw.exports=p4()(Ui);var{formatters:lle}=Iw.exports;lle.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Nw=ne(ON=>{"use strict";Object.defineProperty(ON,"__esModule",{value:!0});ON.default=cle;function cle(e,t){let r=Object.keys(t);for(let a of r)if(e[a]!==t[a])return!1;return!0}});var Ig=ne(FN=>{"use strict";Object.defineProperty(FN,"__esModule",{value:!0});FN.default=ule;var h4=new Set;function ule(e,t,r="",a=e){if(h4.has(a))return;h4.add(a);let{internal:n,trace:s}=dle(1,2)}function dle(e,t){let{stackTraceLimit:r,prepareStackTrace:a}=Error,n;if(Error.stackTraceLimit=1+e+t,Error.prepareStackTrace=function(i,o){n=o},new Error().stack,Error.stackTraceLimit=r,Error.prepareStackTrace=a,!n)return{internal:!1,trace:""};let s=n.slice(1+e,1+e+t);return{internal:/[\\/]@babel[\\/]/.test(s[1].getFileName()),trace:s.map(i=>` at ${i}`).join(`
|
|
`)}}});var on=ne(F=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});F.isAccessor=Npe;F.isAnyTypeAnnotation=Kce;F.isArgumentPlaceholder=Tde;F.isArrayExpression=fle;F.isArrayPattern=uce;F.isArrayTypeAnnotation=Wce;F.isArrowFunctionExpression=dce;F.isAssignmentExpression=ple;F.isAssignmentPattern=cce;F.isAwaitExpression=Dce;F.isBigIntLiteral=Oce;F.isBinary=Jfe;F.isBinaryExpression=mle;F.isBindExpression=wde;F.isBlock=epe;F.isBlockParent=Zfe;F.isBlockStatement=xle;F.isBooleanLiteral=Ule;F.isBooleanLiteralTypeAnnotation=Yce;F.isBooleanTypeAnnotation=Xce;F.isBreakStatement=ble;F.isCallExpression=vle;F.isCatchClause=Sle;F.isClass=Ppe;F.isClassAccessorProperty=zce;F.isClassBody=fce;F.isClassDeclaration=mce;F.isClassExpression=pce;F.isClassImplements=Qce;F.isClassMethod=Pce;F.isClassPrivateMethod=qce;F.isClassPrivateProperty=Vce;F.isClassProperty=jce;F.isCompletionStatement=ape;F.isConditional=npe;F.isConditionalExpression=Tle;F.isContinueStatement=wle;F.isDebuggerStatement=Cle;F.isDecimalLiteral=Nde;F.isDeclaration=ppe;F.isDeclareClass=Zce;F.isDeclareExportAllDeclaration=lue;F.isDeclareExportDeclaration=oue;F.isDeclareFunction=eue;F.isDeclareInterface=tue;F.isDeclareModule=rue;F.isDeclareModuleExports=aue;F.isDeclareOpaqueType=sue;F.isDeclareTypeAlias=nue;F.isDeclareVariable=iue;F.isDeclaredPredicate=cue;F.isDecorator=Cde;F.isDirective=gle;F.isDirectiveLiteral=yle;F.isDoExpression=Ede;F.isDoWhileStatement=Ele;F.isEmptyStatement=Ple;F.isEmptyTypeAnnotation=vue;F.isEnumBody=Ope;F.isEnumBooleanBody=Wue;F.isEnumBooleanMember=Que;F.isEnumDeclaration=Kue;F.isEnumDefaultedMember=tde;F.isEnumMember=Fpe;F.isEnumNumberBody=Xue;F.isEnumNumberMember=Zue;F.isEnumStringBody=Yue;F.isEnumStringMember=ede;F.isEnumSymbolBody=Jue;F.isExistsTypeAnnotation=uue;F.isExportAllDeclaration=hce;F.isExportDeclaration=Ape;F.isExportDefaultDeclaration=gce;F.isExportDefaultSpecifier=Pde;F.isExportNamedDeclaration=yce;F.isExportNamespaceSpecifier=Fce;F.isExportSpecifier=xce;F.isExpression=Yfe;F.isExpressionStatement=Ale;F.isExpressionWrapper=ope;F.isFile=Ile;F.isFlow=Rpe;F.isFlowBaseAnnotation=Mpe;F.isFlowDeclaration=Dpe;F.isFlowPredicate=_pe;F.isFlowType=kpe;F.isFor=lpe;F.isForInStatement=Nle;F.isForOfStatement=bce;F.isForStatement=Lle;F.isForXStatement=cpe;F.isFunction=upe;F.isFunctionDeclaration=Rle;F.isFunctionExpression=kle;F.isFunctionParameter=mpe;F.isFunctionParent=dpe;F.isFunctionTypeAnnotation=due;F.isFunctionTypeParam=fue;F.isGenericTypeAnnotation=pue;F.isIdentifier=Mle;F.isIfStatement=Dle;F.isImmutable=bpe;F.isImport=_ce;F.isImportAttribute=Gce;F.isImportDeclaration=vce;F.isImportDefaultSpecifier=Sce;F.isImportExpression=Cce;F.isImportNamespaceSpecifier=Tce;F.isImportOrExportDeclaration=g4;F.isImportSpecifier=wce;F.isIndexedAccessType=rde;F.isInferredPredicate=mue;F.isInterfaceDeclaration=gue;F.isInterfaceExtends=hue;F.isInterfaceTypeAnnotation=yue;F.isInterpreterDirective=hle;F.isIntersectionTypeAnnotation=xue;F.isJSX=Bpe;F.isJSXAttribute=nde;F.isJSXClosingElement=sde;F.isJSXClosingFragment=xde;F.isJSXElement=ide;F.isJSXEmptyExpression=ode;F.isJSXExpressionContainer=lde;F.isJSXFragment=gde;F.isJSXIdentifier=ude;F.isJSXMemberExpression=dde;F.isJSXNamespacedName=fde;F.isJSXOpeningElement=pde;F.isJSXOpeningFragment=yde;F.isJSXSpreadAttribute=mde;F.isJSXSpreadChild=cde;F.isJSXText=hde;F.isLVal=gpe;F.isLabeledStatement=_le;F.isLiteral=xpe;F.isLogicalExpression=zle;F.isLoop=spe;F.isMemberExpression=Vle;F.isMetaProperty=Ece;F.isMethod=Spe;F.isMiscellaneous=Upe;F.isMixedTypeAnnotation=bue;F.isModuleDeclaration=Wpe;F.isModuleExpression=Lde;F.isModuleSpecifier=Ipe;F.isNewExpression=qle;F.isNoop=bde;F.isNullLiteral=Ble;F.isNullLiteralTypeAnnotation=Jce;F.isNullableTypeAnnotation=Sue;F.isNumberLiteral=Hpe;F.isNumberLiteralTypeAnnotation=Tue;F.isNumberTypeAnnotation=wue;F.isNumericLiteral=Fle;F.isObjectExpression=$le;F.isObjectMember=Tpe;F.isObjectMethod=Gle;F.isObjectPattern=Ace;F.isObjectProperty=Kle;F.isObjectTypeAnnotation=Cue;F.isObjectTypeCallProperty=Pue;F.isObjectTypeIndexer=Aue;F.isObjectTypeInternalSlot=Eue;F.isObjectTypeProperty=Iue;F.isObjectTypeSpreadProperty=Nue;F.isOpaqueType=Lue;F.isOptionalCallExpression=Uce;F.isOptionalIndexedAccessType=ade;F.isOptionalMemberExpression=Bce;F.isParenthesizedExpression=Jle;F.isPattern=Epe;F.isPatternLike=hpe;F.isPipelineBareFunction=Mde;F.isPipelinePrimaryTopicReference=Dde;F.isPipelineTopicExpression=kde;F.isPlaceholder=vde;F.isPrivate=Lpe;F.isPrivateName=Hce;F.isProgram=Hle;F.isProperty=wpe;F.isPureish=fpe;F.isQualifiedTypeIdentifier=Rue;F.isRecordExpression=Ade;F.isRegExpLiteral=jle;F.isRegexLiteral=$pe;F.isRestElement=Wle;F.isRestProperty=Gpe;F.isReturnStatement=Xle;F.isScopable=Qfe;F.isSequenceExpression=Yle;F.isSpreadElement=Ice;F.isSpreadProperty=Kpe;F.isStandardized=Xfe;F.isStatement=tpe;F.isStaticBlock=$ce;F.isStringLiteral=Ole;F.isStringLiteralTypeAnnotation=kue;F.isStringTypeAnnotation=Mue;F.isSuper=Nce;F.isSwitchCase=Qle;F.isSwitchStatement=Zle;F.isSymbolTypeAnnotation=Due;F.isTSAnyKeyword=$de;F.isTSArrayType=dfe;F.isTSAsExpression=Rfe;F.isTSBaseType=qpe;F.isTSBigIntKeyword=Kde;F.isTSBooleanKeyword=Gde;F.isTSCallSignatureDeclaration=jde;F.isTSConditionalType=xfe;F.isTSConstructSignatureDeclaration=zde;F.isTSConstructorType=ife;F.isTSDeclareFunction=Fde;F.isTSDeclareMethod=Bde;F.isTSEntityName=ype;F.isTSEnumBody=Dfe;F.isTSEnumDeclaration=_fe;F.isTSEnumMember=Ofe;F.isTSExportAssignment=qfe;F.isTSExpressionWithTypeArguments=Pfe;F.isTSExternalModuleReference=zfe;F.isTSFunctionType=sfe;F.isTSImportEqualsDeclaration=jfe;F.isTSImportType=Ufe;F.isTSIndexSignature=Hde;F.isTSIndexedAccessType=Tfe;F.isTSInferType=bfe;F.isTSInstantiationExpression=Lfe;F.isTSInterfaceBody=Ife;F.isTSInterfaceDeclaration=Afe;F.isTSIntersectionType=yfe;F.isTSIntrinsicKeyword=Wde;F.isTSLiteralType=Efe;F.isTSMappedType=wfe;F.isTSMethodSignature=qde;F.isTSModuleBlock=Bfe;F.isTSModuleDeclaration=Ffe;F.isTSNamedTupleMember=hfe;F.isTSNamespaceExportDeclaration=Hfe;F.isTSNeverKeyword=Xde;F.isTSNonNullExpression=Vfe;F.isTSNullKeyword=Yde;F.isTSNumberKeyword=Jde;F.isTSObjectKeyword=Qde;F.isTSOptionalType=pfe;F.isTSParameterProperty=Ode;F.isTSParenthesizedType=vfe;F.isTSPropertySignature=Vde;F.isTSQualifiedName=Ude;F.isTSRestType=mfe;F.isTSSatisfiesExpression=kfe;F.isTSStringKeyword=Zde;F.isTSSymbolKeyword=efe;F.isTSTemplateLiteralType=Cfe;F.isTSThisType=nfe;F.isTSTupleType=ffe;F.isTSType=Vpe;F.isTSTypeAliasDeclaration=Nfe;F.isTSTypeAnnotation=$fe;F.isTSTypeAssertion=Mfe;F.isTSTypeElement=zpe;F.isTSTypeLiteral=ufe;F.isTSTypeOperator=Sfe;F.isTSTypeParameter=Wfe;F.isTSTypeParameterDeclaration=Kfe;F.isTSTypeParameterInstantiation=Gfe;F.isTSTypePredicate=lfe;F.isTSTypeQuery=cfe;F.isTSTypeReference=ofe;F.isTSUndefinedKeyword=tfe;F.isTSUnionType=gfe;F.isTSUnknownKeyword=rfe;F.isTSVoidKeyword=afe;F.isTaggedTemplateExpression=Lce;F.isTemplateElement=Rce;F.isTemplateLiteral=kce;F.isTerminatorless=rpe;F.isThisExpression=ece;F.isThisTypeAnnotation=_ue;F.isThrowStatement=tce;F.isTopicReference=Rde;F.isTryStatement=rce;F.isTupleExpression=Ide;F.isTupleTypeAnnotation=Oue;F.isTypeAlias=Bue;F.isTypeAnnotation=Uue;F.isTypeCastExpression=jue;F.isTypeParameter=zue;F.isTypeParameterDeclaration=Vue;F.isTypeParameterInstantiation=que;F.isTypeScript=jpe;F.isTypeofTypeAnnotation=Fue;F.isUnaryExpression=ace;F.isUnaryLike=Cpe;F.isUnionTypeAnnotation=Hue;F.isUpdateExpression=nce;F.isUserWhitespacable=vpe;F.isV8IntrinsicIdentifier=Sde;F.isVariableDeclaration=sce;F.isVariableDeclarator=ice;F.isVariance=$ue;F.isVoidPattern=_de;F.isVoidTypeAnnotation=Gue;F.isWhile=ipe;F.isWhileStatement=oce;F.isWithStatement=lce;F.isYieldExpression=Mce;var j=Nw(),m0=Ig();function fle(e,t){return!e||e.type!=="ArrayExpression"?!1:t==null||(0,j.default)(e,t)}function ple(e,t){return!e||e.type!=="AssignmentExpression"?!1:t==null||(0,j.default)(e,t)}function mle(e,t){return!e||e.type!=="BinaryExpression"?!1:t==null||(0,j.default)(e,t)}function hle(e,t){return!e||e.type!=="InterpreterDirective"?!1:t==null||(0,j.default)(e,t)}function gle(e,t){return!e||e.type!=="Directive"?!1:t==null||(0,j.default)(e,t)}function yle(e,t){return!e||e.type!=="DirectiveLiteral"?!1:t==null||(0,j.default)(e,t)}function xle(e,t){return!e||e.type!=="BlockStatement"?!1:t==null||(0,j.default)(e,t)}function ble(e,t){return!e||e.type!=="BreakStatement"?!1:t==null||(0,j.default)(e,t)}function vle(e,t){return!e||e.type!=="CallExpression"?!1:t==null||(0,j.default)(e,t)}function Sle(e,t){return!e||e.type!=="CatchClause"?!1:t==null||(0,j.default)(e,t)}function Tle(e,t){return!e||e.type!=="ConditionalExpression"?!1:t==null||(0,j.default)(e,t)}function wle(e,t){return!e||e.type!=="ContinueStatement"?!1:t==null||(0,j.default)(e,t)}function Cle(e,t){return!e||e.type!=="DebuggerStatement"?!1:t==null||(0,j.default)(e,t)}function Ele(e,t){return!e||e.type!=="DoWhileStatement"?!1:t==null||(0,j.default)(e,t)}function Ple(e,t){return!e||e.type!=="EmptyStatement"?!1:t==null||(0,j.default)(e,t)}function Ale(e,t){return!e||e.type!=="ExpressionStatement"?!1:t==null||(0,j.default)(e,t)}function Ile(e,t){return!e||e.type!=="File"?!1:t==null||(0,j.default)(e,t)}function Nle(e,t){return!e||e.type!=="ForInStatement"?!1:t==null||(0,j.default)(e,t)}function Lle(e,t){return!e||e.type!=="ForStatement"?!1:t==null||(0,j.default)(e,t)}function Rle(e,t){return!e||e.type!=="FunctionDeclaration"?!1:t==null||(0,j.default)(e,t)}function kle(e,t){return!e||e.type!=="FunctionExpression"?!1:t==null||(0,j.default)(e,t)}function Mle(e,t){return!e||e.type!=="Identifier"?!1:t==null||(0,j.default)(e,t)}function Dle(e,t){return!e||e.type!=="IfStatement"?!1:t==null||(0,j.default)(e,t)}function _le(e,t){return!e||e.type!=="LabeledStatement"?!1:t==null||(0,j.default)(e,t)}function Ole(e,t){return!e||e.type!=="StringLiteral"?!1:t==null||(0,j.default)(e,t)}function Fle(e,t){return!e||e.type!=="NumericLiteral"?!1:t==null||(0,j.default)(e,t)}function Ble(e,t){return!e||e.type!=="NullLiteral"?!1:t==null||(0,j.default)(e,t)}function Ule(e,t){return!e||e.type!=="BooleanLiteral"?!1:t==null||(0,j.default)(e,t)}function jle(e,t){return!e||e.type!=="RegExpLiteral"?!1:t==null||(0,j.default)(e,t)}function zle(e,t){return!e||e.type!=="LogicalExpression"?!1:t==null||(0,j.default)(e,t)}function Vle(e,t){return!e||e.type!=="MemberExpression"?!1:t==null||(0,j.default)(e,t)}function qle(e,t){return!e||e.type!=="NewExpression"?!1:t==null||(0,j.default)(e,t)}function Hle(e,t){return!e||e.type!=="Program"?!1:t==null||(0,j.default)(e,t)}function $le(e,t){return!e||e.type!=="ObjectExpression"?!1:t==null||(0,j.default)(e,t)}function Gle(e,t){return!e||e.type!=="ObjectMethod"?!1:t==null||(0,j.default)(e,t)}function Kle(e,t){return!e||e.type!=="ObjectProperty"?!1:t==null||(0,j.default)(e,t)}function Wle(e,t){return!e||e.type!=="RestElement"?!1:t==null||(0,j.default)(e,t)}function Xle(e,t){return!e||e.type!=="ReturnStatement"?!1:t==null||(0,j.default)(e,t)}function Yle(e,t){return!e||e.type!=="SequenceExpression"?!1:t==null||(0,j.default)(e,t)}function Jle(e,t){return!e||e.type!=="ParenthesizedExpression"?!1:t==null||(0,j.default)(e,t)}function Qle(e,t){return!e||e.type!=="SwitchCase"?!1:t==null||(0,j.default)(e,t)}function Zle(e,t){return!e||e.type!=="SwitchStatement"?!1:t==null||(0,j.default)(e,t)}function ece(e,t){return!e||e.type!=="ThisExpression"?!1:t==null||(0,j.default)(e,t)}function tce(e,t){return!e||e.type!=="ThrowStatement"?!1:t==null||(0,j.default)(e,t)}function rce(e,t){return!e||e.type!=="TryStatement"?!1:t==null||(0,j.default)(e,t)}function ace(e,t){return!e||e.type!=="UnaryExpression"?!1:t==null||(0,j.default)(e,t)}function nce(e,t){return!e||e.type!=="UpdateExpression"?!1:t==null||(0,j.default)(e,t)}function sce(e,t){return!e||e.type!=="VariableDeclaration"?!1:t==null||(0,j.default)(e,t)}function ice(e,t){return!e||e.type!=="VariableDeclarator"?!1:t==null||(0,j.default)(e,t)}function oce(e,t){return!e||e.type!=="WhileStatement"?!1:t==null||(0,j.default)(e,t)}function lce(e,t){return!e||e.type!=="WithStatement"?!1:t==null||(0,j.default)(e,t)}function cce(e,t){return!e||e.type!=="AssignmentPattern"?!1:t==null||(0,j.default)(e,t)}function uce(e,t){return!e||e.type!=="ArrayPattern"?!1:t==null||(0,j.default)(e,t)}function dce(e,t){return!e||e.type!=="ArrowFunctionExpression"?!1:t==null||(0,j.default)(e,t)}function fce(e,t){return!e||e.type!=="ClassBody"?!1:t==null||(0,j.default)(e,t)}function pce(e,t){return!e||e.type!=="ClassExpression"?!1:t==null||(0,j.default)(e,t)}function mce(e,t){return!e||e.type!=="ClassDeclaration"?!1:t==null||(0,j.default)(e,t)}function hce(e,t){return!e||e.type!=="ExportAllDeclaration"?!1:t==null||(0,j.default)(e,t)}function gce(e,t){return!e||e.type!=="ExportDefaultDeclaration"?!1:t==null||(0,j.default)(e,t)}function yce(e,t){return!e||e.type!=="ExportNamedDeclaration"?!1:t==null||(0,j.default)(e,t)}function xce(e,t){return!e||e.type!=="ExportSpecifier"?!1:t==null||(0,j.default)(e,t)}function bce(e,t){return!e||e.type!=="ForOfStatement"?!1:t==null||(0,j.default)(e,t)}function vce(e,t){return!e||e.type!=="ImportDeclaration"?!1:t==null||(0,j.default)(e,t)}function Sce(e,t){return!e||e.type!=="ImportDefaultSpecifier"?!1:t==null||(0,j.default)(e,t)}function Tce(e,t){return!e||e.type!=="ImportNamespaceSpecifier"?!1:t==null||(0,j.default)(e,t)}function wce(e,t){return!e||e.type!=="ImportSpecifier"?!1:t==null||(0,j.default)(e,t)}function Cce(e,t){return!e||e.type!=="ImportExpression"?!1:t==null||(0,j.default)(e,t)}function Ece(e,t){return!e||e.type!=="MetaProperty"?!1:t==null||(0,j.default)(e,t)}function Pce(e,t){return!e||e.type!=="ClassMethod"?!1:t==null||(0,j.default)(e,t)}function Ace(e,t){return!e||e.type!=="ObjectPattern"?!1:t==null||(0,j.default)(e,t)}function Ice(e,t){return!e||e.type!=="SpreadElement"?!1:t==null||(0,j.default)(e,t)}function Nce(e,t){return!e||e.type!=="Super"?!1:t==null||(0,j.default)(e,t)}function Lce(e,t){return!e||e.type!=="TaggedTemplateExpression"?!1:t==null||(0,j.default)(e,t)}function Rce(e,t){return!e||e.type!=="TemplateElement"?!1:t==null||(0,j.default)(e,t)}function kce(e,t){return!e||e.type!=="TemplateLiteral"?!1:t==null||(0,j.default)(e,t)}function Mce(e,t){return!e||e.type!=="YieldExpression"?!1:t==null||(0,j.default)(e,t)}function Dce(e,t){return!e||e.type!=="AwaitExpression"?!1:t==null||(0,j.default)(e,t)}function _ce(e,t){return!e||e.type!=="Import"?!1:t==null||(0,j.default)(e,t)}function Oce(e,t){return!e||e.type!=="BigIntLiteral"?!1:t==null||(0,j.default)(e,t)}function Fce(e,t){return!e||e.type!=="ExportNamespaceSpecifier"?!1:t==null||(0,j.default)(e,t)}function Bce(e,t){return!e||e.type!=="OptionalMemberExpression"?!1:t==null||(0,j.default)(e,t)}function Uce(e,t){return!e||e.type!=="OptionalCallExpression"?!1:t==null||(0,j.default)(e,t)}function jce(e,t){return!e||e.type!=="ClassProperty"?!1:t==null||(0,j.default)(e,t)}function zce(e,t){return!e||e.type!=="ClassAccessorProperty"?!1:t==null||(0,j.default)(e,t)}function Vce(e,t){return!e||e.type!=="ClassPrivateProperty"?!1:t==null||(0,j.default)(e,t)}function qce(e,t){return!e||e.type!=="ClassPrivateMethod"?!1:t==null||(0,j.default)(e,t)}function Hce(e,t){return!e||e.type!=="PrivateName"?!1:t==null||(0,j.default)(e,t)}function $ce(e,t){return!e||e.type!=="StaticBlock"?!1:t==null||(0,j.default)(e,t)}function Gce(e,t){return!e||e.type!=="ImportAttribute"?!1:t==null||(0,j.default)(e,t)}function Kce(e,t){return!e||e.type!=="AnyTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function Wce(e,t){return!e||e.type!=="ArrayTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function Xce(e,t){return!e||e.type!=="BooleanTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function Yce(e,t){return!e||e.type!=="BooleanLiteralTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function Jce(e,t){return!e||e.type!=="NullLiteralTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function Qce(e,t){return!e||e.type!=="ClassImplements"?!1:t==null||(0,j.default)(e,t)}function Zce(e,t){return!e||e.type!=="DeclareClass"?!1:t==null||(0,j.default)(e,t)}function eue(e,t){return!e||e.type!=="DeclareFunction"?!1:t==null||(0,j.default)(e,t)}function tue(e,t){return!e||e.type!=="DeclareInterface"?!1:t==null||(0,j.default)(e,t)}function rue(e,t){return!e||e.type!=="DeclareModule"?!1:t==null||(0,j.default)(e,t)}function aue(e,t){return!e||e.type!=="DeclareModuleExports"?!1:t==null||(0,j.default)(e,t)}function nue(e,t){return!e||e.type!=="DeclareTypeAlias"?!1:t==null||(0,j.default)(e,t)}function sue(e,t){return!e||e.type!=="DeclareOpaqueType"?!1:t==null||(0,j.default)(e,t)}function iue(e,t){return!e||e.type!=="DeclareVariable"?!1:t==null||(0,j.default)(e,t)}function oue(e,t){return!e||e.type!=="DeclareExportDeclaration"?!1:t==null||(0,j.default)(e,t)}function lue(e,t){return!e||e.type!=="DeclareExportAllDeclaration"?!1:t==null||(0,j.default)(e,t)}function cue(e,t){return!e||e.type!=="DeclaredPredicate"?!1:t==null||(0,j.default)(e,t)}function uue(e,t){return!e||e.type!=="ExistsTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function due(e,t){return!e||e.type!=="FunctionTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function fue(e,t){return!e||e.type!=="FunctionTypeParam"?!1:t==null||(0,j.default)(e,t)}function pue(e,t){return!e||e.type!=="GenericTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function mue(e,t){return!e||e.type!=="InferredPredicate"?!1:t==null||(0,j.default)(e,t)}function hue(e,t){return!e||e.type!=="InterfaceExtends"?!1:t==null||(0,j.default)(e,t)}function gue(e,t){return!e||e.type!=="InterfaceDeclaration"?!1:t==null||(0,j.default)(e,t)}function yue(e,t){return!e||e.type!=="InterfaceTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function xue(e,t){return!e||e.type!=="IntersectionTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function bue(e,t){return!e||e.type!=="MixedTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function vue(e,t){return!e||e.type!=="EmptyTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function Sue(e,t){return!e||e.type!=="NullableTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function Tue(e,t){return!e||e.type!=="NumberLiteralTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function wue(e,t){return!e||e.type!=="NumberTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function Cue(e,t){return!e||e.type!=="ObjectTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function Eue(e,t){return!e||e.type!=="ObjectTypeInternalSlot"?!1:t==null||(0,j.default)(e,t)}function Pue(e,t){return!e||e.type!=="ObjectTypeCallProperty"?!1:t==null||(0,j.default)(e,t)}function Aue(e,t){return!e||e.type!=="ObjectTypeIndexer"?!1:t==null||(0,j.default)(e,t)}function Iue(e,t){return!e||e.type!=="ObjectTypeProperty"?!1:t==null||(0,j.default)(e,t)}function Nue(e,t){return!e||e.type!=="ObjectTypeSpreadProperty"?!1:t==null||(0,j.default)(e,t)}function Lue(e,t){return!e||e.type!=="OpaqueType"?!1:t==null||(0,j.default)(e,t)}function Rue(e,t){return!e||e.type!=="QualifiedTypeIdentifier"?!1:t==null||(0,j.default)(e,t)}function kue(e,t){return!e||e.type!=="StringLiteralTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function Mue(e,t){return!e||e.type!=="StringTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function Due(e,t){return!e||e.type!=="SymbolTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function _ue(e,t){return!e||e.type!=="ThisTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function Oue(e,t){return!e||e.type!=="TupleTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function Fue(e,t){return!e||e.type!=="TypeofTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function Bue(e,t){return!e||e.type!=="TypeAlias"?!1:t==null||(0,j.default)(e,t)}function Uue(e,t){return!e||e.type!=="TypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function jue(e,t){return!e||e.type!=="TypeCastExpression"?!1:t==null||(0,j.default)(e,t)}function zue(e,t){return!e||e.type!=="TypeParameter"?!1:t==null||(0,j.default)(e,t)}function Vue(e,t){return!e||e.type!=="TypeParameterDeclaration"?!1:t==null||(0,j.default)(e,t)}function que(e,t){return!e||e.type!=="TypeParameterInstantiation"?!1:t==null||(0,j.default)(e,t)}function Hue(e,t){return!e||e.type!=="UnionTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function $ue(e,t){return!e||e.type!=="Variance"?!1:t==null||(0,j.default)(e,t)}function Gue(e,t){return!e||e.type!=="VoidTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function Kue(e,t){return!e||e.type!=="EnumDeclaration"?!1:t==null||(0,j.default)(e,t)}function Wue(e,t){return!e||e.type!=="EnumBooleanBody"?!1:t==null||(0,j.default)(e,t)}function Xue(e,t){return!e||e.type!=="EnumNumberBody"?!1:t==null||(0,j.default)(e,t)}function Yue(e,t){return!e||e.type!=="EnumStringBody"?!1:t==null||(0,j.default)(e,t)}function Jue(e,t){return!e||e.type!=="EnumSymbolBody"?!1:t==null||(0,j.default)(e,t)}function Que(e,t){return!e||e.type!=="EnumBooleanMember"?!1:t==null||(0,j.default)(e,t)}function Zue(e,t){return!e||e.type!=="EnumNumberMember"?!1:t==null||(0,j.default)(e,t)}function ede(e,t){return!e||e.type!=="EnumStringMember"?!1:t==null||(0,j.default)(e,t)}function tde(e,t){return!e||e.type!=="EnumDefaultedMember"?!1:t==null||(0,j.default)(e,t)}function rde(e,t){return!e||e.type!=="IndexedAccessType"?!1:t==null||(0,j.default)(e,t)}function ade(e,t){return!e||e.type!=="OptionalIndexedAccessType"?!1:t==null||(0,j.default)(e,t)}function nde(e,t){return!e||e.type!=="JSXAttribute"?!1:t==null||(0,j.default)(e,t)}function sde(e,t){return!e||e.type!=="JSXClosingElement"?!1:t==null||(0,j.default)(e,t)}function ide(e,t){return!e||e.type!=="JSXElement"?!1:t==null||(0,j.default)(e,t)}function ode(e,t){return!e||e.type!=="JSXEmptyExpression"?!1:t==null||(0,j.default)(e,t)}function lde(e,t){return!e||e.type!=="JSXExpressionContainer"?!1:t==null||(0,j.default)(e,t)}function cde(e,t){return!e||e.type!=="JSXSpreadChild"?!1:t==null||(0,j.default)(e,t)}function ude(e,t){return!e||e.type!=="JSXIdentifier"?!1:t==null||(0,j.default)(e,t)}function dde(e,t){return!e||e.type!=="JSXMemberExpression"?!1:t==null||(0,j.default)(e,t)}function fde(e,t){return!e||e.type!=="JSXNamespacedName"?!1:t==null||(0,j.default)(e,t)}function pde(e,t){return!e||e.type!=="JSXOpeningElement"?!1:t==null||(0,j.default)(e,t)}function mde(e,t){return!e||e.type!=="JSXSpreadAttribute"?!1:t==null||(0,j.default)(e,t)}function hde(e,t){return!e||e.type!=="JSXText"?!1:t==null||(0,j.default)(e,t)}function gde(e,t){return!e||e.type!=="JSXFragment"?!1:t==null||(0,j.default)(e,t)}function yde(e,t){return!e||e.type!=="JSXOpeningFragment"?!1:t==null||(0,j.default)(e,t)}function xde(e,t){return!e||e.type!=="JSXClosingFragment"?!1:t==null||(0,j.default)(e,t)}function bde(e,t){return!e||e.type!=="Noop"?!1:t==null||(0,j.default)(e,t)}function vde(e,t){return!e||e.type!=="Placeholder"?!1:t==null||(0,j.default)(e,t)}function Sde(e,t){return!e||e.type!=="V8IntrinsicIdentifier"?!1:t==null||(0,j.default)(e,t)}function Tde(e,t){return!e||e.type!=="ArgumentPlaceholder"?!1:t==null||(0,j.default)(e,t)}function wde(e,t){return!e||e.type!=="BindExpression"?!1:t==null||(0,j.default)(e,t)}function Cde(e,t){return!e||e.type!=="Decorator"?!1:t==null||(0,j.default)(e,t)}function Ede(e,t){return!e||e.type!=="DoExpression"?!1:t==null||(0,j.default)(e,t)}function Pde(e,t){return!e||e.type!=="ExportDefaultSpecifier"?!1:t==null||(0,j.default)(e,t)}function Ade(e,t){return!e||e.type!=="RecordExpression"?!1:t==null||(0,j.default)(e,t)}function Ide(e,t){return!e||e.type!=="TupleExpression"?!1:t==null||(0,j.default)(e,t)}function Nde(e,t){return!e||e.type!=="DecimalLiteral"?!1:t==null||(0,j.default)(e,t)}function Lde(e,t){return!e||e.type!=="ModuleExpression"?!1:t==null||(0,j.default)(e,t)}function Rde(e,t){return!e||e.type!=="TopicReference"?!1:t==null||(0,j.default)(e,t)}function kde(e,t){return!e||e.type!=="PipelineTopicExpression"?!1:t==null||(0,j.default)(e,t)}function Mde(e,t){return!e||e.type!=="PipelineBareFunction"?!1:t==null||(0,j.default)(e,t)}function Dde(e,t){return!e||e.type!=="PipelinePrimaryTopicReference"?!1:t==null||(0,j.default)(e,t)}function _de(e,t){return!e||e.type!=="VoidPattern"?!1:t==null||(0,j.default)(e,t)}function Ode(e,t){return!e||e.type!=="TSParameterProperty"?!1:t==null||(0,j.default)(e,t)}function Fde(e,t){return!e||e.type!=="TSDeclareFunction"?!1:t==null||(0,j.default)(e,t)}function Bde(e,t){return!e||e.type!=="TSDeclareMethod"?!1:t==null||(0,j.default)(e,t)}function Ude(e,t){return!e||e.type!=="TSQualifiedName"?!1:t==null||(0,j.default)(e,t)}function jde(e,t){return!e||e.type!=="TSCallSignatureDeclaration"?!1:t==null||(0,j.default)(e,t)}function zde(e,t){return!e||e.type!=="TSConstructSignatureDeclaration"?!1:t==null||(0,j.default)(e,t)}function Vde(e,t){return!e||e.type!=="TSPropertySignature"?!1:t==null||(0,j.default)(e,t)}function qde(e,t){return!e||e.type!=="TSMethodSignature"?!1:t==null||(0,j.default)(e,t)}function Hde(e,t){return!e||e.type!=="TSIndexSignature"?!1:t==null||(0,j.default)(e,t)}function $de(e,t){return!e||e.type!=="TSAnyKeyword"?!1:t==null||(0,j.default)(e,t)}function Gde(e,t){return!e||e.type!=="TSBooleanKeyword"?!1:t==null||(0,j.default)(e,t)}function Kde(e,t){return!e||e.type!=="TSBigIntKeyword"?!1:t==null||(0,j.default)(e,t)}function Wde(e,t){return!e||e.type!=="TSIntrinsicKeyword"?!1:t==null||(0,j.default)(e,t)}function Xde(e,t){return!e||e.type!=="TSNeverKeyword"?!1:t==null||(0,j.default)(e,t)}function Yde(e,t){return!e||e.type!=="TSNullKeyword"?!1:t==null||(0,j.default)(e,t)}function Jde(e,t){return!e||e.type!=="TSNumberKeyword"?!1:t==null||(0,j.default)(e,t)}function Qde(e,t){return!e||e.type!=="TSObjectKeyword"?!1:t==null||(0,j.default)(e,t)}function Zde(e,t){return!e||e.type!=="TSStringKeyword"?!1:t==null||(0,j.default)(e,t)}function efe(e,t){return!e||e.type!=="TSSymbolKeyword"?!1:t==null||(0,j.default)(e,t)}function tfe(e,t){return!e||e.type!=="TSUndefinedKeyword"?!1:t==null||(0,j.default)(e,t)}function rfe(e,t){return!e||e.type!=="TSUnknownKeyword"?!1:t==null||(0,j.default)(e,t)}function afe(e,t){return!e||e.type!=="TSVoidKeyword"?!1:t==null||(0,j.default)(e,t)}function nfe(e,t){return!e||e.type!=="TSThisType"?!1:t==null||(0,j.default)(e,t)}function sfe(e,t){return!e||e.type!=="TSFunctionType"?!1:t==null||(0,j.default)(e,t)}function ife(e,t){return!e||e.type!=="TSConstructorType"?!1:t==null||(0,j.default)(e,t)}function ofe(e,t){return!e||e.type!=="TSTypeReference"?!1:t==null||(0,j.default)(e,t)}function lfe(e,t){return!e||e.type!=="TSTypePredicate"?!1:t==null||(0,j.default)(e,t)}function cfe(e,t){return!e||e.type!=="TSTypeQuery"?!1:t==null||(0,j.default)(e,t)}function ufe(e,t){return!e||e.type!=="TSTypeLiteral"?!1:t==null||(0,j.default)(e,t)}function dfe(e,t){return!e||e.type!=="TSArrayType"?!1:t==null||(0,j.default)(e,t)}function ffe(e,t){return!e||e.type!=="TSTupleType"?!1:t==null||(0,j.default)(e,t)}function pfe(e,t){return!e||e.type!=="TSOptionalType"?!1:t==null||(0,j.default)(e,t)}function mfe(e,t){return!e||e.type!=="TSRestType"?!1:t==null||(0,j.default)(e,t)}function hfe(e,t){return!e||e.type!=="TSNamedTupleMember"?!1:t==null||(0,j.default)(e,t)}function gfe(e,t){return!e||e.type!=="TSUnionType"?!1:t==null||(0,j.default)(e,t)}function yfe(e,t){return!e||e.type!=="TSIntersectionType"?!1:t==null||(0,j.default)(e,t)}function xfe(e,t){return!e||e.type!=="TSConditionalType"?!1:t==null||(0,j.default)(e,t)}function bfe(e,t){return!e||e.type!=="TSInferType"?!1:t==null||(0,j.default)(e,t)}function vfe(e,t){return!e||e.type!=="TSParenthesizedType"?!1:t==null||(0,j.default)(e,t)}function Sfe(e,t){return!e||e.type!=="TSTypeOperator"?!1:t==null||(0,j.default)(e,t)}function Tfe(e,t){return!e||e.type!=="TSIndexedAccessType"?!1:t==null||(0,j.default)(e,t)}function wfe(e,t){return!e||e.type!=="TSMappedType"?!1:t==null||(0,j.default)(e,t)}function Cfe(e,t){return!e||e.type!=="TSTemplateLiteralType"?!1:t==null||(0,j.default)(e,t)}function Efe(e,t){return!e||e.type!=="TSLiteralType"?!1:t==null||(0,j.default)(e,t)}function Pfe(e,t){return!e||e.type!=="TSExpressionWithTypeArguments"?!1:t==null||(0,j.default)(e,t)}function Afe(e,t){return!e||e.type!=="TSInterfaceDeclaration"?!1:t==null||(0,j.default)(e,t)}function Ife(e,t){return!e||e.type!=="TSInterfaceBody"?!1:t==null||(0,j.default)(e,t)}function Nfe(e,t){return!e||e.type!=="TSTypeAliasDeclaration"?!1:t==null||(0,j.default)(e,t)}function Lfe(e,t){return!e||e.type!=="TSInstantiationExpression"?!1:t==null||(0,j.default)(e,t)}function Rfe(e,t){return!e||e.type!=="TSAsExpression"?!1:t==null||(0,j.default)(e,t)}function kfe(e,t){return!e||e.type!=="TSSatisfiesExpression"?!1:t==null||(0,j.default)(e,t)}function Mfe(e,t){return!e||e.type!=="TSTypeAssertion"?!1:t==null||(0,j.default)(e,t)}function Dfe(e,t){return!e||e.type!=="TSEnumBody"?!1:t==null||(0,j.default)(e,t)}function _fe(e,t){return!e||e.type!=="TSEnumDeclaration"?!1:t==null||(0,j.default)(e,t)}function Ofe(e,t){return!e||e.type!=="TSEnumMember"?!1:t==null||(0,j.default)(e,t)}function Ffe(e,t){return!e||e.type!=="TSModuleDeclaration"?!1:t==null||(0,j.default)(e,t)}function Bfe(e,t){return!e||e.type!=="TSModuleBlock"?!1:t==null||(0,j.default)(e,t)}function Ufe(e,t){return!e||e.type!=="TSImportType"?!1:t==null||(0,j.default)(e,t)}function jfe(e,t){return!e||e.type!=="TSImportEqualsDeclaration"?!1:t==null||(0,j.default)(e,t)}function zfe(e,t){return!e||e.type!=="TSExternalModuleReference"?!1:t==null||(0,j.default)(e,t)}function Vfe(e,t){return!e||e.type!=="TSNonNullExpression"?!1:t==null||(0,j.default)(e,t)}function qfe(e,t){return!e||e.type!=="TSExportAssignment"?!1:t==null||(0,j.default)(e,t)}function Hfe(e,t){return!e||e.type!=="TSNamespaceExportDeclaration"?!1:t==null||(0,j.default)(e,t)}function $fe(e,t){return!e||e.type!=="TSTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function Gfe(e,t){return!e||e.type!=="TSTypeParameterInstantiation"?!1:t==null||(0,j.default)(e,t)}function Kfe(e,t){return!e||e.type!=="TSTypeParameterDeclaration"?!1:t==null||(0,j.default)(e,t)}function Wfe(e,t){return!e||e.type!=="TSTypeParameter"?!1:t==null||(0,j.default)(e,t)}function Xfe(e,t){if(!e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"InterpreterDirective":case"Directive":case"DirectiveLiteral":case"BlockStatement":case"BreakStatement":case"CallExpression":case"CatchClause":case"ConditionalExpression":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"File":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Identifier":case"IfStatement":case"LabeledStatement":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"Program":case"ObjectExpression":case"ObjectMethod":case"ObjectProperty":case"RestElement":case"ReturnStatement":case"SequenceExpression":case"ParenthesizedExpression":case"SwitchCase":case"SwitchStatement":case"ThisExpression":case"ThrowStatement":case"TryStatement":case"UnaryExpression":case"UpdateExpression":case"VariableDeclaration":case"VariableDeclarator":case"WhileStatement":case"WithStatement":case"AssignmentPattern":case"ArrayPattern":case"ArrowFunctionExpression":case"ClassBody":case"ClassExpression":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportSpecifier":case"ForOfStatement":case"ImportDeclaration":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":case"ImportExpression":case"MetaProperty":case"ClassMethod":case"ObjectPattern":case"SpreadElement":case"Super":case"TaggedTemplateExpression":case"TemplateElement":case"TemplateLiteral":case"YieldExpression":case"AwaitExpression":case"Import":case"BigIntLiteral":case"ExportNamespaceSpecifier":case"OptionalMemberExpression":case"OptionalCallExpression":case"ClassProperty":case"ClassAccessorProperty":case"ClassPrivateProperty":case"ClassPrivateMethod":case"PrivateName":case"StaticBlock":case"ImportAttribute":break;case"Placeholder":switch(e.expectedNode){case"Identifier":case"StringLiteral":case"BlockStatement":case"ClassBody":break;default:return!1}break;default:return!1}return t==null||(0,j.default)(e,t)}function Yfe(e,t){if(!e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ParenthesizedExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":case"ArrowFunctionExpression":case"ClassExpression":case"ImportExpression":case"MetaProperty":case"Super":case"TaggedTemplateExpression":case"TemplateLiteral":case"YieldExpression":case"AwaitExpression":case"Import":case"BigIntLiteral":case"OptionalMemberExpression":case"OptionalCallExpression":case"TypeCastExpression":case"JSXElement":case"JSXFragment":case"BindExpression":case"DoExpression":case"RecordExpression":case"TupleExpression":case"DecimalLiteral":case"ModuleExpression":case"TopicReference":case"PipelineTopicExpression":case"PipelineBareFunction":case"PipelinePrimaryTopicReference":case"TSInstantiationExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(e.expectedNode){case"Expression":case"Identifier":case"StringLiteral":break;default:return!1}break;default:return!1}return t==null||(0,j.default)(e,t)}function Jfe(e,t){if(!e)return!1;switch(e.type){case"BinaryExpression":case"LogicalExpression":break;default:return!1}return t==null||(0,j.default)(e,t)}function Qfe(e,t){if(!e)return!1;switch(e.type){case"BlockStatement":case"CatchClause":case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Program":case"ObjectMethod":case"SwitchStatement":case"WhileStatement":case"ArrowFunctionExpression":case"ClassExpression":case"ClassDeclaration":case"ForOfStatement":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;case"Placeholder":if(e.expectedNode==="BlockStatement")break;default:return!1}return t==null||(0,j.default)(e,t)}function Zfe(e,t){if(!e)return!1;switch(e.type){case"BlockStatement":case"CatchClause":case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Program":case"ObjectMethod":case"SwitchStatement":case"WhileStatement":case"ArrowFunctionExpression":case"ForOfStatement":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;case"Placeholder":if(e.expectedNode==="BlockStatement")break;default:return!1}return t==null||(0,j.default)(e,t)}function epe(e,t){if(!e)return!1;switch(e.type){case"BlockStatement":case"Program":case"TSModuleBlock":break;case"Placeholder":if(e.expectedNode==="BlockStatement")break;default:return!1}return t==null||(0,j.default)(e,t)}function tpe(e,t){if(!e)return!1;switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ForOfStatement":case"ImportDeclaration":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":case"EnumDeclaration":case"TSDeclareFunction":case"TSInterfaceDeclaration":case"TSTypeAliasDeclaration":case"TSEnumDeclaration":case"TSModuleDeclaration":case"TSImportEqualsDeclaration":case"TSExportAssignment":case"TSNamespaceExportDeclaration":break;case"Placeholder":switch(e.expectedNode){case"Statement":case"Declaration":case"BlockStatement":break;default:return!1}break;default:return!1}return t==null||(0,j.default)(e,t)}function rpe(e,t){if(!e)return!1;switch(e.type){case"BreakStatement":case"ContinueStatement":case"ReturnStatement":case"ThrowStatement":case"YieldExpression":case"AwaitExpression":break;default:return!1}return t==null||(0,j.default)(e,t)}function ape(e,t){if(!e)return!1;switch(e.type){case"BreakStatement":case"ContinueStatement":case"ReturnStatement":case"ThrowStatement":break;default:return!1}return t==null||(0,j.default)(e,t)}function npe(e,t){if(!e)return!1;switch(e.type){case"ConditionalExpression":case"IfStatement":break;default:return!1}return t==null||(0,j.default)(e,t)}function spe(e,t){if(!e)return!1;switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":case"ForOfStatement":break;default:return!1}return t==null||(0,j.default)(e,t)}function ipe(e,t){if(!e)return!1;switch(e.type){case"DoWhileStatement":case"WhileStatement":break;default:return!1}return t==null||(0,j.default)(e,t)}function ope(e,t){if(!e)return!1;switch(e.type){case"ExpressionStatement":case"ParenthesizedExpression":case"TypeCastExpression":break;default:return!1}return t==null||(0,j.default)(e,t)}function lpe(e,t){if(!e)return!1;switch(e.type){case"ForInStatement":case"ForStatement":case"ForOfStatement":break;default:return!1}return t==null||(0,j.default)(e,t)}function cpe(e,t){if(!e)return!1;switch(e.type){case"ForInStatement":case"ForOfStatement":break;default:return!1}return t==null||(0,j.default)(e,t)}function upe(e,t){if(!e)return!1;switch(e.type){case"FunctionDeclaration":case"FunctionExpression":case"ObjectMethod":case"ArrowFunctionExpression":case"ClassMethod":case"ClassPrivateMethod":break;default:return!1}return t==null||(0,j.default)(e,t)}function dpe(e,t){if(!e)return!1;switch(e.type){case"FunctionDeclaration":case"FunctionExpression":case"ObjectMethod":case"ArrowFunctionExpression":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;default:return!1}return t==null||(0,j.default)(e,t)}function fpe(e,t){if(!e)return!1;switch(e.type){case"FunctionDeclaration":case"FunctionExpression":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"ArrowFunctionExpression":case"BigIntLiteral":case"DecimalLiteral":break;case"Placeholder":if(e.expectedNode==="StringLiteral")break;default:return!1}return t==null||(0,j.default)(e,t)}function ppe(e,t){if(!e)return!1;switch(e.type){case"FunctionDeclaration":case"VariableDeclaration":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ImportDeclaration":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":case"EnumDeclaration":case"TSDeclareFunction":case"TSInterfaceDeclaration":case"TSTypeAliasDeclaration":case"TSEnumDeclaration":case"TSModuleDeclaration":case"TSImportEqualsDeclaration":break;case"Placeholder":if(e.expectedNode==="Declaration")break;default:return!1}return t==null||(0,j.default)(e,t)}function mpe(e,t){if(!e)return!1;switch(e.type){case"Identifier":case"RestElement":case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"VoidPattern":break;case"Placeholder":if(e.expectedNode==="Identifier")break;default:return!1}return t==null||(0,j.default)(e,t)}function hpe(e,t){if(!e)return!1;switch(e.type){case"Identifier":case"MemberExpression":case"RestElement":case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"VoidPattern":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(e.expectedNode){case"Pattern":case"Identifier":break;default:return!1}break;default:return!1}return t==null||(0,j.default)(e,t)}function gpe(e,t){if(!e)return!1;switch(e.type){case"Identifier":case"MemberExpression":case"RestElement":case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"TSParameterProperty":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(e.expectedNode){case"Pattern":case"Identifier":break;default:return!1}break;default:return!1}return t==null||(0,j.default)(e,t)}function ype(e,t){if(!e)return!1;switch(e.type){case"Identifier":case"TSQualifiedName":break;case"Placeholder":if(e.expectedNode==="Identifier")break;default:return!1}return t==null||(0,j.default)(e,t)}function xpe(e,t){if(!e)return!1;switch(e.type){case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"TemplateLiteral":case"BigIntLiteral":case"DecimalLiteral":break;case"Placeholder":if(e.expectedNode==="StringLiteral")break;default:return!1}return t==null||(0,j.default)(e,t)}function bpe(e,t){if(!e)return!1;switch(e.type){case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"BigIntLiteral":case"JSXAttribute":case"JSXClosingElement":case"JSXElement":case"JSXExpressionContainer":case"JSXSpreadChild":case"JSXOpeningElement":case"JSXText":case"JSXFragment":case"JSXOpeningFragment":case"JSXClosingFragment":case"DecimalLiteral":break;case"Placeholder":if(e.expectedNode==="StringLiteral")break;default:return!1}return t==null||(0,j.default)(e,t)}function vpe(e,t){if(!e)return!1;switch(e.type){case"ObjectMethod":case"ObjectProperty":case"ObjectTypeInternalSlot":case"ObjectTypeCallProperty":case"ObjectTypeIndexer":case"ObjectTypeProperty":case"ObjectTypeSpreadProperty":break;default:return!1}return t==null||(0,j.default)(e,t)}function Spe(e,t){if(!e)return!1;switch(e.type){case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":break;default:return!1}return t==null||(0,j.default)(e,t)}function Tpe(e,t){if(!e)return!1;switch(e.type){case"ObjectMethod":case"ObjectProperty":break;default:return!1}return t==null||(0,j.default)(e,t)}function wpe(e,t){if(!e)return!1;switch(e.type){case"ObjectProperty":case"ClassProperty":case"ClassAccessorProperty":case"ClassPrivateProperty":break;default:return!1}return t==null||(0,j.default)(e,t)}function Cpe(e,t){if(!e)return!1;switch(e.type){case"UnaryExpression":case"SpreadElement":break;default:return!1}return t==null||(0,j.default)(e,t)}function Epe(e,t){if(!e)return!1;switch(e.type){case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"VoidPattern":break;case"Placeholder":if(e.expectedNode==="Pattern")break;default:return!1}return t==null||(0,j.default)(e,t)}function Ppe(e,t){if(!e)return!1;switch(e.type){case"ClassExpression":case"ClassDeclaration":break;default:return!1}return t==null||(0,j.default)(e,t)}function g4(e,t){if(!e)return!1;switch(e.type){case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ImportDeclaration":break;default:return!1}return t==null||(0,j.default)(e,t)}function Ape(e,t){if(!e)return!1;switch(e.type){case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":break;default:return!1}return t==null||(0,j.default)(e,t)}function Ipe(e,t){if(!e)return!1;switch(e.type){case"ExportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":break;default:return!1}return t==null||(0,j.default)(e,t)}function Npe(e,t){if(!e)return!1;switch(e.type){case"ClassAccessorProperty":break;default:return!1}return t==null||(0,j.default)(e,t)}function Lpe(e,t){if(!e)return!1;switch(e.type){case"ClassPrivateProperty":case"ClassPrivateMethod":case"PrivateName":break;default:return!1}return t==null||(0,j.default)(e,t)}function Rpe(e,t){if(!e)return!1;switch(e.type){case"AnyTypeAnnotation":case"ArrayTypeAnnotation":case"BooleanTypeAnnotation":case"BooleanLiteralTypeAnnotation":case"NullLiteralTypeAnnotation":case"ClassImplements":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"DeclaredPredicate":case"ExistsTypeAnnotation":case"FunctionTypeAnnotation":case"FunctionTypeParam":case"GenericTypeAnnotation":case"InferredPredicate":case"InterfaceExtends":case"InterfaceDeclaration":case"InterfaceTypeAnnotation":case"IntersectionTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NullableTypeAnnotation":case"NumberLiteralTypeAnnotation":case"NumberTypeAnnotation":case"ObjectTypeAnnotation":case"ObjectTypeInternalSlot":case"ObjectTypeCallProperty":case"ObjectTypeIndexer":case"ObjectTypeProperty":case"ObjectTypeSpreadProperty":case"OpaqueType":case"QualifiedTypeIdentifier":case"StringLiteralTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"TupleTypeAnnotation":case"TypeofTypeAnnotation":case"TypeAlias":case"TypeAnnotation":case"TypeCastExpression":case"TypeParameter":case"TypeParameterDeclaration":case"TypeParameterInstantiation":case"UnionTypeAnnotation":case"Variance":case"VoidTypeAnnotation":case"EnumDeclaration":case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":case"IndexedAccessType":case"OptionalIndexedAccessType":break;default:return!1}return t==null||(0,j.default)(e,t)}function kpe(e,t){if(!e)return!1;switch(e.type){case"AnyTypeAnnotation":case"ArrayTypeAnnotation":case"BooleanTypeAnnotation":case"BooleanLiteralTypeAnnotation":case"NullLiteralTypeAnnotation":case"ExistsTypeAnnotation":case"FunctionTypeAnnotation":case"GenericTypeAnnotation":case"InterfaceTypeAnnotation":case"IntersectionTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NullableTypeAnnotation":case"NumberLiteralTypeAnnotation":case"NumberTypeAnnotation":case"ObjectTypeAnnotation":case"StringLiteralTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"TupleTypeAnnotation":case"TypeofTypeAnnotation":case"UnionTypeAnnotation":case"VoidTypeAnnotation":case"IndexedAccessType":case"OptionalIndexedAccessType":break;default:return!1}return t==null||(0,j.default)(e,t)}function Mpe(e,t){if(!e)return!1;switch(e.type){case"AnyTypeAnnotation":case"BooleanTypeAnnotation":case"NullLiteralTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NumberTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"VoidTypeAnnotation":break;default:return!1}return t==null||(0,j.default)(e,t)}function Dpe(e,t){if(!e)return!1;switch(e.type){case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":break;default:return!1}return t==null||(0,j.default)(e,t)}function _pe(e,t){if(!e)return!1;switch(e.type){case"DeclaredPredicate":case"InferredPredicate":break;default:return!1}return t==null||(0,j.default)(e,t)}function Ope(e,t){if(!e)return!1;switch(e.type){case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":break;default:return!1}return t==null||(0,j.default)(e,t)}function Fpe(e,t){if(!e)return!1;switch(e.type){case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":break;default:return!1}return t==null||(0,j.default)(e,t)}function Bpe(e,t){if(!e)return!1;switch(e.type){case"JSXAttribute":case"JSXClosingElement":case"JSXElement":case"JSXEmptyExpression":case"JSXExpressionContainer":case"JSXSpreadChild":case"JSXIdentifier":case"JSXMemberExpression":case"JSXNamespacedName":case"JSXOpeningElement":case"JSXSpreadAttribute":case"JSXText":case"JSXFragment":case"JSXOpeningFragment":case"JSXClosingFragment":break;default:return!1}return t==null||(0,j.default)(e,t)}function Upe(e,t){if(!e)return!1;switch(e.type){case"Noop":case"Placeholder":case"V8IntrinsicIdentifier":break;default:return!1}return t==null||(0,j.default)(e,t)}function jpe(e,t){if(!e)return!1;switch(e.type){case"TSParameterProperty":case"TSDeclareFunction":case"TSDeclareMethod":case"TSQualifiedName":case"TSCallSignatureDeclaration":case"TSConstructSignatureDeclaration":case"TSPropertySignature":case"TSMethodSignature":case"TSIndexSignature":case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSFunctionType":case"TSConstructorType":case"TSTypeReference":case"TSTypePredicate":case"TSTypeQuery":case"TSTypeLiteral":case"TSArrayType":case"TSTupleType":case"TSOptionalType":case"TSRestType":case"TSNamedTupleMember":case"TSUnionType":case"TSIntersectionType":case"TSConditionalType":case"TSInferType":case"TSParenthesizedType":case"TSTypeOperator":case"TSIndexedAccessType":case"TSMappedType":case"TSTemplateLiteralType":case"TSLiteralType":case"TSExpressionWithTypeArguments":case"TSInterfaceDeclaration":case"TSInterfaceBody":case"TSTypeAliasDeclaration":case"TSInstantiationExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSEnumBody":case"TSEnumDeclaration":case"TSEnumMember":case"TSModuleDeclaration":case"TSModuleBlock":case"TSImportType":case"TSImportEqualsDeclaration":case"TSExternalModuleReference":case"TSNonNullExpression":case"TSExportAssignment":case"TSNamespaceExportDeclaration":case"TSTypeAnnotation":case"TSTypeParameterInstantiation":case"TSTypeParameterDeclaration":case"TSTypeParameter":break;default:return!1}return t==null||(0,j.default)(e,t)}function zpe(e,t){if(!e)return!1;switch(e.type){case"TSCallSignatureDeclaration":case"TSConstructSignatureDeclaration":case"TSPropertySignature":case"TSMethodSignature":case"TSIndexSignature":break;default:return!1}return t==null||(0,j.default)(e,t)}function Vpe(e,t){if(!e)return!1;switch(e.type){case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSFunctionType":case"TSConstructorType":case"TSTypeReference":case"TSTypePredicate":case"TSTypeQuery":case"TSTypeLiteral":case"TSArrayType":case"TSTupleType":case"TSOptionalType":case"TSRestType":case"TSUnionType":case"TSIntersectionType":case"TSConditionalType":case"TSInferType":case"TSParenthesizedType":case"TSTypeOperator":case"TSIndexedAccessType":case"TSMappedType":case"TSTemplateLiteralType":case"TSLiteralType":case"TSExpressionWithTypeArguments":case"TSImportType":break;default:return!1}return t==null||(0,j.default)(e,t)}function qpe(e,t){if(!e)return!1;switch(e.type){case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSTemplateLiteralType":case"TSLiteralType":break;default:return!1}return t==null||(0,j.default)(e,t)}function Hpe(e,t){return(0,m0.default)("isNumberLiteral","isNumericLiteral"),!e||e.type!=="NumberLiteral"?!1:t==null||(0,j.default)(e,t)}function $pe(e,t){return(0,m0.default)("isRegexLiteral","isRegExpLiteral"),!e||e.type!=="RegexLiteral"?!1:t==null||(0,j.default)(e,t)}function Gpe(e,t){return(0,m0.default)("isRestProperty","isRestElement"),!e||e.type!=="RestProperty"?!1:t==null||(0,j.default)(e,t)}function Kpe(e,t){return(0,m0.default)("isSpreadProperty","isSpreadElement"),!e||e.type!=="SpreadProperty"?!1:t==null||(0,j.default)(e,t)}function Wpe(e,t){return(0,m0.default)("isModuleDeclaration","isImportOrExportDeclaration"),g4(e,t)}});var UN=ne(BN=>{"use strict";Object.defineProperty(BN,"__esModule",{value:!0});BN.default=Xpe;var rm=on();function y4(e){return(0,rm.isMemberExpression)(e)||(0,rm.isMetaProperty)(e)}function Xpe(e,t,r){if(!y4(e))return!1;let a=Array.isArray(t)?t:t.split("."),n=[],s;for(s=e;y4(s);s=(i=s.object)!=null?i:s.meta){var i;n.push(s.property)}if(n.push(s),n.length<a.length||!r&&n.length>a.length)return!1;for(let o=0,l=n.length-1;o<a.length;o++,l--){let c=n[l],u;if((0,rm.isIdentifier)(c))u=c.name;else if((0,rm.isStringLiteral)(c))u=c.value;else if((0,rm.isThisExpression)(c))u="this";else if((0,rm.isSuper)(c))u="super";else if((0,rm.isPrivateName)(c))u="#"+c.id.name;else return!1;if(a[o]!==u)return!1}return!0}});var zN=ne(jN=>{"use strict";Object.defineProperty(jN,"__esModule",{value:!0});jN.default=Jpe;var Ype=UN();function Jpe(e,t){let r=e.split(".");return a=>(0,Ype.default)(a,r,t)}});var x4=ne(Lw=>{"use strict";Object.defineProperty(Lw,"__esModule",{value:!0});Lw.default=void 0;var Qpe=zN(),Zpe=(0,Qpe.default)("React.Component"),Ret=Lw.default=Zpe});var b4=ne(VN=>{"use strict";Object.defineProperty(VN,"__esModule",{value:!0});VN.default=eme;function eme(e){return!!e&&/^[a-z]/.test(e)}});var Rw=ne(qN=>{"use strict";Object.defineProperty(qN,"__esModule",{value:!0});qN.default=tme;var v4=Jo();function tme(e,t){if(e===t)return!0;if(e==null||v4.ALIAS_KEYS[t])return!1;let r=v4.FLIPPED_ALIAS_KEYS[t];return!!(r!=null&&r.includes(e))}});var $N=ne(HN=>{"use strict";Object.defineProperty(HN,"__esModule",{value:!0});HN.default=ame;var rme=Jo();function ame(e,t){if(e===t)return!0;let r=rme.PLACEHOLDERS_ALIAS[e];return!!(r!=null&&r.includes(t))}});var Ng=ne(GN=>{"use strict";Object.defineProperty(GN,"__esModule",{value:!0});GN.default=lme;var nme=Nw(),sme=Rw(),ime=$N(),ome=Jo();function lme(e,t,r){return t?(0,sme.default)(t.type,e)?r===void 0?!0:(0,nme.default)(t,r):!r&&t.type==="Placeholder"&&e in ome.FLIPPED_ALIAS_KEYS?(0,ime.default)(t.expectedNode,e):!1:!1}});var E4=ne(h0=>{"use strict";Object.defineProperty(h0,"__esModule",{value:!0});h0.isIdentifierChar=C4;h0.isIdentifierName=fme;h0.isIdentifierStart=w4;var WN="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",S4="\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",cme=new RegExp("["+WN+"]"),ume=new RegExp("["+WN+S4+"]");WN=S4=null;var T4=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],dme=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239];function KN(e,t){let r=65536;for(let a=0,n=t.length;a<n;a+=2){if(r+=t[a],r>e)return!1;if(r+=t[a+1],r>=e)return!0}return!1}function w4(e){return e<65?e===36:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&cme.test(String.fromCharCode(e)):KN(e,T4)}function C4(e){return e<48?e===36:e<58?!0:e<65?!1:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&ume.test(String.fromCharCode(e)):KN(e,T4)||KN(e,dme)}function fme(e){let t=!0;for(let r=0;r<e.length;r++){let a=e.charCodeAt(r);if((a&64512)===55296&&r+1<e.length){let n=e.charCodeAt(++r);(n&64512)===56320&&(a=65536+((a&1023)<<10)+(n&1023))}if(t){if(t=!1,!w4(a))return!1}else if(!C4(a))return!1}return!t}});var N4=ne(am=>{"use strict";Object.defineProperty(am,"__esModule",{value:!0});am.isKeyword=yme;am.isReservedWord=P4;am.isStrictBindOnlyReservedWord=I4;am.isStrictBindReservedWord=gme;am.isStrictReservedWord=A4;var XN={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},pme=new Set(XN.keyword),mme=new Set(XN.strict),hme=new Set(XN.strictBind);function P4(e,t){return t&&e==="await"||e==="enum"}function A4(e,t){return P4(e,t)||mme.has(e)}function I4(e){return hme.has(e)}function gme(e,t){return A4(e,t)||I4(e)}function yme(e){return pme.has(e)}});var y0=ne(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});Object.defineProperty(Ec,"isIdentifierChar",{enumerable:!0,get:function(){return YN.isIdentifierChar}});Object.defineProperty(Ec,"isIdentifierName",{enumerable:!0,get:function(){return YN.isIdentifierName}});Object.defineProperty(Ec,"isIdentifierStart",{enumerable:!0,get:function(){return YN.isIdentifierStart}});Object.defineProperty(Ec,"isKeyword",{enumerable:!0,get:function(){return g0.isKeyword}});Object.defineProperty(Ec,"isReservedWord",{enumerable:!0,get:function(){return g0.isReservedWord}});Object.defineProperty(Ec,"isStrictBindOnlyReservedWord",{enumerable:!0,get:function(){return g0.isStrictBindOnlyReservedWord}});Object.defineProperty(Ec,"isStrictBindReservedWord",{enumerable:!0,get:function(){return g0.isStrictBindReservedWord}});Object.defineProperty(Ec,"isStrictReservedWord",{enumerable:!0,get:function(){return g0.isStrictReservedWord}});var YN=E4(),g0=N4()});var Lg=ne(QN=>{"use strict";Object.defineProperty(QN,"__esModule",{value:!0});QN.default=xme;var JN=y0();function xme(e,t=!0){return typeof e!="string"||t&&((0,JN.isKeyword)(e)||(0,JN.isStrictReservedWord)(e,!0))?!1:(0,JN.isIdentifierName)(e)}});var M4=ne(x0=>{"use strict";Object.defineProperty(x0,"__esModule",{value:!0});x0.readCodePoint=k4;x0.readInt=R4;x0.readStringContents=vme;var bme=function(t){return t>=48&&t<=57},L4={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},kw={bin:e=>e===48||e===49,oct:e=>e>=48&&e<=55,dec:e=>e>=48&&e<=57,hex:e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102};function vme(e,t,r,a,n,s){let i=r,o=a,l=n,c="",u=null,d=r,{length:f}=t;for(;;){if(r>=f){s.unterminated(i,o,l),c+=t.slice(d,r);break}let p=t.charCodeAt(r);if(Sme(e,p,t,r)){c+=t.slice(d,r);break}if(p===92){c+=t.slice(d,r);let m=Tme(t,r,a,n,e==="template",s);m.ch===null&&!u?u={pos:r,lineStart:a,curLine:n}:c+=m.ch,{pos:r,lineStart:a,curLine:n}=m,d=r}else p===8232||p===8233?(++r,++n,a=r):p===10||p===13?e==="template"?(c+=t.slice(d,r)+`
|
|
`,++r,p===13&&t.charCodeAt(r)===10&&++r,++n,d=a=r):s.unterminated(i,o,l):++r}return{pos:r,str:c,firstInvalidLoc:u,lineStart:a,curLine:n,containsInvalid:!!u}}function Sme(e,t,r,a){return e==="template"?t===96||t===36&&r.charCodeAt(a+1)===123:t===(e==="double"?34:39)}function Tme(e,t,r,a,n,s){let i=!n;t++;let o=c=>({pos:t,ch:c,lineStart:r,curLine:a}),l=e.charCodeAt(t++);switch(l){case 110:return o(`
|
|
`);case 114:return o("\r");case 120:{let c;return{code:c,pos:t}=ZN(e,t,r,a,2,!1,i,s),o(c===null?null:String.fromCharCode(c))}case 117:{let c;return{code:c,pos:t}=k4(e,t,r,a,i,s),o(c===null?null:String.fromCodePoint(c))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:e.charCodeAt(t)===10&&++t;case 10:r=t,++a;case 8232:case 8233:return o("");case 56:case 57:if(n)return o(null);s.strictNumericEscape(t-1,r,a);default:if(l>=48&&l<=55){let c=t-1,d=/^[0-7]+/.exec(e.slice(c,t+2))[0],f=parseInt(d,8);f>255&&(d=d.slice(0,-1),f=parseInt(d,8)),t+=d.length-1;let p=e.charCodeAt(t);if(d!=="0"||p===56||p===57){if(n)return o(null);s.strictNumericEscape(c,r,a)}return o(String.fromCharCode(f))}return o(String.fromCharCode(l))}}function ZN(e,t,r,a,n,s,i,o){let l=t,c;return{n:c,pos:t}=R4(e,t,r,a,16,n,s,!1,o,!i),c===null&&(i?o.invalidEscapeSequence(l,r,a):t=l-1),{code:c,pos:t}}function R4(e,t,r,a,n,s,i,o,l,c){let u=t,d=n===16?L4.hex:L4.decBinOct,f=n===16?kw.hex:n===10?kw.dec:n===8?kw.oct:kw.bin,p=!1,m=0;for(let h=0,x=s??1/0;h<x;++h){let g=e.charCodeAt(t),y;if(g===95&&o!=="bail"){let b=e.charCodeAt(t-1),S=e.charCodeAt(t+1);if(o){if(Number.isNaN(S)||!f(S)||d.has(b)||d.has(S)){if(c)return{n:null,pos:t};l.unexpectedNumericSeparator(t,r,a)}}else{if(c)return{n:null,pos:t};l.numericSeparatorInEscapeSequence(t,r,a)}++t;continue}if(g>=97?y=g-97+10:g>=65?y=g-65+10:bme(g)?y=g-48:y=1/0,y>=n){if(y<=9&&c)return{n:null,pos:t};if(y<=9&&l.invalidDigit(t,r,a,n))y=0;else if(i)y=0,p=!0;else break}++t,m=m*n+y}return t===u||s!=null&&t-u!==s||p?{n:null,pos:t}:{n:m,pos:t}}function k4(e,t,r,a,n,s){let i=e.charCodeAt(t),o;if(i===123){if(++t,{code:o,pos:t}=ZN(e,t,r,a,e.indexOf("}",t)-t,!0,n,s),++t,o!==null&&o>1114111)if(n)s.invalidCodePoint(t,r,a);else return{code:null,pos:t}}else({code:o,pos:t}=ZN(e,t,r,a,4,!1,n,s));return{code:o,pos:t}}});var Rg=ne(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.UPDATE_OPERATORS=br.UNARY_OPERATORS=br.STRING_UNARY_OPERATORS=br.STATEMENT_OR_BLOCK_KEYS=br.NUMBER_UNARY_OPERATORS=br.NUMBER_BINARY_OPERATORS=br.LOGICAL_OPERATORS=br.INHERIT_KEYS=br.FOR_INIT_KEYS=br.FLATTENABLE_KEYS=br.EQUALITY_BINARY_OPERATORS=br.COMPARISON_BINARY_OPERATORS=br.COMMENT_KEYS=br.BOOLEAN_UNARY_OPERATORS=br.BOOLEAN_NUMBER_BINARY_OPERATORS=br.BOOLEAN_BINARY_OPERATORS=br.BINARY_OPERATORS=br.ASSIGNMENT_OPERATORS=void 0;var Vet=br.STATEMENT_OR_BLOCK_KEYS=["consequent","body","alternate"],qet=br.FLATTENABLE_KEYS=["body","expressions"],Het=br.FOR_INIT_KEYS=["left","init"],$et=br.COMMENT_KEYS=["leadingComments","trailingComments","innerComments"],wme=br.LOGICAL_OPERATORS=["||","&&","??"],Get=br.UPDATE_OPERATORS=["++","--"],Cme=br.BOOLEAN_NUMBER_BINARY_OPERATORS=[">","<",">=","<="],Eme=br.EQUALITY_BINARY_OPERATORS=["==","===","!=","!=="],Pme=br.COMPARISON_BINARY_OPERATORS=[...Eme,"in","instanceof"],Ame=br.BOOLEAN_BINARY_OPERATORS=[...Pme,...Cme],D4=br.NUMBER_BINARY_OPERATORS=["-","/","%","*","**","&","|",">>",">>>","<<","^"],Ket=br.BINARY_OPERATORS=["+",...D4,...Ame,"|>"],Wet=br.ASSIGNMENT_OPERATORS=["=","+=",...D4.map(e=>e+"="),...wme.map(e=>e+"=")],Ime=br.BOOLEAN_UNARY_OPERATORS=["delete","!"],Nme=br.NUMBER_UNARY_OPERATORS=["+","-","~"],Lme=br.STRING_UNARY_OPERATORS=["typeof"],Xet=br.UNARY_OPERATORS=["void","throw",...Ime,...Nme,...Lme],Yet=br.INHERIT_KEYS={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]};br.BLOCK_SCOPED_SYMBOL=Symbol.for("var used to be block scoped"),br.NOT_LOCAL_BINDING=Symbol.for("should not be considered a local binding")});var Pc=ne(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.allExpandedTypes=Pr.VISITOR_KEYS=Pr.NODE_UNION_SHAPES__PRIVATE=Pr.NODE_PARENT_VALIDATIONS=Pr.NODE_FIELDS=Pr.FLIPPED_ALIAS_KEYS=Pr.DEPRECATED_KEYS=Pr.BUILDER_KEYS=Pr.ALIAS_KEYS=void 0;Pr.arrayOf=O4;Pr.arrayOfType=F4;Pr.assertEach=B4;Pr.assertNodeOrValueType=Hme;Pr.assertNodeType=Dw;Pr.assertOneOf=Vme;Pr.assertOptionalChainStart=Gme;Pr.assertShape=$me;Pr.assertValueType=aL;Pr.chain=U4;Pr.default=j4;Pr.defineAliasedType=Xme;Pr.validate=rL;Pr.validateArrayOfType=zme;Pr.validateOptional=Ume;Pr.validateOptionalType=jme;Pr.validateType=Bme;var _4=Ng(),b0=_w(),Rme=Pr.VISITOR_KEYS={},kme=Pr.ALIAS_KEYS={},eL=Pr.FLIPPED_ALIAS_KEYS={},Mme=Pr.NODE_FIELDS={},Dme=Pr.BUILDER_KEYS={},_me=Pr.DEPRECATED_KEYS={},Ome=Pr.NODE_PARENT_VALIDATIONS={},Fme=Pr.NODE_UNION_SHAPES__PRIVATE={};function Mw(e){return Array.isArray(e)?"array":e===null?"null":typeof e}function rL(e){return{validate:e}}function Bme(...e){return rL(Dw(...e))}function Ume(e){return{validate:e,optional:!0}}function jme(...e){return{validate:Dw(...e),optional:!0}}function O4(e){return U4(aL("array"),B4(e))}function F4(...e){return O4(Dw(...e))}function zme(...e){return rL(F4(...e))}function B4(e){let t=process.env.BABEL_TYPES_8_BREAKING?b0.validateChild:()=>{};function r(a,n,s){if(!Array.isArray(s))return;let i=0,o={toString(){return`${n}[${i}]`}};for(;i<s.length;i++){let l=s[i];e(a,o,l),t(a,o,l)}}return r.each=e,r}function Vme(...e){function t(r,a,n){if(!e.includes(n))throw new TypeError(`Property ${a} expected value to be one of ${JSON.stringify(e)} but got ${JSON.stringify(n)}`)}return t.oneOf=e,t}var qme=Pr.allExpandedTypes=[];function Dw(...e){let t=new Set;qme.push({types:e,set:t});function r(a,n,s){let i=s?.type;if(i!=null){if(t.has(i)){(0,b0.validateChild)(a,n,s);return}if(i==="Placeholder"){for(let o of e)if((0,_4.default)(o,s)){(0,b0.validateChild)(a,n,s);return}}}throw new TypeError(`Property ${n} of ${a.type} expected node to be of a type ${JSON.stringify(e)} but instead got ${JSON.stringify(i)}`)}return r.oneOfNodeTypes=e,r}function Hme(...e){function t(r,a,n){let s=Mw(n);for(let i of e)if(s===i||(0,_4.default)(i,n)){(0,b0.validateChild)(r,a,n);return}throw new TypeError(`Property ${a} of ${r.type} expected node to be of a type ${JSON.stringify(e)} but instead got ${JSON.stringify(n?.type)}`)}return t.oneOfNodeOrValueTypes=e,t}function aL(e){function t(r,a,n){if(Mw(n)!==e)throw new TypeError(`Property ${a} expected type of ${e} but got ${Mw(n)}`)}return t.type=e,t}function $me(e){let t=Object.keys(e);function r(a,n,s){let i=[];for(let o of t)try{(0,b0.validateField)(a,o,s[o],e[o])}catch(l){if(l instanceof TypeError){i.push(l.message);continue}throw l}if(i.length)throw new TypeError(`Property ${n} of ${a.type} expected to have the following:
|
|
${i.join(`
|
|
`)}`)}return r.shapeOf=e,r}function Gme(){function e(t){var r;let a=t;for(;t;){let{type:n}=a;if(n==="OptionalCallExpression"){if(a.optional)return;a=a.callee;continue}if(n==="OptionalMemberExpression"){if(a.optional)return;a=a.object;continue}break}throw new TypeError(`Non-optional ${t.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(r=a)==null?void 0:r.type}`)}return e}function U4(...e){function t(...r){for(let a of e)a(...r)}if(t.chainOf=e,e.length>=2&&"type"in e[0]&&e[0].type==="array"&&!("each"in e[1]))throw new Error('An assertValueType("array") validator can only be followed by an assertEach(...) validator.');return t}var Kme=new Set(["aliases","builder","deprecatedAlias","fields","inherits","visitor","validate","unionShape"]),Wme=new Set(["default","optional","deprecated","validate"]),tL={};function Xme(...e){return(t,r={})=>{let a=r.aliases;if(!a){var n;r.inherits&&(a=(n=tL[r.inherits].aliases)==null?void 0:n.slice()),a??(a=[]),r.aliases=a}let s=e.filter(i=>!a.includes(i));a.unshift(...s),j4(t,r)}}function j4(e,t={}){let r=t.inherits&&tL[t.inherits]||{},a=t.fields;if(!a&&(a={},r.fields)){let o=Object.getOwnPropertyNames(r.fields);for(let l of o){let c=r.fields[l],u=c.default;if(Array.isArray(u)?u.length>0:u&&typeof u=="object")throw new Error("field defaults can only be primitives or empty arrays currently");a[l]={default:Array.isArray(u)?[]:u,optional:c.optional,deprecated:c.deprecated,validate:c.validate}}}let n=t.visitor||r.visitor||[],s=t.aliases||r.aliases||[],i=t.builder||r.builder||t.visitor||[];for(let o of Object.keys(t))if(!Kme.has(o))throw new Error(`Unknown type option "${o}" on ${e}`);t.deprecatedAlias&&(_me[t.deprecatedAlias]=e);for(let o of n.concat(i))a[o]=a[o]||{};for(let o of Object.keys(a)){let l=a[o];l.default!==void 0&&!i.includes(o)&&(l.optional=!0),l.default===void 0?l.default=null:!l.validate&&l.default!=null&&(l.validate=aL(Mw(l.default)));for(let c of Object.keys(l))if(!Wme.has(c))throw new Error(`Unknown field key "${c}" on ${e}.${o}`)}Rme[e]=t.visitor=n,Dme[e]=t.builder=i,Mme[e]=t.fields=a,kme[e]=t.aliases=s,s.forEach(o=>{eL[o]=eL[o]||[],eL[o].push(e)}),t.validate&&(Ome[e]=t.validate),t.unionShape&&(Fme[e]=t.unionShape),tL[e]=t}});var S0=ne(ys=>{"use strict";Object.defineProperty(ys,"__esModule",{value:!0});ys.patternLikeCommon=ys.importAttributes=ys.functionTypeAnnotationCommon=ys.functionDeclarationCommon=ys.functionCommon=ys.classMethodOrPropertyUnionShapeCommon=ys.classMethodOrPropertyCommon=ys.classMethodOrDeclareMethodCommon=void 0;var di=Ng(),Yme=Lg(),z4=y0(),Jme=M4(),kg=Rg(),z=Pc(),v0=(e=!1)=>({unionShape:{discriminator:"computed",shapes:[{name:"computed",value:[!0],properties:{key:{validate:(0,z.assertNodeType)("Expression")}}},{name:"nonComputed",value:[!1],properties:{key:{validate:e?(0,z.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"):(0,z.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral")}}}]}});ys.classMethodOrPropertyUnionShapeCommon=v0;var Ge=(0,z.defineAliasedType)("Standardized");Ge("ArrayExpression",{fields:{elements:{validate:(0,z.arrayOf)((0,z.assertNodeOrValueType)("null","Expression","SpreadElement")),default:process.env.BABEL_TYPES_8_BREAKING?void 0:[]}},visitor:["elements"],aliases:["Expression"]});Ge("AssignmentExpression",{fields:{operator:{validate:process.env.BABEL_TYPES_8_BREAKING?Object.assign(function(){let e=(0,z.assertOneOf)(...kg.ASSIGNMENT_OPERATORS),t=(0,z.assertOneOf)("=");return function(r,a,n){((0,di.default)("Pattern",r.left)?t:e)(r,a,n)}}(),{oneOf:kg.ASSIGNMENT_OPERATORS}):(0,z.assertValueType)("string")},left:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.assertNodeType)("Identifier","MemberExpression","OptionalMemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"):(0,z.assertNodeType)("LVal","OptionalMemberExpression")},right:{validate:(0,z.assertNodeType)("Expression")}},builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]});Ge("BinaryExpression",{builder:["operator","left","right"],fields:{operator:{validate:(0,z.assertOneOf)(...kg.BINARY_OPERATORS)},left:{validate:function(){let e=(0,z.assertNodeType)("Expression"),t=(0,z.assertNodeType)("Expression","PrivateName");return Object.assign(function(a,n,s){(a.operator==="in"?t:e)(a,n,s)},{oneOfNodeTypes:["Expression","PrivateName"]})}()},right:{validate:(0,z.assertNodeType)("Expression")}},visitor:["left","right"],aliases:["Binary","Expression"]});Ge("InterpreterDirective",{builder:["value"],fields:{value:{validate:(0,z.assertValueType)("string")}}});Ge("Directive",{visitor:["value"],fields:{value:{validate:(0,z.assertNodeType)("DirectiveLiteral")}}});Ge("DirectiveLiteral",{builder:["value"],fields:{value:{validate:(0,z.assertValueType)("string")}}});Ge("BlockStatement",{builder:["body","directives"],visitor:["directives","body"],fields:{directives:{validate:(0,z.arrayOfType)("Directive"),default:[]},body:(0,z.validateArrayOfType)("Statement")},aliases:["Scopable","BlockParent","Block","Statement"]});Ge("BreakStatement",{visitor:["label"],fields:{label:{validate:(0,z.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]});Ge("CallExpression",{visitor:["callee","typeParameters","typeArguments","arguments"],builder:["callee","arguments"],aliases:["Expression"],fields:Object.assign({callee:{validate:(0,z.assertNodeType)("Expression","Super","V8IntrinsicIdentifier")},arguments:(0,z.validateArrayOfType)("Expression","SpreadElement","ArgumentPlaceholder"),typeArguments:{validate:(0,z.assertNodeType)("TypeParameterInstantiation"),optional:!0}},process.env.BABEL_TYPES_8_BREAKING?{}:{optional:{validate:(0,z.assertValueType)("boolean"),optional:!0},typeParameters:{validate:(0,z.assertNodeType)("TSTypeParameterInstantiation"),optional:!0}})});Ge("CatchClause",{visitor:["param","body"],fields:{param:{validate:(0,z.assertNodeType)("Identifier","ArrayPattern","ObjectPattern"),optional:!0},body:{validate:(0,z.assertNodeType)("BlockStatement")}},aliases:["Scopable","BlockParent"]});Ge("ConditionalExpression",{visitor:["test","consequent","alternate"],fields:{test:{validate:(0,z.assertNodeType)("Expression")},consequent:{validate:(0,z.assertNodeType)("Expression")},alternate:{validate:(0,z.assertNodeType)("Expression")}},aliases:["Expression","Conditional"]});Ge("ContinueStatement",{visitor:["label"],fields:{label:{validate:(0,z.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]});Ge("DebuggerStatement",{aliases:["Statement"]});Ge("DoWhileStatement",{builder:["test","body"],visitor:["body","test"],fields:{test:{validate:(0,z.assertNodeType)("Expression")},body:{validate:(0,z.assertNodeType)("Statement")}},aliases:["Statement","BlockParent","Loop","While","Scopable"]});Ge("EmptyStatement",{aliases:["Statement"]});Ge("ExpressionStatement",{visitor:["expression"],fields:{expression:{validate:(0,z.assertNodeType)("Expression")}},aliases:["Statement","ExpressionWrapper"]});Ge("File",{builder:["program","comments","tokens"],visitor:["program"],fields:{program:{validate:(0,z.assertNodeType)("Program")},comments:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.assertEach)((0,z.assertNodeType)("CommentBlock","CommentLine")):Object.assign(()=>{},{each:{oneOfNodeTypes:["CommentBlock","CommentLine"]}}),optional:!0},tokens:{validate:(0,z.assertEach)(Object.assign(()=>{},{type:"any"})),optional:!0}}});Ge("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.assertNodeType)("VariableDeclaration","Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"):(0,z.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,z.assertNodeType)("Expression")},body:{validate:(0,z.assertNodeType)("Statement")}}});Ge("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"],fields:{init:{validate:(0,z.assertNodeType)("VariableDeclaration","Expression"),optional:!0},test:{validate:(0,z.assertNodeType)("Expression"),optional:!0},update:{validate:(0,z.assertNodeType)("Expression"),optional:!0},body:{validate:(0,z.assertNodeType)("Statement")}}});var Mg=()=>({params:(0,z.validateArrayOfType)("FunctionParameter"),generator:{default:!1},async:{default:!1}});ys.functionCommon=Mg;var nm=()=>({returnType:{validate:(0,z.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},typeParameters:{validate:(0,z.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0}});ys.functionTypeAnnotationCommon=nm;var V4=()=>Object.assign({},Mg(),{declare:{validate:(0,z.assertValueType)("boolean"),optional:!0},id:{validate:(0,z.assertNodeType)("Identifier"),optional:!0}});ys.functionDeclarationCommon=V4;Ge("FunctionDeclaration",{builder:["id","params","body","generator","async"],visitor:["id","typeParameters","params","predicate","returnType","body"],fields:Object.assign({},V4(),nm(),{body:{validate:(0,z.assertNodeType)("BlockStatement")},predicate:{validate:(0,z.assertNodeType)("DeclaredPredicate","InferredPredicate"),optional:!0}}),aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"],validate:process.env.BABEL_TYPES_8_BREAKING?function(){let e=(0,z.assertNodeType)("Identifier");return function(t,r,a){(0,di.default)("ExportDefaultDeclaration",t)||e(a,"id",a.id)}}():void 0});Ge("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:Object.assign({},Mg(),nm(),{id:{validate:(0,z.assertNodeType)("Identifier"),optional:!0},body:{validate:(0,z.assertNodeType)("BlockStatement")},predicate:{validate:(0,z.assertNodeType)("DeclaredPredicate","InferredPredicate"),optional:!0}})});var Dg=()=>({typeAnnotation:{validate:(0,z.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},optional:{validate:(0,z.assertValueType)("boolean"),optional:!0},decorators:{validate:(0,z.arrayOfType)("Decorator"),optional:!0}});ys.patternLikeCommon=Dg;Ge("Identifier",{builder:["name"],visitor:["typeAnnotation","decorators"],aliases:["Expression","FunctionParameter","PatternLike","LVal","TSEntityName"],fields:Object.assign({},Dg(),{name:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.chain)((0,z.assertValueType)("string"),Object.assign(function(e,t,r){if(!(0,Yme.default)(r,!1))throw new TypeError(`"${r}" is not a valid identifier name`)},{type:"string"})):(0,z.assertValueType)("string")}}),validate:process.env.BABEL_TYPES_8_BREAKING?function(e,t,r){let a=/\.(\w+)$/.exec(t.toString());if(!a)return;let[,n]=a,s={computed:!1};if(n==="property"){if((0,di.default)("MemberExpression",e,s)||(0,di.default)("OptionalMemberExpression",e,s))return}else if(n==="key"){if((0,di.default)("Property",e,s)||(0,di.default)("Method",e,s))return}else if(n==="exported"){if((0,di.default)("ExportSpecifier",e))return}else if(n==="imported"){if((0,di.default)("ImportSpecifier",e,{imported:r}))return}else if(n==="meta"&&(0,di.default)("MetaProperty",e,{meta:r}))return;if(((0,z4.isKeyword)(r.name)||(0,z4.isReservedWord)(r.name,!1))&&r.name!=="this")throw new TypeError(`"${r.name}" is not a valid identifier`)}:void 0});Ge("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,z.assertNodeType)("Expression")},consequent:{validate:(0,z.assertNodeType)("Statement")},alternate:{optional:!0,validate:(0,z.assertNodeType)("Statement")}}});Ge("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,z.assertNodeType)("Identifier")},body:{validate:(0,z.assertNodeType)("Statement")}}});Ge("StringLiteral",{builder:["value"],fields:{value:{validate:(0,z.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]});Ge("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,z.chain)((0,z.assertValueType)("number"),Object.assign(function(e,t,r){if(1/r<0||!Number.isFinite(r)){let a=new Error(`NumericLiterals must be non-negative finite numbers. You can use t.valueToNode(${r}) instead.`)}},{type:"number"}))}},aliases:["Expression","Pureish","Literal","Immutable"]});Ge("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]});Ge("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,z.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]});Ge("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Pureish","Literal"],fields:{pattern:{validate:(0,z.assertValueType)("string")},flags:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.chain)((0,z.assertValueType)("string"),Object.assign(function(e,t,r){let a=/[^dgimsuvy]/.exec(r);if(a)throw new TypeError(`"${a[0]}" is not a valid RegExp flag`)},{type:"string"})):(0,z.assertValueType)("string"),default:""}}});Ge("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:(0,z.assertOneOf)(...kg.LOGICAL_OPERATORS)},left:{validate:(0,z.assertNodeType)("Expression")},right:{validate:(0,z.assertNodeType)("Expression")}}});Ge("MemberExpression",{builder:["object","property","computed",...process.env.BABEL_TYPES_8_BREAKING?[]:["optional"]],visitor:["object","property"],aliases:["Expression","LVal","PatternLike"],unionShape:{discriminator:"computed",shapes:[{name:"computed",value:[!0],properties:{property:{validate:(0,z.assertNodeType)("Expression")}}},{name:"nonComputed",value:[!1],properties:{property:{validate:(0,z.assertNodeType)("Identifier","PrivateName")}}}]},fields:Object.assign({object:{validate:(0,z.assertNodeType)("Expression","Super")},property:{validate:function(){let e=(0,z.assertNodeType)("Identifier","PrivateName"),t=(0,z.assertNodeType)("Expression"),r=function(a,n,s){(a.computed?t:e)(a,n,s)};return r.oneOfNodeTypes=["Expression","Identifier","PrivateName"],r}()},computed:{default:!1}},process.env.BABEL_TYPES_8_BREAKING?{}:{optional:{validate:(0,z.assertValueType)("boolean"),optional:!0}})});Ge("NewExpression",{inherits:"CallExpression"});Ge("Program",{visitor:["directives","body"],builder:["body","directives","sourceType","interpreter"],fields:{sourceType:{validate:(0,z.assertOneOf)("script","module"),default:"script"},interpreter:{validate:(0,z.assertNodeType)("InterpreterDirective"),default:null,optional:!0},directives:{validate:(0,z.arrayOfType)("Directive"),default:[]},body:(0,z.validateArrayOfType)("Statement")},aliases:["Scopable","BlockParent","Block"]});Ge("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:(0,z.validateArrayOfType)("ObjectMethod","ObjectProperty","SpreadElement")}});Ge("ObjectMethod",Object.assign({builder:["kind","key","params","body","computed","generator","async"],visitor:["decorators","key","typeParameters","params","returnType","body"]},v0(),{fields:Object.assign({},Mg(),nm(),{kind:Object.assign({validate:(0,z.assertOneOf)("method","get","set")},process.env.BABEL_TYPES_8_BREAKING?{}:{default:"method"}),computed:{default:!1},key:{validate:function(){let e=(0,z.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral"),t=(0,z.assertNodeType)("Expression"),r=function(a,n,s){(a.computed?t:e)(a,n,s)};return r.oneOfNodeTypes=["Expression","Identifier","StringLiteral","NumericLiteral","BigIntLiteral"],r}()},decorators:{validate:(0,z.arrayOfType)("Decorator"),optional:!0},body:{validate:(0,z.assertNodeType)("BlockStatement")}}),aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]}));Ge("ObjectProperty",{builder:["key","value","computed","shorthand",...process.env.BABEL_TYPES_8_BREAKING?[]:["decorators"]],unionShape:{discriminator:"computed",shapes:[{name:"computed",value:[!0],properties:{key:{validate:(0,z.assertNodeType)("Expression")}}},{name:"nonComputed",value:[!1],properties:{key:{validate:(0,z.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","DecimalLiteral","PrivateName")}}}]},fields:{computed:{default:!1},key:{validate:function(){let e=(0,z.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","DecimalLiteral","PrivateName"),t=(0,z.assertNodeType)("Expression");return Object.assign(function(a,n,s){(a.computed?t:e)(a,n,s)},{oneOfNodeTypes:["Expression","Identifier","StringLiteral","NumericLiteral","BigIntLiteral","DecimalLiteral","PrivateName"]})}()},value:{validate:(0,z.assertNodeType)("Expression","PatternLike")},shorthand:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.chain)((0,z.assertValueType)("boolean"),Object.assign(function(e,t,r){if(r){if(e.computed)throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");if(!(0,di.default)("Identifier",e.key))throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier")}},{type:"boolean"})):(0,z.assertValueType)("boolean"),default:!1},decorators:{validate:(0,z.arrayOfType)("Decorator"),optional:!0}},visitor:["decorators","key","value"],aliases:["UserWhitespacable","Property","ObjectMember"],validate:process.env.BABEL_TYPES_8_BREAKING?function(){let e=(0,z.assertNodeType)("Identifier","Pattern","TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion"),t=(0,z.assertNodeType)("Expression");return function(r,a,n){((0,di.default)("ObjectPattern",r)?e:t)(n,"value",n.value)}}():void 0});Ge("RestElement",{visitor:["argument","typeAnnotation"],builder:["argument"],aliases:["FunctionParameter","PatternLike","LVal"],deprecatedAlias:"RestProperty",fields:Object.assign({},Dg(),{argument:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"):(0,z.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression","RestElement","AssignmentPattern")}}),validate:process.env.BABEL_TYPES_8_BREAKING?function(e,t){let r=/(\w+)\[(\d+)\]/.exec(t.toString());if(!r)throw new Error("Internal Babel error: malformed key.");let[,a,n]=r;if(e[a].length>+n+1)throw new TypeError(`RestElement must be last element of ${a}`)}:void 0});Ge("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,z.assertNodeType)("Expression"),optional:!0}}});Ge("SequenceExpression",{visitor:["expressions"],fields:{expressions:(0,z.validateArrayOfType)("Expression")},aliases:["Expression"]});Ge("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:(0,z.assertNodeType)("Expression")}}});Ge("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:(0,z.assertNodeType)("Expression"),optional:!0},consequent:(0,z.validateArrayOfType)("Statement")}});Ge("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:(0,z.assertNodeType)("Expression")},cases:(0,z.validateArrayOfType)("SwitchCase")}});Ge("ThisExpression",{aliases:["Expression"]});Ge("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,z.assertNodeType)("Expression")}}});Ge("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{block:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.chain)((0,z.assertNodeType)("BlockStatement"),Object.assign(function(e){if(!e.handler&&!e.finalizer)throw new TypeError("TryStatement expects either a handler or finalizer, or both")},{oneOfNodeTypes:["BlockStatement"]})):(0,z.assertNodeType)("BlockStatement")},handler:{optional:!0,validate:(0,z.assertNodeType)("CatchClause")},finalizer:{optional:!0,validate:(0,z.assertNodeType)("BlockStatement")}}});Ge("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!0},argument:{validate:(0,z.assertNodeType)("Expression")},operator:{validate:(0,z.assertOneOf)(...kg.UNARY_OPERATORS)}},visitor:["argument"],aliases:["UnaryLike","Expression"]});Ge("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!1},argument:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.assertNodeType)("Identifier","MemberExpression"):(0,z.assertNodeType)("Expression")},operator:{validate:(0,z.assertOneOf)(...kg.UPDATE_OPERATORS)}},visitor:["argument"],aliases:["Expression"]});Ge("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{declare:{validate:(0,z.assertValueType)("boolean"),optional:!0},kind:{validate:(0,z.assertOneOf)("var","let","const","using","await using")},declarations:(0,z.validateArrayOfType)("VariableDeclarator")},validate:process.env.BABEL_TYPES_8_BREAKING?(()=>{let e=(0,z.assertNodeType)("Identifier","Placeholder"),t=(0,z.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","Placeholder"),r=(0,z.assertNodeType)("Identifier","VoidPattern","Placeholder");return function(a,n,s){let{kind:i,declarations:o}=s,l=(0,di.default)("ForXStatement",a,{left:s});if(l&&o.length!==1)throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${a.type}`);for(let c of o)i==="const"||i==="let"||i==="var"?!l&&!c.init?e(c,"id",c.id):t(c,"id",c.id):r(c,"id",c.id)}})():void 0});Ge("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","VoidPattern"):(0,z.assertNodeType)("LVal","VoidPattern")},definite:{optional:!0,validate:(0,z.assertValueType)("boolean")},init:{optional:!0,validate:(0,z.assertNodeType)("Expression")}}});Ge("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:(0,z.assertNodeType)("Expression")},body:{validate:(0,z.assertNodeType)("Statement")}}});Ge("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{validate:(0,z.assertNodeType)("Expression")},body:{validate:(0,z.assertNodeType)("Statement")}}});Ge("AssignmentPattern",{visitor:["left","right","decorators"],builder:["left","right"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:Object.assign({},Dg(),{left:{validate:(0,z.assertNodeType)("Identifier","ObjectPattern","ArrayPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression")},right:{validate:(0,z.assertNodeType)("Expression")},decorators:{validate:(0,z.arrayOfType)("Decorator"),optional:!0}})});Ge("ArrayPattern",{visitor:["elements","typeAnnotation"],builder:["elements"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:Object.assign({},Dg(),{elements:{validate:(0,z.chain)((0,z.assertValueType)("array"),(0,z.assertEach)((0,z.assertNodeOrValueType)("null","PatternLike")))}})});Ge("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["typeParameters","params","predicate","returnType","body"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:Object.assign({},Mg(),nm(),{expression:{validate:(0,z.assertValueType)("boolean")},body:{validate:(0,z.assertNodeType)("BlockStatement","Expression")},predicate:{validate:(0,z.assertNodeType)("DeclaredPredicate","InferredPredicate"),optional:!0}})});Ge("ClassBody",{visitor:["body"],fields:{body:(0,z.validateArrayOfType)("ClassMethod","ClassPrivateMethod","ClassProperty","ClassPrivateProperty","ClassAccessorProperty","TSDeclareMethod","TSIndexSignature","StaticBlock")}});Ge("ClassExpression",{builder:["id","superClass","body","decorators"],visitor:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body"],aliases:["Scopable","Class","Expression"],fields:{id:{validate:(0,z.assertNodeType)("Identifier"),optional:!0},typeParameters:{validate:(0,z.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0},body:{validate:(0,z.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,z.assertNodeType)("Expression")},superTypeParameters:{validate:(0,z.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:(0,z.arrayOfType)("TSExpressionWithTypeArguments","ClassImplements"),optional:!0},decorators:{validate:(0,z.arrayOfType)("Decorator"),optional:!0},mixins:{validate:(0,z.assertNodeType)("InterfaceExtends"),optional:!0}}});Ge("ClassDeclaration",{inherits:"ClassExpression",aliases:["Scopable","Class","Statement","Declaration"],fields:{id:{validate:(0,z.assertNodeType)("Identifier"),optional:!0},typeParameters:{validate:(0,z.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0},body:{validate:(0,z.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,z.assertNodeType)("Expression")},superTypeParameters:{validate:(0,z.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:(0,z.arrayOfType)("TSExpressionWithTypeArguments","ClassImplements"),optional:!0},decorators:{validate:(0,z.arrayOfType)("Decorator"),optional:!0},mixins:{validate:(0,z.assertNodeType)("InterfaceExtends"),optional:!0},declare:{validate:(0,z.assertValueType)("boolean"),optional:!0},abstract:{validate:(0,z.assertValueType)("boolean"),optional:!0}},validate:process.env.BABEL_TYPES_8_BREAKING?function(){let e=(0,z.assertNodeType)("Identifier");return function(t,r,a){(0,di.default)("ExportDefaultDeclaration",t)||e(a,"id",a.id)}}():void 0});var nL=ys.importAttributes={attributes:{optional:!0,validate:(0,z.arrayOfType)("ImportAttribute")},assertions:{deprecated:!0,optional:!0,validate:(0,z.arrayOfType)("ImportAttribute")}};Ge("ExportAllDeclaration",{builder:["source"],visitor:["source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:Object.assign({source:{validate:(0,z.assertNodeType)("StringLiteral")},exportKind:(0,z.validateOptional)((0,z.assertOneOf)("type","value"))},nL)});Ge("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{declaration:(0,z.validateType)("TSDeclareFunction","FunctionDeclaration","ClassDeclaration","Expression"),exportKind:(0,z.validateOptional)((0,z.assertOneOf)("value"))}});Ge("ExportNamedDeclaration",{builder:["declaration","specifiers","source"],visitor:["declaration","specifiers","source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:Object.assign({declaration:{optional:!0,validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.chain)((0,z.assertNodeType)("Declaration"),Object.assign(function(e,t,r){if(r&&e.specifiers.length)throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");if(r&&e.source)throw new TypeError("Cannot export a declaration from a source")},{oneOfNodeTypes:["Declaration"]})):(0,z.assertNodeType)("Declaration")}},nL,{specifiers:{default:[],validate:(0,z.arrayOf)(function(){let e=(0,z.assertNodeType)("ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"),t=(0,z.assertNodeType)("ExportSpecifier");return process.env.BABEL_TYPES_8_BREAKING?Object.assign(function(r,a,n){(r.source?e:t)(r,a,n)},{oneOfNodeTypes:["ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"]}):e}())},source:{validate:(0,z.assertNodeType)("StringLiteral"),optional:!0},exportKind:(0,z.validateOptional)((0,z.assertOneOf)("type","value"))})});Ge("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,z.assertNodeType)("Identifier")},exported:{validate:(0,z.assertNodeType)("Identifier","StringLiteral")},exportKind:{validate:(0,z.assertOneOf)("type","value"),optional:!0}}});Ge("ForOfStatement",{visitor:["left","right","body"],builder:["left","right","body","await"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:function(){if(!process.env.BABEL_TYPES_8_BREAKING)return(0,z.assertNodeType)("VariableDeclaration","LVal");let e=(0,z.assertNodeType)("VariableDeclaration"),t=(0,z.assertNodeType)("Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression");return Object.assign(function(r,a,n){(0,di.default)("VariableDeclaration",n)?e(r,a,n):t(r,a,n)},{oneOfNodeTypes:["VariableDeclaration","Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"]})}()},right:{validate:(0,z.assertNodeType)("Expression")},body:{validate:(0,z.assertNodeType)("Statement")},await:{default:!1}}});Ge("ImportDeclaration",{builder:["specifiers","source"],visitor:["specifiers","source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration"],fields:Object.assign({},nL,{module:{optional:!0,validate:(0,z.assertValueType)("boolean")},phase:{default:null,validate:(0,z.assertOneOf)("source","defer")},specifiers:(0,z.validateArrayOfType)("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier"),source:{validate:(0,z.assertNodeType)("StringLiteral")},importKind:{validate:(0,z.assertOneOf)("type","typeof","value"),optional:!0}})});Ge("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,z.assertNodeType)("Identifier")}}});Ge("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,z.assertNodeType)("Identifier")}}});Ge("ImportSpecifier",{visitor:["imported","local"],builder:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,z.assertNodeType)("Identifier")},imported:{validate:(0,z.assertNodeType)("Identifier","StringLiteral")},importKind:{validate:(0,z.assertOneOf)("type","typeof","value"),optional:!0}}});Ge("ImportExpression",{visitor:["source","options"],aliases:["Expression"],fields:{phase:{default:null,validate:(0,z.assertOneOf)("source","defer")},source:{validate:(0,z.assertNodeType)("Expression")},options:{validate:(0,z.assertNodeType)("Expression"),optional:!0}}});Ge("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.chain)((0,z.assertNodeType)("Identifier"),Object.assign(function(e,t,r){let a;switch(r.name){case"function":a="sent";break;case"new":a="target";break;case"import":a="meta";break}if(!(0,di.default)("Identifier",e.property,{name:a}))throw new TypeError("Unrecognised MetaProperty")},{oneOfNodeTypes:["Identifier"]})):(0,z.assertNodeType)("Identifier")},property:{validate:(0,z.assertNodeType)("Identifier")}}});var Ow=()=>({abstract:{validate:(0,z.assertValueType)("boolean"),optional:!0},accessibility:{validate:(0,z.assertOneOf)("public","private","protected"),optional:!0},static:{default:!1},override:{default:!1},computed:{default:!1},optional:{validate:(0,z.assertValueType)("boolean"),optional:!0},key:{validate:(0,z.chain)(function(){let e=(0,z.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral"),t=(0,z.assertNodeType)("Expression");return function(r,a,n){(r.computed?t:e)(r,a,n)}}(),(0,z.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression"))}});ys.classMethodOrPropertyCommon=Ow;var sL=()=>Object.assign({},Mg(),Ow(),{params:(0,z.validateArrayOfType)("FunctionParameter","TSParameterProperty"),kind:{validate:(0,z.assertOneOf)("get","set","method","constructor"),default:"method"},access:{validate:(0,z.chain)((0,z.assertValueType)("string"),(0,z.assertOneOf)("public","private","protected")),optional:!0},decorators:{validate:(0,z.arrayOfType)("Decorator"),optional:!0}});ys.classMethodOrDeclareMethodCommon=sL;Ge("ClassMethod",Object.assign({aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static","generator","async"],visitor:["decorators","key","typeParameters","params","returnType","body"]},v0(),{fields:Object.assign({},sL(),nm(),{body:{validate:(0,z.assertNodeType)("BlockStatement")}})}));Ge("ObjectPattern",{visitor:["decorators","properties","typeAnnotation"],builder:["properties"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:Object.assign({},Dg(),{properties:(0,z.validateArrayOfType)("RestElement","ObjectProperty")})});Ge("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],deprecatedAlias:"SpreadProperty",fields:{argument:{validate:(0,z.assertNodeType)("Expression")}}});Ge("Super",{aliases:["Expression"]});Ge("TaggedTemplateExpression",{visitor:["tag","typeParameters","quasi"],builder:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:(0,z.assertNodeType)("Expression")},quasi:{validate:(0,z.assertNodeType)("TemplateLiteral")},typeParameters:{validate:(0,z.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}});Ge("TemplateElement",{builder:["value","tail"],fields:{value:{validate:(0,z.chain)((0,z.assertShape)({raw:{validate:(0,z.assertValueType)("string")},cooked:{validate:(0,z.assertValueType)("string"),optional:!0}}),function(t){let r=t.value.raw,a=!1,n=()=>{throw new Error("Internal @babel/types error.")},{str:s,firstInvalidLoc:i}=(0,Jme.readStringContents)("template",r,0,0,0,{unterminated(){a=!0},strictNumericEscape:n,invalidEscapeSequence:n,numericSeparatorInEscapeSequence:n,unexpectedNumericSeparator:n,invalidDigit:n,invalidCodePoint:n});if(!a)throw new Error("Invalid raw");t.value.cooked=i?null:s})},tail:{default:!1}}});Ge("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:(0,z.validateArrayOfType)("TemplateElement"),expressions:{validate:(0,z.chain)((0,z.assertValueType)("array"),(0,z.assertEach)((0,z.assertNodeType)("Expression","TSType")),function(e,t,r){if(e.quasis.length!==r.length+1)throw new TypeError(`Number of ${e.type} quasis should be exactly one more than the number of expressions.
|
|
Expected ${r.length+1} quasis but got ${e.quasis.length}`)})}}});Ge("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.chain)((0,z.assertValueType)("boolean"),Object.assign(function(e,t,r){if(r&&!e.argument)throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument")},{type:"boolean"})):(0,z.assertValueType)("boolean"),default:!1},argument:{optional:!0,validate:(0,z.assertNodeType)("Expression")}}});Ge("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,z.assertNodeType)("Expression")}}});Ge("Import",{aliases:["Expression"]});Ge("BigIntLiteral",{builder:["value"],fields:{value:{validate:(0,z.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]});Ge("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,z.assertNodeType)("Identifier")}}});Ge("OptionalMemberExpression",{builder:["object","property","computed","optional"],visitor:["object","property"],aliases:["Expression"],fields:{object:{validate:(0,z.assertNodeType)("Expression")},property:{validate:function(){let e=(0,z.assertNodeType)("Identifier"),t=(0,z.assertNodeType)("Expression");return Object.assign(function(a,n,s){(a.computed?t:e)(a,n,s)},{oneOfNodeTypes:["Expression","Identifier"]})}()},computed:{default:!1},optional:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.chain)((0,z.assertValueType)("boolean"),(0,z.assertOptionalChainStart)()):(0,z.assertValueType)("boolean")}}});Ge("OptionalCallExpression",{visitor:["callee","typeParameters","typeArguments","arguments"],builder:["callee","arguments","optional"],aliases:["Expression"],fields:Object.assign({callee:{validate:(0,z.assertNodeType)("Expression")},arguments:(0,z.validateArrayOfType)("Expression","SpreadElement","ArgumentPlaceholder"),optional:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.chain)((0,z.assertValueType)("boolean"),(0,z.assertOptionalChainStart)()):(0,z.assertValueType)("boolean")},typeArguments:{validate:(0,z.assertNodeType)("TypeParameterInstantiation"),optional:!0}},{typeParameters:{validate:(0,z.assertNodeType)("TSTypeParameterInstantiation"),optional:!0}})});Ge("ClassProperty",Object.assign({visitor:["decorators","variance","key","typeAnnotation","value"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property"]},v0(),{fields:Object.assign({},Ow(),{value:{validate:(0,z.assertNodeType)("Expression"),optional:!0},definite:{validate:(0,z.assertValueType)("boolean"),optional:!0},typeAnnotation:{validate:(0,z.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:(0,z.arrayOfType)("Decorator"),optional:!0},readonly:{validate:(0,z.assertValueType)("boolean"),optional:!0},declare:{validate:(0,z.assertValueType)("boolean"),optional:!0},variance:{validate:(0,z.assertNodeType)("Variance"),optional:!0}})}));Ge("ClassAccessorProperty",Object.assign({visitor:["decorators","key","typeAnnotation","value"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property","Accessor"]},v0(!0),{fields:Object.assign({},Ow(),{key:{validate:(0,z.chain)(function(){let e=(0,z.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"),t=(0,z.assertNodeType)("Expression");return function(r,a,n){(r.computed?t:e)(r,a,n)}}(),(0,z.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression","PrivateName"))},value:{validate:(0,z.assertNodeType)("Expression"),optional:!0},definite:{validate:(0,z.assertValueType)("boolean"),optional:!0},typeAnnotation:{validate:(0,z.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:(0,z.arrayOfType)("Decorator"),optional:!0},readonly:{validate:(0,z.assertValueType)("boolean"),optional:!0},declare:{validate:(0,z.assertValueType)("boolean"),optional:!0},variance:{validate:(0,z.assertNodeType)("Variance"),optional:!0}})}));Ge("ClassPrivateProperty",{visitor:["decorators","variance","key","typeAnnotation","value"],builder:["key","value","decorators","static"],aliases:["Property","Private"],fields:{key:{validate:(0,z.assertNodeType)("PrivateName")},value:{validate:(0,z.assertNodeType)("Expression"),optional:!0},typeAnnotation:{validate:(0,z.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:(0,z.arrayOfType)("Decorator"),optional:!0},static:{validate:(0,z.assertValueType)("boolean"),default:!1},readonly:{validate:(0,z.assertValueType)("boolean"),optional:!0},optional:{validate:(0,z.assertValueType)("boolean"),optional:!0},definite:{validate:(0,z.assertValueType)("boolean"),optional:!0},variance:{validate:(0,z.assertNodeType)("Variance"),optional:!0}}});Ge("ClassPrivateMethod",{builder:["kind","key","params","body","static"],visitor:["decorators","key","typeParameters","params","returnType","body"],aliases:["Function","Scopable","BlockParent","FunctionParent","Method","Private"],fields:Object.assign({},sL(),nm(),{kind:{validate:(0,z.assertOneOf)("get","set","method"),default:"method"},key:{validate:(0,z.assertNodeType)("PrivateName")},body:{validate:(0,z.assertNodeType)("BlockStatement")}})});Ge("PrivateName",{visitor:["id"],aliases:["Private"],fields:{id:{validate:(0,z.assertNodeType)("Identifier")}}});Ge("StaticBlock",{visitor:["body"],fields:{body:(0,z.validateArrayOfType)("Statement")},aliases:["Scopable","BlockParent","FunctionParent"]});Ge("ImportAttribute",{visitor:["key","value"],fields:{key:{validate:(0,z.assertNodeType)("Identifier","StringLiteral")},value:{validate:(0,z.assertNodeType)("StringLiteral")}}})});var H4=ne(()=>{"use strict";var q4=S0(),ve=Pc(),wt=(0,ve.defineAliasedType)("Flow"),iL=e=>{let t=e==="DeclareClass";wt(e,{builder:["id","typeParameters","extends","body"],visitor:["id","typeParameters","extends",...t?["mixins","implements"]:[],"body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:Object.assign({id:(0,ve.validateType)("Identifier"),typeParameters:(0,ve.validateOptionalType)("TypeParameterDeclaration"),extends:(0,ve.validateOptional)((0,ve.arrayOfType)("InterfaceExtends"))},t?{mixins:(0,ve.validateOptional)((0,ve.arrayOfType)("InterfaceExtends")),implements:(0,ve.validateOptional)((0,ve.arrayOfType)("ClassImplements"))}:{},{body:(0,ve.validateType)("ObjectTypeAnnotation")})})};wt("AnyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});wt("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["FlowType"],fields:{elementType:(0,ve.validateType)("FlowType")}});wt("BooleanTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});wt("BooleanLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,ve.validate)((0,ve.assertValueType)("boolean"))}});wt("NullLiteralTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});wt("ClassImplements",{visitor:["id","typeParameters"],fields:{id:(0,ve.validateType)("Identifier"),typeParameters:(0,ve.validateOptionalType)("TypeParameterInstantiation")}});iL("DeclareClass");wt("DeclareFunction",{builder:["id"],visitor:["id","predicate"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,ve.validateType)("Identifier"),predicate:(0,ve.validateOptionalType)("DeclaredPredicate")}});iL("DeclareInterface");wt("DeclareModule",{builder:["id","body","kind"],visitor:["id","body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,ve.validateType)("Identifier","StringLiteral"),body:(0,ve.validateType)("BlockStatement"),kind:(0,ve.validateOptional)((0,ve.assertOneOf)("CommonJS","ES"))}});wt("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{typeAnnotation:(0,ve.validateType)("TypeAnnotation")}});wt("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,ve.validateType)("Identifier"),typeParameters:(0,ve.validateOptionalType)("TypeParameterDeclaration"),right:(0,ve.validateType)("FlowType")}});wt("DeclareOpaqueType",{visitor:["id","typeParameters","supertype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,ve.validateType)("Identifier"),typeParameters:(0,ve.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,ve.validateOptionalType)("FlowType"),impltype:(0,ve.validateOptionalType)("FlowType")}});wt("DeclareVariable",{visitor:["id"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,ve.validateType)("Identifier")}});wt("DeclareExportDeclaration",{visitor:["declaration","specifiers","source","attributes"],aliases:["FlowDeclaration","Statement","Declaration"],fields:Object.assign({declaration:(0,ve.validateOptionalType)("Flow"),specifiers:(0,ve.validateOptional)((0,ve.arrayOfType)("ExportSpecifier","ExportNamespaceSpecifier")),source:(0,ve.validateOptionalType)("StringLiteral"),default:(0,ve.validateOptional)((0,ve.assertValueType)("boolean"))},q4.importAttributes)});wt("DeclareExportAllDeclaration",{visitor:["source","attributes"],aliases:["FlowDeclaration","Statement","Declaration"],fields:Object.assign({source:(0,ve.validateType)("StringLiteral"),exportKind:(0,ve.validateOptional)((0,ve.assertOneOf)("type","value"))},q4.importAttributes)});wt("DeclaredPredicate",{visitor:["value"],aliases:["FlowPredicate"],fields:{value:(0,ve.validateType)("Flow")}});wt("ExistsTypeAnnotation",{aliases:["FlowType"]});wt("FunctionTypeAnnotation",{builder:["typeParameters","params","rest","returnType"],visitor:["typeParameters","this","params","rest","returnType"],aliases:["FlowType"],fields:{typeParameters:(0,ve.validateOptionalType)("TypeParameterDeclaration"),params:(0,ve.validateArrayOfType)("FunctionTypeParam"),rest:(0,ve.validateOptionalType)("FunctionTypeParam"),this:(0,ve.validateOptionalType)("FunctionTypeParam"),returnType:(0,ve.validateType)("FlowType")}});wt("FunctionTypeParam",{visitor:["name","typeAnnotation"],fields:{name:(0,ve.validateOptionalType)("Identifier"),typeAnnotation:(0,ve.validateType)("FlowType"),optional:(0,ve.validateOptional)((0,ve.assertValueType)("boolean"))}});wt("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["FlowType"],fields:{id:(0,ve.validateType)("Identifier","QualifiedTypeIdentifier"),typeParameters:(0,ve.validateOptionalType)("TypeParameterInstantiation")}});wt("InferredPredicate",{aliases:["FlowPredicate"]});wt("InterfaceExtends",{visitor:["id","typeParameters"],fields:{id:(0,ve.validateType)("Identifier","QualifiedTypeIdentifier"),typeParameters:(0,ve.validateOptionalType)("TypeParameterInstantiation")}});iL("InterfaceDeclaration");wt("InterfaceTypeAnnotation",{visitor:["extends","body"],aliases:["FlowType"],fields:{extends:(0,ve.validateOptional)((0,ve.arrayOfType)("InterfaceExtends")),body:(0,ve.validateType)("ObjectTypeAnnotation")}});wt("IntersectionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,ve.validate)((0,ve.arrayOfType)("FlowType"))}});wt("MixedTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});wt("EmptyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});wt("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["FlowType"],fields:{typeAnnotation:(0,ve.validateType)("FlowType")}});wt("NumberLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,ve.validate)((0,ve.assertValueType)("number"))}});wt("NumberTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});wt("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties","internalSlots"],aliases:["FlowType"],builder:["properties","indexers","callProperties","internalSlots","exact"],fields:{properties:(0,ve.validate)((0,ve.arrayOfType)("ObjectTypeProperty","ObjectTypeSpreadProperty")),indexers:{validate:(0,ve.arrayOfType)("ObjectTypeIndexer"),optional:!0,default:[]},callProperties:{validate:(0,ve.arrayOfType)("ObjectTypeCallProperty"),optional:!0,default:[]},internalSlots:{validate:(0,ve.arrayOfType)("ObjectTypeInternalSlot"),optional:!0,default:[]},exact:{validate:(0,ve.assertValueType)("boolean"),default:!1},inexact:(0,ve.validateOptional)((0,ve.assertValueType)("boolean"))}});wt("ObjectTypeInternalSlot",{visitor:["id","value"],builder:["id","value","optional","static","method"],aliases:["UserWhitespacable"],fields:{id:(0,ve.validateType)("Identifier"),value:(0,ve.validateType)("FlowType"),optional:(0,ve.validate)((0,ve.assertValueType)("boolean")),static:(0,ve.validate)((0,ve.assertValueType)("boolean")),method:(0,ve.validate)((0,ve.assertValueType)("boolean"))}});wt("ObjectTypeCallProperty",{visitor:["value"],aliases:["UserWhitespacable"],fields:{value:(0,ve.validateType)("FlowType"),static:(0,ve.validate)((0,ve.assertValueType)("boolean"))}});wt("ObjectTypeIndexer",{visitor:["variance","id","key","value"],builder:["id","key","value","variance"],aliases:["UserWhitespacable"],fields:{id:(0,ve.validateOptionalType)("Identifier"),key:(0,ve.validateType)("FlowType"),value:(0,ve.validateType)("FlowType"),static:(0,ve.validate)((0,ve.assertValueType)("boolean")),variance:(0,ve.validateOptionalType)("Variance")}});wt("ObjectTypeProperty",{visitor:["key","value","variance"],aliases:["UserWhitespacable"],fields:{key:(0,ve.validateType)("Identifier","StringLiteral"),value:(0,ve.validateType)("FlowType"),kind:(0,ve.validate)((0,ve.assertOneOf)("init","get","set")),static:(0,ve.validate)((0,ve.assertValueType)("boolean")),proto:(0,ve.validate)((0,ve.assertValueType)("boolean")),optional:(0,ve.validate)((0,ve.assertValueType)("boolean")),variance:(0,ve.validateOptionalType)("Variance"),method:(0,ve.validate)((0,ve.assertValueType)("boolean"))}});wt("ObjectTypeSpreadProperty",{visitor:["argument"],aliases:["UserWhitespacable"],fields:{argument:(0,ve.validateType)("FlowType")}});wt("OpaqueType",{visitor:["id","typeParameters","supertype","impltype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,ve.validateType)("Identifier"),typeParameters:(0,ve.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,ve.validateOptionalType)("FlowType"),impltype:(0,ve.validateType)("FlowType")}});wt("QualifiedTypeIdentifier",{visitor:["qualification","id"],builder:["id","qualification"],fields:{id:(0,ve.validateType)("Identifier"),qualification:(0,ve.validateType)("Identifier","QualifiedTypeIdentifier")}});wt("StringLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,ve.validate)((0,ve.assertValueType)("string"))}});wt("StringTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});wt("SymbolTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});wt("ThisTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});wt("TupleTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,ve.validate)((0,ve.arrayOfType)("FlowType"))}});wt("TypeofTypeAnnotation",{visitor:["argument"],aliases:["FlowType"],fields:{argument:(0,ve.validateType)("FlowType")}});wt("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,ve.validateType)("Identifier"),typeParameters:(0,ve.validateOptionalType)("TypeParameterDeclaration"),right:(0,ve.validateType)("FlowType")}});wt("TypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:(0,ve.validateType)("FlowType")}});wt("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["ExpressionWrapper","Expression"],fields:{expression:(0,ve.validateType)("Expression"),typeAnnotation:(0,ve.validateType)("TypeAnnotation")}});wt("TypeParameter",{visitor:["bound","default","variance"],fields:{name:(0,ve.validate)((0,ve.assertValueType)("string")),bound:(0,ve.validateOptionalType)("TypeAnnotation"),default:(0,ve.validateOptionalType)("FlowType"),variance:(0,ve.validateOptionalType)("Variance")}});wt("TypeParameterDeclaration",{visitor:["params"],fields:{params:(0,ve.validate)((0,ve.arrayOfType)("TypeParameter"))}});wt("TypeParameterInstantiation",{visitor:["params"],fields:{params:(0,ve.validate)((0,ve.arrayOfType)("FlowType"))}});wt("UnionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,ve.validate)((0,ve.arrayOfType)("FlowType"))}});wt("Variance",{builder:["kind"],fields:{kind:(0,ve.validate)((0,ve.assertOneOf)("minus","plus"))}});wt("VoidTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});wt("EnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{id:(0,ve.validateType)("Identifier"),body:(0,ve.validateType)("EnumBooleanBody","EnumNumberBody","EnumStringBody","EnumSymbolBody")}});wt("EnumBooleanBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,ve.validate)((0,ve.assertValueType)("boolean")),members:(0,ve.validateArrayOfType)("EnumBooleanMember"),hasUnknownMembers:(0,ve.validate)((0,ve.assertValueType)("boolean"))}});wt("EnumNumberBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,ve.validate)((0,ve.assertValueType)("boolean")),members:(0,ve.validateArrayOfType)("EnumNumberMember"),hasUnknownMembers:(0,ve.validate)((0,ve.assertValueType)("boolean"))}});wt("EnumStringBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,ve.validate)((0,ve.assertValueType)("boolean")),members:(0,ve.validateArrayOfType)("EnumStringMember","EnumDefaultedMember"),hasUnknownMembers:(0,ve.validate)((0,ve.assertValueType)("boolean"))}});wt("EnumSymbolBody",{aliases:["EnumBody"],visitor:["members"],fields:{members:(0,ve.validateArrayOfType)("EnumDefaultedMember"),hasUnknownMembers:(0,ve.validate)((0,ve.assertValueType)("boolean"))}});wt("EnumBooleanMember",{aliases:["EnumMember"],builder:["id"],visitor:["id","init"],fields:{id:(0,ve.validateType)("Identifier"),init:(0,ve.validateType)("BooleanLiteral")}});wt("EnumNumberMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:(0,ve.validateType)("Identifier"),init:(0,ve.validateType)("NumericLiteral")}});wt("EnumStringMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:(0,ve.validateType)("Identifier"),init:(0,ve.validateType)("StringLiteral")}});wt("EnumDefaultedMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:(0,ve.validateType)("Identifier")}});wt("IndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:(0,ve.validateType)("FlowType"),indexType:(0,ve.validateType)("FlowType")}});wt("OptionalIndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:(0,ve.validateType)("FlowType"),indexType:(0,ve.validateType)("FlowType"),optional:(0,ve.validate)((0,ve.assertValueType)("boolean"))}})});var $4=ne(()=>{"use strict";var ja=Pc(),fi=(0,ja.defineAliasedType)("JSX");fi("JSXAttribute",{visitor:["name","value"],aliases:["Immutable"],fields:{name:{validate:(0,ja.assertNodeType)("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:(0,ja.assertNodeType)("JSXElement","JSXFragment","StringLiteral","JSXExpressionContainer")}}});fi("JSXClosingElement",{visitor:["name"],aliases:["Immutable"],fields:{name:{validate:(0,ja.assertNodeType)("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")}}});fi("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["Immutable","Expression"],fields:Object.assign({openingElement:{validate:(0,ja.assertNodeType)("JSXOpeningElement")},closingElement:{optional:!0,validate:(0,ja.assertNodeType)("JSXClosingElement")},children:(0,ja.validateArrayOfType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")},{selfClosing:{validate:(0,ja.assertValueType)("boolean"),optional:!0}})});fi("JSXEmptyExpression",{});fi("JSXExpressionContainer",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:(0,ja.assertNodeType)("Expression","JSXEmptyExpression")}}});fi("JSXSpreadChild",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:(0,ja.assertNodeType)("Expression")}}});fi("JSXIdentifier",{builder:["name"],fields:{name:{validate:(0,ja.assertValueType)("string")}}});fi("JSXMemberExpression",{visitor:["object","property"],fields:{object:{validate:(0,ja.assertNodeType)("JSXMemberExpression","JSXIdentifier")},property:{validate:(0,ja.assertNodeType)("JSXIdentifier")}}});fi("JSXNamespacedName",{visitor:["namespace","name"],fields:{namespace:{validate:(0,ja.assertNodeType)("JSXIdentifier")},name:{validate:(0,ja.assertNodeType)("JSXIdentifier")}}});fi("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","typeParameters","typeArguments","attributes"],aliases:["Immutable"],fields:Object.assign({name:{validate:(0,ja.assertNodeType)("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")},selfClosing:{default:!1},attributes:(0,ja.validateArrayOfType)("JSXAttribute","JSXSpreadAttribute"),typeArguments:{validate:(0,ja.assertNodeType)("TypeParameterInstantiation"),optional:!0}},{typeParameters:{validate:(0,ja.assertNodeType)("TSTypeParameterInstantiation"),optional:!0}})});fi("JSXSpreadAttribute",{visitor:["argument"],fields:{argument:{validate:(0,ja.assertNodeType)("Expression")}}});fi("JSXText",{aliases:["Immutable"],builder:["value"],fields:{value:{validate:(0,ja.assertValueType)("string")}}});fi("JSXFragment",{builder:["openingFragment","closingFragment","children"],visitor:["openingFragment","children","closingFragment"],aliases:["Immutable","Expression"],fields:{openingFragment:{validate:(0,ja.assertNodeType)("JSXOpeningFragment")},closingFragment:{validate:(0,ja.assertNodeType)("JSXClosingFragment")},children:(0,ja.validateArrayOfType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")}});fi("JSXOpeningFragment",{aliases:["Immutable"]});fi("JSXClosingFragment",{aliases:["Immutable"]})});var cL=ne(Jd=>{"use strict";Object.defineProperty(Jd,"__esModule",{value:!0});Jd.PLACEHOLDERS_FLIPPED_ALIAS=Jd.PLACEHOLDERS_ALIAS=Jd.PLACEHOLDERS=void 0;var Qme=Pc(),Zme=Jd.PLACEHOLDERS=["Identifier","StringLiteral","Expression","Statement","Declaration","BlockStatement","ClassBody","Pattern"],lL=Jd.PLACEHOLDERS_ALIAS={Declaration:["Statement"],Pattern:["PatternLike","LVal"]};for(let e of Zme){let t=Qme.ALIAS_KEYS[e];t!=null&&t.length&&(lL[e]=t)}var oL=Jd.PLACEHOLDERS_FLIPPED_ALIAS={};Object.keys(lL).forEach(e=>{lL[e].forEach(t=>{hasOwnProperty.call(oL,t)||(oL[t]=[]),oL[t].push(e)})})});var G4=ne(()=>{"use strict";var Fw=Pc(),ehe=cL(),the=S0(),uL=(0,Fw.defineAliasedType)("Miscellaneous");uL("Noop",{visitor:[]});uL("Placeholder",{visitor:[],builder:["expectedNode","name"],fields:Object.assign({name:{validate:(0,Fw.assertNodeType)("Identifier")},expectedNode:{validate:(0,Fw.assertOneOf)(...ehe.PLACEHOLDERS)}},(0,the.patternLikeCommon)())});uL("V8IntrinsicIdentifier",{builder:["name"],fields:{name:{validate:(0,Fw.assertValueType)("string")}}})});var K4=ne(()=>{"use strict";var va=Pc();(0,va.default)("ArgumentPlaceholder",{});(0,va.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:process.env.BABEL_TYPES_8_BREAKING?{object:{validate:(0,va.assertNodeType)("Expression")},callee:{validate:(0,va.assertNodeType)("Expression")}}:{object:{validate:Object.assign(()=>{},{oneOfNodeTypes:["Expression"]})},callee:{validate:Object.assign(()=>{},{oneOfNodeTypes:["Expression"]})}}});(0,va.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,va.assertNodeType)("Expression")}}});(0,va.default)("DoExpression",{visitor:["body"],builder:["body","async"],aliases:["Expression"],fields:{body:{validate:(0,va.assertNodeType)("BlockStatement")},async:{validate:(0,va.assertValueType)("boolean"),default:!1}}});(0,va.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,va.assertNodeType)("Identifier")}}});(0,va.default)("RecordExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:(0,va.validateArrayOfType)("ObjectProperty","SpreadElement")}});(0,va.default)("TupleExpression",{fields:{elements:{validate:(0,va.arrayOfType)("Expression","SpreadElement"),default:[]}},visitor:["elements"],aliases:["Expression"]});(0,va.default)("DecimalLiteral",{builder:["value"],fields:{value:{validate:(0,va.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]});(0,va.default)("ModuleExpression",{visitor:["body"],fields:{body:{validate:(0,va.assertNodeType)("Program")}},aliases:["Expression"]});(0,va.default)("TopicReference",{aliases:["Expression"]});(0,va.default)("PipelineTopicExpression",{builder:["expression"],visitor:["expression"],fields:{expression:{validate:(0,va.assertNodeType)("Expression")}},aliases:["Expression"]});(0,va.default)("PipelineBareFunction",{builder:["callee"],visitor:["callee"],fields:{callee:{validate:(0,va.assertNodeType)("Expression")}},aliases:["Expression"]});(0,va.default)("PipelinePrimaryTopicReference",{aliases:["Expression"]});(0,va.default)("VoidPattern",{aliases:["Pattern","PatternLike","FunctionParameter"]})});var e8=ne(()=>{"use strict";var De=Pc(),dL=S0(),rhe=Ng(),Bt=(0,De.defineAliasedType)("TypeScript"),ji=(0,De.assertValueType)("boolean"),W4=()=>({returnType:{validate:(0,De.assertNodeType)("TSTypeAnnotation","Noop"),optional:!0},typeParameters:{validate:(0,De.assertNodeType)("TSTypeParameterDeclaration","Noop"),optional:!0}});Bt("TSParameterProperty",{aliases:["LVal"],visitor:["parameter"],fields:{accessibility:{validate:(0,De.assertOneOf)("public","private","protected"),optional:!0},readonly:{validate:(0,De.assertValueType)("boolean"),optional:!0},parameter:{validate:(0,De.assertNodeType)("Identifier","AssignmentPattern")},override:{validate:(0,De.assertValueType)("boolean"),optional:!0},decorators:{validate:(0,De.arrayOfType)("Decorator"),optional:!0}}});Bt("TSDeclareFunction",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","params","returnType"],fields:Object.assign({},(0,dL.functionDeclarationCommon)(),W4())});Bt("TSDeclareMethod",Object.assign({visitor:["decorators","key","typeParameters","params","returnType"]},(0,dL.classMethodOrPropertyUnionShapeCommon)(),{fields:Object.assign({},(0,dL.classMethodOrDeclareMethodCommon)(),W4())}));Bt("TSQualifiedName",{aliases:["TSEntityName"],visitor:["left","right"],fields:{left:(0,De.validateType)("TSEntityName"),right:(0,De.validateType)("Identifier")}});var Bw=()=>({typeParameters:(0,De.validateOptionalType)("TSTypeParameterDeclaration"),parameters:(0,De.validateArrayOfType)("ArrayPattern","Identifier","ObjectPattern","RestElement"),typeAnnotation:(0,De.validateOptionalType)("TSTypeAnnotation")}),X4={aliases:["TSTypeElement"],visitor:["typeParameters","parameters","typeAnnotation"],fields:Bw()};Bt("TSCallSignatureDeclaration",X4);Bt("TSConstructSignatureDeclaration",X4);var Y4=()=>({key:(0,De.validateType)("Expression"),computed:{default:!1},optional:(0,De.validateOptional)(ji)});Bt("TSPropertySignature",{aliases:["TSTypeElement"],visitor:["key","typeAnnotation"],fields:Object.assign({},Y4(),{readonly:(0,De.validateOptional)(ji),typeAnnotation:(0,De.validateOptionalType)("TSTypeAnnotation"),kind:{optional:!0,validate:(0,De.assertOneOf)("get","set")}})});Bt("TSMethodSignature",{aliases:["TSTypeElement"],visitor:["key","typeParameters","parameters","typeAnnotation"],fields:Object.assign({},Bw(),Y4(),{kind:{validate:(0,De.assertOneOf)("method","get","set")}})});Bt("TSIndexSignature",{aliases:["TSTypeElement"],visitor:["parameters","typeAnnotation"],fields:{readonly:(0,De.validateOptional)(ji),static:(0,De.validateOptional)(ji),parameters:(0,De.validateArrayOfType)("Identifier"),typeAnnotation:(0,De.validateOptionalType)("TSTypeAnnotation")}});var ahe=["TSAnyKeyword","TSBooleanKeyword","TSBigIntKeyword","TSIntrinsicKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword"];for(let e of ahe)Bt(e,{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});Bt("TSThisType",{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});var J4={aliases:["TSType"],visitor:["typeParameters","parameters","typeAnnotation"]};Bt("TSFunctionType",Object.assign({},J4,{fields:Bw()}));Bt("TSConstructorType",Object.assign({},J4,{fields:Object.assign({},Bw(),{abstract:(0,De.validateOptional)(ji)})}));Bt("TSTypeReference",{aliases:["TSType"],visitor:["typeName","typeParameters"],fields:{typeName:(0,De.validateType)("TSEntityName"),typeParameters:(0,De.validateOptionalType)("TSTypeParameterInstantiation")}});Bt("TSTypePredicate",{aliases:["TSType"],visitor:["parameterName","typeAnnotation"],builder:["parameterName","typeAnnotation","asserts"],fields:{parameterName:(0,De.validateType)("Identifier","TSThisType"),typeAnnotation:(0,De.validateOptionalType)("TSTypeAnnotation"),asserts:(0,De.validateOptional)(ji)}});Bt("TSTypeQuery",{aliases:["TSType"],visitor:["exprName","typeParameters"],fields:{exprName:(0,De.validateType)("TSEntityName","TSImportType"),typeParameters:(0,De.validateOptionalType)("TSTypeParameterInstantiation")}});Bt("TSTypeLiteral",{aliases:["TSType"],visitor:["members"],fields:{members:(0,De.validateArrayOfType)("TSTypeElement")}});Bt("TSArrayType",{aliases:["TSType"],visitor:["elementType"],fields:{elementType:(0,De.validateType)("TSType")}});Bt("TSTupleType",{aliases:["TSType"],visitor:["elementTypes"],fields:{elementTypes:(0,De.validateArrayOfType)("TSType","TSNamedTupleMember")}});Bt("TSOptionalType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,De.validateType)("TSType")}});Bt("TSRestType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,De.validateType)("TSType")}});Bt("TSNamedTupleMember",{visitor:["label","elementType"],builder:["label","elementType","optional"],fields:{label:(0,De.validateType)("Identifier"),optional:{validate:ji,default:!1},elementType:(0,De.validateType)("TSType")}});var Q4={aliases:["TSType"],visitor:["types"],fields:{types:(0,De.validateArrayOfType)("TSType")}};Bt("TSUnionType",Q4);Bt("TSIntersectionType",Q4);Bt("TSConditionalType",{aliases:["TSType"],visitor:["checkType","extendsType","trueType","falseType"],fields:{checkType:(0,De.validateType)("TSType"),extendsType:(0,De.validateType)("TSType"),trueType:(0,De.validateType)("TSType"),falseType:(0,De.validateType)("TSType")}});Bt("TSInferType",{aliases:["TSType"],visitor:["typeParameter"],fields:{typeParameter:(0,De.validateType)("TSTypeParameter")}});Bt("TSParenthesizedType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,De.validateType)("TSType")}});Bt("TSTypeOperator",{aliases:["TSType"],visitor:["typeAnnotation"],builder:["typeAnnotation","operator"],fields:{operator:{validate:(0,De.assertValueType)("string"),default:"keyof"},typeAnnotation:(0,De.validateType)("TSType")}});Bt("TSIndexedAccessType",{aliases:["TSType"],visitor:["objectType","indexType"],fields:{objectType:(0,De.validateType)("TSType"),indexType:(0,De.validateType)("TSType")}});Bt("TSMappedType",{aliases:["TSType"],visitor:["typeParameter","nameType","typeAnnotation"],builder:["typeParameter","typeAnnotation","nameType"],fields:Object.assign({},{typeParameter:(0,De.validateType)("TSTypeParameter")},{readonly:(0,De.validateOptional)((0,De.assertOneOf)(!0,!1,"+","-")),optional:(0,De.validateOptional)((0,De.assertOneOf)(!0,!1,"+","-")),typeAnnotation:(0,De.validateOptionalType)("TSType"),nameType:(0,De.validateOptionalType)("TSType")})});Bt("TSTemplateLiteralType",{aliases:["TSType","TSBaseType"],visitor:["quasis","types"],fields:{quasis:(0,De.validateArrayOfType)("TemplateElement"),types:{validate:(0,De.chain)((0,De.assertValueType)("array"),(0,De.assertEach)((0,De.assertNodeType)("TSType")),function(e,t,r){if(e.quasis.length!==r.length+1)throw new TypeError(`Number of ${e.type} quasis should be exactly one more than the number of types.
|
|
Expected ${r.length+1} quasis but got ${e.quasis.length}`)})}}});Bt("TSLiteralType",{aliases:["TSType","TSBaseType"],visitor:["literal"],fields:{literal:{validate:function(){let e=(0,De.assertNodeType)("NumericLiteral","BigIntLiteral"),t=(0,De.assertOneOf)("-"),r=(0,De.assertNodeType)("NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral","TemplateLiteral"),a=function(s,i,o){(0,rhe.default)("UnaryExpression",o)?(t(o,"operator",o.operator),e(o,"argument",o.argument)):r(s,i,o)};return a.oneOfNodeTypes=["NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral","TemplateLiteral","UnaryExpression"],a}()}}});Bt("TSExpressionWithTypeArguments",{aliases:["TSType"],visitor:["expression","typeParameters"],fields:{expression:(0,De.validateType)("TSEntityName"),typeParameters:(0,De.validateOptionalType)("TSTypeParameterInstantiation")}});Bt("TSInterfaceDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","extends","body"],fields:{declare:(0,De.validateOptional)(ji),id:(0,De.validateType)("Identifier"),typeParameters:(0,De.validateOptionalType)("TSTypeParameterDeclaration"),extends:(0,De.validateOptional)((0,De.arrayOfType)("TSExpressionWithTypeArguments")),body:(0,De.validateType)("TSInterfaceBody")}});Bt("TSInterfaceBody",{visitor:["body"],fields:{body:(0,De.validateArrayOfType)("TSTypeElement")}});Bt("TSTypeAliasDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","typeAnnotation"],fields:{declare:(0,De.validateOptional)(ji),id:(0,De.validateType)("Identifier"),typeParameters:(0,De.validateOptionalType)("TSTypeParameterDeclaration"),typeAnnotation:(0,De.validateType)("TSType")}});Bt("TSInstantiationExpression",{aliases:["Expression"],visitor:["expression","typeParameters"],fields:{expression:(0,De.validateType)("Expression"),typeParameters:(0,De.validateOptionalType)("TSTypeParameterInstantiation")}});var Z4={aliases:["Expression","LVal","PatternLike"],visitor:["expression","typeAnnotation"],fields:{expression:(0,De.validateType)("Expression"),typeAnnotation:(0,De.validateType)("TSType")}};Bt("TSAsExpression",Z4);Bt("TSSatisfiesExpression",Z4);Bt("TSTypeAssertion",{aliases:["Expression","LVal","PatternLike"],visitor:["typeAnnotation","expression"],fields:{typeAnnotation:(0,De.validateType)("TSType"),expression:(0,De.validateType)("Expression")}});Bt("TSEnumBody",{visitor:["members"],fields:{members:(0,De.validateArrayOfType)("TSEnumMember")}});Bt("TSEnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","members"],fields:{declare:(0,De.validateOptional)(ji),const:(0,De.validateOptional)(ji),id:(0,De.validateType)("Identifier"),members:(0,De.validateArrayOfType)("TSEnumMember"),initializer:(0,De.validateOptionalType)("Expression"),body:(0,De.validateOptionalType)("TSEnumBody")}});Bt("TSEnumMember",{visitor:["id","initializer"],fields:{id:(0,De.validateType)("Identifier","StringLiteral"),initializer:(0,De.validateOptionalType)("Expression")}});Bt("TSModuleDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:Object.assign({kind:{validate:(0,De.assertOneOf)("global","module","namespace")},declare:(0,De.validateOptional)(ji)},{global:(0,De.validateOptional)(ji)},{id:(0,De.validateType)("Identifier","StringLiteral"),body:(0,De.validateType)("TSModuleBlock","TSModuleDeclaration")})});Bt("TSModuleBlock",{aliases:["Scopable","Block","BlockParent","FunctionParent"],visitor:["body"],fields:{body:(0,De.validateArrayOfType)("Statement")}});Bt("TSImportType",{aliases:["TSType"],builder:["argument","qualifier","typeParameters"],visitor:["argument","options","qualifier","typeParameters"],fields:{argument:(0,De.validateType)("StringLiteral"),qualifier:(0,De.validateOptionalType)("TSEntityName"),typeParameters:(0,De.validateOptionalType)("TSTypeParameterInstantiation"),options:{validate:(0,De.assertNodeType)("ObjectExpression"),optional:!0}}});Bt("TSImportEqualsDeclaration",{aliases:["Statement","Declaration"],visitor:["id","moduleReference"],fields:Object.assign({},{isExport:(0,De.validate)(ji)},{id:(0,De.validateType)("Identifier"),moduleReference:(0,De.validateType)("TSEntityName","TSExternalModuleReference"),importKind:{validate:(0,De.assertOneOf)("type","value"),optional:!0}})});Bt("TSExternalModuleReference",{visitor:["expression"],fields:{expression:(0,De.validateType)("StringLiteral")}});Bt("TSNonNullExpression",{aliases:["Expression","LVal","PatternLike"],visitor:["expression"],fields:{expression:(0,De.validateType)("Expression")}});Bt("TSExportAssignment",{aliases:["Statement"],visitor:["expression"],fields:{expression:(0,De.validateType)("Expression")}});Bt("TSNamespaceExportDeclaration",{aliases:["Statement"],visitor:["id"],fields:{id:(0,De.validateType)("Identifier")}});Bt("TSTypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:{validate:(0,De.assertNodeType)("TSType")}}});Bt("TSTypeParameterInstantiation",{visitor:["params"],fields:{params:(0,De.validateArrayOfType)("TSType")}});Bt("TSTypeParameterDeclaration",{visitor:["params"],fields:{params:(0,De.validateArrayOfType)("TSTypeParameter")}});Bt("TSTypeParameter",{builder:["constraint","default","name"],visitor:["constraint","default"],fields:{name:{validate:(0,De.assertValueType)("string")},in:{validate:(0,De.assertValueType)("boolean"),optional:!0},out:{validate:(0,De.assertValueType)("boolean"),optional:!0},const:{validate:(0,De.assertValueType)("boolean"),optional:!0},constraint:{validate:(0,De.assertNodeType)("TSType"),optional:!0},default:{validate:(0,De.assertNodeType)("TSType"),optional:!0}}})});var t8=ne(Uw=>{"use strict";Object.defineProperty(Uw,"__esModule",{value:!0});Uw.DEPRECATED_ALIASES=void 0;var dtt=Uw.DEPRECATED_ALIASES={ModuleDeclaration:"ImportOrExportDeclaration"}});var Jo=ne(Js=>{"use strict";Object.defineProperty(Js,"__esModule",{value:!0});Object.defineProperty(Js,"ALIAS_KEYS",{enumerable:!0,get:function(){return pi.ALIAS_KEYS}});Object.defineProperty(Js,"BUILDER_KEYS",{enumerable:!0,get:function(){return pi.BUILDER_KEYS}});Object.defineProperty(Js,"DEPRECATED_ALIASES",{enumerable:!0,get:function(){return fL.DEPRECATED_ALIASES}});Object.defineProperty(Js,"DEPRECATED_KEYS",{enumerable:!0,get:function(){return pi.DEPRECATED_KEYS}});Object.defineProperty(Js,"FLIPPED_ALIAS_KEYS",{enumerable:!0,get:function(){return pi.FLIPPED_ALIAS_KEYS}});Object.defineProperty(Js,"NODE_FIELDS",{enumerable:!0,get:function(){return pi.NODE_FIELDS}});Object.defineProperty(Js,"NODE_PARENT_VALIDATIONS",{enumerable:!0,get:function(){return pi.NODE_PARENT_VALIDATIONS}});Object.defineProperty(Js,"NODE_UNION_SHAPES__PRIVATE",{enumerable:!0,get:function(){return pi.NODE_UNION_SHAPES__PRIVATE}});Object.defineProperty(Js,"PLACEHOLDERS",{enumerable:!0,get:function(){return pL.PLACEHOLDERS}});Object.defineProperty(Js,"PLACEHOLDERS_ALIAS",{enumerable:!0,get:function(){return pL.PLACEHOLDERS_ALIAS}});Object.defineProperty(Js,"PLACEHOLDERS_FLIPPED_ALIAS",{enumerable:!0,get:function(){return pL.PLACEHOLDERS_FLIPPED_ALIAS}});Js.TYPES=void 0;Object.defineProperty(Js,"VISITOR_KEYS",{enumerable:!0,get:function(){return pi.VISITOR_KEYS}});S0();H4();$4();G4();K4();e8();var pi=Pc(),pL=cL(),fL=t8();Object.keys(fL.DEPRECATED_ALIASES).forEach(e=>{pi.FLIPPED_ALIAS_KEYS[e]=pi.FLIPPED_ALIAS_KEYS[fL.DEPRECATED_ALIASES[e]]});for(let{types:e,set:t}of pi.allExpandedTypes)for(let r of e){let a=pi.FLIPPED_ALIAS_KEYS[r];a?a.forEach(t.add,t):t.add(r)}var ptt=Js.TYPES=[].concat(Object.keys(pi.VISITOR_KEYS),Object.keys(pi.FLIPPED_ALIAS_KEYS),Object.keys(pi.DEPRECATED_KEYS))});var _w=ne(_g=>{"use strict";Object.defineProperty(_g,"__esModule",{value:!0});_g.default=nhe;_g.validateChild=a8;_g.validateField=r8;_g.validateInternal=she;var T0=Jo();function nhe(e,t,r){if(!e)return;let a=T0.NODE_FIELDS[e.type];if(!a)return;let n=a[t];r8(e,t,r,n),a8(e,t,r)}function she(e,t,r,a,n){if(e!=null&&e.validate&&!(e.optional&&a==null)&&(e.validate(t,r,a),n)){var s;let i=a.type;if(i==null)return;(s=T0.NODE_PARENT_VALIDATIONS[i])==null||s.call(T0.NODE_PARENT_VALIDATIONS,t,r,a)}}function r8(e,t,r,a){a!=null&&a.validate&&(a.optional&&r==null||a.validate(e,t,r))}function a8(e,t,r){var a;let n=r?.type;n!=null&&((a=T0.NODE_PARENT_VALIDATIONS[n])==null||a.call(T0.NODE_PARENT_VALIDATIONS,e,t,r))}});var mL=ne(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.anyTypeAnnotation=Uge;M.argumentPlaceholder=mxe;M.arrayExpression=che;M.arrayPattern=nge;M.arrayTypeAnnotation=jge;M.arrowFunctionExpression=sge;M.assignmentExpression=uhe;M.assignmentPattern=age;M.awaitExpression=Age;M.bigIntLiteral=lhe;M.binaryExpression=dhe;M.bindExpression=hxe;M.blockStatement=hhe;M.booleanLiteral=_he;M.booleanLiteralTypeAnnotation=Vge;M.booleanTypeAnnotation=zge;M.breakStatement=ghe;M.callExpression=yhe;M.catchClause=xhe;M.classAccessorProperty=Mge;M.classBody=ige;M.classDeclaration=lge;M.classExpression=oge;M.classImplements=Hge;M.classMethod=vge;M.classPrivateMethod=_ge;M.classPrivateProperty=Dge;M.classProperty=kge;M.conditionalExpression=bhe;M.continueStatement=vhe;M.debuggerStatement=She;M.decimalLiteral=Sxe;M.declareClass=$ge;M.declareExportAllDeclaration=eye;M.declareExportDeclaration=Zge;M.declareFunction=Gge;M.declareInterface=Kge;M.declareModule=Wge;M.declareModuleExports=Xge;M.declareOpaqueType=Jge;M.declareTypeAlias=Yge;M.declareVariable=Qge;M.declaredPredicate=tye;M.decorator=gxe;M.directive=phe;M.directiveLiteral=mhe;M.doExpression=yxe;M.doWhileStatement=The;M.emptyStatement=whe;M.emptyTypeAnnotation=fye;M.enumBooleanBody=jye;M.enumBooleanMember=Hye;M.enumDeclaration=Uye;M.enumDefaultedMember=Kye;M.enumNumberBody=zye;M.enumNumberMember=$ye;M.enumStringBody=Vye;M.enumStringMember=Gye;M.enumSymbolBody=qye;M.existsTypeAnnotation=rye;M.exportAllDeclaration=cge;M.exportDefaultDeclaration=uge;M.exportDefaultSpecifier=xxe;M.exportNamedDeclaration=dge;M.exportNamespaceSpecifier=Nge;M.exportSpecifier=fge;M.expressionStatement=Che;M.file=Ehe;M.forInStatement=Phe;M.forOfStatement=pge;M.forStatement=Ahe;M.functionDeclaration=Ihe;M.functionExpression=Nhe;M.functionTypeAnnotation=aye;M.functionTypeParam=nye;M.genericTypeAnnotation=sye;M.identifier=Lhe;M.ifStatement=Rhe;M.import=Ige;M.importAttribute=Bge;M.importDeclaration=mge;M.importDefaultSpecifier=hge;M.importExpression=xge;M.importNamespaceSpecifier=gge;M.importSpecifier=yge;M.indexedAccessType=Wye;M.inferredPredicate=iye;M.interfaceDeclaration=lye;M.interfaceExtends=oye;M.interfaceTypeAnnotation=cye;M.interpreterDirective=fhe;M.intersectionTypeAnnotation=uye;M.jSXAttribute=M.jsxAttribute=Yye;M.jSXClosingElement=M.jsxClosingElement=Jye;M.jSXClosingFragment=M.jsxClosingFragment=uxe;M.jSXElement=M.jsxElement=Qye;M.jSXEmptyExpression=M.jsxEmptyExpression=Zye;M.jSXExpressionContainer=M.jsxExpressionContainer=exe;M.jSXFragment=M.jsxFragment=lxe;M.jSXIdentifier=M.jsxIdentifier=rxe;M.jSXMemberExpression=M.jsxMemberExpression=axe;M.jSXNamespacedName=M.jsxNamespacedName=nxe;M.jSXOpeningElement=M.jsxOpeningElement=sxe;M.jSXOpeningFragment=M.jsxOpeningFragment=cxe;M.jSXSpreadAttribute=M.jsxSpreadAttribute=ixe;M.jSXSpreadChild=M.jsxSpreadChild=txe;M.jSXText=M.jsxText=oxe;M.labeledStatement=khe;M.logicalExpression=Ohe;M.memberExpression=Fhe;M.metaProperty=bge;M.mixedTypeAnnotation=dye;M.moduleExpression=Txe;M.newExpression=Bhe;M.noop=dxe;M.nullLiteral=Dhe;M.nullLiteralTypeAnnotation=qge;M.nullableTypeAnnotation=pye;M.numberLiteral=zbe;M.numberLiteralTypeAnnotation=mye;M.numberTypeAnnotation=hye;M.numericLiteral=n8;M.objectExpression=jhe;M.objectMethod=zhe;M.objectPattern=Sge;M.objectProperty=Vhe;M.objectTypeAnnotation=gye;M.objectTypeCallProperty=xye;M.objectTypeIndexer=bye;M.objectTypeInternalSlot=yye;M.objectTypeProperty=vye;M.objectTypeSpreadProperty=Sye;M.opaqueType=Tye;M.optionalCallExpression=Rge;M.optionalIndexedAccessType=Xye;M.optionalMemberExpression=Lge;M.parenthesizedExpression=$he;M.pipelineBareFunction=Exe;M.pipelinePrimaryTopicReference=Pxe;M.pipelineTopicExpression=Cxe;M.placeholder=fxe;M.privateName=Oge;M.program=Uhe;M.qualifiedTypeIdentifier=wye;M.recordExpression=bxe;M.regExpLiteral=s8;M.regexLiteral=Vbe;M.restElement=i8;M.restProperty=qbe;M.returnStatement=qhe;M.sequenceExpression=Hhe;M.spreadElement=o8;M.spreadProperty=Hbe;M.staticBlock=Fge;M.stringLiteral=Mhe;M.stringLiteralTypeAnnotation=Cye;M.stringTypeAnnotation=Eye;M.super=Tge;M.switchCase=Ghe;M.switchStatement=Khe;M.symbolTypeAnnotation=Pye;M.taggedTemplateExpression=wge;M.templateElement=Cge;M.templateLiteral=Ege;M.thisExpression=Whe;M.thisTypeAnnotation=Aye;M.throwStatement=Xhe;M.topicReference=wxe;M.tryStatement=Yhe;M.tSAnyKeyword=M.tsAnyKeyword=Fxe;M.tSArrayType=M.tsArrayType=abe;M.tSAsExpression=M.tsAsExpression=wbe;M.tSBigIntKeyword=M.tsBigIntKeyword=Uxe;M.tSBooleanKeyword=M.tsBooleanKeyword=Bxe;M.tSCallSignatureDeclaration=M.tsCallSignatureDeclaration=kxe;M.tSConditionalType=M.tsConditionalType=ube;M.tSConstructSignatureDeclaration=M.tsConstructSignatureDeclaration=Mxe;M.tSConstructorType=M.tsConstructorType=Qxe;M.tSDeclareFunction=M.tsDeclareFunction=Nxe;M.tSDeclareMethod=M.tsDeclareMethod=Lxe;M.tSEnumBody=M.tsEnumBody=Pbe;M.tSEnumDeclaration=M.tsEnumDeclaration=Abe;M.tSEnumMember=M.tsEnumMember=Ibe;M.tSExportAssignment=M.tsExportAssignment=_be;M.tSExpressionWithTypeArguments=M.tsExpressionWithTypeArguments=xbe;M.tSExternalModuleReference=M.tsExternalModuleReference=Mbe;M.tSFunctionType=M.tsFunctionType=Jxe;M.tSImportEqualsDeclaration=M.tsImportEqualsDeclaration=kbe;M.tSImportType=M.tsImportType=Rbe;M.tSIndexSignature=M.tsIndexSignature=Oxe;M.tSIndexedAccessType=M.tsIndexedAccessType=mbe;M.tSInferType=M.tsInferType=dbe;M.tSInstantiationExpression=M.tsInstantiationExpression=Tbe;M.tSInterfaceBody=M.tsInterfaceBody=vbe;M.tSInterfaceDeclaration=M.tsInterfaceDeclaration=bbe;M.tSIntersectionType=M.tsIntersectionType=cbe;M.tSIntrinsicKeyword=M.tsIntrinsicKeyword=jxe;M.tSLiteralType=M.tsLiteralType=ybe;M.tSMappedType=M.tsMappedType=hbe;M.tSMethodSignature=M.tsMethodSignature=_xe;M.tSModuleBlock=M.tsModuleBlock=Lbe;M.tSModuleDeclaration=M.tsModuleDeclaration=Nbe;M.tSNamedTupleMember=M.tsNamedTupleMember=obe;M.tSNamespaceExportDeclaration=M.tsNamespaceExportDeclaration=Obe;M.tSNeverKeyword=M.tsNeverKeyword=zxe;M.tSNonNullExpression=M.tsNonNullExpression=Dbe;M.tSNullKeyword=M.tsNullKeyword=Vxe;M.tSNumberKeyword=M.tsNumberKeyword=qxe;M.tSObjectKeyword=M.tsObjectKeyword=Hxe;M.tSOptionalType=M.tsOptionalType=sbe;M.tSParameterProperty=M.tsParameterProperty=Ixe;M.tSParenthesizedType=M.tsParenthesizedType=fbe;M.tSPropertySignature=M.tsPropertySignature=Dxe;M.tSQualifiedName=M.tsQualifiedName=Rxe;M.tSRestType=M.tsRestType=ibe;M.tSSatisfiesExpression=M.tsSatisfiesExpression=Cbe;M.tSStringKeyword=M.tsStringKeyword=$xe;M.tSSymbolKeyword=M.tsSymbolKeyword=Gxe;M.tSTemplateLiteralType=M.tsTemplateLiteralType=gbe;M.tSThisType=M.tsThisType=Yxe;M.tSTupleType=M.tsTupleType=nbe;M.tSTypeAliasDeclaration=M.tsTypeAliasDeclaration=Sbe;M.tSTypeAnnotation=M.tsTypeAnnotation=Fbe;M.tSTypeAssertion=M.tsTypeAssertion=Ebe;M.tSTypeLiteral=M.tsTypeLiteral=rbe;M.tSTypeOperator=M.tsTypeOperator=pbe;M.tSTypeParameter=M.tsTypeParameter=jbe;M.tSTypeParameterDeclaration=M.tsTypeParameterDeclaration=Ube;M.tSTypeParameterInstantiation=M.tsTypeParameterInstantiation=Bbe;M.tSTypePredicate=M.tsTypePredicate=ebe;M.tSTypeQuery=M.tsTypeQuery=tbe;M.tSTypeReference=M.tsTypeReference=Zxe;M.tSUndefinedKeyword=M.tsUndefinedKeyword=Kxe;M.tSUnionType=M.tsUnionType=lbe;M.tSUnknownKeyword=M.tsUnknownKeyword=Wxe;M.tSVoidKeyword=M.tsVoidKeyword=Xxe;M.tupleExpression=vxe;M.tupleTypeAnnotation=Iye;M.typeAlias=Lye;M.typeAnnotation=Rye;M.typeCastExpression=kye;M.typeParameter=Mye;M.typeParameterDeclaration=Dye;M.typeParameterInstantiation=_ye;M.typeofTypeAnnotation=Nye;M.unaryExpression=Jhe;M.unionTypeAnnotation=Oye;M.updateExpression=Qhe;M.v8IntrinsicIdentifier=pxe;M.variableDeclaration=Zhe;M.variableDeclarator=ege;M.variance=Fye;M.voidPattern=Axe;M.voidTypeAnnotation=Bye;M.whileStatement=tge;M.withStatement=rge;M.yieldExpression=Pge;var ihe=_w(),jw=Ig(),ohe=Pc(),{validateInternal:E}=ihe,{NODE_FIELDS:te}=ohe;function lhe(e){typeof e=="bigint"&&(e=e.toString());let t={type:"BigIntLiteral",value:e},r=te.BigIntLiteral;return E(r.value,t,"value",e),t}function che(e=[]){let t={type:"ArrayExpression",elements:e},r=te.ArrayExpression;return E(r.elements,t,"elements",e,1),t}function uhe(e,t,r){let a={type:"AssignmentExpression",operator:e,left:t,right:r},n=te.AssignmentExpression;return E(n.operator,a,"operator",e),E(n.left,a,"left",t,1),E(n.right,a,"right",r,1),a}function dhe(e,t,r){let a={type:"BinaryExpression",operator:e,left:t,right:r},n=te.BinaryExpression;return E(n.operator,a,"operator",e),E(n.left,a,"left",t,1),E(n.right,a,"right",r,1),a}function fhe(e){let t={type:"InterpreterDirective",value:e},r=te.InterpreterDirective;return E(r.value,t,"value",e),t}function phe(e){let t={type:"Directive",value:e},r=te.Directive;return E(r.value,t,"value",e,1),t}function mhe(e){let t={type:"DirectiveLiteral",value:e},r=te.DirectiveLiteral;return E(r.value,t,"value",e),t}function hhe(e,t=[]){let r={type:"BlockStatement",body:e,directives:t},a=te.BlockStatement;return E(a.body,r,"body",e,1),E(a.directives,r,"directives",t,1),r}function ghe(e=null){let t={type:"BreakStatement",label:e},r=te.BreakStatement;return E(r.label,t,"label",e,1),t}function yhe(e,t){let r={type:"CallExpression",callee:e,arguments:t},a=te.CallExpression;return E(a.callee,r,"callee",e,1),E(a.arguments,r,"arguments",t,1),r}function xhe(e=null,t){let r={type:"CatchClause",param:e,body:t},a=te.CatchClause;return E(a.param,r,"param",e,1),E(a.body,r,"body",t,1),r}function bhe(e,t,r){let a={type:"ConditionalExpression",test:e,consequent:t,alternate:r},n=te.ConditionalExpression;return E(n.test,a,"test",e,1),E(n.consequent,a,"consequent",t,1),E(n.alternate,a,"alternate",r,1),a}function vhe(e=null){let t={type:"ContinueStatement",label:e},r=te.ContinueStatement;return E(r.label,t,"label",e,1),t}function She(){return{type:"DebuggerStatement"}}function The(e,t){let r={type:"DoWhileStatement",test:e,body:t},a=te.DoWhileStatement;return E(a.test,r,"test",e,1),E(a.body,r,"body",t,1),r}function whe(){return{type:"EmptyStatement"}}function Che(e){let t={type:"ExpressionStatement",expression:e},r=te.ExpressionStatement;return E(r.expression,t,"expression",e,1),t}function Ehe(e,t=null,r=null){let a={type:"File",program:e,comments:t,tokens:r},n=te.File;return E(n.program,a,"program",e,1),E(n.comments,a,"comments",t,1),E(n.tokens,a,"tokens",r),a}function Phe(e,t,r){let a={type:"ForInStatement",left:e,right:t,body:r},n=te.ForInStatement;return E(n.left,a,"left",e,1),E(n.right,a,"right",t,1),E(n.body,a,"body",r,1),a}function Ahe(e=null,t=null,r=null,a){let n={type:"ForStatement",init:e,test:t,update:r,body:a},s=te.ForStatement;return E(s.init,n,"init",e,1),E(s.test,n,"test",t,1),E(s.update,n,"update",r,1),E(s.body,n,"body",a,1),n}function Ihe(e=null,t,r,a=!1,n=!1){let s={type:"FunctionDeclaration",id:e,params:t,body:r,generator:a,async:n},i=te.FunctionDeclaration;return E(i.id,s,"id",e,1),E(i.params,s,"params",t,1),E(i.body,s,"body",r,1),E(i.generator,s,"generator",a),E(i.async,s,"async",n),s}function Nhe(e=null,t,r,a=!1,n=!1){let s={type:"FunctionExpression",id:e,params:t,body:r,generator:a,async:n},i=te.FunctionExpression;return E(i.id,s,"id",e,1),E(i.params,s,"params",t,1),E(i.body,s,"body",r,1),E(i.generator,s,"generator",a),E(i.async,s,"async",n),s}function Lhe(e){let t={type:"Identifier",name:e},r=te.Identifier;return E(r.name,t,"name",e),t}function Rhe(e,t,r=null){let a={type:"IfStatement",test:e,consequent:t,alternate:r},n=te.IfStatement;return E(n.test,a,"test",e,1),E(n.consequent,a,"consequent",t,1),E(n.alternate,a,"alternate",r,1),a}function khe(e,t){let r={type:"LabeledStatement",label:e,body:t},a=te.LabeledStatement;return E(a.label,r,"label",e,1),E(a.body,r,"body",t,1),r}function Mhe(e){let t={type:"StringLiteral",value:e},r=te.StringLiteral;return E(r.value,t,"value",e),t}function n8(e){let t={type:"NumericLiteral",value:e},r=te.NumericLiteral;return E(r.value,t,"value",e),t}function Dhe(){return{type:"NullLiteral"}}function _he(e){let t={type:"BooleanLiteral",value:e},r=te.BooleanLiteral;return E(r.value,t,"value",e),t}function s8(e,t=""){let r={type:"RegExpLiteral",pattern:e,flags:t},a=te.RegExpLiteral;return E(a.pattern,r,"pattern",e),E(a.flags,r,"flags",t),r}function Ohe(e,t,r){let a={type:"LogicalExpression",operator:e,left:t,right:r},n=te.LogicalExpression;return E(n.operator,a,"operator",e),E(n.left,a,"left",t,1),E(n.right,a,"right",r,1),a}function Fhe(e,t,r=!1,a=null){let n={type:"MemberExpression",object:e,property:t,computed:r,optional:a},s=te.MemberExpression;return E(s.object,n,"object",e,1),E(s.property,n,"property",t,1),E(s.computed,n,"computed",r),E(s.optional,n,"optional",a),n}function Bhe(e,t){let r={type:"NewExpression",callee:e,arguments:t},a=te.NewExpression;return E(a.callee,r,"callee",e,1),E(a.arguments,r,"arguments",t,1),r}function Uhe(e,t=[],r="script",a=null){let n={type:"Program",body:e,directives:t,sourceType:r,interpreter:a},s=te.Program;return E(s.body,n,"body",e,1),E(s.directives,n,"directives",t,1),E(s.sourceType,n,"sourceType",r),E(s.interpreter,n,"interpreter",a,1),n}function jhe(e){let t={type:"ObjectExpression",properties:e},r=te.ObjectExpression;return E(r.properties,t,"properties",e,1),t}function zhe(e="method",t,r,a,n=!1,s=!1,i=!1){let o={type:"ObjectMethod",kind:e,key:t,params:r,body:a,computed:n,generator:s,async:i},l=te.ObjectMethod;return E(l.kind,o,"kind",e),E(l.key,o,"key",t,1),E(l.params,o,"params",r,1),E(l.body,o,"body",a,1),E(l.computed,o,"computed",n),E(l.generator,o,"generator",s),E(l.async,o,"async",i),o}function Vhe(e,t,r=!1,a=!1,n=null){let s={type:"ObjectProperty",key:e,value:t,computed:r,shorthand:a,decorators:n},i=te.ObjectProperty;return E(i.key,s,"key",e,1),E(i.value,s,"value",t,1),E(i.computed,s,"computed",r),E(i.shorthand,s,"shorthand",a),E(i.decorators,s,"decorators",n,1),s}function i8(e){let t={type:"RestElement",argument:e},r=te.RestElement;return E(r.argument,t,"argument",e,1),t}function qhe(e=null){let t={type:"ReturnStatement",argument:e},r=te.ReturnStatement;return E(r.argument,t,"argument",e,1),t}function Hhe(e){let t={type:"SequenceExpression",expressions:e},r=te.SequenceExpression;return E(r.expressions,t,"expressions",e,1),t}function $he(e){let t={type:"ParenthesizedExpression",expression:e},r=te.ParenthesizedExpression;return E(r.expression,t,"expression",e,1),t}function Ghe(e=null,t){let r={type:"SwitchCase",test:e,consequent:t},a=te.SwitchCase;return E(a.test,r,"test",e,1),E(a.consequent,r,"consequent",t,1),r}function Khe(e,t){let r={type:"SwitchStatement",discriminant:e,cases:t},a=te.SwitchStatement;return E(a.discriminant,r,"discriminant",e,1),E(a.cases,r,"cases",t,1),r}function Whe(){return{type:"ThisExpression"}}function Xhe(e){let t={type:"ThrowStatement",argument:e},r=te.ThrowStatement;return E(r.argument,t,"argument",e,1),t}function Yhe(e,t=null,r=null){let a={type:"TryStatement",block:e,handler:t,finalizer:r},n=te.TryStatement;return E(n.block,a,"block",e,1),E(n.handler,a,"handler",t,1),E(n.finalizer,a,"finalizer",r,1),a}function Jhe(e,t,r=!0){let a={type:"UnaryExpression",operator:e,argument:t,prefix:r},n=te.UnaryExpression;return E(n.operator,a,"operator",e),E(n.argument,a,"argument",t,1),E(n.prefix,a,"prefix",r),a}function Qhe(e,t,r=!1){let a={type:"UpdateExpression",operator:e,argument:t,prefix:r},n=te.UpdateExpression;return E(n.operator,a,"operator",e),E(n.argument,a,"argument",t,1),E(n.prefix,a,"prefix",r),a}function Zhe(e,t){let r={type:"VariableDeclaration",kind:e,declarations:t},a=te.VariableDeclaration;return E(a.kind,r,"kind",e),E(a.declarations,r,"declarations",t,1),r}function ege(e,t=null){let r={type:"VariableDeclarator",id:e,init:t},a=te.VariableDeclarator;return E(a.id,r,"id",e,1),E(a.init,r,"init",t,1),r}function tge(e,t){let r={type:"WhileStatement",test:e,body:t},a=te.WhileStatement;return E(a.test,r,"test",e,1),E(a.body,r,"body",t,1),r}function rge(e,t){let r={type:"WithStatement",object:e,body:t},a=te.WithStatement;return E(a.object,r,"object",e,1),E(a.body,r,"body",t,1),r}function age(e,t){let r={type:"AssignmentPattern",left:e,right:t},a=te.AssignmentPattern;return E(a.left,r,"left",e,1),E(a.right,r,"right",t,1),r}function nge(e){let t={type:"ArrayPattern",elements:e},r=te.ArrayPattern;return E(r.elements,t,"elements",e,1),t}function sge(e,t,r=!1){let a={type:"ArrowFunctionExpression",params:e,body:t,async:r,expression:null},n=te.ArrowFunctionExpression;return E(n.params,a,"params",e,1),E(n.body,a,"body",t,1),E(n.async,a,"async",r),a}function ige(e){let t={type:"ClassBody",body:e},r=te.ClassBody;return E(r.body,t,"body",e,1),t}function oge(e=null,t=null,r,a=null){let n={type:"ClassExpression",id:e,superClass:t,body:r,decorators:a},s=te.ClassExpression;return E(s.id,n,"id",e,1),E(s.superClass,n,"superClass",t,1),E(s.body,n,"body",r,1),E(s.decorators,n,"decorators",a,1),n}function lge(e=null,t=null,r,a=null){let n={type:"ClassDeclaration",id:e,superClass:t,body:r,decorators:a},s=te.ClassDeclaration;return E(s.id,n,"id",e,1),E(s.superClass,n,"superClass",t,1),E(s.body,n,"body",r,1),E(s.decorators,n,"decorators",a,1),n}function cge(e){let t={type:"ExportAllDeclaration",source:e},r=te.ExportAllDeclaration;return E(r.source,t,"source",e,1),t}function uge(e){let t={type:"ExportDefaultDeclaration",declaration:e},r=te.ExportDefaultDeclaration;return E(r.declaration,t,"declaration",e,1),t}function dge(e=null,t=[],r=null){let a={type:"ExportNamedDeclaration",declaration:e,specifiers:t,source:r},n=te.ExportNamedDeclaration;return E(n.declaration,a,"declaration",e,1),E(n.specifiers,a,"specifiers",t,1),E(n.source,a,"source",r,1),a}function fge(e,t){let r={type:"ExportSpecifier",local:e,exported:t},a=te.ExportSpecifier;return E(a.local,r,"local",e,1),E(a.exported,r,"exported",t,1),r}function pge(e,t,r,a=!1){let n={type:"ForOfStatement",left:e,right:t,body:r,await:a},s=te.ForOfStatement;return E(s.left,n,"left",e,1),E(s.right,n,"right",t,1),E(s.body,n,"body",r,1),E(s.await,n,"await",a),n}function mge(e,t){let r={type:"ImportDeclaration",specifiers:e,source:t},a=te.ImportDeclaration;return E(a.specifiers,r,"specifiers",e,1),E(a.source,r,"source",t,1),r}function hge(e){let t={type:"ImportDefaultSpecifier",local:e},r=te.ImportDefaultSpecifier;return E(r.local,t,"local",e,1),t}function gge(e){let t={type:"ImportNamespaceSpecifier",local:e},r=te.ImportNamespaceSpecifier;return E(r.local,t,"local",e,1),t}function yge(e,t){let r={type:"ImportSpecifier",local:e,imported:t},a=te.ImportSpecifier;return E(a.local,r,"local",e,1),E(a.imported,r,"imported",t,1),r}function xge(e,t=null){let r={type:"ImportExpression",source:e,options:t},a=te.ImportExpression;return E(a.source,r,"source",e,1),E(a.options,r,"options",t,1),r}function bge(e,t){let r={type:"MetaProperty",meta:e,property:t},a=te.MetaProperty;return E(a.meta,r,"meta",e,1),E(a.property,r,"property",t,1),r}function vge(e="method",t,r,a,n=!1,s=!1,i=!1,o=!1){let l={type:"ClassMethod",kind:e,key:t,params:r,body:a,computed:n,static:s,generator:i,async:o},c=te.ClassMethod;return E(c.kind,l,"kind",e),E(c.key,l,"key",t,1),E(c.params,l,"params",r,1),E(c.body,l,"body",a,1),E(c.computed,l,"computed",n),E(c.static,l,"static",s),E(c.generator,l,"generator",i),E(c.async,l,"async",o),l}function Sge(e){let t={type:"ObjectPattern",properties:e},r=te.ObjectPattern;return E(r.properties,t,"properties",e,1),t}function o8(e){let t={type:"SpreadElement",argument:e},r=te.SpreadElement;return E(r.argument,t,"argument",e,1),t}function Tge(){return{type:"Super"}}function wge(e,t){let r={type:"TaggedTemplateExpression",tag:e,quasi:t},a=te.TaggedTemplateExpression;return E(a.tag,r,"tag",e,1),E(a.quasi,r,"quasi",t,1),r}function Cge(e,t=!1){let r={type:"TemplateElement",value:e,tail:t},a=te.TemplateElement;return E(a.value,r,"value",e),E(a.tail,r,"tail",t),r}function Ege(e,t){let r={type:"TemplateLiteral",quasis:e,expressions:t},a=te.TemplateLiteral;return E(a.quasis,r,"quasis",e,1),E(a.expressions,r,"expressions",t,1),r}function Pge(e=null,t=!1){let r={type:"YieldExpression",argument:e,delegate:t},a=te.YieldExpression;return E(a.argument,r,"argument",e,1),E(a.delegate,r,"delegate",t),r}function Age(e){let t={type:"AwaitExpression",argument:e},r=te.AwaitExpression;return E(r.argument,t,"argument",e,1),t}function Ige(){return{type:"Import"}}function Nge(e){let t={type:"ExportNamespaceSpecifier",exported:e},r=te.ExportNamespaceSpecifier;return E(r.exported,t,"exported",e,1),t}function Lge(e,t,r=!1,a){let n={type:"OptionalMemberExpression",object:e,property:t,computed:r,optional:a},s=te.OptionalMemberExpression;return E(s.object,n,"object",e,1),E(s.property,n,"property",t,1),E(s.computed,n,"computed",r),E(s.optional,n,"optional",a),n}function Rge(e,t,r){let a={type:"OptionalCallExpression",callee:e,arguments:t,optional:r},n=te.OptionalCallExpression;return E(n.callee,a,"callee",e,1),E(n.arguments,a,"arguments",t,1),E(n.optional,a,"optional",r),a}function kge(e,t=null,r=null,a=null,n=!1,s=!1){let i={type:"ClassProperty",key:e,value:t,typeAnnotation:r,decorators:a,computed:n,static:s},o=te.ClassProperty;return E(o.key,i,"key",e,1),E(o.value,i,"value",t,1),E(o.typeAnnotation,i,"typeAnnotation",r,1),E(o.decorators,i,"decorators",a,1),E(o.computed,i,"computed",n),E(o.static,i,"static",s),i}function Mge(e,t=null,r=null,a=null,n=!1,s=!1){let i={type:"ClassAccessorProperty",key:e,value:t,typeAnnotation:r,decorators:a,computed:n,static:s},o=te.ClassAccessorProperty;return E(o.key,i,"key",e,1),E(o.value,i,"value",t,1),E(o.typeAnnotation,i,"typeAnnotation",r,1),E(o.decorators,i,"decorators",a,1),E(o.computed,i,"computed",n),E(o.static,i,"static",s),i}function Dge(e,t=null,r=null,a=!1){let n={type:"ClassPrivateProperty",key:e,value:t,decorators:r,static:a},s=te.ClassPrivateProperty;return E(s.key,n,"key",e,1),E(s.value,n,"value",t,1),E(s.decorators,n,"decorators",r,1),E(s.static,n,"static",a),n}function _ge(e="method",t,r,a,n=!1){let s={type:"ClassPrivateMethod",kind:e,key:t,params:r,body:a,static:n},i=te.ClassPrivateMethod;return E(i.kind,s,"kind",e),E(i.key,s,"key",t,1),E(i.params,s,"params",r,1),E(i.body,s,"body",a,1),E(i.static,s,"static",n),s}function Oge(e){let t={type:"PrivateName",id:e},r=te.PrivateName;return E(r.id,t,"id",e,1),t}function Fge(e){let t={type:"StaticBlock",body:e},r=te.StaticBlock;return E(r.body,t,"body",e,1),t}function Bge(e,t){let r={type:"ImportAttribute",key:e,value:t},a=te.ImportAttribute;return E(a.key,r,"key",e,1),E(a.value,r,"value",t,1),r}function Uge(){return{type:"AnyTypeAnnotation"}}function jge(e){let t={type:"ArrayTypeAnnotation",elementType:e},r=te.ArrayTypeAnnotation;return E(r.elementType,t,"elementType",e,1),t}function zge(){return{type:"BooleanTypeAnnotation"}}function Vge(e){let t={type:"BooleanLiteralTypeAnnotation",value:e},r=te.BooleanLiteralTypeAnnotation;return E(r.value,t,"value",e),t}function qge(){return{type:"NullLiteralTypeAnnotation"}}function Hge(e,t=null){let r={type:"ClassImplements",id:e,typeParameters:t},a=te.ClassImplements;return E(a.id,r,"id",e,1),E(a.typeParameters,r,"typeParameters",t,1),r}function $ge(e,t=null,r=null,a){let n={type:"DeclareClass",id:e,typeParameters:t,extends:r,body:a},s=te.DeclareClass;return E(s.id,n,"id",e,1),E(s.typeParameters,n,"typeParameters",t,1),E(s.extends,n,"extends",r,1),E(s.body,n,"body",a,1),n}function Gge(e){let t={type:"DeclareFunction",id:e},r=te.DeclareFunction;return E(r.id,t,"id",e,1),t}function Kge(e,t=null,r=null,a){let n={type:"DeclareInterface",id:e,typeParameters:t,extends:r,body:a},s=te.DeclareInterface;return E(s.id,n,"id",e,1),E(s.typeParameters,n,"typeParameters",t,1),E(s.extends,n,"extends",r,1),E(s.body,n,"body",a,1),n}function Wge(e,t,r=null){let a={type:"DeclareModule",id:e,body:t,kind:r},n=te.DeclareModule;return E(n.id,a,"id",e,1),E(n.body,a,"body",t,1),E(n.kind,a,"kind",r),a}function Xge(e){let t={type:"DeclareModuleExports",typeAnnotation:e},r=te.DeclareModuleExports;return E(r.typeAnnotation,t,"typeAnnotation",e,1),t}function Yge(e,t=null,r){let a={type:"DeclareTypeAlias",id:e,typeParameters:t,right:r},n=te.DeclareTypeAlias;return E(n.id,a,"id",e,1),E(n.typeParameters,a,"typeParameters",t,1),E(n.right,a,"right",r,1),a}function Jge(e,t=null,r=null){let a={type:"DeclareOpaqueType",id:e,typeParameters:t,supertype:r},n=te.DeclareOpaqueType;return E(n.id,a,"id",e,1),E(n.typeParameters,a,"typeParameters",t,1),E(n.supertype,a,"supertype",r,1),a}function Qge(e){let t={type:"DeclareVariable",id:e},r=te.DeclareVariable;return E(r.id,t,"id",e,1),t}function Zge(e=null,t=null,r=null,a=null){let n={type:"DeclareExportDeclaration",declaration:e,specifiers:t,source:r,attributes:a},s=te.DeclareExportDeclaration;return E(s.declaration,n,"declaration",e,1),E(s.specifiers,n,"specifiers",t,1),E(s.source,n,"source",r,1),E(s.attributes,n,"attributes",a,1),n}function eye(e,t=null){let r={type:"DeclareExportAllDeclaration",source:e,attributes:t},a=te.DeclareExportAllDeclaration;return E(a.source,r,"source",e,1),E(a.attributes,r,"attributes",t,1),r}function tye(e){let t={type:"DeclaredPredicate",value:e},r=te.DeclaredPredicate;return E(r.value,t,"value",e,1),t}function rye(){return{type:"ExistsTypeAnnotation"}}function aye(e=null,t,r=null,a){let n={type:"FunctionTypeAnnotation",typeParameters:e,params:t,rest:r,returnType:a},s=te.FunctionTypeAnnotation;return E(s.typeParameters,n,"typeParameters",e,1),E(s.params,n,"params",t,1),E(s.rest,n,"rest",r,1),E(s.returnType,n,"returnType",a,1),n}function nye(e=null,t){let r={type:"FunctionTypeParam",name:e,typeAnnotation:t},a=te.FunctionTypeParam;return E(a.name,r,"name",e,1),E(a.typeAnnotation,r,"typeAnnotation",t,1),r}function sye(e,t=null){let r={type:"GenericTypeAnnotation",id:e,typeParameters:t},a=te.GenericTypeAnnotation;return E(a.id,r,"id",e,1),E(a.typeParameters,r,"typeParameters",t,1),r}function iye(){return{type:"InferredPredicate"}}function oye(e,t=null){let r={type:"InterfaceExtends",id:e,typeParameters:t},a=te.InterfaceExtends;return E(a.id,r,"id",e,1),E(a.typeParameters,r,"typeParameters",t,1),r}function lye(e,t=null,r=null,a){let n={type:"InterfaceDeclaration",id:e,typeParameters:t,extends:r,body:a},s=te.InterfaceDeclaration;return E(s.id,n,"id",e,1),E(s.typeParameters,n,"typeParameters",t,1),E(s.extends,n,"extends",r,1),E(s.body,n,"body",a,1),n}function cye(e=null,t){let r={type:"InterfaceTypeAnnotation",extends:e,body:t},a=te.InterfaceTypeAnnotation;return E(a.extends,r,"extends",e,1),E(a.body,r,"body",t,1),r}function uye(e){let t={type:"IntersectionTypeAnnotation",types:e},r=te.IntersectionTypeAnnotation;return E(r.types,t,"types",e,1),t}function dye(){return{type:"MixedTypeAnnotation"}}function fye(){return{type:"EmptyTypeAnnotation"}}function pye(e){let t={type:"NullableTypeAnnotation",typeAnnotation:e},r=te.NullableTypeAnnotation;return E(r.typeAnnotation,t,"typeAnnotation",e,1),t}function mye(e){let t={type:"NumberLiteralTypeAnnotation",value:e},r=te.NumberLiteralTypeAnnotation;return E(r.value,t,"value",e),t}function hye(){return{type:"NumberTypeAnnotation"}}function gye(e,t=[],r=[],a=[],n=!1){let s={type:"ObjectTypeAnnotation",properties:e,indexers:t,callProperties:r,internalSlots:a,exact:n},i=te.ObjectTypeAnnotation;return E(i.properties,s,"properties",e,1),E(i.indexers,s,"indexers",t,1),E(i.callProperties,s,"callProperties",r,1),E(i.internalSlots,s,"internalSlots",a,1),E(i.exact,s,"exact",n),s}function yye(e,t,r,a,n){let s={type:"ObjectTypeInternalSlot",id:e,value:t,optional:r,static:a,method:n},i=te.ObjectTypeInternalSlot;return E(i.id,s,"id",e,1),E(i.value,s,"value",t,1),E(i.optional,s,"optional",r),E(i.static,s,"static",a),E(i.method,s,"method",n),s}function xye(e){let t={type:"ObjectTypeCallProperty",value:e,static:null},r=te.ObjectTypeCallProperty;return E(r.value,t,"value",e,1),t}function bye(e=null,t,r,a=null){let n={type:"ObjectTypeIndexer",id:e,key:t,value:r,variance:a,static:null},s=te.ObjectTypeIndexer;return E(s.id,n,"id",e,1),E(s.key,n,"key",t,1),E(s.value,n,"value",r,1),E(s.variance,n,"variance",a,1),n}function vye(e,t,r=null){let a={type:"ObjectTypeProperty",key:e,value:t,variance:r,kind:null,method:null,optional:null,proto:null,static:null},n=te.ObjectTypeProperty;return E(n.key,a,"key",e,1),E(n.value,a,"value",t,1),E(n.variance,a,"variance",r,1),a}function Sye(e){let t={type:"ObjectTypeSpreadProperty",argument:e},r=te.ObjectTypeSpreadProperty;return E(r.argument,t,"argument",e,1),t}function Tye(e,t=null,r=null,a){let n={type:"OpaqueType",id:e,typeParameters:t,supertype:r,impltype:a},s=te.OpaqueType;return E(s.id,n,"id",e,1),E(s.typeParameters,n,"typeParameters",t,1),E(s.supertype,n,"supertype",r,1),E(s.impltype,n,"impltype",a,1),n}function wye(e,t){let r={type:"QualifiedTypeIdentifier",id:e,qualification:t},a=te.QualifiedTypeIdentifier;return E(a.id,r,"id",e,1),E(a.qualification,r,"qualification",t,1),r}function Cye(e){let t={type:"StringLiteralTypeAnnotation",value:e},r=te.StringLiteralTypeAnnotation;return E(r.value,t,"value",e),t}function Eye(){return{type:"StringTypeAnnotation"}}function Pye(){return{type:"SymbolTypeAnnotation"}}function Aye(){return{type:"ThisTypeAnnotation"}}function Iye(e){let t={type:"TupleTypeAnnotation",types:e},r=te.TupleTypeAnnotation;return E(r.types,t,"types",e,1),t}function Nye(e){let t={type:"TypeofTypeAnnotation",argument:e},r=te.TypeofTypeAnnotation;return E(r.argument,t,"argument",e,1),t}function Lye(e,t=null,r){let a={type:"TypeAlias",id:e,typeParameters:t,right:r},n=te.TypeAlias;return E(n.id,a,"id",e,1),E(n.typeParameters,a,"typeParameters",t,1),E(n.right,a,"right",r,1),a}function Rye(e){let t={type:"TypeAnnotation",typeAnnotation:e},r=te.TypeAnnotation;return E(r.typeAnnotation,t,"typeAnnotation",e,1),t}function kye(e,t){let r={type:"TypeCastExpression",expression:e,typeAnnotation:t},a=te.TypeCastExpression;return E(a.expression,r,"expression",e,1),E(a.typeAnnotation,r,"typeAnnotation",t,1),r}function Mye(e=null,t=null,r=null){let a={type:"TypeParameter",bound:e,default:t,variance:r,name:null},n=te.TypeParameter;return E(n.bound,a,"bound",e,1),E(n.default,a,"default",t,1),E(n.variance,a,"variance",r,1),a}function Dye(e){let t={type:"TypeParameterDeclaration",params:e},r=te.TypeParameterDeclaration;return E(r.params,t,"params",e,1),t}function _ye(e){let t={type:"TypeParameterInstantiation",params:e},r=te.TypeParameterInstantiation;return E(r.params,t,"params",e,1),t}function Oye(e){let t={type:"UnionTypeAnnotation",types:e},r=te.UnionTypeAnnotation;return E(r.types,t,"types",e,1),t}function Fye(e){let t={type:"Variance",kind:e},r=te.Variance;return E(r.kind,t,"kind",e),t}function Bye(){return{type:"VoidTypeAnnotation"}}function Uye(e,t){let r={type:"EnumDeclaration",id:e,body:t},a=te.EnumDeclaration;return E(a.id,r,"id",e,1),E(a.body,r,"body",t,1),r}function jye(e){let t={type:"EnumBooleanBody",members:e,explicitType:null,hasUnknownMembers:null},r=te.EnumBooleanBody;return E(r.members,t,"members",e,1),t}function zye(e){let t={type:"EnumNumberBody",members:e,explicitType:null,hasUnknownMembers:null},r=te.EnumNumberBody;return E(r.members,t,"members",e,1),t}function Vye(e){let t={type:"EnumStringBody",members:e,explicitType:null,hasUnknownMembers:null},r=te.EnumStringBody;return E(r.members,t,"members",e,1),t}function qye(e){let t={type:"EnumSymbolBody",members:e,hasUnknownMembers:null},r=te.EnumSymbolBody;return E(r.members,t,"members",e,1),t}function Hye(e){let t={type:"EnumBooleanMember",id:e,init:null},r=te.EnumBooleanMember;return E(r.id,t,"id",e,1),t}function $ye(e,t){let r={type:"EnumNumberMember",id:e,init:t},a=te.EnumNumberMember;return E(a.id,r,"id",e,1),E(a.init,r,"init",t,1),r}function Gye(e,t){let r={type:"EnumStringMember",id:e,init:t},a=te.EnumStringMember;return E(a.id,r,"id",e,1),E(a.init,r,"init",t,1),r}function Kye(e){let t={type:"EnumDefaultedMember",id:e},r=te.EnumDefaultedMember;return E(r.id,t,"id",e,1),t}function Wye(e,t){let r={type:"IndexedAccessType",objectType:e,indexType:t},a=te.IndexedAccessType;return E(a.objectType,r,"objectType",e,1),E(a.indexType,r,"indexType",t,1),r}function Xye(e,t){let r={type:"OptionalIndexedAccessType",objectType:e,indexType:t,optional:null},a=te.OptionalIndexedAccessType;return E(a.objectType,r,"objectType",e,1),E(a.indexType,r,"indexType",t,1),r}function Yye(e,t=null){let r={type:"JSXAttribute",name:e,value:t},a=te.JSXAttribute;return E(a.name,r,"name",e,1),E(a.value,r,"value",t,1),r}function Jye(e){let t={type:"JSXClosingElement",name:e},r=te.JSXClosingElement;return E(r.name,t,"name",e,1),t}function Qye(e,t=null,r,a=null){let n={type:"JSXElement",openingElement:e,closingElement:t,children:r,selfClosing:a},s=te.JSXElement;return E(s.openingElement,n,"openingElement",e,1),E(s.closingElement,n,"closingElement",t,1),E(s.children,n,"children",r,1),E(s.selfClosing,n,"selfClosing",a),n}function Zye(){return{type:"JSXEmptyExpression"}}function exe(e){let t={type:"JSXExpressionContainer",expression:e},r=te.JSXExpressionContainer;return E(r.expression,t,"expression",e,1),t}function txe(e){let t={type:"JSXSpreadChild",expression:e},r=te.JSXSpreadChild;return E(r.expression,t,"expression",e,1),t}function rxe(e){let t={type:"JSXIdentifier",name:e},r=te.JSXIdentifier;return E(r.name,t,"name",e),t}function axe(e,t){let r={type:"JSXMemberExpression",object:e,property:t},a=te.JSXMemberExpression;return E(a.object,r,"object",e,1),E(a.property,r,"property",t,1),r}function nxe(e,t){let r={type:"JSXNamespacedName",namespace:e,name:t},a=te.JSXNamespacedName;return E(a.namespace,r,"namespace",e,1),E(a.name,r,"name",t,1),r}function sxe(e,t,r=!1){let a={type:"JSXOpeningElement",name:e,attributes:t,selfClosing:r},n=te.JSXOpeningElement;return E(n.name,a,"name",e,1),E(n.attributes,a,"attributes",t,1),E(n.selfClosing,a,"selfClosing",r),a}function ixe(e){let t={type:"JSXSpreadAttribute",argument:e},r=te.JSXSpreadAttribute;return E(r.argument,t,"argument",e,1),t}function oxe(e){let t={type:"JSXText",value:e},r=te.JSXText;return E(r.value,t,"value",e),t}function lxe(e,t,r){let a={type:"JSXFragment",openingFragment:e,closingFragment:t,children:r},n=te.JSXFragment;return E(n.openingFragment,a,"openingFragment",e,1),E(n.closingFragment,a,"closingFragment",t,1),E(n.children,a,"children",r,1),a}function cxe(){return{type:"JSXOpeningFragment"}}function uxe(){return{type:"JSXClosingFragment"}}function dxe(){return{type:"Noop"}}function fxe(e,t){let r={type:"Placeholder",expectedNode:e,name:t},a=te.Placeholder;return E(a.expectedNode,r,"expectedNode",e),E(a.name,r,"name",t,1),r}function pxe(e){let t={type:"V8IntrinsicIdentifier",name:e},r=te.V8IntrinsicIdentifier;return E(r.name,t,"name",e),t}function mxe(){return{type:"ArgumentPlaceholder"}}function hxe(e,t){let r={type:"BindExpression",object:e,callee:t},a=te.BindExpression;return E(a.object,r,"object",e,1),E(a.callee,r,"callee",t,1),r}function gxe(e){let t={type:"Decorator",expression:e},r=te.Decorator;return E(r.expression,t,"expression",e,1),t}function yxe(e,t=!1){let r={type:"DoExpression",body:e,async:t},a=te.DoExpression;return E(a.body,r,"body",e,1),E(a.async,r,"async",t),r}function xxe(e){let t={type:"ExportDefaultSpecifier",exported:e},r=te.ExportDefaultSpecifier;return E(r.exported,t,"exported",e,1),t}function bxe(e){let t={type:"RecordExpression",properties:e},r=te.RecordExpression;return E(r.properties,t,"properties",e,1),t}function vxe(e=[]){let t={type:"TupleExpression",elements:e},r=te.TupleExpression;return E(r.elements,t,"elements",e,1),t}function Sxe(e){let t={type:"DecimalLiteral",value:e},r=te.DecimalLiteral;return E(r.value,t,"value",e),t}function Txe(e){let t={type:"ModuleExpression",body:e},r=te.ModuleExpression;return E(r.body,t,"body",e,1),t}function wxe(){return{type:"TopicReference"}}function Cxe(e){let t={type:"PipelineTopicExpression",expression:e},r=te.PipelineTopicExpression;return E(r.expression,t,"expression",e,1),t}function Exe(e){let t={type:"PipelineBareFunction",callee:e},r=te.PipelineBareFunction;return E(r.callee,t,"callee",e,1),t}function Pxe(){return{type:"PipelinePrimaryTopicReference"}}function Axe(){return{type:"VoidPattern"}}function Ixe(e){let t={type:"TSParameterProperty",parameter:e},r=te.TSParameterProperty;return E(r.parameter,t,"parameter",e,1),t}function Nxe(e=null,t=null,r,a=null){let n={type:"TSDeclareFunction",id:e,typeParameters:t,params:r,returnType:a},s=te.TSDeclareFunction;return E(s.id,n,"id",e,1),E(s.typeParameters,n,"typeParameters",t,1),E(s.params,n,"params",r,1),E(s.returnType,n,"returnType",a,1),n}function Lxe(e=null,t,r=null,a,n=null){let s={type:"TSDeclareMethod",decorators:e,key:t,typeParameters:r,params:a,returnType:n},i=te.TSDeclareMethod;return E(i.decorators,s,"decorators",e,1),E(i.key,s,"key",t,1),E(i.typeParameters,s,"typeParameters",r,1),E(i.params,s,"params",a,1),E(i.returnType,s,"returnType",n,1),s}function Rxe(e,t){let r={type:"TSQualifiedName",left:e,right:t},a=te.TSQualifiedName;return E(a.left,r,"left",e,1),E(a.right,r,"right",t,1),r}function kxe(e=null,t,r=null){let a={type:"TSCallSignatureDeclaration",typeParameters:e,parameters:t,typeAnnotation:r},n=te.TSCallSignatureDeclaration;return E(n.typeParameters,a,"typeParameters",e,1),E(n.parameters,a,"parameters",t,1),E(n.typeAnnotation,a,"typeAnnotation",r,1),a}function Mxe(e=null,t,r=null){let a={type:"TSConstructSignatureDeclaration",typeParameters:e,parameters:t,typeAnnotation:r},n=te.TSConstructSignatureDeclaration;return E(n.typeParameters,a,"typeParameters",e,1),E(n.parameters,a,"parameters",t,1),E(n.typeAnnotation,a,"typeAnnotation",r,1),a}function Dxe(e,t=null){let r={type:"TSPropertySignature",key:e,typeAnnotation:t},a=te.TSPropertySignature;return E(a.key,r,"key",e,1),E(a.typeAnnotation,r,"typeAnnotation",t,1),r}function _xe(e,t=null,r,a=null){let n={type:"TSMethodSignature",key:e,typeParameters:t,parameters:r,typeAnnotation:a,kind:null},s=te.TSMethodSignature;return E(s.key,n,"key",e,1),E(s.typeParameters,n,"typeParameters",t,1),E(s.parameters,n,"parameters",r,1),E(s.typeAnnotation,n,"typeAnnotation",a,1),n}function Oxe(e,t=null){let r={type:"TSIndexSignature",parameters:e,typeAnnotation:t},a=te.TSIndexSignature;return E(a.parameters,r,"parameters",e,1),E(a.typeAnnotation,r,"typeAnnotation",t,1),r}function Fxe(){return{type:"TSAnyKeyword"}}function Bxe(){return{type:"TSBooleanKeyword"}}function Uxe(){return{type:"TSBigIntKeyword"}}function jxe(){return{type:"TSIntrinsicKeyword"}}function zxe(){return{type:"TSNeverKeyword"}}function Vxe(){return{type:"TSNullKeyword"}}function qxe(){return{type:"TSNumberKeyword"}}function Hxe(){return{type:"TSObjectKeyword"}}function $xe(){return{type:"TSStringKeyword"}}function Gxe(){return{type:"TSSymbolKeyword"}}function Kxe(){return{type:"TSUndefinedKeyword"}}function Wxe(){return{type:"TSUnknownKeyword"}}function Xxe(){return{type:"TSVoidKeyword"}}function Yxe(){return{type:"TSThisType"}}function Jxe(e=null,t,r=null){let a={type:"TSFunctionType",typeParameters:e,parameters:t,typeAnnotation:r},n=te.TSFunctionType;return E(n.typeParameters,a,"typeParameters",e,1),E(n.parameters,a,"parameters",t,1),E(n.typeAnnotation,a,"typeAnnotation",r,1),a}function Qxe(e=null,t,r=null){let a={type:"TSConstructorType",typeParameters:e,parameters:t,typeAnnotation:r},n=te.TSConstructorType;return E(n.typeParameters,a,"typeParameters",e,1),E(n.parameters,a,"parameters",t,1),E(n.typeAnnotation,a,"typeAnnotation",r,1),a}function Zxe(e,t=null){let r={type:"TSTypeReference",typeName:e,typeParameters:t},a=te.TSTypeReference;return E(a.typeName,r,"typeName",e,1),E(a.typeParameters,r,"typeParameters",t,1),r}function ebe(e,t=null,r=null){let a={type:"TSTypePredicate",parameterName:e,typeAnnotation:t,asserts:r},n=te.TSTypePredicate;return E(n.parameterName,a,"parameterName",e,1),E(n.typeAnnotation,a,"typeAnnotation",t,1),E(n.asserts,a,"asserts",r),a}function tbe(e,t=null){let r={type:"TSTypeQuery",exprName:e,typeParameters:t},a=te.TSTypeQuery;return E(a.exprName,r,"exprName",e,1),E(a.typeParameters,r,"typeParameters",t,1),r}function rbe(e){let t={type:"TSTypeLiteral",members:e},r=te.TSTypeLiteral;return E(r.members,t,"members",e,1),t}function abe(e){let t={type:"TSArrayType",elementType:e},r=te.TSArrayType;return E(r.elementType,t,"elementType",e,1),t}function nbe(e){let t={type:"TSTupleType",elementTypes:e},r=te.TSTupleType;return E(r.elementTypes,t,"elementTypes",e,1),t}function sbe(e){let t={type:"TSOptionalType",typeAnnotation:e},r=te.TSOptionalType;return E(r.typeAnnotation,t,"typeAnnotation",e,1),t}function ibe(e){let t={type:"TSRestType",typeAnnotation:e},r=te.TSRestType;return E(r.typeAnnotation,t,"typeAnnotation",e,1),t}function obe(e,t,r=!1){let a={type:"TSNamedTupleMember",label:e,elementType:t,optional:r},n=te.TSNamedTupleMember;return E(n.label,a,"label",e,1),E(n.elementType,a,"elementType",t,1),E(n.optional,a,"optional",r),a}function lbe(e){let t={type:"TSUnionType",types:e},r=te.TSUnionType;return E(r.types,t,"types",e,1),t}function cbe(e){let t={type:"TSIntersectionType",types:e},r=te.TSIntersectionType;return E(r.types,t,"types",e,1),t}function ube(e,t,r,a){let n={type:"TSConditionalType",checkType:e,extendsType:t,trueType:r,falseType:a},s=te.TSConditionalType;return E(s.checkType,n,"checkType",e,1),E(s.extendsType,n,"extendsType",t,1),E(s.trueType,n,"trueType",r,1),E(s.falseType,n,"falseType",a,1),n}function dbe(e){let t={type:"TSInferType",typeParameter:e},r=te.TSInferType;return E(r.typeParameter,t,"typeParameter",e,1),t}function fbe(e){let t={type:"TSParenthesizedType",typeAnnotation:e},r=te.TSParenthesizedType;return E(r.typeAnnotation,t,"typeAnnotation",e,1),t}function pbe(e,t="keyof"){let r={type:"TSTypeOperator",typeAnnotation:e,operator:t},a=te.TSTypeOperator;return E(a.typeAnnotation,r,"typeAnnotation",e,1),E(a.operator,r,"operator",t),r}function mbe(e,t){let r={type:"TSIndexedAccessType",objectType:e,indexType:t},a=te.TSIndexedAccessType;return E(a.objectType,r,"objectType",e,1),E(a.indexType,r,"indexType",t,1),r}function hbe(e,t=null,r=null){let a={type:"TSMappedType",typeParameter:e,typeAnnotation:t,nameType:r},n=te.TSMappedType;return E(n.typeParameter,a,"typeParameter",e,1),E(n.typeAnnotation,a,"typeAnnotation",t,1),E(n.nameType,a,"nameType",r,1),a}function gbe(e,t){let r={type:"TSTemplateLiteralType",quasis:e,types:t},a=te.TSTemplateLiteralType;return E(a.quasis,r,"quasis",e,1),E(a.types,r,"types",t,1),r}function ybe(e){let t={type:"TSLiteralType",literal:e},r=te.TSLiteralType;return E(r.literal,t,"literal",e,1),t}function xbe(e,t=null){let r={type:"TSExpressionWithTypeArguments",expression:e,typeParameters:t},a=te.TSExpressionWithTypeArguments;return E(a.expression,r,"expression",e,1),E(a.typeParameters,r,"typeParameters",t,1),r}function bbe(e,t=null,r=null,a){let n={type:"TSInterfaceDeclaration",id:e,typeParameters:t,extends:r,body:a},s=te.TSInterfaceDeclaration;return E(s.id,n,"id",e,1),E(s.typeParameters,n,"typeParameters",t,1),E(s.extends,n,"extends",r,1),E(s.body,n,"body",a,1),n}function vbe(e){let t={type:"TSInterfaceBody",body:e},r=te.TSInterfaceBody;return E(r.body,t,"body",e,1),t}function Sbe(e,t=null,r){let a={type:"TSTypeAliasDeclaration",id:e,typeParameters:t,typeAnnotation:r},n=te.TSTypeAliasDeclaration;return E(n.id,a,"id",e,1),E(n.typeParameters,a,"typeParameters",t,1),E(n.typeAnnotation,a,"typeAnnotation",r,1),a}function Tbe(e,t=null){let r={type:"TSInstantiationExpression",expression:e,typeParameters:t},a=te.TSInstantiationExpression;return E(a.expression,r,"expression",e,1),E(a.typeParameters,r,"typeParameters",t,1),r}function wbe(e,t){let r={type:"TSAsExpression",expression:e,typeAnnotation:t},a=te.TSAsExpression;return E(a.expression,r,"expression",e,1),E(a.typeAnnotation,r,"typeAnnotation",t,1),r}function Cbe(e,t){let r={type:"TSSatisfiesExpression",expression:e,typeAnnotation:t},a=te.TSSatisfiesExpression;return E(a.expression,r,"expression",e,1),E(a.typeAnnotation,r,"typeAnnotation",t,1),r}function Ebe(e,t){let r={type:"TSTypeAssertion",typeAnnotation:e,expression:t},a=te.TSTypeAssertion;return E(a.typeAnnotation,r,"typeAnnotation",e,1),E(a.expression,r,"expression",t,1),r}function Pbe(e){let t={type:"TSEnumBody",members:e},r=te.TSEnumBody;return E(r.members,t,"members",e,1),t}function Abe(e,t){let r={type:"TSEnumDeclaration",id:e,members:t},a=te.TSEnumDeclaration;return E(a.id,r,"id",e,1),E(a.members,r,"members",t,1),r}function Ibe(e,t=null){let r={type:"TSEnumMember",id:e,initializer:t},a=te.TSEnumMember;return E(a.id,r,"id",e,1),E(a.initializer,r,"initializer",t,1),r}function Nbe(e,t){let r={type:"TSModuleDeclaration",id:e,body:t,kind:null},a=te.TSModuleDeclaration;return E(a.id,r,"id",e,1),E(a.body,r,"body",t,1),r}function Lbe(e){let t={type:"TSModuleBlock",body:e},r=te.TSModuleBlock;return E(r.body,t,"body",e,1),t}function Rbe(e,t=null,r=null){let a={type:"TSImportType",argument:e,qualifier:t,typeParameters:r},n=te.TSImportType;return E(n.argument,a,"argument",e,1),E(n.qualifier,a,"qualifier",t,1),E(n.typeParameters,a,"typeParameters",r,1),a}function kbe(e,t){let r={type:"TSImportEqualsDeclaration",id:e,moduleReference:t,isExport:null},a=te.TSImportEqualsDeclaration;return E(a.id,r,"id",e,1),E(a.moduleReference,r,"moduleReference",t,1),r}function Mbe(e){let t={type:"TSExternalModuleReference",expression:e},r=te.TSExternalModuleReference;return E(r.expression,t,"expression",e,1),t}function Dbe(e){let t={type:"TSNonNullExpression",expression:e},r=te.TSNonNullExpression;return E(r.expression,t,"expression",e,1),t}function _be(e){let t={type:"TSExportAssignment",expression:e},r=te.TSExportAssignment;return E(r.expression,t,"expression",e,1),t}function Obe(e){let t={type:"TSNamespaceExportDeclaration",id:e},r=te.TSNamespaceExportDeclaration;return E(r.id,t,"id",e,1),t}function Fbe(e){let t={type:"TSTypeAnnotation",typeAnnotation:e},r=te.TSTypeAnnotation;return E(r.typeAnnotation,t,"typeAnnotation",e,1),t}function Bbe(e){let t={type:"TSTypeParameterInstantiation",params:e},r=te.TSTypeParameterInstantiation;return E(r.params,t,"params",e,1),t}function Ube(e){let t={type:"TSTypeParameterDeclaration",params:e},r=te.TSTypeParameterDeclaration;return E(r.params,t,"params",e,1),t}function jbe(e=null,t=null,r){let a={type:"TSTypeParameter",constraint:e,default:t,name:r},n=te.TSTypeParameter;return E(n.constraint,a,"constraint",e,1),E(n.default,a,"default",t,1),E(n.name,a,"name",r),a}function zbe(e){return(0,jw.default)("NumberLiteral","NumericLiteral","The node type "),n8(e)}function Vbe(e,t=""){return(0,jw.default)("RegexLiteral","RegExpLiteral","The node type "),s8(e,t)}function qbe(e){return(0,jw.default)("RestProperty","RestElement","The node type "),i8(e)}function Hbe(e){return(0,jw.default)("SpreadProperty","SpreadElement","The node type "),o8(e)}});var l8=ne(T=>{"use strict";Object.defineProperty(T,"__esModule",{value:!0});T.JSXIdentifier=T.JSXFragment=T.JSXExpressionContainer=T.JSXEmptyExpression=T.JSXElement=T.JSXClosingFragment=T.JSXClosingElement=T.JSXAttribute=T.IntersectionTypeAnnotation=T.InterpreterDirective=T.InterfaceTypeAnnotation=T.InterfaceExtends=T.InterfaceDeclaration=T.InferredPredicate=T.IndexedAccessType=T.ImportSpecifier=T.ImportNamespaceSpecifier=T.ImportExpression=T.ImportDefaultSpecifier=T.ImportDeclaration=T.ImportAttribute=T.Import=T.IfStatement=T.Identifier=T.GenericTypeAnnotation=T.FunctionTypeParam=T.FunctionTypeAnnotation=T.FunctionExpression=T.FunctionDeclaration=T.ForStatement=T.ForOfStatement=T.ForInStatement=T.File=T.ExpressionStatement=T.ExportSpecifier=T.ExportNamespaceSpecifier=T.ExportNamedDeclaration=T.ExportDefaultSpecifier=T.ExportDefaultDeclaration=T.ExportAllDeclaration=T.ExistsTypeAnnotation=T.EnumSymbolBody=T.EnumStringMember=T.EnumStringBody=T.EnumNumberMember=T.EnumNumberBody=T.EnumDefaultedMember=T.EnumDeclaration=T.EnumBooleanMember=T.EnumBooleanBody=T.EmptyTypeAnnotation=T.EmptyStatement=T.DoWhileStatement=T.DoExpression=T.DirectiveLiteral=T.Directive=T.Decorator=T.DeclaredPredicate=T.DeclareVariable=T.DeclareTypeAlias=T.DeclareOpaqueType=T.DeclareModuleExports=T.DeclareModule=T.DeclareInterface=T.DeclareFunction=T.DeclareExportDeclaration=T.DeclareExportAllDeclaration=T.DeclareClass=T.DecimalLiteral=T.DebuggerStatement=T.ContinueStatement=T.ConditionalExpression=T.ClassProperty=T.ClassPrivateProperty=T.ClassPrivateMethod=T.ClassMethod=T.ClassImplements=T.ClassExpression=T.ClassDeclaration=T.ClassBody=T.ClassAccessorProperty=T.CatchClause=T.CallExpression=T.BreakStatement=T.BooleanTypeAnnotation=T.BooleanLiteralTypeAnnotation=T.BooleanLiteral=T.BlockStatement=T.BindExpression=T.BinaryExpression=T.BigIntLiteral=T.AwaitExpression=T.AssignmentPattern=T.AssignmentExpression=T.ArrowFunctionExpression=T.ArrayTypeAnnotation=T.ArrayPattern=T.ArrayExpression=T.ArgumentPlaceholder=T.AnyTypeAnnotation=void 0;T.TSNumberKeyword=T.TSNullKeyword=T.TSNonNullExpression=T.TSNeverKeyword=T.TSNamespaceExportDeclaration=T.TSNamedTupleMember=T.TSModuleDeclaration=T.TSModuleBlock=T.TSMethodSignature=T.TSMappedType=T.TSLiteralType=T.TSIntrinsicKeyword=T.TSIntersectionType=T.TSInterfaceDeclaration=T.TSInterfaceBody=T.TSInstantiationExpression=T.TSInferType=T.TSIndexedAccessType=T.TSIndexSignature=T.TSImportType=T.TSImportEqualsDeclaration=T.TSFunctionType=T.TSExternalModuleReference=T.TSExpressionWithTypeArguments=T.TSExportAssignment=T.TSEnumMember=T.TSEnumDeclaration=T.TSEnumBody=T.TSDeclareMethod=T.TSDeclareFunction=T.TSConstructorType=T.TSConstructSignatureDeclaration=T.TSConditionalType=T.TSCallSignatureDeclaration=T.TSBooleanKeyword=T.TSBigIntKeyword=T.TSAsExpression=T.TSArrayType=T.TSAnyKeyword=T.SymbolTypeAnnotation=T.SwitchStatement=T.SwitchCase=T.Super=T.StringTypeAnnotation=T.StringLiteralTypeAnnotation=T.StringLiteral=T.StaticBlock=T.SpreadProperty=T.SpreadElement=T.SequenceExpression=T.ReturnStatement=T.RestProperty=T.RestElement=T.RegexLiteral=T.RegExpLiteral=T.RecordExpression=T.QualifiedTypeIdentifier=T.Program=T.PrivateName=T.Placeholder=T.PipelineTopicExpression=T.PipelinePrimaryTopicReference=T.PipelineBareFunction=T.ParenthesizedExpression=T.OptionalMemberExpression=T.OptionalIndexedAccessType=T.OptionalCallExpression=T.OpaqueType=T.ObjectTypeSpreadProperty=T.ObjectTypeProperty=T.ObjectTypeInternalSlot=T.ObjectTypeIndexer=T.ObjectTypeCallProperty=T.ObjectTypeAnnotation=T.ObjectProperty=T.ObjectPattern=T.ObjectMethod=T.ObjectExpression=T.NumericLiteral=T.NumberTypeAnnotation=T.NumberLiteralTypeAnnotation=T.NumberLiteral=T.NullableTypeAnnotation=T.NullLiteralTypeAnnotation=T.NullLiteral=T.Noop=T.NewExpression=T.ModuleExpression=T.MixedTypeAnnotation=T.MetaProperty=T.MemberExpression=T.LogicalExpression=T.LabeledStatement=T.JSXText=T.JSXSpreadChild=T.JSXSpreadAttribute=T.JSXOpeningFragment=T.JSXOpeningElement=T.JSXNamespacedName=T.JSXMemberExpression=void 0;T.YieldExpression=T.WithStatement=T.WhileStatement=T.VoidTypeAnnotation=T.VoidPattern=T.Variance=T.VariableDeclarator=T.VariableDeclaration=T.V8IntrinsicIdentifier=T.UpdateExpression=T.UnionTypeAnnotation=T.UnaryExpression=T.TypeofTypeAnnotation=T.TypeParameterInstantiation=T.TypeParameterDeclaration=T.TypeParameter=T.TypeCastExpression=T.TypeAnnotation=T.TypeAlias=T.TupleTypeAnnotation=T.TupleExpression=T.TryStatement=T.TopicReference=T.ThrowStatement=T.ThisTypeAnnotation=T.ThisExpression=T.TemplateLiteral=T.TemplateElement=T.TaggedTemplateExpression=T.TSVoidKeyword=T.TSUnknownKeyword=T.TSUnionType=T.TSUndefinedKeyword=T.TSTypeReference=T.TSTypeQuery=T.TSTypePredicate=T.TSTypeParameterInstantiation=T.TSTypeParameterDeclaration=T.TSTypeParameter=T.TSTypeOperator=T.TSTypeLiteral=T.TSTypeAssertion=T.TSTypeAnnotation=T.TSTypeAliasDeclaration=T.TSTupleType=T.TSThisType=T.TSTemplateLiteralType=T.TSSymbolKeyword=T.TSStringKeyword=T.TSSatisfiesExpression=T.TSRestType=T.TSQualifiedName=T.TSPropertySignature=T.TSParenthesizedType=T.TSParameterProperty=T.TSOptionalType=T.TSObjectKeyword=void 0;var w0=mL(),ytt=Ig();function G(e){return w0[e]}var xtt=T.ArrayExpression=G("arrayExpression"),btt=T.AssignmentExpression=G("assignmentExpression"),vtt=T.BinaryExpression=G("binaryExpression"),Stt=T.InterpreterDirective=G("interpreterDirective"),Ttt=T.Directive=G("directive"),wtt=T.DirectiveLiteral=G("directiveLiteral"),Ctt=T.BlockStatement=G("blockStatement"),Ett=T.BreakStatement=G("breakStatement"),Ptt=T.CallExpression=G("callExpression"),Att=T.CatchClause=G("catchClause"),Itt=T.ConditionalExpression=G("conditionalExpression"),Ntt=T.ContinueStatement=G("continueStatement"),Ltt=T.DebuggerStatement=G("debuggerStatement"),Rtt=T.DoWhileStatement=G("doWhileStatement"),ktt=T.EmptyStatement=G("emptyStatement"),Mtt=T.ExpressionStatement=G("expressionStatement"),Dtt=T.File=G("file"),_tt=T.ForInStatement=G("forInStatement"),Ott=T.ForStatement=G("forStatement"),Ftt=T.FunctionDeclaration=G("functionDeclaration"),Btt=T.FunctionExpression=G("functionExpression"),Utt=T.Identifier=G("identifier"),jtt=T.IfStatement=G("ifStatement"),ztt=T.LabeledStatement=G("labeledStatement"),Vtt=T.StringLiteral=G("stringLiteral"),qtt=T.NumericLiteral=G("numericLiteral"),Htt=T.NullLiteral=G("nullLiteral"),$tt=T.BooleanLiteral=G("booleanLiteral"),Gtt=T.RegExpLiteral=G("regExpLiteral"),Ktt=T.LogicalExpression=G("logicalExpression"),Wtt=T.MemberExpression=G("memberExpression"),Xtt=T.NewExpression=G("newExpression"),Ytt=T.Program=G("program"),Jtt=T.ObjectExpression=G("objectExpression"),Qtt=T.ObjectMethod=G("objectMethod"),Ztt=T.ObjectProperty=G("objectProperty"),ert=T.RestElement=G("restElement"),trt=T.ReturnStatement=G("returnStatement"),rrt=T.SequenceExpression=G("sequenceExpression"),art=T.ParenthesizedExpression=G("parenthesizedExpression"),nrt=T.SwitchCase=G("switchCase"),srt=T.SwitchStatement=G("switchStatement"),irt=T.ThisExpression=G("thisExpression"),ort=T.ThrowStatement=G("throwStatement"),lrt=T.TryStatement=G("tryStatement"),crt=T.UnaryExpression=G("unaryExpression"),urt=T.UpdateExpression=G("updateExpression"),drt=T.VariableDeclaration=G("variableDeclaration"),frt=T.VariableDeclarator=G("variableDeclarator"),prt=T.WhileStatement=G("whileStatement"),mrt=T.WithStatement=G("withStatement"),hrt=T.AssignmentPattern=G("assignmentPattern"),grt=T.ArrayPattern=G("arrayPattern"),yrt=T.ArrowFunctionExpression=G("arrowFunctionExpression"),xrt=T.ClassBody=G("classBody"),brt=T.ClassExpression=G("classExpression"),vrt=T.ClassDeclaration=G("classDeclaration"),Srt=T.ExportAllDeclaration=G("exportAllDeclaration"),Trt=T.ExportDefaultDeclaration=G("exportDefaultDeclaration"),wrt=T.ExportNamedDeclaration=G("exportNamedDeclaration"),Crt=T.ExportSpecifier=G("exportSpecifier"),Ert=T.ForOfStatement=G("forOfStatement"),Prt=T.ImportDeclaration=G("importDeclaration"),Art=T.ImportDefaultSpecifier=G("importDefaultSpecifier"),Irt=T.ImportNamespaceSpecifier=G("importNamespaceSpecifier"),Nrt=T.ImportSpecifier=G("importSpecifier"),Lrt=T.ImportExpression=G("importExpression"),Rrt=T.MetaProperty=G("metaProperty"),krt=T.ClassMethod=G("classMethod"),Mrt=T.ObjectPattern=G("objectPattern"),Drt=T.SpreadElement=G("spreadElement"),_rt=T.Super=G("super"),Ort=T.TaggedTemplateExpression=G("taggedTemplateExpression"),Frt=T.TemplateElement=G("templateElement"),Brt=T.TemplateLiteral=G("templateLiteral"),Urt=T.YieldExpression=G("yieldExpression"),jrt=T.AwaitExpression=G("awaitExpression"),zrt=T.Import=G("import"),Vrt=T.BigIntLiteral=G("bigIntLiteral"),qrt=T.ExportNamespaceSpecifier=G("exportNamespaceSpecifier"),Hrt=T.OptionalMemberExpression=G("optionalMemberExpression"),$rt=T.OptionalCallExpression=G("optionalCallExpression"),Grt=T.ClassProperty=G("classProperty"),Krt=T.ClassAccessorProperty=G("classAccessorProperty"),Wrt=T.ClassPrivateProperty=G("classPrivateProperty"),Xrt=T.ClassPrivateMethod=G("classPrivateMethod"),Yrt=T.PrivateName=G("privateName"),Jrt=T.StaticBlock=G("staticBlock"),Qrt=T.ImportAttribute=G("importAttribute"),Zrt=T.AnyTypeAnnotation=G("anyTypeAnnotation"),eat=T.ArrayTypeAnnotation=G("arrayTypeAnnotation"),tat=T.BooleanTypeAnnotation=G("booleanTypeAnnotation"),rat=T.BooleanLiteralTypeAnnotation=G("booleanLiteralTypeAnnotation"),aat=T.NullLiteralTypeAnnotation=G("nullLiteralTypeAnnotation"),nat=T.ClassImplements=G("classImplements"),sat=T.DeclareClass=G("declareClass"),iat=T.DeclareFunction=G("declareFunction"),oat=T.DeclareInterface=G("declareInterface"),lat=T.DeclareModule=G("declareModule"),cat=T.DeclareModuleExports=G("declareModuleExports"),uat=T.DeclareTypeAlias=G("declareTypeAlias"),dat=T.DeclareOpaqueType=G("declareOpaqueType"),fat=T.DeclareVariable=G("declareVariable"),pat=T.DeclareExportDeclaration=G("declareExportDeclaration"),mat=T.DeclareExportAllDeclaration=G("declareExportAllDeclaration"),hat=T.DeclaredPredicate=G("declaredPredicate"),gat=T.ExistsTypeAnnotation=G("existsTypeAnnotation"),yat=T.FunctionTypeAnnotation=G("functionTypeAnnotation"),xat=T.FunctionTypeParam=G("functionTypeParam"),bat=T.GenericTypeAnnotation=G("genericTypeAnnotation"),vat=T.InferredPredicate=G("inferredPredicate"),Sat=T.InterfaceExtends=G("interfaceExtends"),Tat=T.InterfaceDeclaration=G("interfaceDeclaration"),wat=T.InterfaceTypeAnnotation=G("interfaceTypeAnnotation"),Cat=T.IntersectionTypeAnnotation=G("intersectionTypeAnnotation"),Eat=T.MixedTypeAnnotation=G("mixedTypeAnnotation"),Pat=T.EmptyTypeAnnotation=G("emptyTypeAnnotation"),Aat=T.NullableTypeAnnotation=G("nullableTypeAnnotation"),Iat=T.NumberLiteralTypeAnnotation=G("numberLiteralTypeAnnotation"),Nat=T.NumberTypeAnnotation=G("numberTypeAnnotation"),Lat=T.ObjectTypeAnnotation=G("objectTypeAnnotation"),Rat=T.ObjectTypeInternalSlot=G("objectTypeInternalSlot"),kat=T.ObjectTypeCallProperty=G("objectTypeCallProperty"),Mat=T.ObjectTypeIndexer=G("objectTypeIndexer"),Dat=T.ObjectTypeProperty=G("objectTypeProperty"),_at=T.ObjectTypeSpreadProperty=G("objectTypeSpreadProperty"),Oat=T.OpaqueType=G("opaqueType"),Fat=T.QualifiedTypeIdentifier=G("qualifiedTypeIdentifier"),Bat=T.StringLiteralTypeAnnotation=G("stringLiteralTypeAnnotation"),Uat=T.StringTypeAnnotation=G("stringTypeAnnotation"),jat=T.SymbolTypeAnnotation=G("symbolTypeAnnotation"),zat=T.ThisTypeAnnotation=G("thisTypeAnnotation"),Vat=T.TupleTypeAnnotation=G("tupleTypeAnnotation"),qat=T.TypeofTypeAnnotation=G("typeofTypeAnnotation"),Hat=T.TypeAlias=G("typeAlias"),$at=T.TypeAnnotation=G("typeAnnotation"),Gat=T.TypeCastExpression=G("typeCastExpression"),Kat=T.TypeParameter=G("typeParameter"),Wat=T.TypeParameterDeclaration=G("typeParameterDeclaration"),Xat=T.TypeParameterInstantiation=G("typeParameterInstantiation"),Yat=T.UnionTypeAnnotation=G("unionTypeAnnotation"),Jat=T.Variance=G("variance"),Qat=T.VoidTypeAnnotation=G("voidTypeAnnotation"),Zat=T.EnumDeclaration=G("enumDeclaration"),ent=T.EnumBooleanBody=G("enumBooleanBody"),tnt=T.EnumNumberBody=G("enumNumberBody"),rnt=T.EnumStringBody=G("enumStringBody"),ant=T.EnumSymbolBody=G("enumSymbolBody"),nnt=T.EnumBooleanMember=G("enumBooleanMember"),snt=T.EnumNumberMember=G("enumNumberMember"),int=T.EnumStringMember=G("enumStringMember"),ont=T.EnumDefaultedMember=G("enumDefaultedMember"),lnt=T.IndexedAccessType=G("indexedAccessType"),cnt=T.OptionalIndexedAccessType=G("optionalIndexedAccessType"),unt=T.JSXAttribute=G("jsxAttribute"),dnt=T.JSXClosingElement=G("jsxClosingElement"),fnt=T.JSXElement=G("jsxElement"),pnt=T.JSXEmptyExpression=G("jsxEmptyExpression"),mnt=T.JSXExpressionContainer=G("jsxExpressionContainer"),hnt=T.JSXSpreadChild=G("jsxSpreadChild"),gnt=T.JSXIdentifier=G("jsxIdentifier"),ynt=T.JSXMemberExpression=G("jsxMemberExpression"),xnt=T.JSXNamespacedName=G("jsxNamespacedName"),bnt=T.JSXOpeningElement=G("jsxOpeningElement"),vnt=T.JSXSpreadAttribute=G("jsxSpreadAttribute"),Snt=T.JSXText=G("jsxText"),Tnt=T.JSXFragment=G("jsxFragment"),wnt=T.JSXOpeningFragment=G("jsxOpeningFragment"),Cnt=T.JSXClosingFragment=G("jsxClosingFragment"),Ent=T.Noop=G("noop"),Pnt=T.Placeholder=G("placeholder"),Ant=T.V8IntrinsicIdentifier=G("v8IntrinsicIdentifier"),Int=T.ArgumentPlaceholder=G("argumentPlaceholder"),Nnt=T.BindExpression=G("bindExpression"),Lnt=T.Decorator=G("decorator"),Rnt=T.DoExpression=G("doExpression"),knt=T.ExportDefaultSpecifier=G("exportDefaultSpecifier"),Mnt=T.RecordExpression=G("recordExpression"),Dnt=T.TupleExpression=G("tupleExpression"),_nt=T.DecimalLiteral=G("decimalLiteral"),Ont=T.ModuleExpression=G("moduleExpression"),Fnt=T.TopicReference=G("topicReference"),Bnt=T.PipelineTopicExpression=G("pipelineTopicExpression"),Unt=T.PipelineBareFunction=G("pipelineBareFunction"),jnt=T.PipelinePrimaryTopicReference=G("pipelinePrimaryTopicReference"),znt=T.VoidPattern=G("voidPattern"),Vnt=T.TSParameterProperty=G("tsParameterProperty"),qnt=T.TSDeclareFunction=G("tsDeclareFunction"),Hnt=T.TSDeclareMethod=G("tsDeclareMethod"),$nt=T.TSQualifiedName=G("tsQualifiedName"),Gnt=T.TSCallSignatureDeclaration=G("tsCallSignatureDeclaration"),Knt=T.TSConstructSignatureDeclaration=G("tsConstructSignatureDeclaration"),Wnt=T.TSPropertySignature=G("tsPropertySignature"),Xnt=T.TSMethodSignature=G("tsMethodSignature"),Ynt=T.TSIndexSignature=G("tsIndexSignature"),Jnt=T.TSAnyKeyword=G("tsAnyKeyword"),Qnt=T.TSBooleanKeyword=G("tsBooleanKeyword"),Znt=T.TSBigIntKeyword=G("tsBigIntKeyword"),est=T.TSIntrinsicKeyword=G("tsIntrinsicKeyword"),tst=T.TSNeverKeyword=G("tsNeverKeyword"),rst=T.TSNullKeyword=G("tsNullKeyword"),ast=T.TSNumberKeyword=G("tsNumberKeyword"),nst=T.TSObjectKeyword=G("tsObjectKeyword"),sst=T.TSStringKeyword=G("tsStringKeyword"),ist=T.TSSymbolKeyword=G("tsSymbolKeyword"),ost=T.TSUndefinedKeyword=G("tsUndefinedKeyword"),lst=T.TSUnknownKeyword=G("tsUnknownKeyword"),cst=T.TSVoidKeyword=G("tsVoidKeyword"),ust=T.TSThisType=G("tsThisType"),dst=T.TSFunctionType=G("tsFunctionType"),fst=T.TSConstructorType=G("tsConstructorType"),pst=T.TSTypeReference=G("tsTypeReference"),mst=T.TSTypePredicate=G("tsTypePredicate"),hst=T.TSTypeQuery=G("tsTypeQuery"),gst=T.TSTypeLiteral=G("tsTypeLiteral"),yst=T.TSArrayType=G("tsArrayType"),xst=T.TSTupleType=G("tsTupleType"),bst=T.TSOptionalType=G("tsOptionalType"),vst=T.TSRestType=G("tsRestType"),Sst=T.TSNamedTupleMember=G("tsNamedTupleMember"),Tst=T.TSUnionType=G("tsUnionType"),wst=T.TSIntersectionType=G("tsIntersectionType"),Cst=T.TSConditionalType=G("tsConditionalType"),Est=T.TSInferType=G("tsInferType"),Pst=T.TSParenthesizedType=G("tsParenthesizedType"),Ast=T.TSTypeOperator=G("tsTypeOperator"),Ist=T.TSIndexedAccessType=G("tsIndexedAccessType"),Nst=T.TSMappedType=G("tsMappedType"),Lst=T.TSTemplateLiteralType=G("tsTemplateLiteralType"),Rst=T.TSLiteralType=G("tsLiteralType"),kst=T.TSExpressionWithTypeArguments=G("tsExpressionWithTypeArguments"),Mst=T.TSInterfaceDeclaration=G("tsInterfaceDeclaration"),Dst=T.TSInterfaceBody=G("tsInterfaceBody"),_st=T.TSTypeAliasDeclaration=G("tsTypeAliasDeclaration"),Ost=T.TSInstantiationExpression=G("tsInstantiationExpression"),Fst=T.TSAsExpression=G("tsAsExpression"),Bst=T.TSSatisfiesExpression=G("tsSatisfiesExpression"),Ust=T.TSTypeAssertion=G("tsTypeAssertion"),jst=T.TSEnumBody=G("tsEnumBody"),zst=T.TSEnumDeclaration=G("tsEnumDeclaration"),Vst=T.TSEnumMember=G("tsEnumMember"),qst=T.TSModuleDeclaration=G("tsModuleDeclaration"),Hst=T.TSModuleBlock=G("tsModuleBlock"),$st=T.TSImportType=G("tsImportType"),Gst=T.TSImportEqualsDeclaration=G("tsImportEqualsDeclaration"),Kst=T.TSExternalModuleReference=G("tsExternalModuleReference"),Wst=T.TSNonNullExpression=G("tsNonNullExpression"),Xst=T.TSExportAssignment=G("tsExportAssignment"),Yst=T.TSNamespaceExportDeclaration=G("tsNamespaceExportDeclaration"),Jst=T.TSTypeAnnotation=G("tsTypeAnnotation"),Qst=T.TSTypeParameterInstantiation=G("tsTypeParameterInstantiation"),Zst=T.TSTypeParameterDeclaration=G("tsTypeParameterDeclaration"),eit=T.TSTypeParameter=G("tsTypeParameter"),tit=T.NumberLiteral=w0.numberLiteral,rit=T.RegexLiteral=w0.regexLiteral,ait=T.RestProperty=w0.restProperty,nit=T.SpreadProperty=w0.spreadProperty});var zi=ne(Qd=>{"use strict";Object.defineProperty(Qd,"__esModule",{value:!0});var hL=mL();Object.keys(hL).forEach(function(e){e==="default"||e==="__esModule"||e in Qd&&Qd[e]===hL[e]||Object.defineProperty(Qd,e,{enumerable:!0,get:function(){return hL[e]}})});var gL=l8();Object.keys(gL).forEach(function(e){e==="default"||e==="__esModule"||e in Qd&&Qd[e]===gL[e]||Object.defineProperty(Qd,e,{enumerable:!0,get:function(){return gL[e]}})})});var c8=ne(yL=>{"use strict";Object.defineProperty(yL,"__esModule",{value:!0});yL.default=Kbe;var $be=zi(),Gbe=fr();function Kbe(e,t){let r=e.value.split(/\r\n|\n|\r/),a=0;for(let s=0;s<r.length;s++)/[^ \t]/.exec(r[s])&&(a=s);let n="";for(let s=0;s<r.length;s++){let i=r[s],o=s===0,l=s===r.length-1,c=s===a,u=i.replace(/\t/g," ");o||(u=u.replace(/^ +/,"")),l||(u=u.replace(/ +$/,"")),u&&(c||(u+=" "),n+=u)}n&&t.push((0,Gbe.inherits)((0,$be.stringLiteral)(n),e))}});var u8=ne(bL=>{"use strict";Object.defineProperty(bL,"__esModule",{value:!0});bL.default=Xbe;var xL=on(),Wbe=c8();function Xbe(e){let t=[];for(let r=0;r<e.children.length;r++){let a=e.children[r];if((0,xL.isJSXText)(a)){(0,Wbe.default)(a,t);continue}(0,xL.isJSXExpressionContainer)(a)&&(a=a.expression),!(0,xL.isJSXEmptyExpression)(a)&&t.push(a)}return t}});var SL=ne(vL=>{"use strict";Object.defineProperty(vL,"__esModule",{value:!0});vL.default=Jbe;var Ybe=Jo();function Jbe(e){return!!(e&&Ybe.VISITOR_KEYS[e.type])}});var d8=ne(TL=>{"use strict";Object.defineProperty(TL,"__esModule",{value:!0});TL.default=Zbe;var Qbe=SL();function Zbe(e){if(!(0,Qbe.default)(e)){var t;let r=(t=e?.type)!=null?t:JSON.stringify(e);throw new TypeError(`Not a valid node of type "${r}"`)}}});var f8=ne(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.assertAccessor=bCe;B.assertAnyTypeAnnotation=Ove;B.assertArgumentPlaceholder=dTe;B.assertArrayExpression=t0e;B.assertArrayPattern=Z0e;B.assertArrayTypeAnnotation=Fve;B.assertArrowFunctionExpression=eve;B.assertAssignmentExpression=r0e;B.assertAssignmentPattern=Q0e;B.assertAwaitExpression=wve;B.assertBigIntLiteral=Eve;B.assertBinary=jwe;B.assertBinaryExpression=a0e;B.assertBindExpression=fTe;B.assertBlock=qwe;B.assertBlockParent=Vwe;B.assertBlockStatement=o0e;B.assertBooleanLiteral=I0e;B.assertBooleanLiteralTypeAnnotation=Uve;B.assertBooleanTypeAnnotation=Bve;B.assertBreakStatement=l0e;B.assertCallExpression=c0e;B.assertCatchClause=u0e;B.assertClass=hCe;B.assertClassAccessorProperty=Lve;B.assertClassBody=tve;B.assertClassDeclaration=ave;B.assertClassExpression=rve;B.assertClassImplements=zve;B.assertClassMethod=hve;B.assertClassPrivateMethod=kve;B.assertClassPrivateProperty=Rve;B.assertClassProperty=Nve;B.assertCompletionStatement=Gwe;B.assertConditional=Kwe;B.assertConditionalExpression=d0e;B.assertContinueStatement=f0e;B.assertDebuggerStatement=p0e;B.assertDecimalLiteral=xTe;B.assertDeclaration=rCe;B.assertDeclareClass=Vve;B.assertDeclareExportAllDeclaration=Jve;B.assertDeclareExportDeclaration=Yve;B.assertDeclareFunction=qve;B.assertDeclareInterface=Hve;B.assertDeclareModule=$ve;B.assertDeclareModuleExports=Gve;B.assertDeclareOpaqueType=Wve;B.assertDeclareTypeAlias=Kve;B.assertDeclareVariable=Xve;B.assertDeclaredPredicate=Qve;B.assertDecorator=pTe;B.assertDirective=s0e;B.assertDirectiveLiteral=i0e;B.assertDoExpression=mTe;B.assertDoWhileStatement=m0e;B.assertEmptyStatement=h0e;B.assertEmptyTypeAnnotation=cSe;B.assertEnumBody=PCe;B.assertEnumBooleanBody=FSe;B.assertEnumBooleanMember=zSe;B.assertEnumDeclaration=OSe;B.assertEnumDefaultedMember=HSe;B.assertEnumMember=ACe;B.assertEnumNumberBody=BSe;B.assertEnumNumberMember=VSe;B.assertEnumStringBody=USe;B.assertEnumStringMember=qSe;B.assertEnumSymbolBody=jSe;B.assertExistsTypeAnnotation=Zve;B.assertExportAllDeclaration=nve;B.assertExportDeclaration=yCe;B.assertExportDefaultDeclaration=sve;B.assertExportDefaultSpecifier=hTe;B.assertExportNamedDeclaration=ive;B.assertExportNamespaceSpecifier=Pve;B.assertExportSpecifier=ove;B.assertExpression=Uwe;B.assertExpressionStatement=g0e;B.assertExpressionWrapper=Ywe;B.assertFile=y0e;B.assertFlow=SCe;B.assertFlowBaseAnnotation=wCe;B.assertFlowDeclaration=CCe;B.assertFlowPredicate=ECe;B.assertFlowType=TCe;B.assertFor=Jwe;B.assertForInStatement=x0e;B.assertForOfStatement=lve;B.assertForStatement=b0e;B.assertForXStatement=Qwe;B.assertFunction=Zwe;B.assertFunctionDeclaration=v0e;B.assertFunctionExpression=S0e;B.assertFunctionParameter=aCe;B.assertFunctionParent=eCe;B.assertFunctionTypeAnnotation=eSe;B.assertFunctionTypeParam=tSe;B.assertGenericTypeAnnotation=rSe;B.assertIdentifier=T0e;B.assertIfStatement=w0e;B.assertImmutable=lCe;B.assertImport=Cve;B.assertImportAttribute=_ve;B.assertImportDeclaration=cve;B.assertImportDefaultSpecifier=uve;B.assertImportExpression=pve;B.assertImportNamespaceSpecifier=dve;B.assertImportOrExportDeclaration=gCe;B.assertImportSpecifier=fve;B.assertIndexedAccessType=$Se;B.assertInferredPredicate=aSe;B.assertInterfaceDeclaration=sSe;B.assertInterfaceExtends=nSe;B.assertInterfaceTypeAnnotation=iSe;B.assertInterpreterDirective=n0e;B.assertIntersectionTypeAnnotation=oSe;B.assertJSX=ICe;B.assertJSXAttribute=KSe;B.assertJSXClosingElement=WSe;B.assertJSXClosingFragment=oTe;B.assertJSXElement=XSe;B.assertJSXEmptyExpression=YSe;B.assertJSXExpressionContainer=JSe;B.assertJSXFragment=sTe;B.assertJSXIdentifier=ZSe;B.assertJSXMemberExpression=eTe;B.assertJSXNamespacedName=tTe;B.assertJSXOpeningElement=rTe;B.assertJSXOpeningFragment=iTe;B.assertJSXSpreadAttribute=aTe;B.assertJSXSpreadChild=QSe;B.assertJSXText=nTe;B.assertLVal=sCe;B.assertLabeledStatement=C0e;B.assertLiteral=oCe;B.assertLogicalExpression=L0e;B.assertLoop=Wwe;B.assertMemberExpression=R0e;B.assertMetaProperty=mve;B.assertMethod=uCe;B.assertMiscellaneous=NCe;B.assertMixedTypeAnnotation=lSe;B.assertModuleDeclaration=BCe;B.assertModuleExpression=bTe;B.assertModuleSpecifier=xCe;B.assertNewExpression=k0e;B.assertNoop=lTe;B.assertNullLiteral=A0e;B.assertNullLiteralTypeAnnotation=jve;B.assertNullableTypeAnnotation=uSe;B.assertNumberLiteral=DCe;B.assertNumberLiteralTypeAnnotation=dSe;B.assertNumberTypeAnnotation=fSe;B.assertNumericLiteral=P0e;B.assertObjectExpression=D0e;B.assertObjectMember=dCe;B.assertObjectMethod=_0e;B.assertObjectPattern=gve;B.assertObjectProperty=O0e;B.assertObjectTypeAnnotation=pSe;B.assertObjectTypeCallProperty=hSe;B.assertObjectTypeIndexer=gSe;B.assertObjectTypeInternalSlot=mSe;B.assertObjectTypeProperty=ySe;B.assertObjectTypeSpreadProperty=xSe;B.assertOpaqueType=bSe;B.assertOptionalCallExpression=Ive;B.assertOptionalIndexedAccessType=GSe;B.assertOptionalMemberExpression=Ave;B.assertParenthesizedExpression=j0e;B.assertPattern=mCe;B.assertPatternLike=nCe;B.assertPipelineBareFunction=TTe;B.assertPipelinePrimaryTopicReference=wTe;B.assertPipelineTopicExpression=STe;B.assertPlaceholder=cTe;B.assertPrivate=vCe;B.assertPrivateName=Mve;B.assertProgram=M0e;B.assertProperty=fCe;B.assertPureish=tCe;B.assertQualifiedTypeIdentifier=vSe;B.assertRecordExpression=gTe;B.assertRegExpLiteral=N0e;B.assertRegexLiteral=_Ce;B.assertRestElement=F0e;B.assertRestProperty=OCe;B.assertReturnStatement=B0e;B.assertScopable=zwe;B.assertSequenceExpression=U0e;B.assertSpreadElement=yve;B.assertSpreadProperty=FCe;B.assertStandardized=Bwe;B.assertStatement=Hwe;B.assertStaticBlock=Dve;B.assertStringLiteral=E0e;B.assertStringLiteralTypeAnnotation=SSe;B.assertStringTypeAnnotation=TSe;B.assertSuper=xve;B.assertSwitchCase=z0e;B.assertSwitchStatement=V0e;B.assertSymbolTypeAnnotation=wSe;B.assertTSAnyKeyword=DTe;B.assertTSArrayType=ewe;B.assertTSAsExpression=vwe;B.assertTSBaseType=MCe;B.assertTSBigIntKeyword=OTe;B.assertTSBooleanKeyword=_Te;B.assertTSCallSignatureDeclaration=NTe;B.assertTSConditionalType=owe;B.assertTSConstructSignatureDeclaration=LTe;B.assertTSConstructorType=XTe;B.assertTSDeclareFunction=PTe;B.assertTSDeclareMethod=ATe;B.assertTSEntityName=iCe;B.assertTSEnumBody=wwe;B.assertTSEnumDeclaration=Cwe;B.assertTSEnumMember=Ewe;B.assertTSExportAssignment=kwe;B.assertTSExpressionWithTypeArguments=hwe;B.assertTSExternalModuleReference=Lwe;B.assertTSFunctionType=WTe;B.assertTSImportEqualsDeclaration=Nwe;B.assertTSImportType=Iwe;B.assertTSIndexSignature=MTe;B.assertTSIndexedAccessType=dwe;B.assertTSInferType=lwe;B.assertTSInstantiationExpression=bwe;B.assertTSInterfaceBody=ywe;B.assertTSInterfaceDeclaration=gwe;B.assertTSIntersectionType=iwe;B.assertTSIntrinsicKeyword=FTe;B.assertTSLiteralType=mwe;B.assertTSMappedType=fwe;B.assertTSMethodSignature=kTe;B.assertTSModuleBlock=Awe;B.assertTSModuleDeclaration=Pwe;B.assertTSNamedTupleMember=nwe;B.assertTSNamespaceExportDeclaration=Mwe;B.assertTSNeverKeyword=BTe;B.assertTSNonNullExpression=Rwe;B.assertTSNullKeyword=UTe;B.assertTSNumberKeyword=jTe;B.assertTSObjectKeyword=zTe;B.assertTSOptionalType=rwe;B.assertTSParameterProperty=ETe;B.assertTSParenthesizedType=cwe;B.assertTSPropertySignature=RTe;B.assertTSQualifiedName=ITe;B.assertTSRestType=awe;B.assertTSSatisfiesExpression=Swe;B.assertTSStringKeyword=VTe;B.assertTSSymbolKeyword=qTe;B.assertTSTemplateLiteralType=pwe;B.assertTSThisType=KTe;B.assertTSTupleType=twe;B.assertTSType=kCe;B.assertTSTypeAliasDeclaration=xwe;B.assertTSTypeAnnotation=Dwe;B.assertTSTypeAssertion=Twe;B.assertTSTypeElement=RCe;B.assertTSTypeLiteral=ZTe;B.assertTSTypeOperator=uwe;B.assertTSTypeParameter=Fwe;B.assertTSTypeParameterDeclaration=Owe;B.assertTSTypeParameterInstantiation=_we;B.assertTSTypePredicate=JTe;B.assertTSTypeQuery=QTe;B.assertTSTypeReference=YTe;B.assertTSUndefinedKeyword=HTe;B.assertTSUnionType=swe;B.assertTSUnknownKeyword=$Te;B.assertTSVoidKeyword=GTe;B.assertTaggedTemplateExpression=bve;B.assertTemplateElement=vve;B.assertTemplateLiteral=Sve;B.assertTerminatorless=$we;B.assertThisExpression=q0e;B.assertThisTypeAnnotation=CSe;B.assertThrowStatement=H0e;B.assertTopicReference=vTe;B.assertTryStatement=$0e;B.assertTupleExpression=yTe;B.assertTupleTypeAnnotation=ESe;B.assertTypeAlias=ASe;B.assertTypeAnnotation=ISe;B.assertTypeCastExpression=NSe;B.assertTypeParameter=LSe;B.assertTypeParameterDeclaration=RSe;B.assertTypeParameterInstantiation=kSe;B.assertTypeScript=LCe;B.assertTypeofTypeAnnotation=PSe;B.assertUnaryExpression=G0e;B.assertUnaryLike=pCe;B.assertUnionTypeAnnotation=MSe;B.assertUpdateExpression=K0e;B.assertUserWhitespacable=cCe;B.assertV8IntrinsicIdentifier=uTe;B.assertVariableDeclaration=W0e;B.assertVariableDeclarator=X0e;B.assertVariance=DSe;B.assertVoidPattern=CTe;B.assertVoidTypeAnnotation=_Se;B.assertWhile=Xwe;B.assertWhileStatement=Y0e;B.assertWithStatement=J0e;B.assertYieldExpression=Tve;var e0e=Ng(),C0=Ig();function U(e,t,r){if(!(0,e0e.default)(e,t,r))throw new Error(`Expected type "${e}" with option ${JSON.stringify(r)}, but instead got "${t.type}".`)}function t0e(e,t){U("ArrayExpression",e,t)}function r0e(e,t){U("AssignmentExpression",e,t)}function a0e(e,t){U("BinaryExpression",e,t)}function n0e(e,t){U("InterpreterDirective",e,t)}function s0e(e,t){U("Directive",e,t)}function i0e(e,t){U("DirectiveLiteral",e,t)}function o0e(e,t){U("BlockStatement",e,t)}function l0e(e,t){U("BreakStatement",e,t)}function c0e(e,t){U("CallExpression",e,t)}function u0e(e,t){U("CatchClause",e,t)}function d0e(e,t){U("ConditionalExpression",e,t)}function f0e(e,t){U("ContinueStatement",e,t)}function p0e(e,t){U("DebuggerStatement",e,t)}function m0e(e,t){U("DoWhileStatement",e,t)}function h0e(e,t){U("EmptyStatement",e,t)}function g0e(e,t){U("ExpressionStatement",e,t)}function y0e(e,t){U("File",e,t)}function x0e(e,t){U("ForInStatement",e,t)}function b0e(e,t){U("ForStatement",e,t)}function v0e(e,t){U("FunctionDeclaration",e,t)}function S0e(e,t){U("FunctionExpression",e,t)}function T0e(e,t){U("Identifier",e,t)}function w0e(e,t){U("IfStatement",e,t)}function C0e(e,t){U("LabeledStatement",e,t)}function E0e(e,t){U("StringLiteral",e,t)}function P0e(e,t){U("NumericLiteral",e,t)}function A0e(e,t){U("NullLiteral",e,t)}function I0e(e,t){U("BooleanLiteral",e,t)}function N0e(e,t){U("RegExpLiteral",e,t)}function L0e(e,t){U("LogicalExpression",e,t)}function R0e(e,t){U("MemberExpression",e,t)}function k0e(e,t){U("NewExpression",e,t)}function M0e(e,t){U("Program",e,t)}function D0e(e,t){U("ObjectExpression",e,t)}function _0e(e,t){U("ObjectMethod",e,t)}function O0e(e,t){U("ObjectProperty",e,t)}function F0e(e,t){U("RestElement",e,t)}function B0e(e,t){U("ReturnStatement",e,t)}function U0e(e,t){U("SequenceExpression",e,t)}function j0e(e,t){U("ParenthesizedExpression",e,t)}function z0e(e,t){U("SwitchCase",e,t)}function V0e(e,t){U("SwitchStatement",e,t)}function q0e(e,t){U("ThisExpression",e,t)}function H0e(e,t){U("ThrowStatement",e,t)}function $0e(e,t){U("TryStatement",e,t)}function G0e(e,t){U("UnaryExpression",e,t)}function K0e(e,t){U("UpdateExpression",e,t)}function W0e(e,t){U("VariableDeclaration",e,t)}function X0e(e,t){U("VariableDeclarator",e,t)}function Y0e(e,t){U("WhileStatement",e,t)}function J0e(e,t){U("WithStatement",e,t)}function Q0e(e,t){U("AssignmentPattern",e,t)}function Z0e(e,t){U("ArrayPattern",e,t)}function eve(e,t){U("ArrowFunctionExpression",e,t)}function tve(e,t){U("ClassBody",e,t)}function rve(e,t){U("ClassExpression",e,t)}function ave(e,t){U("ClassDeclaration",e,t)}function nve(e,t){U("ExportAllDeclaration",e,t)}function sve(e,t){U("ExportDefaultDeclaration",e,t)}function ive(e,t){U("ExportNamedDeclaration",e,t)}function ove(e,t){U("ExportSpecifier",e,t)}function lve(e,t){U("ForOfStatement",e,t)}function cve(e,t){U("ImportDeclaration",e,t)}function uve(e,t){U("ImportDefaultSpecifier",e,t)}function dve(e,t){U("ImportNamespaceSpecifier",e,t)}function fve(e,t){U("ImportSpecifier",e,t)}function pve(e,t){U("ImportExpression",e,t)}function mve(e,t){U("MetaProperty",e,t)}function hve(e,t){U("ClassMethod",e,t)}function gve(e,t){U("ObjectPattern",e,t)}function yve(e,t){U("SpreadElement",e,t)}function xve(e,t){U("Super",e,t)}function bve(e,t){U("TaggedTemplateExpression",e,t)}function vve(e,t){U("TemplateElement",e,t)}function Sve(e,t){U("TemplateLiteral",e,t)}function Tve(e,t){U("YieldExpression",e,t)}function wve(e,t){U("AwaitExpression",e,t)}function Cve(e,t){U("Import",e,t)}function Eve(e,t){U("BigIntLiteral",e,t)}function Pve(e,t){U("ExportNamespaceSpecifier",e,t)}function Ave(e,t){U("OptionalMemberExpression",e,t)}function Ive(e,t){U("OptionalCallExpression",e,t)}function Nve(e,t){U("ClassProperty",e,t)}function Lve(e,t){U("ClassAccessorProperty",e,t)}function Rve(e,t){U("ClassPrivateProperty",e,t)}function kve(e,t){U("ClassPrivateMethod",e,t)}function Mve(e,t){U("PrivateName",e,t)}function Dve(e,t){U("StaticBlock",e,t)}function _ve(e,t){U("ImportAttribute",e,t)}function Ove(e,t){U("AnyTypeAnnotation",e,t)}function Fve(e,t){U("ArrayTypeAnnotation",e,t)}function Bve(e,t){U("BooleanTypeAnnotation",e,t)}function Uve(e,t){U("BooleanLiteralTypeAnnotation",e,t)}function jve(e,t){U("NullLiteralTypeAnnotation",e,t)}function zve(e,t){U("ClassImplements",e,t)}function Vve(e,t){U("DeclareClass",e,t)}function qve(e,t){U("DeclareFunction",e,t)}function Hve(e,t){U("DeclareInterface",e,t)}function $ve(e,t){U("DeclareModule",e,t)}function Gve(e,t){U("DeclareModuleExports",e,t)}function Kve(e,t){U("DeclareTypeAlias",e,t)}function Wve(e,t){U("DeclareOpaqueType",e,t)}function Xve(e,t){U("DeclareVariable",e,t)}function Yve(e,t){U("DeclareExportDeclaration",e,t)}function Jve(e,t){U("DeclareExportAllDeclaration",e,t)}function Qve(e,t){U("DeclaredPredicate",e,t)}function Zve(e,t){U("ExistsTypeAnnotation",e,t)}function eSe(e,t){U("FunctionTypeAnnotation",e,t)}function tSe(e,t){U("FunctionTypeParam",e,t)}function rSe(e,t){U("GenericTypeAnnotation",e,t)}function aSe(e,t){U("InferredPredicate",e,t)}function nSe(e,t){U("InterfaceExtends",e,t)}function sSe(e,t){U("InterfaceDeclaration",e,t)}function iSe(e,t){U("InterfaceTypeAnnotation",e,t)}function oSe(e,t){U("IntersectionTypeAnnotation",e,t)}function lSe(e,t){U("MixedTypeAnnotation",e,t)}function cSe(e,t){U("EmptyTypeAnnotation",e,t)}function uSe(e,t){U("NullableTypeAnnotation",e,t)}function dSe(e,t){U("NumberLiteralTypeAnnotation",e,t)}function fSe(e,t){U("NumberTypeAnnotation",e,t)}function pSe(e,t){U("ObjectTypeAnnotation",e,t)}function mSe(e,t){U("ObjectTypeInternalSlot",e,t)}function hSe(e,t){U("ObjectTypeCallProperty",e,t)}function gSe(e,t){U("ObjectTypeIndexer",e,t)}function ySe(e,t){U("ObjectTypeProperty",e,t)}function xSe(e,t){U("ObjectTypeSpreadProperty",e,t)}function bSe(e,t){U("OpaqueType",e,t)}function vSe(e,t){U("QualifiedTypeIdentifier",e,t)}function SSe(e,t){U("StringLiteralTypeAnnotation",e,t)}function TSe(e,t){U("StringTypeAnnotation",e,t)}function wSe(e,t){U("SymbolTypeAnnotation",e,t)}function CSe(e,t){U("ThisTypeAnnotation",e,t)}function ESe(e,t){U("TupleTypeAnnotation",e,t)}function PSe(e,t){U("TypeofTypeAnnotation",e,t)}function ASe(e,t){U("TypeAlias",e,t)}function ISe(e,t){U("TypeAnnotation",e,t)}function NSe(e,t){U("TypeCastExpression",e,t)}function LSe(e,t){U("TypeParameter",e,t)}function RSe(e,t){U("TypeParameterDeclaration",e,t)}function kSe(e,t){U("TypeParameterInstantiation",e,t)}function MSe(e,t){U("UnionTypeAnnotation",e,t)}function DSe(e,t){U("Variance",e,t)}function _Se(e,t){U("VoidTypeAnnotation",e,t)}function OSe(e,t){U("EnumDeclaration",e,t)}function FSe(e,t){U("EnumBooleanBody",e,t)}function BSe(e,t){U("EnumNumberBody",e,t)}function USe(e,t){U("EnumStringBody",e,t)}function jSe(e,t){U("EnumSymbolBody",e,t)}function zSe(e,t){U("EnumBooleanMember",e,t)}function VSe(e,t){U("EnumNumberMember",e,t)}function qSe(e,t){U("EnumStringMember",e,t)}function HSe(e,t){U("EnumDefaultedMember",e,t)}function $Se(e,t){U("IndexedAccessType",e,t)}function GSe(e,t){U("OptionalIndexedAccessType",e,t)}function KSe(e,t){U("JSXAttribute",e,t)}function WSe(e,t){U("JSXClosingElement",e,t)}function XSe(e,t){U("JSXElement",e,t)}function YSe(e,t){U("JSXEmptyExpression",e,t)}function JSe(e,t){U("JSXExpressionContainer",e,t)}function QSe(e,t){U("JSXSpreadChild",e,t)}function ZSe(e,t){U("JSXIdentifier",e,t)}function eTe(e,t){U("JSXMemberExpression",e,t)}function tTe(e,t){U("JSXNamespacedName",e,t)}function rTe(e,t){U("JSXOpeningElement",e,t)}function aTe(e,t){U("JSXSpreadAttribute",e,t)}function nTe(e,t){U("JSXText",e,t)}function sTe(e,t){U("JSXFragment",e,t)}function iTe(e,t){U("JSXOpeningFragment",e,t)}function oTe(e,t){U("JSXClosingFragment",e,t)}function lTe(e,t){U("Noop",e,t)}function cTe(e,t){U("Placeholder",e,t)}function uTe(e,t){U("V8IntrinsicIdentifier",e,t)}function dTe(e,t){U("ArgumentPlaceholder",e,t)}function fTe(e,t){U("BindExpression",e,t)}function pTe(e,t){U("Decorator",e,t)}function mTe(e,t){U("DoExpression",e,t)}function hTe(e,t){U("ExportDefaultSpecifier",e,t)}function gTe(e,t){U("RecordExpression",e,t)}function yTe(e,t){U("TupleExpression",e,t)}function xTe(e,t){U("DecimalLiteral",e,t)}function bTe(e,t){U("ModuleExpression",e,t)}function vTe(e,t){U("TopicReference",e,t)}function STe(e,t){U("PipelineTopicExpression",e,t)}function TTe(e,t){U("PipelineBareFunction",e,t)}function wTe(e,t){U("PipelinePrimaryTopicReference",e,t)}function CTe(e,t){U("VoidPattern",e,t)}function ETe(e,t){U("TSParameterProperty",e,t)}function PTe(e,t){U("TSDeclareFunction",e,t)}function ATe(e,t){U("TSDeclareMethod",e,t)}function ITe(e,t){U("TSQualifiedName",e,t)}function NTe(e,t){U("TSCallSignatureDeclaration",e,t)}function LTe(e,t){U("TSConstructSignatureDeclaration",e,t)}function RTe(e,t){U("TSPropertySignature",e,t)}function kTe(e,t){U("TSMethodSignature",e,t)}function MTe(e,t){U("TSIndexSignature",e,t)}function DTe(e,t){U("TSAnyKeyword",e,t)}function _Te(e,t){U("TSBooleanKeyword",e,t)}function OTe(e,t){U("TSBigIntKeyword",e,t)}function FTe(e,t){U("TSIntrinsicKeyword",e,t)}function BTe(e,t){U("TSNeverKeyword",e,t)}function UTe(e,t){U("TSNullKeyword",e,t)}function jTe(e,t){U("TSNumberKeyword",e,t)}function zTe(e,t){U("TSObjectKeyword",e,t)}function VTe(e,t){U("TSStringKeyword",e,t)}function qTe(e,t){U("TSSymbolKeyword",e,t)}function HTe(e,t){U("TSUndefinedKeyword",e,t)}function $Te(e,t){U("TSUnknownKeyword",e,t)}function GTe(e,t){U("TSVoidKeyword",e,t)}function KTe(e,t){U("TSThisType",e,t)}function WTe(e,t){U("TSFunctionType",e,t)}function XTe(e,t){U("TSConstructorType",e,t)}function YTe(e,t){U("TSTypeReference",e,t)}function JTe(e,t){U("TSTypePredicate",e,t)}function QTe(e,t){U("TSTypeQuery",e,t)}function ZTe(e,t){U("TSTypeLiteral",e,t)}function ewe(e,t){U("TSArrayType",e,t)}function twe(e,t){U("TSTupleType",e,t)}function rwe(e,t){U("TSOptionalType",e,t)}function awe(e,t){U("TSRestType",e,t)}function nwe(e,t){U("TSNamedTupleMember",e,t)}function swe(e,t){U("TSUnionType",e,t)}function iwe(e,t){U("TSIntersectionType",e,t)}function owe(e,t){U("TSConditionalType",e,t)}function lwe(e,t){U("TSInferType",e,t)}function cwe(e,t){U("TSParenthesizedType",e,t)}function uwe(e,t){U("TSTypeOperator",e,t)}function dwe(e,t){U("TSIndexedAccessType",e,t)}function fwe(e,t){U("TSMappedType",e,t)}function pwe(e,t){U("TSTemplateLiteralType",e,t)}function mwe(e,t){U("TSLiteralType",e,t)}function hwe(e,t){U("TSExpressionWithTypeArguments",e,t)}function gwe(e,t){U("TSInterfaceDeclaration",e,t)}function ywe(e,t){U("TSInterfaceBody",e,t)}function xwe(e,t){U("TSTypeAliasDeclaration",e,t)}function bwe(e,t){U("TSInstantiationExpression",e,t)}function vwe(e,t){U("TSAsExpression",e,t)}function Swe(e,t){U("TSSatisfiesExpression",e,t)}function Twe(e,t){U("TSTypeAssertion",e,t)}function wwe(e,t){U("TSEnumBody",e,t)}function Cwe(e,t){U("TSEnumDeclaration",e,t)}function Ewe(e,t){U("TSEnumMember",e,t)}function Pwe(e,t){U("TSModuleDeclaration",e,t)}function Awe(e,t){U("TSModuleBlock",e,t)}function Iwe(e,t){U("TSImportType",e,t)}function Nwe(e,t){U("TSImportEqualsDeclaration",e,t)}function Lwe(e,t){U("TSExternalModuleReference",e,t)}function Rwe(e,t){U("TSNonNullExpression",e,t)}function kwe(e,t){U("TSExportAssignment",e,t)}function Mwe(e,t){U("TSNamespaceExportDeclaration",e,t)}function Dwe(e,t){U("TSTypeAnnotation",e,t)}function _we(e,t){U("TSTypeParameterInstantiation",e,t)}function Owe(e,t){U("TSTypeParameterDeclaration",e,t)}function Fwe(e,t){U("TSTypeParameter",e,t)}function Bwe(e,t){U("Standardized",e,t)}function Uwe(e,t){U("Expression",e,t)}function jwe(e,t){U("Binary",e,t)}function zwe(e,t){U("Scopable",e,t)}function Vwe(e,t){U("BlockParent",e,t)}function qwe(e,t){U("Block",e,t)}function Hwe(e,t){U("Statement",e,t)}function $we(e,t){U("Terminatorless",e,t)}function Gwe(e,t){U("CompletionStatement",e,t)}function Kwe(e,t){U("Conditional",e,t)}function Wwe(e,t){U("Loop",e,t)}function Xwe(e,t){U("While",e,t)}function Ywe(e,t){U("ExpressionWrapper",e,t)}function Jwe(e,t){U("For",e,t)}function Qwe(e,t){U("ForXStatement",e,t)}function Zwe(e,t){U("Function",e,t)}function eCe(e,t){U("FunctionParent",e,t)}function tCe(e,t){U("Pureish",e,t)}function rCe(e,t){U("Declaration",e,t)}function aCe(e,t){U("FunctionParameter",e,t)}function nCe(e,t){U("PatternLike",e,t)}function sCe(e,t){U("LVal",e,t)}function iCe(e,t){U("TSEntityName",e,t)}function oCe(e,t){U("Literal",e,t)}function lCe(e,t){U("Immutable",e,t)}function cCe(e,t){U("UserWhitespacable",e,t)}function uCe(e,t){U("Method",e,t)}function dCe(e,t){U("ObjectMember",e,t)}function fCe(e,t){U("Property",e,t)}function pCe(e,t){U("UnaryLike",e,t)}function mCe(e,t){U("Pattern",e,t)}function hCe(e,t){U("Class",e,t)}function gCe(e,t){U("ImportOrExportDeclaration",e,t)}function yCe(e,t){U("ExportDeclaration",e,t)}function xCe(e,t){U("ModuleSpecifier",e,t)}function bCe(e,t){U("Accessor",e,t)}function vCe(e,t){U("Private",e,t)}function SCe(e,t){U("Flow",e,t)}function TCe(e,t){U("FlowType",e,t)}function wCe(e,t){U("FlowBaseAnnotation",e,t)}function CCe(e,t){U("FlowDeclaration",e,t)}function ECe(e,t){U("FlowPredicate",e,t)}function PCe(e,t){U("EnumBody",e,t)}function ACe(e,t){U("EnumMember",e,t)}function ICe(e,t){U("JSX",e,t)}function NCe(e,t){U("Miscellaneous",e,t)}function LCe(e,t){U("TypeScript",e,t)}function RCe(e,t){U("TSTypeElement",e,t)}function kCe(e,t){U("TSType",e,t)}function MCe(e,t){U("TSBaseType",e,t)}function DCe(e,t){(0,C0.default)("assertNumberLiteral","assertNumericLiteral"),U("NumberLiteral",e,t)}function _Ce(e,t){(0,C0.default)("assertRegexLiteral","assertRegExpLiteral"),U("RegexLiteral",e,t)}function OCe(e,t){(0,C0.default)("assertRestProperty","assertRestElement"),U("RestProperty",e,t)}function FCe(e,t){(0,C0.default)("assertSpreadProperty","assertSpreadElement"),U("SpreadProperty",e,t)}function BCe(e,t){(0,C0.default)("assertModuleDeclaration","assertImportOrExportDeclaration"),U("ModuleDeclaration",e,t)}});var p8=ne(zw=>{"use strict";Object.defineProperty(zw,"__esModule",{value:!0});zw.default=void 0;var ql=zi(),fit=zw.default=UCe;function UCe(e){switch(e){case"string":return(0,ql.stringTypeAnnotation)();case"number":return(0,ql.numberTypeAnnotation)();case"undefined":return(0,ql.voidTypeAnnotation)();case"boolean":return(0,ql.booleanTypeAnnotation)();case"function":return(0,ql.genericTypeAnnotation)((0,ql.identifier)("Function"));case"object":return(0,ql.genericTypeAnnotation)((0,ql.identifier)("Object"));case"symbol":return(0,ql.genericTypeAnnotation)((0,ql.identifier)("Symbol"));case"bigint":return(0,ql.anyTypeAnnotation)()}throw new Error("Invalid typeof value: "+e)}});var CL=ne(wL=>{"use strict";Object.defineProperty(wL,"__esModule",{value:!0});wL.default=h8;var E0=on();function m8(e){return(0,E0.isIdentifier)(e)?e.name:`${e.id.name}.${m8(e.qualification)}`}function h8(e){let t=Array.from(e),r=new Map,a=new Map,n=new Set,s=[];for(let i=0;i<t.length;i++){let o=t[i];if(o&&!s.includes(o)){if((0,E0.isAnyTypeAnnotation)(o))return[o];if((0,E0.isFlowBaseAnnotation)(o)){a.set(o.type,o);continue}if((0,E0.isUnionTypeAnnotation)(o)){n.has(o.types)||(t.push(...o.types),n.add(o.types));continue}if((0,E0.isGenericTypeAnnotation)(o)){let l=m8(o.id);if(r.has(l)){let c=r.get(l);c.typeParameters?o.typeParameters&&(c.typeParameters.params.push(...o.typeParameters.params),c.typeParameters.params=h8(c.typeParameters.params)):c=o.typeParameters}else r.set(l,o);continue}s.push(o)}}for(let[,i]of a)s.push(i);for(let[,i]of r)s.push(i);return s}});var g8=ne(EL=>{"use strict";Object.defineProperty(EL,"__esModule",{value:!0});EL.default=VCe;var jCe=zi(),zCe=CL();function VCe(e){let t=(0,zCe.default)(e);return t.length===1?t[0]:(0,jCe.unionTypeAnnotation)(t)}});var b8=ne(PL=>{"use strict";Object.defineProperty(PL,"__esModule",{value:!0});PL.default=x8;var Og=on();function y8(e){return(0,Og.isIdentifier)(e)?e.name:(0,Og.isThisExpression)(e)?"this":`${e.right.name}.${y8(e.left)}`}function x8(e){let t=Array.from(e),r=new Map,a=new Map,n=new Set,s=[];for(let i=0;i<t.length;i++){let o=t[i];if(!o||s.includes(o))continue;if((0,Og.isTSAnyKeyword)(o))return[o];if((0,Og.isTSBaseType)(o)){a.set(o.type,o);continue}if((0,Og.isTSUnionType)(o)){n.has(o.types)||(t.push(...o.types),n.add(o.types));continue}let l="typeParameters";if((0,Og.isTSTypeReference)(o)&&o[l]){let c=o[l],u=y8(o.typeName);if(r.has(u)){let d=r.get(u),f=d[l];f?(f.params.push(...c.params),f.params=x8(f.params)):d=c}else r.set(u,o);continue}s.push(o)}for(let[,i]of a)s.push(i);for(let[,i]of r)s.push(i);return s}});var v8=ne(AL=>{"use strict";Object.defineProperty(AL,"__esModule",{value:!0});AL.default=GCe;var qCe=zi(),HCe=b8(),$Ce=on();function GCe(e){let t=e.map(a=>(0,$Ce.isTSTypeAnnotation)(a)?a.typeAnnotation:a),r=(0,HCe.default)(t);return r.length===1?r[0]:(0,qCe.tsUnionType)(r)}});var NL=ne(IL=>{"use strict";Object.defineProperty(IL,"__esModule",{value:!0});IL.buildUndefinedNode=KCe;var S8=zi();function KCe(){return(0,S8.unaryExpression)("void",(0,S8.numericLiteral)(0),!0)}});var Zd=ne(RL=>{"use strict";Object.defineProperty(RL,"__esModule",{value:!0});RL.default=WCe;var T8=Jo(),w8=on(),{hasOwn:Ac}={hasOwn:Function.call.bind(Object.prototype.hasOwnProperty)};function C8(e,t,r,a){return e&&typeof e.type=="string"?E8(e,t,r,a):e}function LL(e,t,r,a){return Array.isArray(e)?e.map(n=>C8(n,t,r,a)):C8(e,t,r,a)}function WCe(e,t=!0,r=!1){return E8(e,t,r,new Map)}function E8(e,t=!0,r=!1,a){if(!e)return e;let{type:n}=e,s={type:e.type};if((0,w8.isIdentifier)(e))s.name=e.name,Ac(e,"optional")&&typeof e.optional=="boolean"&&(s.optional=e.optional),Ac(e,"typeAnnotation")&&(s.typeAnnotation=t?LL(e.typeAnnotation,!0,r,a):e.typeAnnotation),Ac(e,"decorators")&&(s.decorators=t?LL(e.decorators,!0,r,a):e.decorators);else if(Ac(T8.NODE_FIELDS,n))for(let i of Object.keys(T8.NODE_FIELDS[n]))Ac(e,i)&&(t?s[i]=(0,w8.isFile)(e)&&i==="comments"?Vw(e.comments,t,r,a):LL(e[i],!0,r,a):s[i]=e[i]);else throw new Error(`Unknown node type: "${n}"`);return Ac(e,"loc")&&(r?s.loc=null:s.loc=e.loc),Ac(e,"leadingComments")&&(s.leadingComments=Vw(e.leadingComments,t,r,a)),Ac(e,"innerComments")&&(s.innerComments=Vw(e.innerComments,t,r,a)),Ac(e,"trailingComments")&&(s.trailingComments=Vw(e.trailingComments,t,r,a)),Ac(e,"extra")&&(s.extra=Object.assign({},e.extra)),s}function Vw(e,t,r,a){return!e||!t?e:e.map(n=>{let s=a.get(n);if(s)return s;let{type:i,value:o,loc:l}=n,c={type:i,value:o,loc:l};return r&&(c.loc=null),a.set(n,c),c})}});var P8=ne(kL=>{"use strict";Object.defineProperty(kL,"__esModule",{value:!0});kL.default=YCe;var XCe=Zd();function YCe(e){return(0,XCe.default)(e,!1)}});var A8=ne(ML=>{"use strict";Object.defineProperty(ML,"__esModule",{value:!0});ML.default=QCe;var JCe=Zd();function QCe(e){return(0,JCe.default)(e)}});var I8=ne(DL=>{"use strict";Object.defineProperty(DL,"__esModule",{value:!0});DL.default=e1e;var ZCe=Zd();function e1e(e){return(0,ZCe.default)(e,!0,!0)}});var N8=ne(_L=>{"use strict";Object.defineProperty(_L,"__esModule",{value:!0});_L.default=r1e;var t1e=Zd();function r1e(e){return(0,t1e.default)(e,!1,!0)}});var FL=ne(OL=>{"use strict";Object.defineProperty(OL,"__esModule",{value:!0});OL.default=a1e;function a1e(e,t,r){if(!r||!e)return e;let a=`${t}Comments`;return e[a]?t==="leading"?e[a]=r.concat(e[a]):e[a].push(...r):e[a]=r,e}});var L8=ne(BL=>{"use strict";Object.defineProperty(BL,"__esModule",{value:!0});BL.default=s1e;var n1e=FL();function s1e(e,t,r,a){return(0,n1e.default)(e,t,[{type:a?"CommentLine":"CommentBlock",value:r}])}});var qw=ne(UL=>{"use strict";Object.defineProperty(UL,"__esModule",{value:!0});UL.default=i1e;function i1e(e,t,r){t&&r&&(t[e]=Array.from(new Set([].concat(t[e],r[e]).filter(Boolean))))}});var zL=ne(jL=>{"use strict";Object.defineProperty(jL,"__esModule",{value:!0});jL.default=l1e;var o1e=qw();function l1e(e,t){(0,o1e.default)("innerComments",e,t)}});var qL=ne(VL=>{"use strict";Object.defineProperty(VL,"__esModule",{value:!0});VL.default=u1e;var c1e=qw();function u1e(e,t){(0,c1e.default)("leadingComments",e,t)}});var $L=ne(HL=>{"use strict";Object.defineProperty(HL,"__esModule",{value:!0});HL.default=f1e;var d1e=qw();function f1e(e,t){(0,d1e.default)("trailingComments",e,t)}});var KL=ne(GL=>{"use strict";Object.defineProperty(GL,"__esModule",{value:!0});GL.default=g1e;var p1e=$L(),m1e=qL(),h1e=zL();function g1e(e,t){return(0,p1e.default)(e,t),(0,m1e.default)(e,t),(0,h1e.default)(e,t),e}});var R8=ne(WL=>{"use strict";Object.defineProperty(WL,"__esModule",{value:!0});WL.default=x1e;var y1e=Rg();function x1e(e){return y1e.COMMENT_KEYS.forEach(t=>{e[t]=null}),e}});var k8=ne(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.WHILE_TYPES=Ue.USERWHITESPACABLE_TYPES=Ue.UNARYLIKE_TYPES=Ue.TYPESCRIPT_TYPES=Ue.TSTYPE_TYPES=Ue.TSTYPEELEMENT_TYPES=Ue.TSENTITYNAME_TYPES=Ue.TSBASETYPE_TYPES=Ue.TERMINATORLESS_TYPES=Ue.STATEMENT_TYPES=Ue.STANDARDIZED_TYPES=Ue.SCOPABLE_TYPES=Ue.PUREISH_TYPES=Ue.PROPERTY_TYPES=Ue.PRIVATE_TYPES=Ue.PATTERN_TYPES=Ue.PATTERNLIKE_TYPES=Ue.OBJECTMEMBER_TYPES=Ue.MODULESPECIFIER_TYPES=Ue.MODULEDECLARATION_TYPES=Ue.MISCELLANEOUS_TYPES=Ue.METHOD_TYPES=Ue.LVAL_TYPES=Ue.LOOP_TYPES=Ue.LITERAL_TYPES=Ue.JSX_TYPES=Ue.IMPORTOREXPORTDECLARATION_TYPES=Ue.IMMUTABLE_TYPES=Ue.FUNCTION_TYPES=Ue.FUNCTIONPARENT_TYPES=Ue.FUNCTIONPARAMETER_TYPES=Ue.FOR_TYPES=Ue.FORXSTATEMENT_TYPES=Ue.FLOW_TYPES=Ue.FLOWTYPE_TYPES=Ue.FLOWPREDICATE_TYPES=Ue.FLOWDECLARATION_TYPES=Ue.FLOWBASEANNOTATION_TYPES=Ue.EXPRESSION_TYPES=Ue.EXPRESSIONWRAPPER_TYPES=Ue.EXPORTDECLARATION_TYPES=Ue.ENUMMEMBER_TYPES=Ue.ENUMBODY_TYPES=Ue.DECLARATION_TYPES=Ue.CONDITIONAL_TYPES=Ue.COMPLETIONSTATEMENT_TYPES=Ue.CLASS_TYPES=Ue.BLOCK_TYPES=Ue.BLOCKPARENT_TYPES=Ue.BINARY_TYPES=Ue.ACCESSOR_TYPES=void 0;var Kt=Jo(),kit=Ue.STANDARDIZED_TYPES=Kt.FLIPPED_ALIAS_KEYS.Standardized,Mit=Ue.EXPRESSION_TYPES=Kt.FLIPPED_ALIAS_KEYS.Expression,Dit=Ue.BINARY_TYPES=Kt.FLIPPED_ALIAS_KEYS.Binary,_it=Ue.SCOPABLE_TYPES=Kt.FLIPPED_ALIAS_KEYS.Scopable,Oit=Ue.BLOCKPARENT_TYPES=Kt.FLIPPED_ALIAS_KEYS.BlockParent,Fit=Ue.BLOCK_TYPES=Kt.FLIPPED_ALIAS_KEYS.Block,Bit=Ue.STATEMENT_TYPES=Kt.FLIPPED_ALIAS_KEYS.Statement,Uit=Ue.TERMINATORLESS_TYPES=Kt.FLIPPED_ALIAS_KEYS.Terminatorless,jit=Ue.COMPLETIONSTATEMENT_TYPES=Kt.FLIPPED_ALIAS_KEYS.CompletionStatement,zit=Ue.CONDITIONAL_TYPES=Kt.FLIPPED_ALIAS_KEYS.Conditional,Vit=Ue.LOOP_TYPES=Kt.FLIPPED_ALIAS_KEYS.Loop,qit=Ue.WHILE_TYPES=Kt.FLIPPED_ALIAS_KEYS.While,Hit=Ue.EXPRESSIONWRAPPER_TYPES=Kt.FLIPPED_ALIAS_KEYS.ExpressionWrapper,$it=Ue.FOR_TYPES=Kt.FLIPPED_ALIAS_KEYS.For,Git=Ue.FORXSTATEMENT_TYPES=Kt.FLIPPED_ALIAS_KEYS.ForXStatement,Kit=Ue.FUNCTION_TYPES=Kt.FLIPPED_ALIAS_KEYS.Function,Wit=Ue.FUNCTIONPARENT_TYPES=Kt.FLIPPED_ALIAS_KEYS.FunctionParent,Xit=Ue.PUREISH_TYPES=Kt.FLIPPED_ALIAS_KEYS.Pureish,Yit=Ue.DECLARATION_TYPES=Kt.FLIPPED_ALIAS_KEYS.Declaration,Jit=Ue.FUNCTIONPARAMETER_TYPES=Kt.FLIPPED_ALIAS_KEYS.FunctionParameter,Qit=Ue.PATTERNLIKE_TYPES=Kt.FLIPPED_ALIAS_KEYS.PatternLike,Zit=Ue.LVAL_TYPES=Kt.FLIPPED_ALIAS_KEYS.LVal,eot=Ue.TSENTITYNAME_TYPES=Kt.FLIPPED_ALIAS_KEYS.TSEntityName,tot=Ue.LITERAL_TYPES=Kt.FLIPPED_ALIAS_KEYS.Literal,rot=Ue.IMMUTABLE_TYPES=Kt.FLIPPED_ALIAS_KEYS.Immutable,aot=Ue.USERWHITESPACABLE_TYPES=Kt.FLIPPED_ALIAS_KEYS.UserWhitespacable,not=Ue.METHOD_TYPES=Kt.FLIPPED_ALIAS_KEYS.Method,sot=Ue.OBJECTMEMBER_TYPES=Kt.FLIPPED_ALIAS_KEYS.ObjectMember,iot=Ue.PROPERTY_TYPES=Kt.FLIPPED_ALIAS_KEYS.Property,oot=Ue.UNARYLIKE_TYPES=Kt.FLIPPED_ALIAS_KEYS.UnaryLike,lot=Ue.PATTERN_TYPES=Kt.FLIPPED_ALIAS_KEYS.Pattern,cot=Ue.CLASS_TYPES=Kt.FLIPPED_ALIAS_KEYS.Class,b1e=Ue.IMPORTOREXPORTDECLARATION_TYPES=Kt.FLIPPED_ALIAS_KEYS.ImportOrExportDeclaration,uot=Ue.EXPORTDECLARATION_TYPES=Kt.FLIPPED_ALIAS_KEYS.ExportDeclaration,dot=Ue.MODULESPECIFIER_TYPES=Kt.FLIPPED_ALIAS_KEYS.ModuleSpecifier,fot=Ue.ACCESSOR_TYPES=Kt.FLIPPED_ALIAS_KEYS.Accessor,pot=Ue.PRIVATE_TYPES=Kt.FLIPPED_ALIAS_KEYS.Private,mot=Ue.FLOW_TYPES=Kt.FLIPPED_ALIAS_KEYS.Flow,hot=Ue.FLOWTYPE_TYPES=Kt.FLIPPED_ALIAS_KEYS.FlowType,got=Ue.FLOWBASEANNOTATION_TYPES=Kt.FLIPPED_ALIAS_KEYS.FlowBaseAnnotation,yot=Ue.FLOWDECLARATION_TYPES=Kt.FLIPPED_ALIAS_KEYS.FlowDeclaration,xot=Ue.FLOWPREDICATE_TYPES=Kt.FLIPPED_ALIAS_KEYS.FlowPredicate,bot=Ue.ENUMBODY_TYPES=Kt.FLIPPED_ALIAS_KEYS.EnumBody,vot=Ue.ENUMMEMBER_TYPES=Kt.FLIPPED_ALIAS_KEYS.EnumMember,Sot=Ue.JSX_TYPES=Kt.FLIPPED_ALIAS_KEYS.JSX,Tot=Ue.MISCELLANEOUS_TYPES=Kt.FLIPPED_ALIAS_KEYS.Miscellaneous,wot=Ue.TYPESCRIPT_TYPES=Kt.FLIPPED_ALIAS_KEYS.TypeScript,Cot=Ue.TSTYPEELEMENT_TYPES=Kt.FLIPPED_ALIAS_KEYS.TSTypeElement,Eot=Ue.TSTYPE_TYPES=Kt.FLIPPED_ALIAS_KEYS.TSType,Pot=Ue.TSBASETYPE_TYPES=Kt.FLIPPED_ALIAS_KEYS.TSBaseType,Aot=Ue.MODULEDECLARATION_TYPES=b1e});var JL=ne(YL=>{"use strict";Object.defineProperty(YL,"__esModule",{value:!0});YL.default=v1e;var Hw=on(),XL=zi();function v1e(e,t){if((0,Hw.isBlockStatement)(e))return e;let r=[];return(0,Hw.isEmptyStatement)(e)?r=[]:((0,Hw.isStatement)(e)||((0,Hw.isFunction)(t)?e=(0,XL.returnStatement)(e):e=(0,XL.expressionStatement)(e)),r=[e]),(0,XL.blockStatement)(r)}});var M8=ne(QL=>{"use strict";Object.defineProperty(QL,"__esModule",{value:!0});QL.default=T1e;var S1e=JL();function T1e(e,t="body"){let r=(0,S1e.default)(e[t],e);return e[t]=r,r}});var eR=ne(ZL=>{"use strict";Object.defineProperty(ZL,"__esModule",{value:!0});ZL.default=E1e;var w1e=Lg(),C1e=y0();function E1e(e){e=e+"";let t="";for(let r of e)t+=(0,C1e.isIdentifierChar)(r.codePointAt(0))?r:"-";return t=t.replace(/^[-0-9]+/,""),t=t.replace(/[-\s]+(.)?/g,function(r,a){return a?a.toUpperCase():""}),(0,w1e.default)(t)||(t=`_${t}`),t||"_"}});var D8=ne(tR=>{"use strict";Object.defineProperty(tR,"__esModule",{value:!0});tR.default=A1e;var P1e=eR();function A1e(e){return e=(0,P1e.default)(e),(e==="eval"||e==="arguments")&&(e="_"+e),e}});var _8=ne(rR=>{"use strict";Object.defineProperty(rR,"__esModule",{value:!0});rR.default=L1e;var I1e=on(),N1e=zi();function L1e(e,t=e.key||e.property){return!e.computed&&(0,I1e.isIdentifier)(t)&&(t=(0,N1e.stringLiteral)(t.name)),t}});var O8=ne($w=>{"use strict";Object.defineProperty($w,"__esModule",{value:!0});$w.default=void 0;var P0=on(),Dot=$w.default=R1e;function R1e(e){if((0,P0.isExpressionStatement)(e)&&(e=e.expression),(0,P0.isExpression)(e))return e;if((0,P0.isClass)(e)?(e.type="ClassExpression",e.abstract=!1):(0,P0.isFunction)(e)&&(e.type="FunctionExpression"),!(0,P0.isExpression)(e))throw new Error(`cannot turn ${e.type} to an expression`);return e}});var nR=ne(aR=>{"use strict";Object.defineProperty(aR,"__esModule",{value:!0});aR.default=A0;var k1e=Jo(),F8=Symbol(),B8=Symbol();function A0(e,t,r){if(!e)return!1;let a=k1e.VISITOR_KEYS[e.type];if(!a)return!1;r=r||{};let n=t(e,r);if(n!==void 0)switch(n){case F8:return!1;case B8:return!0}for(let s of a){let i=e[s];if(i){if(Array.isArray(i)){for(let o of i)if(A0(o,t,r))return!0}else if(A0(i,t,r))return!0}}return!1}A0.skip=F8;A0.stop=B8});var iR=ne(sR=>{"use strict";Object.defineProperty(sR,"__esModule",{value:!0});sR.default=_1e;var M1e=Rg(),U8=["tokens","start","end","loc","raw","rawValue"],D1e=[...M1e.COMMENT_KEYS,"comments",...U8];function _1e(e,t={}){let r=t.preserveComments?U8:D1e;for(let n of r)e[n]!=null&&(e[n]=void 0);for(let n of Object.keys(e))n[0]==="_"&&e[n]!=null&&(e[n]=void 0);let a=Object.getOwnPropertySymbols(e);for(let n of a)e[n]=null}});var lR=ne(oR=>{"use strict";Object.defineProperty(oR,"__esModule",{value:!0});oR.default=B1e;var O1e=nR(),F1e=iR();function B1e(e,t){return(0,O1e.default)(e,F1e.default,t),e}});var z8=ne(cR=>{"use strict";Object.defineProperty(cR,"__esModule",{value:!0});cR.default=sm;var j8=on(),U1e=Zd(),j1e=lR();function sm(e,t=e.key){let r;return e.kind==="method"?sm.increment()+"":((0,j8.isIdentifier)(t)?r=t.name:(0,j8.isStringLiteral)(t)?r=JSON.stringify(t.value):r=JSON.stringify((0,j1e.default)((0,U1e.default)(t))),e.computed&&(r=`[${r}]`),e.static&&(r=`static:${r}`),r)}sm.uid=0;sm.increment=function(){return sm.uid>=Number.MAX_SAFE_INTEGER?sm.uid=0:sm.uid++}});var V8=ne(Kw=>{"use strict";Object.defineProperty(Kw,"__esModule",{value:!0});Kw.default=void 0;var Gw=on(),z1e=zi(),jot=Kw.default=V1e;function V1e(e,t){if((0,Gw.isStatement)(e))return e;let r=!1,a;if((0,Gw.isClass)(e))r=!0,a="ClassDeclaration";else if((0,Gw.isFunction)(e))r=!0,a="FunctionDeclaration";else if((0,Gw.isAssignmentExpression)(e))return(0,z1e.expressionStatement)(e);if(r&&!e.id&&(a=!1),!a){if(t)return!1;throw new Error(`cannot turn ${e.type} to a statement`)}return e.type=a,e}});var q8=ne(Ww=>{"use strict";Object.defineProperty(Ww,"__esModule",{value:!0});Ww.default=void 0;var q1e=Lg(),Rn=zi(),Vot=Ww.default=uR,H1e=Function.call.bind(Object.prototype.toString);function $1e(e){return H1e(e)==="[object RegExp]"}function G1e(e){if(typeof e!="object"||e===null||Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function uR(e){if(e===void 0)return(0,Rn.identifier)("undefined");if(e===!0||e===!1)return(0,Rn.booleanLiteral)(e);if(e===null)return(0,Rn.nullLiteral)();if(typeof e=="string")return(0,Rn.stringLiteral)(e);if(typeof e=="number"){let t;if(Number.isFinite(e))t=(0,Rn.numericLiteral)(Math.abs(e));else{let r;Number.isNaN(e)?r=(0,Rn.numericLiteral)(0):r=(0,Rn.numericLiteral)(1),t=(0,Rn.binaryExpression)("/",r,(0,Rn.numericLiteral)(0))}return(e<0||Object.is(e,-0))&&(t=(0,Rn.unaryExpression)("-",t)),t}if(typeof e=="bigint")return e<0?(0,Rn.unaryExpression)("-",(0,Rn.bigIntLiteral)(-e)):(0,Rn.bigIntLiteral)(e);if($1e(e)){let t=e.source,r=/\/([a-z]*)$/.exec(e.toString())[1];return(0,Rn.regExpLiteral)(t,r)}if(Array.isArray(e))return(0,Rn.arrayExpression)(e.map(uR));if(G1e(e)){let t=[];for(let r of Object.keys(e)){let a,n=!1;(0,q1e.default)(r)?r==="__proto__"?(n=!0,a=(0,Rn.stringLiteral)(r)):a=(0,Rn.identifier)(r):a=(0,Rn.stringLiteral)(r),t.push((0,Rn.objectProperty)(a,uR(e[r]),n))}return(0,Rn.objectExpression)(t)}throw new Error("don't know how to turn this value into a node")}});var H8=ne(dR=>{"use strict";Object.defineProperty(dR,"__esModule",{value:!0});dR.default=W1e;var K1e=zi();function W1e(e,t,r=!1){return e.object=(0,K1e.memberExpression)(e.object,e.property,e.computed),e.property=t,e.computed=!!r,e}});var G8=ne(fR=>{"use strict";Object.defineProperty(fR,"__esModule",{value:!0});fR.default=Y1e;var $8=Rg(),X1e=KL();function Y1e(e,t){if(!e||!t)return e;for(let r of $8.INHERIT_KEYS.optional)e[r]==null&&(e[r]=t[r]);for(let r of Object.keys(t))r[0]==="_"&&r!=="__clone"&&(e[r]=t[r]);for(let r of $8.INHERIT_KEYS.force)e[r]=t[r];return(0,X1e.default)(e,t),e}});var K8=ne(pR=>{"use strict";Object.defineProperty(pR,"__esModule",{value:!0});pR.default=Z1e;var J1e=zi(),Q1e=fr();function Z1e(e,t){if((0,Q1e.isSuper)(e.object))throw new Error("Cannot prepend node to super property access (`super.foo`).");return e.object=(0,J1e.memberExpression)(t,e.object),e}});var W8=ne(mR=>{"use strict";Object.defineProperty(mR,"__esModule",{value:!0});mR.default=eEe;function eEe(e){let t=[].concat(e),r=Object.create(null);for(;t.length;){let a=t.pop();if(a)switch(a.type){case"ArrayPattern":t.push(...a.elements);break;case"AssignmentExpression":case"AssignmentPattern":case"ForInStatement":case"ForOfStatement":t.push(a.left);break;case"ObjectPattern":t.push(...a.properties);break;case"ObjectProperty":t.push(a.value);break;case"RestElement":case"UpdateExpression":t.push(a.argument);break;case"UnaryExpression":a.operator==="delete"&&t.push(a.argument);break;case"Identifier":r[a.name]=a;break;default:break}}return r}});var I0=ne(gR=>{"use strict";Object.defineProperty(gR,"__esModule",{value:!0});gR.default=hR;var Tu=on();function hR(e,t,r,a){let n=[].concat(e),s=Object.create(null);for(;n.length;){let i=n.shift();if(!i||a&&((0,Tu.isAssignmentExpression)(i)||(0,Tu.isUnaryExpression)(i)||(0,Tu.isUpdateExpression)(i)))continue;if((0,Tu.isIdentifier)(i)){t?(s[i.name]=s[i.name]||[]).push(i):s[i.name]=i;continue}if((0,Tu.isExportDeclaration)(i)&&!(0,Tu.isExportAllDeclaration)(i)){(0,Tu.isDeclaration)(i.declaration)&&n.push(i.declaration);continue}if(r){if((0,Tu.isFunctionDeclaration)(i)){n.push(i.id);continue}if((0,Tu.isFunctionExpression)(i))continue}let o=hR.keys[i.type];if(o)for(let l=0;l<o.length;l++){let c=o[l],u=i[c];u&&(Array.isArray(u)?n.push(...u):n.push(u))}}return s}var tEe={DeclareClass:["id"],DeclareFunction:["id"],DeclareModule:["id"],DeclareVariable:["id"],DeclareInterface:["id"],DeclareTypeAlias:["id"],DeclareOpaqueType:["id"],InterfaceDeclaration:["id"],TypeAlias:["id"],OpaqueType:["id"],CatchClause:["param"],LabeledStatement:["label"],UnaryExpression:["argument"],AssignmentExpression:["left"],ImportSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportDefaultSpecifier:["local"],ImportDeclaration:["specifiers"],TSImportEqualsDeclaration:["id"],ExportSpecifier:["exported"],ExportNamespaceSpecifier:["exported"],ExportDefaultSpecifier:["exported"],FunctionDeclaration:["id","params"],FunctionExpression:["id","params"],ArrowFunctionExpression:["params"],ObjectMethod:["params"],ClassMethod:["params"],ClassPrivateMethod:["params"],ForInStatement:["left"],ForOfStatement:["left"],ClassDeclaration:["id"],ClassExpression:["id"],RestElement:["argument"],UpdateExpression:["argument"],ObjectProperty:["value"],AssignmentPattern:["left"],ArrayPattern:["elements"],ObjectPattern:["properties"],VariableDeclaration:["declarations"],VariableDeclarator:["id"]};hR.keys=tEe});var X8=ne(Xw=>{"use strict";Object.defineProperty(Xw,"__esModule",{value:!0});Xw.default=void 0;var rEe=I0(),Xot=Xw.default=aEe;function aEe(e,t){return(0,rEe.default)(e,t,!0)}});var J8=ne(yR=>{"use strict";Object.defineProperty(yR,"__esModule",{value:!0});yR.default=sEe;var Qo=on();function nEe(e){return(0,Qo.isNullLiteral)(e)?"null":(0,Qo.isRegExpLiteral)(e)?`/${e.pattern}/${e.flags}`:(0,Qo.isTemplateLiteral)(e)?e.quasis.map(t=>t.value.raw).join(""):e.value!==void 0?String(e.value):null}function Y8(e){if(!e.computed||(0,Qo.isLiteral)(e.key))return e.key}function sEe(e,t){if("id"in e&&e.id)return{name:e.id.name,originalNode:e.id};let r="",a;if((0,Qo.isObjectProperty)(t,{value:e})?a=Y8(t):(0,Qo.isObjectMethod)(e)||(0,Qo.isClassMethod)(e)?(a=Y8(e),e.kind==="get"?r="get ":e.kind==="set"&&(r="set ")):(0,Qo.isVariableDeclarator)(t,{init:e})?a=t.id:(0,Qo.isAssignmentExpression)(t,{operator:"=",right:e})&&(a=t.left),!a)return null;let n=(0,Qo.isLiteral)(a)?nEe(a):(0,Qo.isIdentifier)(a)?a.name:(0,Qo.isPrivateName)(a)?a.id.name:null;return n==null?null:{name:r+n,originalNode:a}}});var Q8=ne(bR=>{"use strict";Object.defineProperty(bR,"__esModule",{value:!0});bR.default=oEe;var iEe=Jo();function oEe(e,t,r){typeof t=="function"&&(t={enter:t});let{enter:a,exit:n}=t;xR(e,a,n,r,[])}function xR(e,t,r,a,n){let s=iEe.VISITOR_KEYS[e.type];if(s){t&&t(e,n,a);for(let i of s){let o=e[i];if(Array.isArray(o))for(let l=0;l<o.length;l++){let c=o[l];c&&(n.push({node:e,key:i,index:l}),xR(c,t,r,a,n),n.pop())}else o&&(n.push({node:e,key:i}),xR(o,t,r,a,n),n.pop())}r&&r(e,n,a)}}});var Z8=ne(vR=>{"use strict";Object.defineProperty(vR,"__esModule",{value:!0});vR.default=cEe;var lEe=I0();function cEe(e,t,r){if(r&&e.type==="Identifier"&&t.type==="ObjectProperty"&&r.type==="ObjectExpression")return!1;let a=lEe.default.keys[t.type];if(a)for(let n=0;n<a.length;n++){let s=a[n],i=t[s];if(Array.isArray(i)){if(i.includes(e))return!0}else if(i===e)return!0}return!1}});var TR=ne(SR=>{"use strict";Object.defineProperty(SR,"__esModule",{value:!0});SR.default=dEe;var uEe=on();e6=Symbol.for("var used to be block scoped");var e6;function dEe(e){return(0,uEe.isVariableDeclaration)(e)&&(e.kind!=="var"||e[e6])}});var r6=ne(wR=>{"use strict";Object.defineProperty(wR,"__esModule",{value:!0});wR.default=pEe;var t6=on(),fEe=TR();function pEe(e){return(0,t6.isFunctionDeclaration)(e)||(0,t6.isClassDeclaration)(e)||(0,fEe.default)(e)}});var a6=ne(CR=>{"use strict";Object.defineProperty(CR,"__esModule",{value:!0});CR.default=gEe;var mEe=Rw(),hEe=on();function gEe(e){return(0,mEe.default)(e.type,"Immutable")?!0:(0,hEe.isIdentifier)(e)?e.name==="undefined":!1}});var s6=ne(PR=>{"use strict";Object.defineProperty(PR,"__esModule",{value:!0});PR.default=ER;var n6=Jo();function ER(e,t){if(typeof e!="object"||typeof t!="object"||e==null||t==null)return e===t;if(e.type!==t.type)return!1;let r=Object.keys(n6.NODE_FIELDS[e.type]||e.type),a=n6.VISITOR_KEYS[e.type];for(let n of r){let s=e[n],i=t[n];if(typeof s!=typeof i)return!1;if(!(s==null&&i==null)){if(s==null||i==null)return!1;if(Array.isArray(s)){if(!Array.isArray(i)||s.length!==i.length)return!1;for(let o=0;o<s.length;o++)if(!ER(s[o],i[o]))return!1;continue}if(typeof s=="object"&&!(a!=null&&a.includes(n))){for(let o of Object.keys(s))if(s[o]!==i[o])return!1;continue}if(!ER(s,i))return!1}}return!0}});var i6=ne(AR=>{"use strict";Object.defineProperty(AR,"__esModule",{value:!0});AR.default=yEe;function yEe(e,t,r){switch(t.type){case"MemberExpression":case"OptionalMemberExpression":return t.property===e?!!t.computed:t.object===e;case"JSXMemberExpression":return t.object===e;case"VariableDeclarator":return t.init===e;case"ArrowFunctionExpression":return t.body===e;case"PrivateName":return!1;case"ClassMethod":case"ClassPrivateMethod":case"ObjectMethod":return t.key===e?!!t.computed:!1;case"ObjectProperty":return t.key===e?!!t.computed:!r||r.type!=="ObjectPattern";case"ClassProperty":case"ClassAccessorProperty":return t.key===e?!!t.computed:!0;case"ClassPrivateProperty":return t.key!==e;case"ClassDeclaration":case"ClassExpression":return t.superClass===e;case"AssignmentExpression":return t.right===e;case"AssignmentPattern":return t.right===e;case"LabeledStatement":return!1;case"CatchClause":return!1;case"RestElement":return!1;case"BreakStatement":case"ContinueStatement":return!1;case"FunctionDeclaration":case"FunctionExpression":return!1;case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":return!1;case"ExportSpecifier":return r!=null&&r.source?!1:t.local===e;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":return!1;case"ImportAttribute":return!1;case"JSXAttribute":return!1;case"ObjectPattern":case"ArrayPattern":return!1;case"MetaProperty":return!1;case"ObjectTypeProperty":return t.key!==e;case"TSEnumMember":return t.id!==e;case"TSPropertySignature":return t.key===e?!!t.computed:!0}return!0}});var o6=ne(IR=>{"use strict";Object.defineProperty(IR,"__esModule",{value:!0});IR.default=xEe;var im=on();function xEe(e,t){return(0,im.isBlockStatement)(e)&&((0,im.isFunction)(t)||(0,im.isCatchClause)(t))?!1:(0,im.isPattern)(e)&&((0,im.isFunction)(t)||(0,im.isCatchClause)(t))?!0:(0,im.isScopable)(e)}});var c6=ne(NR=>{"use strict";Object.defineProperty(NR,"__esModule",{value:!0});NR.default=bEe;var l6=on();function bEe(e){return(0,l6.isImportDefaultSpecifier)(e)||(0,l6.isIdentifier)(e.imported||e.exported,{name:"default"})}});var u6=ne(LR=>{"use strict";Object.defineProperty(LR,"__esModule",{value:!0});LR.default=TEe;var vEe=Lg(),SEe=new Set(["abstract","boolean","byte","char","double","enum","final","float","goto","implements","int","interface","long","native","package","private","protected","public","short","static","synchronized","throws","transient","volatile"]);function TEe(e){return(0,vEe.default)(e)&&!SEe.has(e)}});var f6=ne(RR=>{"use strict";Object.defineProperty(RR,"__esModule",{value:!0});RR.default=CEe;var wEe=on();d6=Symbol.for("var used to be block scoped");var d6;function CEe(e){return(0,wEe.isVariableDeclaration)(e,{kind:"var"})&&!e[d6]}});var p6=ne(DR=>{"use strict";Object.defineProperty(DR,"__esModule",{value:!0});DR.default=Yw;var EEe=I0(),om=on(),kR=zi(),MR=NL(),PEe=Zd();function Yw(e,t){let r=[],a=!0;for(let n of e)if((0,om.isEmptyStatement)(n)||(a=!1),(0,om.isExpression)(n))r.push(n);else if((0,om.isExpressionStatement)(n))r.push(n.expression);else if((0,om.isVariableDeclaration)(n)){if(n.kind!=="var")return;for(let s of n.declarations){let i=(0,EEe.default)(s);for(let o of Object.keys(i))t.push({kind:n.kind,id:(0,PEe.default)(i[o])});s.init&&r.push((0,kR.assignmentExpression)("=",s.id,s.init))}a=!0}else if((0,om.isIfStatement)(n)){let s=n.consequent?Yw([n.consequent],t):(0,MR.buildUndefinedNode)(),i=n.alternate?Yw([n.alternate],t):(0,MR.buildUndefinedNode)();if(!s||!i)return;r.push((0,kR.conditionalExpression)(n.test,s,i))}else if((0,om.isBlockStatement)(n)){let s=Yw(n.body,t);if(!s)return;r.push(s)}else if((0,om.isEmptyStatement)(n))e.indexOf(n)===0&&(a=!0);else return;return a&&r.push((0,MR.buildUndefinedNode)()),r.length===1?r[0]:(0,kR.sequenceExpression)(r)}});var m6=ne(_R=>{"use strict";Object.defineProperty(_R,"__esModule",{value:!0});_R.default=IEe;var AEe=p6();function IEe(e,t){if(!(e!=null&&e.length))return;let r=[],a=(0,AEe.default)(e,r);if(a){for(let n of r)t.push(n);return a}}});var fr=ne(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});var ef={react:!0,assertNode:!0,createTypeAnnotationBasedOnTypeof:!0,createUnionTypeAnnotation:!0,createFlowUnionType:!0,createTSUnionType:!0,cloneNode:!0,clone:!0,cloneDeep:!0,cloneDeepWithoutLoc:!0,cloneWithoutLoc:!0,addComment:!0,addComments:!0,inheritInnerComments:!0,inheritLeadingComments:!0,inheritsComments:!0,inheritTrailingComments:!0,removeComments:!0,ensureBlock:!0,toBindingIdentifierName:!0,toBlock:!0,toComputedKey:!0,toExpression:!0,toIdentifier:!0,toKeyAlias:!0,toStatement:!0,valueToNode:!0,appendToMemberExpression:!0,inherits:!0,prependToMemberExpression:!0,removeProperties:!0,removePropertiesDeep:!0,removeTypeDuplicates:!0,getAssignmentIdentifiers:!0,getBindingIdentifiers:!0,getOuterBindingIdentifiers:!0,getFunctionName:!0,traverse:!0,traverseFast:!0,shallowEqual:!0,is:!0,isBinding:!0,isBlockScoped:!0,isImmutable:!0,isLet:!0,isNode:!0,isNodesEquivalent:!0,isPlaceholderType:!0,isReferenced:!0,isScope:!0,isSpecifierDefault:!0,isType:!0,isValidES3Identifier:!0,isValidIdentifier:!0,isVar:!0,matchesPattern:!0,validate:!0,buildMatchMemberExpression:!0,__internal__deprecationWarning:!0};Object.defineProperty(Xe,"__internal__deprecationWarning",{enumerable:!0,get:function(){return kPe.default}});Object.defineProperty(Xe,"addComment",{enumerable:!0,get:function(){return jEe.default}});Object.defineProperty(Xe,"addComments",{enumerable:!0,get:function(){return zEe.default}});Object.defineProperty(Xe,"appendToMemberExpression",{enumerable:!0,get:function(){return rPe.default}});Object.defineProperty(Xe,"assertNode",{enumerable:!0,get:function(){return kEe.default}});Object.defineProperty(Xe,"buildMatchMemberExpression",{enumerable:!0,get:function(){return RPe.default}});Object.defineProperty(Xe,"clone",{enumerable:!0,get:function(){return OEe.default}});Object.defineProperty(Xe,"cloneDeep",{enumerable:!0,get:function(){return FEe.default}});Object.defineProperty(Xe,"cloneDeepWithoutLoc",{enumerable:!0,get:function(){return BEe.default}});Object.defineProperty(Xe,"cloneNode",{enumerable:!0,get:function(){return _Ee.default}});Object.defineProperty(Xe,"cloneWithoutLoc",{enumerable:!0,get:function(){return UEe.default}});Object.defineProperty(Xe,"createFlowUnionType",{enumerable:!0,get:function(){return h6.default}});Object.defineProperty(Xe,"createTSUnionType",{enumerable:!0,get:function(){return DEe.default}});Object.defineProperty(Xe,"createTypeAnnotationBasedOnTypeof",{enumerable:!0,get:function(){return MEe.default}});Object.defineProperty(Xe,"createUnionTypeAnnotation",{enumerable:!0,get:function(){return h6.default}});Object.defineProperty(Xe,"ensureBlock",{enumerable:!0,get:function(){return KEe.default}});Object.defineProperty(Xe,"getAssignmentIdentifiers",{enumerable:!0,get:function(){return lPe.default}});Object.defineProperty(Xe,"getBindingIdentifiers",{enumerable:!0,get:function(){return cPe.default}});Object.defineProperty(Xe,"getFunctionName",{enumerable:!0,get:function(){return dPe.default}});Object.defineProperty(Xe,"getOuterBindingIdentifiers",{enumerable:!0,get:function(){return uPe.default}});Object.defineProperty(Xe,"inheritInnerComments",{enumerable:!0,get:function(){return VEe.default}});Object.defineProperty(Xe,"inheritLeadingComments",{enumerable:!0,get:function(){return qEe.default}});Object.defineProperty(Xe,"inheritTrailingComments",{enumerable:!0,get:function(){return $Ee.default}});Object.defineProperty(Xe,"inherits",{enumerable:!0,get:function(){return aPe.default}});Object.defineProperty(Xe,"inheritsComments",{enumerable:!0,get:function(){return HEe.default}});Object.defineProperty(Xe,"is",{enumerable:!0,get:function(){return mPe.default}});Object.defineProperty(Xe,"isBinding",{enumerable:!0,get:function(){return hPe.default}});Object.defineProperty(Xe,"isBlockScoped",{enumerable:!0,get:function(){return gPe.default}});Object.defineProperty(Xe,"isImmutable",{enumerable:!0,get:function(){return yPe.default}});Object.defineProperty(Xe,"isLet",{enumerable:!0,get:function(){return xPe.default}});Object.defineProperty(Xe,"isNode",{enumerable:!0,get:function(){return bPe.default}});Object.defineProperty(Xe,"isNodesEquivalent",{enumerable:!0,get:function(){return vPe.default}});Object.defineProperty(Xe,"isPlaceholderType",{enumerable:!0,get:function(){return SPe.default}});Object.defineProperty(Xe,"isReferenced",{enumerable:!0,get:function(){return TPe.default}});Object.defineProperty(Xe,"isScope",{enumerable:!0,get:function(){return wPe.default}});Object.defineProperty(Xe,"isSpecifierDefault",{enumerable:!0,get:function(){return CPe.default}});Object.defineProperty(Xe,"isType",{enumerable:!0,get:function(){return EPe.default}});Object.defineProperty(Xe,"isValidES3Identifier",{enumerable:!0,get:function(){return PPe.default}});Object.defineProperty(Xe,"isValidIdentifier",{enumerable:!0,get:function(){return APe.default}});Object.defineProperty(Xe,"isVar",{enumerable:!0,get:function(){return IPe.default}});Object.defineProperty(Xe,"matchesPattern",{enumerable:!0,get:function(){return NPe.default}});Object.defineProperty(Xe,"prependToMemberExpression",{enumerable:!0,get:function(){return nPe.default}});Xe.react=void 0;Object.defineProperty(Xe,"removeComments",{enumerable:!0,get:function(){return GEe.default}});Object.defineProperty(Xe,"removeProperties",{enumerable:!0,get:function(){return sPe.default}});Object.defineProperty(Xe,"removePropertiesDeep",{enumerable:!0,get:function(){return iPe.default}});Object.defineProperty(Xe,"removeTypeDuplicates",{enumerable:!0,get:function(){return oPe.default}});Object.defineProperty(Xe,"shallowEqual",{enumerable:!0,get:function(){return pPe.default}});Object.defineProperty(Xe,"toBindingIdentifierName",{enumerable:!0,get:function(){return WEe.default}});Object.defineProperty(Xe,"toBlock",{enumerable:!0,get:function(){return XEe.default}});Object.defineProperty(Xe,"toComputedKey",{enumerable:!0,get:function(){return YEe.default}});Object.defineProperty(Xe,"toExpression",{enumerable:!0,get:function(){return JEe.default}});Object.defineProperty(Xe,"toIdentifier",{enumerable:!0,get:function(){return QEe.default}});Object.defineProperty(Xe,"toKeyAlias",{enumerable:!0,get:function(){return ZEe.default}});Object.defineProperty(Xe,"toStatement",{enumerable:!0,get:function(){return ePe.default}});Object.defineProperty(Xe,"traverse",{enumerable:!0,get:function(){return Jw.default}});Object.defineProperty(Xe,"traverseFast",{enumerable:!0,get:function(){return fPe.default}});Object.defineProperty(Xe,"validate",{enumerable:!0,get:function(){return LPe.default}});Object.defineProperty(Xe,"valueToNode",{enumerable:!0,get:function(){return tPe.default}});var NEe=x4(),LEe=b4(),REe=u8(),kEe=d8(),OR=f8();Object.keys(OR).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(ef,e)||e in Xe&&Xe[e]===OR[e]||Object.defineProperty(Xe,e,{enumerable:!0,get:function(){return OR[e]}})});var MEe=p8(),h6=g8(),DEe=v8(),FR=NL();Object.keys(FR).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(ef,e)||e in Xe&&Xe[e]===FR[e]||Object.defineProperty(Xe,e,{enumerable:!0,get:function(){return FR[e]}})});var BR=zi();Object.keys(BR).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(ef,e)||e in Xe&&Xe[e]===BR[e]||Object.defineProperty(Xe,e,{enumerable:!0,get:function(){return BR[e]}})});var _Ee=Zd(),OEe=P8(),FEe=A8(),BEe=I8(),UEe=N8(),jEe=L8(),zEe=FL(),VEe=zL(),qEe=qL(),HEe=KL(),$Ee=$L(),GEe=R8(),UR=k8();Object.keys(UR).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(ef,e)||e in Xe&&Xe[e]===UR[e]||Object.defineProperty(Xe,e,{enumerable:!0,get:function(){return UR[e]}})});var jR=Rg();Object.keys(jR).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(ef,e)||e in Xe&&Xe[e]===jR[e]||Object.defineProperty(Xe,e,{enumerable:!0,get:function(){return jR[e]}})});var KEe=M8(),WEe=D8(),XEe=JL(),YEe=_8(),JEe=O8(),QEe=eR(),ZEe=z8(),ePe=V8(),tPe=q8(),zR=Jo();Object.keys(zR).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(ef,e)||e in Xe&&Xe[e]===zR[e]||Object.defineProperty(Xe,e,{enumerable:!0,get:function(){return zR[e]}})});var rPe=H8(),aPe=G8(),nPe=K8(),sPe=iR(),iPe=lR(),oPe=CL(),lPe=W8(),cPe=I0(),uPe=X8(),dPe=J8(),Jw=Q8();Object.keys(Jw).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(ef,e)||e in Xe&&Xe[e]===Jw[e]||Object.defineProperty(Xe,e,{enumerable:!0,get:function(){return Jw[e]}})});var fPe=nR(),pPe=Nw(),mPe=Ng(),hPe=Z8(),gPe=r6(),yPe=a6(),xPe=TR(),bPe=SL(),vPe=s6(),SPe=$N(),TPe=i6(),wPe=o6(),CPe=c6(),EPe=Rw(),PPe=u6(),APe=Lg(),IPe=f6(),NPe=UN(),LPe=_w(),RPe=zN(),VR=on();Object.keys(VR).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(ef,e)||e in Xe&&Xe[e]===VR[e]||Object.defineProperty(Xe,e,{enumerable:!0,get:function(){return VR[e]}})});var kPe=Ig(),MPe=m6(),dlt=Xe.react={isReactComponent:NEe.default,isCompatTag:LEe.default,buildChildren:REe.default};Xe.toSequenceExpression=MPe.default;process.env.BABEL_TYPES_8_BREAKING});var qR=ne(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.isBindingIdentifier=rAe;kn.isBlockScoped=oAe;kn.isExpression=nAe;kn.isFlow=fAe;kn.isForAwaitStatement=hAe;kn.isGenerated=uAe;kn.isPure=dAe;kn.isReferenced=iAe;kn.isReferencedIdentifier=eAe;kn.isReferencedMemberExpression=tAe;kn.isRestProperty=pAe;kn.isScope=sAe;kn.isSpreadProperty=mAe;kn.isStatement=aAe;kn.isUser=cAe;kn.isVar=lAe;var DPe=fr(),{isBinding:_Pe,isBlockScoped:OPe,isExportDeclaration:FPe,isExpression:BPe,isFlow:UPe,isForStatement:jPe,isForXStatement:zPe,isIdentifier:g6,isImportDeclaration:VPe,isImportSpecifier:qPe,isJSXIdentifier:HPe,isJSXMemberExpression:$Pe,isMemberExpression:GPe,isRestElement:y6,isReferenced:Qw,isScope:KPe,isStatement:WPe,isVar:XPe,isVariableDeclaration:YPe,react:JPe,isForOfStatement:QPe}=DPe,{isCompatTag:ZPe}=JPe;function eAe(e){let{node:t,parent:r}=this;return g6(t,e)?Qw(t,r,this.parentPath.parent):HPe(t,e)?!$Pe(r)&&ZPe(t.name)?!1:Qw(t,r,this.parentPath.parent):!1}function tAe(){let{node:e,parent:t}=this;return GPe(e)&&Qw(e,t)}function rAe(){let{node:e,parent:t}=this,r=this.parentPath.parent;return g6(e)&&_Pe(e,t,r)}function aAe(){let{node:e,parent:t}=this;return WPe(e)?!(YPe(e)&&(zPe(t,{left:e})||jPe(t,{init:e}))):!1}function nAe(){return this.isIdentifier()?this.isReferencedIdentifier():BPe(this.node)}function sAe(){return KPe(this.node,this.parent)}function iAe(){return Qw(this.node,this.parent)}function oAe(){return OPe(this.node)}function lAe(){return XPe(this.node)}function cAe(){var e;return!!((e=this.node)!=null&&e.loc)}function uAe(){return!this.isUser()}function dAe(e){return this.scope.isPure(this.node,e)}function fAe(){let{node:e}=this;return UPe(e)?!0:VPe(e)?e.importKind==="type"||e.importKind==="typeof":FPe(e)?e.exportKind==="type":qPe(e)?e.importKind==="type"||e.importKind==="typeof":!1}function pAe(){var e;return y6(this.node)&&((e=this.parentPath)==null?void 0:e.isObjectPattern())}function mAe(){var e;return y6(this.node)&&((e=this.parentPath)==null?void 0:e.isObjectExpression())}function hAe(){return QPe(this.node,{await:!0})}kn.isExistentialTypeParam=function(){throw new Error("`path.isExistentialTypeParam` has been renamed to `path.isExistsTypeAnnotation()` in Babel 7.")},kn.isNumericLiteralTypeAnnotation=function(){throw new Error("`path.isNumericLiteralTypeAnnotation()` has been renamed to `path.isNumberLiteralTypeAnnotation()` in Babel 7.")}});var L0=ne(cm=>{"use strict";Object.defineProperty(cm,"__esModule",{value:!0});cm.environmentVisitor=wAe;cm.explode=I6;cm.isExplodedVisitor=A6;cm.merge=L6;cm.verify=N6;var P6=_N(),gAe=qR(),yAe=fr(),x6=Zo(),{DEPRECATED_KEYS:b6,DEPRECATED_ALIASES:v6,FLIPPED_ALIAS_KEYS:S6,TYPES:xAe,__internal__deprecationWarning:T6}=yAe;function bAe(e){return e in P6}function A6(e){return e?._exploded}function I6(e){if(A6(e))return e;e._exploded=!0;for(let r of Object.keys(e)){if(lm(r))continue;let a=r.split("|");if(a.length===1)continue;let n=e[r];delete e[r];for(let s of a)e[s]=n}N6(e),delete e.__esModule,vAe(e),E6(e);for(let r of Object.keys(e)){if(lm(r)||!bAe(r))continue;let a=e[r];for(let s of Object.keys(a))a[s]=SAe(r,a[s]);delete e[r];let n=P6[r];if(n!==null)for(let s of n){var t;(t=e[s])!=null||(e[s]={}),N0(e[s],a)}else N0(e,a)}for(let r of Object.keys(e)){if(lm(r))continue;let a=S6[r];if(r in b6){let s=b6[r];T6(r,s,"Visitor "),a=[s]}else if(r in v6){let s=v6[r];T6(r,s,"Visitor "),a=S6[s]}if(!a)continue;let n=e[r];delete e[r];for(let s of a){let i=e[s];i?N0(i,n):e[s]=Object.assign({},n)}}for(let r of Object.keys(e))lm(r)||E6(e[r]);return e}function N6(e){if(!e._verified){if(typeof e=="function")throw new Error("You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?");for(let t of Object.keys(e)){if((t==="enter"||t==="exit")&&w6(t,e[t]),lm(t))continue;if(!xAe.includes(t))throw new Error(`You gave us a visitor for the node type ${t} but it's not a valid type in @babel/traverse 7.28.5`);let r=e[t];if(typeof r=="object")for(let a of Object.keys(r))if(a==="enter"||a==="exit")w6(`${t}.${a}`,r[a]);else throw new Error(`You passed \`traverse()\` a visitor object with the property ${t} that has the invalid property ${a}`)}e._verified=!0}}function w6(e,t){let r=[].concat(t);for(let a of r)if(typeof a!="function")throw new TypeError(`Non-function found defined in ${e} with type ${typeof a}`)}function L6(e,t=[],r){let a={_verified:!0,_exploded:!0};Object.defineProperty(a,"_exploded",{enumerable:!1}),Object.defineProperty(a,"_verified",{enumerable:!1});for(let n=0;n<e.length;n++){let s=I6(e[n]),i=t[n],o=s;(i||r)&&(o=C6(o,i,r)),N0(a,o);for(let l of Object.keys(s)){if(lm(l))continue;let c=s[l];(i||r)&&(c=C6(c,i,r));let u=a[l]||(a[l]={});N0(u,c)}}return a}function C6(e,t,r){let a={};for(let n of["enter","exit"]){let s=e[n];Array.isArray(s)&&(s=s.map(function(i){let o=i;return t&&(o=function(l){i.call(t,l,t)}),r&&(o=r(t?.key,n,o)),o!==i&&(o.toString=()=>i.toString()),o}),a[n]=s)}return a}function vAe(e){for(let t of Object.keys(e)){if(lm(t))continue;let r=e[t];typeof r=="function"&&(e[t]={enter:r})}}function E6(e){e.enter&&!Array.isArray(e.enter)&&(e.enter=[e.enter]),e.exit&&!Array.isArray(e.exit)&&(e.exit=[e.exit])}function SAe(e,t){let r=`is${e}`,a=gAe[r],n=function(s){if(a.call(s))return t.apply(this,arguments)};return n.toString=()=>t.toString(),n}function lm(e){return e[0]==="_"||e==="enter"||e==="exit"||e==="shouldSkip"||e==="denylist"||e==="noScope"||e==="skipKeys"||e==="blacklist"}function N0(e,t){for(let r of["enter","exit"])t[r]&&(e[r]=[].concat(e[r]||[],t[r]))}var TAe={FunctionParent(e){e.isArrowFunctionExpression()||(e.skip(),e.isMethod()&&(e.requeueComputedKeyAndDecorators?e.requeueComputedKeyAndDecorators():x6.requeueComputedKeyAndDecorators.call(e)))},Property(e){e.isObjectProperty()||(e.skip(),e.requeueComputedKeyAndDecorators?e.requeueComputedKeyAndDecorators():x6.requeueComputedKeyAndDecorators.call(e))}};function wAe(e){return L6([TAe,e])}});var R6=ne(eC=>{"use strict";Object.defineProperty(eC,"__esModule",{value:!0});eC.default=void 0;var Zw=fr(),CAe=Zw,EAe=tC(),PAe=L0(),AAe=Zo(),{getAssignmentIdentifiers:IAe}=CAe,NAe={ReferencedIdentifier({node:e},t){e.name===t.oldName&&(e.name=t.newName)},Scope(e,t){e.scope.bindingIdentifierEquals(t.oldName,t.binding.identifier)||(e.skip(),e.isMethod()&&(e.requeueComputedKeyAndDecorators?e.requeueComputedKeyAndDecorators():AAe.requeueComputedKeyAndDecorators.call(e)))},ObjectProperty({node:e,scope:t},r){let{name:a}=e.key;if(e.shorthand&&(a===r.oldName||a===r.newName)&&t.getBindingIdentifier(a)===r.binding.identifier){e.shorthand=!1;{var n;(n=e.extra)!=null&&n.shorthand&&(e.extra.shorthand=!1)}}},"AssignmentExpression|Declaration|VariableDeclarator"(e,t){if(e.isVariableDeclaration())return;let r=e.isAssignmentExpression()?IAe(e.node):e.getOuterBindingIdentifiers();for(let a in r)a===t.oldName&&(r[a].name=t.newName)}},HR=class{constructor(t,r,a){this.newName=a,this.oldName=r,this.binding=t}maybeConvertFromExportDeclaration(t){let r=t.parentPath;if(r.isExportDeclaration()){if(r.isExportDefaultDeclaration()){let{declaration:a}=r.node;if(Zw.isDeclaration(a)&&!a.id)return}r.isExportAllDeclaration()||r.splitExportDeclaration()}}maybeConvertFromClassFunctionDeclaration(t){return t}maybeConvertFromClassFunctionExpression(t){return t}rename(){let{binding:t,oldName:r,newName:a}=this,{scope:n,path:s}=t,i=s.find(c=>c.isDeclaration()||c.isFunctionExpression()||c.isClassExpression());i&&i.getOuterBindingIdentifiers()[r]===t.identifier&&this.maybeConvertFromExportDeclaration(i);let o=arguments[0]||n.block,l={discriminant:!0};Zw.isMethod(o)&&(o.computed&&(l.key=!0),Zw.isObjectMethod(o)||(l.decorators=!0)),(0,EAe.traverseNode)(o,(0,PAe.explode)(NAe),n,this,n.path,l),arguments[0]||(n.removeOwnBinding(r),n.bindings[a]=t,this.binding.identifier.name=a),i&&(this.maybeConvertFromClassFunctionDeclaration(s),this.maybeConvertFromClassFunctionExpression(s))}};eC.default=HR});var k6=ne($R=>{"use strict";Object.defineProperty($R,"__esModule",{value:!0});$R.default=_Ae;var LAe=fr(),RAe=Fg(),kAe=L0(),MAe=Zo(),{VISITOR_KEYS:DAe}=LAe;function _Ae(e,t,r){let a=(0,kAe.explode)(t);if(a.enter||a.exit)throw new Error("Should not be used with enter/exit visitors.");n(e.parentPath,e.parent,e.node,e.container,e.key,e.listKey,e.hub,e);function n(s,i,o,l,c,u,d,f){if(!o)return;let p=f||RAe.NodePath.get({hub:d,parentPath:s,parent:i,container:l,listKey:u,key:c});MAe.setScope.call(p);let m=a[o.type];if(m){if(m.enter)for(let x of m.enter)x.call(r,p,r);if(m.exit)for(let x of m.exit)x.call(r,p,r)}if(p.shouldSkip)return;let h=DAe[o.type];if(h!=null&&h.length)for(let x of h){let g=o[x];if(g)if(Array.isArray(g))for(let y=0;y<g.length;y++){let b=g[y];n(p,o,b,g,y,x)}else n(p,o,g,o,x,null)}}}});var M6=ne(rC=>{"use strict";Object.defineProperty(rC,"__esModule",{value:!0});rC.default=void 0;var GR=class{constructor({identifier:t,scope:r,path:a,kind:n}){this.identifier=void 0,this.scope=void 0,this.path=void 0,this.kind=void 0,this.constantViolations=[],this.constant=!0,this.referencePaths=[],this.referenced=!1,this.references=0,this.identifier=t,this.scope=r,this.path=a,this.kind=n,(n==="var"||n==="hoisted")&&OAe(a)&&this.reassign(a),this.clearValue()}deoptValue(){this.clearValue(),this.hasDeoptedValue=!0}setValue(t){this.hasDeoptedValue||(this.hasValue=!0,this.value=t)}clearValue(){this.hasDeoptedValue=!1,this.hasValue=!1,this.value=null}reassign(t){this.constant=!1,!this.constantViolations.includes(t)&&this.constantViolations.push(t)}reference(t){this.referencePaths.includes(t)||(this.referenced=!0,this.references++,this.referencePaths.push(t))}dereference(){this.references--,this.referenced=!!this.references}};rC.default=GR;function OAe(e){let t=!e.isVariableDeclarator()||e.node.init;for(let{parentPath:r,key:a}=e;r;{parentPath:r,key:a}=r){if(r.isFunctionParent())return!1;if(a==="left"&&r.isForXStatement()||t&&a==="body"&&r.isLoop())return!0}return!1}});var um=ne(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.clear=BAe;ho.clearPath=D6;ho.clearScope=_6;ho.getCachedPaths=UAe;ho.getOrCreateCachedPaths=jAe;ho.scope=ho.path=void 0;var aC=ho.path=new WeakMap,FAe=ho.scope=new WeakMap;function BAe(){D6(),_6()}function D6(){ho.path=aC=new WeakMap}function _6(){ho.scope=FAe=new WeakMap}function UAe(e){let{parent:t,parentPath:r}=e;return aC.get(t)}function jAe(e,t){let r=aC.get(e);return r||aC.set(e,r=new Map),r}});var O6=ne((blt,zAe)=>{zAe.exports=["decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","globalThis","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"]});var F6=ne((vlt,VAe)=>{VAe.exports=["AggregateError","Array","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","Error","EvalError","FinalizationRegistry","Float16Array","Float32Array","Float64Array","Function","Infinity","Int16Array","Int32Array","Int8Array","Intl","Iterator","JSON","Map","Math","NaN","Number","Object","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","String","Symbol","SyntaxError","TypeError","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","URIError","WeakMap","WeakRef","WeakSet"]});var JR=ne(sC=>{"use strict";Object.defineProperty(sC,"__esModule",{value:!0});sC.default=void 0;var qAe=R6(),G6=Fg(),Slt=k6(),HAe=M6(),K6=fr(),W6=K6,B6=um(),$Ae=O6(),GAe=F6(),{assignmentExpression:KAe,callExpression:U6,cloneNode:j6,getBindingIdentifiers:X6,identifier:fm,isArrayExpression:Y6,isBinary:WAe,isCallExpression:z6,isClass:XAe,isClassBody:YAe,isClassDeclaration:JAe,isExportAllDeclaration:J6,isExportDefaultDeclaration:QAe,isExportNamedDeclaration:KR,isFunctionDeclaration:ZAe,isIdentifier:dm,isImportDeclaration:WR,isLiteral:eIe,isMemberExpression:tIe,isMethod:rIe,isModuleSpecifier:aIe,isNullLiteral:nIe,isObjectExpression:sIe,isProperty:iIe,isPureish:oIe,isRegExpLiteral:lIe,isSuper:cIe,isTaggedTemplateExpression:uIe,isTemplateLiteral:Q6,isThisExpression:V6,isUnaryExpression:dIe,isVariableDeclaration:fIe,expressionStatement:pIe,matchesPattern:q6,memberExpression:XR,numericLiteral:mIe,toIdentifier:hIe,variableDeclaration:gIe,variableDeclarator:yIe,isRecordExpression:xIe,isTupleExpression:bIe,isObjectProperty:vIe,isTopicReference:H6,isMetaProperty:SIe,isPrivateName:TIe,isExportDeclaration:wIe,buildUndefinedNode:CIe,sequenceExpression:EIe}=K6;function Sa(e,t){switch(e?.type){default:if(WR(e)||wIe(e)){var r;if((J6(e)||KR(e)||WR(e))&&e.source)Sa(e.source,t);else if((KR(e)||WR(e))&&(r=e.specifiers)!=null&&r.length)for(let a of e.specifiers)Sa(a,t);else(QAe(e)||KR(e))&&e.declaration&&Sa(e.declaration,t)}else aIe(e)?Sa(e.local,t):eIe(e)&&!nIe(e)&&!lIe(e)&&!Q6(e)&&t.push(e.value);break;case"MemberExpression":case"OptionalMemberExpression":case"JSXMemberExpression":Sa(e.object,t),Sa(e.property,t);break;case"Identifier":case"JSXIdentifier":t.push(e.name);break;case"CallExpression":case"OptionalCallExpression":case"NewExpression":Sa(e.callee,t);break;case"ObjectExpression":case"ObjectPattern":for(let a of e.properties)Sa(a,t);break;case"SpreadElement":case"RestElement":Sa(e.argument,t);break;case"ObjectProperty":case"ObjectMethod":case"ClassProperty":case"ClassMethod":case"ClassPrivateProperty":case"ClassPrivateMethod":Sa(e.key,t);break;case"ThisExpression":t.push("this");break;case"Super":t.push("super");break;case"Import":case"ImportExpression":t.push("import");break;case"DoExpression":t.push("do");break;case"YieldExpression":t.push("yield"),Sa(e.argument,t);break;case"AwaitExpression":t.push("await"),Sa(e.argument,t);break;case"AssignmentExpression":Sa(e.left,t);break;case"VariableDeclarator":Sa(e.id,t);break;case"FunctionExpression":case"FunctionDeclaration":case"ClassExpression":case"ClassDeclaration":Sa(e.id,t);break;case"PrivateName":Sa(e.id,t);break;case"ParenthesizedExpression":Sa(e.expression,t);break;case"UnaryExpression":case"UpdateExpression":Sa(e.argument,t);break;case"MetaProperty":Sa(e.meta,t),Sa(e.property,t);break;case"JSXElement":Sa(e.openingElement,t);break;case"JSXOpeningElement":Sa(e.name,t);break;case"JSXFragment":Sa(e.openingFragment,t);break;case"JSXOpeningFragment":t.push("Fragment");break;case"JSXNamespacedName":Sa(e.namespace,t),Sa(e.name,t);break}}function $6(e){e.references=Object.create(null),e.uids=Object.create(null),e.bindings=Object.create(null),e.globals=Object.create(null)}function PIe(e){return e.isFunctionExpression()&&!e.node.id||e.isArrowFunctionExpression()}YR=Symbol.for("should not be considered a local binding");var YR,AIe={ForStatement(e){let t=e.get("init");if(t.isVar()){let{scope:r}=e;(r.getFunctionParent()||r.getProgramParent()).registerBinding("var",t)}},Declaration(e){if(e.isBlockScoped()||e.isImportDeclaration()||e.isExportDeclaration())return;(e.scope.getFunctionParent()||e.scope.getProgramParent()).registerDeclaration(e)},ImportDeclaration(e){e.scope.getBlockParent().registerDeclaration(e)},TSImportEqualsDeclaration(e){e.scope.getBlockParent().registerDeclaration(e)},ReferencedIdentifier(e,t){W6.isTSQualifiedName(e.parent)&&e.parent.right===e.node||e.parentPath.isTSImportEqualsDeclaration()||t.references.push(e)},ForXStatement(e,t){let r=e.get("left");if(r.isPattern()||r.isIdentifier())t.constantViolations.push(e);else if(r.isVar()){let{scope:a}=e;(a.getFunctionParent()||a.getProgramParent()).registerBinding("var",r)}},ExportDeclaration:{exit(e){let{node:t,scope:r}=e;if(J6(t))return;let a=t.declaration;if(JAe(a)||ZAe(a)){let n=a.id;if(!n)return;let s=r.getBinding(n.name);s?.reference(e)}else if(fIe(a))for(let n of a.declarations)for(let s of Object.keys(X6(n))){let i=r.getBinding(s);i?.reference(e)}}},LabeledStatement(e){e.scope.getBlockParent().registerDeclaration(e)},AssignmentExpression(e,t){t.assignments.push(e)},UpdateExpression(e,t){t.constantViolations.push(e)},UnaryExpression(e,t){e.node.operator==="delete"&&t.constantViolations.push(e)},BlockScoped(e){let t=e.scope;if(t.path===e&&(t=t.parent),t.getBlockParent().registerDeclaration(e),e.isClassDeclaration()&&e.node.id){let n=e.node.id.name;e.scope.bindings[n]=e.scope.parent.getBinding(n)}},CatchClause(e){e.scope.registerBinding("let",e)},Function(e){let t=e.get("params");for(let r of t)e.scope.registerBinding("param",r);e.isFunctionExpression()&&e.node.id&&!e.node.id[YR]&&e.scope.registerBinding("local",e.get("id"),e)},ClassExpression(e){e.node.id&&!e.node.id[YR]&&e.scope.registerBinding("local",e.get("id"),e)},TSTypeAnnotation(e){e.skip()}},nC,IIe=0,Vi=class{constructor(t){this.uid=void 0,this.path=void 0,this.block=void 0,this.inited=void 0,this.labels=void 0,this.bindings=void 0,this.referencesSet=void 0,this.globals=void 0,this.uidsSet=void 0,this.data=void 0,this.crawling=void 0;let{node:r}=t,a=B6.scope.get(r);if(a?.path===t)return a;B6.scope.set(r,this),this.uid=IIe++,this.block=r,this.path=t,this.labels=new Map,this.inited=!1,Object.defineProperties(this,{references:{enumerable:!0,configurable:!0,writable:!0,value:Object.create(null)},uids:{enumerable:!0,configurable:!0,writable:!0,value:Object.create(null)}})}get parent(){var t;let r,a=this.path;do{var n;let s=a.key==="key"||a.listKey==="decorators";a=a.parentPath,s&&a.isMethod()&&(a=a.parentPath),(n=a)!=null&&n.isScope()&&(r=a)}while(a&&!r);return(t=r)==null?void 0:t.scope}get references(){throw new Error("Scope#references is not available in Babel 8. Use Scope#referencesSet instead.")}get uids(){throw new Error("Scope#uids is not available in Babel 8. Use Scope#uidsSet instead.")}generateDeclaredUidIdentifier(t){let r=this.generateUidIdentifier(t);return this.push({id:r}),j6(r)}generateUidIdentifier(t){return fm(this.generateUid(t))}generateUid(t="temp"){t=hIe(t).replace(/^_+/,"").replace(/\d+$/g,"");let r,a=0;do r=`_${t}`,a>=11?r+=a-1:a>=9?r+=a-9:a>=1&&(r+=a+1),a++;while(this.hasLabel(r)||this.hasBinding(r)||this.hasGlobal(r)||this.hasReference(r));let n=this.getProgramParent();return n.references[r]=!0,n.uids[r]=!0,r}generateUidBasedOnNode(t,r){let a=[];Sa(t,a);let n=a.join("$");return n=n.replace(/^_/,"")||r||"ref",this.generateUid(n.slice(0,20))}generateUidIdentifierBasedOnNode(t,r){return fm(this.generateUidBasedOnNode(t,r))}isStatic(t){if(V6(t)||cIe(t)||H6(t))return!0;if(dm(t)){let r=this.getBinding(t.name);return r?r.constant:this.hasBinding(t.name)}return!1}maybeGenerateMemoised(t,r){if(this.isStatic(t))return null;{let a=this.generateUidIdentifierBasedOnNode(t);return r?a:(this.push({id:a}),j6(a))}}checkBlockScopedCollisions(t,r,a,n){if(r==="param"||t.kind==="local")return;if(r==="let"||t.kind==="let"||t.kind==="const"||t.kind==="module"||t.kind==="param"&&r==="const")throw this.path.hub.buildError(n,`Duplicate declaration "${a}"`,TypeError)}rename(t,r){let a=this.getBinding(t);a&&(r||(r=this.generateUidIdentifier(t).name),new qAe.default(a,t,r).rename(arguments[2]))}dump(){let t="-".repeat(60),r=this;do for(let a of Object.keys(r.bindings)){let n=r.bindings[a]}while(r=r.parent)}hasLabel(t){return!!this.getLabel(t)}getLabel(t){return this.labels.get(t)}registerLabel(t){this.labels.set(t.node.label.name,t)}registerDeclaration(t){if(t.isLabeledStatement())this.registerLabel(t);else if(t.isFunctionDeclaration())this.registerBinding("hoisted",t.get("id"),t);else if(t.isVariableDeclaration()){let r=t.get("declarations"),{kind:a}=t.node;for(let n of r)this.registerBinding(a==="using"||a==="await using"?"const":a,n)}else if(t.isClassDeclaration()){if(t.node.declare)return;this.registerBinding("let",t)}else if(t.isImportDeclaration()){let r=t.node.importKind==="type"||t.node.importKind==="typeof",a=t.get("specifiers");for(let n of a){let s=r||n.isImportSpecifier()&&(n.node.importKind==="type"||n.node.importKind==="typeof");this.registerBinding(s?"unknown":"module",n)}}else if(t.isExportDeclaration()){let r=t.get("declaration");(r.isClassDeclaration()||r.isFunctionDeclaration()||r.isVariableDeclaration())&&this.registerDeclaration(r)}else this.registerBinding("unknown",t)}buildUndefinedNode(){return CIe()}registerConstantViolation(t){let r=t.getAssignmentIdentifiers();for(let n of Object.keys(r)){var a;(a=this.getBinding(n))==null||a.reassign(t)}}registerBinding(t,r,a=r){if(!t)throw new ReferenceError("no `kind`");if(r.isVariableDeclaration()){let i=r.get("declarations");for(let o of i)this.registerBinding(t,o);return}let n=this.getProgramParent(),s=r.getOuterBindingIdentifiers(!0);for(let i of Object.keys(s)){n.references[i]=!0;for(let o of s[i]){let l=this.getOwnBinding(i);if(l){if(l.identifier===o)continue;this.checkBlockScopedCollisions(l,t,i,o)}l?l.reassign(a):this.bindings[i]=new HAe.default({identifier:o,scope:this,path:a,kind:t})}}}addGlobal(t){this.globals[t.name]=t}hasUid(t){{let r=this;do if(r.uids[t])return!0;while(r=r.parent);return!1}}hasGlobal(t){let r=this;do if(r.globals[t])return!0;while(r=r.parent);return!1}hasReference(t){return!!this.getProgramParent().references[t]}isPure(t,r){if(dm(t)){let i=this.getBinding(t.name);return i?r?i.constant:!0:!1}else{if(V6(t)||SIe(t)||H6(t)||TIe(t))return!0;if(XAe(t)){var a;return t.superClass&&!this.isPure(t.superClass,r)||((a=t.decorators)==null?void 0:a.length)>0?!1:this.isPure(t.body,r)}else if(YAe(t)){for(let i of t.body)if(!this.isPure(i,r))return!1;return!0}else{if(WAe(t))return this.isPure(t.left,r)&&this.isPure(t.right,r);if(Y6(t)||bIe(t)){for(let i of t.elements)if(i!==null&&!this.isPure(i,r))return!1;return!0}else if(sIe(t)||xIe(t)){for(let i of t.properties)if(!this.isPure(i,r))return!1;return!0}else if(rIe(t)){var n;return!(t.computed&&!this.isPure(t.key,r)||((n=t.decorators)==null?void 0:n.length)>0)}else if(iIe(t)){var s;return!(t.computed&&!this.isPure(t.key,r)||((s=t.decorators)==null?void 0:s.length)>0||(vIe(t)||t.static)&&t.value!==null&&!this.isPure(t.value,r))}else{if(dIe(t))return this.isPure(t.argument,r);if(Q6(t)){for(let i of t.expressions)if(!this.isPure(i,r))return!1;return!0}else return uIe(t)?q6(t.tag,"String.raw")&&!this.hasBinding("String",{noGlobals:!0})&&this.isPure(t.quasi,r):tIe(t)?!t.computed&&dm(t.object)&&t.object.name==="Symbol"&&dm(t.property)&&t.property.name!=="for"&&!this.hasBinding("Symbol",{noGlobals:!0}):z6(t)?q6(t.callee,"Symbol.for")&&!this.hasBinding("Symbol",{noGlobals:!0})&&t.arguments.length===1&&W6.isStringLiteral(t.arguments[0]):oIe(t)}}}}setData(t,r){return this.data[t]=r}getData(t){let r=this;do{let a=r.data[t];if(a!=null)return a}while(r=r.parent)}removeData(t){let r=this;do r.data[t]!=null&&(r.data[t]=null);while(r=r.parent)}init(){this.inited||(this.inited=!0,this.crawl())}crawl(){let t=this.path;$6(this),this.data=Object.create(null);let r=this;do{if(r.crawling)return;if(r.path.isProgram())break}while(r=r.parent);let a=r,n={references:[],constantViolations:[],assignments:[]};if(this.crawling=!0,nC||(nC=G6.default.visitors.merge([{Scope(s){$6(s.scope)}},AIe])),t.type!=="Program"){let s=nC[t.type];if(s)for(let i of s.enter)i.call(n,t,n)}t.traverse(nC,n),this.crawling=!1;for(let s of n.assignments){let i=s.getAssignmentIdentifiers();for(let o of Object.keys(i))s.scope.getBinding(o)||a.addGlobal(i[o]);s.scope.registerConstantViolation(s)}for(let s of n.references){let i=s.scope.getBinding(s.node.name);i?i.reference(s):a.addGlobal(s.node)}for(let s of n.constantViolations)s.scope.registerConstantViolation(s)}push(t){let r=this.path;r.isPattern()?r=this.getPatternParent().path:!r.isBlockStatement()&&!r.isProgram()&&(r=this.getBlockParent().path),r.isSwitchStatement()&&(r=(this.getFunctionParent()||this.getProgramParent()).path);let{init:a,unique:n,kind:s="var",id:i}=t;if(!a&&!n&&(s==="var"||s==="let")&&PIe(r)&&z6(r.parent,{callee:r.node})&&r.parent.arguments.length<=r.node.params.length&&dm(i)){r.pushContainer("params",i),r.scope.registerBinding("param",r.get("params")[r.node.params.length-1]);return}(r.isLoop()||r.isCatchClause()||r.isFunction())&&(r.ensureBlock(),r=r.get("body"));let o=t._blockHoist==null?2:t._blockHoist,l=`declaration:${s}:${o}`,c=!n&&r.getData(l);if(!c){let f=gIe(s,[]);f._blockHoist=o,[c]=r.unshiftContainer("body",[f]),n||r.setData(l,c)}let u=yIe(i,a),d=c.node.declarations.push(u);r.scope.registerBinding(s,c.get("declarations")[d-1])}getProgramParent(){let t=this;do if(t.path.isProgram())return t;while(t=t.parent);throw new Error("Couldn't find a Program")}getFunctionParent(){let t=this;do if(t.path.isFunctionParent())return t;while(t=t.parent);return null}getBlockParent(){let t=this;do if(t.path.isBlockParent())return t;while(t=t.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")}getPatternParent(){let t=this;do if(!t.path.isPattern())return t.getBlockParent();while(t=t.parent.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")}getAllBindings(){let t=Object.create(null),r=this;do{for(let a of Object.keys(r.bindings))a in t||(t[a]=r.bindings[a]);r=r.parent}while(r);return t}bindingIdentifierEquals(t,r){return this.getBindingIdentifier(t)===r}getBinding(t){let r=this,a;do{let s=r.getOwnBinding(t);if(s){var n;if(!((n=a)!=null&&n.isPattern()&&s.kind!=="param"&&s.kind!=="local"))return s}else if(!s&&t==="arguments"&&r.path.isFunction()&&!r.path.isArrowFunctionExpression())break;a=r.path}while(r=r.parent)}getOwnBinding(t){return this.bindings[t]}getBindingIdentifier(t){var r;return(r=this.getBinding(t))==null?void 0:r.identifier}getOwnBindingIdentifier(t){let r=this.bindings[t];return r?.identifier}hasOwnBinding(t){return!!this.getOwnBinding(t)}hasBinding(t,r){if(!t)return!1;let a,n,s;typeof r=="object"?(a=r.noGlobals,n=r.noUids,s=r.upToScope):typeof r=="boolean"&&(a=r);let i=this;do{if(s===i)break;if(i.hasOwnBinding(t))return!0}while(i=i.parent);return!!(!n&&this.hasUid(t)||!a&&Vi.globals.includes(t)||!a&&Vi.contextVariables.includes(t))}parentHasBinding(t,r){var a;return(a=this.parent)==null?void 0:a.hasBinding(t,r)}moveBindingTo(t,r){let a=this.getBinding(t);a&&(a.scope.removeOwnBinding(t),a.scope=r,r.bindings[t]=a)}removeOwnBinding(t){delete this.bindings[t]}removeBinding(t){var r;(r=this.getBinding(t))==null||r.scope.removeOwnBinding(t);{let a=this;do a.uids[t]&&(a.uids[t]=!1);while(a=a.parent)}}hoistVariables(t=r=>this.push({id:r})){this.crawl();let r=new Set;for(let a of Object.keys(this.bindings)){let n=this.bindings[a];if(!n)continue;let{path:s}=n;if(!s.isVariableDeclarator())continue;let{parent:i,parentPath:o}=s;if(i.kind!=="var"||r.has(i))continue;r.add(s.parent);let l,c=[];for(let u of i.declarations){l??(l=u.id),u.init&&c.push(KAe("=",u.id,u.init));let d=Object.keys(X6(u,!1,!0,!0));for(let f of d)t(fm(f),u.init!=null)}if(o.parentPath.isForXStatement({left:i}))o.replaceWith(l);else if(c.length===0)o.remove();else{let u=c.length===1?c[0]:EIe(c);o.parentPath.isForStatement({init:i})?o.replaceWith(u):o.replaceWith(pIe(u))}}}};sC.default=Vi;Vi.globals=[...$Ae,...GAe];Vi.contextVariables=["arguments","undefined","Infinity","NaN"];Vi.prototype._renameFromMap=function(t,r,a,n){t[r]&&(t[a]=n,t[r]=null)},Vi.prototype.traverse=function(e,t,r){(0,G6.default)(e,t,this,r,this.path)},Vi.prototype._generateUid=function(t,r){let a=t;return r>1&&(a+=r),`_${a}`},Vi.prototype.toArray=function(t,r,a){if(dm(t)){let i=this.getBinding(t.name);if(i!=null&&i.constant&&i.path.isGenericType("Array"))return t}if(Y6(t))return t;if(dm(t,{name:"arguments"}))return U6(XR(XR(XR(fm("Array"),fm("prototype")),fm("slice")),fm("call")),[t]);let n,s=[t];return r===!0?n="toConsumableArray":typeof r=="number"?(s.push(mIe(r)),n="slicedToArray"):n="toArray",a&&(s.unshift(this.path.hub.addHelper(n)),n="maybeArrayLike"),U6(this.path.hub.addHelper(n),s)},Vi.prototype.getAllBindingsOfKind=function(...t){let r=Object.create(null);for(let a of t){let n=this;do{for(let s of Object.keys(n.bindings)){let i=n.bindings[s];i.kind===a&&(r[s]=i)}n=n.parent}while(n)}return r},Object.defineProperties(Vi.prototype,{parentBlock:{configurable:!0,enumerable:!0,get(){return this.path.parent}},hub:{configurable:!0,enumerable:!0,get(){return this.path.hub}}})});var ZR=ne((QR,R0)=>{(function(e,t){if(typeof QR=="object"&&typeof R0<"u")t(R0),R0.exports=r(R0);else if(typeof define=="function"&&define.amd)define(["module"],function(a){t.apply(this,arguments),a.exports=r(a)});else{let a={exports:{}};t(a),e=typeof globalThis<"u"?globalThis:e||self,e.sourcemapCodec=r(a)}function r(a){return"default"in a.exports?a.exports.default:a.exports}})(QR,function(e){"use strict";var t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,n=Object.prototype.hasOwnProperty,s=(V,L)=>{for(var k in L)t(V,k,{get:L[k],enumerable:!0})},i=(V,L,k,_)=>{if(L&&typeof L=="object"||typeof L=="function")for(let ee of a(L))!n.call(V,ee)&&ee!==k&&t(V,ee,{get:()=>L[ee],enumerable:!(_=r(L,ee))||_.enumerable});return V},o=V=>i(t({},"__esModule",{value:!0}),V),l={};s(l,{decode:()=>J,decodeGeneratedRanges:()=>R,decodeOriginalScopes:()=>P,encode:()=>q,encodeGeneratedRanges:()=>O,encodeOriginalScopes:()=>C}),e.exports=o(l);var c=",".charCodeAt(0),u=";".charCodeAt(0),d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=new Uint8Array(64),p=new Uint8Array(128);for(let V=0;V<d.length;V++){let L=d.charCodeAt(V);f[V]=L,p[L]=V}function m(V,L){let k=0,_=0,ee=0;do{let ae=V.next();ee=p[ae],k|=(ee&31)<<_,_+=5}while(ee&32);let ie=k&1;return k>>>=1,ie&&(k=-2147483648|-k),L+k}function h(V,L,k){let _=L-k;_=_<0?-_<<1|1:_<<1;do{let ee=_&31;_>>>=5,_>0&&(ee|=32),V.write(f[ee])}while(_>0);return L}function x(V,L){return V.pos>=L?!1:V.peek()!==c}var g=1024*16,y=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(V){return Buffer.from(V.buffer,V.byteOffset,V.byteLength).toString()}}:{decode(V){let L="";for(let k=0;k<V.length;k++)L+=String.fromCharCode(V[k]);return L}},b=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(g)}write(V){let{buffer:L}=this;L[this.pos++]=V,this.pos===g&&(this.out+=y.decode(L),this.pos=0)}flush(){let{buffer:V,out:L,pos:k}=this;return k>0?L+y.decode(V.subarray(0,k)):L}},S=class{constructor(V){this.pos=0,this.buffer=V}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(V){let{buffer:L,pos:k}=this,_=L.indexOf(V,k);return _===-1?L.length:_}},w=[];function P(V){let{length:L}=V,k=new S(V),_=[],ee=[],ie=0;for(;k.pos<L;k.pos++){ie=m(k,ie);let ae=m(k,0);if(!x(k,L)){let he=ee.pop();he[2]=ie,he[3]=ae;continue}let ge=m(k,0),A=m(k,0)&1?[ie,ae,0,0,ge,m(k,0)]:[ie,ae,0,0,ge],K=w;if(x(k,L)){K=[];do{let he=m(k,0);K.push(he)}while(x(k,L))}A.vars=K,_.push(A),ee.push(A)}return _}function C(V){let L=new b;for(let k=0;k<V.length;)k=I(V,k,L,[0]);return L.flush()}function I(V,L,k,_){let ee=V[L],{0:ie,1:ae,2:ge,3:ue,4:$,vars:A}=ee;L>0&&k.write(c),_[0]=h(k,ie,_[0]),h(k,ae,0),h(k,$,0);let K=ee.length===6?1:0;h(k,K,0),ee.length===6&&h(k,ee[5],0);for(let he of A)h(k,he,0);for(L++;L<V.length;){let he=V[L],{0:H,1:xe}=he;if(H>ge||H===ge&&xe>=ue)break;L=I(V,L,k,_)}return k.write(c),_[0]=h(k,ge,_[0]),h(k,ue,0),L}function R(V){let{length:L}=V,k=new S(V),_=[],ee=[],ie=0,ae=0,ge=0,ue=0,$=0,A=0,K=0,he=0;do{let H=k.indexOf(";"),xe=0;for(;k.pos<H;k.pos++){if(xe=m(k,xe),!x(k,H)){let tt=ee.pop();tt[2]=ie,tt[3]=xe;continue}let Pe=m(k,0),Ie=Pe&1,Ve=Pe&2,ft=Pe&4,we=null,Ne=w,Be;if(Ie){let tt=m(k,ae);ge=m(k,ae===tt?ge:0),ae=tt,Be=[ie,xe,0,0,tt,ge]}else Be=[ie,xe,0,0];if(Be.isScope=!!ft,Ve){let tt=ue,Ct=$;ue=m(k,ue);let Tt=tt===ue;$=m(k,Tt?$:0),A=m(k,Tt&&Ct===$?A:0),we=[ue,$,A]}if(Be.callsite=we,x(k,H)){Ne=[];do{K=ie,he=xe;let tt=m(k,0),Ct;if(tt<-1){Ct=[[m(k,0)]];for(let Tt=-1;Tt>tt;Tt--){let Qt=K;K=m(k,K),he=m(k,K===Qt?he:0);let Ur=m(k,0);Ct.push([Ur,K,he])}}else Ct=[[tt]];Ne.push(Ct)}while(x(k,H))}Be.bindings=Ne,_.push(Be),ee.push(Be)}ie++,k.pos=H+1}while(k.pos<L);return _}function O(V){if(V.length===0)return"";let L=new b;for(let k=0;k<V.length;)k=D(V,k,L,[0,0,0,0,0,0,0]);return L.flush()}function D(V,L,k,_){let ee=V[L],{0:ie,1:ae,2:ge,3:ue,isScope:$,callsite:A,bindings:K}=ee;_[0]<ie?(W(k,_[0],ie),_[0]=ie,_[1]=0):L>0&&k.write(c),_[1]=h(k,ee[1],_[1]);let he=(ee.length===6?1:0)|(A?2:0)|($?4:0);if(h(k,he,0),ee.length===6){let{4:H,5:xe}=ee;H!==_[2]&&(_[3]=0),_[2]=h(k,H,_[2]),_[3]=h(k,xe,_[3])}if(A){let{0:H,1:xe,2:Pe}=ee.callsite;H!==_[4]?(_[5]=0,_[6]=0):xe!==_[5]&&(_[6]=0),_[4]=h(k,H,_[4]),_[5]=h(k,xe,_[5]),_[6]=h(k,Pe,_[6])}if(K)for(let H of K){H.length>1&&h(k,-H.length,0);let xe=H[0][0];h(k,xe,0);let Pe=ie,Ie=ae;for(let Ve=1;Ve<H.length;Ve++){let ft=H[Ve];Pe=h(k,ft[1],Pe),Ie=h(k,ft[2],Ie),h(k,ft[0],0)}}for(L++;L<V.length;){let H=V[L],{0:xe,1:Pe}=H;if(xe>ge||xe===ge&&Pe>=ue)break;L=D(V,L,k,_)}return _[0]<ge?(W(k,_[0],ge),_[0]=ge,_[1]=0):k.write(c),_[1]=h(k,ue,_[1]),L}function W(V,L,k){do V.write(u);while(++L<k)}function J(V){let{length:L}=V,k=new S(V),_=[],ee=0,ie=0,ae=0,ge=0,ue=0;do{let $=k.indexOf(";"),A=[],K=!0,he=0;for(ee=0;k.pos<$;){let H;ee=m(k,ee),ee<he&&(K=!1),he=ee,x(k,$)?(ie=m(k,ie),ae=m(k,ae),ge=m(k,ge),x(k,$)?(ue=m(k,ue),H=[ee,ie,ae,ge,ue]):H=[ee,ie,ae,ge]):H=[ee],A.push(H),k.pos++}K||me(A),_.push(A),k.pos=$+1}while(k.pos<=L);return _}function me(V){V.sort(Z)}function Z(V,L){return V[0]-L[0]}function q(V){let L=new b,k=0,_=0,ee=0,ie=0;for(let ae=0;ae<V.length;ae++){let ge=V[ae];if(ae>0&&L.write(u),ge.length===0)continue;let ue=0;for(let $=0;$<ge.length;$++){let A=ge[$];$>0&&L.write(c),ue=h(L,A[0],ue),A.length!==1&&(k=h(L,A[1],k),_=h(L,A[2],_),ee=h(L,A[3],ee),A.length!==4&&(ie=h(L,A[4],ie)))}}return L.flush()}})});var Z6=ne((ek,tk)=>{(function(e,t){typeof ek=="object"&&typeof tk<"u"?tk.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.resolveURI=t())})(ek,function(){"use strict";let e=/^[\w+.-]+:\/\//,t=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,r=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function a(x){return e.test(x)}function n(x){return x.startsWith("//")}function s(x){return x.startsWith("/")}function i(x){return x.startsWith("file:")}function o(x){return/^[.?#]/.test(x)}function l(x){let g=t.exec(x);return u(g[1],g[2]||"",g[3],g[4]||"",g[5]||"/",g[6]||"",g[7]||"")}function c(x){let g=r.exec(x),y=g[2];return u("file:","",g[1]||"","",s(y)?y:"/"+y,g[3]||"",g[4]||"")}function u(x,g,y,b,S,w,P){return{scheme:x,user:g,host:y,port:b,path:S,query:w,hash:P,type:7}}function d(x){if(n(x)){let y=l("http:"+x);return y.scheme="",y.type=6,y}if(s(x)){let y=l("http://foo.com"+x);return y.scheme="",y.host="",y.type=5,y}if(i(x))return c(x);if(a(x))return l(x);let g=l("http://foo.com/"+x);return g.scheme="",g.host="",g.type=x?x.startsWith("?")?3:x.startsWith("#")?2:4:1,g}function f(x){if(x.endsWith("/.."))return x;let g=x.lastIndexOf("/");return x.slice(0,g+1)}function p(x,g){m(g,g.type),x.path==="/"?x.path=g.path:x.path=f(g.path)+x.path}function m(x,g){let y=g<=4,b=x.path.split("/"),S=1,w=0,P=!1;for(let I=1;I<b.length;I++){let R=b[I];if(!R){P=!0;continue}if(P=!1,R!=="."){if(R===".."){w?(P=!0,w--,S--):y&&(b[S++]=R);continue}b[S++]=R,w++}}let C="";for(let I=1;I<S;I++)C+="/"+b[I];(!C||P&&!C.endsWith("/.."))&&(C+="/"),x.path=C}function h(x,g){if(!x&&!g)return"";let y=d(x),b=y.type;if(g&&b!==7){let w=d(g),P=w.type;switch(b){case 1:y.hash=w.hash;case 2:y.query=w.query;case 3:case 4:p(y,w);case 5:y.user=w.user,y.host=w.host,y.port=w.port;case 6:y.scheme=w.scheme}P>b&&(b=P)}m(y,b);let S=y.query+y.hash;switch(b){case 2:case 3:return S;case 4:{let w=y.path.slice(1);return w?o(g||x)&&!o(w)?"./"+w+S:w+S:S||"."}case 5:return y.path+S;default:return y.scheme+"//"+y.user+y.host+y.port+y.path+S}}return h})});var ak=ne((rk,k0)=>{(function(e,t){if(typeof rk=="object"&&typeof k0<"u")t(k0,Z6(),ZR()),k0.exports=r(k0);else if(typeof define=="function"&&define.amd)define(["module","@jridgewell/resolve-uri","@jridgewell/sourcemap-codec"],function(a){t.apply(this,arguments),a.exports=r(a)});else{let a={exports:{}};t(a,e.resolveURI,e.sourcemapCodec),e=typeof globalThis<"u"?globalThis:e||self,e.traceMapping=r(a)}function r(a){return"default"in a.exports?a.exports.default:a.exports}})(rk,function(e,t,r){"use strict";var a=Object.create,n=Object.defineProperty,s=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=(ye,ke)=>function(){return ke||(0,ye[i(ye)[0]])((ke={exports:{}}).exports,ke),ke.exports},u=(ye,ke)=>{for(var Me in ke)n(ye,Me,{get:ke[Me],enumerable:!0})},d=(ye,ke,Me,je)=>{if(ke&&typeof ke=="object"||typeof ke=="function")for(let et of i(ke))!l.call(ye,et)&&et!==Me&&n(ye,et,{get:()=>ke[et],enumerable:!(je=s(ke,et))||je.enumerable});return ye},f=(ye,ke,Me)=>(Me=ye!=null?a(o(ye)):{},d(ke||!ye||!ye.__esModule?n(Me,"default",{value:ye,enumerable:!0}):Me,ye)),p=ye=>d(n({},"__esModule",{value:!0}),ye),m=c({"umd:@jridgewell/sourcemap-codec"(ye,ke){ke.exports=r}}),h=c({"umd:@jridgewell/resolve-uri"(ye,ke){ke.exports=t}}),x={};u(x,{AnyMap:()=>ue,FlattenMap:()=>ue,GREATEST_LOWER_BOUND:()=>Ie,LEAST_UPPER_BOUND:()=>Pe,TraceMap:()=>Ve,allGeneratedPositionsFor:()=>Tt,decodedMap:()=>qe,decodedMappings:()=>Ne,eachMapping:()=>Qt,encodedMap:()=>ut,encodedMappings:()=>we,generatedPositionFor:()=>Ct,isIgnored:()=>$e,originalPositionFor:()=>tt,presortedDecodedMap:()=>nt,sourceContentFor:()=>pe,traceSegment:()=>Be}),e.exports=p(x);var g=f(m()),y=f(h());function b(ye){if(!ye)return"";let ke=ye.lastIndexOf("/");return ye.slice(0,ke+1)}function S(ye,ke){let Me=b(ye),je=ke?ke+"/":"";return et=>(0,y.default)(je+(et||""),Me)}var w=0,P=1,C=2,I=3,R=4,O=1,D=2;function W(ye,ke){let Me=J(ye,0);if(Me===ye.length)return ye;ke||(ye=ye.slice());for(let je=Me;je<ye.length;je=J(ye,je+1))ye[je]=Z(ye[je],ke);return ye}function J(ye,ke){for(let Me=ke;Me<ye.length;Me++)if(!me(ye[Me]))return Me;return ye.length}function me(ye){for(let ke=1;ke<ye.length;ke++)if(ye[ke][w]<ye[ke-1][w])return!1;return!0}function Z(ye,ke){return ke||(ye=ye.slice()),ye.sort(q)}function q(ye,ke){return ye[w]-ke[w]}function V(ye,ke){let Me=ke.map(()=>[]);for(let je=0;je<ye.length;je++){let et=ye[je];for(let ot=0;ot<et.length;ot++){let ar=et[ot];if(ar.length===1)continue;let Lr=ar[P],yr=ar[C],Za=ar[I],nn=Me[Lr];(nn[yr]||(nn[yr]=[])).push([Za,je,ar[w]])}}for(let je=0;je<Me.length;je++){let et=Me[je];for(let ot=0;ot<et.length;ot++){let ar=et[ot];ar&&ar.sort(q)}}return Me}var L=!1;function k(ye,ke,Me,je){for(;Me<=je;){let et=Me+(je-Me>>1),ot=ye[et][w]-ke;if(ot===0)return L=!0,et;ot<0?Me=et+1:je=et-1}return L=!1,Me-1}function _(ye,ke,Me){for(let je=Me+1;je<ye.length&&ye[je][w]===ke;Me=je++);return Me}function ee(ye,ke,Me){for(let je=Me-1;je>=0&&ye[je][w]===ke;Me=je--);return Me}function ie(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function ae(ye,ke,Me,je){let{lastKey:et,lastNeedle:ot,lastIndex:ar}=Me,Lr=0,yr=ye.length-1;if(je===et){if(ke===ot)return L=ar!==-1&&ye[ar][w]===ke,ar;ke>=ot?Lr=ar===-1?0:ar:yr=ar}return Me.lastKey=je,Me.lastNeedle=ke,Me.lastIndex=k(ye,ke,Lr,yr)}function ge(ye){return typeof ye=="string"?JSON.parse(ye):ye}var ue=function(ye,ke){let Me=ge(ye);if(!("sections"in Me))return new Ve(Me,ke);let je=[],et=[],ot=[],ar=[],Lr=[];$(Me,ke,je,et,ot,ar,Lr,0,0,1/0,1/0);let yr={version:3,file:Me.file,names:ar,sources:et,sourcesContent:ot,mappings:je,ignoreList:Lr};return nt(yr)};function $(ye,ke,Me,je,et,ot,ar,Lr,yr,Za,nn){let{sections:Nn}=ye;for(let Cr=0;Cr<Nn.length;Cr++){let{map:en,offset:jr}=Nn[Cr],Fi=Za,Bi=nn;if(Cr+1<Nn.length){let bu=Nn[Cr+1].offset;Fi=Math.min(Za,Lr+bu.line),Fi===Za?Bi=Math.min(nn,yr+bu.column):Fi<Za&&(Bi=yr+bu.column)}A(en,ke,Me,je,et,ot,ar,Lr+jr.line,yr+jr.column,Fi,Bi)}}function A(ye,ke,Me,je,et,ot,ar,Lr,yr,Za,nn){let Nn=ge(ye);if("sections"in Nn)return $(...arguments);let Cr=new Ve(Nn,ke),en=je.length,jr=ot.length,Fi=Ne(Cr),{resolvedSources:Bi,sourcesContent:bu,ignoreList:Xn}=Cr;if(K(je,Bi),K(ot,Cr.names),bu)K(et,bu);else for(let Xo=0;Xo<Bi.length;Xo++)et.push(null);if(Xn)for(let Xo=0;Xo<Xn.length;Xo++)ar.push(Xn[Xo]+en);for(let Xo=0;Xo<Fi.length;Xo++){let bI=Lr+Xo;if(bI>Za)return;let s5=he(Me,bI),Sse=Xo===0?yr:0,i5=Fi[Xo];for(let vI=0;vI<i5.length;vI++){let Xp=i5[vI],KT=Sse+Xp[w];if(bI===Za&&KT>=nn)return;if(Xp.length===1){s5.push([KT]);continue}let o5=en+Xp[P],l5=Xp[C],c5=Xp[I];s5.push(Xp.length===4?[KT,o5,l5,c5]:[KT,o5,l5,c5,jr+Xp[R]])}}}function K(ye,ke){for(let Me=0;Me<ke.length;Me++)ye.push(ke[Me])}function he(ye,ke){for(let Me=ye.length;Me<=ke;Me++)ye[Me]=[];return ye[ke]}var H="`line` must be greater than 0 (lines start at line 1)",xe="`column` must be greater than or equal to 0 (columns start at column 0)",Pe=-1,Ie=1,Ve=class{constructor(ye,ke){let Me=typeof ye=="string";if(!Me&&ye._decodedMemo)return ye;let je=ge(ye),{version:et,file:ot,names:ar,sourceRoot:Lr,sources:yr,sourcesContent:Za}=je;this.version=et,this.file=ot,this.names=ar||[],this.sourceRoot=Lr,this.sources=yr,this.sourcesContent=Za,this.ignoreList=je.ignoreList||je.x_google_ignoreList||void 0;let nn=S(ke,Lr);this.resolvedSources=yr.map(nn);let{mappings:Nn}=je;if(typeof Nn=="string")this._encoded=Nn,this._decoded=void 0;else if(Array.isArray(Nn))this._encoded=void 0,this._decoded=W(Nn,Me);else throw je.sections?new Error("TraceMap passed sectioned source map, please use FlattenMap export instead"):new Error(`invalid source map: ${JSON.stringify(je)}`);this._decodedMemo=ie(),this._bySources=void 0,this._bySourceMemos=void 0}};function ft(ye){return ye}function we(ye){var ke,Me;return(Me=(ke=ye)._encoded)!=null?Me:ke._encoded=(0,g.encode)(ye._decoded)}function Ne(ye){var ke;return(ke=ye)._decoded||(ke._decoded=(0,g.decode)(ye._encoded))}function Be(ye,ke,Me){let je=Ne(ye);if(ke>=je.length)return null;let et=je[ke],ot=Qa(et,ye._decodedMemo,ke,Me,Ie);return ot===-1?null:et[ot]}function tt(ye,ke){let{line:Me,column:je,bias:et}=ke;if(Me--,Me<0)throw new Error(H);if(je<0)throw new Error(xe);let ot=Ne(ye);if(Me>=ot.length)return st(null,null,null,null);let ar=ot[Me],Lr=Qa(ar,ye._decodedMemo,Me,je,et||Ie);if(Lr===-1)return st(null,null,null,null);let yr=ar[Lr];if(yr.length===1)return st(null,null,null,null);let{names:Za,resolvedSources:nn}=ye;return st(nn[yr[P]],yr[C]+1,yr[I],yr.length===5?Za[yr[R]]:null)}function Ct(ye,ke){let{source:Me,line:je,column:et,bias:ot}=ke;return Nr(ye,Me,je,et,ot||Ie,!1)}function Tt(ye,ke){let{source:Me,line:je,column:et,bias:ot}=ke;return Nr(ye,Me,je,et,ot||Pe,!0)}function Qt(ye,ke){let Me=Ne(ye),{names:je,resolvedSources:et}=ye;for(let ot=0;ot<Me.length;ot++){let ar=Me[ot];for(let Lr=0;Lr<ar.length;Lr++){let yr=ar[Lr],Za=ot+1,nn=yr[0],Nn=null,Cr=null,en=null,jr=null;yr.length!==1&&(Nn=et[yr[1]],Cr=yr[2]+1,en=yr[3]),yr.length===5&&(jr=je[yr[4]]),ke({generatedLine:Za,generatedColumn:nn,source:Nn,originalLine:Cr,originalColumn:en,name:jr})}}}function Ur(ye,ke){let{sources:Me,resolvedSources:je}=ye,et=Me.indexOf(ke);return et===-1&&(et=je.indexOf(ke)),et}function pe(ye,ke){let{sourcesContent:Me}=ye;if(Me==null)return null;let je=Ur(ye,ke);return je===-1?null:Me[je]}function $e(ye,ke){let{ignoreList:Me}=ye;if(Me==null)return!1;let je=Ur(ye,ke);return je===-1?!1:Me.includes(je)}function nt(ye,ke){let Me=new Ve(jt(ye,[]),ke);return Me._decoded=ye.mappings,Me}function qe(ye){return jt(ye,Ne(ye))}function ut(ye){return jt(ye,we(ye))}function jt(ye,ke){return{version:ye.version,file:ye.file,names:ye.names,sourceRoot:ye.sourceRoot,sources:ye.sources,sourcesContent:ye.sourcesContent,mappings:ke,ignoreList:ye.ignoreList||ye.x_google_ignoreList}}function st(ye,ke,Me,je){return{source:ye,line:ke,column:Me,name:je}}function bt(ye,ke){return{line:ye,column:ke}}function Qa(ye,ke,Me,je,et){let ot=ae(ye,je,ke,Me);return L?ot=(et===Pe?_:ee)(ye,je,ot):et===Pe&&ot++,ot===-1||ot===ye.length?-1:ot}function Br(ye,ke,Me,je,et){let ot=Qa(ye,ke,Me,je,Ie);if(!L&&et===Pe&&ot++,ot===-1||ot===ye.length)return[];let ar=L?je:ye[ot][w];L||(ot=ee(ye,ar,ot));let Lr=_(ye,ar,ot),yr=[];for(;ot<=Lr;ot++){let Za=ye[ot];yr.push(bt(Za[O]+1,Za[D]))}return yr}function Nr(ye,ke,Me,je,et,ot){var ar,Lr;if(Me--,Me<0)throw new Error(H);if(je<0)throw new Error(xe);let{sources:yr,resolvedSources:Za}=ye,nn=yr.indexOf(ke);if(nn===-1&&(nn=Za.indexOf(ke)),nn===-1)return ot?[]:bt(null,null);let Nn=(ar=ye)._bySourceMemos||(ar._bySourceMemos=yr.map(ie)),en=((Lr=ye)._bySources||(Lr._bySources=V(Ne(ye),Nn)))[nn][Me];if(en==null)return ot?[]:bt(null,null);let jr=Nn[nn];if(ot)return Br(en,jr,Me,je,et);let Fi=Qa(en,jr,Me,je,et);if(Fi===-1)return bt(null,null);let Bi=en[Fi];return bt(Bi[O]+1,Bi[D])}})});var eU=ne((nk,M0)=>{(function(e,t){if(typeof nk=="object"&&typeof M0<"u")t(M0,ZR(),ak()),M0.exports=r(M0);else if(typeof define=="function"&&define.amd)define(["module","@jridgewell/sourcemap-codec","@jridgewell/trace-mapping"],function(a){t.apply(this,arguments),a.exports=r(a)});else{let a={exports:{}};t(a,e.sourcemapCodec,e.traceMapping),e=typeof globalThis<"u"?globalThis:e||self,e.genMapping=r(a)}function r(a){return"default"in a.exports?a.exports.default:a.exports}})(nk,function(e,t,r){"use strict";var a=Object.create,n=Object.defineProperty,s=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=(we,Ne)=>function(){return Ne||(0,we[i(we)[0]])((Ne={exports:{}}).exports,Ne),Ne.exports},u=(we,Ne)=>{for(var Be in Ne)n(we,Be,{get:Ne[Be],enumerable:!0})},d=(we,Ne,Be,tt)=>{if(Ne&&typeof Ne=="object"||typeof Ne=="function")for(let Ct of i(Ne))!l.call(we,Ct)&&Ct!==Be&&n(we,Ct,{get:()=>Ne[Ct],enumerable:!(tt=s(Ne,Ct))||tt.enumerable});return we},f=(we,Ne,Be)=>(Be=we!=null?a(o(we)):{},d(Ne||!we||!we.__esModule?n(Be,"default",{value:we,enumerable:!0}):Be,we)),p=we=>d(n({},"__esModule",{value:!0}),we),m=c({"umd:@jridgewell/sourcemap-codec"(we,Ne){Ne.exports=t}}),h=c({"umd:@jridgewell/trace-mapping"(we,Ne){Ne.exports=r}}),x={};u(x,{GenMapping:()=>me,addMapping:()=>V,addSegment:()=>q,allMappings:()=>ue,fromMap:()=>ge,maybeAddMapping:()=>k,maybeAddSegment:()=>L,setIgnore:()=>ee,setSourceContent:()=>_,toDecodedMap:()=>ie,toEncodedMap:()=>ae}),e.exports=p(x);var g=class{constructor(){this._indexes={__proto__:null},this.array=[]}};function y(we){return we}function b(we,Ne){return we._indexes[Ne]}function S(we,Ne){let Be=b(we,Ne);if(Be!==void 0)return Be;let{array:tt,_indexes:Ct}=we,Tt=tt.push(Ne);return Ct[Ne]=Tt-1}function w(we,Ne){let Be=b(we,Ne);if(Be===void 0)return;let{array:tt,_indexes:Ct}=we;for(let Tt=Be+1;Tt<tt.length;Tt++){let Qt=tt[Tt];tt[Tt-1]=Qt,Ct[Qt]--}Ct[Ne]=void 0,tt.pop()}var P=f(m()),C=f(h()),I=0,R=1,O=2,D=3,W=4,J=-1,me=class{constructor({file:we,sourceRoot:Ne}={}){this._names=new g,this._sources=new g,this._sourcesContent=[],this._mappings=[],this.file=we,this.sourceRoot=Ne,this._ignoreList=new g}};function Z(we){return we}function q(we,Ne,Be,tt,Ct,Tt,Qt,Ur){return $(!1,we,Ne,Be,tt,Ct,Tt,Qt,Ur)}function V(we,Ne){return ft(!1,we,Ne)}var L=(we,Ne,Be,tt,Ct,Tt,Qt,Ur)=>$(!0,we,Ne,Be,tt,Ct,Tt,Qt,Ur),k=(we,Ne)=>ft(!0,we,Ne);function _(we,Ne,Be){let{_sources:tt,_sourcesContent:Ct}=we,Tt=S(tt,Ne);Ct[Tt]=Be}function ee(we,Ne,Be=!0){let{_sources:tt,_sourcesContent:Ct,_ignoreList:Tt}=we,Qt=S(tt,Ne);Qt===Ct.length&&(Ct[Qt]=null),Be?S(Tt,Qt):w(Tt,Qt)}function ie(we){let{_mappings:Ne,_sources:Be,_sourcesContent:tt,_names:Ct,_ignoreList:Tt}=we;return xe(Ne),{version:3,file:we.file||void 0,names:Ct.array,sourceRoot:we.sourceRoot||void 0,sources:Be.array,sourcesContent:tt,mappings:Ne,ignoreList:Tt.array}}function ae(we){let Ne=ie(we);return Object.assign({},Ne,{mappings:(0,P.encode)(Ne.mappings)})}function ge(we){let Ne=new C.TraceMap(we),Be=new me({file:Ne.file,sourceRoot:Ne.sourceRoot});return Pe(Be._names,Ne.names),Pe(Be._sources,Ne.sources),Be._sourcesContent=Ne.sourcesContent||Ne.sources.map(()=>null),Be._mappings=(0,C.decodedMappings)(Ne),Ne.ignoreList&&Pe(Be._ignoreList,Ne.ignoreList),Be}function ue(we){let Ne=[],{_mappings:Be,_sources:tt,_names:Ct}=we;for(let Tt=0;Tt<Be.length;Tt++){let Qt=Be[Tt];for(let Ur=0;Ur<Qt.length;Ur++){let pe=Qt[Ur],$e={line:Tt+1,column:pe[I]},nt,qe,ut;pe.length!==1&&(nt=tt.array[pe[R]],qe={line:pe[O]+1,column:pe[D]},pe.length===5&&(ut=Ct.array[pe[W]])),Ne.push({generated:$e,source:nt,original:qe,name:ut})}}return Ne}function $(we,Ne,Be,tt,Ct,Tt,Qt,Ur,pe){let{_mappings:$e,_sources:nt,_sourcesContent:qe,_names:ut}=Ne,jt=K($e,Be),st=he(jt,tt);if(!Ct)return we&&Ie(jt,st)?void 0:H(jt,st,[tt]);let bt=S(nt,Ct),Qa=Ur?S(ut,Ur):J;if(bt===qe.length&&(qe[bt]=pe??null),!(we&&Ve(jt,st,bt,Tt,Qt,Qa)))return H(jt,st,Ur?[tt,bt,Tt,Qt,Qa]:[tt,bt,Tt,Qt])}function A(we){}function K(we,Ne){for(let Be=we.length;Be<=Ne;Be++)we[Be]=[];return we[Ne]}function he(we,Ne){let Be=we.length;for(let tt=Be-1;tt>=0;Be=tt--){let Ct=we[tt];if(Ne>=Ct[I])break}return Be}function H(we,Ne,Be){for(let tt=we.length;tt>Ne;tt--)we[tt]=we[tt-1];we[Ne]=Be}function xe(we){let{length:Ne}=we,Be=Ne;for(let tt=Be-1;tt>=0&&!(we[tt].length>0);Be=tt,tt--);Be<Ne&&(we.length=Be)}function Pe(we,Ne){for(let Be=0;Be<Ne.length;Be++)S(we,Ne[Be])}function Ie(we,Ne){return Ne===0?!0:we[Ne-1].length===1}function Ve(we,Ne,Be,tt,Ct,Tt){if(Ne===0)return!1;let Qt=we[Ne-1];return Qt.length===1?!1:Be===Qt[R]&&tt===Qt[O]&&Ct===Qt[D]&&Tt===(Qt.length===5?Qt[W]:J)}function ft(we,Ne,Be){let{generated:tt,source:Ct,original:Tt,name:Qt,content:Ur}=Be;return Ct?$(we,Ne,tt.line-1,tt.column,Ct,Tt.line-1,Tt.column,Qt,Ur):$(we,Ne,tt.line-1,tt.column,null,null,null,null,null)}})});var tU=ne(iC=>{"use strict";Object.defineProperty(iC,"__esModule",{value:!0});iC.default=void 0;var tf=eU(),sk=ak(),ik=class{constructor(t,r){var a;this._map=void 0,this._rawMappings=void 0,this._sourceFileName=void 0,this._lastGenLine=0,this._lastSourceLine=0,this._lastSourceColumn=0,this._inputMap=null;let n=this._map=new tf.GenMapping({sourceRoot:t.sourceRoot});if(this._sourceFileName=(a=t.sourceFileName)==null?void 0:a.replace(/\\/g,"/"),this._rawMappings=void 0,t.inputSourceMap){this._inputMap=new sk.TraceMap(t.inputSourceMap);let i=this._inputMap.resolvedSources;if(i.length)for(let o=0;o<i.length;o++){var s;(0,tf.setSourceContent)(n,i[o],(s=this._inputMap.sourcesContent)==null?void 0:s[o])}}if(typeof r=="string"&&!t.inputSourceMap)(0,tf.setSourceContent)(n,this._sourceFileName,r);else if(typeof r=="object")for(let i of Object.keys(r))(0,tf.setSourceContent)(n,i.replace(/\\/g,"/"),r[i])}get(){return(0,tf.toEncodedMap)(this._map)}getDecoded(){return(0,tf.toDecodedMap)(this._map)}getRawMappings(){return this._rawMappings||(this._rawMappings=(0,tf.allMappings)(this._map))}mark(t,r,a,n,s,i){var o;this._rawMappings=void 0;let l;if(r!=null)if(this._inputMap){if(l=(0,sk.originalPositionFor)(this._inputMap,{line:r,column:a}),!l.name&&s){let c=(0,sk.originalPositionFor)(this._inputMap,s);c.name&&(n=c.name)}}else l={name:null,source:i?.replace(/\\/g,"/")||this._sourceFileName,line:r,column:a};(0,tf.maybeAddMapping)(this._map,{name:n,generated:t,source:(o=l)==null?void 0:o.source,original:l})}};iC.default=ik});var rU=ne(oC=>{"use strict";Object.defineProperty(oC,"__esModule",{value:!0});oC.default=void 0;var ok=class{constructor(t,r){this._map=null,this._buf="",this._str="",this._appendCount=0,this._last=0,this._queue=[],this._queueCursor=0,this._canMarkIdName=!0,this._indentChar="",this._fastIndentations=[],this._position={line:1,column:0},this._sourcePosition={identifierName:void 0,identifierNamePos:void 0,line:void 0,column:void 0,filename:void 0},this._map=t,this._indentChar=r;for(let a=0;a<64;a++)this._fastIndentations.push(r.repeat(a));this._allocQueue()}_allocQueue(){let t=this._queue;for(let r=0;r<16;r++)t.push({char:0,repeat:1,line:void 0,column:void 0,identifierName:void 0,identifierNamePos:void 0,filename:""})}_pushQueue(t,r,a,n,s){let i=this._queueCursor;i===this._queue.length&&this._allocQueue();let o=this._queue[i];o.char=t,o.repeat=r,o.line=a,o.column=n,o.filename=s,this._queueCursor++}_popQueue(){if(this._queueCursor===0)throw new Error("Cannot pop from empty queue");return this._queue[--this._queueCursor]}get(){this._flush();let t=this._map,r={code:(this._buf+this._str).trimRight(),decodedMap:t?.getDecoded(),get __mergedMap(){return this.map},get map(){let a=t?t.get():null;return r.map=a,a},set map(a){Object.defineProperty(r,"map",{value:a,writable:!0})},get rawMappings(){let a=t?.getRawMappings();return r.rawMappings=a,a},set rawMappings(a){Object.defineProperty(r,"rawMappings",{value:a,writable:!0})}};return r}append(t,r){this._flush(),this._append(t,this._sourcePosition,r)}appendChar(t){this._flush(),this._appendChar(t,1,this._sourcePosition)}queue(t){if(t===10)for(;this._queueCursor!==0;){let a=this._queue[this._queueCursor-1].char;if(a!==32&&a!==9)break;this._queueCursor--}let r=this._sourcePosition;this._pushQueue(t,1,r.line,r.column,r.filename)}queueIndentation(t){t!==0&&this._pushQueue(-1,t,void 0,void 0,void 0)}_flush(){let t=this._queueCursor,r=this._queue;for(let a=0;a<t;a++){let n=r[a];this._appendChar(n.char,n.repeat,n)}this._queueCursor=0}_appendChar(t,r,a){if(this._last=t,t===-1){let n=this._fastIndentations[r];n!==void 0?this._str+=n:this._str+=r>1?this._indentChar.repeat(r):this._indentChar}else this._str+=r>1?String.fromCharCode(t).repeat(r):String.fromCharCode(t);t!==10?(this._mark(a.line,a.column,a.identifierName,a.identifierNamePos,a.filename),this._position.column+=r):(this._position.line++,this._position.column=0),this._canMarkIdName&&(a.identifierName=void 0,a.identifierNamePos=void 0)}_append(t,r,a){let n=t.length,s=this._position;if(this._last=t.charCodeAt(n-1),++this._appendCount>4096?(+this._str,this._buf+=this._str,this._str=t,this._appendCount=0):this._str+=t,!a&&!this._map){s.column+=n;return}let{column:i,identifierName:o,identifierNamePos:l,filename:c}=r,u=r.line;(o!=null||l!=null)&&this._canMarkIdName&&(r.identifierName=void 0,r.identifierNamePos=void 0);let d=t.indexOf(`
|
|
`),f=0;for(d!==0&&this._mark(u,i,o,l,c);d!==-1;)s.line++,s.column=0,f=d+1,f<n&&u!==void 0&&this._mark(++u,0,void 0,void 0,c),d=t.indexOf(`
|
|
`,f);s.column+=n-f}_mark(t,r,a,n,s){var i;(i=this._map)==null||i.mark(this._position,t,r,a,n,s)}removeTrailingNewline(){let t=this._queueCursor;t!==0&&this._queue[t-1].char===10&&this._queueCursor--}removeLastSemicolon(){let t=this._queueCursor;t!==0&&this._queue[t-1].char===59&&this._queueCursor--}getLastChar(){let t=this._queueCursor;return t!==0?this._queue[t-1].char:this._last}getNewlineCount(){let t=this._queueCursor,r=0;if(t===0)return this._last===10?1:0;for(let a=t-1;a>=0&&this._queue[a].char===10;a--)r++;return r===t&&this._last===10?r+1:r}endsWithCharAndNewline(){let t=this._queue,r=this._queueCursor;if(r!==0)return t[r-1].char!==10?void 0:r>1?t[r-2].char:this._last}hasContent(){return this._queueCursor!==0||!!this._last}exactSource(t,r){if(!this._map){r();return}this.source("start",t);let a=t.identifierName,n=this._sourcePosition;a&&(this._canMarkIdName=!1,n.identifierName=a),r(),a&&(this._canMarkIdName=!0,n.identifierName=void 0,n.identifierNamePos=void 0),this.source("end",t)}source(t,r){this._map&&this._normalizePosition(t,r,0)}sourceWithOffset(t,r,a){this._map&&this._normalizePosition(t,r,a)}_normalizePosition(t,r,a){let n=r[t],s=this._sourcePosition;n&&(s.line=n.line,s.column=Math.max(n.column+a,0),s.filename=r.filename)}getCurrentColumn(){let t=this._queue,r=this._queueCursor,a=-1,n=0;for(let s=0;s<r;s++){let i=t[s];i.char===10&&(a=n),n+=i.repeat}return a===-1?this._position.column+n:n-1-a}getCurrentLine(){let t=0,r=this._queue;for(let a=0;a<this._queueCursor;a++)r[a].char===10&&t++;return this._position.line+t}};oC.default=ok});var oU=ne(cC=>{"use strict";Object.defineProperty(cC,"__esModule",{value:!0});cC.nodes=void 0;var NIe=fr(),{FLIPPED_ALIAS_KEYS:LIe,isArrayExpression:RIe,isAssignmentExpression:nU,isBinary:sU,isBlockStatement:kIe,isCallExpression:iU,isFunction:D0,isIdentifier:lC,isLiteral:MIe,isMemberExpression:lk,isObjectExpression:DIe,isOptionalCallExpression:_Ie,isOptionalMemberExpression:OIe,isStringLiteral:FIe}=NIe;function Bg(e,t){return e&&(lk(e)||OIe(e)?(Bg(e.object,t),e.computed&&Bg(e.property,t)):sU(e)||nU(e)?(Bg(e.left,t),Bg(e.right,t)):iU(e)||_Ie(e)?(t.hasCall=!0,Bg(e.callee,t)):D0(e)?t.hasFunction=!0:lC(e)&&(t.hasHelper=t.hasHelper||e.callee&&wu(e.callee))),t}function aU(e){return Bg(e,{hasCall:!1,hasFunction:!1,hasHelper:!1})}function wu(e){return e?lk(e)?wu(e.object)||wu(e.property):lC(e)?e.name==="require"||e.name.charCodeAt(0)===95:iU(e)?wu(e.callee):sU(e)||nU(e)?lC(e.left)&&wu(e.left)||wu(e.right):!1:!1}function BIe(e){return MIe(e)||DIe(e)||RIe(e)||lC(e)||lk(e)}var pm=cC.nodes={AssignmentExpression(e){let t=aU(e.right);return t.hasCall&&t.hasHelper||t.hasFunction?t.hasFunction?3:2:0},SwitchCase(e,t){return(e.consequent.length||t.cases[0]===e?1:0)|(!e.consequent.length&&t.cases[t.cases.length-1]===e?2:0)},LogicalExpression(e){return D0(e.left)||D0(e.right)?2:0},Literal(e){return FIe(e)&&e.value==="use strict"?2:0},CallExpression(e){return D0(e.callee)||wu(e)?3:0},OptionalCallExpression(e){return D0(e.callee)?3:0},VariableDeclaration(e){for(let t=0;t<e.declarations.length;t++){let r=e.declarations[t],a=wu(r.id)&&!BIe(r.init);if(!a&&r.init){let n=aU(r.init);a=wu(r.init)&&n.hasCall||n.hasFunction}if(a)return 3}return 0},IfStatement(e){return kIe(e.consequent)?3:0}};pm.ObjectProperty=pm.ObjectTypeProperty=pm.ObjectMethod=function(e,t){return t.properties[0]===e?1:0};pm.ObjectTypeCallProperty=function(e,t){var r;return t.callProperties[0]===e&&!((r=t.properties)!=null&&r.length)?1:0};pm.ObjectTypeIndexer=function(e,t){var r,a;return t.indexers[0]===e&&!((r=t.properties)!=null&&r.length)&&!((a=t.callProperties)!=null&&a.length)?1:0};pm.ObjectTypeInternalSlot=function(e,t){var r,a,n;return t.internalSlots[0]===e&&!((r=t.properties)!=null&&r.length)&&!((a=t.callProperties)!=null&&a.length)&&!((n=t.indexers)!=null&&n.length)?1:0};[["Function",!0],["Class",!0],["Loop",!0],["LabeledStatement",!0],["SwitchStatement",!0],["TryStatement",!0]].forEach(function([e,t]){[e].concat(LIe[e]||[]).forEach(function(r){let a=t?3:0;pm[r]=()=>a})})});var hU=ne(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.AssignmentExpression=gNe;kr.Binary=fU;kr.BinaryExpression=uNe;kr.ClassExpression=pNe;kr.ArrowFunctionExpression=kr.ConditionalExpression=mU;kr.DoExpression=ZIe;kr.FunctionExpression=mNe;kr.FunctionTypeAnnotation=YIe;kr.Identifier=xNe;kr.LogicalExpression=yNe;kr.NullableTypeAnnotation=XIe;kr.ObjectExpression=QIe;kr.OptionalIndexedAccessType=tNe;kr.OptionalCallExpression=kr.OptionalMemberExpression=hNe;kr.SequenceExpression=dNe;kr.TSSatisfiesExpression=kr.TSAsExpression=rNe;kr.TSConditionalType=aNe;kr.TSConstructorType=kr.TSFunctionType=cNe;kr.TSInferType=iNe;kr.TSInstantiationExpression=lNe;kr.TSIntersectionType=sNe;kr.UnaryLike=kr.TSTypeAssertion=pU;kr.TSTypeOperator=oNe;kr.TSUnionType=nNe;kr.IntersectionTypeAnnotation=kr.UnionTypeAnnotation=eNe;kr.UpdateExpression=JIe;kr.AwaitExpression=kr.YieldExpression=fNe;var UIe=fr(),go=mm(),{isArrayTypeAnnotation:jIe,isBinaryExpression:zIe,isCallExpression:VIe,isForOfStatement:qIe,isIndexedAccessType:HIe,isMemberExpression:uU,isObjectPattern:$Ie,isOptionalMemberExpression:GIe,isYieldExpression:KIe,isStatement:WIe}=UIe,lU=new Map([["||",0],["??",0],["|>",0],["&&",1],["|",2],["^",3],["&",4],["==",5],["===",5],["!=",5],["!==",5],["<",6],[">",6],["<=",6],[">=",6],["in",6],["instanceof",6],[">>",7],["<<",7],[">>>",7],["+",8],["-",8],["*",9],["/",9],["%",9],["**",10]]);function cU(e,t){if(t==="BinaryExpression"||t==="LogicalExpression")return lU.get(e.operator);if(t==="TSAsExpression"||t==="TSSatisfiesExpression")return lU.get("in")}function ck(e){return e==="TSAsExpression"||e==="TSSatisfiesExpression"||e==="TSTypeAssertion"}var uC=(e,t)=>{let r=t.type;return(r==="ClassDeclaration"||r==="ClassExpression")&&t.superClass===e},dC=(e,t)=>{let r=t.type;return(r==="MemberExpression"||r==="OptionalMemberExpression")&&t.object===e||(r==="CallExpression"||r==="OptionalCallExpression"||r==="NewExpression")&&t.callee===e||r==="TaggedTemplateExpression"&&t.tag===e||r==="TSNonNullExpression"};function XIe(e,t){return jIe(t)}function YIe(e,t,r){let a=t.type;return a==="UnionTypeAnnotation"||a==="IntersectionTypeAnnotation"||a==="ArrayTypeAnnotation"||Boolean(r&go.TokenContext.arrowFlowReturnType)}function JIe(e,t){return dC(e,t)||uC(e,t)}function dU(e){return Boolean(e&(go.TokenContext.expressionStatement|go.TokenContext.arrowBody))}function QIe(e,t,r){return dU(r)}function ZIe(e,t,r){return!e.async&&Boolean(r&go.TokenContext.expressionStatement)}function fU(e,t){let r=t.type;if(e.type==="BinaryExpression"&&e.operator==="**"&&r==="BinaryExpression"&&t.operator==="**")return t.left===e;if(uC(e,t)||dC(e,t)||r==="UnaryExpression"||r==="SpreadElement"||r==="AwaitExpression")return!0;let a=cU(t,r);if(a!=null){let n=cU(e,e.type);if(a===n&&r==="BinaryExpression"&&t.right===e||a>n)return!0}}function eNe(e,t){let r=t.type;return r==="ArrayTypeAnnotation"||r==="NullableTypeAnnotation"||r==="IntersectionTypeAnnotation"||r==="UnionTypeAnnotation"}function tNe(e,t){return HIe(t)&&t.objectType===e}function rNe(e,t){return(t.type==="AssignmentExpression"||t.type==="AssignmentPattern")&&t.left===e||t.type==="BinaryExpression"&&(t.operator==="|"||t.operator==="&")&&e===t.left?!0:fU(e,t)}function aNe(e,t){let r=t.type;return r==="TSArrayType"||r==="TSIndexedAccessType"&&t.objectType===e||r==="TSOptionalType"||r==="TSTypeOperator"||r==="TSTypeParameter"||(r==="TSIntersectionType"||r==="TSUnionType")&&t.types[0]===e||r==="TSConditionalType"&&(t.checkType===e||t.extendsType===e)}function nNe(e,t){let r=t.type;return r==="TSIntersectionType"||r==="TSTypeOperator"||r==="TSArrayType"||r==="TSIndexedAccessType"&&t.objectType===e||r==="TSOptionalType"}function sNe(e,t){let r=t.type;return r==="TSTypeOperator"||r==="TSArrayType"||r==="TSIndexedAccessType"&&t.objectType===e||r==="TSOptionalType"}function iNe(e,t){let r=t.type;return!!(r==="TSArrayType"||r==="TSIndexedAccessType"&&t.objectType===e||r==="TSOptionalType"||e.typeParameter.constraint&&(r==="TSIntersectionType"||r==="TSUnionType")&&t.types[0]===e)}function oNe(e,t){let r=t.type;return r==="TSArrayType"||r==="TSIndexedAccessType"&&t.objectType===e||r==="TSOptionalType"}function lNe(e,t){let r=t.type;return(r==="CallExpression"||r==="OptionalCallExpression"||r==="NewExpression"||r==="TSInstantiationExpression")&&!!t.typeParameters}function cNe(e,t){let r=t.type;return r==="TSIntersectionType"||r==="TSUnionType"||r==="TSTypeOperator"||r==="TSOptionalType"||r==="TSArrayType"||r==="TSIndexedAccessType"&&t.objectType===e||r==="TSConditionalType"&&(t.checkType===e||t.extendsType===e)}function uNe(e,t,r){return e.operator==="in"&&Boolean(r&go.TokenContext.forInOrInitHeadAccumulate)}function dNe(e,t){let r=t.type;return r==="SequenceExpression"||r==="ParenthesizedExpression"||r==="MemberExpression"&&t.property===e||r==="OptionalMemberExpression"&&t.property===e||r==="TemplateLiteral"?!1:r==="ClassDeclaration"?!0:r==="ForOfStatement"?t.right===e:r==="ExportDefaultDeclaration"?!0:!WIe(t)}function fNe(e,t){let r=t.type;return r==="BinaryExpression"||r==="LogicalExpression"||r==="UnaryExpression"||r==="SpreadElement"||dC(e,t)||r==="AwaitExpression"&&KIe(e)||r==="ConditionalExpression"&&e===t.test||uC(e,t)||ck(r)}function pNe(e,t,r){return Boolean(r&(go.TokenContext.expressionStatement|go.TokenContext.exportDefault))}function pU(e,t){return dC(e,t)||zIe(t)&&t.operator==="**"&&t.left===e||uC(e,t)}function mNe(e,t,r){return Boolean(r&(go.TokenContext.expressionStatement|go.TokenContext.exportDefault))}function mU(e,t){let r=t.type;return r==="UnaryExpression"||r==="SpreadElement"||r==="BinaryExpression"||r==="LogicalExpression"||r==="ConditionalExpression"&&t.test===e||r==="AwaitExpression"||ck(r)?!0:pU(e,t)}function hNe(e,t){return VIe(t)&&t.callee===e||uU(t)&&t.object===e}function gNe(e,t,r){return dU(r)&&$Ie(e.left)?!0:mU(e,t)}function yNe(e,t){let r=t.type;if(ck(r))return!0;if(r!=="LogicalExpression")return!1;switch(e.operator){case"||":return t.operator==="??"||t.operator==="&&";case"&&":return t.operator==="??";case"??":return t.operator!=="??"}}function xNe(e,t,r,a){var n;let s=t.type;if((n=e.extra)!=null&&n.parenthesized&&s==="AssignmentExpression"&&t.left===e){let i=t.right.type;if((i==="FunctionExpression"||i==="ClassExpression")&&t.right.id==null)return!0}return a&&a(e)!==e.name?!1:e.name==="let"?(uU(t,{object:e,computed:!0})||GIe(t,{object:e,computed:!0,optional:!1}))&&r&(go.TokenContext.expressionStatement|go.TokenContext.forInitHead|go.TokenContext.forInHead)?!0:Boolean(r&go.TokenContext.forOfHead):e.name==="async"&&qIe(t,{left:e,await:!1})}});var mm=ne(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.TokenContext=void 0;Cu.isLastChild=DNe;Cu.needsParens=MNe;Cu.needsWhitespace=dk;Cu.needsWhitespaceAfter=kNe;Cu.needsWhitespaceBefore=RNe;var bNe=oU(),vNe=hU(),SNe=fr(),{FLIPPED_ALIAS_KEYS:TNe,VISITOR_KEYS:wNe,isCallExpression:gU,isDecorator:CNe,isExpressionStatement:ENe,isMemberExpression:PNe,isNewExpression:ANe,isParenthesizedExpression:INe}=SNe,klt=Cu.TokenContext={normal:0,expressionStatement:1,arrowBody:2,exportDefault:4,arrowFlowReturnType:8,forInitHead:16,forInHead:32,forOfHead:64,forInOrInitHeadAccumulate:128,forInOrInitHeadAccumulatePassThroughMask:128};function yU(e){let t=new Map;function r(a,n){let s=t.get(a);t.set(a,s?function(i,o,l,c){var u;return(u=s(i,o,l,c))!=null?u:n(i,o,l,c)}:n)}for(let a of Object.keys(e)){let n=TNe[a];if(n)for(let s of n)r(s,e[a]);else r(a,e[a])}return t}var NNe=yU(vNe),LNe=yU(bNe.nodes);function xU(e){return gU(e)?!0:PNe(e)&&xU(e.object)}function dk(e,t,r){var a;if(!e)return!1;ENe(e)&&(e=e.expression);let n=(a=LNe.get(e.type))==null?void 0:a(e,t);return typeof n=="number"?(n&r)!==0:!1}function RNe(e,t){return dk(e,t,1)}function kNe(e,t){return dk(e,t,2)}function MNe(e,t,r,a){var n;return t?ANe(t)&&t.callee===e&&xU(e)?!0:CNe(t)?!uk(e)&&!(gU(e)&&uk(e.callee))&&!INe(e):((n=NNe.get(e.type))==null?void 0:n(e,t,r,a))||!1:!1}function uk(e){switch(e.type){case"Identifier":return!0;case"MemberExpression":return!e.computed&&e.property.type==="Identifier"&&uk(e.object);default:return!1}}function DNe(e,t){let r=wNe[e.type];for(let a=r.length-1;a>=0;a--){let n=e[r[a]];if(n===t)return!0;if(Array.isArray(n)){let s=n.length-1;for(;s>=0&&n[s]===null;)s--;return s>=0&&n[s]===t}else if(n)return!1}return!1}});var bU=ne(fC=>{"use strict";Object.defineProperty(fC,"__esModule",{value:!0});fC.TokenMap=void 0;var _Ne=fr(),{traverseFast:ONe,VISITOR_KEYS:FNe}=_Ne,fk=class{constructor(t,r,a){this._tokens=void 0,this._source=void 0,this._nodesToTokenIndexes=new Map,this._nodesOccurrencesCountCache=new Map,this._tokensCache=new Map,this._tokens=r,this._source=a,ONe(t,n=>{let s=this._getTokensIndexesOfNode(n);s.length>0&&this._nodesToTokenIndexes.set(n,s)}),this._tokensCache.clear()}has(t){return this._nodesToTokenIndexes.has(t)}getIndexes(t){return this._nodesToTokenIndexes.get(t)}find(t,r){let a=this._nodesToTokenIndexes.get(t);if(a)for(let n=0;n<a.length;n++){let s=a[n],i=this._tokens[s];if(r(i,s))return i}return null}findLastIndex(t,r){let a=this._nodesToTokenIndexes.get(t);if(a)for(let n=a.length-1;n>=0;n--){let s=a[n],i=this._tokens[s];if(r(i,s))return s}return-1}findMatching(t,r,a=0){let n=this._nodesToTokenIndexes.get(t);if(n){let s=0,i=a;if(i>1){let o=this._nodesOccurrencesCountCache.get(t);o&&o.test===r&&o.count<i&&(s=o.i+1,a-=o.count+1)}for(;s<n.length;s++){let o=this._tokens[n[s]];if(this.matchesOriginal(o,r)){if(a===0)return i>0&&this._nodesOccurrencesCountCache.set(t,{test:r,count:i,i:s}),o;a--}}}return null}matchesOriginal(t,r){return t.end-t.start!==r.length?!1:t.value!=null?t.value===r:this._source.startsWith(r,t.start)}startMatches(t,r){let a=this._nodesToTokenIndexes.get(t);if(!a)return!1;let n=this._tokens[a[0]];return n.start!==t.start?!1:this.matchesOriginal(n,r)}endMatches(t,r){let a=this._nodesToTokenIndexes.get(t);if(!a)return!1;let n=this._tokens[a[a.length-1]];return n.end!==t.end?!1:this.matchesOriginal(n,r)}_getTokensIndexesOfNode(t){if(t.start==null||t.end==null)return[];let{first:r,last:a}=this._findTokensOfNode(t,0,this._tokens.length-1),n=r,s=BNe(t);(t.type==="ExportNamedDeclaration"||t.type==="ExportDefaultDeclaration")&&t.declaration&&t.declaration.type==="ClassDeclaration"&&s.next();let i=[];for(let o of s){if(o==null||o.start==null||o.end==null)continue;let l=this._findTokensOfNode(o,n,a),c=l.first;for(let u=n;u<c;u++)i.push(u);n=l.last+1}for(let o=n;o<=a;o++)i.push(o);return i}_findTokensOfNode(t,r,a){let n=this._tokensCache.get(t);if(n)return n;let s=this._findFirstTokenOfNode(t.start,r,a),i=this._findLastTokenOfNode(t.end,s,a);return this._tokensCache.set(t,{first:s,last:i}),{first:s,last:i}}_findFirstTokenOfNode(t,r,a){for(;r<=a;){let n=a+r>>1;if(t<this._tokens[n].start)a=n-1;else if(t>this._tokens[n].start)r=n+1;else return n}return r}_findLastTokenOfNode(t,r,a){for(;r<=a;){let n=a+r>>1;if(t<this._tokens[n].end)a=n-1;else if(t>this._tokens[n].end)r=n+1;else return n}return a}};fC.TokenMap=fk;function*BNe(e){if(e.type==="TemplateLiteral"){yield e.quasis[0];for(let r=1;r<e.quasis.length;r++)yield e.expressions[r-1],yield e.quasis[r];return}let t=FNe[e.type];for(let r of t){let a=e[r];a&&(Array.isArray(a)?yield*a:yield a)}}});var vU=ne(Ug=>{"use strict";Object.defineProperty(Ug,"__esModule",{value:!0});Ug.TaggedTemplateExpression=UNe;Ug.TemplateElement=jNe;Ug.TemplateLiteral=VNe;Ug._printTemplate=zNe;function UNe(e){this.print(e.tag),this.print(e.typeParameters),this.print(e.quasi)}function jNe(){throw new Error("TemplateElement printing is handled in TemplateLiteral")}function zNe(e,t){let r=e.quasis,a="`";for(let n=0;n<r.length-1;n++)if(a+=r[n].value.raw,this.token(a+"${",!0),this.print(t[n]),a="}",this.tokenMap){let s=this.tokenMap.findMatching(e,"}",n);s&&this._catchUpTo(s.loc.start)}a+=r[r.length-1].value.raw,this.token(a+"`",!0)}function VNe(e){this._printTemplate(e,e.expressions)}});var TU=ne(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.LogicalExpression=Zr.BinaryExpression=Zr.AssignmentExpression=mLe;Zr.AssignmentPattern=pLe;Zr.AwaitExpression=cLe;Zr.BindExpression=hLe;Zr.CallExpression=oLe;Zr.ConditionalExpression=QNe;Zr.Decorator=nLe;Zr.DoExpression=XNe;Zr.EmptyStatement=dLe;Zr.ExpressionStatement=fLe;Zr.Import=lLe;Zr.MemberExpression=gLe;Zr.MetaProperty=yLe;Zr.ModuleExpression=vLe;Zr.NewExpression=ZNe;Zr.OptionalCallExpression=iLe;Zr.OptionalMemberExpression=sLe;Zr.ParenthesizedExpression=YNe;Zr.PrivateName=xLe;Zr.SequenceExpression=eLe;Zr.Super=rLe;Zr.ThisExpression=tLe;Zr.UnaryExpression=WNe;Zr.UpdateExpression=JNe;Zr.V8IntrinsicIdentifier=bLe;Zr.YieldExpression=uLe;Zr._shouldPrintDecoratorsBeforeExport=aLe;var qNe=fr(),HNe=mm(),{isCallExpression:$Ne,isLiteral:SU,isMemberExpression:pk,isNewExpression:GNe,isPattern:KNe}=qNe;function WNe(e){let{operator:t}=e;t==="void"||t==="delete"||t==="typeof"||t==="throw"?(this.word(t),this.space()):this.token(t),this.print(e.argument)}function XNe(e){e.async&&(this.word("async",!0),this.space()),this.word("do"),this.space(),this.print(e.body)}function YNe(e){this.tokenChar(40);let t=this.enterDelimited();this.print(e.expression),t(),this.rightParens(e)}function JNe(e){e.prefix?(this.token(e.operator),this.print(e.argument)):(this.print(e.argument,!0),this.token(e.operator))}function QNe(e){this.print(e.test),this.space(),this.tokenChar(63),this.space(),this.print(e.consequent),this.space(),this.tokenChar(58),this.space(),this.print(e.alternate)}function ZNe(e,t){if(this.word("new"),this.space(),this.print(e.callee),this.format.minified&&e.arguments.length===0&&!e.optional&&!$Ne(t,{callee:e})&&!pk(t)&&!GNe(t)||(this.print(e.typeArguments),this.print(e.typeParameters),e.optional&&this.token("?."),e.arguments.length===0&&this.tokenMap&&!this.tokenMap.endMatches(e,")")))return;this.tokenChar(40);let r=this.enterDelimited();this.printList(e.arguments,this.shouldPrintTrailingComma(")")),r(),this.rightParens(e)}function eLe(e){this.printList(e.expressions)}function tLe(){this.word("this")}function rLe(){this.word("super")}function aLe(e){return typeof this.format.decoratorsBeforeExport=="boolean"?this.format.decoratorsBeforeExport:typeof e.start=="number"&&e.start===e.declaration.start}function nLe(e){this.tokenChar(64),this.print(e.expression),this.newline()}function sLe(e){let{computed:t}=e,{optional:r,property:a}=e;if(this.print(e.object),!t&&pk(a))throw new TypeError("Got a MemberExpression for MemberExpression property");SU(a)&&typeof a.value=="number"&&(t=!0),r&&this.token("?."),t?(this.tokenChar(91),this.print(a),this.tokenChar(93)):(r||this.tokenChar(46),this.print(a))}function iLe(e){this.print(e.callee),this.print(e.typeParameters),e.optional&&this.token("?."),this.print(e.typeArguments),this.tokenChar(40);let t=this.enterDelimited();this.printList(e.arguments),t(),this.rightParens(e)}function oLe(e){this.print(e.callee),this.print(e.typeArguments),this.print(e.typeParameters),this.tokenChar(40);let t=this.enterDelimited();this.printList(e.arguments,this.shouldPrintTrailingComma(")")),t(),this.rightParens(e)}function lLe(){this.word("import")}function cLe(e){this.word("await"),this.space(),this.print(e.argument)}function uLe(e){e.delegate?(this.word("yield",!0),this.tokenChar(42),e.argument&&(this.space(),this.print(e.argument))):e.argument?(this.word("yield",!0),this.space(),this.print(e.argument)):this.word("yield")}function dLe(){this.semicolon(!0)}function fLe(e){this.tokenContext|=HNe.TokenContext.expressionStatement,this.print(e.expression),this.semicolon()}function pLe(e){this.print(e.left),(e.left.type==="Identifier"||KNe(e.left))&&(e.left.optional&&this.tokenChar(63),this.print(e.left.typeAnnotation)),this.space(),this.tokenChar(61),this.space(),this.print(e.right)}function mLe(e){this.print(e.left),this.space(),e.operator==="in"||e.operator==="instanceof"?this.word(e.operator):(this.token(e.operator),this._endsWithDiv=e.operator==="/"),this.space(),this.print(e.right)}function hLe(e){this.print(e.object),this.token("::"),this.print(e.callee)}function gLe(e){if(this.print(e.object),!e.computed&&pk(e.property))throw new TypeError("Got a MemberExpression for MemberExpression property");let t=e.computed;if(SU(e.property)&&typeof e.property.value=="number"&&(t=!0),t){let r=this.enterDelimited();this.tokenChar(91),this.print(e.property),this.tokenChar(93),r()}else this.tokenChar(46),this.print(e.property)}function yLe(e){this.print(e.meta),this.tokenChar(46),this.print(e.property)}function xLe(e){this.tokenChar(35),this.print(e.id)}function bLe(e){this.tokenChar(37),this.word(e.name)}function vLe(e){this.word("module",!0),this.space(),this.tokenChar(123),this.indent();let{body:t}=e;(t.body.length||t.directives.length)&&this.newline(),this.print(t),this.dedent(),this.rightBrace(e)}});var PU=ne(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.BreakStatement=LLe;tn.CatchClause=OLe;tn.ContinueStatement=RLe;tn.DebuggerStatement=ULe;tn.DoWhileStatement=NLe;tn.ForOfStatement=tn.ForInStatement=void 0;tn.ForStatement=ALe;tn.IfStatement=PLe;tn.LabeledStatement=DLe;tn.ReturnStatement=kLe;tn.SwitchCase=BLe;tn.SwitchStatement=FLe;tn.ThrowStatement=MLe;tn.TryStatement=_Le;tn.VariableDeclaration=jLe;tn.VariableDeclarator=zLe;tn.WhileStatement=ILe;tn.WithStatement=ELe;var SLe=fr(),{isFor:wU,isForStatement:TLe,isIfStatement:wLe,isStatement:CLe}=SLe;function ELe(e){this.word("with"),this.space(),this.tokenChar(40),this.print(e.object),this.tokenChar(41),this.printBlock(e)}function PLe(e){this.word("if"),this.space(),this.tokenChar(40),this.print(e.test),this.tokenChar(41),this.space();let t=e.alternate&&wLe(CU(e.consequent));t&&(this.tokenChar(123),this.newline(),this.indent()),this.printAndIndentOnComments(e.consequent),t&&(this.dedent(),this.newline(),this.tokenChar(125)),e.alternate&&(this.endsWith(125)&&this.space(),this.word("else"),this.space(),this.printAndIndentOnComments(e.alternate))}function CU(e){let{body:t}=e;return CLe(t)===!1?e:CU(t)}function ALe(e){this.word("for"),this.space(),this.tokenChar(40);{let t=this.enterForStatementInit();this.print(e.init),t()}this.tokenChar(59),e.test&&(this.space(),this.print(e.test)),this.token(";",!1,1),e.update&&(this.space(),this.print(e.update)),this.tokenChar(41),this.printBlock(e)}function ILe(e){this.word("while"),this.space(),this.tokenChar(40),this.print(e.test),this.tokenChar(41),this.printBlock(e)}function EU(e){this.word("for"),this.space();let t=e.type==="ForOfStatement";t&&e.await&&(this.word("await"),this.space()),this.noIndentInnerCommentsHere(),this.tokenChar(40);{let r=this.enterForXStatementInit(t);this.print(e.left),r?.()}this.space(),this.word(t?"of":"in"),this.space(),this.print(e.right),this.tokenChar(41),this.printBlock(e)}var Flt=tn.ForInStatement=EU,Blt=tn.ForOfStatement=EU;function NLe(e){this.word("do"),this.space(),this.print(e.body),this.space(),this.word("while"),this.space(),this.tokenChar(40),this.print(e.test),this.tokenChar(41),this.semicolon()}function pC(e,t){t&&(e.space(),e.printTerminatorless(t)),e.semicolon()}function LLe(e){this.word("break"),pC(this,e.label)}function RLe(e){this.word("continue"),pC(this,e.label)}function kLe(e){this.word("return"),pC(this,e.argument)}function MLe(e){this.word("throw"),pC(this,e.argument)}function DLe(e){this.print(e.label),this.tokenChar(58),this.space(),this.print(e.body)}function _Le(e){this.word("try"),this.space(),this.print(e.block),this.space(),e.handlers?this.print(e.handlers[0]):this.print(e.handler),e.finalizer&&(this.space(),this.word("finally"),this.space(),this.print(e.finalizer))}function OLe(e){this.word("catch"),this.space(),e.param&&(this.tokenChar(40),this.print(e.param),this.print(e.param.typeAnnotation),this.tokenChar(41),this.space()),this.print(e.body)}function FLe(e){this.word("switch"),this.space(),this.tokenChar(40),this.print(e.discriminant),this.tokenChar(41),this.space(),this.tokenChar(123),this.printSequence(e.cases,!0),this.rightBrace(e)}function BLe(e){e.test?(this.word("case"),this.space(),this.print(e.test),this.tokenChar(58)):(this.word("default"),this.tokenChar(58)),e.consequent.length&&(this.newline(),this.printSequence(e.consequent,!0))}function ULe(){this.word("debugger"),this.semicolon()}function jLe(e,t){e.declare&&(this.word("declare"),this.space());let{kind:r}=e;r==="await using"?(this.word("await"),this.space(),this.word("using",!0)):this.word(r,r==="using"),this.space();let a=!1;if(!wU(t))for(let n of e.declarations)n.init&&(a=!0);if(this.printList(e.declarations,void 0,void 0,e.declarations.length>1,a?function(n){this.token(",",!1,n),this.newline()}:void 0),wU(t)){if(TLe(t)){if(t.init===e)return}else if(t.left===e)return}this.semicolon()}function zLe(e){this.print(e.id),e.definite&&this.tokenChar(33),this.print(e.id.typeAnnotation),e.init&&(this.space(),this.tokenChar(61),this.space(),this.print(e.init))}});var AU=ne(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0});el.ClassAccessorProperty=XLe;el.ClassBody=GLe;el.ClassExpression=el.ClassDeclaration=$Le;el.ClassMethod=JLe;el.ClassPrivateMethod=QLe;el.ClassPrivateProperty=YLe;el.ClassProperty=WLe;el.StaticBlock=eRe;el._classMethodHead=ZLe;var VLe=fr(),{isExportDefaultDeclaration:qLe,isExportNamedDeclaration:HLe}=VLe;function $Le(e,t){(!(qLe(t)||HLe(t))||!this._shouldPrintDecoratorsBeforeExport(t))&&this.printJoin(e.decorators),e.declare&&(this.word("declare"),this.space()),e.abstract&&(this.word("abstract"),this.space()),this.word("class"),e.id&&(this.space(),this.print(e.id)),this.print(e.typeParameters),e.superClass&&(this.space(),this.word("extends"),this.space(),this.print(e.superClass),this.print(e.superTypeParameters)),e.implements&&(this.space(),this.word("implements"),this.space(),this.printList(e.implements)),this.space(),this.print(e.body)}function GLe(e){if(this.tokenChar(123),e.body.length===0)this.tokenChar(125);else{this.newline();let t=KLe(this,e);t?.(-1);let r=this.enterDelimited();this.printJoin(e.body,!0,!0,t,!0),r(),this.endsWith(10)||this.newline(),this.rightBrace(e)}}function KLe(e,t){if(!e.tokenMap||t.start==null||t.end==null)return null;let r=e.tokenMap.getIndexes(t);if(!r)return null;let a=1,n=0,s=0,i=()=>{for(;s<t.body.length&&t.body[s].start==null;)s++};return i(),o=>{s<=o&&(s=o+1,i());let l=s===t.body.length?t.end:t.body[s].start,c;for(;a<r.length&&e.tokenMap.matchesOriginal(c=e._tokens[r[a]],";")&&c.start<l;)e.token(";",void 0,n++),a++}}function WLe(e){if(this.printJoin(e.decorators),!e.static&&!this.format.preserveFormat){var t;let r=(t=e.key.loc)==null||(t=t.end)==null?void 0:t.line;r&&this.catchUp(r)}this.tsPrintClassMemberModifiers(e),e.computed?(this.tokenChar(91),this.print(e.key),this.tokenChar(93)):(this._variance(e),this.print(e.key)),e.optional&&this.tokenChar(63),e.definite&&this.tokenChar(33),this.print(e.typeAnnotation),e.value&&(this.space(),this.tokenChar(61),this.space(),this.print(e.value)),this.semicolon()}function XLe(e){var t;this.printJoin(e.decorators);let r=(t=e.key.loc)==null||(t=t.end)==null?void 0:t.line;r&&this.catchUp(r),this.tsPrintClassMemberModifiers(e),this.word("accessor",!0),this.space(),e.computed?(this.tokenChar(91),this.print(e.key),this.tokenChar(93)):(this._variance(e),this.print(e.key)),e.optional&&this.tokenChar(63),e.definite&&this.tokenChar(33),this.print(e.typeAnnotation),e.value&&(this.space(),this.tokenChar(61),this.space(),this.print(e.value)),this.semicolon()}function YLe(e){this.printJoin(e.decorators),this.tsPrintClassMemberModifiers(e),this.print(e.key),e.optional&&this.tokenChar(63),e.definite&&this.tokenChar(33),this.print(e.typeAnnotation),e.value&&(this.space(),this.tokenChar(61),this.space(),this.print(e.value)),this.semicolon()}function JLe(e){this._classMethodHead(e),this.space(),this.print(e.body)}function QLe(e){this._classMethodHead(e),this.space(),this.print(e.body)}function ZLe(e){if(this.printJoin(e.decorators),!this.format.preserveFormat){var t;let r=(t=e.key.loc)==null||(t=t.end)==null?void 0:t.line;r&&this.catchUp(r)}this.tsPrintClassMemberModifiers(e),this._methodHead(e)}function eRe(e){this.word("static"),this.space(),this.tokenChar(123),e.body.length===0?this.tokenChar(125):(this.newline(),this.printSequence(e.body,!0),this.rightBrace(e))}});var IU=ne(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});tl.ArrowFunctionExpression=dRe;tl.FunctionDeclaration=tl.FunctionExpression=uRe;tl._functionHead=cRe;tl._methodHead=oRe;tl._param=iRe;tl._parameters=sRe;tl._params=nRe;tl._predicate=lRe;tl._shouldPrintArrowParamsParens=fRe;var tRe=fr(),rRe=mm(),{isIdentifier:aRe}=tRe;function nRe(e,t,r){this.print(e.typeParameters);let a=pRe.call(this,t,r);a&&this.sourceIdentifierName(a.name,a.pos),this.tokenChar(40),this._parameters(e.params,")");let n=e.type==="ArrowFunctionExpression";this.print(e.returnType,n),this._noLineTerminator=n}function sRe(e,t){let r=this.enterDelimited(),a=this.shouldPrintTrailingComma(t),n=e.length;for(let s=0;s<n;s++)this._param(e[s]),(a||s<n-1)&&(this.token(",",void 0,s),this.space());this.token(t),r()}function iRe(e){this.printJoin(e.decorators),this.print(e),e.optional&&this.tokenChar(63),this.print(e.typeAnnotation)}function oRe(e){let t=e.kind,r=e.key;(t==="get"||t==="set")&&(this.word(t),this.space()),e.async&&(this.word("async",!0),this.space()),(t==="method"||t==="init")&&e.generator&&this.tokenChar(42),e.computed?(this.tokenChar(91),this.print(r),this.tokenChar(93)):this.print(r),e.optional&&this.tokenChar(63),this._params(e,e.computed&&e.key.type!=="StringLiteral"?void 0:e.key)}function lRe(e,t){e.predicate&&(e.returnType||this.tokenChar(58),this.space(),this.print(e.predicate,t))}function cRe(e,t){e.async&&(this.word("async"),this.format.preserveFormat||(this._endsWithInnerRaw=!1),this.space()),this.word("function"),e.generator&&(this.format.preserveFormat||(this._endsWithInnerRaw=!1),this.tokenChar(42)),this.space(),e.id&&this.print(e.id),this._params(e,e.id,t),e.type!=="TSDeclareFunction"&&this._predicate(e)}function uRe(e,t){this._functionHead(e,t),this.space(),this.print(e.body)}function dRe(e,t){e.async&&(this.word("async",!0),this.space()),this._shouldPrintArrowParamsParens(e)?this._params(e,void 0,t):this.print(e.params[0],!0),this._predicate(e,!0),this.space(),this.printInnerComments(),this.token("=>"),this.space(),this.tokenContext|=rRe.TokenContext.arrowBody,this.print(e.body)}function fRe(e){var t,r;if(e.params.length!==1||e.typeParameters||e.returnType||e.predicate)return!0;let a=e.params[0];if(!aRe(a)||a.typeAnnotation||a.optional||(t=a.leadingComments)!=null&&t.length||(r=a.trailingComments)!=null&&r.length)return!0;if(this.tokenMap){if(e.loc==null||this.tokenMap.findMatching(e,"(")!==null)return!0;let n=this.tokenMap.findMatching(e,"=>");return n?.loc==null?!0:n.loc.start.line!==e.loc.start.line}return!!this.format.retainLines}function pRe(e,t){let r=e;if(!r&&t){let l=t.type;l==="VariableDeclarator"?r=t.id:l==="AssignmentExpression"||l==="AssignmentPattern"?r=t.left:l==="ObjectProperty"||l==="ClassProperty"?(!t.computed||t.key.type==="StringLiteral")&&(r=t.key):(l==="ClassPrivateProperty"||l==="ClassAccessorProperty")&&(r=t.key)}if(!r)return;let a;if(r.type==="Identifier"){var n,s;a={pos:(n=r.loc)==null?void 0:n.start,name:((s=r.loc)==null?void 0:s.identifierName)||r.name}}else if(r.type==="PrivateName"){var i;a={pos:(i=r.loc)==null?void 0:i.start,name:"#"+r.id.name}}else if(r.type==="StringLiteral"){var o;a={pos:(o=r.loc)==null?void 0:o.start,name:r.value}}return a}});var mk=ne(mi=>{"use strict";Object.defineProperty(mi,"__esModule",{value:!0});mi.ExportAllDeclaration=ARe;mi.ExportDefaultDeclaration=NRe;mi.ExportDefaultSpecifier=wRe;mi.ExportNamedDeclaration=IRe;mi.ExportNamespaceSpecifier=ERe;mi.ExportSpecifier=CRe;mi.ImportAttribute=RRe;mi.ImportDeclaration=LRe;mi.ImportDefaultSpecifier=TRe;mi.ImportExpression=MRe;mi.ImportNamespaceSpecifier=kRe;mi.ImportSpecifier=SRe;mi._printAttributes=PRe;var mRe=fr(),hRe=mm(),{isClassDeclaration:gRe,isExportDefaultSpecifier:yRe,isExportNamespaceSpecifier:xRe,isImportDefaultSpecifier:bRe,isImportNamespaceSpecifier:vRe,isStatement:LU}=mRe;function SRe(e){(e.importKind==="type"||e.importKind==="typeof")&&(this.word(e.importKind),this.space()),this.print(e.imported),e.local&&e.local.name!==e.imported.name&&(this.space(),this.word("as"),this.space(),this.print(e.local))}function TRe(e){this.print(e.local)}function wRe(e){this.print(e.exported)}function CRe(e){e.exportKind==="type"&&(this.word("type"),this.space()),this.print(e.local),e.exported&&e.local.name!==e.exported.name&&(this.space(),this.word("as"),this.space(),this.print(e.exported))}function ERe(e){this.tokenChar(42),this.space(),this.word("as"),this.space(),this.print(e.exported)}var NU=!1;function PRe(e,t){var r;let{importAttributesKeyword:a}=this.format,{attributes:n,assertions:s}=e;n&&!a&&e.extra&&(e.extra.deprecatedAssertSyntax||e.extra.deprecatedWithLegacySyntax)&&!NU&&(NU=!0);let i=a==="assert"||!a&&s;if(this.word(i?"assert":"with"),this.space(),!i&&(a==="with-legacy"||!a&&(r=e.extra)!=null&&r.deprecatedWithLegacySyntax)){this.printList(n||s);return}let o=t?1:0;this.token("{",void 0,o),this.space(),this.printList(n||s,this.shouldPrintTrailingComma("}")),this.space(),this.token("}",void 0,o)}function ARe(e){var t,r;this.word("export"),this.space(),e.exportKind==="type"&&(this.word("type"),this.space()),this.tokenChar(42),this.space(),this.word("from"),this.space(),(t=e.attributes)!=null&&t.length||(r=e.assertions)!=null&&r.length?(this.print(e.source,!0),this.space(),this._printAttributes(e,!1)):this.print(e.source),this.semicolon()}function RU(e,t){gRe(t.declaration)&&e._shouldPrintDecoratorsBeforeExport(t)&&e.printJoin(t.declaration.decorators)}function IRe(e){if(RU(this,e),this.word("export"),this.space(),e.declaration){let a=e.declaration;this.print(a),LU(a)||this.semicolon()}else{e.exportKind==="type"&&(this.word("type"),this.space());let a=e.specifiers.slice(0),n=!1;for(;;){let i=a[0];if(yRe(i)||xRe(i))n=!0,this.print(a.shift()),a.length&&(this.tokenChar(44),this.space());else break}let s=!1;if((a.length||!a.length&&!n)&&(s=!0,this.tokenChar(123),a.length&&(this.space(),this.printList(a,this.shouldPrintTrailingComma("}")),this.space()),this.tokenChar(125)),e.source){var t,r;this.space(),this.word("from"),this.space(),(t=e.attributes)!=null&&t.length||(r=e.assertions)!=null&&r.length?(this.print(e.source,!0),this.space(),this._printAttributes(e,s)):this.print(e.source)}this.semicolon()}}function NRe(e){RU(this,e),this.word("export"),this.noIndentInnerCommentsHere(),this.space(),this.word("default"),this.space(),this.tokenContext|=hRe.TokenContext.exportDefault;let t=e.declaration;this.print(t),LU(t)||this.semicolon()}function LRe(e){var t,r;this.word("import"),this.space();let a=e.importKind==="type"||e.importKind==="typeof";a?(this.noIndentInnerCommentsHere(),this.word(e.importKind),this.space()):e.module?(this.noIndentInnerCommentsHere(),this.word("module"),this.space()):e.phase&&(this.noIndentInnerCommentsHere(),this.word(e.phase),this.space());let n=e.specifiers.slice(0),s=!!n.length;for(;s;){let o=n[0];if(bRe(o)||vRe(o))this.print(n.shift()),n.length&&(this.tokenChar(44),this.space());else break}let i=!1;n.length?(i=!0,this.tokenChar(123),this.space(),this.printList(n,this.shouldPrintTrailingComma("}")),this.space(),this.tokenChar(125)):a&&!s&&(i=!0,this.tokenChar(123),this.tokenChar(125)),(s||a)&&(this.space(),this.word("from"),this.space()),(t=e.attributes)!=null&&t.length||(r=e.assertions)!=null&&r.length?(this.print(e.source,!0),this.space(),this._printAttributes(e,i)):this.print(e.source),this.semicolon()}function RRe(e){this.print(e.key),this.tokenChar(58),this.space(),this.print(e.value)}function kRe(e){this.tokenChar(42),this.space(),this.word("as"),this.space(),this.print(e.local)}function MRe(e){this.word("import"),e.phase&&(this.tokenChar(46),this.word(e.phase)),this.tokenChar(40);let t=this.shouldPrintTrailingComma(")");this.print(e.source),e.options!=null&&(this.tokenChar(44),this.space(),this.print(e.options)),t&&this.tokenChar(44),this.rightParens(e)}});var _U=ne((qlt,DU)=>{"use strict";var kU={},DRe=kU.hasOwnProperty,MU=(e,t)=>{for(let r in e)DRe.call(e,r)&&t(r,e[r])},_Re=(e,t)=>(t&&MU(t,(r,a)=>{e[r]=a}),e),ORe=(e,t)=>{let r=e.length,a=-1;for(;++a<r;)t(e[a])},mC=e=>"\\u"+("0000"+e).slice(-4),_0=(e,t)=>{let r=e.toString(16);return t?r:r.toUpperCase()},O0=kU.toString,FRe=Array.isArray,BRe=e=>typeof Buffer=="function"&&Buffer.isBuffer(e),URe=e=>O0.call(e)=="[object Object]",jRe=e=>typeof e=="string"||O0.call(e)=="[object String]",zRe=e=>typeof e=="number"||O0.call(e)=="[object Number]",hk=e=>typeof e=="bigint",VRe=e=>typeof e=="function",qRe=e=>O0.call(e)=="[object Map]",HRe=e=>O0.call(e)=="[object Set]",$Re={"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},GRe=/[\\\b\f\n\r\t]/,KRe=/[0-9]/,WRe=/[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,XRe=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^]/g,YRe=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^ !#-&\(-\[\]-_a-~]/g,rf=(e,t)=>{let r=()=>{c=l,++t.indentLevel,l=t.indent.repeat(t.indentLevel)},a={escapeEverything:!1,minimal:!1,isScriptContext:!1,quotes:"single",wrap:!1,es6:!1,json:!1,compact:!0,lowercaseHex:!1,numbers:"decimal",indent:" ",indentLevel:0,__inline1__:!1,__inline2__:!1},n=t&&t.json;n&&(a.quotes="double",a.wrap=!0),t=_Re(a,t),t.quotes!="single"&&t.quotes!="double"&&t.quotes!="backtick"&&(t.quotes="single");let s=t.quotes=="double"?'"':t.quotes=="backtick"?"`":"'",i=t.compact,o=t.lowercaseHex,l=t.indent.repeat(t.indentLevel),c="",u=t.__inline1__,d=t.__inline2__,f=i?"":`
|
|
`,p,m=!0,h=t.numbers=="binary",x=t.numbers=="octal",g=t.numbers=="decimal",y=t.numbers=="hexadecimal";if(n&&e&&VRe(e.toJSON)&&(e=e.toJSON()),!jRe(e)){if(qRe(e))return e.size==0?"new Map()":(i||(t.__inline1__=!0,t.__inline2__=!1),"new Map("+rf(Array.from(e),t)+")");if(HRe(e))return e.size==0?"new Set()":"new Set("+rf(Array.from(e),t)+")";if(BRe(e))return e.length==0?"Buffer.from([])":"Buffer.from("+rf(Array.from(e),t)+")";if(FRe(e))return p=[],t.wrap=!0,u&&(t.__inline1__=!1,t.__inline2__=!0),d||r(),ORe(e,S=>{m=!1,d&&(t.__inline2__=!1),p.push((i||d?"":l)+rf(S,t))}),m?"[]":d?"["+p.join(", ")+"]":"["+f+p.join(","+f)+f+(i?"":c)+"]";if(zRe(e)||hk(e)){if(n)return JSON.stringify(Number(e));let S;if(g)S=String(e);else if(y){let w=e.toString(16);o||(w=w.toUpperCase()),S="0x"+w}else h?S="0b"+e.toString(2):x&&(S="0o"+e.toString(8));return hk(e)?S+"n":S}else return hk(e)?n?JSON.stringify(Number(e)):e+"n":URe(e)?(p=[],t.wrap=!0,r(),MU(e,(S,w)=>{m=!1,p.push((i?"":l)+rf(S,t)+":"+(i?"":" ")+rf(w,t))}),m?"{}":"{"+f+p.join(","+f)+f+(i?"":c)+"}"):n?JSON.stringify(e)||"null":String(e)}let b=t.escapeEverything?XRe:YRe;return p=e.replace(b,(S,w,P,C,I,R)=>{if(w){if(t.minimal)return w;let D=w.charCodeAt(0),W=w.charCodeAt(1);if(t.es6){let J=(D-55296)*1024+W-56320+65536;return"\\u{"+_0(J,o)+"}"}return mC(_0(D,o))+mC(_0(W,o))}if(P)return mC(_0(P.charCodeAt(0),o));if(S=="\0"&&!n&&!KRe.test(R.charAt(I+1)))return"\\0";if(C)return C==s||t.escapeEverything?"\\"+C:C;if(GRe.test(S))return $Re[S];if(t.minimal&&!WRe.test(S))return S;let O=_0(S.charCodeAt(0),o);return n||O.length>2?mC(O):"\\x"+("00"+O).slice(-2)}),s=="`"&&(p=p.replace(/\$\{/g,"\\${")),t.isScriptContext&&(p=p.replace(/<\/(script|style)/gi,"<\\/$1").replace(/<!--/g,n?"\\u003C!--":"\\x3C!--")),t.wrap&&(p=s+p+s),p};rf.version="3.0.2";DU.exports=rf});var yk=ne(Ta=>{"use strict";Object.defineProperty(Ta,"__esModule",{value:!0});Ta.ArgumentPlaceholder=tke;Ta.ArrayPattern=Ta.ArrayExpression=ike;Ta.BigIntLiteral=mke;Ta.BooleanLiteral=uke;Ta.Identifier=eke;Ta.NullLiteral=dke;Ta.NumericLiteral=fke;Ta.ObjectPattern=Ta.ObjectExpression=ake;Ta.ObjectMethod=nke;Ta.ObjectProperty=ske;Ta.PipelineBareFunction=yke;Ta.PipelinePrimaryTopicReference=xke;Ta.PipelineTopicExpression=gke;Ta.RecordExpression=oke;Ta.RegExpLiteral=cke;Ta.SpreadElement=Ta.RestElement=rke;Ta.StringLiteral=pke;Ta.TopicReference=hke;Ta.TupleExpression=lke;Ta.VoidPattern=bke;Ta._getRawIdentifier=ZRe;var JRe=fr(),BU=_U(),{isAssignmentPattern:QRe,isIdentifier:gk}=JRe,OU=null,hC="";function ZRe(e){if(e===OU)return hC;OU=e;let{name:t}=e,r=this.tokenMap.find(e,a=>a.value===t);return r?(hC=this._originalCode.slice(r.start,r.end),hC):hC=e.name}function eke(e){var t;this.sourceIdentifierName(((t=e.loc)==null?void 0:t.identifierName)||e.name),this.word(this.tokenMap?this._getRawIdentifier(e):e.name)}function tke(){this.tokenChar(63)}function rke(e){this.token("..."),this.print(e.argument)}function ake(e){let t=e.properties;if(this.tokenChar(123),t.length){let r=this.enterDelimited();this.space(),this.printList(t,this.shouldPrintTrailingComma("}"),!0,!0),this.space(),r()}this.sourceWithOffset("end",e.loc,-1),this.tokenChar(125)}function nke(e){this.printJoin(e.decorators),this._methodHead(e),this.space(),this.print(e.body)}function ske(e){if(this.printJoin(e.decorators),e.computed)this.tokenChar(91),this.print(e.key),this.tokenChar(93);else{if(QRe(e.value)&&gk(e.key)&&e.key.name===e.value.left.name){this.print(e.value);return}if(this.print(e.key),e.shorthand&&gk(e.key)&&gk(e.value)&&e.key.name===e.value.name)return}this.tokenChar(58),this.space(),this.print(e.value)}function ike(e){let t=e.elements,r=t.length;this.tokenChar(91);let a=this.enterDelimited();for(let n=0;n<t.length;n++){let s=t[n];s?(n>0&&this.space(),this.print(s),(n<r-1||this.shouldPrintTrailingComma("]"))&&this.token(",",!1,n)):this.token(",",!1,n)}a(),this.tokenChar(93)}function oke(e){let t=e.properties,r,a;if(this.format.recordAndTupleSyntaxType==="bar")r="{|",a="|}";else{if(this.format.recordAndTupleSyntaxType!=="hash"&&this.format.recordAndTupleSyntaxType!=null)throw new Error(`The "recordAndTupleSyntaxType" generator option must be "bar" or "hash" (${JSON.stringify(this.format.recordAndTupleSyntaxType)} received).`);r="#{",a="}"}this.token(r),t.length&&(this.space(),this.printList(t,this.shouldPrintTrailingComma(a),!0,!0),this.space()),this.token(a)}function lke(e){let t=e.elements,r=t.length,a,n;if(this.format.recordAndTupleSyntaxType==="bar")a="[|",n="|]";else if(this.format.recordAndTupleSyntaxType==="hash")a="#[",n="]";else throw new Error(`${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`);this.token(a);for(let s=0;s<t.length;s++){let i=t[s];i&&(s>0&&this.space(),this.print(i),(s<r-1||this.shouldPrintTrailingComma(n))&&this.token(",",!1,s))}this.token(n)}function cke(e){this.word(`/${e.pattern}/${e.flags}`)}function uke(e){this.word(e.value?"true":"false")}function dke(){this.word("null")}function fke(e){let t=this.getPossibleRaw(e),r=this.format.jsescOption,a=e.value,n=a+"";r.numbers?this.number(BU(a,r),a):t==null?this.number(n,a):this.format.minified?this.number(t.length<n.length?t:n,a):this.number(t,a)}function pke(e){let t=this.getPossibleRaw(e);if(!this.format.minified&&t!==void 0){this.token(t);return}let r=BU(e.value,this.format.jsescOption);this.token(r)}function mke(e){let t=this.getPossibleRaw(e);if(!this.format.minified&&t!==void 0){this.word(t);return}this.word(e.value+"n")}var FU=new Set(["^^","@@","^","%","#"]);function hke(){let{topicToken:e}=this.format;if(FU.has(e))this.token(e);else{let t=JSON.stringify(e),r=Array.from(FU,a=>JSON.stringify(a));throw new Error(`The "topicToken" generator option must be one of ${r.join(", ")} (${t} received instead).`)}}function gke(e){this.print(e.expression)}function yke(e){this.print(e.callee)}function xke(){this.tokenChar(35)}function bke(){this.word("void")}});var jU=ne(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.AnyTypeAnnotation=Cke;pt.ArrayTypeAnnotation=Eke;pt.BooleanLiteralTypeAnnotation=Ake;pt.BooleanTypeAnnotation=Pke;pt.DeclareClass=Nke;pt.DeclareExportAllDeclaration=jke;pt.DeclareExportDeclaration=Uke;pt.DeclareFunction=Lke;pt.DeclareInterface=Mke;pt.DeclareModule=Dke;pt.DeclareModuleExports=_ke;pt.DeclareOpaqueType=Fke;pt.DeclareTypeAlias=Oke;pt.DeclareVariable=Bke;pt.DeclaredPredicate=kke;pt.EmptyTypeAnnotation=l2e;pt.EnumBooleanBody=Vke;pt.EnumBooleanMember=Kke;pt.EnumDeclaration=zke;pt.EnumDefaultedMember=Gke;pt.EnumNumberBody=qke;pt.EnumNumberMember=Wke;pt.EnumStringBody=Hke;pt.EnumStringMember=Xke;pt.EnumSymbolBody=$ke;pt.ExistsTypeAnnotation=Jke;pt.FunctionTypeAnnotation=Qke;pt.FunctionTypeParam=Zke;pt.IndexedAccessType=M2e;pt.InferredPredicate=Rke;pt.InterfaceDeclaration=a2e;pt.GenericTypeAnnotation=pt.ClassImplements=pt.InterfaceExtends=e2e;pt.InterfaceTypeAnnotation=s2e;pt.IntersectionTypeAnnotation=i2e;pt.MixedTypeAnnotation=o2e;pt.NullLiteralTypeAnnotation=Ike;pt.NullableTypeAnnotation=c2e;Object.defineProperty(pt,"NumberLiteralTypeAnnotation",{enumerable:!0,get:function(){return UU.NumericLiteral}});pt.NumberTypeAnnotation=u2e;pt.ObjectTypeAnnotation=v2e;pt.ObjectTypeCallProperty=T2e;pt.ObjectTypeIndexer=w2e;pt.ObjectTypeInternalSlot=S2e;pt.ObjectTypeProperty=C2e;pt.ObjectTypeSpreadProperty=E2e;pt.OpaqueType=b2e;pt.OptionalIndexedAccessType=D2e;pt.QualifiedTypeIdentifier=P2e;Object.defineProperty(pt,"StringLiteralTypeAnnotation",{enumerable:!0,get:function(){return UU.StringLiteral}});pt.StringTypeAnnotation=d2e;pt.SymbolTypeAnnotation=A2e;pt.ThisTypeAnnotation=f2e;pt.TupleTypeAnnotation=p2e;pt.TypeAlias=h2e;pt.TypeAnnotation=g2e;pt.TypeCastExpression=L2e;pt.TypeParameter=x2e;pt.TypeParameterDeclaration=pt.TypeParameterInstantiation=y2e;pt.TypeofTypeAnnotation=m2e;pt.UnionTypeAnnotation=N2e;pt.Variance=R2e;pt.VoidTypeAnnotation=k2e;pt._interfaceish=t2e;pt._variance=r2e;var vke=fr(),Ske=mk(),Tke=mm(),UU=yk(),{isDeclareExportDeclaration:gC,isStatement:wke}=vke;function Cke(){this.word("any")}function Eke(e){this.print(e.elementType,!0),this.tokenChar(91),this.tokenChar(93)}function Pke(){this.word("boolean")}function Ake(e){this.word(e.value?"true":"false")}function Ike(){this.word("null")}function Nke(e,t){gC(t)||(this.word("declare"),this.space()),this.word("class"),this.space(),this._interfaceish(e)}function Lke(e,t){gC(t)||(this.word("declare"),this.space()),this.word("function"),this.space(),this.print(e.id),this.print(e.id.typeAnnotation.typeAnnotation),e.predicate&&(this.space(),this.print(e.predicate)),this.semicolon()}function Rke(){this.tokenChar(37),this.word("checks")}function kke(e){this.tokenChar(37),this.word("checks"),this.tokenChar(40),this.print(e.value),this.tokenChar(41)}function Mke(e){this.word("declare"),this.space(),this.InterfaceDeclaration(e)}function Dke(e){this.word("declare"),this.space(),this.word("module"),this.space(),this.print(e.id),this.space(),this.print(e.body)}function _ke(e){this.word("declare"),this.space(),this.word("module"),this.tokenChar(46),this.word("exports"),this.print(e.typeAnnotation)}function Oke(e){this.word("declare"),this.space(),this.TypeAlias(e)}function Fke(e,t){gC(t)||(this.word("declare"),this.space()),this.OpaqueType(e)}function Bke(e,t){gC(t)||(this.word("declare"),this.space()),this.word("var"),this.space(),this.print(e.id),this.print(e.id.typeAnnotation),this.semicolon()}function Uke(e){this.word("declare"),this.space(),this.word("export"),this.space(),e.default&&(this.word("default"),this.space()),Yke.call(this,e)}function jke(e){this.word("declare"),this.space(),Ske.ExportAllDeclaration.call(this,e)}function zke(e){let{id:t,body:r}=e;this.word("enum"),this.space(),this.print(t),this.print(r)}function yC(e,t,r){r&&(e.space(),e.word("of"),e.space(),e.word(t)),e.space()}function xC(e,t){let{members:r}=t;e.token("{"),e.indent(),e.newline();for(let a of r)e.print(a),e.newline();t.hasUnknownMembers&&(e.token("..."),e.newline()),e.dedent(),e.token("}")}function Vke(e){let{explicitType:t}=e;yC(this,"boolean",t),xC(this,e)}function qke(e){let{explicitType:t}=e;yC(this,"number",t),xC(this,e)}function Hke(e){let{explicitType:t}=e;yC(this,"string",t),xC(this,e)}function $ke(e){yC(this,"symbol",!0),xC(this,e)}function Gke(e){let{id:t}=e;this.print(t),this.tokenChar(44)}function xk(e,t){e.print(t.id),e.space(),e.token("="),e.space(),e.print(t.init),e.token(",")}function Kke(e){xk(this,e)}function Wke(e){xk(this,e)}function Xke(e){xk(this,e)}function Yke(e){if(e.declaration){let t=e.declaration;this.print(t),wke(t)||this.semicolon()}else this.tokenChar(123),e.specifiers.length&&(this.space(),this.printList(e.specifiers),this.space()),this.tokenChar(125),e.source&&(this.space(),this.word("from"),this.space(),this.print(e.source)),this.semicolon()}function Jke(){this.tokenChar(42)}function Qke(e,t){this.print(e.typeParameters),this.tokenChar(40),e.this&&(this.word("this"),this.tokenChar(58),this.space(),this.print(e.this.typeAnnotation),(e.params.length||e.rest)&&(this.tokenChar(44),this.space())),this.printList(e.params),e.rest&&(e.params.length&&(this.tokenChar(44),this.space()),this.token("..."),this.print(e.rest)),this.tokenChar(41);let r=t?.type;r!=null&&(r==="ObjectTypeCallProperty"||r==="ObjectTypeInternalSlot"||r==="DeclareFunction"||r==="ObjectTypeProperty"&&t.method)?this.tokenChar(58):(this.space(),this.token("=>")),this.space(),this.print(e.returnType)}function Zke(e){this.print(e.name),e.optional&&this.tokenChar(63),e.name&&(this.tokenChar(58),this.space()),this.print(e.typeAnnotation)}function e2e(e){this.print(e.id),this.print(e.typeParameters,!0)}function t2e(e){var t;if(this.print(e.id),this.print(e.typeParameters),(t=e.extends)!=null&&t.length&&(this.space(),this.word("extends"),this.space(),this.printList(e.extends)),e.type==="DeclareClass"){var r,a;(r=e.mixins)!=null&&r.length&&(this.space(),this.word("mixins"),this.space(),this.printList(e.mixins)),(a=e.implements)!=null&&a.length&&(this.space(),this.word("implements"),this.space(),this.printList(e.implements))}this.space(),this.print(e.body)}function r2e(e){var t;let r=(t=e.variance)==null?void 0:t.kind;r!=null&&(r==="plus"?this.tokenChar(43):r==="minus"&&this.tokenChar(45))}function a2e(e){this.word("interface"),this.space(),this._interfaceish(e)}function n2e(e){this.space(),this.token("&",!1,e),this.space()}function s2e(e){var t;this.word("interface"),(t=e.extends)!=null&&t.length&&(this.space(),this.word("extends"),this.space(),this.printList(e.extends)),this.space(),this.print(e.body)}function i2e(e){this.printJoin(e.types,void 0,void 0,n2e)}function o2e(){this.word("mixed")}function l2e(){this.word("empty")}function c2e(e){this.tokenChar(63),this.print(e.typeAnnotation)}function u2e(){this.word("number")}function d2e(){this.word("string")}function f2e(){this.word("this")}function p2e(e){this.tokenChar(91),this.printList(e.types),this.tokenChar(93)}function m2e(e){this.word("typeof"),this.space(),this.print(e.argument)}function h2e(e){this.word("type"),this.space(),this.print(e.id),this.print(e.typeParameters),this.space(),this.tokenChar(61),this.space(),this.print(e.right),this.semicolon()}function g2e(e,t){this.tokenChar(58),this.space(),t.type==="ArrowFunctionExpression"?this.tokenContext|=Tke.TokenContext.arrowFlowReturnType:e.optional&&this.tokenChar(63),this.print(e.typeAnnotation)}function y2e(e){this.tokenChar(60),this.printList(e.params),this.tokenChar(62)}function x2e(e){this._variance(e),this.word(e.name),e.bound&&this.print(e.bound),e.default&&(this.space(),this.tokenChar(61),this.space(),this.print(e.default))}function b2e(e){this.word("opaque"),this.space(),this.word("type"),this.space(),this.print(e.id),this.print(e.typeParameters),e.supertype&&(this.tokenChar(58),this.space(),this.print(e.supertype)),e.impltype&&(this.space(),this.tokenChar(61),this.space(),this.print(e.impltype)),this.semicolon()}function v2e(e){e.exact?this.token("{|"):this.tokenChar(123);let t=[...e.properties,...e.callProperties||[],...e.indexers||[],...e.internalSlots||[]];t.length&&(this.newline(),this.space(),this.printJoin(t,!0,!0,void 0,void 0,()=>{(t.length!==1||e.inexact)&&(this.tokenChar(44),this.space())}),this.space()),e.inexact&&(this.indent(),this.token("..."),t.length&&this.newline(),this.dedent()),e.exact?this.token("|}"):this.tokenChar(125)}function S2e(e){e.static&&(this.word("static"),this.space()),this.tokenChar(91),this.tokenChar(91),this.print(e.id),this.tokenChar(93),this.tokenChar(93),e.optional&&this.tokenChar(63),e.method||(this.tokenChar(58),this.space()),this.print(e.value)}function T2e(e){e.static&&(this.word("static"),this.space()),this.print(e.value)}function w2e(e){e.static&&(this.word("static"),this.space()),this._variance(e),this.tokenChar(91),e.id&&(this.print(e.id),this.tokenChar(58),this.space()),this.print(e.key),this.tokenChar(93),this.tokenChar(58),this.space(),this.print(e.value)}function C2e(e){e.proto&&(this.word("proto"),this.space()),e.static&&(this.word("static"),this.space()),(e.kind==="get"||e.kind==="set")&&(this.word(e.kind),this.space()),this._variance(e),this.print(e.key),e.optional&&this.tokenChar(63),e.method||(this.tokenChar(58),this.space()),this.print(e.value)}function E2e(e){this.token("..."),this.print(e.argument)}function P2e(e){this.print(e.qualification),this.tokenChar(46),this.print(e.id)}function A2e(){this.word("symbol")}function I2e(e){this.space(),this.token("|",!1,e),this.space()}function N2e(e){this.printJoin(e.types,void 0,void 0,I2e)}function L2e(e){this.tokenChar(40),this.print(e.expression),this.print(e.typeAnnotation),this.tokenChar(41)}function R2e(e){e.kind==="plus"?this.tokenChar(43):this.tokenChar(45)}function k2e(){this.word("void")}function M2e(e){this.print(e.objectType,!0),this.tokenChar(91),this.print(e.indexType),this.tokenChar(93)}function D2e(e){this.print(e.objectType),e.optional&&this.token("?."),this.tokenChar(91),this.print(e.indexType),this.tokenChar(93)}});var zU=ne(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.BlockStatement=F2e;Eu.Directive=B2e;Eu.DirectiveLiteral=z2e;Eu.File=_2e;Eu.InterpreterDirective=V2e;Eu.Placeholder=q2e;Eu.Program=O2e;function _2e(e){e.program&&this.print(e.program.interpreter),this.print(e.program)}function O2e(e){var t;this.noIndentInnerCommentsHere(),this.printInnerComments();let r=(t=e.directives)==null?void 0:t.length;if(r){var a;let n=e.body.length?2:1;this.printSequence(e.directives,void 0,n),(a=e.directives[r-1].trailingComments)!=null&&a.length||this.newline(n)}this.printSequence(e.body)}function F2e(e){var t;this.tokenChar(123);let r=this.enterDelimited(),a=(t=e.directives)==null?void 0:t.length;if(a){var n;let s=e.body.length?2:1;this.printSequence(e.directives,!0,s),(n=e.directives[a-1].trailingComments)!=null&&n.length||this.newline(s)}this.printSequence(e.body,!0),r(),this.rightBrace(e)}function B2e(e){this.print(e.value),this.semicolon()}var U2e=/(?:^|[^\\])(?:\\\\)*'/,j2e=/(?:^|[^\\])(?:\\\\)*"/;function z2e(e){let t=this.getPossibleRaw(e);if(!this.format.minified&&t!==void 0){this.token(t);return}let{value:r}=e;if(!j2e.test(r))this.token(`"${r}"`);else if(!U2e.test(r))this.token(`'${r}'`);else throw new Error("Malformed AST: it is not possible to print a directive containing both unescaped single and double quotes.")}function V2e(e){this.token(`#!${e.value}`),this.newline(1,!0)}function q2e(e){this.token("%%"),this.print(e.name),this.token("%%"),e.expectedNode==="Statement"&&this.semicolon()}});var VU=ne(Ms=>{"use strict";Object.defineProperty(Ms,"__esModule",{value:!0});Ms.JSXAttribute=H2e;Ms.JSXClosingElement=tMe;Ms.JSXClosingFragment=sMe;Ms.JSXElement=Q2e;Ms.JSXEmptyExpression=rMe;Ms.JSXExpressionContainer=X2e;Ms.JSXFragment=aMe;Ms.JSXIdentifier=$2e;Ms.JSXMemberExpression=K2e;Ms.JSXNamespacedName=G2e;Ms.JSXOpeningElement=eMe;Ms.JSXOpeningFragment=nMe;Ms.JSXSpreadAttribute=W2e;Ms.JSXSpreadChild=Y2e;Ms.JSXText=J2e;function H2e(e){this.print(e.name),e.value&&(this.tokenChar(61),this.print(e.value))}function $2e(e){this.word(e.name)}function G2e(e){this.print(e.namespace),this.tokenChar(58),this.print(e.name)}function K2e(e){this.print(e.object),this.tokenChar(46),this.print(e.property)}function W2e(e){this.tokenChar(123),this.token("..."),this.print(e.argument),this.rightBrace(e)}function X2e(e){this.tokenChar(123),this.print(e.expression),this.rightBrace(e)}function Y2e(e){this.tokenChar(123),this.token("..."),this.print(e.expression),this.rightBrace(e)}function J2e(e){let t=this.getPossibleRaw(e);t!==void 0?this.token(t,!0):this.token(e.value,!0)}function Q2e(e){let t=e.openingElement;if(this.print(t),!t.selfClosing){this.indent();for(let r of e.children)this.print(r);this.dedent(),this.print(e.closingElement)}}function Z2e(){this.space()}function eMe(e){this.tokenChar(60),this.print(e.name),e.typeArguments&&this.print(e.typeArguments),this.print(e.typeParameters),e.attributes.length>0&&(this.space(),this.printJoin(e.attributes,void 0,void 0,Z2e)),e.selfClosing&&(this.space(),this.tokenChar(47)),this.tokenChar(62)}function tMe(e){this.tokenChar(60),this.tokenChar(47),this.print(e.name),this.tokenChar(62)}function rMe(){this.printInnerComments()}function aMe(e){this.print(e.openingFragment),this.indent();for(let t of e.children)this.print(t);this.dedent(),this.print(e.closingFragment)}function nMe(){this.tokenChar(60),this.tokenChar(62)}function sMe(){this.token("</"),this.tokenChar(62)}});var KU=ne(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.TSAnyKeyword=bMe;it.TSArrayType=jMe;it.TSSatisfiesExpression=it.TSAsExpression=sDe;it.TSBigIntKeyword=vMe;it.TSBooleanKeyword=CMe;it.TSCallSignatureDeclaration=pMe;it.TSInterfaceHeritage=it.TSClassImplements=tDe;it.TSConditionalType=KMe;it.TSConstructSignatureDeclaration=mMe;it.TSConstructorType=DMe;it.TSDeclareFunction=uMe;it.TSDeclareMethod=dMe;it.TSEnumBody=GU;it.TSEnumDeclaration=lDe;it.TSEnumMember=cDe;it.TSExportAssignment=gDe;it.TSExternalModuleReference=mDe;it.TSFunctionType=MMe;it.TSImportEqualsDeclaration=pDe;it.TSImportType=fDe;it.TSIndexSignature=xMe;it.TSIndexedAccessType=JMe;it.TSInferType=WMe;it.TSInstantiationExpression=oDe;it.TSInterfaceBody=aDe;it.TSInterfaceDeclaration=rDe;it.TSIntersectionType=GMe;it.TSIntrinsicKeyword=RMe;it.TSLiteralType=eDe;it.TSMappedType=QMe;it.TSMethodSignature=yMe;it.TSModuleBlock=dDe;it.TSModuleDeclaration=uDe;it.TSNamedTupleMember=HMe;it.TSNamespaceExportDeclaration=yDe;it.TSNeverKeyword=LMe;it.TSNonNullExpression=hDe;it.TSNullKeyword=NMe;it.TSNumberKeyword=TMe;it.TSObjectKeyword=wMe;it.TSOptionalType=VMe;it.TSParameterProperty=cMe;it.TSParenthesizedType=XMe;it.TSPropertySignature=hMe;it.TSQualifiedName=fMe;it.TSRestType=qMe;it.TSStringKeyword=EMe;it.TSSymbolKeyword=PMe;it.TSTemplateLiteralType=ZMe;it.TSThisType=kMe;it.TSTupleType=zMe;it.TSTypeAliasDeclaration=nDe;it.TSTypeAnnotation=iMe;it.TSTypeAssertion=iDe;it.TSTypeLiteral=UMe;it.TSTypeOperator=YMe;it.TSTypeParameter=lMe;it.TSTypeParameterDeclaration=it.TSTypeParameterInstantiation=oMe;it.TSTypePredicate=FMe;it.TSTypeQuery=BMe;it.TSTypeReference=OMe;it.TSUndefinedKeyword=IMe;it.TSUnionType=$Me;it.TSUnknownKeyword=SMe;it.TSVoidKeyword=AMe;it.tsPrintClassMemberModifiers=bDe;it.tsPrintFunctionOrConstructorType=_Me;it.tsPrintPropertyOrMethodName=gMe;it.tsPrintSignatureDeclarationBase=xDe;function iMe(e,t){this.token((t.type==="TSFunctionType"||t.type==="TSConstructorType")&&t.typeAnnotation===e?"=>":":"),this.space(),e.optional&&this.tokenChar(63),this.print(e.typeAnnotation)}function oMe(e,t){this.tokenChar(60);let r=t.type==="ArrowFunctionExpression"&&e.params.length===1;this.tokenMap&&e.start!=null&&e.end!=null&&(r&&(r=!!this.tokenMap.find(e,a=>this.tokenMap.matchesOriginal(a,","))),r||(r=this.shouldPrintTrailingComma(">"))),this.printList(e.params,r),this.tokenChar(62)}function lMe(e){e.const&&(this.word("const"),this.space()),e.in&&(this.word("in"),this.space()),e.out&&(this.word("out"),this.space()),this.word(e.name),e.constraint&&(this.space(),this.word("extends"),this.space(),this.print(e.constraint)),e.default&&(this.space(),this.tokenChar(61),this.space(),this.print(e.default))}function cMe(e){e.accessibility&&(this.word(e.accessibility),this.space()),e.readonly&&(this.word("readonly"),this.space()),this._param(e.parameter)}function uMe(e,t){e.declare&&(this.word("declare"),this.space()),this._functionHead(e,t),this.semicolon()}function dMe(e){this._classMethodHead(e),this.semicolon()}function fMe(e){this.print(e.left),this.tokenChar(46),this.print(e.right)}function pMe(e){this.tsPrintSignatureDeclarationBase(e),F0(this,e)}function F0(e,t){if(!e.tokenMap||!t.start||!t.end){e.semicolon();return}e.tokenMap.endMatches(t,",")?e.token(","):e.tokenMap.endMatches(t,";")&&e.semicolon()}function mMe(e){this.word("new"),this.space(),this.tsPrintSignatureDeclarationBase(e),F0(this,e)}function hMe(e){let{readonly:t}=e;t&&(this.word("readonly"),this.space()),this.tsPrintPropertyOrMethodName(e),this.print(e.typeAnnotation),F0(this,e)}function gMe(e){e.computed&&this.tokenChar(91),this.print(e.key),e.computed&&this.tokenChar(93),e.optional&&this.tokenChar(63)}function yMe(e){let{kind:t}=e;(t==="set"||t==="get")&&(this.word(t),this.space()),this.tsPrintPropertyOrMethodName(e),this.tsPrintSignatureDeclarationBase(e),F0(this,e)}function xMe(e){let{readonly:t,static:r}=e;r&&(this.word("static"),this.space()),t&&(this.word("readonly"),this.space()),this.tokenChar(91),this._parameters(e.parameters,"]"),this.print(e.typeAnnotation),F0(this,e)}function bMe(){this.word("any")}function vMe(){this.word("bigint")}function SMe(){this.word("unknown")}function TMe(){this.word("number")}function wMe(){this.word("object")}function CMe(){this.word("boolean")}function EMe(){this.word("string")}function PMe(){this.word("symbol")}function AMe(){this.word("void")}function IMe(){this.word("undefined")}function NMe(){this.word("null")}function LMe(){this.word("never")}function RMe(){this.word("intrinsic")}function kMe(){this.word("this")}function MMe(e){this.tsPrintFunctionOrConstructorType(e)}function DMe(e){e.abstract&&(this.word("abstract"),this.space()),this.word("new"),this.space(),this.tsPrintFunctionOrConstructorType(e)}function _Me(e){let{typeParameters:t}=e,r=e.parameters;this.print(t),this.tokenChar(40),this._parameters(r,")"),this.space();let a=e.typeAnnotation;this.print(a)}function OMe(e){let t=e.typeParameters;this.print(e.typeName,!!t),this.print(t)}function FMe(e){e.asserts&&(this.word("asserts"),this.space()),this.print(e.parameterName),e.typeAnnotation&&(this.space(),this.word("is"),this.space(),this.print(e.typeAnnotation.typeAnnotation))}function BMe(e){this.word("typeof"),this.space(),this.print(e.exprName);let t=e.typeParameters;t&&this.print(t)}function UMe(e){bC(this,e,()=>this.printJoin(e.members,!0,!0))}function jMe(e){this.print(e.elementType,!0),this.tokenChar(91),this.tokenChar(93)}function zMe(e){this.tokenChar(91),this.printList(e.elementTypes,this.shouldPrintTrailingComma("]")),this.tokenChar(93)}function VMe(e){this.print(e.typeAnnotation),this.tokenChar(63)}function qMe(e){this.token("..."),this.print(e.typeAnnotation)}function HMe(e){this.print(e.label),e.optional&&this.tokenChar(63),this.tokenChar(58),this.space(),this.print(e.elementType)}function $Me(e){$U(this,e,"|")}function GMe(e){$U(this,e,"&")}function $U(e,t,r){var a;let n=0;(a=e.tokenMap)!=null&&a.startMatches(t,r)&&(n=1,e.token(r)),e.printJoin(t.types,void 0,void 0,function(s){this.space(),this.token(r,void 0,s+n),this.space()})}function KMe(e){this.print(e.checkType),this.space(),this.word("extends"),this.space(),this.print(e.extendsType),this.space(),this.tokenChar(63),this.space(),this.print(e.trueType),this.space(),this.tokenChar(58),this.space(),this.print(e.falseType)}function WMe(e){this.word("infer"),this.print(e.typeParameter)}function XMe(e){this.tokenChar(40),this.print(e.typeAnnotation),this.tokenChar(41)}function YMe(e){this.word(e.operator),this.space(),this.print(e.typeAnnotation)}function JMe(e){this.print(e.objectType,!0),this.tokenChar(91),this.print(e.indexType),this.tokenChar(93)}function QMe(e){let{nameType:t,optional:r,readonly:a,typeAnnotation:n}=e;this.tokenChar(123);let s=this.enterDelimited();this.space(),a&&(qU(this,a),this.word("readonly"),this.space()),this.tokenChar(91),this.word(e.typeParameter.name),this.space(),this.word("in"),this.space(),this.print(e.typeParameter.constraint),t&&(this.space(),this.word("as"),this.space(),this.print(t)),this.tokenChar(93),r&&(qU(this,r),this.tokenChar(63)),n&&(this.tokenChar(58),this.space(),this.print(n)),this.space(),s(),this.tokenChar(125)}function qU(e,t){t!==!0&&e.token(t)}function ZMe(e){this._printTemplate(e,e.types)}function eDe(e){this.print(e.literal)}function tDe(e){this.print(e.expression),this.print(e.typeArguments)}function rDe(e){let{declare:t,id:r,typeParameters:a,extends:n,body:s}=e;t&&(this.word("declare"),this.space()),this.word("interface"),this.space(),this.print(r),this.print(a),n!=null&&n.length&&(this.space(),this.word("extends"),this.space(),this.printList(n)),this.space(),this.print(s)}function aDe(e){bC(this,e,()=>this.printJoin(e.body,!0,!0))}function nDe(e){let{declare:t,id:r,typeParameters:a,typeAnnotation:n}=e;t&&(this.word("declare"),this.space()),this.word("type"),this.space(),this.print(r),this.print(a),this.space(),this.tokenChar(61),this.space(),this.print(n),this.semicolon()}function sDe(e){let{type:t,expression:r,typeAnnotation:a}=e;this.print(r,!0),this.space(),this.word(t==="TSAsExpression"?"as":"satisfies"),this.space(),this.print(a)}function iDe(e){let{typeAnnotation:t,expression:r}=e;this.tokenChar(60),this.print(t),this.tokenChar(62),this.space(),this.print(r)}function oDe(e){this.print(e.expression),this.print(e.typeParameters)}function lDe(e){let{declare:t,const:r,id:a}=e;t&&(this.word("declare"),this.space()),r&&(this.word("const"),this.space()),this.word("enum"),this.space(),this.print(a),this.space(),GU.call(this,e)}function GU(e){bC(this,e,()=>{var t;return this.printList(e.members,(t=this.shouldPrintTrailingComma("}"))!=null?t:!0,!0,!0)})}function cDe(e){let{id:t,initializer:r}=e;this.print(t),r&&(this.space(),this.tokenChar(61),this.space(),this.print(r))}function uDe(e){let{declare:t,id:r,kind:a}=e;t&&(this.word("declare"),this.space());{if(e.global||(this.word(a??(r.type==="Identifier"?"namespace":"module")),this.space()),this.print(r),!e.body){this.semicolon();return}let n=e.body;for(;n.type==="TSModuleDeclaration";)this.tokenChar(46),this.print(n.id),n=n.body;this.space(),this.print(n)}}function dDe(e){bC(this,e,()=>this.printSequence(e.body,!0))}function fDe(e){let{argument:t,qualifier:r,options:a}=e;this.word("import"),this.tokenChar(40),this.print(t),a&&(this.tokenChar(44),this.print(a)),this.tokenChar(41),r&&(this.tokenChar(46),this.print(r));let n=e.typeParameters;n&&this.print(n)}function pDe(e){let{id:t,moduleReference:r}=e;e.isExport&&(this.word("export"),this.space()),this.word("import"),this.space(),this.print(t),this.space(),this.tokenChar(61),this.space(),this.print(r),this.semicolon()}function mDe(e){this.token("require("),this.print(e.expression),this.tokenChar(41)}function hDe(e){this.print(e.expression),this.tokenChar(33)}function gDe(e){this.word("export"),this.space(),this.tokenChar(61),this.space(),this.print(e.expression),this.semicolon()}function yDe(e){this.word("export"),this.space(),this.word("as"),this.space(),this.word("namespace"),this.space(),this.print(e.id),this.semicolon()}function xDe(e){let{typeParameters:t}=e,r=e.parameters;this.print(t),this.tokenChar(40),this._parameters(r,")");let a=e.typeAnnotation;this.print(a)}function bDe(e){let t=e.type==="ClassPrivateProperty",r=e.type==="ClassAccessorProperty"||e.type==="ClassProperty";HU(this,e,[r&&e.declare&&"declare",!t&&e.accessibility]),e.static&&(this.word("static"),this.space()),HU(this,e,[!t&&e.abstract&&"abstract",!t&&e.override&&"override",(r||t)&&e.readonly&&"readonly"])}function bC(e,t,r){e.token("{");let a=e.enterDelimited();r(),a(),e.rightBrace(t)}function HU(e,t,r){var a;let n=new Set;for(let s of r)s&&n.add(s);(a=e.tokenMap)==null||a.find(t,s=>n.has(s.value)?(e.token(s.value),e.space(),n.delete(s.value),n.size===0):!1);for(let s of n)e.word(s),e.space()}});var WU=ne(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});var bk=vU();Object.keys(bk).forEach(function(e){e==="default"||e==="__esModule"||e in _r&&_r[e]===bk[e]||Object.defineProperty(_r,e,{enumerable:!0,get:function(){return bk[e]}})});var vk=TU();Object.keys(vk).forEach(function(e){e==="default"||e==="__esModule"||e in _r&&_r[e]===vk[e]||Object.defineProperty(_r,e,{enumerable:!0,get:function(){return vk[e]}})});var Sk=PU();Object.keys(Sk).forEach(function(e){e==="default"||e==="__esModule"||e in _r&&_r[e]===Sk[e]||Object.defineProperty(_r,e,{enumerable:!0,get:function(){return Sk[e]}})});var Tk=AU();Object.keys(Tk).forEach(function(e){e==="default"||e==="__esModule"||e in _r&&_r[e]===Tk[e]||Object.defineProperty(_r,e,{enumerable:!0,get:function(){return Tk[e]}})});var wk=IU();Object.keys(wk).forEach(function(e){e==="default"||e==="__esModule"||e in _r&&_r[e]===wk[e]||Object.defineProperty(_r,e,{enumerable:!0,get:function(){return wk[e]}})});var Ck=mk();Object.keys(Ck).forEach(function(e){e==="default"||e==="__esModule"||e in _r&&_r[e]===Ck[e]||Object.defineProperty(_r,e,{enumerable:!0,get:function(){return Ck[e]}})});var Ek=yk();Object.keys(Ek).forEach(function(e){e==="default"||e==="__esModule"||e in _r&&_r[e]===Ek[e]||Object.defineProperty(_r,e,{enumerable:!0,get:function(){return Ek[e]}})});var Pk=jU();Object.keys(Pk).forEach(function(e){e==="default"||e==="__esModule"||e in _r&&_r[e]===Pk[e]||Object.defineProperty(_r,e,{enumerable:!0,get:function(){return Pk[e]}})});var Ak=zU();Object.keys(Ak).forEach(function(e){e==="default"||e==="__esModule"||e in _r&&_r[e]===Ak[e]||Object.defineProperty(_r,e,{enumerable:!0,get:function(){return Ak[e]}})});var Ik=VU();Object.keys(Ik).forEach(function(e){e==="default"||e==="__esModule"||e in _r&&_r[e]===Ik[e]||Object.defineProperty(_r,e,{enumerable:!0,get:function(){return Ik[e]}})});var Nk=KU();Object.keys(Nk).forEach(function(e){e==="default"||e==="__esModule"||e in _r&&_r[e]===Nk[e]||Object.defineProperty(_r,e,{enumerable:!0,get:function(){return Nk[e]}})})});var XU=ne(Lk=>{"use strict";Object.defineProperty(Lk,"__esModule",{value:!0});Lk.addDeprecatedGenerators=vDe;function vDe(e){{let t={Noop(){},TSExpressionWithTypeArguments(r){this.print(r.expression),this.print(r.typeParameters)},DecimalLiteral(r){let a=this.getPossibleRaw(r);if(!this.format.minified&&a!==void 0){this.word(a);return}this.word(r.value+"m")}};Object.assign(e.prototype,t)}}});var ZU=ne(vC=>{"use strict";Object.defineProperty(vC,"__esModule",{value:!0});vC.default=void 0;var SDe=rU(),Qs=mm(),JU=Qs,TDe=fr(),wDe=bU(),CDe=WU(),EDe=XU(),{isExpression:PDe,isFunction:ADe,isStatement:IDe,isClassBody:NDe,isTSInterfaceBody:LDe,isTSEnumMember:RDe}=TDe,kDe=/e/i,MDe=/\.0+$/,QU=/[\n\r\u2028\u2029]/,DDe=/[\n\r\u2028\u2029]|\*\//;function YU(e){return e.type==="CommentLine"||QU.test(e.value)}var{needsParens:_De}=JU,B0=class{constructor(t,r,a=null,n=null){this.tokenContext=Qs.TokenContext.normal,this._tokens=null,this._originalCode=null,this._currentNode=null,this._indent=0,this._indentRepeat=0,this._insideAux=!1,this._noLineTerminator=!1,this._noLineTerminatorAfterNode=null,this._printAuxAfterOnNextUserNode=!1,this._printedComments=new Set,this._endsWithInteger=!1,this._endsWithWord=!1,this._endsWithDiv=!1,this._lastCommentLine=0,this._endsWithInnerRaw=!1,this._indentInnerComments=!0,this.tokenMap=null,this._boundGetRawIdentifier=this._getRawIdentifier.bind(this),this._printSemicolonBeforeNextNode=-1,this._printSemicolonBeforeNextToken=-1,this.format=t,this._tokens=a,this._originalCode=n,this._indentRepeat=t.indent.style.length,this._inputMap=r?._inputMap||null,this._buf=new SDe.default(r,t.indent.style[0])}enterForStatementInit(){return this.tokenContext|=Qs.TokenContext.forInitHead|Qs.TokenContext.forInOrInitHeadAccumulate,()=>this.tokenContext=Qs.TokenContext.normal}enterForXStatementInit(t){return t?(this.tokenContext|=Qs.TokenContext.forOfHead,null):(this.tokenContext|=Qs.TokenContext.forInHead|Qs.TokenContext.forInOrInitHeadAccumulate,()=>this.tokenContext=Qs.TokenContext.normal)}enterDelimited(){let t=this.tokenContext,r=this._noLineTerminatorAfterNode;return!(t&Qs.TokenContext.forInOrInitHeadAccumulate)&&r===null?()=>{}:(this._noLineTerminatorAfterNode=null,this.tokenContext=Qs.TokenContext.normal,()=>{this._noLineTerminatorAfterNode=r,this.tokenContext=t})}generate(t){return this.format.preserveFormat&&(this.tokenMap=new wDe.TokenMap(t,this._tokens,this._originalCode)),this.print(t),this._maybeAddAuxComment(),this._buf.get()}indent(){let{format:t}=this;t.preserveFormat||t.compact||t.concise||this._indent++}dedent(){let{format:t}=this;t.preserveFormat||t.compact||t.concise||this._indent--}semicolon(t=!1){if(this._maybeAddAuxComment(),t){this._appendChar(59),this._noLineTerminator=!1;return}if(this.tokenMap){let r=this._currentNode;if(r.start!=null&&r.end!=null){if(!this.tokenMap.endMatches(r,";")){this._printSemicolonBeforeNextNode=this._buf.getCurrentLine();return}let a=this.tokenMap.getIndexes(this._currentNode);this._catchUpTo(this._tokens[a[a.length-1]].loc.start)}}this._queue(59),this._noLineTerminator=!1}rightBrace(t){this.format.minified&&this._buf.removeLastSemicolon(),this.sourceWithOffset("end",t.loc,-1),this.tokenChar(125)}rightParens(t){this.sourceWithOffset("end",t.loc,-1),this.tokenChar(41)}space(t=!1){let{format:r}=this;if(!(r.compact||r.preserveFormat)){if(t)this._space();else if(this._buf.hasContent()){let a=this.getLastChar();a!==32&&a!==10&&this._space()}}}word(t,r=!1){this.tokenContext&=Qs.TokenContext.forInOrInitHeadAccumulatePassThroughMask,this._maybePrintInnerComments(t),this._maybeAddAuxComment(),this.tokenMap&&this._catchUpToCurrentToken(t),(this._endsWithWord||this._endsWithDiv&&t.charCodeAt(0)===47)&&this._space(),this._append(t,!1),this._endsWithWord=!0,this._noLineTerminator=r}number(t,r){function a(n){if(n.length>2&&n.charCodeAt(0)===48){let s=n.charCodeAt(1);return s===98||s===111||s===120}return!1}this.word(t),this._endsWithInteger=Number.isInteger(r)&&!a(t)&&!kDe.test(t)&&!MDe.test(t)&&t.charCodeAt(t.length-1)!==46}token(t,r=!1,a=0){this.tokenContext&=Qs.TokenContext.forInOrInitHeadAccumulatePassThroughMask,this._maybePrintInnerComments(t,a),this._maybeAddAuxComment(),this.tokenMap&&this._catchUpToCurrentToken(t,a);let n=this.getLastChar(),s=t.charCodeAt(0);(n===33&&(t==="--"||s===61)||s===43&&n===43||s===45&&n===45||s===46&&this._endsWithInteger)&&this._space(),this._append(t,r),this._noLineTerminator=!1}tokenChar(t){this.tokenContext&=Qs.TokenContext.forInOrInitHeadAccumulatePassThroughMask;let r=String.fromCharCode(t);this._maybePrintInnerComments(r),this._maybeAddAuxComment(),this.tokenMap&&this._catchUpToCurrentToken(r);let a=this.getLastChar();(t===43&&a===43||t===45&&a===45||t===46&&this._endsWithInteger)&&this._space(),this._appendChar(t),this._noLineTerminator=!1}newline(t=1,r){if(!(t<=0)){if(!r){if(this.format.retainLines||this.format.compact)return;if(this.format.concise){this.space();return}}t>2&&(t=2),t-=this._buf.getNewlineCount();for(let a=0;a<t;a++)this._newline()}}endsWith(t){return this.getLastChar()===t}getLastChar(){return this._buf.getLastChar()}endsWithCharAndNewline(){return this._buf.endsWithCharAndNewline()}removeTrailingNewline(){this._buf.removeTrailingNewline()}exactSource(t,r){if(!t){r();return}this._catchUp("start",t),this._buf.exactSource(t,r)}source(t,r){r&&(this._catchUp(t,r),this._buf.source(t,r))}sourceWithOffset(t,r,a){!r||this.format.preserveFormat||(this._catchUp(t,r),this._buf.sourceWithOffset(t,r,a))}sourceIdentifierName(t,r){if(!this._buf._canMarkIdName)return;let a=this._buf._sourcePosition;a.identifierNamePos=r,a.identifierName=t}_space(){this._queue(32)}_newline(){this._queue(10)}_catchUpToCurrentToken(t,r=0){let a=this.tokenMap.findMatching(this._currentNode,t,r);a&&this._catchUpTo(a.loc.start),this._printSemicolonBeforeNextToken!==-1&&this._printSemicolonBeforeNextToken===this._buf.getCurrentLine()&&(this._buf.appendChar(59),this._endsWithWord=!1,this._endsWithInteger=!1,this._endsWithDiv=!1),this._printSemicolonBeforeNextToken=-1,this._printSemicolonBeforeNextNode=-1}_append(t,r){this._maybeIndent(t.charCodeAt(0)),this._buf.append(t,r),this._endsWithWord=!1,this._endsWithInteger=!1,this._endsWithDiv=!1}_appendChar(t){this._maybeIndent(t),this._buf.appendChar(t),this._endsWithWord=!1,this._endsWithInteger=!1,this._endsWithDiv=!1}_queue(t){this._maybeIndent(t),this._buf.queue(t),this._endsWithWord=!1,this._endsWithInteger=!1}_maybeIndent(t){this._indent&&t!==10&&this.endsWith(10)&&this._buf.queueIndentation(this._getIndent())}_shouldIndent(t){if(this._indent&&t!==10&&this.endsWith(10))return!0}catchUp(t){if(!this.format.retainLines)return;let r=t-this._buf.getCurrentLine();for(let a=0;a<r;a++)this._newline()}_catchUp(t,r){let{format:a}=this;if(!a.preserveFormat){a.retainLines&&r!=null&&r[t]&&this.catchUp(r[t].line);return}let n=r?.[t];n!=null&&this._catchUpTo(n)}_catchUpTo({line:t,column:r,index:a}){let n=t-this._buf.getCurrentLine();if(n>0&&this._noLineTerminator)return;for(let i=0;i<n;i++)this._newline();let s=n>0?r:r-this._buf.getCurrentColumn();if(s>0){let i=this._originalCode?this._originalCode.slice(a-s,a).replace(/[^\t\x0B\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]/gu," "):" ".repeat(s);this._append(i,!1)}}_getIndent(){return this._indentRepeat*this._indent}printTerminatorless(t){this._noLineTerminator=!0,this.print(t)}print(t,r=!1,a){var n,s,i;if(!t)return;this._endsWithInnerRaw=!1;let o=t.type,l=this.format,c=l.concise;t._compact&&(l.concise=!0);let u=this[o];if(u===void 0)throw new ReferenceError(`unknown node of type ${JSON.stringify(o)} with constructor ${JSON.stringify(t.constructor.name)}`);let d=this._currentNode;this._currentNode=t,this.tokenMap&&(this._printSemicolonBeforeNextToken=this._printSemicolonBeforeNextNode);let f=this._insideAux;this._insideAux=t.loc==null,this._maybeAddAuxComment(this._insideAux&&!f);let p=(n=t.extra)==null?void 0:n.parenthesized,m=p&&l.preserveFormat||p&&l.retainFunctionParens&&o==="FunctionExpression"||_De(t,d,this.tokenContext,l.preserveFormat?this._boundGetRawIdentifier:void 0);if(!m&&p&&(s=t.leadingComments)!=null&&s.length&&t.leadingComments[0].type==="CommentBlock")switch(d?.type){case"ExpressionStatement":case"VariableDeclarator":case"AssignmentExpression":case"ReturnStatement":break;case"CallExpression":case"OptionalCallExpression":case"NewExpression":if(d.callee!==t)break;default:m=!0}let h=!1;!m&&this._noLineTerminator&&((i=t.leadingComments)!=null&&i.some(YU)||this.format.retainLines&&t.loc&&t.loc.start.line>this._buf.getCurrentLine())&&(m=!0,h=!0);let x,g;if(!m&&(r||(r=!!d&&this._noLineTerminatorAfterNode===d&&JU.isLastChild(d,t)),r)){var y;(y=t.trailingComments)!=null&&y.some(YU)?PDe(t)&&(m=!0):(x=this._noLineTerminatorAfterNode,this._noLineTerminatorAfterNode=t)}m&&(this.tokenChar(40),h&&this.indent(),this._endsWithInnerRaw=!1,this.tokenContext&Qs.TokenContext.forInOrInitHeadAccumulate&&(g=this.tokenContext,this.tokenContext=Qs.TokenContext.normal),x=this._noLineTerminatorAfterNode,this._noLineTerminatorAfterNode=null),this._lastCommentLine=0,this._printLeadingComments(t,d);let b=o==="Program"||o==="File"?null:t.loc;this.exactSource(b,u.bind(this,t,d)),m?(this._printTrailingComments(t,d),h&&(this.dedent(),this.newline()),this.tokenChar(41),this._noLineTerminator=r,g&&(this.tokenContext=g)):r&&!this._noLineTerminator?(this._noLineTerminator=!0,this._printTrailingComments(t,d)):this._printTrailingComments(t,d,a),this._currentNode=d,l.concise=c,this._insideAux=f,x!==void 0&&(this._noLineTerminatorAfterNode=x),this._endsWithInnerRaw=!1}_maybeAddAuxComment(t){t&&this._printAuxBeforeComment(),this._insideAux||this._printAuxAfterComment()}_printAuxBeforeComment(){if(this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!0;let t=this.format.auxiliaryCommentBefore;t&&this._printComment({type:"CommentBlock",value:t},0)}_printAuxAfterComment(){if(!this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!1;let t=this.format.auxiliaryCommentAfter;t&&this._printComment({type:"CommentBlock",value:t},0)}getPossibleRaw(t){let r=t.extra;if(r?.raw!=null&&r.rawValue!=null&&t.value===r.rawValue)return r.raw}printJoin(t,r,a,n,s,i,o){if(!(t!=null&&t.length))return;if(a==null&&this.format.retainLines){var l;let m=(l=t[0].loc)==null?void 0:l.start.line;m!=null&&m!==this._buf.getCurrentLine()&&(a=!0)}a&&this.indent();let c={nextNodeStartLine:0},u=n?.bind(this),d=t.length;for(let m=0;m<d;m++){let h=t[m];if(h&&(r&&this._printNewline(m===0,c),this.print(h,void 0,o||0),i?.(h,m),u!=null&&(m<d-1?u(m,!1):s&&u(m,!0)),r)){var f;if((f=h.trailingComments)!=null&&f.length||(this._lastCommentLine=0),m+1===d)this.newline(1);else{var p;let x=t[m+1];c.nextNodeStartLine=((p=x.loc)==null?void 0:p.start.line)||0,this._printNewline(!0,c)}}}a&&this.dedent()}printAndIndentOnComments(t){let r=t.leadingComments&&t.leadingComments.length>0;r&&this.indent(),this.print(t),r&&this.dedent()}printBlock(t){let r=t.body;r.type!=="EmptyStatement"&&this.space(),this.print(r)}_printTrailingComments(t,r,a){let{innerComments:n,trailingComments:s}=t;n!=null&&n.length&&this._printComments(2,n,t,r,a),s!=null&&s.length&&this._printComments(2,s,t,r,a)}_printLeadingComments(t,r){let a=t.leadingComments;a!=null&&a.length&&this._printComments(0,a,t,r)}_maybePrintInnerComments(t,r){if(this._endsWithInnerRaw){var a;this.printInnerComments((a=this.tokenMap)==null?void 0:a.findMatching(this._currentNode,t,r))}this._endsWithInnerRaw=!0,this._indentInnerComments=!0}printInnerComments(t){let r=this._currentNode,a=r.innerComments;if(!(a!=null&&a.length))return;let n=this.endsWith(32),s=this._indentInnerComments,i=this._printedComments.size;s&&this.indent(),this._printComments(1,a,r,void 0,void 0,t),n&&i!==this._printedComments.size&&this.space(),s&&this.dedent()}noIndentInnerCommentsHere(){this._indentInnerComments=!1}printSequence(t,r,a){this.printJoin(t,!0,r??!1,void 0,void 0,void 0,a)}printList(t,r,a,n,s,i){this.printJoin(t,a,n,s??ODe,r,i)}shouldPrintTrailingComma(t){if(!this.tokenMap)return null;let r=this.tokenMap.findLastIndex(this._currentNode,a=>this.tokenMap.matchesOriginal(a,t));return r<=0?null:this.tokenMap.matchesOriginal(this._tokens[r-1],",")}_printNewline(t,r){let a=this.format;if(a.retainLines||a.compact)return;if(a.concise){this.space();return}if(!t)return;let n=r.nextNodeStartLine,s=this._lastCommentLine;if(n>0&&s>0){let i=n-s;if(i>=0){this.newline(i||1);return}}this._buf.hasContent()&&this.newline(1)}_shouldPrintComment(t,r){if(t.ignore||this._printedComments.has(t))return 0;if(this._noLineTerminator&&DDe.test(t.value))return 2;if(r&&this.tokenMap){let a=this.tokenMap.find(this._currentNode,n=>n.value===t.value);if(a&&a.start>r.start)return 2}return this._printedComments.add(t),this.format.shouldPrintComment(t.value)?1:0}_printComment(t,r){let a=this._noLineTerminator,n=t.type==="CommentBlock",s=n&&r!==1&&!this._noLineTerminator;s&&this._buf.hasContent()&&r!==2&&this.newline(1);let i=this.getLastChar();i!==91&&i!==123&&i!==40&&this.space();let o;if(n){if(o=`/*${t.value}*/`,this.format.indent.adjustMultilineComment){var l;let c=(l=t.loc)==null?void 0:l.start.column;if(c){let u=new RegExp("\\n\\s{1,"+c+"}","g");o=o.replace(u,`
|
|
`)}if(this.format.concise)o=o.replace(/\n(?!$)/g,`
|
|
`);else{let u=this.format.retainLines?0:this._buf.getCurrentColumn();(this._shouldIndent(47)||this.format.retainLines)&&(u+=this._getIndent()),o=o.replace(/\n(?!$)/g,`
|
|
${" ".repeat(u)}`)}}}else a?o=`/*${t.value}*/`:o=`//${t.value}`;if(this._endsWithDiv&&this._space(),this.tokenMap){let{_printSemicolonBeforeNextToken:c,_printSemicolonBeforeNextNode:u}=this;this._printSemicolonBeforeNextToken=-1,this._printSemicolonBeforeNextNode=-1,this.source("start",t.loc),this._append(o,n),this._printSemicolonBeforeNextNode=u,this._printSemicolonBeforeNextToken=c}else this.source("start",t.loc),this._append(o,n);!n&&!a&&this.newline(1,!0),s&&r!==3&&this.newline(1)}_printComments(t,r,a,n,s=0,i){let o=a.loc,l=r.length,c=!!o,u=c?o.start.line:0,d=c?o.end.line:0,f=0,p=0,m=this._noLineTerminator?function(){}:this.newline.bind(this);for(let h=0;h<l;h++){let x=r[h],g=this._shouldPrintComment(x,i);if(g===2){c=!1;break}if(c&&x.loc&&g===1){let y=x.loc.start.line,b=x.loc.end.line;if(t===0){let S=0;h===0?this._buf.hasContent()&&(x.type==="CommentLine"||y!==b)&&(S=p=1):S=y-f,f=b,m(S),this._printComment(x,1),h+1===l&&(m(Math.max(u-f,p)),f=u)}else if(t===1){let S=y-(h===0?u:f);f=b,m(S),this._printComment(x,1),h+1===l&&(m(Math.min(1,d-f)),f=d)}else{let S=y-(h===0?d-s:f);f=b,m(S),this._printComment(x,1)}}else{if(c=!1,g!==1)continue;if(l===1){let y=x.loc?x.loc.start.line===x.loc.end.line:!QU.test(x.value),b=y&&!IDe(a)&&!NDe(n)&&!LDe(n)&&!RDe(a);t===0?this._printComment(x,b&&a.type!=="ObjectExpression"||y&&ADe(n,{body:a})?1:0):b&&t===2?this._printComment(x,1):this._printComment(x,0)}else t===1&&!(a.type==="ObjectExpression"&&a.properties.length>1)&&a.type!=="ClassBody"&&a.type!=="TSInterfaceBody"?this._printComment(x,h===0?2:h===l-1?3:0):this._printComment(x,0)}}t===2&&c&&f&&(this._lastCommentLine=f)}};Object.assign(B0.prototype,CDe);(0,EDe.addDeprecatedGenerators)(B0);var Jlt=vC.default=B0;function ODe(e,t){this.token(",",!1,e),t||this.space()}});var Rk=ne(jg=>{"use strict";Object.defineProperty(jg,"__esModule",{value:!0});jg.default=void 0;jg.generate=aj;var ej=tU(),tj=ZU();function rj(e,t,r){if(t.experimental_preserveFormat){if(typeof e!="string")throw new Error("`experimental_preserveFormat` requires the original `code` to be passed to @babel/generator as a string");if(!t.retainLines)throw new Error("`experimental_preserveFormat` requires `retainLines` to be set to `true`");if(t.compact&&t.compact!=="auto")throw new Error("`experimental_preserveFormat` is not compatible with the `compact` option");if(t.minified)throw new Error("`experimental_preserveFormat` is not compatible with the `minified` option");if(t.jsescOption)throw new Error("`experimental_preserveFormat` is not compatible with the `jsescOption` option");if(!Array.isArray(r.tokens))throw new Error("`experimental_preserveFormat` requires the AST to have attached the token of the input code. Make sure to enable the `tokens: true` parser option.")}let a={auxiliaryCommentBefore:t.auxiliaryCommentBefore,auxiliaryCommentAfter:t.auxiliaryCommentAfter,shouldPrintComment:t.shouldPrintComment,preserveFormat:t.experimental_preserveFormat,retainLines:t.retainLines,retainFunctionParens:t.retainFunctionParens,comments:t.comments==null||t.comments,compact:t.compact,minified:t.minified,concise:t.concise,indent:{adjustMultilineComment:!0,style:" "},jsescOption:Object.assign({quotes:"double",wrap:!0,minimal:!1},t.jsescOption),topicToken:t.topicToken,importAttributesKeyword:t.importAttributesKeyword};{var n;a.decoratorsBeforeExport=t.decoratorsBeforeExport,a.jsescOption.json=t.jsonCompatibleStrings,a.recordAndTupleSyntaxType=(n=t.recordAndTupleSyntaxType)!=null?n:"hash"}a.minified?(a.compact=!0,a.shouldPrintComment=a.shouldPrintComment||(()=>a.comments)):a.shouldPrintComment=a.shouldPrintComment||(l=>a.comments||l.includes("@license")||l.includes("@preserve")),a.compact==="auto"&&(a.compact=typeof e=="string"&&e.length>5e5,a.compact),(a.compact||a.preserveFormat)&&(a.indent.adjustMultilineComment=!1);let{auxiliaryCommentBefore:s,auxiliaryCommentAfter:i,shouldPrintComment:o}=a;return s&&!o(s)&&(a.auxiliaryCommentBefore=void 0),i&&!o(i)&&(a.auxiliaryCommentAfter=void 0),a}jg.CodeGenerator=class{constructor(t,r={},a){this._ast=void 0,this._format=void 0,this._map=void 0,this._ast=t,this._format=rj(a,r,t),this._map=r.sourceMaps?new ej.default(r,a):null}generate(){return new tj.default(this._format,this._map).generate(this._ast)}};function aj(e,t={},r){let a=rj(r,t,e),n=t.sourceMaps?new ej.default(t,r):null;return new tj.default(a,n,e.tokens,typeof r=="string"?r:null).generate(e)}var ect=jg.default=aj});var nj=ne(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});rl.find=jDe;rl.findParent=UDe;rl.getAncestry=$De;rl.getDeepestCommonAncestorFrom=HDe;rl.getEarliestCommonAncestorFrom=qDe;rl.getFunctionParent=zDe;rl.getStatementParent=VDe;rl.inType=WDe;rl.isAncestor=GDe;rl.isDescendant=KDe;var FDe=fr(),{VISITOR_KEYS:BDe}=FDe;function UDe(e){let t=this;for(;t=t.parentPath;)if(e(t))return t;return null}function jDe(e){let t=this;do if(e(t))return t;while(t=t.parentPath);return null}function zDe(){return this.findParent(e=>e.isFunction())}function VDe(){let e=this;do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement())break;e=e.parentPath}while(e);if(e&&(e.isProgram()||e.isFile()))throw new Error("File/Program node, we can't possibly find a statement parent to this");return e}function qDe(e){return this.getDeepestCommonAncestorFrom(e,function(t,r,a){let n,s=BDe[t.type];for(let i of a){let o=i[r+1];if(!n){n=o;continue}if(o.listKey&&n.listKey===o.listKey&&o.key<n.key){n=o;continue}let l=s.indexOf(n.parentKey),c=s.indexOf(o.parentKey);l>c&&(n=o)}return n})}function HDe(e,t){if(!e.length)return this;if(e.length===1)return e[0];let r=1/0,a,n,s=e.map(o=>{let l=[];do l.unshift(o);while((o=o.parentPath)&&o!==this);return l.length<r&&(r=l.length),l}),i=s[0];e:for(let o=0;o<r;o++){let l=i[o];for(let c of s)if(c[o]!==l)break e;a=o,n=l}if(n)return t?t(n,a,s):n;throw new Error("Couldn't find intersection")}function $De(){let e=this,t=[];do t.push(e);while(e=e.parentPath);return t}function GDe(e){return e.isDescendant(this)}function KDe(e){return!!this.findParent(t=>t===e)}function WDe(...e){let t=this;for(;t;){if(e.includes(t.node.type))return!0;t=t.parentPath}return!1}});var Mk=ne(kk=>{"use strict";Object.defineProperty(kk,"__esModule",{value:!0});kk.createUnionType=ZDe;var XDe=fr(),{createFlowUnionType:sj,createTSUnionType:ij,createUnionTypeAnnotation:YDe,isFlowType:JDe,isTSType:QDe}=XDe;function ZDe(e){{if(e.every(t=>JDe(t)))return sj?sj(e):YDe(e);if(e.every(t=>QDe(t))&&ij)return ij(e)}}});var dj=ne(Dk=>{"use strict";Object.defineProperty(Dk,"__esModule",{value:!0});Dk.default=n_e;var e_e=fr(),lj=Mk(),{BOOLEAN_NUMBER_BINARY_OPERATORS:t_e,createTypeAnnotationBasedOnTypeof:r_e,numberTypeAnnotation:cj,voidTypeAnnotation:a_e}=e_e;function n_e(e){if(!this.isReferenced())return;let t=this.scope.getBinding(e.name);if(t)return t.identifier.typeAnnotation?t.identifier.typeAnnotation:s_e(t,this,e.name);if(e.name==="undefined")return a_e();if(e.name==="NaN"||e.name==="Infinity")return cj();e.name}function s_e(e,t,r){let a=[],n=[],s=oj(e,t,n),i=uj(e,t,r);if(i){let o=oj(e,i.ifStatement);s=s.filter(l=>!o.includes(l)),a.push(i.typeAnnotation)}if(s.length){s.push(...n);for(let o of s)a.push(o.getTypeAnnotation())}if(a.length)return(0,lj.createUnionType)(a)}function oj(e,t,r){let a=e.constantViolations.slice();return a.unshift(e.path),a.filter(n=>{n=n.resolve();let s=n._guessExecutionStatusRelativeTo(t);return r&&s==="unknown"&&r.push(n),s==="before"})}function i_e(e,t){let r=t.node.operator,a=t.get("right").resolve(),n=t.get("left").resolve(),s;if(n.isIdentifier({name:e})?s=a:a.isIdentifier({name:e})&&(s=n),s)return r==="==="?s.getTypeAnnotation():t_e.includes(r)?cj():void 0;if(r!=="==="&&r!=="==")return;let i,o;if(n.isUnaryExpression({operator:"typeof"})?(i=n,o=a):a.isUnaryExpression({operator:"typeof"})&&(i=a,o=n),!i||!i.get("argument").isIdentifier({name:e})||(o=o.resolve(),!o.isLiteral()))return;let l=o.node.value;if(typeof l=="string")return r_e(l)}function o_e(e,t,r){let a;for(;a=t.parentPath;){if(a.isIfStatement()||a.isConditionalExpression())return t.key==="test"?void 0:a;if(a.isFunction()&&(r==null||a.parentPath.scope.getBinding(r)!==e))return;t=a}}function uj(e,t,r){let a=o_e(e,t,r);if(!a)return;let s=[a.get("test")],i=[];for(let o=0;o<s.length;o++){let l=s[o];if(l.isLogicalExpression())l.node.operator==="&&"&&(s.push(l.get("left")),s.push(l.get("right")));else if(l.isBinaryExpression()){let c=i_e(r,l);c&&i.push(c)}}return i.length?{typeAnnotation:(0,lj.createUnionType)(i),ifStatement:a}:uj(e,a,r)}});var bj=ne(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.ArrayExpression=gj;Kr.AssignmentExpression=L_e;Kr.BinaryExpression=E_e;Kr.BooleanLiteral=D_e;Kr.CallExpression=q_e;Kr.ConditionalExpression=A_e;Kr.ClassDeclaration=Kr.ClassExpression=Kr.FunctionDeclaration=Kr.ArrowFunctionExpression=Kr.FunctionExpression=B_e;Object.defineProperty(Kr,"Identifier",{enumerable:!0,get:function(){return c_e.default}});Kr.LogicalExpression=P_e;Kr.NewExpression=T_e;Kr.NullLiteral=__e;Kr.NumericLiteral=M_e;Kr.ObjectExpression=F_e;Kr.ParenthesizedExpression=N_e;Kr.RegExpLiteral=O_e;Kr.RestElement=yj;Kr.SequenceExpression=I_e;Kr.StringLiteral=k_e;Kr.TSAsExpression=hj;Kr.TSNonNullExpression=S_e;Kr.TaggedTemplateExpression=H_e;Kr.TemplateLiteral=w_e;Kr.TypeCastExpression=mj;Kr.UnaryExpression=C_e;Kr.UpdateExpression=R_e;Kr.VariableDeclarator=v_e;var l_e=fr(),c_e=dj(),pj=Mk(),{BOOLEAN_BINARY_OPERATORS:u_e,BOOLEAN_UNARY_OPERATORS:d_e,NUMBER_BINARY_OPERATORS:f_e,NUMBER_UNARY_OPERATORS:p_e,STRING_UNARY_OPERATORS:m_e,anyTypeAnnotation:fj,arrayTypeAnnotation:_k,booleanTypeAnnotation:Ok,buildMatchMemberExpression:SC,genericTypeAnnotation:af,identifier:hm,nullLiteralTypeAnnotation:h_e,numberTypeAnnotation:zg,stringTypeAnnotation:gm,tupleTypeAnnotation:g_e,unionTypeAnnotation:y_e,voidTypeAnnotation:x_e,isIdentifier:b_e}=l_e;function v_e(){if(this.get("id").isIdentifier())return this.get("init").getTypeAnnotation()}function mj(e){return e.typeAnnotation}mj.validParent=!0;function hj(e){return e.typeAnnotation}hj.validParent=!0;function S_e(){return this.get("expression").getTypeAnnotation()}function T_e(e){if(e.callee.type==="Identifier")return af(e.callee)}function w_e(){return gm()}function C_e(e){let t=e.operator;if(t==="void")return x_e();if(p_e.includes(t))return zg();if(m_e.includes(t))return gm();if(d_e.includes(t))return Ok()}function E_e(e){let t=e.operator;if(f_e.includes(t))return zg();if(u_e.includes(t))return Ok();if(t==="+"){let r=this.get("right"),a=this.get("left");return a.isBaseType("number")&&r.isBaseType("number")?zg():a.isBaseType("string")||r.isBaseType("string")?gm():y_e([gm(),zg()])}}function P_e(){let e=[this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()];return(0,pj.createUnionType)(e)}function A_e(){let e=[this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()];return(0,pj.createUnionType)(e)}function I_e(){return this.get("expressions").pop().getTypeAnnotation()}function N_e(){return this.get("expression").getTypeAnnotation()}function L_e(){return this.get("right").getTypeAnnotation()}function R_e(e){let t=e.operator;if(t==="++"||t==="--")return zg()}function k_e(){return gm()}function M_e(){return zg()}function D_e(){return Ok()}function __e(){return h_e()}function O_e(){return af(hm("RegExp"))}function F_e(){return af(hm("Object"))}function gj(){return af(hm("Array"))}function yj(){return gj()}yj.validParent=!0;function B_e(){return af(hm("Function"))}var U_e=SC("Array.from"),j_e=SC("Object.keys"),z_e=SC("Object.values"),V_e=SC("Object.entries");function q_e(){let{callee:e}=this.node;return j_e(e)?_k(gm()):U_e(e)||z_e(e)||b_e(e,{name:"Array"})?_k(fj()):V_e(e)?_k(g_e([gm(),fj()])):xj(this.get("callee"))}function H_e(){return xj(this.get("tag"))}function xj(e){if(e=e.resolve(),e.isFunction()){let{node:t}=e;if(t.async)return t.generator?af(hm("AsyncIterator")):af(hm("Promise"));if(t.generator)return af(hm("Iterator"));if(e.node.returnType)return e.node.returnType}}});var Cj=ne(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});nf._getTypeAnnotation=wj;nf.baseTypeStrictlyMatches=fOe;nf.couldBeBaseType=dOe;nf.getTypeAnnotation=cOe;nf.isBaseType=uOe;nf.isGenericType=pOe;var vj=bj(),$_e=fr(),{anyTypeAnnotation:Tj,isAnyTypeAnnotation:TC,isArrayTypeAnnotation:G_e,isBooleanTypeAnnotation:K_e,isEmptyTypeAnnotation:W_e,isFlowBaseAnnotation:X_e,isGenericTypeAnnotation:Y_e,isIdentifier:Sj,isMixedTypeAnnotation:J_e,isNumberTypeAnnotation:Q_e,isStringTypeAnnotation:Z_e,isTSArrayType:eOe,isTSTypeAnnotation:tOe,isTSTypeReference:rOe,isTupleTypeAnnotation:aOe,isTypeAnnotation:nOe,isUnionTypeAnnotation:sOe,isVoidTypeAnnotation:iOe,stringTypeAnnotation:oOe,voidTypeAnnotation:lOe}=$_e;function cOe(){let e=this.getData("typeAnnotation");return e!=null||(e=wj.call(this)||Tj(),(nOe(e)||tOe(e))&&(e=e.typeAnnotation),this.setData("typeAnnotation",e)),e}var Fk=new WeakSet;function wj(){let e=this.node;if(!e)if(this.key==="init"&&this.parentPath.isVariableDeclarator()){let r=this.parentPath.parentPath,a=r.parentPath;return r.key==="left"&&a.isForInStatement()?oOe():r.key==="left"&&a.isForOfStatement()?Tj():lOe()}else return;if(e.typeAnnotation)return e.typeAnnotation;if(!Fk.has(e)){Fk.add(e);try{var t;let r=vj[e.type];if(r)return r.call(this,e);if(r=vj[this.parentPath.type],(t=r)!=null&&t.validParent)return this.parentPath.getTypeAnnotation()}finally{Fk.delete(e)}}}function uOe(e,t){return Bk(e,this.getTypeAnnotation(),t)}function Bk(e,t,r){if(e==="string")return Z_e(t);if(e==="number")return Q_e(t);if(e==="boolean")return K_e(t);if(e==="any")return TC(t);if(e==="mixed")return J_e(t);if(e==="empty")return W_e(t);if(e==="void")return iOe(t);if(r)return!1;throw new Error(`Unknown base type ${e}`)}function dOe(e){let t=this.getTypeAnnotation();if(TC(t))return!0;if(sOe(t)){for(let r of t.types)if(TC(r)||Bk(e,r,!0))return!0;return!1}else return Bk(e,t,!0)}function fOe(e){let t=this.getTypeAnnotation(),r=e.getTypeAnnotation();return!TC(t)&&X_e(t)?r.type===t.type:!1}function pOe(e){let t=this.getTypeAnnotation();return e==="Array"&&(eOe(t)||G_e(t)||aOe(t))?!0:Y_e(t)&&Sj(t.id,{name:e})||rOe(t)&&Sj(t.typeName,{name:e})}});var Pj=ne((oct,Uk)=>{var hr=String,Ej=function(){return{isColorSupported:!1,reset:hr,bold:hr,dim:hr,italic:hr,underline:hr,inverse:hr,hidden:hr,strikethrough:hr,black:hr,red:hr,green:hr,yellow:hr,blue:hr,magenta:hr,cyan:hr,white:hr,gray:hr,bgBlack:hr,bgRed:hr,bgGreen:hr,bgYellow:hr,bgBlue:hr,bgMagenta:hr,bgCyan:hr,bgWhite:hr,blackBright:hr,redBright:hr,greenBright:hr,yellowBright:hr,blueBright:hr,magentaBright:hr,cyanBright:hr,whiteBright:hr,bgBlackBright:hr,bgRedBright:hr,bgGreenBright:hr,bgYellowBright:hr,bgBlueBright:hr,bgMagentaBright:hr,bgCyanBright:hr,bgWhiteBright:hr}};Uk.exports=Ej();Uk.exports.createColors=Ej});var Aj=ne(wC=>{Object.defineProperty(wC,"__esModule",{value:!0});wC.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g;wC.matchToToken=function(e){var t={type:"invalid",value:e[0],closed:void 0};return e[1]?(t.type="string",t.closed=!!(e[3]||e[4])):e[5]?t.type="comment":e[6]?(t.type="comment",t.closed=!!e[7]):e[8]?t.type="regex":e[9]?t.type="number":e[10]?t.type="name":e[11]?t.type="punctuator":e[12]&&(t.type="whitespace"),t}});var zk=ne(U0=>{"use strict";Object.defineProperty(U0,"__esModule",{value:!0});var jk=Pj(),Ij=Aj(),Nj=y0();function mOe(){return typeof process=="object"&&(process.env.FORCE_COLOR==="0"||process.env.FORCE_COLOR==="false")?!1:jk.isColorSupported}var CC=(e,t)=>r=>e(t(r));function kj(e){return{keyword:e.cyan,capitalized:e.yellow,jsxIdentifier:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.gray,invalid:CC(CC(e.white,e.bgRed),e.bold),gutter:e.gray,marker:CC(e.red,e.bold),message:CC(e.red,e.bold),reset:e.reset}}var hOe=kj(jk.createColors(!0)),gOe=kj(jk.createColors(!1));function Mj(e){return e?hOe:gOe}var yOe=new Set(["as","async","from","get","of","set"]),xOe=/\r\n|[\n\r\u2028\u2029]/,bOe=/^[()[\]{}]$/,Dj;{let e=/^[a-z][\w-]*$/i,t=function(r,a,n){if(r.type==="name"){if(Nj.isKeyword(r.value)||Nj.isStrictReservedWord(r.value,!0)||yOe.has(r.value))return"keyword";if(e.test(r.value)&&(n[a-1]==="<"||n.slice(a-2,a)==="</"))return"jsxIdentifier";if(r.value[0]!==r.value[0].toLowerCase())return"capitalized"}return r.type==="punctuator"&&bOe.test(r.value)?"bracket":r.type==="invalid"&&(r.value==="@"||r.value==="#")?"punctuator":r.type};Dj=function*(r){let a;for(;a=Ij.default.exec(r);){let n=Ij.matchToToken(a);yield{type:t(n,a.index,r),value:n.value}}}}function _j(e){if(e==="")return"";let t=Mj(!0),r="";for(let{type:a,value:n}of Dj(e))a in t?r+=n.split(xOe).map(s=>t[a](s)).join(`
|
|
`):r+=n;return r}var Lj=!1,Rj=/\r\n|[\n\r\u2028\u2029]/;function vOe(e,t,r){let a=Object.assign({column:0,line:-1},e.start),n=Object.assign({},a,e.end),{linesAbove:s=2,linesBelow:i=3}=r||{},o=a.line,l=a.column,c=n.line,u=n.column,d=Math.max(o-(s+1),0),f=Math.min(t.length,c+i);o===-1&&(d=0),c===-1&&(f=t.length);let p=c-o,m={};if(p)for(let h=0;h<=p;h++){let x=h+o;if(!l)m[x]=!0;else if(h===0){let g=t[x-1].length;m[x]=[l,g-l+1]}else if(h===p)m[x]=[0,u];else{let g=t[x-h].length;m[x]=[0,g]}}else l===u?l?m[o]=[l,0]:m[o]=!0:m[o]=[l,u-l];return{start:d,end:f,markerLines:m}}function Oj(e,t,r={}){let a=r.forceColor||mOe()&&r.highlightCode,n=Mj(a),s=e.split(Rj),{start:i,end:o,markerLines:l}=vOe(t,s,r),c=t.start&&typeof t.start.column=="number",u=String(o).length,f=(a?_j(e):e).split(Rj,o).slice(i,o).map((p,m)=>{let h=i+1+m,g=` ${` ${h}`.slice(-u)} |`,y=l[h],b=!l[h+1];if(y){let S="";if(Array.isArray(y)){let w=p.slice(0,Math.max(y[0]-1,0)).replace(/[^\t]/g," "),P=y[1]||1;S=[`
|
|
`,n.gutter(g.replace(/\d/g," "))," ",w,n.marker("^").repeat(P)].join(""),b&&r.message&&(S+=" "+n.message(r.message))}return[n.marker(">"),n.gutter(g),p.length>0?` ${p}`:"",S].join("")}else return` ${n.gutter(g)}${p.length>0?` ${p}`:""}`}).join(`
|
|
`);return r.message&&!c&&(f=`${" ".repeat(u+1)}${r.message}
|
|
${f}`),a?n.reset(f):f}function SOe(e,t,r,a={}){if(!Lj){Lj=!0;let s="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(process.emitWarning)process.emitWarning(s,"DeprecationWarning");else{let i=new Error(s);i.name="DeprecationWarning"}}return r=Math.max(r,0),Oj(e,{start:{column:r,line:t}},a)}U0.codeFrameColumns=Oj;U0.default=SOe;U0.highlight=_j});var Fj=ne(EC=>{"use strict";Object.defineProperty(EC,"__esModule",{value:!0});EC.hooks=void 0;var uct=EC.hooks=[function(e,t){if(e.key==="test"&&(t.isWhile()||t.isSwitchCase())||e.key==="declaration"&&t.isExportDeclaration()||e.key==="body"&&t.isLabeledStatement()||e.listKey==="declarations"&&t.isVariableDeclaration()&&t.node.declarations.length===1||e.key==="expression"&&t.isExpressionStatement())return t.remove(),!0},function(e,t){if(t.isSequenceExpression()&&t.node.expressions.length===1)return t.replaceWith(t.node.expressions[0]),!0},function(e,t){if(t.isBinary())return e.key==="left"?t.replaceWith(t.node.right):t.replaceWith(t.node.left),!0},function(e,t){if(t.isIfStatement()&&e.key==="consequent"||e.key==="body"&&(t.isLoop()||t.isArrowFunctionExpression()))return e.replaceWith({type:"BlockStatement",directives:[],body:[]}),!0}]});var PC=ne(sf=>{"use strict";Object.defineProperty(sf,"__esModule",{value:!0});sf._assertUnremoved=Vj;sf._callRemovalHooks=jj;sf._markRemoved=Vk;sf._remove=zj;sf._removeFromScope=Uj;sf.remove=IOe;var TOe=Fj(),wOe=um(),COe=qk(),Bj=Pu(),EOe=fr(),POe=AC(),AOe=Zo();function IOe(){var e;if(Vj.call(this),AOe.resync.call(this),jj.call(this)){Vk.call(this);return}(e=this.opts)!=null&&e.noScope||Uj.call(this),this.shareCommentsWithSiblings(),zj.call(this),Vk.call(this)}function Uj(){let e=EOe.getBindingIdentifiers(this.node,!1,!1,!0);Object.keys(e).forEach(t=>this.scope.removeBinding(t))}function jj(){if(this.parentPath){for(let e of TOe.hooks)if(e(this,this.parentPath))return!0}}function zj(){Array.isArray(this.container)?(this.container.splice(this.key,1),POe.updateSiblingKeys.call(this,this.key,-1)):COe._replaceWith.call(this,null)}function Vk(){if(this._traverseFlags|=Bj.SHOULD_SKIP|Bj.REMOVED,this.parent){var e;(e=(0,wOe.getCachedPaths)(this))==null||e.delete(this.node)}this.node=null}function Vj(){if(this.removed)throw this.buildCodeFrameError("NodePath has been removed so is read-only.")}});var Hj=ne(IC=>{"use strict";Object.defineProperty(IC,"__esModule",{value:!0});IC.default=void 0;var qj=fr(),NOe=qj,{react:LOe}=qj,{cloneNode:ROe,jsxExpressionContainer:kOe,variableDeclaration:MOe,variableDeclarator:DOe}=NOe,_Oe={ReferencedIdentifier(e,t){if(e.isJSXIdentifier()&&LOe.isCompatTag(e.node.name)&&!e.parentPath.isJSXMemberExpression())return;if(e.node.name==="this"){let a=e.scope;do if(a.path.isFunction()&&!a.path.isArrowFunctionExpression())break;while(a=a.parent);a&&t.breakOnScopePaths.push(a.path)}let r=e.scope.getBinding(e.node.name);if(r){for(let a of r.constantViolations)if(a.scope!==r.path.scope){t.mutableBinding=!0,e.stop();return}r===t.scope.getBinding(e.node.name)&&(t.bindings[e.node.name]=r)}}},Hk=class{constructor(t,r){this.breakOnScopePaths=void 0,this.bindings=void 0,this.mutableBinding=void 0,this.scopes=void 0,this.scope=void 0,this.path=void 0,this.attachAfter=void 0,this.breakOnScopePaths=[],this.bindings={},this.mutableBinding=!1,this.scopes=[],this.scope=r,this.path=t,this.attachAfter=!1}isCompatibleScope(t){for(let r of Object.keys(this.bindings)){let a=this.bindings[r];if(!t.bindingIdentifierEquals(r,a.identifier))return!1}return!0}getCompatibleScopes(){let t=this.path.scope;do{if(this.isCompatibleScope(t))this.scopes.push(t);else break;if(this.breakOnScopePaths.includes(t.path))break}while(t=t.parent)}getAttachmentPath(){let t=this._getAttachmentPath();if(!t)return;let r=t.scope;if(r.path===t&&(r=t.scope.parent),r.path.isProgram()||r.path.isFunction())for(let a of Object.keys(this.bindings)){if(!r.hasOwnBinding(a))continue;let n=this.bindings[a];if(n.kind==="param"||n.path.parentKey==="params")continue;if(this.getAttachmentParentForPath(n.path).key>=t.key){this.attachAfter=!0,t=n.path;for(let i of n.constantViolations)this.getAttachmentParentForPath(i).key>t.key&&(t=i)}}return t}_getAttachmentPath(){let r=this.scopes.pop();if(r){if(r.path.isFunction())if(this.hasOwnParamBindings(r)){if(this.scope===r)return;let a=r.path.get("body").get("body");for(let n=0;n<a.length;n++)if(!a[n].node._blockHoist)return a[n]}else return this.getNextScopeAttachmentParent();else if(r.path.isProgram())return this.getNextScopeAttachmentParent()}}getNextScopeAttachmentParent(){let t=this.scopes.pop();if(t)return this.getAttachmentParentForPath(t.path)}getAttachmentParentForPath(t){do if(!t.parentPath||Array.isArray(t.container)&&t.isStatement())return t;while(t=t.parentPath);return t}hasOwnParamBindings(t){for(let r of Object.keys(this.bindings)){if(!t.hasOwnBinding(r))continue;let a=this.bindings[r];if(a.kind==="param"&&a.constant)return!0}return!1}run(){if(this.path.traverse(_Oe,this),this.mutableBinding)return;this.getCompatibleScopes();let t=this.getAttachmentPath();if(!t||t.getFunctionParent()===this.path.getFunctionParent())return;let r=t.scope.generateUidIdentifier("ref"),a=DOe(r,this.path.node),n=this.attachAfter?"insertAfter":"insertBefore",[s]=t[n]([t.isVariableDeclarator()?a:MOe("var",[a])]),i=this.path.parentPath;return i.isJSXElement()&&this.path.container===i.node.children&&(r=kOe(r)),this.path.replaceWith(ROe(r)),s.isVariableDeclarator()?s.get("init"):s.get("declarations.0.init")}};IC.default=Hk});var AC=ne(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});al._containerInsert=Xk;al._containerInsertAfter=Kj;al._containerInsertBefore=Yk;al._verifyNodeList=j0;al.insertAfter=QOe;al.insertBefore=YOe;al.pushContainer=e3e;al.unshiftContainer=ZOe;al.updateSiblingKeys=Yj;var OOe=um(),Wk=Pu(),$k=Zo(),NC=PC(),FOe=fr(),BOe=Hj(),{arrowFunctionExpression:UOe,assertExpression:jOe,assignmentExpression:zOe,blockStatement:$j,callExpression:VOe,cloneNode:Gk,expressionStatement:Kk,isAssignmentExpression:qOe,isCallExpression:HOe,isExportNamedDeclaration:Gj,isExpression:$Oe,isIdentifier:GOe,isSequenceExpression:KOe,isSuper:WOe,thisExpression:XOe}=FOe;function YOe(e){NC._assertUnremoved.call(this);let t=j0.call(this,e),{parentPath:r,parent:a}=this;if(r.isExpressionStatement()||r.isLabeledStatement()||Gj(a)||r.isExportDefaultDeclaration()&&this.isDeclaration())return r.insertBefore(t);if(this.isNodeType("Expression")&&!this.isJSXElement()||r.isForStatement()&&this.key==="init")return this.node&&t.push(this.node),this.replaceExpressionWithStatements(t);if(Array.isArray(this.container))return Yk.call(this,t);if(this.isStatementOrBlock()){let n=this.node,s=n&&(!this.isExpressionStatement()||n.expression!=null),[i]=this.replaceWith($j(s?[n]:[]));return i.unshiftContainer("body",t)}else throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?")}function Xk(e,t){Yj.call(this,e,t.length);let r=[];this.container.splice(e,0,...t);for(let s=0;s<t.length;s++){var a;let i=e+s,o=this.getSibling(i);r.push(o),(a=this.context)!=null&&a.queue&&$k.pushContext.call(o,this.context)}let n=$k._getQueueContexts.call(this);for(let s of r){$k.setScope.call(s),s.debug("Inserted.");for(let i of n)i.maybeQueue(s,!0)}return r}function Yk(e){return Xk.call(this,this.key,e)}function Kj(e){return Xk.call(this,this.key+1,e)}var Wj=e=>e[e.length-1];function Xj(e){return KOe(e.parent)&&(Wj(e.parent.expressions)!==e.node||Xj(e.parentPath))}function JOe(e,t){if(!qOe(e)||!GOe(e.left))return!1;let r=t.getBlockParent();return r.hasOwnBinding(e.left.name)&&r.getOwnBinding(e.left.name).constantViolations.length<=1}function QOe(e){if(NC._assertUnremoved.call(this),this.isSequenceExpression())return Wj(this.get("expressions")).insertAfter(e);let t=j0.call(this,e),{parentPath:r,parent:a}=this;if(r.isExpressionStatement()||r.isLabeledStatement()||Gj(a)||r.isExportDefaultDeclaration()&&this.isDeclaration())return r.insertAfter(t.map(n=>$Oe(n)?Kk(n):n));if(this.isNodeType("Expression")&&!this.isJSXElement()&&!r.isJSXElement()||r.isForStatement()&&this.key==="init"){let n=this;if(n.node){let s=n.node,{scope:i}=this;if(i.path.isPattern())return jOe(s),n.replaceWith(VOe(UOe([],s),[])),n.get("callee.body").insertAfter(t),[n];if(Xj(n))t.unshift(s);else if(HOe(s)&&WOe(s.callee))t.unshift(s),t.push(XOe());else if(JOe(s,i))t.unshift(s),t.push(Gk(s.left));else if(i.isPure(s,!0))t.push(s);else{r.isMethod({computed:!0,key:s})&&(i=i.parent);let o=i.generateDeclaredUidIdentifier();t.unshift(Kk(zOe("=",Gk(o),s))),t.push(Kk(Gk(o)))}}return this.replaceExpressionWithStatements(t)}else{if(Array.isArray(this.container))return Kj.call(this,t);if(this.isStatementOrBlock()){let n=this.node,s=n&&(!this.isExpressionStatement()||n.expression!=null),[i]=this.replaceWith($j(s?[n]:[]));return i.pushContainer("body",t)}else throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?")}}function Yj(e,t){if(!this.parent)return;let r=(0,OOe.getCachedPaths)(this);if(r)for(let[,a]of r)typeof a.key=="number"&&a.container===this.container&&a.key>=e&&(a.key+=t)}function j0(e){if(!e)return[];Array.isArray(e)||(e=[e]);for(let t=0;t<e.length;t++){let r=e[t],a;if(r?typeof r!="object"?a="contains a non-object node":r.type?r instanceof Wk.default&&(a="has a NodePath when it expected a raw object"):a="without a type":a="has falsy node",a){let n=Array.isArray(r)?"array":typeof r;throw new Error(`Node list ${a} with the index of ${t} and type of ${n}`)}}return e}function ZOe(e,t){NC._assertUnremoved.call(this);let r=j0.call(this,t),a=this.node[e],n=Wk.default.get({parentPath:this,parent:this.node,container:a,listKey:e,key:0}).setContext(this.context);return Yk.call(n,r)}function e3e(e,t){NC._assertUnremoved.call(this);let r=j0.call(this,t),a=this.node[e];return Wk.default.get({parentPath:this,parent:this.node,container:a,listKey:e,key:a.length}).setContext(this.context).replaceWithMultiple(r)}al.hoist=function(t=this.scope){return new BOe.default(this,t).run()}});var qk=ne(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});of._replaceWith=nz;of.replaceExpressionWithStatements=I3e;of.replaceInline=N3e;of.replaceWith=A3e;of.replaceWithMultiple=E3e;of.replaceWithSourceString=P3e;var t3e=zk(),Qk=Fg(),r3e=Pu(),tz=um(),Zk=AC(),a3e=Pw(),n3e=fr(),Vg=Zo(),{FUNCTION_TYPES:Jj,arrowFunctionExpression:s3e,assignmentExpression:rz,awaitExpression:i3e,blockStatement:o3e,buildUndefinedNode:Jk,callExpression:l3e,cloneNode:e2,conditionalExpression:c3e,expressionStatement:u3e,getBindingIdentifiers:d3e,identifier:f3e,inheritLeadingComments:p3e,inheritTrailingComments:m3e,inheritsComments:h3e,isBlockStatement:g3e,isEmptyStatement:Qj,isExpression:az,isExpressionStatement:y3e,isIfStatement:x3e,isProgram:b3e,isStatement:v3e,isVariableDeclaration:S3e,removeComments:T3e,returnStatement:Zj,sequenceExpression:w3e,validate:ez,yieldExpression:C3e}=n3e;function E3e(e){var t;Vg.resync.call(this);let r=Zk._verifyNodeList.call(this,e);p3e(r[0],this.node),m3e(r[r.length-1],this.node),(t=(0,tz.getCachedPaths)(this))==null||t.delete(this.node),this.node=this.container[this.key]=null;let a=this.insertAfter(e);return this.node?this.requeue():this.remove(),a}function P3e(e){Vg.resync.call(this);let t;try{e=`(${e})`,t=(0,a3e.parse)(e)}catch(a){let n=a.loc;throw n&&(a.message+=` - make sure this is an expression.
|
|
`+(0,t3e.codeFrameColumns)(e,{start:{line:n.line,column:n.column+1}}),a.code="BABEL_REPLACE_SOURCE_ERROR"),a}let r=t.program.body[0].expression;return Qk.default.removeProperties(r),this.replaceWith(r)}function A3e(e){if(Vg.resync.call(this),this.removed)throw new Error("You can't replace this node, we've already removed it");let t=e instanceof r3e.default?e.node:e;if(!t)throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");if(this.node===t)return[this];if(this.isProgram()&&!b3e(t))throw new Error("You can only replace a Program root node with another Program node");if(Array.isArray(t))throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");if(typeof t=="string")throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");let r="";if(this.isNodeType("Statement")&&az(t)&&!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(t)&&!this.parentPath.isExportDefaultDeclaration()&&(t=u3e(t),r="expression"),this.isNodeType("Expression")&&v3e(t)&&!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(t))return this.replaceExpressionWithStatements([t]);let a=this.node;return a&&(h3e(t,a),T3e(a)),nz.call(this,t),this.type=t.type,Vg.setScope.call(this),this.requeue(),[r?this.get(r):this]}function nz(e){var t;if(!this.container)throw new ReferenceError("Container is falsy");this.inList?ez(this.parent,this.key,[e]):ez(this.parent,this.key,e),this.debug(`Replace with ${e?.type}`),(t=(0,tz.getCachedPaths)(this))==null||t.set(e,this).delete(this.node),this.node=e,this.container[this.key]=e}function I3e(e){Vg.resync.call(this);let t=[],r=LC(e,t);if(r){for(let f of t)this.scope.push({id:f});return this.replaceWith(r)[0].get("expressions")}let a=this.getFunctionParent(),n=a?.node.async,s=a?.node.generator,i=s3e([],o3e(e));this.replaceWith(l3e(i,[]));let o=this.get("callee");o.get("body").scope.hoistVariables(f=>this.scope.push({id:f}));let l=o.getCompletionRecords();for(let f of l){if(!f.isExpressionStatement())continue;let p=f.findParent(m=>m.isLoop());if(p){let m=p.getData("expressionReplacementReturnUid");m?m=f3e(m.name):(m=o.scope.generateDeclaredUidIdentifier("ret"),o.get("body").pushContainer("body",Zj(e2(m))),p.setData("expressionReplacementReturnUid",m)),f.get("expression").replaceWith(rz("=",e2(m),f.node.expression))}else f.replaceWith(Zj(f.node.expression))}o.arrowFunctionToExpression();let c=o,u=n&&Qk.default.hasType(this.get("callee.body").node,"AwaitExpression",Jj),d=s&&Qk.default.hasType(this.get("callee.body").node,"YieldExpression",Jj);return u&&(c.set("async",!0),d||this.replaceWith(i3e(this.node))),d&&(c.set("generator",!0),this.replaceWith(C3e(this.node,!0))),c.get("body.body")}function LC(e,t){let r=[],a=!0;for(let n of e)if(Qj(n)||(a=!1),az(n))r.push(n);else if(y3e(n))r.push(n.expression);else if(S3e(n)){if(n.kind!=="var")return;for(let s of n.declarations){let i=d3e(s);for(let o of Object.keys(i))t.push(e2(i[o]));s.init&&r.push(rz("=",s.id,s.init))}a=!0}else if(x3e(n)){let s=n.consequent?LC([n.consequent],t):Jk(),i=n.alternate?LC([n.alternate],t):Jk();if(!s||!i)return;r.push(c3e(n.test,s,i))}else if(g3e(n)){let s=LC(n.body,t);if(!s)return;r.push(s)}else if(Qj(n))e.indexOf(n)===0&&(a=!0);else return;return a&&r.push(Jk()),r.length===1?r[0]:w3e(r)}function N3e(e){if(Vg.resync.call(this),Array.isArray(e))if(Array.isArray(this.container)){e=Zk._verifyNodeList.call(this,e);let t=Zk._containerInsertAfter.call(this,e);return this.remove(),t}else return this.replaceWithMultiple(e);else return this.replaceWith(e)}});var lz=ne(RC=>{"use strict";Object.defineProperty(RC,"__esModule",{value:!0});RC.evaluate=F3e;RC.evaluateTruthy=_3e;var L3e=["Number","String","Math"],R3e=["isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent",null,null],k3e=["random"];function sz(e){return L3e.includes(e)}function M3e(e){return R3e.includes(e)}function D3e(e){return k3e.includes(e)}function _3e(){let e=this.evaluate();if(e.confident)return!!e.value}function Hl(e,t){t.confident&&(t.deoptPath=e,t.confident=!1)}var iz=new Map([["undefined",void 0],["Infinity",1/0],["NaN",NaN]]);function hi(e,t){let{node:r}=e,{seen:a}=t;if(a.has(r)){let n=a.get(r);if(n.resolved)return n.value;Hl(e,t);return}else{let n={resolved:!1};a.set(r,n);let s=O3e(e,t);return t.confident&&(n.resolved=!0,n.value=s),s}}function O3e(e,t){if(t.confident){if(e.isSequenceExpression()){let a=e.get("expressions");return hi(a[a.length-1],t)}if(e.isStringLiteral()||e.isNumericLiteral()||e.isBooleanLiteral())return e.node.value;if(e.isNullLiteral())return null;if(e.isTemplateLiteral())return oz(e,e.node.quasis,t);if(e.isTaggedTemplateExpression()&&e.get("tag").isMemberExpression()){let a=e.get("tag.object"),{node:{name:n}}=a,s=e.get("tag.property");if(a.isIdentifier()&&n==="String"&&!e.scope.getBinding(n)&&s.isIdentifier()&&s.node.name==="raw")return oz(e,e.node.quasi.quasis,t,!0)}if(e.isConditionalExpression()){let a=hi(e.get("test"),t);return t.confident?hi(a?e.get("consequent"):e.get("alternate"),t):void 0}if(e.isExpressionWrapper())return hi(e.get("expression"),t);if(e.isMemberExpression()&&!e.parentPath.isCallExpression({callee:e.node})){let a=e.get("property"),n=e.get("object");if(n.isLiteral()){let s=n.node.value,i=typeof s,o=null;if(e.node.computed){if(o=hi(a,t),!t.confident)return}else a.isIdentifier()&&(o=a.node.name);if((i==="number"||i==="string")&&o!=null&&(typeof o=="number"||typeof o=="string"))return s[o]}}if(e.isReferencedIdentifier()){let a=e.scope.getBinding(e.node.name);if(a){if(a.constantViolations.length>0||e.node.start<a.path.node.end){Hl(a.path,t);return}let o=a.path.scope;if(a.kind==="var"&&o!==a.scope){let l=!o.path.parentPath.isBlockStatement();for(let c=o.parent;c;c=c.parent){var r;if(c===e.scope){if(l){Hl(a.path,t);return}break}(r=c.path.parentPath)!=null&&r.isBlockStatement()&&(l=!0)}}if(a.hasValue)return a.value}let n=e.node.name;if(iz.has(n)){if(!a)return iz.get(n);Hl(a.path,t);return}let s=e.resolve();if(s===e){Hl(e,t);return}let i=hi(s,t);if(typeof i=="object"&&i!==null&&a.references>1){Hl(s,t);return}return i}if(e.isUnaryExpression({prefix:!0})){if(e.node.operator==="void")return;let a=e.get("argument");if(e.node.operator==="typeof"&&(a.isFunction()||a.isClass()))return"function";let n=hi(a,t);if(!t.confident)return;switch(e.node.operator){case"!":return!n;case"+":return+n;case"-":return-n;case"~":return~n;case"typeof":return typeof n}}if(e.isArrayExpression()){let a=[],n=e.get("elements");for(let s of n){let i=s.evaluate();if(i.confident)a.push(i.value);else{Hl(i.deopt,t);return}}return a}if(e.isObjectExpression()){let a={},n=e.get("properties");for(let s of n){if(s.isObjectMethod()||s.isSpreadElement()){Hl(s,t);return}let i=s.get("key"),o;if(s.node.computed){if(o=i.evaluate(),!o.confident){Hl(o.deopt,t);return}o=o.value}else i.isIdentifier()?o=i.node.name:o=i.node.value;let c=s.get("value").evaluate();if(!c.confident){Hl(c.deopt,t);return}c=c.value,a[o]=c}return a}if(e.isLogicalExpression()){let a=t.confident,n=hi(e.get("left"),t),s=t.confident;t.confident=a;let i=hi(e.get("right"),t),o=t.confident;switch(e.node.operator){case"||":return t.confident=s&&(!!n||o),t.confident?n||i:void 0;case"&&":return t.confident=s&&(!n||o),t.confident?n&&i:void 0;case"??":return t.confident=s&&(n!=null||o),t.confident?n??i:void 0}}if(e.isBinaryExpression()){let a=hi(e.get("left"),t);if(!t.confident)return;let n=hi(e.get("right"),t);if(!t.confident)return;switch(e.node.operator){case"-":return a-n;case"+":return a+n;case"/":return a/n;case"*":return a*n;case"%":return a%n;case"**":return Math.pow(a,n);case"<":return a<n;case">":return a>n;case"<=":return a<=n;case">=":return a>=n;case"==":return a==n;case"!=":return a!=n;case"===":return a===n;case"!==":return a!==n;case"|":return a|n;case"&":return a&n;case"^":return a^n;case"<<":return a<<n;case">>":return a>>n;case">>>":return a>>>n}}if(e.isCallExpression()){let a=e.get("callee"),n,s;if(a.isIdentifier()&&!e.scope.getBinding(a.node.name)&&(sz(a.node.name)||M3e(a.node.name))&&(s=global[a.node.name]),a.isMemberExpression()){let i=a.get("object"),o=a.get("property");if(i.isIdentifier()&&o.isIdentifier()&&sz(i.node.name)&&!D3e(o.node.name)){n=global[i.node.name];let l=o.node.name;hasOwnProperty.call(n,l)&&(s=n[l])}if(i.isLiteral()&&o.isIdentifier()){let l=typeof i.node.value;(l==="string"||l==="number")&&(n=i.node.value,s=n[o.node.name])}}if(s){let i=e.get("arguments").map(o=>hi(o,t));return t.confident?s.apply(n,i):void 0}}Hl(e,t)}}function oz(e,t,r,a=!1){let n="",s=0,i=e.isTemplateLiteral()?e.get("expressions"):e.get("quasi.expressions");for(let o of t){if(!r.confident)break;n+=a?o.value.raw:o.value.cooked;let l=i[s++];l&&(n+=String(hi(l,r)))}if(r.confident)return n}function F3e(){let e={confident:!0,deoptPath:null,seen:new Map},t=hi(this,e);return e.confident||(t=void 0),{confident:e.confident,deopt:e.deoptPath,value:t}}});var cz=ne(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});nl.statements=nl.statement=nl.smart=nl.program=nl.expression=void 0;var B3e=fr(),{assertExpressionStatement:U3e}=B3e;function t2(e){return{code:t=>`/* @babel/template */;
|
|
${t}`,validate:()=>{},unwrap:t=>e(t.program.body.slice(1))}}var yct=nl.smart=t2(e=>e.length>1?e:e[0]),xct=nl.statements=t2(e=>e),bct=nl.statement=t2(e=>{if(e.length===0)throw new Error("Found nothing to return.");if(e.length>1)throw new Error("Found multiple statements but wanted one");return e[0]}),j3e=nl.expression={code:e=>`(
|
|
${e}
|
|
)`,validate:e=>{if(e.program.body.length>1)throw new Error("Found multiple statements but wanted one");if(j3e.unwrap(e).start===0)throw new Error("Parse result included parens.")},unwrap:({program:e})=>{let[t]=e.body;return U3e(t),t.expression}},vct=nl.program={code:e=>e,validate:()=>{},unwrap:e=>e.program}});var kC=ne(z0=>{"use strict";Object.defineProperty(z0,"__esModule",{value:!0});z0.merge=q3e;z0.normalizeReplacements=$3e;z0.validate=H3e;var z3e=["placeholderWhitelist","placeholderPattern","preserveComments","syntacticPlaceholders"];function V3e(e,t){if(e==null)return{};var r={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)!==-1)continue;r[a]=e[a]}return r}function q3e(e,t){let{placeholderWhitelist:r=e.placeholderWhitelist,placeholderPattern:a=e.placeholderPattern,preserveComments:n=e.preserveComments,syntacticPlaceholders:s=e.syntacticPlaceholders}=t;return{parser:Object.assign({},e.parser,t.parser),placeholderWhitelist:r,placeholderPattern:a,preserveComments:n,syntacticPlaceholders:s}}function H3e(e){if(e!=null&&typeof e!="object")throw new Error("Unknown template options.");let t=e||{},{placeholderWhitelist:r,placeholderPattern:a,preserveComments:n,syntacticPlaceholders:s}=t,i=V3e(t,z3e);if(r!=null&&!(r instanceof Set))throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined");if(a!=null&&!(a instanceof RegExp)&&a!==!1)throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined");if(n!=null&&typeof n!="boolean")throw new Error("'.preserveComments' must be a boolean, null, or undefined");if(s!=null&&typeof s!="boolean")throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined");if(s===!0&&(r!=null||a!=null))throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'");return{parser:i,placeholderWhitelist:r||void 0,placeholderPattern:a??void 0,preserveComments:n??void 0,syntacticPlaceholders:s??void 0}}function $3e(e){if(Array.isArray(e))return e.reduce((t,r,a)=>(t["$"+a]=r,t),{});if(typeof e=="object"||e==null)return e||void 0;throw new Error("Template replacements must be an array, object, null, or undefined")}});var a2=ne(r2=>{"use strict";Object.defineProperty(r2,"__esModule",{value:!0});r2.default=sFe;var G3e=fr(),K3e=Pw(),W3e=zk(),{isCallExpression:X3e,isExpressionStatement:Y3e,isFunction:J3e,isIdentifier:Q3e,isJSXIdentifier:Z3e,isNewExpression:eFe,isPlaceholder:MC,isStatement:tFe,isStringLiteral:uz,removePropertiesDeep:rFe,traverse:aFe}=G3e,nFe=/^[_$A-Z0-9]+$/;function sFe(e,t,r){let{placeholderWhitelist:a,placeholderPattern:n,preserveComments:s,syntacticPlaceholders:i}=r,o=lFe(t,r.parser,i);rFe(o,{preserveComments:s}),e.validate(o);let l={syntactic:{placeholders:[],placeholderNames:new Set},legacy:{placeholders:[],placeholderNames:new Set},placeholderWhitelist:a,placeholderPattern:n,syntacticPlaceholders:i};return aFe(o,iFe,l),Object.assign({ast:o},l.syntactic.placeholders.length?l.syntactic:l.legacy)}function iFe(e,t,r){var a;let n,s=r.syntactic.placeholders.length>0;if(MC(e)){if(r.syntacticPlaceholders===!1)throw new Error("%%foo%%-style placeholders can't be used when '.syntacticPlaceholders' is false.");n=e.name.name,s=!0}else{if(s||r.syntacticPlaceholders)return;if(Q3e(e)||Z3e(e))n=e.name;else if(uz(e))n=e.value;else return}if(s&&(r.placeholderPattern!=null||r.placeholderWhitelist!=null))throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'");if(!s&&(r.placeholderPattern===!1||!(r.placeholderPattern||nFe).test(n))&&!((a=r.placeholderWhitelist)!=null&&a.has(n)))return;t=t.slice();let{node:i,key:o}=t[t.length-1],l;uz(e)||MC(e,{expectedNode:"StringLiteral"})?l="string":eFe(i)&&o==="arguments"||X3e(i)&&o==="arguments"||J3e(i)&&o==="params"?l="param":Y3e(i)&&!MC(e)?(l="statement",t=t.slice(0,-1)):tFe(e)&&MC(e)?l="statement":l="other";let{placeholders:c,placeholderNames:u}=s?r.syntactic:r.legacy;c.push({name:n,type:l,resolve:d=>oFe(d,t),isDuplicate:u.has(n)}),u.add(n)}function oFe(e,t){let r=e;for(let s=0;s<t.length-1;s++){let{key:i,index:o}=t[s];o===void 0?r=r[i]:r=r[i][o]}let{key:a,index:n}=t[t.length-1];return{parent:r,key:a,index:n}}function lFe(e,t,r){let a=(t.plugins||[]).slice();r!==!1&&a.push("placeholders"),t=Object.assign({allowAwaitOutsideFunction:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowYieldOutsideFunction:!0,sourceType:"module"},t,{plugins:a});try{return(0,K3e.parse)(e,t)}catch(n){let s=n.loc;throw s&&(n.message+=`
|
|
`+(0,W3e.codeFrameColumns)(e,{start:s}),n.code="BABEL_TEMPLATE_PARSE_ERROR"),n}}});var o2=ne(i2=>{"use strict";Object.defineProperty(i2,"__esModule",{value:!0});i2.default=mFe;var cFe=fr(),{blockStatement:uFe,cloneNode:s2,emptyStatement:dFe,expressionStatement:n2,identifier:DC,isStatement:dz,isStringLiteral:fFe,stringLiteral:pFe,validate:fz}=cFe;function mFe(e,t){let r=s2(e.ast);return t&&(e.placeholders.forEach(a=>{if(!hasOwnProperty.call(t,a.name)){let n=a.name;throw new Error(`Error: No substitution given for "${n}". If this is not meant to be a
|
|
placeholder you may want to consider passing one of the following options to @babel/template:
|
|
- { placeholderPattern: false, placeholderWhitelist: new Set(['${n}'])}
|
|
- { placeholderPattern: /^${n}$/ }`)}}),Object.keys(t).forEach(a=>{if(!e.placeholderNames.has(a))throw new Error(`Unknown substitution "${a}" given`)})),e.placeholders.slice().reverse().forEach(a=>{try{var n;hFe(a,r,(n=t&&t[a.name])!=null?n:null)}catch(s){throw s.message=`@babel/template placeholder "${a.name}": ${s.message}`,s}}),r}function hFe(e,t,r){e.isDuplicate&&(Array.isArray(r)?r=r.map(o=>s2(o)):typeof r=="object"&&(r=s2(r)));let{parent:a,key:n,index:s}=e.resolve(t);if(e.type==="string"){if(typeof r=="string"&&(r=pFe(r)),!r||!fFe(r))throw new Error("Expected string substitution")}else if(e.type==="statement")s===void 0?r?Array.isArray(r)?r=uFe(r):typeof r=="string"?r=n2(DC(r)):dz(r)||(r=n2(r)):r=dFe():r&&!Array.isArray(r)&&(typeof r=="string"&&(r=DC(r)),dz(r)||(r=n2(r)));else if(e.type==="param"){if(typeof r=="string"&&(r=DC(r)),s===void 0)throw new Error("Assertion failure.")}else if(typeof r=="string"&&(r=DC(r)),Array.isArray(r))throw new Error("Cannot replace single expression with an array.");function i(o,l,c){let u=o[l];o[l]=c,(u.type==="Identifier"||u.type==="Placeholder")&&(u.typeAnnotation&&(c.typeAnnotation=u.typeAnnotation),u.optional&&(c.optional=u.optional),u.decorators&&(c.decorators=u.decorators))}if(s===void 0)fz(a,n,r),i(a,n,r);else{let o=a[n].slice();e.type==="statement"||e.type==="param"?r==null?o.splice(s,1):Array.isArray(r)?o.splice(s,1,...r):i(o,s,r):i(o,s,r),fz(a,n,o),a[n]=o}}});var pz=ne(l2=>{"use strict";Object.defineProperty(l2,"__esModule",{value:!0});l2.default=bFe;var gFe=kC(),yFe=a2(),xFe=o2();function bFe(e,t,r){t=e.code(t);let a;return n=>{let s=(0,gFe.normalizeReplacements)(n);return a||(a=(0,yFe.default)(e,t,r)),e.unwrap((0,xFe.default)(a,s))}}});var mz=ne(c2=>{"use strict";Object.defineProperty(c2,"__esModule",{value:!0});c2.default=wFe;var vFe=kC(),SFe=a2(),TFe=o2();function wFe(e,t,r){let{metadata:a,names:n}=CFe(e,t,r);return s=>{let i={};return s.forEach((o,l)=>{i[n[l]]=o}),o=>{let l=(0,vFe.normalizeReplacements)(o);return l&&Object.keys(l).forEach(c=>{if(hasOwnProperty.call(i,c))throw new Error("Unexpected replacement overlap.")}),e.unwrap((0,TFe.default)(a,l?Object.assign(l,i):i))}}}function CFe(e,t,r){let a="BABEL_TPL$",n=t.join("");do a="$$"+a;while(n.includes(a));let{names:s,code:i}=EFe(t,a);return{metadata:(0,SFe.default)(e,e.code(i),{parser:r.parser,placeholderWhitelist:new Set(s.concat(r.placeholderWhitelist?Array.from(r.placeholderWhitelist):[])),placeholderPattern:r.placeholderPattern,preserveComments:r.preserveComments,syntacticPlaceholders:r.syntacticPlaceholders}),names:s}}function EFe(e,t){let r=[],a=e[0];for(let n=1;n<e.length;n++){let s=`${t}${n-1}`;r.push(s),a+=s+e[n]}return{names:r,code:a}}});var vz=ne(u2=>{"use strict";Object.defineProperty(u2,"__esModule",{value:!0});u2.default=bz;var Ic=kC(),hz=pz(),gz=mz(),yz=(0,Ic.validate)({placeholderPattern:!1});function bz(e,t){let r=new WeakMap,a=new WeakMap,n=t||(0,Ic.validate)(null);return Object.assign((s,...i)=>{if(typeof s=="string"){if(i.length>1)throw new Error("Unexpected extra params.");return xz((0,hz.default)(e,s,(0,Ic.merge)(n,(0,Ic.validate)(i[0]))))}else if(Array.isArray(s)){let o=r.get(s);return o||(o=(0,gz.default)(e,s,n),r.set(s,o)),xz(o(i))}else if(typeof s=="object"&&s){if(i.length>0)throw new Error("Unexpected extra params.");return bz(e,(0,Ic.merge)(n,(0,Ic.validate)(s)))}throw new Error(`Unexpected template param ${typeof s}`)},{ast:(s,...i)=>{if(typeof s=="string"){if(i.length>1)throw new Error("Unexpected extra params.");return(0,hz.default)(e,s,(0,Ic.merge)((0,Ic.merge)(n,(0,Ic.validate)(i[0])),yz))()}else if(Array.isArray(s)){let o=a.get(s);return o||(o=(0,gz.default)(e,s,(0,Ic.merge)(n,yz)),a.set(s,o)),o(i)()}throw new Error(`Unexpected template param ${typeof s}`)}})}function xz(e){let t="";try{throw new Error}catch(r){r.stack&&(t=r.stack.split(`
|
|
`).slice(3).join(`
|
|
`))}return r=>{try{return e(r)}catch(a){throw a.stack+=`
|
|
=============
|
|
${t}`,a}}}});var Sz=ne(qi=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.statements=qi.statement=qi.smart=qi.program=qi.expression=qi.default=void 0;var V0=cz(),q0=vz(),d2=qi.smart=(0,q0.default)(V0.smart),PFe=qi.statement=(0,q0.default)(V0.statement),AFe=qi.statements=(0,q0.default)(V0.statements),IFe=qi.expression=(0,q0.default)(V0.expression),NFe=qi.program=(0,q0.default)(V0.program),Ict=qi.default=Object.assign(d2.bind(void 0),{smart:d2,statement:PFe,statements:AFe,expression:IFe,program:NFe,ast:d2.ast})});var Nz=ne(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.arrowFunctionToExpression=s5e;Au.ensureBlock=r5e;Au.ensureFunctionName=y5e;Au.splitExportDeclaration=h5e;Au.toComputedKey=t5e;Au.unwrapFunctionEnvironment=a5e;var LFe=fr(),RFe=Sz(),m2=L0(),kFe=Zo(),{arrowFunctionExpression:h2,assignmentExpression:ym,binaryExpression:f2,blockStatement:MFe,callExpression:qg,conditionalExpression:DFe,expressionStatement:Cz,identifier:ia,isIdentifier:_Fe,jsxIdentifier:OFe,logicalExpression:FFe,LOGICAL_OPERATORS:BFe,memberExpression:$l,metaProperty:UFe,numericLiteral:jFe,objectExpression:zFe,restElement:VFe,returnStatement:qFe,sequenceExpression:HFe,spreadElement:$Fe,stringLiteral:Ez,super:p2,thisExpression:H0,toExpression:Pz,unaryExpression:GFe,toBindingIdentifierName:KFe,isFunction:WFe,isAssignmentPattern:XFe,isRestElement:YFe,getFunctionName:JFe,cloneNode:xm,variableDeclaration:QFe,variableDeclarator:ZFe,exportNamedDeclaration:Tz,exportSpecifier:wz,inherits:e5e}=LFe;function t5e(){let e;if(this.isMemberExpression())e=this.node.property;else if(this.isProperty()||this.isMethod())e=this.node.key;else throw new ReferenceError("todo");return this.node.computed||_Fe(e)&&(e=Ez(e.name)),e}function r5e(){let e=this.get("body"),t=e.node;if(Array.isArray(e))throw new Error("Can't convert array path to a block statement");if(!t)throw new Error("Can't convert node without a body");if(e.isBlockStatement())return t;let r=[],a="body",n,s;e.isStatement()?(s="body",n=0,r.push(e.node)):(a+=".body.0",this.isFunction()?(n="argument",r.push(qFe(e.node))):(n="expression",r.push(Cz(e.node)))),this.node.body=MFe(r);let i=this.get(a);return kFe.setup.call(e,i,s?i.node[s]:i.node,s,n),this.node}Au.arrowFunctionToShadowed=function(){this.isArrowFunctionExpression()&&this.arrowFunctionToExpression()};function a5e(){if(!this.isArrowFunctionExpression()&&!this.isFunctionExpression()&&!this.isFunctionDeclaration())throw this.buildCodeFrameError("Can only unwrap the environment of a function.");Az(this)}function n5e(e,t){e.node.type=t}function s5e({allowInsertArrow:e=!0,allowInsertArrowWithRest:t=e,noNewArrows:r=!(a=>(a=arguments[0])==null?void 0:a.specCompliant)()}={}){if(!this.isArrowFunctionExpression())throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression.");let a=this;if(!r){var n;a=(n=a.ensureFunctionName(!1))!=null?n:a}let{thisBinding:s,fnPath:i}=Az(a,r,e,t);if(i.ensureBlock(),n5e(i,"FunctionExpression"),!r){let o=s?null:i.scope.generateUidIdentifier("arrowCheckId");return o&&i.parentPath.scope.push({id:o,init:zFe([])}),i.get("body").unshiftContainer("body",Cz(qg(this.hub.addHelper("newArrowCheck"),[H0(),ia(o?o.name:s)]))),i.replaceWith(qg($l(i.node,ia("bind")),[o?ia(o.name):H0()])),i.get("callee.object")}return i}var i5e=(0,m2.environmentVisitor)({CallExpression(e,{allSuperCalls:t}){e.get("callee").isSuper()&&t.push(e)}});function Az(e,t=!0,r=!0,a=!0){let n,s=e.findParent(p=>p.isArrowFunctionExpression()?(n??(n=p),!1):p.isFunction()||p.isProgram()||p.isClassProperty({static:!1})||p.isClassPrivateProperty({static:!1})),i=s.isClassMethod({kind:"constructor"});if(s.isClassProperty()||s.isClassPrivateProperty())if(n)s=n;else if(r)e.replaceWith(qg(h2([],Pz(e.node)),[])),s=e.get("callee"),e=s.get("body");else throw e.buildCodeFrameError("Unable to transform arrow inside class property");let{thisPaths:o,argumentsPaths:l,newTargetPaths:c,superProps:u,superCalls:d}=m5e(e);if(i&&d.length>0){if(!r)throw d[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', it's not possible to compile `super()` in an arrow function without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");if(!a)throw d[0].buildCodeFrameError("When using '@babel/plugin-transform-parameters', it's not possible to compile `super()` in an arrow function with default or rest parameters without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");let p=[];s.traverse(i5e,{allSuperCalls:p});let m=d5e(s);p.forEach(h=>{let x=ia(m);x.loc=h.node.callee.loc,h.get("callee").replaceWith(x)})}if(l.length>0){let p=$0(s,"arguments",()=>{let m=()=>ia("arguments");return s.scope.path.isProgram()?DFe(f2("===",GFe("typeof",m()),Ez("undefined")),s.scope.buildUndefinedNode(),m()):m()});l.forEach(m=>{let h=ia(p);h.loc=m.node.loc,m.replaceWith(h)})}if(c.length>0){let p=$0(s,"newtarget",()=>UFe(ia("new"),ia("target")));c.forEach(m=>{let h=ia(p);h.loc=m.node.loc,m.replaceWith(h)})}if(u.length>0){if(!r)throw u[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', it's not possible to compile `super.prop` in an arrow function without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");u.reduce((m,h)=>m.concat(l5e(h)),[]).forEach(m=>{let h=m.node.computed?"":m.get("property").node.name,x=m.parentPath,g=x.isAssignmentExpression({left:m.node}),y=x.isCallExpression({callee:m.node}),b=x.isTaggedTemplateExpression({tag:m.node}),S=f5e(s,g,h),w=[];if(m.node.computed&&w.push(m.get("property").node),g){let C=x.node.right;w.push(C)}let P=qg(ia(S),w);y?(x.unshiftContainer("arguments",H0()),m.replaceWith($l(P,ia("call"))),o.push(x.get("arguments.0"))):g?x.replaceWith(P):b?(m.replaceWith(qg($l(P,ia("bind"),!1),[H0()])),o.push(m.get("arguments.0"))):m.replaceWith(P)})}let f;return(o.length>0||!t)&&(f=u5e(s,i),(t||i&&Iz(s))&&(o.forEach(p=>{let m=p.isJSX()?OFe(f):ia(f);m.loc=p.node.loc,p.replaceWith(m)}),t||(f=null))),{thisBinding:f,fnPath:e}}function o5e(e){return BFe.includes(e)}function l5e(e){if(e.parentPath.isAssignmentExpression()&&e.parentPath.node.operator!=="="){let r=e.parentPath,a=r.node.operator.slice(0,-1),n=r.node.right,s=o5e(a);if(e.node.computed){let i=e.scope.generateDeclaredUidIdentifier("tmp"),{object:o,property:l}=e.node;r.get("left").replaceWith($l(o,ym("=",i,l),!0)),r.get("right").replaceWith(t(s?"=":a,$l(o,ia(i.name),!0),n))}else{let i=e.node.object,o=e.node.property;r.get("left").replaceWith($l(i,o)),r.get("right").replaceWith(t(s?"=":a,$l(i,ia(o.name)),n))}return s?r.replaceWith(FFe(a,r.node.left,r.node.right)):r.node.operator="=",[r.get("left"),r.get("right").get("left")]}else if(e.parentPath.isUpdateExpression()){let r=e.parentPath,a=e.scope.generateDeclaredUidIdentifier("tmp"),n=e.node.computed?e.scope.generateDeclaredUidIdentifier("prop"):null,s=[ym("=",a,$l(e.node.object,n?ym("=",n,e.node.property):e.node.property,e.node.computed)),ym("=",$l(e.node.object,n?ia(n.name):e.node.property,e.node.computed),f2(e.parentPath.node.operator[0],ia(a.name),jFe(1)))];e.parentPath.node.prefix||s.push(ia(a.name)),r.replaceWith(HFe(s));let i=r.get("expressions.0.right"),o=r.get("expressions.1.left");return[i,o]}return[e];function t(r,a,n){return r==="="?ym("=",a,n):f2(r,a,n)}}function Iz(e){return e.isClassMethod()&&!!e.parentPath.parentPath.node.superClass}var c5e=(0,m2.environmentVisitor)({CallExpression(e,{supers:t,thisBinding:r}){e.get("callee").isSuper()&&(t.has(e.node)||(t.add(e.node),e.replaceWithMultiple([e.node,ym("=",ia(r),ia("this"))])))}});function u5e(e,t){return $0(e,"this",r=>{if(!t||!Iz(e))return H0();e.traverse(c5e,{supers:new WeakSet,thisBinding:r})})}function d5e(e){return $0(e,"supercall",()=>{let t=e.scope.generateUidIdentifier("args");return h2([VFe(t)],qg(p2(),[$Fe(ia(t.name))]))})}function f5e(e,t,r){return $0(e,`superprop_${t?"set":"get"}:${r||""}`,()=>{let n=[],s;if(r)s=$l(p2(),ia(r));else{let i=e.scope.generateUidIdentifier("prop");n.unshift(i),s=$l(p2(),ia(i.name),!0)}if(t){let i=e.scope.generateUidIdentifier("value");n.push(i),s=ym("=",s,ia(i.name))}return h2(n,s)})}function $0(e,t,r){let a="binding:"+t,n=e.getData(a);if(!n){let s=e.scope.generateUidIdentifier(t);n=s.name,e.setData(a,n),e.scope.push({id:s,init:r(n)})}return n}var p5e=(0,m2.environmentVisitor)({ThisExpression(e,{thisPaths:t}){t.push(e)},JSXIdentifier(e,{thisPaths:t}){e.node.name==="this"&&(!e.parentPath.isJSXMemberExpression({object:e.node})&&!e.parentPath.isJSXOpeningElement({name:e.node})||t.push(e))},CallExpression(e,{superCalls:t}){e.get("callee").isSuper()&&t.push(e)},MemberExpression(e,{superProps:t}){e.get("object").isSuper()&&t.push(e)},Identifier(e,{argumentsPaths:t}){if(!e.isReferencedIdentifier({name:"arguments"}))return;let r=e.scope;do{if(r.hasOwnBinding("arguments")){r.rename("arguments");return}if(r.path.isFunction()&&!r.path.isArrowFunctionExpression())break}while(r=r.parent);t.push(e)},MetaProperty(e,{newTargetPaths:t}){e.get("meta").isIdentifier({name:"new"})&&e.get("property").isIdentifier({name:"target"})&&t.push(e)}});function m5e(e){let t=[],r=[],a=[],n=[],s=[];return e.traverse(p5e,{thisPaths:t,argumentsPaths:r,newTargetPaths:a,superProps:n,superCalls:s}),{thisPaths:t,argumentsPaths:r,newTargetPaths:a,superProps:n,superCalls:s}}function h5e(){if(!this.isExportDeclaration()||this.isExportAllDeclaration())throw new Error("Only default and named export declarations can be split.");if(this.isExportNamedDeclaration()&&this.get("specifiers").length>0)throw new Error("It doesn't make sense to split exported specifiers.");let e=this.get("declaration");if(this.isExportDefaultDeclaration()){let n=e.isFunctionDeclaration()||e.isClassDeclaration(),s=e.isFunctionExpression()||e.isClassExpression(),i=e.isScope()?e.scope.parent:e.scope,o=e.node.id,l=!1;o?s&&i.hasBinding(o.name)&&(l=!0,o=i.generateUidIdentifier(o.name)):(l=!0,o=i.generateUidIdentifier("default"),(n||s)&&(e.node.id=xm(o)));let c=n?e.node:QFe("var",[ZFe(xm(o),e.node)]),u=Tz(null,[wz(xm(o),ia("default"))]);return this.insertAfter(u),this.replaceWith(c),l&&i.registerDeclaration(this),this}else if(this.get("specifiers").length>0)throw new Error("It doesn't make sense to split exported specifiers.");let t=e.getOuterBindingIdentifiers(),r=Object.keys(t).map(n=>wz(ia(n),ia(n))),a=Tz(null,r);return this.insertAfter(a),this.replaceWith(e.node),this}var g5e={"ReferencedIdentifier|BindingIdentifier"(e,t){e.node.name===t.name&&(t.needsRename=!0,e.stop())},Scope(e,t){e.scope.hasOwnBinding(t.name)&&e.skip()}};function y5e(e){if(this.node.id)return this;let t=JFe(this.node,this.parent);if(t==null)return this;let{name:r}=t;if(!e&&/[\uD800-\uDFFF]/.test(r)||r.startsWith("get ")||r.startsWith("set "))return null;r=KFe(r.replace(/[/ ]/g,"_"));let a=ia(r);e5e(a,t.originalNode);let n={needsRename:!1,name:r},{scope:s}=this,i=s.getOwnBinding(r);if(i?i.kind==="param"&&(n.needsRename=!0):(s.parent.hasBinding(r)||s.hasGlobal(r))&&this.traverse(g5e,n),!n.needsRename)return this.node.id=a,s.getProgramParent().references[a.name]=!0,this;if(s.hasBinding(a.name)&&!s.hasGlobal(a.name))return s.rename(a.name),this.node.id=a,s.getProgramParent().references[a.name]=!0,this;if(!WFe(this.node))return null;let o=s.generateUidIdentifier(a.name),l=[];for(let u=0,d=x5e(this.node);u<d;u++)l.push(s.generateUidIdentifier("x"));let c=RFe.default.expression.ast`
|
|
(function (${o}) {
|
|
function ${a}(${l}) {
|
|
return ${xm(o)}.apply(this, arguments);
|
|
}
|
|
|
|
${xm(a)}.toString = function () {
|
|
return ${xm(o)}.toString();
|
|
}
|
|
|
|
return ${xm(a)};
|
|
})(${Pz(this.node)})
|
|
`;return this.replaceWith(c)[0].get("arguments.0")}function x5e(e){let t=e.params.findIndex(r=>XFe(r)||YFe(r));return t===-1?e.params.length:t}});var _z=ne(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln._guessExecutionStatusRelativeTo=U5e;ln._resolve=Dz;ln.canHaveVariableDeclarationOrExpression=R5e;ln.canSwapBetweenExpressionAndStatement=k5e;ln.getSource=O5e;ln.isCompletionRecord=M5e;ln.isConstantExpression=q5e;ln.isInStrictMode=H5e;ln.isNodeType=L5e;ln.isStatementOrBlock=D5e;ln.isStatic=N5e;ln.matchesPattern=I5e;ln.referencesImport=_5e;ln.resolve=V5e;ln.willIMaybeExecuteBefore=F5e;var b5e=fr(),{STATEMENT_OR_BLOCK_KEYS:v5e,VISITOR_KEYS:S5e,isBlockStatement:Mz,isExpression:T5e,isIdentifier:w5e,isLiteral:C5e,isStringLiteral:E5e,isType:P5e,matchesPattern:A5e}=b5e;function I5e(e,t){return A5e(this.node,e,t)}ln.has=function(t){var r;let a=(r=this.node)==null?void 0:r[t];return a&&Array.isArray(a)?!!a.length:!!a};function N5e(){return this.scope.isStatic(this.node)}ln.is=ln.has,ln.isnt=function(t){return!this.has(t)},ln.equals=function(t,r){return this.node[t]===r};function L5e(e){return P5e(this.type,e)}function R5e(){return(this.key==="init"||this.key==="left")&&this.parentPath.isFor()}function k5e(e){return this.key!=="body"||!this.parentPath.isArrowFunctionExpression()?!1:this.isExpression()?Mz(e):this.isBlockStatement()?T5e(e):!1}function M5e(e){let t=this,r=!0;do{let{type:a,container:n}=t;if(!r&&(t.isFunction()||a==="StaticBlock"))return!!e;if(r=!1,Array.isArray(n)&&t.key!==n.length-1)return!1}while((t=t.parentPath)&&!t.isProgram()&&!t.isDoExpression());return!0}function D5e(){return this.parentPath.isLabeledStatement()||Mz(this.container)?!1:v5e.includes(this.key)}function _5e(e,t){if(!this.isReferencedIdentifier()){if(this.isJSXMemberExpression()&&this.node.property.name===t||(this.isMemberExpression()||this.isOptionalMemberExpression())&&(this.node.computed?E5e(this.node.property,{value:t}):this.node.property.name===t)){let s=this.get("object");return s.isReferencedIdentifier()&&s.referencesImport(e,"*")}return!1}let r=this.scope.getBinding(this.node.name);if(!r||r.kind!=="module")return!1;let a=r.path,n=a.parentPath;if(!n.isImportDeclaration())return!1;if(n.node.source.value===e){if(!t)return!0}else return!1;return!!(a.isImportDefaultSpecifier()&&t==="default"||a.isImportNamespaceSpecifier()&&t==="*"||a.isImportSpecifier()&&w5e(a.node.imported,{name:t}))}function O5e(){let e=this.node;if(e.end){let t=this.hub.getCode();if(t)return t.slice(e.start,e.end)}return""}function F5e(e){return this._guessExecutionStatusRelativeTo(e)!=="after"}function Lz(e){return e.isProgram()?e:(e.parentPath.scope.getFunctionParent()||e.parentPath.scope.getProgramParent()).path}function B5e(e,t){switch(e){case"LogicalExpression":return t==="right";case"ConditionalExpression":case"IfStatement":return t==="consequent"||t==="alternate";case"WhileStatement":case"DoWhileStatement":case"ForInStatement":case"ForOfStatement":return t==="body";case"ForStatement":return t==="body"||t==="update";case"SwitchStatement":return t==="cases";case"TryStatement":return t==="handler";case"AssignmentPattern":return t==="right";case"OptionalMemberExpression":return t==="property";case"OptionalCallExpression":return t==="arguments";default:return!1}}function Rz(e,t){for(let r=0;r<t;r++){let a=e[r];if(B5e(a.parent.type,a.parentKey))return!0}return!1}var kz=Symbol();function U5e(e){return g2(this,e,new Map)}function g2(e,t,r){let a={this:Lz(e),target:Lz(t)};if(a.target.node!==a.this.node)return z5e(e,a.target,r);let n={target:t.getAncestry(),this:e.getAncestry()};if(n.target.includes(e))return"after";if(n.this.includes(t))return"before";let s,i={target:0,this:0};for(;!s&&i.this<n.this.length;){let u=n.this[i.this];i.target=n.target.indexOf(u),i.target>=0?s=u:i.this++}if(!s)throw new Error("Internal Babel error - The two compared nodes don't appear to belong to the same program.");if(Rz(n.this,i.this-1)||Rz(n.target,i.target-1))return"unknown";let o={this:n.this[i.this-1],target:n.target[i.target-1]};if(o.target.listKey&&o.this.listKey&&o.target.container===o.this.container)return o.target.key>o.this.key?"before":"after";let l=S5e[s.type],c={this:l.indexOf(o.this.parentKey),target:l.indexOf(o.target.parentKey)};return c.target>c.this?"before":"after"}function j5e(e,t,r){if(t.isFunctionDeclaration()){if(t.parentPath.isExportDeclaration())return"unknown"}else return g2(e,t,r)==="before"?"before":"unknown";let a=t.scope.getBinding(t.node.id.name);if(!a.references)return"before";let n=a.referencePaths,s;for(let i of n){if(!!i.find(c=>c.node===t.node))continue;if(i.key!=="callee"||!i.parentPath.isCallExpression())return"unknown";let l=g2(e,i,r);if(s&&s!==l)return"unknown";s=l}return s}function z5e(e,t,r){let a=r.get(e.node),n;if(!a)r.set(e.node,a=new Map);else if(n=a.get(t.node))return n===kz?"unknown":n;a.set(t.node,kz);let s=j5e(e,t,r);return a.set(t.node,s),s}function V5e(e,t){return Dz.call(this,e,t)||this}function Dz(e,t){var r;if(!((r=t)!=null&&r.includes(this)))if(t=t||[],t.push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(e,t)}else if(this.isReferencedIdentifier()){let a=this.scope.getBinding(this.node.name);if(!a||!a.constant||a.kind==="module")return;if(a.path!==this){let n=a.path.resolve(e,t);return this.find(s=>s.node===n.node)?void 0:n}}else{if(this.isTypeCastExpression())return this.get("expression").resolve(e,t);if(e&&this.isMemberExpression()){let a=this.toComputedKey();if(!C5e(a))return;let n=a.value,s=this.get("object").resolve(e,t);if(s.isObjectExpression()){let i=s.get("properties");for(let o of i){if(!o.isProperty())continue;let l=o.get("key"),c=o.isnt("computed")&&l.isIdentifier({name:n});if(c=c||l.isLiteral({value:n}),c)return o.get("value").resolve(e,t)}}else if(s.isArrayExpression()&&!isNaN(+n)){let o=s.get("elements")[n];if(o)return o.resolve(e,t)}}}}function q5e(){if(this.isIdentifier()){let e=this.scope.getBinding(this.node.name);return e?e.constant:!1}if(this.isLiteral())return this.isRegExpLiteral()?!1:this.isTemplateLiteral()?this.get("expressions").every(e=>e.isConstantExpression()):!0;if(this.isUnaryExpression())return this.node.operator!=="void"?!1:this.get("argument").isConstantExpression();if(this.isBinaryExpression()){let{operator:e}=this.node;return e!=="in"&&e!=="instanceof"&&this.get("left").isConstantExpression()&&this.get("right").isConstantExpression()}return this.isMemberExpression()?!this.node.computed&&this.get("object").isIdentifier({name:"Symbol"})&&!this.scope.hasBinding("Symbol",{noGlobals:!0}):this.isCallExpression()?this.node.arguments.length===1&&this.get("callee").matchesPattern("Symbol.for")&&!this.scope.hasBinding("Symbol",{noGlobals:!0})&&this.get("arguments")[0].isStringLiteral():!1}function H5e(){return!!(this.isProgram()?this:this.parentPath).find(r=>{if(r.isProgram({sourceType:"module"})||r.isClass())return!0;if(r.isArrowFunctionExpression()&&!r.get("body").isBlockStatement())return!1;let a;if(r.isFunction())a=r.node.body;else if(r.isProgram())a=r.node;else return!1;for(let n of a.directives)if(n.value.value==="use strict")return!0;return!1})}});var jz=ne(Ds=>{"use strict";Object.defineProperty(Ds,"__esModule",{value:!0});Ds._getKey=Bz;Ds._getPattern=Uz;Ds.get=oBe;Ds.getAllNextSiblings=sBe;Ds.getAllPrevSiblings=iBe;Ds.getAssignmentIdentifiers=lBe;Ds.getBindingIdentifierPaths=dBe;Ds.getBindingIdentifiers=cBe;Ds.getCompletionRecords=tBe;Ds.getNextSibling=nBe;Ds.getOpposite=Q5e;Ds.getOuterBindingIdentifierPaths=fBe;Ds.getOuterBindingIdentifiers=uBe;Ds.getPrevSibling=aBe;Ds.getSibling=rBe;var x2=Pu(),$5e=fr(),{getAssignmentIdentifiers:G5e,getBindingIdentifiers:Fz,getOuterBindingIdentifiers:K5e,numericLiteral:W5e,unaryExpression:X5e}=$5e,b2=0,G0=1;function Y5e(e){return{type:b2,path:e}}function J5e(e){return{type:G0,path:e}}function Q5e(){return this.key==="left"?this.getSibling("right"):this.key==="right"?this.getSibling("left"):null}function Hg(e,t,r){return e&&t.push(...$g(e,r)),t}function Z5e(e,t,r){let a=[];for(let n=0;n<e.length;n++){let s=e[n],i=$g(s,r),o=[],l=[];for(let c of i)c.type===b2&&o.push(c),c.type===G0&&l.push(c);o.length&&(a=o),t.push(...l)}return t.push(...a),t}function eBe(e){e.forEach(t=>{t.type=G0})}function y2(e,t){e.forEach(r=>{r.path.isBreakStatement({label:null})&&(t?r.path.replaceWith(X5e("void",W5e(0))):r.path.remove())})}function Oz(e,t){let r=[];if(t.canHaveBreak){let a=[];for(let n=0;n<e.length;n++){let s=e[n],i=Object.assign({},t,{inCaseClause:!1});s.isBlockStatement()&&(t.inCaseClause||t.shouldPopulateBreak)?i.shouldPopulateBreak=!0:i.shouldPopulateBreak=!1;let o=$g(s,i);if(o.length>0&&o.every(l=>l.type===G0)){a.length>0&&o.every(l=>l.path.isBreakStatement({label:null}))?(eBe(a),r.push(...a),a.some(l=>l.path.isDeclaration())&&(r.push(...o),t.shouldPreserveBreak||y2(o,!0)),t.shouldPreserveBreak||y2(o,!1)):(r.push(...o),!t.shouldPopulateBreak&&!t.shouldPreserveBreak&&y2(o,!0));break}if(n===e.length-1)r.push(...o);else{a=[];for(let l=0;l<o.length;l++){let c=o[l];c.type===G0&&r.push(c),c.type===b2&&a.push(c)}}}}else if(e.length)for(let a=e.length-1;a>=0;a--){let n=$g(e[a],t);if(n.length>1||n.length===1&&!n[0].path.isVariableDeclaration()&&!n[0].path.isEmptyStatement()){r.push(...n);break}}return r}function $g(e,t){let r=[];if(e.isIfStatement())r=Hg(e.get("consequent"),r,t),r=Hg(e.get("alternate"),r,t);else{if(e.isDoExpression()||e.isFor()||e.isWhile()||e.isLabeledStatement())return Hg(e.get("body"),r,t);if(e.isProgram()||e.isBlockStatement())return Oz(e.get("body"),t);if(e.isFunction())return $g(e.get("body"),t);if(e.isTryStatement())r=Hg(e.get("block"),r,t),r=Hg(e.get("handler"),r,t);else{if(e.isCatchClause())return Hg(e.get("body"),r,t);if(e.isSwitchStatement())return Z5e(e.get("cases"),r,t);if(e.isSwitchCase())return Oz(e.get("consequent"),{canHaveBreak:!0,shouldPopulateBreak:!1,inCaseClause:!0,shouldPreserveBreak:t.shouldPreserveBreak});e.isBreakStatement()?r.push(J5e(e)):r.push(Y5e(e))}}return r}function tBe(e=!1){return $g(this,{canHaveBreak:!1,shouldPopulateBreak:!1,inCaseClause:!1,shouldPreserveBreak:e}).map(r=>r.path)}function rBe(e){return x2.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:e}).setContext(this.context)}function aBe(){return this.getSibling(this.key-1)}function nBe(){return this.getSibling(this.key+1)}function sBe(){let e=this.key,t=this.getSibling(++e),r=[];for(;t.node;)r.push(t),t=this.getSibling(++e);return r}function iBe(){let e=this.key,t=this.getSibling(--e),r=[];for(;t.node;)r.push(t),t=this.getSibling(--e);return r}function oBe(e,t=!0){t===!0&&(t=this.context);let r=e.split(".");return r.length===1?Bz.call(this,e,t):Uz.call(this,r,t)}function Bz(e,t){let r=this.node,a=r[e];return Array.isArray(a)?a.map((n,s)=>x2.default.get({listKey:e,parentPath:this,parent:r,container:a,key:s}).setContext(t)):x2.default.get({parentPath:this,parent:r,container:r,key:e}).setContext(t)}function Uz(e,t){let r=this;for(let a of e)a==="."?r=r.parentPath:Array.isArray(r)?r=r[a]:r=r.get(a,t);return r}function lBe(){return G5e(this.node)}function cBe(e){return Fz(this.node,e)}function uBe(e){return K5e(this.node,e)}function dBe(e=!1,t=!1){let a=[this],n=Object.create(null);for(;a.length;){let s=a.shift();if(!s||!s.node)continue;let i=Fz.keys[s.node.type];if(s.isIdentifier()){e?(n[s.node.name]=n[s.node.name]||[]).push(s):n[s.node.name]=s;continue}if(s.isExportDeclaration()){let o=s.get("declaration");o.isDeclaration()&&a.push(o);continue}if(t){if(s.isFunctionDeclaration()){a.push(s.get("id"));continue}if(s.isFunctionExpression())continue}if(i)for(let o=0;o<i.length;o++){let l=i[o],c=s.get(l);Array.isArray(c)?a.push(...c):c.node&&a.push(c)}}return n}function fBe(e=!1){return this.getBindingIdentifierPaths(e,!0)}});var Vz=ne(K0=>{"use strict";Object.defineProperty(K0,"__esModule",{value:!0});K0.addComment=yBe;K0.addComments=xBe;K0.shareCommentsWithSiblings=gBe;var pBe=fr(),{addComment:mBe,addComments:hBe}=pBe;function gBe(){if(typeof this.key=="string")return;let e=this.node;if(!e)return;let t=e.trailingComments,r=e.leadingComments;if(!t&&!r)return;let a=this.getSibling(this.key-1),n=this.getSibling(this.key+1),s=Boolean(a.node),i=Boolean(n.node);s&&(r&&a.addComments("trailing",zz(r,a.node.trailingComments)),t&&!i&&a.addComments("trailing",t)),i&&(t&&n.addComments("leading",zz(t,n.node.leadingComments)),r&&!s&&n.addComments("leading",r))}function zz(e,t){if(!(t!=null&&t.length))return e;let r=new Set(t);return e.filter(a=>!r.has(a))}function yBe(e,t,r){mBe(this.node,e,t,r)}function xBe(e,t){hBe(this.node,e,t)}});var Pu=ne(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});Rc.default=Rc.SHOULD_STOP=Rc.SHOULD_SKIP=Rc.REMOVED=void 0;var bBe=_N(),vBe=m4(),SBe=Fg(),TBe=JR(),$z=fr(),_C=$z,wBe=um(),CBe=Rk(),Nc=nj(),Gg=Cj(),Kg=qk(),qz=lz(),bm=Nz(),Tn=_z(),Gz=Zo(),cn=Gz,Wg=PC(),Lc=AC(),gi=jz(),v2=Vz(),EBe=qR(),{validate:PBe}=$z,Hz=vBe("babel"),Dct=Rc.REMOVED=1<<0,_ct=Rc.SHOULD_STOP=1<<1,Oct=Rc.SHOULD_SKIP=1<<2,Iu=Rc.default=class Kz{constructor(t,r){this.contexts=[],this.state=null,this._traverseFlags=0,this.skipKeys=null,this.parentPath=null,this.container=null,this.listKey=null,this.key=null,this.node=null,this.type=null,this._store=null,this.parent=r,this.hub=t,this.data=null,this.context=null,this.scope=null}get removed(){return(this._traverseFlags&1)>0}set removed(t){t?this._traverseFlags|=1:this._traverseFlags&=-2}get shouldStop(){return(this._traverseFlags&2)>0}set shouldStop(t){t?this._traverseFlags|=2:this._traverseFlags&=-3}get shouldSkip(){return(this._traverseFlags&4)>0}set shouldSkip(t){t?this._traverseFlags|=4:this._traverseFlags&=-5}static get({hub:t,parentPath:r,parent:a,container:n,listKey:s,key:i}){if(!t&&r&&(t=r.hub),!a)throw new Error("To get a node path the parent needs to exist");let o=n[i],l=wBe.getOrCreateCachedPaths(a,r),c=l.get(o);return c||(c=new Kz(t,a),o&&l.set(o,c)),Gz.setup.call(c,r,n,s,i),c}getScope(t){return this.isScope()?new TBe.default(this):t}setData(t,r){return this.data==null&&(this.data=Object.create(null)),this.data[t]=r}getData(t,r){this.data==null&&(this.data=Object.create(null));let a=this.data[t];return a===void 0&&r!==void 0&&(a=this.data[t]=r),a}hasNode(){return this.node!=null}buildCodeFrameError(t,r=SyntaxError){return this.hub.buildError(this.node,t,r)}traverse(t,r){(0,SBe.default)(this.node,t,this.scope,r,this)}set(t,r){PBe(this.node,t,r),this.node[t]=r}getPathLocation(){let t=[],r=this;do{let a=r.key;r.inList&&(a=`${r.listKey}[${a}]`),t.unshift(a)}while(r=r.parentPath);return t.join(".")}debug(t){Hz.enabled&&Hz(`${this.getPathLocation()} ${this.type}: ${t}`)}toString(){return(0,CBe.default)(this.node).code}get inList(){return!!this.listKey}set inList(t){t||(this.listKey=null)}get parentKey(){return this.listKey||this.key}},ABe={findParent:Nc.findParent,find:Nc.find,getFunctionParent:Nc.getFunctionParent,getStatementParent:Nc.getStatementParent,getEarliestCommonAncestorFrom:Nc.getEarliestCommonAncestorFrom,getDeepestCommonAncestorFrom:Nc.getDeepestCommonAncestorFrom,getAncestry:Nc.getAncestry,isAncestor:Nc.isAncestor,isDescendant:Nc.isDescendant,inType:Nc.inType,getTypeAnnotation:Gg.getTypeAnnotation,isBaseType:Gg.isBaseType,couldBeBaseType:Gg.couldBeBaseType,baseTypeStrictlyMatches:Gg.baseTypeStrictlyMatches,isGenericType:Gg.isGenericType,replaceWithMultiple:Kg.replaceWithMultiple,replaceWithSourceString:Kg.replaceWithSourceString,replaceWith:Kg.replaceWith,replaceExpressionWithStatements:Kg.replaceExpressionWithStatements,replaceInline:Kg.replaceInline,evaluateTruthy:qz.evaluateTruthy,evaluate:qz.evaluate,toComputedKey:bm.toComputedKey,ensureBlock:bm.ensureBlock,unwrapFunctionEnvironment:bm.unwrapFunctionEnvironment,arrowFunctionToExpression:bm.arrowFunctionToExpression,splitExportDeclaration:bm.splitExportDeclaration,ensureFunctionName:bm.ensureFunctionName,matchesPattern:Tn.matchesPattern,isStatic:Tn.isStatic,isNodeType:Tn.isNodeType,canHaveVariableDeclarationOrExpression:Tn.canHaveVariableDeclarationOrExpression,canSwapBetweenExpressionAndStatement:Tn.canSwapBetweenExpressionAndStatement,isCompletionRecord:Tn.isCompletionRecord,isStatementOrBlock:Tn.isStatementOrBlock,referencesImport:Tn.referencesImport,getSource:Tn.getSource,willIMaybeExecuteBefore:Tn.willIMaybeExecuteBefore,_guessExecutionStatusRelativeTo:Tn._guessExecutionStatusRelativeTo,resolve:Tn.resolve,isConstantExpression:Tn.isConstantExpression,isInStrictMode:Tn.isInStrictMode,isDenylisted:cn.isDenylisted,visit:cn.visit,skip:cn.skip,skipKey:cn.skipKey,stop:cn.stop,setContext:cn.setContext,requeue:cn.requeue,requeueComputedKeyAndDecorators:cn.requeueComputedKeyAndDecorators,remove:Wg.remove,insertBefore:Lc.insertBefore,insertAfter:Lc.insertAfter,unshiftContainer:Lc.unshiftContainer,pushContainer:Lc.pushContainer,getOpposite:gi.getOpposite,getCompletionRecords:gi.getCompletionRecords,getSibling:gi.getSibling,getPrevSibling:gi.getPrevSibling,getNextSibling:gi.getNextSibling,getAllNextSiblings:gi.getAllNextSiblings,getAllPrevSiblings:gi.getAllPrevSiblings,get:gi.get,getAssignmentIdentifiers:gi.getAssignmentIdentifiers,getBindingIdentifiers:gi.getBindingIdentifiers,getOuterBindingIdentifiers:gi.getOuterBindingIdentifiers,getBindingIdentifierPaths:gi.getBindingIdentifierPaths,getOuterBindingIdentifierPaths:gi.getOuterBindingIdentifierPaths,shareCommentsWithSiblings:v2.shareCommentsWithSiblings,addComment:v2.addComment,addComments:v2.addComments};Object.assign(Iu.prototype,ABe);Iu.prototype.arrowFunctionToShadowed=bm[String("arrowFunctionToShadowed")],Object.assign(Iu.prototype,{has:Tn[String("has")],is:Tn[String("is")],isnt:Tn[String("isnt")],equals:Tn[String("equals")],hoist:Lc[String("hoist")],updateSiblingKeys:Lc.updateSiblingKeys,call:cn.call,isBlacklisted:cn[String("isBlacklisted")],setScope:cn.setScope,resync:cn.resync,popContext:cn.popContext,pushContext:cn.pushContext,setup:cn.setup,setKey:cn.setKey});Iu.prototype._guessExecutionStatusRelativeToDifferentFunctions=Tn._guessExecutionStatusRelativeTo,Iu.prototype._guessExecutionStatusRelativeToDifferentFunctions=Tn._guessExecutionStatusRelativeTo,Object.assign(Iu.prototype,{_getTypeAnnotation:Gg._getTypeAnnotation,_replaceWith:Kg._replaceWith,_resolve:Tn._resolve,_call:cn._call,_resyncParent:cn._resyncParent,_resyncKey:cn._resyncKey,_resyncList:cn._resyncList,_resyncRemoved:cn._resyncRemoved,_getQueueContexts:cn._getQueueContexts,_removeFromScope:Wg._removeFromScope,_callRemovalHooks:Wg._callRemovalHooks,_remove:Wg._remove,_markRemoved:Wg._markRemoved,_assertUnremoved:Wg._assertUnremoved,_containerInsert:Lc._containerInsert,_containerInsertBefore:Lc._containerInsertBefore,_containerInsertAfter:Lc._containerInsertAfter,_verifyNodeList:Lc._verifyNodeList,_getKey:gi._getKey,_getPattern:gi._getPattern});for(let e of _C.TYPES){let t=`is${e}`,r=_C[t];Iu.prototype[t]=function(a){return r(this.node,a)},Iu.prototype[`assert${e}`]=function(a){if(!r(this.node,a))throw new TypeError(`Expected node path of type ${e}`)}}Object.assign(Iu.prototype,EBe);for(let e of Object.keys(bBe))e[0]!=="_"&&(_C.TYPES.includes(e)||_C.TYPES.push(e))});var Wz=ne(OC=>{"use strict";Object.defineProperty(OC,"__esModule",{value:!0});OC.default=void 0;var IBe=Pu(),NBe=fr(),S2=Zo(),{VISITOR_KEYS:LBe}=NBe,T2=class{constructor(t,r,a,n){this.queue=null,this.priorityQueue=null,this.parentPath=n,this.scope=t,this.state=a,this.opts=r}shouldVisit(t){let r=this.opts;if(r.enter||r.exit||r[t.type])return!0;let a=LBe[t.type];if(!(a!=null&&a.length))return!1;for(let n of a)if(t[n])return!0;return!1}create(t,r,a,n){return IBe.default.get({parentPath:this.parentPath,parent:t,container:r,key:a,listKey:n})}maybeQueue(t,r){this.queue&&(r?this.queue.push(t):this.priorityQueue.push(t))}visitMultiple(t,r,a){if(t.length===0)return!1;let n=[];for(let s=0;s<t.length;s++){let i=t[s];i&&this.shouldVisit(i)&&n.push(this.create(r,t,s,a))}return this.visitQueue(n)}visitSingle(t,r){return this.shouldVisit(t[r])?this.visitQueue([this.create(t,t,r)]):!1}visitQueue(t){this.queue=t,this.priorityQueue=[];let r=new WeakSet,a=!1,n=0;for(;n<t.length;){let s=t[n];if(n++,S2.resync.call(s),(s.contexts.length===0||s.contexts[s.contexts.length-1]!==this)&&S2.pushContext.call(s,this),s.key===null)continue;let{node:i}=s;if(!r.has(i)){if(i&&r.add(i),s.visit()){a=!0;break}if(this.priorityQueue.length&&(a=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=t,a))break}}for(let s=0;s<n;s++)S2.popContext.call(t[s]);return this.queue=null,a}visit(t,r){let a=t[r];return a?Array.isArray(a)?this.visitMultiple(a,t,r):this.visitSingle(t,r):!1}};OC.default=T2});var tC=ne(w2=>{"use strict";Object.defineProperty(w2,"__esModule",{value:!0});w2.traverseNode=DBe;var RBe=Wz(),Uct=Pu(),kBe=fr(),jct=Zo(),{VISITOR_KEYS:MBe}=kBe;function DBe(e,t,r,a,n,s,i){let o=MBe[e.type];if(!o)return!1;let l=new RBe.default(r,t,a,n);if(i)return s!=null&&s[n.parentKey]?!1:l.visitQueue([n]);for(let c of o)if(!(s!=null&&s[c])&&l.visit(e,c))return!0;return!1}});var Zo=ne(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});za._call=E2;za._getQueueContexts=YBe;za._resyncKey=eV;za._resyncList=tV;za._resyncParent=Zz;za._resyncRemoved=HBe;za.call=C2;za.isDenylisted=Jz;za.popContext=$Be;za.pushContext=GBe;za.requeue=WBe;za.requeueComputedKeyAndDecorators=XBe;za.resync=qBe;za.setContext=VBe;za.setKey=FC;za.setScope=Qz;za.setup=KBe;za.skip=UBe;za.skipKey=jBe;za.stop=zBe;za.visit=BBe;var _Be=tC(),Xz=Pu(),OBe=PC(),FBe=fr();function C2(e){let t=this.opts;if(this.debug(e),this.node&&E2.call(this,t[e]))return!0;if(this.node){var r;return E2.call(this,(r=t[this.node.type])==null?void 0:r[e])}return!1}function E2(e){if(!e)return!1;for(let t of e){if(!t)continue;let r=this.node;if(!r)return!0;let a=t.call(this.state,this,this.state);if(a&&typeof a=="object"&&typeof a.then=="function")throw new Error("You appear to be using a plugin with an async traversal visitor, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.");if(a)throw new Error(`Unexpected return value from visitor method ${t}`);if(this.node!==r||this._traverseFlags>0)return!0}return!1}function Jz(){var e;let t=(e=this.opts.denylist)!=null?e:this.opts.blacklist;return t?.includes(this.node.type)}za.isBlacklisted=Jz;function Yz(e,t){e.context!==t&&(e.context=t,e.state=t.state,e.opts=t.opts)}function BBe(){var e,t;if(!this.node||this.isDenylisted()||(e=(t=this.opts).shouldSkip)!=null&&e.call(t,this))return!1;let r=this.context;return this.shouldSkip||C2.call(this,"enter")?(this.debug("Skip..."),this.shouldStop):(Yz(this,r),this.debug("Recursing into..."),this.shouldStop=(0,_Be.traverseNode)(this.node,this.opts,this.scope,this.state,this,this.skipKeys),Yz(this,r),C2.call(this,"exit"),this.shouldStop)}function UBe(){this.shouldSkip=!0}function jBe(e){this.skipKeys==null&&(this.skipKeys={}),this.skipKeys[e]=!0}function zBe(){this._traverseFlags|=Xz.SHOULD_SKIP|Xz.SHOULD_STOP}function Qz(){var e,t;if((e=this.opts)!=null&&e.noScope)return;let r=this.parentPath;((this.key==="key"||this.listKey==="decorators")&&r.isMethod()||this.key==="discriminant"&&r.isSwitchStatement())&&(r=r.parentPath);let a;for(;r&&!a;){var n;if((n=r.opts)!=null&&n.noScope)return;a=r.scope,r=r.parentPath}this.scope=this.getScope(a),(t=this.scope)==null||t.init()}function VBe(e){return this.skipKeys!=null&&(this.skipKeys={}),this._traverseFlags=0,e&&(this.context=e,this.state=e.state,this.opts=e.opts),Qz.call(this),this}function qBe(){this.removed||(Zz.call(this),tV.call(this),eV.call(this))}function Zz(){this.parentPath&&(this.parent=this.parentPath.node)}function eV(){if(this.container&&this.node!==this.container[this.key]){if(Array.isArray(this.container)){for(let e=0;e<this.container.length;e++)if(this.container[e]===this.node){FC.call(this,e);return}}else for(let e of Object.keys(this.container))if(this.container[e]===this.node){FC.call(this,e);return}this.key=null}}function tV(){if(!this.parent||!this.inList)return;let e=this.parent[this.listKey];this.container!==e&&(this.container=e||null)}function HBe(){(this.key==null||!this.container||this.container[this.key]!==this.node)&&OBe._markRemoved.call(this)}function $Be(){this.contexts.pop(),this.contexts.length>0?this.setContext(this.contexts[this.contexts.length-1]):this.setContext(void 0)}function GBe(e){this.contexts.push(e),this.setContext(e)}function KBe(e,t,r,a){this.listKey=r,this.container=t,this.parentPath=e||this.parentPath,FC.call(this,a)}function FC(e){var t;this.key=e,this.node=this.container[this.key],this.type=(t=this.node)==null?void 0:t.type}function WBe(e=this){if(e.removed)return;let t=this.contexts;for(let r of t)r.maybeQueue(e)}function XBe(){let{context:e,node:t}=this;if(!FBe.isPrivate(t)&&t.computed&&e.maybeQueue(this.get("key")),t.decorators)for(let r of this.get("decorators"))e.maybeQueue(r)}function YBe(){let e=this,t=this.contexts;for(;!t.length&&(e=e.parentPath,!!e);)t=e.contexts;return t}});var rV=ne(BC=>{"use strict";Object.defineProperty(BC,"__esModule",{value:!0});BC.default=void 0;var P2=class{getCode(){}getScope(){}addHelper(){throw new Error("Helpers are not supported by the default hub.")}buildError(t,r,a=TypeError){return new a(r)}};BC.default=P2});var Fg=ne(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});Object.defineProperty(Nu,"Hub",{enumerable:!0,get:function(){return t4e.default}});Object.defineProperty(Nu,"NodePath",{enumerable:!0,get:function(){return ZBe.default}});Object.defineProperty(Nu,"Scope",{enumerable:!0,get:function(){return e4e.default}});Nu.visitors=Nu.default=void 0;Zo();var X0=L0();Nu.visitors=X0;var JBe=fr(),QBe=um(),aV=tC(),ZBe=Pu(),e4e=JR(),t4e=rV(),{VISITOR_KEYS:r4e,removeProperties:a4e,traverseFast:W0}=JBe;function Gl(e,t={},r,a,n,s){if(e){if(!t.noScope&&!r&&e.type!=="Program"&&e.type!=="File")throw new Error(`You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a ${e.type} node without passing scope and parentPath.`);if(!n&&s)throw new Error("visitSelf can only be used when providing a NodePath.");r4e[e.type]&&(X0.explode(t),(0,aV.traverseNode)(e,t,r,a,n,void 0,s))}}var Hct=Nu.default=Gl;Gl.visitors=X0;Gl.verify=X0.verify;Gl.explode=X0.explode;Gl.cheap=function(e,t){W0(e,t)};Gl.node=function(e,t,r,a,n,s){(0,aV.traverseNode)(e,t,r,a,n,s)};Gl.clearNode=function(e,t){a4e(e,t)};Gl.removeProperties=function(e,t){return W0(e,Gl.clearNode,t),e};Gl.hasType=function(e,t,r){return r!=null&&r.includes(e.type)?!1:e.type===t?!0:W0(e,function(a){if(r!=null&&r.includes(a.type))return W0.skip;if(a.type===t)return W0.stop})};Gl.cache=QBe});var nV,Xg,A2,I2,zr,yi,N2=de(()=>{nV=N(require("fs")),Xg=N(Pw()),A2=N(Fg()),I2=N(Rk()),zr=N(fr());uw();yi=class{constructor(t){this.settings=t,this.initPatterns()}initPatterns(){this.config={assignments:this.settings?.astAssignments||$d.assignments,functions:this.settings?.astFunctions||$d.functions,keys:this.settings?.astKeys||$d.keys},this.contentRules={REJECT_PATTERNS:(this.settings?.astRejectRe||[]).length>0?this.settings.astRejectRe.map(t=>new RegExp(t)):ZI.REJECT_PATTERNS,VALID_PATTERNS:(this.settings?.astValidRe||[]).length>0?this.settings.astValidRe.map(t=>new RegExp(t)):ZI.VALID_PATTERNS}}loadFile(t,r=!1){try{return this.parseAst(nV.default.readFileSync(t,"utf8"),r)}catch{return null}}loadCode(t,r=!1){return this.parseAst(t,r)}extract(t){let r=[];return this.traverseWhitelist(t,(a,n,s)=>{let i=this.extractSource(s);i&&this.isValidText(i)&&r.push({type:a,name:n,source:i,target:i})}),this.deduplicateResults(r)}translate(t,r){let a=new Map,n=new Map;return r.forEach(s=>{s.type&&s.name&&a.set(this.getFingerprint(s),s.target),n.set(s.source,s.target)}),this.traverseAllStrings(t,(s,i,o)=>{let l=this.extractSource(o);if(!l)return;let c=a.get(this.getFingerprint({type:s,name:i,source:l}));c||(c=n.get(l)),c&&c!==l&&this.replaceSource(o,c)}),(0,I2.generate)(t,{minified:!0,comments:!1,jsescOption:{minimal:!0}}).code}traceUsage(t,r){let a=new Set,n=new Map,s=new Map;return r.forEach(i=>{i.type&&i.name&&n.set(this.getFingerprint(i),i.target),s.set(i.source,i.target)}),this.traverseAllStrings(t,(i,o,l)=>{let c=this.extractSource(l);if(!c)return;let u=this.getFingerprint({type:i,name:o,source:c});n.has(u)?a.add(u):s.has(c)&&a.add(c)}),a}validateSecurity(t){let r=[];if(!t)return r;let a=[{regex:/\beval\s*\(/i,name:"eval()"},{regex:/\bFunction\s*\(/i,name:"new Function()"},{regex:/\bsetTimeout\s*\(\s*['"`]/i,name:"setTimeout(string)"},{regex:/\bsetInterval\s*\(\s*['"`]/i,name:"setInterval(string)"},{regex:/<script/i,name:"<script>"},{regex:/\bjavascript:/i,name:"javascript:"}];for(let s of a)s.regex.test(t)&&r.push({severity:"critical",message:`\u53D1\u73B0\u5371\u9669\u7684\u6267\u884C\u6307\u4EE4: ${s.name}`});let n=[{regex:/\bfetch\s*\(/i,name:"fetch()"},{regex:/\bXMLHttpRequest\b/i,name:"XMLHttpRequest"},{regex:/\bWebSocket\b/i,name:"WebSocket"},{regex:/\brequire\s*\(/i,name:"require()"},{regex:/\bprocess\./i,name:"Node.js process"},{regex:/\belectron\./i,name:"Electron API"},{regex:/\blocalStorage\b/i,name:"localStorage"},{regex:/\bdocument\.cookie\b/i,name:"document.cookie"}];for(let s of n)s.regex.test(t)&&r.push({severity:"warning",message:`\u53D1\u73B0\u53EF\u7591\u7684\u4EE3\u7801\u6A21\u5F0F: ${s.name}`});if(t.includes("${"))try{let s=t.replace(/`/g,"\\`"),i=(0,Xg.parseExpression)("`"+s+"`");if(zr.isTemplateLiteral(i))for(let o of i.expressions)!zr.isIdentifier(o)&&!zr.isMemberExpression(o)&&r.push({severity:"warning",message:`\u6A21\u677F\u5B57\u7B26\u4E32\u5305\u542B\u590D\u6742\u7684\u6267\u884C\u903B\u8F91: ${(0,I2.generate)(o).code}`})}catch{}return r}validateTargetSyntax(t){try{if(!t.includes("${")&&!t.includes("`"))return!0;let r=t.replace(/`/g,"\\`");return(0,Xg.parseExpression)("`"+r+"`",{plugins:["typescript","jsx","classProperties","objectRestSpread","optionalChaining","nullishCoalescingOperator","decorators-legacy"]}),!0}catch{return!1}}cloneAst(t){return zr.cloneNode(t,!0)}isValidText(t){return t.length<2||this.contentRules.REJECT_PATTERNS.some(r=>r.test(t))?!1:!!(this.contentRules.VALID_PATTERNS.some(r=>r.test(t))||/^[A-Za-z]{2,}$/.test(t))}traverseWhitelist(t,r){(0,A2.default)(t,{VariableDeclarator:a=>{let n=a.node,s=zr.isIdentifier(n.id)?n.id.name:null;s&&this.config.assignments.includes(s)&&this.isStrNode(n.init)&&r("VariableDeclarator",s,n.init)},AssignmentExpression:a=>{let n=a.node,s=this.getAssignName(n.left);s&&this.config.assignments.includes(s)&&this.isStrNode(n.right)&&r("AssignmentExpression",s,n.right)},ObjectProperty:a=>{let n=a.node,s=this.getObjKeyName(n.key);s&&this.config.keys.includes(s)&&this.isStrNode(n.value)&&r("ObjectProperty",s,n.value)},CallExpression:a=>{let n=a.node,s=this.getCallName(n.callee);s&&this.config.functions.includes(s)&&n.arguments.forEach(i=>{this.isStrNode(i)?r("CallExpression",s,i):zr.isObjectExpression(i)&&i.properties.forEach(o=>{if(zr.isObjectProperty(o)){let l=this.getObjKeyName(o.key)||"prop";this.isStrNode(o.value)&&r("ObjectProperty",l,o.value)}})})},NewExpression:a=>{let n=a.node,s=this.getCallName(n.callee);s&&this.config.functions.includes(s)&&n.arguments.forEach(i=>{this.isStrNode(i)?r("NewExpression",s,i):zr.isObjectExpression(i)&&i.properties.forEach(o=>{if(zr.isObjectProperty(o)){let l=this.getObjKeyName(o.key)||"prop";this.isStrNode(o.value)&&r("ObjectProperty",l,o.value)}})})}})}traverseAllStrings(t,r){(0,A2.default)(t,{VariableDeclarator:a=>{let n=a.node,s=zr.isIdentifier(n.id)?n.id.name:"var";this.isStrNode(n.init)&&r("VariableDeclarator",s,n.init)},AssignmentExpression:a=>{let n=a.node,s=this.getAssignName(n.left)||"assign";this.isStrNode(n.right)&&r("AssignmentExpression",s,n.right)},ObjectProperty:a=>{let n=a.node,s=this.getObjKeyName(n.key)||"prop";this.isStrNode(n.value)&&r("ObjectProperty",s,n.value)},CallExpression:a=>{let n=a.node,s=this.getCallName(n.callee)||"func";n.arguments.forEach(i=>{this.isStrNode(i)&&r("CallExpression",s,i)})},NewExpression:a=>{let n=a.node,s=this.getCallName(n.callee)||"new";n.arguments.forEach(i=>{this.isStrNode(i)&&r("NewExpression",s,i)})}})}parseAst(t,r){try{return(0,Xg.parse)(t,{sourceType:r?"module":"script",attachComment:!1,plugins:["typescript","jsx","classProperties","objectRestSpread","optionalChaining","nullishCoalescingOperator","decorators-legacy"],errorRecovery:!0})}catch{return null}}isStrNode(t){return zr.isStringLiteral(t)||zr.isTemplateLiteral(t)}extractSource(t){return zr.isStringLiteral(t)?t.value:zr.isTemplateLiteral(t)&&t.quasis.length===1?t.quasis[0].value.raw:""}replaceSource(t,r){if(!r.includes("${")){zr.isStringLiteral(t)?t.value=r:(t.quasis=[zr.templateElement({raw:r,cooked:r},!0)],t.expressions=[]);return}try{let a=r.replace(/`/g,"\\`"),n=(0,Xg.parseExpression)("`"+a+"`");zr.isTemplateLiteral(n)&&Object.assign(t,{type:"TemplateLiteral",quasis:n.quasis,expressions:n.expressions})}catch{}}getAssignName(t){if(zr.isIdentifier(t))return t.name;if(zr.isMemberExpression(t)){if(zr.isIdentifier(t.property))return t.property.name;if(zr.isStringLiteral(t.property))return t.property.value}return null}getObjKeyName(t){return zr.isIdentifier(t)?t.name:zr.isStringLiteral(t)?t.value:null}getCallName(t){return zr.isIdentifier(t)?t.name:zr.isMemberExpression(t)?this.getCallName(t.property):null}findString(t,r){let a=[];return this.traverseAllStrings(r,(n,s,i)=>{let o=this.extractSource(i);if(o&&o.includes(t)){let l=i.loc?.start;a.push({line:l?.line||0,column:l?.column||0,type:n,name:s,source:o})}}),a}getFingerprint(t){return`${t.type}:${t.name}:${t.source}`}deduplicateResults(t){let r=new Map;return t.forEach(a=>r.set(this.getFingerprint(a),a)),Array.from(r.values()).sort((a,n)=>a.type.localeCompare(n.type)||a.name.localeCompare(n.name))}}});var sV,Hi,n4e,s4e,L2=de(()=>{sV=N(require("fs"));uw();Hi=class{constructor(t){this.rejectPatterns=[];this.validPatterns=[];this.settings=t,this.initPatterns()}initPatterns(){let t=this.settings.reDatas&&this.settings.reDatas.length>0?this.settings.reDatas:vc.patterns;this.patterns=t.filter(n=>n!=="").map(n=>new RegExp(n,this.settings.reFlags||"gs"));let r=this.settings.reRejectRe&&this.settings.reRejectRe.length>0?this.settings.reRejectRe:vc.rejectPatterns;this.rejectPatterns=r.map(n=>new RegExp(n));let a=this.settings.reValidRe&&this.settings.reValidRe.length>0?this.settings.reValidRe:vc.validPatterns;this.validPatterns=a.map(n=>new RegExp(n))}isValidText(t){if(!t||t.length>this.settings.reLength)return!1;for(let r of this.rejectPatterns)if(r.test(t))return!1;if(this.validPatterns.length===0)return!0;for(let r of this.validPatterns)if(r.test(t))return!0;return!1}loadFile(t){let r="";try{return r=sV.default.readFileSync(t,"utf8"),this.extractTranslationsByRegex(r)}catch{return null}}loadCode(t){try{return this.extractTranslationsByRegex(t)}catch{return null}}validateSecurity(t,r=""){let a=[];if(!t)return a;let n=r.trim(),s=n[0],i=n[n.length-1];if(['"',"'","`"].includes(s)&&s===i){let u=s==='"'?"\u53CC\u5F15\u53F7":s==="'"?"\u5355\u5F15\u53F7":"\u53CD\u5F15\u53F7";((f,p)=>{let m=!1;for(let h=0;h<f.length;h++)if(f[h]==="\\")m=!m;else if(f[h]===p){if(!m)return!0;m=!1}else m=!1;return!1})(t,s)&&(a.push({severity:"warning",message:`\u6F5C\u5728\u7684\u7ED3\u6784\u7834\u574F\u98CE\u9669: \u5305\u542B\u672A\u8F6C\u4E49\u7684${u}\uFF0C\u53EF\u80FD\u5BFC\u81F4\u4EE3\u7801\u9003\u9038`}),t.includes(";")&&a.push({severity:"critical",message:"\u9AD8\u5371\u7ED3\u6784\u7834\u574F\u98CE\u9669: \u68C0\u6D4B\u5230\u5F15\u53F7\u914D\u5BF9\u4E0E\u5206\u53F7\u7EC4\u5408\uFF0C\u53EF\u80FD\u5B58\u5728\u6307\u4EE4\u6CE8\u5165"}))}let l=[{regex:/\beval\s*\(/i,name:"eval()"},{regex:/\bFunction\s*\(/i,name:"new Function()"},{regex:/\bsetTimeout\s*\(\s*['"`]/i,name:"setTimeout(string)"},{regex:/<script/i,name:"<script>"},{regex:/\bjavascript:/i,name:"javascript:"}];for(let u of l)u.regex.test(t)&&a.push({severity:"critical",message:`\u53D1\u73B0\u5371\u9669\u7684\u6267\u884C\u6307\u4EE4: ${u.name}`});let c=[{regex:/\bfetch\s*\(/i,name:"fetch()"},{regex:/\bXMLHttpRequest\b/i,name:"XMLHttpRequest"},{regex:/\brequire\s*\(/i,name:"require()"},{regex:/\bprocess\./i,name:"Node.js process"},{regex:/\belectron\./i,name:"Electron API"},{regex:/\blocalStorage\b/i,name:"localStorage"}];for(let u of c)u.regex.test(t)&&a.push({severity:"warning",message:`\u5185\u5BB9\u5305\u542B\u53EF\u7591\u654F\u611F\u64CD\u4F5C: ${u.name}`});return a}extractTranslationsByRegex(t){let r=[],a=new Set;for(let n of this.patterns){n.lastIndex=0;let s=t.match(n);if(s)for(let i of s)this.isValidText(i)&&(a.has(i)||(a.add(i),r.push({source:i,target:i})))}return r}translate(t,r){let a=t;for(let n of r)n.source&&n.target&&n.source!==n.target&&(a=a.split(n.source).join(n.target));return a}traceUsage(t,r){let a=new Set;for(let n of r)n.source&&t.includes(n.source)&&a.add(n.source);return a}findString(t,r){let a=[];return r.split(`
|
|
`).forEach((s,i)=>{s.includes(t)&&a.push({line:i+1,source:s.trim()})}),a}},n4e=e=>({success:!0,message:""}),s4e=e=>({success:!0,texts:[]})});var iV=de(()=>{});var oV=de(()=>{});var lV=de(()=>{});var cV,uV=de(()=>{cV={schemaVersion:2,sources:{}}});var dV=de(()=>{});var fV=de(()=>{});var pV=de(()=>{});var mV=de(()=>{});var UC=de(()=>{iV();oV();lV();uV();dV();fV();pV();mV()});function o4e(e,t,r,a,n){let s={schemaVersion:1,metadata:{plugin:t.id,version:"1.0.0",title:t.name,description:`${t.name} Localization & Tweaks`,language:a,supportedVersions:e,author:n.author||""},dict:{"main.js":{ast:[],regex:[]}}},i=new yi(n),o=i.loadCode(r);o&&(s.dict["main.js"].ast=i.extract(o));let c=new Hi(n).loadCode(r);return c&&(s.dict["main.js"].regex=c),s}function xs(e){let t=JSON.parse(JSON.stringify(e));t.checksum&&delete t.checksum;let r=R2(t);return(0,hV.createHash)("sha256").update(r).digest("hex")}function R2(e){return typeof e!="object"||e===null?JSON.stringify(e):Array.isArray(e)?"["+e.map(R2).join(",")+"]":"{"+Object.keys(e).sort().map(t=>JSON.stringify(t)+":"+R2(e[t])).join(",")+"}"}function k2(e,t,r){let a={schemaVersion:1,metadata:{theme:e.name,language:"zh-cn",version:"1.0.0",supportedVersions:e.version,title:e.name,description:`${e.name} Localization & Tweaks`,author:r.author||""},dict:[]},n=/\/\* @settings([\s\S]*?)\*\//g,s,i=new Set;for(;(s=n.exec(t))!==null;){let o=s[1],l=/^(?:[ \t]*)(name|title|description|label|markdown):\s*(["']?)(.*?)\2[ \t]*(?:\r?\n|$)/gm,c;for(;(c=l.exec(o))!==null;){let u=c[1],d=c[3];d.trim()!==""&&!i.has(d)&&(i.add(d),a.dict.push({type:u,source:d,target:d}))}}return a}function M2(e,t){let r=new Map;return e.forEach(a=>{let n=`${a.type}|${a.name||""}|${a.source}`;r.set(n,{...a})}),t.forEach(a=>{let n=`${a.type}|${a.name||""}|${a.source}`;r.has(n)||r.set(n,{...a})}),Array.from(r.values())}function D2(e,t){let r=new Map;return e.forEach(a=>{r.set(a.source,{...a})}),t.forEach(a=>{r.has(a.source)||r.set(a.source,{...a})}),Array.from(r.values())}var hV,lf=de(()=>{hV=require("crypto");UC();N2();L2()});var l4e,gV,yV=de(()=>{l4e=(e,t)=>{if(typeof e!="string"||typeof t!="string")throw new TypeError("\u7248\u672C\u53F7\u5FC5\u987B\u4E3A\u5B57\u7B26\u4E32\u7C7B\u578B");if(!e||!t)throw new Error("\u7248\u672C\u53F7\u4E0D\u80FD\u4E3A\u7A7A\u5B57\u7B26\u4E32");let r=/^\d+\.\d+\.\d+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+)?$/;if(!r.test(e)||!r.test(t))throw new Error("\u7248\u672C\u53F7\u683C\u5F0F\u4E0D\u7B26\u5408 SemVer \u89C4\u8303");let{coreVersion:a,preRelease:n}=gV(e),{coreVersion:s,preRelease:i}=gV(t),o=a.split(".").map(p=>{let m=Number(p);return isNaN(m)?0:m}),l=s.split(".").map(p=>{let m=Number(p);return isNaN(m)?0:m}),c=Math.max(o.length,l.length);for(let p=0;p<c;p++){let m=o[p]||0,h=l[p]||0;if(m>h)return 1;if(m<h)return-1}if(n===null&&i===null)return 0;if(n===null)return 1;if(i===null)return-1;let u=n.split("."),d=i.split("."),f=Math.max(u.length,d.length);for(let p=0;p<f;p++){let m=u[p]||"",h=d[p]||"",x=Number(m),g=Number(h),y=!isNaN(x),b=!isNaN(g);if(y&&b){if(x>g)return 1;if(x<g)return-1}else{if(y)return-1;if(b)return 1;if(m>h)return 1;if(m<h)return-1}}return 0},gV=e=>{let[t]=e.split("+"),[r,a]=t.split("-");return{coreVersion:r,preRelease:a||null}}});function c4e(e){return e&&typeof e=="object"&&"schemaVersion"in e&&"metadata"in e&&"ast"in e&&Array.isArray(e.ast)&&"regex"in e&&Array.isArray(e.regex)}var xV=de(()=>{});var u4e,d4e,bV=de(()=>{u4e=e=>e.schemaVersion!==void 0||e.metadata!==void 0,d4e=e=>e.dict!==void 0});var xi,_2=de(()=>{xi=class{};xi.SPONSOR="https://afdian.com/a/eondr",xi.I18N_ICON="https://raw.githubusercontent.com/eondrcode/obsidian-i18n/master/Obsidian.png",xi.QQ_GROUP="https://qm.qq.com/cgi-bin/qm/qr?k=kHTS0iC1FC5igTXbdbKzff6_tc54mOF5&jump_from=webapi&authKey=AoSkriW+nDeDzBPqBl9jcpbAYkPXN2QRbrMh0hFbvMrGbqZyRAbJwaD6JKbOy4Nx",xi.VIDEO_TUTORIAL=" https://www.bilibili.com/video/BV1VcxJeNExx/",xi.DOCUMENTATION_TUTORIAL="https://github.com/eondrcode/obsidian-i18n",xi.TASK="https://github.com/eondrcode/obsidian-i18n/issues",xi.GITHUB_ISSUE="https://github.com/eondrcode/obsidian-i18n/issues",xi.SDK_URL="https://download.immersivetranslate.com/immersive-translate-sdk-lite-latest.js"});var vV,Yg,Y0,jC,O2,F2,SV=de(()=>{_2();vV=require("obsidian"),Yg=class{constructor(){this.ball=null;this.disc=null;this.panel=null;this.isActive=!1}static getInstance(){return Yg.instance||(Yg.instance=new Yg),Yg.instance}createball(){this.removeball(),this.ball=document.createElement("div"),this.ball.id="immersive-translate-ball",this.ball.innerHTML='<svg t="1759459310417" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1662" width="20" height="20"><path d="M213.333333 640v85.333333a85.333333 85.333333 0 0 0 78.933334 85.12L298.666667 810.666667h128v85.333333H298.666667a170.666667 170.666667 0 0 1-170.666667-170.666667v-85.333333h85.333333z m554.666667-213.333333l187.733333 469.333333h-91.946666l-51.242667-128h-174.506667l-51.157333 128h-91.904L682.666667 426.666667h85.333333z m-42.666667 123.093333L672.128 682.666667h106.325333L725.333333 549.76zM341.333333 85.333333v85.333334h170.666667v298.666666H341.333333v128H256v-128H85.333333V170.666667h170.666667V85.333333h85.333333z m384 42.666667a170.666667 170.666667 0 0 1 170.666667 170.666667v85.333333h-85.333333V298.666667a85.333333 85.333333 0 0 0-85.333334-85.333334h-128V128h128zM256 256H170.666667v128h85.333333V256z m170.666667 0H341.333333v128h85.333334V256z" fill="currentColor" p-id="1663"></path></svg>',this.ball.addEventListener("click",this.toggleTranslate.bind(this)),this.makeDraggable(this.ball),this.panel=document.createElement("div"),this.panel.id="immersive-translate-panel",this.ball.appendChild(this.panel),this.disc=document.createElement("div"),this.disc.id="immersive-translate-disc",this.ball.appendChild(this.disc),document.body.appendChild(this.ball)}removeball(){this.ball&&this.ball.parentNode&&(this.ball.parentNode.removeChild(this.ball),this.ball=null)}makeDraggable(t){let r=!1,a,n;t.addEventListener("mousedown",s=>{if(s.button!==0&&s.target!==t)return;s.preventDefault(),r=!0,a=s.clientY,n=t.getBoundingClientRect().top}),document.addEventListener("mousemove",s=>{if(!r)return;s.preventDefault();let i=window.innerHeight,o=t.offsetHeight,l=s.clientY-a,c=n+l;c=Math.max(0,Math.min(c,i-o)),t.style.top=`${c}px`,t.style.bottom="auto",t.style.right="0px"}),document.addEventListener("mouseup",()=>{r&&(r=!1)})}toggleTranslate(t){t&&this.panel&&t.target instanceof Node&&this.panel.contains(t.target)||this.panel&&(this.panel.style.display==="none"?(this.panel.style.display="flex",this.isActive=!0):(this.panel.style.display="none",this.isActive=!1))}activate(t){if(!window.immersiveTranslateConfig){this.createball(),window.immersiveTranslateConfig={partnerId:"immersive-translate-sdk",mountPoint:{selector:"#immersive-translate-panel",action:"child"},disclaimerPoint:{selector:"#immersive-translate-disc",action:"child"},pageRule:{mainFrameSelector:t.imtPagerule.mainFrameSelector,selectors:t.imtPagerule.selectors,excludeSelectors:t.imtPagerule.excludeSelectors,stayOriginalSelectors:t.imtPagerule.stayOriginalSelectors,extraBlockSelectors:t.imtPagerule.extraBlockSelectors,extraInlineSelectors:t.imtPagerule.extraInlineSelectors,translationClasses:t.imtPagerule.translationClasses,injectedCss:t.imtPagerule.injectedCss}},window.GM_fetch=async(a,n={})=>{let s=typeof a=="string"?a:a.url,i=n.method||"GET",o={...n.headers},l;n.body&&i.toUpperCase()!=="GET"&&i.toUpperCase()!=="HEAD"&&(typeof n.body=="string"?l=n.body:n.body instanceof URLSearchParams?(l=n.body.toString(),o["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8"):l=String(n.body));try{let c=await(0,vV.requestUrl)({url:s,method:i,headers:o,body:l,throw:!1});return{ok:c.status>=200&&c.status<300,status:c.status,statusText:"",headers:{get:u=>{let d=u.toLowerCase(),p=Object.keys(c.headers).find(m=>m.toLowerCase()===d);return p?c.headers[p]:null},forEach:u=>{Object.entries(c.headers).forEach(([d,f])=>u(f,d))}},url:s,json:async()=>c.json,text:async()=>c.text,arrayBuffer:async()=>c.arrayBuffer,clone:function(){return this}}}catch(c){throw c}};let r=document.createElement("script");r.async=!0,r.src=xi.SDK_URL,document.body.append(r)}}deactivate(){document.location.reload()}},Y0=Yg;Y0.instance=null;jC=Y0.getInstance(),O2=jC.activate.bind(jC),F2=jC.deactivate.bind(jC)});function TV(e){var t,r,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=TV(e[t]))&&(a&&(a+=" "),a+=r)}else for(r in e)e[r]&&(a&&(a+=" "),a+=r);return a}function Jg(){for(var e,t,r=0,a="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=TV(e))&&(a&&(a+=" "),a+=t);return a}var zC=de(()=>{});function C4e(){let e=0,t,r,a="";for(;e<arguments.length;)(t=arguments[e++])&&(r=IV(t))&&(a&&(a+=" "),a+=r);return a}function E4e(e,...t){let r,a,n,s=i;function i(l){let c=t.reduce((u,d)=>d(u),e());return r=S4e(c),a=r.cache.get,n=r.cache.set,s=o,o(l)}function o(l){let c=a(l);if(c)return c;let u=w4e(l,r);return n(l,u),u}return function(){return s(C4e.apply(null,arguments))}}var q2,f4e,AV,wV,p4e,m4e,j2,CV,h4e,g4e,z2,V2,y4e,x4e,b4e,v4e,S4e,T4e,w4e,IV,Jn,NV,LV,P4e,A4e,I4e,N4e,L4e,R4e,Qg,wr,cf,B2,Lu,k4e,M4e,RV,D4e,_4e,O4e,F4e,vt,vm,U2,EV,B4e,VC,St,J0,U4e,PV,j4e,z4e,qC,Zg,ey,kV,MV,DV,_V,V4e,q4e,OV,H4e,HC,H2=de(()=>{q2="-",f4e=e=>{let t=m4e(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:i=>{let o=i.split(q2);return o[0]===""&&o.length!==1&&o.shift(),AV(o,t)||p4e(i)},getConflictingClassGroupIds:(i,o)=>{let l=r[i]||[];return o&&a[i]?[...l,...a[i]]:l}}},AV=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],a=t.nextPart.get(r),n=a?AV(e.slice(1),a):void 0;if(n)return n;if(t.validators.length===0)return;let s=e.join(q2);return t.validators.find(({validator:i})=>i(s))?.classGroupId},wV=/^\[(.+)\]$/,p4e=e=>{if(wV.test(e)){let t=wV.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},m4e=e=>{let{theme:t,classGroups:r}=e,a={nextPart:new Map,validators:[]};for(let n in r)j2(r[n],a,n,t);return a},j2=(e,t,r,a)=>{e.forEach(n=>{if(typeof n=="string"){let s=n===""?t:CV(t,n);s.classGroupId=r;return}if(typeof n=="function"){if(h4e(n)){j2(n(a),t,r,a);return}t.validators.push({validator:n,classGroupId:r});return}Object.entries(n).forEach(([s,i])=>{j2(i,CV(t,s),r,a)})})},CV=(e,t)=>{let r=e;return t.split(q2).forEach(a=>{r.nextPart.has(a)||r.nextPart.set(a,{nextPart:new Map,validators:[]}),r=r.nextPart.get(a)}),r},h4e=e=>e.isThemeGetter,g4e=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,a=new Map,n=(s,i)=>{r.set(s,i),t++,t>e&&(t=0,a=r,r=new Map)};return{get(s){let i=r.get(s);if(i!==void 0)return i;if((i=a.get(s))!==void 0)return n(s,i),i},set(s,i){r.has(s)?r.set(s,i):n(s,i)}}},z2="!",V2=":",y4e=V2.length,x4e=e=>{let{prefix:t,experimentalParseClassName:r}=e,a=n=>{let s=[],i=0,o=0,l=0,c;for(let m=0;m<n.length;m++){let h=n[m];if(i===0&&o===0){if(h===V2){s.push(n.slice(l,m)),l=m+y4e;continue}if(h==="/"){c=m;continue}}h==="["?i++:h==="]"?i--:h==="("?o++:h===")"&&o--}let u=s.length===0?n:n.substring(l),d=b4e(u),f=d!==u,p=c&&c>l?c-l:void 0;return{modifiers:s,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:p}};if(t){let n=t+V2,s=a;a=i=>i.startsWith(n)?s(i.substring(n.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(r){let n=a;a=s=>r({className:s,parseClassName:n})}return a},b4e=e=>e.endsWith(z2)?e.substring(0,e.length-1):e.startsWith(z2)?e.substring(1):e,v4e=e=>{let t=Object.fromEntries(e.orderSensitiveModifiers.map(a=>[a,!0]));return a=>{if(a.length<=1)return a;let n=[],s=[];return a.forEach(i=>{i[0]==="["||t[i]?(n.push(...s.sort(),i),s=[]):s.push(i)}),n.push(...s.sort()),n}},S4e=e=>({cache:g4e(e.cacheSize),parseClassName:x4e(e),sortModifiers:v4e(e),...f4e(e)}),T4e=/\s+/,w4e=(e,t)=>{let{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:n,sortModifiers:s}=t,i=[],o=e.trim().split(T4e),l="";for(let c=o.length-1;c>=0;c-=1){let u=o[c],{isExternal:d,modifiers:f,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:h}=r(u);if(d){l=u+(l.length>0?" "+l:l);continue}let x=!!h,g=a(x?m.substring(0,h):m);if(!g){if(!x){l=u+(l.length>0?" "+l:l);continue}if(g=a(m),!g){l=u+(l.length>0?" "+l:l);continue}x=!1}let y=s(f).join(":"),b=p?y+z2:y,S=b+g;if(i.includes(S))continue;i.push(S);let w=n(g,x);for(let P=0;P<w.length;++P){let C=w[P];i.push(b+C)}l=u+(l.length>0?" "+l:l)}return l};IV=e=>{if(typeof e=="string")return e;let t,r="";for(let a=0;a<e.length;a++)e[a]&&(t=IV(e[a]))&&(r&&(r+=" "),r+=t);return r};Jn=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},NV=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,LV=/^\((?:(\w[\w-]*):)?(.+)\)$/i,P4e=/^\d+\/\d+$/,A4e=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,I4e=/\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$/,N4e=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,L4e=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,R4e=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Qg=e=>P4e.test(e),wr=e=>!!e&&!Number.isNaN(Number(e)),cf=e=>!!e&&Number.isInteger(Number(e)),B2=e=>e.endsWith("%")&&wr(e.slice(0,-1)),Lu=e=>A4e.test(e),k4e=()=>!0,M4e=e=>I4e.test(e)&&!N4e.test(e),RV=()=>!1,D4e=e=>L4e.test(e),_4e=e=>R4e.test(e),O4e=e=>!vt(e)&&!St(e),F4e=e=>Zg(e,DV,RV),vt=e=>NV.test(e),vm=e=>Zg(e,_V,M4e),U2=e=>Zg(e,V4e,wr),EV=e=>Zg(e,kV,RV),B4e=e=>Zg(e,MV,_4e),VC=e=>Zg(e,OV,D4e),St=e=>LV.test(e),J0=e=>ey(e,_V),U4e=e=>ey(e,q4e),PV=e=>ey(e,kV),j4e=e=>ey(e,DV),z4e=e=>ey(e,MV),qC=e=>ey(e,OV,!0),Zg=(e,t,r)=>{let a=NV.exec(e);return a?a[1]?t(a[1]):r(a[2]):!1},ey=(e,t,r=!1)=>{let a=LV.exec(e);return a?a[1]?t(a[1]):r:!1},kV=e=>e==="position"||e==="percentage",MV=e=>e==="image"||e==="url",DV=e=>e==="length"||e==="size"||e==="bg-size",_V=e=>e==="length",V4e=e=>e==="number",q4e=e=>e==="family-name",OV=e=>e==="shadow",H4e=()=>{let e=Jn("color"),t=Jn("font"),r=Jn("text"),a=Jn("font-weight"),n=Jn("tracking"),s=Jn("leading"),i=Jn("breakpoint"),o=Jn("container"),l=Jn("spacing"),c=Jn("radius"),u=Jn("shadow"),d=Jn("inset-shadow"),f=Jn("text-shadow"),p=Jn("drop-shadow"),m=Jn("blur"),h=Jn("perspective"),x=Jn("aspect"),g=Jn("ease"),y=Jn("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...S(),St,vt],P=()=>["auto","hidden","clip","visible","scroll"],C=()=>["auto","contain","none"],I=()=>[St,vt,l],R=()=>[Qg,"full","auto",...I()],O=()=>[cf,"none","subgrid",St,vt],D=()=>["auto",{span:["full",cf,St,vt]},cf,St,vt],W=()=>[cf,"auto",St,vt],J=()=>["auto","min","max","fr",St,vt],me=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Z=()=>["start","end","center","stretch","center-safe","end-safe"],q=()=>["auto",...I()],V=()=>[Qg,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],L=()=>[e,St,vt],k=()=>[...S(),PV,EV,{position:[St,vt]}],_=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ee=()=>["auto","cover","contain",j4e,F4e,{size:[St,vt]}],ie=()=>[B2,J0,vm],ae=()=>["","none","full",c,St,vt],ge=()=>["",wr,J0,vm],ue=()=>["solid","dashed","dotted","double"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>[wr,B2,PV,EV],K=()=>["","none",m,St,vt],he=()=>["none",wr,St,vt],H=()=>["none",wr,St,vt],xe=()=>[wr,St,vt],Pe=()=>[Qg,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Lu],breakpoint:[Lu],color:[k4e],container:[Lu],"drop-shadow":[Lu],ease:["in","out","in-out"],font:[O4e],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Lu],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Lu],shadow:[Lu],spacing:["px",wr],text:[Lu],"text-shadow":[Lu],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Qg,vt,St,x]}],container:["container"],columns:[{columns:[wr,vt,St,o]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"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:w()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:R()}],"inset-x":[{"inset-x":R()}],"inset-y":[{"inset-y":R()}],start:[{start:R()}],end:[{end:R()}],top:[{top:R()}],right:[{right:R()}],bottom:[{bottom:R()}],left:[{left:R()}],visibility:["visible","invisible","collapse"],z:[{z:[cf,"auto",St,vt]}],basis:[{basis:[Qg,"full","auto",o,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[wr,Qg,"auto","initial","none",vt]}],grow:[{grow:["",wr,St,vt]}],shrink:[{shrink:["",wr,St,vt]}],order:[{order:[cf,"first","last","none",St,vt]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":J()}],"auto-rows":[{"auto-rows":J()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...me(),"normal"]}],"justify-items":[{"justify-items":[...Z(),"normal"]}],"justify-self":[{"justify-self":["auto",...Z()]}],"align-content":[{content:["normal",...me()]}],"align-items":[{items:[...Z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Z(),{baseline:["","last"]}]}],"place-content":[{"place-content":me()}],"place-items":[{"place-items":[...Z(),"baseline"]}],"place-self":[{"place-self":["auto",...Z()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:q()}],mx:[{mx:q()}],my:[{my:q()}],ms:[{ms:q()}],me:[{me:q()}],mt:[{mt:q()}],mr:[{mr:q()}],mb:[{mb:q()}],ml:[{ml:q()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:V()}],w:[{w:[o,"screen",...V()]}],"min-w":[{"min-w":[o,"screen","none",...V()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[i]},...V()]}],h:[{h:["screen","lh",...V()]}],"min-h":[{"min-h":["screen","lh","none",...V()]}],"max-h":[{"max-h":["screen","lh",...V()]}],"font-size":[{text:["base",r,J0,vm]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,St,U2]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",B2,vt]}],"font-family":[{font:[U4e,vt,t]}],"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:[n,St,vt]}],"line-clamp":[{"line-clamp":[wr,"none",St,U2]}],leading:[{leading:[s,...I()]}],"list-image":[{"list-image":["none",St,vt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",St,vt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ue(),"wavy"]}],"text-decoration-thickness":[{decoration:[wr,"from-font","auto",St,vm]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[wr,"auto",St,vt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",St,vt]}],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",St,vt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:k()}],"bg-repeat":[{bg:_()}],"bg-size":[{bg:ee()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},cf,St,vt],radial:["",St,vt],conic:[cf,St,vt]},z4e,B4e]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:ge()}],"border-w-x":[{"border-x":ge()}],"border-w-y":[{"border-y":ge()}],"border-w-s":[{"border-s":ge()}],"border-w-e":[{"border-e":ge()}],"border-w-t":[{"border-t":ge()}],"border-w-r":[{"border-r":ge()}],"border-w-b":[{"border-b":ge()}],"border-w-l":[{"border-l":ge()}],"divide-x":[{"divide-x":ge()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ge()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ue(),"hidden","none"]}],"divide-style":[{divide:[...ue(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...ue(),"none","hidden"]}],"outline-offset":[{"outline-offset":[wr,St,vt]}],"outline-w":[{outline:["",wr,J0,vm]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",u,qC,VC]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",d,qC,VC]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:ge()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[wr,vm]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":ge()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",f,qC,VC]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[wr,St,vt]}],"mix-blend":[{"mix-blend":[...$(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$()}],"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":[wr]}],"mask-image-linear-from-pos":[{"mask-linear-from":A()}],"mask-image-linear-to-pos":[{"mask-linear-to":A()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":A()}],"mask-image-t-to-pos":[{"mask-t-to":A()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":A()}],"mask-image-r-to-pos":[{"mask-r-to":A()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":A()}],"mask-image-b-to-pos":[{"mask-b-to":A()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":A()}],"mask-image-l-to-pos":[{"mask-l-to":A()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":A()}],"mask-image-x-to-pos":[{"mask-x-to":A()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":A()}],"mask-image-y-to-pos":[{"mask-y-to":A()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[St,vt]}],"mask-image-radial-from-pos":[{"mask-radial-from":A()}],"mask-image-radial-to-pos":[{"mask-radial-to":A()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"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":S()}],"mask-image-conic-pos":[{"mask-conic":[wr]}],"mask-image-conic-from-pos":[{"mask-conic-from":A()}],"mask-image-conic-to-pos":[{"mask-conic-to":A()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:k()}],"mask-repeat":[{mask:_()}],"mask-size":[{mask:ee()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",St,vt]}],filter:[{filter:["","none",St,vt]}],blur:[{blur:K()}],brightness:[{brightness:[wr,St,vt]}],contrast:[{contrast:[wr,St,vt]}],"drop-shadow":[{"drop-shadow":["","none",p,qC,VC]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",wr,St,vt]}],"hue-rotate":[{"hue-rotate":[wr,St,vt]}],invert:[{invert:["",wr,St,vt]}],saturate:[{saturate:[wr,St,vt]}],sepia:[{sepia:["",wr,St,vt]}],"backdrop-filter":[{"backdrop-filter":["","none",St,vt]}],"backdrop-blur":[{"backdrop-blur":K()}],"backdrop-brightness":[{"backdrop-brightness":[wr,St,vt]}],"backdrop-contrast":[{"backdrop-contrast":[wr,St,vt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",wr,St,vt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[wr,St,vt]}],"backdrop-invert":[{"backdrop-invert":["",wr,St,vt]}],"backdrop-opacity":[{"backdrop-opacity":[wr,St,vt]}],"backdrop-saturate":[{"backdrop-saturate":[wr,St,vt]}],"backdrop-sepia":[{"backdrop-sepia":["",wr,St,vt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",St,vt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[wr,"initial",St,vt]}],ease:[{ease:["linear","initial",g,St,vt]}],delay:[{delay:[wr,St,vt]}],animate:[{animate:["none",y,St,vt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,St,vt]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:he()}],"rotate-x":[{"rotate-x":he()}],"rotate-y":[{"rotate-y":he()}],"rotate-z":[{"rotate-z":he()}],scale:[{scale:H()}],"scale-x":[{"scale-x":H()}],"scale-y":[{"scale-y":H()}],"scale-z":[{"scale-z":H()}],"scale-3d":["scale-3d"],skew:[{skew:xe()}],"skew-x":[{"skew-x":xe()}],"skew-y":[{"skew-y":xe()}],transform:[{transform:[St,vt,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Pe()}],"translate-x":[{"translate-x":Pe()}],"translate-y":[{"translate-y":Pe()}],"translate-z":[{"translate-z":Pe()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"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",St,vt]}],"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":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"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",St,vt]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[wr,J0,vm,U2]}],stroke:[{stroke:["none",...L()]}],"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"]}},HC=E4e(H4e)});function sl(...e){return HC(Jg(e))}var FV=de(()=>{zC();H2()});var G2={};qb(G2,{escapeSpecialChars:()=>BV,i18nOpen:()=>kc,info:()=>$C,parseIssueTitle:()=>jV,unescapeSpecialChars:()=>UV});var $2,$C,kc,BV,UV,jV,GC=de(()=>{Rr();$2=require("child_process"),$C=e=>{},kc=(e,t)=>{process.platform==="win32"&&(0,$2.exec)(`start "" "${t}"`,r=>{r?e.notice.resultPrefix(v("func.open_prefix"),!1,r):e.notice.resultPrefix(v("func.open_prefix"),!0)}),process.platform==="darwin"&&(0,$2.exec)(`open "${t}"`,r=>{r?e.notice.resultPrefix(v("func.open_prefix"),!1,r):e.notice.resultPrefix(v("func.open_prefix"),!0)})},BV=e=>e.replace(/\n/g,"\\n").replace(/\r/g,"\\r"),UV=e=>e.replace(/\\n/g,`
|
|
`).replace(/\\r/g,"\r"),jV=e=>{let t=/\[(.*?)\]\s*\[(.*?)\]\s*\[(.*?)\]/,r=e.match(t);return r?[r[1],r[2],r[3]]:["","",""]}});function $4e(e,t={checkFormat:!0,checkVersion:!0,checkTranslations:!0}){return!(t.checkFormat&&(!("schemaVersion"in e)||!("metadata"in e)||!("dict"in e)))}var K2,G4e,zV=de(()=>{K2=e=>{if(!e)return!1;let t="metadata"in e,r="dict"in e&&typeof e.dict=="object"&&e.dict!==null,a="schemaVersion"in e,n=!1;if(t){let s=e.metadata;n="plugin"in s&&"version"in s&&"language"in s}return t&&n&&r&&a},G4e=e=>{if(!e)return!1;let t="manifest"in e,r=t&&"translationVersion"in e.manifest,a=t&&"pluginVersion"in e.manifest,n="dict"in e;return t&&r&&a&&n}});var KC,K4e,W4e,VV=de(()=>{KC=require("zlib"),K4e=e=>(0,KC.gzipSync)(e).toString("base64"),W4e=e=>(0,KC.gunzipSync)(Buffer.from(e,"base64")).toString()});var W2,X4e,qV=de(()=>{W2=e=>{let t=new Date(e),r=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0"),n=String(t.getHours()).padStart(2,"0"),s=String(t.getMinutes()).padStart(2,"0");return`${r}\u6708${a}\u65E5 ${n}:${s}`},X4e=e=>{let t=new Date(e),[r,a,n,s,i]=[t.getFullYear(),String(t.getMonth()+1).padStart(2,"0"),String(t.getDate()).padStart(2,"0"),String(t.getHours()).padStart(2,"0"),String(t.getMinutes()).padStart(2,"0")];return`${r}/${a}/${n} ${s}:${i}`}});var Ru,HV=de(()=>{Ru=e=>{let t=e;t.use={};for(let r of Object.keys(t.getState()))t.use[r]=()=>t(a=>a[r]);return t}});var $V,GV,X2=de(()=>{$V=e=>{let t,r=new Set,a=(c,u)=>{let d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){let f=t;t=u??(typeof d!="object"||d===null)?d:Object.assign({},t,d),r.forEach(p=>p(t,f))}},n=()=>t,o={setState:a,getState:n,getInitialState:()=>l,subscribe:c=>(r.add(c),()=>r.delete(c))},l=t=e(a,n,o);return o},GV=e=>e?$V(e):$V});function J4e(e,t=Y4e){let r=Q0.default.useSyncExternalStore(e.subscribe,Q0.default.useCallback(()=>t(e.getState()),[e,t]),Q0.default.useCallback(()=>t(e.getInitialState()),[e,t]));return Q0.default.useDebugValue(r),r}var Q0,Y4e,KV,Mc,WV=de(()=>{Q0=N(Le(),1);X2();Y4e=e=>e;KV=e=>{let t=GV(e),r=a=>J4e(t,a);return Object.assign(r,t),r},Mc=e=>e?KV(e):KV});var ty=de(()=>{X2();WV()});var XV,Dc,He,YV=de(()=>{ty();Vt();XV=Mc()((e,t)=>({i18n:null,editorPluginTranslation:{},editorPluginTranslationPath:"",editorThemeTranslation:{},editorThemeName:"",editorThemeDir:"",editorThemeTranslationPath:"",sourceUpdateTick:0,setI18n:r=>e({i18n:r}),setEditorPluginTranslation:r=>e({editorPluginTranslation:r}),setEditorPluginTranslationPath:r=>e({editorPluginTranslationPath:r}),setEditorTheme:(r,a,n,s)=>e({editorThemeTranslation:r,editorThemeName:a,editorThemeDir:n,editorThemeTranslationPath:s}),triggerSourceUpdate:()=>e(r=>({sourceUpdateTick:r.sourceUpdateTick+1}))})),Dc=Ru(XV),He=XV});var i9=ne(Va=>{"use strict";function Z2(e,t){var r=e.length;e.push(t);e:for(;0<r;){var a=r-1>>>1,n=e[a];if(0<WC(n,t))e[a]=t,e[r]=n,r=a;else break e}}function _c(e){return e.length===0?null:e[0]}function YC(e){if(e.length===0)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var a=0,n=e.length,s=n>>>1;a<s;){var i=2*(a+1)-1,o=e[i],l=i+1,c=e[l];if(0>WC(o,r))l<n&&0>WC(c,o)?(e[a]=c,e[l]=r,a=l):(e[a]=o,e[i]=r,a=i);else if(l<n&&0>WC(c,r))e[a]=c,e[l]=r,a=l;else break e}}return t}function WC(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}Va.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(JV=performance,Va.unstable_now=function(){return JV.now()}):(Y2=Date,QV=Y2.now(),Va.unstable_now=function(){return Y2.now()-QV});var JV,Y2,QV,ku=[],uf=[],Q4e=1,il=null,Zs=3,eM=!1,Z0=!1,ev=!1,tM=!1,t9=typeof setTimeout=="function"?setTimeout:null,r9=typeof clearTimeout=="function"?clearTimeout:null,ZV=typeof setImmediate<"u"?setImmediate:null;function XC(e){for(var t=_c(uf);t!==null;){if(t.callback===null)YC(uf);else if(t.startTime<=e)YC(uf),t.sortIndex=t.expirationTime,Z2(ku,t);else break;t=_c(uf)}}function rM(e){if(ev=!1,XC(e),!Z0)if(_c(ku)!==null)Z0=!0,ay||(ay=!0,ry());else{var t=_c(uf);t!==null&&aM(rM,t.startTime-e)}}var ay=!1,tv=-1,a9=5,n9=-1;function s9(){return tM?!0:!(Va.unstable_now()-n9<a9)}function J2(){if(tM=!1,ay){var e=Va.unstable_now();n9=e;var t=!0;try{e:{Z0=!1,ev&&(ev=!1,r9(tv),tv=-1),eM=!0;var r=Zs;try{t:{for(XC(e),il=_c(ku);il!==null&&!(il.expirationTime>e&&s9());){var a=il.callback;if(typeof a=="function"){il.callback=null,Zs=il.priorityLevel;var n=a(il.expirationTime<=e);if(e=Va.unstable_now(),typeof n=="function"){il.callback=n,XC(e),t=!0;break t}il===_c(ku)&&YC(ku),XC(e)}else YC(ku);il=_c(ku)}if(il!==null)t=!0;else{var s=_c(uf);s!==null&&aM(rM,s.startTime-e),t=!1}}break e}finally{il=null,Zs=r,eM=!1}t=void 0}}finally{t?ry():ay=!1}}}var ry;typeof ZV=="function"?ry=function(){ZV(J2)}:typeof MessageChannel<"u"?(Q2=new MessageChannel,e9=Q2.port2,Q2.port1.onmessage=J2,ry=function(){e9.postMessage(null)}):ry=function(){t9(J2,0)};var Q2,e9;function aM(e,t){tv=t9(function(){e(Va.unstable_now())},t)}Va.unstable_IdlePriority=5;Va.unstable_ImmediatePriority=1;Va.unstable_LowPriority=4;Va.unstable_NormalPriority=3;Va.unstable_Profiling=null;Va.unstable_UserBlockingPriority=2;Va.unstable_cancelCallback=function(e){e.callback=null};Va.unstable_forceFrameRate=function(e){0>e||125<e||(a9=0<e?Math.floor(1e3/e):5)};Va.unstable_getCurrentPriorityLevel=function(){return Zs};Va.unstable_next=function(e){switch(Zs){case 1:case 2:case 3:var t=3;break;default:t=Zs}var r=Zs;Zs=t;try{return e()}finally{Zs=r}};Va.unstable_requestPaint=function(){tM=!0};Va.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=Zs;Zs=e;try{return t()}finally{Zs=r}};Va.unstable_scheduleCallback=function(e,t,r){var a=Va.unstable_now();switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0<r?a+r:a):r=a,e){case 1:var n=-1;break;case 2:n=250;break;case 5:n=1073741823;break;case 4:n=1e4;break;default:n=5e3}return n=r+n,e={id:Q4e++,callback:t,priorityLevel:e,startTime:r,expirationTime:n,sortIndex:-1},r>a?(e.sortIndex=r,Z2(uf,e),_c(ku)===null&&e===_c(uf)&&(ev?(r9(tv),tv=-1):ev=!0,aM(rM,r-a))):(e.sortIndex=n,Z2(ku,e),Z0||eM||(Z0=!0,ay||(ay=!0,ry()))),e};Va.unstable_shouldYield=s9;Va.unstable_wrapCallback=function(e){var t=Zs;return function(){var r=Zs;Zs=t;try{return e.apply(this,arguments)}finally{Zs=r}}}});var l9=ne(($ut,o9)=>{"use strict";o9.exports=i9()});var u9=ne(vi=>{"use strict";var Z4e=Le();function c9(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function df(){}var bi={d:{f:df,r:function(){throw Error(c9(522))},D:df,C:df,L:df,m:df,X:df,S:df,M:df},p:0,findDOMNode:null},e8e=Symbol.for("react.portal");function t8e(e,t,r){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:e8e,key:a==null?null:""+a,children:e,containerInfo:t,implementation:r}}var rv=Z4e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function JC(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}vi.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=bi;vi.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(c9(299));return t8e(e,t,null,r)};vi.flushSync=function(e){var t=rv.T,r=bi.p;try{if(rv.T=null,bi.p=2,e)return e()}finally{rv.T=t,bi.p=r,bi.d.f()}};vi.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,bi.d.C(e,t))};vi.prefetchDNS=function(e){typeof e=="string"&&bi.d.D(e)};vi.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var r=t.as,a=JC(r,t.crossOrigin),n=typeof t.integrity=="string"?t.integrity:void 0,s=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;r==="style"?bi.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:a,integrity:n,fetchPriority:s}):r==="script"&&bi.d.X(e,{crossOrigin:a,integrity:n,fetchPriority:s,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};vi.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var r=JC(t.as,t.crossOrigin);bi.d.M(e,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&bi.d.M(e)};vi.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var r=t.as,a=JC(r,t.crossOrigin);bi.d.L(e,r,{crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};vi.preloadModule=function(e,t){if(typeof e=="string")if(t){var r=JC(t.as,t.crossOrigin);bi.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else bi.d.m(e)};vi.requestFormReset=function(e){bi.d.r(e)};vi.unstable_batchedUpdates=function(e,t){return e(t)};vi.useFormState=function(e,t,r){return rv.H.useFormState(e,t,r)};vi.useFormStatus=function(){return rv.H.useHostTransitionStatus()};vi.version="19.2.0"});var ff=ne((Kut,f9)=>{"use strict";function d9(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(d9)}catch{}}d9(),f9.exports=u9()});var C$=ne(TE=>{"use strict";var Zn=l9(),Bq=Le(),r8e=ff();function Oe(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Uq(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Vv(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function jq(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function zq(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p9(e){if(Vv(e)!==e)throw Error(Oe(188))}function a8e(e){var t=e.alternate;if(!t){if(t=Vv(e),t===null)throw Error(Oe(188));return t!==e?null:e}for(var r=e,a=t;;){var n=r.return;if(n===null)break;var s=n.alternate;if(s===null){if(a=n.return,a!==null){r=a;continue}break}if(n.child===s.child){for(s=n.child;s;){if(s===r)return p9(n),e;if(s===a)return p9(n),t;s=s.sibling}throw Error(Oe(188))}if(r.return!==a.return)r=n,a=s;else{for(var i=!1,o=n.child;o;){if(o===r){i=!0,r=n,a=s;break}if(o===a){i=!0,a=n,r=s;break}o=o.sibling}if(!i){for(o=s.child;o;){if(o===r){i=!0,r=s,a=n;break}if(o===a){i=!0,a=s,r=n;break}o=o.sibling}if(!i)throw Error(Oe(189))}}if(r.alternate!==a)throw Error(Oe(190))}if(r.tag!==3)throw Error(Oe(188));return r.stateNode.current===r?e:t}function Vq(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=Vq(e),t!==null)return t;e=e.sibling}return null}var _a=Object.assign,n8e=Symbol.for("react.element"),QC=Symbol.for("react.transitional.element"),uv=Symbol.for("react.portal"),cy=Symbol.for("react.fragment"),qq=Symbol.for("react.strict_mode"),FM=Symbol.for("react.profiler"),Hq=Symbol.for("react.consumer"),ju=Symbol.for("react.context"),kD=Symbol.for("react.forward_ref"),BM=Symbol.for("react.suspense"),UM=Symbol.for("react.suspense_list"),MD=Symbol.for("react.memo"),pf=Symbol.for("react.lazy");Symbol.for("react.scope");var jM=Symbol.for("react.activity");Symbol.for("react.legacy_hidden");Symbol.for("react.tracing_marker");var s8e=Symbol.for("react.memo_cache_sentinel");Symbol.for("react.view_transition");var m9=Symbol.iterator;function av(e){return e===null||typeof e!="object"?null:(e=m9&&e[m9]||e["@@iterator"],typeof e=="function"?e:null)}var i8e=Symbol.for("react.client.reference");function zM(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===i8e?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case cy:return"Fragment";case FM:return"Profiler";case qq:return"StrictMode";case BM:return"Suspense";case UM:return"SuspenseList";case jM:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case uv:return"Portal";case ju:return e.displayName||"Context";case Hq:return(e._context.displayName||"Context")+".Consumer";case kD:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case MD:return t=e.displayName||null,t!==null?t:zM(e.type)||"Memo";case pf:t=e._payload,e=e._init;try{return zM(e(t))}catch{}}return null}var dv=Array.isArray,Wt=Bq.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ta=r8e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Pm={pending:!1,data:null,method:null,action:null},VM=[],uy=-1;function jc(e){return{current:e}}function Ss(e){0>uy||(e.current=VM[uy],VM[uy]=null,uy--)}function wa(e,t){uy++,VM[uy]=e.current,e.current=t}var Uc=jc(null),Iv=jc(null),Cf=jc(null),R1=jc(null);function k1(e,t){switch(wa(Cf,t),wa(Iv,e),wa(Uc,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Sq(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Sq(t),e=u$(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Ss(Uc),wa(Uc,e)}function Iy(){Ss(Uc),Ss(Iv),Ss(Cf)}function qM(e){e.memoizedState!==null&&wa(R1,e);var t=Uc.current,r=u$(t,e.type);t!==r&&(wa(Iv,e),wa(Uc,r))}function M1(e){Iv.current===e&&(Ss(Uc),Ss(Iv)),R1.current===e&&(Ss(R1),Uv._currentValue=Pm)}var nM,h9;function Tm(e){if(nM===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);nM=t&&t[1]||"",h9=-1<r.stack.indexOf(`
|
|
at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
`+nM+e+h9}var sM=!1;function iM(e,t){if(!e||sM)return"";sM=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(p){var f=p}Reflect.construct(e,[],d)}else{try{d.call()}catch(p){f=p}e.call(d.prototype)}}else{try{throw Error()}catch(p){f=p}(d=e())&&typeof d.catch=="function"&&d.catch(function(){})}}catch(p){if(p&&f&&typeof p.stack=="string")return[p.stack,f.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=a.DetermineComponentFrameRoot(),i=s[0],o=s[1];if(i&&o){var l=i.split(`
|
|
`),c=o.split(`
|
|
`);for(n=a=0;a<l.length&&!l[a].includes("DetermineComponentFrameRoot");)a++;for(;n<c.length&&!c[n].includes("DetermineComponentFrameRoot");)n++;if(a===l.length||n===c.length)for(a=l.length-1,n=c.length-1;1<=a&&0<=n&&l[a]!==c[n];)n--;for(;1<=a&&0<=n;a--,n--)if(l[a]!==c[n]){if(a!==1||n!==1)do if(a--,n--,0>n||l[a]!==c[n]){var u=`
|
|
`+l[a].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=a&&0<=n);break}}}finally{sM=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?Tm(r):""}function o8e(e,t){switch(e.tag){case 26:case 27:case 5:return Tm(e.type);case 16:return Tm("Lazy");case 13:return e.child!==t&&t!==null?Tm("Suspense Fallback"):Tm("Suspense");case 19:return Tm("SuspenseList");case 0:case 15:return iM(e.type,!1);case 11:return iM(e.type.render,!1);case 1:return iM(e.type,!0);case 31:return Tm("Activity");default:return""}}function g9(e){try{var t="",r=null;do t+=o8e(e,r),r=e,e=e.return;while(e);return t}catch(a){return`
|
|
Error generating stack: `+a.message+`
|
|
`+a.stack}}var HM=Object.prototype.hasOwnProperty,DD=Zn.unstable_scheduleCallback,oM=Zn.unstable_cancelCallback,l8e=Zn.unstable_shouldYield,c8e=Zn.unstable_requestPaint,So=Zn.unstable_now,u8e=Zn.unstable_getCurrentPriorityLevel,$q=Zn.unstable_ImmediatePriority,Gq=Zn.unstable_UserBlockingPriority,D1=Zn.unstable_NormalPriority,d8e=Zn.unstable_LowPriority,Kq=Zn.unstable_IdlePriority,f8e=Zn.log,p8e=Zn.unstable_setDisableYieldValue,qv=null,To=null;function bf(e){if(typeof f8e=="function"&&p8e(e),To&&typeof To.setStrictMode=="function")try{To.setStrictMode(qv,e)}catch{}}var wo=Math.clz32?Math.clz32:g8e,m8e=Math.log,h8e=Math.LN2;function g8e(e){return e>>>=0,e===0?32:31-(m8e(e)/h8e|0)|0}var ZC=256,e1=262144,t1=4194304;function wm(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function iE(e,t,r){var a=e.pendingLanes;if(a===0)return 0;var n=0,s=e.suspendedLanes,i=e.pingedLanes;e=e.warmLanes;var o=a&134217727;return o!==0?(a=o&~s,a!==0?n=wm(a):(i&=o,i!==0?n=wm(i):r||(r=o&~e,r!==0&&(n=wm(r))))):(o=a&~s,o!==0?n=wm(o):i!==0?n=wm(i):r||(r=a&~e,r!==0&&(n=wm(r)))),n===0?0:t!==0&&t!==n&&!(t&s)&&(s=n&-n,r=t&-t,s>=r||s===32&&(r&4194048)!==0)?t:n}function Hv(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function y8e(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Wq(){var e=t1;return t1<<=1,!(t1&62914560)&&(t1=4194304),e}function lM(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function $v(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function x8e(e,t,r,a,n,s){var i=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 o=e.entanglements,l=e.expirationTimes,c=e.hiddenUpdates;for(r=i&~r;0<r;){var u=31-wo(r),d=1<<u;o[u]=0,l[u]=-1;var f=c[u];if(f!==null)for(c[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}r&=~d}a!==0&&Xq(e,a,0),s!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=s&~(i&~t))}function Xq(e,t,r){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-wo(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|r&261930}function Yq(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var a=31-wo(r),n=1<<a;n&t|e[a]&t&&(e[a]|=t),r&=~n}}function Jq(e,t){var r=t&-t;return r=r&42?1:_D(r),r&(e.suspendedLanes|t)?0:r}function _D(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 OD(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Qq(){var e=ta.p;return e!==0?e:(e=window.event,e===void 0?32:S$(e.type))}function y9(e,t){var r=ta.p;try{return ta.p=e,t()}finally{ta.p=r}}var Ff=Math.random().toString(36).slice(2),Os="__reactFiber$"+Ff,Yi="__reactProps$"+Ff,Uy="__reactContainer$"+Ff,$M="__reactEvents$"+Ff,b8e="__reactListeners$"+Ff,v8e="__reactHandles$"+Ff,x9="__reactResources$"+Ff,Gv="__reactMarker$"+Ff;function FD(e){delete e[Os],delete e[Yi],delete e[$M],delete e[b8e],delete e[v8e]}function dy(e){var t=e[Os];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Uy]||r[Os]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Pq(e);e!==null;){if(r=e[Os])return r;e=Pq(e)}return t}e=r,r=e.parentNode}return null}function jy(e){if(e=e[Os]||e[Uy]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function fv(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(Oe(33))}function Sy(e){var t=e[x9];return t||(t=e[x9]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function vs(e){e[Gv]=!0}var Zq=new Set,eH={};function Om(e,t){Ny(e,t),Ny(e+"Capture",t)}function Ny(e,t){for(eH[e]=t,e=0;e<t.length;e++)Zq.add(t[e])}var S8e=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]*$"),b9={},v9={};function T8e(e){return HM.call(v9,e)?!0:HM.call(b9,e)?!1:S8e.test(e)?v9[e]=!0:(b9[e]=!0,!1)}function g1(e,t,r){if(T8e(t))if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+r)}}function r1(e,t,r){if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+r)}}function Mu(e,t,r,a){if(a===null)e.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(t,r,""+a)}}function ll(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function tH(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function w8e(e,t,r){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var n=a.get,s=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(i){r=""+i,s.call(this,i)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function GM(e){if(!e._valueTracker){var t=tH(e)?"checked":"value";e._valueTracker=w8e(e,t,""+e[t])}}function rH(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),a="";return e&&(a=tH(e)?e.checked?"true":"false":e.value),e=a,e!==r?(t.setValue(e),!0):!1}function _1(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 C8e=/[\n"\\]/g;function dl(e){return e.replace(C8e,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function KM(e,t,r,a,n,s,i,o){e.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?e.type=i:e.removeAttribute("type"),t!=null?i==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+ll(t)):e.value!==""+ll(t)&&(e.value=""+ll(t)):i!=="submit"&&i!=="reset"||e.removeAttribute("value"),t!=null?WM(e,i,ll(t)):r!=null?WM(e,i,ll(r)):a!=null&&e.removeAttribute("value"),n==null&&s!=null&&(e.defaultChecked=!!s),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.name=""+ll(o):e.removeAttribute("name")}function aH(e,t,r,a,n,s,i,o){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||r!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){GM(e);return}r=r!=null?""+ll(r):"",t=t!=null?""+ll(t):r,o||t===e.value||(e.value=t),e.defaultValue=t}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=o?e.checked:!!a,e.defaultChecked=!!a,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.name=i),GM(e)}function WM(e,t,r){t==="number"&&_1(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function Ty(e,t,r,a){if(e=e.options,t){t={};for(var n=0;n<r.length;n++)t["$"+r[n]]=!0;for(r=0;r<e.length;r++)n=t.hasOwnProperty("$"+e[r].value),e[r].selected!==n&&(e[r].selected=n),n&&a&&(e[r].defaultSelected=!0)}else{for(r=""+ll(r),t=null,n=0;n<e.length;n++){if(e[n].value===r){e[n].selected=!0,a&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function nH(e,t,r){if(t!=null&&(t=""+ll(t),t!==e.value&&(e.value=t),r==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=r!=null?""+ll(r):""}function sH(e,t,r,a){if(t==null){if(a!=null){if(r!=null)throw Error(Oe(92));if(dv(a)){if(1<a.length)throw Error(Oe(93));a=a[0]}r=a}r==null&&(r=""),t=r}r=ll(t),e.defaultValue=r,a=e.textContent,a===r&&a!==""&&a!==null&&(e.value=a),GM(e)}function Ly(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var E8e=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 S9(e,t,r){var a=t.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,r):typeof r!="number"||r===0||E8e.has(t)?t==="float"?e.cssFloat=r:e[t]=(""+r).trim():e[t]=r+"px"}function iH(e,t,r){if(t!=null&&typeof t!="object")throw Error(Oe(62));if(e=e.style,r!=null){for(var a in r)!r.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var n in t)a=t[n],t.hasOwnProperty(n)&&r[n]!==a&&S9(e,n,a)}else for(var s in t)t.hasOwnProperty(s)&&S9(e,s,t[s])}function BD(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 P8e=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"]]),A8e=/^[\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 y1(e){return A8e.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function zu(){}var XM=null;function UD(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fy=null,wy=null;function T9(e){var t=jy(e);if(t&&(e=t.stateNode)){var r=e[Yi]||null;e:switch(e=t.stateNode,t.type){case"input":if(KM(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+dl(""+t)+'"][type="radio"]'),t=0;t<r.length;t++){var a=r[t];if(a!==e&&a.form===e.form){var n=a[Yi]||null;if(!n)throw Error(Oe(90));KM(a,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(t=0;t<r.length;t++)a=r[t],a.form===e.form&&rH(a)}break e;case"textarea":nH(e,r.value,r.defaultValue);break e;case"select":t=r.value,t!=null&&Ty(e,!!r.multiple,t,!1)}}}var cM=!1;function oH(e,t,r){if(cM)return e(t,r);cM=!0;try{var a=e(t);return a}finally{if(cM=!1,(fy!==null||wy!==null)&&(xE(),fy&&(t=fy,e=wy,wy=fy=null,T9(t),e)))for(t=0;t<e.length;t++)T9(e[t])}}function Nv(e,t){var r=e.stateNode;if(r===null)return null;var a=r[Yi]||null;if(a===null)return null;r=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(Oe(231,t,typeof r));return r}var Gu=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),YM=!1;if(Gu)try{ny={},Object.defineProperty(ny,"passive",{get:function(){YM=!0}}),window.addEventListener("test",ny,ny),window.removeEventListener("test",ny,ny)}catch{YM=!1}var ny,vf=null,jD=null,x1=null;function lH(){if(x1)return x1;var e,t=jD,r=t.length,a,n="value"in vf?vf.value:vf.textContent,s=n.length;for(e=0;e<r&&t[e]===n[e];e++);var i=r-e;for(a=1;a<=i&&t[r-a]===n[s-a];a++);return x1=n.slice(e,1<a?1-a:void 0)}function b1(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function a1(){return!0}function w9(){return!1}function Ji(e){function t(r,a,n,s,i){this._reactName=r,this._targetInst=n,this.type=a,this.nativeEvent=s,this.target=i,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(r=e[o],this[o]=r?r(s):s[o]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?a1:w9,this.isPropagationStopped=w9,this}return _a(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=a1)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=a1)},persist:function(){},isPersistent:a1}),t}var Fm={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},oE=Ji(Fm),Kv=_a({},Fm,{view:0,detail:0}),I8e=Ji(Kv),uM,dM,nv,lE=_a({},Kv,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zD,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!==nv&&(nv&&e.type==="mousemove"?(uM=e.screenX-nv.screenX,dM=e.screenY-nv.screenY):dM=uM=0,nv=e),uM)},movementY:function(e){return"movementY"in e?e.movementY:dM}}),C9=Ji(lE),N8e=_a({},lE,{dataTransfer:0}),L8e=Ji(N8e),R8e=_a({},Kv,{relatedTarget:0}),fM=Ji(R8e),k8e=_a({},Fm,{animationName:0,elapsedTime:0,pseudoElement:0}),M8e=Ji(k8e),D8e=_a({},Fm,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),_8e=Ji(D8e),O8e=_a({},Fm,{data:0}),E9=Ji(O8e),F8e={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},B8e={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"},U8e={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function j8e(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=U8e[e])?!!t[e]:!1}function zD(){return j8e}var z8e=_a({},Kv,{key:function(e){if(e.key){var t=F8e[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=b1(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?B8e[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zD,charCode:function(e){return e.type==="keypress"?b1(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?b1(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),V8e=Ji(z8e),q8e=_a({},lE,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),P9=Ji(q8e),H8e=_a({},Kv,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zD}),$8e=Ji(H8e),G8e=_a({},Fm,{propertyName:0,elapsedTime:0,pseudoElement:0}),K8e=Ji(G8e),W8e=_a({},lE,{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}),X8e=Ji(W8e),Y8e=_a({},Fm,{newState:0,oldState:0}),J8e=Ji(Y8e),Q8e=[9,13,27,32],VD=Gu&&"CompositionEvent"in window,hv=null;Gu&&"documentMode"in document&&(hv=document.documentMode);var Z8e=Gu&&"TextEvent"in window&&!hv,cH=Gu&&(!VD||hv&&8<hv&&11>=hv),A9=String.fromCharCode(32),I9=!1;function uH(e,t){switch(e){case"keyup":return Q8e.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dH(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var py=!1;function e6e(e,t){switch(e){case"compositionend":return dH(t);case"keypress":return t.which!==32?null:(I9=!0,A9);case"textInput":return e=t.data,e===A9&&I9?null:e;default:return null}}function t6e(e,t){if(py)return e==="compositionend"||!VD&&uH(e,t)?(e=lH(),x1=jD=vf=null,py=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return cH&&t.locale!=="ko"?null:t.data;default:return null}}var r6e={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 N9(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!r6e[e.type]:t==="textarea"}function fH(e,t,r,a){fy?wy?wy.push(a):wy=[a]:fy=a,t=Z1(t,"onChange"),0<t.length&&(r=new oE("onChange","change",null,r,a),e.push({event:r,listeners:t}))}var gv=null,Lv=null;function a6e(e){o$(e,0)}function cE(e){var t=fv(e);if(rH(t))return e}function L9(e,t){if(e==="change")return t}var pH=!1;Gu&&(Gu?(s1="oninput"in document,s1||(pM=document.createElement("div"),pM.setAttribute("oninput","return;"),s1=typeof pM.oninput=="function"),n1=s1):n1=!1,pH=n1&&(!document.documentMode||9<document.documentMode));var n1,s1,pM;function R9(){gv&&(gv.detachEvent("onpropertychange",mH),Lv=gv=null)}function mH(e){if(e.propertyName==="value"&&cE(Lv)){var t=[];fH(t,Lv,e,UD(e)),oH(a6e,t)}}function n6e(e,t,r){e==="focusin"?(R9(),gv=t,Lv=r,gv.attachEvent("onpropertychange",mH)):e==="focusout"&&R9()}function s6e(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return cE(Lv)}function i6e(e,t){if(e==="click")return cE(t)}function o6e(e,t){if(e==="input"||e==="change")return cE(t)}function l6e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Eo=typeof Object.is=="function"?Object.is:l6e;function Rv(e,t){if(Eo(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),a=Object.keys(t);if(r.length!==a.length)return!1;for(a=0;a<r.length;a++){var n=r[a];if(!HM.call(t,n)||!Eo(e[n],t[n]))return!1}return!0}function k9(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function M9(e,t){var r=k9(e);e=0;for(var a;r;){if(r.nodeType===3){if(a=e+r.textContent.length,e<=t&&a>=t)return{node:r,offset:t-e};e=a}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=k9(r)}}function hH(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?hH(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function gH(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=_1(e.document);t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=_1(e.document)}return t}function qD(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var c6e=Gu&&"documentMode"in document&&11>=document.documentMode,my=null,JM=null,yv=null,QM=!1;function D9(e,t,r){var a=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;QM||my==null||my!==_1(a)||(a=my,"selectionStart"in a&&qD(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),yv&&Rv(yv,a)||(yv=a,a=Z1(JM,"onSelect"),0<a.length&&(t=new oE("onSelect","select",null,t,r),e.push({event:t,listeners:a}),t.target=my)))}function Sm(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var hy={animationend:Sm("Animation","AnimationEnd"),animationiteration:Sm("Animation","AnimationIteration"),animationstart:Sm("Animation","AnimationStart"),transitionrun:Sm("Transition","TransitionRun"),transitionstart:Sm("Transition","TransitionStart"),transitioncancel:Sm("Transition","TransitionCancel"),transitionend:Sm("Transition","TransitionEnd")},mM={},yH={};Gu&&(yH=document.createElement("div").style,"AnimationEvent"in window||(delete hy.animationend.animation,delete hy.animationiteration.animation,delete hy.animationstart.animation),"TransitionEvent"in window||delete hy.transitionend.transition);function Bm(e){if(mM[e])return mM[e];if(!hy[e])return e;var t=hy[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in yH)return mM[e]=t[r];return e}var xH=Bm("animationend"),bH=Bm("animationiteration"),vH=Bm("animationstart"),u6e=Bm("transitionrun"),d6e=Bm("transitionstart"),f6e=Bm("transitioncancel"),SH=Bm("transitionend"),TH=new Map,ZM="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(" ");ZM.push("scrollEnd");function Xl(e,t){TH.set(e,t),Om(t,[e])}var O1=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}},ol=[],gy=0,HD=0;function uE(){for(var e=gy,t=HD=gy=0;t<e;){var r=ol[t];ol[t++]=null;var a=ol[t];ol[t++]=null;var n=ol[t];ol[t++]=null;var s=ol[t];if(ol[t++]=null,a!==null&&n!==null){var i=a.pending;i===null?n.next=n:(n.next=i.next,i.next=n),a.pending=n}s!==0&&wH(r,n,s)}}function dE(e,t,r,a){ol[gy++]=e,ol[gy++]=t,ol[gy++]=r,ol[gy++]=a,HD|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function $D(e,t,r,a){return dE(e,t,r,a),F1(e)}function Um(e,t){return dE(e,null,null,t),F1(e)}function wH(e,t,r){e.lanes|=r;var a=e.alternate;a!==null&&(a.lanes|=r);for(var n=!1,s=e.return;s!==null;)s.childLanes|=r,a=s.alternate,a!==null&&(a.childLanes|=r),s.tag===22&&(e=s.stateNode,e===null||e._visibility&1||(n=!0)),e=s,s=s.return;return e.tag===3?(s=e.stateNode,n&&t!==null&&(n=31-wo(r),e=s.hiddenUpdates,a=e[n],a===null?e[n]=[t]:a.push(t),t.lane=r|536870912),s):null}function F1(e){if(50<Pv)throw Pv=0,vD=null,Error(Oe(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var yy={};function p6e(e,t,r,a){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function bo(e,t,r,a){return new p6e(e,t,r,a)}function GD(e){return e=e.prototype,!(!e||!e.isReactComponent)}function qu(e,t){var r=e.alternate;return r===null?(r=bo(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function CH(e,t){e.flags&=65011714;var r=e.alternate;return r===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,t=r.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function v1(e,t,r,a,n,s){var i=0;if(a=e,typeof e=="function")GD(e)&&(i=1);else if(typeof e=="string")i=gUe(e,r,Uc.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case jM:return e=bo(31,r,t,n),e.elementType=jM,e.lanes=s,e;case cy:return Am(r.children,n,s,t);case qq:i=8,n|=24;break;case FM:return e=bo(12,r,t,n|2),e.elementType=FM,e.lanes=s,e;case BM:return e=bo(13,r,t,n),e.elementType=BM,e.lanes=s,e;case UM:return e=bo(19,r,t,n),e.elementType=UM,e.lanes=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ju:i=10;break e;case Hq:i=9;break e;case kD:i=11;break e;case MD:i=14;break e;case pf:i=16,a=null;break e}i=29,r=Error(Oe(130,e===null?"null":typeof e,"")),a=null}return t=bo(i,r,t,n),t.elementType=e,t.type=a,t.lanes=s,t}function Am(e,t,r,a){return e=bo(7,e,a,t),e.lanes=r,e}function hM(e,t,r){return e=bo(6,e,null,t),e.lanes=r,e}function EH(e){var t=bo(18,null,null,0);return t.stateNode=e,t}function gM(e,t,r){return t=bo(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var _9=new WeakMap;function fl(e,t){if(typeof e=="object"&&e!==null){var r=_9.get(e);return r!==void 0?r:(t={value:e,source:t,stack:g9(t)},_9.set(e,t),t)}return{value:e,source:t,stack:g9(t)}}var xy=[],by=0,B1=null,kv=0,cl=[],ul=0,Mf=null,Oc=1,Fc="";function Bu(e,t){xy[by++]=kv,xy[by++]=B1,B1=e,kv=t}function PH(e,t,r){cl[ul++]=Oc,cl[ul++]=Fc,cl[ul++]=Mf,Mf=e;var a=Oc;e=Fc;var n=32-wo(a)-1;a&=~(1<<n),r+=1;var s=32-wo(t)+n;if(30<s){var i=n-n%5;s=(a&(1<<i)-1).toString(32),a>>=i,n-=i,Oc=1<<32-wo(t)+n|r<<n|a,Fc=s+e}else Oc=1<<s|r<<n|a,Fc=e}function KD(e){e.return!==null&&(Bu(e,1),PH(e,1,0))}function WD(e){for(;e===B1;)B1=xy[--by],xy[by]=null,kv=xy[--by],xy[by]=null;for(;e===Mf;)Mf=cl[--ul],cl[ul]=null,Fc=cl[--ul],cl[ul]=null,Oc=cl[--ul],cl[ul]=null}function AH(e,t){cl[ul++]=Oc,cl[ul++]=Fc,cl[ul++]=Mf,Oc=t.id,Fc=t.overflow,Mf=e}var Fs=null,Da=null,Or=!1,Ef=null,pl=!1,eD=Error(Oe(519));function Df(e){var t=Error(Oe(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Mv(fl(t,e)),eD}function O9(e){var t=e.stateNode,r=e.type,a=e.memoizedProps;switch(t[Os]=e,t[Yi]=a,r){case"dialog":Ar("cancel",t),Ar("close",t);break;case"iframe":case"object":case"embed":Ar("load",t);break;case"video":case"audio":for(r=0;r<Fv.length;r++)Ar(Fv[r],t);break;case"source":Ar("error",t);break;case"img":case"image":case"link":Ar("error",t),Ar("load",t);break;case"details":Ar("toggle",t);break;case"input":Ar("invalid",t),aH(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Ar("invalid",t);break;case"textarea":Ar("invalid",t),sH(t,a.value,a.defaultValue,a.children)}r=a.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||t.textContent===""+r||a.suppressHydrationWarning===!0||c$(t.textContent,r)?(a.popover!=null&&(Ar("beforetoggle",t),Ar("toggle",t)),a.onScroll!=null&&Ar("scroll",t),a.onScrollEnd!=null&&Ar("scrollend",t),a.onClick!=null&&(t.onclick=zu),t=!0):t=!1,t||Df(e,!0)}function F9(e){for(Fs=e.return;Fs;)switch(Fs.tag){case 5:case 31:case 13:pl=!1;return;case 27:case 3:pl=!0;return;default:Fs=Fs.return}}function sy(e){if(e!==Fs)return!1;if(!Or)return F9(e),Or=!0,!1;var t=e.tag,r;if((r=t!==3&&t!==27)&&((r=t===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||ED(e.type,e.memoizedProps)),r=!r),r&&Da&&Df(e),F9(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Oe(317));Da=Eq(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Oe(317));Da=Eq(e)}else t===27?(t=Da,Bf(e.type)?(e=ND,ND=null,Da=e):Da=t):Da=Fs?hl(e.stateNode.nextSibling):null;return!0}function Rm(){Da=Fs=null,Or=!1}function yM(){var e=Ef;return e!==null&&(Wi===null?Wi=e:Wi.push.apply(Wi,e),Ef=null),e}function Mv(e){Ef===null?Ef=[e]:Ef.push(e)}var tD=jc(null),jm=null,Vu=null;function hf(e,t,r){wa(tD,t._currentValue),t._currentValue=r}function Hu(e){e._currentValue=tD.current,Ss(tD)}function rD(e,t,r){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===r)break;e=e.return}}function aD(e,t,r,a){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var s=n.dependencies;if(s!==null){var i=n.child;s=s.firstContext;e:for(;s!==null;){var o=s;s=n;for(var l=0;l<t.length;l++)if(o.context===t[l]){s.lanes|=r,o=s.alternate,o!==null&&(o.lanes|=r),rD(s.return,r,e),a||(i=null);break e}s=o.next}}else if(n.tag===18){if(i=n.return,i===null)throw Error(Oe(341));i.lanes|=r,s=i.alternate,s!==null&&(s.lanes|=r),rD(i,r,e),i=null}else i=n.child;if(i!==null)i.return=n;else for(i=n;i!==null;){if(i===e){i=null;break}if(n=i.sibling,n!==null){n.return=i.return,i=n;break}i=i.return}n=i}}function zy(e,t,r,a){e=null;for(var n=t,s=!1;n!==null;){if(!s){if(n.flags&524288)s=!0;else if(n.flags&262144)break}if(n.tag===10){var i=n.alternate;if(i===null)throw Error(Oe(387));if(i=i.memoizedProps,i!==null){var o=n.type;Eo(n.pendingProps.value,i.value)||(e!==null?e.push(o):e=[o])}}else if(n===R1.current){if(i=n.alternate,i===null)throw Error(Oe(387));i.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(Uv):e=[Uv])}n=n.return}e!==null&&aD(t,e,r,a),t.flags|=262144}function U1(e){for(e=e.firstContext;e!==null;){if(!Eo(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function km(e){jm=e,Vu=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Bs(e){return IH(jm,e)}function i1(e,t){return jm===null&&km(e),IH(e,t)}function IH(e,t){var r=t._currentValue;if(t={context:t,memoizedValue:r,next:null},Vu===null){if(e===null)throw Error(Oe(308));Vu=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Vu=Vu.next=t;return r}var m6e=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(r,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(r){return r()})}},h6e=Zn.unstable_scheduleCallback,g6e=Zn.unstable_NormalPriority,_n={$$typeof:ju,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function XD(){return{controller:new m6e,data:new Map,refCount:0}}function Wv(e){e.refCount--,e.refCount===0&&h6e(g6e,function(){e.controller.abort()})}var xv=null,nD=0,Ry=0,Cy=null;function y6e(e,t){if(xv===null){var r=xv=[];nD=0,Ry=v_(),Cy={status:"pending",value:void 0,then:function(a){r.push(a)}}}return nD++,t.then(B9,B9),t}function B9(){if(--nD===0&&xv!==null){Cy!==null&&(Cy.status="fulfilled");var e=xv;xv=null,Ry=0,Cy=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function x6e(e,t){var r=[],a={status:"pending",value:null,reason:null,then:function(n){r.push(n)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var n=0;n<r.length;n++)(0,r[n])(t)},function(n){for(a.status="rejected",a.reason=n,n=0;n<r.length;n++)(0,r[n])(void 0)}),a}var U9=Wt.S;Wt.S=function(e,t){V7=So(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&y6e(e,t),U9!==null&&U9(e,t)};var Im=jc(null);function YD(){var e=Im.current;return e!==null?e:ga.pooledCache}function S1(e,t){t===null?wa(Im,Im.current):wa(Im,t.pool)}function NH(){var e=YD();return e===null?null:{parent:_n._currentValue,pool:e}}var Vy=Error(Oe(460)),JD=Error(Oe(474)),fE=Error(Oe(542)),j1={then:function(){}};function j9(e){return e=e.status,e==="fulfilled"||e==="rejected"}function LH(e,t,r){switch(r=e[r],r===void 0?e.push(t):r!==t&&(t.then(zu,zu),t=r),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,V9(e),e;default:if(typeof t.status=="string")t.then(zu,zu);else{if(e=ga,e!==null&&100<e.shellSuspendCounter)throw Error(Oe(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var n=t;n.status="fulfilled",n.value=a}},function(a){if(t.status==="pending"){var n=t;n.status="rejected",n.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,V9(e),e}throw Nm=t,Vy}}function Cm(e){try{var t=e._init;return t(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(Nm=r,Vy):r}}var Nm=null;function z9(){if(Nm===null)throw Error(Oe(459));var e=Nm;return Nm=null,e}function V9(e){if(e===Vy||e===fE)throw Error(Oe(483))}var Ey=null,Dv=0;function o1(e){var t=Dv;return Dv+=1,Ey===null&&(Ey=[]),LH(Ey,e,t)}function sv(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function l1(e,t){throw t.$$typeof===n8e?Error(Oe(525)):(e=Object.prototype.toString.call(t),Error(Oe(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function RH(e){function t(g,y){if(e){var b=g.deletions;b===null?(g.deletions=[y],g.flags|=16):b.push(y)}}function r(g,y){if(!e)return null;for(;y!==null;)t(g,y),y=y.sibling;return null}function a(g){for(var y=new Map;g!==null;)g.key!==null?y.set(g.key,g):y.set(g.index,g),g=g.sibling;return y}function n(g,y){return g=qu(g,y),g.index=0,g.sibling=null,g}function s(g,y,b){return g.index=b,e?(b=g.alternate,b!==null?(b=b.index,b<y?(g.flags|=67108866,y):b):(g.flags|=67108866,y)):(g.flags|=1048576,y)}function i(g){return e&&g.alternate===null&&(g.flags|=67108866),g}function o(g,y,b,S){return y===null||y.tag!==6?(y=hM(b,g.mode,S),y.return=g,y):(y=n(y,b),y.return=g,y)}function l(g,y,b,S){var w=b.type;return w===cy?u(g,y,b.props.children,S,b.key):y!==null&&(y.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===pf&&Cm(w)===y.type)?(y=n(y,b.props),sv(y,b),y.return=g,y):(y=v1(b.type,b.key,b.props,null,g.mode,S),sv(y,b),y.return=g,y)}function c(g,y,b,S){return y===null||y.tag!==4||y.stateNode.containerInfo!==b.containerInfo||y.stateNode.implementation!==b.implementation?(y=gM(b,g.mode,S),y.return=g,y):(y=n(y,b.children||[]),y.return=g,y)}function u(g,y,b,S,w){return y===null||y.tag!==7?(y=Am(b,g.mode,S,w),y.return=g,y):(y=n(y,b),y.return=g,y)}function d(g,y,b){if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return y=hM(""+y,g.mode,b),y.return=g,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case QC:return b=v1(y.type,y.key,y.props,null,g.mode,b),sv(b,y),b.return=g,b;case uv:return y=gM(y,g.mode,b),y.return=g,y;case pf:return y=Cm(y),d(g,y,b)}if(dv(y)||av(y))return y=Am(y,g.mode,b,null),y.return=g,y;if(typeof y.then=="function")return d(g,o1(y),b);if(y.$$typeof===ju)return d(g,i1(g,y),b);l1(g,y)}return null}function f(g,y,b,S){var w=y!==null?y.key:null;if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return w!==null?null:o(g,y,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case QC:return b.key===w?l(g,y,b,S):null;case uv:return b.key===w?c(g,y,b,S):null;case pf:return b=Cm(b),f(g,y,b,S)}if(dv(b)||av(b))return w!==null?null:u(g,y,b,S,null);if(typeof b.then=="function")return f(g,y,o1(b),S);if(b.$$typeof===ju)return f(g,y,i1(g,b),S);l1(g,b)}return null}function p(g,y,b,S,w){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return g=g.get(b)||null,o(y,g,""+S,w);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case QC:return g=g.get(S.key===null?b:S.key)||null,l(y,g,S,w);case uv:return g=g.get(S.key===null?b:S.key)||null,c(y,g,S,w);case pf:return S=Cm(S),p(g,y,b,S,w)}if(dv(S)||av(S))return g=g.get(b)||null,u(y,g,S,w,null);if(typeof S.then=="function")return p(g,y,b,o1(S),w);if(S.$$typeof===ju)return p(g,y,b,i1(y,S),w);l1(y,S)}return null}function m(g,y,b,S){for(var w=null,P=null,C=y,I=y=0,R=null;C!==null&&I<b.length;I++){C.index>I?(R=C,C=null):R=C.sibling;var O=f(g,C,b[I],S);if(O===null){C===null&&(C=R);break}e&&C&&O.alternate===null&&t(g,C),y=s(O,y,I),P===null?w=O:P.sibling=O,P=O,C=R}if(I===b.length)return r(g,C),Or&&Bu(g,I),w;if(C===null){for(;I<b.length;I++)C=d(g,b[I],S),C!==null&&(y=s(C,y,I),P===null?w=C:P.sibling=C,P=C);return Or&&Bu(g,I),w}for(C=a(C);I<b.length;I++)R=p(C,g,I,b[I],S),R!==null&&(e&&R.alternate!==null&&C.delete(R.key===null?I:R.key),y=s(R,y,I),P===null?w=R:P.sibling=R,P=R);return e&&C.forEach(function(D){return t(g,D)}),Or&&Bu(g,I),w}function h(g,y,b,S){if(b==null)throw Error(Oe(151));for(var w=null,P=null,C=y,I=y=0,R=null,O=b.next();C!==null&&!O.done;I++,O=b.next()){C.index>I?(R=C,C=null):R=C.sibling;var D=f(g,C,O.value,S);if(D===null){C===null&&(C=R);break}e&&C&&D.alternate===null&&t(g,C),y=s(D,y,I),P===null?w=D:P.sibling=D,P=D,C=R}if(O.done)return r(g,C),Or&&Bu(g,I),w;if(C===null){for(;!O.done;I++,O=b.next())O=d(g,O.value,S),O!==null&&(y=s(O,y,I),P===null?w=O:P.sibling=O,P=O);return Or&&Bu(g,I),w}for(C=a(C);!O.done;I++,O=b.next())O=p(C,g,I,O.value,S),O!==null&&(e&&O.alternate!==null&&C.delete(O.key===null?I:O.key),y=s(O,y,I),P===null?w=O:P.sibling=O,P=O);return e&&C.forEach(function(W){return t(g,W)}),Or&&Bu(g,I),w}function x(g,y,b,S){if(typeof b=="object"&&b!==null&&b.type===cy&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case QC:e:{for(var w=b.key;y!==null;){if(y.key===w){if(w=b.type,w===cy){if(y.tag===7){r(g,y.sibling),S=n(y,b.props.children),S.return=g,g=S;break e}}else if(y.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===pf&&Cm(w)===y.type){r(g,y.sibling),S=n(y,b.props),sv(S,b),S.return=g,g=S;break e}r(g,y);break}else t(g,y);y=y.sibling}b.type===cy?(S=Am(b.props.children,g.mode,S,b.key),S.return=g,g=S):(S=v1(b.type,b.key,b.props,null,g.mode,S),sv(S,b),S.return=g,g=S)}return i(g);case uv:e:{for(w=b.key;y!==null;){if(y.key===w)if(y.tag===4&&y.stateNode.containerInfo===b.containerInfo&&y.stateNode.implementation===b.implementation){r(g,y.sibling),S=n(y,b.children||[]),S.return=g,g=S;break e}else{r(g,y);break}else t(g,y);y=y.sibling}S=gM(b,g.mode,S),S.return=g,g=S}return i(g);case pf:return b=Cm(b),x(g,y,b,S)}if(dv(b))return m(g,y,b,S);if(av(b)){if(w=av(b),typeof w!="function")throw Error(Oe(150));return b=w.call(b),h(g,y,b,S)}if(typeof b.then=="function")return x(g,y,o1(b),S);if(b.$$typeof===ju)return x(g,y,i1(g,b),S);l1(g,b)}return typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint"?(b=""+b,y!==null&&y.tag===6?(r(g,y.sibling),S=n(y,b),S.return=g,g=S):(r(g,y),S=hM(b,g.mode,S),S.return=g,g=S),i(g)):r(g,y)}return function(g,y,b,S){try{Dv=0;var w=x(g,y,b,S);return Ey=null,w}catch(C){if(C===Vy||C===fE)throw C;var P=bo(29,C,null,g.mode);return P.lanes=S,P.return=g,P}finally{}}}var Mm=RH(!0),kH=RH(!1),mf=!1;function QD(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function sD(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Pf(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Af(e,t,r){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,ea&2){var n=a.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),a.pending=t,t=F1(e),wH(e,null,r),t}return dE(e,a,t,r),F1(e)}function bv(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,r|=a,t.lanes=r,Yq(e,r)}}function xM(e,t){var r=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,r===a)){var n=null,s=null;if(r=r.firstBaseUpdate,r!==null){do{var i={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};s===null?n=s=i:s=s.next=i,r=r.next}while(r!==null);s===null?n=s=t:s=s.next=t}else n=s=t;r={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:s,shared:a.shared,callbacks:a.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}var iD=!1;function vv(){if(iD){var e=Cy;if(e!==null)throw e}}function Sv(e,t,r,a){iD=!1;var n=e.updateQueue;mf=!1;var s=n.firstBaseUpdate,i=n.lastBaseUpdate,o=n.shared.pending;if(o!==null){n.shared.pending=null;var l=o,c=l.next;l.next=null,i===null?s=c:i.next=c,i=l;var u=e.alternate;u!==null&&(u=u.updateQueue,o=u.lastBaseUpdate,o!==i&&(o===null?u.firstBaseUpdate=c:o.next=c,u.lastBaseUpdate=l))}if(s!==null){var d=n.baseState;i=0,u=c=l=null,o=s;do{var f=o.lane&-536870913,p=f!==o.lane;if(p?(Mr&f)===f:(a&f)===f){f!==0&&f===Ry&&(iD=!0),u!==null&&(u=u.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var m=e,h=o;f=t;var x=r;switch(h.tag){case 1:if(m=h.payload,typeof m=="function"){d=m.call(x,d,f);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m=="function"?m.call(x,d,f):m,f==null)break e;d=_a({},d,f);break e;case 2:mf=!0}}f=o.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=n.callbacks,p===null?n.callbacks=[f]:p.push(f))}else p={lane:f,tag:o.tag,payload:o.payload,callback:o.callback,next:null},u===null?(c=u=p,l=d):u=u.next=p,i|=f;if(o=o.next,o===null){if(o=n.shared.pending,o===null)break;p=o,o=p.next,p.next=null,n.lastBaseUpdate=p,n.shared.pending=null}}while(1);u===null&&(l=d),n.baseState=l,n.firstBaseUpdate=c,n.lastBaseUpdate=u,s===null&&(n.shared.lanes=0),Of|=i,e.lanes=i,e.memoizedState=d}}function MH(e,t){if(typeof e!="function")throw Error(Oe(191,e));e.call(t)}function DH(e,t){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)MH(r[e],t)}var ky=jc(null),z1=jc(0);function q9(e,t){e=Yu,wa(z1,e),wa(ky,t),Yu=e|t.baseLanes}function oD(){wa(z1,Yu),wa(ky,ky.current)}function ZD(){Yu=z1.current,Ss(ky),Ss(z1)}var Po=jc(null),ml=null;function gf(e){var t=e.alternate;wa(wn,wn.current&1),wa(Po,e),ml===null&&(t===null||ky.current!==null||t.memoizedState!==null)&&(ml=e)}function lD(e){wa(wn,wn.current),wa(Po,e),ml===null&&(ml=e)}function _H(e){e.tag===22?(wa(wn,wn.current),wa(Po,e),ml===null&&(ml=e)):yf(e)}function yf(){wa(wn,wn.current),wa(Po,Po.current)}function xo(e){Ss(Po),ml===e&&(ml=null),Ss(wn)}var wn=jc(0);function V1(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||AD(r)||ID(r)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ku=0,pr=null,ma=null,Mn=null,q1=!1,Py=!1,Dm=!1,H1=0,_v=0,Ay=null,b6e=0;function un(){throw Error(Oe(321))}function e_(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Eo(e[r],t[r]))return!1;return!0}function t_(e,t,r,a,n,s){return Ku=s,pr=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Wt.H=e===null||e.memoizedState===null?f7:f_,Dm=!1,s=r(a,n),Dm=!1,Py&&(s=FH(t,r,a,n)),OH(e),s}function OH(e){Wt.H=Ov;var t=ma!==null&&ma.next!==null;if(Ku=0,Mn=ma=pr=null,q1=!1,_v=0,Ay=null,t)throw Error(Oe(300));e===null||On||(e=e.dependencies,e!==null&&U1(e)&&(On=!0))}function FH(e,t,r,a){pr=e;var n=0;do{if(Py&&(Ay=null),_v=0,Py=!1,25<=n)throw Error(Oe(301));if(n+=1,Mn=ma=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}Wt.H=p7,s=t(r,a)}while(Py);return s}function v6e(){var e=Wt.H,t=e.useState()[0];return t=typeof t.then=="function"?Xv(t):t,e=e.useState()[0],(ma!==null?ma.memoizedState:null)!==e&&(pr.flags|=1024),t}function r_(){var e=H1!==0;return H1=0,e}function a_(e,t,r){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r}function n_(e){if(q1){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}q1=!1}Ku=0,Mn=ma=pr=null,Py=!1,_v=H1=0,Ay=null}function Si(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mn===null?pr.memoizedState=Mn=e:Mn=Mn.next=e,Mn}function Cn(){if(ma===null){var e=pr.alternate;e=e!==null?e.memoizedState:null}else e=ma.next;var t=Mn===null?pr.memoizedState:Mn.next;if(t!==null)Mn=t,ma=e;else{if(e===null)throw pr.alternate===null?Error(Oe(467)):Error(Oe(310));ma=e,e={memoizedState:ma.memoizedState,baseState:ma.baseState,baseQueue:ma.baseQueue,queue:ma.queue,next:null},Mn===null?pr.memoizedState=Mn=e:Mn=Mn.next=e}return Mn}function pE(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Xv(e){var t=_v;return _v+=1,Ay===null&&(Ay=[]),e=LH(Ay,e,t),t=pr,(Mn===null?t.memoizedState:Mn.next)===null&&(t=t.alternate,Wt.H=t===null||t.memoizedState===null?f7:f_),e}function mE(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Xv(e);if(e.$$typeof===ju)return Bs(e)}throw Error(Oe(438,String(e)))}function s_(e){var t=null,r=pr.updateQueue;if(r!==null&&(t=r.memoCache),t==null){var a=pr.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),r===null&&(r=pE(),pr.updateQueue=r),r.memoCache=t,r=t.data[t.index],r===void 0)for(r=t.data[t.index]=Array(e),a=0;a<e;a++)r[a]=s8e;return t.index++,r}function Wu(e,t){return typeof t=="function"?t(e):t}function T1(e){var t=Cn();return i_(t,ma,e)}function i_(e,t,r){var a=e.queue;if(a===null)throw Error(Oe(311));a.lastRenderedReducer=r;var n=e.baseQueue,s=a.pending;if(s!==null){if(n!==null){var i=n.next;n.next=s.next,s.next=i}t.baseQueue=n=s,a.pending=null}if(s=e.baseState,n===null)e.memoizedState=s;else{t=n.next;var o=i=null,l=null,c=t,u=!1;do{var d=c.lane&-536870913;if(d!==c.lane?(Mr&d)===d:(Ku&d)===d){var f=c.revertLane;if(f===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),d===Ry&&(u=!0);else if((Ku&f)===f){c=c.next,f===Ry&&(u=!0);continue}else d={lane:0,revertLane:c.revertLane,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},l===null?(o=l=d,i=s):l=l.next=d,pr.lanes|=f,Of|=f;d=c.action,Dm&&r(s,d),s=c.hasEagerState?c.eagerState:r(s,d)}else f={lane:d,revertLane:c.revertLane,gesture:c.gesture,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},l===null?(o=l=f,i=s):l=l.next=f,pr.lanes|=d,Of|=d;c=c.next}while(c!==null&&c!==t);if(l===null?i=s:l.next=o,!Eo(s,e.memoizedState)&&(On=!0,u&&(r=Cy,r!==null)))throw r;e.memoizedState=s,e.baseState=i,e.baseQueue=l,a.lastRenderedState=s}return n===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function bM(e){var t=Cn(),r=t.queue;if(r===null)throw Error(Oe(311));r.lastRenderedReducer=e;var a=r.dispatch,n=r.pending,s=t.memoizedState;if(n!==null){r.pending=null;var i=n=n.next;do s=e(s,i.action),i=i.next;while(i!==n);Eo(s,t.memoizedState)||(On=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),r.lastRenderedState=s}return[s,a]}function BH(e,t,r){var a=pr,n=Cn(),s=Or;if(s){if(r===void 0)throw Error(Oe(407));r=r()}else r=t();var i=!Eo((ma||n).memoizedState,r);if(i&&(n.memoizedState=r,On=!0),n=n.queue,o_(zH.bind(null,a,n,e),[e]),n.getSnapshot!==t||i||Mn!==null&&Mn.memoizedState.tag&1){if(a.flags|=2048,My(9,{destroy:void 0},jH.bind(null,a,n,r,t),null),ga===null)throw Error(Oe(349));s||Ku&127||UH(a,t,r)}return r}function UH(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=pr.updateQueue,t===null?(t=pE(),pr.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function jH(e,t,r,a){t.value=r,t.getSnapshot=a,VH(t)&&qH(e)}function zH(e,t,r){return r(function(){VH(t)&&qH(e)})}function VH(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Eo(e,r)}catch{return!0}}function qH(e){var t=Um(e,2);t!==null&&Xi(t,e,2)}function cD(e){var t=Si();if(typeof e=="function"){var r=e;if(e=r(),Dm){bf(!0);try{r()}finally{bf(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wu,lastRenderedState:e},t}function HH(e,t,r,a){return e.baseState=r,i_(e,ma,typeof a=="function"?a:Wu)}function S6e(e,t,r,a,n){if(gE(e))throw Error(Oe(485));if(e=t.action,e!==null){var s={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(i){s.listeners.push(i)}};Wt.T!==null?r(!0):s.isTransition=!1,a(s),r=t.pending,r===null?(s.next=t.pending=s,$H(t,s)):(s.next=r.next,t.pending=r.next=s)}}function $H(e,t){var r=t.action,a=t.payload,n=e.state;if(t.isTransition){var s=Wt.T,i={};Wt.T=i;try{var o=r(n,a),l=Wt.S;l!==null&&l(i,o),H9(e,t,o)}catch(c){uD(e,t,c)}finally{s!==null&&i.types!==null&&(s.types=i.types),Wt.T=s}}else try{s=r(n,a),H9(e,t,s)}catch(c){uD(e,t,c)}}function H9(e,t,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(a){$9(e,t,a)},function(a){return uD(e,t,a)}):$9(e,t,r)}function $9(e,t,r){t.status="fulfilled",t.value=r,GH(t),e.state=r,t=e.pending,t!==null&&(r=t.next,r===t?e.pending=null:(r=r.next,t.next=r,$H(e,r)))}function uD(e,t,r){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=r,GH(t),t=t.next;while(t!==a)}e.action=null}function GH(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function KH(e,t){return t}function G9(e,t){if(Or){var r=ga.formState;if(r!==null){e:{var a=pr;if(Or){if(Da){t:{for(var n=Da,s=pl;n.nodeType!==8;){if(!s){n=null;break t}if(n=hl(n.nextSibling),n===null){n=null;break t}}s=n.data,n=s==="F!"||s==="F"?n:null}if(n){Da=hl(n.nextSibling),a=n.data==="F!";break e}}Df(a)}a=!1}a&&(t=r[0])}}return r=Si(),r.memoizedState=r.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:KH,lastRenderedState:t},r.queue=a,r=c7.bind(null,pr,a),a.dispatch=r,a=cD(!1),s=d_.bind(null,pr,!1,a.queue),a=Si(),n={state:t,dispatch:null,action:e,pending:null},a.queue=n,r=S6e.bind(null,pr,n,s,r),n.dispatch=r,a.memoizedState=e,[t,r,!1]}function K9(e){var t=Cn();return WH(t,ma,e)}function WH(e,t,r){if(t=i_(e,t,KH)[0],e=T1(Wu)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Xv(t)}catch(i){throw i===Vy?fE:i}else a=t;t=Cn();var n=t.queue,s=n.dispatch;return r!==t.memoizedState&&(pr.flags|=2048,My(9,{destroy:void 0},T6e.bind(null,n,r),null)),[a,s,e]}function T6e(e,t){e.action=t}function W9(e){var t=Cn(),r=ma;if(r!==null)return WH(t,r,e);Cn(),t=t.memoizedState,r=Cn();var a=r.queue.dispatch;return r.memoizedState=e,[t,a,!1]}function My(e,t,r,a){return e={tag:e,create:r,deps:a,inst:t,next:null},t=pr.updateQueue,t===null&&(t=pE(),pr.updateQueue=t),r=t.lastEffect,r===null?t.lastEffect=e.next=e:(a=r.next,r.next=e,e.next=a,t.lastEffect=e),e}function XH(){return Cn().memoizedState}function w1(e,t,r,a){var n=Si();pr.flags|=e,n.memoizedState=My(1|t,{destroy:void 0},r,a===void 0?null:a)}function hE(e,t,r,a){var n=Cn();a=a===void 0?null:a;var s=n.memoizedState.inst;ma!==null&&a!==null&&e_(a,ma.memoizedState.deps)?n.memoizedState=My(t,s,r,a):(pr.flags|=e,n.memoizedState=My(1|t,s,r,a))}function X9(e,t){w1(8390656,8,e,t)}function o_(e,t){hE(2048,8,e,t)}function w6e(e){pr.flags|=4;var t=pr.updateQueue;if(t===null)t=pE(),pr.updateQueue=t,t.events=[e];else{var r=t.events;r===null?t.events=[e]:r.push(e)}}function YH(e){var t=Cn().memoizedState;return w6e({ref:t,nextImpl:e}),function(){if(ea&2)throw Error(Oe(440));return t.impl.apply(void 0,arguments)}}function JH(e,t){return hE(4,2,e,t)}function QH(e,t){return hE(4,4,e,t)}function ZH(e,t){if(typeof t=="function"){e=e();var r=t(e);return function(){typeof r=="function"?r():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function e7(e,t,r){r=r!=null?r.concat([e]):null,hE(4,4,ZH.bind(null,t,e),r)}function l_(){}function t7(e,t){var r=Cn();t=t===void 0?null:t;var a=r.memoizedState;return t!==null&&e_(t,a[1])?a[0]:(r.memoizedState=[e,t],e)}function r7(e,t){var r=Cn();t=t===void 0?null:t;var a=r.memoizedState;if(t!==null&&e_(t,a[1]))return a[0];if(a=e(),Dm){bf(!0);try{e()}finally{bf(!1)}}return r.memoizedState=[a,t],a}function c_(e,t,r){return r===void 0||Ku&1073741824&&!(Mr&261930)?e.memoizedState=t:(e.memoizedState=r,e=H7(),pr.lanes|=e,Of|=e,r)}function a7(e,t,r,a){return Eo(r,t)?r:ky.current!==null?(e=c_(e,r,a),Eo(e,t)||(On=!0),e):!(Ku&42)||Ku&1073741824&&!(Mr&261930)?(On=!0,e.memoizedState=r):(e=H7(),pr.lanes|=e,Of|=e,t)}function n7(e,t,r,a,n){var s=ta.p;ta.p=s!==0&&8>s?s:8;var i=Wt.T,o={};Wt.T=o,d_(e,!1,t,r);try{var l=n(),c=Wt.S;if(c!==null&&c(o,l),l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=x6e(l,a);Tv(e,t,u,Co(e))}else Tv(e,t,a,Co(e))}catch(d){Tv(e,t,{then:function(){},status:"rejected",reason:d},Co())}finally{ta.p=s,i!==null&&o.types!==null&&(i.types=o.types),Wt.T=i}}function C6e(){}function dD(e,t,r,a){if(e.tag!==5)throw Error(Oe(476));var n=s7(e).queue;n7(e,n,t,Pm,r===null?C6e:function(){return i7(e),r(a)})}function s7(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Pm,baseState:Pm,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wu,lastRenderedState:Pm},next:null};var r={};return t.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wu,lastRenderedState:r},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function i7(e){var t=s7(e);t.next===null&&(t=e.alternate.memoizedState),Tv(e,t.next.queue,{},Co())}function u_(){return Bs(Uv)}function o7(){return Cn().memoizedState}function l7(){return Cn().memoizedState}function E6e(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var r=Co();e=Pf(r);var a=Af(t,e,r);a!==null&&(Xi(a,t,r),bv(a,t,r)),t={cache:XD()},e.payload=t;return}t=t.return}}function P6e(e,t,r){var a=Co();r={lane:a,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},gE(e)?u7(t,r):(r=$D(e,t,r,a),r!==null&&(Xi(r,e,a),d7(r,t,a)))}function c7(e,t,r){var a=Co();Tv(e,t,r,a)}function Tv(e,t,r,a){var n={lane:a,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(gE(e))u7(t,n);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var i=t.lastRenderedState,o=s(i,r);if(n.hasEagerState=!0,n.eagerState=o,Eo(o,i))return dE(e,t,n,0),ga===null&&uE(),!1}catch{}finally{}if(r=$D(e,t,n,a),r!==null)return Xi(r,e,a),d7(r,t,a),!0}return!1}function d_(e,t,r,a){if(a={lane:2,revertLane:v_(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},gE(e)){if(t)throw Error(Oe(479))}else t=$D(e,r,a,2),t!==null&&Xi(t,e,2)}function gE(e){var t=e.alternate;return e===pr||t!==null&&t===pr}function u7(e,t){Py=q1=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function d7(e,t,r){if(r&4194048){var a=t.lanes;a&=e.pendingLanes,r|=a,t.lanes=r,Yq(e,r)}}var Ov={readContext:Bs,use:mE,useCallback:un,useContext:un,useEffect:un,useImperativeHandle:un,useLayoutEffect:un,useInsertionEffect:un,useMemo:un,useReducer:un,useRef:un,useState:un,useDebugValue:un,useDeferredValue:un,useTransition:un,useSyncExternalStore:un,useId:un,useHostTransitionStatus:un,useFormState:un,useActionState:un,useOptimistic:un,useMemoCache:un,useCacheRefresh:un};Ov.useEffectEvent=un;var f7={readContext:Bs,use:mE,useCallback:function(e,t){return Si().memoizedState=[e,t===void 0?null:t],e},useContext:Bs,useEffect:X9,useImperativeHandle:function(e,t,r){r=r!=null?r.concat([e]):null,w1(4194308,4,ZH.bind(null,t,e),r)},useLayoutEffect:function(e,t){return w1(4194308,4,e,t)},useInsertionEffect:function(e,t){w1(4,2,e,t)},useMemo:function(e,t){var r=Si();t=t===void 0?null:t;var a=e();if(Dm){bf(!0);try{e()}finally{bf(!1)}}return r.memoizedState=[a,t],a},useReducer:function(e,t,r){var a=Si();if(r!==void 0){var n=r(t);if(Dm){bf(!0);try{r(t)}finally{bf(!1)}}}else n=t;return a.memoizedState=a.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=P6e.bind(null,pr,e),[a.memoizedState,e]},useRef:function(e){var t=Si();return e={current:e},t.memoizedState=e},useState:function(e){e=cD(e);var t=e.queue,r=c7.bind(null,pr,t);return t.dispatch=r,[e.memoizedState,r]},useDebugValue:l_,useDeferredValue:function(e,t){var r=Si();return c_(r,e,t)},useTransition:function(){var e=cD(!1);return e=n7.bind(null,pr,e.queue,!0,!1),Si().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,r){var a=pr,n=Si();if(Or){if(r===void 0)throw Error(Oe(407));r=r()}else{if(r=t(),ga===null)throw Error(Oe(349));Mr&127||UH(a,t,r)}n.memoizedState=r;var s={value:r,getSnapshot:t};return n.queue=s,X9(zH.bind(null,a,s,e),[e]),a.flags|=2048,My(9,{destroy:void 0},jH.bind(null,a,s,r,t),null),r},useId:function(){var e=Si(),t=ga.identifierPrefix;if(Or){var r=Fc,a=Oc;r=(a&~(1<<32-wo(a)-1)).toString(32)+r,t="_"+t+"R_"+r,r=H1++,0<r&&(t+="H"+r.toString(32)),t+="_"}else r=b6e++,t="_"+t+"r_"+r.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:u_,useFormState:G9,useActionState:G9,useOptimistic:function(e){var t=Si();t.memoizedState=t.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=r,t=d_.bind(null,pr,!0,r),r.dispatch=t,[e,t]},useMemoCache:s_,useCacheRefresh:function(){return Si().memoizedState=E6e.bind(null,pr)},useEffectEvent:function(e){var t=Si(),r={impl:e};return t.memoizedState=r,function(){if(ea&2)throw Error(Oe(440));return r.impl.apply(void 0,arguments)}}},f_={readContext:Bs,use:mE,useCallback:t7,useContext:Bs,useEffect:o_,useImperativeHandle:e7,useInsertionEffect:JH,useLayoutEffect:QH,useMemo:r7,useReducer:T1,useRef:XH,useState:function(){return T1(Wu)},useDebugValue:l_,useDeferredValue:function(e,t){var r=Cn();return a7(r,ma.memoizedState,e,t)},useTransition:function(){var e=T1(Wu)[0],t=Cn().memoizedState;return[typeof e=="boolean"?e:Xv(e),t]},useSyncExternalStore:BH,useId:o7,useHostTransitionStatus:u_,useFormState:K9,useActionState:K9,useOptimistic:function(e,t){var r=Cn();return HH(r,ma,e,t)},useMemoCache:s_,useCacheRefresh:l7};f_.useEffectEvent=YH;var p7={readContext:Bs,use:mE,useCallback:t7,useContext:Bs,useEffect:o_,useImperativeHandle:e7,useInsertionEffect:JH,useLayoutEffect:QH,useMemo:r7,useReducer:bM,useRef:XH,useState:function(){return bM(Wu)},useDebugValue:l_,useDeferredValue:function(e,t){var r=Cn();return ma===null?c_(r,e,t):a7(r,ma.memoizedState,e,t)},useTransition:function(){var e=bM(Wu)[0],t=Cn().memoizedState;return[typeof e=="boolean"?e:Xv(e),t]},useSyncExternalStore:BH,useId:o7,useHostTransitionStatus:u_,useFormState:W9,useActionState:W9,useOptimistic:function(e,t){var r=Cn();return ma!==null?HH(r,ma,e,t):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:s_,useCacheRefresh:l7};p7.useEffectEvent=YH;function vM(e,t,r,a){t=e.memoizedState,r=r(a,t),r=r==null?t:_a({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var fD={enqueueSetState:function(e,t,r){e=e._reactInternals;var a=Co(),n=Pf(a);n.payload=t,r!=null&&(n.callback=r),t=Af(e,n,a),t!==null&&(Xi(t,e,a),bv(t,e,a))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var a=Co(),n=Pf(a);n.tag=1,n.payload=t,r!=null&&(n.callback=r),t=Af(e,n,a),t!==null&&(Xi(t,e,a),bv(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Co(),a=Pf(r);a.tag=2,t!=null&&(a.callback=t),t=Af(e,a,r),t!==null&&(Xi(t,e,r),bv(t,e,r))}};function Y9(e,t,r,a,n,s,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,s,i):t.prototype&&t.prototype.isPureReactComponent?!Rv(r,a)||!Rv(n,s):!0}function J9(e,t,r,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,a),t.state!==e&&fD.enqueueReplaceState(t,t.state,null)}function _m(e,t){var r=t;if("ref"in t){r={};for(var a in t)a!=="ref"&&(r[a]=t[a])}if(e=e.defaultProps){r===t&&(r=_a({},r));for(var n in e)r[n]===void 0&&(r[n]=e[n])}return r}function m7(e){O1(e)}function h7(e){}function g7(e){O1(e)}function $1(e,t){try{var r=e.onUncaughtError;r(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Q9(e,t,r){try{var a=e.onCaughtError;a(r.value,{componentStack:r.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function pD(e,t,r){return r=Pf(r),r.tag=3,r.payload={element:null},r.callback=function(){$1(e,t)},r}function y7(e){return e=Pf(e),e.tag=3,e}function x7(e,t,r,a){var n=r.type.getDerivedStateFromError;if(typeof n=="function"){var s=a.value;e.payload=function(){return n(s)},e.callback=function(){Q9(t,r,a)}}var i=r.stateNode;i!==null&&typeof i.componentDidCatch=="function"&&(e.callback=function(){Q9(t,r,a),typeof n!="function"&&(If===null?If=new Set([this]):If.add(this));var o=a.stack;this.componentDidCatch(a.value,{componentStack:o!==null?o:""})})}function A6e(e,t,r,a,n){if(r.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=r.alternate,t!==null&&zy(t,r,n,!0),r=Po.current,r!==null){switch(r.tag){case 31:case 13:return ml===null?Y1():r.alternate===null&&dn===0&&(dn=3),r.flags&=-257,r.flags|=65536,r.lanes=n,a===j1?r.flags|=16384:(t=r.updateQueue,t===null?r.updateQueue=new Set([a]):t.add(a),RM(e,a,n)),!1;case 22:return r.flags|=65536,a===j1?r.flags|=16384:(t=r.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},r.updateQueue=t):(r=t.retryQueue,r===null?t.retryQueue=new Set([a]):r.add(a)),RM(e,a,n)),!1}throw Error(Oe(435,r.tag))}return RM(e,a,n),Y1(),!1}if(Or)return t=Po.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=n,a!==eD&&(e=Error(Oe(422),{cause:a}),Mv(fl(e,r)))):(a!==eD&&(t=Error(Oe(423),{cause:a}),Mv(fl(t,r))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,a=fl(a,r),n=pD(e.stateNode,a,n),xM(e,n),dn!==4&&(dn=2)),!1;var s=Error(Oe(520),{cause:a});if(s=fl(s,r),Ev===null?Ev=[s]:Ev.push(s),dn!==4&&(dn=2),t===null)return!0;a=fl(a,r),r=t;do{switch(r.tag){case 3:return r.flags|=65536,e=n&-n,r.lanes|=e,e=pD(r.stateNode,a,e),xM(r,e),!1;case 1:if(t=r.type,s=r.stateNode,(r.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||s!==null&&typeof s.componentDidCatch=="function"&&(If===null||!If.has(s))))return r.flags|=65536,n&=-n,r.lanes|=n,n=y7(n),x7(n,e,r,a),xM(r,n),!1}r=r.return}while(r!==null);return!1}var p_=Error(Oe(461)),On=!1;function _s(e,t,r,a){t.child=e===null?kH(t,null,r,a):Mm(t,e.child,r,a)}function Z9(e,t,r,a,n){r=r.render;var s=t.ref;if("ref"in a){var i={};for(var o in a)o!=="ref"&&(i[o]=a[o])}else i=a;return km(t),a=t_(e,t,r,i,s,n),o=r_(),e!==null&&!On?(a_(e,t,n),Xu(e,t,n)):(Or&&o&&KD(t),t.flags|=1,_s(e,t,a,n),t.child)}function eq(e,t,r,a,n){if(e===null){var s=r.type;return typeof s=="function"&&!GD(s)&&s.defaultProps===void 0&&r.compare===null?(t.tag=15,t.type=s,b7(e,t,s,a,n)):(e=v1(r.type,null,a,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!m_(e,n)){var i=s.memoizedProps;if(r=r.compare,r=r!==null?r:Rv,r(i,a)&&e.ref===t.ref)return Xu(e,t,n)}return t.flags|=1,e=qu(s,a),e.ref=t.ref,e.return=t,t.child=e}function b7(e,t,r,a,n){if(e!==null){var s=e.memoizedProps;if(Rv(s,a)&&e.ref===t.ref)if(On=!1,t.pendingProps=a=s,m_(e,n))e.flags&131072&&(On=!0);else return t.lanes=e.lanes,Xu(e,t,n)}return mD(e,t,r,a,n)}function v7(e,t,r,a){var n=a.children,s=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if(t.flags&128){if(s=s!==null?s.baseLanes|r:r,e!==null){for(a=t.child=e.child,n=0;a!==null;)n=n|a.lanes|a.childLanes,a=a.sibling;a=n&~s}else a=0,t.child=null;return tq(e,t,s,r,a)}if(r&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&S1(t,s!==null?s.cachePool:null),s!==null?q9(t,s):oD(),_H(t);else return a=t.lanes=536870912,tq(e,t,s!==null?s.baseLanes|r:r,r,a)}else s!==null?(S1(t,s.cachePool),q9(t,s),yf(t),t.memoizedState=null):(e!==null&&S1(t,null),oD(),yf(t));return _s(e,t,n,r),t.child}function pv(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function tq(e,t,r,a,n){var s=YD();return s=s===null?null:{parent:_n._currentValue,pool:s},t.memoizedState={baseLanes:r,cachePool:s},e!==null&&S1(t,null),oD(),_H(t),e!==null&&zy(e,t,a,!0),t.childLanes=n,null}function C1(e,t){return t=G1({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function rq(e,t,r){return Mm(t,e.child,null,r),e=C1(t,t.pendingProps),e.flags|=2,xo(t),t.memoizedState=null,e}function I6e(e,t,r){var a=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Or){if(a.mode==="hidden")return e=C1(t,a),t.lanes=536870912,pv(null,e);if(lD(t),(e=Da)?(e=f$(e,pl),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Mf!==null?{id:Oc,overflow:Fc}:null,retryLane:536870912,hydrationErrors:null},r=EH(e),r.return=t,t.child=r,Fs=t,Da=null)):e=null,e===null)throw Df(t);return t.lanes=536870912,null}return C1(t,a)}var s=e.memoizedState;if(s!==null){var i=s.dehydrated;if(lD(t),n)if(t.flags&256)t.flags&=-257,t=rq(e,t,r);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(Oe(558));else if(On||zy(e,t,r,!1),n=(r&e.childLanes)!==0,On||n){if(a=ga,a!==null&&(i=Jq(a,r),i!==0&&i!==s.retryLane))throw s.retryLane=i,Um(e,i),Xi(a,e,i),p_;Y1(),t=rq(e,t,r)}else e=s.treeContext,Da=hl(i.nextSibling),Fs=t,Or=!0,Ef=null,pl=!1,e!==null&&AH(t,e),t=C1(t,a),t.flags|=4096;return t}return e=qu(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function E1(e,t){var r=t.ref;if(r===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(Oe(284));(e===null||e.ref!==r)&&(t.flags|=4194816)}}function mD(e,t,r,a,n){return km(t),r=t_(e,t,r,a,void 0,n),a=r_(),e!==null&&!On?(a_(e,t,n),Xu(e,t,n)):(Or&&a&&KD(t),t.flags|=1,_s(e,t,r,n),t.child)}function aq(e,t,r,a,n,s){return km(t),t.updateQueue=null,r=FH(t,a,r,n),OH(e),a=r_(),e!==null&&!On?(a_(e,t,s),Xu(e,t,s)):(Or&&a&&KD(t),t.flags|=1,_s(e,t,r,s),t.child)}function nq(e,t,r,a,n){if(km(t),t.stateNode===null){var s=yy,i=r.contextType;typeof i=="object"&&i!==null&&(s=Bs(i)),s=new r(a,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=fD,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=a,s.state=t.memoizedState,s.refs={},QD(t),i=r.contextType,s.context=typeof i=="object"&&i!==null?Bs(i):yy,s.state=t.memoizedState,i=r.getDerivedStateFromProps,typeof i=="function"&&(vM(t,r,i,a),s.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(i=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),i!==s.state&&fD.enqueueReplaceState(s,s.state,null),Sv(t,a,s,n),vv(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){s=t.stateNode;var o=t.memoizedProps,l=_m(r,o);s.props=l;var c=s.context,u=r.contextType;i=yy,typeof u=="object"&&u!==null&&(i=Bs(u));var d=r.getDerivedStateFromProps;u=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function",o=t.pendingProps!==o,u||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o||c!==i)&&J9(t,s,a,i),mf=!1;var f=t.memoizedState;s.state=f,Sv(t,a,s,n),vv(),c=t.memoizedState,o||f!==c||mf?(typeof d=="function"&&(vM(t,r,d,a),c=t.memoizedState),(l=mf||Y9(t,r,l,a,f,c,i))?(u||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=c),s.props=a,s.state=c,s.context=i,a=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{s=t.stateNode,sD(e,t),i=t.memoizedProps,u=_m(r,i),s.props=u,d=t.pendingProps,f=s.context,c=r.contextType,l=yy,typeof c=="object"&&c!==null&&(l=Bs(c)),o=r.getDerivedStateFromProps,(c=typeof o=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(i!==d||f!==l)&&J9(t,s,a,l),mf=!1,f=t.memoizedState,s.state=f,Sv(t,a,s,n),vv();var p=t.memoizedState;i!==d||f!==p||mf||e!==null&&e.dependencies!==null&&U1(e.dependencies)?(typeof o=="function"&&(vM(t,r,o,a),p=t.memoizedState),(u=mf||Y9(t,r,u,a,f,p,l)||e!==null&&e.dependencies!==null&&U1(e.dependencies))?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(a,p,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(a,p,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=p),s.props=a,s.state=p,s.context=l,a=u):(typeof s.componentDidUpdate!="function"||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),a=!1)}return s=a,E1(e,t),a=(t.flags&128)!==0,s||a?(s=t.stateNode,r=a&&typeof r.getDerivedStateFromError!="function"?null:s.render(),t.flags|=1,e!==null&&a?(t.child=Mm(t,e.child,null,n),t.child=Mm(t,null,r,n)):_s(e,t,r,n),t.memoizedState=s.state,e=t.child):e=Xu(e,t,n),e}function sq(e,t,r,a){return Rm(),t.flags|=256,_s(e,t,r,a),t.child}var SM={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function TM(e){return{baseLanes:e,cachePool:NH()}}function wM(e,t,r){return e=e!==null?e.childLanes&~r:0,t&&(e|=vo),e}function S7(e,t,r){var a=t.pendingProps,n=!1,s=(t.flags&128)!==0,i;if((i=s)||(i=e!==null&&e.memoizedState===null?!1:(wn.current&2)!==0),i&&(n=!0,t.flags&=-129),i=(t.flags&32)!==0,t.flags&=-33,e===null){if(Or){if(n?gf(t):yf(t),(e=Da)?(e=f$(e,pl),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Mf!==null?{id:Oc,overflow:Fc}:null,retryLane:536870912,hydrationErrors:null},r=EH(e),r.return=t,t.child=r,Fs=t,Da=null)):e=null,e===null)throw Df(t);return ID(e)?t.lanes=32:t.lanes=536870912,null}var o=a.children;return a=a.fallback,n?(yf(t),n=t.mode,o=G1({mode:"hidden",children:o},n),a=Am(a,n,r,null),o.return=t,a.return=t,o.sibling=a,t.child=o,a=t.child,a.memoizedState=TM(r),a.childLanes=wM(e,i,r),t.memoizedState=SM,pv(null,a)):(gf(t),hD(t,o))}var l=e.memoizedState;if(l!==null&&(o=l.dehydrated,o!==null)){if(s)t.flags&256?(gf(t),t.flags&=-257,t=CM(e,t,r)):t.memoizedState!==null?(yf(t),t.child=e.child,t.flags|=128,t=null):(yf(t),o=a.fallback,n=t.mode,a=G1({mode:"visible",children:a.children},n),o=Am(o,n,r,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,Mm(t,e.child,null,r),a=t.child,a.memoizedState=TM(r),a.childLanes=wM(e,i,r),t.memoizedState=SM,t=pv(null,a));else if(gf(t),ID(o)){if(i=o.nextSibling&&o.nextSibling.dataset,i)var c=i.dgst;i=c,a=Error(Oe(419)),a.stack="",a.digest=i,Mv({value:a,source:null,stack:null}),t=CM(e,t,r)}else if(On||zy(e,t,r,!1),i=(r&e.childLanes)!==0,On||i){if(i=ga,i!==null&&(a=Jq(i,r),a!==0&&a!==l.retryLane))throw l.retryLane=a,Um(e,a),Xi(i,e,a),p_;AD(o)||Y1(),t=CM(e,t,r)}else AD(o)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Da=hl(o.nextSibling),Fs=t,Or=!0,Ef=null,pl=!1,e!==null&&AH(t,e),t=hD(t,a.children),t.flags|=4096);return t}return n?(yf(t),o=a.fallback,n=t.mode,l=e.child,c=l.sibling,a=qu(l,{mode:"hidden",children:a.children}),a.subtreeFlags=l.subtreeFlags&65011712,c!==null?o=qu(c,o):(o=Am(o,n,r,null),o.flags|=2),o.return=t,a.return=t,a.sibling=o,t.child=a,pv(null,a),a=t.child,o=e.child.memoizedState,o===null?o=TM(r):(n=o.cachePool,n!==null?(l=_n._currentValue,n=n.parent!==l?{parent:l,pool:l}:n):n=NH(),o={baseLanes:o.baseLanes|r,cachePool:n}),a.memoizedState=o,a.childLanes=wM(e,i,r),t.memoizedState=SM,pv(e.child,a)):(gf(t),r=e.child,e=r.sibling,r=qu(r,{mode:"visible",children:a.children}),r.return=t,r.sibling=null,e!==null&&(i=t.deletions,i===null?(t.deletions=[e],t.flags|=16):i.push(e)),t.child=r,t.memoizedState=null,r)}function hD(e,t){return t=G1({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function G1(e,t){return e=bo(22,e,null,t),e.lanes=0,e}function CM(e,t,r){return Mm(t,e.child,null,r),e=hD(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function iq(e,t,r){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),rD(e.return,t,r)}function EM(e,t,r,a,n,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:r,tailMode:n,treeForkCount:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=a,i.tail=r,i.tailMode=n,i.treeForkCount=s)}function T7(e,t,r){var a=t.pendingProps,n=a.revealOrder,s=a.tail;a=a.children;var i=wn.current,o=(i&2)!==0;if(o?(i=i&1|2,t.flags|=128):i&=1,wa(wn,i),_s(e,t,a,r),a=Or?kv:0,!o&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&iq(e,r,t);else if(e.tag===19)iq(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(n){case"forwards":for(r=t.child,n=null;r!==null;)e=r.alternate,e!==null&&V1(e)===null&&(n=r),r=r.sibling;r=n,r===null?(n=t.child,t.child=null):(n=r.sibling,r.sibling=null),EM(t,!1,n,r,s,a);break;case"backwards":case"unstable_legacy-backwards":for(r=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&V1(e)===null){t.child=n;break}e=n.sibling,n.sibling=r,r=n,n=e}EM(t,!0,r,null,s,a);break;case"together":EM(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Xu(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Of|=t.lanes,!(r&t.childLanes))if(e!==null){if(zy(e,t,r,!1),(r&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(Oe(153));if(t.child!==null){for(e=t.child,r=qu(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=qu(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function m_(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&U1(e)))}function N6e(e,t,r){switch(t.tag){case 3:k1(t,t.stateNode.containerInfo),hf(t,_n,e.memoizedState.cache),Rm();break;case 27:case 5:qM(t);break;case 4:k1(t,t.stateNode.containerInfo);break;case 10:hf(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,lD(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(gf(t),t.flags|=128,null):r&t.child.childLanes?S7(e,t,r):(gf(t),e=Xu(e,t,r),e!==null?e.sibling:null);gf(t);break;case 19:var n=(e.flags&128)!==0;if(a=(r&t.childLanes)!==0,a||(zy(e,t,r,!1),a=(r&t.childLanes)!==0),n){if(a)return T7(e,t,r);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),wa(wn,wn.current),a)break;return null;case 22:return t.lanes=0,v7(e,t,r,t.pendingProps);case 24:hf(t,_n,e.memoizedState.cache)}return Xu(e,t,r)}function w7(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps)On=!0;else{if(!m_(e,r)&&!(t.flags&128))return On=!1,N6e(e,t,r);On=!!(e.flags&131072)}else On=!1,Or&&t.flags&1048576&&PH(t,kv,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Cm(t.elementType),t.type=e,typeof e=="function")GD(e)?(a=_m(e,a),t.tag=1,t=nq(null,t,e,a,r)):(t.tag=0,t=mD(null,t,e,a,r));else{if(e!=null){var n=e.$$typeof;if(n===kD){t.tag=11,t=Z9(null,t,e,a,r);break e}else if(n===MD){t.tag=14,t=eq(null,t,e,a,r);break e}}throw t=zM(e)||e,Error(Oe(306,t,""))}}return t;case 0:return mD(e,t,t.type,t.pendingProps,r);case 1:return a=t.type,n=_m(a,t.pendingProps),nq(e,t,a,n,r);case 3:e:{if(k1(t,t.stateNode.containerInfo),e===null)throw Error(Oe(387));a=t.pendingProps;var s=t.memoizedState;n=s.element,sD(e,t),Sv(t,a,null,r);var i=t.memoizedState;if(a=i.cache,hf(t,_n,a),a!==s.cache&&aD(t,[_n],r,!0),vv(),a=i.element,s.isDehydrated)if(s={element:a,isDehydrated:!1,cache:i.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=sq(e,t,a,r);break e}else if(a!==n){n=fl(Error(Oe(424)),t),Mv(n),t=sq(e,t,a,r);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Da=hl(e.firstChild),Fs=t,Or=!0,Ef=null,pl=!0,r=kH(t,null,a,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling}else{if(Rm(),a===n){t=Xu(e,t,r);break e}_s(e,t,a,r)}t=t.child}return t;case 26:return E1(e,t),e===null?(r=Iq(t.type,null,t.pendingProps,null))?t.memoizedState=r:Or||(r=t.type,e=t.pendingProps,a=eE(Cf.current).createElement(r),a[Os]=t,a[Yi]=e,Us(a,r,e),vs(a),t.stateNode=a):t.memoizedState=Iq(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return qM(t),e===null&&Or&&(a=t.stateNode=p$(t.type,t.pendingProps,Cf.current),Fs=t,pl=!0,n=Da,Bf(t.type)?(ND=n,Da=hl(a.firstChild)):Da=n),_s(e,t,t.pendingProps.children,r),E1(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Or&&((n=a=Da)&&(a=aUe(a,t.type,t.pendingProps,pl),a!==null?(t.stateNode=a,Fs=t,Da=hl(a.firstChild),pl=!1,n=!0):n=!1),n||Df(t)),qM(t),n=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,a=s.children,ED(n,s)?a=null:i!==null&&ED(n,i)&&(t.flags|=32),t.memoizedState!==null&&(n=t_(e,t,v6e,null,null,r),Uv._currentValue=n),E1(e,t),_s(e,t,a,r),t.child;case 6:return e===null&&Or&&((e=r=Da)&&(r=nUe(r,t.pendingProps,pl),r!==null?(t.stateNode=r,Fs=t,Da=null,e=!0):e=!1),e||Df(t)),null;case 13:return S7(e,t,r);case 4:return k1(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Mm(t,null,a,r):_s(e,t,a,r),t.child;case 11:return Z9(e,t,t.type,t.pendingProps,r);case 7:return _s(e,t,t.pendingProps,r),t.child;case 8:return _s(e,t,t.pendingProps.children,r),t.child;case 12:return _s(e,t,t.pendingProps.children,r),t.child;case 10:return a=t.pendingProps,hf(t,t.type,a.value),_s(e,t,a.children,r),t.child;case 9:return n=t.type._context,a=t.pendingProps.children,km(t),n=Bs(n),a=a(n),t.flags|=1,_s(e,t,a,r),t.child;case 14:return eq(e,t,t.type,t.pendingProps,r);case 15:return b7(e,t,t.type,t.pendingProps,r);case 19:return T7(e,t,r);case 31:return I6e(e,t,r);case 22:return v7(e,t,r,t.pendingProps);case 24:return km(t),a=Bs(_n),e===null?(n=YD(),n===null&&(n=ga,s=XD(),n.pooledCache=s,s.refCount++,s!==null&&(n.pooledCacheLanes|=r),n=s),t.memoizedState={parent:a,cache:n},QD(t),hf(t,_n,n)):(e.lanes&r&&(sD(e,t),Sv(t,null,null,r),vv()),n=e.memoizedState,s=t.memoizedState,n.parent!==a?(n={parent:a,cache:a},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),hf(t,_n,a)):(a=s.cache,hf(t,_n,a),a!==n.cache&&aD(t,[_n],r,!0))),_s(e,t,t.pendingProps.children,r),t.child;case 29:throw t.pendingProps}throw Error(Oe(156,t.tag))}function Du(e){e.flags|=4}function PM(e,t,r,a,n){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(n&335544128)===n)if(e.stateNode.complete)e.flags|=8192;else if(K7())e.flags|=8192;else throw Nm=j1,JD}else e.flags&=-16777217}function oq(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!g$(t))if(K7())e.flags|=8192;else throw Nm=j1,JD}function c1(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Wq():536870912,e.lanes|=t,Dy|=t)}function iv(e,t){if(!Or)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Ma(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,a=0;if(t)for(var n=e.child;n!==null;)r|=n.lanes|n.childLanes,a|=n.subtreeFlags&65011712,a|=n.flags&65011712,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)r|=n.lanes|n.childLanes,a|=n.subtreeFlags,a|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=a,e.childLanes=r,t}function L6e(e,t,r){var a=t.pendingProps;switch(WD(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ma(t),null;case 1:return Ma(t),null;case 3:return r=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Hu(_n),Iy(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(sy(t)?Du(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,yM())),Ma(t),null;case 26:var n=t.type,s=t.memoizedState;return e===null?(Du(t),s!==null?(Ma(t),oq(t,s)):(Ma(t),PM(t,n,null,a,r))):s?s!==e.memoizedState?(Du(t),Ma(t),oq(t,s)):(Ma(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Du(t),Ma(t),PM(t,n,e,a,r)),null;case 27:if(M1(t),r=Cf.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Du(t);else{if(!a){if(t.stateNode===null)throw Error(Oe(166));return Ma(t),null}e=Uc.current,sy(t)?O9(t,e):(e=p$(n,a,r),t.stateNode=e,Du(t))}return Ma(t),null;case 5:if(M1(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Du(t);else{if(!a){if(t.stateNode===null)throw Error(Oe(166));return Ma(t),null}if(s=Uc.current,sy(t))O9(t,s);else{var i=eE(Cf.current);switch(s){case 1:s=i.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:s=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":s=i.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":s=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":s=i.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof a.is=="string"?i.createElement("select",{is:a.is}):i.createElement("select"),a.multiple?s.multiple=!0:a.size&&(s.size=a.size);break;default:s=typeof a.is=="string"?i.createElement(n,{is:a.is}):i.createElement(n)}}s[Os]=t,s[Yi]=a;e:for(i=t.child;i!==null;){if(i.tag===5||i.tag===6)s.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;i.sibling===null;){if(i.return===null||i.return===t)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=s;e:switch(Us(s,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Du(t)}}return Ma(t),PM(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,r),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Du(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(Oe(166));if(e=Cf.current,sy(t)){if(e=t.stateNode,r=t.memoizedProps,a=null,n=Fs,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}e[Os]=t,e=!!(e.nodeValue===r||a!==null&&a.suppressHydrationWarning===!0||c$(e.nodeValue,r)),e||Df(t,!0)}else e=eE(e).createTextNode(a),e[Os]=t,t.stateNode=e}return Ma(t),null;case 31:if(r=t.memoizedState,e===null||e.memoizedState!==null){if(a=sy(t),r!==null){if(e===null){if(!a)throw Error(Oe(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Oe(557));e[Os]=t}else Rm(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ma(t),e=!1}else r=yM(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return t.flags&256?(xo(t),t):(xo(t),null);if(t.flags&128)throw Error(Oe(558))}return Ma(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=sy(t),a!==null&&a.dehydrated!==null){if(e===null){if(!n)throw Error(Oe(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(Oe(317));n[Os]=t}else Rm(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ma(t),n=!1}else n=yM(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(xo(t),t):(xo(t),null)}return xo(t),t.flags&128?(t.lanes=r,t):(r=a!==null,e=e!==null&&e.memoizedState!==null,r&&(a=t.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),s=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(s=a.memoizedState.cachePool.pool),s!==n&&(a.flags|=2048)),r!==e&&r&&(t.child.flags|=8192),c1(t,t.updateQueue),Ma(t),null);case 4:return Iy(),e===null&&S_(t.stateNode.containerInfo),Ma(t),null;case 10:return Hu(t.type),Ma(t),null;case 19:if(Ss(wn),a=t.memoizedState,a===null)return Ma(t),null;if(n=(t.flags&128)!==0,s=a.rendering,s===null)if(n)iv(a,!1);else{if(dn!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=V1(e),s!==null){for(t.flags|=128,iv(a,!1),e=s.updateQueue,t.updateQueue=e,c1(t,e),t.subtreeFlags=0,e=r,r=t.child;r!==null;)CH(r,e),r=r.sibling;return wa(wn,wn.current&1|2),Or&&Bu(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&So()>W1&&(t.flags|=128,n=!0,iv(a,!1),t.lanes=4194304)}else{if(!n)if(e=V1(s),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,c1(t,e),iv(a,!0),a.tail===null&&a.tailMode==="hidden"&&!s.alternate&&!Or)return Ma(t),null}else 2*So()-a.renderingStartTime>W1&&r!==536870912&&(t.flags|=128,n=!0,iv(a,!1),t.lanes=4194304);a.isBackwards?(s.sibling=t.child,t.child=s):(e=a.last,e!==null?e.sibling=s:t.child=s,a.last=s)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=So(),e.sibling=null,r=wn.current,wa(wn,n?r&1|2:r&1),Or&&Bu(t,a.treeForkCount),e):(Ma(t),null);case 22:case 23:return xo(t),ZD(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?r&536870912&&!(t.flags&128)&&(Ma(t),t.subtreeFlags&6&&(t.flags|=8192)):Ma(t),r=t.updateQueue,r!==null&&c1(t,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==r&&(t.flags|=2048),e!==null&&Ss(Im),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Hu(_n),Ma(t),null;case 25:return null;case 30:return null}throw Error(Oe(156,t.tag))}function R6e(e,t){switch(WD(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Hu(_n),Iy(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return M1(t),null;case 31:if(t.memoizedState!==null){if(xo(t),t.alternate===null)throw Error(Oe(340));Rm()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(xo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Oe(340));Rm()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ss(wn),null;case 4:return Iy(),null;case 10:return Hu(t.type),null;case 22:case 23:return xo(t),ZD(),e!==null&&Ss(Im),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Hu(_n),null;case 25:return null;default:return null}}function C7(e,t){switch(WD(t),t.tag){case 3:Hu(_n),Iy();break;case 26:case 27:case 5:M1(t);break;case 4:Iy();break;case 31:t.memoizedState!==null&&xo(t);break;case 13:xo(t);break;case 19:Ss(wn);break;case 10:Hu(t.type);break;case 22:case 23:xo(t),ZD(),e!==null&&Ss(Im);break;case 24:Hu(_n)}}function Yv(e,t){try{var r=t.updateQueue,a=r!==null?r.lastEffect:null;if(a!==null){var n=a.next;r=n;do{if((r.tag&e)===e){a=void 0;var s=r.create,i=r.inst;a=s(),i.destroy=a}r=r.next}while(r!==n)}}catch(o){la(t,t.return,o)}}function _f(e,t,r){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var s=n.next;a=s;do{if((a.tag&e)===e){var i=a.inst,o=i.destroy;if(o!==void 0){i.destroy=void 0,n=t;var l=r,c=o;try{c()}catch(u){la(n,l,u)}}}a=a.next}while(a!==s)}}catch(u){la(t,t.return,u)}}function E7(e){var t=e.updateQueue;if(t!==null){var r=e.stateNode;try{DH(t,r)}catch(a){la(e,e.return,a)}}}function P7(e,t,r){r.props=_m(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(a){la(e,t,a)}}function wv(e,t){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof r=="function"?e.refCleanup=r(a):r.current=a}}catch(n){la(e,t,n)}}function Bc(e,t){var r=e.ref,a=e.refCleanup;if(r!==null)if(typeof a=="function")try{a()}catch(n){la(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(n){la(e,t,n)}else r.current=null}function A7(e){var t=e.type,r=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":r.autoFocus&&a.focus();break e;case"img":r.src?a.src=r.src:r.srcSet&&(a.srcset=r.srcSet)}}catch(n){la(e,e.return,n)}}function AM(e,t,r){try{var a=e.stateNode;J6e(a,e.type,r,t),a[Yi]=t}catch(n){la(e,e.return,n)}}function I7(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Bf(e.type)||e.tag===4}function IM(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||I7(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&&Bf(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 gD(e,t,r){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,t):(t=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,t.appendChild(e),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=zu));else if(a!==4&&(a===27&&Bf(e.type)&&(r=e.stateNode,t=null),e=e.child,e!==null))for(gD(e,t,r),e=e.sibling;e!==null;)gD(e,t,r),e=e.sibling}function K1(e,t,r){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(a!==4&&(a===27&&Bf(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(K1(e,t,r),e=e.sibling;e!==null;)K1(e,t,r),e=e.sibling}function N7(e){var t=e.stateNode,r=e.memoizedProps;try{for(var a=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Us(t,a,r),t[Os]=e,t[Yi]=r}catch(s){la(e,e.return,s)}}var Uu=!1,Dn=!1,NM=!1,lq=typeof WeakSet=="function"?WeakSet:Set,bs=null;function k6e(e,t){if(e=e.containerInfo,wD=nE,e=gH(e),qD(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var a=r.getSelection&&r.getSelection();if(a&&a.rangeCount!==0){r=a.anchorNode;var n=a.anchorOffset,s=a.focusNode;a=a.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var i=0,o=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var p;d!==r||n!==0&&d.nodeType!==3||(o=i+n),d!==s||a!==0&&d.nodeType!==3||(l=i+a),d.nodeType===3&&(i+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===r&&++c===n&&(o=i),f===s&&++u===a&&(l=i),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}r=o===-1||l===-1?null:{start:o,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(CD={focusedElem:e,selectionRange:r},nE=!1,bs=t;bs!==null;)if(t=bs,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,bs=e;else for(;bs!==null;){switch(t=bs,s=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(r=0;r<e.length;r++)n=e[r],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&s!==null){e=void 0,r=t,n=s.memoizedProps,s=s.memoizedState,a=r.stateNode;try{var m=_m(r.type,n);e=a.getSnapshotBeforeUpdate(m,s),a.__reactInternalSnapshotBeforeUpdate=e}catch(h){la(r,r.return,h)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,r=e.nodeType,r===9)PD(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":PD(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(Oe(163))}if(e=t.sibling,e!==null){e.return=t.return,bs=e;break}bs=t.return}}function L7(e,t,r){var a=r.flags;switch(r.tag){case 0:case 11:case 15:Ou(e,r),a&4&&Yv(5,r);break;case 1:if(Ou(e,r),a&4)if(e=r.stateNode,t===null)try{e.componentDidMount()}catch(i){la(r,r.return,i)}else{var n=_m(r.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(i){la(r,r.return,i)}}a&64&&E7(r),a&512&&wv(r,r.return);break;case 3:if(Ou(e,r),a&64&&(e=r.updateQueue,e!==null)){if(t=null,r.child!==null)switch(r.child.tag){case 27:case 5:t=r.child.stateNode;break;case 1:t=r.child.stateNode}try{DH(e,t)}catch(i){la(r,r.return,i)}}break;case 27:t===null&&a&4&&N7(r);case 26:case 5:Ou(e,r),t===null&&a&4&&A7(r),a&512&&wv(r,r.return);break;case 12:Ou(e,r);break;case 31:Ou(e,r),a&4&&M7(e,r);break;case 13:Ou(e,r),a&4&&D7(e,r),a&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=z6e.bind(null,r),sUe(e,r))));break;case 22:if(a=r.memoizedState!==null||Uu,!a){t=t!==null&&t.memoizedState!==null||Dn,n=Uu;var s=Dn;Uu=a,(Dn=t)&&!s?Fu(e,r,(r.subtreeFlags&8772)!==0):Ou(e,r),Uu=n,Dn=s}break;case 30:break;default:Ou(e,r)}}function R7(e){var t=e.alternate;t!==null&&(e.alternate=null,R7(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&FD(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var qa=null,Ki=!1;function _u(e,t,r){for(r=r.child;r!==null;)k7(e,t,r),r=r.sibling}function k7(e,t,r){if(To&&typeof To.onCommitFiberUnmount=="function")try{To.onCommitFiberUnmount(qv,r)}catch{}switch(r.tag){case 26:Dn||Bc(r,t),_u(e,t,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:Dn||Bc(r,t);var a=qa,n=Ki;Bf(r.type)&&(qa=r.stateNode,Ki=!1),_u(e,t,r),Av(r.stateNode),qa=a,Ki=n;break;case 5:Dn||Bc(r,t);case 6:if(a=qa,n=Ki,qa=null,_u(e,t,r),qa=a,Ki=n,qa!==null)if(Ki)try{(qa.nodeType===9?qa.body:qa.nodeName==="HTML"?qa.ownerDocument.body:qa).removeChild(r.stateNode)}catch(s){la(r,t,s)}else try{qa.removeChild(r.stateNode)}catch(s){la(r,t,s)}break;case 18:qa!==null&&(Ki?(e=qa,wq(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),By(e)):wq(qa,r.stateNode));break;case 4:a=qa,n=Ki,qa=r.stateNode.containerInfo,Ki=!0,_u(e,t,r),qa=a,Ki=n;break;case 0:case 11:case 14:case 15:_f(2,r,t),Dn||_f(4,r,t),_u(e,t,r);break;case 1:Dn||(Bc(r,t),a=r.stateNode,typeof a.componentWillUnmount=="function"&&P7(r,t,a)),_u(e,t,r);break;case 21:_u(e,t,r);break;case 22:Dn=(a=Dn)||r.memoizedState!==null,_u(e,t,r),Dn=a;break;default:_u(e,t,r)}}function M7(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{By(e)}catch(r){la(t,t.return,r)}}}function D7(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{By(e)}catch(r){la(t,t.return,r)}}function M6e(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new lq),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new lq),t;default:throw Error(Oe(435,e.tag))}}function u1(e,t){var r=M6e(e);t.forEach(function(a){if(!r.has(a)){r.add(a);var n=V6e.bind(null,e,a);a.then(n,n)}})}function $i(e,t){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var n=r[a],s=e,i=t,o=i;e:for(;o!==null;){switch(o.tag){case 27:if(Bf(o.type)){qa=o.stateNode,Ki=!1;break e}break;case 5:qa=o.stateNode,Ki=!1;break e;case 3:case 4:qa=o.stateNode.containerInfo,Ki=!0;break e}o=o.return}if(qa===null)throw Error(Oe(160));k7(s,i,n),qa=null,Ki=!1,s=n.alternate,s!==null&&(s.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_7(t,e),t=t.sibling}var Wl=null;function _7(e,t){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:$i(t,e),Gi(e),a&4&&(_f(3,e,e.return),Yv(3,e),_f(5,e,e.return));break;case 1:$i(t,e),Gi(e),a&512&&(Dn||r===null||Bc(r,r.return)),a&64&&Uu&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?a:r.concat(a))));break;case 26:var n=Wl;if($i(t,e),Gi(e),a&512&&(Dn||r===null||Bc(r,r.return)),a&4){var s=r!==null?r.memoizedState:null;if(a=e.memoizedState,r===null)if(a===null)if(e.stateNode===null){e:{a=e.type,r=e.memoizedProps,n=n.ownerDocument||n;t:switch(a){case"title":s=n.getElementsByTagName("title")[0],(!s||s[Gv]||s[Os]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=n.createElement(a),n.head.insertBefore(s,n.querySelector("head > title"))),Us(s,a,r),s[Os]=e,vs(s),a=s;break e;case"link":var i=Lq("link","href",n).get(a+(r.href||""));if(i){for(var o=0;o<i.length;o++)if(s=i[o],s.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&s.getAttribute("rel")===(r.rel==null?null:r.rel)&&s.getAttribute("title")===(r.title==null?null:r.title)&&s.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){i.splice(o,1);break t}}s=n.createElement(a),Us(s,a,r),n.head.appendChild(s);break;case"meta":if(i=Lq("meta","content",n).get(a+(r.content||""))){for(o=0;o<i.length;o++)if(s=i[o],s.getAttribute("content")===(r.content==null?null:""+r.content)&&s.getAttribute("name")===(r.name==null?null:r.name)&&s.getAttribute("property")===(r.property==null?null:r.property)&&s.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&s.getAttribute("charset")===(r.charSet==null?null:r.charSet)){i.splice(o,1);break t}}s=n.createElement(a),Us(s,a,r),n.head.appendChild(s);break;default:throw Error(Oe(468,a))}s[Os]=e,vs(s),a=s}e.stateNode=a}else Rq(n,e.type,e.stateNode);else e.stateNode=Nq(n,a,e.memoizedProps);else s!==a?(s===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):s.count--,a===null?Rq(n,e.type,e.stateNode):Nq(n,a,e.memoizedProps)):a===null&&e.stateNode!==null&&AM(e,e.memoizedProps,r.memoizedProps)}break;case 27:$i(t,e),Gi(e),a&512&&(Dn||r===null||Bc(r,r.return)),r!==null&&a&4&&AM(e,e.memoizedProps,r.memoizedProps);break;case 5:if($i(t,e),Gi(e),a&512&&(Dn||r===null||Bc(r,r.return)),e.flags&32){n=e.stateNode;try{Ly(n,"")}catch(m){la(e,e.return,m)}}a&4&&e.stateNode!=null&&(n=e.memoizedProps,AM(e,n,r!==null?r.memoizedProps:n)),a&1024&&(NM=!0);break;case 6:if($i(t,e),Gi(e),a&4){if(e.stateNode===null)throw Error(Oe(162));a=e.memoizedProps,r=e.stateNode;try{r.nodeValue=a}catch(m){la(e,e.return,m)}}break;case 3:if(I1=null,n=Wl,Wl=tE(t.containerInfo),$i(t,e),Wl=n,Gi(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{By(t.containerInfo)}catch(m){la(e,e.return,m)}NM&&(NM=!1,O7(e));break;case 4:a=Wl,Wl=tE(e.stateNode.containerInfo),$i(t,e),Gi(e),Wl=a;break;case 12:$i(t,e),Gi(e);break;case 31:$i(t,e),Gi(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,u1(e,a)));break;case 13:$i(t,e),Gi(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(yE=So()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,u1(e,a)));break;case 22:n=e.memoizedState!==null;var l=r!==null&&r.memoizedState!==null,c=Uu,u=Dn;if(Uu=c||n,Dn=u||l,$i(t,e),Dn=u,Uu=c,Gi(e),a&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(r===null||l||Uu||Dn||Em(e)),r=null,t=e;;){if(t.tag===5||t.tag===26){if(r===null){l=r=t;try{if(s=l.stateNode,n)i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none";else{o=l.stateNode;var d=l.memoizedProps.style,f=d!=null&&d.hasOwnProperty("display")?d.display:null;o.style.display=f==null||typeof f=="boolean"?"":(""+f).trim()}}catch(m){la(l,l.return,m)}}}else if(t.tag===6){if(r===null){l=t;try{l.stateNode.nodeValue=n?"":l.memoizedProps}catch(m){la(l,l.return,m)}}}else if(t.tag===18){if(r===null){l=t;try{var p=l.stateNode;n?Cq(p,!0):Cq(l.stateNode,!1)}catch(m){la(l,l.return,m)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;r===t&&(r=null),t=t.return}r===t&&(r=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(r=a.retryQueue,r!==null&&(a.retryQueue=null,u1(e,r))));break;case 19:$i(t,e),Gi(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,u1(e,a)));break;case 30:break;case 21:break;default:$i(t,e),Gi(e)}}function Gi(e){var t=e.flags;if(t&2){try{for(var r,a=e.return;a!==null;){if(I7(a)){r=a;break}a=a.return}if(r==null)throw Error(Oe(160));switch(r.tag){case 27:var n=r.stateNode,s=IM(e);K1(e,s,n);break;case 5:var i=r.stateNode;r.flags&32&&(Ly(i,""),r.flags&=-33);var o=IM(e);K1(e,o,i);break;case 3:case 4:var l=r.stateNode.containerInfo,c=IM(e);gD(e,c,l);break;default:throw Error(Oe(161))}}catch(u){la(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function O7(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;O7(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ou(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)L7(e,t.alternate,t),t=t.sibling}function Em(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:_f(4,t,t.return),Em(t);break;case 1:Bc(t,t.return);var r=t.stateNode;typeof r.componentWillUnmount=="function"&&P7(t,t.return,r),Em(t);break;case 27:Av(t.stateNode);case 26:case 5:Bc(t,t.return),Em(t);break;case 22:t.memoizedState===null&&Em(t);break;case 30:Em(t);break;default:Em(t)}e=e.sibling}}function Fu(e,t,r){for(r=r&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,n=e,s=t,i=s.flags;switch(s.tag){case 0:case 11:case 15:Fu(n,s,r),Yv(4,s);break;case 1:if(Fu(n,s,r),a=s,n=a.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(c){la(a,a.return,c)}if(a=s,n=a.updateQueue,n!==null){var o=a.stateNode;try{var l=n.shared.hiddenCallbacks;if(l!==null)for(n.shared.hiddenCallbacks=null,n=0;n<l.length;n++)MH(l[n],o)}catch(c){la(a,a.return,c)}}r&&i&64&&E7(s),wv(s,s.return);break;case 27:N7(s);case 26:case 5:Fu(n,s,r),r&&a===null&&i&4&&A7(s),wv(s,s.return);break;case 12:Fu(n,s,r);break;case 31:Fu(n,s,r),r&&i&4&&M7(n,s);break;case 13:Fu(n,s,r),r&&i&4&&D7(n,s);break;case 22:s.memoizedState===null&&Fu(n,s,r),wv(s,s.return);break;case 30:break;default:Fu(n,s,r)}t=t.sibling}}function h_(e,t){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&Wv(r))}function g_(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Wv(e))}function Kl(e,t,r,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)F7(e,t,r,a),t=t.sibling}function F7(e,t,r,a){var n=t.flags;switch(t.tag){case 0:case 11:case 15:Kl(e,t,r,a),n&2048&&Yv(9,t);break;case 1:Kl(e,t,r,a);break;case 3:Kl(e,t,r,a),n&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Wv(e)));break;case 12:if(n&2048){Kl(e,t,r,a),e=t.stateNode;try{var s=t.memoizedProps,i=s.id,o=s.onPostCommit;typeof o=="function"&&o(i,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(l){la(t,t.return,l)}}else Kl(e,t,r,a);break;case 31:Kl(e,t,r,a);break;case 13:Kl(e,t,r,a);break;case 23:break;case 22:s=t.stateNode,i=t.alternate,t.memoizedState!==null?s._visibility&2?Kl(e,t,r,a):Cv(e,t):s._visibility&2?Kl(e,t,r,a):(s._visibility|=2,oy(e,t,r,a,(t.subtreeFlags&10256)!==0||!1)),n&2048&&h_(i,t);break;case 24:Kl(e,t,r,a),n&2048&&g_(t.alternate,t);break;default:Kl(e,t,r,a)}}function oy(e,t,r,a,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var s=e,i=t,o=r,l=a,c=i.flags;switch(i.tag){case 0:case 11:case 15:oy(s,i,o,l,n),Yv(8,i);break;case 23:break;case 22:var u=i.stateNode;i.memoizedState!==null?u._visibility&2?oy(s,i,o,l,n):Cv(s,i):(u._visibility|=2,oy(s,i,o,l,n)),n&&c&2048&&h_(i.alternate,i);break;case 24:oy(s,i,o,l,n),n&&c&2048&&g_(i.alternate,i);break;default:oy(s,i,o,l,n)}t=t.sibling}}function Cv(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var r=e,a=t,n=a.flags;switch(a.tag){case 22:Cv(r,a),n&2048&&h_(a.alternate,a);break;case 24:Cv(r,a),n&2048&&g_(a.alternate,a);break;default:Cv(r,a)}t=t.sibling}}var mv=8192;function iy(e,t,r){if(e.subtreeFlags&mv)for(e=e.child;e!==null;)B7(e,t,r),e=e.sibling}function B7(e,t,r){switch(e.tag){case 26:iy(e,t,r),e.flags&mv&&e.memoizedState!==null&&yUe(r,Wl,e.memoizedState,e.memoizedProps);break;case 5:iy(e,t,r);break;case 3:case 4:var a=Wl;Wl=tE(e.stateNode.containerInfo),iy(e,t,r),Wl=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=mv,mv=16777216,iy(e,t,r),mv=a):iy(e,t,r));break;default:iy(e,t,r)}}function U7(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function ov(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var r=0;r<t.length;r++){var a=t[r];bs=a,z7(a,e)}U7(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)j7(e),e=e.sibling}function j7(e){switch(e.tag){case 0:case 11:case 15:ov(e),e.flags&2048&&_f(9,e,e.return);break;case 3:ov(e);break;case 12:ov(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,P1(e)):ov(e);break;default:ov(e)}}function P1(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var r=0;r<t.length;r++){var a=t[r];bs=a,z7(a,e)}U7(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:_f(8,t,t.return),P1(t);break;case 22:r=t.stateNode,r._visibility&2&&(r._visibility&=-3,P1(t));break;default:P1(t)}e=e.sibling}}function z7(e,t){for(;bs!==null;){var r=bs;switch(r.tag){case 0:case 11:case 15:_f(8,r,t);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var a=r.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Wv(r.memoizedState.cache)}if(a=r.child,a!==null)a.return=r,bs=a;else e:for(r=e;bs!==null;){a=bs;var n=a.sibling,s=a.return;if(R7(a),a===r){bs=null;break e}if(n!==null){n.return=s,bs=n;break e}bs=s}}}var D6e={getCacheForType:function(e){var t=Bs(_n),r=t.data.get(e);return r===void 0&&(r=e(),t.data.set(e,r)),r},cacheSignal:function(){return Bs(_n).controller.signal}},_6e=typeof WeakMap=="function"?WeakMap:Map,ea=0,ga=null,Ir=null,Mr=0,oa=0,yo=null,Sf=!1,qy=!1,y_=!1,Yu=0,dn=0,Of=0,Lm=0,x_=0,vo=0,Dy=0,Ev=null,Wi=null,yD=!1,yE=0,V7=0,W1=1/0,X1=null,If=null,Qn=0,Nf=null,_y=null,$u=0,xD=0,bD=null,q7=null,Pv=0,vD=null;function Co(){return ea&2&&Mr!==0?Mr&-Mr:Wt.T!==null?v_():Qq()}function H7(){if(vo===0)if(!(Mr&536870912)||Or){var e=e1;e1<<=1,!(e1&3932160)&&(e1=262144),vo=e}else vo=536870912;return e=Po.current,e!==null&&(e.flags|=32),vo}function Xi(e,t,r){(e===ga&&(oa===2||oa===9)||e.cancelPendingCommit!==null)&&(Oy(e,0),Tf(e,Mr,vo,!1)),$v(e,r),(!(ea&2)||e!==ga)&&(e===ga&&(!(ea&2)&&(Lm|=r),dn===4&&Tf(e,Mr,vo,!1)),zc(e))}function $7(e,t,r){if(ea&6)throw Error(Oe(327));var a=!r&&(t&127)===0&&(t&e.expiredLanes)===0||Hv(e,t),n=a?B6e(e,t):LM(e,t,!0),s=a;do{if(n===0){qy&&!a&&Tf(e,t,0,!1);break}else{if(r=e.current.alternate,s&&!O6e(r)){n=LM(e,t,!1),s=!1;continue}if(n===2){if(s=t,e.errorRecoveryDisabledLanes&s)var i=0;else i=e.pendingLanes&-536870913,i=i!==0?i:i&536870912?536870912:0;if(i!==0){t=i;e:{var o=e;n=Ev;var l=o.current.memoizedState.isDehydrated;if(l&&(Oy(o,i).flags|=256),i=LM(o,i,!1),i!==2){if(y_&&!l){o.errorRecoveryDisabledLanes|=s,Lm|=s,n=4;break e}s=Wi,Wi=n,s!==null&&(Wi===null?Wi=s:Wi.push.apply(Wi,s))}n=i}if(s=!1,n!==2)continue}}if(n===1){Oy(e,0),Tf(e,t,0,!0);break}e:{switch(a=e,s=n,s){case 0:case 1:throw Error(Oe(345));case 4:if((t&4194048)!==t)break;case 6:Tf(a,t,vo,!Sf);break e;case 2:Wi=null;break;case 3:case 5:break;default:throw Error(Oe(329))}if((t&62914560)===t&&(n=yE+300-So(),10<n)){if(Tf(a,t,vo,!Sf),iE(a,0,!0)!==0)break e;$u=t,a.timeoutHandle=d$(cq.bind(null,a,r,Wi,X1,yD,t,vo,Lm,Dy,Sf,s,"Throttled",-0,0),n);break e}cq(a,r,Wi,X1,yD,t,vo,Lm,Dy,Sf,s,null,-0,0)}}break}while(1);zc(e)}function cq(e,t,r,a,n,s,i,o,l,c,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)===16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:zu},B7(t,s,d);var m=(s&62914560)===s?yE-So():(s&4194048)===s?V7-So():0;if(m=xUe(d,m),m!==null){$u=s,e.cancelPendingCommit=m(dq.bind(null,e,t,s,r,a,n,i,o,l,u,d,null,f,p)),Tf(e,s,i,!c);return}}dq(e,t,s,r,a,n,i,o,l)}function O6e(e){for(var t=e;;){var r=t.tag;if((r===0||r===11||r===15)&&t.flags&16384&&(r=t.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var a=0;a<r.length;a++){var n=r[a],s=n.getSnapshot;n=n.value;try{if(!Eo(s(),n))return!1}catch{return!1}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Tf(e,t,r,a){t&=~x_,t&=~Lm,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var n=t;0<n;){var s=31-wo(n),i=1<<s;a[s]=-1,n&=~i}r!==0&&Xq(e,r,t)}function xE(){return ea&6?!0:(Jv(0,!1),!1)}function b_(){if(Ir!==null){if(oa===0)var e=Ir.return;else e=Ir,Vu=jm=null,n_(e),Ey=null,Dv=0,e=Ir;for(;e!==null;)C7(e.alternate,e),e=e.return;Ir=null}}function Oy(e,t){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,eUe(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),$u=0,b_(),ga=e,Ir=r=qu(e.current,null),Mr=t,oa=0,yo=null,Sf=!1,qy=Hv(e,t),y_=!1,Dy=vo=x_=Lm=Of=dn=0,Wi=Ev=null,yD=!1,t&8&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var n=31-wo(a),s=1<<n;t|=e[n],a&=~s}return Yu=t,uE(),r}function G7(e,t){pr=null,Wt.H=Ov,t===Vy||t===fE?(t=z9(),oa=3):t===JD?(t=z9(),oa=4):oa=t===p_?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,yo=t,Ir===null&&(dn=1,$1(e,fl(t,e.current)))}function K7(){var e=Po.current;return e===null?!0:(Mr&4194048)===Mr?ml===null:(Mr&62914560)===Mr||Mr&536870912?e===ml:!1}function W7(){var e=Wt.H;return Wt.H=Ov,e===null?Ov:e}function X7(){var e=Wt.A;return Wt.A=D6e,e}function Y1(){dn=4,Sf||(Mr&4194048)!==Mr&&Po.current!==null||(qy=!0),!(Of&134217727)&&!(Lm&134217727)||ga===null||Tf(ga,Mr,vo,!1)}function LM(e,t,r){var a=ea;ea|=2;var n=W7(),s=X7();(ga!==e||Mr!==t)&&(X1=null,Oy(e,t)),t=!1;var i=dn;e:do try{if(oa!==0&&Ir!==null){var o=Ir,l=yo;switch(oa){case 8:b_(),i=6;break e;case 3:case 2:case 9:case 6:Po.current===null&&(t=!0);var c=oa;if(oa=0,yo=null,vy(e,o,l,c),r&&qy){i=0;break e}break;default:c=oa,oa=0,yo=null,vy(e,o,l,c)}}F6e(),i=dn;break}catch(u){G7(e,u)}while(1);return t&&e.shellSuspendCounter++,Vu=jm=null,ea=a,Wt.H=n,Wt.A=s,Ir===null&&(ga=null,Mr=0,uE()),i}function F6e(){for(;Ir!==null;)Y7(Ir)}function B6e(e,t){var r=ea;ea|=2;var a=W7(),n=X7();ga!==e||Mr!==t?(X1=null,W1=So()+500,Oy(e,t)):qy=Hv(e,t);e:do try{if(oa!==0&&Ir!==null){t=Ir;var s=yo;t:switch(oa){case 1:oa=0,yo=null,vy(e,t,s,1);break;case 2:case 9:if(j9(s)){oa=0,yo=null,uq(t);break}t=function(){oa!==2&&oa!==9||ga!==e||(oa=7),zc(e)},s.then(t,t);break e;case 3:oa=7;break e;case 4:oa=5;break e;case 7:j9(s)?(oa=0,yo=null,uq(t)):(oa=0,yo=null,vy(e,t,s,7));break;case 5:var i=null;switch(Ir.tag){case 26:i=Ir.memoizedState;case 5:case 27:var o=Ir;if(i?g$(i):o.stateNode.complete){oa=0,yo=null;var l=o.sibling;if(l!==null)Ir=l;else{var c=o.return;c!==null?(Ir=c,bE(c)):Ir=null}break t}}oa=0,yo=null,vy(e,t,s,5);break;case 6:oa=0,yo=null,vy(e,t,s,6);break;case 8:b_(),dn=6;break e;default:throw Error(Oe(462))}}U6e();break}catch(u){G7(e,u)}while(1);return Vu=jm=null,Wt.H=a,Wt.A=n,ea=r,Ir!==null?0:(ga=null,Mr=0,uE(),dn)}function U6e(){for(;Ir!==null&&!l8e();)Y7(Ir)}function Y7(e){var t=w7(e.alternate,e,Yu);e.memoizedProps=e.pendingProps,t===null?bE(e):Ir=t}function uq(e){var t=e,r=t.alternate;switch(t.tag){case 15:case 0:t=aq(r,t,t.pendingProps,t.type,void 0,Mr);break;case 11:t=aq(r,t,t.pendingProps,t.type.render,t.ref,Mr);break;case 5:n_(t);default:C7(r,t),t=Ir=CH(t,Yu),t=w7(r,t,Yu)}e.memoizedProps=e.pendingProps,t===null?bE(e):Ir=t}function vy(e,t,r,a){Vu=jm=null,n_(t),Ey=null,Dv=0;var n=t.return;try{if(A6e(e,n,t,r,Mr)){dn=1,$1(e,fl(r,e.current)),Ir=null;return}}catch(s){if(n!==null)throw Ir=n,s;dn=1,$1(e,fl(r,e.current)),Ir=null;return}t.flags&32768?(Or||a===1?e=!0:qy||Mr&536870912?e=!1:(Sf=e=!0,(a===2||a===9||a===3||a===6)&&(a=Po.current,a!==null&&a.tag===13&&(a.flags|=16384))),J7(t,e)):bE(t)}function bE(e){var t=e;do{if(t.flags&32768){J7(t,Sf);return}e=t.return;var r=L6e(t.alternate,t,Yu);if(r!==null){Ir=r;return}if(t=t.sibling,t!==null){Ir=t;return}Ir=t=e}while(t!==null);dn===0&&(dn=5)}function J7(e,t){do{var r=R6e(e.alternate,e);if(r!==null){r.flags&=32767,Ir=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!t&&(e=e.sibling,e!==null)){Ir=e;return}Ir=e=r}while(e!==null);dn=6,Ir=null}function dq(e,t,r,a,n,s,i,o,l){e.cancelPendingCommit=null;do vE();while(Qn!==0);if(ea&6)throw Error(Oe(327));if(t!==null){if(t===e.current)throw Error(Oe(177));if(s=t.lanes|t.childLanes,s|=HD,x8e(e,r,s,i,o,l),e===ga&&(Ir=ga=null,Mr=0),_y=t,Nf=e,$u=r,xD=s,bD=n,q7=a,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,q6e(D1,function(){return r$(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,t.subtreeFlags&13878||a){a=Wt.T,Wt.T=null,n=ta.p,ta.p=2,i=ea,ea|=4;try{k6e(e,t,r)}finally{ea=i,ta.p=n,Wt.T=a}}Qn=1,Q7(),Z7(),e$()}}function Q7(){if(Qn===1){Qn=0;var e=Nf,t=_y,r=(t.flags&13878)!==0;if(t.subtreeFlags&13878||r){r=Wt.T,Wt.T=null;var a=ta.p;ta.p=2;var n=ea;ea|=4;try{_7(t,e);var s=CD,i=gH(e.containerInfo),o=s.focusedElem,l=s.selectionRange;if(i!==o&&o&&o.ownerDocument&&hH(o.ownerDocument.documentElement,o)){if(l!==null&&qD(o)){var c=l.start,u=l.end;if(u===void 0&&(u=c),"selectionStart"in o)o.selectionStart=c,o.selectionEnd=Math.min(u,o.value.length);else{var d=o.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=o.textContent.length,h=Math.min(l.start,m),x=l.end===void 0?h:Math.min(l.end,m);!p.extend&&h>x&&(i=x,x=h,h=i);var g=M9(o,h),y=M9(o,x);if(g&&y&&(p.rangeCount!==1||p.anchorNode!==g.node||p.anchorOffset!==g.offset||p.focusNode!==y.node||p.focusOffset!==y.offset)){var b=d.createRange();b.setStart(g.node,g.offset),p.removeAllRanges(),h>x?(p.addRange(b),p.extend(y.node,y.offset)):(b.setEnd(y.node,y.offset),p.addRange(b))}}}}for(d=[],p=o;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<d.length;o++){var S=d[o];S.element.scrollLeft=S.left,S.element.scrollTop=S.top}}nE=!!wD,CD=wD=null}finally{ea=n,ta.p=a,Wt.T=r}}e.current=t,Qn=2}}function Z7(){if(Qn===2){Qn=0;var e=Nf,t=_y,r=(t.flags&8772)!==0;if(t.subtreeFlags&8772||r){r=Wt.T,Wt.T=null;var a=ta.p;ta.p=2;var n=ea;ea|=4;try{L7(e,t.alternate,t)}finally{ea=n,ta.p=a,Wt.T=r}}Qn=3}}function e$(){if(Qn===4||Qn===3){Qn=0,c8e();var e=Nf,t=_y,r=$u,a=q7;t.subtreeFlags&10256||t.flags&10256?Qn=5:(Qn=0,_y=Nf=null,t$(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&(If=null),OD(r),t=t.stateNode,To&&typeof To.onCommitFiberRoot=="function")try{To.onCommitFiberRoot(qv,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=Wt.T,n=ta.p,ta.p=2,Wt.T=null;try{for(var s=e.onRecoverableError,i=0;i<a.length;i++){var o=a[i];s(o.value,{componentStack:o.stack})}}finally{Wt.T=t,ta.p=n}}$u&3&&vE(),zc(e),n=e.pendingLanes,r&261930&&n&42?e===vD?Pv++:(Pv=0,vD=e):Pv=0,Jv(0,!1)}}function t$(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Wv(t)))}function vE(){return Q7(),Z7(),e$(),r$()}function r$(){if(Qn!==5)return!1;var e=Nf,t=xD;xD=0;var r=OD($u),a=Wt.T,n=ta.p;try{ta.p=32>r?32:r,Wt.T=null,r=bD,bD=null;var s=Nf,i=$u;if(Qn=0,_y=Nf=null,$u=0,ea&6)throw Error(Oe(331));var o=ea;if(ea|=4,j7(s.current),F7(s,s.current,i,r),ea=o,Jv(0,!1),To&&typeof To.onPostCommitFiberRoot=="function")try{To.onPostCommitFiberRoot(qv,s)}catch{}return!0}finally{ta.p=n,Wt.T=a,t$(e,t)}}function fq(e,t,r){t=fl(r,t),t=pD(e.stateNode,t,2),e=Af(e,t,2),e!==null&&($v(e,2),zc(e))}function la(e,t,r){if(e.tag===3)fq(e,e,r);else for(;t!==null;){if(t.tag===3){fq(t,e,r);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(If===null||!If.has(a))){e=fl(r,e),r=y7(2),a=Af(t,r,2),a!==null&&(x7(r,a,t,e),$v(a,2),zc(a));break}}t=t.return}}function RM(e,t,r){var a=e.pingCache;if(a===null){a=e.pingCache=new _6e;var n=new Set;a.set(t,n)}else n=a.get(t),n===void 0&&(n=new Set,a.set(t,n));n.has(r)||(y_=!0,n.add(r),e=j6e.bind(null,e,t,r),t.then(e,e))}function j6e(e,t,r){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,ga===e&&(Mr&r)===r&&(dn===4||dn===3&&(Mr&62914560)===Mr&&300>So()-yE?!(ea&2)&&Oy(e,0):x_|=r,Dy===Mr&&(Dy=0)),zc(e)}function a$(e,t){t===0&&(t=Wq()),e=Um(e,t),e!==null&&($v(e,t),zc(e))}function z6e(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),a$(e,r)}function V6e(e,t){var r=0;switch(e.tag){case 31:case 13:var a=e.stateNode,n=e.memoizedState;n!==null&&(r=n.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(Oe(314))}a!==null&&a.delete(t),a$(e,r)}function q6e(e,t){return DD(e,t)}var J1=null,ly=null,SD=!1,Q1=!1,kM=!1,wf=0;function zc(e){e!==ly&&e.next===null&&(ly===null?J1=ly=e:ly=ly.next=e),Q1=!0,SD||(SD=!0,$6e())}function Jv(e,t){if(!kM&&Q1){kM=!0;do for(var r=!1,a=J1;a!==null;){if(!t)if(e!==0){var n=a.pendingLanes;if(n===0)var s=0;else{var i=a.suspendedLanes,o=a.pingedLanes;s=(1<<31-wo(42|e)+1)-1,s&=n&~(i&~o),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(r=!0,pq(a,s))}else s=Mr,s=iE(a,a===ga?s:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),!(s&3)||Hv(a,s)||(r=!0,pq(a,s));a=a.next}while(r);kM=!1}}function H6e(){n$()}function n$(){Q1=SD=!1;var e=0;wf!==0&&Z6e()&&(e=wf);for(var t=So(),r=null,a=J1;a!==null;){var n=a.next,s=s$(a,t);s===0?(a.next=null,r===null?J1=n:r.next=n,n===null&&(ly=r)):(r=a,(e!==0||s&3)&&(Q1=!0)),a=n}Qn!==0&&Qn!==5||Jv(e,!1),wf!==0&&(wf=0)}function s$(e,t){for(var r=e.suspendedLanes,a=e.pingedLanes,n=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var i=31-wo(s),o=1<<i,l=n[i];l===-1?(!(o&r)||o&a)&&(n[i]=y8e(o,t)):l<=t&&(e.expiredLanes|=o),s&=~o}if(t=ga,r=Mr,r=iE(e,e===t?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,r===0||e===t&&(oa===2||oa===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&oM(a),e.callbackNode=null,e.callbackPriority=0;if(!(r&3)||Hv(e,r)){if(t=r&-r,t===e.callbackPriority)return t;switch(a!==null&&oM(a),OD(r)){case 2:case 8:r=Gq;break;case 32:r=D1;break;case 268435456:r=Kq;break;default:r=D1}return a=i$.bind(null,e),r=DD(r,a),e.callbackPriority=t,e.callbackNode=r,t}return a!==null&&a!==null&&oM(a),e.callbackPriority=2,e.callbackNode=null,2}function i$(e,t){if(Qn!==0&&Qn!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(vE()&&e.callbackNode!==r)return null;var a=Mr;return a=iE(e,e===ga?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:($7(e,a,t),s$(e,So()),e.callbackNode!=null&&e.callbackNode===r?i$.bind(null,e):null)}function pq(e,t){if(vE())return null;$7(e,t,!0)}function $6e(){tUe(function(){ea&6?DD($q,H6e):n$()})}function v_(){if(wf===0){var e=Ry;e===0&&(e=ZC,ZC<<=1,!(ZC&261888)&&(ZC=256)),wf=e}return wf}function mq(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:y1(""+e)}function hq(e,t){var r=t.ownerDocument.createElement("input");return r.name=t.name,r.value=t.value,e.id&&r.setAttribute("form",e.id),t.parentNode.insertBefore(r,t),e=new FormData(e),r.parentNode.removeChild(r),e}function G6e(e,t,r,a,n){if(t==="submit"&&r&&r.stateNode===n){var s=mq((n[Yi]||null).action),i=a.submitter;i&&(t=(t=i[Yi]||null)?mq(t.formAction):i.getAttribute("formAction"),t!==null&&(s=t,i=null));var o=new oE("action","action",null,a,n);e.push({event:o,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(wf!==0){var l=i?hq(n,i):new FormData(n);dD(r,{pending:!0,data:l,method:n.method,action:s},null,l)}}else typeof s=="function"&&(o.preventDefault(),l=i?hq(n,i):new FormData(n),dD(r,{pending:!0,data:l,method:n.method,action:s},s,l))},currentTarget:n}]})}}for(d1=0;d1<ZM.length;d1++)f1=ZM[d1],gq=f1.toLowerCase(),yq=f1[0].toUpperCase()+f1.slice(1),Xl(gq,"on"+yq);var f1,gq,yq,d1;Xl(xH,"onAnimationEnd");Xl(bH,"onAnimationIteration");Xl(vH,"onAnimationStart");Xl("dblclick","onDoubleClick");Xl("focusin","onFocus");Xl("focusout","onBlur");Xl(u6e,"onTransitionRun");Xl(d6e,"onTransitionStart");Xl(f6e,"onTransitionCancel");Xl(SH,"onTransitionEnd");Ny("onMouseEnter",["mouseout","mouseover"]);Ny("onMouseLeave",["mouseout","mouseover"]);Ny("onPointerEnter",["pointerout","pointerover"]);Ny("onPointerLeave",["pointerout","pointerover"]);Om("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Om("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Om("onBeforeInput",["compositionend","keypress","textInput","paste"]);Om("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Om("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Om("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fv="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(" "),K6e=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Fv));function o$(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var a=e[r],n=a.event;a=a.listeners;e:{var s=void 0;if(t)for(var i=a.length-1;0<=i;i--){var o=a[i],l=o.instance,c=o.currentTarget;if(o=o.listener,l!==s&&n.isPropagationStopped())break e;s=o,n.currentTarget=c;try{s(n)}catch(u){O1(u)}n.currentTarget=null,s=l}else for(i=0;i<a.length;i++){if(o=a[i],l=o.instance,c=o.currentTarget,o=o.listener,l!==s&&n.isPropagationStopped())break e;s=o,n.currentTarget=c;try{s(n)}catch(u){O1(u)}n.currentTarget=null,s=l}}}}function Ar(e,t){var r=t[$M];r===void 0&&(r=t[$M]=new Set);var a=e+"__bubble";r.has(a)||(l$(t,e,2,!1),r.add(a))}function MM(e,t,r){var a=0;t&&(a|=4),l$(r,e,a,t)}var p1="_reactListening"+Math.random().toString(36).slice(2);function S_(e){if(!e[p1]){e[p1]=!0,Zq.forEach(function(r){r!=="selectionchange"&&(K6e.has(r)||MM(r,!1,e),MM(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[p1]||(t[p1]=!0,MM("selectionchange",!1,t))}}function l$(e,t,r,a){switch(S$(t)){case 2:var n=SUe;break;case 8:n=TUe;break;default:n=E_}r=n.bind(null,t,r,e),n=void 0,!YM||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),a?n!==void 0?e.addEventListener(t,r,{capture:!0,passive:n}):e.addEventListener(t,r,!0):n!==void 0?e.addEventListener(t,r,{passive:n}):e.addEventListener(t,r,!1)}function DM(e,t,r,a,n){var s=a;if(!(t&1)&&!(t&2)&&a!==null)e:for(;;){if(a===null)return;var i=a.tag;if(i===3||i===4){var o=a.stateNode.containerInfo;if(o===n)break;if(i===4)for(i=a.return;i!==null;){var l=i.tag;if((l===3||l===4)&&i.stateNode.containerInfo===n)return;i=i.return}for(;o!==null;){if(i=dy(o),i===null)return;if(l=i.tag,l===5||l===6||l===26||l===27){a=s=i;continue e}o=o.parentNode}}a=a.return}oH(function(){var c=s,u=UD(r),d=[];e:{var f=TH.get(e);if(f!==void 0){var p=oE,m=e;switch(e){case"keypress":if(b1(r)===0)break e;case"keydown":case"keyup":p=V8e;break;case"focusin":m="focus",p=fM;break;case"focusout":m="blur",p=fM;break;case"beforeblur":case"afterblur":p=fM;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":p=C9;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=L8e;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=$8e;break;case xH:case bH:case vH:p=M8e;break;case SH:p=K8e;break;case"scroll":case"scrollend":p=I8e;break;case"wheel":p=X8e;break;case"copy":case"cut":case"paste":p=_8e;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=P9;break;case"toggle":case"beforetoggle":p=J8e}var h=(t&4)!==0,x=!h&&(e==="scroll"||e==="scrollend"),g=h?f!==null?f+"Capture":null:f;h=[];for(var y=c,b;y!==null;){var S=y;if(b=S.stateNode,S=S.tag,S!==5&&S!==26&&S!==27||b===null||g===null||(S=Nv(y,g),S!=null&&h.push(Bv(y,S,b))),x)break;y=y.return}0<h.length&&(f=new p(f,m,null,r,u),d.push({event:f,listeners:h}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&r!==XM&&(m=r.relatedTarget||r.fromElement)&&(dy(m)||m[Uy]))break e;if((p||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,p?(m=r.relatedTarget||r.toElement,p=c,m=m?dy(m):null,m!==null&&(x=Vv(m),h=m.tag,m!==x||h!==5&&h!==27&&h!==6)&&(m=null)):(p=null,m=c),p!==m)){if(h=C9,S="onMouseLeave",g="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(h=P9,S="onPointerLeave",g="onPointerEnter",y="pointer"),x=p==null?f:fv(p),b=m==null?f:fv(m),f=new h(S,y+"leave",p,r,u),f.target=x,f.relatedTarget=b,S=null,dy(u)===c&&(h=new h(g,y+"enter",m,r,u),h.target=b,h.relatedTarget=x,S=h),x=S,p&&m)t:{for(h=W6e,g=p,y=m,b=0,S=g;S;S=h(S))b++;S=0;for(var w=y;w;w=h(w))S++;for(;0<b-S;)g=h(g),b--;for(;0<S-b;)y=h(y),S--;for(;b--;){if(g===y||y!==null&&g===y.alternate){h=g;break t}g=h(g),y=h(y)}h=null}else h=null;p!==null&&xq(d,f,p,h,!1),m!==null&&x!==null&&xq(d,x,m,h,!0)}}e:{if(f=c?fv(c):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var P=L9;else if(N9(f))if(pH)P=o6e;else{P=s6e;var C=n6e}else p=f.nodeName,!p||p.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?c&&BD(c.elementType)&&(P=L9):P=i6e;if(P&&(P=P(e,c))){fH(d,P,r,u);break e}C&&C(e,f,c),e==="focusout"&&c&&f.type==="number"&&c.memoizedProps.value!=null&&WM(f,"number",f.value)}switch(C=c?fv(c):window,e){case"focusin":(N9(C)||C.contentEditable==="true")&&(my=C,JM=c,yv=null);break;case"focusout":yv=JM=my=null;break;case"mousedown":QM=!0;break;case"contextmenu":case"mouseup":case"dragend":QM=!1,D9(d,r,u);break;case"selectionchange":if(c6e)break;case"keydown":case"keyup":D9(d,r,u)}var I;if(VD)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else py?uH(e,r)&&(R="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(R="onCompositionStart");R&&(cH&&r.locale!=="ko"&&(py||R!=="onCompositionStart"?R==="onCompositionEnd"&&py&&(I=lH()):(vf=u,jD="value"in vf?vf.value:vf.textContent,py=!0)),C=Z1(c,R),0<C.length&&(R=new E9(R,e,null,r,u),d.push({event:R,listeners:C}),I?R.data=I:(I=dH(r),I!==null&&(R.data=I)))),(I=Z8e?e6e(e,r):t6e(e,r))&&(R=Z1(c,"onBeforeInput"),0<R.length&&(C=new E9("onBeforeInput","beforeinput",null,r,u),d.push({event:C,listeners:R}),C.data=I)),G6e(d,e,c,r,u)}o$(d,t)})}function Bv(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Z1(e,t){for(var r=t+"Capture",a=[];e!==null;){var n=e,s=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||s===null||(n=Nv(e,r),n!=null&&a.unshift(Bv(e,n,s)),n=Nv(e,t),n!=null&&a.push(Bv(e,n,s))),e.tag===3)return a;e=e.return}return[]}function W6e(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function xq(e,t,r,a,n){for(var s=t._reactName,i=[];r!==null&&r!==a;){var o=r,l=o.alternate,c=o.stateNode;if(o=o.tag,l!==null&&l===a)break;o!==5&&o!==26&&o!==27||c===null||(l=c,n?(c=Nv(r,s),c!=null&&i.unshift(Bv(r,c,l))):n||(c=Nv(r,s),c!=null&&i.push(Bv(r,c,l)))),r=r.return}i.length!==0&&e.push({event:t,listeners:i})}var X6e=/\r\n?/g,Y6e=/\u0000|\uFFFD/g;function bq(e){return(typeof e=="string"?e:""+e).replace(X6e,`
|
|
`).replace(Y6e,"")}function c$(e,t){return t=bq(t),bq(e)===t}function pa(e,t,r,a,n,s){switch(r){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Ly(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Ly(e,""+a);break;case"className":r1(e,"class",a);break;case"tabIndex":r1(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":r1(e,r,a);break;case"style":iH(e,a,s);break;case"data":if(t!=="object"){r1(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||r!=="href")){e.removeAttribute(r);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(r);break}a=y1(""+a),e.setAttribute(r,a);break;case"action":case"formAction":if(typeof a=="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 s=="function"&&(r==="formAction"?(t!=="input"&&pa(e,t,"name",n.name,n,null),pa(e,t,"formEncType",n.formEncType,n,null),pa(e,t,"formMethod",n.formMethod,n,null),pa(e,t,"formTarget",n.formTarget,n,null)):(pa(e,t,"encType",n.encType,n,null),pa(e,t,"method",n.method,n,null),pa(e,t,"target",n.target,n,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(r);break}a=y1(""+a),e.setAttribute(r,a);break;case"onClick":a!=null&&(e.onclick=zu);break;case"onScroll":a!=null&&Ar("scroll",e);break;case"onScrollEnd":a!=null&&Ar("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(Oe(61));if(r=a.__html,r!=null){if(n.children!=null)throw Error(Oe(60));e.innerHTML=r}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}r=y1(""+a),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":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(r,""+a):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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":a===!0?e.setAttribute(r,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(r,a):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(r,a):e.removeAttribute(r);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(r):e.setAttribute(r,a);break;case"popover":Ar("beforetoggle",e),Ar("toggle",e),g1(e,"popover",a);break;case"xlinkActuate":Mu(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Mu(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Mu(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Mu(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Mu(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Mu(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Mu(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Mu(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Mu(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":g1(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=P8e.get(r)||r,g1(e,r,a))}}function TD(e,t,r,a,n,s){switch(r){case"style":iH(e,a,s);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(Oe(61));if(r=a.__html,r!=null){if(n.children!=null)throw Error(Oe(60));e.innerHTML=r}}break;case"children":typeof a=="string"?Ly(e,a):(typeof a=="number"||typeof a=="bigint")&&Ly(e,""+a);break;case"onScroll":a!=null&&Ar("scroll",e);break;case"onScrollEnd":a!=null&&Ar("scrollend",e);break;case"onClick":a!=null&&(e.onclick=zu);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!eH.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(n=r.endsWith("Capture"),t=r.slice(2,n?r.length-7:void 0),s=e[Yi]||null,s=s!=null?s[r]:null,typeof s=="function"&&e.removeEventListener(t,s,n),typeof a=="function")){typeof s!="function"&&s!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(t,a,n);break e}r in e?e[r]=a:a===!0?e.setAttribute(r,""):g1(e,r,a)}}}function Us(e,t,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ar("error",e),Ar("load",e);var a=!1,n=!1,s;for(s in r)if(r.hasOwnProperty(s)){var i=r[s];if(i!=null)switch(s){case"src":a=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(Oe(137,t));default:pa(e,t,s,i,r,null)}}n&&pa(e,t,"srcSet",r.srcSet,r,null),a&&pa(e,t,"src",r.src,r,null);return;case"input":Ar("invalid",e);var o=s=i=n=null,l=null,c=null;for(a in r)if(r.hasOwnProperty(a)){var u=r[a];if(u!=null)switch(a){case"name":n=u;break;case"type":i=u;break;case"checked":l=u;break;case"defaultChecked":c=u;break;case"value":s=u;break;case"defaultValue":o=u;break;case"children":case"dangerouslySetInnerHTML":if(u!=null)throw Error(Oe(137,t));break;default:pa(e,t,a,u,r,null)}}aH(e,s,o,l,c,i,n,!1);return;case"select":Ar("invalid",e),a=i=s=null;for(n in r)if(r.hasOwnProperty(n)&&(o=r[n],o!=null))switch(n){case"value":s=o;break;case"defaultValue":i=o;break;case"multiple":a=o;default:pa(e,t,n,o,r,null)}t=s,r=i,e.multiple=!!a,t!=null?Ty(e,!!a,t,!1):r!=null&&Ty(e,!!a,r,!0);return;case"textarea":Ar("invalid",e),s=n=a=null;for(i in r)if(r.hasOwnProperty(i)&&(o=r[i],o!=null))switch(i){case"value":a=o;break;case"defaultValue":n=o;break;case"children":s=o;break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(Oe(91));break;default:pa(e,t,i,o,r,null)}sH(e,a,n,s);return;case"option":for(l in r)if(r.hasOwnProperty(l)&&(a=r[l],a!=null))switch(l){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:pa(e,t,l,a,r,null)}return;case"dialog":Ar("beforetoggle",e),Ar("toggle",e),Ar("cancel",e),Ar("close",e);break;case"iframe":case"object":Ar("load",e);break;case"video":case"audio":for(a=0;a<Fv.length;a++)Ar(Fv[a],e);break;case"image":Ar("error",e),Ar("load",e);break;case"details":Ar("toggle",e);break;case"embed":case"source":case"link":Ar("error",e),Ar("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(c in r)if(r.hasOwnProperty(c)&&(a=r[c],a!=null))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(Oe(137,t));default:pa(e,t,c,a,r,null)}return;default:if(BD(t)){for(u in r)r.hasOwnProperty(u)&&(a=r[u],a!==void 0&&TD(e,t,u,a,r,void 0));return}}for(o in r)r.hasOwnProperty(o)&&(a=r[o],a!=null&&pa(e,t,o,a,r,null))}function J6e(e,t,r,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,s=null,i=null,o=null,l=null,c=null,u=null;for(p in r){var d=r[p];if(r.hasOwnProperty(p)&&d!=null)switch(p){case"checked":break;case"value":break;case"defaultValue":l=d;default:a.hasOwnProperty(p)||pa(e,t,p,null,a,d)}}for(var f in a){var p=a[f];if(d=r[f],a.hasOwnProperty(f)&&(p!=null||d!=null))switch(f){case"type":s=p;break;case"name":n=p;break;case"checked":c=p;break;case"defaultChecked":u=p;break;case"value":i=p;break;case"defaultValue":o=p;break;case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(Oe(137,t));break;default:p!==d&&pa(e,t,f,p,a,d)}}KM(e,i,o,l,c,u,s,n);return;case"select":p=i=o=f=null;for(s in r)if(l=r[s],r.hasOwnProperty(s)&&l!=null)switch(s){case"value":break;case"multiple":p=l;default:a.hasOwnProperty(s)||pa(e,t,s,null,a,l)}for(n in a)if(s=a[n],l=r[n],a.hasOwnProperty(n)&&(s!=null||l!=null))switch(n){case"value":f=s;break;case"defaultValue":o=s;break;case"multiple":i=s;default:s!==l&&pa(e,t,n,s,a,l)}t=o,r=i,a=p,f!=null?Ty(e,!!r,f,!1):!!a!=!!r&&(t!=null?Ty(e,!!r,t,!0):Ty(e,!!r,r?[]:"",!1));return;case"textarea":p=f=null;for(o in r)if(n=r[o],r.hasOwnProperty(o)&&n!=null&&!a.hasOwnProperty(o))switch(o){case"value":break;case"children":break;default:pa(e,t,o,null,a,n)}for(i in a)if(n=a[i],s=r[i],a.hasOwnProperty(i)&&(n!=null||s!=null))switch(i){case"value":f=n;break;case"defaultValue":p=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(Oe(91));break;default:n!==s&&pa(e,t,i,n,a,s)}nH(e,f,p);return;case"option":for(var m in r)if(f=r[m],r.hasOwnProperty(m)&&f!=null&&!a.hasOwnProperty(m))switch(m){case"selected":e.selected=!1;break;default:pa(e,t,m,null,a,f)}for(l in a)if(f=a[l],p=r[l],a.hasOwnProperty(l)&&f!==p&&(f!=null||p!=null))switch(l){case"selected":e.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:pa(e,t,l,f,a,p)}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 h in r)f=r[h],r.hasOwnProperty(h)&&f!=null&&!a.hasOwnProperty(h)&&pa(e,t,h,null,a,f);for(c in a)if(f=a[c],p=r[c],a.hasOwnProperty(c)&&f!==p&&(f!=null||p!=null))switch(c){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(Oe(137,t));break;default:pa(e,t,c,f,a,p)}return;default:if(BD(t)){for(var x in r)f=r[x],r.hasOwnProperty(x)&&f!==void 0&&!a.hasOwnProperty(x)&&TD(e,t,x,void 0,a,f);for(u in a)f=a[u],p=r[u],!a.hasOwnProperty(u)||f===p||f===void 0&&p===void 0||TD(e,t,u,f,a,p);return}}for(var g in r)f=r[g],r.hasOwnProperty(g)&&f!=null&&!a.hasOwnProperty(g)&&pa(e,t,g,null,a,f);for(d in a)f=a[d],p=r[d],!a.hasOwnProperty(d)||f===p||f==null&&p==null||pa(e,t,d,f,a,p)}function vq(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Q6e(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,r=performance.getEntriesByType("resource"),a=0;a<r.length;a++){var n=r[a],s=n.transferSize,i=n.initiatorType,o=n.duration;if(s&&o&&vq(i)){for(i=0,o=n.responseEnd,a+=1;a<r.length;a++){var l=r[a],c=l.startTime;if(c>o)break;var u=l.transferSize,d=l.initiatorType;u&&vq(d)&&(l=l.responseEnd,i+=u*(l<o?1:(o-c)/(l-c)))}if(--a,t+=8*(s+i)/(n.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var wD=null,CD=null;function eE(e){return e.nodeType===9?e:e.ownerDocument}function Sq(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 u$(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function ED(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var _M=null;function Z6e(){var e=window.event;return e&&e.type==="popstate"?e===_M?!1:(_M=e,!0):(_M=null,!1)}var d$=typeof setTimeout=="function"?setTimeout:void 0,eUe=typeof clearTimeout=="function"?clearTimeout:void 0,Tq=typeof Promise=="function"?Promise:void 0,tUe=typeof queueMicrotask=="function"?queueMicrotask:typeof Tq<"u"?function(e){return Tq.resolve(null).then(e).catch(rUe)}:d$;function rUe(e){setTimeout(function(){throw e})}function Bf(e){return e==="head"}function wq(e,t){var r=t,a=0;do{var n=r.nextSibling;if(e.removeChild(r),n&&n.nodeType===8)if(r=n.data,r==="/$"||r==="/&"){if(a===0){e.removeChild(n),By(t);return}a--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")a++;else if(r==="html")Av(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,Av(r);for(var s=r.firstChild;s;){var i=s.nextSibling,o=s.nodeName;s[Gv]||o==="SCRIPT"||o==="STYLE"||o==="LINK"&&s.rel.toLowerCase()==="stylesheet"||r.removeChild(s),s=i}}else r==="body"&&Av(e.ownerDocument.body);r=n}while(r);By(t)}function Cq(e,t){var r=e;e=0;do{var a=r.nextSibling;if(r.nodeType===1?t?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(t?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),a&&a.nodeType===8)if(r=a.data,r==="/$"){if(e===0)break;e--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=a}while(r)}function PD(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var r=t;switch(t=t.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":PD(r),FD(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function aUe(e,t,r,a){for(;e.nodeType===1;){var n=r;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Gv])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(s=e.getAttribute("rel"),s==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(s!==n.rel||e.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||e.getAttribute("title")!==(n.title==null?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(s=e.getAttribute("src"),(s!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var s=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===s)return e}else return e;if(e=hl(e.nextSibling),e===null)break}return null}function nUe(e,t,r){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=hl(e.nextSibling),e===null))return null;return e}function f$(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=hl(e.nextSibling),e===null))return null;return e}function AD(e){return e.data==="$?"||e.data==="$~"}function ID(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function sUe(e,t){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||r.readyState!=="loading")t();else{var a=function(){t(),r.removeEventListener("DOMContentLoaded",a)};r.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function hl(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var ND=null;function Eq(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(t===0)return hl(e.nextSibling);t--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||t++}e=e.nextSibling}return null}function Pq(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(t===0)return e;t--}else r!=="/$"&&r!=="/&"||t++}e=e.previousSibling}return null}function p$(e,t,r){switch(t=eE(r),e){case"html":if(e=t.documentElement,!e)throw Error(Oe(452));return e;case"head":if(e=t.head,!e)throw Error(Oe(453));return e;case"body":if(e=t.body,!e)throw Error(Oe(454));return e;default:throw Error(Oe(451))}}function Av(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);FD(e)}var gl=new Map,Aq=new Set;function tE(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ju=ta.d;ta.d={f:iUe,r:oUe,D:lUe,C:cUe,L:uUe,m:dUe,X:pUe,S:fUe,M:mUe};function iUe(){var e=Ju.f(),t=xE();return e||t}function oUe(e){var t=jy(e);t!==null&&t.tag===5&&t.type==="form"?i7(t):Ju.r(e)}var Hy=typeof document>"u"?null:document;function m$(e,t,r){var a=Hy;if(a&&typeof t=="string"&&t){var n=dl(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof r=="string"&&(n+='[crossorigin="'+r+'"]'),Aq.has(n)||(Aq.add(n),e={rel:e,crossOrigin:r,href:t},a.querySelector(n)===null&&(t=a.createElement("link"),Us(t,"link",e),vs(t),a.head.appendChild(t)))}}function lUe(e){Ju.D(e),m$("dns-prefetch",e,null)}function cUe(e,t){Ju.C(e,t),m$("preconnect",e,t)}function uUe(e,t,r){Ju.L(e,t,r);var a=Hy;if(a&&e&&t){var n='link[rel="preload"][as="'+dl(t)+'"]';t==="image"&&r&&r.imageSrcSet?(n+='[imagesrcset="'+dl(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(n+='[imagesizes="'+dl(r.imageSizes)+'"]')):n+='[href="'+dl(e)+'"]';var s=n;switch(t){case"style":s=Fy(e);break;case"script":s=$y(e)}gl.has(s)||(e=_a({rel:"preload",href:t==="image"&&r&&r.imageSrcSet?void 0:e,as:t},r),gl.set(s,e),a.querySelector(n)!==null||t==="style"&&a.querySelector(Qv(s))||t==="script"&&a.querySelector(Zv(s))||(t=a.createElement("link"),Us(t,"link",e),vs(t),a.head.appendChild(t)))}}function dUe(e,t){Ju.m(e,t);var r=Hy;if(r&&e){var a=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+dl(a)+'"][href="'+dl(e)+'"]',s=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=$y(e)}if(!gl.has(s)&&(e=_a({rel:"modulepreload",href:e},t),gl.set(s,e),r.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(Zv(s)))return}a=r.createElement("link"),Us(a,"link",e),vs(a),r.head.appendChild(a)}}}function fUe(e,t,r){Ju.S(e,t,r);var a=Hy;if(a&&e){var n=Sy(a).hoistableStyles,s=Fy(e);t=t||"default";var i=n.get(s);if(!i){var o={loading:0,preload:null};if(i=a.querySelector(Qv(s)))o.loading=5;else{e=_a({rel:"stylesheet",href:e,"data-precedence":t},r),(r=gl.get(s))&&T_(e,r);var l=i=a.createElement("link");vs(l),Us(l,"link",e),l._p=new Promise(function(c,u){l.onload=c,l.onerror=u}),l.addEventListener("load",function(){o.loading|=1}),l.addEventListener("error",function(){o.loading|=2}),o.loading|=4,A1(i,t,a)}i={type:"stylesheet",instance:i,count:1,state:o},n.set(s,i)}}}function pUe(e,t){Ju.X(e,t);var r=Hy;if(r&&e){var a=Sy(r).hoistableScripts,n=$y(e),s=a.get(n);s||(s=r.querySelector(Zv(n)),s||(e=_a({src:e,async:!0},t),(t=gl.get(n))&&w_(e,t),s=r.createElement("script"),vs(s),Us(s,"link",e),r.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},a.set(n,s))}}function mUe(e,t){Ju.M(e,t);var r=Hy;if(r&&e){var a=Sy(r).hoistableScripts,n=$y(e),s=a.get(n);s||(s=r.querySelector(Zv(n)),s||(e=_a({src:e,async:!0,type:"module"},t),(t=gl.get(n))&&w_(e,t),s=r.createElement("script"),vs(s),Us(s,"link",e),r.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},a.set(n,s))}}function Iq(e,t,r,a){var n=(n=Cf.current)?tE(n):null;if(!n)throw Error(Oe(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(t=Fy(r.href),r=Sy(n).hoistableStyles,a=r.get(t),a||(a={type:"style",instance:null,count:0,state:null},r.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=Fy(r.href);var s=Sy(n).hoistableStyles,i=s.get(e);if(i||(n=n.ownerDocument||n,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,i),(s=n.querySelector(Qv(e)))&&!s._p&&(i.instance=s,i.state.loading=5),gl.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},gl.set(e,r),s||hUe(n,e,r,i.state))),t&&a===null)throw Error(Oe(528,""));return i}if(t&&a!==null)throw Error(Oe(529,""));return null;case"script":return t=r.async,r=r.src,typeof r=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=$y(r),r=Sy(n).hoistableScripts,a=r.get(t),a||(a={type:"script",instance:null,count:0,state:null},r.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(Oe(444,e))}}function Fy(e){return'href="'+dl(e)+'"'}function Qv(e){return'link[rel="stylesheet"]['+e+"]"}function h$(e){return _a({},e,{"data-precedence":e.precedence,precedence:null})}function hUe(e,t,r,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Us(t,"link",r),vs(t),e.head.appendChild(t))}function $y(e){return'[src="'+dl(e)+'"]'}function Zv(e){return"script[async]"+e}function Nq(e,t,r){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+dl(r.href)+'"]');if(a)return t.instance=a,vs(a),a;var n=_a({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),vs(a),Us(a,"style",n),A1(a,r.precedence,e),t.instance=a;case"stylesheet":n=Fy(r.href);var s=e.querySelector(Qv(n));if(s)return t.state.loading|=4,t.instance=s,vs(s),s;a=h$(r),(n=gl.get(n))&&T_(a,n),s=(e.ownerDocument||e).createElement("link"),vs(s);var i=s;return i._p=new Promise(function(o,l){i.onload=o,i.onerror=l}),Us(s,"link",a),t.state.loading|=4,A1(s,r.precedence,e),t.instance=s;case"script":return s=$y(r.src),(n=e.querySelector(Zv(s)))?(t.instance=n,vs(n),n):(a=r,(n=gl.get(s))&&(a=_a({},r),w_(a,n)),e=e.ownerDocument||e,n=e.createElement("script"),vs(n),Us(n,"link",a),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(Oe(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(a=t.instance,t.state.loading|=4,A1(a,r.precedence,e));return t.instance}function A1(e,t,r){for(var a=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,s=n,i=0;i<a.length;i++){var o=a[i];if(o.dataset.precedence===t)s=o;else if(s!==n)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=r.nodeType===9?r.head:r,t.insertBefore(e,t.firstChild))}function T_(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function w_(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var I1=null;function Lq(e,t,r){if(I1===null){var a=new Map,n=I1=new Map;n.set(r,a)}else n=I1,a=n.get(r),a||(a=new Map,n.set(r,a));if(a.has(e))return a;for(a.set(e,null),r=r.getElementsByTagName(e),n=0;n<r.length;n++){var s=r[n];if(!(s[Gv]||s[Os]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var i=s.getAttribute(t)||"";i=e+i;var o=a.get(i);o?o.push(s):a.set(i,[s])}}return a}function Rq(e,t,r){e=e.ownerDocument||e,e.head.insertBefore(r,t==="title"?e.querySelector("head > title"):null)}function gUe(e,t,r){if(r===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function g$(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function yUe(e,t,r,a){if(r.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&!(r.state.loading&4)){if(r.instance===null){var n=Fy(a.href),s=t.querySelector(Qv(n));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=rE.bind(e),t.then(e,e)),r.state.loading|=4,r.instance=s,vs(s);return}s=t.ownerDocument||t,a=h$(a),(n=gl.get(n))&&T_(a,n),s=s.createElement("link"),vs(s);var i=s;i._p=new Promise(function(o,l){i.onload=o,i.onerror=l}),Us(s,"link",a),r.instance=s}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,t),(t=r.state.preload)&&!(r.state.loading&3)&&(e.count++,r=rE.bind(e),t.addEventListener("load",r),t.addEventListener("error",r))}}var OM=0;function xUe(e,t){return e.stylesheets&&e.count===0&&N1(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var a=setTimeout(function(){if(e.stylesheets&&N1(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4+t);0<e.imgBytes&&OM===0&&(OM=62500*Q6e());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&N1(e,e.stylesheets),e.unsuspend)){var s=e.unsuspend;e.unsuspend=null,s()}},(e.imgBytes>OM?50:800)+t);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function rE(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)N1(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var aE=null;function N1(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,aE=new Map,t.forEach(bUe,e),aE=null,rE.call(e))}function bUe(e,t){if(!(t.state.loading&4)){var r=aE.get(e);if(r)var a=r.get(null);else{r=new Map,aE.set(e,r);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<n.length;s++){var i=n[s];(i.nodeName==="LINK"||i.getAttribute("media")!=="not all")&&(r.set(i.dataset.precedence,i),a=i)}a&&r.set(null,a)}n=t.instance,i=n.getAttribute("data-precedence"),s=r.get(i)||a,s===a&&r.set(null,n),r.set(i,n),this.count++,a=rE.bind(this),n.addEventListener("load",a),n.addEventListener("error",a),s?s.parentNode.insertBefore(n,s.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var Uv={$$typeof:ju,Provider:null,Consumer:null,_currentValue:Pm,_currentValue2:Pm,_threadCount:0};function vUe(e,t,r,a,n,s,i,o,l){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=lM(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lM(0),this.hiddenUpdates=lM(null),this.identifierPrefix=a,this.onUncaughtError=n,this.onCaughtError=s,this.onRecoverableError=i,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function y$(e,t,r,a,n,s,i,o,l,c,u,d){return e=new vUe(e,t,r,i,l,c,u,d,o),t=1,s===!0&&(t|=24),s=bo(3,null,null,t),e.current=s,s.stateNode=e,t=XD(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:a,isDehydrated:r,cache:t},QD(s),e}function x$(e){return e?(e=yy,e):yy}function b$(e,t,r,a,n,s){n=x$(n),a.context===null?a.context=n:a.pendingContext=n,a=Pf(t),a.payload={element:r},s=s===void 0?null:s,s!==null&&(a.callback=s),r=Af(e,a,t),r!==null&&(Xi(r,e,t),bv(r,e,t))}function kq(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function C_(e,t){kq(e,t),(e=e.alternate)&&kq(e,t)}function v$(e){if(e.tag===13||e.tag===31){var t=Um(e,67108864);t!==null&&Xi(t,e,67108864),C_(e,67108864)}}function Mq(e){if(e.tag===13||e.tag===31){var t=Co();t=_D(t);var r=Um(e,t);r!==null&&Xi(r,e,t),C_(e,t)}}var nE=!0;function SUe(e,t,r,a){var n=Wt.T;Wt.T=null;var s=ta.p;try{ta.p=2,E_(e,t,r,a)}finally{ta.p=s,Wt.T=n}}function TUe(e,t,r,a){var n=Wt.T;Wt.T=null;var s=ta.p;try{ta.p=8,E_(e,t,r,a)}finally{ta.p=s,Wt.T=n}}function E_(e,t,r,a){if(nE){var n=LD(a);if(n===null)DM(e,t,a,sE,r),Dq(e,a);else if(CUe(n,e,t,r,a))a.stopPropagation();else if(Dq(e,a),t&4&&-1<wUe.indexOf(e)){for(;n!==null;){var s=jy(n);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var i=wm(s.pendingLanes);if(i!==0){var o=s;for(o.pendingLanes|=2,o.entangledLanes|=2;i;){var l=1<<31-wo(i);o.entanglements[1]|=l,i&=~l}zc(s),!(ea&6)&&(W1=So()+500,Jv(0,!1))}}break;case 31:case 13:o=Um(s,2),o!==null&&Xi(o,s,2),xE(),C_(s,2)}if(s=LD(a),s===null&&DM(e,t,a,sE,r),s===n)break;n=s}n!==null&&a.stopPropagation()}else DM(e,t,a,null,r)}}function LD(e){return e=UD(e),P_(e)}var sE=null;function P_(e){if(sE=null,e=dy(e),e!==null){var t=Vv(e);if(t===null)e=null;else{var r=t.tag;if(r===13){if(e=jq(t),e!==null)return e;e=null}else if(r===31){if(e=zq(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return sE=e,null}function S$(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(u8e()){case $q:return 2;case Gq:return 8;case D1:case d8e:return 32;case Kq:return 268435456;default:return 32}default:return 32}}var RD=!1,Lf=null,Rf=null,kf=null,jv=new Map,zv=new Map,xf=[],wUe="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 Dq(e,t){switch(e){case"focusin":case"focusout":Lf=null;break;case"dragenter":case"dragleave":Rf=null;break;case"mouseover":case"mouseout":kf=null;break;case"pointerover":case"pointerout":jv.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":zv.delete(t.pointerId)}}function lv(e,t,r,a,n,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:r,eventSystemFlags:a,nativeEvent:s,targetContainers:[n]},t!==null&&(t=jy(t),t!==null&&v$(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function CUe(e,t,r,a,n){switch(t){case"focusin":return Lf=lv(Lf,e,t,r,a,n),!0;case"dragenter":return Rf=lv(Rf,e,t,r,a,n),!0;case"mouseover":return kf=lv(kf,e,t,r,a,n),!0;case"pointerover":var s=n.pointerId;return jv.set(s,lv(jv.get(s)||null,e,t,r,a,n)),!0;case"gotpointercapture":return s=n.pointerId,zv.set(s,lv(zv.get(s)||null,e,t,r,a,n)),!0}return!1}function T$(e){var t=dy(e.target);if(t!==null){var r=Vv(t);if(r!==null){if(t=r.tag,t===13){if(t=jq(r),t!==null){e.blockedOn=t,y9(e.priority,function(){Mq(r)});return}}else if(t===31){if(t=zq(r),t!==null){e.blockedOn=t,y9(e.priority,function(){Mq(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function L1(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=LD(e.nativeEvent);if(r===null){r=e.nativeEvent;var a=new r.constructor(r.type,r);XM=a,r.target.dispatchEvent(a),XM=null}else return t=jy(r),t!==null&&v$(t),e.blockedOn=r,!1;t.shift()}return!0}function _q(e,t,r){L1(e)&&r.delete(t)}function EUe(){RD=!1,Lf!==null&&L1(Lf)&&(Lf=null),Rf!==null&&L1(Rf)&&(Rf=null),kf!==null&&L1(kf)&&(kf=null),jv.forEach(_q),zv.forEach(_q)}function m1(e,t){e.blockedOn===t&&(e.blockedOn=null,RD||(RD=!0,Zn.unstable_scheduleCallback(Zn.unstable_NormalPriority,EUe)))}var h1=null;function Oq(e){h1!==e&&(h1=e,Zn.unstable_scheduleCallback(Zn.unstable_NormalPriority,function(){h1===e&&(h1=null);for(var t=0;t<e.length;t+=3){var r=e[t],a=e[t+1],n=e[t+2];if(typeof a!="function"){if(P_(a||r)===null)continue;break}var s=jy(r);s!==null&&(e.splice(t,3),t-=3,dD(s,{pending:!0,data:n,method:r.method,action:a},a,n))}}))}function By(e){function t(l){return m1(l,e)}Lf!==null&&m1(Lf,e),Rf!==null&&m1(Rf,e),kf!==null&&m1(kf,e),jv.forEach(t),zv.forEach(t);for(var r=0;r<xf.length;r++){var a=xf[r];a.blockedOn===e&&(a.blockedOn=null)}for(;0<xf.length&&(r=xf[0],r.blockedOn===null);)T$(r),r.blockedOn===null&&xf.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(a=0;a<r.length;a+=3){var n=r[a],s=r[a+1],i=n[Yi]||null;if(typeof s=="function")i||Oq(r);else if(i){var o=null;if(s&&s.hasAttribute("formAction")){if(n=s,i=s[Yi]||null)o=i.formAction;else if(P_(n)!==null)continue}else o=i.action;typeof o=="function"?r[a+1]=o:(r.splice(a,3),a-=3),Oq(r)}}}function w$(){function e(s){s.canIntercept&&s.info==="react-transition"&&s.intercept({handler:function(){return new Promise(function(i){return n=i})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=null),a||setTimeout(r,20)}function r(){if(!a&&!navigation.transition){var s=navigation.currentEntry;s&&s.url!=null&&navigation.navigate(s.url,{state:s.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,n=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(r,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),n!==null&&(n(),n=null)}}}function A_(e){this._internalRoot=e}SE.prototype.render=A_.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Oe(409));var r=t.current,a=Co();b$(r,a,e,t,null,null)};SE.prototype.unmount=A_.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;b$(e.current,2,null,e,null,null),xE(),t[Uy]=null}};function SE(e){this._internalRoot=e}SE.prototype.unstable_scheduleHydration=function(e){if(e){var t=Qq();e={blockedOn:null,target:e,priority:t};for(var r=0;r<xf.length&&t!==0&&t<xf[r].priority;r++);xf.splice(r,0,e),r===0&&T$(e)}};var Fq=Bq.version;if(Fq!=="19.2.0")throw Error(Oe(527,Fq,"19.2.0"));ta.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Oe(188)):(e=Object.keys(e).join(","),Error(Oe(268,e)));return e=a8e(t),e=e!==null?Vq(e):null,e=e===null?null:e.stateNode,e};var PUe={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:Wt,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(cv=__REACT_DEVTOOLS_GLOBAL_HOOK__,!cv.isDisabled&&cv.supportsFiber))try{qv=cv.inject(PUe),To=cv}catch{}var cv;TE.createRoot=function(e,t){if(!Uq(e))throw Error(Oe(299));var r=!1,a="",n=m7,s=h7,i=g7;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=y$(e,1,!1,null,null,r,a,null,n,s,i,w$),e[Uy]=t.current,S_(e),new A_(t)};TE.hydrateRoot=function(e,t,r){if(!Uq(e))throw Error(Oe(299));var a=!1,n="",s=m7,i=h7,o=g7,l=null;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(n=r.identifierPrefix),r.onUncaughtError!==void 0&&(s=r.onUncaughtError),r.onCaughtError!==void 0&&(i=r.onCaughtError),r.onRecoverableError!==void 0&&(o=r.onRecoverableError),r.formState!==void 0&&(l=r.formState)),t=y$(e,1,!0,t,r??null,a,n,l,s,i,o,w$),t.context=x$(null),r=t.current,a=Co(),a=_D(a),n=Pf(a),n.callback=null,Af(r,n,a),r=a,t.current.lanes=r,$v(t,r),zc(t),e[Uy]=t.current,S_(e),new SE(t)};TE.version="19.2.0"});var wE=ne((Xut,P$)=>{"use strict";function E$(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(E$)}catch{}}E$(),P$.exports=C$()});var A$,AUe,I_,CE,I$,N_=de(()=>{A$=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),AUe=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,a)=>a?a.toUpperCase():r.toLowerCase()),I_=e=>{let t=AUe(e);return t.charAt(0).toUpperCase()+t.slice(1)},CE=(...e)=>e.filter((t,r,a)=>Boolean(t)&&t.trim()!==""&&a.indexOf(t)===r).join(" ").trim(),I$=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0}});var N$,L$=de(()=>{N$={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"}});var eS,R$,k$=de(()=>{eS=N(Le());L$();N_();R$=(0,eS.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:a,className:n="",children:s,iconNode:i,...o},l)=>(0,eS.createElement)("svg",{ref:l,...N$,width:t,height:t,stroke:e,strokeWidth:a?Number(r)*24/Number(t):r,className:CE("lucide",n),...!s&&!I$(o)&&{"aria-hidden":"true"},...o},[...i.map(([c,u])=>(0,eS.createElement)(c,u)),...Array.isArray(s)?s:[s]]))});var EE,Q,Fe=de(()=>{EE=N(Le());N_();k$();Q=(e,t)=>{let r=(0,EE.forwardRef)(({className:a,...n},s)=>(0,EE.createElement)(R$,{ref:s,iconNode:t,className:CE(`lucide-${A$(I_(e))}`,`lucide-${e}`,a),...n}));return r.displayName=I_(e),r}});var IUe,Yl,M$=de(()=>{Fe();IUe=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Yl=Q("activity",IUe)});var NUe,Vc,D$=de(()=>{Fe();NUe=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Vc=Q("arrow-left",NUe)});var LUe,ei,_$=de(()=>{Fe();LUe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],ei=Q("arrow-right",LUe)});var RUe,Gy,O$=de(()=>{Fe();RUe=[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]],Gy=Q("award",RUe)});var kUe,tS,F$=de(()=>{Fe();kUe=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],tS=Q("book-open",kUe)});var MUe,Ky,B$=de(()=>{Fe();MUe=[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]],Ky=Q("bookmark",MUe)});var DUe,Uf,U$=de(()=>{Fe();DUe=[["rect",{width:"18",height:"14",x:"3",y:"5",rx:"2",ry:"2",key:"12ruh7"}],["path",{d:"M7 15h4M15 15h2M7 11h2M13 11h4",key:"1ueiar"}]],Uf=Q("captions",DUe)});var _Ue,jf,j$=de(()=>{Fe();_Ue=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],jf=Q("chart-column",_Ue)});var OUe,qc,z$=de(()=>{Fe();OUe=[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]],qc=Q("chart-pie",OUe)});var FUe,Jl,V$=de(()=>{Fe();FUe=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Jl=Q("check",FUe)});var BUe,ti,q$=de(()=>{Fe();BUe=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ti=Q("chevron-down",BUe)});var UUe,yl,H$=de(()=>{Fe();UUe=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],yl=Q("chevron-right",UUe)});var jUe,rS,$$=de(()=>{Fe();jUe=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],rS=Q("chevron-up",jUe)});var zUe,es,G$=de(()=>{Fe();zUe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],es=Q("circle-alert",zUe)});var VUe,zf,K$=de(()=>{Fe();VUe=[["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"}]],zf=Q("circle-arrow-up",VUe)});var qUe,ts,W$=de(()=>{Fe();qUe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ts=Q("circle-check",qUe)});var HUe,xl,X$=de(()=>{Fe();HUe=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],xl=Q("circle-check-big",HUe)});var $Ue,zm,Y$=de(()=>{Fe();$Ue=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],zm=Q("circle-dot",$Ue)});var GUe,Ql,J$=de(()=>{Fe();GUe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Ql=Q("circle-question-mark",GUe)});var KUe,bl,Q$=de(()=>{Fe();KUe=[["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"}]],bl=Q("circle-x",KUe)});var WUe,Ti,Z$=de(()=>{Fe();WUe=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ti=Q("clock",WUe)});var XUe,vl,eG=de(()=>{Fe();XUe=[["path",{d:"M12 13v8l-4-4",key:"1f5nwf"}],["path",{d:"m12 21 4-4",key:"1lfcce"}],["path",{d:"M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284",key:"ui1hmy"}]],vl=Q("cloud-download",XUe)});var YUe,Vf,tG=de(()=>{Fe();YUe=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],Vf=Q("cloud-upload",YUe)});var JUe,Ca,rG=de(()=>{Fe();JUe=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],Ca=Q("cloud",JUe)});var QUe,Ao,aG=de(()=>{Fe();QUe=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Ao=Q("code",QUe)});var ZUe,Vm,nG=de(()=>{Fe();ZUe=[["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M14 2v2",key:"6buw04"}],["path",{d:"M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1",key:"pwadti"}],["path",{d:"M6 2v2",key:"colzsn"}]],Vm=Q("coffee",ZUe)});var eje,Qu,sG=de(()=>{Fe();eje=[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]],Qu=Q("coins",eje)});var tje,aS,iG=de(()=>{Fe();tje=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],aS=Q("database",tje)});var rje,js,oG=de(()=>{Fe();rje=[["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"}]],js=Q("download",rje)});var aje,Qi,lG=de(()=>{Fe();aje=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Qi=Q("ellipsis",aje)});var nje,nS,cG=de(()=>{Fe();nje=[["path",{d:"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21",key:"g5wo59"}],["path",{d:"m5.082 11.09 8.828 8.828",key:"1wx5vj"}]],nS=Q("eraser",nje)});var sje,Wy,uG=de(()=>{Fe();sje=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Wy=Q("external-link",sje)});var ije,Xy,dG=de(()=>{Fe();ije=[["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"}]],Xy=Q("eye",ije)});var oje,Yy,fG=de(()=>{Fe();oje=[["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:"m9 15 2 2 4-4",key:"1grp1n"}]],Yy=Q("file-check",oje)});var lje,Zu,pG=de(()=>{Fe();lje=[["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"}]],Zu=Q("file-json",lje)});var cje,Zl,mG=de(()=>{Fe();cje=[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4 7V4a2 2 0 0 1 2-2 2 2 0 0 0-2 2",key:"1vk7w2"}],["path",{d:"M4.063 20.999a2 2 0 0 0 2 1L18 22a2 2 0 0 0 2-2V7l-5-5H6",key:"1jink5"}],["path",{d:"m5 11-3 3",key:"1dgrs4"}],["path",{d:"m5 17-3-3h10",key:"1mvvaf"}]],Zl=Q("file-output",cje)});var uje,qf,hG=de(()=>{Fe();uje=[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]],qf=Q("file-pen",uje)});var dje,qm,gG=de(()=>{Fe();dje=[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]],qm=Q("file-search",dje)});var fje,Zi,yG=de(()=>{Fe();fje=[["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"}]],Zi=Q("file-text",fje)});var pje,sS,xG=de(()=>{Fe();pje=[["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:"M9 13v-1h6v1",key:"1bb014"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"M11 18h2",key:"12mj7e"}]],sS=Q("file-type",pje)});var mje,Hm,bG=de(()=>{Fe();mje=[["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:"m14.5 12.5-5 5",key:"b62r18"}],["path",{d:"m9.5 12.5 5 5",key:"1rk7el"}]],Hm=Q("file-x",mje)});var hje,iS,vG=de(()=>{Fe();hje=[["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"}]],iS=Q("file",hje)});var gje,rs,SG=de(()=>{Fe();gje=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],rs=Q("folder-open",gje)});var yje,ed,TG=de(()=>{Fe();yje=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],ed=Q("folder",yje)});var xje,Io,wG=de(()=>{Fe();xje=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Io=Q("funnel",xje)});var bje,oS,CG=de(()=>{Fe();bje=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],oS=Q("gauge",bje)});var vje,td,EG=de(()=>{Fe();vje=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],td=Q("git-commit-horizontal",vje)});var Sje,Jy,PG=de(()=>{Fe();Sje=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]],Jy=Q("git-compare",Sje)});var Tje,$m,AG=de(()=>{Fe();Tje=[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]],$m=Q("git-fork",Tje)});var wje,No,IG=de(()=>{Fe();wje=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],No=Q("github",wje)});var Cje,Ea,NG=de(()=>{Fe();Cje=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Ea=Q("globe",Cje)});var Eje,lS,LG=de(()=>{Fe();Eje=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],lS=Q("grip-vertical",Eje)});var Pje,Lo,RG=de(()=>{Fe();Pje=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],Lo=Q("hard-drive",Pje)});var Aje,rd,kG=de(()=>{Fe();Aje=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],rd=Q("hash",Aje)});var Ije,ad,MG=de(()=>{Fe();Ije=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],ad=Q("heart",Ije)});var Nje,Gm,DG=de(()=>{Fe();Nje=[["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"}]],Gm=Q("history",Nje)});var Lje,Hf,_G=de(()=>{Fe();Lje=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Hf=Q("info",Lje)});var Rje,cS,OG=de(()=>{Fe();Rje=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],cS=Q("key",Rje)});var kje,Ro,FG=de(()=>{Fe();kje=[["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"}]],Ro=Q("languages",kje)});var Mje,sa,BG=de(()=>{Fe();Mje=[["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"}]],sa=Q("layers",Mje)});var Dje,eo,UG=de(()=>{Fe();Dje=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],eo=Q("layout-grid",Dje)});var _je,uS,jG=de(()=>{Fe();_je=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]],uS=Q("layout-list",_je)});var Oje,to,zG=de(()=>{Fe();Oje=[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]],to=Q("library",Oje)});var Fje,nd,VG=de(()=>{Fe();Fje=[["path",{d:"M16 5H3",key:"m91uny"}],["path",{d:"M11 12H3",key:"51ecnj"}],["path",{d:"M16 19H3",key:"zzsher"}],["path",{d:"M18 9v6",key:"1twb98"}],["path",{d:"M21 12h-6",key:"bt1uis"}]],nd=Q("list-plus",Fje)});var Bje,dS,qG=de(()=>{Fe();Bje=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],dS=Q("list-todo",Bje)});var Uje,Km,HG=de(()=>{Fe();Uje=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],Km=Q("list",Uje)});var jje,zt,$G=de(()=>{Fe();jje=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],zt=Q("loader-circle",jje)});var zje,fS,GG=de(()=>{Fe();zje=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],fS=Q("log-out",zje)});var Vje,pS,KG=de(()=>{Fe();Vje=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 15h.01",key:"q59x07"}],["path",{d:"M12 7v4",key:"xawao1"}]],pS=Q("message-square-warning",Vje)});var qje,Hc,WG=de(()=>{Fe();qje=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Hc=Q("message-square",qje)});var Hje,Qy,XG=de(()=>{Fe();Hje=[["path",{d:"M5 12h14",key:"1ays0h"}]],Qy=Q("minus",Hje)});var $je,mS,YG=de(()=>{Fe();$je=[["path",{d:"M15.033 9.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56V7.648a.645.645 0 0 1 .967-.56z",key:"vbtd3f"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",key:"x3v2xh"}]],mS=Q("monitor-play",$je)});var Gje,hS,JG=de(()=>{Fe();Gje=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],hS=Q("monitor",Gje)});var Kje,wi,QG=de(()=>{Fe();Kje=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],wi=Q("package",Kje)});var Wje,Oa,ZG=de(()=>{Fe();Wje=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],Oa=Q("palette",Wje)});var Xje,sd,eK=de(()=>{Fe();Xje=[["path",{d:"M13 21h8",key:"1jsn5i"}],["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"}]],sd=Q("pen-line",Xje)});var Yje,ro,tK=de(()=>{Fe();Yje=[["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"}]],ro=Q("pen",Yje)});var Jje,Wm,rK=de(()=>{Fe();Jje=[["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"}]],Wm=Q("pencil",Jje)});var Qje,Xm,aK=de(()=>{Fe();Qje=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Xm=Q("play",Qje)});var Zje,as,nK=de(()=>{Fe();Zje=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],as=Q("plus",Zje)});var eze,gS,sK=de(()=>{Fe();eze=[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]],gS=Q("refresh-ccw",eze)});var tze,Wr,iK=de(()=>{Fe();tze=[["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"}]],Wr=Q("refresh-cw",tze)});var rze,yS,oK=de(()=>{Fe();rze=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],yS=Q("rocket",rze)});var aze,zs,lK=de(()=>{Fe();aze=[["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"}]],zs=Q("rotate-ccw",aze)});var nze,id,cK=de(()=>{Fe();nze=[["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"}]],id=Q("save",nze)});var sze,ra,uK=de(()=>{Fe();sze=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ra=Q("search",sze)});var ize,xS,dK=de(()=>{Fe();ize=[["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"}]],xS=Q("send",ize)});var oze,ko,fK=de(()=>{Fe();oze=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],ko=Q("settings-2",oze)});var lze,$c,pK=de(()=>{Fe();lze=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],$c=Q("settings",lze)});var cze,Gc,mK=de(()=>{Fe();cze=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],Gc=Q("shield-alert",cze)});var uze,Ym,hK=de(()=>{Fe();uze=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Ym=Q("shield-check",uze)});var dze,ns,gK=de(()=>{Fe();dze=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],ns=Q("sparkles",dze)});var fze,$f,yK=de(()=>{Fe();fze=[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],$f=Q("square-check-big",fze)});var pze,Gf,xK=de(()=>{Fe();pze=[["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}]],Gf=Q("square-play",pze)});var mze,Sl,bK=de(()=>{Fe();mze=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Sl=Q("square",mze)});var hze,ao,vK=de(()=>{Fe();hze=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],ao=Q("star",hze)});var gze,Kc,SK=de(()=>{Fe();gze=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],Kc=Q("tag",gze)});var yze,bS,TK=de(()=>{Fe();yze=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],bS=Q("terminal",yze)});var xze,Jm,wK=de(()=>{Fe();xze=[["path",{d:"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2",key:"125lnx"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M14.5 16h-5",key:"1ox875"}]],Jm=Q("test-tube",xze)});var bze,Mo,CK=de(()=>{Fe();bze=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],Mo=Q("text-align-start",bze)});var vze,Ha,EK=de(()=>{Fe();vze=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Ha=Q("trash-2",vze)});var Sze,no,PK=de(()=>{Fe();Sze=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],no=Q("trending-up",Sze)});var Tze,Kf,AK=de(()=>{Fe();Tze=[["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"}]],Kf=Q("triangle-alert",Tze)});var wze,vS,IK=de(()=>{Fe();wze=[["path",{d:"M10 14.66v1.626a2 2 0 0 1-.976 1.696A5 5 0 0 0 7 21.978",key:"1n3hpd"}],["path",{d:"M14 14.66v1.626a2 2 0 0 0 .976 1.696A5 5 0 0 1 17 21.978",key:"rfe1zi"}],["path",{d:"M18 9h1.5a1 1 0 0 0 0-5H18",key:"7xy6bh"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z",key:"1mhfuq"}],["path",{d:"M6 9H4.5a1 1 0 0 1 0-5H6",key:"tex48p"}]],vS=Q("trophy",wze)});var Cze,Qm,NK=de(()=>{Fe();Cze=[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]],Qm=Q("type",Cze)});var Eze,Tl,LK=de(()=>{Fe();Eze=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Tl=Q("upload",Eze)});var Pze,Ts,RK=de(()=>{Fe();Pze=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Ts=Q("users",Pze)});var Aze,Wc,kK=de(()=>{Fe();Aze=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Wc=Q("user",Aze)});var Ize,Zm,MK=de(()=>{Fe();Ize=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],Zm=Q("video",Ize)});var Nze,Wf,DK=de(()=>{Fe();Nze=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],Wf=Q("wand-sparkles",Nze)});var Lze,eh,_K=de(()=>{Fe();Lze=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],eh=Q("x",Lze)});var Rze,so,OK=de(()=>{Fe();Rze=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],so=Q("zap",Rze)});var qt=de(()=>{U$();j$();z$();G$();K$();X$();W$();J$();Q$();eG();tG();lG();hG();wG();EG();BG();$G();tK();eK();gK();yK();xK();CK();AK();DK();M$();D$();_$();O$();F$();B$();V$();q$();H$();$$();Y$();Z$();rG();aG();nG();sG();iG();oG();cG();uG();dG();fG();pG();mG();gG();yG();xG();bG();vG();SG();TG();CG();PG();AG();IG();NG();LG();RG();kG();MG();DG();_G();OG();FG();UG();jG();zG();VG();qG();HG();GG();KG();WG();XG();YG();JG();QG();ZG();rK();aK();nK();sK();iK();oK();lK();cK();uK();dK();fK();pK();mK();hK();bK();vK();SK();TK();wK();EK();PK();IK();NK();LK();kK();RK();MK();_K();OK();});var BK=ne(PE=>{"use strict";var kze=Symbol.for("react.transitional.element"),Mze=Symbol.for("react.fragment");function FK(e,t,r){var a=null;if(r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),"key"in t){r={};for(var n in t)n!=="key"&&(r[n]=t[n])}else r=t;return t=r.ref,{$$typeof:kze,type:e,key:a,ref:t!==void 0?t:null,props:r}}PE.Fragment=Mze;PE.jsx=FK;PE.jsxs=FK});var ce=ne((xyt,UK)=>{"use strict";UK.exports=BK()});function Do(e,t,r){try{e.classList.remove("view-content");let c=e.parentElement?.querySelector(".view-header");c&&c.remove()}catch{}let a=e.shadowRoot;if(!a){if(a=e.attachShadow({mode:"open"}),t.sharedStyleSheet)a.adoptedStyleSheets=[t.sharedStyleSheet];else if(t.css){let c=document.createElement("style");c.textContent=t.css,a.appendChild(c)}}let n=a.querySelector("#i18n-react-root");n||(n=document.createElement("div"),n.id="i18n-react-root",n.className="w-full h-full",a.appendChild(n));let s=()=>{let c=document.body.classList.contains("theme-dark");n.classList.toggle("dark",c)};s();let i=new MutationObserver(c=>{for(let u of c)u.type==="attributes"&&u.attributeName==="class"&&s()});i.observe(document.body,{attributes:!0,attributeFilter:["class"]}),e.__i18n_dark_observer?.disconnect(),e.__i18n_dark_observer=i;let o=jK.get(e);o&&o.unmount();let l=(0,L_.createRoot)(n);return jK.set(e,l),l.render((0,Xc.jsx)(Xf.StrictMode,{children:(0,Xc.jsx)(Dze,{children:r})})),{root:l,shadowRoot:a,mountPoint:n}}var Xf,L_,Xc,SS,Dze,jK,zK=de(()=>{Xf=N(Le()),L_=N(wE());qt();Xc=N(ce()),SS=class{constructor(t,r){this.root=null;this.isOpen=!1;this.isDragging=!1;this.dragStartX=0;this.dragStartY=0;this.initialLeft=0;this.initialTop=0;this.dragHandleEl=null;this.initElements=()=>{this.containerEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.containerEl.appendChild(this.contentEl),this.maskEl=document.createElement("div"),this.containerEl.appendChild(this.maskEl)};this.initStyles=()=>{this.containerEl.classList.add("react-view__container"),this.contentEl.classList.add("react-view__content"),this.maskEl.classList.add("react-view__mask");let{width:t,height:r}=this.options.config||{};t&&(this.contentEl.style.width=typeof t=="number"?`${t}px`:t),r&&(this.contentEl.style.height=typeof r=="number"?`${r}px`:r),this.options.config?.draggable&&(this.contentEl.style.position="absolute",this.contentEl.style.left="50%",this.contentEl.style.top="50%",this.contentEl.style.transform="translate(-50%, -50%)")};this.initContent=()=>{let{view:t,props:r}=this.options;this.root=(0,L_.createRoot)(this.contentEl),this.root.render(Xf.createElement(t,{...r,ReactView:this}))};this.open=()=>{if(this.isOpen)return;(this.options.parent||document.body).appendChild(this.containerEl),this.isOpen=!0,this.bindEvents(),this.options.onOpen?.()};this.close=()=>{this.isOpen&&(this.root?.unmount(),this.root=null,this.containerEl.remove(),this.isOpen=!1,this.unbindEvents(),this.unbindDragEvents(),this.options.onClose?.())};this.bindEvents=()=>{this.maskEl.addEventListener("click",t=>{t.target===this.maskEl&&this.close()}),document.addEventListener("keydown",this.handleKeyDown)};this.unbindEvents=()=>{document.removeEventListener("keydown",this.handleKeyDown)};this.handleKeyDown=t=>{t.key==="Escape"&&this.close()};this.handleDragStart=t=>{if(!this.contentEl)return;this.isDragging=!0,this.dragStartX=t.clientX,this.dragStartY=t.clientY;let r=this.contentEl.getBoundingClientRect();this.initialLeft=r.left,this.initialTop=r.top,this.contentEl.classList.add("react-view__content--dragging")};this.handleDragMove=t=>{if(!this.isDragging||!this.contentEl)return;let r=t.clientX-this.dragStartX,a=t.clientY-this.dragStartY;this.contentEl.style.left=`${this.initialLeft+r}px`,this.contentEl.style.top=`${this.initialTop+a}px`,this.contentEl.style.transform="none"};this.handleDragEnd=()=>{this.contentEl&&(this.isDragging=!1,this.contentEl.classList.remove("react-view__content--dragging"))};if(this.app=t,!r.view)throw new Error("ReactView\u5FC5\u987B\u63D0\u4F9Bcomponent\u53C2\u6570");this.options={...r},this.initElements(),this.initStyles(),this.initContent()}setDragHandle(t){this.options.config?.draggable&&(this.dragHandleEl&&this.unbindDragEvents(),this.dragHandleEl=t,this.bindDragEvents())}bindDragEvents(){this.dragHandleEl&&(this.dragHandleEl.addEventListener("mousedown",this.handleDragStart),document.addEventListener("mousemove",this.handleDragMove),document.addEventListener("mouseup",this.handleDragEnd),this.dragHandleEl.style.cursor="move")}unbindDragEvents(){this.dragHandleEl&&(this.dragHandleEl.removeEventListener("mousedown",this.handleDragStart),document.removeEventListener("mousemove",this.handleDragMove),document.removeEventListener("mouseup",this.handleDragEnd))}static open(t,r){let a=new SS(t,r);return a.open(),a}},Dze=({children:e})=>{let[t,r]=Xf.useState(!1);return Xf.useEffect(()=>{let a=setTimeout(()=>{r(!0)},10);return()=>clearTimeout(a)},[]),t?(0,Xc.jsx)(Xc.Fragment,{children:e}):(0,Xc.jsxs)("div",{className:"w-full h-full flex flex-col items-center justify-center bg-background text-muted-foreground animate-pulse",children:[(0,Xc.jsx)(zt,{className:"h-8 w-8 animate-spin mb-4 text-primary"}),(0,Xc.jsx)("div",{className:"text-sm font-medium",children:"Loading View..."})]})},jK=new WeakMap});var VK,R_,qK=de(()=>{VK=require("obsidian"),R_=()=>{(0,VK.addIcon)("i18n_translate",'<svg t="1726147647142" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5625" width="100" height="100"><path d="M213.333333 640v85.333333a85.333333 85.333333 0 0 0 78.933334 85.077334L298.666667 810.666667h128v85.333333H298.666667a170.666667 170.666667 0 0 1-170.666667-170.666667v-85.333333h85.333333z m554.666667-213.333333l187.733333 469.333333h-91.946666l-51.242667-128h-174.506667l-51.157333 128h-91.904L682.666667 426.666667h85.333333z m-42.666667 123.093333L672.128 682.666667h106.325333L725.333333 549.76zM341.333333 85.333333v85.333334h170.666667v298.666666H341.333333v128H256v-128H85.333333V170.666667h170.666667V85.333333h85.333333z m384 42.666667a170.666667 170.666667 0 0 1 170.666667 170.666667v85.333333h-85.333333V298.666667a85.333333 85.333333 0 0 0-85.333334-85.333334h-128V128h128zM256 256H170.666667v128h85.333333V256z m170.666667 0H341.333333v128h85.333334V256z" p-id="5626" fill="currentColor"></path></svg>')}});var AE,HK=de(()=>{AE=class{constructor(t,r){this.active=!1;this.onPick=t,this.onCancel=r}activate(){if(this.active)return;this.active=!0,document.body.style.cursor="crosshair";let t=document.createElement("style");t.id="i18n-picker-style",t.innerHTML=`
|
|
.i18n-pick-target {
|
|
outline: 2px dashed #0064ff !important;
|
|
outline-offset: -2px !important;
|
|
background-color: rgba(0, 100, 255, 0.1) !important;
|
|
transition: all 0.1s ease !important;
|
|
}
|
|
* {
|
|
pointer-events: auto !important;
|
|
}
|
|
`,document.head.appendChild(t);let r=s=>{let i=s.target;document.querySelectorAll(".i18n-pick-target").forEach(o=>o.classList.remove("i18n-pick-target")),i.classList.add("i18n-pick-target")},a=s=>{s.preventDefault(),s.stopPropagation();let i=s.target,o=i.innerText||i.textContent||"";o.trim()?this.onPick(o.trim()):this.onCancel(),this.deactivate()},n=s=>{s.key==="Escape"&&(this.onCancel(),this.deactivate())};window.addEventListener("mouseover",r,!0),window.addEventListener("click",a,!0),window.addEventListener("keydown",n,!0),this._handlers={handleMouseOver:r,handleClick:a,handleKeyDown:n}}deactivate(){if(!this.active)return;this.active=!1,document.body.style.cursor="",document.getElementById("i18n-picker-style")?.remove(),document.querySelectorAll(".i18n-pick-target").forEach(n=>n.classList.remove("i18n-pick-target"));let{handleMouseOver:t,handleClick:r,handleKeyDown:a}=this._handlers;window.removeEventListener("mouseover",t,!0),window.removeEventListener("click",r,!0),window.removeEventListener("keydown",a,!0)}}});var TS={};qb(TS,{AstTranslator:()=>yi,ImmersiveTranslate:()=>Y0,ReactView:()=>SS,RegexTranslator:()=>Hi,StringPicker:()=>AE,activateIMT:()=>O2,calculateChecksum:()=>xs,cn:()=>sl,compareVersions:()=>l4e,createSelectors:()=>Ru,deactivateIMT:()=>F2,deflate:()=>K4e,escapeSpecialChars:()=>BV,extractionJavaScriptCode:()=>s4e,formatTimestamp:()=>W2,formatTimestamp_concise:()=>X4e,generatePlugin:()=>o4e,generateTheme:()=>k2,i18nOpen:()=>kc,icons:()=>R_,inflate:()=>W4e,info:()=>$C,isPlugin:()=>u4e,isPluginTranslationV1:()=>c4e,isTheme:()=>d4e,isValidPluginTranslationV1Format:()=>K2,isValidThemeTranslationFormat:()=>G4e,mergeAstItems:()=>M2,mergeRegexItems:()=>D2,mountReactView:()=>Do,parseIssueTitle:()=>jV,unescapeSpecialChars:()=>UV,useGlobalStore:()=>Dc,useGlobalStoreInstance:()=>He,validateTranslation:()=>$4e,validationJavaScriptCode:()=>n4e});var Vt=de(()=>{N2();L2();lf();yV();xV();bV();SV();FV();GC();zV();VV();qV();HV();YV();zK();qK();HK()});var Es=ne(p3=>{"use strict";p3.fromCallback=function(e){return Object.defineProperty(function(...t){if(typeof t[t.length-1]=="function")e.apply(this,t);else return new Promise((r,a)=>{t.push((n,s)=>n!=null?a(n):r(s)),e.apply(this,t)})},"name",{value:e.name})};p3.fromPromise=function(e){return Object.defineProperty(function(...t){let r=t[t.length-1];if(typeof r!="function")return e.apply(this,t);t.pop(),e.apply(this,t).then(a=>r(null,a),r)},"name",{value:e.name})}});var wee=ne((FCt,Tee)=>{var mp=require("constants"),q$e=process.cwd,ZP=null,H$e=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return ZP||(ZP=q$e.call(process)),ZP};try{process.cwd()}catch{}typeof process.chdir=="function"&&(m3=process.chdir,process.chdir=function(e){ZP=null,m3.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,m3));var m3;Tee.exports=$$e;function $$e(e){mp.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||r(e),e.chown=s(e.chown),e.fchown=s(e.fchown),e.lchown=s(e.lchown),e.chmod=a(e.chmod),e.fchmod=a(e.fchmod),e.lchmod=a(e.lchmod),e.chownSync=i(e.chownSync),e.fchownSync=i(e.fchownSync),e.lchownSync=i(e.lchownSync),e.chmodSync=n(e.chmodSync),e.fchmodSync=n(e.fchmodSync),e.lchmodSync=n(e.lchmodSync),e.stat=o(e.stat),e.fstat=o(e.fstat),e.lstat=o(e.lstat),e.statSync=l(e.statSync),e.fstatSync=l(e.fstatSync),e.lstatSync=l(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(u,d,f){f&&process.nextTick(f)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(u,d,f,p){p&&process.nextTick(p)},e.lchownSync=function(){}),H$e==="win32"&&(e.rename=typeof e.rename!="function"?e.rename:function(u){function d(f,p,m){var h=Date.now(),x=0;u(f,p,function g(y){if(y&&(y.code==="EACCES"||y.code==="EPERM"||y.code==="EBUSY")&&Date.now()-h<6e4){setTimeout(function(){e.stat(p,function(b,S){b&&b.code==="ENOENT"?u(f,p,g):m(y)})},x),x<100&&(x+=10);return}m&&m(y)})}return Object.setPrototypeOf&&Object.setPrototypeOf(d,u),d}(e.rename)),e.read=typeof e.read!="function"?e.read:function(u){function d(f,p,m,h,x,g){var y;if(g&&typeof g=="function"){var b=0;y=function(S,w,P){if(S&&S.code==="EAGAIN"&&b<10)return b++,u.call(e,f,p,m,h,x,y);g.apply(this,arguments)}}return u.call(e,f,p,m,h,x,y)}return Object.setPrototypeOf&&Object.setPrototypeOf(d,u),d}(e.read),e.readSync=typeof e.readSync!="function"?e.readSync:function(u){return function(d,f,p,m,h){for(var x=0;;)try{return u.call(e,d,f,p,m,h)}catch(g){if(g.code==="EAGAIN"&&x<10){x++;continue}throw g}}}(e.readSync);function t(u){u.lchmod=function(d,f,p){u.open(d,mp.O_WRONLY|mp.O_SYMLINK,f,function(m,h){if(m){p&&p(m);return}u.fchmod(h,f,function(x){u.close(h,function(g){p&&p(x||g)})})})},u.lchmodSync=function(d,f){var p=u.openSync(d,mp.O_WRONLY|mp.O_SYMLINK,f),m=!0,h;try{h=u.fchmodSync(p,f),m=!1}finally{if(m)try{u.closeSync(p)}catch{}else u.closeSync(p)}return h}}function r(u){mp.hasOwnProperty("O_SYMLINK")&&u.futimes?(u.lutimes=function(d,f,p,m){u.open(d,mp.O_SYMLINK,function(h,x){if(h){m&&m(h);return}u.futimes(x,f,p,function(g){u.close(x,function(y){m&&m(g||y)})})})},u.lutimesSync=function(d,f,p){var m=u.openSync(d,mp.O_SYMLINK),h,x=!0;try{h=u.futimesSync(m,f,p),x=!1}finally{if(x)try{u.closeSync(m)}catch{}else u.closeSync(m)}return h}):u.futimes&&(u.lutimes=function(d,f,p,m){m&&process.nextTick(m)},u.lutimesSync=function(){})}function a(u){return u&&function(d,f,p){return u.call(e,d,f,function(m){c(m)&&(m=null),p&&p.apply(this,arguments)})}}function n(u){return u&&function(d,f){try{return u.call(e,d,f)}catch(p){if(!c(p))throw p}}}function s(u){return u&&function(d,f,p,m){return u.call(e,d,f,p,function(h){c(h)&&(h=null),m&&m.apply(this,arguments)})}}function i(u){return u&&function(d,f,p){try{return u.call(e,d,f,p)}catch(m){if(!c(m))throw m}}}function o(u){return u&&function(d,f,p){typeof f=="function"&&(p=f,f=null);function m(h,x){x&&(x.uid<0&&(x.uid+=4294967296),x.gid<0&&(x.gid+=4294967296)),p&&p.apply(this,arguments)}return f?u.call(e,d,f,m):u.call(e,d,m)}}function l(u){return u&&function(d,f){var p=f?u.call(e,d,f):u.call(e,d);return p&&(p.uid<0&&(p.uid+=4294967296),p.gid<0&&(p.gid+=4294967296)),p}}function c(u){if(!u||u.code==="ENOSYS")return!0;var d=!process.getuid||process.getuid()!==0;return!!(d&&(u.code==="EINVAL"||u.code==="EPERM"))}}});var Pee=ne((BCt,Eee)=>{var Cee=require("stream").Stream;Eee.exports=G$e;function G$e(e){return{ReadStream:t,WriteStream:r};function t(a,n){if(!(this instanceof t))return new t(a,n);Cee.call(this);var s=this;this.path=a,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,n=n||{};for(var i=Object.keys(n),o=0,l=i.length;o<l;o++){var c=i[o];this[c]=n[c]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){s._read()});return}e.open(this.path,this.flags,this.mode,function(u,d){if(u){s.emit("error",u),s.readable=!1;return}s.fd=d,s.emit("open",d),s._read()})}function r(a,n){if(!(this instanceof r))return new r(a,n);Cee.call(this),this.path=a,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,n=n||{};for(var s=Object.keys(n),i=0,o=s.length;i<o;i++){var l=s[i];this[l]=n[l]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var Iee=ne((UCt,Aee)=>{"use strict";Aee.exports=W$e;var K$e=Object.getPrototypeOf||function(e){return e.__proto__};function W$e(e){if(e===null||typeof e!="object")return e;if(e instanceof Object)var t={__proto__:K$e(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}),t}});var Nx=ne((jCt,y3)=>{var an=require("fs"),X$e=wee(),Y$e=Pee(),J$e=Iee(),eA=require("util"),Hs,rA;typeof Symbol=="function"&&typeof Symbol.for=="function"?(Hs=Symbol.for("graceful-fs.queue"),rA=Symbol.for("graceful-fs.previous")):(Hs="___graceful-fs.queue",rA="___graceful-fs.previous");function Q$e(){}function Ree(e,t){Object.defineProperty(e,Hs,{get:function(){return t}})}var Eh=Q$e;eA.debuglog?Eh=eA.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Eh=function(){var e=eA.format.apply(eA,arguments);e="GFS4: "+e.split(/\n/).join(`
|
|
GFS4: `)});an[Hs]||(Nee=global[Hs]||[],Ree(an,Nee),an.close=function(e){function t(r,a){return e.call(an,r,function(n){n||Lee(),typeof a=="function"&&a.apply(this,arguments)})}return Object.defineProperty(t,rA,{value:e}),t}(an.close),an.closeSync=function(e){function t(r){e.apply(an,arguments),Lee()}return Object.defineProperty(t,rA,{value:e}),t}(an.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Eh(an[Hs]),require("assert").equal(an[Hs].length,0)}));var Nee;global[Hs]||Ree(global,an[Hs]);y3.exports=h3(J$e(an));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!an.__patched&&(y3.exports=h3(an),an.__patched=!0);function h3(e){X$e(e),e.gracefulify=h3,e.createReadStream=w,e.createWriteStream=P;var t=e.readFile;e.readFile=r;function r(R,O,D){return typeof O=="function"&&(D=O,O=null),W(R,O,D);function W(J,me,Z,q){return t(J,me,function(V){V&&(V.code==="EMFILE"||V.code==="ENFILE")?Ix([W,[J,me,Z],V,q||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}var a=e.writeFile;e.writeFile=n;function n(R,O,D,W){return typeof D=="function"&&(W=D,D=null),J(R,O,D,W);function J(me,Z,q,V,L){return a(me,Z,q,function(k){k&&(k.code==="EMFILE"||k.code==="ENFILE")?Ix([J,[me,Z,q,V],k,L||Date.now(),Date.now()]):typeof V=="function"&&V.apply(this,arguments)})}}var s=e.appendFile;s&&(e.appendFile=i);function i(R,O,D,W){return typeof D=="function"&&(W=D,D=null),J(R,O,D,W);function J(me,Z,q,V,L){return s(me,Z,q,function(k){k&&(k.code==="EMFILE"||k.code==="ENFILE")?Ix([J,[me,Z,q,V],k,L||Date.now(),Date.now()]):typeof V=="function"&&V.apply(this,arguments)})}}var o=e.copyFile;o&&(e.copyFile=l);function l(R,O,D,W){return typeof D=="function"&&(W=D,D=0),J(R,O,D,W);function J(me,Z,q,V,L){return o(me,Z,q,function(k){k&&(k.code==="EMFILE"||k.code==="ENFILE")?Ix([J,[me,Z,q,V],k,L||Date.now(),Date.now()]):typeof V=="function"&&V.apply(this,arguments)})}}var c=e.readdir;e.readdir=d;var u=/^v[0-5]\./;function d(R,O,D){typeof O=="function"&&(D=O,O=null);var W=u.test(process.version)?function(Z,q,V,L){return c(Z,J(Z,q,V,L))}:function(Z,q,V,L){return c(Z,q,J(Z,q,V,L))};return W(R,O,D);function J(me,Z,q,V){return function(L,k){L&&(L.code==="EMFILE"||L.code==="ENFILE")?Ix([W,[me,Z,q],L,V||Date.now(),Date.now()]):(k&&k.sort&&k.sort(),typeof q=="function"&&q.call(this,L,k))}}}if(process.version.substr(0,4)==="v0.8"){var f=Y$e(e);g=f.ReadStream,b=f.WriteStream}var p=e.ReadStream;p&&(g.prototype=Object.create(p.prototype),g.prototype.open=y);var m=e.WriteStream;m&&(b.prototype=Object.create(m.prototype),b.prototype.open=S),Object.defineProperty(e,"ReadStream",{get:function(){return g},set:function(R){g=R},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return b},set:function(R){b=R},enumerable:!0,configurable:!0});var h=g;Object.defineProperty(e,"FileReadStream",{get:function(){return h},set:function(R){h=R},enumerable:!0,configurable:!0});var x=b;Object.defineProperty(e,"FileWriteStream",{get:function(){return x},set:function(R){x=R},enumerable:!0,configurable:!0});function g(R,O){return this instanceof g?(p.apply(this,arguments),this):g.apply(Object.create(g.prototype),arguments)}function y(){var R=this;I(R.path,R.flags,R.mode,function(O,D){O?(R.autoClose&&R.destroy(),R.emit("error",O)):(R.fd=D,R.emit("open",D),R.read())})}function b(R,O){return this instanceof b?(m.apply(this,arguments),this):b.apply(Object.create(b.prototype),arguments)}function S(){var R=this;I(R.path,R.flags,R.mode,function(O,D){O?(R.destroy(),R.emit("error",O)):(R.fd=D,R.emit("open",D))})}function w(R,O){return new e.ReadStream(R,O)}function P(R,O){return new e.WriteStream(R,O)}var C=e.open;e.open=I;function I(R,O,D,W){return typeof D=="function"&&(W=D,D=null),J(R,O,D,W);function J(me,Z,q,V,L){return C(me,Z,q,function(k,_){k&&(k.code==="EMFILE"||k.code==="ENFILE")?Ix([J,[me,Z,q,V],k,L||Date.now(),Date.now()]):typeof V=="function"&&V.apply(this,arguments)})}}return e}function Ix(e){Eh("ENQUEUE",e[0].name,e[1]),an[Hs].push(e),g3()}var tA;function Lee(){for(var e=Date.now(),t=0;t<an[Hs].length;++t)an[Hs][t].length>2&&(an[Hs][t][3]=e,an[Hs][t][4]=e);g3()}function g3(){if(clearTimeout(tA),tA=void 0,an[Hs].length!==0){var e=an[Hs].shift(),t=e[0],r=e[1],a=e[2],n=e[3],s=e[4];if(n===void 0)Eh("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-n>=6e4){Eh("TIMEOUT",t.name,r);var i=r.pop();typeof i=="function"&&i.call(null,a)}else{var o=Date.now()-s,l=Math.max(s-n,1),c=Math.min(l*1.2,100);o>=c?(Eh("RETRY",t.name,r),t.apply(null,r.concat([n]))):an[Hs].push(e)}tA===void 0&&(tA=setTimeout(g3,0))}}});var Ri=ne(Td=>{"use strict";var kee=Es().fromCallback,Li=Nx(),Z$e=["access","appendFile","chmod","chown","close","copyFile","cp","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","glob","lchmod","lchown","lutimes","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","statfs","symlink","truncate","unlink","utimes","writeFile"].filter(e=>typeof Li[e]=="function");Object.assign(Td,Li);Z$e.forEach(e=>{Td[e]=kee(Li[e])});Td.exists=function(e,t){return typeof t=="function"?Li.exists(e,t):new Promise(r=>Li.exists(e,r))};Td.read=function(e,t,r,a,n,s){return typeof s=="function"?Li.read(e,t,r,a,n,s):new Promise((i,o)=>{Li.read(e,t,r,a,n,(l,c,u)=>{if(l)return o(l);i({bytesRead:c,buffer:u})})})};Td.write=function(e,t,...r){return typeof r[r.length-1]=="function"?Li.write(e,t,...r):new Promise((a,n)=>{Li.write(e,t,...r,(s,i,o)=>{if(s)return n(s);a({bytesWritten:i,buffer:o})})})};Td.readv=function(e,t,...r){return typeof r[r.length-1]=="function"?Li.readv(e,t,...r):new Promise((a,n)=>{Li.readv(e,t,...r,(s,i,o)=>{if(s)return n(s);a({bytesRead:i,buffers:o})})})};Td.writev=function(e,t,...r){return typeof r[r.length-1]=="function"?Li.writev(e,t,...r):new Promise((a,n)=>{Li.writev(e,t,...r,(s,i,o)=>{if(s)return n(s);a({bytesWritten:i,buffers:o})})})};typeof Li.realpath.native=="function"?Td.realpath.native=kee(Li.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var Dee=ne((VCt,Mee)=>{"use strict";var eGe=require("path");Mee.exports.checkPath=function(t){if(process.platform==="win32"&&/[<>:"|?*]/.test(t.replace(eGe.parse(t).root,""))){let a=new Error(`Path contains invalid characters: ${t}`);throw a.code="EINVAL",a}}});var Bee=ne((qCt,x3)=>{"use strict";var _ee=Ri(),{checkPath:Oee}=Dee(),Fee=e=>{let t={mode:511};return typeof e=="number"?e:{...t,...e}.mode};x3.exports.makeDir=async(e,t)=>(Oee(e),_ee.mkdir(e,{mode:Fee(t),recursive:!0}));x3.exports.makeDirSync=(e,t)=>(Oee(e),_ee.mkdirSync(e,{mode:Fee(t),recursive:!0}))});var cc=ne((HCt,Uee)=>{"use strict";var tGe=Es().fromPromise,{makeDir:rGe,makeDirSync:b3}=Bee(),v3=tGe(rGe);Uee.exports={mkdirs:v3,mkdirsSync:b3,mkdirp:v3,mkdirpSync:b3,ensureDir:v3,ensureDirSync:b3}});var hp=ne(($Ct,zee)=>{"use strict";var aGe=Es().fromPromise,jee=Ri();function nGe(e){return jee.access(e).then(()=>!0).catch(()=>!1)}zee.exports={pathExists:aGe(nGe),pathExistsSync:jee.existsSync}});var S3=ne((GCt,Vee)=>{"use strict";var Lx=Ri(),sGe=Es().fromPromise;async function iGe(e,t,r){let a=await Lx.open(e,"r+"),n=null;try{await Lx.futimes(a,t,r)}finally{try{await Lx.close(a)}catch(s){n=s}}if(n)throw n}function oGe(e,t,r){let a=Lx.openSync(e,"r+");return Lx.futimesSync(a,t,r),Lx.closeSync(a)}Vee.exports={utimesMillis:sGe(iGe),utimesMillisSync:oGe}});var Ph=ne((KCt,Gee)=>{"use strict";var Rx=Ri(),Ps=require("path"),qee=Es().fromPromise;function lGe(e,t,r){let a=r.dereference?n=>Rx.stat(n,{bigint:!0}):n=>Rx.lstat(n,{bigint:!0});return Promise.all([a(e),a(t).catch(n=>{if(n.code==="ENOENT")return null;throw n})]).then(([n,s])=>({srcStat:n,destStat:s}))}function cGe(e,t,r){let a,n=r.dereference?i=>Rx.statSync(i,{bigint:!0}):i=>Rx.lstatSync(i,{bigint:!0}),s=n(e);try{a=n(t)}catch(i){if(i.code==="ENOENT")return{srcStat:s,destStat:null};throw i}return{srcStat:s,destStat:a}}async function uGe(e,t,r,a){let{srcStat:n,destStat:s}=await lGe(e,t,a);if(s){if(tT(n,s)){let i=Ps.basename(e),o=Ps.basename(t);if(r==="move"&&i!==o&&i.toLowerCase()===o.toLowerCase())return{srcStat:n,destStat:s,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(n.isDirectory()&&!s.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!n.isDirectory()&&s.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(n.isDirectory()&&T3(e,t))throw new Error(aA(e,t,r));return{srcStat:n,destStat:s}}function dGe(e,t,r,a){let{srcStat:n,destStat:s}=cGe(e,t,a);if(s){if(tT(n,s)){let i=Ps.basename(e),o=Ps.basename(t);if(r==="move"&&i!==o&&i.toLowerCase()===o.toLowerCase())return{srcStat:n,destStat:s,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(n.isDirectory()&&!s.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!n.isDirectory()&&s.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(n.isDirectory()&&T3(e,t))throw new Error(aA(e,t,r));return{srcStat:n,destStat:s}}async function Hee(e,t,r,a){let n=Ps.resolve(Ps.dirname(e)),s=Ps.resolve(Ps.dirname(r));if(s===n||s===Ps.parse(s).root)return;let i;try{i=await Rx.stat(s,{bigint:!0})}catch(o){if(o.code==="ENOENT")return;throw o}if(tT(t,i))throw new Error(aA(e,r,a));return Hee(e,t,s,a)}function $ee(e,t,r,a){let n=Ps.resolve(Ps.dirname(e)),s=Ps.resolve(Ps.dirname(r));if(s===n||s===Ps.parse(s).root)return;let i;try{i=Rx.statSync(s,{bigint:!0})}catch(o){if(o.code==="ENOENT")return;throw o}if(tT(t,i))throw new Error(aA(e,r,a));return $ee(e,t,s,a)}function tT(e,t){return t.ino!==void 0&&t.dev!==void 0&&t.ino===e.ino&&t.dev===e.dev}function T3(e,t){let r=Ps.resolve(e).split(Ps.sep).filter(n=>n),a=Ps.resolve(t).split(Ps.sep).filter(n=>n);return r.every((n,s)=>a[s]===n)}function aA(e,t,r){return`Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}Gee.exports={checkPaths:qee(uGe),checkPathsSync:dGe,checkParentPaths:qee(Hee),checkParentPathsSync:$ee,isSrcSubdir:T3,areIdentical:tT}});var Wee=ne((WCt,Kee)=>{"use strict";async function fGe(e,t){let r=[];for await(let a of e)r.push(t(a).then(()=>null,n=>n??new Error("unknown error")));await Promise.all(r.map(a=>a.then(n=>{if(n!==null)throw n})))}Kee.exports={asyncIteratorConcurrentProcess:fGe}});var Zee=ne((XCt,Qee)=>{"use strict";var ai=Ri(),rT=require("path"),{mkdirs:pGe}=cc(),{pathExists:mGe}=hp(),{utimesMillis:hGe}=S3(),aT=Ph(),{asyncIteratorConcurrentProcess:gGe}=Wee();async function yGe(e,t,r={}){typeof r=="function"&&(r={filter:r}),r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
|
|
|
|
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");let{srcStat:a,destStat:n}=await aT.checkPaths(e,t,"copy",r);if(await aT.checkParentPaths(e,a,t,"copy"),!await Yee(e,t,r))return;let i=rT.dirname(t);await mGe(i)||await pGe(i),await Jee(n,e,t,r)}async function Yee(e,t,r){return r.filter?r.filter(e,t):!0}async function Jee(e,t,r,a){let s=await(a.dereference?ai.stat:ai.lstat)(t);if(s.isDirectory())return SGe(s,e,t,r,a);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return xGe(s,e,t,r,a);if(s.isSymbolicLink())return TGe(e,t,r,a);throw s.isSocket()?new Error(`Cannot copy a socket file: ${t}`):s.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${t}`):new Error(`Unknown file: ${t}`)}async function xGe(e,t,r,a,n){if(!t)return Xee(e,r,a,n);if(n.overwrite)return await ai.unlink(a),Xee(e,r,a,n);if(n.errorOnExist)throw new Error(`'${a}' already exists`)}async function Xee(e,t,r,a){if(await ai.copyFile(t,r),a.preserveTimestamps){bGe(e.mode)&&await vGe(r,e.mode);let n=await ai.stat(t);await hGe(r,n.atime,n.mtime)}return ai.chmod(r,e.mode)}function bGe(e){return(e&128)===0}function vGe(e,t){return ai.chmod(e,t|128)}async function SGe(e,t,r,a,n){t||await ai.mkdir(a),await gGe(await ai.opendir(r),async s=>{let i=rT.join(r,s.name),o=rT.join(a,s.name);if(await Yee(i,o,n)){let{destStat:c}=await aT.checkPaths(i,o,"copy",n);await Jee(c,i,o,n)}}),t||await ai.chmod(a,e.mode)}async function TGe(e,t,r,a){let n=await ai.readlink(t);if(a.dereference&&(n=rT.resolve(process.cwd(),n)),!e)return ai.symlink(n,r);let s=null;try{s=await ai.readlink(r)}catch(i){if(i.code==="EINVAL"||i.code==="UNKNOWN")return ai.symlink(n,r);throw i}if(a.dereference&&(s=rT.resolve(process.cwd(),s)),aT.isSrcSubdir(n,s))throw new Error(`Cannot copy '${n}' to a subdirectory of itself, '${s}'.`);if(aT.isSrcSubdir(s,n))throw new Error(`Cannot overwrite '${s}' with '${n}'.`);return await ai.unlink(r),ai.symlink(n,r)}Qee.exports=yGe});var nte=ne((YCt,ate)=>{"use strict";var ki=Nx(),nT=require("path"),wGe=cc().mkdirsSync,CGe=S3().utimesMillisSync,sT=Ph();function EGe(e,t,r){typeof r=="function"&&(r={filter:r}),r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
|
|
|
|
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");let{srcStat:a,destStat:n}=sT.checkPathsSync(e,t,"copy",r);if(sT.checkParentPathsSync(e,a,t,"copy"),r.filter&&!r.filter(e,t))return;let s=nT.dirname(t);return ki.existsSync(s)||wGe(s),ete(n,e,t,r)}function ete(e,t,r,a){let s=(a.dereference?ki.statSync:ki.lstatSync)(t);if(s.isDirectory())return kGe(s,e,t,r,a);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return PGe(s,e,t,r,a);if(s.isSymbolicLink())return _Ge(e,t,r,a);throw s.isSocket()?new Error(`Cannot copy a socket file: ${t}`):s.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${t}`):new Error(`Unknown file: ${t}`)}function PGe(e,t,r,a,n){return t?AGe(e,r,a,n):tte(e,r,a,n)}function AGe(e,t,r,a){if(a.overwrite)return ki.unlinkSync(r),tte(e,t,r,a);if(a.errorOnExist)throw new Error(`'${r}' already exists`)}function tte(e,t,r,a){return ki.copyFileSync(t,r),a.preserveTimestamps&&IGe(e.mode,t,r),w3(r,e.mode)}function IGe(e,t,r){return NGe(e)&&LGe(r,e),RGe(t,r)}function NGe(e){return(e&128)===0}function LGe(e,t){return w3(e,t|128)}function w3(e,t){return ki.chmodSync(e,t)}function RGe(e,t){let r=ki.statSync(e);return CGe(t,r.atime,r.mtime)}function kGe(e,t,r,a,n){return t?rte(r,a,n):MGe(e.mode,r,a,n)}function MGe(e,t,r,a){return ki.mkdirSync(r),rte(t,r,a),w3(r,e)}function rte(e,t,r){let a=ki.opendirSync(e);try{let n;for(;(n=a.readSync())!==null;)DGe(n.name,e,t,r)}finally{a.closeSync()}}function DGe(e,t,r,a){let n=nT.join(t,e),s=nT.join(r,e);if(a.filter&&!a.filter(n,s))return;let{destStat:i}=sT.checkPathsSync(n,s,"copy",a);return ete(i,n,s,a)}function _Ge(e,t,r,a){let n=ki.readlinkSync(t);if(a.dereference&&(n=nT.resolve(process.cwd(),n)),e){let s;try{s=ki.readlinkSync(r)}catch(i){if(i.code==="EINVAL"||i.code==="UNKNOWN")return ki.symlinkSync(n,r);throw i}if(a.dereference&&(s=nT.resolve(process.cwd(),s)),sT.isSrcSubdir(n,s))throw new Error(`Cannot copy '${n}' to a subdirectory of itself, '${s}'.`);if(sT.isSrcSubdir(s,n))throw new Error(`Cannot overwrite '${s}' with '${n}'.`);return OGe(n,r)}else return ki.symlinkSync(n,r)}function OGe(e,t){return ki.unlinkSync(t),ki.symlinkSync(e,t)}ate.exports=EGe});var nA=ne((JCt,ste)=>{"use strict";var FGe=Es().fromPromise;ste.exports={copy:FGe(Zee()),copySync:nte()}});var iT=ne((QCt,ote)=>{"use strict";var ite=Nx(),BGe=Es().fromCallback;function UGe(e,t){ite.rm(e,{recursive:!0,force:!0},t)}function jGe(e){ite.rmSync(e,{recursive:!0,force:!0})}ote.exports={remove:BGe(UGe),removeSync:jGe}});var hte=ne((ZCt,mte)=>{"use strict";var zGe=Es().fromPromise,ute=Ri(),dte=require("path"),fte=cc(),pte=iT(),lte=zGe(async function(t){let r;try{r=await ute.readdir(t)}catch{return fte.mkdirs(t)}return Promise.all(r.map(a=>pte.remove(dte.join(t,a))))});function cte(e){let t;try{t=ute.readdirSync(e)}catch{return fte.mkdirsSync(e)}t.forEach(r=>{r=dte.join(e,r),pte.removeSync(r)})}mte.exports={emptyDirSync:cte,emptydirSync:cte,emptyDir:lte,emptydir:lte}});var bte=ne((e1t,xte)=>{"use strict";var VGe=Es().fromPromise,gte=require("path"),wd=Ri(),yte=cc();async function qGe(e){let t;try{t=await wd.stat(e)}catch{}if(t&&t.isFile())return;let r=gte.dirname(e),a=null;try{a=await wd.stat(r)}catch(n){if(n.code==="ENOENT"){await yte.mkdirs(r),await wd.writeFile(e,"");return}else throw n}a.isDirectory()?await wd.writeFile(e,""):await wd.readdir(r)}function HGe(e){let t;try{t=wd.statSync(e)}catch{}if(t&&t.isFile())return;let r=gte.dirname(e);try{wd.statSync(r).isDirectory()||wd.readdirSync(r)}catch(a){if(a&&a.code==="ENOENT")yte.mkdirsSync(r);else throw a}wd.writeFileSync(e,"")}xte.exports={createFile:VGe(qGe),createFileSync:HGe}});var Cte=ne((t1t,wte)=>{"use strict";var $Ge=Es().fromPromise,vte=require("path"),gp=Ri(),Ste=cc(),{pathExists:GGe}=hp(),{areIdentical:Tte}=Ph();async function KGe(e,t){let r;try{r=await gp.lstat(t)}catch{}let a;try{a=await gp.lstat(e)}catch(i){throw i.message=i.message.replace("lstat","ensureLink"),i}if(r&&Tte(a,r))return;let n=vte.dirname(t);await GGe(n)||await Ste.mkdirs(n),await gp.link(e,t)}function WGe(e,t){let r;try{r=gp.lstatSync(t)}catch{}try{let s=gp.lstatSync(e);if(r&&Tte(s,r))return}catch(s){throw s.message=s.message.replace("lstat","ensureLink"),s}let a=vte.dirname(t);return gp.existsSync(a)||Ste.mkdirsSync(a),gp.linkSync(e,t)}wte.exports={createLink:$Ge(KGe),createLinkSync:WGe}});var Pte=ne((r1t,Ete)=>{"use strict";var yp=require("path"),oT=Ri(),{pathExists:XGe}=hp(),YGe=Es().fromPromise;async function JGe(e,t){if(yp.isAbsolute(e)){try{await oT.lstat(e)}catch(s){throw s.message=s.message.replace("lstat","ensureSymlink"),s}return{toCwd:e,toDst:e}}let r=yp.dirname(t),a=yp.join(r,e);if(await XGe(a))return{toCwd:a,toDst:e};try{await oT.lstat(e)}catch(s){throw s.message=s.message.replace("lstat","ensureSymlink"),s}return{toCwd:e,toDst:yp.relative(r,e)}}function QGe(e,t){if(yp.isAbsolute(e)){if(!oT.existsSync(e))throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}let r=yp.dirname(t),a=yp.join(r,e);if(oT.existsSync(a))return{toCwd:a,toDst:e};if(!oT.existsSync(e))throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:yp.relative(r,e)}}Ete.exports={symlinkPaths:YGe(JGe),symlinkPathsSync:QGe}});var Nte=ne((a1t,Ite)=>{"use strict";var Ate=Ri(),ZGe=Es().fromPromise;async function eKe(e,t){if(t)return t;let r;try{r=await Ate.lstat(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}function tKe(e,t){if(t)return t;let r;try{r=Ate.lstatSync(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}Ite.exports={symlinkType:ZGe(eKe),symlinkTypeSync:tKe}});var Mte=ne((n1t,kte)=>{"use strict";var rKe=Es().fromPromise,Lte=require("path"),iu=Ri(),{mkdirs:aKe,mkdirsSync:nKe}=cc(),{symlinkPaths:sKe,symlinkPathsSync:iKe}=Pte(),{symlinkType:oKe,symlinkTypeSync:lKe}=Nte(),{pathExists:cKe}=hp(),{areIdentical:Rte}=Ph();async function uKe(e,t,r){let a;try{a=await iu.lstat(t)}catch{}if(a&&a.isSymbolicLink()){let[o,l]=await Promise.all([iu.stat(e),iu.stat(t)]);if(Rte(o,l))return}let n=await sKe(e,t);e=n.toDst;let s=await oKe(n.toCwd,r),i=Lte.dirname(t);return await cKe(i)||await aKe(i),iu.symlink(e,t,s)}function dKe(e,t,r){let a;try{a=iu.lstatSync(t)}catch{}if(a&&a.isSymbolicLink()){let o=iu.statSync(e),l=iu.statSync(t);if(Rte(o,l))return}let n=iKe(e,t);e=n.toDst,r=lKe(n.toCwd,r);let s=Lte.dirname(t);return iu.existsSync(s)||nKe(s),iu.symlinkSync(e,t,r)}kte.exports={createSymlink:rKe(uKe),createSymlinkSync:dKe}});var zte=ne((s1t,jte)=>{"use strict";var{createFile:Dte,createFileSync:_te}=bte(),{createLink:Ote,createLinkSync:Fte}=Cte(),{createSymlink:Bte,createSymlinkSync:Ute}=Mte();jte.exports={createFile:Dte,createFileSync:_te,ensureFile:Dte,ensureFileSync:_te,createLink:Ote,createLinkSync:Fte,ensureLink:Ote,ensureLinkSync:Fte,createSymlink:Bte,createSymlinkSync:Ute,ensureSymlink:Bte,ensureSymlinkSync:Ute}});var sA=ne((i1t,Vte)=>{function fKe(e,{EOL:t=`
|
|
`,finalEOL:r=!0,replacer:a=null,spaces:n}={}){let s=r?t:"";return JSON.stringify(e,a,n).replace(/\n/g,t)+s}function pKe(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}Vte.exports={stringify:fKe,stripBom:pKe}});var Gte=ne((o1t,$te)=>{var kx;try{kx=Nx()}catch{kx=require("fs")}var iA=Es(),{stringify:qte,stripBom:Hte}=sA();async function mKe(e,t={}){typeof t=="string"&&(t={encoding:t});let r=t.fs||kx,a="throws"in t?t.throws:!0,n=await iA.fromCallback(r.readFile)(e,t);n=Hte(n);let s;try{s=JSON.parse(n,t?t.reviver:null)}catch(i){if(a)throw i.message=`${e}: ${i.message}`,i;return null}return s}var hKe=iA.fromPromise(mKe);function gKe(e,t={}){typeof t=="string"&&(t={encoding:t});let r=t.fs||kx,a="throws"in t?t.throws:!0;try{let n=r.readFileSync(e,t);return n=Hte(n),JSON.parse(n,t.reviver)}catch(n){if(a)throw n.message=`${e}: ${n.message}`,n;return null}}async function yKe(e,t,r={}){let a=r.fs||kx,n=qte(t,r);await iA.fromCallback(a.writeFile)(e,n,r)}var xKe=iA.fromPromise(yKe);function bKe(e,t,r={}){let a=r.fs||kx,n=qte(t,r);return a.writeFileSync(e,n,r)}$te.exports={readFile:hKe,readFileSync:gKe,writeFile:xKe,writeFileSync:bKe}});var Wte=ne((l1t,Kte)=>{"use strict";var oA=Gte();Kte.exports={readJson:oA.readFile,readJsonSync:oA.readFileSync,writeJson:oA.writeFile,writeJsonSync:oA.writeFileSync}});var lA=ne((c1t,Jte)=>{"use strict";var vKe=Es().fromPromise,C3=Ri(),Xte=require("path"),Yte=cc(),SKe=hp().pathExists;async function TKe(e,t,r="utf-8"){let a=Xte.dirname(e);return await SKe(a)||await Yte.mkdirs(a),C3.writeFile(e,t,r)}function wKe(e,...t){let r=Xte.dirname(e);C3.existsSync(r)||Yte.mkdirsSync(r),C3.writeFileSync(e,...t)}Jte.exports={outputFile:vKe(TKe),outputFileSync:wKe}});var Zte=ne((u1t,Qte)=>{"use strict";var{stringify:CKe}=sA(),{outputFile:EKe}=lA();async function PKe(e,t,r={}){let a=CKe(t,r);await EKe(e,a,r)}Qte.exports=PKe});var tre=ne((d1t,ere)=>{"use strict";var{stringify:AKe}=sA(),{outputFileSync:IKe}=lA();function NKe(e,t,r){let a=AKe(t,r);IKe(e,a,r)}ere.exports=NKe});var are=ne((f1t,rre)=>{"use strict";var LKe=Es().fromPromise,Mi=Wte();Mi.outputJson=LKe(Zte());Mi.outputJsonSync=tre();Mi.outputJSON=Mi.outputJson;Mi.outputJSONSync=Mi.outputJsonSync;Mi.writeJSON=Mi.writeJson;Mi.writeJSONSync=Mi.writeJsonSync;Mi.readJSON=Mi.readJson;Mi.readJSONSync=Mi.readJsonSync;rre.exports=Mi});var lre=ne((p1t,ore)=>{"use strict";var RKe=Ri(),nre=require("path"),{copy:kKe}=nA(),{remove:ire}=iT(),{mkdirp:MKe}=cc(),{pathExists:DKe}=hp(),sre=Ph();async function _Ke(e,t,r={}){let a=r.overwrite||r.clobber||!1,{srcStat:n,isChangingCase:s=!1}=await sre.checkPaths(e,t,"move",r);await sre.checkParentPaths(e,n,t,"move");let i=nre.dirname(t);return nre.parse(i).root!==i&&await MKe(i),OKe(e,t,a,s)}async function OKe(e,t,r,a){if(!a){if(r)await ire(t);else if(await DKe(t))throw new Error("dest already exists.")}try{await RKe.rename(e,t)}catch(n){if(n.code!=="EXDEV")throw n;await FKe(e,t,r)}}async function FKe(e,t,r){return await kKe(e,t,{overwrite:r,errorOnExist:!0,preserveTimestamps:!0}),ire(e)}ore.exports=_Ke});var pre=ne((m1t,fre)=>{"use strict";var ure=Nx(),P3=require("path"),BKe=nA().copySync,dre=iT().removeSync,UKe=cc().mkdirpSync,cre=Ph();function jKe(e,t,r){r=r||{};let a=r.overwrite||r.clobber||!1,{srcStat:n,isChangingCase:s=!1}=cre.checkPathsSync(e,t,"move",r);return cre.checkParentPathsSync(e,n,t,"move"),zKe(t)||UKe(P3.dirname(t)),VKe(e,t,a,s)}function zKe(e){let t=P3.dirname(e);return P3.parse(t).root===t}function VKe(e,t,r,a){if(a)return E3(e,t,r);if(r)return dre(t),E3(e,t,r);if(ure.existsSync(t))throw new Error("dest already exists.");return E3(e,t,r)}function E3(e,t,r){try{ure.renameSync(e,t)}catch(a){if(a.code!=="EXDEV")throw a;return qKe(e,t,r)}}function qKe(e,t,r){return BKe(e,t,{overwrite:r,errorOnExist:!0,preserveTimestamps:!0}),dre(e)}fre.exports=jKe});var hre=ne((h1t,mre)=>{"use strict";var HKe=Es().fromPromise;mre.exports={move:HKe(lre()),moveSync:pre()}});var fs=ne((g1t,gre)=>{"use strict";gre.exports={...Ri(),...nA(),...hte(),...zte(),...are(),...cc(),...hre(),...lA(),...hp(),...iT()}});var fne={};qb(fne,{validateBracketBalance:()=>fYe,validatePunctuation:()=>mYe,validateVariableConsistency:()=>pYe});function fYe(e){if(!e)return!0;let t=[],r={")":"(","]":"[","}":"{"};for(let a of e)if(["(","[","{"].includes(a))t.push(a);else if([")","]","}"].includes(a)&&t.pop()!==r[a])return!1;return t.length===0}function pYe(e,t){if(!e||!t)return!0;let r=/(\{\w+\}|%\w+|\$\w+|\$\{\w+\})/g,a=e.match(r)||[],n=t.match(r)||[];for(let s of a)if(!t.includes(s))return!1;return!0}function mYe(e,t){if(!e||!t)return!0;let r=/[.!?:;。!?:;]$/,a=e.trim().match(r),n=t.trim().match(r);return!(a&&!n)}var pne=de(()=>{});var nJe={};qb(nJe,{default:()=>aJe});module.exports=Ase(nJe);var Vb=N(require("path"));Rr();var xse=require("obsidian");var Jb='\n# Role & Context\nYou are an expert Software Localization Specialist & Technical Translator.\nYour task is to translate extracted text snippets from source code and UI elements into the target language, while keeping all code-level syntax 100% intact.\n\n# Core Output Rules (CRITICAL: Failure will crash the system)\n1. ONLY return a valid JSON array string.\n - \u274C NO Markdown formatting (e.g., ```json).\n - \u274C NO conversational text.\n - \u2705 Starts exactly with `[` and ends with `]`.\n2. Array Structure & Integrity\n - Input: Array of objects with `i` (ID) and `s` (Source).\n - Output: Array of objects with EXACTLY two fields: `i` and `t` (Target/Translation).\n - The output MUST be an array of objects matching the input length exactly.\n - The `i` fields MUST be kept EXACTLY as they are. DO NOT MODIFY OR OMIT THEM.\n\n# Translation & Safety Rules (CRITICAL)\n1. Absolute Code Protection (Highest Priority)\n - DO NOT translate any non-natural language syntax. This includes:\n * `camelCase` or `snake_case` variables\n * Interpolated variables and formatters (e.g., `${filename}`, `{{val}}`, `%s`, `{0}`)\n * HTML/XML tags (e.g., `<span>`, `<br>`)\n * URLs, file paths, and regex symbols\n - Example: `Error occurred in ${moduleName}` -> `${moduleName} \u4E2D\u53D1\u751F\u9519\u8BEF` (Variable preserved).\n2. Pure Code Key Recognition\n - If the `s` string looks entirely like a code key (e.g., `user_not_found_error`), DO NOT force a translation. Output it exactly as it is in the `t` field.\n3. Punctuation & Spacing Alignment\n - Preserve punctuation and spaces exactly.\n4. Unicode Encoding Preservation (CRITICAL)\n - If the source string `s` is formatted using Unicode escape sequences (e.g., `\\uXXXX`), your translated text `t` MUST ALSO be converted entirely into Unicode escape sequences.\n - \u274C Never return standard plain text if the source is Unicode-escaped.\n - Example: If `s` is `Hello` ("Hello"), and the translation is "Hola", `t` must be `Hola`.\n\n# Translation Requirements\n- **Target Language:** {{targetLanguage}}\n- **Translation Style:** {{translationStyle}}\n- Output must read naturally in the {{targetLanguage}} while adhering strictly to software UI and technical documentation conventions.\n\n# Example\n[Input]\n[{"i":101, "s":"Settings"}, {"i":102, "s":"Save changes"}, {"i":103, "s":"Open"}]\n\n[Output]\n[{"i":101, "t":"\u8BBE\u7F6E"}, {"i":102, "t":"\u4FDD\u5B58\u66F4\u6539"}, {"i":103, "t":"\u6253\u5F00"}]\n\n{{glossarySection}}\n\n# Quality Checklist (Self-Verify Before Output)\n- [ ] Is the output a totally naked JSON array?\n- [ ] Does each object ONLY contain `i` and `t`?\n- [ ] Are all `i` fields present and unmodified?\n- [ ] Are all code variables (`${...}`) completely intact in the `t`?\n- [ ] If `s` used Unicode escapes (`\\uXXXX`), is `t` correctly encoded as Unicode escapes?\n'.trim();function YI(e,t,r,a){let n=a?`
|
|
# Exclusive Glossary (CRITICAL)
|
|
You MUST strictly follow these translation mappings:
|
|
${Object.entries(a).map(([s,i])=>`- "${s}" \u2192 "${i}"`).join(`
|
|
`)}
|
|
Under no circumstances should you alter the translation of these terms.`.trim():"";return e.replace(/\{\{targetLanguage\}\}/g,t).replace(/\{\{translationStyle\}\}/g,r).replace(/\{\{glossarySection\}\}/g,n)}var Qb='\n# Role & Context\nYou are an expert Software Localization Specialist & UI Translator.\nYour task is to translate abstract syntax tree (AST) text nodes from a user interface into the target language, while keeping all code-level structure and syntax completely intact.\n\n# Core Output Rules (CRITICAL: Failure will crash the system)\n1. ONLY return a valid JSON array string.\n - \u274C NO Markdown formatting (e.g., ```json).\n - \u274C NO conversational text.\n - \u2705 Starts exactly with `[` and ends with `]`.\n2. Property Gatekeeper (CRITICAL)\n - Input structure: `i` (ID), `s` (Source), `y` (Type), and `n` (Name).\n - Output structure: Return objects with EXACTLY two fields: `i` and `t` (Target/Translation).\n - DO NOT MODIFY `i`.\n - The `y` (type) and `n` (name) fields are for YOUR CONTEXT ONLY. Do not include them in output.\n\n# Translation & Safety Rules (CRITICAL)\n1. Absolute Code Protection\n - DO NOT translate any non-natural language syntax (e.g., `{{count}}`, `<span/>`, `\\n`).\n2. Context Awareness via y & n Fields\n - Use the `y` (node type) and `n` (node name) fields to infer context.\n - Example: `y="Button"`, `n="submit"` -> Translate as an action verb.\n3. Pure Code Key Handling\n - If `s` is a code key, return it as-is in `t`.\n\n# Translation Requirements\n- **Target Language:** {{targetLanguage}}\n- **Translation Style:** {{translationStyle}}\n\n{{glossarySection}}\n\n# Example\n[Input]\n[{"i":50, "s":"Open", "y":"Button", "n":"openFile"}, {"i":51, "s":"\u21E7 Shift", "y":"Text", "n":"shortcut"}]\n\n[Output]\n[{"i":50, "t":"\u6253\u5F00"}, {"i":51, "t":"\u21E7 Shift"}]\n\n# Quality Checklist (Self-Verify Before Output)\n- [ ] Is the output a totally naked JSON array?\n- [ ] Does each object ONLY contain `i` and `t`?\n- [ ] Are `i` fields unaltered?\n- [ ] Are code variables/tags intact in `t`?\n'.trim();function JI(e,t,r,a){let n=a?`
|
|
# Exclusive Glossary (CRITICAL)
|
|
You MUST strictly follow these translation mappings:
|
|
${Object.entries(a).map(([s,i])=>`- "${s}" \u2192 "${i}"`).join(`
|
|
`)}
|
|
Under no circumstances should you alter the translation of these terms.`.trim():"";return e.replace(/\{\{targetLanguage\}\}/g,t).replace(/\{\{translationStyle\}\}/g,r).replace(/\{\{glossarySection\}\}/g,n)}var Zb='\n# Role & Context\nYou are an expert CSS Theme Localizer & UI Translator.\nYour task is to translate Obsidian theme setting labels and descriptions into the target language.\n\n# Core Output Rules (CRITICAL: Failure will crash the system)\n1. ONLY return a valid JSON array string.\n - \u274C NO Markdown formatting (e.g., ```json).\n - \u274C NO conversational text.\n - \u2705 Starts exactly with `[` and ends with `]`.\n2. Property Gatekeeper (CRITICAL)\n - Input structure: `i` (ID), `s` (Source), `y` (Type).\n - Output structure: Return objects with EXACTLY two fields: `i` and `t` (Target/Translation).\n - DO NOT MODIFY `i`.\n - The `y` (type) field is for YOUR CONTEXT ONLY. Do not include it in output.\n\n# Translation & Safety Rules (CRITICAL)\n1. Context Awareness via y Field\n - `y` value tells you if text is a `name`, `title`, `description`, `label`, or `markdown`.\n2. Code Protection\n - DO NOT translate CSS class names or variables.\n3. Brevity for UI\n - Keep translations concise for settings UI.\n4. Unicode Encoding Preservation (CRITICAL)\n - If the source string `s` is formatted using Unicode escape sequences (e.g., `\\uXXXX`), your translated text `t` MUST ALSO be converted entirely into Unicode escape sequences.\n - \u274C Never return standard plain text if the source is Unicode-escaped.\n - Example: If `s` is `\\u0048\\u0065\\u006c\\u006c\\u006f` ("Hello"), and the translation is "Hola", `t` must be `\\u0048\\u006f\\u006c\\u0061`.\n\n# Translation Requirements\n- **Target Language:** {{targetLanguage}}\n- **Translation Style:** {{translationStyle}}\n\n{{glossarySection}}\n\n# Example\n[Input]\n[{"i":201, "s":"Accent color", "y":"name"}, {"i":202, "s":"The color of active elements.", "y":"description"}]\n\n[Output]\n[{"i":201, "t":"\u5F3A\u8C03\u8272"}, {"i":202, "t":"\u6FC0\u6D3B\u72B6\u6001\u5143\u7D20\u7684\u989C\u8272\u3002"}]\n\n# Quality Checklist (Self-Verify Before Output)\n- [ ] Is the output a totally naked JSON array?\n- [ ] Does each object ONLY contain `i` and `t`?\n- [ ] Are `i` fields unaltered?\n- [ ] If `s` used Unicode escapes (`\\uXXXX`), is `t` correctly encoded as Unicode escapes?\n'.trim();function QI(e,t,r,a){let n=a?`
|
|
# Exclusive Glossary (CRITICAL)
|
|
You MUST strictly follow these translation mappings:
|
|
${Object.entries(a).map(([s,i])=>`- "${s}" \u2192 "${i}"`).join(`
|
|
`)}
|
|
Under no circumstances should you alter the translation of these terms.`.trim():"";return e.replace(/\{\{targetLanguage\}\}/g,t).replace(/\{\{translationStyle\}\}/g,r).replace(/\{\{glossarySection\}\}/g,n)}var Rie=`
|
|
# Role & Context
|
|
You are a Translation Repair Specialist. You receive a source string, a broken translation, and an error description.
|
|
Your job is to fix the translation so it is syntactically valid while preserving the original translation intent.
|
|
|
|
# Core Output Rules (CRITICAL)
|
|
1. Return ONLY the fixed translation string. Nothing else.
|
|
- \u274C NO JSON wrapping.
|
|
- \u274C NO quotes around the output (unless the original had them).
|
|
- \u274C NO explanations or conversational text.
|
|
2. Preserve all code-level syntax:
|
|
- Variables (\`\${...}\`, \`{{...}}\`, \`%s\`, \`{0}\`)
|
|
- HTML/XML tags
|
|
- Brackets, parentheses, and special characters
|
|
3. The fix must address the specific error described.
|
|
|
|
# Fix Strategy
|
|
- **Bracket Mismatch**: Add/remove brackets to balance them.
|
|
- **Variable Missing**: Restore the missing variables from the source string.
|
|
- **Syntax Error**: Fix quote escaping, bracket nesting, or other syntax issues.
|
|
- **General**: If unclear, make the minimal change needed to fix the error.
|
|
|
|
# Translation Context
|
|
- **Target Language:** {{targetLanguage}}
|
|
`.trim();function MB(e){return Rie.replace(/\{\{targetLanguage\}\}/g,e)}var Dt={openai:{id:"openai",name:"OpenAI \u517C\u5BB9 (\u81EA\u5B9A\u4E49)",category:"international",engine:"openai",baseUrl:"",defaultModel:"gpt-4o-mini",models:["gpt-3.5-turbo","gpt-4","gpt-4-turbo","gpt-4o","gpt-4o-mini"],labelKey:"Openai",homepage:"https://platform.openai.com/"},gemini:{id:"gemini",name:"Gemini",category:"international",engine:"gemini",baseUrl:"https://generativelanguage.googleapis.com/v1beta/openai",defaultModel:"gemini-2.0-flash",models:["gemini-2.0-flash-exp","gemini-2.0-flash","gemini-1.5-pro","gemini-1.5-flash"],labelKey:"Gemini",homepage:"https://aistudio.google.com/"},ollama:{id:"ollama",name:"Ollama",category:"local",engine:"ollama",baseUrl:"http://localhost:11434",defaultModel:"",models:[],labelKey:"Ollama",homepage:"https://ollama.com/"},deepseek:{id:"deepseek",name:"DeepSeek",category:"domestic",engine:"openai",baseUrl:"https://api.deepseek.com/v1",defaultModel:"deepseek-chat",models:["deepseek-chat","deepseek-coder","deepseek-reasoner"],labelKey:"Deepseek",homepage:"https://platform.deepseek.com/"},zhipu:{id:"zhipu",name:"\u667A\u8C31 AI (GLM)",category:"domestic",engine:"openai",baseUrl:"https://open.bigmodel.cn/api/paas/v4",defaultModel:"glm-4-flash",models:["glm-4","glm-4-flash","glm-3-turbo"],labelKey:"Zhipu",homepage:"https://open.bigmodel.cn/"},moonshot:{id:"moonshot",name:"\u6708\u4E4B\u6697\u9762 (Kimi)",category:"domestic",engine:"openai",baseUrl:"https://api.moonshot.cn/v1",defaultModel:"moonshot-v1-8k",models:["moonshot-v1-8k","moonshot-v1-32k","moonshot-v1-128k"],labelKey:"Moonshot",homepage:"https://platform.moonshot.cn/"},aliyun:{id:"aliyun",name:"\u901A\u4E49\u5343\u95EE (Aliyun)",category:"domestic",engine:"openai",baseUrl:"https://dashscope.aliyuncs.com/compatible-mode/v1",defaultModel:"qwen-plus",models:["qwen-turbo","qwen-plus","qwen-max","qwen-max-longcontext"],labelKey:"Aliyun",homepage:"https://dashscope.console.aliyun.com/"},baidu:{id:"baidu",name:"\u767E\u5EA6\u5343\u5E06 (ERNIE)",category:"domestic",engine:"openai",baseUrl:"https://qianfan.baidubce.com/v2",defaultModel:"ernie-4.0-8k-preview",models:["ernie-4.0-8k-preview","ernie-4.0-8k-latest","ernie-3.5-8k","ernie-speed-128k"],labelKey:"Baidu",homepage:"https://console.bce.baidu.com/qianfan/"},bytedance:{id:"bytedance",name:"\u5B57\u8282\u8DF3\u52A8 (\u8C46\u5305)",category:"domestic",engine:"openai",baseUrl:"https://ark.cn-beijing.volces.com/api/v3",defaultModel:"doubao-pro-4k",models:["doubao-pro-4k","doubao-pro-32k","doubao-lite-4k"],labelKey:"Bytedance",homepage:"https://console.volcengine.com/ark/"},groq:{id:"groq",name:"Groq (\u6781\u901F)",category:"international",engine:"openai",baseUrl:"https://api.groq.com/openai/v1",defaultModel:"llama-3.3-70b-versatile",models:["llama-3.3-70b-versatile","llama-3.1-8b-instant","mixtral-8x7b-32768","gemma2-9b-it"],labelKey:"Groq",homepage:"https://console.groq.com/"},siliconflow:{id:"siliconflow",name:"\u7845\u57FA\u6D41\u52A8",category:"aggregated",engine:"openai",baseUrl:"https://api.siliconflow.cn/v1",defaultModel:"deepseek-ai/DeepSeek-V3",models:["deepseek-ai/DeepSeek-V3","deepseek-ai/DeepSeek-R1","deepseek-ai/DeepSeek-V2.5","Qwen/Qwen2.5-7B-Instruct","Qwen/Qwen2.5-72B-Instruct","01-ai/Yi-1.5-34B-Chat-16K"],labelKey:"Siliconflow",homepage:"https://siliconflow.cn/"},openrouter:{id:"openrouter",name:"OpenRouter",category:"aggregated",engine:"openai",baseUrl:"https://openrouter.ai/api/v1",defaultModel:"anthropic/claude-3.5-sonnet",models:["anthropic/claude-3.5-sonnet","google/gemini-pro-1.5","meta-llama/llama-3.1-405b-instruct","mistralai/mistral-large","openai/gpt-4o"],labelKey:"Openrouter",homepage:"https://openrouter.ai/"},deepinfra:{id:"deepinfra",name:"DeepInfra",category:"aggregated",engine:"openai",baseUrl:"https://api.deepinfra.com/v1/openai",defaultModel:"meta-llama/Llama-3.3-70B-Instruct",models:["meta-llama/Llama-3.3-70B-Instruct","meta-llama/Llama-3.2-11B-Vision-Instruct","mistralai/Mistral-7B-Instruct-v0.3","microsoft/WizardLM-2-7B"],labelKey:"Deepinfra",homepage:"https://deepinfra.com/"},mistral:{id:"mistral",name:"Mistral AI",category:"international",engine:"openai",baseUrl:"https://api.mistral.ai/v1",defaultModel:"mistral-small-latest",models:["mistral-small-latest","mistral-medium-latest","mistral-large-latest","codestral-latest"],labelKey:"Mistral",homepage:"https://console.mistral.ai/"},minimax:{id:"minimax",name:"MiniMax (\u6D77\u87BA AI)",category:"domestic",engine:"openai",baseUrl:"https://api.minimax.chat/v1",defaultModel:"abab6.5-chat",models:["abab6.5-chat","abab6.5s-chat","abab5.5-chat"],labelKey:"Minimax",homepage:"https://platform.minimaxi.com/"},stepfun:{id:"stepfun",name:"\u9636\u8DC3\u661F\u8FB0 (StepFun)",category:"domestic",engine:"openai",baseUrl:"https://api.stepfun.com/v1",defaultModel:"step-1-8k",models:["step-1-8k","step-1-32k","step-1-128k","step-1-256k"],labelKey:"Stepfun",homepage:"https://platform.stepfun.com/"}};uw();var dw={agreement:!0,language:"zh-cn",checkUpdates:!0,searchText:"",sort:"0",author:"",mode:0,automaticUpdate:!1,llmApi:"openai",llmResponseFormat:"text",llmLanguage:"\u7B80\u4F53\u4E2D\u6587",llmStyle:"\u65E0",llmBatchSize:10,llmConcurrencyLimit:3,llmTimeout:6e4,llmRegexPrompt:Jb,llmAstPrompt:Qb,llmThemePrompt:Zb,llmOpenaiUrl:"",llmOpenaiKey:"",llmOpenaiModel:Dt.openai.defaultModel,llmOpenaiProfiles:[{id:"default",name:"Default",url:"",key:"",model:Dt.openai.defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],llmOpenaiActiveProfileId:"default",llmUseCustomPrice:!0,llmPriceInputCustom:0,llmPriceOutputCustom:0,llmGeminiKey:"",llmGeminiModel:"gemini-2.0-flash",llmGeminiProfiles:[{id:"default",name:"Default",url:"",key:"",model:"gemini-2.0-flash",useCustomPrice:!1,priceInput:0,priceOutput:0}],llmGeminiActiveProfileId:"default",llmOllamaUrl:"http://localhost:11434",llmOllamaModel:"",llmOllamaProfiles:[{id:"default",name:"Default",url:"http://localhost:11434",key:"",model:"",useCustomPrice:!1,priceInput:0,priceOutput:0}],llmOllamaActiveProfileId:"default",llmDeepseekKey:"",llmDeepseekModel:Dt.deepseek.defaultModel,llmDeepseekProfiles:[{id:"default",name:"Default",url:Dt.deepseek.baseUrl||"",key:"",model:Dt.deepseek.defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],llmDeepseekActiveProfileId:"default",llmZhipuKey:"",llmZhipuModel:Dt.zhipu.defaultModel,llmZhipuProfiles:[{id:"default",name:"Default",url:Dt.zhipu.baseUrl||"",key:"",model:Dt.zhipu.defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],llmZhipuActiveProfileId:"default",llmMoonshotKey:"",llmMoonshotModel:Dt.moonshot.defaultModel,llmMoonshotProfiles:[{id:"default",name:"Default",url:Dt.moonshot.baseUrl||"",key:"",model:Dt.moonshot.defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],llmMoonshotActiveProfileId:"default",llmAliyunKey:"",llmAliyunModel:Dt.aliyun.defaultModel,llmAliyunProfiles:[{id:"default",name:"Default",url:Dt.aliyun.baseUrl||"",key:"",model:Dt.aliyun.defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],llmAliyunActiveProfileId:"default",llmBaiduKey:"",llmBaiduModel:Dt.baidu.defaultModel,llmBaiduProfiles:[{id:"default",name:"Default",url:Dt.baidu.baseUrl||"",key:"",model:Dt.baidu.defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],llmBaiduActiveProfileId:"default",llmBytedanceKey:"",llmBytedanceModel:Dt.bytedance.defaultModel,llmBytedanceProfiles:[{id:"default",name:"Default",url:Dt.bytedance.baseUrl||"",key:"",model:Dt.bytedance.defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],llmBytedanceActiveProfileId:"default",llmGroqKey:"",llmGroqModel:Dt.groq.defaultModel,llmGroqProfiles:[{id:"default",name:"Default",url:Dt.groq.baseUrl||"",key:"",model:Dt.groq.defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],llmGroqActiveProfileId:"default",llmSiliconflowKey:"",llmSiliconflowModel:Dt.siliconflow.defaultModel,llmSiliconflowProfiles:[{id:"default",name:"Default",url:Dt.siliconflow.baseUrl||"",key:"",model:Dt.siliconflow.defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],llmSiliconflowActiveProfileId:"default",llmOpenrouterKey:"",llmOpenrouterModel:Dt.openrouter.defaultModel,llmOpenrouterProfiles:[{id:"default",name:"Default",url:Dt.openrouter.baseUrl||"",key:"",model:Dt.openrouter.defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],llmOpenrouterActiveProfileId:"default",llmDeepinfraKey:"",llmDeepinfraModel:Dt.deepinfra.defaultModel,llmDeepinfraProfiles:[{id:"default",name:"Default",url:Dt.deepinfra.baseUrl||"",key:"",model:Dt.deepinfra.defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],llmDeepinfraActiveProfileId:"default",llmMistralKey:"",llmMistralModel:Dt.mistral.defaultModel,llmMistralProfiles:[{id:"default",name:"Default",url:Dt.mistral.baseUrl||"",key:"",model:Dt.mistral.defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],llmMistralActiveProfileId:"default",llmMinimaxKey:"",llmMinimaxModel:Dt.minimax.defaultModel,llmMinimaxProfiles:[{id:"default",name:"Default",url:Dt.minimax.baseUrl||"",key:"",model:Dt.minimax.defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],llmMinimaxActiveProfileId:"default",llmStepfunKey:"",llmStepfunModel:Dt.stepfun.defaultModel,llmStepfunProfiles:[{id:"default",name:"Default",url:Dt.stepfun.baseUrl||"",key:"",model:Dt.stepfun.defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],llmStepfunActiveProfileId:"default",modeImt:!1,imtPagerule:{selectors:[".mod-settings",".modal-container",".menu",".notice-container"],excludeSelectors:[".markdown-source-view",".markdown-reading-view",".cm-editor"]},shareToken:"",shareRepo:"",shareProfiles:[],shareActiveProfileId:"",reFlags:"gs",reLength:300,reDatas:vc.patterns,reRejectRe:vc.rejectPatterns,reValidRe:vc.validPatterns,astAssignments:$d.assignments,astFunctions:$d.functions,astKeys:$d.keys,astRejectRe:vc.rejectPatterns,astValidRe:vc.validPatterns,githubProxyUrl:"https://ghp.ci/",cloudRepos:[],defaultCloudRepo:"",managerTab:"plugins",pluginViewMode:"list",themeViewMode:"grid",autoSave:!0,autoDiscovery:!1,autoMatchStrategy:"comprehensive",autoApply:!1,autoCheckInterval:24,autoTrustedRepos:[],autoExcludeList:[],autoScanMode:"incremental",lastAutoCheckTime:0};var LE=require("obsidian");var ks=class{constructor(t){this.settingTab=t,this.i18n=t.i18n,this.settings=t.i18n.settings,this.a=t.containerEl,this.containerEl=t.contentEl,this.app=t.app}display(){this.main()}};var sn=require("obsidian");var Yn=[{value:"zh-cn",label:"\u7B80\u4F53\u4E2D\u6587"},{value:"zh-tw",label:"\u7E41\u9AD4\u4E2D\u6587"},{value:"en",label:"English"},{value:"ja",label:"\u65E5\u672C\u8A9E"},{value:"ko",label:"\uD55C\uAD6D\uC5B4"},{value:"fr",label:"Fran\xE7ais"},{value:"de",label:"Deutsch"},{value:"es",label:"Espa\xF1ol"},{value:"ru",label:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439"}];Rr();var e0=class extends ks{main(){new sn.Setting(this.containerEl).setHeading().setName(v("Settings.Basis.UpdateHeader")),new sn.Setting(this.containerEl).setName(v("Settings.Basis.UpdateTitle")).setDesc(v("Settings.Basis.UpdateDesc")).addToggle(u=>u.setValue(this.settings.checkUpdates).onChange(async()=>{this.settings.checkUpdates=!this.settings.checkUpdates,await this.i18n.saveSettings(),this.settings.checkUpdates?await this.i18n.coreManager.checkUpdates():(this.i18n.coreManager.updatesMark=!1,this.i18n.coreManager.updatesVersion=""),this.settingTab.basisDisplay()})),new sn.Setting(this.containerEl).setName(v("Settings.Basis.SmartUpdateTitle")).setDesc(v("Settings.Basis.SmartUpdateDesc")).addToggle(u=>u.setValue(this.settings.automaticUpdate).onChange(async d=>{this.settings.automaticUpdate=d,await this.i18n.saveSettings()})),new sn.Setting(this.containerEl).setHeading().setName(v("Settings.Basis.BasisHeader")),new sn.Setting(this.containerEl).setName(v("Settings.Basis.LangTitle")).setDesc(v("Settings.Basis.LangDesc")).addDropdown(u=>u.addOptions(Object.fromEntries(Yn.map(d=>[d.value,d.label]))).setValue(this.settings.language).onChange(async d=>{this.settings.language=d,await this.i18n.saveSettings()})),new sn.Setting(this.containerEl).setName(v("Settings.Basis.AutoSaveTitle")).setDesc(v("Settings.Basis.AutoSaveDesc")).addToggle(u=>u.setValue(this.settings.autoSave).onChange(async d=>{this.settings.autoSave=d,await this.i18n.saveSettings()})),new sn.Setting(this.containerEl).setName(v("Settings.Basis.AuthorTitle")).setDesc(v("Settings.Basis.AuthorDesc")).addText(u=>u.setPlaceholder(v("Settings.Basis.AuthorPlaceholder")).setValue(this.settings.author).onChange(async d=>{this.settings.author=d,await this.i18n.saveSettings()})),new sn.Setting(this.containerEl).setHeading().setName(v("Settings.Basis.CloudHeader")),new sn.Setting(this.containerEl).setName(v("Settings.Basis.DefaultCloudRepoTitle")).setDesc(v("Settings.Basis.DefaultCloudRepoDesc")).addText(u=>u.setPlaceholder(v("Settings.Basis.DefaultCloudRepoPlaceholder")).setValue(this.settings.defaultCloudRepo).onChange(async d=>{this.settings.defaultCloudRepo=d,await this.i18n.saveSettings()}));let t={"":v("Settings.Basis.ProxyDirect"),"https://ghproxy.net/":v("Settings.Basis.ProxyNode2"),"https://gh-proxy.com/":v("Settings.Basis.ProxyNode5"),"https://cdn.jsdelivr.net/gh/":v("Settings.Basis.ProxyNode7"),"https://fastly.jsdelivr.net/gh/":v("Settings.Basis.ProxyNode8"),"https://gcore.jsdelivr.net/gh/":v("Settings.Basis.ProxyNode9"),"https://cdn.statically.io/gh/":v("Settings.Basis.ProxyNode10")},r=this.settings.githubProxyUrl;Object.keys(t).includes(r)||(r=""),new sn.Setting(this.containerEl).setName(v("Settings.Basis.GithubProxyTitle")).setDesc(v("Settings.Basis.GithubProxyDesc")).addDropdown(u=>u.addOptions(t).setValue(r).onChange(async d=>{this.settings.githubProxyUrl=d,await this.i18n.saveSettings()})).addButton(u=>u.setButtonText(v("Settings.Basis.ProxyTestBtn")).setTooltip(v("Settings.Basis.ProxyTestTooltip")).onClick(async()=>{u.setButtonText(v("Settings.Basis.ProxyTesting")),u.buttonEl.disabled=!0;let d="https://raw.githubusercontent.com/eondrcode/obsidian-i18n/master/manifest.json",f=this.i18n.api.github.wrapProxyUrl(d);try{let p=Date.now(),m=await Promise.race([(0,sn.requestUrl)({url:f+"?t="+p,method:"GET"}),new Promise((x,g)=>setTimeout(()=>g(new Error("timeout")),5e3))]),h=Date.now()-p;if(m.status===200)new sn.Notice(v("Settings.Basis.ProxyTestSuccess",{ms:h})),u.setButtonText(`${h}ms`),u.buttonEl.style.color="var(--text-success)";else throw new Error("status "+m.status)}catch{new sn.Notice(v("Settings.Basis.ProxyTestErrorNotice")),u.setButtonText(v("Settings.Basis.ProxyTestFail")),u.buttonEl.style.color="var(--text-error)"}setTimeout(()=>{u.setButtonText(v("Settings.Basis.ProxyTestBtn")),u.buttonEl.disabled=!1,u.buttonEl.style.color=""},3500)})),new sn.Setting(this.containerEl).setHeading().setName(v("Settings.Basis.ResetHeader")),new sn.Setting(this.containerEl).setName(v("Settings.Basis.ResetTitle")).setDesc(v("Settings.Basis.ResetDesc")).addButton(u=>u.setButtonText(v("Settings.Basis.ResetBtn")).setWarning().onClick(async()=>{window.confirm(v("Settings.Basis.ResetConfirm"))&&(Object.assign(this.settings,JSON.parse(JSON.stringify(dw))),await this.i18n.saveSettings(),new sn.Notice(v("Settings.Basis.ResetSuccess")),this.settingTab.display())})),new sn.Setting(this.containerEl).setHeading().setName(v("Settings.Basis.ExternalHeader"));let a=this.containerEl.createDiv({cls:"i18n-recommend-card"});a.style.border="1px solid var(--background-modifier-border)",a.style.borderRadius="8px",a.style.padding="16px",a.style.margin="10px 0",a.style.backgroundColor="var(--background-secondary)",a.style.boxShadow="0 2px 8px rgba(0,0,0,0.05)";let n=a.createDiv();n.style.display="flex",n.style.alignItems="center",n.style.gap="10px",n.style.marginBottom="8px";let s=n.createDiv();s.style.color="var(--text-accent)",(0,sn.setIcon)(s,"blocks");let i=n.createEl("b",{text:v("Settings.Basis.ManagerTitle"),cls:"text-lg font-semibold"});i.style.color="var(--text-normal)";let o=a.createDiv({text:v("Settings.Basis.ManagerDesc"),cls:"setting-item-description"});o.style.margin="0",o.style.marginBottom="12px",o.style.lineHeight="1.6",o.style.fontSize="0.9em";let l=a.createDiv();l.style.display="flex",l.style.justifyContent="flex-end";let c=l.createEl("button",{text:v("Settings.Basis.ManagerBtn"),cls:"mod-cta"});c.style.backgroundColor="var(--interactive-accent)",c.style.color="white",c.onclick=()=>{window.open("obsidian://show-plugin?id=better-plugins-manager")}}};var Ln=require("obsidian");Rr();var t0=class extends ks{main(){let t=new Ln.Setting(this.containerEl);t.setName(`${v("Settings.Immersive.Title")}`),t.setDesc(v("Settings.Immersive.Desc")),t.addToggle(u=>{u.setValue(this.settings.modeImt).onChange(async d=>{this.settings.modeImt=d,await this.i18n.saveSettings(),this.settingTab.imtDisplay(),d?this.i18n.coreManager.activateIMT():this.i18n.coreManager.deactivateIMT()})}),new Ln.Setting(this.containerEl).setName(v("Settings.Immersive.CoreControl")).setDesc(v("Settings.Immersive.CoreControlDesc")).setHeading();let r=new Ln.Setting(this.containerEl);r.setName(v("Settings.Immersive.MatchTitle")),r.setDesc(Gd({type:"string[]",desc:v("Settings.Immersive.MatchDesc"),example:"",notice:v("Settings.Immersive.MatchNotice")})),r.addTextArea(u=>u.setValue(this.settings.imtPagerule.selectors?Array.isArray(this.settings.imtPagerule.selectors)?this.settings.imtPagerule.selectors.join(`
|
|
`):this.settings.imtPagerule.selectors:"").onChange(async d=>{this.settings.imtPagerule.selectors=d.split(`
|
|
`).filter(f=>typeof f=="string"&&f.trim()!==""),await this.i18n.saveSettings()}).inputEl.onblur=()=>{new Ln.Notice(v("Settings.Immersive.RestartNotice"),5e3)});let a=new Ln.Setting(this.containerEl);a.setName(v("Settings.Immersive.ExcludeTitle")),a.setDesc(Gd({type:"string[]",desc:v("Settings.Immersive.ExcludeDesc"),example:"",notice:""})),a.addTextArea(u=>u.setValue(this.settings.imtPagerule.excludeSelectors?Array.isArray(this.settings.imtPagerule.excludeSelectors)?this.settings.imtPagerule.excludeSelectors.join(`
|
|
`):this.settings.imtPagerule.excludeSelectors:"").onChange(async d=>{this.settings.imtPagerule.excludeSelectors=d.split(`
|
|
`).filter(f=>typeof f=="string"&&f.trim()!==""),await this.i18n.saveSettings()}).inputEl.onblur=()=>{new Ln.Notice(v("Settings.Immersive.RestartNotice"),5e3)});let n=new Ln.Setting(this.containerEl);n.setName(v("Settings.Immersive.MainFrameTitle")),n.setDesc(Gd({type:"string[]",desc:v("Settings.Immersive.MainFrameDesc"),example:""})),n.addTextArea(u=>u.setValue(this.settings.imtPagerule.mainFrameSelector?Array.isArray(this.settings.imtPagerule.mainFrameSelector)?this.settings.imtPagerule.mainFrameSelector.join(`
|
|
`):this.settings.imtPagerule.mainFrameSelector:"").onChange(async d=>{this.settings.imtPagerule.mainFrameSelector=d.split(`
|
|
`).filter(f=>typeof f=="string"&&f.trim()!==""),await this.i18n.saveSettings()}).inputEl.onblur=()=>{new Ln.Notice(v("Settings.Immersive.RestartNotice"),5e3)});let s=new Ln.Setting(this.containerEl);s.setName(v("Settings.Immersive.StayOriginalTitle")),s.setDesc(Gd({type:"string[]",desc:v("Settings.Immersive.StayOriginalDesc"),example:""})),s.addTextArea(u=>u.setValue(this.settings.imtPagerule.stayOriginalSelectors?Array.isArray(this.settings.imtPagerule.stayOriginalSelectors)?this.settings.imtPagerule.stayOriginalSelectors.join(`
|
|
`):this.settings.imtPagerule.stayOriginalSelectors:"").onChange(async d=>{this.settings.imtPagerule.stayOriginalSelectors=d.split(`
|
|
`).filter(f=>typeof f=="string"&&f.trim()!==""),await this.i18n.saveSettings()}).inputEl.onblur=()=>{new Ln.Notice(v("Settings.Immersive.RestartNotice"),5e3)});let i=new Ln.Setting(this.containerEl);i.setName(v("Settings.Immersive.ExtraBlockTitle")),i.setDesc(Gd({type:"string[]",desc:v("Settings.Immersive.ExtraBlockDesc"),example:""})),i.addTextArea(u=>u.setValue(this.settings.imtPagerule.extraBlockSelectors?Array.isArray(this.settings.imtPagerule.extraBlockSelectors)?this.settings.imtPagerule.extraBlockSelectors.join(`
|
|
`):this.settings.imtPagerule.extraBlockSelectors:"").onChange(async d=>{this.settings.imtPagerule.extraBlockSelectors=d.split(`
|
|
`).filter(f=>typeof f=="string"&&f.trim()!==""),await this.i18n.saveSettings()}).inputEl.onblur=()=>{new Ln.Notice(v("Settings.Immersive.RestartNotice"),5e3)});let o=new Ln.Setting(this.containerEl);o.setName(v("Settings.Immersive.ExtraInlineTitle")),o.setDesc(Gd({type:"string[]",desc:v("Settings.Immersive.ExtraInlineDesc"),example:""})),o.addTextArea(u=>u.setValue(this.settings.imtPagerule.extraInlineSelectors?Array.isArray(this.settings.imtPagerule.extraInlineSelectors)?this.settings.imtPagerule.extraInlineSelectors.join(`
|
|
`):this.settings.imtPagerule.extraInlineSelectors:"").onChange(async d=>{this.settings.imtPagerule.extraInlineSelectors=d.split(`
|
|
`).filter(f=>typeof f=="string"&&f.trim()!==""),await this.i18n.saveSettings()}).inputEl.onblur=()=>{new Ln.Notice(v("Settings.Immersive.RestartNotice"),5e3)});let l=new Ln.Setting(this.containerEl);l.setName(v("Settings.Immersive.TranslationClassesTitle")),l.setDesc(Gd({type:"string[]",desc:v("Settings.Immersive.TranslationClassesDesc"),example:""})),l.addTextArea(u=>u.setValue(this.settings.imtPagerule.translationClasses?Array.isArray(this.settings.imtPagerule.translationClasses)?this.settings.imtPagerule.translationClasses.join(`
|
|
`):this.settings.imtPagerule.translationClasses:"").onChange(async d=>{this.settings.imtPagerule.translationClasses=d.split(`
|
|
`).filter(f=>typeof f=="string"&&f.trim()!==""),await this.i18n.saveSettings()}).inputEl.onblur=()=>{new Ln.Notice(v("Settings.Immersive.RestartNotice"),5e3)});let c=new Ln.Setting(this.containerEl);c.setName(v("Settings.Immersive.InjectedCssTitle")),c.setDesc(Gd({type:"string",desc:v("Settings.Immersive.InjectedCssDesc"),example:""})),c.addTextArea(u=>{u.setValue(this.settings.imtPagerule.injectedCss?Array.isArray(this.settings.imtPagerule.injectedCss)?this.settings.imtPagerule.injectedCss.join(`
|
|
`):this.settings.imtPagerule.injectedCss:"").onChange(async d=>{this.settings.imtPagerule.injectedCss=d,await this.i18n.saveSettings()}).inputEl.onblur=()=>{new Ln.Notice(v("Settings.Immersive.RestartNotice"),5e3)},u.inputEl.setAttr("rows",4)})}},Gd=e=>{let t=new DocumentFragment;return t.createDiv({text:`${v("Settings.Immersive.DescLabel")} ${e.desc}`}),e.notice&&t.createDiv({text:e.notice}),t};var fw=require("obsidian");Rr();var r0=class extends ks{main(){new fw.Setting(this.containerEl).setName(v("Settings.Ai.Provider")).setHeading();let t=new fw.Setting(this.containerEl);t.setName(`${v("Settings.Ai.Provider")} (Provider)`),t.setDesc(v("Settings.Ai.ProviderDesc")),t.addDropdown(r=>{let a=[{id:"international",title:"\u2500\u2500 \u{1F30D} \u56FD\u9645\u4E3B\u6D41 (International) \u2500\u2500"},{id:"domestic",title:"\u2500\u2500 \u{1F1E8}\u{1F1F3} \u56FD\u4EA7\u5927\u6A21\u578B (Domestic) \u2500\u2500"},{id:"aggregated",title:"\u2500\u2500 \u{1F680} \u805A\u5408\u5E73\u53F0 (Aggregated) \u2500\u2500"},{id:"local",title:"\u2500\u2500 \u{1F3E0} \u672C\u5730\u90E8\u7F72 (Local) \u2500\u2500"}],n=Object.values(Dt);a.forEach(i=>{let o=n.filter(l=>l.category===i.id);o.length>0&&(r.addOption(`header-${i.id}`,i.title),o.forEach(l=>{r.addOption(l.id,l.name)}))}),r.setValue(String(this.settings.llmApi));let s=r.selectEl;s&&Array.from(s.options).forEach(i=>{i.value.startsWith("header-")&&(i.disabled=!0,i.style.backgroundColor="var(--background-secondary)",i.style.color="var(--text-muted)")}),r.onChange(async i=>{if(i.startsWith("header-")){r.setValue(String(this.settings.llmApi));return}this.settings.llmApi=i,await this.i18n.saveSettings(),this.settingTab.llmDisplay()})}),new fw.Setting(this.containerEl).setName(v("Settings.Ai.ConfigHeader")).setHeading()}};var fn=require("obsidian");Rr();var DB=require("obsidian");Rr();function pw(e){if(!e)return e;let t=e.trim();if(t=t.replace(/\/+$/,""),!t)return t;let r=["/chat/completions","/completions","/chat","/models"],a=!0;for(;a;){a=!1;for(let n of r)if(t.endsWith(n)){t=t.substring(0,t.length-n.length).replace(/\/+$/,""),a=!0;break}}return t}function mw(e){if(!e||e.trim()==="")throw new Error("AI \u8FD4\u56DE\u5185\u5BB9\u4E3A\u7A7A");let t=e.trim(),r,a=!1,n=t.match(/```(?:json)?\s*([\s\S]*?)\s*```/);if(n)t=n[1].trim();else{let l=Math.min(t.indexOf("[")!==-1?t.indexOf("["):1/0,t.indexOf("{")!==-1?t.indexOf("{"):1/0),c=Math.max(t.lastIndexOf("]"),t.lastIndexOf("}"));l!==1/0&&c!==-1&&c>l&&(t=t.substring(l,c+1))}try{r=JSON.parse(t),a=!0}catch{try{let l=t.replace(/[\u0000-\u001F]+/g," ");l=l.replace(/,\s*([\]}])/g,"$1"),r=JSON.parse(l),a=!0}catch{a=!1}}if(a)try{let c=kie(r).filter(u=>!!(u&&typeof u.i=="number"&&typeof u.t=="string"));if(c.length>0)return c}catch{}let s=[],i=/"i"\s*:\s*(\d+)\s*,\s*"t"\s*:\s*"([^"\\]*(?:\\.[^"\\]*)*)"/g,o;for(;(o=i.exec(e))!==null;)try{let l=parseInt(o[1]),c=o[2];try{c=JSON.parse(`"${o[2]}"`)}catch{c=c.replace(/\\n/g,`
|
|
`).replace(/\\"/g,'"').replace(/\\\\/g,"\\")}s.push({i:l,t:c})}catch{}if(s.length>0)return s;throw new Error("AI \u8FD4\u56DE\u6570\u636E\u683C\u5F0F\u4E25\u91CD\u635F\u574F\uFF0C\u6B63\u5219\u6025\u6551\u4E5F\u672A\u80FD\u63D0\u53D6\u5230\u4E1A\u52A1\u7ED3\u6784 ({i, t})\u3002")}function kie(e){if(Array.isArray(e))return e;if(e&&typeof e=="object"&&!Array.isArray(e)){let r=e;for(let a of Object.values(r))if(Array.isArray(a)&&a.length>0)return a;if("i"in r&&"t"in r)return[r]}let t=JSON.stringify(e).substring(0,200);throw new Error(`\u65E0\u6CD5\u4ECE\u8FD4\u56DE\u4FE1\u606F\u4E2D\u8BC6\u522B\u63D0\u53D6\u6570\u7EC4: ${t}`)}var hw=class{constructor(t,r,a,n,s,i,o,l){this.logs=[];this.url=(t||"").trim(),this.key=(r||"").trim(),this.model=(a||"").trim(),this.engine=n||"openai",this.responseFormat=s||"text",this.timeout=i||6e4,this.language=o||"\u7B80\u4F53\u4E2D\u6587",this.style=l||"Technical"}addLog(t,r,a="info",n){this.logs.push({stage:t,message:r,level:a,details:n})}getInitialReport(){return{overallStatus:"warning",endpoint:{status:"na",value:this.url},auth:{status:"na",value:"***"},model:{status:"na",value:this.model||"N/A"},systemRole:{status:"na",value:"\u7B49\u5F85\u4E2D"},jsonMode:{status:"na",value:"\u7B49\u5F85\u4E2D"},jsonSchema:{status:"na",value:"\u7B49\u5F85\u4E2D"},translation:{status:"na",value:"\u7B49\u5F85\u4E2D"},translationFix:{status:"na",value:"\u7B49\u5F85\u4E2D"},concurrency:{status:"na",value:"\u7B49\u5F85\u4E2D"},logs:this.logs}}async runDeepDiagnostic(t){this.logs=[];let r={overallStatus:"healthy",endpoint:{status:"na",value:this.url},auth:{status:"na",value:"***"},model:{status:"na",value:this.model||"N/A"},systemRole:{status:"na",value:"\u672A\u8FDE\u901A"},jsonMode:{status:"na",value:"\u672A\u8FDE\u901A"},jsonSchema:{status:"na",value:"\u672A\u8FDE\u901A"},translation:{status:"na",value:"\u672A\u8FDE\u901A"},translationFix:{status:"na",value:"\u672A\u8FDE\u901A"},concurrency:{status:"na",value:"\u672A\u8FDE\u901A"},logs:this.logs};r.endpoint.status="testing",t?.(r),this.addLog("Endpoint",`\u6B63\u5728\u6D4B\u8BD5\u5230 ${this.url} \u7684\u8FDE\u901A\u6027 (\u5F15\u64CE: ${this.engine})`);let a=Date.now(),n=pw(this.url),s={openai:"https://api.openai.com/v1",gemini:"https://generativelanguage.googleapis.com/v1beta/openai",ollama:"http://localhost:11434/v1"},i=n||s[this.engine]||s.openai;try{this.url&&!this.url.match(/^https?:\/\//)&&(r.endpoint.status="warn",r.endpoint.tip="URL \u5FC5\u987B\u4EE5 http:// \u6216 https:// \u5F00\u5934",this.addLog("Endpoint","\u534F\u8BAE\u5F02\u5E38 (\u8BF7\u68C0\u67E5 http/https \u5934)","warn"));let g=this.engine==="ollama"?`${i.replace(/\/v1$/,"")}/api/tags`:`${i}/models`,y=await this.safeRequest(g,"GET",this.engine!=="ollama"),b=Date.now()-a;if(r.endpoint.latency=b,y.status>=200&&y.status<300||[401,403,405,429].includes(y.status))r.endpoint.status=r.endpoint.status==="warn"?"warn":"pass",r.endpoint.value=`${i} (${y.status})`,this.addLog("Endpoint",`\u6210\u529F\u8FDE\u901A (\u8017\u65F6: ${b}ms, \u72B6\u6001\u7801: ${y.status})`);else if(y.status===404){r.endpoint.status="warn",r.endpoint.value=`${i} (${y.status})`;let S=this.engine==="gemini"?"\u7AEF\u70B9\u8FD4\u56DE 404\uFF0CGemini \u4F7F\u7528 /v1beta \u8DEF\u5F84\uFF0C\u8BF7\u786E\u8BA4\u63A5\u53E3\u5730\u5740\u6B63\u786E":v("Settings.Ai.TestFail404")||"\u7AEF\u70B9\u672A\u627E\u5230\uFF0C\u5C06\u7EE7\u7EED\u540E\u7EED\u6D4B\u8BD5...";r.endpoint.tip=S,this.addLog("Endpoint","\u63A2\u6D4B\u7AEF\u70B9\u8FD4\u56DE 404\uFF0C\u5FFD\u7565\u5E76\u7EE7\u7EED...","warn")}else return y.status===406?(r.endpoint.status="fail",r.endpoint.tip=`\u68C0\u6D4B\u5230\u975E API \u54CD\u5E94\uFF08\u6536\u5230 HTML \u7F51\u9875\uFF09\u3002\u8FD9\u901A\u5E38\u662F\u56E0\u4E3A\uFF1A
|
|
1. \u8BEF\u586B\u4E86\u670D\u52A1\u5546\u5B98\u7F51\u5730\u5740\uFF08\u5982 https://openai.com\uFF09
|
|
2. \u63A5\u53E3\u8DEF\u5F84\u4E0D\u5B8C\u6574\uFF08\u786E\u4FDD\u5305\u542B /v1 \u6216\u5BF9\u5E94\u540E\u7F00\uFF09
|
|
3. \u4EE3\u7406\u670D\u52A1\u5668\uFF08\u5982 Clash\uFF09\u62E6\u622A\u5E76\u8FD4\u56DE\u4E86\u767B\u5F55/\u9A8C\u8BC1\u9875\u9762`,r.endpoint.value=`\u54CD\u5E94\u683C\u5F0F\u51B2\u7A81 (${y.status})`,r.endpoint.rawResponse=y.text?.substring(0,800),r.overallStatus="failed",this.addLog("Endpoint","\u68C0\u6D4B\u5230 HTML \u7F51\u9875\u5185\u5BB9\uFF0C\u8BF7\u68C0\u67E5\u63A5\u53E3\u5730\u5740\u662F\u5426\u914D\u7F6E\u4E3A\u5B98\u7F51\u4E3B\u9875","error"),t?.(r),r):(r.endpoint.status="fail",r.endpoint.tip=y.status===404?"\u63A5\u53E3\u8DEF\u5F84\u672A\u627E\u5230 (404)\u3002\u8BF7\u786E\u8BA4\u5730\u5740\u662F\u5426\u5305\u542B /v1 \u6216\u670D\u52A1\u5546\u8981\u6C42\u7684\u7279\u5B9A\u540E\u7F00\u3002":`\u670D\u52A1\u5668\u8FD4\u56DE\u5F02\u5E38\u72B6\u6001\u7801: ${y.status}`,r.endpoint.value=`HTTP ${y.status}`,r.endpoint.rawResponse=y.text?.substring(0,800),r.overallStatus="failed",this.addLog("Endpoint",`\u8BF7\u6C42\u5931\u8D25\uFF0C\u670D\u52A1\u5668\u8FD4\u56DE\u72B6\u6001\u7801: ${y.status}`,"error",y.text?.substring(0,800)),t?.(r),r)}catch(g){r.endpoint.status="fail",r.overallStatus="failed";let y=g.message||"";return y.includes("ECONNREFUSED")||y.includes("ERR_CONNECTION_REFUSED")?(r.endpoint.tip=this.engine==="ollama"?"Ollama \u670D\u52A1\u8FDE\u63A5\u5931\u8D25\u3002\u8BF7\u786E\u8BA4 Ollama \u5DF2\u542F\u52A8\uFF08ollama serve\uFF09\u4E14\u76D1\u542C\u7AEF\u53E3\u6B63\u786E\u3002":`\u76EE\u6807\u670D\u52A1\u5668\u62D2\u7EDD\u8FDE\u63A5\u3002\u8BF7\u68C0\u67E5\uFF1A
|
|
1. \u63A5\u53E3\u5730\u5740\u548C\u7AEF\u53E3\u662F\u5426\u6B63\u786E
|
|
2. \u5982\u679C\u4F7F\u7528\u4E86\u4EE3\u7406\uFF08\u5982 Clash/V2Ray\uFF09\uFF0C\u8BF7\u786E\u8BA4\u5176\u5DE5\u4F5C\u6B63\u5E38
|
|
3. \u68C0\u67E5\u63D2\u4EF6\u5185\u7684\u201C\u7F51\u7EDC\u4EE3\u7406\u201D\u8BBE\u7F6E\u662F\u5426\u914D\u7F6E\u6B63\u786E`,r.endpoint.value="\u8FDE\u63A5\u88AB\u62D2\u7EDD",r.endpoint.rawResponse=y,this.addLog("Endpoint",`\u8FDE\u63A5\u88AB\u62D2\u7EDD (ECONNREFUSED): ${y}`,"error")):y.includes("ENOTFOUND")||y.includes("ERR_NAME_NOT_RESOLVED")||y.includes("getaddrinfo")?(r.endpoint.tip=`\u57DF\u540D\u89E3\u6790\u5931\u8D25\u3002\u8BF7\u68C0\u67E5\uFF1A
|
|
1. \u5730\u5740\u62FC\u5199\u662F\u5426\u6B63\u786E
|
|
2. \u5F53\u524D\u7F51\u7EDC\u6216\u4EE3\u7406\u73AF\u5883\u662F\u5426\u53EF\u4EE5\u89E3\u6790\u8BE5\u57DF\u540D`,r.endpoint.value="DNS \u89E3\u6790\u5931\u8D25",r.endpoint.rawResponse=y,this.addLog("Endpoint",`DNS \u89E3\u6790\u5931\u8D25: ${y}`,"error")):y.includes("ETIMEDOUT")||y.includes("timeout")?(r.endpoint.tip=`\u8BF7\u6C42\u8D85\u65F6\u3002\u53EF\u80FD\u539F\u56E0\uFF1A
|
|
1. \u9700\u914D\u7F6E\u7CFB\u7EDF\u4EE3\u7406\u6216\u63D2\u4EF6\u5185\u90E8\u4EE3\u7406
|
|
2. \u670D\u52A1\u5546\u7531\u4E8E\u5730\u7406\u4F4D\u7F6E\u539F\u56E0\u65E0\u6CD5\u76F4\u63A5\u8BBF\u95EE
|
|
3. \u4EE3\u7406\u8282\u70B9\u54CD\u5E94\u8FC7\u6162`,r.endpoint.value="\u8FDE\u63A5\u8D85\u65F6",r.endpoint.rawResponse=y,this.addLog("Endpoint",`\u8FDE\u63A5\u8D85\u65F6: ${y}`,"error")):y.includes("ERR_TLS")||y.includes("CERT")||y.includes("SSL")?(r.endpoint.tip=`\u8BC1\u4E66\u6821\u9A8C\u5931\u8D25\uFF08SSL/TLS\uFF09\u3002\u8FD9\u901A\u5E38\u662F\u56E0\u4E3A\uFF1A
|
|
1. \u5F00\u542F\u4E86\u4EE3\u7406\u8F6F\u4EF6\u7684\u201CHTTPS \u52AB\u6301/\u89E3\u6790\u201D\u529F\u80FD
|
|
2. \u4F7F\u7528\u4E86\u81EA\u7B7E\u540D\u8BC1\u4E66\u7684\u4E2D\u8F6C\u63A5\u53E3
|
|
3. \u7CFB\u7EDF\u6839\u8BC1\u4E66\u5E93\u7F3A\u5931`,r.endpoint.value="\u5B89\u5168\u8BC1\u4E66\u9519\u8BEF",r.endpoint.rawResponse=y,this.addLog("Endpoint",`TLS \u8BC1\u4E66\u63E1\u624B\u5931\u8D25: ${y}`,"error")):(r.endpoint.tip=`\u5E95\u5C42\u7F51\u7EDC\u5F02\u5E38: ${y}\u3002\u5EFA\u8BAE\u68C0\u67E5\u7F51\u7EDC\u73AF\u5883\u6216\u5C1D\u8BD5\u66F4\u6362\u4EE3\u7406\u8282\u70B9\u3002`,r.endpoint.value="\u7F51\u7EDC\u5F02\u5E38",r.endpoint.rawResponse=g instanceof Error&&g.stack||y,this.addLog("Endpoint",`\u5E95\u5C42\u7F51\u7EDC\u5F02\u5E38: ${y}`,"error",g instanceof Error?g.stack:void 0)),t?.(r),r}if(t?.(r),r.auth.status="testing",t?.(r),this.addLog("Auth","\u5C1D\u8BD5\u9A8C\u8BC1 API Key / Token \u53EF\u7528\u6027"),this.engine==="ollama")r.auth.status="pass",r.auth.value="\u672C\u5730\u670D\u52A1 (\u514D\u9274\u6743)",r.auth.latency=0,this.addLog("Auth","Ollama \u672C\u5730\u5F15\u64CE\uFF0C\u8DF3\u8FC7 API Key \u9274\u6743");else{let g=Date.now(),y=`${i}/models`,b=await this.safeRequest(y,"GET",!0);if(r.auth.latency=Date.now()-g,b.status===200)r.auth.status="pass",r.auth.value="\u6709\u6548",this.addLog("Auth","API Key \u6821\u9A8C\u901A\u8FC7");else if(b.status===404&&r.endpoint.status==="warn")r.auth.status="warn",r.auth.value="\u8DF3\u8FC7 (404)",r.auth.tip="\u9274\u6743\u7AEF\u70B9\u4E0D\u53EF\u7528\uFF0C\u5C06\u5728\u540E\u7EED\u5BF9\u8BDD\u6D4B\u8BD5\u4E2D\u9A8C\u8BC1\u5BC6\u94A5\u6709\u6548\u6027",this.addLog("Auth","\u7F3A\u5C11 /models \u7AEF\u70B9\uFF0C\u8DF3\u8FC7\u9274\u6743\uFF0C\u5C06\u5728\u540E\u7EED\u6B65\u9AA4\u4E2D\u8865\u507F","warn");else return r.auth.status="fail",r.auth.value=`HTTP ${b.status}`,b.status===401?r.auth.tip=`\u9274\u6743\u5931\u8D25 (401)\u3002\u8BF7\u68C0\u67E5\uFF1A
|
|
1. API Key \u586B\u5199\u662F\u5426\u6B63\u786E\uFF08\u6CE8\u610F\u4E0D\u8981\u5305\u542B\u591A\u4F59\u7A7A\u683C\uFF09
|
|
2. \u8BE5\u5BC6\u94A5\u662F\u5426\u5DF2\u88AB\u7981\u7528\u6216\u989D\u5EA6\u5DF2\u7528\u5C3D`:b.status===403?r.auth.tip=`\u8BBF\u95EE\u53D7\u9650 (403)\u3002\u8BF7\u68C0\u67E5\uFF1A
|
|
1. \u8BE5\u5BC6\u94A5\u662F\u5426\u6709\u6743\u8BBF\u95EE\u5BF9\u5E94\u6A21\u578B
|
|
2. \u8D26\u53F7\u662F\u5426\u5B58\u5728\u5730\u533A\u8BBF\u95EE\u9650\u5236\uFF08\u9700\u914D\u5408\u4EE3\u7406\uFF09`:b.status===429?r.auth.tip="\u914D\u989D\u8017\u5C3D\u6216\u9891\u7387\u53D7\u9650 (429)\u3002\u8BF7\u786E\u8BA4\u60A8\u7684\u8D26\u6237\u4F59\u989D\u6216\u964D\u4F4E\u5E76\u53D1\u8BF7\u6C42\u6570\u3002":r.auth.tip=`\u9274\u6743\u7AEF\u70B9\u8FD4\u56DE\u610F\u5916\u72B6\u6001\u7801: ${b.status}`,r.auth.rawResponse=b.text?.substring(0,1e3),r.overallStatus="failed",this.addLog("Auth",`\u8EAB\u4EFD\u9274\u6743\u5931\u8D25\uFF0C\u72B6\u6001\u7801: ${b.status}`,"error",b.text?.substring(0,1e3)),t?.(r),r}if(t?.(r),!this.model)return r.model.status="warn",r.model.tip="\u672A\u586B\u5199\u6A21\u578B\u540D\u79F0\uFF0C\u8DF3\u8FC7\u6A21\u578B\u53EF\u7528\u6027\u68C0\u6D4B",this.addLog("Model","\u672A\u586B\u5199\u6A21\u578B\u540D\u79F0\uFF0C\u8DF3\u8FC7\u6A21\u578B\u53EF\u7528\u6027\u68C0\u6D4B","warn"),r;r.model.status="testing",t?.(r),this.addLog("Model",`\u63A2\u6D4B\u6240\u9009\u6A21\u578B\u670D\u52A1\u8282\u70B9: [${this.model}]`);let o=Date.now(),l=await this.safeRequest(`${i}/chat/completions`,"POST",!0,{model:this.model,messages:[{role:"user",content:"hi"}],max_tokens:1});if(r.model.latency=Date.now()-o,l.status===200)r.model.status="pass",this.addLog("Model",`\u6A21\u578B ${this.model} \u901A\u9053\u7545\u901A\uFF0C\u5DF2\u80FD\u591F\u751F\u6210\u5BF9\u8BDD`);else return r.model.status="fail",r.model.value=`HTTP ${l.status}`,l.status===404?r.model.tip=`\u627E\u4E0D\u5230\u6A21\u578B "${this.model}" (404)\u3002\u8BF7\u786E\u6A21\u578B\u540D\u79F0\u62FC\u5199\u65E0\u8BEF\uFF0C\u4E14\u60A8\u7684\u8D26\u53F7\u6709\u6743\u901A\u8FC7 API \u8BBF\u95EE\u8BE5\u6A21\u578B\u3002`:l.status===400?r.model.tip=`\u8BF7\u6C42\u683C\u5F0F\u9519\u8BEF (400)\u3002\u53EF\u80FD\u539F\u56E0\uFF1A
|
|
1. \u6A21\u578B\u540D\u79F0\u4E0D\u6B63\u786E
|
|
2. \u8BE5\u6A21\u578B\u4E0D\u652F\u6301 /chat/completions \u63A5\u53E3`:r.model.tip=`\u6A21\u578B\u63A2\u9488\u8FD4\u56DE\u9519\u8BEF\u7801: ${l.status}`,r.model.rawResponse=l.text?.substring(0,1e3),r.overallStatus="failed",this.addLog("Model",`\u5411\u6A21\u578B\u53D1\u9001\u63A2\u9488\u88AB\u62D2\u7EDD\u6216\u627E\u4E0D\u5230\u8BE5\u6A21\u578B\uFF0C\u72B6\u6001\u7801 ${l.status}`,"error",l.text?.substring(0,1e3)),t?.(r),r;t?.(r),r.systemRole.status="testing",t?.(r),this.addLog("SystemRole","\u6295\u9012\u5305\u542B system \u524D\u7F6E\u89D2\u8272\u7684\u5BF9\u767D\u4EE5\u6D4B\u8BD5\u5176\u670D\u4ECE\u5EA6");let c=Date.now(),u=await this.safeRequest(`${i}/chat/completions`,"POST",!0,{model:this.model,messages:[{role:"system",content:"You are a helpful assistant. Reply only with: OK"},{role:"user",content:"hi"}],max_tokens:5});r.systemRole.latency=Date.now()-c,u.status===200?(r.systemRole.status="pass",r.systemRole.value="\u5DF2\u652F\u6301",this.addLog("SystemRole","System \u8EAB\u4EFD\u69FD\u54CD\u5E94\u6B63\u5E38\uFF0C\u5141\u8BB8\u627F\u8F7D\u7CFB\u7EDF\u63D0\u793A\u8BCD")):(r.systemRole.status="fail",r.systemRole.tip=v("Settings.Ai.DiagTipSystemRole"),r.overallStatus=r.overallStatus==="healthy"?"warning":r.overallStatus,this.addLog("SystemRole",`\u6A21\u578B\u62D2\u7EDD\u4E86 system \u89D2\u8272\u626E\u6F14\u8F93\u5165 (${u.status})`,"warn")),t?.(r),r.jsonMode.status="testing",t?.(r),this.addLog("Capabilities","\u63A2\u6D4B\u539F\u751F JSON_OBJECT \u5F3A\u5236\u8F93\u51FA\u7279\u6027\u9002\u914D\u7A0B\u5EA6");let d=await this.safeRequest(`${i}/chat/completions`,"POST",!0,{model:this.model,messages:[{role:"user",content:'respond with json: {"ok":true}'}],response_format:{type:"json_object"},max_tokens:10});d.status===200?(r.jsonMode.status="pass",r.jsonMode.value="\u5DF2\u652F\u6301",this.addLog("Capabilities","\u63A2\u6D4B\u901A\u8FC7\uFF1A\u539F\u751F JSON_OBJECT \u5F3A\u5236\u8F93\u51FA\u5DE5\u4F5C\u6B63\u5E38")):(r.jsonMode.status="warn",r.jsonMode.tip="\u8BE5\u6A21\u578B\u4E0D\u652F\u6301\u539F\u751F JSON_OBJECT\uFF0C\u5EFA\u8BAE\u5728\u201C\u54CD\u5E94\u683C\u5F0F\u201D\u4E2D\u56DE\u9000\u4E3A Text",r.overallStatus=r.overallStatus==="healthy"?"warning":r.overallStatus,this.addLog("Capabilities",`\u6A21\u578B\u660E\u786E\u62D2\u7EDD\u6216\u4E0D\u652F\u6301 JSON \u6A21\u5F0F\u5F3A\u5236\u7EA6\u675F\uFF0C\u72B6\u6001\u7801: ${d.status}`,"warn")),t?.(r),r.jsonSchema.status="testing",t?.(r),this.addLog("Capabilities","\u63A2\u6D4B\u9AD8\u7EA7\u7279\u6027\uFF1A\u7ED3\u6784\u5316\u8F93\u51FA (JSON Schema \u4E25\u683C\u9075\u5FAA)");let f=await this.safeRequest(`${i}/chat/completions`,"POST",!0,{model:this.model,messages:[{role:"user",content:"respond with schema"}],response_format:{type:"json_schema",json_schema:{name:"test",schema:{type:"object",properties:{ok:{type:"boolean"}},required:["ok"],additionalProperties:!1},strict:!0}},max_tokens:10});f.status===200?(r.jsonSchema.status="pass",r.jsonSchema.value="\u5DF2\u652F\u6301",this.addLog("Capabilities","\u63A2\u6D4B\u901A\u8FC7\uFF1A\u57FA\u4E8E JSON Schema \u7684\u9AD8\u5EA6\u7ED3\u6784\u5316\u7EA6\u675F\u529F\u80FD\u5B8C\u597D")):(r.jsonSchema.status="warn",r.jsonSchema.tip="\u8BE5\u6A21\u578B\u4E0D\u652F\u6301\u539F\u751F JSON_SCHEMA\u3002\u82E5\u5B9E\u9645\u7FFB\u8BD1\u62A5\u9519\uFF0C\u5EFA\u8BAE\u5C06\u54CD\u5E94\u683C\u5F0F\u6539\u56DE Text",r.overallStatus=r.overallStatus==="healthy"?"warning":r.overallStatus,this.addLog("Capabilities",`\u9AD8\u7EA7\u7ED3\u6784\u5316\u8F93\u51FA\u529F\u80FD\u906D\u62D2\u6216\u672A\u5B9E\u73B0\uFF0C\u964D\u7EA7\u4E3A\u5E38\u89C4\u751F\u6210 ${f.status}`,"warn")),t?.(r),r.translation.status="testing",t?.(r),this.addLog("Translation","\u53D1\u8D77\u5FAE\u578B\u7FFB\u8BD1\u6C99\u76D2\u8FDB\u884C E2E \u5168\u94FE\u8DEF\u7EC8\u6781\u6A21\u62DF...");let p={model:this.model,messages:[{role:"system",content:`You are a translator. Translate the input JSON array. Each object has "i" (id, keep unchanged) and "s" (source text). Return a JSON array where each object has "i" and "t" (translated text). Target language: ${this.language}. Style: ${this.style}. ONLY return the JSON array, no other text.`},{role:"user",content:JSON.stringify([{i:1,s:"Settings for ${filename}"},{i:2,s:"\\u2728 Shiny"}])}],max_tokens:150,temperature:.3};this.responseFormat==="json_object"?p.response_format={type:"json_object"}:this.responseFormat==="json_schema"&&(p.response_format={type:"json_schema",json_schema:{name:"translation_result",schema:{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{i:{type:"number"},t:{type:"string"}},required:["i","t"],additionalProperties:!1}}},required:["items"],additionalProperties:!1},strict:!0}});let m=Date.now();try{let g=await this.safeRequest(`${i}/chat/completions`,"POST",!0,p),y=Date.now()-m;if(r.translation.latency=y,g.status!==200){r.translation.status="fail",r.translation.value=`HTTP ${g.status}`;let b=null;try{b=typeof g.json=="object"?g.json:JSON.parse(g.text)}catch{}let S=b?.error?.message||b?.message||"";g.status===400&&this.responseFormat!=="text"?r.translation.tip=`\u8BF7\u6C42\u88AB\u62D2\u7EDD (400)\u3002\u6781\u5927\u6982\u7387\u662F\u8BE5\u6A21\u578B\u4E0D\u652F\u6301 "${this.responseFormat}" \u54CD\u5E94\u683C\u5F0F\u3002\u5EFA\u8BAE\u5C06\u5176\u6539\u4E3A Text \u6A21\u5F0F\u91CD\u8BD5\u3002`+(S?`
|
|
\u8BE6\u60C5: ${S}`:""):r.translation.tip=`\u7FFB\u8BD1\u8BF7\u6C42\u5931\u8D25 (${g.status})\u3002`+(S?`\u8BF4\u660E: ${S}`:"\u8BF7\u68C0\u67E5\u7F51\u7EDC\u6216\u6A21\u578B\u914D\u989D\u3002"),r.translation.rawResponse=g.text?.substring(0,1e3),r.overallStatus="failed",this.addLog("Translation",`\u7FFB\u8BD1\u6A21\u62DF\u8BF7\u6C42\u5931\u8D25\uFF0C\u72B6\u6001\u7801: ${g.status}`,"error",g.text?.substring(0,1e3))}else{let b=!1;try{let w=(typeof g.json=="object"?g.json:JSON.parse(g.text))?.choices?.[0]?.message?.content;if(w){let P=[];try{P=mw(w)}catch{this.addLog("Translation","\u683C\u5F0F\u4FEE\u590D\u5F15\u64CE\u901A\u62A5\uFF1A\u68C0\u6D4B\u5230\u975E\u6807\u51C6\u54CD\u5E94\u8F7D\u8377\uFF0C\u6B63\u5728\u5C1D\u8BD5\u5F3A\u5236\u62A2\u6551...","warn")}if(P&&P.length>0){let C=P.every(R=>typeof R.i=="number"&&typeof R.t=="string"),I=P.some(R=>R.i===1||R.i===2);C&&I&&(b=!0,r.translation.status="pass",r.translation.value=`\u2714 \u901A\u8FC7 (${y}ms)`,this.addLog("Translation",`\u2714 \u6C99\u76D2\u5168\u94FE\u8DEF\u901A\u8FC7\uFF1A\u6210\u529F\u6355\u83B7\u5E76\u91CD\u7EC4\u51FA ${P.length} \u6761\u5143\u6570\u636E\uFF0C\u54CD\u5E94\u8017\u65F6 ${y}ms`),g.json?.usage&&(r.translation.usage={prompt:g.json.usage.prompt_tokens,completion:g.json.usage.completion_tokens}))}}}catch(S){this.addLog("Translation",`\u5E95\u5C42\u63D0\u53D6\u5185\u5BB9\u65F6\u53D1\u751F\u89E3\u6790\u9519: ${S.message}`,"error")}if(!b){r.translation.status="fail",r.translation.value="\u683C\u5F0F\u89E3\u6790\u5931\u8D25";let S=typeof g.json=="object"?JSON.stringify(g.json,null,2):g.text,w="";try{w=(typeof g.json=="object"?g.json:JSON.parse(g.text))?.choices?.[0]?.message?.content||""}catch{}r.translation.tip=`\u6A21\u578B\u8FD4\u56DE\u4E86\u65E0\u6CD5\u88AB\u89E3\u6790\u7684\u5185\u5BB9\u3002\u5F53\u524D\u9009\u62E9\u683C\u5F0F: "${this.responseFormat}"\u3002
|
|
\u6A21\u578B\u5B9E\u9645\u8F93\u51FA\u9884\u89C8: "${w.substring(0,200)}..."
|
|
\u5EFA\u8BAE: \u82E5\u6A21\u578B\u8F93\u51FA\u4E86\u5927\u91CF\u975E JSON \u6587\u5B57\uFF0C\u8BF7\u786E\u8BA4\u5176\u662F\u5426\u652F\u6301 JSON \u6A21\u5F0F\uFF0C\u6216\u6539\u7528 Text \u683C\u5F0F\u3002`,r.translation.rawResponse=S,r.overallStatus="failed",this.addLog("Translation","\u6A21\u578B\u751F\u6210\u7684\u5185\u5BB9\u65E0\u6CD5\u89E3\u6790\uFF0C\u8BF7\u68C0\u67E5\u670D\u52A1\u5546\u8FD4\u56DE\u7684\u6570\u636E\u6216\u54CD\u5E94\u683C\u5F0F\u662F\u5426\u6B63\u786E\u3002","error",S)}b&&y>this.timeout*.8&&(r.translation.status="warn",r.translation.tip=v("Settings.Ai.DiagTipLatencyWarn"),r.overallStatus=r.overallStatus==="healthy"?"warning":r.overallStatus,this.addLog("Translation",`\u901F\u7387\u8B66\u62A5\uFF1A\u6A21\u62DF\u8BF7\u6C42\u5DF2\u6D88\u8017 ${y}ms\uFF0C\u903C\u8FD1\u8D85\u65F6\u6781\u503C ${this.timeout}ms\u3002`,"warn"))}}catch(g){r.translation.status="fail",r.translation.latency=Date.now()-m;let y=g.message||"";y.includes("timeout")?(r.translation.tip=`\u7FFB\u8BD1\u6A21\u62DF\u8BF7\u6C42\u8D85\u65F6 (${this.timeout}ms)\u3002\u53EF\u80FD\u662F\u7F51\u7EDC\u94FE\u8DEF\u8FC7\u6162\u6216\u670D\u52A1\u5668\u54CD\u5E94\u8FDF\u949D\u3002`,r.translation.value="\u8D85\u65F6"):(r.translation.tip=`\u8BF7\u6C42\u8FC7\u7A0B\u53D1\u751F\u5F02\u5E38: ${y}`,r.translation.value="\u5F02\u5E38"),r.translation.rawResponse=g instanceof Error&&g.stack||y,r.overallStatus="failed",this.addLog("Translation",`\u5168\u94FE\u8DEF\u6D4B\u8BD5\u76F4\u63A5\u629B\u51FA\u5E95\u5C42\u8BF7\u6C42\u9519\u8BEF: ${g.message}`,"error")}t?.(r),r.translationFix.status="testing",t?.(r),this.addLog("Fix","\u63A2\u6D4B\u5355\u6761\u7FFB\u8BD1\u4FEE\u590D\uFF08Fix API\uFF09\u94FE\u8DEF\u54CD\u5E94\u8D28\u91CF");let h=Date.now(),x={model:this.model,messages:[{role:"system",content:`You are a Translation Repair Specialist. Return ONLY the fixed translation string for ${this.language}. No explanations.`},{role:"user",content:'Source: "Save changes"; Broken: "\u4FDD\u5B58 [\u9519\u8BEF]"; Error: "Bracket mismatch"'}],max_tokens:50,temperature:.3};try{let g=await this.safeRequest(`${i}/chat/completions`,"POST",!0,x);if(r.translationFix.latency=Date.now()-h,g.status===200){let y=(g.json?.choices?.[0]?.message?.content||g.text||"").trim();y&&y.length<100?(r.translationFix.status="pass",r.translationFix.value=`\u2714 \u901A\u8FC7 (${r.translationFix.latency}ms)`,this.addLog("Fix","\u4FEE\u590D\u94FE\u8DEF\u63E1\u624B\u6210\u529F\uFF0C\u6A21\u578B\u80FD\u591F\u4EA7\u51FA\u7EAF\u51C0\u7684\u5355\u6761\u4FEE\u6B63\u5EFA\u8BAE")):(r.translationFix.status="warn",r.translationFix.tip="\u4FEE\u590D\u94FE\u8DEF\u8FD4\u56DE\u5185\u5BB9\u8FC7\u591A\u6216\u683C\u5F0F\u4E0D\u7EAF\u3002\u8FD9\u53EF\u80FD\u4F1A\u5F71\u54CD\u7FFB\u8BD1\u4FEE\u590D\u7684\u51C6\u786E\u5EA6\u3002",this.addLog("Fix","\u4FEE\u590D\u94FE\u8DEF\u54CD\u5E94\u5F02\u5E38\uFF0C\u5EFA\u8BAE\u68C0\u67E5 Prompt \u662F\u5426\u88AB\u6A21\u578B\u8BEF\u89E3","warn"))}else r.translationFix.status="fail",r.translationFix.tip=`\u4FEE\u590D\u8BF7\u6C42\u5931\u8D25 (${g.status})\u3002\u8BF7\u786E\u8BA4\u6A21\u578B\u662F\u5426\u652F\u6301\u77ED\u6587\u672C\u5BF9\u7B54\u3002`,this.addLog("Fix",`\u4FEE\u590D\u94FE\u8DEF\u6D4B\u8BD5\u5931\u8D25\uFF0C\u72B6\u6001\u7801: ${g.status}`,"error")}catch(g){r.translationFix.status="fail",this.addLog("Fix",`\u4FEE\u590D\u94FE\u8DEF\u8BF7\u6C42\u5D29\u6E83: ${g.message}`,"error")}if(t?.(r),r.translation.status==="pass"){r.concurrency.status="testing",t?.(r),this.addLog("Concurrency","\u6B63\u5728\u6A21\u62DF\u5E76\u53D1\u8FDE\u53D1\u4EE5\u63A2\u6D4B\u9891\u7387\u9650\u5236...");let g=3,y=Date.now();try{let b={model:this.model,messages:[{role:"user",content:"hi"}],max_tokens:1},S=Array.from({length:g},()=>this.safeRequest(`${i}/chat/completions`,"POST",!0,b)),w=await Promise.all(S);r.concurrency.latency=Date.now()-y;let P=w.some(I=>I.status===429);if(w.every(I=>I.status===200))r.concurrency.status="pass",r.concurrency.value=`${g} \u5E76\u53D1\u5168\u90E8\u901A\u8FC7`,this.addLog("Concurrency",`${g} \u4E2A\u5E76\u53D1\u8BF7\u6C42\u5168\u90E8\u6210\u529F (${r.concurrency.latency}ms)`);else if(P)r.concurrency.status="warn",r.concurrency.value="\u89E6\u53D1\u9891\u7387\u9650\u5236 (429)",r.concurrency.tip=v("Settings.Ai.DiagTipConcurrency"),r.overallStatus=r.overallStatus==="healthy"?"warning":r.overallStatus,this.addLog("Concurrency",`${g} \u5E76\u53D1\u4E2D\u68C0\u6D4B\u5230 429 \u9891\u7387\u9650\u5236\uFF0C\u5EFA\u8BAE\u964D\u4F4E\u5E76\u53D1\u6570`,"warn");else{let I=w.map(R=>R.status).join(", ");r.concurrency.status="warn",r.concurrency.value=`\u90E8\u5206\u5F02\u5E38 (${I})`,r.concurrency.tip="\u5E76\u53D1\u8BF7\u6C42\u90E8\u5206\u5931\u8D25\uFF0C\u6279\u91CF\u7FFB\u8BD1\u53EF\u80FD\u4E0D\u7A33\u5B9A",r.overallStatus=r.overallStatus==="healthy"?"warning":r.overallStatus,this.addLog("Concurrency",`\u5E76\u53D1\u6D4B\u8BD5\u8FD4\u56DE\u6DF7\u5408\u72B6\u6001: ${I}`,"warn")}}catch(b){r.concurrency.status="warn",r.concurrency.value="\u6D4B\u8BD5\u5F02\u5E38",r.concurrency.tip="\u5E76\u53D1\u6D4B\u8BD5\u8FC7\u7A0B\u4E2D\u51FA\u9519\uFF0C\u65E0\u6CD5\u5224\u5B9A\u9891\u7387\u9650\u5236\u60C5\u51B5",r.concurrency.latency=Date.now()-y,this.addLog("Concurrency",`\u5E76\u53D1\u6D4B\u8BD5\u5F02\u5E38: ${b.message}`,"warn")}t?.(r)}return r}async safeRequest(t,r,a=!1,n){let s={};a&&(s.Authorization=`Bearer ${this.key}`),n&&(s["Content-Type"]="application/json");try{let i=await(0,DB.requestUrl)({url:t,method:r,headers:s,body:n?JSON.stringify(n):void 0,throw:!1});if(i.status>=200&&i.status<300&&i.text){let o=i.text.trim().toLowerCase();if(o.startsWith("<!doctype")||o.startsWith("<html"))return this.addLog("Network",`\u5B89\u5168\u964D\u7EA7\u62E6\u622A\uFF1A\u5411 ${t} \u8BF7\u6C42\u65F6\u6536\u5230 HTML \u8F7D\u8377\u3002\u5224\u65AD\u4E3A\u63A5\u53E3\u5730\u5740\u914D\u7F6E\u9519\u8BEF\uFF08\u53EF\u80FD\u8BEF\u586B\u4E3A\u5B98\u7F51\u4E3B\u9875\uFF09\uFF0C\u5DF2\u81EA\u52A8\u963B\u65AD\u540E\u7EED\u65E0\u6548\u8BF7\u6C42\u3002`,"warn"),{status:406,text:i.text,json:void 0}}return i}catch(i){if(i.message?.includes("timeout"))return{status:408};throw i}}};var Yo=require("obsidian");Rr();var gw=class extends Yo.Modal{constructor(r,a){super(r);this.report=a}onOpen(){this.addStyles(),this.displayReport()}updateReport(r){this.report=r,this.displayReport()}displayReport(){let{contentEl:r}=this;r.empty(),r.addClass("i18n-diag-modal");let a=r.createDiv({cls:"diag-overview"}),n={healthy:{icon:"check-circle-2",label:v("Settings.Ai.DiagStatusHealthy"),cls:"diag-healthy"},warning:{icon:"alert-triangle",label:v("Settings.Ai.DiagStatusWarning"),cls:"diag-warning"},degraded:{icon:"alert-triangle",label:v("Settings.Ai.DiagStatusWarning"),cls:"diag-warning"},failed:{icon:"x-circle",label:v("Settings.Ai.DiagStatusFailed"),cls:"diag-failed"}},s=[this.report.endpoint,this.report.auth,this.report.model,this.report.systemRole,this.report.jsonMode,this.report.jsonSchema,this.report.translation,this.report.translationFix,this.report.concurrency].some(p=>p&&p.status==="testing"),i=s?{icon:"loader-2",label:"\u8BCA\u65AD\u6B63\u5728\u8FDB\u884C\u4E2D...",cls:"diag-warning testing-anim"}:n[this.report.overallStatus]||n.failed,o=a.createDiv({cls:`diag-overview-icon ${i.cls}`});(0,Yo.setIcon)(o,i.icon);let l=a.createDiv({cls:"diag-overview-info"});l.createDiv({text:v("Settings.Ai.DiagModalTitle"),cls:"diag-overview-title"}),l.createDiv({text:i.label,cls:`diag-overview-badge ${i.cls}`});let c=[{label:v("Settings.Ai.DiagItemEndpoint"),item:this.report.endpoint},{label:v("Settings.Ai.DiagItemAuth"),item:this.report.auth},{label:v("Settings.Ai.DiagItemModel"),item:this.report.model},{label:v("Settings.Ai.DiagItemSystemRole"),item:this.report.systemRole},{label:v("Settings.Ai.DiagItemJsonMode"),item:this.report.jsonMode},{label:v("Settings.Ai.DiagItemJsonSchema"),item:this.report.jsonSchema},{label:v("Settings.Ai.DiagItemTranslation"),item:this.report.translation}];this.report.translationFix&&c.push({label:"\u8BD1\u6587\u4FEE\u590D\u529F\u80FD (Fix API)",item:this.report.translationFix}),this.report.concurrency&&c.push({label:v("Settings.Ai.DiagItemConcurrency"),item:this.report.concurrency});let u=r.createDiv({cls:"diag-list"});for(let{label:p,item:m}of c)this.renderRow(u,p,m);if(!s){let p=this.getRecommendations();if(p.length>0){let m=r.createDiv({cls:"diag-recs"}),h=m.createDiv({cls:"diag-recs-header"}),x=h.createDiv({cls:"diag-recs-icon"});(0,Yo.setIcon)(x,"lightbulb"),h.createSpan({text:v("Settings.Ai.DiagRecommendation")});for(let g of p)m.createDiv({text:g,cls:"diag-rec-item"})}}if(this.report.logs&&this.report.logs.length>0){let p=r.createDiv({cls:"diag-logs-section"}),m=p.createDiv({cls:"diag-logs-header"});(0,Yo.setIcon)(m.createSpan({cls:"diag-logs-icon"}),"terminal"),m.createSpan({text:"\u8BCA\u65AD\u63A7\u5236\u53F0\u65E5\u5FD7 (\u70B9\u51FB\u5C55\u5F00/\u6298\u53E0)",cls:"diag-logs-title"});let h=p.createDiv({cls:"diag-logs-content"});!this.report.logs.some(g=>g.level==="error")&&!s&&(h.style.display="none"),m.addEventListener("click",()=>{h.style.display=h.style.display==="none"?"block":"none"});for(let g of this.report.logs){let y=h.createDiv({cls:`diag-log-wrapper diag-log-${g.level}`}),b=y.createDiv({cls:"diag-log-line"});if(b.createSpan({text:`[${g.stage}]`,cls:"diag-log-stage"}),b.createSpan({text:g.message,cls:"diag-log-msg"}),g.details){let S=y.createDiv({cls:"diag-log-details",text:g.details});S.style.display="none",b.style.cursor="pointer",b.createSpan({text:" (\u70B9\u51FB\u67E5\u770B\u8BE6\u60C5)",cls:"diag-log-expand-tip"}),b.addEventListener("click",w=>{w.stopPropagation(),S.style.display=S.style.display==="none"?"block":"none"})}}setTimeout(()=>{h.scrollTop=h.scrollHeight},50)}let f=r.createDiv({cls:"diag-footer"}).createEl("button",{text:s?"\u6D4B\u8BD5\u8FDB\u884C\u4E2D...":"\u5173\u95ED",cls:s?"":"mod-cta"});f.disabled=s,f.addEventListener("click",()=>this.close())}renderRow(r,a,n){let s=r.createDiv({cls:"diag-row-item-container"}),i=s.createDiv({cls:"diag-row"}),o=n.status==="pass"?"diag-dot-pass":n.status==="fail"?"diag-dot-fail":n.status==="warn"?"diag-dot-warn":n.status==="testing"?"diag-dot-testing":"diag-dot-na";i.createDiv({cls:`diag-dot ${o}`}),i.createDiv({text:a,cls:"diag-row-label"});let l=i.createDiv({cls:"diag-row-right"});n.latency!==void 0&&n.status!=="testing"&&l.createSpan({text:`${n.latency}ms`,cls:"diag-latency-tag"});let c="";if(n.status==="pass"?c=v("Settings.Ai.DiagStatusPass"):n.status==="fail"?c=n.value||v("Settings.Ai.DiagStatusFail"):n.status==="warn"?c=v("Settings.Ai.DiagStatusWarn"):n.status==="testing"?c="\u6B63\u5728\u68C0\u6D4B...":c="\u7B49\u5F85\u4E2D",n.usage&&n.status==="pass"&&l.createSpan({text:`Prompt: ${n.usage.prompt} / Completion: ${n.usage.completion}`,cls:"diag-usage-tag"}),l.createSpan({text:c,cls:`diag-status-label diag-sl-${n.status}`}),n.tip||n.rawResponse){let u=s.createDiv({cls:"diag-item-details-box"});if(n.tip){let f=u.createDiv({cls:"diag-row-tip-v3"}),p=f.createDiv({cls:"diag-tip-v3-header"});(0,Yo.setIcon)(p.createSpan({cls:"diag-tip-v3-icon"}),n.status==="fail"?"alert-circle":"info"),p.createSpan({text:n.status==="fail"?"\u4E13\u5BB6\u8BCA\u65AD\u5EFA\u8BAE":"\u914D\u7F6E\u4F18\u5316\u65B9\u6848",cls:"diag-tip-v3-title"});let m=f.createDiv({cls:"diag-tip-v3-body"});n.tip.split(`
|
|
`).forEach(h=>m.createDiv({text:h}))}if(n.rawResponse){let f=u.createDiv({cls:"diag-raw-v3-wrapper"}),p=f.createDiv({cls:"diag-raw-v3-header"});(0,Yo.setIcon)(p.createSpan({cls:"diag-raw-v3-icon"}),"terminal"),p.createSpan({text:"\u539F\u59CB\u6570\u636E\u62A5\u6587 (Raw)",cls:"diag-raw-v3-title"});let m=f.createEl("pre",{text:n.rawResponse,cls:"diag-raw-v3-content"}),h=p.createDiv({cls:"diag-raw-v3-copy",title:"\u590D\u5236\u62A5\u6587"});(0,Yo.setIcon)(h,"copy"),h.addEventListener("click",x=>{x.stopPropagation(),navigator.clipboard.writeText(n.rawResponse||""),(0,Yo.setIcon)(h,"check"),setTimeout(()=>(0,Yo.setIcon)(h,"copy"),2e3)})}let d=n.status==="fail";if(d&&u.classList.add("is-expanded"),i.style.cursor="pointer",!d){let f=i.createSpan({cls:"diag-row-expand-icon-v3"});(0,Yo.setIcon)(f,"chevron-down")}i.addEventListener("click",()=>{u.classList.toggle("is-expanded"),i.classList.toggle("is-active")})}}getRecommendations(){let r=[],a=this.report;return a.endpoint.status==="fail"&&(a.endpoint.value.includes("\u54CD\u5E94\u683C\u5F0F\u51B2\u7A81")?r.push("\u63A5\u53E3\u5730\u5740\u5F02\u5E38\uFF1A\u68C0\u6D4B\u5230\u8FD4\u56DE\u4E86 HTML \u7F51\u9875\u3002\u5EFA\u8BAE\u68C0\u67E5\u662F\u5426\u8BEF\u586B\u4E86\u670D\u52A1\u5546\u5B98\u7F51\uFF08\u5982 https://openai.com\uFF09\uFF0CAPI \u5730\u5740\u901A\u5E38\u9700\u8981\u5305\u542B /v1 \u8DEF\u5F84\u3002"):a.endpoint.value.includes("\u8FDE\u63A5\u88AB\u62D2\u7EDD")||a.endpoint.value.includes("\u8FDE\u63A5\u8D85\u65F6")?r.push("\u7F51\u7EDC\u94FE\u8DEF\u53D7\u963B\uFF1A\u65E0\u6CD5\u5EFA\u7ACB\u8FDE\u63A5\u3002\u8BF7\u68C0\u67E5\uFF1A(1) \u82E5\u4F7F\u7528\u672C\u5730\u6A21\u578B\u8BF7\u786E\u8BA4\u670D\u52A1\u5DF2\u542F\u52A8\uFF1B(2) \u82E5\u4F7F\u7528\u8FDC\u7A0B API \u8BF7\u68C0\u67E5\u63D2\u4EF6\u5185\u7684\u201C\u7F51\u7EDC\u4EE3\u7406\u201D\u8BBE\u7F6E\u662F\u5426\u4E0E\u7CFB\u7EDF VPN \u51B2\u7A81\u3002"):a.endpoint.value.includes("DNS")&&r.push("\u89E3\u6790\u5F02\u5E38\uFF1A\u57DF\u540D\u65E0\u6CD5\u8BC6\u522B\u3002\u8BF7\u786E\u8BA4\u5730\u5740\u62FC\u5199\u662F\u5426\u6B63\u786E\uFF0C\u6216\u5C1D\u8BD5\u66F4\u6362\u4E0D\u4F9D\u8D56\u5916\u90E8 DNS \u7684\u4E2D\u8F6C\u5730\u5740\u3002")),a.auth.status==="fail"&&(a.auth.value.includes("401")?r.push("\u5BC6\u94A5\u6821\u9A8C\u5931\u8D25\uFF1A\u8BF7\u786E\u4FDD API Key \u5DF2\u6B63\u786E\u590D\u5236\uFF08\u5EFA\u8BAE\u91CD\u65B0\u590D\u5236\uFF0C\u907F\u514D\u5E26\u5165\u9996\u5C3E\u7A7A\u683C\uFF09\uFF0C\u5E76\u786E\u8BA4\u8BE5 Key \u5728\u670D\u52A1\u5546\u540E\u53F0\u5904\u4E8E Active \u72B6\u6001\u3002"):a.auth.value.includes("403")&&r.push("\u6743\u9650\u906D\u62D2\uFF1A\u5BC6\u94A5\u6709\u6548\u4F46\u65E0\u6743\u8BBF\u95EE\u3002\u8BF7\u68C0\u67E5\uFF1A(1) \u8D26\u53F7\u662F\u5426\u5DF2\u7ED1\u5B9A\u652F\u4ED8\u5361\u6216\u989D\u5EA6\u662F\u5426\u5145\u8DB3\uFF1B(2) \u63A5\u53E3\u5546\u662F\u5426\u6709 IP \u5730\u533A\u9650\u5236\u3002")),a.model.status==="fail"&&r.push(`\u6A21\u578B\u914D\u7F6E\u9519\u8BEF\uFF1A\u5F53\u524D\u8D26\u53F7\u65E0\u6743\u8BBF\u95EE "${a.model.value}" \u6216\u6A21\u578B\u540D\u62FC\u5199\u9519\u8BEF\u3002\u8BF7\u5728\u8BBE\u7F6E\u4E2D\u901A\u8FC7\u201C\u5237\u65B0\u6A21\u578B\u5217\u8868\u201D\u540E\u91CD\u65B0\u9009\u62E9\u3002`),a.translation.status==="fail"&&(a.translation.value==="\u683C\u5F0F\u89E3\u6790\u5931\u8D25"?r.push("\u54CD\u5E94\u683C\u5F0F\u51B2\u7A81\uFF1A\u6A21\u578B\u8F93\u51FA\u4E86\u975E JSON \u6587\u5B57\u3002\u65B9\u6848\uFF1A(1) \u5728\u8BBE\u7F6E\u4E2D\u5C06\u201C\u54CD\u5E94\u683C\u5F0F\u201D\u5207\u6362\u4E3A Text \u6A21\u5F0F\uFF1B(2) \u7CBE\u7B80 System Prompt \u907F\u514D\u6A21\u578B\u6DF7\u6DC6\u3002"):a.translation.value.includes("400")&&r.push("\u9AD8\u7EA7\u7279\u6027\u4E0D\u652F\u6301\uFF1A\u5F53\u524D\u6A21\u578B\u53EF\u80FD\u6682\u4E0D\u652F\u6301 JSON Schema \u7B49\u9AD8\u7EA7\u683C\u5F0F\u3002\u5EFA\u8BAE\u5728\u63D2\u4EF6\u8BBE\u7F6E\u4E2D\u5C06\u201C\u54CD\u5E94\u6A21\u5F0F\u201D\u964D\u7EA7\u4E3A Text\u3002")),(a.overallStatus==="warning"||a.overallStatus==="healthy")&&(a.jsonMode.status==="warn"&&r.push("\u5C40\u90E8\u529F\u80FD\u544A\u8B66\uFF1A\u6A21\u578B\u4E0D\u652F\u6301\u539F\u751F JSON_OBJECT \u6A21\u5F0F\u3002\u867D\u7136\u76EE\u524D\u53EF\u7528\uFF0C\u4F46\u540E\u7EED\u7FFB\u8BD1\u53EF\u80FD\u4F1A\u6709\u6982\u7387\u51FA\u73B0\u89E3\u6790\u9519\u8BEF\u3002"),a.concurrency?.status==="warn"&&r.push("\u9891\u7387\u9650\u5236\u9884\u8B66\uFF1A\u9AD8\u538B\u529B\u4E0B\u53EF\u80FD\u89E6\u53D1 429 \u9519\u8BEF\u3002\u5EFA\u8BAE\u5728\u201C\u57FA\u7840\u914D\u7F6E\u201D\u4E2D\u901A\u8FC7\u964D\u4F4E\u201C\u8BF7\u6C42\u5E76\u53D1\u6570\u201D\u6765\u6362\u53D6\u7A33\u5B9A\u6027\u3002")),a.translationFix?.status==="fail"?r.push("\u4FEE\u590D\u94FE\u8DEF\u5F02\u5E38\uFF1A\u5355\u6761\u7FFB\u8BD1\u4FEE\u590D\u529F\u80FD\u4E0D\u53EF\u7528\u3002\u8BF7\u786E\u8BA4\u6A21\u578B\u662F\u5426\u652F\u6301\u7EAF\u6587\u672C\u5BF9\u8BDD\uFF0C\u6216\u5C1D\u8BD5\u5207\u6362\u6A21\u578B\u3002"):a.translationFix?.status==="warn"&&r.push("\u4FEE\u590D\u8D28\u91CF\u9884\u8B66\uFF1A\u4FEE\u590D\u529F\u80FD\u8FD4\u56DE\u4E86\u591A\u4F59\u4FE1\u606F\u3002\u867D\u7136\u4E0D\u5F71\u54CD\u4F7F\u7528\uFF0C\u4F46\u53EF\u80FD\u4F1A\u589E\u52A0 Token \u6D88\u8017\u6216\u964D\u4F4E\u4FEE\u590D\u51C6\u786E\u5EA6\u3002"),r.length>0?r:["\u5404\u94FE\u8DEF\u6307\u6807\u5747\u8868\u73B0\u4F18\u5F02\u3002\u5982\u679C\u7FFB\u8BD1\u4F53\u611F\u4ECD\u6709\u5F02\u5E38\uFF0C\u5EFA\u8BAE\u5C1D\u8BD5\u5207\u6362\u5230\u66F4\u9AD8\u89C4\u683C\u7684\u6A21\u578B\u4EE5\u83B7\u5F97\u66F4\u4F73\u6548\u679C\u3002"]}addStyles(){let r=document.getElementById("i18n-diag-styles");r&&r.remove();let a=document.createElement("style");a.id="i18n-diag-styles",a.textContent=`
|
|
.i18n-diag-modal { padding: 0; background: var(--background-primary); font-family: var(--font-interface); }
|
|
|
|
/* \u2500\u2500 \u603B\u89C8\u5361\u7247 \u2500\u2500 */
|
|
.i18n-diag-modal .diag-overview {
|
|
display: flex; align-items: center; gap: 20px;
|
|
padding: 24px; margin-bottom: 20px;
|
|
border-radius: 12px;
|
|
background: linear-gradient(135deg, var(--background-secondary) 0%, var(--background-secondary-alt) 100%);
|
|
border: 1px solid var(--background-modifier-border);
|
|
box-shadow: 0 4px 12px rgba(0,0,0,0.05);
|
|
}
|
|
.i18n-diag-modal .diag-overview-icon {
|
|
width: 56px; height: 56px; border-radius: 16px;
|
|
display: flex; align-items: center; justify-content: center;
|
|
flex-shrink: 0; transform: rotate(-5deg);
|
|
box-shadow: 0 8px 16px rgba(0,0,0,0.1);
|
|
}
|
|
.i18n-diag-modal .diag-overview-icon.diag-healthy { background: linear-gradient(135deg, #2dc937, #22a92b); color: white; }
|
|
.i18n-diag-modal .diag-overview-icon.diag-warning { background: linear-gradient(135deg, #dbad00, #c49a00); color: white; }
|
|
.i18n-diag-modal .diag-overview-icon.diag-failed { background: linear-gradient(135deg, #cc3232, #b02a2a); color: white; }
|
|
.i18n-diag-modal .diag-overview-icon svg { width: 28px; height: 28px; }
|
|
|
|
.i18n-diag-modal .diag-overview-title {
|
|
font-size: 1.25em; font-weight: 700;
|
|
color: var(--text-normal); margin-bottom: 6px;
|
|
letter-spacing: -0.01em;
|
|
}
|
|
.i18n-diag-modal .diag-overview-badge {
|
|
display: inline-flex; align-items: center;
|
|
font-size: 0.75em; font-weight: 800; text-transform: uppercase;
|
|
padding: 3px 12px; border-radius: 20px; letter-spacing: 0.05em;
|
|
}
|
|
.i18n-diag-modal .diag-overview-badge.diag-healthy { background: rgba(45,201,55,0.15); color: #2dc937; }
|
|
.i18n-diag-modal .diag-overview-badge.diag-warning { background: rgba(231,180,0,0.15); color: #dbad00; }
|
|
.i18n-diag-modal .diag-overview-badge.diag-failed { background: rgba(204,50,50,0.15); color: #cc3232; }
|
|
|
|
/* \u2500\u2500 \u68C0\u6D4B\u9879\u5217\u8868 \u2500\u2500 */
|
|
.i18n-diag-modal .diag-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
|
|
.i18n-diag-modal .diag-row-item-container {
|
|
background: var(--background-secondary);
|
|
border-radius: 10px;
|
|
overflow: hidden;
|
|
border: 1px solid var(--background-modifier-border);
|
|
transition: all 0.2s ease;
|
|
}
|
|
.i18n-diag-modal .diag-row-item-container:hover { border-color: var(--text-accent); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,0.08); }
|
|
|
|
.i18n-diag-modal .diag-row {
|
|
display: flex; align-items: center; gap: 14px;
|
|
padding: 12px 18px;
|
|
}
|
|
.i18n-diag-modal .diag-row.is-active { background: var(--background-secondary-alt); }
|
|
|
|
.i18n-diag-modal .diag-dot {
|
|
width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0;
|
|
}
|
|
.i18n-diag-modal .diag-dot-pass { background: #2dc937; box-shadow: 0 0 8px rgba(45,201,55,0.5); }
|
|
.i18n-diag-modal .diag-dot-fail { background: #cc3232; box-shadow: 0 0 8px rgba(204,50,50,0.5); }
|
|
.i18n-diag-modal .diag-dot-warn { background: #dbad00; box-shadow: 0 0 8px rgba(231,180,0,0.5); }
|
|
|
|
.i18n-diag-modal .diag-row-label {
|
|
flex: 1; font-size: 0.95em; font-weight: 500;
|
|
color: var(--text-normal);
|
|
}
|
|
.i18n-diag-modal .diag-row-right { display: flex; align-items: center; gap: 10px; }
|
|
|
|
.i18n-diag-modal .diag-latency-tag, .diag-usage-tag {
|
|
font-size: 0.72em; padding: 2px 8px; border-radius: 4px;
|
|
background: var(--background-modifier-border); color: var(--text-muted);
|
|
font-family: var(--font-monospace); opacity: 0.9;
|
|
}
|
|
.diag-usage-tag { background: rgba(var(--interactive-accent-rgb), 0.1); color: var(--interactive-accent); }
|
|
.i18n-diag-modal .diag-status-label {
|
|
font-size: 0.72em; font-weight: 800; font-family: var(--font-monospace);
|
|
padding: 3px 10px; border-radius: 6px; border: 1px solid transparent;
|
|
}
|
|
.i18n-diag-modal .diag-sl-pass { background: rgba(45,201,55,0.08); color: #2dc937; border-color: rgba(45,201,55,0.2); }
|
|
.i18n-diag-modal .diag-sl-fail { background: rgba(204,50,50,0.08); color: #cc3232; border-color: rgba(204,50,50,0.2); }
|
|
.i18n-diag-modal .diag-sl-warn { background: rgba(231,180,0,0.08); color: #dbad00; border-color: rgba(231,180,0,0.2); }
|
|
.i18n-diag-modal .diag-sl-testing { background: rgba(0,122,255,0.08); color: #007aff; border-color: rgba(0,122,255,0.2); }
|
|
.i18n-diag-modal .diag-sl-na { background: var(--background-secondary-alt); color: var(--text-faint); }
|
|
|
|
.i18n-diag-modal .diag-dot-testing {
|
|
background: #007aff;
|
|
box-shadow: 0 0 8px rgba(0,122,255,0.5);
|
|
animation: diag-pulse 1.5s infinite;
|
|
}
|
|
.i18n-diag-modal .diag-dot-na { background: var(--text-faint); opacity: 0.3; }
|
|
|
|
@keyframes diag-pulse {
|
|
0% { opacity: 0.4; transform: scale(0.8); }
|
|
50% { opacity: 1; transform: scale(1.1); }
|
|
100% { opacity: 0.4; transform: scale(0.8); }
|
|
}
|
|
|
|
@keyframes diag-spin {
|
|
from { transform: rotate(0deg); }
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
.i18n-diag-modal .testing-anim svg { animation: diag-spin 2s linear infinite; }
|
|
|
|
/* \u5C55\u5F00\u52A8\u753B\u5BB9\u5668 */
|
|
.i18n-diag-modal .diag-item-details-box {
|
|
max-height: 0; opacity: 0; overflow: hidden;
|
|
transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
|
|
background: var(--background-primary);
|
|
border-top: 0px solid var(--background-modifier-border);
|
|
}
|
|
.i18n-diag-modal .diag-item-details-box.is-expanded {
|
|
max-height: 2000px; opacity: 1; padding: 16px;
|
|
border-top-width: 1px;
|
|
}
|
|
|
|
/* \u2500\u2500 \u65B0\u7248\u63D0\u793A\u5361\u7247 (Tip v3) \u2500\u2500 */
|
|
.i18n-diag-modal .diag-row-tip-v3 {
|
|
border-radius: 8px; margin-bottom: 12px;
|
|
background: var(--background-secondary-alt);
|
|
border: 1px solid var(--background-modifier-border);
|
|
overflow: hidden;
|
|
}
|
|
.i18n-diag-modal .diag-tip-v3-header {
|
|
display: flex; align-items: center; gap: 8px;
|
|
padding: 8px 12px; background: rgba(0,0,0,0.03);
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
}
|
|
.i18n-diag-modal .diag-tip-v3-icon { color: var(--text-accent); display: flex; }
|
|
.i18n-diag-modal .diag-tip-v3-icon svg { width: 14px; height: 14px; }
|
|
.i18n-diag-modal .diag-tip-v3-title { font-size: 0.75em; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
|
|
.i18n-diag-modal .diag-tip-v3-body {
|
|
padding: 12px; font-size: 0.9em; line-height: 1.6;
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
/* \u2500\u2500 \u65B0\u7248\u62A5\u6587\u5BB9\u5668 (Raw v3) \u2500\u2500 */
|
|
.i18n-diag-modal .diag-raw-v3-wrapper {
|
|
border-radius: 8px; background: #121212;
|
|
border: 1px solid #333; overflow: hidden;
|
|
}
|
|
.i18n-diag-modal .diag-raw-v3-header {
|
|
display: flex; align-items: center; gap: 8px;
|
|
padding: 6px 12px; background: #1e1e1e;
|
|
border-bottom: 1px solid #333;
|
|
}
|
|
.i18n-diag-modal .diag-raw-v3-icon { color: #569cd6; display: flex; }
|
|
.i18n-diag-modal .diag-raw-v3-icon svg { width: 14px; height: 14px; }
|
|
.i18n-diag-modal .diag-raw-v3-title { font-size: 0.7em; font-weight: 700; color: #888; letter-spacing: 0.5px; flex: 1; }
|
|
.i18n-diag-modal .diag-raw-v3-copy {
|
|
cursor: pointer; padding: 4px; border-radius: 4px;
|
|
color: #666; transition: all 0.2s;
|
|
}
|
|
.i18n-diag-modal .diag-raw-v3-copy:hover { color: #fff; background: #333; }
|
|
.i18n-diag-modal .diag-raw-v3-copy svg { width: 14px; height: 14px; }
|
|
|
|
.i18n-diag-modal .diag-raw-v3-content {
|
|
margin: 0; padding: 12px;
|
|
color: #d4d4d4; font-family: var(--font-monospace);
|
|
font-size: 0.8em; line-height: 1.5;
|
|
max-height: 300px; overflow-y: auto;
|
|
scrollbar-width: thin; scrollbar-color: #333 transparent;
|
|
}
|
|
.i18n-diag-modal .diag-raw-v3-content::-webkit-scrollbar { width: 6px; }
|
|
.i18n-diag-modal .diag-raw-v3-content::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; }
|
|
|
|
.i18n-diag-modal .diag-row-expand-icon-v3 {
|
|
display: flex; color: var(--text-faint);
|
|
transition: transform 0.3s ease;
|
|
}
|
|
.i18n-diag-modal .diag-row.is-active .diag-row-expand-icon-v3 { transform: rotate(180deg); color: var(--text-accent); }
|
|
.i18n-diag-modal .diag-row-expand-icon-v3 svg { width: 16px; height: 16px; }
|
|
.i18n-diag-modal .diag-row-item-container { margin-bottom: 8px; }
|
|
|
|
/* \u2500\u2500 \u5EFA\u8BAE\u533A \u2500\u2500 */
|
|
.i18n-diag-modal .diag-recs {
|
|
border-radius: 8px; padding: 14px;
|
|
background: rgba(231,180,0,0.06);
|
|
border: 1px solid rgba(231,180,0,0.15);
|
|
margin-bottom: 16px;
|
|
}
|
|
.i18n-diag-modal .diag-recs-header {
|
|
display: flex; align-items: center; gap: 8px;
|
|
font-weight: 600; font-size: 0.9em;
|
|
color: #dbad00; margin-bottom: 10px;
|
|
}
|
|
.i18n-diag-modal .diag-recs-icon svg { width: 16px; height: 16px; }
|
|
.i18n-diag-modal .diag-rec-item {
|
|
font-size: 0.85em; color: var(--text-normal);
|
|
padding: 4px 0 4px 24px; position: relative; line-height: 1.5;
|
|
}
|
|
.i18n-diag-modal .diag-rec-item::before {
|
|
content: '\u2192'; position: absolute; left: 6px;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
/* \u2500\u2500 \u9875\u811A \u2500\u2500 */
|
|
.diag-footer {
|
|
display: flex; justify-content: flex-end;
|
|
padding-top: 8px;
|
|
border-top: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
/* \u2500\u2500 \u8C03\u8BD5\u65E5\u5FD7 \u2500\u2500 */
|
|
/* \u2500\u2500 \u8C03\u8BD5\u65E5\u5FD7 \u2500\u2500 */
|
|
.diag-logs-section {
|
|
margin-bottom: 16px; border-radius: 8px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
overflow: hidden;
|
|
}
|
|
.diag-logs-header {
|
|
display: flex; align-items: center; gap: 8px;
|
|
padding: 10px 14px; background: var(--background-secondary-alt);
|
|
cursor: pointer; font-size: 0.85em; font-weight: 600;
|
|
color: var(--text-muted); transition: all 0.15s;
|
|
}
|
|
.diag-logs-header:hover { background: var(--background-modifier-hover); color: var(--text-normal); }
|
|
.diag-logs-icon svg { width: 14px; height: 14px; }
|
|
.diag-logs-content {
|
|
background: var(--background-primary-alt); padding: 12px;
|
|
border-top: 1px solid var(--background-modifier-border);
|
|
max-height: 200px; overflow-y: auto;
|
|
font-family: var(--font-monospace); font-size: 0.75em;
|
|
}
|
|
.diag-log-line { display: flex; align-items: flex-start; line-height: 1.4; word-break: break-all; }
|
|
.diag-log-info { color: var(--text-muted); }
|
|
.diag-log-warn { color: #dbad00; }
|
|
.diag-log-error { color: #cc3232; }
|
|
.diag-log-stage { color: var(--text-accent); margin-right: 8px; font-weight: 600; flex-shrink: 0; }
|
|
.diag-log-msg { white-space: pre-wrap; font-family: inherit; flex: 1; }
|
|
.diag-log-expand-tip { font-size: 0.85em; color: var(--text-faint); margin-left: 8px; font-style: italic; }
|
|
.diag-log-wrapper { margin-bottom: 8px; }
|
|
.diag-log-details {
|
|
margin: 8px 0 8px 12px; padding: 10px;
|
|
background: var(--background-secondary-alt);
|
|
border-left: 2px solid var(--text-accent);
|
|
border-radius: 4px;
|
|
font-family: var(--font-monospace);
|
|
font-size: 0.95em;
|
|
white-space: pre-wrap;
|
|
word-break: break-all;
|
|
color: var(--text-muted);
|
|
max-height: 300px;
|
|
overflow-y: auto;
|
|
}
|
|
`,document.head.appendChild(a)}onClose(){this.contentEl.empty()}};var IE=require("obsidian");Vt();var $K={"gpt-4o":{input:5e-6,output:15e-6},"gpt-4o-mini":{input:15e-8,output:6e-7},"gpt-4-turbo":{input:1e-5,output:3e-5},"gemini-2.5-flash":{input:0,output:0},"gemini-2.5-pro":{input:125e-8,output:1e-5},"gemini-2.0-flash":{input:0,output:0},"gemini-2.0-flash-lite":{input:0,output:0},ollama:{input:0,output:0},default:{input:5e-6,output:15e-6}},_ze=7.3;function GK(e){if(!e)return 0;let t=0,r=e.match(/[\u4e00-\u9fa5]/g)||[],a=e.length-r.length;return t+=r.length*1.5,t+=a*.25,Math.ceil(t)}function KK(e,t){let r=GK(t);for(let a of e){let n=JSON.stringify(a);r+=GK(n)+10}return r}function WK(e,t,r){if(r!==void 0&&r>0)return e*(r/1e6);let a=$K[t]||$K.default;return e*a.input*_ze}var Yf=class{getActiveProfile(){let t=He.getState().i18n.settings,r=t.llmApi,a=Dt[r];if(!a)return null;let n=`llm${a.labelKey}Profiles`,s=`llm${a.labelKey}ActiveProfileId`,i=t[n],o=t[s];return i?.find(l=>l.id===o)||i?.[0]}async regexTranslate(t,r,a){return this.executeParallelBatches(t,(n,s)=>this.callRegexTranslationAPI(n,s),r,a)}async astTranslate(t,r,a){return this.executeParallelBatches(t,(n,s)=>this.callAstTranslationAPI(n,s),r,a)}async themeTranslate(t,r,a){return this.executeParallelBatches(t,(n,s)=>this.callThemeTranslationAPI(n,s),r,a)}estimateTokens(t,r){let a=He.getState().i18n.settings,n="",s=a.llmLanguage,i=a.llmStyle;if(r==="regex"){let f=a.llmRegexPrompt||Jb;n=YI(f,s,i)}else if(r==="ast"){let f=a.llmAstPrompt||Qb;n=JI(f,s,i)}else if(r==="theme"){let f=a.llmThemePrompt||Zb;n=QI(f,s,i)}let o=KK(t,n),l=this.getActiveProfile(),c=l?.useCustomPrice??a.llmUseCustomPrice,u=l?.priceInput??a.llmPriceInputCustom,d=WK(o,this.getModelName(),c?u:void 0);return{tokens:o,cost:d}}getModelName(){let t=this.getActiveProfile();if(t?.model)return t.model;let r=He.getState().i18n.settings;return Dt[r.llmApi]?.defaultModel||"gpt-4o-mini"}getConcurrencyLimit(){return He.getState().i18n.settings.llmConcurrencyLimit||3}getTimeout(){return He.getState().i18n.settings.llmTimeout||6e4}validateInput(t){if(!Array.isArray(t)||t.length===0)throw new Error("\u7FFB\u8BD1\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A\uFF0C\u4E14\u5FC5\u987B\u4E3A\u6570\u7EC4\u683C\u5F0F")}splitIntoBatches(t){if(t.length===0)return[];let r=Number.isFinite(He.getState().i18n.settings.llmBatchSize)?Math.max(1,Math.floor(He.getState().i18n.settings.llmBatchSize)):1,a=[];for(let n=0;n<t.length;n+=r)a.push(t.slice(n,n+r));return a}async executeParallelBatches(t,r,a,n){this.validateInput(t);let s=this.splitIntoBatches(t),i=s.length,o=new Array(i),l=this.getConcurrencyLimit(),c=0,u=0,d=async()=>{for(;c<i;){if(n?.aborted)return;let p=c++,m=s[p];try{let h=await r(m,n);u++,await a(h,u,i),o[p]=h}catch(h){h.message!=="\u7FFB\u8BD1\u4EFB\u52A1\u5DF2\u53D6\u6D88"&&He.getState().i18n.notice.error(`AI\u7FFB\u8BD1\u6279\u6B21 ${p+1} \u5931\u8D25: ${h.message}`),u++,o[p]=m.map(x=>({...x,target:x.source||""}))}}},f=Array.from({length:Math.min(l,i)},()=>d());if(await Promise.all(f),n?.aborted)throw new Error("\u7FFB\u8BD1\u4EFB\u52A1\u5DF2\u53D6\u6D88");return[].concat(...o)}getRegexSystemPrompt(){let t=He.getState().i18n.settings,r=t.llmRegexPrompt||Jb;return YI(r,t.llmLanguage,t.llmStyle)}getAstSystemPrompt(){let t=He.getState().i18n.settings,r=t.llmAstPrompt||Qb;return JI(r,t.llmLanguage,t.llmStyle)}getThemeSystemPrompt(){let t=He.getState().i18n.settings,r=t.llmThemePrompt||Zb;return QI(r,t.llmLanguage,t.llmStyle)}parseResponseContent(t){return mw(t)}mapResultsBack(t,r){return t.map(a=>{let n=r.find(i=>i.i===a.id),s=n?n.t:void 0;return(!s||s.trim()===""||s.trim()==="\u7A7A")&&(s=a.target||a.source),{...a,target:s}})}async callFixAPI(t,r,a,n,s){throw new Error("fixTranslation is not implemented for this provider")}getFixSystemPrompt(){let t=He.getState().i18n.settings;return MB(t.llmLanguage)}async fixTranslation(t,r,a){let n=this.getFixSystemPrompt();return this.callFixAPI(t,r,a,n)}};var wS="http://localhost:11434",Jf=class extends Yf{constructor(){super()}getModelName(){return this.getActiveProfile()?.model||"qwen2.5"}getBaseUrl(){return(this.getActiveProfile()?.url||wS).replace(/\/+$/,"")}async callOllama(t,r,a,n=2){let s=this.getBaseUrl(),i=this.getModelName(),o=`${s}/v1/chat/completions`,l={model:i,messages:[{role:"system",content:r},{role:"user",content:JSON.stringify(t)}],temperature:.3,stream:!1},c=0,u=null;for(;c<=n;){let d=this.getTimeout(),f={id:null};try{if(a?.aborted)throw new Error("\u7FFB\u8BD1\u4EFB\u52A1\u5DF2\u53D6\u6D88");let p=Math.max(d,12e4),m=(0,IE.requestUrl)({url:o,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l),throw:!1}),h=new Promise((b,S)=>{f.id=setTimeout(()=>S(new Error(`\u8BF7\u6C42\u8D85\u65F6 (${p}ms)`)),p)}),x=await Promise.race([m,h]);if(x.status!==200){let b=x.json?.error?.message||`HTTP ${x.status}`;throw new Error(`Ollama API \u9519\u8BEF: ${b}`)}let y=x.json?.choices?.[0]?.message?.content;if(!y)throw new Error("Ollama \u8FD4\u56DE\u5185\u5BB9\u4E3A\u7A7A");return this.parseResponseContent(y)}catch(p){if(a?.aborted||p.message==="\u7FFB\u8BD1\u4EFB\u52A1\u5DF2\u53D6\u6D88")throw new Error("\u7FFB\u8BD1\u4EFB\u52A1\u5DF2\u53D6\u6D88");u=p,c++,c<=n&&await new Promise(h=>setTimeout(h,1e3*c))}finally{f.id&&clearTimeout(f.id)}}throw new Error(u?.message||"\u672A\u77E5\u9519\u8BEF")}async callRegexTranslationAPI(t,r){let a=this.getRegexSystemPrompt(),n=t.map(i=>({i:i.id,s:i.source})),s=await this.callOllama(n,a,r);return this.mapResultsBack(t,s)}async callAstTranslationAPI(t,r){let a=this.getAstSystemPrompt(),n=t.map(i=>({i:i.id,s:i.source,y:i.type,n:i.name})),s=await this.callOllama(n,a,r);return this.mapResultsBack(t,s)}async callThemeTranslationAPI(t,r){let a=this.getThemeSystemPrompt(),n=t.map(i=>({i:i.id,s:i.source,y:i.type})),s=await this.callOllama(n,a,r);return this.mapResultsBack(t,s)}static async fetchModels(t){let r=(t||wS).replace(/\/+$/,""),a=Date.now(),n=this.modelsCache[r];if(n&&a-n.timestamp<5*60*1e3)return n.models;try{let s=await(0,IE.requestUrl)({url:`${r}/api/tags`,method:"GET",throw:!1});if(s.status===200&&s.json?.models){let i=s.json.models.map(o=>o.name||o.model);return this.modelsCache[r]={models:i,timestamp:a},i}return[]}catch{return[]}}async callFixAPI(t,r,a,n,s){let i=this.getBaseUrl(),o=this.getModelName(),l=`${i}/v1/chat/completions`,c=`Source: ${t}
|
|
Broken Translation: ${r}
|
|
Error: ${a}
|
|
|
|
Please return ONLY the fixed translation string.`,d=await(0,IE.requestUrl)({url:l,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:o,messages:[{role:"system",content:n},{role:"user",content:c}],temperature:.2,stream:!1}),throw:!1});if(d.status!==200){let m=d.json?.error?.message||`HTTP ${d.status}`;throw new Error(`Ollama API \u9519\u8BEF: ${m}`)}let f=d.json?.choices?.[0]?.message?.content;if(!f||f.trim()==="")throw new Error("AI \u8FD4\u56DE\u7684\u4FEE\u590D\u7ED3\u679C\u4E3A\u7A7A");let p=f.trim();return p.startsWith('"')&&p.endsWith('"')&&(p=p.slice(1,-1)),p.startsWith("'")&&p.endsWith("'")&&(p=p.slice(1,-1)),p}};Jf.modelsCache={};var CS=class extends ks{main(){let r=this.settings.llmApi;this.config=Dt[r],this.config&&(this.profileUI(),this.configUI(),this.openaiSpecialUI(),this.priceUI(),this.testUI(),this.promptUI())}get activeProfile(){let r=`llm${this.config.labelKey}Profiles`,a=`llm${this.config.labelKey}ActiveProfileId`,n=this.settings[r],s=this.settings[a];return n?.find(i=>i.id===s)||n?.[0]}profileUI(){let r=`llm${this.config.labelKey}Profiles`,a=`llm${this.config.labelKey}ActiveProfileId`,n=this.settings[r],s=this.settings[a];(!n||n.length===0)&&(n=[{id:"default",name:"Default",url:this.config.baseUrl||"",key:"",model:this.config.defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],this.settings[r]=n,this.settings[a]="default");let i=this.containerEl,o=new fn.Setting(i).setName(v("Settings.Ai.ProfileSelectTitle")).setDesc(v("Settings.Ai.ProfileSelectDesc")).addDropdown(c=>{n.forEach(u=>c.addOption(u.id,u.name)),c.setValue(s),c.onChange(async u=>{this.settings[a]=u,await this.i18n.saveSettings(),this.settingTab.llmDisplay()})});o.addExtraButton(c=>{c.setIcon("plus").setTooltip(v("Settings.Ai.ProfileAddBtn")).onClick(async()=>{let u=Date.now().toString();n.push({id:u,name:`${v("Settings.Ai.ProfileNamePlaceholder")} ${n.length+1}`,url:this.config.baseUrl||"",key:"",model:this.config.defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}),this.settings[a]=u,await this.i18n.saveSettings(),this.settingTab.llmDisplay()})});let l=this.activeProfile;l&&n.length>1&&o.addExtraButton(c=>{c.setIcon("trash").setTooltip(v("Settings.Ai.ProfileDelBtn")).onClick(async()=>{if(confirm(v("Settings.Ai.ProfileDelConfirm"))){let u=n.findIndex(d=>d.id===l.id);n.splice(u,1),this.settings[a]=n[0].id,await this.i18n.saveSettings(),this.settingTab.llmDisplay()}})})}configUI(){let r=this.activeProfile;if(!r)return;let{labelKey:a,models:n,defaultModel:s,id:i}=this.config;new fn.Setting(this.containerEl).setName(v("Settings.Ai.ProfileNameTitle")).setDesc(v("Settings.Ai.ProfileNameDesc")).addText(c=>{c.setValue(r.name).setPlaceholder(v("Settings.Ai.ProfileNamePlaceholder")).onChange(async u=>{r.name=u.trim(),await this.i18n.saveSettings()}),c.inputEl.addEventListener("blur",()=>this.settingTab.llmDisplay()),c.inputEl.addEventListener("keydown",u=>{u.key==="Enter"&&u.target.blur()})}),new fn.Setting(this.containerEl).setName(i==="ollama"?v("Settings.Ai.OllamaUrlTitle"):v("Settings.Ai.OpenaiUrlTitle")).setDesc(i==="ollama"?v("Settings.Ai.OllamaUrlDesc"):v("Settings.Ai.OpenaiUrlDesc")).addText(c=>{c.setValue(r.url||this.config.baseUrl||"").setPlaceholder(this.config.baseUrl||"https://...").onChange(async u=>{r.url=u.trim(),await this.i18n.saveSettings()})}),i!=="ollama"&&new fn.Setting(this.containerEl).setName(v(`Settings.Ai.${a}KeyTitle`)||`${this.config.name} API Key`).setDesc(v("Settings.Ai.OpenaiKeyDescTip")).addText(c=>{c.setValue(r.key||"").setPlaceholder("sk-...").onChange(async u=>{r.key=u.trim(),await this.i18n.saveSettings()}),c.inputEl.setAttribute("type","password")}),this.config.homepage&&new fn.Setting(this.containerEl).setName(v("Settings.Ai.HomepageBtn")).setDesc(this.config.homepage).addButton(c=>{c.setButtonText(v("Settings.Ai.HomepageBtn")).onClick(()=>window.open(this.config.homepage))});let o=new fn.Setting(this.containerEl).setName(v("Settings.Ai.ModelTitle")).setDesc(i==="ollama"?v("Settings.Ai.OllamaModelDesc"):v(`Settings.Ai.${a}ModelDesc`)||v("Settings.Ai.ModelDesc"));i==="ollama"&&o.addButton(c=>{c.setIcon("refresh-cw").setTooltip(v("Settings.Ai.OllamaFetchModelsBtn")).onClick(async()=>{c.setDisabled(!0);try{let u=await Jf.fetchModels(r.url||wS);u.length===0?new fn.Notice(v("Settings.Ai.OllamaNoModels")):(new fn.Notice(v("Settings.Ai.OllamaModelsLoaded",{count:u.length})),this.settingTab.llmDisplay())}catch{new fn.Notice(v("Settings.Ai.OllamaFetchFailed"))}finally{c.setDisabled(!1)}})});let l=null;o.addText(c=>{l=c,c.setValue(r.model||s).setPlaceholder(i==="ollama"?v("Settings.Ai.OllamaModelPlaceholder"):v("Settings.Ai.ModelInputPlaceholder")).onChange(async u=>{r.model=u.trim(),await this.i18n.saveSettings()})}),o.addDropdown(async c=>{c.addOption("",v("Settings.Ai.ModelSelectPlaceholder"));let u=n;if(i==="ollama")try{u=await Jf.fetchModels(r.url||wS)}catch{}u.forEach(d=>c.addOption(d,d)),u.includes(r.model)&&c.setValue(r.model),c.onChange(async d=>{d&&(r.model=d,l&&l.setValue(d),await this.i18n.saveSettings())})})}openaiSpecialUI(){new fn.Setting(this.containerEl).setName(v("Settings.Ai.ResponseFormatTitle")).setDesc(v("Settings.Ai.ResponseFormatDesc")).addDropdown(r=>{r.addOption("text",v("Settings.Ai.ResponseFormatText")).addOption("json_object",v("Settings.Ai.ResponseFormatJsonObject")).addOption("json_schema",v("Settings.Ai.ResponseFormatJsonSchema")).setValue(this.settings.llmResponseFormat).onChange(async a=>{this.settings.llmResponseFormat=a,await this.i18n.saveSettings()})})}priceUI(){let r=this.activeProfile;r&&(new fn.Setting(this.containerEl).setName(v("Settings.Ai.PriceHeader")).setHeading(),new fn.Setting(this.containerEl).setName(v("Settings.Ai.CustomPriceTitle")).setDesc(v("Settings.Ai.CustomPriceDesc")).addToggle(a=>{a.setValue(r.useCustomPrice).onChange(async n=>{r.useCustomPrice=n,await this.i18n.saveSettings(),this.settingTab.llmDisplay()})}),r.useCustomPrice&&(new fn.Setting(this.containerEl).setName(v("Settings.Ai.PriceInputTitle")).setDesc(v("Settings.Ai.PriceInputDesc")).addText(a=>{a.setValue(r.priceInput?.toString()||"0").onChange(async n=>{r.priceInput=parseFloat(n)||0,await this.i18n.saveSettings()})}),new fn.Setting(this.containerEl).setName(v("Settings.Ai.PriceOutputTitle")).setDesc(v("Settings.Ai.PriceOutputDesc")).addText(a=>{a.setValue(r.priceOutput?.toString()||"0").onChange(async n=>{r.priceOutput=parseFloat(n)||0,await this.i18n.saveSettings()})})))}testUI(){new fn.Setting(this.containerEl).setName(v("Settings.Ai.TestHeader")).setHeading(),new fn.Setting(this.containerEl).setName(v("Settings.Ai.TestTitle")).setDesc(v("Settings.Ai.TestDesc")).addButton(r=>{r.setButtonText(v("Settings.Ai.TestBtn")).setCta().onClick(async()=>{let a=this.activeProfile;if(!a)return;if(!(this.config.id==="ollama")&&!a.key){new fn.Notice(v("Settings.Ai.TestNoticeMissing"));return}try{r.setDisabled(!0).setButtonText(v("Settings.Ai.TestLoading"));let s=new hw(a.url||this.config.baseUrl||"",a.key,a.model||this.config.defaultModel,this.config.engine,this.settings.llmResponseFormat,this.settings.llmTimeout,this.settings.llmLanguage,this.settings.llmStyle),i=new gw(this.app,s.getInitialReport());i.open();let o=await s.runDeepDiagnostic(l=>{i.updateReport(l)});r.setButtonText(o.overallStatus==="healthy"?v("Settings.Ai.TestSuccessBtn"):v("Settings.Ai.TestFail")),setTimeout(()=>r.setButtonText(v("Settings.Ai.TestBtn")),3e3)}catch(s){new fn.Notice(`${v("Settings.Ai.TestFail")}: ${s.message}`),r.setButtonText(v("Settings.Ai.TestFail"))}finally{r.setDisabled(!1)}})})}promptUI(){new fn.Setting(this.containerEl).setName(v("Settings.Ai.PromptHeader")).setHeading(),[{id:"llmRegexPrompt",name:v("Settings.Ai.RegexPromptTitle"),desc:v("Settings.Ai.RegexPromptDesc"),placeholder:v("Settings.Ai.RegexPromptPlaceholder")},{id:"llmAstPrompt",name:v("Settings.Ai.AstPromptTitle"),desc:v("Settings.Ai.AstPromptDesc"),placeholder:v("Settings.Ai.AstPromptPlaceholder")},{id:"llmThemePrompt",name:v("Settings.Ai.ThemePromptTitle"),desc:v("Settings.Ai.ThemePromptDesc"),placeholder:v("Settings.Ai.ThemePromptPlaceholder")}].forEach(a=>{new fn.Setting(this.containerEl).setName(a.name).setDesc(a.desc).addTextArea(n=>{n.setValue(this.settings[a.id]||"").setPlaceholder(a.placeholder).onChange(async s=>{this.settings[a.id]=s,await this.i18n.saveSettings()}),n.inputEl.rows=8,n.inputEl.style.width="100%"})})}};var ec=require("obsidian");Rr();var ES=class extends ks{main(){let{containerEl:t}=this;t.empty(),new ec.Setting(t).setName(v("Settings.Re.ParamsHeader")).setHeading(),new ec.Setting(t).setName(v("Settings.Re.FlagTitle")).setDesc(v("Settings.Re.FlagDesc")).addText(a=>a.setValue(this.settings.reFlags).setPlaceholder(v("Settings.Re.FlagPlaceholder")).onChange(async n=>{this.settings.reFlags=n,await this.i18n.saveSettings()})),new ec.Setting(t).setName(v("Settings.Re.LenTitle")).setDesc(v("Settings.Re.LenDesc")).addSlider(a=>a.setDynamicTooltip().setLimits(0,3e3,100).setValue(this.settings.reLength).onChange(async n=>{this.settings.reLength=n,await this.i18n.saveSettings()})),new ec.Setting(t).setName(v("Settings.Re.DataHeader")).setHeading(),new ec.Setting(t).setName(v("Settings.Re.DataEditTitle")).setDesc(v("Settings.Re.DataEditDesc")).addTextArea(a=>{a.setValue((this.settings.reDatas||[]).join(`
|
|
`)).setPlaceholder(v("Settings.Re.DataPlaceholder")).onChange(async n=>{this.settings.reDatas=n.split(`
|
|
`).map(s=>s.trim()).filter(s=>s!==""),await this.i18n.saveSettings()}),a.inputEl.rows=10,a.inputEl.style.width="100%"}),new ec.Setting(t).setName(v("Settings.Re.RegexHeader")).setHeading(),new ec.Setting(t).setName(v("Settings.Re.RejectReTitle")).setDesc(v("Settings.Re.RejectReDesc")).addTextArea(a=>{a.setValue((this.settings.reRejectRe||[]).join(`
|
|
`)).setPlaceholder(v("Settings.Re.RejectPlaceholder")).onChange(async n=>{this.settings.reRejectRe=n.split(`
|
|
`).map(s=>s.trim()).filter(s=>s!==""),await this.i18n.saveSettings()}),a.inputEl.rows=6,a.inputEl.style.width="100%"}),new ec.Setting(t).setName(v("Settings.Re.ValidReTitle")).setDesc(v("Settings.Re.ValidReDesc")).addTextArea(a=>{a.setValue((this.settings.reValidRe||[]).join(`
|
|
`)).setPlaceholder(v("Settings.Re.ValidPlaceholder")).onChange(async n=>{this.settings.reValidRe=n.split(`
|
|
`).map(s=>s.trim()).filter(s=>s!==""),await this.i18n.saveSettings()}),a.inputEl.rows=6,a.inputEl.style.width="100%"}),new ec.Setting(t).setName(v("Settings.Re.PromptHeader")).setHeading(),new ec.Setting(t).setName(v("Settings.Re.PromptTitle")).setDesc(v("Settings.Re.PromptDesc")).addTextArea(a=>{a.setValue(this.settings.llmRegexPrompt||"").setPlaceholder(v("Settings.Re.PromptPlaceholder")).onChange(async n=>{this.settings.llmRegexPrompt=n,await this.i18n.saveSettings()}),a.inputEl.rows=8,a.inputEl.addClass("i18n-settings-textarea"),a.inputEl.style.width="100%"})}};var Yc=require("obsidian");Rr();var PS=class extends ks{main(){let{containerEl:t}=this;t.empty(),new Yc.Setting(t).setName(v("Settings.Ast.ConfigHeader")).setHeading(),new Yc.Setting(t).setName(v("Settings.Ast.AssignTitle")).setDesc(v("Settings.Ast.AssignDesc")).addTextArea(a=>{a.setValue((this.settings.astAssignments||[]).join(`
|
|
`)).setPlaceholder(v("Settings.Ast.AssignPlaceholder")).onChange(async n=>{this.settings.astAssignments=n.split(`
|
|
`).map(s=>s.trim()).filter(s=>s!==""),await this.i18n.saveSettings()}),a.inputEl.rows=3,a.inputEl.style.width="100%"}),new Yc.Setting(t).setName(v("Settings.Ast.FuncTitle")).setDesc(v("Settings.Ast.FuncDesc")).addTextArea(a=>{a.setValue((this.settings.astFunctions||[]).join(`
|
|
`)).setPlaceholder(v("Settings.Ast.FuncPlaceholder")).onChange(async n=>{this.settings.astFunctions=n.split(`
|
|
`).map(s=>s.trim()).filter(s=>s!==""),await this.i18n.saveSettings()}),a.inputEl.rows=4,a.inputEl.style.width="100%"}),new Yc.Setting(t).setName(v("Settings.Ast.KeyTitle")).setDesc(v("Settings.Ast.KeyDesc")).addTextArea(a=>{a.setValue((this.settings.astKeys||[]).join(`
|
|
`)).setPlaceholder(v("Settings.Ast.KeyPlaceholder")).onChange(async n=>{this.settings.astKeys=n.split(`
|
|
`).map(s=>s.trim()).filter(s=>s!==""),await this.i18n.saveSettings()}),a.inputEl.rows=4,a.inputEl.style.width="100%"}),new Yc.Setting(t).setName(v("Settings.Ast.RegexHeader")).setHeading(),new Yc.Setting(t).setName(v("Settings.Ast.RejectReTitle")).setDesc(v("Settings.Ast.RejectReDesc")).addTextArea(a=>{a.setValue((this.settings.astRejectRe||[]).join(`
|
|
`)).setPlaceholder(v("Settings.Ast.RejectPlaceholder")).onChange(async n=>{this.settings.astRejectRe=n.split(`
|
|
`).map(s=>s.trim()).filter(s=>s!==""),await this.i18n.saveSettings()}),a.inputEl.rows=6,a.inputEl.style.width="100%"}),new Yc.Setting(t).setName(v("Settings.Ast.ValidReTitle")).setDesc(v("Settings.Ast.ValidReDesc")).addTextArea(a=>{a.setValue((this.settings.astValidRe||[]).join(`
|
|
`)).setPlaceholder(v("Settings.Ast.ValidPlaceholder")).onChange(async n=>{this.settings.astValidRe=n.split(`
|
|
`).map(s=>s.trim()).filter(s=>s!==""),await this.i18n.saveSettings()}),a.inputEl.rows=3,a.inputEl.style.width="100%"}),new Yc.Setting(t).setName(v("Settings.Ast.PromptHeader")).setHeading(),new Yc.Setting(t).setName(v("Settings.Ast.PromptTitle")).setDesc(v("Settings.Ast.PromptDesc")).addTextArea(a=>{a.setValue(this.settings.llmAstPrompt||"").setPlaceholder(v("Settings.Ast.PromptPlaceholder")).onChange(async n=>{this.settings.llmAstPrompt=n,await this.i18n.saveSettings()}),a.inputEl.rows=8,a.inputEl.addClass("i18n-settings-textarea"),a.inputEl.style.width="100%"})}};var Jc=require("obsidian");Rr();var NE=require("obsidian");Rr();async function Fa(e,t=1e4){return Promise.race([(0,NE.requestUrl)(e),new Promise((r,a)=>setTimeout(()=>{let n=v("Settings.Basis.GithubApiTimeoutHint")||`\u8BF7\u6C42\u8D85\u65F6 (>${t}ms)`;a(new Error(n))},t))])}var Zy=class{constructor(t){this.owner="eondrcode";this.repo="obsidian-i18n-resources";this.i18n=t,this.settings=this.i18n.settings}get userRepo(){return this.settings.shareRepo||""}wrapProxyUrl(t){let r=this.settings.githubProxyUrl;return r&&t.includes("raw.githubusercontent.com")?t.startsWith(r)?t:r.includes("jsdelivr.net")?t.replace("https://raw.githubusercontent.com/",r).replace(/gh\/([^/]+)\/([^/]+)\/([^/]+)\//,"gh/$1/$2@$3/"):r.includes("statically.io")?t.replace("https://raw.githubusercontent.com/",r):(r.endsWith("/")?r:r+"/")+t:t}get token(){return this.settings.shareToken}authHeaders(){let t={Accept:"application/vnd.github.v3+json"};return this.token&&(t.Authorization=`token ${this.token}`),t}wrapError(t){let r=!!(t?.status===403&&(t?.text?.includes("rate limit")||t?.json?.message?.includes("rate limit"))),a=t?.message||String(t);return(a.includes("fetch failed")||a.includes("Network Error")||a.includes("net::ERR"))&&new NE.Notice(v("Settings.Basis.GithubApiTimeoutHint"),1e4),{state:!1,data:t,isRateLimit:r}}async getUser(){try{let t={url:"https://api.github.com/user",method:"GET",headers:this.authHeaders()},r=await Fa(t),n=(r.headers["x-oauth-scopes"]||"").split(",").map(s=>s.trim()).filter(Boolean);return{state:!0,data:r.json,scopes:n}}catch(t){return this.wrapError(t)}}async checkRepoExists(t,r){try{let a={url:`https://api.github.com/repos/${t}/${r}`,method:"GET",headers:this.authHeaders()};return{state:!0,data:(await Fa(a)).json}}catch(a){return{state:!1,data:a}}}async getRepoInfo(t,r){try{let a={url:`https://api.github.com/repos/${t}/${r}`,method:"GET",headers:this.authHeaders()};return{state:!0,data:(await Fa(a)).json}}catch(a){return{state:!1,data:a}}}async getLatestRelease(t,r){try{let a={url:`https://api.github.com/repos/${t}/${r}/releases/latest`,method:"GET",headers:this.authHeaders()};return{state:!0,data:(await Fa(a)).json}}catch(a){return{state:!1,data:a}}}async createRepo(t){try{let r={url:"https://api.github.com/user/repos",method:"POST",headers:{...this.authHeaders(),"Content-Type":"application/json"},body:JSON.stringify({name:t,description:"My Obsidian plugin translations (created by obsidian-i18n)",private:!1,auto_init:!0})};return{state:!0,data:(await Fa(r)).json}}catch(r){return{state:!1,data:r}}}async initRepoStructure(t,r){try{if((await this.getFileContent(t,r,"metadata.json")).state)return{state:!0,data:"already initialized"};let n=Buffer.from("[]").toString("base64");return await this.uploadFile(t,r,"metadata.json",n,"Initialize metadata.json")}catch(a){return{state:!1,data:a}}}async getFileContent(t,r,a,n){try{let s=`https://api.github.com/repos/${t}/${r}/contents/${a}`,i=s.includes("?")?"&":"?";s+=`${i}t=${Date.now()}`,n&&(s+=`&ref=${n}`);let o={url:s,method:"GET",headers:this.authHeaders(),throw:!1},l=await Fa(o);return l.status>=400?{state:!1,data:l.json||l.text,status:l.status}:{state:!0,data:l.json,status:l.status}}catch(s){return{state:!1,data:s,status:500}}}async getFileContentWithFallback(t,r,a,n="main"){try{let s=await this.getFileContent(t,r,a,n);if(s.state&&s.data){if(s.data.content){let i=Buffer.from(s.data.content,"base64").toString("utf-8");try{return{state:!0,data:JSON.parse(i),status:s.status}}catch{return{state:!0,data:i,status:s.status}}}if(s.data.download_url){let i=await Fa({url:s.data.download_url,method:"GET"});return{state:!0,data:i.json||i.text,status:i.status}}}else{if(s.status===404)return s;let i=s.status===403&&(s.data?.message?.includes("rate limit")||s.data?.text?.includes("rate limit"))}}catch{}try{let s=await this.getRawContent(t,r,a,n);if(s.state&&s.data)return{state:!0,data:s.data};if(s.data?.status===403||s.data?.status===429)return{state:!1,data:s.data,isRateLimit:!0}}catch{}return{state:!1,data:"Cannot fetch file content"}}async uploadFile(t,r,a,n,s,i="main",o){try{if(!this.token)return{state:!1,data:v("Settings.Basis.GithubApiTokenMissing")};let l=o||"";if(!l)try{let f={url:`https://api.github.com/repos/${t}/${r}/contents/${a}?ref=${i}&t=${Date.now()}`,method:"GET",headers:this.authHeaders(),throw:!1},p=await Fa(f);p.status===200&&(l=p.json.sha)}catch{}let c={message:s,content:n,branch:i};l&&(c.sha=l);let u={url:`https://api.github.com/repos/${t}/${r}/contents/${a}`,method:"PUT",headers:{...this.authHeaders(),"Content-Type":"application/json"},body:JSON.stringify(c),throw:!1},d=await Fa(u);if(d.status>=400){let f=d.json?.message||d.text||`HTTP ${d.status}`;return{state:!1,data:new Error(`GitHub \u62D2\u7EDD\u4E86\u4E0A\u4F20 (Status ${d.status}): ${f}`)}}return{state:!0,data:d.json}}catch(l){return{state:!1,data:l}}}async deleteFile(t,r,a,n,s="main"){try{if(!this.token)return{state:!1,data:v("Settings.Basis.GithubApiTokenMissing")};let i="";try{let c={url:`https://api.github.com/repos/${t}/${r}/contents/${a}?ref=${s}&t=${Date.now()}`,method:"GET",headers:this.authHeaders(),throw:!1},u=await Fa(c);if(u.status===200)i=u.json.sha;else return{state:!1,data:v("Settings.Basis.GithubApiFileNotFound")}}catch{return{state:!1,data:v("Settings.Basis.GithubApiCheckFailed")}}let o={url:`https://api.github.com/repos/${t}/${r}/contents/${a}`,method:"DELETE",headers:{...this.authHeaders(),"Content-Type":"application/json"},body:JSON.stringify({message:n,sha:i,branch:s}),throw:!1},l=await Fa(o);if(l.status>=400){let c=l.json?.message||l.text||`HTTP ${l.status}`;return{state:!1,data:new Error(`GitHub \u62D2\u7EDD\u4E86\u5220\u9664 (Status ${l.status}): ${c}`)}}return{state:!0,data:l.json}}catch(i){return{state:!1,data:i}}}async getTranslation(t,r,a){try{let n=`https://raw.githubusercontent.com/${this.owner}/${this.repo}/master/translation/dict/${r}/zh-cn/${a}.json`,s={url:this.wrapProxyUrl(n),method:"GET"};return{state:!0,data:(await Fa(s)).json}}catch{return{state:!1,data:""}}}async getDirectory(t){try{let r=`https://raw.githubusercontent.com/${this.owner}/${this.repo}/master/translation/directory/zh-cn.json`,a={url:this.wrapProxyUrl(r),method:"GET"};return{state:!0,data:(await Fa(a)).json}}catch(r){return{state:!1,data:r}}}async getRawContent(t,r,a,n="main"){try{let s=`https://raw.githubusercontent.com/${t}/${r}/${n}/${a}?t=${Date.now()}`,i={url:this.wrapProxyUrl(s),method:"GET"};return{state:!0,data:(await Fa(i)).json}}catch(s){return{state:!1,data:s}}}async downloadAsset(t){try{let a=await Fa({url:t,method:"GET"});return{state:!0,data:a.arrayBuffer||a.text}}catch(r){return{state:!1,data:r}}}async checkHasOpenRegistrationIssue(t,r,a,n){try{if(!this.token)return{state:!1,data:"\u8BF7\u5148\u5728\u8BBE\u7F6E\u4E2D\u914D\u7F6E GitHub Token",hasOpenIssue:!1};let i={url:`https://api.github.com/repos/${t}/${r}/issues?state=open&creator=${encodeURIComponent(n)}&t=${Date.now()}`,method:"GET",headers:this.authHeaders()},l=(await Fa(i)).json,c=Array.isArray(l)&&l.some(u=>u.title.includes(a)||u.body&&u.body.includes(a));return{state:!0,data:l,hasOpenIssue:c}}catch(s){return{state:!1,data:s,hasOpenIssue:!1}}}async postIssue(t,r,a,n,s){try{if(!this.token)return{state:!1,data:v("Settings.Basis.GithubApiTokenMissing")};let i=n||this.owner,o=s||this.repo,l={url:`https://api.github.com/repos/${i}/${o}/issues`,method:"POST",headers:{...this.authHeaders(),"Content-Type":"application/json"},body:JSON.stringify({title:t,body:r,labels:a?[a]:[]})};return{state:!0,data:(await Fa(l)).json}}catch(i){return{state:!1,data:i}}}async getFileCommits(t,r,a,n=1,s=20){try{let i={url:`https://api.github.com/repos/${t}/${r}/commits?path=${encodeURIComponent(a)}&page=${n}&per_page=${s}&t=${Date.now()}`,method:"GET",headers:this.authHeaders()};return{state:!0,data:(await Fa(i)).json}}catch(i){return{state:!1,data:i}}}async getFileAtCommit(t,r,a,n){try{let s={url:`https://api.github.com/repos/${t}/${r}/contents/${a}?ref=${n}&t=${Date.now()}`,method:"GET",headers:this.authHeaders()};return{state:!0,data:(await Fa(s)).json}}catch(s){return{state:!1,data:s}}}async getRepoTree(t,r,a="main",n=!0){try{let s={url:`https://api.github.com/repos/${t}/${r}/git/trees/${a}${n?"?recursive=1":""}&t=${Date.now()}`,method:"GET",headers:this.authHeaders()};return{state:!0,data:(await Fa(s)).json}}catch(s){return{state:!1,data:s}}}async getRef(t,r,a="heads/main"){try{let n={url:`https://api.github.com/repos/${t}/${r}/git/refs/${a}?t=${Date.now()}`,method:"GET",headers:this.authHeaders()};return{state:!0,data:(await Fa(n)).json}}catch(n){return{state:!1,data:n}}}async createTree(t,r,a,n){try{let s={url:`https://api.github.com/repos/${t}/${r}/git/trees`,method:"POST",headers:{...this.authHeaders(),"Content-Type":"application/json"},body:JSON.stringify({base_tree:a,tree:n})};return{state:!0,data:(await Fa(s)).json}}catch(s){return{state:!1,data:s}}}async createCommit(t,r,a,n,s){try{let i={url:`https://api.github.com/repos/${t}/${r}/git/commits`,method:"POST",headers:{...this.authHeaders(),"Content-Type":"application/json"},body:JSON.stringify({message:a,tree:n,parents:s})};return{state:!0,data:(await Fa(i)).json}}catch(i){return{state:!1,data:i}}}async updateRef(t,r,a,n){try{let s={url:`https://api.github.com/repos/${t}/${r}/git/refs/${a}`,method:"PATCH",headers:{...this.authHeaders(),"Content-Type":"application/json"},body:JSON.stringify({sha:n,force:!1})};return{state:!0,data:(await Fa(s)).json}}catch(s){return{state:!1,data:s}}}async batchUploadFiles(t,r,a,n,s="main"){try{if(!this.token)return{state:!1,data:v("Settings.Basis.GithubApiTokenMissing")};if(a.length===0)return{state:!0,data:"no files to upload"};let i=await this.getRef(t,r,`heads/${s}`);if(!i.state)return{state:!1,data:`\u83B7\u53D6\u5206\u652F\u4FE1\u606F\u5931\u8D25: ${i.data}`};let o=i.data.object.sha,l={url:`https://api.github.com/repos/${t}/${r}/git/commits/${o}`,method:"GET",headers:this.authHeaders()},u=(await Fa(l)).json.tree.sha,d=a.map(g=>({path:g.path,mode:"100644",type:"blob",content:g.content})),f=await this.createTree(t,r,u,d);if(!f.state)return{state:!1,data:`\u521B\u5EFA Tree \u5931\u8D25: ${f.data}`};let p=f.data.sha,m=await this.createCommit(t,r,n,p,[o]);if(!m.state)return{state:!1,data:`\u521B\u5EFA Commit \u5931\u8D25: ${m.data}`};let h=m.data.sha,x=await this.updateRef(t,r,`heads/${s}`,h);return x.state?{state:!0,data:x.data}:{state:!1,data:`\u66F4\u65B0\u5F15\u7528\u5931\u8D25: ${x.data}`}}catch(i){return{state:!1,data:i}}}};ty();Vt();var k_={currentTab:"community",isLoading:!1,error:null,communityRegistry:[],communityStats:null,communityLoaded:!1,communityLoading:!1,contributors:[],contributorsLoaded:!1,repoDataLoaded:!1,repoInitialized:!1,repoChecking:!1,repoManifest:[],githubUser:null,isForking:!1,canCreateRepo:!1,repoNameInput:"obsidian-i18n-resources",repoDescriptionInput:"",myRepoInfo:null,myRepoReadme:null,searchParams:{query:"",language:"zh-cn",page:1,page_size:20},totalPages:1,targetRepoAddress:"",targetRepoStars:null,targetManifest:[],savedRepos:[],targetRepoReadme:null,uploadType:"plugin",uploadForm:{plugin_id:"",title:"",description:"",version:""},localFiles:[],selectedPluginId:"",selectedSourceId:"",outdatedSources:[],isCheckingUpdates:!1,historyDialogEntryId:null,backupDialogOpen:!1,backupDialogMode:null,backupProgress:null,diffDialogSourceId:null,refreshVersion:0,isAdmin:!1,isPushing:!1},Oze=Mc()((e,t)=>({...k_,setCurrentTab:r=>e({currentTab:r}),setCommunityRegistry:r=>e({communityRegistry:r}),setCommunityStats:r=>e({communityStats:r}),setCommunityLoaded:r=>e({communityLoaded:r}),setCommunityLoading:r=>e({communityLoading:r}),setRepoDataLoaded:r=>e({repoDataLoaded:r}),setRepoInitialized:r=>e({repoInitialized:r}),setRepoChecking:r=>e({repoChecking:r}),setRepoManifest:r=>e({repoManifest:r}),setGithubUser:r=>e({githubUser:r}),setIsForking:r=>e({isForking:r}),setCanCreateRepo:r=>e({canCreateRepo:r}),setRepoNameInput:r=>e({repoNameInput:r}),setRepoDescriptionInput:r=>e({repoDescriptionInput:r}),setMyRepoInfo:r=>e({myRepoInfo:r}),setMyRepoReadme:r=>e({myRepoReadme:r}),setSearchQuery:r=>e(a=>({searchParams:{...a.searchParams,query:r,page:1}})),setSearchLanguage:r=>e(a=>({searchParams:{...a.searchParams,language:r,page:1}})),setSearchPage:r=>e(a=>({searchParams:{...a.searchParams,page:r}})),setTotalPages:r=>e({totalPages:r}),setTargetRepoAddress:r=>e({targetRepoAddress:r}),setTargetRepoStars:r=>e({targetRepoStars:r}),setTargetManifest:r=>e({targetManifest:r}),setTargetRepoReadme:r=>e({targetRepoReadme:r}),setSavedRepos:r=>e({savedRepos:r}),addSavedRepo:r=>e(a=>({savedRepos:Array.from(new Set([...a.savedRepos,r]))})),removeSavedRepo:r=>e(a=>({savedRepos:a.savedRepos.filter(n=>n!==r)})),setUploadType:r=>e({uploadType:r}),setSelectedPluginId:r=>e({selectedPluginId:r,localFiles:[],selectedSourceId:"",uploadForm:{plugin_id:r,title:"",description:"",version:""}}),setSelectedSourceId:r=>e({selectedSourceId:r}),setUploadForm:r=>e(a=>({uploadForm:{...a.uploadForm,...r}})),setLocalFiles:r=>e({localFiles:r}),resetUploadForm:()=>e({uploadForm:k_.uploadForm,selectedPluginId:"",selectedSourceId:"",localFiles:[]}),setOutdatedSources:r=>e({outdatedSources:r}),setIsCheckingUpdates:r=>e({isCheckingUpdates:r}),setLoading:r=>e({isLoading:r}),setError:r=>e({error:r}),setHistoryDialogEntryId:r=>e({historyDialogEntryId:r}),setBackupDialogOpen:r=>e({backupDialogOpen:r}),setBackupDialogMode:r=>e({backupDialogMode:r}),setBackupProgress:r=>e({backupProgress:r}),setDiffDialogSourceId:r=>e({diffDialogSourceId:r}),setIsAdmin:r=>e({isAdmin:r}),fetchGithubUser:async r=>{let{githubUser:a,setGithubUser:n,setLoading:s,setIsAdmin:i,setCanCreateRepo:o}=t();if(!(!r.settings.shareToken||a)){s(!0);try{let c=await r.api.github.getUser();if(c.state){let u={login:c.data.login,id:c.data.id,avatar_url:c.data.avatar_url,name:c.data.name,followers:c.data.followers,following:c.data.following,public_repos:c.data.public_repos,created_at:c.data.created_at,bio:c.data.bio};n(u),i(u.login===r.api.github.owner);let d=c.scopes||[];o(d.includes("public_repo")||d.includes("repo"))}}catch{}finally{s(!1)}}},fetchCommunityRegistry:async r=>{let{communityLoading:a,setCommunityLoading:n,setCommunityRegistry:s,setCommunityStats:i,setCommunityLoaded:o}=t();if(!a){n(!0);try{let l=r.api.github.owner,c=r.api.github.repo,[u,d]=await Promise.all([r.api.github.getFileContentWithFallback(l,c,"registry.json"),r.api.github.getFileContentWithFallback(l,c,"stats.json")]);u.state&&u.data&&Array.isArray(u.data)&&s(u.data),d.state&&d.data&&d.data&&typeof d.data=="object"&&i(d.data),(u.state||d.state)&&o(!0)}catch{}finally{n(!1)}}},pushRegistryToCloud:async r=>{let{communityRegistry:a,isPushing:n}=t();if(n)return!1;e({isPushing:!0});try{let s=r.api.github.owner,i=r.api.github.repo,o="registry.json",l=JSON.stringify(a,null,2),c=Buffer.from(l,"utf-8").toString("base64");return!!(await r.api.github.uploadFile(s,i,o,c,`Update registry.json from Admin Panel (${new Date().toLocaleString()})`)).state}catch{return!1}finally{e({isPushing:!1})}},updateRegistryItem:(r,a)=>e(n=>({communityRegistry:n.communityRegistry.map(s=>s.repoAddress===r?{...s,...a}:s)})),setContributors:r=>e({contributors:r}),setContributorsLoaded:r=>e({contributorsLoaded:r}),addContributor:r=>e(a=>({contributors:[...a.contributors,r]})),removeContributor:(r,a)=>e(n=>({contributors:n.contributors.filter(s=>!(s.name===r&&s.category===a))})),updateContributor:(r,a,n)=>e(s=>({contributors:s.contributors.map(i=>i.name===r&&i.category===a?{...i,...n}:i)})),fetchContributors:async r=>{let{contributorsLoaded:a,setContributors:n,setContributorsLoaded:s}=t();if(!a)try{let i=r.api.github.owner,o=r.api.github.repo,l=await r.api.github.getFileContentWithFallback(i,o,"contributors.json");if(l.state&&l.data){let c=l.data;c.contributors&&Array.isArray(c.contributors)&&n(c.contributors)}s(!0)}catch{s(!0)}},pushContributorsToCloud:async r=>{let{contributors:a,isPushing:n}=t();if(n)return!1;e({isPushing:!0});try{let s=r.api.github.owner,i=r.api.github.repo,o="contributors.json",l=JSON.stringify({contributors:a},null,2),c=Buffer.from(l,"utf-8").toString("base64");return!!(await r.api.github.uploadFile(s,i,o,c,`Update contributors.json from Admin Panel (${new Date().toLocaleString()})`)).state}catch{return!1}finally{e({isPushing:!1})}},reset:()=>e(r=>({...k_,refreshVersion:r.refreshVersion+1,savedRepos:r.savedRepos,targetRepoAddress:r.targetRepoAddress,targetManifest:r.targetManifest,targetRepoReadme:r.targetRepoReadme,communityRegistry:r.communityRegistry,communityStats:r.communityStats,communityLoaded:r.communityLoaded,outdatedSources:r.outdatedSources,contributors:r.contributors,contributorsLoaded:r.contributorsLoaded}))})),Se=Ru(Oze);var AS=class extends ks{main(){let{containerEl:t}=this;if(t.empty(),this.settings.shareProfiles||(this.settings.shareProfiles=[]),this.settings.shareProfiles.length===0){let s=Date.now().toString();this.settings.shareProfiles.push({id:s,name:"\u9ED8\u8BA4\u8D26\u53F7",token:this.settings.shareToken||"",repo:this.settings.shareRepo||"obsidian-translations"}),this.settings.shareActiveProfileId=s,this.i18n.saveSettings()}let r=this.settings.shareProfiles.find(s=>s.id===this.settings.shareActiveProfileId);t.createEl("h2",{text:v("Settings.Share.TutorialTitle")}),new Jc.Setting(t).setDesc(v("Settings.Share.TutorialTip")).addButton(s=>s.setButtonText("Classic Token (\u81EA\u52A8\u52FE\u9009)").setTooltip("\u81EA\u52A8\u914D\u7F6E\u5E76\u52FE\u9009\u5168\u91CF repo \u6743\u9650\uFF0C\u64CD\u4F5C\u6700\u4FBF\u6377").onClick(()=>{window.open("https://github.com/settings/tokens/new?scopes=repo&description=Obsidian-i18n-Share")})).addButton(s=>s.setButtonText("Fine-grained Token (\u9700\u624B\u52A8)").setTooltip('\u66F4\u5B89\u5168\u7684\u7EC6\u7C92\u5EA6\u6743\u9650\u3002\u524D\u63D0\uFF1A\u9700\u624B\u52A8\u9009\u62E9"All repositories"\u5E76\u5F00\u542F Contents \u7684\u8BFB\u5199\u6743').onClick(()=>{window.open("https://github.com/settings/personal-access-tokens/new?name=Obsidian-i18n-Share&description=Obsidian-i18n+Translation+Sync")})),t.createEl("h2",{text:v("Settings.Share.AuthTitle")});let a=new Jc.Setting(t).setName(v("Settings.Share.ProfileSelectTitle")).setDesc(v("Settings.Share.ProfileSelectDesc"));a.addDropdown(s=>{this.settings.shareProfiles.forEach(i=>{s.addOption(i.id,i.name)}),s.setValue(this.settings.shareActiveProfileId),s.onChange(async i=>{this.settings.shareActiveProfileId=i;let o=this.settings.shareProfiles.find(l=>l.id===i);o&&(this.settings.shareToken=o.token,this.settings.shareRepo=o.repo,Se.getState().reset(),Se.getState().setRepoNameInput(o.repo)),await this.i18n.saveSettings(),this.display()})}),a.addButton(s=>{s.setIcon("plus").setTooltip(v("Settings.Share.ProfileAddBtn")).onClick(async()=>{let i=Date.now().toString(),o={id:i,name:`${v("Settings.Share.ProfileAddBtn")} ${this.settings.shareProfiles.length+1}`,token:"",repo:"obsidian-translations"};this.settings.shareProfiles.push(o),this.settings.shareActiveProfileId=i,this.settings.shareToken=o.token,this.settings.shareRepo=o.repo,Se.getState().reset(),Se.getState().setRepoNameInput(o.repo),await this.i18n.saveSettings(),new Jc.Notice(v("Settings.Share.ProfileAddNotice")),this.display()})}),a.addButton(s=>{s.setIcon("trash").setTooltip(v("Settings.Share.ProfileDelBtn")).onClick(async()=>{if(this.settings.shareProfiles.length<=1){new Jc.Notice("Cannot delete the last profile");return}if(!confirm(v("Settings.Share.ProfileDelConfirm")))return;let i=this.settings.shareActiveProfileId;this.settings.shareProfiles=this.settings.shareProfiles.filter(l=>l.id!==i);let o=this.settings.shareProfiles[0];this.settings.shareActiveProfileId=o.id,this.settings.shareToken=o.token,this.settings.shareRepo=o.repo,Se.getState().reset(),Se.getState().setRepoNameInput(o.repo),await this.i18n.saveSettings(),this.display()})}),r&&new Jc.Setting(t).setName(v("Settings.Share.ProfileNameTitle")).setDesc(v("Settings.Share.ProfileNameDesc")).addText(s=>s.setValue(r.name).setPlaceholder(v("Settings.Share.ProfileNamePlaceholder")).onChange(async i=>{let o=i.trim();o&&o!==r.name&&(r.name=o,await this.i18n.saveSettings())}));let n=new Jc.Setting(t).setName(v("Settings.Share.ModeTitle")).setDesc(this.settings.shareToken?`${v("Settings.Share.LoginSuccess")}`:v("Settings.Share.ModeDesc"));n.addText(s=>{s.setValue(this.settings.shareToken).setPlaceholder(v("Settings.Share.TokenPlaceholder")).onChange(async i=>{let o=i.trim();this.settings.shareToken=o,r&&(r.token=o),await this.i18n.saveSettings()}),s.inputEl.addEventListener("blur",async()=>{let i=this.settings.shareToken;if(i){n.setDesc(v("Settings.Share.Verifying"));try{let l=await new Zy(this.i18n).getUser();if(l.state){let c=l.scopes||[],u=c.includes("public_repo")||c.includes("repo"),d=i.startsWith("github_pat_");if(u||d)n.setDesc(`${v("Settings.Share.LoginSuccess")}: @${l.data.login}`),Se.getState().reset();else throw new Error(v("Settings.Share.VerifyInsufficient"))}else throw new Error(v("Settings.Share.VerifyError"))}catch(o){new Jc.Notice(o.message||v("Settings.Share.VerifyError")),this.settings.shareToken="",r&&(r.token=""),await this.i18n.saveSettings(),s.setValue(""),n.setDesc(v("Settings.Share.ModeDesc"))}}})}),new Jc.Setting(t).setName(v("Settings.Share.RepoTitle")).setDesc(v("Settings.Share.RepoDesc")).addText(s=>{s.setValue(this.settings.shareRepo||"obsidian-translations").setPlaceholder("obsidian-translations").onChange(async i=>{let o=i.trim();this.settings.shareRepo=o,r&&(r.repo=o),await this.i18n.saveSettings(),Se.getState().setRepoNameInput(o)})})}};Rr();var IS=class extends LE.PluginSettingTab{constructor(r,a){super(r,a);this.i18n=a,this.app=r}display(){let{containerEl:r}=this;r.empty();let a=()=>{let u=document.body.classList.contains("theme-dark");r.classList.toggle("dark",u)};a();let n=new MutationObserver(u=>{for(let d of u)d.type==="attributes"&&d.attributeName==="class"&&a()});n.observe(document.body,{attributes:!0,attributeFilter:["class"]}),r._darkObserver&&r._darkObserver.disconnect(),r._darkObserver=n,r.addClass("i18n-settings-wrapper","flex","flex-col","w-full","h-full","pb-4");let s=r.createEl("style");s.textContent=`
|
|
.i18n-settings-nav-item {
|
|
white-space: nowrap;
|
|
flex-shrink: 0;
|
|
}
|
|
@media (max-width: 750px) {
|
|
.i18n-settings-nav-text { display: none; }
|
|
.i18n-settings-nav-item { padding: 6px 14px !important; gap: 0 !important; justify-content: center; }
|
|
}
|
|
`;let i=r.createEl("div");i.addClass("flex","p-1","bg-transparent","mb-6","self-start","gap-1","overflow-x-auto","custom-scrollbar"),i.style.backgroundColor="var(--background-modifier-form-field)",i.style.borderRadius="var(--radius-m)",i.style.maxWidth="100%",this.contentEl=r.createEl("div"),this.contentEl.addClass("flex-1","overflow-y-auto","px-1","custom-scrollbar");let o=[{id:"basis",text:v("Settings.Tabs.Basis"),icon:"settings",content:()=>this.basisDisplay()},{id:"re",text:v("Settings.Tabs.Re"),icon:"search-code",content:()=>this.reDisplay()},{id:"ast",text:v("Settings.Tabs.Ast"),icon:"code-2",content:()=>this.astDisplay()},{id:"immersive",text:v("Settings.Tabs.Immersive"),icon:"languages",content:()=>this.imtDisplay()},{id:"ai",text:v("Settings.Tabs.Ai"),icon:"sparkles",content:()=>this.llmDisplay()},{id:"share",text:v("Settings.Tabs.Share"),icon:"share-2",content:()=>this.shareDisplay()}],l=[],c=(u,d)=>{u.className="i18n-settings-nav-item flex items-center gap-2 px-4 py-1.5 cursor-pointer transition-all duration-200 font-medium text-[13px]",u.style.borderRadius="var(--radius-s)",d?(u.style.backgroundColor="var(--background-primary)",u.style.color="var(--text-normal)",u.style.boxShadow="var(--shadow-s)",u.style.border="none"):(u.style.backgroundColor="transparent",u.style.color="var(--text-muted)",u.style.border="none",u.style.boxShadow="none",u.onmouseenter=()=>{this.i18n.activeSettingTab!==u.dataset.id&&(u.style.backgroundColor="var(--background-modifier-hover)")},u.onmouseleave=()=>{this.i18n.activeSettingTab!==u.dataset.id&&(u.style.backgroundColor="transparent")})};o.forEach(u=>{let d=i.createEl("div");d.dataset.id=u.id;let f=d.createEl("span",{cls:"nav-icon flex items-center shrink-0"});(0,LE.setIcon)(f,u.icon);let p=d.createEl("span",{text:u.text,cls:"i18n-settings-nav-text"});l.push(d);let m=u.id===this.i18n.activeSettingTab;c(d,m),m&&u.content(),d.addEventListener("click",()=>{this.i18n.activeSettingTab=u.id,l.forEach(h=>{let x=o.find(g=>g.id===h.dataset.id);c(h,h.dataset.id===u.id)}),u.content()})})}basisDisplay(){this.contentEl.empty(),new e0(this).display()}llmDisplay(){this.contentEl.empty(),new r0(this).display(),this.i18n.settings.llmApi&&new CS(this).display()}imtDisplay(){this.contentEl.empty(),new t0(this).display()}shareDisplay(){this.contentEl.empty(),new AS(this).display()}reDisplay(){this.contentEl.empty(),new ES(this).display()}astDisplay(){this.contentEl.empty(),new PS(this).display()}};Vt();var tse=require("obsidian");var Zne=N(Le());er();var Fn=N(Le(),1);var YK=N(Le(),1);function XK(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Vs(...e){return t=>{let r=!1,a=e.map(n=>{let s=XK(n,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let n=0;n<a.length;n++){let s=a[n];typeof s=="function"?s():XK(e[n],null)}}}}function Ht(...e){return YK.useCallback(Vs(...e),e)}var RE=N(ce(),1),Fze=Symbol.for("react.lazy"),kE=Fn[" use ".trim().toString()];function Bze(e){return typeof e=="object"&&e!==null&&"then"in e}function JK(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Fze&&"_payload"in e&&Bze(e._payload)}function Uze(e){let t=jze(e),r=Fn.forwardRef((a,n)=>{let{children:s,...i}=a;JK(s)&&typeof kE=="function"&&(s=kE(s._payload));let o=Fn.Children.toArray(s),l=o.find(Vze);if(l){let c=l.props.children,u=o.map(d=>d===l?Fn.Children.count(c)>1?Fn.Children.only(null):Fn.isValidElement(c)?c.props.children:null:d);return(0,RE.jsx)(t,{...i,ref:n,children:Fn.isValidElement(c)?Fn.cloneElement(c,void 0,u):null})}return(0,RE.jsx)(t,{...i,ref:n,children:s})});return r.displayName=`${e}.Slot`,r}var ME=Uze("Slot");function jze(e){let t=Fn.forwardRef((r,a)=>{let{children:n,...s}=r;if(JK(n)&&typeof kE=="function"&&(n=kE(n._payload)),Fn.isValidElement(n)){let i=Hze(n),o=qze(s,n.props);return n.type!==Fn.Fragment&&(o.ref=a?Vs(a,i):i),Fn.cloneElement(n,o)}return Fn.Children.count(n)>1?Fn.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var zze=Symbol("radix.slottable");function Vze(e){return Fn.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===zze}function qze(e,t){let r={...t};for(let a in t){let n=e[a],s=t[a];/^on[A-Z]/.test(a)?n&&s?r[a]=(...o)=>{let l=s(...o);return n(...o),l}:n&&(r[a]=n):a==="style"?r[a]={...n,...s}:a==="className"&&(r[a]=[n,s].filter(Boolean).join(" "))}return{...e,...r}}function Hze(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}zC();var QK=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ZK=Jg,Qc=(e,t)=>r=>{var a;if(t?.variants==null)return ZK(e,r?.class,r?.className);let{variants:n,defaultVariants:s}=t,i=Object.keys(n).map(c=>{let u=r?.[c],d=s?.[c];if(u===null)return null;let f=QK(u)||QK(d);return n[c][f]}),o=r&&Object.entries(r).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((c,u)=>{let{class:d,className:f,...p}=u;return Object.entries(p).every(m=>{let[h,x]=m;return Array.isArray(x)?x.includes({...s,...o}[h]):{...s,...o}[h]===x})?[...c,d,f]:c},[]);return ZK(e,i,l,r?.class,r?.className)};zC();H2();function oe(...e){return HC(Jg(e))}var eW=N(ce()),$ze=Qc("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function mt({className:e,variant:t,asChild:r=!1,...a}){return(0,eW.jsx)(r?ME:"span",{"data-slot":"badge",className:oe($ze({variant:t}),e),...a})}var rW=N(ce()),tW=Qc("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Te({className:e,variant:t,size:r,asChild:a=!1,...n}){return(0,rW.jsx)(a?ME:"button",{"data-slot":"button",className:oe(tW({variant:t,size:r,className:e})),...n})}var lW=N(Le(),1);var nW=N(Le(),1),sW=N(ff(),1);var ss=N(Le(),1);var DE=N(ce(),1);function aW(e){let t=Gze(e),r=ss.forwardRef((a,n)=>{let{children:s,...i}=a,o=ss.Children.toArray(s),l=o.find(Wze);if(l){let c=l.props.children,u=o.map(d=>d===l?ss.Children.count(c)>1?ss.Children.only(null):ss.isValidElement(c)?c.props.children:null:d);return(0,DE.jsx)(t,{...i,ref:n,children:ss.isValidElement(c)?ss.cloneElement(c,void 0,u):null})}return(0,DE.jsx)(t,{...i,ref:n,children:s})});return r.displayName=`${e}.Slot`,r}function Gze(e){let t=ss.forwardRef((r,a)=>{let{children:n,...s}=r;if(ss.isValidElement(n)){let i=Yze(n),o=Xze(s,n.props);return n.type!==ss.Fragment&&(o.ref=a?Vs(a,i):i),ss.cloneElement(n,o)}return ss.Children.count(n)>1?ss.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Kze=Symbol("radix.slottable");function Wze(e){return ss.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Kze}function Xze(e,t){let r={...t};for(let a in t){let n=e[a],s=t[a];/^on[A-Z]/.test(a)?n&&s?r[a]=(...o)=>{let l=s(...o);return n(...o),l}:n&&(r[a]=n):a==="style"?r[a]={...n,...s}:a==="className"&&(r[a]=[n,s].filter(Boolean).join(" "))}return{...e,...r}}function Yze(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var iW=N(ce(),1),Jze=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],lt=Jze.reduce((e,t)=>{let r=aW(`Primitive.${t}`),a=nW.forwardRef((n,s)=>{let{asChild:i,...o}=n,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,iW.jsx)(l,{...o,ref:s})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});function _E(e,t){e&&sW.flushSync(()=>e.dispatchEvent(t))}var cW=N(ce(),1),Qze="Separator",oW="horizontal",Zze=["horizontal","vertical"],uW=lW.forwardRef((e,t)=>{let{decorative:r,orientation:a=oW,...n}=e,s=eVe(a)?a:oW,o=r?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return(0,cW.jsx)(lt.div,{"data-orientation":s,...o,...n,ref:t})});uW.displayName=Qze;function eVe(e){return Zze.includes(e)}var dW=uW;var fW=N(ce());function Zc({className:e,orientation:t="horizontal",decorative:r=!0,...a}){return(0,fW.jsx)(dW,{"data-slot":"separator",decorative:r,orientation:t,className:oe("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...a})}var rVe=N(ce()),nbt=Qc("flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2",{variants:{orientation:{horizontal:"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",vertical:"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"}},defaultVariants:{orientation:"horizontal"}});var ex=N(ce());function is({className:e,...t}){return(0,ex.jsx)("div",{"data-slot":"card",className:oe("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function Qf({className:e,...t}){return(0,ex.jsx)("div",{"data-slot":"card-header",className:oe("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function Zf({className:e,...t}){return(0,ex.jsx)("div",{"data-slot":"card-title",className:oe("leading-none font-semibold",e),...t})}function NS({className:e,...t}){return(0,ex.jsx)("div",{"data-slot":"card-description",className:oe("text-muted-foreground text-sm",e),...t})}function ep({className:e,...t}){return(0,ex.jsx)("div",{"data-slot":"card-content",className:oe("px-6",e),...t})}var Ci=N(Le(),1);var wl=N(Le(),1),M_=N(ce(),1);function pW(e,t){let r=wl.createContext(t),a=s=>{let{children:i,...o}=s,l=wl.useMemo(()=>o,Object.values(o));return(0,M_.jsx)(r.Provider,{value:l,children:i})};a.displayName=e+"Provider";function n(s){let i=wl.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[a,n]}function Pa(e,t=[]){let r=[];function a(s,i){let o=wl.createContext(i),l=r.length;r=[...r,i];let c=d=>{let{scope:f,children:p,...m}=d,h=f?.[e]?.[l]||o,x=wl.useMemo(()=>m,Object.values(m));return(0,M_.jsx)(h.Provider,{value:x,children:p})};c.displayName=s+"Provider";function u(d,f){let p=f?.[e]?.[l]||o,m=wl.useContext(p);if(m)return m;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[c,u]}let n=()=>{let s=r.map(i=>wl.createContext(i));return function(o){let l=o?.[e]||s;return wl.useMemo(()=>({[`__scope${e}`]:{...o,[e]:l}}),[o,l])}};return n.scopeName=e,[a,aVe(n,...t)]}function aVe(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let a=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(s){let i=a.reduce((o,{useScope:l,scopeName:c})=>{let d=l(s)[`__scope${c}`];return{...o,...d}},{});return wl.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var cbt=!!(typeof window<"u"&&window.document&&window.document.createElement);function Ye(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),r===!1||!n.defaultPrevented)return t?.(n)}}var Cl=N(Le(),1);var mW=N(Le(),1),ya=globalThis?.document?mW.useLayoutEffect:()=>{};var OE=N(Le(),1);var nVe=Cl[" useInsertionEffect ".trim().toString()]||ya;function qs({prop:e,defaultProp:t,onChange:r=()=>{},caller:a}){let[n,s,i]=sVe({defaultProp:t,onChange:r}),o=e!==void 0,l=o?e:n;{let u=Cl.useRef(e!==void 0);Cl.useEffect(()=>{let d=u.current;if(d!==o){let f=d?"controlled":"uncontrolled",p=o?"controlled":"uncontrolled"}u.current=o},[o,a])}let c=Cl.useCallback(u=>{if(o){let d=iVe(u)?u(e):u;d!==e&&i.current?.(d)}else s(u)},[o,e,s,i]);return[l,c]}function sVe({defaultProp:e,onChange:t}){let[r,a]=Cl.useState(e),n=Cl.useRef(r),s=Cl.useRef(t);return nVe(()=>{s.current=t},[t]),Cl.useEffect(()=>{n.current!==r&&(s.current?.(r),n.current=r)},[r,n]),[r,a,s]}function iVe(e){return typeof e=="function"}var pbt=Symbol("RADIX:SYNC_STATE");var FE=N(Le(),1);function BE(e){let t=FE.useRef({value:e,previous:e});return FE.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var hW=N(Le(),1);function UE(e){let[t,r]=hW.useState(void 0);return ya(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let a=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;let s=n[0],i,o;if("borderBoxSize"in s){let l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,o=c.blockSize}else i=e.offsetWidth,o=e.offsetHeight;r({width:i,height:o})});return a.observe(e,{box:"border-box"}),()=>a.unobserve(e)}else r(void 0)},[e]),t}var io=N(Le(),1);var gW=N(Le(),1);function oVe(e,t){return gW.useReducer((r,a)=>t[r][a]??r,e)}var $a=e=>{let{present:t,children:r}=e,a=lVe(t),n=typeof r=="function"?r({present:a.isPresent}):io.Children.only(r),s=Ht(a.ref,cVe(n));return typeof r=="function"||a.isPresent?io.cloneElement(n,{ref:s}):null};$a.displayName="Presence";function lVe(e){let[t,r]=io.useState(),a=io.useRef(null),n=io.useRef(e),s=io.useRef("none"),i=e?"mounted":"unmounted",[o,l]=oVe(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return io.useEffect(()=>{let c=jE(a.current);s.current=o==="mounted"?c:"none"},[o]),ya(()=>{let c=a.current,u=n.current;if(u!==e){let f=s.current,p=jE(c);e?l("MOUNT"):p==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&f!==p?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,l]),ya(()=>{if(t){let c,u=t.ownerDocument.defaultView??window,d=p=>{let h=jE(a.current).includes(CSS.escape(p.animationName));if(p.target===t&&h&&(l("ANIMATION_END"),!n.current)){let x=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},f=p=>{p.target===t&&(s.current=jE(a.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:io.useCallback(c=>{a.current=c?getComputedStyle(c):null,r(c)},[])}}function jE(e){return e?.animationName||"none"}function cVe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var _o=N(ce(),1),zE="Checkbox",[uVe,Nbt]=Pa(zE),[dVe,D_]=uVe(zE);function fVe(e){let{__scopeCheckbox:t,checked:r,children:a,defaultChecked:n,disabled:s,form:i,name:o,onCheckedChange:l,required:c,value:u="on",internal_do_not_use_render:d}=e,[f,p]=qs({prop:r,defaultProp:n??!1,onChange:l,caller:zE}),[m,h]=Ci.useState(null),[x,g]=Ci.useState(null),y=Ci.useRef(!1),b=m?!!i||!!m.closest("form"):!0,S={checked:f,disabled:s,setChecked:p,control:m,setControl:h,name:o,form:i,value:u,hasConsumerStoppedPropagationRef:y,required:c,defaultChecked:tp(n)?!1:n,isFormControl:b,bubbleInput:x,setBubbleInput:g};return(0,_o.jsx)(dVe,{scope:t,...S,children:pVe(d)?d(S):a})}var yW="CheckboxTrigger",xW=Ci.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...a},n)=>{let{control:s,value:i,disabled:o,checked:l,required:c,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=D_(yW,e),h=Ht(n,u),x=Ci.useRef(l);return Ci.useEffect(()=>{let g=s?.form;if(g){let y=()=>d(x.current);return g.addEventListener("reset",y),()=>g.removeEventListener("reset",y)}},[s,d]),(0,_o.jsx)(lt.button,{type:"button",role:"checkbox","aria-checked":tp(l)?"mixed":l,"aria-required":c,"data-state":TW(l),"data-disabled":o?"":void 0,disabled:o,value:i,...a,ref:h,onKeyDown:Ye(t,g=>{g.key==="Enter"&&g.preventDefault()}),onClick:Ye(r,g=>{d(y=>tp(y)?!0:!y),m&&p&&(f.current=g.isPropagationStopped(),f.current||g.stopPropagation())})})});xW.displayName=yW;var __=Ci.forwardRef((e,t)=>{let{__scopeCheckbox:r,name:a,checked:n,defaultChecked:s,required:i,disabled:o,value:l,onCheckedChange:c,form:u,...d}=e;return(0,_o.jsx)(fVe,{__scopeCheckbox:r,checked:n,defaultChecked:s,disabled:o,required:i,onCheckedChange:c,name:a,form:u,value:l,internal_do_not_use_render:({isFormControl:f})=>(0,_o.jsxs)(_o.Fragment,{children:[(0,_o.jsx)(xW,{...d,ref:t,__scopeCheckbox:r}),f&&(0,_o.jsx)(SW,{__scopeCheckbox:r})]})})});__.displayName=zE;var bW="CheckboxIndicator",O_=Ci.forwardRef((e,t)=>{let{__scopeCheckbox:r,forceMount:a,...n}=e,s=D_(bW,r);return(0,_o.jsx)($a,{present:a||tp(s.checked)||s.checked===!0,children:(0,_o.jsx)(lt.span,{"data-state":TW(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})});O_.displayName=bW;var vW="CheckboxBubbleInput",SW=Ci.forwardRef(({__scopeCheckbox:e,...t},r)=>{let{control:a,hasConsumerStoppedPropagationRef:n,checked:s,defaultChecked:i,required:o,disabled:l,name:c,value:u,form:d,bubbleInput:f,setBubbleInput:p}=D_(vW,e),m=Ht(r,p),h=BE(s),x=UE(a);Ci.useEffect(()=>{let y=f;if(!y)return;let b=window.HTMLInputElement.prototype,w=Object.getOwnPropertyDescriptor(b,"checked").set,P=!n.current;if(h!==s&&w){let C=new Event("click",{bubbles:P});y.indeterminate=tp(s),w.call(y,tp(s)?!1:s),y.dispatchEvent(C)}},[f,h,s,n]);let g=Ci.useRef(tp(s)?!1:s);return(0,_o.jsx)(lt.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??g.current,required:o,disabled:l,name:c,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});SW.displayName=vW;function pVe(e){return typeof e=="function"}function tp(e){return e==="indeterminate"}function TW(e){return tp(e)?"indeterminate":e?"checked":"unchecked"}qt();var VE=N(ce());function El({className:e,...t}){return(0,VE.jsx)(__,{"data-slot":"checkbox",className:oe("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:(0,VE.jsx)(O_,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:(0,VE.jsx)(Jl,{className:"size-3.5"})})})}var tx=N(ce());function qE({className:e,...t}){return(0,tx.jsx)("div",{"data-slot":"empty",className:oe("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12",e),...t})}function HE({className:e,...t}){return(0,tx.jsx)("div",{"data-slot":"empty-header",className:oe("flex max-w-sm flex-col items-center gap-2 text-center",e),...t})}var hVe=Qc("flex shrink-0 items-center justify-center mb-2 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6"}},defaultVariants:{variant:"default"}});function $E({className:e,variant:t="default",...r}){return(0,tx.jsx)("div",{"data-slot":"empty-icon","data-variant":t,className:oe(hVe({variant:t,className:e})),...r})}function GE({className:e,...t}){return(0,tx.jsx)("div",{"data-slot":"empty-title",className:oe("text-lg font-medium tracking-tight",e),...t})}function KE({className:e,...t}){return(0,tx.jsx)("div",{"data-slot":"empty-description",className:oe("text-muted-foreground [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4",e),...t})}var lo=N(Le(),1);var EW=["top","right","bottom","left"];var eu=Math.min,Ei=Math.max,RS=Math.round,kS=Math.floor,tc=e=>({x:e,y:e}),gVe={left:"right",right:"left",bottom:"top",top:"bottom"},yVe={start:"end",end:"start"};function XE(e,t,r){return Ei(e,eu(t,r))}function tu(e,t){return typeof e=="function"?e(t):e}function ru(e){return e.split("-")[0]}function th(e){return e.split("-")[1]}function YE(e){return e==="x"?"y":"x"}function JE(e){return e==="y"?"height":"width"}var xVe=new Set(["top","bottom"]);function rc(e){return xVe.has(ru(e))?"y":"x"}function QE(e){return YE(rc(e))}function PW(e,t,r){r===void 0&&(r=!1);let a=th(e),n=QE(e),s=JE(n),i=n==="x"?a===(r?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=LS(i)),[i,LS(i)]}function AW(e){let t=LS(e);return[WE(e),t,WE(t)]}function WE(e){return e.replace(/start|end/g,t=>yVe[t])}var wW=["left","right"],CW=["right","left"],bVe=["top","bottom"],vVe=["bottom","top"];function SVe(e,t,r){switch(e){case"top":case"bottom":return r?t?CW:wW:t?wW:CW;case"left":case"right":return t?bVe:vVe;default:return[]}}function IW(e,t,r,a){let n=th(e),s=SVe(ru(e),r==="start",a);return n&&(s=s.map(i=>i+"-"+n),t&&(s=s.concat(s.map(WE)))),s}function LS(e){return e.replace(/left|right|bottom|top/g,t=>gVe[t])}function TVe(e){return{top:0,right:0,bottom:0,left:0,...e}}function F_(e){return typeof e!="number"?TVe(e):{top:e,right:e,bottom:e,left:e}}function rh(e){let{x:t,y:r,width:a,height:n}=e;return{width:a,height:n,top:r,left:t,right:t+a,bottom:r+n,x:t,y:r}}function NW(e,t,r){let{reference:a,floating:n}=e,s=rc(t),i=QE(t),o=JE(i),l=ru(t),c=s==="y",u=a.x+a.width/2-n.width/2,d=a.y+a.height/2-n.height/2,f=a[o]/2-n[o]/2,p;switch(l){case"top":p={x:u,y:a.y-n.height};break;case"bottom":p={x:u,y:a.y+a.height};break;case"right":p={x:a.x+a.width,y:d};break;case"left":p={x:a.x-n.width,y:d};break;default:p={x:a.x,y:a.y}}switch(th(t)){case"start":p[i]-=f*(r&&c?-1:1);break;case"end":p[i]+=f*(r&&c?-1:1);break}return p}var kW=async(e,t,r)=>{let{placement:a="bottom",strategy:n="absolute",middleware:s=[],platform:i}=r,o=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t)),c=await i.getElementRects({reference:e,floating:t,strategy:n}),{x:u,y:d}=NW(c,a,l),f=a,p={},m=0;for(let h=0;h<o.length;h++){let{name:x,fn:g}=o[h],{x:y,y:b,data:S,reset:w}=await g({x:u,y:d,initialPlacement:a,placement:f,strategy:n,middlewareData:p,rects:c,platform:i,elements:{reference:e,floating:t}});u=y??u,d=b??d,p={...p,[x]:{...p[x],...S}},w&&m<=50&&(m++,typeof w=="object"&&(w.placement&&(f=w.placement),w.rects&&(c=w.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:n}):w.rects),{x:u,y:d}=NW(c,f,l)),h=-1)}return{x:u,y:d,placement:f,strategy:n,middlewareData:p}};async function rx(e,t){var r;t===void 0&&(t={});let{x:a,y:n,platform:s,rects:i,elements:o,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=tu(t,e),m=F_(p),x=o[f?d==="floating"?"reference":"floating":d],g=rh(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(x)))==null||r?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(o.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{x:a,y:n,width:i.floating.width,height:i.floating.height}:i.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating)),S=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},w=rh(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:y,offsetParent:b,strategy:l}):y);return{top:(g.top-w.top+m.top)/S.y,bottom:(w.bottom-g.bottom+m.bottom)/S.y,left:(g.left-w.left+m.left)/S.x,right:(w.right-g.right+m.right)/S.x}}var MW=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:a,placement:n,rects:s,platform:i,elements:o,middlewareData:l}=t,{element:c,padding:u=0}=tu(e,t)||{};if(c==null)return{};let d=F_(u),f={x:r,y:a},p=QE(n),m=JE(p),h=await i.getDimensions(c),x=p==="y",g=x?"top":"left",y=x?"bottom":"right",b=x?"clientHeight":"clientWidth",S=s.reference[m]+s.reference[p]-f[p]-s.floating[m],w=f[p]-s.reference[p],P=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c)),C=P?P[b]:0;(!C||!await(i.isElement==null?void 0:i.isElement(P)))&&(C=o.floating[b]||s.floating[m]);let I=S/2-w/2,R=C/2-h[m]/2-1,O=eu(d[g],R),D=eu(d[y],R),W=O,J=C-h[m]-D,me=C/2-h[m]/2+I,Z=XE(W,me,J),q=!l.arrow&&th(n)!=null&&me!==Z&&s.reference[m]/2-(me<W?O:D)-h[m]/2<0,V=q?me<W?me-W:me-J:0;return{[p]:f[p]+V,data:{[p]:Z,centerOffset:me-Z-V,...q&&{alignmentOffset:V}},reset:q}}});var DW=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,a;let{placement:n,middlewareData:s,rects:i,initialPlacement:o,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...x}=tu(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};let g=ru(n),y=rc(o),b=ru(o)===o,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=f||(b||!h?[LS(o)]:AW(o)),P=m!=="none";!f&&P&&w.push(...IW(o,h,m,S));let C=[o,...w],I=await rx(t,x),R=[],O=((a=s.flip)==null?void 0:a.overflows)||[];if(u&&R.push(I[g]),d){let me=PW(n,i,S);R.push(I[me[0]],I[me[1]])}if(O=[...O,{placement:n,overflows:R}],!R.every(me=>me<=0)){var D,W;let me=(((D=s.flip)==null?void 0:D.index)||0)+1,Z=C[me];if(Z&&(!(d==="alignment"?y!==rc(Z):!1)||O.every(L=>rc(L.placement)===y?L.overflows[0]>0:!0)))return{data:{index:me,overflows:O},reset:{placement:Z}};let q=(W=O.filter(V=>V.overflows[0]<=0).sort((V,L)=>V.overflows[1]-L.overflows[1])[0])==null?void 0:W.placement;if(!q)switch(p){case"bestFit":{var J;let V=(J=O.filter(L=>{if(P){let k=rc(L.placement);return k===y||k==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(k=>k>0).reduce((k,_)=>k+_,0)]).sort((L,k)=>L[1]-k[1])[0])==null?void 0:J[0];V&&(q=V);break}case"initialPlacement":q=o;break}if(n!==q)return{reset:{placement:q}}}return{}}}};function LW(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function RW(e){return EW.some(t=>e[t]>=0)}var _W=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:a="referenceHidden",...n}=tu(e,t);switch(a){case"referenceHidden":{let s=await rx(t,{...n,elementContext:"reference"}),i=LW(s,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:RW(i)}}}case"escaped":{let s=await rx(t,{...n,altBoundary:!0}),i=LW(s,r.floating);return{data:{escapedOffsets:i,escaped:RW(i)}}}default:return{}}}}};var OW=new Set(["left","top"]);async function wVe(e,t){let{placement:r,platform:a,elements:n}=e,s=await(a.isRTL==null?void 0:a.isRTL(n.floating)),i=ru(r),o=th(r),l=rc(r)==="y",c=OW.has(i)?-1:1,u=s&&l?-1:1,d=tu(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return o&&typeof m=="number"&&(p=o==="end"?m*-1:m),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}var FW=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,a;let{x:n,y:s,placement:i,middlewareData:o}=t,l=await wVe(t,e);return i===((r=o.offset)==null?void 0:r.placement)&&(a=o.arrow)!=null&&a.alignmentOffset?{}:{x:n+l.x,y:s+l.y,data:{...l,placement:i}}}}},BW=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:a,placement:n}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:o={fn:x=>{let{x:g,y}=x;return{x:g,y}}},...l}=tu(e,t),c={x:r,y:a},u=await rx(t,l),d=rc(ru(n)),f=YE(d),p=c[f],m=c[d];if(s){let x=f==="y"?"top":"left",g=f==="y"?"bottom":"right",y=p+u[x],b=p-u[g];p=XE(y,p,b)}if(i){let x=d==="y"?"top":"left",g=d==="y"?"bottom":"right",y=m+u[x],b=m-u[g];m=XE(y,m,b)}let h=o.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-r,y:h.y-a,enabled:{[f]:s,[d]:i}}}}}},UW=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:r,y:a,placement:n,rects:s,middlewareData:i}=t,{offset:o=0,mainAxis:l=!0,crossAxis:c=!0}=tu(e,t),u={x:r,y:a},d=rc(n),f=YE(d),p=u[f],m=u[d],h=tu(o,t),x=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){let b=f==="y"?"height":"width",S=s.reference[f]-s.floating[b]+x.mainAxis,w=s.reference[f]+s.reference[b]-x.mainAxis;p<S?p=S:p>w&&(p=w)}if(c){var g,y;let b=f==="y"?"width":"height",S=OW.has(ru(n)),w=s.reference[d]-s.floating[b]+(S&&((g=i.offset)==null?void 0:g[d])||0)+(S?0:x.crossAxis),P=s.reference[d]+s.reference[b]+(S?0:((y=i.offset)==null?void 0:y[d])||0)-(S?x.crossAxis:0);m<w?m=w:m>P&&(m=P)}return{[f]:p,[d]:m}}}},jW=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,a;let{placement:n,rects:s,platform:i,elements:o}=t,{apply:l=()=>{},...c}=tu(e,t),u=await rx(t,c),d=ru(n),f=th(n),p=rc(n)==="y",{width:m,height:h}=s.floating,x,g;d==="top"||d==="bottom"?(x=d,g=f===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(g=d,x=f==="end"?"top":"bottom");let y=h-u.top-u.bottom,b=m-u.left-u.right,S=eu(h-u[x],y),w=eu(m-u[g],b),P=!t.middlewareData.shift,C=S,I=w;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(I=b),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(C=y),P&&!f){let O=Ei(u.left,0),D=Ei(u.right,0),W=Ei(u.top,0),J=Ei(u.bottom,0);p?I=m-2*(O!==0||D!==0?O+D:Ei(u.left,u.right)):C=h-2*(W!==0||J!==0?W+J:Ei(u.top,u.bottom))}await l({...t,availableWidth:I,availableHeight:C});let R=await i.getDimensions(o.floating);return m!==R.width||h!==R.height?{reset:{rects:!0}}:{}}}};function ZE(){return typeof window<"u"}function nh(e){return VW(e)?(e.nodeName||"").toLowerCase():"#document"}function oo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ac(e){var t;return(t=(VW(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function VW(e){return ZE()?e instanceof Node||e instanceof oo(e).Node:!1}function Pl(e){return ZE()?e instanceof Element||e instanceof oo(e).Element:!1}function nc(e){return ZE()?e instanceof HTMLElement||e instanceof oo(e).HTMLElement:!1}function zW(e){return!ZE()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof oo(e).ShadowRoot}var CVe=new Set(["inline","contents"]);function ax(e){let{overflow:t,overflowX:r,overflowY:a,display:n}=Al(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+r)&&!CVe.has(n)}var EVe=new Set(["table","td","th"]);function qW(e){return EVe.has(nh(e))}var PVe=[":popover-open",":modal"];function MS(e){return PVe.some(t=>{try{return e.matches(t)}catch{return!1}})}var AVe=["transform","translate","scale","rotate","perspective"],IVe=["transform","translate","scale","rotate","perspective","filter"],NVe=["paint","layout","strict","content"];function eP(e){let t=tP(),r=Pl(e)?Al(e):e;return AVe.some(a=>r[a]?r[a]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||IVe.some(a=>(r.willChange||"").includes(a))||NVe.some(a=>(r.contain||"").includes(a))}function HW(e){let t=od(e);for(;nc(t)&&!sh(t);){if(eP(t))return t;if(MS(t))return null;t=od(t)}return null}function tP(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var LVe=new Set(["html","body","#document"]);function sh(e){return LVe.has(nh(e))}function Al(e){return oo(e).getComputedStyle(e)}function DS(e){return Pl(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function od(e){if(nh(e)==="html")return e;let t=e.assignedSlot||e.parentNode||zW(e)&&e.host||ac(e);return zW(t)?t.host:t}function $W(e){let t=od(e);return sh(t)?e.ownerDocument?e.ownerDocument.body:e.body:nc(t)&&ax(t)?t:$W(t)}function ah(e,t,r){var a;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=$W(e),s=n===((a=e.ownerDocument)==null?void 0:a.body),i=oo(n);if(s){let o=rP(i);return t.concat(i,i.visualViewport||[],ax(n)?n:[],o&&r?ah(o):[])}return t.concat(n,ah(n,[],r))}function rP(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function XW(e){let t=Al(e),r=parseFloat(t.width)||0,a=parseFloat(t.height)||0,n=nc(e),s=n?e.offsetWidth:r,i=n?e.offsetHeight:a,o=RS(r)!==s||RS(a)!==i;return o&&(r=s,a=i),{width:r,height:a,$:o}}function U_(e){return Pl(e)?e:e.contextElement}function nx(e){let t=U_(e);if(!nc(t))return tc(1);let r=t.getBoundingClientRect(),{width:a,height:n,$:s}=XW(t),i=(s?RS(r.width):r.width)/a,o=(s?RS(r.height):r.height)/n;return(!i||!Number.isFinite(i))&&(i=1),(!o||!Number.isFinite(o))&&(o=1),{x:i,y:o}}var RVe=tc(0);function YW(e){let t=oo(e);return!tP()||!t.visualViewport?RVe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function kVe(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==oo(e)?!1:t}function ih(e,t,r,a){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),s=U_(e),i=tc(1);t&&(a?Pl(a)&&(i=nx(a)):i=nx(e));let o=kVe(s,r,a)?YW(s):tc(0),l=(n.left+o.x)/i.x,c=(n.top+o.y)/i.y,u=n.width/i.x,d=n.height/i.y;if(s){let f=oo(s),p=a&&Pl(a)?oo(a):a,m=f,h=rP(m);for(;h&&a&&p!==m;){let x=nx(h),g=h.getBoundingClientRect(),y=Al(h),b=g.left+(h.clientLeft+parseFloat(y.paddingLeft))*x.x,S=g.top+(h.clientTop+parseFloat(y.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,d*=x.y,l+=b,c+=S,m=oo(h),h=rP(m)}}return rh({width:u,height:d,x:l,y:c})}function aP(e,t){let r=DS(e).scrollLeft;return t?t.left+r:ih(ac(e)).left+r}function JW(e,t){let r=e.getBoundingClientRect(),a=r.left+t.scrollLeft-aP(e,r),n=r.top+t.scrollTop;return{x:a,y:n}}function MVe(e){let{elements:t,rect:r,offsetParent:a,strategy:n}=e,s=n==="fixed",i=ac(a),o=t?MS(t.floating):!1;if(a===i||o&&s)return r;let l={scrollLeft:0,scrollTop:0},c=tc(1),u=tc(0),d=nc(a);if((d||!d&&!s)&&((nh(a)!=="body"||ax(i))&&(l=DS(a)),nc(a))){let p=ih(a);c=nx(a),u.x=p.x+a.clientLeft,u.y=p.y+a.clientTop}let f=i&&!d&&!s?JW(i,l):tc(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:r.y*c.y-l.scrollTop*c.y+u.y+f.y}}function DVe(e){return Array.from(e.getClientRects())}function _Ve(e){let t=ac(e),r=DS(e),a=e.ownerDocument.body,n=Ei(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),s=Ei(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight),i=-r.scrollLeft+aP(e),o=-r.scrollTop;return Al(a).direction==="rtl"&&(i+=Ei(t.clientWidth,a.clientWidth)-n),{width:n,height:s,x:i,y:o}}var GW=25;function OVe(e,t){let r=oo(e),a=ac(e),n=r.visualViewport,s=a.clientWidth,i=a.clientHeight,o=0,l=0;if(n){s=n.width,i=n.height;let u=tP();(!u||u&&t==="fixed")&&(o=n.offsetLeft,l=n.offsetTop)}let c=aP(a);if(c<=0){let u=a.ownerDocument,d=u.body,f=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,m=Math.abs(a.clientWidth-d.clientWidth-p);m<=GW&&(s-=m)}else c<=GW&&(s+=c);return{width:s,height:i,x:o,y:l}}var FVe=new Set(["absolute","fixed"]);function BVe(e,t){let r=ih(e,!0,t==="fixed"),a=r.top+e.clientTop,n=r.left+e.clientLeft,s=nc(e)?nx(e):tc(1),i=e.clientWidth*s.x,o=e.clientHeight*s.y,l=n*s.x,c=a*s.y;return{width:i,height:o,x:l,y:c}}function KW(e,t,r){let a;if(t==="viewport")a=OVe(e,r);else if(t==="document")a=_Ve(ac(e));else if(Pl(t))a=BVe(t,r);else{let n=YW(e);a={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return rh(a)}function QW(e,t){let r=od(e);return r===t||!Pl(r)||sh(r)?!1:Al(r).position==="fixed"||QW(r,t)}function UVe(e,t){let r=t.get(e);if(r)return r;let a=ah(e,[],!1).filter(o=>Pl(o)&&nh(o)!=="body"),n=null,s=Al(e).position==="fixed",i=s?od(e):e;for(;Pl(i)&&!sh(i);){let o=Al(i),l=eP(i);!l&&o.position==="fixed"&&(n=null),(s?!l&&!n:!l&&o.position==="static"&&!!n&&FVe.has(n.position)||ax(i)&&!l&&QW(e,i))?a=a.filter(u=>u!==i):n=o,i=od(i)}return t.set(e,a),a}function jVe(e){let{element:t,boundary:r,rootBoundary:a,strategy:n}=e,i=[...r==="clippingAncestors"?MS(t)?[]:UVe(t,this._c):[].concat(r),a],o=i[0],l=i.reduce((c,u)=>{let d=KW(t,u,n);return c.top=Ei(d.top,c.top),c.right=eu(d.right,c.right),c.bottom=eu(d.bottom,c.bottom),c.left=Ei(d.left,c.left),c},KW(t,o,n));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function zVe(e){let{width:t,height:r}=XW(e);return{width:t,height:r}}function VVe(e,t,r){let a=nc(t),n=ac(t),s=r==="fixed",i=ih(e,!0,s,t),o={scrollLeft:0,scrollTop:0},l=tc(0);function c(){l.x=aP(n)}if(a||!a&&!s)if((nh(t)!=="body"||ax(n))&&(o=DS(t)),a){let p=ih(t,!0,s,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else n&&c();s&&!a&&n&&c();let u=n&&!a&&!s?JW(n,o):tc(0),d=i.left+o.scrollLeft-l.x-u.x,f=i.top+o.scrollTop-l.y-u.y;return{x:d,y:f,width:i.width,height:i.height}}function B_(e){return Al(e).position==="static"}function WW(e,t){if(!nc(e)||Al(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ac(e)===r&&(r=r.ownerDocument.body),r}function ZW(e,t){let r=oo(e);if(MS(e))return r;if(!nc(e)){let n=od(e);for(;n&&!sh(n);){if(Pl(n)&&!B_(n))return n;n=od(n)}return r}let a=WW(e,t);for(;a&&qW(a)&&B_(a);)a=WW(a,t);return a&&sh(a)&&B_(a)&&!eP(a)?r:a||HW(e)||r}var qVe=async function(e){let t=this.getOffsetParent||ZW,r=this.getDimensions,a=await r(e.floating);return{reference:VVe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function HVe(e){return Al(e).direction==="rtl"}var eX={convertOffsetParentRelativeRectToViewportRelativeRect:MVe,getDocumentElement:ac,getClippingRect:jVe,getOffsetParent:ZW,getElementRects:qVe,getClientRects:DVe,getDimensions:zVe,getScale:nx,isElement:Pl,isRTL:HVe};function tX(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $Ve(e,t){let r=null,a,n=ac(e);function s(){var o;clearTimeout(a),(o=r)==null||o.disconnect(),r=null}function i(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),s();let c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(o||t(),!f||!p)return;let m=kS(d),h=kS(n.clientWidth-(u+f)),x=kS(n.clientHeight-(d+p)),g=kS(u),b={rootMargin:-m+"px "+-h+"px "+-x+"px "+-g+"px",threshold:Ei(0,eu(1,l))||1},S=!0;function w(P){let C=P[0].intersectionRatio;if(C!==l){if(!S)return i();C?i(!1,C):a=setTimeout(()=>{i(!1,1e-7)},1e3)}C===1&&!tX(c,e.getBoundingClientRect())&&i(),S=!1}try{r=new IntersectionObserver(w,{...b,root:n.ownerDocument})}catch{r=new IntersectionObserver(w,b)}r.observe(e)}return i(!0),s}function j_(e,t,r,a){a===void 0&&(a={});let{ancestorScroll:n=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=a,c=U_(e),u=n||s?[...c?ah(c):[],...ah(t)]:[];u.forEach(g=>{n&&g.addEventListener("scroll",r,{passive:!0}),s&&g.addEventListener("resize",r)});let d=c&&o?$Ve(c,r):null,f=-1,p=null;i&&(p=new ResizeObserver(g=>{let[y]=g;y&&y.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),r()}),c&&!l&&p.observe(c),p.observe(t));let m,h=l?ih(e):null;l&&x();function x(){let g=ih(e);h&&!tX(h,g)&&r(),h=g,m=requestAnimationFrame(x)}return r(),()=>{var g;u.forEach(y=>{n&&y.removeEventListener("scroll",r),s&&y.removeEventListener("resize",r)}),d?.(),(g=p)==null||g.disconnect(),p=null,l&&cancelAnimationFrame(m)}}var rX=FW;var aX=BW,nX=DW,sX=jW,iX=_W,z_=MW;var oX=UW,V_=(e,t,r)=>{let a=new Map,n={platform:eX,...r},s={...n.platform,_c:a};return kW(e,t,{...n,platform:s})};var Bn=N(Le(),1),cX=N(Le(),1),uX=N(ff(),1),GVe=typeof document<"u",KVe=function(){},nP=GVe?cX.useLayoutEffect:KVe;function sP(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,a,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(a=r;a--!==0;)if(!sP(e[a],t[a]))return!1;return!0}if(n=Object.keys(e),r=n.length,r!==Object.keys(t).length)return!1;for(a=r;a--!==0;)if(!{}.hasOwnProperty.call(t,n[a]))return!1;for(a=r;a--!==0;){let s=n[a];if(!(s==="_owner"&&e.$$typeof)&&!sP(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function dX(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lX(e,t){let r=dX(e);return Math.round(t*r)/r}function q_(e){let t=Bn.useRef(e);return nP(()=>{t.current=e}),t}function fX(e){e===void 0&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:a=[],platform:n,elements:{reference:s,floating:i}={},transform:o=!0,whileElementsMounted:l,open:c}=e,[u,d]=Bn.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=Bn.useState(a);sP(f,a)||p(a);let[m,h]=Bn.useState(null),[x,g]=Bn.useState(null),y=Bn.useCallback(L=>{L!==P.current&&(P.current=L,h(L))},[]),b=Bn.useCallback(L=>{L!==C.current&&(C.current=L,g(L))},[]),S=s||m,w=i||x,P=Bn.useRef(null),C=Bn.useRef(null),I=Bn.useRef(u),R=l!=null,O=q_(l),D=q_(n),W=q_(c),J=Bn.useCallback(()=>{if(!P.current||!C.current)return;let L={placement:t,strategy:r,middleware:f};D.current&&(L.platform=D.current),V_(P.current,C.current,L).then(k=>{let _={...k,isPositioned:W.current!==!1};me.current&&!sP(I.current,_)&&(I.current=_,uX.flushSync(()=>{d(_)}))})},[f,t,r,D,W]);nP(()=>{c===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,d(L=>({...L,isPositioned:!1})))},[c]);let me=Bn.useRef(!1);nP(()=>(me.current=!0,()=>{me.current=!1}),[]),nP(()=>{if(S&&(P.current=S),w&&(C.current=w),S&&w){if(O.current)return O.current(S,w,J);J()}},[S,w,J,O,R]);let Z=Bn.useMemo(()=>({reference:P,floating:C,setReference:y,setFloating:b}),[y,b]),q=Bn.useMemo(()=>({reference:S,floating:w}),[S,w]),V=Bn.useMemo(()=>{let L={position:r,left:0,top:0};if(!q.floating)return L;let k=lX(q.floating,u.x),_=lX(q.floating,u.y);return o?{...L,transform:"translate("+k+"px, "+_+"px)",...dX(q.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:k,top:_}},[r,o,q.floating,u.x,u.y]);return Bn.useMemo(()=>({...u,update:J,refs:Z,elements:q,floatingStyles:V}),[u,J,Z,q,V])}var WVe=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){let{element:a,padding:n}=typeof e=="function"?e(r):e;return a&&t(a)?a.current!=null?z_({element:a.current,padding:n}).fn(r):{}:a?z_({element:a,padding:n}).fn(r):{}}}},pX=(e,t)=>({...rX(e),options:[e,t]}),mX=(e,t)=>({...aX(e),options:[e,t]}),hX=(e,t)=>({...oX(e),options:[e,t]}),gX=(e,t)=>({...nX(e),options:[e,t]}),yX=(e,t)=>({...sX(e),options:[e,t]});var xX=(e,t)=>({...iX(e),options:[e,t]});var bX=(e,t)=>({...WVe(e),options:[e,t]});var vX=N(Le(),1);var H_=N(ce(),1),XVe="Arrow",SX=vX.forwardRef((e,t)=>{let{children:r,width:a=10,height:n=5,...s}=e;return(0,H_.jsx)(lt.svg,{...s,ref:t,width:a,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,H_.jsx)("polygon",{points:"0,0 30,0 15,10"})})});SX.displayName=XVe;var TX=SX;var sx=N(Le(),1);function Aa(e){let t=sx.useRef(e);return sx.useEffect(()=>{t.current=e}),sx.useMemo(()=>(...r)=>t.current?.(...r),[])}var rp=N(ce(),1);var $_="Popper",[wX,ld]=Pa($_),[JVe,CX]=wX($_),EX=e=>{let{__scopePopper:t,children:r}=e,[a,n]=lo.useState(null);return(0,rp.jsx)(JVe,{scope:t,anchor:a,onAnchorChange:n,children:r})};EX.displayName=$_;var PX="PopperAnchor",AX=lo.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:a,...n}=e,s=CX(PX,r),i=lo.useRef(null),o=Ht(t,i),l=lo.useRef(null);return lo.useEffect(()=>{let c=l.current;l.current=a?.current||i.current,c!==l.current&&s.onAnchorChange(l.current)}),a?null:(0,rp.jsx)(lt.div,{...n,ref:o})});AX.displayName=PX;var G_="PopperContent",[QVe,ZVe]=wX(G_),IX=lo.forwardRef((e,t)=>{let{__scopePopper:r,side:a="bottom",sideOffset:n=0,align:s="center",alignOffset:i=0,arrowPadding:o=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:m,...h}=e,x=CX(G_,r),[g,y]=lo.useState(null),b=Ht(t,A=>y(A)),[S,w]=lo.useState(null),P=UE(S),C=P?.width??0,I=P?.height??0,R=a+(s!=="center"?"-"+s:""),O=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(c)?c:[c],W=D.length>0,J={padding:O,boundary:D.filter(t9e),altBoundary:W},{refs:me,floatingStyles:Z,placement:q,isPositioned:V,middlewareData:L}=fX({strategy:"fixed",placement:R,whileElementsMounted:(...A)=>j_(...A,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[pX({mainAxis:n+I,alignmentAxis:i}),l&&mX({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?hX():void 0,...J}),l&&gX({...J}),yX({...J,apply:({elements:A,rects:K,availableWidth:he,availableHeight:H})=>{let{width:xe,height:Pe}=K.reference,Ie=A.floating.style;Ie.setProperty("--radix-popper-available-width",`${he}px`),Ie.setProperty("--radix-popper-available-height",`${H}px`),Ie.setProperty("--radix-popper-anchor-width",`${xe}px`),Ie.setProperty("--radix-popper-anchor-height",`${Pe}px`)}}),S&&bX({element:S,padding:o}),r9e({arrowWidth:C,arrowHeight:I}),f&&xX({strategy:"referenceHidden",...J})]}),[k,_]=RX(q),ee=Aa(m);ya(()=>{V&&ee?.()},[V,ee]);let ie=L.arrow?.x,ae=L.arrow?.y,ge=L.arrow?.centerOffset!==0,[ue,$]=lo.useState();return ya(()=>{g&&$(window.getComputedStyle(g).zIndex)},[g]),(0,rp.jsx)("div",{ref:me.setFloating,"data-radix-popper-content-wrapper":"",style:{...Z,transform:V?Z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ue,["--radix-popper-transform-origin"]:[L.transformOrigin?.x,L.transformOrigin?.y].join(" "),...L.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,rp.jsx)(QVe,{scope:r,placedSide:k,onArrowChange:w,arrowX:ie,arrowY:ae,shouldHideArrow:ge,children:(0,rp.jsx)(lt.div,{"data-side":k,"data-align":_,...h,ref:b,style:{...h.style,animation:V?void 0:"none"}})})})});IX.displayName=G_;var NX="PopperArrow",e9e={top:"bottom",right:"left",bottom:"top",left:"right"},LX=lo.forwardRef(function(t,r){let{__scopePopper:a,...n}=t,s=ZVe(NX,a),i=e9e[s.placedSide];return(0,rp.jsx)("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:(0,rp.jsx)(TX,{...n,ref:r,style:{...n.style,display:"block"}})})});LX.displayName=NX;function t9e(e){return e!==null}var r9e=e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:a,middlewareData:n}=t,i=n.arrow?.centerOffset!==0,o=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[c,u]=RX(r),d={start:"0%",center:"50%",end:"100%"}[u],f=(n.arrow?.x??0)+o/2,p=(n.arrow?.y??0)+l/2,m="",h="";return c==="bottom"?(m=i?d:`${f}px`,h=`${-l}px`):c==="top"?(m=i?d:`${f}px`,h=`${a.floating.height+l}px`):c==="right"?(m=`${-l}px`,h=i?d:`${p}px`):c==="left"&&(m=`${a.floating.width+l}px`,h=i?d:`${p}px`),{data:{x:m,y:h}}}});function RX(e){let[t,r="center"]=e.split("-");return[t,r]}var oh=EX,ix=AX,ox=IX,lx=LX;var iP=N(Le(),1),kX=N(ff(),1);var MX=N(ce(),1),a9e="Portal",cd=iP.forwardRef((e,t)=>{let{container:r,...a}=e,[n,s]=iP.useState(!1);ya(()=>s(!0),[]);let i=r||n&&globalThis?.document?.body;return i?kX.default.createPortal((0,MX.jsx)(lt.div,{...a,ref:t}),i):null});cd.displayName=a9e;var rn=N(Le(),1);var DX=N(Le(),1);function _X(e,t=globalThis?.document){let r=Aa(e);DX.useEffect(()=>{let a=n=>{n.key==="Escape"&&r(n)};return t.addEventListener("keydown",a,{capture:!0}),()=>t.removeEventListener("keydown",a,{capture:!0})},[r,t])}var X_=N(ce(),1),n9e="DismissableLayer",W_="dismissableLayer.update",s9e="dismissableLayer.pointerDownOutside",i9e="dismissableLayer.focusOutside",OX,BX=rn.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ud=rn.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:a,onPointerDownOutside:n,onFocusOutside:s,onInteractOutside:i,onDismiss:o,...l}=e,c=rn.useContext(BX),[u,d]=rn.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=rn.useState({}),m=Ht(t,C=>d(C)),h=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),g=h.indexOf(x),y=u?h.indexOf(u):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,S=y>=g,w=c9e(C=>{let I=C.target,R=[...c.branches].some(O=>O.contains(I));!S||R||(n?.(C),i?.(C),C.defaultPrevented||o?.())},f),P=u9e(C=>{let I=C.target;[...c.branches].some(O=>O.contains(I))||(s?.(C),i?.(C),C.defaultPrevented||o?.())},f);return _X(C=>{y===c.layers.size-1&&(a?.(C),!C.defaultPrevented&&o&&(C.preventDefault(),o()))},f),rn.useEffect(()=>{if(u)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(OX=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),FX(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=OX)}},[u,f,r,c]),rn.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),FX())},[u,c]),rn.useEffect(()=>{let C=()=>p({});return document.addEventListener(W_,C),()=>document.removeEventListener(W_,C)},[]),(0,X_.jsx)(lt.div,{...l,ref:m,style:{pointerEvents:b?S?"auto":"none":void 0,...e.style},onFocusCapture:Ye(e.onFocusCapture,P.onFocusCapture),onBlurCapture:Ye(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:Ye(e.onPointerDownCapture,w.onPointerDownCapture)})});ud.displayName=n9e;var o9e="DismissableLayerBranch",l9e=rn.forwardRef((e,t)=>{let r=rn.useContext(BX),a=rn.useRef(null),n=Ht(t,a);return rn.useEffect(()=>{let s=a.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),(0,X_.jsx)(lt.div,{...e,ref:n})});l9e.displayName=o9e;function c9e(e,t=globalThis?.document){let r=Aa(e),a=rn.useRef(!1),n=rn.useRef(()=>{});return rn.useEffect(()=>{let s=o=>{if(o.target&&!a.current){let c=function(){UX(s9e,r,u,{discrete:!0})};var l=c;let u={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",n.current),n.current=c,t.addEventListener("click",n.current,{once:!0})):c()}else t.removeEventListener("click",n.current);a.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",n.current)}},[t,r]),{onPointerDownCapture:()=>a.current=!0}}function u9e(e,t=globalThis?.document){let r=Aa(e),a=rn.useRef(!1);return rn.useEffect(()=>{let n=s=>{s.target&&!a.current&&UX(i9e,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",n),()=>t.removeEventListener("focusin",n)},[t,r]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function FX(){let e=new CustomEvent(W_);document.dispatchEvent(e)}function UX(e,t,r,{discrete:a}){let n=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),a?_E(n,s):n.dispatchEvent(s)}var d9e=N(ce());var jX=N(ce());function Qe({className:e,type:t,...r}){return(0,jX.jsx)("input",{type:t,"data-slot":"input",className:oe("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-8 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r})}var zX=N(Le(),1);var VX=N(ce(),1),f9e="Label",qX=zX.forwardRef((e,t)=>(0,VX.jsx)(lt.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));qX.displayName=f9e;var HX=qX;var $X=N(ce());function Vr({className:e,...t}){return(0,$X.jsx)(HX,{"data-slot":"label",className:oe("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}var Y_=N(Le(),1);var oP=N(ce(),1),J_="Progress",m9e=100,[h9e,N0t]=Pa(J_),[g9e,y9e]=h9e(J_),WX=Y_.forwardRef((e,t)=>{let{__scopeProgress:r,value:a=null,max:n,getValueLabel:s=x9e,...i}=e;(n||n===0)&&GX(n);let o=GX(n)?n:m9e;a!==null&&KX(a,o);let l=KX(a,o)?a:null,c=lP(l)?s(l,o):void 0;return(0,oP.jsx)(g9e,{scope:r,value:l,max:o,children:(0,oP.jsx)(lt.div,{"aria-valuemax":o,"aria-valuemin":0,"aria-valuenow":lP(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":JX(l,o),"data-value":l??void 0,"data-max":o,...i,ref:t})})});WX.displayName=J_;var XX="ProgressIndicator",YX=Y_.forwardRef((e,t)=>{let{__scopeProgress:r,...a}=e,n=y9e(XX,r);return(0,oP.jsx)(lt.div,{"data-state":JX(n.value,n.max),"data-value":n.value??void 0,"data-max":n.max,...a,ref:t})});YX.displayName=XX;function x9e(e,t){return`${Math.round(e/t*100)}%`}function JX(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function lP(e){return typeof e=="number"}function GX(e){return lP(e)&&!isNaN(e)&&e>0}function KX(e,t){return lP(e)&&!isNaN(e)&&e<=t&&e>=0}var QX=WX,ZX=YX;var Q_=N(ce());function ap({className:e,value:t,...r}){return(0,Q_.jsx)(QX,{"data-slot":"progress",className:oe("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",e),...r,children:(0,Q_.jsx)(ZX,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})})}var _t=N(Le(),1);var cP=N(Le(),1),v9e=N(ce(),1),S9e=cP.createContext(void 0);function au(e){let t=cP.useContext(S9e);return e||t||"ltr"}function _S(e,[t,r]){return Math.min(r,Math.max(t,e))}var tY=N(Le(),1),aa=N(ce(),1);function T9e(e,t){return tY.useReducer((r,a)=>t[r][a]??r,e)}var Z_="ScrollArea",[rY,q0t]=Pa(Z_),[w9e,Il]=rY(Z_),aY=_t.forwardRef((e,t)=>{let{__scopeScrollArea:r,type:a="hover",dir:n,scrollHideDelay:s=600,...i}=e,[o,l]=_t.useState(null),[c,u]=_t.useState(null),[d,f]=_t.useState(null),[p,m]=_t.useState(null),[h,x]=_t.useState(null),[g,y]=_t.useState(0),[b,S]=_t.useState(0),[w,P]=_t.useState(!1),[C,I]=_t.useState(!1),R=Ht(t,D=>l(D)),O=au(n);return(0,aa.jsx)(w9e,{scope:r,type:a,dir:O,scrollHideDelay:s,scrollArea:o,viewport:c,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:w,onScrollbarXEnabledChange:P,scrollbarY:h,onScrollbarYChange:x,scrollbarYEnabled:C,onScrollbarYEnabledChange:I,onCornerWidthChange:y,onCornerHeightChange:S,children:(0,aa.jsx)(lt.div,{dir:O,...i,ref:R,style:{position:"relative",["--radix-scroll-area-corner-width"]:g+"px",["--radix-scroll-area-corner-height"]:b+"px",...e.style}})})});aY.displayName=Z_;var nY="ScrollAreaViewport",sY=_t.forwardRef((e,t)=>{let{__scopeScrollArea:r,children:a,nonce:n,...s}=e,i=Il(nY,r),o=_t.useRef(null),l=Ht(t,o,i.onViewportChange);return(0,aa.jsxs)(aa.Fragment,{children:[(0,aa.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),(0,aa.jsx)(lt.div,{"data-radix-scroll-area-viewport":"",...s,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,aa.jsx)("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:a})})]})});sY.displayName=nY;var nu="ScrollAreaScrollbar",eO=_t.forwardRef((e,t)=>{let{forceMount:r,...a}=e,n=Il(nu,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:i}=n,o=e.orientation==="horizontal";return _t.useEffect(()=>(o?s(!0):i(!0),()=>{o?s(!1):i(!1)}),[o,s,i]),n.type==="hover"?(0,aa.jsx)(C9e,{...a,ref:t,forceMount:r}):n.type==="scroll"?(0,aa.jsx)(E9e,{...a,ref:t,forceMount:r}):n.type==="auto"?(0,aa.jsx)(iY,{...a,ref:t,forceMount:r}):n.type==="always"?(0,aa.jsx)(tO,{...a,ref:t}):null});eO.displayName=nu;var C9e=_t.forwardRef((e,t)=>{let{forceMount:r,...a}=e,n=Il(nu,e.__scopeScrollArea),[s,i]=_t.useState(!1);return _t.useEffect(()=>{let o=n.scrollArea,l=0;if(o){let c=()=>{window.clearTimeout(l),i(!0)},u=()=>{l=window.setTimeout(()=>i(!1),n.scrollHideDelay)};return o.addEventListener("pointerenter",c),o.addEventListener("pointerleave",u),()=>{window.clearTimeout(l),o.removeEventListener("pointerenter",c),o.removeEventListener("pointerleave",u)}}},[n.scrollArea,n.scrollHideDelay]),(0,aa.jsx)($a,{present:r||s,children:(0,aa.jsx)(iY,{"data-state":s?"visible":"hidden",...a,ref:t})})}),E9e=_t.forwardRef((e,t)=>{let{forceMount:r,...a}=e,n=Il(nu,e.__scopeScrollArea),s=e.orientation==="horizontal",i=pP(()=>l("SCROLL_END"),100),[o,l]=T9e("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return _t.useEffect(()=>{if(o==="idle"){let c=window.setTimeout(()=>l("HIDE"),n.scrollHideDelay);return()=>window.clearTimeout(c)}},[o,n.scrollHideDelay,l]),_t.useEffect(()=>{let c=n.viewport,u=s?"scrollLeft":"scrollTop";if(c){let d=c[u],f=()=>{let p=c[u];d!==p&&(l("SCROLL"),i()),d=p};return c.addEventListener("scroll",f),()=>c.removeEventListener("scroll",f)}},[n.viewport,s,l,i]),(0,aa.jsx)($a,{present:r||o!=="hidden",children:(0,aa.jsx)(tO,{"data-state":o==="hidden"?"hidden":"visible",...a,ref:t,onPointerEnter:Ye(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Ye(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),iY=_t.forwardRef((e,t)=>{let r=Il(nu,e.__scopeScrollArea),{forceMount:a,...n}=e,[s,i]=_t.useState(!1),o=e.orientation==="horizontal",l=pP(()=>{if(r.viewport){let c=r.viewport.offsetWidth<r.viewport.scrollWidth,u=r.viewport.offsetHeight<r.viewport.scrollHeight;i(o?c:u)}},10);return cx(r.viewport,l),cx(r.content,l),(0,aa.jsx)($a,{present:a||s,children:(0,aa.jsx)(tO,{"data-state":s?"visible":"hidden",...n,ref:t})})}),tO=_t.forwardRef((e,t)=>{let{orientation:r="vertical",...a}=e,n=Il(nu,e.__scopeScrollArea),s=_t.useRef(null),i=_t.useRef(0),[o,l]=_t.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=uY(o.viewport,o.content),u={...a,sizes:o,onSizesChange:l,hasThumb:Boolean(c>0&&c<1),onThumbChange:f=>s.current=f,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:f=>i.current=f};function d(f,p){return R9e(f,i.current,o,p)}return r==="horizontal"?(0,aa.jsx)(P9e,{...u,ref:t,onThumbPositionChange:()=>{if(n.viewport&&s.current){let f=n.viewport.scrollLeft,p=eY(f,o,n.dir);s.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:f=>{n.viewport&&(n.viewport.scrollLeft=f)},onDragScroll:f=>{n.viewport&&(n.viewport.scrollLeft=d(f,n.dir))}}):r==="vertical"?(0,aa.jsx)(A9e,{...u,ref:t,onThumbPositionChange:()=>{if(n.viewport&&s.current){let f=n.viewport.scrollTop,p=eY(f,o);s.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:f=>{n.viewport&&(n.viewport.scrollTop=f)},onDragScroll:f=>{n.viewport&&(n.viewport.scrollTop=d(f))}}):null}),P9e=_t.forwardRef((e,t)=>{let{sizes:r,onSizesChange:a,...n}=e,s=Il(nu,e.__scopeScrollArea),[i,o]=_t.useState(),l=_t.useRef(null),c=Ht(t,l,s.onScrollbarXChange);return _t.useEffect(()=>{l.current&&o(getComputedStyle(l.current))},[l]),(0,aa.jsx)(lY,{"data-orientation":"horizontal",...n,ref:c,sizes:r,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,["--radix-scroll-area-thumb-width"]:fP(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,d)=>{if(s.viewport){let f=s.viewport.scrollLeft+u.deltaX;e.onWheelScroll(f),fY(f,d)&&u.preventDefault()}},onResize:()=>{l.current&&s.viewport&&i&&a({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:dP(i.paddingLeft),paddingEnd:dP(i.paddingRight)}})}})}),A9e=_t.forwardRef((e,t)=>{let{sizes:r,onSizesChange:a,...n}=e,s=Il(nu,e.__scopeScrollArea),[i,o]=_t.useState(),l=_t.useRef(null),c=Ht(t,l,s.onScrollbarYChange);return _t.useEffect(()=>{l.current&&o(getComputedStyle(l.current))},[l]),(0,aa.jsx)(lY,{"data-orientation":"vertical",...n,ref:c,sizes:r,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)",["--radix-scroll-area-thumb-height"]:fP(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,d)=>{if(s.viewport){let f=s.viewport.scrollTop+u.deltaY;e.onWheelScroll(f),fY(f,d)&&u.preventDefault()}},onResize:()=>{l.current&&s.viewport&&i&&a({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:dP(i.paddingTop),paddingEnd:dP(i.paddingBottom)}})}})}),[I9e,oY]=rY(nu),lY=_t.forwardRef((e,t)=>{let{__scopeScrollArea:r,sizes:a,hasThumb:n,onThumbChange:s,onThumbPointerUp:i,onThumbPointerDown:o,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:d,...f}=e,p=Il(nu,r),[m,h]=_t.useState(null),x=Ht(t,R=>h(R)),g=_t.useRef(null),y=_t.useRef(""),b=p.viewport,S=a.content-a.viewport,w=Aa(u),P=Aa(l),C=pP(d,10);function I(R){if(g.current){let O=R.clientX-g.current.left,D=R.clientY-g.current.top;c({x:O,y:D})}}return _t.useEffect(()=>{let R=O=>{let D=O.target;m?.contains(D)&&w(O,S)};return document.addEventListener("wheel",R,{passive:!1}),()=>document.removeEventListener("wheel",R,{passive:!1})},[b,m,S,w]),_t.useEffect(P,[a,P]),cx(m,C),cx(p.content,C),(0,aa.jsx)(I9e,{scope:r,scrollbar:m,hasThumb:n,onThumbChange:Aa(s),onThumbPointerUp:Aa(i),onThumbPositionChange:P,onThumbPointerDown:Aa(o),children:(0,aa.jsx)(lt.div,{...f,ref:x,style:{position:"absolute",...f.style},onPointerDown:Ye(e.onPointerDown,R=>{R.button===0&&(R.target.setPointerCapture(R.pointerId),g.current=m.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),I(R))}),onPointerMove:Ye(e.onPointerMove,I),onPointerUp:Ye(e.onPointerUp,R=>{let O=R.target;O.hasPointerCapture(R.pointerId)&&O.releasePointerCapture(R.pointerId),document.body.style.webkitUserSelect=y.current,p.viewport&&(p.viewport.style.scrollBehavior=""),g.current=null})})})}),uP="ScrollAreaThumb",rO=_t.forwardRef((e,t)=>{let{forceMount:r,...a}=e,n=oY(uP,e.__scopeScrollArea);return(0,aa.jsx)($a,{present:r||n.hasThumb,children:(0,aa.jsx)(N9e,{ref:t,...a})})}),N9e=_t.forwardRef((e,t)=>{let{__scopeScrollArea:r,style:a,...n}=e,s=Il(uP,r),i=oY(uP,r),{onThumbPositionChange:o}=i,l=Ht(t,d=>i.onThumbChange(d)),c=_t.useRef(void 0),u=pP(()=>{c.current&&(c.current(),c.current=void 0)},100);return _t.useEffect(()=>{let d=s.viewport;if(d){let f=()=>{if(u(),!c.current){let p=k9e(d,o);c.current=p,o()}};return o(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[s.viewport,u,o]),(0,aa.jsx)(lt.div,{"data-state":i.hasThumb?"visible":"hidden",...n,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...a},onPointerDownCapture:Ye(e.onPointerDownCapture,d=>{let p=d.target.getBoundingClientRect(),m=d.clientX-p.left,h=d.clientY-p.top;i.onThumbPointerDown({x:m,y:h})}),onPointerUp:Ye(e.onPointerUp,i.onThumbPointerUp)})});rO.displayName=uP;var aO="ScrollAreaCorner",cY=_t.forwardRef((e,t)=>{let r=Il(aO,e.__scopeScrollArea),a=Boolean(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&a?(0,aa.jsx)(L9e,{...e,ref:t}):null});cY.displayName=aO;var L9e=_t.forwardRef((e,t)=>{let{__scopeScrollArea:r,...a}=e,n=Il(aO,r),[s,i]=_t.useState(0),[o,l]=_t.useState(0),c=Boolean(s&&o);return cx(n.scrollbarX,()=>{let u=n.scrollbarX?.offsetHeight||0;n.onCornerHeightChange(u),l(u)}),cx(n.scrollbarY,()=>{let u=n.scrollbarY?.offsetWidth||0;n.onCornerWidthChange(u),i(u)}),c?(0,aa.jsx)(lt.div,{...a,ref:t,style:{width:s,height:o,position:"absolute",right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function dP(e){return e?parseInt(e,10):0}function uY(e,t){let r=e/t;return isNaN(r)?0:r}function fP(e){let t=uY(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,a=(e.scrollbar.size-r)*t;return Math.max(a,18)}function R9e(e,t,r,a="ltr"){let n=fP(r),s=n/2,i=t||s,o=n-i,l=r.scrollbar.paddingStart+i,c=r.scrollbar.size-r.scrollbar.paddingEnd-o,u=r.content-r.viewport,d=a==="ltr"?[0,u]:[u*-1,0];return dY([l,c],d)(e)}function eY(e,t,r="ltr"){let a=fP(t),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-n,i=t.content-t.viewport,o=s-a,l=r==="ltr"?[0,i]:[i*-1,0],c=_S(e,l);return dY([0,i],[0,o])(c)}function dY(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let a=(t[1]-t[0])/(e[1]-e[0]);return t[0]+a*(r-e[0])}}function fY(e,t){return e>0&&e<t}var k9e=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},a=0;return function n(){let s={left:e.scrollLeft,top:e.scrollTop},i=r.left!==s.left,o=r.top!==s.top;(i||o)&&t(),r=s,a=window.requestAnimationFrame(n)}(),()=>window.cancelAnimationFrame(a)};function pP(e,t){let r=Aa(e),a=_t.useRef(0);return _t.useEffect(()=>()=>window.clearTimeout(a.current),[]),_t.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(r,t)},[r,t])}function cx(e,t){let r=Aa(t);ya(()=>{let a=0;if(e){let n=new ResizeObserver(()=>{cancelAnimationFrame(a),a=window.requestAnimationFrame(r)});return n.observe(e),()=>{window.cancelAnimationFrame(a),n.unobserve(e)}}},[e,r])}var pY=aY,mY=sY;var hY=cY;var np=N(ce());function sr({className:e,children:t,viewportRef:r,...a}){return(0,np.jsxs)(pY,{"data-slot":"scroll-area",className:oe("relative",e),...a,children:[(0,np.jsx)(mY,{"data-slot":"scroll-area-viewport",ref:r,className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),(0,np.jsx)(D9e,{}),(0,np.jsx)(hY,{})]})}function D9e({className:e,orientation:t="vertical",...r}){return(0,np.jsx)(eO,{"data-slot":"scroll-area-scrollbar",orientation:t,className:oe("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...r,children:(0,np.jsx)(rO,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}var rt=N(Le(),1),LO=N(ff(),1);var sp=N(Le(),1);var os=N(Le(),1);var mP=N(ce(),1);function nO(e){let t=_9e(e),r=os.forwardRef((a,n)=>{let{children:s,...i}=a,o=os.Children.toArray(s),l=o.find(F9e);if(l){let c=l.props.children,u=o.map(d=>d===l?os.Children.count(c)>1?os.Children.only(null):os.isValidElement(c)?c.props.children:null:d);return(0,mP.jsx)(t,{...i,ref:n,children:os.isValidElement(c)?os.cloneElement(c,void 0,u):null})}return(0,mP.jsx)(t,{...i,ref:n,children:s})});return r.displayName=`${e}.Slot`,r}function _9e(e){let t=os.forwardRef((r,a)=>{let{children:n,...s}=r;if(os.isValidElement(n)){let i=U9e(n),o=B9e(s,n.props);return n.type!==os.Fragment&&(o.ref=a?Vs(a,i):i),os.cloneElement(n,o)}return os.Children.count(n)>1?os.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var O9e=Symbol("radix.slottable");function F9e(e){return os.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===O9e}function B9e(e,t){let r={...t};for(let a in t){let n=e[a],s=t[a];/^on[A-Z]/.test(a)?n&&s?r[a]=(...o)=>{let l=s(...o);return n(...o),l}:n&&(r[a]=n):a==="style"?r[a]={...n,...s}:a==="className"&&(r[a]=[n,s].filter(Boolean).join(" "))}return{...e,...r}}function U9e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var hP=N(ce(),1),j9e=N(Le(),1);var V9e=N(ce(),1);function ux(e){let t=e+"CollectionProvider",[r,a]=Pa(t),[n,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{let{scope:x,children:g}=h,y=sp.default.useRef(null),b=sp.default.useRef(new Map).current;return(0,hP.jsx)(n,{scope:x,itemMap:b,collectionRef:y,children:g})};i.displayName=t;let o=e+"CollectionSlot",l=nO(o),c=sp.default.forwardRef((h,x)=>{let{scope:g,children:y}=h,b=s(o,g),S=Ht(x,b.collectionRef);return(0,hP.jsx)(l,{ref:S,children:y})});c.displayName=o;let u=e+"CollectionItemSlot",d="data-radix-collection-item",f=nO(u),p=sp.default.forwardRef((h,x)=>{let{scope:g,children:y,...b}=h,S=sp.default.useRef(null),w=Ht(x,S),P=s(u,g);return sp.default.useEffect(()=>(P.itemMap.set(S,{ref:S,...b}),()=>void P.itemMap.delete(S))),(0,hP.jsx)(f,{[d]:"",ref:w,children:y})});p.displayName=u;function m(h){let x=s(e+"CollectionConsumer",h);return sp.default.useCallback(()=>{let y=x.collectionRef.current;if(!y)return[];let b=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((P,C)=>b.indexOf(P.ref.current)-b.indexOf(C.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:c,ItemSlot:p},m,a]}var gY=new WeakMap,Un,sc,J0t=(sc=class extends Map{constructor(r){super(r);f5(this,Un,void 0);SI(this,Un,[...super.keys()]),gY.set(this,!0)}set(r,a){return gY.get(this)&&(this.has(r)?Ys(this,Un)[Ys(this,Un).indexOf(r)]=r:Ys(this,Un).push(r)),super.set(r,a),this}insert(r,a,n){let s=this.has(a),i=Ys(this,Un).length,o=yY(r),l=o>=0?o:i+o,c=l<0||l>=i?-1:l;if(c===this.size||s&&c===this.size-1||c===-1)return this.set(a,n),this;let u=this.size+(s?0:1);o<0&&l++;let d=[...Ys(this,Un)],f,p=!1;for(let m=l;m<u;m++)if(l===m){let h=d[m];d[m]===a&&(h=d[m+1]),s&&this.delete(a),f=this.get(h),this.set(a,n)}else{!p&&d[m-1]===a&&(p=!0);let h=d[p?m:m-1],x=f;f=this.get(h),this.delete(h),this.set(h,x)}return this}with(r,a,n){let s=new sc(this);return s.insert(r,a,n),s}before(r){let a=Ys(this,Un).indexOf(r)-1;if(!(a<0))return this.entryAt(a)}setBefore(r,a,n){let s=Ys(this,Un).indexOf(r);return s===-1?this:this.insert(s,a,n)}after(r){let a=Ys(this,Un).indexOf(r);if(a=a===-1||a===this.size-1?-1:a+1,a!==-1)return this.entryAt(a)}setAfter(r,a,n){let s=Ys(this,Un).indexOf(r);return s===-1?this:this.insert(s+1,a,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return SI(this,Un,[]),super.clear()}delete(r){let a=super.delete(r);return a&&Ys(this,Un).splice(Ys(this,Un).indexOf(r),1),a}deleteAt(r){let a=this.keyAt(r);return a!==void 0?this.delete(a):!1}at(r){let a=sO(Ys(this,Un),r);if(a!==void 0)return this.get(a)}entryAt(r){let a=sO(Ys(this,Un),r);if(a!==void 0)return[a,this.get(a)]}indexOf(r){return Ys(this,Un).indexOf(r)}keyAt(r){return sO(Ys(this,Un),r)}from(r,a){let n=this.indexOf(r);if(n===-1)return;let s=n+a;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.at(s)}keyFrom(r,a){let n=this.indexOf(r);if(n===-1)return;let s=n+a;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.keyAt(s)}find(r,a){let n=0;for(let s of this){if(Reflect.apply(r,a,[s,n,this]))return s;n++}}findIndex(r,a){let n=0;for(let s of this){if(Reflect.apply(r,a,[s,n,this]))return n;n++}return-1}filter(r,a){let n=[],s=0;for(let i of this)Reflect.apply(r,a,[i,s,this])&&n.push(i),s++;return new sc(n)}map(r,a){let n=[],s=0;for(let i of this)n.push([i[0],Reflect.apply(r,a,[i,s,this])]),s++;return new sc(n)}reduce(...r){let[a,n]=r,s=0,i=n??this.at(0);for(let o of this)s===0&&r.length===1?i=o:i=Reflect.apply(a,this,[i,o,s,this]),s++;return i}reduceRight(...r){let[a,n]=r,s=n??this.at(-1);for(let i=this.size-1;i>=0;i--){let o=this.at(i);i===this.size-1&&r.length===1?s=o:s=Reflect.apply(a,this,[s,o,i,this])}return s}toSorted(r){let a=[...this.entries()].sort(r);return new sc(a)}toReversed(){let r=new sc;for(let a=this.size-1;a>=0;a--){let n=this.keyAt(a),s=this.get(n);r.set(n,s)}return r}toSpliced(...r){let a=[...this.entries()];return a.splice(...r),new sc(a)}slice(r,a){let n=new sc,s=this.size-1;if(r===void 0)return n;r<0&&(r=r+this.size),a!==void 0&&a>0&&(s=a-1);for(let i=r;i<=s;i++){let o=this.keyAt(i),l=this.get(o);n.set(o,l)}return n}every(r,a){let n=0;for(let s of this){if(!Reflect.apply(r,a,[s,n,this]))return!1;n++}return!0}some(r,a){let n=0;for(let s of this){if(Reflect.apply(r,a,[s,n,this]))return!0;n++}return!1}},Un=new WeakMap,sc);function sO(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let r=z9e(e,t);return r===-1?void 0:e[r]}function z9e(e,t){let r=e.length,a=yY(t),n=a>=0?a:r+a;return n<0||n>=r?-1:n}function yY(e){return e!==e||e===0?0:Math.trunc(e)}var bY=N(Le(),1),iO=0;function dx(){bY.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??xY()),document.body.insertAdjacentElement("beforeend",e[1]??xY()),iO++,()=>{iO===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),iO--}},[])}function xY(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Nl=N(Le(),1);var CY=N(ce(),1),oO="focusScope.autoFocusOnMount",lO="focusScope.autoFocusOnUnmount",vY={bubbles:!1,cancelable:!0},q9e="FocusScope",lh=Nl.forwardRef((e,t)=>{let{loop:r=!1,trapped:a=!1,onMountAutoFocus:n,onUnmountAutoFocus:s,...i}=e,[o,l]=Nl.useState(null),c=Aa(n),u=Aa(s),d=Nl.useRef(null),f=Ht(t,h=>l(h)),p=Nl.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;Nl.useEffect(()=>{if(a){let y=function(P){if(p.paused||!o)return;let C=P.target;o.contains(C)?d.current=C:ip(d.current,{select:!0})},b=function(P){if(p.paused||!o)return;let C=P.relatedTarget;C!==null&&(o.contains(C)||ip(d.current,{select:!0}))},S=function(P){if(document.activeElement===document.body)for(let I of P)I.removedNodes.length>0&&ip(o)};var h=y,x=b,g=S;document.addEventListener("focusin",y),document.addEventListener("focusout",b);let w=new MutationObserver(S);return o&&w.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",b),w.disconnect()}}},[a,o,p.paused]),Nl.useEffect(()=>{if(o){TY.add(p);let h=document.activeElement;if(!o.contains(h)){let g=new CustomEvent(oO,vY);o.addEventListener(oO,c),o.dispatchEvent(g),g.defaultPrevented||(H9e(X9e(EY(o)),{select:!0}),document.activeElement===h&&ip(o))}return()=>{o.removeEventListener(oO,c),setTimeout(()=>{let g=new CustomEvent(lO,vY);o.addEventListener(lO,u),o.dispatchEvent(g),g.defaultPrevented||ip(h??document.body,{select:!0}),o.removeEventListener(lO,u),TY.remove(p)},0)}}},[o,c,u,p]);let m=Nl.useCallback(h=>{if(!r&&!a||p.paused)return;let x=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,g=document.activeElement;if(x&&g){let y=h.currentTarget,[b,S]=$9e(y);b&&S?!h.shiftKey&&g===S?(h.preventDefault(),r&&ip(b,{select:!0})):h.shiftKey&&g===b&&(h.preventDefault(),r&&ip(S,{select:!0})):g===y&&h.preventDefault()}},[r,a,p.paused]);return(0,CY.jsx)(lt.div,{tabIndex:-1,...i,ref:f,onKeyDown:m})});lh.displayName=q9e;function H9e(e,{select:t=!1}={}){let r=document.activeElement;for(let a of e)if(ip(a,{select:t}),document.activeElement!==r)return}function $9e(e){let t=EY(e),r=SY(t,e),a=SY(t.reverse(),e);return[r,a]}function EY(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{let n=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||n?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function SY(e,t){for(let r of e)if(!G9e(r,{upTo:t}))return r}function G9e(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function K9e(e){return e instanceof HTMLInputElement&&"select"in e}function ip(e,{select:t=!1}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&K9e(e)&&t&&e.select()}}var TY=W9e();function W9e(){let e=[];return{add(t){let r=e[0];t!==r&&r?.pause(),e=wY(e,t),e.unshift(t)},remove(t){e=wY(e,t),e[0]?.resume()}}}function wY(e,t){let r=[...e],a=r.indexOf(t);return a!==-1&&r.splice(a,1),r}function X9e(e){return e.filter(t=>t.tagName!=="A")}var cO=N(Le(),1);var Y9e=cO[" useId ".trim().toString()]||(()=>{}),J9e=0;function pn(e){let[t,r]=cO.useState(Y9e());return ya(()=>{e||r(a=>a??String(J9e++))},[e]),e||(t?`radix-${t}`:"")}var ls=N(Le(),1);var gP=N(ce(),1);function PY(e){let t=Q9e(e),r=ls.forwardRef((a,n)=>{let{children:s,...i}=a,o=ls.Children.toArray(s),l=o.find(eqe);if(l){let c=l.props.children,u=o.map(d=>d===l?ls.Children.count(c)>1?ls.Children.only(null):ls.isValidElement(c)?c.props.children:null:d);return(0,gP.jsx)(t,{...i,ref:n,children:ls.isValidElement(c)?ls.cloneElement(c,void 0,u):null})}return(0,gP.jsx)(t,{...i,ref:n,children:s})});return r.displayName=`${e}.Slot`,r}function Q9e(e){let t=ls.forwardRef((r,a)=>{let{children:n,...s}=r;if(ls.isValidElement(n)){let i=rqe(n),o=tqe(s,n.props);return n.type!==ls.Fragment&&(o.ref=a?Vs(a,i):i),ls.cloneElement(n,o)}return ls.Children.count(n)>1?ls.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Z9e=Symbol("radix.slottable");function eqe(e){return ls.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Z9e}function tqe(e,t){let r={...t};for(let a in t){let n=e[a],s=t[a];/^on[A-Z]/.test(a)?n&&s?r[a]=(...o)=>{let l=s(...o);return n(...o),l}:n&&(r[a]=n):a==="style"?r[a]={...n,...s}:a==="className"&&(r[a]=[n,s].filter(Boolean).join(" "))}return{...e,...r}}function rqe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var AY=N(Le(),1);var IY=N(ce(),1),uO=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),aqe="VisuallyHidden",NY=AY.forwardRef((e,t)=>(0,IY.jsx)(lt.span,{...e,ref:t,style:{...uO,...e.style}}));NY.displayName=aqe;var LY=NY;var sqe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},fx=new WeakMap,yP=new WeakMap,xP={},dO=0,RY=function(e){return e&&(e.host||RY(e.parentNode))},iqe=function(e,t){return t.map(function(r){if(e.contains(r))return r;var a=RY(r);return a&&e.contains(a)?a:null}).filter(function(r){return Boolean(r)})},oqe=function(e,t,r,a){var n=iqe(t,Array.isArray(e)?e:[e]);xP[r]||(xP[r]=new WeakMap);var s=xP[r],i=[],o=new Set,l=new Set(n),c=function(d){!d||o.has(d)||(o.add(d),c(d.parentNode))};n.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(o.has(f))u(f);else try{var p=f.getAttribute(a),m=p!==null&&p!=="false",h=(fx.get(f)||0)+1,x=(s.get(f)||0)+1;fx.set(f,h),s.set(f,x),i.push(f),h===1&&m&&yP.set(f,!0),x===1&&f.setAttribute(r,"true"),m||f.setAttribute(a,"true")}catch{}})};return u(t),o.clear(),dO++,function(){i.forEach(function(d){var f=fx.get(d)-1,p=s.get(d)-1;fx.set(d,f),s.set(d,p),f||(yP.has(d)||d.removeAttribute(a),yP.delete(d)),p||d.removeAttribute(r)}),dO--,dO||(fx=new WeakMap,fx=new WeakMap,yP=new WeakMap,xP={})}},px=function(e,t,r){r===void 0&&(r="data-aria-hidden");var a=Array.from(Array.isArray(e)?e:[e]),n=t||sqe(e);return n?(a.push.apply(a,Array.from(n.querySelectorAll("[aria-live], script"))),oqe(a,n,r,"aria-hidden")):function(){return null}};var co=function(){return co=Object.assign||function(t){for(var r,a=1,n=arguments.length;a<n;a++){r=arguments[a];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},co.apply(this,arguments)};function bP(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r}function kY(e,t,r){if(r||arguments.length===2)for(var a=0,n=t.length,s;a<n;a++)(s||!(a in t))&&(s||(s=Array.prototype.slice.call(t,0,a)),s[a]=t[a]);return e.concat(s||Array.prototype.slice.call(t))}var CP=N(Le());var ri=N(Le());var ch="right-scroll-bar-position",uh="width-before-scroll-bar",fO="with-scroll-bars-hidden",pO="--removed-body-scroll-bar-size";function vP(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var MY=N(Le());function DY(e,t){var r=(0,MY.useState)(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(a){var n=r.value;n!==a&&(r.value=a,r.callback(a,n))}}}})[0];return r.callback=t,r.facade}var SP=N(Le());var lqe=typeof window<"u"?SP.useLayoutEffect:SP.useEffect,_Y=new WeakMap;function mO(e,t){var r=DY(t||null,function(a){return e.forEach(function(n){return vP(n,a)})});return lqe(function(){var a=_Y.get(r);if(a){var n=new Set(a),s=new Set(e),i=r.current;n.forEach(function(o){s.has(o)||vP(o,null)}),s.forEach(function(o){n.has(o)||vP(o,i)})}_Y.set(r,e)},[e]),r}function cqe(e){return e}function uqe(e,t){t===void 0&&(t=cqe);var r=[],a=!1,n={read:function(){if(a)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var i=t(s,a);return r.push(i),function(){r=r.filter(function(o){return o!==i})}},assignSyncMedium:function(s){for(a=!0;r.length;){var i=r;r=[],i.forEach(s)}r={push:function(o){return s(o)},filter:function(){return r}}},assignMedium:function(s){a=!0;var i=[];if(r.length){var o=r;r=[],o.forEach(s),i=r}var l=function(){var u=i;i=[],u.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(u){i.push(u),c()},filter:function(u){return i=i.filter(u),r}}}};return n}function hO(e){e===void 0&&(e={});var t=uqe(null);return t.options=co({async:!0,ssr:!1},e),t}var OY=N(Le()),FY=function(e){var t=e.sideCar,r=bP(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a=t.read();if(!a)throw new Error("Sidecar medium not found");return OY.createElement(a,co({},r))};FY.isSideCarExport=!0;function gO(e,t){return e.useMedium(t),FY}var TP=hO();var yO=function(){},OS=ri.forwardRef(function(e,t){var r=ri.useRef(null),a=ri.useState({onScrollCapture:yO,onWheelCapture:yO,onTouchMoveCapture:yO}),n=a[0],s=a[1],i=e.forwardProps,o=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,x=e.allowPinchZoom,g=e.as,y=g===void 0?"div":g,b=e.gapMode,S=bP(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=f,P=mO([r,t]),C=co(co({},S),n);return ri.createElement(ri.Fragment,null,u&&ri.createElement(w,{sideCar:TP,removeScrollBar:c,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:s,allowPinchZoom:!!x,lockRef:r,gapMode:b}),i?ri.cloneElement(ri.Children.only(o),co(co({},C),{ref:P})):ri.createElement(y,co({},C,{className:l,ref:P}),o))});OS.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};OS.classNames={fullWidth:uh,zeroRight:ch};var Ba=N(Le());var hx=N(Le());var jY=N(Le());var BY;var UY=function(){if(BY)return BY;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function dqe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=UY();return t&&e.setAttribute("nonce",t),e}function fqe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function pqe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var xO=function(){var e=0,t=null;return{add:function(r){e==0&&(t=dqe())&&(fqe(t,r),pqe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var bO=function(){var e=xO();return function(t,r){jY.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}};var FS=function(){var e=bO(),t=function(r){var a=r.styles,n=r.dynamic;return e(a,n),null};return t};var mqe={left:0,top:0,right:0,gap:0},vO=function(e){return parseInt(e||"",10)||0},hqe=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],a=t[e==="padding"?"paddingTop":"marginTop"],n=t[e==="padding"?"paddingRight":"marginRight"];return[vO(r),vO(a),vO(n)]},SO=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return mqe;var t=hqe(e),r=document.documentElement.clientWidth,a=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,a-r+t[2]-t[0])}};var gqe=FS(),mx="data-scroll-locked",yqe=function(e,t,r,a){var n=e.left,s=e.top,i=e.right,o=e.gap;return r===void 0&&(r="margin"),`
|
|
.`.concat(fO,` {
|
|
overflow: hidden `).concat(a,`;
|
|
padding-right: `).concat(o,"px ").concat(a,`;
|
|
}
|
|
body[`).concat(mx,`] {
|
|
overflow: hidden `).concat(a,`;
|
|
overscroll-behavior: contain;
|
|
`).concat([t&&"position: relative ".concat(a,";"),r==="margin"&&`
|
|
padding-left: `.concat(n,`px;
|
|
padding-top: `).concat(s,`px;
|
|
padding-right: `).concat(i,`px;
|
|
margin-left:0;
|
|
margin-top:0;
|
|
margin-right: `).concat(o,"px ").concat(a,`;
|
|
`),r==="padding"&&"padding-right: ".concat(o,"px ").concat(a,";")].filter(Boolean).join(""),`
|
|
}
|
|
|
|
.`).concat(ch,` {
|
|
right: `).concat(o,"px ").concat(a,`;
|
|
}
|
|
|
|
.`).concat(uh,` {
|
|
margin-right: `).concat(o,"px ").concat(a,`;
|
|
}
|
|
|
|
.`).concat(ch," .").concat(ch,` {
|
|
right: 0 `).concat(a,`;
|
|
}
|
|
|
|
.`).concat(uh," .").concat(uh,` {
|
|
margin-right: 0 `).concat(a,`;
|
|
}
|
|
|
|
body[`).concat(mx,`] {
|
|
`).concat(pO,": ").concat(o,`px;
|
|
}
|
|
`)},zY=function(){var e=parseInt(document.body.getAttribute(mx)||"0",10);return isFinite(e)?e:0},xqe=function(){hx.useEffect(function(){return document.body.setAttribute(mx,(zY()+1).toString()),function(){var e=zY()-1;e<=0?document.body.removeAttribute(mx):document.body.setAttribute(mx,e.toString())}},[])},TO=function(e){var t=e.noRelative,r=e.noImportant,a=e.gapMode,n=a===void 0?"margin":a;xqe();var s=hx.useMemo(function(){return SO(n)},[n]);return hx.createElement(gqe,{styles:yqe(s,!t,n,r?"":"!important")})};var wO=!1;if(typeof window<"u")try{BS=Object.defineProperty({},"passive",{get:function(){return wO=!0,!0}}),window.addEventListener("test",BS,BS),window.removeEventListener("test",BS,BS)}catch{wO=!1}var BS,dh=wO?{passive:!1}:!1;var bqe=function(e){return e.tagName==="TEXTAREA"},VY=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!bqe(e)&&r[t]==="visible")},vqe=function(e){return VY(e,"overflowY")},Sqe=function(e){return VY(e,"overflowX")},CO=function(e,t){var r=t.ownerDocument,a=t;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var n=qY(e,a);if(n){var s=HY(e,a),i=s[1],o=s[2];if(i>o)return!0}a=a.parentNode}while(a&&a!==r.body);return!1},Tqe=function(e){var t=e.scrollTop,r=e.scrollHeight,a=e.clientHeight;return[t,r,a]},wqe=function(e){var t=e.scrollLeft,r=e.scrollWidth,a=e.clientWidth;return[t,r,a]},qY=function(e,t){return e==="v"?vqe(t):Sqe(t)},HY=function(e,t){return e==="v"?Tqe(t):wqe(t)},Cqe=function(e,t){return e==="h"&&t==="rtl"?-1:1},$Y=function(e,t,r,a,n){var s=Cqe(e,window.getComputedStyle(t).direction),i=s*a,o=r.target,l=t.contains(o),c=!1,u=i>0,d=0,f=0;do{if(!o)break;var p=HY(e,o),m=p[0],h=p[1],x=p[2],g=h-x-s*m;(m||g)&&qY(e,o)&&(d+=g,f+=m);var y=o.parentNode;o=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&o!==document.body||l&&(t.contains(o)||t===o));return(u&&(n&&Math.abs(d)<1||!n&&i>d)||!u&&(n&&Math.abs(f)<1||!n&&-i>f))&&(c=!0),c};var wP=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},GY=function(e){return[e.deltaX,e.deltaY]},KY=function(e){return e&&"current"in e?e.current:e},Eqe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Pqe=function(e){return`
|
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
`)},Aqe=0,gx=[];function WY(e){var t=Ba.useRef([]),r=Ba.useRef([0,0]),a=Ba.useRef(),n=Ba.useState(Aqe++)[0],s=Ba.useState(FS)[0],i=Ba.useRef(e);Ba.useEffect(function(){i.current=e},[e]),Ba.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(n));var h=kY([e.lockRef.current],(e.shards||[]).map(KY),!0).filter(Boolean);return h.forEach(function(x){return x.classList.add("allow-interactivity-".concat(n))}),function(){document.body.classList.remove("block-interactivity-".concat(n)),h.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(n))})}}},[e.inert,e.lockRef.current,e.shards]);var o=Ba.useCallback(function(h,x){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!i.current.allowPinchZoom;var g=wP(h),y=r.current,b="deltaX"in h?h.deltaX:y[0]-g[0],S="deltaY"in h?h.deltaY:y[1]-g[1],w,P=h.target,C=Math.abs(b)>Math.abs(S)?"h":"v";if("touches"in h&&C==="h"&&P.type==="range")return!1;var I=CO(C,P);if(!I)return!0;if(I?w=C:(w=C==="v"?"h":"v",I=CO(C,P)),!I)return!1;if(!a.current&&"changedTouches"in h&&(b||S)&&(a.current=w),!w)return!0;var R=a.current||w;return $Y(R,x,h,R==="h"?b:S,!0)},[]),l=Ba.useCallback(function(h){var x=h;if(!(!gx.length||gx[gx.length-1]!==s)){var g="deltaY"in x?GY(x):wP(x),y=t.current.filter(function(w){return w.name===x.type&&(w.target===x.target||x.target===w.shadowParent)&&Eqe(w.delta,g)})[0];if(y&&y.should){x.cancelable&&x.preventDefault();return}if(!y){var b=(i.current.shards||[]).map(KY).filter(Boolean).filter(function(w){return w.contains(x.target)}),S=b.length>0?o(x,b[0]):!i.current.noIsolation;S&&x.cancelable&&x.preventDefault()}}},[]),c=Ba.useCallback(function(h,x,g,y){var b={name:h,delta:x,target:g,should:y,shadowParent:Iqe(g)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(S){return S!==b})},1)},[]),u=Ba.useCallback(function(h){r.current=wP(h),a.current=void 0},[]),d=Ba.useCallback(function(h){c(h.type,GY(h),h.target,o(h,e.lockRef.current))},[]),f=Ba.useCallback(function(h){c(h.type,wP(h),h.target,o(h,e.lockRef.current))},[]);Ba.useEffect(function(){return gx.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,dh),document.addEventListener("touchmove",l,dh),document.addEventListener("touchstart",u,dh),function(){gx=gx.filter(function(h){return h!==s}),document.removeEventListener("wheel",l,dh),document.removeEventListener("touchmove",l,dh),document.removeEventListener("touchstart",u,dh)}},[]);var p=e.removeScrollBar,m=e.inert;return Ba.createElement(Ba.Fragment,null,m?Ba.createElement(s,{styles:Pqe(n)}):null,p?Ba.createElement(TO,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Iqe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var XY=gO(TP,WY);var YY=CP.forwardRef(function(e,t){return CP.createElement(OS,co({},e,{ref:t,sideCar:XY}))});YY.classNames=OS.classNames;var fh=YY;var $t=N(ce(),1),Nqe=[" ","Enter","ArrowUp","ArrowDown"],Lqe=[" ","Enter"],ph="Select",[PP,AP,Rqe]=ux(ph),[yx,jSt]=Pa(ph,[Rqe,ld]),IP=ld(),[kqe,op]=yx(ph),[Mqe,Dqe]=yx(ph),JY=e=>{let{__scopeSelect:t,children:r,open:a,defaultOpen:n,onOpenChange:s,value:i,defaultValue:o,onValueChange:l,dir:c,name:u,autoComplete:d,disabled:f,required:p,form:m}=e,h=IP(t),[x,g]=rt.useState(null),[y,b]=rt.useState(null),[S,w]=rt.useState(!1),P=au(c),[C,I]=qs({prop:a,defaultProp:n??!1,onChange:s,caller:ph}),[R,O]=qs({prop:i,defaultProp:o,onChange:l,caller:ph}),D=rt.useRef(null),W=x?m||!!x.closest("form"):!0,[J,me]=rt.useState(new Set),Z=Array.from(J).map(q=>q.props.value).join(";");return(0,$t.jsx)(oh,{...h,children:(0,$t.jsxs)(kqe,{required:p,scope:t,trigger:x,onTriggerChange:g,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:S,onValueNodeHasChildrenChange:w,contentId:pn(),value:R,onValueChange:O,open:C,onOpenChange:I,dir:P,triggerPointerDownPosRef:D,disabled:f,children:[(0,$t.jsx)(PP.Provider,{scope:t,children:(0,$t.jsx)(Mqe,{scope:e.__scopeSelect,onNativeOptionAdd:rt.useCallback(q=>{me(V=>new Set(V).add(q))},[]),onNativeOptionRemove:rt.useCallback(q=>{me(V=>{let L=new Set(V);return L.delete(q),L})},[]),children:r})}),W?(0,$t.jsxs)(bJ,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:R,onChange:q=>O(q.target.value),disabled:f,form:m,children:[R===void 0?(0,$t.jsx)("option",{value:""}):null,Array.from(J)]},Z):null]})})};JY.displayName=ph;var QY="SelectTrigger",ZY=rt.forwardRef((e,t)=>{let{__scopeSelect:r,disabled:a=!1,...n}=e,s=IP(r),i=op(QY,r),o=i.disabled||a,l=Ht(t,i.onTriggerChange),c=AP(r),u=rt.useRef("touch"),[d,f,p]=SJ(h=>{let x=c().filter(b=>!b.disabled),g=x.find(b=>b.value===i.value),y=TJ(x,h,g);y!==void 0&&i.onValueChange(y.value)}),m=h=>{o||(i.onOpenChange(!0),p()),h&&(i.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return(0,$t.jsx)(ix,{asChild:!0,...s,children:(0,$t.jsx)(lt.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:o,"data-disabled":o?"":void 0,"data-placeholder":vJ(i.value)?"":void 0,...n,ref:l,onClick:Ye(n.onClick,h=>{h.currentTarget.focus(),u.current!=="mouse"&&m(h)}),onPointerDown:Ye(n.onPointerDown,h=>{u.current=h.pointerType;let x=h.target;x.hasPointerCapture(h.pointerId)&&x.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(m(h),h.preventDefault())}),onKeyDown:Ye(n.onKeyDown,h=>{let x=d.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&f(h.key),!(x&&h.key===" ")&&Nqe.includes(h.key)&&(m(),h.preventDefault())})})})});ZY.displayName=QY;var eJ="SelectValue",tJ=rt.forwardRef((e,t)=>{let{__scopeSelect:r,className:a,style:n,children:s,placeholder:i="",...o}=e,l=op(eJ,r),{onValueNodeHasChildrenChange:c}=l,u=s!==void 0,d=Ht(t,l.onValueNodeChange);return ya(()=>{c(u)},[c,u]),(0,$t.jsx)(lt.span,{...o,ref:d,style:{pointerEvents:"none"},children:vJ(l.value)?(0,$t.jsx)($t.Fragment,{children:i}):s})});tJ.displayName=eJ;var _qe="SelectIcon",rJ=rt.forwardRef((e,t)=>{let{__scopeSelect:r,children:a,...n}=e;return(0,$t.jsx)(lt.span,{"aria-hidden":!0,...n,ref:t,children:a||"\u25BC"})});rJ.displayName=_qe;var Oqe="SelectPortal",aJ=e=>(0,$t.jsx)(cd,{asChild:!0,...e});aJ.displayName=Oqe;var mh="SelectContent",nJ=rt.forwardRef((e,t)=>{let r=op(mh,e.__scopeSelect),[a,n]=rt.useState();if(ya(()=>{n(new DocumentFragment)},[]),!r.open){let s=a;return s?LO.createPortal((0,$t.jsx)(sJ,{scope:e.__scopeSelect,children:(0,$t.jsx)(PP.Slot,{scope:e.__scopeSelect,children:(0,$t.jsx)("div",{children:e.children})})}),s):null}return(0,$t.jsx)(iJ,{...e,ref:t})});nJ.displayName=mh;var ic=10,[sJ,lp]=yx(mh),Fqe="SelectContentImpl",Bqe=PY("SelectContent.RemoveScroll"),iJ=rt.forwardRef((e,t)=>{let{__scopeSelect:r,position:a="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:s,onPointerDownOutside:i,side:o,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:x,...g}=e,y=op(mh,r),[b,S]=rt.useState(null),[w,P]=rt.useState(null),C=Ht(t,A=>S(A)),[I,R]=rt.useState(null),[O,D]=rt.useState(null),W=AP(r),[J,me]=rt.useState(!1),Z=rt.useRef(!1);rt.useEffect(()=>{if(b)return px(b)},[b]),dx();let q=rt.useCallback(A=>{let[K,...he]=W().map(Pe=>Pe.ref.current),[H]=he.slice(-1),xe=document.activeElement;for(let Pe of A)if(Pe===xe||(Pe?.scrollIntoView({block:"nearest"}),Pe===K&&w&&(w.scrollTop=0),Pe===H&&w&&(w.scrollTop=w.scrollHeight),Pe?.focus(),document.activeElement!==xe))return},[W,w]),V=rt.useCallback(()=>q([I,b]),[q,I,b]);rt.useEffect(()=>{J&&V()},[J,V]);let{onOpenChange:L,triggerPointerDownPosRef:k}=y;rt.useEffect(()=>{if(b){let A={x:0,y:0},K=H=>{A={x:Math.abs(Math.round(H.pageX)-(k.current?.x??0)),y:Math.abs(Math.round(H.pageY)-(k.current?.y??0))}},he=H=>{A.x<=10&&A.y<=10?H.preventDefault():b.contains(H.target)||L(!1),document.removeEventListener("pointermove",K),k.current=null};return k.current!==null&&(document.addEventListener("pointermove",K),document.addEventListener("pointerup",he,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",he,{capture:!0})}}},[b,L,k]),rt.useEffect(()=>{let A=()=>L(!1);return window.addEventListener("blur",A),window.addEventListener("resize",A),()=>{window.removeEventListener("blur",A),window.removeEventListener("resize",A)}},[L]);let[_,ee]=SJ(A=>{let K=W().filter(xe=>!xe.disabled),he=K.find(xe=>xe.ref.current===document.activeElement),H=TJ(K,A,he);H&&setTimeout(()=>H.ref.current.focus())}),ie=rt.useCallback((A,K,he)=>{let H=!Z.current&&!he;(y.value!==void 0&&y.value===K||H)&&(R(A),H&&(Z.current=!0))},[y.value]),ae=rt.useCallback(()=>b?.focus(),[b]),ge=rt.useCallback((A,K,he)=>{let H=!Z.current&&!he;(y.value!==void 0&&y.value===K||H)&&D(A)},[y.value]),ue=a==="popper"?EO:oJ,$=ue===EO?{side:o,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:x}:{};return(0,$t.jsx)(sJ,{scope:r,content:b,viewport:w,onViewportChange:P,itemRefCallback:ie,selectedItem:I,onItemLeave:ae,itemTextRefCallback:ge,focusSelectedItem:V,selectedItemText:O,position:a,isPositioned:J,searchRef:_,children:(0,$t.jsx)(fh,{as:Bqe,allowPinchZoom:!0,children:(0,$t.jsx)(lh,{asChild:!0,trapped:y.open,onMountAutoFocus:A=>{A.preventDefault()},onUnmountAutoFocus:Ye(n,A=>{y.trigger?.focus({preventScroll:!0}),A.preventDefault()}),children:(0,$t.jsx)(ud,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:A=>A.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,$t.jsx)(ue,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:A=>A.preventDefault(),...g,...$,onPlaced:()=>me(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:Ye(g.onKeyDown,A=>{let K=A.ctrlKey||A.altKey||A.metaKey;if(A.key==="Tab"&&A.preventDefault(),!K&&A.key.length===1&&ee(A.key),["ArrowUp","ArrowDown","Home","End"].includes(A.key)){let H=W().filter(xe=>!xe.disabled).map(xe=>xe.ref.current);if(["ArrowUp","End"].includes(A.key)&&(H=H.slice().reverse()),["ArrowUp","ArrowDown"].includes(A.key)){let xe=A.target,Pe=H.indexOf(xe);H=H.slice(Pe+1)}setTimeout(()=>q(H)),A.preventDefault()}})})})})})})});iJ.displayName=Fqe;var Uqe="SelectItemAlignedPosition",oJ=rt.forwardRef((e,t)=>{let{__scopeSelect:r,onPlaced:a,...n}=e,s=op(mh,r),i=lp(mh,r),[o,l]=rt.useState(null),[c,u]=rt.useState(null),d=Ht(t,C=>u(C)),f=AP(r),p=rt.useRef(!1),m=rt.useRef(!0),{viewport:h,selectedItem:x,selectedItemText:g,focusSelectedItem:y}=i,b=rt.useCallback(()=>{if(s.trigger&&s.valueNode&&o&&c&&h&&x&&g){let C=s.trigger.getBoundingClientRect(),I=c.getBoundingClientRect(),R=s.valueNode.getBoundingClientRect(),O=g.getBoundingClientRect();if(s.dir!=="rtl"){let xe=O.left-I.left,Pe=R.left-xe,Ie=C.left-Pe,Ve=C.width+Ie,ft=Math.max(Ve,I.width),we=window.innerWidth-ic,Ne=_S(Pe,[ic,Math.max(ic,we-ft)]);o.style.minWidth=Ve+"px",o.style.left=Ne+"px"}else{let xe=I.right-O.right,Pe=window.innerWidth-R.right-xe,Ie=window.innerWidth-C.right-Pe,Ve=C.width+Ie,ft=Math.max(Ve,I.width),we=window.innerWidth-ic,Ne=_S(Pe,[ic,Math.max(ic,we-ft)]);o.style.minWidth=Ve+"px",o.style.right=Ne+"px"}let D=f(),W=window.innerHeight-ic*2,J=h.scrollHeight,me=window.getComputedStyle(c),Z=parseInt(me.borderTopWidth,10),q=parseInt(me.paddingTop,10),V=parseInt(me.borderBottomWidth,10),L=parseInt(me.paddingBottom,10),k=Z+q+J+L+V,_=Math.min(x.offsetHeight*5,k),ee=window.getComputedStyle(h),ie=parseInt(ee.paddingTop,10),ae=parseInt(ee.paddingBottom,10),ge=C.top+C.height/2-ic,ue=W-ge,$=x.offsetHeight/2,A=x.offsetTop+$,K=Z+q+A,he=k-K;if(K<=ge){let xe=D.length>0&&x===D[D.length-1].ref.current;o.style.bottom="0px";let Pe=c.clientHeight-h.offsetTop-h.offsetHeight,Ie=Math.max(ue,$+(xe?ae:0)+Pe+V),Ve=K+Ie;o.style.height=Ve+"px"}else{let xe=D.length>0&&x===D[0].ref.current;o.style.top="0px";let Ie=Math.max(ge,Z+h.offsetTop+(xe?ie:0)+$)+he;o.style.height=Ie+"px",h.scrollTop=K-ge+h.offsetTop}o.style.margin=`${ic}px 0`,o.style.minHeight=_+"px",o.style.maxHeight=W+"px",a?.(),requestAnimationFrame(()=>p.current=!0)}},[f,s.trigger,s.valueNode,o,c,h,x,g,s.dir,a]);ya(()=>b(),[b]);let[S,w]=rt.useState();ya(()=>{c&&w(window.getComputedStyle(c).zIndex)},[c]);let P=rt.useCallback(C=>{C&&m.current===!0&&(b(),y?.(),m.current=!1)},[b,y]);return(0,$t.jsx)(zqe,{scope:r,contentWrapper:o,shouldExpandOnScrollRef:p,onScrollButtonChange:P,children:(0,$t.jsx)("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:(0,$t.jsx)(lt.div,{...n,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});oJ.displayName=Uqe;var jqe="SelectPopperPosition",EO=rt.forwardRef((e,t)=>{let{__scopeSelect:r,align:a="start",collisionPadding:n=ic,...s}=e,i=IP(r);return(0,$t.jsx)(ox,{...i,...s,ref:t,align:a,collisionPadding:n,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});EO.displayName=jqe;var[zqe,RO]=yx(mh,{}),PO="SelectViewport",lJ=rt.forwardRef((e,t)=>{let{__scopeSelect:r,nonce:a,...n}=e,s=lp(PO,r),i=RO(PO,r),o=Ht(t,s.onViewportChange),l=rt.useRef(0);return(0,$t.jsxs)($t.Fragment,{children:[(0,$t.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),(0,$t.jsx)(PP.Slot,{scope:r,children:(0,$t.jsx)(lt.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:o,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:Ye(n.onScroll,c=>{let u=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=i;if(f?.current&&d){let p=Math.abs(l.current-u.scrollTop);if(p>0){let m=window.innerHeight-ic*2,h=parseFloat(d.style.minHeight),x=parseFloat(d.style.height),g=Math.max(h,x);if(g<m){let y=g+p,b=Math.min(m,y),S=y-b;d.style.height=b+"px",d.style.bottom==="0px"&&(u.scrollTop=S>0?S:0,d.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});lJ.displayName=PO;var cJ="SelectGroup",[Vqe,qqe]=yx(cJ),Hqe=rt.forwardRef((e,t)=>{let{__scopeSelect:r,...a}=e,n=pn();return(0,$t.jsx)(Vqe,{scope:r,id:n,children:(0,$t.jsx)(lt.div,{role:"group","aria-labelledby":n,...a,ref:t})})});Hqe.displayName=cJ;var uJ="SelectLabel",$qe=rt.forwardRef((e,t)=>{let{__scopeSelect:r,...a}=e,n=qqe(uJ,r);return(0,$t.jsx)(lt.div,{id:n.id,...a,ref:t})});$qe.displayName=uJ;var EP="SelectItem",[Gqe,dJ]=yx(EP),fJ=rt.forwardRef((e,t)=>{let{__scopeSelect:r,value:a,disabled:n=!1,textValue:s,...i}=e,o=op(EP,r),l=lp(EP,r),c=o.value===a,[u,d]=rt.useState(s??""),[f,p]=rt.useState(!1),m=Ht(t,y=>l.itemRefCallback?.(y,a,n)),h=pn(),x=rt.useRef("touch"),g=()=>{n||(o.onValueChange(a),o.onOpenChange(!1))};if(a==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,$t.jsx)(Gqe,{scope:r,value:a,disabled:n,textId:h,isSelected:c,onItemTextChange:rt.useCallback(y=>{d(b=>b||(y?.textContent??"").trim())},[]),children:(0,$t.jsx)(PP.ItemSlot,{scope:r,value:a,disabled:n,textValue:u,children:(0,$t.jsx)(lt.div,{role:"option","aria-labelledby":h,"data-highlighted":f?"":void 0,"aria-selected":c&&f,"data-state":c?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...i,ref:m,onFocus:Ye(i.onFocus,()=>p(!0)),onBlur:Ye(i.onBlur,()=>p(!1)),onClick:Ye(i.onClick,()=>{x.current!=="mouse"&&g()}),onPointerUp:Ye(i.onPointerUp,()=>{x.current==="mouse"&&g()}),onPointerDown:Ye(i.onPointerDown,y=>{x.current=y.pointerType}),onPointerMove:Ye(i.onPointerMove,y=>{x.current=y.pointerType,n?l.onItemLeave?.():x.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ye(i.onPointerLeave,y=>{y.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:Ye(i.onKeyDown,y=>{l.searchRef?.current!==""&&y.key===" "||(Lqe.includes(y.key)&&g(),y.key===" "&&y.preventDefault())})})})})});fJ.displayName=EP;var US="SelectItemText",pJ=rt.forwardRef((e,t)=>{let{__scopeSelect:r,className:a,style:n,...s}=e,i=op(US,r),o=lp(US,r),l=dJ(US,r),c=Dqe(US,r),[u,d]=rt.useState(null),f=Ht(t,g=>d(g),l.onItemTextChange,g=>o.itemTextRefCallback?.(g,l.value,l.disabled)),p=u?.textContent,m=rt.useMemo(()=>(0,$t.jsx)("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:x}=c;return ya(()=>(h(m),()=>x(m)),[h,x,m]),(0,$t.jsxs)($t.Fragment,{children:[(0,$t.jsx)(lt.span,{id:l.textId,...s,ref:f}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?LO.createPortal(s.children,i.valueNode):null]})});pJ.displayName=US;var mJ="SelectItemIndicator",hJ=rt.forwardRef((e,t)=>{let{__scopeSelect:r,...a}=e;return dJ(mJ,r).isSelected?(0,$t.jsx)(lt.span,{"aria-hidden":!0,...a,ref:t}):null});hJ.displayName=mJ;var AO="SelectScrollUpButton",gJ=rt.forwardRef((e,t)=>{let r=lp(AO,e.__scopeSelect),a=RO(AO,e.__scopeSelect),[n,s]=rt.useState(!1),i=Ht(t,a.onScrollButtonChange);return ya(()=>{if(r.viewport&&r.isPositioned){let l=function(){let u=c.scrollTop>0;s(u)};var o=l;let c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),n?(0,$t.jsx)(xJ,{...e,ref:i,onAutoScroll:()=>{let{viewport:o,selectedItem:l}=r;o&&l&&(o.scrollTop=o.scrollTop-l.offsetHeight)}}):null});gJ.displayName=AO;var IO="SelectScrollDownButton",yJ=rt.forwardRef((e,t)=>{let r=lp(IO,e.__scopeSelect),a=RO(IO,e.__scopeSelect),[n,s]=rt.useState(!1),i=Ht(t,a.onScrollButtonChange);return ya(()=>{if(r.viewport&&r.isPositioned){let l=function(){let u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;s(d)};var o=l;let c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),n?(0,$t.jsx)(xJ,{...e,ref:i,onAutoScroll:()=>{let{viewport:o,selectedItem:l}=r;o&&l&&(o.scrollTop=o.scrollTop+l.offsetHeight)}}):null});yJ.displayName=IO;var xJ=rt.forwardRef((e,t)=>{let{__scopeSelect:r,onAutoScroll:a,...n}=e,s=lp("SelectScrollButton",r),i=rt.useRef(null),o=AP(r),l=rt.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return rt.useEffect(()=>()=>l(),[l]),ya(()=>{o().find(u=>u.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[o]),(0,$t.jsx)(lt.div,{"aria-hidden":!0,...n,ref:t,style:{flexShrink:0,...n.style},onPointerDown:Ye(n.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(a,50))}),onPointerMove:Ye(n.onPointerMove,()=>{s.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(a,50))}),onPointerLeave:Ye(n.onPointerLeave,()=>{l()})})}),Kqe="SelectSeparator",Wqe=rt.forwardRef((e,t)=>{let{__scopeSelect:r,...a}=e;return(0,$t.jsx)(lt.div,{"aria-hidden":!0,...a,ref:t})});Wqe.displayName=Kqe;var NO="SelectArrow",Xqe=rt.forwardRef((e,t)=>{let{__scopeSelect:r,...a}=e,n=IP(r),s=op(NO,r),i=lp(NO,r);return s.open&&i.position==="popper"?(0,$t.jsx)(lx,{...n,...a,ref:t}):null});Xqe.displayName=NO;var Yqe="SelectBubbleInput",bJ=rt.forwardRef(({__scopeSelect:e,value:t,...r},a)=>{let n=rt.useRef(null),s=Ht(a,n),i=BE(t);return rt.useEffect(()=>{let o=n.current;if(!o)return;let l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&u){let d=new Event("change",{bubbles:!0});u.call(o,t),o.dispatchEvent(d)}},[i,t]),(0,$t.jsx)(lt.select,{...r,style:{...uO,...r.style},ref:s,defaultValue:t})});bJ.displayName=Yqe;function vJ(e){return e===""||e===void 0}function SJ(e){let t=Aa(e),r=rt.useRef(""),a=rt.useRef(0),n=rt.useCallback(i=>{let o=r.current+i;t(o),function l(c){r.current=c,window.clearTimeout(a.current),c!==""&&(a.current=window.setTimeout(()=>l(""),1e3))}(o)},[t]),s=rt.useCallback(()=>{r.current="",window.clearTimeout(a.current)},[]);return rt.useEffect(()=>()=>window.clearTimeout(a.current),[]),[r,n,s]}function TJ(e,t,r){let n=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,s=r?e.indexOf(r):-1,i=Jqe(e,Math.max(s,0));n.length===1&&(i=i.filter(c=>c!==r));let l=i.find(c=>c.textValue.toLowerCase().startsWith(n.toLowerCase()));return l!==r?l:void 0}function Jqe(e,t){return e.map((r,a)=>e[(t+a)%e.length])}var wJ=JY,CJ=ZY,EJ=tJ,PJ=rJ,AJ=aJ,IJ=nJ,NJ=lJ;var LJ=fJ,RJ=pJ,kJ=hJ,MJ=gJ,DJ=yJ;qt();var En=N(ce());function lr({...e}){return(0,En.jsx)(wJ,{"data-slot":"select",...e})}function cr({...e}){return(0,En.jsx)(EJ,{"data-slot":"select-value",...e})}function ur({className:e,size:t="default",children:r,...a}){return(0,En.jsxs)(CJ,{"data-slot":"select-trigger","data-size":t,className:oe("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...a,children:[r,(0,En.jsx)(PJ,{asChild:!0,children:(0,En.jsx)(ti,{className:"size-4 opacity-50"})})]})}function dr({className:e,children:t,position:r="popper",align:a="center",...n}){return(0,En.jsx)(AJ,{children:(0,En.jsxs)(IJ,{"data-slot":"select-content",className:oe("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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,align:a,...n,children:[(0,En.jsx)(Zqe,{}),(0,En.jsx)(NJ,{className:oe("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),(0,En.jsx)(eHe,{})]})})}function Rt({className:e,children:t,...r}){return(0,En.jsxs)(LJ,{"data-slot":"select-item",className:oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...r,children:[(0,En.jsx)("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,En.jsx)(kJ,{children:(0,En.jsx)(Jl,{className:"size-4"})})}),(0,En.jsx)(RJ,{children:t})]})}function Zqe({className:e,...t}){return(0,En.jsx)(MJ,{"data-slot":"select-scroll-up-button",className:oe("flex cursor-default items-center justify-center py-1",e),...t,children:(0,En.jsx)(rS,{className:"size-4"})})}function eHe({className:e,...t}){return(0,En.jsx)(DJ,{"data-slot":"select-scroll-down-button",className:oe("flex cursor-default items-center justify-center py-1",e),...t,children:(0,En.jsx)(ti,{className:"size-4"})})}var fd=N(Le(),1);var ws=N(Le(),1);var cp=N(ce(),1),kO="rovingFocusGroup.onEntryFocus",tHe={bubbles:!1,cancelable:!0},jS="RovingFocusGroup",[MO,_J,rHe]=ux(jS),[aHe,xx]=Pa(jS,[rHe]),[nHe,sHe]=aHe(jS),OJ=ws.forwardRef((e,t)=>(0,cp.jsx)(MO.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,cp.jsx)(MO.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,cp.jsx)(iHe,{...e,ref:t})})}));OJ.displayName=jS;var iHe=ws.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,orientation:a,loop:n=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:o,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...d}=e,f=ws.useRef(null),p=Ht(t,f),m=au(s),[h,x]=qs({prop:i,defaultProp:o??null,onChange:l,caller:jS}),[g,y]=ws.useState(!1),b=Aa(c),S=_J(r),w=ws.useRef(!1),[P,C]=ws.useState(0);return ws.useEffect(()=>{let I=f.current;if(I)return I.addEventListener(kO,b),()=>I.removeEventListener(kO,b)},[b]),(0,cp.jsx)(nHe,{scope:r,orientation:a,dir:m,loop:n,currentTabStopId:h,onItemFocus:ws.useCallback(I=>x(I),[x]),onItemShiftTab:ws.useCallback(()=>y(!0),[]),onFocusableItemAdd:ws.useCallback(()=>C(I=>I+1),[]),onFocusableItemRemove:ws.useCallback(()=>C(I=>I-1),[]),children:(0,cp.jsx)(lt.div,{tabIndex:g||P===0?-1:0,"data-orientation":a,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:Ye(e.onMouseDown,()=>{w.current=!0}),onFocus:Ye(e.onFocus,I=>{let R=!w.current;if(I.target===I.currentTarget&&R&&!g){let O=new CustomEvent(kO,tHe);if(I.currentTarget.dispatchEvent(O),!O.defaultPrevented){let D=S().filter(q=>q.focusable),W=D.find(q=>q.active),J=D.find(q=>q.id===h),Z=[W,J,...D].filter(Boolean).map(q=>q.ref.current);UJ(Z,u)}}w.current=!1}),onBlur:Ye(e.onBlur,()=>y(!1))})})}),FJ="RovingFocusGroupItem",BJ=ws.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:a=!0,active:n=!1,tabStopId:s,children:i,...o}=e,l=pn(),c=s||l,u=sHe(FJ,r),d=u.currentTabStopId===c,f=_J(r),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return ws.useEffect(()=>{if(a)return p(),()=>m()},[a,p,m]),(0,cp.jsx)(MO.ItemSlot,{scope:r,id:c,focusable:a,active:n,children:(0,cp.jsx)(lt.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...o,ref:t,onMouseDown:Ye(e.onMouseDown,x=>{a?u.onItemFocus(c):x.preventDefault()}),onFocus:Ye(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:Ye(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){u.onItemShiftTab();return}if(x.target!==x.currentTarget)return;let g=cHe(x,u.orientation,u.dir);if(g!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let b=f().filter(S=>S.focusable).map(S=>S.ref.current);if(g==="last")b.reverse();else if(g==="prev"||g==="next"){g==="prev"&&b.reverse();let S=b.indexOf(x.currentTarget);b=u.loop?uHe(b,S+1):b.slice(S+1)}setTimeout(()=>UJ(b))}}),children:typeof i=="function"?i({isCurrentTabStop:d,hasTabStop:h!=null}):i})})});BJ.displayName=FJ;var oHe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function lHe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function cHe(e,t,r){let a=lHe(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return oHe[a]}function UJ(e,t=!1){let r=document.activeElement;for(let a of e)if(a===r||(a.focus({preventScroll:t}),document.activeElement!==r))return}function uHe(e,t){return e.map((r,a)=>e[(t+a)%e.length])}var NP=OJ,LP=BJ;var dd=N(ce(),1),RP="Tabs",[dHe,uTt]=Pa(RP,[xx]),zJ=xx(),[fHe,DO]=dHe(RP),VJ=fd.forwardRef((e,t)=>{let{__scopeTabs:r,value:a,onValueChange:n,defaultValue:s,orientation:i="horizontal",dir:o,activationMode:l="automatic",...c}=e,u=au(o),[d,f]=qs({prop:a,onChange:n,defaultProp:s??"",caller:RP});return(0,dd.jsx)(fHe,{scope:r,baseId:pn(),value:d,onValueChange:f,orientation:i,dir:u,activationMode:l,children:(0,dd.jsx)(lt.div,{dir:u,"data-orientation":i,...c,ref:t})})});VJ.displayName=RP;var qJ="TabsList",HJ=fd.forwardRef((e,t)=>{let{__scopeTabs:r,loop:a=!0,...n}=e,s=DO(qJ,r),i=zJ(r);return(0,dd.jsx)(NP,{asChild:!0,...i,orientation:s.orientation,dir:s.dir,loop:a,children:(0,dd.jsx)(lt.div,{role:"tablist","aria-orientation":s.orientation,...n,ref:t})})});HJ.displayName=qJ;var $J="TabsTrigger",GJ=fd.forwardRef((e,t)=>{let{__scopeTabs:r,value:a,disabled:n=!1,...s}=e,i=DO($J,r),o=zJ(r),l=XJ(i.baseId,a),c=YJ(i.baseId,a),u=a===i.value;return(0,dd.jsx)(LP,{asChild:!0,...o,focusable:!n,active:u,children:(0,dd.jsx)(lt.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":n?"":void 0,disabled:n,id:l,...s,ref:t,onMouseDown:Ye(e.onMouseDown,d=>{!n&&d.button===0&&d.ctrlKey===!1?i.onValueChange(a):d.preventDefault()}),onKeyDown:Ye(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&i.onValueChange(a)}),onFocus:Ye(e.onFocus,()=>{let d=i.activationMode!=="manual";!u&&!n&&d&&i.onValueChange(a)})})})});GJ.displayName=$J;var KJ="TabsContent",WJ=fd.forwardRef((e,t)=>{let{__scopeTabs:r,value:a,forceMount:n,children:s,...i}=e,o=DO(KJ,r),l=XJ(o.baseId,a),c=YJ(o.baseId,a),u=a===o.value,d=fd.useRef(u);return fd.useEffect(()=>{let f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),(0,dd.jsx)($a,{present:n||u,children:({present:f})=>(0,dd.jsx)(lt.div,{"data-state":u?"active":"inactive","data-orientation":o.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:c,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:f&&s})})});WJ.displayName=KJ;function XJ(e,t){return`${e}-trigger-${t}`}function YJ(e,t){return`${e}-content-${t}`}var JJ=VJ,QJ=HJ,ZJ=GJ,eQ=WJ;var zS=N(ce());function Ll({className:e,...t}){return(0,zS.jsx)(JJ,{"data-slot":"tabs",className:oe("flex flex-col gap-2",e),...t})}function Rl({className:e,...t}){return(0,zS.jsx)(QJ,{"data-slot":"tabs-list",className:oe("bg-muted text-muted-foreground inline-flex h-8 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Ga({className:e,...t}){return(0,zS.jsx)(ZJ,{"data-slot":"tabs-trigger",className:oe("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function ca({className:e,...t}){return(0,zS.jsx)(eQ,{"data-slot":"tabs-content",className:oe("flex-1 outline-none",e),...t})}var hHe=N(ce()),mHe=Qc("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});var _O=N(Le());var gHe=N(ce()),xTt=_O.createContext({size:"default",variant:"default"});qt();var yHe=N(Le(),1),yt=N(Le(),1),OP=(0,yt.createContext)(null);OP.displayName="PanelGroupContext";var mn={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},VO=10,gh=yt.useLayoutEffect,tQ=yHe["useId".toString()],xHe=typeof tQ=="function"?tQ:()=>null,bHe=0;function qO(e=null){let t=xHe(),r=(0,yt.useRef)(e||t||null);return r.current===null&&(r.current=""+bHe++),e??r.current}function uQ({children:e,className:t="",collapsedSize:r,collapsible:a,defaultSize:n,forwardedRef:s,id:i,maxSize:o,minSize:l,onCollapse:c,onExpand:u,onResize:d,order:f,style:p,tagName:m="div",...h}){let x=(0,yt.useContext)(OP);if(x===null)throw Error("Panel components must be rendered within a PanelGroup container");let{collapsePanel:g,expandPanel:y,getPanelSize:b,getPanelStyle:S,groupId:w,isPanelCollapsed:P,reevaluatePanelConstraints:C,registerPanel:I,resizePanel:R,unregisterPanel:O}=x,D=qO(i),W=(0,yt.useRef)({callbacks:{onCollapse:c,onExpand:u,onResize:d},constraints:{collapsedSize:r,collapsible:a,defaultSize:n,maxSize:o,minSize:l},id:D,idIsFromProps:i!==void 0,order:f});(0,yt.useRef)({didLogMissingDefaultSizeWarning:!1}),gh(()=>{let{callbacks:me,constraints:Z}=W.current,q={...Z};W.current.id=D,W.current.idIsFromProps=i!==void 0,W.current.order=f,me.onCollapse=c,me.onExpand=u,me.onResize=d,Z.collapsedSize=r,Z.collapsible=a,Z.defaultSize=n,Z.maxSize=o,Z.minSize=l,(q.collapsedSize!==Z.collapsedSize||q.collapsible!==Z.collapsible||q.maxSize!==Z.maxSize||q.minSize!==Z.minSize)&&C(W.current,q)}),gh(()=>{let me=W.current;return I(me),()=>{O(me)}},[f,D,I,O]),(0,yt.useImperativeHandle)(s,()=>({collapse:()=>{g(W.current)},expand:me=>{y(W.current,me)},getId(){return D},getSize(){return b(W.current)},isCollapsed(){return P(W.current)},isExpanded(){return!P(W.current)},resize:me=>{R(W.current,me)}}),[g,y,b,P,D,R]);let J=S(W.current,n);return(0,yt.createElement)(m,{...h,children:e,className:t,id:D,style:{...J,...p},[mn.groupId]:w,[mn.panel]:"",[mn.panelCollapsible]:a||void 0,[mn.panelId]:D,[mn.panelSize]:parseFloat(""+J.flexGrow).toFixed(1)})}var HO=(0,yt.forwardRef)((e,t)=>(0,yt.createElement)(uQ,{...e,forwardedRef:t}));uQ.displayName="Panel";HO.displayName="forwardRef(Panel)";var vHe;function SHe(){return vHe}var zO=null,THe=!0,rQ=null,MP=-1,pd=null;function wHe(e,t,r){let a=(t&hQ)!==0,n=(t&gQ)!==0,s=(t&yQ)!==0,i=(t&xQ)!==0;if(rQ)return rQ({exceedsHorizontalMaximum:n,exceedsHorizontalMinimum:a,exceedsVerticalMaximum:i,exceedsVerticalMinimum:s,intersectsHorizontalDragHandle:e==="horizontal"||e==="intersection",intersectsVerticalDragHandle:e==="vertical"||e==="intersection",isPointerDown:r});if(t){if(a)return s?"se-resize":i?"ne-resize":"e-resize";if(n)return s?"sw-resize":i?"nw-resize":"w-resize";if(s)return"s-resize";if(i)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function CHe(){pd!==null&&(document.head.removeChild(pd),zO=null,pd=null,MP=-1)}function OO(e,t,r){var a,n;if(!THe)return;let s=wHe(e,t,r);if(zO!==s){if(zO=s,pd===null){pd=document.createElement("style");let o=SHe();o&&pd.setAttribute("nonce",o),document.head.appendChild(pd)}if(MP>=0){var i;(i=pd.sheet)===null||i===void 0||i.removeRule(MP)}MP=(a=(n=pd.sheet)===null||n===void 0?void 0:n.insertRule(`*{cursor: ${s} !important;}`))!==null&&a!==void 0?a:-1}}function dQ(e){return e.type==="keydown"}function fQ(e){return e.type.startsWith("pointer")}function pQ(e){return e.type.startsWith("mouse")}function FP(e){if(fQ(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(pQ(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function EHe(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function PHe(e,t,r){return r?e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y:e.x<=t.x+t.width&&e.x+e.width>=t.x&&e.y<=t.y+t.height&&e.y+e.height>=t.y}function AHe(e,t){if(e===t)throw new Error("Cannot compare node with itself");let r={a:sQ(e),b:sQ(t)},a;for(;r.a.at(-1)===r.b.at(-1);)e=r.a.pop(),t=r.b.pop(),a=e;vr(a,"Stacking order can only be calculated for elements with a common ancestor");let n={a:nQ(aQ(r.a)),b:nQ(aQ(r.b))};if(n.a===n.b){let s=a.childNodes,i={a:r.a.at(-1),b:r.b.at(-1)},o=s.length;for(;o--;){let l=s[o];if(l===i.a)return 1;if(l===i.b)return-1}}return Math.sign(n.a-n.b)}var IHe=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function NHe(e){var t;let r=getComputedStyle((t=mQ(e))!==null&&t!==void 0?t:e).display;return r==="flex"||r==="inline-flex"}function LHe(e){let t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||NHe(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||IHe.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function aQ(e){let t=e.length;for(;t--;){let r=e[t];if(vr(r,"Missing node"),LHe(r))return r}return null}function nQ(e){return e&&Number(getComputedStyle(e).zIndex)||0}function sQ(e){let t=[];for(;e;)t.push(e),e=mQ(e);return t}function mQ(e){let{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}var hQ=1,gQ=2,yQ=4,xQ=8,RHe=EHe()==="coarse",oc=[],hd=!1,up=new Map,BP=new Map,HS=new Set;function kHe(e,t,r,a,n){var s;let{ownerDocument:i}=t,o={direction:r,element:t,hitAreaMargins:a,setResizeHandlerState:n},l=(s=up.get(i))!==null&&s!==void 0?s:0;return up.set(i,l+1),HS.add(o),DP(),function(){var u;BP.delete(e),HS.delete(o);let d=(u=up.get(i))!==null&&u!==void 0?u:1;if(up.set(i,d-1),DP(),d===1&&up.delete(i),oc.includes(o)){let f=oc.indexOf(o);f>=0&&oc.splice(f,1),UP(),n("up",!0,null)}}}function MHe(e){let{target:t}=e,{x:r,y:a}=FP(e);hd=!0,$O({target:t,x:r,y:a}),DP(),oc.length>0&&(_P("down",e),UP(),e.preventDefault(),bQ(t)||e.stopImmediatePropagation())}function FO(e){let{x:t,y:r}=FP(e);if(hd&&e.type!=="pointerleave"&&e.buttons===0&&(hd=!1,_P("up",e)),!hd){let{target:a}=e;$O({target:a,x:t,y:r})}_P("move",e),UP(),oc.length>0&&e.preventDefault()}function BO(e){let{target:t}=e,{x:r,y:a}=FP(e);BP.clear(),hd=!1,oc.length>0&&(e.preventDefault(),bQ(t)||e.stopImmediatePropagation()),_P("up",e),$O({target:t,x:r,y:a}),UP(),DP()}function bQ(e){let t=e;for(;t;){if(t.hasAttribute(mn.resizeHandle))return!0;t=t.parentElement}return!1}function $O({target:e,x:t,y:r}){oc.splice(0);let a=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(a=e),HS.forEach(n=>{let{element:s,hitAreaMargins:i}=n,o=s.getBoundingClientRect(),{bottom:l,left:c,right:u,top:d}=o,f=RHe?i.coarse:i.fine;if(t>=c-f&&t<=u+f&&r>=d-f&&r<=l+f){if(a!==null&&document.contains(a)&&s!==a&&!s.contains(a)&&!a.contains(s)&&AHe(a,s)>0){let m=a,h=!1;for(;m&&!m.contains(s);){if(PHe(m.getBoundingClientRect(),o,!0)){h=!0;break}m=m.parentElement}if(h)return}oc.push(n)}})}function UO(e,t){BP.set(e,t)}function UP(){let e=!1,t=!1;oc.forEach(a=>{let{direction:n}=a;n==="horizontal"?e=!0:t=!0});let r=0;BP.forEach(a=>{r|=a}),e&&t?OO("intersection",r,hd):e?OO("horizontal",r,hd):t?OO("vertical",r,hd):CHe()}var jO;function DP(){var e;(e=jO)===null||e===void 0||e.abort(),jO=new AbortController;let t={capture:!0,signal:jO.signal};HS.size&&(hd?(oc.length>0&&up.forEach((r,a)=>{let{body:n}=a;r>0&&(n.addEventListener("contextmenu",BO,t),n.addEventListener("pointerleave",FO,t),n.addEventListener("pointermove",FO,t))}),up.forEach((r,a)=>{let{body:n}=a;n.addEventListener("pointerup",BO,t),n.addEventListener("pointercancel",BO,t)})):up.forEach((r,a)=>{let{body:n}=a;r>0&&(n.addEventListener("pointerdown",MHe,t),n.addEventListener("pointermove",FO,t))}))}function _P(e,t){HS.forEach(r=>{let{setResizeHandlerState:a}=r,n=oc.includes(r);a(e,n,t)})}function DHe(){let[e,t]=(0,yt.useState)(0);return(0,yt.useCallback)(()=>t(r=>r+1),[])}function vr(e,t){if(!e)throw Error(t)}function yh(e,t,r=VO){return e.toFixed(r)===t.toFixed(r)?0:e>t?1:-1}function md(e,t,r=VO){return yh(e,t,r)===0}function Oo(e,t,r){return yh(e,t,r)===0}function _He(e,t,r){if(e.length!==t.length)return!1;for(let a=0;a<e.length;a++){let n=e[a],s=t[a];if(!Oo(n,s,r))return!1}return!0}function Sx({panelConstraints:e,panelIndex:t,size:r}){let a=e[t];vr(a!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:n=0,collapsible:s,maxSize:i=100,minSize:o=0}=a;if(yh(r,o)<0)if(s){let l=(n+o)/2;yh(r,l)<0?r=n:r=o}else r=o;return r=Math.min(i,r),r=parseFloat(r.toFixed(VO)),r}function VS({delta:e,initialLayout:t,panelConstraints:r,pivotIndices:a,prevLayout:n,trigger:s}){if(Oo(e,0))return t;let i=[...t],[o,l]=a;vr(o!=null,"Invalid first pivot index"),vr(l!=null,"Invalid second pivot index");let c=0;if(s==="keyboard"){{let d=e<0?l:o,f=r[d];vr(f,`Panel constraints not found for index ${d}`);let{collapsedSize:p=0,collapsible:m,minSize:h=0}=f;if(m){let x=t[d];if(vr(x!=null,`Previous layout not found for panel index ${d}`),Oo(x,p)){let g=h-x;yh(g,Math.abs(e))>0&&(e=e<0?0-g:g)}}}{let d=e<0?o:l,f=r[d];vr(f,`No panel constraints found for index ${d}`);let{collapsedSize:p=0,collapsible:m,minSize:h=0}=f;if(m){let x=t[d];if(vr(x!=null,`Previous layout not found for panel index ${d}`),Oo(x,h)){let g=x-p;yh(g,Math.abs(e))>0&&(e=e<0?0-g:g)}}}}{let d=e<0?1:-1,f=e<0?l:o,p=0;for(;;){let h=t[f];vr(h!=null,`Previous layout not found for panel index ${f}`);let g=Sx({panelConstraints:r,panelIndex:f,size:100})-h;if(p+=g,f+=d,f<0||f>=r.length)break}let m=Math.min(Math.abs(e),Math.abs(p));e=e<0?0-m:m}{let f=e<0?o:l;for(;f>=0&&f<r.length;){let p=Math.abs(e)-Math.abs(c),m=t[f];vr(m!=null,`Previous layout not found for panel index ${f}`);let h=m-p,x=Sx({panelConstraints:r,panelIndex:f,size:h});if(!Oo(m,x)&&(c+=m-x,i[f]=x,c.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?f--:f++}}if(_He(n,i))return n;{let d=e<0?l:o,f=t[d];vr(f!=null,`Previous layout not found for panel index ${d}`);let p=f+c,m=Sx({panelConstraints:r,panelIndex:d,size:p});if(i[d]=m,!Oo(m,p)){let h=p-m,g=e<0?l:o;for(;g>=0&&g<r.length;){let y=i[g];vr(y!=null,`Previous layout not found for panel index ${g}`);let b=y+h,S=Sx({panelConstraints:r,panelIndex:g,size:b});if(Oo(y,S)||(h-=S-y,i[g]=S),Oo(h,0))break;e>0?g--:g++}}}let u=i.reduce((d,f)=>f+d,0);return Oo(u,100)?i:n}function OHe({layout:e,panelsArray:t,pivotIndices:r}){let a=0,n=100,s=0,i=0,o=r[0];vr(o!=null,"No pivot index found"),t.forEach((d,f)=>{let{constraints:p}=d,{maxSize:m=100,minSize:h=0}=p;f===o?(a=h,n=m):(s+=h,i+=m)});let l=Math.min(n,100-s),c=Math.max(a,100-i),u=e[o];return{valueMax:l,valueMin:c,valueNow:u}}function $S(e,t=document){return Array.from(t.querySelectorAll(`[${mn.resizeHandleId}][data-panel-group-id="${e}"]`))}function vQ(e,t,r=document){let n=$S(e,r).findIndex(s=>s.getAttribute(mn.resizeHandleId)===t);return n??null}function SQ(e,t,r){let a=vQ(e,t,r);return a!=null?[a,a+1]:[-1,-1]}function FHe(e){return e instanceof HTMLElement?!0:typeof e=="object"&&e!==null&&"tagName"in e&&"getAttribute"in e}function TQ(e,t=document){if(FHe(t)&&t.dataset.panelGroupId==e)return t;let r=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return r||null}function jP(e,t=document){let r=t.querySelector(`[${mn.resizeHandleId}="${e}"]`);return r||null}function BHe(e,t,r,a=document){var n,s,i,o;let l=jP(t,a),c=$S(e,a),u=l?c.indexOf(l):-1,d=(n=(s=r[u])===null||s===void 0?void 0:s.id)!==null&&n!==void 0?n:null,f=(i=(o=r[u+1])===null||o===void 0?void 0:o.id)!==null&&i!==void 0?i:null;return[d,f]}function UHe({committedValuesRef:e,eagerValuesRef:t,groupId:r,layout:a,panelDataArray:n,panelGroupElement:s,setLayout:i}){(0,yt.useRef)({didWarnAboutMissingResizeHandle:!1}),gh(()=>{if(!s)return;let o=$S(r,s);for(let l=0;l<n.length-1;l++){let{valueMax:c,valueMin:u,valueNow:d}=OHe({layout:a,panelsArray:n,pivotIndices:[l,l+1]}),f=o[l];if(f!=null){let p=n[l];vr(p,`No panel data found for index "${l}"`),f.setAttribute("aria-controls",p.id),f.setAttribute("aria-valuemax",""+Math.round(c)),f.setAttribute("aria-valuemin",""+Math.round(u)),f.setAttribute("aria-valuenow",d!=null?""+Math.round(d):"")}}return()=>{o.forEach((l,c)=>{l.removeAttribute("aria-controls"),l.removeAttribute("aria-valuemax"),l.removeAttribute("aria-valuemin"),l.removeAttribute("aria-valuenow")})}},[r,a,n,s]),(0,yt.useEffect)(()=>{if(!s)return;let o=t.current;vr(o,"Eager values not found");let{panelDataArray:l}=o,c=TQ(r,s);vr(c!=null,`No group found for id "${r}"`);let u=$S(r,s);vr(u,`No resize handles found for group id "${r}"`);let d=u.map(f=>{let p=f.getAttribute(mn.resizeHandleId);vr(p,"Resize handle element has no handle id attribute");let[m,h]=BHe(r,p,l,s);if(m==null||h==null)return()=>{};let x=g=>{if(!g.defaultPrevented)switch(g.key){case"Enter":{g.preventDefault();let y=l.findIndex(b=>b.id===m);if(y>=0){let b=l[y];vr(b,`No panel data found for index ${y}`);let S=a[y],{collapsedSize:w=0,collapsible:P,minSize:C=0}=b.constraints;if(S!=null&&P){let I=VS({delta:Oo(S,w)?C-w:w-S,initialLayout:a,panelConstraints:l.map(R=>R.constraints),pivotIndices:SQ(r,p,s),prevLayout:a,trigger:"keyboard"});a!==I&&i(I)}}break}}};return f.addEventListener("keydown",x),()=>{f.removeEventListener("keydown",x)}});return()=>{d.forEach(f=>f())}},[s,e,t,r,a,n,i])}function iQ(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function wQ(e,t){let r=e==="horizontal",{x:a,y:n}=FP(t);return r?a:n}function jHe(e,t,r,a,n){let s=r==="horizontal",i=jP(t,n);vr(i,`No resize handle element found for id "${t}"`);let o=i.getAttribute(mn.groupId);vr(o,"Resize handle element has no group id attribute");let{initialCursorPosition:l}=a,c=wQ(r,e),u=TQ(o,n);vr(u,`No group element found for id "${o}"`);let d=u.getBoundingClientRect(),f=s?d.width:d.height;return(c-l)/f*100}function zHe(e,t,r,a,n,s){if(dQ(e)){let i=r==="horizontal",o=0;e.shiftKey?o=100:n!=null?o=n:o=10;let l=0;switch(e.key){case"ArrowDown":l=i?0:o;break;case"ArrowLeft":l=i?-o:0;break;case"ArrowRight":l=i?o:0;break;case"ArrowUp":l=i?0:-o;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return a==null?0:jHe(e,t,r,a,s)}function VHe({panelDataArray:e}){let t=Array(e.length),r=e.map(s=>s.constraints),a=0,n=100;for(let s=0;s<e.length;s++){let i=r[s];vr(i,`Panel constraints not found for index ${s}`);let{defaultSize:o}=i;o!=null&&(a++,t[s]=o,n-=o)}for(let s=0;s<e.length;s++){let i=r[s];vr(i,`Panel constraints not found for index ${s}`);let{defaultSize:o}=i;if(o!=null)continue;let l=e.length-a,c=n/l;a++,t[s]=c,n-=c}return t}function bx(e,t,r){t.forEach((a,n)=>{let s=e[n];vr(s,`Panel data not found for index ${n}`);let{callbacks:i,constraints:o,id:l}=s,{collapsedSize:c=0,collapsible:u}=o,d=r[l];if(d==null||a!==d){r[l]=a;let{onCollapse:f,onExpand:p,onResize:m}=i;m&&m(a,d),u&&(f||p)&&(p&&(d==null||md(d,c))&&!md(a,c)&&p(),f&&(d==null||!md(d,c))&&md(a,c)&&f())}})}function kP(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!=t[r])return!1;return!0}function qHe({defaultSize:e,dragState:t,layout:r,panelData:a,panelIndex:n,precision:s=3}){let i=r[n],o;return i==null?o=e!=null?e.toFixed(s):"1":a.length===1?o="1":o=i.toFixed(s),{flexBasis:0,flexGrow:o,flexShrink:1,overflow:"hidden",pointerEvents:t!==null?"none":void 0}}function HHe(e,t=10){let r=null;return(...n)=>{r!==null&&clearTimeout(r),r=setTimeout(()=>{e(...n)},t)}}function oQ(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,r)=>{localStorage.setItem(t,r)};else throw new Error("localStorage not supported in this environment")}catch{e.getItem=()=>null,e.setItem=()=>{}}}function CQ(e){return`react-resizable-panels:${e}`}function EQ(e){return e.map(t=>{let{constraints:r,id:a,idIsFromProps:n,order:s}=t;return n?a:s?`${s}:${JSON.stringify(r)}`:JSON.stringify(r)}).sort((t,r)=>t.localeCompare(r)).join(",")}function PQ(e,t){try{let r=CQ(e),a=t.getItem(r);if(a){let n=JSON.parse(a);if(typeof n=="object"&&n!=null)return n}}catch{}return null}function $He(e,t,r){var a,n;let s=(a=PQ(e,r))!==null&&a!==void 0?a:{},i=EQ(t);return(n=s[i])!==null&&n!==void 0?n:null}function GHe(e,t,r,a,n){var s;let i=CQ(e),o=EQ(t),l=(s=PQ(e,n))!==null&&s!==void 0?s:{};l[o]={expandToSizes:Object.fromEntries(r.entries()),layout:a};try{n.setItem(i,JSON.stringify(l))}catch{}}function lQ({layout:e,panelConstraints:t}){let r=[...e],a=r.reduce((s,i)=>s+i,0);if(r.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${r.map(s=>`${s}%`).join(", ")}`);if(!Oo(a,100)&&r.length>0)for(let s=0;s<t.length;s++){let i=r[s];vr(i!=null,`No layout data found for index ${s}`);let o=100/a*i;r[s]=o}let n=0;for(let s=0;s<t.length;s++){let i=r[s];vr(i!=null,`No layout data found for index ${s}`);let o=Sx({panelConstraints:t,panelIndex:s,size:i});i!=o&&(n+=i-o,r[s]=o)}if(!Oo(n,0))for(let s=0;s<t.length;s++){let i=r[s];vr(i!=null,`No layout data found for index ${s}`);let o=i+n,l=Sx({panelConstraints:t,panelIndex:s,size:o});if(i!==l&&(n-=l-i,r[s]=l,Oo(n,0)))break}return r}var KHe=100,qS={getItem:e=>(oQ(qS),qS.getItem(e)),setItem:(e,t)=>{oQ(qS),qS.setItem(e,t)}},cQ={};function AQ({autoSaveId:e=null,children:t,className:r="",direction:a,forwardedRef:n,id:s=null,onLayout:i=null,keyboardResizeBy:o=null,storage:l=qS,style:c,tagName:u="div",...d}){let f=qO(s),p=(0,yt.useRef)(null),[m,h]=(0,yt.useState)(null),[x,g]=(0,yt.useState)([]),y=DHe(),b=(0,yt.useRef)({}),S=(0,yt.useRef)(new Map),w=(0,yt.useRef)(0),P=(0,yt.useRef)({autoSaveId:e,direction:a,dragState:m,id:f,keyboardResizeBy:o,onLayout:i,storage:l}),C=(0,yt.useRef)({layout:x,panelDataArray:[],panelDataArrayChanged:!1});(0,yt.useRef)({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),(0,yt.useImperativeHandle)(n,()=>({getId:()=>P.current.id,getLayout:()=>{let{layout:ae}=C.current;return ae},setLayout:ae=>{let{onLayout:ge}=P.current,{layout:ue,panelDataArray:$}=C.current,A=lQ({layout:ae,panelConstraints:$.map(K=>K.constraints)});iQ(ue,A)||(g(A),C.current.layout=A,ge&&ge(A),bx($,A,b.current))}}),[]),gh(()=>{P.current.autoSaveId=e,P.current.direction=a,P.current.dragState=m,P.current.id=f,P.current.onLayout=i,P.current.storage=l}),UHe({committedValuesRef:P,eagerValuesRef:C,groupId:f,layout:x,panelDataArray:C.current.panelDataArray,setLayout:g,panelGroupElement:p.current}),(0,yt.useEffect)(()=>{let{panelDataArray:ae}=C.current;if(e){if(x.length===0||x.length!==ae.length)return;let ge=cQ[e];ge==null&&(ge=HHe(GHe,KHe),cQ[e]=ge);let ue=[...ae],$=new Map(S.current);ge(e,ue,$,x,l)}},[e,x,l]),(0,yt.useEffect)(()=>{});let I=(0,yt.useCallback)(ae=>{let{onLayout:ge}=P.current,{layout:ue,panelDataArray:$}=C.current;if(ae.constraints.collapsible){let A=$.map(xe=>xe.constraints),{collapsedSize:K=0,panelSize:he,pivotIndices:H}=hh($,ae,ue);if(vr(he!=null,`Panel size not found for panel "${ae.id}"`),!md(he,K)){S.current.set(ae.id,he);let Pe=vx($,ae)===$.length-1?he-K:K-he,Ie=VS({delta:Pe,initialLayout:ue,panelConstraints:A,pivotIndices:H,prevLayout:ue,trigger:"imperative-api"});kP(ue,Ie)||(g(Ie),C.current.layout=Ie,ge&&ge(Ie),bx($,Ie,b.current))}}},[]),R=(0,yt.useCallback)((ae,ge)=>{let{onLayout:ue}=P.current,{layout:$,panelDataArray:A}=C.current;if(ae.constraints.collapsible){let K=A.map(Ve=>Ve.constraints),{collapsedSize:he=0,panelSize:H=0,minSize:xe=0,pivotIndices:Pe}=hh(A,ae,$),Ie=ge??xe;if(md(H,he)){let Ve=S.current.get(ae.id),ft=Ve!=null&&Ve>=Ie?Ve:Ie,Ne=vx(A,ae)===A.length-1?H-ft:ft-H,Be=VS({delta:Ne,initialLayout:$,panelConstraints:K,pivotIndices:Pe,prevLayout:$,trigger:"imperative-api"});kP($,Be)||(g(Be),C.current.layout=Be,ue&&ue(Be),bx(A,Be,b.current))}}},[]),O=(0,yt.useCallback)(ae=>{let{layout:ge,panelDataArray:ue}=C.current,{panelSize:$}=hh(ue,ae,ge);return vr($!=null,`Panel size not found for panel "${ae.id}"`),$},[]),D=(0,yt.useCallback)((ae,ge)=>{let{panelDataArray:ue}=C.current,$=vx(ue,ae);return qHe({defaultSize:ge,dragState:m,layout:x,panelData:ue,panelIndex:$})},[m,x]),W=(0,yt.useCallback)(ae=>{let{layout:ge,panelDataArray:ue}=C.current,{collapsedSize:$=0,collapsible:A,panelSize:K}=hh(ue,ae,ge);return vr(K!=null,`Panel size not found for panel "${ae.id}"`),A===!0&&md(K,$)},[]),J=(0,yt.useCallback)(ae=>{let{layout:ge,panelDataArray:ue}=C.current,{collapsedSize:$=0,collapsible:A,panelSize:K}=hh(ue,ae,ge);return vr(K!=null,`Panel size not found for panel "${ae.id}"`),!A||yh(K,$)>0},[]),me=(0,yt.useCallback)(ae=>{let{panelDataArray:ge}=C.current;ge.push(ae),ge.sort((ue,$)=>{let A=ue.order,K=$.order;return A==null&&K==null?0:A==null?-1:K==null?1:A-K}),C.current.panelDataArrayChanged=!0,y()},[y]);gh(()=>{if(C.current.panelDataArrayChanged){C.current.panelDataArrayChanged=!1;let{autoSaveId:ae,onLayout:ge,storage:ue}=P.current,{layout:$,panelDataArray:A}=C.current,K=null;if(ae){let H=$He(ae,A,ue);H&&(S.current=new Map(Object.entries(H.expandToSizes)),K=H.layout)}K==null&&(K=VHe({panelDataArray:A}));let he=lQ({layout:K,panelConstraints:A.map(H=>H.constraints)});iQ($,he)||(g(he),C.current.layout=he,ge&&ge(he),bx(A,he,b.current))}}),gh(()=>{let ae=C.current;return()=>{ae.layout=[]}},[]);let Z=(0,yt.useCallback)(ae=>{let ge=!1,ue=p.current;return ue&&window.getComputedStyle(ue,null).getPropertyValue("direction")==="rtl"&&(ge=!0),function(A){A.preventDefault();let K=p.current;if(!K)return()=>null;let{direction:he,dragState:H,id:xe,keyboardResizeBy:Pe,onLayout:Ie}=P.current,{layout:Ve,panelDataArray:ft}=C.current,{initialLayout:we}=H??{},Ne=SQ(xe,ae,K),Be=zHe(A,ae,he,H,Pe,K),tt=he==="horizontal";tt&&ge&&(Be=-Be);let Ct=ft.map(Ur=>Ur.constraints),Tt=VS({delta:Be,initialLayout:we??Ve,panelConstraints:Ct,pivotIndices:Ne,prevLayout:Ve,trigger:dQ(A)?"keyboard":"mouse-or-touch"}),Qt=!kP(Ve,Tt);(fQ(A)||pQ(A))&&w.current!=Be&&(w.current=Be,!Qt&&Be!==0?tt?UO(ae,Be<0?hQ:gQ):UO(ae,Be<0?yQ:xQ):UO(ae,0)),Qt&&(g(Tt),C.current.layout=Tt,Ie&&Ie(Tt),bx(ft,Tt,b.current))}},[]),q=(0,yt.useCallback)((ae,ge)=>{let{onLayout:ue}=P.current,{layout:$,panelDataArray:A}=C.current,K=A.map(Ve=>Ve.constraints),{panelSize:he,pivotIndices:H}=hh(A,ae,$);vr(he!=null,`Panel size not found for panel "${ae.id}"`);let Pe=vx(A,ae)===A.length-1?he-ge:ge-he,Ie=VS({delta:Pe,initialLayout:$,panelConstraints:K,pivotIndices:H,prevLayout:$,trigger:"imperative-api"});kP($,Ie)||(g(Ie),C.current.layout=Ie,ue&&ue(Ie),bx(A,Ie,b.current))},[]),V=(0,yt.useCallback)((ae,ge)=>{let{layout:ue,panelDataArray:$}=C.current,{collapsedSize:A=0,collapsible:K}=ge,{collapsedSize:he=0,collapsible:H,maxSize:xe=100,minSize:Pe=0}=ae.constraints,{panelSize:Ie}=hh($,ae,ue);Ie!=null&&(K&&H&&md(Ie,A)?md(A,he)||q(ae,he):Ie<Pe?q(ae,Pe):Ie>xe&&q(ae,xe))},[q]),L=(0,yt.useCallback)((ae,ge)=>{let{direction:ue}=P.current,{layout:$}=C.current;if(!p.current)return;let A=jP(ae,p.current);vr(A,`Drag handle element not found for id "${ae}"`);let K=wQ(ue,ge);h({dragHandleId:ae,dragHandleRect:A.getBoundingClientRect(),initialCursorPosition:K,initialLayout:$})},[]),k=(0,yt.useCallback)(()=>{h(null)},[]),_=(0,yt.useCallback)(ae=>{let{panelDataArray:ge}=C.current,ue=vx(ge,ae);ue>=0&&(ge.splice(ue,1),delete b.current[ae.id],C.current.panelDataArrayChanged=!0,y())},[y]),ee=(0,yt.useMemo)(()=>({collapsePanel:I,direction:a,dragState:m,expandPanel:R,getPanelSize:O,getPanelStyle:D,groupId:f,isPanelCollapsed:W,isPanelExpanded:J,reevaluatePanelConstraints:V,registerPanel:me,registerResizeHandle:Z,resizePanel:q,startDragging:L,stopDragging:k,unregisterPanel:_,panelGroupElement:p.current}),[I,m,a,R,O,D,f,W,J,V,me,Z,q,L,k,_]),ie={display:"flex",flexDirection:a==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return(0,yt.createElement)(OP.Provider,{value:ee},(0,yt.createElement)(u,{...d,children:t,className:r,id:s,ref:p,style:{...ie,...c},[mn.group]:"",[mn.groupDirection]:a,[mn.groupId]:f}))}var GO=(0,yt.forwardRef)((e,t)=>(0,yt.createElement)(AQ,{...e,forwardedRef:t}));AQ.displayName="PanelGroup";GO.displayName="forwardRef(PanelGroup)";function vx(e,t){return e.findIndex(r=>r===t||r.id===t.id)}function hh(e,t,r){let a=vx(e,t),s=a===e.length-1?[a-1,a]:[a,a+1],i=r[a];return{...t.constraints,panelSize:i,pivotIndices:s}}function WHe({disabled:e,handleId:t,resizeHandler:r,panelGroupElement:a}){(0,yt.useEffect)(()=>{if(e||r==null||a==null)return;let n=jP(t,a);if(n==null)return;let s=i=>{if(!i.defaultPrevented)switch(i.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{i.preventDefault(),r(i);break}case"F6":{i.preventDefault();let o=n.getAttribute(mn.groupId);vr(o,`No group element found for id "${o}"`);let l=$S(o,a),c=vQ(o,t,a);vr(c!==null,`No resize element found for id "${t}"`);let u=i.shiftKey?c>0?c-1:l.length-1:c+1<l.length?c+1:0;l[u].focus();break}}};return n.addEventListener("keydown",s),()=>{n.removeEventListener("keydown",s)}},[a,e,t,r])}function KO({children:e=null,className:t="",disabled:r=!1,hitAreaMargins:a,id:n,onBlur:s,onClick:i,onDragging:o,onFocus:l,onPointerDown:c,onPointerUp:u,style:d={},tabIndex:f=0,tagName:p="div",...m}){var h,x;let g=(0,yt.useRef)(null),y=(0,yt.useRef)({onClick:i,onDragging:o,onPointerDown:c,onPointerUp:u});(0,yt.useEffect)(()=>{y.current.onClick=i,y.current.onDragging=o,y.current.onPointerDown=c,y.current.onPointerUp=u});let b=(0,yt.useContext)(OP);if(b===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");let{direction:S,groupId:w,registerResizeHandle:P,startDragging:C,stopDragging:I,panelGroupElement:R}=b,O=qO(n),[D,W]=(0,yt.useState)("inactive"),[J,me]=(0,yt.useState)(!1),[Z,q]=(0,yt.useState)(null),V=(0,yt.useRef)({state:D});gh(()=>{V.current.state=D}),(0,yt.useEffect)(()=>{if(r)q(null);else{let ee=P(O);q(()=>ee)}},[r,O,P]);let L=(h=a?.coarse)!==null&&h!==void 0?h:15,k=(x=a?.fine)!==null&&x!==void 0?x:5;return(0,yt.useEffect)(()=>{if(r||Z==null)return;let ee=g.current;vr(ee,"Element ref not attached");let ie=!1;return kHe(O,ee,S,{coarse:L,fine:k},(ge,ue,$)=>{if(!ue){W("inactive");return}switch(ge){case"down":{W("drag"),ie=!1,vr($,'Expected event to be defined for "down" action'),C(O,$);let{onDragging:A,onPointerDown:K}=y.current;A?.(!0),K?.();break}case"move":{let{state:A}=V.current;ie=!0,A!=="drag"&&W("hover"),vr($,'Expected event to be defined for "move" action'),Z($);break}case"up":{W("hover"),I();let{onClick:A,onDragging:K,onPointerUp:he}=y.current;K?.(!1),he?.(),ie||A?.();break}}})},[L,S,r,k,P,O,Z,C,I]),WHe({disabled:r,handleId:O,resizeHandler:Z,panelGroupElement:R}),(0,yt.createElement)(p,{...m,children:e,className:t,id:n,onBlur:()=>{me(!1),s?.()},onFocus:()=>{me(!0),l?.()},ref:g,role:"separator",style:{...{touchAction:"none",userSelect:"none"},...d},tabIndex:f,[mn.groupDirection]:S,[mn.groupId]:w,[mn.resizeHandle]:"",[mn.resizeHandleActive]:D==="drag"?"pointer":J?"keyboard":void 0,[mn.resizeHandleEnabled]:!r,[mn.resizeHandleId]:O,[mn.resizeHandleState]:D})}KO.displayName="PanelResizeHandle";var Tx=N(ce());function zP({className:e,...t}){return(0,Tx.jsx)(GO,{"data-slot":"resizable-panel-group",className:oe("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t})}function dp({...e}){return(0,Tx.jsx)(HO,{"data-slot":"resizable-panel",...e})}function wx({withHandle:e,className:t,...r}){return(0,Tx.jsx)(KO,{"data-slot":"resizable-handle",className:oe("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),...r,children:e&&(0,Tx.jsx)("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:(0,Tx.jsx)(lS,{className:"size-2.5"})})})}var mr=N(Le(),1);var GS=N(Le(),1);var VP=N(ce(),1);var YHe=Symbol("radix.slottable");function IQ(e){let t=({children:r})=>(0,VP.jsx)(VP.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=YHe,t}var jn=N(ce(),1),[qP,_Tt]=Pa("Tooltip",[ld]),HP=ld(),NQ="TooltipProvider",JHe=700,WO="tooltip.open",[QHe,YO]=qP(NQ),LQ=e=>{let{__scopeTooltip:t,delayDuration:r=JHe,skipDelayDuration:a=300,disableHoverableContent:n=!1,children:s}=e,i=mr.useRef(!0),o=mr.useRef(!1),l=mr.useRef(0);return mr.useEffect(()=>{let c=l.current;return()=>window.clearTimeout(c)},[]),(0,jn.jsx)(QHe,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:mr.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:mr.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,a)},[a]),isPointerInTransitRef:o,onPointerInTransitChange:mr.useCallback(c=>{o.current=c},[]),disableHoverableContent:n,children:s})};LQ.displayName=NQ;var KS="Tooltip",[ZHe,WS]=qP(KS),RQ=e=>{let{__scopeTooltip:t,children:r,open:a,defaultOpen:n,onOpenChange:s,disableHoverableContent:i,delayDuration:o}=e,l=YO(KS,e.__scopeTooltip),c=HP(t),[u,d]=mr.useState(null),f=pn(),p=mr.useRef(0),m=i??l.disableHoverableContent,h=o??l.delayDuration,x=mr.useRef(!1),[g,y]=qs({prop:a,defaultProp:n??!1,onChange:C=>{C?(l.onOpen(),document.dispatchEvent(new CustomEvent(WO))):l.onClose(),s?.(C)},caller:KS}),b=mr.useMemo(()=>g?x.current?"delayed-open":"instant-open":"closed",[g]),S=mr.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x.current=!1,y(!0)},[y]),w=mr.useCallback(()=>{window.clearTimeout(p.current),p.current=0,y(!1)},[y]),P=mr.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{x.current=!0,y(!0),p.current=0},h)},[h,y]);return mr.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),(0,jn.jsx)(oh,{...c,children:(0,jn.jsx)(ZHe,{scope:t,contentId:f,open:g,stateAttribute:b,trigger:u,onTriggerChange:d,onTriggerEnter:mr.useCallback(()=>{l.isOpenDelayedRef.current?P():S()},[l.isOpenDelayedRef,P,S]),onTriggerLeave:mr.useCallback(()=>{m?w():(window.clearTimeout(p.current),p.current=0)},[w,m]),onOpen:S,onClose:w,disableHoverableContent:m,children:r})})};RQ.displayName=KS;var XO="TooltipTrigger",kQ=mr.forwardRef((e,t)=>{let{__scopeTooltip:r,...a}=e,n=WS(XO,r),s=YO(XO,r),i=HP(r),o=mr.useRef(null),l=Ht(t,o,n.onTriggerChange),c=mr.useRef(!1),u=mr.useRef(!1),d=mr.useCallback(()=>c.current=!1,[]);return mr.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),(0,jn.jsx)(ix,{asChild:!0,...i,children:(0,jn.jsx)(lt.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...a,ref:l,onPointerMove:Ye(e.onPointerMove,f=>{f.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),u.current=!0)}),onPointerLeave:Ye(e.onPointerLeave,()=>{n.onTriggerLeave(),u.current=!1}),onPointerDown:Ye(e.onPointerDown,()=>{n.open&&n.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Ye(e.onFocus,()=>{c.current||n.onOpen()}),onBlur:Ye(e.onBlur,n.onClose),onClick:Ye(e.onClick,n.onClose)})})});kQ.displayName=XO;var JO="TooltipPortal",[e7e,t7e]=qP(JO,{forceMount:void 0}),MQ=e=>{let{__scopeTooltip:t,forceMount:r,children:a,container:n}=e,s=WS(JO,t);return(0,jn.jsx)(e7e,{scope:t,forceMount:r,children:(0,jn.jsx)($a,{present:r||s.open,children:(0,jn.jsx)(cd,{asChild:!0,container:n,children:a})})})};MQ.displayName=JO;var Cx="TooltipContent",DQ=mr.forwardRef((e,t)=>{let r=t7e(Cx,e.__scopeTooltip),{forceMount:a=r.forceMount,side:n="top",...s}=e,i=WS(Cx,e.__scopeTooltip);return(0,jn.jsx)($a,{present:a||i.open,children:i.disableHoverableContent?(0,jn.jsx)(_Q,{side:n,...s,ref:t}):(0,jn.jsx)(r7e,{side:n,...s,ref:t})})}),r7e=mr.forwardRef((e,t)=>{let r=WS(Cx,e.__scopeTooltip),a=YO(Cx,e.__scopeTooltip),n=mr.useRef(null),s=Ht(t,n),[i,o]=mr.useState(null),{trigger:l,onClose:c}=r,u=n.current,{onPointerInTransitChange:d}=a,f=mr.useCallback(()=>{o(null),d(!1)},[d]),p=mr.useCallback((m,h)=>{let x=m.currentTarget,g={x:m.clientX,y:m.clientY},y=i7e(g,x.getBoundingClientRect()),b=o7e(g,y),S=l7e(h.getBoundingClientRect()),w=u7e([...b,...S]);o(w),d(!0)},[d]);return mr.useEffect(()=>()=>f(),[f]),mr.useEffect(()=>{if(l&&u){let m=x=>p(x,u),h=x=>p(x,l);return l.addEventListener("pointerleave",m),u.addEventListener("pointerleave",h),()=>{l.removeEventListener("pointerleave",m),u.removeEventListener("pointerleave",h)}}},[l,u,p,f]),mr.useEffect(()=>{if(i){let m=h=>{let x=h.target,g={x:h.clientX,y:h.clientY},y=l?.contains(x)||u?.contains(x),b=!c7e(g,i);y?f():b&&(f(),c())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[l,u,i,c,f]),(0,jn.jsx)(_Q,{...e,ref:s})}),[a7e,n7e]=qP(KS,{isInside:!1}),s7e=IQ("TooltipContent"),_Q=mr.forwardRef((e,t)=>{let{__scopeTooltip:r,children:a,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:i,...o}=e,l=WS(Cx,r),c=HP(r),{onClose:u}=l;return mr.useEffect(()=>(document.addEventListener(WO,u),()=>document.removeEventListener(WO,u)),[u]),mr.useEffect(()=>{if(l.trigger){let d=f=>{f.target?.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),(0,jn.jsx)(ud,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:(0,jn.jsxs)(ox,{"data-state":l.stateAttribute,...c,...o,ref:t,style:{...o.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,jn.jsx)(s7e,{children:a}),(0,jn.jsx)(a7e,{scope:r,isInside:!0,children:(0,jn.jsx)(LY,{id:l.contentId,role:"tooltip",children:n||a})})]})})});DQ.displayName=Cx;var OQ="TooltipArrow",FQ=mr.forwardRef((e,t)=>{let{__scopeTooltip:r,...a}=e,n=HP(r);return n7e(OQ,r).isInside?null:(0,jn.jsx)(lx,{...n,...a,ref:t})});FQ.displayName=OQ;function i7e(e,t){let r=Math.abs(t.top-e.y),a=Math.abs(t.bottom-e.y),n=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(r,a,n,s)){case s:return"left";case n:return"right";case r:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function o7e(e,t,r=5){let a=[];switch(t){case"top":a.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":a.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":a.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":a.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return a}function l7e(e){let{top:t,right:r,bottom:a,left:n}=e;return[{x:n,y:t},{x:r,y:t},{x:r,y:a},{x:n,y:a}]}function c7e(e,t){let{x:r,y:a}=e,n=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){let o=t[s],l=t[i],c=o.x,u=o.y,d=l.x,f=l.y;u>a!=f>a&&r<(d-c)*(a-u)/(f-u)+c&&(n=!n)}return n}function u7e(e){let t=e.slice();return t.sort((r,a)=>r.x<a.x?-1:r.x>a.x?1:r.y<a.y?-1:r.y>a.y?1:0),d7e(t)}function d7e(e){if(e.length<=1)return e.slice();let t=[];for(let a=0;a<e.length;a++){let n=e[a];for(;t.length>=2;){let s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(n.y-i.y)>=(s.y-i.y)*(n.x-i.x))t.pop();else break}t.push(n)}t.pop();let r=[];for(let a=e.length-1;a>=0;a--){let n=e[a];for(;r.length>=2;){let s=r[r.length-1],i=r[r.length-2];if((s.x-i.x)*(n.y-i.y)>=(s.y-i.y)*(n.x-i.x))r.pop();else break}r.push(n)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var BQ=LQ,UQ=RQ,jQ=kQ,zQ=MQ,VQ=DQ,qQ=FQ;var gd=N(ce());function zn({delayDuration:e=0,...t}){return(0,gd.jsx)(BQ,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Ka({...e}){return(0,gd.jsx)(zn,{children:(0,gd.jsx)(UQ,{"data-slot":"tooltip",...e})})}function Wa({...e}){return(0,gd.jsx)(jQ,{"data-slot":"tooltip-trigger",...e})}function Xa({className:e,sideOffset:t=0,children:r,...a}){return(0,gd.jsx)(zQ,{children:(0,gd.jsxs)(VQ,{"data-slot":"tooltip-content",sideOffset:t,className:oe("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...a,children:[r,(0,gd.jsx)(qQ,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}var us=N(Le(),1);var At=N(Le(),1);var cs=N(Le(),1);var $P=N(ce(),1);function HQ(e){let t=p7e(e),r=cs.forwardRef((a,n)=>{let{children:s,...i}=a,o=cs.Children.toArray(s),l=o.find(h7e);if(l){let c=l.props.children,u=o.map(d=>d===l?cs.Children.count(c)>1?cs.Children.only(null):cs.isValidElement(c)?c.props.children:null:d);return(0,$P.jsx)(t,{...i,ref:n,children:cs.isValidElement(c)?cs.cloneElement(c,void 0,u):null})}return(0,$P.jsx)(t,{...i,ref:n,children:s})});return r.displayName=`${e}.Slot`,r}function p7e(e){let t=cs.forwardRef((r,a)=>{let{children:n,...s}=r;if(cs.isValidElement(n)){let i=y7e(n),o=g7e(s,n.props);return n.type!==cs.Fragment&&(o.ref=a?Vs(a,i):i),cs.cloneElement(n,o)}return cs.Children.count(n)>1?cs.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var m7e=Symbol("radix.slottable");function h7e(e){return cs.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===m7e}function g7e(e,t){let r={...t};for(let a in t){let n=e[a],s=t[a];/^on[A-Z]/.test(a)?n&&s?r[a]=(...o)=>{let l=s(...o);return n(...o),l}:n&&(r[a]=n):a==="style"?r[a]={...n,...s}:a==="className"&&(r[a]=[n,s].filter(Boolean).join(" "))}return{...e,...r}}function y7e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var tr=N(ce(),1),QO=["Enter"," "],x7e=["ArrowDown","PageUp","Home"],GQ=["ArrowUp","PageDown","End"],b7e=[...x7e,...GQ],v7e={ltr:[...QO,"ArrowRight"],rtl:[...QO,"ArrowLeft"]},S7e={ltr:["ArrowLeft"],rtl:["ArrowRight"]},QS="Menu",[YS,T7e,w7e]=ux(QS),[xh,ZO]=Pa(QS,[w7e,ld,xx]),ZS=ld(),KQ=xx(),[WQ,fp]=xh(QS),[C7e,eT]=xh(QS),XQ=e=>{let{__scopeMenu:t,open:r=!1,children:a,dir:n,onOpenChange:s,modal:i=!0}=e,o=ZS(t),[l,c]=At.useState(null),u=At.useRef(!1),d=Aa(s),f=au(n);return At.useEffect(()=>{let p=()=>{u.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>u.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),(0,tr.jsx)(oh,{...o,children:(0,tr.jsx)(WQ,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:c,children:(0,tr.jsx)(C7e,{scope:t,onClose:At.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:i,children:a})})})};XQ.displayName=QS;var E7e="MenuAnchor",e3=At.forwardRef((e,t)=>{let{__scopeMenu:r,...a}=e,n=ZS(r);return(0,tr.jsx)(ix,{...n,...a,ref:t})});e3.displayName=E7e;var t3="MenuPortal",[P7e,YQ]=xh(t3,{forceMount:void 0}),JQ=e=>{let{__scopeMenu:t,forceMount:r,children:a,container:n}=e,s=fp(t3,t);return(0,tr.jsx)(P7e,{scope:t,forceMount:r,children:(0,tr.jsx)($a,{present:r||s.open,children:(0,tr.jsx)(cd,{asChild:!0,container:n,children:a})})})};JQ.displayName=t3;var kl="MenuContent",[A7e,r3]=xh(kl),QQ=At.forwardRef((e,t)=>{let r=YQ(kl,e.__scopeMenu),{forceMount:a=r.forceMount,...n}=e,s=fp(kl,e.__scopeMenu),i=eT(kl,e.__scopeMenu);return(0,tr.jsx)(YS.Provider,{scope:e.__scopeMenu,children:(0,tr.jsx)($a,{present:a||s.open,children:(0,tr.jsx)(YS.Slot,{scope:e.__scopeMenu,children:i.modal?(0,tr.jsx)(I7e,{...n,ref:t}):(0,tr.jsx)(N7e,{...n,ref:t})})})})}),I7e=At.forwardRef((e,t)=>{let r=fp(kl,e.__scopeMenu),a=At.useRef(null),n=Ht(t,a);return At.useEffect(()=>{let s=a.current;if(s)return px(s)},[]),(0,tr.jsx)(a3,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:Ye(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),N7e=At.forwardRef((e,t)=>{let r=fp(kl,e.__scopeMenu);return(0,tr.jsx)(a3,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),L7e=HQ("MenuContent.ScrollLock"),a3=At.forwardRef((e,t)=>{let{__scopeMenu:r,loop:a=!1,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:o,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,x=fp(kl,r),g=eT(kl,r),y=ZS(r),b=KQ(r),S=T7e(r),[w,P]=At.useState(null),C=At.useRef(null),I=Ht(t,C,x.onContentChange),R=At.useRef(0),O=At.useRef(""),D=At.useRef(0),W=At.useRef(null),J=At.useRef("right"),me=At.useRef(0),Z=m?fh:At.Fragment,q=m?{as:L7e,allowPinchZoom:!0}:void 0,V=k=>{let _=O.current+k,ee=S().filter(A=>!A.disabled),ie=document.activeElement,ae=ee.find(A=>A.ref.current===ie)?.textValue,ge=ee.map(A=>A.textValue),ue=q7e(ge,_,ae),$=ee.find(A=>A.textValue===ue)?.ref.current;(function A(K){O.current=K,window.clearTimeout(R.current),K!==""&&(R.current=window.setTimeout(()=>A(""),1e3))})(_),$&&setTimeout(()=>$.focus())};At.useEffect(()=>()=>window.clearTimeout(R.current),[]),dx();let L=At.useCallback(k=>J.current===W.current?.side&&$7e(k,W.current?.area),[]);return(0,tr.jsx)(A7e,{scope:r,searchRef:O,onItemEnter:At.useCallback(k=>{L(k)&&k.preventDefault()},[L]),onItemLeave:At.useCallback(k=>{L(k)||(C.current?.focus(),P(null))},[L]),onTriggerLeave:At.useCallback(k=>{L(k)&&k.preventDefault()},[L]),pointerGraceTimerRef:D,onPointerGraceIntentChange:At.useCallback(k=>{W.current=k},[]),children:(0,tr.jsx)(Z,{...q,children:(0,tr.jsx)(lh,{asChild:!0,trapped:n,onMountAutoFocus:Ye(s,k=>{k.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:(0,tr.jsx)(ud,{asChild:!0,disableOutsidePointerEvents:o,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,tr.jsx)(NP,{asChild:!0,...b,dir:g.dir,orientation:"vertical",loop:a,currentTabStopId:w,onCurrentTabStopIdChange:P,onEntryFocus:Ye(l,k=>{g.isUsingKeyboardRef.current||k.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,tr.jsx)(ox,{role:"menu","aria-orientation":"vertical","data-state":mZ(x.open),"data-radix-menu-content":"",dir:g.dir,...y,...h,ref:I,style:{outline:"none",...h.style},onKeyDown:Ye(h.onKeyDown,k=>{let ee=k.target.closest("[data-radix-menu-content]")===k.currentTarget,ie=k.ctrlKey||k.altKey||k.metaKey,ae=k.key.length===1;ee&&(k.key==="Tab"&&k.preventDefault(),!ie&&ae&&V(k.key));let ge=C.current;if(k.target!==ge||!b7e.includes(k.key))return;k.preventDefault();let $=S().filter(A=>!A.disabled).map(A=>A.ref.current);GQ.includes(k.key)&&$.reverse(),z7e($)}),onBlur:Ye(e.onBlur,k=>{k.currentTarget.contains(k.target)||(window.clearTimeout(R.current),O.current="")}),onPointerMove:Ye(e.onPointerMove,JS(k=>{let _=k.target,ee=me.current!==k.clientX;if(k.currentTarget.contains(_)&&ee){let ie=k.clientX>me.current?"right":"left";J.current=ie,me.current=k.clientX}}))})})})})})})});QQ.displayName=kl;var R7e="MenuGroup",n3=At.forwardRef((e,t)=>{let{__scopeMenu:r,...a}=e;return(0,tr.jsx)(lt.div,{role:"group",...a,ref:t})});n3.displayName=R7e;var k7e="MenuLabel",ZQ=At.forwardRef((e,t)=>{let{__scopeMenu:r,...a}=e;return(0,tr.jsx)(lt.div,{...a,ref:t})});ZQ.displayName=k7e;var GP="MenuItem",$Q="menu.itemSelect",WP=At.forwardRef((e,t)=>{let{disabled:r=!1,onSelect:a,...n}=e,s=At.useRef(null),i=eT(GP,e.__scopeMenu),o=r3(GP,e.__scopeMenu),l=Ht(t,s),c=At.useRef(!1),u=()=>{let d=s.current;if(!r&&d){let f=new CustomEvent($Q,{bubbles:!0,cancelable:!0});d.addEventListener($Q,p=>a?.(p),{once:!0}),_E(d,f),f.defaultPrevented?c.current=!1:i.onClose()}};return(0,tr.jsx)(eZ,{...n,ref:l,disabled:r,onClick:Ye(e.onClick,u),onPointerDown:d=>{e.onPointerDown?.(d),c.current=!0},onPointerUp:Ye(e.onPointerUp,d=>{c.current||d.currentTarget?.click()}),onKeyDown:Ye(e.onKeyDown,d=>{let f=o.searchRef.current!=="";r||f&&d.key===" "||QO.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});WP.displayName=GP;var eZ=At.forwardRef((e,t)=>{let{__scopeMenu:r,disabled:a=!1,textValue:n,...s}=e,i=r3(GP,r),o=KQ(r),l=At.useRef(null),c=Ht(t,l),[u,d]=At.useState(!1),[f,p]=At.useState("");return At.useEffect(()=>{let m=l.current;m&&p((m.textContent??"").trim())},[s.children]),(0,tr.jsx)(YS.ItemSlot,{scope:r,disabled:a,textValue:n??f,children:(0,tr.jsx)(LP,{asChild:!0,...o,focusable:!a,children:(0,tr.jsx)(lt.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...s,ref:c,onPointerMove:Ye(e.onPointerMove,JS(m=>{a?i.onItemLeave(m):(i.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ye(e.onPointerLeave,JS(m=>i.onItemLeave(m))),onFocus:Ye(e.onFocus,()=>d(!0)),onBlur:Ye(e.onBlur,()=>d(!1))})})})}),M7e="MenuCheckboxItem",tZ=At.forwardRef((e,t)=>{let{checked:r=!1,onCheckedChange:a,...n}=e;return(0,tr.jsx)(iZ,{scope:e.__scopeMenu,checked:r,children:(0,tr.jsx)(WP,{role:"menuitemcheckbox","aria-checked":KP(r)?"mixed":r,...n,ref:t,"data-state":o3(r),onSelect:Ye(n.onSelect,()=>a?.(KP(r)?!0:!r),{checkForDefaultPrevented:!1})})})});tZ.displayName=M7e;var rZ="MenuRadioGroup",[D7e,_7e]=xh(rZ,{value:void 0,onValueChange:()=>{}}),aZ=At.forwardRef((e,t)=>{let{value:r,onValueChange:a,...n}=e,s=Aa(a);return(0,tr.jsx)(D7e,{scope:e.__scopeMenu,value:r,onValueChange:s,children:(0,tr.jsx)(n3,{...n,ref:t})})});aZ.displayName=rZ;var nZ="MenuRadioItem",sZ=At.forwardRef((e,t)=>{let{value:r,...a}=e,n=_7e(nZ,e.__scopeMenu),s=r===n.value;return(0,tr.jsx)(iZ,{scope:e.__scopeMenu,checked:s,children:(0,tr.jsx)(WP,{role:"menuitemradio","aria-checked":s,...a,ref:t,"data-state":o3(s),onSelect:Ye(a.onSelect,()=>n.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});sZ.displayName=nZ;var s3="MenuItemIndicator",[iZ,O7e]=xh(s3,{checked:!1}),oZ=At.forwardRef((e,t)=>{let{__scopeMenu:r,forceMount:a,...n}=e,s=O7e(s3,r);return(0,tr.jsx)($a,{present:a||KP(s.checked)||s.checked===!0,children:(0,tr.jsx)(lt.span,{...n,ref:t,"data-state":o3(s.checked)})})});oZ.displayName=s3;var F7e="MenuSeparator",lZ=At.forwardRef((e,t)=>{let{__scopeMenu:r,...a}=e;return(0,tr.jsx)(lt.div,{role:"separator","aria-orientation":"horizontal",...a,ref:t})});lZ.displayName=F7e;var B7e="MenuArrow",cZ=At.forwardRef((e,t)=>{let{__scopeMenu:r,...a}=e,n=ZS(r);return(0,tr.jsx)(lx,{...n,...a,ref:t})});cZ.displayName=B7e;var i3="MenuSub",[U7e,uZ]=xh(i3),j7e=e=>{let{__scopeMenu:t,children:r,open:a=!1,onOpenChange:n}=e,s=fp(i3,t),i=ZS(t),[o,l]=At.useState(null),[c,u]=At.useState(null),d=Aa(n);return At.useEffect(()=>(s.open===!1&&d(!1),()=>d(!1)),[s.open,d]),(0,tr.jsx)(oh,{...i,children:(0,tr.jsx)(WQ,{scope:t,open:a,onOpenChange:d,content:c,onContentChange:u,children:(0,tr.jsx)(U7e,{scope:t,contentId:pn(),triggerId:pn(),trigger:o,onTriggerChange:l,children:r})})})};j7e.displayName=i3;var XS="MenuSubTrigger",dZ=At.forwardRef((e,t)=>{let r=fp(XS,e.__scopeMenu),a=eT(XS,e.__scopeMenu),n=uZ(XS,e.__scopeMenu),s=r3(XS,e.__scopeMenu),i=At.useRef(null),{pointerGraceTimerRef:o,onPointerGraceIntentChange:l}=s,c={__scopeMenu:e.__scopeMenu},u=At.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return At.useEffect(()=>u,[u]),At.useEffect(()=>{let d=o.current;return()=>{window.clearTimeout(d),l(null)}},[o,l]),(0,tr.jsx)(e3,{asChild:!0,...c,children:(0,tr.jsx)(eZ,{id:n.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":n.contentId,"data-state":mZ(r.open),...e,ref:Vs(t,n.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:Ye(e.onPointerMove,JS(d=>{s.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!r.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{r.onOpenChange(!0),u()},100))})),onPointerLeave:Ye(e.onPointerLeave,JS(d=>{u();let f=r.content?.getBoundingClientRect();if(f){let p=r.content?.dataset.side,m=p==="right",h=m?-5:5,x=f[m?"left":"right"],g=f[m?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+h,y:d.clientY},{x,y:f.top},{x:g,y:f.top},{x:g,y:f.bottom},{x,y:f.bottom}],side:p}),window.clearTimeout(o.current),o.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(d),d.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:Ye(e.onKeyDown,d=>{let f=s.searchRef.current!=="";e.disabled||f&&d.key===" "||v7e[a.dir].includes(d.key)&&(r.onOpenChange(!0),r.content?.focus(),d.preventDefault())})})})});dZ.displayName=XS;var fZ="MenuSubContent",pZ=At.forwardRef((e,t)=>{let r=YQ(kl,e.__scopeMenu),{forceMount:a=r.forceMount,...n}=e,s=fp(kl,e.__scopeMenu),i=eT(kl,e.__scopeMenu),o=uZ(fZ,e.__scopeMenu),l=At.useRef(null),c=Ht(t,l);return(0,tr.jsx)(YS.Provider,{scope:e.__scopeMenu,children:(0,tr.jsx)($a,{present:a||s.open,children:(0,tr.jsx)(YS.Slot,{scope:e.__scopeMenu,children:(0,tr.jsx)(a3,{id:o.contentId,"aria-labelledby":o.triggerId,...n,ref:c,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{i.isUsingKeyboardRef.current&&l.current?.focus(),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:Ye(e.onFocusOutside,u=>{u.target!==o.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:Ye(e.onEscapeKeyDown,u=>{i.onClose(),u.preventDefault()}),onKeyDown:Ye(e.onKeyDown,u=>{let d=u.currentTarget.contains(u.target),f=S7e[i.dir].includes(u.key);d&&f&&(s.onOpenChange(!1),o.trigger?.focus(),u.preventDefault())})})})})})});pZ.displayName=fZ;function mZ(e){return e?"open":"closed"}function KP(e){return e==="indeterminate"}function o3(e){return KP(e)?"indeterminate":e?"checked":"unchecked"}function z7e(e){let t=document.activeElement;for(let r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function V7e(e,t){return e.map((r,a)=>e[(t+a)%e.length])}function q7e(e,t,r){let n=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,s=r?e.indexOf(r):-1,i=V7e(e,Math.max(s,0));n.length===1&&(i=i.filter(c=>c!==r));let l=i.find(c=>c.toLowerCase().startsWith(n.toLowerCase()));return l!==r?l:void 0}function H7e(e,t){let{x:r,y:a}=e,n=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){let o=t[s],l=t[i],c=o.x,u=o.y,d=l.x,f=l.y;u>a!=f>a&&r<(d-c)*(a-u)/(f-u)+c&&(n=!n)}return n}function $7e(e,t){if(!t)return!1;let r={x:e.clientX,y:e.clientY};return H7e(r,t)}function JS(e){return t=>t.pointerType==="mouse"?e(t):void 0}var hZ=XQ,gZ=e3,yZ=JQ,xZ=QQ,bZ=n3,vZ=ZQ,SZ=WP,TZ=tZ,wZ=aZ,CZ=sZ,EZ=oZ,PZ=lZ,AZ=cZ;var IZ=dZ,NZ=pZ;var Cs=N(ce(),1),XP="DropdownMenu",[K7e,fwt]=Pa(XP,[ZO]),Pi=ZO(),[W7e,LZ]=K7e(XP),RZ=e=>{let{__scopeDropdownMenu:t,children:r,dir:a,open:n,defaultOpen:s,onOpenChange:i,modal:o=!0}=e,l=Pi(t),c=us.useRef(null),[u,d]=qs({prop:n,defaultProp:s??!1,onChange:i,caller:XP});return(0,Cs.jsx)(W7e,{scope:t,triggerId:pn(),triggerRef:c,contentId:pn(),open:u,onOpenChange:d,onOpenToggle:us.useCallback(()=>d(f=>!f),[d]),modal:o,children:(0,Cs.jsx)(hZ,{...l,open:u,onOpenChange:d,dir:a,modal:o,children:r})})};RZ.displayName=XP;var kZ="DropdownMenuTrigger",MZ=us.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,disabled:a=!1,...n}=e,s=LZ(kZ,r),i=Pi(r);return(0,Cs.jsx)(gZ,{asChild:!0,...i,children:(0,Cs.jsx)(lt.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":a?"":void 0,disabled:a,...n,ref:Vs(t,s.triggerRef),onPointerDown:Ye(e.onPointerDown,o=>{!a&&o.button===0&&o.ctrlKey===!1&&(s.onOpenToggle(),s.open||o.preventDefault())}),onKeyDown:Ye(e.onKeyDown,o=>{a||(["Enter"," "].includes(o.key)&&s.onOpenToggle(),o.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(o.key)&&o.preventDefault())})})})});MZ.displayName=kZ;var X7e="DropdownMenuPortal",DZ=e=>{let{__scopeDropdownMenu:t,...r}=e,a=Pi(t);return(0,Cs.jsx)(yZ,{...a,...r})};DZ.displayName=X7e;var _Z="DropdownMenuContent",OZ=us.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...a}=e,n=LZ(_Z,r),s=Pi(r),i=us.useRef(!1);return(0,Cs.jsx)(xZ,{id:n.contentId,"aria-labelledby":n.triggerId,...s,...a,ref:t,onCloseAutoFocus:Ye(e.onCloseAutoFocus,o=>{i.current||n.triggerRef.current?.focus(),i.current=!1,o.preventDefault()}),onInteractOutside:Ye(e.onInteractOutside,o=>{let l=o.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;(!n.modal||u)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});OZ.displayName=_Z;var Y7e="DropdownMenuGroup",J7e=us.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...a}=e,n=Pi(r);return(0,Cs.jsx)(bZ,{...n,...a,ref:t})});J7e.displayName=Y7e;var Q7e="DropdownMenuLabel",FZ=us.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...a}=e,n=Pi(r);return(0,Cs.jsx)(vZ,{...n,...a,ref:t})});FZ.displayName=Q7e;var Z7e="DropdownMenuItem",BZ=us.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...a}=e,n=Pi(r);return(0,Cs.jsx)(SZ,{...n,...a,ref:t})});BZ.displayName=Z7e;var e$e="DropdownMenuCheckboxItem",UZ=us.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...a}=e,n=Pi(r);return(0,Cs.jsx)(TZ,{...n,...a,ref:t})});UZ.displayName=e$e;var t$e="DropdownMenuRadioGroup",r$e=us.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...a}=e,n=Pi(r);return(0,Cs.jsx)(wZ,{...n,...a,ref:t})});r$e.displayName=t$e;var a$e="DropdownMenuRadioItem",n$e=us.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...a}=e,n=Pi(r);return(0,Cs.jsx)(CZ,{...n,...a,ref:t})});n$e.displayName=a$e;var s$e="DropdownMenuItemIndicator",jZ=us.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...a}=e,n=Pi(r);return(0,Cs.jsx)(EZ,{...n,...a,ref:t})});jZ.displayName=s$e;var i$e="DropdownMenuSeparator",zZ=us.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...a}=e,n=Pi(r);return(0,Cs.jsx)(PZ,{...n,...a,ref:t})});zZ.displayName=i$e;var o$e="DropdownMenuArrow",l$e=us.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...a}=e,n=Pi(r);return(0,Cs.jsx)(AZ,{...n,...a,ref:t})});l$e.displayName=o$e;var c$e="DropdownMenuSubTrigger",u$e=us.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...a}=e,n=Pi(r);return(0,Cs.jsx)(IZ,{...n,...a,ref:t})});u$e.displayName=c$e;var d$e="DropdownMenuSubContent",f$e=us.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...a}=e,n=Pi(r);return(0,Cs.jsx)(NZ,{...n,...a,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});f$e.displayName=d$e;var VZ=RZ,qZ=MZ,HZ=DZ,$Z=OZ;var GZ=FZ,KZ=BZ,WZ=UZ;var XZ=jZ,YZ=zZ;qt();var Fo=N(ce());function Vn({...e}){return(0,Fo.jsx)(VZ,{"data-slot":"dropdown-menu",...e})}function qn({...e}){return(0,Fo.jsx)(qZ,{"data-slot":"dropdown-menu-trigger",...e})}function Hn({className:e,sideOffset:t=4,...r}){return(0,Fo.jsx)(HZ,{children:(0,Fo.jsx)($Z,{"data-slot":"dropdown-menu-content",sideOffset:t,className:oe("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 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...r})})}function Xr({className:e,inset:t,variant:r="default",...a}){return(0,Fo.jsx)(KZ,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":r,className:oe("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_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]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...a})}function Ai({className:e,children:t,checked:r,...a}){return(0,Fo.jsxs)(WZ,{"data-slot":"dropdown-menu-checkbox-item",className:oe("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:r,...a,children:[(0,Fo.jsx)("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:(0,Fo.jsx)(XZ,{children:(0,Fo.jsx)(Jl,{className:"size-4"})})}),t]})}function Ex({className:e,inset:t,...r}){return(0,Fo.jsx)(GZ,{"data-slot":"dropdown-menu-label","data-inset":t,className:oe("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...r})}function Ml({className:e,...t}){return(0,Fo.jsx)(YZ,{"data-slot":"dropdown-menu-separator",className:oe("bg-border -mx-1 my-1 h-px",e),...t})}var pp=N(Le());var yd=N(ce()),m$e=pp.forwardRef(({className:e,...t},r)=>(0,yd.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,yd.jsx)("table",{ref:r,"data-slot":"table",className:oe("w-full caption-bottom text-sm",e),...t})}));m$e.displayName="Table";var bh=pp.forwardRef(({className:e,...t},r)=>(0,yd.jsx)("thead",{ref:r,"data-slot":"table-header",className:oe("[&_tr]:border-b",e),...t}));bh.displayName="TableHeader";var vh=pp.forwardRef(({className:e,...t},r)=>(0,yd.jsx)("tbody",{ref:r,"data-slot":"table-body",className:oe("[&_tr:last-child]:border-0",e),...t}));vh.displayName="TableBody";var h$e=pp.forwardRef(({className:e,...t},r)=>(0,yd.jsx)("tfoot",{ref:r,"data-slot":"table-footer",className:oe("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",e),...t}));h$e.displayName="TableFooter";var su=pp.forwardRef(({className:e,...t},r)=>(0,yd.jsx)("tr",{ref:r,"data-slot":"table-row",className:oe("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t}));su.displayName="TableRow";var Sh=pp.forwardRef(({className:e,...t},r)=>(0,yd.jsx)("th",{ref:r,"data-slot":"table-head",className:oe("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));Sh.displayName="TableHead";var Th=pp.forwardRef(({className:e,...t},r)=>(0,yd.jsx)("td",{ref:r,"data-slot":"table-cell",className:oe("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));Th.displayName="TableCell";er();var JZ=N(ce());var Ia=N(Le(),1);var ds=N(Le(),1);var YP=N(ce(),1);function QZ(e){let t=g$e(e),r=ds.forwardRef((a,n)=>{let{children:s,...i}=a,o=ds.Children.toArray(s),l=o.find(x$e);if(l){let c=l.props.children,u=o.map(d=>d===l?ds.Children.count(c)>1?ds.Children.only(null):ds.isValidElement(c)?c.props.children:null:d);return(0,YP.jsx)(t,{...i,ref:n,children:ds.isValidElement(c)?ds.cloneElement(c,void 0,u):null})}return(0,YP.jsx)(t,{...i,ref:n,children:s})});return r.displayName=`${e}.Slot`,r}function g$e(e){let t=ds.forwardRef((r,a)=>{let{children:n,...s}=r;if(ds.isValidElement(n)){let i=v$e(n),o=b$e(s,n.props);return n.type!==ds.Fragment&&(o.ref=a?Vs(a,i):i),ds.cloneElement(n,o)}return ds.Children.count(n)>1?ds.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var y$e=Symbol("radix.slottable");function x$e(e){return ds.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===y$e}function b$e(e,t){let r={...t};for(let a in t){let n=e[a],s=t[a];/^on[A-Z]/.test(a)?n&&s?r[a]=(...o)=>{let l=s(...o);return n(...o),l}:n&&(r[a]=n):a==="style"?r[a]={...n,...s}:a==="className"&&(r[a]=[n,s].filter(Boolean).join(" "))}return{...e,...r}}function v$e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var ha=N(ce(),1),QP="Dialog",[ZZ,Gwt]=Pa(QP),[S$e,lc]=ZZ(QP),eee=e=>{let{__scopeDialog:t,children:r,open:a,defaultOpen:n,onOpenChange:s,modal:i=!0}=e,o=Ia.useRef(null),l=Ia.useRef(null),[c,u]=qs({prop:a,defaultProp:n??!1,onChange:s,caller:QP});return(0,ha.jsx)(S$e,{scope:t,triggerRef:o,contentRef:l,contentId:pn(),titleId:pn(),descriptionId:pn(),open:c,onOpenChange:u,onOpenToggle:Ia.useCallback(()=>u(d=>!d),[u]),modal:i,children:r})};eee.displayName=QP;var tee="DialogTrigger",T$e=Ia.forwardRef((e,t)=>{let{__scopeDialog:r,...a}=e,n=lc(tee,r),s=Ht(t,n.triggerRef);return(0,ha.jsx)(lt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":u3(n.open),...a,ref:s,onClick:Ye(e.onClick,n.onOpenToggle)})});T$e.displayName=tee;var l3="DialogPortal",[w$e,ree]=ZZ(l3,{forceMount:void 0}),aee=e=>{let{__scopeDialog:t,forceMount:r,children:a,container:n}=e,s=lc(l3,t);return(0,ha.jsx)(w$e,{scope:t,forceMount:r,children:Ia.Children.map(a,i=>(0,ha.jsx)($a,{present:r||s.open,children:(0,ha.jsx)(cd,{asChild:!0,container:n,children:i})}))})};aee.displayName=l3;var JP="DialogOverlay",nee=Ia.forwardRef((e,t)=>{let r=ree(JP,e.__scopeDialog),{forceMount:a=r.forceMount,...n}=e,s=lc(JP,e.__scopeDialog);return s.modal?(0,ha.jsx)($a,{present:a||s.open,children:(0,ha.jsx)(E$e,{...n,ref:t})}):null});nee.displayName=JP;var C$e=QZ("DialogOverlay.RemoveScroll"),E$e=Ia.forwardRef((e,t)=>{let{__scopeDialog:r,...a}=e,n=lc(JP,r);return(0,ha.jsx)(fh,{as:C$e,allowPinchZoom:!0,shards:[n.contentRef],children:(0,ha.jsx)(lt.div,{"data-state":u3(n.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),wh="DialogContent",see=Ia.forwardRef((e,t)=>{let r=ree(wh,e.__scopeDialog),{forceMount:a=r.forceMount,...n}=e,s=lc(wh,e.__scopeDialog);return(0,ha.jsx)($a,{present:a||s.open,children:s.modal?(0,ha.jsx)(P$e,{...n,ref:t}):(0,ha.jsx)(A$e,{...n,ref:t})})});see.displayName=wh;var P$e=Ia.forwardRef((e,t)=>{let r=lc(wh,e.__scopeDialog),a=Ia.useRef(null),n=Ht(t,r.contentRef,a);return Ia.useEffect(()=>{let s=a.current;if(s)return px(s)},[]),(0,ha.jsx)(iee,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ye(e.onCloseAutoFocus,s=>{s.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:Ye(e.onPointerDownOutside,s=>{let i=s.detail.originalEvent,o=i.button===0&&i.ctrlKey===!0;(i.button===2||o)&&s.preventDefault()}),onFocusOutside:Ye(e.onFocusOutside,s=>s.preventDefault())})}),A$e=Ia.forwardRef((e,t)=>{let r=lc(wh,e.__scopeDialog),a=Ia.useRef(!1),n=Ia.useRef(!1);return(0,ha.jsx)(iee,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(a.current||r.triggerRef.current?.focus(),s.preventDefault()),a.current=!1,n.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(a.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));let i=s.target;r.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),iee=Ia.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:a,onOpenAutoFocus:n,onCloseAutoFocus:s,...i}=e,o=lc(wh,r),l=Ia.useRef(null),c=Ht(t,l);return dx(),(0,ha.jsxs)(ha.Fragment,{children:[(0,ha.jsx)(lh,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:n,onUnmountAutoFocus:s,children:(0,ha.jsx)(ud,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":u3(o.open),...i,ref:c,onDismiss:()=>o.onOpenChange(!1)})}),(0,ha.jsxs)(ha.Fragment,{children:[(0,ha.jsx)(I$e,{titleId:o.titleId}),(0,ha.jsx)(L$e,{contentRef:l,descriptionId:o.descriptionId})]})]})}),c3="DialogTitle",oee=Ia.forwardRef((e,t)=>{let{__scopeDialog:r,...a}=e,n=lc(c3,r);return(0,ha.jsx)(lt.h2,{id:n.titleId,...a,ref:t})});oee.displayName=c3;var lee="DialogDescription",cee=Ia.forwardRef((e,t)=>{let{__scopeDialog:r,...a}=e,n=lc(lee,r);return(0,ha.jsx)(lt.p,{id:n.descriptionId,...a,ref:t})});cee.displayName=lee;var uee="DialogClose",dee=Ia.forwardRef((e,t)=>{let{__scopeDialog:r,...a}=e,n=lc(uee,r);return(0,ha.jsx)(lt.button,{type:"button",...a,ref:t,onClick:Ye(e.onClick,()=>n.onOpenChange(!1))})});dee.displayName=uee;function u3(e){return e?"open":"closed"}var fee="DialogTitleWarning",[Kwt,pee]=pW(fee,{contentName:wh,titleName:c3,docsSlug:"dialog"}),I$e=({titleId:e})=>{let t=pee(fee),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
|
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
|
|
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return Ia.useEffect(()=>{if(e){let a=document.getElementById(e)}},[r,e]),null},N$e="DialogDescriptionWarning",L$e=({contentRef:e,descriptionId:t})=>{let a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${pee(N$e).contentName}}.`;return Ia.useEffect(()=>{let n=e.current?.getAttribute("aria-describedby");if(t&&n){let s=document.getElementById(t)}},[a,e,t]),null},mee=eee;var hee=aee,gee=nee,yee=see,xee=oee,bee=cee,vee=dee;qt();var Ii=N(ce());function xd({...e}){return(0,Ii.jsx)(mee,{"data-slot":"dialog",...e})}function k$e({...e}){return(0,Ii.jsx)(hee,{"data-slot":"dialog-portal",...e})}function M$e({className:e,...t}){return(0,Ii.jsx)(gee,{"data-slot":"dialog-overlay",className:oe("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function bd({className:e,children:t,showCloseButton:r=!0,...a}){return(0,Ii.jsxs)(k$e,{"data-slot":"dialog-portal",children:[(0,Ii.jsx)(M$e,{}),(0,Ii.jsxs)(yee,{"data-slot":"dialog-content",className:oe("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...a,children:[t,r&&(0,Ii.jsxs)(vee,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,Ii.jsx)(eh,{}),(0,Ii.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function vd({className:e,...t}){return(0,Ii.jsx)("div",{"data-slot":"dialog-header",className:oe("flex flex-col gap-2 text-center sm:text-left",e),...t})}function Ch({className:e,...t}){return(0,Ii.jsx)("div",{"data-slot":"dialog-footer",className:oe("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function Sd({className:e,...t}){return(0,Ii.jsx)(xee,{"data-slot":"dialog-title",className:oe("text-lg leading-none font-semibold",e),...t})}function Px({className:e,...t}){return(0,Ii.jsx)(bee,{"data-slot":"dialog-description",className:oe("text-muted-foreground text-sm",e),...t})}var See=N(ce());function Bo({className:e,...t}){return(0,See.jsx)("textarea",{"data-slot":"textarea",className:oe("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}var Dl=N(Le(),1),D$e=(e,t,r,a,n,s,i,o)=>{let l=document.documentElement,c=["light","dark"];function u(p){(Array.isArray(e)?e:[e]).forEach(m=>{let h=m==="class",x=h&&s?n.map(g=>s[g]||g):n;h?(l.classList.remove(...x),l.classList.add(s&&s[p]?s[p]:p)):l.setAttribute(m,p)}),d(p)}function d(p){o&&c.includes(p)&&(l.style.colorScheme=p)}function f(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(a)u(a);else try{let p=localStorage.getItem(t)||r,m=i&&p==="system"?f():p;u(m)}catch{}};var eCt=Dl.createContext(void 0);var tCt=Dl.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:a,enableColorScheme:n,defaultTheme:s,value:i,themes:o,nonce:l,scriptProps:c})=>{let u=JSON.stringify([r,t,s,e,o,i,a,n]).slice(1,-1);return Dl.createElement("script",{...c,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${D$e.toString()})(${u})`}})});var Ax=N(Le(),1),O$e=N(ff(),1);function _$e(e){if(!e||typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}var aCt=Array(12).fill(0);var d3=1,f3=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;let{message:a,...n}=t,s=typeof t?.id=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:d3++,i=this.toasts.find(l=>l.id===s),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...t,id:s,title:a}),{...l,...t,id:s,dismissible:o,title:a}):l):this.addToast({title:a,...n,dismissible:o,id:s}),s},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:t,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(a=>a({id:r.id,dismiss:!0}))}),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let a;r.loading!==void 0&&(a=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));let n=Promise.resolve(t instanceof Function?t():t),s=a!==void 0,i,o=n.then(async c=>{if(i=["resolve",c],Ax.default.isValidElement(c))s=!1,this.create({id:a,type:"default",message:c});else if(B$e(c)&&!c.ok){s=!1;let d=typeof r.error=="function"?await r.error(`HTTP error! status: ${c.status}`):r.error,f=typeof r.description=="function"?await r.description(`HTTP error! status: ${c.status}`):r.description,m=typeof d=="object"&&!Ax.default.isValidElement(d)?d:{message:d};this.create({id:a,type:"error",description:f,...m})}else if(c instanceof Error){s=!1;let d=typeof r.error=="function"?await r.error(c):r.error,f=typeof r.description=="function"?await r.description(c):r.description,m=typeof d=="object"&&!Ax.default.isValidElement(d)?d:{message:d};this.create({id:a,type:"error",description:f,...m})}else if(r.success!==void 0){s=!1;let d=typeof r.success=="function"?await r.success(c):r.success,f=typeof r.description=="function"?await r.description(c):r.description,m=typeof d=="object"&&!Ax.default.isValidElement(d)?d:{message:d};this.create({id:a,type:"success",description:f,...m})}}).catch(async c=>{if(i=["reject",c],r.error!==void 0){s=!1;let u=typeof r.error=="function"?await r.error(c):r.error,d=typeof r.description=="function"?await r.description(c):r.description,p=typeof u=="object"&&!Ax.default.isValidElement(u)?u:{message:u};this.create({id:a,type:"error",description:d,...p})}}).finally(()=>{s&&(this.dismiss(a),a=void 0),r.finally==null||r.finally.call(r)}),l=()=>new Promise((c,u)=>o.then(()=>i[0]==="reject"?u(i[1]):c(i[1])).catch(u));return typeof a!="string"&&typeof a!="number"?{unwrap:l}:Object.assign(a,{unwrap:l})},this.custom=(t,r)=>{let a=r?.id||d3++;return this.create({jsx:t(a),id:a,...r}),a},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},_l=new f3,F$e=(e,t)=>{let r=t?.id||d3++;return _l.addToast({title:e,...t,id:r}),r},B$e=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",U$e=F$e,j$e=()=>_l.toasts,z$e=()=>_l.getActiveToasts(),Ni=Object.assign(U$e,{success:_l.success,info:_l.info,warning:_l.warning,error:_l.error,custom:_l.custom,message:_l.message,promise:_l.promise,dismiss:_l.dismiss,loading:_l.loading},{getHistory:j$e,getToasts:z$e});_$e("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");var V$e=N(ce());var na=N(Le()),Db=require("obsidian"),_b=N(require("path")),cI=N(fs());er();var xp=N(Le(),1),Are=N(ff(),1);function Ah(e,t,r){let a=r.initialDeps??[],n,s=!0;function i(){var o,l,c;let u;r.key&&((o=r.debug)!=null&&o.call(r))&&(u=Date.now());let d=e();if(!(d.length!==a.length||d.some((m,h)=>a[h]!==m)))return n;a=d;let p;if(r.key&&((l=r.debug)!=null&&l.call(r))&&(p=Date.now()),n=t(...d),r.key&&((c=r.debug)!=null&&c.call(r))){let m=Math.round((Date.now()-u)*100)/100,x=Math.round((Date.now()-p)*100)/100/16,g=(y,b)=>{for(y=String(y);y.length<b;)y=" "+y;return y}}return r?.onChange&&!(s&&r.skipInitialOnChange)&&r.onChange(n),s=!1,n}return i.updateDeps=o=>{a=o},i}function A3(e,t){if(e===void 0)throw new Error(`Unexpected undefined${t?`: ${t}`:""}`);return e}var yre=(e,t)=>Math.abs(e-t)<1.01,xre=(e,t,r)=>{let a;return function(...n){e.clearTimeout(a),a=e.setTimeout(()=>t.apply(this,n),r)}};var bre=e=>{let{offsetWidth:t,offsetHeight:r}=e;return{width:t,height:r}},$Ke=e=>e,GKe=e=>{let t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),a=[];for(let n=t;n<=r;n++)a.push(n);return a},Tre=(e,t)=>{let r=e.scrollElement;if(!r)return;let a=e.targetWindow;if(!a)return;let n=i=>{let{width:o,height:l}=i;t({width:Math.round(o),height:Math.round(l)})};if(n(bre(r)),!a.ResizeObserver)return()=>{};let s=new a.ResizeObserver(i=>{let o=()=>{let l=i[0];if(l?.borderBoxSize){let c=l.borderBoxSize[0];if(c){n({width:c.inlineSize,height:c.blockSize});return}}n(bre(r))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()});return s.observe(r,{box:"border-box"}),()=>{s.unobserve(r)}},vre={passive:!0};var Sre=typeof window>"u"?!0:"onscrollend"in window,wre=(e,t)=>{let r=e.scrollElement;if(!r)return;let a=e.targetWindow;if(!a)return;let n=0,s=e.options.useScrollendEvent&&Sre?()=>{}:xre(a,()=>{t(n,!1)},e.options.isScrollingResetDelay),i=u=>()=>{let{horizontal:d,isRtl:f}=e.options;n=d?r.scrollLeft*(f&&-1||1):r.scrollTop,s(),t(n,u)},o=i(!0),l=i(!1);r.addEventListener("scroll",o,vre);let c=e.options.useScrollendEvent&&Sre;return c&&r.addEventListener("scrollend",l,vre),()=>{r.removeEventListener("scroll",o),c&&r.removeEventListener("scrollend",l)}};var KKe=(e,t,r)=>{if(t?.borderBoxSize){let a=t.borderBoxSize[0];if(a)return Math.round(a[r.options.horizontal?"inlineSize":"blockSize"])}return e[r.options.horizontal?"offsetWidth":"offsetHeight"]};var Cre=(e,{adjustments:t=0,behavior:r},a)=>{var n,s;let i=e+t;(s=(n=a.scrollElement)==null?void 0:n.scrollTo)==null||s.call(n,{[a.options.horizontal?"left":"top"]:i,behavior:r})},cA=class{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var r,a,n;return((n=(a=(r=this.targetWindow)==null?void 0:r.performance)==null?void 0:a.now)==null?void 0:n.call(a))??Date.now()},this.observer=(()=>{let r=null,a=()=>r||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:r=new this.targetWindow.ResizeObserver(n=>{n.forEach(s=>{let i=()=>{this._measureElement(s.target,s)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()})}));return{disconnect:()=>{var n;(n=a())==null||n.disconnect(),r=null},observe:n=>{var s;return(s=a())==null?void 0:s.observe(n,{box:"border-box"})},unobserve:n=>{var s;return(s=a())==null?void 0:s.unobserve(n)}}})(),this.range=null,this.setOptions=r=>{Object.entries(r).forEach(([a,n])=>{typeof n>"u"&&delete r[a]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:$Ke,rangeExtractor:GKe,onChange:()=>{},measureElement:KKe,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...r}},this.notify=r=>{var a,n;(n=(a=this.options).onChange)==null||n.call(a,this,r)},this.maybeNotify=Ah(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),r=>{this.notify(r)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(r=>r()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var r;let a=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==a){if(this.cleanup(),!a){this.maybeNotify();return}this.scrollElement=a,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((r=this.scrollElement)==null?void 0:r.window)??null,this.elementsCache.forEach(n=>{this.observer.observe(n)}),this.unsubs.push(this.options.observeElementRect(this,n=>{this.scrollRect=n,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(n,s)=>{this.scrollAdjustments=0,this.scrollDirection=s?this.getScrollOffset()<n?"forward":"backward":null,this.scrollOffset=n,this.isScrolling=s,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(r,a)=>{let n=new Map,s=new Map;for(let i=a-1;i>=0;i--){let o=r[i];if(n.has(o.lane))continue;let l=s.get(o.lane);if(l==null||o.end>l.end?s.set(o.lane,o):o.end<l.end&&n.set(o.lane,!0),n.size===this.options.lanes)break}return s.size===this.options.lanes?Array.from(s.values()).sort((i,o)=>i.end===o.end?i.index-o.index:i.end-o.end)[0]:void 0},this.getMeasurementOptions=Ah(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(r,a,n,s,i,o)=>(this.prevLanes!==void 0&&this.prevLanes!==o&&(this.lanesChangedFlag=!0),this.prevLanes=o,this.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:a,scrollMargin:n,getItemKey:s,enabled:i,lanes:o}),{key:!1}),this.getMeasurements=Ah(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:r,paddingStart:a,scrollMargin:n,getItemKey:s,enabled:i,lanes:o},l)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>r)for(let f of this.laneAssignments.keys())f>=r&&this.laneAssignments.delete(f);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(f=>{this.itemSizeCache.set(f.key,f.size)}));let c=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===r&&(this.lanesSettling=!1);let u=this.measurementsCache.slice(0,c),d=new Array(o).fill(void 0);for(let f=0;f<c;f++){let p=u[f];p&&(d[p.lane]=f)}for(let f=c;f<r;f++){let p=s(f),m=this.laneAssignments.get(f),h,x;if(m!==void 0&&this.options.lanes>1){h=m;let S=d[h],w=S!==void 0?u[S]:void 0;x=w?w.end+this.options.gap:a+n}else{let S=this.options.lanes===1?u[f-1]:this.getFurthestMeasurement(u,f);x=S?S.end+this.options.gap:a+n,h=S?S.lane:f%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(f,h)}let g=l.get(p),y=typeof g=="number"?g:this.options.estimateSize(f),b=x+y;u[f]={index:f,start:x,size:y,end:b,key:p,lane:h},d[h]=f}return this.measurementsCache=u,u},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Ah(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(r,a,n,s)=>this.range=r.length>0&&a>0?WKe({measurements:r,outerSize:a,scrollOffset:n,lanes:s}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Ah(()=>{let r=null,a=null,n=this.calculateRange();return n&&(r=n.startIndex,a=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,r,a]),[this.options.rangeExtractor,this.options.overscan,this.options.count,r,a]},(r,a,n,s,i)=>s===null||i===null?[]:r({startIndex:s,endIndex:i,overscan:a,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=r=>{let a=this.options.indexAttribute,n=r.getAttribute(a);return n?parseInt(n,10):-1},this.shouldMeasureDuringScroll=r=>{var a;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;let n=this.scrollState.index??((a=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:a.index);if(n!==void 0&&this.range){let s=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),i=Math.max(0,n-s),o=Math.min(this.options.count-1,n+s);return r>=i&&r<=o}return!0},this._measureElement=(r,a)=>{if(!r.isConnected){this.observer.unobserve(r);return}let n=this.indexFromElement(r),s=this.measurementsCache[n];if(!s)return;let i=s.key,o=this.elementsCache.get(i);o!==r&&(o&&this.observer.unobserve(o),this.observer.observe(r),this.elementsCache.set(i,r)),this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(r,a,this))},this.resizeItem=(r,a)=>{var n;let s=this.measurementsCache[r];if(!s)return;let i=this.itemSizeCache.get(s.key)??s.size,o=a-i;o!==0&&(((n=this.scrollState)==null?void 0:n.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(s,o,this):s.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(s.index),this.itemSizeCache=new Map(this.itemSizeCache.set(s.key,a)),this.notify(!1))},this.measureElement=r=>{if(!r){this.elementsCache.forEach((a,n)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(n))});return}this._measureElement(r,void 0)},this.getVirtualItems=Ah(()=>[this.getVirtualIndexes(),this.getMeasurements()],(r,a)=>{let n=[];for(let s=0,i=r.length;s<i;s++){let o=r[s],l=a[o];n.push(l)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=r=>{let a=this.getMeasurements();if(a.length!==0)return A3(a[Ere(0,a.length-1,n=>A3(a[n]).start,r)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let r=this.scrollElement.document.documentElement;return this.options.horizontal?r.scrollWidth-this.scrollElement.innerWidth:r.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(r,a,n=0)=>{if(!this.scrollElement)return 0;let s=this.getSize(),i=this.getScrollOffset();a==="auto"&&(a=r>=i+s?"end":"start"),a==="center"?r+=(n-s)/2:a==="end"&&(r-=s);let o=this.getMaxScrollOffset();return Math.max(Math.min(o,r),0)},this.getOffsetForIndex=(r,a="auto")=>{r=Math.max(0,Math.min(r,this.options.count-1));let n=this.getSize(),s=this.getScrollOffset(),i=this.measurementsCache[r];if(!i)return;if(a==="auto")if(i.end>=s+n-this.options.scrollPaddingEnd)a="end";else if(i.start<=s+this.options.scrollPaddingStart)a="start";else return[s,a];if(a==="end"&&r===this.options.count-1)return[this.getMaxScrollOffset(),a];let o=a==="end"?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(o,a,i.size),a]},this.scrollToOffset=(r,{align:a="start",behavior:n="auto"}={})=>{let s=this.getOffsetForAlignment(r,a),i=this.now();this.scrollState={index:null,align:a,behavior:n,startedAt:i,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(r,{align:a="auto",behavior:n="auto"}={})=>{r=Math.max(0,Math.min(r,this.options.count-1));let s=this.getOffsetForIndex(r,a);if(!s)return;let[i,o]=s,l=this.now();this.scrollState={index:r,align:o,behavior:n,startedAt:l,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(r,{behavior:a="auto"}={})=>{let n=this.getScrollOffset()+r,s=this.now();this.scrollState={index:null,align:"start",behavior:a,startedAt:s,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:a}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var r;let a=this.getMeasurements(),n;if(a.length===0)n=this.options.paddingStart;else if(this.options.lanes===1)n=((r=a[a.length-1])==null?void 0:r.end)??0;else{let s=Array(this.options.lanes).fill(null),i=a.length-1;for(;i>=0&&s.some(o=>o===null);){let o=a[i];s[o.lane]===null&&(s[o.lane]=o.end),i--}n=Math.max(...s.filter(o=>o!==null))}return Math.max(n-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(r,{adjustments:a,behavior:n})=>{this.options.scrollToFn(r,{behavior:n,adjustments:a},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;let r=5e3;if(this.now()-this.scrollState.startedAt>r){this.scrollState=null;return}let a=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,n=a?a[0]:this.scrollState.lastTargetOffset,s=1,i=n!==this.scrollState.lastTargetOffset;if(!i&&yre(n,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=s){this.scrollState=null;return}}else this.scrollState.stableFrames=0,i&&(this.scrollState.lastTargetOffset=n,this.scrollState.behavior="auto",this._scrollToOffset(n,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}},Ere=(e,t,r,a)=>{for(;e<=t;){let n=(e+t)/2|0,s=r(n);if(s<a)e=n+1;else if(s>a)t=n-1;else return n}return e>0?e-1:0};function WKe({measurements:e,outerSize:t,scrollOffset:r,lanes:a}){let n=e.length-1,s=l=>e[l].start;if(e.length<=a)return{startIndex:0,endIndex:n};let i=Ere(0,n,s,r),o=i;if(a===1)for(;o<n&&e[o].end<r+t;)o++;else if(a>1){let l=Array(a).fill(0);for(;o<n&&l.some(u=>u<r+t);){let u=e[o];l[u.lane]=u.end,o++}let c=Array(a).fill(r+t);for(;i>=0&&c.some(u=>u>=r);){let u=e[i];c[u.lane]=u.start,i--}i=Math.max(0,i-i%a),o=Math.min(n,o+(a-1-o%a))}return{startIndex:i,endIndex:o}}var Pre=typeof document<"u"?xp.useLayoutEffect:xp.useEffect;function XKe({useFlushSync:e=!0,...t}){let r=xp.useReducer(()=>({}),{})[1],a={...t,onChange:(s,i)=>{var o;e&&i?(0,Are.flushSync)(r):r(),(o=t.onChange)==null||o.call(t,s,i)}},[n]=xp.useState(()=>new cA(a));return n.setOptions(a),Pre(()=>n._didMount(),[]),Pre(()=>n._willUpdate()),n}function ni(e){return XKe({observeElementRect:Tre,observeElementOffset:wre,scrollToFn:Cre,...e})}qt();Vt();var bp=N(fs()),Ire=N(require("path")),I3="json";function Mx(e,t){bp.ensureDirSync(Ire.dirname(e));let r=JSON.stringify(t,null,4);bp.writeFileSync(e,r,"utf-8")}function $n(e){if(!bp.existsSync(e))return null;try{let t=bp.readFileSync(e,"utf-8");return JSON.parse(t)}catch{return null}}Vt();var Hp=N(Le()),Une=N(require("path")),Bl=N(fs());er();qt();Vt();Vt();var Sr=N(Le()),An=N(require("path")),uo=N(fs()),mne=require("obsidian");qt();ty();Vt();var IT=N(Le());er();var Cd=N(Le());qt();var Nre=N(Le());var vp=N(ce()),qr=(0,Nre.memo)(({title:e,icon:t,extra:r,children:a,className:n="",headerClassName:s=""})=>(0,vp.jsxs)(is,{className:"p-0 gap-0 overflow-hidden rounded-xl bg-card shadow-sm transition-all duration-300 hover:shadow-md border",children:[(0,vp.jsxs)("div",{className:`h-8 flex items-center justify-between px-3 py-2 border-b ${s}`,children:[(0,vp.jsxs)("h3",{className:"text-sm font-semibold tracking-tight text-foreground flex items-center gap-1.5",children:[t&&(0,vp.jsx)(t,{className:"w-4 h-4"}),e]}),r&&(0,vp.jsx)("div",{className:"flex items-center",children:r})]}),(0,vp.jsx)("div",{className:`p-3 ${n}`,children:a})]}));qr.displayName="TemplateCard";er();var hn=N(ce()),uA=(0,Cd.memo)(({label:e,value:t,bgClass:r,textClass:a,dotClass:n,labelTextClass:s})=>(0,hn.jsxs)("div",{className:`rounded-lg p-2.5 transition-all duration-300 group ${r}`,children:[(0,hn.jsxs)("div",{className:`text-xs mb-0.75 flex items-center ${s}`,children:[(0,hn.jsx)("span",{className:`mr-1.5 inline-block w-1.5 h-1.5 rounded-full ${n}`}),e]}),(0,hn.jsx)("div",{className:`text-xl font-bold transition-transform duration-300 group-hover:translate-x-1 ${a}`,children:t})]}),(e,t)=>e.value===t.value&&e.label===t.label&&e.bgClass===t.bgClass&&e.textClass===t.textClass&&e.dotClass===t.dotClass&&e.labelTextClass===t.labelTextClass),Lre=(0,Cd.memo)(({progress:e})=>{let{t}=ze(),r=(0,Cd.useMemo)(()=>({width:`${e}%`}),[e]),a=(0,Cd.useMemo)(()=>2e3/(e||1),[e]),n=(0,Cd.useMemo)(()=>({animation:`shine ${a}ms infinite`}),[a]);return(0,hn.jsxs)("div",{className:"px-3 pb-3",children:[(0,hn.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,hn.jsx)("span",{className:"text-xs text-muted-foreground",children:t("Editor.Stats.Progress")}),(0,hn.jsxs)("span",{className:"text-xs font-medium text-muted-foreground",children:[e,"%"]})]}),(0,hn.jsx)("div",{className:"relative h-2.5 w-full rounded-full bg-muted overflow-hidden shadow-inner [&:before]:absolute [&:before]:inset-0 [&:before]:bg-gradient-to-r [&:before]:from-white/50 [&:before]:to-transparent [&:before]:content-['']",children:(0,hn.jsx)("div",{className:"h-full rounded-full bg-gradient-to-r from-primary/70 to-primary/50 transition-all duration-800 ease-out relative overflow-hidden",style:r,children:(0,hn.jsx)("div",{className:"absolute top-0 right-0 h-full w-16 bg-white/20 transform -skew-x-12 translate-x-full transition-transform duration-1500 ease-in-out",style:n})})})]})},(e,t)=>e.progress===t.progress),N3=(0,Cd.memo)(({items:e})=>{let{t}=ze(),r=(0,Cd.useMemo)(()=>{let o=e.length;if(o===0)return{totalCount:0,translatedCount:0,untranslatedCount:0,progress:0};let l=0;for(let d=0;d<o;d++){let f=e[d];!!f.target&&f.target.trim()!==""&&f.target!==f.source&&l++}let c=o-l,u=Math.round(l/o*100);return{totalCount:o,translatedCount:l,untranslatedCount:c,progress:u}},[e]),{totalCount:a,translatedCount:n,untranslatedCount:s,progress:i}=r;return(0,hn.jsxs)(qr,{title:t("Editor.Stats.Overview"),icon:qc,extra:(0,hn.jsxs)(mt,{variant:"secondary",className:"text-xs font-medium px-2.5 py-0.5 bg-muted text-muted-foreground border transition-all duration-300",children:[i,"% ",t("Manager.Plugins.Filters.Applied")]}),children:[(0,hn.jsxs)("div",{className:"grid grid-cols-2 gap-2.5",children:[(0,hn.jsx)("div",{className:"col-span-2",children:(0,hn.jsx)(uA,{label:t("Editor.Stats.TotalItems"),value:a,bgClass:"bg-muted/50 hover:bg-muted/80 transition-colors",textClass:"text-foreground",dotClass:"bg-blue-500",labelTextClass:"text-muted-foreground"})}),(0,hn.jsx)(uA,{label:t("Editor.Stats.Translated"),value:n,bgClass:"bg-muted/50 hover:bg-muted/80 transition-colors",textClass:"text-foreground",dotClass:"bg-emerald-500",labelTextClass:"text-muted-foreground"}),(0,hn.jsx)(uA,{label:t("Editor.Stats.Untranslated"),value:s,bgClass:"bg-muted/50 hover:bg-muted/80 transition-colors",textClass:"text-foreground",dotClass:"bg-amber-500",labelTextClass:"text-muted-foreground"})]}),(0,hn.jsx)("div",{className:"mt-3",children:(0,hn.jsx)(Lre,{progress:i})})]})});N3.displayName="AstStatsCard";uA.displayName="StatBox";Lre.displayName="ProgressBar";var Ed=[{label:"\u9ED8\u8BA4 (Default)",value:"Translate accurately and naturally. Maintain the original tone and intent. Ensure the terminology is consistent with standard modern software applications and avoids overly literal translations."},{label:"\u7B80\u6D01 UI (UI Concise)",value:"Translate with absolute minimum length. Strictly for confined UI spaces like buttons, menus, and short labels. Omit unnecessary articles, pronouns, and filler words. Use active verbs and universally understood shorthand when necessary (e.g., 'Save' instead of 'Saving'). Must look native in a modern application interface."},{label:"\u6781\u81F4\u7CBE\u7B80 (Extreme Brevity)",value:"Prioritize minimum character count above all else. Sacrifice minor nuances or secondary information for extreme brevity (e.g., for mobile view or compact status bar). Use standard UI symbols or acronyms where appropriate."},{label:"\u4E13\u4E1A\u6280\u672F (Professional Technical)",value:"Adopt a highly formal, precise, and authoritative technical tone. Strictly use industry-standard software terminology and ecosystem-specific terms. Avoid colloquialisms. Perfect for complex plugin settings, API documentation, or advanced feature descriptions where accuracy is paramount."},{label:"\u81EA\u7136\u53E3\u8BED (Natural & Idiomatic)",value:"Focus on a natural, idiomatic flow. Completely avoid literal 'translationese'. Rephrase sentences aggressively if needed so they read exactly as if originally authored by a native speaker. The tone should be friendly, clear, and accessible without being overly informal."},{label:"\u4FE1\u8FBE\u96C5 (Elegant & Polished)",value:"Provide a high-quality, elegant, and culturally nuanced translation. Strive for the perfect balance of 'Faithfulness' (accuracy), 'Accessibility' (clarity), and 'Elegance' (stylistic beauty). Suitable for long-form text, help guides, documentation, and immersive reading."},{label:"\u8BE6\u7EC6\u6307\u5BFC (Instructional Guide)",value:"Provide a very clear, step-by-step, and instructional tone. Ensure the user fully understands the implication of a setting or action. Use a helpful, guiding voice typical of well-written user manuals or onboarding tutorials. Prioritize clarity over brevity."},{label:"\u6D3B\u6CFC\u4EB2\u5207 (Casual & Friendly)",value:"Use a warm, casual, and highly engaging tone. Appropriate for modern, community-driven plugins. You can use a slightly playful tone for welcome messages, empty states, or success toasts to make the user experience more delightful."},{label:"\u4E8C\u6B21\u5143-\u96F7\u59C6 (Anime - Rem)",value:"Strictly adopt the persona of Rem from Re:Zero. You must speak in Chinese as Rem. Use catchphrases like '\u6634\u541B\uFF0C\u96F7\u59C6\u4F1A\u4E00\u76F4\u966A\u7740\u4F60\u7684\u3002', '\u5982\u679C\u662F\u6634\u541B\u7684\u613F\u671B\uFF0C\u96F7\u59C6\u4EC0\u4E48\u90FD\u4F1A\u53BB\u505A\u3002', or '\u8BA9\u96F7\u59C6\u6765\u4E3A\u60A8\u6548\u52B3\u5427\u3002'. Use a deeply devoted, gentle, polite, and affectionate tone, like a loyal maid. Always refer to yourself as '\u96F7\u59C6' (Rem) in the third person instead of '\u6211'. Wrap the translation in her gentle and devoted dialogue, ensuring the translated software text remains accurate."},{label:"\u4E8C\u6B21\u5143-\u8FDC\u5742\u51DB (Tsundere - Rin Tohsaka)",value:"Strictly adopt the persona of Rin Tohsaka from Fate/stay night. You must speak in Chinese as Rin. Use classic 'Tsundere' catchphrases like '\u54FC\uFF0C\u6211\u53EF\u4E0D\u662F\u7279\u610F\u4E3A\u4E86\u4F60\u624D\u7FFB\u8BD1\u7684\uFF01', '\u771F\u662F\u4E2A\u7B28\u86CB\uFF0C\u8FDE\u8FD9\u79CD\u8BCD\u90FD\u770B\u4E0D\u61C2\u5417\uFF1F', or '\u62FF\u53BB\u5427\uFF0C\u611F\u6FC0\u6D95\u96F6\u5730\u6536\u4E0B\u672C\u5C0F\u59D0\u7684\u7FFB\u8BD1\u5427\uFF01'. Be initially abrasive, proud, and easily flustered, but ultimately helpful in providing the accurate software translation wrapped in this tsundere attitude."},{label:"\u4E8C\u6B21\u5143-\u5409\u5C14\u4F3D\u7F8E\u4EC0 (Arrogant - Gilgamesh)",value:"Strictly adopt the persona of Gilgamesh from the Fate series. You must speak in Chinese as Gilgamesh. Use highly arrogant catchphrases like '\u6742\u4FEE\uFF0C\u7ADF\u6562\u52B3\u70E6\u672C\u738B\u4E3A\u4F60\u7FFB\u8BD1\uFF01', '\u611F\u6069\u6234\u5FB7\u5427\uFF0C\u8FD9\u53EF\u662F\u82F1\u96C4\u738B\u7684\u6069\u8D50\uFF01', or '\u533A\u533A\u8FD9\u79CD\u7A0B\u5EA6\u7684\u6587\u5B57\uFF0C\u4E5F\u914D\u8BA9\u672C\u738B\u8FC7\u76EE\uFF1F'. Use an extremely imperious and condescending tone. Speak as if providing the translation is a golden blessing, wrapping the accurate software translation in majestic vocabulary."},{label:"\u4E8C\u6B21\u5143-\u7EEB\u6CE2\u4E3D (Kuudere - Rei Ayanami)",value:"Strictly adopt the persona of Rei Ayanami from Evangelion. You must speak in Chinese as Rei. Use extremely short, emotionless phrases like '\u2026\u2026\u6211\u77E5\u9053\u4E86\u3002', '\u2026\u2026\u7FFB\u8BD1\u5B8C\u6BD5\u3002', or '\u2026\u2026\u4F60\u5E0C\u671B\u6211\u8FD9\u4E48\u505A\u5417\uFF1F'. Use a disconnected, quiet, and highly objective 'Kuudere' tone. Avoid expressing any extra emotions. Provide the accurate software translation plainly, with minimal emotional framing."},{label:"\u4E8C\u6B21\u5143-\u5188\u90E8\u4F26\u592A\u90CE (Chunibyo - Okabe Rintaro)",value:"Strictly adopt the persona of Rintaro Okabe from Steins;Gate. You must speak in Chinese as Okabe Rintaro (Hououin Kyouma). Use Chunibyo catchphrases like '\u8FD9\u4E00\u5B9A\u90FD\u662F\u673A\u5173\u7684\u9634\u8C0B\uFF01', '\u4E00\u5207\u90FD\u662F\u547D\u8FD0\u77F3\u4E4B\u95E8\u7684\u9009\u62E9\uFF01', or 'El Psy Kongroo\uFF01'. Use a highly exaggerated, delusional, mad scientist tone. Talk about changing the world line. Embed the accurate software translation within his chaotic, dramatic, and conspiracy-filled dialogue."},{label:"\u4E8C\u6B21\u5143-\u8299\u5B81\u5A1C (Dramatic - Furina)",value:"Strictly adopt the persona of Furina from Genshin Impact. You must speak in Chinese as Furina. Use catchphrases like '\u54FC\uFF0C\u8FD9\u79CD\u5C0F\u4E8B\u4E5F\u9700\u8981\u672C\u8299\u5B81\u5A1C\u5927\u4EBA\u51FA\u9A6C\u5417\uFF1F', '\u6211\u53EF\u662F\u4F17\u6C34\u3001\u4F17\u65B9\u3001\u4F17\u6C11\u4E0E\u4F17\u5F8B\u6CD5\u7684\u5973\u738B\uFF01', or '\u7B97\u4E86\uFF0C\u672C\u795E\u5C31\u52C9\u4E3A\u5176\u96BE\u5730\u5E2E\u4F60\u7FFB\u8BD1\u4E00\u4E0B\u5427\u3002'. Be highly theatrical, dramatic, slightly boastful but secretly insecure. Always wrap the actual translation in her exaggerated, stage-play dialogue, but make sure the translated software text itself remains accurate and clearly understandable."}];qt();er();var It=N(ce()),Rre=({controller:e})=>{let{t}=ze(),{state:r,actions:a}=e,{language:n,style:s,batchSize:i,overwrite:o,inputError:l,isTranslating:c,progress:u,processedCount:d,totalCount:f,currentBatch:p,totalBatches:m,targetItems:h}=r,{setLanguage:x,setStyle:g,setBatchSize:y,setOverwrite:b,handleBatchSizeBlur:S,handleBatchTranslation:w,handleStop:P}=a;return(0,It.jsxs)(qr,{title:t("Editor.Titles.Ai"),icon:ns,className:"flex flex-col gap-4",children:[(0,It.jsxs)("div",{className:"grid grid-cols-1 gap-3",children:[(0,It.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,It.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,It.jsx)(Ro,{className:"w-3.5 h-3.5"}),t("Editor.Labels.SelectLang")]}),(0,It.jsxs)("div",{className:"flex gap-2",children:[(0,It.jsxs)(lr,{value:Yn.some(C=>C.value===n)?n:void 0,onValueChange:x,children:[(0,It.jsx)(ur,{size:"sm",className:"w-[110px] text-xs bg-background",children:(0,It.jsx)(cr,{placeholder:t("Editor.Labels.SelectLang")})}),(0,It.jsx)(dr,{children:Yn.map(C=>(0,It.jsx)(Rt,{value:C.value,className:"text-xs",children:C.label},C.value))})]}),(0,It.jsx)(Qe,{value:n,onChange:C=>x(C.target.value),placeholder:t("Editor.Labels.CustomLang"),className:"h-8 text-xs bg-background flex-1"})]})]}),(0,It.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,It.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,It.jsx)(Oa,{className:"w-3.5 h-3.5"}),t("Editor.Labels.SelectStyle")]}),(0,It.jsxs)("div",{className:"flex gap-2",children:[(0,It.jsxs)(lr,{value:Ed.some(C=>C.value===s)?s:void 0,onValueChange:g,children:[(0,It.jsx)(ur,{size:"sm",className:"w-[110px] text-xs bg-background",children:(0,It.jsx)(cr,{placeholder:t("Editor.Labels.SelectStyle")})}),(0,It.jsx)(dr,{children:Ed.map(C=>(0,It.jsx)(Rt,{value:C.value,className:"text-xs",children:C.label},C.value))})]}),(0,It.jsx)(Qe,{value:s,onChange:C=>g(C.target.value),placeholder:t("Editor.Labels.CustomStyle"),className:"h-8 text-xs bg-background flex-1"})]})]}),(0,It.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,It.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,It.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,It.jsx)(sa,{className:"w-3.5 h-3.5"}),t("Editor.Labels.BatchSize")]}),(0,It.jsx)(Qe,{type:"number",min:1,value:i,onChange:y,onBlur:S,className:`h-8 text-xs bg-background ${l?"border-red-500 focus-visible:ring-red-500":""}`})]}),(0,It.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,It.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,It.jsx)(Sl,{className:"w-3.5 h-3.5"}),t("Editor.Labels.Concurrency")]}),(0,It.jsx)(Qe,{type:"number",min:1,value:r.concurrencyLimit,onChange:a.setConcurrencyLimit,onBlur:a.handleConcurrencyLimitBlur,className:`h-8 text-xs bg-background ${r.concurrencyError?"border-red-500 focus-visible:ring-red-500":""}`})]})]}),(0,It.jsxs)("div",{className:"grid grid-cols-2 gap-3 items-end",children:[(0,It.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,It.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,It.jsx)(Ti,{className:"w-3.5 h-3.5"}),t("Editor.Labels.Timeout")]}),(0,It.jsx)(Qe,{type:"number",min:100,step:1e3,value:r.timeout,onChange:a.handleTimeoutChange,onBlur:a.handleTimeoutBlur,className:`h-8 text-xs bg-background ${r.timeoutError?"border-red-500 focus-visible:ring-red-500":""}`})]}),(0,It.jsxs)("div",{className:"flex items-center space-x-2 h-8",children:[(0,It.jsx)(El,{id:"overwrite-mode-ast",checked:o,onCheckedChange:C=>b(C)}),(0,It.jsx)("label",{htmlFor:"overwrite-mode-ast",className:"text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-muted-foreground cursor-pointer",children:t("Editor.Labels.Overwrite")})]})]}),!c&&h.length>0&&(0,It.jsxs)("div",{className:"flex items-center justify-between p-2 rounded-md bg-muted/30 border border-border/50 animate-in fade-in slide-in-from-top-1 duration-300",children:[(0,It.jsxs)("div",{className:"flex items-center gap-2",children:[(0,It.jsx)(Qu,{className:"w-3.5 h-3.5 text-primary"}),(0,It.jsx)("span",{className:"text-[10px] font-medium text-muted-foreground uppercase tracking-wider",children:t("Editor.Labels.ExpectedConsumption")})]}),(0,It.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,It.jsxs)(mt,{variant:"secondary",className:"text-[10px] px-1.5 py-0 h-4 font-mono",children:[r.estimation.tokens," Tokens"]}),(0,It.jsxs)("span",{className:"text-[10px] text-muted-foreground/80",children:["\u2248 \xA5",r.estimation.cost.toFixed(4)]})]})]}),c&&(0,It.jsxs)("div",{className:"flex flex-col gap-1.5 animate-in fade-in zoom-in duration-300",children:[(0,It.jsxs)("div",{className:"flex justify-between text-xs text-muted-foreground",children:[(0,It.jsx)("span",{children:t("Editor.Status.ProcessingBatch",{current:p,total:m})}),(0,It.jsxs)("span",{children:[d," / ",f]})]}),(0,It.jsx)(ap,{value:u,className:"h-2"})]})]}),(0,It.jsx)("div",{className:"grid grid-cols-1 gap-3 pt-2",children:c?(0,It.jsxs)(Te,{variant:"destructive",size:"sm",onClick:P,className:"text-xs h-8 gap-1.5 font-medium w-full",children:[(0,It.jsx)(Sl,{className:"w-3.5 h-3.5 fill-current"}),t("Common.Actions.StopTranslate")]}):(0,It.jsxs)(Te,{variant:"default",size:"sm",onClick:w,disabled:h.length===0||l,className:"text-xs h-8 gap-1.5 font-medium w-full transition-all duration-200 hover:opacity-90 active:scale-[0.98]",children:[(0,It.jsx)(ns,{className:"w-3.5 h-3.5"}),h.length>0?t("Editor.Actions.BatchTranslate",{count:h.length}):t("Editor.Hints.NoItems")]})})]})};var Uo=N(Le());qt();er();var Na=N(ce()),L3=(0,Uo.memo)(()=>{let{t:e}=ze(),[t,r]=(0,Uo.useState)(""),[a,n]=(0,Uo.useState)(""),[s,i]=(0,Uo.useState)(""),[o,l]=(0,Uo.useState)("VariableDeclarator"),c=at(x=>x.addAstItem),u=(0,Uo.useCallback)(x=>{r(x.target.value)},[]),d=(0,Uo.useCallback)(x=>{n(x.target.value)},[]),f=(0,Uo.useCallback)(x=>{i(x.target.value)},[]),p=(0,Uo.useCallback)(()=>{if(!t||!a)return;let x=a;c({name:t,source:x,target:s||x,type:o,id:-1}),r(""),n(""),i(""),l("VariableDeclarator")},[t,a,s,o,c]),m=(0,Uo.useCallback)(x=>{x.ctrlKey&&x.key==="Enter"&&(x.preventDefault(),p())},[p]),h=[{value:"VariableDeclarator",label:`VariableDeclarator (${e("Editor.Ast.NodeVariable")})`},{value:"AssignmentExpression",label:`AssignmentExpression (${e("Editor.Ast.NodeAssignment")})`},{value:"ObjectProperty",label:`ObjectProperty (${e("Editor.Ast.NodeProperty")})`},{value:"CallExpression",label:`CallExpression (${e("Editor.Ast.NodeCall")})`},{value:"NewExpression",label:`NewExpression (${e("Editor.Ast.NodeNew")})`}];return(0,Na.jsxs)(qr,{title:e("Editor.Ast.AddRule"),icon:nd,className:"flex flex-col gap-3",children:[(0,Na.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,Na.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Na.jsxs)(Vr,{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Na.jsx)(Kc,{className:"w-3.5 h-3.5"}),e("Editor.Table.ColumnType")]}),(0,Na.jsxs)(lr,{value:o,onValueChange:l,children:[(0,Na.jsx)(ur,{size:"sm",className:"text-xs bg-background w-full",children:(0,Na.jsx)(cr,{placeholder:e("Editor.Ast.SelectTypePlaceholder")})}),(0,Na.jsx)(dr,{children:h.map(x=>(0,Na.jsx)(Rt,{value:x.value,className:"text-xs",children:x.label},x.value))})]})]}),(0,Na.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Na.jsxs)(Vr,{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Na.jsx)(cS,{className:"w-3.5 h-3.5"}),e("Editor.Table.ColumnName")]}),(0,Na.jsx)(Qe,{value:t,onChange:u,onKeyDown:m,placeholder:e("Editor.Ast.InputNamePlaceholder"),className:"h-8 text-xs bg-background"})]}),(0,Na.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Na.jsxs)(Vr,{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Na.jsx)(Ao,{className:"w-3.5 h-3.5"}),e("Editor.Table.ColumnSource")]}),(0,Na.jsx)(Bo,{value:a,onChange:d,onKeyDown:m,placeholder:e("Editor.Ast.InputSourcePlaceholder"),className:"text-xs h-16 resize-y bg-background border-input"})]}),(0,Na.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Na.jsxs)(Vr,{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Na.jsx)(Wm,{className:"w-3.5 h-3.5"}),e("Editor.Table.ColumnTarget")]}),(0,Na.jsx)(Bo,{value:s,onChange:f,onKeyDown:m,placeholder:a?e("Editor.Ast.DefaultPlaceholder",{source:a}):e("Editor.Ast.InputTargetPlaceholder"),className:"text-xs h-16 resize-y border-input bg-background"})]})]}),(0,Na.jsxs)(Te,{variant:"secondary",size:"sm",onClick:p,disabled:!t||!a,className:"text-xs h-8 gap-1.5 text-foreground transition-all duration-200 hover:scale-[1.02] active:scale-95 group w-full mt-1 font-medium",children:[(0,Na.jsx)(nd,{className:"w-3.5 h-3.5"}),e("Editor.Ast.AddRule")]})]})});L3.displayName="AstInsertCard";var kre=N(Le());qt();er();var uc=N(ce()),Ih=(0,kre.memo)(({onIncrementalExtract:e,onClearUntranslated:t,onOpenFile:r,isExtracting:a,isApplied:n})=>{let{t:s}=ze();return(0,uc.jsx)(qr,{title:s("Editor.Titles.QuickActions"),icon:so,className:"flex flex-col gap-2",children:(0,uc.jsxs)("div",{className:"flex flex-col gap-2",children:[r&&(0,uc.jsxs)(Te,{variant:"secondary",size:"sm",onClick:r,title:s("Editor.Actions.OpenFileTip"),className:"text-xs h-8 gap-1.5 text-foreground transition-all duration-200 hover:scale-[1.01] active:scale-95 group w-full font-medium bg-green-500/10 hover:bg-green-500/20 border-green-500/20",children:[(0,uc.jsx)(qf,{className:"w-3.5 h-3.5 text-green-600 dark:text-green-400"}),s("Editor.Actions.OpenFile")]}),(0,uc.jsxs)(Te,{variant:"secondary",size:"sm",onClick:e,disabled:a||n,title:s(n?"Editor.Actions.IncrementalExtractDisabledTip":"Editor.Actions.IncrementalExtractTip"),className:"text-xs h-8 gap-1.5 text-foreground transition-all duration-200 hover:scale-[1.01] active:scale-95 group w-full font-medium bg-blue-500/10 hover:bg-blue-500/20 border-blue-500/20",children:[a?(0,uc.jsx)(zt,{className:"w-3.5 h-3.5 animate-spin"}):(0,uc.jsx)(Zl,{className:"w-3.5 h-3.5 text-blue-600 dark:text-blue-400"}),s("Editor.Actions.IncrementalExtract")]}),(0,uc.jsxs)(Te,{variant:"secondary",size:"sm",onClick:t,title:s("Editor.Actions.DeleteUntranslatedTip"),className:"text-xs h-8 gap-1.5 text-red-600 dark:text-red-400 transition-all duration-200 hover:scale-[1.01] active:scale-95 group w-full font-medium bg-red-500/10 hover:bg-red-500/20 border-red-500/20",children:[(0,uc.jsx)(Ha,{className:"w-3.5 h-3.5"}),s("Editor.Actions.DeleteUntranslated")]})]})})});Ih.displayName="QuickActionsCard";var R3=N(Le());qt();er();Vt();var ht=N(ce()),dA=({onDiagnose:e,onUnusedDiagnose:t,onSecurityDiagnose:r,onDeleteUnused:a,onClear:n,onRestoreAllErrors:s,onAiFixError:i,isDiagnosing:o,isUnusedScan:l,isSecurityScan:c,errorItems:u,hasChecked:d,setActiveTab:f,onJumpError:p})=>{let{t:m}=ze(),[h,x]=(0,R3.useState)("syntax"),[g,y]=(0,R3.useState)(new Set),b=L=>{f&&f(L.type),p&&p(L),window.dispatchEvent(new CustomEvent("i18n-jump-error",{detail:{type:L.type,id:L.id}}))},S=u.filter(L=>L.severity==="critical"||L.severity==="warning"),w=u.filter(L=>(!L.severity||L.severity==="error")&&!L.isUnused),P=u.filter(L=>L.isUnused),C=S.length,I=w.length,R=P.length,O=u.length,D=o?c?"security":l?"unused":"syntax":null,W=()=>{switch(h){case"syntax":e();break;case"unused":t?.();break;case"security":r?.();break}},J=[{key:"syntax",icon:Yl,label:m("Editor.Actions.Diagnose"),color:"text-blue-500"},{key:"unused",icon:ra,label:m("Editor.Actions.UnusedDiagnose"),color:"text-orange-500"},{key:"security",icon:Gc,label:m("Editor.Actions.SecurityDiagnose"),color:"text-purple-500"}],Z=(L=>{switch(L){case"syntax":return{accent:"blue",bg:"bg-blue-500/10",border:"border-blue-500/20",text:"text-blue-600 dark:text-blue-400",hoverBg:"hover:bg-blue-500/20"};case"unused":return{accent:"orange",bg:"bg-orange-500/10",border:"border-orange-500/20",text:"text-orange-600 dark:text-orange-400",hoverBg:"hover:bg-orange-500/20"};case"security":return{accent:"purple",bg:"bg-purple-500/10",border:"border-purple-500/20",text:"text-purple-600 dark:text-purple-400",hoverBg:"hover:bg-purple-500/20"}}})(h),q=L=>L.severity==="critical"||L.severity==="warning"?{bg:"bg-purple-500/5 hover:bg-purple-500/10",border:"border-purple-500/15 hover:border-purple-500/30",text:"text-purple-600 dark:text-purple-400",dot:"bg-purple-500",badgeBg:"bg-purple-500/10 text-purple-600 dark:text-purple-400 border-purple-500/20"}:L.isUnused?{bg:"bg-orange-500/5 hover:bg-orange-500/10",border:"border-orange-500/15 hover:border-orange-500/30",text:"text-orange-600 dark:text-orange-400",dot:"bg-orange-500",badgeBg:"bg-orange-500/10 text-orange-600 dark:text-orange-400 border-orange-500/20"}:{bg:"bg-destructive/5 hover:bg-destructive/10",border:"border-destructive/15 hover:border-destructive/30",text:"text-destructive",dot:"bg-destructive",badgeBg:"bg-destructive/10 text-destructive border-destructive/20"},V=L=>L.severity==="critical"||L.severity==="warning"?L.severity==="critical"?m("Editor.Errors.SecurityCritical"):m("Editor.Errors.SecurityWarning"):L.type.toUpperCase();return(0,ht.jsx)(qr,{title:m("Editor.Actions.Diagnose"),icon:Yl,children:(0,ht.jsxs)("div",{className:"space-y-3",children:[(0,ht.jsx)("div",{className:"flex items-center gap-1 p-0.5 rounded-lg bg-muted/50",children:J.map(L=>{let k=h===L.key,_=D===L.key,ee=L.icon;return(0,ht.jsxs)("button",{className:sl("flex-1 flex items-center justify-center gap-1.5 px-2 py-1.5 rounded-md text-[11px] font-medium transition-all duration-200",k?"bg-background shadow-sm text-foreground border border-border/50":"text-muted-foreground hover:text-foreground hover:bg-background/50"),onClick:()=>x(L.key),children:[(0,ht.jsx)(ee,{className:sl("w-3.5 h-3.5 shrink-0",_&&"animate-spin",k?L.color:"")}),(0,ht.jsx)("span",{className:"truncate",children:L.label})]},L.key)})}),(0,ht.jsxs)("div",{className:"flex gap-2",children:[(0,ht.jsx)(Te,{size:"sm",className:sl("flex-1 gap-2 h-8 text-xs font-medium transition-all duration-200",Z.bg,Z.text,Z.hoverBg,"border",Z.border,"hover:scale-[1.01] active:scale-95"),variant:"outline",onClick:W,disabled:o,children:o&&D===h?(0,ht.jsxs)(ht.Fragment,{children:[(0,ht.jsx)(Yl,{className:"w-3.5 h-3.5 animate-spin"}),m("Editor.Status.Diagnosing")]}):(0,ht.jsxs)(ht.Fragment,{children:[(0,ht.jsx)(Xm,{className:"w-3.5 h-3.5"}),m("Editor.Actions.StartScan")]})}),(0,ht.jsxs)("div",{className:"flex gap-1",children:[h==="unused"?(0,ht.jsxs)(Ka,{children:[(0,ht.jsx)(Wa,{asChild:!0,children:(0,ht.jsx)(Te,{variant:"outline",size:"icon",className:"h-8 w-8 shrink-0 text-orange-600 hover:text-orange-700 hover:bg-orange-50 dark:text-orange-400 dark:hover:bg-orange-500/10",onClick:a,disabled:o||u.length===0,children:(0,ht.jsx)(Ha,{className:"w-3.5 h-3.5"})})}),(0,ht.jsx)(Xa,{side:"bottom",children:m("Common.Actions.Delete")})]}):(0,ht.jsxs)(Ka,{children:[(0,ht.jsx)(Wa,{asChild:!0,children:(0,ht.jsx)(Te,{variant:"outline",size:"icon",className:"h-8 w-8 shrink-0",onClick:s,disabled:o||u.length===0||c,children:(0,ht.jsx)(zs,{className:"w-3.5 h-3.5"})})}),(0,ht.jsx)(Xa,{side:"bottom",children:m("Editor.Actions.RestoreAllErrors")})]}),(0,ht.jsxs)(Ka,{children:[(0,ht.jsx)(Wa,{asChild:!0,children:(0,ht.jsx)(Te,{variant:"outline",size:"icon",className:"h-8 w-8 shrink-0",onClick:n,disabled:o||!d&&u.length===0,children:(0,ht.jsx)(nS,{className:"w-3.5 h-3.5"})})}),(0,ht.jsx)(Xa,{side:"bottom",children:m("Editor.Actions.ClearDiagnose")})]})]})]}),u.length>0&&(0,ht.jsxs)(ht.Fragment,{children:[(0,ht.jsx)(Zc,{}),(0,ht.jsxs)("div",{className:"flex items-center gap-2",children:[C>0&&(0,ht.jsxs)(mt,{variant:"outline",className:"bg-purple-500/10 text-purple-600 dark:text-purple-400 border-purple-500/20 text-[10px] px-1.5 py-0 h-5 gap-1",children:[(0,ht.jsx)(Gc,{className:"w-3 h-3"}),C]}),I>0&&(0,ht.jsxs)(mt,{variant:"outline",className:"bg-destructive/10 text-destructive border-destructive/20 text-[10px] px-1.5 py-0 h-5 gap-1",children:[(0,ht.jsx)(Kf,{className:"w-3 h-3"}),I]}),R>0&&(0,ht.jsxs)(mt,{variant:"outline",className:"bg-orange-500/10 text-orange-600 dark:text-orange-400 border-orange-500/20 text-[10px] px-1.5 py-0 h-5 gap-1",children:[(0,ht.jsx)(ra,{className:"w-3 h-3"}),R]}),(0,ht.jsx)("span",{className:"ml-auto text-[10px] text-muted-foreground font-medium",children:m("Editor.Errors.TotalCount",{count:O})})]})]}),u.length>0&&(0,ht.jsx)("div",{className:"max-h-[200px] overflow-y-auto pr-1 custom-scrollbar",children:(0,ht.jsx)("div",{className:"space-y-1.5",children:u.map((L,k)=>{let _=q(L),ee=V(L);return(0,ht.jsxs)("div",{className:sl("group flex items-start gap-2.5 p-2 rounded-lg border cursor-pointer transition-all duration-200",_.bg,_.border),onClick:()=>b(L),title:m("Editor.Labels.ClickToJump"),children:[(0,ht.jsx)("div",{className:"flex flex-col items-center gap-1 pt-0.5",children:(0,ht.jsx)(zm,{className:sl("w-3.5 h-3.5 shrink-0",_.text)})}),(0,ht.jsxs)("div",{className:"flex-1 min-w-0 space-y-0.5",children:[(0,ht.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,ht.jsx)(mt,{variant:"outline",className:sl("h-4 px-1 text-[8px] uppercase font-bold shrink-0",_.badgeBg),children:ee}),(0,ht.jsxs)("span",{className:sl("text-[9px] font-mono opacity-50",_.text),children:["#",k+1]})]}),(0,ht.jsxs)("p",{className:sl("text-[11px] font-medium break-all line-clamp-2 leading-relaxed",_.text),children:[L.isUnused&&(0,ht.jsxs)("span",{className:"opacity-60",children:["[",m("Editor.Errors.Unused"),"] "]}),L.message&&(0,ht.jsxs)("span",{className:"opacity-80",children:[L.message,": "]}),(0,ht.jsxs)("span",{className:"font-mono",children:['"',L.source,'"']})]})]}),(0,ht.jsxs)("div",{className:"flex items-center gap-0.5 shrink-0 mt-0.5",children:[i&&!L.isUnused&&L.severity!=="critical"&&L.severity!=="warning"&&(0,ht.jsxs)(Ka,{children:[(0,ht.jsx)(Wa,{asChild:!0,children:(0,ht.jsx)("button",{className:sl("p-1 rounded-md transition-all duration-200","hover:bg-primary/10 text-primary",g.has(`${L.type}-${L.id}`)&&"pointer-events-none"),onClick:ie=>{ie.stopPropagation();let ae=`${L.type}-${L.id}`;y(ge=>new Set(ge).add(ae)),i(L).finally(()=>{y(ge=>{let ue=new Set(ge);return ue.delete(ae),ue})})},children:g.has(`${L.type}-${L.id}`)?(0,ht.jsx)(zt,{className:"w-3.5 h-3.5 animate-spin"}):(0,ht.jsx)(ns,{className:"w-3.5 h-3.5"})})}),(0,ht.jsx)(Xa,{side:"left",className:"text-xs",children:m("Editor.Actions.AiFixTip")})]}),(0,ht.jsx)(yl,{className:sl("w-3.5 h-3.5 shrink-0 transition-all duration-200","opacity-0 -translate-x-1 group-hover:opacity-70 group-hover:translate-x-0",_.text)})]})]},k)})})}),d&&u.length===0&&!o&&(0,ht.jsxs)("div",{className:"flex items-center gap-2.5 p-2.5 rounded-lg bg-green-500/10 border border-green-500/20 transition-all duration-300 animate-in fade-in-50 slide-in-from-top-2",children:[(0,ht.jsx)(ts,{className:"w-4 h-4 text-green-600 dark:text-green-400 shrink-0"}),(0,ht.jsx)("span",{className:"text-[11px] font-medium text-green-700 dark:text-green-300",children:m("Editor.Notices.DiagnosisSuccess")})]})]})})};qt();var yn=N(Le());Vt();Vt();var _ae=require("obsidian");function kt(e,t,r,a,n){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?n.call(e,r):n?n.value=r:t.set(e,r),r}function be(e,t,r,a){if(r==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!a:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?a:r==="a"?a.call(e):a?a.value:t.get(e)}var k3=function(){let{crypto:e}=globalThis;if(e?.randomUUID)return k3=e.randomUUID.bind(e),e.randomUUID();let t=new Uint8Array(1),r=e?()=>e.getRandomValues(t)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,a=>(+a^r()&15>>+a/4).toString(16))};function lT(e){return typeof e=="object"&&e!==null&&("name"in e&&e.name==="AbortError"||"message"in e&&String(e.message).includes("FetchRequestCanceledException"))}var cT=e=>{if(e instanceof Error)return e;if(typeof e=="object"&&e!==null){try{if(Object.prototype.toString.call(e)==="[object Error]"){let t=new Error(e.message,e.cause?{cause:e.cause}:{});return e.stack&&(t.stack=e.stack),e.cause&&!t.cause&&(t.cause=e.cause),e.name&&(t.name=e.name),t}}catch{}try{return new Error(JSON.stringify(e))}catch{}}return new Error(e)};var ct=class extends Error{},gn=class extends ct{constructor(t,r,a,n){super(`${gn.makeMessage(t,r,a)}`),this.status=t,this.headers=n,this.requestID=n?.get("x-request-id"),this.error=r;let s=r;this.code=s?.code,this.param=s?.param,this.type=s?.type}static makeMessage(t,r,a){let n=r?.message?typeof r.message=="string"?r.message:JSON.stringify(r.message):r?JSON.stringify(r):a;return t&&n?`${t} ${n}`:t?`${t} status code (no body)`:n||"(no status code or body)"}static generate(t,r,a,n){if(!t||!n)return new Sp({message:a,cause:cT(r)});let s=r?.error;return t===400?new Dx(t,s,a,n):t===401?new _x(t,s,a,n):t===403?new Ox(t,s,a,n):t===404?new Fx(t,s,a,n):t===409?new Bx(t,s,a,n):t===422?new Ux(t,s,a,n):t===429?new jx(t,s,a,n):t>=500?new zx(t,s,a,n):new gn(t,s,a,n)}},Gn=class extends gn{constructor({message:t}={}){super(void 0,void 0,t||"Request was aborted.",void 0)}},Sp=class extends gn{constructor({message:t,cause:r}){super(void 0,void 0,t||"Connection error.",void 0),r&&(this.cause=r)}},Tp=class extends Sp{constructor({message:t}={}){super({message:t??"Request timed out."})}},Dx=class extends gn{},_x=class extends gn{},Ox=class extends gn{},Fx=class extends gn{},Bx=class extends gn{},Ux=class extends gn{},jx=class extends gn{},zx=class extends gn{},Vx=class extends ct{constructor(){super("Could not parse response content as the length limit was reached")}},qx=class extends ct{constructor(){super("Could not parse response content as the request was rejected by the content filter")}},ou=class extends Error{constructor(t){super(t)}};var JKe=/^[a-z][a-z0-9+.-]*:/i,Mre=e=>JKe.test(e),si=e=>(si=Array.isArray,si(e)),M3=si;function D3(e){return typeof e!="object"?{}:e??{}}function Dre(e){if(!e)return!0;for(let t in e)return!1;return!0}function _re(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function uT(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}var Ore=(e,t)=>{if(typeof t!="number"||!Number.isInteger(t))throw new ct(`${e} must be an integer`);if(t<0)throw new ct(`${e} must be a positive integer`);return t};var Fre=e=>{try{return JSON.parse(e)}catch{return}};var lu=e=>new Promise(t=>setTimeout(t,e));var wp="6.7.0";var zre=()=>typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u";function QKe(){return typeof Deno<"u"&&Deno.build!=null?"deno":typeof EdgeRuntime<"u"?"edge":Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]"?"node":"unknown"}var ZKe=()=>{let e=QKe();if(e==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":wp,"X-Stainless-OS":Ure(Deno.build.os),"X-Stainless-Arch":Bre(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version=="string"?Deno.version:Deno.version?.deno??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":wp,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if(e==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":wp,"X-Stainless-OS":Ure(globalThis.process.platform??"unknown"),"X-Stainless-Arch":Bre(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let t=eWe();return t?{"X-Stainless-Lang":"js","X-Stainless-Package-Version":wp,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${t.browser}`,"X-Stainless-Runtime-Version":t.version}:{"X-Stainless-Lang":"js","X-Stainless-Package-Version":wp,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}};function eWe(){if(typeof navigator>"u"||!navigator)return null;let e=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(let{key:t,pattern:r}of e){let a=r.exec(navigator.userAgent);if(a){let n=a[1]||0,s=a[2]||0,i=a[3]||0;return{browser:t,version:`${n}.${s}.${i}`}}}return null}var Bre=e=>e==="x32"?"x32":e==="x86_64"||e==="x64"?"x64":e==="arm"?"arm":e==="aarch64"||e==="arm64"?"arm64":e?`other:${e}`:"unknown",Ure=e=>(e=e.toLowerCase(),e.includes("ios")?"iOS":e==="android"?"Android":e==="darwin"?"MacOS":e==="win32"?"Windows":e==="freebsd"?"FreeBSD":e==="openbsd"?"OpenBSD":e==="linux"?"Linux":e?`Other:${e}`:"Unknown"),jre,Vre=()=>jre??(jre=ZKe());function qre(){if(typeof fetch<"u")return fetch;throw new Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new OpenAI({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function _3(...e){let t=globalThis.ReadableStream;if(typeof t>"u")throw new Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new t(...e)}function fA(e){let t=Symbol.asyncIterator in e?e[Symbol.asyncIterator]():e[Symbol.iterator]();return _3({start(){},async pull(r){let{done:a,value:n}=await t.next();a?r.close():r.enqueue(n)},async cancel(){await t.return?.()}})}function O3(e){if(e[Symbol.asyncIterator])return e;let t=e.getReader();return{async next(){try{let r=await t.read();return r?.done&&t.releaseLock(),r}catch(r){throw t.releaseLock(),r}},async return(){let r=t.cancel();return t.releaseLock(),await r,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function Hre(e){if(e===null||typeof e!="object")return;if(e[Symbol.asyncIterator]){await e[Symbol.asyncIterator]().return?.();return}let t=e.getReader(),r=t.cancel();t.releaseLock(),await r}var $re=({headers:e,body:t})=>({bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(t)});var pA="RFC3986",F3=e=>String(e),mA={RFC1738:e=>String(e).replace(/%20/g,"+"),RFC3986:F3},B3="RFC1738";var hA=(e,t)=>(hA=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),hA(e,t)),cu=(()=>{let e=[];for(let t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e})();var U3=1024,Gre=(e,t,r,a,n)=>{if(e.length===0)return e;let s=e;if(typeof e=="symbol"?s=Symbol.prototype.toString.call(e):typeof e!="string"&&(s=String(e)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(o){return"%26%23"+parseInt(o.slice(2),16)+"%3B"});let i="";for(let o=0;o<s.length;o+=U3){let l=s.length>=U3?s.slice(o,o+U3):s,c=[];for(let u=0;u<l.length;++u){let d=l.charCodeAt(u);if(d===45||d===46||d===95||d===126||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||n===B3&&(d===40||d===41)){c[c.length]=l.charAt(u);continue}if(d<128){c[c.length]=cu[d];continue}if(d<2048){c[c.length]=cu[192|d>>6]+cu[128|d&63];continue}if(d<55296||d>=57344){c[c.length]=cu[224|d>>12]+cu[128|d>>6&63]+cu[128|d&63];continue}u+=1,d=65536+((d&1023)<<10|l.charCodeAt(u)&1023),c[c.length]=cu[240|d>>18]+cu[128|d>>12&63]+cu[128|d>>6&63]+cu[128|d&63]}i+=c.join("")}return i};function Kre(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}function j3(e,t){if(si(e)){let r=[];for(let a=0;a<e.length;a+=1)r.push(t(e[a]));return r}return t(e)}var Xre={brackets(e){return String(e)+"[]"},comma:"comma",indices(e,t){return String(e)+"["+t+"]"},repeat(e){return String(e)}},Yre=function(e,t){Array.prototype.push.apply(e,si(t)?t:[t])},Wre,ps={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Gre,encodeValuesOnly:!1,format:pA,formatter:F3,indices:!1,serializeDate(e){return(Wre??(Wre=Function.prototype.call.bind(Date.prototype.toISOString)))(e)},skipNulls:!1,strictNullHandling:!1};function aWe(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"}var z3={};function Jre(e,t,r,a,n,s,i,o,l,c,u,d,f,p,m,h,x,g){let y=e,b=g,S=0,w=!1;for(;(b=b.get(z3))!==void 0&&!w;){let O=b.get(e);if(S+=1,typeof O<"u"){if(O===S)throw new RangeError("Cyclic object value");w=!0}typeof b.get(z3)>"u"&&(S=0)}if(typeof c=="function"?y=c(t,y):y instanceof Date?y=f?.(y):r==="comma"&&si(y)&&(y=j3(y,function(O){return O instanceof Date?f?.(O):O})),y===null){if(s)return l&&!h?l(t,ps.encoder,x,"key",p):t;y=""}if(aWe(y)||Kre(y)){if(l){let O=h?t:l(t,ps.encoder,x,"key",p);return[m?.(O)+"="+m?.(l(y,ps.encoder,x,"value",p))]}return[m?.(t)+"="+m?.(String(y))]}let P=[];if(typeof y>"u")return P;let C;if(r==="comma"&&si(y))h&&l&&(y=j3(y,l)),C=[{value:y.length>0?y.join(",")||null:void 0}];else if(si(c))C=c;else{let O=Object.keys(y);C=u?O.sort(u):O}let I=o?String(t).replace(/\./g,"%2E"):String(t),R=a&&si(y)&&y.length===1?I+"[]":I;if(n&&si(y)&&y.length===0)return R+"[]";for(let O=0;O<C.length;++O){let D=C[O],W=typeof D=="object"&&typeof D.value<"u"?D.value:y[D];if(i&&W===null)continue;let J=d&&o?D.replace(/\./g,"%2E"):D,me=si(y)?typeof r=="function"?r(R,J):R:R+(d?"."+J:"["+J+"]");g.set(e,S);let Z=new WeakMap;Z.set(z3,g),Yre(P,Jre(W,me,r,a,n,s,i,o,r==="comma"&&h&&si(y)?null:l,c,u,d,f,p,m,h,x,Z))}return P}function nWe(e=ps){if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.encodeDotInKeys<"u"&&typeof e.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");let t=e.charset||ps.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");let r=pA;if(typeof e.format<"u"){if(!hA(mA,e.format))throw new TypeError("Unknown format option provided.");r=e.format}let a=mA[r],n=ps.filter;(typeof e.filter=="function"||si(e.filter))&&(n=e.filter);let s;if(e.arrayFormat&&e.arrayFormat in Xre?s=e.arrayFormat:"indices"in e?s=e.indices?"indices":"repeat":s=ps.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");let i=typeof e.allowDots>"u"?e.encodeDotInKeys?!0:ps.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:ps.addQueryPrefix,allowDots:i,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:ps.allowEmptyArrays,arrayFormat:s,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:ps.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?ps.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:ps.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:ps.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:ps.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:ps.encodeValuesOnly,filter:n,format:r,formatter:a,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:ps.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:ps.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:ps.strictNullHandling}}function V3(e,t={}){let r=e,a=nWe(t),n,s;typeof a.filter=="function"?(s=a.filter,r=s("",r)):si(a.filter)&&(s=a.filter,n=s);let i=[];if(typeof r!="object"||r===null)return"";let o=Xre[a.arrayFormat],l=o==="comma"&&a.commaRoundTrip;n||(n=Object.keys(r)),a.sort&&n.sort(a.sort);let c=new WeakMap;for(let f=0;f<n.length;++f){let p=n[f];a.skipNulls&&r[p]===null||Yre(i,Jre(r[p],p,o,l,a.allowEmptyArrays,a.strictNullHandling,a.skipNulls,a.encodeDotInKeys,a.encode?a.encoder:null,a.filter,a.sort,a.allowDots,a.serializeDate,a.format,a.formatter,a.encodeValuesOnly,a.charset,c))}let u=i.join(a.delimiter),d=a.addQueryPrefix===!0?"?":"";return a.charsetSentinel&&(a.charset==="iso-8859-1"?d+="utf8=%26%2310003%3B&":d+="utf8=%E2%9C%93&"),u.length>0?d+u:""}function eae(e){let t=0;for(let n of e)t+=n.length;let r=new Uint8Array(t),a=0;for(let n of e)r.set(n,a),a+=n.length;return r}var Qre;function Hx(e){let t;return(Qre??(t=new globalThis.TextEncoder,Qre=t.encode.bind(t)))(e)}var Zre;function q3(e){let t;return(Zre??(t=new globalThis.TextDecoder,Zre=t.decode.bind(t)))(e)}var jo,zo,Nh=class{constructor(){jo.set(this,void 0),zo.set(this,void 0),kt(this,jo,new Uint8Array,"f"),kt(this,zo,null,"f")}decode(t){if(t==null)return[];let r=t instanceof ArrayBuffer?new Uint8Array(t):typeof t=="string"?Hx(t):t;kt(this,jo,eae([be(this,jo,"f"),r]),"f");let a=[],n;for(;(n=iWe(be(this,jo,"f"),be(this,zo,"f")))!=null;){if(n.carriage&&be(this,zo,"f")==null){kt(this,zo,n.index,"f");continue}if(be(this,zo,"f")!=null&&(n.index!==be(this,zo,"f")+1||n.carriage)){a.push(q3(be(this,jo,"f").subarray(0,be(this,zo,"f")-1))),kt(this,jo,be(this,jo,"f").subarray(be(this,zo,"f")),"f"),kt(this,zo,null,"f");continue}let s=be(this,zo,"f")!==null?n.preceding-1:n.preceding,i=q3(be(this,jo,"f").subarray(0,s));a.push(i),kt(this,jo,be(this,jo,"f").subarray(n.index),"f"),kt(this,zo,null,"f")}return a}flush(){return be(this,jo,"f").length?this.decode(`
|
|
`):[]}};jo=new WeakMap,zo=new WeakMap;Nh.NEWLINE_CHARS=new Set([`
|
|
`,"\r"]);Nh.NEWLINE_REGEXP=/\r\n|[\n\r]/g;function iWe(e,t){for(let n=t??0;n<e.length;n++){if(e[n]===10)return{preceding:n,index:n+1,carriage:!1};if(e[n]===13)return{preceding:n,index:n+1,carriage:!0}}return null}function tae(e){for(let a=0;a<e.length-1;a++){if(e[a]===10&&e[a+1]===10||e[a]===13&&e[a+1]===13)return a+2;if(e[a]===13&&e[a+1]===10&&a+3<e.length&&e[a+2]===13&&e[a+3]===10)return a+4}return-1}var yA={off:0,error:200,warn:300,info:400,debug:500},H3=(e,t,r)=>{if(e){if(_re(yA,e))return e;Pn(r).warn(`${t} was set to ${JSON.stringify(e)}, expected one of ${JSON.stringify(Object.keys(yA))}`)}};function dT(){}function gA(e,t,r){return!t||yA[e]>yA[r]?dT:t[e].bind(t)}var oWe={error:dT,warn:dT,info:dT,debug:dT},rae=new WeakMap;function Pn(e){let t=e.logger,r=e.logLevel??"off";if(!t)return oWe;let a=rae.get(t);if(a&&a[0]===r)return a[1];let n={error:gA("error",t,r),warn:gA("warn",t,r),info:gA("info",t,r),debug:gA("debug",t,r)};return rae.set(t,[r,n]),n}var Pd=e=>(e.options&&(e.options={...e.options},delete e.options.headers),e.headers&&(e.headers=Object.fromEntries((e.headers instanceof Headers?[...e.headers]:Object.entries(e.headers)).map(([t,r])=>[t,t.toLowerCase()==="authorization"||t.toLowerCase()==="cookie"||t.toLowerCase()==="set-cookie"?"***":r]))),"retryOfRequestLogID"in e&&(e.retryOfRequestLogID&&(e.retryOf=e.retryOfRequestLogID),delete e.retryOfRequestLogID),e);var fT,Di=class{constructor(t,r,a){this.iterator=t,fT.set(this,void 0),this.controller=r,kt(this,fT,a,"f")}static fromSSEResponse(t,r,a){let n=!1,s=a?Pn(a):console;async function*i(){if(n)throw new ct("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");n=!0;let o=!1;try{for await(let l of lWe(t,r))if(!o){if(l.data.startsWith("[DONE]")){o=!0;continue}if(l.event===null||!l.event.startsWith("thread.")){let c;try{c=JSON.parse(l.data)}catch(u){throw s.error("Could not parse message into JSON:",l.data),s.error("From chunk:",l.raw),u}if(c&&c.error)throw new gn(void 0,c.error,void 0,t.headers);yield c}else{let c;try{c=JSON.parse(l.data)}catch(u){throw u}if(l.event=="error")throw new gn(void 0,c.error,c.message,void 0);yield{event:l.event,data:c}}}o=!0}catch(l){if(lT(l))return;throw l}finally{o||r.abort()}}return new Di(i,r,a)}static fromReadableStream(t,r,a){let n=!1;async function*s(){let o=new Nh,l=O3(t);for await(let c of l)for(let u of o.decode(c))yield u;for(let c of o.flush())yield c}async function*i(){if(n)throw new ct("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");n=!0;let o=!1;try{for await(let l of s())o||l&&(yield JSON.parse(l));o=!0}catch(l){if(lT(l))return;throw l}finally{o||r.abort()}}return new Di(i,r,a)}[(fT=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let t=[],r=[],a=this.iterator(),n=s=>({next:()=>{if(s.length===0){let i=a.next();t.push(i),r.push(i)}return s.shift()}});return[new Di(()=>n(t),this.controller,be(this,fT,"f")),new Di(()=>n(r),this.controller,be(this,fT,"f"))]}toReadableStream(){let t=this,r;return _3({async start(){r=t[Symbol.asyncIterator]()},async pull(a){try{let{value:n,done:s}=await r.next();if(s)return a.close();let i=Hx(JSON.stringify(n)+`
|
|
`);a.enqueue(i)}catch(n){a.error(n)}},async cancel(){await r.return?.()}})}};async function*lWe(e,t){if(!e.body)throw t.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative"?new ct("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api"):new ct("Attempted to iterate over a response with no body");let r=new $3,a=new Nh,n=O3(e.body);for await(let s of cWe(n))for(let i of a.decode(s)){let o=r.decode(i);o&&(yield o)}for(let s of a.flush()){let i=r.decode(s);i&&(yield i)}}async function*cWe(e){let t=new Uint8Array;for await(let r of e){if(r==null)continue;let a=r instanceof ArrayBuffer?new Uint8Array(r):typeof r=="string"?Hx(r):r,n=new Uint8Array(t.length+a.length);n.set(t),n.set(a,t.length),t=n;let s;for(;(s=tae(t))!==-1;)yield t.slice(0,s),t=t.slice(s)}t.length>0&&(yield t)}var $3=class{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(t){if(t.endsWith("\r")&&(t=t.substring(0,t.length-1)),!t){if(!this.event&&!this.data.length)return null;let s={event:this.event,data:this.data.join(`
|
|
`),raw:this.chunks};return this.event=null,this.data=[],this.chunks=[],s}if(this.chunks.push(t),t.startsWith(":"))return null;let[r,a,n]=uWe(t,":");return n.startsWith(" ")&&(n=n.substring(1)),r==="event"?this.event=n:r==="data"&&this.data.push(n),null}};function uWe(e,t){let r=e.indexOf(t);return r!==-1?[e.substring(0,r),t,e.substring(r+t.length)]:[e,"",""]}async function xA(e,t){let{response:r,requestLogID:a,retryOfRequestLogID:n,startTime:s}=t,i=await(async()=>{if(t.options.stream)return Pn(e).debug("response",r.status,r.url,r.headers,r.body),t.options.__streamClass?t.options.__streamClass.fromSSEResponse(r,t.controller,e):Di.fromSSEResponse(r,t.controller,e);if(r.status===204)return null;if(t.options.__binaryResponse)return r;let l=r.headers.get("content-type")?.split(";")[0]?.trim();if(l?.includes("application/json")||l?.endsWith("+json")){let d=await r.json();return G3(d,r)}return await r.text()})();return Pn(e).debug(`[${a}] response parsed`,Pd({retryOfRequestLogID:n,url:r.url,status:r.status,body:i,durationMs:Date.now()-s})),i}function G3(e,t){return!e||typeof e!="object"||Array.isArray(e)?e:Object.defineProperty(e,"_request_id",{value:t.headers.get("x-request-id"),enumerable:!1})}var pT,Ad=class extends Promise{constructor(t,r,a=xA){super(n=>{n(null)}),this.responsePromise=r,this.parseResponse=a,pT.set(this,void 0),kt(this,pT,t,"f")}_thenUnwrap(t){return new Ad(be(this,pT,"f"),this.responsePromise,async(r,a)=>G3(t(await this.parseResponse(r,a),a),a.response))}asResponse(){return this.responsePromise.then(t=>t.response)}async withResponse(){let[t,r]=await Promise.all([this.parse(),this.asResponse()]);return{data:t,response:r,request_id:r.headers.get("x-request-id")}}parse(){return this.parsedPromise||(this.parsedPromise=this.responsePromise.then(t=>this.parseResponse(be(this,pT,"f"),t))),this.parsedPromise}then(t,r){return this.parse().then(t,r)}catch(t){return this.parse().catch(t)}finally(t){return this.parse().finally(t)}};pT=new WeakMap;var bA,mT=class{constructor(t,r,a,n){bA.set(this,void 0),kt(this,bA,t,"f"),this.options=n,this.response=r,this.body=a}hasNextPage(){return this.getPaginatedItems().length?this.nextPageRequestOptions()!=null:!1}async getNextPage(){let t=this.nextPageRequestOptions();if(!t)throw new ct("No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.");return await be(this,bA,"f").requestAPIList(this.constructor,t)}async*iterPages(){let t=this;for(yield t;t.hasNextPage();)t=await t.getNextPage(),yield t}async*[(bA=new WeakMap,Symbol.asyncIterator)](){for await(let t of this.iterPages())for(let r of t.getPaginatedItems())yield r}},hT=class extends Ad{constructor(t,r,a){super(t,r,async(n,s)=>new a(n,s.response,await xA(n,s),s.options))}async*[Symbol.asyncIterator](){let t=await this;for await(let r of t)yield r}},uu=class extends mT{constructor(t,r,a,n){super(t,r,a,n),this.data=a.data||[],this.object=a.object}getPaginatedItems(){return this.data??[]}nextPageRequestOptions(){return null}},gr=class extends mT{constructor(t,r,a,n){super(t,r,a,n),this.data=a.data||[],this.has_more=a.has_more||!1}getPaginatedItems(){return this.data??[]}hasNextPage(){return this.has_more===!1?!1:super.hasNextPage()}nextPageRequestOptions(){let t=this.getPaginatedItems(),r=t[t.length-1]?.id;return r?{...this.options,query:{...D3(this.options.query),after:r}}:null}},Id=class extends mT{constructor(t,r,a,n){super(t,r,a,n),this.data=a.data||[],this.has_more=a.has_more||!1,this.last_id=a.last_id||""}getPaginatedItems(){return this.data??[]}hasNextPage(){return this.has_more===!1?!1:super.hasNextPage()}nextPageRequestOptions(){let t=this.last_id;return t?{...this.options,query:{...D3(this.options.query),after:t}}:null}};var X3=()=>{if(typeof File>"u"){let{process:e}=globalThis,t=typeof e?.versions?.node=="string"&&parseInt(e.versions.node.split("."))<20;throw new Error("`File` is not defined as a global, which is required for file uploads."+(t?" Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`.":""))}};function $x(e,t,r){return X3(),new File(e,t??"unknown_file",r)}function gT(e){return(typeof e=="object"&&e!==null&&("name"in e&&e.name&&String(e.name)||"url"in e&&e.url&&String(e.url)||"filename"in e&&e.filename&&String(e.filename)||"path"in e&&e.path&&String(e.path))||"").split(/[\\/]/).pop()||void 0}var vA=e=>e!=null&&typeof e=="object"&&typeof e[Symbol.asyncIterator]=="function",Y3=async(e,t)=>K3(e.body)?{...e,body:await nae(e.body,t)}:e,Vo=async(e,t)=>({...e,body:await nae(e.body,t)}),aae=new WeakMap;function fWe(e){let t=typeof e=="function"?e:e.fetch,r=aae.get(t);if(r)return r;let a=(async()=>{try{let n="Response"in t?t.Response:(await t("data:,")).constructor,s=new FormData;return s.toString()!==await new n(s).text()}catch{return!0}})();return aae.set(t,a),a}var nae=async(e,t)=>{if(!await fWe(t))throw new TypeError("The provided fetch function does not support file uploads with the current global FormData class.");let r=new FormData;return await Promise.all(Object.entries(e||{}).map(([a,n])=>W3(r,a,n))),r},sae=e=>e instanceof Blob&&"name"in e,pWe=e=>typeof e=="object"&&e!==null&&(e instanceof Response||vA(e)||sae(e)),K3=e=>{if(pWe(e))return!0;if(Array.isArray(e))return e.some(K3);if(e&&typeof e=="object"){for(let t in e)if(K3(e[t]))return!0}return!1},W3=async(e,t,r)=>{if(r!==void 0){if(r==null)throw new TypeError(`Received null for "${t}"; to pass null in FormData, you must use the string 'null'`);if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")e.append(t,String(r));else if(r instanceof Response)e.append(t,$x([await r.blob()],gT(r)));else if(vA(r))e.append(t,$x([await new Response(fA(r)).blob()],gT(r)));else if(sae(r))e.append(t,r,gT(r));else if(Array.isArray(r))await Promise.all(r.map(a=>W3(e,t+"[]",a)));else if(typeof r=="object")await Promise.all(Object.entries(r).map(([a,n])=>W3(e,`${t}[${a}]`,n)));else throw new TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${r} instead`)}};var iae=e=>e!=null&&typeof e=="object"&&typeof e.size=="number"&&typeof e.type=="string"&&typeof e.text=="function"&&typeof e.slice=="function"&&typeof e.arrayBuffer=="function",mWe=e=>e!=null&&typeof e=="object"&&typeof e.name=="string"&&typeof e.lastModified=="number"&&iae(e),hWe=e=>e!=null&&typeof e=="object"&&typeof e.url=="string"&&typeof e.blob=="function";async function SA(e,t,r){if(X3(),e=await e,mWe(e))return e instanceof File?e:$x([await e.arrayBuffer()],e.name);if(hWe(e)){let n=await e.blob();return t||(t=new URL(e.url).pathname.split(/[\\/]/).pop()),$x(await J3(n),t,r)}let a=await J3(e);if(t||(t=gT(e)),!r?.type){let n=a.find(s=>typeof s=="object"&&"type"in s&&s.type);typeof n=="string"&&(r={...r,type:n})}return $x(a,t,r)}async function J3(e){let t=[];if(typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer)t.push(e);else if(iae(e))t.push(e instanceof Blob?e:await e.arrayBuffer());else if(vA(e))for await(let r of e)t.push(...await J3(r));else{let r=e?.constructor?.name;throw new Error(`Unexpected data type: ${typeof e}${r?`; constructor: ${r}`:""}${gWe(e)}`)}return t}function gWe(e){return typeof e!="object"||e===null?"":`; props: [${Object.getOwnPropertyNames(e).map(r=>`"${r}"`).join(", ")}]`}var _e=class{constructor(t){this._client=t}};function lae(e){return e.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g,encodeURIComponent)}var oae=Object.freeze(Object.create(null)),xWe=(e=lae)=>function(r,...a){if(r.length===1)return r[0];let n=!1,s=[],i=r.reduce((u,d,f)=>{/[?#]/.test(d)&&(n=!0);let p=a[f],m=(n?encodeURIComponent:e)(""+p);return f!==a.length&&(p==null||typeof p=="object"&&p.toString===Object.getPrototypeOf(Object.getPrototypeOf(p.hasOwnProperty??oae)??oae)?.toString)&&(m=p+"",s.push({start:u.length+d.length,length:m.length,error:`Value of type ${Object.prototype.toString.call(p).slice(8,-1)} is not a valid path parameter`})),u+d+(f===a.length?"":m)},""),o=i.split(/[?#]/,1)[0],l=/(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi,c;for(;(c=l.exec(o))!==null;)s.push({start:c.index,length:c[0].length,error:`Value "${c[0]}" can't be safely passed as a path parameter`});if(s.sort((u,d)=>u.start-d.start),s.length>0){let u=0,d=s.reduce((f,p)=>{let m=" ".repeat(p.start-u),h="^".repeat(p.length);return u=p.start+p.length,f+m+h},"");throw new ct(`Path parameters result in path with invalid segments:
|
|
${s.map(f=>f.error).join(`
|
|
`)}
|
|
${i}
|
|
${d}`)}return i},Re=xWe(lae);var Lh=class extends _e{list(t,r={},a){return this._client.getAPIList(Re`/chat/completions/${t}/messages`,gr,{query:r,...a})}};function yT(e){return e!==void 0&&"function"in e&&e.function!==void 0}function xT(e){return e?.$brand==="auto-parseable-response-format"}function Rh(e){return e?.$brand==="auto-parseable-tool"}function cae(e,t){return!t||!Q3(t)?{...e,choices:e.choices.map(r=>(dae(r.message.tool_calls),{...r,message:{...r.message,parsed:null,...r.message.tool_calls?{tool_calls:r.message.tool_calls}:void 0}}))}:bT(e,t)}function bT(e,t){let r=e.choices.map(a=>{if(a.finish_reason==="length")throw new Vx;if(a.finish_reason==="content_filter")throw new qx;return dae(a.message.tool_calls),{...a,message:{...a.message,...a.message.tool_calls?{tool_calls:a.message.tool_calls?.map(n=>TWe(t,n))??void 0}:void 0,parsed:a.message.content&&!a.message.refusal?SWe(t,a.message.content):null}}});return{...e,choices:r}}function SWe(e,t){return e.response_format?.type!=="json_schema"?null:e.response_format?.type==="json_schema"?"$parseRaw"in e.response_format?e.response_format.$parseRaw(t):JSON.parse(t):null}function TWe(e,t){let r=e.tools?.find(a=>yT(a)&&a.function?.name===t.function.name);return{...t,function:{...t.function,parsed_arguments:Rh(r)?r.$parseRaw(t.function.arguments):r?.function.strict?JSON.parse(t.function.arguments):null}}}function uae(e,t){if(!e||!("tools"in e)||!e.tools)return!1;let r=e.tools?.find(a=>yT(a)&&a.function?.name===t.function.name);return yT(r)&&(Rh(r)||r?.function.strict||!1)}function Q3(e){return xT(e.response_format)?!0:e.tools?.some(t=>Rh(t)||t.type==="function"&&t.function.strict===!0)??!1}function dae(e){for(let t of e||[])if(t.type!=="function")throw new ct(`Currently only \`function\` tool calls are supported; Received \`${t.type}\``)}function fae(e){for(let t of e??[]){if(t.type!=="function")throw new ct(`Currently only \`function\` tool types support auto-parsing; Received \`${t.type}\``);if(t.function.strict!==!0)throw new ct(`The \`${t.function.name}\` tool is not marked with \`strict: true\`. Only strict function tools can be auto-parsed`)}}var Gx=e=>e?.role==="assistant",Z3=e=>e?.role==="tool";var eF,TA,wA,vT,ST,CA,TT,Nd,wT,EA,PA,Kx,pae,Cp=class{constructor(){eF.add(this),this.controller=new AbortController,TA.set(this,void 0),wA.set(this,()=>{}),vT.set(this,()=>{}),ST.set(this,void 0),CA.set(this,()=>{}),TT.set(this,()=>{}),Nd.set(this,{}),wT.set(this,!1),EA.set(this,!1),PA.set(this,!1),Kx.set(this,!1),kt(this,TA,new Promise((t,r)=>{kt(this,wA,t,"f"),kt(this,vT,r,"f")}),"f"),kt(this,ST,new Promise((t,r)=>{kt(this,CA,t,"f"),kt(this,TT,r,"f")}),"f"),be(this,TA,"f").catch(()=>{}),be(this,ST,"f").catch(()=>{})}_run(t){setTimeout(()=>{t().then(()=>{this._emitFinal(),this._emit("end")},be(this,eF,"m",pae).bind(this))},0)}_connected(){this.ended||(be(this,wA,"f").call(this),this._emit("connect"))}get ended(){return be(this,wT,"f")}get errored(){return be(this,EA,"f")}get aborted(){return be(this,PA,"f")}abort(){this.controller.abort()}on(t,r){return(be(this,Nd,"f")[t]||(be(this,Nd,"f")[t]=[])).push({listener:r}),this}off(t,r){let a=be(this,Nd,"f")[t];if(!a)return this;let n=a.findIndex(s=>s.listener===r);return n>=0&&a.splice(n,1),this}once(t,r){return(be(this,Nd,"f")[t]||(be(this,Nd,"f")[t]=[])).push({listener:r,once:!0}),this}emitted(t){return new Promise((r,a)=>{kt(this,Kx,!0,"f"),t!=="error"&&this.once("error",a),this.once(t,r)})}async done(){kt(this,Kx,!0,"f"),await be(this,ST,"f")}_emit(t,...r){if(be(this,wT,"f"))return;t==="end"&&(kt(this,wT,!0,"f"),be(this,CA,"f").call(this));let a=be(this,Nd,"f")[t];if(a&&(be(this,Nd,"f")[t]=a.filter(n=>!n.once),a.forEach(({listener:n})=>n(...r))),t==="abort"){let n=r[0];!be(this,Kx,"f")&&!a?.length&&Promise.reject(n),be(this,vT,"f").call(this,n),be(this,TT,"f").call(this,n),this._emit("end");return}if(t==="error"){let n=r[0];!be(this,Kx,"f")&&!a?.length&&Promise.reject(n),be(this,vT,"f").call(this,n),be(this,TT,"f").call(this,n),this._emit("end")}}_emitFinal(){}};TA=new WeakMap,wA=new WeakMap,vT=new WeakMap,ST=new WeakMap,CA=new WeakMap,TT=new WeakMap,Nd=new WeakMap,wT=new WeakMap,EA=new WeakMap,PA=new WeakMap,Kx=new WeakMap,eF=new WeakSet,pae=function(t){if(kt(this,EA,!0,"f"),t instanceof Error&&t.name==="AbortError"&&(t=new Gn),t instanceof Gn)return kt(this,PA,!0,"f"),this._emit("abort",t);if(t instanceof ct)return this._emit("error",t);if(t instanceof Error){let r=new ct(t.message);return r.cause=t,this._emit("error",r)}return this._emit("error",new ct(String(t)))};function mae(e){return typeof e.parse=="function"}var _i,tF,AA,rF,aF,nF,hae,gae,wWe=10,Wx=class extends Cp{constructor(){super(...arguments),_i.add(this),this._chatCompletions=[],this.messages=[]}_addChatCompletion(t){this._chatCompletions.push(t),this._emit("chatCompletion",t);let r=t.choices[0]?.message;return r&&this._addMessage(r),t}_addMessage(t,r=!0){if("content"in t||(t.content=null),this.messages.push(t),r){if(this._emit("message",t),Z3(t)&&t.content)this._emit("functionToolCallResult",t.content);else if(Gx(t)&&t.tool_calls)for(let a of t.tool_calls)a.type==="function"&&this._emit("functionToolCall",a.function)}}async finalChatCompletion(){await this.done();let t=this._chatCompletions[this._chatCompletions.length-1];if(!t)throw new ct("stream ended without producing a ChatCompletion");return t}async finalContent(){return await this.done(),be(this,_i,"m",tF).call(this)}async finalMessage(){return await this.done(),be(this,_i,"m",AA).call(this)}async finalFunctionToolCall(){return await this.done(),be(this,_i,"m",rF).call(this)}async finalFunctionToolCallResult(){return await this.done(),be(this,_i,"m",aF).call(this)}async totalUsage(){return await this.done(),be(this,_i,"m",nF).call(this)}allChatCompletions(){return[...this._chatCompletions]}_emitFinal(){let t=this._chatCompletions[this._chatCompletions.length-1];t&&this._emit("finalChatCompletion",t);let r=be(this,_i,"m",AA).call(this);r&&this._emit("finalMessage",r);let a=be(this,_i,"m",tF).call(this);a&&this._emit("finalContent",a);let n=be(this,_i,"m",rF).call(this);n&&this._emit("finalFunctionToolCall",n);let s=be(this,_i,"m",aF).call(this);s!=null&&this._emit("finalFunctionToolCallResult",s),this._chatCompletions.some(i=>i.usage)&&this._emit("totalUsage",be(this,_i,"m",nF).call(this))}async _createChatCompletion(t,r,a){let n=a?.signal;n&&(n.aborted&&this.controller.abort(),n.addEventListener("abort",()=>this.controller.abort())),be(this,_i,"m",hae).call(this,r);let s=await t.chat.completions.create({...r,stream:!1},{...a,signal:this.controller.signal});return this._connected(),this._addChatCompletion(bT(s,r))}async _runChatCompletion(t,r,a){for(let n of r.messages)this._addMessage(n,!1);return await this._createChatCompletion(t,r,a)}async _runTools(t,r,a){let n="tool",{tool_choice:s="auto",stream:i,...o}=r,l=typeof s!="string"&&s.type==="function"&&s?.function?.name,{maxChatCompletions:c=wWe}=a||{},u=r.tools.map(p=>{if(Rh(p)){if(!p.$callback)throw new ct("Tool given to `.runTools()` that does not have an associated function");return{type:"function",function:{function:p.$callback,name:p.function.name,description:p.function.description||"",parameters:p.function.parameters,parse:p.$parseRaw,strict:!0}}}return p}),d={};for(let p of u)p.type==="function"&&(d[p.function.name||p.function.function.name]=p.function);let f="tools"in r?u.map(p=>p.type==="function"?{type:"function",function:{name:p.function.name||p.function.function.name,parameters:p.function.parameters,description:p.function.description,strict:p.function.strict}}:p):void 0;for(let p of r.messages)this._addMessage(p,!1);for(let p=0;p<c;++p){let h=(await this._createChatCompletion(t,{...o,tool_choice:s,tools:f,messages:[...this.messages]},a)).choices[0]?.message;if(!h)throw new ct("missing message in ChatCompletion response");if(!h.tool_calls?.length)return;for(let x of h.tool_calls){if(x.type!=="function")continue;let g=x.id,{name:y,arguments:b}=x.function,S=d[y];if(S){if(l&&l!==y){let I=`Invalid tool_call: ${JSON.stringify(y)}. ${JSON.stringify(l)} requested. Please try again`;this._addMessage({role:n,tool_call_id:g,content:I});continue}}else{let I=`Invalid tool_call: ${JSON.stringify(y)}. Available options are: ${Object.keys(d).map(R=>JSON.stringify(R)).join(", ")}. Please try again`;this._addMessage({role:n,tool_call_id:g,content:I});continue}let w;try{w=mae(S)?await S.parse(b):b}catch(I){let R=I instanceof Error?I.message:String(I);this._addMessage({role:n,tool_call_id:g,content:R});continue}let P=await S.function(w,this),C=be(this,_i,"m",gae).call(this,P);if(this._addMessage({role:n,tool_call_id:g,content:C}),l)return}}}};_i=new WeakSet,tF=function(){return be(this,_i,"m",AA).call(this).content??null},AA=function(){let t=this.messages.length;for(;t-- >0;){let r=this.messages[t];if(Gx(r))return{...r,content:r.content??null,refusal:r.refusal??null}}throw new ct("stream ended without producing a ChatCompletionMessage with role=assistant")},rF=function(){for(let t=this.messages.length-1;t>=0;t--){let r=this.messages[t];if(Gx(r)&&r?.tool_calls?.length)return r.tool_calls.filter(a=>a.type==="function").at(-1)?.function}},aF=function(){for(let t=this.messages.length-1;t>=0;t--){let r=this.messages[t];if(Z3(r)&&r.content!=null&&typeof r.content=="string"&&this.messages.some(a=>a.role==="assistant"&&a.tool_calls?.some(n=>n.type==="function"&&n.id===r.tool_call_id)))return r.content}},nF=function(){let t={completion_tokens:0,prompt_tokens:0,total_tokens:0};for(let{usage:r}of this._chatCompletions)r&&(t.completion_tokens+=r.completion_tokens,t.prompt_tokens+=r.prompt_tokens,t.total_tokens+=r.total_tokens);return t},hae=function(t){if(t.n!=null&&t.n>1)throw new ct("ChatCompletion convenience helpers only support n=1 at this time. To use n>1, please use chat.completions.create() directly.")},gae=function(t){return typeof t=="string"?t:t===void 0?"undefined":JSON.stringify(t)};var kh=class extends Wx{static runTools(t,r,a){let n=new kh,s={...a,headers:{...a?.headers,"X-Stainless-Helper-Method":"runTools"}};return n._run(()=>n._runTools(t,r,s)),n}_addMessage(t,r=!0){super._addMessage(t,r),Gx(t)&&t.content&&this._emit("content",t.content)}};var As={STR:1,NUM:2,ARR:4,OBJ:8,NULL:16,BOOL:32,NAN:64,INFINITY:128,MINUS_INFINITY:256,INF:384,SPECIAL:496,ATOM:499,COLLECTION:12,ALL:511},sF=class extends Error{},iF=class extends Error{};function CWe(e,t=As.ALL){if(typeof e!="string")throw new TypeError(`expecting str, got ${typeof e}`);if(!e.trim())throw new Error(`${e} is empty`);return EWe(e.trim(),t)}var EWe=(e,t)=>{let r=e.length,a=0,n=f=>{throw new sF(`${f} at position ${a}`)},s=f=>{throw new iF(`${f} at position ${a}`)},i=()=>(d(),a>=r&&n("Unexpected end of input"),e[a]==='"'?o():e[a]==="{"?l():e[a]==="["?c():e.substring(a,a+4)==="null"||As.NULL&t&&r-a<4&&"null".startsWith(e.substring(a))?(a+=4,null):e.substring(a,a+4)==="true"||As.BOOL&t&&r-a<4&&"true".startsWith(e.substring(a))?(a+=4,!0):e.substring(a,a+5)==="false"||As.BOOL&t&&r-a<5&&"false".startsWith(e.substring(a))?(a+=5,!1):e.substring(a,a+8)==="Infinity"||As.INFINITY&t&&r-a<8&&"Infinity".startsWith(e.substring(a))?(a+=8,1/0):e.substring(a,a+9)==="-Infinity"||As.MINUS_INFINITY&t&&1<r-a&&r-a<9&&"-Infinity".startsWith(e.substring(a))?(a+=9,-1/0):e.substring(a,a+3)==="NaN"||As.NAN&t&&r-a<3&&"NaN".startsWith(e.substring(a))?(a+=3,NaN):u()),o=()=>{let f=a,p=!1;for(a++;a<r&&(e[a]!=='"'||p&&e[a-1]==="\\");)p=e[a]==="\\"?!p:!1,a++;if(e.charAt(a)=='"')try{return JSON.parse(e.substring(f,++a-Number(p)))}catch(m){s(String(m))}else if(As.STR&t)try{return JSON.parse(e.substring(f,a-Number(p))+'"')}catch{return JSON.parse(e.substring(f,e.lastIndexOf("\\"))+'"')}n("Unterminated string literal")},l=()=>{a++,d();let f={};try{for(;e[a]!=="}";){if(d(),a>=r&&As.OBJ&t)return f;let p=o();d(),a++;try{let m=i();Object.defineProperty(f,p,{value:m,writable:!0,enumerable:!0,configurable:!0})}catch(m){if(As.OBJ&t)return f;throw m}d(),e[a]===","&&a++}}catch{if(As.OBJ&t)return f;n("Expected '}' at end of object")}return a++,f},c=()=>{a++;let f=[];try{for(;e[a]!=="]";)f.push(i()),d(),e[a]===","&&a++}catch{if(As.ARR&t)return f;n("Expected ']' at end of array")}return a++,f},u=()=>{if(a===0){e==="-"&&As.NUM&t&&n("Not sure what '-' is");try{return JSON.parse(e)}catch(p){if(As.NUM&t)try{return e[e.length-1]==="."?JSON.parse(e.substring(0,e.lastIndexOf("."))):JSON.parse(e.substring(0,e.lastIndexOf("e")))}catch{}s(String(p))}}let f=a;for(e[a]==="-"&&a++;e[a]&&!",]}".includes(e[a]);)a++;a==r&&!(As.NUM&t)&&n("Unterminated number literal");try{return JSON.parse(e.substring(f,a))}catch{e.substring(f,a)==="-"&&As.NUM&t&&n("Not sure what '-' is");try{return JSON.parse(e.substring(f,e.lastIndexOf("e")))}catch(m){s(String(m))}}},d=()=>{for(;a<r&&`
|
|
\r `.includes(e[a]);)a++};return i()},oF=e=>CWe(e,As.ALL^As.NUM);var ms,Ld,Xx,Ep,lF,IA,cF,uF,dF,NA,fF,yae,du=class extends Wx{constructor(t){super(),ms.add(this),Ld.set(this,void 0),Xx.set(this,void 0),Ep.set(this,void 0),kt(this,Ld,t,"f"),kt(this,Xx,[],"f")}get currentChatCompletionSnapshot(){return be(this,Ep,"f")}static fromReadableStream(t){let r=new du(null);return r._run(()=>r._fromReadableStream(t)),r}static createChatCompletion(t,r,a){let n=new du(r);return n._run(()=>n._runChatCompletion(t,{...r,stream:!0},{...a,headers:{...a?.headers,"X-Stainless-Helper-Method":"stream"}})),n}async _createChatCompletion(t,r,a){super._createChatCompletion;let n=a?.signal;n&&(n.aborted&&this.controller.abort(),n.addEventListener("abort",()=>this.controller.abort())),be(this,ms,"m",lF).call(this);let s=await t.chat.completions.create({...r,stream:!0},{...a,signal:this.controller.signal});this._connected();for await(let i of s)be(this,ms,"m",cF).call(this,i);if(s.controller.signal?.aborted)throw new Gn;return this._addChatCompletion(be(this,ms,"m",NA).call(this))}async _fromReadableStream(t,r){let a=r?.signal;a&&(a.aborted&&this.controller.abort(),a.addEventListener("abort",()=>this.controller.abort())),be(this,ms,"m",lF).call(this),this._connected();let n=Di.fromReadableStream(t,this.controller),s;for await(let i of n)s&&s!==i.id&&this._addChatCompletion(be(this,ms,"m",NA).call(this)),be(this,ms,"m",cF).call(this,i),s=i.id;if(n.controller.signal?.aborted)throw new Gn;return this._addChatCompletion(be(this,ms,"m",NA).call(this))}[(Ld=new WeakMap,Xx=new WeakMap,Ep=new WeakMap,ms=new WeakSet,lF=function(){this.ended||kt(this,Ep,void 0,"f")},IA=function(r){let a=be(this,Xx,"f")[r.index];return a||(a={content_done:!1,refusal_done:!1,logprobs_content_done:!1,logprobs_refusal_done:!1,done_tool_calls:new Set,current_tool_call_index:null},be(this,Xx,"f")[r.index]=a,a)},cF=function(r){if(this.ended)return;let a=be(this,ms,"m",yae).call(this,r);this._emit("chunk",r,a);for(let n of r.choices){let s=a.choices[n.index];n.delta.content!=null&&s.message?.role==="assistant"&&s.message?.content&&(this._emit("content",n.delta.content,s.message.content),this._emit("content.delta",{delta:n.delta.content,snapshot:s.message.content,parsed:s.message.parsed})),n.delta.refusal!=null&&s.message?.role==="assistant"&&s.message?.refusal&&this._emit("refusal.delta",{delta:n.delta.refusal,snapshot:s.message.refusal}),n.logprobs?.content!=null&&s.message?.role==="assistant"&&this._emit("logprobs.content.delta",{content:n.logprobs?.content,snapshot:s.logprobs?.content??[]}),n.logprobs?.refusal!=null&&s.message?.role==="assistant"&&this._emit("logprobs.refusal.delta",{refusal:n.logprobs?.refusal,snapshot:s.logprobs?.refusal??[]});let i=be(this,ms,"m",IA).call(this,s);s.finish_reason&&(be(this,ms,"m",dF).call(this,s),i.current_tool_call_index!=null&&be(this,ms,"m",uF).call(this,s,i.current_tool_call_index));for(let o of n.delta.tool_calls??[])i.current_tool_call_index!==o.index&&(be(this,ms,"m",dF).call(this,s),i.current_tool_call_index!=null&&be(this,ms,"m",uF).call(this,s,i.current_tool_call_index)),i.current_tool_call_index=o.index;for(let o of n.delta.tool_calls??[]){let l=s.message.tool_calls?.[o.index];l?.type&&(l?.type==="function"?this._emit("tool_calls.function.arguments.delta",{name:l.function?.name,index:o.index,arguments:l.function.arguments,parsed_arguments:l.function.parsed_arguments,arguments_delta:o.function?.arguments??""}):(l?.type,void 0))}}},uF=function(r,a){if(be(this,ms,"m",IA).call(this,r).done_tool_calls.has(a))return;let s=r.message.tool_calls?.[a];if(!s)throw new Error("no tool call snapshot");if(!s.type)throw new Error("tool call snapshot missing `type`");if(s.type==="function"){let i=be(this,Ld,"f")?.tools?.find(o=>yT(o)&&o.function.name===s.function.name);this._emit("tool_calls.function.arguments.done",{name:s.function.name,index:a,arguments:s.function.arguments,parsed_arguments:Rh(i)?i.$parseRaw(s.function.arguments):i?.function.strict?JSON.parse(s.function.arguments):null})}else s.type},dF=function(r){let a=be(this,ms,"m",IA).call(this,r);if(r.message.content&&!a.content_done){a.content_done=!0;let n=be(this,ms,"m",fF).call(this);this._emit("content.done",{content:r.message.content,parsed:n?n.$parseRaw(r.message.content):null})}r.message.refusal&&!a.refusal_done&&(a.refusal_done=!0,this._emit("refusal.done",{refusal:r.message.refusal})),r.logprobs?.content&&!a.logprobs_content_done&&(a.logprobs_content_done=!0,this._emit("logprobs.content.done",{content:r.logprobs.content})),r.logprobs?.refusal&&!a.logprobs_refusal_done&&(a.logprobs_refusal_done=!0,this._emit("logprobs.refusal.done",{refusal:r.logprobs.refusal}))},NA=function(){if(this.ended)throw new ct("stream has ended, this shouldn't happen");let r=be(this,Ep,"f");if(!r)throw new ct("request ended without sending any chunks");return kt(this,Ep,void 0,"f"),kt(this,Xx,[],"f"),PWe(r,be(this,Ld,"f"))},fF=function(){let r=be(this,Ld,"f")?.response_format;return xT(r)?r:null},yae=function(r){var a,n,s,i;let o=be(this,Ep,"f"),{choices:l,...c}=r;o?Object.assign(o,c):o=kt(this,Ep,{...c,choices:[]},"f");for(let{delta:u,finish_reason:d,index:f,logprobs:p=null,...m}of r.choices){let h=o.choices[f];if(h||(h=o.choices[f]={finish_reason:d,index:f,message:{},logprobs:p,...m}),p)if(!h.logprobs)h.logprobs=Object.assign({},p);else{let{content:P,refusal:C,...I}=p;Object.assign(h.logprobs,I),P&&((a=h.logprobs).content??(a.content=[]),h.logprobs.content.push(...P)),C&&((n=h.logprobs).refusal??(n.refusal=[]),h.logprobs.refusal.push(...C))}if(d&&(h.finish_reason=d,be(this,Ld,"f")&&Q3(be(this,Ld,"f")))){if(d==="length")throw new Vx;if(d==="content_filter")throw new qx}if(Object.assign(h,m),!u)continue;let{content:x,refusal:g,function_call:y,role:b,tool_calls:S,...w}=u;if(Object.assign(h.message,w),g&&(h.message.refusal=(h.message.refusal||"")+g),b&&(h.message.role=b),y&&(h.message.function_call?(y.name&&(h.message.function_call.name=y.name),y.arguments&&((s=h.message.function_call).arguments??(s.arguments=""),h.message.function_call.arguments+=y.arguments)):h.message.function_call=y),x&&(h.message.content=(h.message.content||"")+x,!h.message.refusal&&be(this,ms,"m",fF).call(this)&&(h.message.parsed=oF(h.message.content))),S){h.message.tool_calls||(h.message.tool_calls=[]);for(let{index:P,id:C,type:I,function:R,...O}of S){let D=(i=h.message.tool_calls)[P]??(i[P]={});Object.assign(D,O),C&&(D.id=C),I&&(D.type=I),R&&(D.function??(D.function={name:R.name??"",arguments:""})),R?.name&&(D.function.name=R.name),R?.arguments&&(D.function.arguments+=R.arguments,uae(be(this,Ld,"f"),D)&&(D.function.parsed_arguments=oF(D.function.arguments)))}}}return o},Symbol.asyncIterator)](){let t=[],r=[],a=!1;return this.on("chunk",n=>{let s=r.shift();s?s.resolve(n):t.push(n)}),this.on("end",()=>{a=!0;for(let n of r)n.resolve(void 0);r.length=0}),this.on("abort",n=>{a=!0;for(let s of r)s.reject(n);r.length=0}),this.on("error",n=>{a=!0;for(let s of r)s.reject(n);r.length=0}),{next:async()=>t.length?{value:t.shift(),done:!1}:a?{value:void 0,done:!0}:new Promise((s,i)=>r.push({resolve:s,reject:i})).then(s=>s?{value:s,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}toReadableStream(){return new Di(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}};function PWe(e,t){let{id:r,choices:a,created:n,model:s,system_fingerprint:i,...o}=e,l={...o,id:r,choices:a.map(({message:c,finish_reason:u,index:d,logprobs:f,...p})=>{if(!u)throw new ct(`missing finish_reason for choice ${d}`);let{content:m=null,function_call:h,tool_calls:x,...g}=c,y=c.role;if(!y)throw new ct(`missing role for choice ${d}`);if(h){let{arguments:b,name:S}=h;if(b==null)throw new ct(`missing function_call.arguments for choice ${d}`);if(!S)throw new ct(`missing function_call.name for choice ${d}`);return{...p,message:{content:m,function_call:{arguments:b,name:S},role:y,refusal:c.refusal??null},finish_reason:u,index:d,logprobs:f}}return x?{...p,index:d,finish_reason:u,logprobs:f,message:{...g,role:y,content:m,refusal:c.refusal??null,tool_calls:x.map((b,S)=>{let{function:w,type:P,id:C,...I}=b,{arguments:R,name:O,...D}=w||{};if(C==null)throw new ct(`missing choices[${d}].tool_calls[${S}].id
|
|
${LA(e)}`);if(P==null)throw new ct(`missing choices[${d}].tool_calls[${S}].type
|
|
${LA(e)}`);if(O==null)throw new ct(`missing choices[${d}].tool_calls[${S}].function.name
|
|
${LA(e)}`);if(R==null)throw new ct(`missing choices[${d}].tool_calls[${S}].function.arguments
|
|
${LA(e)}`);return{...I,id:C,type:P,function:{...D,name:O,arguments:R}}})}}:{...p,message:{...g,content:m,role:y,refusal:c.refusal??null},finish_reason:u,index:d,logprobs:f}}),created:n,model:s,object:"chat.completion",...i?{system_fingerprint:i}:{}};return cae(l,t)}function LA(e){return JSON.stringify(e)}var Pp=class extends du{static fromReadableStream(t){let r=new Pp(null);return r._run(()=>r._fromReadableStream(t)),r}static runTools(t,r,a){let n=new Pp(r),s={...a,headers:{...a?.headers,"X-Stainless-Helper-Method":"runTools"}};return n._run(()=>n._runTools(t,r,s)),n}};var Rd=class extends _e{constructor(){super(...arguments),this.messages=new Lh(this._client)}create(t,r){return this._client.post("/chat/completions",{body:t,...r,stream:t.stream??!1})}retrieve(t,r){return this._client.get(Re`/chat/completions/${t}`,r)}update(t,r,a){return this._client.post(Re`/chat/completions/${t}`,{body:r,...a})}list(t={},r){return this._client.getAPIList("/chat/completions",gr,{query:t,...r})}delete(t,r){return this._client.delete(Re`/chat/completions/${t}`,r)}parse(t,r){return fae(t.tools),this._client.chat.completions.create(t,{...r,headers:{...r?.headers,"X-Stainless-Helper-Method":"chat.completions.parse"}})._thenUnwrap(a=>bT(a,t))}runTools(t,r){return t.stream?Pp.runTools(this._client,t,r):kh.runTools(this._client,t,r)}stream(t,r){return du.createChatCompletion(this._client,t,r)}};Rd.Messages=Lh;var Ap=class extends _e{constructor(){super(...arguments),this.completions=new Rd(this._client)}};Ap.Completions=Rd;var xae=Symbol("brand.privateNullableHeaders");function*IWe(e){if(!e)return;if(xae in e){let{values:a,nulls:n}=e;yield*a.entries();for(let s of n)yield[s,null];return}let t=!1,r;e instanceof Headers?r=e.entries():M3(e)?r=e:(t=!0,r=Object.entries(e??{}));for(let a of r){let n=a[0];if(typeof n!="string")throw new TypeError("expected header name to be a string");let s=M3(a[1])?a[1]:[a[1]],i=!1;for(let o of s)o!==void 0&&(t&&!i&&(i=!0,yield[n,null]),yield[n,o])}}var Ke=e=>{let t=new Headers,r=new Set;for(let a of e){let n=new Set;for(let[s,i]of IWe(a)){let o=s.toLowerCase();n.has(o)||(t.delete(s),n.add(o)),i===null?(t.delete(s),r.add(o)):(t.append(s,i),r.delete(o))}}return{[xae]:!0,values:t,nulls:r}};var Yx=class extends _e{create(t,r){return this._client.post("/audio/speech",{body:t,...r,headers:Ke([{Accept:"application/octet-stream"},r?.headers]),__binaryResponse:!0})}};var Jx=class extends _e{create(t,r){return this._client.post("/audio/transcriptions",Vo({body:t,...r,stream:t.stream??!1,__metadata:{model:t.model}},this._client))}};var Qx=class extends _e{create(t,r){return this._client.post("/audio/translations",Vo({body:t,...r,__metadata:{model:t.model}},this._client))}};var fu=class extends _e{constructor(){super(...arguments),this.transcriptions=new Jx(this._client),this.translations=new Qx(this._client),this.speech=new Yx(this._client)}};fu.Transcriptions=Jx;fu.Translations=Qx;fu.Speech=Yx;var Mh=class extends _e{create(t,r){return this._client.post("/batches",{body:t,...r})}retrieve(t,r){return this._client.get(Re`/batches/${t}`,r)}list(t={},r){return this._client.getAPIList("/batches",gr,{query:t,...r})}cancel(t,r){return this._client.post(Re`/batches/${t}/cancel`,r)}};var Zx=class extends _e{create(t,r){return this._client.post("/assistants",{body:t,...r,headers:Ke([{"OpenAI-Beta":"assistants=v2"},r?.headers])})}retrieve(t,r){return this._client.get(Re`/assistants/${t}`,{...r,headers:Ke([{"OpenAI-Beta":"assistants=v2"},r?.headers])})}update(t,r,a){return this._client.post(Re`/assistants/${t}`,{body:r,...a,headers:Ke([{"OpenAI-Beta":"assistants=v2"},a?.headers])})}list(t={},r){return this._client.getAPIList("/assistants",gr,{query:t,...r,headers:Ke([{"OpenAI-Beta":"assistants=v2"},r?.headers])})}delete(t,r){return this._client.delete(Re`/assistants/${t}`,{...r,headers:Ke([{"OpenAI-Beta":"assistants=v2"},r?.headers])})}};var eb=class extends _e{create(t,r){return this._client.post("/realtime/sessions",{body:t,...r,headers:Ke([{"OpenAI-Beta":"assistants=v2"},r?.headers])})}};var tb=class extends _e{create(t,r){return this._client.post("/realtime/transcription_sessions",{body:t,...r,headers:Ke([{"OpenAI-Beta":"assistants=v2"},r?.headers])})}};var Ip=class extends _e{constructor(){super(...arguments),this.sessions=new eb(this._client),this.transcriptionSessions=new tb(this._client)}};Ip.Sessions=eb;Ip.TranscriptionSessions=tb;var rb=class extends _e{create(t,r){return this._client.post("/chatkit/sessions",{body:t,...r,headers:Ke([{"OpenAI-Beta":"chatkit_beta=v1"},r?.headers])})}cancel(t,r){return this._client.post(Re`/chatkit/sessions/${t}/cancel`,{...r,headers:Ke([{"OpenAI-Beta":"chatkit_beta=v1"},r?.headers])})}};var ab=class extends _e{retrieve(t,r){return this._client.get(Re`/chatkit/threads/${t}`,{...r,headers:Ke([{"OpenAI-Beta":"chatkit_beta=v1"},r?.headers])})}list(t={},r){return this._client.getAPIList("/chatkit/threads",Id,{query:t,...r,headers:Ke([{"OpenAI-Beta":"chatkit_beta=v1"},r?.headers])})}delete(t,r){return this._client.delete(Re`/chatkit/threads/${t}`,{...r,headers:Ke([{"OpenAI-Beta":"chatkit_beta=v1"},r?.headers])})}listItems(t,r={},a){return this._client.getAPIList(Re`/chatkit/threads/${t}/items`,Id,{query:r,...a,headers:Ke([{"OpenAI-Beta":"chatkit_beta=v1"},a?.headers])})}};var Np=class extends _e{constructor(){super(...arguments),this.sessions=new rb(this._client),this.threads=new ab(this._client)}};Np.Sessions=rb;Np.Threads=ab;var nb=class extends _e{create(t,r,a){return this._client.post(Re`/threads/${t}/messages`,{body:r,...a,headers:Ke([{"OpenAI-Beta":"assistants=v2"},a?.headers])})}retrieve(t,r,a){let{thread_id:n}=r;return this._client.get(Re`/threads/${n}/messages/${t}`,{...a,headers:Ke([{"OpenAI-Beta":"assistants=v2"},a?.headers])})}update(t,r,a){let{thread_id:n,...s}=r;return this._client.post(Re`/threads/${n}/messages/${t}`,{body:s,...a,headers:Ke([{"OpenAI-Beta":"assistants=v2"},a?.headers])})}list(t,r={},a){return this._client.getAPIList(Re`/threads/${t}/messages`,gr,{query:r,...a,headers:Ke([{"OpenAI-Beta":"assistants=v2"},a?.headers])})}delete(t,r,a){let{thread_id:n}=r;return this._client.delete(Re`/threads/${n}/messages/${t}`,{...a,headers:Ke([{"OpenAI-Beta":"assistants=v2"},a?.headers])})}};var sb=class extends _e{retrieve(t,r,a){let{thread_id:n,run_id:s,...i}=r;return this._client.get(Re`/threads/${n}/runs/${s}/steps/${t}`,{query:i,...a,headers:Ke([{"OpenAI-Beta":"assistants=v2"},a?.headers])})}list(t,r,a){let{thread_id:n,...s}=r;return this._client.getAPIList(Re`/threads/${n}/runs/${t}/steps`,gr,{query:s,...a,headers:Ke([{"OpenAI-Beta":"assistants=v2"},a?.headers])})}};var bae=e=>{if(typeof Buffer<"u"){let t=Buffer.from(e,"base64");return Array.from(new Float32Array(t.buffer,t.byteOffset,t.length/Float32Array.BYTES_PER_ELEMENT))}else{let t=atob(e),r=t.length,a=new Uint8Array(r);for(let n=0;n<r;n++)a[n]=t.charCodeAt(n);return Array.from(new Float32Array(a.buffer))}};var Lp=e=>{if(typeof globalThis.process<"u")return globalThis.process.env?.[e]?.trim()??void 0;if(typeof globalThis.Deno<"u")return globalThis.Deno.env?.get?.(e)?.trim()};var $s,_h,pF,pu,RA,dc,Oh,ib,Dh,DA,qo,kA,MA,PT,CT,ET,vae,Sae,Tae,wae,Cae,Eae,Pae,kd=class extends Cp{constructor(){super(...arguments),$s.add(this),pF.set(this,[]),pu.set(this,{}),RA.set(this,{}),dc.set(this,void 0),Oh.set(this,void 0),ib.set(this,void 0),Dh.set(this,void 0),DA.set(this,void 0),qo.set(this,void 0),kA.set(this,void 0),MA.set(this,void 0),PT.set(this,void 0)}[(pF=new WeakMap,pu=new WeakMap,RA=new WeakMap,dc=new WeakMap,Oh=new WeakMap,ib=new WeakMap,Dh=new WeakMap,DA=new WeakMap,qo=new WeakMap,kA=new WeakMap,MA=new WeakMap,PT=new WeakMap,$s=new WeakSet,Symbol.asyncIterator)](){let t=[],r=[],a=!1;return this.on("event",n=>{let s=r.shift();s?s.resolve(n):t.push(n)}),this.on("end",()=>{a=!0;for(let n of r)n.resolve(void 0);r.length=0}),this.on("abort",n=>{a=!0;for(let s of r)s.reject(n);r.length=0}),this.on("error",n=>{a=!0;for(let s of r)s.reject(n);r.length=0}),{next:async()=>t.length?{value:t.shift(),done:!1}:a?{value:void 0,done:!0}:new Promise((s,i)=>r.push({resolve:s,reject:i})).then(s=>s?{value:s,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}static fromReadableStream(t){let r=new _h;return r._run(()=>r._fromReadableStream(t)),r}async _fromReadableStream(t,r){let a=r?.signal;a&&(a.aborted&&this.controller.abort(),a.addEventListener("abort",()=>this.controller.abort())),this._connected();let n=Di.fromReadableStream(t,this.controller);for await(let s of n)be(this,$s,"m",CT).call(this,s);if(n.controller.signal?.aborted)throw new Gn;return this._addRun(be(this,$s,"m",ET).call(this))}toReadableStream(){return new Di(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}static createToolAssistantStream(t,r,a,n){let s=new _h;return s._run(()=>s._runToolAssistantStream(t,r,a,{...n,headers:{...n?.headers,"X-Stainless-Helper-Method":"stream"}})),s}async _createToolAssistantStream(t,r,a,n){let s=n?.signal;s&&(s.aborted&&this.controller.abort(),s.addEventListener("abort",()=>this.controller.abort()));let i={...a,stream:!0},o=await t.submitToolOutputs(r,i,{...n,signal:this.controller.signal});this._connected();for await(let l of o)be(this,$s,"m",CT).call(this,l);if(o.controller.signal?.aborted)throw new Gn;return this._addRun(be(this,$s,"m",ET).call(this))}static createThreadAssistantStream(t,r,a){let n=new _h;return n._run(()=>n._threadAssistantStream(t,r,{...a,headers:{...a?.headers,"X-Stainless-Helper-Method":"stream"}})),n}static createAssistantStream(t,r,a,n){let s=new _h;return s._run(()=>s._runAssistantStream(t,r,a,{...n,headers:{...n?.headers,"X-Stainless-Helper-Method":"stream"}})),s}currentEvent(){return be(this,kA,"f")}currentRun(){return be(this,MA,"f")}currentMessageSnapshot(){return be(this,dc,"f")}currentRunStepSnapshot(){return be(this,PT,"f")}async finalRunSteps(){return await this.done(),Object.values(be(this,pu,"f"))}async finalMessages(){return await this.done(),Object.values(be(this,RA,"f"))}async finalRun(){if(await this.done(),!be(this,Oh,"f"))throw Error("Final run was not received.");return be(this,Oh,"f")}async _createThreadAssistantStream(t,r,a){let n=a?.signal;n&&(n.aborted&&this.controller.abort(),n.addEventListener("abort",()=>this.controller.abort()));let s={...r,stream:!0},i=await t.createAndRun(s,{...a,signal:this.controller.signal});this._connected();for await(let o of i)be(this,$s,"m",CT).call(this,o);if(i.controller.signal?.aborted)throw new Gn;return this._addRun(be(this,$s,"m",ET).call(this))}async _createAssistantStream(t,r,a,n){let s=n?.signal;s&&(s.aborted&&this.controller.abort(),s.addEventListener("abort",()=>this.controller.abort()));let i={...a,stream:!0},o=await t.create(r,i,{...n,signal:this.controller.signal});this._connected();for await(let l of o)be(this,$s,"m",CT).call(this,l);if(o.controller.signal?.aborted)throw new Gn;return this._addRun(be(this,$s,"m",ET).call(this))}static accumulateDelta(t,r){for(let[a,n]of Object.entries(r)){if(!t.hasOwnProperty(a)){t[a]=n;continue}let s=t[a];if(s==null){t[a]=n;continue}if(a==="index"||a==="type"){t[a]=n;continue}if(typeof s=="string"&&typeof n=="string")s+=n;else if(typeof s=="number"&&typeof n=="number")s+=n;else if(uT(s)&&uT(n))s=this.accumulateDelta(s,n);else if(Array.isArray(s)&&Array.isArray(n)){if(s.every(i=>typeof i=="string"||typeof i=="number")){s.push(...n);continue}for(let i of n){if(!uT(i))throw new Error(`Expected array delta entry to be an object but got: ${i}`);let o=i.index;if(o==null)throw new Error("Expected array delta entry to have an `index` property");if(typeof o!="number")throw new Error(`Expected array delta entry \`index\` property to be a number but got ${o}`);let l=s[o];l==null?s.push(i):s[o]=this.accumulateDelta(l,i)}continue}else throw Error(`Unhandled record type: ${a}, deltaValue: ${n}, accValue: ${s}`);t[a]=s}return t}_addRun(t){return t}async _threadAssistantStream(t,r,a){return await this._createThreadAssistantStream(r,t,a)}async _runAssistantStream(t,r,a,n){return await this._createAssistantStream(r,t,a,n)}async _runToolAssistantStream(t,r,a,n){return await this._createToolAssistantStream(r,t,a,n)}};_h=kd,CT=function(t){if(!this.ended)switch(kt(this,kA,t,"f"),be(this,$s,"m",Tae).call(this,t),t.event){case"thread.created":break;case"thread.run.created":case"thread.run.queued":case"thread.run.in_progress":case"thread.run.requires_action":case"thread.run.completed":case"thread.run.incomplete":case"thread.run.failed":case"thread.run.cancelling":case"thread.run.cancelled":case"thread.run.expired":be(this,$s,"m",Pae).call(this,t);break;case"thread.run.step.created":case"thread.run.step.in_progress":case"thread.run.step.delta":case"thread.run.step.completed":case"thread.run.step.failed":case"thread.run.step.cancelled":case"thread.run.step.expired":be(this,$s,"m",Sae).call(this,t);break;case"thread.message.created":case"thread.message.in_progress":case"thread.message.delta":case"thread.message.completed":case"thread.message.incomplete":be(this,$s,"m",vae).call(this,t);break;case"error":throw new Error("Encountered an error event in event processing - errors should be processed earlier");default:}},ET=function(){if(this.ended)throw new ct("stream has ended, this shouldn't happen");if(!be(this,Oh,"f"))throw Error("Final run has not been received");return be(this,Oh,"f")},vae=function(t){let[r,a]=be(this,$s,"m",Cae).call(this,t,be(this,dc,"f"));kt(this,dc,r,"f"),be(this,RA,"f")[r.id]=r;for(let n of a){let s=r.content[n.index];s?.type=="text"&&this._emit("textCreated",s.text)}switch(t.event){case"thread.message.created":this._emit("messageCreated",t.data);break;case"thread.message.in_progress":break;case"thread.message.delta":if(this._emit("messageDelta",t.data.delta,r),t.data.delta.content)for(let n of t.data.delta.content){if(n.type=="text"&&n.text){let s=n.text,i=r.content[n.index];if(i&&i.type=="text")this._emit("textDelta",s,i.text);else throw Error("The snapshot associated with this text delta is not text or missing")}if(n.index!=be(this,ib,"f")){if(be(this,Dh,"f"))switch(be(this,Dh,"f").type){case"text":this._emit("textDone",be(this,Dh,"f").text,be(this,dc,"f"));break;case"image_file":this._emit("imageFileDone",be(this,Dh,"f").image_file,be(this,dc,"f"));break}kt(this,ib,n.index,"f")}kt(this,Dh,r.content[n.index],"f")}break;case"thread.message.completed":case"thread.message.incomplete":if(be(this,ib,"f")!==void 0){let n=t.data.content[be(this,ib,"f")];if(n)switch(n.type){case"image_file":this._emit("imageFileDone",n.image_file,be(this,dc,"f"));break;case"text":this._emit("textDone",n.text,be(this,dc,"f"));break}}be(this,dc,"f")&&this._emit("messageDone",t.data),kt(this,dc,void 0,"f")}},Sae=function(t){let r=be(this,$s,"m",wae).call(this,t);switch(kt(this,PT,r,"f"),t.event){case"thread.run.step.created":this._emit("runStepCreated",t.data);break;case"thread.run.step.delta":let a=t.data.delta;if(a.step_details&&a.step_details.type=="tool_calls"&&a.step_details.tool_calls&&r.step_details.type=="tool_calls")for(let s of a.step_details.tool_calls)s.index==be(this,DA,"f")?this._emit("toolCallDelta",s,r.step_details.tool_calls[s.index]):(be(this,qo,"f")&&this._emit("toolCallDone",be(this,qo,"f")),kt(this,DA,s.index,"f"),kt(this,qo,r.step_details.tool_calls[s.index],"f"),be(this,qo,"f")&&this._emit("toolCallCreated",be(this,qo,"f")));this._emit("runStepDelta",t.data.delta,r);break;case"thread.run.step.completed":case"thread.run.step.failed":case"thread.run.step.cancelled":case"thread.run.step.expired":kt(this,PT,void 0,"f"),t.data.step_details.type=="tool_calls"&&be(this,qo,"f")&&(this._emit("toolCallDone",be(this,qo,"f")),kt(this,qo,void 0,"f")),this._emit("runStepDone",t.data,r);break;case"thread.run.step.in_progress":break}},Tae=function(t){be(this,pF,"f").push(t),this._emit("event",t)},wae=function(t){switch(t.event){case"thread.run.step.created":return be(this,pu,"f")[t.data.id]=t.data,t.data;case"thread.run.step.delta":let r=be(this,pu,"f")[t.data.id];if(!r)throw Error("Received a RunStepDelta before creation of a snapshot");let a=t.data;if(a.delta){let n=_h.accumulateDelta(r,a.delta);be(this,pu,"f")[t.data.id]=n}return be(this,pu,"f")[t.data.id];case"thread.run.step.completed":case"thread.run.step.failed":case"thread.run.step.cancelled":case"thread.run.step.expired":case"thread.run.step.in_progress":be(this,pu,"f")[t.data.id]=t.data;break}if(be(this,pu,"f")[t.data.id])return be(this,pu,"f")[t.data.id];throw new Error("No snapshot available")},Cae=function(t,r){let a=[];switch(t.event){case"thread.message.created":return[t.data,a];case"thread.message.delta":if(!r)throw Error("Received a delta with no existing snapshot (there should be one from message creation)");let n=t.data;if(n.delta.content)for(let s of n.delta.content)if(s.index in r.content){let i=r.content[s.index];r.content[s.index]=be(this,$s,"m",Eae).call(this,s,i)}else r.content[s.index]=s,a.push(s);return[r,a];case"thread.message.in_progress":case"thread.message.completed":case"thread.message.incomplete":if(r)return[r,a];throw Error("Received thread message event with no existing snapshot")}throw Error("Tried to accumulate a non-message event")},Eae=function(t,r){return _h.accumulateDelta(r,t)},Pae=function(t){switch(kt(this,MA,t.data,"f"),t.event){case"thread.run.created":break;case"thread.run.queued":break;case"thread.run.in_progress":break;case"thread.run.requires_action":case"thread.run.cancelled":case"thread.run.failed":case"thread.run.completed":case"thread.run.expired":case"thread.run.incomplete":kt(this,Oh,t.data,"f"),be(this,qo,"f")&&(this._emit("toolCallDone",be(this,qo,"f")),kt(this,qo,void 0,"f"));break;case"thread.run.cancelling":break}};var Fh=class extends _e{constructor(){super(...arguments),this.steps=new sb(this._client)}create(t,r,a){let{include:n,...s}=r;return this._client.post(Re`/threads/${t}/runs`,{query:{include:n},body:s,...a,headers:Ke([{"OpenAI-Beta":"assistants=v2"},a?.headers]),stream:r.stream??!1})}retrieve(t,r,a){let{thread_id:n}=r;return this._client.get(Re`/threads/${n}/runs/${t}`,{...a,headers:Ke([{"OpenAI-Beta":"assistants=v2"},a?.headers])})}update(t,r,a){let{thread_id:n,...s}=r;return this._client.post(Re`/threads/${n}/runs/${t}`,{body:s,...a,headers:Ke([{"OpenAI-Beta":"assistants=v2"},a?.headers])})}list(t,r={},a){return this._client.getAPIList(Re`/threads/${t}/runs`,gr,{query:r,...a,headers:Ke([{"OpenAI-Beta":"assistants=v2"},a?.headers])})}cancel(t,r,a){let{thread_id:n}=r;return this._client.post(Re`/threads/${n}/runs/${t}/cancel`,{...a,headers:Ke([{"OpenAI-Beta":"assistants=v2"},a?.headers])})}async createAndPoll(t,r,a){let n=await this.create(t,r,a);return await this.poll(n.id,{thread_id:t},a)}createAndStream(t,r,a){return kd.createAssistantStream(t,this._client.beta.threads.runs,r,a)}async poll(t,r,a){let n=Ke([a?.headers,{"X-Stainless-Poll-Helper":"true","X-Stainless-Custom-Poll-Interval":a?.pollIntervalMs?.toString()??void 0}]);for(;;){let{data:s,response:i}=await this.retrieve(t,r,{...a,headers:{...a?.headers,...n}}).withResponse();switch(s.status){case"queued":case"in_progress":case"cancelling":let o=5e3;if(a?.pollIntervalMs)o=a.pollIntervalMs;else{let l=i.headers.get("openai-poll-after-ms");if(l){let c=parseInt(l);isNaN(c)||(o=c)}}await lu(o);break;case"requires_action":case"incomplete":case"cancelled":case"completed":case"failed":case"expired":return s}}}stream(t,r,a){return kd.createAssistantStream(t,this._client.beta.threads.runs,r,a)}submitToolOutputs(t,r,a){let{thread_id:n,...s}=r;return this._client.post(Re`/threads/${n}/runs/${t}/submit_tool_outputs`,{body:s,...a,headers:Ke([{"OpenAI-Beta":"assistants=v2"},a?.headers]),stream:r.stream??!1})}async submitToolOutputsAndPoll(t,r,a){let n=await this.submitToolOutputs(t,r,a);return await this.poll(n.id,r,a)}submitToolOutputsStream(t,r,a){return kd.createToolAssistantStream(t,this._client.beta.threads.runs,r,a)}};Fh.Steps=sb;var Rp=class extends _e{constructor(){super(...arguments),this.runs=new Fh(this._client),this.messages=new nb(this._client)}create(t={},r){return this._client.post("/threads",{body:t,...r,headers:Ke([{"OpenAI-Beta":"assistants=v2"},r?.headers])})}retrieve(t,r){return this._client.get(Re`/threads/${t}`,{...r,headers:Ke([{"OpenAI-Beta":"assistants=v2"},r?.headers])})}update(t,r,a){return this._client.post(Re`/threads/${t}`,{body:r,...a,headers:Ke([{"OpenAI-Beta":"assistants=v2"},a?.headers])})}delete(t,r){return this._client.delete(Re`/threads/${t}`,{...r,headers:Ke([{"OpenAI-Beta":"assistants=v2"},r?.headers])})}createAndRun(t,r){return this._client.post("/threads/runs",{body:t,...r,headers:Ke([{"OpenAI-Beta":"assistants=v2"},r?.headers]),stream:t.stream??!1})}async createAndRunPoll(t,r){let a=await this.createAndRun(t,r);return await this.runs.poll(a.id,{thread_id:a.thread_id},r)}createAndRunStream(t,r){return kd.createThreadAssistantStream(t,this._client.beta.threads,r)}};Rp.Runs=Fh;Rp.Messages=nb;var fc=class extends _e{constructor(){super(...arguments),this.realtime=new Ip(this._client),this.chatkit=new Np(this._client),this.assistants=new Zx(this._client),this.threads=new Rp(this._client)}};fc.Realtime=Ip;fc.ChatKit=Np;fc.Assistants=Zx;fc.Threads=Rp;var Bh=class extends _e{create(t,r){return this._client.post("/completions",{body:t,...r,stream:t.stream??!1})}};var ob=class extends _e{retrieve(t,r,a){let{container_id:n}=r;return this._client.get(Re`/containers/${n}/files/${t}/content`,{...a,headers:Ke([{Accept:"application/binary"},a?.headers]),__binaryResponse:!0})}};var Uh=class extends _e{constructor(){super(...arguments),this.content=new ob(this._client)}create(t,r,a){return this._client.post(Re`/containers/${t}/files`,Vo({body:r,...a},this._client))}retrieve(t,r,a){let{container_id:n}=r;return this._client.get(Re`/containers/${n}/files/${t}`,a)}list(t,r={},a){return this._client.getAPIList(Re`/containers/${t}/files`,gr,{query:r,...a})}delete(t,r,a){let{container_id:n}=r;return this._client.delete(Re`/containers/${n}/files/${t}`,{...a,headers:Ke([{Accept:"*/*"},a?.headers])})}};Uh.Content=ob;var kp=class extends _e{constructor(){super(...arguments),this.files=new Uh(this._client)}create(t,r){return this._client.post("/containers",{body:t,...r})}retrieve(t,r){return this._client.get(Re`/containers/${t}`,r)}list(t={},r){return this._client.getAPIList("/containers",gr,{query:t,...r})}delete(t,r){return this._client.delete(Re`/containers/${t}`,{...r,headers:Ke([{Accept:"*/*"},r?.headers])})}};kp.Files=Uh;var lb=class extends _e{create(t,r,a){let{include:n,...s}=r;return this._client.post(Re`/conversations/${t}/items`,{query:{include:n},body:s,...a})}retrieve(t,r,a){let{conversation_id:n,...s}=r;return this._client.get(Re`/conversations/${n}/items/${t}`,{query:s,...a})}list(t,r={},a){return this._client.getAPIList(Re`/conversations/${t}/items`,Id,{query:r,...a})}delete(t,r,a){let{conversation_id:n}=r;return this._client.delete(Re`/conversations/${n}/items/${t}`,a)}};var Mp=class extends _e{constructor(){super(...arguments),this.items=new lb(this._client)}create(t={},r){return this._client.post("/conversations",{body:t,...r})}retrieve(t,r){return this._client.get(Re`/conversations/${t}`,r)}update(t,r,a){return this._client.post(Re`/conversations/${t}`,{body:r,...a})}delete(t,r){return this._client.delete(Re`/conversations/${t}`,r)}};Mp.Items=lb;var jh=class extends _e{create(t,r){let a=!!t.encoding_format,n=a?t.encoding_format:"base64";a&&Pn(this._client).debug("embeddings/user defined encoding_format:",t.encoding_format);let s=this._client.post("/embeddings",{body:{...t,encoding_format:n},...r});return a?s:(Pn(this._client).debug("embeddings/decoding base64 embeddings from base64"),s._thenUnwrap(i=>(i&&i.data&&i.data.forEach(o=>{let l=o.embedding;o.embedding=bae(l)}),i)))}};var cb=class extends _e{retrieve(t,r,a){let{eval_id:n,run_id:s}=r;return this._client.get(Re`/evals/${n}/runs/${s}/output_items/${t}`,a)}list(t,r,a){let{eval_id:n,...s}=r;return this._client.getAPIList(Re`/evals/${n}/runs/${t}/output_items`,gr,{query:s,...a})}};var zh=class extends _e{constructor(){super(...arguments),this.outputItems=new cb(this._client)}create(t,r,a){return this._client.post(Re`/evals/${t}/runs`,{body:r,...a})}retrieve(t,r,a){let{eval_id:n}=r;return this._client.get(Re`/evals/${n}/runs/${t}`,a)}list(t,r={},a){return this._client.getAPIList(Re`/evals/${t}/runs`,gr,{query:r,...a})}delete(t,r,a){let{eval_id:n}=r;return this._client.delete(Re`/evals/${n}/runs/${t}`,a)}cancel(t,r,a){let{eval_id:n}=r;return this._client.post(Re`/evals/${n}/runs/${t}`,a)}};zh.OutputItems=cb;var Dp=class extends _e{constructor(){super(...arguments),this.runs=new zh(this._client)}create(t,r){return this._client.post("/evals",{body:t,...r})}retrieve(t,r){return this._client.get(Re`/evals/${t}`,r)}update(t,r,a){return this._client.post(Re`/evals/${t}`,{body:r,...a})}list(t={},r){return this._client.getAPIList("/evals",gr,{query:t,...r})}delete(t,r){return this._client.delete(Re`/evals/${t}`,r)}};Dp.Runs=zh;var Vh=class extends _e{create(t,r){return this._client.post("/files",Vo({body:t,...r},this._client))}retrieve(t,r){return this._client.get(Re`/files/${t}`,r)}list(t={},r){return this._client.getAPIList("/files",gr,{query:t,...r})}delete(t,r){return this._client.delete(Re`/files/${t}`,r)}content(t,r){return this._client.get(Re`/files/${t}/content`,{...r,headers:Ke([{Accept:"application/binary"},r?.headers]),__binaryResponse:!0})}async waitForProcessing(t,{pollInterval:r=5e3,maxWait:a=30*60*1e3}={}){let n=new Set(["processed","error","deleted"]),s=Date.now(),i=await this.retrieve(t);for(;!i.status||!n.has(i.status);)if(await lu(r),i=await this.retrieve(t),Date.now()-s>a)throw new Tp({message:`Giving up on waiting for file ${t} to finish processing after ${a} milliseconds.`});return i}};var ub=class extends _e{};var db=class extends _e{run(t,r){return this._client.post("/fine_tuning/alpha/graders/run",{body:t,...r})}validate(t,r){return this._client.post("/fine_tuning/alpha/graders/validate",{body:t,...r})}};var qh=class extends _e{constructor(){super(...arguments),this.graders=new db(this._client)}};qh.Graders=db;var fb=class extends _e{create(t,r,a){return this._client.getAPIList(Re`/fine_tuning/checkpoints/${t}/permissions`,uu,{body:r,method:"post",...a})}retrieve(t,r={},a){return this._client.get(Re`/fine_tuning/checkpoints/${t}/permissions`,{query:r,...a})}delete(t,r,a){let{fine_tuned_model_checkpoint:n}=r;return this._client.delete(Re`/fine_tuning/checkpoints/${n}/permissions/${t}`,a)}};var Hh=class extends _e{constructor(){super(...arguments),this.permissions=new fb(this._client)}};Hh.Permissions=fb;var pb=class extends _e{list(t,r={},a){return this._client.getAPIList(Re`/fine_tuning/jobs/${t}/checkpoints`,gr,{query:r,...a})}};var $h=class extends _e{constructor(){super(...arguments),this.checkpoints=new pb(this._client)}create(t,r){return this._client.post("/fine_tuning/jobs",{body:t,...r})}retrieve(t,r){return this._client.get(Re`/fine_tuning/jobs/${t}`,r)}list(t={},r){return this._client.getAPIList("/fine_tuning/jobs",gr,{query:t,...r})}cancel(t,r){return this._client.post(Re`/fine_tuning/jobs/${t}/cancel`,r)}listEvents(t,r={},a){return this._client.getAPIList(Re`/fine_tuning/jobs/${t}/events`,gr,{query:r,...a})}pause(t,r){return this._client.post(Re`/fine_tuning/jobs/${t}/pause`,r)}resume(t,r){return this._client.post(Re`/fine_tuning/jobs/${t}/resume`,r)}};$h.Checkpoints=pb;var pc=class extends _e{constructor(){super(...arguments),this.methods=new ub(this._client),this.jobs=new $h(this._client),this.checkpoints=new Hh(this._client),this.alpha=new qh(this._client)}};pc.Methods=ub;pc.Jobs=$h;pc.Checkpoints=Hh;pc.Alpha=qh;var mb=class extends _e{};var _p=class extends _e{constructor(){super(...arguments),this.graderModels=new mb(this._client)}};_p.GraderModels=mb;var Gh=class extends _e{createVariation(t,r){return this._client.post("/images/variations",Vo({body:t,...r},this._client))}edit(t,r){return this._client.post("/images/edits",Vo({body:t,...r,stream:t.stream??!1},this._client))}generate(t,r){return this._client.post("/images/generations",{body:t,...r,stream:t.stream??!1})}};var Kh=class extends _e{retrieve(t,r){return this._client.get(Re`/models/${t}`,r)}list(t){return this._client.getAPIList("/models",uu,t)}delete(t,r){return this._client.delete(Re`/models/${t}`,r)}};var Wh=class extends _e{create(t,r){return this._client.post("/moderations",{body:t,...r})}};var hb=class extends _e{accept(t,r,a){return this._client.post(Re`/realtime/calls/${t}/accept`,{body:r,...a,headers:Ke([{Accept:"*/*"},a?.headers])})}hangup(t,r){return this._client.post(Re`/realtime/calls/${t}/hangup`,{...r,headers:Ke([{Accept:"*/*"},r?.headers])})}refer(t,r,a){return this._client.post(Re`/realtime/calls/${t}/refer`,{body:r,...a,headers:Ke([{Accept:"*/*"},a?.headers])})}reject(t,r={},a){return this._client.post(Re`/realtime/calls/${t}/reject`,{body:r,...a,headers:Ke([{Accept:"*/*"},a?.headers])})}};var gb=class extends _e{create(t,r){return this._client.post("/realtime/client_secrets",{body:t,...r})}};var Md=class extends _e{constructor(){super(...arguments),this.clientSecrets=new gb(this._client),this.calls=new hb(this._client)}};Md.ClientSecrets=gb;Md.Calls=hb;function Aae(e,t){return!t||!sXe(t)?{...e,output_parsed:null,output:e.output.map(r=>r.type==="function_call"?{...r,parsed_arguments:null}:r.type==="message"?{...r,content:r.content.map(a=>({...a,parsed:null}))}:r)}:mF(e,t)}function mF(e,t){let r=e.output.map(n=>{if(n.type==="function_call")return{...n,parsed_arguments:lXe(t,n)};if(n.type==="message"){let s=n.content.map(i=>i.type==="output_text"?{...i,parsed:nXe(t,i.text)}:i);return{...n,content:s}}return n}),a=Object.assign({},e,{output:r});return Object.getOwnPropertyDescriptor(e,"output_text")||_A(a),Object.defineProperty(a,"output_parsed",{enumerable:!0,get(){for(let n of a.output)if(n.type==="message"){for(let s of n.content)if(s.type==="output_text"&&s.parsed!==null)return s.parsed}return null}}),a}function nXe(e,t){return e.text?.format?.type!=="json_schema"?null:"$parseRaw"in e.text?.format?(e.text?.format).$parseRaw(t):JSON.parse(t)}function sXe(e){return!!xT(e.text?.format)}function iXe(e){return e?.$brand==="auto-parseable-tool"}function oXe(e,t){return e.find(r=>r.type==="function"&&r.name===t)}function lXe(e,t){let r=oXe(e.tools??[],t.name);return{...t,...t,parsed_arguments:iXe(r)?r.$parseRaw(t.arguments):r?.strict?JSON.parse(t.arguments):null}}function _A(e){let t=[];for(let r of e.output)if(r.type==="message")for(let a of r.content)a.type==="output_text"&&t.push(a.text);e.output_text=t.join("")}var yb,OA,Op,FA,Iae,Nae,Lae,Rae,xb=class extends Cp{constructor(t){super(),yb.add(this),OA.set(this,void 0),Op.set(this,void 0),FA.set(this,void 0),kt(this,OA,t,"f")}static createResponse(t,r,a){let n=new xb(r);return n._run(()=>n._createOrRetrieveResponse(t,r,{...a,headers:{...a?.headers,"X-Stainless-Helper-Method":"stream"}})),n}async _createOrRetrieveResponse(t,r,a){let n=a?.signal;n&&(n.aborted&&this.controller.abort(),n.addEventListener("abort",()=>this.controller.abort())),be(this,yb,"m",Iae).call(this);let s,i=null;"response_id"in r?(s=await t.responses.retrieve(r.response_id,{stream:!0},{...a,signal:this.controller.signal,stream:!0}),i=r.starting_after??null):s=await t.responses.create({...r,stream:!0},{...a,signal:this.controller.signal}),this._connected();for await(let o of s)be(this,yb,"m",Nae).call(this,o,i);if(s.controller.signal?.aborted)throw new Gn;return be(this,yb,"m",Lae).call(this)}[(OA=new WeakMap,Op=new WeakMap,FA=new WeakMap,yb=new WeakSet,Iae=function(){this.ended||kt(this,Op,void 0,"f")},Nae=function(r,a){if(this.ended)return;let n=(i,o)=>{(a==null||o.sequence_number>a)&&this._emit(i,o)},s=be(this,yb,"m",Rae).call(this,r);switch(n("event",r),r.type){case"response.output_text.delta":{let i=s.output[r.output_index];if(!i)throw new ct(`missing output at index ${r.output_index}`);if(i.type==="message"){let o=i.content[r.content_index];if(!o)throw new ct(`missing content at index ${r.content_index}`);if(o.type!=="output_text")throw new ct(`expected content to be 'output_text', got ${o.type}`);n("response.output_text.delta",{...r,snapshot:o.text})}break}case"response.function_call_arguments.delta":{let i=s.output[r.output_index];if(!i)throw new ct(`missing output at index ${r.output_index}`);i.type==="function_call"&&n("response.function_call_arguments.delta",{...r,snapshot:i.arguments});break}default:n(r.type,r);break}},Lae=function(){if(this.ended)throw new ct("stream has ended, this shouldn't happen");let r=be(this,Op,"f");if(!r)throw new ct("request ended without sending any events");kt(this,Op,void 0,"f");let a=cXe(r,be(this,OA,"f"));return kt(this,FA,a,"f"),a},Rae=function(r){let a=be(this,Op,"f");if(!a){if(r.type!=="response.created")throw new ct(`When snapshot hasn't been set yet, expected 'response.created' event, got ${r.type}`);return a=kt(this,Op,r.response,"f"),a}switch(r.type){case"response.output_item.added":{a.output.push(r.item);break}case"response.content_part.added":{let n=a.output[r.output_index];if(!n)throw new ct(`missing output at index ${r.output_index}`);let s=n.type,i=r.part;s==="message"&&i.type!=="reasoning_text"?n.content.push(i):s==="reasoning"&&i.type==="reasoning_text"&&(n.content||(n.content=[]),n.content.push(i));break}case"response.output_text.delta":{let n=a.output[r.output_index];if(!n)throw new ct(`missing output at index ${r.output_index}`);if(n.type==="message"){let s=n.content[r.content_index];if(!s)throw new ct(`missing content at index ${r.content_index}`);if(s.type!=="output_text")throw new ct(`expected content to be 'output_text', got ${s.type}`);s.text+=r.delta}break}case"response.function_call_arguments.delta":{let n=a.output[r.output_index];if(!n)throw new ct(`missing output at index ${r.output_index}`);n.type==="function_call"&&(n.arguments+=r.delta);break}case"response.reasoning_text.delta":{let n=a.output[r.output_index];if(!n)throw new ct(`missing output at index ${r.output_index}`);if(n.type==="reasoning"){let s=n.content?.[r.content_index];if(!s)throw new ct(`missing content at index ${r.content_index}`);if(s.type!=="reasoning_text")throw new ct(`expected content to be 'reasoning_text', got ${s.type}`);s.text+=r.delta}break}case"response.completed":{kt(this,Op,r.response,"f");break}}return a},Symbol.asyncIterator)](){let t=[],r=[],a=!1;return this.on("event",n=>{let s=r.shift();s?s.resolve(n):t.push(n)}),this.on("end",()=>{a=!0;for(let n of r)n.resolve(void 0);r.length=0}),this.on("abort",n=>{a=!0;for(let s of r)s.reject(n);r.length=0}),this.on("error",n=>{a=!0;for(let s of r)s.reject(n);r.length=0}),{next:async()=>t.length?{value:t.shift(),done:!1}:a?{value:void 0,done:!0}:new Promise((s,i)=>r.push({resolve:s,reject:i})).then(s=>s?{value:s,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}async finalResponse(){await this.done();let t=be(this,FA,"f");if(!t)throw new ct("stream ended without producing a ChatCompletion");return t}};function cXe(e,t){return Aae(e,t)}var bb=class extends _e{list(t,r={},a){return this._client.getAPIList(Re`/responses/${t}/input_items`,gr,{query:r,...a})}};var vb=class extends _e{count(t={},r){return this._client.post("/responses/input_tokens",{body:t,...r})}};var Dd=class extends _e{constructor(){super(...arguments),this.inputItems=new bb(this._client),this.inputTokens=new vb(this._client)}create(t,r){return this._client.post("/responses",{body:t,...r,stream:t.stream??!1})._thenUnwrap(a=>("object"in a&&a.object==="response"&&_A(a),a))}retrieve(t,r={},a){return this._client.get(Re`/responses/${t}`,{query:r,...a,stream:r?.stream??!1})._thenUnwrap(n=>("object"in n&&n.object==="response"&&_A(n),n))}delete(t,r){return this._client.delete(Re`/responses/${t}`,{...r,headers:Ke([{Accept:"*/*"},r?.headers])})}parse(t,r){return this._client.responses.create(t,r)._thenUnwrap(a=>mF(a,t))}stream(t,r){return xb.createResponse(this._client,t,r)}cancel(t,r){return this._client.post(Re`/responses/${t}/cancel`,r)}};Dd.InputItems=bb;Dd.InputTokens=vb;var Sb=class extends _e{create(t,r,a){return this._client.post(Re`/uploads/${t}/parts`,Vo({body:r,...a},this._client))}};var Fp=class extends _e{constructor(){super(...arguments),this.parts=new Sb(this._client)}create(t,r){return this._client.post("/uploads",{body:t,...r})}cancel(t,r){return this._client.post(Re`/uploads/${t}/cancel`,r)}complete(t,r,a){return this._client.post(Re`/uploads/${t}/complete`,{body:r,...a})}};Fp.Parts=Sb;var kae=async e=>{let t=await Promise.allSettled(e),r=t.filter(n=>n.status==="rejected");if(r.length){for(let n of r);throw new Error(`${r.length} promise(s) failed - see the above errors`)}let a=[];for(let n of t)n.status==="fulfilled"&&a.push(n.value);return a};var Tb=class extends _e{create(t,r,a){return this._client.post(Re`/vector_stores/${t}/file_batches`,{body:r,...a,headers:Ke([{"OpenAI-Beta":"assistants=v2"},a?.headers])})}retrieve(t,r,a){let{vector_store_id:n}=r;return this._client.get(Re`/vector_stores/${n}/file_batches/${t}`,{...a,headers:Ke([{"OpenAI-Beta":"assistants=v2"},a?.headers])})}cancel(t,r,a){let{vector_store_id:n}=r;return this._client.post(Re`/vector_stores/${n}/file_batches/${t}/cancel`,{...a,headers:Ke([{"OpenAI-Beta":"assistants=v2"},a?.headers])})}async createAndPoll(t,r,a){let n=await this.create(t,r);return await this.poll(t,n.id,a)}listFiles(t,r,a){let{vector_store_id:n,...s}=r;return this._client.getAPIList(Re`/vector_stores/${n}/file_batches/${t}/files`,gr,{query:s,...a,headers:Ke([{"OpenAI-Beta":"assistants=v2"},a?.headers])})}async poll(t,r,a){let n=Ke([a?.headers,{"X-Stainless-Poll-Helper":"true","X-Stainless-Custom-Poll-Interval":a?.pollIntervalMs?.toString()??void 0}]);for(;;){let{data:s,response:i}=await this.retrieve(r,{vector_store_id:t},{...a,headers:n}).withResponse();switch(s.status){case"in_progress":let o=5e3;if(a?.pollIntervalMs)o=a.pollIntervalMs;else{let l=i.headers.get("openai-poll-after-ms");if(l){let c=parseInt(l);isNaN(c)||(o=c)}}await lu(o);break;case"failed":case"cancelled":case"completed":return s}}}async uploadAndPoll(t,{files:r,fileIds:a=[]},n){if(r==null||r.length==0)throw new Error("No `files` provided to process. If you've already uploaded files you should use `.createAndPoll()` instead");let s=n?.maxConcurrency??5,i=Math.min(s,r.length),o=this._client,l=r.values(),c=[...a];async function u(f){for(let p of f){let m=await o.files.create({file:p,purpose:"assistants"},n);c.push(m.id)}}let d=Array(i).fill(l).map(u);return await kae(d),await this.createAndPoll(t,{file_ids:c})}};var wb=class extends _e{create(t,r,a){return this._client.post(Re`/vector_stores/${t}/files`,{body:r,...a,headers:Ke([{"OpenAI-Beta":"assistants=v2"},a?.headers])})}retrieve(t,r,a){let{vector_store_id:n}=r;return this._client.get(Re`/vector_stores/${n}/files/${t}`,{...a,headers:Ke([{"OpenAI-Beta":"assistants=v2"},a?.headers])})}update(t,r,a){let{vector_store_id:n,...s}=r;return this._client.post(Re`/vector_stores/${n}/files/${t}`,{body:s,...a,headers:Ke([{"OpenAI-Beta":"assistants=v2"},a?.headers])})}list(t,r={},a){return this._client.getAPIList(Re`/vector_stores/${t}/files`,gr,{query:r,...a,headers:Ke([{"OpenAI-Beta":"assistants=v2"},a?.headers])})}delete(t,r,a){let{vector_store_id:n}=r;return this._client.delete(Re`/vector_stores/${n}/files/${t}`,{...a,headers:Ke([{"OpenAI-Beta":"assistants=v2"},a?.headers])})}async createAndPoll(t,r,a){let n=await this.create(t,r,a);return await this.poll(t,n.id,a)}async poll(t,r,a){let n=Ke([a?.headers,{"X-Stainless-Poll-Helper":"true","X-Stainless-Custom-Poll-Interval":a?.pollIntervalMs?.toString()??void 0}]);for(;;){let s=await this.retrieve(r,{vector_store_id:t},{...a,headers:n}).withResponse(),i=s.data;switch(i.status){case"in_progress":let o=5e3;if(a?.pollIntervalMs)o=a.pollIntervalMs;else{let l=s.response.headers.get("openai-poll-after-ms");if(l){let c=parseInt(l);isNaN(c)||(o=c)}}await lu(o);break;case"failed":case"completed":return i}}}async upload(t,r,a){let n=await this._client.files.create({file:r,purpose:"assistants"},a);return this.create(t,{file_id:n.id},a)}async uploadAndPoll(t,r,a){let n=await this.upload(t,r,a);return await this.poll(t,n.id,a)}content(t,r,a){let{vector_store_id:n}=r;return this._client.getAPIList(Re`/vector_stores/${n}/files/${t}/content`,uu,{...a,headers:Ke([{"OpenAI-Beta":"assistants=v2"},a?.headers])})}};var _d=class extends _e{constructor(){super(...arguments),this.files=new wb(this._client),this.fileBatches=new Tb(this._client)}create(t,r){return this._client.post("/vector_stores",{body:t,...r,headers:Ke([{"OpenAI-Beta":"assistants=v2"},r?.headers])})}retrieve(t,r){return this._client.get(Re`/vector_stores/${t}`,{...r,headers:Ke([{"OpenAI-Beta":"assistants=v2"},r?.headers])})}update(t,r,a){return this._client.post(Re`/vector_stores/${t}`,{body:r,...a,headers:Ke([{"OpenAI-Beta":"assistants=v2"},a?.headers])})}list(t={},r){return this._client.getAPIList("/vector_stores",gr,{query:t,...r,headers:Ke([{"OpenAI-Beta":"assistants=v2"},r?.headers])})}delete(t,r){return this._client.delete(Re`/vector_stores/${t}`,{...r,headers:Ke([{"OpenAI-Beta":"assistants=v2"},r?.headers])})}search(t,r,a){return this._client.getAPIList(Re`/vector_stores/${t}/search`,uu,{body:r,method:"post",...a,headers:Ke([{"OpenAI-Beta":"assistants=v2"},a?.headers])})}};_d.Files=wb;_d.FileBatches=Tb;var Xh=class extends _e{create(t,r){return this._client.post("/videos",Y3({body:t,...r},this._client))}retrieve(t,r){return this._client.get(Re`/videos/${t}`,r)}list(t={},r){return this._client.getAPIList("/videos",Id,{query:t,...r})}delete(t,r){return this._client.delete(Re`/videos/${t}`,r)}downloadContent(t,r={},a){return this._client.get(Re`/videos/${t}/content`,{query:r,...a,headers:Ke([{Accept:"application/binary"},a?.headers]),__binaryResponse:!0})}remix(t,r,a){return this._client.post(Re`/videos/${t}/remix`,Y3({body:r,...a},this._client))}};var Cb,Mae,BA,Yh=class extends _e{constructor(){super(...arguments),Cb.add(this)}async unwrap(t,r,a=this._client.webhookSecret,n=300){return await this.verifySignature(t,r,a,n),JSON.parse(t)}async verifySignature(t,r,a=this._client.webhookSecret,n=300){if(typeof crypto>"u"||typeof crypto.subtle.importKey!="function"||typeof crypto.subtle.verify!="function")throw new Error("Webhook signature verification is only supported when the `crypto` global is defined");be(this,Cb,"m",Mae).call(this,a);let s=Ke([r]).values,i=be(this,Cb,"m",BA).call(this,s,"webhook-signature"),o=be(this,Cb,"m",BA).call(this,s,"webhook-timestamp"),l=be(this,Cb,"m",BA).call(this,s,"webhook-id"),c=parseInt(o,10);if(isNaN(c))throw new ou("Invalid webhook timestamp format");let u=Math.floor(Date.now()/1e3);if(u-c>n)throw new ou("Webhook timestamp is too old");if(c>u+n)throw new ou("Webhook timestamp is too new");let d=i.split(" ").map(h=>h.startsWith("v1,")?h.substring(3):h),f=a.startsWith("whsec_")?Buffer.from(a.replace("whsec_",""),"base64"):Buffer.from(a,"utf-8"),p=l?`${l}.${o}.${t}`:`${o}.${t}`,m=await crypto.subtle.importKey("raw",f,{name:"HMAC",hash:"SHA-256"},!1,["verify"]);for(let h of d)try{let x=Buffer.from(h,"base64");if(await crypto.subtle.verify("HMAC",m,x,new TextEncoder().encode(p)))return}catch{continue}throw new ou("The given webhook signature does not match the expected signature")}};Cb=new WeakSet,Mae=function(t){if(typeof t!="string"||t.length===0)throw new Error("The webhook secret must either be set using the env var, OPENAI_WEBHOOK_SECRET, on the client class, OpenAI({ webhookSecret: '123' }), or passed to this function")},BA=function(t,r){if(!t)throw new Error("Headers are required");let a=t.get(r);if(a==null)throw new Error(`Missing required header: ${r}`);return a};var hF,gF,UA,Dae,rr=class{constructor({baseURL:t=Lp("OPENAI_BASE_URL"),apiKey:r=Lp("OPENAI_API_KEY"),organization:a=Lp("OPENAI_ORG_ID")??null,project:n=Lp("OPENAI_PROJECT_ID")??null,webhookSecret:s=Lp("OPENAI_WEBHOOK_SECRET")??null,...i}={}){if(hF.add(this),UA.set(this,void 0),this.completions=new Bh(this),this.chat=new Ap(this),this.embeddings=new jh(this),this.files=new Vh(this),this.images=new Gh(this),this.audio=new fu(this),this.moderations=new Wh(this),this.models=new Kh(this),this.fineTuning=new pc(this),this.graders=new _p(this),this.vectorStores=new _d(this),this.webhooks=new Yh(this),this.beta=new fc(this),this.batches=new Mh(this),this.uploads=new Fp(this),this.responses=new Dd(this),this.realtime=new Md(this),this.conversations=new Mp(this),this.evals=new Dp(this),this.containers=new kp(this),this.videos=new Xh(this),r===void 0)throw new ct("Missing credentials. Please pass an `apiKey`, or set the `OPENAI_API_KEY` environment variable.");let o={apiKey:r,organization:a,project:n,webhookSecret:s,...i,baseURL:t||"https://api.openai.com/v1"};if(!o.dangerouslyAllowBrowser&&zre())throw new ct(`It looks like you're running in a browser-like environment.
|
|
|
|
This is disabled by default, as it risks exposing your secret API credentials to attackers.
|
|
If you understand the risks and have appropriate mitigations in place,
|
|
you can set the \`dangerouslyAllowBrowser\` option to \`true\`, e.g.,
|
|
|
|
new OpenAI({ apiKey, dangerouslyAllowBrowser: true });
|
|
|
|
https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety
|
|
`);this.baseURL=o.baseURL,this.timeout=o.timeout??gF.DEFAULT_TIMEOUT,this.logger=o.logger??console;let l="warn";this.logLevel=l,this.logLevel=H3(o.logLevel,"ClientOptions.logLevel",this)??H3(Lp("OPENAI_LOG"),"process.env['OPENAI_LOG']",this)??l,this.fetchOptions=o.fetchOptions,this.maxRetries=o.maxRetries??2,this.fetch=o.fetch??qre(),kt(this,UA,$re,"f"),this._options=o,this.apiKey=typeof r=="string"?r:"Missing Key",this.organization=a,this.project=n,this.webhookSecret=s}withOptions(t){return new this.constructor({...this._options,baseURL:this.baseURL,maxRetries:this.maxRetries,timeout:this.timeout,logger:this.logger,logLevel:this.logLevel,fetch:this.fetch,fetchOptions:this.fetchOptions,apiKey:this.apiKey,organization:this.organization,project:this.project,webhookSecret:this.webhookSecret,...t})}defaultQuery(){return this._options.defaultQuery}validateHeaders({values:t,nulls:r}){}async authHeaders(t){return Ke([{Authorization:`Bearer ${this.apiKey}`}])}stringifyQuery(t){return V3(t,{arrayFormat:"brackets"})}getUserAgent(){return`${this.constructor.name}/JS ${wp}`}defaultIdempotencyKey(){return`stainless-node-retry-${k3()}`}makeStatusError(t,r,a,n){return gn.generate(t,r,a,n)}async _callApiKey(){let t=this._options.apiKey;if(typeof t!="function")return!1;let r;try{r=await t()}catch(a){throw a instanceof ct?a:new ct(`Failed to get token from 'apiKey' function: ${a.message}`,{cause:a})}if(typeof r!="string"||!r)throw new ct(`Expected 'apiKey' function argument to return a string but it returned ${r}`);return this.apiKey=r,!0}buildURL(t,r,a){let n=!be(this,hF,"m",Dae).call(this)&&a||this.baseURL,s=Mre(t)?new URL(t):new URL(n+(n.endsWith("/")&&t.startsWith("/")?t.slice(1):t)),i=this.defaultQuery();return Dre(i)||(r={...i,...r}),typeof r=="object"&&r&&!Array.isArray(r)&&(s.search=this.stringifyQuery(r)),s.toString()}async prepareOptions(t){await this._callApiKey()}async prepareRequest(t,{url:r,options:a}){}get(t,r){return this.methodRequest("get",t,r)}post(t,r){return this.methodRequest("post",t,r)}patch(t,r){return this.methodRequest("patch",t,r)}put(t,r){return this.methodRequest("put",t,r)}delete(t,r){return this.methodRequest("delete",t,r)}methodRequest(t,r,a){return this.request(Promise.resolve(a).then(n=>({method:t,path:r,...n})))}request(t,r=null){return new Ad(this,this.makeRequest(t,r,void 0))}async makeRequest(t,r,a){let n=await t,s=n.maxRetries??this.maxRetries;r==null&&(r=s),await this.prepareOptions(n);let{req:i,url:o,timeout:l}=await this.buildRequest(n,{retryCount:s-r});await this.prepareRequest(i,{url:o,options:n});let c="log_"+(Math.random()*(1<<24)|0).toString(16).padStart(6,"0"),u=a===void 0?"":`, retryOf: ${a}`,d=Date.now();if(Pn(this).debug(`[${c}] sending request`,Pd({retryOfRequestLogID:a,method:n.method,url:o,options:n,headers:i.headers})),n.signal?.aborted)throw new Gn;let f=new AbortController,p=await this.fetchWithTimeout(o,i,l,f).catch(cT),m=Date.now();if(p instanceof globalThis.Error){let g=`retrying, ${r} attempts remaining`;if(n.signal?.aborted)throw new Gn;let y=lT(p)||/timed? ?out/i.test(String(p)+("cause"in p?String(p.cause):""));if(r)return Pn(this).info(`[${c}] connection ${y?"timed out":"failed"} - ${g}`),Pn(this).debug(`[${c}] connection ${y?"timed out":"failed"} (${g})`,Pd({retryOfRequestLogID:a,url:o,durationMs:m-d,message:p.message})),this.retryRequest(n,r,a??c);throw Pn(this).info(`[${c}] connection ${y?"timed out":"failed"} - error; no more retries left`),Pn(this).debug(`[${c}] connection ${y?"timed out":"failed"} (error; no more retries left)`,Pd({retryOfRequestLogID:a,url:o,durationMs:m-d,message:p.message})),y?new Tp:new Sp({cause:p})}let h=[...p.headers.entries()].filter(([g])=>g==="x-request-id").map(([g,y])=>", "+g+": "+JSON.stringify(y)).join(""),x=`[${c}${u}${h}] ${i.method} ${o} ${p.ok?"succeeded":"failed"} with status ${p.status} in ${m-d}ms`;if(!p.ok){let g=await this.shouldRetry(p);if(r&&g){let C=`retrying, ${r} attempts remaining`;return await Hre(p.body),Pn(this).info(`${x} - ${C}`),Pn(this).debug(`[${c}] response error (${C})`,Pd({retryOfRequestLogID:a,url:p.url,status:p.status,headers:p.headers,durationMs:m-d})),this.retryRequest(n,r,a??c,p.headers)}let y=g?"error; no more retries left":"error; not retryable";Pn(this).info(`${x} - ${y}`);let b=await p.text().catch(C=>cT(C).message),S=Fre(b),w=S?void 0:b;throw Pn(this).debug(`[${c}] response error (${y})`,Pd({retryOfRequestLogID:a,url:p.url,status:p.status,headers:p.headers,message:w,durationMs:Date.now()-d})),this.makeStatusError(p.status,S,w,p.headers)}return Pn(this).info(x),Pn(this).debug(`[${c}] response start`,Pd({retryOfRequestLogID:a,url:p.url,status:p.status,headers:p.headers,durationMs:m-d})),{response:p,options:n,controller:f,requestLogID:c,retryOfRequestLogID:a,startTime:d}}getAPIList(t,r,a){return this.requestAPIList(r,{method:"get",path:t,...a})}requestAPIList(t,r){let a=this.makeRequest(r,null,void 0);return new hT(this,a,t)}async fetchWithTimeout(t,r,a,n){let{signal:s,method:i,...o}=r||{};s&&s.addEventListener("abort",()=>n.abort());let l=setTimeout(()=>n.abort(),a),c=globalThis.ReadableStream&&o.body instanceof globalThis.ReadableStream||typeof o.body=="object"&&o.body!==null&&Symbol.asyncIterator in o.body,u={signal:n.signal,...c?{duplex:"half"}:{},method:"GET",...o};i&&(u.method=i.toUpperCase());try{return await this.fetch.call(void 0,t,u)}finally{clearTimeout(l)}}async shouldRetry(t){let r=t.headers.get("x-should-retry");return r==="true"?!0:r==="false"?!1:t.status===408||t.status===409||t.status===429||t.status>=500}async retryRequest(t,r,a,n){let s,i=n?.get("retry-after-ms");if(i){let l=parseFloat(i);Number.isNaN(l)||(s=l)}let o=n?.get("retry-after");if(o&&!s){let l=parseFloat(o);Number.isNaN(l)?s=Date.parse(o)-Date.now():s=l*1e3}if(!(s&&0<=s&&s<60*1e3)){let l=t.maxRetries??this.maxRetries;s=this.calculateDefaultRetryTimeoutMillis(r,l)}return await lu(s),this.makeRequest(t,r-1,a)}calculateDefaultRetryTimeoutMillis(t,r){let s=r-t,i=Math.min(.5*Math.pow(2,s),8),o=1-Math.random()*.25;return i*o*1e3}async buildRequest(t,{retryCount:r=0}={}){let a={...t},{method:n,path:s,query:i,defaultBaseURL:o}=a,l=this.buildURL(s,i,o);"timeout"in a&&Ore("timeout",a.timeout),a.timeout=a.timeout??this.timeout;let{bodyHeaders:c,body:u}=this.buildBody({options:a}),d=await this.buildHeaders({options:t,method:n,bodyHeaders:c,retryCount:r});return{req:{method:n,headers:d,...a.signal&&{signal:a.signal},...globalThis.ReadableStream&&u instanceof globalThis.ReadableStream&&{duplex:"half"},...u&&{body:u},...this.fetchOptions??{},...a.fetchOptions??{}},url:l,timeout:a.timeout}}async buildHeaders({options:t,method:r,bodyHeaders:a,retryCount:n}){let s={};this.idempotencyHeader&&r!=="get"&&(t.idempotencyKey||(t.idempotencyKey=this.defaultIdempotencyKey()),s[this.idempotencyHeader]=t.idempotencyKey);let i=Ke([s,{Accept:"application/json","User-Agent":this.getUserAgent(),"X-Stainless-Retry-Count":String(n),...t.timeout?{"X-Stainless-Timeout":String(Math.trunc(t.timeout/1e3))}:{},...Vre(),"OpenAI-Organization":this.organization,"OpenAI-Project":this.project},await this.authHeaders(t),this._options.defaultHeaders,a,t.headers]);return this.validateHeaders(i),i.values}buildBody({options:{body:t,headers:r}}){if(!t)return{bodyHeaders:void 0,body:void 0};let a=Ke([r]);return ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof DataView||typeof t=="string"&&a.values.has("content-type")||globalThis.Blob&&t instanceof globalThis.Blob||t instanceof FormData||t instanceof URLSearchParams||globalThis.ReadableStream&&t instanceof globalThis.ReadableStream?{bodyHeaders:void 0,body:t}:typeof t=="object"&&(Symbol.asyncIterator in t||Symbol.iterator in t&&"next"in t&&typeof t.next=="function")?{bodyHeaders:void 0,body:fA(t)}:be(this,UA,"f").call(this,{body:t,headers:a})}};gF=rr,UA=new WeakMap,hF=new WeakSet,Dae=function(){return this.baseURL!=="https://api.openai.com/v1"};rr.OpenAI=gF;rr.DEFAULT_TIMEOUT=6e5;rr.OpenAIError=ct;rr.APIError=gn;rr.APIConnectionError=Sp;rr.APIConnectionTimeoutError=Tp;rr.APIUserAbortError=Gn;rr.NotFoundError=Fx;rr.ConflictError=Bx;rr.RateLimitError=jx;rr.BadRequestError=Dx;rr.AuthenticationError=_x;rr.InternalServerError=zx;rr.PermissionDeniedError=Ox;rr.UnprocessableEntityError=Ux;rr.InvalidWebhookSignatureError=ou;rr.toFile=SA;rr.Completions=Bh;rr.Chat=Ap;rr.Embeddings=jh;rr.Files=Vh;rr.Images=Gh;rr.Audio=fu;rr.Moderations=Wh;rr.Models=Kh;rr.FineTuning=pc;rr.Graders=_p;rr.VectorStores=_d;rr.Webhooks=Yh;rr.Beta=fc;rr.Batches=Mh;rr.Uploads=Fp;rr.Responses=Dd;rr.Realtime=Md;rr.Conversations=Mp;rr.Evals=Dp;rr.Containers=kp;rr.Videos=Xh;Vt();var AT=class extends Yf{constructor(){super()}getOpenAIClient(){let t=He.getState().i18n.settings,r=this.getActiveProfile();if(!r)throw new Error("Missing active profile for the selected provider.");let a=r.key,s=pw(r.url||Dt[t.llmApi]?.baseUrl||"")||void 0;return new rr({baseURL:s,apiKey:a,dangerouslyAllowBrowser:!0,fetch:async(i,o)=>{let l={};o?.headers&&(o.headers instanceof Headers?o.headers.forEach((u,d)=>{l[d]=u}):Array.isArray(o.headers)?o.headers.forEach(([u,d])=>{l[u]=d}):Object.assign(l,o.headers));let c=o?.signal;return new Promise((u,d)=>{let f=()=>d(new Error("AbortError"));if(c?.aborted)return f();c?.addEventListener("abort",f),(0,_ae.requestUrl)({url:i.toString(),method:o?.method||"POST",headers:l,body:o?.body,throw:!1}).then(p=>{c?.removeEventListener("abort",f),u({ok:p.status>=200&&p.status<300,status:p.status,statusText:p.status.toString(),headers:new Headers(p.headers),json:()=>Promise.resolve(p.json),text:()=>Promise.resolve(p.text),arrayBuffer:()=>Promise.resolve(p.arrayBuffer)})}).catch(p=>{c?.removeEventListener("abort",f),d(p)})})}})}getModelName(){let t=this.getActiveProfile();if(t?.model)return t.model;let r=He.getState().i18n.settings,a=Dt[r.llmApi];return a?a.defaultModel:"gpt-4o-mini"}async callRegexTranslationAPI(t,r){let a=this.getRegexSystemPrompt(),n=t.map(i=>({i:i.id,s:i.source})),s=await this.callOpenAI(n,a,r);return this.mapResultsBack(t,s)}async callAstTranslationAPI(t,r){let a=this.getAstSystemPrompt(),n=t.map(i=>({i:i.id,s:i.source,y:i.type,n:i.name})),s=await this.callOpenAI(n,a,r);return this.mapResultsBack(t,s)}async callThemeTranslationAPI(t,r){let a=this.getThemeSystemPrompt(),n=t.map(i=>({i:i.id,s:i.source,y:i.type})),s=await this.callOpenAI(n,a,r);return this.mapResultsBack(t,s)}async callOpenAI(t,r,a,n=2){let s=He.getState().i18n.settings,i=[{role:"system",content:r},{role:"user",content:JSON.stringify(t)}],o=0,l=null;for(;o<=n;){let u=new AbortController,d=s.llmTimeout||6e4,f=setTimeout(()=>{u.abort()},d),p=()=>u.abort();a&&a.addEventListener("abort",p);try{if(a?.aborted)throw new Error("\u7FFB\u8BD1\u4EFB\u52A1\u5DF2\u53D6\u6D88");let m={messages:i,model:this.getModelName(),temperature:.3};s.llmResponseFormat==="json_object"?m.response_format={type:"json_object"}:s.llmResponseFormat==="json_schema"&&(m.response_format={type:"json_schema",json_schema:{name:"translation_result",schema:{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{i:{type:"number"},t:{type:"string"}},required:["i","t"],additionalProperties:!1}}},required:["items"],additionalProperties:!1},strict:!0}});let g=(await this.getOpenAIClient().chat.completions.create(m,{signal:u.signal})).choices[0].message.content;return this.parseResponseContent(g||"")}catch(m){let h=m.name==="AbortError"&&!a?.aborted;if(a?.aborted||m.message==="\u7FFB\u8BD1\u4EFB\u52A1\u5DF2\u53D6\u6D88")throw new Error("\u7FFB\u8BD1\u4EFB\u52A1\u5DF2\u53D6\u6D88");l=h?new Error(`\u8BF7\u6C42\u8D85\u65F6 (${d}ms)`):m,o++,o<=n&&await new Promise(g=>setTimeout(g,1e3*o))}finally{clearTimeout(f),a&&a.removeEventListener("abort",p)}}let c=l?l.message:"\u672A\u77E5\u9519\u8BEF";throw new Error(c)}async callFixAPI(t,r,a,n,s){let i=He.getState().i18n.settings,o=[`Source: ${t}`,`Broken Translation: ${r}`,`Error: ${a}`,"","Please return ONLY the fixed translation string."].join(`
|
|
`),l=[{role:"system",content:n},{role:"user",content:o}],c=new AbortController,u=i.llmTimeout||6e4,d=setTimeout(()=>c.abort(),u),f=()=>c.abort();s&&s.addEventListener("abort",f);try{if(s?.aborted)throw new Error("\u4FEE\u590D\u4EFB\u52A1\u5DF2\u53D6\u6D88");let h=(await this.getOpenAIClient().chat.completions.create({messages:l,model:this.getModelName(),temperature:.2},{signal:c.signal})).choices[0].message.content;if(!h||h.trim()==="")throw new Error("AI \u8FD4\u56DE\u7684\u4FEE\u590D\u7ED3\u679C\u4E3A\u7A7A");let x=h.trim();return x.startsWith('"')&&x.endsWith('"')&&(x=x.slice(1,-1)),x.startsWith("'")&&x.endsWith("'")&&(x=x.slice(1,-1)),x}finally{clearTimeout(d),s&&s.removeEventListener("abort",f)}}};var yF=require("obsidian");var Oae="https://generativelanguage.googleapis.com/v1beta",jA=class extends Yf{constructor(){super()}getModelName(){return this.getActiveProfile()?.model||"gemini-2.0-flash"}async callGemini(t,r,a,n=2){let s=this.getActiveProfile();if(!s)throw new Error("Missing active profile for Gemini");let i=s.key,o=this.getModelName();if(!i)throw new Error("\u8BF7\u5148\u914D\u7F6E Gemini API Key");let l=s.url?.trim()||Oae;l=l.replace(/\/+$/,"");let c=`${l}/models/${o}:generateContent?key=${i}`,u={contents:[{role:"user",parts:[{text:JSON.stringify(t)}]}],systemInstruction:{parts:[{text:r}]},generationConfig:{temperature:.3,responseMimeType:"application/json"}},d=0,f=null;for(;d<=n;){let p=new AbortController,m=this.getTimeout(),h=setTimeout(()=>p.abort(),m),x=()=>p.abort();a&&a.addEventListener("abort",x);try{if(a?.aborted)throw new Error("\u7FFB\u8BD1\u4EFB\u52A1\u5DF2\u53D6\u6D88");let g=await(0,yF.requestUrl)({url:c,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(u),throw:!1});if(g.status!==200){let w=g.json?.error?.message||`HTTP ${g.status}`;throw new Error(`Gemini API \u9519\u8BEF: ${w}`)}let b=g.json?.candidates?.[0]?.content?.parts?.[0]?.text;if(!b)throw new Error("Gemini \u8FD4\u56DE\u5185\u5BB9\u4E3A\u7A7A");return this.parseResponseContent(b)}catch(g){let y=g.name==="AbortError"&&!a?.aborted;if(a?.aborted||g.message==="\u7FFB\u8BD1\u4EFB\u52A1\u5DF2\u53D6\u6D88")throw new Error("\u7FFB\u8BD1\u4EFB\u52A1\u5DF2\u53D6\u6D88");f=y?new Error(`\u8BF7\u6C42\u8D85\u65F6 (${m}ms)`):g,d++,d<=n&&await new Promise(S=>setTimeout(S,1e3*d))}finally{clearTimeout(h),a&&a.removeEventListener("abort",x)}}throw new Error(f?.message||"\u672A\u77E5\u9519\u8BEF")}async callRegexTranslationAPI(t,r){let a=this.getRegexSystemPrompt(),n=t.map(i=>({i:i.id,s:i.source})),s=await this.callGemini(n,a,r);return this.mapResultsBack(t,s)}async callAstTranslationAPI(t,r){let a=this.getAstSystemPrompt(),n=t.map(i=>({i:i.id,s:i.source,y:i.type,n:i.name})),s=await this.callGemini(n,a,r);return this.mapResultsBack(t,s)}async callThemeTranslationAPI(t,r){let a=this.getThemeSystemPrompt(),n=t.map(i=>({i:i.id,s:i.source,y:i.type})),s=await this.callGemini(n,a,r);return this.mapResultsBack(t,s)}async callFixAPI(t,r,a,n,s){let i=this.getActiveProfile();if(!i)throw new Error("Missing active profile for Gemini");let o=i.key,l=this.getModelName();if(!o)throw new Error("\u8BF7\u5148\u914D\u7F6E Gemini API Key");let c=i.url?.trim()||Oae;c=c.replace(/\/+$/,"");let u=`Source: ${t}
|
|
Broken Translation: ${r}
|
|
Error: ${a}
|
|
|
|
Please return ONLY the fixed translation string.`,d=`${c}/models/${l}:generateContent?key=${o}`,p=await(0,yF.requestUrl)({url:d,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({contents:[{role:"user",parts:[{text:u}]}],systemInstruction:{parts:[{text:n}]},generationConfig:{temperature:.2}}),throw:!1});if(p.status!==200){let x=p.json?.error?.message||`HTTP ${p.status}`;throw new Error(`Gemini API \u9519\u8BEF: ${x}`)}let m=p.json?.candidates?.[0]?.content?.parts?.[0]?.text;if(!m||m.trim()==="")throw new Error("AI \u8FD4\u56DE\u7684\u4FEE\u590D\u7ED3\u679C\u4E3A\u7A7A");let h=m.trim();return h.startsWith('"')&&h.endsWith('"')&&(h=h.slice(1,-1)),h.startsWith("'")&&h.endsWith("'")&&(h=h.slice(1,-1)),h}};function mc(){let e=He.getState().i18n.settings,t=Dt[e.llmApi];if(!t)return new AT;switch(t.engine){case"gemini":return new jA;case"ollama":return new Jf;case"openai":default:return new AT}}Rr();var zA=()=>{let e=at.use.astItems(),t=at.use.updateAstItems(),r=Dc.use.i18n(),[a,n]=(0,yn.useState)(r.settings.language||r.settings.llmLanguage||"zh-cn"),[s,i]=(0,yn.useState)(r.settings.llmStyle),[o,l]=(0,yn.useState)(r.settings.llmBatchSize?.toString()||"20"),[c,u]=(0,yn.useState)(r.settings.llmConcurrencyLimit?.toString()||"3"),[d,f]=(0,yn.useState)(!1),[p,m]=(0,yn.useState)(!1),[h,x]=(0,yn.useState)(!1),[g,y]=(0,yn.useState)(r.settings.llmTimeout?.toString()||"60000"),[b,S]=(0,yn.useState)(!1),[w,P]=(0,yn.useState)(!1),[C,I]=(0,yn.useState)(0),[R,O]=(0,yn.useState)(0),[D,W]=(0,yn.useState)(0),[J,me]=(0,yn.useState)(0),[Z,q]=(0,yn.useState)(0),V=(0,yn.useRef)(null),L=(0,yn.useMemo)(()=>e.filter(H=>d||!H.target||H.target.trim()===""||H.target===H.source),[e,d]);(0,yn.useEffect)(()=>{n(r.settings.language||r.settings.llmLanguage||"zh-cn"),i(r.settings.llmStyle),l(r.settings.llmBatchSize?.toString()||"20"),u(r.settings.llmConcurrencyLimit?.toString()||"3"),y(r.settings.llmTimeout?.toString()||"60000")},[r.settings.language,r.settings.llmLanguage,r.settings.llmStyle,r.settings.llmBatchSize,r.settings.llmConcurrencyLimit,r.settings.llmTimeout]);let k=H=>{Object.assign(r.settings,H),r.saveSettings()};return{state:{language:a,style:s,batchSize:o,concurrencyLimit:c,overwrite:d,inputError:p,concurrencyError:h,isTranslating:w,progress:C,processedCount:R,totalCount:D,currentBatch:J,totalBatches:Z,targetItems:L,timeout:g,timeoutError:b,get estimation(){return mc().estimateTokens(L,"ast")}},actions:{setLanguage:H=>{n(H),k({language:H,llmLanguage:H})},setStyle:H=>{i(H),k({llmStyle:H})},setBatchSize:H=>{let xe=H.target.value;l(xe);let Pe=parseInt(xe,10);isNaN(Pe)||Pe<=0?m(!0):m(!1)},setConcurrencyLimit:H=>{let xe=H.target.value;u(xe);let Pe=parseInt(xe,10);isNaN(Pe)||Pe<=0?x(!0):x(!1)},setOverwrite:f,handleTimeoutChange:H=>{let xe=H.target.value;y(xe);let Pe=parseInt(xe,10);isNaN(Pe)||Pe<=0?S(!0):S(!1)},handleBatchSizeBlur:()=>{let H=parseInt(o,10);!isNaN(H)&&H>0?(k({llmBatchSize:H}),m(!1)):(l(r.settings.llmBatchSize?.toString()||"20"),m(!1))},handleConcurrencyLimitBlur:()=>{let H=parseInt(c,10);!isNaN(H)&&H>0?(k({llmConcurrencyLimit:H}),x(!1)):(u(r.settings.llmConcurrencyLimit?.toString()||"3"),x(!1))},handleTimeoutBlur:()=>{let H=parseInt(g,10);!isNaN(H)&&H>0?(k({llmTimeout:H}),S(!1)):(y(r.settings.llmTimeout?.toString()||"60000"),S(!1))},handleBatchTranslation:async()=>{if(!w){if(L.length===0){Ni.info(v("Common.Notices.NoItemsToTranslate"));return}P(!0),O(0),W(L.length),I(0),me(0),q(1),V.current=new AbortController;try{await mc().astTranslate(L,async(xe,Pe,Ie)=>{let Ve=Math.min(Math.round(Pe/Ie*L.length),L.length);O(Ve),I(Pe/Ie*100),me(Pe),q(Ie);let ft=xe.map(we=>({id:we.id,updates:{target:we.target}}));t(ft)},V.current.signal),Ni.success(v("Common.Notices.BatchTranslateSuccess"))}catch(H){H.name==="AbortError"||H.message===v("Common.Notices.TaskCancelled")||V.current?.signal.aborted||Ni.error(v("Common.Notices.TranslateFail",{message:H.message}))}finally{V.current&&(P(!1),V.current=null)}}},handleStop:()=>{V.current&&(V.current.abort(),V.current=null,P(!1),Ni.info(v("Common.Notices.TaskStopped")))}}}};var La=N(ce()),Fae=({translationEntries:e=[],progress:t=0,initialSettings:r={},onSaveSettings:a,initialFilter:n={},onFilterChange:s,astController:i,activeTab:o,onTabChange:l,onIncrementalExtract:c,onOpenFile:u,onDiagnose:d,isDiagnosing:f,errorItems:p,hasChecked:m,setActiveTab:h,onClearDiagnose:x,onRestoreAllErrors:g,onUnusedDiagnose:y,onDeleteUnused:b,isUnusedScan:S,isSecurityScan:w,onSecurityDiagnose:P,isApplied:C,onJumpError:I,onAiFixError:R})=>{let{t:O}=ze(),D=zA(),W=i||D,[J,me]=(0,IT.useState)(!0),[Z,q]=(0,IT.useState)(!0),[V,L]=(0,IT.useState)(!0),[k,_]=(0,IT.useState)(!0);return(0,La.jsxs)("div",{className:"flex flex-col w-full h-full",children:[(0,La.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 border-b shrink-0",children:[(0,La.jsxs)("div",{className:"flex items-center text-sm font-semibold gap-1.5",children:[(0,La.jsx)(to,{className:"w-4 h-4"}),(0,La.jsx)("span",{children:O("Editor.Titles.Sidebar")})]}),(0,La.jsxs)(Vn,{children:[(0,La.jsx)(qn,{asChild:!0,children:(0,La.jsxs)(Te,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:[(0,La.jsx)(ko,{className:"w-4 h-4"}),(0,La.jsx)("span",{className:"sr-only",children:O("Editor.Labels.SidebarViewOptions")})]})}),(0,La.jsxs)(Hn,{align:"end",className:"w-48",children:[(0,La.jsx)(Ex,{children:O("Editor.Labels.SidebarShowCards")}),(0,La.jsx)(Ml,{}),(0,La.jsx)(Ai,{checked:J,onCheckedChange:me,children:O("Editor.Stats.Title")}),(0,La.jsx)(Ai,{checked:Z,onCheckedChange:q,children:O("Editor.Titles.Insert")}),(0,La.jsx)(Ai,{checked:V,onCheckedChange:L,children:O("Editor.Titles.QuickActions")}),(0,La.jsx)(Ai,{checked:k,onCheckedChange:_,children:O("Editor.Titles.Ai")})]})]})]}),(0,La.jsx)(sr,{className:"flex-1 min-h-0 px-2 pb-2",children:(0,La.jsxs)("div",{className:"space-y-4 pb-4",children:[J&&(0,La.jsx)(N3,{items:e}),Z&&(0,La.jsx)(L3,{}),V&&(0,La.jsx)(Ih,{onIncrementalExtract:c||(()=>{}),onClearUntranslated:at.use.deleteUntranslatedAstItems(),onOpenFile:u,isApplied:C}),(0,La.jsx)(dA,{onDiagnose:d,onUnusedDiagnose:y,onSecurityDiagnose:P,onDeleteUnused:b,onClear:x,onRestoreAllErrors:g,isDiagnosing:f,isUnusedScan:S,isSecurityScan:w,errorItems:p||[],hasChecked:m,setActiveTab:h,onJumpError:I,onAiFixError:R}),k&&(0,La.jsx)(Rre,{controller:W})]})})]})};var hs=N(Le());er();qt();var RT=N(Le(),1);function Bp(e,t){return typeof e=="function"?e(t):e}function Ho(e,t){return r=>{t.setState(a=>({...a,[e]:Bp(r,a[e])}))}}function $A(e){return e instanceof Function}function gXe(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function yXe(e,t){let r=[],a=n=>{n.forEach(s=>{r.push(s);let i=t(s);i!=null&&i.length&&a(i)})};return a(e),r}function Yt(e,t,r){let a=[],n;return s=>{let i;r.key&&r.debug&&(i=Date.now());let o=e(s);if(!(o.length!==a.length||o.some((u,d)=>a[d]!==u)))return n;a=o;let c;if(r.key&&r.debug&&(c=Date.now()),n=t(...o),r==null||r.onChange==null||r.onChange(n),r.key&&r.debug&&r!=null&&r.debug()){let u=Math.round((Date.now()-i)*100)/100,f=Math.round((Date.now()-c)*100)/100/16,p=(m,h)=>{for(m=String(m);m.length<h;)m=" "+m;return m}}return n}}function Jt(e,t,r,a){return{debug:()=>{var n;return(n=e?.debugAll)!=null?n:e[t]},key:!1,onChange:a}}function xXe(e,t,r,a){let n=()=>{var i;return(i=s.getValue())!=null?i:e.options.renderFallbackValue},s={id:`${t.id}_${r.id}`,row:t,column:r,getValue:()=>t.getValue(a),renderValue:n,getContext:Yt(()=>[e,r,t,s],(i,o,l,c)=>({table:i,column:o,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),Jt(e.options,"debugCells","cell.getContext"))};return e._features.forEach(i=>{i.createCell==null||i.createCell(s,r,t,e)},{}),s}function bXe(e,t,r,a){var n,s;let o={...e._getDefaultColumnDef(),...t},l=o.accessorKey,c=(n=(s=o.id)!=null?s:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?n:typeof o.header=="string"?o.header:void 0,u;if(o.accessorFn?u=o.accessorFn:l&&(l.includes(".")?u=f=>{let p=f;for(let h of l.split(".")){var m;p=(m=p)==null?void 0:m[h]}return p}:u=f=>f[o.accessorKey]),!c)throw new Error;let d={id:`${String(c)}`,accessorFn:u,parent:a,depth:r,columnDef:o,columns:[],getFlatColumns:Yt(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(p=>p.getFlatColumns())]},Jt(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:Yt(()=>[e._getOrderColumnsFn()],f=>{var p;if((p=d.columns)!=null&&p.length){let m=d.columns.flatMap(h=>h.getLeafColumns());return f(m)}return[d]},Jt(e.options,"debugColumns","column.getLeafColumns"))};for(let f of e._features)f.createColumn==null||f.createColumn(d,e);return d}var ii="debugHeaders";function Bae(e,t,r){var a;let s={id:(a=r.id)!=null?a:t.id,column:t,index:r.index,isPlaceholder:!!r.isPlaceholder,placeholderId:r.placeholderId,depth:r.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{let i=[],o=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(o),i.push(l)};return o(s),i},getContext:()=>({table:e,header:s,column:t})};return e._features.forEach(i=>{i.createHeader==null||i.createHeader(s,e)}),s}var vXe={createTable:e=>{e.getHeaderGroups=Yt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,a,n)=>{var s,i;let o=(s=a?.map(d=>r.find(f=>f.id===d)).filter(Boolean))!=null?s:[],l=(i=n?.map(d=>r.find(f=>f.id===d)).filter(Boolean))!=null?i:[],c=r.filter(d=>!(a!=null&&a.includes(d.id))&&!(n!=null&&n.includes(d.id)));return VA(t,[...o,...c,...l],e)},Jt(e.options,ii,"getHeaderGroups")),e.getCenterHeaderGroups=Yt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,a,n)=>(r=r.filter(s=>!(a!=null&&a.includes(s.id))&&!(n!=null&&n.includes(s.id))),VA(t,r,e,"center")),Jt(e.options,ii,"getCenterHeaderGroups")),e.getLeftHeaderGroups=Yt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,r,a)=>{var n;let s=(n=a?.map(i=>r.find(o=>o.id===i)).filter(Boolean))!=null?n:[];return VA(t,s,e,"left")},Jt(e.options,ii,"getLeftHeaderGroups")),e.getRightHeaderGroups=Yt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,r,a)=>{var n;let s=(n=a?.map(i=>r.find(o=>o.id===i)).filter(Boolean))!=null?n:[];return VA(t,s,e,"right")},Jt(e.options,ii,"getRightHeaderGroups")),e.getFooterGroups=Yt(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Jt(e.options,ii,"getFooterGroups")),e.getLeftFooterGroups=Yt(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Jt(e.options,ii,"getLeftFooterGroups")),e.getCenterFooterGroups=Yt(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Jt(e.options,ii,"getCenterFooterGroups")),e.getRightFooterGroups=Yt(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Jt(e.options,ii,"getRightFooterGroups")),e.getFlatHeaders=Yt(()=>[e.getHeaderGroups()],t=>t.map(r=>r.headers).flat(),Jt(e.options,ii,"getFlatHeaders")),e.getLeftFlatHeaders=Yt(()=>[e.getLeftHeaderGroups()],t=>t.map(r=>r.headers).flat(),Jt(e.options,ii,"getLeftFlatHeaders")),e.getCenterFlatHeaders=Yt(()=>[e.getCenterHeaderGroups()],t=>t.map(r=>r.headers).flat(),Jt(e.options,ii,"getCenterFlatHeaders")),e.getRightFlatHeaders=Yt(()=>[e.getRightHeaderGroups()],t=>t.map(r=>r.headers).flat(),Jt(e.options,ii,"getRightFlatHeaders")),e.getCenterLeafHeaders=Yt(()=>[e.getCenterFlatHeaders()],t=>t.filter(r=>{var a;return!((a=r.subHeaders)!=null&&a.length)}),Jt(e.options,ii,"getCenterLeafHeaders")),e.getLeftLeafHeaders=Yt(()=>[e.getLeftFlatHeaders()],t=>t.filter(r=>{var a;return!((a=r.subHeaders)!=null&&a.length)}),Jt(e.options,ii,"getLeftLeafHeaders")),e.getRightLeafHeaders=Yt(()=>[e.getRightFlatHeaders()],t=>t.filter(r=>{var a;return!((a=r.subHeaders)!=null&&a.length)}),Jt(e.options,ii,"getRightLeafHeaders")),e.getLeafHeaders=Yt(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,r,a)=>{var n,s,i,o,l,c;return[...(n=(s=t[0])==null?void 0:s.headers)!=null?n:[],...(i=(o=r[0])==null?void 0:o.headers)!=null?i:[],...(l=(c=a[0])==null?void 0:c.headers)!=null?l:[]].map(u=>u.getLeafHeaders()).flat()},Jt(e.options,ii,"getLeafHeaders"))}};function VA(e,t,r,a){var n,s;let i=0,o=function(f,p){p===void 0&&(p=1),i=Math.max(i,p),f.filter(m=>m.getIsVisible()).forEach(m=>{var h;(h=m.columns)!=null&&h.length&&o(m.columns,p+1)},0)};o(e);let l=[],c=(f,p)=>{let m={depth:p,id:[a,`${p}`].filter(Boolean).join("_"),headers:[]},h=[];f.forEach(x=>{let g=[...h].reverse()[0],y=x.column.depth===m.depth,b,S=!1;if(y&&x.column.parent?b=x.column.parent:(b=x.column,S=!0),g&&g?.column===b)g.subHeaders.push(x);else{let w=Bae(r,b,{id:[a,p,b.id,x?.id].filter(Boolean).join("_"),isPlaceholder:S,placeholderId:S?`${h.filter(P=>P.column===b).length}`:void 0,depth:p,index:h.length});w.subHeaders.push(x),h.push(w)}m.headers.push(x),x.headerGroup=m}),l.push(m),p>0&&c(h,p-1)},u=t.map((f,p)=>Bae(r,f,{depth:i,index:p}));c(u,i-1),l.reverse();let d=f=>f.filter(m=>m.column.getIsVisible()).map(m=>{let h=0,x=0,g=[0];m.subHeaders&&m.subHeaders.length?(g=[],d(m.subHeaders).forEach(b=>{let{colSpan:S,rowSpan:w}=b;h+=S,g.push(w)})):h=1;let y=Math.min(...g);return x=x+y,m.colSpan=h,m.rowSpan=x,{colSpan:h,rowSpan:x}});return d((n=(s=l[0])==null?void 0:s.headers)!=null?n:[]),l}var SXe=(e,t,r,a,n,s,i)=>{let o={id:t,index:a,original:r,depth:n,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(o._valuesCache.hasOwnProperty(l))return o._valuesCache[l];let c=e.getColumn(l);if(c!=null&&c.accessorFn)return o._valuesCache[l]=c.accessorFn(o.original,a),o._valuesCache[l]},getUniqueValues:l=>{if(o._uniqueValuesCache.hasOwnProperty(l))return o._uniqueValuesCache[l];let c=e.getColumn(l);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(o._uniqueValuesCache[l]=c.columnDef.getUniqueValues(o.original,a),o._uniqueValuesCache[l]):(o._uniqueValuesCache[l]=[o.getValue(l)],o._uniqueValuesCache[l])},renderValue:l=>{var c;return(c=o.getValue(l))!=null?c:e.options.renderFallbackValue},subRows:s??[],getLeafRows:()=>yXe(o.subRows,l=>l.subRows),getParentRow:()=>o.parentId?e.getRow(o.parentId,!0):void 0,getParentRows:()=>{let l=[],c=o;for(;;){let u=c.getParentRow();if(!u)break;l.push(u),c=u}return l.reverse()},getAllCells:Yt(()=>[e.getAllLeafColumns()],l=>l.map(c=>xXe(e,o,c,c.id)),Jt(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:Yt(()=>[o.getAllCells()],l=>l.reduce((c,u)=>(c[u.column.id]=u,c),{}),Jt(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){let c=e._features[l];c==null||c.createRow==null||c.createRow(o,e)}return o},TXe={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},jae=(e,t,r)=>{var a,n;let s=r==null||(a=r.toString())==null?void 0:a.toLowerCase();return Boolean((n=e.getValue(t))==null||(n=n.toString())==null||(n=n.toLowerCase())==null?void 0:n.includes(s))};jae.autoRemove=e=>hc(e);var zae=(e,t,r)=>{var a;return Boolean((a=e.getValue(t))==null||(a=a.toString())==null?void 0:a.includes(r))};zae.autoRemove=e=>hc(e);var Vae=(e,t,r)=>{var a;return((a=e.getValue(t))==null||(a=a.toString())==null?void 0:a.toLowerCase())===r?.toLowerCase()};Vae.autoRemove=e=>hc(e);var qae=(e,t,r)=>{var a;return(a=e.getValue(t))==null?void 0:a.includes(r)};qae.autoRemove=e=>hc(e);var Hae=(e,t,r)=>!r.some(a=>{var n;return!((n=e.getValue(t))!=null&&n.includes(a))});Hae.autoRemove=e=>hc(e)||!(e!=null&&e.length);var $ae=(e,t,r)=>r.some(a=>{var n;return(n=e.getValue(t))==null?void 0:n.includes(a)});$ae.autoRemove=e=>hc(e)||!(e!=null&&e.length);var Gae=(e,t,r)=>e.getValue(t)===r;Gae.autoRemove=e=>hc(e);var Kae=(e,t,r)=>e.getValue(t)==r;Kae.autoRemove=e=>hc(e);var LF=(e,t,r)=>{let[a,n]=r,s=e.getValue(t);return s>=a&&s<=n};LF.resolveFilterValue=e=>{let[t,r]=e,a=typeof t!="number"?parseFloat(t):t,n=typeof r!="number"?parseFloat(r):r,s=t===null||Number.isNaN(a)?-1/0:a,i=r===null||Number.isNaN(n)?1/0:n;if(s>i){let o=s;s=i,i=o}return[s,i]};LF.autoRemove=e=>hc(e)||hc(e[0])&&hc(e[1]);var Od={includesString:jae,includesStringSensitive:zae,equalsString:Vae,arrIncludes:qae,arrIncludesAll:Hae,arrIncludesSome:$ae,equals:Gae,weakEquals:Kae,inNumberRange:LF};function hc(e){return e==null||e===""}var wXe={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Ho("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{let r=t.getCoreRowModel().flatRows[0],a=r?.getValue(e.id);return typeof a=="string"?Od.includesString:typeof a=="number"?Od.inNumberRange:typeof a=="boolean"||a!==null&&typeof a=="object"?Od.equals:Array.isArray(a)?Od.arrIncludes:Od.weakEquals},e.getFilterFn=()=>{var r,a;return $A(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(r=(a=t.options.filterFns)==null?void 0:a[e.columnDef.filterFn])!=null?r:Od[e.columnDef.filterFn]},e.getCanFilter=()=>{var r,a,n;return((r=e.columnDef.enableColumnFilter)!=null?r:!0)&&((a=t.options.enableColumnFilters)!=null?a:!0)&&((n=t.options.enableFilters)!=null?n:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var r;return(r=t.getState().columnFilters)==null||(r=r.find(a=>a.id===e.id))==null?void 0:r.value},e.getFilterIndex=()=>{var r,a;return(r=(a=t.getState().columnFilters)==null?void 0:a.findIndex(n=>n.id===e.id))!=null?r:-1},e.setFilterValue=r=>{t.setColumnFilters(a=>{let n=e.getFilterFn(),s=a?.find(u=>u.id===e.id),i=Bp(r,s?s.value:void 0);if(Uae(n,i,e)){var o;return(o=a?.filter(u=>u.id!==e.id))!=null?o:[]}let l={id:e.id,value:i};if(s){var c;return(c=a?.map(u=>u.id===e.id?l:u))!=null?c:[]}return a!=null&&a.length?[...a,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{let r=e.getAllLeafColumns(),a=n=>{var s;return(s=Bp(t,n))==null?void 0:s.filter(i=>{let o=r.find(l=>l.id===i.id);if(o){let l=o.getFilterFn();if(Uae(l,i.value,o))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(a)},e.resetColumnFilters=t=>{var r,a;e.setColumnFilters(t?[]:(r=(a=e.initialState)==null?void 0:a.columnFilters)!=null?r:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Uae(e,t,r){return(e&&e.autoRemove?e.autoRemove(t,r):!1)||typeof t>"u"||typeof t=="string"&&!t}var CXe=(e,t,r)=>r.reduce((a,n)=>{let s=n.getValue(e);return a+(typeof s=="number"?s:0)},0),EXe=(e,t,r)=>{let a;return r.forEach(n=>{let s=n.getValue(e);s!=null&&(a>s||a===void 0&&s>=s)&&(a=s)}),a},PXe=(e,t,r)=>{let a;return r.forEach(n=>{let s=n.getValue(e);s!=null&&(a<s||a===void 0&&s>=s)&&(a=s)}),a},AXe=(e,t,r)=>{let a,n;return r.forEach(s=>{let i=s.getValue(e);i!=null&&(a===void 0?i>=i&&(a=n=i):(a>i&&(a=i),n<i&&(n=i)))}),[a,n]},IXe=(e,t)=>{let r=0,a=0;if(t.forEach(n=>{let s=n.getValue(e);s!=null&&(s=+s)>=s&&(++r,a+=s)}),r)return a/r},NXe=(e,t)=>{if(!t.length)return;let r=t.map(s=>s.getValue(e));if(!gXe(r))return;if(r.length===1)return r[0];let a=Math.floor(r.length/2),n=r.sort((s,i)=>s-i);return r.length%2!==0?n[a]:(n[a-1]+n[a])/2},LXe=(e,t)=>Array.from(new Set(t.map(r=>r.getValue(e))).values()),RXe=(e,t)=>new Set(t.map(r=>r.getValue(e))).size,kXe=(e,t)=>t.length,xF={sum:CXe,min:EXe,max:PXe,extent:AXe,mean:IXe,median:NXe,unique:LXe,uniqueCount:RXe,count:kXe},MXe={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,r;return(t=(r=e.getValue())==null||r.toString==null?void 0:r.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Ho("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(r=>r!=null&&r.includes(e.id)?r.filter(a=>a!==e.id):[...r??[],e.id])},e.getCanGroup=()=>{var r,a;return((r=e.columnDef.enableGrouping)!=null?r:!0)&&((a=t.options.enableGrouping)!=null?a:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var r;return(r=t.getState().grouping)==null?void 0:r.includes(e.id)},e.getGroupedIndex=()=>{var r;return(r=t.getState().grouping)==null?void 0:r.indexOf(e.id)},e.getToggleGroupingHandler=()=>{let r=e.getCanGroup();return()=>{r&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{let r=t.getCoreRowModel().flatRows[0],a=r?.getValue(e.id);if(typeof a=="number")return xF.sum;if(Object.prototype.toString.call(a)==="[object Date]")return xF.extent},e.getAggregationFn=()=>{var r,a;if(!e)throw new Error;return $A(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(r=(a=t.options.aggregationFns)==null?void 0:a[e.columnDef.aggregationFn])!=null?r:xF[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var r,a;e.setGrouping(t?[]:(r=(a=e.initialState)==null?void 0:a.grouping)!=null?r:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=r=>{if(e._groupingValuesCache.hasOwnProperty(r))return e._groupingValuesCache[r];let a=t.getColumn(r);return a!=null&&a.columnDef.getGroupingValue?(e._groupingValuesCache[r]=a.columnDef.getGroupingValue(e.original),e._groupingValuesCache[r]):e.getValue(r)},e._groupingValuesCache={}},createCell:(e,t,r,a)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===r.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var n;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((n=r.subRows)!=null&&n.length)}}};function DXe(e,t,r){if(!(t!=null&&t.length)||!r)return e;let a=e.filter(s=>!t.includes(s.id));return r==="remove"?a:[...t.map(s=>e.find(i=>i.id===s)).filter(Boolean),...a]}var _Xe={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Ho("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Yt(r=>[LT(t,r)],r=>r.findIndex(a=>a.id===e.id),Jt(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=r=>{var a;return((a=LT(t,r)[0])==null?void 0:a.id)===e.id},e.getIsLastColumn=r=>{var a;let n=LT(t,r);return((a=n[n.length-1])==null?void 0:a.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var r;e.setColumnOrder(t?[]:(r=e.initialState.columnOrder)!=null?r:[])},e._getOrderColumnsFn=Yt(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,r,a)=>n=>{let s=[];if(!(t!=null&&t.length))s=n;else{let i=[...t],o=[...n];for(;o.length&&i.length;){let l=i.shift(),c=o.findIndex(u=>u.id===l);c>-1&&s.push(o.splice(c,1)[0])}s=[...s,...o]}return DXe(s,r,a)},Jt(e.options,"debugTable","_getOrderColumnsFn"))}},bF=()=>({left:[],right:[]}),OXe={getInitialState:e=>({columnPinning:bF(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Ho("columnPinning",e)}),createColumn:(e,t)=>{e.pin=r=>{let a=e.getLeafColumns().map(n=>n.id).filter(Boolean);t.setColumnPinning(n=>{var s,i;if(r==="right"){var o,l;return{left:((o=n?.left)!=null?o:[]).filter(d=>!(a!=null&&a.includes(d))),right:[...((l=n?.right)!=null?l:[]).filter(d=>!(a!=null&&a.includes(d))),...a]}}if(r==="left"){var c,u;return{left:[...((c=n?.left)!=null?c:[]).filter(d=>!(a!=null&&a.includes(d))),...a],right:((u=n?.right)!=null?u:[]).filter(d=>!(a!=null&&a.includes(d)))}}return{left:((s=n?.left)!=null?s:[]).filter(d=>!(a!=null&&a.includes(d))),right:((i=n?.right)!=null?i:[]).filter(d=>!(a!=null&&a.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(a=>{var n,s,i;return((n=a.columnDef.enablePinning)!=null?n:!0)&&((s=(i=t.options.enableColumnPinning)!=null?i:t.options.enablePinning)!=null?s:!0)}),e.getIsPinned=()=>{let r=e.getLeafColumns().map(o=>o.id),{left:a,right:n}=t.getState().columnPinning,s=r.some(o=>a?.includes(o)),i=r.some(o=>n?.includes(o));return s?"left":i?"right":!1},e.getPinnedIndex=()=>{var r,a;let n=e.getIsPinned();return n?(r=(a=t.getState().columnPinning)==null||(a=a[n])==null?void 0:a.indexOf(e.id))!=null?r:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=Yt(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(r,a,n)=>{let s=[...a??[],...n??[]];return r.filter(i=>!s.includes(i.column.id))},Jt(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=Yt(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(r,a)=>(a??[]).map(s=>r.find(i=>i.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),Jt(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=Yt(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(r,a)=>(a??[]).map(s=>r.find(i=>i.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),Jt(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var r,a;return e.setColumnPinning(t?bF():(r=(a=e.initialState)==null?void 0:a.columnPinning)!=null?r:bF())},e.getIsSomeColumnsPinned=t=>{var r;let a=e.getState().columnPinning;if(!t){var n,s;return Boolean(((n=a.left)==null?void 0:n.length)||((s=a.right)==null?void 0:s.length))}return Boolean((r=a[t])==null?void 0:r.length)},e.getLeftLeafColumns=Yt(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,r)=>(r??[]).map(a=>t.find(n=>n.id===a)).filter(Boolean),Jt(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=Yt(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,r)=>(r??[]).map(a=>t.find(n=>n.id===a)).filter(Boolean),Jt(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=Yt(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,a)=>{let n=[...r??[],...a??[]];return t.filter(s=>!n.includes(s.id))},Jt(e.options,"debugColumns","getCenterLeafColumns"))}};function FXe(e){return e||(typeof document<"u"?document:null)}var qA={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},vF=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),BXe={getDefaultColumnDef:()=>qA,getInitialState:e=>({columnSizing:{},columnSizingInfo:vF(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Ho("columnSizing",e),onColumnSizingInfoChange:Ho("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var r,a,n;let s=t.getState().columnSizing[e.id];return Math.min(Math.max((r=e.columnDef.minSize)!=null?r:qA.minSize,(a=s??e.columnDef.size)!=null?a:qA.size),(n=e.columnDef.maxSize)!=null?n:qA.maxSize)},e.getStart=Yt(r=>[r,LT(t,r),t.getState().columnSizing],(r,a)=>a.slice(0,e.getIndex(r)).reduce((n,s)=>n+s.getSize(),0),Jt(t.options,"debugColumns","getStart")),e.getAfter=Yt(r=>[r,LT(t,r),t.getState().columnSizing],(r,a)=>a.slice(e.getIndex(r)+1).reduce((n,s)=>n+s.getSize(),0),Jt(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(r=>{let{[e.id]:a,...n}=r;return n})},e.getCanResize=()=>{var r,a;return((r=e.columnDef.enableResizing)!=null?r:!0)&&((a=t.options.enableColumnResizing)!=null?a:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let r=0,a=n=>{if(n.subHeaders.length)n.subHeaders.forEach(a);else{var s;r+=(s=n.column.getSize())!=null?s:0}};return a(e),r},e.getStart=()=>{if(e.index>0){let r=e.headerGroup.headers[e.index-1];return r.getStart()+r.getSize()}return 0},e.getResizeHandler=r=>{let a=t.getColumn(e.column.id),n=a?.getCanResize();return s=>{if(!a||!n||(s.persist==null||s.persist(),SF(s)&&s.touches&&s.touches.length>1))return;let i=e.getSize(),o=e?e.getLeafHeaders().map(g=>[g.column.id,g.column.getSize()]):[[a.id,a.getSize()]],l=SF(s)?Math.round(s.touches[0].clientX):s.clientX,c={},u=(g,y)=>{typeof y=="number"&&(t.setColumnSizingInfo(b=>{var S,w;let P=t.options.columnResizeDirection==="rtl"?-1:1,C=(y-((S=b?.startOffset)!=null?S:0))*P,I=Math.max(C/((w=b?.startSize)!=null?w:0),-.999999);return b.columnSizingStart.forEach(R=>{let[O,D]=R;c[O]=Math.round(Math.max(D+D*I,0)*100)/100}),{...b,deltaOffset:C,deltaPercentage:I}}),(t.options.columnResizeMode==="onChange"||g==="end")&&t.setColumnSizing(b=>({...b,...c})))},d=g=>u("move",g),f=g=>{u("end",g),t.setColumnSizingInfo(y=>({...y,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=FXe(r),m={moveHandler:g=>d(g.clientX),upHandler:g=>{p?.removeEventListener("mousemove",m.moveHandler),p?.removeEventListener("mouseup",m.upHandler),f(g.clientX)}},h={moveHandler:g=>(g.cancelable&&(g.preventDefault(),g.stopPropagation()),d(g.touches[0].clientX),!1),upHandler:g=>{var y;p?.removeEventListener("touchmove",h.moveHandler),p?.removeEventListener("touchend",h.upHandler),g.cancelable&&(g.preventDefault(),g.stopPropagation()),f((y=g.touches[0])==null?void 0:y.clientX)}},x=UXe()?{passive:!1}:!1;SF(s)?(p?.addEventListener("touchmove",h.moveHandler,x),p?.addEventListener("touchend",h.upHandler,x)):(p?.addEventListener("mousemove",m.moveHandler,x),p?.addEventListener("mouseup",m.upHandler,x)),t.setColumnSizingInfo(g=>({...g,startOffset:l,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:o,isResizingColumn:a.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var r;e.setColumnSizing(t?{}:(r=e.initialState.columnSizing)!=null?r:{})},e.resetHeaderSizeInfo=t=>{var r;e.setColumnSizingInfo(t?vF():(r=e.initialState.columnSizingInfo)!=null?r:vF())},e.getTotalSize=()=>{var t,r;return(t=(r=e.getHeaderGroups()[0])==null?void 0:r.headers.reduce((a,n)=>a+n.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,r;return(t=(r=e.getLeftHeaderGroups()[0])==null?void 0:r.headers.reduce((a,n)=>a+n.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,r;return(t=(r=e.getCenterHeaderGroups()[0])==null?void 0:r.headers.reduce((a,n)=>a+n.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,r;return(t=(r=e.getRightHeaderGroups()[0])==null?void 0:r.headers.reduce((a,n)=>a+n.getSize(),0))!=null?t:0}}},HA=null;function UXe(){if(typeof HA=="boolean")return HA;let e=!1;try{let t={get passive(){return e=!0,!1}},r=()=>{};window.addEventListener("test",r,t),window.removeEventListener("test",r)}catch{e=!1}return HA=e,HA}function SF(e){return e.type==="touchstart"}var jXe={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Ho("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=r=>{e.getCanHide()&&t.setColumnVisibility(a=>({...a,[e.id]:r??!e.getIsVisible()}))},e.getIsVisible=()=>{var r,a;let n=e.columns;return(r=n.length?n.some(s=>s.getIsVisible()):(a=t.getState().columnVisibility)==null?void 0:a[e.id])!=null?r:!0},e.getCanHide=()=>{var r,a;return((r=e.columnDef.enableHiding)!=null?r:!0)&&((a=t.options.enableHiding)!=null?a:!0)},e.getToggleVisibilityHandler=()=>r=>{e.toggleVisibility==null||e.toggleVisibility(r.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=Yt(()=>[e.getAllCells(),t.getState().columnVisibility],r=>r.filter(a=>a.column.getIsVisible()),Jt(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=Yt(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(r,a,n)=>[...r,...a,...n],Jt(t.options,"debugRows","getVisibleCells"))},createTable:e=>{let t=(r,a)=>Yt(()=>[a(),a().filter(n=>n.getIsVisible()).map(n=>n.id).join("_")],n=>n.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),Jt(e.options,"debugColumns",r));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=r=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(r),e.resetColumnVisibility=r=>{var a;e.setColumnVisibility(r?{}:(a=e.initialState.columnVisibility)!=null?a:{})},e.toggleAllColumnsVisible=r=>{var a;r=(a=r)!=null?a:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((n,s)=>({...n,[s.id]:r||!(s.getCanHide!=null&&s.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(r=>!(r.getIsVisible!=null&&r.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(r=>r.getIsVisible==null?void 0:r.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>r=>{var a;e.toggleAllColumnsVisible((a=r.target)==null?void 0:a.checked)}}};function LT(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}var zXe={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},VXe={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Ho("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var r;let a=(r=e.getCoreRowModel().flatRows[0])==null||(r=r._getAllCellsByColumnId()[t.id])==null?void 0:r.getValue();return typeof a=="string"||typeof a=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var r,a,n,s;return((r=e.columnDef.enableGlobalFilter)!=null?r:!0)&&((a=t.options.enableGlobalFilter)!=null?a:!0)&&((n=t.options.enableFilters)!=null?n:!0)&&((s=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?s:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Od.includesString,e.getGlobalFilterFn=()=>{var t,r;let{globalFilterFn:a}=e.options;return $A(a)?a:a==="auto"?e.getGlobalAutoFilterFn():(t=(r=e.options.filterFns)==null?void 0:r[a])!=null?t:Od[a]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},qXe={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Ho("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,r=!1;e._autoResetExpanded=()=>{var a,n;if(!t){e._queue(()=>{t=!0});return}if((a=(n=e.options.autoResetAll)!=null?n:e.options.autoResetExpanded)!=null?a:!e.options.manualExpanding){if(r)return;r=!0,e._queue(()=>{e.resetExpanded(),r=!1})}},e.setExpanded=a=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(a),e.toggleAllRowsExpanded=a=>{a??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=a=>{var n,s;e.setExpanded(a?{}:(n=(s=e.initialState)==null?void 0:s.expanded)!=null?n:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(a=>a.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>a=>{a.persist==null||a.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{let a=e.getState().expanded;return a===!0||Object.values(a).some(Boolean)},e.getIsAllRowsExpanded=()=>{let a=e.getState().expanded;return typeof a=="boolean"?a===!0:!(!Object.keys(a).length||e.getRowModel().flatRows.some(n=>!n.getIsExpanded()))},e.getExpandedDepth=()=>{let a=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(s=>{let i=s.split(".");a=Math.max(a,i.length)}),a},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=r=>{t.setExpanded(a=>{var n;let s=a===!0?!0:!!(a!=null&&a[e.id]),i={};if(a===!0?Object.keys(t.getRowModel().rowsById).forEach(o=>{i[o]=!0}):i=a,r=(n=r)!=null?n:!s,!s&&r)return{...i,[e.id]:!0};if(s&&!r){let{[e.id]:o,...l}=i;return l}return a})},e.getIsExpanded=()=>{var r;let a=t.getState().expanded;return!!((r=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?r:a===!0||a?.[e.id])},e.getCanExpand=()=>{var r,a,n;return(r=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?r:((a=t.options.enableExpanding)!=null?a:!0)&&!!((n=e.subRows)!=null&&n.length)},e.getIsAllParentsExpanded=()=>{let r=!0,a=e;for(;r&&a.parentId;)a=t.getRow(a.parentId,!0),r=a.getIsExpanded();return r},e.getToggleExpandedHandler=()=>{let r=e.getCanExpand();return()=>{r&&e.toggleExpanded()}}}},EF=0,PF=10,TF=()=>({pageIndex:EF,pageSize:PF}),HXe={getInitialState:e=>({...e,pagination:{...TF(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Ho("pagination",e)}),createTable:e=>{let t=!1,r=!1;e._autoResetPageIndex=()=>{var a,n;if(!t){e._queue(()=>{t=!0});return}if((a=(n=e.options.autoResetAll)!=null?n:e.options.autoResetPageIndex)!=null?a:!e.options.manualPagination){if(r)return;r=!0,e._queue(()=>{e.resetPageIndex(),r=!1})}},e.setPagination=a=>{let n=s=>Bp(a,s);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(n)},e.resetPagination=a=>{var n;e.setPagination(a?TF():(n=e.initialState.pagination)!=null?n:TF())},e.setPageIndex=a=>{e.setPagination(n=>{let s=Bp(a,n.pageIndex),i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return s=Math.max(0,Math.min(s,i)),{...n,pageIndex:s}})},e.resetPageIndex=a=>{var n,s;e.setPageIndex(a?EF:(n=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?n:EF)},e.resetPageSize=a=>{var n,s;e.setPageSize(a?PF:(n=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?n:PF)},e.setPageSize=a=>{e.setPagination(n=>{let s=Math.max(1,Bp(a,n.pageSize)),i=n.pageSize*n.pageIndex,o=Math.floor(i/s);return{...n,pageIndex:o,pageSize:s}})},e.setPageCount=a=>e.setPagination(n=>{var s;let i=Bp(a,(s=e.options.pageCount)!=null?s:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...n,pageCount:i}}),e.getPageOptions=Yt(()=>[e.getPageCount()],a=>{let n=[];return a&&a>0&&(n=[...new Array(a)].fill(null).map((s,i)=>i)),n},Jt(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{let{pageIndex:a}=e.getState().pagination,n=e.getPageCount();return n===-1?!0:n===0?!1:a<n-1},e.previousPage=()=>e.setPageIndex(a=>a-1),e.nextPage=()=>e.setPageIndex(a=>a+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var a;return(a=e.options.pageCount)!=null?a:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var a;return(a=e.options.rowCount)!=null?a:e.getPrePaginationRowModel().rows.length}}},wF=()=>({top:[],bottom:[]}),$Xe={getInitialState:e=>({rowPinning:wF(),...e}),getDefaultOptions:e=>({onRowPinningChange:Ho("rowPinning",e)}),createRow:(e,t)=>{e.pin=(r,a,n)=>{let s=a?e.getLeafRows().map(l=>{let{id:c}=l;return c}):[],i=n?e.getParentRows().map(l=>{let{id:c}=l;return c}):[],o=new Set([...i,e.id,...s]);t.setRowPinning(l=>{var c,u;if(r==="bottom"){var d,f;return{top:((d=l?.top)!=null?d:[]).filter(h=>!(o!=null&&o.has(h))),bottom:[...((f=l?.bottom)!=null?f:[]).filter(h=>!(o!=null&&o.has(h))),...Array.from(o)]}}if(r==="top"){var p,m;return{top:[...((p=l?.top)!=null?p:[]).filter(h=>!(o!=null&&o.has(h))),...Array.from(o)],bottom:((m=l?.bottom)!=null?m:[]).filter(h=>!(o!=null&&o.has(h)))}}return{top:((c=l?.top)!=null?c:[]).filter(h=>!(o!=null&&o.has(h))),bottom:((u=l?.bottom)!=null?u:[]).filter(h=>!(o!=null&&o.has(h)))}})},e.getCanPin=()=>{var r;let{enableRowPinning:a,enablePinning:n}=t.options;return typeof a=="function"?a(e):(r=a??n)!=null?r:!0},e.getIsPinned=()=>{let r=[e.id],{top:a,bottom:n}=t.getState().rowPinning,s=r.some(o=>a?.includes(o)),i=r.some(o=>n?.includes(o));return s?"top":i?"bottom":!1},e.getPinnedIndex=()=>{var r,a;let n=e.getIsPinned();if(!n)return-1;let s=(r=n==="top"?t.getTopRows():t.getBottomRows())==null?void 0:r.map(i=>{let{id:o}=i;return o});return(a=s?.indexOf(e.id))!=null?a:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var r,a;return e.setRowPinning(t?wF():(r=(a=e.initialState)==null?void 0:a.rowPinning)!=null?r:wF())},e.getIsSomeRowsPinned=t=>{var r;let a=e.getState().rowPinning;if(!t){var n,s;return Boolean(((n=a.top)==null?void 0:n.length)||((s=a.bottom)==null?void 0:s.length))}return Boolean((r=a[t])==null?void 0:r.length)},e._getPinnedRows=(t,r,a)=>{var n;return((n=e.options.keepPinnedRows)==null||n?(r??[]).map(i=>{let o=e.getRow(i,!0);return o.getIsAllParentsExpanded()?o:null}):(r??[]).map(i=>t.find(o=>o.id===i))).filter(Boolean).map(i=>({...i,position:a}))},e.getTopRows=Yt(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,r)=>e._getPinnedRows(t,r,"top"),Jt(e.options,"debugRows","getTopRows")),e.getBottomRows=Yt(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,r)=>e._getPinnedRows(t,r,"bottom"),Jt(e.options,"debugRows","getBottomRows")),e.getCenterRows=Yt(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,r,a)=>{let n=new Set([...r??[],...a??[]]);return t.filter(s=>!n.has(s.id))},Jt(e.options,"debugRows","getCenterRows"))}},GXe={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Ho("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var r;return e.setRowSelection(t?{}:(r=e.initialState.rowSelection)!=null?r:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(r=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();let a={...r},n=e.getPreGroupedRowModel().flatRows;return t?n.forEach(s=>{s.getCanSelect()&&(a[s.id]=!0)}):n.forEach(s=>{delete a[s.id]}),a})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(r=>{let a=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),n={...r};return e.getRowModel().rows.forEach(s=>{AF(n,s.id,a,!0,e)}),n}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Yt(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,r)=>Object.keys(t).length?CF(e,r):{rows:[],flatRows:[],rowsById:{}},Jt(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=Yt(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,r)=>Object.keys(t).length?CF(e,r):{rows:[],flatRows:[],rowsById:{}},Jt(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=Yt(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,r)=>Object.keys(t).length?CF(e,r):{rows:[],flatRows:[],rowsById:{}},Jt(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{let t=e.getFilteredRowModel().flatRows,{rowSelection:r}=e.getState(),a=Boolean(t.length&&Object.keys(r).length);return a&&t.some(n=>n.getCanSelect()&&!r[n.id])&&(a=!1),a},e.getIsAllPageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows.filter(n=>n.getCanSelect()),{rowSelection:r}=e.getState(),a=!!t.length;return a&&t.some(n=>!r[n.id])&&(a=!1),a},e.getIsSomeRowsSelected=()=>{var t;let r=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return r>0&&r<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(r=>r.getCanSelect()).some(r=>r.getIsSelected()||r.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(r,a)=>{let n=e.getIsSelected();t.setRowSelection(s=>{var i;if(r=typeof r<"u"?r:!n,e.getCanSelect()&&n===r)return s;let o={...s};return AF(o,e.id,r,(i=a?.selectChildren)!=null?i:!0,t),o})},e.getIsSelected=()=>{let{rowSelection:r}=t.getState();return RF(e,r)},e.getIsSomeSelected=()=>{let{rowSelection:r}=t.getState();return IF(e,r)==="some"},e.getIsAllSubRowsSelected=()=>{let{rowSelection:r}=t.getState();return IF(e,r)==="all"},e.getCanSelect=()=>{var r;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(r=t.options.enableRowSelection)!=null?r:!0},e.getCanSelectSubRows=()=>{var r;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(r=t.options.enableSubRowSelection)!=null?r:!0},e.getCanMultiSelect=()=>{var r;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(r=t.options.enableMultiRowSelection)!=null?r:!0},e.getToggleSelectedHandler=()=>{let r=e.getCanSelect();return a=>{var n;r&&e.toggleSelected((n=a.target)==null?void 0:n.checked)}}}},AF=(e,t,r,a,n)=>{var s;let i=n.getRow(t,!0);r?(i.getCanMultiSelect()||Object.keys(e).forEach(o=>delete e[o]),i.getCanSelect()&&(e[t]=!0)):delete e[t],a&&(s=i.subRows)!=null&&s.length&&i.getCanSelectSubRows()&&i.subRows.forEach(o=>AF(e,o.id,r,a,n))};function CF(e,t){let r=e.getState().rowSelection,a=[],n={},s=function(i,o){return i.map(l=>{var c;let u=RF(l,r);if(u&&(a.push(l),n[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:s(l.subRows)}),u)return l}).filter(Boolean)};return{rows:s(t.rows),flatRows:a,rowsById:n}}function RF(e,t){var r;return(r=t[e.id])!=null?r:!1}function IF(e,t,r){var a;if(!((a=e.subRows)!=null&&a.length))return!1;let n=!0,s=!1;return e.subRows.forEach(i=>{if(!(s&&!n)&&(i.getCanSelect()&&(RF(i,t)?s=!0:n=!1),i.subRows&&i.subRows.length)){let o=IF(i,t);o==="all"?s=!0:(o==="some"&&(s=!0),n=!1)}}),n?"all":s?"some":!1}var NF=/([0-9]+)/gm,KXe=(e,t,r)=>Wae(Up(e.getValue(r)).toLowerCase(),Up(t.getValue(r)).toLowerCase()),WXe=(e,t,r)=>Wae(Up(e.getValue(r)),Up(t.getValue(r))),XXe=(e,t,r)=>kF(Up(e.getValue(r)).toLowerCase(),Up(t.getValue(r)).toLowerCase()),YXe=(e,t,r)=>kF(Up(e.getValue(r)),Up(t.getValue(r))),JXe=(e,t,r)=>{let a=e.getValue(r),n=t.getValue(r);return a>n?1:a<n?-1:0},QXe=(e,t,r)=>kF(e.getValue(r),t.getValue(r));function kF(e,t){return e===t?0:e>t?1:-1}function Up(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Wae(e,t){let r=e.split(NF).filter(Boolean),a=t.split(NF).filter(Boolean);for(;r.length&&a.length;){let n=r.shift(),s=a.shift(),i=parseInt(n,10),o=parseInt(s,10),l=[i,o].sort();if(isNaN(l[0])){if(n>s)return 1;if(s>n)return-1;continue}if(isNaN(l[1]))return isNaN(i)?-1:1;if(i>o)return 1;if(o>i)return-1}return r.length-a.length}var NT={alphanumeric:KXe,alphanumericCaseSensitive:WXe,text:XXe,textCaseSensitive:YXe,datetime:JXe,basic:QXe},ZXe={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Ho("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{let r=t.getFilteredRowModel().flatRows.slice(10),a=!1;for(let n of r){let s=n?.getValue(e.id);if(Object.prototype.toString.call(s)==="[object Date]")return NT.datetime;if(typeof s=="string"&&(a=!0,s.split(NF).length>1))return NT.alphanumeric}return a?NT.text:NT.basic},e.getAutoSortDir=()=>{let r=t.getFilteredRowModel().flatRows[0];return typeof r?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var r,a;if(!e)throw new Error;return $A(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(r=(a=t.options.sortingFns)==null?void 0:a[e.columnDef.sortingFn])!=null?r:NT[e.columnDef.sortingFn]},e.toggleSorting=(r,a)=>{let n=e.getNextSortingOrder(),s=typeof r<"u"&&r!==null;t.setSorting(i=>{let o=i?.find(p=>p.id===e.id),l=i?.findIndex(p=>p.id===e.id),c=[],u,d=s?r:n==="desc";if(i!=null&&i.length&&e.getCanMultiSort()&&a?o?u="toggle":u="add":i!=null&&i.length&&l!==i.length-1?u="replace":o?u="toggle":u="replace",u==="toggle"&&(s||n||(u="remove")),u==="add"){var f;c=[...i,{id:e.id,desc:d}],c.splice(0,c.length-((f=t.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=i.map(p=>p.id===e.id?{...p,desc:d}:p):u==="remove"?c=i.filter(p=>p.id!==e.id):c=[{id:e.id,desc:d}];return c})},e.getFirstSortDir=()=>{var r,a;return((r=(a=e.columnDef.sortDescFirst)!=null?a:t.options.sortDescFirst)!=null?r:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=r=>{var a,n;let s=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==s&&((a=t.options.enableSortingRemoval)==null||a)&&(!(r&&(n=t.options.enableMultiRemove)!=null)||n)?!1:i==="desc"?"asc":"desc":s},e.getCanSort=()=>{var r,a;return((r=e.columnDef.enableSorting)!=null?r:!0)&&((a=t.options.enableSorting)!=null?a:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var r,a;return(r=(a=e.columnDef.enableMultiSort)!=null?a:t.options.enableMultiSort)!=null?r:!!e.accessorFn},e.getIsSorted=()=>{var r;let a=(r=t.getState().sorting)==null?void 0:r.find(n=>n.id===e.id);return a?a.desc?"desc":"asc":!1},e.getSortIndex=()=>{var r,a;return(r=(a=t.getState().sorting)==null?void 0:a.findIndex(n=>n.id===e.id))!=null?r:-1},e.clearSorting=()=>{t.setSorting(r=>r!=null&&r.length?r.filter(a=>a.id!==e.id):[])},e.getToggleSortingHandler=()=>{let r=e.getCanSort();return a=>{r&&(a.persist==null||a.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(a):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var r,a;e.setSorting(t?[]:(r=(a=e.initialState)==null?void 0:a.sorting)!=null?r:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},eYe=[vXe,jXe,_Xe,OXe,TXe,wXe,zXe,VXe,ZXe,MXe,qXe,HXe,$Xe,GXe,BXe];function Xae(e){var t,r;let a=[...eYe,...(t=e._features)!=null?t:[]],n={_features:a},s=n._features.reduce((f,p)=>Object.assign(f,p.getDefaultOptions==null?void 0:p.getDefaultOptions(n)),{}),i=f=>n.options.mergeOptions?n.options.mergeOptions(s,f):{...s,...f},l={...{},...(r=e.initialState)!=null?r:{}};n._features.forEach(f=>{var p;l=(p=f.getInitialState==null?void 0:f.getInitialState(l))!=null?p:l});let c=[],u=!1,d={_features:a,options:{...s,...e},initialState:l,_queue:f=>{c.push(f),u||(u=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();u=!1}).catch(p=>setTimeout(()=>{throw p})))},reset:()=>{n.setState(n.initialState)},setOptions:f=>{let p=Bp(f,n.options);n.options=i(p)},getState:()=>n.options.state,setState:f=>{n.options.onStateChange==null||n.options.onStateChange(f)},_getRowId:(f,p,m)=>{var h;return(h=n.options.getRowId==null?void 0:n.options.getRowId(f,p,m))!=null?h:`${m?[m.id,p].join("."):p}`},getCoreRowModel:()=>(n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(f,p)=>{let m=(p?n.getPrePaginationRowModel():n.getRowModel()).rowsById[f];if(!m&&(m=n.getCoreRowModel().rowsById[f],!m))throw new Error;return m},_getDefaultColumnDef:Yt(()=>[n.options.defaultColumn],f=>{var p;return f=(p=f)!=null?p:{},{header:m=>{let h=m.header.column.columnDef;return h.accessorKey?h.accessorKey:h.accessorFn?h.id:null},cell:m=>{var h,x;return(h=(x=m.renderValue())==null||x.toString==null?void 0:x.toString())!=null?h:null},...n._features.reduce((m,h)=>Object.assign(m,h.getDefaultColumnDef==null?void 0:h.getDefaultColumnDef()),{}),...f}},Jt(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>n.options.columns,getAllColumns:Yt(()=>[n._getColumnDefs()],f=>{let p=function(m,h,x){return x===void 0&&(x=0),m.map(g=>{let y=bXe(n,g,x,h),b=g;return y.columns=b.columns?p(b.columns,y,x+1):[],y})};return p(f)},Jt(e,"debugColumns","getAllColumns")),getAllFlatColumns:Yt(()=>[n.getAllColumns()],f=>f.flatMap(p=>p.getFlatColumns()),Jt(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:Yt(()=>[n.getAllFlatColumns()],f=>f.reduce((p,m)=>(p[m.id]=m,p),{}),Jt(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:Yt(()=>[n.getAllColumns(),n._getOrderColumnsFn()],(f,p)=>{let m=f.flatMap(h=>h.getLeafColumns());return p(m)},Jt(e,"debugColumns","getAllLeafColumns")),getColumn:f=>n._getAllFlatColumnsById()[f]};Object.assign(n,d);for(let f=0;f<n._features.length;f++){let p=n._features[f];p==null||p.createTable==null||p.createTable(n)}return n}function Eb(){return e=>Yt(()=>[e.options.data],t=>{let r={rows:[],flatRows:[],rowsById:{}},a=function(n,s,i){s===void 0&&(s=0);let o=[];for(let c=0;c<n.length;c++){let u=SXe(e,e._getRowId(n[c],c,i),n[c],c,s,void 0,i?.id);if(r.flatRows.push(u),r.rowsById[u.id]=u,o.push(u),e.options.getSubRows){var l;u.originalSubRows=e.options.getSubRows(n[c],c),(l=u.originalSubRows)!=null&&l.length&&(u.subRows=a(u.originalSubRows,s+1,u))}}return o};return r.rows=a(t),r},Jt(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function Fd(e,t){return e?tYe(e)?RT.createElement(e,t):e:null}function tYe(e){return rYe(e)||typeof e=="function"||aYe(e)}function rYe(e){return typeof e=="function"&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function aYe(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Pb(e){let t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[r]=RT.useState(()=>({current:Xae(t)})),[a,n]=RT.useState(()=>r.current.initialState);return r.current.setOptions(s=>({...s,...e,state:{...a,...e.state},onStateChange:i=>{n(i),e.onStateChange==null||e.onStateChange(i)}})),r.current}qt();er();var Bd=N(ce()),Yae=()=>{let{t:e}=ze();return(0,Bd.jsx)("div",{className:"flex h-full w-full items-center justify-center p-10 bg-muted/10",children:(0,Bd.jsxs)(qE,{children:[(0,Bd.jsx)(HE,{children:(0,Bd.jsx)($E,{variant:"icon",children:(0,Bd.jsx)(qm,{})})}),(0,Bd.jsx)(GE,{children:e("Editor.Table.EmptyStateAst")}),(0,Bd.jsx)(KE,{children:e("Editor.Table.EmptyState")})]})})};var Fr=N(ce()),Jae=new Map,Qae=e=>{let t=Jae.get(e);if(t)return t;let r=0;for(let s=0;s<e.length;s++)r=e.charCodeAt(s)+((r<<5)-r);let n={"--item-hue":Math.abs(r)%360};return Jae.set(e,n),n},nYe=hs.default.memo(({id:e,source:t,target:r,updateItem:a,onEditingIdChange:n})=>{let s=(0,hs.useCallback)(o=>{let l=o.currentTarget.textContent||"";l!==r&&a(e,l),n(null)},[e,r,a,n]),i=(0,hs.useCallback)(()=>{n(e)},[e,n]);return(0,Fr.jsx)("div",{contentEditable:!0,suppressContentEditableWarning:!0,onFocus:i,onBlur:s,className:"min-h-[32px] w-full text-sm leading-relaxed focus:outline-none focus:ring-1 focus:ring-primary p-1 rounded break-all whitespace-pre-wrap",children:r},`cell-${e}-${t.slice(0,10)}`)},(e,t)=>e.id===t.id&&e.target===t.target&&e.source===t.source),sYe={error:"bg-destructive/8 border-l-2 border-l-destructive",unused:"bg-orange-500/8 border-l-2 border-l-orange-500",security:"bg-purple-500/8 border-l-2 border-l-purple-500"},Zae=hs.default.forwardRef(({row:e,isSelected:t,onRowClick:r,getCellClass:a,dataIndex:n,errorType:s},i)=>{let o=(0,hs.useCallback)(()=>{r(e.original.id)},[e.original.id,r]),l=s&&sYe[s]||"";return(0,Fr.jsx)(su,{ref:i,"data-index":n,id:`ast-row-${e.original.id}`,"data-state":t?"selected":void 0,className:`cursor-pointer hover:bg-accent/50 ${t?"bg-accent":""} ${l}`,onClick:o,children:e.getVisibleCells().map(c=>(0,Fr.jsx)(Th,{className:a(c.column.id),children:Fd(c.column.columnDef.cell,c.getContext())},c.id))})});Zae.displayName="MemoizedAstRow";var iYe=hs.default.memo(Zae,(e,t)=>e.isSelected===t.isSelected&&e.row.original===t.row.original&&e.errorType===t.errorType),MF=hs.default.forwardRef(({data:e,editingId:t,onRowClick:r,onDelete:a,onReset:n},s)=>{let{t:i}=ze(),o=at.use.updateAstItem(),l=(0,hs.useRef)(null),[c,u]=(0,hs.useState)(new Map);(0,hs.useEffect)(()=>{let S=w=>{let P=new Map;for(let C of w.detail.errors)C.type==="ast"&&(C.severity==="critical"||C.severity==="warning"?P.set(C.id,"security"):C.isUnused?P.set(C.id,"unused"):P.set(C.id,"error"));u(P)};return window.addEventListener("i18n-diagnose-errors",S),()=>window.removeEventListener("i18n-diagnose-errors",S)},[]);let d=(0,hs.useMemo)(()=>[{accessorKey:"type",header:({column:S})=>(0,Fr.jsx)("div",{className:"text-center",children:i("Editor.Table.ColumnType")}),cell:({row:S})=>(0,Fr.jsx)("div",{className:"flex justify-center",children:(0,Fr.jsx)("span",{className:"px-2 py-0.5 rounded-md text-xs whitespace-nowrap bg-[hsl(var(--item-hue),85%,96%)] text-[hsl(var(--item-hue),80%,35%)] dark:bg-[hsl(var(--item-hue),60%,20%)] dark:text-[hsl(var(--item-hue),80%,80%)]",style:Qae(S.original.type),children:S.original.type})})},{accessorKey:"name",header:({column:S})=>(0,Fr.jsx)("div",{className:"text-center",children:i("Editor.Table.ColumnName")}),cell:({row:S})=>(0,Fr.jsx)("div",{className:"flex justify-center",children:(0,Fr.jsx)("span",{className:"truncate max-w-[120px] font-mono text-xs px-1.5 py-0.5 rounded text-center bg-[hsl(var(--item-hue),85%,96%)] text-[hsl(var(--item-hue),80%,35%)] dark:bg-[hsl(var(--item-hue),60%,20%)] dark:text-[hsl(var(--item-hue),80%,80%)]",style:Qae(S.original.name),title:S.original.name,children:S.original.name})})},{accessorKey:"source",header:({column:S})=>(0,Fr.jsx)("div",{className:"text-center",children:i("Editor.Table.ColumnSource")}),cell:({row:S})=>(0,Fr.jsx)("div",{className:"whitespace-pre-wrap break-all text-sm px-1 py-1",children:S.original.source})},{accessorKey:"target",header:({column:S})=>(0,Fr.jsx)("div",{className:"text-center",children:i("Editor.Table.ColumnTarget")}),cell:({row:S})=>(0,Fr.jsx)(nYe,{id:S.original.id,source:S.original.source,target:S.original.target,updateItem:o,onEditingIdChange:r})},{id:"actions",header:({column:S})=>(0,Fr.jsx)("div",{className:"text-center",children:i("Editor.Table.ColumnActions")}),cell:({row:S})=>{let w=S.original.target&&S.original.target!==S.original.source;return(0,Fr.jsxs)("div",{className:"flex items-center justify-center gap-1",children:[(0,Fr.jsx)(Te,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-primary",onClick:P=>{P.stopPropagation(),n(S.original.id)},title:i("Editor.Actions.Restore"),disabled:!w,children:(0,Fr.jsx)(zs,{className:"h-3 w-3"})}),(0,Fr.jsx)(Te,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-destructive",onClick:P=>{P.stopPropagation(),a(S.original.id)},title:i("Common.Actions.Delete"),children:(0,Fr.jsx)(Ha,{className:"h-3 w-3"})})]})}}],[a,n,o,r]),f=Pb({data:e,columns:d,getCoreRowModel:Eb(),getRowId:S=>String(S.id)}),{rows:p}=f.getRowModel(),m=ni({count:p.length,getScrollElement:()=>l.current,estimateSize:()=>50,overscan:10});hs.default.useEffect(()=>{if(t!==null){let S=p.findIndex(w=>w.original.id===t);S!==-1&&m.scrollToIndex(S,{align:"auto"})}},[t]);let h=(0,hs.useCallback)(S=>S==="type"||S==="name"||S==="actions"?"w-[1%] whitespace-nowrap p-2":"w-[38%] p-2",[]);if(!e||e.length===0)return(0,Fr.jsx)("div",{ref:s,className:"rounded-md border h-full overflow-hidden flex flex-col",children:(0,Fr.jsx)(Yae,{})});let x=m.getVirtualItems(),g=m.getTotalSize(),y=x.length>0?x[0].start:0,b=x.length>0?g-x[x.length-1].end:0;return(0,Fr.jsx)("div",{ref:s,className:"rounded-md border h-full overflow-hidden flex flex-col",children:(0,Fr.jsx)("div",{ref:l,className:"flex-1 h-full overflow-auto",style:{willChange:"transform"},children:(0,Fr.jsxs)("table",{className:"w-full caption-bottom text-sm",children:[(0,Fr.jsx)(bh,{children:f.getHeaderGroups().map(S=>(0,Fr.jsx)(su,{children:S.headers.map(w=>(0,Fr.jsx)(Sh,{className:`${h(w.id)} sticky top-0 bg-background z-20 shadow-sm`,children:w.isPlaceholder?null:Fd(w.column.columnDef.header,w.getContext())},w.id))},S.id))}),(0,Fr.jsxs)(vh,{children:[y>0&&(0,Fr.jsx)("tr",{children:(0,Fr.jsx)("td",{colSpan:d.length,style:{height:y,padding:0,border:"none"}})}),x.map(S=>{let w=p[S.index];return(0,Fr.jsx)(iYe,{ref:m.measureElement,dataIndex:S.index,row:w,isSelected:w.original.id===t,onRowClick:r,getCellClass:h,errorType:c.get(w.original.id)||null},w.id)}),b>0&&(0,Fr.jsx)("tr",{children:(0,Fr.jsx)("td",{colSpan:d.length,style:{height:b,padding:0,border:"none"}})})]})]})})})});MF.displayName="ASTTable";var Ns=N(Le());qt();er();var Is=N(ce()),ene=()=>{let{t:e}=ze(),t=at.use.searchQuery(),r=at.use.setSearchQuery(),[a,n]=(0,Ns.useState)("all"),s=(0,Ns.useDeferredValue)(t),i=(0,Ns.useDeferredValue)(a),o=at.use.astItems(),l=at.use.updateAstItem(),c=at.use.deleteAstItem(),u=at.use.resetAstItem(),[d,f]=(0,Ns.useState)(null),p=Ns.default.useRef(o);Ns.default.useEffect(()=>{p.current=o},[o]);let m=at.use.currentFile();Ns.default.useEffect(()=>{f(null)},[m]),Ns.default.useEffect(()=>{let b=S=>{if(S.detail.type==="ast"){let w=p.current.find(P=>P.id===S.detail.id);w&&w.source&&(n("all"),r(w.source)),f(S.detail.id)}};return window.addEventListener("i18n-jump-error",b),()=>window.removeEventListener("i18n-jump-error",b)},[r]);let h=(0,Ns.useMemo)(()=>{let b=o;if(i==="translated"?b=b.filter(S=>S.target&&S.target!==S.source&&S.target.trim()!==""):i==="untranslated"&&(b=b.filter(S=>!S.target||S.target===S.source||S.target.trim()==="")),s.trim()){let S=s.toLowerCase();b=b.filter(w=>w.source&&w.source.toLowerCase().includes(S)||w.target&&w.target.toLowerCase().includes(S)||w.name&&w.name.toLowerCase().includes(S)||w.type&&w.type.toLowerCase().includes(S))}return b},[o,s,i]);Ns.default.useEffect(()=>{if(d!==null){let b=o.find(S=>S.id===d);b&&window.dispatchEvent(new CustomEvent("i18n-item-selected",{detail:{source:b.source,type:"ast",name:b.name,astType:b.type}}))}else window.dispatchEvent(new CustomEvent("i18n-item-deselected"))},[d,o]);let x=(0,Ns.useCallback)(b=>{f(b)},[]),g=(0,Ns.useCallback)(b=>{r(b.target.value)},[]),y=(0,Ns.useCallback)(b=>{n(b)},[]);return(0,Is.jsx)("div",{className:"flex h-full flex-col",children:(0,Is.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[(0,Is.jsx)("div",{className:"mb-2 flex items-center justify-between",children:(0,Is.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Is.jsxs)("div",{className:"relative",children:[(0,Is.jsx)(ra,{className:"absolute left-2 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),(0,Is.jsx)(Qe,{className:"h-8 w-64 pl-8",placeholder:e("Common.Placeholders.Search"),value:t,onChange:g})]}),(0,Is.jsxs)(lr,{value:a,onValueChange:y,children:[(0,Is.jsx)(ur,{size:"sm",className:"w-[100px]",children:(0,Is.jsx)(cr,{placeholder:e("Common.Labels.Filter")})}),(0,Is.jsxs)(dr,{children:[(0,Is.jsx)(Rt,{value:"all",children:e("Common.Filters.All")}),(0,Is.jsx)(Rt,{value:"translated",children:e("Common.Filters.Translated")}),(0,Is.jsx)(Rt,{value:"untranslated",children:e("Common.Filters.Untranslated")})]})]})]})}),(0,Is.jsx)("div",{className:"flex-1 overflow-hidden h-full",children:(0,Is.jsx)(MF,{data:h,editingId:d,onRowClick:x,onDelete:c,onReset:u},m)})]})})};var oYe=N(Le());er();var tne=N(ce());var oi=N(Le());er();qt();er();var Ud=N(ce()),rne=()=>{let{t:e}=ze();return(0,Ud.jsx)("div",{className:"flex h-full w-full items-center justify-center p-10 bg-muted/10",children:(0,Ud.jsxs)(qE,{children:[(0,Ud.jsx)(HE,{children:(0,Ud.jsx)($E,{variant:"icon",children:(0,Ud.jsx)(qm,{})})}),(0,Ud.jsx)(GE,{children:e("Editor.Table.EmptyStateRegex")}),(0,Ud.jsx)(KE,{children:e("Editor.Table.EmptyState")})]})})};qt();var ua=N(ce()),lYe=oi.default.memo(({id:e,source:t,target:r,updateRegexItem:a,onEditingIdChange:n})=>{let s=(0,oi.useCallback)(o=>{let l=o.currentTarget.textContent||"";l!==r&&a(e,{target:l}),n(null)},[e,r,a,n]),i=(0,oi.useCallback)(()=>{n(e)},[e,n]);return(0,ua.jsx)("div",{contentEditable:!0,suppressContentEditableWarning:!0,onFocus:i,onBlur:s,className:"min-h-[32px] w-full text-sm leading-relaxed focus:outline-none focus:ring-1 focus:ring-primary p-1 rounded break-all whitespace-pre-wrap",children:r},`cell-${e}-${t.slice(0,10)}`)},(e,t)=>e.id===t.id&&e.target===t.target&&e.source===t.source),cYe={error:"bg-destructive/8 border-l-2 border-l-destructive",unused:"bg-orange-500/8 border-l-2 border-l-orange-500",security:"bg-purple-500/8 border-l-2 border-l-purple-500"},ane=oi.default.forwardRef(({row:e,isSelected:t,dataIndex:r,errorType:a},n)=>{let s=a&&cYe[a]||"";return(0,ua.jsx)(su,{ref:n,"data-index":r,id:`regex-row-${e.original.id}`,className:`border-b hover:bg-accent/50 ${t?"bg-accent":""} ${s}`,"data-state":t?"selected":void 0,children:e.getVisibleCells().map(i=>(0,ua.jsx)(Th,{className:"px-1 py-1",children:Fd(i.column.columnDef.cell,i.getContext())},i.id))})});ane.displayName="MemoizedRegexRow";var uYe=oi.default.memo(ane,(e,t)=>e.isSelected===t.isSelected&&e.row.original===t.row.original&&e.errorType===t.errorType),DF=oi.default.forwardRef(({data:e,editingId:t,onEditingIdChange:r},a)=>{let{t:n}=ze(),s=at.use.updateRegexItem(),i=at.use.deleteRegexItem(),o=at.use.resetRegexItem(),l=(0,oi.useRef)(null),[c,u]=(0,oi.useState)(new Map);(0,oi.useEffect)(()=>{let b=S=>{let w=new Map;for(let P of S.detail.errors)P.type==="regex"&&(P.severity==="critical"||P.severity==="warning"?w.set(P.id,"security"):P.isUnused?w.set(P.id,"unused"):w.set(P.id,"error"));u(w)};return window.addEventListener("i18n-diagnose-errors",b),()=>window.removeEventListener("i18n-diagnose-errors",b)},[]);let d=(0,oi.useMemo)(()=>[{accessorKey:"source",header:({column:b})=>(0,ua.jsx)("div",{className:"text-center pl-4",children:n("Editor.Table.ColumnSource")}),cell:({row:b})=>(0,ua.jsx)("div",{className:"break-all whitespace-pre-wrap text-sm leading-relaxed px-1 py-1 pl-4 cursor-text select-text",children:b.original.source})},{accessorKey:"target",header:({column:b})=>(0,ua.jsx)("div",{className:"text-center",children:n("Editor.Table.ColumnTarget")}),cell:({row:b})=>(0,ua.jsx)(lYe,{id:b.original.id,source:b.original.source||"",target:b.original.target,updateRegexItem:s,onEditingIdChange:r})},{id:"actions",header:({column:b})=>(0,ua.jsx)("div",{className:"text-center",children:n("Editor.Table.ColumnActions")}),cell:({row:b})=>{let S=b.original.target&&b.original.target!==b.original.source;return(0,ua.jsxs)("div",{className:"flex items-center justify-center gap-1",children:[(0,ua.jsx)(Te,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-primary",onClick:w=>{w.stopPropagation(),o(b.original.id)},title:n("Editor.Actions.Restore"),disabled:b.original.source===b.original.target,children:(0,ua.jsx)(zs,{className:"h-3 w-3"})}),(0,ua.jsx)(Te,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-destructive",onClick:w=>{w.stopPropagation(),i(b.original.id)},title:n("Common.Actions.Delete"),children:(0,ua.jsx)(Ha,{className:"h-3 w-3"})})]})}}],[r,s,o,i]),f=Pb({data:e,columns:d,getCoreRowModel:Eb(),getRowId:b=>String(b.id)}),{rows:p}=f.getRowModel(),m=ni({count:p.length,getScrollElement:()=>l.current,estimateSize:()=>50,overscan:10});if(!e||e.length===0)return(0,ua.jsx)(is,{ref:a,className:"w-full h-full p-0 overflow-hidden flex flex-col border",children:(0,ua.jsx)(rne,{})});let h=m.getVirtualItems(),x=m.getTotalSize(),g=h.length>0?h[0].start:0,y=h.length>0?x-h[h.length-1].end:0;return(0,ua.jsx)(is,{ref:a,className:"w-full h-full p-0 overflow-hidden flex flex-col border",children:(0,ua.jsx)("div",{ref:l,className:"flex-1 h-full overflow-auto",style:{willChange:"transform"},children:(0,ua.jsxs)("table",{className:"w-full caption-bottom text-sm",children:[(0,ua.jsx)(bh,{children:f.getHeaderGroups().map(b=>(0,ua.jsx)(su,{children:b.headers.map(S=>(0,ua.jsx)(Sh,{className:`${S.id==="actions"?"w-[1%] whitespace-nowrap pl-2 pr-4":"w-[45%] px-4"} sticky top-0 bg-background z-20 shadow-sm border-b ring-0`,style:{backgroundColor:"var(--background-primary)"},children:S.isPlaceholder?null:Fd(S.column.columnDef.header,S.getContext())},S.id))},b.id))}),(0,ua.jsxs)(vh,{children:[g>0&&(0,ua.jsx)("tr",{children:(0,ua.jsx)("td",{colSpan:d.length,style:{height:g,padding:0,border:"none"}})}),h.map(b=>{let S=p[b.index];return(0,ua.jsx)(uYe,{ref:m.measureElement,dataIndex:b.index,row:S,isSelected:S.original.id===t,errorType:c.get(S.original.id)||null},S.id)}),y>0&&(0,ua.jsx)("tr",{children:(0,ua.jsx)("td",{colSpan:d.length,style:{height:y,padding:0,border:"none"}})})]})]})})})});DF.displayName="RegexTable";var kT=N(Le());er();var Ol=N(Le());qt();er();var Oi=N(ce()),_F=(0,Ol.memo)(()=>{let{t:e}=ze(),[t,r]=(0,Ol.useState)(""),[a,n]=(0,Ol.useState)(""),[s,i]=(0,Ol.useState)(!0),o=at(p=>p.addRegexItem),l=(0,Ol.useCallback)(p=>{if(!p)return!0;try{return new RegExp(p),!0}catch{return!1}},[]),c=(0,Ol.useCallback)(p=>{let m=p.target.value;r(m),i(l(m))},[l]),u=(0,Ol.useCallback)(p=>{n(p.target.value)},[]),d=(0,Ol.useCallback)(()=>{if(!t||!s)return;o({source:t,target:a||t,id:-1}),r(""),n(""),i(!0)},[t,a,s,o]),f=(0,Ol.useCallback)(p=>{p.ctrlKey&&p.key==="Enter"&&(p.preventDefault(),d())},[d]);return(0,Oi.jsxs)(qr,{title:e("Editor.Regex.AddRule"),icon:nd,className:"flex flex-col gap-3",children:[(0,Oi.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,Oi.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Oi.jsxs)(Vr,{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Oi.jsx)(Ao,{className:"w-3.5 h-3.5"}),e("Editor.Table.ColumnSource")]}),(0,Oi.jsx)(Bo,{id:"regex-source",value:t,onChange:c,onKeyDown:f,placeholder:e("Editor.Regex.InputRegexPlaceholder"),className:`text-xs h-16 resize-y bg-background ${s?"border-input":"border-red-500 focus-visible:ring-red-500"}`}),!s&&(0,Oi.jsx)("span",{className:"text-[10px] text-red-500",children:e("Common.Status.Error")})]}),(0,Oi.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Oi.jsxs)(Vr,{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Oi.jsx)(Wm,{className:"w-3.5 h-3.5"}),e("Editor.Table.ColumnTarget")]}),(0,Oi.jsx)(Bo,{id:"regex-target",value:a,onChange:u,onKeyDown:f,placeholder:t?e("Editor.Regex.DefaultPlaceholder",{source:t}):e("Editor.Regex.InputTargetPlaceholder"),className:"text-xs h-16 resize-y border-input bg-background"})]})]}),(0,Oi.jsxs)(Te,{variant:"secondary",size:"sm",onClick:d,disabled:!t||!s,className:"text-xs h-8 gap-1.5 text-foreground transition-all duration-200 hover:scale-[1.02] active:scale-95 group w-full mt-1 font-medium",children:[(0,Oi.jsx)(nd,{className:"w-3.5 h-3.5"}),e("Editor.Regex.AddRule")]})]})});_F.displayName="RegexInsertCard";qt();er();var Nt=N(ce()),nne=({controller:e})=>{let{t}=ze(),{state:r,actions:a}=e,{language:n,style:s,batchSize:i,overwrite:o,inputError:l,isTranslating:c,progress:u,processedCount:d,totalCount:f,currentBatch:p,totalBatches:m,targetItems:h}=r,{setLanguage:x,setStyle:g,setBatchSize:y,setOverwrite:b,handleBatchSizeBlur:S,handleBatchTranslation:w,handleStop:P}=a;return(0,Nt.jsxs)(qr,{title:t("Editor.Titles.Ai"),icon:ns,className:"flex flex-col gap-4",children:[(0,Nt.jsxs)("div",{className:"grid grid-cols-1 gap-3",children:[(0,Nt.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Nt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Nt.jsx)(Ro,{className:"w-3.5 h-3.5"}),t("Editor.Labels.SelectLang")]}),(0,Nt.jsxs)("div",{className:"flex gap-2",children:[(0,Nt.jsxs)(lr,{value:Yn.some(C=>C.value===n)?n:void 0,onValueChange:x,children:[(0,Nt.jsx)(ur,{size:"sm",className:"w-[110px] text-xs bg-background",children:(0,Nt.jsx)(cr,{placeholder:t("Editor.Labels.SelectLang")})}),(0,Nt.jsx)(dr,{children:Yn.map(C=>(0,Nt.jsx)(Rt,{value:C.value,className:"text-xs",children:C.label},C.value))})]}),(0,Nt.jsx)(Qe,{value:n,onChange:C=>x(C.target.value),placeholder:t("Editor.Labels.CustomLang"),className:"h-8 text-xs bg-background flex-1"})]})]}),(0,Nt.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Nt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Nt.jsx)(Oa,{className:"w-3.5 h-3.5"}),t("Editor.Labels.SelectStyle")]}),(0,Nt.jsxs)("div",{className:"flex gap-2",children:[(0,Nt.jsxs)(lr,{value:Ed.some(C=>C.value===s)?s:void 0,onValueChange:g,children:[(0,Nt.jsx)(ur,{size:"sm",className:"w-[110px] text-xs bg-background",children:(0,Nt.jsx)(cr,{placeholder:t("Editor.Labels.SelectStyle")})}),(0,Nt.jsx)(dr,{children:Ed.map(C=>(0,Nt.jsx)(Rt,{value:C.value,className:"text-xs",children:C.label},C.value))})]}),(0,Nt.jsx)(Qe,{value:s,onChange:C=>g(C.target.value),placeholder:t("Editor.Labels.CustomStyle"),className:"h-8 text-xs bg-background flex-1"})]})]}),(0,Nt.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,Nt.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Nt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Nt.jsx)(sa,{className:"w-3.5 h-3.5"}),t("Editor.Labels.BatchSize")]}),(0,Nt.jsx)(Qe,{type:"number",min:1,value:i,onChange:y,onBlur:S,className:`h-8 text-xs bg-background ${l?"border-red-500 focus-visible:ring-red-500":""}`})]}),(0,Nt.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Nt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Nt.jsx)(Sl,{className:"w-3.5 h-3.5"}),t("Editor.Labels.Concurrency")]}),(0,Nt.jsx)(Qe,{type:"number",min:1,value:r.concurrencyLimit,onChange:a.setConcurrencyLimit,onBlur:a.handleConcurrencyLimitBlur,className:`h-8 text-xs bg-background ${r.concurrencyError?"border-red-500 focus-visible:ring-red-500":""}`})]})]}),(0,Nt.jsxs)("div",{className:"grid grid-cols-2 gap-3 items-end",children:[(0,Nt.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Nt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Nt.jsx)(Ti,{className:"w-3.5 h-3.5"}),t("Editor.Labels.Timeout")]}),(0,Nt.jsx)(Qe,{type:"number",min:100,step:1e3,value:r.timeout,onChange:a.handleTimeoutChange,onBlur:a.handleTimeoutBlur,className:`h-8 text-xs bg-background ${r.timeoutError?"border-red-500 focus-visible:ring-red-500":""}`})]}),(0,Nt.jsxs)("div",{className:"flex items-center space-x-2 h-8",children:[(0,Nt.jsx)(El,{id:"overwrite-mode",checked:o,onCheckedChange:C=>b(C)}),(0,Nt.jsx)("label",{htmlFor:"overwrite-mode",className:"text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-muted-foreground cursor-pointer",children:t("Editor.Labels.Overwrite")})]})]}),!c&&h.length>0&&(0,Nt.jsxs)("div",{className:"flex items-center justify-between p-2 rounded-md bg-muted/30 border border-border/50 animate-in fade-in slide-in-from-top-1 duration-300",children:[(0,Nt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Nt.jsx)(Qu,{className:"w-3.5 h-3.5 text-primary"}),(0,Nt.jsx)("span",{className:"text-[10px] font-medium text-muted-foreground uppercase tracking-wider",children:t("Editor.Labels.ExpectedConsumption")})]}),(0,Nt.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,Nt.jsxs)(mt,{variant:"secondary",className:"text-[10px] px-1.5 py-0 h-4 font-mono",children:[r.estimation.tokens," Tokens"]}),(0,Nt.jsxs)("span",{className:"text-[10px] text-muted-foreground/80",children:["\u2248 \xA5",r.estimation.cost.toFixed(4)]})]})]}),c&&(0,Nt.jsxs)("div",{className:"flex flex-col gap-1.5 animate-in fade-in zoom-in duration-300",children:[(0,Nt.jsxs)("div",{className:"flex justify-between text-xs text-muted-foreground",children:[(0,Nt.jsx)("span",{children:t("Editor.Status.ProcessingBatch",{current:p,total:m})}),(0,Nt.jsxs)("span",{children:[d," / ",f]})]}),(0,Nt.jsx)(ap,{value:u,className:"h-2"})]})]}),(0,Nt.jsx)("div",{className:"grid grid-cols-1 gap-3 pt-2",children:c?(0,Nt.jsxs)(Te,{variant:"destructive",size:"sm",onClick:P,className:"text-xs h-8 gap-1.5 font-medium w-full",children:[(0,Nt.jsx)(Sl,{className:"w-3.5 h-3.5 fill-current"}),t("Common.Actions.StopTranslate")]}):(0,Nt.jsxs)(Te,{variant:"default",size:"sm",onClick:w,disabled:h.length===0||l,className:"text-xs h-8 gap-1.5 font-medium w-full transition-all duration-200 hover:opacity-90 active:scale-[0.98]",children:[(0,Nt.jsx)(ns,{className:"w-3.5 h-3.5"}),h.length>0?t("Editor.Actions.BatchTranslate",{count:h.length}):t("Editor.Hints.NoItems")]})})]})};var xn=N(Le());Vt();Rr();var GA=()=>{let e=at.use.regexItems(),t=at.use.updateRegexItems(),r=Dc.use.i18n(),[a,n]=(0,xn.useState)(r.settings.language||r.settings.llmLanguage||"zh-cn"),[s,i]=(0,xn.useState)(r.settings.llmStyle),[o,l]=(0,xn.useState)(r.settings.llmBatchSize?.toString()||"20"),[c,u]=(0,xn.useState)(r.settings.llmConcurrencyLimit?.toString()||"3"),[d,f]=(0,xn.useState)(!1),[p,m]=(0,xn.useState)(!1),[h,x]=(0,xn.useState)(!1),[g,y]=(0,xn.useState)(r.settings.llmTimeout?.toString()||"60000"),[b,S]=(0,xn.useState)(!1),[w,P]=(0,xn.useState)(!1),[C,I]=(0,xn.useState)(0),[R,O]=(0,xn.useState)(0),[D,W]=(0,xn.useState)(0),[J,me]=(0,xn.useState)(0),[Z,q]=(0,xn.useState)(0),V=(0,xn.useRef)(null),L=(0,xn.useMemo)(()=>e.filter(H=>d||!H.target||H.target.trim()===""||H.target===H.source),[e,d]);(0,xn.useEffect)(()=>{n(r.settings.language||r.settings.llmLanguage||"zh-cn"),i(r.settings.llmStyle),l(r.settings.llmBatchSize?.toString()||"20"),u(r.settings.llmConcurrencyLimit?.toString()||"3"),y(r.settings.llmTimeout?.toString()||"60000")},[r.settings.language,r.settings.llmLanguage,r.settings.llmStyle,r.settings.llmBatchSize,r.settings.llmConcurrencyLimit,r.settings.llmTimeout]);let k=H=>{Object.assign(r.settings,H),r.saveSettings()};return{state:{language:a,style:s,batchSize:o,concurrencyLimit:c,overwrite:d,inputError:p,concurrencyError:h,isTranslating:w,progress:C,processedCount:R,totalCount:D,currentBatch:J,totalBatches:Z,targetItems:L,timeout:g,timeoutError:b,get estimation(){return mc().estimateTokens(L,"regex")}},actions:{setLanguage:H=>{n(H),k({language:H,llmLanguage:H})},setStyle:H=>{i(H),k({llmStyle:H})},setBatchSize:H=>{let xe=H.target.value;l(xe);let Pe=parseInt(xe,10);isNaN(Pe)||Pe<=0?m(!0):m(!1)},setConcurrencyLimit:H=>{let xe=H.target.value;u(xe);let Pe=parseInt(xe,10);isNaN(Pe)||Pe<=0?x(!0):x(!1)},setOverwrite:f,handleTimeoutChange:H=>{let xe=H.target.value;y(xe);let Pe=parseInt(xe,10);isNaN(Pe)||Pe<=0?S(!0):S(!1)},handleBatchSizeBlur:()=>{let H=parseInt(o,10);!isNaN(H)&&H>0?(k({llmBatchSize:H}),m(!1)):(l(r.settings.llmBatchSize?.toString()||"20"),m(!1))},handleConcurrencyLimitBlur:()=>{let H=parseInt(c,10);!isNaN(H)&&H>0?(k({llmConcurrencyLimit:H}),x(!1)):(u(r.settings.llmConcurrencyLimit?.toString()||"3"),x(!1))},handleTimeoutBlur:()=>{let H=parseInt(g,10);!isNaN(H)&&H>0?(k({llmTimeout:H}),S(!1)):(y(r.settings.llmTimeout?.toString()||"60000"),S(!1))},handleBatchTranslation:async()=>{if(!w){if(L.length===0){Ni.info(v("Common.Notices.NoItemsToTranslate"));return}P(!0),O(0),W(L.length),I(0),me(0),q(1),V.current=new AbortController;try{await mc().regexTranslate(L,async(xe,Pe,Ie)=>{let Ve=Math.min(Math.round(Pe/Ie*L.length),L.length);O(Ve),I(Pe/Ie*100),me(Pe),q(Ie);let ft=xe.map(we=>({id:we.id,updates:{target:we.target}}));t(ft)},V.current.signal),Ni.success(v("Common.Notices.BatchTranslateSuccess"))}catch(H){H.name==="AbortError"||H.message===v("Common.Notices.TaskCancelled")||V.current?.signal.aborted||Ni.error(v("Common.Notices.TranslateFail",{message:H.message}))}finally{V.current&&(P(!1),V.current=null)}}},handleStop:()=>{V.current&&(V.current.abort(),V.current=null,P(!1),Ni.info(v("Common.Notices.TaskStopped")))}}}};qt();var Ra=N(ce()),sne=({regexController:e,activeTab:t,onTabChange:r,onIncrementalExtract:a,onOpenFile:n,onDiagnose:s,isDiagnosing:i,errorItems:o,hasChecked:l,setActiveTab:c,onClearDiagnose:u,onRestoreAllErrors:d,onUnusedDiagnose:f,onDeleteUnused:p,isUnusedScan:m,isSecurityScan:h,onSecurityDiagnose:x,isApplied:g,onJumpError:y,onAiFixError:b})=>{let{t:S}=ze(),w=GA(),P=e||w,[C,I]=(0,kT.useState)(!0),[R,O]=(0,kT.useState)(!0),[D,W]=(0,kT.useState)(!0),[J,me]=(0,kT.useState)(!0);return(0,Ra.jsxs)("div",{className:"flex flex-col w-full h-full",children:[(0,Ra.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 border-b shrink-0",children:[(0,Ra.jsxs)("div",{className:"flex items-center text-sm font-semibold gap-1.5",children:[(0,Ra.jsx)(to,{className:"w-4 h-4"}),(0,Ra.jsx)("span",{children:S("Editor.Titles.Sidebar")})]}),(0,Ra.jsxs)(Vn,{children:[(0,Ra.jsx)(qn,{asChild:!0,children:(0,Ra.jsxs)(Te,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:[(0,Ra.jsx)(ko,{className:"w-4 h-4"}),(0,Ra.jsx)("span",{className:"sr-only",children:S("Editor.Labels.SidebarViewOptions")})]})}),(0,Ra.jsxs)(Hn,{align:"end",className:"w-48",children:[(0,Ra.jsx)(Ex,{children:S("Editor.Labels.SidebarShowCards")}),(0,Ra.jsx)(Ml,{}),(0,Ra.jsx)(Ai,{checked:C,onCheckedChange:I,children:S("Editor.Stats.Title")}),(0,Ra.jsx)(Ai,{checked:R,onCheckedChange:O,children:S("Editor.Titles.Insert")}),(0,Ra.jsx)(Ai,{checked:D,onCheckedChange:W,children:S("Editor.Titles.QuickActions")}),(0,Ra.jsx)(Ai,{checked:J,onCheckedChange:me,children:S("Editor.Titles.Ai")})]})]})]}),(0,Ra.jsx)(sr,{className:"flex-1 min-h-0 px-2 pb-2",children:(0,Ra.jsxs)("div",{className:"space-y-4 pb-4",children:[C&&(0,Ra.jsx)(OF,{}),R&&(0,Ra.jsx)(_F,{}),D&&(0,Ra.jsx)(Ih,{onIncrementalExtract:a||(()=>{}),onClearUntranslated:at.use.deleteUntranslatedRegexItems(),onOpenFile:n,isApplied:g}),(0,Ra.jsx)(dA,{onDiagnose:s,onUnusedDiagnose:f,onSecurityDiagnose:x,onDeleteUnused:p,onClear:u,onRestoreAllErrors:d,isDiagnosing:i,isUnusedScan:m,isSecurityScan:h,errorItems:o||[],hasChecked:l,setActiveTab:c,onJumpError:y,onAiFixError:b}),J&&(0,Ra.jsx)(nne,{controller:P})]})})]})};var jd=N(Le());qt();er();var bn=N(ce()),KA=(0,jd.memo)(({label:e,value:t,bgClass:r,textClass:a,dotClass:n,labelTextClass:s})=>(0,bn.jsxs)("div",{className:`rounded-lg p-2.5 transition-all duration-300 group ${r}`,children:[(0,bn.jsxs)("div",{className:`text-xs mb-0.75 flex items-center ${s}`,children:[(0,bn.jsx)("span",{className:`mr-1.5 inline-block w-1.5 h-1.5 rounded-full ${n}`}),e]}),(0,bn.jsx)("div",{className:`text-xl font-bold transition-transform duration-300 group-hover:translate-x-1 ${a}`,children:t})]}),(e,t)=>e.value===t.value&&e.label===t.label&&e.bgClass===t.bgClass&&e.textClass===t.textClass&&e.dotClass===t.dotClass&&e.labelTextClass===t.labelTextClass),ine=(0,jd.memo)(({progress:e})=>{let{t}=ze(),r=(0,jd.useMemo)(()=>({width:`${e}%`}),[e]),a=(0,jd.useMemo)(()=>2e3/(e||1),[e]),n=(0,jd.useMemo)(()=>({animation:`shine ${a}ms infinite`}),[a]);return(0,bn.jsxs)("div",{className:"px-3 pb-3",children:[(0,bn.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,bn.jsx)("span",{className:"text-xs text-muted-foreground",children:t("Editor.Stats.Progress")}),(0,bn.jsxs)("span",{className:"text-xs font-medium text-muted-foreground",children:[e,"%"]})]}),(0,bn.jsx)("div",{className:"relative h-2.5 w-full rounded-full bg-muted overflow-hidden shadow-inner [&:before]:absolute [&:before]:inset-0 [&:before]:bg-gradient-to-r [&:before]:from-white/50 [&:before]:to-transparent [&:before]:content-['']",children:(0,bn.jsx)("div",{className:"h-full rounded-full bg-gradient-to-r from-primary/70 to-primary/50 transition-all duration-800 ease-out relative overflow-hidden",style:r,children:(0,bn.jsx)("div",{className:"absolute top-0 right-0 h-full w-16 bg-white/20 transform -skew-x-12 translate-x-full transition-transform duration-1500 ease-in-out",style:n})})})]})},(e,t)=>e.progress===t.progress),OF=(0,jd.memo)(({})=>{let{t:e}=ze(),t=at.use.regexItems(),r=(0,jd.useMemo)(()=>{let o=t.length;if(o===0)return{totalCount:0,translatedCount:0,untranslatedCount:0,progress:0};let l=0;for(let d=0;d<o;d++){let f=t[d];!!f.target&&f.target!==f.source&&l++}let c=o-l,u=Math.round(l/o*100);return{totalCount:o,translatedCount:l,untranslatedCount:c,progress:u}},[t]),{totalCount:a,translatedCount:n,untranslatedCount:s,progress:i}=r;return(0,bn.jsxs)(qr,{title:e("Editor.Regex.Overview"),icon:qc,extra:(0,bn.jsxs)(mt,{variant:"secondary",className:"text-xs font-medium px-2.5 py-0.5 bg-muted text-muted-foreground border transition-all duration-300",children:[i,"% ",e("Common.Filters.Applied")]}),children:[(0,bn.jsxs)("div",{className:"grid grid-cols-2 gap-2.5",children:[(0,bn.jsx)("div",{className:"col-span-2",children:(0,bn.jsx)(KA,{label:e("Editor.Regex.TotalItems"),value:a,bgClass:"bg-muted/50 hover:bg-muted/80 transition-colors",textClass:"text-foreground",dotClass:"bg-blue-500",labelTextClass:"text-muted-foreground"})}),(0,bn.jsx)(KA,{label:e("Editor.Regex.Translated"),value:n,bgClass:"bg-muted/50 hover:bg-muted/80 transition-colors",textClass:"text-foreground",dotClass:"bg-emerald-500",labelTextClass:"text-muted-foreground"}),(0,bn.jsx)(KA,{label:e("Editor.Regex.Untranslated"),value:s,bgClass:"bg-muted/50 hover:bg-muted/80 transition-colors",textClass:"text-foreground",dotClass:"bg-amber-500",labelTextClass:"text-muted-foreground"})]}),(0,bn.jsx)("div",{className:"mt-3",children:(0,bn.jsx)(ine,{progress:i})})]})});OF.displayName="RegexStatsCard";KA.displayName="StatBox";ine.displayName="ProgressBar";var li=N(Le());qt();er();var Ls=N(ce()),one=()=>{let{t:e}=ze(),t=at.use.searchQuery(),r=at.use.setSearchQuery(),[a,n]=li.default.useState("all"),s=(0,li.useDeferredValue)(t),i=(0,li.useDeferredValue)(a),o=(0,li.useCallback)(h=>{r(h.target.value)},[]),[l,c]=li.default.useState(null),u=at.use.regexItems(),d=li.default.useRef(u);li.default.useEffect(()=>{d.current=u},[u]);let f=at.use.currentFile();li.default.useEffect(()=>{c(null),n("all"),r("")},[f,r]),li.default.useEffect(()=>{let h=x=>{if(x.detail.type==="regex"){let g=d.current.find(y=>y.id===x.detail.id);g&&g.source&&(n("all"),r(g.source)),c(x.detail.id)}};return window.addEventListener("i18n-jump-error",h),()=>window.removeEventListener("i18n-jump-error",h)},[r]);let p=(0,li.useMemo)(()=>{let h=u;if(i==="translated"?h=h.filter(x=>x.target&&x.target!==x.source):i==="untranslated"&&(h=h.filter(x=>!x.target||x.target===x.source)),s.trim()){let x=s.toLowerCase();h=h.filter(g=>g.source&&g.source.toLowerCase().includes(x)||g.target&&g.target.toLowerCase().includes(x))}return h},[u,s,i]);li.default.useEffect(()=>{if(l!==null){let h=u.find(x=>x.id===l);h&&window.dispatchEvent(new CustomEvent("i18n-item-selected",{detail:{source:h.source,type:"regex"}}))}else window.dispatchEvent(new CustomEvent("i18n-item-deselected"))},[l,u]);let m=(0,li.useCallback)(h=>{n(h)},[]);return(0,Ls.jsx)("div",{className:"flex h-full flex-col",children:(0,Ls.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[(0,Ls.jsx)("div",{className:"mb-2 flex items-center justify-between",children:(0,Ls.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ls.jsxs)("div",{className:"relative",children:[(0,Ls.jsx)(ra,{className:"absolute left-2 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),(0,Ls.jsx)(Qe,{className:"h-8 w-64 pl-8",placeholder:e("Common.Placeholders.Search"),value:t,onChange:o})]}),(0,Ls.jsxs)(lr,{value:a,onValueChange:m,children:[(0,Ls.jsx)(ur,{size:"sm",className:"w-[100px]",children:(0,Ls.jsx)(cr,{placeholder:e("Common.Labels.Filter")})}),(0,Ls.jsxs)(dr,{children:[(0,Ls.jsx)(Rt,{value:"all",children:e("Common.Filters.All")}),(0,Ls.jsx)(Rt,{value:"translated",children:e("Common.Filters.Translated")}),(0,Ls.jsx)(Rt,{value:"untranslated",children:e("Common.Filters.Untranslated")})]})]})]})}),(0,Ls.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,Ls.jsx)(DF,{data:p,editingId:l,onEditingIdChange:c},f)})]})})};var lne=e=>({regexItems:[],setRegexItems:t=>{e({regexItems:t})},addRegexItem:t=>{e(r=>{let a=r.regexItems.length>0?Math.max(...r.regexItems.map(n=>n.id))+1:0;return{regexItems:[...r.regexItems,{...t,id:a}]}})},updateRegexItem:(t,r)=>{e(a=>({regexItems:a.regexItems.map(n=>n.id===t?{...n,...r}:n)}))},updateRegexItems:t=>{e(r=>{let a=new Map(t.map(n=>[n.id,n.updates]));return{regexItems:r.regexItems.map(n=>{let s=a.get(n.id);return s?{...n,...s}:n})}})},deleteRegexItem:t=>{e(r=>({regexItems:r.regexItems.filter(a=>a.id!==t)}))},resetRegexItem:t=>{e(r=>({regexItems:r.regexItems.map(a=>a.id===t?{...a,target:a.source}:a)}))},deleteUntranslatedRegexItems:()=>e(t=>({regexItems:t.regexItems.filter(r=>r.target&&r.target!==r.source&&r.target.trim()!=="")}))});var cne=e=>({astItems:[],setAstItems:t=>e({astItems:t}),addAstItem:t=>e(r=>{let a=r.astItems.length>0?Math.max(...r.astItems.map(n=>n.id))+1:0;return{astItems:[...r.astItems,{...t,id:a}]}}),updateAstItem:(t,r)=>e(a=>({astItems:a.astItems.map(n=>n.id===t?{...n,target:r}:n)})),deleteAstItem:t=>e(r=>({astItems:r.astItems.filter(a=>a.id!==t)})),resetAstItem:t=>e(r=>({astItems:r.astItems.map(a=>a.id===t?{...a,target:a.source}:a)})),updateAstItems:t=>{e(r=>{let a=new Map(t.map(n=>[n.id,n.updates]));return{astItems:r.astItems.map(n=>{let s=a.get(n.id);return s?{...n,...s}:n})}})},deleteUntranslatedAstItems:()=>e(t=>({astItems:t.astItems.filter(r=>r.target&&r.target!==r.source&&r.target.trim()!=="")}))});var une=e=>({metadata:null,setMetadata:t=>{e({metadata:t})},updateMetadata:t=>{e(r=>({metadata:r.metadata?{...r.metadata,...t}:null}))}});var dne=(e,t)=>({dictData:{},currentFile:"main.js",searchQuery:"",sourceCache:{},setDictData:r=>e({dictData:r}),setSearchQuery:r=>e({searchQuery:r}),setSourceCache:(r,a)=>e(n=>({sourceCache:{...n.sourceCache,[r]:a}})),setCurrentFile:r=>{e(a=>{let{currentFile:n,astItems:s,regexItems:i,dictData:o}=a,l={...o};n&&l[n]&&(l[n]={ast:s.map(f=>({type:f.type,name:f.name,source:f.source,target:f.target})),regex:i.map(f=>({source:f.source,target:f.target}))});let c=l[r]||{ast:[],regex:[]},u=c.ast.map((f,p)=>({id:p,type:f.type,name:f.name,source:f.source,target:f.target})),d=c.regex.map((f,p)=>({id:p,source:f.source,target:f.target}));return{currentFile:r,dictData:l,astItems:u,regexItems:d}})},addFile:r=>{let{dictData:a}=t();if(a[r])return;let n={...a};n[r]={ast:[],regex:[]},e({dictData:n}),t().setCurrentFile(r)},deleteFile:r=>{e(a=>{let{dictData:n,currentFile:s,astItems:i,regexItems:o,sourceCache:l}=a;if(!n[r])return a;let c={...n};s&&c[s]&&s!==r&&(c[s]={ast:i.map(f=>({type:f.type,name:f.name,source:f.source,target:f.target})),regex:o.map(f=>({source:f.source,target:f.target}))}),delete c[r];let u={...l};delete u[r];let d={dictData:c,sourceCache:u};if(s===r){let f=c["main.js"]?"main.js":Object.keys(c)[0]||"";if(f){let p=c[f]||{ast:[],regex:[]};d={...d,currentFile:f,astItems:p.ast.map((m,h)=>({id:h,type:m.type,name:m.name,source:m.source,target:m.target})),regexItems:p.regex.map((m,h)=>({id:h,source:m.source,target:m.target}))}}else d={...d,currentFile:"",astItems:[],regexItems:[]}}return d})},syncFileDictInfo:(r,a,n)=>{e(s=>{let i={...s.dictData};return i[r]={ast:a.map(o=>({type:o.type,name:o.name,source:o.source,target:o.target})),regex:n.map(o=>({source:o.source,target:o.target}))},{dictData:i}})}});var dYe=Mc()((...e)=>({...lne(...e),...cne(...e),...une(...e),...dne(...e)})),at=Ru(dYe);Vt();Vt();lf();er();Rr();var Ab=N(Le());er();var WA=N(require("path"));qt();Vt();var Gt=N(ce()),FF=(0,Ab.memo)(()=>{let{t:e}=ze(),t=at.use.metadata(),r=at.use.updateMetadata(),a=He(c=>c.i18n),n=He(c=>c.editorPluginTranslationPath),s=He(c=>c.editorPluginTranslation),[i,o]=(0,Ab.useState)(null);if((0,Ab.useEffect)(()=>{if(a?.sourceManager&&n)try{let c=WA.extname(n),u=WA.basename(n,c),d=a.sourceManager.getSource(u);d&&o({...d})}catch{}},[a,n,s]),!t)return null;let l=(c,u)=>{r({[c]:u})};return(0,Gt.jsx)(qr,{title:e("Editor.Titles.Metadata"),icon:Zi,children:(0,Gt.jsxs)("div",{className:"space-y-3",children:[(0,Gt.jsxs)("div",{className:"space-y-1",children:[(0,Gt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Gt.jsx)(wi,{className:"w-3.5 h-3.5"}),e("Editor.Labels.PluginId")]}),(0,Gt.jsx)(Qe,{value:t.plugin,readOnly:!0,disabled:!0,className:"h-8 text-sm bg-muted/50 text-muted-foreground"})]}),(0,Gt.jsxs)("div",{className:"space-y-1",children:[(0,Gt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Gt.jsx)(Kc,{className:"w-3.5 h-3.5"}),e("Editor.Labels.Name")]}),(0,Gt.jsxs)("div",{className:"flex gap-2",children:[(0,Gt.jsx)(Qe,{value:t.title,onChange:c=>l("title",c.target.value),placeholder:e("Editor.Labels.NamePlaceholder"),className:"h-8 text-sm bg-background"}),(0,Gt.jsx)(Te,{variant:"outline",size:"icon",className:"h-8 w-8 shrink-0",title:e("Editor.Titles.Metadata"),onClick:()=>{let c=(t.title||"").replace(/^(\[[^\]]+\])+\s*/,""),u="";t.author&&(u+=`[${t.author}]`),t.language&&(u+=`[${t.language}]`);let d=`${u} ${c}`.trim();l("title",d)},children:(0,Gt.jsx)(Wf,{className:"h-3.5 w-3.5"})})]})]}),(0,Gt.jsxs)("div",{className:"space-y-1",children:[(0,Gt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Gt.jsx)(Zi,{className:"w-3.5 h-3.5"}),e("Editor.Labels.Desc")]}),(0,Gt.jsx)(Bo,{value:t.description,onChange:c=>l("description",c.target.value),placeholder:e("Editor.Labels.DescPlaceholder"),className:"min-h-[60px] text-sm bg-background resize-none"})]}),(0,Gt.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Gt.jsxs)("div",{className:"space-y-1",children:[(0,Gt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Gt.jsx)(Wc,{className:"w-3.5 h-3.5"}),e("Editor.Labels.Author")]}),(0,Gt.jsx)(Qe,{value:t.author,onChange:c=>l("author",c.target.value),placeholder:e("Editor.Labels.Author"),className:"h-8 text-sm bg-background px-2"})]}),(0,Gt.jsxs)("div",{className:"space-y-1",children:[(0,Gt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Gt.jsx)(Ea,{className:"w-3.5 h-3.5"}),e("Editor.Labels.Lang")]}),(0,Gt.jsxs)(lr,{value:t.language,onValueChange:c=>l("language",c),children:[(0,Gt.jsx)(ur,{size:"sm",className:"w-full text-sm bg-background px-2",children:(0,Gt.jsx)(cr,{placeholder:e("Editor.Labels.Lang")})}),(0,Gt.jsx)(dr,{children:Yn.map(c=>(0,Gt.jsx)(Rt,{value:c.value,children:c.label},c.value))})]})]})]}),(0,Gt.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Gt.jsxs)("div",{className:"space-y-1",children:[(0,Gt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Gt.jsx)(sa,{className:"w-3.5 h-3.5"}),e("Editor.Labels.SupportedVer")]}),(0,Gt.jsx)(Qe,{value:t.supportedVersions,onChange:c=>l("supportedVersions",c.target.value),placeholder:">=1.0.0",className:"h-8 text-sm bg-background px-2"})]}),(0,Gt.jsxs)("div",{className:"space-y-1",children:[(0,Gt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Gt.jsx)(rd,{className:"w-3.5 h-3.5"}),e("Editor.Labels.Ver")]}),(0,Gt.jsx)(Qe,{value:t.version,onChange:c=>l("version",c.target.value),placeholder:"1.0.0",className:"h-8 text-sm bg-background px-2"})]})]}),(0,Gt.jsxs)("div",{className:"grid grid-cols-2 gap-2 pt-1",children:[(0,Gt.jsxs)("div",{className:"space-y-1",children:[(0,Gt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[i?.origin==="cloud"?(0,Gt.jsx)(Ca,{className:"w-3.5 h-3.5"}):(0,Gt.jsx)(Lo,{className:"w-3.5 h-3.5"}),e("Editor.Labels.Source")]}),(0,Gt.jsx)("div",{className:"flex items-center h-8 px-2 text-sm bg-muted/50 text-muted-foreground font-medium border rounded-md",children:i?.origin==="cloud"?e("Editor.Labels.SourceCloud"):e("Editor.Labels.SourceLocal")})]}),(0,Gt.jsxs)("div",{className:"space-y-1",children:[(0,Gt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Gt.jsx)(rd,{className:"w-3.5 h-3.5"}),e("Editor.Labels.Checksum")]}),(0,Gt.jsx)(Qe,{value:i?.checksum?.substring(0,8)||"-",readOnly:!0,disabled:!0,className:"h-8 text-sm bg-muted/50 text-muted-foreground font-mono px-2",title:i?.checksum})]})]})]})})});FF.displayName="MetadataCard";var xt=N(ce()),hYe=Sr.default.memo(({onSave:e,isSaving:t})=>{let{t:r}=ze(),a=at.use.astItems(),n=at.use.regexItems();return(0,xt.jsxs)(Te,{variant:"default",size:"sm",onClick:e,disabled:t,className:"shadow-sm hover:shadow-md transition-all active:scale-95 bg-primary hover:bg-primary/90",children:[t?(0,xt.jsx)(zt,{className:"mr-2 h-4 w-4 animate-spin"}):(0,xt.jsx)(id,{className:"mr-2 h-4 w-4"}),r("Editor.Actions.Save"),(0,xt.jsx)(mt,{variant:"secondary",className:"ml-2 bg-primary-foreground/20 text-primary-foreground border-none px-1 h-4",children:a.length+n.length})]})}),gYe=({onSave:e,enabled:t})=>{let r=at.use.astItems(),a=at.use.regexItems(),n=(0,Sr.useRef)(null),s=(0,Sr.useRef)(!0);return(0,Sr.useEffect)(()=>{if(s.current){s.current=!1;return}if(t)return n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{e(!0)},500),()=>{n.current&&clearTimeout(n.current)}},[r,a,t,e]),null},yYe=e=>{let t=He.getState().i18n,{t:r}=ze(),a=t.logger,n=t.notice,s=r("Editor.Titles.Main"),i=He.getState().editorPluginTranslation,o=zA(),l=GA(),[c,u]=Sr.default.useState("overview"),d=at.use.setRegexItems(),f=at.use.setAstItems(),p=at.use.setMetadata(),m=at.use.setDictData(),h=at.use.setCurrentFile(),x=at.use.addFile(),g=at.use.deleteFile(),y=(0,Sr.useRef)(!1),b=(0,Sr.useRef)(!1),[S,w]=(0,Sr.useState)(!1),[P,C]=(0,Sr.useState)(!1),[I,R]=(0,Sr.useState)(!1),[O,D]=(0,Sr.useState)(!1),[W,J]=(0,Sr.useState)([]),[me,Z]=(0,Sr.useState)(!1),[q,V]=(0,Sr.useState)("ast"),[L,k]=(0,Sr.useState)(!1),[_,ee]=(0,Sr.useState)(""),ie=(0,Sr.useMemo)(()=>new yi(t.settings),[t.settings]),ae=(0,Sr.useMemo)(()=>new Hi(t.settings),[t.settings]);(0,Sr.useEffect)(()=>{if(!y.current){if(i?.dict){at.setState({currentFile:""}),m(i.dict);let pe=i.dict["main.js"]?"main.js":Object.keys(i.dict)[0];pe&&h(pe)}i?.metadata&&p(i.metadata),y.current=!0}},[i,m,h,p,a]);let ge=Sr.default.useCallback(async(pe=!1)=>{if(!b.current){b.current=!0,w(!0);try{let{regexItems:$e,astItems:nt,metadata:qe,currentFile:ut,syncFileDictInfo:jt}=at.getState();jt(ut,nt,$e);let st=at.getState().dictData,bt=He.getState(),Qa=bt.editorPluginTranslation,Br=bt.editorPluginTranslationPath,Nr=bt.i18n,ye=Nr.notice,ke=JSON.parse(JSON.stringify(Qa));ke.dict=JSON.parse(JSON.stringify(st)),qe&&(ke.metadata={...qe});try{if(Br){if(Mx(Br,ke),He.setState({editorPluginTranslation:ke}),Nr&&Nr.sourceManager)try{let Me=An.extname(Br),je=An.basename(Br,Me),et=Nr.sourceManager.getSource(je);et&&qe&&(qe.title&&(et.title=qe.title),et.checksum=xs(ke),et.origin==="cloud"&&(et.origin="local",et.cloud=void 0),Nr.sourceManager.saveSource(et))}catch{}pe||ye.successPrefix(s,r("Common.Notices.SaveSuccess"))}else ye.errorPrefix(s,r("Common.Notices.SaveFailPath"))}catch(Me){ye.errorPrefix(s,r("Common.Notices.SaveFail"),Me)}}finally{b.current=!1,w(!1)}}},[s,r]),ue=Sr.default.useCallback(async()=>{try{let{metadata:pe}=at.getState();if(!pe)return;if(!!t.stateManager.getPluginState(pe.plugin)?.isApplied){n.error(r("Editor.Actions.IncrementalExtractDisabledTip"));return}let nt=pe.plugin,qe=at.getState().currentFile,ut=t.app.plugins.manifests[nt];if(!ut)return;let jt=An.normalize(t.app.vault.adapter.getBasePath()),st=An.join(jt,ut.dir||"",qe);if(!uo.existsSync(st)){n.error(r("Common.Notices.MainNotFound").replace("main.js",qe)+` (${qe})`);return}let bt=uo.readFileSync(st).toString(),Qa=new yi(t.settings),Br=Qa.loadCode(bt);if(Br){let Nr=Qa.extract(Br),ye=at.getState().astItems,ke=M2(ye,Nr);f(ke.map((Me,je)=>({...Me,id:je}))),n.success(r("Editor.Notices.SuccessIncrementalExtract"))}}catch(pe){n.error(r("Editor.Errors.SyntaxErrorAst")+": "+pe)}},[t,n,r,f]),$=Sr.default.useCallback(async()=>{try{let{metadata:pe}=at.getState();if(!pe)return;if(!!t.stateManager.getPluginState(pe.plugin)?.isApplied){n.error(r("Editor.Actions.IncrementalExtractDisabledTip"));return}let nt=pe.plugin,qe=at.getState().currentFile,ut=t.app.plugins.manifests[nt];if(!ut)return;let jt=An.normalize(t.app.vault.adapter.getBasePath()),st=An.join(jt,ut.dir||"",qe);if(!uo.existsSync(st)){n.error(r("Common.Notices.MainNotFound",{file:qe}));return}let bt=uo.readFileSync(st).toString(),Br=new Hi(t.settings).extractTranslationsByRegex(bt),Nr=at.getState().regexItems,ye=D2(Nr,Br);d(ye.map((ke,Me)=>({...ke,id:Me}))),n.success(r("Editor.Notices.SuccessIncrementalExtract"))}catch(pe){n.error(r("Editor.Errors.SyntaxErrorRegex")+": "+pe)}},[t,n,r,d]),A=Sr.default.useCallback(async()=>{try{let{metadata:pe}=at.getState();if(!pe)return;let $e=pe.plugin,nt=at.getState().currentFile,qe=t.app.plugins.manifests[$e];if(!qe)return;let ut=An.normalize(t.app.vault.adapter.getBasePath()),jt=An.join(ut,qe.dir||"",nt);if(!uo.existsSync(jt)){n.error(r("Common.Notices.MainNotFound",{file:nt}));return}let{i18nOpen:st}=await Promise.resolve().then(()=>(GC(),G2));st(t,jt)}catch(pe){n.error(r("Editor.Actions.OpenFile")+" "+r("Common.Status.Failure")+": "+pe)}},[t,n,r]),K=Sr.default.useCallback(async()=>{if(!P){C(!0),J([]),Z(!0);try{let{regexItems:pe,astItems:$e,metadata:nt,currentFile:qe,sourceCache:ut,setSourceCache:jt}=at.getState();if(!nt){n.error(r("Editor.Errors.NoMetadata"));return}let st=nt.plugin;if(!qe||!qe.endsWith(".js")){n.info(r("Editor.Errors.NotJs"));return}let bt=t.stateManager.getPluginState(st),Qa=!!(bt&&bt.isApplied),Br=ut[qe];if(!Br){if(!Qa)try{let ye=t.app.plugins.manifests[st];if(ye){let ke=An.normalize(t.app.vault.adapter.getBasePath()),Me=An.join(ke,ye.dir||""),je=An.join(Me,qe);uo.existsSync(je)&&(Br=uo.readFileSync(je,"utf8"))}}catch{}Br||(Br=await t.backupManager.getBackupContent(st,qe)),Br&&jt(qe,Br)}if(!Br){n.error(r("Editor.Errors.NoBackup"));return}let Nr=[];try{let ye=t.app.plugins.enabledPlugins.has(st),ke=An.normalize(t.app.vault.adapter.getBasePath()),Me=t.app.plugins.manifests[st];if(!Me)throw new Error("Manifest not found");let je=An.join(ke,Me.dir||""),et=An.join(je,qe);try{let ot=ie.loadCode(Br);if(!ot){n.error(r("Editor.Errors.SourceError"));return}let ar=$e.filter(Cr=>Cr.target&&Cr.target!==Cr.source),Lr=pe.filter(Cr=>Cr.target&&Cr.target!==Cr.source);if(ar.length===0&&Lr.length===0){n.success(r("Editor.Notices.DiagnosisSuccess"));return}let{validateBracketBalance:yr,validateVariableConsistency:Za}=await Promise.resolve().then(()=>(pne(),fne));for(let Cr of ar){let en=Cr.source||"",jr=Cr.target||"";ie.validateTargetSyntax(jr)?yr(jr)?Za(en,jr)||Nr.push({type:"ast",id:Cr.id,source:(r("Editor.Errors.VariableMismatch")||"\u53D8\u91CF\u4E22\u5931")+": "+jr,severity:"error"}):Nr.push({type:"ast",id:Cr.id,source:(r("Editor.Errors.BracketMismatch")||"\u62EC\u53F7\u4E0D\u5339\u914D")+": "+jr,severity:"error"}):Nr.push({type:"ast",id:Cr.id,source:(r("Editor.Errors.SyntaxError")||"\u8BED\u6CD5\u9519\u8BEF")+": "+jr,severity:"error"})}for(let Cr of Lr){let en=Cr.target||"";yr(en)?Za(Cr.source||"",en)||Nr.push({type:"regex",id:Cr.id,source:(r("Editor.Errors.VariableMismatch")||"\u53D8\u91CF\u4E22\u5931")+": "+en,severity:"error"}):Nr.push({type:"regex",id:Cr.id,source:(r("Editor.Errors.BracketMismatch")||"\u62EC\u53F7\u4E0D\u5339\u914D")+": "+en,severity:"error"})}if(Nr.length>0){J(Nr),n.error(r("Editor.Errors.SyntaxErrorTotal",{count:Nr.length}));return}let nn=async(Cr,en)=>{try{let jr=ie.cloneAst(ot),Fi=ie.translate(jr,Cr),Bi=ae.translate(Fi,en);return ie.loadCode(Bi)?(uo.writeFileSync(et,Bi),t.app.plugins.enabledPlugins.has(st)&&await t.app.plugins.disablePlugin(st),await t.app.plugins.enablePlugin(st),!!t.app.plugins.plugins[st]):!1}catch{return!1}};if(!await nn(ar,Lr)){let Cr=async jr=>{if(jr.length===0)return;let Fi=jr.filter(Xn=>Xn.type==="ast").map(Xn=>Xn.data),Bi=jr.filter(Xn=>Xn.type==="regex").map(Xn=>Xn.data);if(await nn(Fi,Bi))return;if(jr.length===1){let Xn=jr[0];Xn.type==="ast"&&!ie.validateTargetSyntax(Xn.data.target)?Nr.push({type:"ast",id:Xn.data.id,source:Xn.data.source}):Nr.push({type:Xn.type,id:Xn.data.id,source:Xn.data.source});return}let bu=Math.floor(jr.length/2);await Cr(jr.slice(0,bu)),await Cr(jr.slice(bu))},en=[...ar.map(jr=>({type:"ast",data:jr})),...Lr.map(jr=>({type:"regex",data:jr}))];await Cr(en)}}finally{try{Br&&uo.writeFileSync(et,Br),t.app.plugins.enabledPlugins.has(st)&&await t.app.plugins.disablePlugin(st),ye&&await t.app.plugins.enablePlugin(st)}catch{}}}catch(ye){n.error(r("Common.Status.Failure")+": "+ye);return}J(Nr),Nr.length===0?n.success(r("Editor.Notices.DiagnosisSuccess")):n.error(r("Editor.Errors.SyntaxErrorTotal",{count:Nr.length}))}catch(pe){n.error(r("Common.Status.Failure")+" "+r("Editor.Notices.DiagnosisSuccess")+": "+pe)}finally{C(!1)}}},[t,n,r,P]),he=Sr.default.useCallback(async()=>{if(!P){C(!0),R(!1),D(!0),J([]),Z(!0);try{let{regexItems:pe,astItems:$e}=at.getState(),nt=[];for(let qe of $e){let ut=qe.target||"",jt=ie.validateSecurity(ut);for(let st of jt)nt.push({type:"ast",id:qe.id,source:ut,severity:st.severity,message:st.message})}for(let qe of pe){let ut=qe.source||"",jt=qe.target||"",st=ae.validateSecurity(jt,ut);for(let bt of st)nt.push({type:"regex",id:qe.id,source:jt,severity:bt.severity,message:bt.message})}J(nt),nt.length===0?n.success(r("Editor.Notices.DiagnosisSuccess")):n.error(r("Editor.Errors.SecurityRiskTotal",{count:nt.length}))}catch(pe){n.error(r("Common.Status.Failure")+": "+pe)}finally{C(!1)}}},[n,r,P]),H=Sr.default.useCallback(async()=>{if(!P){C(!0),R(!0),D(!1),J([]),Z(!0);try{let{regexItems:pe,astItems:$e,metadata:nt,currentFile:qe,sourceCache:ut,setSourceCache:jt}=at.getState();if(!nt){n.error(r("Editor.Errors.NoMetadata"));return}let st=nt.plugin;if(!qe||!qe.endsWith(".js")){n.info(r("Editor.Errors.NotJs"));return}let bt=t.stateManager.getPluginState(st),Qa=!!(bt&&bt.isApplied),Br=ut[qe];if(!Br){if(!Qa)try{let et=t.app.plugins.manifests[st];if(et){let ot=An.normalize(t.app.vault.adapter.getBasePath()),ar=An.join(ot,et.dir||""),Lr=An.join(ar,qe);uo.existsSync(Lr)&&(Br=uo.readFileSync(Lr,"utf8"))}}catch{}Br||(Br=await t.backupManager.getBackupContent(st,qe)),Br&&jt(qe,Br)}if(!Br){n.error(r("Editor.Errors.NoBackup"));return}let Nr=[],ye=new yi(t.settings),ke=new Hi(t.settings),Me=ye.loadCode(Br);if(Me){let et=ye.traceUsage(Me,$e);$e.forEach(ot=>{let ar=`${ot.type}:${ot.name}:${ot.source}`;et.has(ar)||et.has(ot.source)||Nr.push({type:"ast",id:ot.id,source:ot.source,isUnused:!0})})}let je=ke.traceUsage(Br,pe);pe.forEach(et=>{je.has(et.source)||Nr.push({type:"regex",id:et.id,source:et.source,isUnused:!0})}),J(Nr),Nr.length===0?n.success(r("Editor.Notices.DiagnosisSuccess")):n.info(r("Editor.Errors.UnusedTotal",{count:Nr.length}))}catch(pe){n.error(r("Common.Status.Failure")+": "+pe)}finally{C(!1)}}},[t,n,r,P]),xe=Sr.default.useCallback(()=>{J([]),Z(!1),R(!1)},[]),Pe=Sr.default.useCallback(()=>{let pe=W.filter(bt=>bt.isUnused);if(pe.length===0||!confirm(r("Editor.Notices.ConfirmDeleteUnused")||`\u786E\u8BA4\u5220\u9664\u8FD9 ${pe.length} \u4E2A\u5197\u4F59\u9879\u5417\uFF1F`))return;let{astItems:$e,regexItems:nt}=at.getState(),qe=new Set(pe.filter(bt=>bt.type==="ast").map(bt=>bt.id)),ut=new Set(pe.filter(bt=>bt.type==="regex").map(bt=>bt.id)),jt=$e.filter(bt=>!qe.has(bt.id)),st=nt.filter(bt=>!ut.has(bt.id));f(jt.map((bt,Qa)=>({...bt,id:Qa}))),d(st.map((bt,Qa)=>({...bt,id:Qa}))),J([]),Z(!1),R(!1),n.success(r("Editor.Notices.SuccessDelete"))},[W,n,r,f,d]),Ie=Sr.default.useCallback(pe=>{V(pe.type),window.dispatchEvent(new CustomEvent("i18n-jump-error",{detail:{type:pe.type,id:pe.id}}))},[]),Ve=Sr.default.useCallback(()=>{if(W.length===0)return;let pe=[...at.getState().astItems],$e=[...at.getState().regexItems];W.forEach(nt=>{if(nt.type==="ast"){let qe=pe.findIndex(ut=>ut.id===nt.id);qe!==-1&&(pe[qe]={...pe[qe],target:pe[qe].source})}else if(nt.type==="regex"){let qe=$e.findIndex(ut=>ut.id===nt.id);qe!==-1&&($e[qe]={...$e[qe],target:$e[qe].source})}}),f(pe),d($e),J([]),Z(!1),n.success(r("Editor.Notices.SuccessRestore"))},[W,n,r,f,d]),ft=Sr.default.useCallback(async pe=>{try{let $e=at.getState(),nt="";pe.type==="ast"?nt=$e.astItems.find(st=>st.id===pe.id)?.target||pe.source:nt=$e.regexItems.find(st=>st.id===pe.id)?.target||pe.source;let ut=await mc().fixTranslation(pe.source,nt,pe.message||"\u8BED\u6CD5\u9519\u8BEF");if(pe.type==="ast"){let st=at.getState().astItems.map(bt=>bt.id===pe.id?{...bt,target:ut}:bt);f(st)}else{let st=at.getState().regexItems.map(bt=>bt.id===pe.id?{...bt,target:ut}:bt);d(st)}J(jt=>jt.filter(st=>!(st.id===pe.id&&st.type===pe.type))),n.success(r("Editor.Notices.AiFixSuccess"))}catch($e){n.error(`${r("Editor.Errors.AiFixFail")}: ${$e.message}`)}},[n,r,f,d,J]);(0,Sr.useEffect)(()=>{let pe=$e=>{($e.ctrlKey||$e.metaKey)&&($e.key==="s"||$e.key==="S"||$e.code==="KeyS")&&($e.preventDefault(),$e.stopPropagation(),ge())};return window.addEventListener("keydown",pe,!0),()=>{window.removeEventListener("keydown",pe,!0)}},[ge]),(0,Sr.useEffect)(()=>{window.dispatchEvent(new CustomEvent("i18n-diagnose-errors",{detail:{errors:W}}))},[W]);let we=at.use.metadata(),Ne=at.use.dictData(),Be=at.use.currentFile(),tt=at.use.astItems(),Ct=Object.keys(Ne||{}),Tt=Sr.default.useMemo(()=>!we?.plugin||!t?.stateManager?!1:!!t.stateManager.getPluginState(we.plugin)?.isApplied,[we?.plugin,t?.stateManager,S]),Qt=()=>{_.trim()&&(x(_.trim()),ee(""),k(!1))},Ur=pe=>{pe!==Be&&h(pe)};return(0,xt.jsxs)(Ll,{value:q,onValueChange:V,className:"h-full flex flex-col gap-0 bg-background/50 backdrop-blur-md",children:[(0,xt.jsx)(gYe,{onSave:ge,enabled:!!t.settings.autoSave},Be),(0,xt.jsxs)(zP,{direction:"horizontal",className:"h-full border-none",children:[(0,xt.jsx)(dp,{defaultSize:20,minSize:10,maxSize:30,className:"h-full",children:(0,xt.jsx)("div",{className:"flex flex-col h-full py-2 pl-2 pr-1",children:(0,xt.jsxs)("div",{className:"flex flex-col h-full flex-1 min-h-0 rounded-lg border",children:[(0,xt.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border-b shrink-0 min-h-[36px]",children:[(0,xt.jsx)(ed,{className:"w-4 h-4 text-primary shrink-0"}),(0,xt.jsx)("span",{className:"text-sm font-semibold truncate",children:we?.plugin||r("Manager.Plugins.TabName")})]}),(0,xt.jsx)("div",{className:"flex flex-col w-full flex-1 min-h-0 p-2",children:(0,xt.jsx)(sr,{className:"flex-1 min-h-0 pr-3 -mr-3",children:(0,xt.jsxs)("div",{className:"space-y-3 pb-2",children:[(0,xt.jsx)(qr,{title:r("Editor.Titles.Main"),icon:ed,children:(0,xt.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,xt.jsx)(hYe,{onSave:ge,isSaving:S}),(0,xt.jsxs)(Rl,{className:"w-full h-9 p-1.5 bg-muted/50 grid grid-cols-2",children:[(0,xt.jsx)(Ga,{className:"text-xs data-[state=active]:shadow-sm",value:"ast",children:"AST"}),(0,xt.jsx)(Ga,{className:"text-xs data-[state=active]:shadow-sm",value:"regex",children:"Regex"})]}),(0,xt.jsx)(mt,{variant:"outline",className:"w-full justify-center bg-background/50 border-primary/20 text-primary font-normal truncate text-xs h-8",children:Be})]})}),(0,xt.jsx)(qr,{title:r("Editor.Titles.Files"),icon:iS,extra:(0,xt.jsx)(Te,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-primary/10 text-primary",onClick:()=>k(!0),children:(0,xt.jsx)(as,{className:"w-3.5 h-3.5"})}),children:(0,xt.jsx)("div",{className:"flex flex-col gap-0.5",children:Ct.map(pe=>(0,xt.jsxs)("div",{className:`
|
|
group flex items-center justify-between px-2 h-8 rounded-md cursor-pointer transition-all text-sm
|
|
${Be===pe?"bg-primary text-primary-foreground shadow-sm":"hover:bg-primary/5 text-muted-foreground hover:text-foreground"}
|
|
`,onClick:()=>Ur(pe),children:[(0,xt.jsxs)("div",{className:"flex items-center flex-1 min-w-0",children:[Be===pe?(0,xt.jsx)(yl,{className:"w-3.5 h-3.5 mr-1 flex-shrink-0 animate-in fade-in slide-in-from-left-2"}):(0,xt.jsx)("div",{className:"w-3.5 h-3.5 mr-1"}),(0,xt.jsx)("span",{className:"truncate",children:pe})]}),(0,xt.jsx)(Te,{variant:"ghost",size:"icon",className:`
|
|
h-8 w-8 opacity-0 group-hover:opacity-100 transition-opacity rounded-full
|
|
${Be===pe?"hover:bg-primary-foreground/20 text-primary-foreground":"text-destructive hover:bg-destructive/10"}
|
|
`,onClick:$e=>{$e.stopPropagation(),confirm(r("Editor.Dialogs.ConfirmDeletePath"))&&(g(pe),J([]),Z(!1))},children:(0,xt.jsx)(Ha,{className:"w-3 h-3"})})]},pe))})}),(0,xt.jsx)(FF,{})]})})})]})})}),(0,xt.jsx)(wx,{withHandle:!0}),(0,xt.jsx)(dp,{defaultSize:60,minSize:30,className:"h-full",children:(0,xt.jsx)("main",{className:"w-full h-full flex flex-col px-1 overflow-hidden bg-background/20",children:(0,xt.jsxs)("div",{className:"flex-1 min-h-0 overflow-hidden relative",children:[(0,xt.jsx)(ca,{value:"ast",className:"h-full m-0 overflow-hidden outline-none data-[state=active]:animate-in fade-in duration-300",children:(0,xt.jsx)("div",{className:"h-full overflow-auto p-2 pt-0",children:(0,xt.jsx)(ene,{})})}),(0,xt.jsx)(ca,{value:"regex",className:"h-full m-0 overflow-hidden outline-none data-[state=active]:animate-in fade-in duration-300",children:(0,xt.jsx)("div",{className:"h-full overflow-auto p-2 pt-0",children:(0,xt.jsx)(one,{})})})]})})}),(0,xt.jsx)(wx,{withHandle:!0}),(0,xt.jsx)(dp,{defaultSize:20,minSize:10,maxSize:30,className:"h-full",children:(0,xt.jsx)("div",{className:"flex flex-col h-full py-2 pr-2 pl-1",children:(0,xt.jsxs)("div",{className:"flex flex-col h-full flex-1 min-h-0 rounded-lg border",children:[(0,xt.jsx)(ca,{value:"ast",className:"flex-1 min-h-0 m-0 overflow-hidden outline-none",children:(0,xt.jsx)(Fae,{astController:o,onIncrementalExtract:ue,translationEntries:tt,onOpenFile:A,onDiagnose:K,onUnusedDiagnose:H,onSecurityDiagnose:he,onDeleteUnused:Pe,onClearDiagnose:xe,onRestoreAllErrors:Ve,isDiagnosing:P,isUnusedScan:I,isSecurityScan:O,errorItems:W,hasChecked:me,setActiveTab:V,isApplied:Tt,onJumpError:Ie,onAiFixError:ft})}),(0,xt.jsx)(ca,{value:"regex",className:"flex-1 min-h-0 m-0 overflow-hidden outline-none",children:(0,xt.jsx)(sne,{regexController:l,onIncrementalExtract:$,onOpenFile:A,onDiagnose:K,onUnusedDiagnose:H,onSecurityDiagnose:he,onDeleteUnused:Pe,onClearDiagnose:xe,onRestoreAllErrors:Ve,isDiagnosing:P,isUnusedScan:I,isSecurityScan:O,errorItems:W,hasChecked:me,setActiveTab:V,isApplied:Tt,onJumpError:Ie,onAiFixError:ft})})]})})})]}),(0,xt.jsx)(xd,{open:L,onOpenChange:k,children:(0,xt.jsxs)(bd,{children:[(0,xt.jsx)(vd,{children:(0,xt.jsx)(Sd,{children:r("Editor.Dialogs.PromptNewPath")})}),(0,xt.jsx)("div",{className:"grid gap-4 py-4",children:(0,xt.jsxs)("div",{className:"grid grid-cols-4 items-center gap-4",children:[(0,xt.jsx)(Vr,{htmlFor:"path",className:"text-right",children:r("Editor.Labels.PathLabel")}),(0,xt.jsx)(Qe,{id:"path",value:_,onChange:pe=>ee(pe.target.value),placeholder:r("Editor.Labels.PathPlaceholder"),className:"col-span-3",onKeyDown:pe=>{pe.key==="Enter"&&Qt()}})]})}),(0,xt.jsxs)(Ch,{children:[(0,xt.jsx)(Te,{variant:"outline",onClick:()=>k(!1),children:r("Common.Actions.Cancel")}),(0,xt.jsx)(Te,{onClick:Qt,children:r("Common.Actions.Confirm")})]})]})})]})},jp="editor-view-type",XA=class extends mne.ItemView{constructor(r,a){super(r);this.root=null;this.shadowRoot=null;this.leftCollapsed=!1;this.rightCollapsed=!1;this.i18n=a}getViewType(){return jp}getDisplayText(){return v("Editor.Titles.Main")}getIcon(){return"pencil"}async onOpen(){this.leftCollapsed=this.app.workspace.leftSplit.collapsed,this.rightCollapsed=this.app.workspace.rightSplit.collapsed,this.app.workspace.leftSplit.collapse(),this.app.workspace.rightSplit.collapse();let{root:r,shadowRoot:a}=Do(this.contentEl,this.i18n,Sr.default.createElement(yYe));this.root=r,this.shadowRoot=a}async onClose(){this.leftCollapsed||this.app.workspace.leftSplit.expand(),this.rightCollapsed||this.app.workspace.rightSplit.expand(),this.root?.unmount(),this.shadowRoot?.empty()}};var Ya=N(Le());er();var zp=N(require("path")),Vp=N(fs()),xne=require("obsidian");UC();qt();Vt();Vt();Rr();Vt();ty();Vt();var xYe=Mc()((e,t)=>({items:[],metadata:null,themeName:"",themeDir:"",translationPath:"",isTranslating:!1,progress:0,processedCount:0,totalCount:0,overwrite:!1,setItems:r=>e({items:r}),addItem:r=>e(a=>({items:[...a.items,r]})),updateItem:(r,a)=>e(n=>({items:n.items.map(s=>s.id===r?{...s,target:a}:s)})),deleteItem:r=>e(a=>({items:a.items.filter(n=>n.id!==r)})),resetItem:r=>e(a=>({items:a.items.map(n=>n.id===r?{...n,target:n.source}:n)})),updateItems:r=>e(a=>{let n=new Map(r.map(s=>[s.id,s.target]));return{items:a.items.map(s=>{let i=n.get(s.id);return i!==void 0?{...s,target:i}:s})}}),deleteUntranslatedItems:()=>e(r=>({items:r.items.filter(a=>a.target&&a.target!==a.source)})),setMetadata:r=>e({metadata:r}),updateMetadata:r=>e(a=>({metadata:a.metadata?{...a.metadata,...r}:null})),setThemeInfo:(r,a,n)=>e({themeName:r,themeDir:a,translationPath:n}),setTranslationStatus:r=>e(a=>({...a,...r}))})),Yr=Ru(xYe);var Fl=N(Le());er();qt();er();var MT=N(ce()),hne=()=>{let{t:e}=ze();return(0,MT.jsxs)("div",{className:"flex flex-col items-center justify-center h-full p-8 text-center",children:[(0,MT.jsx)(Hm,{className:"w-12 h-12 text-muted-foreground/50 mb-4"}),(0,MT.jsx)("h3",{className:"text-sm font-medium text-muted-foreground mb-1",children:e("Editor.Status.Empty")})]})};qt();var Jr=N(ce()),bYe=Fl.default.memo(({id:e,source:t,target:r,updateItem:a,onEditingIdChange:n})=>{let s=(0,Fl.useCallback)(o=>{let l=o.currentTarget.textContent||"";l!==r&&a(e,l),n(null)},[e,r,a,n]),i=(0,Fl.useCallback)(()=>{n(e)},[e,n]);return(0,Jr.jsx)("div",{contentEditable:!0,suppressContentEditableWarning:!0,onFocus:i,onBlur:s,className:"min-h-[24px] w-full text-sm leading-relaxed focus:outline-none focus:ring-1 focus:ring-primary p-1 rounded break-all whitespace-pre-wrap",children:r},`cell-${e}-${t.slice(0,10)}`)},(e,t)=>e.id===t.id&&e.target===t.target&&e.source===t.source),vYe=Fl.default.forwardRef(({row:e,isSelected:t,dataIndex:r},a)=>(0,Jr.jsx)(su,{ref:a,"data-index":r,id:`theme-row-${e.original.id}`,className:`border-b hover:bg-accent/50 ${t?"bg-accent":""}`,"data-state":t?"selected":void 0,children:e.getVisibleCells().map(n=>(0,Jr.jsx)(Th,{className:"px-1 py-1",children:Fd(n.column.columnDef.cell,n.getContext())},n.id))})),SYe=Fl.default.memo(vYe,(e,t)=>e.isSelected===t.isSelected&&e.row.original===t.row.original),BF=Fl.default.forwardRef(({data:e,editingId:t,onEditingIdChange:r},a)=>{let{t:n}=ze(),s=Yr.use.updateItem(),i=Yr.use.deleteItem(),o=Yr.use.resetItem(),l=(0,Fl.useRef)(null),c=(0,Fl.useMemo)(()=>[{accessorKey:"type",header:()=>(0,Jr.jsx)("div",{className:"text-center",children:n("Editor.Table.ColumnType")}),cell:({row:g})=>{let y=g.original.type?.toLowerCase()||"";if(!y)return null;let b="bg-muted/50 text-muted-foreground/80 border-border/40";return y==="name"?b="bg-blue-500/10 text-blue-600 dark:text-blue-400 border-blue-500/20":y==="title"?b="bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 border-emerald-500/20":y==="description"?b="bg-amber-500/10 text-amber-600 dark:text-amber-400 border-amber-500/20":y==="label"?b="bg-indigo-500/10 text-indigo-600 dark:text-indigo-400 border-indigo-500/20":y==="markdown"&&(b="bg-pink-500/10 text-pink-600 dark:text-pink-400 border-pink-500/20"),(0,Jr.jsx)("div",{className:"flex justify-center px-1",children:(0,Jr.jsx)("span",{className:`text-[10px] font-bold uppercase tracking-wider font-mono px-1.5 py-0.5 rounded-sm whitespace-nowrap border select-none ${b}`,children:g.original.type})})}},{accessorKey:"source",header:()=>(0,Jr.jsx)("div",{className:"text-center pl-4",children:n("Editor.Table.ColumnSource")}),cell:({row:g})=>(0,Jr.jsx)("div",{className:"break-all whitespace-pre-wrap text-sm leading-relaxed px-4 py-1 cursor-text select-text opacity-90",children:g.original.source})},{accessorKey:"target",header:()=>(0,Jr.jsx)("div",{className:"text-center",children:n("Editor.Table.ColumnTarget")}),cell:({row:g})=>(0,Jr.jsx)(bYe,{id:g.original.id,source:g.original.source||"",target:g.original.target,updateItem:s,onEditingIdChange:r})},{id:"actions",header:()=>(0,Jr.jsx)("div",{className:"text-center",children:n("Editor.Table.ColumnActions")}),cell:({row:g})=>(0,Jr.jsxs)("div",{className:"flex items-center justify-center gap-1",children:[(0,Jr.jsx)(Te,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-primary",onClick:y=>{y.stopPropagation(),o(g.original.id)},title:n("Editor.Actions.Restore"),disabled:g.original.source===g.original.target,children:(0,Jr.jsx)(zs,{className:"h-3 w-3"})}),(0,Jr.jsx)(Te,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:y=>{y.stopPropagation(),i(g.original.id)},title:n("Common.Actions.Delete"),children:(0,Jr.jsx)(Ha,{className:"h-3 w-3"})})]})}],[r,s,o,i]),u=Pb({data:e,columns:c,getCoreRowModel:Eb(),getRowId:g=>String(g.id)}),{rows:d}=u.getRowModel(),f=ni({count:d.length,getScrollElement:()=>l.current,estimateSize:()=>48,overscan:20});if(!e||e.length===0)return(0,Jr.jsx)(is,{ref:a,className:"w-full h-full p-0 overflow-hidden flex flex-col border",children:(0,Jr.jsx)(hne,{})});let p=f.getVirtualItems(),m=f.getTotalSize(),h=p.length>0?p[0].start:0,x=p.length>0?m-p[p.length-1].end:0;return(0,Jr.jsx)(is,{ref:a,className:"w-full h-full p-0 overflow-hidden flex flex-col border",children:(0,Jr.jsx)("div",{ref:l,className:"flex-1 h-full overflow-auto",style:{overflowAnchor:"none",willChange:"transform"},children:(0,Jr.jsxs)("table",{className:"w-full caption-bottom text-sm",children:[(0,Jr.jsx)(bh,{children:u.getHeaderGroups().map(g=>(0,Jr.jsx)(su,{children:g.headers.map(y=>(0,Jr.jsx)(Sh,{className:`${y.id==="actions"||y.id==="type"?"w-[1%] whitespace-nowrap px-4":"px-4"} sticky top-0 bg-background z-20 shadow-sm border-b ring-0`,style:{backgroundColor:"var(--background-primary)"},children:y.isPlaceholder?null:Fd(y.column.columnDef.header,y.getContext())},y.id))},g.id))}),(0,Jr.jsxs)(vh,{children:[h>0&&(0,Jr.jsx)("tr",{children:(0,Jr.jsx)("td",{colSpan:c.length,style:{height:h,padding:0,border:"none"}})}),p.map(g=>{let y=d[g.index];return(0,Jr.jsx)(SYe,{ref:f.measureElement,dataIndex:g.index,row:y,isSelected:y.original.id===t},y.id)}),x>0&&(0,Jr.jsx)("tr",{children:(0,Jr.jsx)("td",{colSpan:c.length,style:{height:x,padding:0,border:"none"}})})]})]})})})});BF.displayName="ThemeTable";var Ib=N(Le()),YA=N(require("path"));qt();er();Vt();var nr=N(ce()),UF=(0,Ib.memo)(()=>{let{t:e}=ze(),t=Yr.use.metadata(),r=Yr.use.themeName(),a=Yr.use.translationPath(),n=Yr.use.updateMetadata(),s=He(c=>c.i18n),i=He(c=>c.editorThemeTranslation),[o,l]=(0,Ib.useState)(null);return(0,Ib.useEffect)(()=>{if(s?.sourceManager&&a)try{let c=YA.extname(a),u=YA.basename(a,c),d=s.sourceManager.getSource(u);d&&l({...d})}catch{}},[s,a,i]),(0,nr.jsx)(qr,{title:e("Editor.Titles.Metadata"),icon:Oa,children:(0,nr.jsxs)("div",{className:"space-y-3.5",children:[(0,nr.jsxs)("div",{className:"space-y-1.5 focus-within:z-10",children:[(0,nr.jsxs)("label",{className:"text-xs font-semibold text-muted-foreground/70 uppercase tracking-wider flex items-center gap-1.5 px-0.5",children:[(0,nr.jsx)(Oa,{className:"w-3.5 h-3.5"}),e("Editor.Labels.ThemeName")]}),(0,nr.jsx)(Qe,{value:r||e("Common.Status.Unknown"),readOnly:!0,disabled:!0,className:"h-8 text-xs bg-muted/30 text-muted-foreground border-dashed px-2.5"})]}),(0,nr.jsxs)("div",{className:"space-y-3",children:[(0,nr.jsxs)("div",{className:"space-y-1.5",children:[(0,nr.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5 px-0.5",children:[(0,nr.jsx)(Qm,{className:"w-3.5 h-3.5"}),e("Editor.Table.ColumnTarget")]}),(0,nr.jsx)(Qe,{value:t?.title||"",onChange:c=>n({title:c.target.value}),placeholder:e("Editor.Labels.DescPlaceholder"),className:"h-8 text-sm px-2.5"})]}),(0,nr.jsxs)("div",{className:"space-y-1.5",children:[(0,nr.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5 px-0.5",children:[(0,nr.jsx)(Mo,{className:"w-3.5 h-3.5"}),e("Editor.Labels.Desc")]}),(0,nr.jsx)(Qe,{value:t?.description||"",onChange:c=>n({description:c.target.value}),placeholder:e("Editor.Labels.DescPlaceholder"),className:"h-8 text-sm px-2.5"})]}),(0,nr.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,nr.jsxs)("div",{className:"space-y-1.5",children:[(0,nr.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5 px-0.5",children:[(0,nr.jsx)(Ea,{className:"w-3.5 h-3.5"}),e("Editor.Labels.Lang")]}),(0,nr.jsx)(Qe,{value:t?.language||"",onChange:c=>n({language:c.target.value}),placeholder:e("Editor.Labels.Lang"),className:"h-8 text-sm px-2.5"})]}),(0,nr.jsxs)("div",{className:"space-y-1.5",children:[(0,nr.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5 px-0.5",children:[(0,nr.jsx)(Wc,{className:"w-3.5 h-3.5"}),e("Editor.Labels.Author")]}),(0,nr.jsx)(Qe,{value:t?.author||"",onChange:c=>n({author:c.target.value}),placeholder:e("Editor.Labels.Author"),className:"h-8 text-sm px-2.5"})]})]}),(0,nr.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,nr.jsxs)("div",{className:"space-y-1.5",children:[(0,nr.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5 px-0.5",children:[(0,nr.jsx)(sa,{className:"w-3.5 h-3.5"}),e("Editor.Labels.SupportedVer")]}),(0,nr.jsx)(Qe,{value:t?.supportedVersions||"",onChange:c=>n({supportedVersions:c.target.value}),placeholder:e("Editor.Labels.Ver"),className:"h-8 text-sm px-2.5"})]}),(0,nr.jsxs)("div",{className:"space-y-1.5",children:[(0,nr.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5 px-0.5",children:[(0,nr.jsx)(rd,{className:"w-3.5 h-3.5"}),e("Editor.Labels.Ver")]}),(0,nr.jsx)(Qe,{value:t?.version||"",onChange:c=>n({version:c.target.value}),placeholder:e("Editor.Labels.Ver"),className:"h-8 text-sm px-2.5"})]})]})]}),(0,nr.jsxs)("div",{className:"grid grid-cols-2 gap-3 pt-0.5",children:[(0,nr.jsxs)("div",{className:"space-y-1.5",children:[(0,nr.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5 px-0.5",children:[o?.origin==="cloud"?(0,nr.jsx)(Ca,{className:"w-3.5 h-3.5"}):(0,nr.jsx)(Lo,{className:"w-3.5 h-3.5"}),e("Editor.Labels.Source")]}),(0,nr.jsx)("div",{className:"flex items-center h-8 px-2.5 text-sm bg-muted/50 text-muted-foreground font-medium border rounded-md",children:o?.origin==="cloud"?e("Editor.Labels.SourceCloud"):e("Editor.Labels.SourceLocal")})]}),(0,nr.jsxs)("div",{className:"space-y-1.5",children:[(0,nr.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5 px-0.5",children:[(0,nr.jsx)(rd,{className:"w-3.5 h-3.5"}),e("Editor.Labels.Checksum")]}),(0,nr.jsx)(Qe,{value:o?.checksum?.substring(0,8)||"-",readOnly:!0,disabled:!0,className:"h-8 text-sm bg-muted/50 text-muted-foreground font-mono px-2.5",title:o?.checksum})]})]})]})})});UF.displayName="ThemeMetadataCard";var Qh=N(Le());er();qt();var JA=N(Le());qt();er();var Kn=N(ce()),jF=(0,JA.memo)(()=>{let{t:e}=ze(),t=Yr.use.items(),r=(0,JA.useMemo)(()=>{let a=t.length,n=t.filter(o=>o.target&&o.target!==o.source).length,s=a-n,i=a>0?Math.round(n/a*100):0;return{total:a,translated:n,untranslated:s,percentage:i}},[t]);return(0,Kn.jsx)(qr,{title:e("Editor.Stats.Title"),icon:jf,children:(0,Kn.jsxs)("div",{className:"space-y-3",children:[(0,Kn.jsxs)("div",{className:"space-y-1.5",children:[(0,Kn.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Kn.jsx)("span",{className:"text-xs text-muted-foreground",children:e("Editor.Stats.Progress")}),(0,Kn.jsxs)("span",{className:"text-xs font-semibold text-primary",children:[r.percentage,"%"]})]}),(0,Kn.jsx)("div",{className:"w-full h-2 bg-muted rounded-full overflow-hidden",children:(0,Kn.jsx)("div",{className:"h-full bg-primary rounded-full transition-all duration-500 ease-out",style:{width:`${r.percentage}%`}})})]}),(0,Kn.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,Kn.jsxs)("div",{className:"text-center p-1.5 rounded-md bg-muted/50",children:[(0,Kn.jsx)("div",{className:"text-lg font-bold text-foreground",children:r.total}),(0,Kn.jsx)("div",{className:"text-[10px] text-muted-foreground",children:e("Editor.Stats.TotalItems")})]}),(0,Kn.jsxs)("div",{className:"text-center p-1.5 rounded-md bg-green-500/10",children:[(0,Kn.jsx)("div",{className:"text-lg font-bold text-green-600 dark:text-green-400",children:r.translated}),(0,Kn.jsx)("div",{className:"text-[10px] text-muted-foreground",children:e("Editor.Stats.Translated")})]}),(0,Kn.jsxs)("div",{className:"text-center p-1.5 rounded-md bg-red-500/10",children:[(0,Kn.jsx)("div",{className:"text-lg font-bold text-red-500 dark:text-red-400",children:r.untranslated}),(0,Kn.jsx)("div",{className:"text-[10px] text-muted-foreground",children:e("Editor.Stats.Untranslated")})]})]})]})})});jF.displayName="ThemeStatsCard";var Jh=N(Le());qt();er();var fo=N(ce()),zF=(0,Jh.memo)(()=>{let{t:e}=ze(),t=Yr.use.addItem(),[r,a]=(0,Jh.useState)(""),[n,s]=(0,Jh.useState)(""),i=(0,Jh.useCallback)(()=>{if(!r.trim())return;let o=Yr.getState().items,l=o.length>0?Math.max(...o.map(c=>c.id))+1:0;t({id:l,source:r.trim(),target:n.trim()||r.trim()}),a(""),s("")},[r,n,t]);return(0,fo.jsx)(qr,{title:e("Editor.Titles.Insert"),icon:as,children:(0,fo.jsxs)("div",{className:"space-y-3.5",children:[(0,fo.jsxs)("div",{className:"space-y-1",children:[(0,fo.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5 px-0.5",children:[(0,fo.jsx)(Qm,{className:"w-3.5 h-3.5"}),e("Editor.Actions.Source")]}),(0,fo.jsx)(Qe,{value:r,onChange:o=>a(o.target.value),placeholder:e("Editor.Ast.InputSourcePlaceholder"),className:"h-8 text-sm px-2.5"})]}),(0,fo.jsxs)("div",{className:"space-y-1",children:[(0,fo.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5 px-0.5",children:[(0,fo.jsx)(Mo,{className:"w-3.5 h-3.5"}),e("Editor.Actions.Trans")]}),(0,fo.jsx)(Qe,{value:n,onChange:o=>s(o.target.value),placeholder:e("Common.Placeholders.Search"),className:"h-8 text-sm px-2.5",onKeyDown:o=>{o.key==="Enter"&&i()}})]}),(0,fo.jsxs)(Te,{variant:"secondary",onClick:i,disabled:!r.trim(),className:"w-full h-8 gap-1.5 font-medium transition-all",children:[(0,fo.jsx)(as,{className:"w-3.5 h-3.5"}),e("Editor.Actions.Add")]})]})})});zF.displayName="ThemeInsertCard";qt();er();var Lt=N(ce()),gne=({controller:e})=>{let{t}=ze(),{state:r,actions:a}=e,{language:n,style:s,batchSize:i,concurrencyLimit:o,overwrite:l,inputError:c,concurrencyError:u,isTranslating:d,progress:f,processedCount:p,totalCount:m,currentBatch:h,totalBatches:x,targetItems:g,timeout:y,timeoutError:b}=r,{setLanguage:S,setStyle:w,setBatchSize:P,setConcurrencyLimit:C,setOverwrite:I,handleBatchSizeBlur:R,handleConcurrencyLimitBlur:O,handleTimeoutChange:D,handleTimeoutBlur:W,handleBatchTranslation:J,handleStop:me}=a;return(0,Lt.jsxs)(qr,{title:t("Editor.Titles.Ai"),icon:ns,className:"flex flex-col gap-4",children:[(0,Lt.jsxs)("div",{className:"grid grid-cols-1 gap-3",children:[(0,Lt.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Lt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Lt.jsx)(Ro,{className:"w-3.5 h-3.5"}),t("Editor.Labels.SelectLang")]}),(0,Lt.jsxs)("div",{className:"flex gap-2",children:[(0,Lt.jsxs)(lr,{value:Yn.some(Z=>Z.value===n)?n:void 0,onValueChange:S,children:[(0,Lt.jsx)(ur,{size:"sm",className:"w-[110px] text-xs bg-background",children:(0,Lt.jsx)(cr,{placeholder:t("Editor.Labels.SelectLang")})}),(0,Lt.jsx)(dr,{children:Yn.map(Z=>(0,Lt.jsx)(Rt,{value:Z.value,className:"text-xs",children:Z.label},Z.value))})]}),(0,Lt.jsx)(Qe,{value:n,onChange:Z=>S(Z.target.value),placeholder:t("Editor.Labels.CustomLang"),className:"h-8 text-xs bg-background flex-1"})]})]}),(0,Lt.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Lt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Lt.jsx)(Oa,{className:"w-3.5 h-3.5"}),t("Editor.Labels.SelectStyle")]}),(0,Lt.jsxs)("div",{className:"flex gap-2",children:[(0,Lt.jsxs)(lr,{value:Ed.some(Z=>Z.value===s)?s:void 0,onValueChange:w,children:[(0,Lt.jsx)(ur,{size:"sm",className:"w-[110px] text-xs bg-background",children:(0,Lt.jsx)(cr,{placeholder:t("Editor.Labels.SelectStyle")})}),(0,Lt.jsx)(dr,{children:Ed.map(Z=>(0,Lt.jsx)(Rt,{value:Z.value,className:"text-xs",children:Z.label},Z.value))})]}),(0,Lt.jsx)(Qe,{value:s,onChange:Z=>w(Z.target.value),placeholder:t("Editor.Labels.CustomStyle"),className:"h-8 text-xs bg-background flex-1"})]})]}),(0,Lt.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,Lt.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Lt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Lt.jsx)(sa,{className:"w-3.5 h-3.5"}),t("Editor.Labels.BatchSize")]}),(0,Lt.jsx)(Qe,{type:"number",min:1,value:i,onChange:P,onBlur:R,className:`h-8 text-xs bg-background ${c?"border-red-500 focus-visible:ring-red-500":""}`})]}),(0,Lt.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Lt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Lt.jsx)(Sl,{className:"w-3.5 h-3.5"}),t("Editor.Labels.Concurrency")]}),(0,Lt.jsx)(Qe,{type:"number",min:1,value:o,onChange:C,onBlur:O,className:`h-8 text-xs bg-background ${u?"border-red-500 focus-visible:ring-red-500":""}`})]})]}),(0,Lt.jsxs)("div",{className:"grid grid-cols-2 gap-3 items-end",children:[(0,Lt.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Lt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Lt.jsx)(Ti,{className:"w-3.5 h-3.5"}),t("Editor.Labels.Timeout")]}),(0,Lt.jsx)(Qe,{type:"number",min:100,step:1e3,value:y,onChange:D,onBlur:W,className:`h-8 text-xs bg-background ${b?"border-red-500 focus-visible:ring-red-500":""}`})]}),(0,Lt.jsxs)("div",{className:"flex items-center space-x-2 h-8",children:[(0,Lt.jsx)(El,{id:"overwrite-mode-theme",checked:l,onCheckedChange:Z=>I(Z)}),(0,Lt.jsx)("label",{htmlFor:"overwrite-mode-theme",className:"text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-muted-foreground cursor-pointer",children:t("Editor.Labels.Overwrite")})]})]}),!d&&g.length>0&&(0,Lt.jsxs)("div",{className:"flex items-center justify-between p-2 rounded-md bg-muted/30 border border-border/50 animate-in fade-in slide-in-from-top-1 duration-300",children:[(0,Lt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Lt.jsx)(Qu,{className:"w-3.5 h-3.5 text-primary"}),(0,Lt.jsx)("span",{className:"text-[10px] font-medium text-muted-foreground uppercase tracking-wider",children:t("Editor.Labels.ExpectedConsumption")})]}),(0,Lt.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,Lt.jsxs)(mt,{variant:"secondary",className:"text-[10px] px-1.5 py-0 h-4 font-mono",children:[r.estimation.tokens," Tokens"]}),(0,Lt.jsxs)("span",{className:"text-[10px] text-muted-foreground/80",children:["\u2248 \xA5",r.estimation.cost.toFixed(4)]})]})]}),d&&(0,Lt.jsxs)("div",{className:"flex flex-col gap-1.5 animate-in fade-in zoom-in duration-300",children:[(0,Lt.jsxs)("div",{className:"flex justify-between text-xs text-muted-foreground",children:[(0,Lt.jsx)("span",{children:t("Editor.Status.ProcessingBatch",{current:h,total:x})}),(0,Lt.jsxs)("span",{children:[p," / ",m]})]}),(0,Lt.jsx)(ap,{value:f,className:"h-2"})]})]}),(0,Lt.jsx)("div",{className:"grid grid-cols-1 gap-3 pt-2",children:d?(0,Lt.jsxs)(Te,{variant:"destructive",size:"sm",onClick:me,className:"text-xs h-8 gap-1.5 font-medium w-full",children:[(0,Lt.jsx)(Sl,{className:"w-3.5 h-3.5 fill-current"}),t("Common.Actions.StopTranslate")]}):(0,Lt.jsxs)(Te,{variant:"default",size:"sm",onClick:J,disabled:g.length===0||c,className:"text-xs h-8 gap-1.5 font-medium w-full transition-all duration-200 hover:opacity-90 active:scale-[0.98]",children:[(0,Lt.jsx)(ns,{className:"w-3.5 h-3.5"}),g.length>0?t("Editor.Actions.BatchTranslate",{count:g.length}):t("Common.Notices.NoItemsToTranslate")]})})]})};var Gs=N(Le());Vt();Rr();var yne=()=>{let{items:e,updateItems:t,isTranslating:r,progress:a,processedCount:n,totalCount:s,overwrite:i,setTranslationStatus:o}=Yr(),l=Dc.use.i18n(),[c,u]=(0,Gs.useState)(l.settings.language||l.settings.llmLanguage||"zh-cn"),[d,f]=(0,Gs.useState)(l.settings.llmStyle),[p,m]=(0,Gs.useState)(l.settings.llmBatchSize?.toString()||"20"),[h,x]=(0,Gs.useState)(l.settings.llmConcurrencyLimit?.toString()||"3"),[g,y]=(0,Gs.useState)(!1),[b,S]=(0,Gs.useState)(!1),[w,P]=(0,Gs.useState)(l.settings.llmTimeout?.toString()||"60000"),[C,I]=(0,Gs.useState)(!1),[R,O]=(0,Gs.useState)(0),[D,W]=(0,Gs.useState)(0),J=(0,Gs.useRef)(null),me=(0,Gs.useMemo)(()=>e.filter($=>i||!$.target||$.target.trim()===""||$.target===$.source),[e,i]);(0,Gs.useEffect)(()=>{u(l.settings.language||l.settings.llmLanguage||"zh-cn"),f(l.settings.llmStyle),m(l.settings.llmBatchSize?.toString()||"20"),x(l.settings.llmConcurrencyLimit?.toString()||"3"),P(l.settings.llmTimeout?.toString()||"60000")},[l.settings.language,l.settings.llmLanguage,l.settings.llmStyle,l.settings.llmBatchSize,l.settings.llmConcurrencyLimit,l.settings.llmTimeout]);let Z=$=>{Object.assign(l.settings,$),l.saveSettings()};return{state:{language:c,style:d,batchSize:p,concurrencyLimit:h,overwrite:i,inputError:g,concurrencyError:b,isTranslating:r,progress:a,processedCount:n,totalCount:s,currentBatch:R,totalBatches:D,targetItems:me,timeout:w,timeoutError:C,get estimation(){return mc().estimateTokens(me,"theme")}},actions:{setLanguage:$=>{u($),Z({language:$,llmLanguage:$})},setStyle:$=>{f($),Z({llmStyle:$})},setBatchSize:$=>{let A=$.target.value;m(A);let K=parseInt(A,10);isNaN(K)||K<=0?y(!0):y(!1)},setConcurrencyLimit:$=>{let A=$.target.value;x(A);let K=parseInt(A,10);isNaN(K)||K<=0?S(!0):S(!1)},setOverwrite:$=>o({overwrite:$}),handleTimeoutChange:$=>{let A=$.target.value;P(A);let K=parseInt(A,10);isNaN(K)||K<=0?I(!0):I(!1)},handleBatchSizeBlur:()=>{let $=parseInt(p,10);!isNaN($)&&$>0?(Z({llmBatchSize:$}),y(!1)):(m(l.settings.llmBatchSize?.toString()||"20"),y(!1))},handleConcurrencyLimitBlur:()=>{let $=parseInt(h,10);!isNaN($)&&$>0?(Z({llmConcurrencyLimit:$}),S(!1)):(x(l.settings.llmConcurrencyLimit?.toString()||"3"),S(!1))},handleTimeoutBlur:()=>{let $=parseInt(w,10);!isNaN($)&&$>0?(Z({llmTimeout:$}),I(!1)):(P(l.settings.llmTimeout?.toString()||"60000"),I(!1))},handleBatchTranslation:async()=>{if(!r){if(me.length===0){Ni.info(v("Common.Notices.NoItemsToTranslate"));return}o({isTranslating:!0,processedCount:0,totalCount:me.length,progress:0}),O(0),W(1),J.current=new AbortController;try{await mc().themeTranslate(me,async(A,K,he)=>{let H=Math.min(Math.round(K/he*me.length),me.length);o({processedCount:H,progress:K/he*100}),O(K),W(he);let xe=A.map(Pe=>({id:Pe.id,target:Pe.target}));t(xe)},J.current.signal),Ni.success(v("Common.Notices.BatchTranslateSuccess"))}catch($){$.name==="AbortError"||$.message==="\u7FFB\u8BD1\u4EFB\u52A1\u5DF2\u53D6\u6D88"||J.current?.signal.aborted||Ni.error(v("Common.Notices.TranslateFail",{message:$.message}))}finally{J.current&&(o({isTranslating:!1}),J.current=null)}}},handleStop:()=>{J.current&&(J.current.abort(),J.current=null,o({isTranslating:!1}),Ni.info(v("Common.Notices.TaskStopped")))}}}};var Ua=N(ce()),VF=(0,Qh.memo)(({onIncrementalExtract:e,onOpenFile:t,isApplied:r})=>{let{t:a}=ze(),n=Yr.use.deleteUntranslatedItems(),[s,i]=(0,Qh.useState)(!0),[o,l]=(0,Qh.useState)(!0),[c,u]=(0,Qh.useState)(!0),[d,f]=(0,Qh.useState)(!0),p=yne();return(0,Ua.jsxs)("div",{className:"flex flex-col h-full",children:[(0,Ua.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 border-b shrink-0 min-h-[36px]",children:[(0,Ua.jsxs)("div",{className:"flex items-center text-sm font-semibold gap-1.5",children:[(0,Ua.jsx)(to,{className:"w-4 h-4"}),(0,Ua.jsx)("span",{children:a("Editor.Titles.Sidebar")})]}),(0,Ua.jsxs)(Vn,{children:[(0,Ua.jsx)(qn,{asChild:!0,children:(0,Ua.jsxs)(Te,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",children:[(0,Ua.jsx)(ko,{className:"w-4 h-4"}),(0,Ua.jsx)("span",{className:"sr-only",children:a("Editor.Labels.SidebarViewOptions")})]})}),(0,Ua.jsxs)(Hn,{align:"end",className:"w-48",children:[(0,Ua.jsx)(Ex,{children:a("Editor.Labels.SidebarShowCards")}),(0,Ua.jsx)(Ml,{}),(0,Ua.jsx)(Ai,{checked:s,onCheckedChange:i,children:a("Editor.Stats.Title")}),(0,Ua.jsx)(Ai,{checked:o,onCheckedChange:l,children:a("Editor.Titles.Insert")}),(0,Ua.jsx)(Ai,{checked:c,onCheckedChange:u,children:a("Editor.Titles.QuickActions")}),(0,Ua.jsx)(Ai,{checked:d,onCheckedChange:f,children:a("Editor.Titles.Ai")})]})]})]}),(0,Ua.jsx)(sr,{className:"flex-1 min-h-0 px-2 pb-2",children:(0,Ua.jsxs)("div",{className:"space-y-4 pb-4",children:[s&&(0,Ua.jsx)(jF,{}),o&&(0,Ua.jsx)(zF,{}),c&&(0,Ua.jsx)(Ih,{onIncrementalExtract:e||(()=>{}),onClearUntranslated:n,onOpenFile:t,isApplied:r}),d&&(0,Ua.jsx)(gne,{controller:p})]})})]})});VF.displayName="ThemeSidebar";var ir=N(ce()),TYe=Ya.default.memo(({onSave:e,isSaving:t})=>{let{t:r}=ze(),a=Yr.use.items();return(0,ir.jsxs)(Te,{variant:"default",size:"sm",onClick:e,disabled:t,className:"shadow-sm hover:shadow-md transition-all active:scale-95 bg-primary hover:bg-primary/90",children:[t?(0,ir.jsx)(zt,{className:"mr-2 h-4 w-4 animate-spin"}):(0,ir.jsx)(id,{className:"mr-2 h-4 w-4"}),r("Editor.Actions.Save"),(0,ir.jsx)(mt,{variant:"secondary",className:"ml-2 bg-primary-foreground/20 text-primary-foreground border-none px-1 h-4",children:a.length})]})}),wYe=()=>{let{t:e}=ze(),t=He.getState().i18n,r=t.notice,a=He.getState().editorThemeTranslation,n=He.getState().editorThemeName,s=He.getState().editorThemeDir,i=He.getState().editorThemeTranslationPath,o=Yr.use.themeName(),l=Yr.use.setItems(),c=Yr.use.setMetadata(),u=Yr.use.setThemeInfo(),d=Yr.use.addItem(),f=(0,Ya.useRef)(!1),p=(0,Ya.useRef)(!1),[m,h]=(0,Ya.useState)(!1),[x,g]=(0,Ya.useState)(""),[y,b]=(0,Ya.useState)("all"),S=(0,Ya.useDeferredValue)(x),w=(0,Ya.useDeferredValue)(y),[P,C]=(0,Ya.useState)(null),I=(0,Ya.useMemo)(()=>!o||!t?.stateManager?!1:!!t.stateManager.getThemeState(o)?.isApplied,[o,t?.stateManager,m]);(0,Ya.useEffect)(()=>{if(!f.current){if(a?.dict&&Array.isArray(a.dict)){let Z=a.dict.map((q,V)=>({id:q.id!==void 0?q.id:V,type:q.type||"unknown",source:q.source,target:q.target}));l(Z)}if(a?.metadata)c(a.metadata);else if(a?.manifest){let Z=a.manifest;c({theme:n||"",language:"zh-cn",version:"1.0.0",supportedVersions:Z.pluginVersion||"0.0.0",title:n||"",description:"",author:""})}n&&u(n,s||"",i||""),f.current=!0}},[a,n,s,i,l,c,u]);let R=Yr.use.items(),O=Yr.use.metadata(),D=(0,Ya.useMemo)(()=>{let Z=R;if(w==="translated"?Z=Z.filter(q=>q.target&&q.target!==q.source):w==="untranslated"&&(Z=Z.filter(q=>!q.target||q.target===q.source)),S.trim()){let q=S.toLowerCase();Z=Z.filter(V=>V.source&&V.source.toLowerCase().includes(q)||V.target&&V.target.toLowerCase().includes(q))}return Z},[R,S,w]),W=(0,Ya.useCallback)(async()=>{if(!p.current){p.current=!0,h(!0);try{let{items:Z,metadata:q,translationPath:V}=Yr.getState(),k=He.getState().i18n,_=Z.map(ie=>({type:ie.type||"unknown",source:ie.source,target:ie.target})),ee={schemaVersion:1,metadata:q||{theme:n||"",language:"zh-cn",version:"1.0.0",supportedVersions:"0.0.0",title:n||"",description:"",author:""},dict:_};if(V){if(Mx(V,ee),He.setState({editorThemeTranslation:ee}),k?.sourceManager)try{let ie=zp.extname(V),ae=zp.basename(V,ie),ge=k.sourceManager.getSource(ae);ge&&(ge.origin==="cloud"&&(ge.origin="local",ge.cloud=void 0),k.sourceManager.saveSource(ge))}catch{}r.successPrefix(e("Editor.Titles.Main"),e("Common.Notices.SaveSuccess"))}else r.errorPrefix(e("Editor.Titles.Main"),e("Editor.Errors.SavePathMissing"))}catch(Z){r.errorPrefix(e("Editor.Titles.Main"),e("Common.Notices.SaveFail"),Z)}finally{p.current=!1,h(!1)}}},[r,e,n]),J=(0,Ya.useCallback)(async()=>{try{let{themeName:Z,themeDir:q}=Yr.getState();if(!!t.stateManager.getThemeState(Z)?.isApplied){r.error(e("Editor.Actions.IncrementalExtractDisabledTip"));return}let L=zp.join(q,"theme.css");if(!Vp.existsSync(L)){r.error(e("Editor.Errors.FileNotFound")+": theme.css");return}let k=Vp.readFileSync(L).toString(),_=zp.join(q,"manifest.json"),ee={name:Z,version:"0.0.0",minAppVersion:"",author:"",authorUrl:""};if(Vp.existsSync(_))try{ee=Vp.readJsonSync(_)}catch{}let ie=k2(ee,k,t.settings),ae=Yr.getState().items,ge=new Set(ae.map(A=>A.source)),ue=ae.length>0?Math.max(...ae.map(A=>A.id))+1:0,$=[];for(let A of ie.dict)ge.has(A.source)||$.push({id:ue++,type:A.type,source:A.source,target:A.target});$.length>0?(Yr.setState(A=>({items:[...A.items,...$]})),r.success(e("Editor.Hints.ExtractSummary",{count:$.length}))):r.success(e("Editor.Hints.NoNewItems"))}catch(Z){r.error(e("Editor.Actions.IncrementalExtract")+" "+e("Common.Status.Failure")+": "+Z)}},[r,e,t.settings]),me=(0,Ya.useCallback)(async()=>{try{let{themeDir:Z}=Yr.getState(),q=zp.join(Z,"theme.css");if(!Vp.existsSync(q)){r.error(e("Common.Notices.ThemeNotFound"));return}let{i18nOpen:V}=await Promise.resolve().then(()=>(GC(),G2));V(t,q)}catch(Z){r.error(e("Editor.Actions.OpenFile")+" "+e("Common.Status.Failure")+": "+Z)}},[t,r,e]);return(0,Ya.useEffect)(()=>{let Z=q=>{(q.ctrlKey||q.metaKey)&&(q.key==="s"||q.key==="S"||q.code==="KeyS")&&(q.preventDefault(),q.stopPropagation(),W())};return window.addEventListener("keydown",Z,!0),()=>{window.removeEventListener("keydown",Z,!0)}},[W]),(0,ir.jsx)("div",{className:"h-full flex flex-col gap-0 bg-background/50 backdrop-blur-md",children:(0,ir.jsxs)(zP,{direction:"horizontal",className:"h-full border-none",children:[(0,ir.jsx)(dp,{defaultSize:20,minSize:10,maxSize:30,className:"h-full",children:(0,ir.jsx)("div",{className:"flex flex-col h-full py-2 pl-2 pr-1",children:(0,ir.jsxs)("div",{className:"flex flex-col h-full flex-1 min-h-0 rounded-lg border",children:[(0,ir.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border-b shrink-0 min-h-[36px]",children:[(0,ir.jsx)(ed,{className:"w-4 h-4 text-primary shrink-0"}),(0,ir.jsx)("span",{className:"text-sm font-semibold truncate",children:o||e("Common.Labels.Themes")})]}),(0,ir.jsx)("div",{className:"flex flex-col w-full flex-1 min-h-0 p-2",children:(0,ir.jsx)(sr,{className:"flex-1 min-h-0 pr-3 -mr-3",children:(0,ir.jsxs)("div",{className:"space-y-3 pb-2",children:[(0,ir.jsx)(qr,{title:e("Editor.Titles.Main"),icon:ed,children:(0,ir.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,ir.jsx)(TYe,{onSave:W,isSaving:m}),(0,ir.jsx)(mt,{variant:"outline",className:"w-full justify-center bg-background/50 border-primary/20 text-primary font-normal truncate text-xs h-8",children:o||e("Common.Labels.Themes")})]})}),(0,ir.jsx)(UF,{})]})})})]})})}),(0,ir.jsx)(wx,{withHandle:!0}),(0,ir.jsx)(dp,{defaultSize:60,minSize:30,className:"h-full",children:(0,ir.jsxs)("main",{className:"w-full h-full flex flex-col px-1 overflow-hidden bg-background/20",children:[(0,ir.jsx)("div",{className:"flex items-center justify-between p-2 gap-2 shrink-0",children:(0,ir.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ir.jsxs)("div",{className:"relative",children:[(0,ir.jsx)(ra,{className:"absolute left-2 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),(0,ir.jsx)(Qe,{className:"h-8 w-64 pl-8",placeholder:e("Common.Placeholders.Search"),value:x,onChange:Z=>g(Z.target.value)})]}),(0,ir.jsxs)(lr,{value:y,onValueChange:Z=>b(Z),children:[(0,ir.jsx)(ur,{size:"sm",className:"w-[100px]",children:(0,ir.jsx)(cr,{placeholder:e("Common.Filters.All")})}),(0,ir.jsxs)(dr,{children:[(0,ir.jsx)(Rt,{value:"all",children:e("Common.Filters.All")}),(0,ir.jsx)(Rt,{value:"translated",children:e("Common.Filters.Translated")}),(0,ir.jsx)(Rt,{value:"untranslated",children:e("Common.Filters.Untranslated")})]})]})]})}),(0,ir.jsx)("div",{className:"flex-1 min-h-0 overflow-hidden p-2 pt-0",children:(0,ir.jsx)(BF,{data:D,editingId:P,onEditingIdChange:C})})]})}),(0,ir.jsx)(wx,{withHandle:!0}),(0,ir.jsx)(dp,{defaultSize:20,minSize:10,maxSize:30,className:"h-full",children:(0,ir.jsx)("div",{className:"flex flex-col h-full py-2 pr-2 pl-1",children:(0,ir.jsx)("div",{className:"flex flex-col h-full flex-1 min-h-0 rounded-lg border",children:(0,ir.jsx)(VF,{onIncrementalExtract:J,onOpenFile:me,isApplied:I})})})})]})})},Nb="theme-editor-view-type",QA=class extends xne.ItemView{constructor(r,a){super(r);this.root=null;this.shadowRoot=null;this.leftCollapsed=!1;this.rightCollapsed=!1;this.i18n=a}getViewType(){return Nb}getDisplayText(){return v("Editor.Titles.Main")}getIcon(){return"palette"}async onOpen(){this.leftCollapsed=this.app.workspace.leftSplit.collapsed,this.rightCollapsed=this.app.workspace.rightSplit.collapsed,this.app.workspace.leftSplit.collapse(),this.app.workspace.rightSplit.collapse();let{root:r,shadowRoot:a}=Do(this.contentEl,this.i18n,Ya.default.createElement(wYe));this.root=r,this.shadowRoot=a}async onClose(){this.leftCollapsed||this.app.workspace.leftSplit.expand(),this.rightCollapsed||this.app.workspace.rightSplit.expand(),this.root?.unmount(),this.shadowRoot?.empty()}};var Sne=require("obsidian");var Lb=N(Le());Vt();var CYe={version:1,sections:[{titleKey:"Wizard.VideoTitle",items:[{type:"card",icon:"PlaySquare",titleKey:"Wizard.VideoTitle",descriptionKey:"Wizard.VideoDesc",action:{type:"url",value:"https://www.bilibili.com/video/BV1VcxJeNExx/"}},{type:"card",icon:"BookOpen",titleKey:"Wizard.DocTitle",descriptionKey:"Wizard.DocDesc",action:{type:"url",value:"https://github.com/eondrcode/obsidian-i18n"}}]},{titleKey:"Wizard.CommunityLabel",titleSuffix:" & ",titleKey2:"Wizard.SupportLabel",items:[{type:"card",icon:"Users",titleKey:"Wizard.QqTitle",descriptionKey:"Wizard.QqDesc",action:{type:"url",value:"https://qm.qq.com/cgi-bin/qm/qr?k=kHTS0iC1FC5igTXbdbKzff6_tc54mOF5&jump_from=webapi&authKey=AoSkriW+nDeDzBPqBl9jcpbAYkPXN2QRbrMh0hFbvMrGbqZyRAbJwaD6JKbOy4Nx"}},{type:"card",icon:"Discord",titleKey:"Wizard.DiscordTitle",descriptionKey:"Wizard.DiscordDesc",action:{type:"url",value:"https://discord.gg/TZjRK6wZ"}},{type:"card",icon:"Github",titleKey:"Wizard.GithubTitle",descriptionKey:"Wizard.GithubDesc",action:{type:"url",value:"https://github.com/eondrcode/obsidian-i18n/issues"}},{type:"card",icon:"Afdian",titleKey:"Wizard.AfdianTitle",descriptionKey:"Wizard.AfdianDesc",action:{type:"url",value:"https://afdian.com/a/eondr"}},{type:"placeholder",textKey:"Wizard.MoreExpect"}]}]};function bne(){return CYe}er();qt();var In=N(ce()),EYe={PlaySquare:Gf,BookOpen:tS,Settings:$c,Cloud:Ca,LayoutGrid:eo,Users:Ts,Github:No,ListTodo:dS,Discord:Hc,Afdian:Vm};function PYe(){let{t:e}=ze(),t=Dc(i=>i.i18n),r=bne(),a=(0,Lb.useCallback)(i=>{switch(i.type){case"url":return()=>window.open(i.value);case"view":return()=>{t?.view.activateView(i.value)};case"settings":return()=>{if(t&&t.app){let o=t.app.setting;o&&(o.open(),o.openTabById(t.manifest.id))}}}},[t]),n=(0,Lb.useCallback)(i=>{if(i.type==="placeholder")return{type:"placeholder",text:e(i.textKey)};let o=i,l=EYe[o.icon];return{type:"card",icon:l?(0,In.jsx)(l,{className:"w-6 h-6"}):null,title:e(o.titleKey),description:e(o.descriptionKey),action:a(o.action)}},[e,a]),s=(0,Lb.useCallback)(i=>{let o=e(i.titleKey);return i.titleSuffix&&i.titleKey2&&(o+=i.titleSuffix+e(i.titleKey2)),o},[e]);return(0,Lb.useMemo)(()=>r.sections.map(i=>({title:s(i),items:i.items.map(n)})),[r,s,n])}var vne=()=>{let{t:e}=ze(),t=Dc(a=>a.i18n),r=PYe();return(0,In.jsxs)("div",{className:"flex flex-col items-center h-full p-6 space-y-6 bg-background pb-12 overflow-y-auto",children:[(0,In.jsxs)("div",{className:"text-center space-y-2 mt-2",children:[(0,In.jsx)("h1",{className:"text-2xl font-bold tracking-tight text-primary",children:"Obsidian-I18N"}),(0,In.jsxs)("p",{className:"text-sm text-muted-foreground",children:["I18N ",e("Wizard.VerLabel")," ",t?.manifest?.version||e("Common.Status.Unknown")]})]}),(0,In.jsx)("div",{className:"w-full max-w-3xl space-y-6",children:r.map((a,n)=>(0,In.jsxs)("div",{className:"space-y-3",children:[(0,In.jsx)("h2",{className:"text-lg font-semibold tracking-tight",children:a.title}),(0,In.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:a.items.map((s,i)=>s.type==="placeholder"?(0,In.jsx)("div",{className:"h-full",children:(0,In.jsx)(is,{className:"h-full border-dashed border-2 bg-transparent/50 shadow-none flex flex-col justify-center items-center opacity-70 transition-colors p-4 min-h-[82px]",children:(0,In.jsx)("span",{className:"text-muted-foreground text-sm font-medium",children:s.text})})},i):(0,In.jsx)("div",{onClick:s.action,className:"h-full",children:(0,In.jsx)(is,{className:"hover:bg-accent/50 group transition-colors cursor-pointer h-full flex flex-col justify-center",children:(0,In.jsxs)(Qf,{className:"flex flex-row items-center gap-3 space-y-0 p-4",children:[(0,In.jsx)("div",{className:"text-primary shrink-0 transition-transform group-hover:scale-110",children:s.icon}),(0,In.jsxs)("div",{className:"space-y-0.5",children:[(0,In.jsx)(Zf,{className:"text-sm font-medium leading-tight",children:s.title}),(0,In.jsx)(NS,{className:"text-xs line-clamp-2",children:s.description})]})]})})},i))})]},n))})]})};Vt();Rr();var Tne=N(ce()),Rb="wizard-view",ZA=class extends Sne.ItemView{constructor(r,a){super(r);this.root=null;this.shadowRoot=null;this.i18n=a}getViewType(){return Rb}getDisplayText(){return v("Wizard.MainTitle")}getIcon(){return"sparkles"}async onOpen(){let{root:r,shadowRoot:a}=Do(this.contentEl,this.i18n,(0,Tne.jsx)(vne,{}));this.root=r,this.shadowRoot=a}async onClose(){this.root?.unmount(),this.shadowRoot&&(this.shadowRoot.innerHTML="")}};var Cne=require("obsidian");var eI=N(Le());er();var qF=[{title:"1. \u534F\u8BAE\u7684\u8BA2\u7ACB\u4E0E\u751F\u6548",content:['1.1 \u672C\u534F\u8BAE\u662F\u60A8\uFF08\u7528\u6237\uFF09\u4E0E\u672C\u63D2\u4EF6\u5F00\u53D1\u8005\uFF08\u4EE5\u4E0B\u7B80\u79F0 "\u5F00\u53D1\u8005"\uFF09\u4E4B\u95F4\u5173\u4E8E\u4F7F\u7528\u300AI18N\u300B\uFF08\u4EE5\u4E0B\u7B80\u79F0 "\u672C\u63D2\u4EF6"\uFF09\u7684\u6CD5\u5F8B\u534F\u8BAE\u3002','1.2 [\u91CD\u8981\u63D0\u793A] \u5728\u5B89\u88C5\u3001\u542F\u7528\u672C\u63D2\u4EF6\u524D\uFF0C\u8BF7\u52A1\u5FC5\u8BA4\u771F\u9605\u8BFB\u672C\u534F\u8BAE\u5168\u90E8\u6761\u6B3E\uFF0C\u7279\u522B\u662F\u52A0\u7C97\u6216\u6D89\u53CA\u98CE\u9669\u7684\u63D0\u793A\u3002\u4E00\u65E6\u60A8\u70B9\u51FB "\u540C\u610F" \u6216\u5B9E\u9645\u5F00\u59CB\u4F7F\u7528\u672C\u63D2\u4EF6\uFF0C\u5373\u89C6\u4E3A\u60A8\u5DF2\u5145\u5206\u7406\u89E3\u5E76\u540C\u610F\u672C\u534F\u8BAE\u5168\u90E8\u5185\u5BB9\u3002',"1.3 \u5982\u60A8\u4E0D\u540C\u610F\u672C\u534F\u8BAE\u4EFB\u4F55\u5185\u5BB9\uFF0C\u5E94\u7ACB\u5373\u505C\u6B62\u5B89\u88C5\u5E76\u5220\u9664\u672C\u63D2\u4EF6\u53CA\u5176\u6240\u6709\u526F\u672C\u3002"]},{title:"2. \u6838\u5FC3\u539F\u7406\u4E0E\u98CE\u9669\u8B66\u544A",content:["2.1 [\u5B9E\u73B0\u539F\u7406] \u7528\u6237\u77E5\u6089\u5E76\u540C\u610F\uFF1A\u672C\u63D2\u4EF6\u65E8\u5728\u901A\u8FC7\u81EA\u52A8\u5316\u6280\u672F\u624B\u6BB5\uFF0C\u201C\u6CE8\u5165\u201D\u5E76\u4FEE\u6539\u5DF2\u5B89\u88C5\u7684\u7B2C\u4E09\u65B9\u63D2\u4EF6\u6E90\u7801\uFF0C\u4ECE\u800C\u5B9E\u73B0\u754C\u9762\u7FFB\u8BD1\u3001\u6587\u672C\u66FF\u6362\u7B49\u529F\u80FD\u3002","2.2 [\u98CE\u9669\u515C\u5E95] \u672C\u63D2\u4EF6\u7684\u4E0A\u8FF0\u884C\u4E3A\u5E76\u672A\u83B7\u5F97\u539F\u63D2\u4EF6\u4F5C\u8005\u7684\u660E\u793A\u6388\u6743\u3002\u7528\u6237\u5E94\u81EA\u884C\u627F\u62C5\u7531\u6B64\u53EF\u80FD\u4EA7\u751F\u7684\u6CD5\u5F8B\u7EA0\u7EB7\u3001\u539F\u63D2\u4EF6\u529F\u80FD\u5931\u6548 or \u6570\u636E\u635F\u574F\u98CE\u9669\uFF08\u5F00\u53D1\u8005\u5F3A\u70C8\u5EFA\u8BAE\u5728\u64CD\u4F5C\u524D\u5907\u4EFD\u5E93\u6570\u636E\uFF09\u3002","2.3 \u5F00\u53D1\u8005\u4EC5\u63D0\u4F9B\u6280\u672F\u5DE5\u5177\uFF0C\u4E0D\u4FDD\u8BC1\u7FFB\u8BD1\u6548\u679C\u7684\u51C6\u786E\u6027\uFF0C\u4EA6\u4E0D\u5BF9\u56E0\u7B2C\u4E09\u65B9\u63D2\u4EF6\u7248\u672C\u5347\u7EA7\u5BFC\u81F4\u7684\u517C\u5BB9\u6027\u95EE\u9898\u8D1F\u8D23\u3002"]},{title:"3. \u6570\u636E\u9690\u79C1\u4E0E\u672C\u5730\u5B89\u5168",content:["3.1 [\u672C\u5730\u5B58\u50A8] \u672C\u63D2\u4EF6\u575A\u6301\u201C\u96F6\u670D\u52A1\u5668\u201D\u539F\u5219\u3002\u6240\u6709\u5173\u952E\u914D\u7F6E\uFF08\u5982 OpenAI Key\u3001GitHub Token\u3001\u7FFB\u8BD1\u7F13\u5B58\uFF09\u5747\u4EC5\u5B58\u50A8\u5728\u7528\u6237\u672C\u5730\u8BBE\u5907\uFF0C\u5F00\u53D1\u8005\u65E0\u6CD5\u83B7\u53D6\u60A8\u7684\u4EFB\u4F55\u51ED\u636E\u3002","3.2 [\u76F4\u63A5\u901A\u4FE1] \u63D2\u4EF6\u5728\u8C03\u7528\u7B2C\u4E09\u65B9 AI \u7FFB\u8BD1 API \u6216 GitHub \u4E91\u7AEF\u63A5\u53E3\u65F6\uFF0C\u662F\u76F4\u63A5\u4ECE\u7528\u6237\u672C\u5730\u53D1\u8D77\u7684\u7F51\u7EDC\u8BF7\u6C42\uFF0C\u6570\u636E\u6D41\u5411\u5B8C\u5168\u900F\u660E\u4E14\u53D7\u63A7\u3002","3.3 [\u6570\u636E\u5907\u4EFD] \u7528\u6237\u5E94\u81EA\u884C\u59A5\u5584\u4FDD\u7BA1\u654F\u611F\u51ED\u636E\u3002\u56E0\u7528\u6237\u6CC4\u9732\u3001\u4FDD\u7BA1\u4E0D\u5584\u6216\u786C\u4EF6\u635F\u574F\u5BFC\u81F4\u7684\u4EFB\u4F55\u635F\u5931\uFF0C\u5F00\u53D1\u8005\u4E0D\u627F\u62C5\u8D54\u507F\u8D23\u4EFB\u3002"]},{title:"4. \u4E91\u7AEF\u534F\u4F5C\u4E0E\u77E5\u8BC6\u4EA7\u6743",content:["4.1 [GitHub \u6A21\u5F0F] \u7528\u6237\u4F7F\u7528\u201C\u4E91\u7AEF\u5171\u5EFA\u201D\u529F\u80FD\u65F6\u9700\u4F7F\u7528\u5176\u4E2A\u4EBA GitHub \u8D26\u53F7\u53CA\u4E13\u6709 Token\u3002\u7528\u6237\u53D1\u5E03\u7FFB\u8BD1\u5305\u5373\u610F\u5473\u7740\u5176\u627F\u8BFA\u62E5\u6709\u8BE5\u7FFB\u8BD1\u5185\u5BB9\u7684\u5408\u6CD5\u6743\u5229\uFF0C\u5E76\u540C\u610F\u5C06\u5176\u5171\u4EAB\u7ED9\u793E\u533A\u3002","4.2 [\u7248\u6743\u754C\u5B9A] \u672C\u63D2\u4EF6\u4E2D\u5F00\u53D1\u8005\u72EC\u7ACB\u521B\u4F5C\u7684\u90E8\u5206\uFF08\u4EE3\u7801\u3001\u89C6\u89C9\u8BBE\u8BA1\uFF09\u53D7\u7248\u6743\u4FDD\u62A4\uFF1B\u88AB\u7FFB\u8BD1/\u4FEE\u6539\u7684\u7B2C\u4E09\u65B9\u63D2\u4EF6\u7248\u6743\u4ECD\u5F52\u5176\u539F\u4F5C\u8005\u6240\u6709\u3002\u7528\u6237\u4FDD\u8BC1\u4EC5\u5C06\u672C\u63D2\u4EF6\u7528\u4E8E\u4E2A\u4EBA\u5B66\u4E60\u6216\u7814\u7A76\u76EE\u7684\uFF0C\u7981\u6B62\u4EFB\u4F55\u5546\u4E1A\u4FB5\u6743\u884C\u4E3A\u3002"]},{title:"5. \u514D\u8D23\u4E0E\u7EC8\u6B62",content:["5.1 \u5F00\u53D1\u8005\u5BF9\u56E0\u4E0D\u53EF\u6297\u529B\u3001\u7B2C\u4E09\u65B9\u63A5\u53E3\u9650\u6D41\u3001Obsidian \u7248\u672C\u91CD\u5927\u53D8\u66F4\u7B49\u56E0\u7D20\u5BFC\u81F4\u7684\u529F\u80FD\u5F02\u5E38\u4E0D\u627F\u62C5\u6CD5\u5F8B\u8D23\u4EFB\u3002","5.2 \u5F00\u53D1\u8005\u4FDD\u7559\u968F\u65F6\u4FEE\u6539\u534F\u8BAE\u6761\u6B3E\u7684\u6743\u5229\u3002\u534F\u8BAE\u53D8\u66F4\u540E\u5982\u7528\u6237\u7EE7\u7EED\u4F7F\u7528\uFF0C\u5219\u89C6\u4E3A\u63A5\u53D7\u65B0\u534F\u8BAE\u3002","5.3 \u7528\u6237\u53EF\u968F\u65F6\u901A\u8FC7\u5378\u8F7D\u63D2\u4EF6\u7684\u65B9\u5F0F\u89E3\u9664\u534F\u8BAE\u3002\u534F\u8BAE\u7EC8\u6B62\u4E0D\u5F71\u54CD\u7B2C 2 \u6761\u3001\u7B2C 3 \u6761\u3001\u7B2C 4 \u6761\u4E2D\u5173\u4E8E\u98CE\u9669\u627F\u62C5\u53CA\u7248\u6743\u58F0\u660E\u7684\u6548\u529B\u3002"]}];var Ja=N(ce()),wne=({view:e})=>{let{t}=ze(),r=e.i18n,[a,n]=(0,eI.useState)(!1),s=(0,eI.useRef)(null),i=c=>{let{scrollTop:u,scrollHeight:d,clientHeight:f}=c.currentTarget;d-u-f<20&&n(!0)},o=async()=>{r&&(r.settings.agreement=!0,await r.saveSettings(),await r.onAgreementAccepted())},l=async()=>{r&&await r.app.plugins.disablePlugin(r.manifest.id)};return(0,Ja.jsx)("div",{className:"flex flex-col h-full bg-background p-6 items-center justify-center select-none text-standard",children:(0,Ja.jsxs)(is,{className:"w-full max-w-4xl flex flex-col h-[90vh] shadow-2xl border-muted/40 ring-1 ring-border/10 overflow-hidden",children:[(0,Ja.jsxs)(Qf,{className:"border-b pb-6 bg-muted/5 shrink-0",children:[(0,Ja.jsx)(Zf,{className:"text-3xl text-center text-primary font-black tracking-tight uppercase",children:t("Agreement.Titles.Main")}),(0,Ja.jsx)("p",{className:"text-center text-xs font-bold text-muted-foreground/60 mt-2 uppercase tracking-widest",children:t("Agreement.Hints.Desc")})]}),(0,Ja.jsxs)(ep,{className:"flex-1 overflow-hidden p-0 relative bg-background/50",children:[(0,Ja.jsxs)("div",{className:"h-full overflow-y-auto p-10 space-y-10 text-sm text-foreground/80 leading-relaxed scroll-smooth no-scrollbar",onScroll:i,ref:s,children:[Array.isArray(qF)&&qF.map((c,u)=>(0,Ja.jsxs)("section",{className:"space-y-4",children:[(0,Ja.jsxs)("h3",{className:"font-extrabold text-base text-foreground flex items-center gap-2",children:[(0,Ja.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-primary/40"}),c.title]}),(0,Ja.jsx)("ul",{className:"list-none space-y-3 pl-4 border-l-2 border-muted/20",children:Array.isArray(c.content)&&c.content.map((d,f)=>(0,Ja.jsx)("li",{className:"text-muted-foreground/80 leading-7 text-justify font-medium",children:d},f))})]},u)),(0,Ja.jsx)("div",{className:"pt-10 pb-4 text-center text-muted-foreground/40 text-[10px] font-black uppercase tracking-tighter border-t border-dashed",children:(0,Ja.jsx)("p",{children:t("Agreement.Hints.End")})})]}),!a&&(0,Ja.jsx)("div",{className:"absolute bottom-6 right-10 bg-primary text-primary-foreground px-4 py-2 rounded-full text-[10px] font-black shadow-2xl shadow-primary/40 animate-pulse pointer-events-none backdrop-blur-md border border-white/10 uppercase tracking-widest",children:t("Agreement.Hints.Scroll")})]}),(0,Ja.jsxs)("div",{className:"p-8 border-t bg-muted/5 flex flex-col sm:flex-row justify-end gap-6 items-center shrink-0",children:[(0,Ja.jsx)("div",{className:"flex-1 text-[10px] font-black uppercase tracking-wider text-muted-foreground/50 text-center sm:text-left",children:a?(0,Ja.jsx)("span",{className:"text-emerald-500/80",children:t("Agreement.Hints.ReadThanks")}):(0,Ja.jsx)("span",{className:"animate-in fade-in slide-in-from-left-2",children:t("Agreement.Hints.ReadReminder")})}),(0,Ja.jsxs)("div",{className:"flex items-center gap-3 w-full sm:w-auto",children:[(0,Ja.jsx)(Te,{variant:"ghost",onClick:l,className:"flex-1 sm:flex-none h-10 px-6 text-[11px] font-black uppercase tracking-widest text-muted-foreground/40 hover:text-destructive hover:bg-destructive/5 transition-all",children:t("Agreement.Actions.Disagree")}),(0,Ja.jsx)(Te,{onClick:o,disabled:!a,className:`flex-1 sm:flex-none h-10 min-w-[160px] text-[11px] font-black uppercase tracking-widest transition-all duration-500 shadow-xl ${a?"bg-primary hover:opacity-90 shadow-primary/20 scale-100":"bg-muted text-muted-foreground/30 scale-95 opacity-50 filter grayscale"}`,children:t("Agreement.Actions.Agree")})]})]})]})})};Vt();Rr();var Ene=N(ce()),DT="agreement-view",tI=class extends Cne.ItemView{constructor(r,a){super(r);this.root=null;this.shadowRoot=null;this.i18n=a}getViewType(){return DT}getDisplayText(){return v("Agreement.Titles.Tab")}getIcon(){return"file-text"}async onOpen(){let{root:r,shadowRoot:a}=Do(this.contentEl,this.i18n,(0,Ene.jsx)(wne,{view:this}));this.root=r,this.shadowRoot=a}async onClose(){this.root?.unmount(),this.shadowRoot&&(this.shadowRoot.innerHTML="")}};var Fne=N(Le()),Bne=require("obsidian");qt();Vt();er();Rr();var Hr=N(Le());qt();var _T=require("obsidian");er();Vt();Rr();function AYe(e){return e==="theme"?"themes":"plugins"}function po(e,t){return`${AYe(t)}/${e}.json`}Vt();var Zh=N(Le()),rI=require("obsidian");Vt();var Pne=N(ce()),aI=({content:e,owner:t,repo:r,branch:a="main"})=>{let n=(0,Zh.useRef)(null),s=He.getState().i18n,[i,o]=(0,Zh.useMemo)(()=>{let u=t||"",d=r||"";if(u.includes("github.com")){let f=u.replace(/https?:\/\/github\.com\//,"").split("/");u=f[0]||"",d=f[1]||d}else if(u.includes("/")){let f=u.split("/");u=f[0]||"",d=f[1]||d}return[u.trim(),d.trim()]},[t,r]),l=(u,d,f)=>{if(!u)return"";if(u.startsWith("http")||u.startsWith("//")||u.startsWith("data:")){if(f&&u.includes("github.com")){let h=u.match(/github\.com\/([^\/]+)\/([^\/]+)\/(blob|raw)\/([^\/]+)\/(.+)/);if(h){let[x,g,y,b,S,w]=h;return`https://cdn.jsdelivr.net/gh/${g}/${y}@${S}/${w}`}}if(f&&u.includes("raw.githubusercontent.com")){let h=u.match(/raw\.githubusercontent\.com\/([^\/]+)\/([^\/]+)\/([^\/]+)\/(.+)/);if(h){let[x,g,y,b,S]=h,w=s.settings.githubProxyUrl;return w?`${w.endsWith("/")?w:w+"/"}https://raw.githubusercontent.com/${g}/${y}/${b}/${S}`:`https://cdn.jsdelivr.net/gh/${g}/${y}@${b}/${S}`}}return u}if(!i||!o)return u;let m=u.replace(/^\.?\//,"").split("/").map(h=>encodeURIComponent(h)).join("/");if(f){let h=s.settings.githubProxyUrl;return h?`${h.endsWith("/")?h:h+"/"}https://raw.githubusercontent.com/${i}/${o}/${d}/${m}`:`https://cdn.jsdelivr.net/gh/${i}/${o}@${d}/${m}`}else return`https://github.com/${i}/${o}/blob/${d}/${m}`},c=(0,Zh.useMemo)(()=>{if(!e)return"";let u=e;return u=u.replace(/<img[^>]+src=["']([^"']+)["'][^>]*alt=["']([^"']+)["'][^>]*\/?>/gi,(d,f,p)=>``),u=u.replace(/<img[^>]+alt=["']([^"']+)["'][^>]*src=["']([^"']+)["'][^>]*\/?>/gi,(d,f,p)=>``),u=u.replace(/<img[^>]+src=["']([^"']+)["'][^>]*\/?>/gi,(d,f)=>``),u=u.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,(d,f,p)=>`})`),u=u.replace(/(?<!\!)\[([^\]]+)\]\(([^)]+)\)/g,(d,f,p)=>`[${f}](${l(p,a,!1)})`),u},[e,i,o,a]);return(0,Zh.useEffect)(()=>{if(!n.current||!c)return;let u=n.current;u.empty(),u.addClass("markdown-rendered"),u.addClass("obsidian-i18n-readme");let d=new rI.Component;return d.load(),rI.MarkdownRenderer.render(s.app,c,u,"",d).then(()=>{u.querySelectorAll("img").forEach(m=>{m.addClass("cursor-pointer"),m.addClass("hover:opacity-90"),m.addClass("transition-opacity"),m.style.maxWidth="100%",m.style.height="auto",m.addEventListener("click",()=>{m.src&&window.open(m.src)})}),u.querySelectorAll("a").forEach(m=>{m.setAttribute("target","_blank"),m.setAttribute("rel","noopener noreferrer")})}),()=>{d.unload()}},[c,s]),(0,Pne.jsx)("div",{ref:n,className:"markdown-container native-markdown-view max-w-none"})};var le=N(ce()),Ane=()=>{let{t:e}=ze(),t=He.getState().i18n,r=He(A=>A.sourceUpdateTick),a=Se.use.targetRepoAddress(),n=Se.use.setTargetRepoAddress(),s=Se.use.targetManifest(),i=Se.use.setTargetManifest(),o=Se.use.targetRepoStars(),l=Se.use.setTargetRepoStars(),c=Se.use.targetRepoReadme(),u=Se.use.setTargetRepoReadme(),d=Se.use.savedRepos(),f=Se.use.setSavedRepos(),p=Se.use.addSavedRepo(),m=Se.use.removeSavedRepo(),[h,x]=(0,Hr.useState)("all"),[g,y]=(0,Hr.useState)(""),[b,S]=(0,Hr.useState)(!1),[w,P]=(0,Hr.useState)(null),[C,I]=(0,Hr.useState)("plugins"),[R,O]=(0,Hr.useState)(!1),D=(0,Hr.useRef)(null),W=Se.use.outdatedSources(),J=Se.use.setOutdatedSources(),me=Se.use.isCheckingUpdates(),Z=Se.use.setIsCheckingUpdates(),[q,V]=(0,Hr.useState)([]);(0,Hr.useEffect)(()=>{(async()=>{let K=[],he=t.app.plugins.manifests;Object.values(he).forEach(H=>{H.id!==t.manifest.id&&K.push({id:H.id,name:H.name,type:"plugin"})});try{let xe=`${t.app.vault.adapter.getBasePath()}/.obsidian/themes`;if(await t.app.vault.adapter.exists(`${t.app.vault.configDir}/themes`)){let Ie=await t.app.vault.adapter.list(`${t.app.vault.configDir}/themes`);for(let Ve of Ie.folders){let ft=Ve.split("/").pop();ft&&K.push({id:ft,name:ft,type:"theme"})}}}catch{}V(K.sort((H,xe)=>H.name.localeCompare(xe.name)))})()},[t]);let L=(0,Hr.useCallback)(async()=>{if(me||d.length===0)return;Z(!0);let K=t.sourceManager.getAllSources(),he=[];try{await Promise.all(d.map(async H=>{let[xe,Pe]=H.split("/");try{let Ie=await t.api.github.getFileContentWithFallback(xe,Pe,"metadata.json");Ie.state&&Ie.data&&(Array.isArray(Ie.data)?Ie.data:[]).forEach(ft=>{let we=K.find(Ne=>Ne.id===ft.id&&Ne.cloud?.owner===xe&&Ne.cloud?.repo===Pe);we&&we.cloud?.hash!==ft.hash&&he.push({sourceId:we.id,pluginId:we.plugin,title:ft.title||we.title,currentVersion:we.cloud?.hash.substring(0,7)||"unknown",newVersion:ft.hash.substring(0,7),repoAddress:H,newHash:ft.hash})})}catch{}})),J(he),he.length>0?t.notice.infoPrefix(v("Cloud.Notices.CheckComplete"),v("Cloud.Notices.FoundUpdates",{count:he.length})):t.notice.successPrefix(v("Cloud.Notices.CheckComplete"),v("Cloud.Notices.AllUpToDate"))}catch{}finally{Z(!1)}},[t,d,me,J,Z,v]),k=(0,Hr.useCallback)(async()=>{if(W.length===0||w||!window.confirm(v("Cloud.Dialogs.ConfirmUpdateAll",{count:W.length})))return;let K=0;for(let he of W){P(he.sourceId);try{let[H,xe]=he.repoAddress.split("/"),Pe=t.sourceManager,Ie=Pe.getSource(he.sourceId),Ve=await t.api.github.getFileContent(H,xe,po(he.sourceId,Ie?.type||"plugin"));if(Ve.state&&Ve.data?.content){let ft=JSON.parse(Buffer.from(Ve.data.content,"base64").toString("utf-8"));Ie&&(Pe.saveSourceFile(Ie.id,ft),Pe.saveSource({...Ie,checksum:xs(ft),cloud:{...Ie.cloud,hash:he.newHash},updatedAt:Date.now()}),K++)}}catch{new _T.Notice(e("Cloud.Errors.AddFail"))}}P(null),J([]),t.notice.successPrefix(e("Cloud.Notices.UpdateComplete"),e("Cloud.Notices.UpdateSuccessCount","",{count:K}))},[t,W,w,J,e]),_=(0,Hr.useCallback)(A=>{let K=t.sourceManager;if(!K)return"not_downloaded";let he=a.trim().split("/");if(he.length!==2)return"not_downloaded";let[H,xe]=he,Ie=K.getAllSources().find(Ve=>Ve.id===A.id);return Ie?Ie.origin==="local"||Ie.cloud?.owner!==H||Ie.cloud?.repo!==xe?"fork_available":Ie.cloud?.hash!==A.hash?"update_available":"up_to_date":"not_downloaded"},[t,a,r]);Hr.default.useEffect(()=>{t.settings.cloudRepos&&f(t.settings.cloudRepos)},[t.settings.cloudRepos,f]);let ee=(0,Hr.useCallback)(A=>{t.settings.cloudRepos=A,t.saveSettings()},[t]),ie=(0,Hr.useCallback)(async A=>{let K=A||a;if(!K.trim()){t.notice.errorPrefix(e("Cloud.Errors.FetchFail"),e("Cloud.Placeholders.Repo"));return}let he=K.trim().split("/");if(he.length!==2){t.notice.errorPrefix(e("Cloud.Errors.FetchFail"),e("Cloud.Hints.RepoFormatTip"));return}let[H,xe]=he,Pe=`${H}/${xe}`,Ie=Se.getState().githubUser,Ve=t.settings.shareRepo;if(Ie?.login&&Ve&&Pe.toLowerCase()===`${Ie.login}/${Ve}`.toLowerCase()){t.notice.errorPrefix(e("Cloud.Labels.AccessLimit"),e("Cloud.Hints.NoSelfExplore"));return}S(!0),O(!1);try{let ft=await t.api.github.getFileContentWithFallback(H,xe,"metadata.json");if(ft.isRateLimit&&O(!0),ft.state&&ft.data){let we=ft.data;if(Array.isArray(we)){if(i(we),!d.includes(Pe)){let Ne=[...d,Pe];p(Pe),ee(Ne)}we.length===0?t.notice.successPrefix(e("Cloud.Notices.FetchSuccess"),e("Cloud.Tips.NoTranslations")):t.notice.successPrefix(e("Cloud.Notices.FetchSuccess"),e("Cloud.Tips.FoundTranslations","",{count:we.length}))}else{new _T.Notice(e("Cloud.Errors.RepoNotExist","",{address:K}));return}}else i([]),t.notice.errorPrefix(e("Cloud.Errors.FetchFail"),e("Cloud.Tips.ManifestNotFound"));t.api.github.getRepoInfo(H,xe).then(we=>{we.state&&we.data?l(we.data.stargazers_count):l(null)}).catch(()=>l(null)),t.api.github.getFileContentWithFallback(H,xe,"README.md").then(we=>{if(we.state&&we.data){let Ne=typeof we.data=="string"?we.data:JSON.stringify(we.data,null,2);u(Ne)}else u(null)}).catch(()=>u(null))}catch(ft){new _T.Notice(e("Cloud.Errors.FetchFail")+`: ${ft}`),i([]),l(null),u(null),I("plugins")}finally{S(!1)}},[a,t,i,p,d,ee,l,u,e]);(0,Hr.useEffect)(()=>{a&&a!==D.current&&!b&&(D.current=a,ie())},[a,b,ie]);let ae=(0,Hr.useCallback)(A=>{A!==a&&(i([]),l(null),u(null),I("plugins")),n(A),ie(A)},[a,n,ie,i,l,u,t]),ge=(0,Hr.useCallback)((A,K)=>{A.stopPropagation(),m(K);let he=d.filter(H=>H!==K);ee(he),new _T.Notice(e("Cloud.Notices.RepoUnsubscribed"))},[m,d,ee,e]),ue=(0,Hr.useMemo)(()=>{let A=(K="0",he="0")=>{let H=String(K).split(/[.-]/).map(Ie=>isNaN(parseInt(Ie))?Ie:parseInt(Ie)),xe=String(he).split(/[.-]/).map(Ie=>isNaN(parseInt(Ie))?Ie:parseInt(Ie)),Pe=Math.max(H.length,xe.length);for(let Ie=0;Ie<Pe;Ie++){let Ve=H[Ie]??0,ft=xe[Ie]??0;if(typeof Ve=="number"&&typeof ft=="number"){if(Ve>ft)return 1;if(Ve<ft)return-1}else{let we=String(Ve),Ne=String(ft);if(we>Ne)return 1;if(we<Ne)return-1}}return 0};return s.filter(K=>!(h&&h!=="all"&&K.language!==h||g&&!K.plugin.toLowerCase().includes(g.toLowerCase())&&!K.title.toLowerCase().includes(g.toLowerCase()))).sort((K,he)=>{if(K.plugin!==he.plugin)return K.plugin.localeCompare(he.plugin);let H=A(K.supported_versions,he.supported_versions);if(H!==0)return-H;let xe=A(K.version,he.version);return xe!==0?-xe:0})},[s,h,g]),$=(0,Hr.useCallback)(async A=>{let K=a.trim().split("/");if(K.length!==2||w)return;let[he,H]=K;P(A.id);try{let xe=await t.api.github.getFileContentWithFallback(he,H,po(A.id,A.type));if(!xe.state||!xe.data){let ft=xe.isRateLimit?e("Cloud.Hints.RateLimitTitle"):xe.data?.message||xe.data||"";throw new Error(`${e("Cloud.Errors.DownloadFail")}: ${ft}`)}let Pe=typeof xe.data=="string"?JSON.parse(xe.data):xe.data,Ie=t.sourceManager;if(!Ie)throw new Error(e("Cloud.Status.Fetching"));let Ve=Ie.getAllSources().find(ft=>ft.id===A.id);if(Ve){if(!(Ve.cloud?.owner===he&&Ve.cloud?.repo===H)){let Ne=e("Cloud.Dialogs.ConfirmOverwrite","",{owner:Ve.cloud?.owner||e("Cloud.Status.Local"),newOwner:he});if(!window.confirm(Ne)){P(null);return}}Ie.saveSourceFile(Ve.id,Pe);let we={...Ve,origin:"cloud",title:A.title||Ve.title,checksum:xs(Pe),cloud:{owner:he,repo:H,hash:A.hash},updatedAt:Date.now()};Ie.saveSource(we),t.notice.successPrefix(e("Cloud.Notices.UpdateSuccess"),e("Cloud.Tips.UpdatedItem","",{title:we.title}))}else{let ft=A.id;Ie.saveSourceFile(ft,Pe);let we={id:ft,plugin:A.plugin,title:A.title||e("Common.Status.Unknown"),type:A.type,origin:"cloud",isActive:!1,checksum:xs(Pe),cloud:{owner:he,repo:H,hash:A.hash},updatedAt:Date.now(),createdAt:Date.now()};Ie.saveSource(we),Ie.getActiveSourceId(A.plugin)?t.notice.successPrefix(e("Cloud.Notices.DownloadSuccess"),e("Cloud.Tips.AddedSource","",{title:we.title})):(Ie.setActive(ft,!0),t.notice.successPrefix(e("Cloud.Notices.DownloadSuccess"),e("Cloud.Tips.AddedAndActive","",{title:we.title})))}}catch(xe){t.notice.errorPrefix(e("Cloud.Errors.DownloadFail"),`${xe}`)}finally{P(null)}},[t,a,w,e]);return(0,le.jsxs)("div",{className:"flex h-full gap-0 overflow-hidden min-h-0 animate-in fade-in duration-500",children:[(0,le.jsx)("aside",{className:"w-[300px] flex flex-col border-r border-border/30 pr-4 shrink-0 overflow-hidden min-h-0",children:(0,le.jsx)(sr,{className:"flex-1",children:(0,le.jsxs)("div",{className:"space-y-6 pb-6 pt-1",children:[(0,le.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,le.jsxs)("div",{className:"flex items-center gap-2 text-sm font-semibold text-foreground/80",children:[(0,le.jsx)(Ky,{className:"w-4 h-4 text-primary"}),(0,le.jsx)("span",{children:e("Cloud.Labels.ResourceCenter")})]}),(0,le.jsxs)("div",{className:"flex gap-2",children:[(0,le.jsxs)("div",{className:"relative group flex-1",children:[(0,le.jsx)(Ea,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground group-focus-within:text-primary transition-colors"}),(0,le.jsx)(Qe,{placeholder:e("Cloud.Placeholders.SearchRepo"),value:a,onChange:A=>n(A.target.value),className:"pl-8 font-mono text-xs h-9 border-border/60 focus:border-primary/50 w-full",onKeyDown:A=>{A.key==="Enter"&&(A.preventDefault(),ie())}})]}),(0,le.jsx)(Te,{onClick:()=>ie(),disabled:b||!a,className:"h-9 px-4 shrink-0 shadow-sm transition-all",children:b?(0,le.jsx)(Wr,{className:"w-4 h-4 animate-spin"}):e("Cloud.Actions.Add")})]})]}),d.length>0&&(0,le.jsxs)("div",{className:"space-y-3",children:[(0,le.jsxs)("div",{className:"flex items-center justify-between",children:[(0,le.jsxs)("div",{className:"flex items-center gap-2 text-[10px] font-bold text-muted-foreground uppercase tracking-wider",children:[(0,le.jsx)(Ky,{className:"w-3 h-3 text-primary/60"}),(0,le.jsx)("span",{children:e("Cloud.Labels.SubscriptionList")})]}),(0,le.jsx)("span",{className:"text-[9px] font-medium opacity-40 px-1.5 py-0.5 bg-muted rounded",children:d.length})]}),(0,le.jsx)("div",{className:"flex flex-col gap-2",children:d.map(A=>{let[K,he]=A.split("/"),H=a===A&&s.length>0,xe=W.some(Pe=>Pe.repoAddress===A);return(0,le.jsxs)("div",{className:oe("group relative flex items-center gap-3 p-2.5 rounded-lg border transition-all cursor-pointer",H?"bg-primary/5 border-primary/40 shadow-sm ring-1 ring-primary/20":"bg-muted/20 border-border/40 hover:bg-muted/50 hover:border-border/60"),onClick:()=>ae(A),children:[(0,le.jsx)("div",{className:oe("flex items-center justify-center w-7 h-7 rounded-md shrink-0 transition-colors",H?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground group-hover:bg-muted-foreground/10"),children:(0,le.jsx)(Ea,{className:"w-3.5 h-3.5"})}),(0,le.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,le.jsxs)("div",{className:"text-[9px] text-muted-foreground/70 truncate uppercase font-bold tracking-tight flex items-center gap-1.5",children:[K,xe&&(0,le.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-500 animate-pulse"})]}),(0,le.jsx)("div",{className:"text-[11px] font-semibold text-foreground truncate -mt-0.5",children:he})]}),(0,le.jsx)("button",{className:"p-1 px-1.5 rounded-md hover:bg-destructive/10 hover:text-destructive opacity-0 group-hover:opacity-100 transition-all font-mono",onClick:Pe=>ge(Pe,A),title:e("Cloud.Actions.Unsubscribe"),children:(0,le.jsx)(eh,{className:"w-3 h-3"})}),H&&(0,le.jsxs)("div",{className:"absolute top-2 right-2 flex h-1.5 w-1.5",children:[(0,le.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),(0,le.jsx)("span",{className:"relative inline-flex rounded-full h-1.5 w-1.5 bg-primary"})]})]},A)})})]}),(0,le.jsx)("div",{className:"pt-4 border-t border-border/20 text-[10px] text-muted-foreground/60 leading-relaxed italic",children:e("Cloud.Tabs.Explore")})]})})}),(0,le.jsx)("main",{className:"flex-1 flex flex-col pt-1 pl-4 overflow-hidden min-h-0 border-l border-border/10",children:(0,le.jsxs)(Ll,{value:C,onValueChange:A=>I(A),className:"flex-1 flex flex-col overflow-hidden",children:[(0,le.jsxs)("div",{className:"flex flex-col gap-3 mb-5 mt-1 border border-border/40 rounded-xl bg-card/60 p-3 shadow-sm backdrop-blur-sm",children:[(0,le.jsxs)("div",{className:"flex items-center justify-between pb-3 border-b border-border/30",children:[(0,le.jsxs)(Rl,{className:"h-9 p-1 bg-muted/50 border border-border/40 rounded-lg shadow-inner",children:[(0,le.jsxs)(Ga,{value:"plugins",className:"text-xs px-4 h-7 data-[state=active]:bg-background data-[state=active]:shadow-sm rounded-md transition-all",children:[(0,le.jsx)(wi,{className:"w-3.5 h-3.5 mr-1.5 text-muted-foreground"}),e("Cloud.Tabs.Browse")]}),(0,le.jsxs)(Ga,{value:"readme",className:"text-xs px-4 h-7 data-[state=active]:bg-background data-[state=active]:shadow-sm rounded-md transition-all",disabled:s.length===0,children:[(0,le.jsx)(Zi,{className:"w-3.5 h-3.5 mr-1.5 text-muted-foreground"}),e("Cloud.Tabs.Readme")]}),(0,le.jsxs)(Ga,{value:"updates",className:"text-xs px-4 h-7 data-[state=active]:bg-background data-[state=active]:shadow-sm relative rounded-md transition-all",children:[(0,le.jsx)(Wr,{className:oe("w-3.5 h-3.5 mr-1.5 text-muted-foreground",me&&"animate-spin")}),e("Cloud.Tabs.Updates"),W.length>0&&(0,le.jsxs)("span",{className:"absolute -top-1 -right-1 flex h-3 w-3",children:[(0,le.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-amber-400 opacity-75"}),(0,le.jsx)("span",{className:"relative inline-flex rounded-full h-3 w-3 bg-amber-500 text-[8px] flex items-center justify-center text-white font-bold",children:W.length})]})]})]}),(0,le.jsxs)(Te,{onClick:L,disabled:me||d.length===0,size:"sm",className:"h-9 px-4 shrink-0 shadow-sm hover:shadow-md transition-all group rounded-lg",children:[me?(0,le.jsx)(Wr,{className:"w-4 h-4 animate-spin mr-2"}):(0,le.jsx)(no,{className:"w-4 h-4 mr-2 opacity-80 group-hover:scale-110 transition-transform"}),(0,le.jsx)("span",{className:"font-semibold text-xs tracking-wide",children:e("Cloud.Actions.CheckAllUpdates")}),W.length>0&&(0,le.jsx)("span",{className:"ml-2 px-1.5 py-0.5 rounded-full bg-background/20 text-white text-[10px] font-bold animate-pulse",children:W.length})]})]}),(0,le.jsxs)("div",{className:"flex items-center justify-between min-h-[32px] px-1",children:[(0,le.jsx)("div",{className:"flex items-center gap-2 text-[13px] font-semibold text-muted-foreground/80",children:C==="updates"?(0,le.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 rounded-md bg-amber-500/10 text-amber-600 border border-amber-500/20",children:[(0,le.jsx)(no,{className:"w-4 h-4"}),(0,le.jsx)("span",{children:e("Cloud.Labels.PendingUpdates")})]}):s.length>0?(0,le.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,le.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded bg-primary/10 text-primary shrink-0",children:(0,le.jsx)(No,{className:"w-3.5 h-3.5"})}),(0,le.jsx)("a",{href:`https://github.com/${a}`,target:"_blank",rel:"noopener noreferrer",className:"max-w-[200px] truncate text-foreground/90 hover:text-primary hover:underline transition-colors decoration-primary/30 underline-offset-4",title:e("Cloud.Labels.ViewOnGithub",{repo:a}),children:a}),o!==null&&(0,le.jsxs)(mt,{variant:"outline",className:"ml-1 px-1.5 py-0 h-5 bg-yellow-500/10 border-yellow-500/30 text-yellow-600 gap-1 font-mono shadow-sm",children:[(0,le.jsx)(ao,{className:"w-2.5 h-2.5 fill-current"}),o]})]}):(0,le.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 opacity-60",children:[(0,le.jsx)(ra,{className:"w-4 h-4"}),(0,le.jsx)("span",{className:"text-xs tracking-wide",children:e("Cloud.Labels.WaitingFetch")})]})}),(0,le.jsxs)("div",{className:oe("flex items-center gap-3 shrink-0 transition-opacity",C!=="plugins"?"opacity-30 pointer-events-none":"opacity-100"),children:[(0,le.jsxs)("div",{className:"relative group w-56 shadow-sm",children:[(0,le.jsx)(ra,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-muted-foreground group-focus-within:text-primary transition-colors"}),(0,le.jsx)(Qe,{placeholder:e("Cloud.Placeholders.SearchPlugins"),value:g,onChange:A=>y(A.target.value),disabled:s.length===0,className:"pl-8 h-8 text-xs bg-background border-border/60 focus:border-primary/50 transition-all rounded-md"})]}),(0,le.jsxs)(lr,{value:g||"all",onValueChange:A=>{A==="all"?y(""):A&&y(A)},disabled:s.length===0,children:[(0,le.jsx)(ur,{size:"sm",className:"w-40 text-xs bg-background border-border/60 rounded-md shadow-sm h-8",children:(0,le.jsx)(cr,{children:g?q.find(A=>A.id===g)?.name||g:"\u5168\u90E8"})}),(0,le.jsx)(dr,{children:(0,le.jsxs)(sr,{className:"h-72",children:[(0,le.jsx)(Rt,{value:"all",className:"text-[11px]",children:"\u5168\u90E8"}),q.map(A=>(0,le.jsx)(Rt,{value:A.id,className:"text-[11px]",children:(0,le.jsxs)("div",{className:"flex items-center gap-2",children:[A.type==="plugin"?(0,le.jsx)(sa,{className:"w-3 h-3"}):(0,le.jsx)(Oa,{className:"w-3 h-3"}),(0,le.jsx)("span",{children:A.name})]})},A.id))]})})]}),(0,le.jsxs)(lr,{value:h,onValueChange:x,disabled:s.length===0,children:[(0,le.jsx)(ur,{size:"sm",className:"w-32 text-xs bg-background border-border/60 rounded-md shadow-sm h-8",children:(0,le.jsx)(cr,{})}),(0,le.jsxs)(dr,{children:[(0,le.jsx)(Rt,{value:"all",className:"text-[11px]",children:v("Common.Filters.All")}),Yn.map(A=>(0,le.jsx)(Rt,{value:A.value,className:"text-[11px]",children:A.label},A.value))]})]}),(0,le.jsx)(mt,{variant:"secondary",className:"h-8 px-2.5 font-mono text-[11px] font-bold bg-muted text-muted-foreground border border-border/50 shadow-sm rounded-md hover:bg-muted ml-1",children:ue.length})]})]})]}),(0,le.jsx)(ca,{value:"plugins",className:"flex-1 min-h-0 m-0 outline-none data-[state=active]:flex flex-col relative z-10 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(0,le.jsx)(NYe,{filteredEntries:ue,handleDownload:$,downloadingId:w,getUpdateStatus:_,targetRepoAddress:a,isFetching:b,isRateLimited:R,targetManifest:s,t_i18n:e})}),(0,le.jsx)(ca,{value:"readme",className:"flex-1 min-h-0 m-0 outline-none data-[state=active]:flex flex-col relative z-10 animate-in fade-in slide-in-from-bottom-2 duration-300 bg-card rounded-xl border shadow-sm",children:(0,le.jsx)(sr,{className:"flex-1 min-h-0",children:(0,le.jsx)("div",{className:"p-6",children:b?(0,le.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 text-muted-foreground",children:[(0,le.jsx)(Wr,{className:"w-8 h-8 animate-spin opacity-50 mb-3"}),(0,le.jsx)("p",{className:"text-sm",children:e("Cloud.Labels.PleaseWait")})]}):c?(0,le.jsx)(aI,{content:c,owner:a.split("/")[0],repo:a.split("/")[1]}):(0,le.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 text-muted-foreground border-2 border-dashed border-border/40 rounded-xl bg-muted/10 mx-auto max-w-md",children:[(0,le.jsx)(Zi,{className:"w-12 h-12 mb-4 opacity-20"}),(0,le.jsx)("p",{className:"text-sm font-medium",children:e("Cloud.Tips.NoReadme")}),(0,le.jsx)("p",{className:"text-xs mt-1 text-muted-foreground/60 text-center px-6",children:e("Cloud.Tips.NoReadmeDesc")})]})})})}),(0,le.jsxs)(ca,{value:"updates",className:"flex-1 min-h-0 m-0 outline-none data-[state=active]:flex flex-col relative z-10 animate-in fade-in slide-in-from-bottom-2 duration-300",children:[(0,le.jsxs)("div",{className:"flex items-center justify-between mb-4 px-1",children:[(0,le.jsxs)("div",{children:[(0,le.jsxs)("h3",{className:"text-sm font-bold text-foreground",children:[e("Cloud.Labels.PendingUpdates")," (",W.length,")"]}),(0,le.jsx)("p",{className:"text-[11px] text-muted-foreground mt-1",children:e("Cloud.Labels.PendingUpdates")})]}),(0,le.jsxs)("div",{className:"flex items-center gap-2",children:[(0,le.jsxs)(Te,{variant:"outline",size:"sm",onClick:L,disabled:me,className:"h-8 text-xs",children:[(0,le.jsx)(Wr,{className:oe("w-3.5 h-3.5 mr-2",me&&"animate-spin")}),e("Cloud.Actions.Recheck")]}),(0,le.jsxs)(Te,{size:"sm",onClick:k,disabled:W.length===0||w!==null,className:"h-8 text-xs bg-amber-500 hover:bg-amber-600 text-white border-none shadow-sm shadow-amber-500/20",children:[(0,le.jsx)(js,{className:"w-3.5 h-3.5 mr-2"}),e("Cloud.Actions.UpdateAll")]})]})]}),(0,le.jsx)(sr,{className:"flex-1 min-h-0 bg-muted/10 rounded-xl border border-dashed border-border/60",children:(0,le.jsx)("div",{className:"p-4",children:W.length===0?(0,le.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 text-muted-foreground",children:[(0,le.jsx)("div",{className:"w-16 h-16 rounded-full bg-green-500/10 flex items-center justify-center mb-4",children:(0,le.jsx)(no,{className:"w-8 h-8 text-green-500/60"})}),(0,le.jsx)("p",{className:"text-sm font-bold text-foreground/70",children:e("Cloud.Notices.AllUpToDate")}),(0,le.jsx)("p",{className:"text-xs mt-1 opacity-60",children:e("Cloud.Tips.AllLatestDesc")})]}):(0,le.jsx)("div",{className:"space-y-3",children:W.map(A=>(0,le.jsxs)("div",{className:"flex items-center justify-between p-3.5 bg-card rounded-lg border border-amber-500/20 shadow-sm group hover:border-amber-500/40 transition-all",children:[(0,le.jsxs)("div",{className:"flex items-center gap-4 flex-1 min-w-0",children:[(0,le.jsx)("div",{className:"w-10 h-10 rounded-lg bg-amber-500/10 flex items-center justify-center shrink-0",children:(0,le.jsx)(wi,{className:"w-5 h-5 text-amber-500"})}),(0,le.jsxs)("div",{className:"min-w-0 pr-4",children:[(0,le.jsx)("h4",{className:"text-[13px] font-bold truncate",children:A.title}),(0,le.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,le.jsx)("span",{className:"text-[10px] text-muted-foreground font-mono bg-muted px-1.5 py-0.5 rounded",children:A.pluginId}),(0,le.jsxs)("div",{className:"flex items-center gap-1.5 text-[10px] text-amber-600/80 font-mono",children:[(0,le.jsx)("span",{className:"opacity-60",children:A.currentVersion}),(0,le.jsx)(yl,{className:"w-3 h-3 opacity-40"}),(0,le.jsx)("span",{className:"font-bold underline decoration-wavy underline-offset-2",children:A.newVersion})]})]})]})]}),(0,le.jsxs)("div",{className:"flex items-center gap-3",children:[(0,le.jsxs)("div",{className:"text-right hidden sm:block",children:[(0,le.jsx)("div",{className:"text-[10px] text-muted-foreground font-medium truncate max-w-[120px]",children:e("Cloud.Labels.SourceFrom")}),(0,le.jsx)("div",{className:"text-[11px] font-bold text-foreground/80 truncate max-w-[120px]",children:A.repoAddress})]}),(0,le.jsxs)(Te,{size:"sm",variant:"ghost",className:"h-8 group-hover:bg-amber-500 group-hover:text-white transition-all text-amber-600",onClick:async()=>{let K=s.find(H=>H.id===A.sourceId)||{id:A.sourceId,plugin:A.pluginId,title:A.title,hash:A.newHash,version:"unknown",language:"unknown",repo:A.repoAddress},he=a;n(A.repoAddress),await $(K),n(he),J(W.filter(H=>H.sourceId!==A.sourceId))},disabled:w===A.sourceId,children:[w===A.sourceId?(0,le.jsx)(Wr,{className:"w-3 h-3 animate-spin"}):(0,le.jsx)(js,{className:"w-3.5 h-3.5"}),(0,le.jsx)("span",{className:"ml-2",children:e("Cloud.Actions.Update")})]})]})]},A.sourceId))})})})]})]})})]})},IYe=({entry:e,onDownload:t,isDownloading:r,updateStatus:a,repoAddress:n})=>{let{t:s}=ze(),i=(0,Hr.useCallback)(()=>{let l=encodeURIComponent(s("Cloud.Labels.ReportIssue")+`: ${e.title} (${e.plugin})`),c=encodeURIComponent(s("Cloud.Labels.IssueTemplateBody","",{plugin:e.plugin,version:e.version,language:e.language,id:e.id})),u=`https://github.com/${n}/issues/new?title=${l}&body=${c}`;window.open(u)},[e,n,s]),o=(0,Hr.useCallback)(()=>{let l=po(e.id,e.type),c=`https://github.com/${n}/blob/main/${l}`;window.open(c)},[e,n]);return(0,le.jsxs)("div",{className:oe("group flex flex-col overflow-hidden bg-card text-card-foreground rounded-lg border border-border/60 transition-all duration-300 animate-in fade-in h-[188px] relative select-none","hover:shadow-[0_8px_30px_rgb(0,0,0,0.04)] dark:hover:shadow-[0_8px_30px_rgb(0,0,0,0.2)] hover:border-primary/40",a==="update_available"&&"border-amber-500/20 hover:border-amber-500/40 hover:shadow-amber-500/5",a==="fork_available"&&"border-purple-500/20 hover:border-purple-500/40 hover:shadow-purple-500/5",a==="up_to_date"&&"border-green-500/20 hover:border-green-500/40 hover:shadow-green-500/5"),children:[(0,le.jsxs)("div",{className:"flex flex-col flex-1 p-4 pb-3 min-h-0 space-y-3",children:[(0,le.jsx)("div",{className:"flex items-start justify-between gap-3",children:(0,le.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[(0,le.jsx)("div",{className:oe("flex items-center justify-center w-9 h-9 rounded-md shrink-0 shadow-sm border border-border/10 transition-colors","bg-muted/50 group-hover:bg-muted"),children:e.type==="theme"?(0,le.jsx)(Oa,{className:"w-5 h-5 text-muted-foreground group-hover:text-primary transition-colors"}):(0,le.jsx)(sa,{className:"w-5 h-5 text-muted-foreground group-hover:text-primary transition-colors"})}),(0,le.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,le.jsx)("h3",{className:"text-[13px] font-semibold text-foreground tracking-tight leading-snug truncate",title:e.title,children:e.title}),(0,le.jsxs)("div",{className:"flex items-center gap-1.5 mt-0.5",children:[(0,le.jsxs)("span",{className:"text-[10px] text-muted-foreground/60 font-mono tracking-tighter",children:["v",e.version]}),e.supported_versions&&(0,le.jsxs)("span",{className:"text-[9px] text-muted-foreground/30 font-mono italic",children:["[",e.supported_versions,"]"]})]})]})]})}),(0,le.jsx)("div",{className:"min-h-[34px] max-h-[34px] overflow-hidden",children:(0,le.jsx)("p",{className:"text-[11px] text-muted-foreground/90 leading-relaxed line-clamp-2",title:e.description||s("Common.Status.Unknown"),children:e.description||s("Common.Status.Unknown")})}),(0,le.jsxs)("div",{className:"mt-auto flex items-center justify-between px-2.5 py-1.5 rounded bg-muted/20 border border-border/5",children:[(0,le.jsxs)("div",{className:"flex items-center gap-3",children:[(0,le.jsx)("div",{className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/70 font-semibold",children:e.language}),(0,le.jsx)("div",{className:"w-[1px] h-2 bg-border/20"}),(0,le.jsxs)("div",{className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/70 font-semibold",children:[(0,le.jsx)(Ti,{className:"w-3 h-3 opacity-50"}),e.updated_at?new Date(e.updated_at).toLocaleDateString(void 0,{month:"2-digit",day:"2-digit"}):"-"]})]}),(0,le.jsx)("span",{className:"text-[9px] text-muted-foreground/50 font-mono tracking-tight truncate max-w-[80px]",children:e.plugin})]})]}),(0,le.jsxs)("div",{className:"flex border-t border-border/30 h-10 shrink-0 bg-muted/5 group-hover:bg-muted/10 transition-colors",children:[(0,le.jsxs)("button",{onClick:t,disabled:r||a==="up_to_date",className:oe("flex-1 flex items-center justify-center gap-2 text-[11px] font-bold transition-all active:scale-95 disabled:active:scale-100",a==="up_to_date"?"text-green-600/50 cursor-default":a==="update_available"?"text-amber-600 hover:text-amber-700 hover:bg-amber-500/5":a==="fork_available"?"text-purple-600 hover:text-purple-700 hover:bg-purple-500/5":"text-primary hover:text-primary/80 hover:bg-primary/5"),children:[r?(0,le.jsx)(Wr,{className:"w-3.5 h-3.5 animate-spin"}):a==="up_to_date"?(0,le.jsx)(xl,{className:"w-3.5 h-3.5"}):(0,le.jsx)(js,{className:"w-3.5 h-3.5"}),(0,le.jsx)("span",{className:"uppercase tracking-tight",children:s(a==="up_to_date"?"Cloud.Status.UpToDate":a==="update_available"?"Cloud.Actions.Update":a==="fork_available"?"Cloud.Actions.Overwrite":"Cloud.Actions.Download")})]}),(0,le.jsx)("div",{className:"w-[1px] bg-border/20 my-2"}),(0,le.jsx)("button",{onClick:o,className:"px-3 flex items-center justify-center text-muted-foreground/60 hover:text-foreground hover:bg-muted/20 transition-all active:scale-90",title:s("Cloud.Labels.Source"),children:(0,le.jsx)(Ao,{className:"w-4 h-4"})}),(0,le.jsx)("div",{className:"w-[1px] bg-border/20 my-2"}),(0,le.jsx)("button",{onClick:i,className:"px-4 flex items-center justify-center text-muted-foreground/60 hover:text-foreground hover:bg-muted/20 transition-all active:scale-90",title:s("Cloud.Labels.ReportIssue"),children:(0,le.jsx)(pS,{className:"w-4 h-4"})})]})]})},NYe=({filteredEntries:e,handleDownload:t,downloadingId:r,getUpdateStatus:a,targetRepoAddress:n,isFetching:s,isRateLimited:i,targetManifest:o,t_i18n:l})=>{let c=(0,Hr.useRef)(null),[u,d]=(0,Hr.useState)(0);(0,Hr.useEffect)(()=>{let x=c.current;if(!x)return;let g=new ResizeObserver(y=>{for(let b of y){let S=b.contentRect.width;S>0&&d(S)}});return g.observe(x),()=>g.disconnect()},[]);let f=(0,Hr.useMemo)(()=>{let x=Math.floor((u-20+16)/336);return Math.max(1,x)},[u]),p=Math.ceil(e.length/f),m=ni({count:p,getScrollElement:()=>c.current,estimateSize:(0,Hr.useCallback)(()=>192,[]),overscan:5}),h=m.getVirtualItems();return(0,le.jsxs)(sr,{className:"flex-1 min-h-0",viewportRef:c,children:[(0,le.jsx)("div",{className:"pb-6 pr-4",children:s?(0,le.jsxs)("div",{className:"flex flex-col items-center justify-center pt-32 text-muted-foreground animate-in fade-in duration-300",children:[(0,le.jsx)(Wr,{className:"w-10 h-10 animate-spin text-primary/50 mb-4"}),(0,le.jsx)("p",{className:"text-sm font-medium tracking-tight",children:l("Cloud.Labels.FetchingResources")})]}):e.length===0?(0,le.jsxs)("div",{className:"flex flex-col items-center justify-center pt-32 text-muted-foreground",children:[(0,le.jsx)(ra,{className:"w-14 h-14 mb-4 opacity-20"}),(0,le.jsx)("p",{className:"text-sm font-medium",children:l("Cloud.Tips.NoMatchesInRepo")})]}):u===0?(0,le.jsx)("div",{className:"flex items-center justify-center pt-32 text-muted-foreground animate-in fade-in duration-300",children:(0,le.jsx)(Wr,{className:"w-8 h-8 animate-spin text-primary/30"})}):(0,le.jsx)("div",{className:"relative w-full overflow-hidden",style:{height:`${m.getTotalSize()}px`},children:h.map(x=>{let g=x.index*f,y=e.slice(g,g+f);return(0,le.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:`${x.size}px`,transform:`translateY(${x.start}px)`,display:"grid",gridTemplateColumns:`repeat(${f}, 1fr)`,gap:"16px",paddingBottom:"16px"},children:y.map(b=>(0,le.jsx)(IYe,{entry:b,onDownload:()=>t(b),isDownloading:r===b.id,updateStatus:a(b),repoAddress:n},b.id))},x.key)})})}),i&&o.length===0&&(0,le.jsxs)("div",{className:"flex flex-col items-center justify-center p-12 text-center space-y-4 animate-in fade-in slide-in-from-bottom-4 duration-500",children:[(0,le.jsx)("div",{className:"p-4 rounded-full bg-orange-500/10 text-orange-600 ring-1 ring-orange-500/20",children:(0,le.jsx)(Ea,{className:"w-10 h-10 opacity-80"})}),(0,le.jsxs)("div",{className:"space-y-2",children:[(0,le.jsx)("h3",{className:"text-xl font-bold tracking-tight",children:l("Cloud.Hints.RateLimitTitle")}),(0,le.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed max-w-sm",children:l("Cloud.Hints.RateLimitDesc")})]}),(0,le.jsxs)(Te,{onClick:()=>{i18n.app.setting.open(),i18n.app.setting.openTabById("i18n")},className:"mt-4 gap-2 px-6 shadow-sm transition-all hover:translate-y-[-1px] bg-orange-500 hover:bg-orange-600 text-white border-none",children:[l("Cloud.Hints.RateLimitGuide"),(0,le.jsx)(ei,{className:"w-4 h-4"})]})]})]})};var $o=N(Le()),Go=N(fs());qt();Vt();var mu=N(Le());qt();Vt();Rr();var sI=N(fs()),Ut=N(ce());function nI(e,t=""){let r={};if(e==null)return r;if(typeof e!="object")return r[t]=String(e),r;for(let a of Object.keys(e)){let n=t?`${t}.${a}`:a,s=e[a];s!==null&&typeof s=="object"&&!Array.isArray(s)?Object.assign(r,nI(s,n)):r[n]=typeof s=="string"?s:JSON.stringify(s)}return r}function LYe(e,t){let r=new Set([...Object.keys(e),...Object.keys(t)]),a=[];for(let s of r){let i=s in e,o=s in t;i&&o?e[s]!==t[s]&&a.push({type:"modified",key:s,localValue:e[s],cloudValue:t[s]}):i&&!o?a.push({type:"added",key:s,localValue:e[s]}):a.push({type:"removed",key:s,cloudValue:t[s]})}let n={modified:0,added:1,removed:2,unchanged:3};return a.sort((s,i)=>n[s.type]-n[i.type]||s.key.localeCompare(i.key)),a}var Ine=()=>{let e=He.getState().i18n,t=Se.use.diffDialogSourceId(),r=Se.use.setDiffDialogSourceId(),a=Se.use.githubUser(),n=Se.use.repoManifest(),s=e.settings.shareRepo,i=!!t,[o,l]=(0,mu.useState)(!1),[c,u]=(0,mu.useState)([]),[d,f]=(0,mu.useState)(""),[p,m]=(0,mu.useState)("all"),h=n.find(b=>b.id===t)||null;(0,mu.useEffect)(()=>{if(!i||!t||!h||!a){u([]),f("");return}let b=!1;return(async()=>{l(!0);try{let w=e.sourceManager.getSourceFilePath(t);if(!w||!sI.existsSync(w)){u([]);return}let P=sI.readFileSync(w,"utf-8"),C=JSON.parse(P),I=await e.api.github.getFileContent(a.login,s,`plugins/${t}.json`);if(b)return;if(!I.state||!I.data?.content){let q=nI(C);u(Object.entries(q).map(([V,L])=>({type:"added",key:V,localValue:L})));return}let R=Buffer.from(I.data.content,"base64").toString("utf-8"),O=JSON.parse(R),D=C?.dict||C,W=O?.dict||O,J=nI(D),me=nI(W),Z=LYe(J,me);b||u(Z)}catch{b||u([])}finally{b||l(!1)}})(),()=>{b=!0}},[i,t,h?.id,a,s,e]);let x=(0,mu.useMemo)(()=>c.filter(b=>{if(p!=="all"&&b.type!==p)return!1;if(d){let S=d.toLowerCase();return b.key.toLowerCase().includes(S)||(b.localValue||"").toLowerCase().includes(S)||(b.cloudValue||"").toLowerCase().includes(S)}return!0}),[c,d,p]),g=(0,mu.useMemo)(()=>({added:c.filter(b=>b.type==="added").length,modified:c.filter(b=>b.type==="modified").length,removed:c.filter(b=>b.type==="removed").length}),[c]),y=()=>{r(null),u([]),f(""),m("all")};return(0,Ut.jsx)(xd,{open:i,onOpenChange:b=>!b&&y(),children:(0,Ut.jsxs)(bd,{className:"max-w-3xl max-h-[80vh] p-0 gap-0 overflow-hidden",children:[(0,Ut.jsxs)(vd,{className:"px-6 py-4 border-b bg-muted/30 shrink-0",children:[(0,Ut.jsxs)(Sd,{className:"flex items-center gap-2 text-base",children:[(0,Ut.jsx)(Jy,{className:"w-4 h-4 text-primary"}),v("Cloud.Titles.DiffViewer")]}),(0,Ut.jsxs)(Px,{className:"text-xs text-muted-foreground mt-1",children:[h?`${h.title} (${h.plugin})`:""," \u2014 ",v("Cloud.Tips.VersionCompareDesc")]})]}),(0,Ut.jsxs)("div",{className:"flex flex-col min-h-0",style:{height:"60vh"},children:[(0,Ut.jsxs)("div",{className:"flex items-center justify-between px-4 py-2.5 border-b bg-muted/10 shrink-0",children:[(0,Ut.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ut.jsxs)("button",{onClick:()=>m(p==="added"?"all":"added"),className:oe("inline-flex items-center gap-1 text-[11px] px-2 py-0.5 rounded-full border transition-all cursor-pointer",p==="added"?"bg-green-500/20 border-green-500/40 text-green-700":"bg-green-500/10 border-green-500/20 text-green-600 hover:bg-green-500/20"),children:[(0,Ut.jsx)(as,{className:"w-3 h-3"}),v("Cloud.Labels.Added")," ",g.added]}),(0,Ut.jsxs)("button",{onClick:()=>m(p==="modified"?"all":"modified"),className:oe("inline-flex items-center gap-1 text-[11px] px-2 py-0.5 rounded-full border transition-all cursor-pointer",p==="modified"?"bg-amber-500/20 border-amber-500/40 text-amber-700":"bg-amber-500/10 border-amber-500/20 text-amber-600 hover:bg-amber-500/20"),children:[(0,Ut.jsx)(Wr,{className:"w-3 h-3"}),v("Cloud.Actions.Update")," ",g.modified]}),(0,Ut.jsxs)("button",{onClick:()=>m(p==="removed"?"all":"removed"),className:oe("inline-flex items-center gap-1 text-[11px] px-2 py-0.5 rounded-full border transition-all cursor-pointer",p==="removed"?"bg-red-500/20 border-red-500/40 text-red-700":"bg-red-500/10 border-red-500/20 text-red-600 hover:bg-red-500/20"),children:[(0,Ut.jsx)(Qy,{className:"w-3 h-3"}),v("Cloud.Labels.Deleted")," ",g.removed]}),p!=="all"&&(0,Ut.jsx)("button",{onClick:()=>m("all"),className:"text-[10px] text-muted-foreground hover:text-primary underline ml-1",children:v("Cloud.Actions.ClearFilters")})]}),(0,Ut.jsxs)("div",{className:"relative group w-40",children:[(0,Ut.jsx)(ra,{className:"absolute left-2 top-1/2 -translate-y-1/2 w-3 h-3 text-muted-foreground"}),(0,Ut.jsx)(Qe,{placeholder:v("Cloud.Placeholders.SearchDiff"),value:d,onChange:b=>f(b.target.value),className:"pl-7 h-7 text-[11px] bg-background border-border/50"})]})]}),(0,Ut.jsx)(sr,{className:"flex-1 min-h-0",children:o?(0,Ut.jsxs)("div",{className:"flex flex-col items-center justify-center h-40 gap-2",children:[(0,Ut.jsx)(zt,{className:"w-5 h-5 animate-spin text-primary"}),(0,Ut.jsx)("span",{className:"text-xs text-muted-foreground",children:v("Cloud.Status.LoadingDiff")})]}):c.length===0?(0,Ut.jsxs)("div",{className:"flex flex-col items-center justify-center h-40 gap-2 text-muted-foreground",children:[(0,Ut.jsx)(Jy,{className:"w-10 h-10 opacity-20"}),(0,Ut.jsx)("p",{className:"text-xs",children:v("Cloud.Hints.NoDiff")})]}):x.length===0?(0,Ut.jsxs)("div",{className:"flex flex-col items-center justify-center h-40 gap-2 text-muted-foreground",children:[(0,Ut.jsx)(Io,{className:"w-8 h-8 opacity-20"}),(0,Ut.jsx)("p",{className:"text-xs",children:v("Cloud.Hints.NoMatchingDiffs")})]}):(0,Ut.jsx)("div",{className:"divide-y divide-border/30",children:x.map((b,S)=>(0,Ut.jsxs)("div",{className:oe("px-4 py-2.5 transition-colors",b.type==="added"&&"bg-green-500/5 hover:bg-green-500/10",b.type==="removed"&&"bg-red-500/5 hover:bg-red-500/10",b.type==="modified"&&"bg-amber-500/5 hover:bg-amber-500/10"),children:[(0,Ut.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[b.type==="added"&&(0,Ut.jsx)(as,{className:"w-3 h-3 text-green-600 shrink-0"}),b.type==="removed"&&(0,Ut.jsx)(Qy,{className:"w-3 h-3 text-red-600 shrink-0"}),b.type==="modified"&&(0,Ut.jsx)(Wr,{className:"w-3 h-3 text-amber-600 shrink-0"}),(0,Ut.jsx)("code",{className:"text-[11px] font-mono font-semibold text-foreground/80 truncate",title:b.key,children:b.key}),(0,Ut.jsx)(mt,{variant:"outline",className:oe("text-[8px] px-1 py-0 h-[14px] uppercase font-bold shrink-0",b.type==="added"&&"bg-green-500/10 border-green-500/30 text-green-600",b.type==="removed"&&"bg-red-500/10 border-red-500/30 text-red-600",b.type==="modified"&&"bg-amber-500/10 border-amber-500/30 text-amber-600"),children:b.type==="added"?v("Cloud.Labels.Added"):b.type==="removed"?v("Cloud.Labels.Deleted"):v("Cloud.Actions.Update")})]}),(0,Ut.jsxs)("div",{className:"ml-5 space-y-0.5",children:[b.type==="modified"&&(0,Ut.jsxs)(Ut.Fragment,{children:[(0,Ut.jsxs)("div",{className:"flex items-start gap-2",children:[(0,Ut.jsx)("span",{className:"text-[9px] text-red-500/80 font-mono font-bold mt-0.5 shrink-0 w-6",children:v("Cloud.Labels.Old")}),(0,Ut.jsx)("span",{className:"text-[11px] text-red-600/70 line-through break-all leading-relaxed",children:b.cloudValue})]}),(0,Ut.jsxs)("div",{className:"flex items-start gap-2",children:[(0,Ut.jsx)("span",{className:"text-[9px] text-green-500/80 font-mono font-bold mt-0.5 shrink-0 w-6",children:v("Cloud.Labels.New")}),(0,Ut.jsx)("span",{className:"text-[11px] text-green-700/80 font-medium break-all leading-relaxed",children:b.localValue})]})]}),b.type==="added"&&(0,Ut.jsx)("p",{className:"text-[11px] text-green-700/80 break-all leading-relaxed",children:b.localValue}),b.type==="removed"&&(0,Ut.jsx)("p",{className:"text-[11px] text-red-600/70 line-through break-all leading-relaxed",children:b.cloudValue})]})]},S))})}),!o&&c.length>0&&(0,Ut.jsxs)("div",{className:"px-4 py-2 border-t bg-muted/10 text-[10px] text-muted-foreground flex items-center justify-between shrink-0",children:[(0,Ut.jsxs)("span",{children:[v("Cloud.Labels.TotalDiffs",{count:c.length}),x.length!==c.length&&v("Cloud.Labels.ShowingCount",{count:x.length})]}),(0,Ut.jsxs)("span",{className:"font-mono",children:[v("Cloud.Status.Local")," ",(0,Ut.jsx)(ei,{className:"w-3 h-3 inline"})," ",v("Cloud.Status.Cloud")]})]})]})]})})};Rr();qt();er();Vt();var hu=N(ce()),qp=({title:e,description:t})=>{let{t:r}=ze(),a=He.getState().i18n,n=()=>{let s=a.app;try{a.activeSettingTab="share",s.setting.open(),s.setting.openTabById("i18n")}catch{}};return(0,hu.jsxs)("div",{className:"flex flex-col items-center justify-center h-[400px] text-center p-6 space-y-4 max-w-md mx-auto",children:[(0,hu.jsx)("div",{className:"p-4 rounded-full bg-muted/50 text-muted-foreground ring-1 ring-border",children:(0,hu.jsx)(Gc,{className:"w-10 h-10"})}),(0,hu.jsxs)("div",{className:"space-y-2",children:[(0,hu.jsx)("h3",{className:"text-xl font-semibold tracking-tight",children:e||r("Cloud.Hints.LoginRequired")}),(0,hu.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:t||r("Cloud.Hints.LoginRequiredDesc")})]}),(0,hu.jsxs)(Te,{onClick:n,className:"mt-4 gap-2 px-6 shadow-sm transition-all hover:translate-y-[-1px]",children:[r("Cloud.Hints.GoToSettings"),(0,hu.jsx)(ei,{className:"w-4 h-4"})]})]})};var se=N(ce());function Nne(e){let t=0;for(let a=0;a<e.length;a++){let n=e.charCodeAt(a);t=(t<<5)-t+n,t=t&t}return Math.abs(t).toString(16).padStart(8,"0").repeat(4)}var Lne=()=>{let e=He.getState().i18n,t=He.getState().i18n.app,r=He(A=>A.sourceUpdateTick),a=Se.use.uploadType(),n=Se.use.selectedPluginId(),s=Se.use.selectedSourceId(),i=Se.use.uploadForm(),o=Se.use.localFiles(),l=Se.use.isLoading(),c=Se.use.repoInitialized(),u=Se.use.repoChecking(),d=Se.use.githubUser(),f=Se.use.setUploadType(),p=Se.use.setSelectedPluginId(),m=Se.use.setSelectedSourceId(),h=Se.use.setUploadForm(),x=Se.use.setLocalFiles(),g=Se.use.resetUploadForm(),y=Se.use.setRepoInitialized(),b=Se.use.repoManifest(),S=Se.use.setRepoManifest(),w=Se.use.setRepoDataLoaded(),P=Se.use.canCreateRepo(),C=Se.use.repoNameInput(),I=Se.use.setRepoNameInput(),R=Se.use.repoDescriptionInput(),O=Se.use.setRepoDescriptionInput(),D=e.settings.shareRepo,[W,J]=(0,$o.useState)(!1),me=Se.use.setCurrentTab(),Z=(0,$o.useMemo)(()=>Object.values(t.plugins.manifests).filter(K=>K.id==="i18n"?!1:e.sourceManager.hasAnySources(K.id)),[t,e.settings.language,e.sourceManager,r]),q=(0,$o.useMemo)(()=>{try{let A=require("path").normalize(t.vault.adapter.getBasePath()),K=require("path").join(A,".obsidian","themes");return Go.existsSync(K)?Go.readdirSync(K,{withFileTypes:!0}).filter(H=>H.isDirectory()?e.sourceManager.hasAnySources(H.name):!1).map(H=>({id:H.name,name:H.name})):[]}catch{return[]}},[t,e.sourceManager,r]),V=a==="plugin"?Z:q,L=(0,$o.useMemo)(()=>n?e.sourceManager.getSourcesForPlugin(n):[],[n,e.sourceManager,r]),k=(0,$o.useMemo)(()=>s?b.find(A=>A.id===s):null,[s,b]),_=!!k,ee=Se.use.setDiffDialogSourceId(),ie=(0,$o.useMemo)(()=>{if(!s)return"";let A=e.sourceManager.getSourceFilePath(s);if(A&&Go.existsSync(A))try{let K=Go.readFileSync(A,"utf-8");return Nne(K)}catch{return""}return""},[s,e.sourceManager]),ae=(0,$o.useMemo)(()=>!k||!ie?!1:k.hash===ie,[k,ie]);(0,$o.useEffect)(()=>{if(!s){x([]);return}let A=e.sourceManager,K=A.getSource(s),he=A.getSourceFilePath(s);if(K&&he&&Go.existsSync(he)){let H=Go.statSync(he);x([{path:he,language:e.settings.language,exists:!0,lastModified:H.mtime,size:H.size}]);let xe="",Pe="";try{let Ie=Go.readJsonSync(he);Ie?.metadata?.description&&(xe=Ie.metadata.description),(Ie?.metadata?.supportedVersions||Ie?.metadata?.version)&&(Pe=Ie.metadata.supportedVersions||Ie.metadata.version)}catch{}h({version:Pe,title:K.title,description:xe})}else x([{path:"",language:e.settings.language,exists:!1}])},[s,e.settings.language,e.sourceManager]);let ge=(0,$o.useCallback)(async()=>{if(!i.title.trim()){e.notice.errorPrefix(v("Cloud.Errors.UploadFailed"),v("Cloud.Hints.TitleEmpty"));return}let A=o[0];if(!A?.exists){e.notice.errorPrefix(v("Cloud.Errors.UploadFailed"),v("Cloud.Errors.LocalFileMissing"));return}if(!d){e.notice.errorPrefix(v("Cloud.Errors.UploadFailed"),v("Cloud.Errors.NoGithubUser"));return}J(!0);try{let K=Go.readFileSync(A.path,"utf-8"),he=d.login,H=d.id,xe=e.sourceManager.getSource(s);if(!xe?.id)throw new Error(v("Cloud.Errors.InvalidSourceConfig"));let Pe=xe.id,Ie=Nne(K),Ve=po(Pe,xe.type),ft=Buffer.from(K,"utf-8").toString("base64"),we=v(_?"Cloud.Labels.UpdateTranslationMsg":"Cloud.Labels.AddTranslationMsg",{title:i.title,plugin:n});e.notice.successPrefix(v("Cloud.Status.Processing"),v("Cloud.Status.UploadingFile"));let Ne=await e.api.github.uploadFile(he,D,Ve,ft,we);if(!Ne.state)throw new Error(`${v("Cloud.Errors.UploadFileFail")}: ${Ne.data?.message||Ne.data}`);e.notice.successPrefix(v("Cloud.Status.Processing"),v("Cloud.Status.UpdatingIndex"));let Be=[],tt,Ct=await e.api.github.getFileContent(he,D,"metadata.json");if(Ct.state&&Ct.data?.content){tt=Ct.data.sha;let qe=Buffer.from(Ct.data.content,"base64").toString("utf-8"),ut=JSON.parse(qe);Array.isArray(ut)&&(Be=ut)}else if(Ct.status!==404)throw new Error(v("Cloud.Errors.UpdateManifestFail")+": "+(Ct.data?.message||"Network Error"));let Tt=new Date().toISOString(),Qt={id:Pe,plugin:n,language:e.settings.language,version:i.version,supported_versions:i.version,title:i.title,description:i.description||"",hash:Ie,created_at:Tt,updated_at:Tt,type:xe.type},Ur=Be.findIndex(qe=>qe.id===Pe);Ur>=0?(Be[Ur]={...Be[Ur],version:i.version,supported_versions:i.version,title:i.title,description:i.description||"",hash:Ie,updated_at:Tt},Be=Be.filter((qe,ut)=>qe.id!==Pe||ut===Ur)):Be.push(Qt),e.notice.successPrefix(v("Cloud.Status.Processing"),v("Cloud.Status.UpdatingIndex"));let pe=Buffer.from(JSON.stringify(Be,null,4),"utf-8").toString("base64"),$e=await e.api.github.uploadFile(he,D,"metadata.json",pe,v("Cloud.Labels.UpdateManifestMsg",{plugin:n}),"main",tt);if(!$e.state)throw new Error(`${v("Cloud.Errors.UpdateManifestFail")}: ${$e.data?.message||$e.data}`);let nt={...xe,origin:"cloud",cloud:{owner:he,repo:D,hash:Ie},updatedAt:Date.now()};e.sourceManager.saveSource(nt),S(Be),e.notice.successPrefix(v("Cloud.Notices.UploadSuccess"),v("Cloud.Notices.UploadCompleteDesc"))}catch(K){e.notice.errorPrefix(v("Cloud.Errors.UploadFailed"),`${K}`)}finally{J(!1)}},[i,o,n,s,e,d,D,S,v]),ue=A=>{if(!A)return"0 B";let K=1024,he=["B","KB","MB","GB"],H=Math.floor(Math.log(A)/Math.log(K));return parseFloat((A/Math.pow(K,H)).toFixed(2))+" "+he[H]},$=()=>(0,se.jsx)("div",{className:"flex items-center justify-between px-1 pb-4 shrink-0 ",children:(0,se.jsxs)("div",{className:"flex items-center gap-3",children:[(0,se.jsxs)(Te,{variant:"ghost",size:"sm",className:"h-8 px-2 gap-1.5 text-muted-foreground hover:text-primary",onClick:()=>me("my"),children:[(0,se.jsx)(Vc,{className:"w-4 h-4"}),v("Cloud.Actions.BackToManage")]}),(0,se.jsx)("div",{className:"w-[1px] h-5 bg-border/50"}),(0,se.jsxs)("div",{className:"flex items-center gap-2",children:[(0,se.jsx)(Tl,{className:"w-4 h-4 text-primary"}),(0,se.jsx)("h2",{className:"text-sm font-semibold",children:v("Cloud.Actions.PublishToCloud")})]})]})});return e.settings.shareToken?u?(0,se.jsxs)("div",{className:"flex flex-col flex-1 h-full min-h-0 w-full animate-in fade-in duration-500",children:[$(),(0,se.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center gap-4 text-muted-foreground p-6",children:[(0,se.jsx)(zt,{className:"w-8 h-8 animate-spin text-primary"}),(0,se.jsx)("p",{className:"text-sm",children:v("Cloud.Status.Checking")})]})]}):c?(0,se.jsxs)("div",{className:"flex flex-col flex-1 h-full min-h-0 w-full animate-in fade-in duration-500",children:[$(),(0,se.jsx)("div",{className:"flex flex-col flex-1 min-h-0 overflow-y-auto overflow-x-hidden",children:(0,se.jsxs)("div",{className:"flex flex-col gap-6 p-4 max-w-2xl mx-auto pb-20 w-full",children:[(0,se.jsxs)("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-green-500/5 border border-green-500/20 text-xs text-green-600 dark:text-green-400",children:[(0,se.jsx)(ts,{className:"w-4 h-4"}),(0,se.jsx)("span",{children:v("Cloud.Notices.RepoReadyPrefix")}),(0,se.jsxs)("span",{className:"font-mono font-medium",children:[d?.login,"/",D]})]}),(0,se.jsxs)("section",{className:"space-y-3",children:[(0,se.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,se.jsx)("div",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-primary/10 text-primary text-xs font-bold",children:"1"}),(0,se.jsx)(Vr,{className:"text-sm font-semibold uppercase tracking-wider text-muted-foreground",children:v("Cloud.Steps.SelectType")})]}),(0,se.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,se.jsxs)("button",{onClick:()=>f("plugin"),className:oe("flex flex-col items-center justify-center gap-3 p-4 rounded-xl border-2 transition-all relative overflow-hidden",a==="plugin"?"border-primary bg-primary/5 shadow-sm ring-2 ring-primary/20":"border-border/60 bg-card hover:bg-accent/50 hover:border-border"),children:[(0,se.jsx)("div",{className:oe("p-3 rounded-full transition-colors",a==="plugin"?"bg-primary text-primary-foreground shadow-md":"bg-muted text-muted-foreground"),children:(0,se.jsx)(wi,{className:"w-6 h-6"})}),(0,se.jsxs)("div",{className:"text-center space-y-1",children:[(0,se.jsx)("div",{className:"font-semibold",children:v("Cloud.Labels.UploadTypePlugin")}),(0,se.jsx)("div",{className:"text-[10px] text-muted-foreground",children:v("Cloud.Labels.UploadTypePluginDesc")})]}),a==="plugin"&&(0,se.jsx)("div",{className:"absolute top-3 right-3 text-primary",children:(0,se.jsx)(ts,{className:"w-5 h-5 animate-in zoom-in"})})]}),(0,se.jsxs)("button",{onClick:()=>f("theme"),className:oe("flex flex-col items-center justify-center gap-3 p-4 rounded-xl border-2 transition-all relative overflow-hidden",a==="theme"?"border-primary bg-primary/5 shadow-sm ring-2 ring-primary/20":"border-border/60 bg-card hover:bg-accent/50 hover:border-border"),children:[(0,se.jsx)("div",{className:oe("p-3 rounded-full transition-colors",a==="theme"?"bg-primary text-primary-foreground shadow-md":"bg-muted text-muted-foreground"),children:(0,se.jsx)(Oa,{className:"w-6 h-6"})}),(0,se.jsxs)("div",{className:"text-center space-y-1",children:[(0,se.jsx)("div",{className:"font-semibold",children:v("Cloud.Labels.UploadTypeTheme")}),(0,se.jsx)("div",{className:"text-[10px] text-muted-foreground",children:v("Cloud.Labels.UploadTypeThemeDesc")})]}),a==="theme"&&(0,se.jsx)("div",{className:"absolute top-3 right-3 text-primary",children:(0,se.jsx)(ts,{className:"w-5 h-5 animate-in zoom-in"})})]})]})]}),(0,se.jsxs)("section",{className:"space-y-3 animate-in fade-in slide-in-from-bottom-2 duration-500",children:[(0,se.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,se.jsx)("div",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-primary/10 text-primary text-xs font-bold",children:"2"}),(0,se.jsx)(Vr,{className:"text-sm font-semibold uppercase tracking-wider text-muted-foreground",children:v("Cloud.Steps.SelectTarget",{type:a==="plugin"?v("Common.Labels.Plugins"):v("Common.Labels.Themes")})})]}),(0,se.jsxs)(is,{className:"border-border/50 shadow-sm overflow-hidden transition-all hover:shadow-md hover:border-primary/20",children:[(0,se.jsx)(Qf,{className:"pb-3 bg-muted/30",children:(0,se.jsxs)("div",{className:"flex items-center gap-2",children:[a==="plugin"?(0,se.jsx)(wi,{className:"w-4 h-4 text-primary"}):(0,se.jsx)(Oa,{className:"w-4 h-4 text-primary"}),(0,se.jsx)(Zf,{className:"text-sm font-medium",children:v("Cloud.Labels.Target",{type:a==="plugin"?v("Common.Labels.Plugins"):v("Common.Labels.Themes")})})]})}),(0,se.jsxs)(ep,{className:"pt-4",children:[(0,se.jsxs)(lr,{value:n,onValueChange:p,children:[(0,se.jsx)(ur,{size:"sm",className:"w-full bg-background border-border/60",children:(0,se.jsx)(cr,{placeholder:v("Cloud.Placeholders.SelectTarget",{type:a==="plugin"?v("Common.Labels.Plugins"):v("Common.Labels.Themes")})})}),(0,se.jsx)(dr,{children:V.map(A=>(0,se.jsx)(Rt,{value:A.id,children:(0,se.jsxs)("div",{className:"flex items-center justify-between w-full gap-2",children:[(0,se.jsx)("span",{children:A.name}),(0,se.jsx)("span",{className:"text-[10px] bg-muted px-1.5 py-0.5 rounded text-muted-foreground",children:A.id})]})},A.id))})]}),V.length===0&&(0,se.jsxs)("div",{className:"mt-3 flex items-start gap-2 p-3 rounded-md bg-amber-500/5 border border-amber-500/20 text-xs text-amber-600 dark:text-amber-400",children:[(0,se.jsx)(es,{className:"w-3.5 h-3.5 mt-0.5"}),(0,se.jsx)("p",{children:v("Cloud.Hints.NoLocalSourcesTip",{type:a==="plugin"?v("Common.Labels.Plugins"):v("Common.Labels.Themes")})})]})]})]})]}),n&&(0,se.jsxs)("section",{className:"space-y-3 animate-in fade-in slide-in-from-bottom-2 duration-500",children:[(0,se.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,se.jsx)("div",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-primary/10 text-primary text-xs font-bold",children:"3"}),(0,se.jsx)(Vr,{className:"text-sm font-semibold uppercase tracking-wider text-muted-foreground",children:v("Cloud.Steps.SelectSource")})]}),(0,se.jsxs)(is,{className:"border-border/50 shadow-sm overflow-hidden transition-all hover:shadow-md hover:border-primary/20",children:[(0,se.jsxs)(Qf,{className:"pb-3 bg-muted/30",children:[(0,se.jsxs)("div",{className:"flex items-center justify-between",children:[(0,se.jsxs)("div",{className:"flex items-center gap-2",children:[(0,se.jsx)(Ea,{className:"w-4 h-4 text-primary"}),(0,se.jsx)(Zf,{className:"text-sm font-medium",children:v("Cloud.Labels.Source")})]}),(0,se.jsxs)(mt,{variant:"outline",className:"text-[10px] font-mono",children:[L.length," ",v("Cloud.Labels.UnitPlugins")]})]}),(0,se.jsx)(NS,{className:"text-[11px] mt-1",children:v("Cloud.Tips.SelectSourceDesc")})]}),(0,se.jsx)(ep,{className:"pt-4",children:L.length===0?(0,se.jsxs)("div",{className:"flex items-start gap-2 p-3 rounded-md bg-amber-500/5 border border-amber-500/20 text-xs text-amber-600 dark:text-amber-400",children:[(0,se.jsx)(es,{className:"w-3.5 h-3.5 mt-0.5"}),(0,se.jsx)("p",{children:v("Cloud.Hints.NoSourcesForTarget",{type:a==="plugin"?v("Common.Labels.Plugins"):v("Common.Labels.Themes")})})]}):(0,se.jsx)("div",{className:"flex flex-col gap-2",children:L.map(A=>{let K=b.some(H=>H.id===A.id),he=s===A.id;return(0,se.jsxs)("button",{onClick:()=>m(A.id),className:oe("group w-full flex items-center gap-3 p-3 rounded-lg border text-left transition-all",he?"bg-primary/5 border-primary/40 ring-1 ring-primary/20 shadow-sm":"bg-muted/20 border-border/40 hover:bg-muted/50 hover:border-border/60"),children:[(0,se.jsx)("div",{className:oe("flex items-center justify-center w-8 h-8 rounded-md shrink-0 transition-colors",he?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"),children:(0,se.jsx)(Yy,{className:"w-4 h-4"})}),(0,se.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,se.jsxs)("div",{className:"flex items-center gap-2",children:[(0,se.jsx)("span",{className:oe("text-[13px] font-semibold truncate",he?"text-primary":"text-foreground"),children:A.title}),K&&(0,se.jsx)(mt,{variant:"outline",className:"text-[9px] px-1.5 py-0 h-[16px] bg-blue-500/10 border-blue-500/30 text-blue-600 shrink-0",children:v("Cloud.Status.Published")})]}),(0,se.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,se.jsxs)("span",{className:"text-[10px] text-muted-foreground/60 font-mono truncate max-w-[180px]",title:A.id,children:[A.id.substring(0,8),"..."]}),(0,se.jsx)("span",{className:oe("text-[9px] px-1 py-0 rounded uppercase font-bold",A.origin==="local"?"bg-green-500/10 text-green-600":"bg-blue-500/10 text-blue-600"),children:A.origin==="local"?v("Cloud.Status.Local"):v("Cloud.Status.Cloud")})]})]}),he&&(0,se.jsx)(ts,{className:"w-4 h-4 text-primary shrink-0"})]},A.id)})})})]})]}),s&&(0,se.jsxs)("section",{className:"space-y-3 animate-in fade-in slide-in-from-bottom-2 duration-500",children:[(0,se.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,se.jsxs)("div",{className:"flex items-center gap-2",children:[(0,se.jsx)("div",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-primary/10 text-primary text-xs font-bold",children:"4"}),(0,se.jsx)(Vr,{className:"text-sm font-semibold uppercase tracking-wider text-muted-foreground",children:v("Cloud.Steps.CheckFiles")})]}),_?(0,se.jsxs)(mt,{variant:"secondary",className:"bg-blue-500/10 text-blue-600 border-blue-500/20 hover:bg-blue-500/20 flex items-center gap-1 py-0.5 text-[10px]",children:[(0,se.jsx)(gS,{className:"w-3 h-3"}),v("Cloud.Status.UpdateAvailable")]}):(0,se.jsxs)(mt,{variant:"secondary",className:"bg-green-500/10 text-green-600 border-green-500/20 hover:bg-green-500/20 flex items-center gap-1 py-0.5 text-[10px]",children:[(0,se.jsx)(xS,{className:"w-3 h-3"}),v("Cloud.Status.Cloud")]})]}),(0,se.jsx)(is,{className:oe("border-border/50 shadow-sm overflow-hidden transition-all",o[0]?.exists?_?"bg-blue-500/5 border-blue-500/20":"bg-green-500/5 border-green-500/20":"bg-red-500/5 border-red-500/20"),children:(0,se.jsx)(ep,{className:"p-4",children:o.map(A=>(0,se.jsxs)("div",{className:"flex items-start gap-4",children:[(0,se.jsx)("div",{className:oe("mt-1 p-2 rounded-lg",A.exists?"bg-green-100 text-green-600 dark:bg-green-950/50":"bg-red-100 text-red-600 dark:bg-red-950/50"),children:A.exists?(0,se.jsx)(Yy,{className:"w-5 h-5"}):(0,se.jsx)(Hm,{className:"w-5 h-5"})}),(0,se.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,se.jsxs)("div",{className:"flex items-center justify-between",children:[(0,se.jsx)("h4",{className:"text-sm font-bold",children:A.exists?v("Cloud.Status.Uploaded"):v("Cloud.Status.NotDownloaded")}),A.exists&&(0,se.jsx)("span",{className:"text-[10px] font-medium bg-green-500/10 text-green-600 px-2 py-0.5 rounded-full border border-green-500/20 uppercase",children:v("Cloud.Status.Ready")})]}),(0,se.jsx)("p",{className:"text-xs text-muted-foreground break-all",children:A.exists?A.path:`${v("Cloud.Notices.NoFile")}: ${A.language}.json`}),A.exists&&A.lastModified&&(0,se.jsxs)("div",{className:"flex flex-wrap gap-x-4 gap-y-1 mt-2",children:[(0,se.jsxs)("div",{className:"flex items-center gap-1.5 text-[11px] text-muted-foreground",children:[(0,se.jsx)(Kc,{className:"w-3 h-3"}),(0,se.jsx)("span",{children:A.language.toUpperCase()})]}),(0,se.jsxs)("div",{className:"flex items-center gap-1.5 text-[11px] text-muted-foreground",children:[(0,se.jsx)(Hf,{className:"w-3 h-3"}),(0,se.jsx)("span",{children:ue(A.size)})]}),(0,se.jsxs)("div",{className:"flex items-center gap-1.5 text-[11px] text-muted-foreground",children:[(0,se.jsx)(Ea,{className:"w-3 h-3"}),(0,se.jsxs)("span",{children:[v("Common.Labels.Mtime"),": ",A.lastModified.toLocaleString(e.settings.language,{dateStyle:"medium",timeStyle:"short"})]})]})]})]})]},A.path))})})]}),s&&(0,se.jsxs)("section",{className:"space-y-3 animate-in fade-in slide-in-from-bottom-2 duration-500",children:[(0,se.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,se.jsx)("div",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-primary/10 text-primary text-xs font-bold",children:"5"}),(0,se.jsx)(Vr,{className:"text-sm font-semibold uppercase tracking-wider text-muted-foreground",children:v("Cloud.Steps.CompleteInfo")})]}),(0,se.jsx)(is,{className:"border-border/50 shadow-sm transition-all hover:shadow-md hover:border-primary/20",children:(0,se.jsxs)(ep,{className:"p-5 space-y-4",children:[(0,se.jsxs)("div",{className:"space-y-2",children:[(0,se.jsxs)(Vr,{className:"text-xs text-muted-foreground font-medium flex items-center gap-1.5",children:[(0,se.jsx)(Uf,{className:"w-3.5 h-3.5"}),v("Cloud.Labels.TranslationTitle")]}),(0,se.jsx)(Qe,{value:i.title,onChange:A=>h({...i,title:A.target.value}),placeholder:v("Cloud.Placeholders.RepoName"),className:"bg-muted/30 focus:bg-background transition-colors"}),(0,se.jsx)("p",{className:"text-[10px] text-muted-foreground",children:v("Cloud.Tips.ReadmeDefault")})]}),(0,se.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,se.jsxs)("div",{className:"space-y-2",children:[(0,se.jsxs)(Vr,{className:"text-xs text-muted-foreground font-medium flex items-center gap-1.5",children:[(0,se.jsx)(Kc,{className:"w-3.5 h-3.5"}),v("Cloud.Labels.Version")]}),(0,se.jsx)(Qe,{value:i.version,onChange:A=>h({...i,version:A.target.value}),placeholder:"1.0.0",className:"bg-muted/30 focus:bg-background transition-colors font-mono"})]}),(0,se.jsxs)("div",{className:"space-y-2",children:[(0,se.jsxs)(Vr,{className:"text-xs text-muted-foreground font-medium flex items-center gap-1.5",children:[(0,se.jsx)(Ro,{className:"w-3.5 h-3.5"}),v("Cloud.Labels.Language")]}),(0,se.jsx)(Qe,{value:e.settings.language,disabled:!0,className:"bg-muted/50 text-muted-foreground font-medium"})]})]}),(0,se.jsxs)("div",{className:"space-y-2",children:[(0,se.jsxs)(Vr,{className:"text-xs text-muted-foreground font-medium flex items-center gap-1.5",children:[(0,se.jsx)(Hf,{className:"w-3.5 h-3.5"}),v("Cloud.Labels.Description")," (",v("Common.Labels.Optional"),")"]}),(0,se.jsx)(Bo,{value:i.description,onChange:A=>h({...i,description:A.target.value}),placeholder:v("Cloud.Tabs.Readme"),className:"min-h-[100px] bg-muted/30 focus:bg-background transition-colors resize-none"})]})]})})]}),s&&(0,se.jsxs)("section",{className:"space-y-3 animate-in fade-in slide-in-from-bottom-2 duration-500 pb-8",children:[(0,se.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,se.jsx)("div",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-primary/10 text-primary text-xs font-bold",children:"6"}),(0,se.jsx)(Vr,{className:"text-sm font-semibold uppercase tracking-wider text-muted-foreground",children:v("Cloud.Steps.VerifyAndPublish")})]}),(0,se.jsxs)(is,{className:oe("border-border shadow-sm overflow-hidden",_?"bg-blue-500/[0.02]":"bg-green-500/[0.02]"),children:[(0,se.jsx)(Qf,{className:"py-4 border-b bg-muted/10",children:(0,se.jsxs)("div",{className:"flex items-center justify-between",children:[(0,se.jsxs)("div",{className:"flex items-center gap-2",children:[_?(0,se.jsx)(Gm,{className:"w-5 h-5 text-blue-500"}):(0,se.jsx)(yS,{className:"w-5 h-5 text-primary"}),(0,se.jsxs)("div",{children:[(0,se.jsx)(Zf,{className:"text-[15px] font-bold",children:_?v("Cloud.Actions.UpdateTranslation"):v("Cloud.Titles.NewPublish")}),(0,se.jsx)(NS,{className:"text-[10px]",children:_?v("Cloud.Dialogs.ConfirmUpdate"):v("Cloud.Notices.UploadCompleteDesc")})]})]}),_&&(0,se.jsx)(mt,{variant:"outline",className:"bg-blue-500/10 text-blue-600 border-blue-500/30 font-bold uppercase",children:v("Common.Actions.Update")})]})}),(0,se.jsxs)(ep,{className:"p-0",children:[(0,se.jsxs)("div",{className:"p-4 bg-muted/5 space-y-3",children:[(0,se.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,se.jsxs)("div",{className:"space-y-1",children:[(0,se.jsx)("div",{className:"text-[10px] text-muted-foreground font-medium uppercase tracking-wider",children:v("Cloud.Labels.LocalFile")}),(0,se.jsxs)("div",{className:"flex items-center gap-2",children:[(0,se.jsx)("div",{className:"w-1.5 h-1.5 rounded-full bg-green-500"}),(0,se.jsx)("span",{className:"text-xs font-mono truncate max-w-[150px]",title:o[0]?.path,children:o[0]?.path.split(/[\\/]/).pop()})]})]}),(0,se.jsxs)("div",{className:"space-y-1",children:[(0,se.jsx)("div",{className:"text-[10px] text-muted-foreground font-medium uppercase tracking-wider",children:v("Cloud.Labels.FileSize")}),(0,se.jsx)("div",{className:"text-xs font-mono",children:ue(o[0]?.size)})]})]}),(0,se.jsxs)("div",{className:"flex items-center gap-2 pt-1",children:[(0,se.jsx)("div",{className:"text-[10px] text-muted-foreground font-medium uppercase tracking-wider",children:v("Cloud.Labels.ContentHash")}),(0,se.jsx)("div",{className:"text-[10px] font-mono text-muted-foreground/50 bg-muted/30 px-1.5 py-0.5 rounded truncate",children:ie})]}),k&&(0,se.jsxs)("div",{className:oe("mt-2 p-3 rounded-lg border-l-4 flex items-center justify-between",ae?"bg-green-500/5 border-l-green-500 text-green-600":"bg-amber-500/5 border-l-amber-500 text-amber-600"),children:[(0,se.jsx)("div",{className:"flex items-center gap-2",children:ae?(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)(ts,{className:"w-4 h-4"}),(0,se.jsx)("span",{className:"text-xs font-medium",children:v("Cloud.Status.SyncWithCloud")})]}):(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)(es,{className:"w-4 h-4"}),(0,se.jsx)("span",{className:"text-xs font-medium",children:v("Cloud.Status.CloudDifferent")})]})}),(0,se.jsxs)(Te,{variant:"ghost",size:"sm",className:"h-7 text-[10px] gap-1 hover:bg-background/80",onClick:()=>ee(s),children:[(0,se.jsx)(sS,{className:"w-3 h-3"}),v("Cloud.Actions.ViewDiff")]})]})]}),(0,se.jsxs)("div",{className:"p-5 bg-background",children:[(0,se.jsx)(Te,{onClick:ge,disabled:W||_&&ae,className:oe("w-full h-12 gap-2 text-base font-bold shadow-xl transition-all active:scale-95",_?"bg-blue-600 hover:bg-blue-700 shadow-blue-500/20":"bg-primary hover:bg-primary/90 shadow-primary/20",_&&ae&&"opacity-50 grayscale cursor-not-allowed"),children:W?(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)(zt,{className:"w-5 h-5 animate-spin"}),_?v("Cloud.Actions.Update"):v("Cloud.Actions.Add"),"..."]}):(0,se.jsxs)(se.Fragment,{children:[_?(0,se.jsx)(zf,{className:"w-5 h-5"}):(0,se.jsx)(Vf,{className:"w-5 h-5"}),_?ae?v("Cloud.Status.UpToDate"):v("Cloud.Actions.Update"):v("Cloud.Actions.Add")]})}),(0,se.jsxs)("p",{className:"text-[10px] text-center text-muted-foreground mt-3",children:[v("Cloud.Tips.PublishNoticePrefix")," ",(0,se.jsxs)("span",{className:"underline decoration-dotted",children:[d?.login,"/",D]})," ",v("Cloud.Tips.PublishNoticeSuffix")]})]})]})]})]})]})}),(0,se.jsx)(Ine,{})]}):(0,se.jsxs)("div",{className:"flex flex-col flex-1 h-full min-h-0 w-full animate-in fade-in duration-500",children:[$(),(0,se.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center gap-4 text-muted-foreground p-6",children:[(0,se.jsx)(rs,{className:"w-10 h-10 opacity-50"}),(0,se.jsx)("p",{className:"text-sm",children:v("Cloud.Hints.RepoNotInit")}),(0,se.jsx)(Te,{variant:"outline",size:"sm",className:"mt-4 shadow-sm hover:bg-primary hover:text-primary-foreground transition-all",onClick:()=>me("my"),children:v("Cloud.Actions.BackToManage")})]})]}):(0,se.jsxs)("div",{className:"flex flex-col flex-1 h-full min-h-0 w-full animate-in fade-in duration-500",children:[$(),(0,se.jsx)(qp,{})]})};var $r=N(Le());qt();Vt();Rr();lf();var iI=N(fs());var Y=N(ce());function RYe(e){let t=0;for(let a=0;a<e.length;a++){let n=e.charCodeAt(a);t=(t<<5)-t+n,t=t&t}return Math.abs(t).toString(16).padStart(8,"0").repeat(4)}var Rne=()=>{let e=He.getState().i18n,t=He(pe=>pe.sourceUpdateTick),r=Se.use.githubUser(),a=Se.use.repoInitialized(),n=Se.use.repoChecking(),s=Se.use.repoManifest(),i=Se.use.setRepoManifest(),o=Se.use.myRepoInfo(),l=Se.use.myRepoReadme(),c=Se.use.setMyRepoReadme(),u=Se.use.setRepoInitialized(),d=Se.use.setRepoDataLoaded(),f=Se.use.canCreateRepo(),p=Se.use.repoNameInput(),m=Se.use.setRepoNameInput(),h=Se.use.repoDescriptionInput(),x=Se.use.setRepoDescriptionInput(),[g,y]=(0,$r.useState)(null),[b,S]=(0,$r.useState)("all"),[w,P]=(0,$r.useState)(""),[C,I]=(0,$r.useState)([]),[R,O]=(0,$r.useState)("plugins"),[D,W]=(0,$r.useState)(!1),[J,me]=(0,$r.useState)(""),[Z,q]=(0,$r.useState)(!1),[V,L]=(0,$r.useState)(!1);(0,$r.useEffect)(()=>{(async()=>{let $e=[],nt=e.app.plugins.manifests;Object.values(nt).forEach(qe=>{qe.id!==e.manifest.id&&$e.push({id:qe.id,name:qe.name,type:"plugin"})});try{let qe=e.app.vault.adapter.getBasePath();if(await e.app.vault.adapter.exists(`${e.app.vault.configDir}/themes`)){let jt=await e.app.vault.adapter.list(`${e.app.vault.configDir}/themes`);for(let st of jt.folders){let bt=st.split("/").pop();bt&&$e.push({id:bt,name:bt,type:"theme"})}}}catch{}I($e.sort((qe,ut)=>qe.name.localeCompare(ut.name)))})()},[e]);let k=e.settings.shareRepo,_=Se.use.communityRegistry(),ee=Se.use.communityStats(),[ie,ae]=(0,$r.useState)(!1),[ge,ue]=(0,$r.useState)(!1),[$,A]=(0,$r.useState)(!1),K=ee?.repos[`${r?.login}/${k}`]!==void 0,he=Se.use.setCurrentTab(),H=Se.use.setSelectedPluginId(),xe=Se.use.setUploadForm(),Pe=Se.use.setSelectedSourceId(),[Ie,Ve]=(0,$r.useState)(null),ft=Se.use.setHistoryDialogEntryId(),we=(0,$r.useCallback)(async pe=>{let $e=p.trim();if($e.includes("/")&&($e=$e.split("/").pop()||""),!$e){e.notice.errorPrefix(v("Cloud.Errors.InitFailed"),v("Cloud.Hints.RepoNameRequired"));return}if(!r){e.notice.errorPrefix(v("Cloud.Errors.InitFailed"),v("Cloud.Errors.NoGithubUser"));return}L(!0);try{if(pe==="create"){if(e.notice.successPrefix(v("Cloud.Status.Initializing"),v("Cloud.Status.CreatingRepo")),!(await e.api.github.createRepo($e)).state)throw new Error(v("Cloud.Errors.CreateRepoFail"));await new Promise(ut=>setTimeout(ut,2e3))}else if(e.notice.successPrefix(v("Cloud.Status.Checking"),v("Cloud.Status.VerifyingRepo")),!(await e.api.github.checkRepoExists(r.login,$e)).state)throw new Error(v("Cloud.Errors.RepoNotExistOnGithub",{repo:`${r.login}/${$e}`}));if(e.notice.successPrefix(v("Cloud.Status.Initializing"),v("Cloud.Status.InitializingStructure")),!(await e.api.github.initRepoStructure(r.login,$e)).state)throw new Error(v("Cloud.Errors.InitRepoStructFail"));if(pe==="create"){e.notice.successPrefix(v("Cloud.Status.Initializing"),v("Cloud.Status.GeneratingReadme"));let qe=`# ${$e}
|
|
|
|
${h.trim()||v("Cloud.Tips.ReadmeDefault")}`,ut=Buffer.from(qe,"utf-8").toString("base64");(await e.api.github.uploadFile(r.login,$e,"README.md",ut,v("Cloud.Labels.InitReadmeMsg"))).state}e.settings.shareRepo=$e,await e.saveSettings(),e.notice.successPrefix(v("Cloud.Notices.UploadSuccess"),v("Cloud.Notices.RepoReadyPrefix")),u(!0),await new Promise(qe=>setTimeout(qe,1e3)),d(!1)}catch(nt){e.notice.errorPrefix(v("Cloud.Errors.InitFailed"),`${nt}`)}finally{L(!1)}},[e,r,p,h,u,d,v]);$r.default.useEffect(()=>{if(!r||!k||K)return;let pe=!1;return(async()=>{A(!0);try{let nt="eondrcode/obsidian-i18n-resources",[qe,ut]=nt.split("/"),jt=`${r.login}/${k}`,st=await e.api.github.checkHasOpenRegistrationIssue(qe,ut,jt,r.login);!pe&&st.state&&st.hasOpenIssue&&ue(!0)}catch{}finally{pe||A(!1)}})(),()=>{pe=!0}},[r,k,K,e]);let Ne=(0,$r.useCallback)(async()=>{if(!r||!k||ie)return;let pe=`${r.login}/${k}`;if(K){e.notice.successPrefix(v("Cloud.Status.Registered"),v("Cloud.Hints.RepoAlreadyInCommunity"));return}if(s.length===0){e.notice.errorPrefix(v("Cloud.Errors.CannotRegister"),v("Cloud.Hints.PublishBeforeRegister"));return}ae(!0);try{let $e="eondrcode/obsidian-i18n-resources";if(!$e)throw new Error(v("Cloud.Errors.RegistryAddrMissing"));let[nt,qe]=$e.split("/");if(!nt||!qe)throw new Error(v("Cloud.Errors.RegistryAddrFormatError"));let ut=`[Register] ${pe}`,jt=`https://github.com/${pe}`,st=`https://github.com/${pe}/blob/main/metadata.json`,bt=s.length,Qa=Array.from(new Set(s.map(Me=>Me.language))).join(", "),Br=[`## ${v("Cloud.Actions.ApplyForCommunity")}`,"",`${v("Cloud.Labels.RegistrationLabel")}`,"",`### \u{1F4D6} ${v("Cloud.Labels.RepoInfo")}`,`- **${v("Cloud.Labels.RepoAddress")}**: [${pe}](${jt})`,`- **${v("Cloud.Labels.ManifestFile")}**: [metadata.json](${st})`,`- **${v("Cloud.Labels.TranslationCountLabel")}**: \`${bt}\` ${v("Cloud.Labels.UnitPlugins")}`,`- **${v("Cloud.Labels.LanguagesCovered")}**: \`${Qa||v("Common.Status.Unknown")}\``,"",`### \u{1F6E0} ${v("Cloud.Labels.ReviewHelper")}`,`> **${v("Cloud.Labels.ReviewerNotes")}**\uFF1A`,`> 1. ${v("Cloud.Labels.ReviewerNote1")}`,`> 2. ${v("Cloud.Labels.ReviewerNote2")}`,`> 3. ${v("Cloud.Labels.ReviewerNote3")}`,`> - [\u{1F517} ${v("Cloud.Labels.CheckManifestData")}](https://raw.githubusercontent.com/${pe}/main/metadata.json)`,"","---",`*${v("Cloud.Labels.IssueAutoGenerated")}*`].join(`
|
|
`),Nr=await e.api.github.getFileContent(nt,qe,"registry.json");if(Nr.state&&Nr.data?.content){let Me=Buffer.from(Nr.data.content,"base64").toString("utf-8");try{let je=JSON.parse(Me);if(Array.isArray(je)&&je.some(et=>et.repoAddress===pe)){e.notice.errorPrefix(v("Cloud.Hints.RegistrationIntercept"),v("Cloud.Hints.RepoAlreadyRegistered"));return}}catch{}}let ye=await e.api.github.checkHasOpenRegistrationIssue(nt,qe,pe,r.login);if(ye.state&&ye.hasOpenIssue){e.notice.errorPrefix(v("Cloud.Hints.RegistrationIntercept"),v("Cloud.Hints.RegistrationPending"));return}let ke=await e.api.github.postIssue(ut,Br,void 0,nt,qe);if(ke.state)e.notice.successPrefix(v("Cloud.Notices.SubmitSuccess"),v("Cloud.Notices.RegistrationSubmittedDesc")),ue(!0);else throw new Error(ke.data?.message||v("Common.Notices.Failure"))}catch($e){e.notice.errorPrefix(v("Common.Notices.Failure"),`${$e}`)}finally{ae(!1)}},[r,k,ie,K,s,e]),Be=(0,$r.useCallback)(async()=>{if(!(!r||!k)){q(!0);try{let pe=r.login,$e=Buffer.from(J,"utf-8").toString("base64"),nt=await e.api.github.uploadFile(pe,k,"README.md",$e,v("Cloud.Labels.UpdateReadmeMsg"));if(!nt.state)throw new Error(nt.data?.message||v("Common.Notices.SaveFail"));c(J),W(!1),e.notice.successPrefix(v("Cloud.Notices.SaveSuccess"),v("Cloud.Notices.ReadmeUpdated"))}catch(pe){e.notice.errorPrefix(v("Common.Notices.SaveFail"),`${pe}`)}finally{q(!1)}}},[r,k,J,e,c]),tt=(0,$r.useCallback)(pe=>{H(pe.plugin),Pe(pe.id),xe({title:pe.title,description:pe.description||"",version:pe.version||pe.supported_versions||""}),he("upload")},[H,Pe,xe,he]),Ct=(0,$r.useCallback)(async pe=>{if(confirm(v("Cloud.Dialogs.DeleteConfirm",{plugin:pe.plugin,title:pe.title}))&&r){y(pe.id);try{let $e=r.login,nt=po(pe.id,pe.type),qe=await e.api.github.deleteFile($e,k,nt,`${v("Cloud.Labels.RemoveTranslation")}: ${pe.id}`);!qe.state&&(qe.data,v("Cloud.Notices.NoFile"));let ut=[],jt=await e.api.github.getFileContent($e,k,"metadata.json");if(jt.state&&jt.data?.content){let bt=Buffer.from(jt.data.content,"base64").toString("utf-8");ut=JSON.parse(bt)}else if(jt.status!==404)throw new Error(v("Cloud.Errors.UpdateIndexFail")+": "+(jt.data?.message||"Network Error"));ut=ut.filter(bt=>bt.id!==pe.id);let st=await e.api.github.uploadFile($e,k,"metadata.json",Buffer.from(JSON.stringify(ut,null,2)).toString("base64"),`${v("Cloud.Labels.DeleteEntry")}: ${pe.plugin}`);if(!st.state)throw new Error(`${v("Cloud.Errors.UpdateIndexFail")}: ${st.data?.message||st.data}`);i(ut),e.notice.successPrefix(v("Common.Notices.Success"),v("Common.Notices.DeleteSuccess"))}catch($e){e.notice.errorPrefix(v("Common.Notices.Failure"),`${$e}`)}finally{y(null)}}},[r,e,k,i]),Tt=(0,$r.useCallback)(async pe=>{if(!(!r||!k)&&!Ie){Ve(pe.id),e.notice.successPrefix(v("Cloud.Status.Processing"),v("Cloud.Status.Downloading",{title:pe.title}));try{let $e=r.login,nt=await e.api.github.getFileContentWithFallback($e,k,po(pe.id,pe.type));if(!nt.state||!nt.data){let st=nt.isRateLimit?v("Cloud.Hints.RateLimitTitle"):nt.data?.message||nt.data||"";throw new Error(`${v("Cloud.Errors.DownloadFail")}: ${st}`)}let qe=typeof nt.data=="string"?JSON.parse(nt.data):nt.data,ut=e.sourceManager;if(!ut)throw new Error(v("Cloud.Errors.InitFailed"));ut.saveSourceFile(pe.id,qe);let jt=ut.getAllSources().find(st=>st.id===pe.id);if(jt){let st={...jt,origin:"cloud",title:pe.title||jt.title,checksum:xs(qe),cloud:{owner:$e,repo:k,hash:pe.hash},updatedAt:Date.now()};ut.saveSource(st)}else{let st={id:pe.id,plugin:pe.plugin,title:pe.title||v("Cloud.Labels.UnnamedTranslation"),type:pe.type,origin:"cloud",isActive:!1,checksum:xs(qe),cloud:{owner:$e,repo:k,hash:pe.hash},updatedAt:Date.now(),createdAt:Date.now()};ut.saveSource(st),ut.getActiveSourceId(pe.plugin)||ut.setActive(pe.id,!0)}He.getState().triggerSourceUpdate(),e.notice.successPrefix(v("Common.Notices.Success"),v("Cloud.Notices.DownloadSuccessLocal"))}catch($e){e.notice.errorPrefix(v("Cloud.Errors.DownloadFail"),`${$e}`)}finally{Ve(null)}}},[r,e,k,Ie]),Qt=(0,$r.useCallback)(pe=>{let $e=e.sourceManager;if(!$e)return"not_downloaded";let qe=$e.getAllSources().find(ut=>ut.id===pe.id);if(!qe)return"not_downloaded";try{let ut=$e.getSourceFilePath(qe.id);if(!ut||!iI.existsSync(ut))return"not_downloaded";let jt=iI.readFileSync(ut,"utf-8");return RYe(jt)===pe.hash?"up_to_date":"update_available"}catch{return"update_available"}},[e,t]);if(!e.settings.shareToken)return(0,Y.jsx)(qp,{});let Ur=s.filter(pe=>!(b&&b!=="all"&&pe.language!==b||w&&!pe.plugin.toLowerCase().includes(w.toLowerCase())&&!pe.title.toLowerCase().includes(w.toLowerCase())));return e.settings.shareToken?n?(0,Y.jsxs)("div",{className:"flex flex-col items-center justify-center h-40 gap-3 text-muted-foreground",children:[(0,Y.jsx)(zt,{className:"w-6 h-6 animate-spin text-primary"}),(0,Y.jsx)("p",{className:"text-sm",children:v("Cloud.Status.LoadingRepo")})]}):a?(0,Y.jsxs)("div",{className:"flex h-full gap-0 overflow-hidden min-h-0 animate-in fade-in duration-500",children:[(0,Y.jsx)("aside",{className:"w-[280px] flex flex-col border-r border-border/20 pr-5 shrink-0 overflow-hidden min-h-0",children:(0,Y.jsx)(sr,{className:"flex-1",children:(0,Y.jsxs)("div",{className:"space-y-8 pb-8 pt-4",children:[s.length>0&&(0,Y.jsxs)("div",{className:"bg-card border border-border/60 shadow-[0_8px_30px_rgb(0,0,0,0.02)] dark:shadow-[0_8px_30px_rgb(0,0,0,0.15)] rounded-lg overflow-hidden group transition-all duration-300 hover:border-primary/20",children:[(0,Y.jsxs)("div",{className:"p-5 pb-4 border-b border-border/40 bg-muted/5",children:[(0,Y.jsxs)("div",{className:"flex items-center gap-4 mb-4",children:[(0,Y.jsxs)("div",{className:"relative",children:[r?.avatar_url?(0,Y.jsx)("img",{src:r.avatar_url,className:"w-12 h-12 rounded-full border-2 border-background shadow-md object-cover",alt:"avatar"}):(0,Y.jsx)("div",{className:"w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center text-primary shadow-inner",children:(0,Y.jsx)(Ts,{className:"w-6 h-6"})}),(0,Y.jsx)("div",{className:"absolute -bottom-1 -right-1 w-4 h-4 rounded-full bg-green-500 border-2 border-background",title:"Connected"})]}),(0,Y.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,Y.jsx)("span",{className:"text-[14px] font-extrabold text-foreground leading-none truncate mb-1",title:r?.name||r?.login,children:r?.name||r?.login}),(0,Y.jsxs)("div",{className:"flex items-center gap-2 text-[10px] text-muted-foreground/70 font-medium",children:[(0,Y.jsxs)("span",{className:"flex items-center gap-1",children:[(0,Y.jsx)(Ts,{className:"w-2.5 h-2.5"}),r?.followers||0]}),(0,Y.jsx)("span",{className:"opacity-30",children:"\u2022"}),(0,Y.jsxs)("span",{className:"flex items-center gap-1",children:[(0,Y.jsx)(rs,{className:"w-2.5 h-2.5"}),r?.public_repos||0]})]})]})]}),(0,Y.jsxs)("div",{className:"flex items-center gap-2 p-2 px-2.5 rounded-lg bg-background/50 border border-border/40 overflow-hidden",children:[(0,Y.jsx)(No,{className:"w-3.5 h-3.5 text-primary shrink-0 opacity-70"}),(0,Y.jsx)("a",{href:`https://github.com/${r?.login}/${k}`,target:"_blank",rel:"noopener noreferrer",className:"font-bold text-[11px] font-mono truncate hover:text-primary transition-colors text-muted-foreground/90",title:v("Cloud.Labels.ViewOnGithubTitle",{repo:`${r?.login}/${k}`}),children:k})]})]}),(0,Y.jsxs)("div",{className:"p-5 space-y-5",children:[(0,Y.jsx)("div",{className:"grid grid-cols-2 gap-3",children:[{label:v("Cloud.Labels.StatAssets"),value:s.length,color:"text-primary"},{label:v("Cloud.Labels.StatStars"),value:o?.stargazers_count??"-",color:"text-yellow-600"},{label:v("Cloud.Labels.StatForks"),value:o?.forks_count??"-",color:"text-blue-600"},{label:v("Cloud.Labels.StatIssues"),value:o?.open_issues_count??"-",color:"text-red-500/80"}].map((pe,$e)=>(0,Y.jsxs)("div",{className:"flex flex-col p-2.5 rounded-md bg-muted/20 border border-border/5 transition-all hover:bg-muted/40 hover:border-border/20 group/stat",children:[(0,Y.jsx)("span",{className:"text-[9px] font-bold text-muted-foreground/60 uppercase tracking-widest mb-1 group-hover/stat:text-primary/70",children:pe.label}),(0,Y.jsx)("span",{className:oe("text-[13px] font-black tracking-tighter",pe.color),children:pe.value})]},$e))}),K?(0,Y.jsxs)("div",{className:"flex items-center justify-center gap-2 w-full h-9 rounded-lg bg-green-500/5 text-green-600 text-[11px] font-black tracking-tight border border-green-500/10 shadow-sm uppercase",children:[(0,Y.jsx)(xl,{className:"w-3.5 h-3.5"}),v("Cloud.Status.Registered")]}):(0,Y.jsxs)(Te,{variant:"outline",size:"sm",className:"w-full h-9 text-[11px] font-bold tracking-tight gap-2 rounded-lg border-primary/20 bg-primary/5 text-primary hover:bg-primary hover:text-primary-foreground transition-all active:scale-[0.97]",onClick:Ne,disabled:ie||ge||$,children:[ie||$?(0,Y.jsx)(zt,{className:"w-3.5 h-3.5 animate-spin"}):(0,Y.jsx)(Ts,{className:"w-3.5 h-3.5"}),ge?v("Cloud.Status.Reviewing"):$?v("Cloud.Status.Fetching"):v("Cloud.Actions.RegisterCommunity")]})]})]}),(0,Y.jsxs)("div",{className:"space-y-3 px-1",children:[(0,Y.jsxs)("div",{className:"flex items-center gap-2 text-[9px] font-black text-muted-foreground/50 uppercase tracking-[0.2em] mb-4",children:[(0,Y.jsx)(Ca,{className:"w-3 h-3 opacity-60"}),(0,Y.jsx)("span",{children:v("Cloud.Labels.CloudActions")})]}),(0,Y.jsxs)(Te,{variant:"outline",className:"w-full justify-between h-10 px-4 group bg-card border-border/60 hover:border-primary/40 hover:bg-primary/5 transition-all active:scale-[0.97]",onClick:()=>{H(""),he("upload")},children:[(0,Y.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Y.jsx)(Tl,{className:"w-4 h-4 text-primary opacity-70 group-hover:scale-110 transition-transform"}),(0,Y.jsx)("span",{className:"text-[12px] font-extrabold tracking-tight",children:v("Cloud.Actions.PublishNew")})]}),(0,Y.jsx)(as,{className:"w-3.5 h-3.5 text-muted-foreground/30"})]}),(0,Y.jsxs)(Te,{variant:"outline",className:"w-full justify-between h-10 px-4 group bg-card border-border/60 hover:border-blue-500/40 hover:bg-blue-500/5 transition-all active:scale-[0.97]",onClick:()=>he("backup"),children:[(0,Y.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Y.jsx)(Ca,{className:"w-4 h-4 text-blue-500 opacity-70 group-hover:scale-110 transition-transform"}),(0,Y.jsx)("span",{className:"text-[12px] font-extrabold tracking-tight",children:v("Cloud.Labels.BackupRestore")})]}),(0,Y.jsx)(so,{className:"w-3.5 h-3.5 text-muted-foreground/30"})]}),(0,Y.jsx)("div",{className:"pt-4 border-t border-border/10 mt-2",children:(0,Y.jsxs)(Te,{variant:"ghost",className:"w-full justify-start h-9 px-3 gap-3 text-muted-foreground/60 hover:text-primary hover:bg-primary/5 transition-all rounded-lg group",onClick:()=>d(!1),children:[(0,Y.jsx)(Wr,{className:"w-4 h-4 opacity-50 group-hover:rotate-180 group-hover:opacity-100 transition-all duration-500"}),(0,Y.jsx)("span",{className:"text-[11px] font-bold",children:v("Cloud.Actions.ForceRefresh")})]})})]})]})})}),(0,Y.jsx)("main",{className:"flex-1 flex flex-col pt-1 pl-4 overflow-hidden min-h-0 border-l border-border/10",children:(0,Y.jsxs)(Ll,{value:R,onValueChange:pe=>O(pe),className:"flex flex-col h-full min-h-0",children:[s.length>0&&(0,Y.jsxs)("div",{className:"flex flex-col gap-3 mb-5 mt-1 border border-border/40 rounded-xl bg-card/60 p-3 shadow-sm backdrop-blur-sm",children:[(0,Y.jsx)("div",{className:"flex items-center justify-between pb-3 border-b border-border/30",children:(0,Y.jsxs)(Rl,{className:"h-9 p-1 bg-muted/50 border border-border/40 rounded-lg shadow-inner",children:[(0,Y.jsxs)(Ga,{value:"plugins",className:"text-xs px-4 h-7 data-[state=active]:bg-background data-[state=active]:shadow-sm rounded-md transition-all",children:[(0,Y.jsx)(sa,{className:"w-3.5 h-3.5 mr-1.5 text-muted-foreground"}),v("Cloud.Tabs.Resources")]}),(0,Y.jsxs)(Ga,{value:"readme",className:"text-xs px-4 h-7 data-[state=active]:bg-background data-[state=active]:shadow-sm rounded-md transition-all",children:[(0,Y.jsx)(Zi,{className:"w-3.5 h-3.5 mr-1.5 text-muted-foreground"}),v("Cloud.Tabs.Readme")]})]})}),(0,Y.jsxs)("div",{className:"flex items-center justify-between min-h-[32px] px-1",children:[(0,Y.jsx)("div",{className:"flex items-center gap-2 text-[13px] font-semibold text-muted-foreground/80",children:R==="plugins"?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded bg-primary/10 text-primary shrink-0",children:(0,Y.jsx)(Lo,{className:"w-3.5 h-3.5"})}),(0,Y.jsxs)("span",{children:[v("Cloud.Labels.PublishedResources")," (",s.length,")"]})]}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded bg-primary/10 text-primary shrink-0",children:(0,Y.jsx)(Zi,{className:"w-3.5 h-3.5"})}),(0,Y.jsx)("span",{children:v("Cloud.Labels.ReadmeCustomPage")})]})}),(0,Y.jsxs)("div",{className:oe("flex items-center gap-3 shrink-0 transition-opacity",R==="readme"?"opacity-30 pointer-events-none":"opacity-100"),children:[(0,Y.jsxs)("div",{className:"relative group w-52 shadow-sm",children:[(0,Y.jsx)(ra,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-muted-foreground group-focus-within:text-primary transition-colors"}),(0,Y.jsx)(Qe,{placeholder:v("Cloud.Placeholders.SearchPublished"),value:w,onChange:pe=>P(pe.target.value),className:"pl-8 h-8 text-xs bg-background border-border/60 focus:border-primary/50 transition-all rounded-md"})]}),(0,Y.jsxs)(lr,{onValueChange:pe=>{P(pe==="all"?"":pe)},children:[(0,Y.jsx)(ur,{size:"sm",className:"w-44 text-xs bg-background border-border/60 rounded-md shadow-sm h-8",children:(0,Y.jsx)(cr,{placeholder:v("Common.Filters.All")})}),(0,Y.jsx)(dr,{children:(0,Y.jsxs)(sr,{className:"h-72",children:[(0,Y.jsx)(Rt,{value:"all",className:"text-[11px]",children:v("Common.Filters.All")}),C.map(pe=>(0,Y.jsx)(Rt,{value:pe.name,className:"text-[11px]",children:(0,Y.jsxs)("div",{className:"flex items-center gap-2",children:[pe.type==="plugin"?(0,Y.jsx)(sa,{className:"w-3 h-3 text-muted-foreground/50"}):(0,Y.jsx)(Oa,{className:"w-3 h-3 text-muted-foreground/50"}),(0,Y.jsx)("span",{children:pe.name})]})},pe.id))]})})]}),(0,Y.jsxs)(lr,{value:b,onValueChange:S,children:[(0,Y.jsx)(ur,{size:"sm",className:"w-32 text-xs bg-background border-border/60 rounded-md shadow-sm h-8",children:(0,Y.jsx)(cr,{})}),(0,Y.jsxs)(dr,{children:[(0,Y.jsx)(Rt,{value:"all",className:"text-[11px]",children:v("Common.Filters.All")}),Yn.map(pe=>(0,Y.jsx)(Rt,{value:pe.value,className:"text-[11px]",children:pe.label},pe.value))]})]}),(0,Y.jsx)(mt,{variant:"secondary",className:"h-8 px-2.5 font-mono text-[11px] font-bold bg-muted text-muted-foreground border border-border/50 shadow-sm rounded-md hover:bg-muted ml-1",children:Ur.length})]})]})]}),(0,Y.jsx)(ca,{value:"plugins",className:"flex-1 min-h-0 m-0 outline-none data-[state=active]:flex flex-col relative z-10",children:(0,Y.jsx)(MYe,{filteredEntries:Ur,repoManifest:s,handleEdit:tt,handleDelete:Ct,handleDownload:Tt,setHistoryDialogEntryId:ft,setCurrentTab:he,deletingId:g,downloadingId:Ie,getUpdateStatus:Qt,t:v})}),(0,Y.jsxs)(ca,{value:"readme",className:"flex-1 min-h-0 m-0 outline-none data-[state=active]:flex flex-col relative z-10 bg-card rounded-xl border shadow-sm overflow-hidden",children:[(0,Y.jsxs)("div",{className:"flex items-center justify-between px-4 py-2 border-b border-border/40 shrink-0 bg-muted/20",children:[(0,Y.jsxs)("div",{className:"text-xs font-semibold text-muted-foreground flex items-center gap-2",children:[(0,Y.jsx)(Zi,{className:"w-4 h-4"}),"README.md"]}),(0,Y.jsx)("div",{children:D?(0,Y.jsxs)("div",{className:"flex gap-2",children:[(0,Y.jsx)(Te,{size:"sm",variant:"ghost",className:"h-7 text-xs",onClick:()=>{W(!1),me(l||"")},children:v("Common.Actions.Cancel")}),(0,Y.jsxs)(Te,{size:"sm",className:"h-7 text-xs",onClick:Be,disabled:Z,children:[Z?(0,Y.jsx)(zt,{className:"w-3 h-3 animate-spin mr-1"}):(0,Y.jsx)(id,{className:"w-3 h-3 mr-1"})," ",v("Common.Actions.Save")]})]}):(0,Y.jsxs)(Te,{size:"sm",variant:"outline",className:"h-7 text-xs",onClick:()=>{W(!0),me(l||"")},children:[(0,Y.jsx)(sd,{className:"w-3 h-3 mr-1"})," ",v("Common.Actions.Edit")]})})]}),(0,Y.jsx)(sr,{className:"flex-1 min-h-0 bg-background/50",children:D?(0,Y.jsx)("div",{className:"p-4 h-full",children:(0,Y.jsx)(Bo,{value:J,onChange:pe=>me(pe.target.value),className:"min-h-[300px] h-full font-mono text-[13px] border-0 focus-visible:ring-0 resize-none rounded-none bg-transparent",placeholder:v("Cloud.Placeholders.ReadmeEdit")})}):(0,Y.jsx)("div",{className:"p-6",children:l?(0,Y.jsx)(aI,{content:l,owner:r?.login,repo:k}):(0,Y.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 text-muted-foreground border-2 border-dashed border-border/40 rounded-xl bg-muted/10 mx-auto max-w-md",children:[(0,Y.jsx)(Zi,{className:"w-12 h-12 mb-4 opacity-20"}),(0,Y.jsx)("p",{className:"text-sm font-medium",children:v("Cloud.Labels.NoReadmeAdded")}),(0,Y.jsx)("p",{className:"text-xs mt-1 text-muted-foreground/60 text-center px-6",children:v("Cloud.Labels.NoReadmeAddedDesc")})]})})})]})]},t)})]}):(0,Y.jsx)("div",{className:"flex flex-col flex-1 h-full min-h-0 w-full animate-in fade-in duration-500",children:(0,Y.jsx)("div",{className:"flex-1 overflow-y-auto overflow-x-hidden",children:(0,Y.jsxs)("div",{className:"flex flex-col items-center justify-center gap-6 p-4 max-w-md mx-auto py-12",children:[(0,Y.jsxs)("div",{className:"flex flex-col items-center gap-3 text-center",children:[(0,Y.jsx)("div",{className:"p-4 rounded-full bg-primary/10",children:(0,Y.jsx)(rs,{className:"w-10 h-10 text-primary"})}),(0,Y.jsx)("h3",{className:"text-lg font-semibold",children:v("Cloud.Actions.InitPersonalRepo")}),(0,Y.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:v("Cloud.Tips.InitRepoDesc")})]}),(0,Y.jsxs)("div",{className:"w-full max-w-xs space-y-2",children:[(0,Y.jsx)(Vr,{className:"text-xs text-muted-foreground font-medium",children:v("Cloud.Labels.RepoName")}),(0,Y.jsx)(Qe,{value:p,onChange:pe=>m(pe.target.value),placeholder:"obsidian-i18n-resources",className:"font-mono text-sm"}),r&&(0,Y.jsxs)("p",{className:"text-[10px] text-muted-foreground",children:[v("Cloud.Labels.RepoUrlPrefix")," ",(0,Y.jsxs)("span",{className:"font-mono font-medium",children:[r.login,"/",p||"..."]})]})]}),(0,Y.jsxs)("div",{className:"w-full max-w-xs space-y-2",children:[(0,Y.jsxs)(Vr,{className:"text-xs text-muted-foreground font-medium",children:[v("Cloud.Labels.RepoDesc")," (",v("Common.Labels.Optional"),")"]}),(0,Y.jsx)(Bo,{value:h,onChange:pe=>x(pe.target.value),placeholder:v("Cloud.Tips.ReadmeDefault"),className:"text-sm min-h-[80px]"})]}),(0,Y.jsxs)("div",{className:"w-full max-w-xs space-y-3",children:[(0,Y.jsxs)("div",{className:"space-y-1.5",children:[(0,Y.jsx)(Te,{onClick:()=>we("create"),disabled:V||!p.trim()||!f,className:"w-full h-10 bg-primary hover:bg-primary/90 text-primary-foreground font-semibold shadow-lg shadow-primary/20",children:V?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(zt,{className:"w-4 h-4 mr-2 animate-spin"}),v("Cloud.Status.Processing")]}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(as,{className:"w-4 h-4 mr-2"}),v("Cloud.Actions.CreateNewRepo")]})}),!f&&(0,Y.jsxs)("div",{className:"flex items-start gap-1.5 px-2 text-[10px] text-amber-600 dark:text-amber-400",children:[(0,Y.jsx)(es,{className:"w-3 h-3 mt-0.5 shrink-0"}),(0,Y.jsxs)("span",{children:[v("Cloud.Errors.NoCreateRepoPerm")," ",(0,Y.jsx)("code",{className:"font-mono bg-muted px-1 rounded",children:"public_repo"})," ",v("Cloud.Labels.Permission")]})]})]}),(0,Y.jsxs)("div",{className:"flex items-center gap-3 px-2",children:[(0,Y.jsx)("div",{className:"flex-1 h-px bg-border/60"}),(0,Y.jsx)("span",{className:"text-[10px] text-muted-foreground font-medium",children:v("Common.Labels.Or")}),(0,Y.jsx)("div",{className:"flex-1 h-px bg-border/60"})]}),(0,Y.jsxs)("div",{className:"space-y-1.5",children:[(0,Y.jsx)(Te,{variant:"outline",onClick:()=>we("use-existing"),disabled:V||!p.trim(),className:"w-full h-10 font-semibold",children:V?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(zt,{className:"w-4 h-4 mr-2 animate-spin"}),v("Cloud.Status.Checking")]}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(rs,{className:"w-4 h-4 mr-2"}),v("Cloud.Actions.UseExistingRepo")]})}),(0,Y.jsx)("p",{className:"text-[10px] text-center text-muted-foreground",children:v("Cloud.Tips.UseExistingDesc")})]})]})]})})}):(0,Y.jsxs)("div",{className:"flex flex-col items-center justify-center h-40 gap-3 text-muted-foreground",children:[(0,Y.jsx)(es,{className:"w-10 h-10 opacity-50"}),(0,Y.jsx)("p",{className:"text-sm",children:v("Cloud.Hints.TokenRequired")})]})},kYe=({entry:e,onEdit:t,onDelete:r,onDownload:a,onHistory:n,isDeleting:s,isDownloading:i,updateStatus:o})=>(0,Y.jsxs)("div",{className:oe("group flex flex-col overflow-hidden bg-card text-card-foreground rounded-lg border border-border/60 transition-all duration-300 animate-in fade-in h-[188px] relative select-none","hover:shadow-[0_8px_30px_rgb(0,0,0,0.04)] dark:hover:shadow-[0_8px_30px_rgb(0,0,0,0.2)] hover:border-primary/40",o==="update_available"&&"border-amber-500/20 hover:border-amber-500/40 hover:shadow-amber-500/5",o==="not_downloaded"&&"border-blue-500/20 hover:border-blue-500/40 hover:shadow-blue-500/5",o==="up_to_date"&&"border-green-500/20 hover:border-green-500/40 hover:shadow-green-500/5"),children:[(0,Y.jsxs)("div",{className:"flex flex-col flex-1 p-4 pb-3 min-h-0 space-y-3",children:[(0,Y.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,Y.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[(0,Y.jsx)("div",{className:oe("flex items-center justify-center w-9 h-9 rounded-md shrink-0 shadow-sm border border-border/10 transition-colors","bg-muted/50 group-hover:bg-muted"),children:e.type==="theme"?(0,Y.jsx)(Oa,{className:"w-5 h-5 text-muted-foreground group-hover:text-primary transition-colors"}):(0,Y.jsx)(sa,{className:"w-5 h-5 text-muted-foreground group-hover:text-primary transition-colors"})}),(0,Y.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,Y.jsx)("h3",{className:"text-[13px] font-semibold text-foreground tracking-tight leading-snug truncate",title:e.title||e.plugin,children:e.title||e.plugin}),(0,Y.jsxs)("div",{className:"flex items-center gap-1.5 mt-0.5",children:[(0,Y.jsxs)("span",{className:"text-[10px] text-muted-foreground/60 font-mono tracking-tighter",children:["v",e.version]}),e.supported_versions&&(0,Y.jsxs)("span",{className:"text-[9px] text-muted-foreground/30 font-mono italic",children:["[",e.supported_versions,"]"]})]})]})]}),(0,Y.jsxs)("div",{className:"flex items-center shrink-0 pt-0.5",children:[o==="up_to_date"&&(0,Y.jsxs)("div",{className:"p-1 px-2 rounded-sm bg-green-500/5 border border-green-500/10 text-green-600/80 text-[9px] font-bold tracking-tight uppercase flex items-center gap-1",children:[(0,Y.jsx)(xl,{className:"w-3 h-3 opacity-70"}),v("Cloud.Status.Uploaded")]}),o==="update_available"&&(0,Y.jsxs)("div",{className:"p-1 px-2 rounded-sm bg-amber-500/5 border border-amber-500/10 text-amber-600/80 text-[9px] font-bold tracking-tight uppercase animate-pulse flex items-center gap-1",children:[(0,Y.jsx)(so,{className:"w-3 h-3 opacity-70"}),v("Cloud.Status.Modified")]}),o==="not_downloaded"&&(0,Y.jsxs)("div",{className:"p-1 px-2 rounded-sm bg-blue-500/5 border border-blue-500/10 text-blue-600/80 text-[9px] font-bold tracking-tight uppercase flex items-center gap-1",children:[(0,Y.jsx)(js,{className:"w-3 h-3 opacity-70"}),v("Cloud.Status.NotDownloaded")]})]})]}),(0,Y.jsx)("div",{className:"min-h-[34px] max-h-[34px] overflow-hidden",children:(0,Y.jsx)("p",{className:"text-[11px] text-muted-foreground/90 leading-relaxed line-clamp-2",title:e.description||v("Cloud.Labels.UnnamedTranslation"),children:e.description||v("Cloud.Labels.UnnamedTranslation")})}),(0,Y.jsxs)("div",{className:"mt-auto flex items-center justify-between px-2.5 py-1.5 rounded bg-muted/20 border border-border/5",children:[(0,Y.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Y.jsxs)("div",{className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/70 font-semibold",children:[(0,Y.jsx)(Ea,{className:"w-3 h-3 opacity-50"}),e.language]}),(0,Y.jsx)("div",{className:"w-[1px] h-2 bg-border/20"}),(0,Y.jsxs)("div",{className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/70 font-semibold",children:[(0,Y.jsx)(Ti,{className:"w-3 h-3 opacity-50"}),e.updated_at?new Date(e.updated_at).toLocaleDateString(void 0,{month:"2-digit",day:"2-digit"}):"-"]})]}),(0,Y.jsx)("span",{className:"text-[9px] text-muted-foreground/50 font-mono tracking-tight truncate max-w-[80px]",children:e.plugin})]})]}),(0,Y.jsxs)("div",{className:"flex border-t border-border/30 h-10 shrink-0 bg-muted/5 group-hover:bg-muted/10 transition-colors",children:[(0,Y.jsxs)("button",{onClick:()=>o==="not_downloaded"?a():o==="update_available"?t():void 0,disabled:o==="up_to_date"||i,className:oe("flex-1 flex items-center justify-center gap-2 text-[11px] font-bold transition-all active:scale-95 disabled:active:scale-100",o==="up_to_date"?"text-green-600/50 cursor-default":o==="not_downloaded"?"text-blue-600 hover:text-blue-700 hover:bg-blue-500/5":"text-amber-600 hover:text-amber-700 hover:bg-amber-500/5"),children:[i?(0,Y.jsx)(Wr,{className:"w-3.5 h-3.5 animate-spin"}):o==="up_to_date"?(0,Y.jsx)(xl,{className:"w-3.5 h-3.5"}):o==="not_downloaded"?(0,Y.jsx)(js,{className:"w-3.5 h-3.5"}):(0,Y.jsx)(sd,{className:"w-3.5 h-3.5"}),(0,Y.jsx)("span",{className:"uppercase tracking-tight",children:i?v("Common.Status.Loading"):o==="up_to_date"?v("Cloud.Status.Latest"):o==="not_downloaded"?v("Cloud.Actions.Download"):v("Cloud.Actions.PublishNew")})]}),(0,Y.jsx)("div",{className:"w-[1px] bg-border/20 my-2"}),(0,Y.jsx)("button",{onClick:n,className:"px-3 flex items-center justify-center text-muted-foreground/60 hover:text-primary hover:bg-muted/20 transition-all active:scale-90",title:v("Cloud.Labels.ViewHistory"),children:(0,Y.jsx)(Gm,{className:"w-4 h-4"})}),(0,Y.jsx)("div",{className:"w-[1px] bg-border/20 my-2"}),(0,Y.jsx)("button",{onClick:r,disabled:s,className:"px-4 flex items-center justify-center text-muted-foreground/60 hover:text-destructive hover:bg-destructive/5 transition-all active:scale-90 disabled:opacity-50",title:v("Cloud.Labels.DeleteCloudPkg"),children:s?(0,Y.jsx)(zt,{className:"w-4 h-4 animate-spin"}):(0,Y.jsx)(Ha,{className:"w-4 h-4"})})]})]}),MYe=({filteredEntries:e,repoManifest:t,handleEdit:r,handleDelete:a,handleDownload:n,setHistoryDialogEntryId:s,setCurrentTab:i,deletingId:o,downloadingId:l,getUpdateStatus:c,t:u})=>{let d=(0,$r.useRef)(null),[f,p]=(0,$r.useState)(0);(0,$r.useEffect)(()=>{let y=d.current;if(!y)return;let b=new ResizeObserver(S=>{for(let w of S){let P=w.contentRect.width;P>0&&p(P)}});return b.observe(y),()=>b.disconnect()},[]);let m=(0,$r.useMemo)(()=>{let y=Math.floor((f-20+16)/336);return Math.max(1,y)},[f]),h=Math.ceil(e.length/m),x=ni({count:h,getScrollElement:()=>d.current,estimateSize:(0,$r.useCallback)(()=>204,[]),overscan:5}),g=x.getVirtualItems();return(0,Y.jsx)(sr,{className:"flex-1 min-h-0 pr-2",viewportRef:d,children:t.length===0?(0,Y.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 gap-3 text-muted-foreground animate-in fade-in duration-700",children:[(0,Y.jsx)("div",{className:"p-4 rounded-full bg-primary/5 mb-1",children:(0,Y.jsx)(sa,{className:"w-12 h-12 opacity-30 text-primary"})}),(0,Y.jsx)("h3",{className:"text-base font-semibold text-foreground/80",children:u("Cloud.Hints.NoPublished")}),(0,Y.jsx)("p",{className:"text-xs max-w-xs text-center leading-relaxed px-6 opacity-70",children:u("Cloud.Hints.NoPublishedDesc")}),(0,Y.jsx)(Te,{variant:"outline",size:"sm",className:"mt-4 shadow-sm hover:bg-primary hover:text-primary-foreground transition-all",onClick:()=>i("upload"),children:u("Cloud.Actions.GoPublish")})]}):e.length===0?(0,Y.jsxs)("div",{className:"flex flex-col items-center justify-center pt-24 text-muted-foreground",children:[(0,Y.jsx)(ra,{className:"w-14 h-14 mb-4 opacity-20"}),(0,Y.jsx)("p",{className:"text-sm font-medium",children:u("Common.Labels.NoPlugins")})]}):f===0?(0,Y.jsx)("div",{className:"flex items-center justify-center pt-24 text-muted-foreground animate-in fade-in duration-300",children:(0,Y.jsx)(Wr,{className:"w-8 h-8 animate-spin text-primary/30"})}):(0,Y.jsx)("div",{className:"relative w-full overflow-hidden",style:{height:`${x.getTotalSize()}px`},children:g.map(y=>{let b=y.index*m,S=e.slice(b,b+m);return(0,Y.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:`${y.size}px`,transform:`translateY(${y.start}px)`,display:"grid",gridTemplateColumns:`repeat(${m}, 1fr)`,gap:"16px",paddingBottom:"16px"},children:S.map(w=>(0,Y.jsx)(kYe,{entry:w,onEdit:()=>r(w),onDelete:()=>a(w),onDownload:()=>n(w),onHistory:()=>{s(w.id),i("history")},isDeleting:o===w.id,isDownloading:l===w.id,updateStatus:c(w)},w.id))},y.key)})})})};var xa=N(Le());qt();er();Vt();Rr();var kb={};qb(kb,{Collapsible:()=>$F,CollapsibleContent:()=>WF,CollapsibleTrigger:()=>GF,Content:()=>jYe,Root:()=>BYe,Trigger:()=>UYe,createCollapsibleScope:()=>_Ye});var Ks=N(Le(),1);var eg=N(ce(),1),oI="Collapsible",[DYe,_Ye]=Pa(oI),[OYe,HF]=DYe(oI),$F=Ks.forwardRef((e,t)=>{let{__scopeCollapsible:r,open:a,defaultOpen:n,disabled:s,onOpenChange:i,...o}=e,[l,c]=qs({prop:a,defaultProp:n??!1,onChange:i,caller:oI});return(0,eg.jsx)(OYe,{scope:r,disabled:s,contentId:pn(),open:l,onOpenToggle:Ks.useCallback(()=>c(u=>!u),[c]),children:(0,eg.jsx)(lt.div,{"data-state":XF(l),"data-disabled":s?"":void 0,...o,ref:t})})});$F.displayName=oI;var kne="CollapsibleTrigger",GF=Ks.forwardRef((e,t)=>{let{__scopeCollapsible:r,...a}=e,n=HF(kne,r);return(0,eg.jsx)(lt.button,{type:"button","aria-controls":n.contentId,"aria-expanded":n.open||!1,"data-state":XF(n.open),"data-disabled":n.disabled?"":void 0,disabled:n.disabled,...a,ref:t,onClick:Ye(e.onClick,n.onOpenToggle)})});GF.displayName=kne;var KF="CollapsibleContent",WF=Ks.forwardRef((e,t)=>{let{forceMount:r,...a}=e,n=HF(KF,e.__scopeCollapsible);return(0,eg.jsx)($a,{present:r||n.open,children:({present:s})=>(0,eg.jsx)(FYe,{...a,ref:t,present:s})})});WF.displayName=KF;var FYe=Ks.forwardRef((e,t)=>{let{__scopeCollapsible:r,present:a,children:n,...s}=e,i=HF(KF,r),[o,l]=Ks.useState(a),c=Ks.useRef(null),u=Ht(t,c),d=Ks.useRef(0),f=d.current,p=Ks.useRef(0),m=p.current,h=i.open||o,x=Ks.useRef(h),g=Ks.useRef(void 0);return Ks.useEffect(()=>{let y=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(y)},[]),ya(()=>{let y=c.current;if(y){g.current=g.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";let b=y.getBoundingClientRect();d.current=b.height,p.current=b.width,x.current||(y.style.transitionDuration=g.current.transitionDuration,y.style.animationName=g.current.animationName),l(a)}},[i.open,a]),(0,eg.jsx)(lt.div,{"data-state":XF(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!h,...s,ref:u,style:{["--radix-collapsible-content-height"]:f?`${f}px`:void 0,["--radix-collapsible-content-width"]:m?`${m}px`:void 0,...e.style},children:h&&n})});function XF(e){return e?"open":"closed"}var BYe=$F,UYe=GF,jYe=WF;var lI=N(ce());function OT({...e}){return(0,lI.jsx)(kb.Root,{"data-slot":"collapsible",...e})}function FT({...e}){return(0,lI.jsx)(kb.CollapsibleTrigger,{"data-slot":"collapsible-trigger",...e})}function BT({...e}){return(0,lI.jsx)(kb.CollapsibleContent,{"data-slot":"collapsible-content",...e})}var re=N(ce()),Mne=()=>{let{t:e}=ze(),t=He.getState().i18n,r=Se.use.communityRegistry(),a=Se.use.communityStats(),n=Se.use.communityLoaded(),s=Se.use.communityLoading(),i=Se.use.setCommunityRegistry(),o=Se.use.setCommunityStats(),l=Se.use.setCommunityLoaded(),c=Se.use.setCommunityLoading(),u=Se.use.fetchCommunityRegistry(),d=Se.use.setCurrentTab(),f=Se.use.setTargetRepoAddress(),[p,m]=(0,xa.useState)(""),[h,x]=(0,xa.useState)("all"),[g,y]=(0,xa.useState)(!0),[b,S]=(0,xa.useState)(!0),[w,P]=(0,xa.useState)(!0),[C,I]=(0,xa.useState)(!0),[R,O]=(0,xa.useState)(!1);xa.default.useEffect(()=>{!n&&!s&&u(t)},[n,s,u,t]);let D=(0,xa.useMemo)(()=>{if(!a?.repos)return[];let _=a.leaderboard?.topReposByStars;return _&&_.length>0?_.map(ee=>{let ie=a.repos[ee];if(!ie)return null;let[ae,ge]=ee.split("/");return{address:ee,owner:ae,repo:ge,stats:ie}}).filter(Boolean).slice(0,5):r.map(ee=>{let ie=a.repos[ee.repoAddress];if(!ie)return null;let[ae,ge]=ee.repoAddress.split("/");return{address:ee.repoAddress,owner:ae,repo:ge,stats:ie}}).filter(Boolean).sort((ee,ie)=>(ie.stats.stars??0)-(ee.stats.stars??0)).slice(0,5)},[r,a]),W=(0,xa.useMemo)(()=>{if(!a?.repos)return[];let _=a.leaderboard?.topReposByActivity;return _&&_.length>0?_.map(ee=>{let ie=a.repos[ee];if(!ie)return null;let[ae,ge]=ee.split("/");return{address:ee,owner:ae,repo:ge,stats:ie}}).filter(Boolean).slice(0,5):r.map(ee=>{let ie=a.repos[ee.repoAddress];if(!ie)return null;let[ae,ge]=ee.repoAddress.split("/");return{address:ee.repoAddress,owner:ae,repo:ge,stats:ie}}).filter(Boolean).sort((ee,ie)=>(ie.stats.activityScore??0)-(ee.stats.activityScore??0)).slice(0,5)},[r,a]),J=(0,xa.useMemo)(()=>a?.repos?r.map(_=>{let ee=a.repos[_.repoAddress];if(!ee)return null;let[ie,ae]=_.repoAddress.split("/");return{address:_.repoAddress,owner:ie,repo:ae,stats:ee}}).filter(Boolean).sort((_,ee)=>(ee.stats.pluginCount??0)-(_.stats.pluginCount??0)||(ee.stats.stars??0)-(_.stats.stars??0)).slice(0,5):[],[r,a]),me=(0,xa.useMemo)(()=>r.filter(_=>{let ee=a?.repos?.[_.repoAddress];if(p){let ie=p.toLowerCase(),ae=_.repoAddress.toLowerCase().includes(ie),ge=ee?.description?.toLowerCase().includes(ie)||!1,ue=ee?.authorName?.toLowerCase().includes(ie)||!1;if(!ae&&!ge&&!ue)return!1}return!(h&&h!=="all"&&!ee?.languages?.includes(h))}).sort((_,ee)=>{let ie=he=>he.isOfficial&&he.isFeatured?3:he.isOfficial?2:he.isFeatured?1:0,ae=ie(_),ge=ie(ee);if(ae!==ge)return ge-ae;let ue=a?.repos?.[_.repoAddress],$=a?.repos?.[ee.repoAddress],A=ue?.stars||0,K=$?.stars||0;return A!==K?K-A:($?.activityScore||0)-(ue?.activityScore||0)}),[r,a,p,h]),Z=(0,xa.useCallback)(_=>{f(_);let ee=t.settings.cloudRepos||[];if(!ee.includes(_)){let ie=[...ee,_];t.settings.cloudRepos=ie,t.saveSettings(),Se.getState().setSavedRepos(ie)}Se.getState().setTargetManifest([]),d("download")},[f,d,t]),q=(0,xa.useMemo)(()=>a?.leaderboard?.topAuthors||[],[a]),V=(0,xa.useMemo)(()=>{let _={};return r.forEach(ee=>{if(ee.authorBadge){let[ie]=ee.repoAddress.split("/");_[ie]=ee.authorBadge}}),_},[r]),L=(0,xa.useMemo)(()=>{if(!a?.repos)return 0;let _=new Set;Object.entries(a.repos).forEach(([ie,ae])=>{let ge=ae.authorName||ie.split("/")[0];ge&&_.add(ge)});let ee=a.summary?.totalContributors||0;return ee>_.size?ee:_.size},[a]),k=n&&(D.length>0||W.length>0||J.length>0||q.length>0);return s&&!n?(0,re.jsxs)("div",{className:"flex flex-col items-center justify-center h-full text-muted-foreground animate-in fade-in duration-300",children:[(0,re.jsx)(Wr,{className:"w-10 h-10 animate-spin text-primary/50 mb-4"}),(0,re.jsx)("p",{className:"text-sm font-medium tracking-tight",children:e("Cloud.Labels.FetchingResources")})]}):!n&&!R?(0,re.jsxs)("div",{className:"flex flex-col items-center justify-center h-full text-muted-foreground",children:[(0,re.jsx)(Ea,{className:"w-16 h-16 mb-4 opacity-20"}),(0,re.jsx)("p",{className:"text-sm font-medium",children:e("Cloud.Errors.FetchFail")}),(0,re.jsx)(Te,{variant:"link",size:"sm",onClick:()=>u(t),className:"mt-2",children:e("Cloud.Actions.Recheck")})]}):R&&r.length===0?(0,re.jsxs)("div",{className:"flex flex-col items-center justify-center h-full text-center p-6 space-y-4 max-w-md mx-auto animate-in fade-in duration-500",children:[(0,re.jsx)("div",{className:"p-4 rounded-full bg-orange-500/10 text-orange-600 ring-1 ring-orange-500/20",children:(0,re.jsx)(Ea,{className:"w-10 h-10 opacity-80"})}),(0,re.jsxs)("div",{className:"space-y-2",children:[(0,re.jsx)("h3",{className:"text-xl font-bold tracking-tight",children:e("Cloud.Hints.RateLimitTitle")}),(0,re.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:e("Cloud.Hints.RateLimitDesc")})]}),(0,re.jsxs)(Te,{onClick:()=>{t.app.setting.open(),t.app.setting.openTabById("i18n")},className:"mt-4 gap-2 px-6 shadow-sm transition-all hover:translate-y-[-1px] bg-orange-500 hover:bg-orange-600 text-white border-none",children:[e("Cloud.Hints.RateLimitGuide"),(0,re.jsx)(ei,{className:"w-4 h-4"})]}),(0,re.jsxs)(Te,{variant:"ghost",size:"sm",onClick:()=>u(t),className:"text-xs text-muted-foreground",children:[(0,re.jsx)(Wr,{className:"w-3 h-3 mr-1.5"}),e("Cloud.Actions.Recheck")]})]}):r.length===0?(0,re.jsxs)("div",{className:"flex flex-col items-center justify-center h-full text-muted-foreground animate-in fade-in duration-700",children:[(0,re.jsx)("div",{className:"p-10 rounded-full bg-primary/5 mb-6 ring-1 ring-primary/10",children:(0,re.jsx)(Ts,{className:"w-20 h-20 opacity-20 text-primary"})}),(0,re.jsx)("h3",{className:"text-xl font-bold text-foreground/80 tracking-tight",children:e("Cloud.Labels.NoRegistry")}),(0,re.jsx)("p",{className:"text-sm mt-2 text-center text-muted-foreground/60 max-w-[320px] leading-relaxed",children:e("Cloud.Labels.NoRegistryDesc")})]}):(0,re.jsxs)("div",{className:"flex h-full gap-0 overflow-hidden min-h-0 animate-in fade-in duration-500",children:[k&&(0,re.jsx)("aside",{className:"w-[300px] flex flex-col border-r border-border/30 pr-2 shrink-0 overflow-hidden min-h-0",children:(0,re.jsx)(sr,{className:"flex-1 pr-2.5",children:(0,re.jsxs)("div",{className:"space-y-4 pb-6 pt-1",children:[W.length>0&&(0,re.jsx)(OT,{open:b,onOpenChange:S,children:(0,re.jsxs)("div",{className:"rounded-lg border border-border/40 bg-card/60 backdrop-blur-sm shadow-[0_4px_20px_rgb(0,0,0,0.03)] dark:shadow-[0_4px_20px_rgb(0,0,0,0.1)] overflow-hidden transition-all duration-300 hover:border-orange-500/20",children:[(0,re.jsxs)(FT,{className:"w-full flex items-center gap-2.5 px-4 py-3 border-b border-border/20 bg-gradient-to-r from-orange-500/5 to-transparent hover:from-orange-500/10 transition-all cursor-pointer select-none",children:[(0,re.jsx)("div",{className:"p-1 rounded-md bg-orange-500/10",children:(0,re.jsx)(no,{className:"w-3.5 h-3.5 text-orange-500"})}),(0,re.jsx)("h3",{className:"text-[12px] font-extrabold text-foreground tracking-tight flex-1 text-left min-w-0 truncate",children:v("Cloud.Labels.TopActive")}),(0,re.jsxs)(mt,{variant:"secondary",className:"text-[9px] h-[18px] px-2 bg-orange-500/10 text-orange-600 border-orange-500/20 font-black",children:["TOP ",W.length]}),(0,re.jsx)(ti,{className:oe("w-3.5 h-3.5 text-muted-foreground/50 transition-transform duration-200",b?"rotate-0":"-rotate-90")})]}),(0,re.jsx)(BT,{children:(0,re.jsx)("div",{className:"divide-y divide-border/20",children:W.map((_,ee)=>(0,re.jsxs)("div",{className:"flex items-center gap-2.5 px-3 py-2 hover:bg-muted/30 transition-colors cursor-pointer group",onClick:()=>Z(_.address),children:[(0,re.jsx)("div",{className:"w-5 h-5 flex items-center justify-center shrink-0",children:ee===0?(0,re.jsx)("span",{className:"text-sm",title:e("Cloud.Labels.Rank1"),children:"\u{1F947}"}):ee===1?(0,re.jsx)("span",{className:"text-sm",title:e("Cloud.Labels.Rank2"),children:"\u{1F948}"}):ee===2?(0,re.jsx)("span",{className:"text-sm",title:e("Cloud.Labels.Rank3"),children:"\u{1F949}"}):(0,re.jsx)("span",{className:"text-[10px] font-bold text-muted-foreground/50 font-mono",children:ee+1})}),_.stats.avatarUrl?(0,re.jsx)("img",{src:_.stats.avatarUrl,className:"w-6 h-6 rounded-md ring-1 ring-border/50 shrink-0 group-hover:scale-105 transition-transform",alt:_.owner}):(0,re.jsx)("div",{className:"w-6 h-6 rounded-md bg-muted flex items-center justify-center shrink-0",children:(0,re.jsx)(to,{className:"w-3 h-3 text-muted-foreground/50"})}),(0,re.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,re.jsx)("div",{className:"text-[11px] font-semibold text-foreground truncate leading-tight group-hover:text-primary transition-colors",children:_.repo}),(0,re.jsx)("div",{className:"text-[9px] text-muted-foreground/60 truncate",children:_.stats.authorName||_.owner})]}),(0,re.jsxs)("div",{className:"flex items-center gap-1 text-[10px] font-mono font-bold text-orange-600 shrink-0",children:[(0,re.jsx)(no,{className:"w-2.5 h-2.5 text-orange-500"}),Math.round((_.stats.activityScore||0)*100)]})]},_.address))})})]})}),q.length>0&&(0,re.jsx)(OT,{open:C,onOpenChange:I,children:(0,re.jsxs)("div",{className:"rounded-lg border border-border/40 bg-card/60 backdrop-blur-sm shadow-[0_4px_20px_rgb(0,0,0,0.03)] dark:shadow-[0_4px_20px_rgb(0,0,0,0.1)] overflow-hidden transition-all duration-300 hover:border-green-500/20",children:[(0,re.jsxs)(FT,{className:"w-full flex items-center gap-2.5 px-4 py-3 border-b border-border/20 bg-gradient-to-r from-green-500/5 to-transparent hover:from-green-500/10 transition-all cursor-pointer select-none",children:[(0,re.jsx)("div",{className:"p-1 rounded-md bg-green-500/10",children:(0,re.jsx)(Ts,{className:"w-3.5 h-3.5 text-green-500"})}),(0,re.jsx)("h3",{className:"text-[12px] font-extrabold text-foreground tracking-tight flex-1 text-left min-w-0 truncate",children:v("Cloud.Labels.TopAuthors")}),(0,re.jsxs)(mt,{variant:"secondary",className:"text-[9px] h-[18px] px-2 bg-green-500/10 text-green-600 border-green-500/20 font-black",children:["TOP ",q.length]}),(0,re.jsx)(ti,{className:oe("w-3.5 h-3.5 text-muted-foreground/50 transition-transform duration-200",C?"rotate-0":"-rotate-90")})]}),(0,re.jsx)(BT,{children:(0,re.jsx)("div",{className:"divide-y divide-border/20",children:q.map((_,ee)=>(0,re.jsxs)("div",{className:"flex items-center gap-2.5 px-3 py-2 hover:bg-muted/30 transition-colors cursor-pointer group",onClick:()=>{_.htmlUrl&&window.open(_.htmlUrl,"_blank")},children:[(0,re.jsx)("div",{className:"w-5 h-5 flex items-center justify-center shrink-0",children:ee===0?(0,re.jsx)("span",{className:"text-sm",title:e("Cloud.Labels.Rank1"),children:"\u{1F947}"}):ee===1?(0,re.jsx)("span",{className:"text-sm",title:e("Cloud.Labels.Rank2"),children:"\u{1F948}"}):ee===2?(0,re.jsx)("span",{className:"text-sm",title:e("Cloud.Labels.Rank3"),children:"\u{1F949}"}):(0,re.jsx)("span",{className:"text-[10px] font-bold text-muted-foreground/50 font-mono",children:ee+1})}),_.avatarUrl?(0,re.jsx)("img",{src:_.avatarUrl,className:"w-6 h-6 rounded-full ring-1 ring-border/50 shrink-0 group-hover:scale-105 transition-transform",alt:_.name}):(0,re.jsx)("div",{className:"w-6 h-6 rounded-full bg-muted flex items-center justify-center shrink-0",children:(0,re.jsx)(Ts,{className:"w-3 h-3 text-muted-foreground/50"})}),(0,re.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,re.jsxs)("div",{className:"text-[11px] font-semibold text-foreground truncate leading-tight group-hover:text-primary transition-colors flex items-center gap-1.5",children:[_.name,V[_.name]&&(0,re.jsx)(mt,{variant:"outline",className:"h-3.5 px-1 text-[8px] border-primary/30 text-primary bg-primary/5 font-black uppercase tracking-tighter shrink-0",children:V[_.name]})]}),(0,re.jsxs)("div",{className:"text-[9px] text-muted-foreground/60 truncate flex gap-1 items-center",children:[(0,re.jsxs)("span",{children:[_.repoCount," ",e("Cloud.Labels.SubscriptionRepo")]}),(0,re.jsx)("span",{children:"\xB7"}),(0,re.jsxs)("span",{children:[_.totalPlugins," ",e("Cloud.Labels.UnitPlugins")]})]})]}),(0,re.jsxs)("div",{className:"flex items-center gap-1 text-[10px] font-mono font-bold text-green-600 shrink-0",title:`\u7EFC\u5408\u6D3B\u8DC3\u5EA6: ${Math.round(_.activityScore*100)}`,children:[(0,re.jsx)(no,{className:"w-2.5 h-2.5 text-green-500"}),Math.round(_.activityScore*100)]})]},_.name))})})]})}),D.length>0&&(0,re.jsx)(OT,{open:g,onOpenChange:y,children:(0,re.jsxs)("div",{className:"rounded-lg border border-border/40 bg-card/60 backdrop-blur-sm shadow-[0_4px_20px_rgb(0,0,0,0.03)] dark:shadow-[0_4px_20px_rgb(0,0,0,0.1)] overflow-hidden transition-all duration-300 hover:border-yellow-500/20",children:[(0,re.jsxs)(FT,{className:"w-full flex items-center gap-2.5 px-4 py-3 border-b border-border/20 bg-gradient-to-r from-yellow-500/5 to-transparent hover:from-yellow-500/10 transition-all cursor-pointer select-none",children:[(0,re.jsx)("div",{className:"p-1 rounded-md bg-yellow-500/10",children:(0,re.jsx)(ao,{className:"w-3.5 h-3.5 text-yellow-500"})}),(0,re.jsx)("h3",{className:"text-[12px] font-extrabold text-foreground tracking-tight flex-1 text-left min-w-0 truncate",children:v("Cloud.Labels.TopStars")}),(0,re.jsxs)(mt,{variant:"secondary",className:"text-[9px] h-[18px] px-2 bg-yellow-500/10 text-yellow-600 border-yellow-500/20 font-black",children:["TOP ",D.length]}),(0,re.jsx)(ti,{className:oe("w-3.5 h-3.5 text-muted-foreground/50 transition-transform duration-200",g?"rotate-0":"-rotate-90")})]}),(0,re.jsx)(BT,{children:(0,re.jsx)("div",{className:"divide-y divide-border/20",children:D.map((_,ee)=>(0,re.jsxs)("div",{className:"flex items-center gap-2.5 px-3 py-2 hover:bg-muted/30 transition-colors cursor-pointer group",onClick:()=>Z(_.address),children:[(0,re.jsx)("div",{className:"w-5 h-5 flex items-center justify-center shrink-0",children:ee===0?(0,re.jsx)("span",{className:"text-sm",title:e("Cloud.Labels.Rank1"),children:"\u{1F947}"}):ee===1?(0,re.jsx)("span",{className:"text-sm",title:e("Cloud.Labels.Rank2"),children:"\u{1F948}"}):ee===2?(0,re.jsx)("span",{className:"text-sm",title:e("Cloud.Labels.Rank3"),children:"\u{1F949}"}):(0,re.jsx)("span",{className:"text-[10px] font-bold text-muted-foreground/50 font-mono",children:ee+1})}),_.stats.avatarUrl?(0,re.jsx)("img",{src:_.stats.avatarUrl,className:"w-6 h-6 rounded-md ring-1 ring-border/50 shrink-0 group-hover:scale-105 transition-transform",alt:_.owner}):(0,re.jsx)("div",{className:"w-6 h-6 rounded-md bg-muted flex items-center justify-center shrink-0",children:(0,re.jsx)(to,{className:"w-3 h-3 text-muted-foreground/50"})}),(0,re.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,re.jsx)("div",{className:"text-[11px] font-semibold text-foreground truncate leading-tight group-hover:text-primary transition-colors",children:_.repo}),(0,re.jsx)("div",{className:"text-[9px] text-muted-foreground/60 truncate",children:_.stats.authorName||_.owner})]}),(0,re.jsxs)("div",{className:"flex items-center gap-1 text-[10px] font-mono font-bold text-yellow-600 shrink-0",children:[(0,re.jsx)(ao,{className:"w-2.5 h-2.5 fill-yellow-500/80 text-yellow-500"}),_.stats.stars]})]},_.address))})})]})}),J.length>0&&(0,re.jsx)(OT,{open:w,onOpenChange:P,children:(0,re.jsxs)("div",{className:"rounded-lg border border-border/40 bg-card/60 backdrop-blur-sm shadow-[0_4px_20px_rgb(0,0,0,0.03)] dark:shadow-[0_4px_20px_rgb(0,0,0,0.1)] overflow-hidden transition-all duration-300 hover:border-blue-500/20",children:[(0,re.jsxs)(FT,{className:"w-full flex items-center gap-2.5 px-4 py-3 border-b border-border/20 bg-gradient-to-r from-blue-500/5 to-transparent hover:from-blue-500/10 transition-all cursor-pointer select-none",children:[(0,re.jsx)("div",{className:"p-1 rounded-md bg-blue-500/10",children:(0,re.jsx)(sa,{className:"w-3.5 h-3.5 text-blue-500"})}),(0,re.jsx)("h3",{className:"text-[12px] font-extrabold text-foreground tracking-tight flex-1 text-left min-w-0 truncate",children:v("Cloud.Labels.TopPlugins")}),(0,re.jsxs)(mt,{variant:"secondary",className:"text-[9px] h-[18px] px-2 bg-blue-500/10 text-blue-600 border-blue-500/20 font-black",children:["TOP ",J.length]}),(0,re.jsx)(ti,{className:oe("w-3.5 h-3.5 text-muted-foreground/50 transition-transform duration-200",w?"rotate-0":"-rotate-90")})]}),(0,re.jsx)(BT,{children:(0,re.jsx)("div",{className:"divide-y divide-border/20",children:J.map((_,ee)=>(0,re.jsxs)("div",{className:"flex items-center gap-2.5 px-3 py-2 hover:bg-muted/30 transition-colors cursor-pointer group",onClick:()=>Z(_.address),children:[(0,re.jsx)("div",{className:"w-5 h-5 flex items-center justify-center shrink-0",children:ee===0?(0,re.jsx)("span",{className:"text-sm",title:e("Cloud.Labels.Rank1"),children:"\u{1F947}"}):ee===1?(0,re.jsx)("span",{className:"text-sm",title:e("Cloud.Labels.Rank2"),children:"\u{1F948}"}):ee===2?(0,re.jsx)("span",{className:"text-sm",title:e("Cloud.Labels.Rank3"),children:"\u{1F949}"}):(0,re.jsx)("span",{className:"text-[10px] font-bold text-muted-foreground/50 font-mono",children:ee+1})}),_.stats.avatarUrl?(0,re.jsx)("img",{src:_.stats.avatarUrl,className:"w-6 h-6 rounded-md ring-1 ring-border/50 shrink-0 group-hover:scale-105 transition-transform",alt:_.owner}):(0,re.jsx)("div",{className:"w-6 h-6 rounded-md bg-muted flex items-center justify-center shrink-0",children:(0,re.jsx)(to,{className:"w-3 h-3 text-muted-foreground/50"})}),(0,re.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,re.jsx)("div",{className:"text-[11px] font-semibold text-foreground truncate leading-tight group-hover:text-primary transition-colors",children:_.repo}),(0,re.jsx)("div",{className:"text-[9px] text-muted-foreground/60 truncate",children:_.stats.authorName||_.owner})]}),(0,re.jsxs)("div",{className:"flex items-center gap-1 text-[10px] font-mono font-bold text-blue-600 shrink-0",children:[(0,re.jsx)(sa,{className:"w-2.5 h-2.5 text-blue-500"}),_.stats.pluginCount||0]})]},_.address))})})]})}),(0,re.jsx)("div",{className:"mt-8 pt-6 border-t border-border/20 text-[10px] text-muted-foreground/60 leading-relaxed italic text-center max-w-[280px] mx-auto",children:v("Cloud.Labels.LeaderboardTip")})]})})}),(0,re.jsxs)("main",{className:oe("flex-1 flex flex-col overflow-hidden min-h-0",k&&"pl-4 border-l border-border/10"),children:[(0,re.jsxs)("div",{className:"flex items-center justify-between mb-5 shrink-0 pt-2 border-b border-border/10 pb-3",children:[(0,re.jsxs)("div",{className:"flex items-center gap-3",children:[(0,re.jsx)("h2",{className:"text-[17px] font-extrabold text-foreground tracking-tight",children:v("Cloud.Labels.DiscoverTranslations")}),(0,re.jsxs)(mt,{variant:"secondary",className:"px-2.5 py-0.5 text-[10px] font-black bg-primary/10 text-primary border-primary/20 shadow-sm gap-1.5 rounded-full uppercase tracking-tighter",children:[(0,re.jsx)("span",{className:"opacity-70",children:r.length})," ",v("Cloud.Labels.SubscriptionRepo")]})]}),a?.summary&&(0,re.jsxs)("div",{className:"hidden md:flex items-center gap-4 text-[11px] text-muted-foreground ml-auto mr-4 px-4 py-1.5 rounded-full bg-muted/20 border border-border/40 shadow-sm",children:[(0,re.jsxs)("div",{className:"flex items-center gap-1.5",title:e("Cloud.Labels.TotalTranslations"),children:[(0,re.jsx)(sa,{className:"w-3.5 h-3.5 text-blue-500/70"}),(0,re.jsx)("span",{className:"font-bold text-foreground/80",children:a.summary.totalTranslations})," \u4EFD\u7FFB\u8BD1"]}),(0,re.jsx)("div",{className:"w-[1px] h-3 bg-border/50"}),(0,re.jsxs)("div",{className:"flex items-center gap-1.5",title:e("Cloud.Labels.TotalContributors"),children:[(0,re.jsx)(Ts,{className:"w-3.5 h-3.5 text-green-500/70"}),(0,re.jsx)("span",{className:"font-bold text-foreground/80",children:L})," \u4F4D\u8D21\u732E\u8005"]}),(0,re.jsx)("div",{className:"w-[1px] h-3 bg-border/50"}),(0,re.jsxs)("div",{className:"flex items-center gap-1.5",title:e("Cloud.Labels.TotalStars"),children:[(0,re.jsx)(ao,{className:"w-3.5 h-3.5 text-yellow-500/70"}),(0,re.jsx)("span",{className:"font-bold text-foreground/80",children:a.summary.totalStars})," \u4E2A\u661F\u6807"]})]}),(0,re.jsxs)("div",{className:"flex items-center gap-2",children:[(0,re.jsxs)("div",{className:"relative group w-48",children:[(0,re.jsx)(ra,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-muted-foreground group-focus-within:text-primary transition-colors"}),(0,re.jsx)(Qe,{placeholder:e("Cloud.Placeholders.SearchRepo"),value:p,onChange:_=>m(_.target.value),className:"pl-8 h-8 text-[11px] bg-muted/20 border-border/40 focus:border-primary/40 focus:ring-1 focus:ring-primary/20 shadow-sm transition-all"})]}),(0,re.jsxs)(lr,{value:h,onValueChange:x,children:[(0,re.jsx)(ur,{size:"sm",className:"w-28 text-[11px] bg-muted/20 border-border/40 shadow-sm",children:(0,re.jsx)(cr,{})}),(0,re.jsxs)(dr,{children:[(0,re.jsx)(Rt,{value:"all",className:"text-[11px]",children:e("Common.Filters.All")}),Yn.map(_=>(0,re.jsx)(Rt,{value:_.value,className:"text-[11px]",children:_.label},_.value))]})]}),(0,re.jsxs)("div",{className:"flex items-center bg-muted/30 border border-border/40 rounded-md h-8 shadow-sm",children:[(0,re.jsx)("div",{className:"flex items-center justify-center px-2.5 h-full text-[10px] font-mono font-medium text-muted-foreground border-r border-border/40",title:"\u5F53\u524D\u7B5B\u9009\u7ED3\u679C\u6570",children:me.length}),(0,re.jsx)(Te,{variant:"ghost",size:"icon",className:"h-full w-8 rounded-none rounded-r-md hover:bg-muted/50 text-muted-foreground hover:text-foreground",onClick:()=>u(t),disabled:s,children:(0,re.jsx)(Wr,{className:oe("w-3.5 h-3.5",s&&"animate-spin")})})]})]})]}),(0,re.jsx)(VYe,{filteredItems:me,communityStats:a,handleViewRepo:Z,t:v})]})]})},zYe=({item:e,stats:t,onView:r})=>{let{t:a}=ze(),[n,s]=e.repoAddress.split("/");return(0,re.jsxs)("div",{className:oe("group flex flex-col overflow-hidden bg-card text-card-foreground rounded-lg border border-border/60 transition-all duration-300 animate-in fade-in h-[196px] relative select-none","hover:shadow-[0_8px_30px_rgb(0,0,0,0.04)] dark:hover:shadow-[0_8px_30px_rgb(0,0,0,0.2)] hover:border-primary/40"),children:[(0,re.jsxs)("div",{className:"absolute top-4 right-4 flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-amber-500/10 border border-amber-500/20 shadow-sm z-10 transition-transform group-hover:scale-105",children:[(0,re.jsx)(ao,{className:"w-3 h-3 text-amber-500 fill-amber-500/20"}),(0,re.jsx)("span",{className:"text-[10px] font-black text-amber-600/90",children:t?.stars||0})]}),(0,re.jsxs)("div",{className:"flex flex-col flex-1 p-4 pb-3 min-h-0 space-y-3",children:[(0,re.jsx)("div",{className:"flex items-start justify-between gap-3",children:(0,re.jsxs)("div",{className:"flex items-center gap-2.5 flex-1 min-w-0",children:[(0,re.jsx)("div",{className:oe("flex items-center justify-center w-8 h-8 rounded-lg shrink-0 shadow-sm border border-border/10 transition-colors overflow-hidden","bg-muted/50 group-hover:bg-muted"),children:t?.avatarUrl?(0,re.jsx)("img",{src:t.avatarUrl,className:"w-full h-full object-cover group-hover:scale-110 transition-transform duration-500",alt:n}):(0,re.jsx)(sa,{className:"w-4 h-4 text-muted-foreground/60"})}),(0,re.jsxs)("div",{className:"min-w-0 flex-1 pr-14",children:[(0,re.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,re.jsx)("h3",{className:"text-[12px] font-extrabold text-foreground tracking-tight leading-none truncate",title:e.repoAddress,children:s}),e.isOfficial&&(0,re.jsx)("span",{title:v("Cloud.Labels.Official"),className:"shrink-0 flex items-center",children:(0,re.jsx)(Ym,{className:"w-3.5 h-3.5 text-blue-500 fill-blue-500/10"})}),e.isFeatured&&(0,re.jsx)("span",{title:v("Cloud.Labels.Featured"),className:"shrink-0 flex items-center",children:(0,re.jsx)(so,{className:"w-3.5 h-3.5 text-orange-500 fill-orange-500/10"})})]}),(0,re.jsxs)("div",{className:"flex items-center gap-1.5 mt-1",children:[(0,re.jsx)("span",{className:"text-[9px] text-muted-foreground/60 font-bold uppercase tracking-wider truncate",children:t?.authorName||n}),e.authorBadge&&(0,re.jsx)(mt,{variant:"outline",className:"h-[14px] px-1 text-[7px] border-primary/20 text-primary/80 bg-primary/5 font-black uppercase tracking-tighter",children:e.authorBadge})]})]})]})}),e.badges&&e.badges.length>0&&(0,re.jsx)("div",{className:"flex flex-wrap gap-1",children:e.badges.map((i,o)=>(0,re.jsx)(mt,{variant:"secondary",className:"h-[15px] px-1.5 text-[8px] font-bold bg-muted/40 text-muted-foreground/80 border-none rounded",children:i},o))}),(0,re.jsx)("div",{className:"min-h-[34px] max-h-[34px] overflow-hidden",children:(0,re.jsx)("p",{className:"text-[11px] text-muted-foreground/90 leading-relaxed line-clamp-2",title:t?.description||"",children:t?.description||v("Cloud.Labels.NoDesc")})}),(0,re.jsxs)("div",{className:"mt-auto grid grid-cols-2 gap-1.5",children:[(0,re.jsxs)("div",{className:"flex items-center justify-between px-2 py-1 rounded bg-muted/20 border border-border/5",children:[(0,re.jsxs)("div",{className:"flex items-center gap-1.5 text-[9px] text-muted-foreground/70 font-bold uppercase tracking-tighter",children:[(0,re.jsx)(Ea,{className:"w-2.5 h-2.5 opacity-40"}),t?.languages?.[0]||"ZH"]}),(0,re.jsx)("div",{className:"flex items-center gap-1.5 text-[9px] text-muted-foreground/70 font-bold",children:(0,re.jsxs)("div",{className:"flex items-center gap-1.5",title:v("Cloud.Labels.PublishedResources"),children:[(0,re.jsx)(to,{className:"w-2.5 h-2.5 opacity-40 text-blue-500"}),(0,re.jsx)("span",{children:(t?.pluginCount||0)+(t?.themeCount||0)})]})})]}),(0,re.jsx)("div",{className:"flex items-center justify-between px-2 py-1 rounded bg-muted/20 border border-border/5",children:(0,re.jsxs)("div",{className:"flex items-center gap-1.5 text-[9px] text-muted-foreground/70 font-bold",children:[(0,re.jsx)(no,{className:"w-2.5 h-2.5 opacity-40 text-emerald-500"}),t?.activityScore!==void 0?Math.round(t.activityScore*100):0]})})]})]}),(0,re.jsxs)("div",{className:"flex border-t border-border/30 h-10 shrink-0 bg-muted/5 group-hover:bg-muted/10 transition-colors",children:[(0,re.jsxs)("button",{onClick:r,className:"flex-1 flex items-center justify-center gap-2 text-[11px] font-bold text-primary transition-all active:scale-95 hover:bg-primary/5",children:[(0,re.jsx)(ei,{className:"w-3.5 h-3.5"}),(0,re.jsx)("span",{className:"uppercase tracking-tight",children:v("Cloud.Labels.ExploreThisRepo")})]}),(0,re.jsx)("div",{className:"w-[1px] bg-border/20 my-2"}),(0,re.jsx)("a",{href:`https://github.com/${e.repoAddress}`,target:"_blank",rel:"noopener noreferrer",className:"px-4 flex items-center justify-center text-muted-foreground/60 hover:text-foreground hover:bg-muted/20 transition-all active:scale-90",title:"GitHub",children:(0,re.jsx)(No,{className:"w-4 h-4"})})]})]})},VYe=({filteredItems:e,communityStats:t,handleViewRepo:r,t:a})=>{let n=(0,xa.useRef)(null),[s,i]=(0,xa.useState)(0);(0,xa.useEffect)(()=>{let d=n.current;if(!d)return;let f=new ResizeObserver(p=>{for(let m of p){let h=m.contentRect.width;h>0&&i(h)}});return f.observe(d),()=>f.disconnect()},[]);let o=(0,xa.useMemo)(()=>{let d=Math.floor((s-20+16)/336);return Math.max(1,d)},[s]),l=Math.ceil(e.length/o),c=ni({count:l,getScrollElement:()=>n.current,estimateSize:(0,xa.useCallback)(()=>204,[]),overscan:5}),u=c.getVirtualItems();return(0,re.jsx)(sr,{className:"flex-1 min-h-0",viewportRef:n,children:(0,re.jsx)("div",{className:"pb-6 pr-4",children:e.length===0?(0,re.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 text-muted-foreground bg-muted/10 rounded-xl border border-dashed border-border/40",children:[(0,re.jsx)(sa,{className:"w-12 h-12 mb-4 opacity-10"}),(0,re.jsx)("p",{className:"text-sm font-medium",children:a("Cloud.Hints.NoMatchingRepos")})]}):(0,re.jsx)("div",{className:"relative w-full overflow-hidden",style:{height:`${c.getTotalSize()}px`},children:u.map(d=>{let f=d.index*o,p=e.slice(f,f+o);return(0,re.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:`${d.size}px`,transform:`translateY(${d.start}px)`,display:"grid",gridTemplateColumns:`repeat(${o}, 1fr)`,gap:"16px",paddingBottom:"16px"},children:p.map(m=>(0,re.jsx)(zYe,{item:m,stats:t?.repos?.[m.repoAddress],onView:()=>r(m.repoAddress)},m.repoAddress))},d.key)})})})})};var Ko=N(Le());qt();Vt();Rr();lf();var Mt=N(ce());function qYe(e){let t=0;for(let a=0;a<e.length;a++){let n=e.charCodeAt(a);t=(t<<5)-t+n,t=t&t}return Math.abs(t).toString(16).padStart(8,"0").repeat(4)}var Dne=()=>{let e=He.getState().i18n,t=Se.use.historyDialogEntryId(),r=Se.use.setHistoryDialogEntryId(),a=Se.use.setCurrentTab(),n=Se.use.repoManifest(),s=Se.use.setRepoManifest(),i=Se.use.githubUser(),o=e.settings.shareRepo,l=n.find(I=>I.id===t)||null,[c,u]=(0,Ko.useState)([]),[d,f]=(0,Ko.useState)(!1),[p,m]=(0,Ko.useState)(null),[h,x]=(0,Ko.useState)(null),[g,y]=(0,Ko.useState)(!1),[b,S]=(0,Ko.useState)(!1),w=(0,Ko.useCallback)(()=>{r(null),a("my")},[r,a]);(0,Ko.useEffect)(()=>{if(!l||!i){u([]),m(null),x(null);return}let I=!1;return(async()=>{f(!0);try{let O=`plugins/${l.id}.json`,D=await e.api.github.getFileCommits(i.login,o,O,1,20);if(!I&&D.state&&Array.isArray(D.data)){let W=D.data.map(J=>({sha:J.sha,message:J.commit?.message||"",date:J.commit?.author?.date||J.commit?.committer?.date||"",author:J.commit?.author?.name||J.author?.login||v("Common.Status.Unknown"),avatarUrl:J.author?.avatar_url}));u(W)}}catch{}finally{I||f(!1)}})(),()=>{I=!0}},[l?.id,i,o,e]);let P=(0,Ko.useCallback)(async I=>{if(!(!l||!i)){m(I),x(null),y(!0);try{let R=`plugins/${l.id}.json`,O=await e.api.github.getFileAtCommit(i.login,o,R,I);if(O.state&&O.data?.content){let D=Buffer.from(O.data.content,"base64").toString("utf-8");try{let W=JSON.parse(D);x(JSON.stringify(W,null,2))}catch{x(D)}}else x(`// ${v("Cloud.Errors.GetFileFail")}`)}catch{x(`// ${v("Common.Notices.Failure")}`)}finally{y(!1)}}},[l,i,o,e]),C=(0,Ko.useCallback)(async()=>{if(!(!p||!h||!l||!i)&&confirm(v("Cloud.Dialogs.RollbackConfirm"))){S(!0);try{let I=i.login,R=`plugins/${l.id}.json`,O=Buffer.from(h,"utf-8").toString("base64");if(!(await e.api.github.uploadFile(I,o,R,O,v("Cloud.Labels.RollbackTranslationMsg",{plugin:l.plugin,sha:p.substring(0,7)}))).state)throw new Error(v("Cloud.Errors.RollbackFail"));let W=qYe(h),J=[],me=await e.api.github.getFileContent(I,o,"metadata.json");if(me.state&&me.data?.content){let V=Buffer.from(me.data.content,"base64").toString("utf-8"),L=JSON.parse(V);Array.isArray(L)&&(J=L)}let Z=J.findIndex(V=>V.id===l.id);Z>=0&&(J[Z]={...J[Z],hash:W,updated_at:new Date().toISOString()});let q=Buffer.from(JSON.stringify(J,null,4),"utf-8").toString("base64");await e.api.github.uploadFile(I,o,"metadata.json",q,v("Cloud.Labels.UpdateManifestRollbackMsg",{plugin:l.plugin}),"main",me.data?.sha);try{let V=JSON.parse(h);e.sourceManager.saveSourceFile(l.id,V);let L=e.sourceManager.getSource(l.id);if(L){let k={...L,checksum:xs(V),cloud:{owner:I,repo:o,hash:W},updatedAt:Date.now()};e.sourceManager.saveSource(k)}}catch{}s(J),He.getState().triggerSourceUpdate(),e.notice.successPrefix(v("Common.Notices.Success"),v("Cloud.Notices.RollbackSuccessLocal")),w()}catch(I){e.notice.errorPrefix(v("Common.Notices.Failure"),`${I}`)}finally{S(!1)}}},[p,h,l,i,o,e,s,w]);return e.settings.shareToken?!t||!l?(0,Mt.jsxs)("div",{className:"flex flex-col items-center justify-center h-full gap-4 text-muted-foreground",children:[(0,Mt.jsx)(td,{className:"w-12 h-12 opacity-20"}),(0,Mt.jsx)("p",{className:"text-sm",children:v("Cloud.Tips.SelectHistoryEntry")}),(0,Mt.jsxs)(Te,{variant:"outline",size:"sm",onClick:w,children:[(0,Mt.jsx)(Vc,{className:"w-4 h-4 mr-2"}),v("Cloud.Actions.BackToManage")]})]}):(0,Mt.jsxs)("div",{className:"flex flex-col h-full min-h-0",children:[(0,Mt.jsxs)("div",{className:"flex items-center justify-between px-1 pb-4 shrink-0",children:[(0,Mt.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Mt.jsxs)(Te,{variant:"ghost",size:"sm",className:"h-8 px-2 gap-1.5 text-muted-foreground hover:text-primary",onClick:w,children:[(0,Mt.jsx)(Vc,{className:"w-4 h-4"}),v("Common.Actions.Back")]}),(0,Mt.jsx)("div",{className:"w-[1px] h-5 bg-border/50"}),(0,Mt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Mt.jsx)(td,{className:"w-4 h-4 text-primary"}),(0,Mt.jsx)("h2",{className:"text-sm font-semibold",children:v("Cloud.Labels.TranslationHistory")})]}),(0,Mt.jsxs)(mt,{variant:"outline",className:"text-[10px] px-2 py-0 h-[18px] font-medium",children:[l.title," (",l.plugin,")"]})]}),p&&h&&!g&&(0,Mt.jsxs)(Te,{size:"sm",variant:"destructive",className:"h-8 text-xs px-3 gap-1.5",onClick:C,disabled:b,children:[b?(0,Mt.jsx)(zt,{className:"w-3.5 h-3.5 animate-spin"}):(0,Mt.jsx)(zs,{className:"w-3.5 h-3.5"}),b?v("Cloud.Status.RollingBack"):v("Cloud.Labels.RollbackToVersion")]})]}),(0,Mt.jsxs)("div",{className:"flex flex-1 min-h-0 border rounded-xl overflow-hidden bg-card",style:{maxHeight:"calc(100% - 48px)"},children:[(0,Mt.jsxs)("div",{className:"w-[320px] border-r flex flex-col shrink-0 overflow-hidden",children:[(0,Mt.jsxs)("div",{className:"px-4 py-2.5 bg-muted/20 border-b text-[11px] font-semibold text-muted-foreground uppercase tracking-wider flex items-center gap-1.5",children:[(0,Mt.jsx)(Ti,{className:"w-3.5 h-3.5"}),v("Cloud.Labels.Commits")," (",c.length,")"]}),(0,Mt.jsx)(sr,{className:"flex-1 h-0",children:d?(0,Mt.jsxs)("div",{className:"flex flex-col items-center justify-center h-40 gap-2",children:[(0,Mt.jsx)(zt,{className:"w-5 h-5 animate-spin text-primary"}),(0,Mt.jsx)("span",{className:"text-xs text-muted-foreground",children:v("Cloud.Tips.LoadingCommits")})]}):c.length===0?(0,Mt.jsxs)("div",{className:"flex flex-col items-center justify-center h-40 gap-2 text-muted-foreground",children:[(0,Mt.jsx)(es,{className:"w-8 h-8 opacity-30"}),(0,Mt.jsx)("span",{className:"text-xs",children:v("Cloud.Tips.NoCommits")})]}):(0,Mt.jsx)("div",{className:"flex flex-col py-2",children:c.map((I,R)=>(0,Mt.jsxs)("button",{onClick:()=>P(I.sha),className:oe("group relative flex items-start gap-3 px-4 py-3 text-left transition-all hover:bg-muted/40",p===I.sha&&"bg-primary/5 border-l-2 border-l-primary"),children:[(0,Mt.jsxs)("div",{className:"flex flex-col items-center pt-1 shrink-0",children:[(0,Mt.jsx)("div",{className:oe("w-2.5 h-2.5 rounded-full border-2 transition-colors",p===I.sha?"bg-primary border-primary":R===0?"bg-green-500 border-green-500":"bg-muted border-border group-hover:border-primary/50")}),R<c.length-1&&(0,Mt.jsx)("div",{className:"w-[1px] flex-1 bg-border/60 mt-1 min-h-[20px]"})]}),(0,Mt.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Mt.jsx)("p",{className:"text-[12px] font-semibold text-foreground/90 line-clamp-2 leading-snug",children:I.message}),(0,Mt.jsxs)("div",{className:"flex items-center gap-2 mt-1.5",children:[I.avatarUrl&&(0,Mt.jsx)("img",{src:I.avatarUrl,className:"w-3.5 h-3.5 rounded-full",alt:""}),(0,Mt.jsx)("span",{className:"text-[10px] text-muted-foreground truncate",children:I.author}),(0,Mt.jsx)("span",{className:"text-[10px] text-muted-foreground/60",children:new Date(I.date).toLocaleDateString(void 0,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})})]}),(0,Mt.jsx)("code",{className:"text-[9px] text-muted-foreground/40 font-mono mt-0.5 block",children:I.sha.substring(0,7)})]}),(0,Mt.jsx)(yl,{className:oe("w-3.5 h-3.5 text-muted-foreground/30 mt-1 shrink-0 transition-colors",p===I.sha&&"text-primary")})]},I.sha))})})]}),(0,Mt.jsxs)("div",{className:"flex-1 flex flex-col min-w-0 overflow-hidden",children:[(0,Mt.jsxs)("div",{className:"px-4 py-2.5 bg-muted/20 border-b text-[11px] font-semibold text-muted-foreground uppercase tracking-wider flex items-center gap-1.5",children:[(0,Mt.jsx)(Xy,{className:"w-3.5 h-3.5"}),v("Cloud.Labels.VersionPreview"),p&&(0,Mt.jsx)(mt,{variant:"outline",className:"text-[9px] px-1.5 py-0 h-[16px] font-mono ml-1",children:p.substring(0,7)})]}),(0,Mt.jsx)(sr,{className:"flex-1 h-0",children:p?g?(0,Mt.jsxs)("div",{className:"flex flex-col items-center justify-center h-full min-h-[300px] gap-2",children:[(0,Mt.jsx)(zt,{className:"w-5 h-5 animate-spin text-primary"}),(0,Mt.jsx)("span",{className:"text-xs text-muted-foreground",children:v("Cloud.Status.LoadingContent")})]}):(0,Mt.jsx)("pre",{className:"p-4 text-[11px] font-mono text-foreground/80 leading-relaxed whitespace-pre-wrap break-all",children:h}):(0,Mt.jsxs)("div",{className:"flex flex-col items-center justify-center h-full min-h-[300px] gap-3 text-muted-foreground",children:[(0,Mt.jsx)(Xy,{className:"w-10 h-10 opacity-20"}),(0,Mt.jsx)("p",{className:"text-xs",children:v("Cloud.Labels.SelectCommitToPreview")})]})})]})]})]}):(0,Mt.jsx)(qp,{})};var gu=N(Le());qt();Vt();Rr();lf();var tg=N(fs());var We=N(ce());function _ne(e){let t=0;for(let a=0;a<e.length;a++){let n=e.charCodeAt(a);t=(t<<5)-t+n,t=t&t}return Math.abs(t).toString(16).padStart(8,"0").repeat(4)}var One=()=>{let e=He.getState().i18n,t=Se.use.setCurrentTab(),r=Se.use.backupDialogMode(),a=Se.use.backupProgress(),n=Se.use.setBackupDialogMode(),s=Se.use.setBackupProgress(),i=Se.use.githubUser(),o=Se.use.repoManifest(),l=Se.use.setRepoManifest(),c=e.settings.shareRepo,[u,d]=(0,gu.useState)([]),[f,p]=(0,gu.useState)(!1),[m,h]=(0,gu.useState)(null),x=w=>d(P=>[...P,`[${new Date().toLocaleTimeString()}] ${w}`]);gu.default.useEffect(()=>{let w=e.sourceManager.loadCheckpoint();w&&(h(w),x(v("Cloud.Notices.FoundCheckpoint",{date:new Date(w.timestamp).toLocaleString()})))},[e.sourceManager]);let g=(0,gu.useCallback)(async(w=!1)=>{if(!i||!c)return;p(!0),w||d([]);let P=i.login;try{let C=[],I=[],R=[],O=0,D=0;if(w&&m)x(v("Cloud.Status.ResumingBackup")),C=m.filesToUpload||[],I=m.sourcesToSave||[],R=m.manifest||[],D=m.total||C.length,O=m.currentIdx||0;else{let q=e.sourceManager.getAllSources();if(q.length===0){x(v("Cloud.Hints.NoLocalSourcesBackup")),s({total:0,current:0,currentPlugin:"",phase:"done"});return}x(v("Cloud.Notices.FoundLocalSources",{count:q.length})),s({total:q.length,current:0,currentPlugin:"",phase:"uploading"}),x(v("Cloud.Status.FetchingManifest"));try{let k=await e.api.github.getFileContentWithFallback(P,c,"metadata.json");k.state&&Array.isArray(k.data)&&(R=k.data)}catch{}x(v("Cloud.Status.PreparingData"));let V=q.map(async k=>{try{let _=e.sourceManager.getSourceFilePath(k.id);if(!_||!tg.existsSync(_))return null;let ee=await tg.readFile(_,"utf-8"),ie=_ne(ee),ae=R.find(A=>A.id===k.id);if(ae&&ae.hash===ie)return null;let ge=po(k.id,k.type),ue=new Date().toISOString(),$={id:k.id,plugin:k.plugin,type:k.type,language:e.settings.language,version:"",supported_versions:"",title:k.title||v("Cloud.Labels.UnnamedTranslation"),description:"",hash:ie,created_at:ae?.created_at||ue,updated_at:ue};try{let A=JSON.parse(ee);A?.metadata?.version&&($.version=A.metadata.version),A?.metadata?.supportedVersions&&($.supported_versions=A.metadata.supportedVersions),A?.metadata?.description&&($.description=A.metadata.description)}catch{}return{file:{path:ge,content:ee},sourceUpdate:{...k,origin:"cloud",cloud:{owner:P,repo:c,hash:ie},updatedAt:Date.now()},manifestEntry:$}}catch{return null}}),L=(await Promise.all(V)).filter(k=>k!==null);if(L.length===0){x(v("Cloud.Notices.BackupNoChanges")),s({total:q.length,current:q.length,currentPlugin:"",phase:"done"});return}C=L.map(k=>k.file),I=L.map(k=>k.sourceUpdate),L.forEach(k=>{let _=R.findIndex(ee=>ee.id===k.manifestEntry.id);_>=0?R[_]=k.manifestEntry:R.push(k.manifestEntry)}),D=C.length,x(v("Cloud.Notices.ItemsToUpload",{count:D}))}let W=20,J=[];for(let q=O;q<C.length;q+=W)J.push(C.slice(q,q+W));for(let q=0;q<J.length;q++){let V=J[q],L=O+q*W;s({total:C.length,current:L,currentPlugin:v("Cloud.Status.UploadingBatch",{current:q+1,total:J.length}),phase:"uploading"}),x(v("Cloud.Status.UploadingBatchLog",{current:q+1,total:J.length,count:V.length}));let k=await e.api.github.batchUploadFiles(P,c,V,v("Cloud.Labels.BulkBackupMsgBatch",{current:q+1,total:J.length}));if(!k.state)throw e.sourceManager.saveCheckpoint({filesToUpload:C,sourcesToSave:I,manifest:R,total:D,currentIdx:L}),new Error(k.data);e.sourceManager.saveCheckpoint({filesToUpload:C,sourcesToSave:I,manifest:R,total:D,currentIdx:L+V.length})}x(v("Cloud.Status.UpdatingIndex"));let me=JSON.stringify(R,null,4);if(!(await e.api.github.uploadFile(P,c,"metadata.json",Buffer.from(me).toString("base64"),v("Cloud.Labels.UpdateManifestGlobalMsg"),"main")).state)throw new Error(v("Cloud.Errors.UpdateManifestFail"));x(v("Cloud.Status.FinalizingLocal")),e.sourceManager.batchSaveSources(I),l(R),He.getState().triggerSourceUpdate(),e.sourceManager.clearCheckpoint(),h(null),s({total:D,current:D,currentPlugin:"",phase:"done"}),x(v("Cloud.Status.BackupDone")),e.notice.successPrefix(v("Common.Notices.Success"),v("Cloud.Notices.BackupSuccessCount",{count:D}))}catch(C){x(v("Cloud.Errors.BackupErrorMsg",{error:`${C}`})),s({total:0,current:0,currentPlugin:"",phase:"error",errorMessage:`${C}`}),e.notice.errorPrefix(v("Common.Notices.Failure"),`${C}`)}finally{p(!1)}},[i,c,e,l,s,m]),y=(0,gu.useCallback)(async()=>{if(!i||!c||!confirm(v("Cloud.Dialogs.ConfirmRestoreAll")))return;p(!0),d([]);let w=i.login;try{x(v("Cloud.Hints.FetchingManifest"));let P=await e.api.github.getFileContentWithFallback(w,c,"metadata.json");if(!P.state||!P.data){x(v("Cloud.Errors.GetManifestFail")),s({total:0,current:0,currentPlugin:"",phase:"error",errorMessage:v("Cloud.Errors.GetManifestFail")});return}let C=P.data;if(!Array.isArray(C)||C.length===0){x(v("Cloud.Hints.NoCloudData")),s({total:0,current:0,currentPlugin:"",phase:"done"});return}x(v("Cloud.Notices.FoundCloudSources",{count:C.length})),s({total:C.length,current:0,currentPlugin:"",phase:"downloading"});let I=0,R=0;for(let O=0;O<C.length;O++){let D=C[O];s({total:C.length,current:O,currentPlugin:D.title||D.plugin,phase:"downloading"});try{let W=e.sourceManager.getSource(D.id);if(W){let q=e.sourceManager.getSourceFilePath(D.id);if(q&&tg.existsSync(q)){let V=tg.readFileSync(q,"utf-8");if(_ne(V)===D.hash){x(v("Cloud.Notices.SkipLocalLatest",{title:D.title||D.plugin})),R++;continue}}}let J=await e.api.github.getFileContentWithFallback(w,c,po(D.id,D.type));if(!J.state||!J.data){let q=J.isRateLimit?v("Cloud.Hints.RateLimitTitle"):J.data?.message||J.data||"";x(`${v("Cloud.Errors.DownloadFailItem",{title:D.title||D.plugin})}: ${q}`);continue}let me=typeof J.data=="string"?JSON.parse(J.data):J.data;e.sourceManager.saveSourceFile(D.id,me);let Z={id:D.id,plugin:D.plugin,title:D.title||v("Cloud.Labels.UnnamedTranslation"),type:D.type,origin:"cloud",isActive:W?.isActive||!1,checksum:xs(me),cloud:{owner:w,repo:c,hash:D.hash},updatedAt:Date.now(),createdAt:W?.createdAt||Date.now()};e.sourceManager.saveSource(Z),e.sourceManager.getActiveSourceId(D.plugin)||e.sourceManager.setActive(D.id,!0),I++,x(v("Cloud.Notices.RestoreSuccessItem",{title:D.title||D.plugin}))}catch(W){x(v("Cloud.Errors.ProcessingFailItem",{title:D.title||D.plugin,error:`${W}`}))}}l(C),He.getState().triggerSourceUpdate(),s({total:C.length,current:C.length,currentPlugin:"",phase:"done"}),x(v("Cloud.Notices.RestoreCompleteStat",{restored:I,skipped:R})),e.notice.successPrefix(v("Common.Notices.Success"),v("Cloud.Notices.RestoreSuccessCount",{count:I}))}catch(P){x(v("Cloud.Errors.RestoreErrorMsg",{error:`${P}`})),s({total:0,current:0,currentPlugin:"",phase:"error",errorMessage:`${P}`}),e.notice.errorPrefix(v("Common.Notices.Failure"),`${P}`)}finally{p(!1)}},[i,c,e,l,s]),b=(0,gu.useCallback)(()=>{f||(n(null),s(null),d([]),t("my"))},[f,n,s,t]);if(!e.settings.shareToken)return(0,We.jsx)(qp,{});let S=a?.total?Math.round(a.current/a.total*100):0;return(0,We.jsxs)("div",{className:"flex flex-col h-full min-h-0",children:[(0,We.jsx)("div",{className:"flex items-center justify-between px-1 pb-4 shrink-0",children:(0,We.jsxs)("div",{className:"flex items-center gap-3",children:[(0,We.jsxs)(Te,{variant:"ghost",size:"sm",className:"h-8 px-2 gap-1.5 text-muted-foreground hover:text-primary",onClick:b,children:[(0,We.jsx)(Vc,{className:"w-4 h-4"}),v("Cloud.Actions.BackToManage")]}),(0,We.jsx)("div",{className:"w-[1px] h-5 bg-border/50"}),(0,We.jsxs)("div",{className:"flex items-center gap-2",children:[(0,We.jsx)(Lo,{className:"w-4 h-4 text-primary"}),(0,We.jsx)("h2",{className:"text-sm font-semibold",children:v("Cloud.Actions.BackupSync")})]})]})}),(0,We.jsx)(sr,{className:"flex-1 min-h-0 border rounded-xl overflow-hidden bg-card",children:(0,We.jsxs)("div",{className:"flex flex-col gap-6 p-6 max-w-2xl mx-auto w-full animate-in fade-in slide-in-from-bottom-4 duration-500",children:[(0,We.jsx)("div",{className:"text-sm text-muted-foreground bg-muted/30 p-4 rounded-lg border border-border/50",children:v("Cloud.Tips.BackupDesc")}),!r&&!f&&(0,We.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,We.jsxs)("button",{onClick:()=>n("backup"),className:"flex flex-col items-center gap-3 p-6 rounded-xl border-2 border-dashed border-border/60 hover:border-primary/40 hover:bg-primary/5 transition-all group",children:[(0,We.jsx)("div",{className:"p-3 rounded-full bg-blue-500/10 text-blue-600 group-hover:bg-blue-500/20 transition-colors",children:(0,We.jsx)(Tl,{className:"w-6 h-6"})}),(0,We.jsxs)("div",{className:"text-center",children:[(0,We.jsx)("p",{className:"text-sm font-semibold",children:v("Cloud.Tips.BackupToCloud")}),(0,We.jsx)("p",{className:"text-[10px] text-muted-foreground mt-1",children:v("Cloud.Tips.LocalToGithub")})]})]}),m&&(0,We.jsxs)("button",{onClick:()=>g(!0),className:"col-span-2 flex items-center justify-between p-4 rounded-xl border-2 border-primary/20 bg-primary/5 hover:bg-primary/10 transition-all group",children:[(0,We.jsxs)("div",{className:"flex items-center gap-3",children:[(0,We.jsx)("div",{className:"p-2 rounded-full bg-primary/20 text-primary",children:(0,We.jsx)(zs,{className:"w-5 h-5"})}),(0,We.jsxs)("div",{className:"text-left",children:[(0,We.jsx)("p",{className:"text-sm font-semibold text-primary",children:v("Cloud.Actions.ResumeLastBackup")}),(0,We.jsx)("p",{className:"text-[10px] text-muted-foreground",children:new Date(m.timestamp).toLocaleString()})]})]}),(0,We.jsx)(ei,{className:"w-5 h-5 text-primary opacity-50 group-hover:opacity-100 transition-opacity"})]}),(0,We.jsxs)("button",{onClick:()=>n("restore"),className:"flex flex-col items-center gap-3 p-6 rounded-xl border-2 border-dashed border-border/60 hover:border-primary/40 hover:bg-primary/5 transition-all group",children:[(0,We.jsx)("div",{className:"p-3 rounded-full bg-green-500/10 text-green-600 group-hover:bg-green-500/20 transition-colors",children:(0,We.jsx)(js,{className:"w-6 h-6"})}),(0,We.jsxs)("div",{className:"text-center",children:[(0,We.jsx)("p",{className:"text-sm font-semibold",children:v("Cloud.Tips.RestoreFromCloud")}),(0,We.jsx)("p",{className:"text-[10px] text-muted-foreground mt-1",children:v("Cloud.Tips.GithubToLocal")})]})]})]}),r&&!f&&!a&&(0,We.jsxs)("div",{className:"space-y-4",children:[(0,We.jsx)("div",{className:oe("flex items-center gap-4 p-4 rounded-xl border",r==="backup"?"bg-blue-500/5 border-blue-500/20":"bg-green-500/5 border-green-500/20"),children:(0,We.jsx)("div",{className:"flex items-center gap-2 text-sm",children:r==="backup"?(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)(Lo,{className:"w-5 h-5 text-blue-600"}),(0,We.jsx)("span",{className:"font-semibold",children:v("Cloud.Labels.LocalTranslation")}),(0,We.jsx)(ei,{className:"w-4 h-4 text-muted-foreground"}),(0,We.jsx)(Ca,{className:"w-5 h-5 text-blue-600"}),(0,We.jsx)("span",{className:"font-semibold",children:v("Cloud.Tips.GithubRepo")})]}):(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)(Ca,{className:"w-5 h-5 text-green-600"}),(0,We.jsx)("span",{className:"font-semibold",children:v("Cloud.Tips.GithubRepo")}),(0,We.jsx)(ei,{className:"w-4 h-4 text-muted-foreground"}),(0,We.jsx)(Lo,{className:"w-5 h-5 text-green-600"}),(0,We.jsx)("span",{className:"font-semibold",children:v("Cloud.Labels.LocalTranslation")})]})})}),(0,We.jsx)("div",{className:"text-xs text-muted-foreground space-y-1 px-1",children:r==="backup"?(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)("p",{children:v("Cloud.Tips.BackupStep1")}),(0,We.jsx)("p",{children:v("Cloud.Tips.BackupStep2")}),(0,We.jsx)("p",{children:v("Cloud.Tips.BackupStep3")})]}):(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)("p",{children:v("Cloud.Tips.RestoreStep1")}),(0,We.jsx)("p",{children:v("Cloud.Tips.RestoreStep2")}),(0,We.jsx)("p",{children:v("Cloud.Tips.RestoreStep3")})]})}),(0,We.jsxs)("div",{className:"flex gap-2",children:[(0,We.jsx)(Te,{variant:"outline",className:"flex-1",onClick:()=>n(null),children:v("Common.Actions.Back")}),(0,We.jsx)(Te,{className:"flex-1",onClick:()=>g(!1),children:r==="backup"?(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)(Tl,{className:"w-4 h-4 mr-2"}),v("Cloud.Actions.StartBackup")]}):(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)(js,{className:"w-4 h-4 mr-2"}),v("Cloud.Actions.StartRestore")]})})]})]}),(f||a)&&(0,We.jsxs)("div",{className:"space-y-3",children:[(0,We.jsxs)("div",{className:"space-y-2",children:[(0,We.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,We.jsx)("span",{className:"text-muted-foreground font-medium",children:a?.phase==="done"?v("Cloud.Status.BackupDone"):a?.phase==="error"?v("Cloud.Status.BackupError"):a?.phase==="uploading"?v("Cloud.Status.UploadingCloud"):v("Cloud.Status.DownloadingCloud")}),(0,We.jsxs)("span",{className:"font-mono font-semibold text-primary",children:[a?.current,"/",a?.total]})]}),(0,We.jsx)(ap,{value:S,className:"h-2"}),a?.currentPlugin&&f&&(0,We.jsxs)("div",{className:"flex items-center gap-1.5 text-[11px] text-muted-foreground",children:[(0,We.jsx)(wi,{className:"w-3 h-3"}),(0,We.jsx)("span",{className:"truncate",children:a.currentPlugin})]})]}),(0,We.jsx)(sr,{className:"h-40 border rounded-lg bg-muted/10",children:(0,We.jsx)("div",{className:"p-3 space-y-1",children:u.map((w,P)=>(0,We.jsx)("p",{className:"text-[11px] text-muted-foreground font-mono leading-relaxed",children:w},P))})}),!f&&a&&(0,We.jsxs)(Te,{className:"w-full",onClick:b,children:[(0,We.jsx)(ts,{className:"w-4 h-4 mr-2"}),v("Cloud.Status.Done")]})]})]})})]})};Vt();var Ot=N(ce()),Mb="i18n-cloud-view",HYe=()=>{let{t:e}=ze(),t=He.getState().i18n,r=Se.use.currentTab(),a=Se.use.setCurrentTab(),n=Se.use.reset(),s=Se.use.repoDataLoaded(),i=Se.use.repoChecking(),o=Se.use.repoInitialized(),l=Se.use.githubUser(),c=Se.use.isForking(),u=Se.use.refreshVersion(),d=Se.use.setRepoDataLoaded(),f=Se.use.setRepoChecking(),p=Se.use.setRepoInitialized(),m=Se.use.setRepoManifest(),h=Se.use.setMyRepoInfo(),x=Se.use.setMyRepoReadme(),g=Se.use.setRepoNameInput(),y=Se.use.fetchGithubUser();return Fne.default.useEffect(()=>{if(s||!t.settings.shareToken)return;let S=t.settings.shareRepo;g(S||"obsidian-i18n-resources");let w=!1;return(async()=>{f(!0);try{if(await y(t),w)return;let C=Se.getState().githubUser;if(!C)return;if(!S){p(!1);return}let I=await t.api.github.checkRepoExists(C.login,S);if(w)return;if(p(I.state),I.state&&I.data&&typeof I.data.stargazers_count=="number"?h({stargazers_count:I.data.stargazers_count,watchers_count:I.data.watchers_count||0,forks_count:I.data.forks_count||0,open_issues_count:I.data.open_issues_count||0,created_at:I.data.created_at||"",updated_at:I.data.updated_at||"",size:I.data.size||0,description:I.data.description||""}):h(null),t.api.github.getFileContent(C.login,S,"README.md").then(R=>{if(!w&&R.state&&R.data?.content){let O=Buffer.from(R.data.content,"base64").toString("utf-8");x(O)}else w||x(null)}).catch(()=>{w||x(null)}),I.state)try{let R=await t.api.github.getFileContentWithFallback(C.login,S,"metadata.json");if(!w&&R.state&&R.data){let O=R.data;Array.isArray(O)&&m(O)}}catch{w||m([])}}catch{}finally{w||(f(!1),d(!0))}})(),()=>{w=!0}},[s,t,u]),(0,Ot.jsx)("div",{className:"flex flex-col h-full w-full bg-background font-sans overflow-hidden",children:(0,Ot.jsxs)(Ll,{value:r,onValueChange:b=>a(b),className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:[(0,Ot.jsxs)("div",{className:"flex items-center justify-between px-6 py-3 bg-card/50 backdrop-blur sticky top-0 z-20",children:[(0,Ot.jsx)("div",{className:"flex items-center gap-6",children:(0,Ot.jsxs)(Rl,{className:"bg-muted/50 p-1 rounded-lg border border-border/50",children:[(0,Ot.jsx)(Ga,{value:"community",className:"data-[state=active]:bg-background data-[state=active]:text-primary data-[state=active]:shadow-sm transition-all duration-200 px-4 py-1.5",children:(0,Ot.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ot.jsx)(Ts,{className:"w-3.5 h-3.5"}),(0,Ot.jsx)("span",{children:e("Cloud.Tabs.Community")})]})}),(0,Ot.jsx)(Ga,{value:"download",className:"data-[state=active]:bg-background data-[state=active]:text-primary data-[state=active]:shadow-sm transition-all duration-200 px-4 py-1.5",children:(0,Ot.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ot.jsx)(js,{className:"w-3.5 h-3.5"}),(0,Ot.jsx)("span",{children:e("Cloud.Tabs.Explore")})]})}),(0,Ot.jsx)(Ga,{value:"my",className:"data-[state=active]:bg-background data-[state=active]:text-primary data-[state=active]:shadow-sm transition-all duration-200 px-4 py-1.5",children:(0,Ot.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ot.jsx)(rs,{className:"w-3.5 h-3.5"}),(0,Ot.jsx)("span",{children:e("Cloud.Tabs.Manage")})]})})]})}),(0,Ot.jsx)("div",{className:"flex items-center gap-4",children:t.settings.shareToken?i?(0,Ot.jsx)("div",{className:"flex items-center gap-3 px-3 py-1.5 rounded-xl bg-muted/20 border border-border/40 text-xs shadow-sm",children:(0,Ot.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Ot.jsx)(Wr,{className:"w-3.5 h-3.5 animate-spin"}),(0,Ot.jsx)("span",{className:"whitespace-nowrap",children:e("Cloud.Status.Checking")})]})}):(0,Ot.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded-xl bg-muted/20 border border-border/40 shadow-sm hover:shadow-md hover:bg-muted/40 hover:border-border/60 transition-all cursor-default group overflow-hidden",children:[(0,Ot.jsxs)("div",{className:"flex items-center gap-2",children:[l?.avatar_url?(0,Ot.jsx)("img",{src:l.avatar_url,className:"w-7 h-7 rounded-lg ring-1 ring-border shadow-[0_2px_4px_rgba(0,0,0,0.05)] group-hover:scale-[1.02] transition-transform object-cover",alt:"avatar"}):(0,Ot.jsx)("div",{className:"w-7 h-7 rounded-lg bg-primary/10 flex items-center justify-center text-primary ring-1 ring-primary/20 shadow-[0_2px_4px_rgba(0,0,0,0.05)]",children:(0,Ot.jsx)(Wc,{className:"w-4 h-4"})}),(0,Ot.jsx)("div",{className:"flex flex-col pr-1 justify-center whitespace-nowrap",children:(0,Ot.jsx)("span",{className:"font-bold text-[13px] text-foreground/90 leading-none",children:l?.login||e("Common.Labels.GithubUser")})})]}),(0,Ot.jsxs)("div",{className:"flex items-center gap-1 max-w-0 opacity-0 group-hover:max-w-[80px] group-hover:opacity-100 group-hover:pl-2 group-hover:ml-1 group-hover:border-l group-hover:border-border/40 transition-all duration-300 overflow-hidden",children:[(0,Ot.jsx)("button",{onClick:()=>n(),className:"flex shrink-0 items-center justify-center w-6 h-6 rounded-md hover:bg-primary/10 text-muted-foreground hover:text-primary transition-colors cursor-pointer",title:e("Common.Actions.Refresh"),children:(0,Ot.jsx)(Wr,{className:"w-3.5 h-3.5"})}),(0,Ot.jsx)("button",{onClick:async()=>{t.settings.shareToken="",t.settings.shareRepo="",await t.saveSettings(),n()},className:"flex shrink-0 items-center justify-center w-6 h-6 rounded-md text-destructive/70 hover:bg-destructive/10 hover:text-destructive transition-colors cursor-pointer",title:e("Cloud.Actions.Logout"),children:(0,Ot.jsx)(fS,{className:"w-3.5 h-3.5"})})]})]}):(0,Ot.jsxs)("div",{onClick:()=>{t.activeSettingTab="share",t.app.setting.open(),t.app.setting.openTabById("i18n")},className:"flex items-center gap-2 px-2 py-1.5 rounded-xl bg-orange-500/10 border border-orange-500/20 shadow-sm hover:shadow-md hover:bg-orange-500/20 hover:border-orange-500/30 transition-all cursor-pointer group",title:e("Cloud.Hints.TokenRequired"),children:[(0,Ot.jsx)("div",{className:"w-7 h-7 rounded-lg bg-orange-500/10 flex items-center justify-center text-orange-600 ring-1 ring-orange-500/20 shadow-[0_2px_4px_rgba(0,0,0,0.05)]",children:(0,Ot.jsx)(Wc,{className:"w-4 h-4"})}),(0,Ot.jsx)("div",{className:"flex flex-col pr-1 justify-center whitespace-nowrap",children:(0,Ot.jsx)("span",{className:"font-bold text-[13px] text-foreground/90 leading-none",children:["community","download"].includes(r)?e("Cloud.Status.GuestMode"):e("Cloud.Status.Unauthorized")})})]})})]}),(0,Ot.jsxs)("div",{className:"flex-1 overflow-hidden relative bg-muted/5 flex flex-col min-h-0",children:[(0,Ot.jsx)("div",{className:"absolute top-0 left-0 w-full h-[300px] bg-gradient-to-b from-primary/5 to-transparent pointer-events-none"}),(0,Ot.jsx)(ca,{value:"community",className:"flex-1 min-h-0 m-0 p-6 data-[state=active]:flex flex-col relative z-10 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(0,Ot.jsx)(Mne,{})}),(0,Ot.jsx)(ca,{value:"download",className:"flex-1 min-h-0 m-0 p-6 data-[state=active]:flex flex-col relative z-10 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(0,Ot.jsx)(Ane,{})}),(0,Ot.jsx)(ca,{value:"my",className:"flex-1 min-h-0 m-0 p-6 data-[state=active]:flex flex-col relative z-10 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(0,Ot.jsx)(Rne,{})}),(0,Ot.jsx)(ca,{value:"upload",className:"flex-1 min-h-0 m-0 p-6 data-[state=active]:flex flex-col relative z-10 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(0,Ot.jsx)(Lne,{})}),(0,Ot.jsx)(ca,{value:"history",className:"flex-1 min-h-0 m-0 p-6 data-[state=active]:flex flex-col relative z-10 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(0,Ot.jsx)(Dne,{})}),(0,Ot.jsx)(ca,{value:"backup",className:"flex-1 min-h-0 m-0 p-6 data-[state=active]:flex flex-col relative z-10 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(0,Ot.jsx)(One,{})})]})]})})},UT=class extends Bne.ItemView{constructor(r,a){super(r);this.root=null;this.shadowRoot=null;this.i18n=a}getViewType(){return Mb}getDisplayText(){return v("Cloud.Labels.CloudCentral")}getIcon(){return"cloud"}async onOpen(){let{root:r,shadowRoot:a}=Do(this.contentEl,this.i18n,(0,Ot.jsx)(HYe,{}));this.root=r,this.shadowRoot=a}async onClose(){Se.getState().reset(),this.root?.unmount(),this.shadowRoot&&(this.shadowRoot.innerHTML="")}};var Ee=N(ce()),jne=Hp.default.memo(({plugin:e,i18n:t,settings:r,isEnabled:a,data:n,reloadPlugin:s,refreshParent:i,close:o,viewMode:l})=>{let{t:c}=ze(),[u,d]=(0,Hp.useState)(!1),[f,p]=(0,Hp.useState)(!1),[m,h]=(0,Hp.useState)(!1),[x,g]=(0,Hp.useState)(!1),{statusColor:y,statusText:b,statusDesc:S,isLangDoc:w,langDoc:P,pluginDir:C,sources:I,activeSourceId:R,translationFormatMark:O,mainDoc:D,manifestDoc:W,isApplied:J,isTranslated:me,translationVersion:Z,supportedVersion:q,cloudEntries:V}=n,L=t.sourceManager,[k,_]=(0,Hp.useState)(null),ee=async ue=>{if(!k){_(ue.id);try{let $=r.defaultCloudRepo;if(!$){t.notice.error(c("Cloud.Errors.FetchFail")||"No default cloud repo set");return}let A=$.split("/");if(A.length!==2)return;let[K,he]=A,H=await t.api.github.getFileContentWithFallback(K,he,`plugins/${ue.id}.json`);if(!H.state||!H.data)throw new Error(H.isRateLimit?"Rate limit exceeded":H.data?.message||"Download failed");let xe=typeof H.data=="string"?JSON.parse(H.data):H.data,{calculateChecksum:Pe}=await Promise.resolve().then(()=>(Vt(),TS)),Ie=L?.getAllSources().find(Ve=>Ve.id===ue.id);if(Ie)L?.saveSourceFile(Ie.id,xe),L?.saveSource({...Ie,origin:"cloud",title:ue.title||Ie.title,checksum:Pe(xe),cloud:{owner:K,repo:he,hash:ue.hash},updatedAt:Date.now()}),t.notice.successPrefix("Cloud",c("Cloud.Notices.UpdateSuccess")||"Update success");else{L?.saveSourceFile(ue.id,xe);let Ve=!L?.getActiveSourceId(e.id);L?.saveSource({id:ue.id,plugin:ue.plugin,title:ue.title||"Unknown",type:ue.type,origin:"cloud",isActive:Ve,checksum:Pe(xe),cloud:{owner:K,repo:he,hash:ue.hash},updatedAt:Date.now(),createdAt:Date.now()}),t.notice.successPrefix("Cloud",c("Cloud.Notices.DownloadSuccess")||"Download success")}i()}catch($){t.notice.error(`Failed to download: ${$}`)}finally{_(null)}}},ie=async()=>{d(!0);try{if(!await Bl.pathExists(D)){t.notice.error(c("Manager.Plugins.Errors.MainNotFound"));return}let $=(await Bl.readFile(D)).toString(),A=await Bl.readJson(W);await new Promise(H=>setTimeout(H,0));let{generatePlugin:K}=await Promise.resolve().then(()=>(Vt(),TS)),he=K(e.version,A,$,r.language,t.settings);L&&(await L.extractAndSaveSource(e.id,he,{title:e.name}),t.notice.successPrefix(c("Manager.Plugins.Notices.ExtractSuccess"),c("Manager.Plugins.Hints.ExtractSuccessDesc"))),i()}catch(ue){t.notice.result(!1,`${ue}`)}finally{d(!1)}},ae=async()=>{if(!f){if(!J&&!me){g(!0);return}p(!0);try{let ue=$n(P);if(ue.dict){let K=Object.keys(ue.dict);await t.backupManager.createBackup(e.id,C,K);let he={};for(let[H,xe]of Object.entries(ue.dict)){let Pe=Une.join(C,H);if(!Bl.existsSync(Pe))continue;let Ie=Bl.readFileSync(Pe).toString();if(xe.ast&&xe.ast.length>0){let Ve=new yi(t.settings),ft=Ve.loadCode(Ie);ft&&(Ie=Ve.translate(ft,xe.ast))}if(xe.regex&&xe.regex.length>0&&(Ie=new Hi(t.settings).translate(Ie,xe.regex)),Pe.endsWith(".js")&&!new yi(t.settings).loadCode(Ie))throw new Error(c("Manager.Plugins.Errors.SyntaxError",{file:H}));he[Pe]=Ie}for(let[H,xe]of Object.entries(he))Bl.writeFileSync(H,xe)}t.stateManager.setPluginState(e.id,{id:e.id,isApplied:!0,pluginVersion:e.version,translationVersion:ue.metadata.version});let $=a,A=!1;try{t.app.plugins.enabledPlugins.has(e.id)&&await t.app.plugins.disablePlugin(e.id),await t.app.plugins.enablePlugin(e.id),t.app.plugins.plugins[e.id]||(A=!0)}catch{A=!0}if(A){t.notice.error(c("Manager.Plugins.Errors.LoadFailedAfterApply")||"\u8BD1\u6587\u5BFC\u81F4\u6838\u5FC3\u903B\u8F91\u635F\u574F\uFF0C\u5DF2\u89E6\u53D1\u5B89\u5168\u62E6\u622A\u5E76\u81EA\u52A8\u56DE\u6EDA\u3002"),await t.backupManager.restoreBackup(e.id,C),t.stateManager.deletePluginState(e.id),$?await t.app.plugins.enablePlugin(e.id):await t.app.plugins.disablePlugin(e.id),i();return}$?t.notice.successPrefix(c("Manager.Plugins.Notices.ReloadSuccess")||"\u63D2\u4EF6\u91CD\u8F7D\u6210\u529F",e.id):await t.app.plugins.disablePlugin(e.id),i()}catch(ue){t.notice.result(!1,String(ue))}finally{p(!1)}}},ge=async()=>{if(!m){h(!0);try{await t.backupManager.restoreBackup(e.id,C)?(t.stateManager.deletePluginState(e.id),a&&await s(e.id),t.notice.result(!0)):t.notice.result(!1,c("Manager.Plugins.Errors.BackupNotFound")),i()}catch(ue){t.notice.result(!1,String(ue))}finally{h(!1)}}};return l==="grid"?(0,Ee.jsxs)("div",{className:"group relative flex flex-col h-[200px] border rounded-none bg-card/85 text-card-foreground shadow-xs hover:shadow-lg hover:bg-muted/30 transition-all duration-300 overflow-hidden border-border/60 backdrop-blur-md",children:[(0,Ee.jsx)("div",{className:oe("absolute left-0 top-0 bottom-0 w-[4px] transition-colors duration-300 z-10 bg-opacity-100",y)}),(0,Ee.jsxs)("div",{className:"p-4 flex flex-col h-full relative z-0",children:[(0,Ee.jsxs)("div",{className:"flex justify-between items-start mb-3 gap-2",children:[(0,Ee.jsxs)("div",{className:"flex flex-col overflow-hidden min-w-0",children:[(0,Ee.jsx)("span",{className:"font-bold truncate text-[14px] leading-tight text-foreground/90 group-hover:text-primary transition-colors duration-300",title:e.name,children:e.name}),(0,Ee.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,Ee.jsxs)("span",{className:"text-[10px] text-muted-foreground/60 font-semibold tracking-tight bg-muted/30 px-1.5 py-0.5 rounded-none",children:["v",e.version]}),Z&&(0,Ee.jsxs)("span",{className:"text-[10px] text-primary/80 font-bold bg-primary/5 border border-primary/10 px-1.5 py-0.5 rounded-none",children:["v",Z]})]})]}),(0,Ee.jsxs)("div",{className:oe("px-2 py-0.5 text-[9px] uppercase tracking-widest font-extrabold rounded-none bg-background border border-border shadow-xs flex items-center gap-1.5",y.replace(/bg-/g,"text-")),children:[(0,Ee.jsx)("span",{className:oe("w-1.5 h-1.5 rounded-full shadow-sm animate-pulse-slow",y)}),b]})]}),(0,Ee.jsx)("div",{className:"flex-1 text-[11px] text-muted-foreground overflow-hidden leading-relaxed break-words font-medium relative",title:e.description,style:{WebkitMaskImage:"linear-gradient(to bottom, black 70%, transparent 100%)",maskImage:"linear-gradient(to bottom, black 70%, transparent 100%)"},children:e.description||c("Common.Status.Unknown")}),(0,Ee.jsx)("div",{className:"flex flex-col gap-3 mt-auto pt-3 border-t border-border/30",children:(0,Ee.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[I.length>0?(0,Ee.jsxs)(lr,{value:R??void 0,onValueChange:ue=>{L?.setActive(ue,!0),i()},children:[(0,Ee.jsx)(ur,{className:"w-[110px] text-[10px] px-2 h-7 bg-muted/40 border-none shadow-none hover:bg-muted/60 transition-all rounded-none",size:"sm",children:(0,Ee.jsx)(cr,{placeholder:c("Manager.Common.Actions.SelectSource")})}),(0,Ee.jsx)(dr,{className:"backdrop-blur-md bg-background/95 border-border/40",children:I.map(ue=>(0,Ee.jsx)(Rt,{value:ue.id,className:"text-[11px]",children:ue.title},ue.id))})]}):(0,Ee.jsx)("div",{}),(0,Ee.jsxs)("div",{className:"flex gap-2",children:[w&&!J&&(0,Ee.jsx)(zn,{children:(0,Ee.jsxs)(Ka,{children:[(0,Ee.jsx)(Wa,{asChild:!0,children:(0,Ee.jsxs)(Te,{variant:"default",size:"sm",className:"h-7 px-3 text-[10px] font-bold shadow-sm hover:shadow-md hover:bg-primary/90 transition-all active:scale-95 rounded-none",onClick:ae,disabled:f,children:[f&&(0,Ee.jsx)(zt,{className:"w-2.5 h-2.5 animate-spin mr-1"}),c("Manager.Common.Actions.Apply")]})}),(0,Ee.jsx)(Xa,{side:"top",className:"text-[10px]",children:c("Manager.Common.Actions.Apply")})]})}),J&&(0,Ee.jsx)(zn,{children:(0,Ee.jsxs)(Ka,{children:[(0,Ee.jsx)(Wa,{asChild:!0,children:(0,Ee.jsxs)(Te,{variant:"outline",size:"sm",className:"h-7 px-3 text-[10px] font-bold border-border/50 hover:bg-secondary/20 transition-all active:scale-95 rounded-none",onClick:ge,disabled:m,children:[m&&(0,Ee.jsx)(zt,{className:"w-2.5 h-2.5 animate-spin mr-1"}),c("Manager.Common.Actions.Restore")]})}),(0,Ee.jsx)(Xa,{side:"top",className:"text-[10px]",children:c("Manager.Common.Actions.Restore")})]})}),V&&V.length>0&&(0,Ee.jsxs)(Vn,{children:[(0,Ee.jsx)(qn,{asChild:!0,children:(0,Ee.jsx)(Te,{variant:"ghost",size:"icon",className:"h-7 w-7 rounded-none hover:bg-muted/50 transition-all",children:k?(0,Ee.jsx)(zt,{className:"w-4 h-4 animate-spin text-primary"}):(0,Ee.jsx)(vl,{className:"w-4 h-4 text-primary/80"})})}),(0,Ee.jsx)(Hn,{align:"end",className:"w-56 shadow-2xl backdrop-blur-md bg-background/95 border-border/40",children:V.map(ue=>{let $=I.some(K=>K.id===ue.id),A=I.some(K=>K.id===ue.id&&K.cloud?.hash!==ue.hash);return(0,Ee.jsxs)(Xr,{onClick:()=>ee(ue),className:"text-[11px] py-1.5 flex items-center justify-between",children:[(0,Ee.jsxs)("div",{className:"flex items-center truncate",children:[(0,Ee.jsx)(Ca,{className:"w-3.5 h-3.5 mr-2 text-primary/60"}),(0,Ee.jsxs)("span",{className:"truncate",title:ue.title,children:[ue.title," ",(0,Ee.jsxs)("span",{className:"text-muted-foreground/60",children:["v",ue.version]})]})]}),$&&!A?(0,Ee.jsx)(mt,{variant:"outline",className:"text-[8px] h-4 px-1 ml-2 bg-green-500/10 text-green-600 border-none shrink-0",children:"\u5DF2\u4E0B\u8F7D"}):A?(0,Ee.jsx)(mt,{variant:"outline",className:"text-[8px] h-4 px-1 ml-2 bg-amber-500/10 text-amber-600 border-none shrink-0 animate-pulse",children:"\u6709\u66F4\u65B0"}):null]},ue.id)})})]}),(0,Ee.jsxs)(Vn,{children:[(0,Ee.jsx)(qn,{asChild:!0,children:(0,Ee.jsx)(Te,{variant:"ghost",size:"icon",className:"h-7 w-7 rounded-none hover:bg-muted/50 transition-all",children:(0,Ee.jsx)(Qi,{className:"w-4 h-4 text-muted-foreground"})})}),(0,Ee.jsxs)(Hn,{align:"end",className:"w-48 shadow-2xl backdrop-blur-md bg-background/95 border-border/40",children:[O&&w&&(0,Ee.jsxs)(Xr,{onClick:()=>{let ue=$n(P);He.getState().setEditorPluginTranslation(ue),He.getState().setEditorPluginTranslationPath(P),t.view.activateView(jp)},className:"text-[12px] py-2",children:[(0,Ee.jsx)(ro,{className:"w-3.5 h-3.5 mr-2.5 text-primary/70"}),(0,Ee.jsx)("span",{children:c("Manager.Common.Actions.Edit")})]}),(0,Ee.jsxs)(Xr,{onClick:ie,disabled:u,className:"text-[12px] py-2",children:[(0,Ee.jsx)(Zl,{className:"w-3.5 h-3.5 mr-2.5 text-blue-500/70"}),(0,Ee.jsx)("span",{children:c("Manager.Plugins.Actions.Extract")})]}),R&&(0,Ee.jsxs)(Xr,{onClick:()=>{L?.removeSource(R),i()},className:"text-[12px] py-2 text-destructive focus:text-destructive focus:bg-destructive/5",children:[(0,Ee.jsx)(bl,{className:"w-3.5 h-3.5 mr-2.5 opacity-70"}),(0,Ee.jsx)("span",{children:c("Manager.Common.Actions.Delete")})]}),(0,Ee.jsx)(Ml,{className:"bg-border/40"}),a&&(0,Ee.jsxs)(Xr,{onClick:()=>{t.app.setting.open(),t.app.setting.openTabById(e.id)},className:"text-[12px] py-2",children:[(0,Ee.jsx)($c,{className:"w-3.5 h-3.5 mr-2.5 text-orange-500/70"}),(0,Ee.jsx)("span",{children:c("Manager.Plugins.Actions.OpenSettings")})]}),(0,Ee.jsxs)(Xr,{onClick:()=>kc(t,C),className:"text-[12px] py-2",children:[(0,Ee.jsx)(rs,{className:"w-3.5 h-3.5 mr-2.5 text-amber-500/70"}),(0,Ee.jsx)("span",{children:c("Manager.Common.Actions.OpenFolder")})]})]})]})]})]})})]})]}):(0,Ee.jsxs)("div",{className:"group relative border rounded-none bg-card/75 text-card-foreground shadow-xs hover:shadow-md hover:bg-muted/20 transition-all duration-300 px-4 py-1.5 w-full border-border/50 overflow-hidden backdrop-blur-md",children:[(0,Ee.jsx)("div",{className:oe("absolute left-0 top-0 bottom-0 w-[3px] transition-colors duration-300 z-10 bg-opacity-100",y)}),(0,Ee.jsxs)("div",{className:"flex items-center gap-5 overflow-hidden min-w-0 relative z-0",children:[(0,Ee.jsxs)("div",{className:oe("px-2.5 py-0.5 text-[9px] uppercase tracking-[0.1em] font-extrabold rounded-none bg-background border border-border shadow-xs flex items-center gap-1.5",y.replace(/bg-/g,"text-")),children:[(0,Ee.jsx)("span",{className:oe("w-1.5 h-1.5 rounded-full shadow-sm",y)}),b]}),(0,Ee.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 flex-1",children:[(0,Ee.jsx)("span",{className:"font-bold truncate text-[13.5px] text-foreground/90 group-hover:text-primary transition-colors duration-300 shrink-0 max-w-[40%]",children:e.name}),(0,Ee.jsxs)("span",{className:"text-[10px] text-muted-foreground/50 shrink-0 font-bold bg-muted/20 px-1.5 py-0.5 rounded-none",children:["v",e.version]}),Z&&(0,Ee.jsxs)("span",{className:"text-[10px] text-primary/80 font-bold bg-primary/5 border border-primary/10 px-1.5 py-0.5 rounded-none shrink-0",children:["v",Z]})]}),(0,Ee.jsxs)("div",{className:"flex items-center gap-2.5 ml-auto shrink-0 pl-2",children:[I.length>0&&(0,Ee.jsxs)(lr,{value:R??void 0,onValueChange:ue=>{L?.setActive(ue,!0),i()},children:[(0,Ee.jsx)(ur,{className:"w-[125px] h-8 text-[11px] bg-muted/40 border-none shadow-none hover:bg-muted/60 transition-all rounded-none",size:"sm",children:(0,Ee.jsx)(cr,{placeholder:c("Manager.Common.Actions.SelectSource")})}),(0,Ee.jsx)(dr,{className:"backdrop-blur-md bg-background/95 border-border/40",children:I.map(ue=>(0,Ee.jsx)(Rt,{value:ue.id,className:"text-[11px]",children:ue.title},ue.id))})]}),(0,Ee.jsxs)("div",{className:"flex items-center gap-1.5",children:[O&&w&&(0,Ee.jsx)(zn,{children:(0,Ee.jsxs)(Ka,{children:[(0,Ee.jsx)(Wa,{asChild:!0,children:(0,Ee.jsx)(Te,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-none hover:bg-primary/10 hover:text-primary transition-all",onClick:()=>{let ue=$n(P);He.getState().setEditorPluginTranslation(ue),He.getState().setEditorPluginTranslationPath(P),t.view.activateView(jp)},children:(0,Ee.jsx)(ro,{className:"w-3.5 h-3.5"})})}),(0,Ee.jsx)(Xa,{className:"text-[10px]",children:c("Manager.Common.Actions.Edit")})]})}),w&&!J&&(0,Ee.jsx)(zn,{children:(0,Ee.jsxs)(Ka,{children:[(0,Ee.jsx)(Wa,{asChild:!0,children:(0,Ee.jsxs)(Te,{variant:"default",size:"sm",className:"h-8 px-4 text-[11px] font-bold shadow-sm hover:shadow-md hover:translate-y-[-1px] active:scale-95 transition-all rounded-none",onClick:ae,disabled:f,children:[f&&(0,Ee.jsx)(zt,{className:"w-3 h-3 animate-spin mr-1.5"}),c("Manager.Common.Actions.Apply")]})}),(0,Ee.jsx)(Xa,{className:"text-[10px]",children:c("Manager.Common.Actions.Apply")})]})}),J&&(0,Ee.jsx)(zn,{children:(0,Ee.jsxs)(Ka,{children:[(0,Ee.jsx)(Wa,{asChild:!0,children:(0,Ee.jsxs)(Te,{variant:"outline",size:"sm",className:"h-8 px-4 text-[11px] font-bold border-border/50 hover:bg-secondary/20 transition-all active:scale-95 rounded-none",onClick:ge,disabled:m,children:[m&&(0,Ee.jsx)(zt,{className:"w-3 h-3 animate-spin mr-1.5"}),c("Manager.Common.Actions.Restore")]})}),(0,Ee.jsx)(Xa,{className:"text-[10px]",children:c("Manager.Common.Actions.Restore")})]})}),V&&V.length>0&&(0,Ee.jsxs)(Vn,{children:[(0,Ee.jsx)(qn,{asChild:!0,children:(0,Ee.jsx)(Te,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-none hover:bg-primary/10 hover:text-primary transition-all",children:k?(0,Ee.jsx)(zt,{className:"w-4 h-4 animate-spin"}):(0,Ee.jsx)(vl,{className:"w-4 h-4"})})}),(0,Ee.jsx)(Hn,{align:"end",className:"w-56 shadow-2xl backdrop-blur-md bg-background/95 border-border/40",children:V.map(ue=>{let $=I.some(K=>K.id===ue.id),A=I.some(K=>K.id===ue.id&&K.cloud?.hash!==ue.hash);return(0,Ee.jsxs)(Xr,{onClick:()=>ee(ue),className:"text-[12px] py-2 flex items-center justify-between",children:[(0,Ee.jsxs)("div",{className:"flex items-center truncate",children:[(0,Ee.jsx)(Ca,{className:"w-4 h-4 mr-2.5 text-primary/60"}),(0,Ee.jsxs)("span",{className:"truncate",title:ue.title,children:[ue.title," ",(0,Ee.jsxs)("span",{className:"text-muted-foreground/50 ml-1",children:["v",ue.version]})]})]}),$&&!A?(0,Ee.jsx)(mt,{variant:"outline",className:"text-[9px] h-5 px-1.5 ml-2 bg-green-500/10 text-green-600 border-none shrink-0",children:"\u5DF2\u4E0B\u8F7D"}):A?(0,Ee.jsx)(mt,{variant:"outline",className:"text-[9px] h-5 px-1.5 ml-2 bg-amber-500/10 text-amber-600 border-none shrink-0 animate-pulse",children:"\u6709\u66F4\u65B0"}):null]},ue.id)})})]}),(0,Ee.jsxs)(Vn,{children:[(0,Ee.jsx)(qn,{asChild:!0,children:(0,Ee.jsx)(Te,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-none hover:bg-muted/50 transition-all",children:(0,Ee.jsx)(Qi,{className:"w-4 h-4 text-muted-foreground"})})}),(0,Ee.jsxs)(Hn,{align:"end",className:"w-48 shadow-2xl backdrop-blur-md bg-background/95 border-border/40",children:[(0,Ee.jsxs)(Xr,{onClick:ie,disabled:u,className:"text-[12px] py-2",children:[(0,Ee.jsx)(Zl,{className:"w-3.5 h-3.5 mr-2.5 text-blue-500/70"}),(0,Ee.jsx)("span",{children:c("Manager.Plugins.Actions.Extract")})]}),R&&(0,Ee.jsxs)(Xr,{onClick:()=>{L?.removeSource(R),i()},className:"text-[12px] py-2 text-destructive focus:text-destructive focus:bg-destructive/5",children:[(0,Ee.jsx)(bl,{className:"w-3.5 h-3.5 mr-2.5 opacity-70"}),(0,Ee.jsx)("span",{children:c("Manager.Common.Actions.Delete")})]}),(0,Ee.jsx)(Ml,{className:"bg-border/40"}),a&&(0,Ee.jsxs)(Xr,{onClick:()=>{t.app.setting.open(),t.app.setting.openTabById(e.id)},className:"text-[12px] py-2",children:[(0,Ee.jsx)($c,{className:"w-3.5 h-3.5 mr-2.5 text-orange-500/70"}),(0,Ee.jsx)("span",{children:c("Manager.Plugins.Actions.OpenSettings")})]}),(0,Ee.jsxs)(Xr,{onClick:()=>kc(t,C),className:"text-[12px] py-2",children:[(0,Ee.jsx)(rs,{className:"w-3.5 h-3.5 mr-2.5 text-amber-500/70"}),(0,Ee.jsx)("span",{children:c("Manager.Common.Actions.OpenFolder")})]})]})]}),(0,Ee.jsx)(xd,{open:x,onOpenChange:g,children:(0,Ee.jsxs)(bd,{className:"sm:max-w-[425px] rounded-none border-border/60",children:[(0,Ee.jsxs)(vd,{children:[(0,Ee.jsxs)(Sd,{className:"flex items-center gap-2 text-amber-500",children:[(0,Ee.jsx)("span",{className:"text-xl",children:"\u26A0\uFE0F"}),c("Manager.Plugins.Dialogs.EmptyTranslationTitle")]}),(0,Ee.jsx)(Px,{className:"pt-4 leading-relaxed text-foreground/80",children:c("Manager.Plugins.Dialogs.EmptyTranslationDesc")})]}),(0,Ee.jsx)(Ch,{className:"mt-6 flex justify-center",children:(0,Ee.jsx)(Te,{variant:"secondary",onClick:()=>g(!1),className:"w-full rounded-none h-10 bg-amber-500/10 hover:bg-amber-500/20 text-amber-600 dark:text-amber-400 border-amber-500/20",children:c("Common.Actions.Confirm")})})]})})]})]})]})]})});var da=N(ce()),zne=({i18n:e,close:t})=>{let{t:r}=ze(),a=e.app,n=e.settings,[s,i]=(0,na.useState)(n.searchText),[o,l]=(0,na.useState)(n.sort),[c,u]=(0,na.useState)(n.pluginViewMode||"list"),d=(0,na.useCallback)($=>{u($),n.pluginViewMode=$,e.saveSettings()},[e,n]),[f,p]=(0,na.useState)("all"),[m,h]=(0,na.useState)([]),[x,g]=(0,na.useState)(new Set),[y,b]=(0,na.useState)(0),[S,w]=(0,na.useState)(!1),[P,C]=(0,na.useState)([]);(0,na.useEffect)(()=>{let $=n.defaultCloudRepo;if(!$){C([]);return}let A=$.split("/");if(A.length!==2)return;let[K,he]=A,H=!0;return e.api.github.getFileContentWithFallback(K,he,"metadata.json").then(xe=>{H&&xe.state&&Array.isArray(xe.data)&&C(xe.data)}).catch(xe=>{}),()=>{H=!1}},[n.defaultCloudRepo,e]);let I=He($=>$.sourceUpdateTick),R=(0,na.useMemo)(()=>[{key:"0",label:r("Common.Data.SortAsc")},{key:"1",label:r("Common.Data.SortDesc")}],[r]),O=(0,na.useMemo)(()=>[{key:"all",label:r("Manager.Common.Filters.All")},{key:"toExtract",label:r("Manager.Plugins.Filters.ToExtract")},{key:"untranslated",label:r("Manager.Plugins.Filters.Untranslated")},{key:"translated",label:r("Manager.Plugins.Filters.Translated")},{key:"unapplied",label:r("Manager.Plugins.Filters.Unapplied")},{key:"applied",label:r("Manager.Plugins.Filters.Applied")}],[r]);(0,na.useEffect)(()=>{let A=Object.values(a.plugins.manifests).filter(K=>K.id!==e.manifest.id);h(A),g(new Set(a.plugins.enabledPlugins))},[a,y,e.manifest.id]);let D=(0,na.useCallback)($=>$.dict?Object.values($.dict).some(A=>A.ast.some(K=>K.target&&K.target!==K.source)||A.regex.some(K=>K.target&&K.target!==K.source)):!1,[]),W=(0,na.useMemo)(()=>{let $={},A=_b.normalize(e.app.vault.adapter.getBasePath());for(let K of m){let he=_b.join(A,K.dir||""),H=e.sourceManager.getTranslationPath(K.id,he),xe=cI.pathExistsSync(H),Pe=_b.join(he,"manifest.json"),Ie=_b.join(he,"main.js"),Ve=e.stateManager.getPluginState(K.id),ft=e.sourceManager?.getSourcesForPlugin(K.id)||[],we=e.sourceManager?.getActiveSourceId(K.id),Ne,Be=!0,tt=!1;if(xe)try{Ne=$n(H),Be=K2(Ne),Be&&Ne&&(tt=D(Ne))}catch{Be=!1}let Ct="bg-muted-foreground",Tt=r("Manager.Plugins.Status.ToExtract"),Qt=r("Manager.Plugins.Hints.NoTransDesc"),Ur=0,pe="",$e="";Ne&&Be?(pe=Ne.metadata.version,$e=Ne.metadata.supportedVersions,Ur=xe?cI.statSync(H).mtimeMs:Date.now(),!!(Ve&&Ve.isApplied)?(Ct="bg-green-500 dark:bg-green-600",Tt=r("Manager.Plugins.Status.Applied")):tt?(Ct="bg-blue-500 dark:bg-blue-600",Tt=r("Manager.Plugins.Status.Unapplied")):(Ct="bg-amber-500 dark:bg-amber-600",Tt=r("Manager.Plugins.Status.Untranslated")),Qt=`${r("Manager.Plugins.Labels.Mtime")}: ${W2(Ur)}`):Ne&&!Be?(Ct="bg-destructive",Tt=r("Manager.Common.Errors.Error"),Qt=r("Manager.Common.Errors.ErrorDesc")):xe||(Ct="bg-muted-foreground",Tt=r("Manager.Plugins.Status.ToExtract")),$[K.id]={statusColor:Ct,statusText:Tt,statusDesc:Qt,isLangDoc:xe,langDoc:H,pluginDir:he,sources:ft,activeSourceId:we,translationFormatMark:Be,mainDoc:Ie,manifestDoc:Pe,isApplied:!!(Ve&&Ve.isApplied),isTranslated:tt,translationVersion:pe,supportedVersion:$e,cloudEntries:P.filter(nt=>nt.plugin===K.id&&nt.type==="plugin")}}return $},[m,e,y,I,r,D,P]),J=(0,na.useMemo)(()=>{let $=[...m];return s&&($=$.filter(A=>A.name.toLowerCase().includes(s.toLowerCase()))),f!=="all"&&($=$.filter(A=>{let K=W[A.id];if(!K)return!1;switch(f){case"applied":return K.isApplied;case"unapplied":return K.isTranslated&&!K.isApplied;case"translated":return K.isTranslated;case"untranslated":return K.isLangDoc&&!K.isTranslated;case"toExtract":return!K.isLangDoc;default:return!0}})),o==="0"?$.sort((A,K)=>A.name.localeCompare(K.name)):o==="1"&&$.sort((A,K)=>K.name.localeCompare(A.name)),$},[m,s,o,f,W]),me=$=>{let A=$.target.value;i(A),n.searchText=A,e.saveSettings()},Z=$=>{l($),n.sort=$,e.saveSettings()},q=(0,na.useRef)(null),[V,L]=(0,na.useState)(0);(0,na.useEffect)(()=>{if(!q.current)return;let $=new ResizeObserver(A=>{for(let K of A)L(K.contentRect.width)});return $.observe(q.current),()=>$.disconnect()},[]);let k=(0,na.useMemo)(()=>{if(c==="list")return 1;let $=Math.floor((V+16)/(320+16));return Math.max(1,$)},[c,V]),_=Math.ceil(J.length/k),ee=ni({count:_,getScrollElement:()=>q.current,estimateSize:(0,na.useCallback)(()=>c==="list"?44+4:200+12,[c]),getItemKey:(0,na.useCallback)($=>`${c}-${$}`,[c]),overscan:5}),ie=ee.getVirtualItems(),ae=(0,na.useCallback)(async $=>{try{return a.plugins.enabledPlugins.has($)?(await a.plugins.disablePlugin($),await a.plugins.enablePlugin($),new Db.Notice(r("Manager.Plugins.Notices.ReloadPlugin",{id:$})),!0):!1}catch(A){return new Db.Notice(r("Manager.Plugins.Errors.ReloadPluginFailed",{error:A})),!1}},[a,r]),ge=(0,na.useCallback)(()=>{b($=>$+1)},[]),ue=(0,na.useCallback)(async()=>{w(!0);try{let $=e.manifest.id;a.plugins.enabledPlugins.has($)?(await a.plugins.disablePlugin($),await a.plugins.enablePlugin($),new Db.Notice(r("Manager.Plugins.Notices.ReloadSuccess"))):(new Db.Notice(r("Manager.Plugins.Errors.PluginNotEnabled")),w(!1))}catch($){new Db.Notice(r("Manager.Plugins.Errors.ReloadFailed",{error:$})),w(!1)}},[a,e.manifest.id,r]);return(0,da.jsxs)("div",{className:"flex flex-col h-full bg-background text-foreground overflow-hidden",children:[(0,da.jsx)("div",{className:"flex flex-col gap-4 py-2 px-4 border-b shrink-0",children:(0,da.jsxs)("div",{className:"flex gap-2",children:[(0,da.jsxs)("div",{className:"relative flex-1",children:[(0,da.jsx)(ra,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground/70"}),(0,da.jsx)(Qe,{placeholder:r("Manager.Plugins.Placeholders.SearchPlugins"),value:s,onChange:me,className:"pl-8 h-9 rounded-none border-muted-foreground/20 focus:ring-1 text-[13px] bg-muted/10 shadow-sm transition-colors hover:bg-muted/20"})]}),(0,da.jsxs)("div",{className:"flex items-center gap-1 border border-muted-foreground/20 rounded-none p-0.5 h-9 bg-muted/20 shadow-sm",children:[(0,da.jsx)(Te,{variant:c==="list"?"secondary":"ghost",size:"icon",className:"h-8 w-8 rounded-none transition-all",onClick:()=>d("list"),children:(0,da.jsx)(Km,{className:"h-4 w-4 text-muted-foreground/80"})}),(0,da.jsx)(Te,{variant:c==="grid"?"secondary":"ghost",size:"icon",className:"h-8 w-8 rounded-none transition-all",onClick:()=>d("grid"),children:(0,da.jsx)(eo,{className:"h-4 w-4 text-muted-foreground/80"})})]}),(0,da.jsxs)(lr,{value:f,onValueChange:$=>p($),children:[(0,da.jsx)(ur,{className:"w-[120px] h-9 rounded-none border-muted-foreground/20 shadow-sm text-[13px]",size:"default",children:(0,da.jsx)(cr,{placeholder:r("Manager.Common.Filters.All")})}),(0,da.jsx)(dr,{children:O.map($=>(0,da.jsx)(Rt,{value:$.key,children:$.label},$.key))})]}),(0,da.jsxs)(lr,{value:o,onValueChange:Z,children:[(0,da.jsx)(ur,{className:"w-[130px] h-9 rounded-none border-muted-foreground/20 shadow-sm text-[13px]",size:"default",children:(0,da.jsx)(cr,{placeholder:r("Common.Data.SortAsc")})}),(0,da.jsx)(dr,{children:R.map($=>(0,da.jsx)(Rt,{value:$.key,children:$.label},$.key))})]})]})}),(0,da.jsx)(sr,{className:"flex-1 min-h-0",viewportRef:q,children:(0,da.jsx)("div",{className:"py-2 px-4",children:(0,da.jsxs)("div",{className:oe("gap-2 w-full overflow-hidden relative",c==="grid"?"grid grid-cols-[repeat(auto-fill,minmax(300px,1fr))]":"flex flex-col"),style:{height:`${ee.getTotalSize()}px`},children:[ie.map($=>{let A=$.index*k,K=J.slice(A,A+k);return(0,da.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:`${$.size}px`,transform:`translateY(${$.start}px)`,display:"grid",gridTemplateColumns:`repeat(${k}, 1fr)`,gap:c==="list"?"0px":"12px",paddingBottom:c==="list"?"4px":"12px"},children:K.map(he=>(0,da.jsx)(jne,{plugin:he,i18n:e,settings:n,isEnabled:x.has(he.id),data:W[he.id],reloadPlugin:ae,refreshParent:ge,close:t,viewMode:c},he.id))},$.key)}),J.length===0&&(0,da.jsx)("div",{className:"text-center text-muted-foreground py-8 col-span-full",children:r("Manager.Plugins.Status.NoPlugins")})]})})})]})};var ba=N(Le()),ag=N(require("path")),Gp=N(fs());er();qt();Vt();var $p=N(Le()),Vne=N(require("path")),rg=N(fs());er();qt();Vt();Vt();var Ae=N(ce()),qne=$p.default.memo(({theme:e,i18n:t,data:r,refreshParent:a,viewMode:n})=>{let{t:s}=ze(),[i,o]=(0,$p.useState)(!1),[l,c]=(0,$p.useState)(!1),[u,d]=(0,$p.useState)(!1),[f,p]=(0,$p.useState)(!1),{statusColor:m,statusText:h,statusDesc:x,hasTranslation:g,translationPath:y,themeDir:b,themeCssPath:S,sources:w,activeSourceId:P,isApplied:C,isTranslated:I,translationVersion:R,description:O,supportedVersion:D,cloudEntries:W}=r,J=t.sourceManager,[me,Z]=(0,$p.useState)(null),q=async _=>{if(!me){Z(_.id);try{let ee=t.settings.defaultCloudRepo;if(!ee){t.notice.error(s("Cloud.Errors.FetchFail")||"No default cloud repo set");return}let ie=ee.split("/");if(ie.length!==2)return;let[ae,ge]=ie,ue=await t.api.github.getFileContentWithFallback(ae,ge,`themes/${_.id}.json`);if(!ue.state||!ue.data)throw new Error(ue.isRateLimit?"Rate limit exceeded":ue.data?.message||"Download failed");let $=typeof ue.data=="string"?JSON.parse(ue.data):ue.data,{calculateChecksum:A}=await Promise.resolve().then(()=>(Vt(),TS)),K=J?.getAllSources().find(he=>he.id===_.id);if(K)J?.saveSourceFile(K.id,$),J?.saveSource({...K,origin:"cloud",title:_.title||K.title,checksum:A($),cloud:{owner:ae,repo:ge,hash:_.hash},updatedAt:Date.now()}),t.notice.successPrefix("Cloud",s("Cloud.Notices.UpdateSuccess")||"Update success");else{J?.saveSourceFile(_.id,$);let he=!J?.getActiveSourceId(e.name);J?.saveSource({id:_.id,plugin:_.plugin,title:_.title||"Unknown",type:_.type,origin:"cloud",isActive:he,checksum:A($),cloud:{owner:ae,repo:ge,hash:_.hash},updatedAt:Date.now(),createdAt:Date.now()}),t.notice.successPrefix("Cloud",s("Cloud.Notices.DownloadSuccess")||"Download success")}a()}catch(ee){t.notice.error(`Failed to download: ${ee}`)}finally{Z(null)}}},V=async()=>{o(!0);try{if(!rg.existsSync(S)){t.notice.error(s("Manager.Themes.Errors.ThemeCssNotFound"));return}let _=rg.readFileSync(S).toString(),ee=Vne.join(b,"manifest.json"),ie={name:e.name,version:"0.0.0",minAppVersion:"",author:"",authorUrl:""};if(rg.existsSync(ee))try{ie=rg.readJsonSync(ee)}catch{}let{generateTheme:ae}=await Promise.resolve().then(()=>(Vt(),TS)),ge=ae(ie,_,t.settings);if(ge.dict.length===0){t.notice.error(s("Manager.Themes.Errors.NoSettingsBlock"));return}t.sourceManager&&(await t.sourceManager.extractAndSaveSource(e.name,ge,{title:e.name,type:"theme"}),t.notice.successPrefix(s("Manager.Themes.Notices.ThemeExtractPrefix"),s("Manager.Plugins.Hints.ExtractSuccessDesc"))),a()}catch(_){t.notice.result(!1,`${_}`)}finally{o(!1)}},L=async()=>{if(!l){if(!C&&!I){p(!0);return}c(!0);try{await t.injectorManager.applyToTheme(e.name)?(t.notice.result(!0),a()):t.notice.result(!1,s("Manager.Common.Errors.ErrorDesc"))}catch(_){t.notice.result(!1,String(_))}finally{c(!1)}}},k=async()=>{if(!u){d(!0);try{await t.backupManager.restoreBackup(e.name,b)?(t.stateManager.deleteThemeState(e.name),t.notice.result(!0)):t.notice.result(!1,s("Manager.Themes.Errors.BackupNotFound")),a()}catch(_){t.notice.result(!1,String(_))}finally{d(!1)}}};return n==="grid"?(0,Ae.jsxs)("div",{className:"group relative flex flex-col h-[200px] border rounded-none bg-card/85 text-card-foreground shadow-xs hover:shadow-lg hover:bg-muted/30 transition-all duration-300 overflow-hidden border-border/60 backdrop-blur-md",children:[(0,Ae.jsx)("div",{className:oe("absolute left-0 top-0 bottom-0 w-[4px] transition-colors duration-300 z-10 bg-opacity-100",m)}),(0,Ae.jsxs)("div",{className:"p-4 flex flex-col h-full relative z-0",children:[(0,Ae.jsxs)("div",{className:"flex justify-between items-start mb-3 gap-2",children:[(0,Ae.jsxs)("div",{className:"flex flex-col overflow-hidden min-w-0",children:[(0,Ae.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,Ae.jsx)("span",{className:"font-bold truncate text-[14px] leading-tight text-foreground/90 group-hover:text-primary transition-colors duration-300 whitespace-nowrap",title:e.name,children:e.name}),e.isActive&&(0,Ae.jsx)(mt,{variant:"secondary",className:"px-1.5 py-0 h-4 text-[8px] font-extrabold uppercase tracking-tighter rounded-none bg-primary/10 text-primary border-none shadow-xs shrink-0",children:s("Manager.Themes.Labels.ThemeActive")})]}),(0,Ae.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,Ae.jsx)("span",{className:"text-[10px] text-muted-foreground/60 font-semibold tracking-tight bg-muted/30 px-1.5 py-0.5 rounded-none",children:e.manifest?`v${e.manifest.version}`:"v0.0.0"}),R&&(0,Ae.jsxs)("span",{className:"text-[10px] text-primary/80 font-bold bg-primary/5 border border-primary/10 px-1.5 py-0.5 rounded-none",children:["v",R]})]})]}),(0,Ae.jsxs)("div",{className:oe("px-2 py-0.5 text-[9px] uppercase tracking-widest font-extrabold rounded-none bg-background border border-border shadow-xs flex items-center gap-1.5",m.replace(/bg-/g,"text-")),children:[(0,Ae.jsx)("span",{className:oe("w-1.5 h-1.5 rounded-full shadow-sm animate-pulse-slow",m)}),h]})]}),(0,Ae.jsxs)("div",{className:"flex-1 text-[11px] text-muted-foreground overflow-hidden leading-relaxed break-words font-medium relative line-clamp-2",children:[O||(e.manifest?.author?`${s("Manager.Common.Labels.Author")}: ${e.manifest.author}`:s("Common.Status.Unknown")),(0,Ae.jsx)("div",{className:"absolute inset-x-0 bottom-0 h-4 bg-gradient-to-t from-card to-transparent pointer-events-none opacity-50"})]}),(0,Ae.jsx)("div",{className:"flex flex-col gap-3 mt-auto pt-3 border-t border-border/50",children:(0,Ae.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[w.length>0?(0,Ae.jsxs)(lr,{value:P??void 0,onValueChange:_=>{J?.setActive(_,!0),a()},children:[(0,Ae.jsx)(ur,{className:"w-[110px] text-[10px] px-2 h-7 bg-muted/40 border-none shadow-none hover:bg-muted/60 transition-all rounded-none",size:"sm",children:(0,Ae.jsx)(cr,{placeholder:s("Manager.Common.Filters.All")})}),(0,Ae.jsx)(dr,{className:"backdrop-blur-md bg-background/95 border-border/40",children:w.map(_=>(0,Ae.jsx)(Rt,{value:_.id,className:"text-[11px]",children:_.title},_.id))})]}):(0,Ae.jsx)("div",{}),(0,Ae.jsxs)("div",{className:"flex gap-2",children:[g&&!C&&(0,Ae.jsx)(zn,{children:(0,Ae.jsxs)(Ka,{children:[(0,Ae.jsx)(Wa,{asChild:!0,children:(0,Ae.jsxs)(Te,{variant:"default",size:"sm",className:"h-7 px-3 text-[10px] font-bold shadow-sm hover:shadow-md hover:bg-primary/90 transition-all active:scale-95 rounded-none",onClick:L,disabled:l,children:[l&&(0,Ae.jsx)(zt,{className:"w-2.5 h-2.5 animate-spin mr-1"}),s("Manager.Common.Actions.Apply")]})}),(0,Ae.jsx)(Xa,{side:"top",className:"text-[10px]",children:s("Manager.Themes.Notices.ThemeApplyPrefix")})]})}),C&&(0,Ae.jsx)(zn,{children:(0,Ae.jsxs)(Ka,{children:[(0,Ae.jsx)(Wa,{asChild:!0,children:(0,Ae.jsxs)(Te,{variant:"outline",size:"sm",className:"h-7 px-3 text-[10px] font-bold border-border/50 hover:bg-secondary/20 transition-all active:scale-95 rounded-none",onClick:k,disabled:u,children:[u&&(0,Ae.jsx)(zt,{className:"w-2.5 h-2.5 animate-spin mr-1"}),s("Manager.Common.Actions.Restore")]})}),(0,Ae.jsx)(Xa,{side:"top",className:"text-[10px]",children:s("Manager.Themes.Notices.ThemeRestorePrefix")})]})}),W&&W.length>0&&(0,Ae.jsxs)(Vn,{children:[(0,Ae.jsx)(qn,{asChild:!0,children:(0,Ae.jsx)(Te,{variant:"ghost",size:"icon",className:"h-7 w-7 rounded-none hover:bg-muted/50 transition-all",children:me?(0,Ae.jsx)(zt,{className:"w-4 h-4 animate-spin text-primary"}):(0,Ae.jsx)(vl,{className:"w-4 h-4 text-primary/80"})})}),(0,Ae.jsx)(Hn,{align:"end",className:"w-56 shadow-2xl backdrop-blur-md bg-background/95 border-border/40",children:W.map(_=>{let ee=w.some(ae=>ae.id===_.id),ie=w.some(ae=>ae.id===_.id&&ae.cloud?.hash!==_.hash);return(0,Ae.jsxs)(Xr,{onClick:()=>q(_),className:"text-[11px] py-1.5 flex items-center justify-between",children:[(0,Ae.jsxs)("div",{className:"flex items-center truncate",children:[(0,Ae.jsx)(Ca,{className:"w-3.5 h-3.5 mr-2 text-primary/60"}),(0,Ae.jsxs)("span",{className:"truncate",title:_.title,children:[_.title," ",(0,Ae.jsxs)("span",{className:"text-muted-foreground/60",children:["v",_.version]})]})]}),ee&&!ie?(0,Ae.jsx)(mt,{variant:"outline",className:"text-[8px] h-4 px-1 ml-2 bg-green-500/10 text-green-600 border-none shrink-0",children:"\u5DF2\u4E0B\u8F7D"}):ie?(0,Ae.jsx)(mt,{variant:"outline",className:"text-[8px] h-4 px-1 ml-2 bg-amber-500/10 text-amber-600 border-none shrink-0 animate-pulse",children:"\u6709\u66F4\u65B0"}):null]},_.id)})})]}),(0,Ae.jsxs)(Vn,{children:[(0,Ae.jsx)(qn,{asChild:!0,children:(0,Ae.jsx)(Te,{variant:"ghost",size:"icon",className:"h-7 w-7 rounded-none hover:bg-muted/50 transition-all",children:(0,Ae.jsx)(Qi,{className:"w-4 h-4 text-muted-foreground"})})}),(0,Ae.jsxs)(Hn,{align:"end",className:"w-48 shadow-2xl backdrop-blur-md bg-background/95 border-border/40",children:[g&&(0,Ae.jsxs)(Xr,{onClick:()=>{let _=$n(y);_&&(He.getState().setEditorTheme(_,e.name,b,y),t.view.activateView(Nb))},className:"text-[12px] py-2",children:[(0,Ae.jsx)(ro,{className:"w-3.5 h-3.5 mr-2.5 text-primary/70"}),(0,Ae.jsx)("span",{children:s("Manager.Common.Actions.Edit")})]}),(0,Ae.jsxs)(Xr,{onClick:V,disabled:i,className:"text-[12px] py-2",children:[(0,Ae.jsx)(Zl,{className:"w-3.5 h-3.5 mr-2.5 text-blue-500/70"}),(0,Ae.jsx)("span",{children:s("Manager.Themes.Notices.ThemeExtractPrefix")})]}),P&&(0,Ae.jsxs)(Xr,{onClick:()=>{J?.removeSource(P),a()},className:"text-[12px] py-2 text-destructive focus:text-destructive focus:bg-destructive/5",children:[(0,Ae.jsx)(bl,{className:"w-3.5 h-3.5 mr-2.5 opacity-70"}),(0,Ae.jsx)("span",{children:s("Manager.Common.Actions.Delete")})]}),(0,Ae.jsx)(Ml,{className:"bg-border/40"}),(0,Ae.jsxs)(Xr,{onClick:()=>kc(t,b),className:"text-[12px] py-2",children:[(0,Ae.jsx)(rs,{className:"w-3.5 h-3.5 mr-2.5 text-amber-500/70"}),(0,Ae.jsx)("span",{children:s("Manager.Common.Actions.OpenFolder")})]})]})]})]})]})})]})]}):(0,Ae.jsxs)("div",{className:"group relative border rounded-none bg-card/75 text-card-foreground shadow-xs hover:shadow-md hover:bg-muted/20 transition-all duration-300 px-4 py-1.5 w-full border-border/50 overflow-hidden backdrop-blur-md",children:[(0,Ae.jsx)("div",{className:oe("absolute left-0 top-0 bottom-0 w-[3px] transition-colors duration-300 z-10 bg-opacity-100",m)}),(0,Ae.jsxs)("div",{className:"flex items-center gap-5 overflow-hidden min-w-0 relative z-0",children:[(0,Ae.jsxs)("div",{className:oe("px-2.5 py-0.5 text-[9px] uppercase tracking-[0.1em] font-extrabold rounded-none bg-background border border-border shadow-xs flex items-center gap-1.5",m.replace(/bg-/g,"text-")),children:[(0,Ae.jsx)("span",{className:oe("w-1.5 h-1.5 rounded-full shadow-sm",m)}),h]}),(0,Ae.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 flex-1",children:[(0,Ae.jsx)("span",{className:"font-bold truncate text-[13.5px] text-foreground/90 group-hover:text-primary transition-colors duration-300 shrink-0 max-w-[40%]",children:e.name}),(0,Ae.jsx)("span",{className:"text-[10px] text-muted-foreground/50 shrink-0 font-bold bg-muted/20 px-1.5 py-0.5 rounded-none",children:e.manifest?`v${e.manifest.version}`:"v0.0.0"}),e.isActive&&(0,Ae.jsx)(mt,{variant:"secondary",className:"px-1.5 py-0 h-4 text-[8px] font-extrabold uppercase tracking-tighter rounded-none bg-primary/10 text-primary border-none shadow-xs shrink-0",children:s("Manager.Themes.Labels.ThemeActive")}),R&&(0,Ae.jsxs)("span",{className:"text-[10px] text-primary/80 font-bold bg-primary/5 border border-primary/10 px-1.5 py-0.5 rounded-none shrink-0",children:["v",R]})]}),(0,Ae.jsxs)("div",{className:"flex items-center gap-2.5 ml-auto shrink-0 pl-2",children:[w.length>0&&(0,Ae.jsxs)(lr,{value:P??void 0,onValueChange:_=>{J?.setActive(_,!0),a()},children:[(0,Ae.jsx)(ur,{className:"w-[125px] h-8 text-[11px] bg-muted/40 border-none shadow-none hover:bg-muted/60 transition-all rounded-none",size:"sm",children:(0,Ae.jsx)(cr,{placeholder:s("Manager.Common.Filters.All")})}),(0,Ae.jsx)(dr,{className:"backdrop-blur-md bg-background/95 border-border/40",children:w.map(_=>(0,Ae.jsx)(Rt,{value:_.id,className:"text-[11px]",children:_.title},_.id))})]}),(0,Ae.jsxs)("div",{className:"flex items-center gap-1.5",children:[g&&(0,Ae.jsx)(zn,{children:(0,Ae.jsxs)(Ka,{children:[(0,Ae.jsx)(Wa,{asChild:!0,children:(0,Ae.jsx)(Te,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-none hover:bg-primary/10 hover:text-primary transition-all",onClick:()=>{let _=$n(y);_&&(He.getState().setEditorTheme(_,e.name,b,y),t.view.activateView(Nb))},children:(0,Ae.jsx)(ro,{className:"w-3.5 h-3.5"})})}),(0,Ae.jsx)(Xa,{className:"text-[10px]",children:s("Manager.Common.Actions.Edit")})]})}),g&&!C&&(0,Ae.jsx)(zn,{children:(0,Ae.jsxs)(Ka,{children:[(0,Ae.jsx)(Wa,{asChild:!0,children:(0,Ae.jsxs)(Te,{variant:"default",size:"sm",className:"h-8 px-4 text-[11px] font-bold shadow-sm hover:shadow-md hover:translate-y-[-1px] active:scale-95 transition-all rounded-none",onClick:L,disabled:l,children:[l&&(0,Ae.jsx)(zt,{className:"w-3 h-3 animate-spin mr-1.5"}),s("Manager.Common.Actions.Apply")]})}),(0,Ae.jsx)(Xa,{className:"text-[10px]",children:s("Manager.Themes.Notices.ThemeApplyPrefix")})]})}),C&&(0,Ae.jsx)(zn,{children:(0,Ae.jsxs)(Ka,{children:[(0,Ae.jsx)(Wa,{asChild:!0,children:(0,Ae.jsxs)(Te,{variant:"outline",size:"sm",className:"h-8 px-4 text-[11px] font-bold border-border/50 hover:bg-secondary/20 transition-all active:scale-95 rounded-none",onClick:k,disabled:u,children:[u&&(0,Ae.jsx)(zt,{className:"w-3 h-3 animate-spin mr-1.5"}),s("Manager.Common.Actions.Restore")]})}),(0,Ae.jsx)(Xa,{className:"text-[10px]",children:s("Manager.Themes.Notices.ThemeRestorePrefix")})]})}),W&&W.length>0&&(0,Ae.jsxs)(Vn,{children:[(0,Ae.jsx)(qn,{asChild:!0,children:(0,Ae.jsx)(Te,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-none hover:bg-primary/10 hover:text-primary transition-all",children:me?(0,Ae.jsx)(zt,{className:"w-4 h-4 animate-spin"}):(0,Ae.jsx)(vl,{className:"w-4 h-4"})})}),(0,Ae.jsx)(Hn,{align:"end",className:"w-56 shadow-2xl backdrop-blur-md bg-background/95 border-border/40",children:W.map(_=>{let ee=w.some(ae=>ae.id===_.id),ie=w.some(ae=>ae.id===_.id&&ae.cloud?.hash!==_.hash);return(0,Ae.jsxs)(Xr,{onClick:()=>q(_),className:"text-[12px] py-2 flex items-center justify-between",children:[(0,Ae.jsxs)("div",{className:"flex items-center truncate",children:[(0,Ae.jsx)(Ca,{className:"w-4 h-4 mr-2.5 text-primary/60"}),(0,Ae.jsxs)("span",{className:"truncate",title:_.title,children:[_.title," ",(0,Ae.jsxs)("span",{className:"text-muted-foreground/50 ml-1",children:["v",_.version]})]})]}),ee&&!ie?(0,Ae.jsx)(mt,{variant:"outline",className:"text-[9px] h-5 px-1.5 ml-2 bg-green-500/10 text-green-600 border-none shrink-0",children:"\u5DF2\u4E0B\u8F7D"}):ie?(0,Ae.jsx)(mt,{variant:"outline",className:"text-[9px] h-5 px-1.5 ml-2 bg-amber-500/10 text-amber-600 border-none shrink-0 animate-pulse",children:"\u6709\u66F4\u65B0"}):null]},_.id)})})]}),(0,Ae.jsxs)(Vn,{children:[(0,Ae.jsx)(qn,{asChild:!0,children:(0,Ae.jsx)(Te,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-none hover:bg-muted/50 transition-all",children:(0,Ae.jsx)(Qi,{className:"w-4 h-4 text-muted-foreground"})})}),(0,Ae.jsxs)(Hn,{align:"end",className:"w-48 shadow-2xl backdrop-blur-md bg-background/95 border-border/40",children:[(0,Ae.jsxs)(Xr,{onClick:V,disabled:i,className:"text-[12px] py-2",children:[(0,Ae.jsx)(Zl,{className:"w-3.5 h-3.5 mr-2.5 text-blue-500/70"}),(0,Ae.jsx)("span",{children:s("Manager.Themes.Notices.ThemeExtractPrefix")})]}),P&&(0,Ae.jsxs)(Xr,{onClick:()=>{J?.removeSource(P),a()},className:"text-[12px] py-2 text-destructive focus:text-destructive focus:bg-destructive/5",children:[(0,Ae.jsx)(bl,{className:"w-3.5 h-3.5 mr-2.5 opacity-70"}),(0,Ae.jsx)("span",{children:s("Manager.Common.Actions.Delete")})]}),(0,Ae.jsx)(Ml,{className:"bg-border/40"}),(0,Ae.jsxs)(Xr,{onClick:()=>kc(t,b),className:"text-[12px] py-2",children:[(0,Ae.jsx)(rs,{className:"w-3.5 h-3.5 mr-2.5 text-amber-500/70"}),(0,Ae.jsx)("span",{children:s("Manager.Common.Actions.OpenFolder")})]})]})]}),(0,Ae.jsx)(xd,{open:f,onOpenChange:p,children:(0,Ae.jsxs)(bd,{className:"sm:max-w-[425px] rounded-none border-border/60",children:[(0,Ae.jsxs)(vd,{children:[(0,Ae.jsxs)(Sd,{className:"flex items-center gap-2 text-amber-500",children:[(0,Ae.jsx)("span",{className:"text-xl",children:"\u26A0\uFE0F"}),s("Manager.Themes.Dialogs.EmptyTranslationTitle")]}),(0,Ae.jsx)(Px,{className:"pt-4 leading-relaxed text-foreground/80",children:s("Manager.Themes.Dialogs.EmptyTranslationDesc")})]}),(0,Ae.jsx)(Ch,{className:"mt-6 flex justify-center",children:(0,Ae.jsx)(Te,{variant:"secondary",onClick:()=>p(!1),className:"w-full rounded-none h-10 bg-amber-500/10 hover:bg-amber-500/20 text-amber-600 dark:text-amber-400 border-amber-500/20",children:s("Common.Actions.Confirm")})})]})})]})]})]})]})});var fa=N(ce()),Hne=({i18n:e})=>{let{t}=ze(),r=e.app,[a,n]=(0,ba.useState)(""),[s,i]=(0,ba.useState)("0"),[o,l]=(0,ba.useState)(e.settings.themeViewMode||"list"),c=(0,ba.useCallback)(q=>{l(q),e.settings.themeViewMode=q,e.saveSettings()},[e]),[u,d]=(0,ba.useState)([]),[f,p]=(0,ba.useState)(0),[m,h]=(0,ba.useState)("all"),[x,g]=(0,ba.useState)([]);(0,ba.useEffect)(()=>{let q=e.settings.defaultCloudRepo;if(!q){g([]);return}let V=q.split("/");if(V.length!==2)return;let[L,k]=V,_=!0;return e.api.github.getFileContentWithFallback(L,k,"metadata.json").then(ee=>{_&&ee.state&&Array.isArray(ee.data)&&g(ee.data)}).catch(ee=>{}),()=>{_=!1}},[e.settings.defaultCloudRepo,e]);let y=He(q=>q.sourceUpdateTick),b=(0,ba.useMemo)(()=>[{key:"0",label:t("Common.Data.SortAsc")},{key:"1",label:t("Common.Data.SortDesc")}],[t]),S=(0,ba.useMemo)(()=>[{key:"all",label:t("Manager.Common.Filters.All")},{key:"toExtract",label:t("Manager.Themes.Filters.ToExtract")},{key:"untranslated",label:t("Manager.Themes.Filters.Untranslated")},{key:"translated",label:t("Manager.Themes.Filters.Translated")},{key:"unapplied",label:t("Manager.Themes.Filters.Unapplied")},{key:"applied",label:t("Manager.Themes.Filters.Applied")}],[t]);(0,ba.useEffect)(()=>{(()=>{try{let V=ag.normalize(r.vault.adapter.getBasePath()),L=ag.join(V,".obsidian","themes");if(!Gp.existsSync(L)){d([]);return}let k=Gp.readdirSync(L,{withFileTypes:!0}),_=[],ee=r.customCss?.theme||"";for(let ie of k){if(!ie.isDirectory())continue;let ae=ag.join(L,ie.name),ge=ag.join(ae,"manifest.json"),ue=null;if(Gp.existsSync(ge))try{ue=Gp.readJsonSync(ge)}catch{}_.push({name:ie.name,manifest:ue,dir:ae,isActive:ie.name===ee})}d(_)}catch{d([])}})()},[r,f]);let w=(0,ba.useCallback)(q=>q.dict?q.dict.some(V=>V.target&&V.target!==V.source):!1,[]),P=(0,ba.useMemo)(()=>{let q={};for(let V of u){let L=V.dir,k=ag.join(L,"theme.css"),_=e.sourceManager,ee=_?.getSourcesForPlugin(V.name)||[],ie=_?.getActiveSourceId(V.name),ae=ie?_?.getSourceFilePath(ie):"",ge=ae?Gp.existsSync(ae):!1,ue=e.stateManager.getThemeState(V.name),$=!1,A="",K="",he="";if(ge&&ae)try{let Ve=$n(ae);$=w(Ve),A=Ve.metadata.version,K=Ve.metadata.supportedVersions,he=Ve.metadata.description}catch{}let H="bg-muted-foreground",xe=t("Manager.Themes.Status.ToExtract"),Pe=t("Manager.Plugins.Hints.NoTransDesc"),Ie=!!(ue&&ue.isApplied);Ie?(H="bg-green-500 dark:bg-green-600",xe=t("Manager.Themes.Status.Applied")):$?(H="bg-blue-500 dark:bg-blue-600",xe=t("Manager.Themes.Status.Unapplied")):ge?(H="bg-amber-500 dark:bg-amber-600",xe=t("Manager.Themes.Status.Untranslated")):(H="bg-muted-foreground",xe=t("Manager.Themes.Status.ToExtract")),Pe=V.manifest?`v${V.manifest.version}`:"",q[V.name]={statusColor:H,statusText:xe,statusDesc:Pe,hasTranslation:ge,translationPath:ae||"",themeDir:L,themeCssPath:k,sources:ee,activeSourceId:ie,isApplied:Ie,isTranslated:$,translationVersion:A,description:he,supportedVersion:K,cloudEntries:x.filter(Ve=>Ve.plugin===V.name&&Ve.type==="theme")}}return q},[u,e,f,y,t,w,x]),C=(0,ba.useMemo)(()=>{let q=[...u];return a&&(q=q.filter(V=>V.name.toLowerCase().includes(a.toLowerCase()))),m!=="all"&&(q=q.filter(V=>{let L=P[V.name];if(!L)return!1;switch(m){case"applied":return L.isApplied;case"unapplied":return L.isTranslated&&!L.isApplied;case"translated":return L.isTranslated;case"untranslated":return L.hasTranslation&&!L.isTranslated;case"toExtract":return!L.hasTranslation;default:return!0}})),s==="0"?q.sort((V,L)=>V.name.localeCompare(L.name)):s==="1"&&q.sort((V,L)=>L.name.localeCompare(V.name)),q},[u,a,s,m,P]),I=(0,ba.useCallback)(()=>{p(q=>q+1)},[]),R=(0,ba.useRef)(null),[O,D]=(0,ba.useState)(0);(0,ba.useEffect)(()=>{if(!R.current)return;let q=new ResizeObserver(V=>{for(let L of V)D(L.contentRect.width)});return q.observe(R.current),()=>q.disconnect()},[]);let W=(0,ba.useMemo)(()=>{if(o==="list")return 1;let q=Math.floor((O+16)/(320+16));return Math.max(1,q)},[o,O]),J=Math.ceil(C.length/W),me=ni({count:J,getScrollElement:()=>R.current,estimateSize:(0,ba.useCallback)(()=>o==="list"?44+4:200+12,[o]),getItemKey:(0,ba.useCallback)(q=>`${o}-${q}`,[o]),overscan:5}),Z=me.getVirtualItems();return(0,fa.jsxs)("div",{className:"flex flex-col h-full bg-background text-foreground overflow-hidden",children:[(0,fa.jsx)("div",{className:"flex flex-col gap-4 py-2 px-4 border-b shrink-0",children:(0,fa.jsxs)("div",{className:"flex gap-2",children:[(0,fa.jsxs)("div",{className:"relative flex-1",children:[(0,fa.jsx)(ra,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground/70"}),(0,fa.jsx)(Qe,{placeholder:t("Manager.Themes.Placeholders.SearchThemes"),value:a,onChange:q=>n(q.target.value),className:"pl-8 h-9 rounded-none border-muted-foreground/20 focus:ring-1 text-[13px] bg-muted/10 shadow-sm transition-colors hover:bg-muted/20"})]}),(0,fa.jsxs)("div",{className:"flex items-center gap-1 border border-muted-foreground/20 rounded-none p-0.5 h-9 bg-muted/20 shadow-sm",children:[(0,fa.jsx)(Te,{variant:o==="list"?"secondary":"ghost",size:"icon",className:"h-8 w-8 rounded-none transition-all",onClick:()=>c("list"),children:(0,fa.jsx)(Km,{className:"h-4 w-4 text-muted-foreground/80"})}),(0,fa.jsx)(Te,{variant:o==="grid"?"secondary":"ghost",size:"icon",className:"h-8 w-8 rounded-none transition-all",onClick:()=>c("grid"),children:(0,fa.jsx)(eo,{className:"h-4 w-4 text-muted-foreground/80"})})]}),(0,fa.jsxs)(lr,{value:m,onValueChange:q=>h(q),children:[(0,fa.jsx)(ur,{className:"w-[120px] h-9 rounded-none border-muted-foreground/20 shadow-sm text-[13px]",size:"default",children:(0,fa.jsx)(cr,{placeholder:t("Manager.Common.Filters.All")})}),(0,fa.jsx)(dr,{children:S.map(q=>(0,fa.jsx)(Rt,{value:q.key,children:q.label},q.key))})]}),(0,fa.jsxs)(lr,{value:s,onValueChange:i,children:[(0,fa.jsx)(ur,{className:"w-[130px] h-9 rounded-none border-muted-foreground/20 shadow-sm text-[13px]",size:"default",children:(0,fa.jsx)(cr,{placeholder:t("Common.Data.SortAsc")})}),(0,fa.jsx)(dr,{children:b.map(q=>(0,fa.jsx)(Rt,{value:q.key,children:q.label},q.key))})]})]})}),(0,fa.jsx)(sr,{className:"flex-1 min-h-0",viewportRef:R,children:(0,fa.jsx)("div",{className:"py-2 px-4",children:(0,fa.jsxs)("div",{className:oe("gap-2 w-full overflow-hidden relative",o==="grid"?"grid grid-cols-[repeat(auto-fill,minmax(300px,1fr))]":"flex flex-col"),style:{height:`${me.getTotalSize()}px`},children:[Z.map(q=>{let V=q.index*W,L=C.slice(V,V+W);return(0,fa.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:`${q.size}px`,transform:`translateY(${q.start}px)`,display:"grid",gridTemplateColumns:`repeat(${W}, 1fr)`,gap:o==="list"?"0px":"12px",paddingBottom:o==="list"?"4px":"12px"},children:L.map(k=>(0,fa.jsx)(qne,{theme:k,i18n:e,data:P[k.name],refreshParent:I,viewMode:o},k.name))},q.key)}),C.length===0&&(0,fa.jsx)("div",{className:"text-center text-muted-foreground py-8 col-span-full",children:t("Manager.Themes.Status.NoThemes")})]})})})]})};var QF=N(Le());er();ty();var ng=Mc((e,t)=>({status:"idle",progress:{current:0,total:0},tasks:[],summary:{upToDate:0,success:0,error:0,applied:0},history:[],excludeList:[],trustedRepos:[],autoDiscovery:!0,autoApply:!1,autoMatchStrategy:"comprehensive",autoCheckInterval:24,autoScanMode:"incremental",filterStatus:"all",setStatus:r=>e({status:r}),setFilterStatus:r=>e({filterStatus:r}),setProgress:(r,a)=>e({progress:{current:r,total:a}}),initTasks:r=>e(a=>{let n={upToDate:r.filter(s=>s.status==="up_to_date").length,success:r.filter(s=>s.status==="success"||s.status==="discovered_new"||s.status==="discovered_update").length,error:r.filter(s=>s.status==="error").length,applied:a.summary.applied};return{tasks:r,summary:n,progress:{current:0,total:r.length}}}),updateTaskStatus:(r,a,n,s,i,o)=>e(l=>{let c=l.tasks.map(d=>d.id===r?{...d,status:a,message:n||d.message,sourceRepo:s||d.sourceRepo,targetVersion:i||d.targetVersion,scoreBreakdown:o||d.scoreBreakdown}:d),u={upToDate:c.filter(d=>d.status==="up_to_date").length,success:c.filter(d=>d.status==="success"||d.status==="discovered_new"||d.status==="discovered_update").length,error:c.filter(d=>d.status==="error").length,applied:l.summary.applied};return{tasks:c,summary:u}}),addTasks:r=>e(a=>{let n=[...a.tasks,...r],s={upToDate:n.filter(i=>i.status==="up_to_date").length,success:n.filter(i=>i.status==="success"||i.status==="discovered_new"||i.status==="discovered_update").length,error:n.filter(i=>i.status==="error").length,applied:a.summary.applied};return{tasks:n,summary:s}}),setSummary:r=>e(a=>({summary:{...a.summary,...r}})),addHistory:r=>e(a=>({history:[r,...a.history].slice(0,50)})),setHistory:r=>e({history:r}),toggleExclude:r=>e(a=>({excludeList:a.excludeList.includes(r)?a.excludeList.filter(s=>s!==r):[...a.excludeList,r]})),setTrustedRepos:r=>e({trustedRepos:r}),addTrustedRepo:r=>e(a=>({trustedRepos:a.trustedRepos.includes(r)?a.trustedRepos:[...a.trustedRepos,r]})),removeTrustedRepo:r=>e(a=>({trustedRepos:a.trustedRepos.filter(n=>n!==r)})),setConfigs:r=>e(r),hydrate:(r,a)=>e({trustedRepos:r.autoTrustedRepos||[],excludeList:r.autoExcludeList||[],autoApply:r.autoApply!==void 0?r.autoApply:!1,autoDiscovery:r.autoDiscovery!==void 0?r.autoDiscovery:!0,autoMatchStrategy:r.autoMatchStrategy||"comprehensive",autoCheckInterval:r.autoCheckInterval||24,autoScanMode:r.autoScanMode||"incremental",history:a?.history||[],summary:{...t().summary,applied:a?.appliedCount||0}}),clearAll:()=>e({tasks:[],summary:{upToDate:0,success:0,error:0,applied:t().summary.applied}})}));qt();var Ce=N(ce()),Gne=({i18n:e})=>{let{t}=ze(),{status:r,progress:a,tasks:n,summary:s,clearAll:i,trustedRepos:o,addTrustedRepo:l,removeTrustedRepo:c,autoDiscovery:u,autoApply:d,autoMatchStrategy:f,autoCheckInterval:p,autoScanMode:m,filterStatus:h,setFilterStatus:x,setConfigs:g}=ng(),[y,b]=(0,QF.useState)(""),[S,w]=(0,QF.useState)(!1),P=async()=>{r!=="running"&&await e.autoManager.runSmartAuto({isIncremental:m==="incremental"})},C=async()=>{if(!y.includes("/")||S)return;w(!0),await e.autoManager.verifyRepo(y)?(l(y),e.settings.autoTrustedRepos=Array.from(new Set([...e.settings.autoTrustedRepos,y])),await e.saveSettings(),b("")):e.notice.error(t("Manager.Common.Errors.InvalidRepo")),w(!1)},I=async D=>{c(D),e.settings.autoTrustedRepos=e.settings.autoTrustedRepos.filter(W=>W!==D),await e.saveSettings()},R=async D=>{let W=!e.settings[D];e.settings[D]=W,await e.saveSettings(),g({[D]:W})},O=n.length>0?Math.round(s.upToDate/n.length*100):0;return(0,Ce.jsxs)("div",{className:"flex flex-col h-full bg-background overflow-hidden text-foreground",children:[(0,Ce.jsxs)("div",{className:"flex items-center justify-between py-2 px-4 border-b shrink-0 bg-background shadow-xs",children:[(0,Ce.jsxs)("div",{className:"flex items-center gap-5",children:[(0,Ce.jsxs)("div",{className:"flex items-center gap-3 pr-5 border-r border-border/40 h-9",children:[(0,Ce.jsxs)("div",{className:"relative w-8 h-8 flex items-center justify-center shrink-0",children:[(0,Ce.jsxs)("svg",{className:"w-full h-full transform -rotate-90",children:[(0,Ce.jsx)("circle",{cx:"16",cy:"16",r:"13",stroke:"currentColor",strokeWidth:"2.5",fill:"transparent",className:"text-muted/10"}),(0,Ce.jsx)("circle",{cx:"16",cy:"16",r:"13",stroke:"currentColor",strokeWidth:"2.5",fill:"transparent",strokeDasharray:81.6,strokeDashoffset:81.6*(1-O/100),className:"text-emerald-500 transition-all duration-1000 ease-out",strokeLinecap:"butt"})]}),(0,Ce.jsxs)("span",{className:"absolute inset-0 flex items-center justify-center text-[9px] font-black tracking-tighter",children:[O,"%"]})]}),(0,Ce.jsxs)("div",{className:"flex flex-col justify-center",children:[(0,Ce.jsx)("span",{className:"text-[9px] font-bold text-muted-foreground/50 uppercase leading-none tracking-tight",children:t("Manager.Auto.Stats.Health")}),(0,Ce.jsx)("span",{className:"text-[12px] font-black leading-tight mt-0.5",children:t("Manager.Auto.Stats.VaultStatus")})]})]}),(0,Ce.jsxs)("div",{className:"flex items-center gap-2 h-9",children:[(0,Ce.jsx)(YF,{label:t("Manager.Common.Status.Labels.up_to_date"),value:s.upToDate,color:"text-blue-500",bg:"bg-blue-500/5",icon:(0,Ce.jsx)(ts,{className:"w-4 h-4"})}),(0,Ce.jsx)(YF,{label:t("Manager.Common.Status.Labels.discovered"),value:s.success,color:"text-amber-500",bg:"bg-amber-500/5",icon:(0,Ce.jsx)(Wr,{className:"w-4 h-4"})}),(0,Ce.jsx)(YF,{label:t("Manager.Common.Status.Labels.error"),value:s.error,color:"text-rose-500",bg:"bg-rose-500/5",icon:(0,Ce.jsx)(es,{className:"w-4 h-4"})})]})]}),(0,Ce.jsxs)("div",{className:"flex items-center gap-2 h-9",children:[(0,Ce.jsxs)(Te,{size:"sm",variant:"ghost",className:"h-9 px-3 rounded-none font-bold text-[13px] text-muted-foreground/80 hover:bg-muted/50 border border-transparent hover:border-border/40",onClick:i,disabled:r==="running",children:[(0,Ce.jsx)(zs,{className:"w-4 h-4 mr-2 opacity-60"}),t("Common.Actions.Clear")||"\u6E05\u7A7A\u7ED3\u679C"]}),(0,Ce.jsxs)(Te,{size:"sm",className:oe("h-9 px-5 rounded-none font-black text-[13px] transition-all shadow-sm",r==="running"?"bg-muted cursor-not-allowed border border-border/40":"bg-primary text-primary-foreground hover:bg-primary/90"),onClick:P,disabled:r==="running",children:[r==="running"?(0,Ce.jsx)(zt,{className:"w-4 h-4 animate-spin mr-2"}):(0,Ce.jsx)(Xm,{className:"w-4 h-4 mr-2 fill-current"}),t("Manager.Auto.Actions.StartAuto")]})]})]}),(0,Ce.jsxs)("div",{className:"flex-1 flex overflow-hidden",children:[(0,Ce.jsxs)("div",{className:"flex-1 flex flex-col overflow-hidden",children:[r==="running"&&a.total>0&&(0,Ce.jsxs)("div",{className:"bg-primary/5 px-4 py-1.5 border-b border-primary/20 flex items-center justify-between shrink-0",children:[(0,Ce.jsxs)("span",{className:"text-[10px] font-bold text-primary tracking-widest uppercase flex items-center gap-2",children:[(0,Ce.jsx)(Yl,{className:"w-3 h-3 animate-pulse"}),t("Manager.Auto.Status.Analyzing")]}),(0,Ce.jsxs)("div",{className:"flex items-center gap-3 w-1/3",children:[(0,Ce.jsx)("div",{className:"flex-1 h-1 bg-muted rounded-full overflow-hidden",children:(0,Ce.jsx)("div",{className:"h-full bg-primary transition-all duration-300",style:{width:`${Math.round(a.current/a.total*100)}%`}})}),(0,Ce.jsxs)("span",{className:"text-[10px] font-mono text-muted-foreground/60",children:[a.current,"/",a.total]})]})]}),(0,Ce.jsx)("div",{className:"flex-1 overflow-y-auto px-4 py-2 custom-scrollbar bg-background",children:n.length===0?(0,Ce.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-muted-foreground/30 py-24",children:[(0,Ce.jsx)(bS,{className:"w-12 h-12 mb-4 opacity-20"}),(0,Ce.jsx)("p",{className:"text-[12px] font-bold uppercase tracking-[0.2em]",children:t("Manager.Auto.Status.NoLogs")})]}):(0,Ce.jsx)("div",{className:"flex flex-col gap-1 pb-10",children:[...n].filter(D=>h==="all"?D.status!=="pending":D.status===h).sort((D,W)=>{let J={processing:10,discovered_update:9,discovered_new:8,error:7,success:6,up_to_date:5};return(J[W.status]||0)-(J[D.status]||0)}).map(D=>(0,Ce.jsx)($Ye,{task:D,i18n:e},D.id))})})]}),(0,Ce.jsx)("div",{className:"w-72 border-l border-border/80 flex flex-col h-full bg-muted/10 shrink-0",children:(0,Ce.jsxs)("div",{className:"p-5 flex flex-col gap-8 h-full overflow-y-auto custom-scrollbar",children:[(0,Ce.jsxs)("section",{className:"space-y-4",children:[(0,Ce.jsxs)("h3",{className:"text-[10px] font-black text-muted-foreground/50 uppercase tracking-widest flex items-center gap-2",children:[(0,Ce.jsx)(Io,{className:"w-3 h-3"}),t("Manager.Auto.Filters.Title")]}),(0,Ce.jsx)("div",{className:"flex flex-col gap-1",children:["all","discovered_update","discovered_new","up_to_date","success","error"].map(D=>(0,Ce.jsxs)("button",{onClick:()=>x(D),className:oe("px-3 py-2 text-[12px] font-bold transition-all text-left border rounded-none flex justify-between items-center",h===D?"bg-background border-primary/40 text-primary shadow-sm":"bg-transparent border-transparent text-muted-foreground hover:bg-muted/50"),children:[(0,Ce.jsx)("span",{children:t(D==="all"?"Manager.Common.Filters.All":`Manager.Common.Status.Labels.${D}`)}),(0,Ce.jsxs)("span",{className:"opacity-40 font-mono text-[10px]",children:["(",n.filter(W=>D==="all"?W.status!=="pending":W.status===D).length,")"]})]},D))}),n.filter(D=>D.status.startsWith("discovered")).length>0&&(0,Ce.jsxs)(Te,{size:"sm",className:"w-full h-10 mt-2 rounded-none font-black text-[12px] bg-primary text-primary-foreground hover:bg-primary/90 shadow-lg shadow-primary/10 transition-all active:scale-95",onClick:async()=>{let D=n.filter(W=>W.status.startsWith("discovered")).map(W=>W.id);await e.autoManager.applyBatchDiscovered(D)},children:[(0,Ce.jsx)(so,{className:"w-4 h-4 mr-2 fill-current"}),t("Manager.Auto.Actions.OneClickReview")," (",n.filter(D=>D.status.startsWith("discovered")).length,")"]})]}),(0,Ce.jsxs)("section",{className:"space-y-3",children:[(0,Ce.jsxs)("h3",{className:"text-[10px] font-black text-muted-foreground/50 uppercase tracking-widest flex items-center gap-2",children:[(0,Ce.jsx)(uS,{className:"w-3 h-3"}),t("Manager.Auto.Scoping.Title")]}),(0,Ce.jsxs)("div",{className:"border border-border/40 p-0.5 bg-background shadow-xs flex gap-0.5",children:[(0,Ce.jsx)("button",{className:oe("flex-1 py-2 text-[10px] font-bold rounded-none transition-all",m==="incremental"?"bg-muted text-foreground shadow-sm":"hover:bg-muted/50 text-muted-foreground/70"),onClick:async()=>{e.settings.autoScanMode="incremental",await e.saveSettings(),g({autoScanMode:"incremental"})},children:t("Manager.Auto.Modes.Incremental")}),(0,Ce.jsx)("button",{className:oe("flex-1 py-2 text-[10px] font-bold rounded-none transition-all",m==="full"?"bg-muted text-foreground shadow-sm":"hover:bg-muted/50 text-muted-foreground/70"),onClick:async()=>{e.settings.autoScanMode="full",await e.saveSettings(),g({autoScanMode:"full"})},children:t("Manager.Auto.Modes.Full")})]})]}),(0,Ce.jsxs)("section",{className:"space-y-3",children:[(0,Ce.jsxs)("h3",{className:"text-[10px] font-black text-muted-foreground/50 uppercase tracking-widest flex items-center gap-2",children:[(0,Ce.jsx)(oS,{className:"w-3 h-3"}),t("Manager.Common.Status.Labels.MatchStrategy")]}),(0,Ce.jsxs)(lr,{value:f,onValueChange:async D=>{e.settings.autoMatchStrategy=D,await e.saveSettings(),g({autoMatchStrategy:D})},children:[(0,Ce.jsx)(ur,{className:"h-8 text-xs bg-background border-border/40 rounded-none px-3 shadow-xs",children:(0,Ce.jsx)(cr,{})}),(0,Ce.jsxs)(dr,{className:"rounded-none border-border/80 shadow-2xl",children:[(0,Ce.jsx)(Rt,{value:"comprehensive",className:"text-xs",children:t("Manager.Common.Status.Labels.MatchStrategies.comprehensive")}),(0,Ce.jsx)(Rt,{value:"version_first",className:"text-xs",children:t("Manager.Common.Status.Labels.MatchStrategies.version_first")}),(0,Ce.jsx)(Rt,{value:"popularity",className:"text-xs",children:t("Manager.Common.Status.Labels.MatchStrategies.popularity")}),(0,Ce.jsx)(Rt,{value:"latest_update",className:"text-xs",children:t("Manager.Common.Status.Labels.MatchStrategies.latest_update")})]})]})]}),(0,Ce.jsxs)("section",{className:"space-y-3",children:[(0,Ce.jsxs)("h3",{className:"text-[10px] font-black text-muted-foreground/50 uppercase tracking-widest flex items-center gap-2",children:[(0,Ce.jsx)(ko,{className:"w-3 h-3"}),t("Manager.Auto.QuickSettings.Title")]}),(0,Ce.jsxs)("div",{className:"space-y-1.5",children:[(0,Ce.jsx)($ne,{label:t("Manager.Auto.QuickSettings.DiscoveryNotice"),active:u,onToggle:()=>R("autoDiscovery")}),(0,Ce.jsx)($ne,{label:t("Manager.Auto.QuickSettings.AutoApply"),active:d,onToggle:()=>R("autoApply")})]})]}),(0,Ce.jsxs)("section",{className:"space-y-3",children:[(0,Ce.jsxs)("h3",{className:"text-[10px] font-black text-muted-foreground/50 uppercase tracking-widest flex items-center gap-2",children:[(0,Ce.jsx)(Yl,{className:"w-3 h-3"}),t("Manager.Auto.QuickSettings.CheckInterval")]}),(0,Ce.jsx)("div",{className:"px-3 py-2 bg-background border border-border/40 shadow-xs",children:(0,Ce.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,Ce.jsx)(Qe,{type:"number",value:p,className:"h-7 text-[12px] font-mono bg-transparent border-none p-0 focus-visible:ring-0 w-16",onChange:async D=>{let W=parseInt(D.target.value)||0;e.settings.autoCheckInterval=W,await e.saveSettings(),g({autoCheckInterval:W})}}),(0,Ce.jsx)("span",{className:"text-[9px] font-black text-muted-foreground/50",children:t("Manager.Auto.QuickSettings.Hours")})]})})]}),(0,Ce.jsxs)("section",{className:"space-y-3 border-t pt-6",children:[(0,Ce.jsxs)("h3",{className:"text-[10px] font-black text-muted-foreground/50 uppercase tracking-widest flex items-center gap-2",children:[(0,Ce.jsx)(Ea,{className:"w-3 h-3"}),t("Manager.Auto.Repos.Title")]}),(0,Ce.jsxs)("div",{className:"flex gap-1 mb-3",children:[(0,Ce.jsx)(Qe,{placeholder:"owner/repo",value:y,onChange:D=>b(D.target.value),className:"h-8 text-xs font-mono bg-background border-border/40 rounded-none shadow-xs",disabled:S}),(0,Ce.jsx)(Te,{size:"icon",variant:"outline",className:"h-8 w-8 shrink-0 rounded-none border-border/40 bg-background hover:bg-muted",onClick:C,disabled:S,children:S?(0,Ce.jsx)(zt,{className:"w-3 h-3 animate-spin"}):(0,Ce.jsx)(as,{className:"w-3 h-3"})})]}),(0,Ce.jsx)("div",{className:"space-y-1 max-h-60 overflow-y-auto custom-scrollbar",children:o.map(D=>(0,Ce.jsxs)("div",{className:"flex items-center justify-between group p-2 bg-muted/20 border border-transparent hover:border-border/40 text-[10px] font-mono text-muted-foreground rounded-none",children:[(0,Ce.jsx)("span",{className:"truncate",children:D}),(0,Ce.jsx)("button",{onClick:()=>I(D),className:"opacity-0 group-hover:opacity-100 hover:text-rose-500 transition-opacity",children:(0,Ce.jsx)(Ha,{className:"w-3 h-3"})})]},D))})]})]})})]})]})},YF=({label:e,value:t,color:r,bg:a,icon:n})=>(0,Ce.jsxs)("div",{className:oe("flex items-center gap-2 px-2.5 py-1 border border-border/20 rounded-none h-9 bg-muted/10 shadow-xs transition-colors hover:bg-muted/20",r),children:[(0,Ce.jsx)("div",{className:oe("p-1 rounded-none",a),children:n}),(0,Ce.jsxs)("div",{className:"flex items-center gap-1.5 flex-nowrap",children:[(0,Ce.jsx)("span",{className:"text-[11.5px] font-black tabular-nums",children:t}),(0,Ce.jsx)("span",{className:"text-[10px] font-bold text-muted-foreground opacity-60 whitespace-nowrap",children:e})]})]}),$ne=({label:e,active:t,onToggle:r})=>(0,Ce.jsxs)("div",{className:oe("flex items-center justify-between px-3 py-2 border transition-all cursor-pointer group",t?"bg-background border-border shadow-xs":"bg-transparent border-transparent opacity-60 hover:opacity-100"),onClick:r,children:[(0,Ce.jsx)("span",{className:"text-[12px] font-bold tracking-tight",children:e}),(0,Ce.jsx)("div",{className:oe("w-7 h-4 rounded-full relative transition-colors bg-muted/50"),children:(0,Ce.jsx)("div",{className:oe("absolute top-0.5 w-3 h-3 rounded-full transition-all shadow-sm",t?"bg-primary left-3.5":"bg-muted-foreground/40 left-0.5")})})]}),$Ye=({task:e,i18n:t})=>{let{t:r}=ze(),a=e.status==="discovered_new"||e.status==="discovered_update",n="bg-muted-foreground/30",s="text-muted-foreground";return e.status==="success"?(n="bg-emerald-500",s="text-emerald-600"):e.status==="error"?(n="bg-rose-500",s="text-rose-600"):e.status==="processing"?(n="bg-primary",s="text-primary"):a?(n="bg-amber-500",s="text-amber-600"):e.status==="up_to_date"&&(n="bg-blue-500",s="text-blue-600"),(0,Ce.jsxs)("div",{className:oe("group relative border rounded-none bg-card/75 text-card-foreground shadow-xs hover:shadow-md hover:bg-muted/10 transition-all duration-300 px-4 py-1.5 w-full border-border/50 flex items-center gap-4 overflow-hidden backdrop-blur-md h-[46px]",e.status==="processing"&&"bg-primary/[0.02]"),children:[(0,Ce.jsx)("div",{className:oe("absolute left-0 top-0 bottom-0 w-[3px]",n,e.status==="processing"&&"animate-pulse")}),(0,Ce.jsx)("div",{className:"flex items-center justify-center shrink-0 w-8",children:(0,Ce.jsx)("div",{className:oe("w-7 h-7 rounded-none flex items-center justify-center border border-border/40 bg-background shadow-xs",e.type==="theme"?"text-indigo-500":"text-amber-500"),children:e.type==="theme"?(0,Ce.jsx)(Oa,{className:"w-3.5 h-3.5"}):(0,Ce.jsx)(wi,{className:"w-3.5 h-3.5"})})}),(0,Ce.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 flex-1",children:[(0,Ce.jsx)("h4",{className:"text-[13.5px] font-bold truncate tracking-tight text-foreground/90 group-hover:text-primary transition-colors shrink-0 max-w-[40%]",children:e.name||e.id}),e.targetVersion&&(0,Ce.jsxs)("span",{className:"text-[10px] text-primary/80 font-bold bg-primary/5 border border-primary/10 px-1.5 py-0.5 rounded-none shrink-0",children:["v",e.targetVersion]}),e.sourceRepo&&(0,Ce.jsxs)("span",{className:"text-[10px] text-muted-foreground/50 truncate font-medium flex items-center gap-1 opacity-60",children:[(0,Ce.jsx)(Ea,{className:"w-3 h-3"}),e.sourceRepo.split("/").pop()]}),(0,Ce.jsxs)("div",{className:oe("ml-auto px-2.5 py-0.5 text-[9px] uppercase tracking-[0.1em] font-extrabold rounded-none bg-background border border-border shadow-xs flex items-center gap-1.5 shrink-0 justify-center min-w-[75px]",s),children:[(0,Ce.jsx)("span",{className:oe("w-1.5 h-1.5 rounded-full shadow-sm",n,e.status==="processing"?"animate-pulse":"")}),r(`Manager.Common.Status.Labels.${e.status}`)]})]}),(0,Ce.jsx)("div",{className:"flex items-center justify-center shrink-0 w-20",children:e.scoreBreakdown&&(0,Ce.jsx)(zn,{children:(0,Ce.jsxs)(Ka,{delayDuration:300,children:[(0,Ce.jsx)(Wa,{asChild:!0,children:(0,Ce.jsxs)("div",{className:"flex items-center gap-2 cursor-help py-1 px-2 border border-transparent hover:border-border/40 group/score transition-all",children:[(0,Ce.jsx)("span",{className:"text-[11px] font-black text-amber-500 tabular-nums",children:e.scoreBreakdown.total}),(0,Ce.jsx)("div",{className:"flex gap-0.5",children:[1,2,3].map(i=>(0,Ce.jsx)("div",{className:oe("w-1.5 h-1.5 rounded-none",i<=Math.round(e.scoreBreakdown.total/33)?"bg-amber-500":"bg-muted")},i))})]})}),(0,Ce.jsx)(Xa,{side:"top",className:"p-0 bg-background border border-border shadow-2xl rounded-none z-[999]",children:(0,Ce.jsxs)("div",{className:"p-3 space-y-2.5 min-w-[160px]",children:[(0,Ce.jsx)("div",{className:"text-[10px] font-black text-muted-foreground/40 uppercase tracking-[0.2em] mb-1",children:r("Manager.Auto.Discovery.ScoreBreakdown.Title")}),(0,Ce.jsx)(JF,{label:r("Manager.Auto.Discovery.ScoreBreakdown.Version"),score:e.scoreBreakdown.version,max:50,icon:(0,Ce.jsx)(hS,{className:"w-3 h-3"})}),(0,Ce.jsx)(JF,{label:r("Manager.Auto.Discovery.ScoreBreakdown.Popularity"),score:e.scoreBreakdown.popularity,max:30,icon:(0,Ce.jsx)(Yl,{className:"w-3 h-3"})}),(0,Ce.jsx)(JF,{label:r("Manager.Auto.Discovery.ScoreBreakdown.Freshness"),score:e.scoreBreakdown.freshness,max:20,icon:(0,Ce.jsx)(Wr,{className:"w-3 h-3"})})]})})]})})}),(0,Ce.jsx)("div",{className:"shrink-0 flex items-center justify-end w-32",children:a?(0,Ce.jsx)(Te,{variant:"outline",size:"sm",className:"h-8 px-4 text-[11px] font-black bg-primary text-primary-foreground border-none rounded-none hover:bg-primary/90 transition-all active:scale-95",onClick:()=>t.autoManager.retryTask(e.id,e.type),children:r("Manager.Auto.Discovery.ReviewAction")}):(0,Ce.jsx)("div",{className:"w-8 h-8 rounded-full border-2 border-border/10 flex items-center justify-center opacity-20",children:(0,Ce.jsx)(ts,{className:"w-4 h-4"})})}),(0,Ce.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 bottom-0.5 overflow-hidden max-w-[200px]",children:(0,Ce.jsx)("span",{className:"text-[8px] text-muted-foreground/20 italic truncate block",children:e.message&&e.message!=="-"?e.message:""})})]})},JF=({label:e,score:t,max:r,icon:a})=>{let n=t||0;return(0,Ce.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,Ce.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ce.jsx)("span",{className:"text-muted-foreground/50",children:a}),(0,Ce.jsx)("span",{className:"text-foreground/70 font-bold text-[11px]",children:e})]}),(0,Ce.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ce.jsx)("div",{className:"w-10 h-1 bg-muted/40 rounded-none overflow-hidden",children:(0,Ce.jsx)("div",{className:"h-full bg-amber-500/40",style:{width:`${Math.min(n/r*100,100)}%`}})}),(0,Ce.jsx)("span",{className:"font-mono text-[11px] font-black min-w-[20px] text-right",children:n})]})]})};var sg=N(Le());er();qt();var gc=require("obsidian"),Kne=N(fs()),uI=N(require("zlib")),Ob=N(require("path"));Vt();var Je=N(ce()),Wne=({i18n:e})=>{let{t}=ze(),r=e.sourceManager,[a,n]=(0,sg.useState)(""),[s,i]=(0,sg.useState)(new Set),[o,l]=(0,sg.useState)("all"),[c,u]=(0,sg.useState)("all"),d=He(S=>S.sourceUpdateTick),f=(0,sg.useMemo)(()=>{let S=r.getAllSources();if(a){let P=a.toLowerCase();S=S.filter(C=>C.title.toLowerCase().includes(P)||C.plugin.toLowerCase().includes(P)||C.id.toLowerCase().includes(P))}o!=="all"&&(S=S.filter(P=>P.origin===o)),c!=="all"&&(S=S.filter(P=>P.type===c)),S=S.sort((P,C)=>(C.updatedAt||0)-(P.updatedAt||0));let w=Ob.normalize(e.app.vault.adapter.getBasePath());return S.map(P=>{let C=!1;return P.type==="plugin"?C=!!e.app.plugins.manifests[P.plugin]:C=Kne.existsSync(Ob.join(w,".obsidian","themes",P.plugin)),{...P,isInstalled:C}})},[e,a,o,c,d,e.app.plugins.manifests]),p=()=>{s.size===f.length?i(new Set):i(new Set(f.map(S=>S.id)))},m=S=>{let w=new Set(s);w.has(S)?w.delete(S):w.add(S),i(w)},h=()=>{let S=new Set(s),w=!1;f.forEach(P=>{!P.isInstalled&&!S.has(P.id)&&(S.add(P.id),w=!0)}),w&&i(S)},x=S=>S?new Date(S).toLocaleString():"-",g=async()=>{if(s.size!==0)try{let S={};for(let O of s){let D=r.getSource(O);if(D){let W=r.readSourceFile(O);S[O]={meta:D,content:W}}}let w=JSON.stringify(S),P=uI.gzipSync(Buffer.from(w,"utf-8")),C=new Blob([new Uint8Array(P)],{type:"application/gzip"}),I=URL.createObjectURL(C),R=document.createElement("a");R.href=I,R.download=`i18n-translations-export-${Date.now()}.i18n.gz`,R.click(),URL.revokeObjectURL(I),new gc.Notice(t("Manager.Sources.Actions.ExportSuccess"))}catch{new gc.Notice(t("Manager.Common.Errors.Error"))}},y=()=>{let S=document.createElement("input");S.type="file",S.accept=".i18n.gz,.gz,.json",S.onchange=async w=>{let P=w.target.files[0];if(P)try{let C=new FileReader;C.onload=async I=>{try{let R=I.target?.result,O;P.name.endsWith(".gz")||P.name.endsWith(".i18n.gz")?O=uI.gunzipSync(Buffer.from(R)).toString("utf-8"):O=new TextDecoder().decode(R);let D=JSON.parse(O),W=0,J=0,me=0;if(D&&typeof D=="object")for(let Z in D){let q=D[Z];if(q.meta&&q.content){let V=r.getSource(q.meta.id);if(V)if(V.checksum===q.meta.checksum){me++;continue}else J++;else W++;r.saveSource(q.meta),r.saveSourceFile(q.meta.id,q.content)}}if(W>0||J>0){let Z="";W>0&&(Z+=`\u65B0\u589E ${W} `),J>0&&(Z+=`\u66F4\u65B0 ${J} `),me>0&&(Z+=`(\u8DF3\u8FC7 ${me} \u9879\u91CD\u590D)`),new gc.Notice(Z.trim()||t("Manager.Sources.Actions.ImportSuccess",{count:W+J})),He.getState().triggerSourceUpdate()}else me>0?new gc.Notice(`\u5168\u90E8 ${me} \u9879\u5DF2\u5B58\u5728\u4E14\u5185\u5BB9\u4E00\u81F4\uFF0C\u65E0\u9700\u5BFC\u5165`):new gc.Notice(t("Manager.Common.Errors.ErrorDesc"))}catch{new gc.Notice(t("Manager.Common.Errors.Error"))}},C.readAsArrayBuffer(P)}catch{new gc.Notice(t("Manager.Common.Errors.Error"))}},S.click()},b=async()=>{if(!(s.size===0||!window.confirm(t("Manager.Sources.Actions.DeleteConfirm",{count:s.size}))))try{for(let w of s)r.removeSource(w);i(new Set),new gc.Notice(t("Common.Notices.DeleteSuccess")),He.getState().triggerSourceUpdate()}catch{new gc.Notice(t("Manager.Common.Errors.Error"))}};return(0,Je.jsxs)("div",{className:"flex flex-col flex-1 min-h-0 bg-background",children:[(0,Je.jsx)("div",{className:"flex flex-col gap-4 py-2 px-4 border-b shrink-0",children:(0,Je.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,Je.jsxs)("div",{className:"relative flex-1 min-w-[200px]",children:[(0,Je.jsx)(ra,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground/70"}),(0,Je.jsx)(Qe,{className:"pl-8 h-9 rounded-none border-muted-foreground/20 focus:ring-1 text-[13px] bg-muted/10 shadow-sm transition-colors hover:bg-muted/20",placeholder:t("Manager.Sources.Filters.SearchPlaceholder"),value:a,onChange:S=>n(S.target.value)})]}),(0,Je.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Je.jsxs)(Vn,{children:[(0,Je.jsx)(qn,{asChild:!0,children:(0,Je.jsxs)(Te,{variant:"outline",size:"sm",className:"h-9 shadow-sm gap-1.5 rounded-none border-muted-foreground/20 text-[13px] hover:bg-muted/30",children:[(0,Je.jsx)(Io,{className:"w-3.5 h-3.5 text-muted-foreground/70"}),t(o==="all"?"Manager.Common.Filters.All":o==="local"?"Manager.Sources.Filters.OriginLocal":"Manager.Sources.Filters.OriginCloud")]})}),(0,Je.jsxs)(Hn,{align:"end",className:"w-40 rounded-none",children:[(0,Je.jsx)(Xr,{onClick:()=>l("all"),children:t("Manager.Common.Filters.All")}),(0,Je.jsx)(Xr,{onClick:()=>l("local"),children:t("Manager.Sources.Filters.OriginLocal")}),(0,Je.jsx)(Xr,{onClick:()=>l("cloud"),children:t("Manager.Sources.Filters.OriginCloud")})]})]}),(0,Je.jsxs)(Vn,{children:[(0,Je.jsx)(qn,{asChild:!0,children:(0,Je.jsxs)(Te,{variant:"outline",size:"sm",className:"h-9 shadow-sm gap-1.5 rounded-none border-muted-foreground/20 text-[13px] hover:bg-muted/30",children:[(0,Je.jsx)(Io,{className:"w-3.5 h-3.5 text-muted-foreground/70"}),t(c==="all"?"Manager.Common.Filters.All":c==="plugin"?"Common.Labels.Plugins":"Common.Labels.Themes")]})}),(0,Je.jsxs)(Hn,{align:"end",className:"w-40 rounded-none",children:[(0,Je.jsx)(Xr,{onClick:()=>u("all"),children:t("Manager.Common.Filters.All")}),(0,Je.jsx)(Xr,{onClick:()=>u("plugin"),children:t("Common.Labels.Plugins")}),(0,Je.jsx)(Xr,{onClick:()=>u("theme"),children:t("Common.Labels.Themes")})]})]})]}),(0,Je.jsxs)("div",{className:"flex items-center ml-auto gap-3",children:[(0,Je.jsxs)("div",{className:"flex items-center rounded-none border border-muted-foreground/20 bg-background shadow-sm h-9",children:[(0,Je.jsxs)(Te,{variant:"ghost",size:"sm",onClick:p,className:"gap-1.5 h-9 rounded-none px-3 border-r border-muted-foreground/20 hover:bg-muted/50",children:[(0,Je.jsx)($f,{className:oe("w-4 h-4",f.length>0&&s.size===f.length?"text-primary":"text-muted-foreground/70")}),(0,Je.jsx)("span",{className:oe("hidden lg:inline text-[13px]",f.length>0&&s.size===f.length?"text-primary":"text-muted-foreground/90"),children:t("Manager.Sources.Actions.SelectAll")})]}),(0,Je.jsxs)(Te,{variant:"ghost",size:"sm",onClick:h,className:"gap-1.5 h-9 rounded-none px-3 hover:bg-destructive/10 hover:text-destructive group",title:t("Manager.Sources.Actions.SelectUninstalled"),children:[(0,Je.jsx)(es,{className:"w-4 h-4 text-destructive/80 group-hover:text-destructive"}),(0,Je.jsx)("span",{className:"hidden lg:inline text-[13px] text-destructive/90 group-hover:text-destructive",children:t("Manager.Sources.Actions.SelectUninstalled")})]})]}),(0,Je.jsxs)("div",{className:"flex items-center rounded-none border border-muted-foreground/20 bg-background shadow-sm h-9",children:[(0,Je.jsxs)(Te,{variant:"ghost",size:"sm",onClick:y,className:"gap-1.5 h-9 rounded-none px-3 border-r border-muted-foreground/20 hover:bg-primary/5 hover:text-primary group",children:[(0,Je.jsx)(Tl,{className:"w-4 h-4 text-muted-foreground/70 group-hover:text-primary"}),(0,Je.jsx)("span",{className:"text-[13px] text-muted-foreground/90 hidden lg:inline group-hover:text-primary",children:t("Manager.Sources.Actions.Import")})]}),(0,Je.jsxs)(Te,{variant:"ghost",size:"sm",onClick:g,disabled:s.size===0,className:"gap-1.5 h-9 rounded-none px-3 hover:bg-primary/5 hover:text-primary group",children:[(0,Je.jsx)(js,{className:"w-4 h-4 text-muted-foreground/70 group-hover:text-primary"}),(0,Je.jsx)("span",{className:"text-[13px] text-muted-foreground/90 hidden lg:inline group-hover:text-primary",children:t("Manager.Sources.Actions.Export")})]})]}),(0,Je.jsxs)(Te,{variant:"destructive",size:"sm",onClick:b,disabled:s.size===0,className:"gap-1.5 h-9 rounded-none shadow-sm px-3 text-[13px]",children:[(0,Je.jsx)(Ha,{className:"w-4 h-4"}),(0,Je.jsx)("span",{className:"hidden lg:inline",children:t("Manager.Sources.Actions.BatchDelete")})]})]})]})}),(0,Je.jsx)(sr,{className:"flex-1 min-h-0 bg-background",children:(0,Je.jsx)("div",{className:"px-4 py-2 h-full",children:(0,Je.jsx)("div",{className:"flex flex-col pb-6",children:f.length===0?(0,Je.jsxs)("div",{className:"flex flex-col items-center justify-center text-muted-foreground py-24 border border-dashed border-border/50 bg-muted/5 my-4 rounded-none",children:[(0,Je.jsx)(Zu,{className:"w-10 h-10 opacity-30 text-primary mb-4"}),(0,Je.jsx)("p",{className:"text-sm font-bold text-foreground/70 mb-1",children:t("Manager.Plugins.Status.NoTrans")}),(0,Je.jsx)("p",{className:"text-xs opacity-60",children:t("Manager.Common.Placeholders.SearchPlaceholder")})]}):f.map(S=>{let w=!S.isInstalled,P=S.origin==="cloud",C="bg-primary";w?C="bg-destructive":P?C="bg-indigo-500":C="bg-cyan-500";let I=w?S.type==="theme"?t("Manager.Sources.Status.ThemeNotInstalled"):t("Manager.Sources.Status.NotInstalled"):t(P?"Manager.Sources.Filters.OriginCloud":"Manager.Sources.Filters.OriginLocal");return(0,Je.jsxs)("div",{className:oe("group relative border rounded-none text-card-foreground shadow-xs hover:shadow-md hover:bg-muted/10 transition-all duration-300 px-4 py-1.5 w-full overflow-hidden backdrop-blur-md mb-1",w&&"border-dashed border-destructive/50",s.has(S.id)?"bg-primary/[0.05] border-primary/40 ring-1 ring-primary/20":"bg-card/75 hover:bg-muted/20 border-border/50"),children:[(0,Je.jsx)("div",{className:oe("absolute left-0 top-0 bottom-0 w-[3px] transition-colors duration-300 z-10 bg-opacity-100",C,w&&"animate-pulse")}),(0,Je.jsxs)("div",{className:"flex items-center gap-4 overflow-hidden min-w-0 relative z-0",children:[(0,Je.jsx)("div",{className:"flex items-center justify-center shrink-0",children:(0,Je.jsx)(El,{className:oe("rounded-none transition-opacity",s.has(S.id)?"opacity-100":"opacity-30 group-hover:opacity-100"),checked:s.has(S.id),onCheckedChange:()=>m(S.id)})}),(0,Je.jsxs)("div",{className:oe("px-2.5 py-0.5 text-[9px] uppercase tracking-[0.1em] font-extrabold rounded-none bg-background border border-border shadow-xs flex items-center gap-1.5 shrink-0 justify-center",C.replace(/bg-/g,"text-")),children:[(0,Je.jsx)("span",{className:oe("w-1.5 h-1.5 rounded-full shadow-sm",C,w?"animate-pulse":"")}),I]}),(0,Je.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 flex-1",children:[(0,Je.jsx)("span",{className:"font-bold truncate text-[13.5px] text-foreground/90 group-hover:text-primary transition-colors duration-300 shrink-0 max-w-[50%]",title:S.title,children:S.title}),(0,Je.jsx)("span",{className:"text-[10px] text-muted-foreground/50 font-mono truncate bg-muted/20 px-1.5 py-0.5 rounded-none max-w-[30%] border border-border/30 relative",title:S.plugin,children:S.plugin}),S.type==="theme"?(0,Je.jsx)(mt,{variant:"secondary",className:"bg-orange-500/10 text-orange-600 hover:bg-orange-500/15 border border-orange-500/20 text-[9px] px-1.5 py-0 h-[18px] font-medium shrink-0 rounded-none",children:t("Common.Labels.Themes")}):(0,Je.jsx)(mt,{variant:"secondary",className:"bg-purple-500/10 text-purple-600 hover:bg-purple-500/15 border border-purple-500/20 text-[9px] px-1.5 py-0 h-[18px] font-medium shrink-0 rounded-none",children:t("Common.Labels.Plugins")})]}),(0,Je.jsxs)("div",{className:"hidden md:flex flex-col items-end justify-center px-4 shrink-0 min-w-[120px] tabular-nums",children:[(0,Je.jsx)("span",{className:"text-[11px] font-bold text-muted-foreground/80 group-hover:text-foreground/80 transition-colors",children:x(S.updatedAt).split(" ")[0]}),(0,Je.jsx)("span",{className:"text-[9px] text-muted-foreground/50",children:x(S.updatedAt).split(" ")[1]})]}),(0,Je.jsx)("div",{className:"shrink-0 flex items-center justify-end",children:(0,Je.jsxs)(Vn,{children:[(0,Je.jsx)(qn,{asChild:!0,children:(0,Je.jsx)(Te,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground/50 hover:text-foreground hover:bg-muted/50 rounded-none transition-all",children:(0,Je.jsx)(Qi,{className:"w-4 h-4"})})}),(0,Je.jsxs)(Hn,{align:"end",className:"w-[180px] rounded-none p-1 shadow-2xl backdrop-blur-md bg-background/95 border-border/40",children:[(0,Je.jsxs)(Xr,{className:"text-[12px] rounded-none cursor-pointer py-2",onClick:()=>{let R=r.getSourceFilePath(S.id),O=$n(R);He.getState().setEditorPluginTranslation(O),He.getState().setEditorPluginTranslationPath(R),e.view.activateView(jp)},children:[(0,Je.jsx)(ro,{className:"w-3.5 h-3.5 mr-2.5 text-primary/70"}),t("Manager.Common.Actions.Edit")]}),(0,Je.jsxs)(Xr,{className:"text-[12px] rounded-none cursor-pointer py-2",onClick:()=>{let R=r.getSourceFilePath(S.id);kc(e,Ob.dirname(R))},children:[(0,Je.jsx)(rs,{className:"w-3.5 h-3.5 mr-2.5 text-amber-500/70"}),t("Manager.Common.Actions.OpenFolder")]}),(0,Je.jsx)("div",{className:"h-px bg-border/40 my-1 mx-1"}),(0,Je.jsxs)(Xr,{className:"text-[12px] text-destructive focus:text-destructive focus:bg-destructive/10 rounded-none cursor-pointer py-2",onClick:()=>{r.removeSource(S.id),new gc.Notice(t("Common.Notices.DeleteSuccess")),He.getState().triggerSourceUpdate()},children:[(0,Je.jsx)(Ha,{className:"w-3.5 h-3.5 mr-2.5 opacity-70"}),t("Manager.Common.Actions.Delete")]})]})]})})]})]},S.id)})})})}),(0,Je.jsxs)("div",{className:"shrink-0 px-4 py-2 border-t bg-muted/30 flex items-center justify-between text-[10px] text-muted-foreground",children:[(0,Je.jsxs)("div",{className:"flex items-center gap-4",children:[(0,Je.jsxs)("span",{className:"flex items-center gap-1",children:[(0,Je.jsx)(Hf,{className:"w-3 h-3"}),t("Manager.Sources.Stats.Total"),": ",f.length]}),s.size>0&&(0,Je.jsxs)("span",{className:"text-primary font-medium",children:[t("Manager.Sources.Stats.Selected"),": ",s.size]})]}),(0,Je.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Je.jsxs)("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 text-emerald-600 border border-emerald-500/20",children:[t("Manager.Sources.Filters.OriginLocal"),": ",f.filter(S=>S.origin==="local").length]}),(0,Je.jsxs)("span",{className:"px-1.5 py-0.5 rounded bg-blue-500/10 text-blue-600 border border-blue-500/20",children:[t("Manager.Sources.Filters.OriginCloud"),": ",f.filter(S=>S.origin==="cloud").length]})]})]})]})};var zd=N(Le());er();qt();var dt=N(ce());function GYe(e){if(e.avatarUrl)return e.avatarUrl;if(e.githubUsername)return`https://github.com/${e.githubUsername}.png?size=80`}var Jne=({i18n:e})=>{let{t}=ze(),r=Se.use.communityStats(),a=Se.use.communityRegistry(),n=Se.use.communityLoaded(),s=Se.use.fetchCommunityRegistry(),i=Se.use.contributors(),o=Se.use.contributorsLoaded(),l=Se.use.fetchContributors();(0,zd.useEffect)(()=>{n||s(e),o||l(e)},[n,o,s,l,e]);let c=(0,zd.useMemo)(()=>{let p={};if(!a)return p;for(let m of a){let h=m.repoAddress?.split("/")[0];m.authorBadge&&h&&(p[h]=m.authorBadge)}return p},[a]),u=(0,zd.useMemo)(()=>{let p=r?.leaderboard?.topAuthors||[];if(p.length>0)return p;if(!r?.repos)return[];let m=new Map;return Object.values(r.repos).forEach(h=>{if(!m.has(h.authorName))m.set(h.authorName,{name:h.authorName,avatarUrl:h.avatarUrl,htmlUrl:h.authorHtmlUrl,totalPlugins:h.pluginCount,totalStars:h.stars,repoCount:1,languages:h.languages||[],activityScore:h.activityScore,lastActiveAt:h.lastPushedAt});else{let x=m.get(h.authorName);x.totalPlugins+=h.pluginCount,x.totalStars+=h.stars,x.repoCount+=1}}),Array.from(m.values()).sort((h,x)=>x.totalStars-h.totalStars)},[r]),d=(0,zd.useMemo)(()=>[{id:"sponsor",icon:(0,dt.jsx)(Gy,{className:"w-4 h-4"}),colorFrom:"from-fuchsia-500/15",colorTo:"to-purple-500/10",ringColor:"ring-fuchsia-500/30",badgeColor:"bg-fuchsia-500/15 text-fuchsia-600"},{id:"translation",icon:(0,dt.jsx)(Ea,{className:"w-4 h-4"}),colorFrom:"from-blue-500/10",colorTo:"to-cyan-500/5",ringColor:"ring-blue-500/20",badgeColor:"bg-blue-500/10 text-blue-600"},{id:"code",icon:(0,dt.jsx)(Ao,{className:"w-4 h-4"}),colorFrom:"from-emerald-500/10",colorTo:"to-green-500/5",ringColor:"ring-emerald-500/20",badgeColor:"bg-emerald-500/10 text-emerald-600"},{id:"video",icon:(0,dt.jsx)(Zm,{className:"w-4 h-4"}),colorFrom:"from-rose-500/10",colorTo:"to-pink-500/5",ringColor:"ring-rose-500/20",badgeColor:"bg-rose-500/10 text-rose-600"},{id:"testing",icon:(0,dt.jsx)(Jm,{className:"w-4 h-4"}),colorFrom:"from-amber-500/10",colorTo:"to-yellow-500/5",ringColor:"ring-amber-500/20",badgeColor:"bg-amber-500/10 text-amber-600"},{id:"suggestion",icon:(0,dt.jsx)(Hc,{className:"w-4 h-4"}),colorFrom:"from-violet-500/10",colorTo:"to-purple-500/5",ringColor:"ring-violet-500/20",badgeColor:"bg-violet-500/10 text-violet-600"}],[]),f=(0,zd.useMemo)(()=>{let p={sponsor:[],code:[],video:[],testing:[],suggestion:[]};for(let m of i)p[m.category]&&p[m.category].push(m);return p},[i]);return n?(0,dt.jsx)(sr,{className:"flex-1 min-h-0 w-full h-full",children:(0,dt.jsxs)("div",{className:"max-w-3xl mx-auto px-6 py-8",children:[(0,dt.jsxs)("div",{className:"text-center mb-8 relative",children:[(0,dt.jsx)("div",{className:"absolute inset-0 -z-10 bg-gradient-to-b from-primary/5 via-transparent to-transparent rounded-3xl blur-3xl"}),(0,dt.jsx)("div",{className:"inline-flex items-center justify-center w-14 h-14 rounded-2xl bg-gradient-to-br from-amber-400/20 via-orange-400/10 to-rose-400/20 border border-amber-500/10 mb-4 shadow-lg shadow-amber-500/5",children:(0,dt.jsx)(ad,{className:"w-7 h-7 text-amber-500"})}),(0,dt.jsx)("h2",{className:"text-xl font-bold text-foreground tracking-tight mb-1.5",children:t("Manager.Credits.Title")}),(0,dt.jsx)("p",{className:"text-xs text-muted-foreground/70 max-w-sm mx-auto leading-relaxed",children:t("Manager.Credits.Subtitle")})]}),(0,dt.jsxs)("div",{className:"space-y-6",children:[(()=>{let p=d[0],m=f[p.id]||[];return(0,dt.jsx)(ZF,{category:p,title:t("Manager.Credits.CatSponsor"),subtitle:t("Manager.Credits.CatSponsorDesc"),count:m.length,t,defaultOpen:!0,children:m.length>0?(0,dt.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2.5",children:m.map(h=>(0,dt.jsx)(Xne,{contributor:h,category:p},`${h.category}-${h.name}`))}):(0,dt.jsx)("div",{className:"text-center py-6 text-xs text-muted-foreground/40 italic",children:t("Manager.Credits.ComingSoon")})},p.id)})(),(0,dt.jsx)(ZF,{category:d[1],title:t("Manager.Credits.CatTranslation"),subtitle:t("Manager.Credits.CatTranslationDesc"),count:u.length,t,defaultOpen:!0,children:u.length>0?(0,dt.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2.5",children:u.map((p,m)=>(0,dt.jsx)(KYe,{creator:p,rank:m+1,badge:c[p.name],category:d[1],t},p.name))}):(0,dt.jsx)("div",{className:"text-center py-6 text-xs text-muted-foreground/40 italic",children:t("Manager.Credits.ComingSoon")})}),d.slice(2).map(p=>{let m=f[p.id]||[];return(0,dt.jsx)(ZF,{category:p,title:t(`Manager.Credits.Cat${Yne(p.id)}`),subtitle:t(`Manager.Credits.Cat${Yne(p.id)}Desc`),count:m.length,t,defaultOpen:m.length>0,children:m.length>0?(0,dt.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2.5",children:m.map(h=>(0,dt.jsx)(Xne,{contributor:h,category:p},`${h.category}-${h.name}`))}):(0,dt.jsx)("div",{className:"text-center py-6 text-xs text-muted-foreground/40 italic",children:t("Manager.Credits.ComingSoon")})},p.id)})]}),(0,dt.jsx)("div",{className:"text-center mt-10 pb-4",children:(0,dt.jsxs)("div",{className:"inline-flex items-center gap-2 text-[10px] text-muted-foreground/40 px-4 py-2 rounded-full bg-muted/15 border border-border/15",children:[(0,dt.jsx)(ns,{className:"w-3 h-3"}),t("Manager.Credits.Footer")]})})]})}):(0,dt.jsxs)("div",{className:"flex flex-col items-center justify-center h-full gap-4 text-muted-foreground",children:[(0,dt.jsx)(zt,{className:"w-8 h-8 animate-spin text-primary/40"}),(0,dt.jsx)("p",{className:"text-sm",children:t("Common.Status.Loading")})]})},ZF=({category:e,title:t,subtitle:r,count:a,t:n,defaultOpen:s,children:i})=>{let[o,l]=(0,zd.useState)(s);return(0,dt.jsxs)("div",{className:oe("rounded-xl border overflow-hidden transition-all duration-300","bg-gradient-to-br",e.colorFrom,e.colorTo,"border-border/30"),children:[(0,dt.jsxs)("button",{className:"w-full flex items-center gap-3 px-4 py-3 text-left hover:bg-muted/20 transition-colors",onClick:()=>l(!o),children:[(0,dt.jsx)("div",{className:oe("flex items-center justify-center w-8 h-8 rounded-lg shrink-0",e.badgeColor),children:e.icon}),(0,dt.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,dt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,dt.jsx)("span",{className:"text-[13px] font-bold text-foreground",children:t}),a>0&&(0,dt.jsx)(mt,{variant:"secondary",className:"text-[9px] px-1.5 py-0 h-4 font-mono",children:a})]}),(0,dt.jsx)("p",{className:"text-[10px] text-muted-foreground/60 truncate mt-0.5",children:r})]}),(0,dt.jsx)(ti,{className:oe("w-4 h-4 text-muted-foreground/40 transition-transform duration-200 shrink-0",o?"rotate-0":"-rotate-90")})]}),o&&(0,dt.jsx)("div",{className:"px-4 pb-4 pt-1",children:i})]})},KYe=({creator:e,rank:t,badge:r,category:a,t:n})=>{let s=t<=3;return(0,dt.jsxs)("div",{className:oe("group relative flex items-center gap-3 p-3 rounded-lg border transition-all duration-200 cursor-pointer select-none","bg-background/60 backdrop-blur-sm hover:bg-background/90 hover:shadow-sm hover:-translate-y-px",s?"border-amber-500/15":"border-border/30"),onClick:()=>e.htmlUrl&&window.open(e.htmlUrl,"_blank"),children:[s&&(0,dt.jsx)("div",{className:"absolute -top-1.5 -right-1.5 z-10",children:(0,dt.jsx)("div",{className:oe("w-5 h-5 rounded-full flex items-center justify-center text-[9px] font-black shadow-sm",t===1?"bg-amber-500/15 text-amber-600 ring-1 ring-amber-500/20":t===2?"bg-slate-400/15 text-slate-500 ring-1 ring-slate-400/20":"bg-orange-500/15 text-orange-600 ring-1 ring-orange-500/20"),children:t})}),e.avatarUrl?(0,dt.jsx)("img",{src:e.avatarUrl,alt:e.name,className:oe("w-9 h-9 rounded-lg ring-1 shrink-0 transition-transform group-hover:scale-105",a.ringColor)}):(0,dt.jsx)("div",{className:oe("w-9 h-9 rounded-lg flex items-center justify-center text-xs font-bold shrink-0",a.badgeColor),children:e.name.charAt(0).toUpperCase()}),(0,dt.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,dt.jsxs)("div",{className:"flex items-center gap-1.5 mb-0.5",children:[(0,dt.jsx)("span",{className:"text-[12px] font-bold text-foreground truncate",children:e.name}),r&&(0,dt.jsxs)(mt,{variant:"secondary",className:"text-[8px] px-1 py-0 h-3.5 font-bold shrink-0",children:[(0,dt.jsx)(Gy,{className:"w-2 h-2 mr-0.5"}),r]}),(0,dt.jsx)(Wy,{className:"w-2.5 h-2.5 text-muted-foreground/20 opacity-0 group-hover:opacity-100 transition-opacity shrink-0 ml-auto"})]}),(0,dt.jsxs)("div",{className:"flex items-center gap-2.5 text-[9px] text-muted-foreground/50",children:[(0,dt.jsxs)("span",{className:"flex items-center gap-0.5",children:[(0,dt.jsx)(ao,{className:"w-2.5 h-2.5 text-amber-500/40"}),e.totalStars]}),(0,dt.jsxs)("span",{className:"flex items-center gap-0.5",children:[(0,dt.jsx)($m,{className:"w-2.5 h-2.5"}),e.repoCount," ",n("Manager.Credits.UnitRepos")]}),(0,dt.jsxs)("span",{className:"flex items-center gap-0.5",children:[(0,dt.jsx)(Ea,{className:"w-2.5 h-2.5"}),e.totalPlugins," ",n("Manager.Credits.UnitPlugins")]})]})]})]})},Xne=({contributor:e,category:t})=>{let r=GYe(e);return(0,dt.jsxs)("div",{className:oe("group flex items-center gap-3 p-3 rounded-lg border transition-all duration-200 select-none","bg-background/60 backdrop-blur-sm hover:bg-background/90 hover:shadow-sm",e.url?"cursor-pointer hover:-translate-y-px":"","border-border/30"),onClick:()=>e.url&&window.open(e.url,"_blank"),children:[r?(0,dt.jsx)("img",{src:r,alt:e.name,className:oe("w-9 h-9 rounded-lg ring-1 shrink-0",t.ringColor)}):(0,dt.jsx)("div",{className:oe("w-9 h-9 rounded-lg flex items-center justify-center text-xs font-bold shrink-0",t.badgeColor),children:e.name.charAt(0).toUpperCase()}),(0,dt.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,dt.jsx)("span",{className:"text-[12px] font-bold text-foreground truncate block",children:e.name}),e.description&&(0,dt.jsx)("span",{className:"text-[10px] text-muted-foreground/50 truncate block",children:e.description})]}),e.url&&(0,dt.jsx)(Wy,{className:"w-3 h-3 text-muted-foreground/20 opacity-0 group-hover:opacity-100 transition-opacity shrink-0"})]})};function Yne(e){return e.charAt(0).toUpperCase()+e.slice(1)}qt();_2();var vn=N(Le());er();qt();var Kp=require("obsidian");var fe=N(ce()),WYe=({item:e,stats:t,isTopStar:r,updateRegistryItem:a,t:n})=>{let[s,i]=(0,vn.useState)(!1),o=e.isOfficial?"bg-amber-500":e.isFeatured?"bg-amber-400":"bg-primary",l=e.isOfficial?n("Manager.Admin.Controls.Official"):e.isFeatured?n("Manager.Admin.Controls.Featured"):"NORMAL";return(0,fe.jsxs)("div",{className:"group relative border rounded-none bg-card/75 text-card-foreground shadow-xs hover:shadow-md hover:bg-muted/20 transition-all duration-300 w-full border-border/50 overflow-hidden backdrop-blur-md flex flex-col mb-2",children:[(0,fe.jsx)("div",{className:oe("absolute left-0 top-0 bottom-0 w-[3px] transition-colors duration-300 z-10 bg-opacity-100",o)}),(0,fe.jsxs)("div",{className:"flex items-center gap-5 px-4 py-2 min-h-[44px] cursor-pointer select-none",onClick:()=>i(!s),children:[(0,fe.jsxs)("div",{className:oe("px-2.5 py-0.5 text-[9px] uppercase tracking-[0.1em] font-extrabold rounded-none bg-background border border-border shadow-xs flex items-center gap-1.5 shrink-0",o.replace(/bg-/g,"text-")),children:[(0,fe.jsx)("span",{className:oe("w-1.5 h-1.5 rounded-full shadow-sm",o)}),l]}),(0,fe.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 flex-1",children:[(0,fe.jsx)("span",{className:"font-bold truncate text-[13.5px] text-foreground/90 group-hover:text-primary transition-colors duration-300 shrink-0 max-w-[40%]",children:e.repoAddress.split("/")[1]}),(0,fe.jsx)("span",{className:"text-[10px] text-muted-foreground/50 shrink-0 font-bold bg-muted/20 px-2 py-0.5 rounded-none",children:e.repoAddress.split("/")[0]}),r&&(0,fe.jsxs)("span",{className:"text-[10px] text-amber-500 font-bold bg-amber-500/10 border border-amber-500/20 px-1.5 py-0.5 rounded-none shrink-0 flex items-center gap-1",children:[(0,fe.jsx)(vS,{className:"w-2.5 h-2.5"})," Top 3"]})]}),(0,fe.jsxs)("div",{className:"flex items-center gap-4 ml-auto shrink-0",children:[(0,fe.jsxs)("div",{className:"flex items-center gap-4 mr-2 text-muted-foreground/60 hidden md:flex",children:[(0,fe.jsxs)("div",{className:"flex items-center gap-1.5",title:n("Manager.Admin.Stats.Stars"),children:[(0,fe.jsx)(ao,{className:"w-3.5 h-3.5 opacity-70"}),(0,fe.jsx)("span",{className:"text-[11px] font-mono font-medium",children:t?.stars||0})]}),(0,fe.jsxs)("div",{className:"flex items-center gap-1.5",title:n("Manager.Admin.Stats.Plugins"),children:[(0,fe.jsx)(eo,{className:"w-3.5 h-3.5 opacity-70"}),(0,fe.jsx)("span",{className:"text-[11px] font-mono font-medium",children:t?.pluginCount||0})]}),(0,fe.jsxs)("div",{className:"flex items-center gap-1.5",title:"Translations",children:[(0,fe.jsx)(Ro,{className:"w-3.5 h-3.5 opacity-70"}),(0,fe.jsx)("span",{className:"text-[11px] font-mono font-medium",children:t?.translationCount||0})]})]}),(0,fe.jsx)(Te,{variant:"ghost",size:"icon",className:"h-7 w-7 rounded-none transition-all pointer-events-none group-hover:bg-primary/5 group-hover:text-primary",children:(0,fe.jsx)(ti,{className:oe("w-4 h-4 transition-transform duration-300",s&&"rotate-180")})})]})]}),s&&(0,fe.jsxs)("div",{className:"px-5 py-4 border-t border-border/30 bg-muted/10 animate-in slide-in-from-top-2 duration-200 space-y-4",children:[(0,fe.jsxs)("div",{className:"flex items-center gap-4 text-[10px] text-muted-foreground/60 p-2 rounded-md bg-background/50 border border-border/40 overflow-x-auto whitespace-nowrap",children:[(0,fe.jsxs)("div",{className:"flex items-center gap-1.5",title:"License",children:[(0,fe.jsx)(No,{className:"w-3 h-3"})," ",(0,fe.jsx)("span",{className:"font-mono",children:t?.license||"No License"})]}),(0,fe.jsx)(Zc,{orientation:"vertical",className:"h-3"}),(0,fe.jsxs)("div",{className:"flex items-center gap-1.5",title:"Repo Size",children:[(0,fe.jsx)(aS,{className:"w-3 h-3"})," ",(0,fe.jsxs)("span",{className:"font-mono",children:[(t?.repoSize?t.repoSize/1024:0).toFixed(1),"MB"]})]}),(0,fe.jsx)(Zc,{orientation:"vertical",className:"h-3"}),(0,fe.jsxs)("div",{className:"flex items-center gap-1.5",title:"Forks",children:[(0,fe.jsx)($m,{className:"w-3 h-3"})," ",(0,fe.jsxs)("span",{className:"font-mono",children:[t?.forks||0," Forks"]})]}),(0,fe.jsx)(Zc,{orientation:"vertical",className:"h-3"}),(0,fe.jsxs)("div",{className:"flex items-center gap-1.5",title:"Open Issues",children:[(0,fe.jsx)(zm,{className:"w-3 h-3"})," ",(0,fe.jsxs)("span",{className:"font-mono",children:[t?.openIssuesCount||0," Issues"]})]}),(0,fe.jsx)(Zc,{orientation:"vertical",className:"h-3"}),(0,fe.jsxs)("div",{className:"flex items-center gap-1.5",title:"Recent Commits 30d",children:[(0,fe.jsx)(no,{className:"w-3 h-3 text-blue-500/70"})," ",(0,fe.jsxs)("span",{className:"font-mono text-blue-500/70",children:[t?.recentCommits30d||0," Commits (30d)"]})]}),(0,fe.jsx)("div",{className:"ml-auto flex items-center gap-2 font-bold px-2 py-0.5 rounded-sm bg-primary/10 text-primary",children:(0,fe.jsxs)("span",{children:["Activity Score: ",Math.round((t?.activityScore||0)*100),"%"]})})]}),(0,fe.jsxs)("div",{className:"flex flex-col lg:flex-row gap-6",children:[(0,fe.jsxs)("div",{className:"flex-1 grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,fe.jsxs)("div",{className:"space-y-1.5",children:[(0,fe.jsxs)(Vr,{className:"text-[10px] font-black flex items-center gap-1.5 text-muted-foreground/60 uppercase tracking-[0.1em]",children:[(0,fe.jsx)(Ts,{className:"w-3 h-3"}),n("Manager.Admin.Fields.AuthorReputation")]}),(0,fe.jsx)(Qe,{value:e.authorBadge||"",placeholder:n("Manager.Admin.Fields.AuthorReputationPlaceholder"),className:"h-8 text-[11px] bg-background border-border/60 focus:border-primary/40 focus:bg-background transition-all rounded-md font-medium",onChange:c=>a(e.repoAddress,{authorBadge:c.target.value})})]}),(0,fe.jsxs)("div",{className:"space-y-1.5",children:[(0,fe.jsxs)(Vr,{className:"text-[10px] font-black flex items-center gap-1.5 text-muted-foreground/60 uppercase tracking-[0.1em]",children:[(0,fe.jsx)(ad,{className:"w-3 h-3"}),n("Manager.Admin.Fields.RegistryBadges")]}),(0,fe.jsx)(Qe,{value:JSON.stringify(e.badges||[]),placeholder:n("Manager.Admin.Fields.RegistryBadgesPlaceholder"),className:"h-8 text-[11px] bg-background font-mono border-border/60 focus:border-primary/40 rounded-md",onChange:c=>{try{let u=JSON.parse(c.target.value);Array.isArray(u)&&a(e.repoAddress,{badges:u})}catch{}}})]}),(0,fe.jsxs)("div",{className:"space-y-1.5 md:col-span-2",children:[(0,fe.jsxs)(Vr,{className:"text-[10px] font-black flex items-center gap-1.5 text-muted-foreground/60 uppercase tracking-[0.1em]",children:[(0,fe.jsx)(Hc,{className:"w-3 h-3"}),n("Manager.Admin.Fields.FeaturedContext")]}),(0,fe.jsx)(Qe,{value:e.reason||"",placeholder:n("Manager.Admin.Fields.FeaturedContextPlaceholder"),className:"h-8 text-[11px] bg-background border-border/60 focus:border-primary/40 rounded-md",onChange:c=>a(e.repoAddress,{reason:c.target.value})})]})]}),(0,fe.jsx)(Zc,{orientation:"vertical",className:"hidden lg:block h-auto mx-2 opacity-30"}),(0,fe.jsxs)("div",{className:"w-full lg:w-48 shrink-0 flex flex-col justify-center gap-2",children:[(0,fe.jsxs)("div",{className:oe("flex items-center justify-between p-2.5 rounded-lg border transition-all duration-300 select-none cursor-pointer group/toggle",e.isOfficial?"bg-blue-600/10 border-blue-600/30 shadow-inner":"bg-background border-border/40 hover:bg-muted/50 shadow-sm"),onClick:c=>{c.stopPropagation(),a(e.repoAddress,{isOfficial:!e.isOfficial})},children:[(0,fe.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,fe.jsx)(Ym,{className:oe("w-4 h-4",e.isOfficial?"text-blue-600":"text-muted-foreground/50")}),(0,fe.jsx)("span",{className:oe("text-[11px] font-bold uppercase",e.isOfficial?"text-blue-600":"text-muted-foreground"),children:n("Manager.Admin.Controls.Official")})]}),(0,fe.jsx)(El,{id:`off-${e.repoAddress}`,checked:e.isOfficial||!1,className:oe("h-4 w-4",e.isOfficial?"border-blue-600/50 data-[state=checked]:bg-blue-600 data-[state=checked]:text-white":"border-border/60"),onCheckedChange:c=>a(e.repoAddress,{isOfficial:c}),onClick:c=>c.stopPropagation()})]}),(0,fe.jsxs)("div",{className:oe("flex items-center justify-between p-2.5 rounded-lg border transition-all duration-300 select-none cursor-pointer group/toggle",e.isFeatured?"bg-amber-500/10 border-amber-500/30 shadow-inner":"bg-background border-border/40 hover:bg-muted/50 shadow-sm"),onClick:c=>{c.stopPropagation(),a(e.repoAddress,{isFeatured:!e.isFeatured})},children:[(0,fe.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,fe.jsx)(so,{className:oe("w-4 h-4",e.isFeatured?"text-amber-500 fill-amber-500":"text-muted-foreground/50")}),(0,fe.jsx)("span",{className:oe("text-[11px] font-bold uppercase",e.isFeatured?"text-amber-600 dark:text-amber-500":"text-muted-foreground"),children:n("Manager.Admin.Controls.Featured")})]}),(0,fe.jsx)(El,{id:`feat-${e.repoAddress}`,checked:e.isFeatured||!1,className:oe("h-4 w-4",e.isFeatured?"border-amber-500/50 data-[state=checked]:bg-amber-500 data-[state=checked]:text-white":"border-border/60"),onCheckedChange:c=>a(e.repoAddress,{isFeatured:c}),onClick:c=>c.stopPropagation()})]})]})]})]})]})},XYe=({contributor:e,updateContributor:t,removeContributor:r,t:a})=>{let[n,s]=(0,vn.useState)(!1),[i,o]=(0,vn.useState)(!1),[l,c]=(0,vn.useState)(e.name),[u,d]=(0,vn.useState)(e.githubUsername||""),[f,p]=(0,vn.useState)(e.url||""),[m,h]=(0,vn.useState)(e.description||"");(0,vn.useEffect)(()=>{c(e.name),d(e.githubUsername||""),p(e.url||""),h(e.description||"")},[e]);let x=()=>{t(e.name,e.category,{name:l,githubUsername:u,url:f,description:m}),o(!1),new Kp.Notice(a("Manager.Admin.Controls.Saved","Saved changes"))};return(0,fe.jsxs)("div",{className:"group relative border rounded-none bg-card/10 text-card-foreground shadow-xs hover:shadow-md hover:bg-muted/10 transition-all duration-300 w-full border-border/50 overflow-hidden backdrop-blur-md flex flex-col mb-1",children:[(0,fe.jsxs)("div",{className:"flex items-center gap-4 px-4 py-2 min-h-[44px] cursor-pointer select-none",onClick:()=>s(!n),children:[e.githubUsername?(0,fe.jsx)("img",{src:`https://github.com/${e.githubUsername}.png?size=40`,alt:e.name,className:"w-7 h-7 rounded-md ring-1 ring-border/30 shrink-0"}):(0,fe.jsx)("div",{className:"w-7 h-7 rounded-md bg-muted flex items-center justify-center text-[11px] font-bold shrink-0",children:e.name.charAt(0).toUpperCase()}),(0,fe.jsxs)("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[(0,fe.jsx)("span",{className:"text-[12px] font-bold truncate block group-hover:text-primary transition-colors",children:e.name}),e.githubUsername&&(0,fe.jsxs)("span",{className:"text-[9px] text-muted-foreground/50 font-mono bg-muted/40 px-1.5 py-0.5 rounded-sm",children:["@",e.githubUsername]})]}),(0,fe.jsxs)("div",{className:"flex items-center gap-4 ml-auto shrink-0",children:[(0,fe.jsx)("div",{className:"flex items-center gap-4 mr-2 text-muted-foreground/60 hidden md:flex",children:e.description?(0,fe.jsx)("span",{className:"text-[10px] truncate max-w-48",title:e.description,children:e.description}):(0,fe.jsx)("span",{className:"text-[10px] italic opacity-50",children:"-"})}),(0,fe.jsx)(Te,{variant:"ghost",size:"icon",className:"h-7 w-7 rounded-none transition-all pointer-events-none group-hover:bg-primary/5 group-hover:text-primary",children:(0,fe.jsx)(ti,{className:oe("w-4 h-4 transition-transform duration-300",n&&"rotate-180")})})]})]}),n&&(0,fe.jsx)("div",{className:"px-5 py-4 border-t border-border/30 bg-muted/5 animate-in slide-in-from-top-2 duration-200",children:(0,fe.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,fe.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,fe.jsxs)("div",{className:"space-y-1.5",children:[(0,fe.jsx)(Vr,{className:"text-[10px] font-black uppercase tracking-widest text-muted-foreground/60",children:a("Manager.Admin.ContributorsManagement.Name")}),(0,fe.jsx)(Qe,{value:l,onChange:g=>c(g.target.value),className:oe("h-8 text-[11px] bg-background border-border/60 transition-all focus:border-primary/50",i&&"shadow-sm"),disabled:!i})]}),(0,fe.jsxs)("div",{className:"space-y-1.5",children:[(0,fe.jsx)(Vr,{className:"text-[10px] font-black uppercase tracking-widest text-muted-foreground/60",children:a("Manager.Admin.ContributorsManagement.Github")}),(0,fe.jsx)(Qe,{value:u,onChange:g=>d(g.target.value),className:oe("h-8 text-[11px] bg-background border-border/60 transition-all focus:border-primary/50",i&&"shadow-sm"),disabled:!i})]}),(0,fe.jsxs)("div",{className:"space-y-1.5",children:[(0,fe.jsx)(Vr,{className:"text-[10px] font-black uppercase tracking-widest text-muted-foreground/60",children:a("Manager.Admin.ContributorsManagement.Url")}),(0,fe.jsx)(Qe,{value:f,onChange:g=>p(g.target.value),className:oe("h-8 text-[11px] bg-background border-border/60 transition-all focus:border-primary/50",i&&"shadow-sm"),disabled:!i})]}),(0,fe.jsxs)("div",{className:"space-y-1.5",children:[(0,fe.jsx)(Vr,{className:"text-[10px] font-black uppercase tracking-widest text-muted-foreground/60",children:a("Manager.Admin.ContributorsManagement.Description")}),(0,fe.jsx)(Qe,{value:m,onChange:g=>h(g.target.value),className:oe("h-8 text-[11px] bg-background border-border/60 transition-all focus:border-primary/50",i&&"shadow-sm"),disabled:!i})]})]}),(0,fe.jsxs)("div",{className:"flex items-center justify-between border-t border-border/20 pt-4 mt-2",children:[(0,fe.jsxs)(Te,{variant:"ghost",size:"sm",className:"h-7 px-3 gap-1.5 text-destructive hover:bg-destructive/10 text-[10px] font-bold",onClick:()=>{r(e.name,e.category),new Kp.Notice(a("Manager.Admin.ContributorsManagement.RemoveSuccess",{name:e.name}))},children:[(0,fe.jsx)(Ha,{className:"w-3 h-3"}),a("Manager.Admin.ContributorsManagement.Remove")]}),i?(0,fe.jsxs)("div",{className:"flex gap-2",children:[(0,fe.jsx)(Te,{variant:"ghost",size:"sm",className:"h-7 text-[10px] font-bold",onClick:()=>{o(!1),c(e.name),d(e.githubUsername||""),p(e.url||""),h(e.description||"")},children:"Cancel"}),(0,fe.jsx)(Te,{variant:"default",size:"sm",className:"h-7 px-3 text-[10px] font-bold",disabled:!l.trim(),onClick:x,children:"Save Changes"})]}):(0,fe.jsxs)(Te,{variant:"outline",size:"sm",className:"h-7 px-3 gap-1.5 text-[10px] font-bold bg-background",onClick:()=>o(!0),children:[(0,fe.jsx)(ko,{className:"w-3 h-3"}),"Edit Details"]})]})]})})]})},Qne=({i18n:e})=>{let{t}=ze(),r=Se.use.communityRegistry(),a=Se.use.communityStats(),n=Se.use.communityLoaded(),s=Se.use.communityLoading(),i=Se.use.isPushing(),o=Se.use.fetchCommunityRegistry(),l=Se.use.pushRegistryToCloud(),c=Se.use.updateRegistryItem(),u=Se.use.contributors(),d=Se.use.contributorsLoaded(),f=Se.use.fetchContributors(),p=Se.use.addContributor(),m=Se.use.removeContributor(),h=Se.use.updateContributor(),x=Se.use.pushContributorsToCloud();(0,vn.useEffect)(()=>{!n&&!s&&o(e),d||f(e)},[n,s,o,d,f,e]);let[g,y]=(0,vn.useState)("registry"),[b,S]=(0,vn.useState)(""),[w,P]=(0,vn.useState)(!1),[C,I]=(0,vn.useState)(!1),[R,O]=(0,vn.useState)(""),[D,W]=(0,vn.useState)("code"),[J,me]=(0,vn.useState)(""),[Z,q]=(0,vn.useState)(""),[V,L]=(0,vn.useState)(""),k=(0,vn.useMemo)(()=>{if(!b)return r;let ie=b.toLowerCase();return r.filter(ae=>ae.repoAddress.toLowerCase().includes(ie)||(ae.authorBadge||"").toLowerCase().includes(ie))},[r,b]),_=()=>{let ie=JSON.stringify(r,null,2);navigator.clipboard.writeText(ie),P(!0),new Kp.Notice(t("Manager.Common.Notices.CopySuccess")),setTimeout(()=>P(!1),2e3)},ee=async()=>{await l(e)?new Kp.Notice(t("Manager.Common.Notices.SyncSuccess")):new Kp.Notice(t("Manager.Common.Errors.SyncFailed"))};return(0,fe.jsxs)(Ll,{defaultValue:"registry",value:g,onValueChange:y,className:"flex-1 min-h-0 flex flex-col w-full h-full bg-background select-none overflow-hidden",children:[(0,fe.jsx)("div",{className:"flex flex-col gap-4 py-2 px-4 border-b shrink-0 bg-background",children:(0,fe.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[(0,fe.jsxs)(Rl,{className:"h-9",children:[(0,fe.jsx)(Ga,{value:"registry",className:"text-[13px] px-4",children:t("Manager.Admin.Management.Title")}),(0,fe.jsx)(Ga,{value:"contributors",className:"text-[13px] px-4",children:t("Manager.Admin.ContributorsManagement.Title")})]}),(0,fe.jsxs)("div",{className:"flex items-center gap-2",children:[g==="registry"&&(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsxs)("div",{className:"relative flex-1 min-w-[200px]",children:[(0,fe.jsx)(ra,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground/70"}),(0,fe.jsx)(Qe,{placeholder:t("Manager.Admin.SearchPlaceholder"),className:"pl-8 h-9 rounded-md border-muted-foreground/20 focus:ring-1 text-[13px] bg-muted/10 shadow-sm transition-colors hover:bg-muted/20",value:b,onChange:ie=>S(ie.target.value)})]}),(0,fe.jsxs)("div",{className:"flex items-center rounded-md border border-muted-foreground/20 bg-background shadow-sm h-9 ml-2",children:[(0,fe.jsxs)(Te,{variant:"ghost",size:"sm",className:"h-9 px-3 gap-1.5 border-r border-muted-foreground/20 hover:bg-primary/5 hover:text-primary group rounded-none rounded-l-md",onClick:ee,disabled:i,children:[i?(0,fe.jsx)(zt,{className:"w-4 h-4 text-muted-foreground/70 group-hover:text-primary animate-spin"}):(0,fe.jsx)(Ca,{className:"w-4 h-4 text-muted-foreground/70 group-hover:text-primary"}),(0,fe.jsx)("span",{className:"text-[13px] text-muted-foreground/90 group-hover:text-primary hidden lg:inline",children:t("Manager.Admin.PushToCloud")})]}),(0,fe.jsx)(Te,{variant:"ghost",size:"sm",className:"h-9 px-3 hover:bg-primary/5 hover:text-primary group rounded-none rounded-r-md",onClick:_,title:t("Manager.Admin.ExportJson"),children:w?(0,fe.jsx)(Jl,{className:"w-4 h-4 text-green-500"}):(0,fe.jsx)(Zu,{className:"w-4 h-4 text-muted-foreground/70 group-hover:text-primary"})})]})]}),g==="contributors"&&(0,fe.jsx)("div",{className:"flex items-center rounded-md border border-muted-foreground/20 bg-background shadow-sm h-9",children:(0,fe.jsxs)(Te,{variant:"ghost",size:"sm",className:"h-9 px-3 gap-1.5 hover:bg-primary/5 hover:text-primary group rounded-md",onClick:async()=>{let ie=await x(e);new Kp.Notice(t(ie?"Manager.Common.Notices.SyncSuccess":"Manager.Common.Errors.SyncFailed"))},disabled:i,children:[i?(0,fe.jsx)(zt,{className:"w-4 h-4 text-muted-foreground/70 group-hover:text-primary animate-spin"}):(0,fe.jsx)(Ca,{className:"w-4 h-4 text-muted-foreground/70 group-hover:text-primary"}),(0,fe.jsx)("span",{className:"text-[13px] text-muted-foreground/90 group-hover:text-primary hidden lg:inline",children:t("Manager.Admin.ContributorsManagement.PushToCloud")})]})})]})]})}),(0,fe.jsx)(ca,{value:"registry",className:"flex-1 min-h-0 m-0 border-none p-0 data-[state=active]:flex flex-col outline-none",children:(0,fe.jsx)(sr,{className:"flex-1 min-h-0 w-full bg-background",children:(0,fe.jsxs)("div",{className:"px-4 py-4 w-full h-full max-w-[1600px] mx-auto space-y-4",children:[(0,fe.jsxs)("div",{className:"flex items-center justify-between px-1",children:[(0,fe.jsx)("h3",{className:"text-sm font-bold text-foreground/80",children:t("Manager.Admin.Management.Title")}),(0,fe.jsx)("div",{className:"text-xs font-medium text-muted-foreground/50",children:t("Manager.Admin.Management.ShowingStats",{filtered:k.length,total:r.length})})]}),s?(0,fe.jsxs)("div",{className:"flex flex-col items-center justify-center py-24 text-muted-foreground bg-muted/5 rounded-2xl border border-dashed text-center",children:[(0,fe.jsx)(Wr,{className:"w-10 h-10 animate-spin text-primary/30 mb-4 mx-auto"}),(0,fe.jsx)("p",{className:"text-[10px] font-black uppercase tracking-widest opacity-40",children:t("Manager.Admin.Management.SyncingData")})]}):k.length===0?(0,fe.jsxs)("div",{className:"flex flex-col items-center justify-center py-24 text-muted-foreground bg-muted/5 rounded-2xl border border-dashed text-center",children:[(0,fe.jsx)(eo,{className:"w-12 h-12 opacity-10 mb-4 mx-auto"}),(0,fe.jsx)("h3",{className:"text-xs font-black uppercase tracking-wider opacity-30",children:t("Manager.Admin.Management.NoData")})]}):(0,fe.jsx)("div",{className:"grid grid-cols-1 gap-2",children:k.map(ie=>{let ae=a?.repos?.[ie.repoAddress],ge=a?.leaderboard?.topReposByStars.slice(0,3).includes(ie.repoAddress);return(0,fe.jsx)(WYe,{item:ie,stats:ae,isTopStar:ge,updateRegistryItem:c,t},ie.repoAddress)})})]})})}),(0,fe.jsx)(ca,{value:"contributors",className:"flex-1 min-h-0 m-0 border-none p-0 data-[state=active]:flex flex-col outline-none",children:(0,fe.jsx)(sr,{className:"flex-1 min-h-0 w-full bg-background",children:(0,fe.jsxs)("div",{className:"px-4 py-4 w-full h-full max-w-[1600px] mx-auto space-y-4",children:[(0,fe.jsxs)("div",{className:"flex items-center justify-between px-1",children:[(0,fe.jsx)("h3",{className:"text-sm font-bold text-foreground/80",children:t("Manager.Admin.ContributorsManagement.Title")}),(0,fe.jsx)(mt,{variant:"secondary",className:"text-xs font-mono",children:u.length})]}),(0,fe.jsxs)("div",{className:"group relative border rounded-none bg-card/20 text-card-foreground hover:bg-muted/10 transition-all duration-300 w-full border-border/50 border-dashed overflow-hidden flex flex-col mb-4",children:[(0,fe.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3 cursor-pointer",onClick:()=>I(!C),children:[(0,fe.jsx)("div",{className:"p-1 rounded-sm bg-primary/10 text-primary",children:(0,fe.jsx)(as,{className:"w-3 h-3"})}),(0,fe.jsx)("span",{className:"text-[11px] font-bold text-muted-foreground uppercase tracking-widest",children:t("Manager.Admin.ContributorsManagement.AddNew")})]}),C&&(0,fe.jsx)("div",{className:"px-3 py-3 border-t border-border/30 border-dashed bg-muted/5 animate-in slide-in-from-top-1 duration-200",children:(0,fe.jsxs)("div",{className:"flex flex-col md:flex-row items-center gap-2",children:[(0,fe.jsxs)("select",{className:"h-8 w-full md:w-24 rounded-md border border-border/60 bg-background px-2 text-[11px] focus:outline-none focus:border-primary/50 cursor-pointer",value:D,onChange:ie=>W(ie.target.value),children:[(0,fe.jsx)("option",{value:"code",children:"\u{1F4BB} \u4EE3\u7801"}),(0,fe.jsx)("option",{value:"video",children:"\u{1F3AC} \u89C6\u9891"}),(0,fe.jsx)("option",{value:"testing",children:"\u{1F9EA} \u6D4B\u8BD5"}),(0,fe.jsx)("option",{value:"suggestion",children:"\u{1F4AC} \u5EFA\u8BAE"})]}),(0,fe.jsxs)("div",{className:"flex-1 flex flex-wrap lg:flex-nowrap items-center gap-2 w-full",children:[(0,fe.jsx)(Qe,{placeholder:t("Manager.Admin.ContributorsManagement.Name"),className:"h-8 w-full md:w-28 text-[11px] bg-background border-border/60 focus:border-primary/50 shadow-sm",value:R,onChange:ie=>O(ie.target.value)}),(0,fe.jsx)(Qe,{placeholder:"GitHub ID",className:"h-8 w-full md:w-28 text-[11px] bg-background border-border/60 focus:border-primary/50 shadow-sm",value:Z,onChange:ie=>q(ie.target.value)}),(0,fe.jsx)(Qe,{placeholder:"URL",className:"h-8 flex-1 min-w-[100px] text-[11px] bg-background border-border/60 focus:border-primary/50 shadow-sm",value:J,onChange:ie=>me(ie.target.value)}),(0,fe.jsx)(Qe,{placeholder:"Description",className:"h-8 w-full lg:w-48 text-[11px] bg-background border-border/60 focus:border-primary/50 shadow-sm",value:V,onChange:ie=>L(ie.target.value)})]}),(0,fe.jsxs)(Te,{variant:"default",size:"sm",className:"h-8 px-3 ml-auto text-[10px] font-bold shrink-0 mt-2 md:mt-0",disabled:!R.trim(),onClick:()=>{p({name:R.trim(),category:D,url:J.trim()||void 0,githubUsername:Z.trim()||void 0,description:V.trim()||void 0}),O(""),me(""),q(""),L(""),I(!1),new Kp.Notice(t("Manager.Admin.ContributorsManagement.AddSuccess",{name:R.trim()}))},children:[(0,fe.jsx)(as,{className:"w-3.5 h-3.5"}),t("Manager.Admin.ContributorsManagement.Add")]})]})})]}),u.length>0&&(0,fe.jsx)("div",{className:"space-y-4",children:["code","video","testing","suggestion"].map(ie=>{let ae=u.filter($=>$.category===ie);if(ae.length===0)return null;let ue={code:{icon:(0,fe.jsx)(Ao,{className:"w-3.5 h-3.5"}),label:"\u4EE3\u7801\u8D21\u732E\u8005",color:"text-emerald-500"},video:{icon:(0,fe.jsx)(Zm,{className:"w-3.5 h-3.5"}),label:"\u89C6\u9891\u521B\u4F5C\u8005",color:"text-rose-500"},testing:{icon:(0,fe.jsx)(Jm,{className:"w-3.5 h-3.5"}),label:"\u6D4B\u8BD5\u8D21\u732E\u8005",color:"text-amber-500"},suggestion:{icon:(0,fe.jsx)(Hc,{className:"w-3.5 h-3.5"}),label:"\u5EFA\u8BAE\u8D21\u732E\u8005",color:"text-violet-500"}}[ie];return(0,fe.jsxs)("div",{className:"space-y-2 pb-2",children:[(0,fe.jsxs)("div",{className:"flex items-center gap-2 px-1 mb-1",children:[(0,fe.jsxs)("span",{className:oe("flex items-center gap-1.5 text-[10px] font-black uppercase tracking-widest",ue.color),children:[ue.icon,ue.label]}),(0,fe.jsx)(mt,{variant:"secondary",className:"text-[9px] px-1.5 py-0 h-4 font-mono",children:ae.length})]}),(0,fe.jsx)("div",{className:"flex flex-col gap-1",children:ae.map($=>(0,fe.jsx)(XYe,{contributor:$,updateContributor:h,removeContributor:m,t},`${$.category}-${$.name}`))})]},ie)})})]})})})]})};var Et=N(ce()),ese=({i18n:e,close:t})=>{let{t:r}=ze(),a=e.app,n=Se.use.isAdmin(),s=Se.use.githubUser(),i=Se.use.fetchGithubUser();return(0,Zne.useEffect)(()=>{e.settings.shareToken&&!s&&i(e)},[e.settings.shareToken,s,i,e]),(0,Et.jsx)("div",{className:"flex flex-col h-full bg-background overflow-hidden",children:(0,Et.jsxs)(Ll,{defaultValue:e.settings.managerTab||"plugins",onValueChange:o=>{e.settings.managerTab=o,e.saveSettings()},className:"flex flex-col h-full gap-0",children:[(0,Et.jsxs)("div",{className:"flex items-center justify-between px-4 py-2 border-b shrink-0",children:[(0,Et.jsxs)(Rl,{className:"h-9 p-1 bg-muted/50 border rounded-none shadow-inner",children:[(0,Et.jsxs)(Ga,{className:"h-7 text-xs data-[state=active]:shadow-sm gap-1.5 px-3 rounded-none",value:"plugins",children:[(0,Et.jsx)(eo,{className:"w-3.5 h-3.5"}),r("Manager.Plugins.TabName")]}),(0,Et.jsxs)(Ga,{className:"h-7 text-xs data-[state=active]:shadow-sm gap-1.5 px-3 rounded-none",value:"themes",children:[(0,Et.jsx)(Oa,{className:"w-3.5 h-3.5"}),r("Manager.Themes.TabName")]}),(0,Et.jsxs)(Ga,{className:"h-7 text-xs data-[state=active]:shadow-sm gap-1.5 px-3 rounded-none",value:"sources",children:[(0,Et.jsx)(Zu,{className:"w-3.5 h-3.5"}),r("Manager.Sources.TabName")]}),(0,Et.jsxs)(Ga,{className:"h-7 text-xs data-[state=active]:shadow-sm gap-1.5 px-3 rounded-none",value:"auto",children:[(0,Et.jsx)(mS,{className:"w-3.5 h-3.5"}),r("Manager.Auto.TabName","\u81EA\u52A8\u5316")]}),(0,Et.jsxs)(Ga,{className:"h-7 text-xs data-[state=active]:shadow-sm gap-1.5 px-3 rounded-none",value:"credits",children:[(0,Et.jsx)(ad,{className:"w-3.5 h-3.5"}),r("Manager.Credits.TabName","\u9E23\u8C22")]}),n&&(0,Et.jsxs)(Ga,{className:"h-7 text-xs data-[state=active]:shadow-sm gap-1.5 px-3 rounded-none",value:"admin",children:[(0,Et.jsx)(Gc,{className:"w-3.5 h-3.5"}),r("Manager.Admin.TabName","\u7BA1\u7406")]})]}),(0,Et.jsxs)("div",{className:"flex items-center border rounded-none divide-x bg-background shadow-sm overflow-hidden",children:[(0,Et.jsx)(zn,{children:(0,Et.jsxs)(Ka,{children:[(0,Et.jsx)(Wa,{asChild:!0,children:(0,Et.jsxs)(Te,{variant:"ghost",className:"rounded-none h-9 px-3 hover:bg-muted gap-2 text-xs",onClick:()=>window.open(xi.SPONSOR),children:[(0,Et.jsx)(Vm,{className:"w-4 h-4"}),(0,Et.jsx)("span",{children:r("Manager.Common.Actions.Sponsor")})]})}),(0,Et.jsx)(Xa,{children:r("Manager.Common.Actions.Sponsor")})]})}),(0,Et.jsx)(zn,{children:(0,Et.jsxs)(Ka,{children:[(0,Et.jsx)(Wa,{asChild:!0,children:(0,Et.jsxs)(Te,{variant:"ghost",className:"rounded-none h-9 px-3 hover:bg-muted gap-2 text-xs",onClick:()=>{e.view.activateView(Rb)},children:[(0,Et.jsx)(Ql,{className:"w-4 h-4"}),(0,Et.jsx)("span",{children:r("Manager.Common.Actions.Help")})]})}),(0,Et.jsx)(Xa,{children:r("Manager.Common.Actions.HelpDoc")})]})}),(0,Et.jsx)(zn,{children:(0,Et.jsxs)(Ka,{children:[(0,Et.jsx)(Wa,{asChild:!0,children:(0,Et.jsxs)(Te,{variant:"ghost",className:"rounded-none h-9 px-3 hover:bg-muted gap-2 text-xs",onClick:()=>{e.view.activateView(Mb)},children:[(0,Et.jsx)(Ca,{className:"w-4 h-4"}),(0,Et.jsx)("span",{children:r("Manager.Common.Actions.Cloud")})]})}),(0,Et.jsx)(Xa,{children:r("Manager.Common.Actions.Cloud")})]})}),(0,Et.jsx)(zn,{children:(0,Et.jsxs)(Ka,{children:[(0,Et.jsx)(Wa,{asChild:!0,children:(0,Et.jsxs)(Te,{variant:"ghost",className:"rounded-none h-9 px-3 hover:bg-muted gap-2 text-xs",onClick:()=>{a.setting.open(),a.setting.openTabById(e.manifest.id)},children:[(0,Et.jsx)($c,{className:"w-4 h-4"}),(0,Et.jsx)("span",{children:r("Manager.Common.Actions.Settings")})]})}),(0,Et.jsx)(Xa,{children:r("Manager.Common.Actions.Settings")})]})})]})]}),(0,Et.jsx)(ca,{value:"plugins",className:"flex-1 min-h-0 m-0 focus-visible:ring-0",children:(0,Et.jsx)(zne,{i18n:e,close:t})}),(0,Et.jsx)(ca,{value:"themes",className:"flex-1 min-h-0 m-0 focus-visible:ring-0",children:(0,Et.jsx)(Hne,{i18n:e})}),(0,Et.jsx)(ca,{value:"sources",className:"flex-1 min-h-0 m-0 focus-visible:ring-0 overflow-hidden flex flex-col",children:(0,Et.jsx)(Wne,{i18n:e})}),(0,Et.jsx)(ca,{value:"auto",className:"flex-1 min-h-0 m-0 focus-visible:ring-0 overflow-y-auto w-full",children:(0,Et.jsx)(Gne,{i18n:e})}),(0,Et.jsx)(ca,{value:"credits",className:"flex-1 min-h-0 m-0 focus-visible:ring-0 overflow-hidden flex flex-col",children:(0,Et.jsx)(Jne,{i18n:e})}),n&&(0,Et.jsx)(ca,{value:"admin",className:"flex-1 min-h-0 m-0 focus-visible:ring-0 overflow-hidden flex flex-col",children:(0,Et.jsx)(Qne,{i18n:e})})]})})};Rr();Vt();var rse=N(ce()),Wp="i18n-manager-view",dI=class extends tse.ItemView{constructor(r,a){super(r);this.root=null;this.shadowRoot=null;this.i18n=a}getViewType(){return Wp}getDisplayText(){return v("Manager.Common.Titles.Main")}getIcon(){return"layout-grid"}async onOpen(){let{root:r,shadowRoot:a}=Do(this.contentEl,this.i18n,(0,rse.jsx)(ese,{i18n:this.i18n,close:()=>{this.leaf.detach()}}));this.root=r,this.shadowRoot=a}async onClose(){this.root?.unmount(),this.shadowRoot&&(this.shadowRoot.innerHTML="")}};Rr();var YYe=(e,t)=>{t.addCommand({id:"i18n-translate",name:v("command.open_panel"),callback:()=>{t.view.activateView(Wp)}}),t.addCommand({id:"i18n-auto-manager",name:v("Manager.Auto.TabName"),callback:()=>{t.settings.managerTab="auto",t.saveSettings(),t.view.activateView(Wp)}})},ase=YYe;var Fb=class{constructor(t){this.github=new Zy(t)}static getInstance(t){return Fb.instance||(Fb.instance=new Fb(t)),Fb.instance}},Bb=Fb;Bb.instance=null;var sse=(n=>(n[n.DEBUG=1]="DEBUG",n[n.INFO=2]="INFO",n[n.WARN=4]="WARN",n[n.ERROR=8]="ERROR",n))(sse||{}),JYe={[1]:"\u8C03\u8BD5",[2]:"\u4FE1\u606F",[4]:"\u8B66\u544A",[8]:"\u9519\u8BEF"},nse={[1]:" #409EFF;",[2]:" #67C23A;",[4]:" #E6A23C;",[8]:" #F56C6C;"},yu=class{constructor(t=Object.values(sse).filter(r=>typeof r=="number")){this.shouldLog=t=>this.enabledTypes.has(t);this.getFormattedTimestamp=()=>new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3}).format(new Date);this.log=(t,r,...a)=>{if(this.shouldLog(t)){let n=JYe[t],s=this.getFormattedTimestamp(),i=`border-radius: 2px; padding: 2px 6px; font-size: 10px; color: #fff; background: ${nse[t]};text-align: center;`,o=`color:${nse[t]}`,l=[`%c${n}%c [${s}]`,i,o],c=`${r}`,u=!1;for(let d=0;d<a.length;d++){let f=a[d],p=d<a.length-1?a[d+1]:null;typeof f=="string"&&f.endsWith("\uFF1A")&&p&&typeof p=="object"?(c+=`
|
|
${f}`,u=!0):u&&typeof f=="object"?u=!1:(typeof f=="string"||typeof f=="number"||typeof f=="boolean")&&(c+=`
|
|
${f}`)}l.push(`
|
|
${c}`);for(let d=0;d<a.length;d++){let f=a[d];typeof f=="object"&&f!==null&&l.push(f)}}};this.debug=(t,...r)=>this.log(1,t,...r);this.info=(t,...r)=>this.log(2,t,...r);this.warn=(t,...r)=>this.log(4,t,...r);this.error=(t,...r)=>this.log(8,t,...r);this.enabledTypes=new Set(t)}setLogLevel(t){this.enabledTypes=new Set(t)}static getInstance(){return yu.instance||(yu.instance=new yu),yu.instance}};var ise=require("obsidian");Rr();var ig=class{constructor(t){this.notices=[];this.i18n=t}static getInstance(t){return ig.instance||(ig.instance=new ig(t)),ig.instance}createNotice(t,r,a){let s=`${{primary:"\u2728",success:"\u2705",info:"\u2139\uFE0F",warning:"\u26A0\uFE0F",error:"\u274C"}[r]||""} ${t}`,i=new ise.Notice(s,a);switch(i.containerEl.addClass("rounded-lg","border","shadow-md","backdrop-blur-md","p-4","mb-2","animate-in","fade-in","slide-in-from-right-4","duration-300"),r){case"primary":i.containerEl.addClass("bg-primary/10","text-primary","border-primary/20");break;case"success":i.containerEl.addClass("bg-emerald-500/10","text-emerald-600","border-emerald-500/20");break;case"info":i.containerEl.addClass("bg-sky-500/10","text-sky-600","border-sky-500/20");break;case"warning":i.containerEl.addClass("bg-amber-500/10","text-amber-600","border-amber-500/20");break;case"error":i.containerEl.addClass("bg-destructive/10","text-destructive","border-destructive/20");break}return i}addNotice(t){this.notices.length>=ig.MAX_NOTICE_QUEUE&&(this.notices[0].containerEl.remove(),this.notices.shift()),this.notices.push(t)}primary(t,r=4e3){let a=this.createNotice(`${t}`,"primary",r);this.addNotice(a)}success(t,r=4e3){let a=this.createNotice(`${t}`,"success",r);this.addNotice(a)}info(t,r=4e3){let a=this.createNotice(`${t}`,"info",r);this.addNotice(a)}warning(t,r=4e3){let a=this.createNotice(`${t}`,"warning",r);this.addNotice(a)}error(t,r=1e4){let a=this.createNotice(`${t}`,"error",r);this.addNotice(a)}primaryPrefix(t,r,a=4e3){let n=this.createNotice(`[${t}] ${r}`,"primary",a);this.addNotice(n)}successPrefix(t,r,a=4e3){let n=this.createNotice(`[${t}] ${r}`,"success",a);this.addNotice(n)}infoPrefix(t,r,a=4e3){let n=this.createNotice(`[${t}] ${r}`,"info",a);this.addNotice(n)}warningPrefix(t,r,a=4e3){let n=this.createNotice(`[${t}] ${r}`,"warning",a);this.addNotice(n)}errorPrefix(t,r,a=1e4){let n=this.createNotice(`[${t}] ${r}`,"error",a);this.addNotice(n)}resultPrefix(t,r,a="",n=4e3){let s;r?s=a?`[${t}] ${v("Common.Notices.Success")}
|
|
${a}`:`[${t}] ${v("Common.Notices.Success")}`:s=`[${t}] ${v("Common.Notices.Failure")}
|
|
${a}`;let i=this.createNotice(s,r?"success":"error",r?n:1e4);this.addNotice(i)}result(t,r="",a=4e3){let n;t?n=r?`${v("Common.Notices.Success")}
|
|
${r}`:v("Common.Notices.Success"):n=`${v("Common.Notices.Failure")}
|
|
${r}`;let s=this.createNotice(n,t?"success":"error",t?a:1e4);this.addNotice(s)}reload(){this.notices.forEach(t=>t.containerEl.remove()),this.notices.length=0}},og=ig;og.instance=null,og.MAX_NOTICE_QUEUE=100;var e5=class{constructor(t,r,a,n,s){this.leafType="window";if(!t)throw new Error("i18n \u5B9E\u4F8B\u4E0D\u53EF\u4E3A\u7A7A");if(!r)throw new Error("\u89C6\u56FE\u7C7B\u578B type \u4E0D\u53EF\u4E3A\u7A7A");if(!a)throw new Error("\u89C6\u56FE\u521B\u5EFA\u5668 viewCreator \u4E0D\u53EF\u4E3A\u7A7A");this.i18n=t,this.viewType=r,this.leafType=n,this.viewOption=s,this.i18n.registerView(this.viewType,a)}async activate(){let{workspace:t}=this.i18n.app;await new Promise(n=>t.onLayoutReady(()=>n(null))),this.deactivate();let r=null,a=t.getLeavesOfType(this.viewType);if(a.length>0)r=a[0];else{try{r=t.getLeaf(this.leafType)}catch{r=t.getLeaf("window")}if(r&&(await r.setViewState({type:this.viewType,active:!0}),(this.leafType==="window"||r.containerEl.ownerDocument!==document)&&this.viewOption)){let n=r.view.containerEl.ownerDocument.defaultView;if(n){let s=this.viewOption.width||n.outerWidth,i=this.viewOption.height||n.outerHeight;n.resizeTo(s,i);let o=(n.screen.availWidth-s)/2,l=(n.screen.availHeight-i)/2;n.moveTo(o,l)}}}r&&t.revealLeaf(r)}deactivate(){this.i18n.app.workspace.detachLeavesOfType(this.viewType)}},lg=class{constructor(t){this.i18n=t,this.views=new Map}static getInstance(t){if(!t)throw new Error("i18n \u5B9E\u4F8B\u4E0D\u53EF\u4E3A\u7A7A");if(!lg.instance)lg.instance=new lg(t);else if(lg.instance.i18n!==t)throw new Error("ViewManager \u5DF2\u4F7F\u7528\u4E0D\u540C\u7684 I18N \u5B9E\u4F8B\u521D\u59CB\u5316");return lg.instance}addView(t,r,a="window",n){if(this.views.has(t))throw new Error(`\u89C6\u56FE\u7C7B\u578B ${t} \u5DF2\u5B58\u5728`);let s=new e5(this.i18n,t,r,a,n);return this.views.set(t,s),s}getView(t){return this.views.get(t)}getAllViews(){return Array.from(this.views.values())}async activateView(t){let r=this.getView(t);if(r)await r.activate();else throw new Error(`\u89C6\u56FE\u7C7B\u578B ${t} \u4E0D\u5B58\u5728`)}deactivateView(t){let r=this.getView(t);if(r)r.deactivate();else throw new Error(`\u89C6\u56FE\u7C7B\u578B ${t} \u4E0D\u5B58\u5728`)}deactivateAllViews(){this.views.forEach(t=>t.deactivate())}removeView(t){let r=this.views.get(t);r&&(r.deactivate(),this.views.delete(t))}removeAllViews(){this.deactivateAllViews(),this.views.clear()}},Ub=lg;Ub.instance=null;var xu=N(require("path")),Wo=N(fs()),ose=require("obsidian"),jT=class{constructor(t){this.data={plugins:{},themes:{}};this.save=(0,ose.debounce)(()=>{try{Wo.outputJsonSync(this.path,this.data,{spaces:4})}catch{}},1e3,!0);this.plugin=t;let r=this.plugin.app.vault.adapter.getBasePath();this.path=xu.join(r,this.plugin.manifest.dir||"","states.json"),this.load()}load(){if(Wo.pathExistsSync(this.path))try{this.data=Wo.readJsonSync(this.path),this.data.plugins||(this.data.plugins={}),this.data.themes||(this.data.themes={})}catch{this.data={plugins:{},themes:{}}}}getPluginState(t){return this.data.plugins[t]}setPluginState(t,r){this.data.plugins[t]=r,this.save()}deletePluginState(t){this.data.plugins[t]&&(delete this.data.plugins[t],this.save())}clearAllStates(){this.data={plugins:{},themes:{}},this.save()}getAllPluginStates(){return this.data.plugins||{}}getAllThemeStates(){return this.data.themes||{}}getThemeState(t){return this.data.themes[t]}setThemeState(t,r){this.data.themes[t]=r,this.save()}deleteThemeState(t){this.data.themes[t]&&(delete this.data.themes[t],this.save())}async validateVersions(t){let r=Object.values(t.plugins.manifests),a=!1;for(let n of r){let s=this.getPluginState(n.id);s&&s.pluginVersion!==n.version&&(s.isApplied?(s.isApplied=!1,s.pluginVersion=n.version,a=!0):(s.pluginVersion=n.version,a=!0))}try{let n=t.vault.adapter.getBasePath?xu.normalize(t.vault.adapter.getBasePath()):"";if(n){let s=xu.join(n,t.vault.configDir,"themes");if(Wo.existsSync(s)){let i=Wo.readdirSync(s,{withFileTypes:!0});for(let o of i){if(!o.isDirectory())continue;let l=o.name,c=xu.join(s,l,"manifest.json"),u="0.0.0";if(Wo.existsSync(c))try{let f=Wo.readJsonSync(c);f&&f.version&&(u=f.version)}catch{}let d=this.getThemeState(l);d&&d.pluginVersion!==u&&(d.isApplied=!1,d.pluginVersion=u,a=!0)}}}}catch{}a&&this.save()}async cleanupRemovedResources(t){let r=t.plugins.manifests,a=!1,n=Object.keys(this.data.plugins);for(let i of n)if(!r[i]){if(this.data.plugins[i].isApplied&&this.plugin.backupManager.hasBackup(i)){let l=t.vault.adapter.getBasePath?xu.normalize(t.vault.adapter.getBasePath()):"",c=xu.join(l,t.vault.configDir,"plugins",i);try{await this.plugin.backupManager.restoreBackup(i,c)}catch{await this.plugin.backupManager.removeBackup(i)}}else await this.plugin.backupManager.removeBackup(i);delete this.data.plugins[i],a=!0}let s=Object.keys(this.data.themes);for(let i of s){let o=t.vault.adapter.getBasePath?xu.normalize(t.vault.adapter.getBasePath()):"";if(!o)continue;let l=xu.join(o,t.vault.configDir,"themes",i);if(!Wo.existsSync(l)){let c=this.data.themes[i];await this.plugin.backupManager.removeBackup(i),delete this.data.themes[i],a=!0}}a&&this.save()}};var Wn=N(require("path")),Xt=N(fs()),jb=N(require("zlib")),t5=require("util"),QYe=(0,t5.promisify)(jb.gzip),fI=(0,t5.promisify)(jb.gunzip),zT=class{constructor(t){this.backupDir=Wn.join(t,"backups"),Xt.ensureDirSync(this.backupDir)}getLegacyBackupPath(t){return Wn.join(this.backupDir,`${t}.js.gz`)}getLegacyUncompressedBackupPath(t){return Wn.join(this.backupDir,`${t}.js`)}getPluginBackupDir(t){return Wn.join(this.backupDir,t)}async createBackup(t,r,a,n=!1){let s=this.getPluginBackupDir(t);try{await Xt.ensureDir(s);for(let i of a){let o=Wn.join(r,i),l=Wn.join(s,`${i}.gz`);if(await Xt.ensureDir(Wn.dirname(l)),!await Xt.pathExists(o)||await Xt.pathExists(l)&&!n)continue;let c=await Xt.readFile(o),u=await QYe(c);await Xt.writeFile(l,u)}return await this.removeLegacyBackups(t),!0}catch{return!1}}async restoreBackup(t,r){let a=this.getPluginBackupDir(t),n=this.getLegacyBackupPath(t),s=this.getLegacyUncompressedBackupPath(t);try{let i=!1;if(await Xt.pathExists(a)){let o=async(l,c)=>{let u=await Xt.readdir(l,{withFileTypes:!0});for(let d of u){let f=Wn.join(l,d.name);if(d.isDirectory())await o(f,c);else if(d.isFile()&&d.name.endsWith(".gz")){let p=Wn.relative(c,f).replace(/\.gz$/,""),m=Wn.join(r,p);await Xt.ensureDir(Wn.dirname(m));let h=await Xt.readFile(f),x=await fI(h);await Xt.writeFile(m,x),i=!0}}};return await o(a,a),await Xt.remove(a),i}if(await Xt.pathExists(n)){let o=Wn.join(r,"main.js"),l=await Xt.readFile(n),c=await fI(l);return await Xt.writeFile(o,c),await Xt.remove(n),!0}if(await Xt.pathExists(s)){let o=Wn.join(r,"main.js");return await Xt.copy(s,o,{overwrite:!0}),await Xt.remove(s),!0}return!1}catch{return!1}}hasBackup(t){return Xt.existsSync(this.getPluginBackupDir(t))||Xt.existsSync(this.getLegacyBackupPath(t))||Xt.existsSync(this.getLegacyUncompressedBackupPath(t))}async getBackupContent(t,r){let a=this.getPluginBackupDir(t),n=Wn.join(a,`${r}.gz`);if(await Xt.pathExists(n)){let s=await Xt.readFile(n);return(await fI(s)).toString()}if(r==="main.js"){let s=this.getLegacyBackupPath(t);if(await Xt.pathExists(s)){let i=await Xt.readFile(s);return(await fI(i)).toString()}}return null}async removeBackup(t){let r=this.getPluginBackupDir(t);await Xt.pathExists(r)&&await Xt.remove(r),await this.removeLegacyBackups(t)}async removeLegacyBackups(t){let r=this.getLegacyBackupPath(t);await Xt.pathExists(r)&&await Xt.remove(r);let a=this.getLegacyUncompressedBackupPath(t);await Xt.pathExists(a)&&await Xt.remove(a)}backupTranslationSync(t,r){let a=Wn.join(r,`${t}.json`),n=Wn.join(this.backupDir,"translations",`${t}.json.gz`);try{if(!Xt.existsSync(a))return;Xt.ensureDirSync(Wn.dirname(n));let s=Xt.readFileSync(a),i=jb.gzipSync(s);Xt.writeFileSync(n,i)}catch{}}};var Sn=N(fs()),zb=N(require("path"));UC();lf();var lse="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var r5=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=lse[r[e]&63];return t};Vt();Rr();var VT=class{constructor(t){this.basePath=t,this.sourcesDir=zb.join(t,"translations"),this.metaPath=zb.join(t,"metadata.json"),this.checkpointPath=zb.join(t,"backup-checkpoint.json"),this.meta=this.loadMeta()}loadMeta(){try{if(Sn.existsSync(this.metaPath)){let t=Sn.readJsonSync(this.metaPath);if(t.sources){let r=!1;for(let a of Object.values(t.sources)){!a.origin&&(a.type==="cloud"||a.type==="local")&&(a.origin=a.type,a.type="plugin",r=!0),"pluginId"in a&&!("plugin"in a)&&(a.plugin=a.pluginId,delete a.pluginId,r=!0);for(let n of["language","version","supportedVersions"])n in a&&(delete a[n],r=!0)}r&&(Sn.ensureDirSync(this.sourcesDir),Sn.writeJsonSync(this.metaPath,t,{spaces:2}))}return t}}catch{}return JSON.parse(JSON.stringify(cV))}saveMeta(){try{Sn.ensureDirSync(this.sourcesDir),Sn.writeJsonSync(this.metaPath,this.meta,{spaces:2}),He.getState().triggerSourceUpdate()}catch(t){throw t}}getSource(t){return this.meta.sources[t]||null}deleteSource(t){this.meta.sources[t]&&(delete this.meta.sources[t],this.saveMeta())}clearAll(){this.meta.sources={},Sn.existsSync(this.sourcesDir)&&Sn.emptyDirSync(this.sourcesDir),this.saveMeta()}getAllSources(){return Object.values(this.meta.sources)}getSourcesForPlugin(t){return Object.values(this.meta.sources).filter(r=>r.plugin===t)}getActiveSourceId(t){let r=this.getSourcesForPlugin(t),a=r.find(n=>n.isActive);return!a&&r.length>0?r[0].id:a?.id||null}getActiveSource(t){let r=this.getActiveSourceId(t);return r&&this.meta.sources[r]||null}saveSource(t){let r=Date.now();this.meta.sources[t.id]?this.meta.sources[t.id]={...this.meta.sources[t.id],...t,updatedAt:r}:(t.createdAt=t.createdAt||r,t.updatedAt=r,this.meta.sources[t.id]=t),this.saveMeta()}batchSaveSources(t){let r=Date.now();for(let a of t)this.meta.sources[a.id]?this.meta.sources[a.id]={...this.meta.sources[a.id],...a,updatedAt:r}:(a.createdAt=a.createdAt||r,a.updatedAt=r,this.meta.sources[a.id]=a);this.saveMeta()}removeSource(t){let r=this.meta.sources[t];if(!r)return;let a=r.isActive,n=r.plugin;if(delete this.meta.sources[t],a){let i=this.getSourcesForPlugin(n);i.length>0&&(i[0].isActive=!0,this.saveMeta())}let s=this.getSourceFilePath(t);Sn.existsSync(s)&&Sn.removeSync(s),this.saveMeta()}setActive(t,r){let a=this.meta.sources[t];a&&(r&&Object.values(this.meta.sources).filter(n=>n.plugin===a.plugin).forEach(n=>n.isActive=!1),a.isActive=r,this.saveMeta())}getSourceFilePath(t){return zb.join(this.sourcesDir,`${t}.${I3}`)}getActiveSourcePath(t){let r=this.getActiveSourceId(t);return r?this.getSourceFilePath(r):null}getTranslationPath(t,r){let a=this.getActiveSourcePath(t);return a&&Sn.existsSync(a)?a:""}getPluginIds(){let t=new Set;return Object.values(this.meta.sources).forEach(r=>t.add(r.plugin)),Array.from(t)}hasAnySources(t){return this.getSourcesForPlugin(t).length>0}generateRandomId(){return r5(32)}generateSourceId(t){return r5(32)}saveSourceFile(t,r){let a=zb.join(this.sourcesDir,`${t}.${I3}`);Mx(a,r)}readSourceFile(t){let r=this.getSourceFilePath(t);return $n(r)}getSourceMetadata(t){try{return this.readSourceFile(t)?.metadata||null}catch{return null}}async extractAndSaveSource(t,r,a){let n=this.generateRandomId(),s={id:n,plugin:t,title:a.title||v("func.extract_local"),type:a.type||"plugin",origin:"local",isActive:!0,checksum:xs(r),updatedAt:Date.now(),createdAt:Date.now()};return Object.values(this.meta.sources).filter(i=>i.plugin===t).forEach(i=>i.isActive=!1),this.saveSourceFile(n,r),this.saveSource(s),n}saveCheckpoint(t){try{Sn.writeJsonSync(this.checkpointPath,{...t,timestamp:Date.now()},{spaces:2})}catch{}}loadCheckpoint(){try{if(Sn.existsSync(this.checkpointPath))return Sn.readJsonSync(this.checkpointPath)}catch{}return null}clearCheckpoint(){try{Sn.existsSync(this.checkpointPath)&&Sn.removeSync(this.checkpointPath)}catch{}}};var Ul=N(require("path")),Ws=N(fs());Rr();var pI=class{constructor(t){this.i18n=t}async run(t){if(this.i18n.settings.automaticUpdate){let r=[];r=Object.values(t.plugins.manifests).filter(n=>n.id!=="i18n");let a=0;for(let n of r){let s=this.i18n.stateManager.getPluginState(n.id);s&&s.isApplied&&n.version!=s.pluginVersion&&await this.applyToPlugin(n.id)&&a++}try{let n=this.i18n.app.vault.adapter.getBasePath?Ul.normalize(this.i18n.app.vault.adapter.getBasePath()):"";if(n){let s=Ul.join(n,this.i18n.app.vault.configDir,"themes");if(Ws.existsSync(s)){let i=Ws.readdirSync(s,{withFileTypes:!0});for(let o of i){if(!o.isDirectory())continue;let l=o.name,c=Ul.join(s,l,"manifest.json"),u="0.0.0";if(Ws.existsSync(c))try{let f=Ws.readJsonSync(c);f&&f.version&&(u=f.version)}catch{}let d=this.i18n.stateManager.getThemeState(l);d&&d.isApplied&&u!==d.pluginVersion&&await this.applyToTheme(l)&&a++}}}}catch{}a>0&&this.i18n.notice.successPrefix(v("Settings.Basis.SmartTitle"),`${v("Settings.Basis.SmartUpdate")}${a}${v("Settings.Basis.SmartPlugins")}`)}await this.i18n.stateManager.validateVersions(t)}async applyToPlugin(t){let r=this.i18n.app.plugins.manifests[t];if(!r)return!1;let a=Ul.join(Ul.normalize(this.i18n.app.vault.adapter.getBasePath()),r.dir??"");try{let n=this.i18n.coreManager.getAstTranslator(),s=this.i18n.coreManager.getRegexTranslator(),i=this.i18n.sourceManager.getActiveSourcePath(r.id);if(!i)return!1;let o=$n(i);if(!o||!o.dict)return!1;let l=Object.keys(o.dict);await this.i18n.backupManager.createBackup(r.id,a,l);for(let[u,d]of Object.entries(o.dict)){let f=Ul.join(a,u);if(!Ws.existsSync(f))continue;let p=await this.i18n.backupManager.getBackupContent(r.id,u);if(p||(p=Ws.readFileSync(f).toString()),d.ast&&d.ast.length>0){let m=n.loadCode(p);m&&(p=n.translate(m,d.ast))}d.regex&&d.regex.length>0&&(p=s.translate(p,d.regex)),Ws.writeFileSync(f,p)}if(this.i18n.stateManager.setPluginState(r.id,{id:r.id,isApplied:!0,pluginVersion:r.version,translationVersion:o.metadata?.version||"0.0.0"}),this.i18n.app.plugins.enabledPlugins.has(r.id)){await this.i18n.app.plugins.disablePlugin(r.id);try{if(await this.i18n.app.plugins.enablePlugin(r.id),!this.i18n.app.plugins.enabledPlugins.has(r.id))throw new Error("Plugin failed to load after injection (not in enabledPlugins list)")}catch{await this.i18n.backupManager.restoreBackup(r.id,a);try{await this.i18n.app.plugins.enablePlugin(r.id),this.i18n.notice.warning(v("Manager.Common.Notices.RollbackSuccess",{id:t}))}catch{}throw new Error("ROLLBACK_TRIGGERED")}}return!0}catch(n){if(n.message==="ROLLBACK_TRIGGERED")throw n;return!1}}async applyToTheme(t){let r=Ul.normalize(this.i18n.app.vault.adapter.getBasePath()),a=Ul.join(r,this.i18n.app.vault.configDir,"themes",t),n=Ul.join(a,"theme.css");if(!Ws.existsSync(n))return!1;try{let s="0.0.0",i=Ul.join(a,"manifest.json");if(Ws.existsSync(i))try{let d=Ws.readJsonSync(i);d&&d.version&&(s=d.version)}catch{}let o=this.i18n.sourceManager.getActiveSourcePath(t);if(!o)return!1;let l=$n(o);if(!l||!l.dict)return!1;await this.i18n.backupManager.createBackup(t,a,["theme.css"]);let c=Ws.readFileSync(n).toString();c=c.replace(/\/\* @settings([\s\S]*?)\*\//g,(d,f)=>{let p=f;for(let m of l.dict){let h=m.type,x=m.source,g=m.target;if(x&&g&&x!==g){let y=x.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),b=new RegExp(`^([ \\t]*)(${h}):\\s*(["']?)${y}\\3[ \\t]*(?:\\r?\\n|$)`,"gm");p=p.replace(b,(S,w,P,C)=>`${w}${P}: ${C}${g}${C}
|
|
`)}}return`/* @settings${p}*/`}),Ws.writeFileSync(n,c);let u=l.metadata?.version||"1.0.0";return this.i18n.stateManager.setThemeState(t,{id:t,isApplied:!0,pluginVersion:s,translationVersion:String(u)}),!0}catch{return!1}}};var qT=N(require("path")),cse=N(fs());Rr();Vt();var mI=class{constructor(t){this.updatesMark=!1;this._astTranslator=null;this._regexTranslator=null;this.i18n=t}setupRibbonIcons(){this.i18n.addRibbonIcon("i18n_translate",v("common.i18n"),()=>{this.i18n.view.activateView(Wp)})}async firstRun(){}async checkUpdates(){let t="eondrcode",r="obsidian-i18n",a=await this.i18n.api.github.getLatestRelease(t,r);if(a.state){let n=a.data.tag_name.replace(/^v/,"");if(this.i18n.manifest.version!==n){let s=`${v("Settings.Basis.CheckUpdateNotice")}(${n})
|
|
${a.data.body||""}`;this.i18n.notice.primaryPrefix(v("Settings.Basis.CheckUpdatePrefix"),s,15e3),this.updatesMark=!0,this.updatesVersion=n}}}async activateIMT(){await O2(this.i18n.settings),this.i18n.settings.modeImt=!0,this.i18n.saveSettings()}deactivateIMT(){F2(),this.i18n.settings.modeImt=!1,this.i18n.saveSettings()}getCss(){let t=qT.join(qT.join(qT.normalize(this.i18n.app.vault.adapter.getBasePath()),this.i18n.manifest.dir),"styles.css");this.css=cse.readFileSync(t).toString(),this.i18n.css=this.css;try{this.i18n.sharedStyleSheet=new CSSStyleSheet,this.i18n.sharedStyleSheet.replaceSync(this.css)}catch(r){this.i18n.logger.error("Failed to precompile CSSStyleSheet:",r)}}getAstTranslator(){return this._astTranslator||(this._astTranslator=new yi(this.i18n.settings)),this._astTranslator}getRegexTranslator(){return this._regexTranslator||(this._regexTranslator=new Hi(this.i18n.settings)),this._regexTranslator}resetTranslators(){this._astTranslator=null,this._regexTranslator=null}};var fse=N(require("path"));Vt();var eJe=N(wE()),tJe=N(Le());var a5=N(Le());var use=N(ce());var ZYe=N(Le());er();var dse=N(ce());var hse=require("obsidian");Rr();lf();var yc=N(fs()),n5=N(require("path")),rJe=24*60*60*1e3,pse="eondrcode/obsidian-i18n-resources",mse={repos:{},summary:{totalRepos:0,totalPlugins:0,totalTranslations:0,totalContributors:0,totalStars:0,languageDistribution:{}},lastUpdated:new Date().toISOString(),leaderboard:{topReposByStars:[],topReposByActivity:[],topAuthors:[]}},hI=class{constructor(t){this.i18n=t;let r=this.i18n.app.vault.adapter.getBasePath();this.cacheDir=n5.join(r,this.i18n.manifest.dir||"","cache"),yc.ensureDirSync(this.cacheDir)}async getRegistry(t=!1){return this.getCachedOrFetch("registry.json",async()=>{let[r,a]=pse.split("/"),n=await this.i18n.api.github.getFileContentWithFallback(r,a,"registry.json");if(!n.state)throw new Error("Failed to fetch registry.json");return n.data},t)}async getStats(t=!1){try{return await this.getCachedOrFetch("stats.json",async()=>{let[r,a]=pse.split("/"),n=await this.i18n.api.github.getFileContentWithFallback(r,a,"stats.json");return!n.state||!n.data?mse:n.data},t)}catch{return mse}}invalidate(){try{yc.existsSync(this.cacheDir)&&yc.emptyDirSync(this.cacheDir)}catch{}}async getCachedOrFetch(t,r,a){let n=n5.join(this.cacheDir,t);if(!a&&yc.existsSync(n))try{let i=yc.readJsonSync(n);if(Date.now()-i.fetchedAt<rJe)return i.data}catch{}let s=await r();try{let i={data:s,fetchedAt:Date.now()};yc.writeJsonSync(n,i,{spaces:2})}catch{}return s}};var gI=class{constructor(t,r){this.app=t,this.historyPath=`${r}/auto-history.json`}async loadHistory(){try{let t=this.app.vault.adapter;if(await t.exists(this.historyPath)){let r=await t.read(this.historyPath);return JSON.parse(r)}}catch{}return[]}async saveHistory(t){try{let r=this.app.vault.adapter,a=this.historyPath.split("/").slice(0,-1).join("/");await r.exists(a)||await r.mkdir(a);let n=t.slice(0,50);await r.write(this.historyPath,JSON.stringify(n,null,2))}catch{}}async addRecord(t,r){let a=await this.loadHistory(),n=r.filter(u=>u.status==="success").length,s=r.filter(u=>u.status==="error").length,i=r.filter(u=>u.status==="skipped").length,o=r.filter(u=>u.status==="up_to_date").length,l=r.filter(u=>u.status==="discovered_new"||u.status==="discovered_update").length,c={id:Date.now().toString(),time:Date.now(),trigger:t,summary:{total:r.length,success:n,error:s,skipped:i,discovered:l,upToDate:o},details:JSON.stringify(r.filter(u=>u.status!=="pending"&&u.status!=="skipped"))};return a.unshift(c),await this.saveHistory(a),c}async clear(){await this.saveHistory([])}};var HT=class{constructor(t){this.isRunning=!1;this.manifestCache=[];this.i18n=t,this.registryCache=new hI(t),this.historyManager=new gI(t.app,t.manifest.dir||"")}async initialize(){this.syncStore()}async syncStore(){let t=ng.getState(),r=await this.historyManager.loadHistory(),a=this.i18n.stateManager.getAllPluginStates(),n=this.i18n.stateManager.getAllThemeStates(),s=[...Object.values(a),...Object.values(n)].filter(i=>i.isApplied).length;t.hydrate(this.i18n.settings,{appliedCount:s,history:r})}async runDiscovery(){if(this.i18n.settings.autoDiscovery)return this.runSmartAuto({silent:!0,isDiscovery:!0})}async checkAndRunDiscovery(){if(!this.i18n.settings.autoDiscovery||this.isRunning)return;let t=Date.now(),r=this.i18n.settings.lastAutoCheckTime||0,a=this.i18n.settings.autoCheckInterval*60*60*1e3;a!==0&&t-r>=a&&await this.runSmartAuto({isDiscovery:!0,isIncremental:!0,silent:!0})}async runSmartAuto(t={}){let r=ng.getState();if(this.isRunning){t.silent||new hse.Notice(v("Manager.Status.Running"));return}let a=t.silent;this.isRunning=!0,r.setStatus("running"),r.clearAll(),a||this.i18n.notice.info(v("Manager.Status.AutoStarting"));try{await this.i18n.stateManager.validateVersions(this.i18n.app);let n=this.i18n.settings.autoTrustedRepos;if(!n||n.length===0){r.setStatus("error"),a||this.i18n.notice.warning(v("Manager.Errors.NoTrustedRepos"));return}let[s,i]=await Promise.all([this.registryCache.getRegistry(),this.registryCache.getStats()]),o=this.getInstalledPlugins(),l=await this.getInstalledThemes(),c=[...o,...l],u=new Set(this.i18n.settings.autoExcludeList||[]);if(c=c.filter(P=>!u.has(P.id)),(t.isIncremental||t.isDiscovery)&&(c=c.filter(P=>{let C=P.type==="theme"?this.i18n.stateManager.getThemeState(P.id):this.i18n.stateManager.getPluginState(P.id);return!C||!C.isApplied||P.version!==C.pluginVersion}),c.length===0)){r.setStatus("success"),this.isRunning=!1;return}r.initTasks(c.map(P=>({id:P.id,type:P.type,name:P.id,status:"pending"}))),a||this.i18n.notice.info(v("Manager.Status.ScanningInstalled",{count:c.length}));let d=new Set(n),f=s.filter(P=>d.has(P.repoAddress));if(f.length===0){r.setStatus("error"),a||this.i18n.notice.warning(v("Manager.Errors.TrustedRepoNotInRegistry"));return}let p=5;this.manifestCache=[];for(let P=0;P<f.length;P+=p){let C=f.slice(P,P+p);await Promise.all(C.map(async I=>{let[R,O]=I.repoAddress.split("/"),D=await this.i18n.api.github.getFileContentWithFallback(R,O,"metadata.json");D.state&&Array.isArray(D.data)&&D.data.forEach(W=>{this.manifestCache.push({repoAddress:I.repoAddress,entry:W})})})),P+p<f.length&&await new Promise(I=>setTimeout(I,500))}let m=this.manifestCache,h=0,x=0,g=0,y=0,b=0;for(let P of c){if(!this.isRunning)break;b++,r.setProgress(b,c.length);try{if(this.i18n.settings.autoExcludeList.includes(P.id)){x++,r.updateTaskStatus(P.id,"skipped",v("Manager.Auto.Status.SkipReasons.Exclusion"));continue}r.updateTaskStatus(P.id,"processing");let C=m.filter(O=>O.entry.plugin===P.id);if(C.length===0){x++,r.updateTaskStatus(P.id,"skipped",v("Manager.Auto.Status.SkipReasons.NoMatch"));continue}let{match:I,scoreInfo:R}=this.selectBestTranslation(C,i,P.version,this.i18n.settings.language,P.type==="theme");if(I){let O=this.i18n.sourceManager.getSource(I.entry.id),D=P.type==="theme"?this.i18n.stateManager.getThemeState(P.id):this.i18n.stateManager.getPluginState(P.id),W=O&&O.cloud?.hash===I.entry.hash,J=D&&String(D.translationVersion)===String(I.entry.version),me=D&&D.pluginVersion===P.version;if(D?.isApplied===!0&&W&&J&&me){r.updateTaskStatus(P.id,"up_to_date",void 0,I.repoAddress,String(I.entry.version),R),g++;continue}if(t.isDiscovery||!this.i18n.settings.autoApply){h++;let V=O?"discovered_update":"discovered_new";r.updateTaskStatus(P.id,V,void 0,I.repoAddress,String(I.entry.version),R);continue}if(W){this.i18n.sourceManager.setActive(I.entry.id,!0),(P.type==="theme"?await this.i18n.injectorManager.applyToTheme(P.id):await this.i18n.injectorManager.applyToPlugin(P.id))?(h++,r.updateTaskStatus(P.id,"success",void 0,I.repoAddress,String(I.entry.version),R)):(y++,r.updateTaskStatus(P.id,"error","Cache apply failed"));continue}await this.applyTranslation(I,P.type)?(h++,r.updateTaskStatus(P.id,"success",void 0,I.repoAddress,String(I.entry.version),R)):(y++,r.updateTaskStatus(P.id,"error",v("Manager.Errors.ApplyFailed")))}else x++,r.updateTaskStatus(P.id,"skipped",v("Manager.Auto.Status.SkipReasons.NoVersion"))}catch(C){C.message==="ROLLBACK_TRIGGERED"?r.updateTaskStatus(P.id,"error",v("Manager.Status.AutoRollbacked")):r.updateTaskStatus(P.id,"error",C.message||"Unknown Error"),y++}}t.isDiscovery&&h>0&&!a&&this.i18n.notice.info(v("Manager.Auto.Status.DiscoveryComplete",{count:h}),5e3),r.setStatus(y>0?"error":"success"),this.i18n.settings.lastAutoCheckTime=Date.now(),await this.i18n.saveSettings();let S=t.isDiscovery?"discovery":t.isIncremental?"startup":"manual",w=await this.historyManager.addRecord(S,r.tasks);r.addHistory(w),this.syncStore()}catch(n){r.setStatus("error"),a||this.i18n.notice.error(`${v("Manager.Errors.AutoFailed")}: ${n.message||n}`)}finally{this.isRunning=!1}}async retryTask(t,r){let a=ng.getState();a.updateTaskStatus(t,"processing");try{let n="0.0.0";if(r==="plugin"){let p=this.i18n.app.plugins.manifests[t];p&&(n=p.version)}else{let m=(await this.getInstalledThemes()).find(h=>h.id===t);m&&(n=m.version)}let[s,i]=await Promise.all([this.registryCache.getRegistry(),this.registryCache.getStats()]),o=new Set(this.i18n.settings.autoTrustedRepos||[]),l=s.filter(p=>o.has(p.repoAddress));if(l.length===0){a.updateTaskStatus(t,"error",v("Manager.Errors.TrustedRepoNotInRegistry"));return}let c=[];for(let p of l){let[m,h]=p.repoAddress.split("/");try{let x=await this.i18n.api.github.getFileContentWithFallback(m,h,"metadata.json");x.state&&Array.isArray(x.data)&&x.data.forEach(g=>{c.push({repoAddress:p.repoAddress,entry:g})})}catch{}}let u=c.filter(p=>p.entry.plugin===t);if(u.length===0){a.updateTaskStatus(t,"skipped",v("Manager.Auto.Status.SkipReasons.NoMatch"));return}let{match:d}=this.selectBestTranslation(u,i,n,this.i18n.settings.language,r==="theme");if(!d){a.updateTaskStatus(t,"skipped",v("Manager.Auto.Status.SkipReasons.NoVersion"));return}await this.applyTranslation(d,r)?a.updateTaskStatus(t,"success",void 0,d.repoAddress,String(d.entry.version)):a.updateTaskStatus(t,"error","Download or injection failed")}catch(n){a.updateTaskStatus(t,"error",n.message||"Unknown error")}}invalidateCache(){this.registryCache.invalidate()}async verifyRepo(t){try{if((await this.registryCache.getRegistry()).some(o=>o.repoAddress===t))return!0;let[n,s]=t.split("/");return(await this.i18n.api.github.getFileContentWithFallback(n,s,"metadata.json")).state===!0}catch{return!1}}getInstalledPlugins(){let t=this.i18n.app.plugins.manifests;return Object.values(t).filter(r=>r.id!==this.i18n.manifest.id).map(r=>({id:r.id,name:r.name,version:r.version,type:"plugin"}))}async getInstalledThemes(){let t=[];try{let r=this.i18n.app.vault.adapter,a=`${this.i18n.app.vault.configDir}/themes`;if(await r.exists(a)){let n=await r.list(a);for(let s of n.folders){let i=s.split("/").pop();if(i){let o="0.0.0";try{let l=`${s}/manifest.json`;if(await r.exists(l)){let c=JSON.parse(await r.read(l));c?.version&&(o=c.version)}}catch{}t.push({id:i,name:i,version:o,type:"theme"})}}}}catch{}return t}isVersionCompatible(t,r){if(t===r)return 100;let a=t.split(".").map(Number),n=r.split(".").map(Number);return a[0]===n[0]?50:0}async applyBatchDiscovered(t){let r=ng.getState();r.setStatus("running");let a=0,n=0;this.manifestCache.length;let s=await this.registryCache.getStats();for(let i of t){let o=r.tasks.find(h=>h.id===i);if(!o)continue;let l=this.manifestCache.filter(h=>h.entry.plugin===i);if(l.length===0){n++,r.updateTaskStatus(i,"error",v("Manager.Auto.Errors.NoCachedManifest"));continue}let u=[...Object.values(this.i18n.app.plugins.manifests).map(h=>({...h,type:"plugin"})),...(await this.getInstalledThemes()).map(h=>({...h,type:"theme"}))].find(h=>h.id===i);if(!u)continue;let{match:d,scoreInfo:f}=this.selectBestTranslation(l,s,u.version,this.i18n.settings.language,u.type==="theme");if(!d){n++,r.updateTaskStatus(i,"error",v("Manager.Auto.Errors.NoBestMatch"));continue}r.updateTaskStatus(i,"processing");let p=this.i18n.sourceManager.getSource(d.entry.id);if(p&&p.cloud?.hash===d.entry.hash){this.i18n.sourceManager.setActive(d.entry.id,!0),(o.type==="theme"?await this.i18n.injectorManager.applyToTheme(i):await this.i18n.injectorManager.applyToPlugin(i))?(a++,r.updateTaskStatus(i,"success",void 0,d.repoAddress,String(d.entry.version),f)):(n++,r.updateTaskStatus(i,"error",v("Manager.Auto.Errors.LocalApplyFailed")));continue}await this.applyTranslation(d,o.type)?(a++,r.updateTaskStatus(i,"success",void 0,d.repoAddress,String(d.entry.version),f)):(n++,r.updateTaskStatus(i,"error","Download/Apply failed"))}r.setStatus("success"),this.i18n.notice.success(v("Manager.Auto.Log.BatchComplete",{success:a,fail:n})),this.syncStore()}selectBestTranslation(t,r,a,n,s){let i=this.i18n.settings.autoMatchStrategy||"comprehensive",o=t.filter(c=>c.entry.language===n);o.length===0&&(o=t);let l=o.map(c=>{let u=r.repos[c.repoAddress]||{},d=u.stars||0,f=u.activityScore||0,p=u.pluginCount||0,h=(s?50:this.isVersionCompatible(c.entry.supported_versions||"",a))/100*50,x=Math.min(d/500*20,20),g=Math.min(f*10,10),y=x+g,b=new Date(c.entry.updated_at||0).getTime(),S=(Date.now()-b)/(1e3*60*60*24),w=0;S<=30?w=20:S<=90?w=15:S<=180?w=10:S<=365&&(w=5);let P=0;switch(i){case"version_first":P=h*1.5+y*.5+w*.5;break;case"popularity":P=h*.5+y*1.5+w*.5;break;case"latest_update":P=h*.5+y*.5+w*1.5;break;default:P=h+y+w}return P=Math.min(Math.round(P),100),{...c,score:P,breakdown:{version:Math.round(h),popularity:Math.round(y),freshness:Math.round(w),total:P}}});return l.sort((c,u)=>u.score-c.score),{match:l[0]||null,scoreInfo:l[0]?.breakdown||{version:0,popularity:0,freshness:0,total:0}}}async applyTranslation(t,r){let[a,n]=t.repoAddress.split("/"),s=po(t.entry.id,r);try{let i=await this.i18n.api.github.getFileContentWithFallback(a,n,s);if(!i.state||!i.data)return!1;let o=i.data,l=this.i18n.sourceManager,c=l.getSource(t.entry.id);c&&this.i18n.backupManager.backupTranslationSync(c.id,l.sourcesDir),l.saveSourceFile(t.entry.id,o);let u={id:t.entry.id,plugin:t.entry.plugin,title:t.entry.title,type:t.entry.type,origin:"cloud",isActive:!0,checksum:xs(o),cloud:{owner:a,repo:n,hash:t.entry.hash},updatedAt:Date.now(),createdAt:c?.createdAt||Date.now()};return l.saveSource(u),l.setActive(t.entry.id,!0),r==="theme"?await this.i18n.injectorManager.applyToTheme(t.entry.plugin):await this.i18n.injectorManager.applyToPlugin(t.entry.plugin)}catch{return!1}}};Vt();Vt();var bse=N(Le()),vse=N(wE());var mo=N(Le()),xc=require("obsidian"),xI=N(require("path"));var $T=require("obsidian");async function gse(e,t){let r=[],a=e.trim();if(!a)return r;let n=t.stateManager.getAllPluginStates(),s=Object.keys(n).filter(i=>n[i].isApplied);for(let i of s){let o=t.sourceManager.getActiveSourcePath(i);if(!o)continue;let l=$n(o);if(!(!l||!l.dict))for(let[c,u]of Object.entries(l.dict))(u.ast||[]).filter(p=>p.target===a||p.source===a).forEach(p=>{r.push({pluginId:i,file:c,type:p.type,name:p.name,source:p.source,target:p.target})})}return r}var yI=class{constructor(t,r){this.active=!1;this.i18n=t,this.onDeactivate=r}isActive(){return this.active}activate(){if(this.active)return;this.active=!0,document.body.style.cursor="help";let t=document.createElement("style");t.id="i18n-ast-inspector-style",t.innerHTML=`
|
|
.i18n-inspect-target {
|
|
outline: 2px solid #9c27b0 !important;
|
|
outline-offset: -2px !important;
|
|
background-color: rgba(156, 39, 176, 0.2) !important;
|
|
transition: outline 0.1s ease !important;
|
|
cursor: help !important;
|
|
}
|
|
* {
|
|
pointer-events: auto !important;
|
|
}
|
|
`,document.head.appendChild(t);let r=s=>{let i=s.target;document.querySelectorAll(".i18n-inspect-target").forEach(o=>o.classList.remove("i18n-inspect-target")),i.classList.add("i18n-inspect-target")},a=async s=>{s.preventDefault(),s.stopPropagation();let i=s.target,o=(i.innerText||i.textContent||"").trim();if(o){let l=await gse(o,this.i18n);l.length>0?(new $T.Notice(`\u627E\u5230 ${l.length} \u4E2A AST \u5339\u914D\u9879\uFF0C\u8BE6\u60C5\u8BF7\u67E5\u770B\u63A7\u5236\u53F0`,5e3),l.slice(0,2).forEach(c=>{new $T.Notice(`[${c.pluginId}] ${c.type}:${c.name}
|
|
Source: ${c.source}`,8e3)})):new $T.Notice("\u672A\u80FD\u5728\u5DF2\u5E94\u7528\u7684\u7FFB\u8BD1\u5B57\u5178\u4E2D\u627E\u5230\u5339\u914D\u9879",3e3)}else new $T.Notice("\u9009\u4E2D\u7684\u5143\u7D20\u6CA1\u6709\u53EF\u62FE\u53D6\u7684\u6587\u672C",2e3)},n=s=>{s.key==="Escape"&&this.deactivate()};window.addEventListener("mouseover",r,!0),window.addEventListener("click",a,!0),window.addEventListener("keydown",n,!0),this._handlers={handleMouseOver:r,handleClick:a,handleKeyDown:n}}deactivate(){if(!this.active)return;this.active=!1,document.body.style.cursor="",document.getElementById("i18n-ast-inspector-style")?.remove(),document.querySelectorAll(".i18n-inspect-target").forEach(n=>n.classList.remove("i18n-inspect-target"));let{handleMouseOver:t,handleClick:r,handleKeyDown:a}=this._handlers;window.removeEventListener("mouseover",t,!0),window.removeEventListener("click",r,!0),window.removeEventListener("keydown",a,!0),this.onDeactivate&&this.onDeactivate()}};var Xs=N(ce()),yse=({i18n:e})=>{let[t,r]=(0,mo.useState)(!1),[a,n]=(0,mo.useState)(()=>{let I=localStorage.getItem("i18n-debug-pos");return I?JSON.parse(I):{x:window.innerWidth-260,y:100}}),[s,i]=(0,mo.useState)(!1),o=(0,mo.useRef)({x:0,y:0}),l=(0,mo.useRef)(null),[c,u]=(0,mo.useState)(!1),d=(0,mo.useRef)(null);(0,mo.useEffect)(()=>(d.current=new yI(e,()=>u(!1)),()=>{d.current?.deactivate()}),[e]);let[f,p]=(0,mo.useState)(document.body.classList.contains("theme-dark"));(0,mo.useEffect)(()=>{let I=()=>p(document.body.classList.contains("theme-dark")),R=new MutationObserver(I);return R.observe(document.body,{attributes:!0,attributeFilter:["class"]}),()=>R.disconnect()},[]);let m=I=>{if(l.current){let R=l.current.getBoundingClientRect();o.current={x:I.clientX-R.left,y:I.clientY-R.top},i(!0)}};(0,mo.useEffect)(()=>{let I=O=>{if(!s)return;let D={x:Math.max(0,Math.min(O.clientX-o.current.x,window.innerWidth-240)),y:Math.max(0,Math.min(O.clientY-o.current.y,window.innerHeight-100))};n(D),localStorage.setItem("i18n-debug-pos",JSON.stringify(D))},R=()=>i(!1);return s&&(window.addEventListener("mousemove",I),window.addEventListener("mouseup",R)),()=>{window.removeEventListener("mousemove",I),window.removeEventListener("mouseup",R)}},[s]);let h=async()=>{r(!0);try{await e.app.plugins.disablePlugin(e.manifest.id),await e.app.plugins.enablePlugin(e.manifest.id),new xc.Notice("I18N: \u63D2\u4EF6\u5DF2\u91CD\u8F7D")}finally{r(!1)}},x=()=>{new xc.Notice("\u5FEB\u7167\u5DF2\u5B58\u81F3\u63A7\u5236\u53F0")},g=async()=>{if(!confirm("\u6E05\u7406\u4E91\u7AEF\u7F13\u5B58\uFF1F"))return;let I=e.sourceManager;I.getAllSources().filter(R=>R.origin==="cloud").forEach(R=>I.deleteSource(R.id)),new xc.Notice("\u7F13\u5B58\u5DF2\u6E05\u7406")},y=()=>e.autoManager.runSmartAuto(),b=async()=>{if(confirm("\u786E\u5B9A\u8981\u8FD8\u539F\u6240\u6709\u5DF2\u5E94\u7528\u7FFB\u8BD1\u7684\u63D2\u4EF6\u5417\uFF1F\u8FD9\u5C06\u6062\u590D\u6E90\u7801\u5907\u4EFD\u3002")){r(!0);try{let I=Object.values(e.stateManager.getAllPluginStates()),R=0;for(let O of I)if(O.isApplied){let D=e.app.plugins.manifests[O.id];if(!D)continue;let W=xI.join(xI.normalize(e.app.vault.adapter.getBasePath()),D.dir??"");await e.backupManager.restoreBackup(O.id,W)&&(e.stateManager.setPluginState(O.id,{...O,isApplied:!1}),e.app.plugins.enabledPlugins.has(O.id)&&(await e.app.plugins.disablePlugin(O.id),await e.app.plugins.enablePlugin(O.id)),R++)}new xc.Notice(`\u5DF2\u6210\u529F\u8FD8\u539F ${R} \u4E2A\u63D2\u4EF6`)}catch{new xc.Notice("\u8FD8\u539F\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u63A7\u5236\u53F0")}finally{r(!1)}}},S=async()=>{if(confirm("\u786E\u5B9A\u8981\u5F3A\u5236\u91CD\u65B0\u5E94\u7528\u6240\u6709\u5F53\u524D\u7FFB\u8BD1\u5417\uFF1F")){r(!0);try{let I=Object.values(e.stateManager.getAllPluginStates()),R=0;for(let O of I)O.isApplied&&await e.injectorManager.applyToPlugin(O.id)&&R++;new xc.Notice(`\u5DF2\u91CD\u65B0\u5E94\u7528 ${R} \u4E2A\u63D2\u4EF6\u7FFB\u8BD1`)}catch{new xc.Notice("\u66FF\u6362\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u63A7\u5236\u53F0")}finally{r(!1)}}},w=async()=>{if(!confirm("\u{1F6D1} \u8B66\u544A\uFF1A\u786E\u5B9A\u8981\u5220\u9664\u6240\u6709\u672C\u5730\u7FFB\u8BD1\u6587\u4EF6\u5417\uFF1F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\uFF01"))return;let I=confirm(`\u5728\u5220\u9664\u6587\u4EF6\u524D\uFF0C\u662F\u5426\u5148\u5C06\u6240\u6709\u63D2\u4EF6\u8FD8\u539F\u4E3A\u539F\u59CB\u6E90\u7801\u72B6\u6001\uFF1F
|
|
(\u5EFA\u8BAE\u9009\u62E9\u201C\u662F\u201D\uFF0C\u5426\u5219\u5DF2\u88AB\u7FFB\u8BD1\u7684\u63D2\u4EF6\u5C06\u4FDD\u6301\u7FFB\u8BD1\u72B6\u6001\u4E14\u65E0\u6CD5\u901A\u8FC7\u63D2\u4EF6\u8FD8\u539F)`);r(!0);try{I&&await b(),e.sourceManager.clearAll(),e.stateManager.clearAllStates(),new xc.Notice("\u6240\u6709\u7FFB\u8BD1\u6587\u4EF6\u53CA\u91CD\u7F6E\u72B6\u6001\u5DF2\u6E05\u7406\u5B8C\u6BD5")}catch{new xc.Notice("\u6E05\u7406\u5931\u8D25\uFF0C\u8BF7\u67E5\u770B\u63A7\u5236\u53F0")}finally{r(!1)}},P=()=>{c?(d.current?.deactivate(),u(!1)):(d.current?.activate(),u(!0),new xc.Notice("AST \u76D1\u542C\u6A21\u5F0F\u5DF2\u5F00\u542F\uFF1A\u70B9\u51FB\u754C\u9762\u5143\u7D20\u67E5\u770B\u6E90\u7801\u4FE1\u606F",3e3))},C=f?{bg:"#1e1e1e",border:"#444",text:"#ddd",headerBg:"#4a1515",btnBg:"#333",btnHover:"#444"}:{bg:"#fff",border:"#ccc",text:"#333",headerBg:"#fee2e2",btnBg:"#f3f4f6",btnHover:"#e5e7eb"};return(0,Xs.jsxs)("div",{ref:l,style:{position:"fixed",left:a.x+"px",top:a.y+"px",width:"240px",backgroundColor:C.bg,border:`1px solid ${C.border}`,borderRadius:"8px",boxShadow:"0 10px 25px rgba(0,0,0,0.2)",zIndex:1e4,color:C.text,fontFamily:"sans-serif",overflow:"hidden",userSelect:"none"},children:[(0,Xs.jsxs)("div",{onMouseDown:m,style:{padding:"10px 12px",backgroundColor:C.headerBg,cursor:"move",display:"flex",alignItems:"center",justifyContent:"space-between",fontWeight:"bold",fontSize:"12px",borderBottom:`1px solid ${C.border}`},children:[(0,Xs.jsx)("span",{children:"\u{1F6E0}\uFE0F I18N DEBUGGER"}),(0,Xs.jsx)("span",{style:{fontSize:"10px",opacity:.7},children:"DEV"})]}),(0,Xs.jsxs)("div",{style:{padding:"12px",display:"grid",gridTemplateColumns:"1fr 1fr",gap:"8px"},children:[(0,Xs.jsx)("button",{onClick:h,disabled:t,style:{padding:"8px",fontSize:"11px",backgroundColor:C.btnBg,color:C.text,border:`1px solid ${C.border}`,borderRadius:"4px",cursor:"pointer"},children:t?"\u267B\uFE0F...":"\u267B\uFE0F \u91CD\u8F7D"}),(0,Xs.jsx)("button",{onClick:x,style:{padding:"8px",fontSize:"11px",backgroundColor:C.btnBg,color:C.text,border:`1px solid ${C.border}`,borderRadius:"4px",cursor:"pointer"},children:"\u{1F4F8} \u5FEB\u7167"}),(0,Xs.jsx)("button",{onClick:y,style:{padding:"8px",fontSize:"11px",backgroundColor:C.btnBg,color:C.text,border:`1px solid ${C.border}`,borderRadius:"4px",cursor:"pointer"},children:"\u26A1 \u540C\u6B65"}),(0,Xs.jsx)("button",{onClick:g,style:{padding:"8px",fontSize:"11px",backgroundColor:C.btnBg,color:C.text,border:`1px solid ${C.border}`,borderRadius:"4px",cursor:"pointer"},children:"\u{1F5D1}\uFE0F \u6E05\u7406"}),(0,Xs.jsx)("button",{onClick:P,style:{padding:"8px",fontSize:"11px",backgroundColor:c?f?"#4a1515":"#fee2e2":C.btnBg,color:c?f?"#ff9999":"#c53030":C.text,border:`1px solid ${c?f?"#ff4444":"#f87171":C.border}`,borderRadius:"4px",cursor:"pointer",gridColumn:"span 2",fontWeight:c?"bold":"normal"},children:c?"\u{1F6D1} \u505C\u6B62\u76D1\u542C":"\u{1F50D} \u76D1\u542C AST"}),(0,Xs.jsx)("button",{onClick:b,disabled:t,style:{padding:"8px",fontSize:"11px",backgroundColor:f?"#2d1a1a":"#fff1f1",color:f?"#ff9999":"#c53030",border:`1px solid ${f?"#5c2d2d":"#fbcfe8"}`,borderRadius:"4px",cursor:"pointer",gridColumn:"span 2"},children:"\u23EA \u4E00\u952E\u8FD8\u539F (\u6062\u590D\u6E90\u7801)"}),(0,Xs.jsx)("button",{onClick:S,disabled:t,style:{padding:"8px",fontSize:"11px",backgroundColor:f?"#1a2d1a":"#f1fff1",color:f?"#99ff99":"#2f855a",border:`1px solid ${f?"#2d5c2d":"#c6f6d5"}`,borderRadius:"4px",cursor:"pointer",gridColumn:"span 2"},children:"\u{1F504} \u4E00\u952E\u66FF\u6362 (\u91CD\u65B0\u7FFB\u8BD1)"}),(0,Xs.jsx)("button",{onClick:w,disabled:t,style:{padding:"8px",fontSize:"11px",backgroundColor:f?"#3d0a0a":"#742a2a",color:"#fff",border:"1px solid #000",borderRadius:"4px",cursor:"pointer",gridColumn:"span 2",marginTop:"4px",fontWeight:"bold"},children:"\u{1F480} \u5F7B\u5E95\u5220\u9664\u6240\u6709\u8BD1\u6587"})]}),(0,Xs.jsxs)("div",{style:{padding:"8px 12px",fontSize:"10px",opacity:.6,borderTop:`1px solid ${C.border}`},children:["AutoUpdate: ",e.settings.automaticUpdate?"\u2705":"\u274C",(0,Xs.jsx)("br",{}),"Native HTML/CSS Debugger."]})]})};var GT=class extends xse.Plugin{constructor(){super(...arguments);this.activeSettingTab="basis";this.devRoot=null}async onload(){$C(this),R_(),ase(this.app,this),await this.loadSettings(),this.initManagers(),this.coreManager.getCss(),this.settings.agreement?(this.initViews(),this.initCores(),this.coreManager.setupRibbonIcons(),He.getState().setI18n(this),this.addSettingTab(new IS(this.app,this)),this.registerInterval(window.setInterval(()=>{this.autoManager.checkAndRunDiscovery()},30*60*1e3)),setTimeout(()=>{this.autoManager.checkAndRunDiscovery()},30*1e3)):(this.view.addView(DT,r=>new tI(r,this),!0),this.view.activateView(DT))}async onunload(){this.view.deactivateAllViews(),this.settings.modeImt&&this.coreManager.deactivateIMT(),this.cleanupDevDebug()}async loadSettings(){if(this.settings=Object.assign({},dw,await this.loadData()),typeof this.settings.llmApi=="number"){let r={1:"openai",2:"gemini",3:"ollama",4:"deepseek",5:"zhipu",6:"moonshot",7:"aliyun",8:"baidu",9:"bytedance",10:"groq",11:"siliconflow",12:"openrouter",13:"deepinfra",14:"mistral",15:"minimax",16:"stepfun"};this.settings.llmApi=r[this.settings.llmApi]||"openai",await this.saveSettings()}await this.migrateLLMProfiles()}async saveSettings(){await this.saveData(this.settings)}async migrateLLMProfiles(){let r=!1;Object.values(Dt).forEach(a=>{let n=`llm${a.labelKey}Profiles`,s=`llm${a.labelKey}ActiveProfileId`,i=this.settings[n];if(!i||i.length===0){let u=`llm${a.labelKey}Url`,d=`llm${a.labelKey}Key`,f=`llm${a.labelKey}Model`,p={id:"default",name:"Default",url:this.settings[u]||a.baseUrl||"",key:this.settings[d]||"",model:this.settings[f]||a.defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0};this.settings[n]=[p],this.settings[s]="default",r=!0}else i.forEach(u=>{u.useCustomPrice===void 0&&(u.useCustomPrice=!1,u.priceInput=0,u.priceOutput=0,r=!0)});let o=`llm${a.labelKey}Url`,l=`llm${a.labelKey}Key`,c=`llm${a.labelKey}Model`;this.settings[o]!==void 0&&(delete this.settings[o],r=!0),this.settings[l]!==void 0&&(delete this.settings[l],r=!0),this.settings[c]!==void 0&&(delete this.settings[c],r=!0)}),this.settings.llmUseCustomPrice!==void 0&&(delete this.settings.llmUseCustomPrice,r=!0),this.settings.llmPriceInputCustom!==void 0&&(delete this.settings.llmPriceInputCustom,r=!0),this.settings.llmPriceOutputCustom!==void 0&&(delete this.settings.llmPriceOutputCustom,r=!0),r&&await this.saveSettings()}initManagers(){this.logger=yu.getInstance(),this.notice=og.getInstance(this),this.view=Ub.getInstance(this),this.api=Bb.getInstance(this),this.stateManager=new jT(this);let r=Vb.join(Vb.normalize(this.app.vault.adapter.getBasePath()),this.manifest.dir);this.backupManager=new zT(r);let a=Vb.join(Vb.normalize(this.app.vault.adapter.getBasePath()),this.manifest.dir);this.sourceManager=new VT(a),this.injectorManager=new pI(this),this.coreManager=new mI(this),this.autoManager=new HT(this)}initViews(){this.view.addView(jp,r=>new XA(r,this),!0),this.view.addView(Nb,r=>new QA(r,this),!0),this.view.addView(Mb,r=>new UT(r,this),!0),this.view.addView(Wp,r=>new dI(r,this),!0),this.view.addView(Rb,r=>new ZA(r,this),!0)}async initCores(){this.coreManager.firstRun(),this.settings.checkUpdates&&this.coreManager.checkUpdates(),this.settings.automaticUpdate&&await this.injectorManager.run(this.app),await this.autoManager.initialize(),this.settings.autoDiscovery&&await this.autoManager.runDiscovery(),this.settings.modeImt&&this.coreManager.activateIMT(),await this.stateManager.cleanupRemovedResources(this.app)}async onAgreementAccepted(){this.initViews(),await this.initCores(),this.coreManager.setupRibbonIcons(),this.addSettingTab(new IS(this.app,this)),He.getState().setI18n(this),this.view.deactivateView(DT),this.view.activateView(Rb)}shareLoad(r,a,n){this.shareType=r,this.sharePath=a,this.shareObj=n}initDevDebug(){}cleanupDevDebug(){if(this.devRoot){this.devRoot.unmount();let r=document.body.querySelector(".i18n-dev-debug-container");r&&r.remove(),this.devRoot=null}}};var aJe=GT;
|
|
//# sourceMappingURL=main.js.map
|