219 lines
772 KiB
JavaScript
219 lines
772 KiB
JavaScript
/*
|
|
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
|
if you want to view the source, please visit the github repository of this plugin
|
|
*/
|
|
|
|
var sM=Object.create;var Cs=Object.defineProperty;var lM=Object.getOwnPropertyDescriptor;var cM=Object.getOwnPropertyNames;var uM=Object.getPrototypeOf,dM=Object.prototype.hasOwnProperty;var fM=(e,t,n)=>t in e?Cs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var te=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ei=(e,t)=>{for(var n in t)Cs(e,n,{get:t[n],enumerable:!0})},g$=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of cM(t))!dM.call(e,i)&&i!==n&&Cs(e,i,{get:()=>t[i],enumerable:!(r=lM(t,i))||r.enumerable});return e};var G=(e,t,n)=>(n=e!=null?sM(uM(e)):{},g$(t||!e||!e.__esModule?Cs(n,"default",{value:e,enumerable:!0}):n,e)),mM=e=>g$(Cs({},"__esModule",{value:!0}),e);var qc=(e,t,n)=>(fM(e,typeof t!="symbol"?t+"":t,n),n),kp=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var ie=(e,t,n)=>(kp(e,t,"read from private field"),n?n.call(e):t.get(e)),pt=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Fn=(e,t,n,r)=>(kp(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),h$=(e,t,n,r)=>({set _(i){Fn(e,t,i,n)},get _(){return ie(e,t,r)}}),ti=(e,t,n)=>(kp(e,t,"access private method"),n);var Es=te((J3,v$)=>{"use strict";var pM="2.0.0",gM=Number.MAX_SAFE_INTEGER||9007199254740991,hM=16,vM=256-6,yM=["major","premajor","minor","preminor","patch","prepatch","prerelease"];v$.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:hM,MAX_SAFE_BUILD_LENGTH:vM,MAX_SAFE_INTEGER:gM,RELEASE_TYPES:yM,SEMVER_SPEC_VERSION:pM,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var As=te((K3,y$)=>{"use strict";var SM=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};y$.exports=SM});var Po=te((ni,S$)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:Np,MAX_SAFE_BUILD_LENGTH:bM,MAX_LENGTH:xM}=Es(),_M=As();ni=S$.exports={};var wM=ni.re=[],$M=ni.safeRe=[],X=ni.src=[],CM=ni.safeSrc=[],Y=ni.t={},EM=0,Op="[a-zA-Z0-9-]",AM=[["\\s",1],["\\d",xM],[Op,bM]],zM=e=>{for(let[t,n]of AM)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},le=(e,t,n)=>{let r=zM(t),i=EM++;_M(e,i,t),Y[e]=i,X[i]=t,CM[i]=r,wM[i]=new RegExp(t,n?"g":void 0),$M[i]=new RegExp(r,n?"g":void 0)};le("NUMERICIDENTIFIER","0|[1-9]\\d*");le("NUMERICIDENTIFIERLOOSE","\\d+");le("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Op}*`);le("MAINVERSION",`(${X[Y.NUMERICIDENTIFIER]})\\.(${X[Y.NUMERICIDENTIFIER]})\\.(${X[Y.NUMERICIDENTIFIER]})`);le("MAINVERSIONLOOSE",`(${X[Y.NUMERICIDENTIFIERLOOSE]})\\.(${X[Y.NUMERICIDENTIFIERLOOSE]})\\.(${X[Y.NUMERICIDENTIFIERLOOSE]})`);le("PRERELEASEIDENTIFIER",`(?:${X[Y.NONNUMERICIDENTIFIER]}|${X[Y.NUMERICIDENTIFIER]})`);le("PRERELEASEIDENTIFIERLOOSE",`(?:${X[Y.NONNUMERICIDENTIFIER]}|${X[Y.NUMERICIDENTIFIERLOOSE]})`);le("PRERELEASE",`(?:-(${X[Y.PRERELEASEIDENTIFIER]}(?:\\.${X[Y.PRERELEASEIDENTIFIER]})*))`);le("PRERELEASELOOSE",`(?:-?(${X[Y.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${X[Y.PRERELEASEIDENTIFIERLOOSE]})*))`);le("BUILDIDENTIFIER",`${Op}+`);le("BUILD",`(?:\\+(${X[Y.BUILDIDENTIFIER]}(?:\\.${X[Y.BUILDIDENTIFIER]})*))`);le("FULLPLAIN",`v?${X[Y.MAINVERSION]}${X[Y.PRERELEASE]}?${X[Y.BUILD]}?`);le("FULL",`^${X[Y.FULLPLAIN]}$`);le("LOOSEPLAIN",`[v=\\s]*${X[Y.MAINVERSIONLOOSE]}${X[Y.PRERELEASELOOSE]}?${X[Y.BUILD]}?`);le("LOOSE",`^${X[Y.LOOSEPLAIN]}$`);le("GTLT","((?:<|>)?=?)");le("XRANGEIDENTIFIERLOOSE",`${X[Y.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);le("XRANGEIDENTIFIER",`${X[Y.NUMERICIDENTIFIER]}|x|X|\\*`);le("XRANGEPLAIN",`[v=\\s]*(${X[Y.XRANGEIDENTIFIER]})(?:\\.(${X[Y.XRANGEIDENTIFIER]})(?:\\.(${X[Y.XRANGEIDENTIFIER]})(?:${X[Y.PRERELEASE]})?${X[Y.BUILD]}?)?)?`);le("XRANGEPLAINLOOSE",`[v=\\s]*(${X[Y.XRANGEIDENTIFIERLOOSE]})(?:\\.(${X[Y.XRANGEIDENTIFIERLOOSE]})(?:\\.(${X[Y.XRANGEIDENTIFIERLOOSE]})(?:${X[Y.PRERELEASELOOSE]})?${X[Y.BUILD]}?)?)?`);le("XRANGE",`^${X[Y.GTLT]}\\s*${X[Y.XRANGEPLAIN]}$`);le("XRANGELOOSE",`^${X[Y.GTLT]}\\s*${X[Y.XRANGEPLAINLOOSE]}$`);le("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Np}})(?:\\.(\\d{1,${Np}}))?(?:\\.(\\d{1,${Np}}))?`);le("COERCE",`${X[Y.COERCEPLAIN]}(?:$|[^\\d])`);le("COERCEFULL",X[Y.COERCEPLAIN]+`(?:${X[Y.PRERELEASE]})?(?:${X[Y.BUILD]})?(?:$|[^\\d])`);le("COERCERTL",X[Y.COERCE],!0);le("COERCERTLFULL",X[Y.COERCEFULL],!0);le("LONETILDE","(?:~>?)");le("TILDETRIM",`(\\s*)${X[Y.LONETILDE]}\\s+`,!0);ni.tildeTrimReplace="$1~";le("TILDE",`^${X[Y.LONETILDE]}${X[Y.XRANGEPLAIN]}$`);le("TILDELOOSE",`^${X[Y.LONETILDE]}${X[Y.XRANGEPLAINLOOSE]}$`);le("LONECARET","(?:\\^)");le("CARETTRIM",`(\\s*)${X[Y.LONECARET]}\\s+`,!0);ni.caretTrimReplace="$1^";le("CARET",`^${X[Y.LONECARET]}${X[Y.XRANGEPLAIN]}$`);le("CARETLOOSE",`^${X[Y.LONECARET]}${X[Y.XRANGEPLAINLOOSE]}$`);le("COMPARATORLOOSE",`^${X[Y.GTLT]}\\s*(${X[Y.LOOSEPLAIN]})$|^$`);le("COMPARATOR",`^${X[Y.GTLT]}\\s*(${X[Y.FULLPLAIN]})$|^$`);le("COMPARATORTRIM",`(\\s*)${X[Y.GTLT]}\\s*(${X[Y.LOOSEPLAIN]}|${X[Y.XRANGEPLAIN]})`,!0);ni.comparatorTrimReplace="$1$2$3";le("HYPHENRANGE",`^\\s*(${X[Y.XRANGEPLAIN]})\\s+-\\s+(${X[Y.XRANGEPLAIN]})\\s*$`);le("HYPHENRANGELOOSE",`^\\s*(${X[Y.XRANGEPLAINLOOSE]})\\s+-\\s+(${X[Y.XRANGEPLAINLOOSE]})\\s*$`);le("STAR","(<|>)?=?\\s*\\*");le("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");le("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Vc=te((W3,b$)=>{"use strict";var TM=Object.freeze({loose:!0}),IM=Object.freeze({}),kM=e=>e?typeof e!="object"?TM:e:IM;b$.exports=kM});var Mp=te((Q3,w$)=>{"use strict";var x$=/^[0-9]+$/,_$=(e,t)=>{if(typeof e=="number"&&typeof t=="number")return e===t?0:e<t?-1:1;let n=x$.test(e),r=x$.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1},NM=(e,t)=>_$(t,e);w$.exports={compareIdentifiers:_$,rcompareIdentifiers:NM}});var kt=te((eq,C$)=>{"use strict";var Fc=As(),{MAX_LENGTH:$$,MAX_SAFE_INTEGER:Hc}=Es(),{safeRe:Bc,t:Gc}=Po(),OM=Vc(),{compareIdentifiers:Dp}=Mp(),ln=class{constructor(t,n){if(n=OM(n),t instanceof ln){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>$$)throw new TypeError(`version is longer than ${$$} characters`);Fc("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let r=t.trim().match(n.loose?Bc[Gc.LOOSE]:Bc[Gc.FULL]);if(!r)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>Hc||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Hc||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Hc||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let o=+i;if(o>=0&&o<Hc)return o}return i}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(Fc("SemVer.compare",this.version,this.options,t),!(t instanceof ln)){if(typeof t=="string"&&t===this.version)return 0;t=new ln(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof ln||(t=new ln(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:this.patch>t.patch?1:0}comparePre(t){if(t instanceof ln||(t=new ln(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{let r=this.prerelease[n],i=t.prerelease[n];if(Fc("prerelease compare",n,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return Dp(r,i)}while(++n)}compareBuild(t){t instanceof ln||(t=new ln(t,this.options));let n=0;do{let r=this.build[n],i=t.build[n];if(Fc("build compare",n,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return Dp(r,i)}while(++n)}inc(t,n,r){if(t.startsWith("pre")){if(!n&&r===!1)throw new Error("invalid increment argument: identifier is empty");if(n){let i=`-${n}`.match(this.options.loose?Bc[Gc.PRERELEASELOOSE]:Bc[Gc.PRERELEASE]);if(!i||i[1]!==n)throw new Error(`invalid identifier: ${n}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,r),this.inc("pre",n,r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,r),this.inc("pre",n,r);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(r)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(n===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(n){let o=[n,i];r===!1&&(o=[n]),Dp(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};C$.exports=ln});var Br=te((tq,A$)=>{"use strict";var E$=kt(),MM=(e,t,n=!1)=>{if(e instanceof E$)return e;try{return new E$(e,t)}catch(r){if(!n)return null;throw r}};A$.exports=MM});var T$=te((nq,z$)=>{"use strict";var DM=Br(),RM=(e,t)=>{let n=DM(e,t);return n?n.version:null};z$.exports=RM});var k$=te((iq,I$)=>{"use strict";var UM=Br(),PM=(e,t)=>{let n=UM(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};I$.exports=PM});var M$=te((rq,O$)=>{"use strict";var N$=kt(),LM=(e,t,n,r,i)=>{typeof n=="string"&&(i=r,r=n,n=void 0);try{return new N$(e instanceof N$?e.version:e,n).inc(t,r,i).version}catch(o){return null}};O$.exports=LM});var U$=te((oq,R$)=>{"use strict";var D$=Br(),jM=(e,t)=>{let n=D$(e,null,!0),r=D$(t,null,!0),i=n.compare(r);if(i===0)return null;let o=i>0,a=o?n:r,s=o?r:n,c=!!a.prerelease.length;if(!!s.prerelease.length&&!c){if(!s.patch&&!s.minor)return"major";if(s.compareMain(a)===0)return s.minor&&!s.patch?"minor":"patch"}let m=c?"pre":"";return n.major!==r.major?m+"major":n.minor!==r.minor?m+"minor":n.patch!==r.patch?m+"patch":"prerelease"};R$.exports=jM});var L$=te((aq,P$)=>{"use strict";var ZM=kt(),qM=(e,t)=>new ZM(e,t).major;P$.exports=qM});var Z$=te((sq,j$)=>{"use strict";var VM=kt(),FM=(e,t)=>new VM(e,t).minor;j$.exports=FM});var V$=te((lq,q$)=>{"use strict";var HM=kt(),BM=(e,t)=>new HM(e,t).patch;q$.exports=BM});var H$=te((cq,F$)=>{"use strict";var GM=Br(),XM=(e,t)=>{let n=GM(e,t);return n&&n.prerelease.length?n.prerelease:null};F$.exports=XM});var $n=te((uq,G$)=>{"use strict";var B$=kt(),YM=(e,t,n)=>new B$(e,n).compare(new B$(t,n));G$.exports=YM});var Y$=te((dq,X$)=>{"use strict";var JM=$n(),KM=(e,t,n)=>JM(t,e,n);X$.exports=KM});var K$=te((fq,J$)=>{"use strict";var WM=$n(),QM=(e,t)=>WM(e,t,!0);J$.exports=QM});var Xc=te((mq,Q$)=>{"use strict";var W$=kt(),eD=(e,t,n)=>{let r=new W$(e,n),i=new W$(t,n);return r.compare(i)||r.compareBuild(i)};Q$.exports=eD});var t0=te((pq,e0)=>{"use strict";var tD=Xc(),nD=(e,t)=>e.sort((n,r)=>tD(n,r,t));e0.exports=nD});var i0=te((gq,n0)=>{"use strict";var iD=Xc(),rD=(e,t)=>e.sort((n,r)=>iD(r,n,t));n0.exports=rD});var zs=te((hq,r0)=>{"use strict";var oD=$n(),aD=(e,t,n)=>oD(e,t,n)>0;r0.exports=aD});var Yc=te((vq,o0)=>{"use strict";var sD=$n(),lD=(e,t,n)=>sD(e,t,n)<0;o0.exports=lD});var Rp=te((yq,a0)=>{"use strict";var cD=$n(),uD=(e,t,n)=>cD(e,t,n)===0;a0.exports=uD});var Up=te((Sq,s0)=>{"use strict";var dD=$n(),fD=(e,t,n)=>dD(e,t,n)!==0;s0.exports=fD});var Jc=te((bq,l0)=>{"use strict";var mD=$n(),pD=(e,t,n)=>mD(e,t,n)>=0;l0.exports=pD});var Kc=te((xq,c0)=>{"use strict";var gD=$n(),hD=(e,t,n)=>gD(e,t,n)<=0;c0.exports=hD});var Pp=te((_q,u0)=>{"use strict";var vD=Rp(),yD=Up(),SD=zs(),bD=Jc(),xD=Yc(),_D=Kc(),wD=(e,t,n,r)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e===n;case"!==":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e!==n;case"":case"=":case"==":return vD(e,n,r);case"!=":return yD(e,n,r);case">":return SD(e,n,r);case">=":return bD(e,n,r);case"<":return xD(e,n,r);case"<=":return _D(e,n,r);default:throw new TypeError(`Invalid operator: ${t}`)}};u0.exports=wD});var f0=te((wq,d0)=>{"use strict";var $D=kt(),CD=Br(),{safeRe:Wc,t:Qc}=Po(),ED=(e,t)=>{if(e instanceof $D)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let n=null;if(!t.rtl)n=e.match(t.includePrerelease?Wc[Qc.COERCEFULL]:Wc[Qc.COERCE]);else{let c=t.includePrerelease?Wc[Qc.COERCERTLFULL]:Wc[Qc.COERCERTL],d;for(;(d=c.exec(e))&&(!n||n.index+n[0].length!==e.length);)(!n||d.index+d[0].length!==n.index+n[0].length)&&(n=d),c.lastIndex=d.index+d[1].length+d[2].length;c.lastIndex=-1}if(n===null)return null;let r=n[2],i=n[3]||"0",o=n[4]||"0",a=t.includePrerelease&&n[5]?`-${n[5]}`:"",s=t.includePrerelease&&n[6]?`+${n[6]}`:"";return CD(`${r}.${i}.${o}${a}${s}`,t)};d0.exports=ED});var p0=te(($q,m0)=>{"use strict";var Lp=class{constructor(){this.max=1e3,this.map=new Map}get(t){let n=this.map.get(t);if(n!==void 0)return this.map.delete(t),this.map.set(t,n),n}delete(t){return this.map.delete(t)}set(t,n){if(!this.delete(t)&&n!==void 0){if(this.map.size>=this.max){let i=this.map.keys().next().value;this.delete(i)}this.map.set(t,n)}return this}};m0.exports=Lp});var Cn=te((Cq,y0)=>{"use strict";var AD=/\s+/g,Gr=class{constructor(t,n){if(n=TD(n),t instanceof Gr)return t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease?t:new Gr(t.raw,n);if(t instanceof jp)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=t.trim().replace(AD," "),this.set=this.raw.split("||").map(r=>this.parseRange(r.trim())).filter(r=>r.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let r=this.set[0];if(this.set=this.set.filter(i=>!h0(i[0])),this.set.length===0)this.set=[r];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&RD(i[0])){this.set=[i];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let t=0;t<this.set.length;t++){t>0&&(this.formatted+="||");let n=this.set[t];for(let r=0;r<n.length;r++)r>0&&(this.formatted+=" "),this.formatted+=n[r].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){let r=((this.options.includePrerelease&&MD)|(this.options.loose&&DD))+":"+t,i=g0.get(r);if(i)return i;let o=this.options.loose,a=o?Ut[Nt.HYPHENRANGELOOSE]:Ut[Nt.HYPHENRANGE];t=t.replace(a,BD(this.options.includePrerelease)),Le("hyphen replace",t),t=t.replace(Ut[Nt.COMPARATORTRIM],kD),Le("comparator trim",t),t=t.replace(Ut[Nt.TILDETRIM],ND),Le("tilde trim",t),t=t.replace(Ut[Nt.CARETTRIM],OD),Le("caret trim",t);let s=t.split(" ").map(l=>UD(l,this.options)).join(" ").split(/\s+/).map(l=>HD(l,this.options));o&&(s=s.filter(l=>(Le("loose invalid filter",l,this.options),!!l.match(Ut[Nt.COMPARATORLOOSE])))),Le("range list",s);let c=new Map,d=s.map(l=>new jp(l,this.options));for(let l of d){if(h0(l))return[l];c.set(l.value,l)}c.size>1&&c.has("")&&c.delete("");let m=[...c.values()];return g0.set(r,m),m}intersects(t,n){if(!(t instanceof Gr))throw new TypeError("a Range is required");return this.set.some(r=>v0(r,n)&&t.set.some(i=>v0(i,n)&&r.every(o=>i.every(a=>o.intersects(a,n)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new ID(t,this.options)}catch(n){return!1}for(let n=0;n<this.set.length;n++)if(GD(this.set[n],t,this.options))return!0;return!1}};y0.exports=Gr;var zD=p0(),g0=new zD,TD=Vc(),jp=Ts(),Le=As(),ID=kt(),{safeRe:Ut,t:Nt,comparatorTrimReplace:kD,tildeTrimReplace:ND,caretTrimReplace:OD}=Po(),{FLAG_INCLUDE_PRERELEASE:MD,FLAG_LOOSE:DD}=Es(),h0=e=>e.value==="<0.0.0-0",RD=e=>e.value==="",v0=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(o=>i.intersects(o,t)),i=r.pop();return n},UD=(e,t)=>(e=e.replace(Ut[Nt.BUILD],""),Le("comp",e,t),e=jD(e,t),Le("caret",e),e=PD(e,t),Le("tildes",e),e=qD(e,t),Le("xrange",e),e=FD(e,t),Le("stars",e),e),Pt=e=>!e||e.toLowerCase()==="x"||e==="*",PD=(e,t)=>e.trim().split(/\s+/).map(n=>LD(n,t)).join(" "),LD=(e,t)=>{let n=t.loose?Ut[Nt.TILDELOOSE]:Ut[Nt.TILDE];return e.replace(n,(r,i,o,a,s)=>{Le("tilde",e,r,i,o,a,s);let c;return Pt(i)?c="":Pt(o)?c=`>=${i}.0.0 <${+i+1}.0.0-0`:Pt(a)?c=`>=${i}.${o}.0 <${i}.${+o+1}.0-0`:s?(Le("replaceTilde pr",s),c=`>=${i}.${o}.${a}-${s} <${i}.${+o+1}.0-0`):c=`>=${i}.${o}.${a} <${i}.${+o+1}.0-0`,Le("tilde return",c),c})},jD=(e,t)=>e.trim().split(/\s+/).map(n=>ZD(n,t)).join(" "),ZD=(e,t)=>{Le("caret",e,t);let n=t.loose?Ut[Nt.CARETLOOSE]:Ut[Nt.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,(i,o,a,s,c)=>{Le("caret",e,i,o,a,s,c);let d;return Pt(o)?d="":Pt(a)?d=`>=${o}.0.0${r} <${+o+1}.0.0-0`:Pt(s)?o==="0"?d=`>=${o}.${a}.0${r} <${o}.${+a+1}.0-0`:d=`>=${o}.${a}.0${r} <${+o+1}.0.0-0`:c?(Le("replaceCaret pr",c),o==="0"?a==="0"?d=`>=${o}.${a}.${s}-${c} <${o}.${a}.${+s+1}-0`:d=`>=${o}.${a}.${s}-${c} <${o}.${+a+1}.0-0`:d=`>=${o}.${a}.${s}-${c} <${+o+1}.0.0-0`):(Le("no pr"),o==="0"?a==="0"?d=`>=${o}.${a}.${s}${r} <${o}.${a}.${+s+1}-0`:d=`>=${o}.${a}.${s}${r} <${o}.${+a+1}.0-0`:d=`>=${o}.${a}.${s} <${+o+1}.0.0-0`),Le("caret return",d),d})},qD=(e,t)=>(Le("replaceXRanges",e,t),e.split(/\s+/).map(n=>VD(n,t)).join(" ")),VD=(e,t)=>{e=e.trim();let n=t.loose?Ut[Nt.XRANGELOOSE]:Ut[Nt.XRANGE];return e.replace(n,(r,i,o,a,s,c)=>{Le("xRange",e,r,i,o,a,s,c);let d=Pt(o),m=d||Pt(a),l=m||Pt(s),f=l;return i==="="&&f&&(i=""),c=t.includePrerelease?"-0":"",d?i===">"||i==="<"?r="<0.0.0-0":r="*":i&&f?(m&&(a=0),s=0,i===">"?(i=">=",m?(o=+o+1,a=0,s=0):(a=+a+1,s=0)):i==="<="&&(i="<",m?o=+o+1:a=+a+1),i==="<"&&(c="-0"),r=`${i+o}.${a}.${s}${c}`):m?r=`>=${o}.0.0${c} <${+o+1}.0.0-0`:l&&(r=`>=${o}.${a}.0${c} <${o}.${+a+1}.0-0`),Le("xRange return",r),r})},FD=(e,t)=>(Le("replaceStars",e,t),e.trim().replace(Ut[Nt.STAR],"")),HD=(e,t)=>(Le("replaceGTE0",e,t),e.trim().replace(Ut[t.includePrerelease?Nt.GTE0PRE:Nt.GTE0],"")),BD=e=>(t,n,r,i,o,a,s,c,d,m,l,f)=>(Pt(r)?n="":Pt(i)?n=`>=${r}.0.0${e?"-0":""}`:Pt(o)?n=`>=${r}.${i}.0${e?"-0":""}`:a?n=`>=${n}`:n=`>=${n}${e?"-0":""}`,Pt(d)?c="":Pt(m)?c=`<${+d+1}.0.0-0`:Pt(l)?c=`<${d}.${+m+1}.0-0`:f?c=`<=${d}.${m}.${l}-${f}`:e?c=`<${d}.${m}.${+l+1}-0`:c=`<=${c}`,`${n} ${c}`.trim()),GD=(e,t,n)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let r=0;r<e.length;r++)if(Le(e[r].semver),e[r].semver!==jp.ANY&&e[r].semver.prerelease.length>0){let i=e[r].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}});var Ts=te((Eq,$0)=>{"use strict";var Is=Symbol("SemVer ANY"),Lo=class{static get ANY(){return Is}constructor(t,n){if(n=S0(n),t instanceof Lo){if(t.loose===!!n.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),qp("comparator",t,n),this.options=n,this.loose=!!n.loose,this.parse(t),this.semver===Is?this.value="":this.value=this.operator+this.semver.version,qp("comp",this)}parse(t){let n=this.options.loose?b0[x0.COMPARATORLOOSE]:b0[x0.COMPARATOR],r=t.match(n);if(!r)throw new TypeError(`Invalid comparator: ${t}`);this.operator=r[1]!==void 0?r[1]:"",this.operator==="="&&(this.operator=""),r[2]?this.semver=new _0(r[2],this.options.loose):this.semver=Is}toString(){return this.value}test(t){if(qp("Comparator.test",t,this.options.loose),this.semver===Is||t===Is)return!0;if(typeof t=="string")try{t=new _0(t,this.options)}catch(n){return!1}return Zp(t,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof Lo))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new w0(t.value,n).test(this.value):t.operator===""?t.value===""?!0:new w0(this.value,n).test(t.semver):(n=S0(n),n.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||Zp(this.semver,"<",t.semver,n)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||Zp(this.semver,">",t.semver,n)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};$0.exports=Lo;var S0=Vc(),{safeRe:b0,t:x0}=Po(),Zp=Pp(),qp=As(),_0=kt(),w0=Cn()});var ks=te((Aq,C0)=>{"use strict";var XD=Cn(),YD=(e,t,n)=>{try{t=new XD(t,n)}catch(r){return!1}return t.test(e)};C0.exports=YD});var A0=te((zq,E0)=>{"use strict";var JD=Cn(),KD=(e,t)=>new JD(e,t).set.map(n=>n.map(r=>r.value).join(" ").trim().split(" "));E0.exports=KD});var T0=te((Tq,z0)=>{"use strict";var WD=kt(),QD=Cn(),eR=(e,t,n)=>{let r=null,i=null,o=null;try{o=new QD(t,n)}catch(a){return null}return e.forEach(a=>{o.test(a)&&(!r||i.compare(a)===-1)&&(r=a,i=new WD(r,n))}),r};z0.exports=eR});var k0=te((Iq,I0)=>{"use strict";var tR=kt(),nR=Cn(),iR=(e,t,n)=>{let r=null,i=null,o=null;try{o=new nR(t,n)}catch(a){return null}return e.forEach(a=>{o.test(a)&&(!r||i.compare(a)===1)&&(r=a,i=new tR(r,n))}),r};I0.exports=iR});var M0=te((kq,O0)=>{"use strict";var Vp=kt(),rR=Cn(),N0=zs(),oR=(e,t)=>{e=new rR(e,t);let n=new Vp("0.0.0");if(e.test(n)||(n=new Vp("0.0.0-0"),e.test(n)))return n;n=null;for(let r=0;r<e.set.length;++r){let i=e.set[r],o=null;i.forEach(a=>{let s=new Vp(a.semver.version);switch(a.operator){case">":s.prerelease.length===0?s.patch++:s.prerelease.push(0),s.raw=s.format();case"":case">=":(!o||N0(s,o))&&(o=s);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),o&&(!n||N0(n,o))&&(n=o)}return n&&e.test(n)?n:null};O0.exports=oR});var R0=te((Nq,D0)=>{"use strict";var aR=Cn(),sR=(e,t)=>{try{return new aR(e,t).range||"*"}catch(n){return null}};D0.exports=sR});var eu=te((Oq,j0)=>{"use strict";var lR=kt(),L0=Ts(),{ANY:cR}=L0,uR=Cn(),dR=ks(),U0=zs(),P0=Yc(),fR=Kc(),mR=Jc(),pR=(e,t,n,r)=>{e=new lR(e,r),t=new uR(t,r);let i,o,a,s,c;switch(n){case">":i=U0,o=fR,a=P0,s=">",c=">=";break;case"<":i=P0,o=mR,a=U0,s="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(dR(e,t,r))return!1;for(let d=0;d<t.set.length;++d){let m=t.set[d],l=null,f=null;if(m.forEach(p=>{p.semver===cR&&(p=new L0(">=0.0.0")),l=l||p,f=f||p,i(p.semver,l.semver,r)?l=p:a(p.semver,f.semver,r)&&(f=p)}),l.operator===s||l.operator===c||(!f.operator||f.operator===s)&&o(e,f.semver))return!1;if(f.operator===c&&a(e,f.semver))return!1}return!0};j0.exports=pR});var q0=te((Mq,Z0)=>{"use strict";var gR=eu(),hR=(e,t,n)=>gR(e,t,">",n);Z0.exports=hR});var F0=te((Dq,V0)=>{"use strict";var vR=eu(),yR=(e,t,n)=>vR(e,t,"<",n);V0.exports=yR});var G0=te((Rq,B0)=>{"use strict";var H0=Cn(),SR=(e,t,n)=>(e=new H0(e,n),t=new H0(t,n),e.intersects(t,n));B0.exports=SR});var Y0=te((Uq,X0)=>{"use strict";var bR=ks(),xR=$n();X0.exports=(e,t,n)=>{let r=[],i=null,o=null,a=e.sort((m,l)=>xR(m,l,n));for(let m of a)bR(m,t,n)?(o=m,i||(i=m)):(o&&r.push([i,o]),o=null,i=null);i&&r.push([i,null]);let s=[];for(let[m,l]of r)m===l?s.push(m):!l&&m===a[0]?s.push("*"):l?m===a[0]?s.push(`<=${l}`):s.push(`${m} - ${l}`):s.push(`>=${m}`);let c=s.join(" || "),d=typeof t.raw=="string"?t.raw:String(t);return c.length<d.length?c:t}});var tC=te((Pq,eC)=>{"use strict";var J0=Cn(),Hp=Ts(),{ANY:Fp}=Hp,Ns=ks(),Bp=$n(),_R=(e,t,n={})=>{if(e===t)return!0;e=new J0(e,n),t=new J0(t,n);let r=!1;e:for(let i of e.set){for(let o of t.set){let a=$R(i,o,n);if(r=r||a!==null,a)continue e}if(r)return!1}return!0},wR=[new Hp(">=0.0.0-0")],K0=[new Hp(">=0.0.0")],$R=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===Fp){if(t.length===1&&t[0].semver===Fp)return!0;n.includePrerelease?e=wR:e=K0}if(t.length===1&&t[0].semver===Fp){if(n.includePrerelease)return!0;t=K0}let r=new Set,i,o;for(let p of e)p.operator===">"||p.operator===">="?i=W0(i,p,n):p.operator==="<"||p.operator==="<="?o=Q0(o,p,n):r.add(p.semver);if(r.size>1)return null;let a;if(i&&o){if(a=Bp(i.semver,o.semver,n),a>0)return null;if(a===0&&(i.operator!==">="||o.operator!=="<="))return null}for(let p of r){if(i&&!Ns(p,String(i),n)||o&&!Ns(p,String(o),n))return null;for(let h of t)if(!Ns(p,String(h),n))return!1;return!0}let s,c,d,m,l=o&&!n.includePrerelease&&o.semver.prerelease.length?o.semver:!1,f=i&&!n.includePrerelease&&i.semver.prerelease.length?i.semver:!1;l&&l.prerelease.length===1&&o.operator==="<"&&l.prerelease[0]===0&&(l=!1);for(let p of t){if(m=m||p.operator===">"||p.operator===">=",d=d||p.operator==="<"||p.operator==="<=",i){if(f&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===f.major&&p.semver.minor===f.minor&&p.semver.patch===f.patch&&(f=!1),p.operator===">"||p.operator===">="){if(s=W0(i,p,n),s===p&&s!==i)return!1}else if(i.operator===">="&&!Ns(i.semver,String(p),n))return!1}if(o){if(l&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===l.major&&p.semver.minor===l.minor&&p.semver.patch===l.patch&&(l=!1),p.operator==="<"||p.operator==="<="){if(c=Q0(o,p,n),c===p&&c!==o)return!1}else if(o.operator==="<="&&!Ns(o.semver,String(p),n))return!1}if(!p.operator&&(o||i)&&a!==0)return!1}return!(i&&d&&!o&&a!==0||o&&m&&!i&&a!==0||f||l)},W0=(e,t,n)=>{if(!e)return t;let r=Bp(e.semver,t.semver,n);return r>0?e:r<0||t.operator===">"&&e.operator===">="?t:e},Q0=(e,t,n)=>{if(!e)return t;let r=Bp(e.semver,t.semver,n);return r<0?e:r>0||t.operator==="<"&&e.operator==="<="?t:e};eC.exports=_R});var Xp=te((Lq,rC)=>{"use strict";var Gp=Po(),nC=Es(),CR=kt(),iC=Mp(),ER=Br(),AR=T$(),zR=k$(),TR=M$(),IR=U$(),kR=L$(),NR=Z$(),OR=V$(),MR=H$(),DR=$n(),RR=Y$(),UR=K$(),PR=Xc(),LR=t0(),jR=i0(),ZR=zs(),qR=Yc(),VR=Rp(),FR=Up(),HR=Jc(),BR=Kc(),GR=Pp(),XR=f0(),YR=Ts(),JR=Cn(),KR=ks(),WR=A0(),QR=T0(),eU=k0(),tU=M0(),nU=R0(),iU=eu(),rU=q0(),oU=F0(),aU=G0(),sU=Y0(),lU=tC();rC.exports={parse:ER,valid:AR,clean:zR,inc:TR,diff:IR,major:kR,minor:NR,patch:OR,prerelease:MR,compare:DR,rcompare:RR,compareLoose:UR,compareBuild:PR,sort:LR,rsort:jR,gt:ZR,lt:qR,eq:VR,neq:FR,gte:HR,lte:BR,cmp:GR,coerce:XR,Comparator:YR,Range:JR,satisfies:KR,toComparators:WR,maxSatisfying:QR,minSatisfying:eU,minVersion:tU,validRange:nU,outside:iU,gtr:rU,ltr:oU,intersects:aU,simplifyRange:sU,subset:lU,SemVer:CR,re:Gp.re,src:Gp.src,tokens:Gp.t,SEMVER_SPEC_VERSION:nC.SEMVER_SPEC_VERSION,RELEASE_TYPES:nC.RELEASE_TYPES,compareIdentifiers:iC.compareIdentifiers,rcompareIdentifiers:iC.rcompareIdentifiers}});var gC=te(ce=>{"use strict";var Kp=Symbol.for("react.transitional.element"),cU=Symbol.for("react.portal"),uU=Symbol.for("react.fragment"),dU=Symbol.for("react.strict_mode"),fU=Symbol.for("react.profiler"),mU=Symbol.for("react.consumer"),pU=Symbol.for("react.context"),gU=Symbol.for("react.forward_ref"),hU=Symbol.for("react.suspense"),vU=Symbol.for("react.memo"),cC=Symbol.for("react.lazy"),yU=Symbol.for("react.activity"),oC=Symbol.iterator;function SU(e){return e===null||typeof e!="object"?null:(e=oC&&e[oC]||e["@@iterator"],typeof e=="function"?e:null)}var uC={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},dC=Object.assign,fC={};function Zo(e,t,n){this.props=e,this.context=t,this.refs=fC,this.updater=n||uC}Zo.prototype.isReactComponent={};Zo.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")};Zo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function mC(){}mC.prototype=Zo.prototype;function Wp(e,t,n){this.props=e,this.context=t,this.refs=fC,this.updater=n||uC}var Qp=Wp.prototype=new mC;Qp.constructor=Wp;dC(Qp,Zo.prototype);Qp.isPureReactComponent=!0;var aC=Array.isArray;function Jp(){}var je={H:null,A:null,T:null,S:null},pC=Object.prototype.hasOwnProperty;function eg(e,t,n){var r=n.ref;return{$$typeof:Kp,type:e,key:t,ref:r!==void 0?r:null,props:n}}function bU(e,t){return eg(e.type,t,e.props)}function tg(e){return typeof e=="object"&&e!==null&&e.$$typeof===Kp}function xU(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var sC=/\/+/g;function Yp(e,t){return typeof e=="object"&&e!==null&&e.key!=null?xU(""+e.key):t.toString(36)}function _U(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Jp,Jp):(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 jo(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(o){case"bigint":case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Kp:case cU:a=!0;break;case cC:return a=e._init,jo(a(e._payload),t,n,r,i)}}if(a)return i=i(e),a=r===""?"."+Yp(e,0):r,aC(i)?(n="",a!=null&&(n=a.replace(sC,"$&/")+"/"),jo(i,t,n,"",function(d){return d})):i!=null&&(tg(i)&&(i=bU(i,n+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(sC,"$&/")+"/")+a)),t.push(i)),1;a=0;var s=r===""?".":r+":";if(aC(e))for(var c=0;c<e.length;c++)r=e[c],o=s+Yp(r,c),a+=jo(r,t,n,o,i);else if(c=SU(e),typeof c=="function")for(e=c.call(e),c=0;!(r=e.next()).done;)r=r.value,o=s+Yp(r,c++),a+=jo(r,t,n,o,i);else if(o==="object"){if(typeof e.then=="function")return jo(_U(e),t,n,r,i);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 a}function tu(e,t,n){if(e==null)return e;var r=[],i=0;return jo(e,r,"","",function(o){return t.call(n,o,i++)}),r}function wU(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var lC=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},$U={map:tu,forEach:function(e,t,n){tu(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return tu(e,function(){t++}),t},toArray:function(e){return tu(e,function(t){return t})||[]},only:function(e){if(!tg(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ce.Activity=yU;ce.Children=$U;ce.Component=Zo;ce.Fragment=uU;ce.Profiler=fU;ce.PureComponent=Wp;ce.StrictMode=dU;ce.Suspense=hU;ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=je;ce.__COMPILER_RUNTIME={__proto__:null,c:function(e){return je.H.useMemoCache(e)}};ce.cache=function(e){return function(){return e.apply(null,arguments)}};ce.cacheSignal=function(){return null};ce.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var r=dC({},e.props),i=e.key;if(t!=null)for(o in t.key!==void 0&&(i=""+t.key),t)!pC.call(t,o)||o==="key"||o==="__self"||o==="__source"||o==="ref"&&t.ref===void 0||(r[o]=t[o]);var o=arguments.length-2;if(o===1)r.children=n;else if(1<o){for(var a=Array(o),s=0;s<o;s++)a[s]=arguments[s+2];r.children=a}return eg(e.type,i,r)};ce.createContext=function(e){return e={$$typeof:pU,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:mU,_context:e},e};ce.createElement=function(e,t,n){var r,i={},o=null;if(t!=null)for(r in t.key!==void 0&&(o=""+t.key),t)pC.call(t,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var s=Array(a),c=0;c<a;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return eg(e,o,i)};ce.createRef=function(){return{current:null}};ce.forwardRef=function(e){return{$$typeof:gU,render:e}};ce.isValidElement=tg;ce.lazy=function(e){return{$$typeof:cC,_payload:{_status:-1,_result:e},_init:wU}};ce.memo=function(e,t){return{$$typeof:vU,type:e,compare:t===void 0?null:t}};ce.startTransition=function(e){var t=je.T,n={};je.T=n;try{var r=e(),i=je.S;i!==null&&i(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(Jp,lC)}catch(o){lC(o)}finally{t!==null&&n.types!==null&&(t.types=n.types),je.T=t}};ce.unstable_useCacheRefresh=function(){return je.H.useCacheRefresh()};ce.use=function(e){return je.H.use(e)};ce.useActionState=function(e,t,n){return je.H.useActionState(e,t,n)};ce.useCallback=function(e,t){return je.H.useCallback(e,t)};ce.useContext=function(e){return je.H.useContext(e)};ce.useDebugValue=function(){};ce.useDeferredValue=function(e,t){return je.H.useDeferredValue(e,t)};ce.useEffect=function(e,t){return je.H.useEffect(e,t)};ce.useEffectEvent=function(e){return je.H.useEffectEvent(e)};ce.useId=function(){return je.H.useId()};ce.useImperativeHandle=function(e,t,n){return je.H.useImperativeHandle(e,t,n)};ce.useInsertionEffect=function(e,t){return je.H.useInsertionEffect(e,t)};ce.useLayoutEffect=function(e,t){return je.H.useLayoutEffect(e,t)};ce.useMemo=function(e,t){return je.H.useMemo(e,t)};ce.useOptimistic=function(e,t){return je.H.useOptimistic(e,t)};ce.useReducer=function(e,t,n){return je.H.useReducer(e,t,n)};ce.useRef=function(e){return je.H.useRef(e)};ce.useState=function(e){return je.H.useState(e)};ce.useSyncExternalStore=function(e,t,n){return je.H.useSyncExternalStore(e,t,n)};ce.useTransition=function(){return je.H.useTransition()};ce.version="19.2.5"});var Ce=te((Zq,hC)=>{"use strict";hC.exports=gC()});var EC=te(He=>{"use strict";function og(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(0<nu(i,t))e[r]=t,e[n]=i,n=r;else break e}}function ii(e){return e.length===0?null:e[0]}function ru(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,o=i>>>1;r<o;){var a=2*(r+1)-1,s=e[a],c=a+1,d=e[c];if(0>nu(s,n))c<i&&0>nu(d,s)?(e[r]=d,e[c]=n,r=c):(e[r]=s,e[a]=n,r=a);else if(c<i&&0>nu(d,n))e[r]=d,e[c]=n,r=c;else break e}}return t}function nu(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}He.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(vC=performance,He.unstable_now=function(){return vC.now()}):(ng=Date,yC=ng.now(),He.unstable_now=function(){return ng.now()-yC});var vC,ng,yC,_i=[],tr=[],CU=1,En=null,Ot=3,ag=!1,Os=!1,Ms=!1,sg=!1,xC=typeof setTimeout=="function"?setTimeout:null,_C=typeof clearTimeout=="function"?clearTimeout:null,SC=typeof setImmediate!="undefined"?setImmediate:null;function iu(e){for(var t=ii(tr);t!==null;){if(t.callback===null)ru(tr);else if(t.startTime<=e)ru(tr),t.sortIndex=t.expirationTime,og(_i,t);else break;t=ii(tr)}}function lg(e){if(Ms=!1,iu(e),!Os)if(ii(_i)!==null)Os=!0,Vo||(Vo=!0,qo());else{var t=ii(tr);t!==null&&cg(lg,t.startTime-e)}}var Vo=!1,Ds=-1,wC=5,$C=-1;function CC(){return sg?!0:!(He.unstable_now()-$C<wC)}function ig(){if(sg=!1,Vo){var e=He.unstable_now();$C=e;var t=!0;try{e:{Os=!1,Ms&&(Ms=!1,_C(Ds),Ds=-1),ag=!0;var n=Ot;try{t:{for(iu(e),En=ii(_i);En!==null&&!(En.expirationTime>e&&CC());){var r=En.callback;if(typeof r=="function"){En.callback=null,Ot=En.priorityLevel;var i=r(En.expirationTime<=e);if(e=He.unstable_now(),typeof i=="function"){En.callback=i,iu(e),t=!0;break t}En===ii(_i)&&ru(_i),iu(e)}else ru(_i);En=ii(_i)}if(En!==null)t=!0;else{var o=ii(tr);o!==null&&cg(lg,o.startTime-e),t=!1}}break e}finally{En=null,Ot=n,ag=!1}t=void 0}}finally{t?qo():Vo=!1}}}var qo;typeof SC=="function"?qo=function(){SC(ig)}:typeof MessageChannel!="undefined"?(rg=new MessageChannel,bC=rg.port2,rg.port1.onmessage=ig,qo=function(){bC.postMessage(null)}):qo=function(){xC(ig,0)};var rg,bC;function cg(e,t){Ds=xC(function(){e(He.unstable_now())},t)}He.unstable_IdlePriority=5;He.unstable_ImmediatePriority=1;He.unstable_LowPriority=4;He.unstable_NormalPriority=3;He.unstable_Profiling=null;He.unstable_UserBlockingPriority=2;He.unstable_cancelCallback=function(e){e.callback=null};He.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):wC=0<e?Math.floor(1e3/e):5};He.unstable_getCurrentPriorityLevel=function(){return Ot};He.unstable_next=function(e){switch(Ot){case 1:case 2:case 3:var t=3;break;default:t=Ot}var n=Ot;Ot=t;try{return e()}finally{Ot=n}};He.unstable_requestPaint=function(){sg=!0};He.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Ot;Ot=e;try{return t()}finally{Ot=n}};He.unstable_scheduleCallback=function(e,t,n){var r=He.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?r+n:r):n=r,e){case 1:var i=-1;break;case 2:i=250;break;case 5:i=1073741823;break;case 4:i=1e4;break;default:i=5e3}return i=n+i,e={id:CU++,callback:t,priorityLevel:e,startTime:n,expirationTime:i,sortIndex:-1},n>r?(e.sortIndex=n,og(tr,e),ii(_i)===null&&e===ii(tr)&&(Ms?(_C(Ds),Ds=-1):Ms=!0,cg(lg,n-r))):(e.sortIndex=i,og(_i,e),Os||ag||(Os=!0,Vo||(Vo=!0,qo()))),e};He.unstable_shouldYield=CC;He.unstable_wrapCallback=function(e){var t=Ot;return function(){var n=Ot;Ot=t;try{return e.apply(this,arguments)}finally{Ot=n}}}});var zC=te((Vq,AC)=>{"use strict";AC.exports=EC()});var IC=te(jt=>{"use strict";var EU=Ce();function TC(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}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 nr(){}var Lt={d:{f:nr,r:function(){throw Error(TC(522))},D:nr,C:nr,L:nr,m:nr,X:nr,S:nr,M:nr},p:0,findDOMNode:null},AU=Symbol.for("react.portal");function zU(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:AU,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}var Rs=EU.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function ou(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}jt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Lt;jt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(TC(299));return zU(e,t,null,n)};jt.flushSync=function(e){var t=Rs.T,n=Lt.p;try{if(Rs.T=null,Lt.p=2,e)return e()}finally{Rs.T=t,Lt.p=n,Lt.d.f()}};jt.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Lt.d.C(e,t))};jt.prefetchDNS=function(e){typeof e=="string"&&Lt.d.D(e)};jt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,r=ou(n,t.crossOrigin),i=typeof t.integrity=="string"?t.integrity:void 0,o=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?Lt.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n==="script"&&Lt.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};jt.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=ou(t.as,t.crossOrigin);Lt.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Lt.d.M(e)};jt.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,r=ou(n,t.crossOrigin);Lt.d.L(e,n,{crossOrigin:r,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})}};jt.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=ou(t.as,t.crossOrigin);Lt.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Lt.d.m(e)};jt.requestFormReset=function(e){Lt.d.r(e)};jt.unstable_batchedUpdates=function(e,t){return e(t)};jt.useFormState=function(e,t,n){return Rs.H.useFormState(e,t,n)};jt.useFormStatus=function(){return Rs.H.useHostTransitionStatus()};jt.version="19.2.5"});var ug=te((Hq,NC)=>{"use strict";function kC(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(kC)}catch(e){console.error(e)}}kC(),NC.exports=IC()});var FT=te(Id=>{"use strict";var ht=zC(),rA=Ce(),TU=ug();function I(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}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 oA(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function _l(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function aA(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 sA(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 OC(e){if(_l(e)!==e)throw Error(I(188))}function IU(e){var t=e.alternate;if(!t){if(t=_l(e),t===null)throw Error(I(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return OC(i),e;if(o===r)return OC(i),t;o=o.sibling}throw Error(I(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a)throw Error(I(189))}}if(n.alternate!==r)throw Error(I(190))}if(n.tag!==3)throw Error(I(188));return n.stateNode.current===n?e:t}function lA(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=lA(e),t!==null)return t;e=e.sibling}return null}var Ve=Object.assign,kU=Symbol.for("react.element"),au=Symbol.for("react.transitional.element"),Fs=Symbol.for("react.portal"),Yo=Symbol.for("react.fragment"),cA=Symbol.for("react.strict_mode"),Fg=Symbol.for("react.profiler"),uA=Symbol.for("react.consumer"),Ii=Symbol.for("react.context"),Lh=Symbol.for("react.forward_ref"),Hg=Symbol.for("react.suspense"),Bg=Symbol.for("react.suspense_list"),jh=Symbol.for("react.memo"),ir=Symbol.for("react.lazy");Symbol.for("react.scope");var Gg=Symbol.for("react.activity");Symbol.for("react.legacy_hidden");Symbol.for("react.tracing_marker");var NU=Symbol.for("react.memo_cache_sentinel");Symbol.for("react.view_transition");var MC=Symbol.iterator;function Us(e){return e===null||typeof e!="object"?null:(e=MC&&e[MC]||e["@@iterator"],typeof e=="function"?e:null)}var OU=Symbol.for("react.client.reference");function Xg(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===OU?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Yo:return"Fragment";case Fg:return"Profiler";case cA:return"StrictMode";case Hg:return"Suspense";case Bg:return"SuspenseList";case Gg:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Fs:return"Portal";case Ii:return e.displayName||"Context";case uA:return(e._context.displayName||"Context")+".Consumer";case Lh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case jh:return t=e.displayName||null,t!==null?t:Xg(e.type)||"Memo";case ir:t=e._payload,e=e._init;try{return Xg(e(t))}catch(n){}}return null}var Hs=Array.isArray,re=rA.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_e=TU.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Qr={pending:!1,data:null,method:null,action:null},Yg=[],Jo=-1;function li(e){return{current:e}}function _t(e){0>Jo||(e.current=Yg[Jo],Yg[Jo]=null,Jo--)}function Pe(e,t){Jo++,Yg[Jo]=e.current,e.current=t}var si=li(null),ll=li(null),pr=li(null),Lu=li(null);function ju(e,t){switch(Pe(pr,t),Pe(ll,e),Pe(si,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ZE(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=ZE(t),e=IT(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}_t(si),Pe(si,e)}function pa(){_t(si),_t(ll),_t(pr)}function Jg(e){e.memoizedState!==null&&Pe(Lu,e);var t=si.current,n=IT(t,e.type);t!==n&&(Pe(ll,e),Pe(si,n))}function Zu(e){ll.current===e&&(_t(si),_t(ll)),Lu.current===e&&(_t(Lu),Sl._currentValue=Qr)}var dg,DC;function Yr(e){if(dg===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);dg=t&&t[1]||"",DC=-1<n.stack.indexOf(`
|
|
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
`+dg+e+DC}var fg=!1;function mg(e,t){if(!e||fg)return"";fg=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var l=function(){throw Error()};if(Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(p){var f=p}Reflect.construct(e,[],l)}else{try{l.call()}catch(p){f=p}e.call(l.prototype)}}else{try{throw Error()}catch(p){f=p}(l=e())&&typeof l.catch=="function"&&l.catch(function(){})}}catch(p){if(p&&f&&typeof p.stack=="string")return[p.stack,f.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=r.DetermineComponentFrameRoot(),a=o[0],s=o[1];if(a&&s){var c=a.split(`
|
|
`),d=s.split(`
|
|
`);for(i=r=0;r<c.length&&!c[r].includes("DetermineComponentFrameRoot");)r++;for(;i<d.length&&!d[i].includes("DetermineComponentFrameRoot");)i++;if(r===c.length||i===d.length)for(r=c.length-1,i=d.length-1;1<=r&&0<=i&&c[r]!==d[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==d[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==d[i]){var m=`
|
|
`+c[r].replace(" at new "," at ");return e.displayName&&m.includes("<anonymous>")&&(m=m.replace("<anonymous>",e.displayName)),m}while(1<=r&&0<=i);break}}}finally{fg=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Yr(n):""}function MU(e,t){switch(e.tag){case 26:case 27:case 5:return Yr(e.type);case 16:return Yr("Lazy");case 13:return e.child!==t&&t!==null?Yr("Suspense Fallback"):Yr("Suspense");case 19:return Yr("SuspenseList");case 0:case 15:return mg(e.type,!1);case 11:return mg(e.type.render,!1);case 1:return mg(e.type,!0);case 31:return Yr("Activity");default:return""}}function RC(e){try{var t="",n=null;do t+=MU(e,n),n=e,e=e.return;while(e);return t}catch(r){return`
|
|
Error generating stack: `+r.message+`
|
|
`+r.stack}}var Kg=Object.prototype.hasOwnProperty,Zh=ht.unstable_scheduleCallback,pg=ht.unstable_cancelCallback,DU=ht.unstable_shouldYield,RU=ht.unstable_requestPaint,mn=ht.unstable_now,UU=ht.unstable_getCurrentPriorityLevel,dA=ht.unstable_ImmediatePriority,fA=ht.unstable_UserBlockingPriority,qu=ht.unstable_NormalPriority,PU=ht.unstable_LowPriority,mA=ht.unstable_IdlePriority,LU=ht.log,jU=ht.unstable_setDisableYieldValue,wl=null,pn=null;function cr(e){if(typeof LU=="function"&&jU(e),pn&&typeof pn.setStrictMode=="function")try{pn.setStrictMode(wl,e)}catch(t){}}var gn=Math.clz32?Math.clz32:VU,ZU=Math.log,qU=Math.LN2;function VU(e){return e>>>=0,e===0?32:31-(ZU(e)/qU|0)|0}var su=256,lu=262144,cu=4194304;function Jr(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 pd(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,o=e.suspendedLanes,a=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s!==0?(r=s&~o,r!==0?i=Jr(r):(a&=s,a!==0?i=Jr(a):n||(n=s&~e,n!==0&&(i=Jr(n))))):(s=r&~o,s!==0?i=Jr(s):a!==0?i=Jr(a):n||(n=r&~e,n!==0&&(i=Jr(n)))),i===0?0:t!==0&&t!==i&&!(t&o)&&(o=i&-i,n=t&-t,o>=n||o===32&&(n&4194048)!==0)?t:i}function $l(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function FU(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 pA(){var e=cu;return cu<<=1,!(cu&62914560)&&(cu=4194304),e}function gg(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Cl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function HU(e,t,n,r,i,o){var a=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,d=e.hiddenUpdates;for(n=a&~n;0<n;){var m=31-gn(n),l=1<<m;s[m]=0,c[m]=-1;var f=d[m];if(f!==null)for(d[m]=null,m=0;m<f.length;m++){var p=f[m];p!==null&&(p.lane&=-536870913)}n&=~l}r!==0&&gA(e,r,0),o!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=o&~(a&~t))}function gA(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-gn(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function hA(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-gn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function vA(e,t){var n=t&-t;return n=n&42?1:qh(n),n&(e.suspendedLanes|t)?0:n}function qh(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 Vh(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function yA(){var e=_e.p;return e!==0?e:(e=window.event,e===void 0?32:ZT(e.type))}function UC(e,t){var n=_e.p;try{return _e.p=e,t()}finally{_e.p=n}}var Ar=Math.random().toString(36).slice(2),Ct="__reactFiber$"+Ar,Wt="__reactProps$"+Ar,Ca="__reactContainer$"+Ar,Wg="__reactEvents$"+Ar,BU="__reactListeners$"+Ar,GU="__reactHandles$"+Ar,PC="__reactResources$"+Ar,El="__reactMarker$"+Ar;function Fh(e){delete e[Ct],delete e[Wt],delete e[Wg],delete e[BU],delete e[GU]}function Ko(e){var t=e[Ct];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ca]||n[Ct]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=BE(e);e!==null;){if(n=e[Ct])return n;e=BE(e)}return t}e=n,n=e.parentNode}return null}function Ea(e){if(e=e[Ct]||e[Ca]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Bs(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(I(33))}function sa(e){var t=e[PC];return t||(t=e[PC]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function xt(e){e[El]=!0}var SA=new Set,bA={};function co(e,t){ga(e,t),ga(e+"Capture",t)}function ga(e,t){for(bA[e]=t,e=0;e<t.length;e++)SA.add(t[e])}var XU=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]*$"),LC={},jC={};function YU(e){return Kg.call(jC,e)?!0:Kg.call(LC,e)?!1:XU.test(e)?jC[e]=!0:(LC[e]=!0,!1)}function $u(e,t,n){if(YU(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function uu(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function wi(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+r)}}function zn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function xA(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function JU(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r!="undefined"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){n=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qg(e){if(!e._valueTracker){var t=xA(e)?"checked":"value";e._valueTracker=JU(e,t,""+e[t])}}function _A(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=xA(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Vu(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(t){return e.body}}var KU=/[\n"\\]/g;function kn(e){return e.replace(KU,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function eh(e,t,n,r,i,o,a,s){e.name="",a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"?e.type=a:e.removeAttribute("type"),t!=null?a==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+zn(t)):e.value!==""+zn(t)&&(e.value=""+zn(t)):a!=="submit"&&a!=="reset"||e.removeAttribute("value"),t!=null?th(e,a,zn(t)):n!=null?th(e,a,zn(n)):r!=null&&e.removeAttribute("value"),i==null&&o!=null&&(e.defaultChecked=!!o),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.name=""+zn(s):e.removeAttribute("name")}function wA(e,t,n,r,i,o,a,s){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||n!=null){if(!(o!=="submit"&&o!=="reset"||t!=null)){Qg(e);return}n=n!=null?""+zn(n):"",t=t!=null?""+zn(t):n,s||t===e.value||(e.value=t),e.defaultValue=t}r=r!=null?r:i,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.name=a),Qg(e)}function th(e,t,n){t==="number"&&Vu(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function la(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+zn(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function $A(e,t,n){if(t!=null&&(t=""+zn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+zn(n):""}function CA(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(I(92));if(Hs(r)){if(1<r.length)throw Error(I(93));r=r[0]}n=r}n==null&&(n=""),t=n}n=zn(t),e.defaultValue=n,r=e.textContent,r===n&&r!==""&&r!==null&&(e.value=r),Qg(e)}function ha(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var WU=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 ZC(e,t,n){var r=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,n):typeof n!="number"||n===0||WU.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function EA(e,t,n){if(t!=null&&typeof t!="object")throw Error(I(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&ZC(e,i,r)}else for(var o in t)t.hasOwnProperty(o)&&ZC(e,o,t[o])}function Hh(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 QU=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"]]),e4=/^[\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 Cu(e){return e4.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ki(){}var nh=null;function Bh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wo=null,ca=null;function qC(e){var t=Ea(e);if(t&&(e=t.stateNode)){var n=e[Wt]||null;e:switch(e=t.stateNode,t.type){case"input":if(eh(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+kn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[Wt]||null;if(!i)throw Error(I(90));eh(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&_A(r)}break e;case"textarea":$A(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&la(e,!!n.multiple,t,!1)}}}var hg=!1;function AA(e,t,n){if(hg)return e(t,n);hg=!0;try{var r=e(t);return r}finally{if(hg=!1,(Wo!==null||ca!==null)&&(Ed(),Wo&&(t=Wo,e=ca,ca=Wo=null,qC(t),e)))for(t=0;t<e.length;t++)qC(e[t])}}function cl(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Wt]||null;if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(I(231,t,typeof n));return n}var Ri=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),ih=!1;if(Ri)try{Fo={},Object.defineProperty(Fo,"passive",{get:function(){ih=!0}}),window.addEventListener("test",Fo,Fo),window.removeEventListener("test",Fo,Fo)}catch(e){ih=!1}var Fo,ur=null,Gh=null,Eu=null;function zA(){if(Eu)return Eu;var e,t=Gh,n=t.length,r,i="value"in ur?ur.value:ur.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===i[o-r];r++);return Eu=i.slice(e,1<r?1-r:void 0)}function Au(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 du(){return!0}function VC(){return!1}function Qt(e){function t(n,r,i,o,a){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(o):o[s]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?du:VC,this.isPropagationStopped=VC,this}return Ve(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=du)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=du)},persist:function(){},isPersistent:du}),t}var uo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gd=Qt(uo),Al=Ve({},uo,{view:0,detail:0}),t4=Qt(Al),vg,yg,Ps,hd=Ve({},Al,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xh,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!==Ps&&(Ps&&e.type==="mousemove"?(vg=e.screenX-Ps.screenX,yg=e.screenY-Ps.screenY):yg=vg=0,Ps=e),vg)},movementY:function(e){return"movementY"in e?e.movementY:yg}}),FC=Qt(hd),n4=Ve({},hd,{dataTransfer:0}),i4=Qt(n4),r4=Ve({},Al,{relatedTarget:0}),Sg=Qt(r4),o4=Ve({},uo,{animationName:0,elapsedTime:0,pseudoElement:0}),a4=Qt(o4),s4=Ve({},uo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),l4=Qt(s4),c4=Ve({},uo,{data:0}),HC=Qt(c4),u4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},d4={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"},f4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function m4(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=f4[e])?!!t[e]:!1}function Xh(){return m4}var p4=Ve({},Al,{key:function(e){if(e.key){var t=u4[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Au(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?d4[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xh,charCode:function(e){return e.type==="keypress"?Au(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Au(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),g4=Qt(p4),h4=Ve({},hd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),BC=Qt(h4),v4=Ve({},Al,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xh}),y4=Qt(v4),S4=Ve({},uo,{propertyName:0,elapsedTime:0,pseudoElement:0}),b4=Qt(S4),x4=Ve({},hd,{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}),_4=Qt(x4),w4=Ve({},uo,{newState:0,oldState:0}),$4=Qt(w4),C4=[9,13,27,32],Yh=Ri&&"CompositionEvent"in window,Ys=null;Ri&&"documentMode"in document&&(Ys=document.documentMode);var E4=Ri&&"TextEvent"in window&&!Ys,TA=Ri&&(!Yh||Ys&&8<Ys&&11>=Ys),GC=String.fromCharCode(32),XC=!1;function IA(e,t){switch(e){case"keyup":return C4.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kA(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Qo=!1;function A4(e,t){switch(e){case"compositionend":return kA(t);case"keypress":return t.which!==32?null:(XC=!0,GC);case"textInput":return e=t.data,e===GC&&XC?null:e;default:return null}}function z4(e,t){if(Qo)return e==="compositionend"||!Yh&&IA(e,t)?(e=zA(),Eu=Gh=ur=null,Qo=!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 TA&&t.locale!=="ko"?null:t.data;default:return null}}var T4={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 YC(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!T4[e.type]:t==="textarea"}function NA(e,t,n,r){Wo?ca?ca.push(r):ca=[r]:Wo=r,t=sd(t,"onChange"),0<t.length&&(n=new gd("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Js=null,ul=null;function I4(e){AT(e,0)}function vd(e){var t=Bs(e);if(_A(t))return e}function JC(e,t){if(e==="change")return t}var OA=!1;Ri&&(Ri?(mu="oninput"in document,mu||(bg=document.createElement("div"),bg.setAttribute("oninput","return;"),mu=typeof bg.oninput=="function"),fu=mu):fu=!1,OA=fu&&(!document.documentMode||9<document.documentMode));var fu,mu,bg;function KC(){Js&&(Js.detachEvent("onpropertychange",MA),ul=Js=null)}function MA(e){if(e.propertyName==="value"&&vd(ul)){var t=[];NA(t,ul,e,Bh(e)),AA(I4,t)}}function k4(e,t,n){e==="focusin"?(KC(),Js=t,ul=n,Js.attachEvent("onpropertychange",MA)):e==="focusout"&&KC()}function N4(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return vd(ul)}function O4(e,t){if(e==="click")return vd(t)}function M4(e,t){if(e==="input"||e==="change")return vd(t)}function D4(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var vn=typeof Object.is=="function"?Object.is:D4;function dl(e,t){if(vn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Kg.call(t,i)||!vn(e[i],t[i]))return!1}return!0}function WC(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function QC(e,t){var n=WC(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=WC(n)}}function DA(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?DA(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function RA(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Vu(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch(r){n=!1}if(n)e=t.contentWindow;else break;t=Vu(e.document)}return t}function Jh(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 R4=Ri&&"documentMode"in document&&11>=document.documentMode,ea=null,rh=null,Ks=null,oh=!1;function eE(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;oh||ea==null||ea!==Vu(r)||(r=ea,"selectionStart"in r&&Jh(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ks&&dl(Ks,r)||(Ks=r,r=sd(rh,"onSelect"),0<r.length&&(t=new gd("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ea)))}function Xr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ta={animationend:Xr("Animation","AnimationEnd"),animationiteration:Xr("Animation","AnimationIteration"),animationstart:Xr("Animation","AnimationStart"),transitionrun:Xr("Transition","TransitionRun"),transitionstart:Xr("Transition","TransitionStart"),transitioncancel:Xr("Transition","TransitionCancel"),transitionend:Xr("Transition","TransitionEnd")},xg={},UA={};Ri&&(UA=document.createElement("div").style,"AnimationEvent"in window||(delete ta.animationend.animation,delete ta.animationiteration.animation,delete ta.animationstart.animation),"TransitionEvent"in window||delete ta.transitionend.transition);function fo(e){if(xg[e])return xg[e];if(!ta[e])return e;var t=ta[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in UA)return xg[e]=t[n];return e}var PA=fo("animationend"),LA=fo("animationiteration"),jA=fo("animationstart"),U4=fo("transitionrun"),P4=fo("transitionstart"),L4=fo("transitioncancel"),ZA=fo("transitionend"),qA=new Map,ah="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(" ");ah.push("scrollEnd");function Gn(e,t){qA.set(e,t),co(t,[e])}var Fu=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},An=[],na=0,Kh=0;function yd(){for(var e=na,t=Kh=na=0;t<e;){var n=An[t];An[t++]=null;var r=An[t];An[t++]=null;var i=An[t];An[t++]=null;var o=An[t];if(An[t++]=null,r!==null&&i!==null){var a=r.pending;a===null?i.next=i:(i.next=a.next,a.next=i),r.pending=i}o!==0&&VA(n,i,o)}}function Sd(e,t,n,r){An[na++]=e,An[na++]=t,An[na++]=n,An[na++]=r,Kh|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Wh(e,t,n,r){return Sd(e,t,n,r),Hu(e)}function mo(e,t){return Sd(e,null,null,t),Hu(e)}function VA(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,o=e.return;o!==null;)o.childLanes|=n,r=o.alternate,r!==null&&(r.childLanes|=n),o.tag===22&&(e=o.stateNode,e===null||e._visibility&1||(i=!0)),e=o,o=o.return;return e.tag===3?(o=e.stateNode,i&&t!==null&&(i=31-gn(n),e=o.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),o):null}function Hu(e){if(50<al)throw al=0,Ah=null,Error(I(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ia={};function j4(e,t,n,r){this.tag=e,this.key=n,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dn(e,t,n,r){return new j4(e,t,n,r)}function Qh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Oi(e,t){var n=e.alternate;return n===null?(n=dn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function FA(e,t){e.flags&=65011714;var n=e.alternate;return n===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=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function zu(e,t,n,r,i,o){var a=0;if(r=e,typeof e=="function")Qh(e)&&(a=1);else if(typeof e=="string")a=VP(e,n,si.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Gg:return e=dn(31,n,t,i),e.elementType=Gg,e.lanes=o,e;case Yo:return eo(n.children,i,o,t);case cA:a=8,i|=24;break;case Fg:return e=dn(12,n,t,i|2),e.elementType=Fg,e.lanes=o,e;case Hg:return e=dn(13,n,t,i),e.elementType=Hg,e.lanes=o,e;case Bg:return e=dn(19,n,t,i),e.elementType=Bg,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ii:a=10;break e;case uA:a=9;break e;case Lh:a=11;break e;case jh:a=14;break e;case ir:a=16,r=null;break e}a=29,n=Error(I(130,e===null?"null":typeof e,"")),r=null}return t=dn(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function eo(e,t,n,r){return e=dn(7,e,r,t),e.lanes=n,e}function _g(e,t,n){return e=dn(6,e,null,t),e.lanes=n,e}function HA(e){var t=dn(18,null,null,0);return t.stateNode=e,t}function wg(e,t,n){return t=dn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var tE=new WeakMap;function Nn(e,t){if(typeof e=="object"&&e!==null){var n=tE.get(e);return n!==void 0?n:(t={value:e,source:t,stack:RC(t)},tE.set(e,t),t)}return{value:e,source:t,stack:RC(t)}}var ra=[],oa=0,Bu=null,fl=0,Tn=[],In=0,wr=null,ri=1,oi="";function zi(e,t){ra[oa++]=fl,ra[oa++]=Bu,Bu=e,fl=t}function BA(e,t,n){Tn[In++]=ri,Tn[In++]=oi,Tn[In++]=wr,wr=e;var r=ri;e=oi;var i=32-gn(r)-1;r&=~(1<<i),n+=1;var o=32-gn(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,ri=1<<32-gn(t)+i|n<<i|r,oi=o+e}else ri=1<<o|n<<i|r,oi=e}function ev(e){e.return!==null&&(zi(e,1),BA(e,1,0))}function tv(e){for(;e===Bu;)Bu=ra[--oa],ra[oa]=null,fl=ra[--oa],ra[oa]=null;for(;e===wr;)wr=Tn[--In],Tn[In]=null,oi=Tn[--In],Tn[In]=null,ri=Tn[--In],Tn[In]=null}function GA(e,t){Tn[In++]=ri,Tn[In++]=oi,Tn[In++]=wr,ri=t.id,oi=t.overflow,wr=e}var Et=null,qe=null,be=!1,gr=null,On=!1,sh=Error(I(519));function $r(e){var t=Error(I(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ml(Nn(t,e)),sh}function nE(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Ct]=e,t[Wt]=r,n){case"dialog":ge("cancel",t),ge("close",t);break;case"iframe":case"object":case"embed":ge("load",t);break;case"video":case"audio":for(n=0;n<vl.length;n++)ge(vl[n],t);break;case"source":ge("error",t);break;case"img":case"image":case"link":ge("error",t),ge("load",t);break;case"details":ge("toggle",t);break;case"input":ge("invalid",t),wA(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":ge("invalid",t);break;case"textarea":ge("invalid",t),CA(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||r.suppressHydrationWarning===!0||TT(t.textContent,n)?(r.popover!=null&&(ge("beforetoggle",t),ge("toggle",t)),r.onScroll!=null&&ge("scroll",t),r.onScrollEnd!=null&&ge("scrollend",t),r.onClick!=null&&(t.onclick=ki),t=!0):t=!1,t||$r(e,!0)}function iE(e){for(Et=e.return;Et;)switch(Et.tag){case 5:case 31:case 13:On=!1;return;case 27:case 3:On=!0;return;default:Et=Et.return}}function Ho(e){if(e!==Et)return!1;if(!be)return iE(e),be=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Nh(e.type,e.memoizedProps)),n=!n),n&&qe&&$r(e),iE(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(I(317));qe=HE(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(I(317));qe=HE(e)}else t===27?(t=qe,zr(e.type)?(e=Rh,Rh=null,qe=e):qe=t):qe=Et?Dn(e.stateNode.nextSibling):null;return!0}function ro(){qe=Et=null,be=!1}function $g(){var e=gr;return e!==null&&(Jt===null?Jt=e:Jt.push.apply(Jt,e),gr=null),e}function ml(e){gr===null?gr=[e]:gr.push(e)}var lh=li(null),po=null,Ni=null;function or(e,t,n){Pe(lh,t._currentValue),t._currentValue=n}function Mi(e){e._currentValue=lh.current,_t(lh)}function ch(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function uh(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var o=i.dependencies;if(o!==null){var a=i.child;o=o.firstContext;e:for(;o!==null;){var s=o;o=i;for(var c=0;c<t.length;c++)if(s.context===t[c]){o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),ch(o.return,n,e),r||(a=null);break e}o=s.next}}else if(i.tag===18){if(a=i.return,a===null)throw Error(I(341));a.lanes|=n,o=a.alternate,o!==null&&(o.lanes|=n),ch(a,n,e),a=null}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===e){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}}function Aa(e,t,n,r){e=null;for(var i=t,o=!1;i!==null;){if(!o){if(i.flags&524288)o=!0;else if(i.flags&262144)break}if(i.tag===10){var a=i.alternate;if(a===null)throw Error(I(387));if(a=a.memoizedProps,a!==null){var s=i.type;vn(i.pendingProps.value,a.value)||(e!==null?e.push(s):e=[s])}}else if(i===Lu.current){if(a=i.alternate,a===null)throw Error(I(387));a.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Sl):e=[Sl])}i=i.return}e!==null&&uh(t,e,n,r),t.flags|=262144}function Gu(e){for(e=e.firstContext;e!==null;){if(!vn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function oo(e){po=e,Ni=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function At(e){return XA(po,e)}function pu(e,t){return po===null&&oo(e),XA(e,t)}function XA(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ni===null){if(e===null)throw Error(I(308));Ni=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ni=Ni.next=t;return n}var Z4=typeof AbortController!="undefined"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},q4=ht.unstable_scheduleCallback,V4=ht.unstable_NormalPriority,at={$$typeof:Ii,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function nv(){return{controller:new Z4,data:new Map,refCount:0}}function zl(e){e.refCount--,e.refCount===0&&q4(V4,function(){e.controller.abort()})}var Ws=null,dh=0,va=0,ua=null;function F4(e,t){if(Ws===null){var n=Ws=[];dh=0,va=Av(),ua={status:"pending",value:void 0,then:function(r){n.push(r)}}}return dh++,t.then(rE,rE),t}function rE(){if(--dh===0&&Ws!==null){ua!==null&&(ua.status="fulfilled");var e=Ws;Ws=null,va=0,ua=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function H4(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var i=0;i<n.length;i++)(0,n[i])(t)},function(i){for(r.status="rejected",r.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),r}var oE=re.S;re.S=function(e,t){lT=mn(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&F4(e,t),oE!==null&&oE(e,t)};var to=li(null);function iv(){var e=to.current;return e!==null?e:De.pooledCache}function Tu(e,t){t===null?Pe(to,to.current):Pe(to,t.pool)}function YA(){var e=iv();return e===null?null:{parent:at._currentValue,pool:e}}var za=Error(I(460)),rv=Error(I(474)),bd=Error(I(542)),Xu={then:function(){}};function aE(e){return e=e.status,e==="fulfilled"||e==="rejected"}function JA(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(ki,ki),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,lE(e),e;default:if(typeof t.status=="string")t.then(ki,ki);else{if(e=De,e!==null&&100<e.shellSuspendCounter)throw Error(I(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=r}},function(r){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,lE(e),e}throw no=t,za}}function Kr(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(no=n,za):n}}var no=null;function sE(){if(no===null)throw Error(I(459));var e=no;return no=null,e}function lE(e){if(e===za||e===bd)throw Error(I(483))}var da=null,pl=0;function gu(e){var t=pl;return pl+=1,da===null&&(da=[]),JA(da,e,t)}function Ls(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function hu(e,t){throw t.$$typeof===kU?Error(I(525)):(e=Object.prototype.toString.call(t),Error(I(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function KA(e){function t(S,g){if(e){var b=S.deletions;b===null?(S.deletions=[g],S.flags|=16):b.push(g)}}function n(S,g){if(!e)return null;for(;g!==null;)t(S,g),g=g.sibling;return null}function r(S){for(var g=new Map;S!==null;)S.key!==null?g.set(S.key,S):g.set(S.index,S),S=S.sibling;return g}function i(S,g){return S=Oi(S,g),S.index=0,S.sibling=null,S}function o(S,g,b){return S.index=b,e?(b=S.alternate,b!==null?(b=b.index,b<g?(S.flags|=67108866,g):b):(S.flags|=67108866,g)):(S.flags|=1048576,g)}function a(S){return e&&S.alternate===null&&(S.flags|=67108866),S}function s(S,g,b,v){return g===null||g.tag!==6?(g=_g(b,S.mode,v),g.return=S,g):(g=i(g,b),g.return=S,g)}function c(S,g,b,v){var _=b.type;return _===Yo?m(S,g,b.props.children,v,b.key):g!==null&&(g.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===ir&&Kr(_)===g.type)?(g=i(g,b.props),Ls(g,b),g.return=S,g):(g=zu(b.type,b.key,b.props,null,S.mode,v),Ls(g,b),g.return=S,g)}function d(S,g,b,v){return g===null||g.tag!==4||g.stateNode.containerInfo!==b.containerInfo||g.stateNode.implementation!==b.implementation?(g=wg(b,S.mode,v),g.return=S,g):(g=i(g,b.children||[]),g.return=S,g)}function m(S,g,b,v,_){return g===null||g.tag!==7?(g=eo(b,S.mode,v,_),g.return=S,g):(g=i(g,b),g.return=S,g)}function l(S,g,b){if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return g=_g(""+g,S.mode,b),g.return=S,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case au:return b=zu(g.type,g.key,g.props,null,S.mode,b),Ls(b,g),b.return=S,b;case Fs:return g=wg(g,S.mode,b),g.return=S,g;case ir:return g=Kr(g),l(S,g,b)}if(Hs(g)||Us(g))return g=eo(g,S.mode,b,null),g.return=S,g;if(typeof g.then=="function")return l(S,gu(g),b);if(g.$$typeof===Ii)return l(S,pu(S,g),b);hu(S,g)}return null}function f(S,g,b,v){var _=g!==null?g.key:null;if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return _!==null?null:s(S,g,""+b,v);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case au:return b.key===_?c(S,g,b,v):null;case Fs:return b.key===_?d(S,g,b,v):null;case ir:return b=Kr(b),f(S,g,b,v)}if(Hs(b)||Us(b))return _!==null?null:m(S,g,b,v,null);if(typeof b.then=="function")return f(S,g,gu(b),v);if(b.$$typeof===Ii)return f(S,g,pu(S,b),v);hu(S,b)}return null}function p(S,g,b,v,_){if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return S=S.get(b)||null,s(g,S,""+v,_);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case au:return S=S.get(v.key===null?b:v.key)||null,c(g,S,v,_);case Fs:return S=S.get(v.key===null?b:v.key)||null,d(g,S,v,_);case ir:return v=Kr(v),p(S,g,b,v,_)}if(Hs(v)||Us(v))return S=S.get(b)||null,m(g,S,v,_,null);if(typeof v.then=="function")return p(S,g,b,gu(v),_);if(v.$$typeof===Ii)return p(S,g,b,pu(g,v),_);hu(g,v)}return null}function h(S,g,b,v){for(var _=null,C=null,E=g,A=g=0,T=null;E!==null&&A<b.length;A++){E.index>A?(T=E,E=null):T=E.sibling;var M=f(S,E,b[A],v);if(M===null){E===null&&(E=T);break}e&&E&&M.alternate===null&&t(S,E),g=o(M,g,A),C===null?_=M:C.sibling=M,C=M,E=T}if(A===b.length)return n(S,E),be&&zi(S,A),_;if(E===null){for(;A<b.length;A++)E=l(S,b[A],v),E!==null&&(g=o(E,g,A),C===null?_=E:C.sibling=E,C=E);return be&&zi(S,A),_}for(E=r(E);A<b.length;A++)T=p(E,S,A,b[A],v),T!==null&&(e&&T.alternate!==null&&E.delete(T.key===null?A:T.key),g=o(T,g,A),C===null?_=T:C.sibling=T,C=T);return e&&E.forEach(function(P){return t(S,P)}),be&&zi(S,A),_}function y(S,g,b,v){if(b==null)throw Error(I(151));for(var _=null,C=null,E=g,A=g=0,T=null,M=b.next();E!==null&&!M.done;A++,M=b.next()){E.index>A?(T=E,E=null):T=E.sibling;var P=f(S,E,M.value,v);if(P===null){E===null&&(E=T);break}e&&E&&P.alternate===null&&t(S,E),g=o(P,g,A),C===null?_=P:C.sibling=P,C=P,E=T}if(M.done)return n(S,E),be&&zi(S,A),_;if(E===null){for(;!M.done;A++,M=b.next())M=l(S,M.value,v),M!==null&&(g=o(M,g,A),C===null?_=M:C.sibling=M,C=M);return be&&zi(S,A),_}for(E=r(E);!M.done;A++,M=b.next())M=p(E,S,A,M.value,v),M!==null&&(e&&M.alternate!==null&&E.delete(M.key===null?A:M.key),g=o(M,g,A),C===null?_=M:C.sibling=M,C=M);return e&&E.forEach(function(V){return t(S,V)}),be&&zi(S,A),_}function x(S,g,b,v){if(typeof b=="object"&&b!==null&&b.type===Yo&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case au:e:{for(var _=b.key;g!==null;){if(g.key===_){if(_=b.type,_===Yo){if(g.tag===7){n(S,g.sibling),v=i(g,b.props.children),v.return=S,S=v;break e}}else if(g.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===ir&&Kr(_)===g.type){n(S,g.sibling),v=i(g,b.props),Ls(v,b),v.return=S,S=v;break e}n(S,g);break}else t(S,g);g=g.sibling}b.type===Yo?(v=eo(b.props.children,S.mode,v,b.key),v.return=S,S=v):(v=zu(b.type,b.key,b.props,null,S.mode,v),Ls(v,b),v.return=S,S=v)}return a(S);case Fs:e:{for(_=b.key;g!==null;){if(g.key===_)if(g.tag===4&&g.stateNode.containerInfo===b.containerInfo&&g.stateNode.implementation===b.implementation){n(S,g.sibling),v=i(g,b.children||[]),v.return=S,S=v;break e}else{n(S,g);break}else t(S,g);g=g.sibling}v=wg(b,S.mode,v),v.return=S,S=v}return a(S);case ir:return b=Kr(b),x(S,g,b,v)}if(Hs(b))return h(S,g,b,v);if(Us(b)){if(_=Us(b),typeof _!="function")throw Error(I(150));return b=_.call(b),y(S,g,b,v)}if(typeof b.then=="function")return x(S,g,gu(b),v);if(b.$$typeof===Ii)return x(S,g,pu(S,b),v);hu(S,b)}return typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint"?(b=""+b,g!==null&&g.tag===6?(n(S,g.sibling),v=i(g,b),v.return=S,S=v):(n(S,g),v=_g(b,S.mode,v),v.return=S,S=v),a(S)):n(S,g)}return function(S,g,b,v){try{pl=0;var _=x(S,g,b,v);return da=null,_}catch(E){if(E===za||E===bd)throw E;var C=dn(29,E,null,S.mode);return C.lanes=v,C.return=S,C}finally{}}}var ao=KA(!0),WA=KA(!1),rr=!1;function ov(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function fh(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 hr(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function vr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,xe&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Hu(e),VA(e,null,n),t}return Sd(e,r,t,n),Hu(e)}function Qs(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,hA(e,n)}}function Cg(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};o===null?i=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var mh=!1;function el(){if(mh){var e=ua;if(e!==null)throw e}}function tl(e,t,n,r){mh=!1;var i=e.updateQueue;rr=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,d=c.next;c.next=null,a===null?o=d:a.next=d,a=c;var m=e.alternate;m!==null&&(m=m.updateQueue,s=m.lastBaseUpdate,s!==a&&(s===null?m.firstBaseUpdate=d:s.next=d,m.lastBaseUpdate=c))}if(o!==null){var l=i.baseState;a=0,m=d=c=null,s=o;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Se&f)===f:(r&f)===f){f!==0&&f===va&&(mh=!0),m!==null&&(m=m.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var h=e,y=s;f=t;var x=n;switch(y.tag){case 1:if(h=y.payload,typeof h=="function"){l=h.call(x,l,f);break e}l=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=y.payload,f=typeof h=="function"?h.call(x,l,f):h,f==null)break e;l=Ve({},l,f);break e;case 2:rr=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},m===null?(d=m=p,c=l):m=m.next=p,a|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);m===null&&(c=l),i.baseState=c,i.firstBaseUpdate=d,i.lastBaseUpdate=m,o===null&&(i.shared.lanes=0),Er|=a,e.lanes=a,e.memoizedState=l}}function QA(e,t){if(typeof e!="function")throw Error(I(191,e));e.call(t)}function ez(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)QA(n[e],t)}var ya=li(null),Yu=li(0);function cE(e,t){e=ji,Pe(Yu,e),Pe(ya,t),ji=e|t.baseLanes}function ph(){Pe(Yu,ji),Pe(ya,ya.current)}function av(){ji=Yu.current,_t(ya),_t(Yu)}var yn=li(null),Mn=null;function ar(e){var t=e.alternate;Pe(Qe,Qe.current&1),Pe(yn,e),Mn===null&&(t===null||ya.current!==null||t.memoizedState!==null)&&(Mn=e)}function gh(e){Pe(Qe,Qe.current),Pe(yn,e),Mn===null&&(Mn=e)}function tz(e){e.tag===22?(Pe(Qe,Qe.current),Pe(yn,e),Mn===null&&(Mn=e)):sr(e)}function sr(){Pe(Qe,Qe.current),Pe(yn,yn.current)}function un(e){_t(yn),Mn===e&&(Mn=null),_t(Qe)}var Qe=li(0);function Ju(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Mh(n)||Dh(n)))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 Ui=0,de=null,ke=null,rt=null,Ku=!1,fa=!1,so=!1,Wu=0,gl=0,ma=null,B4=0;function Je(){throw Error(I(321))}function sv(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!vn(e[n],t[n]))return!1;return!0}function lv(e,t,n,r,i,o){return Ui=o,de=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,re.H=e===null||e.memoizedState===null?Nz:Sv,so=!1,o=n(r,i),so=!1,fa&&(o=iz(t,n,r,i)),nz(e),o}function nz(e){re.H=hl;var t=ke!==null&&ke.next!==null;if(Ui=0,rt=ke=de=null,Ku=!1,gl=0,ma=null,t)throw Error(I(300));e===null||st||(e=e.dependencies,e!==null&&Gu(e)&&(st=!0))}function iz(e,t,n,r){de=e;var i=0;do{if(fa&&(ma=null),gl=0,fa=!1,25<=i)throw Error(I(301));if(i+=1,rt=ke=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}re.H=Oz,o=t(n,r)}while(fa);return o}function G4(){var e=re.H,t=e.useState()[0];return t=typeof t.then=="function"?Tl(t):t,e=e.useState()[0],(ke!==null?ke.memoizedState:null)!==e&&(de.flags|=1024),t}function cv(){var e=Wu!==0;return Wu=0,e}function uv(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function dv(e){if(Ku){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ku=!1}Ui=0,rt=ke=de=null,fa=!1,gl=Wu=0,ma=null}function Zt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return rt===null?de.memoizedState=rt=e:rt=rt.next=e,rt}function et(){if(ke===null){var e=de.alternate;e=e!==null?e.memoizedState:null}else e=ke.next;var t=rt===null?de.memoizedState:rt.next;if(t!==null)rt=t,ke=e;else{if(e===null)throw de.alternate===null?Error(I(467)):Error(I(310));ke=e,e={memoizedState:ke.memoizedState,baseState:ke.baseState,baseQueue:ke.baseQueue,queue:ke.queue,next:null},rt===null?de.memoizedState=rt=e:rt=rt.next=e}return rt}function xd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Tl(e){var t=gl;return gl+=1,ma===null&&(ma=[]),e=JA(ma,e,t),t=de,(rt===null?t.memoizedState:rt.next)===null&&(t=t.alternate,re.H=t===null||t.memoizedState===null?Nz:Sv),e}function _d(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Tl(e);if(e.$$typeof===Ii)return At(e)}throw Error(I(438,String(e)))}function fv(e){var t=null,n=de.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=de.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=xd(),de.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=NU;return t.index++,n}function Pi(e,t){return typeof t=="function"?t(e):t}function Iu(e){var t=et();return mv(t,ke,e)}function mv(e,t,n){var r=e.queue;if(r===null)throw Error(I(311));r.lastRenderedReducer=n;var i=e.baseQueue,o=r.pending;if(o!==null){if(i!==null){var a=i.next;i.next=o.next,o.next=a}t.baseQueue=i=o,r.pending=null}if(o=e.baseState,i===null)e.memoizedState=o;else{t=i.next;var s=a=null,c=null,d=t,m=!1;do{var l=d.lane&-536870913;if(l!==d.lane?(Se&l)===l:(Ui&l)===l){var f=d.revertLane;if(f===0)c!==null&&(c=c.next={lane:0,revertLane:0,gesture:null,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),l===va&&(m=!0);else if((Ui&f)===f){d=d.next,f===va&&(m=!0);continue}else l={lane:0,revertLane:d.revertLane,gesture:null,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null},c===null?(s=c=l,a=o):c=c.next=l,de.lanes|=f,Er|=f;l=d.action,so&&n(o,l),o=d.hasEagerState?d.eagerState:n(o,l)}else f={lane:l,revertLane:d.revertLane,gesture:d.gesture,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null},c===null?(s=c=f,a=o):c=c.next=f,de.lanes|=l,Er|=l;d=d.next}while(d!==null&&d!==t);if(c===null?a=o:c.next=s,!vn(o,e.memoizedState)&&(st=!0,m&&(n=ua,n!==null)))throw n;e.memoizedState=o,e.baseState=a,e.baseQueue=c,r.lastRenderedState=o}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Eg(e){var t=et(),n=t.queue;if(n===null)throw Error(I(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do o=e(o,a.action),a=a.next;while(a!==i);vn(o,t.memoizedState)||(st=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function rz(e,t,n){var r=de,i=et(),o=be;if(o){if(n===void 0)throw Error(I(407));n=n()}else n=t();var a=!vn((ke||i).memoizedState,n);if(a&&(i.memoizedState=n,st=!0),i=i.queue,pv(sz.bind(null,r,i,e),[e]),i.getSnapshot!==t||a||rt!==null&&rt.memoizedState.tag&1){if(r.flags|=2048,Sa(9,{destroy:void 0},az.bind(null,r,i,n,t),null),De===null)throw Error(I(349));o||Ui&127||oz(r,t,n)}return n}function oz(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=de.updateQueue,t===null?(t=xd(),de.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function az(e,t,n,r){t.value=n,t.getSnapshot=r,lz(t)&&cz(e)}function sz(e,t,n){return n(function(){lz(t)&&cz(e)})}function lz(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!vn(e,n)}catch(r){return!0}}function cz(e){var t=mo(e,2);t!==null&&Kt(t,e,2)}function hh(e){var t=Zt();if(typeof e=="function"){var n=e;if(e=n(),so){cr(!0);try{n()}finally{cr(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pi,lastRenderedState:e},t}function uz(e,t,n,r){return e.baseState=n,mv(e,ke,typeof r=="function"?r:Pi)}function X4(e,t,n,r,i){if($d(e))throw Error(I(485));if(e=t.action,e!==null){var o={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(a){o.listeners.push(a)}};re.T!==null?n(!0):o.isTransition=!1,r(o),n=t.pending,n===null?(o.next=t.pending=o,dz(t,o)):(o.next=n.next,t.pending=n.next=o)}}function dz(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var o=re.T,a={};re.T=a;try{var s=n(i,r),c=re.S;c!==null&&c(a,s),uE(e,t,s)}catch(d){vh(e,t,d)}finally{o!==null&&a.types!==null&&(o.types=a.types),re.T=o}}else try{o=n(i,r),uE(e,t,o)}catch(d){vh(e,t,d)}}function uE(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(r){dE(e,t,r)},function(r){return vh(e,t,r)}):dE(e,t,n)}function dE(e,t,n){t.status="fulfilled",t.value=n,fz(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,dz(e,n)))}function vh(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=n,fz(t),t=t.next;while(t!==r)}e.action=null}function fz(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function mz(e,t){return t}function fE(e,t){if(be){var n=De.formState;if(n!==null){e:{var r=de;if(be){if(qe){t:{for(var i=qe,o=On;i.nodeType!==8;){if(!o){i=null;break t}if(i=Dn(i.nextSibling),i===null){i=null;break t}}o=i.data,i=o==="F!"||o==="F"?i:null}if(i){qe=Dn(i.nextSibling),r=i.data==="F!";break e}}$r(r)}r=!1}r&&(t=n[0])}}return n=Zt(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mz,lastRenderedState:t},n.queue=r,n=Tz.bind(null,de,r),r.dispatch=n,r=hh(!1),o=yv.bind(null,de,!1,r.queue),r=Zt(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=X4.bind(null,de,i,o,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function mE(e){var t=et();return pz(t,ke,e)}function pz(e,t,n){if(t=mv(e,t,mz)[0],e=Iu(Pi)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=Tl(t)}catch(a){throw a===za?bd:a}else r=t;t=et();var i=t.queue,o=i.dispatch;return n!==t.memoizedState&&(de.flags|=2048,Sa(9,{destroy:void 0},Y4.bind(null,i,n),null)),[r,o,e]}function Y4(e,t){e.action=t}function pE(e){var t=et(),n=ke;if(n!==null)return pz(t,n,e);et(),t=t.memoizedState,n=et();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Sa(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=de.updateQueue,t===null&&(t=xd(),de.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function gz(){return et().memoizedState}function ku(e,t,n,r){var i=Zt();de.flags|=e,i.memoizedState=Sa(1|t,{destroy:void 0},n,r===void 0?null:r)}function wd(e,t,n,r){var i=et();r=r===void 0?null:r;var o=i.memoizedState.inst;ke!==null&&r!==null&&sv(r,ke.memoizedState.deps)?i.memoizedState=Sa(t,o,n,r):(de.flags|=e,i.memoizedState=Sa(1|t,o,n,r))}function gE(e,t){ku(8390656,8,e,t)}function pv(e,t){wd(2048,8,e,t)}function J4(e){de.flags|=4;var t=de.updateQueue;if(t===null)t=xd(),de.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function hz(e){var t=et().memoizedState;return J4({ref:t,nextImpl:e}),function(){if(xe&2)throw Error(I(440));return t.impl.apply(void 0,arguments)}}function vz(e,t){return wd(4,2,e,t)}function yz(e,t){return wd(4,4,e,t)}function Sz(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function bz(e,t,n){n=n!=null?n.concat([e]):null,wd(4,4,Sz.bind(null,t,e),n)}function gv(){}function xz(e,t){var n=et();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&sv(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function _z(e,t){var n=et();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&sv(t,r[1]))return r[0];if(r=e(),so){cr(!0);try{e()}finally{cr(!1)}}return n.memoizedState=[r,t],r}function hv(e,t,n){return n===void 0||Ui&1073741824&&!(Se&261930)?e.memoizedState=t:(e.memoizedState=n,e=uT(),de.lanes|=e,Er|=e,n)}function wz(e,t,n,r){return vn(n,t)?n:ya.current!==null?(e=hv(e,n,r),vn(e,t)||(st=!0),e):!(Ui&42)||Ui&1073741824&&!(Se&261930)?(st=!0,e.memoizedState=n):(e=uT(),de.lanes|=e,Er|=e,t)}function $z(e,t,n,r,i){var o=_e.p;_e.p=o!==0&&8>o?o:8;var a=re.T,s={};re.T=s,yv(e,!1,t,n);try{var c=i(),d=re.S;if(d!==null&&d(s,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var m=H4(c,r);nl(e,t,m,hn(e))}else nl(e,t,r,hn(e))}catch(l){nl(e,t,{then:function(){},status:"rejected",reason:l},hn())}finally{_e.p=o,a!==null&&s.types!==null&&(a.types=s.types),re.T=a}}function K4(){}function yh(e,t,n,r){if(e.tag!==5)throw Error(I(476));var i=Cz(e).queue;$z(e,i,t,Qr,n===null?K4:function(){return Ez(e),n(r)})}function Cz(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Qr,baseState:Qr,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pi,lastRenderedState:Qr},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pi,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ez(e){var t=Cz(e);t.next===null&&(t=e.alternate.memoizedState),nl(e,t.next.queue,{},hn())}function vv(){return At(Sl)}function Az(){return et().memoizedState}function zz(){return et().memoizedState}function W4(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=hn();e=hr(n);var r=vr(t,e,n);r!==null&&(Kt(r,t,n),Qs(r,t,n)),t={cache:nv()},e.payload=t;return}t=t.return}}function Q4(e,t,n){var r=hn();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},$d(e)?Iz(t,n):(n=Wh(e,t,n,r),n!==null&&(Kt(n,e,r),kz(n,t,r)))}function Tz(e,t,n){var r=hn();nl(e,t,n,r)}function nl(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if($d(e))Iz(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,vn(s,a))return Sd(e,t,i,0),De===null&&yd(),!1}catch(c){}finally{}if(n=Wh(e,t,i,r),n!==null)return Kt(n,e,r),kz(n,t,r),!0}return!1}function yv(e,t,n,r){if(r={lane:2,revertLane:Av(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},$d(e)){if(t)throw Error(I(479))}else t=Wh(e,n,r,2),t!==null&&Kt(t,e,2)}function $d(e){var t=e.alternate;return e===de||t!==null&&t===de}function Iz(e,t){fa=Ku=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function kz(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,hA(e,n)}}var hl={readContext:At,use:_d,useCallback:Je,useContext:Je,useEffect:Je,useImperativeHandle:Je,useLayoutEffect:Je,useInsertionEffect:Je,useMemo:Je,useReducer:Je,useRef:Je,useState:Je,useDebugValue:Je,useDeferredValue:Je,useTransition:Je,useSyncExternalStore:Je,useId:Je,useHostTransitionStatus:Je,useFormState:Je,useActionState:Je,useOptimistic:Je,useMemoCache:Je,useCacheRefresh:Je};hl.useEffectEvent=Je;var Nz={readContext:At,use:_d,useCallback:function(e,t){return Zt().memoizedState=[e,t===void 0?null:t],e},useContext:At,useEffect:gE,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,ku(4194308,4,Sz.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ku(4194308,4,e,t)},useInsertionEffect:function(e,t){ku(4,2,e,t)},useMemo:function(e,t){var n=Zt();t=t===void 0?null:t;var r=e();if(so){cr(!0);try{e()}finally{cr(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Zt();if(n!==void 0){var i=n(t);if(so){cr(!0);try{n(t)}finally{cr(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Q4.bind(null,de,e),[r.memoizedState,e]},useRef:function(e){var t=Zt();return e={current:e},t.memoizedState=e},useState:function(e){e=hh(e);var t=e.queue,n=Tz.bind(null,de,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:gv,useDeferredValue:function(e,t){var n=Zt();return hv(n,e,t)},useTransition:function(){var e=hh(!1);return e=$z.bind(null,de,e.queue,!0,!1),Zt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=de,i=Zt();if(be){if(n===void 0)throw Error(I(407));n=n()}else{if(n=t(),De===null)throw Error(I(349));Se&127||oz(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,gE(sz.bind(null,r,o,e),[e]),r.flags|=2048,Sa(9,{destroy:void 0},az.bind(null,r,o,n,t),null),n},useId:function(){var e=Zt(),t=De.identifierPrefix;if(be){var n=oi,r=ri;n=(r&~(1<<32-gn(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Wu++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=B4++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:vv,useFormState:fE,useActionState:fE,useOptimistic:function(e){var t=Zt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=yv.bind(null,de,!0,n),n.dispatch=t,[e,t]},useMemoCache:fv,useCacheRefresh:function(){return Zt().memoizedState=W4.bind(null,de)},useEffectEvent:function(e){var t=Zt(),n={impl:e};return t.memoizedState=n,function(){if(xe&2)throw Error(I(440));return n.impl.apply(void 0,arguments)}}},Sv={readContext:At,use:_d,useCallback:xz,useContext:At,useEffect:pv,useImperativeHandle:bz,useInsertionEffect:vz,useLayoutEffect:yz,useMemo:_z,useReducer:Iu,useRef:gz,useState:function(){return Iu(Pi)},useDebugValue:gv,useDeferredValue:function(e,t){var n=et();return wz(n,ke.memoizedState,e,t)},useTransition:function(){var e=Iu(Pi)[0],t=et().memoizedState;return[typeof e=="boolean"?e:Tl(e),t]},useSyncExternalStore:rz,useId:Az,useHostTransitionStatus:vv,useFormState:mE,useActionState:mE,useOptimistic:function(e,t){var n=et();return uz(n,ke,e,t)},useMemoCache:fv,useCacheRefresh:zz};Sv.useEffectEvent=hz;var Oz={readContext:At,use:_d,useCallback:xz,useContext:At,useEffect:pv,useImperativeHandle:bz,useInsertionEffect:vz,useLayoutEffect:yz,useMemo:_z,useReducer:Eg,useRef:gz,useState:function(){return Eg(Pi)},useDebugValue:gv,useDeferredValue:function(e,t){var n=et();return ke===null?hv(n,e,t):wz(n,ke.memoizedState,e,t)},useTransition:function(){var e=Eg(Pi)[0],t=et().memoizedState;return[typeof e=="boolean"?e:Tl(e),t]},useSyncExternalStore:rz,useId:Az,useHostTransitionStatus:vv,useFormState:pE,useActionState:pE,useOptimistic:function(e,t){var n=et();return ke!==null?uz(n,ke,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:fv,useCacheRefresh:zz};Oz.useEffectEvent=hz;function Ag(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ve({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Sh={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=hn(),i=hr(r);i.payload=t,n!=null&&(i.callback=n),t=vr(e,i,r),t!==null&&(Kt(t,e,r),Qs(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=hn(),i=hr(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=vr(e,i,r),t!==null&&(Kt(t,e,r),Qs(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=hn(),r=hr(n);r.tag=2,t!=null&&(r.callback=t),t=vr(e,r,n),t!==null&&(Kt(t,e,n),Qs(t,e,n))}};function hE(e,t,n,r,i,o,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,a):t.prototype&&t.prototype.isPureReactComponent?!dl(n,r)||!dl(i,o):!0}function vE(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Sh.enqueueReplaceState(t,t.state,null)}function lo(e,t){var n=t;if("ref"in t){n={};for(var r in t)r!=="ref"&&(n[r]=t[r])}if(e=e.defaultProps){n===t&&(n=Ve({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function Mz(e){Fu(e)}function Dz(e){console.error(e)}function Rz(e){Fu(e)}function Qu(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function yE(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function bh(e,t,n){return n=hr(n),n.tag=3,n.payload={element:null},n.callback=function(){Qu(e,t)},n}function Uz(e){return e=hr(e),e.tag=3,e}function Pz(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var o=r.value;e.payload=function(){return i(o)},e.callback=function(){yE(t,n,r)}}var a=n.stateNode;a!==null&&typeof a.componentDidCatch=="function"&&(e.callback=function(){yE(t,n,r),typeof i!="function"&&(yr===null?yr=new Set([this]):yr.add(this));var s=r.stack;this.componentDidCatch(r.value,{componentStack:s!==null?s:""})})}function eP(e,t,n,r,i){if(n.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=n.alternate,t!==null&&Aa(t,n,i,!0),n=yn.current,n!==null){switch(n.tag){case 31:case 13:return Mn===null?rd():n.alternate===null&&Ke===0&&(Ke=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===Xu?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Pg(e,r,i)),!1;case 22:return n.flags|=65536,r===Xu?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Pg(e,r,i)),!1}throw Error(I(435,n.tag))}return Pg(e,r,i),rd(),!1}if(be)return t=yn.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==sh&&(e=Error(I(422),{cause:r}),ml(Nn(e,n)))):(r!==sh&&(t=Error(I(423),{cause:r}),ml(Nn(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=Nn(r,n),i=bh(e.stateNode,r,i),Cg(e,i),Ke!==4&&(Ke=2)),!1;var o=Error(I(520),{cause:r});if(o=Nn(o,n),ol===null?ol=[o]:ol.push(o),Ke!==4&&(Ke=2),t===null)return!0;r=Nn(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=bh(n.stateNode,r,e),Cg(n,e),!1;case 1:if(t=n.type,o=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||o!==null&&typeof o.componentDidCatch=="function"&&(yr===null||!yr.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Uz(i),Pz(i,e,n,r),Cg(n,i),!1}n=n.return}while(n!==null);return!1}var bv=Error(I(461)),st=!1;function $t(e,t,n,r){t.child=e===null?WA(t,null,n,r):ao(t,e.child,n,r)}function SE(e,t,n,r,i){n=n.render;var o=t.ref;if("ref"in r){var a={};for(var s in r)s!=="ref"&&(a[s]=r[s])}else a=r;return oo(t),r=lv(e,t,n,a,o,i),s=cv(),e!==null&&!st?(uv(e,t,i),Li(e,t,i)):(be&&s&&ev(t),t.flags|=1,$t(e,t,r,i),t.child)}function bE(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!Qh(o)&&o.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=o,Lz(e,t,o,r,i)):(e=zu(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!xv(e,i)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:dl,n(a,r)&&e.ref===t.ref)return Li(e,t,i)}return t.flags|=1,e=Oi(o,r),e.ref=t.ref,e.return=t,t.child=e}function Lz(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(dl(o,r)&&e.ref===t.ref)if(st=!1,t.pendingProps=r=o,xv(e,i))e.flags&131072&&(st=!0);else return t.lanes=e.lanes,Li(e,t,i)}return xh(e,t,n,r,i)}function jz(e,t,n,r){var i=r.children,o=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if(t.flags&128){if(o=o!==null?o.baseLanes|n:n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~o}else r=0,t.child=null;return xE(e,t,o,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Tu(t,o!==null?o.cachePool:null),o!==null?cE(t,o):ph(),tz(t);else return r=t.lanes=536870912,xE(e,t,o!==null?o.baseLanes|n:n,n,r)}else o!==null?(Tu(t,o.cachePool),cE(t,o),sr(t),t.memoizedState=null):(e!==null&&Tu(t,null),ph(),sr(t));return $t(e,t,i,n),t.child}function Gs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function xE(e,t,n,r,i){var o=iv();return o=o===null?null:{parent:at._currentValue,pool:o},t.memoizedState={baseLanes:n,cachePool:o},e!==null&&Tu(t,null),ph(),tz(t),e!==null&&Aa(e,t,r,!0),t.childLanes=i,null}function Nu(e,t){return t=ed({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function _E(e,t,n){return ao(t,e.child,null,n),e=Nu(t,t.pendingProps),e.flags|=2,un(t),t.memoizedState=null,e}function tP(e,t,n){var r=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(be){if(r.mode==="hidden")return e=Nu(t,r),t.lanes=536870912,Gs(null,e);if(gh(t),(e=qe)?(e=NT(e,On),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wr!==null?{id:ri,overflow:oi}:null,retryLane:536870912,hydrationErrors:null},n=HA(e),n.return=t,t.child=n,Et=t,qe=null)):e=null,e===null)throw $r(t);return t.lanes=536870912,null}return Nu(t,r)}var o=e.memoizedState;if(o!==null){var a=o.dehydrated;if(gh(t),i)if(t.flags&256)t.flags&=-257,t=_E(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(I(558));else if(st||Aa(e,t,n,!1),i=(n&e.childLanes)!==0,st||i){if(r=De,r!==null&&(a=vA(r,n),a!==0&&a!==o.retryLane))throw o.retryLane=a,mo(e,a),Kt(r,e,a),bv;rd(),t=_E(e,t,n)}else e=o.treeContext,qe=Dn(a.nextSibling),Et=t,be=!0,gr=null,On=!1,e!==null&&GA(t,e),t=Nu(t,r),t.flags|=4096;return t}return e=Oi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ou(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(I(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function xh(e,t,n,r,i){return oo(t),n=lv(e,t,n,r,void 0,i),r=cv(),e!==null&&!st?(uv(e,t,i),Li(e,t,i)):(be&&r&&ev(t),t.flags|=1,$t(e,t,n,i),t.child)}function wE(e,t,n,r,i,o){return oo(t),t.updateQueue=null,n=iz(t,r,n,i),nz(e),r=cv(),e!==null&&!st?(uv(e,t,o),Li(e,t,o)):(be&&r&&ev(t),t.flags|=1,$t(e,t,n,o),t.child)}function $E(e,t,n,r,i){if(oo(t),t.stateNode===null){var o=ia,a=n.contextType;typeof a=="object"&&a!==null&&(o=At(a)),o=new n(r,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Sh,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=r,o.state=t.memoizedState,o.refs={},ov(t),a=n.contextType,o.context=typeof a=="object"&&a!==null?At(a):ia,o.state=t.memoizedState,a=n.getDerivedStateFromProps,typeof a=="function"&&(Ag(t,n,a,r),o.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(a=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),a!==o.state&&Sh.enqueueReplaceState(o,o.state,null),tl(t,r,o,i),el(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){o=t.stateNode;var s=t.memoizedProps,c=lo(n,s);o.props=c;var d=o.context,m=n.contextType;a=ia,typeof m=="object"&&m!==null&&(a=At(m));var l=n.getDerivedStateFromProps;m=typeof l=="function"||typeof o.getSnapshotBeforeUpdate=="function",s=t.pendingProps!==s,m||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s||d!==a)&&vE(t,o,r,a),rr=!1;var f=t.memoizedState;o.state=f,tl(t,r,o,i),el(),d=t.memoizedState,s||f!==d||rr?(typeof l=="function"&&(Ag(t,n,l,r),d=t.memoizedState),(c=rr||hE(t,n,c,r,f,d,a))?(m||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=d),o.props=r,o.state=d,o.context=a,r=c):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,fh(e,t),a=t.memoizedProps,m=lo(n,a),o.props=m,l=t.pendingProps,f=o.context,d=n.contextType,c=ia,typeof d=="object"&&d!==null&&(c=At(d)),s=n.getDerivedStateFromProps,(d=typeof s=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==l||f!==c)&&vE(t,o,r,c),rr=!1,f=t.memoizedState,o.state=f,tl(t,r,o,i),el();var p=t.memoizedState;a!==l||f!==p||rr||e!==null&&e.dependencies!==null&&Gu(e.dependencies)?(typeof s=="function"&&(Ag(t,n,s,r),p=t.memoizedState),(m=rr||hE(t,n,m,r,f,p,c)||e!==null&&e.dependencies!==null&&Gu(e.dependencies))?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,p,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,p,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),o.props=r,o.state=p,o.context=c,r=m):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return o=r,Ou(e,t),r=(t.flags&128)!==0,o||r?(o=t.stateNode,n=r&&typeof n.getDerivedStateFromError!="function"?null:o.render(),t.flags|=1,e!==null&&r?(t.child=ao(t,e.child,null,i),t.child=ao(t,null,n,i)):$t(e,t,n,i),t.memoizedState=o.state,e=t.child):e=Li(e,t,i),e}function CE(e,t,n,r){return ro(),t.flags|=256,$t(e,t,n,r),t.child}var zg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Tg(e){return{baseLanes:e,cachePool:YA()}}function Ig(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=fn),e}function Zz(e,t,n){var r=t.pendingProps,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(Qe.current&2)!==0),a&&(i=!0,t.flags&=-129),a=(t.flags&32)!==0,t.flags&=-33,e===null){if(be){if(i?ar(t):sr(t),(e=qe)?(e=NT(e,On),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wr!==null?{id:ri,overflow:oi}:null,retryLane:536870912,hydrationErrors:null},n=HA(e),n.return=t,t.child=n,Et=t,qe=null)):e=null,e===null)throw $r(t);return Dh(e)?t.lanes=32:t.lanes=536870912,null}var s=r.children;return r=r.fallback,i?(sr(t),i=t.mode,s=ed({mode:"hidden",children:s},i),r=eo(r,i,n,null),s.return=t,r.return=t,s.sibling=r,t.child=s,r=t.child,r.memoizedState=Tg(n),r.childLanes=Ig(e,a,n),t.memoizedState=zg,Gs(null,r)):(ar(t),_h(t,s))}var c=e.memoizedState;if(c!==null&&(s=c.dehydrated,s!==null)){if(o)t.flags&256?(ar(t),t.flags&=-257,t=kg(e,t,n)):t.memoizedState!==null?(sr(t),t.child=e.child,t.flags|=128,t=null):(sr(t),s=r.fallback,i=t.mode,r=ed({mode:"visible",children:r.children},i),s=eo(s,i,n,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,ao(t,e.child,null,n),r=t.child,r.memoizedState=Tg(n),r.childLanes=Ig(e,a,n),t.memoizedState=zg,t=Gs(null,r));else if(ar(t),Dh(s)){if(a=s.nextSibling&&s.nextSibling.dataset,a)var d=a.dgst;a=d,r=Error(I(419)),r.stack="",r.digest=a,ml({value:r,source:null,stack:null}),t=kg(e,t,n)}else if(st||Aa(e,t,n,!1),a=(n&e.childLanes)!==0,st||a){if(a=De,a!==null&&(r=vA(a,n),r!==0&&r!==c.retryLane))throw c.retryLane=r,mo(e,r),Kt(a,e,r),bv;Mh(s)||rd(),t=kg(e,t,n)}else Mh(s)?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,qe=Dn(s.nextSibling),Et=t,be=!0,gr=null,On=!1,e!==null&&GA(t,e),t=_h(t,r.children),t.flags|=4096);return t}return i?(sr(t),s=r.fallback,i=t.mode,c=e.child,d=c.sibling,r=Oi(c,{mode:"hidden",children:r.children}),r.subtreeFlags=c.subtreeFlags&65011712,d!==null?s=Oi(d,s):(s=eo(s,i,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,Gs(null,r),r=t.child,s=e.child.memoizedState,s===null?s=Tg(n):(i=s.cachePool,i!==null?(c=at._currentValue,i=i.parent!==c?{parent:c,pool:c}:i):i=YA(),s={baseLanes:s.baseLanes|n,cachePool:i}),r.memoizedState=s,r.childLanes=Ig(e,a,n),t.memoizedState=zg,Gs(e.child,r)):(ar(t),n=e.child,e=n.sibling,n=Oi(n,{mode:"visible",children:r.children}),n.return=t,n.sibling=null,e!==null&&(a=t.deletions,a===null?(t.deletions=[e],t.flags|=16):a.push(e)),t.child=n,t.memoizedState=null,n)}function _h(e,t){return t=ed({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ed(e,t){return e=dn(22,e,null,t),e.lanes=0,e}function kg(e,t,n){return ao(t,e.child,null,n),e=_h(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function EE(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ch(e.return,t,n)}function Ng(e,t,n,r,i,o){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i,a.treeForkCount=o)}function qz(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;r=r.children;var a=Qe.current,s=(a&2)!==0;if(s?(a=a&1|2,t.flags|=128):a&=1,Pe(Qe,a),$t(e,t,r,n),r=be?fl:0,!s&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&EE(e,n,t);else if(e.tag===19)EE(e,n,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(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Ju(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ng(t,!1,i,n,o,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ju(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ng(t,!0,n,null,o,r);break;case"together":Ng(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Li(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Er|=t.lanes,!(n&t.childLanes))if(e!==null){if(Aa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(I(153));if(t.child!==null){for(e=t.child,n=Oi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Oi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function xv(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&Gu(e)))}function nP(e,t,n){switch(t.tag){case 3:ju(t,t.stateNode.containerInfo),or(t,at,e.memoizedState.cache),ro();break;case 27:case 5:Jg(t);break;case 4:ju(t,t.stateNode.containerInfo);break;case 10:or(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,gh(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(ar(t),t.flags|=128,null):n&t.child.childLanes?Zz(e,t,n):(ar(t),e=Li(e,t,n),e!==null?e.sibling:null);ar(t);break;case 19:var i=(e.flags&128)!==0;if(r=(n&t.childLanes)!==0,r||(Aa(e,t,n,!1),r=(n&t.childLanes)!==0),i){if(r)return qz(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Pe(Qe,Qe.current),r)break;return null;case 22:return t.lanes=0,jz(e,t,n,t.pendingProps);case 24:or(t,at,e.memoizedState.cache)}return Li(e,t,n)}function Vz(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)st=!0;else{if(!xv(e,n)&&!(t.flags&128))return st=!1,nP(e,t,n);st=!!(e.flags&131072)}else st=!1,be&&t.flags&1048576&&BA(t,fl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=Kr(t.elementType),t.type=e,typeof e=="function")Qh(e)?(r=lo(e,r),t.tag=1,t=$E(null,t,e,r,n)):(t.tag=0,t=xh(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===Lh){t.tag=11,t=SE(null,t,e,r,n);break e}else if(i===jh){t.tag=14,t=bE(null,t,e,r,n);break e}}throw t=Xg(e)||e,Error(I(306,t,""))}}return t;case 0:return xh(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=lo(r,t.pendingProps),$E(e,t,r,i,n);case 3:e:{if(ju(t,t.stateNode.containerInfo),e===null)throw Error(I(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,fh(e,t),tl(t,r,null,n);var a=t.memoizedState;if(r=a.cache,or(t,at,r),r!==o.cache&&uh(t,[at],n,!0),el(),r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=CE(e,t,r,n);break e}else if(r!==i){i=Nn(Error(I(424)),t),ml(i),t=CE(e,t,r,n);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(qe=Dn(e.firstChild),Et=t,be=!0,gr=null,On=!0,n=WA(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(ro(),r===i){t=Li(e,t,n);break e}$t(e,t,r,n)}t=t.child}return t;case 26:return Ou(e,t),e===null?(n=XE(t.type,null,t.pendingProps,null))?t.memoizedState=n:be||(n=t.type,e=t.pendingProps,r=ld(pr.current).createElement(n),r[Ct]=t,r[Wt]=e,zt(r,n,e),xt(r),t.stateNode=r):t.memoizedState=XE(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Jg(t),e===null&&be&&(r=t.stateNode=OT(t.type,t.pendingProps,pr.current),Et=t,On=!0,i=qe,zr(t.type)?(Rh=i,qe=Dn(r.firstChild)):qe=i),$t(e,t,t.pendingProps.children,n),Ou(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&be&&((i=r=qe)&&(r=IP(r,t.type,t.pendingProps,On),r!==null?(t.stateNode=r,Et=t,qe=Dn(r.firstChild),On=!1,i=!0):i=!1),i||$r(t)),Jg(t),i=t.type,o=t.pendingProps,a=e!==null?e.memoizedProps:null,r=o.children,Nh(i,o)?r=null:a!==null&&Nh(i,a)&&(t.flags|=32),t.memoizedState!==null&&(i=lv(e,t,G4,null,null,n),Sl._currentValue=i),Ou(e,t),$t(e,t,r,n),t.child;case 6:return e===null&&be&&((e=n=qe)&&(n=kP(n,t.pendingProps,On),n!==null?(t.stateNode=n,Et=t,qe=null,e=!0):e=!1),e||$r(t)),null;case 13:return Zz(e,t,n);case 4:return ju(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ao(t,null,r,n):$t(e,t,r,n),t.child;case 11:return SE(e,t,t.type,t.pendingProps,n);case 7:return $t(e,t,t.pendingProps,n),t.child;case 8:return $t(e,t,t.pendingProps.children,n),t.child;case 12:return $t(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,or(t,t.type,r.value),$t(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,oo(t),i=At(i),r=r(i),t.flags|=1,$t(e,t,r,n),t.child;case 14:return bE(e,t,t.type,t.pendingProps,n);case 15:return Lz(e,t,t.type,t.pendingProps,n);case 19:return qz(e,t,n);case 31:return tP(e,t,n);case 22:return jz(e,t,n,t.pendingProps);case 24:return oo(t),r=At(at),e===null?(i=iv(),i===null&&(i=De,o=nv(),i.pooledCache=o,o.refCount++,o!==null&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},ov(t),or(t,at,i)):(e.lanes&n&&(fh(e,t),tl(t,null,null,n),el()),i=e.memoizedState,o=t.memoizedState,i.parent!==r?(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),or(t,at,r)):(r=o.cache,or(t,at,r),r!==i.cache&&uh(t,[at],n,!0))),$t(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(I(156,t.tag))}function $i(e){e.flags|=4}function Og(e,t,n,r,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(mT())e.flags|=8192;else throw no=Xu,rv}else e.flags&=-16777217}function AE(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!RT(t))if(mT())e.flags|=8192;else throw no=Xu,rv}function vu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?pA():536870912,e.lanes|=t,ba|=t)}function js(e,t){if(!be)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function iP(e,t,n){var r=t.pendingProps;switch(tv(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ze(t),null;case 1:return Ze(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Mi(at),pa(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ho(t)?$i(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,$g())),Ze(t),null;case 26:var i=t.type,o=t.memoizedState;return e===null?($i(t),o!==null?(Ze(t),AE(t,o)):(Ze(t),Og(t,i,null,r,n))):o?o!==e.memoizedState?($i(t),Ze(t),AE(t,o)):(Ze(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&$i(t),Ze(t),Og(t,i,e,r,n)),null;case 27:if(Zu(t),n=pr.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&$i(t);else{if(!r){if(t.stateNode===null)throw Error(I(166));return Ze(t),null}e=si.current,Ho(t)?nE(t,e):(e=OT(i,r,n),t.stateNode=e,$i(t))}return Ze(t),null;case 5:if(Zu(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&$i(t);else{if(!r){if(t.stateNode===null)throw Error(I(166));return Ze(t),null}if(o=si.current,Ho(t))nE(t,o);else{var a=ld(pr.current);switch(o){case 1:o=a.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:o=a.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":o=a.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":o=a.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":o=a.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof r.is=="string"?a.createElement("select",{is:r.is}):a.createElement("select"),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is=="string"?a.createElement(i,{is:r.is}):a.createElement(i)}}o[Ct]=t,o[Wt]=r;e:for(a=t.child;a!==null;){if(a.tag===5||a.tag===6)o.appendChild(a.stateNode);else if(a.tag!==4&&a.tag!==27&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}t.stateNode=o;e:switch(zt(o,i,r),i){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&$i(t)}}return Ze(t),Og(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&$i(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(I(166));if(e=pr.current,Ho(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Et,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[Ct]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||TT(e.nodeValue,n)),e||$r(t,!0)}else e=ld(e).createTextNode(r),e[Ct]=t,t.stateNode=e}return Ze(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ho(t),n!==null){if(e===null){if(!r)throw Error(I(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(I(557));e[Ct]=t}else ro(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ze(t),e=!1}else n=$g(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(un(t),t):(un(t),null);if(t.flags&128)throw Error(I(558))}return Ze(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Ho(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(I(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(I(317));i[Ct]=t}else ro(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ze(t),i=!1}else i=$g(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(un(t),t):(un(t),null)}return un(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),vu(t,t.updateQueue),Ze(t),null);case 4:return pa(),e===null&&zv(t.stateNode.containerInfo),Ze(t),null;case 10:return Mi(t.type),Ze(t),null;case 19:if(_t(Qe),r=t.memoizedState,r===null)return Ze(t),null;if(i=(t.flags&128)!==0,o=r.rendering,o===null)if(i)js(r,!1);else{if(Ke!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Ju(e),o!==null){for(t.flags|=128,js(r,!1),e=o.updateQueue,t.updateQueue=e,vu(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)FA(n,e),n=n.sibling;return Pe(Qe,Qe.current&1|2),be&&zi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&mn()>nd&&(t.flags|=128,i=!0,js(r,!1),t.lanes=4194304)}else{if(!i)if(e=Ju(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,vu(t,e),js(r,!0),r.tail===null&&r.tailMode==="hidden"&&!o.alternate&&!be)return Ze(t),null}else 2*mn()-r.renderingStartTime>nd&&n!==536870912&&(t.flags|=128,i=!0,js(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e!==null?e.sibling=o:t.child=o,r.last=o)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=mn(),e.sibling=null,n=Qe.current,Pe(Qe,i?n&1|2:n&1),be&&zi(t,r.treeForkCount),e):(Ze(t),null);case 22:case 23:return un(t),av(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),n=t.updateQueue,n!==null&&vu(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&_t(to),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Mi(at),Ze(t),null;case 25:return null;case 30:return null}throw Error(I(156,t.tag))}function rP(e,t){switch(tv(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Mi(at),pa(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Zu(t),null;case 31:if(t.memoizedState!==null){if(un(t),t.alternate===null)throw Error(I(340));ro()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(un(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));ro()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _t(Qe),null;case 4:return pa(),null;case 10:return Mi(t.type),null;case 22:case 23:return un(t),av(),e!==null&&_t(to),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Mi(at),null;case 25:return null;default:return null}}function Fz(e,t){switch(tv(t),t.tag){case 3:Mi(at),pa();break;case 26:case 27:case 5:Zu(t);break;case 4:pa();break;case 31:t.memoizedState!==null&&un(t);break;case 13:un(t);break;case 19:_t(Qe);break;case 10:Mi(t.type);break;case 22:case 23:un(t),av(),e!==null&&_t(to);break;case 24:Mi(at)}}function Il(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var o=n.create,a=n.inst;r=o(),a.destroy=r}n=n.next}while(n!==i)}}catch(s){Ae(t,t.return,s)}}function Cr(e,t,n){try{var r=t.updateQueue,i=r!==null?r.lastEffect:null;if(i!==null){var o=i.next;r=o;do{if((r.tag&e)===e){var a=r.inst,s=a.destroy;if(s!==void 0){a.destroy=void 0,i=t;var c=n,d=s;try{d()}catch(m){Ae(i,c,m)}}}r=r.next}while(r!==o)}}catch(m){Ae(t,t.return,m)}}function Hz(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{ez(t,n)}catch(r){Ae(e,e.return,r)}}}function Bz(e,t,n){n.props=lo(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Ae(e,t,r)}}function il(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n=="function"?e.refCleanup=n(r):n.current=r}}catch(i){Ae(e,t,i)}}function ai(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(i){Ae(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){Ae(e,t,i)}else n.current=null}function Gz(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(i){Ae(e,e.return,i)}}function Mg(e,t,n){try{var r=e.stateNode;$P(r,e.type,n,t),r[Wt]=t}catch(i){Ae(e,e.return,i)}}function Xz(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&zr(e.type)||e.tag===4}function Dg(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Xz(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&&zr(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 wh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ki));else if(r!==4&&(r===27&&zr(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(wh(e,t,n),e=e.sibling;e!==null;)wh(e,t,n),e=e.sibling}function td(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&zr(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(td(e,t,n),e=e.sibling;e!==null;)td(e,t,n),e=e.sibling}function Yz(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);zt(t,r,n),t[Ct]=e,t[Wt]=n}catch(o){Ae(e,e.return,o)}}var Ti=!1,ot=!1,Rg=!1,zE=typeof WeakSet=="function"?WeakSet:Set,bt=null;function oP(e,t){if(e=e.containerInfo,Ih=fd,e=RA(e),Jh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(y){n=null;break e}var a=0,s=-1,c=-1,d=0,m=0,l=e,f=null;t:for(;;){for(var p;l!==n||i!==0&&l.nodeType!==3||(s=a+i),l!==o||r!==0&&l.nodeType!==3||(c=a+r),l.nodeType===3&&(a+=l.nodeValue.length),(p=l.firstChild)!==null;)f=l,l=p;for(;;){if(l===e)break t;if(f===n&&++d===i&&(s=a),f===o&&++m===r&&(c=a),(p=l.nextSibling)!==null)break;l=f,f=l.parentNode}l=p}n=s===-1||c===-1?null:{start:s,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(kh={focusedElem:e,selectionRange:n},fd=!1,bt=t;bt!==null;)if(t=bt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,bt=e;else for(;bt!==null;){switch(t=bt,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,i=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=lo(n.type,i);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(y){Ae(n,n.return,y)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Oh(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Oh(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(I(163))}if(e=t.sibling,e!==null){e.return=t.return,bt=e;break}bt=t.return}}function Jz(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Ei(e,n),r&4&&Il(5,n);break;case 1:if(Ei(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(a){Ae(n,n.return,a)}else{var i=lo(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(a){Ae(n,n.return,a)}}r&64&&Hz(n),r&512&&il(n,n.return);break;case 3:if(Ei(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{ez(e,t)}catch(a){Ae(n,n.return,a)}}break;case 27:t===null&&r&4&&Yz(n);case 26:case 5:Ei(e,n),t===null&&r&4&&Gz(n),r&512&&il(n,n.return);break;case 12:Ei(e,n);break;case 31:Ei(e,n),r&4&&Qz(e,n);break;case 13:Ei(e,n),r&4&&eT(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=pP.bind(null,n),NP(e,n))));break;case 22:if(r=n.memoizedState!==null||Ti,!r){t=t!==null&&t.memoizedState!==null||ot,i=Ti;var o=ot;Ti=r,(ot=t)&&!o?Ai(e,n,(n.subtreeFlags&8772)!==0):Ei(e,n),Ti=i,ot=o}break;case 30:break;default:Ei(e,n)}}function Kz(e){var t=e.alternate;t!==null&&(e.alternate=null,Kz(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Fh(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 Be=null,Yt=!1;function Ci(e,t,n){for(n=n.child;n!==null;)Wz(e,t,n),n=n.sibling}function Wz(e,t,n){if(pn&&typeof pn.onCommitFiberUnmount=="function")try{pn.onCommitFiberUnmount(wl,n)}catch(o){}switch(n.tag){case 26:ot||ai(n,t),Ci(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ot||ai(n,t);var r=Be,i=Yt;zr(n.type)&&(Be=n.stateNode,Yt=!1),Ci(e,t,n),sl(n.stateNode),Be=r,Yt=i;break;case 5:ot||ai(n,t);case 6:if(r=Be,i=Yt,Be=null,Ci(e,t,n),Be=r,Yt=i,Be!==null)if(Yt)try{(Be.nodeType===9?Be.body:Be.nodeName==="HTML"?Be.ownerDocument.body:Be).removeChild(n.stateNode)}catch(o){Ae(n,t,o)}else try{Be.removeChild(n.stateNode)}catch(o){Ae(n,t,o)}break;case 18:Be!==null&&(Yt?(e=Be,VE(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),$a(e)):VE(Be,n.stateNode));break;case 4:r=Be,i=Yt,Be=n.stateNode.containerInfo,Yt=!0,Ci(e,t,n),Be=r,Yt=i;break;case 0:case 11:case 14:case 15:Cr(2,n,t),ot||Cr(4,n,t),Ci(e,t,n);break;case 1:ot||(ai(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"&&Bz(n,t,r)),Ci(e,t,n);break;case 21:Ci(e,t,n);break;case 22:ot=(r=ot)||n.memoizedState!==null,Ci(e,t,n),ot=r;break;default:Ci(e,t,n)}}function Qz(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{$a(e)}catch(n){Ae(t,t.return,n)}}}function eT(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{$a(e)}catch(n){Ae(t,t.return,n)}}function aP(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new zE),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new zE),t;default:throw Error(I(435,e.tag))}}function yu(e,t){var n=aP(e);t.forEach(function(r){if(!n.has(r)){n.add(r);var i=gP.bind(null,e,r);r.then(i,i)}})}function Gt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],o=e,a=t,s=a;e:for(;s!==null;){switch(s.tag){case 27:if(zr(s.type)){Be=s.stateNode,Yt=!1;break e}break;case 5:Be=s.stateNode,Yt=!1;break e;case 3:case 4:Be=s.stateNode.containerInfo,Yt=!0;break e}s=s.return}if(Be===null)throw Error(I(160));Wz(o,a,i),Be=null,Yt=!1,o=i.alternate,o!==null&&(o.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)tT(t,e),t=t.sibling}var Bn=null;function tT(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Gt(t,e),Xt(e),r&4&&(Cr(3,e,e.return),Il(3,e),Cr(5,e,e.return));break;case 1:Gt(t,e),Xt(e),r&512&&(ot||n===null||ai(n,n.return)),r&64&&Ti&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var i=Bn;if(Gt(t,e),Xt(e),r&512&&(ot||n===null||ai(n,n.return)),r&4){var o=n!==null?n.memoizedState:null;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){e:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(r){case"title":o=i.getElementsByTagName("title")[0],(!o||o[El]||o[Ct]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector("head > title"))),zt(o,r,n),o[Ct]=e,xt(o),r=o;break e;case"link":var a=JE("link","href",i).get(r+(n.href||""));if(a){for(var s=0;s<a.length;s++)if(o=a[s],o.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&o.getAttribute("rel")===(n.rel==null?null:n.rel)&&o.getAttribute("title")===(n.title==null?null:n.title)&&o.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){a.splice(s,1);break t}}o=i.createElement(r),zt(o,r,n),i.head.appendChild(o);break;case"meta":if(a=JE("meta","content",i).get(r+(n.content||""))){for(s=0;s<a.length;s++)if(o=a[s],o.getAttribute("content")===(n.content==null?null:""+n.content)&&o.getAttribute("name")===(n.name==null?null:n.name)&&o.getAttribute("property")===(n.property==null?null:n.property)&&o.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute("charset")===(n.charSet==null?null:n.charSet)){a.splice(s,1);break t}}o=i.createElement(r),zt(o,r,n),i.head.appendChild(o);break;default:throw Error(I(468,r))}o[Ct]=e,xt(o),r=o}e.stateNode=r}else KE(i,e.type,e.stateNode);else e.stateNode=YE(i,r,e.memoizedProps);else o!==r?(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?KE(i,e.type,e.stateNode):YE(i,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Mg(e,e.memoizedProps,n.memoizedProps)}break;case 27:Gt(t,e),Xt(e),r&512&&(ot||n===null||ai(n,n.return)),n!==null&&r&4&&Mg(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Gt(t,e),Xt(e),r&512&&(ot||n===null||ai(n,n.return)),e.flags&32){i=e.stateNode;try{ha(i,"")}catch(h){Ae(e,e.return,h)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,Mg(e,i,n!==null?n.memoizedProps:i)),r&1024&&(Rg=!0);break;case 6:if(Gt(t,e),Xt(e),r&4){if(e.stateNode===null)throw Error(I(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(h){Ae(e,e.return,h)}}break;case 3:if(Ru=null,i=Bn,Bn=cd(t.containerInfo),Gt(t,e),Bn=i,Xt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{$a(t.containerInfo)}catch(h){Ae(e,e.return,h)}Rg&&(Rg=!1,nT(e));break;case 4:r=Bn,Bn=cd(e.stateNode.containerInfo),Gt(t,e),Xt(e),Bn=r;break;case 12:Gt(t,e),Xt(e);break;case 31:Gt(t,e),Xt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,yu(e,r)));break;case 13:Gt(t,e),Xt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Cd=mn()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,yu(e,r)));break;case 22:i=e.memoizedState!==null;var c=n!==null&&n.memoizedState!==null,d=Ti,m=ot;if(Ti=d||i,ot=m||c,Gt(t,e),ot=m,Ti=d,Xt(e),r&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||c||Ti||ot||Wr(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){c=n=t;try{if(o=c.stateNode,i)a=o.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none";else{s=c.stateNode;var l=c.memoizedProps.style,f=l!=null&&l.hasOwnProperty("display")?l.display:null;s.style.display=f==null||typeof f=="boolean"?"":(""+f).trim()}}catch(h){Ae(c,c.return,h)}}}else if(t.tag===6){if(n===null){c=t;try{c.stateNode.nodeValue=i?"":c.memoizedProps}catch(h){Ae(c,c.return,h)}}}else if(t.tag===18){if(n===null){c=t;try{var p=c.stateNode;i?FE(p,!0):FE(c.stateNode,!1)}catch(h){Ae(c,c.return,h)}}}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;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,yu(e,n))));break;case 19:Gt(t,e),Xt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,yu(e,r)));break;case 30:break;case 21:break;default:Gt(t,e),Xt(e)}}function Xt(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Xz(r)){n=r;break}r=r.return}if(n==null)throw Error(I(160));switch(n.tag){case 27:var i=n.stateNode,o=Dg(e);td(e,o,i);break;case 5:var a=n.stateNode;n.flags&32&&(ha(a,""),n.flags&=-33);var s=Dg(e);td(e,s,a);break;case 3:case 4:var c=n.stateNode.containerInfo,d=Dg(e);wh(e,d,c);break;default:throw Error(I(161))}}catch(m){Ae(e,e.return,m)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function nT(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;nT(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ei(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Jz(e,t.alternate,t),t=t.sibling}function Wr(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Cr(4,t,t.return),Wr(t);break;case 1:ai(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Bz(t,t.return,n),Wr(t);break;case 27:sl(t.stateNode);case 26:case 5:ai(t,t.return),Wr(t);break;case 22:t.memoizedState===null&&Wr(t);break;case 30:Wr(t);break;default:Wr(t)}e=e.sibling}}function Ai(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,i=e,o=t,a=o.flags;switch(o.tag){case 0:case 11:case 15:Ai(i,o,n),Il(4,o);break;case 1:if(Ai(i,o,n),r=o,i=r.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(d){Ae(r,r.return,d)}if(r=o,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)QA(c[i],s)}catch(d){Ae(r,r.return,d)}}n&&a&64&&Hz(o),il(o,o.return);break;case 27:Yz(o);case 26:case 5:Ai(i,o,n),n&&r===null&&a&4&&Gz(o),il(o,o.return);break;case 12:Ai(i,o,n);break;case 31:Ai(i,o,n),n&&a&4&&Qz(i,o);break;case 13:Ai(i,o,n),n&&a&4&&eT(i,o);break;case 22:o.memoizedState===null&&Ai(i,o,n),il(o,o.return);break;case 30:break;default:Ai(i,o,n)}t=t.sibling}}function _v(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&zl(n))}function wv(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&zl(e))}function Hn(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)iT(e,t,n,r),t=t.sibling}function iT(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Hn(e,t,n,r),i&2048&&Il(9,t);break;case 1:Hn(e,t,n,r);break;case 3:Hn(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&zl(e)));break;case 12:if(i&2048){Hn(e,t,n,r),e=t.stateNode;try{var o=t.memoizedProps,a=o.id,s=o.onPostCommit;typeof s=="function"&&s(a,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(c){Ae(t,t.return,c)}}else Hn(e,t,n,r);break;case 31:Hn(e,t,n,r);break;case 13:Hn(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,a=t.alternate,t.memoizedState!==null?o._visibility&2?Hn(e,t,n,r):rl(e,t):o._visibility&2?Hn(e,t,n,r):(o._visibility|=2,Go(e,t,n,r,(t.subtreeFlags&10256)!==0||!1)),i&2048&&_v(a,t);break;case 24:Hn(e,t,n,r),i&2048&&wv(t.alternate,t);break;default:Hn(e,t,n,r)}}function Go(e,t,n,r,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,a=t,s=n,c=r,d=a.flags;switch(a.tag){case 0:case 11:case 15:Go(o,a,s,c,i),Il(8,a);break;case 23:break;case 22:var m=a.stateNode;a.memoizedState!==null?m._visibility&2?Go(o,a,s,c,i):rl(o,a):(m._visibility|=2,Go(o,a,s,c,i)),i&&d&2048&&_v(a.alternate,a);break;case 24:Go(o,a,s,c,i),i&&d&2048&&wv(a.alternate,a);break;default:Go(o,a,s,c,i)}t=t.sibling}}function rl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:rl(n,r),i&2048&&_v(r.alternate,r);break;case 24:rl(n,r),i&2048&&wv(r.alternate,r);break;default:rl(n,r)}t=t.sibling}}var Xs=8192;function Bo(e,t,n){if(e.subtreeFlags&Xs)for(e=e.child;e!==null;)rT(e,t,n),e=e.sibling}function rT(e,t,n){switch(e.tag){case 26:Bo(e,t,n),e.flags&Xs&&e.memoizedState!==null&&FP(n,Bn,e.memoizedState,e.memoizedProps);break;case 5:Bo(e,t,n);break;case 3:case 4:var r=Bn;Bn=cd(e.stateNode.containerInfo),Bo(e,t,n),Bn=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Xs,Xs=16777216,Bo(e,t,n),Xs=r):Bo(e,t,n));break;default:Bo(e,t,n)}}function oT(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 Zs(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];bt=r,sT(r,e)}oT(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)aT(e),e=e.sibling}function aT(e){switch(e.tag){case 0:case 11:case 15:Zs(e),e.flags&2048&&Cr(9,e,e.return);break;case 3:Zs(e);break;case 12:Zs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Mu(e)):Zs(e);break;default:Zs(e)}}function Mu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];bt=r,sT(r,e)}oT(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Cr(8,t,t.return),Mu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Mu(t));break;default:Mu(t)}e=e.sibling}}function sT(e,t){for(;bt!==null;){var n=bt;switch(n.tag){case 0:case 11:case 15:Cr(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:zl(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,bt=r;else e:for(n=e;bt!==null;){r=bt;var i=r.sibling,o=r.return;if(Kz(r),r===n){bt=null;break e}if(i!==null){i.return=o,bt=i;break e}bt=o}}}var sP={getCacheForType:function(e){var t=At(at),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return At(at).controller.signal}},lP=typeof WeakMap=="function"?WeakMap:Map,xe=0,De=null,he=null,Se=0,Ee=0,cn=null,dr=!1,Ta=!1,$v=!1,ji=0,Ke=0,Er=0,io=0,Cv=0,fn=0,ba=0,ol=null,Jt=null,$h=!1,Cd=0,lT=0,nd=1/0,id=null,yr=null,gt=0,Sr=null,xa=null,Di=0,Ch=0,Eh=null,cT=null,al=0,Ah=null;function hn(){return xe&2&&Se!==0?Se&-Se:re.T!==null?Av():yA()}function uT(){if(fn===0)if(!(Se&536870912)||be){var e=lu;lu<<=1,!(lu&3932160)&&(lu=262144),fn=e}else fn=536870912;return e=yn.current,e!==null&&(e.flags|=32),fn}function Kt(e,t,n){(e===De&&(Ee===2||Ee===9)||e.cancelPendingCommit!==null)&&(_a(e,0),fr(e,Se,fn,!1)),Cl(e,n),(!(xe&2)||e!==De)&&(e===De&&(!(xe&2)&&(io|=n),Ke===4&&fr(e,Se,fn,!1)),ci(e))}function dT(e,t,n){if(xe&6)throw Error(I(327));var r=!n&&(t&127)===0&&(t&e.expiredLanes)===0||$l(e,t),i=r?dP(e,t):Ug(e,t,!0),o=r;do{if(i===0){Ta&&!r&&fr(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!cP(n)){i=Ug(e,t,!1),o=!1;continue}if(i===2){if(o=t,e.errorRecoveryDisabledLanes&o)var a=0;else a=e.pendingLanes&-536870913,a=a!==0?a:a&536870912?536870912:0;if(a!==0){t=a;e:{var s=e;i=ol;var c=s.current.memoizedState.isDehydrated;if(c&&(_a(s,a).flags|=256),a=Ug(s,a,!1),a!==2){if($v&&!c){s.errorRecoveryDisabledLanes|=o,io|=o,i=4;break e}o=Jt,Jt=i,o!==null&&(Jt===null?Jt=o:Jt.push.apply(Jt,o))}i=a}if(o=!1,i!==2)continue}}if(i===1){_a(e,0),fr(e,t,0,!0);break}e:{switch(r=e,o=i,o){case 0:case 1:throw Error(I(345));case 4:if((t&4194048)!==t)break;case 6:fr(r,t,fn,!dr);break e;case 2:Jt=null;break;case 3:case 5:break;default:throw Error(I(329))}if((t&62914560)===t&&(i=Cd+300-mn(),10<i)){if(fr(r,t,fn,!dr),pd(r,0,!0)!==0)break e;Di=t,r.timeoutHandle=kT(TE.bind(null,r,n,Jt,id,$h,t,fn,io,ba,dr,o,"Throttled",-0,0),i);break e}TE(r,n,Jt,id,$h,t,fn,io,ba,dr,o,null,-0,0)}}break}while(1);ci(e)}function TE(e,t,n,r,i,o,a,s,c,d,m,l,f,p){if(e.timeoutHandle=-1,l=t.subtreeFlags,l&8192||(l&16785408)===16785408){l={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ki},rT(t,o,l);var h=(o&62914560)===o?Cd-mn():(o&4194048)===o?lT-mn():0;if(h=HP(l,h),h!==null){Di=o,e.cancelPendingCommit=h(kE.bind(null,e,t,o,n,r,i,a,s,c,m,l,null,f,p)),fr(e,o,a,!d);return}}kE(e,t,o,n,r,i,a,s,c)}function cP(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!vn(o(),i))return!1}catch(a){return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 fr(e,t,n,r){t&=~Cv,t&=~io,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var o=31-gn(i),a=1<<o;r[o]=-1,i&=~a}n!==0&&gA(e,n,t)}function Ed(){return xe&6?!0:(kl(0,!1),!1)}function Ev(){if(he!==null){if(Ee===0)var e=he.return;else e=he,Ni=po=null,dv(e),da=null,pl=0,e=he;for(;e!==null;)Fz(e.alternate,e),e=e.return;he=null}}function _a(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,AP(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Di=0,Ev(),De=e,he=n=Oi(e.current,null),Se=t,Ee=0,cn=null,dr=!1,Ta=$l(e,t),$v=!1,ba=fn=Cv=io=Er=Ke=0,Jt=ol=null,$h=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-gn(r),o=1<<i;t|=e[i],r&=~o}return ji=t,yd(),n}function fT(e,t){de=null,re.H=hl,t===za||t===bd?(t=sE(),Ee=3):t===rv?(t=sE(),Ee=4):Ee=t===bv?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,cn=t,he===null&&(Ke=1,Qu(e,Nn(t,e.current)))}function mT(){var e=yn.current;return e===null?!0:(Se&4194048)===Se?Mn===null:(Se&62914560)===Se||Se&536870912?e===Mn:!1}function pT(){var e=re.H;return re.H=hl,e===null?hl:e}function gT(){var e=re.A;return re.A=sP,e}function rd(){Ke=4,dr||(Se&4194048)!==Se&&yn.current!==null||(Ta=!0),!(Er&134217727)&&!(io&134217727)||De===null||fr(De,Se,fn,!1)}function Ug(e,t,n){var r=xe;xe|=2;var i=pT(),o=gT();(De!==e||Se!==t)&&(id=null,_a(e,t)),t=!1;var a=Ke;e:do try{if(Ee!==0&&he!==null){var s=he,c=cn;switch(Ee){case 8:Ev(),a=6;break e;case 3:case 2:case 9:case 6:yn.current===null&&(t=!0);var d=Ee;if(Ee=0,cn=null,aa(e,s,c,d),n&&Ta){a=0;break e}break;default:d=Ee,Ee=0,cn=null,aa(e,s,c,d)}}uP(),a=Ke;break}catch(m){fT(e,m)}while(1);return t&&e.shellSuspendCounter++,Ni=po=null,xe=r,re.H=i,re.A=o,he===null&&(De=null,Se=0,yd()),a}function uP(){for(;he!==null;)hT(he)}function dP(e,t){var n=xe;xe|=2;var r=pT(),i=gT();De!==e||Se!==t?(id=null,nd=mn()+500,_a(e,t)):Ta=$l(e,t);e:do try{if(Ee!==0&&he!==null){t=he;var o=cn;t:switch(Ee){case 1:Ee=0,cn=null,aa(e,t,o,1);break;case 2:case 9:if(aE(o)){Ee=0,cn=null,IE(t);break}t=function(){Ee!==2&&Ee!==9||De!==e||(Ee=7),ci(e)},o.then(t,t);break e;case 3:Ee=7;break e;case 4:Ee=5;break e;case 7:aE(o)?(Ee=0,cn=null,IE(t)):(Ee=0,cn=null,aa(e,t,o,7));break;case 5:var a=null;switch(he.tag){case 26:a=he.memoizedState;case 5:case 27:var s=he;if(a?RT(a):s.stateNode.complete){Ee=0,cn=null;var c=s.sibling;if(c!==null)he=c;else{var d=s.return;d!==null?(he=d,Ad(d)):he=null}break t}}Ee=0,cn=null,aa(e,t,o,5);break;case 6:Ee=0,cn=null,aa(e,t,o,6);break;case 8:Ev(),Ke=6;break e;default:throw Error(I(462))}}fP();break}catch(m){fT(e,m)}while(1);return Ni=po=null,re.H=r,re.A=i,xe=n,he!==null?0:(De=null,Se=0,yd(),Ke)}function fP(){for(;he!==null&&!DU();)hT(he)}function hT(e){var t=Vz(e.alternate,e,ji);e.memoizedProps=e.pendingProps,t===null?Ad(e):he=t}function IE(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=wE(n,t,t.pendingProps,t.type,void 0,Se);break;case 11:t=wE(n,t,t.pendingProps,t.type.render,t.ref,Se);break;case 5:dv(t);default:Fz(n,t),t=he=FA(t,ji),t=Vz(n,t,ji)}e.memoizedProps=e.pendingProps,t===null?Ad(e):he=t}function aa(e,t,n,r){Ni=po=null,dv(t),da=null,pl=0;var i=t.return;try{if(eP(e,i,t,n,Se)){Ke=1,Qu(e,Nn(n,e.current)),he=null;return}}catch(o){if(i!==null)throw he=i,o;Ke=1,Qu(e,Nn(n,e.current)),he=null;return}t.flags&32768?(be||r===1?e=!0:Ta||Se&536870912?e=!1:(dr=e=!0,(r===2||r===9||r===3||r===6)&&(r=yn.current,r!==null&&r.tag===13&&(r.flags|=16384))),vT(t,e)):Ad(t)}function Ad(e){var t=e;do{if(t.flags&32768){vT(t,dr);return}e=t.return;var n=iP(t.alternate,t,ji);if(n!==null){he=n;return}if(t=t.sibling,t!==null){he=t;return}he=t=e}while(t!==null);Ke===0&&(Ke=5)}function vT(e,t){do{var n=rP(e.alternate,e);if(n!==null){n.flags&=32767,he=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){he=e;return}he=e=n}while(e!==null);Ke=6,he=null}function kE(e,t,n,r,i,o,a,s,c){e.cancelPendingCommit=null;do zd();while(gt!==0);if(xe&6)throw Error(I(327));if(t!==null){if(t===e.current)throw Error(I(177));if(o=t.lanes|t.childLanes,o|=Kh,HU(e,n,o,a,s,c),e===De&&(he=De=null,Se=0),xa=t,Sr=e,Di=n,Ch=o,Eh=i,cT=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,hP(qu,function(){return _T(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,t.subtreeFlags&13878||r){r=re.T,re.T=null,i=_e.p,_e.p=2,a=xe,xe|=4;try{oP(e,t,n)}finally{xe=a,_e.p=i,re.T=r}}gt=1,yT(),ST(),bT()}}function yT(){if(gt===1){gt=0;var e=Sr,t=xa,n=(t.flags&13878)!==0;if(t.subtreeFlags&13878||n){n=re.T,re.T=null;var r=_e.p;_e.p=2;var i=xe;xe|=4;try{tT(t,e);var o=kh,a=RA(e.containerInfo),s=o.focusedElem,c=o.selectionRange;if(a!==s&&s&&s.ownerDocument&&DA(s.ownerDocument.documentElement,s)){if(c!==null&&Jh(s)){var d=c.start,m=c.end;if(m===void 0&&(m=d),"selectionStart"in s)s.selectionStart=d,s.selectionEnd=Math.min(m,s.value.length);else{var l=s.ownerDocument||document,f=l&&l.defaultView||window;if(f.getSelection){var p=f.getSelection(),h=s.textContent.length,y=Math.min(c.start,h),x=c.end===void 0?y:Math.min(c.end,h);!p.extend&&y>x&&(a=x,x=y,y=a);var S=QC(s,y),g=QC(s,x);if(S&&g&&(p.rangeCount!==1||p.anchorNode!==S.node||p.anchorOffset!==S.offset||p.focusNode!==g.node||p.focusOffset!==g.offset)){var b=l.createRange();b.setStart(S.node,S.offset),p.removeAllRanges(),y>x?(p.addRange(b),p.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),p.addRange(b))}}}}for(l=[],p=s;p=p.parentNode;)p.nodeType===1&&l.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<l.length;s++){var v=l[s];v.element.scrollLeft=v.left,v.element.scrollTop=v.top}}fd=!!Ih,kh=Ih=null}finally{xe=i,_e.p=r,re.T=n}}e.current=t,gt=2}}function ST(){if(gt===2){gt=0;var e=Sr,t=xa,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=re.T,re.T=null;var r=_e.p;_e.p=2;var i=xe;xe|=4;try{Jz(e,t.alternate,t)}finally{xe=i,_e.p=r,re.T=n}}gt=3}}function bT(){if(gt===4||gt===3){gt=0,RU();var e=Sr,t=xa,n=Di,r=cT;t.subtreeFlags&10256||t.flags&10256?gt=5:(gt=0,xa=Sr=null,xT(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(yr=null),Vh(n),t=t.stateNode,pn&&typeof pn.onCommitFiberRoot=="function")try{pn.onCommitFiberRoot(wl,t,void 0,(t.current.flags&128)===128)}catch(c){}if(r!==null){t=re.T,i=_e.p,_e.p=2,re.T=null;try{for(var o=e.onRecoverableError,a=0;a<r.length;a++){var s=r[a];o(s.value,{componentStack:s.stack})}}finally{re.T=t,_e.p=i}}Di&3&&zd(),ci(e),i=e.pendingLanes,n&261930&&i&42?e===Ah?al++:(al=0,Ah=e):al=0,kl(0,!1)}}function xT(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,zl(t)))}function zd(){return yT(),ST(),bT(),_T()}function _T(){if(gt!==5)return!1;var e=Sr,t=Ch;Ch=0;var n=Vh(Di),r=re.T,i=_e.p;try{_e.p=32>n?32:n,re.T=null,n=Eh,Eh=null;var o=Sr,a=Di;if(gt=0,xa=Sr=null,Di=0,xe&6)throw Error(I(331));var s=xe;if(xe|=4,aT(o.current),iT(o,o.current,a,n),xe=s,kl(0,!1),pn&&typeof pn.onPostCommitFiberRoot=="function")try{pn.onPostCommitFiberRoot(wl,o)}catch(c){}return!0}finally{_e.p=i,re.T=r,xT(e,t)}}function NE(e,t,n){t=Nn(n,t),t=bh(e.stateNode,t,2),e=vr(e,t,2),e!==null&&(Cl(e,2),ci(e))}function Ae(e,t,n){if(e.tag===3)NE(e,e,n);else for(;t!==null;){if(t.tag===3){NE(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(yr===null||!yr.has(r))){e=Nn(n,e),n=Uz(2),r=vr(t,n,2),r!==null&&(Pz(n,r,t,e),Cl(r,2),ci(r));break}}t=t.return}}function Pg(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new lP;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||($v=!0,i.add(n),e=mP.bind(null,e,t,n),t.then(e,e))}function mP(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,De===e&&(Se&n)===n&&(Ke===4||Ke===3&&(Se&62914560)===Se&&300>mn()-Cd?!(xe&2)&&_a(e,0):Cv|=n,ba===Se&&(ba=0)),ci(e)}function wT(e,t){t===0&&(t=pA()),e=mo(e,t),e!==null&&(Cl(e,t),ci(e))}function pP(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),wT(e,n)}function gP(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(I(314))}r!==null&&r.delete(t),wT(e,n)}function hP(e,t){return Zh(e,t)}var od=null,Xo=null,zh=!1,ad=!1,Lg=!1,mr=0;function ci(e){e!==Xo&&e.next===null&&(Xo===null?od=Xo=e:Xo=Xo.next=e),ad=!0,zh||(zh=!0,yP())}function kl(e,t){if(!Lg&&ad){Lg=!0;do for(var n=!1,r=od;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var o=0;else{var a=r.suspendedLanes,s=r.pingedLanes;o=(1<<31-gn(42|e)+1)-1,o&=i&~(a&~s),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(n=!0,OE(r,o))}else o=Se,o=pd(r,r===De?o:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(o&3)||$l(r,o)||(n=!0,OE(r,o));r=r.next}while(n);Lg=!1}}function vP(){$T()}function $T(){ad=zh=!1;var e=0;mr!==0&&EP()&&(e=mr);for(var t=mn(),n=null,r=od;r!==null;){var i=r.next,o=CT(r,t);o===0?(r.next=null,n===null?od=i:n.next=i,i===null&&(Xo=n)):(n=r,(e!==0||o&3)&&(ad=!0)),r=i}gt!==0&>!==5||kl(e,!1),mr!==0&&(mr=0)}function CT(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var a=31-gn(o),s=1<<a,c=i[a];c===-1?(!(s&n)||s&r)&&(i[a]=FU(s,t)):c<=t&&(e.expiredLanes|=s),o&=~s}if(t=De,n=Se,n=pd(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Ee===2||Ee===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&pg(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||$l(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&pg(r),Vh(n)){case 2:case 8:n=fA;break;case 32:n=qu;break;case 268435456:n=mA;break;default:n=qu}return r=ET.bind(null,e),n=Zh(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&pg(r),e.callbackPriority=2,e.callbackNode=null,2}function ET(e,t){if(gt!==0&>!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(zd()&&e.callbackNode!==n)return null;var r=Se;return r=pd(e,e===De?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(dT(e,r,t),CT(e,mn()),e.callbackNode!=null&&e.callbackNode===n?ET.bind(null,e):null)}function OE(e,t){if(zd())return null;dT(e,t,!0)}function yP(){zP(function(){xe&6?Zh(dA,vP):$T()})}function Av(){if(mr===0){var e=va;e===0&&(e=su,su<<=1,!(su&261888)&&(su=256)),mr=e}return mr}function ME(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Cu(""+e)}function DE(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function SP(e,t,n,r,i){if(t==="submit"&&n&&n.stateNode===i){var o=ME((i[Wt]||null).action),a=r.submitter;a&&(t=(t=a[Wt]||null)?ME(t.formAction):a.getAttribute("formAction"),t!==null&&(o=t,a=null));var s=new gd("action","action",null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(mr!==0){var c=a?DE(i,a):new FormData(i);yh(n,{pending:!0,data:c,method:i.method,action:o},null,c)}}else typeof o=="function"&&(s.preventDefault(),c=a?DE(i,a):new FormData(i),yh(n,{pending:!0,data:c,method:i.method,action:o},o,c))},currentTarget:i}]})}}for(Su=0;Su<ah.length;Su++)bu=ah[Su],RE=bu.toLowerCase(),UE=bu[0].toUpperCase()+bu.slice(1),Gn(RE,"on"+UE);var bu,RE,UE,Su;Gn(PA,"onAnimationEnd");Gn(LA,"onAnimationIteration");Gn(jA,"onAnimationStart");Gn("dblclick","onDoubleClick");Gn("focusin","onFocus");Gn("focusout","onBlur");Gn(U4,"onTransitionRun");Gn(P4,"onTransitionStart");Gn(L4,"onTransitionCancel");Gn(ZA,"onTransitionEnd");ga("onMouseEnter",["mouseout","mouseover"]);ga("onMouseLeave",["mouseout","mouseover"]);ga("onPointerEnter",["pointerout","pointerover"]);ga("onPointerLeave",["pointerout","pointerover"]);co("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));co("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));co("onBeforeInput",["compositionend","keypress","textInput","paste"]);co("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));co("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));co("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var vl="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(" "),bP=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(vl));function AT(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],c=s.instance,d=s.currentTarget;if(s=s.listener,c!==o&&i.isPropagationStopped())break e;o=s,i.currentTarget=d;try{o(i)}catch(m){Fu(m)}i.currentTarget=null,o=c}else for(a=0;a<r.length;a++){if(s=r[a],c=s.instance,d=s.currentTarget,s=s.listener,c!==o&&i.isPropagationStopped())break e;o=s,i.currentTarget=d;try{o(i)}catch(m){Fu(m)}i.currentTarget=null,o=c}}}}function ge(e,t){var n=t[Wg];n===void 0&&(n=t[Wg]=new Set);var r=e+"__bubble";n.has(r)||(zT(t,e,2,!1),n.add(r))}function jg(e,t,n){var r=0;t&&(r|=4),zT(n,e,r,t)}var xu="_reactListening"+Math.random().toString(36).slice(2);function zv(e){if(!e[xu]){e[xu]=!0,SA.forEach(function(n){n!=="selectionchange"&&(bP.has(n)||jg(n,!1,e),jg(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xu]||(t[xu]=!0,jg("selectionchange",!1,t))}}function zT(e,t,n,r){switch(ZT(t)){case 2:var i=XP;break;case 8:i=YP;break;default:i=Nv}n=i.bind(null,t,n,e),i=void 0,!ih||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Zg(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var s=r.stateNode.containerInfo;if(s===i)break;if(a===4)for(a=r.return;a!==null;){var c=a.tag;if((c===3||c===4)&&a.stateNode.containerInfo===i)return;a=a.return}for(;s!==null;){if(a=Ko(s),a===null)return;if(c=a.tag,c===5||c===6||c===26||c===27){r=o=a;continue e}s=s.parentNode}}r=r.return}AA(function(){var d=o,m=Bh(n),l=[];e:{var f=qA.get(e);if(f!==void 0){var p=gd,h=e;switch(e){case"keypress":if(Au(n)===0)break e;case"keydown":case"keyup":p=g4;break;case"focusin":h="focus",p=Sg;break;case"focusout":h="blur",p=Sg;break;case"beforeblur":case"afterblur":p=Sg;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=FC;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=i4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=y4;break;case PA:case LA:case jA:p=a4;break;case ZA:p=b4;break;case"scroll":case"scrollend":p=t4;break;case"wheel":p=_4;break;case"copy":case"cut":case"paste":p=l4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=BC;break;case"toggle":case"beforetoggle":p=$4}var y=(t&4)!==0,x=!y&&(e==="scroll"||e==="scrollend"),S=y?f!==null?f+"Capture":null:f;y=[];for(var g=d,b;g!==null;){var v=g;if(b=v.stateNode,v=v.tag,v!==5&&v!==26&&v!==27||b===null||S===null||(v=cl(g,S),v!=null&&y.push(yl(g,v,b))),x)break;g=g.return}0<y.length&&(f=new p(f,h,null,n,m),l.push({event:f,listeners:y}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==nh&&(h=n.relatedTarget||n.fromElement)&&(Ko(h)||h[Ca]))break e;if((p||f)&&(f=m.window===m?m:(f=m.ownerDocument)?f.defaultView||f.parentWindow:window,p?(h=n.relatedTarget||n.toElement,p=d,h=h?Ko(h):null,h!==null&&(x=_l(h),y=h.tag,h!==x||y!==5&&y!==27&&y!==6)&&(h=null)):(p=null,h=d),p!==h)){if(y=FC,v="onMouseLeave",S="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(y=BC,v="onPointerLeave",S="onPointerEnter",g="pointer"),x=p==null?f:Bs(p),b=h==null?f:Bs(h),f=new y(v,g+"leave",p,n,m),f.target=x,f.relatedTarget=b,v=null,Ko(m)===d&&(y=new y(S,g+"enter",h,n,m),y.target=b,y.relatedTarget=x,v=y),x=v,p&&h)t:{for(y=xP,S=p,g=h,b=0,v=S;v;v=y(v))b++;v=0;for(var _=g;_;_=y(_))v++;for(;0<b-v;)S=y(S),b--;for(;0<v-b;)g=y(g),v--;for(;b--;){if(S===g||g!==null&&S===g.alternate){y=S;break t}S=y(S),g=y(g)}y=null}else y=null;p!==null&&PE(l,f,p,y,!1),h!==null&&x!==null&&PE(l,x,h,y,!0)}}e:{if(f=d?Bs(d):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var C=JC;else if(YC(f))if(OA)C=M4;else{C=N4;var E=k4}else p=f.nodeName,!p||p.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?d&&Hh(d.elementType)&&(C=JC):C=O4;if(C&&(C=C(e,d))){NA(l,C,n,m);break e}E&&E(e,f,d),e==="focusout"&&d&&f.type==="number"&&d.memoizedProps.value!=null&&th(f,"number",f.value)}switch(E=d?Bs(d):window,e){case"focusin":(YC(E)||E.contentEditable==="true")&&(ea=E,rh=d,Ks=null);break;case"focusout":Ks=rh=ea=null;break;case"mousedown":oh=!0;break;case"contextmenu":case"mouseup":case"dragend":oh=!1,eE(l,n,m);break;case"selectionchange":if(R4)break;case"keydown":case"keyup":eE(l,n,m)}var A;if(Yh)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else Qo?IA(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(TA&&n.locale!=="ko"&&(Qo||T!=="onCompositionStart"?T==="onCompositionEnd"&&Qo&&(A=zA()):(ur=m,Gh="value"in ur?ur.value:ur.textContent,Qo=!0)),E=sd(d,T),0<E.length&&(T=new HC(T,e,null,n,m),l.push({event:T,listeners:E}),A?T.data=A:(A=kA(n),A!==null&&(T.data=A)))),(A=E4?A4(e,n):z4(e,n))&&(T=sd(d,"onBeforeInput"),0<T.length&&(E=new HC("onBeforeInput","beforeinput",null,n,m),l.push({event:E,listeners:T}),E.data=A)),SP(l,e,d,n,m)}AT(l,t)})}function yl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function sd(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||o===null||(i=cl(e,n),i!=null&&r.unshift(yl(e,i,o)),i=cl(e,t),i!=null&&r.push(yl(e,i,o))),e.tag===3)return r;e=e.return}return[]}function xP(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function PE(e,t,n,r,i){for(var o=t._reactName,a=[];n!==null&&n!==r;){var s=n,c=s.alternate,d=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||d===null||(c=d,i?(d=cl(n,o),d!=null&&a.unshift(yl(n,d,c))):i||(d=cl(n,o),d!=null&&a.push(yl(n,d,c)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var _P=/\r\n?/g,wP=/\u0000|\uFFFD/g;function LE(e){return(typeof e=="string"?e:""+e).replace(_P,`
|
|
`).replace(wP,"")}function TT(e,t){return t=LE(t),LE(e)===t}function Ie(e,t,n,r,i,o){switch(n){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||ha(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&ha(e,""+r);break;case"className":uu(e,"class",r);break;case"tabIndex":uu(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":uu(e,n,r);break;case"style":EA(e,r,o);break;case"data":if(t!=="object"){uu(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=Cu(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(n,"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 o=="function"&&(n==="formAction"?(t!=="input"&&Ie(e,t,"name",i.name,i,null),Ie(e,t,"formEncType",i.formEncType,i,null),Ie(e,t,"formMethod",i.formMethod,i,null),Ie(e,t,"formTarget",i.formTarget,i,null)):(Ie(e,t,"encType",i.encType,i,null),Ie(e,t,"method",i.method,i,null),Ie(e,t,"target",i.target,i,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=Cu(""+r),e.setAttribute(n,r);break;case"onClick":r!=null&&(e.onclick=ki);break;case"onScroll":r!=null&&ge("scroll",e);break;case"onScrollEnd":r!=null&&ge("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(I(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(I(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}n=Cu(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""+r):e.removeAttribute(n);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":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":r===!0?e.setAttribute(n,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":ge("beforetoggle",e),ge("toggle",e),$u(e,"popover",r);break;case"xlinkActuate":wi(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":wi(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":wi(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":wi(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":wi(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":wi(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":wi(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":wi(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":wi(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":$u(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=QU.get(n)||n,$u(e,n,r))}}function Th(e,t,n,r,i,o){switch(n){case"style":EA(e,r,o);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(I(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(I(60));e.innerHTML=n}}break;case"children":typeof r=="string"?ha(e,r):(typeof r=="number"||typeof r=="bigint")&&ha(e,""+r);break;case"onScroll":r!=null&&ge("scroll",e);break;case"onScrollEnd":r!=null&&ge("scrollend",e);break;case"onClick":r!=null&&(e.onclick=ki);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!bA.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),o=e[Wt]||null,o=o!=null?o[n]:null,typeof o=="function"&&e.removeEventListener(t,o,i),typeof r=="function")){typeof o!="function"&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break e}n in e?e[n]=r:r===!0?e.setAttribute(n,""):$u(e,n,r)}}}function zt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ge("error",e),ge("load",e);var r=!1,i=!1,o;for(o in n)if(n.hasOwnProperty(o)){var a=n[o];if(a!=null)switch(o){case"src":r=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(I(137,t));default:Ie(e,t,o,a,n,null)}}i&&Ie(e,t,"srcSet",n.srcSet,n,null),r&&Ie(e,t,"src",n.src,n,null);return;case"input":ge("invalid",e);var s=o=a=i=null,c=null,d=null;for(r in n)if(n.hasOwnProperty(r)){var m=n[r];if(m!=null)switch(r){case"name":i=m;break;case"type":a=m;break;case"checked":c=m;break;case"defaultChecked":d=m;break;case"value":o=m;break;case"defaultValue":s=m;break;case"children":case"dangerouslySetInnerHTML":if(m!=null)throw Error(I(137,t));break;default:Ie(e,t,r,m,n,null)}}wA(e,o,s,c,d,a,i,!1);return;case"select":ge("invalid",e),r=a=o=null;for(i in n)if(n.hasOwnProperty(i)&&(s=n[i],s!=null))switch(i){case"value":o=s;break;case"defaultValue":a=s;break;case"multiple":r=s;default:Ie(e,t,i,s,n,null)}t=o,n=a,e.multiple=!!r,t!=null?la(e,!!r,t,!1):n!=null&&la(e,!!r,n,!0);return;case"textarea":ge("invalid",e),o=i=r=null;for(a in n)if(n.hasOwnProperty(a)&&(s=n[a],s!=null))switch(a){case"value":r=s;break;case"defaultValue":i=s;break;case"children":o=s;break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(I(91));break;default:Ie(e,t,a,s,n,null)}CA(e,r,i,o);return;case"option":for(c in n)if(n.hasOwnProperty(c)&&(r=n[c],r!=null))switch(c){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:Ie(e,t,c,r,n,null)}return;case"dialog":ge("beforetoggle",e),ge("toggle",e),ge("cancel",e),ge("close",e);break;case"iframe":case"object":ge("load",e);break;case"video":case"audio":for(r=0;r<vl.length;r++)ge(vl[r],e);break;case"image":ge("error",e),ge("load",e);break;case"details":ge("toggle",e);break;case"embed":case"source":case"link":ge("error",e),ge("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(d in n)if(n.hasOwnProperty(d)&&(r=n[d],r!=null))switch(d){case"children":case"dangerouslySetInnerHTML":throw Error(I(137,t));default:Ie(e,t,d,r,n,null)}return;default:if(Hh(t)){for(m in n)n.hasOwnProperty(m)&&(r=n[m],r!==void 0&&Th(e,t,m,r,n,void 0));return}}for(s in n)n.hasOwnProperty(s)&&(r=n[s],r!=null&&Ie(e,t,s,r,n,null))}function $P(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,o=null,a=null,s=null,c=null,d=null,m=null;for(p in n){var l=n[p];if(n.hasOwnProperty(p)&&l!=null)switch(p){case"checked":break;case"value":break;case"defaultValue":c=l;default:r.hasOwnProperty(p)||Ie(e,t,p,null,r,l)}}for(var f in r){var p=r[f];if(l=n[f],r.hasOwnProperty(f)&&(p!=null||l!=null))switch(f){case"type":o=p;break;case"name":i=p;break;case"checked":d=p;break;case"defaultChecked":m=p;break;case"value":a=p;break;case"defaultValue":s=p;break;case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(I(137,t));break;default:p!==l&&Ie(e,t,f,p,r,l)}}eh(e,a,s,c,d,m,o,i);return;case"select":p=a=s=f=null;for(o in n)if(c=n[o],n.hasOwnProperty(o)&&c!=null)switch(o){case"value":break;case"multiple":p=c;default:r.hasOwnProperty(o)||Ie(e,t,o,null,r,c)}for(i in r)if(o=r[i],c=n[i],r.hasOwnProperty(i)&&(o!=null||c!=null))switch(i){case"value":f=o;break;case"defaultValue":s=o;break;case"multiple":a=o;default:o!==c&&Ie(e,t,i,o,r,c)}t=s,n=a,r=p,f!=null?la(e,!!n,f,!1):!!r!=!!n&&(t!=null?la(e,!!n,t,!0):la(e,!!n,n?[]:"",!1));return;case"textarea":p=f=null;for(s in n)if(i=n[s],n.hasOwnProperty(s)&&i!=null&&!r.hasOwnProperty(s))switch(s){case"value":break;case"children":break;default:Ie(e,t,s,null,r,i)}for(a in r)if(i=r[a],o=n[a],r.hasOwnProperty(a)&&(i!=null||o!=null))switch(a){case"value":f=i;break;case"defaultValue":p=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(I(91));break;default:i!==o&&Ie(e,t,a,i,r,o)}$A(e,f,p);return;case"option":for(var h in n)if(f=n[h],n.hasOwnProperty(h)&&f!=null&&!r.hasOwnProperty(h))switch(h){case"selected":e.selected=!1;break;default:Ie(e,t,h,null,r,f)}for(c in r)if(f=r[c],p=n[c],r.hasOwnProperty(c)&&f!==p&&(f!=null||p!=null))switch(c){case"selected":e.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:Ie(e,t,c,f,r,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 y in n)f=n[y],n.hasOwnProperty(y)&&f!=null&&!r.hasOwnProperty(y)&&Ie(e,t,y,null,r,f);for(d in r)if(f=r[d],p=n[d],r.hasOwnProperty(d)&&f!==p&&(f!=null||p!=null))switch(d){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(I(137,t));break;default:Ie(e,t,d,f,r,p)}return;default:if(Hh(t)){for(var x in n)f=n[x],n.hasOwnProperty(x)&&f!==void 0&&!r.hasOwnProperty(x)&&Th(e,t,x,void 0,r,f);for(m in r)f=r[m],p=n[m],!r.hasOwnProperty(m)||f===p||f===void 0&&p===void 0||Th(e,t,m,f,r,p);return}}for(var S in n)f=n[S],n.hasOwnProperty(S)&&f!=null&&!r.hasOwnProperty(S)&&Ie(e,t,S,null,r,f);for(l in r)f=r[l],p=n[l],!r.hasOwnProperty(l)||f===p||f==null&&p==null||Ie(e,t,l,f,r,p)}function jE(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function CP(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var i=n[r],o=i.transferSize,a=i.initiatorType,s=i.duration;if(o&&s&&jE(a)){for(a=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],d=c.startTime;if(d>s)break;var m=c.transferSize,l=c.initiatorType;m&&jE(l)&&(c=c.responseEnd,a+=m*(c<s?1:(s-d)/(c-d)))}if(--r,t+=8*(o+a)/(i.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 Ih=null,kh=null;function ld(e){return e.nodeType===9?e:e.ownerDocument}function ZE(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 IT(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 Nh(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 qg=null;function EP(){var e=window.event;return e&&e.type==="popstate"?e===qg?!1:(qg=e,!0):(qg=null,!1)}var kT=typeof setTimeout=="function"?setTimeout:void 0,AP=typeof clearTimeout=="function"?clearTimeout:void 0,qE=typeof Promise=="function"?Promise:void 0,zP=typeof queueMicrotask=="function"?queueMicrotask:typeof qE!="undefined"?function(e){return qE.resolve(null).then(e).catch(TP)}:kT;function TP(e){setTimeout(function(){throw e})}function zr(e){return e==="head"}function VE(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"||n==="/&"){if(r===0){e.removeChild(i),$a(t);return}r--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")r++;else if(n==="html")sl(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,sl(n);for(var o=n.firstChild;o;){var a=o.nextSibling,s=o.nodeName;o[El]||s==="SCRIPT"||s==="STYLE"||s==="LINK"&&o.rel.toLowerCase()==="stylesheet"||n.removeChild(o),o=a}}else n==="body"&&sl(e.ownerDocument.body);n=i}while(n);$a(t)}function FE(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=r}while(n)}function Oh(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Oh(n),Fh(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function IP(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[El])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(o=e.getAttribute("rel"),o==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(o!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(o=e.getAttribute("src"),(o!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var o=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===o)return e}else return e;if(e=Dn(e.nextSibling),e===null)break}return null}function kP(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Dn(e.nextSibling),e===null))return null;return e}function NT(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Dn(e.nextSibling),e===null))return null;return e}function Mh(e){return e.data==="$?"||e.data==="$~"}function Dh(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function NP(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function Dn(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 Rh=null;function HE(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Dn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function BE(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function OT(e,t,n){switch(t=ld(n),e){case"html":if(e=t.documentElement,!e)throw Error(I(452));return e;case"head":if(e=t.head,!e)throw Error(I(453));return e;case"body":if(e=t.body,!e)throw Error(I(454));return e;default:throw Error(I(451))}}function sl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Fh(e)}var Rn=new Map,GE=new Set;function cd(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Zi=_e.d;_e.d={f:OP,r:MP,D:DP,C:RP,L:UP,m:PP,X:jP,S:LP,M:ZP};function OP(){var e=Zi.f(),t=Ed();return e||t}function MP(e){var t=Ea(e);t!==null&&t.tag===5&&t.type==="form"?Ez(t):Zi.r(e)}var Ia=typeof document=="undefined"?null:document;function MT(e,t,n){var r=Ia;if(r&&typeof t=="string"&&t){var i=kn(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),GE.has(i)||(GE.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement("link"),zt(t,"link",e),xt(t),r.head.appendChild(t)))}}function DP(e){Zi.D(e),MT("dns-prefetch",e,null)}function RP(e,t){Zi.C(e,t),MT("preconnect",e,t)}function UP(e,t,n){Zi.L(e,t,n);var r=Ia;if(r&&e&&t){var i='link[rel="preload"][as="'+kn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+kn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+kn(n.imageSizes)+'"]')):i+='[href="'+kn(e)+'"]';var o=i;switch(t){case"style":o=wa(e);break;case"script":o=ka(e)}Rn.has(o)||(e=Ve({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Rn.set(o,e),r.querySelector(i)!==null||t==="style"&&r.querySelector(Nl(o))||t==="script"&&r.querySelector(Ol(o))||(t=r.createElement("link"),zt(t,"link",e),xt(t),r.head.appendChild(t)))}}function PP(e,t){Zi.m(e,t);var n=Ia;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+kn(r)+'"][href="'+kn(e)+'"]',o=i;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=ka(e)}if(!Rn.has(o)&&(e=Ve({rel:"modulepreload",href:e},t),Rn.set(o,e),n.querySelector(i)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Ol(o)))return}r=n.createElement("link"),zt(r,"link",e),xt(r),n.head.appendChild(r)}}}function LP(e,t,n){Zi.S(e,t,n);var r=Ia;if(r&&e){var i=sa(r).hoistableStyles,o=wa(e);t=t||"default";var a=i.get(o);if(!a){var s={loading:0,preload:null};if(a=r.querySelector(Nl(o)))s.loading=5;else{e=Ve({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Rn.get(o))&&Tv(e,n);var c=a=r.createElement("link");xt(c),zt(c,"link",e),c._p=new Promise(function(d,m){c.onload=d,c.onerror=m}),c.addEventListener("load",function(){s.loading|=1}),c.addEventListener("error",function(){s.loading|=2}),s.loading|=4,Du(a,t,r)}a={type:"stylesheet",instance:a,count:1,state:s},i.set(o,a)}}}function jP(e,t){Zi.X(e,t);var n=Ia;if(n&&e){var r=sa(n).hoistableScripts,i=ka(e),o=r.get(i);o||(o=n.querySelector(Ol(i)),o||(e=Ve({src:e,async:!0},t),(t=Rn.get(i))&&Iv(e,t),o=n.createElement("script"),xt(o),zt(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},r.set(i,o))}}function ZP(e,t){Zi.M(e,t);var n=Ia;if(n&&e){var r=sa(n).hoistableScripts,i=ka(e),o=r.get(i);o||(o=n.querySelector(Ol(i)),o||(e=Ve({src:e,async:!0,type:"module"},t),(t=Rn.get(i))&&Iv(e,t),o=n.createElement("script"),xt(o),zt(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},r.set(i,o))}}function XE(e,t,n,r){var i=(i=pr.current)?cd(i):null;if(!i)throw Error(I(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=wa(n.href),n=sa(i).hoistableStyles,r=n.get(t),r||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=wa(n.href);var o=sa(i).hoistableStyles,a=o.get(e);if(a||(i=i.ownerDocument||i,a={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,a),(o=i.querySelector(Nl(e)))&&!o._p&&(a.instance=o,a.state.loading=5),Rn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Rn.set(e,n),o||qP(i,e,n,a.state))),t&&r===null)throw Error(I(528,""));return a}if(t&&r!==null)throw Error(I(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ka(n),n=sa(i).hoistableScripts,r=n.get(t),r||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(I(444,e))}}function wa(e){return'href="'+kn(e)+'"'}function Nl(e){return'link[rel="stylesheet"]['+e+"]"}function DT(e){return Ve({},e,{"data-precedence":e.precedence,precedence:null})}function qP(e,t,n,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),zt(t,"link",n),xt(t),e.head.appendChild(t))}function ka(e){return'[src="'+kn(e)+'"]'}function Ol(e){return"script[async]"+e}function YE(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+kn(n.href)+'"]');if(r)return t.instance=r,xt(r),r;var i=Ve({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),xt(r),zt(r,"style",i),Du(r,n.precedence,e),t.instance=r;case"stylesheet":i=wa(n.href);var o=e.querySelector(Nl(i));if(o)return t.state.loading|=4,t.instance=o,xt(o),o;r=DT(n),(i=Rn.get(i))&&Tv(r,i),o=(e.ownerDocument||e).createElement("link"),xt(o);var a=o;return a._p=new Promise(function(s,c){a.onload=s,a.onerror=c}),zt(o,"link",r),t.state.loading|=4,Du(o,n.precedence,e),t.instance=o;case"script":return o=ka(n.src),(i=e.querySelector(Ol(o)))?(t.instance=i,xt(i),i):(r=n,(i=Rn.get(o))&&(r=Ve({},n),Iv(r,i)),e=e.ownerDocument||e,i=e.createElement("script"),xt(i),zt(i,"link",r),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(I(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Du(r,n.precedence,e));return t.instance}function Du(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=r.length?r[r.length-1]:null,o=i,a=0;a<r.length;a++){var s=r[a];if(s.dataset.precedence===t)o=s;else if(o!==i)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Tv(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Iv(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ru=null;function JE(e,t,n){if(Ru===null){var r=new Map,i=Ru=new Map;i.set(n,r)}else i=Ru,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var o=n[i];if(!(o[El]||o[Ct]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var a=o.getAttribute(t)||"";a=e+a;var s=r.get(a);s?s.push(o):r.set(a,[o])}}return r}function KE(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function VP(e,t,n){if(n===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 RT(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function FP(e,t,n,r){if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var i=wa(r.href),o=t.querySelector(Nl(i));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ud.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=o,xt(o);return}o=t.ownerDocument||t,r=DT(r),(i=Rn.get(i))&&Tv(r,i),o=o.createElement("link"),xt(o);var a=o;a._p=new Promise(function(s,c){a.onload=s,a.onerror=c}),zt(o,"link",r),n.instance=o}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ud.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Vg=0;function HP(e,t){return e.stylesheets&&e.count===0&&Uu(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Uu(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&Vg===0&&(Vg=62500*CP());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Uu(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>Vg?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ud(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Uu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var dd=null;function Uu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,dd=new Map,t.forEach(BP,e),dd=null,ud.call(e))}function BP(e,t){if(!(t.state.loading&4)){var n=dd.get(e);if(n)var r=n.get(null);else{n=new Map,dd.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<i.length;o++){var a=i[o];(a.nodeName==="LINK"||a.getAttribute("media")!=="not all")&&(n.set(a.dataset.precedence,a),r=a)}r&&n.set(null,r)}i=t.instance,a=i.getAttribute("data-precedence"),o=n.get(a)||r,o===r&&n.set(null,i),n.set(a,i),this.count++,r=ud.bind(this),i.addEventListener("load",r),i.addEventListener("error",r),o?o.parentNode.insertBefore(i,o.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Sl={$$typeof:Ii,Provider:null,Consumer:null,_currentValue:Qr,_currentValue2:Qr,_threadCount:0};function GP(e,t,n,r,i,o,a,s,c){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=gg(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gg(0),this.hiddenUpdates=gg(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=o,this.onRecoverableError=a,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function UT(e,t,n,r,i,o,a,s,c,d,m,l){return e=new GP(e,t,n,a,c,d,m,l,s),t=1,o===!0&&(t|=24),o=dn(3,null,null,t),e.current=o,o.stateNode=e,t=nv(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:r,isDehydrated:n,cache:t},ov(o),e}function PT(e){return e?(e=ia,e):ia}function LT(e,t,n,r,i,o){i=PT(i),r.context===null?r.context=i:r.pendingContext=i,r=hr(t),r.payload={element:n},o=o===void 0?null:o,o!==null&&(r.callback=o),n=vr(e,r,t),n!==null&&(Kt(n,e,t),Qs(n,e,t))}function WE(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function kv(e,t){WE(e,t),(e=e.alternate)&&WE(e,t)}function jT(e){if(e.tag===13||e.tag===31){var t=mo(e,67108864);t!==null&&Kt(t,e,67108864),kv(e,67108864)}}function QE(e){if(e.tag===13||e.tag===31){var t=hn();t=qh(t);var n=mo(e,t);n!==null&&Kt(n,e,t),kv(e,t)}}var fd=!0;function XP(e,t,n,r){var i=re.T;re.T=null;var o=_e.p;try{_e.p=2,Nv(e,t,n,r)}finally{_e.p=o,re.T=i}}function YP(e,t,n,r){var i=re.T;re.T=null;var o=_e.p;try{_e.p=8,Nv(e,t,n,r)}finally{_e.p=o,re.T=i}}function Nv(e,t,n,r){if(fd){var i=Uh(r);if(i===null)Zg(e,t,r,md,n),eA(e,r);else if(KP(i,e,t,n,r))r.stopPropagation();else if(eA(e,r),t&4&&-1<JP.indexOf(e)){for(;i!==null;){var o=Ea(i);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var a=Jr(o.pendingLanes);if(a!==0){var s=o;for(s.pendingLanes|=2,s.entangledLanes|=2;a;){var c=1<<31-gn(a);s.entanglements[1]|=c,a&=~c}ci(o),!(xe&6)&&(nd=mn()+500,kl(0,!1))}}break;case 31:case 13:s=mo(o,2),s!==null&&Kt(s,o,2),Ed(),kv(o,2)}if(o=Uh(r),o===null&&Zg(e,t,r,md,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else Zg(e,t,r,null,n)}}function Uh(e){return e=Bh(e),Ov(e)}var md=null;function Ov(e){if(md=null,e=Ko(e),e!==null){var t=_l(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=aA(t),e!==null)return e;e=null}else if(n===31){if(e=sA(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return md=e,null}function ZT(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(UU()){case dA:return 2;case fA:return 8;case qu:case PU:return 32;case mA:return 268435456;default:return 32}default:return 32}}var Ph=!1,br=null,xr=null,_r=null,bl=new Map,xl=new Map,lr=[],JP="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 eA(e,t){switch(e){case"focusin":case"focusout":br=null;break;case"dragenter":case"dragleave":xr=null;break;case"mouseover":case"mouseout":_r=null;break;case"pointerover":case"pointerout":bl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":xl.delete(t.pointerId)}}function qs(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=Ea(t),t!==null&&jT(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function KP(e,t,n,r,i){switch(t){case"focusin":return br=qs(br,e,t,n,r,i),!0;case"dragenter":return xr=qs(xr,e,t,n,r,i),!0;case"mouseover":return _r=qs(_r,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return bl.set(o,qs(bl.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,xl.set(o,qs(xl.get(o)||null,e,t,n,r,i)),!0}return!1}function qT(e){var t=Ko(e.target);if(t!==null){var n=_l(t);if(n!==null){if(t=n.tag,t===13){if(t=aA(n),t!==null){e.blockedOn=t,UC(e.priority,function(){QE(n)});return}}else if(t===31){if(t=sA(n),t!==null){e.blockedOn=t,UC(e.priority,function(){QE(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Pu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Uh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);nh=r,n.target.dispatchEvent(r),nh=null}else return t=Ea(n),t!==null&&jT(t),e.blockedOn=n,!1;t.shift()}return!0}function tA(e,t,n){Pu(e)&&n.delete(t)}function WP(){Ph=!1,br!==null&&Pu(br)&&(br=null),xr!==null&&Pu(xr)&&(xr=null),_r!==null&&Pu(_r)&&(_r=null),bl.forEach(tA),xl.forEach(tA)}function _u(e,t){e.blockedOn===t&&(e.blockedOn=null,Ph||(Ph=!0,ht.unstable_scheduleCallback(ht.unstable_NormalPriority,WP)))}var wu=null;function nA(e){wu!==e&&(wu=e,ht.unstable_scheduleCallback(ht.unstable_NormalPriority,function(){wu===e&&(wu=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!="function"){if(Ov(r||n)===null)continue;break}var o=Ea(n);o!==null&&(e.splice(t,3),t-=3,yh(o,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function $a(e){function t(c){return _u(c,e)}br!==null&&_u(br,e),xr!==null&&_u(xr,e),_r!==null&&_u(_r,e),bl.forEach(t),xl.forEach(t);for(var n=0;n<lr.length;n++){var r=lr[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<lr.length&&(n=lr[0],n.blockedOn===null);)qT(n),n.blockedOn===null&&lr.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],o=n[r+1],a=i[Wt]||null;if(typeof o=="function")a||nA(n);else if(a){var s=null;if(o&&o.hasAttribute("formAction")){if(i=o,a=o[Wt]||null)s=a.formAction;else if(Ov(i)!==null)continue}else s=a.action;typeof s=="function"?n[r+1]=s:(n.splice(r,3),r-=3),nA(n)}}}function VT(){function e(o){o.canIntercept&&o.info==="react-transition"&&o.intercept({handler:function(){return new Promise(function(a){return i=a})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var o=navigation.currentEntry;o&&o.url!=null&&navigation.navigate(o.url,{state:o.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function Mv(e){this._internalRoot=e}Td.prototype.render=Mv.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(I(409));var n=t.current,r=hn();LT(n,r,e,t,null,null)};Td.prototype.unmount=Mv.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;LT(e.current,2,null,e,null,null),Ed(),t[Ca]=null}};function Td(e){this._internalRoot=e}Td.prototype.unstable_scheduleHydration=function(e){if(e){var t=yA();e={blockedOn:null,target:e,priority:t};for(var n=0;n<lr.length&&t!==0&&t<lr[n].priority;n++);lr.splice(n,0,e),n===0&&qT(e)}};var iA=rA.version;if(iA!=="19.2.5")throw Error(I(527,iA,"19.2.5"));_e.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(I(188)):(e=Object.keys(e).join(","),Error(I(268,e)));return e=IU(t),e=e!==null?lA(e):null,e=e===null?null:e.stateNode,e};var QP={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:re,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&(Vs=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Vs.isDisabled&&Vs.supportsFiber))try{wl=Vs.inject(QP),pn=Vs}catch(e){}var Vs;Id.createRoot=function(e,t){if(!oA(e))throw Error(I(299));var n=!1,r="",i=Mz,o=Dz,a=Rz;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=UT(e,1,!1,null,null,n,r,null,i,o,a,VT),e[Ca]=t.current,zv(e),new Mv(t)};Id.hydrateRoot=function(e,t,n){if(!oA(e))throw Error(I(299));var r=!1,i="",o=Mz,a=Dz,s=Rz,c=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(o=n.onUncaughtError),n.onCaughtError!==void 0&&(a=n.onCaughtError),n.onRecoverableError!==void 0&&(s=n.onRecoverableError),n.formState!==void 0&&(c=n.formState)),t=UT(e,1,!0,t,n!=null?n:null,r,i,c,o,a,s,VT),t.context=PT(null),n=t.current,r=hn(),r=qh(r),i=hr(r),i.callback=null,vr(n,i,r),n=r,t.current.lanes=n,Cl(t,n),ci(t),e[Ca]=t.current,zv(e),new Td(t)};Id.version="19.2.5"});var Ml=te((Gq,BT)=>{"use strict";function HT(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(HT)}catch(e){console.error(e)}}HT(),BT.exports=FT()});var KT=te(Md=>{"use strict";var e6=Symbol.for("react.transitional.element"),t6=Symbol.for("react.fragment");function JT(e,t,n){var r=null;if(n!==void 0&&(r=""+n),t.key!==void 0&&(r=""+t.key),"key"in t){n={};for(var i in t)i!=="key"&&(n[i]=t[i])}else n=t;return t=n.ref,{$$typeof:e6,type:e,key:r,ref:t!==void 0?t:null,props:n}}Md.Fragment=t6;Md.jsx=JT;Md.jsxs=JT});var ve=te((Kq,WT)=>{"use strict";WT.exports=KT()});var X3={};ei(X3,{default:()=>Oc});module.exports=mM(X3);var Bt=require("obsidian"),bi=G(Xp());var Ok=require("obsidian"),zL=G(Ce()),Mk=G(Ml());var Dv=null;function GT(e){Dv=new kd(e)}function Ne(){return Dv||new kd({debugMode:!1})}var kd=class{constructor(t){this.config=t}log(...t){this.config.debugMode&&console.debug(...t)}error(...t){this.config.debugMode&&console.error(...t)}warn(...t){this.config.debugMode&&console.warn(...t)}info(...t){this.config.debugMode&&console.debug(...t)}};var Nd=G(Ce()),XT=(0,Nd.createContext)(null),Od=XT.Provider;function YT(){let e=(0,Nd.useContext)(XT);if(!e)throw new Error("useChatContext must be used within ChatContextProvider");return e}var EL=G(Ce()),qn=require("obsidian");var Un=G(Ce()),Vi=require("obsidian");var Na=require("obsidian"),qi=G(Ce()),QT=G(Ml()),ee=G(ve()),{useState:Rd,useCallback:ui}=qi,Rv=class extends Na.Modal{constructor(n,r,i){super(n);this.sessionTitle=r,this.onConfirm=i}onOpen(){let{contentEl:n}=this;n.empty(),n.createEl("h2",{text:"Delete session?"}),n.createEl("p",{text:`Are you sure you want to delete "${this.sessionTitle}"?`,cls:"agent-client-confirm-delete-message"}),n.createEl("p",{text:"This only removes the session from this plugin. The session data will remain on the agent side.",cls:"agent-client-confirm-delete-warning"});let r=n.createDiv({cls:"agent-client-confirm-delete-buttons"});r.createEl("button",{text:"Cancel",cls:"agent-client-confirm-delete-cancel"}).addEventListener("click",()=>{this.close()}),r.createEl("button",{text:"Delete",cls:"agent-client-confirm-delete-confirm mod-warning"}).addEventListener("click",()=>{this.close(),this.onConfirm()})}onClose(){let{contentEl:n}=this;n.empty()}},Uv=class extends Na.Modal{constructor(n,r,i){super(n);this.currentTitle=r,this.onSave=i}onOpen(){let{contentEl:n}=this;n.empty(),n.createEl("h2",{text:"Edit session title"});let r=n.createEl("input",{type:"text",cls:"agent-client-edit-title-input",attr:{maxlength:"100"}});r.value=this.currentTitle,setTimeout(()=>{r.focus(),r.select()},10),r.addEventListener("keydown",o=>{o.key==="Enter"&&(o.preventDefault(),this.saveAndClose(r.value))});let i=n.createDiv({cls:"agent-client-edit-title-buttons"});i.createEl("button",{text:"Cancel"}).addEventListener("click",()=>{this.close()}),i.createEl("button",{text:"Save",cls:"mod-cta"}).addEventListener("click",()=>{this.saveAndClose(r.value)})}saveAndClose(n){let r=n.trim();r&&(this.close(),this.onSave(r))}onClose(){let{contentEl:n}=this;n.empty()}};function Dd({iconName:e,label:t,className:n,onClick:r}){let i=qi.useRef(null);return qi.useEffect(()=>{i.current&&(0,Na.setIcon)(i.current,e)},[e]),(0,ee.jsx)("div",{ref:i,className:n,"aria-label":t,onClick:r})}function n6(e){let t=Date.now(),n=e.getTime(),r=t-n,i=Math.floor(r/1e3),o=Math.floor(i/60),a=Math.floor(o/60),s=Math.floor(a/24);if(o<1)return"just now";if(o<60)return`${o} minute${o===1?"":"s"} ago`;if(a<24)return`${a} hour${a===1?"":"s"} ago`;if(s===1)return"yesterday";if(s<7)return`${s} days ago`;{let c=e.toLocaleString("default",{month:"short"}),d=e.getDate(),m=e.getFullYear();return`${c} ${d}, ${m}`}}function i6(e){return e.length<=50?e:e.slice(0,50)+"..."}function r6({currentCwd:e,onRestoreSession:t,onForkSession:n,onClose:r}){let[i,o]=Rd(""),[a,s]=Rd(e),c=ui(()=>{i.trim()&&(r(),t(i.trim(),a.trim()||e))},[i,a,e,t,r]),d=ui(()=>{i.trim()&&(r(),n(i.trim(),a.trim()||e))},[i,a,e,n,r]);return(0,ee.jsxs)("div",{className:"agent-client-session-history-debug",children:[(0,ee.jsx)("h3",{children:"Debug: Manual Session Input"}),(0,ee.jsxs)("div",{className:"agent-client-session-history-debug-group",children:[(0,ee.jsx)("label",{htmlFor:"debug-session-id",children:"Session ID:"}),(0,ee.jsx)("input",{id:"debug-session-id",type:"text",placeholder:"Enter session ID...",className:"agent-client-session-history-debug-input",value:i,onChange:m=>o(m.target.value)})]}),(0,ee.jsxs)("div",{className:"agent-client-session-history-debug-group",children:[(0,ee.jsx)("label",{htmlFor:"debug-cwd",children:"Working Directory (cwd):"}),(0,ee.jsx)("input",{id:"debug-cwd",type:"text",placeholder:"Enter working directory...",className:"agent-client-session-history-debug-input",value:a,onChange:m=>s(m.target.value)})]}),(0,ee.jsxs)("div",{className:"agent-client-session-history-debug-actions",children:[(0,ee.jsx)("button",{className:"agent-client-session-history-debug-button",onClick:c,children:"Restore"}),(0,ee.jsx)("button",{className:"agent-client-session-history-debug-button",onClick:d,children:"Fork"})]}),(0,ee.jsx)("hr",{className:"agent-client-session-history-debug-separator"})]})}function o6({session:e,canRestore:t,canFork:n,currentCwd:r,onRestoreSession:i,onForkSession:o,onDeleteSession:a,onEditTitle:s,onClose:c}){var p;let d=ui(()=>{c(),i(e.sessionId,e.cwd)},[e,i,c]),m=ui(()=>{c(),o(e.sessionId,e.cwd)},[e,o,c]),l=ui(()=>{a(e.sessionId)},[e.sessionId,a]),f=ui(()=>{s(e.sessionId)},[e.sessionId,s]);return(0,ee.jsxs)("div",{className:"agent-client-session-history-item",children:[(0,ee.jsxs)("div",{className:"agent-client-session-history-item-content",children:[(0,ee.jsx)("div",{className:"agent-client-session-history-item-title",children:(0,ee.jsx)("span",{children:i6((p=e.title)!=null?p:"Untitled Session")})}),(0,ee.jsxs)("div",{className:"agent-client-session-history-item-metadata",children:[e.updatedAt&&(0,ee.jsx)("span",{className:"agent-client-session-history-item-timestamp",children:n6(new Date(e.updatedAt))}),e.cwd!==r&&(0,ee.jsx)("span",{className:"agent-client-session-history-item-cwd",title:e.cwd,children:e.cwd})]})]}),(0,ee.jsxs)("div",{className:"agent-client-session-history-item-actions",children:[(0,ee.jsx)(Dd,{iconName:"pencil",label:"Edit session title",className:"agent-client-session-history-action-icon agent-client-session-history-edit-icon",onClick:f}),t&&(0,ee.jsx)(Dd,{iconName:"play",label:"Restore session",className:"agent-client-session-history-action-icon agent-client-session-history-restore-icon",onClick:d}),n&&(0,ee.jsx)(Dd,{iconName:"git-branch",label:"Fork session (create new branch)",className:"agent-client-session-history-action-icon agent-client-session-history-fork-icon",onClick:m}),(0,ee.jsx)(Dd,{iconName:"trash-2",label:"Delete session",className:"agent-client-session-history-action-icon agent-client-session-history-delete-icon",onClick:l})]})]})}function a6({app:e,sessions:t,loading:n,error:r,hasMore:i,currentCwd:o,canList:a,canRestore:s,canFork:c,isUsingLocalSessions:d,localSessionIds:m,isAgentReady:l,debugMode:f,onRestoreSession:p,onForkSession:h,onDeleteSession:y,onEditTitle:x,onLoadMore:S,onFetchSessions:g,onClose:b}){let[v,_]=Rd(!0),[C,E]=Rd(!1),A=ui(w=>{let k=w.target.checked;_(k),g(k?o:void 0)},[o,g]),T=ui(()=>{g(v?o:void 0)},[v,o,g]),M=ui(w=>{var F;let k=t.find(K=>K.sessionId===w),N=(F=k==null?void 0:k.title)!=null?F:"Untitled Session";new Rv(e,N,()=>{y(w)}).open()},[e,t,y]),P=ui(w=>{var K,ne;let k=t.find(ue=>ue.sessionId===w),N=(K=k==null?void 0:k.title)!=null?K:"Untitled Session",j=(ne=k==null?void 0:k.cwd)!=null?ne:o;new Uv(e,N,ue=>{x(w,ue,j)}).open()},[e,t,o,x]),V=qi.useMemo(()=>d||!C?t:t.filter(w=>m.has(w.sessionId)),[t,d,C,m]);if(!l)return(0,ee.jsx)("div",{className:"agent-client-session-history-loading",children:(0,ee.jsx)("p",{children:"Preparing agent..."})});let O=s||c,L=a||d||!O;return(0,ee.jsxs)(ee.Fragment,{children:[f&&(0,ee.jsx)(r6,{currentCwd:o,onRestoreSession:p,onForkSession:h,onClose:b}),!O&&(0,ee.jsx)("div",{className:"agent-client-session-history-warning-banner",children:(0,ee.jsx)("p",{children:"This agent does not support session restoration."})}),(d||!O)&&(0,ee.jsx)("div",{className:"agent-client-session-history-local-banner",children:(0,ee.jsx)("span",{children:"These sessions are saved in the plugin."})}),!L&&!f&&(0,ee.jsxs)("div",{className:"agent-client-session-history-empty",children:[(0,ee.jsx)("p",{className:"agent-client-session-history-empty-text",children:"Session list is not available for this agent."}),(0,ee.jsx)("p",{className:"agent-client-session-history-empty-text",children:"Enable Debug Mode in settings to manually enter session IDs."})]}),L&&(0,ee.jsxs)(ee.Fragment,{children:[a&&!d&&(0,ee.jsxs)("div",{className:"agent-client-session-history-filter",children:[(0,ee.jsxs)("label",{className:"agent-client-session-history-filter-label",children:[(0,ee.jsx)("input",{type:"checkbox",checked:v,onChange:A}),(0,ee.jsx)("span",{children:"Show current vault only"})]}),(0,ee.jsxs)("label",{className:"agent-client-session-history-filter-label",children:[(0,ee.jsx)("input",{type:"checkbox",checked:C,onChange:w=>E(w.target.checked)}),(0,ee.jsx)("span",{children:"Hide sessions without local data"})]})]}),r&&(0,ee.jsxs)("div",{className:"agent-client-session-history-error",children:[(0,ee.jsx)("p",{className:"agent-client-session-history-error-text",children:r}),(0,ee.jsx)("button",{className:"agent-client-session-history-retry-button",onClick:T,children:"Retry"})]}),!r&&n&&V.length===0&&(0,ee.jsx)("div",{className:"agent-client-session-history-loading",children:(0,ee.jsx)("p",{children:"Loading sessions..."})}),!r&&!n&&V.length===0&&(0,ee.jsx)("div",{className:"agent-client-session-history-empty",children:(0,ee.jsx)("p",{className:"agent-client-session-history-empty-text",children:"No previous sessions"})}),!r&&V.length>0&&(0,ee.jsx)("div",{className:"agent-client-session-history-list",children:V.map(w=>(0,ee.jsx)(o6,{session:w,canRestore:s,canFork:c,currentCwd:o,onRestoreSession:p,onForkSession:h,onDeleteSession:M,onEditTitle:P,onClose:b},w.sessionId))}),!r&&i&&(0,ee.jsx)("div",{className:"agent-client-session-history-load-more",children:(0,ee.jsx)("button",{className:"agent-client-session-history-load-more-button",disabled:n,onClick:S,children:n?"Loading...":"Load more"})})]})]})}var Ud=class extends Na.Modal{constructor(n,r){super(n);this.root=null;this.props=r}updateProps(n){this.props=n,this.renderContent()}onOpen(){let{contentEl:n}=this;n.empty(),n.createEl("h2",{text:"Session history"});let r=n.createDiv();this.root=(0,QT.createRoot)(r),this.renderContent()}renderContent(){this.root&&this.root.render(qi.createElement(a6,{...this.props,app:this.app,onClose:()=>this.close()}))}onClose(){this.root&&(this.root.unmount(),this.root=null);let{contentEl:n}=this;n.empty()}};function eI(e,t,n,r,i,o,a){let s=Ne(),c=(0,Un.useRef)(null),d=(0,Un.useCallback)(async(x,S)=>{try{s.log(`[ChatPanel] Restoring session: ${x}`),t.clearMessages(),await n.restoreSession(x,S),a==null||a(S),new Vi.Notice("[Agent Client] Session restored")}catch(g){new Vi.Notice("[Agent Client] Failed to restore session"),s.error("Session restore error:",g)}},[s,t.clearMessages,n.restoreSession,a]),m=(0,Un.useCallback)(async(x,S)=>{try{s.log(`[ChatPanel] Forking session: ${x}`),t.clearMessages(),await n.forkSession(x,S),a==null||a(S),new Vi.Notice("[Agent Client] Session forked")}catch(g){new Vi.Notice("[Agent Client] Failed to fork session"),s.error("Session fork error:",g)}},[s,t.clearMessages,n.forkSession,a]),l=(0,Un.useCallback)(async x=>{try{s.log(`[ChatPanel] Deleting session: ${x}`),await n.deleteSession(x),new Vi.Notice("[Agent Client] Session deleted")}catch(S){new Vi.Notice("[Agent Client] Failed to delete session"),s.error("Session delete error:",S)}},[n.deleteSession,s]),f=(0,Un.useCallback)(async(x,S,g)=>{try{await n.updateSessionTitle(x,S,g),new Vi.Notice("[Agent Client] Title updated")}catch(b){new Vi.Notice("[Agent Client] Failed to update title"),s.error("Title update error:",b)}},[n.updateSessionTitle,s]),p=(0,Un.useCallback)(()=>{n.loadMoreSessions()},[n.loadMoreSessions]),h=(0,Un.useCallback)(x=>{n.fetchSessions(x)},[n.fetchSessions]),y=(0,Un.useCallback)(()=>{c.current||(c.current=new Ud(e.app,{sessions:n.sessions,loading:n.loading,error:n.error,hasMore:n.hasMore,currentCwd:r,canList:n.canList,canRestore:n.canRestore,canFork:n.canFork,isUsingLocalSessions:n.isUsingLocalSessions,localSessionIds:n.localSessionIds,isAgentReady:i,debugMode:o,onRestoreSession:d,onForkSession:m,onDeleteSession:l,onEditTitle:f,onLoadMore:p,onFetchSessions:h})),c.current.open(),n.fetchSessions(r)},[e.app,n.sessions,n.loading,n.error,n.hasMore,n.canList,n.canRestore,n.canFork,n.isUsingLocalSessions,n.localSessionIds,n.fetchSessions,r,i,o,d,m,l,f,p,h]);return(0,Un.useEffect)(()=>{c.current&&c.current.updateProps({sessions:n.sessions,loading:n.loading,error:n.error,hasMore:n.hasMore,currentCwd:r,canList:n.canList,canRestore:n.canRestore,canFork:n.canFork,isUsingLocalSessions:n.isUsingLocalSessions,localSessionIds:n.localSessionIds,isAgentReady:i,debugMode:o,onRestoreSession:d,onForkSession:m,onDeleteSession:l,onEditTitle:f,onLoadMore:p,onFetchSessions:h})},[n.sessions,n.loading,n.error,n.hasMore,n.canList,n.canRestore,n.canFork,n.isUsingLocalSessions,r,i,o,d,m,l,f,p,h]),{handleOpenHistory:y}}var Tt=G(Ce()),Xn=require("obsidian");var Dl=require("obsidian"),Rl=class{constructor(t){this.plugin=t;this.logger=Ne()}async exportToMarkdown(t,n,r,i,o,a=!0){let s=this.plugin.settings.exportSettings,c=t.length>0?t[0].timestamp:o,d=this.generateFileName(c),m=s.defaultFolder||"Agent Client";await this.ensureFolderExists(m);let l=this.resolveExportFilePath(m,d,i);try{let f=this.generateFrontmatter(n,r,i,c),p=await this.convertMessagesToMarkdown(t,n,l),h=`${f}
|
|
|
|
${p}`,y=this.plugin.app.vault.getAbstractFileByPath(l),x;return y instanceof Dl.TFile?(await this.plugin.app.vault.modify(y,h),x=y):x=await this.plugin.app.vault.create(l,h),a&&await this.plugin.app.workspace.getLeaf(!1).openFile(x),this.logger.log(`Chat exported to: ${l}`),l}catch(f){throw this.logger.error("Export error:",f),f}}async ensureFolderExists(t){this.plugin.app.vault.getAbstractFileByPath(t)||await this.plugin.app.vault.createFolder(t)}getSessionIdFromFile(t){var i;let n=this.plugin.app.metadataCache.getFileCache(t),r=(i=n==null?void 0:n.frontmatter)==null?void 0:i.session_id;return r!=null?r:null}resolveExportFilePath(t,n,r){let i=`${t}/${n}.md`,o=this.plugin.app.vault.getAbstractFileByPath(i);if(!(o instanceof Dl.TFile)||this.getSessionIdFromFile(o)===r)return i;for(let s=2;s<=100;s++){let c=`${t}/${n}_${s}.md`,d=this.plugin.app.vault.getAbstractFileByPath(c);if(!(d instanceof Dl.TFile)||this.getSessionIdFromFile(d)===r)return c}return this.logger.warn(`Too many export files with same base name: ${n}`),`${t}/${n}_101.md`}generateFileName(t){let r=this.plugin.settings.exportSettings.filenameTemplate||"agent_client_{date}_{time}",i=t.getFullYear(),o=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0"),s=`${i}${o}${a}`,c=String(t.getHours()).padStart(2,"0"),d=String(t.getMinutes()).padStart(2,"0"),m=String(t.getSeconds()).padStart(2,"0"),l=`${c}${d}${m}`;return r.replace("{date}",s).replace("{time}",l)}generateFrontmatter(t,n,r,i){let o=this.plugin.settings.exportSettings,a=i.getFullYear(),s=String(i.getMonth()+1).padStart(2,"0"),c=String(i.getDate()).padStart(2,"0"),d=String(i.getHours()).padStart(2,"0"),m=String(i.getMinutes()).padStart(2,"0"),l=String(i.getSeconds()).padStart(2,"0"),f=`${a}-${s}-${c}T${d}:${m}:${l}`,p=o.frontmatterTag.trim()?`
|
|
tags: [${o.frontmatterTag.trim()}]`:"";return`---
|
|
created: ${f}
|
|
agentDisplayName: ${t}
|
|
agentId: ${n}
|
|
session_id: ${r}${p}
|
|
---`}async convertMessagesToMarkdown(t,n,r){let i=this.plugin.settings.exportSettings,o={exportFilePath:r,imageIndex:0,includeImages:i.includeImages,imageLocation:i.imageLocation,imageCustomFolder:i.imageCustomFolder},a=`# ${n}
|
|
|
|
`;for(let s of t){let c=s.timestamp.toLocaleTimeString(),d=s.role==="user"?"User":"Assistant";a+=`## ${c} - ${d}
|
|
|
|
`;for(let m of s.content)a+=await this.convertContentToMarkdown(m,o);a+=`
|
|
---
|
|
|
|
`}return a}async convertContentToMarkdown(t,n){switch(t.type){case"text":return t.text+`
|
|
|
|
`;case"text_with_context":{let r="";if(t.autoMentionContext){let{noteName:i,selection:o}=t.autoMentionContext;o?r+=`@[[${i}]]:${o.fromLine}-${o.toLine}
|
|
`:r+=`@[[${i}]]
|
|
`}return r+=t.text+`
|
|
|
|
`,r}case"agent_thought":return`> [!info]- Thinking
|
|
> ${t.text.split(`
|
|
`).join(`
|
|
> `)}
|
|
|
|
`;case"tool_call":return this.convertToolCallToMarkdown(t);case"terminal":return`### \u{1F5A5}\uFE0F Terminal: ${t.terminalId.slice(0,8)}
|
|
|
|
`;case"plan":return this.convertPlanToMarkdown(t);case"permission_request":return this.convertPermissionRequestToMarkdown(t);case"resource_link":return`[${t.name}](${t.uri})
|
|
|
|
`;case"image":if(!n.includeImages)return"";if(t.uri)return`
|
|
|
|
`;if(n.imageLocation==="base64")return`
|
|
|
|
`;try{return n.imageIndex++,`![[${(await this.saveImageAsAttachment(t.data,t.mimeType,n.exportFilePath,n.imageIndex,n.imageLocation,n.imageCustomFolder)).split("/").pop()}]]
|
|
|
|
`}catch(r){return this.logger.error(`Failed to save image as attachment: ${r}`),`
|
|
|
|
`}default:return""}}convertToolCallToMarkdown(t){let n=`### \u{1F527} ${t.title||"Tool"}
|
|
|
|
`;if(t.locations&&t.locations.length>0){let r=t.locations.map(i=>i.line!=null?`\`${i.path}:${i.line}\``:`\`${i.path}\``);n+=`**Locations**: ${r.join(", ")}
|
|
|
|
`}if(n+=`**Status**: ${t.status}
|
|
|
|
`,t.content&&t.content.length>0)for(let r of t.content)r.type==="diff"&&(n+=this.convertDiffToMarkdown(r));return n}convertDiffToMarkdown(t){let n=`**File**: \`${t.path}\`
|
|
|
|
`;if(t.oldText===null||t.oldText===void 0||t.oldText==="")return n+="```diff\n",t.newText.split(`
|
|
`).forEach(o=>{n+=`+ ${o}
|
|
`}),n+="```\n\n",n;let r=t.oldText.split(`
|
|
`),i=t.newText.split(`
|
|
`);return n+="```diff\n",r.forEach(o=>{n+=`- ${o}
|
|
`}),i.forEach(o=>{n+=`+ ${o}
|
|
`}),n+="```\n\n",n}convertPlanToMarkdown(t){let n=`> [!plan] Plan
|
|
`;for(let r of t.entries){let i=r.status==="completed"?"\u2705":r.status==="in_progress"?"\u{1F504}":"\u23F3";n+=`> ${i} ${r.content}
|
|
`}return n+=`
|
|
`,n}convertPermissionRequestToMarkdown(t){let n=t.isCancelled?"Cancelled":"Requested";return`### \u26A0\uFE0F Permission: ${t.toolCall.title||"Unknown"} (${n})
|
|
|
|
`}async saveImageAsAttachment(t,n,r,i,o,a){let s=this.getExtensionFromMimeType(n),m=`${r.replace(/\.md$/,"").split("/").pop()||"image"}_${String(i).padStart(3,"0")}.${s}`,l;if(o==="custom"){let p=a||"Agent Client";if(await this.ensureFolderExists(p),l=`${p}/${m}`,this.plugin.app.vault.getAbstractFileByPath(l)instanceof Dl.TFile)return this.logger.log(`Image already exists, skipping: ${l}`),l}else if(l=await this.plugin.app.fileManager.getAvailablePathForAttachment(m,r),!l.endsWith(m)){let p=l.replace(/ \d+(\.[^.]+)$/,"$1");return this.logger.log(`Image already exists, skipping: ${p}`),p}let f=this.base64ToArrayBuffer(t);return await this.plugin.app.vault.createBinary(l,f),this.logger.log(`Image saved as attachment: ${l}`),l}getExtensionFromMimeType(t){return{"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/webp":"webp"}[t]||"png"}base64ToArrayBuffer(t){let n=atob(t),r=new Uint8Array(n.length);for(let i=0;i<n.length;i++)r[i]=n.charCodeAt(i);return r.buffer}};var Zd=require("child_process"),rI=require("obsidian");var Pv=require("child_process"),go=require("obsidian");function tI(e){let t=e.replace(/%/g,"%%").replace(/"/g,'""');return/[\s&()<>|^]/.test(e)?`"${t}"`:t}function jv(){return process.env.SHELL?process.env.SHELL:go.Platform.isMacOS?"/bin/zsh":"/bin/sh"}function Lv(e){return`'${e.replace(/'/g,"'\\''")}'`}var Pd=null;function s6(){if(!go.Platform.isWin)return null;if(Pd!==null)return Pd;try{let e=(0,Pv.execSync)('reg query "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment" /v Path',{encoding:"utf8",windowsHide:!0}),t=(0,Pv.execSync)('reg query "HKCU\\Environment" /v Path',{encoding:"utf8",windowsHide:!0}),n=nI(e),r=nI(t),i=[];return r&&i.push(r),n&&i.push(n),Pd=i.join(";"),Pd}catch(e){return null}}function nI(e){let t=e.split(`
|
|
`);for(let n of t){let r=n.trim();if(r.toLowerCase().startsWith("path")){let i=r.match(/Path\s+REG_(?:EXPAND_)?SZ\s+(.+)/i);if(i)return i[1].trim()}}return null}function Ld(e){if(!go.Platform.isWin)return e;let t=s6();if(!t)return e;let r=(e.PATH||"").split(";").filter(a=>a.length>0),i=t.split(";").filter(a=>a.length>0),o=[...r];for(let a of i)o.some(s=>s.toLowerCase()===a.toLowerCase())||o.push(a);return{...e,PATH:o.join(";")}}function Pn(e){let n=e.replace(/\\/g,"/").match(/^([A-Za-z]):(\/.*)/);if(n){let r=n[1].toLowerCase(),i=n[2];return`/mnt/${r}${i}`}return e}function iI(e){let t=e.match(/^\/mnt\/([a-zA-Z])\/(.*)/);if(t){let n=t[1].toUpperCase(),r=t[2].replace(/\//g,"\\");return`${n}:\\${r}`}return e}function Zv(e){let t=e.replace(/'/g,"'\\''");return`. ~/.profile 2>/dev/null; case \${SHELL:-/bin/sh} in */fish|*/elvish|*/nushell|*/xonsh) exec /bin/sh -l -c '${t}';; *) exec \${SHELL:-/bin/sh} -l -c '${t}';; esac`}function l6(e,t,n,r,i){if(/^\\\\/.test(n))throw new Error(`UNC paths are not supported in WSL mode: ${n}. Please use a local drive path.`);let o=Pn(n);if(o===n&&/^[A-Za-z]:[\\/]/.test(n))throw new Error(`Failed to convert Windows path to WSL format: ${n}`);let a=[];if(r){if(!/^[a-zA-Z0-9._-]+$/.test(r))throw new Error(`Invalid WSL distribution name: ${r}`);a.push("-d",r)}let s=t.map(Lv).join(" "),c=s.length>0?` ${s}`:"",d="";if(i){let l=Pn(i);d=`export PATH="${c6(l)}:$PATH"; `}let m=`${d}cd ${Lv(o)} && ${e}${c}`;return a.push("sh","-c",Zv(m)),{command:"C:\\Windows\\System32\\wsl.exe",args:a}}function c6(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function jd(e,t,n,r){var o;let i=(o=r.alwaysEscape)!=null?o:!0;if(go.Platform.isWin&&r.wslMode){let a=l6(e,t,n,r.wslDistribution,r.nodeDir);return{command:a.command,args:a.args,needsShell:!1}}if(go.Platform.isMacOS||go.Platform.isLinux){let a=jv(),s;return t.length>0||i?s=[e,...t].map(Lv).join(" "):s=e,r.nodeDir&&(s=`export PATH='${r.nodeDir.replace(/'/g,"'\\''")}':"$PATH"; ${s}`),{command:a,args:["-l","-c",s],needsShell:!1}}return t.length>0||i?{command:tI(e),args:t.map(tI),needsShell:!0}:{command:e,args:t,needsShell:!0}}function Ul(e){return e.startsWith("/")||/^[A-Za-z]:[\\/]/.test(e)}function oI(e){if(!e||e.trim().length===0)return Promise.resolve(null);let t=e.trim();return Ul(t)?Promise.resolve(t):new Promise(n=>{if(rI.Platform.isWin)(0,Zd.execFile)("where",[t],{timeout:5e3,windowsHide:!0},(r,i)=>{if(r){n(null);return}let o=i.split(`
|
|
`)[0].trim();n(o.length>0?o:null)});else{let r=jv(),i=t.replace(/'/g,"'\\''");(0,Zd.execFile)(r,["-l","-c",`which '${i}'`],{timeout:5e3},(o,a)=>{if(o){n(null);return}let s=a.split(`
|
|
`)[0].trim();n(s.length>0?s:null)})}})}function aI(e,t){if(!e||e.trim().length===0)return Promise.resolve(null);let n=e.trim();return Ul(n)?Promise.resolve(n):new Promise(r=>{let i=n.replace(/'/g,"'\\''"),o=[];t&&o.push("-d",t);let a=`which '${i}'`;o.push("sh","-c",Zv(a)),(0,Zd.execFile)("C:\\Windows\\System32\\wsl.exe",o,{timeout:5e3},(s,c)=>{if(s){r(null);return}let d=c.split(`
|
|
`)[0].trim();r(d.length>0?d:null)})})}function u6(e){if(!e)return null;let t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"));return t<=0?null:e.slice(0,t)}function qd(e){if(!e)return;let t=e.trim();if(Ul(t))return u6(t)||void 0}function sI(e,t){let n=t.replace(/\/+$/,""),r=e.replace(/\/+$/,"");return r.startsWith(n+"/")?r.slice(n.length+1):e}function Pl(e){let t=e.replace(/\\/g,"/");return/^[A-Za-z]:/.test(t)?`file:///${t}`:`file://${t}`}function lI(e,t,n,r,i,o,a,s){let c=Ne(),[d,m]=(0,Tt.useState)(null),[l,f]=(0,Tt.useState)(null),p=(0,Tt.useCallback)(async(P,V,O)=>{if((P==="newChat"?e.settings.exportSettings.autoExportOnNewChat:e.settings.exportSettings.autoExportOnCloseChat)&&V.length!==0&&O.sessionId)try{let w=new Rl(e),k=e.settings.exportSettings.openFileAfterExport,N=await w.exportToMarkdown(V,O.agentDisplayName,O.agentId,O.sessionId,O.createdAt,k);if(N){let j=P==="newChat"?"new session":"closing chat";new Xn.Notice(`[Agent Client] Chat exported to ${N}`),c.log(`Chat auto-exported before ${j}`)}}catch(w){new Xn.Notice("[Agent Client] Failed to export chat")}},[e,c]),h=Xn.Platform.isWin&&a.windowsWslMode,y=(0,Tt.useCallback)(async(P,V)=>{var k,N;t.clearError(),f(null);let O=o.length===0,L=[],w=[];if(V){for(let j of V)if(j.kind==="image"&&j.data)L.push({type:"image",data:j.data,mimeType:j.mimeType});else if(j.kind==="file"&&j.path){let F=j.path;h&&(F=Pn(F)),w.push({type:"resource_link",uri:Pl(F),name:(N=(k=j.name)!=null?k:j.path.split("/").pop())!=null?N:"file",mimeType:j.mimeType||void 0,size:j.size})}}await t.sendMessage(P,{activeNote:a.autoMentionActiveNote?r.mentions.activeNote:null,vaultBasePath:s,isAutoMentionDisabled:r.mentions.isAutoMentionDisabled,images:L.length>0?L:void 0,resourceLinks:w.length>0?w:void 0}),O&&i.sessionId&&(await n.saveSessionLocally(i.sessionId,P),c.log(`[ChatPanel] Session saved locally: ${i.sessionId}`))},[t.clearError,t.sendMessage,o.length,i.sessionId,n.saveSessionLocally,c,a.autoMentionActiveNote,r.mentions.activeNote,r.mentions.isAutoMentionDisabled,h,s]),x=(0,Tt.useCallback)(async()=>{c.log("Cancelling current operation...");let P=t.lastUserMessage;await t.cancelOperation(),P&&m(P)},[c,t.cancelOperation,t.lastUserMessage]),S=(0,Tt.useCallback)(async P=>{let V=P&&P!==i.agentId;if(o.length===0&&!V){new Xn.Notice("[Agent Client] Already a new session");return}t.isSending&&await t.cancelOperation(),c.log(`[Debug] Creating new session${V?` with agent: ${P}`:""}...`),o.length>0&&await p("newChat",o,i),r.mentions.toggleAutoMention(!1),t.clearMessages();let O=V?P:i.agentId;await t.restartSession(O),n.invalidateCache()},[o,i,c,p,t.isSending,t.cancelOperation,t.clearMessages,t.restartSession,r.mentions.toggleAutoMention,n.invalidateCache]),g=(0,Tt.useCallback)(async()=>{if(o.length===0){new Xn.Notice("[Agent Client] No messages to export");return}try{let P=new Rl(e),V=e.settings.exportSettings.openFileAfterExport,O=await P.exportToMarkdown(o,i.agentDisplayName,i.agentId,i.sessionId||"unknown",i.createdAt,V);new Xn.Notice(`[Agent Client] Chat exported to ${O}`)}catch(P){new Xn.Notice("[Agent Client] Failed to export chat"),c.error("Export error:",P)}},[o,i,e,c]),b=(0,Tt.useCallback)(async P=>{P!==i.agentId&&await S(P)},[i.agentId,S]),v=(0,Tt.useCallback)(async()=>{c.log("[ChatPanel] Restarting agent process..."),o.length>0&&await p("newChat",o,i),t.clearMessages();try{await t.forceRestartAgent(),new Xn.Notice("[Agent Client] Agent restarted")}catch(P){new Xn.Notice("[Agent Client] Failed to restart agent"),c.error("Restart error:",P)}},[c,o,i,p,t.clearMessages,t.forceRestartAgent]),_=(0,Tt.useCallback)(async P=>{await t.setMode(P)},[t.setMode]),C=(0,Tt.useCallback)(async P=>{await t.setModel(P)},[t.setModel]),E=(0,Tt.useCallback)(async(P,V)=>{await t.setConfigOption(P,V)},[t.setConfigOption]),A=(0,Tt.useCallback)(()=>{t.clearError()},[t.clearError]),T=(0,Tt.useCallback)(()=>{f(null)},[]),M=(0,Tt.useCallback)(()=>{m(null)},[]);return{handleSendMessage:y,handleStopGeneration:x,handleNewChat:S,handleExportChat:g,handleSwitchAgent:b,handleRestartAgent:v,handleSetMode:_,handleSetModel:C,handleSetConfigOption:E,handleClearError:A,handleClearAgentUpdate:T,handleRestoredMessageConsumed:M,restoredMessage:d,agentUpdateNotification:l,setAgentUpdateNotification:f,autoExportIfEnabled:p}}var cI=require("obsidian"),Ll=class extends cI.Modal{constructor(n,r,i){super(n);this.currentPath=r,this.onSelect=i}onOpen(){let{contentEl:n}=this;n.empty(),n.createEl("h2",{text:"New chat in directory"}),n.createEl("p",{text:"Start a new chat session with the agent working in the specified directory.",cls:"agent-client-change-dir-description"});let r=n.createDiv({cls:"agent-client-change-dir-input-row"}),i=r.createEl("input",{type:"text",cls:"agent-client-change-dir-input",placeholder:"/path/to/directory"});i.value=this.currentPath,r.createEl("button",{text:"Browse..."}).addEventListener("click",()=>{this.openFolderPicker().then(s=>{s&&(i.value=s)})}),setTimeout(()=>{i.focus(),i.select()},10),i.addEventListener("keydown",s=>{s.key==="Enter"&&(s.preventDefault(),this.selectAndClose(i.value))});let a=n.createDiv({cls:"agent-client-change-dir-buttons"});a.createEl("button",{text:"Cancel"}).addEventListener("click",()=>{this.close()}),a.createEl("button",{text:"Start",cls:"mod-cta"}).addEventListener("click",()=>{this.selectAndClose(i.value)})}async openFolderPicker(){try{let{remote:n}=require("electron"),r=await n.dialog.showOpenDialog({properties:["openDirectory"],title:"Select working directory",defaultPath:this.currentPath});if(!r.canceled&&r.filePaths.length>0)return r.filePaths[0]}catch(n){}return null}selectAndClose(n){let r=n.trim();r&&(this.close(),this.onSelect(r))}onClose(){let{contentEl:n}=this;n.empty()}};var uI=G(Ce());function Tr(e){return(0,uI.useSyncExternalStore)(e.settingsService.subscribe,e.settingsService.getSnapshot,e.settingsService.getSnapshot)}var Xe=G(Ce());function dI(e,t){let n=Ne();if(t<0||t>e.length)return n.log("[detectMention] Invalid cursor position:",t),null;let r=e.slice(0,t),i=r.lastIndexOf("@");if(i===-1)return null;let o=r.slice(i+1),a="",s=t;if(o.startsWith("[[")){let d=o.indexOf("]]");if(d===-1)a=o.slice(2),s=t;else{let m=i+1+d+1;if(t>m)return null;a=o.slice(2,d),s=m+1}}else{if(o.includes(" ")||o.includes(" ")||o.includes(`
|
|
`))return null;a=o,s=t}let c={start:i,end:s,query:a};return n.log("[detectMention] Mention context:",c),c}function fI(e,t,n){let r=e.slice(0,t.start),i=e.slice(t.end),o=` @[[${n}]] `,a=r+o+i,s=t.start+o.length;return{newText:a,newCursorPos:s}}function mI(e,t){let n=/@\[\[([^\]]+)\]\]/g,r=Array.from(e.matchAll(n)),i=[],o=new Set;for(let a of r){let s=a[1];if(o.has(s))continue;o.add(s);let c=t.getAllFiles().find(d=>d.basename===s);i.push({noteTitle:s,file:c})}return i}function pI(e,t,n){let[r,i]=(0,Xe.useState)([]),[o,a]=(0,Xe.useState)(0),[s,c]=(0,Xe.useState)(null),[d,m]=(0,Xe.useState)(null),[l,f]=(0,Xe.useState)(!1),p=r.length>0&&s!==null,[h,y]=(0,Xe.useState)([]),[x,S]=(0,Xe.useState)(0),g=h.length>0,b=(0,Xe.useCallback)(w=>{f(w===void 0?k=>!k:w)},[]),v=(0,Xe.useCallback)(async(w,k)=>{let N=dI(w,k);if(!N){i([]),a(0),c(null);return}let j=await e.searchNotes(N.query);i(j),a(0),c(N)},[e,t]),_=(0,Xe.useCallback)((w,k)=>{if(!s)return w;let{newText:N}=fI(w,s,k.name);return i([]),a(0),c(null),N},[s]),C=(0,Xe.useCallback)(w=>{if(!p)return;let k=r.length-1;a(N=>w==="down"?Math.min(N+1,k):Math.max(N-1,0))},[p,r.length]),E=(0,Xe.useCallback)(()=>{i([]),a(0),c(null)},[]),A=(0,Xe.useCallback)(async()=>{let w=await e.getActiveNote();m(w)},[e]),T=(0,Xe.useCallback)((w,k)=>{let N=h.length>0;if(!w.startsWith("/")){N&&b(!1),y([]),S(0);return}let F=w.slice(0,k).slice(1);if(F.includes(" ")){y([]),S(0),b(!0);return}let K=F.toLowerCase(),ne=n.filter(ue=>ue.name.toLowerCase().includes(K));y(ne),S(0),b(!0)},[n,b,h.length]),M=(0,Xe.useCallback)((w,k)=>{let N=`/${k.name} `;return y([]),S(0),N},[]),P=(0,Xe.useCallback)(w=>{if(h.length===0)return;let k=h.length-1;S(N=>w==="down"?Math.min(N+1,k):Math.max(N-1,0))},[h.length]),V=(0,Xe.useCallback)(()=>{y([]),S(0)},[]),O=(0,Xe.useMemo)(()=>({suggestions:r,selectedIndex:o,isOpen:p,context:s,updateSuggestions:v,selectSuggestion:_,navigate:C,close:E,activeNote:d,isAutoMentionDisabled:l,toggleAutoMention:b,updateActiveNote:A}),[r,o,p,s,v,_,C,E,d,l,b,A]),L=(0,Xe.useMemo)(()=>({suggestions:h,selectedIndex:x,isOpen:g,updateSuggestions:T,selectSuggestion:M,navigate:P,close:V}),[h,x,g,T,M,P,V]);return(0,Xe.useMemo)(()=>({mentions:O,commands:L}),[O,L])}var A6=G(Ce());var d6=G(Ce());var jl=e=>{if(e==null)return null;let t=(()=>{if(typeof e=="number")return e;if(typeof e=="string"){let n=e.trim();return n.length===0||!/^-?\d+$/.test(n)?Number.NaN:Number.parseInt(n,10)}return Number.NaN})();return Number.isFinite(t)?Math.min(30,Math.max(10,Math.round(t))):null},Oa=e=>Array.isArray(e)?e.map(t=>typeof t=="string"?t.trim():"").filter(t=>t.length>0):typeof e=="string"?e.split(/\r?\n/).map(t=>t.trim()).filter(t=>t.length>0):[],ho=e=>{let t=[];if(!e)return t;if(Array.isArray(e)){for(let r of e)if(r&&typeof r=="object"){let i=r,o="key"in i?i.key:void 0,a="value"in i?i.value:void 0;typeof o=="string"&&o.trim().length>0&&t.push({key:o.trim(),value:typeof a=="string"?a:""})}}else if(typeof e=="object")for(let[r,i]of Object.entries(e))typeof r=="string"&&r.trim().length>0&&t.push({key:r.trim(),value:typeof i=="string"?i:""});let n=new Set;return t.filter(r=>n.has(r.key)?!1:(n.add(r.key),!0))},gI=e=>{let t=e&&typeof e.id=="string"&&e.id.trim().length>0?e.id.trim():"custom-agent",n=e&&typeof e.displayName=="string"&&e.displayName.trim().length>0?e.displayName.trim():t;return{id:t,displayName:n,command:e&&typeof e.command=="string"&&e.command.trim().length>0?e.command.trim():"",args:Oa(e==null?void 0:e.args),env:ho(e==null?void 0:e.env)}},hI=e=>{let t=new Set;return e.map(n=>{let r=n.id&&n.id.trim().length>0?n.id.trim():"custom-agent",i=r,o=2;for(;t.has(i);)i=`${r}-${o}`,o+=1;return t.add(i),{...n,id:i}})},vI=(e,t)=>{let n=e.env.reduce((r,{key:i,value:o})=>(r[i]=o,r),{});return{id:e.id,displayName:e.displayName,command:e.command,args:e.args,env:n,workingDirectory:t}};function tt(e,t){return typeof e=="string"?e:t}function en(e,t){return typeof e=="boolean"?e:t}function Vd(e,t,n){return typeof e!="number"||n!==void 0&&e<n?t:e}function Fd(e,t,n){return t.includes(e)?e:n}function di(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function qv(e){let t={},n=di(e);if(!n)return t;for(let[r,i]of Object.entries(n))typeof r=="string"&&r.length>0&&typeof i=="string"&&i.length>0&&(t[r]=i);return t}function Vv(e){let t=di(e);return!t||typeof t.x!="number"||typeof t.y!="number"?null:{x:t.x,y:t.y}}function Hd(e){return e.defaultAgentId||e.claude.id}function Fv(e){return[{id:e.claude.id,displayName:e.claude.displayName||e.claude.id},{id:e.codex.id,displayName:e.codex.displayName||e.codex.id},{id:e.gemini.id,displayName:e.gemini.displayName||e.gemini.id},...e.customAgents.map(t=>({id:t.id,displayName:t.displayName||t.id}))]}function Hv(e,t){let n=t||Hd(e);return Fv(e).find(i=>i.id===n)||{id:n,displayName:n}}function yI(e,t){return t===e.claude.id?e.claude:t===e.codex.id?e.codex:t===e.gemini.id?e.gemini:e.customAgents.find(r=>r.id===t)||null}function SI(e,t,n,r){let i=vI(t,r);if(n===e.claude.id){let o=t;return{...i,env:{...i.env,ANTHROPIC_API_KEY:o.apiKey}}}if(n===e.codex.id){let o=t;return{...i,env:{...i.env,OPENAI_API_KEY:o.apiKey}}}if(n===e.gemini.id){let o=t;return{...i,env:{...i.env,GEMINI_API_KEY:o.apiKey}}}return i}function bI(e,t,n){return{sessionId:null,state:"disconnected",agentId:e,agentDisplayName:t,authMethods:[],availableCommands:void 0,modes:void 0,models:void 0,createdAt:new Date,lastActivityAt:new Date,workingDirectory:n}}function Ma(e){return e.length===0?[]:"value"in e[0]?e:e.flatMap(t=>t.options)}function Zl(e,t,n){return t==="mode"?e.modes?{...e,modes:{...e.modes,currentModeId:n}}:e:e.models?{...e,models:{...e.models,currentModelId:n}}:e}async function ql(e,t,n,r,i){if(!i)return n;let o=n.find(a=>a.category===r);if(!o||i===o.currentValue||!Ma(o.options).some(a=>a.value===i))return n;try{return await e.setSessionConfigOption(t,o.id,i)}catch(a){return n}}async function Bv(e,t,n,r,i){if(t.sessionId){if(t.models&&n&&n!==t.models.currentModelId&&t.models.availableModels.some(o=>o.modelId===n))try{await e.setSessionModel(t.sessionId,n),i(o=>Zl(o,"model",n))}catch(o){}if(t.modes&&r&&r!==t.modes.currentModeId&&t.modes.availableModes.some(o=>o.id===r))try{await e.setSessionMode(t.sessionId,r),i(o=>Zl(o,"mode",r))}catch(o){}}}var{useState:f6,useCallback:Ln,useRef:m6}=d6;function xI(e,t,n,r,i){let o=t.getSnapshot(),a=i||Hd(o),s=Hv(o,a),[c,d]=f6(()=>bI(a,s.displayName,n)),m=c.state==="ready",l=m6(c);l.current=c;let f=Ln(A=>{switch(A.type){case"available_commands_update":d(T=>({...T,availableCommands:A.commands}));break;case"current_mode_update":d(T=>T.modes?{...T,modes:{...T.modes,currentModeId:A.currentModeId}}:T);break;case"config_option_update":d(T=>({...T,configOptions:A.configOptions}));break;case"usage_update":d(T=>{var M;return{...T,usage:{used:A.used,size:A.size,cost:(M=A.cost)!=null?M:void 0}}});break;case"process_error":d(T=>({...T,state:"error"})),r({title:A.error.title||"Agent Error",message:A.error.message||"An error occurred",suggestion:A.error.suggestion});break}},[r]),p=Ln(async(A,T)=>{let M=T||n,P=t.getSnapshot(),V=A||Hd(P),O=Hv(P,V);d(L=>({...L,sessionId:null,state:"initializing",agentId:V,agentDisplayName:O.displayName,authMethods:[],availableCommands:void 0,modes:void 0,models:void 0,configOptions:void 0,usage:void 0,promptCapabilities:L.promptCapabilities,agentCapabilities:L.agentCapabilities,agentInfo:L.agentInfo,createdAt:new Date,lastActivityAt:new Date})),r(null);try{let L=yI(P,V);if(!L){d(j=>({...j,state:"error"})),r({title:"Agent Not Found",message:`Agent with ID "${V}" not found in settings`,suggestion:"Please check your agent configuration in settings."});return}let w=SI(P,L,V,M),k=!e.isInitialized()||e.getCurrentAgentId()!==V?await e.initialize(w):null,N=await e.newSession(M);if(d(j=>{var F;return{...j,sessionId:N.sessionId,state:"ready",authMethods:(F=k==null?void 0:k.authMethods)!=null?F:[],modes:N.modes,models:N.models,configOptions:N.configOptions,promptCapabilities:k?k.promptCapabilities:j.promptCapabilities,agentCapabilities:k?k.agentCapabilities:j.agentCapabilities,agentInfo:k?k.agentInfo:j.agentInfo,lastActivityAt:new Date}}),N.configOptions&&N.sessionId){let j=N.configOptions;j=await ql(e,N.sessionId,j,"model",P.lastUsedModels[V]),j=await ql(e,N.sessionId,j,"mode",P.lastUsedModes[V]),j!==N.configOptions&&d(F=>({...F,configOptions:j}))}else N.sessionId&&await Bv(e,N,P.lastUsedModels[V],P.lastUsedModes[V],d)}catch(L){d(w=>({...w,state:"error"})),r({title:"Session Creation Failed",message:`Failed to create new session: ${L instanceof Error?L.message:String(L)}`,suggestion:"Please check the agent configuration and try again."})}},[e,t,n,r]),h=Ln(async(A,T)=>{await p(A,T)},[p]),y=Ln(async()=>{let A=l.current;if(A.sessionId)try{await e.cancel(A.sessionId)}catch(T){console.warn("Failed to cancel session:",T)}try{await e.disconnect()}catch(T){console.warn("Failed to disconnect:",T)}d(T=>({...T,sessionId:null,state:"disconnected"}))},[e]),x=Ln(async()=>{let A=l.current.agentId;await e.disconnect(),await p(A)},[e,p]),S=Ln(async()=>{let A=l.current;if(A.sessionId)try{await e.cancel(A.sessionId),d(T=>({...T,state:"ready"}))}catch(T){console.warn("Failed to cancel operation:",T),d(M=>({...M,state:"ready"}))}},[e]),g=Ln(()=>{let A=t.getSnapshot();return Fv(A)},[t]),b=Ln(async(A,T,M,P)=>{d(w=>({...w,sessionId:A,state:"ready",modes:T!=null?T:w.modes,models:M!=null?M:w.models,configOptions:P!=null?P:w.configOptions,lastActivityAt:new Date}));let V=l.current,O=t.getSnapshot(),L=V.agentId;if(P&&A){let w=P;w=await ql(e,A,w,"model",O.lastUsedModels[L]),w=await ql(e,A,w,"mode",O.lastUsedModes[L]),w!==P&&d(k=>({...k,configOptions:w}))}else A&&T&&await Bv(e,{sessionId:A,modes:T,models:M,configOptions:void 0},O.lastUsedModels[L],O.lastUsedModes[L],d)},[e,t]),v=Ln(async(A,T)=>{var V,O;let M=l.current;if(!M.sessionId){console.warn(`Cannot set ${A}: no active session`);return}let P=A==="mode"?(V=M.modes)==null?void 0:V.currentModeId:(O=M.models)==null?void 0:O.currentModelId;d(L=>Zl(L,A,T));try{if(A==="mode"?await e.setSessionMode(M.sessionId,T):await e.setSessionModel(M.sessionId,T),M.agentId){let L=A==="mode"?"lastUsedModes":"lastUsedModels",w=t.getSnapshot();t.updateSettings({[L]:{...w[L],[M.agentId]:T}})}}catch(L){console.error(`Failed to set ${A}:`,L),P&&d(w=>Zl(w,A,P))}},[e,t]),_=Ln(A=>v("mode",A),[v]),C=Ln(A=>v("model",A),[v]),E=Ln(async(A,T)=>{let M=l.current;if(!M.sessionId){console.warn("Cannot set config option: no active session");return}let P=M.configOptions;d(V=>V.configOptions?{...V,configOptions:V.configOptions.map(O=>O.id===A?{...O,currentValue:T}:O)}:V);try{let V=await e.setSessionConfigOption(M.sessionId,A,T);d(L=>({...L,configOptions:V}));let O=V.find(L=>L.id===A);if((O==null?void 0:O.category)==="model"&&M.agentId){let L=t.getSnapshot();t.updateSettings({lastUsedModels:{...L.lastUsedModels,[M.agentId]:T}})}if((O==null?void 0:O.category)==="mode"&&M.agentId){let L=t.getSnapshot();t.updateSettings({lastUsedModes:{...L.lastUsedModes,[M.agentId]:T}})}}catch(V){console.error("Failed to set config option:",V),P&&d(O=>({...O,configOptions:P}))}},[e,t]);return{session:c,isReady:m,createSession:p,restartSession:h,closeSession:y,forceRestartAgent:x,cancelOperation:S,getAvailableAgents:g,updateSessionFromLoad:b,setMode:_,setModel:C,setConfigOption:E,handleSessionUpdate:f}}var C6=G(Ce());var lt={PARSE_ERROR:-32700,INVALID_REQUEST:-32600,METHOD_NOT_FOUND:-32601,INVALID_PARAMS:-32602,INTERNAL_ERROR:-32603,AUTHENTICATION_REQUIRED:-32e3,RESOURCE_NOT_FOUND:-32002};var Gv=require("obsidian");function Vl(e){if(e&&typeof e=="object"&&"code"in e){let t=e.code;if(typeof t=="number")return t}}function Xv(e){if(!e||typeof e!="object")return"An unexpected error occurred.";if("data"in e){let t=e.data;if(t&&typeof t=="object"&&"details"in t){let n=t.details;if(typeof n=="string")return n}}if("message"in e){let t=e.message;if(typeof t=="string")return t}return"An unexpected error occurred."}function p6(e){if(e&&typeof e=="object"&&"data"in e)return e.data}function g6(e){switch(e){case lt.PARSE_ERROR:return"Protocol Error";case lt.INVALID_REQUEST:return"Invalid Request";case lt.METHOD_NOT_FOUND:return"Method Not Supported";case lt.INVALID_PARAMS:return"Invalid Parameters";case lt.INTERNAL_ERROR:return"Internal Error";case lt.AUTHENTICATION_REQUIRED:return"Authentication Required";case lt.RESOURCE_NOT_FOUND:return"Resource Not Found";default:return"Agent Error"}}function h6(e,t){if(e===lt.INTERNAL_ERROR){let n=t.toLowerCase();if(n.includes("context")||n.includes("token")||n.includes("max_tokens")||n.includes("too long"))return"The conversation is too long. Try using a compact command if available, or start a new chat.";if(n.includes("overloaded")||n.includes("capacity"))return"The service is busy. Please wait a moment and try again."}switch(e){case lt.PARSE_ERROR:case lt.INVALID_REQUEST:case lt.METHOD_NOT_FOUND:return"Try restarting the agent session.";case lt.INVALID_PARAMS:return"Check your agent configuration in settings.";case lt.INTERNAL_ERROR:return"Try again or restart the agent session.";case lt.AUTHENTICATION_REQUIRED:return"Check if you are logged in or if your API key is set correctly.";case lt.RESOURCE_NOT_FOUND:return"Check if the file or resource exists.";default:return"Try again or restart the agent session."}}function Bd(e,t){var o;let n=(o=Vl(e))!=null?o:-1,r=Xv(e),i=p6(e);return{code:n,message:r,data:i,sessionId:t,originalError:e,title:g6(n),suggestion:h6(n,r)}}function Gd(e){return Vl(e)!==lt.INTERNAL_ERROR?!1:Xv(e).includes("empty response text")}function _I(e){return e?e.includes("API key is missing")||e.includes("LoadAPIKeyError")?"The agent's API key may be missing. For custom agents, add the required API key (e.g., ANTHROPIC_API_KEY) in the agent's Environment Variables setting.":e.includes("authentication")||e.includes("unauthorized")||e.includes("401")?"The agent reported an authentication error. Check that your API key or credentials are valid.":null:null}function wI(e){return Vl(e)!==lt.INTERNAL_ERROR?!1:Xv(e).includes("user aborted")}function $I(e,t,n,r){return e.code==="ENOENT"?{title:"Command Not Found",message:`The command "${t}" could not be found. Please check the path configuration for ${n}.`,suggestion:Yv(t,r)}:{title:"Agent Startup Error",message:`Failed to start ${n}: ${e.message}`,suggestion:"Please check the agent configuration in settings."}}function Yv(e,t){var r;let n=((r=e.split("/").pop())==null?void 0:r.split("\\").pop())||"command";return Gv.Platform.isWin&&t?`1. Verify the agent path: Use "which ${n}" in your WSL terminal to find the correct path. 2. If the agent requires Node.js, also check that Node.js path is correctly set in General Settings (use "which node" to find it).`:Gv.Platform.isWin?`1. Verify the agent path: Use "where ${n}" in Command Prompt to find the correct path. 2. If the agent requires Node.js, also check that Node.js path is correctly set in General Settings (use "where node" to find it).`:`1. Verify the agent path: Use "which ${n}" in Terminal to find the correct path. 2. If the agent requires Node.js, also check that Node.js path is correctly set in General Settings (use "which node" to find it).`}var CI=1e4,EI=1e4;async function AI(e,t,n,r,i){try{let o=await n.readNote(e.path),a=t?`${t}/${e.path}`:e.path;r&&(a=Pn(a));let s=o.length>i;return{content:s?o.substring(0,i):o,absolutePath:a,uri:Pl(a),lastModified:new Date(e.stat.mtime).toISOString(),wasTruncated:s,originalLength:o.length}}catch(o){return console.error(`Failed to read note ${e.path}:`,o),null}}async function zI(e,t,n,r){try{let s=(await n.readNote(e)).split(`
|
|
`).slice(t.from.line,t.to.line+1).join(`
|
|
`),c=s.length>r;return{text:c?s.substring(0,r):s,wasTruncated:c,originalLength:s.length}}catch(i){return console.error(`Failed to read selection from ${e}:`,i),null}}function TI(e,t){return!e||t?"":e.selection?`@[[${e.name}]]:${e.selection.from.line+1}-${e.selection.to.line+1}
|
|
`:`@[[${e.name}]]
|
|
`}function II(e){return[...e.message?[{type:"text",text:e.message}]:[],...e.images||[],...e.resourceLinks||[]]}function kI(e,t){if(!(!e||t))return{noteName:e.name,notePath:e.path,selection:e.selection?{fromLine:e.selection.from.line+1,toLine:e.selection.to.line+1}:void 0}}function NI(e,t,n){let r=t?`${t}/${e}`:e;return n&&(r=Pn(r)),r}async function OI(e,t,n){let r=mI(e.message,n);return e.supportsEmbeddedContext?v6(e,t,r):y6(e,t,r)}async function v6(e,t,n){var c,d,m,l;let r=(c=e.maxNoteLength)!=null?c:CI,i=[];for(let{file:f}of n){if(!f)continue;let p=await AI(f,e.vaultBasePath,t,(d=e.convertToWsl)!=null?d:!1,r);if(!p)continue;let h=p.wasTruncated?p.content+`
|
|
|
|
[Note: Truncated from ${p.originalLength} to ${r} characters]`:p.content;i.push({type:"resource",resource:{uri:p.uri,mimeType:"text/markdown",text:h},annotations:{audience:["assistant"],priority:1,lastModified:p.lastModified}})}let o=[];if(e.activeNote&&!e.isAutoMentionDisabled){let f=await S6(e.activeNote,e.vaultBasePath,t,(m=e.convertToWsl)!=null?m:!1,(l=e.maxSelectionLength)!=null?l:EI);o.push(...f)}let a=TI(e.activeNote,e.isAutoMentionDisabled),s=[...i,...o,...e.message||a?[{type:"text",text:a+e.message}]:[],...e.images||[],...e.resourceLinks||[]];return{displayContent:II(e),agentContent:s,autoMentionContext:kI(e.activeNote,e.isAutoMentionDisabled)}}async function y6(e,t,n){var c,d,m,l;let r=(c=e.maxNoteLength)!=null?c:CI,i=[];for(let{file:f}of n){if(!f)continue;let p=await AI(f,e.vaultBasePath,t,(d=e.convertToWsl)!=null?d:!1,r);if(!p)continue;let h=p.wasTruncated?`
|
|
|
|
[Note: This note was truncated. Original length: ${p.originalLength} characters, showing first ${r} characters]`:"";i.push(`<obsidian_mentioned_note ref="${p.absolutePath}">
|
|
${p.content}${h}
|
|
</obsidian_mentioned_note>`)}if(e.activeNote&&!e.isAutoMentionDisabled){let f=await b6(e.activeNote.path,e.vaultBasePath,t,(m=e.convertToWsl)!=null?m:!1,e.activeNote.selection,(l=e.maxSelectionLength)!=null?l:EI);i.push(f)}let o=TI(e.activeNote,e.isAutoMentionDisabled),a=i.length>0?i.join(`
|
|
`)+`
|
|
|
|
`+o+e.message:o+e.message,s=[...a?[{type:"text",text:a}]:[],...e.images||[],...e.resourceLinks||[]];return{displayContent:II(e),agentContent:s,autoMentionContext:kI(e.activeNote,e.isAutoMentionDisabled)}}async function S6(e,t,n,r,i){let o=NI(e.path,t,r),a=Pl(o);if(e.selection){let s=e.selection.from.line+1,c=e.selection.to.line+1,d=await zI(e.path,e.selection,n,i);if(!d)return[{type:"text",text:`The user has selected lines ${s}-${c} in ${a}. If relevant, use the Read tool to examine the specific lines.`}];let m=d.wasTruncated?d.text+`
|
|
|
|
[Note: Truncated from ${d.originalLength} to ${i} characters]`:d.text;return[{type:"resource",resource:{uri:a,mimeType:"text/markdown",text:m},annotations:{audience:["assistant"],priority:.8,lastModified:new Date(e.modified).toISOString()}},{type:"text",text:`The user has selected lines ${s}-${c} in the above note. This is what they are currently focusing on.`}]}return[{type:"text",text:`The user has opened the note ${a} in Obsidian. This may or may not be related to the current conversation. If it seems relevant, consider using the Read tool to examine its content.`}]}async function b6(e,t,n,r,i,o){let a=NI(e,t,r);if(i){let s=i.from.line+1,c=i.to.line+1,d=await zI(e,i,n,o);if(!d)return`<obsidian_opened_note selection="lines ${s}-${c}">The user opened the note ${a} in Obsidian and is focusing on lines ${s}-${c}. This may or may not be related to the current conversation. If it seems relevant, consider using the Read tool to examine the specific lines.</obsidian_opened_note>`;let m=d.wasTruncated?`
|
|
|
|
[Note: The selection was truncated. Original length: ${d.originalLength} characters, showing first ${o} characters]`:"";return`<obsidian_opened_note selection="lines ${s}-${c}">
|
|
The user opened the note ${a} in Obsidian and selected the following text (lines ${s}-${c}):
|
|
|
|
${d.text}${m}
|
|
|
|
This is what the user is currently focusing on.
|
|
</obsidian_opened_note>`}return`<obsidian_opened_note>The user opened the note ${a} in Obsidian. This may or may not be related to the current conversation. If it seems relevant, consider using the Read tool to examine the content.</obsidian_opened_note>`}async function MI(e,t){try{return await t.sendPrompt(e.sessionId,e.agentContent),{success:!0,displayContent:e.displayContent,agentContent:e.agentContent}}catch(n){return await x6(n,e.sessionId,e.agentContent,e.displayContent,e.authMethods,t)}}async function x6(e,t,n,r,i,o){if(Gd(e))return{success:!0,displayContent:r,agentContent:n};if(Vl(e)===lt.AUTHENTICATION_REQUIRED&&i&&i.length>0){if(i.length===1){let s=await _6(t,n,r,i[0].id,o);if(s)return s}return{success:!1,displayContent:r,agentContent:n,requiresAuth:!0,error:Bd(e,t)}}return{success:!1,displayContent:r,agentContent:n,error:Bd(e,t)}}async function _6(e,t,n,r,i){try{return await i.authenticate(r)?(await i.sendPrompt(e,t),{success:!0,displayContent:n,agentContent:t,retriedSuccessfully:!0}):null}catch(o){return{success:!1,displayContent:n,agentContent:t,error:Bd(o,e)}}}var LI=require("obsidian");function DI(e,t){let n=e.content||[];if(t.content!==void 0){let r=t.content||[];r.some(o=>o.type==="diff")&&(n=n.filter(o=>o.type!=="diff")),n=[...n,...r]}return{...e,toolCallId:t.toolCallId,title:t.title!==void 0?t.title:e.title,kind:t.kind!==void 0?t.kind:e.kind,status:t.status!==void 0?t.status:e.status,content:n,locations:t.locations!==void 0?t.locations:e.locations,rawInput:t.rawInput!==void 0&&Object.keys(t.rawInput).length>0?t.rawInput:e.rawInput,permissionRequest:t.permissionRequest!==void 0?t.permissionRequest:e.permissionRequest}}function Jv(e,t){if(e.length===0||e[e.length-1].role!=="assistant"){let i={id:crypto.randomUUID(),role:"assistant",content:[t],timestamp:new Date};return[...e,i]}let r={...e[e.length-1]};if(t.type==="text"||t.type==="agent_thought"){let i=r.content.findIndex(o=>o.type===t.type);if(i>=0){let o=r.content[i];(o.type==="text"||o.type==="agent_thought")&&(r.content[i]={type:t.type,text:o.text+t.text})}else r.content.push(t)}else{let i=r.content.findIndex(o=>o.type===t.type);i>=0?r.content[i]=t:r.content.push(t)}return[...e.slice(0,-1),r]}function w6(e,t){if(e.length===0||e[e.length-1].role!=="user"){let i={id:crypto.randomUUID(),role:"user",content:[t],timestamp:new Date};return[...e,i]}let r={...e[e.length-1]};if(t.type==="text"){let i=r.content.findIndex(o=>o.type==="text");if(i>=0){let o=r.content[i];o.type==="text"&&(r.content[i]={type:"text",text:o.text+t.text})}else r.content.push(t)}else{let i=r.content.findIndex(o=>o.type===t.type);i>=0?r.content[i]=t:r.content.push(t)}return[...e.slice(0,-1),r]}function $6(e,t,n){let r=n.get(t.toolCallId);if(r!==void 0&&r<e.length){let a=e[r];if(a.content.some(c=>c.type==="tool_call"&&c.toolCallId===t.toolCallId)){let c={...a,content:a.content.map(m=>m.type==="tool_call"&&m.toolCallId===t.toolCallId?DI(m,t):m)},d=[...e];return d[r]=c,d}}let i=!1,o=e.map((a,s)=>a.content.some(d=>d.type==="tool_call"&&d.toolCallId===t.toolCallId)?(i=!0,n.set(t.toolCallId,s),{...a,content:a.content.map(d=>d.type==="tool_call"&&d.toolCallId===t.toolCallId?DI(d,t):d)}):a);return i?o:(n.set(t.toolCallId,e.length),[...e,{id:crypto.randomUUID(),role:"assistant",content:[t],timestamp:new Date}])}function Kv(e,t){t.clear(),e.forEach((n,r)=>{for(let i of n.content)i.type==="tool_call"&&t.set(i.toolCallId,r)})}function RI(e,t,n){switch(t.type){case"agent_message_chunk":return Jv(e,{type:"text",text:t.text});case"agent_thought_chunk":return Jv(e,{type:"agent_thought",text:t.text});case"user_message_chunk":return w6(e,{type:"text",text:t.text});case"tool_call":case"tool_call_update":return $6(e,{type:"tool_call",toolCallId:t.toolCallId,title:t.title,status:t.status||"pending",kind:t.kind,content:t.content,locations:t.locations,rawInput:t.rawInput,permissionRequest:t.permissionRequest},n);case"plan":return Jv(e,{type:"plan",entries:t.entries});default:return e}}function UI(e){for(let t of e)for(let n of t.content)if(n.type==="tool_call"){let r=n.permissionRequest;if(r!=null&&r.isActive)return{requestId:r.requestId,toolCallId:n.toolCallId,options:r.options}}return null}function Wv(e,t,n){for(let r of t){let i=e.find(o=>o.kind===r);if(i)return i}if(n){let r=e.find(n);if(r)return r}return e[0]}var{useState:Qv,useCallback:jn,useMemo:PI,useRef:Xd,useEffect:E6}=C6;function jI(e,t,n,r,i){let[o,a]=Qv([]),[s,c]=Qv(!1),[d,m]=Qv(null),l=Xd(new Map),f=Xd(!1),p=Xd([]),h=Xd(!1),y=jn(()=>{h.current=!1;let L=p.current;L.length!==0&&(p.current=[],a(w=>{let k=w;for(let N of L)k=RI(k,N,l.current);return k}))},[]),x=jn(L=>{f.current||(p.current.push(L),h.current||(h.current=!0,requestAnimationFrame(y)))},[y]);E6(()=>()=>{p.current=[],h.current=!1,l.current.clear()},[]);let S=jn(L=>{a(w=>[...w,L])},[]),g=jn(L=>{f.current=L},[]),b=jn(()=>{a([]),l.current.clear(),m(null),c(!1),i(null)},[i]),v=jn(L=>{let w=L.map(k=>({id:crypto.randomUUID(),role:k.role,content:k.content.map(N=>({type:N.type,text:N.text})),timestamp:k.timestamp?new Date(k.timestamp):new Date}));a(w),Kv(w,l.current),c(!1),i(null)},[i]),_=jn(L=>{a(L),Kv(L,l.current),c(!1),i(null)},[i]),C=jn(()=>{i(null)},[i]),E=PI(()=>{let L=t.getSnapshot();return LI.Platform.isWin&&L.windowsWslMode},[t]),A=jn(async(L,w)=>{var K,ne;if(!r.sessionId){i({title:"Cannot Send Message",message:"No active session. Please wait for connection."});return}let k=t.getSnapshot(),N=await OI({message:L,images:w.images,resourceLinks:w.resourceLinks,activeNote:w.activeNote,vaultBasePath:w.vaultBasePath,isAutoMentionDisabled:w.isAutoMentionDisabled,convertToWsl:E,supportsEmbeddedContext:(ne=(K=r.promptCapabilities)==null?void 0:K.embeddedContext)!=null?ne:!1,maxNoteLength:k.displaySettings.maxNoteLength,maxSelectionLength:k.displaySettings.maxSelectionLength},n,n),j=[];if(N.autoMentionContext?j.push({type:"text_with_context",text:L,autoMentionContext:N.autoMentionContext}):j.push({type:"text",text:L}),w.images&&w.images.length>0)for(let ue of w.images)j.push({type:"image",data:ue.data,mimeType:ue.mimeType});if(w.resourceLinks&&w.resourceLinks.length>0)for(let ue of w.resourceLinks)j.push({type:"resource_link",uri:ue.uri,name:ue.name,mimeType:ue.mimeType,size:ue.size});let F={id:crypto.randomUUID(),role:"user",content:j,timestamp:new Date};S(F),c(!0),m(L);try{let ue=await MI({sessionId:r.sessionId,agentContent:N.agentContent,displayContent:N.displayContent,authMethods:r.authMethods},e);ue.success?(c(!1),m(null)):(c(!1),i(ue.error?{title:ue.error.title,message:ue.error.message,suggestion:ue.error.suggestion}:{title:"Send Message Failed",message:"Failed to send message"}))}catch(ue){c(!1),i({title:"Send Message Failed",message:`Failed to send message: ${ue instanceof Error?ue.message:String(ue)}`})}},[e,n,t,r.sessionId,r.authMethods,r.promptCapabilities,E,S,i]),T=PI(()=>UI(o),[o]),M=T!==null,P=jn(async(L,w)=>{try{await e.respondToPermission(L,w)}catch(k){i({title:"Permission Error",message:`Failed to respond to permission request: ${k instanceof Error?k.message:String(k)}`})}},[e,i]),V=jn(async()=>{if(!T||T.options.length===0)return!1;let L=Wv(T.options,["allow_once","allow_always"]);return L?(await P(T.requestId,L.optionId),!0):!1},[T,P]),O=jn(async()=>{if(!T||T.options.length===0)return!1;let L=Wv(T.options,["reject_once","reject_always"],w=>w.name.toLowerCase().includes("reject")||w.name.toLowerCase().includes("deny"));return L?(await P(T.requestId,L.optionId),!0):!1},[T,P]);return{messages:o,isSending:s,lastUserMessage:d,sendMessage:A,clearMessages:b,setInitialMessages:v,setMessagesFromLocal:_,clearError:C,setIgnoreUpdates:g,activePermission:T,hasActivePermission:M,approvePermission:P,approveActivePermission:V,rejectActivePermission:O,enqueueUpdate:x}}var{useState:z6,useCallback:T6,useEffect:I6,useMemo:k6}=A6;function ZI(e,t,n,r,i){let[o,a]=z6(null),s=xI(e,t,r,a,i),c=jI(e,t,n,s.session,a),d=T6(m=>{s.handleSessionUpdate(m),c.enqueueUpdate(m)},[s.handleSessionUpdate,c.enqueueUpdate]);return I6(()=>e.onSessionUpdate(d),[e,d]),k6(()=>({session:s.session,isReady:s.isReady,messages:c.messages,isSending:c.isSending,lastUserMessage:c.lastUserMessage,errorInfo:o,createSession:s.createSession,restartSession:s.restartSession,closeSession:s.closeSession,forceRestartAgent:s.forceRestartAgent,cancelOperation:s.cancelOperation,getAvailableAgents:s.getAvailableAgents,updateSessionFromLoad:s.updateSessionFromLoad,setMode:s.setMode,setModel:s.setModel,setConfigOption:s.setConfigOption,sendMessage:c.sendMessage,clearMessages:c.clearMessages,setInitialMessages:c.setInitialMessages,setMessagesFromLocal:c.setMessagesFromLocal,clearError:c.clearError,setIgnoreUpdates:c.setIgnoreUpdates,activePermission:c.activePermission,hasActivePermission:c.hasActivePermission,approvePermission:c.approvePermission,approveActivePermission:c.approveActivePermission,rejectActivePermission:c.rejectActivePermission}),[s.session,s.isReady,c.messages,c.isSending,c.lastUserMessage,o,s.createSession,s.restartSession,s.closeSession,s.forceRestartAgent,s.cancelOperation,s.getAvailableAgents,s.updateSessionFromLoad,s.setMode,s.setModel,s.setConfigOption,c.sendMessage,c.clearMessages,c.setInitialMessages,c.setMessagesFromLocal,c.clearError,c.setIgnoreUpdates,c.activePermission,c.hasActivePermission,c.approvePermission,c.approveActivePermission,c.rejectActivePermission])}var Ye=G(Ce());function N6(e){let t=e==null?void 0:e.sessionCapabilities;return{canLoad:(e==null?void 0:e.loadSession)===!0,canResume:(t==null?void 0:t.resume)!==void 0,canFork:(t==null?void 0:t.fork)!==void 0,canList:(t==null?void 0:t.list)!==void 0}}var O6=5*60*1e3;function ey(e,t){let n=new Map(t.map(r=>[r.sessionId,r]));return e.map(r=>{var o;let i=n.get(r.sessionId);return{...r,title:(o=i==null?void 0:i.title)!=null?o:r.title}})}function qI(e){let{agentClient:t,session:n,settingsAccess:r,agentCwd:i,onSessionLoad:o,onMessagesRestore:a,onIgnoreUpdates:s,onClearMessages:c}=e,d=(0,Ye.useMemo)(()=>N6(n.agentCapabilities),[n.agentCapabilities]),[m,l]=(0,Ye.useState)([]),[f,p]=(0,Ye.useState)(!1),[h,y]=(0,Ye.useState)(null),[x,S]=(0,Ye.useState)(void 0),[g,b]=(0,Ye.useState)(new Set),v=(0,Ye.useRef)(null),_=(0,Ye.useRef)(void 0),C=(0,Ye.useCallback)(N=>!v.current||v.current.cwd!==N?!1:Date.now()-v.current.timestamp<O6,[]),E=(0,Ye.useCallback)(()=>{v.current=null},[]),A=d.canLoad||d.canResume||d.canFork,T=(0,Ye.useCallback)(async N=>{if(!d.canList||!A){let F=r.getSavedSessions(n.agentId,N),K=F.map(ne=>({sessionId:ne.sessionId,cwd:ne.cwd,title:ne.title,updatedAt:ne.updatedAt}));l(K),b(new Set(F.map(ne=>ne.sessionId))),S(void 0),y(null);return}if(C(N)){let F=r.getSavedSessions(n.agentId,N);b(new Set(F.map(ne=>ne.sessionId)));let K=ey(v.current.sessions,F);l(K),S(v.current.nextCursor),y(null);return}p(!0),y(null),_.current=N;try{let F=await t.listSessions(N),K=r.getSavedSessions(n.agentId,N),ne=ey(F.sessions,K);l(ne),b(new Set(K.map(ue=>ue.sessionId))),S(F.nextCursor),v.current={sessions:ne,nextCursor:F.nextCursor,cwd:N,timestamp:Date.now()}}catch(F){let K=F instanceof Error?F.message:String(F);y(`Failed to fetch sessions: ${K}`),l([]),S(void 0)}finally{p(!1)}},[t,d.canList,A,C,r,n.agentId]),M=(0,Ye.useCallback)(async()=>{if(!(!x||!d.canList)){p(!0),y(null);try{let N=await t.listSessions(_.current,x),j=r.getSavedSessions(n.agentId,_.current),F=ey(N.sessions,j);l(K=>[...K,...F]),b(new Set(j.map(K=>K.sessionId))),S(N.nextCursor),v.current&&(v.current={...v.current,sessions:[...v.current.sessions,...F],nextCursor:N.nextCursor,timestamp:Date.now()})}catch(N){let j=N instanceof Error?N.message:String(N);y(`Failed to load more sessions: ${j}`)}finally{p(!1)}}},[t,d.canList,x,r,n.agentId]),P=(0,Ye.useCallback)(async(N,j)=>{p(!0),y(null);try{if(o(N,void 0,void 0,void 0),d.canLoad){let F=await r.loadSessionMessages(N);if(F&&a){s==null||s(!0),c==null||c();try{let K=await t.loadSession(N,j);o(K.sessionId,K.modes,K.models,K.configOptions),a(F)}finally{s==null||s(!1)}}else{let K=await t.loadSession(N,j);o(K.sessionId,K.modes,K.models,K.configOptions)}}else if(d.canResume){let F=await t.resumeSession(N,j);o(F.sessionId,F.modes,F.models,F.configOptions);let K=await r.loadSessionMessages(N);K&&a&&a(K)}else throw new Error("Session restoration is not supported")}catch(F){let K=F instanceof Error?F.message:String(F);throw y(`Failed to restore session: ${K}`),F}finally{p(!1)}},[t,d.canLoad,d.canResume,o,r,a,s,c]),V=(0,Ye.useCallback)(async(N,j)=>{var F;p(!0),y(null);try{let K=await t.forkSession(N,j);o(K.sessionId,K.modes,K.models,K.configOptions);let ne=await r.loadSessionMessages(N);if(ne&&a&&a(ne),n.agentId){let ue=m.find(xi=>xi.sessionId===N),Ue=(F=ue==null?void 0:ue.title)!=null?F:"Session",ft=50,Wn="Fork: ",wt=ft-Wn.length,Qn=Ue.length>wt?Ue.substring(0,wt)+"...":Ue,No=`${Wn}${Qn}`,mt=new Date().toISOString();await r.saveSession({sessionId:K.sessionId,agentId:n.agentId,cwd:j,title:No,createdAt:mt,updatedAt:mt}),ne&&r.saveSessionMessages(K.sessionId,n.agentId,ne)}E()}catch(K){let ne=K instanceof Error?K.message:String(K);throw y(`Failed to fork session: ${ne}`),K}finally{p(!1)}},[t,o,r,a,E,n.agentId,m]),O=(0,Ye.useCallback)(async N=>{try{await r.deleteSession(N),l(j=>j.filter(F=>F.sessionId!==N)),E()}catch(j){let F=j instanceof Error?j.message:String(j);throw y(`Failed to delete session: ${F}`),j}},[r,E]),L=(0,Ye.useCallback)(async(N,j,F)=>{let ne=r.getSavedSessions().find(Ue=>Ue.sessionId===N),ue=ne==null?void 0:ne.title;l(Ue=>Ue.map(ft=>ft.sessionId===N?{...ft,title:j}:ft));try{ne?await r.saveSession({...ne,title:j,updatedAt:new Date().toISOString()}):await r.saveSession({sessionId:N,agentId:n.agentId,cwd:F,title:j,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),E()}catch(Ue){l(Wn=>Wn.map(wt=>wt.sessionId===N?{...wt,title:ue}:wt));let ft=Ue instanceof Error?Ue.message:String(Ue);throw y(`Failed to update title: ${ft}`),Ue}},[r,n.agentId,E]),w=(0,Ye.useCallback)(async(N,j)=>{if(!n.agentId)return;let F=j.length>50?j.substring(0,50)+"...":j;await r.saveSession({sessionId:N,agentId:n.agentId,cwd:i,title:F,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()})},[n.agentId,i,r]),k=(0,Ye.useCallback)((N,j)=>{!n.agentId||j.length===0||r.saveSessionMessages(N,n.agentId,j)},[n.agentId,r]);return(0,Ye.useMemo)(()=>({sessions:m,loading:f,error:h,hasMore:x!==void 0,canShowSessionHistory:d.canList||d.canLoad||d.canResume||d.canFork,canRestore:d.canLoad||d.canResume,canFork:d.canFork,canList:d.canList,isUsingLocalSessions:!d.canList,localSessionIds:g,fetchSessions:T,loadMoreSessions:M,restoreSession:P,forkSession:V,deleteSession:O,updateSessionTitle:L,saveSessionLocally:w,saveSessionMessages:k,invalidateCache:E}),[m,f,h,x,d.canList,d.canLoad,d.canResume,d.canFork,g,T,M,P,V,O,L,w,k,E])}var VI=require("obsidian"),Da=G(Xp()),M6={"@agentclientprotocol/claude-agent-acp":"@agentclientprotocol/claude-agent-acp","codex-acp":"@zed-industries/codex-acp"},D6={"@zed-industries/claude-code-acp":"@agentclientprotocol/claude-agent-acp","@zed-industries/claude-agent-acp":"@agentclientprotocol/claude-agent-acp"};async function FI(e){let t=D6[e.name];if(t)return{variant:"info",title:"Package Migration Required",message:`"${e.name}" has been renamed to "${t}".
|
|
Run the following in your terminal:`,suggestion:`npm uninstall -g ${e.name} && npm install -g ${t}`};let n=M6[e.name];if(!n||!e.version)return null;try{let r=await R6(n);if(r&&Da.valid(e.version)&&Da.gt(r,e.version))return{variant:"info",title:"Agent Update Available",message:`${n}: ${e.version} \u2192 ${r}.
|
|
Run the following in your terminal:`,suggestion:`npm install -g ${n}@latest`}}catch(r){}return null}async function R6(e){var r;let n=(await(0,VI.requestUrl)({url:`https://registry.npmjs.org/${e}/latest`})).json;return n.version&&(r=Da.clean(n.version))!=null?r:null}var j6=G(Ce()),Fl=require("obsidian");var U6=G(Ce()),ty=require("obsidian"),ny=G(ve()),{useRef:HI,useEffect:BI,useImperativeHandle:P6,forwardRef:L6}=U6;function Yn({name:e,className:t}){let n=HI(null);return BI(()=>{n.current&&(0,ty.setIcon)(n.current,e)},[e]),(0,ny.jsx)("span",{ref:n,className:t})}var Yd=L6(function({iconName:t,tooltip:n,onClick:r},i){let o=HI(null);return P6(i,()=>o.current,[]),BI(()=>{o.current&&(0,ty.setIcon)(o.current,t)},[t]),(0,ny.jsx)("button",{ref:o,title:n,onClick:r,className:"clickable-icon agent-client-header-button"})});var Ge=G(ve()),{useRef:Kd,useEffect:iy}=j6;function Jd({icon:e,label:t,onClick:n}){let r=Kd(null);return iy(()=>{r.current&&(0,Fl.setIcon)(r.current,e)},[e]),(0,Ge.jsx)("div",{ref:r,className:"clickable-icon nav-action-button","aria-label":t,onClick:n})}function Z6({agentLabel:e,isUpdateAvailable:t,hasHistoryCapability:n=!1,onNewChat:r,onExportChat:i,onShowMenu:o,onOpenHistory:a}){return(0,Ge.jsx)("div",{className:"nav-header agent-client-chat-view-header",children:(0,Ge.jsxs)("div",{className:"nav-buttons-container",children:[(0,Ge.jsx)("span",{className:"agent-client-chat-view-header-title",children:e}),t&&(0,Ge.jsx)("span",{className:"agent-client-chat-view-header-update",children:"Plugin update available!"}),(0,Ge.jsx)(Jd,{icon:"plus",label:"New chat",onClick:r}),a&&(0,Ge.jsx)(Jd,{icon:"history",label:"Session history",onClick:a}),(0,Ge.jsx)(Jd,{icon:"save",label:"Export chat to Markdown",onClick:i}),(0,Ge.jsx)(Jd,{icon:"more-vertical",label:"More",onClick:o})]})})}function q6({agentLabel:e,availableAgents:t,currentAgentId:n,isUpdateAvailable:r,onAgentChange:i,onShowMenu:o,onMinimize:a,onClose:s}){let c=Kd(null),d=Kd(null),m=Kd(i);return m.current=i,iy(()=>{let l=c.current;if(l){if(t.length<=1){d.current&&(l.empty(),d.current=null);return}if(!d.current){let f=new Fl.DropdownComponent(l);d.current=f;for(let p of t)f.addOption(p.id,p.displayName);n&&f.setValue(n),f.onChange(p=>{var h;(h=m.current)==null||h.call(m,p)})}return()=>{d.current&&(l.empty(),d.current=null)}}},[t]),iy(()=>{d.current&&n&&d.current.setValue(n)},[n]),(0,Ge.jsxs)("div",{className:"agent-client-inline-header agent-client-inline-header-floating",children:[(0,Ge.jsx)("div",{className:"agent-client-inline-header-main",children:t.length>1?(0,Ge.jsxs)("div",{className:"agent-client-agent-selector",children:[(0,Ge.jsx)("div",{ref:c}),(0,Ge.jsx)("span",{className:"agent-client-agent-selector-icon",ref:l=>{l&&(0,Fl.setIcon)(l,"chevron-down")}})]}):(0,Ge.jsx)("span",{className:"agent-client-agent-label",children:e})}),r&&(0,Ge.jsx)("p",{className:"agent-client-chat-view-header-update",children:"Plugin update available!"}),(0,Ge.jsxs)("div",{className:"agent-client-inline-header-actions",children:[(0,Ge.jsx)(Yd,{iconName:"more-vertical",tooltip:"More",onClick:o}),a&&(0,Ge.jsx)(Yd,{iconName:"minimize-2",tooltip:"Minimize",onClick:a}),s&&(0,Ge.jsx)(Yd,{iconName:"x",tooltip:"Close",onClick:s})]})]})}function ry(e){return e.variant==="floating"?(0,Ge.jsx)(q6,{...e}):(0,Ge.jsx)(Z6,{...e})}var fL=G(Ce()),_k=require("obsidian");var by=G(Ce()),xy=require("obsidian");var V6=G(Ce()),Ir=require("obsidian");var GI=G(ve()),{useRef:F6,useEffect:H6}=V6;function oy({text:e,plugin:t}){let n=F6(null);return H6(()=>{var d;let r=n.current;if(!r)return;(d=r.empty)==null||d.call(r),r.classList.add("markdown-rendered");let i=new Ir.Component;i.load(),Ir.MarkdownRenderer.render(t.app,e,r,"",i);let o=t.app.vault.adapter instanceof Ir.FileSystemAdapter?t.app.vault.adapter.getBasePath():null,a=Ir.Platform.isWin&&t.settings.windowsWslMode,s=o?o.replace(/\\/g,"/").replace(/\/+$/,""):null,c=m=>{let f=m.target.closest("a.internal-link");if(f){m.preventDefault();let p=f.getAttribute("data-href");if(p){let h=decodeURIComponent(p);a&&h.startsWith("/mnt/")&&(h=iI(h));let y=h.replace(/\\/g,"/");if(s&&y.startsWith(s+"/")){let x=y.slice(s.length+1);t.app.workspace.openLinkText(x,"")}else Ul(h)||t.app.workspace.openLinkText(h,"")}}};return r.addEventListener("click",c),()=>{r.removeEventListener("click",c),i.unload()}},[e,t]),(0,GI.jsx)("div",{ref:n,className:"agent-client-markdown-text-renderer"})}var ly=G(Ce());var sy=G(ve()),{useState:ay,useRef:B6,useEffect:XI}=ly,Wd=ly.memo(function({terminalId:t,terminalClient:n,plugin:r}){let i=Ne(),[o,a]=ay(""),[s,c]=ay(null),[d,m]=ay(!0),l=B6(null);return i.log(`[TerminalBlock] Component rendered for terminal ${t}, terminalClient: ${!!n}`),XI(()=>{if(i.log(`[TerminalBlock] useEffect triggered for ${t}, terminalClient: ${!!n}`),!t||!n)return;let f=async()=>{var p,h;try{let y=await n.getTerminalOutput(t);i.log(`[TerminalBlock] Poll result for ${t}:`,y),a(y.output),y.exitStatus&&(c({exitCode:(p=y.exitStatus.exitCode)!=null?p:null,signal:(h=y.exitStatus.signal)!=null?h:null}),m(!1),l.current&&(window.clearInterval(l.current),l.current=null))}catch(y){let x=y instanceof Error?y.message:String(y);i.log(`[TerminalBlock] Polling error for terminal ${t}: ${x}`),m(!1),l.current&&(window.clearInterval(l.current),l.current=null)}};return f(),l.current=window.setInterval(()=>{f()},100),()=>{l.current&&(window.clearInterval(l.current),l.current=null)}},[t,n,i]),XI(()=>{!d&&l.current&&(window.clearInterval(l.current),l.current=null)},[d]),(0,sy.jsxs)("div",{className:"agent-client-terminal-renderer",children:[o||(d?"Waiting for output...":"No output"),s&&(0,sy.jsxs)("div",{className:`agent-client-terminal-renderer-exit ${s.exitCode===0?"agent-client-success":"agent-client-error"}`,children:["Exit Code: ",s.exitCode,s.signal&&` | Signal: ${s.signal}`]})]})});var Bl=G(Ce()),ik=require("obsidian");var cy=G(ve());function YI({permissionRequest:e,toolCallId:t,plugin:n,onApprovePermission:r,onOptionSelected:i}){let o=Ne(),a=e.selectedOptionId!==void 0,s=e.isCancelled===!0;return!(e.isActive!==!1)||a||s?null:(0,cy.jsx)("div",{className:"agent-client-message-permission-request",children:e.options.map(d=>(0,cy.jsx)("button",{className:`agent-client-permission-option ${d.kind?`agent-client-permission-kind-${d.kind}`:""}`,onClick:()=>{i&&i(d.optionId),r?r(e.requestId,d.optionId):o.warn("Cannot handle permission response: missing onApprovePermission callback")},children:d.name},d.optionId))})}var kr=class{diff(t,n,r={}){let i;typeof r=="function"?(i=r,r={}):"callback"in r&&(i=r.callback);let o=this.castInput(t,r),a=this.castInput(n,r),s=this.removeEmpty(this.tokenize(o,r)),c=this.removeEmpty(this.tokenize(a,r));return this.diffWithOptionsObj(s,c,r,i)}diffWithOptionsObj(t,n,r,i){var o;let a=g=>{if(g=this.postProcess(g,r),i){setTimeout(function(){i(g)},0);return}else return g},s=n.length,c=t.length,d=1,m=s+c;r.maxEditLength!=null&&(m=Math.min(m,r.maxEditLength));let l=(o=r.timeout)!==null&&o!==void 0?o:1/0,f=Date.now()+l,p=[{oldPos:-1,lastComponent:void 0}],h=this.extractCommon(p[0],n,t,0,r);if(p[0].oldPos+1>=c&&h+1>=s)return a(this.buildValues(p[0].lastComponent,n,t));let y=-1/0,x=1/0,S=()=>{for(let g=Math.max(y,-d);g<=Math.min(x,d);g+=2){let b,v=p[g-1],_=p[g+1];v&&(p[g-1]=void 0);let C=!1;if(_){let A=_.oldPos-g;C=_&&0<=A&&A<s}let E=v&&v.oldPos+1<c;if(!C&&!E){p[g]=void 0;continue}if(!E||C&&v.oldPos<_.oldPos?b=this.addToPath(_,!0,!1,0,r):b=this.addToPath(v,!1,!0,1,r),h=this.extractCommon(b,n,t,g,r),b.oldPos+1>=c&&h+1>=s)return a(this.buildValues(b.lastComponent,n,t))||!0;p[g]=b,b.oldPos+1>=c&&(x=Math.min(x,g-1)),h+1>=s&&(y=Math.max(y,g+1))}d++};if(i)(function g(){setTimeout(function(){if(d>m||Date.now()>f)return i(void 0);S()||g()},0)})();else for(;d<=m&&Date.now()<=f;){let g=S();if(g)return g}}addToPath(t,n,r,i,o){let a=t.lastComponent;return a&&!o.oneChangePerToken&&a.added===n&&a.removed===r?{oldPos:t.oldPos+i,lastComponent:{count:a.count+1,added:n,removed:r,previousComponent:a.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:n,removed:r,previousComponent:a}}}extractCommon(t,n,r,i,o){let a=n.length,s=r.length,c=t.oldPos,d=c-i,m=0;for(;d+1<a&&c+1<s&&this.equals(r[c+1],n[d+1],o);)d++,c++,m++,o.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return m&&!o.oneChangePerToken&&(t.lastComponent={count:m,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=c,d}equals(t,n,r){return r.comparator?r.comparator(t,n):t===n||!!r.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){let n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,r){let i=[],o;for(;t;)i.push(t),o=t.previousComponent,delete t.previousComponent,t=o;i.reverse();let a=i.length,s=0,c=0,d=0;for(;s<a;s++){let m=i[s];if(m.removed)m.value=this.join(r.slice(d,d+m.count)),d+=m.count;else{if(!m.added&&this.useLongestToken){let l=n.slice(c,c+m.count);l=l.map(function(f,p){let h=r[d+p];return h.length>f.length?h:f}),m.value=this.join(l)}else m.value=this.join(n.slice(c,c+m.count));c+=m.count,m.added||(d+=m.count)}}return i}};function uy(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function dy(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return"";for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function Qd(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function ef(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function Ra(e,t){return Qd(e,t,"")}function Hl(e,t){return ef(e,t,"")}function fy(e,t){return t.slice(0,G6(e,t))}function G6(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),o=0;i[0]=0;for(let a=1;a<r;a++){for(t[a]==t[o]?i[a]=i[o]:i[a]=o;o>0&&t[a]!=t[o];)o=i[o];t[a]==t[o]&&o++}o=0;for(let a=n;a<e.length;a++){for(;o>0&&e[a]!=t[o];)o=i[o];e[a]==t[o]&&o++}return o}function my(e,t){let n=[];for(let r of Array.from(t.segment(e))){let i=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(i)?n[n.length-1]+=i:n.push(i)}return n}function tf(e,t){if(t)return Ua(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function vo(e,t){if(t)return Ua(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:""}function Ua(e,t){if(!t)return[vo(e),tf(e)];if(t.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');let n=my(e,t),r=n[0],i=n[n.length-1],o=/\s/.test(r)?r:"",a=/\s/.test(i)?i:"";return[o,a]}var nf="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",X6=new RegExp(`[${nf}]+|\\s+|[^${nf}]`,"ug"),py=class extends kr{equals(t,n,r){return r.ignoreCase&&(t=t.toLowerCase(),n=n.toLowerCase()),t.trim()===n.trim()}tokenize(t,n={}){let r;if(n.intlSegmenter){let a=n.intlSegmenter;if(a.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');r=my(t,a)}else r=t.match(X6)||[];let i=[],o=null;return r.forEach(a=>{/\s/.test(a)?o==null?i.push(a):i.push(i.pop()+a):o!=null&&/\s/.test(o)?i[i.length-1]==o?i.push(i.pop()+a):i.push(o+a):i.push(a),o=a}),i}join(t){return t.map((n,r)=>r==0?n:n.replace(/^\s+/,"")).join("")}postProcess(t,n){if(!t||n.oneChangePerToken)return t;let r=null,i=null,o=null;return t.forEach(a=>{a.added?i=a:a.removed?o=a:((i||o)&&JI(r,o,i,a,n.intlSegmenter),r=a,i=null,o=null)}),(i||o)&&JI(r,o,i,null,n.intlSegmenter),t}},KI=new py;function hy(e,t,n){return(n==null?void 0:n.ignoreWhitespace)!=null&&!n.ignoreWhitespace?QI(e,t,n):KI.diff(e,t,n)}function JI(e,t,n,r,i){if(t&&n){let[o,a]=Ua(t.value,i),[s,c]=Ua(n.value,i);if(e){let d=uy(o,s);e.value=ef(e.value,s,d),t.value=Ra(t.value,d),n.value=Ra(n.value,d)}if(r){let d=dy(a,c);r.value=Qd(r.value,c,d),t.value=Hl(t.value,d),n.value=Hl(n.value,d)}}else if(n){if(e){let o=vo(n.value,i);n.value=n.value.substring(o.length)}if(r){let o=vo(r.value,i);r.value=r.value.substring(o.length)}}else if(e&&r){let o=vo(r.value,i),[a,s]=Ua(t.value,i),c=uy(o,a);t.value=Ra(t.value,c);let d=dy(Ra(o,c),s);t.value=Hl(t.value,d),r.value=Qd(r.value,o,d),e.value=ef(e.value,o,o.slice(0,o.length-d.length))}else if(r){let o=vo(r.value,i),a=tf(t.value,i),s=fy(a,o);t.value=Hl(t.value,s)}else if(e){let o=tf(e.value,i),a=vo(t.value,i),s=fy(o,a);t.value=Ra(t.value,s)}}var gy=class extends kr{tokenize(t){let n=new RegExp(`(\\r?\\n)|[${nf}]+|[^\\S\\n\\r]+|[^${nf}]`,"ug");return t.match(n)||[]}},WI=new gy;function QI(e,t,n){return WI.diff(e,t,n)}var vy=class extends kr{constructor(){super(...arguments),this.tokenize=J6}equals(t,n,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(`
|
|
`))&&(t=t.trim()),(!r.newlineIsToken||!n.includes(`
|
|
`))&&(n=n.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(t.endsWith(`
|
|
`)&&(t=t.slice(0,-1)),n.endsWith(`
|
|
`)&&(n=n.slice(0,-1))),super.equals(t,n,r)}},Y6=new vy;function yy(e,t,n){return Y6.diff(e,t,n)}function J6(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
`));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let i=0;i<r.length;i++){let o=r[i];i%2&&!t.newlineIsToken?n[n.length-1]+=o:n.push(o)}return n}function Sy(e,t,n,r,i,o,a){let s;a?typeof a=="function"?s={callback:a}:s=a:s={},typeof s.context=="undefined"&&(s.context=4);let c=s.context;if(s.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(s.callback){let{callback:m}=s;yy(n,r,Object.assign(Object.assign({},s),{callback:l=>{let f=d(l);m(f)}}))}else return d(yy(n,r,s));function d(m){if(!m)return;m.push({value:"",lines:[]});function l(g){return g.map(function(b){return" "+b})}let f=[],p=0,h=0,y=[],x=1,S=1;for(let g=0;g<m.length;g++){let b=m[g],v=b.lines||K6(b.value);if(b.lines=v,b.added||b.removed){if(!p){let _=m[g-1];p=x,h=S,_&&(y=c>0?l(_.lines.slice(-c)):[],p-=y.length,h-=y.length)}for(let _ of v)y.push((b.added?"+":"-")+_);b.added?S+=v.length:x+=v.length}else{if(p)if(v.length<=c*2&&g<m.length-2)for(let _ of l(v))y.push(_);else{let _=Math.min(v.length,c);for(let E of l(v.slice(0,_)))y.push(E);let C={oldStart:p,oldLines:x-p+_,newStart:h,newLines:S-h+_,lines:y};f.push(C),p=0,h=0,y=[]}x+=v.length,S+=v.length}}for(let g of f)for(let b=0;b<g.lines.length;b++)g.lines[b].endsWith(`
|
|
`)?g.lines[b]=g.lines[b].slice(0,-1):(g.lines.splice(b+1,0,"\\ No newline at end of file"),b++);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:o,hunks:f}}}function K6(e){let t=e.endsWith(`
|
|
`),n=e.split(`
|
|
`).map(r=>r+`
|
|
`);return t?n.pop():n.push(n.pop().slice(0,-1)),n}var we=G(ve()),{useState:tk,useMemo:nk}=Bl,rk=Bl.memo(function({content:t,plugin:n,terminalClient:r,onApprovePermission:i}){let{kind:o,title:a,status:s,toolCallId:c,permissionRequest:d,locations:m,rawInput:l,content:f}=t,[p,h]=tk(d==null?void 0:d.selectedOptionId);Bl.useEffect(()=>{(d==null?void 0:d.selectedOptionId)!==p&&h(d==null?void 0:d.selectedOptionId)},[d==null?void 0:d.selectedOptionId]);let y=nk(()=>{let g=n.app.vault.adapter;return g instanceof ik.FileSystemAdapter?g.getBasePath():""},[n]),x=n.settings.displaySettings.showEmojis;return(0,we.jsxs)("div",{className:"agent-client-message-tool-call",children:[(0,we.jsxs)("div",{className:"agent-client-message-tool-call-header",children:[(0,we.jsxs)("div",{className:"agent-client-message-tool-call-title",children:[x&&(0,we.jsx)(Yn,{name:(g=>{switch(g){case"read":return"book-open";case"edit":return"pencil";case"delete":return"trash";case"move":return"folder-open";case"search":return"search";case"execute":return"square-terminal";case"think":return"message-circle-more";case"fetch":return"globe";case"switch_mode":return"arrow-left-right";default:return"hammer"}})(o),className:"agent-client-message-tool-call-icon"}),(0,we.jsx)("span",{className:"agent-client-message-tool-call-title-text",children:a}),s!=="completed"&&(0,we.jsx)(Yn,{name:s==="failed"?"x":"ellipsis",className:`agent-client-message-tool-call-status-icon agent-client-status-${s}`})]}),o==="execute"&&l&&typeof l.command=="string"&&(0,we.jsx)("div",{className:"agent-client-message-tool-call-command",children:(0,we.jsxs)("code",{children:[l.command,Array.isArray(l.args)&&l.args.length>0&&` ${l.args.join(" ")}`]})}),m&&m.length>0&&(0,we.jsx)("div",{className:"agent-client-message-tool-call-locations",children:m.map((g,b)=>(0,we.jsxs)("span",{className:"agent-client-message-tool-call-location",children:[sI(g.path,y),g.line!=null&&`:${g.line}`]},b))})]}),f&&f.map((g,b)=>g.type==="terminal"?(0,we.jsx)(Wd,{terminalId:g.terminalId,terminalClient:r||null,plugin:n},b):g.type==="diff"?(0,we.jsx)(nL,{diff:g,plugin:n,autoCollapse:n.settings.displaySettings.autoCollapseDiffs,collapseThreshold:n.settings.displaySettings.diffCollapseThreshold},b):null),d&&(0,we.jsx)(YI,{permissionRequest:{...d,selectedOptionId:p},toolCallId:c,plugin:n,onApprovePermission:i,onOptionSelected:h})]})});function ek(e){return e.oldText===null||e.oldText===void 0||e.oldText===""}function Q6(e){return e.map(t=>({type:t.added?"added":t.removed?"removed":"context",value:t.value}))}function eL(e,t){let n=e.filter(r=>!(t==="removed"&&r.type==="added"||t==="added"&&r.type==="removed"));return(0,we.jsx)(we.Fragment,{children:n.map((r,i)=>r.type==="added"?(0,we.jsx)("span",{className:"agent-client-diff-word-added",children:r.value},i):r.type==="removed"?(0,we.jsx)("span",{className:"agent-client-diff-word-removed",children:r.value},i):(0,we.jsx)("span",{children:r.value},i))})}var tL=3;function nL({diff:e,autoCollapse:t=!1,collapseThreshold:n=10}){let r=nk(()=>{if(ek(e))return e.newText.split(`
|
|
`).map((x,S)=>({type:"added",newLineNumber:S+1,content:x}));let m=e.oldText||"",l=Sy("old","new",m,e.newText,"","",{context:tL}),f=[],p=0,h=0;for(let y of l.hunks){l.hunks.length>1&&f.push({type:"context",content:`@@ -${y.oldStart},${y.oldLines} +${y.newStart},${y.newLines} @@`}),p=y.oldStart,h=y.newStart;for(let x of y.lines){let S=x[0],g=x.substring(1);S==="+"?f.push({type:"added",newLineNumber:h++,content:g}):S==="-"?f.push({type:"removed",oldLineNumber:p++,content:g}):f.push({type:"context",oldLineNumber:p++,newLineNumber:h++,content:g})}}for(let y=0;y<f.length-1;y++){let x=f[y],S=f[y+1];if(x.type==="removed"&&S.type==="added"){let g=hy(x.content,S.content),b=Q6(g);x.wordDiff=b,S.wordDiff=b}}return f},[e.oldText,e.newText]),i=(m,l)=>{if(m.type==="context"&&m.content.startsWith("@@"))return(0,we.jsx)("div",{className:"agent-client-diff-hunk-header",children:m.content},l);let p="agent-client-diff-line";return m.type==="added"?p+=" agent-client-diff-line-added":m.type==="removed"?p+=" agent-client-diff-line-removed":p+=" agent-client-diff-line-context",(0,we.jsx)("div",{className:p,children:(0,we.jsx)("span",{className:"agent-client-diff-line-content",children:m.wordDiff&&(m.type==="added"||m.type==="removed")?eL(m.wordDiff,m.type):m.content})},l)},o=t&&r.length>n,[a,s]=tk(o),c=a?r.slice(0,n):r,d=r.length-n;return(0,we.jsxs)("div",{className:"agent-client-tool-call-diff",children:[ek(e)?(0,we.jsx)("div",{className:"agent-client-diff-line-info",children:"New file"}):null,(0,we.jsx)("div",{className:"agent-client-tool-call-diff-content",children:c.map((m,l)=>i(m,l))}),o&&(0,we.jsxs)("div",{className:"agent-client-diff-expand-bar",onClick:()=>s(!a),children:[(0,we.jsx)("span",{className:"agent-client-diff-expand-text",children:a?`${d} more lines`:"Collapse"}),(0,we.jsx)(Yn,{name:a?"chevron-right":"chevron-up",className:"agent-client-diff-expand-icon"})]})]})}var ye=G(ve()),{useState:lk,useCallback:ok}=by;function ak({text:e,plugin:t,autoMentionContext:n}){let r=/@\[\[([^\]]+)\]\]/g,i=[];if(n){let s=n.selection?`@${n.noteName}:${n.selection.fromLine}-${n.selection.toLine}`:`@${n.noteName}`;i.push((0,ye.jsx)("span",{className:"agent-client-text-mention",onClick:()=>{t.app.workspace.openLinkText(n.notePath,"")},children:s},"auto-mention")),i.push(`
|
|
`)}let o=0,a;for(;(a=r.exec(e))!==null;){a.index>o&&i.push(e.slice(o,a.index));let s=a[1],c=t.app.vault.getMarkdownFiles().find(d=>d.basename===s);c?i.push((0,ye.jsxs)("span",{className:"agent-client-text-mention",onClick:()=>{t.app.workspace.openLinkText(c.path,"")},children:["@",s]},a.index)):i.push(`@${s}`),o=a.index+a[0].length}return o<e.length&&i.push(e.slice(o)),(0,ye.jsx)("div",{className:"agent-client-text-with-mentions",children:i})}function iL({text:e,plugin:t}){let[n,r]=lk(!1),i=t.settings.displaySettings.showEmojis;return(0,ye.jsxs)("div",{className:"agent-client-collapsible-thought",onClick:()=>r(!n),children:[(0,ye.jsxs)("div",{className:"agent-client-collapsible-thought-header",children:[i&&(0,ye.jsx)(Yn,{name:"lightbulb",className:"agent-client-collapsible-thought-label-icon"}),"Thinking",(0,ye.jsx)(Yn,{name:n?"chevron-down":"chevron-right",className:"agent-client-collapsible-thought-icon"})]}),n&&(0,ye.jsx)("div",{className:"agent-client-collapsible-thought-content",children:(0,ye.jsx)(oy,{text:e,plugin:t})})]})}function sk({content:e,plugin:t,messageId:n,messageRole:r,terminalClient:i,onApprovePermission:o}){switch(e.type){case"text":return r==="user"?(0,ye.jsx)(ak,{text:e.text,plugin:t}):(0,ye.jsx)(oy,{text:e.text,plugin:t});case"text_with_context":return(0,ye.jsx)(ak,{text:e.text,autoMentionContext:e.autoMentionContext,plugin:t});case"agent_thought":return(0,ye.jsx)(iL,{text:e.text,plugin:t});case"tool_call":return(0,ye.jsx)(rk,{content:e,plugin:t,terminalClient:i,onApprovePermission:o});case"plan":{let a=t.settings.displaySettings.showEmojis;return(0,ye.jsxs)("div",{className:"agent-client-message-plan",children:[(0,ye.jsxs)("div",{className:"agent-client-message-plan-title",children:[a&&(0,ye.jsx)(Yn,{name:"list-checks",className:"agent-client-message-plan-label-icon"}),"Plan"]}),e.entries.map((s,c)=>(0,ye.jsxs)("div",{className:`agent-client-message-plan-entry agent-client-plan-status-${s.status}`,children:[a&&(0,ye.jsx)("span",{className:`agent-client-message-plan-entry-icon agent-client-status-${s.status}`,children:(0,ye.jsx)(Yn,{name:s.status==="completed"?"check":s.status==="in_progress"?"loader":"circle"})})," ",s.content]},c))]})}case"terminal":return(0,ye.jsx)(Wd,{terminalId:e.terminalId,terminalClient:i||null,plugin:t});case"image":return(0,ye.jsx)("div",{className:"agent-client-message-image",children:(0,ye.jsx)("img",{src:`data:${e.mimeType};base64,${e.data}`,alt:"Attached image",className:"agent-client-message-image-thumbnail"})});case"resource_link":return(0,ye.jsxs)("div",{className:"agent-client-message-resource-link",children:[(0,ye.jsx)("span",{className:"agent-client-message-resource-link-icon",ref:a=>{a&&(0,xy.setIcon)(a,"file")}}),(0,ye.jsx)("span",{className:"agent-client-message-resource-link-name",children:e.name})]});default:return(0,ye.jsx)("span",{children:"Unsupported content type"})}}function rL(e){return e.filter(t=>t.type==="text"||t.type==="text_with_context").map(t=>"text"in t?t.text:"").join(`
|
|
`)}function oL({contents:e}){let[t,n]=lk(!1),r=ok(()=>{let o=rL(e);o&&navigator.clipboard.writeText(o).then(()=>{n(!0),setTimeout(()=>n(!1),2e3)}).catch(()=>{})},[e]),i=ok(o=>{o&&(0,xy.setIcon)(o,t?"check":"copy")},[t]);return(0,ye.jsx)("button",{className:"clickable-icon agent-client-message-action-button",onClick:r,"aria-label":"Copy message",ref:i})}function aL(e){let t=[],n=[];for(let r of e)r.type==="image"||r.type==="resource_link"?n.push(r):(n.length>0&&(t.push({type:"attachments",items:n}),n=[]),t.push({type:"single",item:r}));return n.length>0&&t.push({type:"attachments",items:n}),t}var ck=by.memo(function({message:t,plugin:n,terminalClient:r,onApprovePermission:i}){let o=aL(t.content);return(0,ye.jsxs)("div",{className:`agent-client-message-renderer ${t.role==="user"?"agent-client-message-user":"agent-client-message-assistant"}`,children:[o.map((a,s)=>a.type==="attachments"?(0,ye.jsx)("div",{className:"agent-client-message-images-strip",children:a.items.map((c,d)=>(0,ye.jsx)(sk,{content:c,plugin:n,messageId:t.id,messageRole:t.role,terminalClient:r,onApprovePermission:i},d))},s):(0,ye.jsx)("div",{children:(0,ye.jsx)(sk,{content:a.item,plugin:n,messageId:t.id,messageRole:t.role,terminalClient:r,onApprovePermission:i})},s)),t.content.some(a=>(a.type==="text"||a.type==="text_with_context")&&a.text)&&(0,ye.jsx)("div",{className:"agent-client-message-actions",children:(0,ye.jsx)(oL,{contents:t.content})})]})});var Nr=G(Ce(),1),bk=G(ug(),1);function yo(e,t,n){var s;let r=(s=n.initialDeps)!=null?s:[],i,o=!0;function a(){var c,d,m;let l;n.key&&((c=n.debug)!=null&&c.call(n))&&(l=Date.now());let f=e();if(!(f.length!==r.length||f.some((y,x)=>r[x]!==y)))return i;r=f;let h;if(n.key&&((d=n.debug)!=null&&d.call(n))&&(h=Date.now()),i=t(...f),n.key&&((m=n.debug)!=null&&m.call(n))){let y=Math.round((Date.now()-l)*100)/100,x=Math.round((Date.now()-h)*100)/100,S=x/16,g=(b,v)=>{for(b=String(b);b.length<v;)b=" "+b;return b};console.info(`%c\u23F1 ${g(x,5)} /${g(y,5)} ms`,`
|
|
font-size: .6rem;
|
|
font-weight: bold;
|
|
color: hsl(${Math.max(0,Math.min(120-120*S,120))}deg 100% 31%);`,n==null?void 0:n.key)}return n!=null&&n.onChange&&!(o&&n.skipInitialOnChange)&&n.onChange(i),o=!1,i}return a.updateDeps=c=>{r=c},a}function _y(e,t){if(e===void 0)throw new Error(`Unexpected undefined${t?`: ${t}`:""}`);return e}var uk=(e,t)=>Math.abs(e-t)<1.01,dk=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}};var fk=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},sL=e=>e,lL=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let i=t;i<=n;i++)r.push(i);return r},gk=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=a=>{let{width:s,height:c}=a;t({width:Math.round(s),height:Math.round(c)})};if(i(fk(n)),!r.ResizeObserver)return()=>{};let o=new r.ResizeObserver(a=>{let s=()=>{let c=a[0];if(c!=null&&c.borderBoxSize){let d=c.borderBoxSize[0];if(d){i({width:d.inlineSize,height:d.blockSize});return}}i(fk(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},mk={passive:!0};var pk=typeof window=="undefined"?!0:"onscrollend"in window,hk=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=0,o=e.options.useScrollendEvent&&pk?()=>{}:dk(r,()=>{t(i,!1)},e.options.isScrollingResetDelay),a=m=>()=>{let{horizontal:l,isRtl:f}=e.options;i=l?n.scrollLeft*(f&&-1||1):n.scrollTop,o(),t(i,m)},s=a(!0),c=a(!1);n.addEventListener("scroll",s,mk);let d=e.options.useScrollendEvent&&pk;return d&&n.addEventListener("scrollend",c,mk),()=>{n.removeEventListener("scroll",s),d&&n.removeEventListener("scrollend",c)}};var cL=(e,t,n)=>{if(t!=null&&t.borderBoxSize){let r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]};var vk=(e,{adjustments:t=0,behavior:n},r)=>{var i,o;let a=e+t;(o=(i=r.scrollElement)==null?void 0:i.scrollTo)==null||o.call(i,{[r.options.horizontal?"left":"top"]:a,behavior:n})},rf=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 o;var n,r,i;return(o=(i=(r=(n=this.targetWindow)==null?void 0:n.performance)==null?void 0:r.now)==null?void 0:i.call(r))!=null?o:Date.now()},this.observer=(()=>{let n=null,r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(i=>{i.forEach(o=>{let a=()=>{let s=o.target,c=this.indexFromElement(s);if(!s.isConnected){this.observer.unobserve(s);return}this.shouldMeasureDuringScroll(c)&&this.resizeItem(c,this.options.measureElement(s,o,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var i;(i=r())==null||i.disconnect(),n=null},observe:i=>{var o;return(o=r())==null?void 0:o.observe(i,{box:"border-box"})},unobserve:i=>{var o;return(o=r())==null?void 0:o.unobserve(i)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,i])=>{typeof i=="undefined"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:sL,rangeExtractor:lL,onChange:()=>{},measureElement:cL,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,...n}},this.notify=n=>{var r,i;(i=(r=this.options).onChange)==null||i.call(r,this,n)},this.maybeNotify=yo(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{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(n=>n()),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 i;var n;let r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(i=(n=this.scrollElement)==null?void 0:n.window)!=null?i:null,this.elementsCache.forEach(o=>{this.observer.observe(o)}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(o,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o,this.isScrolling=a,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>{var n;return this.options.enabled?(this.scrollRect=(n=this.scrollRect)!=null?n:this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0)},this.getScrollOffset=()=>{var n;return this.options.enabled?(this.scrollOffset=(n=this.scrollOffset)!=null?n:typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset,this.scrollOffset):(this.scrollOffset=null,0)},this.getFurthestMeasurement=(n,r)=>{let i=new Map,o=new Map;for(let a=r-1;a>=0;a--){let s=n[a];if(i.has(s.lane))continue;let c=o.get(s.lane);if(c==null||s.end>c.end?o.set(s.lane,s):s.end<c.end&&i.set(s.lane,!0),i.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((a,s)=>a.end===s.end?a.index-s.index:a.end-s.end)[0]:void 0},this.getMeasurementOptions=yo(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(n,r,i,o,a,s)=>(this.prevLanes!==void 0&&this.prevLanes!==s&&(this.lanesChangedFlag=!0),this.prevLanes=s,this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:i,getItemKey:o,enabled:a,lanes:s}),{key:!1}),this.getMeasurements=yo(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:i,getItemKey:o,enabled:a,lanes:s},c)=>{if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(let f of this.laneAssignments.keys())f>=n&&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 d=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1);let m=this.measurementsCache.slice(0,d),l=new Array(s).fill(void 0);for(let f=0;f<d;f++){let p=m[f];p&&(l[p.lane]=f)}for(let f=d;f<n;f++){let p=o(f),h=this.laneAssignments.get(f),y,x;if(h!==void 0&&this.options.lanes>1){y=h;let v=l[y],_=v!==void 0?m[v]:void 0;x=_?_.end+this.options.gap:r+i}else{let v=this.options.lanes===1?m[f-1]:this.getFurthestMeasurement(m,f);x=v?v.end+this.options.gap:r+i,y=v?v.lane:f%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(f,y)}let S=c.get(p),g=typeof S=="number"?S:this.options.estimateSize(f),b=x+g;m[f]={index:f,start:x,size:g,end:b,key:p,lane:y},l[y]=f}return this.measurementsCache=m,m},{key:!1,debug:()=>this.options.debug}),this.calculateRange=yo(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,i,o)=>this.range=n.length>0&&r>0?uL({measurements:n,outerSize:r,scrollOffset:i,lanes:o}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=yo(()=>{let n=null,r=null,i=this.calculateRange();return i&&(n=i.startIndex,r=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,i,o,a)=>o===null||a===null?[]:n({startIndex:o,endIndex:a,overscan:r,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{let r=this.options.indexAttribute,i=n.getAttribute(r);return i?parseInt(i,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=n=>{var o;var r;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;let i=(o=this.scrollState.index)!=null?o:(r=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:r.index;if(i!==void 0&&this.range){let a=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),s=Math.max(0,i-a),c=Math.min(this.options.count-1,i+a);return n>=s&&n<=c}return!0},this.measureElement=n=>{if(!n){this.elementsCache.forEach((a,s)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(s))});return}let r=this.indexFromElement(n),i=this.options.getItemKey(r),o=this.elementsCache.get(i);o!==n&&(o&&this.observer.unobserve(o),this.observer.observe(n),this.elementsCache.set(i,n)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(r)&&this.resizeItem(r,this.options.measureElement(n,void 0,this))},this.resizeItem=(n,r)=>{var c;var i;let o=this.measurementsCache[n];if(!o)return;let a=(c=this.itemSizeCache.get(o.key))!=null?c:o.size,s=r-a;s!==0&&(((i=this.scrollState)==null?void 0:i.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,s,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=s,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,r)),this.notify(!1))},this.getVirtualItems=yo(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{let i=[];for(let o=0,a=n.length;o<a;o++){let s=n[o],c=r[s];i.push(c)}return i},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{let r=this.getMeasurements();if(r.length!==0)return _y(r[yk(0,r.length-1,i=>_y(r[i]).start,n)])},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 n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(n,r,i=0)=>{if(!this.scrollElement)return 0;let o=this.getSize(),a=this.getScrollOffset();r==="auto"&&(r=n>=a+o?"end":"start"),r==="center"?n+=(i-o)/2:r==="end"&&(n-=o);let s=this.getMaxScrollOffset();return Math.max(Math.min(s,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));let i=this.getSize(),o=this.getScrollOffset(),a=this.measurementsCache[n];if(!a)return;if(r==="auto")if(a.end>=o+i-this.options.scrollPaddingEnd)r="end";else if(a.start<=o+this.options.scrollPaddingStart)r="start";else return[o,r];if(r==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),r];let s=r==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,r,a.size),r]},this.scrollToOffset=(n,{align:r="start",behavior:i="auto"}={})=>{let o=this.getOffsetForAlignment(n,r),a=this.now();this.scrollState={index:null,align:r,behavior:i,startedAt:a,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollToIndex=(n,{align:r="auto",behavior:i="auto"}={})=>{n=Math.max(0,Math.min(n,this.options.count-1));let o=this.getOffsetForIndex(n,r);if(!o)return;let[a,s]=o,c=this.now();this.scrollState={index:n,align:s,behavior:i,startedAt:c,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollBy=(n,{behavior:r="auto"}={})=>{let i=this.getScrollOffset()+n,o=this.now();this.scrollState={index:null,align:"start",behavior:r,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:r}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var o;var n;let r=this.getMeasurements(),i;if(r.length===0)i=this.options.paddingStart;else if(this.options.lanes===1)i=(o=(n=r[r.length-1])==null?void 0:n.end)!=null?o:0;else{let a=Array(this.options.lanes).fill(null),s=r.length-1;for(;s>=0&&a.some(c=>c===null);){let c=r[s];a[c.lane]===null&&(a[c.lane]=c.end),s--}i=Math.max(...a.filter(c=>c!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:r,behavior:i})=>{this.options.scrollToFn(n,{behavior:i,adjustments:r},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 n=5e3;if(this.now()-this.scrollState.startedAt>n){this.scrollState=null;return}let r=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,i=r?r[0]:this.scrollState.lastTargetOffset,o=1,a=i!==this.scrollState.lastTargetOffset;if(!a&&uk(i,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=o){this.scrollState=null;return}}else this.scrollState.stableFrames=0,a&&(this.scrollState.lastTargetOffset=i,this.scrollState.behavior="auto",this._scrollToOffset(i,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}},yk=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,o=n(i);if(o<r)e=i+1;else if(o>r)t=i-1;else return i}return e>0?e-1:0};function uL({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){let i=e.length-1,o=c=>e[c].start;if(e.length<=r)return{startIndex:0,endIndex:i};let a=yk(0,i,o,n),s=a;if(r===1)for(;s<i&&e[s].end<n+t;)s++;else if(r>1){let c=Array(r).fill(0);for(;s<i&&c.some(m=>m<n+t);){let m=e[s];c[m.lane]=m.end,s++}let d=Array(r).fill(n+t);for(;a>=0&&d.some(m=>m>=n);){let m=e[a];d[m.lane]=m.start,a--}a=Math.max(0,a-a%r),s=Math.min(i,s+(r-1-s%r))}return{startIndex:a,endIndex:s}}var Sk=typeof document!="undefined"?Nr.useLayoutEffect:Nr.useEffect;function dL({useFlushSync:e=!0,...t}){let n=Nr.useReducer(()=>({}),{})[1],r={...t,onChange:(o,a)=>{var s;e&&a?(0,bk.flushSync)(n):n(),(s=t.onChange)==null||s.call(t,o,a)}},[i]=Nr.useState(()=>new rf(r));return i.setOptions(r),Sk(()=>i._didMount(),[]),Sk(()=>i._willUpdate()),i}function xk(e){return dL({observeElementRect:gk,observeElementOffset:hk,scrollToFn:vk,...e})}var nt=G(ve()),{useRef:of,useState:mL,useEffect:af,useCallback:pL}=fL;function wk({messages:e,isSending:t,isSessionReady:n,isRestoringSession:r,agentLabel:i,plugin:o,view:a,terminalClient:s,onApprovePermission:c,hasActivePermission:d}){let m=of(null),[l,f]=mL(!0),p=of(!0),h=of(!1),y=xk({count:e.length,getScrollElement:()=>m.current,estimateSize:()=>80,overscan:5});y.shouldAdjustScrollPositionOnItemSizeChange=()=>p.current;let x=pL(()=>{let b=m.current;if(!b)return!0;let v=35,_=b.scrollTop+b.clientHeight>=b.scrollHeight-v;return p.current=_,f(_),_},[]);af(()=>{e.length===0&&(f(!0),p.current=!0)},[e.length]);let S=of(!1);if(af(()=>{t&&!h.current&&(S.current=!0),h.current=t},[t]),af(()=>{if(e.length!==0){if(S.current){S.current=!1,requestAnimationFrame(()=>{y.scrollToIndex(e.length-1,{align:"end",behavior:"smooth"})});return}p.current&&requestAnimationFrame(()=>{y.scrollToIndex(e.length-1,{align:"end"})})}},[e,y]),af(()=>{let b=m.current;if(!b)return;let v=()=>{x()};a.registerDomEvent(b,"scroll",v),x()},[a,x]),e.length===0)return(0,nt.jsx)("div",{ref:m,className:"agent-client-chat-view-messages",children:(0,nt.jsx)("div",{className:"agent-client-chat-empty-state",children:r?"Restoring session...":n?`Start a conversation with ${i}...`:`Connecting to ${i}...`})});let g=y.getVirtualItems();return(0,nt.jsxs)("div",{ref:m,className:"agent-client-chat-view-messages",children:[(0,nt.jsx)("div",{className:"agent-client-virtual-list-inner",style:{height:y.getTotalSize(),position:"relative"},children:g.map(b=>{let v=e[b.index];return(0,nt.jsx)("div",{ref:y.measureElement,"data-index":b.index,className:"agent-client-virtual-item",style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${b.start}px)`},children:(0,nt.jsx)(ck,{message:v,plugin:o,terminalClient:s,onApprovePermission:c})},v.id)})}),(0,nt.jsxs)("div",{className:`agent-client-loading-indicator ${t?"":"agent-client-hidden"}`,children:[(0,nt.jsxs)("div",{className:"agent-client-loading-dots",children:[(0,nt.jsx)("div",{className:"agent-client-loading-dot"}),(0,nt.jsx)("div",{className:"agent-client-loading-dot"}),(0,nt.jsx)("div",{className:"agent-client-loading-dot"}),(0,nt.jsx)("div",{className:"agent-client-loading-dot"}),(0,nt.jsx)("div",{className:"agent-client-loading-dot"}),(0,nt.jsx)("div",{className:"agent-client-loading-dot"}),(0,nt.jsx)("div",{className:"agent-client-loading-dot"}),(0,nt.jsx)("div",{className:"agent-client-loading-dot"}),(0,nt.jsx)("div",{className:"agent-client-loading-dot"})]}),d&&(0,nt.jsx)("span",{className:"agent-client-loading-status",children:"Waiting for permission..."})]}),!l&&(0,nt.jsx)("button",{className:"agent-client-scroll-to-bottom",onClick:()=>{y.scrollToIndex(e.length-1,{align:"end",behavior:"smooth"})},ref:b=>{b&&(0,_k.setIcon)(b,"chevron-down")}})]})}var _L=G(Ce()),mi=require("obsidian");var gL=G(Ce()),Fi=G(ve()),{useRef:hL,useEffect:$k}=gL;function wy({type:e,items:t,selectedIndex:n,onSelect:r,onClose:i,plugin:o,view:a}){let s=hL(null);if($k(()=>{let d=m=>{s.current&&!s.current.contains(m.target)&&i()};return document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[i]),$k(()=>{if(!s.current)return;let d=s.current.children[n];d==null||d.scrollIntoView({block:"nearest"})},[n]),t.length===0)return null;let c=(d,m)=>{let l=m===n,f=m<t.length-1;if(e==="mention"){let p=d;return(0,Fi.jsxs)("div",{className:`agent-client-mention-dropdown-item ${l?"agent-client-selected":""} ${f?"agent-client-has-border":""}`,onClick:()=>r(p),onMouseEnter:()=>{},children:[(0,Fi.jsx)("div",{className:"agent-client-mention-dropdown-item-name",children:p.name}),(0,Fi.jsx)("div",{className:"agent-client-mention-dropdown-item-path",children:p.path})]},`mention-${m}`)}else{let p=d;return(0,Fi.jsxs)("div",{className:`agent-client-mention-dropdown-item ${l?"agent-client-selected":""} ${f?"agent-client-has-border":""}`,onClick:()=>r(p),onMouseEnter:()=>{},children:[(0,Fi.jsxs)("div",{className:"agent-client-mention-dropdown-item-name",children:["/",p.name]}),(0,Fi.jsxs)("div",{className:"agent-client-mention-dropdown-item-path",children:[p.description,p.hint&&` (${p.hint})`]})]},`command-${m}`)}};return(0,Fi.jsx)("div",{ref:s,className:"agent-client-mention-dropdown",children:t.map((d,m)=>c(d,m))})}var vL=G(Ce()),Ck=require("obsidian");var fi=G(ve()),{useEffect:yL}=vL;function $y({errorInfo:e,onClose:t,showEmojis:n,view:r,variant:i="error"}){return yL(()=>{let o=a=>{a.key==="Escape"&&(t(),a.preventDefault())};r.registerDomEvent(document,"keydown",o)},[t,r]),(0,fi.jsxs)("div",{className:`agent-client-error-overlay agent-client-error-overlay--${i}`,children:[(0,fi.jsxs)("div",{className:"agent-client-error-overlay-header",children:[(0,fi.jsx)("h4",{className:"agent-client-error-overlay-title",children:e.title}),(0,fi.jsx)("button",{className:"agent-client-error-overlay-close",onClick:t,"aria-label":"Close",type:"button",ref:o=>{o&&(0,Ck.setIcon)(o,"x")}})]}),(0,fi.jsx)("p",{className:"agent-client-error-overlay-message",children:e.message}),e.suggestion&&(0,fi.jsxs)("div",{className:"agent-client-error-overlay-suggestion",children:[n&&i==="error"&&(0,fi.jsx)(Yn,{name:"circle-alert",className:"agent-client-error-overlay-suggestion-icon"}),i!=="error"?(0,fi.jsx)("code",{className:"agent-client-error-overlay-code",children:e.suggestion}):e.suggestion]})]})}var Cy=require("obsidian"),Hi=G(ve());function Ek({files:e,onRemove:t}){return e.length===0?null:(0,Hi.jsx)("div",{className:"agent-client-attachment-preview-strip",children:e.map(n=>{var r;return(0,Hi.jsxs)("div",{className:"agent-client-attachment-preview-item",children:[n.kind==="image"&&n.data?(0,Hi.jsx)("img",{src:`data:${n.mimeType};base64,${n.data}`,alt:"Attached image",className:"agent-client-attachment-preview-thumbnail"}):(0,Hi.jsxs)("div",{className:"agent-client-attachment-preview-file",children:[(0,Hi.jsx)("span",{className:"agent-client-attachment-preview-file-icon",ref:i=>{i&&(0,Cy.setIcon)(i,"file")}}),(0,Hi.jsx)("span",{className:"agent-client-attachment-preview-file-name",children:(r=n.name)!=null?r:"file"})]}),(0,Hi.jsx)("button",{className:"agent-client-attachment-preview-remove",onClick:()=>t(n.id),title:"Remove attachment",type:"button",ref:i=>{i&&(0,Cy.setIcon)(i,"x")}})]},n.id)})})}var SL=G(Ce()),Or=require("obsidian");var qt=G(ve()),{useRef:Bi,useEffect:Gl,useCallback:bL}=SL;function Ak(e,t,n,r){let i=Bi(null);Gl(()=>{let o=e.current;if(o){if(!t||t.length<=1){i.current&&(o.empty(),i.current=null);return}if(!i.current){let a=new Or.DropdownComponent(o);i.current=a;for(let s of t)a.addOption(s.value,s.label);n&&a.setValue(n),a.onChange(s=>{var c;(c=r.current)==null||c.call(r,s)})}return()=>{i.current&&(o.empty(),i.current=null)}}},[t,e,r,n]),Gl(()=>{i.current&&n&&i.current.setValue(n)},[n])}function sf(e){if(e<1e3)return String(e);let t=e/1e3;return t>=100?`${Math.round(t)}K`:`${t.toFixed(1)}K`}function xL(e){return e>=90?"agent-client-usage-danger":e>=80?"agent-client-usage-warning":e>=70?"agent-client-usage-caution":"agent-client-usage-normal"}function zk({isSending:e,isButtonDisabled:t,hasContent:n,onSendOrStop:r,modes:i,onModeChange:o,models:a,onModelChange:s,configOptions:c,onConfigOptionChange:d,usage:m,isSessionReady:l}){var E,A,T,M,P,V;let f=Bi(null),p=Bi(null),h=Bi(null),y=Bi(null),x=Bi(new Map),S=Bi(o);S.current=o;let g=Bi(s);g.current=s;let b=Bi(d);b.current=d;let v=bL(O=>{O.classList.remove("agent-client-icon-sending","agent-client-icon-active","agent-client-icon-inactive"),e?O.classList.add("agent-client-icon-sending"):O.classList.add(n?"agent-client-icon-active":"agent-client-icon-inactive")},[e,n]);Gl(()=>{if(f.current){let O=e?"square":"send-horizontal";(0,Or.setIcon)(f.current,O);let L=f.current.querySelector("svg");L&&v(L)}},[e,v]),Gl(()=>{if(f.current){let O=f.current.querySelector("svg");O&&v(O)}},[v]);let _=(E=i==null?void 0:i.availableModes)==null?void 0:E.map(O=>({value:O.id,label:O.name}));Ak(p,_,i==null?void 0:i.currentModeId,S);let C=(A=a==null?void 0:a.availableModels)==null?void 0:A.map(O=>({value:O.modelId,label:O.name}));return Ak(h,C,a==null?void 0:a.currentModelId,g),Gl(()=>{var L;let O=y.current;if(O&&(O.empty(),x.current.clear(),!(!c||c.length===0))){for(let w of c){let k=Ma(w.options);if(k.length<=1)continue;let N=w.category?`agent-client-config-selector-${w.category}`:"agent-client-config-selector",j=O.createDiv({cls:`agent-client-config-selector ${N}`,attr:{title:(L=w.description)!=null?L:w.name}}),F=j.createDiv(),K=new Or.DropdownComponent(F);if(w.options.length>0&&"group"in w.options[0])for(let Ue of w.options)for(let ft of Ue.options)K.addOption(ft.value,`${Ue.name} / ${ft.name}`);else for(let Ue of k)K.addOption(Ue.value,Ue.name);K.setValue(w.currentValue);let ne=w.id;K.onChange(Ue=>{b.current&&b.current(ne,Ue)});let ue=j.createSpan({cls:"agent-client-config-selector-icon"});(0,Or.setIcon)(ue,"chevron-down"),x.current.set(w.id,K)}return()=>{O.empty(),x.current.clear()}}},[c]),(0,qt.jsxs)("div",{className:"agent-client-chat-input-actions",children:[m&&(0,qt.jsxs)("span",{className:`agent-client-usage-indicator ${xL(Math.round(m.used/m.size*100))}`,"aria-label":m.cost?`${sf(m.used)} / ${sf(m.size)} tokens
|
|
$${m.cost.amount.toFixed(2)}`:`${sf(m.used)} / ${sf(m.size)} tokens`,children:[Math.round(m.used/m.size*100),"%"]}),c&&c.length>0?(0,qt.jsx)("div",{ref:y,className:"agent-client-config-options-container"}):(0,qt.jsxs)(qt.Fragment,{children:[i&&i.availableModes.length>1&&(0,qt.jsxs)("div",{className:"agent-client-mode-selector",title:(M=(T=i.availableModes.find(O=>O.id===i.currentModeId))==null?void 0:T.description)!=null?M:"Select mode",children:[(0,qt.jsx)("div",{ref:p}),(0,qt.jsx)("span",{className:"agent-client-mode-selector-icon",ref:O=>{O&&(0,Or.setIcon)(O,"chevron-down")}})]}),a&&a.availableModels.length>1&&(0,qt.jsxs)("div",{className:"agent-client-model-selector",title:(V=(P=a.availableModels.find(O=>O.modelId===a.currentModelId))==null?void 0:P.description)!=null?V:"Select model",children:[(0,qt.jsx)("div",{ref:h}),(0,qt.jsx)("span",{className:"agent-client-model-selector-icon",ref:O=>{O&&(0,Or.setIcon)(O,"chevron-down")}})]})]}),(0,qt.jsx)("button",{ref:f,onClick:r,disabled:t,className:`agent-client-chat-send-button ${e?"sending":""} ${t?"agent-client-disabled":""}`,title:l?e?"Stop generation":"Send message":"Connecting..."})]})}var vt=G(ve()),{useRef:cf,useState:Ey,useEffect:lf,useCallback:ct,useMemo:wL}=_L,Ik=5,$L=Ik*1024*1024,Ay=10,Tk=["image/png","image/jpeg","image/gif","image/webp"];function CL(e,t){let n=cf(-1),r=cf(null),i=wL(()=>e.filter(s=>s.role==="user").map(s=>{let c=s.content.find(d=>d.type==="text"||d.type==="text_with_context");return c&&"text"in c?c.text:""}).filter(s=>s.trim()!==""),[e]),o=ct((s,c)=>{if(!c||s.nativeEvent.isComposing||i.length===0)return!1;if(n.current!==-1&&(s.key==="ArrowLeft"||s.key==="ArrowRight"||r.current!==null&&c.value!==r.current))return n.current=-1,r.current=null,!1;if(s.key==="ArrowUp"){if(c.value.trim()!==""&&n.current===-1)return!1;s.preventDefault();let d=n.current+1;if(d>=i.length)return!0;n.current=d;let m=i[i.length-1-d];return r.current=m,t(m),window.setTimeout(()=>{c.selectionStart=m.length,c.selectionEnd=m.length},0),!0}if(s.key==="ArrowDown"){let d=n.current;if(d===-1)return!1;s.preventDefault();let m=d-1;if(n.current=m,m===-1)r.current=null,t("");else{let l=i[i.length-1-m];r.current=l,t(l),window.setTimeout(()=>{c.selectionStart=l.length,c.selectionEnd=l.length},0)}return!0}return!1},[i,t]),a=ct(()=>{n.current=-1,r.current=null},[]);return{handleHistoryKeyDown:o,resetHistory:a}}function kk({isSending:e,isSessionReady:t,isRestoringSession:n,agentLabel:r,availableCommands:i,autoMentionEnabled:o,restoredMessage:a,suggestions:s,plugin:c,view:d,onSendMessage:m,onStopGeneration:l,onRestoredMessageConsumed:f,modes:p,onModeChange:h,models:y,onModelChange:x,configOptions:S,onConfigOptionChange:g,usage:b,supportsImages:v=!1,agentId:_,inputValue:C,onInputChange:E,attachedFiles:A,onAttachedFilesChange:T,errorInfo:M,onClearError:P,agentUpdateNotification:V,onClearAgentUpdate:O,messages:L}){var $s;let{mentions:w,commands:k}=s,N=Ne(),j=Tr(c),F=c.settings.displaySettings.showEmojis,K=($s=c.app.vault.getConfig("spellcheck"))!=null?$s:!0,[ne,ue]=Ey(null),[Ue,ft]=Ey(""),[Wn,wt]=Ey(!1),{handleHistoryKeyDown:Qn,resetHistory:No}=CL(L,E),mt=cf(null),xi=cf(0);lf(()=>{T([])},[_,T]);let Oo=ct(q=>{if(q.length===0)return;let Q=Ay-A.length;if(Q<=0){new mi.Notice(`[Agent Client] Maximum ${Ay} attachments allowed`);return}let se=q.slice(0,Q);se.length<q.length&&new mi.Notice(`[Agent Client] Maximum ${Ay} attachments allowed`),T([...A,...se])},[A,T]),Cp=ct(q=>{T(A.filter(Q=>Q.id!==q))},[A,T]),Mc=ct(async q=>new Promise((Q,se)=>{let pe=new FileReader;pe.onload=()=>{let _n=pe.result.split(",")[1];Q(_n)},pe.onerror=se,pe.readAsDataURL(q)}),[]),Mo=ct(async q=>{let Q=[];for(let se of q){if(se.size>$L){new mi.Notice(`[Agent Client] Image too large (max ${Ik}MB)`);continue}try{let pe=await Mc(se);Q.push({id:crypto.randomUUID(),kind:"image",data:pe,mimeType:se.type})}catch(pe){console.error("Failed to convert image:",pe),new mi.Notice("[Agent Client] Failed to attach image")}}return Q},[Mc]),Ji=ct(q=>{let{webUtils:Q}=require("electron"),se=[];for(let pe of q){let St=Q.getPathForFile(pe);if(!St){new mi.Notice("[Agent Client] Could not determine file path");continue}se.push({id:crypto.randomUUID(),kind:"file",mimeType:pe.type||"application/octet-stream",name:pe.name,path:St,size:pe.size})}return se},[]),Ep=ct(async q=>{var _n;let Q=(_n=q.clipboardData)==null?void 0:_n.items;if(!Q)return;let se=[],pe=[];for(let sn of Array.from(Q)){if(sn.kind!=="file")continue;let wn=sn.getAsFile();wn&&(Tk.includes(sn.type)?se.push(wn):pe.push(wn))}if(se.length===0&&pe.length===0)return;q.preventDefault();let St=[];if(se.length>0)if(v)St.push(...await Mo(se));else{let sn=Ji(se);sn.length>0?St.push(...sn):new mi.Notice("[Agent Client] This agent does not support image paste. Try drag & drop instead.")}pe.length>0&&St.push(...Ji(pe)),Oo(St)},[v,Mo,Ji,Oo]),Ap=ct(q=>{var Q;(Q=q.dataTransfer)!=null&&Q.types.includes("Files")&&(q.preventDefault(),q.dataTransfer.dropEffect="copy")},[]),zp=ct(q=>{var Q;(Q=q.dataTransfer)!=null&&Q.types.includes("Files")&&(q.preventDefault(),xi.current++,xi.current===1&&wt(!0))},[]),Do=ct(q=>{xi.current--,xi.current===0&&wt(!1)},[]),_s=ct(async q=>{var sn;xi.current=0,wt(!1);let Q=(sn=q.dataTransfer)==null?void 0:sn.files;if(!Q||Q.length===0)return;q.preventDefault();let se=Array.from(Q),pe=[],St=[];for(let wn of se)Tk.includes(wn.type)?pe.push(wn):(wn.type||wn.name)&&St.push(wn);let _n=[];pe.length>0&&(v?_n.push(...await Mo(pe)):_n.push(...Ji(pe))),St.length>0&&_n.push(...Ji(St)),Oo(_n)},[v,Mo,Ji,Oo]),Ki=ct(q=>{E(q),window.setTimeout(()=>{let Q=mt.current;if(Q){let se=q.length;Q.selectionStart=se,Q.selectionEnd=se,Q.focus()}},0)},[E]),Wi=ct(q=>{let Q=w.selectSuggestion(C,q);Ki(Q)},[w,C,Ki]),Qi=ct(q=>{let Q=k.selectSuggestion(C,q);if(E(Q),q.hint){let se=`/${q.name} `;ft(se),ue(q.hint)}else ue(null),ft("");window.setTimeout(()=>{let se=mt.current;if(se){let pe=q.hint?`/${q.name} `.length:Q.length;se.selectionStart=pe,se.selectionEnd=pe,se.focus()}},0)},[k,C,E]),Dc=ct(()=>{let q=mt.current;if(q){q.classList.remove("agent-client-textarea-auto-height","agent-client-textarea-expanded"),q.classList.add("agent-client-textarea-auto-height");let Q=q.scrollHeight,se=80,St=Math.max(se,Math.min(Q,300));St>se?(q.classList.add("agent-client-textarea-expanded"),q.style.setProperty("--textarea-height",`${St}px`)):q.style.removeProperty("--textarea-height"),q.classList.remove("agent-client-textarea-auto-height")}},[]),ws=ct(async()=>{if(e){await l();return}if(!C.trim()&&A.length===0)return;let q=C.trim(),Q=A.length>0?[...A]:void 0;E(""),T([]),ue(null),ft(""),No(),await m(q,Q)},[e,C,A,m,l,E,T,No]),Ro=ct(q=>{let Q=k.isOpen,se=w.isOpen;if(!Q&&!se)return!1;if(q.key==="ArrowDown")return q.preventDefault(),Q?k.navigate("down"):w.navigate("down"),!0;if(q.key==="ArrowUp")return q.preventDefault(),Q?k.navigate("up"):w.navigate("up"),!0;if(q.key==="Enter"||q.key==="Tab"){if(q.key==="Enter"&&q.nativeEvent.isComposing)return!1;if(q.preventDefault(),Q){let pe=k.suggestions[k.selectedIndex];pe&&Qi(pe)}else{let pe=w.suggestions[w.selectedIndex];pe&&Wi(pe)}return!0}return q.key==="Escape"?(q.preventDefault(),Q?k.close():w.close(),!0):!1},[k,w,Qi,Wi]),Uo=!e&&(C.trim()===""&&A.length===0||!t||n),Rc=ct(q=>{if(Ro(q)||Qn(q,mt.current))return;let Q=q.metaKey||q.ctrlKey;q.key==="Enter"&&(!q.nativeEvent.isComposing||Q)&&(j.sendMessageShortcut==="enter"?!q.shiftKey:Q)&&(q.preventDefault(),!Uo&&!e&&ws())},[Ro,Qn,e,Uo,ws,j.sendMessageShortcut]),Uc=ct(q=>{let Q=q.target.value,se=q.target.selectionStart||0;if(E(Q),ne){let pe=Ue+ne;Q!==pe&&(ue(null),ft(""))}w.updateSuggestions(Q,se),k.updateSuggestions(Q,se)},[N,ne,Ue,w,k,E]);lf(()=>{Dc()},[C,Dc]),lf(()=>{window.setTimeout(()=>{mt.current&&mt.current.focus()},0)},[]),lf(()=>{a&&(C.trim()||(E(a),window.setTimeout(()=>{mt.current&&(mt.current.focus(),mt.current.selectionStart=a.length,mt.current.selectionEnd=a.length)},0)),f())},[a,f,C,E]);let Pc=`Message ${r} - @ to mention notes${i.length>0?", / for commands":""}`;return(0,vt.jsxs)("div",{className:"agent-client-chat-input-container",children:[M&&(0,vt.jsx)($y,{errorInfo:M,onClose:P,showEmojis:F,view:d}),!M&&V&&(0,vt.jsx)($y,{errorInfo:V,onClose:O,showEmojis:F,view:d,variant:V.variant}),w.isOpen&&(0,vt.jsx)(wy,{type:"mention",items:w.suggestions,selectedIndex:w.selectedIndex,onSelect:Wi,onClose:w.close,plugin:c,view:d}),k.isOpen&&(0,vt.jsx)(wy,{type:"slash-command",items:k.suggestions,selectedIndex:k.selectedIndex,onSelect:Qi,onClose:k.close,plugin:c,view:d}),(0,vt.jsxs)("div",{className:`agent-client-chat-input-box ${Wn?"agent-client-dragging-over":""}`,onDragOver:Ap,onDragEnter:zp,onDragLeave:Do,onDrop:q=>void _s(q),children:[o&&w.activeNote&&(0,vt.jsxs)("div",{className:"agent-client-auto-mention-inline",children:[(0,vt.jsxs)("span",{className:`agent-client-mention-badge ${w.isAutoMentionDisabled?"agent-client-disabled":""}`,children:["@",w.activeNote.name,w.activeNote.selection&&(0,vt.jsxs)("span",{className:"agent-client-selection-indicator",children:[":",w.activeNote.selection.from.line+1,"-",w.activeNote.selection.to.line+1]})]}),(0,vt.jsx)("button",{className:"agent-client-auto-mention-toggle-btn",onClick:q=>{let Q=!w.isAutoMentionDisabled;w.toggleAutoMention(Q);let se=Q?"x":"plus";(0,mi.setIcon)(q.currentTarget,se)},title:w.isAutoMentionDisabled?"Enable auto-mention":"Temporarily disable auto-mention",ref:q=>{if(q){let Q=w.isAutoMentionDisabled?"plus":"x";(0,mi.setIcon)(q,Q)}}})]}),(0,vt.jsxs)("div",{className:"agent-client-textarea-wrapper",children:[(0,vt.jsx)("textarea",{ref:mt,value:C,onChange:Uc,onKeyDown:Rc,onPaste:q=>void Ep(q),placeholder:Pc,className:`agent-client-chat-input-textarea ${o&&w.activeNote?"has-auto-mention":""}`,rows:1,spellCheck:K}),ne&&(0,vt.jsxs)("div",{className:"agent-client-hint-overlay","aria-hidden":"true",children:[(0,vt.jsx)("span",{className:"agent-client-invisible",children:Ue}),(0,vt.jsx)("span",{className:"agent-client-hint-text",children:ne})]})]}),(0,vt.jsx)(Ek,{files:A,onRemove:Cp}),(0,vt.jsx)(zk,{isSending:e,isButtonDisabled:Uo,hasContent:C.trim()!==""||A.length>0,onSendOrStop:()=>void ws(),modes:p,onModeChange:h,models:y,onModelChange:x,configOptions:S,onConfigOptionChange:g,usage:b,isSessionReady:t})]})]})}var Mt=G(ve()),{useState:uf,useRef:it,useEffect:Zn,useMemo:df,useCallback:Pa}=EL,AL=[];function ff({variant:e,viewId:t,workingDirectory:n,initialAgentId:r,config:i,onRegisterCallbacks:o,onAgentIdChanged:a,onMinimize:s,onClose:c,onOpenNewWindow:d,onFloatingHeaderMouseDown:m,viewHost:l,containerEl:f}){var m$,p$;if(!qn.Platform.isDesktopApp)throw new Error("Agent Client is only available on desktop");let{plugin:p,acpClient:h,vaultService:y}=YT(),x=Ne(),S=df(()=>{if(n)return n;let B=p.app.vault.adapter;return B instanceof qn.FileSystemAdapter?B.getBasePath():process.cwd()},[p,n]),[g,b]=uf(S),v=Tr(p),_=ZI(h,p.settingsService,y,g,r),{session:C,isReady:E,messages:A,isSending:T,errorInfo:M}=_,P=pI(y,p,C.availableCommands||AL),V=Pa((B,W,ae,Te)=>{x.log(`[ChatPanel] Session loaded/resumed/forked: ${B}`,{modes:W,models:ae,configOptions:Te}),_.updateSessionFromLoad(B,W,ae,Te)},[x,_.updateSessionFromLoad]),O=qI({agentClient:h,session:C,settingsAccess:p.settingsService,cwd:S,agentCwd:g,onSessionLoad:V,onMessagesRestore:_.setMessagesFromLocal,onIgnoreUpdates:_.setIgnoreUpdates,onClearMessages:_.clearMessages}),[L,w]=uf(!1),[k,N]=uf(""),[j,F]=uf([]),K=it(h),ne=df(()=>{let B=C.agentId;if(B===p.settings.claude.id)return p.settings.claude.displayName||p.settings.claude.id;if(B===p.settings.codex.id)return p.settings.codex.displayName||p.settings.codex.id;if(B===p.settings.gemini.id)return p.settings.gemini.displayName||p.settings.gemini.id;let W=p.settings.customAgents.find(ae=>ae.id===B);return(W==null?void 0:W.displayName)||(W==null?void 0:W.id)||B},[C.agentId,p.settings]),ue=df(()=>p.getAvailableAgents(),[p]),Ue=lI(p,_,O,P,C,A,v,S),{handleSendMessage:ft,handleStopGeneration:Wn,handleNewChat:wt,handleExportChat:Qn,handleSwitchAgent:No,handleRestartAgent:mt,handleSetMode:xi,handleSetModel:Oo,handleSetConfigOption:Cp,handleClearError:Mc,handleClearAgentUpdate:Mo,handleRestoredMessageConsumed:Ji,restoredMessage:Ep,agentUpdateNotification:Ap,setAgentUpdateNotification:zp,autoExportIfEnabled:Do}=Ue,{handleOpenHistory:_s}=eI(p,_,O,S,E,v.debugMode,b),Ki=Pa(async B=>{await wt(B),B&&(a==null||a(B))},[wt,a]),Wi=Pa(()=>{let B=p.app;B.setting.open(),B.setting.openTabById(p.manifest.id)},[p]),Qi=Pa(async B=>{A.length>0&&await Do("newChat",A,C),_.clearMessages(),b(B),await _.restartSession(void 0,B),O.invalidateCache()},[A,C,Do,_.clearMessages,_.restartSession,O.invalidateCache]),Dc=Pa(B=>{let W=new qn.Menu;W.addItem(ae=>{ae.setTitle("Switch agent").setIsLabel(!0)});for(let ae of ue)W.addItem(Te=>{Te.setTitle(ae.displayName).setChecked(ae.id===(C.agentId||"")).onClick(()=>{Ki(ae.id)})});W.addSeparator(),W.addItem(ae=>{ae.setTitle("Open new view").setIcon("copy-plus").onClick(()=>{p.openNewChatViewWithAgent(p.settings.defaultAgentId)})}),W.addItem(ae=>{ae.setTitle("Restart agent").setIcon("refresh-cw").onClick(()=>{mt()})}),W.addItem(ae=>{ae.setTitle("New chat in directory...").setIcon("folder-open").onClick(()=>{new Ll(p.app,g,er=>{Qi(er)}).open()})}),W.addSeparator(),W.addItem(ae=>{ae.setTitle("Plugin settings").setIcon("settings").onClick(()=>{Wi()})}),W.showAtMouseEvent(B.nativeEvent)},[ue,C.agentId,Ki,p,mt,g,Qi,Wi]),ws=Pa(B=>{let W=new qn.Menu;W.addItem(ae=>{ae.setTitle("New chat").setIcon("plus").onClick(()=>{wt()})}),W.addItem(ae=>{ae.setTitle("Session history").setIcon("history").onClick(()=>{_s()})}),W.addItem(ae=>{ae.setTitle("Export chat to Markdown").setIcon("save").onClick(()=>{Qn()})}),W.addSeparator(),d&&W.addItem(ae=>{ae.setTitle("Open new floating chat").setIcon("copy-plus").onClick(()=>{d()})}),W.addItem(ae=>{ae.setTitle("Restart agent").setIcon("refresh-cw").onClick(()=>{mt()})}),W.addItem(ae=>{ae.setTitle("New chat in directory...").setIcon("folder-open").onClick(()=>{new Ll(p.app,g,er=>{Qi(er)}).open()})}),W.addSeparator(),W.addItem(ae=>{ae.setTitle("Plugin settings").setIcon("settings").onClick(()=>{Wi()})}),W.showAtMouseEvent(B.nativeEvent)},[wt,_s,Qn,d,mt,g,Qi,Wi]),Ro=it([]),Uo=df(()=>l||{app:p.app,registerDomEvent:(B,W,ae)=>{B.addEventListener(W,ae),Ro.current.push({target:B,type:W,callback:ae})}},[l,p.app]);Zn(()=>()=>{for(let{target:B,type:W,callback:ae}of Ro.current)B.removeEventListener(W,ae);Ro.current=[]},[]),Zn(()=>{x.log("[Debug] Starting connection setup via useSession..."),_.createSession((i==null?void 0:i.agent)||r)},[_.createSession,i==null?void 0:i.agent,r]),Zn(()=>{if(!(!(i!=null&&i.model)||!E)){if(C.configOptions){let B=C.configOptions.find(W=>W.category==="model");B&&B.currentValue!==i.model&&Ma(B.options).some(ae=>ae.value===i.model)&&(x.log("[ChatPanel] Applying configured model via configOptions:",i.model),_.setConfigOption(B.id,i.model));return}C.models&&C.models.availableModels.some(W=>W.modelId===i.model)&&C.models.currentModelId!==i.model&&(x.log("[ChatPanel] Applying configured model:",i.model),_.setModel(i.model))}},[i==null?void 0:i.model,E,C.configOptions,C.models,_.setConfigOption,_.setModel,x]);let Rc=it(A),Uc=it(C),Pc=it(Do),$s=it(_.closeSession);Rc.current=A,Uc.current=C,Pc.current=Do,$s.current=_.closeSession,Zn(()=>()=>{x.log("[ChatPanel] Cleanup: auto-export and close session"),(async()=>(await Pc.current("closeChat",Rc.current,Uc.current),await $s.current()))()},[x]),Zn(()=>{p.checkForUpdates().then(w).catch(B=>{x.error("Failed to check for updates:",B)})},[p,x]),Zn(()=>{var B;!E||!((B=C.agentInfo)!=null&&B.name)||FI(C.agentInfo).then(zp).catch(W=>{x.error("Failed to check agent update:",W)})},[E,C.agentInfo,x]);let q=it(!1);Zn(()=>{let B=q.current;q.current=T,B&&!T&&C.sessionId&&A.length>0&&(O.saveSessionMessages(C.sessionId,A),x.log(`[ChatPanel] Session messages saved: ${C.sessionId}`),v.enableSystemNotifications&&!document.hasFocus()&&new Notification("Agent Client",{body:`${ne} has completed the response.`}))},[T,C.sessionId,A,O.saveSessionMessages,v.enableSystemNotifications,ne,x]);let Q=it(!1);Zn(()=>{let B=Q.current;Q.current=_.hasActivePermission,!B&&_.hasActivePermission&&v.enableSystemNotifications&&!document.hasFocus()&&new Notification("Agent Client",{body:`${ne} is requesting permission.`})},[_.hasActivePermission,v.enableSystemNotifications,ne]),Zn(()=>{let B=!0,W=async()=>{B&&await P.mentions.updateActiveNote()},ae=y.subscribeSelectionChanges(()=>{W()});return W(),()=>{B=!1,ae()}},[P.mentions.updateActiveNote,y]);let se=it(Ki),pe=it(wt),St=it(_.approveActivePermission),_n=it(_.rejectActivePermission),sn=it(Wn),wn=it(Qn);se.current=Ki,pe.current=wt,St.current=_.approveActivePermission,_n.current=_.rejectActivePermission,sn.current=Wn,wn.current=Qn,Zn(()=>{let B=p.app.workspace,W=B,ae=[W.on("agent-client:toggle-auto-mention",Te=>{Te&&Te!==t||P.mentions.toggleAutoMention()}),W.on("agent-client:new-chat-requested",(Te,er)=>{Te&&Te!==t||(e==="sidebar"?se.current(er):pe.current(er))}),W.on("agent-client:approve-active-permission",Te=>{Te&&Te!==t||(async()=>await St.current()||new qn.Notice("[Agent Client] No active permission request"))()}),W.on("agent-client:reject-active-permission",Te=>{Te&&Te!==t||(async()=>await _n.current()||new qn.Notice("[Agent Client] No active permission request"))()}),W.on("agent-client:cancel-message",Te=>{Te&&Te!==t||sn.current()}),W.on("agent-client:export-chat",Te=>{Te&&Te!==t||wn.current()})];return()=>{for(let Te of ae)B.offref(Te)}},[p.app.workspace,p.lastActiveChatViewId,t,e,P.mentions.toggleAutoMention]);let s$=it(null);Zn(()=>{let B=()=>{p.setLastActiveChatViewId(t)},W=f!=null?f:s$.current;if(W)return W.addEventListener("focus",B,!0),W.addEventListener("click",B),p.setLastActiveChatViewId(t),()=>{W.removeEventListener("focus",B,!0),W.removeEventListener("click",B)}},[p,t,f]);let Lc=it(k),jc=it(j),Tp=it(E),Zc=it(T),Ip=it(O.loading),l$=it(ft);Lc.current=k,jc.current=j,Tp.current=E,Zc.current=T,Ip.current=O.loading,l$.current=ft,Zn(()=>{o==null||o({getDisplayName:()=>ne,getInputState:()=>({text:Lc.current,files:jc.current}),setInputState:B=>{N(B.text),F(B.files)},canSend:()=>(Lc.current.trim()!==""||jc.current.length>0)&&Tp.current&&!Ip.current&&!Zc.current,sendMessage:async()=>{let B=Lc.current,W=jc.current;if(!B.trim()&&W.length===0||!Tp.current||Ip.current||Zc.current)return!1;let ae=B.trim(),Te=W.length>0?[...W]:void 0;return N(""),F([]),await l$.current(ae,Te),!0},cancelOperation:async()=>{Zc.current&&await sn.current()}})},[o,ne]);let aM=v.displaySettings.fontSize!==null?{"--ac-chat-font-size":`${v.displaySettings.fontSize}px`}:void 0,c$=e==="sidebar"?(0,Mt.jsx)(ry,{variant:"sidebar",agentLabel:ne,isUpdateAvailable:L,hasHistoryCapability:O.canShowSessionHistory,onNewChat:()=>void Ki(),onExportChat:()=>void Qn(),onShowMenu:Dc,onOpenHistory:_s}):(0,Mt.jsx)(ry,{variant:"floating",agentLabel:ne,availableAgents:ue,currentAgentId:C.agentId,isUpdateAvailable:L,onAgentChange:B=>void No(B),onShowMenu:ws,onMinimize:s,onClose:c}),u$=g!==S?(0,Mt.jsxs)("div",{className:"agent-client-cwd-banner",title:g,children:[(0,Mt.jsx)("span",{className:"agent-client-cwd-banner-icon",ref:B=>{B&&(0,qn.setIcon)(B,"folder-open")}}),(0,Mt.jsx)("span",{className:"agent-client-cwd-banner-path",children:g})]}):null,d$=(0,Mt.jsx)(wk,{messages:A,isSending:T,isSessionReady:E,isRestoringSession:O.loading,agentLabel:ne,plugin:p,view:Uo,terminalClient:K.current,onApprovePermission:_.approvePermission,hasActivePermission:_.hasActivePermission}),f$=(0,Mt.jsx)(kk,{isSending:T,isSessionReady:E,isRestoringSession:O.loading,agentLabel:ne,availableCommands:C.availableCommands||[],autoMentionEnabled:v.autoMentionActiveNote,restoredMessage:Ep,suggestions:P,plugin:p,view:Uo,onSendMessage:ft,onStopGeneration:Wn,onRestoredMessageConsumed:Ji,modes:C.modes,onModeChange:B=>void xi(B),models:C.models,onModelChange:B=>void Oo(B),configOptions:C.configOptions,onConfigOptionChange:(B,W)=>void Cp(B,W),usage:C.usage,supportsImages:(p$=(m$=C.promptCapabilities)==null?void 0:m$.image)!=null?p$:!1,agentId:C.agentId,inputValue:k,onInputChange:N,attachedFiles:j,onAttachedFilesChange:F,errorInfo:M,onClearError:Mc,agentUpdateNotification:Ap,onClearAgentUpdate:Mo,messages:A});return e==="floating"?(0,Mt.jsxs)(Mt.Fragment,{children:[(0,Mt.jsx)("div",{className:"agent-client-floating-header",onMouseDown:m,children:c$}),u$,(0,Mt.jsxs)("div",{className:"agent-client-floating-content",children:[(0,Mt.jsx)("div",{className:"agent-client-floating-messages-container",children:d$}),f$]})]}):(0,Mt.jsxs)("div",{ref:s$,className:"agent-client-chat-view-container",style:aM,children:[c$,u$,d$,f$]})}var pi=require("obsidian"),Nk=require("@codemirror/view"),mf=require("@codemirror/state");var La=class{constructor(t){this.plugin=t;this.files=[];this.lastBuild=0;this.vaultEventRefs=[];this.currentSelection=null;this.selectionListeners=new Set;this.activeLeafRef=null;this.detachEditorListenerFn=null;this.selectionCompartment=null;this.lastSelectionKey="";this.logger=Ne(),this.rebuildIndex(),this.registerVaultEvents(),this.currentSelection=null,this.selectionListeners=new Set}rebuildIndex(){this.files=this.plugin.app.vault.getMarkdownFiles(),this.lastBuild=Date.now(),this.logger.log(`[VaultService] Rebuilt index with ${this.files.length} files`)}registerVaultEvents(){this.vaultEventRefs.push(this.plugin.app.vault.on("create",t=>{t instanceof pi.TFile&&t.extension==="md"&&this.rebuildIndex()})),this.vaultEventRefs.push(this.plugin.app.vault.on("delete",()=>this.rebuildIndex())),this.vaultEventRefs.push(this.plugin.app.vault.on("rename",t=>{t instanceof pi.TFile&&t.extension==="md"&&this.rebuildIndex()}))}getAllFiles(){return this.files}getFileByPath(t){return this.files.find(n=>n.path===t)||null}async readNote(t){let n=this.plugin.app.vault.getAbstractFileByPath(t);if(!(n instanceof pi.TFile))throw new Error(`File not found: ${t}`);return await this.plugin.app.vault.read(n)}searchNotes(t){if(!t.trim()){let o=this.files.slice().sort((a,s)=>{var c,d;return(((c=s.stat)==null?void 0:c.mtime)||0)-(((d=a.stat)==null?void 0:d.mtime)||0)}).slice(0,20);return Promise.resolve(o.map(a=>this.convertToMetadata(a)))}let n=(0,pi.prepareFuzzySearch)(t.trim()),i=this.files.map(o=>{var p;let a=o.basename,s=o.path,c=this.plugin.app.metadataCache.getFileCache(o),d=(p=c==null?void 0:c.frontmatter)==null?void 0:p.aliases,m=Array.isArray(d)?d:d?[d]:[],l=[a,s,...m],f=-1/0;for(let h of l){let y=n(h);y&&y.score>f&&(f=y.score)}return{file:o,score:f}}).filter(o=>o.score>-1/0).sort((o,a)=>a.score-o.score).slice(0,20).map(o=>this.convertToMetadata(o.file));return Promise.resolve(i)}getActiveNote(){let t=this.plugin.app.workspace.getActiveFile();if(!t)return Promise.resolve(null);let n=this.convertToMetadata(t);return this.currentSelection&&this.currentSelection.filePath===t.path&&(n.selection=this.currentSelection.selection),Promise.resolve(n)}listNotes(){return Promise.resolve(this.files.map(t=>this.convertToMetadata(t)))}subscribeSelectionChanges(t){return this.selectionListeners.add(t),this.ensureSelectionTracking(),()=>{this.selectionListeners.delete(t),this.selectionListeners.size===0&&this.teardownSelectionTracking()}}ensureSelectionTracking(){if(this.activeLeafRef)return;let t=this.plugin.app.workspace.getActiveViewOfType(pi.MarkdownView);this.attachToView(t!=null?t:null),this.activeLeafRef=this.plugin.app.workspace.on("active-leaf-change",n=>{let r=(n==null?void 0:n.view)instanceof pi.MarkdownView?n.view:this.plugin.app.workspace.getActiveViewOfType(pi.MarkdownView);this.attachToView(r!=null?r:null)})}teardownSelectionTracking(){this.detachEditorListener(),this.activeLeafRef&&(this.plugin.app.workspace.offref(this.activeLeafRef),this.activeLeafRef=null),this.lastSelectionKey=""}detachEditorListener(){this.detachEditorListenerFn&&(this.detachEditorListenerFn(),this.detachEditorListenerFn=null),this.selectionCompartment=null}attachToView(t){if(this.detachEditorListener(),!(t!=null&&t.file))return;let{editor:n,file:r}=t,i=r.path;this.lastSelectionKey&&!this.lastSelectionKey.startsWith(`${i}:`)&&this.handleSelectionChange(i,null);let o=()=>{if(n.somethingSelected()){let c=n.listSelections();if(c.length>0){let d=this.normalizeSelection(c[0]);this.handleSelectionChange(i,{from:{line:d.anchor.line,ch:d.anchor.ch},to:{line:d.head.line,ch:d.head.ch}});return}}n.hasFocus()&&this.handleSelectionChange(i,null)},a=n.cm;if(o(),!a){console.warn("[VaultService] CodeMirror 6 API not available. Selection change tracking will not work. This may be due to an Obsidian version change.");return}{let s=new mf.Compartment;this.selectionCompartment=s,a.dispatch({effects:mf.StateEffect.appendConfig.of(s.of(Nk.EditorView.updateListener.of(c=>{c.selectionSet&&o()})))}),this.detachEditorListenerFn=()=>{this.selectionCompartment&&a.dispatch({effects:this.selectionCompartment.reconfigure([])}),this.selectionCompartment=null}}}normalizeSelection(t){var o;let n=t.anchor,r=(o=t.head)!=null?o:t.anchor;return n.line<r.line||n.line===r.line&&n.ch<=r.ch?{anchor:n,head:r}:{anchor:r,head:n}}handleSelectionChange(t,n){let r=t?n?`${t}:${n.from.line}:${n.from.ch}-${n.to.line}:${n.to.ch}`:`${t}:none`:"none";r!==this.lastSelectionKey&&(this.lastSelectionKey=r,t&&n?this.currentSelection={filePath:t,selection:n}:this.currentSelection&&(t===null||this.currentSelection.filePath===t)&&(this.currentSelection=null),this.notifySelectionListeners())}notifySelectionListeners(){for(let t of this.selectionListeners)try{t()}catch(n){console.error("[VaultService] Selection listener error",n)}}destroy(){for(let t of this.vaultEventRefs)this.plugin.app.vault.offref(t);this.vaultEventRefs=[],this.teardownSelectionTracking()}convertToMetadata(t){var i;let n=this.plugin.app.metadataCache.getFileCache(t),r=(i=n==null?void 0:n.frontmatter)==null?void 0:i.aliases;return{path:t.path,name:t.basename,extension:t.extension,created:t.stat.ctime,modified:t.stat.mtime,aliases:Array.isArray(r)?r:r?[r]:void 0}}};var gf=G(ve()),{useState:TL,useEffect:IL,useMemo:kL}=zL,So="agent-client-chat-view";function NL({plugin:e,view:t,viewId:n}){var a;let[r,i]=TL((a=t.getInitialAgentId())!=null?a:void 0),o=kL(()=>({plugin:e,acpClient:t.acpClient,vaultService:t.vaultService,settingsService:e.settingsService}),[e,t.acpClient,t.vaultService]);return IL(()=>t.onAgentIdRestored(c=>{i(c)}),[t]),(0,gf.jsx)(Od,{value:o,children:(0,gf.jsx)(ff,{variant:"sidebar",viewId:n,initialAgentId:r,viewHost:t,onRegisterCallbacks:s=>t.setCallbacks(s),onAgentIdChanged:s=>t.setAgentId(s)})})}var pf=class extends Ok.ItemView{constructor(n,r){var i;super(n);this.root=null;this.viewType="sidebar";this.initialAgentId=null;this.agentIdRestoredCallbacks=new Set;this.callbacks=null;this.plugin=r,this.logger=Ne(),this.navigation=!1,this.viewId=(i=n.id)!=null?i:crypto.randomUUID()}getViewType(){return So}getDisplayText(){return"Agent client"}getIcon(){return"bot-message-square"}getState(){var n;return{initialAgentId:(n=this.initialAgentId)!=null?n:void 0}}async setState(n,r){var o;let i=this.initialAgentId;this.initialAgentId=(o=n.initialAgentId)!=null?o:null,await super.setState(n,r),this.initialAgentId&&this.initialAgentId!==i&&this.agentIdRestoredCallbacks.forEach(a=>a(this.initialAgentId))}getInitialAgentId(){return this.initialAgentId}setAgentId(n){this.initialAgentId=n,this.app.workspace.requestSaveLayout()}onAgentIdRestored(n){return this.agentIdRestoredCallbacks.add(n),()=>{this.agentIdRestoredCallbacks.delete(n)}}setCallbacks(n){this.callbacks=n}getDisplayName(){var n,r;return(r=(n=this.callbacks)==null?void 0:n.getDisplayName())!=null?r:"Chat"}getInputState(){var n,r;return(r=(n=this.callbacks)==null?void 0:n.getInputState())!=null?r:null}setInputState(n){var r;(r=this.callbacks)==null||r.setInputState(n)}async sendMessage(){var n,r;return(r=await((n=this.callbacks)==null?void 0:n.sendMessage()))!=null?r:!1}canSend(){var n,r;return(r=(n=this.callbacks)==null?void 0:n.canSend())!=null?r:!1}async cancelOperation(){var n;await((n=this.callbacks)==null?void 0:n.cancelOperation())}onActivate(){this.logger.log(`[ChatView] Activated: ${this.viewId}`)}onDeactivate(){this.logger.log(`[ChatView] Deactivated: ${this.viewId}`)}focus(){this.app.workspace.revealLeaf(this.leaf).then(()=>{let n=this.containerEl.querySelector("textarea.agent-client-chat-input-textarea");n instanceof HTMLTextAreaElement&&n.focus()})}hasFocus(){return this.containerEl.contains(document.activeElement)}expand(){}collapse(){}getContainerEl(){return this.containerEl}onOpen(){let n=this.containerEl.children[1];return n.empty(),this.acpClient=this.plugin.getOrCreateAcpClient(this.viewId),this.vaultService=new La(this.plugin),this.root=(0,Mk.createRoot)(n),this.root.render((0,gf.jsx)(NL,{plugin:this.plugin,view:this,viewId:this.viewId})),this.plugin.viewRegistry.register(this),Promise.resolve()}async onClose(){var n;this.logger.log("[ChatView] onClose() called"),this.plugin.viewRegistry.unregister(this.viewId),this.root&&(this.root.unmount(),this.root=null),(n=this.vaultService)==null||n.destroy(),await this.plugin.removeAcpClient(this.viewId)}};var OL=G(Ce()),Rk=G(Ml());var Jl=G(ve()),{useState:Xl,useRef:Dk,useEffect:Gi,useCallback:hf,useMemo:zy}=OL;function Yl(e,t,n,r){return{x:Math.max(0,Math.min(e,window.innerWidth-n)),y:Math.max(0,Math.min(t,window.innerHeight-r))}}var ja=class{constructor(t,n){this.viewType="floating";this.root=null;this.callbacks=null;this.setExpanded=null;this.isExpandedState=!1;this.containerRefEl=null;this.plugin=t,this.viewId=`floating-chat-${n}`,this.containerEl=document.body.createDiv({cls:"agent-client-floating-view-root"})}mount(t,n){this.root=(0,Rk.createRoot)(this.containerEl),this.root.render((0,Jl.jsx)(ML,{plugin:this.plugin,viewId:this.viewId,initialExpanded:t,initialPosition:n,onRegisterCallbacks:r=>{this.callbacks=r},onRegisterExpanded:r=>{this.setExpanded=r},onExpandedChange:r=>{this.isExpandedState=r},onContainerRef:r=>{this.containerRefEl=r}})),this.plugin.viewRegistry.register(this)}unmount(){this.plugin.viewRegistry.unregister(this.viewId),this.root&&(this.root.unmount(),this.root=null),this.containerEl.remove()}getDisplayName(){var t,n;return(n=(t=this.callbacks)==null?void 0:t.getDisplayName())!=null?n:"Chat"}onActivate(){this.containerEl.classList.add("is-focused")}onDeactivate(){this.containerEl.classList.remove("is-focused")}focus(){var t;this.isExpandedState||(this.isExpandedState=!0,(t=this.setExpanded)==null||t.call(this,!0)),requestAnimationFrame(()=>{var r;let n=(r=this.containerRefEl)==null?void 0:r.querySelector("textarea.agent-client-chat-input-textarea");n instanceof HTMLTextAreaElement&&n.focus()})}hasFocus(){var t,n;return this.isExpandedState&&((n=(t=this.containerRefEl)==null?void 0:t.contains(document.activeElement))!=null?n:!1)}expand(){var t;this.isExpandedState||(this.isExpandedState=!0,(t=this.setExpanded)==null||t.call(this,!0))}collapse(){var t;this.isExpandedState&&(this.isExpandedState=!1,(t=this.setExpanded)==null||t.call(this,!1))}getInputState(){var t,n;return(n=(t=this.callbacks)==null?void 0:t.getInputState())!=null?n:null}setInputState(t){var n;(n=this.callbacks)==null||n.setInputState(t)}canSend(){var t,n;return(n=(t=this.callbacks)==null?void 0:t.canSend())!=null?n:!1}async sendMessage(){var t,n;return(n=await((t=this.callbacks)==null?void 0:t.sendMessage()))!=null?n:!1}async cancelOperation(){var t;await((t=this.callbacks)==null?void 0:t.cancelOperation())}getContainerEl(){return this.containerEl}};function ML({plugin:e,viewId:t,initialExpanded:n=!1,initialPosition:r,onRegisterCallbacks:i,onRegisterExpanded:o,onExpandedChange:a,onContainerRef:s}){let c=zy(()=>e.getOrCreateAcpClient(t),[e,t]),d=zy(()=>new La(e),[e]);Gi(()=>()=>{d.destroy()},[d]);let m=zy(()=>({plugin:e,acpClient:c,vaultService:d,settingsService:e.settingsService}),[e,c,d]),l=Tr(e),[f,p]=Xl(n);Gi(()=>{o==null||o(p)},[o]);let[h,y]=Xl(null),[x,S]=Xl(l.floatingWindowSize),[g,b]=Xl(()=>r?Yl(r.x,r.y,l.floatingWindowSize.width,l.floatingWindowSize.height):l.floatingWindowPosition?Yl(l.floatingWindowPosition.x,l.floatingWindowPosition.y,l.floatingWindowSize.width,l.floatingWindowSize.height):Yl(window.innerWidth-l.floatingWindowSize.width-50,window.innerHeight-l.floatingWindowSize.height-50,l.floatingWindowSize.width,l.floatingWindowSize.height)),[v,_]=Xl(!1),C=Dk({x:0,y:0}),E=Dk(null);Gi(()=>{y(E.current)},[]),Gi(()=>{a==null||a(f)},[f,a]),Gi(()=>{s==null||s(E.current)},[s,f]);let A=hf(()=>{e.openNewFloatingChat(!0,Yl(g.x-30,g.y-30,x.width,x.height))},[e,g,x.width,x.height]),T=hf(()=>{p(!1)},[]),M=hf(()=>{e.closeFloatingChat(t)},[e,t]);Gi(()=>{if(!f||!E.current)return;let V=new ResizeObserver(O=>{for(let L of O){let{width:w,height:k}=L.contentRect;(Math.abs(w-x.width)>5||Math.abs(k-x.height)>5)&&S({width:w,height:k})}});return V.observe(E.current),()=>V.disconnect()},[f,x.width,x.height]),Gi(()=>{let V=async()=>{(x.width!==l.floatingWindowSize.width||x.height!==l.floatingWindowSize.height)&&await e.saveSettingsAndNotify({...e.settings,floatingWindowSize:x})},O=setTimeout(()=>{V()},500);return()=>clearTimeout(O)},[x,e,l.floatingWindowSize]),Gi(()=>{let V=async()=>{(!l.floatingWindowPosition||g.x!==l.floatingWindowPosition.x||g.y!==l.floatingWindowPosition.y)&&await e.saveSettingsAndNotify({...e.settings,floatingWindowPosition:g})},O=setTimeout(()=>{V()},500);return()=>clearTimeout(O)},[g,e,l.floatingWindowPosition]);let P=hf(V=>{E.current&&(_(!0),C.current={x:V.clientX-g.x,y:V.clientY-g.y})},[g]);return Gi(()=>{let V=L=>{v&&b(Yl(L.clientX-C.current.x,L.clientY-C.current.y,x.width,x.height))},O=()=>{_(!1)};return v&&(window.addEventListener("mousemove",V),window.addEventListener("mouseup",O)),()=>{window.removeEventListener("mousemove",V),window.removeEventListener("mouseup",O)}},[v,x.width,x.height]),(0,Jl.jsx)("div",{ref:E,className:"agent-client-floating-window",style:{left:g.x,top:g.y,width:x.width,height:x.height,display:f?void 0:"none"},children:(0,Jl.jsx)(Od,{value:m,children:(0,Jl.jsx)(ff,{variant:"floating",viewId:t,onRegisterCallbacks:i,onMinimize:T,onClose:M,onOpenNewWindow:A,onFloatingHeaderMouseDown:P,containerEl:h})})})}function Uk(e,t,n=!1,r){let i=new ja(e,t);return i.mount(n,r),i}var DL=G(Ce()),Zk=G(Ml()),qk=require("obsidian");var tn=G(ve()),{useState:Ty,useRef:vf,useEffect:Iy,useCallback:Pk,useMemo:Lk}=DL;function jk(e,t,n,r){return{x:Math.max(0,Math.min(e,window.innerWidth-n)),y:Math.max(0,Math.min(t,window.innerHeight-r))}}var yf=class{constructor(t){this.plugin=t;this.root=null;this.containerEl=document.body.createDiv({cls:"agent-client-floating-button-root"})}mount(){this.root=(0,Zk.createRoot)(this.containerEl),this.root.render((0,tn.jsx)(RL,{plugin:this.plugin}))}unmount(){this.root&&(this.root.unmount(),this.root=null),this.containerEl.remove()}};function RL({plugin:e}){let t=Tr(e),[n,r]=Ty(!1),i=vf(null),o=48,a=220,[s,c]=Ty(()=>t.floatingButtonPosition?jk(t.floatingButtonPosition.x,t.floatingButtonPosition.y,o,o):null),[d,m]=Ty(!1),l=vf({x:0,y:0}),f=vf({x:0,y:0}),p=vf(!1),h=Lk(()=>{var C,E;let _=t.floatingButtonImage;return _?_.startsWith("http://")||_.startsWith("https://")||_.startsWith("data:")?_:(E=(C=e.app.vault.adapter).getResourcePath)==null?void 0:E.call(C,_):null},[t.floatingButtonImage,e.app.vault.adapter]),y=e.getFloatingChatInstances(),x=Lk(()=>{var T;let C=e.viewRegistry.getByType("floating").map(M=>({viewId:M.viewId,label:M.getDisplayName()})),E=new Map;for(let M of C)E.set(M.label,((T=E.get(M.label))!=null?T:0)+1);let A=new Map;return C.map(M=>{var P,V;if(((P=E.get(M.label))!=null?P:0)>1){let O=((V=A.get(M.label))!=null?V:0)+1;return A.set(M.label,O),{viewId:M.viewId,label:O===1?M.label:`${M.label} ${O}`}}return M})},[e.viewRegistry,y]),S=5,g=Pk(_=>{var A,T;let C=(A=s==null?void 0:s.x)!=null?A:window.innerWidth-40-o,E=(T=s==null?void 0:s.y)!=null?T:window.innerHeight-30-o;m(!0),p.current=!1,f.current={x:_.clientX,y:_.clientY},l.current={x:_.clientX-C,y:_.clientY-E},_.preventDefault()},[s]);Iy(()=>{if(!d)return;let _=E=>{let A=E.clientX-f.current.x,T=E.clientY-f.current.y;!p.current&&Math.abs(A)<S&&Math.abs(T)<S||(p.current=!0,c(jk(E.clientX-l.current.x,E.clientY-l.current.y,o,o)))},C=()=>{m(!1)};return window.addEventListener("mousemove",_),window.addEventListener("mouseup",C),()=>{window.removeEventListener("mousemove",_),window.removeEventListener("mouseup",C)}},[d]),Iy(()=>{if(!s)return;let _=setTimeout(()=>{(!t.floatingButtonPosition||s.x!==t.floatingButtonPosition.x||s.y!==t.floatingButtonPosition.y)&&e.saveSettingsAndNotify({...e.settings,floatingButtonPosition:s})},500);return()=>clearTimeout(_)},[s,e,t.floatingButtonPosition]);let b=Pk(()=>{if(p.current)return;let _=e.getFloatingChatInstances();_.length===0?e.openNewFloatingChat(!0):_.length===1?e.expandFloatingChat(_[0]):r(!0)},[e]);if(Iy(()=>{if(!n)return;let _=C=>{i.current&&!i.current.contains(C.target)&&r(!1)};return document.addEventListener("mousedown",_),()=>{document.removeEventListener("mousedown",_)}},[n]),!t.enableFloatingChat)return null;let v=["agent-client-floating-button",h?"has-custom-image":"",d?"is-dragging":""].filter(Boolean).join(" ");return(0,tn.jsxs)(tn.Fragment,{children:[(0,tn.jsx)("div",{className:v,onMouseDown:g,onMouseUp:b,style:s?{left:s.x,top:s.y,right:"auto",bottom:"auto"}:void 0,children:h?(0,tn.jsx)("img",{src:h,alt:"Open chat"}):(0,tn.jsx)("div",{className:"agent-client-floating-button-fallback",ref:_=>{_&&(0,qk.setIcon)(_,"bot-message-square")}})}),n&&(0,tn.jsxs)("div",{ref:i,className:"agent-client-floating-instance-menu",style:s?{bottom:window.innerHeight-s.y+10,...s.x+a>window.innerWidth?{right:window.innerWidth-(s.x+o),left:"auto",top:"auto"}:{left:s.x,right:"auto",top:"auto"}}:void 0,children:[(0,tn.jsx)("div",{className:"agent-client-floating-instance-menu-header",children:"Select session to open"}),x.map(({viewId:_,label:C})=>(0,tn.jsxs)("div",{className:"agent-client-floating-instance-menu-item",onClick:()=>{e.expandFloatingChat(_),e.viewRegistry.setFocused(_),r(!1)},children:[(0,tn.jsx)("span",{className:"agent-client-floating-instance-menu-label",children:C}),x.length>1&&(0,tn.jsx)("button",{className:"agent-client-floating-instance-menu-close",onClick:E=>{E.stopPropagation(),e.closeFloatingChat(_),x.length<=2&&r(!1)},title:"Close session",children:"\xD7"})]},_))]})]})}var Sf=class{constructor(){this.views=new Map;this.focusedViewId=null;this.logger=Ne()}register(t){this.logger.log(`[ChatViewRegistry] Registering view: ${t.viewId} (${t.viewType})`),this.views.set(t.viewId,t),this.views.size===1&&this.setFocused(t.viewId)}unregister(t){var r;this.logger.log(`[ChatViewRegistry] Unregistering view: ${t}`);let n=this.views.get(t);if(n&&n.onDeactivate(),this.views.delete(t),this.focusedViewId===t){let i=Array.from(this.views.keys());this.focusedViewId=i.length>0?i[0]:null,this.focusedViewId&&((r=this.views.get(this.focusedViewId))==null||r.onActivate())}}clear(){this.logger.log("[ChatViewRegistry] Clearing all views");for(let t of this.views.values())t.onDeactivate();this.views.clear(),this.focusedViewId=null}getFocused(){var t;return this.focusedViewId&&(t=this.views.get(this.focusedViewId))!=null?t:null}getFocusedId(){return this.focusedViewId}setFocused(t){var n,r;this.focusedViewId!==t&&this.views.has(t)&&(this.focusedViewId&&((n=this.views.get(this.focusedViewId))==null||n.onDeactivate()),this.focusedViewId=t,(r=this.views.get(t))==null||r.onActivate(),this.logger.log(`[ChatViewRegistry] Focus changed to: ${t}`))}focusNext(){var i;let t=Array.from(this.views.keys());if(t.length===0)return;let r=((this.focusedViewId?t.indexOf(this.focusedViewId):-1)+1)%t.length;this.setFocused(t[r]),(i=this.views.get(t[r]))==null||i.focus()}focusPrevious(){var i;let t=Array.from(this.views.keys());if(t.length===0)return;let r=((this.focusedViewId?t.indexOf(this.focusedViewId):0)-1+t.length)%t.length;this.setFocused(t[r]),(i=this.views.get(t[r]))==null||i.focus()}toFocused(t){let n=this.getFocused();return n?t(n):null}toAll(t){this.views.forEach(t)}toType(t,n){this.views.forEach(r=>{r.viewType===t&&n(r)})}getAll(){return Array.from(this.views.values())}getByType(t){return Array.from(this.views.values()).filter(n=>n.viewType===t)}get(t){var n;return(n=this.views.get(t))!=null?n:null}get size(){return this.views.size}};var ky=require("obsidian");var UL=50,bf=class{constructor(t,n){this.sessionLock=Promise.resolve();this.plugin=t,this.settingsAccess=n}async saveSession(t){this.sessionLock=this.sessionLock.then(async()=>{let n=t,r=this.settingsAccess.getSnapshot();ky.Platform.isWin&&r.windowsWslMode&&t.cwd&&(n={...t,cwd:Pn(t.cwd)});let i=[...r.savedSessions||[]],o=i.findIndex(a=>a.sessionId===n.sessionId);o>=0?i[o]=n:(i.unshift(n),i.length>UL&&i.pop()),await this.settingsAccess.updateSettings({savedSessions:i})}),await this.sessionLock}getSavedSessions(t,n){let r=this.settingsAccess.getSnapshot(),i=r.savedSessions||[];if(t&&(i=i.filter(o=>o.agentId===t)),n){let o=n;ky.Platform.isWin&&r.windowsWslMode&&(o=Pn(n)),i=i.filter(a=>a.cwd===o)}return[...i].sort((o,a)=>new Date(a.updatedAt).getTime()-new Date(o.updatedAt).getTime())}async deleteSession(t){this.sessionLock=this.sessionLock.then(async()=>{let r=(this.settingsAccess.getSnapshot().savedSessions||[]).filter(i=>i.sessionId!==t);await this.settingsAccess.updateSettings({savedSessions:r}),await this.deleteSessionMessages(t)}),await this.sessionLock}getSessionsDir(){return`${this.plugin.app.vault.configDir}/plugins/agent-client/sessions`}async ensureSessionsDir(){let t=this.plugin.app.vault.adapter,n=this.getSessionsDir();await t.exists(n)||await t.mkdir(n)}getSessionFilePath(t){let n=t.replace(/[^a-zA-Z0-9_-]/g,"_");return`${this.getSessionsDir()}/${n}.json`}async saveSessionMessages(t,n,r){await this.ensureSessionsDir();let i=r.map(s=>({...s,timestamp:s.timestamp.toISOString()})),o={version:1,sessionId:t,agentId:n,messages:i,savedAt:new Date().toISOString()},a=this.getSessionFilePath(t);await this.plugin.app.vault.adapter.write(a,JSON.stringify(o,null,2))}async loadSessionMessages(t){let n=this.getSessionFilePath(t),r=this.plugin.app.vault.adapter;if(!await r.exists(n))return null;try{let i=await r.read(n),o=JSON.parse(i);return typeof o.version!="number"||!Array.isArray(o.messages)?(console.warn(`[SessionStorage] Invalid session file structure: ${n}`),null):o.version!==1?(console.warn(`[SessionStorage] Unknown session file version: ${o.version}`),null):o.messages.map(a=>({...a,timestamp:new Date(a.timestamp)}))}catch(i){return console.error(`[SessionStorage] Failed to load session messages: ${i}`),null}}async deleteSessionMessages(t){let n=this.getSessionFilePath(t),r=this.plugin.app.vault.adapter;await r.exists(n)&&await r.remove(n)}};var Ny=class{constructor(t,n){this.listeners=new Set;this.getSnapshot=()=>this.state;this.subscribe=t=>(this.listeners.add(t),()=>this.listeners.delete(t));this.state=t,this.plugin=n,this.sessionStorage=new bf(n,this)}async updateSettings(t){let n={...this.state,...t};this.state=n,this.plugin.settings=n;for(let r of this.listeners)r();await this.plugin.saveSettings()}set(t){this.updateSettings(t)}async saveSession(t){return this.sessionStorage.saveSession(t)}getSavedSessions(t,n){return this.sessionStorage.getSavedSessions(t,n)}async deleteSession(t){return this.sessionStorage.deleteSession(t)}async saveSessionMessages(t,n,r){return this.sessionStorage.saveSessionMessages(t,n,r)}async loadSessionMessages(t){return this.sessionStorage.loadSessionMessages(t)}async deleteSessionMessages(t){return this.sessionStorage.deleteSessionMessages(t)}},Vk=(e,t)=>new Ny(e,t);var J=require("obsidian");var xf=class extends J.PluginSettingTab{constructor(n,r){super(n,r);this.agentSelector=null;this.unsubscribe=null;this.plugin=r}display(){let{containerEl:n}=this;n.empty(),this.agentSelector=null,this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null);let r=n.createDiv({cls:"agent-client-doc-link"});r.createSpan({text:"Need help? Check out the "}),r.createEl("a",{text:"documentation",href:"https://rait-09.github.io/obsidian-agent-client/",attr:{target:"_blank"}}),r.createSpan({text:"."}),this.renderAgentSelector(n),this.unsubscribe=this.plugin.settingsService.subscribe(()=>{this.updateAgentDropdown()}),this.updateAgentDropdown();let i=new J.Setting(n).setName("Node.js path").setDesc("Path to Node.js. Usually leave blank. Only needed if node is in a non-standard location (enter absolute path, e.g. /usr/local/bin/node).").addText(o=>{o.setPlaceholder("Leave blank (login shell auto-resolves)").setValue(this.plugin.settings.nodePath).onChange(async a=>{this.plugin.settings.nodePath=a.trim(),await this.plugin.saveSettings()})});this.addAutoDetectButton(i,"node",async o=>{this.plugin.settings.nodePath=o,await this.plugin.saveSettings()}),new J.Setting(n).setName("Send message shortcut").setDesc("Choose the keyboard shortcut to send messages. Note: If using Cmd/Ctrl+Enter, you may need to remove any hotkeys assigned to Cmd/Ctrl+Enter (Settings \u2192 Hotkeys).").addDropdown(o=>o.addOption("enter","Enter to send, Shift+Enter for newline").addOption("cmd-enter","Cmd/Ctrl+Enter to send, Enter for newline").setValue(this.plugin.settings.sendMessageShortcut).onChange(async a=>{this.plugin.settings.sendMessageShortcut=a,await this.plugin.saveSettings()})),new J.Setting(n).setName("Mentions").setHeading(),new J.Setting(n).setName("Auto-mention active note").setDesc("Include the current note in your messages automatically. The agent will have access to its content without typing @notename.").addToggle(o=>o.setValue(this.plugin.settings.autoMentionActiveNote).onChange(async a=>{this.plugin.settings.autoMentionActiveNote=a,await this.plugin.saveSettings()})),new J.Setting(n).setName("Max note length").setDesc("Maximum characters per mentioned note. Notes longer than this will be truncated.").addText(o=>o.setPlaceholder("10000").setValue(String(this.plugin.settings.displaySettings.maxNoteLength)).onChange(async a=>{let s=parseInt(a,10);!isNaN(s)&&s>=1&&(this.plugin.settings.displaySettings.maxNoteLength=s,await this.plugin.saveSettings())})),new J.Setting(n).setName("Max selection length").setDesc("Maximum characters for text selection in auto-mention. Selections longer than this will be truncated.").addText(o=>o.setPlaceholder("10000").setValue(String(this.plugin.settings.displaySettings.maxSelectionLength)).onChange(async a=>{let s=parseInt(a,10);!isNaN(s)&&s>=1&&(this.plugin.settings.displaySettings.maxSelectionLength=s,await this.plugin.saveSettings())})),new J.Setting(n).setName("Display").setHeading(),new J.Setting(n).setName("Chat view location").setDesc("Where to open new chat views").addDropdown(o=>o.addOption("right-tab","Right pane (tabs)").addOption("right-split","Right pane (split)").addOption("editor-tab","Editor area (tabs)").addOption("editor-split","Editor area (split)").setValue(this.plugin.settings.chatViewLocation).onChange(async a=>{this.plugin.settings.chatViewLocation=a,await this.plugin.saveSettings()})),new J.Setting(n).setName("Chat font size").setDesc(`Adjust the font size of the chat message area (${10}-${30}px).`).addText(o=>{let a=()=>{let c=this.plugin.settings.displaySettings.fontSize;return c===null?"":String(c)},s=async c=>{if(this.plugin.settings.displaySettings.fontSize===c)return;let d={...this.plugin.settings,displaySettings:{...this.plugin.settings.displaySettings,fontSize:c}};await this.plugin.saveSettingsAndNotify(d)};o.setPlaceholder(`${10}-${30}`).setValue(a()).onChange(async c=>{if(c.trim().length===0){await s(null);return}let d=c.trim();if(!/^-?\d+$/.test(d))return;let m=Number.parseInt(d,10);if(m<10||m>30)return;let l=jl(m);if(l===null)return;this.plugin.settings.displaySettings.fontSize!==l&&await s(l)}),o.inputEl.addEventListener("blur",()=>{let c=o.getValue(),d=jl(c);if(c.trim().length>0&&d===null){o.setValue(a());return}if(d!==null){o.setValue(String(d)),this.plugin.settings.displaySettings.fontSize!==d&&s(d);return}o.setValue("")})}),new J.Setting(n).setName("Show emojis").setDesc("Display emoji icons in tool calls, thoughts, plans, and terminal blocks.").addToggle(o=>o.setValue(this.plugin.settings.displaySettings.showEmojis).onChange(async a=>{this.plugin.settings.displaySettings.showEmojis=a,await this.plugin.saveSettings()})),new J.Setting(n).setName("Auto-collapse long diffs").setDesc("Automatically collapse diffs that exceed the line threshold.").addToggle(o=>o.setValue(this.plugin.settings.displaySettings.autoCollapseDiffs).onChange(async a=>{this.plugin.settings.displaySettings.autoCollapseDiffs=a,await this.plugin.saveSettings(),this.display()})),this.plugin.settings.displaySettings.autoCollapseDiffs&&new J.Setting(n).setName("Collapse threshold").setDesc("Diffs with more lines than this will be collapsed by default.").addText(o=>o.setPlaceholder("10").setValue(String(this.plugin.settings.displaySettings.diffCollapseThreshold)).onChange(async a=>{let s=parseInt(a,10);!isNaN(s)&&s>0&&(this.plugin.settings.displaySettings.diffCollapseThreshold=s,await this.plugin.saveSettings())})),new J.Setting(n).setName("Floating chat").setHeading(),new J.Setting(n).setName("Enable floating chat").setDesc("Enable the floating chat button and draggable chat windows.").addToggle(o=>o.setValue(this.plugin.settings.enableFloatingChat).onChange(async a=>{let s=this.plugin.settings.enableFloatingChat;if(await this.plugin.settingsService.updateSettings({enableFloatingChat:a}),a&&!s)this.plugin.openNewFloatingChat();else if(!a&&s){let c=this.plugin.getFloatingChatInstances();for(let d of c)this.plugin.closeFloatingChat(d)}})),new J.Setting(n).setName("Floating button image").setDesc("URL or path to an image for the floating button. Leave empty for default icon.").addText(o=>o.setPlaceholder("https://example.com/avatar.png").setValue(this.plugin.settings.floatingButtonImage).onChange(async a=>{this.plugin.settings.floatingButtonImage=a.trim(),await this.plugin.saveSettings()})),new J.Setting(n).setName("Permissions").setHeading(),new J.Setting(n).setName("Auto-allow permissions").setDesc("Automatically allow all permission requests from agents. \u26A0\uFE0F Use with caution - this gives agents full access to your system.").addToggle(o=>o.setValue(this.plugin.settings.autoAllowPermissions).onChange(async a=>{this.plugin.settings.autoAllowPermissions=a,await this.plugin.saveSettings()})),new J.Setting(n).setName("Notifications").setHeading(),new J.Setting(n).setName("System notifications").setDesc("Show OS notifications when the agent completes a response or requests permission. Notifications are suppressed while Obsidian is focused.").addToggle(o=>o.setValue(this.plugin.settings.enableSystemNotifications).onChange(async a=>{this.plugin.settings.enableSystemNotifications=a,await this.plugin.saveSettings()})),J.Platform.isWin&&(new J.Setting(n).setName("Windows Subsystem for Linux").setHeading(),new J.Setting(n).setName("Enable WSL mode").setDesc("Run agents inside Windows Subsystem for Linux. Recommended for agents like Codex that don't work well in native Windows environments.").addToggle(o=>o.setValue(this.plugin.settings.windowsWslMode).onChange(async a=>{this.plugin.settings.windowsWslMode=a,await this.plugin.saveSettings(),this.display()})),this.plugin.settings.windowsWslMode&&new J.Setting(n).setName("WSL distribution").setDesc("Specify WSL distribution name (leave empty for default). Example: Ubuntu, Debian").addText(o=>o.setPlaceholder("Leave empty for default").setValue(this.plugin.settings.windowsWslDistribution||"").onChange(async a=>{this.plugin.settings.windowsWslDistribution=a.trim()||void 0,await this.plugin.saveSettings()}))),new J.Setting(n).setName("Built-in agents").setHeading(),this.renderClaudeSettings(n),this.renderCodexSettings(n),this.renderGeminiSettings(n),new J.Setting(n).setName("Custom agents").setHeading(),this.renderCustomAgents(n),new J.Setting(n).setName("Export").setHeading(),new J.Setting(n).setName("Export folder").setDesc("Folder where chat exports will be saved").addText(o=>o.setPlaceholder("Agent Client").setValue(this.plugin.settings.exportSettings.defaultFolder).onChange(async a=>{this.plugin.settings.exportSettings.defaultFolder=a,await this.plugin.saveSettings()})),new J.Setting(n).setName("Filename").setDesc("Template for exported filenames. Use {date} for date and {time} for time").addText(o=>o.setPlaceholder("agent_client_{date}_{time}").setValue(this.plugin.settings.exportSettings.filenameTemplate).onChange(async a=>{this.plugin.settings.exportSettings.filenameTemplate=a,await this.plugin.saveSettings()})),new J.Setting(n).setName("Frontmatter tag").setDesc("Tag to add to exported notes. Supports nested tags (e.g., projects/agent-client). Leave empty to disable.").addText(o=>o.setPlaceholder("agent-client").setValue(this.plugin.settings.exportSettings.frontmatterTag).onChange(async a=>{this.plugin.settings.exportSettings.frontmatterTag=a,await this.plugin.saveSettings()})),new J.Setting(n).setName("Include images").setDesc("Include images in exported markdown files").addToggle(o=>o.setValue(this.plugin.settings.exportSettings.includeImages).onChange(async a=>{this.plugin.settings.exportSettings.includeImages=a,await this.plugin.saveSettings(),this.display()})),this.plugin.settings.exportSettings.includeImages&&(new J.Setting(n).setName("Image location").setDesc("Where to save exported images").addDropdown(o=>o.addOption("obsidian","Use Obsidian's attachment setting").addOption("custom","Save to custom folder").addOption("base64","Embed as Base64 (not recommended)").setValue(this.plugin.settings.exportSettings.imageLocation).onChange(async a=>{this.plugin.settings.exportSettings.imageLocation=a,await this.plugin.saveSettings(),this.display()})),this.plugin.settings.exportSettings.imageLocation==="custom"&&new J.Setting(n).setName("Custom image folder").setDesc("Folder path for exported images (relative to vault root)").addText(o=>o.setPlaceholder("Agent Client").setValue(this.plugin.settings.exportSettings.imageCustomFolder).onChange(async a=>{this.plugin.settings.exportSettings.imageCustomFolder=a,await this.plugin.saveSettings()}))),new J.Setting(n).setName("Auto-export on new chat").setDesc("Automatically export the current chat when starting a new chat").addToggle(o=>o.setValue(this.plugin.settings.exportSettings.autoExportOnNewChat).onChange(async a=>{this.plugin.settings.exportSettings.autoExportOnNewChat=a,await this.plugin.saveSettings()})),new J.Setting(n).setName("Auto-export on close chat").setDesc("Automatically export the current chat when closing the chat view").addToggle(o=>o.setValue(this.plugin.settings.exportSettings.autoExportOnCloseChat).onChange(async a=>{this.plugin.settings.exportSettings.autoExportOnCloseChat=a,await this.plugin.saveSettings()})),new J.Setting(n).setName("Open note after export").setDesc("Automatically open the exported note after exporting").addToggle(o=>o.setValue(this.plugin.settings.exportSettings.openFileAfterExport).onChange(async a=>{this.plugin.settings.exportSettings.openFileAfterExport=a,await this.plugin.saveSettings()})),new J.Setting(n).setName("Developer").setHeading(),new J.Setting(n).setName("Debug mode").setDesc("Enable debug logging to console. Useful for development and troubleshooting.").addToggle(o=>o.setValue(this.plugin.settings.debugMode).onChange(async a=>{this.plugin.settings.debugMode=a,await this.plugin.saveSettings()}))}updateAgentDropdown(){if(!this.agentSelector)return;let n=this.plugin.settingsService.getSnapshot(),r=this.agentSelector.getValue();n.defaultAgentId!==r&&this.agentSelector.setValue(n.defaultAgentId)}hide(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)}renderAgentSelector(n){this.plugin.ensureDefaultAgentId(),new J.Setting(n).setName("Default agent").setDesc("Choose which agent is used when opening a new chat view.").addDropdown(r=>{this.agentSelector=r,this.populateAgentDropdown(r),r.setValue(this.plugin.settings.defaultAgentId),r.onChange(async i=>{let o={...this.plugin.settings,defaultAgentId:i};this.plugin.ensureDefaultAgentId(),await this.plugin.saveSettingsAndNotify(o)})})}populateAgentDropdown(n){n.selectEl.empty();for(let r of this.getAgentOptions())n.addOption(r.id,r.label)}refreshAgentDropdown(){this.agentSelector&&(this.populateAgentDropdown(this.agentSelector),this.agentSelector.setValue(this.plugin.settings.defaultAgentId))}getAgentOptions(){let n=(o,a)=>({id:o,label:`${a} (${o})`}),r=[n(this.plugin.settings.claude.id,this.plugin.settings.claude.displayName||this.plugin.settings.claude.id),n(this.plugin.settings.codex.id,this.plugin.settings.codex.displayName||this.plugin.settings.codex.id),n(this.plugin.settings.gemini.id,this.plugin.settings.gemini.displayName||this.plugin.settings.gemini.id)];for(let o of this.plugin.settings.customAgents)if(o.id&&o.id.length>0){let a=o.displayName&&o.displayName.length>0?o.displayName:o.id;r.push(n(o.id,a))}let i=new Set;return r.filter(({id:o})=>i.has(o)?!1:(i.add(o),!0))}renderGeminiSettings(n){let r=this.plugin.settings.gemini;new J.Setting(n).setName(r.displayName||"Gemini CLI").setHeading(),new J.Setting(n).setName("API key").setDesc("Gemini API key. Required if not logging in with a Google account. (Stored as plain text)").addText(o=>{o.setPlaceholder("Enter your Gemini API key").setValue(r.apiKey).onChange(async a=>{this.plugin.settings.gemini.apiKey=a.trim(),await this.plugin.saveSettings()}),o.inputEl.type="password"});let i=new J.Setting(n).setName("Path").setDesc('Command name or path to the Gemini CLI. Use just "gemini" to let the login shell resolve it, or enter an absolute path for a specific version.').addText(o=>{o.setPlaceholder("gemini").setValue(r.command).onChange(async a=>{this.plugin.settings.gemini.command=a.trim(),await this.plugin.saveSettings()})});this.addAutoDetectButton(i,"gemini",async o=>{this.plugin.settings.gemini.command=o,await this.plugin.saveSettings()}),this.addInstallHint(n,"@google/gemini-cli"),new J.Setting(n).setName("Arguments").setDesc('Enter one argument per line. Leave empty to run without arguments.(Currently, the Gemini CLI requires the "--experimental-acp" option.)').addTextArea(o=>{o.setPlaceholder("").setValue(this.formatArgs(r.args)).onChange(async a=>{this.plugin.settings.gemini.args=this.parseArgs(a),await this.plugin.saveSettings()}),o.inputEl.rows=3}),new J.Setting(n).setName("Environment variables").setDesc("Enter KEY=VALUE pairs, one per line. Required to authenticate with Vertex AI. GEMINI_API_KEY is derived from the field above.(Stored as plain text)").addTextArea(o=>{o.setPlaceholder("GOOGLE_CLOUD_PROJECT=...").setValue(this.formatEnv(r.env)).onChange(async a=>{this.plugin.settings.gemini.env=this.parseEnv(a),await this.plugin.saveSettings()}),o.inputEl.rows=3})}renderClaudeSettings(n){let r=this.plugin.settings.claude;new J.Setting(n).setName(r.displayName||"Claude Code (ACP)").setHeading(),new J.Setting(n).setName("API key").setDesc("Anthropic API key. Required if not logging in with an Anthropic account. (Stored as plain text)").addText(o=>{o.setPlaceholder("Enter your Anthropic API key").setValue(r.apiKey).onChange(async a=>{this.plugin.settings.claude.apiKey=a.trim(),await this.plugin.saveSettings()}),o.inputEl.type="password"});let i=new J.Setting(n).setName("Path").setDesc('Command name or path to claude-agent-acp. Use just "claude-agent-acp" to let the login shell resolve it, or enter an absolute path.').addText(o=>{o.setPlaceholder("claude-agent-acp").setValue(r.command).onChange(async a=>{this.plugin.settings.claude.command=a.trim(),await this.plugin.saveSettings()})});this.addAutoDetectButton(i,"claude-agent-acp",async o=>{this.plugin.settings.claude.command=o,await this.plugin.saveSettings()}),this.addInstallHint(n,"@agentclientprotocol/claude-agent-acp"),new J.Setting(n).setName("Arguments").setDesc("Enter one argument per line. Leave empty to run without arguments.").addTextArea(o=>{o.setPlaceholder("").setValue(this.formatArgs(r.args)).onChange(async a=>{this.plugin.settings.claude.args=this.parseArgs(a),await this.plugin.saveSettings()}),o.inputEl.rows=3}),new J.Setting(n).setName("Environment variables").setDesc("Enter KEY=VALUE pairs, one per line. ANTHROPIC_API_KEY is derived from the field above.").addTextArea(o=>{o.setPlaceholder("").setValue(this.formatEnv(r.env)).onChange(async a=>{this.plugin.settings.claude.env=this.parseEnv(a),await this.plugin.saveSettings()}),o.inputEl.rows=3})}renderCodexSettings(n){let r=this.plugin.settings.codex;new J.Setting(n).setName(r.displayName||"Codex").setHeading(),new J.Setting(n).setName("API key").setDesc("OpenAI API key. Required if not logging in with an OpenAI account. (Stored as plain text)").addText(o=>{o.setPlaceholder("Enter your OpenAI API key").setValue(r.apiKey).onChange(async a=>{this.plugin.settings.codex.apiKey=a.trim(),await this.plugin.saveSettings()}),o.inputEl.type="password"});let i=new J.Setting(n).setName("Path").setDesc('Command name or path to codex-acp. Use just "codex-acp" to let the login shell resolve it, or enter an absolute path.').addText(o=>{o.setPlaceholder("codex-acp").setValue(r.command).onChange(async a=>{this.plugin.settings.codex.command=a.trim(),await this.plugin.saveSettings()})});this.addAutoDetectButton(i,"codex-acp",async o=>{this.plugin.settings.codex.command=o,await this.plugin.saveSettings()}),this.addInstallHint(n,"@zed-industries/codex-acp"),new J.Setting(n).setName("Arguments").setDesc("Enter one argument per line. Leave empty to run without arguments.").addTextArea(o=>{o.setPlaceholder("").setValue(this.formatArgs(r.args)).onChange(async a=>{this.plugin.settings.codex.args=this.parseArgs(a),await this.plugin.saveSettings()}),o.inputEl.rows=3}),new J.Setting(n).setName("Environment variables").setDesc("Enter KEY=VALUE pairs, one per line. OPENAI_API_KEY is derived from the field above.").addTextArea(o=>{o.setPlaceholder("").setValue(this.formatEnv(r.env)).onChange(async a=>{this.plugin.settings.codex.env=this.parseEnv(a),await this.plugin.saveSettings()}),o.inputEl.rows=3})}renderCustomAgents(n){this.plugin.settings.customAgents.length===0?n.createEl("p",{text:"No custom agents configured yet."}):this.plugin.settings.customAgents.forEach((r,i)=>{this.renderCustomAgent(n,r,i)}),new J.Setting(n).addButton(r=>{r.setButtonText("Add custom agent").setCta().onClick(async()=>{let i=this.generateCustomAgentId(),o=this.generateCustomAgentDisplayName();this.plugin.settings.customAgents.push({id:i,displayName:o,command:"",args:[],env:[]}),this.plugin.ensureDefaultAgentId(),await this.plugin.saveSettings(),this.display()})})}renderCustomAgent(n,r,i){let o=n.createDiv({cls:"agent-client-custom-agent"});new J.Setting(o).setName("Agent ID").setDesc("Unique identifier used to reference this agent.").addText(s=>{s.setPlaceholder("custom-agent").setValue(r.id).onChange(async c=>{let d=this.plugin.settings.customAgents[i].id,l=c.trim();l.length===0&&(l=this.generateCustomAgentId(),s.setValue(l)),this.plugin.settings.customAgents[i].id=l,this.plugin.settings.defaultAgentId===d&&(this.plugin.settings.defaultAgentId=l),this.plugin.ensureDefaultAgentId(),await this.plugin.saveSettings(),this.refreshAgentDropdown()})}).addExtraButton(s=>{s.setIcon("trash").setTooltip("Delete this agent").onClick(async()=>{this.plugin.settings.customAgents.splice(i,1),this.plugin.ensureDefaultAgentId(),await this.plugin.saveSettings(),this.display()})}),new J.Setting(o).setName("Display name").setDesc("Shown in menus and headers.").addText(s=>{s.setPlaceholder("Custom agent").setValue(r.displayName||r.id).onChange(async c=>{let d=c.trim();this.plugin.settings.customAgents[i].displayName=d.length>0?d:this.plugin.settings.customAgents[i].id,await this.plugin.saveSettings(),this.refreshAgentDropdown()})}),new J.Setting(o).setName("Path").setDesc("Command name or path to the custom agent. Use just the command name to let the login shell resolve it, or enter an absolute path.").addText(s=>{s.setPlaceholder("Command name or path").setValue(r.command).onChange(async c=>{this.plugin.settings.customAgents[i].command=c.trim(),await this.plugin.saveSettings()})}),new J.Setting(o).setName("Arguments").setDesc("Enter one argument per line. Leave empty to run without arguments.").addTextArea(s=>{s.setPlaceholder(`--flag
|
|
--another=value`).setValue(this.formatArgs(r.args)).onChange(async c=>{this.plugin.settings.customAgents[i].args=this.parseArgs(c),await this.plugin.saveSettings()}),s.inputEl.rows=3}),new J.Setting(o).setName("Environment variables").setDesc("Enter KEY=VALUE pairs, one per line. (Stored as plain text)").addTextArea(s=>{s.setPlaceholder("TOKEN=...").setValue(this.formatEnv(r.env)).onChange(async c=>{this.plugin.settings.customAgents[i].env=this.parseEnv(c),await this.plugin.saveSettings()}),s.inputEl.rows=3})}generateCustomAgentDisplayName(){let n="Custom agent",r=new Set;r.add(this.plugin.settings.claude.displayName||this.plugin.settings.claude.id),r.add(this.plugin.settings.codex.displayName||this.plugin.settings.codex.id),r.add(this.plugin.settings.gemini.displayName||this.plugin.settings.gemini.id);for(let a of this.plugin.settings.customAgents)r.add(a.displayName||a.id);if(!r.has(n))return n;let i=2,o=`${n} ${i}`;for(;r.has(o);)i+=1,o=`${n} ${i}`;return o}generateCustomAgentId(){let n="custom-agent",r=new Set(this.plugin.settings.customAgents.map(a=>a.id));if(!r.has(n))return n;let i=2,o=`${n}-${i}`;for(;r.has(o);)i+=1,o=`${n}-${i}`;return o}addInstallHint(n,r){let i=`npm install -g ${r}@latest`,o=document.createDocumentFragment();o.append("Not installed? Run in terminal: "),o.appendChild(document.createElement("code")).textContent=i,new J.Setting(n).setDesc(o).addButton(a=>{a.setButtonText("Copy").onClick(()=>{navigator.clipboard.writeText(i).then(()=>{a.setButtonText("Copied!"),setTimeout(()=>{a.setButtonText("Copy")},1500)},()=>{})})})}addAutoDetectButton(n,r,i){n.addButton(o=>{let a=J.Platform.isWin&&this.plugin.settings.windowsWslMode,s=J.Platform.isWin&&!a?"where":"which";o.setButtonText("Auto-detect").setTooltip(`Run \`${s} ${r}\` to find the path`).onClick(async()=>{o.setButtonText("Detecting\u2026"),o.setDisabled(!0);try{let c=a?await aI(r,this.plugin.settings.windowsWslDistribution||void 0):await oI(r);c?(await i(c),this.display()):(o.setButtonText("Not found"),setTimeout(()=>{o.setButtonText("Auto-detect"),o.setDisabled(!1)},2e3))}catch(c){o.setButtonText("Error"),setTimeout(()=>{o.setButtonText("Auto-detect"),o.setDisabled(!1)},2e3)}})})}formatArgs(n){return n.join(`
|
|
`)}parseArgs(n){return n.split(/\r?\n/).map(r=>r.trim()).filter(r=>r.length>0)}formatEnv(n){return n.map(r=>{var i;return`${r.key}=${(i=r.value)!=null?i:""}`}).join(`
|
|
`)}parseEnv(n){let r=[];for(let i of n.split(/\r?\n/)){let o=i.trim();if(!o)continue;let a=o.indexOf("=");if(a===-1)continue;let s=o.slice(0,a).trim(),c=o.slice(a+1).trim();s&&r.push({key:s,value:c})}return ho(r)}};var a$=require("child_process");var u={};ei(u,{$brand:()=>_f,$input:()=>ex,$output:()=>Qb,NEVER:()=>Dy,TimePrecision:()=>rx,ZodAny:()=>X_,ZodArray:()=>W_,ZodBase64:()=>Ym,ZodBase64URL:()=>Jm,ZodBigInt:()=>gs,ZodBigIntFormat:()=>Qm,ZodBoolean:()=>ps,ZodCIDRv4:()=>Gm,ZodCIDRv6:()=>Xm,ZodCUID:()=>jm,ZodCUID2:()=>Zm,ZodCatch:()=>bw,ZodCodec:()=>sp,ZodCustom:()=>Ac,ZodCustomStringFormat:()=>fs,ZodDate:()=>_c,ZodDefault:()=>pw,ZodDiscriminatedUnion:()=>ew,ZodE164:()=>Km,ZodEmail:()=>Um,ZodEmoji:()=>Pm,ZodEnum:()=>us,ZodError:()=>dZ,ZodExactOptional:()=>dw,ZodFile:()=>cw,ZodFirstPartyTypeKind:()=>Nw,ZodFunction:()=>Tw,ZodGUID:()=>vc,ZodIPv4:()=>Hm,ZodIPv6:()=>Bm,ZodISODate:()=>km,ZodISODateTime:()=>Im,ZodISODuration:()=>Om,ZodISOTime:()=>Nm,ZodIntersection:()=>tw,ZodIssueCode:()=>mZ,ZodJWT:()=>Wm,ZodKSUID:()=>Fm,ZodLazy:()=>Ew,ZodLiteral:()=>lw,ZodMAC:()=>Z_,ZodMap:()=>aw,ZodNaN:()=>_w,ZodNanoID:()=>Lm,ZodNever:()=>J_,ZodNonOptional:()=>op,ZodNull:()=>B_,ZodNullable:()=>mw,ZodNumber:()=>ms,ZodNumberFormat:()=>To,ZodObject:()=>$c,ZodOptional:()=>rp,ZodPipe:()=>ap,ZodPrefault:()=>hw,ZodPromise:()=>zw,ZodReadonly:()=>ww,ZodRealError:()=>on,ZodRecord:()=>Ec,ZodSet:()=>sw,ZodString:()=>ds,ZodStringFormat:()=>Me,ZodSuccess:()=>Sw,ZodSymbol:()=>F_,ZodTemplateLiteral:()=>Cw,ZodTransform:()=>uw,ZodTuple:()=>iw,ZodType:()=>fe,ZodULID:()=>qm,ZodURL:()=>xc,ZodUUID:()=>Si,ZodUndefined:()=>H_,ZodUnion:()=>Cc,ZodUnknown:()=>Y_,ZodVoid:()=>K_,ZodXID:()=>Vm,ZodXor:()=>Q_,_ZodString:()=>Rm,_default:()=>gw,_function:()=>_O,any:()=>eO,array:()=>wc,base64:()=>UN,base64url:()=>PN,bigint:()=>YN,boolean:()=>V_,catch:()=>xw,check:()=>wO,cidrv4:()=>DN,cidrv6:()=>RN,clone:()=>Vt,codec:()=>SO,coerce:()=>lp,config:()=>We,core:()=>yi,cuid:()=>AN,cuid2:()=>zN,custom:()=>$O,date:()=>nO,decode:()=>M_,decodeAsync:()=>R_,describe:()=>CO,discriminatedUnion:()=>lO,e164:()=>LN,email:()=>vN,emoji:()=>CN,encode:()=>O_,encodeAsync:()=>D_,endsWith:()=>ts,enum:()=>np,exactOptional:()=>fw,file:()=>gO,flattenError:()=>oc,float32:()=>HN,float64:()=>BN,formatError:()=>ac,fromJSONSchema:()=>NO,function:()=>_O,getErrorMap:()=>gZ,globalRegistry:()=>It,gt:()=>hi,gte:()=>Ft,guid:()=>yN,hash:()=>FN,hex:()=>VN,hostname:()=>qN,httpUrl:()=>$N,includes:()=>Qa,instanceof:()=>AO,int:()=>Dm,int32:()=>GN,int64:()=>JN,intersection:()=>nw,ipv4:()=>NN,ipv6:()=>MN,iso:()=>Ao,json:()=>TO,jwt:()=>jN,keyof:()=>iO,ksuid:()=>kN,lazy:()=>Aw,length:()=>Eo,literal:()=>pO,locales:()=>wo,looseObject:()=>aO,looseRecord:()=>uO,lowercase:()=>Ka,lt:()=>gi,lte:()=>xn,mac:()=>ON,map:()=>dO,maxLength:()=>Co,maxSize:()=>jr,meta:()=>EO,mime:()=>ns,minLength:()=>Yi,minSize:()=>vi,multipleOf:()=>Lr,nan:()=>yO,nanoid:()=>EN,nativeEnum:()=>mO,negative:()=>bm,never:()=>ep,nonnegative:()=>_m,nonoptional:()=>yw,nonpositive:()=>xm,normalize:()=>is,null:()=>G_,nullable:()=>Sc,nullish:()=>hO,number:()=>q_,object:()=>rO,optional:()=>yc,overwrite:()=>Kn,parse:()=>T_,parseAsync:()=>I_,partialRecord:()=>cO,pipe:()=>bc,positive:()=>Sm,prefault:()=>vw,preprocess:()=>IO,prettifyError:()=>Gy,promise:()=>xO,property:()=>wm,readonly:()=>$w,record:()=>ow,refine:()=>Iw,regex:()=>Ja,regexes:()=>bn,registry:()=>Wf,safeDecode:()=>P_,safeDecodeAsync:()=>j_,safeEncode:()=>U_,safeEncodeAsync:()=>L_,safeParse:()=>k_,safeParseAsync:()=>N_,set:()=>fO,setErrorMap:()=>pZ,size:()=>$o,slugify:()=>ss,startsWith:()=>es,strictObject:()=>oO,string:()=>Mm,stringFormat:()=>ZN,stringbool:()=>zO,success:()=>vO,superRefine:()=>kw,symbol:()=>WN,templateLiteral:()=>bO,toJSONSchema:()=>Am,toLowerCase:()=>os,toUpperCase:()=>as,transform:()=>ip,treeifyError:()=>By,trim:()=>rs,tuple:()=>rw,uint32:()=>XN,uint64:()=>KN,ulid:()=>TN,undefined:()=>QN,union:()=>tp,unknown:()=>zo,uppercase:()=>Wa,url:()=>wN,util:()=>U,uuid:()=>SN,uuidv4:()=>bN,uuidv6:()=>xN,uuidv7:()=>_N,void:()=>tO,xid:()=>IN,xor:()=>sO});var yi={};ei(yi,{$ZodAny:()=>xb,$ZodArray:()=>Eb,$ZodAsyncError:()=>Jn,$ZodBase64:()=>db,$ZodBase64URL:()=>fb,$ZodBigInt:()=>Hf,$ZodBigIntFormat:()=>vb,$ZodBoolean:()=>uc,$ZodCIDRv4:()=>lb,$ZodCIDRv6:()=>cb,$ZodCUID:()=>JS,$ZodCUID2:()=>KS,$ZodCatch:()=>Fb,$ZodCheck:()=>Re,$ZodCheckBigIntFormat:()=>ES,$ZodCheckEndsWith:()=>PS,$ZodCheckGreaterThan:()=>Pf,$ZodCheckIncludes:()=>RS,$ZodCheckLengthEquals:()=>NS,$ZodCheckLessThan:()=>Uf,$ZodCheckLowerCase:()=>MS,$ZodCheckMaxLength:()=>IS,$ZodCheckMaxSize:()=>AS,$ZodCheckMimeType:()=>jS,$ZodCheckMinLength:()=>kS,$ZodCheckMinSize:()=>zS,$ZodCheckMultipleOf:()=>$S,$ZodCheckNumberFormat:()=>CS,$ZodCheckOverwrite:()=>ZS,$ZodCheckProperty:()=>LS,$ZodCheckRegex:()=>OS,$ZodCheckSizeEquals:()=>TS,$ZodCheckStartsWith:()=>US,$ZodCheckStringFormat:()=>Xa,$ZodCheckUpperCase:()=>DS,$ZodCodec:()=>fc,$ZodCustom:()=>Wb,$ZodCustomStringFormat:()=>gb,$ZodDate:()=>Cb,$ZodDefault:()=>jb,$ZodDiscriminatedUnion:()=>Tb,$ZodE164:()=>mb,$ZodEmail:()=>BS,$ZodEmoji:()=>XS,$ZodEncodeError:()=>Mr,$ZodEnum:()=>Mb,$ZodError:()=>rc,$ZodExactOptional:()=>Pb,$ZodFile:()=>Rb,$ZodFunction:()=>Yb,$ZodGUID:()=>FS,$ZodIPv4:()=>ob,$ZodIPv6:()=>ab,$ZodISODate:()=>nb,$ZodISODateTime:()=>tb,$ZodISODuration:()=>rb,$ZodISOTime:()=>ib,$ZodIntersection:()=>Ib,$ZodJWT:()=>pb,$ZodKSUID:()=>eb,$ZodLazy:()=>Kb,$ZodLiteral:()=>Db,$ZodMAC:()=>sb,$ZodMap:()=>Nb,$ZodNaN:()=>Hb,$ZodNanoID:()=>YS,$ZodNever:()=>wb,$ZodNonOptional:()=>qb,$ZodNull:()=>bb,$ZodNullable:()=>Lb,$ZodNumber:()=>Ff,$ZodNumberFormat:()=>hb,$ZodObject:()=>h1,$ZodObjectJIT:()=>Ab,$ZodOptional:()=>Gf,$ZodPipe:()=>Bb,$ZodPrefault:()=>Zb,$ZodPromise:()=>Jb,$ZodReadonly:()=>Gb,$ZodRealError:()=>rn,$ZodRecord:()=>kb,$ZodRegistry:()=>Kf,$ZodSet:()=>Ob,$ZodString:()=>_o,$ZodStringFormat:()=>Oe,$ZodSuccess:()=>Vb,$ZodSymbol:()=>yb,$ZodTemplateLiteral:()=>Xb,$ZodTransform:()=>Ub,$ZodTuple:()=>Bf,$ZodType:()=>oe,$ZodULID:()=>WS,$ZodURL:()=>GS,$ZodUUID:()=>HS,$ZodUndefined:()=>Sb,$ZodUnion:()=>dc,$ZodUnknown:()=>_b,$ZodVoid:()=>$b,$ZodXID:()=>QS,$ZodXor:()=>zb,$brand:()=>_f,$constructor:()=>$,$input:()=>ex,$output:()=>Qb,Doc:()=>cc,JSONSchema:()=>$_,JSONSchemaGenerator:()=>zm,NEVER:()=>Dy,TimePrecision:()=>rx,_any:()=>Cx,_array:()=>Nx,_base64:()=>gm,_base64url:()=>hm,_bigint:()=>yx,_boolean:()=>hx,_catch:()=>iZ,_check:()=>gN,_cidrv4:()=>mm,_cidrv6:()=>pm,_coercedBigint:()=>Sx,_coercedBoolean:()=>vx,_coercedDate:()=>Ix,_coercedNumber:()=>ux,_coercedString:()=>nx,_cuid:()=>am,_cuid2:()=>sm,_custom:()=>Mx,_date:()=>Tx,_decode:()=>zf,_decodeAsync:()=>If,_default:()=>eZ,_discriminatedUnion:()=>q2,_e164:()=>vm,_email:()=>Qf,_emoji:()=>rm,_encode:()=>Af,_encodeAsync:()=>Tf,_endsWith:()=>ts,_enum:()=>X2,_file:()=>Ox,_float32:()=>fx,_float64:()=>mx,_gt:()=>hi,_gte:()=>Ft,_guid:()=>pc,_includes:()=>Qa,_int:()=>dx,_int32:()=>px,_int64:()=>bx,_intersection:()=>V2,_ipv4:()=>dm,_ipv6:()=>fm,_isoDate:()=>ax,_isoDateTime:()=>ox,_isoDuration:()=>lx,_isoTime:()=>sx,_jwt:()=>ym,_ksuid:()=>um,_lazy:()=>sZ,_length:()=>Eo,_literal:()=>J2,_lowercase:()=>Ka,_lt:()=>gi,_lte:()=>xn,_mac:()=>ix,_map:()=>B2,_max:()=>xn,_maxLength:()=>Co,_maxSize:()=>jr,_mime:()=>ns,_min:()=>Ft,_minLength:()=>Yi,_minSize:()=>vi,_multipleOf:()=>Lr,_nan:()=>kx,_nanoid:()=>om,_nativeEnum:()=>Y2,_negative:()=>bm,_never:()=>Ax,_nonnegative:()=>_m,_nonoptional:()=>tZ,_nonpositive:()=>xm,_normalize:()=>is,_null:()=>$x,_nullable:()=>Q2,_number:()=>cx,_optional:()=>W2,_overwrite:()=>Kn,_parse:()=>Fa,_parseAsync:()=>Ha,_pipe:()=>rZ,_positive:()=>Sm,_promise:()=>lZ,_property:()=>wm,_readonly:()=>oZ,_record:()=>H2,_refine:()=>Dx,_regex:()=>Ja,_safeDecode:()=>Nf,_safeDecodeAsync:()=>Mf,_safeEncode:()=>kf,_safeEncodeAsync:()=>Of,_safeParse:()=>Ba,_safeParseAsync:()=>Ga,_set:()=>G2,_size:()=>$o,_slugify:()=>ss,_startsWith:()=>es,_string:()=>tx,_stringFormat:()=>ls,_stringbool:()=>Lx,_success:()=>nZ,_superRefine:()=>Rx,_symbol:()=>_x,_templateLiteral:()=>aZ,_toLowerCase:()=>os,_toUpperCase:()=>as,_transform:()=>K2,_trim:()=>rs,_tuple:()=>F2,_uint32:()=>gx,_uint64:()=>xx,_ulid:()=>lm,_undefined:()=>wx,_union:()=>j2,_unknown:()=>Ex,_uppercase:()=>Wa,_url:()=>gc,_uuid:()=>em,_uuidv4:()=>tm,_uuidv6:()=>nm,_uuidv7:()=>im,_void:()=>zx,_xid:()=>cm,_xor:()=>Z2,clone:()=>Vt,config:()=>We,createStandardJSONSchemaMethod:()=>cs,createToJSONSchemaMethod:()=>jx,decode:()=>dj,decodeAsync:()=>mj,describe:()=>Ux,encode:()=>uj,encodeAsync:()=>fj,extractDefs:()=>qr,finalize:()=>Vr,flattenError:()=>oc,formatError:()=>ac,globalConfig:()=>Kl,globalRegistry:()=>It,initializeContext:()=>Zr,isValidBase64:()=>ub,isValidBase64URL:()=>f1,isValidJWT:()=>m1,locales:()=>wo,meta:()=>Px,parse:()=>Cf,parseAsync:()=>Ef,prettifyError:()=>Gy,process:()=>$e,regexes:()=>bn,registry:()=>Wf,safeDecode:()=>gj,safeDecodeAsync:()=>vj,safeEncode:()=>pj,safeEncodeAsync:()=>hj,safeParse:()=>Xy,safeParseAsync:()=>Yy,toDotPath:()=>Xk,toJSONSchema:()=>Am,treeifyError:()=>By,util:()=>U,version:()=>qS});var Dy=Object.freeze({status:"aborted"});function $(e,t,n){var s;function r(c,d){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:d,constr:a,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,d);let m=a.prototype,l=Object.keys(m);for(let f=0;f<l.length;f++){let p=l[f];p in c||(c[p]=m[p].bind(c))}}let i=(s=n==null?void 0:n.Parent)!=null?s:Object;class o extends i{}Object.defineProperty(o,"name",{value:e});function a(c){var l;var d;let m=n!=null&&n.Parent?new o:this;r(m,c),(l=(d=m._zod).deferred)!=null||(d.deferred=[]);for(let f of m._zod.deferred)f();return m}return Object.defineProperty(a,"init",{value:r}),Object.defineProperty(a,Symbol.hasInstance,{value:c=>{var d,m;return n!=null&&n.Parent&&c instanceof n.Parent?!0:(m=(d=c==null?void 0:c._zod)==null?void 0:d.traits)==null?void 0:m.has(e)}}),Object.defineProperty(a,"name",{value:e}),a}var _f=Symbol("zod_brand"),Jn=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Mr=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},Kl={};function We(e){return e&&Object.assign(Kl,e),Kl}var U={};ei(U,{BIGINT_FORMAT_RANGES:()=>Hy,Class:()=>Uy,NUMBER_FORMAT_RANGES:()=>Fy,aborted:()=>Pr,allowsEval:()=>jy,assert:()=>qL,assertEqual:()=>PL,assertIs:()=>jL,assertNever:()=>ZL,assertNotEqual:()=>LL,assignProp:()=>Rr,base64ToUint8Array:()=>Hk,base64urlToUint8Array:()=>oj,cached:()=>qa,captureStackTrace:()=>$f,cleanEnum:()=>rj,cleanRegex:()=>ec,clone:()=>Vt,cloneDef:()=>FL,createTransparentProxy:()=>JL,defineLazy:()=>me,esc:()=>wf,escapeRegex:()=>Vn,extend:()=>QL,finalizeIssue:()=>nn,floatSafeRemainder:()=>Py,getElementAtPath:()=>HL,getEnumValues:()=>Ql,getLengthableOrigin:()=>ic,getParsedType:()=>YL,getSizableOrigin:()=>nc,hexToUint8Array:()=>sj,isObject:()=>bo,isPlainObject:()=>Ur,issue:()=>Va,joinValues:()=>z,jsonStringifyReplacer:()=>Za,merge:()=>tj,mergeDefs:()=>Xi,normalizeParams:()=>Z,nullish:()=>Dr,numKeys:()=>XL,objectClone:()=>VL,omit:()=>WL,optionalKeys:()=>Vy,parsedType:()=>R,partial:()=>nj,pick:()=>KL,prefixIssues:()=>Sn,primitiveTypes:()=>qy,promiseAllObject:()=>BL,propertyKeyTypes:()=>tc,randomString:()=>GL,required:()=>ij,safeExtend:()=>ej,shallowClone:()=>Zy,slugify:()=>Ly,stringifyPrimitive:()=>D,uint8ArrayToBase64:()=>Bk,uint8ArrayToBase64url:()=>aj,uint8ArrayToHex:()=>lj,unwrapMessage:()=>Wl});function PL(e){return e}function LL(e){return e}function jL(e){}function ZL(e){throw new Error("Unexpected value in exhaustive check")}function qL(e){}function Ql(e){let t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,i])=>t.indexOf(+r)===-1).map(([r,i])=>i)}function z(e,t="|"){return e.map(n=>D(n)).join(t)}function Za(e,t){return typeof t=="bigint"?t.toString():t}function qa(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function Dr(e){return e==null}function ec(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Py(e,t){let n=(e.toString().split(".")[1]||"").length,r=t.toString(),i=(r.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(r)){let c=r.match(/\d?e-(\d?)/);c!=null&&c[1]&&(i=Number.parseInt(c[1]))}let o=n>i?n:i,a=Number.parseInt(e.toFixed(o).replace(".","")),s=Number.parseInt(t.toFixed(o).replace(".",""));return a%s/10**o}var Fk=Symbol("evaluating");function me(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Fk)return r===void 0&&(r=Fk,r=n()),r},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function VL(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Rr(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Xi(...e){let t={};for(let n of e){let r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function FL(e){return Xi(e._zod.def)}function HL(e,t){return t?t.reduce((n,r)=>n==null?void 0:n[r],e):e}function BL(e){let t=Object.keys(e),n=t.map(r=>e[r]);return Promise.all(n).then(r=>{let i={};for(let o=0;o<t.length;o++)i[t[o]]=r[o];return i})}function GL(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let r=0;r<e;r++)n+=t[Math.floor(Math.random()*t.length)];return n}function wf(e){return JSON.stringify(e)}function Ly(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var $f="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function bo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var jy=qa(()=>{var e;if(typeof navigator!="undefined"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{let t=Function;return new t(""),!0}catch(t){return!1}});function Ur(e){if(bo(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(bo(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Zy(e){return Ur(e)?{...e}:Array.isArray(e)?[...e]:e}function XL(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var YL=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map!="undefined"&&e instanceof Map?"map":typeof Set!="undefined"&&e instanceof Set?"set":typeof Date!="undefined"&&e instanceof Date?"date":typeof File!="undefined"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},tc=new Set(["string","number","symbol"]),qy=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Vn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Vt(e,t,n){let r=new e._zod.constr(t!=null?t:e._zod.def);return(!t||n!=null&&n.parent)&&(r._zod.parent=e),r}function Z(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function JL(e){let t;return new Proxy({},{get(n,r,i){return t!=null||(t=e()),Reflect.get(t,r,i)},set(n,r,i,o){return t!=null||(t=e()),Reflect.set(t,r,i,o)},has(n,r){return t!=null||(t=e()),Reflect.has(t,r)},deleteProperty(n,r){return t!=null||(t=e()),Reflect.deleteProperty(t,r)},ownKeys(n){return t!=null||(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t!=null||(t=e()),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t!=null||(t=e()),Reflect.defineProperty(t,r,i)}})}function D(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Vy(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var Fy={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Hy={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function KL(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=Xi(e._zod.def,{get shape(){let a={};for(let s in t){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(a[s]=n.shape[s])}return Rr(this,"shape",a),a},checks:[]});return Vt(e,o)}function WL(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=Xi(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let s in t){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete a[s]}return Rr(this,"shape",a),a},checks:[]});return Vt(e,o)}function QL(e,t){if(!Ur(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let o=e._zod.def.shape;for(let a in t)if(Object.getOwnPropertyDescriptor(o,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=Xi(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Rr(this,"shape",o),o}});return Vt(e,i)}function ej(e,t){if(!Ur(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=Xi(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t};return Rr(this,"shape",r),r}});return Vt(e,n)}function tj(e,t){let n=Xi(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return Rr(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Vt(e,n)}function nj(e,t,n){let i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=Xi(t._zod.def,{get shape(){let s=t._zod.def.shape,c={...s};if(n)for(let d in n){if(!(d in s))throw new Error(`Unrecognized key: "${d}"`);n[d]&&(c[d]=e?new e({type:"optional",innerType:s[d]}):s[d])}else for(let d in s)c[d]=e?new e({type:"optional",innerType:s[d]}):s[d];return Rr(this,"shape",c),c},checks:[]});return Vt(t,a)}function ij(e,t,n){let r=Xi(t._zod.def,{get shape(){let i=t._zod.def.shape,o={...i};if(n)for(let a in n){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(o[a]=new e({type:"nonoptional",innerType:i[a]}))}else for(let a in i)o[a]=new e({type:"nonoptional",innerType:i[a]});return Rr(this,"shape",o),o}});return Vt(t,r)}function Pr(e,t=0){var n;if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(((n=e.issues[r])==null?void 0:n.continue)!==!0)return!0;return!1}function Sn(e,t){return t.map(n=>{var i;var r;return(i=(r=n).path)!=null||(r.path=[]),n.path.unshift(e),n})}function Wl(e){return typeof e=="string"?e:e==null?void 0:e.message}function nn(e,t,n){var i,o,a,s,c,d,m,l,f,p,h;let r={...e,path:(i=e.path)!=null?i:[]};if(!e.message){let y=(h=(p=(l=(d=Wl((s=(a=(o=e.inst)==null?void 0:o._zod.def)==null?void 0:a.error)==null?void 0:s.call(a,e)))!=null?d:Wl((c=t==null?void 0:t.error)==null?void 0:c.call(t,e)))!=null?l:Wl((m=n.customError)==null?void 0:m.call(n,e)))!=null?p:Wl((f=n.localeError)==null?void 0:f.call(n,e)))!=null?h:"Invalid input";r.message=y}return delete r.inst,delete r.continue,t!=null&&t.reportInput||delete r.input,r}function nc(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function ic(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function R(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function Va(...e){let[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function rj(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Hk(e){let t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}function Bk(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function oj(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return Hk(t+n)}function aj(e){return Bk(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function sj(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let r=0;r<t.length;r+=2)n[r/2]=Number.parseInt(t.slice(r,r+2),16);return n}function lj(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Uy=class{constructor(...t){}};var Gk=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Za,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},rc=$("$ZodError",Gk),rn=$("$ZodError",Gk,{Parent:Error});function oc(e,t=n=>n.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function ac(e,t=n=>n.message){let n={_errors:[]},r=i=>{for(let o of i.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(a=>r({issues:a}));else if(o.code==="invalid_key")r({issues:o.issues});else if(o.code==="invalid_element")r({issues:o.issues});else if(o.path.length===0)n._errors.push(t(o));else{let a=n,s=0;for(;s<o.path.length;){let c=o.path[s];s===o.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(t(o))):a[c]=a[c]||{_errors:[]},a=a[c],s++}}};return r(e),n}function By(e,t=n=>n.message){let n={errors:[]},r=(i,o=[])=>{var c,d,m,l;var a,s;for(let f of i.issues)if(f.code==="invalid_union"&&f.errors.length)f.errors.map(p=>r({issues:p},f.path));else if(f.code==="invalid_key")r({issues:f.issues},f.path);else if(f.code==="invalid_element")r({issues:f.issues},f.path);else{let p=[...o,...f.path];if(p.length===0){n.errors.push(t(f));continue}let h=n,y=0;for(;y<p.length;){let x=p[y],S=y===p.length-1;typeof x=="string"?((c=h.properties)!=null||(h.properties={}),(d=(a=h.properties)[x])!=null||(a[x]={errors:[]}),h=h.properties[x]):((m=h.items)!=null||(h.items=[]),(l=(s=h.items)[x])!=null||(s[x]={errors:[]}),h=h.items[x]),S&&h.errors.push(t(f)),y++}}};return r(e),n}function Xk(e){let t=[],n=e.map(r=>typeof r=="object"?r.key:r);for(let r of n)typeof r=="number"?t.push(`[${r}]`):typeof r=="symbol"?t.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?t.push(`[${JSON.stringify(r)}]`):(t.length&&t.push("."),t.push(r));return t.join("")}function Gy(e){var r;let t=[],n=[...e.issues].sort((i,o)=>{var a,s;return((a=i.path)!=null?a:[]).length-((s=o.path)!=null?s:[]).length});for(let i of n)t.push(`\u2716 ${i.message}`),(r=i.path)!=null&&r.length&&t.push(` \u2192 at ${Xk(i.path)}`);return t.join(`
|
|
`)}var Fa=e=>(t,n,r,i)=>{var s;let o=r?Object.assign(r,{async:!1}):{async:!1},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise)throw new Jn;if(a.issues.length){let c=new((s=i==null?void 0:i.Err)!=null?s:e)(a.issues.map(d=>nn(d,o,We())));throw $f(c,i==null?void 0:i.callee),c}return a.value},Cf=Fa(rn),Ha=e=>async(t,n,r,i)=>{var s;let o=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){let c=new((s=i==null?void 0:i.Err)!=null?s:e)(a.issues.map(d=>nn(d,o,We())));throw $f(c,i==null?void 0:i.callee),c}return a.value},Ef=Ha(rn),Ba=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new Jn;return o.issues.length?{success:!1,error:new(e!=null?e:rc)(o.issues.map(a=>nn(a,i,We())))}:{success:!0,data:o.value}},Xy=Ba(rn),Ga=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(a=>nn(a,i,We())))}:{success:!0,data:o.value}},Yy=Ga(rn),Af=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Fa(e)(t,n,i)},uj=Af(rn),zf=e=>(t,n,r)=>Fa(e)(t,n,r),dj=zf(rn),Tf=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ha(e)(t,n,i)},fj=Tf(rn),If=e=>async(t,n,r)=>Ha(e)(t,n,r),mj=If(rn),kf=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ba(e)(t,n,i)},pj=kf(rn),Nf=e=>(t,n,r)=>Ba(e)(t,n,r),gj=Nf(rn),Of=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ga(e)(t,n,i)},hj=Of(rn),Mf=e=>async(t,n,r)=>Ga(e)(t,n,r),vj=Mf(rn);var bn={};ei(bn,{base64:()=>dS,base64url:()=>Df,bigint:()=>vS,boolean:()=>SS,browserEmail:()=>Cj,cidrv4:()=>cS,cidrv6:()=>uS,cuid:()=>Jy,cuid2:()=>Ky,date:()=>mS,datetime:()=>gS,domain:()=>zj,duration:()=>nS,e164:()=>fS,email:()=>rS,emoji:()=>oS,extendedDuration:()=>yj,guid:()=>iS,hex:()=>Tj,hostname:()=>Aj,html5Email:()=>_j,idnEmail:()=>$j,integer:()=>yS,ipv4:()=>aS,ipv6:()=>sS,ksuid:()=>eS,lowercase:()=>_S,mac:()=>lS,md5_base64:()=>kj,md5_base64url:()=>Nj,md5_hex:()=>Ij,nanoid:()=>tS,null:()=>bS,number:()=>Rf,rfc5322Email:()=>wj,sha1_base64:()=>Mj,sha1_base64url:()=>Dj,sha1_hex:()=>Oj,sha256_base64:()=>Uj,sha256_base64url:()=>Pj,sha256_hex:()=>Rj,sha384_base64:()=>jj,sha384_base64url:()=>Zj,sha384_hex:()=>Lj,sha512_base64:()=>Vj,sha512_base64url:()=>Fj,sha512_hex:()=>qj,string:()=>hS,time:()=>pS,ulid:()=>Wy,undefined:()=>xS,unicodeEmail:()=>Yk,uppercase:()=>wS,uuid:()=>xo,uuid4:()=>Sj,uuid6:()=>bj,uuid7:()=>xj,xid:()=>Qy});var Jy=/^[cC][^\s-]{8,}$/,Ky=/^[0-9a-z]+$/,Wy=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Qy=/^[0-9a-vA-V]{20}$/,eS=/^[A-Za-z0-9]{27}$/,tS=/^[a-zA-Z0-9_-]{21}$/,nS=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,yj=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,iS=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,xo=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Sj=xo(4),bj=xo(6),xj=xo(7),rS=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,_j=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,wj=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Yk=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,$j=Yk,Cj=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Ej="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function oS(){return new RegExp(Ej,"u")}var aS=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,sS=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,lS=e=>{let t=Vn(e!=null?e:":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},cS=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,uS=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,dS=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Df=/^[A-Za-z0-9_-]*$/,Aj=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,zj=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,fS=/^\+[1-9]\d{6,14}$/,Jk="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",mS=new RegExp(`^${Jk}$`);function Kk(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function pS(e){return new RegExp(`^${Kk(e)}$`)}function gS(e){let t=Kk({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${t}(?:${n.join("|")})`;return new RegExp(`^${Jk}T(?:${r})$`)}var hS=e=>{var n,r;let t=e?`[\\s\\S]{${(n=e==null?void 0:e.minimum)!=null?n:0},${(r=e==null?void 0:e.maximum)!=null?r:""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},vS=/^-?\d+n?$/,yS=/^-?\d+$/,Rf=/^-?\d+(?:\.\d+)?$/,SS=/^(?:true|false)$/i,bS=/^null$/i;var xS=/^undefined$/i;var _S=/^[^A-Z]*$/,wS=/^[^a-z]*$/,Tj=/^[0-9a-fA-F]*$/;function sc(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function lc(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Ij=/^[0-9a-fA-F]{32}$/,kj=sc(22,"=="),Nj=lc(22),Oj=/^[0-9a-fA-F]{40}$/,Mj=sc(27,"="),Dj=lc(27),Rj=/^[0-9a-fA-F]{64}$/,Uj=sc(43,"="),Pj=lc(43),Lj=/^[0-9a-fA-F]{96}$/,jj=sc(64,""),Zj=lc(64),qj=/^[0-9a-fA-F]{128}$/,Vj=sc(86,"=="),Fj=lc(86);var Re=$("$ZodCheck",(e,t)=>{var r,i;var n;(r=e._zod)!=null||(e._zod={}),e._zod.def=t,(i=(n=e._zod).onattach)!=null||(n.onattach=[])}),Qk={number:"number",bigint:"bigint",object:"date"},Uf=$("$ZodCheckLessThan",(e,t)=>{Re.init(e,t);let n=Qk[typeof t.value];e._zod.onattach.push(r=>{var a;let i=r._zod.bag,o=(a=t.inclusive?i.maximum:i.exclusiveMaximum)!=null?a:Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Pf=$("$ZodCheckGreaterThan",(e,t)=>{Re.init(e,t);let n=Qk[typeof t.value];e._zod.onattach.push(r=>{var a;let i=r._zod.bag,o=(a=t.inclusive?i.minimum:i.exclusiveMinimum)!=null?a:Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),$S=$("$ZodCheckMultipleOf",(e,t)=>{Re.init(e,t),e._zod.onattach.push(n=>{var i;var r;(i=(r=n._zod.bag).multipleOf)!=null||(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):Py(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),CS=$("$ZodCheckNumberFormat",(e,t)=>{var a;Re.init(e,t),t.format=t.format||"float64";let n=(a=t.format)==null?void 0:a.includes("int"),r=n?"int":"number",[i,o]=Fy[t.format];e._zod.onattach.push(s=>{let c=s._zod.bag;c.format=t.format,c.minimum=i,c.maximum=o,n&&(c.pattern=yS)}),e._zod.check=s=>{let c=s.value;if(n){if(!Number.isInteger(c)){s.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?s.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):s.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}c<i&&s.issues.push({origin:"number",input:c,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),c>o&&s.issues.push({origin:"number",input:c,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),ES=$("$ZodCheckBigIntFormat",(e,t)=>{Re.init(e,t);let[n,r]=Hy[t.format];e._zod.onattach.push(i=>{let o=i._zod.bag;o.format=t.format,o.minimum=n,o.maximum=r}),e._zod.check=i=>{let o=i.value;o<n&&i.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),o>r&&i.issues.push({origin:"bigint",input:o,code:"too_big",maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),AS=$("$ZodCheckMaxSize",(e,t)=>{var r;var n;Re.init(e,t),(r=(n=e._zod.def).when)!=null||(n.when=i=>{let o=i.value;return!Dr(o)&&o.size!==void 0}),e._zod.onattach.push(i=>{var a;let o=(a=i._zod.bag.maximum)!=null?a:Number.POSITIVE_INFINITY;t.maximum<o&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let o=i.value;o.size<=t.maximum||i.issues.push({origin:nc(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),zS=$("$ZodCheckMinSize",(e,t)=>{var r;var n;Re.init(e,t),(r=(n=e._zod.def).when)!=null||(n.when=i=>{let o=i.value;return!Dr(o)&&o.size!==void 0}),e._zod.onattach.push(i=>{var a;let o=(a=i._zod.bag.minimum)!=null?a:Number.NEGATIVE_INFINITY;t.minimum>o&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let o=i.value;o.size>=t.minimum||i.issues.push({origin:nc(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),TS=$("$ZodCheckSizeEquals",(e,t)=>{var r;var n;Re.init(e,t),(r=(n=e._zod.def).when)!=null||(n.when=i=>{let o=i.value;return!Dr(o)&&o.size!==void 0}),e._zod.onattach.push(i=>{let o=i._zod.bag;o.minimum=t.size,o.maximum=t.size,o.size=t.size}),e._zod.check=i=>{let o=i.value,a=o.size;if(a===t.size)return;let s=a>t.size;i.issues.push({origin:nc(o),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),IS=$("$ZodCheckMaxLength",(e,t)=>{var r;var n;Re.init(e,t),(r=(n=e._zod.def).when)!=null||(n.when=i=>{let o=i.value;return!Dr(o)&&o.length!==void 0}),e._zod.onattach.push(i=>{var a;let o=(a=i._zod.bag.maximum)!=null?a:Number.POSITIVE_INFINITY;t.maximum<o&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let o=i.value;if(o.length<=t.maximum)return;let s=ic(o);i.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),kS=$("$ZodCheckMinLength",(e,t)=>{var r;var n;Re.init(e,t),(r=(n=e._zod.def).when)!=null||(n.when=i=>{let o=i.value;return!Dr(o)&&o.length!==void 0}),e._zod.onattach.push(i=>{var a;let o=(a=i._zod.bag.minimum)!=null?a:Number.NEGATIVE_INFINITY;t.minimum>o&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let o=i.value;if(o.length>=t.minimum)return;let s=ic(o);i.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),NS=$("$ZodCheckLengthEquals",(e,t)=>{var r;var n;Re.init(e,t),(r=(n=e._zod.def).when)!=null||(n.when=i=>{let o=i.value;return!Dr(o)&&o.length!==void 0}),e._zod.onattach.push(i=>{let o=i._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=i=>{let o=i.value,a=o.length;if(a===t.length)return;let s=ic(o),c=a>t.length;i.issues.push({origin:s,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Xa=$("$ZodCheckStringFormat",(e,t)=>{var i,o;var n,r;Re.init(e,t),e._zod.onattach.push(a=>{var c;let s=a._zod.bag;s.format=t.format,t.pattern&&((c=s.patterns)!=null||(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(i=(n=e._zod).check)!=null||(n.check=a=>{t.pattern.lastIndex=0,!t.pattern.test(a.value)&&a.issues.push({origin:"string",code:"invalid_format",format:t.format,input:a.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=(r=e._zod).check)!=null||(r.check=()=>{})}),OS=$("$ZodCheckRegex",(e,t)=>{Xa.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),MS=$("$ZodCheckLowerCase",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=_S),Xa.init(e,t)}),DS=$("$ZodCheckUpperCase",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=wS),Xa.init(e,t)}),RS=$("$ZodCheckIncludes",(e,t)=>{Re.init(e,t);let n=Vn(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(i=>{var a;let o=i._zod.bag;(a=o.patterns)!=null||(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),US=$("$ZodCheckStartsWith",(e,t)=>{var r;Re.init(e,t);let n=new RegExp(`^${Vn(t.prefix)}.*`);(r=t.pattern)!=null||(t.pattern=n),e._zod.onattach.push(i=>{var a;let o=i._zod.bag;(a=o.patterns)!=null||(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),PS=$("$ZodCheckEndsWith",(e,t)=>{var r;Re.init(e,t);let n=new RegExp(`.*${Vn(t.suffix)}$`);(r=t.pattern)!=null||(t.pattern=n),e._zod.onattach.push(i=>{var a;let o=i._zod.bag;(a=o.patterns)!=null||(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function Wk(e,t,n){e.issues.length&&t.issues.push(...Sn(n,e.issues))}var LS=$("$ZodCheckProperty",(e,t)=>{Re.init(e,t),e._zod.check=n=>{let r=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(r instanceof Promise)return r.then(i=>Wk(i,n,t.property));Wk(r,n,t.property)}}),jS=$("$ZodCheckMimeType",(e,t)=>{Re.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(r=>{r._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:"invalid_value",values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),ZS=$("$ZodCheckOverwrite",(e,t)=>{Re.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});var cc=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let r=t.split(`
|
|
`).filter(a=>a),i=Math.min(...r.map(a=>a.length-a.trimStart().length)),o=r.map(a=>a.slice(i)).map(a=>" ".repeat(this.indent*2)+a);for(let a of o)this.content.push(a)}compile(){var o;let t=Function,n=this==null?void 0:this.args,i=[...((o=this==null?void 0:this.content)!=null?o:[""]).map(a=>` ${a}`)];return new t(...n,i.join(`
|
|
`))}};var qS={major:4,minor:3,patch:6};var oe=$("$ZodType",(e,t)=>{var i,o,a;var n;e!=null||(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=qS;let r=[...(i=e._zod.def.checks)!=null?i:[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(let s of r)for(let c of s._zod.onattach)c(e);if(r.length===0)(o=(n=e._zod).deferred)!=null||(n.deferred=[]),(a=e._zod.deferred)==null||a.push(()=>{e._zod.run=e._zod.parse});else{let s=(d,m,l)=>{let f=Pr(d),p;for(let h of m){if(h._zod.def.when){if(!h._zod.def.when(d))continue}else if(f)continue;let y=d.issues.length,x=h._zod.check(d);if(x instanceof Promise&&(l==null?void 0:l.async)===!1)throw new Jn;if(p||x instanceof Promise)p=(p!=null?p:Promise.resolve()).then(async()=>{await x,d.issues.length!==y&&(f||(f=Pr(d,y)))});else{if(d.issues.length===y)continue;f||(f=Pr(d,y))}}return p?p.then(()=>d):d},c=(d,m,l)=>{if(Pr(d))return d.aborted=!0,d;let f=s(m,r,l);if(f instanceof Promise){if(l.async===!1)throw new Jn;return f.then(p=>e._zod.parse(p,l))}return e._zod.parse(f,l)};e._zod.run=(d,m)=>{if(m.skipChecks)return e._zod.parse(d,m);if(m.direction==="backward"){let f=e._zod.parse({value:d.value,issues:[]},{...m,skipChecks:!0});return f instanceof Promise?f.then(p=>c(p,d,m)):c(f,d,m)}let l=e._zod.parse(d,m);if(l instanceof Promise){if(m.async===!1)throw new Jn;return l.then(f=>s(f,r,m))}return s(l,r,m)}}me(e,"~standard",()=>({validate:s=>{var c;try{let d=Xy(e,s);return d.success?{value:d.data}:{issues:(c=d.error)==null?void 0:c.issues}}catch(d){return Yy(e,s).then(m=>{var l;return m.success?{value:m.data}:{issues:(l=m.error)==null?void 0:l.issues}})}},vendor:"zod",version:1}))}),_o=$("$ZodString",(e,t)=>{var n,r,i;oe.init(e,t),e._zod.pattern=(i=[...(r=(n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)!=null?r:[]].pop())!=null?i:hS(e._zod.bag),e._zod.parse=(o,a)=>{if(t.coerce)try{o.value=String(o.value)}catch(s){}return typeof o.value=="string"||o.issues.push({expected:"string",code:"invalid_type",input:o.value,inst:e}),o}}),Oe=$("$ZodStringFormat",(e,t)=>{Xa.init(e,t),_o.init(e,t)}),FS=$("$ZodGUID",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=iS),Oe.init(e,t)}),HS=$("$ZodUUID",(e,t)=>{var n,r;if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);(n=t.pattern)!=null||(t.pattern=xo(o))}else(r=t.pattern)!=null||(t.pattern=xo());Oe.init(e,t)}),BS=$("$ZodEmail",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=rS),Oe.init(e,t)}),GS=$("$ZodURL",(e,t)=>{Oe.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),XS=$("$ZodEmoji",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=oS()),Oe.init(e,t)}),YS=$("$ZodNanoID",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=tS),Oe.init(e,t)}),JS=$("$ZodCUID",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Jy),Oe.init(e,t)}),KS=$("$ZodCUID2",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Ky),Oe.init(e,t)}),WS=$("$ZodULID",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Wy),Oe.init(e,t)}),QS=$("$ZodXID",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Qy),Oe.init(e,t)}),eb=$("$ZodKSUID",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=eS),Oe.init(e,t)}),tb=$("$ZodISODateTime",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=gS(t)),Oe.init(e,t)}),nb=$("$ZodISODate",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=mS),Oe.init(e,t)}),ib=$("$ZodISOTime",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=pS(t)),Oe.init(e,t)}),rb=$("$ZodISODuration",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=nS),Oe.init(e,t)}),ob=$("$ZodIPv4",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=aS),Oe.init(e,t),e._zod.bag.format="ipv4"}),ab=$("$ZodIPv6",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=sS),Oe.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch(i){r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),sb=$("$ZodMAC",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=lS(t.delimiter)),Oe.init(e,t),e._zod.bag.format="mac"}),lb=$("$ZodCIDRv4",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=cS),Oe.init(e,t)}),cb=$("$ZodCIDRv6",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=uS),Oe.init(e,t),e._zod.check=r=>{let i=r.value.split("/");try{if(i.length!==2)throw new Error;let[o,a]=i;if(!a)throw new Error;let s=Number(a);if(`${s}`!==a)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${o}]`)}catch(o){r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function ub(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch(t){return!1}}var db=$("$ZodBase64",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=dS),Oe.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{ub(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function f1(e){if(!Df.test(e))return!1;let t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return ub(n)}var fb=$("$ZodBase64URL",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Df),Oe.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{f1(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),mb=$("$ZodE164",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=fS),Oe.init(e,t)});function m1(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!("typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch(n){return!1}}var pb=$("$ZodJWT",(e,t)=>{Oe.init(e,t),e._zod.check=n=>{m1(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),gb=$("$ZodCustomStringFormat",(e,t)=>{Oe.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Ff=$("$ZodNumber",(e,t)=>{var n;oe.init(e,t),e._zod.pattern=(n=e._zod.bag.pattern)!=null?n:Rf,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch(s){}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let a=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...a?{received:a}:{}}),r}}),hb=$("$ZodNumberFormat",(e,t)=>{CS.init(e,t),Ff.init(e,t)}),uc=$("$ZodBoolean",(e,t)=>{oe.init(e,t),e._zod.pattern=SS,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(o){}let i=n.value;return typeof i=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),n}}),Hf=$("$ZodBigInt",(e,t)=>{oe.init(e,t),e._zod.pattern=vS,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch(i){}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),vb=$("$ZodBigIntFormat",(e,t)=>{ES.init(e,t),Hf.init(e,t)}),yb=$("$ZodSymbol",(e,t)=>{oe.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;return typeof i=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:e}),n}}),Sb=$("$ZodUndefined",(e,t)=>{oe.init(e,t),e._zod.pattern=xS,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(n,r)=>{let i=n.value;return typeof i=="undefined"||n.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:e}),n}}),bb=$("$ZodNull",(e,t)=>{oe.init(e,t),e._zod.pattern=bS,e._zod.values=new Set([null]),e._zod.parse=(n,r)=>{let i=n.value;return i===null||n.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),n}}),xb=$("$ZodAny",(e,t)=>{oe.init(e,t),e._zod.parse=n=>n}),_b=$("$ZodUnknown",(e,t)=>{oe.init(e,t),e._zod.parse=n=>n}),wb=$("$ZodNever",(e,t)=>{oe.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),$b=$("$ZodVoid",(e,t)=>{oe.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;return typeof i=="undefined"||n.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),n}}),Cb=$("$ZodDate",(e,t)=>{oe.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch(s){}let i=n.value,o=i instanceof Date;return o&&!Number.isNaN(i.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:i,...o?{received:"Invalid Date"}:{},inst:e}),n}});function t1(e,t,n){e.issues.length&&t.issues.push(...Sn(n,e.issues)),t.value[n]=e.value}var Eb=$("$ZodArray",(e,t)=>{oe.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=Array(i.length);let o=[];for(let a=0;a<i.length;a++){let s=i[a],c=t.element._zod.run({value:s,issues:[]},r);c instanceof Promise?o.push(c.then(d=>t1(d,n,a))):t1(c,n,a)}return o.length?Promise.all(o).then(()=>n):n}});function Vf(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...Sn(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function p1(e){var r,i,o,a;let t=Object.keys(e.shape);for(let s of t)if(!((a=(o=(i=(r=e.shape)==null?void 0:r[s])==null?void 0:i._zod)==null?void 0:o.traits)!=null&&a.has("$ZodType")))throw new Error(`Invalid element at key "${s}": expected a Zod schema`);let n=Vy(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function g1(e,t,n,r,i,o){let a=[],s=i.keySet,c=i.catchall._zod,d=c.def.type,m=c.optout==="optional";for(let l in t){if(s.has(l))continue;if(d==="never"){a.push(l);continue}let f=c.run({value:t[l],issues:[]},r);f instanceof Promise?e.push(f.then(p=>Vf(p,n,l,t,m))):Vf(f,n,l,t,m)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}var h1=$("$ZodObject",(e,t)=>{oe.init(e,t);let n=Object.getOwnPropertyDescriptor(t,"shape");if(!(n!=null&&n.get)){let s=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...s};return Object.defineProperty(t,"shape",{value:c}),c}})}let r=qa(()=>p1(t));me(e._zod,"propValues",()=>{var d;let s=t.shape,c={};for(let m in s){let l=s[m]._zod;if(l.values){(d=c[m])!=null||(c[m]=new Set);for(let f of l.values)c[m].add(f)}}return c});let i=bo,o=t.catchall,a;e._zod.parse=(s,c)=>{a!=null||(a=r.value);let d=s.value;if(!i(d))return s.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),s;s.value={};let m=[],l=a.shape;for(let f of a.keys){let p=l[f],h=p._zod.optout==="optional",y=p._zod.run({value:d[f],issues:[]},c);y instanceof Promise?m.push(y.then(x=>Vf(x,s,f,d,h))):Vf(y,s,f,d,h)}return o?g1(m,d,s,c,r.value,e):m.length?Promise.all(m).then(()=>s):s}}),Ab=$("$ZodObjectJIT",(e,t)=>{h1.init(e,t);let n=e._zod.parse,r=qa(()=>p1(t)),i=f=>{var b;let p=new cc(["shape","payload","ctx"]),h=r.value,y=v=>{let _=wf(v);return`shape[${_}]._zod.run({ value: input[${_}], issues: [] }, ctx)`};p.write("const input = payload.value;");let x=Object.create(null),S=0;for(let v of h.keys)x[v]=`key_${S++}`;p.write("const newResult = {};");for(let v of h.keys){let _=x[v],C=wf(v),E=f[v],A=((b=E==null?void 0:E._zod)==null?void 0:b.optout)==="optional";p.write(`const ${_} = ${y(v)};`),A?p.write(`
|
|
if (${_}.issues.length) {
|
|
if (${C} in input) {
|
|
payload.issues = payload.issues.concat(${_}.issues.map(iss => ({
|
|
...iss,
|
|
path: iss.path ? [${C}, ...iss.path] : [${C}]
|
|
})));
|
|
}
|
|
}
|
|
|
|
if (${_}.value === undefined) {
|
|
if (${C} in input) {
|
|
newResult[${C}] = undefined;
|
|
}
|
|
} else {
|
|
newResult[${C}] = ${_}.value;
|
|
}
|
|
|
|
`):p.write(`
|
|
if (${_}.issues.length) {
|
|
payload.issues = payload.issues.concat(${_}.issues.map(iss => ({
|
|
...iss,
|
|
path: iss.path ? [${C}, ...iss.path] : [${C}]
|
|
})));
|
|
}
|
|
|
|
if (${_}.value === undefined) {
|
|
if (${C} in input) {
|
|
newResult[${C}] = undefined;
|
|
}
|
|
} else {
|
|
newResult[${C}] = ${_}.value;
|
|
}
|
|
|
|
`)}p.write("payload.value = newResult;"),p.write("return payload;");let g=p.compile();return(v,_)=>g(f,v,_)},o,a=bo,s=!Kl.jitless,d=s&&jy.value,m=t.catchall,l;e._zod.parse=(f,p)=>{l!=null||(l=r.value);let h=f.value;return a(h)?s&&d&&(p==null?void 0:p.async)===!1&&p.jitless!==!0?(o||(o=i(t.shape)),f=o(f,p),m?g1([],h,f,p,l,e):f):n(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f)}});function n1(e,t,n,r){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let i=e.filter(o=>!Pr(o));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(a=>nn(a,r,We())))}),t)}var dc=$("$ZodUnion",(e,t)=>{oe.init(e,t),me(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),me(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),me(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),me(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${i.map(o=>ec(o.source)).join("|")})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,o)=>{if(n)return r(i,o);let a=!1,s=[];for(let c of t.options){let d=c._zod.run({value:i.value,issues:[]},o);if(d instanceof Promise)s.push(d),a=!0;else{if(d.issues.length===0)return d;s.push(d)}}return a?Promise.all(s).then(c=>n1(c,i,e,o)):n1(s,i,e,o)}});function i1(e,t,n,r){let i=e.filter(o=>o.issues.length===0);return i.length===1?(t.value=i[0].value,t):(i.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(a=>nn(a,r,We())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}var zb=$("$ZodXor",(e,t)=>{dc.init(e,t),t.inclusive=!1;let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,o)=>{if(n)return r(i,o);let a=!1,s=[];for(let c of t.options){let d=c._zod.run({value:i.value,issues:[]},o);d instanceof Promise?(s.push(d),a=!0):s.push(d)}return a?Promise.all(s).then(c=>i1(c,i,e,o)):i1(s,i,e,o)}}),Tb=$("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,dc.init(e,t);let n=e._zod.parse;me(e._zod,"propValues",()=>{let i={};for(let o of t.options){let a=o._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(let[s,c]of Object.entries(a)){i[s]||(i[s]=new Set);for(let d of c)i[s].add(d)}}return i});let r=qa(()=>{var a;let i=t.options,o=new Map;for(let s of i){let c=(a=s._zod.propValues)==null?void 0:a[t.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let d of c){if(o.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);o.set(d,s)}}return o});e._zod.parse=(i,o)=>{let a=i.value;if(!bo(a))return i.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),i;let s=r.value.get(a==null?void 0:a[t.discriminator]);return s?s._zod.run(i,o):t.unionFallback?n(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:a,path:[t.discriminator],inst:e}),i)}}),Ib=$("$ZodIntersection",(e,t)=>{oe.init(e,t),e._zod.parse=(n,r)=>{let i=n.value,o=t.left._zod.run({value:i,issues:[]},r),a=t.right._zod.run({value:i,issues:[]},r);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([c,d])=>r1(n,c,d)):r1(n,o,a)}});function VS(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ur(e)&&Ur(t)){let n=Object.keys(t),r=Object.keys(e).filter(o=>n.indexOf(o)!==-1),i={...e,...t};for(let o of r){let a=VS(e[o],t[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};i[o]=a.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],o=t[r],a=VS(i,o);if(!a.valid)return{valid:!1,mergeErrorPath:[r,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function r1(e,t,n){let r=new Map,i;for(let s of t.issues)if(s.code==="unrecognized_keys"){i!=null||(i=s);for(let c of s.keys)r.has(c)||r.set(c,{}),r.get(c).l=!0}else e.issues.push(s);for(let s of n.issues)if(s.code==="unrecognized_keys")for(let c of s.keys)r.has(c)||r.set(c,{}),r.get(c).r=!0;else e.issues.push(s);let o=[...r].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(o.length&&i&&e.issues.push({...i,keys:o}),Pr(e))return e;let a=VS(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}var Bf=$("$ZodTuple",(e,t)=>{oe.init(e,t);let n=t.items;e._zod.parse=(r,i)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=[];let a=[],s=[...n].reverse().findIndex(m=>m._zod.optin!=="optional"),c=s===-1?0:n.length-s;if(!t.rest){let m=o.length>n.length,l=o.length<c-1;if(m||l)return r.issues.push({...m?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:o,inst:e,origin:"array"}),r}let d=-1;for(let m of n){if(d++,d>=o.length&&d>=c)continue;let l=m._zod.run({value:o[d],issues:[]},i);l instanceof Promise?a.push(l.then(f=>Lf(f,r,d))):Lf(l,r,d)}if(t.rest){let m=o.slice(n.length);for(let l of m){d++;let f=t.rest._zod.run({value:l,issues:[]},i);f instanceof Promise?a.push(f.then(p=>Lf(p,r,d))):Lf(f,r,d)}}return a.length?Promise.all(a).then(()=>r):r}});function Lf(e,t,n){e.issues.length&&t.issues.push(...Sn(n,e.issues)),t.value[n]=e.value}var kb=$("$ZodRecord",(e,t)=>{oe.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Ur(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),n;let o=[],a=t.keyType._zod.values;if(a){n.value={};let s=new Set;for(let d of a)if(typeof d=="string"||typeof d=="number"||typeof d=="symbol"){s.add(typeof d=="number"?d.toString():d);let m=t.valueType._zod.run({value:i[d],issues:[]},r);m instanceof Promise?o.push(m.then(l=>{l.issues.length&&n.issues.push(...Sn(d,l.issues)),n.value[d]=l.value})):(m.issues.length&&n.issues.push(...Sn(d,m.issues)),n.value[d]=m.value)}let c;for(let d in i)s.has(d)||(c=c!=null?c:[],c.push(d));c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:c})}else{n.value={};for(let s of Reflect.ownKeys(i)){if(s==="__proto__")continue;let c=t.keyType._zod.run({value:s,issues:[]},r);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&Rf.test(s)&&c.issues.length){let l=t.keyType._zod.run({value:Number(s),issues:[]},r);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");l.issues.length===0&&(c=l)}if(c.issues.length){t.mode==="loose"?n.value[s]=i[s]:n.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(l=>nn(l,r,We())),input:s,path:[s],inst:e});continue}let m=t.valueType._zod.run({value:i[s],issues:[]},r);m instanceof Promise?o.push(m.then(l=>{l.issues.length&&n.issues.push(...Sn(s,l.issues)),n.value[c.value]=l.value})):(m.issues.length&&n.issues.push(...Sn(s,m.issues)),n.value[c.value]=m.value)}}return o.length?Promise.all(o).then(()=>n):n}}),Nb=$("$ZodMap",(e,t)=>{oe.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!(i instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:i,inst:e}),n;let o=[];n.value=new Map;for(let[a,s]of i){let c=t.keyType._zod.run({value:a,issues:[]},r),d=t.valueType._zod.run({value:s,issues:[]},r);c instanceof Promise||d instanceof Promise?o.push(Promise.all([c,d]).then(([m,l])=>{o1(m,l,n,a,i,e,r)})):o1(c,d,n,a,i,e,r)}return o.length?Promise.all(o).then(()=>n):n}});function o1(e,t,n,r,i,o,a){e.issues.length&&(tc.has(typeof r)?n.issues.push(...Sn(r,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:i,inst:o,issues:e.issues.map(s=>nn(s,a,We()))})),t.issues.length&&(tc.has(typeof r)?n.issues.push(...Sn(r,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:i,inst:o,key:r,issues:t.issues.map(s=>nn(s,a,We()))})),n.value.set(e.value,t.value)}var Ob=$("$ZodSet",(e,t)=>{oe.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!(i instanceof Set))return n.issues.push({input:i,inst:e,expected:"set",code:"invalid_type"}),n;let o=[];n.value=new Set;for(let a of i){let s=t.valueType._zod.run({value:a,issues:[]},r);s instanceof Promise?o.push(s.then(c=>a1(c,n))):a1(s,n)}return o.length?Promise.all(o).then(()=>n):n}});function a1(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var Mb=$("$ZodEnum",(e,t)=>{oe.init(e,t);let n=Ql(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(i=>tc.has(typeof i)).map(i=>typeof i=="string"?Vn(i):i.toString()).join("|")})$`),e._zod.parse=(i,o)=>{let a=i.value;return r.has(a)||i.issues.push({code:"invalid_value",values:n,input:a,inst:e}),i}}),Db=$("$ZodLiteral",(e,t)=>{if(oe.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?Vn(r):r?Vn(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,i)=>{let o=r.value;return n.has(o)||r.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),r}}),Rb=$("$ZodFile",(e,t)=>{oe.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;return i instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:i,inst:e}),n}}),Ub=$("$ZodTransform",(e,t)=>{oe.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Mr(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(a=>(n.value=a,n));if(i instanceof Promise)throw new Jn;return n.value=i,n}});function s1(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var Gf=$("$ZodOptional",(e,t)=>{oe.init(e,t),e._zod.optin="optional",e._zod.optout="optional",me(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),me(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${ec(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>s1(o,n.value)):s1(i,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),Pb=$("$ZodExactOptional",(e,t)=>{Gf.init(e,t),me(e._zod,"values",()=>t.innerType._zod.values),me(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),Lb=$("$ZodNullable",(e,t)=>{oe.init(e,t),me(e._zod,"optin",()=>t.innerType._zod.optin),me(e._zod,"optout",()=>t.innerType._zod.optout),me(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${ec(n.source)}|null)$`):void 0}),me(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),jb=$("$ZodDefault",(e,t)=>{oe.init(e,t),e._zod.optin="optional",me(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>l1(o,t)):l1(i,t)}});function l1(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Zb=$("$ZodPrefault",(e,t)=>{oe.init(e,t),e._zod.optin="optional",me(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),qb=$("$ZodNonOptional",(e,t)=>{oe.init(e,t),me(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>c1(o,e)):c1(i,e)}});function c1(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var Vb=$("$ZodSuccess",(e,t)=>{oe.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Mr("ZodSuccess");let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>(n.value=o.issues.length===0,n)):(n.value=i.issues.length===0,n)}}),Fb=$("$ZodCatch",(e,t)=>{oe.init(e,t),me(e._zod,"optin",()=>t.innerType._zod.optin),me(e._zod,"optout",()=>t.innerType._zod.optout),me(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(a=>nn(a,r,We()))},input:n.value}),n.issues=[]),n)):(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(o=>nn(o,r,We()))},input:n.value}),n.issues=[]),n)}}),Hb=$("$ZodNaN",(e,t)=>{oe.init(e,t),e._zod.parse=(n,r)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),Bb=$("$ZodPipe",(e,t)=>{oe.init(e,t),me(e._zod,"values",()=>t.in._zod.values),me(e._zod,"optin",()=>t.in._zod.optin),me(e._zod,"optout",()=>t.out._zod.optout),me(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){let o=t.out._zod.run(n,r);return o instanceof Promise?o.then(a=>jf(a,t.in,r)):jf(o,t.in,r)}let i=t.in._zod.run(n,r);return i instanceof Promise?i.then(o=>jf(o,t.out,r)):jf(i,t.out,r)}});function jf(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var fc=$("$ZodCodec",(e,t)=>{oe.init(e,t),me(e._zod,"values",()=>t.in._zod.values),me(e._zod,"optin",()=>t.in._zod.optin),me(e._zod,"optout",()=>t.out._zod.optout),me(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if((r.direction||"forward")==="forward"){let o=t.in._zod.run(n,r);return o instanceof Promise?o.then(a=>Zf(a,t,r)):Zf(o,t,r)}else{let o=t.out._zod.run(n,r);return o instanceof Promise?o.then(a=>Zf(a,t,r)):Zf(o,t,r)}}});function Zf(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let i=t.transform(e.value,e);return i instanceof Promise?i.then(o=>qf(e,o,t.out,n)):qf(e,i,t.out,n)}else{let i=t.reverseTransform(e.value,e);return i instanceof Promise?i.then(o=>qf(e,o,t.in,n)):qf(e,i,t.in,n)}}function qf(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}var Gb=$("$ZodReadonly",(e,t)=>{oe.init(e,t),me(e._zod,"propValues",()=>t.innerType._zod.propValues),me(e._zod,"values",()=>t.innerType._zod.values),me(e._zod,"optin",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optin}),me(e._zod,"optout",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optout}),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(u1):u1(i)}});function u1(e){return e.value=Object.freeze(e.value),e}var Xb=$("$ZodTemplateLiteral",(e,t)=>{oe.init(e,t);let n=[];for(let r of t.parts)if(typeof r=="object"&&r!==null){if(!r._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...r._zod.traits].shift()}`);let i=r._zod.pattern instanceof RegExp?r._zod.pattern.source:r._zod.pattern;if(!i)throw new Error(`Invalid template literal part: ${r._zod.traits}`);let o=i.startsWith("^")?1:0,a=i.endsWith("$")?i.length-1:i.length;n.push(i.slice(o,a))}else if(r===null||qy.has(typeof r))n.push(Vn(`${r}`));else throw new Error(`Invalid template literal part: ${r}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(r,i)=>{var o;return typeof r.value!="string"?(r.issues.push({input:r.value,inst:e,expected:"string",code:"invalid_type"}),r):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(r.value)||r.issues.push({input:r.value,inst:e,code:"invalid_format",format:(o=t.format)!=null?o:"template_literal",pattern:e._zod.pattern.source}),r)}}),Yb=$("$ZodFunction",(e,t)=>(oe.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...r){let i=e._def.input?Cf(e._def.input,r):r,o=Reflect.apply(n,this,i);return e._def.output?Cf(e._def.output,o):o}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...r){let i=e._def.input?await Ef(e._def.input,r):r,o=await Reflect.apply(n,this,i);return e._def.output?await Ef(e._def.output,o):o}},e._zod.parse=(n,r)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let r=e.constructor;return Array.isArray(n[0])?new r({type:"function",input:new Bf({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new r({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let r=e.constructor;return new r({type:"function",input:e._def.input,output:n})},e)),Jb=$("$ZodPromise",(e,t)=>{oe.init(e,t),e._zod.parse=(n,r)=>Promise.resolve(n.value).then(i=>t.innerType._zod.run({value:i,issues:[]},r))}),Kb=$("$ZodLazy",(e,t)=>{oe.init(e,t),me(e._zod,"innerType",()=>t.getter()),me(e._zod,"pattern",()=>{var n,r;return(r=(n=e._zod.innerType)==null?void 0:n._zod)==null?void 0:r.pattern}),me(e._zod,"propValues",()=>{var n,r;return(r=(n=e._zod.innerType)==null?void 0:n._zod)==null?void 0:r.propValues}),me(e._zod,"optin",()=>{var n,r,i;return(i=(r=(n=e._zod.innerType)==null?void 0:n._zod)==null?void 0:r.optin)!=null?i:void 0}),me(e._zod,"optout",()=>{var n,r,i;return(i=(r=(n=e._zod.innerType)==null?void 0:n._zod)==null?void 0:r.optout)!=null?i:void 0}),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),Wb=$("$ZodCustom",(e,t)=>{Re.init(e,t),oe.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(o=>d1(o,n,r,e));d1(i,n,r,e)}});function d1(e,t,n,r){var i;if(!e){let o={code:"custom",input:n,inst:r,path:[...(i=r._zod.def.path)!=null?i:[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(Va(o))}}var wo={};ei(wo,{ar:()=>v1,az:()=>y1,be:()=>b1,bg:()=>x1,ca:()=>_1,cs:()=>w1,da:()=>$1,de:()=>C1,en:()=>Xf,eo:()=>E1,es:()=>A1,fa:()=>z1,fi:()=>T1,fr:()=>I1,frCA:()=>k1,he:()=>N1,hu:()=>O1,hy:()=>D1,id:()=>R1,is:()=>U1,it:()=>P1,ja:()=>L1,ka:()=>j1,kh:()=>Z1,km:()=>Yf,ko:()=>q1,lt:()=>F1,mk:()=>H1,ms:()=>B1,nl:()=>G1,no:()=>X1,ota:()=>Y1,pl:()=>K1,ps:()=>J1,pt:()=>W1,ru:()=>eN,sl:()=>tN,sv:()=>nN,ta:()=>iN,th:()=>rN,tr:()=>oN,ua:()=>aN,uk:()=>Jf,ur:()=>sN,uz:()=>lN,vi:()=>cN,yo:()=>fN,zhCN:()=>uN,zhTW:()=>dN});var Bj=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},r={nan:"NaN"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${i.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${p}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${l}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${p}`}case"invalid_value":return i.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${D(i.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${z(i.values,"|")}`;case"too_big":{let l=i.inclusive?"<=":"<",f=t(i.origin);return f?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${(s=i.origin)!=null?s:"\u0627\u0644\u0642\u064A\u0645\u0629"} ${l} ${i.maximum.toString()} ${(c=f.unit)!=null?c:"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${(d=i.origin)!=null?d:"\u0627\u0644\u0642\u064A\u0645\u0629"} ${l} ${i.maximum.toString()}`}case"too_small":{let l=i.inclusive?">=":">",f=t(i.origin);return f?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${i.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${l} ${i.minimum.toString()} ${f.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${i.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${l} ${i.minimum.toString()}`}case"invalid_format":{let l=i;return l.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${i.prefix}"`:l.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${l.suffix}"`:l.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${l.includes}"`:l.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${l.pattern}`:`${(m=n[l.format])!=null?m:i.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${i.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${i.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${i.keys.length>1?"\u0629":""}: ${z(i.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${i.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${i.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function v1(){return{localeError:Bj()}}var Gj=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${i.expected}, daxil olan ${p}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${l}, daxil olan ${p}`}case"invalid_value":return i.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${D(i.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${z(i.values,"|")}`;case"too_big":{let l=i.inclusive?"<=":"<",f=t(i.origin);return f?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${(s=i.origin)!=null?s:"d\u0259y\u0259r"} ${l}${i.maximum.toString()} ${(c=f.unit)!=null?c:"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${(d=i.origin)!=null?d:"d\u0259y\u0259r"} ${l}${i.maximum.toString()}`}case"too_small":{let l=i.inclusive?">=":">",f=t(i.origin);return f?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${i.origin} ${l}${i.minimum.toString()} ${f.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${i.origin} ${l}${i.minimum.toString()}`}case"invalid_format":{let l=i;return l.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${l.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:l.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${l.suffix}" il\u0259 bitm\u0259lidir`:l.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${l.includes}" daxil olmal\u0131d\u0131r`:l.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${l.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${(m=n[l.format])!=null?m:i.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${i.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${i.keys.length>1?"lar":""}: ${z(i.keys,", ")}`;case"invalid_key":return`${i.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${i.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function y1(){return{localeError:Gj()}}function S1(e,t,n,r){let i=Math.abs(e),o=i%10,a=i%100;return a>=11&&a<=19?r:o===1?t:o>=2&&o<=4?n:r}var Xj=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},r={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return i=>{var o,a,s,c,d;switch(i.code){case"invalid_type":{let m=(o=r[i.expected])!=null?o:i.expected,l=R(i.input),f=(a=r[l])!=null?a:l;return/^[A-Z]/.test(i.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${i.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${f}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${m}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${f}`}case"invalid_value":return i.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${D(i.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${z(i.values,"|")}`;case"too_big":{let m=i.inclusive?"<=":"<",l=t(i.origin);if(l){let f=Number(i.maximum),p=S1(f,l.unit.one,l.unit.few,l.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${(s=i.origin)!=null?s:"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${l.verb} ${m}${i.maximum.toString()} ${p}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${(c=i.origin)!=null?c:"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${m}${i.maximum.toString()}`}case"too_small":{let m=i.inclusive?">=":">",l=t(i.origin);if(l){let f=Number(i.minimum),p=S1(f,l.unit.one,l.unit.few,l.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${l.verb} ${m}${i.minimum.toString()} ${p}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${m}${i.minimum.toString()}`}case"invalid_format":{let m=i;return m.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${m.prefix}"`:m.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${m.suffix}"`:m.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${m.includes}"`:m.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${m.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${(d=n[m.format])!=null?d:i.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${i.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${z(i.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${i.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${i.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function b1(){return{localeError:Xj()}}var Yj=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},r={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${i.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${p}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${l}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${p}`}case"invalid_value":return i.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${D(i.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${z(i.values,"|")}`;case"too_big":{let l=i.inclusive?"<=":"<",f=t(i.origin);return f?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${(s=i.origin)!=null?s:"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${l}${i.maximum.toString()} ${(c=f.unit)!=null?c:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${(d=i.origin)!=null?d:"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${l}${i.maximum.toString()}`}case"too_small":{let l=i.inclusive?">=":">",f=t(i.origin);return f?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${l}${i.minimum.toString()} ${f.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${l}${i.minimum.toString()}`}case"invalid_format":{let l=i;if(l.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${l.prefix}"`;if(l.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${l.suffix}"`;if(l.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${l.includes}"`;if(l.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${l.pattern}`;let f="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return l.format==="emoji"&&(f="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),l.format==="datetime"&&(f="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),l.format==="date"&&(f="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),l.format==="time"&&(f="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),l.format==="duration"&&(f="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${f} ${(m=n[l.format])!=null?m:i.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${i.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${i.keys.length>1?"\u043E\u0432\u0435":""}: ${z(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${i.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${i.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function x1(){return{localeError:Yj()}}var Jj=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},r={nan:"NaN"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${i.expected}, s'ha rebut ${p}`:`Tipus inv\xE0lid: s'esperava ${l}, s'ha rebut ${p}`}case"invalid_value":return i.values.length===1?`Valor inv\xE0lid: s'esperava ${D(i.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${z(i.values," o ")}`;case"too_big":{let l=i.inclusive?"com a m\xE0xim":"menys de",f=t(i.origin);return f?`Massa gran: s'esperava que ${(s=i.origin)!=null?s:"el valor"} contingu\xE9s ${l} ${i.maximum.toString()} ${(c=f.unit)!=null?c:"elements"}`:`Massa gran: s'esperava que ${(d=i.origin)!=null?d:"el valor"} fos ${l} ${i.maximum.toString()}`}case"too_small":{let l=i.inclusive?"com a m\xEDnim":"m\xE9s de",f=t(i.origin);return f?`Massa petit: s'esperava que ${i.origin} contingu\xE9s ${l} ${i.minimum.toString()} ${f.unit}`:`Massa petit: s'esperava que ${i.origin} fos ${l} ${i.minimum.toString()}`}case"invalid_format":{let l=i;return l.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${l.prefix}"`:l.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${l.suffix}"`:l.format==="includes"?`Format inv\xE0lid: ha d'incloure "${l.includes}"`:l.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${l.pattern}`:`Format inv\xE0lid per a ${(m=n[l.format])!=null?m:i.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${i.divisor}`;case"unrecognized_keys":return`Clau${i.keys.length>1?"s":""} no reconeguda${i.keys.length>1?"s":""}: ${z(i.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${i.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${i.origin}`;default:return"Entrada inv\xE0lida"}}};function _1(){return{localeError:Jj()}}var Kj=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},r={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return i=>{var o,a,s,c,d,m,l,f,p;switch(i.code){case"invalid_type":{let h=(o=r[i.expected])!=null?o:i.expected,y=R(i.input),x=(a=r[y])!=null?a:y;return/^[A-Z]/.test(i.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${i.expected}, obdr\u017Eeno ${x}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${h}, obdr\u017Eeno ${x}`}case"invalid_value":return i.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${D(i.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${z(i.values,"|")}`;case"too_big":{let h=i.inclusive?"<=":"<",y=t(i.origin);return y?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${(s=i.origin)!=null?s:"hodnota"} mus\xED m\xEDt ${h}${i.maximum.toString()} ${(c=y.unit)!=null?c:"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${(d=i.origin)!=null?d:"hodnota"} mus\xED b\xFDt ${h}${i.maximum.toString()}`}case"too_small":{let h=i.inclusive?">=":">",y=t(i.origin);return y?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${(m=i.origin)!=null?m:"hodnota"} mus\xED m\xEDt ${h}${i.minimum.toString()} ${(l=y.unit)!=null?l:"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${(f=i.origin)!=null?f:"hodnota"} mus\xED b\xFDt ${h}${i.minimum.toString()}`}case"invalid_format":{let h=i;return h.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${h.prefix}"`:h.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${h.suffix}"`:h.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${h.includes}"`:h.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${h.pattern}`:`Neplatn\xFD form\xE1t ${(p=n[h.format])!=null?p:i.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${i.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${z(i.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${i.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${i.origin}`;default:return"Neplatn\xFD vstup"}}};function w1(){return{localeError:Kj()}}var Wj=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},r={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`Ugyldigt input: forventede instanceof ${i.expected}, fik ${p}`:`Ugyldigt input: forventede ${l}, fik ${p}`}case"invalid_value":return i.values.length===1?`Ugyldig v\xE6rdi: forventede ${D(i.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${z(i.values,"|")}`;case"too_big":{let l=i.inclusive?"<=":"<",f=t(i.origin),p=(s=r[i.origin])!=null?s:i.origin;return f?`For stor: forventede ${p!=null?p:"value"} ${f.verb} ${l} ${i.maximum.toString()} ${(c=f.unit)!=null?c:"elementer"}`:`For stor: forventede ${p!=null?p:"value"} havde ${l} ${i.maximum.toString()}`}case"too_small":{let l=i.inclusive?">=":">",f=t(i.origin),p=(d=r[i.origin])!=null?d:i.origin;return f?`For lille: forventede ${p} ${f.verb} ${l} ${i.minimum.toString()} ${f.unit}`:`For lille: forventede ${p} havde ${l} ${i.minimum.toString()}`}case"invalid_format":{let l=i;return l.format==="starts_with"?`Ugyldig streng: skal starte med "${l.prefix}"`:l.format==="ends_with"?`Ugyldig streng: skal ende med "${l.suffix}"`:l.format==="includes"?`Ugyldig streng: skal indeholde "${l.includes}"`:l.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${l.pattern}`:`Ugyldig ${(m=n[l.format])!=null?m:i.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${z(i.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${i.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${i.origin}`;default:return"Ugyldigt input"}}};function $1(){return{localeError:Wj()}}var Qj=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},r={nan:"NaN",number:"Zahl",array:"Array"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${i.expected}, erhalten ${p}`:`Ung\xFCltige Eingabe: erwartet ${l}, erhalten ${p}`}case"invalid_value":return i.values.length===1?`Ung\xFCltige Eingabe: erwartet ${D(i.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${z(i.values,"|")}`;case"too_big":{let l=i.inclusive?"<=":"<",f=t(i.origin);return f?`Zu gro\xDF: erwartet, dass ${(s=i.origin)!=null?s:"Wert"} ${l}${i.maximum.toString()} ${(c=f.unit)!=null?c:"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${(d=i.origin)!=null?d:"Wert"} ${l}${i.maximum.toString()} ist`}case"too_small":{let l=i.inclusive?">=":">",f=t(i.origin);return f?`Zu klein: erwartet, dass ${i.origin} ${l}${i.minimum.toString()} ${f.unit} hat`:`Zu klein: erwartet, dass ${i.origin} ${l}${i.minimum.toString()} ist`}case"invalid_format":{let l=i;return l.format==="starts_with"?`Ung\xFCltiger String: muss mit "${l.prefix}" beginnen`:l.format==="ends_with"?`Ung\xFCltiger String: muss mit "${l.suffix}" enden`:l.format==="includes"?`Ung\xFCltiger String: muss "${l.includes}" enthalten`:l.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${l.pattern} entsprechen`:`Ung\xFCltig: ${(m=n[l.format])!=null?m:i.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${i.divisor} sein`;case"unrecognized_keys":return`${i.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${z(i.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${i.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${i.origin}`;default:return"Ung\xFCltige Eingabe"}}};function C1(){return{localeError:Qj()}}var e2=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return`Invalid input: expected ${l}, received ${p}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${D(i.values[0])}`:`Invalid option: expected one of ${z(i.values,"|")}`;case"too_big":{let l=i.inclusive?"<=":"<",f=t(i.origin);return f?`Too big: expected ${(s=i.origin)!=null?s:"value"} to have ${l}${i.maximum.toString()} ${(c=f.unit)!=null?c:"elements"}`:`Too big: expected ${(d=i.origin)!=null?d:"value"} to be ${l}${i.maximum.toString()}`}case"too_small":{let l=i.inclusive?">=":">",f=t(i.origin);return f?`Too small: expected ${i.origin} to have ${l}${i.minimum.toString()} ${f.unit}`:`Too small: expected ${i.origin} to be ${l}${i.minimum.toString()}`}case"invalid_format":{let l=i;return l.format==="starts_with"?`Invalid string: must start with "${l.prefix}"`:l.format==="ends_with"?`Invalid string: must end with "${l.suffix}"`:l.format==="includes"?`Invalid string: must include "${l.includes}"`:l.format==="regex"?`Invalid string: must match pattern ${l.pattern}`:`Invalid ${(m=n[l.format])!=null?m:i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${z(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function Xf(){return{localeError:e2()}}var t2=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},r={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${i.expected}, ricevi\u011Dis ${p}`:`Nevalida enigo: atendi\u011Dis ${l}, ricevi\u011Dis ${p}`}case"invalid_value":return i.values.length===1?`Nevalida enigo: atendi\u011Dis ${D(i.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${z(i.values,"|")}`;case"too_big":{let l=i.inclusive?"<=":"<",f=t(i.origin);return f?`Tro granda: atendi\u011Dis ke ${(s=i.origin)!=null?s:"valoro"} havu ${l}${i.maximum.toString()} ${(c=f.unit)!=null?c:"elementojn"}`:`Tro granda: atendi\u011Dis ke ${(d=i.origin)!=null?d:"valoro"} havu ${l}${i.maximum.toString()}`}case"too_small":{let l=i.inclusive?">=":">",f=t(i.origin);return f?`Tro malgranda: atendi\u011Dis ke ${i.origin} havu ${l}${i.minimum.toString()} ${f.unit}`:`Tro malgranda: atendi\u011Dis ke ${i.origin} estu ${l}${i.minimum.toString()}`}case"invalid_format":{let l=i;return l.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${l.prefix}"`:l.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${l.suffix}"`:l.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${l.includes}"`:l.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${l.pattern}`:`Nevalida ${(m=n[l.format])!=null?m:i.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${i.divisor}`;case"unrecognized_keys":return`Nekonata${i.keys.length>1?"j":""} \u015Dlosilo${i.keys.length>1?"j":""}: ${z(i.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${i.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${i.origin}`;default:return"Nevalida enigo"}}};function E1(){return{localeError:t2()}}var n2=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},r={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return i=>{var o,a,s,c,d,m,l,f;switch(i.code){case"invalid_type":{let p=(o=r[i.expected])!=null?o:i.expected,h=R(i.input),y=(a=r[h])!=null?a:h;return/^[A-Z]/.test(i.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${i.expected}, recibido ${y}`:`Entrada inv\xE1lida: se esperaba ${p}, recibido ${y}`}case"invalid_value":return i.values.length===1?`Entrada inv\xE1lida: se esperaba ${D(i.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${z(i.values,"|")}`;case"too_big":{let p=i.inclusive?"<=":"<",h=t(i.origin),y=(s=r[i.origin])!=null?s:i.origin;return h?`Demasiado grande: se esperaba que ${y!=null?y:"valor"} tuviera ${p}${i.maximum.toString()} ${(c=h.unit)!=null?c:"elementos"}`:`Demasiado grande: se esperaba que ${y!=null?y:"valor"} fuera ${p}${i.maximum.toString()}`}case"too_small":{let p=i.inclusive?">=":">",h=t(i.origin),y=(d=r[i.origin])!=null?d:i.origin;return h?`Demasiado peque\xF1o: se esperaba que ${y} tuviera ${p}${i.minimum.toString()} ${h.unit}`:`Demasiado peque\xF1o: se esperaba que ${y} fuera ${p}${i.minimum.toString()}`}case"invalid_format":{let p=i;return p.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${p.prefix}"`:p.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${p.suffix}"`:p.format==="includes"?`Cadena inv\xE1lida: debe incluir "${p.includes}"`:p.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${p.pattern}`:`Inv\xE1lido ${(m=n[p.format])!=null?m:i.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${i.divisor}`;case"unrecognized_keys":return`Llave${i.keys.length>1?"s":""} desconocida${i.keys.length>1?"s":""}: ${z(i.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${(l=r[i.origin])!=null?l:i.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${(f=r[i.origin])!=null?f:i.origin}`;default:return"Entrada inv\xE1lida"}}};function A1(){return{localeError:n2()}}var i2=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},r={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${i.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${p} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${l} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${p} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return i.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${D(i.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${z(i.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let l=i.inclusive?"<=":"<",f=t(i.origin);return f?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${(s=i.origin)!=null?s:"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${l}${i.maximum.toString()} ${(c=f.unit)!=null?c:"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${(d=i.origin)!=null?d:"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${l}${i.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let l=i.inclusive?">=":">",f=t(i.origin);return f?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${i.origin} \u0628\u0627\u06CC\u062F ${l}${i.minimum.toString()} ${f.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${i.origin} \u0628\u0627\u06CC\u062F ${l}${i.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let l=i;return l.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${l.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:l.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${l.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:l.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${l.includes}" \u0628\u0627\u0634\u062F`:l.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${l.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${(m=n[l.format])!=null?m:i.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${i.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${i.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${z(i.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${i.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${i.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function z1(){return{localeError:i2()}}var r2=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},r={nan:"NaN"};return i=>{var o,a,s;switch(i.code){case"invalid_type":{let c=(o=r[i.expected])!=null?o:i.expected,d=R(i.input),m=(a=r[d])!=null?a:d;return/^[A-Z]/.test(i.expected)?`Virheellinen tyyppi: odotettiin instanceof ${i.expected}, oli ${m}`:`Virheellinen tyyppi: odotettiin ${c}, oli ${m}`}case"invalid_value":return i.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${D(i.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${z(i.values,"|")}`;case"too_big":{let c=i.inclusive?"<=":"<",d=t(i.origin);return d?`Liian suuri: ${d.subject} t\xE4ytyy olla ${c}${i.maximum.toString()} ${d.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${c}${i.maximum.toString()}`}case"too_small":{let c=i.inclusive?">=":">",d=t(i.origin);return d?`Liian pieni: ${d.subject} t\xE4ytyy olla ${c}${i.minimum.toString()} ${d.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${c}${i.minimum.toString()}`}case"invalid_format":{let c=i;return c.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${c.prefix}"`:c.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${c.suffix}"`:c.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${c.includes}"`:c.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${c.pattern}`:`Virheellinen ${(s=n[c.format])!=null?s:i.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${i.divisor} monikerta`;case"unrecognized_keys":return`${i.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${z(i.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function T1(){return{localeError:r2()}}var o2=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},r={nan:"NaN",number:"nombre",array:"tableau"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`Entr\xE9e invalide : instanceof ${i.expected} attendu, ${p} re\xE7u`:`Entr\xE9e invalide : ${l} attendu, ${p} re\xE7u`}case"invalid_value":return i.values.length===1?`Entr\xE9e invalide : ${D(i.values[0])} attendu`:`Option invalide : une valeur parmi ${z(i.values,"|")} attendue`;case"too_big":{let l=i.inclusive?"<=":"<",f=t(i.origin);return f?`Trop grand : ${(s=i.origin)!=null?s:"valeur"} doit ${f.verb} ${l}${i.maximum.toString()} ${(c=f.unit)!=null?c:"\xE9l\xE9ment(s)"}`:`Trop grand : ${(d=i.origin)!=null?d:"valeur"} doit \xEAtre ${l}${i.maximum.toString()}`}case"too_small":{let l=i.inclusive?">=":">",f=t(i.origin);return f?`Trop petit : ${i.origin} doit ${f.verb} ${l}${i.minimum.toString()} ${f.unit}`:`Trop petit : ${i.origin} doit \xEAtre ${l}${i.minimum.toString()}`}case"invalid_format":{let l=i;return l.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${l.prefix}"`:l.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${l.suffix}"`:l.format==="includes"?`Cha\xEEne invalide : doit inclure "${l.includes}"`:l.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${l.pattern}`:`${(m=n[l.format])!=null?m:i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${i.divisor}`;case"unrecognized_keys":return`Cl\xE9${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${z(i.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${i.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entr\xE9e invalide"}}};function I1(){return{localeError:o2()}}var a2=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},r={nan:"NaN"};return i=>{var o,a,s,c,d;switch(i.code){case"invalid_type":{let m=(o=r[i.expected])!=null?o:i.expected,l=R(i.input),f=(a=r[l])!=null?a:l;return/^[A-Z]/.test(i.expected)?`Entr\xE9e invalide : attendu instanceof ${i.expected}, re\xE7u ${f}`:`Entr\xE9e invalide : attendu ${m}, re\xE7u ${f}`}case"invalid_value":return i.values.length===1?`Entr\xE9e invalide : attendu ${D(i.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${z(i.values,"|")}`;case"too_big":{let m=i.inclusive?"\u2264":"<",l=t(i.origin);return l?`Trop grand : attendu que ${(s=i.origin)!=null?s:"la valeur"} ait ${m}${i.maximum.toString()} ${l.unit}`:`Trop grand : attendu que ${(c=i.origin)!=null?c:"la valeur"} soit ${m}${i.maximum.toString()}`}case"too_small":{let m=i.inclusive?"\u2265":">",l=t(i.origin);return l?`Trop petit : attendu que ${i.origin} ait ${m}${i.minimum.toString()} ${l.unit}`:`Trop petit : attendu que ${i.origin} soit ${m}${i.minimum.toString()}`}case"invalid_format":{let m=i;return m.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${m.prefix}"`:m.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${m.suffix}"`:m.format==="includes"?`Cha\xEEne invalide : doit inclure "${m.includes}"`:m.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${m.pattern}`:`${(d=n[m.format])!=null?d:i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${i.divisor}`;case"unrecognized_keys":return`Cl\xE9${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${z(i.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${i.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entr\xE9e invalide"}}};function k1(){return{localeError:a2()}}var s2=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},n=d=>d?e[d]:void 0,r=d=>{let m=n(d);return m?m.label:d!=null?d:e.unknown.label},i=d=>`\u05D4${r(d)}`,o=d=>{var f;let m=n(d);return((f=m==null?void 0:m.gender)!=null?f:"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA"},a=d=>{var m;return d&&(m=t[d])!=null?m:null},s={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},c={nan:"NaN"};return d=>{var m,l,f,p,h,y,x,S,g,b,v,_,C,E,A,T,M,P,V,O,L;switch(d.code){case"invalid_type":{let w=d.expected,k=(m=c[w!=null?w:""])!=null?m:r(w),N=R(d.input),j=(p=(f=c[N])!=null?f:(l=e[N])==null?void 0:l.label)!=null?p:N;return/^[A-Z]/.test(d.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${d.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${j}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${k}, \u05D4\u05EA\u05E7\u05D1\u05DC ${j}`}case"invalid_value":{if(d.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${D(d.values[0])}`;let w=d.values.map(j=>D(j));if(d.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${w[0]} \u05D0\u05D5 ${w[1]}`;let k=w[w.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${w.slice(0,-1).join(", ")} \u05D0\u05D5 ${k}`}case"too_big":{let w=a(d.origin),k=i((h=d.origin)!=null?h:"value");if(d.origin==="string")return`${(y=w==null?void 0:w.longLabel)!=null?y:"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${k} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${d.maximum.toString()} ${(x=w==null?void 0:w.unit)!=null?x:""} ${d.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(d.origin==="number"){let F=d.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${d.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${d.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${k} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${F}`}if(d.origin==="array"||d.origin==="set"){let F=d.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",K=d.inclusive?`${d.maximum} ${(S=w==null?void 0:w.unit)!=null?S:""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${d.maximum} ${(g=w==null?void 0:w.unit)!=null?g:""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${k} ${F} \u05DC\u05D4\u05DB\u05D9\u05DC ${K}`.trim()}let N=d.inclusive?"<=":"<",j=o((b=d.origin)!=null?b:"value");return w!=null&&w.unit?`${w.longLabel} \u05DE\u05D3\u05D9: ${k} ${j} ${N}${d.maximum.toString()} ${w.unit}`:`${(v=w==null?void 0:w.longLabel)!=null?v:"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${k} ${j} ${N}${d.maximum.toString()}`}case"too_small":{let w=a(d.origin),k=i((_=d.origin)!=null?_:"value");if(d.origin==="string")return`${(C=w==null?void 0:w.shortLabel)!=null?C:"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${k} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${d.minimum.toString()} ${(E=w==null?void 0:w.unit)!=null?E:""} ${d.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(d.origin==="number"){let F=d.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${d.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${d.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${k} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${F}`}if(d.origin==="array"||d.origin==="set"){let F=d.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(d.minimum===1&&d.inclusive){let ne=(d.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${k} ${F} \u05DC\u05D4\u05DB\u05D9\u05DC ${ne}`}let K=d.inclusive?`${d.minimum} ${(A=w==null?void 0:w.unit)!=null?A:""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${d.minimum} ${(T=w==null?void 0:w.unit)!=null?T:""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${k} ${F} \u05DC\u05D4\u05DB\u05D9\u05DC ${K}`.trim()}let N=d.inclusive?">=":">",j=o((M=d.origin)!=null?M:"value");return w!=null&&w.unit?`${w.shortLabel} \u05DE\u05D3\u05D9: ${k} ${j} ${N}${d.minimum.toString()} ${w.unit}`:`${(P=w==null?void 0:w.shortLabel)!=null?P:"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${k} ${j} ${N}${d.minimum.toString()}`}case"invalid_format":{let w=d;if(w.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${w.prefix}"`;if(w.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${w.suffix}"`;if(w.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${w.includes}"`;if(w.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${w.pattern}`;let k=s[w.format],N=(V=k==null?void 0:k.label)!=null?V:w.format,F=((O=k==null?void 0:k.gender)!=null?O:"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${N} \u05DC\u05D0 ${F}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${d.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${d.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${d.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${z(d.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${i((L=d.origin)!=null?L:"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function N1(){return{localeError:s2()}}var l2=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},r={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${i.expected}, a kapott \xE9rt\xE9k ${p}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${l}, a kapott \xE9rt\xE9k ${p}`}case"invalid_value":return i.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${D(i.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${z(i.values,"|")}`;case"too_big":{let l=i.inclusive?"<=":"<",f=t(i.origin);return f?`T\xFAl nagy: ${(s=i.origin)!=null?s:"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${l}${i.maximum.toString()} ${(c=f.unit)!=null?c:"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${(d=i.origin)!=null?d:"\xE9rt\xE9k"} t\xFAl nagy: ${l}${i.maximum.toString()}`}case"too_small":{let l=i.inclusive?">=":">",f=t(i.origin);return f?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${i.origin} m\xE9rete t\xFAl kicsi ${l}${i.minimum.toString()} ${f.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${i.origin} t\xFAl kicsi ${l}${i.minimum.toString()}`}case"invalid_format":{let l=i;return l.format==="starts_with"?`\xC9rv\xE9nytelen string: "${l.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:l.format==="ends_with"?`\xC9rv\xE9nytelen string: "${l.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:l.format==="includes"?`\xC9rv\xE9nytelen string: "${l.includes}" \xE9rt\xE9ket kell tartalmaznia`:l.format==="regex"?`\xC9rv\xE9nytelen string: ${l.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${(m=n[l.format])!=null?m:i.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${i.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${i.keys.length>1?"s":""}: ${z(i.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${i.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${i.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function O1(){return{localeError:l2()}}function M1(e,t,n){return Math.abs(e)===1?t:n}function Ya(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=e[e.length-1];return e+(t.includes(n)?"\u0576":"\u0568")}var c2=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},r={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return i=>{var o,a,s,c,d;switch(i.code){case"invalid_type":{let m=(o=r[i.expected])!=null?o:i.expected,l=R(i.input),f=(a=r[l])!=null?a:l;return/^[A-Z]/.test(i.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${i.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${f}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${m}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${f}`}case"invalid_value":return i.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${D(i.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${z(i.values,"|")}`;case"too_big":{let m=i.inclusive?"<=":"<",l=t(i.origin);if(l){let f=Number(i.maximum),p=M1(f,l.unit.one,l.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Ya((s=i.origin)!=null?s:"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${m}${i.maximum.toString()} ${p}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Ya((c=i.origin)!=null?c:"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${m}${i.maximum.toString()}`}case"too_small":{let m=i.inclusive?">=":">",l=t(i.origin);if(l){let f=Number(i.minimum),p=M1(f,l.unit.one,l.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Ya(i.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${m}${i.minimum.toString()} ${p}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Ya(i.origin)} \u056C\u056B\u0576\u056B ${m}${i.minimum.toString()}`}case"invalid_format":{let m=i;return m.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${m.prefix}"-\u0578\u057E`:m.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${m.suffix}"-\u0578\u057E`:m.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${m.includes}"`:m.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${m.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${(d=n[m.format])!=null?d:i.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${i.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${i.keys.length>1?"\u0576\u0565\u0580":""}. ${z(i.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Ya(i.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${Ya(i.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function D1(){return{localeError:c2()}}var u2=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`Input tidak valid: diharapkan instanceof ${i.expected}, diterima ${p}`:`Input tidak valid: diharapkan ${l}, diterima ${p}`}case"invalid_value":return i.values.length===1?`Input tidak valid: diharapkan ${D(i.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${z(i.values,"|")}`;case"too_big":{let l=i.inclusive?"<=":"<",f=t(i.origin);return f?`Terlalu besar: diharapkan ${(s=i.origin)!=null?s:"value"} memiliki ${l}${i.maximum.toString()} ${(c=f.unit)!=null?c:"elemen"}`:`Terlalu besar: diharapkan ${(d=i.origin)!=null?d:"value"} menjadi ${l}${i.maximum.toString()}`}case"too_small":{let l=i.inclusive?">=":">",f=t(i.origin);return f?`Terlalu kecil: diharapkan ${i.origin} memiliki ${l}${i.minimum.toString()} ${f.unit}`:`Terlalu kecil: diharapkan ${i.origin} menjadi ${l}${i.minimum.toString()}`}case"invalid_format":{let l=i;return l.format==="starts_with"?`String tidak valid: harus dimulai dengan "${l.prefix}"`:l.format==="ends_with"?`String tidak valid: harus berakhir dengan "${l.suffix}"`:l.format==="includes"?`String tidak valid: harus menyertakan "${l.includes}"`:l.format==="regex"?`String tidak valid: harus sesuai pola ${l.pattern}`:`${(m=n[l.format])!=null?m:i.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${i.keys.length>1?"s":""}: ${z(i.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${i.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${i.origin}`;default:return"Input tidak valid"}}};function R1(){return{localeError:u2()}}var d2=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},r={nan:"NaN",number:"n\xFAmer",array:"fylki"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${p} \xFEar sem \xE1 a\xF0 vera instanceof ${i.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${p} \xFEar sem \xE1 a\xF0 vera ${l}`}case"invalid_value":return i.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${D(i.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${z(i.values,"|")}`;case"too_big":{let l=i.inclusive?"<=":"<",f=t(i.origin);return f?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${(s=i.origin)!=null?s:"gildi"} hafi ${l}${i.maximum.toString()} ${(c=f.unit)!=null?c:"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${(d=i.origin)!=null?d:"gildi"} s\xE9 ${l}${i.maximum.toString()}`}case"too_small":{let l=i.inclusive?">=":">",f=t(i.origin);return f?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin} hafi ${l}${i.minimum.toString()} ${f.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin} s\xE9 ${l}${i.minimum.toString()}`}case"invalid_format":{let l=i;return l.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${l.prefix}"`:l.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${l.suffix}"`:l.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${l.includes}"`:l.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${l.pattern}`:`Rangt ${(m=n[l.format])!=null?m:i.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${i.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${i.keys.length>1?"ir lyklar":"ur lykill"}: ${z(i.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${i.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${i.origin}`;default:return"Rangt gildi"}}};function U1(){return{localeError:d2()}}var f2=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"numero",array:"vettore"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`Input non valido: atteso instanceof ${i.expected}, ricevuto ${p}`:`Input non valido: atteso ${l}, ricevuto ${p}`}case"invalid_value":return i.values.length===1?`Input non valido: atteso ${D(i.values[0])}`:`Opzione non valida: atteso uno tra ${z(i.values,"|")}`;case"too_big":{let l=i.inclusive?"<=":"<",f=t(i.origin);return f?`Troppo grande: ${(s=i.origin)!=null?s:"valore"} deve avere ${l}${i.maximum.toString()} ${(c=f.unit)!=null?c:"elementi"}`:`Troppo grande: ${(d=i.origin)!=null?d:"valore"} deve essere ${l}${i.maximum.toString()}`}case"too_small":{let l=i.inclusive?">=":">",f=t(i.origin);return f?`Troppo piccolo: ${i.origin} deve avere ${l}${i.minimum.toString()} ${f.unit}`:`Troppo piccolo: ${i.origin} deve essere ${l}${i.minimum.toString()}`}case"invalid_format":{let l=i;return l.format==="starts_with"?`Stringa non valida: deve iniziare con "${l.prefix}"`:l.format==="ends_with"?`Stringa non valida: deve terminare con "${l.suffix}"`:l.format==="includes"?`Stringa non valida: deve includere "${l.includes}"`:l.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${l.pattern}`:`Invalid ${(m=n[l.format])!=null?m:i.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${i.divisor}`;case"unrecognized_keys":return`Chiav${i.keys.length>1?"i":"e"} non riconosciut${i.keys.length>1?"e":"a"}: ${z(i.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${i.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${i.origin}`;default:return"Input non valido"}}};function P1(){return{localeError:f2()}}var m2=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},r={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${i.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${p}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${l}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${p}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return i.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${D(i.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${z(i.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let l=i.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",f=t(i.origin);return f?`\u5927\u304D\u3059\u304E\u308B\u5024: ${(s=i.origin)!=null?s:"\u5024"}\u306F${i.maximum.toString()}${(c=f.unit)!=null?c:"\u8981\u7D20"}${l}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${(d=i.origin)!=null?d:"\u5024"}\u306F${i.maximum.toString()}${l}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let l=i.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",f=t(i.origin);return f?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${i.origin}\u306F${i.minimum.toString()}${f.unit}${l}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${i.origin}\u306F${i.minimum.toString()}${l}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let l=i;return l.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${l.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:l.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${l.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:l.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${l.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:l.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${l.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${(m=n[l.format])!=null?m:i.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${i.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${i.keys.length>1?"\u7FA4":""}: ${z(i.keys,"\u3001")}`;case"invalid_key":return`${i.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${i.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function L1(){return{localeError:m2()}}var p2=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},r={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return i=>{var o,a,s,c,d;switch(i.code){case"invalid_type":{let m=(o=r[i.expected])!=null?o:i.expected,l=R(i.input),f=(a=r[l])!=null?a:l;return/^[A-Z]/.test(i.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${i.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${f}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${m}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${f}`}case"invalid_value":return i.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${D(i.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${z(i.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let m=i.inclusive?"<=":"<",l=t(i.origin);return l?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${(s=i.origin)!=null?s:"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${l.verb} ${m}${i.maximum.toString()} ${l.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${(c=i.origin)!=null?c:"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${m}${i.maximum.toString()}`}case"too_small":{let m=i.inclusive?">=":">",l=t(i.origin);return l?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin} ${l.verb} ${m}${i.minimum.toString()} ${l.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin} \u10D8\u10E7\u10DD\u10E1 ${m}${i.minimum.toString()}`}case"invalid_format":{let m=i;return m.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${m.prefix}"-\u10D8\u10D7`:m.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${m.suffix}"-\u10D8\u10D7`:m.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${m.includes}"-\u10E1`:m.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${m.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${(d=n[m.format])!=null?d:i.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${i.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${i.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${z(i.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${i.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${i.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function j1(){return{localeError:p2()}}var g2=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},r={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${i.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${p}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${l} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${p}`}case"invalid_value":return i.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${D(i.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${z(i.values,"|")}`;case"too_big":{let l=i.inclusive?"<=":"<",f=t(i.origin);return f?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${(s=i.origin)!=null?s:"\u178F\u1798\u17D2\u179B\u17C3"} ${l} ${i.maximum.toString()} ${(c=f.unit)!=null?c:"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${(d=i.origin)!=null?d:"\u178F\u1798\u17D2\u179B\u17C3"} ${l} ${i.maximum.toString()}`}case"too_small":{let l=i.inclusive?">=":">",f=t(i.origin);return f?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin} ${l} ${i.minimum.toString()} ${f.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin} ${l} ${i.minimum.toString()}`}case"invalid_format":{let l=i;return l.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${l.prefix}"`:l.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${l.suffix}"`:l.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${l.includes}"`:l.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${l.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${(m=n[l.format])!=null?m:i.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${i.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${z(i.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${i.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${i.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function Yf(){return{localeError:g2()}}function Z1(){return Yf()}var h2=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},r={nan:"NaN"};return i=>{var o,a,s,c,d,m,l,f,p;switch(i.code){case"invalid_type":{let h=(o=r[i.expected])!=null?o:i.expected,y=R(i.input),x=(a=r[y])!=null?a:y;return/^[A-Z]/.test(i.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${i.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${x}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${h}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${x}\uC785\uB2C8\uB2E4`}case"invalid_value":return i.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${D(i.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${z(i.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let h=i.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",y=h==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",x=t(i.origin),S=(s=x==null?void 0:x.unit)!=null?s:"\uC694\uC18C";return x?`${(c=i.origin)!=null?c:"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${i.maximum.toString()}${S} ${h}${y}`:`${(d=i.origin)!=null?d:"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${i.maximum.toString()} ${h}${y}`}case"too_small":{let h=i.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",y=h==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",x=t(i.origin),S=(m=x==null?void 0:x.unit)!=null?m:"\uC694\uC18C";return x?`${(l=i.origin)!=null?l:"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${i.minimum.toString()}${S} ${h}${y}`:`${(f=i.origin)!=null?f:"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${i.minimum.toString()} ${h}${y}`}case"invalid_format":{let h=i;return h.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${h.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:h.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${h.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:h.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${h.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:h.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${h.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${(p=n[h.format])!=null?p:i.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${i.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${z(i.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${i.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${i.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function q1(){return{localeError:h2()}}var mc=e=>e.charAt(0).toUpperCase()+e.slice(1);function V1(e){let t=Math.abs(e),n=t%10,r=t%100;return r>=11&&r<=19||n===0?"many":n===1?"one":"few"}var v2=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(i,o,a,s){var d;let c=(d=e[i])!=null?d:null;return c===null?c:{unit:c.unit[o],verb:c.verb[s][a?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},r={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return i=>{var o,a,s,c,d,m,l,f,p,h,y,x,S,g,b;switch(i.code){case"invalid_type":{let v=(o=r[i.expected])!=null?o:i.expected,_=R(i.input),C=(a=r[_])!=null?a:_;return/^[A-Z]/.test(i.expected)?`Gautas tipas ${C}, o tik\u0117tasi - instanceof ${i.expected}`:`Gautas tipas ${C}, o tik\u0117tasi - ${v}`}case"invalid_value":return i.values.length===1?`Privalo b\u016Bti ${D(i.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${z(i.values,"|")} pasirinkim\u0173`;case"too_big":{let v=(s=r[i.origin])!=null?s:i.origin,_=t(i.origin,V1(Number(i.maximum)),(c=i.inclusive)!=null?c:!1,"smaller");if(_!=null&&_.verb)return`${mc((d=v!=null?v:i.origin)!=null?d:"reik\u0161m\u0117")} ${_.verb} ${i.maximum.toString()} ${(m=_.unit)!=null?m:"element\u0173"}`;let C=i.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${mc((l=v!=null?v:i.origin)!=null?l:"reik\u0161m\u0117")} turi b\u016Bti ${C} ${i.maximum.toString()} ${_==null?void 0:_.unit}`}case"too_small":{let v=(f=r[i.origin])!=null?f:i.origin,_=t(i.origin,V1(Number(i.minimum)),(p=i.inclusive)!=null?p:!1,"bigger");if(_!=null&&_.verb)return`${mc((h=v!=null?v:i.origin)!=null?h:"reik\u0161m\u0117")} ${_.verb} ${i.minimum.toString()} ${(y=_.unit)!=null?y:"element\u0173"}`;let C=i.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${mc((x=v!=null?v:i.origin)!=null?x:"reik\u0161m\u0117")} turi b\u016Bti ${C} ${i.minimum.toString()} ${_==null?void 0:_.unit}`}case"invalid_format":{let v=i;return v.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${v.prefix}"`:v.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${v.suffix}"`:v.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${v.includes}"`:v.format==="regex"?`Eilut\u0117 privalo atitikti ${v.pattern}`:`Neteisingas ${(S=n[v.format])!=null?S:i.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${i.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${i.keys.length>1?"i":"as"} rakt${i.keys.length>1?"ai":"as"}: ${z(i.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let v=(g=r[i.origin])!=null?g:i.origin;return`${mc((b=v!=null?v:i.origin)!=null?b:"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function F1(){return{localeError:v2()}}var y2=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},r={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${i.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${p}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${l}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${p}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${D(i.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${z(i.values,"|")}`;case"too_big":{let l=i.inclusive?"<=":"<",f=t(i.origin);return f?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${(s=i.origin)!=null?s:"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${l}${i.maximum.toString()} ${(c=f.unit)!=null?c:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${(d=i.origin)!=null?d:"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${l}${i.maximum.toString()}`}case"too_small":{let l=i.inclusive?">=":">",f=t(i.origin);return f?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin} \u0434\u0430 \u0438\u043C\u0430 ${l}${i.minimum.toString()} ${f.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${l}${i.minimum.toString()}`}case"invalid_format":{let l=i;return l.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${l.prefix}"`:l.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${l.suffix}"`:l.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${l.includes}"`:l.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${l.pattern}`:`Invalid ${(m=n[l.format])!=null?m:i.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${z(i.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${i.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${i.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function H1(){return{localeError:y2()}}var S2=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"nombor"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`Input tidak sah: dijangka instanceof ${i.expected}, diterima ${p}`:`Input tidak sah: dijangka ${l}, diterima ${p}`}case"invalid_value":return i.values.length===1?`Input tidak sah: dijangka ${D(i.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${z(i.values,"|")}`;case"too_big":{let l=i.inclusive?"<=":"<",f=t(i.origin);return f?`Terlalu besar: dijangka ${(s=i.origin)!=null?s:"nilai"} ${f.verb} ${l}${i.maximum.toString()} ${(c=f.unit)!=null?c:"elemen"}`:`Terlalu besar: dijangka ${(d=i.origin)!=null?d:"nilai"} adalah ${l}${i.maximum.toString()}`}case"too_small":{let l=i.inclusive?">=":">",f=t(i.origin);return f?`Terlalu kecil: dijangka ${i.origin} ${f.verb} ${l}${i.minimum.toString()} ${f.unit}`:`Terlalu kecil: dijangka ${i.origin} adalah ${l}${i.minimum.toString()}`}case"invalid_format":{let l=i;return l.format==="starts_with"?`String tidak sah: mesti bermula dengan "${l.prefix}"`:l.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${l.suffix}"`:l.format==="includes"?`String tidak sah: mesti mengandungi "${l.includes}"`:l.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${l.pattern}`:`${(m=n[l.format])!=null?m:i.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${z(i.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${i.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${i.origin}`;default:return"Input tidak sah"}}};function B1(){return{localeError:S2()}}var b2=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},r={nan:"NaN",number:"getal"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`Ongeldige invoer: verwacht instanceof ${i.expected}, ontving ${p}`:`Ongeldige invoer: verwacht ${l}, ontving ${p}`}case"invalid_value":return i.values.length===1?`Ongeldige invoer: verwacht ${D(i.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${z(i.values,"|")}`;case"too_big":{let l=i.inclusive?"<=":"<",f=t(i.origin),p=i.origin==="date"?"laat":i.origin==="string"?"lang":"groot";return f?`Te ${p}: verwacht dat ${(s=i.origin)!=null?s:"waarde"} ${l}${i.maximum.toString()} ${(c=f.unit)!=null?c:"elementen"} ${f.verb}`:`Te ${p}: verwacht dat ${(d=i.origin)!=null?d:"waarde"} ${l}${i.maximum.toString()} is`}case"too_small":{let l=i.inclusive?">=":">",f=t(i.origin),p=i.origin==="date"?"vroeg":i.origin==="string"?"kort":"klein";return f?`Te ${p}: verwacht dat ${i.origin} ${l}${i.minimum.toString()} ${f.unit} ${f.verb}`:`Te ${p}: verwacht dat ${i.origin} ${l}${i.minimum.toString()} is`}case"invalid_format":{let l=i;return l.format==="starts_with"?`Ongeldige tekst: moet met "${l.prefix}" beginnen`:l.format==="ends_with"?`Ongeldige tekst: moet op "${l.suffix}" eindigen`:l.format==="includes"?`Ongeldige tekst: moet "${l.includes}" bevatten`:l.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${l.pattern}`:`Ongeldig: ${(m=n[l.format])!=null?m:i.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${i.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${i.keys.length>1?"s":""}: ${z(i.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${i.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${i.origin}`;default:return"Ongeldige invoer"}}};function G1(){return{localeError:b2()}}var x2=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"tall",array:"liste"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`Ugyldig input: forventet instanceof ${i.expected}, fikk ${p}`:`Ugyldig input: forventet ${l}, fikk ${p}`}case"invalid_value":return i.values.length===1?`Ugyldig verdi: forventet ${D(i.values[0])}`:`Ugyldig valg: forventet en av ${z(i.values,"|")}`;case"too_big":{let l=i.inclusive?"<=":"<",f=t(i.origin);return f?`For stor(t): forventet ${(s=i.origin)!=null?s:"value"} til \xE5 ha ${l}${i.maximum.toString()} ${(c=f.unit)!=null?c:"elementer"}`:`For stor(t): forventet ${(d=i.origin)!=null?d:"value"} til \xE5 ha ${l}${i.maximum.toString()}`}case"too_small":{let l=i.inclusive?">=":">",f=t(i.origin);return f?`For lite(n): forventet ${i.origin} til \xE5 ha ${l}${i.minimum.toString()} ${f.unit}`:`For lite(n): forventet ${i.origin} til \xE5 ha ${l}${i.minimum.toString()}`}case"invalid_format":{let l=i;return l.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${l.prefix}"`:l.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${l.suffix}"`:l.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${l.includes}"`:l.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${l.pattern}`:`Ugyldig ${(m=n[l.format])!=null?m:i.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${z(i.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${i.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${i.origin}`;default:return"Ugyldig input"}}};function X1(){return{localeError:x2()}}var _2=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},r={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`F\xE2sit giren: umulan instanceof ${i.expected}, al\u0131nan ${p}`:`F\xE2sit giren: umulan ${l}, al\u0131nan ${p}`}case"invalid_value":return i.values.length===1?`F\xE2sit giren: umulan ${D(i.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${z(i.values,"|")}`;case"too_big":{let l=i.inclusive?"<=":"<",f=t(i.origin);return f?`Fazla b\xFCy\xFCk: ${(s=i.origin)!=null?s:"value"}, ${l}${i.maximum.toString()} ${(c=f.unit)!=null?c:"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${(d=i.origin)!=null?d:"value"}, ${l}${i.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let l=i.inclusive?">=":">",f=t(i.origin);return f?`Fazla k\xFC\xE7\xFCk: ${i.origin}, ${l}${i.minimum.toString()} ${f.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${i.origin}, ${l}${i.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let l=i;return l.format==="starts_with"?`F\xE2sit metin: "${l.prefix}" ile ba\u015Flamal\u0131.`:l.format==="ends_with"?`F\xE2sit metin: "${l.suffix}" ile bitmeli.`:l.format==="includes"?`F\xE2sit metin: "${l.includes}" ihtiv\xE2 etmeli.`:l.format==="regex"?`F\xE2sit metin: ${l.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${(m=n[l.format])!=null?m:i.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${i.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${i.keys.length>1?"s":""}: ${z(i.keys,", ")}`;case"invalid_key":return`${i.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${i.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function Y1(){return{localeError:_2()}}var w2=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},r={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${i.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${p} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${l} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${p} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return i.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${D(i.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${z(i.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let l=i.inclusive?"<=":"<",f=t(i.origin);return f?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${(s=i.origin)!=null?s:"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${l}${i.maximum.toString()} ${(c=f.unit)!=null?c:"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${(d=i.origin)!=null?d:"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${l}${i.maximum.toString()} \u0648\u064A`}case"too_small":{let l=i.inclusive?">=":">",f=t(i.origin);return f?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${i.origin} \u0628\u0627\u06CC\u062F ${l}${i.minimum.toString()} ${f.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${i.origin} \u0628\u0627\u06CC\u062F ${l}${i.minimum.toString()} \u0648\u064A`}case"invalid_format":{let l=i;return l.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${l.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:l.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${l.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:l.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${l.includes}" \u0648\u0644\u0631\u064A`:l.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${l.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${(m=n[l.format])!=null?m:i.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${i.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${i.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${z(i.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${i.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${i.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function J1(){return{localeError:w2()}}var $2=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},r={nan:"NaN",number:"liczba",array:"tablica"};return i=>{var o,a,s,c,d,m,l,f,p;switch(i.code){case"invalid_type":{let h=(o=r[i.expected])!=null?o:i.expected,y=R(i.input),x=(a=r[y])!=null?a:y;return/^[A-Z]/.test(i.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${i.expected}, otrzymano ${x}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${h}, otrzymano ${x}`}case"invalid_value":return i.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${D(i.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${z(i.values,"|")}`;case"too_big":{let h=i.inclusive?"<=":"<",y=t(i.origin);return y?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${(s=i.origin)!=null?s:"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${h}${i.maximum.toString()} ${(c=y.unit)!=null?c:"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${(d=i.origin)!=null?d:"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${h}${i.maximum.toString()}`}case"too_small":{let h=i.inclusive?">=":">",y=t(i.origin);return y?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${(m=i.origin)!=null?m:"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${h}${i.minimum.toString()} ${(l=y.unit)!=null?l:"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${(f=i.origin)!=null?f:"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${h}${i.minimum.toString()}`}case"invalid_format":{let h=i;return h.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${h.prefix}"`:h.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${h.suffix}"`:h.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${h.includes}"`:h.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${h.pattern}`:`Nieprawid\u0142ow(y/a/e) ${(p=n[h.format])!=null?p:i.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${i.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${i.keys.length>1?"s":""}: ${z(i.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${i.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${i.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function K1(){return{localeError:$2()}}var C2=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},r={nan:"NaN",number:"n\xFAmero",null:"nulo"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`Tipo inv\xE1lido: esperado instanceof ${i.expected}, recebido ${p}`:`Tipo inv\xE1lido: esperado ${l}, recebido ${p}`}case"invalid_value":return i.values.length===1?`Entrada inv\xE1lida: esperado ${D(i.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${z(i.values,"|")}`;case"too_big":{let l=i.inclusive?"<=":"<",f=t(i.origin);return f?`Muito grande: esperado que ${(s=i.origin)!=null?s:"valor"} tivesse ${l}${i.maximum.toString()} ${(c=f.unit)!=null?c:"elementos"}`:`Muito grande: esperado que ${(d=i.origin)!=null?d:"valor"} fosse ${l}${i.maximum.toString()}`}case"too_small":{let l=i.inclusive?">=":">",f=t(i.origin);return f?`Muito pequeno: esperado que ${i.origin} tivesse ${l}${i.minimum.toString()} ${f.unit}`:`Muito pequeno: esperado que ${i.origin} fosse ${l}${i.minimum.toString()}`}case"invalid_format":{let l=i;return l.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${l.prefix}"`:l.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${l.suffix}"`:l.format==="includes"?`Texto inv\xE1lido: deve incluir "${l.includes}"`:l.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${l.pattern}`:`${(m=n[l.format])!=null?m:i.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${i.divisor}`;case"unrecognized_keys":return`Chave${i.keys.length>1?"s":""} desconhecida${i.keys.length>1?"s":""}: ${z(i.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${i.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${i.origin}`;default:return"Campo inv\xE1lido"}}};function W1(){return{localeError:C2()}}function Q1(e,t,n,r){let i=Math.abs(e),o=i%10,a=i%100;return a>=11&&a<=19?r:o===1?t:o>=2&&o<=4?n:r}var E2=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},r={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return i=>{var o,a,s,c,d;switch(i.code){case"invalid_type":{let m=(o=r[i.expected])!=null?o:i.expected,l=R(i.input),f=(a=r[l])!=null?a:l;return/^[A-Z]/.test(i.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${i.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${f}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${m}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${f}`}case"invalid_value":return i.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${D(i.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${z(i.values,"|")}`;case"too_big":{let m=i.inclusive?"<=":"<",l=t(i.origin);if(l){let f=Number(i.maximum),p=Q1(f,l.unit.one,l.unit.few,l.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${(s=i.origin)!=null?s:"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${m}${i.maximum.toString()} ${p}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${(c=i.origin)!=null?c:"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${m}${i.maximum.toString()}`}case"too_small":{let m=i.inclusive?">=":">",l=t(i.origin);if(l){let f=Number(i.minimum),p=Q1(f,l.unit.one,l.unit.few,l.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${m}${i.minimum.toString()} ${p}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin} \u0431\u0443\u0434\u0435\u0442 ${m}${i.minimum.toString()}`}case"invalid_format":{let m=i;return m.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${m.prefix}"`:m.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${m.suffix}"`:m.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${m.includes}"`:m.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${m.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${(d=n[m.format])!=null?d:i.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${i.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${i.keys.length>1?"\u0438":""}: ${z(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${i.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${i.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function eN(){return{localeError:E2()}}var A2=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},r={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${i.expected}, prejeto ${p}`:`Neveljaven vnos: pri\u010Dakovano ${l}, prejeto ${p}`}case"invalid_value":return i.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${D(i.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${z(i.values,"|")}`;case"too_big":{let l=i.inclusive?"<=":"<",f=t(i.origin);return f?`Preveliko: pri\u010Dakovano, da bo ${(s=i.origin)!=null?s:"vrednost"} imelo ${l}${i.maximum.toString()} ${(c=f.unit)!=null?c:"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${(d=i.origin)!=null?d:"vrednost"} ${l}${i.maximum.toString()}`}case"too_small":{let l=i.inclusive?">=":">",f=t(i.origin);return f?`Premajhno: pri\u010Dakovano, da bo ${i.origin} imelo ${l}${i.minimum.toString()} ${f.unit}`:`Premajhno: pri\u010Dakovano, da bo ${i.origin} ${l}${i.minimum.toString()}`}case"invalid_format":{let l=i;return l.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${l.prefix}"`:l.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${l.suffix}"`:l.format==="includes"?`Neveljaven niz: mora vsebovati "${l.includes}"`:l.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${l.pattern}`:`Neveljaven ${(m=n[l.format])!=null?m:i.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${i.divisor}`;case"unrecognized_keys":return`Neprepoznan${i.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${z(i.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${i.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${i.origin}`;default:return"Neveljaven vnos"}}};function tN(){return{localeError:A2()}}var z2=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},r={nan:"NaN",number:"antal",array:"lista"};return i=>{var o,a,s,c,d,m,l,f,p,h;switch(i.code){case"invalid_type":{let y=(o=r[i.expected])!=null?o:i.expected,x=R(i.input),S=(a=r[x])!=null?a:x;return/^[A-Z]/.test(i.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${i.expected}, fick ${S}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${y}, fick ${S}`}case"invalid_value":return i.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${D(i.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${z(i.values,"|")}`;case"too_big":{let y=i.inclusive?"<=":"<",x=t(i.origin);return x?`F\xF6r stor(t): f\xF6rv\xE4ntade ${(s=i.origin)!=null?s:"v\xE4rdet"} att ha ${y}${i.maximum.toString()} ${(c=x.unit)!=null?c:"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${(d=i.origin)!=null?d:"v\xE4rdet"} att ha ${y}${i.maximum.toString()}`}case"too_small":{let y=i.inclusive?">=":">",x=t(i.origin);return x?`F\xF6r lite(t): f\xF6rv\xE4ntade ${(m=i.origin)!=null?m:"v\xE4rdet"} att ha ${y}${i.minimum.toString()} ${x.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${(l=i.origin)!=null?l:"v\xE4rdet"} att ha ${y}${i.minimum.toString()}`}case"invalid_format":{let y=i;return y.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${y.prefix}"`:y.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${y.suffix}"`:y.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${y.includes}"`:y.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${y.pattern}"`:`Ogiltig(t) ${(f=n[y.format])!=null?f:i.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${z(i.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${(p=i.origin)!=null?p:"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${(h=i.origin)!=null?h:"v\xE4rdet"}`;default:return"Ogiltig input"}}};function nN(){return{localeError:z2()}}var T2=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${i.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${p}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${l}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${p}`}case"invalid_value":return i.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${D(i.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${z(i.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let l=i.inclusive?"<=":"<",f=t(i.origin);return f?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${(s=i.origin)!=null?s:"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${l}${i.maximum.toString()} ${(c=f.unit)!=null?c:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${(d=i.origin)!=null?d:"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${l}${i.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let l=i.inclusive?">=":">",f=t(i.origin);return f?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin} ${l}${i.minimum.toString()} ${f.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin} ${l}${i.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let l=i;return l.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${l.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:l.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${l.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:l.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${l.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:l.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${l.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${(m=n[l.format])!=null?m:i.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${i.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${i.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${z(i.keys,", ")}`;case"invalid_key":return`${i.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${i.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function iN(){return{localeError:T2()}}var I2=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},r={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${i.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${p}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${l} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${p}`}case"invalid_value":return i.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${D(i.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${z(i.values,"|")}`;case"too_big":{let l=i.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",f=t(i.origin);return f?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${(s=i.origin)!=null?s:"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${l} ${i.maximum.toString()} ${(c=f.unit)!=null?c:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${(d=i.origin)!=null?d:"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${l} ${i.maximum.toString()}`}case"too_small":{let l=i.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",f=t(i.origin);return f?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${l} ${i.minimum.toString()} ${f.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${l} ${i.minimum.toString()}`}case"invalid_format":{let l=i;return l.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${l.prefix}"`:l.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${l.suffix}"`:l.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${l.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:l.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${l.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${(m=n[l.format])!=null?m:i.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${i.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${z(i.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${i.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${i.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function rN(){return{localeError:I2()}}var k2=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},r={nan:"NaN"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${i.expected}, al\u0131nan ${p}`:`Ge\xE7ersiz de\u011Fer: beklenen ${l}, al\u0131nan ${p}`}case"invalid_value":return i.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${D(i.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${z(i.values,"|")}`;case"too_big":{let l=i.inclusive?"<=":"<",f=t(i.origin);return f?`\xC7ok b\xFCy\xFCk: beklenen ${(s=i.origin)!=null?s:"de\u011Fer"} ${l}${i.maximum.toString()} ${(c=f.unit)!=null?c:"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${(d=i.origin)!=null?d:"de\u011Fer"} ${l}${i.maximum.toString()}`}case"too_small":{let l=i.inclusive?">=":">",f=t(i.origin);return f?`\xC7ok k\xFC\xE7\xFCk: beklenen ${i.origin} ${l}${i.minimum.toString()} ${f.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${i.origin} ${l}${i.minimum.toString()}`}case"invalid_format":{let l=i;return l.format==="starts_with"?`Ge\xE7ersiz metin: "${l.prefix}" ile ba\u015Flamal\u0131`:l.format==="ends_with"?`Ge\xE7ersiz metin: "${l.suffix}" ile bitmeli`:l.format==="includes"?`Ge\xE7ersiz metin: "${l.includes}" i\xE7ermeli`:l.format==="regex"?`Ge\xE7ersiz metin: ${l.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${(m=n[l.format])!=null?m:i.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${i.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${i.keys.length>1?"lar":""}: ${z(i.keys,", ")}`;case"invalid_key":return`${i.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${i.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function oN(){return{localeError:k2()}}var N2=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},r={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${i.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${p}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${l}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${p}`}case"invalid_value":return i.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${D(i.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${z(i.values,"|")}`;case"too_big":{let l=i.inclusive?"<=":"<",f=t(i.origin);return f?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${(s=i.origin)!=null?s:"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${f.verb} ${l}${i.maximum.toString()} ${(c=f.unit)!=null?c:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${(d=i.origin)!=null?d:"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${l}${i.maximum.toString()}`}case"too_small":{let l=i.inclusive?">=":">",f=t(i.origin);return f?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin} ${f.verb} ${l}${i.minimum.toString()} ${f.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin} \u0431\u0443\u0434\u0435 ${l}${i.minimum.toString()}`}case"invalid_format":{let l=i;return l.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${l.prefix}"`:l.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${l.suffix}"`:l.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${l.includes}"`:l.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${l.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${(m=n[l.format])!=null?m:i.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${i.keys.length>1?"\u0456":""}: ${z(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${i.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${i.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function Jf(){return{localeError:N2()}}function aN(){return Jf()}var O2=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},r={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${i.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${p} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${l} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${p} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return i.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${D(i.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${z(i.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let l=i.inclusive?"<=":"<",f=t(i.origin);return f?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${(s=i.origin)!=null?s:"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${l}${i.maximum.toString()} ${(c=f.unit)!=null?c:"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${(d=i.origin)!=null?d:"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${l}${i.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let l=i.inclusive?">=":">",f=t(i.origin);return f?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${i.origin} \u06A9\u06D2 ${l}${i.minimum.toString()} ${f.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${i.origin} \u06A9\u0627 ${l}${i.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let l=i;return l.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${l.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:l.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${l.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:l.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${l.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:l.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${l.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${(m=n[l.format])!=null?m:i.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${i.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${i.keys.length>1?"\u0632":""}: ${z(i.keys,"\u060C ")}`;case"invalid_key":return`${i.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${i.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function sN(){return{localeError:O2()}}var M2=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},r={nan:"NaN",number:"raqam",array:"massiv"};return i=>{var o,a,s,c,d;switch(i.code){case"invalid_type":{let m=(o=r[i.expected])!=null?o:i.expected,l=R(i.input),f=(a=r[l])!=null?a:l;return/^[A-Z]/.test(i.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${i.expected}, qabul qilingan ${f}`:`Noto\u2018g\u2018ri kirish: kutilgan ${m}, qabul qilingan ${f}`}case"invalid_value":return i.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${D(i.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${z(i.values,"|")}`;case"too_big":{let m=i.inclusive?"<=":"<",l=t(i.origin);return l?`Juda katta: kutilgan ${(s=i.origin)!=null?s:"qiymat"} ${m}${i.maximum.toString()} ${l.unit} ${l.verb}`:`Juda katta: kutilgan ${(c=i.origin)!=null?c:"qiymat"} ${m}${i.maximum.toString()}`}case"too_small":{let m=i.inclusive?">=":">",l=t(i.origin);return l?`Juda kichik: kutilgan ${i.origin} ${m}${i.minimum.toString()} ${l.unit} ${l.verb}`:`Juda kichik: kutilgan ${i.origin} ${m}${i.minimum.toString()}`}case"invalid_format":{let m=i;return m.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${m.prefix}" bilan boshlanishi kerak`:m.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${m.suffix}" bilan tugashi kerak`:m.format==="includes"?`Noto\u2018g\u2018ri satr: "${m.includes}" ni o\u2018z ichiga olishi kerak`:m.format==="regex"?`Noto\u2018g\u2018ri satr: ${m.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${(d=n[m.format])!=null?d:i.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${i.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${i.keys.length>1?"lar":""}: ${z(i.keys,", ")}`;case"invalid_key":return`${i.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${i.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function lN(){return{localeError:M2()}}var D2=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},r={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${i.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${p}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${l}, nh\u1EADn \u0111\u01B0\u1EE3c ${p}`}case"invalid_value":return i.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${D(i.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${z(i.values,"|")}`;case"too_big":{let l=i.inclusive?"<=":"<",f=t(i.origin);return f?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${(s=i.origin)!=null?s:"gi\xE1 tr\u1ECB"} ${f.verb} ${l}${i.maximum.toString()} ${(c=f.unit)!=null?c:"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${(d=i.origin)!=null?d:"gi\xE1 tr\u1ECB"} ${l}${i.maximum.toString()}`}case"too_small":{let l=i.inclusive?">=":">",f=t(i.origin);return f?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${i.origin} ${f.verb} ${l}${i.minimum.toString()} ${f.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${i.origin} ${l}${i.minimum.toString()}`}case"invalid_format":{let l=i;return l.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${l.prefix}"`:l.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${l.suffix}"`:l.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${l.includes}"`:l.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${l.pattern}`:`${(m=n[l.format])!=null?m:i.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${i.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${z(i.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${i.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${i.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function cN(){return{localeError:D2()}}var R2=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},r={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${i.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${p}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${l}\uFF0C\u5B9E\u9645\u63A5\u6536 ${p}`}case"invalid_value":return i.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${D(i.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${z(i.values,"|")}`;case"too_big":{let l=i.inclusive?"<=":"<",f=t(i.origin);return f?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${(s=i.origin)!=null?s:"\u503C"} ${l}${i.maximum.toString()} ${(c=f.unit)!=null?c:"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${(d=i.origin)!=null?d:"\u503C"} ${l}${i.maximum.toString()}`}case"too_small":{let l=i.inclusive?">=":">",f=t(i.origin);return f?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${i.origin} ${l}${i.minimum.toString()} ${f.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${i.origin} ${l}${i.minimum.toString()}`}case"invalid_format":{let l=i;return l.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${l.prefix}" \u5F00\u5934`:l.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${l.suffix}" \u7ED3\u5C3E`:l.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${l.includes}"`:l.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${l.pattern}`:`\u65E0\u6548${(m=n[l.format])!=null?m:i.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${i.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${z(i.keys,", ")}`;case"invalid_key":return`${i.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${i.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function uN(){return{localeError:R2()}}var U2=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},r={nan:"NaN"};return i=>{var o,a,s,c,d,m;switch(i.code){case"invalid_type":{let l=(o=r[i.expected])!=null?o:i.expected,f=R(i.input),p=(a=r[f])!=null?a:f;return/^[A-Z]/.test(i.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${i.expected}\uFF0C\u4F46\u6536\u5230 ${p}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${l}\uFF0C\u4F46\u6536\u5230 ${p}`}case"invalid_value":return i.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${D(i.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${z(i.values,"|")}`;case"too_big":{let l=i.inclusive?"<=":"<",f=t(i.origin);return f?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${(s=i.origin)!=null?s:"\u503C"} \u61C9\u70BA ${l}${i.maximum.toString()} ${(c=f.unit)!=null?c:"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${(d=i.origin)!=null?d:"\u503C"} \u61C9\u70BA ${l}${i.maximum.toString()}`}case"too_small":{let l=i.inclusive?">=":">",f=t(i.origin);return f?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${i.origin} \u61C9\u70BA ${l}${i.minimum.toString()} ${f.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${i.origin} \u61C9\u70BA ${l}${i.minimum.toString()}`}case"invalid_format":{let l=i;return l.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${l.prefix}" \u958B\u982D`:l.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${l.suffix}" \u7D50\u5C3E`:l.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${l.includes}"`:l.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${l.pattern}`:`\u7121\u6548\u7684 ${(m=n[l.format])!=null?m:i.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${i.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${i.keys.length>1?"\u5011":""}\uFF1A${z(i.keys,"\u3001")}`;case"invalid_key":return`${i.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${i.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function dN(){return{localeError:U2()}}var P2=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(i){var o;return(o=e[i])!=null?o:null}let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},r={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return i=>{var o,a,s,c;switch(i.code){case"invalid_type":{let d=(o=r[i.expected])!=null?o:i.expected,m=R(i.input),l=(a=r[m])!=null?a:m;return/^[A-Z]/.test(i.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${i.expected}, \xE0m\u1ECD\u0300 a r\xED ${l}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${d}, \xE0m\u1ECD\u0300 a r\xED ${l}`}case"invalid_value":return i.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${D(i.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${z(i.values,"|")}`;case"too_big":{let d=i.inclusive?"<=":"<",m=t(i.origin);return m?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${(s=i.origin)!=null?s:"iye"} ${m.verb} ${d}${i.maximum} ${m.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${d}${i.maximum}`}case"too_small":{let d=i.inclusive?">=":">",m=t(i.origin);return m?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${i.origin} ${m.verb} ${d}${i.minimum} ${m.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${d}${i.minimum}`}case"invalid_format":{let d=i;return d.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${d.prefix}"`:d.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${d.suffix}"`:d.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${d.includes}"`:d.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${d.pattern}`:`A\u1E63\xEC\u1E63e: ${(c=n[d.format])!=null?c:i.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${i.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${z(i.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${i.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${i.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function fN(){return{localeError:P2()}}var mN,Qb=Symbol("ZodOutput"),ex=Symbol("ZodInput"),Kf=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){var r;let n=t._zod.parent;if(n){let i={...(r=this.get(n))!=null?r:{}};delete i.id;let o={...i,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Wf(){return new Kf}var pN;(pN=(mN=globalThis).__zod_globalRegistry)!=null||(mN.__zod_globalRegistry=Wf());var It=globalThis.__zod_globalRegistry;function tx(e,t){return new e({type:"string",...Z(t)})}function nx(e,t){return new e({type:"string",coerce:!0,...Z(t)})}function Qf(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Z(t)})}function pc(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Z(t)})}function em(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Z(t)})}function tm(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Z(t)})}function nm(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Z(t)})}function im(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Z(t)})}function gc(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Z(t)})}function rm(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Z(t)})}function om(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Z(t)})}function am(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Z(t)})}function sm(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Z(t)})}function lm(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Z(t)})}function cm(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Z(t)})}function um(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Z(t)})}function dm(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Z(t)})}function fm(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Z(t)})}function ix(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...Z(t)})}function mm(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Z(t)})}function pm(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Z(t)})}function gm(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Z(t)})}function hm(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Z(t)})}function vm(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Z(t)})}function ym(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Z(t)})}var rx={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function ox(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Z(t)})}function ax(e,t){return new e({type:"string",format:"date",check:"string_format",...Z(t)})}function sx(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Z(t)})}function lx(e,t){return new e({type:"string",format:"duration",check:"string_format",...Z(t)})}function cx(e,t){return new e({type:"number",checks:[],...Z(t)})}function ux(e,t){return new e({type:"number",coerce:!0,checks:[],...Z(t)})}function dx(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Z(t)})}function fx(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...Z(t)})}function mx(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...Z(t)})}function px(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...Z(t)})}function gx(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...Z(t)})}function hx(e,t){return new e({type:"boolean",...Z(t)})}function vx(e,t){return new e({type:"boolean",coerce:!0,...Z(t)})}function yx(e,t){return new e({type:"bigint",...Z(t)})}function Sx(e,t){return new e({type:"bigint",coerce:!0,...Z(t)})}function bx(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...Z(t)})}function xx(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...Z(t)})}function _x(e,t){return new e({type:"symbol",...Z(t)})}function wx(e,t){return new e({type:"undefined",...Z(t)})}function $x(e,t){return new e({type:"null",...Z(t)})}function Cx(e){return new e({type:"any"})}function Ex(e){return new e({type:"unknown"})}function Ax(e,t){return new e({type:"never",...Z(t)})}function zx(e,t){return new e({type:"void",...Z(t)})}function Tx(e,t){return new e({type:"date",...Z(t)})}function Ix(e,t){return new e({type:"date",coerce:!0,...Z(t)})}function kx(e,t){return new e({type:"nan",...Z(t)})}function gi(e,t){return new Uf({check:"less_than",...Z(t),value:e,inclusive:!1})}function xn(e,t){return new Uf({check:"less_than",...Z(t),value:e,inclusive:!0})}function hi(e,t){return new Pf({check:"greater_than",...Z(t),value:e,inclusive:!1})}function Ft(e,t){return new Pf({check:"greater_than",...Z(t),value:e,inclusive:!0})}function Sm(e){return hi(0,e)}function bm(e){return gi(0,e)}function xm(e){return xn(0,e)}function _m(e){return Ft(0,e)}function Lr(e,t){return new $S({check:"multiple_of",...Z(t),value:e})}function jr(e,t){return new AS({check:"max_size",...Z(t),maximum:e})}function vi(e,t){return new zS({check:"min_size",...Z(t),minimum:e})}function $o(e,t){return new TS({check:"size_equals",...Z(t),size:e})}function Co(e,t){return new IS({check:"max_length",...Z(t),maximum:e})}function Yi(e,t){return new kS({check:"min_length",...Z(t),minimum:e})}function Eo(e,t){return new NS({check:"length_equals",...Z(t),length:e})}function Ja(e,t){return new OS({check:"string_format",format:"regex",...Z(t),pattern:e})}function Ka(e){return new MS({check:"string_format",format:"lowercase",...Z(e)})}function Wa(e){return new DS({check:"string_format",format:"uppercase",...Z(e)})}function Qa(e,t){return new RS({check:"string_format",format:"includes",...Z(t),includes:e})}function es(e,t){return new US({check:"string_format",format:"starts_with",...Z(t),prefix:e})}function ts(e,t){return new PS({check:"string_format",format:"ends_with",...Z(t),suffix:e})}function wm(e,t,n){return new LS({check:"property",property:e,schema:t,...Z(n)})}function ns(e,t){return new jS({check:"mime_type",mime:e,...Z(t)})}function Kn(e){return new ZS({check:"overwrite",tx:e})}function is(e){return Kn(t=>t.normalize(e))}function rs(){return Kn(e=>e.trim())}function os(){return Kn(e=>e.toLowerCase())}function as(){return Kn(e=>e.toUpperCase())}function ss(){return Kn(e=>Ly(e))}function Nx(e,t,n){return new e({type:"array",element:t,...Z(n)})}function j2(e,t,n){return new e({type:"union",options:t,...Z(n)})}function Z2(e,t,n){return new e({type:"union",options:t,inclusive:!1,...Z(n)})}function q2(e,t,n,r){return new e({type:"union",options:n,discriminator:t,...Z(r)})}function V2(e,t,n){return new e({type:"intersection",left:t,right:n})}function F2(e,t,n,r){let i=n instanceof oe,o=i?r:n,a=i?n:null;return new e({type:"tuple",items:t,rest:a,...Z(o)})}function H2(e,t,n,r){return new e({type:"record",keyType:t,valueType:n,...Z(r)})}function B2(e,t,n,r){return new e({type:"map",keyType:t,valueType:n,...Z(r)})}function G2(e,t,n){return new e({type:"set",valueType:t,...Z(n)})}function X2(e,t,n){let r=Array.isArray(t)?Object.fromEntries(t.map(i=>[i,i])):t;return new e({type:"enum",entries:r,...Z(n)})}function Y2(e,t,n){return new e({type:"enum",entries:t,...Z(n)})}function J2(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...Z(n)})}function Ox(e,t){return new e({type:"file",...Z(t)})}function K2(e,t){return new e({type:"transform",transform:t})}function W2(e,t){return new e({type:"optional",innerType:t})}function Q2(e,t){return new e({type:"nullable",innerType:t})}function eZ(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():Zy(n)}})}function tZ(e,t,n){return new e({type:"nonoptional",innerType:t,...Z(n)})}function nZ(e,t){return new e({type:"success",innerType:t})}function iZ(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function rZ(e,t,n){return new e({type:"pipe",in:t,out:n})}function oZ(e,t){return new e({type:"readonly",innerType:t})}function aZ(e,t,n){return new e({type:"template_literal",parts:t,...Z(n)})}function sZ(e,t){return new e({type:"lazy",getter:t})}function lZ(e,t){return new e({type:"promise",innerType:t})}function Mx(e,t,n){var o;let r=Z(n);return(o=r.abort)!=null||(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function Dx(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Z(n)})}function Rx(e){let t=gN(n=>(n.addIssue=r=>{var i,o,a,s;if(typeof r=="string")n.issues.push(Va(r,n.value,t._zod.def));else{let c=r;c.fatal&&(c.continue=!1),(i=c.code)!=null||(c.code="custom"),(o=c.input)!=null||(c.input=n.value),(a=c.inst)!=null||(c.inst=t),(s=c.continue)!=null||(c.continue=!t._zod.def.abort),n.issues.push(Va(c))}},e(n.value,n)));return t}function gN(e,t){let n=new Re({check:"custom",...Z(t)});return n._zod.check=e,n}function Ux(e){let t=new Re({check:"describe"});return t._zod.onattach=[n=>{var i;let r=(i=It.get(n))!=null?i:{};It.add(n,{...r,description:e})}],t._zod.check=()=>{},t}function Px(e){let t=new Re({check:"meta"});return t._zod.onattach=[n=>{var i;let r=(i=It.get(n))!=null?i:{};It.add(n,{...r,...e})}],t._zod.check=()=>{},t}function Lx(e,t){var p,h,y,x,S;let n=Z(t),r=(p=n.truthy)!=null?p:["true","1","yes","on","y","enabled"],i=(h=n.falsy)!=null?h:["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(r=r.map(g=>typeof g=="string"?g.toLowerCase():g),i=i.map(g=>typeof g=="string"?g.toLowerCase():g));let o=new Set(r),a=new Set(i),s=(y=e.Codec)!=null?y:fc,c=(x=e.Boolean)!=null?x:uc,d=(S=e.String)!=null?S:_o,m=new d({type:"string",error:n.error}),l=new c({type:"boolean",error:n.error}),f=new s({type:"pipe",in:m,out:l,transform:(g,b)=>{let v=g;return n.case!=="sensitive"&&(v=v.toLowerCase()),o.has(v)?!0:a.has(v)?!1:(b.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:b.value,inst:f,continue:!1}),{})},reverseTransform:(g,b)=>g===!0?r[0]||"true":i[0]||"false",error:n.error});return f}function ls(e,t,n,r={}){let i=Z(r),o={...Z(r),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:s=>n.test(s),...i};return n instanceof RegExp&&(o.pattern=n),new e(o)}function Zr(e){var n,r,i,o,a,s,c,d,m;let t=(n=e==null?void 0:e.target)!=null?n:"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:(r=e.processors)!=null?r:{},metadataRegistry:(i=e==null?void 0:e.metadata)!=null?i:It,target:t,unrepresentable:(o=e==null?void 0:e.unrepresentable)!=null?o:"throw",override:(a=e==null?void 0:e.override)!=null?a:()=>{},io:(s=e==null?void 0:e.io)!=null?s:"output",counter:0,seen:new Map,cycles:(c=e==null?void 0:e.cycles)!=null?c:"ref",reused:(d=e==null?void 0:e.reused)!=null?d:"inline",external:(m=e==null?void 0:e.external)!=null?m:void 0}}function $e(e,t,n={path:[],schemaPath:[]}){var m,l,f;var r;let i=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);let s=(l=(m=e._zod).toJSONSchema)==null?void 0:l.call(m);if(s)a.schema=s;else{let p={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,p);else{let y=a.schema,x=t.processors[i.type];if(!x)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);x(e,t,y,p)}let h=e._zod.parent;h&&(a.ref||(a.ref=h),$e(h,t,p),t.seen.get(h).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(a.schema,c),t.io==="input"&&Ht(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&a.schema._prefault&&((f=(r=a.schema).default)!=null||(r.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function qr(e,t){var a,s,c,d;let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let r=new Map;for(let m of e.seen.entries()){let l=(a=e.metadataRegistry.get(m[0]))==null?void 0:a.id;if(l){let f=r.get(l);if(f&&f!==m[0])throw new Error(`Duplicate schema id "${l}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(l,m[0])}}let i=m=>{var y,x,S,g,b;let l=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let v=(y=e.external.registry.get(m[0]))==null?void 0:y.id,_=(x=e.external.uri)!=null?x:E=>E;if(v)return{ref:_(v)};let C=(g=(S=m[1].defId)!=null?S:m[1].schema.id)!=null?g:`schema${e.counter++}`;return m[1].defId=C,{defId:C,ref:`${_("__shared")}#/${l}/${C}`}}if(m[1]===n)return{ref:"#"};let p=`#/${l}/`,h=(b=m[1].schema.id)!=null?b:`__schema${e.counter++}`;return{defId:h,ref:p+h}},o=m=>{if(m[1].schema.$ref)return;let l=m[1],{ref:f,defId:p}=i(m);l.def={...l.schema},p&&(l.defId=p);let h=l.schema;for(let y in h)delete h[y];h.$ref=f};if(e.cycles==="throw")for(let m of e.seen.entries()){let l=m[1];if(l.cycle)throw new Error(`Cycle detected: #/${(s=l.cycle)==null?void 0:s.join("/")}/<root>
|
|
|
|
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let m of e.seen.entries()){let l=m[1];if(t===m[0]){o(m);continue}if(e.external){let p=(c=e.external.registry.get(m[0]))==null?void 0:c.id;if(t!==m[0]&&p){o(m);continue}}if((d=e.metadataRegistry.get(m[0]))==null?void 0:d.id){o(m);continue}if(l.cycle){o(m);continue}if(l.count>1&&e.reused==="ref"){o(m);continue}}}function Vr(e,t){var a,s,c,d,m;let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let r=l=>{var S,g,b;let f=e.seen.get(l);if(f.ref===null)return;let p=(S=f.def)!=null?S:f.schema,h={...p},y=f.ref;if(f.ref=null,y){r(y);let v=e.seen.get(y),_=v.schema;if(_.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(p.allOf=(g=p.allOf)!=null?g:[],p.allOf.push(_)):Object.assign(p,_),Object.assign(p,h),l._zod.parent===y)for(let E in p)E==="$ref"||E==="allOf"||E in h||delete p[E];if(_.$ref&&v.def)for(let E in p)E==="$ref"||E==="allOf"||E in v.def&&JSON.stringify(p[E])===JSON.stringify(v.def[E])&&delete p[E]}let x=l._zod.parent;if(x&&x!==y){r(x);let v=e.seen.get(x);if(v!=null&&v.schema.$ref&&(p.$ref=v.schema.$ref,v.def))for(let _ in p)_==="$ref"||_==="allOf"||_ in v.def&&JSON.stringify(p[_])===JSON.stringify(v.def[_])&&delete p[_]}e.override({zodSchema:l,jsonSchema:p,path:(b=f.path)!=null?b:[]})};for(let l of[...e.seen.entries()].reverse())r(l[0]);let i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,(a=e.external)!=null&&a.uri){let l=(s=e.external.registry.get(t))==null?void 0:s.id;if(!l)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(l)}Object.assign(i,(c=n.def)!=null?c:n.schema);let o=(m=(d=e.external)==null?void 0:d.defs)!=null?m:{};for(let l of e.seen.entries()){let f=l[1];f.def&&f.defId&&(o[f.defId]=f.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?i.$defs=o:i.definitions=o);try{let l=JSON.parse(JSON.stringify(i));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:cs(t,"input",e.processors),output:cs(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch(l){throw new Error("Error converting schema to JSON.")}}function Ht(e,t){let n=t!=null?t:{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return Ht(r.element,n);if(r.type==="set")return Ht(r.valueType,n);if(r.type==="lazy")return Ht(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return Ht(r.innerType,n);if(r.type==="intersection")return Ht(r.left,n)||Ht(r.right,n);if(r.type==="record"||r.type==="map")return Ht(r.keyType,n)||Ht(r.valueType,n);if(r.type==="pipe")return Ht(r.in,n)||Ht(r.out,n);if(r.type==="object"){for(let i in r.shape)if(Ht(r.shape[i],n))return!0;return!1}if(r.type==="union"){for(let i of r.options)if(Ht(i,n))return!0;return!1}if(r.type==="tuple"){for(let i of r.items)if(Ht(i,n))return!0;return!!(r.rest&&Ht(r.rest,n))}return!1}var jx=(e,t={})=>n=>{let r=Zr({...n,processors:t});return $e(e,r),qr(r,e),Vr(r,e)},cs=(e,t,n={})=>r=>{let{libraryOptions:i,target:o}=r!=null?r:{},a=Zr({...i!=null?i:{},target:o,io:t,processors:n});return $e(e,a),qr(a,e),Vr(a,e)};var cZ={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Zx=(e,t,n,r)=>{var m;let i=n;i.type="string";let{minimum:o,maximum:a,format:s,patterns:c,contentEncoding:d}=e._zod.bag;if(typeof o=="number"&&(i.minLength=o),typeof a=="number"&&(i.maxLength=a),s&&(i.format=(m=cZ[s])!=null?m:s,i.format===""&&delete i.format,s==="time"&&delete i.format),d&&(i.contentEncoding=d),c&&c.size>0){let l=[...c];l.length===1?i.pattern=l[0].source:l.length>1&&(i.allOf=[...l.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},qx=(e,t,n,r)=>{let i=n,{minimum:o,maximum:a,format:s,multipleOf:c,exclusiveMaximum:d,exclusiveMinimum:m}=e._zod.bag;typeof s=="string"&&s.includes("int")?i.type="integer":i.type="number",typeof m=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.minimum=m,i.exclusiveMinimum=!0):i.exclusiveMinimum=m),typeof o=="number"&&(i.minimum=o,typeof m=="number"&&t.target!=="draft-04"&&(m>=o?delete i.minimum:delete i.exclusiveMinimum)),typeof d=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.maximum=d,i.exclusiveMaximum=!0):i.exclusiveMaximum=d),typeof a=="number"&&(i.maximum=a,typeof d=="number"&&t.target!=="draft-04"&&(d<=a?delete i.maximum:delete i.exclusiveMaximum)),typeof c=="number"&&(i.multipleOf=c)},Vx=(e,t,n,r)=>{n.type="boolean"},Fx=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Hx=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Bx=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},Gx=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Xx=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Yx=(e,t,n,r)=>{n.not={}},Jx=(e,t,n,r)=>{},Kx=(e,t,n,r)=>{},Wx=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Qx=(e,t,n,r)=>{let i=e._zod.def,o=Ql(i.entries);o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),n.enum=o},e_=(e,t,n,r)=>{let i=e._zod.def,o=[];for(let a of i.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){let a=o[0];n.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[a]:n.const=a}else o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),o.every(a=>typeof a=="boolean")&&(n.type="boolean"),o.every(a=>a===null)&&(n.type="null"),n.enum=o},t_=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},n_=(e,t,n,r)=>{let i=n,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=o.source},i_=(e,t,n,r)=>{let i=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:c}=e._zod.bag;a!==void 0&&(o.minLength=a),s!==void 0&&(o.maxLength=s),c?c.length===1?(o.contentMediaType=c[0],Object.assign(i,o)):(Object.assign(i,o),i.anyOf=c.map(d=>({contentMediaType:d}))):Object.assign(i,o)},r_=(e,t,n,r)=>{n.type="boolean"},o_=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},a_=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},s_=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},l_=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},c_=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},u_=(e,t,n,r)=>{let i=n,o=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;typeof a=="number"&&(i.minItems=a),typeof s=="number"&&(i.maxItems=s),i.type="array",i.items=$e(o.element,t,{...r,path:[...r.path,"items"]})},d_=(e,t,n,r)=>{var d;let i=n,o=e._zod.def;i.type="object",i.properties={};let a=o.shape;for(let m in a)i.properties[m]=$e(a[m],t,{...r,path:[...r.path,"properties",m]});let s=new Set(Object.keys(a)),c=new Set([...s].filter(m=>{let l=o.shape[m]._zod;return t.io==="input"?l.optin===void 0:l.optout===void 0}));c.size>0&&(i.required=Array.from(c)),((d=o.catchall)==null?void 0:d._zod.def.type)==="never"?i.additionalProperties=!1:o.catchall?o.catchall&&(i.additionalProperties=$e(o.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},Cm=(e,t,n,r)=>{let i=e._zod.def,o=i.inclusive===!1,a=i.options.map((s,c)=>$e(s,t,{...r,path:[...r.path,o?"oneOf":"anyOf",c]}));o?n.oneOf=a:n.anyOf=a},f_=(e,t,n,r)=>{let i=e._zod.def,o=$e(i.left,t,{...r,path:[...r.path,"allOf",0]}),a=$e(i.right,t,{...r,path:[...r.path,"allOf",1]}),s=d=>"allOf"in d&&Object.keys(d).length===1,c=[...s(o)?o.allOf:[o],...s(a)?a.allOf:[a]];n.allOf=c},m_=(e,t,n,r)=>{let i=n,o=e._zod.def;i.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=o.items.map((f,p)=>$e(f,t,{...r,path:[...r.path,a,p]})),d=o.rest?$e(o.rest,t,{...r,path:[...r.path,s,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;t.target==="draft-2020-12"?(i.prefixItems=c,d&&(i.items=d)):t.target==="openapi-3.0"?(i.items={anyOf:c},d&&i.items.anyOf.push(d),i.minItems=c.length,d||(i.maxItems=c.length)):(i.items=c,d&&(i.additionalItems=d));let{minimum:m,maximum:l}=e._zod.bag;typeof m=="number"&&(i.minItems=m),typeof l=="number"&&(i.maxItems=l)},p_=(e,t,n,r)=>{let i=n,o=e._zod.def;i.type="object";let a=o.keyType,s=a._zod.bag,c=s==null?void 0:s.patterns;if(o.mode==="loose"&&c&&c.size>0){let m=$e(o.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});i.patternProperties={};for(let l of c)i.patternProperties[l.source]=m}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(i.propertyNames=$e(o.keyType,t,{...r,path:[...r.path,"propertyNames"]})),i.additionalProperties=$e(o.valueType,t,{...r,path:[...r.path,"additionalProperties"]});let d=a._zod.values;if(d){let m=[...d].filter(l=>typeof l=="string"||typeof l=="number");m.length>0&&(i.required=m)}},g_=(e,t,n,r)=>{let i=e._zod.def,o=$e(i.innerType,t,r),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=i.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},h_=(e,t,n,r)=>{let i=e._zod.def;$e(i.innerType,t,r);let o=t.seen.get(e);o.ref=i.innerType},v_=(e,t,n,r)=>{let i=e._zod.def;$e(i.innerType,t,r);let o=t.seen.get(e);o.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},y_=(e,t,n,r)=>{let i=e._zod.def;$e(i.innerType,t,r);let o=t.seen.get(e);o.ref=i.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},S_=(e,t,n,r)=>{let i=e._zod.def;$e(i.innerType,t,r);let o=t.seen.get(e);o.ref=i.innerType;let a;try{a=i.catchValue(void 0)}catch(s){throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},b_=(e,t,n,r)=>{let i=e._zod.def,o=t.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;$e(o,t,r);let a=t.seen.get(e);a.ref=o},x_=(e,t,n,r)=>{let i=e._zod.def;$e(i.innerType,t,r);let o=t.seen.get(e);o.ref=i.innerType,n.readOnly=!0},__=(e,t,n,r)=>{let i=e._zod.def;$e(i.innerType,t,r);let o=t.seen.get(e);o.ref=i.innerType},Em=(e,t,n,r)=>{let i=e._zod.def;$e(i.innerType,t,r);let o=t.seen.get(e);o.ref=i.innerType},w_=(e,t,n,r)=>{let i=e._zod.innerType;$e(i,t,r);let o=t.seen.get(e);o.ref=i},$m={string:Zx,number:qx,boolean:Vx,bigint:Fx,symbol:Hx,null:Bx,undefined:Gx,void:Xx,never:Yx,any:Jx,unknown:Kx,date:Wx,enum:Qx,literal:e_,nan:t_,template_literal:n_,file:i_,success:r_,custom:o_,function:a_,transform:s_,map:l_,set:c_,array:u_,object:d_,union:Cm,intersection:f_,tuple:m_,record:p_,nullable:g_,nonoptional:h_,default:v_,prefault:y_,catch:S_,pipe:b_,readonly:x_,promise:__,optional:Em,lazy:w_};function Am(e,t){if("_idmap"in e){let r=e,i=Zr({...t,processors:$m}),o={};for(let c of r._idmap.entries()){let[d,m]=c;$e(m,i)}let a={},s={registry:r,uri:t==null?void 0:t.uri,defs:o};i.external=s;for(let c of r._idmap.entries()){let[d,m]=c;qr(i,m),a[d]=Vr(i,m)}if(Object.keys(o).length>0){let c=i.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[c]:o}}return{schemas:a}}let n=Zr({...t,processors:$m});return $e(e,n),qr(n,e),Vr(n,e)}var zm=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){var r;let n=(r=t==null?void 0:t.target)!=null?r:"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=Zr({processors:$m,target:n,...(t==null?void 0:t.metadata)&&{metadata:t.metadata},...(t==null?void 0:t.unrepresentable)&&{unrepresentable:t.unrepresentable},...(t==null?void 0:t.override)&&{override:t.override},...(t==null?void 0:t.io)&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return $e(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),qr(this.ctx,t);let r=Vr(this.ctx,t),{"~standard":i,...o}=r;return o}};var $_={};var hc={};ei(hc,{ZodAny:()=>X_,ZodArray:()=>W_,ZodBase64:()=>Ym,ZodBase64URL:()=>Jm,ZodBigInt:()=>gs,ZodBigIntFormat:()=>Qm,ZodBoolean:()=>ps,ZodCIDRv4:()=>Gm,ZodCIDRv6:()=>Xm,ZodCUID:()=>jm,ZodCUID2:()=>Zm,ZodCatch:()=>bw,ZodCodec:()=>sp,ZodCustom:()=>Ac,ZodCustomStringFormat:()=>fs,ZodDate:()=>_c,ZodDefault:()=>pw,ZodDiscriminatedUnion:()=>ew,ZodE164:()=>Km,ZodEmail:()=>Um,ZodEmoji:()=>Pm,ZodEnum:()=>us,ZodExactOptional:()=>dw,ZodFile:()=>cw,ZodFunction:()=>Tw,ZodGUID:()=>vc,ZodIPv4:()=>Hm,ZodIPv6:()=>Bm,ZodIntersection:()=>tw,ZodJWT:()=>Wm,ZodKSUID:()=>Fm,ZodLazy:()=>Ew,ZodLiteral:()=>lw,ZodMAC:()=>Z_,ZodMap:()=>aw,ZodNaN:()=>_w,ZodNanoID:()=>Lm,ZodNever:()=>J_,ZodNonOptional:()=>op,ZodNull:()=>B_,ZodNullable:()=>mw,ZodNumber:()=>ms,ZodNumberFormat:()=>To,ZodObject:()=>$c,ZodOptional:()=>rp,ZodPipe:()=>ap,ZodPrefault:()=>hw,ZodPromise:()=>zw,ZodReadonly:()=>ww,ZodRecord:()=>Ec,ZodSet:()=>sw,ZodString:()=>ds,ZodStringFormat:()=>Me,ZodSuccess:()=>Sw,ZodSymbol:()=>F_,ZodTemplateLiteral:()=>Cw,ZodTransform:()=>uw,ZodTuple:()=>iw,ZodType:()=>fe,ZodULID:()=>qm,ZodURL:()=>xc,ZodUUID:()=>Si,ZodUndefined:()=>H_,ZodUnion:()=>Cc,ZodUnknown:()=>Y_,ZodVoid:()=>K_,ZodXID:()=>Vm,ZodXor:()=>Q_,_ZodString:()=>Rm,_default:()=>gw,_function:()=>_O,any:()=>eO,array:()=>wc,base64:()=>UN,base64url:()=>PN,bigint:()=>YN,boolean:()=>V_,catch:()=>xw,check:()=>wO,cidrv4:()=>DN,cidrv6:()=>RN,codec:()=>SO,cuid:()=>AN,cuid2:()=>zN,custom:()=>$O,date:()=>nO,describe:()=>CO,discriminatedUnion:()=>lO,e164:()=>LN,email:()=>vN,emoji:()=>CN,enum:()=>np,exactOptional:()=>fw,file:()=>gO,float32:()=>HN,float64:()=>BN,function:()=>_O,guid:()=>yN,hash:()=>FN,hex:()=>VN,hostname:()=>qN,httpUrl:()=>$N,instanceof:()=>AO,int:()=>Dm,int32:()=>GN,int64:()=>JN,intersection:()=>nw,ipv4:()=>NN,ipv6:()=>MN,json:()=>TO,jwt:()=>jN,keyof:()=>iO,ksuid:()=>kN,lazy:()=>Aw,literal:()=>pO,looseObject:()=>aO,looseRecord:()=>uO,mac:()=>ON,map:()=>dO,meta:()=>EO,nan:()=>yO,nanoid:()=>EN,nativeEnum:()=>mO,never:()=>ep,nonoptional:()=>yw,null:()=>G_,nullable:()=>Sc,nullish:()=>hO,number:()=>q_,object:()=>rO,optional:()=>yc,partialRecord:()=>cO,pipe:()=>bc,prefault:()=>vw,preprocess:()=>IO,promise:()=>xO,readonly:()=>$w,record:()=>ow,refine:()=>Iw,set:()=>fO,strictObject:()=>oO,string:()=>Mm,stringFormat:()=>ZN,stringbool:()=>zO,success:()=>vO,superRefine:()=>kw,symbol:()=>WN,templateLiteral:()=>bO,transform:()=>ip,tuple:()=>rw,uint32:()=>XN,uint64:()=>KN,ulid:()=>TN,undefined:()=>QN,union:()=>tp,unknown:()=>zo,url:()=>wN,uuid:()=>SN,uuidv4:()=>bN,uuidv6:()=>xN,uuidv7:()=>_N,void:()=>tO,xid:()=>IN,xor:()=>sO});var Tm={};ei(Tm,{endsWith:()=>ts,gt:()=>hi,gte:()=>Ft,includes:()=>Qa,length:()=>Eo,lowercase:()=>Ka,lt:()=>gi,lte:()=>xn,maxLength:()=>Co,maxSize:()=>jr,mime:()=>ns,minLength:()=>Yi,minSize:()=>vi,multipleOf:()=>Lr,negative:()=>bm,nonnegative:()=>_m,nonpositive:()=>xm,normalize:()=>is,overwrite:()=>Kn,positive:()=>Sm,property:()=>wm,regex:()=>Ja,size:()=>$o,slugify:()=>ss,startsWith:()=>es,toLowerCase:()=>os,toUpperCase:()=>as,trim:()=>rs,uppercase:()=>Wa});var Ao={};ei(Ao,{ZodISODate:()=>km,ZodISODateTime:()=>Im,ZodISODuration:()=>Om,ZodISOTime:()=>Nm,date:()=>E_,datetime:()=>C_,duration:()=>z_,time:()=>A_});var Im=$("ZodISODateTime",(e,t)=>{tb.init(e,t),Me.init(e,t)});function C_(e){return ox(Im,e)}var km=$("ZodISODate",(e,t)=>{nb.init(e,t),Me.init(e,t)});function E_(e){return ax(km,e)}var Nm=$("ZodISOTime",(e,t)=>{ib.init(e,t),Me.init(e,t)});function A_(e){return sx(Nm,e)}var Om=$("ZodISODuration",(e,t)=>{rb.init(e,t),Me.init(e,t)});function z_(e){return lx(Om,e)}var hN=(e,t)=>{rc.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>ac(e,n)},flatten:{value:n=>oc(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Za,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Za,2)}},isEmpty:{get(){return e.issues.length===0}}})},dZ=$("ZodError",hN),on=$("ZodError",hN,{Parent:Error});var T_=Fa(on),I_=Ha(on),k_=Ba(on),N_=Ga(on),O_=Af(on),M_=zf(on),D_=Tf(on),R_=If(on),U_=kf(on),P_=Nf(on),L_=Of(on),j_=Mf(on);var fe=$("ZodType",(e,t)=>(oe.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:cs(e,"input"),output:cs(e,"output")}}),e.toJSONSchema=jx(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>{var r;return e.clone(U.mergeDefs(t,{checks:[...(r=t.checks)!=null?r:[],...n.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0})},e.with=e.check,e.clone=(n,r)=>Vt(e,n,r),e.brand=()=>e,e.register=(n,r)=>(n.add(e,r),e),e.parse=(n,r)=>T_(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>k_(e,n,r),e.parseAsync=async(n,r)=>I_(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>N_(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>O_(e,n,r),e.decode=(n,r)=>M_(e,n,r),e.encodeAsync=async(n,r)=>D_(e,n,r),e.decodeAsync=async(n,r)=>R_(e,n,r),e.safeEncode=(n,r)=>U_(e,n,r),e.safeDecode=(n,r)=>P_(e,n,r),e.safeEncodeAsync=async(n,r)=>L_(e,n,r),e.safeDecodeAsync=async(n,r)=>j_(e,n,r),e.refine=(n,r)=>e.check(Iw(n,r)),e.superRefine=n=>e.check(kw(n)),e.overwrite=n=>e.check(Kn(n)),e.optional=()=>yc(e),e.exactOptional=()=>fw(e),e.nullable=()=>Sc(e),e.nullish=()=>yc(Sc(e)),e.nonoptional=n=>yw(e,n),e.array=()=>wc(e),e.or=n=>tp([e,n]),e.and=n=>nw(e,n),e.transform=n=>bc(e,ip(n)),e.default=n=>gw(e,n),e.prefault=n=>vw(e,n),e.catch=n=>xw(e,n),e.pipe=n=>bc(e,n),e.readonly=()=>$w(e),e.describe=n=>{let r=e.clone();return It.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){var n;return(n=It.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return It.get(e);let r=e.clone();return It.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),Rm=$("_ZodString",(e,t)=>{var r,i,o;_o.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(a,s,c)=>Zx(e,a,s,c);let n=e._zod.bag;e.format=(r=n.format)!=null?r:null,e.minLength=(i=n.minimum)!=null?i:null,e.maxLength=(o=n.maximum)!=null?o:null,e.regex=(...a)=>e.check(Ja(...a)),e.includes=(...a)=>e.check(Qa(...a)),e.startsWith=(...a)=>e.check(es(...a)),e.endsWith=(...a)=>e.check(ts(...a)),e.min=(...a)=>e.check(Yi(...a)),e.max=(...a)=>e.check(Co(...a)),e.length=(...a)=>e.check(Eo(...a)),e.nonempty=(...a)=>e.check(Yi(1,...a)),e.lowercase=a=>e.check(Ka(a)),e.uppercase=a=>e.check(Wa(a)),e.trim=()=>e.check(rs()),e.normalize=(...a)=>e.check(is(...a)),e.toLowerCase=()=>e.check(os()),e.toUpperCase=()=>e.check(as()),e.slugify=()=>e.check(ss())}),ds=$("ZodString",(e,t)=>{_o.init(e,t),Rm.init(e,t),e.email=n=>e.check(Qf(Um,n)),e.url=n=>e.check(gc(xc,n)),e.jwt=n=>e.check(ym(Wm,n)),e.emoji=n=>e.check(rm(Pm,n)),e.guid=n=>e.check(pc(vc,n)),e.uuid=n=>e.check(em(Si,n)),e.uuidv4=n=>e.check(tm(Si,n)),e.uuidv6=n=>e.check(nm(Si,n)),e.uuidv7=n=>e.check(im(Si,n)),e.nanoid=n=>e.check(om(Lm,n)),e.guid=n=>e.check(pc(vc,n)),e.cuid=n=>e.check(am(jm,n)),e.cuid2=n=>e.check(sm(Zm,n)),e.ulid=n=>e.check(lm(qm,n)),e.base64=n=>e.check(gm(Ym,n)),e.base64url=n=>e.check(hm(Jm,n)),e.xid=n=>e.check(cm(Vm,n)),e.ksuid=n=>e.check(um(Fm,n)),e.ipv4=n=>e.check(dm(Hm,n)),e.ipv6=n=>e.check(fm(Bm,n)),e.cidrv4=n=>e.check(mm(Gm,n)),e.cidrv6=n=>e.check(pm(Xm,n)),e.e164=n=>e.check(vm(Km,n)),e.datetime=n=>e.check(C_(n)),e.date=n=>e.check(E_(n)),e.time=n=>e.check(A_(n)),e.duration=n=>e.check(z_(n))});function Mm(e){return tx(ds,e)}var Me=$("ZodStringFormat",(e,t)=>{Oe.init(e,t),Rm.init(e,t)}),Um=$("ZodEmail",(e,t)=>{BS.init(e,t),Me.init(e,t)});function vN(e){return Qf(Um,e)}var vc=$("ZodGUID",(e,t)=>{FS.init(e,t),Me.init(e,t)});function yN(e){return pc(vc,e)}var Si=$("ZodUUID",(e,t)=>{HS.init(e,t),Me.init(e,t)});function SN(e){return em(Si,e)}function bN(e){return tm(Si,e)}function xN(e){return nm(Si,e)}function _N(e){return im(Si,e)}var xc=$("ZodURL",(e,t)=>{GS.init(e,t),Me.init(e,t)});function wN(e){return gc(xc,e)}function $N(e){return gc(xc,{protocol:/^https?$/,hostname:bn.domain,...U.normalizeParams(e)})}var Pm=$("ZodEmoji",(e,t)=>{XS.init(e,t),Me.init(e,t)});function CN(e){return rm(Pm,e)}var Lm=$("ZodNanoID",(e,t)=>{YS.init(e,t),Me.init(e,t)});function EN(e){return om(Lm,e)}var jm=$("ZodCUID",(e,t)=>{JS.init(e,t),Me.init(e,t)});function AN(e){return am(jm,e)}var Zm=$("ZodCUID2",(e,t)=>{KS.init(e,t),Me.init(e,t)});function zN(e){return sm(Zm,e)}var qm=$("ZodULID",(e,t)=>{WS.init(e,t),Me.init(e,t)});function TN(e){return lm(qm,e)}var Vm=$("ZodXID",(e,t)=>{QS.init(e,t),Me.init(e,t)});function IN(e){return cm(Vm,e)}var Fm=$("ZodKSUID",(e,t)=>{eb.init(e,t),Me.init(e,t)});function kN(e){return um(Fm,e)}var Hm=$("ZodIPv4",(e,t)=>{ob.init(e,t),Me.init(e,t)});function NN(e){return dm(Hm,e)}var Z_=$("ZodMAC",(e,t)=>{sb.init(e,t),Me.init(e,t)});function ON(e){return ix(Z_,e)}var Bm=$("ZodIPv6",(e,t)=>{ab.init(e,t),Me.init(e,t)});function MN(e){return fm(Bm,e)}var Gm=$("ZodCIDRv4",(e,t)=>{lb.init(e,t),Me.init(e,t)});function DN(e){return mm(Gm,e)}var Xm=$("ZodCIDRv6",(e,t)=>{cb.init(e,t),Me.init(e,t)});function RN(e){return pm(Xm,e)}var Ym=$("ZodBase64",(e,t)=>{db.init(e,t),Me.init(e,t)});function UN(e){return gm(Ym,e)}var Jm=$("ZodBase64URL",(e,t)=>{fb.init(e,t),Me.init(e,t)});function PN(e){return hm(Jm,e)}var Km=$("ZodE164",(e,t)=>{mb.init(e,t),Me.init(e,t)});function LN(e){return vm(Km,e)}var Wm=$("ZodJWT",(e,t)=>{pb.init(e,t),Me.init(e,t)});function jN(e){return ym(Wm,e)}var fs=$("ZodCustomStringFormat",(e,t)=>{gb.init(e,t),Me.init(e,t)});function ZN(e,t,n={}){return ls(fs,e,t,n)}function qN(e){return ls(fs,"hostname",bn.hostname,e)}function VN(e){return ls(fs,"hex",bn.hex,e)}function FN(e,t){var o;let n=(o=t==null?void 0:t.enc)!=null?o:"hex",r=`${e}_${n}`,i=bn[r];if(!i)throw new Error(`Unrecognized hash format: ${r}`);return ls(fs,r,i,t)}var ms=$("ZodNumber",(e,t)=>{var r,i,o,a,s,c,d,m,l;Ff.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(f,p,h)=>qx(e,f,p,h),e.gt=(f,p)=>e.check(hi(f,p)),e.gte=(f,p)=>e.check(Ft(f,p)),e.min=(f,p)=>e.check(Ft(f,p)),e.lt=(f,p)=>e.check(gi(f,p)),e.lte=(f,p)=>e.check(xn(f,p)),e.max=(f,p)=>e.check(xn(f,p)),e.int=f=>e.check(Dm(f)),e.safe=f=>e.check(Dm(f)),e.positive=f=>e.check(hi(0,f)),e.nonnegative=f=>e.check(Ft(0,f)),e.negative=f=>e.check(gi(0,f)),e.nonpositive=f=>e.check(xn(0,f)),e.multipleOf=(f,p)=>e.check(Lr(f,p)),e.step=(f,p)=>e.check(Lr(f,p)),e.finite=()=>e;let n=e._zod.bag;e.minValue=(o=Math.max((r=n.minimum)!=null?r:Number.NEGATIVE_INFINITY,(i=n.exclusiveMinimum)!=null?i:Number.NEGATIVE_INFINITY))!=null?o:null,e.maxValue=(c=Math.min((a=n.maximum)!=null?a:Number.POSITIVE_INFINITY,(s=n.exclusiveMaximum)!=null?s:Number.POSITIVE_INFINITY))!=null?c:null,e.isInt=((d=n.format)!=null?d:"").includes("int")||Number.isSafeInteger((m=n.multipleOf)!=null?m:.5),e.isFinite=!0,e.format=(l=n.format)!=null?l:null});function q_(e){return cx(ms,e)}var To=$("ZodNumberFormat",(e,t)=>{hb.init(e,t),ms.init(e,t)});function Dm(e){return dx(To,e)}function HN(e){return fx(To,e)}function BN(e){return mx(To,e)}function GN(e){return px(To,e)}function XN(e){return gx(To,e)}var ps=$("ZodBoolean",(e,t)=>{uc.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Vx(e,n,r,i)});function V_(e){return hx(ps,e)}var gs=$("ZodBigInt",(e,t)=>{var r,i,o;Hf.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(a,s,c)=>Fx(e,a,s,c),e.gte=(a,s)=>e.check(Ft(a,s)),e.min=(a,s)=>e.check(Ft(a,s)),e.gt=(a,s)=>e.check(hi(a,s)),e.gte=(a,s)=>e.check(Ft(a,s)),e.min=(a,s)=>e.check(Ft(a,s)),e.lt=(a,s)=>e.check(gi(a,s)),e.lte=(a,s)=>e.check(xn(a,s)),e.max=(a,s)=>e.check(xn(a,s)),e.positive=a=>e.check(hi(BigInt(0),a)),e.negative=a=>e.check(gi(BigInt(0),a)),e.nonpositive=a=>e.check(xn(BigInt(0),a)),e.nonnegative=a=>e.check(Ft(BigInt(0),a)),e.multipleOf=(a,s)=>e.check(Lr(a,s));let n=e._zod.bag;e.minValue=(r=n.minimum)!=null?r:null,e.maxValue=(i=n.maximum)!=null?i:null,e.format=(o=n.format)!=null?o:null});function YN(e){return yx(gs,e)}var Qm=$("ZodBigIntFormat",(e,t)=>{vb.init(e,t),gs.init(e,t)});function JN(e){return bx(Qm,e)}function KN(e){return xx(Qm,e)}var F_=$("ZodSymbol",(e,t)=>{yb.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Hx(e,n,r,i)});function WN(e){return _x(F_,e)}var H_=$("ZodUndefined",(e,t)=>{Sb.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Gx(e,n,r,i)});function QN(e){return wx(H_,e)}var B_=$("ZodNull",(e,t)=>{bb.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Bx(e,n,r,i)});function G_(e){return $x(B_,e)}var X_=$("ZodAny",(e,t)=>{xb.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Jx(e,n,r,i)});function eO(){return Cx(X_)}var Y_=$("ZodUnknown",(e,t)=>{_b.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Kx(e,n,r,i)});function zo(){return Ex(Y_)}var J_=$("ZodNever",(e,t)=>{wb.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Yx(e,n,r,i)});function ep(e){return Ax(J_,e)}var K_=$("ZodVoid",(e,t)=>{$b.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Xx(e,n,r,i)});function tO(e){return zx(K_,e)}var _c=$("ZodDate",(e,t)=>{Cb.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(r,i,o)=>Wx(e,r,i,o),e.min=(r,i)=>e.check(Ft(r,i)),e.max=(r,i)=>e.check(xn(r,i));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function nO(e){return Tx(_c,e)}var W_=$("ZodArray",(e,t)=>{Eb.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>u_(e,n,r,i),e.element=t.element,e.min=(n,r)=>e.check(Yi(n,r)),e.nonempty=n=>e.check(Yi(1,n)),e.max=(n,r)=>e.check(Co(n,r)),e.length=(n,r)=>e.check(Eo(n,r)),e.unwrap=()=>e.element});function wc(e,t){return Nx(W_,e,t)}function iO(e){let t=e._zod.def.shape;return np(Object.keys(t))}var $c=$("ZodObject",(e,t)=>{Ab.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>d_(e,n,r,i),U.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>np(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:zo()}),e.loose=()=>e.clone({...e._zod.def,catchall:zo()}),e.strict=()=>e.clone({...e._zod.def,catchall:ep()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>U.extend(e,n),e.safeExtend=n=>U.safeExtend(e,n),e.merge=n=>U.merge(e,n),e.pick=n=>U.pick(e,n),e.omit=n=>U.omit(e,n),e.partial=(...n)=>U.partial(rp,e,n[0]),e.required=(...n)=>U.required(op,e,n[0])});function rO(e,t){let n={type:"object",shape:e!=null?e:{},...U.normalizeParams(t)};return new $c(n)}function oO(e,t){return new $c({type:"object",shape:e,catchall:ep(),...U.normalizeParams(t)})}function aO(e,t){return new $c({type:"object",shape:e,catchall:zo(),...U.normalizeParams(t)})}var Cc=$("ZodUnion",(e,t)=>{dc.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Cm(e,n,r,i),e.options=t.options});function tp(e,t){return new Cc({type:"union",options:e,...U.normalizeParams(t)})}var Q_=$("ZodXor",(e,t)=>{Cc.init(e,t),zb.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Cm(e,n,r,i),e.options=t.options});function sO(e,t){return new Q_({type:"union",options:e,inclusive:!1,...U.normalizeParams(t)})}var ew=$("ZodDiscriminatedUnion",(e,t)=>{Cc.init(e,t),Tb.init(e,t)});function lO(e,t,n){return new ew({type:"union",options:t,discriminator:e,...U.normalizeParams(n)})}var tw=$("ZodIntersection",(e,t)=>{Ib.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>f_(e,n,r,i)});function nw(e,t){return new tw({type:"intersection",left:e,right:t})}var iw=$("ZodTuple",(e,t)=>{Bf.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>m_(e,n,r,i),e.rest=n=>e.clone({...e._zod.def,rest:n})});function rw(e,t,n){let r=t instanceof oe,i=r?n:t,o=r?t:null;return new iw({type:"tuple",items:e,rest:o,...U.normalizeParams(i)})}var Ec=$("ZodRecord",(e,t)=>{kb.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>p_(e,n,r,i),e.keyType=t.keyType,e.valueType=t.valueType});function ow(e,t,n){return new Ec({type:"record",keyType:e,valueType:t,...U.normalizeParams(n)})}function cO(e,t,n){let r=Vt(e);return r._zod.values=void 0,new Ec({type:"record",keyType:r,valueType:t,...U.normalizeParams(n)})}function uO(e,t,n){return new Ec({type:"record",keyType:e,valueType:t,mode:"loose",...U.normalizeParams(n)})}var aw=$("ZodMap",(e,t)=>{Nb.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>l_(e,n,r,i),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(vi(...n)),e.nonempty=n=>e.check(vi(1,n)),e.max=(...n)=>e.check(jr(...n)),e.size=(...n)=>e.check($o(...n))});function dO(e,t,n){return new aw({type:"map",keyType:e,valueType:t,...U.normalizeParams(n)})}var sw=$("ZodSet",(e,t)=>{Ob.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>c_(e,n,r,i),e.min=(...n)=>e.check(vi(...n)),e.nonempty=n=>e.check(vi(1,n)),e.max=(...n)=>e.check(jr(...n)),e.size=(...n)=>e.check($o(...n))});function fO(e,t){return new sw({type:"set",valueType:e,...U.normalizeParams(t)})}var us=$("ZodEnum",(e,t)=>{Mb.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(r,i,o)=>Qx(e,r,i,o),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(r,i)=>{let o={};for(let a of r)if(n.has(a))o[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new us({...t,checks:[],...U.normalizeParams(i),entries:o})},e.exclude=(r,i)=>{let o={...t.entries};for(let a of r)if(n.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new us({...t,checks:[],...U.normalizeParams(i),entries:o})}});function np(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new us({type:"enum",entries:n,...U.normalizeParams(t)})}function mO(e,t){return new us({type:"enum",entries:e,...U.normalizeParams(t)})}var lw=$("ZodLiteral",(e,t)=>{Db.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>e_(e,n,r,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function pO(e,t){return new lw({type:"literal",values:Array.isArray(e)?e:[e],...U.normalizeParams(t)})}var cw=$("ZodFile",(e,t)=>{Rb.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>i_(e,n,r,i),e.min=(n,r)=>e.check(vi(n,r)),e.max=(n,r)=>e.check(jr(n,r)),e.mime=(n,r)=>e.check(ns(Array.isArray(n)?n:[n],r))});function gO(e){return Ox(cw,e)}var uw=$("ZodTransform",(e,t)=>{Ub.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>s_(e,n,r,i),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Mr(e.constructor.name);n.addIssue=o=>{var a,s,c;if(typeof o=="string")n.issues.push(U.issue(o,n.value,t));else{let d=o;d.fatal&&(d.continue=!1),(a=d.code)!=null||(d.code="custom"),(s=d.input)!=null||(d.input=n.value),(c=d.inst)!=null||(d.inst=e),n.issues.push(U.issue(d))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(o=>(n.value=o,n)):(n.value=i,n)}});function ip(e){return new uw({type:"transform",transform:e})}var rp=$("ZodOptional",(e,t)=>{Gf.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Em(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function yc(e){return new rp({type:"optional",innerType:e})}var dw=$("ZodExactOptional",(e,t)=>{Pb.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Em(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function fw(e){return new dw({type:"optional",innerType:e})}var mw=$("ZodNullable",(e,t)=>{Lb.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>g_(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function Sc(e){return new mw({type:"nullable",innerType:e})}function hO(e){return yc(Sc(e))}var pw=$("ZodDefault",(e,t)=>{jb.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>v_(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function gw(e,t){return new pw({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():U.shallowClone(t)}})}var hw=$("ZodPrefault",(e,t)=>{Zb.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>y_(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function vw(e,t){return new hw({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():U.shallowClone(t)}})}var op=$("ZodNonOptional",(e,t)=>{qb.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>h_(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function yw(e,t){return new op({type:"nonoptional",innerType:e,...U.normalizeParams(t)})}var Sw=$("ZodSuccess",(e,t)=>{Vb.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>r_(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function vO(e){return new Sw({type:"success",innerType:e})}var bw=$("ZodCatch",(e,t)=>{Fb.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>S_(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function xw(e,t){return new bw({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var _w=$("ZodNaN",(e,t)=>{Hb.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>t_(e,n,r,i)});function yO(e){return kx(_w,e)}var ap=$("ZodPipe",(e,t)=>{Bb.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>b_(e,n,r,i),e.in=t.in,e.out=t.out});function bc(e,t){return new ap({type:"pipe",in:e,out:t})}var sp=$("ZodCodec",(e,t)=>{ap.init(e,t),fc.init(e,t)});function SO(e,t,n){return new sp({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}var ww=$("ZodReadonly",(e,t)=>{Gb.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>x_(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function $w(e){return new ww({type:"readonly",innerType:e})}var Cw=$("ZodTemplateLiteral",(e,t)=>{Xb.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>n_(e,n,r,i)});function bO(e,t){return new Cw({type:"template_literal",parts:e,...U.normalizeParams(t)})}var Ew=$("ZodLazy",(e,t)=>{Kb.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>w_(e,n,r,i),e.unwrap=()=>e._zod.def.getter()});function Aw(e){return new Ew({type:"lazy",getter:e})}var zw=$("ZodPromise",(e,t)=>{Jb.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>__(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function xO(e){return new zw({type:"promise",innerType:e})}var Tw=$("ZodFunction",(e,t)=>{Yb.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>a_(e,n,r,i)});function _O(e){var t,n;return new Tw({type:"function",input:Array.isArray(e==null?void 0:e.input)?rw(e==null?void 0:e.input):(t=e==null?void 0:e.input)!=null?t:wc(zo()),output:(n=e==null?void 0:e.output)!=null?n:zo()})}var Ac=$("ZodCustom",(e,t)=>{Wb.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>o_(e,n,r,i)});function wO(e){let t=new Re({check:"custom"});return t._zod.check=e,t}function $O(e,t){return Mx(Ac,e!=null?e:()=>!0,t)}function Iw(e,t={}){return Dx(Ac,e,t)}function kw(e){return Rx(e)}var CO=Ux,EO=Px;function AO(e,t={}){let n=new Ac({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...U.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=r=>{var i;r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...(i=n._zod.def.path)!=null?i:[]]})},n}var zO=(...e)=>Lx({Codec:sp,Boolean:ps,String:ds},...e);function TO(e){let t=Aw(()=>tp([Mm(e),q_(),V_(),G_(),wc(t),ow(Mm(),t)]));return t}function IO(e,t){return bc(ip(e),t)}var mZ={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function pZ(e){We({customError:e})}function gZ(){return We().customError}var Nw;(function(e){})(Nw||(Nw={}));var H={...hc,...Tm,iso:Ao},hZ=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function vZ(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t!=null?t:"draft-2020-12"}function yZ(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let r=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===r){let i=n[1];if(!i||!t.defs[i])throw new Error(`Reference not found: ${e}`);return t.defs[i]}throw new Error(`Reference not found: ${e}`)}function kO(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return H.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let i=e.$ref;if(t.refs.has(i))return t.refs.get(i);if(t.processing.has(i))return H.lazy(()=>{if(!t.refs.has(i))throw new Error(`Circular reference not resolved: ${i}`);return t.refs.get(i)});t.processing.add(i);let o=yZ(i,t),a=Dt(o,t);return t.refs.set(i,a),t.processing.delete(i),a}if(e.enum!==void 0){let i=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&i.length===1&&i[0]===null)return H.null();if(i.length===0)return H.never();if(i.length===1)return H.literal(i[0]);if(i.every(a=>typeof a=="string"))return H.enum(i);let o=i.map(a=>H.literal(a));return o.length<2?o[0]:H.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return H.literal(e.const);let n=e.type;if(Array.isArray(n)){let i=n.map(o=>{let a={...e,type:o};return kO(a,t)});return i.length===0?H.never():i.length===1?i[0]:H.union(i)}if(!n)return H.any();let r;switch(n){case"string":{let i=H.string();if(e.format){let o=e.format;o==="email"?i=i.check(H.email()):o==="uri"||o==="uri-reference"?i=i.check(H.url()):o==="uuid"||o==="guid"?i=i.check(H.uuid()):o==="date-time"?i=i.check(H.iso.datetime()):o==="date"?i=i.check(H.iso.date()):o==="time"?i=i.check(H.iso.time()):o==="duration"?i=i.check(H.iso.duration()):o==="ipv4"?i=i.check(H.ipv4()):o==="ipv6"?i=i.check(H.ipv6()):o==="mac"?i=i.check(H.mac()):o==="cidr"?i=i.check(H.cidrv4()):o==="cidr-v6"?i=i.check(H.cidrv6()):o==="base64"?i=i.check(H.base64()):o==="base64url"?i=i.check(H.base64url()):o==="e164"?i=i.check(H.e164()):o==="jwt"?i=i.check(H.jwt()):o==="emoji"?i=i.check(H.emoji()):o==="nanoid"?i=i.check(H.nanoid()):o==="cuid"?i=i.check(H.cuid()):o==="cuid2"?i=i.check(H.cuid2()):o==="ulid"?i=i.check(H.ulid()):o==="xid"?i=i.check(H.xid()):o==="ksuid"&&(i=i.check(H.ksuid()))}typeof e.minLength=="number"&&(i=i.min(e.minLength)),typeof e.maxLength=="number"&&(i=i.max(e.maxLength)),e.pattern&&(i=i.regex(new RegExp(e.pattern))),r=i;break}case"number":case"integer":{let i=n==="integer"?H.number().int():H.number();typeof e.minimum=="number"&&(i=i.min(e.minimum)),typeof e.maximum=="number"&&(i=i.max(e.maximum)),typeof e.exclusiveMinimum=="number"?i=i.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(i=i.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?i=i.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(i=i.lt(e.maximum)),typeof e.multipleOf=="number"&&(i=i.multipleOf(e.multipleOf)),r=i;break}case"boolean":{r=H.boolean();break}case"null":{r=H.null();break}case"object":{let i={},o=e.properties||{},a=new Set(e.required||[]);for(let[c,d]of Object.entries(o)){let m=Dt(d,t);i[c]=a.has(c)?m:m.optional()}if(e.propertyNames){let c=Dt(e.propertyNames,t),d=e.additionalProperties&&typeof e.additionalProperties=="object"?Dt(e.additionalProperties,t):H.any();if(Object.keys(i).length===0){r=H.record(c,d);break}let m=H.object(i).passthrough(),l=H.looseRecord(c,d);r=H.intersection(m,l);break}if(e.patternProperties){let c=e.patternProperties,d=Object.keys(c),m=[];for(let f of d){let p=Dt(c[f],t),h=H.string().regex(new RegExp(f));m.push(H.looseRecord(h,p))}let l=[];if(Object.keys(i).length>0&&l.push(H.object(i).passthrough()),l.push(...m),l.length===0)r=H.object({}).passthrough();else if(l.length===1)r=l[0];else{let f=H.intersection(l[0],l[1]);for(let p=2;p<l.length;p++)f=H.intersection(f,l[p]);r=f}break}let s=H.object(i);e.additionalProperties===!1?r=s.strict():typeof e.additionalProperties=="object"?r=s.catchall(Dt(e.additionalProperties,t)):r=s.passthrough();break}case"array":{let i=e.prefixItems,o=e.items;if(i&&Array.isArray(i)){let a=i.map(c=>Dt(c,t)),s=o&&typeof o=="object"&&!Array.isArray(o)?Dt(o,t):void 0;s?r=H.tuple(a).rest(s):r=H.tuple(a),typeof e.minItems=="number"&&(r=r.check(H.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(H.maxLength(e.maxItems)))}else if(Array.isArray(o)){let a=o.map(c=>Dt(c,t)),s=e.additionalItems&&typeof e.additionalItems=="object"?Dt(e.additionalItems,t):void 0;s?r=H.tuple(a).rest(s):r=H.tuple(a),typeof e.minItems=="number"&&(r=r.check(H.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(H.maxLength(e.maxItems)))}else if(o!==void 0){let a=Dt(o,t),s=H.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),r=s}else r=H.array(H.any());break}default:throw new Error(`Unsupported type: ${n}`)}return e.description&&(r=r.describe(e.description)),e.default!==void 0&&(r=r.default(e.default)),r}function Dt(e,t){if(typeof e=="boolean")return e?H.any():H.never();let n=kO(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(d=>Dt(d,t)),c=H.union(s);n=r?H.intersection(n,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(d=>Dt(d,t)),c=H.xor(s);n=r?H.intersection(n,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=r?n:H.any();else{let s=r?n:Dt(e.allOf[0],t),c=r?0:1;for(let d=c;d<e.allOf.length;d++)s=H.intersection(s,Dt(e.allOf[d],t));n=s}e.nullable===!0&&t.version==="openapi-3.0"&&(n=H.nullable(n)),e.readOnly===!0&&(n=H.readonly(n));let i={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of o)s in e&&(i[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(i[s]=e[s]);for(let s of Object.keys(e))hZ.has(s)||(i[s]=e[s]);return Object.keys(i).length>0&&t.registry.add(n,i),n}function NO(e,t){var o;if(typeof e=="boolean")return e?H.any():H.never();let n=vZ(e,t==null?void 0:t.defaultTarget),r=e.$defs||e.definitions||{},i={version:n,defs:r,refs:new Map,processing:new Set,rootSchema:e,registry:(o=t==null?void 0:t.registry)!=null?o:It};return Dt(e,i)}var lp={};ei(lp,{bigint:()=>_Z,boolean:()=>xZ,date:()=>wZ,number:()=>bZ,string:()=>SZ});function SZ(e){return nx(ds,e)}function bZ(e){return ux(ms,e)}function xZ(e){return vx(ps,e)}function _Z(e){return Sx(gs,e)}function wZ(e){return Ix(_c,e)}We(Xf());var Fe={authenticate:"authenticate",initialize:"initialize",session_cancel:"session/cancel",session_fork:"session/fork",session_list:"session/list",session_load:"session/load",session_new:"session/new",session_prompt:"session/prompt",session_resume:"session/resume",session_set_config_option:"session/set_config_option",session_set_mode:"session/set_mode",session_set_model:"session/set_model"},yt={fs_read_text_file:"fs/read_text_file",fs_write_text_file:"fs/write_text_file",session_request_permission:"session/request_permission",session_update:"session/update",terminal_create:"terminal/create",terminal_kill:"terminal/kill",terminal_output:"terminal/output",terminal_release:"terminal/release",terminal_wait_for_exit:"terminal/wait_for_exit"},OO=1;var CZ=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),description:u.union([u.string(),u.null()]).optional(),id:u.string(),name:u.string()}),Mw=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),methodId:u.string()}),EZ=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional()}),AZ=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),blob:u.string(),mimeType:u.union([u.string(),u.null()]).optional(),uri:u.string()}),zZ=u.object({amount:u.number(),currency:u.string()}),TZ=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),terminalId:u.string()}),IZ=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),newText:u.string(),oldText:u.union([u.string(),u.null()]).optional(),path:u.string()}),MO=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),name:u.string(),value:u.string()}),kZ=u.union([u.literal(-32700),u.literal(-32600),u.literal(-32601),u.literal(-32602),u.literal(-32603),u.literal(-32800),u.literal(-32e3),u.literal(-32002),u.number().int().min(-2147483648,{message:"Invalid value: Expected int32 to be >= -2147483648"}).max(2147483647,{message:"Invalid value: Expected int32 to be <= 2147483647"})]),DO=u.object({code:kZ,data:u.unknown().optional(),message:u.string()}),RO=u.unknown(),UO=u.unknown(),PO=u.unknown(),NZ=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),readTextFile:u.boolean().optional().default(!1),writeTextFile:u.boolean().optional().default(!1)}),OZ=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),fs:NZ.optional().default({readTextFile:!1,writeTextFile:!1}),terminal:u.boolean().optional().default(!1)}),LO=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),name:u.string(),value:u.string()}),jO=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),name:u.string(),title:u.union([u.string(),u.null()]).optional(),version:u.string()}),MZ=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional()}),Dw=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),cursor:u.union([u.string(),u.null()]).optional(),cwd:u.union([u.string(),u.null()]).optional()}),DZ=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),http:u.boolean().optional().default(!1),sse:u.boolean().optional().default(!1)}),RZ=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),headers:u.array(LO),name:u.string(),url:u.string()}),UZ=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),headers:u.array(LO),name:u.string(),url:u.string()}),PZ=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),args:u.array(u.string()),command:u.string(),env:u.array(MO),name:u.string()}),cp=u.union([RZ.and(u.object({type:u.literal("http")})),UZ.and(u.object({type:u.literal("sse")})),PZ]),Rw=u.string(),LZ=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),description:u.union([u.string(),u.null()]).optional(),modelId:Rw,name:u.string()}),Uw=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),cwd:u.string(),mcpServers:u.array(cp)}),ZO=u.string(),jZ=u.union([u.literal("allow_once"),u.literal("allow_always"),u.literal("reject_once"),u.literal("reject_always")]),ZZ=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),kind:jZ,name:u.string(),optionId:ZO}),qZ=u.union([u.literal("high"),u.literal("medium"),u.literal("low")]),VZ=u.union([u.literal("pending"),u.literal("in_progress"),u.literal("completed")]),FZ=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),content:u.string(),priority:qZ,status:VZ}),HZ=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),entries:u.array(FZ)}),BZ=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),audio:u.boolean().optional().default(!1),embeddedContext:u.boolean().optional().default(!1),image:u.boolean().optional().default(!1)}),qO=u.number().int().gte(0).lte(65535),Pw=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),clientCapabilities:OZ.optional().default({fs:{readTextFile:!1,writeTextFile:!1},terminal:!1}),clientInfo:u.union([jO,u.null()]).optional(),protocolVersion:qO}),GZ=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),content:u.string()}),XZ=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional()}),Io=u.union([u.null(),u.number(),u.string()]),V5=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),requestId:Io}),YZ=u.enum(["assistant","user"]),zc=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),audience:u.union([u.array(YZ),u.null()]).optional(),lastModified:u.union([u.string(),u.null()]).optional(),priority:u.union([u.number(),u.null()]).optional()}),JZ=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),annotations:u.union([zc,u.null()]).optional(),data:u.string(),mimeType:u.string()}),KZ=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),annotations:u.union([zc,u.null()]).optional(),data:u.string(),mimeType:u.string(),uri:u.union([u.string(),u.null()]).optional()}),WZ=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),annotations:u.union([zc,u.null()]).optional(),description:u.union([u.string(),u.null()]).optional(),mimeType:u.union([u.string(),u.null()]).optional(),name:u.string(),size:u.union([u.number(),u.null()]).optional(),title:u.union([u.string(),u.null()]).optional(),uri:u.string()}),QZ=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),optionId:ZO}),e3=u.union([u.object({outcome:u.literal("cancelled")}),QZ.and(u.object({outcome:u.literal("selected")}))]),t3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),outcome:e3}),n3=u.string(),VO=u.string(),i3=u.union([u.literal("mode"),u.literal("model"),u.literal("thought_level"),u.string()]),Lw=u.string(),FO=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),description:u.union([u.string(),u.null()]).optional(),name:u.string(),value:Lw}),r3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),group:n3,name:u.string(),options:u.array(FO)}),o3=u.union([u.array(FO),u.array(r3)]),a3=u.object({currentValue:Lw,options:o3}),hs=a3.and(u.object({type:u.literal("select")})).and(u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),category:u.union([i3,u.null()]).optional(),description:u.union([u.string(),u.null()]).optional(),id:VO,name:u.string()})),s3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),configOptions:u.array(hs)}),l3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional()}),ut=u.string(),jw=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),sessionId:ut}),F5=u.object({method:u.string(),params:u.union([u.union([jw,RO]),u.null()]).optional()}),Zw=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),args:u.array(u.string()).optional(),command:u.string(),cwd:u.union([u.string(),u.null()]).optional(),env:u.array(MO).optional(),outputByteLimit:u.union([u.number(),u.null()]).optional(),sessionId:ut}),qw=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),cwd:u.string(),mcpServers:u.array(cp).optional(),sessionId:ut}),Vw=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),sessionId:ut,terminalId:u.string()}),Fw=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),cwd:u.string(),mcpServers:u.array(cp),sessionId:ut}),Hw=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),limit:u.union([u.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}),u.null()]).optional(),line:u.union([u.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}),u.null()]).optional(),path:u.string(),sessionId:ut}),Bw=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),sessionId:ut,terminalId:u.string()}),Gw=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),cwd:u.string(),mcpServers:u.array(cp).optional(),sessionId:ut}),c3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),cwd:u.string(),sessionId:ut,title:u.union([u.string(),u.null()]).optional(),updatedAt:u.union([u.string(),u.null()]).optional()}),u3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),nextCursor:u.union([u.string(),u.null()]).optional(),sessions:u.array(c3)}),d3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),title:u.union([u.string(),u.null()]).optional(),updatedAt:u.union([u.string(),u.null()]).optional()}),f3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional()}),up=u.string(),m3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),currentModeId:up}),p3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),description:u.union([u.string(),u.null()]).optional(),id:up,name:u.string()}),dp=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),availableModes:u.array(p3),currentModeId:up}),fp=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),availableModels:u.array(LZ),currentModelId:Rw}),g3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),configOptions:u.union([u.array(hs),u.null()]).optional(),models:u.union([fp,u.null()]).optional(),modes:u.union([dp,u.null()]).optional(),sessionId:ut}),h3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),configOptions:u.union([u.array(hs),u.null()]).optional(),models:u.union([fp,u.null()]).optional(),modes:u.union([dp,u.null()]).optional()}),v3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),configOptions:u.union([u.array(hs),u.null()]).optional(),models:u.union([fp,u.null()]).optional(),modes:u.union([dp,u.null()]).optional(),sessionId:ut}),y3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),configOptions:u.union([u.array(hs),u.null()]).optional(),models:u.union([fp,u.null()]).optional(),modes:u.union([dp,u.null()]).optional()}),S3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional()}),b3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),fork:u.union([l3,u.null()]).optional(),list:u.union([f3,u.null()]).optional(),resume:u.union([S3,u.null()]).optional()}),x3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),loadSession:u.boolean().optional().default(!1),mcpCapabilities:DZ.optional().default({http:!1,sse:!1}),promptCapabilities:BZ.optional().default({audio:!1,embeddedContext:!1,image:!1}),sessionCapabilities:b3.optional().default({})}),_3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),agentCapabilities:x3.optional().default({loadSession:!1,mcpCapabilities:{http:!1,sse:!1},promptCapabilities:{audio:!1,embeddedContext:!1,image:!1},sessionCapabilities:{}}),agentInfo:u.union([jO,u.null()]).optional(),authMethods:u.array(CZ).optional().default([]),protocolVersion:qO}),Xw=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),configId:VO,sessionId:ut,value:Lw}),w3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),configOptions:u.array(hs)}),Yw=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),modeId:up,sessionId:ut}),$3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional()}),Jw=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),modelId:Rw,sessionId:ut}),C3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional()}),E3=u.union([u.literal("end_turn"),u.literal("max_tokens"),u.literal("max_turn_requests"),u.literal("refusal"),u.literal("cancelled")]),A3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),terminalId:u.string()}),z3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),exitCode:u.union([u.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}),u.null()]).optional(),signal:u.union([u.string(),u.null()]).optional()}),Kw=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),sessionId:ut,terminalId:u.string()}),T3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),exitStatus:u.union([z3,u.null()]).optional(),output:u.string(),truncated:u.boolean()}),I3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),annotations:u.union([zc,u.null()]).optional(),text:u.string()}),k3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),mimeType:u.union([u.string(),u.null()]).optional(),text:u.string(),uri:u.string()}),N3=u.union([k3,AZ]),O3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),annotations:u.union([zc,u.null()]).optional(),resource:N3}),Ww=u.union([I3.and(u.object({type:u.literal("text")})),KZ.and(u.object({type:u.literal("image")})),JZ.and(u.object({type:u.literal("audio")})),WZ.and(u.object({type:u.literal("resource_link")})),O3.and(u.object({type:u.literal("resource")}))]),M3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),content:Ww}),Ow=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),content:Ww}),Qw=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),prompt:u.array(Ww),sessionId:ut}),H5=u.object({id:Io,method:u.string(),params:u.union([u.union([Pw,Mw,Uw,Fw,Dw,qw,Gw,Yw,Xw,Qw,Jw,UO]),u.null()]).optional()}),HO=u.union([M3.and(u.object({type:u.literal("content")})),IZ.and(u.object({type:u.literal("diff")})),A3.and(u.object({type:u.literal("terminal")}))]),BO=u.string(),GO=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),line:u.union([u.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}),u.null()]).optional(),path:u.string()}),XO=u.union([u.literal("pending"),u.literal("in_progress"),u.literal("completed"),u.literal("failed")]),YO=u.union([u.literal("read"),u.literal("edit"),u.literal("delete"),u.literal("move"),u.literal("search"),u.literal("execute"),u.literal("think"),u.literal("fetch"),u.literal("switch_mode"),u.literal("other")]),D3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),content:u.array(HO).optional(),kind:YO.optional(),locations:u.array(GO).optional(),rawInput:u.unknown().optional(),rawOutput:u.unknown().optional(),status:XO.optional(),title:u.string(),toolCallId:BO}),JO=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),content:u.union([u.array(HO),u.null()]).optional(),kind:u.union([YO,u.null()]).optional(),locations:u.union([u.array(GO),u.null()]).optional(),rawInput:u.unknown().optional(),rawOutput:u.unknown().optional(),status:u.union([XO,u.null()]).optional(),title:u.union([u.string(),u.null()]).optional(),toolCallId:BO}),e$=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),options:u.array(ZZ),sessionId:ut,toolCall:JO}),R3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),hint:u.string()}),U3=R3,P3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),description:u.string(),input:u.union([U3,u.null()]).optional(),name:u.string()}),L3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),availableCommands:u.array(P3)}),j3=u.object({cachedReadTokens:u.union([u.number(),u.null()]).optional(),cachedWriteTokens:u.union([u.number(),u.null()]).optional(),inputTokens:u.number(),outputTokens:u.number(),thoughtTokens:u.union([u.number(),u.null()]).optional(),totalTokens:u.number()}),Z3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),stopReason:E3,usage:u.union([j3,u.null()]).optional()}),B5=u.union([u.object({id:Io,result:u.union([_3,EZ,v3,h3,u3,g3,y3,$3,w3,Z3,C3,PO])}),u.object({error:DO,id:Io})]),q3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),cost:u.union([zZ,u.null()]).optional(),size:u.number(),used:u.number()}),V3=u.union([Ow.and(u.object({sessionUpdate:u.literal("user_message_chunk")})),Ow.and(u.object({sessionUpdate:u.literal("agent_message_chunk")})),Ow.and(u.object({sessionUpdate:u.literal("agent_thought_chunk")})),D3.and(u.object({sessionUpdate:u.literal("tool_call")})),JO.and(u.object({sessionUpdate:u.literal("tool_call_update")})),HZ.and(u.object({sessionUpdate:u.literal("plan")})),L3.and(u.object({sessionUpdate:u.literal("available_commands_update")})),m3.and(u.object({sessionUpdate:u.literal("current_mode_update")})),s3.and(u.object({sessionUpdate:u.literal("config_option_update")})),d3.and(u.object({sessionUpdate:u.literal("session_info_update")})),q3.and(u.object({sessionUpdate:u.literal("usage_update")}))]),t$=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),sessionId:ut,update:V3}),G5=u.object({method:u.string(),params:u.union([u.union([t$,RO]),u.null()]).optional()}),n$=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),sessionId:ut,terminalId:u.string()}),F3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),exitCode:u.union([u.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}),u.null()]).optional(),signal:u.union([u.string(),u.null()]).optional()}),i$=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional(),content:u.string(),path:u.string(),sessionId:ut}),X5=u.object({id:Io,method:u.string(),params:u.union([u.union([i$,Hw,e$,Zw,Kw,Bw,n$,Vw,UO]),u.null()]).optional()}),H3=u.object({_meta:u.union([u.record(u.string(),u.unknown()),u.null()]).optional()}),Y5=u.union([u.object({id:Io,result:u.union([H3,GZ,t3,TZ,T3,XZ,F3,MZ,PO])}),u.object({error:DO,id:Io})]);function KO(e,t){let n=new TextEncoder,r=new TextDecoder,i=new ReadableStream({async start(a){let s="",c=t.getReader();try{for(;;){let{value:d,done:m}=await c.read();if(m)break;if(!d)continue;s+=r.decode(d,{stream:!0});let l=s.split(`
|
|
`);s=l.pop()||"";for(let f of l){let p=f.trim();if(p)try{let h=JSON.parse(p);a.enqueue(h)}catch(h){console.error("Failed to parse JSON message:",p,h)}}}}finally{c.releaseLock(),a.close()}}}),o=new WritableStream({async write(a){let s=JSON.stringify(a)+`
|
|
`,c=e.getWriter();try{await c.write(n.encode(s))}finally{c.releaseLock()}}});return{readable:i,writable:o}}var an,WO=class{constructor(t,n){pt(this,an,void 0);let r=t(this),i=async(a,s)=>{switch(a){case Fe.initialize:{let c=Pw.parse(s);return r.initialize(c)}case Fe.session_new:{let c=Uw.parse(s);return r.newSession(c)}case Fe.session_load:{if(!r.loadSession)throw ze.methodNotFound(a);let c=Fw.parse(s);return r.loadSession(c)}case Fe.session_list:{if(!r.unstable_listSessions)throw ze.methodNotFound(a);let c=Dw.parse(s);return r.unstable_listSessions(c)}case Fe.session_fork:{if(!r.unstable_forkSession)throw ze.methodNotFound(a);let c=qw.parse(s);return r.unstable_forkSession(c)}case Fe.session_resume:{if(!r.unstable_resumeSession)throw ze.methodNotFound(a);let c=Gw.parse(s);return r.unstable_resumeSession(c)}case Fe.session_set_mode:{if(!r.setSessionMode)throw ze.methodNotFound(a);let c=Yw.parse(s),d=await r.setSessionMode(c);return d!=null?d:{}}case Fe.authenticate:{let c=Mw.parse(s),d=await r.authenticate(c);return d!=null?d:{}}case Fe.session_prompt:{let c=Qw.parse(s);return r.prompt(c)}case Fe.session_set_model:{if(!r.unstable_setSessionModel)throw ze.methodNotFound(a);let c=Jw.parse(s),d=await r.unstable_setSessionModel(c);return d!=null?d:{}}case Fe.session_set_config_option:{if(!r.setSessionConfigOption)throw ze.methodNotFound(a);let c=Xw.parse(s);return r.setSessionConfigOption(c)}default:if(r.extMethod)return r.extMethod(a,s);throw ze.methodNotFound(a)}},o=async(a,s)=>{switch(a){case Fe.session_cancel:{let c=jw.parse(s);return r.cancel(c)}default:if(r.extNotification)return r.extNotification(a,s);throw ze.methodNotFound(a)}};Fn(this,an,new pp(i,o,n))}async sessionUpdate(t){return await ie(this,an).sendNotification(yt.session_update,t)}async requestPermission(t){return await ie(this,an).sendRequest(yt.session_request_permission,t)}async readTextFile(t){return await ie(this,an).sendRequest(yt.fs_read_text_file,t)}async writeTextFile(t){var n;return(n=await ie(this,an).sendRequest(yt.fs_write_text_file,t))!=null?n:{}}async createTerminal(t){let n=await ie(this,an).sendRequest(yt.terminal_create,t);return new r$(n.terminalId,t.sessionId,ie(this,an))}async extMethod(t,n){return await ie(this,an).sendRequest(t,n)}async extNotification(t,n){return await ie(this,an).sendNotification(t,n)}get signal(){return ie(this,an).signal}get closed(){return ie(this,an).closed}};an=new WeakMap;var Fr,Hr,r$=class{constructor(t,n,r){qc(this,"id");pt(this,Fr,void 0);pt(this,Hr,void 0);this.id=t,Fn(this,Fr,n),Fn(this,Hr,r)}async currentOutput(){return await ie(this,Hr).sendRequest(yt.terminal_output,{sessionId:ie(this,Fr),terminalId:this.id})}async waitForExit(){return await ie(this,Hr).sendRequest(yt.terminal_wait_for_exit,{sessionId:ie(this,Fr),terminalId:this.id})}async kill(){var t;return(t=await ie(this,Hr).sendRequest(yt.terminal_kill,{sessionId:ie(this,Fr),terminalId:this.id}))!=null?t:{}}async release(){var t;return(t=await ie(this,Hr).sendRequest(yt.terminal_release,{sessionId:ie(this,Fr),terminalId:this.id}))!=null?t:{}}async[Symbol.asyncDispose](){await this.release()}};Fr=new WeakMap,Hr=new WeakMap;var dt,mp=class{constructor(t,n){pt(this,dt,void 0);let r=t(this),i=async(a,s)=>{var c,d,m,l,f,p,h;switch(a){case yt.fs_write_text_file:{let y=i$.parse(s);return(c=r.writeTextFile)==null?void 0:c.call(r,y)}case yt.fs_read_text_file:{let y=Hw.parse(s);return(d=r.readTextFile)==null?void 0:d.call(r,y)}case yt.session_request_permission:{let y=e$.parse(s);return r.requestPermission(y)}case yt.terminal_create:{let y=Zw.parse(s);return(m=r.createTerminal)==null?void 0:m.call(r,y)}case yt.terminal_output:{let y=Kw.parse(s);return(l=r.terminalOutput)==null?void 0:l.call(r,y)}case yt.terminal_release:{let y=Bw.parse(s),x=await((f=r.releaseTerminal)==null?void 0:f.call(r,y));return x!=null?x:{}}case yt.terminal_wait_for_exit:{let y=n$.parse(s);return(p=r.waitForTerminalExit)==null?void 0:p.call(r,y)}case yt.terminal_kill:{let y=Vw.parse(s),x=await((h=r.killTerminal)==null?void 0:h.call(r,y));return x!=null?x:{}}default:if(r.extMethod)return r.extMethod(a,s);throw ze.methodNotFound(a)}},o=async(a,s)=>{switch(a){case yt.session_update:{let c=t$.parse(s);return r.sessionUpdate(c)}default:if(r.extNotification)return r.extNotification(a,s);throw ze.methodNotFound(a)}};Fn(this,dt,new pp(i,o,n))}async initialize(t){return await ie(this,dt).sendRequest(Fe.initialize,t)}async newSession(t){return await ie(this,dt).sendRequest(Fe.session_new,t)}async loadSession(t){var n;return(n=await ie(this,dt).sendRequest(Fe.session_load,t))!=null?n:{}}async unstable_forkSession(t){return await ie(this,dt).sendRequest(Fe.session_fork,t)}async unstable_listSessions(t){return await ie(this,dt).sendRequest(Fe.session_list,t)}async unstable_resumeSession(t){return await ie(this,dt).sendRequest(Fe.session_resume,t)}async setSessionMode(t){var n;return(n=await ie(this,dt).sendRequest(Fe.session_set_mode,t))!=null?n:{}}async unstable_setSessionModel(t){var n;return(n=await ie(this,dt).sendRequest(Fe.session_set_model,t))!=null?n:{}}async setSessionConfigOption(t){return await ie(this,dt).sendRequest(Fe.session_set_config_option,t)}async authenticate(t){var n;return(n=await ie(this,dt).sendRequest(Fe.authenticate,t))!=null?n:{}}async prompt(t){return await ie(this,dt).sendRequest(Fe.session_prompt,t)}async cancel(t){return await ie(this,dt).sendNotification(Fe.session_cancel,t)}async extMethod(t,n){return await ie(this,dt).sendRequest(t,n)}async extNotification(t,n){return await ie(this,dt).sendNotification(t,n)}get signal(){return ie(this,dt).signal}get closed(){return ie(this,dt).closed}};dt=new WeakMap;var vs,gp,Ic,kc,ys,Ss,bs,Nc,hp,QO,vp,eM,yp,tM,Sp,nM,bp,iM,ko,Tc,pp=class{constructor(t,n,r){pt(this,hp);pt(this,vp);pt(this,yp);pt(this,Sp);pt(this,bp);pt(this,ko);pt(this,vs,new Map);pt(this,gp,0);pt(this,Ic,void 0);pt(this,kc,void 0);pt(this,ys,void 0);pt(this,Ss,Promise.resolve());pt(this,bs,new AbortController);pt(this,Nc,void 0);Fn(this,Ic,t),Fn(this,kc,n),Fn(this,ys,r),Fn(this,Nc,new Promise(i=>{ie(this,bs).signal.addEventListener("abort",()=>i())})),ti(this,hp,QO).call(this)}get signal(){return ie(this,bs).signal}get closed(){return ie(this,Nc)}async sendRequest(t,n){let r=h$(this,gp)._++,i=new Promise((o,a)=>{ie(this,vs).set(r,{resolve:o,reject:a})});return await ti(this,ko,Tc).call(this,{jsonrpc:"2.0",id:r,method:t,params:n}),i}async sendNotification(t,n){await ti(this,ko,Tc).call(this,{jsonrpc:"2.0",method:t,params:n})}};vs=new WeakMap,gp=new WeakMap,Ic=new WeakMap,kc=new WeakMap,ys=new WeakMap,Ss=new WeakMap,bs=new WeakMap,Nc=new WeakMap,hp=new WeakSet,QO=async function(){let t=ie(this,ys).readable.getReader();try{for(;;){let{value:n,done:r}=await t.read();if(r)break;if(n)try{ti(this,vp,eM).call(this,n)}catch(i){console.error("Unexpected error during message processing:",n,i),"id"in n&&n.id!==void 0&&ti(this,ko,Tc).call(this,{jsonrpc:"2.0",id:n.id,error:{code:-32700,message:"Parse error"}})}}}finally{t.releaseLock(),ie(this,bs).abort()}},vp=new WeakSet,eM=async function(t){if("method"in t&&"id"in t){let n=await ti(this,yp,tM).call(this,t.method,t.params);"error"in n&&console.error("Error handling request",t,n.error),await ti(this,ko,Tc).call(this,{jsonrpc:"2.0",id:t.id,...n})}else if("method"in t){let n=await ti(this,Sp,nM).call(this,t.method,t.params);"error"in n&&console.error("Error handling notification",t,n.error)}else"id"in t?ti(this,bp,iM).call(this,t):console.error("Invalid message",{message:t})},yp=new WeakSet,tM=async function(t,n){try{let r=await ie(this,Ic).call(this,t,n);return{result:r!=null?r:null}}catch(r){if(r instanceof ze)return r.toResult();if(r instanceof u.ZodError)return ze.invalidParams(r.format()).toResult();let i;(r instanceof Error||typeof r=="object"&&r!=null&&"message"in r&&typeof r.message=="string")&&(i=r.message);try{return ze.internalError(i?JSON.parse(i):{}).toResult()}catch(o){return ze.internalError({details:i}).toResult()}}},Sp=new WeakSet,nM=async function(t,n){try{return await ie(this,kc).call(this,t,n),{result:null}}catch(r){if(r instanceof ze)return r.toResult();if(r instanceof u.ZodError)return ze.invalidParams(r.format()).toResult();let i;(r instanceof Error||typeof r=="object"&&r!=null&&"message"in r&&typeof r.message=="string")&&(i=r.message);try{return ze.internalError(i?JSON.parse(i):{}).toResult()}catch(o){return ze.internalError({details:i}).toResult()}}},bp=new WeakSet,iM=function(t){let n=ie(this,vs).get(t.id);n?("result"in t?n.resolve(t.result):"error"in t&&n.reject(t.error),ie(this,vs).delete(t.id)):console.error("Got response to unknown request",t.id)},ko=new WeakSet,Tc=async function(t){return Fn(this,Ss,ie(this,Ss).then(async()=>{let n=ie(this,ys).writable.getWriter();try{await n.write(t)}finally{n.releaseLock()}}).catch(n=>{console.error("ACP write error:",n)})),ie(this,Ss)};var ze=class extends Error{constructor(n,r,i){super(r);qc(this,"code");qc(this,"data");this.code=n,this.name="RequestError",this.data=i}static parseError(n,r){return new ze(-32700,`Parse error${r?`: ${r}`:""}`,n)}static invalidRequest(n,r){return new ze(-32600,`Invalid request${r?`: ${r}`:""}`,n)}static methodNotFound(n){return new ze(-32601,`"Method not found": ${n}`,{method:n})}static invalidParams(n,r){return new ze(-32602,`Invalid params${r?`: ${r}`:""}`,n)}static internalError(n,r){return new ze(-32603,`Internal error${r?`: ${r}`:""}`,n)}static authRequired(n,r){return new ze(-32e3,`Authentication required${r?`: ${r}`:""}`,n)}static resourceNotFound(n){return new ze(-32002,`Resource not found${n?`: ${n}`:""}`,n&&{uri:n})}toResult(){return{error:{code:this.code,message:this.message,data:this.data}}}toErrorResponse(){return{code:this.code,message:this.message,data:this.data}}};var xs=require("obsidian");var Rt=class{static toSlashCommands(t){return(t||[]).map(n=>{var r,i;return{name:n.name,description:n.description,hint:(i=(r=n.input)==null?void 0:r.hint)!=null?i:null}})}static toToolCallContent(t){if(!t)return;let n=[];for(let r of t)r.type==="diff"?n.push({type:"diff",path:r.path,newText:r.newText,oldText:r.oldText}):r.type==="terminal"&&n.push({type:"terminal",terminalId:r.terminalId});return n.length>0?n:void 0}static toSessionConfigOptions(t){return t.map(n=>{var r,i;return{id:n.id,name:n.name,description:(r=n.description)!=null?r:void 0,category:(i=n.category)!=null?i:void 0,type:n.type,currentValue:n.currentValue,options:this.toSessionConfigSelectOptions(n.options)}})}static toSessionConfigSelectOptions(t){return t.length===0?[]:"group"in t[0]?t.map(r=>({group:r.group,name:r.name,options:r.options.map(i=>{var o;return{value:i.value,name:i.name,description:(o=i.description)!=null?o:void 0}})})):t.map(r=>{var i;return{value:r.value,name:r.name,description:(i=r.description)!=null?i:void 0}})}static toSessionResult(t,n){let r;n.modes&&(r={availableModes:n.modes.availableModes.map(a=>{var s;return{id:a.id,name:a.name,description:(s=a.description)!=null?s:void 0}}),currentModeId:n.modes.currentModeId});let i;n.models&&(i={availableModels:n.models.availableModels.map(a=>{var s;return{modelId:a.modelId,name:a.name,description:(s=a.description)!=null?s:void 0}}),currentModelId:n.models.currentModelId});let o=n.configOptions?this.toSessionConfigOptions(n.configOptions):void 0;return{sessionId:t,modes:r,models:i,configOptions:o}}static toAcpContentBlock(t){switch(t.type){case"text":return{type:"text",text:t.text};case"image":return{type:"image",data:t.data,mimeType:t.mimeType};case"resource":return{type:"resource",resource:{uri:t.resource.uri,mimeType:t.resource.mimeType,text:t.resource.text},annotations:t.annotations};case"resource_link":return{type:"resource_link",uri:t.uri,name:t.name,mimeType:t.mimeType,size:t.size}}}static toInitializeResult(t){var o,a,s,c,d,m,l,f,p,h,y,x,S,g,b,v,_,C;let n=(o=t.agentCapabilities)==null?void 0:o.promptCapabilities,r=(a=t.agentCapabilities)==null?void 0:a.mcpCapabilities,i=(s=t.agentCapabilities)==null?void 0:s.sessionCapabilities;return{protocolVersion:t.protocolVersion,authMethods:t.authMethods||[],promptCapabilities:{image:(c=n==null?void 0:n.image)!=null?c:!1,audio:(d=n==null?void 0:n.audio)!=null?d:!1,embeddedContext:(m=n==null?void 0:n.embeddedContext)!=null?m:!1},agentCapabilities:{loadSession:(f=(l=t.agentCapabilities)==null?void 0:l.loadSession)!=null?f:!1,sessionCapabilities:i?{resume:(p=i.resume)!=null?p:void 0,fork:(h=i.fork)!=null?h:void 0,list:(y=i.list)!=null?y:void 0}:void 0,mcpCapabilities:r?{http:(x=r.http)!=null?x:!1,sse:(S=r.sse)!=null?S:!1}:void 0,promptCapabilities:{image:(g=n==null?void 0:n.image)!=null?g:!1,audio:(b=n==null?void 0:n.audio)!=null?b:!1,embeddedContext:(v=n==null?void 0:n.embeddedContext)!=null?v:!1}},agentInfo:t.agentInfo?{name:t.agentInfo.name,title:(_=t.agentInfo.title)!=null?_:void 0,version:(C=t.agentInfo.version)!=null?C:void 0}:void 0}}};var rM=require("child_process");var o$=require("obsidian");var xp=class{constructor(t){this.terminals=new Map;this.logger=Ne(),this.plugin=t}createTerminal(t){var f,p;let n=crypto.randomUUID();if(!o$.Platform.isDesktopApp)throw new Error("Agent Client is only available on desktop");let r={...process.env};if(o$.Platform.isWin&&!this.plugin.settings.windowsWslMode&&(r=Ld(r)),t.env)for(let h of t.env)r[h.name]=h.value;let i=t.command,o=t.args||[],a=qd(this.plugin.settings.nodePath),s=jd(i,o,t.cwd||process.cwd(),{wslMode:this.plugin.settings.windowsWslMode,wslDistribution:this.plugin.settings.windowsWslDistribution,nodeDir:a,alwaysEscape:!1});i=s.command,o=s.args;let c=s.needsShell;this.logger.log(`[Terminal ${n}] Creating terminal:`,{command:i,args:o,cwd:t.cwd});let d={cwd:t.cwd||void 0,env:r,stdio:["pipe","pipe","pipe"],shell:c},m=(0,rM.spawn)(i,o,d),l={id:n,process:m,output:"",exitStatus:null,outputByteLimit:t.outputByteLimit!==void 0?Number(t.outputByteLimit):void 0,waitPromises:[]};return m.on("error",h=>{this.logger.log(`[Terminal ${n}] Process error:`,h.message);let y={exitCode:127,signal:null};l.exitStatus=y,l.waitPromises.forEach(x=>x(y)),l.waitPromises=[]}),(f=m.stdout)==null||f.on("data",h=>{let y=h.toString();this.logger.log(`[Terminal ${n}] stdout:`,y),this.appendOutput(l,y)}),(p=m.stderr)==null||p.on("data",h=>{let y=h.toString();this.logger.log(`[Terminal ${n}] stderr:`,y),this.appendOutput(l,y)}),m.on("exit",(h,y)=>{this.logger.log(`[Terminal ${n}] Process exited with code: ${h}, signal: ${y}`);let x={exitCode:h,signal:y};l.exitStatus=x,l.waitPromises.forEach(S=>S(x)),l.waitPromises=[]}),this.terminals.set(n,l),n}appendOutput(t,n){if(t.output+=n,t.outputByteLimit&&Buffer.byteLength(t.output,"utf8")>t.outputByteLimit){let r=Buffer.from(t.output,"utf8"),i=r.subarray(r.length-t.outputByteLimit);t.output=i.toString("utf8")}}getOutput(t){let n=this.terminals.get(t);return n?{output:n.output,truncated:n.outputByteLimit?Buffer.byteLength(n.output,"utf8")>=n.outputByteLimit:!1,exitStatus:n.exitStatus}:null}waitForExit(t){let n=this.terminals.get(t);return n?n.exitStatus?Promise.resolve(n.exitStatus):new Promise(r=>{n.waitPromises.push(r)}):Promise.reject(new Error(`Terminal ${t} not found`))}killTerminal(t){let n=this.terminals.get(t);return n?(n.exitStatus||n.process.kill("SIGTERM"),!0):!1}releaseTerminal(t){let n=this.terminals.get(t);return n?(this.logger.log(`[Terminal ${t}] Releasing terminal`),n.exitStatus||n.process.kill("SIGTERM"),n.cleanupTimeout=window.setTimeout(()=>{this.logger.log(`[Terminal ${t}] Cleaning up terminal after grace period`),this.terminals.delete(t)},3e4),!0):!1}killAllTerminals(){this.logger.log(`Killing ${this.terminals.size} running terminals...`),this.terminals.forEach((t,n)=>{t.cleanupTimeout&&window.clearTimeout(t.cleanupTimeout),t.exitStatus||(this.logger.log(`Killing terminal ${n}`),this.killTerminal(n))}),this.terminals.clear()}};var _p=class{constructor(t,n){this.pendingRequests=new Map;this.requestQueue=[];this.logger=Ne(),this.callbacks=t,this.autoAllow=n}setAutoAllow(t){this.autoAllow=t}async request(t){var d,m,l;if(this.logger.log("[PermissionManager] Permission request received:",t),this.autoAllow){let f=t.options.find(p=>p.kind==="allow_once"||p.kind==="allow_always"||!p.kind&&p.name.toLowerCase().includes("allow"))||t.options[0];return this.logger.log("[PermissionManager] Auto-allowing permission request:",f),Promise.resolve({outcome:{outcome:"selected",optionId:f.optionId}})}let n=crypto.randomUUID(),r=((d=t.toolCall)==null?void 0:d.toolCallId)||crypto.randomUUID(),i=t.sessionId,o=t.options.map(f=>{let p=f.kind==="reject_always"?"reject_once":f.kind,h=p||(f.name.toLowerCase().includes("allow")?"allow_once":"reject_once");return{optionId:f.optionId,name:f.name,kind:h}}),a=this.requestQueue.length===0,s={requestId:n,options:o,isActive:a};this.requestQueue.push({requestId:n,toolCallId:r,options:o,sessionId:i});let c=t.toolCall;return this.callbacks.onSessionUpdate({type:"tool_call",sessionId:i,toolCallId:r,title:(m=c==null?void 0:c.title)!=null?m:void 0,status:(c==null?void 0:c.status)||"pending",kind:(l=c==null?void 0:c.kind)!=null?l:void 0,content:Rt.toToolCallContent(c==null?void 0:c.content),rawInput:c==null?void 0:c.rawInput,permissionRequest:s}),new Promise(f=>{this.pendingRequests.set(n,{resolve:f,toolCallId:r,options:o,sessionId:i})})}respond(t,n){let r=this.pendingRequests.get(t);if(!r)return;let{resolve:i,toolCallId:o,options:a,sessionId:s}=r;this.callbacks.onSessionUpdate({type:"tool_call_update",sessionId:s,toolCallId:o,permissionRequest:{requestId:t,options:a,selectedOptionId:n,isActive:!1}}),i({outcome:{outcome:"selected",optionId:n}}),this.pendingRequests.delete(t),this.requestQueue=this.requestQueue.filter(c=>c.requestId!==t),this.activateNext()}cancelAll(){this.logger.log(`[PermissionManager] Cancelling ${this.pendingRequests.size} pending permission requests`),this.pendingRequests.forEach(({resolve:t,toolCallId:n,options:r,sessionId:i},o)=>{this.callbacks.onSessionUpdate({type:"tool_call_update",sessionId:i,toolCallId:n,status:"completed",permissionRequest:{requestId:o,options:r,isCancelled:!0,isActive:!1}}),t({outcome:{outcome:"cancelled"}})}),this.pendingRequests.clear(),this.requestQueue=[]}activateNext(){if(this.requestQueue.length===0)return;let t=this.requestQueue[0],n=this.pendingRequests.get(t.requestId);n&&this.callbacks.onSessionUpdate({type:"tool_call_update",sessionId:t.sessionId,toolCallId:t.toolCallId,permissionRequest:{requestId:t.requestId,options:n.options,isActive:!0}})}};var wp=class{constructor(t,n,r,i,o){this.permissionManager=t;this.terminalManager=n;this.getWorkingDirectory=r;this.getCurrentSessionId=i;this.logger=o;this.sessionUpdateListeners=new Set;this.promptSessionUpdateCount=0}resetUpdateCount(){this.promptSessionUpdateCount=0}hasReceivedUpdates(){return this.promptSessionUpdateCount>0}onSessionUpdate(t){return this.sessionUpdateListeners.add(t),()=>this.sessionUpdateListeners.delete(t)}emitSessionUpdate(t){let n=this.getCurrentSessionId();if(!(n&&t.sessionId!==n))for(let r of this.sessionUpdateListeners)r(t)}sessionUpdate(t){var i,o,a,s;let n=t.update,r=t.sessionId;switch(this.promptSessionUpdateCount++,this.logger.log("[AcpHandler] sessionUpdate:",{sessionId:r,update:n}),n.sessionUpdate){case"agent_message_chunk":case"agent_thought_chunk":case"user_message_chunk":n.content.type==="text"&&this.emitSessionUpdate({type:n.sessionUpdate,sessionId:r,text:n.content.text});break;case"tool_call":case"tool_call_update":this.emitSessionUpdate({type:n.sessionUpdate,sessionId:r,toolCallId:n.toolCallId,title:(i=n.title)!=null?i:void 0,status:n.status||"pending",kind:(o=n.kind)!=null?o:void 0,content:Rt.toToolCallContent(n.content),locations:(a=n.locations)!=null?a:void 0,rawInput:n.rawInput});break;case"plan":this.emitSessionUpdate({type:"plan",sessionId:r,entries:n.entries});break;case"available_commands_update":this.emitSessionUpdate({type:"available_commands_update",sessionId:r,commands:Rt.toSlashCommands(n.availableCommands)});break;case"current_mode_update":this.emitSessionUpdate({type:"current_mode_update",sessionId:r,currentModeId:n.currentModeId});break;case"session_info_update":this.emitSessionUpdate({type:"session_info_update",sessionId:r,title:n.title,updatedAt:n.updatedAt});break;case"usage_update":this.emitSessionUpdate({type:"usage_update",sessionId:r,size:n.size,used:n.used,cost:(s=n.cost)!=null?s:void 0});break;case"config_option_update":this.emitSessionUpdate({type:"config_option_update",sessionId:r,configOptions:Rt.toSessionConfigOptions(n.configOptions)});break}return Promise.resolve()}requestPermission(t){return this.permissionManager.request(t)}async extNotification(t,n){this.logger.log(`[AcpHandler] Extension notification received: ${t}`,n)}readTextFile(t){return Promise.resolve({content:""})}writeTextFile(t){return Promise.resolve({})}createTerminal(t){var r,i;this.logger.log("[AcpHandler] createTerminal called with params:",t);let n=this.terminalManager.createTerminal({command:t.command,args:t.args,cwd:t.cwd||this.getWorkingDirectory(),env:(r=t.env)!=null?r:void 0,outputByteLimit:(i=t.outputByteLimit)!=null?i:void 0});return Promise.resolve({terminalId:n})}terminalOutput(t){let n=this.terminalManager.getOutput(t.terminalId);if(!n)throw new Error(`Terminal ${t.terminalId} not found`);return Promise.resolve(n)}async waitForTerminalExit(t){return await this.terminalManager.waitForExit(t.terminalId)}killTerminal(t){if(!this.terminalManager.killTerminal(t.terminalId))throw new Error(`Terminal ${t.terminalId} not found`);return Promise.resolve({})}releaseTerminal(t){return this.terminalManager.releaseTerminal(t.terminalId)||this.logger.log(`[AcpHandler] releaseTerminal: Terminal ${t.terminalId} not found (may have been already cleaned up)`),Promise.resolve({})}};var $p=class{constructor(t){this.plugin=t;this.connection=null;this.agentProcess=null;this.currentConfig=null;this.isInitializedFlag=!1;this.currentAgentId=null;this.currentSessionId=null;this.recentStderr="";this.logger=Ne(),this.terminalManager=new xp(t),this.permissionManager=new _p({onSessionUpdate:n=>this.handler.emitSessionUpdate(n)},!1),this.handler=new wp(this.permissionManager,this.terminalManager,()=>{var n,r;return(r=(n=this.currentConfig)==null?void 0:n.workingDirectory)!=null?r:""},()=>this.currentSessionId,this.logger)}async initialize(t){var S,g,b;if(this.logger.log("[AcpClient] Starting initialization with config:",t),this.logger.log(`[AcpClient] Current state - process: ${!!this.agentProcess}, PID: ${(S=this.agentProcess)==null?void 0:S.pid}`),this.agentProcess&&this.killProcessTree(),this.connection&&(this.logger.log("[AcpClient] Cleaning up existing connection"),this.connection=null),this.currentConfig=t,this.permissionManager.setAutoAllow(this.plugin.settings.autoAllowPermissions),!t.command||t.command.trim().length===0)throw new Error(`Command not configured for agent "${t.displayName}" (${t.id}). Please configure the agent command in settings.`);let n=t.command.trim(),r=t.args.length>0?[...t.args]:[];this.logger.log(`[AcpClient] Active agent: ${t.displayName} (${t.id})`),this.logger.log("[AcpClient] Command:",n),this.logger.log("[AcpClient] Args:",r.length>0?r.join(" "):"(none)");let i={...process.env,...t.env||{}};xs.Platform.isWin&&!this.plugin.settings.windowsWslMode&&(i=Ld(i));let o=qd(this.plugin.settings.nodePath);if(o){let v=xs.Platform.isWin?";":":";i.PATH=i.PATH?`${o}${v}${i.PATH}`:o,this.logger.log("[AcpClient] Node.js directory added to PATH:",o)}this.logger.log("[AcpClient] Starting agent process in directory:",t.workingDirectory);let a=jd(n,r,t.workingDirectory,{wslMode:this.plugin.settings.windowsWslMode,wslDistribution:this.plugin.settings.windowsWslDistribution,nodeDir:o,alwaysEscape:!0}),s=a.command,c=a.args,d=a.needsShell;this.logger.log("[AcpClient] Prepared spawn command:",s,c);let m=(0,a$.spawn)(s,c,{stdio:["pipe","pipe","pipe"],env:i,cwd:t.workingDirectory,shell:d,detached:!xs.Platform.isWin});this.agentProcess=m;let l=`${t.displayName} (${t.id})`;if(m.on("spawn",()=>{this.logger.log(`[AcpClient] ${l} process spawned successfully, PID:`,m.pid)}),m.on("error",v=>{var C;this.logger.error(`[AcpClient] ${l} process error:`,v);let _={type:"spawn_failed",agentId:t.id,errorCode:v.code,originalError:v,...$I(v,n,l,this.plugin.settings.windowsWslMode)};this.handler.emitSessionUpdate({type:"process_error",sessionId:(C=this.currentSessionId)!=null?C:"",error:_})}),m.on("exit",(v,_)=>{var C;if(this.logger.log(`[AcpClient] ${l} process exited with code:`,v,"signal:",_),v===127){this.logger.error(`[AcpClient] Command not found: ${n}`);let E={type:"command_not_found",agentId:t.id,exitCode:v,title:"Command Not Found",message:`The command "${n}" could not be found. Please check the path configuration for ${l}.`,suggestion:Yv(n,this.plugin.settings.windowsWslMode)};this.handler.emitSessionUpdate({type:"process_error",sessionId:(C=this.currentSessionId)!=null?C:"",error:E})}}),m.on("close",(v,_)=>{this.logger.log(`[AcpClient] ${l} process closed with code:`,v,"signal:",_)}),(g=m.stderr)==null||g.setEncoding("utf8"),(b=m.stderr)==null||b.on("data",v=>{this.logger.log(`[AcpClient] ${l} stderr:`,v),this.recentStderr+=v,this.recentStderr.length>8192&&(this.recentStderr=this.recentStderr.slice(-4096))}),!m.stdin||!m.stdout)throw new Error("Agent process stdin/stdout not available");let f=m.stdin,p=m.stdout,h=new WritableStream({write(v){f.write(v)},close(){f.end()}}),y=new ReadableStream({start(v){p.on("data",_=>{v.enqueue(_)}),p.on("end",()=>{v.close()})}});this.logger.log("[AcpClient] Using working directory:",t.workingDirectory);let x=KO(h,y);this.connection=new mp(()=>this.handler,x);try{this.logger.log("[AcpClient] Starting ACP initialization...");let v=await this.connection.initialize({protocolVersion:OO,clientCapabilities:{fs:{readTextFile:!1,writeTextFile:!1},terminal:!0},clientInfo:{name:"obsidian-agent-client",title:"Agent Client for Obsidian",version:this.plugin.manifest.version}});return this.logger.log(`[AcpClient] \u2705 Connected to agent (protocol v${v.protocolVersion})`),this.isInitializedFlag=!0,this.currentAgentId=t.id,Rt.toInitializeResult(v)}catch(v){throw this.logger.error("[AcpClient] Initialization Error:",v),this.isInitializedFlag=!1,this.currentAgentId=null,v}}async newSession(t){let n=this.requireConnection();try{this.logger.log("[AcpClient] Creating new session...");let r=await n.newSession({cwd:this.toSessionCwd(t),mcpServers:[]});this.logger.log(`[AcpClient] Created session: ${r.sessionId}`);let i=Rt.toSessionResult(r.sessionId,r);return this.currentSessionId=i.sessionId,i}catch(r){throw this.logger.error("[AcpClient] New Session Error:",r),r}}async authenticate(t){let n=this.requireConnection();try{return await n.authenticate({methodId:t}),this.logger.log("[AcpClient] \u2705 authenticate ok:",t),!0}catch(r){return this.logger.error("[AcpClient] Authentication Error:",r),!1}}async sendPrompt(t,n){let r=this.requireConnection();this.handler.resetUpdateCount(),this.recentStderr="";try{let i=n.map(a=>Rt.toAcpContentBlock(a));this.logger.log(`[AcpClient] Sending prompt with ${n.length} content blocks`);let o=await r.prompt({sessionId:t,prompt:i});if(this.logger.log(`[AcpClient] Agent completed with: ${o.stopReason}`),!this.handler.hasReceivedUpdates()&&o.stopReason==="end_turn"){await new Promise(s=>setTimeout(s,100));let a=_I(this.recentStderr);if(a)throw this.logger.warn("[AcpClient] Agent returned end_turn with no session updates \u2014 detected error in stderr"),new Error(`The agent returned an empty response. ${a}`);this.logger.log("[AcpClient] Agent returned end_turn with no session updates (may be expected for some commands)")}}catch(i){if(Gd(i)||wI(i))return;throw this.logger.error("[AcpClient] Prompt Error:",i),i}}async cancel(t){try{let n=this.requireConnection();this.logger.log("[AcpClient] Sending session/cancel notification..."),await n.cancel({sessionId:t}),this.logger.log("[AcpClient] Cancellation request sent successfully")}catch(n){this.logger.warn("[AcpClient] Failed to send cancellation:",n)}finally{this.cancelAllOperations()}}killProcessTree(){if(!this.agentProcess)return;let t=this.agentProcess.pid;this.logger.log(`[AcpClient] Killing process tree (PID: ${t})`);try{xs.Platform.isWin&&t?(0,a$.spawn)("taskkill",["/PID",String(t),"/T","/F"],{stdio:"ignore"}):t?process.kill(-t,"SIGTERM"):this.agentProcess.kill()}catch(n){try{this.agentProcess.kill()}catch(r){}}this.agentProcess=null}disconnect(){return this.logger.log("[AcpClient] Disconnecting..."),this.cancelAllOperations(),this.killProcessTree(),this.connection=null,this.currentConfig=null,this.isInitializedFlag=!1,this.currentAgentId=null,this.currentSessionId=null,this.logger.log("[AcpClient] Disconnected"),Promise.resolve()}isInitialized(){return this.isInitializedFlag&&this.connection!==null&&this.agentProcess!==null}getCurrentAgentId(){return this.currentAgentId}async setSessionMode(t,n){let r=this.requireConnection();this.logger.log(`[AcpClient] Setting session mode to: ${n} for session: ${t}`);try{await r.setSessionMode({sessionId:t,modeId:n}),this.logger.log(`[AcpClient] Session mode set to: ${n}`)}catch(i){throw this.logger.error("[AcpClient] Failed to set session mode:",i),i}}async setSessionModel(t,n){let r=this.requireConnection();this.logger.log(`[AcpClient] Setting session model to: ${n} for session: ${t}`);try{await r.unstable_setSessionModel({sessionId:t,modelId:n}),this.logger.log(`[AcpClient] Session model set to: ${n}`)}catch(i){throw this.logger.error("[AcpClient] Failed to set session model:",i),i}}async setSessionConfigOption(t,n,r){let i=this.requireConnection();this.logger.log(`[AcpClient] Setting config option: ${n}=${r} for session: ${t}`);try{let o=await i.setSessionConfigOption({sessionId:t,configId:n,value:r});return this.logger.log("[AcpClient] Config option set. Updated options:",o.configOptions),Rt.toSessionConfigOptions(o.configOptions)}catch(o){throw this.logger.error("[AcpClient] Failed to set config option:",o),o}}onSessionUpdate(t){return this.handler.onSessionUpdate(t)}respondToPermission(t,n){return this.requireConnection(),this.logger.log("[AcpClient] Responding to permission request:",t,"with option:",n),this.permissionManager.respond(t,n),Promise.resolve()}requireConnection(){if(!this.connection)throw new Error("Connection not initialized. Call initialize() first.");return this.connection}toSessionCwd(t){return xs.Platform.isWin&&this.plugin.settings.windowsWslMode?Pn(t):t}cancelAllOperations(){this.permissionManager.cancelAll(),this.terminalManager.killAllTerminals()}getTerminalOutput(t){let n=this.terminalManager.getOutput(t);if(!n)throw new Error(`Terminal ${t} not found`);return Promise.resolve(n)}async listSessions(t,n){var i;let r=this.requireConnection();try{this.logger.log("[AcpClient] Listing sessions...");let o=t?this.toSessionCwd(t):void 0,a=await r.unstable_listSessions({cwd:o!=null?o:null,cursor:n!=null?n:null});return this.logger.log(`[AcpClient] Found ${a.sessions.length} sessions`),{sessions:a.sessions.map(s=>{var c,d;return{sessionId:s.sessionId,cwd:s.cwd,title:(c=s.title)!=null?c:void 0,updatedAt:(d=s.updatedAt)!=null?d:void 0}}),nextCursor:(i=a.nextCursor)!=null?i:void 0}}catch(o){throw this.logger.error("[AcpClient] List Sessions Error:",o),o}}async loadSession(t,n){let r=this.requireConnection();this.currentSessionId=t;try{this.logger.log(`[AcpClient] Loading session: ${t}...`);let i=await r.loadSession({sessionId:t,cwd:this.toSessionCwd(n),mcpServers:[]});this.logger.log(`[AcpClient] Session loaded: ${t}`);let o=Rt.toSessionResult(t,i);return this.currentSessionId=o.sessionId,o}catch(i){throw this.logger.error("[AcpClient] Load Session Error:",i),i}}async resumeSession(t,n){let r=this.requireConnection();this.currentSessionId=t;try{this.logger.log(`[AcpClient] Resuming session: ${t}...`);let i=await r.unstable_resumeSession({sessionId:t,cwd:this.toSessionCwd(n),mcpServers:[]});this.logger.log(`[AcpClient] Session resumed: ${t}`);let o=Rt.toSessionResult(t,i);return this.currentSessionId=o.sessionId,o}catch(i){throw this.logger.error("[AcpClient] Resume Session Error:",i),i}}async forkSession(t,n){let r=this.requireConnection();try{this.logger.log(`[AcpClient] Forking session: ${t}...`);let i=await r.unstable_forkSession({sessionId:t,cwd:this.toSessionCwd(n),mcpServers:[]});this.logger.log(`[AcpClient] Session forked: ${t} -> ${i.sessionId}`);let o=Rt.toSessionResult(i.sessionId,i);return this.currentSessionId=o.sessionId,o}catch(i){throw this.logger.error("[AcpClient] Fork Session Error:",i),i}}};var oM={claude:{id:"claude-code-acp",displayName:"Claude Code",apiKey:"",command:"claude-agent-acp",args:[],env:[]},codex:{id:"codex-acp",displayName:"Codex",apiKey:"",command:"codex-acp",args:[],env:[]},gemini:{id:"gemini-cli",displayName:"Gemini CLI",apiKey:"",command:"gemini",args:["--experimental-acp"],env:[]},customAgents:[],defaultAgentId:"claude-code-acp",autoAllowPermissions:!1,autoMentionActiveNote:!0,enableSystemNotifications:!0,debugMode:!1,nodePath:"",exportSettings:{defaultFolder:"Agent Client",filenameTemplate:"agent_client_{date}_{time}",autoExportOnNewChat:!1,autoExportOnCloseChat:!1,openFileAfterExport:!0,includeImages:!0,imageLocation:"obsidian",imageCustomFolder:"Agent Client",frontmatterTag:"agent-client"},windowsWslMode:!1,windowsWslDistribution:void 0,sendMessageShortcut:"enter",chatViewLocation:"right-tab",displaySettings:{autoCollapseDiffs:!1,diffCollapseThreshold:10,maxNoteLength:1e4,maxSelectionLength:1e4,showEmojis:!0,fontSize:null},savedSessions:[],lastUsedModels:{},lastUsedModes:{},enableFloatingChat:!1,floatingButtonImage:"",floatingWindowSize:{width:400,height:500},floatingWindowPosition:null,floatingButtonPosition:null},Oc=class extends Bt.Plugin{constructor(){super(...arguments);this.viewRegistry=new Sf;this._acpClients=new Map;this.floatingButton=null;this.floatingChatCounter=0}async onload(){await this.loadSettings(),GT(this.settings),this.settingsService=Vk(this.settings,this),this.registerView(So,r=>new pf(r,this)),this.addRibbonIcon("bot-message-square","Open agent client",r=>{this.activateView()}).addClass("agent-client-ribbon-icon"),this.addCommand({id:"open-chat-view",name:"Open chat view",callback:()=>{this.activateView()}}),this.addCommand({id:"focus-next-chat-view",name:"Focus next chat view",callback:()=>{this.focusChatView("next")}}),this.addCommand({id:"focus-previous-chat-view",name:"Focus previous chat view",callback:()=>{this.focusChatView("previous")}}),this.addCommand({id:"open-new-chat-view",name:"Open new chat view",callback:()=>{this.openNewChatViewWithAgent(this.settings.defaultAgentId)}}),this.registerAgentCommands(),this.registerPermissionCommands(),this.registerBroadcastCommands(),this.addCommand({id:"open-floating-chat-view",name:"Open floating chat view",checkCallback:r=>{if(!this.settings.enableFloatingChat)return!1;if(r)return!0;let i=this.getFloatingChatInstances();if(i.length===0)this.openNewFloatingChat(!0);else if(i.length===1)this.expandFloatingChat(i[0]);else{let o=this.viewRegistry.getFocused();o&&o.viewType==="floating"?o.expand():this.expandFloatingChat(i[i.length-1])}}}),this.addCommand({id:"open-new-floating-chat-view",name:"Open new floating chat view",checkCallback:r=>{if(!this.settings.enableFloatingChat)return!1;if(r)return!0;this.openNewFloatingChat(!0)}}),this.addCommand({id:"minimize-floating-chat-view",name:"Minimize floating chat view",checkCallback:r=>{if(!this.settings.enableFloatingChat)return!1;let i=this.viewRegistry.getFocused();if(!(i&&i.viewType==="floating"))return!1;if(r)return!0;i.collapse()}}),this.addCommand({id:"close-floating-chat-view",name:"Close floating chat view",checkCallback:r=>{if(!this.settings.enableFloatingChat)return!1;let i=this.viewRegistry.getFocused();if(!(i&&i.viewType==="floating"))return!1;if(r)return!0;this.closeFloatingChat(i.viewId)}}),this.addSettingTab(new xf(this.app,this)),this.floatingButton=new yf(this),this.floatingButton.mount(),this.settings.enableFloatingChat&&this.openNewFloatingChat(),this.registerEvent(this.app.workspace.on("quit",()=>{for(let[r,i]of this._acpClients)i.disconnect().catch(o=>{console.warn(`[AgentClient] Quit cleanup error for view ${r}:`,o)});this._acpClients.clear()}))}onunload(){var n;(n=this.floatingButton)==null||n.unmount(),this.floatingButton=null;for(let r of this.viewRegistry.getByType("floating"))r instanceof ja&&r.unmount();this.viewRegistry.clear();for(let[,r]of this._acpClients)r.disconnect().catch(()=>{});this._acpClients.clear()}getOrCreateAcpClient(n){let r=this._acpClients.get(n);return r||(r=new $p(this),this._acpClients.set(n,r)),r}async removeAcpClient(n){let r=this._acpClients.get(n);if(r){try{await r.disconnect()}catch(i){console.warn(`[AgentClient] Failed to disconnect client for view ${n}:`,i)}this._acpClients.delete(n)}}get lastActiveChatViewId(){return this.viewRegistry.getFocusedId()}setLastActiveChatViewId(n){n&&this.viewRegistry.setFocused(n)}async activateView(){let{workspace:n}=this.app,r=null,i=n.getLeavesOfType(So);if(i.length>0){let o=this.lastActiveChatViewId;o?r=i.find(a=>{var s;return((s=a.view)==null?void 0:s.viewId)===o})||i[0]:r=i[0]}else r=this.createNewChatLeaf(!1),r&&await r.setViewState({type:So,active:!0});r&&(await n.revealLeaf(r),this.focusTextarea(r))}focusTextarea(n){var i;let r=(i=n.view)==null?void 0:i.containerEl;r&&window.setTimeout(()=>{let o=r.querySelector("textarea.agent-client-chat-input-textarea");o instanceof HTMLTextAreaElement&&o.focus()},50)}focusChatView(n){n==="next"?this.viewRegistry.focusNext():this.viewRegistry.focusPrevious()}createNewChatLeaf(n){let{workspace:r}=this.app;switch(this.settings.chatViewLocation){case"right-tab":return n?this.createSidebarTab("right"):r.getRightLeaf(!1);case"right-split":return r.getRightLeaf(n);case"editor-tab":return r.getLeaf("tab");case"editor-split":return r.getLeaf("split");default:return r.getRightLeaf(!1)}}createSidebarTab(n){let{workspace:r}=this.app,i=n==="right"?r.rightSplit:r.leftSplit,a=r.getLeavesOfType(So).find(s=>s.getRoot()===i);if(a){let s=a.parent;return r.createLeafInParent(s,Number.MAX_SAFE_INTEGER)}return n==="right"?r.getRightLeaf(!1):r.getLeftLeaf(!1)}async openNewChatViewWithAgent(n){var o;let r=this.createNewChatLeaf(!0);if(!r){console.warn("[AgentClient] Failed to create new leaf");return}await r.setViewState({type:So,active:!0,state:{initialAgentId:n}}),await this.app.workspace.revealLeaf(r);let i=(o=r.view)==null?void 0:o.containerEl;i&&window.setTimeout(()=>{let a=i.querySelector("textarea.agent-client-chat-input-textarea");a instanceof HTMLTextAreaElement&&a.focus()},0)}openNewFloatingChat(n=!1,r){let i=String(this.floatingChatCounter++);Uk(this,i,n,r)}closeFloatingChat(n){let r=this.viewRegistry.get(n);r&&r instanceof ja&&r.unmount()}getFloatingChatInstances(){return this.viewRegistry.getByType("floating").map(n=>n.viewId)}expandFloatingChat(n){let r=this.viewRegistry.get(n);r&&r.expand()}getAvailableAgents(){return[{id:this.settings.claude.id,displayName:this.settings.claude.displayName||this.settings.claude.id},{id:this.settings.codex.id,displayName:this.settings.codex.displayName||this.settings.codex.id},{id:this.settings.gemini.id,displayName:this.settings.gemini.displayName||this.settings.gemini.id},...this.settings.customAgents.map(n=>({id:n.id,displayName:n.displayName||n.id}))]}registerAgentCommands(){let n=this.getAvailableAgents();for(let r of n)this.addCommand({id:`switch-agent-to-${r.id}`,name:`Switch agent to ${r.displayName}`,callback:()=>{this.app.workspace.trigger("agent-client:new-chat-requested",this.lastActiveChatViewId,r.id)}})}registerPermissionCommands(){this.addCommand({id:"approve-active-permission",name:"Approve active permission",callback:()=>{this.app.workspace.trigger("agent-client:approve-active-permission",this.lastActiveChatViewId)}}),this.addCommand({id:"reject-active-permission",name:"Reject active permission",callback:()=>{this.app.workspace.trigger("agent-client:reject-active-permission",this.lastActiveChatViewId)}}),this.addCommand({id:"toggle-auto-mention",name:"Toggle auto-mention",callback:()=>{this.app.workspace.trigger("agent-client:toggle-auto-mention",this.lastActiveChatViewId)}}),this.addCommand({id:"new-chat",name:"New chat",callback:()=>{this.app.workspace.trigger("agent-client:new-chat-requested",this.lastActiveChatViewId)}}),this.addCommand({id:"cancel-current-message",name:"Cancel current message",callback:()=>{this.app.workspace.trigger("agent-client:cancel-message",this.lastActiveChatViewId)}}),this.addCommand({id:"export-chat",name:"Export chat",callback:()=>{this.app.workspace.trigger("agent-client:export-chat",this.lastActiveChatViewId)}})}registerBroadcastCommands(){this.addCommand({id:"broadcast-prompt",name:"Broadcast prompt",callback:()=>{this.broadcastPrompt()}}),this.addCommand({id:"broadcast-send",name:"Broadcast send",callback:()=>{this.broadcastSend()}}),this.addCommand({id:"broadcast-cancel",name:"Broadcast cancel",callback:()=>{this.broadcastCancel()}})}broadcastPrompt(){let n=this.viewRegistry.getAll();if(n.length===0){new Bt.Notice("[Agent Client] No chat views open");return}let r=this.viewRegistry.toFocused(a=>a.getInputState());if(!r||r.text.trim()===""&&r.files.length===0){new Bt.Notice("[Agent Client] No prompt to broadcast");return}let i=this.viewRegistry.getFocusedId(),o=n.filter(a=>a.viewId!==i);if(o.length===0){new Bt.Notice("[Agent Client] No other chat views to broadcast to");return}for(let a of o)a.setInputState(r)}async broadcastSend(){let n=this.viewRegistry.getAll();if(n.length===0){new Bt.Notice("[Agent Client] No chat views open");return}let r=n.filter(i=>i.canSend());if(r.length===0){new Bt.Notice("[Agent Client] No views ready to send");return}await Promise.allSettled(r.map(i=>i.sendMessage()))}async broadcastCancel(){let n=this.viewRegistry.getAll();if(n.length===0){new Bt.Notice("[Agent Client] No chat views open");return}await Promise.allSettled(n.map(r=>r.cancelOperation())),new Bt.Notice("[Agent Client] Cancel broadcast to all views")}async loadSettings(){var p,h,y,x,S,g;let n=(p=await this.loadData())!=null?p:{},r=oM,i=(h=di(n.claude))!=null?h:{},o=(y=di(n.codex))!=null?y:{},a=(x=di(n.gemini))!=null?x:{},s=(S=di(n.exportSettings))!=null?S:{},c=(g=di(n.displaySettings))!=null?g:{},d=Array.isArray(n.customAgents)?hI(n.customAgents.map(b=>{var v;return gI((v=di(b))!=null?v:{})})):[],m=[r.claude.id,r.codex.id,r.gemini.id,...d.map(b=>b.id)],l=tt(n.defaultAgentId,"")||tt(n.activeAgentId,""),f=l&&m.includes(l)?l:m[0]||r.claude.id;this.settings={claude:{id:r.claude.id,displayName:tt(i.displayName,r.claude.displayName),apiKey:tt(i.apiKey,r.claude.apiKey),command:tt(i.command,"")||tt(n.claudeCodeAcpCommandPath,"")||r.claude.command,args:Oa(i.args),env:ho(i.env)},codex:{id:r.codex.id,displayName:tt(o.displayName,r.codex.displayName),apiKey:tt(o.apiKey,r.codex.apiKey),command:tt(o.command,"")||r.codex.command,args:Oa(o.args),env:ho(o.env)},gemini:{id:r.gemini.id,displayName:tt(a.displayName,r.gemini.displayName),apiKey:tt(a.apiKey,r.gemini.apiKey),command:tt(a.command,"")||tt(n.geminiCommandPath,"")||r.gemini.command,args:Oa(a.args).length>0?Oa(a.args):r.gemini.args,env:ho(a.env)},customAgents:d,defaultAgentId:f,autoAllowPermissions:en(n.autoAllowPermissions,r.autoAllowPermissions),autoMentionActiveNote:en(n.autoMentionActiveNote,r.autoMentionActiveNote),enableSystemNotifications:en(n.enableSystemNotifications,r.enableSystemNotifications),debugMode:en(n.debugMode,r.debugMode),nodePath:tt(n.nodePath,r.nodePath),exportSettings:{defaultFolder:tt(s.defaultFolder,r.exportSettings.defaultFolder),filenameTemplate:tt(s.filenameTemplate,r.exportSettings.filenameTemplate),autoExportOnNewChat:en(s.autoExportOnNewChat,r.exportSettings.autoExportOnNewChat),autoExportOnCloseChat:en(s.autoExportOnCloseChat,r.exportSettings.autoExportOnCloseChat),openFileAfterExport:en(s.openFileAfterExport,r.exportSettings.openFileAfterExport),includeImages:en(s.includeImages,r.exportSettings.includeImages),imageLocation:Fd(s.imageLocation,["obsidian","custom","base64"],r.exportSettings.imageLocation),imageCustomFolder:tt(s.imageCustomFolder,r.exportSettings.imageCustomFolder),frontmatterTag:tt(s.frontmatterTag,r.exportSettings.frontmatterTag)},windowsWslMode:en(n.windowsWslMode,r.windowsWslMode),windowsWslDistribution:tt(n.windowsWslDistribution,r.windowsWslDistribution),sendMessageShortcut:Fd(n.sendMessageShortcut,["enter","cmd-enter"],r.sendMessageShortcut),chatViewLocation:Fd(n.chatViewLocation,["right-tab","right-split","editor-tab","editor-split"],r.chatViewLocation),displaySettings:{autoCollapseDiffs:en(c.autoCollapseDiffs,r.displaySettings.autoCollapseDiffs),diffCollapseThreshold:Vd(c.diffCollapseThreshold,r.displaySettings.diffCollapseThreshold,1),maxNoteLength:Vd(c.maxNoteLength,r.displaySettings.maxNoteLength,1),maxSelectionLength:Vd(c.maxSelectionLength,r.displaySettings.maxSelectionLength,1),showEmojis:en(c.showEmojis,r.displaySettings.showEmojis),fontSize:jl(c.fontSize)},savedSessions:Array.isArray(n.savedSessions)?n.savedSessions:r.savedSessions,lastUsedModels:qv(n.lastUsedModels),lastUsedModes:qv(n.lastUsedModes),enableFloatingChat:en(n.enableFloatingChat,en(n.showFloatingButton,r.enableFloatingChat)),floatingButtonImage:tt(n.floatingButtonImage,r.floatingButtonImage),floatingWindowSize:(()=>{let b=di(n.floatingWindowSize);return b&&typeof b.width=="number"&&typeof b.height=="number"?{width:b.width,height:b.height}:r.floatingWindowSize})(),floatingWindowPosition:Vv(n.floatingWindowPosition),floatingButtonPosition:Vv(n.floatingButtonPosition)},this.ensureDefaultAgentId()}async saveSettings(){await this.saveData(this.settings)}async saveSettingsAndNotify(n){await this.settingsService.updateSettings(n)}async fetchLatestStable(){let r=(await(0,Bt.requestUrl)({url:"https://api.github.com/repos/RAIT-09/obsidian-agent-client/releases/latest"})).json;return r.tag_name?bi.clean(r.tag_name):null}async fetchLatestPrerelease(){let i=(await(0,Bt.requestUrl)({url:"https://api.github.com/repos/RAIT-09/obsidian-agent-client/releases"})).json.find(o=>o.prerelease);return i?bi.clean(i.tag_name):null}async checkForUpdates(){let n=bi.clean(this.manifest.version)||this.manifest.version;if(bi.prerelease(n)!==null){let[i,o]=await Promise.all([this.fetchLatestStable(),this.fetchLatestPrerelease()]),a=i&&bi.gt(i,n),s=o&&bi.gt(o,n);if(a||s){let c=a?i:o;return new Bt.Notice(`[Agent Client] Update available: v${c}`),!0}}else{let i=await this.fetchLatestStable();if(i&&bi.gt(i,n))return new Bt.Notice(`[Agent Client] Update available: v${i}`),!0}return!1}ensureDefaultAgentId(){let n=this.collectAvailableAgentIds();if(n.length===0){this.settings.defaultAgentId=oM.claude.id;return}n.includes(this.settings.defaultAgentId)||(this.settings.defaultAgentId=n[0])}collectAvailableAgentIds(){let n=new Set;n.add(this.settings.claude.id),n.add(this.settings.codex.id),n.add(this.settings.gemini.id);for(let r of this.settings.customAgents)r.id&&r.id.length>0&&n.add(r.id);return Array.from(n)}};
|
|
/*! Bundled license information:
|
|
|
|
react/cjs/react.production.js:
|
|
(**
|
|
* @license React
|
|
* react.production.js
|
|
*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*)
|
|
|
|
scheduler/cjs/scheduler.production.js:
|
|
(**
|
|
* @license React
|
|
* scheduler.production.js
|
|
*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*)
|
|
|
|
react-dom/cjs/react-dom.production.js:
|
|
(**
|
|
* @license React
|
|
* react-dom.production.js
|
|
*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*)
|
|
|
|
react-dom/cjs/react-dom-client.production.js:
|
|
(**
|
|
* @license React
|
|
* react-dom-client.production.js
|
|
*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*)
|
|
|
|
react/cjs/react-jsx-runtime.production.js:
|
|
(**
|
|
* @license React
|
|
* react-jsx-runtime.production.js
|
|
*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*)
|
|
*/
|