@knapsack/types 4.92.9--canary.7602.a182bd5.0 → 4.92.9--canary.7562.fc3fcd2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,85 +1,85 @@
1
- 'use strict';var zod=require('zod');var Nh=Object.create;var Ln=Object.defineProperty;var Ph=Object.getOwnPropertyDescriptor;var Rh=Object.getOwnPropertyNames;var jh=Object.getPrototypeOf,Fh=Object.prototype.hasOwnProperty;var i=(e,t)=>Ln(e,"name",{value:t,configurable:true});var ya=(e,t)=>()=>(e&&(t=e(e=0)),t);var an=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),wa=(e,t)=>{for(var n in t)Ln(e,n,{get:t[n],enumerable:true});},Dh=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Rh(t))!Fh.call(e,o)&&o!==n&&Ln(e,o,{get:()=>t[o],enumerable:!(r=Ph(t,o))||r.enumerable});return e};var Lh=(e,t,n)=>(n=e!=null?Nh(jh(e)):{},Dh(Ln(n,"default",{value:e,enumerable:true}),e));function Nn(e,t,n){let r=t-n;r=r<0?-r<<1|1:r<<1;do{let o=r&31;r>>>=5,r>0&&(o|=32),e.write(vf[o]);}while(r>0);return t}function xf(e){let t=new zy,n=0,r=0,o=0,s=0;for(let a=0;a<e.length;a++){let l=e[a];if(a>0&&t.write(qy),l.length===0)continue;let c=0;for(let u=0;u<l.length;u++){let f=l[u];u>0&&t.write(By),c=Nn(t,f[0],c),f.length!==1&&(n=Nn(t,f[1],n),r=Nn(t,f[2],r),o=Nn(t,f[3],o),f.length!==4&&(s=Nn(t,f[4],s)));}}return t.flush()}var By,qy,Tf,vf,Uy,Sf,Ef,zy,kf=ya(()=>{By=44,qy=59,Tf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",vf=new Uint8Array(64),Uy=new Uint8Array(128);for(let e=0;e<Tf.length;e++){let t=Tf.charCodeAt(e);vf[e]=t,Uy[t]=e;}i(Nn,"encodeInteger");Sf=1024*16,Ef=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(e){return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}}:{decode(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}},zy=class{static{i(this,"StringWriter");}constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(Sf);}write(e){let{buffer:t}=this;t[this.pos++]=e,this.pos===Sf&&(this.out+=Ef.decode(t),this.pos=0);}flush(){let{buffer:e,out:t,pos:n}=this;return n>0?t+Ef.decode(e.subarray(0,n)):t}};i(xf,"encode");});var Of={};wa(Of,{Bundle:()=>Ni,SourceMap:()=>Rn,default:()=>jn});function Wy(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?e=>globalThis.btoa(unescape(encodeURIComponent(e))):typeof Buffer=="function"?e=>Buffer.from(e,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}function Ky(e){let t=e.split(`
2
- `),n=t.filter(s=>/^\t+/.test(s)),r=t.filter(s=>/^ {2,}/.test(s));if(n.length===0&&r.length===0)return null;if(n.length>=r.length)return " ";let o=r.reduce((s,a)=>{let l=/^ +/.exec(a)[0].length;return Math.min(l,s)},1/0);return new Array(o+1).join(" ")}function Mf(e,t){let n=e.split(/[/\\]/),r=t.split(/[/\\]/);for(n.pop();n[0]===r[0];)n.shift(),r.shift();if(n.length){let o=n.length;for(;o--;)n[o]="..";}return n.concat(r).join("/")}function Cf(e){return Hy.call(e)==="[object Object]"}function $i(e){let t=e.split(`
3
- `),n=[];for(let r=0,o=0;r<t.length;r++)n.push(o),o+=t[r].length+1;return i(function(o){let s=0,a=n.length;for(;s<a;){let u=s+a>>1;o<n[u]?a=u:s=u+1;}let l=s-1,c=o-n[l];return {line:l,column:c}},"locate")}var Xr,Zr,Vy,Rn,Hy,Gy,Qr,Pn,Xt,jn,_f,Ni,If=ya(()=>{kf();Xr=class e{static{i(this,"BitSet");}constructor(t){this.bits=t instanceof e?t.bits.slice():[];}add(t){this.bits[t>>5]|=1<<(t&31);}has(t){return !!(this.bits[t>>5]&1<<(t&31))}},Zr=class e{static{i(this,"Chunk");}constructor(t,n,r){this.start=t,this.end=n,this.original=r,this.intro="",this.outro="",this.content=r,this.storeName=false,this.edited=false,this.previous=null,this.next=null;}appendLeft(t){this.outro+=t;}appendRight(t){this.intro=this.intro+t;}clone(){let t=new e(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(t){return this.start<t&&t<this.end}eachNext(t){let n=this;for(;n;)t(n),n=n.next;}eachPrevious(t){let n=this;for(;n;)t(n),n=n.previous;}edit(t,n,r){return this.content=t,r||(this.intro="",this.outro=""),this.storeName=n,this.edited=true,this}prependLeft(t){this.outro=t+this.outro;}prependRight(t){this.intro=t+this.intro;}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=false,this.edited=false);}split(t){let n=t-this.start,r=this.original.slice(0,n),o=this.original.slice(n);this.original=r;let s=new e(t,this.end,o);return s.outro=this.outro,this.outro="",this.end=t,this.edited?(s.edit("",false),this.content=""):this.content=r,s.next=this.next,s.next&&(s.next.previous=s),s.previous=this,this.next=s,s}toString(){return this.intro+this.content+this.outro}trimEnd(t){if(this.outro=this.outro.replace(t,""),this.outro.length)return true;let n=this.content.replace(t,"");if(n.length)return n!==this.content&&(this.split(this.start+n.length).edit("",void 0,true),this.edited&&this.edit(n,this.storeName,true)),true;if(this.edit("",void 0,true),this.intro=this.intro.replace(t,""),this.intro.length)return true}trimStart(t){if(this.intro=this.intro.replace(t,""),this.intro.length)return true;let n=this.content.replace(t,"");if(n.length){if(n!==this.content){let r=this.split(this.end-n.length);this.edited&&r.edit(n,this.storeName,true),this.edit("",void 0,true);}return true}else if(this.edit("",void 0,true),this.outro=this.outro.replace(t,""),this.outro.length)return true}};i(Wy,"getBtoa");Vy=Wy(),Rn=class{static{i(this,"SourceMap");}constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=xf(t.mappings),typeof t.x_google_ignoreList<"u"&&(this.x_google_ignoreList=t.x_google_ignoreList),typeof t.debugId<"u"&&(this.debugId=t.debugId);}toString(){return JSON.stringify(this)}toUrl(){return "data:application/json;charset=utf-8;base64,"+Vy(this.toString())}};i(Ky,"guessIndent");i(Mf,"getRelativePath");Hy=Object.prototype.toString;i(Cf,"isObject");i($i,"getLocator");Gy=/\w/,Qr=class{static{i(this,"Mappings");}constructor(t){this.hires=t,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null;}addEdit(t,n,r,o){if(n.length){let s=n.length-1,a=n.indexOf(`
1
+ 'use strict';var zod=require('zod');var Eh=Object.create;var Ln=Object.defineProperty;var vh=Object.getOwnPropertyDescriptor;var xh=Object.getOwnPropertyNames;var kh=Object.getPrototypeOf,Mh=Object.prototype.hasOwnProperty;var i=(e,t)=>Ln(e,"name",{value:t,configurable:true});var fa=(e,t)=>()=>(e&&(t=e(e=0)),t);var on=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ha=(e,t)=>{for(var n in t)Ln(e,n,{get:t[n],enumerable:true});},Ch=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of xh(t))!Mh.call(e,o)&&o!==n&&Ln(e,o,{get:()=>t[o],enumerable:!(r=vh(t,o))||r.enumerable});return e};var _h=(e,t,n)=>(n=e!=null?Eh(kh(e)):{},Ch(Ln(n,"default",{value:e,enumerable:true}),e));function $n(e,t,n){let r=t-n;r=r<0?-r<<1|1:r<<1;do{let o=r&31;r>>>=5,r>0&&(o|=32),e.write(gf[o]);}while(r>0);return t}function yf(e){let t=new Ay,n=0,r=0,o=0,s=0;for(let a=0;a<e.length;a++){let l=e[a];if(a>0&&t.write(Oy),l.length===0)continue;let c=0;for(let u=0;u<l.length;u++){let f=l[u];u>0&&t.write(_y),c=$n(t,f[0],c),f.length!==1&&(n=$n(t,f[1],n),r=$n(t,f[2],r),o=$n(t,f[3],o),f.length!==4&&(s=$n(t,f[4],s)));}}return t.flush()}var _y,Oy,pf,gf,Iy,df,mf,Ay,wf=fa(()=>{_y=44,Oy=59,pf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gf=new Uint8Array(64),Iy=new Uint8Array(128);for(let e=0;e<pf.length;e++){let t=pf.charCodeAt(e);gf[e]=t,Iy[t]=e;}i($n,"encodeInteger");df=1024*16,mf=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(e){return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}}:{decode(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}},Ay=class{static{i(this,"StringWriter");}constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(df);}write(e){let{buffer:t}=this;t[this.pos++]=e,this.pos===df&&(this.out+=mf.decode(t),this.pos=0);}flush(){let{buffer:e,out:t,pos:n}=this;return n>0?t+mf.decode(e.subarray(0,n)):t}};i(yf,"encode");});var Ef={};ha(Ef,{Bundle:()=>Oi,SourceMap:()=>Pn,default:()=>Rn});function $y(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?e=>globalThis.btoa(unescape(encodeURIComponent(e))):typeof Buffer=="function"?e=>Buffer.from(e,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}function Py(e){let t=e.split(`
2
+ `),n=t.filter(s=>/^\t+/.test(s)),r=t.filter(s=>/^ {2,}/.test(s));if(n.length===0&&r.length===0)return null;if(n.length>=r.length)return " ";let o=r.reduce((s,a)=>{let l=/^ +/.exec(a)[0].length;return Math.min(l,s)},1/0);return new Array(o+1).join(" ")}function Tf(e,t){let n=e.split(/[/\\]/),r=t.split(/[/\\]/);for(n.pop();n[0]===r[0];)n.shift(),r.shift();if(n.length){let o=n.length;for(;o--;)n[o]="..";}return n.concat(r).join("/")}function Sf(e){return Ry.call(e)==="[object Object]"}function _i(e){let t=e.split(`
3
+ `),n=[];for(let r=0,o=0;r<t.length;r++)n.push(o),o+=t[r].length+1;return i(function(o){let s=0,a=n.length;for(;s<a;){let u=s+a>>1;o<n[u]?a=u:s=u+1;}let l=s-1,c=o-n[l];return {line:l,column:c}},"locate")}var Yr,Xr,Ny,Pn,Ry,jy,Zr,Nn,Jt,Rn,bf,Oi,vf=fa(()=>{wf();Yr=class e{static{i(this,"BitSet");}constructor(t){this.bits=t instanceof e?t.bits.slice():[];}add(t){this.bits[t>>5]|=1<<(t&31);}has(t){return !!(this.bits[t>>5]&1<<(t&31))}},Xr=class e{static{i(this,"Chunk");}constructor(t,n,r){this.start=t,this.end=n,this.original=r,this.intro="",this.outro="",this.content=r,this.storeName=false,this.edited=false,this.previous=null,this.next=null;}appendLeft(t){this.outro+=t;}appendRight(t){this.intro=this.intro+t;}clone(){let t=new e(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(t){return this.start<t&&t<this.end}eachNext(t){let n=this;for(;n;)t(n),n=n.next;}eachPrevious(t){let n=this;for(;n;)t(n),n=n.previous;}edit(t,n,r){return this.content=t,r||(this.intro="",this.outro=""),this.storeName=n,this.edited=true,this}prependLeft(t){this.outro=t+this.outro;}prependRight(t){this.intro=t+this.intro;}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=false,this.edited=false);}split(t){let n=t-this.start,r=this.original.slice(0,n),o=this.original.slice(n);this.original=r;let s=new e(t,this.end,o);return s.outro=this.outro,this.outro="",this.end=t,this.edited?(s.edit("",false),this.content=""):this.content=r,s.next=this.next,s.next&&(s.next.previous=s),s.previous=this,this.next=s,s}toString(){return this.intro+this.content+this.outro}trimEnd(t){if(this.outro=this.outro.replace(t,""),this.outro.length)return true;let n=this.content.replace(t,"");if(n.length)return n!==this.content&&(this.split(this.start+n.length).edit("",void 0,true),this.edited&&this.edit(n,this.storeName,true)),true;if(this.edit("",void 0,true),this.intro=this.intro.replace(t,""),this.intro.length)return true}trimStart(t){if(this.intro=this.intro.replace(t,""),this.intro.length)return true;let n=this.content.replace(t,"");if(n.length){if(n!==this.content){let r=this.split(this.end-n.length);this.edited&&r.edit(n,this.storeName,true),this.edit("",void 0,true);}return true}else if(this.edit("",void 0,true),this.outro=this.outro.replace(t,""),this.outro.length)return true}};i($y,"getBtoa");Ny=$y(),Pn=class{static{i(this,"SourceMap");}constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=yf(t.mappings),typeof t.x_google_ignoreList<"u"&&(this.x_google_ignoreList=t.x_google_ignoreList),typeof t.debugId<"u"&&(this.debugId=t.debugId);}toString(){return JSON.stringify(this)}toUrl(){return "data:application/json;charset=utf-8;base64,"+Ny(this.toString())}};i(Py,"guessIndent");i(Tf,"getRelativePath");Ry=Object.prototype.toString;i(Sf,"isObject");i(_i,"getLocator");jy=/\w/,Zr=class{static{i(this,"Mappings");}constructor(t){this.hires=t,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null;}addEdit(t,n,r,o){if(n.length){let s=n.length-1,a=n.indexOf(`
4
4
  `,0),l=-1;for(;a>=0&&s>a;){let u=[this.generatedCodeColumn,t,r.line,r.column];o>=0&&u.push(o),this.rawSegments.push(u),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,l=a,a=n.indexOf(`
5
5
  `,a+1);}let c=[this.generatedCodeColumn,t,r.line,r.column];o>=0&&c.push(o),this.rawSegments.push(c),this.advance(n.slice(l+1));}else this.pending&&(this.rawSegments.push(this.pending),this.advance(n));this.pending=null;}addUneditedChunk(t,n,r,o,s){let a=n.start,l=true,c=false;for(;a<n.end;){if(r[a]===`
6
- `)o.line+=1,o.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,l=true,c=false;else {if(this.hires||l||s.has(a)){let u=[this.generatedCodeColumn,t,o.line,o.column];this.hires==="boundary"?Gy.test(r[a])?c||(this.rawSegments.push(u),c=true):(this.rawSegments.push(u),c=false):this.rawSegments.push(u);}o.column+=1,this.generatedCodeColumn+=1,l=false;}a+=1;}this.pending=null;}advance(t){if(!t)return;let n=t.split(`
7
- `);if(n.length>1){for(let r=0;r<n.length-1;r++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0;}this.generatedCodeColumn+=n[n.length-1].length;}},Pn=`
8
- `,Xt={insertLeft:false,insertRight:false,storeName:false},jn=class e{static{i(this,"MagicString");}constructor(t,n={}){let r=new Zr(0,t.length,t);Object.defineProperties(this,{original:{writable:true,value:t},outro:{writable:true,value:""},intro:{writable:true,value:""},firstChunk:{writable:true,value:r},lastChunk:{writable:true,value:r},lastSearchedChunk:{writable:true,value:r},byStart:{writable:true,value:{}},byEnd:{writable:true,value:{}},filename:{writable:true,value:n.filename},indentExclusionRanges:{writable:true,value:n.indentExclusionRanges},sourcemapLocations:{writable:true,value:new Xr},storedNames:{writable:true,value:{}},indentStr:{writable:true,value:void 0},ignoreList:{writable:true,value:n.ignoreList},offset:{writable:true,value:n.offset||0}}),this.byStart[0]=r,this.byEnd[t.length]=r;}addSourcemapLocation(t){this.sourcemapLocations.add(t);}append(t){if(typeof t!="string")throw new TypeError("outro content must be a string");return this.outro+=t,this}appendLeft(t,n){if(t=t+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(t);let r=this.byEnd[t];return r?r.appendLeft(n):this.intro+=n,this}appendRight(t,n){if(t=t+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(t);let r=this.byStart[t];return r?r.appendRight(n):this.outro+=n,this}clone(){let t=new e(this.original,{filename:this.filename,offset:this.offset}),n=this.firstChunk,r=t.firstChunk=t.lastSearchedChunk=n.clone();for(;n;){t.byStart[r.start]=r,t.byEnd[r.end]=r;let o=n.next,s=o&&o.clone();s&&(r.next=s,s.previous=r,r=s),n=o;}return t.lastChunk=r,this.indentExclusionRanges&&(t.indentExclusionRanges=this.indentExclusionRanges.slice()),t.sourcemapLocations=new Xr(this.sourcemapLocations),t.intro=this.intro,t.outro=this.outro,t}generateDecodedMap(t){t=t||{};let n=0,r=Object.keys(this.storedNames),o=new Qr(t.hires),s=$i(this.original);return this.intro&&o.advance(this.intro),this.firstChunk.eachNext(a=>{let l=s(a.start);a.intro.length&&o.advance(a.intro),a.edited?o.addEdit(n,a.content,l,a.storeName?r.indexOf(a.original):-1):o.addUneditedChunk(n,a,this.original,l,this.sourcemapLocations),a.outro.length&&o.advance(a.outro);}),this.outro&&o.advance(this.outro),{file:t.file?t.file.split(/[/\\]/).pop():void 0,sources:[t.source?Mf(t.file||"",t.source):t.file||""],sourcesContent:t.includeContent?[this.original]:void 0,names:r,mappings:o.raw,x_google_ignoreList:this.ignoreList?[n]:void 0}}generateMap(t){return new Rn(this.generateDecodedMap(t))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=Ky(this.original));}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(t,n){let r=/^[^\r\n]/gm;if(Cf(t)&&(n=t,t=void 0),t===void 0&&(this._ensureindentStr(),t=this.indentStr||" "),t==="")return this;n=n||{};let o={};n.exclude&&(typeof n.exclude[0]=="number"?[n.exclude]:n.exclude).forEach(f=>{for(let h=f[0];h<f[1];h+=1)o[h]=true;});let s=n.indentStart!==false,a=i(u=>s?`${t}${u}`:(s=true,u),"replacer");this.intro=this.intro.replace(r,a);let l=0,c=this.firstChunk;for(;c;){let u=c.end;if(c.edited)o[l]||(c.content=c.content.replace(r,a),c.content.length&&(s=c.content[c.content.length-1]===`
6
+ `)o.line+=1,o.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,l=true,c=false;else {if(this.hires||l||s.has(a)){let u=[this.generatedCodeColumn,t,o.line,o.column];this.hires==="boundary"?jy.test(r[a])?c||(this.rawSegments.push(u),c=true):(this.rawSegments.push(u),c=false):this.rawSegments.push(u);}o.column+=1,this.generatedCodeColumn+=1,l=false;}a+=1;}this.pending=null;}advance(t){if(!t)return;let n=t.split(`
7
+ `);if(n.length>1){for(let r=0;r<n.length-1;r++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0;}this.generatedCodeColumn+=n[n.length-1].length;}},Nn=`
8
+ `,Jt={insertLeft:false,insertRight:false,storeName:false},Rn=class e{static{i(this,"MagicString");}constructor(t,n={}){let r=new Xr(0,t.length,t);Object.defineProperties(this,{original:{writable:true,value:t},outro:{writable:true,value:""},intro:{writable:true,value:""},firstChunk:{writable:true,value:r},lastChunk:{writable:true,value:r},lastSearchedChunk:{writable:true,value:r},byStart:{writable:true,value:{}},byEnd:{writable:true,value:{}},filename:{writable:true,value:n.filename},indentExclusionRanges:{writable:true,value:n.indentExclusionRanges},sourcemapLocations:{writable:true,value:new Yr},storedNames:{writable:true,value:{}},indentStr:{writable:true,value:void 0},ignoreList:{writable:true,value:n.ignoreList},offset:{writable:true,value:n.offset||0}}),this.byStart[0]=r,this.byEnd[t.length]=r;}addSourcemapLocation(t){this.sourcemapLocations.add(t);}append(t){if(typeof t!="string")throw new TypeError("outro content must be a string");return this.outro+=t,this}appendLeft(t,n){if(t=t+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(t);let r=this.byEnd[t];return r?r.appendLeft(n):this.intro+=n,this}appendRight(t,n){if(t=t+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(t);let r=this.byStart[t];return r?r.appendRight(n):this.outro+=n,this}clone(){let t=new e(this.original,{filename:this.filename,offset:this.offset}),n=this.firstChunk,r=t.firstChunk=t.lastSearchedChunk=n.clone();for(;n;){t.byStart[r.start]=r,t.byEnd[r.end]=r;let o=n.next,s=o&&o.clone();s&&(r.next=s,s.previous=r,r=s),n=o;}return t.lastChunk=r,this.indentExclusionRanges&&(t.indentExclusionRanges=this.indentExclusionRanges.slice()),t.sourcemapLocations=new Yr(this.sourcemapLocations),t.intro=this.intro,t.outro=this.outro,t}generateDecodedMap(t){t=t||{};let n=0,r=Object.keys(this.storedNames),o=new Zr(t.hires),s=_i(this.original);return this.intro&&o.advance(this.intro),this.firstChunk.eachNext(a=>{let l=s(a.start);a.intro.length&&o.advance(a.intro),a.edited?o.addEdit(n,a.content,l,a.storeName?r.indexOf(a.original):-1):o.addUneditedChunk(n,a,this.original,l,this.sourcemapLocations),a.outro.length&&o.advance(a.outro);}),this.outro&&o.advance(this.outro),{file:t.file?t.file.split(/[/\\]/).pop():void 0,sources:[t.source?Tf(t.file||"",t.source):t.file||""],sourcesContent:t.includeContent?[this.original]:void 0,names:r,mappings:o.raw,x_google_ignoreList:this.ignoreList?[n]:void 0}}generateMap(t){return new Pn(this.generateDecodedMap(t))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=Py(this.original));}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(t,n){let r=/^[^\r\n]/gm;if(Sf(t)&&(n=t,t=void 0),t===void 0&&(this._ensureindentStr(),t=this.indentStr||" "),t==="")return this;n=n||{};let o={};n.exclude&&(typeof n.exclude[0]=="number"?[n.exclude]:n.exclude).forEach(f=>{for(let h=f[0];h<f[1];h+=1)o[h]=true;});let s=n.indentStart!==false,a=i(u=>s?`${t}${u}`:(s=true,u),"replacer");this.intro=this.intro.replace(r,a);let l=0,c=this.firstChunk;for(;c;){let u=c.end;if(c.edited)o[l]||(c.content=c.content.replace(r,a),c.content.length&&(s=c.content[c.content.length-1]===`
9
9
  `));else for(l=c.start;l<u;){if(!o[l]){let f=this.original[l];f===`
10
- `?s=true:f!=="\r"&&s&&(s=false,l===c.start||(this._splitChunk(c,l),c=c.next),c.prependRight(t));}l+=1;}l=c.end,c=c.next;}return this.outro=this.outro.replace(r,a),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(t,n){return Xt.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),Xt.insertLeft=true),this.appendLeft(t,n)}insertRight(t,n){return Xt.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),Xt.insertRight=true),this.prependRight(t,n)}move(t,n,r){if(t=t+this.offset,n=n+this.offset,r=r+this.offset,r>=t&&r<=n)throw new Error("Cannot move a selection inside itself");this._split(t),this._split(n),this._split(r);let o=this.byStart[t],s=this.byEnd[n],a=o.previous,l=s.next,c=this.byStart[r];if(!c&&s===this.lastChunk)return this;let u=c?c.previous:this.lastChunk;return a&&(a.next=l),l&&(l.previous=a),u&&(u.next=o),c&&(c.previous=s),o.previous||(this.firstChunk=s.next),s.next||(this.lastChunk=o.previous,this.lastChunk.next=null),o.previous=u,s.next=c||null,u||(this.firstChunk=o),c||(this.lastChunk=s),this}overwrite(t,n,r,o){return o=o||{},this.update(t,n,r,{...o,overwrite:!o.contentOnly})}update(t,n,r,o){if(t=t+this.offset,n=n+this.offset,typeof r!="string")throw new TypeError("replacement content must be a string");if(this.original.length!==0){for(;t<0;)t+=this.original.length;for(;n<0;)n+=this.original.length;}if(n>this.original.length)throw new Error("end is out of bounds");if(t===n)throw new Error("Cannot overwrite a zero-length range \u2013 use appendLeft or prependRight instead");this._split(t),this._split(n),o===true&&(Xt.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),Xt.storeName=true),o={storeName:true});let s=o!==void 0?o.storeName:false,a=o!==void 0?o.overwrite:false;if(s){let u=this.original.slice(t,n);Object.defineProperty(this.storedNames,u,{writable:true,value:true,enumerable:true});}let l=this.byStart[t],c=this.byEnd[n];if(l){let u=l;for(;u!==c;){if(u.next!==this.byStart[u.end])throw new Error("Cannot overwrite across a split point");u=u.next,u.edit("",false);}l.edit(r,s,!a);}else {let u=new Zr(t,n,"").edit(r,s);c.next=u,u.previous=c;}return this}prepend(t){if(typeof t!="string")throw new TypeError("outro content must be a string");return this.intro=t+this.intro,this}prependLeft(t,n){if(t=t+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(t);let r=this.byEnd[t];return r?r.prependLeft(n):this.intro=n+this.intro,this}prependRight(t,n){if(t=t+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(t);let r=this.byStart[t];return r?r.prependRight(n):this.outro=n+this.outro,this}remove(t,n){if(t=t+this.offset,n=n+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;n<0;)n+=this.original.length;}if(t===n)return this;if(t<0||n>this.original.length)throw new Error("Character is out of bounds");if(t>n)throw new Error("end must be greater than start");this._split(t),this._split(n);let r=this.byStart[t];for(;r;)r.intro="",r.outro="",r.edit(""),r=n>r.end?this.byStart[r.end]:null;return this}reset(t,n){if(t=t+this.offset,n=n+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;n<0;)n+=this.original.length;}if(t===n)return this;if(t<0||n>this.original.length)throw new Error("Character is out of bounds");if(t>n)throw new Error("end must be greater than start");this._split(t),this._split(n);let r=this.byStart[t];for(;r;)r.reset(),r=n>r.end?this.byStart[r.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let t=this.lastChunk;do{if(t.outro.length)return t.outro[t.outro.length-1];if(t.content.length)return t.content[t.content.length-1];if(t.intro.length)return t.intro[t.intro.length-1]}while(t=t.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let t=this.outro.lastIndexOf(Pn);if(t!==-1)return this.outro.substr(t+1);let n=this.outro,r=this.lastChunk;do{if(r.outro.length>0){if(t=r.outro.lastIndexOf(Pn),t!==-1)return r.outro.substr(t+1)+n;n=r.outro+n;}if(r.content.length>0){if(t=r.content.lastIndexOf(Pn),t!==-1)return r.content.substr(t+1)+n;n=r.content+n;}if(r.intro.length>0){if(t=r.intro.lastIndexOf(Pn),t!==-1)return r.intro.substr(t+1)+n;n=r.intro+n;}}while(r=r.previous);return t=this.intro.lastIndexOf(Pn),t!==-1?this.intro.substr(t+1)+n:this.intro+n}slice(t=0,n=this.original.length-this.offset){if(t=t+this.offset,n=n+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;n<0;)n+=this.original.length;}let r="",o=this.firstChunk;for(;o&&(o.start>t||o.end<=t);){if(o.start<n&&o.end>=n)return r;o=o.next;}if(o&&o.edited&&o.start!==t)throw new Error(`Cannot use replaced character ${t} as slice start anchor.`);let s=o;for(;o;){o.intro&&(s!==o||o.start===t)&&(r+=o.intro);let a=o.start<n&&o.end>=n;if(a&&o.edited&&o.end!==n)throw new Error(`Cannot use replaced character ${n} as slice end anchor.`);let l=s===o?t-o.start:0,c=a?o.content.length+n-o.end:o.content.length;if(r+=o.content.slice(l,c),o.outro&&(!a||o.end===n)&&(r+=o.outro),a)break;o=o.next;}return r}snip(t,n){let r=this.clone();return r.remove(0,t),r.remove(n,r.original.length),r}_split(t){if(this.byStart[t]||this.byEnd[t])return;let n=this.lastSearchedChunk,r=n,o=t>n.end;for(;n;){if(n.contains(t))return this._splitChunk(n,t);if(n=o?this.byStart[n.end]:this.byEnd[n.start],n===r)return;r=n;}}_splitChunk(t,n){if(t.edited&&t.content.length){let o=$i(this.original)(n);throw new Error(`Cannot split a chunk that has already been edited (${o.line}:${o.column} \u2013 "${t.original}")`)}let r=t.split(n);return this.byEnd[n]=t,this.byStart[n]=r,this.byEnd[r.end]=r,t===this.lastChunk&&(this.lastChunk=r),this.lastSearchedChunk=t,true}toString(){let t=this.intro,n=this.firstChunk;for(;n;)t+=n.toString(),n=n.next;return t+this.outro}isEmpty(){let t=this.firstChunk;do if(t.intro.length&&t.intro.trim()||t.content.length&&t.content.trim()||t.outro.length&&t.outro.trim())return false;while(t=t.next);return true}length(){let t=this.firstChunk,n=0;do n+=t.intro.length+t.content.length+t.outro.length;while(t=t.next);return n}trimLines(){return this.trim("[\\r\\n]")}trim(t){return this.trimStart(t).trimEnd(t)}trimEndAborted(t){let n=new RegExp((t||"\\s")+"+$");if(this.outro=this.outro.replace(n,""),this.outro.length)return true;let r=this.lastChunk;do{let o=r.end,s=r.trimEnd(n);if(r.end!==o&&(this.lastChunk===r&&(this.lastChunk=r.next),this.byEnd[r.end]=r,this.byStart[r.next.start]=r.next,this.byEnd[r.next.end]=r.next),s)return true;r=r.previous;}while(r);return false}trimEnd(t){return this.trimEndAborted(t),this}trimStartAborted(t){let n=new RegExp("^"+(t||"\\s")+"+");if(this.intro=this.intro.replace(n,""),this.intro.length)return true;let r=this.firstChunk;do{let o=r.end,s=r.trimStart(n);if(r.end!==o&&(r===this.lastChunk&&(this.lastChunk=r.next),this.byEnd[r.end]=r,this.byStart[r.next.start]=r.next,this.byEnd[r.next.end]=r.next),s)return true;r=r.next;}while(r);return false}trimStart(t){return this.trimStartAborted(t),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(t,n){function r(s,a){return typeof n=="string"?n.replace(/\$(\$|&|\d+)/g,(l,c)=>c==="$"?"$":c==="&"?s[0]:+c<s.length?s[+c]:`$${c}`):n(...s,s.index,a,s.groups)}i(r,"getReplacement");function o(s,a){let l,c=[];for(;l=s.exec(a);)c.push(l);return c}if(i(o,"matchAll"),t.global)o(t,this.original).forEach(a=>{if(a.index!=null){let l=r(a,this.original);l!==a[0]&&this.overwrite(a.index,a.index+a[0].length,l);}});else {let s=this.original.match(t);if(s&&s.index!=null){let a=r(s,this.original);a!==s[0]&&this.overwrite(s.index,s.index+s[0].length,a);}}return this}_replaceString(t,n){let{original:r}=this,o=r.indexOf(t);return o!==-1&&(typeof n=="function"&&(n=n(t,o,r)),t!==n&&this.overwrite(o,o+t.length,n)),this}replace(t,n){return typeof t=="string"?this._replaceString(t,n):this._replaceRegexp(t,n)}_replaceAllString(t,n){let{original:r}=this,o=t.length;for(let s=r.indexOf(t);s!==-1;s=r.indexOf(t,s+o)){let a=r.slice(s,s+o),l=n;typeof n=="function"&&(l=n(a,s,r)),a!==l&&this.overwrite(s,s+o,l);}return this}replaceAll(t,n){if(typeof t=="string")return this._replaceAllString(t,n);if(!t.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(t,n)}},_f=Object.prototype.hasOwnProperty,Ni=class e{static{i(this,"Bundle");}constructor(t={}){this.intro=t.intro||"",this.separator=t.separator!==void 0?t.separator:`
11
- `,this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename={};}addSource(t){if(t instanceof jn)return this.addSource({content:t,filename:t.filename,separator:this.separator});if(!Cf(t)||!t.content)throw new Error("bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`");if(["filename","ignoreList","indentExclusionRanges","separator"].forEach(n=>{_f.call(t,n)||(t[n]=t.content[n]);}),t.separator===void 0&&(t.separator=this.separator),t.filename)if(!_f.call(this.uniqueSourceIndexByFilename,t.filename))this.uniqueSourceIndexByFilename[t.filename]=this.uniqueSources.length,this.uniqueSources.push({filename:t.filename,content:t.content.original});else {let n=this.uniqueSources[this.uniqueSourceIndexByFilename[t.filename]];if(t.content.original!==n.content)throw new Error(`Illegal source: same filename (${t.filename}), different contents`)}return this.sources.push(t),this}append(t,n){return this.addSource({content:new jn(t),separator:n&&n.separator||""}),this}clone(){let t=new e({intro:this.intro,separator:this.separator});return this.sources.forEach(n=>{t.addSource({filename:n.filename,content:n.content.clone(),separator:n.separator});}),t}generateDecodedMap(t={}){let n=[],r;this.sources.forEach(s=>{Object.keys(s.content.storedNames).forEach(a=>{~n.indexOf(a)||n.push(a);});});let o=new Qr(t.hires);return this.intro&&o.advance(this.intro),this.sources.forEach((s,a)=>{a>0&&o.advance(this.separator);let l=s.filename?this.uniqueSourceIndexByFilename[s.filename]:-1,c=s.content,u=$i(c.original);c.intro&&o.advance(c.intro),c.firstChunk.eachNext(f=>{let h=u(f.start);f.intro.length&&o.advance(f.intro),s.filename?f.edited?o.addEdit(l,f.content,h,f.storeName?n.indexOf(f.original):-1):o.addUneditedChunk(l,f,c.original,h,c.sourcemapLocations):o.advance(f.content),f.outro.length&&o.advance(f.outro);}),c.outro&&o.advance(c.outro),s.ignoreList&&l!==-1&&(r===void 0&&(r=[]),r.push(l));}),{file:t.file?t.file.split(/[/\\]/).pop():void 0,sources:this.uniqueSources.map(s=>t.file?Mf(t.file,s.filename):s.filename),sourcesContent:this.uniqueSources.map(s=>t.includeContent?s.content:null),names:n,mappings:o.raw,x_google_ignoreList:r}}generateMap(t){return new Rn(this.generateDecodedMap(t))}getIndentString(){let t={};return this.sources.forEach(n=>{let r=n.content._getRawIndentString();r!==null&&(t[r]||(t[r]=0),t[r]+=1);}),Object.keys(t).sort((n,r)=>t[n]-t[r])[0]||" "}indent(t){if(arguments.length||(t=this.getIndentString()),t==="")return this;let n=!this.intro||this.intro.slice(-1)===`
10
+ `?s=true:f!=="\r"&&s&&(s=false,l===c.start||(this._splitChunk(c,l),c=c.next),c.prependRight(t));}l+=1;}l=c.end,c=c.next;}return this.outro=this.outro.replace(r,a),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(t,n){return Jt.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),Jt.insertLeft=true),this.appendLeft(t,n)}insertRight(t,n){return Jt.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),Jt.insertRight=true),this.prependRight(t,n)}move(t,n,r){if(t=t+this.offset,n=n+this.offset,r=r+this.offset,r>=t&&r<=n)throw new Error("Cannot move a selection inside itself");this._split(t),this._split(n),this._split(r);let o=this.byStart[t],s=this.byEnd[n],a=o.previous,l=s.next,c=this.byStart[r];if(!c&&s===this.lastChunk)return this;let u=c?c.previous:this.lastChunk;return a&&(a.next=l),l&&(l.previous=a),u&&(u.next=o),c&&(c.previous=s),o.previous||(this.firstChunk=s.next),s.next||(this.lastChunk=o.previous,this.lastChunk.next=null),o.previous=u,s.next=c||null,u||(this.firstChunk=o),c||(this.lastChunk=s),this}overwrite(t,n,r,o){return o=o||{},this.update(t,n,r,{...o,overwrite:!o.contentOnly})}update(t,n,r,o){if(t=t+this.offset,n=n+this.offset,typeof r!="string")throw new TypeError("replacement content must be a string");if(this.original.length!==0){for(;t<0;)t+=this.original.length;for(;n<0;)n+=this.original.length;}if(n>this.original.length)throw new Error("end is out of bounds");if(t===n)throw new Error("Cannot overwrite a zero-length range \u2013 use appendLeft or prependRight instead");this._split(t),this._split(n),o===true&&(Jt.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),Jt.storeName=true),o={storeName:true});let s=o!==void 0?o.storeName:false,a=o!==void 0?o.overwrite:false;if(s){let u=this.original.slice(t,n);Object.defineProperty(this.storedNames,u,{writable:true,value:true,enumerable:true});}let l=this.byStart[t],c=this.byEnd[n];if(l){let u=l;for(;u!==c;){if(u.next!==this.byStart[u.end])throw new Error("Cannot overwrite across a split point");u=u.next,u.edit("",false);}l.edit(r,s,!a);}else {let u=new Xr(t,n,"").edit(r,s);c.next=u,u.previous=c;}return this}prepend(t){if(typeof t!="string")throw new TypeError("outro content must be a string");return this.intro=t+this.intro,this}prependLeft(t,n){if(t=t+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(t);let r=this.byEnd[t];return r?r.prependLeft(n):this.intro=n+this.intro,this}prependRight(t,n){if(t=t+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(t);let r=this.byStart[t];return r?r.prependRight(n):this.outro=n+this.outro,this}remove(t,n){if(t=t+this.offset,n=n+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;n<0;)n+=this.original.length;}if(t===n)return this;if(t<0||n>this.original.length)throw new Error("Character is out of bounds");if(t>n)throw new Error("end must be greater than start");this._split(t),this._split(n);let r=this.byStart[t];for(;r;)r.intro="",r.outro="",r.edit(""),r=n>r.end?this.byStart[r.end]:null;return this}reset(t,n){if(t=t+this.offset,n=n+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;n<0;)n+=this.original.length;}if(t===n)return this;if(t<0||n>this.original.length)throw new Error("Character is out of bounds");if(t>n)throw new Error("end must be greater than start");this._split(t),this._split(n);let r=this.byStart[t];for(;r;)r.reset(),r=n>r.end?this.byStart[r.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let t=this.lastChunk;do{if(t.outro.length)return t.outro[t.outro.length-1];if(t.content.length)return t.content[t.content.length-1];if(t.intro.length)return t.intro[t.intro.length-1]}while(t=t.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let t=this.outro.lastIndexOf(Nn);if(t!==-1)return this.outro.substr(t+1);let n=this.outro,r=this.lastChunk;do{if(r.outro.length>0){if(t=r.outro.lastIndexOf(Nn),t!==-1)return r.outro.substr(t+1)+n;n=r.outro+n;}if(r.content.length>0){if(t=r.content.lastIndexOf(Nn),t!==-1)return r.content.substr(t+1)+n;n=r.content+n;}if(r.intro.length>0){if(t=r.intro.lastIndexOf(Nn),t!==-1)return r.intro.substr(t+1)+n;n=r.intro+n;}}while(r=r.previous);return t=this.intro.lastIndexOf(Nn),t!==-1?this.intro.substr(t+1)+n:this.intro+n}slice(t=0,n=this.original.length-this.offset){if(t=t+this.offset,n=n+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;n<0;)n+=this.original.length;}let r="",o=this.firstChunk;for(;o&&(o.start>t||o.end<=t);){if(o.start<n&&o.end>=n)return r;o=o.next;}if(o&&o.edited&&o.start!==t)throw new Error(`Cannot use replaced character ${t} as slice start anchor.`);let s=o;for(;o;){o.intro&&(s!==o||o.start===t)&&(r+=o.intro);let a=o.start<n&&o.end>=n;if(a&&o.edited&&o.end!==n)throw new Error(`Cannot use replaced character ${n} as slice end anchor.`);let l=s===o?t-o.start:0,c=a?o.content.length+n-o.end:o.content.length;if(r+=o.content.slice(l,c),o.outro&&(!a||o.end===n)&&(r+=o.outro),a)break;o=o.next;}return r}snip(t,n){let r=this.clone();return r.remove(0,t),r.remove(n,r.original.length),r}_split(t){if(this.byStart[t]||this.byEnd[t])return;let n=this.lastSearchedChunk,r=n,o=t>n.end;for(;n;){if(n.contains(t))return this._splitChunk(n,t);if(n=o?this.byStart[n.end]:this.byEnd[n.start],n===r)return;r=n;}}_splitChunk(t,n){if(t.edited&&t.content.length){let o=_i(this.original)(n);throw new Error(`Cannot split a chunk that has already been edited (${o.line}:${o.column} \u2013 "${t.original}")`)}let r=t.split(n);return this.byEnd[n]=t,this.byStart[n]=r,this.byEnd[r.end]=r,t===this.lastChunk&&(this.lastChunk=r),this.lastSearchedChunk=t,true}toString(){let t=this.intro,n=this.firstChunk;for(;n;)t+=n.toString(),n=n.next;return t+this.outro}isEmpty(){let t=this.firstChunk;do if(t.intro.length&&t.intro.trim()||t.content.length&&t.content.trim()||t.outro.length&&t.outro.trim())return false;while(t=t.next);return true}length(){let t=this.firstChunk,n=0;do n+=t.intro.length+t.content.length+t.outro.length;while(t=t.next);return n}trimLines(){return this.trim("[\\r\\n]")}trim(t){return this.trimStart(t).trimEnd(t)}trimEndAborted(t){let n=new RegExp((t||"\\s")+"+$");if(this.outro=this.outro.replace(n,""),this.outro.length)return true;let r=this.lastChunk;do{let o=r.end,s=r.trimEnd(n);if(r.end!==o&&(this.lastChunk===r&&(this.lastChunk=r.next),this.byEnd[r.end]=r,this.byStart[r.next.start]=r.next,this.byEnd[r.next.end]=r.next),s)return true;r=r.previous;}while(r);return false}trimEnd(t){return this.trimEndAborted(t),this}trimStartAborted(t){let n=new RegExp("^"+(t||"\\s")+"+");if(this.intro=this.intro.replace(n,""),this.intro.length)return true;let r=this.firstChunk;do{let o=r.end,s=r.trimStart(n);if(r.end!==o&&(r===this.lastChunk&&(this.lastChunk=r.next),this.byEnd[r.end]=r,this.byStart[r.next.start]=r.next,this.byEnd[r.next.end]=r.next),s)return true;r=r.next;}while(r);return false}trimStart(t){return this.trimStartAborted(t),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(t,n){function r(s,a){return typeof n=="string"?n.replace(/\$(\$|&|\d+)/g,(l,c)=>c==="$"?"$":c==="&"?s[0]:+c<s.length?s[+c]:`$${c}`):n(...s,s.index,a,s.groups)}i(r,"getReplacement");function o(s,a){let l,c=[];for(;l=s.exec(a);)c.push(l);return c}if(i(o,"matchAll"),t.global)o(t,this.original).forEach(a=>{if(a.index!=null){let l=r(a,this.original);l!==a[0]&&this.overwrite(a.index,a.index+a[0].length,l);}});else {let s=this.original.match(t);if(s&&s.index!=null){let a=r(s,this.original);a!==s[0]&&this.overwrite(s.index,s.index+s[0].length,a);}}return this}_replaceString(t,n){let{original:r}=this,o=r.indexOf(t);return o!==-1&&(typeof n=="function"&&(n=n(t,o,r)),t!==n&&this.overwrite(o,o+t.length,n)),this}replace(t,n){return typeof t=="string"?this._replaceString(t,n):this._replaceRegexp(t,n)}_replaceAllString(t,n){let{original:r}=this,o=t.length;for(let s=r.indexOf(t);s!==-1;s=r.indexOf(t,s+o)){let a=r.slice(s,s+o),l=n;typeof n=="function"&&(l=n(a,s,r)),a!==l&&this.overwrite(s,s+o,l);}return this}replaceAll(t,n){if(typeof t=="string")return this._replaceAllString(t,n);if(!t.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(t,n)}},bf=Object.prototype.hasOwnProperty,Oi=class e{static{i(this,"Bundle");}constructor(t={}){this.intro=t.intro||"",this.separator=t.separator!==void 0?t.separator:`
11
+ `,this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename={};}addSource(t){if(t instanceof Rn)return this.addSource({content:t,filename:t.filename,separator:this.separator});if(!Sf(t)||!t.content)throw new Error("bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`");if(["filename","ignoreList","indentExclusionRanges","separator"].forEach(n=>{bf.call(t,n)||(t[n]=t.content[n]);}),t.separator===void 0&&(t.separator=this.separator),t.filename)if(!bf.call(this.uniqueSourceIndexByFilename,t.filename))this.uniqueSourceIndexByFilename[t.filename]=this.uniqueSources.length,this.uniqueSources.push({filename:t.filename,content:t.content.original});else {let n=this.uniqueSources[this.uniqueSourceIndexByFilename[t.filename]];if(t.content.original!==n.content)throw new Error(`Illegal source: same filename (${t.filename}), different contents`)}return this.sources.push(t),this}append(t,n){return this.addSource({content:new Rn(t),separator:n&&n.separator||""}),this}clone(){let t=new e({intro:this.intro,separator:this.separator});return this.sources.forEach(n=>{t.addSource({filename:n.filename,content:n.content.clone(),separator:n.separator});}),t}generateDecodedMap(t={}){let n=[],r;this.sources.forEach(s=>{Object.keys(s.content.storedNames).forEach(a=>{~n.indexOf(a)||n.push(a);});});let o=new Zr(t.hires);return this.intro&&o.advance(this.intro),this.sources.forEach((s,a)=>{a>0&&o.advance(this.separator);let l=s.filename?this.uniqueSourceIndexByFilename[s.filename]:-1,c=s.content,u=_i(c.original);c.intro&&o.advance(c.intro),c.firstChunk.eachNext(f=>{let h=u(f.start);f.intro.length&&o.advance(f.intro),s.filename?f.edited?o.addEdit(l,f.content,h,f.storeName?n.indexOf(f.original):-1):o.addUneditedChunk(l,f,c.original,h,c.sourcemapLocations):o.advance(f.content),f.outro.length&&o.advance(f.outro);}),c.outro&&o.advance(c.outro),s.ignoreList&&l!==-1&&(r===void 0&&(r=[]),r.push(l));}),{file:t.file?t.file.split(/[/\\]/).pop():void 0,sources:this.uniqueSources.map(s=>t.file?Tf(t.file,s.filename):s.filename),sourcesContent:this.uniqueSources.map(s=>t.includeContent?s.content:null),names:n,mappings:o.raw,x_google_ignoreList:r}}generateMap(t){return new Pn(this.generateDecodedMap(t))}getIndentString(){let t={};return this.sources.forEach(n=>{let r=n.content._getRawIndentString();r!==null&&(t[r]||(t[r]=0),t[r]+=1);}),Object.keys(t).sort((n,r)=>t[n]-t[r])[0]||" "}indent(t){if(arguments.length||(t=this.getIndentString()),t==="")return this;let n=!this.intro||this.intro.slice(-1)===`
12
12
  `;return this.sources.forEach((r,o)=>{let s=r.separator!==void 0?r.separator:this.separator,a=n||o>0&&/\r?\n$/.test(s);r.content.indent(t,{exclude:r.indentExclusionRanges,indentStart:a}),n=r.content.lastChar()===`
13
- `;}),this.intro&&(this.intro=t+this.intro.replace(/^[^\n]/gm,(r,o)=>o>0?t+r:r)),this}prepend(t){return this.intro=t+this.intro,this}toString(){let t=this.sources.map((n,r)=>{let o=n.separator!==void 0?n.separator:this.separator;return (r>0?o:"")+n.content.toString()}).join("");return this.intro+t}isEmpty(){return !(this.intro.length&&this.intro.trim()||this.sources.some(t=>!t.content.isEmpty()))}length(){return this.sources.reduce((t,n)=>t+n.content.length(),this.intro.length)}trimLines(){return this.trim("[\\r\\n]")}trim(t){return this.trimStart(t).trimEnd(t)}trimStart(t){let n=new RegExp("^"+(t||"\\s")+"+");if(this.intro=this.intro.replace(n,""),!this.intro){let r,o=0;do if(r=this.sources[o++],!r)break;while(!r.content.trimStartAborted(t))}return this}trimEnd(t){let n=new RegExp((t||"\\s")+"+$"),r,o=this.sources.length-1;do if(r=this.sources[o--],!r){this.intro=this.intro.replace(n,"");break}while(!r.content.trimEndAborted(t));return this}};});var Sh=an(Th=>{Object.defineProperty(Th,"__esModule",{value:true});});var vh=an(Eh=>{Object.defineProperty(Eh,"__esModule",{value:true});});var kh=an(xh=>{Object.defineProperty(xh,"__esModule",{value:true});});var Mh=an(_h=>{Object.defineProperty(_h,"__esModule",{value:true});});var Ch=an(ue=>{var lb=ue&&ue.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:true,get:i(function(){return t[n]},"get")}),Object.defineProperty(e,r,o);}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n];})),io=ue&&ue.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&lb(t,e,n);};Object.defineProperty(ue,"__esModule",{value:true});ue.expectTypeOf=void 0;io(Sh(),ue);io(vh(),ue);io(kh(),ue);io(Mh(),ue);var pe=i(()=>true,"fn"),ub=i(e=>{let t=["parameters","returns","resolves","not","items","constructorParameters","thisParameter","instance","guards","asserts","branded"],n={toBeAny:pe,toBeUnknown:pe,toBeNever:pe,toBeFunction:pe,toBeObject:pe,toBeArray:pe,toBeString:pe,toBeNumber:pe,toBeBoolean:pe,toBeVoid:pe,toBeSymbol:pe,toBeNull:pe,toBeUndefined:pe,toBeNullable:pe,toBeBigInt:pe,toMatchTypeOf:pe,toEqualTypeOf:pe,toBeConstructibleWith:pe,toMatchObjectType:pe,toExtend:pe,map:ue.expectTypeOf,toBeCallableWith:ue.expectTypeOf,extract:ue.expectTypeOf,exclude:ue.expectTypeOf,pick:ue.expectTypeOf,omit:ue.expectTypeOf,toHaveProperty:ue.expectTypeOf,parameter:ue.expectTypeOf};return t.forEach(o=>Object.defineProperty(n,o,{get:i(()=>(0, ue.expectTypeOf)({}),"get")})),n},"expectTypeOf");ue.expectTypeOf=ub;});var ba={reset:[0,0],bold:[1,22,"\x1B[22m\x1B[1m"],dim:[2,22,"\x1B[22m\x1B[2m"],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]};function uo(e){return String(e)}i(uo,"i");uo.open="";uo.close="";function Bh(){let e=typeof process<"u"?process:void 0,t=e?.env||{},n=t.FORCE_TTY!=="false",r=e?.argv||[];return !("NO_COLOR"in t||r.includes("--no-color"))&&("FORCE_COLOR"in t||r.includes("--color")||e?.platform==="win32"||n&&t.TERM!=="dumb"||"CI"in t)||typeof window<"u"&&!!window.chrome}i(Bh,"B");function qh({force:e}={}){let t=e||Bh(),n=i((a,l,c,u)=>{let f="",h=0;do f+=a.substring(h,u)+c,h=u+l.length,u=a.indexOf(l,h);while(~u);return f+a.substring(h)},"a"),r=i((a,l,c=a)=>{let u=i(f=>{let h=String(f),p=h.indexOf(l,a.length);return ~p?a+n(h,l,c,p)+l:a+h+l},"n");return u.open=a,u.close=l,u},"l"),o={isColorSupported:t},s=i(a=>`\x1B[${a}m`,"f");for(let a in ba){let l=ba[a];o[a]=t?r(s(l[0]),s(l[1]),l[2]):uo;}return o}i(qh,"C");var Uh=qh();var se=Uh;function Na(e,t){return t.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(r){if(r!=="default"&&!(r in e)){var o=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,o.get?o:{enumerable:true,get:i(function(){return n[r]},"get")});}});}),Object.freeze(e)}i(Na,"_mergeNamespaces");function zh(e,t){let n=Object.keys(e),r=t===null?n:n.sort(t);if(Object.getOwnPropertySymbols)for(let o of Object.getOwnPropertySymbols(e))Object.getOwnPropertyDescriptor(e,o).enumerable&&r.push(o);return r}i(zh,"getKeysOfEnumerableProperties");function ln(e,t,n,r,o,s,a=": "){let l="",c=0,u=e.next();if(!u.done){l+=t.spacingOuter;let f=n+t.indent;for(;!u.done;){if(l+=f,c++===t.maxWidth){l+="\u2026";break}let h=s(u.value[0],t,f,r,o),p=s(u.value[1],t,f,r,o);l+=h+a+p,u=e.next(),u.done?t.min||(l+=","):l+=`,${t.spacingInner}`;}l+=t.spacingOuter+n;}return l}i(ln,"printIteratorEntries");function mo(e,t,n,r,o,s){let a="",l=0,c=e.next();if(!c.done){a+=t.spacingOuter;let u=n+t.indent;for(;!c.done;){if(a+=u,l++===t.maxWidth){a+="\u2026";break}a+=s(c.value,t,u,r,o),c=e.next(),c.done?t.min||(a+=","):a+=`,${t.spacingInner}`;}a+=t.spacingOuter+n;}return a}i(mo,"printIteratorValues");function zn(e,t,n,r,o,s){let a="";e=e instanceof ArrayBuffer?new DataView(e):e;let l=i(u=>u instanceof DataView,"isDataView"),c=l(e)?e.byteLength:e.length;if(c>0){a+=t.spacingOuter;let u=n+t.indent;for(let f=0;f<c;f++){if(a+=u,f===t.maxWidth){a+="\u2026";break}(l(e)||f in e)&&(a+=s(l(e)?e.getInt8(f):e[f],t,u,r,o)),f<c-1?a+=`,${t.spacingInner}`:t.min||(a+=",");}a+=t.spacingOuter+n;}return a}i(zn,"printListItems");function go(e,t,n,r,o,s){let a="",l=zh(e,t.compareKeys);if(l.length>0){a+=t.spacingOuter;let c=n+t.indent;for(let u=0;u<l.length;u++){let f=l[u],h=s(f,t,c,r,o),p=s(e[f],t,c,r,o);a+=`${c+h}: ${p}`,u<l.length-1?a+=`,${t.spacingInner}`:t.min||(a+=",");}a+=t.spacingOuter+n;}return a}i(go,"printObjectProperties");var Wh=typeof Symbol=="function"&&Symbol.for?Symbol.for("jest.asymmetricMatcher"):1267621,Bn=" ",Vh=i((e,t,n,r,o,s)=>{let a=e.toString();if(a==="ArrayContaining"||a==="ArrayNotContaining")return ++r>t.maxDepth?`[${a}]`:`${a+Bn}[${zn(e.sample,t,n,r,o,s)}]`;if(a==="ObjectContaining"||a==="ObjectNotContaining")return ++r>t.maxDepth?`[${a}]`:`${a+Bn}{${go(e.sample,t,n,r,o,s)}}`;if(a==="StringMatching"||a==="StringNotMatching"||a==="StringContaining"||a==="StringNotContaining")return a+Bn+s(e.sample,t,n,r,o);if(typeof e.toAsymmetricMatcher!="function")throw new TypeError(`Asymmetric matcher ${e.constructor.name} does not implement toAsymmetricMatcher()`);return e.toAsymmetricMatcher()},"serialize$5"),Kh=i(e=>e&&e.$$typeof===Wh,"test$5"),Hh={serialize:Vh,test:Kh},Gh=" ",Pa=new Set(["DOMStringMap","NamedNodeMap"]),Jh=/^(?:HTML\w*Collection|NodeList)$/;function Yh(e){return Pa.has(e)||Jh.test(e)}i(Yh,"testName");var Xh=i(e=>e&&e.constructor&&!!e.constructor.name&&Yh(e.constructor.name),"test$4");function Zh(e){return e.constructor.name==="NamedNodeMap"}i(Zh,"isNamedNodeMap");var Qh=i((e,t,n,r,o,s)=>{let a=e.constructor.name;return ++r>t.maxDepth?`[${a}]`:(t.min?"":a+Gh)+(Pa.has(a)?`{${go(Zh(e)?[...e].reduce((l,c)=>(l[c.name]=c.value,l),{}):{...e},t,n,r,o,s)}}`:`[${zn([...e],t,n,r,o,s)}]`)},"serialize$4"),ed={serialize:Qh,test:Xh};function Ra(e){return e.replaceAll("<","&lt;").replaceAll(">","&gt;")}i(Ra,"escapeHTML");function yo(e,t,n,r,o,s,a){let l=r+n.indent,c=n.colors;return e.map(u=>{let f=t[u];if(typeof f=="string"&&f[0]==="_"&&f.startsWith("__vitest_")&&f.match(/__vitest_\d+__/))return "";let h=a(f,n,l,o,s);return typeof f!="string"&&(h.includes(`
14
- `)&&(h=n.spacingOuter+l+h+n.spacingOuter+r),h=`{${h}}`),`${n.spacingInner+r+c.prop.open+u+c.prop.close}=${c.value.open}${h}${c.value.close}`}).join("")}i(yo,"printProps");function Vn(e,t,n,r,o,s){return e.map(a=>t.spacingOuter+n+(typeof a=="string"?ja(a,t):s(a,t,n,r,o))).join("")}i(Vn,"printChildren");function td(e,t,n,r,o,s){return t.printShadowRoot===false?"":[`${t.spacingOuter+n}#shadow-root`,Vn(e,t,n+t.indent,r,o,s)].join("")}i(td,"printShadowRoot");function ja(e,t){let n=t.colors.content;return n.open+Ra(e)+n.close}i(ja,"printText");function nd(e,t){let n=t.colors.comment;return `${n.open}<!--${Ra(e)}-->${n.close}`}i(nd,"printComment");function wo(e,t,n,r,o){let s=r.colors.tag;return `${s.open}<${e}${t&&s.close+t+r.spacingOuter+o+s.open}${n?`>${s.close}${n}${r.spacingOuter}${o}${s.open}</${e}`:`${t&&!r.min?"":" "}/`}>${s.close}`}i(wo,"printElement");function bo(e,t){let n=t.colors.tag;return `${n.open}<${e}${n.close} \u2026${n.open} />${n.close}`}i(bo,"printElementAsLeaf");var rd=1,To=3,Fa=8,Da=11,od=/^(?:(?:HTML|SVG)\w*)?Element$/;function sd(e){try{return typeof e.hasAttribute=="function"&&e.hasAttribute("is")}catch{return false}}i(sd,"testHasAttribute");function id(e){let t=e.constructor.name,{nodeType:n,tagName:r}=e,o=typeof r=="string"&&r.includes("-")||sd(e);return n===rd&&(od.test(t)||o)||n===To&&t==="Text"||n===Fa&&t==="Comment"||n===Da&&t==="DocumentFragment"}i(id,"testNode");var La=i(e=>e?.constructor?.name&&id(e),"test$3");function ad(e){return e.nodeType===To}i(ad,"nodeIsText");function cd(e){return e.nodeType===Fa}i(cd,"nodeIsComment");function qn(e){return e.nodeType===Da}i(qn,"nodeIsFragment");function Ta(e,t){let n=e.filter(r=>r.nodeType===To?(r.data||"").trim().length>0:true);return t&&(n=n.filter(t)),n}i(Ta,"filterChildren");function Ba(e,t,n,r,o,s,a){if(ad(e))return ja(e.data,t);if(cd(e))return nd(e.data,t);let l=qn(e)?"DocumentFragment":e.tagName.toLowerCase();if(++r>t.maxDepth)return bo(l,t);let c=Array.prototype.slice.call(e.childNodes||e.children),u=qn(e)||!e.shadowRoot?[]:Array.prototype.slice.call(e.shadowRoot.children),f=a?Ta(c,a):c,h=a?Ta(u,a):u;return wo(l,yo(qn(e)?[]:Array.from(e.attributes,p=>p.name).sort(),qn(e)?{}:[...e.attributes].reduce((p,d)=>(p[d.name]=d.value,p),{}),t,n+t.indent,r,o,s),(h.length>0?td(h,t,n+t.indent,r,o,s):"")+Vn(f,t,n+t.indent,r,o,s),t,n)}i(Ba,"serializeDOM");var ld=i((e,t,n,r,o,s)=>Ba(e,t,n,r,o,s),"serialize$3");function qa(e){return {test:La,serialize:i((t,n,r,o,s,a)=>Ba(t,n,r,o,s,a,e),"serialize")}}i(qa,"createDOMElementFilter");var ud={serialize:ld,test:La},fd="@@__IMMUTABLE_ITERABLE__@@",hd="@@__IMMUTABLE_LIST__@@",dd="@@__IMMUTABLE_KEYED__@@",pd="@@__IMMUTABLE_MAP__@@",Sa="@@__IMMUTABLE_ORDERED__@@",md="@@__IMMUTABLE_RECORD__@@",gd="@@__IMMUTABLE_SEQ__@@",yd="@@__IMMUTABLE_SET__@@",wd="@@__IMMUTABLE_STACK__@@",Dt=i(e=>`Immutable.${e}`,"getImmutableName"),Kn=i(e=>`[${e}]`,"printAsLeaf"),cn=" ",Ea="\u2026";function bd(e,t,n,r,o,s,a){return ++r>t.maxDepth?Kn(Dt(a)):`${Dt(a)+cn}{${ln(e.entries(),t,n,r,o,s)}}`}i(bd,"printImmutableEntries");function Td(e){let t=0;return {next(){if(t<e._keys.length){let n=e._keys[t++];return {done:false,value:[n,e.get(n)]}}return {done:true,value:void 0}}}}i(Td,"getRecordEntries");function Sd(e,t,n,r,o,s){let a=Dt(e._name||"Record");return ++r>t.maxDepth?Kn(a):`${a+cn}{${ln(Td(e),t,n,r,o,s)}}`}i(Sd,"printImmutableRecord");function Ed(e,t,n,r,o,s){let a=Dt("Seq");return ++r>t.maxDepth?Kn(a):e[dd]?`${a+cn}{${e._iter||e._object?ln(e.entries(),t,n,r,o,s):Ea}}`:`${a+cn}[${e._iter||e._array||e._collection||e._iterable?mo(e.values(),t,n,r,o,s):Ea}]`}i(Ed,"printImmutableSeq");function fo(e,t,n,r,o,s,a){return ++r>t.maxDepth?Kn(Dt(a)):`${Dt(a)+cn}[${mo(e.values(),t,n,r,o,s)}]`}i(fo,"printImmutableValues");var vd=i((e,t,n,r,o,s)=>e[pd]?bd(e,t,n,r,o,s,e[Sa]?"OrderedMap":"Map"):e[hd]?fo(e,t,n,r,o,s,"List"):e[yd]?fo(e,t,n,r,o,s,e[Sa]?"OrderedSet":"Set"):e[wd]?fo(e,t,n,r,o,s,"Stack"):e[gd]?Ed(e,t,n,r,o,s):Sd(e,t,n,r,o,s),"serialize$2"),xd=i(e=>e&&(e[fd]===true||e[md]===true),"test$2"),kd={serialize:vd,test:xd};function Ua(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}i(Ua,"getDefaultExportFromCjs");var ho={exports:{}},re={};var va;function _d(){if(va)return re;va=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),d=Symbol.for("react.client.reference");function g(m){if(typeof m=="object"&&m!==null){var b=m.$$typeof;switch(b){case e:switch(m=m.type,m){case n:case o:case r:case c:case u:case p:return m;default:switch(m=m&&m.$$typeof,m){case a:case l:case h:case f:return m;case s:return m;default:return b}}case t:return b}}}return i(g,"typeOf"),re.ContextConsumer=s,re.ContextProvider=a,re.Element=e,re.ForwardRef=l,re.Fragment=n,re.Lazy=h,re.Memo=f,re.Portal=t,re.Profiler=o,re.StrictMode=r,re.Suspense=c,re.SuspenseList=u,re.isContextConsumer=function(m){return g(m)===s},re.isContextProvider=function(m){return g(m)===a},re.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},re.isForwardRef=function(m){return g(m)===l},re.isFragment=function(m){return g(m)===n},re.isLazy=function(m){return g(m)===h},re.isMemo=function(m){return g(m)===f},re.isPortal=function(m){return g(m)===t},re.isProfiler=function(m){return g(m)===o},re.isStrictMode=function(m){return g(m)===r},re.isSuspense=function(m){return g(m)===c},re.isSuspenseList=function(m){return g(m)===u},re.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===o||m===r||m===c||m===u||typeof m=="object"&&m!==null&&(m.$$typeof===h||m.$$typeof===f||m.$$typeof===a||m.$$typeof===s||m.$$typeof===l||m.$$typeof===d||m.getModuleId!==void 0)},re.typeOf=g,re}i(_d,"requireReactIs_production");var xa;function Md(){return xa||(xa=1,ho.exports=_d()),ho.exports}i(Md,"requireReactIs$1");var za=Md(),Cd=Ua(za),Od=Na({__proto__:null,default:Cd},[za]),po={exports:{}},Q={};var ka;function Id(){if(ka)return Q;ka=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),g;g=Symbol.for("react.module.reference");function m(b){if(typeof b=="object"&&b!==null){var S=b.$$typeof;switch(S){case e:switch(b=b.type,b){case n:case o:case r:case u:case f:return b;default:switch(b=b&&b.$$typeof,b){case l:case a:case c:case p:case h:case s:return b;default:return S}}case t:return S}}}return i(m,"v"),Q.ContextConsumer=a,Q.ContextProvider=s,Q.Element=e,Q.ForwardRef=c,Q.Fragment=n,Q.Lazy=p,Q.Memo=h,Q.Portal=t,Q.Profiler=o,Q.StrictMode=r,Q.Suspense=u,Q.SuspenseList=f,Q.isAsyncMode=function(){return false},Q.isConcurrentMode=function(){return false},Q.isContextConsumer=function(b){return m(b)===a},Q.isContextProvider=function(b){return m(b)===s},Q.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},Q.isForwardRef=function(b){return m(b)===c},Q.isFragment=function(b){return m(b)===n},Q.isLazy=function(b){return m(b)===p},Q.isMemo=function(b){return m(b)===h},Q.isPortal=function(b){return m(b)===t},Q.isProfiler=function(b){return m(b)===o},Q.isStrictMode=function(b){return m(b)===r},Q.isSuspense=function(b){return m(b)===u},Q.isSuspenseList=function(b){return m(b)===f},Q.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===o||b===r||b===u||b===f||b===d||typeof b=="object"&&b!==null&&(b.$$typeof===p||b.$$typeof===h||b.$$typeof===s||b.$$typeof===a||b.$$typeof===c||b.$$typeof===g||b.getModuleId!==void 0)},Q.typeOf=m,Q}i(Id,"requireReactIs_production_min");var _a;function Ad(){return _a||(_a=1,po.exports=Id()),po.exports}i(Ad,"requireReactIs");var Wa=Ad(),$d=Ua(Wa),Nd=Na({__proto__:null,default:$d},[Wa]),Pd=["isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","isSuspenseList","isValidElementType"],xt=Object.fromEntries(Pd.map(e=>[e,t=>Nd[e](t)||Od[e](t)]));function Va(e,t=[]){if(Array.isArray(e))for(let n of e)Va(n,t);else e!=null&&e!==false&&e!==""&&t.push(e);return t}i(Va,"getChildren");function Ma(e){let t=e.type;if(typeof t=="string")return t;if(typeof t=="function")return t.displayName||t.name||"Unknown";if(xt.isFragment(e))return "React.Fragment";if(xt.isSuspense(e))return "React.Suspense";if(typeof t=="object"&&t!==null){if(xt.isContextProvider(e))return "Context.Provider";if(xt.isContextConsumer(e))return "Context.Consumer";if(xt.isForwardRef(e)){if(t.displayName)return t.displayName;let n=t.render.displayName||t.render.name||"";return n===""?"ForwardRef":`ForwardRef(${n})`}if(xt.isMemo(e)){let n=t.displayName||t.type.displayName||t.type.name||"";return n===""?"Memo":`Memo(${n})`}}return "UNDEFINED"}i(Ma,"getType");function Rd(e){let{props:t}=e;return Object.keys(t).filter(n=>n!=="children"&&t[n]!==void 0).sort()}i(Rd,"getPropKeys$1");var jd=i((e,t,n,r,o,s)=>++r>t.maxDepth?bo(Ma(e),t):wo(Ma(e),yo(Rd(e),e.props,t,n+t.indent,r,o,s),Vn(Va(e.props.children),t,n+t.indent,r,o,s),t,n),"serialize$1"),Fd=i(e=>e!=null&&xt.isElement(e),"test$1"),Dd={serialize:jd,test:Fd},Ld=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.test.json"):245830487;function Bd(e){let{props:t}=e;return t?Object.keys(t).filter(n=>t[n]!==void 0).sort():[]}i(Bd,"getPropKeys");var qd=i((e,t,n,r,o,s)=>++r>t.maxDepth?bo(e.type,t):wo(e.type,e.props?yo(Bd(e),e.props,t,n+t.indent,r,o,s):"",e.children?Vn(e.children,t,n+t.indent,r,o,s):"",t,n),"serialize"),Ud=i(e=>e&&e.$$typeof===Ld,"test"),zd={serialize:qd,test:Ud},Ka=Object.prototype.toString,Wd=Date.prototype.toISOString,Vd=Error.prototype.toString,Ca=RegExp.prototype.toString;function Un(e){return typeof e.constructor=="function"&&e.constructor.name||"Object"}i(Un,"getConstructorName");function Kd(e){return typeof window<"u"&&e===window}i(Kd,"isWindow");var Hd=/^Symbol\((.*)\)(.*)$/,Gd=/\n/g,Wn=class extends Error{static{i(this,"PrettyFormatPluginError");}constructor(t,n){super(t),this.stack=n,this.name=this.constructor.name;}};function Jd(e){return e==="[object Array]"||e==="[object ArrayBuffer]"||e==="[object DataView]"||e==="[object Float32Array]"||e==="[object Float64Array]"||e==="[object Int8Array]"||e==="[object Int16Array]"||e==="[object Int32Array]"||e==="[object Uint8Array]"||e==="[object Uint8ClampedArray]"||e==="[object Uint16Array]"||e==="[object Uint32Array]"}i(Jd,"isToStringedArrayType");function Yd(e){return Object.is(e,-0)?"-0":String(e)}i(Yd,"printNumber");function Xd(e){return `${e}n`}i(Xd,"printBigInt");function Oa(e,t){return t?`[Function ${e.name||"anonymous"}]`:"[Function]"}i(Oa,"printFunction");function Ia(e){return String(e).replace(Hd,"Symbol($1)")}i(Ia,"printSymbol");function Aa(e){return `[${Vd.call(e)}]`}i(Aa,"printError");function Ha(e,t,n,r){if(e===true||e===false)return `${e}`;if(e===void 0)return "undefined";if(e===null)return "null";let o=typeof e;if(o==="number")return Yd(e);if(o==="bigint")return Xd(e);if(o==="string")return r?`"${e.replaceAll(/"|\\/g,"\\$&")}"`:`"${e}"`;if(o==="function")return Oa(e,t);if(o==="symbol")return Ia(e);let s=Ka.call(e);return s==="[object WeakMap]"?"WeakMap {}":s==="[object WeakSet]"?"WeakSet {}":s==="[object Function]"||s==="[object GeneratorFunction]"?Oa(e,t):s==="[object Symbol]"?Ia(e):s==="[object Date]"?Number.isNaN(+e)?"Date { NaN }":Wd.call(e):s==="[object Error]"?Aa(e):s==="[object RegExp]"?n?Ca.call(e).replaceAll(/[$()*+.?[\\\]^{|}]/g,"\\$&"):Ca.call(e):e instanceof Error?Aa(e):null}i(Ha,"printBasicValue");function Ga(e,t,n,r,o,s){if(o.includes(e))return "[Circular]";o=[...o],o.push(e);let a=++r>t.maxDepth,l=t.min;if(t.callToJSON&&!a&&e.toJSON&&typeof e.toJSON=="function"&&!s)return yt(e.toJSON(),t,n,r,o,true);let c=Ka.call(e);return c==="[object Arguments]"?a?"[Arguments]":`${l?"":"Arguments "}[${zn(e,t,n,r,o,yt)}]`:Jd(c)?a?`[${e.constructor.name}]`:`${l||!t.printBasicPrototype&&e.constructor.name==="Array"?"":`${e.constructor.name} `}[${zn(e,t,n,r,o,yt)}]`:c==="[object Map]"?a?"[Map]":`Map {${ln(e.entries(),t,n,r,o,yt," => ")}}`:c==="[object Set]"?a?"[Set]":`Set {${mo(e.values(),t,n,r,o,yt)}}`:a||Kd(e)?`[${Un(e)}]`:`${l||!t.printBasicPrototype&&Un(e)==="Object"?"":`${Un(e)} `}{${go(e,t,n,r,o,yt)}}`}i(Ga,"printComplexValue");var Zd={test:i(e=>e&&e instanceof Error,"test"),serialize(e,t,n,r,o,s){if(o.includes(e))return "[Circular]";o=[...o,e];let a=++r>t.maxDepth,{message:l,cause:c,...u}=e,f={message:l,...typeof c<"u"?{cause:c}:{},...e instanceof AggregateError?{errors:e.errors}:{},...u},h=e.name!=="Error"?e.name:Un(e);return a?`[${h}]`:`${h} {${ln(Object.entries(f).values(),t,n,r,o,s)}}`}};function Qd(e){return e.serialize!=null}i(Qd,"isNewPlugin");function Ja(e,t,n,r,o,s){let a;try{a=Qd(e)?e.serialize(t,n,r,o,s,yt):e.print(t,l=>yt(l,n,r,o,s),l=>{let c=r+n.indent;return c+l.replaceAll(Gd,`
15
- ${c}`)},{edgeSpacing:n.spacingOuter,min:n.min,spacing:n.spacingInner},n.colors);}catch(l){throw new Wn(l.message,l.stack)}if(typeof a!="string")throw new TypeError(`pretty-format: Plugin must return type "string" but instead returned "${typeof a}".`);return a}i(Ja,"printPlugin");function Ya(e,t){for(let n of e)try{if(n.test(t))return n}catch(r){throw new Wn(r.message,r.stack)}return null}i(Ya,"findPlugin");function yt(e,t,n,r,o,s){let a,l=Ya(t.plugins,e);if(l!==null)a=Ja(l,e,t,n,r,o);else {let c=Ha(e,t.printFunctionName,t.escapeRegex,t.escapeString);c!==null?a=c:a=Ga(e,t,n,r,o,s);}return t._outputLengthPerDepth[r]??=0,t._outputLengthPerDepth[r]+=a.length,t._outputLengthPerDepth[r]>t.maxOutputLength&&(t.maxDepth=0),a}i(yt,"printer");var So={comment:"gray",content:"reset",prop:"yellow",tag:"cyan",value:"green"},Xa=Object.keys(So),We={callToJSON:true,compareKeys:void 0,escapeRegex:false,escapeString:true,highlight:false,indent:2,maxDepth:Number.POSITIVE_INFINITY,maxOutputLength:1e6,maxWidth:Number.POSITIVE_INFINITY,min:false,plugins:[],printBasicPrototype:true,printFunctionName:true,printShadowRoot:true,theme:So};function ep(e){for(let t of Object.keys(e))if(!Object.hasOwn(We,t))throw new Error(`pretty-format: Unknown option "${t}".`);if(e.min&&e.indent!==void 0&&e.indent!==0)throw new Error('pretty-format: Options "min" and "indent" cannot be used together.')}i(ep,"validateOptions");function tp(){return Xa.reduce((e,t)=>{let n=So[t],r=n&&se[n];if(r&&typeof r.close=="string"&&typeof r.open=="string")e[t]=r;else throw new Error(`pretty-format: Option "theme" has a key "${t}" whose value "${n}" is undefined in ansi-styles.`);return e},Object.create(null))}i(tp,"getColorsHighlight");function np(){return Xa.reduce((e,t)=>(e[t]={close:"",open:""},e),Object.create(null))}i(np,"getColorsEmpty");function Za(e){return e?.printFunctionName??We.printFunctionName}i(Za,"getPrintFunctionName");function Qa(e){return e?.escapeRegex??We.escapeRegex}i(Qa,"getEscapeRegex");function ec(e){return e?.escapeString??We.escapeString}i(ec,"getEscapeString");function $a(e){return {callToJSON:e?.callToJSON??We.callToJSON,colors:e?.highlight?tp():np(),compareKeys:typeof e?.compareKeys=="function"||e?.compareKeys===null?e.compareKeys:We.compareKeys,escapeRegex:Qa(e),escapeString:ec(e),indent:e?.min?"":rp(e?.indent??We.indent),maxDepth:e?.maxDepth??We.maxDepth,maxWidth:e?.maxWidth??We.maxWidth,min:e?.min??We.min,plugins:e?.plugins??We.plugins,printBasicPrototype:e?.printBasicPrototype??true,printFunctionName:Za(e),printShadowRoot:e?.printShadowRoot??true,spacingInner:e?.min?" ":`
13
+ `;}),this.intro&&(this.intro=t+this.intro.replace(/^[^\n]/gm,(r,o)=>o>0?t+r:r)),this}prepend(t){return this.intro=t+this.intro,this}toString(){let t=this.sources.map((n,r)=>{let o=n.separator!==void 0?n.separator:this.separator;return (r>0?o:"")+n.content.toString()}).join("");return this.intro+t}isEmpty(){return !(this.intro.length&&this.intro.trim()||this.sources.some(t=>!t.content.isEmpty()))}length(){return this.sources.reduce((t,n)=>t+n.content.length(),this.intro.length)}trimLines(){return this.trim("[\\r\\n]")}trim(t){return this.trimStart(t).trimEnd(t)}trimStart(t){let n=new RegExp("^"+(t||"\\s")+"+");if(this.intro=this.intro.replace(n,""),!this.intro){let r,o=0;do if(r=this.sources[o++],!r)break;while(!r.content.trimStartAborted(t))}return this}trimEnd(t){let n=new RegExp((t||"\\s")+"+$"),r,o=this.sources.length-1;do if(r=this.sources[o--],!r){this.intro=this.intro.replace(n,"");break}while(!r.content.trimEndAborted(t));return this}};});var uh=on(lh=>{Object.defineProperty(lh,"__esModule",{value:true});});var hh=on(fh=>{Object.defineProperty(fh,"__esModule",{value:true});});var dh=on(ph=>{Object.defineProperty(ph,"__esModule",{value:true});});var gh=on(mh=>{Object.defineProperty(mh,"__esModule",{value:true});});var yh=on(ue=>{var Jw=ue&&ue.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:true,get:i(function(){return t[n]},"get")}),Object.defineProperty(e,r,o);}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n];})),oo=ue&&ue.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Jw(t,e,n);};Object.defineProperty(ue,"__esModule",{value:true});ue.expectTypeOf=void 0;oo(uh(),ue);oo(hh(),ue);oo(dh(),ue);oo(gh(),ue);var de=i(()=>true,"fn"),Yw=i(e=>{let t=["parameters","returns","resolves","not","items","constructorParameters","thisParameter","instance","guards","asserts","branded"],n={toBeAny:de,toBeUnknown:de,toBeNever:de,toBeFunction:de,toBeObject:de,toBeArray:de,toBeString:de,toBeNumber:de,toBeBoolean:de,toBeVoid:de,toBeSymbol:de,toBeNull:de,toBeUndefined:de,toBeNullable:de,toBeBigInt:de,toMatchTypeOf:de,toEqualTypeOf:de,toBeConstructibleWith:de,toMatchObjectType:de,toExtend:de,map:ue.expectTypeOf,toBeCallableWith:ue.expectTypeOf,extract:ue.expectTypeOf,exclude:ue.expectTypeOf,pick:ue.expectTypeOf,omit:ue.expectTypeOf,toHaveProperty:ue.expectTypeOf,parameter:ue.expectTypeOf};return t.forEach(o=>Object.defineProperty(n,o,{get:i(()=>(0, ue.expectTypeOf)({}),"get")})),n},"expectTypeOf");ue.expectTypeOf=Yw;});var pa={reset:[0,0],bold:[1,22,"\x1B[22m\x1B[1m"],dim:[2,22,"\x1B[22m\x1B[2m"],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]};function co(e){return String(e)}i(co,"i");co.open="";co.close="";function Oh(){let e=typeof process<"u"?process:void 0,t=e?.env||{},n=t.FORCE_TTY!=="false",r=e?.argv||[];return !("NO_COLOR"in t||r.includes("--no-color"))&&("FORCE_COLOR"in t||r.includes("--color")||e?.platform==="win32"||n&&t.TERM!=="dumb"||"CI"in t)||typeof window<"u"&&!!window.chrome}i(Oh,"B");function Ih({force:e}={}){let t=e||Oh(),n=i((a,l,c,u)=>{let f="",h=0;do f+=a.substring(h,u)+c,h=u+l.length,u=a.indexOf(l,h);while(~u);return f+a.substring(h)},"a"),r=i((a,l,c=a)=>{let u=i(f=>{let h=String(f),d=h.indexOf(l,a.length);return ~d?a+n(h,l,c,d)+l:a+h+l},"n");return u.open=a,u.close=l,u},"l"),o={isColorSupported:t},s=i(a=>`\x1B[${a}m`,"f");for(let a in pa){let l=pa[a];o[a]=t?r(s(l[0]),s(l[1]),l[2]):co;}return o}i(Ih,"C");var Ah=Ih();var se=Ah;function Ca(e,t){return t.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(r){if(r!=="default"&&!(r in e)){var o=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,o.get?o:{enumerable:true,get:i(function(){return n[r]},"get")});}});}),Object.freeze(e)}i(Ca,"_mergeNamespaces");function $h(e,t){let n=Object.keys(e),r=t===null?n:n.sort(t);if(Object.getOwnPropertySymbols)for(let o of Object.getOwnPropertySymbols(e))Object.getOwnPropertyDescriptor(e,o).enumerable&&r.push(o);return r}i($h,"getKeysOfEnumerableProperties");function an(e,t,n,r,o,s,a=": "){let l="",c=0,u=e.next();if(!u.done){l+=t.spacingOuter;let f=n+t.indent;for(;!u.done;){if(l+=f,c++===t.maxWidth){l+="\u2026";break}let h=s(u.value[0],t,f,r,o),d=s(u.value[1],t,f,r,o);l+=h+a+d,u=e.next(),u.done?t.min||(l+=","):l+=`,${t.spacingInner}`;}l+=t.spacingOuter+n;}return l}i(an,"printIteratorEntries");function ho(e,t,n,r,o,s){let a="",l=0,c=e.next();if(!c.done){a+=t.spacingOuter;let u=n+t.indent;for(;!c.done;){if(a+=u,l++===t.maxWidth){a+="\u2026";break}a+=s(c.value,t,u,r,o),c=e.next(),c.done?t.min||(a+=","):a+=`,${t.spacingInner}`;}a+=t.spacingOuter+n;}return a}i(ho,"printIteratorValues");function zn(e,t,n,r,o,s){let a="";e=e instanceof ArrayBuffer?new DataView(e):e;let l=i(u=>u instanceof DataView,"isDataView"),c=l(e)?e.byteLength:e.length;if(c>0){a+=t.spacingOuter;let u=n+t.indent;for(let f=0;f<c;f++){if(a+=u,f===t.maxWidth){a+="\u2026";break}(l(e)||f in e)&&(a+=s(l(e)?e.getInt8(f):e[f],t,u,r,o)),f<c-1?a+=`,${t.spacingInner}`:t.min||(a+=",");}a+=t.spacingOuter+n;}return a}i(zn,"printListItems");function po(e,t,n,r,o,s){let a="",l=$h(e,t.compareKeys);if(l.length>0){a+=t.spacingOuter;let c=n+t.indent;for(let u=0;u<l.length;u++){let f=l[u],h=s(f,t,c,r,o),d=s(e[f],t,c,r,o);a+=`${c+h}: ${d}`,u<l.length-1?a+=`,${t.spacingInner}`:t.min||(a+=",");}a+=t.spacingOuter+n;}return a}i(po,"printObjectProperties");var Nh=typeof Symbol=="function"&&Symbol.for?Symbol.for("jest.asymmetricMatcher"):1267621,Bn=" ",Ph=i((e,t,n,r,o,s)=>{let a=e.toString();if(a==="ArrayContaining"||a==="ArrayNotContaining")return ++r>t.maxDepth?`[${a}]`:`${a+Bn}[${zn(e.sample,t,n,r,o,s)}]`;if(a==="ObjectContaining"||a==="ObjectNotContaining")return ++r>t.maxDepth?`[${a}]`:`${a+Bn}{${po(e.sample,t,n,r,o,s)}}`;if(a==="StringMatching"||a==="StringNotMatching"||a==="StringContaining"||a==="StringNotContaining")return a+Bn+s(e.sample,t,n,r,o);if(typeof e.toAsymmetricMatcher!="function")throw new TypeError(`Asymmetric matcher ${e.constructor.name} does not implement toAsymmetricMatcher()`);return e.toAsymmetricMatcher()},"serialize$5"),Rh=i(e=>e&&e.$$typeof===Nh,"test$5"),jh={serialize:Ph,test:Rh},Fh=" ",_a=new Set(["DOMStringMap","NamedNodeMap"]),Dh=/^(?:HTML\w*Collection|NodeList)$/;function Lh(e){return _a.has(e)||Dh.test(e)}i(Lh,"testName");var Bh=i(e=>e&&e.constructor&&!!e.constructor.name&&Lh(e.constructor.name),"test$4");function qh(e){return e.constructor.name==="NamedNodeMap"}i(qh,"isNamedNodeMap");var Uh=i((e,t,n,r,o,s)=>{let a=e.constructor.name;return ++r>t.maxDepth?`[${a}]`:(t.min?"":a+Fh)+(_a.has(a)?`{${po(qh(e)?[...e].reduce((l,c)=>(l[c.name]=c.value,l),{}):{...e},t,n,r,o,s)}}`:`[${zn([...e],t,n,r,o,s)}]`)},"serialize$4"),zh={serialize:Uh,test:Bh};function Oa(e){return e.replaceAll("<","&lt;").replaceAll(">","&gt;")}i(Oa,"escapeHTML");function mo(e,t,n,r,o,s,a){let l=r+n.indent,c=n.colors;return e.map(u=>{let f=t[u];if(typeof f=="string"&&f[0]==="_"&&f.startsWith("__vitest_")&&f.match(/__vitest_\d+__/))return "";let h=a(f,n,l,o,s);return typeof f!="string"&&(h.includes(`
14
+ `)&&(h=n.spacingOuter+l+h+n.spacingOuter+r),h=`{${h}}`),`${n.spacingInner+r+c.prop.open+u+c.prop.close}=${c.value.open}${h}${c.value.close}`}).join("")}i(mo,"printProps");function Vn(e,t,n,r,o,s){return e.map(a=>t.spacingOuter+n+(typeof a=="string"?Ia(a,t):s(a,t,n,r,o))).join("")}i(Vn,"printChildren");function Wh(e,t,n,r,o,s){return t.printShadowRoot===false?"":[`${t.spacingOuter+n}#shadow-root`,Vn(e,t,n+t.indent,r,o,s)].join("")}i(Wh,"printShadowRoot");function Ia(e,t){let n=t.colors.content;return n.open+Oa(e)+n.close}i(Ia,"printText");function Vh(e,t){let n=t.colors.comment;return `${n.open}<!--${Oa(e)}-->${n.close}`}i(Vh,"printComment");function go(e,t,n,r,o){let s=r.colors.tag;return `${s.open}<${e}${t&&s.close+t+r.spacingOuter+o+s.open}${n?`>${s.close}${n}${r.spacingOuter}${o}${s.open}</${e}`:`${t&&!r.min?"":" "}/`}>${s.close}`}i(go,"printElement");function yo(e,t){let n=t.colors.tag;return `${n.open}<${e}${n.close} \u2026${n.open} />${n.close}`}i(yo,"printElementAsLeaf");var Kh=1,wo=3,Aa=8,$a=11,Hh=/^(?:(?:HTML|SVG)\w*)?Element$/;function Gh(e){try{return typeof e.hasAttribute=="function"&&e.hasAttribute("is")}catch{return false}}i(Gh,"testHasAttribute");function Jh(e){let t=e.constructor.name,{nodeType:n,tagName:r}=e,o=typeof r=="string"&&r.includes("-")||Gh(e);return n===Kh&&(Hh.test(t)||o)||n===wo&&t==="Text"||n===Aa&&t==="Comment"||n===$a&&t==="DocumentFragment"}i(Jh,"testNode");var Na=i(e=>e?.constructor?.name&&Jh(e),"test$3");function Yh(e){return e.nodeType===wo}i(Yh,"nodeIsText");function Xh(e){return e.nodeType===Aa}i(Xh,"nodeIsComment");function qn(e){return e.nodeType===$a}i(qn,"nodeIsFragment");function da(e,t){let n=e.filter(r=>r.nodeType===wo?(r.data||"").trim().length>0:true);return t&&(n=n.filter(t)),n}i(da,"filterChildren");function Pa(e,t,n,r,o,s,a){if(Yh(e))return Ia(e.data,t);if(Xh(e))return Vh(e.data,t);let l=qn(e)?"DocumentFragment":e.tagName.toLowerCase();if(++r>t.maxDepth)return yo(l,t);let c=Array.prototype.slice.call(e.childNodes||e.children),u=qn(e)||!e.shadowRoot?[]:Array.prototype.slice.call(e.shadowRoot.children),f=a?da(c,a):c,h=a?da(u,a):u;return go(l,mo(qn(e)?[]:Array.from(e.attributes,d=>d.name).sort(),qn(e)?{}:[...e.attributes].reduce((d,p)=>(d[p.name]=p.value,d),{}),t,n+t.indent,r,o,s),(h.length>0?Wh(h,t,n+t.indent,r,o,s):"")+Vn(f,t,n+t.indent,r,o,s),t,n)}i(Pa,"serializeDOM");var Zh=i((e,t,n,r,o,s)=>Pa(e,t,n,r,o,s),"serialize$3");function Ra(e){return {test:Na,serialize:i((t,n,r,o,s,a)=>Pa(t,n,r,o,s,a,e),"serialize")}}i(Ra,"createDOMElementFilter");var Qh={serialize:Zh,test:Na},ep="@@__IMMUTABLE_ITERABLE__@@",tp="@@__IMMUTABLE_LIST__@@",np="@@__IMMUTABLE_KEYED__@@",rp="@@__IMMUTABLE_MAP__@@",ma="@@__IMMUTABLE_ORDERED__@@",op="@@__IMMUTABLE_RECORD__@@",sp="@@__IMMUTABLE_SEQ__@@",ip="@@__IMMUTABLE_SET__@@",ap="@@__IMMUTABLE_STACK__@@",Ft=i(e=>`Immutable.${e}`,"getImmutableName"),Kn=i(e=>`[${e}]`,"printAsLeaf"),sn=" ",ga="\u2026";function cp(e,t,n,r,o,s,a){return ++r>t.maxDepth?Kn(Ft(a)):`${Ft(a)+sn}{${an(e.entries(),t,n,r,o,s)}}`}i(cp,"printImmutableEntries");function lp(e){let t=0;return {next(){if(t<e._keys.length){let n=e._keys[t++];return {done:false,value:[n,e.get(n)]}}return {done:true,value:void 0}}}}i(lp,"getRecordEntries");function up(e,t,n,r,o,s){let a=Ft(e._name||"Record");return ++r>t.maxDepth?Kn(a):`${a+sn}{${an(lp(e),t,n,r,o,s)}}`}i(up,"printImmutableRecord");function fp(e,t,n,r,o,s){let a=Ft("Seq");return ++r>t.maxDepth?Kn(a):e[np]?`${a+sn}{${e._iter||e._object?an(e.entries(),t,n,r,o,s):ga}}`:`${a+sn}[${e._iter||e._array||e._collection||e._iterable?ho(e.values(),t,n,r,o,s):ga}]`}i(fp,"printImmutableSeq");function lo(e,t,n,r,o,s,a){return ++r>t.maxDepth?Kn(Ft(a)):`${Ft(a)+sn}[${ho(e.values(),t,n,r,o,s)}]`}i(lo,"printImmutableValues");var hp=i((e,t,n,r,o,s)=>e[rp]?cp(e,t,n,r,o,s,e[ma]?"OrderedMap":"Map"):e[tp]?lo(e,t,n,r,o,s,"List"):e[ip]?lo(e,t,n,r,o,s,e[ma]?"OrderedSet":"Set"):e[ap]?lo(e,t,n,r,o,s,"Stack"):e[sp]?fp(e,t,n,r,o,s):up(e,t,n,r,o,s),"serialize$2"),pp=i(e=>e&&(e[ep]===true||e[op]===true),"test$2"),dp={serialize:hp,test:pp};function ja(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}i(ja,"getDefaultExportFromCjs");var uo={exports:{}},ne={};var ya;function mp(){if(ya)return ne;ya=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),d=Symbol.for("react.view_transition"),p=Symbol.for("react.client.reference");function g(m){if(typeof m=="object"&&m!==null){var b=m.$$typeof;switch(b){case e:switch(m=m.type,m){case n:case o:case r:case c:case u:case d:return m;default:switch(m=m&&m.$$typeof,m){case a:case l:case h:case f:return m;case s:return m;default:return b}}case t:return b}}}return i(g,"typeOf"),ne.ContextConsumer=s,ne.ContextProvider=a,ne.Element=e,ne.ForwardRef=l,ne.Fragment=n,ne.Lazy=h,ne.Memo=f,ne.Portal=t,ne.Profiler=o,ne.StrictMode=r,ne.Suspense=c,ne.SuspenseList=u,ne.isContextConsumer=function(m){return g(m)===s},ne.isContextProvider=function(m){return g(m)===a},ne.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},ne.isForwardRef=function(m){return g(m)===l},ne.isFragment=function(m){return g(m)===n},ne.isLazy=function(m){return g(m)===h},ne.isMemo=function(m){return g(m)===f},ne.isPortal=function(m){return g(m)===t},ne.isProfiler=function(m){return g(m)===o},ne.isStrictMode=function(m){return g(m)===r},ne.isSuspense=function(m){return g(m)===c},ne.isSuspenseList=function(m){return g(m)===u},ne.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===o||m===r||m===c||m===u||typeof m=="object"&&m!==null&&(m.$$typeof===h||m.$$typeof===f||m.$$typeof===a||m.$$typeof===s||m.$$typeof===l||m.$$typeof===p||m.getModuleId!==void 0)},ne.typeOf=g,ne}i(mp,"requireReactIs_production");var wa;function gp(){return wa||(wa=1,uo.exports=mp()),uo.exports}i(gp,"requireReactIs$1");var Fa=gp(),yp=ja(Fa),wp=Ca({__proto__:null,default:yp},[Fa]),fo={exports:{}},Z={};var ba;function bp(){if(ba)return Z;ba=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),g;g=Symbol.for("react.module.reference");function m(b){if(typeof b=="object"&&b!==null){var E=b.$$typeof;switch(E){case e:switch(b=b.type,b){case n:case o:case r:case u:case f:return b;default:switch(b=b&&b.$$typeof,b){case l:case a:case c:case d:case h:case s:return b;default:return E}}case t:return E}}}return i(m,"v"),Z.ContextConsumer=a,Z.ContextProvider=s,Z.Element=e,Z.ForwardRef=c,Z.Fragment=n,Z.Lazy=d,Z.Memo=h,Z.Portal=t,Z.Profiler=o,Z.StrictMode=r,Z.Suspense=u,Z.SuspenseList=f,Z.isAsyncMode=function(){return false},Z.isConcurrentMode=function(){return false},Z.isContextConsumer=function(b){return m(b)===a},Z.isContextProvider=function(b){return m(b)===s},Z.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},Z.isForwardRef=function(b){return m(b)===c},Z.isFragment=function(b){return m(b)===n},Z.isLazy=function(b){return m(b)===d},Z.isMemo=function(b){return m(b)===h},Z.isPortal=function(b){return m(b)===t},Z.isProfiler=function(b){return m(b)===o},Z.isStrictMode=function(b){return m(b)===r},Z.isSuspense=function(b){return m(b)===u},Z.isSuspenseList=function(b){return m(b)===f},Z.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===o||b===r||b===u||b===f||b===p||typeof b=="object"&&b!==null&&(b.$$typeof===d||b.$$typeof===h||b.$$typeof===s||b.$$typeof===a||b.$$typeof===c||b.$$typeof===g||b.getModuleId!==void 0)},Z.typeOf=m,Z}i(bp,"requireReactIs_production_min");var Ta;function Tp(){return Ta||(Ta=1,fo.exports=bp()),fo.exports}i(Tp,"requireReactIs");var Da=Tp(),Sp=ja(Da),Ep=Ca({__proto__:null,default:Sp},[Da]),vp=["isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","isSuspenseList","isValidElementType"],xt=Object.fromEntries(vp.map(e=>[e,t=>Ep[e](t)||wp[e](t)]));function La(e,t=[]){if(Array.isArray(e))for(let n of e)La(n,t);else e!=null&&e!==false&&e!==""&&t.push(e);return t}i(La,"getChildren");function Sa(e){let t=e.type;if(typeof t=="string")return t;if(typeof t=="function")return t.displayName||t.name||"Unknown";if(xt.isFragment(e))return "React.Fragment";if(xt.isSuspense(e))return "React.Suspense";if(typeof t=="object"&&t!==null){if(xt.isContextProvider(e))return "Context.Provider";if(xt.isContextConsumer(e))return "Context.Consumer";if(xt.isForwardRef(e)){if(t.displayName)return t.displayName;let n=t.render.displayName||t.render.name||"";return n===""?"ForwardRef":`ForwardRef(${n})`}if(xt.isMemo(e)){let n=t.displayName||t.type.displayName||t.type.name||"";return n===""?"Memo":`Memo(${n})`}}return "UNDEFINED"}i(Sa,"getType");function xp(e){let{props:t}=e;return Object.keys(t).filter(n=>n!=="children"&&t[n]!==void 0).sort()}i(xp,"getPropKeys$1");var kp=i((e,t,n,r,o,s)=>++r>t.maxDepth?yo(Sa(e),t):go(Sa(e),mo(xp(e),e.props,t,n+t.indent,r,o,s),Vn(La(e.props.children),t,n+t.indent,r,o,s),t,n),"serialize$1"),Mp=i(e=>e!=null&&xt.isElement(e),"test$1"),Cp={serialize:kp,test:Mp},_p=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.test.json"):245830487;function Op(e){let{props:t}=e;return t?Object.keys(t).filter(n=>t[n]!==void 0).sort():[]}i(Op,"getPropKeys");var Ip=i((e,t,n,r,o,s)=>++r>t.maxDepth?yo(e.type,t):go(e.type,e.props?mo(Op(e),e.props,t,n+t.indent,r,o,s):"",e.children?Vn(e.children,t,n+t.indent,r,o,s):"",t,n),"serialize"),Ap=i(e=>e&&e.$$typeof===_p,"test"),$p={serialize:Ip,test:Ap},Ba=Object.prototype.toString,Np=Date.prototype.toISOString,Pp=Error.prototype.toString,Ea=RegExp.prototype.toString;function Un(e){return typeof e.constructor=="function"&&e.constructor.name||"Object"}i(Un,"getConstructorName");function Rp(e){return typeof window<"u"&&e===window}i(Rp,"isWindow");var jp=/^Symbol\((.*)\)(.*)$/,Fp=/\n/g,Wn=class extends Error{static{i(this,"PrettyFormatPluginError");}constructor(t,n){super(t),this.stack=n,this.name=this.constructor.name;}};function Dp(e){return e==="[object Array]"||e==="[object ArrayBuffer]"||e==="[object DataView]"||e==="[object Float32Array]"||e==="[object Float64Array]"||e==="[object Int8Array]"||e==="[object Int16Array]"||e==="[object Int32Array]"||e==="[object Uint8Array]"||e==="[object Uint8ClampedArray]"||e==="[object Uint16Array]"||e==="[object Uint32Array]"}i(Dp,"isToStringedArrayType");function Lp(e){return Object.is(e,-0)?"-0":String(e)}i(Lp,"printNumber");function Bp(e){return `${e}n`}i(Bp,"printBigInt");function va(e,t){return t?`[Function ${e.name||"anonymous"}]`:"[Function]"}i(va,"printFunction");function xa(e){return String(e).replace(jp,"Symbol($1)")}i(xa,"printSymbol");function ka(e){return `[${Pp.call(e)}]`}i(ka,"printError");function qa(e,t,n,r){if(e===true||e===false)return `${e}`;if(e===void 0)return "undefined";if(e===null)return "null";let o=typeof e;if(o==="number")return Lp(e);if(o==="bigint")return Bp(e);if(o==="string")return r?`"${e.replaceAll(/"|\\/g,"\\$&")}"`:`"${e}"`;if(o==="function")return va(e,t);if(o==="symbol")return xa(e);let s=Ba.call(e);return s==="[object WeakMap]"?"WeakMap {}":s==="[object WeakSet]"?"WeakSet {}":s==="[object Function]"||s==="[object GeneratorFunction]"?va(e,t):s==="[object Symbol]"?xa(e):s==="[object Date]"?Number.isNaN(+e)?"Date { NaN }":Np.call(e):s==="[object Error]"?ka(e):s==="[object RegExp]"?n?Ea.call(e).replaceAll(/[$()*+.?[\\\]^{|}]/g,"\\$&"):Ea.call(e):e instanceof Error?ka(e):null}i(qa,"printBasicValue");function Ua(e,t,n,r,o,s){if(o.includes(e))return "[Circular]";o=[...o],o.push(e);let a=++r>t.maxDepth,l=t.min;if(t.callToJSON&&!a&&e.toJSON&&typeof e.toJSON=="function"&&!s)return yt(e.toJSON(),t,n,r,o,true);let c=Ba.call(e);return c==="[object Arguments]"?a?"[Arguments]":`${l?"":"Arguments "}[${zn(e,t,n,r,o,yt)}]`:Dp(c)?a?`[${e.constructor.name}]`:`${l||!t.printBasicPrototype&&e.constructor.name==="Array"?"":`${e.constructor.name} `}[${zn(e,t,n,r,o,yt)}]`:c==="[object Map]"?a?"[Map]":`Map {${an(e.entries(),t,n,r,o,yt," => ")}}`:c==="[object Set]"?a?"[Set]":`Set {${ho(e.values(),t,n,r,o,yt)}}`:a||Rp(e)?`[${Un(e)}]`:`${l||!t.printBasicPrototype&&Un(e)==="Object"?"":`${Un(e)} `}{${po(e,t,n,r,o,yt)}}`}i(Ua,"printComplexValue");var qp={test:i(e=>e&&e instanceof Error,"test"),serialize(e,t,n,r,o,s){if(o.includes(e))return "[Circular]";o=[...o,e];let a=++r>t.maxDepth,{message:l,cause:c,...u}=e,f={message:l,...typeof c<"u"?{cause:c}:{},...e instanceof AggregateError?{errors:e.errors}:{},...u},h=e.name!=="Error"?e.name:Un(e);return a?`[${h}]`:`${h} {${an(Object.entries(f).values(),t,n,r,o,s)}}`}};function Up(e){return e.serialize!=null}i(Up,"isNewPlugin");function za(e,t,n,r,o,s){let a;try{a=Up(e)?e.serialize(t,n,r,o,s,yt):e.print(t,l=>yt(l,n,r,o,s),l=>{let c=r+n.indent;return c+l.replaceAll(Fp,`
15
+ ${c}`)},{edgeSpacing:n.spacingOuter,min:n.min,spacing:n.spacingInner},n.colors);}catch(l){throw new Wn(l.message,l.stack)}if(typeof a!="string")throw new TypeError(`pretty-format: Plugin must return type "string" but instead returned "${typeof a}".`);return a}i(za,"printPlugin");function Wa(e,t){for(let n of e)try{if(n.test(t))return n}catch(r){throw new Wn(r.message,r.stack)}return null}i(Wa,"findPlugin");function yt(e,t,n,r,o,s){let a,l=Wa(t.plugins,e);if(l!==null)a=za(l,e,t,n,r,o);else {let c=qa(e,t.printFunctionName,t.escapeRegex,t.escapeString);c!==null?a=c:a=Ua(e,t,n,r,o,s);}return t._outputLengthPerDepth[r]??=0,t._outputLengthPerDepth[r]+=a.length,t._outputLengthPerDepth[r]>t.maxOutputLength&&(t.maxDepth=0),a}i(yt,"printer");var bo={comment:"gray",content:"reset",prop:"yellow",tag:"cyan",value:"green"},Va=Object.keys(bo),We={callToJSON:true,compareKeys:void 0,escapeRegex:false,escapeString:true,highlight:false,indent:2,maxDepth:Number.POSITIVE_INFINITY,maxOutputLength:1e6,maxWidth:Number.POSITIVE_INFINITY,min:false,plugins:[],printBasicPrototype:true,printFunctionName:true,printShadowRoot:true,theme:bo};function zp(e){for(let t of Object.keys(e))if(!Object.hasOwn(We,t))throw new Error(`pretty-format: Unknown option "${t}".`);if(e.min&&e.indent!==void 0&&e.indent!==0)throw new Error('pretty-format: Options "min" and "indent" cannot be used together.')}i(zp,"validateOptions");function Wp(){return Va.reduce((e,t)=>{let n=bo[t],r=n&&se[n];if(r&&typeof r.close=="string"&&typeof r.open=="string")e[t]=r;else throw new Error(`pretty-format: Option "theme" has a key "${t}" whose value "${n}" is undefined in ansi-styles.`);return e},Object.create(null))}i(Wp,"getColorsHighlight");function Vp(){return Va.reduce((e,t)=>(e[t]={close:"",open:""},e),Object.create(null))}i(Vp,"getColorsEmpty");function Ka(e){return e?.printFunctionName??We.printFunctionName}i(Ka,"getPrintFunctionName");function Ha(e){return e?.escapeRegex??We.escapeRegex}i(Ha,"getEscapeRegex");function Ga(e){return e?.escapeString??We.escapeString}i(Ga,"getEscapeString");function Ma(e){return {callToJSON:e?.callToJSON??We.callToJSON,colors:e?.highlight?Wp():Vp(),compareKeys:typeof e?.compareKeys=="function"||e?.compareKeys===null?e.compareKeys:We.compareKeys,escapeRegex:Ha(e),escapeString:Ga(e),indent:e?.min?"":Kp(e?.indent??We.indent),maxDepth:e?.maxDepth??We.maxDepth,maxWidth:e?.maxWidth??We.maxWidth,min:e?.min??We.min,plugins:e?.plugins??We.plugins,printBasicPrototype:e?.printBasicPrototype??true,printFunctionName:Ka(e),printShadowRoot:e?.printShadowRoot??true,spacingInner:e?.min?" ":`
16
16
  `,spacingOuter:e?.min?"":`
17
- `,maxOutputLength:e?.maxOutputLength??We.maxOutputLength,_outputLengthPerDepth:[]}}i($a,"getConfig");function rp(e){return Array.from({length:e+1}).join(" ")}i(rp,"createIndent");function $e(e,t){if(t&&(ep(t),t.plugins)){let r=Ya(t.plugins,e);if(r!==null)return Ja(r,e,$a(t),"",0,[])}let n=Ha(e,Za(t),Qa(t),ec(t));return n!==null?n:Ga(e,$a(t),"",0,[])}i($e,"format");var kt={AsymmetricMatcher:Hh,DOMCollection:ed,DOMElement:ud,Immutable:kd,ReactElement:Dd,ReactTestComponent:zd,Error:Zd};var tc={bold:["1","22"],dim:["2","22"],italic:["3","23"],underline:["4","24"],inverse:["7","27"],hidden:["8","28"],strike:["9","29"],black:["30","39"],red:["31","39"],green:["32","39"],yellow:["33","39"],blue:["34","39"],magenta:["35","39"],cyan:["36","39"],white:["37","39"],brightblack:["30;1","39"],brightred:["31;1","39"],brightgreen:["32;1","39"],brightyellow:["33;1","39"],brightblue:["34;1","39"],brightmagenta:["35;1","39"],brightcyan:["36;1","39"],brightwhite:["37;1","39"],grey:["90","39"]},op={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},Lt="\u2026";function sp(e,t){let n=tc[op[t]]||tc[t]||"";return n?`\x1B[${n[0]}m${String(e)}\x1B[${n[1]}m`:String(e)}i(sp,"colorise");function ip({showHidden:e=false,depth:t=2,colors:n=false,customInspect:r=true,showProxy:o=false,maxArrayLength:s=1/0,breakLength:a=1/0,seen:l=[],truncate:c=1/0,stylize:u=String}={},f){let h={showHidden:!!e,depth:Number(t),colors:!!n,customInspect:!!r,showProxy:!!o,maxArrayLength:Number(s),breakLength:Number(a),truncate:Number(c),seen:l,inspect:f,stylize:u};return h.colors&&(h.stylize=sp),h}i(ip,"normaliseOptions");function ap(e){return e>="\uD800"&&e<="\uDBFF"}i(ap,"isHighSurrogate");function wt(e,t,n=Lt){e=String(e);let r=n.length,o=e.length;if(r>t&&o>r)return n;if(o>t&&o>r){let s=t-r;return s>0&&ap(e[s-1])&&(s=s-1),`${e.slice(0,s)}${n}`}return e}i(wt,"truncate");function Ye(e,t,n,r=", "){n=n||t.inspect;let o=e.length;if(o===0)return "";let s=t.truncate,a="",l="",c="";for(let u=0;u<o;u+=1){let f=u+1===e.length,h=u+2===e.length;c=`${Lt}(${e.length-u})`;let p=e[u];t.truncate=s-a.length-(f?0:r.length);let d=l||n(p,t)+(f?"":r),g=a.length+d.length,m=g+c.length;if(f&&g>s&&a.length+c.length<=s||!f&&!h&&m>s||(l=f?"":n(e[u+1],t)+(h?"":r),!f&&h&&m>s&&g+l.length>s))break;if(a+=d,!f&&!h&&g+l.length>=s){c=`${Lt}(${e.length-u-1})`;break}c="";}return `${a}${c}`}i(Ye,"inspectList");function cp(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}i(cp,"quoteComplexKey");function un([e,t],n){return n.truncate-=2,typeof e=="string"?e=cp(e):typeof e!="number"&&(e=`[${n.inspect(e,n)}]`),n.truncate-=e.length,t=n.inspect(t,n),`${e}: ${t}`}i(un,"inspectProperty");function lp(e,t){let n=Object.keys(e).slice(e.length);if(!e.length&&!n.length)return "[]";t.truncate-=4;let r=Ye(e,t);t.truncate-=r.length;let o="";return n.length&&(o=Ye(n.map(s=>[s,e[s]]),t,un)),`[ ${r}${o?`, ${o}`:""} ]`}i(lp,"inspectArray");var up=i(e=>typeof Buffer=="function"&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name,"getArrayName");function ct(e,t){let n=up(e);t.truncate-=n.length+4;let r=Object.keys(e).slice(e.length);if(!e.length&&!r.length)return `${n}[]`;let o="";for(let a=0;a<e.length;a++){let l=`${t.stylize(wt(e[a],t.truncate),"number")}${a===e.length-1?"":", "}`;if(t.truncate-=l.length,e[a]!==e.length&&t.truncate<=3){o+=`${Lt}(${e.length-e[a]+1})`;break}o+=l;}let s="";return r.length&&(s=Ye(r.map(a=>[a,e[a]]),t,un)),`${n}[ ${o}${s?`, ${s}`:""} ]`}i(ct,"inspectTypedArray");function fp(e,t){let n=e.toJSON();if(n===null)return "Invalid Date";let r=n.split("T"),o=r[0];return t.stylize(`${o}T${wt(r[1],t.truncate-o.length-1)}`,"date")}i(fp,"inspectDate");function nc(e,t){let n=e[Symbol.toStringTag]||"Function",r=e.name;return r?t.stylize(`[${n} ${wt(r,t.truncate-11)}]`,"special"):t.stylize(`[${n}]`,"special")}i(nc,"inspectFunction");function hp([e,t],n){return n.truncate-=4,e=n.inspect(e,n),n.truncate-=e.length,t=n.inspect(t,n),`${e} => ${t}`}i(hp,"inspectMapEntry");function dp(e){let t=[];return e.forEach((n,r)=>{t.push([r,n]);}),t}i(dp,"mapToEntries");function pp(e,t){return e.size===0?"Map{}":(t.truncate-=7,`Map{ ${Ye(dp(e),t,hp)} }`)}i(pp,"inspectMap");var mp=Number.isNaN||(e=>e!==e);function rc(e,t){return mp(e)?t.stylize("NaN","number"):e===1/0?t.stylize("Infinity","number"):e===-1/0?t.stylize("-Infinity","number"):e===0?t.stylize(1/e===1/0?"+0":"-0","number"):t.stylize(wt(String(e),t.truncate),"number")}i(rc,"inspectNumber");function oc(e,t){let n=wt(e.toString(),t.truncate-1);return n!==Lt&&(n+="n"),t.stylize(n,"bigint")}i(oc,"inspectBigInt");function gp(e,t){let n=e.toString().split("/")[2],r=t.truncate-(2+n.length),o=e.source;return t.stylize(`/${wt(o,r)}/${n}`,"regexp")}i(gp,"inspectRegExp");function yp(e){let t=[];return e.forEach(n=>{t.push(n);}),t}i(yp,"arrayFromSet");function wp(e,t){return e.size===0?"Set{}":(t.truncate-=7,`Set{ ${Ye(yp(e),t)} }`)}i(wp,"inspectSet");var sc=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),bp={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},Tp=16;function Sp(e){return bp[e]||`\\u${`0000${e.charCodeAt(0).toString(Tp)}`.slice(-4)}`}i(Sp,"escape");function ic(e,t){return sc.test(e)&&(e=e.replace(sc,Sp)),t.stylize(`'${wt(e,t.truncate-2)}'`,"string")}i(ic,"inspectString");function ac(e){return "description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString()}i(ac,"inspectSymbol");var Ep=i(()=>"Promise{\u2026}","getPromiseValue");function Hn(e,t){let n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[];if(n.length===0&&r.length===0)return "{}";if(t.truncate-=4,t.seen=t.seen||[],t.seen.includes(e))return "[Circular]";t.seen.push(e);let o=Ye(n.map(l=>[l,e[l]]),t,un),s=Ye(r.map(l=>[l,e[l]]),t,un);t.seen.pop();let a="";return o&&s&&(a=", "),`{ ${o}${a}${s} }`}i(Hn,"inspectObject$1");var Eo=typeof Symbol<"u"&&Symbol.toStringTag?Symbol.toStringTag:false;function vp(e,t){let n="";return Eo&&Eo in e&&(n=e[Eo]),n=n||e.constructor.name,(!n||n==="_class")&&(n="<Anonymous Class>"),t.truncate-=n.length,`${n}${Hn(e,t)}`}i(vp,"inspectClass");function xp(e,t){return e.length===0?"Arguments[]":(t.truncate-=13,`Arguments[ ${Ye(e,t)} ]`)}i(xp,"inspectArguments");var kp=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function _p(e,t){let n=Object.getOwnPropertyNames(e).filter(a=>kp.indexOf(a)===-1),r=e.name;t.truncate-=r.length;let o="";if(typeof e.message=="string"?o=wt(e.message,t.truncate):n.unshift("message"),o=o?`: ${o}`:"",t.truncate-=o.length+5,t.seen=t.seen||[],t.seen.includes(e))return "[Circular]";t.seen.push(e);let s=Ye(n.map(a=>[a,e[a]]),t,un);return `${r}${o}${s?` { ${s} }`:""}`}i(_p,"inspectObject");function Mp([e,t],n){return n.truncate-=3,t?`${n.stylize(String(e),"yellow")}=${n.stylize(`"${t}"`,"string")}`:`${n.stylize(String(e),"yellow")}`}i(Mp,"inspectAttribute");function ko(e,t){return Ye(e,t,Cp,`
18
- `)}i(ko,"inspectNodeCollection");function Cp(e,t){switch(e.nodeType){case 1:return fc(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}i(Cp,"inspectNode");function fc(e,t){let n=e.getAttributeNames(),r=e.tagName.toLowerCase(),o=t.stylize(`<${r}`,"special"),s=t.stylize(">","special"),a=t.stylize(`</${r}>`,"special");t.truncate-=r.length*2+5;let l="";n.length>0&&(l+=" ",l+=Ye(n.map(f=>[f,e.getAttribute(f)]),t,Mp," ")),t.truncate-=l.length;let c=t.truncate,u=ko(e.children,t);return u&&u.length>c&&(u=`${Lt}(${e.children.length})`),`${o}${l}${s}${u}${a}`}i(fc,"inspectHTML");var Op=typeof Symbol=="function"&&typeof Symbol.for=="function",vo=Op?Symbol.for("chai/inspect"):"@@chai/inspect",xo=Symbol.for("nodejs.util.inspect.custom"),cc=new WeakMap,lc={},uc={undefined:i((e,t)=>t.stylize("undefined","undefined"),"undefined"),null:i((e,t)=>t.stylize("null","null"),"null"),boolean:i((e,t)=>t.stylize(String(e),"boolean"),"boolean"),Boolean:i((e,t)=>t.stylize(String(e),"boolean"),"Boolean"),number:rc,Number:rc,bigint:oc,BigInt:oc,string:ic,String:ic,function:nc,Function:nc,symbol:ac,Symbol:ac,Array:lp,Date:fp,Map:pp,Set:wp,RegExp:gp,Promise:Ep,WeakSet:i((e,t)=>t.stylize("WeakSet{\u2026}","special"),"WeakSet"),WeakMap:i((e,t)=>t.stylize("WeakMap{\u2026}","special"),"WeakMap"),Arguments:xp,Int8Array:ct,Uint8Array:ct,Uint8ClampedArray:ct,Int16Array:ct,Uint16Array:ct,Int32Array:ct,Uint32Array:ct,Float32Array:ct,Float64Array:ct,Generator:i(()=>"","Generator"),DataView:i(()=>"","DataView"),ArrayBuffer:i(()=>"","ArrayBuffer"),Error:_p,HTMLCollection:ko,NodeList:ko},Ip=i((e,t,n,r)=>vo in e&&typeof e[vo]=="function"?e[vo](t):xo in e&&typeof e[xo]=="function"?e[xo](t.depth,t,r):"inspect"in e&&typeof e.inspect=="function"?e.inspect(t.depth,t):"constructor"in e&&cc.has(e.constructor)?cc.get(e.constructor)(e,t):lc[n]?lc[n](e,t):"","inspectCustom"),Ap=Object.prototype.toString;function Gn(e,t={}){let n=ip(t,Gn),{customInspect:r}=n,o=e===null?"null":typeof e;if(o==="object"&&(o=Ap.call(e).slice(8,-1)),o in uc)return uc[o](e,n);if(r&&e){let a=Ip(e,n,o,Gn);if(a)return typeof a=="string"?a:Gn(a,n)}let s=e?Object.getPrototypeOf(e):false;return s===Object.prototype||s===null?Hn(e,n):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?fc(e,n):"constructor"in e?e.constructor!==Object?vp(e,n):Hn(e,n):e===Object(e)?Hn(e,n):n.stylize(String(e),o)}i(Gn,"inspect$1");var{AsymmetricMatcher:hc,DOMCollection:dc,DOMElement:$p,Immutable:pc,ReactElement:mc,ReactTestComponent:gc}=kt,Np=[gc,mc,$p,dc,pc,hc];function we(e,t=10,{maxLength:n,filterNode:r,...o}={}){let s=n??1e4,a,l=typeof r=="string"?Pp(r):r,c=l?[gc,mc,qa(l),dc,pc,hc]:Np;try{a=$e(e,{maxDepth:t,escapeString:false,plugins:c,...o});}catch{a=$e(e,{callToJSON:false,maxDepth:t,escapeString:false,plugins:c,...o});}return a.length>=s&&t>1?we(e,Math.floor(Math.min(t,Number.MAX_SAFE_INTEGER)/2),{maxLength:n,filterNode:r,...o}):a}i(we,"stringify");function Pp(e){return r=>{if(r.nodeType===8)return false;if(r.nodeType===1&&r.matches)try{return !r.matches(e)}catch{return true}return true}}i(Pp,"createNodeFilterFromSelector");var _o=/%[sdjifoOc%]/g;function Rp(e,t={}){let n=i((l,c)=>t.prettifyObject?we(l,void 0,{printBasicPrototype:false,escapeString:false}):wc(l,c),"formatArg");if(typeof e[0]!="string"){let l=[];for(let c=0;c<e.length;c++)l.push(n(e[c],{depth:0,colors:false}));return l.join(" ")}let r=e.length,o=1,s=e[0],a=String(s).replace(_o,l=>{if(l==="%%")return "%";if(o>=r)return l;switch(l){case "%s":{let c=e[o++];return typeof c=="bigint"?`${c.toString()}n`:typeof c=="number"&&c===0&&1/c<0?"-0":typeof c=="object"&&c!==null?typeof c.toString=="function"&&c.toString!==Object.prototype.toString?c.toString():n(c,{depth:0,colors:false}):String(c)}case "%d":{let c=e[o++];return typeof c=="bigint"?`${c.toString()}n`:typeof c=="symbol"?"NaN":Number(c).toString()}case "%i":{let c=e[o++];return typeof c=="bigint"?`${c.toString()}n`:Number.parseInt(String(c)).toString()}case "%f":return Number.parseFloat(String(e[o++])).toString();case "%o":return n(e[o++],{showHidden:true,showProxy:true});case "%O":return n(e[o++]);case "%c":return o++,"";case "%j":try{return JSON.stringify(e[o++])}catch(c){let u=c.message;if(u.includes("circular structure")||u.includes("cyclic structures")||u.includes("cyclic object"))return "[Circular]";throw c}default:return l}});for(let l=e[o];o<r;l=e[++o])l===null||typeof l!="object"?a+=` ${typeof l=="symbol"?l.toString():l}`:a+=` ${n(l)}`;return a}i(Rp,"baseFormat");function yc(...e){return Rp(e)}i(yc,"format");function wc(e,t={}){return t.truncate===0&&(t.truncate=Number.POSITIVE_INFINITY),Gn(e,t)}i(wc,"inspect");function bc(e,t={}){typeof t.truncate>"u"&&(t.truncate=40);let n=wc(e,t),r=Object.prototype.toString.call(e);if(t.truncate&&n.length>=t.truncate)if(r==="[object Function]"){let o=e;return o.name?`[Function: ${o.name}]`:"[Function]"}else {if(r==="[object Array]")return `[ Array(${e.length}) ]`;if(r==="[object Object]"){let o=Object.keys(e);return `{ Object (${o.length>2?`${o.splice(0,2).join(", ")}, ...`:o.join(", ")}) }`}else return n}return n}i(bc,"objDisplay");function Tc(e){let{message:t="$$stack trace error",stackTraceLimit:n=1}=e||{},r=Error.stackTraceLimit,o=Error.prepareStackTrace;Error.stackTraceLimit=n,Error.prepareStackTrace=l=>l.stack;let a=new Error(t).stack||"";return Error.prepareStackTrace=o,Error.stackTraceLimit=r,a}i(Tc,"createSimpleStackTrace");function Co(e){return e!=null}i(Co,"notNullish");function de(e,t,n){let r=typeof e;if(!n.includes(r))throw new TypeError(`${t} value must be ${n.join(" or ")}, received "${r}"`)}i(de,"assertTypes");function Sc(e){return e===null||typeof e!="function"&&typeof e!="object"}i(Sc,"isPrimitive");function Ec(e){let t=[],n="none";for(let r=0;r<e.length;++r)n==="singleline"?e[r]===`
19
- `&&(n="none"):n==="multiline"?e[r-1]==="*"&&e[r]==="/"&&(n="none"):n==="none"&&(e[r]==="/"&&e[r+1]==="/"?n="singleline":e[r]==="/"&&e[r+1]==="*"?(n="multiline",r+=2):t.push(e[r]));return t.join("")}i(Ec,"filterOutComments");function fn(e){return e==null&&(e=[]),Array.isArray(e)?e:[e]}i(fn,"toArray");function Le(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}i(Le,"isObject");function jp(e){return e===Object.prototype||e===Function.prototype||e===RegExp.prototype}i(jp,"isFinalObj");function _t(e){return Object.prototype.toString.apply(e).slice(8,-1)}i(_t,"getType");function Fp(e,t){let n=typeof t=="function"?t:r=>t.add(r);Object.getOwnPropertyNames(e).forEach(n),Object.getOwnPropertySymbols(e).forEach(n);}i(Fp,"collectOwnProperties");function Oo(e){let t=new Set;return jp(e)?[]:(Fp(e,t),Array.from(t))}i(Oo,"getOwnProperties");var vc={forceWritable:false};function Io(e,t=vc){return Mo(e,new WeakMap,t)}i(Io,"deepClone");function Mo(e,t,n=vc){let r,o;if(t.has(e))return t.get(e);if(Array.isArray(e)){for(o=Array.from({length:r=e.length}),t.set(e,o);r--;)o[r]=Mo(e[r],t,n);return o}if(Object.prototype.toString.call(e)==="[object Object]"){o=Object.create(Object.getPrototypeOf(e)),t.set(e,o);let s=Oo(e);for(let a of s){let l=Object.getOwnPropertyDescriptor(e,a);if(!l)continue;let c=Mo(e[a],t,n);n.forceWritable?Object.defineProperty(o,a,{enumerable:l.enumerable,configurable:true,writable:true,value:c}):"get"in l?Object.defineProperty(o,a,{...l,get(){return c}}):Object.defineProperty(o,a,{...l,value:c});}return o}return e}i(Mo,"clone");function Ao(){}i(Ao,"noop");function $o(e,t,n=void 0){let r=t.replace(/\[(\d+)\]/g,".$1").split("."),o=e;for(let s of r)if(o=new Object(o)[s],o===void 0)return n;return o}i($o,"objectAttr");function Jn(){let e=null,t=null,n=new Promise((r,o)=>{e=r,t=o;});return n.resolve=e,n.reject=t,n}i(Jn,"createDefer");function xc(e){let t=-1,n=null,r=0,o=0,s=null;for(;t<=e.length;){s=e[t],t++;let a=e[t];if((a==='"'||a==="'"||a==="`")&&s!=="\\"&&(n===a?n=null:n||(n=a)),n||(a==="("&&r++,a===")"&&o++),r&&o&&r===o)return t}return null}i(xc,"getCallLastIndex");function kc(e){if(!Number.isNaN(e))return false;let t=new Float64Array(1);return t[0]=e,new Uint32Array(t.buffer)[1]>>>31===1}i(kc,"isNegativeNaN");function lt(e){let t=e%10,n=e%100;return t===1&&n!==11?`${e}st`:t===2&&n!==12?`${e}nd`:t===3&&n!==13?`${e}rd`:`${e}th`}i(lt,"ordinal");function No(e){return Array.from(new Set(e))}i(No,"unique");var Ee=-1,be=1,ce=0,ie=class{static{i(this,"Diff");}0;1;constructor(t,n){this[0]=t,this[1]=n;}};function Dp(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;let n=0,r=Math.min(e.length,t.length),o=r,s=0;for(;n<o;)e.substring(s,o)===t.substring(s,o)?(n=o,s=n):r=o,o=Math.floor((r-n)/2+n);return o}i(Dp,"diff_commonPrefix");function Bc(e,t){if(!e||!t||e.charAt(e.length-1)!==t.charAt(t.length-1))return 0;let n=0,r=Math.min(e.length,t.length),o=r,s=0;for(;n<o;)e.substring(e.length-o,e.length-s)===t.substring(t.length-o,t.length-s)?(n=o,s=n):r=o,o=Math.floor((r-n)/2+n);return o}i(Bc,"diff_commonSuffix");function _c(e,t){let n=e.length,r=t.length;if(n===0||r===0)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));let o=Math.min(n,r);if(e===t)return o;let s=0,a=1;for(;;){let l=e.substring(o-a),c=t.indexOf(l);if(c===-1)return s;a+=c,(c===0||e.substring(o-a)===t.substring(0,a))&&(s=a,a++);}}i(_c,"diff_commonOverlap_");function Lp(e){let t=false,n=[],r=0,o=null,s=0,a=0,l=0,c=0,u=0;for(;s<e.length;)e[s][0]===ce?(n[r++]=s,a=c,l=u,c=0,u=0,o=e[s][1]):(e[s][0]===be?c+=e[s][1].length:u+=e[s][1].length,o&&o.length<=Math.max(a,l)&&o.length<=Math.max(c,u)&&(e.splice(n[r-1],0,new ie(Ee,o)),e[n[r-1]+1][0]=be,r--,r--,s=r>0?n[r-1]:-1,a=0,l=0,c=0,u=0,o=null,t=true)),s++;for(t&&qc(e),Up(e),s=1;s<e.length;){if(e[s-1][0]===Ee&&e[s][0]===be){let f=e[s-1][1],h=e[s][1],p=_c(f,h),d=_c(h,f);p>=d?(p>=f.length/2||p>=h.length/2)&&(e.splice(s,0,new ie(ce,h.substring(0,p))),e[s-1][1]=f.substring(0,f.length-p),e[s+1][1]=h.substring(p),s++):(d>=f.length/2||d>=h.length/2)&&(e.splice(s,0,new ie(ce,f.substring(0,d))),e[s-1][0]=be,e[s-1][1]=h.substring(0,h.length-d),e[s+1][0]=Ee,e[s+1][1]=f.substring(d),s++),s++;}s++;}}i(Lp,"diff_cleanupSemantic");var Mc=/[^a-z0-9]/i,Cc=/\s/,Oc=/[\r\n]/,Bp=/\n\r?\n$/,qp=/^\r?\n\r?\n/;function Up(e){let t=1;for(;t<e.length-1;){if(e[t-1][0]===ce&&e[t+1][0]===ce){let n=e[t-1][1],r=e[t][1],o=e[t+1][1],s=Bc(n,r);if(s){let f=r.substring(r.length-s);n=n.substring(0,n.length-s),r=f+r.substring(0,r.length-s),o=f+o;}let a=n,l=r,c=o,u=Yn(n,r)+Yn(r,o);for(;r.charAt(0)===o.charAt(0);){n+=r.charAt(0),r=r.substring(1)+o.charAt(0),o=o.substring(1);let f=Yn(n,r)+Yn(r,o);f>=u&&(u=f,a=n,l=r,c=o);}e[t-1][1]!==a&&(a?e[t-1][1]=a:(e.splice(t-1,1),t--),e[t][1]=l,c?e[t+1][1]=c:(e.splice(t+1,1),t--));}t++;}}i(Up,"diff_cleanupSemanticLossless");function qc(e){e.push(new ie(ce,""));let t=0,n=0,r=0,o="",s="",a;for(;t<e.length;)switch(e[t][0]){case be:r++,s+=e[t][1],t++;break;case Ee:n++,o+=e[t][1],t++;break;case ce:n+r>1?(n!==0&&r!==0&&(a=Dp(s,o),a!==0&&(t-n-r>0&&e[t-n-r-1][0]===ce?e[t-n-r-1][1]+=s.substring(0,a):(e.splice(0,0,new ie(ce,s.substring(0,a))),t++),s=s.substring(a),o=o.substring(a)),a=Bc(s,o),a!==0&&(e[t][1]=s.substring(s.length-a)+e[t][1],s=s.substring(0,s.length-a),o=o.substring(0,o.length-a))),t-=n+r,e.splice(t,n+r),o.length&&(e.splice(t,0,new ie(Ee,o)),t++),s.length&&(e.splice(t,0,new ie(be,s)),t++),t++):t!==0&&e[t-1][0]===ce?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,r=0,n=0,o="",s="";break}e.at(-1)?.[1]===""&&e.pop();let l=false;for(t=1;t<e.length-1;)e[t-1][0]===ce&&e[t+1][0]===ce&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)===e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),l=true):e[t][1].substring(0,e[t+1][1].length)===e[t+1][1]&&(e[t-1][1]+=e[t+1][1],e[t][1]=e[t][1].substring(e[t+1][1].length)+e[t+1][1],e.splice(t+1,1),l=true)),t++;l&&qc(e);}i(qc,"diff_cleanupMerge");function Yn(e,t){if(!e||!t)return 6;let n=e.charAt(e.length-1),r=t.charAt(0),o=n.match(Mc),s=r.match(Mc),a=o&&n.match(Cc),l=s&&r.match(Cc),c=a&&n.match(Oc),u=l&&r.match(Oc),f=c&&e.match(Bp),h=u&&t.match(qp);return f||h?5:c||u?4:o&&!a&&l?3:a||l?2:o||s?1:0}i(Yn,"diff_cleanupSemanticScore_");var Uc="Compared values have no visual difference.",zp="Compared values serialize to the same structure.\nPrinting internal object structure without calling `toJSON` instead.";function Wp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}i(Wp,"getDefaultExportFromCjs");var Xn={},Ic;function Vp(){if(Ic)return Xn;Ic=1,Object.defineProperty(Xn,"__esModule",{value:true}),Xn.default=p;let e="diff-sequences",t=0,n=i((d,g,m,b,S)=>{let _=0;for(;d<g&&m<b&&S(d,m);)d+=1,m+=1,_+=1;return _},"countCommonItemsF"),r=i((d,g,m,b,S)=>{let _=0;for(;d<=g&&m<=b&&S(g,b);)g-=1,b-=1,_+=1;return _},"countCommonItemsR"),o=i((d,g,m,b,S,_,A)=>{let M=0,O=-d,N=_[M],C=N;_[M]+=n(N+1,g,b+N-O+1,m,S);let L=d<A?d:A;for(M+=1,O+=2;M<=L;M+=1,O+=2){if(M!==d&&C<_[M])N=_[M];else if(N=C+1,g<=N)return M-1;C=_[M],_[M]=N+n(N+1,g,b+N-O+1,m,S);}return A},"extendPathsF"),s=i((d,g,m,b,S,_,A)=>{let M=0,O=d,N=_[M],C=N;_[M]-=r(g,N-1,m,b+N-O-1,S);let L=d<A?d:A;for(M+=1,O-=2;M<=L;M+=1,O-=2){if(M!==d&&_[M]<C)N=_[M];else if(N=C-1,N<g)return M-1;C=_[M],_[M]=N-r(g,N-1,m,b+N-O-1,S);}return A},"extendPathsR"),a=i((d,g,m,b,S,_,A,M,O,N,C)=>{let L=b-g,ee=m-g,W=S-b-ee,Y=-W-(d-1),ge=-W+(d-1),le=t,V=d<M?d:M;for(let U=0,te=-d;U<=V;U+=1,te+=2){let _e=U===0||U!==d&&le<A[U],fe=_e?A[U]:le,me=_e?fe:fe+1,je=L+me-te,xe=n(me+1,m,je+1,S,_),Me=me+xe;if(le=A[U],A[U]=Me,Y<=te&&te<=ge){let it=(d-1-(te+W))/2;if(it<=N&&O[it]-1<=Me){let ze=L+fe-(_e?te+1:te-1),Ce=r(g,fe,b,ze,_),Oe=fe-Ce,jt=ze-Ce,Qe=Oe+1,rn=jt+1;C.nChangePreceding=d-1,d-1===Qe+rn-g-b?(C.aEndPreceding=g,C.bEndPreceding=b):(C.aEndPreceding=Qe,C.bEndPreceding=rn),C.nCommonPreceding=Ce,Ce!==0&&(C.aCommonPreceding=Qe,C.bCommonPreceding=rn),C.nCommonFollowing=xe,xe!==0&&(C.aCommonFollowing=me+1,C.bCommonFollowing=je+1);let Se=Me+1,et=je+xe+1;return C.nChangeFollowing=d-1,d-1===m+S-Se-et?(C.aStartFollowing=m,C.bStartFollowing=S):(C.aStartFollowing=Se,C.bStartFollowing=et),true}}}return false},"extendOverlappablePathsF"),l=i((d,g,m,b,S,_,A,M,O,N,C)=>{let L=S-m,ee=m-g,W=S-b-ee,Y=W-d,ge=W+d,le=t,V=d<N?d:N;for(let U=0,te=d;U<=V;U+=1,te-=2){let _e=U===0||U!==d&&O[U]<le,fe=_e?O[U]:le,me=_e?fe:fe-1,je=L+me-te,xe=r(g,me-1,b,je-1,_),Me=me-xe;if(le=O[U],O[U]=Me,Y<=te&&te<=ge){let it=(d+(te-W))/2;if(it<=M&&Me-1<=A[it]){let ze=je-xe;if(C.nChangePreceding=d,d===Me+ze-g-b?(C.aEndPreceding=g,C.bEndPreceding=b):(C.aEndPreceding=Me,C.bEndPreceding=ze),C.nCommonPreceding=xe,xe!==0&&(C.aCommonPreceding=Me,C.bCommonPreceding=ze),C.nChangeFollowing=d-1,d===1)C.nCommonFollowing=0,C.aStartFollowing=m,C.bStartFollowing=S;else {let Ce=L+fe-(_e?te-1:te+1),Oe=n(fe,m,Ce,S,_);C.nCommonFollowing=Oe,Oe!==0&&(C.aCommonFollowing=fe,C.bCommonFollowing=Ce);let jt=fe+Oe,Qe=Ce+Oe;d-1===m+S-jt-Qe?(C.aStartFollowing=m,C.bStartFollowing=S):(C.aStartFollowing=jt,C.bStartFollowing=Qe);}return true}}}return false},"extendOverlappablePathsR"),c=i((d,g,m,b,S,_,A,M,O)=>{let N=b-g,C=S-m,L=m-g,ee=S-b,j=ee-L,W=L,Y=L;if(A[0]=g-1,M[0]=m,j%2===0){let ge=(d||j)/2,le=(L+ee)/2;for(let V=1;V<=le;V+=1)if(W=o(V,m,S,N,_,A,W),V<ge)Y=s(V,g,b,C,_,M,Y);else if(l(V,g,m,b,S,_,A,W,M,Y,O))return}else {let ge=((d||j)+1)/2,le=(L+ee+1)/2,V=1;for(W=o(V,m,S,N,_,A,W),V+=1;V<=le;V+=1)if(Y=s(V-1,g,b,C,_,M,Y),V<ge)W=o(V,m,S,N,_,A,W);else if(a(V,g,m,b,S,_,A,W,M,Y,O))return}throw new Error(`${e}: no overlap aStart=${g} aEnd=${m} bStart=${b} bEnd=${S}`)},"divide"),u=i((d,g,m,b,S,_,A,M,O,N)=>{if(S-b<m-g){if(_=!_,_&&A.length===1){let{foundSubsequence:Me,isCommon:it}=A[0];A[1]={foundSubsequence:i((ze,Ce,Oe)=>{Me(ze,Oe,Ce);},"foundSubsequence"),isCommon:i((ze,Ce)=>it(Ce,ze),"isCommon")};}let je=g,xe=m;g=b,m=S,b=je,S=xe;}let{foundSubsequence:C,isCommon:L}=A[_?1:0];c(d,g,m,b,S,L,M,O,N);let{nChangePreceding:ee,aEndPreceding:j,bEndPreceding:W,nCommonPreceding:Y,aCommonPreceding:ge,bCommonPreceding:le,nCommonFollowing:V,aCommonFollowing:U,bCommonFollowing:te,nChangeFollowing:_e,aStartFollowing:fe,bStartFollowing:me}=N;g<j&&b<W&&u(ee,g,j,b,W,_,A,M,O,N),Y!==0&&C(Y,ge,le),V!==0&&C(V,U,te),fe<m&&me<S&&u(_e,fe,m,me,S,_,A,M,O,N);},"findSubsequences"),f=i((d,g)=>{if(typeof g!="number")throw new TypeError(`${e}: ${d} typeof ${typeof g} is not a number`);if(!Number.isSafeInteger(g))throw new RangeError(`${e}: ${d} value ${g} is not a safe integer`);if(g<0)throw new RangeError(`${e}: ${d} value ${g} is a negative integer`)},"validateLength"),h=i((d,g)=>{let m=typeof g;if(m!=="function")throw new TypeError(`${e}: ${d} typeof ${m} is not a function`)},"validateCallback");function p(d,g,m,b){f("aLength",d),f("bLength",g),h("isCommon",m),h("foundSubsequence",b);let S=n(0,d,0,g,m);if(S!==0&&b(S,0,0),d!==S||g!==S){let _=S,A=S,M=r(_,d-1,A,g-1,m),O=d-M,N=g-M,C=S+M;d!==C&&g!==C&&u(0,_,O,A,N,false,[{foundSubsequence:b,isCommon:m}],[t],[t],{aCommonFollowing:t,aCommonPreceding:t,aEndPreceding:t,aStartFollowing:t,bCommonFollowing:t,bCommonPreceding:t,bEndPreceding:t,bStartFollowing:t,nChangeFollowing:t,nChangePreceding:t,nCommonFollowing:t,nCommonPreceding:t}),M!==0&&b(M,O,N);}}return i(p,"diffSequence"),Xn}i(Vp,"requireBuild");var Kp=Vp(),zc=Wp(Kp);function Hp(e,t){return e.replace(/\s+$/,n=>t(n))}i(Hp,"formatTrailingSpaces");function Bo(e,t,n,r,o,s){return e.length!==0?n(`${r} ${Hp(e,o)}`):r!==" "?n(r):t&&s.length!==0?n(`${r} ${s}`):""}i(Bo,"printDiffLine");function Wc(e,t,{aColor:n,aIndicator:r,changeLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:s}){return Bo(e,t,n,r,o,s)}i(Wc,"printDeleteLine");function Vc(e,t,{bColor:n,bIndicator:r,changeLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:s}){return Bo(e,t,n,r,o,s)}i(Vc,"printInsertLine");function Kc(e,t,{commonColor:n,commonIndicator:r,commonLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:s}){return Bo(e,t,n,r,o,s)}i(Kc,"printCommonLine");function Ac(e,t,n,r,{patchColor:o}){return o(`@@ -${e+1},${t-e} +${n+1},${r-n} @@`)}i(Ac,"createPatchMark");function Gp(e,t){let n=e.length,r=t.contextLines,o=r+r,s=n,a=false,l=0,c=0;for(;c!==n;){let M=c;for(;c!==n&&e[c][0]===ce;)c+=1;if(M!==c)if(M===0)c>r&&(s-=c-r,a=true);else if(c===n){let O=c-M;O>r&&(s-=O-r,a=true);}else {let O=c-M;O>o&&(s-=O-o,l+=1);}for(;c!==n&&e[c][0]!==ce;)c+=1;}let u=l!==0||a;l!==0?s+=l+1:a&&(s+=1);let f=s-1,h=[],p=0;u&&h.push("");let d=0,g=0,m=0,b=0,S=i(M=>{let O=h.length;h.push(Kc(M,O===0||O===f,t)),m+=1,b+=1;},"pushCommonLine"),_=i(M=>{let O=h.length;h.push(Wc(M,O===0||O===f,t)),m+=1;},"pushDeleteLine"),A=i(M=>{let O=h.length;h.push(Vc(M,O===0||O===f,t)),b+=1;},"pushInsertLine");for(c=0;c!==n;){let M=c;for(;c!==n&&e[c][0]===ce;)c+=1;if(M!==c)if(M===0){c>r&&(M=c-r,d=M,g=M,m=d,b=g);for(let O=M;O!==c;O+=1)S(e[O][1]);}else if(c===n){let O=c-M>r?M+r:c;for(let N=M;N!==O;N+=1)S(e[N][1]);}else {let O=c-M;if(O>o){let N=M+r;for(let L=M;L!==N;L+=1)S(e[L][1]);h[p]=Ac(d,m,g,b,t),p=h.length,h.push("");let C=O-o;d=m+C,g=b+C,m=d,b=g;for(let L=c-r;L!==c;L+=1)S(e[L][1]);}else for(let N=M;N!==c;N+=1)S(e[N][1]);}for(;c!==n&&e[c][0]===Ee;)_(e[c][1]),c+=1;for(;c!==n&&e[c][0]===be;)A(e[c][1]),c+=1;}return u&&(h[p]=Ac(d,m,g,b,t)),h.join(`
20
- `)}i(Gp,"joinAlignedDiffsNoExpand");function Jp(e,t){return e.map((n,r,o)=>{let s=n[1],a=r===0||r===o.length-1;switch(n[0]){case Ee:return Wc(s,a,t);case be:return Vc(s,a,t);default:return Kc(s,a,t)}}).join(`
21
- `)}i(Jp,"joinAlignedDiffsExpand");var Po=i(e=>e,"noColor"),Hc=5,Yp=0;function Xp(){return {aAnnotation:"Expected",aColor:se.green,aIndicator:"-",bAnnotation:"Received",bColor:se.red,bIndicator:"+",changeColor:se.inverse,changeLineTrailingSpaceColor:Po,commonColor:se.dim,commonIndicator:" ",commonLineTrailingSpaceColor:Po,compareKeys:void 0,contextLines:Hc,emptyFirstOrLastLinePlaceholder:"",expand:false,includeChangeCounts:false,omitAnnotationLines:false,patchColor:se.yellow,printBasicPrototype:false,truncateThreshold:Yp,truncateAnnotation:"... Diff result is truncated",truncateAnnotationColor:Po}}i(Xp,"getDefaultOptions");function Zp(e){return e&&typeof e=="function"?e:void 0}i(Zp,"getCompareKeys");function Qp(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0?e:Hc}i(Qp,"getContextLines");function Mt(e={}){return {...Xp(),...e,compareKeys:Zp(e.compareKeys),contextLines:Qp(e.contextLines)}}i(Mt,"normalizeDiffOptions");function Bt(e){return e.length===1&&e[0].length===0}i(Bt,"isEmptyString");function em(e){let t=0,n=0;return e.forEach(r=>{switch(r[0]){case Ee:t+=1;break;case be:n+=1;break}}),{a:t,b:n}}i(em,"countChanges");function tm({aAnnotation:e,aColor:t,aIndicator:n,bAnnotation:r,bColor:o,bIndicator:s,includeChangeCounts:a,omitAnnotationLines:l},c){if(l)return "";let u="",f="";if(a){let d=String(c.a),g=String(c.b),m=r.length-e.length,b=" ".repeat(Math.max(0,m)),S=" ".repeat(Math.max(0,-m)),_=g.length-d.length,A=" ".repeat(Math.max(0,_)),M=" ".repeat(Math.max(0,-_));u=`${b} ${n} ${A}${d}`,f=`${S} ${s} ${M}${g}`;}let h=`${n} ${e}${u}`,p=`${s} ${r}${f}`;return `${t(h)}
22
- ${o(p)}
23
-
24
- `}i(tm,"printAnnotation");function qo(e,t,n){return tm(n,em(e))+(n.expand?Jp(e,n):Gp(e,n))+(t?n.truncateAnnotationColor(`
25
- ${n.truncateAnnotation}`):"")}i(qo,"printDiffLines");function tr(e,t,n){let r=Mt(n),[o,s]=Gc(Bt(e)?[]:e,Bt(t)?[]:t,r);return qo(o,s,r)}i(tr,"diffLinesUnified");function nm(e,t,n,r,o){if(Bt(e)&&Bt(n)&&(e=[],n=[]),Bt(t)&&Bt(r)&&(t=[],r=[]),e.length!==n.length||t.length!==r.length)return tr(e,t,o);let[s,a]=Gc(n,r,o),l=0,c=0;return s.forEach(u=>{switch(u[0]){case Ee:u[1]=e[l],l+=1;break;case be:u[1]=t[c],c+=1;break;default:u[1]=t[c],l+=1,c+=1;}}),qo(s,a,Mt(o))}i(nm,"diffLinesUnified2");function Gc(e,t,n){let r=n?.truncateThreshold??false,o=Math.max(Math.floor(n?.truncateThreshold??0),0),s=r?Math.min(e.length,o):e.length,a=r?Math.min(t.length,o):t.length,l=s!==e.length||a!==t.length,c=i((d,g)=>e[d]===t[g],"isCommon"),u=[],f=0,h=0;for(zc(s,a,c,i((d,g,m)=>{for(;f!==g;f+=1)u.push(new ie(Ee,e[f]));for(;h!==m;h+=1)u.push(new ie(be,t[h]));for(;d!==0;d-=1,f+=1,h+=1)u.push(new ie(ce,t[h]));},"foundSubsequence"));f!==s;f+=1)u.push(new ie(Ee,e[f]));for(;h!==a;h+=1)u.push(new ie(be,t[h]));return [u,l]}i(Gc,"diffLinesRaw");function $c(e){if(e===void 0)return "undefined";if(e===null)return "null";if(Array.isArray(e))return "array";if(typeof e=="boolean")return "boolean";if(typeof e=="function")return "function";if(typeof e=="number")return "number";if(typeof e=="string")return "string";if(typeof e=="bigint")return "bigint";if(typeof e=="object"){if(e!=null){if(e.constructor===RegExp)return "regexp";if(e.constructor===Map)return "map";if(e.constructor===Set)return "set";if(e.constructor===Date)return "date"}return "object"}else if(typeof e=="symbol")return "symbol";throw new Error(`value of unknown type: ${e}`)}i($c,"getType");function Nc(e){return e.includes(`\r
17
+ `,maxOutputLength:e?.maxOutputLength??We.maxOutputLength,_outputLengthPerDepth:[]}}i(Ma,"getConfig");function Kp(e){return Array.from({length:e+1}).join(" ")}i(Kp,"createIndent");function $e(e,t){if(t&&(zp(t),t.plugins)){let r=Wa(t.plugins,e);if(r!==null)return za(r,e,Ma(t),"",0,[])}let n=qa(e,Ka(t),Ha(t),Ga(t));return n!==null?n:Ua(e,Ma(t),"",0,[])}i($e,"format");var kt={AsymmetricMatcher:jh,DOMCollection:zh,DOMElement:Qh,Immutable:dp,ReactElement:Cp,ReactTestComponent:$p,Error:qp};var Ja={bold:["1","22"],dim:["2","22"],italic:["3","23"],underline:["4","24"],inverse:["7","27"],hidden:["8","28"],strike:["9","29"],black:["30","39"],red:["31","39"],green:["32","39"],yellow:["33","39"],blue:["34","39"],magenta:["35","39"],cyan:["36","39"],white:["37","39"],brightblack:["30;1","39"],brightred:["31;1","39"],brightgreen:["32;1","39"],brightyellow:["33;1","39"],brightblue:["34;1","39"],brightmagenta:["35;1","39"],brightcyan:["36;1","39"],brightwhite:["37;1","39"],grey:["90","39"]},Hp={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},Dt="\u2026";function Gp(e,t){let n=Ja[Hp[t]]||Ja[t]||"";return n?`\x1B[${n[0]}m${String(e)}\x1B[${n[1]}m`:String(e)}i(Gp,"colorise");function Jp({showHidden:e=false,depth:t=2,colors:n=false,customInspect:r=true,showProxy:o=false,maxArrayLength:s=1/0,breakLength:a=1/0,seen:l=[],truncate:c=1/0,stylize:u=String}={},f){let h={showHidden:!!e,depth:Number(t),colors:!!n,customInspect:!!r,showProxy:!!o,maxArrayLength:Number(s),breakLength:Number(a),truncate:Number(c),seen:l,inspect:f,stylize:u};return h.colors&&(h.stylize=Gp),h}i(Jp,"normaliseOptions");function Yp(e){return e>="\uD800"&&e<="\uDBFF"}i(Yp,"isHighSurrogate");function wt(e,t,n=Dt){e=String(e);let r=n.length,o=e.length;if(r>t&&o>r)return n;if(o>t&&o>r){let s=t-r;return s>0&&Yp(e[s-1])&&(s=s-1),`${e.slice(0,s)}${n}`}return e}i(wt,"truncate");function Ye(e,t,n,r=", "){n=n||t.inspect;let o=e.length;if(o===0)return "";let s=t.truncate,a="",l="",c="";for(let u=0;u<o;u+=1){let f=u+1===e.length,h=u+2===e.length;c=`${Dt}(${e.length-u})`;let d=e[u];t.truncate=s-a.length-(f?0:r.length);let p=l||n(d,t)+(f?"":r),g=a.length+p.length,m=g+c.length;if(f&&g>s&&a.length+c.length<=s||!f&&!h&&m>s||(l=f?"":n(e[u+1],t)+(h?"":r),!f&&h&&m>s&&g+l.length>s))break;if(a+=p,!f&&!h&&g+l.length>=s){c=`${Dt}(${e.length-u-1})`;break}c="";}return `${a}${c}`}i(Ye,"inspectList");function Xp(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}i(Xp,"quoteComplexKey");function cn([e,t],n){return n.truncate-=2,typeof e=="string"?e=Xp(e):typeof e!="number"&&(e=`[${n.inspect(e,n)}]`),n.truncate-=e.length,t=n.inspect(t,n),`${e}: ${t}`}i(cn,"inspectProperty");function Zp(e,t){let n=Object.keys(e).slice(e.length);if(!e.length&&!n.length)return "[]";t.truncate-=4;let r=Ye(e,t);t.truncate-=r.length;let o="";return n.length&&(o=Ye(n.map(s=>[s,e[s]]),t,cn)),`[ ${r}${o?`, ${o}`:""} ]`}i(Zp,"inspectArray");var Qp=i(e=>typeof Buffer=="function"&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name,"getArrayName");function ct(e,t){let n=Qp(e);t.truncate-=n.length+4;let r=Object.keys(e).slice(e.length);if(!e.length&&!r.length)return `${n}[]`;let o="";for(let a=0;a<e.length;a++){let l=`${t.stylize(wt(e[a],t.truncate),"number")}${a===e.length-1?"":", "}`;if(t.truncate-=l.length,e[a]!==e.length&&t.truncate<=3){o+=`${Dt}(${e.length-e[a]+1})`;break}o+=l;}let s="";return r.length&&(s=Ye(r.map(a=>[a,e[a]]),t,cn)),`${n}[ ${o}${s?`, ${s}`:""} ]`}i(ct,"inspectTypedArray");function ed(e,t){let n=e.toJSON();if(n===null)return "Invalid Date";let r=n.split("T"),o=r[0];return t.stylize(`${o}T${wt(r[1],t.truncate-o.length-1)}`,"date")}i(ed,"inspectDate");function Ya(e,t){let n=e[Symbol.toStringTag]||"Function",r=e.name;return r?t.stylize(`[${n} ${wt(r,t.truncate-11)}]`,"special"):t.stylize(`[${n}]`,"special")}i(Ya,"inspectFunction");function td([e,t],n){return n.truncate-=4,e=n.inspect(e,n),n.truncate-=e.length,t=n.inspect(t,n),`${e} => ${t}`}i(td,"inspectMapEntry");function nd(e){let t=[];return e.forEach((n,r)=>{t.push([r,n]);}),t}i(nd,"mapToEntries");function rd(e,t){return e.size===0?"Map{}":(t.truncate-=7,`Map{ ${Ye(nd(e),t,td)} }`)}i(rd,"inspectMap");var od=Number.isNaN||(e=>e!==e);function Xa(e,t){return od(e)?t.stylize("NaN","number"):e===1/0?t.stylize("Infinity","number"):e===-1/0?t.stylize("-Infinity","number"):e===0?t.stylize(1/e===1/0?"+0":"-0","number"):t.stylize(wt(String(e),t.truncate),"number")}i(Xa,"inspectNumber");function Za(e,t){let n=wt(e.toString(),t.truncate-1);return n!==Dt&&(n+="n"),t.stylize(n,"bigint")}i(Za,"inspectBigInt");function sd(e,t){let n=e.toString().split("/")[2],r=t.truncate-(2+n.length),o=e.source;return t.stylize(`/${wt(o,r)}/${n}`,"regexp")}i(sd,"inspectRegExp");function id(e){let t=[];return e.forEach(n=>{t.push(n);}),t}i(id,"arrayFromSet");function ad(e,t){return e.size===0?"Set{}":(t.truncate-=7,`Set{ ${Ye(id(e),t)} }`)}i(ad,"inspectSet");var Qa=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),cd={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},ld=16;function ud(e){return cd[e]||`\\u${`0000${e.charCodeAt(0).toString(ld)}`.slice(-4)}`}i(ud,"escape");function ec(e,t){return Qa.test(e)&&(e=e.replace(Qa,ud)),t.stylize(`'${wt(e,t.truncate-2)}'`,"string")}i(ec,"inspectString");function tc(e){return "description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString()}i(tc,"inspectSymbol");var fd=i(()=>"Promise{\u2026}","getPromiseValue");function Hn(e,t){let n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[];if(n.length===0&&r.length===0)return "{}";if(t.truncate-=4,t.seen=t.seen||[],t.seen.includes(e))return "[Circular]";t.seen.push(e);let o=Ye(n.map(l=>[l,e[l]]),t,cn),s=Ye(r.map(l=>[l,e[l]]),t,cn);t.seen.pop();let a="";return o&&s&&(a=", "),`{ ${o}${a}${s} }`}i(Hn,"inspectObject$1");var To=typeof Symbol<"u"&&Symbol.toStringTag?Symbol.toStringTag:false;function hd(e,t){let n="";return To&&To in e&&(n=e[To]),n=n||e.constructor.name,(!n||n==="_class")&&(n="<Anonymous Class>"),t.truncate-=n.length,`${n}${Hn(e,t)}`}i(hd,"inspectClass");function pd(e,t){return e.length===0?"Arguments[]":(t.truncate-=13,`Arguments[ ${Ye(e,t)} ]`)}i(pd,"inspectArguments");var dd=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function md(e,t){let n=Object.getOwnPropertyNames(e).filter(a=>dd.indexOf(a)===-1),r=e.name;t.truncate-=r.length;let o="";if(typeof e.message=="string"?o=wt(e.message,t.truncate):n.unshift("message"),o=o?`: ${o}`:"",t.truncate-=o.length+5,t.seen=t.seen||[],t.seen.includes(e))return "[Circular]";t.seen.push(e);let s=Ye(n.map(a=>[a,e[a]]),t,cn);return `${r}${o}${s?` { ${s} }`:""}`}i(md,"inspectObject");function gd([e,t],n){return n.truncate-=3,t?`${n.stylize(String(e),"yellow")}=${n.stylize(`"${t}"`,"string")}`:`${n.stylize(String(e),"yellow")}`}i(gd,"inspectAttribute");function vo(e,t){return Ye(e,t,yd,`
18
+ `)}i(vo,"inspectNodeCollection");function yd(e,t){switch(e.nodeType){case 1:return sc(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}i(yd,"inspectNode");function sc(e,t){let n=e.getAttributeNames(),r=e.tagName.toLowerCase(),o=t.stylize(`<${r}`,"special"),s=t.stylize(">","special"),a=t.stylize(`</${r}>`,"special");t.truncate-=r.length*2+5;let l="";n.length>0&&(l+=" ",l+=Ye(n.map(f=>[f,e.getAttribute(f)]),t,gd," ")),t.truncate-=l.length;let c=t.truncate,u=vo(e.children,t);return u&&u.length>c&&(u=`${Dt}(${e.children.length})`),`${o}${l}${s}${u}${a}`}i(sc,"inspectHTML");var wd=typeof Symbol=="function"&&typeof Symbol.for=="function",So=wd?Symbol.for("chai/inspect"):"@@chai/inspect",Eo=Symbol.for("nodejs.util.inspect.custom"),nc=new WeakMap,rc={},oc={undefined:i((e,t)=>t.stylize("undefined","undefined"),"undefined"),null:i((e,t)=>t.stylize("null","null"),"null"),boolean:i((e,t)=>t.stylize(String(e),"boolean"),"boolean"),Boolean:i((e,t)=>t.stylize(String(e),"boolean"),"Boolean"),number:Xa,Number:Xa,bigint:Za,BigInt:Za,string:ec,String:ec,function:Ya,Function:Ya,symbol:tc,Symbol:tc,Array:Zp,Date:ed,Map:rd,Set:ad,RegExp:sd,Promise:fd,WeakSet:i((e,t)=>t.stylize("WeakSet{\u2026}","special"),"WeakSet"),WeakMap:i((e,t)=>t.stylize("WeakMap{\u2026}","special"),"WeakMap"),Arguments:pd,Int8Array:ct,Uint8Array:ct,Uint8ClampedArray:ct,Int16Array:ct,Uint16Array:ct,Int32Array:ct,Uint32Array:ct,Float32Array:ct,Float64Array:ct,Generator:i(()=>"","Generator"),DataView:i(()=>"","DataView"),ArrayBuffer:i(()=>"","ArrayBuffer"),Error:md,HTMLCollection:vo,NodeList:vo},bd=i((e,t,n,r)=>So in e&&typeof e[So]=="function"?e[So](t):Eo in e&&typeof e[Eo]=="function"?e[Eo](t.depth,t,r):"inspect"in e&&typeof e.inspect=="function"?e.inspect(t.depth,t):"constructor"in e&&nc.has(e.constructor)?nc.get(e.constructor)(e,t):rc[n]?rc[n](e,t):"","inspectCustom"),Td=Object.prototype.toString;function Gn(e,t={}){let n=Jp(t,Gn),{customInspect:r}=n,o=e===null?"null":typeof e;if(o==="object"&&(o=Td.call(e).slice(8,-1)),o in oc)return oc[o](e,n);if(r&&e){let a=bd(e,n,o,Gn);if(a)return typeof a=="string"?a:Gn(a,n)}let s=e?Object.getPrototypeOf(e):false;return s===Object.prototype||s===null?Hn(e,n):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?sc(e,n):"constructor"in e?e.constructor!==Object?hd(e,n):Hn(e,n):e===Object(e)?Hn(e,n):n.stylize(String(e),o)}i(Gn,"inspect$1");var{AsymmetricMatcher:ic,DOMCollection:ac,DOMElement:Sd,Immutable:cc,ReactElement:lc,ReactTestComponent:uc}=kt,Ed=[uc,lc,Sd,ac,cc,ic];function ye(e,t=10,{maxLength:n,filterNode:r,...o}={}){let s=n??1e4,a,l=typeof r=="string"?vd(r):r,c=l?[uc,lc,Ra(l),ac,cc,ic]:Ed;try{a=$e(e,{maxDepth:t,escapeString:false,plugins:c,...o});}catch{a=$e(e,{callToJSON:false,maxDepth:t,escapeString:false,plugins:c,...o});}return a.length>=s&&t>1?ye(e,Math.floor(Math.min(t,Number.MAX_SAFE_INTEGER)/2),{maxLength:n,filterNode:r,...o}):a}i(ye,"stringify");function vd(e){return r=>{if(r.nodeType===8)return false;if(r.nodeType===1&&r.matches)try{return !r.matches(e)}catch{return true}return true}}i(vd,"createNodeFilterFromSelector");var xo=/%[sdjifoOc%]/g;function xd(e,t={}){let n=i((l,c)=>t.prettifyObject?ye(l,void 0,{printBasicPrototype:false,escapeString:false}):hc(l,c),"formatArg");if(typeof e[0]!="string"){let l=[];for(let c=0;c<e.length;c++)l.push(n(e[c],{depth:0,colors:false}));return l.join(" ")}let r=e.length,o=1,s=e[0],a=String(s).replace(xo,l=>{if(l==="%%")return "%";if(o>=r)return l;switch(l){case "%s":{let c=e[o++];return typeof c=="bigint"?`${c.toString()}n`:typeof c=="number"&&c===0&&1/c<0?"-0":typeof c=="object"&&c!==null?typeof c.toString=="function"&&c.toString!==Object.prototype.toString?c.toString():n(c,{depth:0,colors:false}):String(c)}case "%d":{let c=e[o++];return typeof c=="bigint"?`${c.toString()}n`:typeof c=="symbol"?"NaN":Number(c).toString()}case "%i":{let c=e[o++];return typeof c=="bigint"?`${c.toString()}n`:Number.parseInt(String(c)).toString()}case "%f":return Number.parseFloat(String(e[o++])).toString();case "%o":return n(e[o++],{showHidden:true,showProxy:true});case "%O":return n(e[o++]);case "%c":return o++,"";case "%j":try{return JSON.stringify(e[o++])}catch(c){let u=c.message;if(u.includes("circular structure")||u.includes("cyclic structures")||u.includes("cyclic object"))return "[Circular]";throw c}default:return l}});for(let l=e[o];o<r;l=e[++o])l===null||typeof l!="object"?a+=` ${typeof l=="symbol"?l.toString():l}`:a+=` ${n(l)}`;return a}i(xd,"baseFormat");function fc(...e){return xd(e)}i(fc,"format");function hc(e,t={}){return t.truncate===0&&(t.truncate=Number.POSITIVE_INFINITY),Gn(e,t)}i(hc,"inspect");function pc(e,t={}){typeof t.truncate>"u"&&(t.truncate=40);let n=hc(e,t),r=Object.prototype.toString.call(e);if(t.truncate&&n.length>=t.truncate)if(r==="[object Function]"){let o=e;return o.name?`[Function: ${o.name}]`:"[Function]"}else {if(r==="[object Array]")return `[ Array(${e.length}) ]`;if(r==="[object Object]"){let o=Object.keys(e);return `{ Object (${o.length>2?`${o.splice(0,2).join(", ")}, ...`:o.join(", ")}) }`}else return n}return n}i(pc,"objDisplay");function dc(e){let{message:t="$$stack trace error",stackTraceLimit:n=1}=e||{},r=Error.stackTraceLimit,o=Error.prepareStackTrace;Error.stackTraceLimit=n,Error.prepareStackTrace=l=>l.stack;let a=new Error(t).stack||"";return Error.prepareStackTrace=o,Error.stackTraceLimit=r,a}i(dc,"createSimpleStackTrace");function Mo(e){return e!=null}i(Mo,"notNullish");function pe(e,t,n){let r=typeof e;if(!n.includes(r))throw new TypeError(`${t} value must be ${n.join(" or ")}, received "${r}"`)}i(pe,"assertTypes");function mc(e){return e===null||typeof e!="function"&&typeof e!="object"}i(mc,"isPrimitive");function gc(e){let t=[],n="none";for(let r=0;r<e.length;++r)n==="singleline"?e[r]===`
19
+ `&&(n="none"):n==="multiline"?e[r-1]==="*"&&e[r]==="/"&&(n="none"):n==="none"&&(e[r]==="/"&&e[r+1]==="/"?n="singleline":e[r]==="/"&&e[r+1]==="*"?(n="multiline",r+=2):t.push(e[r]));return t.join("")}i(gc,"filterOutComments");function ln(e){return e==null&&(e=[]),Array.isArray(e)?e:[e]}i(ln,"toArray");function Le(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}i(Le,"isObject");function kd(e){return e===Object.prototype||e===Function.prototype||e===RegExp.prototype}i(kd,"isFinalObj");function Mt(e){return Object.prototype.toString.apply(e).slice(8,-1)}i(Mt,"getType");function Md(e,t){let n=typeof t=="function"?t:r=>t.add(r);Object.getOwnPropertyNames(e).forEach(n),Object.getOwnPropertySymbols(e).forEach(n);}i(Md,"collectOwnProperties");function Co(e){let t=new Set;return kd(e)?[]:(Md(e,t),Array.from(t))}i(Co,"getOwnProperties");var yc={forceWritable:false};function _o(e,t=yc){return ko(e,new WeakMap,t)}i(_o,"deepClone");function ko(e,t,n=yc){let r,o;if(t.has(e))return t.get(e);if(Array.isArray(e)){for(o=Array.from({length:r=e.length}),t.set(e,o);r--;)o[r]=ko(e[r],t,n);return o}if(Object.prototype.toString.call(e)==="[object Object]"){o=Object.create(Object.getPrototypeOf(e)),t.set(e,o);let s=Co(e);for(let a of s){let l=Object.getOwnPropertyDescriptor(e,a);if(!l)continue;let c=ko(e[a],t,n);n.forceWritable?Object.defineProperty(o,a,{enumerable:l.enumerable,configurable:true,writable:true,value:c}):"get"in l?Object.defineProperty(o,a,{...l,get(){return c}}):Object.defineProperty(o,a,{...l,value:c});}return o}return e}i(ko,"clone");function Oo(){}i(Oo,"noop");function Io(e,t,n=void 0){let r=t.replace(/\[(\d+)\]/g,".$1").split("."),o=e;for(let s of r)if(o=new Object(o)[s],o===void 0)return n;return o}i(Io,"objectAttr");function Jn(){let e=null,t=null,n=new Promise((r,o)=>{e=r,t=o;});return n.resolve=e,n.reject=t,n}i(Jn,"createDefer");function wc(e){let t=-1,n=null,r=0,o=0,s=null;for(;t<=e.length;){s=e[t],t++;let a=e[t];if((a==='"'||a==="'"||a==="`")&&s!=="\\"&&(n===a?n=null:n||(n=a)),n||(a==="("&&r++,a===")"&&o++),r&&o&&r===o)return t}return null}i(wc,"getCallLastIndex");function bc(e){if(!Number.isNaN(e))return false;let t=new Float64Array(1);return t[0]=e,new Uint32Array(t.buffer)[1]>>>31===1}i(bc,"isNegativeNaN");function lt(e){let t=e%10,n=e%100;return t===1&&n!==11?`${e}st`:t===2&&n!==12?`${e}nd`:t===3&&n!==13?`${e}rd`:`${e}th`}i(lt,"ordinal");function Ao(e){return Array.from(new Set(e))}i(Ao,"unique");var Ee=-1,we=1,ce=0,ie=class{static{i(this,"Diff");}0;1;constructor(t,n){this[0]=t,this[1]=n;}};function Cd(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;let n=0,r=Math.min(e.length,t.length),o=r,s=0;for(;n<o;)e.substring(s,o)===t.substring(s,o)?(n=o,s=n):r=o,o=Math.floor((r-n)/2+n);return o}i(Cd,"diff_commonPrefix");function Pc(e,t){if(!e||!t||e.charAt(e.length-1)!==t.charAt(t.length-1))return 0;let n=0,r=Math.min(e.length,t.length),o=r,s=0;for(;n<o;)e.substring(e.length-o,e.length-s)===t.substring(t.length-o,t.length-s)?(n=o,s=n):r=o,o=Math.floor((r-n)/2+n);return o}i(Pc,"diff_commonSuffix");function Tc(e,t){let n=e.length,r=t.length;if(n===0||r===0)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));let o=Math.min(n,r);if(e===t)return o;let s=0,a=1;for(;;){let l=e.substring(o-a),c=t.indexOf(l);if(c===-1)return s;a+=c,(c===0||e.substring(o-a)===t.substring(0,a))&&(s=a,a++);}}i(Tc,"diff_commonOverlap_");function _d(e){let t=false,n=[],r=0,o=null,s=0,a=0,l=0,c=0,u=0;for(;s<e.length;)e[s][0]===ce?(n[r++]=s,a=c,l=u,c=0,u=0,o=e[s][1]):(e[s][0]===we?c+=e[s][1].length:u+=e[s][1].length,o&&o.length<=Math.max(a,l)&&o.length<=Math.max(c,u)&&(e.splice(n[r-1],0,new ie(Ee,o)),e[n[r-1]+1][0]=we,r--,r--,s=r>0?n[r-1]:-1,a=0,l=0,c=0,u=0,o=null,t=true)),s++;for(t&&Rc(e),Ad(e),s=1;s<e.length;){if(e[s-1][0]===Ee&&e[s][0]===we){let f=e[s-1][1],h=e[s][1],d=Tc(f,h),p=Tc(h,f);d>=p?(d>=f.length/2||d>=h.length/2)&&(e.splice(s,0,new ie(ce,h.substring(0,d))),e[s-1][1]=f.substring(0,f.length-d),e[s+1][1]=h.substring(d),s++):(p>=f.length/2||p>=h.length/2)&&(e.splice(s,0,new ie(ce,f.substring(0,p))),e[s-1][0]=we,e[s-1][1]=h.substring(0,h.length-p),e[s+1][0]=Ee,e[s+1][1]=f.substring(p),s++),s++;}s++;}}i(_d,"diff_cleanupSemantic");var Sc=/[^a-z0-9]/i,Ec=/\s/,vc=/[\r\n]/,Od=/\n\r?\n$/,Id=/^\r?\n\r?\n/;function Ad(e){let t=1;for(;t<e.length-1;){if(e[t-1][0]===ce&&e[t+1][0]===ce){let n=e[t-1][1],r=e[t][1],o=e[t+1][1],s=Pc(n,r);if(s){let f=r.substring(r.length-s);n=n.substring(0,n.length-s),r=f+r.substring(0,r.length-s),o=f+o;}let a=n,l=r,c=o,u=Yn(n,r)+Yn(r,o);for(;r.charAt(0)===o.charAt(0);){n+=r.charAt(0),r=r.substring(1)+o.charAt(0),o=o.substring(1);let f=Yn(n,r)+Yn(r,o);f>=u&&(u=f,a=n,l=r,c=o);}e[t-1][1]!==a&&(a?e[t-1][1]=a:(e.splice(t-1,1),t--),e[t][1]=l,c?e[t+1][1]=c:(e.splice(t+1,1),t--));}t++;}}i(Ad,"diff_cleanupSemanticLossless");function Rc(e){e.push(new ie(ce,""));let t=0,n=0,r=0,o="",s="",a;for(;t<e.length;)switch(e[t][0]){case we:r++,s+=e[t][1],t++;break;case Ee:n++,o+=e[t][1],t++;break;case ce:n+r>1?(n!==0&&r!==0&&(a=Cd(s,o),a!==0&&(t-n-r>0&&e[t-n-r-1][0]===ce?e[t-n-r-1][1]+=s.substring(0,a):(e.splice(0,0,new ie(ce,s.substring(0,a))),t++),s=s.substring(a),o=o.substring(a)),a=Pc(s,o),a!==0&&(e[t][1]=s.substring(s.length-a)+e[t][1],s=s.substring(0,s.length-a),o=o.substring(0,o.length-a))),t-=n+r,e.splice(t,n+r),o.length&&(e.splice(t,0,new ie(Ee,o)),t++),s.length&&(e.splice(t,0,new ie(we,s)),t++),t++):t!==0&&e[t-1][0]===ce?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,r=0,n=0,o="",s="";break}e.at(-1)?.[1]===""&&e.pop();let l=false;for(t=1;t<e.length-1;)e[t-1][0]===ce&&e[t+1][0]===ce&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)===e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),l=true):e[t][1].substring(0,e[t+1][1].length)===e[t+1][1]&&(e[t-1][1]+=e[t+1][1],e[t][1]=e[t][1].substring(e[t+1][1].length)+e[t+1][1],e.splice(t+1,1),l=true)),t++;l&&Rc(e);}i(Rc,"diff_cleanupMerge");function Yn(e,t){if(!e||!t)return 6;let n=e.charAt(e.length-1),r=t.charAt(0),o=n.match(Sc),s=r.match(Sc),a=o&&n.match(Ec),l=s&&r.match(Ec),c=a&&n.match(vc),u=l&&r.match(vc),f=c&&e.match(Od),h=u&&t.match(Id);return f||h?5:c||u?4:o&&!a&&l?3:a||l?2:o||s?1:0}i(Yn,"diff_cleanupSemanticScore_");var jc="Compared values have no visual difference.",$d="Compared values serialize to the same structure.\nPrinting internal object structure without calling `toJSON` instead.";function Nd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}i(Nd,"getDefaultExportFromCjs");var Xn={},xc;function Pd(){if(xc)return Xn;xc=1,Object.defineProperty(Xn,"__esModule",{value:true}),Xn.default=d;let e="diff-sequences",t=0,n=i((p,g,m,b,E)=>{let M=0;for(;p<g&&m<b&&E(p,m);)p+=1,m+=1,M+=1;return M},"countCommonItemsF"),r=i((p,g,m,b,E)=>{let M=0;for(;p<=g&&m<=b&&E(g,b);)g-=1,b-=1,M+=1;return M},"countCommonItemsR"),o=i((p,g,m,b,E,M,A)=>{let C=0,O=-p,N=M[C],_=N;M[C]+=n(N+1,g,b+N-O+1,m,E);let q=p<A?p:A;for(C+=1,O+=2;C<=q;C+=1,O+=2){if(C!==p&&_<M[C])N=M[C];else if(N=_+1,g<=N)return C-1;_=M[C],M[C]=N+n(N+1,g,b+N-O+1,m,E);}return A},"extendPathsF"),s=i((p,g,m,b,E,M,A)=>{let C=0,O=p,N=M[C],_=N;M[C]-=r(g,N-1,m,b+N-O-1,E);let q=p<A?p:A;for(C+=1,O-=2;C<=q;C+=1,O-=2){if(C!==p&&M[C]<_)N=M[C];else if(N=_-1,N<g)return C-1;_=M[C],M[C]=N-r(g,N-1,m,b+N-O-1,E);}return A},"extendPathsR"),a=i((p,g,m,b,E,M,A,C,O,N,_)=>{let q=b-g,Q=m-g,V=E-b-Q,Y=-V-(p-1),Te=-V+(p-1),le=t,W=p<C?p:C;for(let U=0,ee=-p;U<=W;U+=1,ee+=2){let Me=U===0||U!==p&&le<A[U],fe=Me?A[U]:le,me=Me?fe:fe+1,je=q+me-ee,xe=n(me+1,m,je+1,E,M),Ce=me+xe;if(le=A[U],A[U]=Ce,Y<=ee&&ee<=Te){let it=(p-1-(ee+V))/2;if(it<=N&&O[it]-1<=Ce){let ze=q+fe-(Me?ee+1:ee-1),_e=r(g,fe,b,ze,M),Oe=fe-_e,Rt=ze-_e,Qe=Oe+1,tn=Rt+1;_.nChangePreceding=p-1,p-1===Qe+tn-g-b?(_.aEndPreceding=g,_.bEndPreceding=b):(_.aEndPreceding=Qe,_.bEndPreceding=tn),_.nCommonPreceding=_e,_e!==0&&(_.aCommonPreceding=Qe,_.bCommonPreceding=tn),_.nCommonFollowing=xe,xe!==0&&(_.aCommonFollowing=me+1,_.bCommonFollowing=je+1);let Se=Ce+1,et=je+xe+1;return _.nChangeFollowing=p-1,p-1===m+E-Se-et?(_.aStartFollowing=m,_.bStartFollowing=E):(_.aStartFollowing=Se,_.bStartFollowing=et),true}}}return false},"extendOverlappablePathsF"),l=i((p,g,m,b,E,M,A,C,O,N,_)=>{let q=E-m,Q=m-g,V=E-b-Q,Y=V-p,Te=V+p,le=t,W=p<N?p:N;for(let U=0,ee=p;U<=W;U+=1,ee-=2){let Me=U===0||U!==p&&O[U]<le,fe=Me?O[U]:le,me=Me?fe:fe-1,je=q+me-ee,xe=r(g,me-1,b,je-1,M),Ce=me-xe;if(le=O[U],O[U]=Ce,Y<=ee&&ee<=Te){let it=(p+(ee-V))/2;if(it<=C&&Ce-1<=A[it]){let ze=je-xe;if(_.nChangePreceding=p,p===Ce+ze-g-b?(_.aEndPreceding=g,_.bEndPreceding=b):(_.aEndPreceding=Ce,_.bEndPreceding=ze),_.nCommonPreceding=xe,xe!==0&&(_.aCommonPreceding=Ce,_.bCommonPreceding=ze),_.nChangeFollowing=p-1,p===1)_.nCommonFollowing=0,_.aStartFollowing=m,_.bStartFollowing=E;else {let _e=q+fe-(Me?ee-1:ee+1),Oe=n(fe,m,_e,E,M);_.nCommonFollowing=Oe,Oe!==0&&(_.aCommonFollowing=fe,_.bCommonFollowing=_e);let Rt=fe+Oe,Qe=_e+Oe;p-1===m+E-Rt-Qe?(_.aStartFollowing=m,_.bStartFollowing=E):(_.aStartFollowing=Rt,_.bStartFollowing=Qe);}return true}}}return false},"extendOverlappablePathsR"),c=i((p,g,m,b,E,M,A,C,O)=>{let N=b-g,_=E-m,q=m-g,Q=E-b,R=Q-q,V=q,Y=q;if(A[0]=g-1,C[0]=m,R%2===0){let Te=(p||R)/2,le=(q+Q)/2;for(let W=1;W<=le;W+=1)if(V=o(W,m,E,N,M,A,V),W<Te)Y=s(W,g,b,_,M,C,Y);else if(l(W,g,m,b,E,M,A,V,C,Y,O))return}else {let Te=((p||R)+1)/2,le=(q+Q+1)/2,W=1;for(V=o(W,m,E,N,M,A,V),W+=1;W<=le;W+=1)if(Y=s(W-1,g,b,_,M,C,Y),W<Te)V=o(W,m,E,N,M,A,V);else if(a(W,g,m,b,E,M,A,V,C,Y,O))return}throw new Error(`${e}: no overlap aStart=${g} aEnd=${m} bStart=${b} bEnd=${E}`)},"divide"),u=i((p,g,m,b,E,M,A,C,O,N)=>{if(E-b<m-g){if(M=!M,M&&A.length===1){let{foundSubsequence:Ce,isCommon:it}=A[0];A[1]={foundSubsequence:i((ze,_e,Oe)=>{Ce(ze,Oe,_e);},"foundSubsequence"),isCommon:i((ze,_e)=>it(_e,ze),"isCommon")};}let je=g,xe=m;g=b,m=E,b=je,E=xe;}let{foundSubsequence:_,isCommon:q}=A[M?1:0];c(p,g,m,b,E,q,C,O,N);let{nChangePreceding:Q,aEndPreceding:R,bEndPreceding:V,nCommonPreceding:Y,aCommonPreceding:Te,bCommonPreceding:le,nCommonFollowing:W,aCommonFollowing:U,bCommonFollowing:ee,nChangeFollowing:Me,aStartFollowing:fe,bStartFollowing:me}=N;g<R&&b<V&&u(Q,g,R,b,V,M,A,C,O,N),Y!==0&&_(Y,Te,le),W!==0&&_(W,U,ee),fe<m&&me<E&&u(Me,fe,m,me,E,M,A,C,O,N);},"findSubsequences"),f=i((p,g)=>{if(typeof g!="number")throw new TypeError(`${e}: ${p} typeof ${typeof g} is not a number`);if(!Number.isSafeInteger(g))throw new RangeError(`${e}: ${p} value ${g} is not a safe integer`);if(g<0)throw new RangeError(`${e}: ${p} value ${g} is a negative integer`)},"validateLength"),h=i((p,g)=>{let m=typeof g;if(m!=="function")throw new TypeError(`${e}: ${p} typeof ${m} is not a function`)},"validateCallback");function d(p,g,m,b){f("aLength",p),f("bLength",g),h("isCommon",m),h("foundSubsequence",b);let E=n(0,p,0,g,m);if(E!==0&&b(E,0,0),p!==E||g!==E){let M=E,A=E,C=r(M,p-1,A,g-1,m),O=p-C,N=g-C,_=E+C;p!==_&&g!==_&&u(0,M,O,A,N,false,[{foundSubsequence:b,isCommon:m}],[t],[t],{aCommonFollowing:t,aCommonPreceding:t,aEndPreceding:t,aStartFollowing:t,bCommonFollowing:t,bCommonPreceding:t,bEndPreceding:t,bStartFollowing:t,nChangeFollowing:t,nChangePreceding:t,nCommonFollowing:t,nCommonPreceding:t}),C!==0&&b(C,O,N);}}return i(d,"diffSequence"),Xn}i(Pd,"requireBuild");var Rd=Pd(),Fc=Nd(Rd);function jd(e,t){return e.replace(/\s+$/,n=>t(n))}i(jd,"formatTrailingSpaces");function Do(e,t,n,r,o,s){return e.length!==0?n(`${r} ${jd(e,o)}`):r!==" "?n(r):t&&s.length!==0?n(`${r} ${s}`):""}i(Do,"printDiffLine");function Dc(e,t,{aColor:n,aIndicator:r,changeLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:s}){return Do(e,t,n,r,o,s)}i(Dc,"printDeleteLine");function Lc(e,t,{bColor:n,bIndicator:r,changeLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:s}){return Do(e,t,n,r,o,s)}i(Lc,"printInsertLine");function Bc(e,t,{commonColor:n,commonIndicator:r,commonLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:s}){return Do(e,t,n,r,o,s)}i(Bc,"printCommonLine");function kc(e,t,n,r,{patchColor:o}){return o(`@@ -${e+1},${t-e} +${n+1},${r-n} @@`)}i(kc,"createPatchMark");function Fd(e,t){let n=e.length,r=t.contextLines,o=r+r,s=n,a=false,l=0,c=0;for(;c!==n;){let C=c;for(;c!==n&&e[c][0]===ce;)c+=1;if(C!==c)if(C===0)c>r&&(s-=c-r,a=true);else if(c===n){let O=c-C;O>r&&(s-=O-r,a=true);}else {let O=c-C;O>o&&(s-=O-o,l+=1);}for(;c!==n&&e[c][0]!==ce;)c+=1;}let u=l!==0||a;l!==0?s+=l+1:a&&(s+=1);let f=s-1,h=[],d=0;u&&h.push("");let p=0,g=0,m=0,b=0,E=i(C=>{let O=h.length;h.push(Bc(C,O===0||O===f,t)),m+=1,b+=1;},"pushCommonLine"),M=i(C=>{let O=h.length;h.push(Dc(C,O===0||O===f,t)),m+=1;},"pushDeleteLine"),A=i(C=>{let O=h.length;h.push(Lc(C,O===0||O===f,t)),b+=1;},"pushInsertLine");for(c=0;c!==n;){let C=c;for(;c!==n&&e[c][0]===ce;)c+=1;if(C!==c)if(C===0){c>r&&(C=c-r,p=C,g=C,m=p,b=g);for(let O=C;O!==c;O+=1)E(e[O][1]);}else if(c===n){let O=c-C>r?C+r:c;for(let N=C;N!==O;N+=1)E(e[N][1]);}else {let O=c-C;if(O>o){let N=C+r;for(let q=C;q!==N;q+=1)E(e[q][1]);h[d]=kc(p,m,g,b,t),d=h.length,h.push("");let _=O-o;p=m+_,g=b+_,m=p,b=g;for(let q=c-r;q!==c;q+=1)E(e[q][1]);}else for(let N=C;N!==c;N+=1)E(e[N][1]);}for(;c!==n&&e[c][0]===Ee;)M(e[c][1]),c+=1;for(;c!==n&&e[c][0]===we;)A(e[c][1]),c+=1;}return u&&(h[d]=kc(p,m,g,b,t)),h.join(`
20
+ `)}i(Fd,"joinAlignedDiffsNoExpand");function Dd(e,t){return e.map((n,r,o)=>{let s=n[1],a=r===0||r===o.length-1;switch(n[0]){case Ee:return Dc(s,a,t);case we:return Lc(s,a,t);default:return Bc(s,a,t)}}).join(`
21
+ `)}i(Dd,"joinAlignedDiffsExpand");var $o=i(e=>e,"noColor"),qc=5,Ld=0;function Bd(){return {aAnnotation:"Expected",aColor:se.green,aIndicator:"-",bAnnotation:"Received",bColor:se.red,bIndicator:"+",changeColor:se.inverse,changeLineTrailingSpaceColor:$o,commonColor:se.dim,commonIndicator:" ",commonLineTrailingSpaceColor:$o,compareKeys:void 0,contextLines:qc,emptyFirstOrLastLinePlaceholder:"",expand:false,includeChangeCounts:false,omitAnnotationLines:false,patchColor:se.yellow,printBasicPrototype:false,truncateThreshold:Ld,truncateAnnotation:"... Diff result is truncated",truncateAnnotationColor:$o}}i(Bd,"getDefaultOptions");function qd(e){return e&&typeof e=="function"?e:void 0}i(qd,"getCompareKeys");function Ud(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0?e:qc}i(Ud,"getContextLines");function Ct(e={}){return {...Bd(),...e,compareKeys:qd(e.compareKeys),contextLines:Ud(e.contextLines)}}i(Ct,"normalizeDiffOptions");function Lt(e){return e.length===1&&e[0].length===0}i(Lt,"isEmptyString");function zd(e){let t=0,n=0;return e.forEach(r=>{switch(r[0]){case Ee:t+=1;break;case we:n+=1;break}}),{a:t,b:n}}i(zd,"countChanges");function Wd({aAnnotation:e,aColor:t,aIndicator:n,bAnnotation:r,bColor:o,bIndicator:s,includeChangeCounts:a,omitAnnotationLines:l},c){if(l)return "";let u="",f="";if(a){let p=String(c.a),g=String(c.b),m=r.length-e.length,b=" ".repeat(Math.max(0,m)),E=" ".repeat(Math.max(0,-m)),M=g.length-p.length,A=" ".repeat(Math.max(0,M)),C=" ".repeat(Math.max(0,-M));u=`${b} ${n} ${A}${p}`,f=`${E} ${s} ${C}${g}`;}let h=`${n} ${e}${u}`,d=`${s} ${r}${f}`;return `${t(h)}
22
+ ${o(d)}
23
+
24
+ `}i(Wd,"printAnnotation");function Lo(e,t,n){return Wd(n,zd(e))+(n.expand?Dd(e,n):Fd(e,n))+(t?n.truncateAnnotationColor(`
25
+ ${n.truncateAnnotation}`):"")}i(Lo,"printDiffLines");function tr(e,t,n){let r=Ct(n),[o,s]=Uc(Lt(e)?[]:e,Lt(t)?[]:t,r);return Lo(o,s,r)}i(tr,"diffLinesUnified");function Vd(e,t,n,r,o){if(Lt(e)&&Lt(n)&&(e=[],n=[]),Lt(t)&&Lt(r)&&(t=[],r=[]),e.length!==n.length||t.length!==r.length)return tr(e,t,o);let[s,a]=Uc(n,r,o),l=0,c=0;return s.forEach(u=>{switch(u[0]){case Ee:u[1]=e[l],l+=1;break;case we:u[1]=t[c],c+=1;break;default:u[1]=t[c],l+=1,c+=1;}}),Lo(s,a,Ct(o))}i(Vd,"diffLinesUnified2");function Uc(e,t,n){let r=n?.truncateThreshold??false,o=Math.max(Math.floor(n?.truncateThreshold??0),0),s=r?Math.min(e.length,o):e.length,a=r?Math.min(t.length,o):t.length,l=s!==e.length||a!==t.length,c=i((p,g)=>e[p]===t[g],"isCommon"),u=[],f=0,h=0;for(Fc(s,a,c,i((p,g,m)=>{for(;f!==g;f+=1)u.push(new ie(Ee,e[f]));for(;h!==m;h+=1)u.push(new ie(we,t[h]));for(;p!==0;p-=1,f+=1,h+=1)u.push(new ie(ce,t[h]));},"foundSubsequence"));f!==s;f+=1)u.push(new ie(Ee,e[f]));for(;h!==a;h+=1)u.push(new ie(we,t[h]));return [u,l]}i(Uc,"diffLinesRaw");function Mc(e){if(e===void 0)return "undefined";if(e===null)return "null";if(Array.isArray(e))return "array";if(typeof e=="boolean")return "boolean";if(typeof e=="function")return "function";if(typeof e=="number")return "number";if(typeof e=="string")return "string";if(typeof e=="bigint")return "bigint";if(typeof e=="object"){if(e!=null){if(e.constructor===RegExp)return "regexp";if(e.constructor===Map)return "map";if(e.constructor===Set)return "set";if(e.constructor===Date)return "date"}return "object"}else if(typeof e=="symbol")return "symbol";throw new Error(`value of unknown type: ${e}`)}i(Mc,"getType");function Cc(e){return e.includes(`\r
26
26
  `)?`\r
27
27
  `:`
28
- `}i(Nc,"getNewLineSymbol");function rm(e,t,n){let r=n?.truncateThreshold??false,o=Math.max(Math.floor(n?.truncateThreshold??0),0),s=e.length,a=t.length;if(r){let d=e.includes(`
28
+ `}i(Cc,"getNewLineSymbol");function Kd(e,t,n){let r=n?.truncateThreshold??false,o=Math.max(Math.floor(n?.truncateThreshold??0),0),s=e.length,a=t.length;if(r){let p=e.includes(`
29
29
  `),g=t.includes(`
30
- `),m=Nc(e),b=Nc(t),S=d?`${e.split(m,o).join(m)}
31
- `:e,_=g?`${t.split(b,o).join(b)}
32
- `:t;s=S.length,a=_.length;}let l=s!==e.length||a!==t.length,c=i((d,g)=>e[d]===t[g],"isCommon"),u=0,f=0,h=[];return zc(s,a,c,i((d,g,m)=>{u!==g&&h.push(new ie(Ee,e.slice(u,g))),f!==m&&h.push(new ie(be,t.slice(f,m))),u=g+d,f=m+d,h.push(new ie(ce,t.slice(m,f)));},"foundSubsequence")),u!==s&&h.push(new ie(Ee,e.slice(u))),f!==a&&h.push(new ie(be,t.slice(f))),[h,l]}i(rm,"diffStrings");function om(e,t,n){return t.reduce((r,o)=>r+(o[0]===ce?o[1]:o[0]===e&&o[1].length!==0?n(o[1]):""),"")}i(om,"concatenateRelevantDiffs");var er=class{static{i(this,"ChangeBuffer");}op;line;lines;changeColor;constructor(t,n){this.op=t,this.line=[],this.lines=[],this.changeColor=n;}pushSubstring(t){this.pushDiff(new ie(this.op,t));}pushLine(){this.lines.push(this.line.length!==1?new ie(this.op,om(this.op,this.line,this.changeColor)):this.line[0][0]===this.op?this.line[0]:new ie(this.op,this.line[0][1])),this.line.length=0;}isLineEmpty(){return this.line.length===0}pushDiff(t){this.line.push(t);}align(t){let n=t[1];if(n.includes(`
30
+ `),m=Cc(e),b=Cc(t),E=p?`${e.split(m,o).join(m)}
31
+ `:e,M=g?`${t.split(b,o).join(b)}
32
+ `:t;s=E.length,a=M.length;}let l=s!==e.length||a!==t.length,c=i((p,g)=>e[p]===t[g],"isCommon"),u=0,f=0,h=[];return Fc(s,a,c,i((p,g,m)=>{u!==g&&h.push(new ie(Ee,e.slice(u,g))),f!==m&&h.push(new ie(we,t.slice(f,m))),u=g+p,f=m+p,h.push(new ie(ce,t.slice(m,f)));},"foundSubsequence")),u!==s&&h.push(new ie(Ee,e.slice(u))),f!==a&&h.push(new ie(we,t.slice(f))),[h,l]}i(Kd,"diffStrings");function Hd(e,t,n){return t.reduce((r,o)=>r+(o[0]===ce?o[1]:o[0]===e&&o[1].length!==0?n(o[1]):""),"")}i(Hd,"concatenateRelevantDiffs");var er=class{static{i(this,"ChangeBuffer");}op;line;lines;changeColor;constructor(t,n){this.op=t,this.line=[],this.lines=[],this.changeColor=n;}pushSubstring(t){this.pushDiff(new ie(this.op,t));}pushLine(){this.lines.push(this.line.length!==1?new ie(this.op,Hd(this.op,this.line,this.changeColor)):this.line[0][0]===this.op?this.line[0]:new ie(this.op,this.line[0][1])),this.line.length=0;}isLineEmpty(){return this.line.length===0}pushDiff(t){this.line.push(t);}align(t){let n=t[1];if(n.includes(`
33
33
  `)){let r=n.split(`
34
- `),o=r.length-1;r.forEach((s,a)=>{a<o?(this.pushSubstring(s),this.pushLine()):s.length!==0&&this.pushSubstring(s);});}else this.pushDiff(t);}moveLinesTo(t){this.isLineEmpty()||this.pushLine(),t.push(...this.lines),this.lines.length=0;}},jo=class{static{i(this,"CommonBuffer");}deleteBuffer;insertBuffer;lines;constructor(t,n){this.deleteBuffer=t,this.insertBuffer=n,this.lines=[];}pushDiffCommonLine(t){this.lines.push(t);}pushDiffChangeLines(t){let n=t[1].length===0;(!n||this.deleteBuffer.isLineEmpty())&&this.deleteBuffer.pushDiff(t),(!n||this.insertBuffer.isLineEmpty())&&this.insertBuffer.pushDiff(t);}flushChangeLines(){this.deleteBuffer.moveLinesTo(this.lines),this.insertBuffer.moveLinesTo(this.lines);}align(t){let n=t[0],r=t[1];if(r.includes(`
34
+ `),o=r.length-1;r.forEach((s,a)=>{a<o?(this.pushSubstring(s),this.pushLine()):s.length!==0&&this.pushSubstring(s);});}else this.pushDiff(t);}moveLinesTo(t){this.isLineEmpty()||this.pushLine(),t.push(...this.lines),this.lines.length=0;}},Po=class{static{i(this,"CommonBuffer");}deleteBuffer;insertBuffer;lines;constructor(t,n){this.deleteBuffer=t,this.insertBuffer=n,this.lines=[];}pushDiffCommonLine(t){this.lines.push(t);}pushDiffChangeLines(t){let n=t[1].length===0;(!n||this.deleteBuffer.isLineEmpty())&&this.deleteBuffer.pushDiff(t),(!n||this.insertBuffer.isLineEmpty())&&this.insertBuffer.pushDiff(t);}flushChangeLines(){this.deleteBuffer.moveLinesTo(this.lines),this.insertBuffer.moveLinesTo(this.lines);}align(t){let n=t[0],r=t[1];if(r.includes(`
35
35
  `)){let o=r.split(`
36
- `),s=o.length-1;o.forEach((a,l)=>{if(l===0){let c=new ie(n,a);this.deleteBuffer.isLineEmpty()&&this.insertBuffer.isLineEmpty()?(this.flushChangeLines(),this.pushDiffCommonLine(c)):(this.pushDiffChangeLines(c),this.flushChangeLines());}else l<s?this.pushDiffCommonLine(new ie(n,a)):a.length!==0&&this.pushDiffChangeLines(new ie(n,a));});}else this.pushDiffChangeLines(t);}getLines(){return this.flushChangeLines(),this.lines}};function sm(e,t){let n=new er(Ee,t),r=new er(be,t),o=new jo(n,r);return e.forEach(s=>{switch(s[0]){case Ee:n.align(s);break;case be:r.align(s);break;default:o.align(s);}}),o.getLines()}i(sm,"getAlignedDiffs");function im(e,t){if(t){let n=e.length-1;return e.some((r,o)=>r[0]===ce&&(o!==n||r[1]!==`
37
- `))}return e.some(n=>n[0]===ce)}i(im,"hasCommonDiff");function am(e,t,n){if(e!==t&&e.length!==0&&t.length!==0){let r=e.includes(`
36
+ `),s=o.length-1;o.forEach((a,l)=>{if(l===0){let c=new ie(n,a);this.deleteBuffer.isLineEmpty()&&this.insertBuffer.isLineEmpty()?(this.flushChangeLines(),this.pushDiffCommonLine(c)):(this.pushDiffChangeLines(c),this.flushChangeLines());}else l<s?this.pushDiffCommonLine(new ie(n,a)):a.length!==0&&this.pushDiffChangeLines(new ie(n,a));});}else this.pushDiffChangeLines(t);}getLines(){return this.flushChangeLines(),this.lines}};function Gd(e,t){let n=new er(Ee,t),r=new er(we,t),o=new Po(n,r);return e.forEach(s=>{switch(s[0]){case Ee:n.align(s);break;case we:r.align(s);break;default:o.align(s);}}),o.getLines()}i(Gd,"getAlignedDiffs");function Jd(e,t){if(t){let n=e.length-1;return e.some((r,o)=>r[0]===ce&&(o!==n||r[1]!==`
37
+ `))}return e.some(n=>n[0]===ce)}i(Jd,"hasCommonDiff");function Yd(e,t,n){if(e!==t&&e.length!==0&&t.length!==0){let r=e.includes(`
38
38
  `)||t.includes(`
39
- `),[o,s]=Jc(r?`${e}
39
+ `),[o,s]=zc(r?`${e}
40
40
  `:e,r?`${t}
41
- `:t,true,n);if(im(o,r)){let a=Mt(n),l=sm(o,a.changeColor);return qo(l,s,a)}}return tr(e.split(`
41
+ `:t,true,n);if(Jd(o,r)){let a=Ct(n),l=Gd(o,a.changeColor);return Lo(l,s,a)}}return tr(e.split(`
42
42
  `),t.split(`
43
- `),n)}i(am,"diffStringsUnified");function Jc(e,t,n,r){let[o,s]=rm(e,t,r);return n&&Lp(o),[o,s]}i(Jc,"diffStringsRaw");function Fo(e,t){let{commonColor:n}=Mt(t);return n(e)}i(Fo,"getCommonMessage");var{AsymmetricMatcher:cm,DOMCollection:lm,DOMElement:um,Immutable:fm,ReactElement:hm,ReactTestComponent:dm}=kt,Yc=[dm,hm,um,lm,fm,cm,kt.Error],Do={maxDepth:20,plugins:Yc},Xc={callToJSON:false,maxDepth:8,plugins:Yc};function Ct(e,t,n){if(Object.is(e,t))return "";let r=$c(e),o=r,s=false;if(r==="object"&&typeof e.asymmetricMatch=="function"){if(e.$$typeof!==Symbol.for("jest.asymmetricMatcher")||typeof e.getExpectedType!="function")return;o=e.getExpectedType(),s=o==="string";}if(o!==$c(t)){let b=function(A){return A.length<=m?A:`${A.slice(0,m)}...`};i(b,"truncate");let{aAnnotation:a,aColor:l,aIndicator:c,bAnnotation:u,bColor:f,bIndicator:h}=Mt(n),p=Lo(Xc,n),d=$e(e,p),g=$e(t,p),m=1e5;d=b(d),g=b(g);let S=`${l(`${c} ${a}:`)}
44
- ${d}`,_=`${f(`${h} ${u}:`)}
45
- ${g}`;return `${S}
43
+ `),n)}i(Yd,"diffStringsUnified");function zc(e,t,n,r){let[o,s]=Kd(e,t,r);return n&&_d(o),[o,s]}i(zc,"diffStringsRaw");function Ro(e,t){let{commonColor:n}=Ct(t);return n(e)}i(Ro,"getCommonMessage");var{AsymmetricMatcher:Xd,DOMCollection:Zd,DOMElement:Qd,Immutable:em,ReactElement:tm,ReactTestComponent:nm}=kt,Wc=[nm,tm,Qd,Zd,em,Xd,kt.Error],jo={maxDepth:20,plugins:Wc},Vc={callToJSON:false,maxDepth:8,plugins:Wc};function _t(e,t,n){if(Object.is(e,t))return "";let r=Mc(e),o=r,s=false;if(r==="object"&&typeof e.asymmetricMatch=="function"){if(e.$$typeof!==Symbol.for("jest.asymmetricMatcher")||typeof e.getExpectedType!="function")return;o=e.getExpectedType(),s=o==="string";}if(o!==Mc(t)){let b=function(A){return A.length<=m?A:`${A.slice(0,m)}...`};i(b,"truncate");let{aAnnotation:a,aColor:l,aIndicator:c,bAnnotation:u,bColor:f,bIndicator:h}=Ct(n),d=Fo(Vc,n),p=$e(e,d),g=$e(t,d),m=1e5;p=b(p),g=b(g);let E=`${l(`${c} ${a}:`)}
44
+ ${p}`,M=`${f(`${h} ${u}:`)}
45
+ ${g}`;return `${E}
46
46
 
47
- ${_}`}if(!s)switch(r){case "string":return tr(e.split(`
47
+ ${M}`}if(!s)switch(r){case "string":return tr(e.split(`
48
48
  `),t.split(`
49
- `),n);case "boolean":case "number":return pm(e,t,n);case "map":return Ro(Pc(e),Pc(t),n);case "set":return Ro(Rc(e),Rc(t),n);default:return Ro(e,t,n)}}i(Ct,"diff");function pm(e,t,n){let r=$e(e,Do),o=$e(t,Do);return r===o?"":tr(r.split(`
49
+ `),n);case "boolean":case "number":return rm(e,t,n);case "map":return No(_c(e),_c(t),n);case "set":return No(Oc(e),Oc(t),n);default:return No(e,t,n)}}i(_t,"diff");function rm(e,t,n){let r=$e(e,jo),o=$e(t,jo);return r===o?"":tr(r.split(`
50
50
  `),o.split(`
51
- `),n)}i(pm,"comparePrimitive");function Pc(e){return new Map(Array.from(e.entries()).sort())}i(Pc,"sortMap");function Rc(e){return new Set(Array.from(e.values()).sort())}i(Rc,"sortSet");function Ro(e,t,n){let r,o=false;try{let a=Lo(Do,n);r=jc(e,t,a,n);}catch{o=true;}let s=Fo(Uc,n);if(r===void 0||r===s){let a=Lo(Xc,n);r=jc(e,t,a,n),r!==s&&!o&&(r=`${Fo(zp,n)}
51
+ `),n)}i(rm,"comparePrimitive");function _c(e){return new Map(Array.from(e.entries()).sort())}i(_c,"sortMap");function Oc(e){return new Set(Array.from(e.values()).sort())}i(Oc,"sortSet");function No(e,t,n){let r,o=false;try{let a=Fo(jo,n);r=Ic(e,t,a,n);}catch{o=true;}let s=Ro(jc,n);if(r===void 0||r===s){let a=Fo(Vc,n);r=Ic(e,t,a,n),r!==s&&!o&&(r=`${Ro($d,n)}
52
52
 
53
- ${r}`);}return r}i(Ro,"compareObjects");function Lo(e,t){let{compareKeys:n,printBasicPrototype:r,maxDepth:o}=Mt(t);return {...e,compareKeys:n,printBasicPrototype:r,maxDepth:o??e.maxDepth}}i(Lo,"getFormatOptions");function jc(e,t,n,r){let o={...n,indent:0},s=$e(e,o),a=$e(t,o);if(s===a)return Fo(Uc,r);{let l=$e(e,n),c=$e(t,n);return nm(l.split(`
53
+ ${r}`);}return r}i(No,"compareObjects");function Fo(e,t){let{compareKeys:n,printBasicPrototype:r,maxDepth:o}=Ct(t);return {...e,compareKeys:n,printBasicPrototype:r,maxDepth:o??e.maxDepth}}i(Fo,"getFormatOptions");function Ic(e,t,n,r){let o={...n,indent:0},s=$e(e,o),a=$e(t,o);if(s===a)return Ro(jc,r);{let l=$e(e,n),c=$e(t,n);return Vd(l.split(`
54
54
  `),c.split(`
55
55
  `),s.split(`
56
56
  `),a.split(`
57
- `),r)}}i(jc,"getObjectsDifference");var Fc=2e4;function Dc(e){return _t(e)==="Object"&&typeof e.asymmetricMatch=="function"}i(Dc,"isAsymmetricMatcher");function Zn(e,t){let n=_t(e),r=_t(t);return n===r&&(n==="Object"||n==="Array")}i(Zn,"isReplaceable");function nr(e,t,n){let{aAnnotation:r,bAnnotation:o}=Mt(n);if(typeof t=="string"&&typeof e=="string"&&t.length>0&&e.length>0&&t.length<=Fc&&e.length<=Fc&&t!==e){if(t.includes(`
57
+ `),r)}}i(Ic,"getObjectsDifference");var Ac=2e4;function $c(e){return Mt(e)==="Object"&&typeof e.asymmetricMatch=="function"}i($c,"isAsymmetricMatcher");function Zn(e,t){let n=Mt(e),r=Mt(t);return n===r&&(n==="Object"||n==="Array")}i(Zn,"isReplaceable");function nr(e,t,n){let{aAnnotation:r,bAnnotation:o}=Ct(n);if(typeof t=="string"&&typeof e=="string"&&t.length>0&&e.length>0&&t.length<=Ac&&e.length<=Ac&&t!==e){if(t.includes(`
58
58
  `)||e.includes(`
59
- `))return am(t,e,n);let[f]=Jc(t,e,true),h=f.some(m=>m[0]===ce),p=mm(r,o),d=p(r)+wm(Lc(f,Ee,h)),g=p(o)+ym(Lc(f,be,h));return `${d}
60
- ${g}`}let s=Io(t,{forceWritable:true}),a=Io(e,{forceWritable:true}),{replacedExpected:l,replacedActual:c}=Qn(a,s);return Ct(l,c,n)}i(nr,"printDiffOrStringify");function Qn(e,t,n=new WeakSet,r=new WeakSet){return e instanceof Error&&t instanceof Error&&typeof e.cause<"u"&&typeof t.cause>"u"?(delete e.cause,{replacedActual:e,replacedExpected:t}):Zn(e,t)?n.has(e)||r.has(t)?{replacedActual:e,replacedExpected:t}:(n.add(e),r.add(t),Oo(t).forEach(o=>{let s=t[o],a=e[o];if(Dc(s)){if(s.asymmetricMatch(a))t[o]=a;else if("sample"in s&&s.sample!==void 0&&Zn(a,s.sample)){let l=Qn(a,s.sample,n,r);e[o]=l.replacedActual,t[o]=l.replacedExpected;}}else if(Dc(a)){if(a.asymmetricMatch(s))e[o]=s;else if("sample"in a&&a.sample!==void 0&&Zn(a.sample,s)){let l=Qn(a.sample,s,n,r);e[o]=l.replacedActual,t[o]=l.replacedExpected;}}else if(Zn(a,s)){let l=Qn(a,s,n,r);e[o]=l.replacedActual,t[o]=l.replacedExpected;}}),{replacedActual:e,replacedExpected:t}):{replacedActual:e,replacedExpected:t}}i(Qn,"replaceAsymmetricMatcher");function mm(...e){let t=e.reduce((n,r)=>r.length>n?r.length:n,0);return n=>`${n}: ${" ".repeat(t-n.length)}`}i(mm,"getLabelPrinter");var gm="\xB7";function Zc(e){return e.replace(/\s+$/gm,t=>gm.repeat(t.length))}i(Zc,"replaceTrailingSpaces");function ym(e){return se.red(Zc(we(e)))}i(ym,"printReceived");function wm(e){return se.green(Zc(we(e)))}i(wm,"printExpected");function Lc(e,t,n){return e.reduce((r,o)=>r+(o[0]===ce?o[1]:o[0]===t?n?se.inverse(o[1]):o[1]:""),"")}i(Lc,"getCommonAndChangedSubstrings");var bm="@@__IMMUTABLE_RECORD__@@",Tm="@@__IMMUTABLE_ITERABLE__@@";function Sm(e){return e&&(e[Tm]||e[bm])}i(Sm,"isImmutable");var Em=Object.getPrototypeOf({});function Qc(e){return e instanceof Error?`<unserializable>: ${e.message}`:typeof e=="string"?`<unserializable>: ${e}`:"<unserializable>"}i(Qc,"getUnserializableMessage");function ut(e,t=new WeakMap){if(!e||typeof e=="string")return e;if(e instanceof Error&&"toJSON"in e&&typeof e.toJSON=="function"){let n=e.toJSON();return n&&n!==e&&typeof n=="object"&&(typeof e.message=="string"&&hn(()=>n.message??=el(e.message)),typeof e.stack=="string"&&hn(()=>n.stack??=e.stack),typeof e.name=="string"&&hn(()=>n.name??=e.name),e.cause!=null&&hn(()=>n.cause??=ut(e.cause,t))),ut(n,t)}if(typeof e=="function")return `Function<${e.name||"anonymous"}>`;if(typeof e=="symbol")return e.toString();if(typeof e!="object")return e;if(typeof Buffer<"u"&&e instanceof Buffer)return `<Buffer(${e.length}) ...>`;if(typeof Uint8Array<"u"&&e instanceof Uint8Array)return `<Uint8Array(${e.length}) ...>`;if(Sm(e))return ut(e.toJSON(),t);if(e instanceof Promise||e.constructor&&e.constructor.prototype==="AsyncFunction")return "Promise";if(typeof Element<"u"&&e instanceof Element)return e.tagName;if(typeof e.toJSON=="function")return ut(e.toJSON(),t);if(t.has(e))return t.get(e);if(Array.isArray(e)){let n=new Array(e.length);return t.set(e,n),e.forEach((r,o)=>{try{n[o]=ut(r,t);}catch(s){n[o]=Qc(s);}}),n}else {let n=Object.create(null);t.set(e,n);let r=e;for(;r&&r!==Em;)Object.getOwnPropertyNames(r).forEach(o=>{if(!(o in n))try{n[o]=ut(e[o],t);}catch(s){delete n[o],n[o]=Qc(s);}}),r=Object.getPrototypeOf(r);return e instanceof Error&&hn(()=>n.message=el(e.message)),n}}i(ut,"serializeValue");function hn(e){try{return e()}catch{}}i(hn,"safe");function el(e){return e.replace(/\(0\s?,\s?__vite_ssr_import_\d+__.(\w+)\)/g,"$1").replace(/__(vite_ssr_import|vi_import)_\d+__\./g,"").replace(/getByTestId('__vitest_\d+__')/g,"page")}i(el,"normalizeErrorMessage");function Uo(e,t,n=new WeakSet){if(!e||typeof e!="object")return {message:String(e)};let r=e;(r.showDiff||r.showDiff===void 0&&r.expected!==void 0&&r.actual!==void 0)&&(r.diff=nr(r.actual,r.expected,{...t,...r.diffOptions})),"expected"in r&&typeof r.expected!="string"&&(r.expected=we(r.expected,10)),"actual"in r&&typeof r.actual!="string"&&(r.actual=we(r.actual,10));try{!n.has(r)&&typeof r.cause=="object"&&(n.add(r),r.cause=Uo(r.cause,t,n));}catch{}try{return ut(r)}catch(o){return ut(new Error(`Failed to fully serialize error: ${o?.message}
61
- Inner error message: ${r?.message}`))}}i(Uo,"processError");var tl=Symbol("vitest:SAFE_TIMERS");function ft(){let{setTimeout:e,setInterval:t,clearInterval:n,clearTimeout:r,setImmediate:o,clearImmediate:s,queueMicrotask:a}=globalThis[tl]||globalThis,{nextTick:l}=globalThis[tl]||globalThis.process||{};return {nextTick:l,setTimeout:e,setInterval:t,clearInterval:n,clearTimeout:r,setImmediate:o,clearImmediate:s,queueMicrotask:a}}i(ft,"getSafeTimers");function nl(e,t=setTimeout){return new Promise(n=>t(n,e))}i(nl,"delay");var vm=/^[A-Za-z]:\//;function xm(e=""){return e&&e.replace(/\\/g,"/").replace(vm,t=>t.toUpperCase())}i(xm,"normalizeWindowsPath");var km=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;function _m(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}i(_m,"cwd");var zo=i(function(...e){e=e.map(r=>xm(r));let t="",n=false;for(let r=e.length-1;r>=-1&&!n;r--){let o=r>=0?e[r]:_m();!o||o.length===0||(t=`${o}/${t}`,n=rl(o));}return t=Mm(t,!n),n&&!rl(t)?`/${t}`:t.length>0?t:"."},"resolve");function Mm(e,t){let n="",r=0,o=-1,s=0,a=null;for(let l=0;l<=e.length;++l){if(l<e.length)a=e[l];else {if(a==="/")break;a="/";}if(a==="/"){if(!(o===l-1||s===1))if(s===2){if(n.length<2||r!==2||n[n.length-1]!=="."||n[n.length-2]!=="."){if(n.length>2){let c=n.lastIndexOf("/");c===-1?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),o=l,s=0;continue}else if(n.length>0){n="",r=0,o=l,s=0;continue}}t&&(n+=n.length>0?"/..":"..",r=2);}else n.length>0?n+=`/${e.slice(o+1,l)}`:n=e.slice(o+1,l),r=l-o-1;o=l,s=0;}else a==="."&&s!==-1?++s:s=-1;}return n}i(Mm,"normalizeString");var rl=i(function(e){return km.test(e)},"isAbsolute");var Cm=44,ol="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Om=new Uint8Array(64),cl=new Uint8Array(128);for(let e=0;e<ol.length;e++){let t=ol.charCodeAt(e);Om[e]=t,cl[t]=e;}function dn(e,t){let n=0,r=0,o=0;do{let a=e.next();o=cl[a],n|=(o&31)<<r,r+=5;}while(o&32);let s=n&1;return n>>>=1,s&&(n=-2147483648|-n),t+n}i(dn,"decodeInteger");function sl(e,t){return e.pos>=t?false:e.peek()!==Cm}i(sl,"hasMoreVlq");var Im=class{static{i(this,"StringReader");}constructor(e){this.pos=0,this.buffer=e;}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){let{buffer:t,pos:n}=this,r=t.indexOf(e,n);return r===-1?t.length:r}};function Am(e){let{length:t}=e,n=new Im(e),r=[],o=0,s=0,a=0,l=0,c=0;do{let u=n.indexOf(";"),f=[],h=true,p=0;for(o=0;n.pos<u;){let d;o=dn(n,o),o<p&&(h=false),p=o,sl(n,u)?(s=dn(n,s),a=dn(n,a),l=dn(n,l),sl(n,u)?(c=dn(n,c),d=[o,s,a,l,c]):d=[o,s,a,l]):d=[o],f.push(d),n.pos++;}h||$m(f),r.push(f),n.pos=u+1;}while(n.pos<=t);return r}i(Am,"decode");function $m(e){e.sort(Nm);}i($m,"sort");function Nm(e,t){return e[0]-t[0]}i(Nm,"sortComparator");var sr=0,Pm=1,Rm=2,jm=3,Fm=4,or=false;function Dm(e,t,n,r){for(;n<=r;){let o=n+(r-n>>1),s=e[o][sr]-t;if(s===0)return or=true,o;s<0?n=o+1:r=o-1;}return or=false,n-1}i(Dm,"binarySearch");function Lm(e,t,n){for(let r=n+1;r<e.length&&e[r][sr]===t;n=r++);return n}i(Lm,"upperBound");function Bm(e,t,n){for(let r=n-1;r>=0&&e[r][sr]===t;n=r--);return n}i(Bm,"lowerBound");function qm(e,t,n,r){let{lastKey:o,lastNeedle:s,lastIndex:a}=n,l=0,c=e.length-1;if(r===o){if(t===s)return or=a!==-1&&e[a][sr]===t,a;t>=s?l=a===-1?0:a:c=a;}return n.lastKey=r,n.lastNeedle=t,n.lastIndex=Dm(e,t,l,c)}i(qm,"memoizedBinarySearch");var Um="`line` must be greater than 0 (lines start at line 1)",zm="`column` must be greater than or equal to 0 (columns start at column 0)",il=-1,Wm=1;function Vm(e){var t;return (t=e)._decoded||(t._decoded=Am(e._encoded))}i(Vm,"decodedMappings");function Km(e,t){let{line:n,column:r,bias:o}=t;if(n--,n<0)throw new Error(Um);if(r<0)throw new Error(zm);let s=Vm(e);if(n>=s.length)return rr(null,null,null,null);let a=s[n],l=Hm(a,e._decodedMemo,n,r,o||Wm);if(l===-1)return rr(null,null,null,null);let c=a[l];if(c.length===1)return rr(null,null,null,null);let{names:u,resolvedSources:f}=e;return rr(f[c[Pm]],c[Rm]+1,c[jm],c.length===5?u[c[Fm]]:null)}i(Km,"originalPositionFor");function rr(e,t,n,r){return {source:e,line:t,column:n,name:r}}i(rr,"OMapping");function Hm(e,t,n,r,o){let s=qm(e,r,t,n);return or?s=(o===il?Lm:Bm)(e,r,s):o===il&&s++,s===-1||s===e.length?-1:s}i(Hm,"traceSegmentInternal");var Ko=/^\s*at .*(?:\S:\d+|\(native\))/m,Gm=/^(?:eval@)?(?:\[native code\])?$/,Jm=["node:internal",/\/packages\/\w+\/dist\//,/\/@vitest\/\w+\/dist\//,"/vitest/dist/","/vitest/src/","/node_modules/chai/","/node_modules/tinyspy/","/vite/dist/node/module-runner","/rolldown-vite/dist/node/module-runner","/deps/chunk-","/deps/@vitest","/deps/loupe","/deps/chai","/browser-playwright/dist/locators.js","/browser-webdriverio/dist/locators.js","/browser-preview/dist/locators.js",/node:\w+/,/__vitest_test__/,/__vitest_browser__/,"/@id/__x00__vitest/browser",/\/deps\/vitest_/],Ym=Date.now().toString().length,Xm=new RegExp(`vitest=\\d{${Ym}}`);function ll(e){if(!e.includes(":"))return [e];let n=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/^\(|\)$/g,""));if(!n)return [e];let r=n[1];if(r.startsWith("async ")&&(r=r.slice(6)),r.startsWith("http:")||r.startsWith("https:")){let o=new URL(r);o.searchParams.delete("import"),o.searchParams.delete("browserv"),r=o.pathname+o.hash+o.search;}if(r.startsWith("/@fs/")){let o=/^\/@fs\/[a-zA-Z]:\//.test(r);r=r.slice(o?5:4);}return r.includes("vitest=")&&(r=r.replace(Xm,"").replace(/[?&]$/,"")),[r,n[2]||void 0,n[3]||void 0]}i(ll,"extractLocation");function ul(e){let t=e.trim();if(Gm.test(t)||(t.includes(" > eval")&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!t.includes("@")))return null;let n=-1,r="",o;for(let c=0;c<t.length;c++)if(t[c]==="@"){let u=t.slice(c+1);if(u.includes(":")&&u.length>=3){n=c,r=u,o=c>0?t.slice(0,c):void 0;break}}if(n===-1||!r.includes(":")||r.length<3)return null;let[s,a,l]=ll(r);return !s||!a||!l?null:{file:s,method:o||"",line:Number.parseInt(a),column:Number.parseInt(l)}}i(ul,"parseSingleFFOrSafariStack");function ir(e){let t=e.trim();return Ko.test(t)?fl(t):ul(t)}i(ir,"parseSingleStack");function fl(e){let t=e.trim();if(!Ko.test(t))return null;t.includes("(eval ")&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let n=t.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),r=n.match(/ (\(.+\)$)/);n=r?n.replace(r[0],""):n;let[o,s,a]=ll(r?r[1]:n),l=r&&n||"",c=o&&["eval","<anonymous>"].includes(o)?void 0:o;return !c||!s||!a?null:(l.startsWith("async ")&&(l=l.slice(6)),c.startsWith("file://")&&(c=c.slice(7)),c=c.startsWith("node:")||c.startsWith("internal:")?c:zo(c),l&&(l=l.replace(/\(0\s?,\s?__vite_ssr_import_\d+__.(\w+)\)/g,"$1").replace(/__(vite_ssr_import|vi_import)_\d+__\./g,"").replace(/(Object\.)?__vite_ssr_export_default__\s?/g,"")),{method:l,file:c,line:Number.parseInt(s),column:Number.parseInt(a)})}i(fl,"parseSingleV8Stack");function Wo(e,t={}){let{ignoreStackEntries:n=Jm}=t,r=Ko.test(e)?Qm(e):Zm(e),o=r.findLastIndex(s=>s.method==="__VITEST_HELPER__"||s.method==="async*__VITEST_HELPER__"||s.method==="async __VITEST_HELPER__");return o>=0&&(r=r.slice(o+1)),r.map(s=>{t.getUrlId&&(s.file=t.getUrlId(s.file));let a=t.getSourceMap?.(s.file);if(!a||typeof a!="object"||!a.version)return al(n,s.file)?null:s;let l=new Vo(a,s.file),c=tg(l,s);if(!c)return s;let{line:u,column:f,source:h,name:p}=c,d=h||s.file;return d.match(/\/\w:\//)&&(d=d.slice(1)),al(n,d)?null:u!=null&&f!=null?{line:u,column:f,file:d,method:p||s.method}:s}).filter(s=>s!=null)}i(Wo,"parseStacktrace");function al(e,t){return e.some(n=>t.match(n))}i(al,"shouldFilter");function Zm(e){return e.split(`
62
- `).map(t=>ul(t)).filter(Co)}i(Zm,"parseFFOrSafariStackTrace");function Qm(e){return e.split(`
63
- `).map(t=>fl(t)).filter(Co)}i(Qm,"parseV8Stacktrace");function hl(e,t={}){if(!e||Sc(e))return [];if("stacks"in e&&e.stacks)return e.stacks;let n=e.stack||"",r=typeof n=="string"?Wo(n,t):[];if(!r.length){let o=e;o.fileName!=null&&o.lineNumber!=null&&o.columnNumber!=null&&(r=Wo(`${o.fileName}:${o.lineNumber}:${o.columnNumber}`,t)),o.sourceURL!=null&&o.line!=null&&o._column!=null&&(r=Wo(`${o.sourceURL}:${o.line}:${o.column}`,t));}return t.frameFilter&&(r=r.filter(o=>t.frameFilter(e,o)!==false)),e.stacks=r,r}i(hl,"parseErrorStacktrace");var Vo=class{static{i(this,"DecodedMap");}_encoded;_decoded;_decodedMemo;url;version;names=[];resolvedSources;constructor(t,n){this.map=t;let{mappings:r,names:o,sources:s}=t;this.version=t.version,this.names=o||[],this._encoded=r||"",this._decodedMemo=eg(),this.url=n,this.resolvedSources=(s||[]).map(a=>zo(n,"..",a||""));}};function eg(){return {lastKey:-1,lastNeedle:-1,lastIndex:-1}}i(eg,"memoizedState");function tg(e,t){let n=Km(e,t);return n.column==null?null:n}i(tg,"getOriginalPosition");var Jo=class extends Error{static{i(this,"PendingError");}code="VITEST_PENDING";taskId;constructor(t,n,r){super(t),this.message=t,this.note=r,this.taskId=n.id;}};var nt=class extends Error{static{i(this,"FixtureDependencyError");}name="FixtureDependencyError"},Yo=class extends Error{static{i(this,"FixtureAccessError");}name="FixtureAccessError"},fr=class extends Error{static{i(this,"FixtureParseError");}name="FixtureParseError"};var ng=new WeakMap,wl=new WeakMap,bl=new WeakMap;function Tl(e,t){ng.set(e,t);}i(Tl,"setFn");function rg(e,t){wl.set(e,t);}i(rg,"setTestFixture");function og(e){return wl.get(e)}i(og,"getTestFixtures");function Sl(e,t){bl.set(e,t);}i(Sl,"setHooks");function es(e){return bl.get(e)}i(es,"getHooks");var lr=Symbol.for("VITEST_FIXTURE_STACK_TRACE"),mn=class e{static{i(this,"TestFixtures");}_suiteContexts;_overrides=new WeakMap;_registrations;static _definitions=[];static _builtinFixtures=["task","signal","onTestFailed","onTestFinished","skip","annotate"];static _fixtureOptionKeys=["auto","injected","scope"];static _fixtureScopes=["test","file","worker"];static _workerContextSuite={type:"worker"};static clearDefinitions(){e._definitions.length=0;}static getWorkerContexts(){return e._definitions.map(t=>t.getWorkerContext())}static getFileContexts(t){return e._definitions.map(n=>n.getFileContext(t))}static isFixtureOptions(t){return Le(t)&&Object.keys(t).some(n=>e._fixtureOptionKeys.includes(n))}constructor(t){this._registrations=t??new Map,this._suiteContexts=new WeakMap,e._definitions.push(this);}extend(t,n){let{suite:r}=Ve(),o=!r||r.file===r,s=this.parseUserFixtures(t,n,o);return new e(s)}get(t){let n=t;for(;n;){let r=this._overrides.get(n);if(r)return r;if(n===n.file)break;n=n.suite||n.file;}return this._registrations}override(t,n){let{suite:r,file:o}=Ve(),s=r||o,a=!r||r.file===r,l=new Map(this.get(s)),c=this.parseUserFixtures(t,n,a,l);a?this._registrations=c:this._overrides.set(s,c);}getFileContext(t){return this._suiteContexts.has(t)||this._suiteContexts.set(t,Object.create(null)),this._suiteContexts.get(t)}getWorkerContext(){return this._suiteContexts.has(e._workerContextSuite)||this._suiteContexts.set(e._workerContextSuite,Object.create(null)),this._suiteContexts.get(e._workerContextSuite)}parseUserFixtures(t,n,r,o=new Map(this._registrations)){let s=[];Object.entries(n).forEach(([a,l])=>{let c,u,f;Array.isArray(l)&&l.length>=2&&e.isFixtureOptions(l[1])?(f=l[1],c={auto:f.auto??false,scope:f.scope??"test",injected:f.injected??false},u=c.injected?t.injectValue?.(a)??l[0]:l[0]):u=l;let h=o.get(a);h&&c?(h.scope!==c.scope&&s.push(new nt(`The "${a}" fixture was already registered with a "${c.scope}" scope.`)),h.auto!==c.auto&&s.push(new nt(`The "${a}" fixture was already registered as { auto: ${c.auto} }.`))):h?c={auto:h.auto,scope:h.scope,injected:h.injected}:c||(c={auto:false,injected:false,scope:"test"}),c.scope&&!e._fixtureScopes.includes(c.scope)&&s.push(new nt(`The "${a}" fixture has unknown scope "${c.scope}".`)),!r&&c.scope!=="test"&&s.push(new nt(`The "${a}" fixture cannot be defined with a ${c.scope} scope${!f?.scope&&h?.scope?" (inherited from the base fixture)":""} inside the describe block. Define it at the top level of the file instead.`));let p=gn(u)?ts(u):new Set,d={name:a,value:u,auto:c.auto??false,injected:c.injected??false,scope:c.scope??"test",deps:p,parent:h};gn(u)&&Object.assign(u,{[lr]:new Error("STACK_TRACE_ERROR")}),o.set(a,d),d.scope==="worker"&&(t.pool==="vmThreads"||t.pool==="vmForks")&&(d.scope="file");});for(let a of o.values())for(let l of a.deps){if(e._builtinFixtures.includes(l))continue;let c=o.get(l);if(!c){s.push(new nt(`The "${a.name}" fixture depends on unknown fixture "${l}".`));continue}if(l===a.name&&!a.parent){s.push(new nt(`The "${a.name}" fixture depends on itself, but does not have a base implementation.`));continue}if(e._fixtureScopes.indexOf(a.scope)>e._fixtureScopes.indexOf(c.scope)){s.push(new nt(`The ${a.scope} "${a.name}" fixture cannot depend on a ${c.scope} fixture "${c.name}".`));continue}}if(s.length===1)throw s[0];if(s.length>1)throw new AggregateError(s,"Cannot resolve user fixtures. See errors for more information.");return o}},qt=new WeakMap;var Ho=new WeakMap;function yn(e,t){let n=Ve(),r=t?.suite||n.suite||n.file;return async o=>{let s=o||t?.context;if(!s)return t?.suiteHook&&cg(e,t.suiteHook,t.stackTraceError),e({});let a=t?.fixtures||og(s);if(!a)return e(s);let l=a.get(r);if(!l.size)return e(s);let c=[],u=ts(e);for(let d of l.values())(sg(d,t)||u.has(d.name))&&c.push(d);if(!c.length)return e(s);qt.has(s)||qt.set(s,[]);let f=qt.get(s),h=vl(c,l);if(!h.length)return e(s);if(t?.suiteHook){let d=h.filter(g=>g.scope==="test");if(d.length>0){let g=d.map(S=>`"${S.name}"`).join(", "),m={aroundAll:"aroundEach",beforeAll:"beforeEach",afterAll:"afterEach"},b=new nt(`Test-scoped fixtures cannot be used inside ${t.suiteHook} hook. The following fixtures are test-scoped: ${g}. Use { scope: 'file' } or { scope: 'worker' } fixtures instead, or move the logic to ${m[t.suiteHook]} hook.`);throw t.stackTraceError?.stack&&(b.stack=b.message+t.stackTraceError.stack.replace(t.stackTraceError.message,"")),b}}Ho.has(s)||Ho.set(s,new WeakSet);let p=Ho.get(s);for(let d of h)if(d.scope==="test"){if(p.has(d))continue;p.add(d);let g=await ig(d,s,f);s[d.name]=g,f.push(()=>{p.delete(d);});}else {let g=await ag(a,r,d);s[d.name]=g;}return e(s)}}i(yn,"withFixtures");function sg(e,t){return !(!e.auto||t?.suiteHook&&e.scope==="test")}i(sg,"isAutoFixture");function gn(e){return typeof e=="function"}i(gn,"isFixtureFunction");function ig(e,t,n){return gn(e.value)?El(e.value,e.name,t,n):e.value}i(ig,"resolveTestFixtureValue");var ar=new WeakMap;async function ag(e,t,n){let r=e.getWorkerContext(),o=e.getFileContext(t.file),s=n.scope==="worker"?r:o;if(!gn(n.value))return s[n.name]=n.value,n.value;if(n.name in s)return s[n.name];if(ar.has(n))return ar.get(n);qt.has(s)||qt.set(s,[]);let a=qt.get(s),l=El(n.value,n.name,n.scope==="file"?{...r,...o}:s,a).then(c=>(s[n.name]=c,ar.delete(n),c));return ar.set(n,l),l}i(ag,"resolveScopeFixtureValue");async function El(e,t,n,r){let o=Jn(),s=lr in e&&e[lr]instanceof Error?e[lr]:void 0,a=false,l=e(n,async c=>{a=true,o.resolve(c);let u=Jn();r.push(async()=>{u.resolve(),await l;}),await u;}).then(()=>{if(!a){let c=new Error(`Fixture "${t}" returned without calling "use". Make sure to call "use" in every code path of the fixture function.`);s?.stack&&(c.stack=c.message+s.stack.replace(s.message,"")),o.reject(c);}}).catch(c=>{if(!a){o.reject(c);return}throw c});return o}i(El,"resolveFixtureFunction");function vl(e,t,n=new Set,r=[]){return e.forEach(o=>{if(!r.includes(o)){if(!gn(o.value)||!o.deps){r.push(o);return}if(n.has(o))if(o.parent)o=o.parent;else throw new Error(`Circular fixture dependency detected: ${o.name} <- ${[...n].reverse().map(s=>s.name).join(" <- ")}`);n.add(o),vl([...o.deps].map(s=>s===o.name?o.parent:t.get(s)).filter(s=>!!s),t,n,r),r.push(o),n.clear();}}),r}i(vl,"resolveDeps");function cg(e,t,n){let r=ts(e,{sourceError:n,suiteHook:t});if(r.size){let o=new Yo(`The ${t} hook uses fixtures "${[...r].join('", "')}", but has no access to context. Did you forget to call it as "test.${t}()" instead of "${t}()"?
64
- If you used internal "suite" task as the first argument previously, access it in the second argument instead. See https://vitest.dev/guide/test-context#suite-level-hooks`);throw n&&(o.stack=n.stack?.replace(n.message,o.message)),o}}i(cg,"validateSuiteHook");var Xo=Symbol("$vitest:fixture-props"),Zo=Symbol("$vitest:fixture-prop-names");function hr(e,t){Object.defineProperty(e,Xo,{value:t,enumerable:false});}i(hr,"configureProps");function cr(e,t){return e[Zo]=t,t}i(cr,"memoProps");function ts(e,{sourceError:t,suiteHook:n}={}){if(Zo in e)return e[Zo];let{index:r=0,original:o=e}=Xo in e?e[Xo]:{},s=Ec(o.toString());/__async\((?:this|null), (?:null|arguments|\[[_0-9, ]*\]), function\*/.test(s)&&(s=s.split(/__async\((?:this|null),/)[1]);let a=s.match(/[^(]*\(([^)]*)/);if(!a)return cr(e,new Set);let l=dl(a[1]);if(!l.length)return cr(e,new Set);let c=l[r];if(!c)return cr(e,new Set);if(!(c[0]==="{"&&c.endsWith("}"))){let p=lt(r+1),d=new fr(`The ${p} argument inside a fixture must use object destructuring pattern, e.g. ({ task } => {}). Instead, received "${c}".${n?` If you used internal "suite" task as the ${p} argument previously, access it in the ${lt(r+2)} argument instead.`:""}`);throw t&&(d.stack=t.stack?.replace(t.message,d.message)),d}let u=c.slice(1,-1).replace(/\s/g,""),f=dl(u).map(p=>p.replace(/:.*|=.*/g,"")),h=f.at(-1);if(h&&h.startsWith("...")){let p=new fr(`Rest parameters are not supported in fixtures, received "${h}".`);throw t&&(p.stack=t.stack?.replace(t.message,p.message)),p}return cr(e,new Set(f))}i(ts,"getUsedProps");function dl(e){let t=[],n=[],r=0;for(let s=0;s<e.length;s++)if(e[s]==="{"||e[s]==="[")n.push(e[s]==="{"?"}":"]");else if(e[s]===n.at(-1))n.pop();else if(!n.length&&e[s]===","){let a=e.substring(r,s).trim();a&&t.push(a),r=s+1;}let o=e.substring(r).trim();return o&&t.push(o),t}i(dl,"splitByComma");var lg;function zt(){return lg}i(zt,"getCurrentTest");var xl=Symbol("kChainableContext");function ht(e){return e?.[xl]}i(ht,"getChainableContext");function mr(e,t,n){function r(s){let a=i(function(...l){return t.apply(s,l)},"chain");Object.assign(a,t),Object.defineProperty(a,xl,{value:{withContext:i(()=>a.bind(s),"withContext"),getFixtures:i(()=>s.fixtures,"getFixtures"),setContext:i((l,c)=>{s[l]=c;},"setContext"),mergeContext:i(l=>{Object.assign(s,l);},"mergeContext")},enumerable:false});for(let l of e)Object.defineProperty(a,l,{get(){return r({...s,[l]:true})}});return a}i(r,"create");let o=r(n??{});return Object.defineProperty(o,"fn",{value:t,enumerable:false}),o}i(mr,"createChainable");function dt(){return fs().config.hookTimeout}i(dt,"getDefaultHookTimeout");var kl=Symbol.for("VITEST_CLEANUP_TIMEOUT"),_l=Symbol.for("VITEST_CLEANUP_STACK_TRACE"),Ml=Symbol.for("VITEST_AROUND_TIMEOUT"),Cl=Symbol.for("VITEST_AROUND_STACK_TRACE");function ns(e,t=dt()){de(e,'"beforeAll" callback',["function"]);let n=new Error("STACK_TRACE_ERROR"),r=ht(this);return Ve().on("beforeAll",Object.assign(pt(cs("beforeAll",e,r,n),t,true,n),{[kl]:t,[_l]:n}))}i(ns,"beforeAll");function rs(e,t){de(e,'"afterAll" callback',["function"]);let n=ht(this),r=new Error("STACK_TRACE_ERROR");return Ve().on("afterAll",pt(cs("afterAll",e,n,r),t??dt(),true,r))}i(rs,"afterAll");function os(e,t=dt()){de(e,'"beforeEach" callback',["function"]);let n=new Error("STACK_TRACE_ERROR"),r=i((o,s)=>yn(e,{suite:s})(o),"wrapper");return Ve().on("beforeEach",Object.assign(pt(r,t??dt(),true,n,bn),{[kl]:t,[_l]:n}))}i(os,"beforeEach");function ss(e,t){de(e,'"afterEach" callback',["function"]);let n=i((r,o)=>yn(e,{suite:o})(r),"wrapper");return Ve().on("afterEach",pt(n,t??dt(),true,new Error("STACK_TRACE_ERROR"),bn))}i(ss,"afterEach");function is(e,t){de(e,'"aroundAll" callback',["function"]);let n=new Error("STACK_TRACE_ERROR"),r=t??dt(),o=ht(this);return Ve().on("aroundAll",Object.assign(cs("aroundAll",e,o,n,1),{[Ml]:r,[Cl]:n}))}i(is,"aroundAll");function as(e,t){de(e,'"aroundEach" callback',["function"]);let n=new Error("STACK_TRACE_ERROR"),r=t??dt(),o=i((s,a,l)=>{let c=i(f=>e(s,f,l),"innerFn");return hr(c,{index:1,original:e}),yn(c,{suite:l})(a)},"wrapper");return Ve().on("aroundEach",Object.assign(o,{[Ml]:r,[Cl]:n}))}i(as,"aroundEach");function cs(e,t,n,r,o=0){return (...s)=>{let a=s.at(-1),l=s.slice(0,-1),c=i(p=>t(...l,p,a),"wrapper");hr(c,{index:o,original:t});let u=n?.getFixtures(),f=u?.getFileContext(a.file);return yn(c,{suiteHook:e,fixtures:u,context:f,stackTraceError:r})()}}i(cs,"withSuiteFixtures");function Al(e,t){return (n,r)=>{de(n,`"${e}" callback`,["function"]);throw new Error(`Hook ${e}() can only be called inside a test`);}}i(Al,"createTestHook");function dr(e,t){let n=t.split(`
65
- `).slice(1);for(let r of n){let o=ir(r);if(o&&o.file===e)return o}}i(dr,"findTestFileStackTrace");function $l(e,t){if(!e.strictTags)return;let n=new Set(e.tags.map(r=>r.name));for(let r of t)if(!n.has(r))throw Nl(e.tags,r)}i($l,"validateTags");function Nl(e,t,n="tag"){throw e.length?new Error(`The ${n} "${t}" is not defined in the configuration. Available tags are:
59
+ `))return Yd(t,e,n);let[f]=zc(t,e,true),h=f.some(m=>m[0]===ce),d=om(r,o),p=d(r)+am(Nc(f,Ee,h)),g=d(o)+im(Nc(f,we,h));return `${p}
60
+ ${g}`}let s=_o(t,{forceWritable:true}),a=_o(e,{forceWritable:true}),{replacedExpected:l,replacedActual:c}=Qn(a,s);return _t(l,c,n)}i(nr,"printDiffOrStringify");function Qn(e,t,n=new WeakSet,r=new WeakSet){return e instanceof Error&&t instanceof Error&&typeof e.cause<"u"&&typeof t.cause>"u"?(delete e.cause,{replacedActual:e,replacedExpected:t}):Zn(e,t)?n.has(e)||r.has(t)?{replacedActual:e,replacedExpected:t}:(n.add(e),r.add(t),Co(t).forEach(o=>{let s=t[o],a=e[o];if($c(s)){if(s.asymmetricMatch(a))t[o]=a;else if("sample"in s&&s.sample!==void 0&&Zn(a,s.sample)){let l=Qn(a,s.sample,n,r);e[o]=l.replacedActual,t[o]=l.replacedExpected;}}else if($c(a)){if(a.asymmetricMatch(s))e[o]=s;else if("sample"in a&&a.sample!==void 0&&Zn(a.sample,s)){let l=Qn(a.sample,s,n,r);e[o]=l.replacedActual,t[o]=l.replacedExpected;}}else if(Zn(a,s)){let l=Qn(a,s,n,r);e[o]=l.replacedActual,t[o]=l.replacedExpected;}}),{replacedActual:e,replacedExpected:t}):{replacedActual:e,replacedExpected:t}}i(Qn,"replaceAsymmetricMatcher");function om(...e){let t=e.reduce((n,r)=>r.length>n?r.length:n,0);return n=>`${n}: ${" ".repeat(t-n.length)}`}i(om,"getLabelPrinter");var sm="\xB7";function Kc(e){return e.replace(/\s+$/gm,t=>sm.repeat(t.length))}i(Kc,"replaceTrailingSpaces");function im(e){return se.red(Kc(ye(e)))}i(im,"printReceived");function am(e){return se.green(Kc(ye(e)))}i(am,"printExpected");function Nc(e,t,n){return e.reduce((r,o)=>r+(o[0]===ce?o[1]:o[0]===t?n?se.inverse(o[1]):o[1]:""),"")}i(Nc,"getCommonAndChangedSubstrings");var cm="@@__IMMUTABLE_RECORD__@@",lm="@@__IMMUTABLE_ITERABLE__@@";function um(e){return e&&(e[lm]||e[cm])}i(um,"isImmutable");var fm=Object.getPrototypeOf({});function Hc(e){return e instanceof Error?`<unserializable>: ${e.message}`:typeof e=="string"?`<unserializable>: ${e}`:"<unserializable>"}i(Hc,"getUnserializableMessage");function ut(e,t=new WeakMap){if(!e||typeof e=="string")return e;if(e instanceof Error&&"toJSON"in e&&typeof e.toJSON=="function"){let n=e.toJSON();return n&&n!==e&&typeof n=="object"&&(typeof e.message=="string"&&un(()=>n.message??=Gc(e.message)),typeof e.stack=="string"&&un(()=>n.stack??=e.stack),typeof e.name=="string"&&un(()=>n.name??=e.name),e.cause!=null&&un(()=>n.cause??=ut(e.cause,t))),ut(n,t)}if(typeof e=="function")return `Function<${e.name||"anonymous"}>`;if(typeof e=="symbol")return e.toString();if(typeof e!="object")return e;if(typeof Buffer<"u"&&e instanceof Buffer)return `<Buffer(${e.length}) ...>`;if(typeof Uint8Array<"u"&&e instanceof Uint8Array)return `<Uint8Array(${e.length}) ...>`;if(um(e))return ut(e.toJSON(),t);if(e instanceof Promise||e.constructor&&e.constructor.prototype==="AsyncFunction")return "Promise";if(typeof Element<"u"&&e instanceof Element)return e.tagName;if(typeof e.toJSON=="function")return ut(e.toJSON(),t);if(t.has(e))return t.get(e);if(Array.isArray(e)){let n=new Array(e.length);return t.set(e,n),e.forEach((r,o)=>{try{n[o]=ut(r,t);}catch(s){n[o]=Hc(s);}}),n}else {let n=Object.create(null);t.set(e,n);let r=e;for(;r&&r!==fm;)Object.getOwnPropertyNames(r).forEach(o=>{if(!(o in n))try{n[o]=ut(e[o],t);}catch(s){delete n[o],n[o]=Hc(s);}}),r=Object.getPrototypeOf(r);return e instanceof Error&&un(()=>n.message=Gc(e.message)),n}}i(ut,"serializeValue");function un(e){try{return e()}catch{}}i(un,"safe");function Gc(e){return e.replace(/\(0\s?,\s?__vite_ssr_import_\d+__.(\w+)\)/g,"$1").replace(/__(vite_ssr_import|vi_import)_\d+__\./g,"").replace(/getByTestId('__vitest_\d+__')/g,"page")}i(Gc,"normalizeErrorMessage");function Bo(e,t,n=new WeakSet){if(!e||typeof e!="object")return {message:String(e)};let r=e;(r.showDiff||r.showDiff===void 0&&r.expected!==void 0&&r.actual!==void 0)&&(r.diff=nr(r.actual,r.expected,{...t,...r.diffOptions})),"expected"in r&&typeof r.expected!="string"&&(r.expected=ye(r.expected,10)),"actual"in r&&typeof r.actual!="string"&&(r.actual=ye(r.actual,10));try{!n.has(r)&&typeof r.cause=="object"&&(n.add(r),r.cause=Bo(r.cause,t,n));}catch{}try{return ut(r)}catch(o){return ut(new Error(`Failed to fully serialize error: ${o?.message}
61
+ Inner error message: ${r?.message}`))}}i(Bo,"processError");var Jc=Symbol("vitest:SAFE_TIMERS");function ft(){let{setTimeout:e,setInterval:t,clearInterval:n,clearTimeout:r,setImmediate:o,clearImmediate:s,queueMicrotask:a}=globalThis[Jc]||globalThis,{nextTick:l}=globalThis[Jc]||globalThis.process||{};return {nextTick:l,setTimeout:e,setInterval:t,clearInterval:n,clearTimeout:r,setImmediate:o,clearImmediate:s,queueMicrotask:a}}i(ft,"getSafeTimers");function Yc(e,t=setTimeout){return new Promise(n=>t(n,e))}i(Yc,"delay");var hm=/^[A-Za-z]:\//;function pm(e=""){return e&&e.replace(/\\/g,"/").replace(hm,t=>t.toUpperCase())}i(pm,"normalizeWindowsPath");var dm=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;function mm(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}i(mm,"cwd");var qo=i(function(...e){e=e.map(r=>pm(r));let t="",n=false;for(let r=e.length-1;r>=-1&&!n;r--){let o=r>=0?e[r]:mm();!o||o.length===0||(t=`${o}/${t}`,n=Xc(o));}return t=gm(t,!n),n&&!Xc(t)?`/${t}`:t.length>0?t:"."},"resolve");function gm(e,t){let n="",r=0,o=-1,s=0,a=null;for(let l=0;l<=e.length;++l){if(l<e.length)a=e[l];else {if(a==="/")break;a="/";}if(a==="/"){if(!(o===l-1||s===1))if(s===2){if(n.length<2||r!==2||n[n.length-1]!=="."||n[n.length-2]!=="."){if(n.length>2){let c=n.lastIndexOf("/");c===-1?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),o=l,s=0;continue}else if(n.length>0){n="",r=0,o=l,s=0;continue}}t&&(n+=n.length>0?"/..":"..",r=2);}else n.length>0?n+=`/${e.slice(o+1,l)}`:n=e.slice(o+1,l),r=l-o-1;o=l,s=0;}else a==="."&&s!==-1?++s:s=-1;}return n}i(gm,"normalizeString");var Xc=i(function(e){return dm.test(e)},"isAbsolute");var ym=44,Zc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wm=new Uint8Array(64),nl=new Uint8Array(128);for(let e=0;e<Zc.length;e++){let t=Zc.charCodeAt(e);wm[e]=t,nl[t]=e;}function fn(e,t){let n=0,r=0,o=0;do{let a=e.next();o=nl[a],n|=(o&31)<<r,r+=5;}while(o&32);let s=n&1;return n>>>=1,s&&(n=-2147483648|-n),t+n}i(fn,"decodeInteger");function Qc(e,t){return e.pos>=t?false:e.peek()!==ym}i(Qc,"hasMoreVlq");var bm=class{static{i(this,"StringReader");}constructor(e){this.pos=0,this.buffer=e;}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){let{buffer:t,pos:n}=this,r=t.indexOf(e,n);return r===-1?t.length:r}};function Tm(e){let{length:t}=e,n=new bm(e),r=[],o=0,s=0,a=0,l=0,c=0;do{let u=n.indexOf(";"),f=[],h=true,d=0;for(o=0;n.pos<u;){let p;o=fn(n,o),o<d&&(h=false),d=o,Qc(n,u)?(s=fn(n,s),a=fn(n,a),l=fn(n,l),Qc(n,u)?(c=fn(n,c),p=[o,s,a,l,c]):p=[o,s,a,l]):p=[o],f.push(p),n.pos++;}h||Sm(f),r.push(f),n.pos=u+1;}while(n.pos<=t);return r}i(Tm,"decode");function Sm(e){e.sort(Em);}i(Sm,"sort");function Em(e,t){return e[0]-t[0]}i(Em,"sortComparator");var sr=0,vm=1,xm=2,km=3,Mm=4,or=false;function Cm(e,t,n,r){for(;n<=r;){let o=n+(r-n>>1),s=e[o][sr]-t;if(s===0)return or=true,o;s<0?n=o+1:r=o-1;}return or=false,n-1}i(Cm,"binarySearch");function _m(e,t,n){for(let r=n+1;r<e.length&&e[r][sr]===t;n=r++);return n}i(_m,"upperBound");function Om(e,t,n){for(let r=n-1;r>=0&&e[r][sr]===t;n=r--);return n}i(Om,"lowerBound");function Im(e,t,n,r){let{lastKey:o,lastNeedle:s,lastIndex:a}=n,l=0,c=e.length-1;if(r===o){if(t===s)return or=a!==-1&&e[a][sr]===t,a;t>=s?l=a===-1?0:a:c=a;}return n.lastKey=r,n.lastNeedle=t,n.lastIndex=Cm(e,t,l,c)}i(Im,"memoizedBinarySearch");var Am="`line` must be greater than 0 (lines start at line 1)",$m="`column` must be greater than or equal to 0 (columns start at column 0)",el=-1,Nm=1;function Pm(e){var t;return (t=e)._decoded||(t._decoded=Tm(e._encoded))}i(Pm,"decodedMappings");function Rm(e,t){let{line:n,column:r,bias:o}=t;if(n--,n<0)throw new Error(Am);if(r<0)throw new Error($m);let s=Pm(e);if(n>=s.length)return rr(null,null,null,null);let a=s[n],l=jm(a,e._decodedMemo,n,r,o||Nm);if(l===-1)return rr(null,null,null,null);let c=a[l];if(c.length===1)return rr(null,null,null,null);let{names:u,resolvedSources:f}=e;return rr(f[c[vm]],c[xm]+1,c[km],c.length===5?u[c[Mm]]:null)}i(Rm,"originalPositionFor");function rr(e,t,n,r){return {source:e,line:t,column:n,name:r}}i(rr,"OMapping");function jm(e,t,n,r,o){let s=Im(e,r,t,n);return or?s=(o===el?_m:Om)(e,r,s):o===el&&s++,s===-1||s===e.length?-1:s}i(jm,"traceSegmentInternal");var Wo=/^\s*at .*(?:\S:\d+|\(native\))/m,Fm=/^(?:eval@)?(?:\[native code\])?$/,Dm=["node:internal",/\/packages\/\w+\/dist\//,/\/@vitest\/\w+\/dist\//,"/vitest/dist/","/vitest/src/","/node_modules/chai/","/node_modules/tinyspy/","/vite/dist/node/module-runner","/rolldown-vite/dist/node/module-runner","/deps/chunk-","/deps/@vitest","/deps/loupe","/deps/chai","/browser-playwright/dist/locators.js","/browser-webdriverio/dist/locators.js","/browser-preview/dist/locators.js",/node:\w+/,/__vitest_test__/,/__vitest_browser__/,"/@id/__x00__vitest/browser",/\/deps\/vitest_/],Lm=Date.now().toString().length,Bm=new RegExp(`vitest=\\d{${Lm}}`);function rl(e){if(!e.includes(":"))return [e];let n=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/^\(|\)$/g,""));if(!n)return [e];let r=n[1];if(r.startsWith("async ")&&(r=r.slice(6)),r.startsWith("http:")||r.startsWith("https:")){let o=new URL(r);o.searchParams.delete("import"),o.searchParams.delete("browserv"),r=o.pathname+o.hash+o.search;}if(r.startsWith("/@fs/")){let o=/^\/@fs\/[a-zA-Z]:\//.test(r);r=r.slice(o?5:4);}return r.includes("vitest=")&&(r=r.replace(Bm,"").replace(/[?&]$/,"")),[r,n[2]||void 0,n[3]||void 0]}i(rl,"extractLocation");function ol(e){let t=e.trim();if(Fm.test(t)||(t.includes(" > eval")&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!t.includes("@")))return null;let n=-1,r="",o;for(let c=0;c<t.length;c++)if(t[c]==="@"){let u=t.slice(c+1);if(u.includes(":")&&u.length>=3){n=c,r=u,o=c>0?t.slice(0,c):void 0;break}}if(n===-1||!r.includes(":")||r.length<3)return null;let[s,a,l]=rl(r);return !s||!a||!l?null:{file:s,method:o||"",line:Number.parseInt(a),column:Number.parseInt(l)}}i(ol,"parseSingleFFOrSafariStack");function ir(e){let t=e.trim();return Wo.test(t)?sl(t):ol(t)}i(ir,"parseSingleStack");function sl(e){let t=e.trim();if(!Wo.test(t))return null;t.includes("(eval ")&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let n=t.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),r=n.match(/ (\(.+\)$)/);n=r?n.replace(r[0],""):n;let[o,s,a]=rl(r?r[1]:n),l=r&&n||"",c=o&&["eval","<anonymous>"].includes(o)?void 0:o;return !c||!s||!a?null:(l.startsWith("async ")&&(l=l.slice(6)),c.startsWith("file://")&&(c=c.slice(7)),c=c.startsWith("node:")||c.startsWith("internal:")?c:qo(c),l&&(l=l.replace(/\(0\s?,\s?__vite_ssr_import_\d+__.(\w+)\)/g,"$1").replace(/__(vite_ssr_import|vi_import)_\d+__\./g,"").replace(/(Object\.)?__vite_ssr_export_default__\s?/g,"")),{method:l,file:c,line:Number.parseInt(s),column:Number.parseInt(a)})}i(sl,"parseSingleV8Stack");function Uo(e,t={}){let{ignoreStackEntries:n=Dm}=t,r=Wo.test(e)?Um(e):qm(e),o=r.findLastIndex(s=>s.method==="__VITEST_HELPER__"||s.method==="async*__VITEST_HELPER__");return o>=0&&(r=r.slice(o+1)),r.map(s=>{t.getUrlId&&(s.file=t.getUrlId(s.file));let a=t.getSourceMap?.(s.file);if(!a||typeof a!="object"||!a.version)return tl(n,s.file)?null:s;let l=new zo(a,s.file),c=Wm(l,s);if(!c)return s;let{line:u,column:f,source:h,name:d}=c,p=h||s.file;return p.match(/\/\w:\//)&&(p=p.slice(1)),tl(n,p)?null:u!=null&&f!=null?{line:u,column:f,file:p,method:d||s.method}:s}).filter(s=>s!=null)}i(Uo,"parseStacktrace");function tl(e,t){return e.some(n=>t.match(n))}i(tl,"shouldFilter");function qm(e){return e.split(`
62
+ `).map(t=>ol(t)).filter(Mo)}i(qm,"parseFFOrSafariStackTrace");function Um(e){return e.split(`
63
+ `).map(t=>sl(t)).filter(Mo)}i(Um,"parseV8Stacktrace");function il(e,t={}){if(!e||mc(e))return [];if("stacks"in e&&e.stacks)return e.stacks;let n=e.stack||"",r=typeof n=="string"?Uo(n,t):[];if(!r.length){let o=e;o.fileName!=null&&o.lineNumber!=null&&o.columnNumber!=null&&(r=Uo(`${o.fileName}:${o.lineNumber}:${o.columnNumber}`,t)),o.sourceURL!=null&&o.line!=null&&o._column!=null&&(r=Uo(`${o.sourceURL}:${o.line}:${o.column}`,t));}return t.frameFilter&&(r=r.filter(o=>t.frameFilter(e,o)!==false)),e.stacks=r,r}i(il,"parseErrorStacktrace");var zo=class{static{i(this,"DecodedMap");}_encoded;_decoded;_decodedMemo;url;version;names=[];resolvedSources;constructor(t,n){this.map=t;let{mappings:r,names:o,sources:s}=t;this.version=t.version,this.names=o||[],this._encoded=r||"",this._decodedMemo=zm(),this.url=n,this.resolvedSources=(s||[]).map(a=>qo(n,"..",a||""));}};function zm(){return {lastKey:-1,lastNeedle:-1,lastIndex:-1}}i(zm,"memoizedState");function Wm(e,t){let n=Rm(e,t);return n.column==null?null:n}i(Wm,"getOriginalPosition");var Ho=class extends Error{static{i(this,"PendingError");}code="VITEST_PENDING";taskId;constructor(t,n,r){super(t),this.message=t,this.note=r,this.taskId=n.id;}};var nt=class extends Error{static{i(this,"FixtureDependencyError");}name="FixtureDependencyError"},Go=class extends Error{static{i(this,"FixtureAccessError");}name="FixtureAccessError"},fr=class extends Error{static{i(this,"FixtureParseError");}name="FixtureParseError"};var Vm=new WeakMap,hl=new WeakMap,pl=new WeakMap;function dl(e,t){Vm.set(e,t);}i(dl,"setFn");function Km(e,t){hl.set(e,t);}i(Km,"setTestFixture");function Hm(e){return hl.get(e)}i(Hm,"getTestFixtures");function ml(e,t){pl.set(e,t);}i(ml,"setHooks");function Zo(e){return pl.get(e)}i(Zo,"getHooks");var lr=Symbol.for("VITEST_FIXTURE_STACK_TRACE"),pn=class e{static{i(this,"TestFixtures");}_suiteContexts;_overrides=new WeakMap;_registrations;static _definitions=[];static _builtinFixtures=["task","signal","onTestFailed","onTestFinished","skip","annotate"];static _fixtureOptionKeys=["auto","injected","scope"];static _fixtureScopes=["test","file","worker"];static _workerContextSuite={type:"worker"};static clearDefinitions(){e._definitions.length=0;}static getWorkerContexts(){return e._definitions.map(t=>t.getWorkerContext())}static getFileContexts(t){return e._definitions.map(n=>n.getFileContext(t))}static isFixtureOptions(t){return Le(t)&&Object.keys(t).some(n=>e._fixtureOptionKeys.includes(n))}constructor(t){this._registrations=t??new Map,this._suiteContexts=new WeakMap,e._definitions.push(this);}extend(t,n){let{suite:r}=Ve(),o=!r||r.file===r,s=this.parseUserFixtures(t,n,o);return new e(s)}get(t){let n=t;for(;n;){let r=this._overrides.get(n);if(r)return r;if(n===n.file)break;n=n.suite||n.file;}return this._registrations}override(t,n){let{suite:r,file:o}=Ve(),s=r||o,a=!r||r.file===r,l=new Map(this.get(s)),c=this.parseUserFixtures(t,n,a,l);a?this._registrations=c:this._overrides.set(s,c);}getFileContext(t){return this._suiteContexts.has(t)||this._suiteContexts.set(t,Object.create(null)),this._suiteContexts.get(t)}getWorkerContext(){return this._suiteContexts.has(e._workerContextSuite)||this._suiteContexts.set(e._workerContextSuite,Object.create(null)),this._suiteContexts.get(e._workerContextSuite)}parseUserFixtures(t,n,r,o=new Map(this._registrations)){let s=[];Object.entries(n).forEach(([a,l])=>{let c,u,f;Array.isArray(l)&&l.length>=2&&e.isFixtureOptions(l[1])?(f=l[1],c={auto:f.auto??false,scope:f.scope??"test",injected:f.injected??false},u=c.injected?t.injectValue?.(a)??l[0]:l[0]):u=l;let h=o.get(a);h&&c?(h.scope!==c.scope&&s.push(new nt(`The "${a}" fixture was already registered with a "${c.scope}" scope.`)),h.auto!==c.auto&&s.push(new nt(`The "${a}" fixture was already registered as { auto: ${c.auto} }.`))):h?c={auto:h.auto,scope:h.scope,injected:h.injected}:c||(c={auto:false,injected:false,scope:"test"}),c.scope&&!e._fixtureScopes.includes(c.scope)&&s.push(new nt(`The "${a}" fixture has unknown scope "${c.scope}".`)),!r&&c.scope!=="test"&&s.push(new nt(`The "${a}" fixture cannot be defined with a ${c.scope} scope${!f?.scope&&h?.scope?" (inherited from the base fixture)":""} inside the describe block. Define it at the top level of the file instead.`));let d=dn(u)?Qo(u):new Set,p={name:a,value:u,auto:c.auto??false,injected:c.injected??false,scope:c.scope??"test",deps:d,parent:h};dn(u)&&Object.assign(u,{[lr]:new Error("STACK_TRACE_ERROR")}),o.set(a,p),p.scope==="worker"&&(t.pool==="vmThreads"||t.pool==="vmForks")&&(p.scope="file");});for(let a of o.values())for(let l of a.deps){if(e._builtinFixtures.includes(l))continue;let c=o.get(l);if(!c){s.push(new nt(`The "${a.name}" fixture depends on unknown fixture "${l}".`));continue}if(l===a.name&&!a.parent){s.push(new nt(`The "${a.name}" fixture depends on itself, but does not have a base implementation.`));continue}if(e._fixtureScopes.indexOf(a.scope)>e._fixtureScopes.indexOf(c.scope)){s.push(new nt(`The ${a.scope} "${a.name}" fixture cannot depend on a ${c.scope} fixture "${c.name}".`));continue}}if(s.length===1)throw s[0];if(s.length>1)throw new AggregateError(s,"Cannot resolve user fixtures. See errors for more information.");return o}},Bt=new WeakMap;var Vo=new WeakMap;function mn(e,t){let n=Ve(),r=t?.suite||n.suite||n.file;return async o=>{let s=o||t?.context;if(!s)return t?.suiteHook&&Ym(e,t.suiteHook,t.stackTraceError),e({});let a=t?.fixtures||Hm(s);if(!a)return e(s);let l=a.get(r);if(!l.size)return e(s);let c=[],u=Qo(e);for(let p of l.values())(p.auto||u.has(p.name))&&c.push(p);if(!c.length)return e(s);Bt.has(s)||Bt.set(s,[]);let f=Bt.get(s),h=yl(c,l);if(!h.length)return e(s);if(t?.suiteHook){let p=h.filter(g=>g.scope==="test");if(p.length>0){let g=p.map(E=>`"${E.name}"`).join(", "),m={aroundAll:"aroundEach",beforeAll:"beforeEach",afterAll:"afterEach"},b=new nt(`Test-scoped fixtures cannot be used inside ${t.suiteHook} hook. The following fixtures are test-scoped: ${g}. Use { scope: 'file' } or { scope: 'worker' } fixtures instead, or move the logic to ${m[t.suiteHook]} hook.`);throw t.stackTraceError?.stack&&(b.stack=b.message+t.stackTraceError.stack.replace(t.stackTraceError.message,"")),b}}Vo.has(s)||Vo.set(s,new WeakSet);let d=Vo.get(s);for(let p of h)if(p.scope==="test"){if(d.has(p))continue;d.add(p);let g=await Gm(p,s,f);s[p.name]=g,f.push(()=>{d.delete(p);});}else {let g=await Jm(a,r,p);s[p.name]=g;}return e(s)}}i(mn,"withFixtures");function dn(e){return typeof e=="function"}i(dn,"isFixtureFunction");function Gm(e,t,n){return dn(e.value)?gl(e.value,e.name,t,n):e.value}i(Gm,"resolveTestFixtureValue");var ar=new WeakMap;async function Jm(e,t,n){let r=e.getWorkerContext(),o=e.getFileContext(t.file),s=n.scope==="worker"?r:o;if(!dn(n.value))return s[n.name]=n.value,n.value;if(n.name in s)return s[n.name];if(ar.has(n))return ar.get(n);Bt.has(s)||Bt.set(s,[]);let a=Bt.get(s),l=gl(n.value,n.name,n.scope==="file"?{...r,...o}:s,a).then(c=>(s[n.name]=c,ar.delete(n),c));return ar.set(n,l),l}i(Jm,"resolveScopeFixtureValue");async function gl(e,t,n,r){let o=Jn(),s=lr in e&&e[lr]instanceof Error?e[lr]:void 0,a=false,l=e(n,async c=>{a=true,o.resolve(c);let u=Jn();r.push(async()=>{u.resolve(),await l;}),await u;}).then(()=>{if(!a){let c=new Error(`Fixture "${t}" returned without calling "use". Make sure to call "use" in every code path of the fixture function.`);s?.stack&&(c.stack=c.message+s.stack.replace(s.message,"")),o.reject(c);}}).catch(c=>{if(!a){o.reject(c);return}throw c});return o}i(gl,"resolveFixtureFunction");function yl(e,t,n=new Set,r=[]){return e.forEach(o=>{if(!r.includes(o)){if(!dn(o.value)||!o.deps){r.push(o);return}if(n.has(o))if(o.parent)o=o.parent;else throw new Error(`Circular fixture dependency detected: ${o.name} <- ${[...n].reverse().map(s=>s.name).join(" <- ")}`);n.add(o),yl([...o.deps].map(s=>s===o.name?o.parent:t.get(s)).filter(s=>!!s),t,n,r),r.push(o),n.clear();}}),r}i(yl,"resolveDeps");function Ym(e,t,n){let r=Qo(e,{sourceError:n,suiteHook:t});if(r.size){let o=new Go(`The ${t} hook uses fixtures "${[...r].join('", "')}", but has no access to context. Did you forget to call it as "test.${t}()" instead of "${t}()"?
64
+ If you used internal "suite" task as the first argument previously, access it in the second argument instead. See https://vitest.dev/guide/test-context#suite-level-hooks`);throw n&&(o.stack=n.stack?.replace(n.message,o.message)),o}}i(Ym,"validateSuiteHook");var Jo=Symbol("$vitest:fixture-props"),Yo=Symbol("$vitest:fixture-prop-names");function hr(e,t){Object.defineProperty(e,Jo,{value:t,enumerable:false});}i(hr,"configureProps");function cr(e,t){return e[Yo]=t,t}i(cr,"memoProps");function Qo(e,{sourceError:t,suiteHook:n}={}){if(Yo in e)return e[Yo];let{index:r=0,original:o=e}=Jo in e?e[Jo]:{},s=gc(o.toString());/__async\((?:this|null), (?:null|arguments|\[[_0-9, ]*\]), function\*/.test(s)&&(s=s.split(/__async\((?:this|null),/)[1]);let a=s.match(/[^(]*\(([^)]*)/);if(!a)return cr(e,new Set);let l=al(a[1]);if(!l.length)return cr(e,new Set);let c=l[r];if(!c)return cr(e,new Set);if(!(c[0]==="{"&&c.endsWith("}"))){let d=lt(r+1),p=new fr(`The ${d} argument inside a fixture must use object destructuring pattern, e.g. ({ task } => {}). Instead, received "${c}".${n?` If you used internal "suite" task as the ${d} argument previously, access it in the ${lt(r+2)} argument instead.`:""}`);throw t&&(p.stack=t.stack?.replace(t.message,p.message)),p}let u=c.slice(1,-1).replace(/\s/g,""),f=al(u).map(d=>d.replace(/:.*|=.*/g,"")),h=f.at(-1);if(h&&h.startsWith("...")){let d=new fr(`Rest parameters are not supported in fixtures, received "${h}".`);throw t&&(d.stack=t.stack?.replace(t.message,d.message)),d}return cr(e,new Set(f))}i(Qo,"getUsedProps");function al(e){let t=[],n=[],r=0;for(let s=0;s<e.length;s++)if(e[s]==="{"||e[s]==="[")n.push(e[s]==="{"?"}":"]");else if(e[s]===n.at(-1))n.pop();else if(!n.length&&e[s]===","){let a=e.substring(r,s).trim();a&&t.push(a),r=s+1;}let o=e.substring(r).trim();return o&&t.push(o),t}i(al,"splitByComma");var Xm;function Ut(){return Xm}i(Ut,"getCurrentTest");var wl=Symbol("kChainableContext");function ht(e){return e?.[wl]}i(ht,"getChainableContext");function mr(e,t,n){function r(s){let a=i(function(...l){return t.apply(s,l)},"chain");Object.assign(a,t),Object.defineProperty(a,wl,{value:{withContext:i(()=>a.bind(s),"withContext"),getFixtures:i(()=>s.fixtures,"getFixtures"),setContext:i((l,c)=>{s[l]=c;},"setContext"),mergeContext:i(l=>{Object.assign(s,l);},"mergeContext")},enumerable:false});for(let l of e)Object.defineProperty(a,l,{get(){return r({...s,[l]:true})}});return a}i(r,"create");let o=r(n??{});return Object.defineProperty(o,"fn",{value:t,enumerable:false}),o}i(mr,"createChainable");function pt(){return ls().config.hookTimeout}i(pt,"getDefaultHookTimeout");var bl=Symbol.for("VITEST_CLEANUP_TIMEOUT"),Tl=Symbol.for("VITEST_CLEANUP_STACK_TRACE"),Sl=Symbol.for("VITEST_AROUND_TIMEOUT"),El=Symbol.for("VITEST_AROUND_STACK_TRACE");function es(e,t=pt()){pe(e,'"beforeAll" callback',["function"]);let n=new Error("STACK_TRACE_ERROR"),r=ht(this);return Ve().on("beforeAll",Object.assign(dt(is("beforeAll",e,r,n),t,true,n),{[bl]:t,[Tl]:n}))}i(es,"beforeAll");function ts(e,t){pe(e,'"afterAll" callback',["function"]);let n=ht(this),r=new Error("STACK_TRACE_ERROR");return Ve().on("afterAll",dt(is("afterAll",e,n,r),t??pt(),true,r))}i(ts,"afterAll");function ns(e,t=pt()){pe(e,'"beforeEach" callback',["function"]);let n=new Error("STACK_TRACE_ERROR"),r=i((o,s)=>mn(e,{suite:s})(o),"wrapper");return Ve().on("beforeEach",Object.assign(dt(r,t??pt(),true,n,yn),{[bl]:t,[Tl]:n}))}i(ns,"beforeEach");function rs(e,t){pe(e,'"afterEach" callback',["function"]);let n=i((r,o)=>mn(e,{suite:o})(r),"wrapper");return Ve().on("afterEach",dt(n,t??pt(),true,new Error("STACK_TRACE_ERROR"),yn))}i(rs,"afterEach");function os(e,t){pe(e,'"aroundAll" callback',["function"]);let n=new Error("STACK_TRACE_ERROR"),r=t??pt(),o=ht(this);return Ve().on("aroundAll",Object.assign(is("aroundAll",e,o,n,1),{[Sl]:r,[El]:n}))}i(os,"aroundAll");function ss(e,t){pe(e,'"aroundEach" callback',["function"]);let n=new Error("STACK_TRACE_ERROR"),r=t??pt(),o=i((s,a,l)=>{let c=i(f=>e(s,f,l),"innerFn");return hr(c,{index:1,original:e}),mn(c,{suite:l})(a)},"wrapper");return Ve().on("aroundEach",Object.assign(o,{[Sl]:r,[El]:n}))}i(ss,"aroundEach");function is(e,t,n,r,o=0){return (...s)=>{let a=s.at(-1),l=s.slice(0,-1),c=i(d=>t(...l,d,a),"wrapper");hr(c,{index:o,original:t});let u=n?.getFixtures(),f=u?.getFileContext(a.file);return mn(c,{suiteHook:e,fixtures:u,context:f,stackTraceError:r})()}}i(is,"withSuiteFixtures");function kl(e,t){return (n,r)=>{pe(n,`"${e}" callback`,["function"]);throw new Error(`Hook ${e}() can only be called inside a test`);}}i(kl,"createTestHook");function pr(e,t){let n=t.split(`
65
+ `).slice(1);for(let r of n){let o=ir(r);if(o&&o.file===e)return o}}i(pr,"findTestFileStackTrace");function Ml(e,t){if(!e.strictTags)return;let n=new Set(e.tags.map(r=>r.name));for(let r of t)if(!n.has(r))throw Cl(e.tags,r)}i(Ml,"validateTags");function Cl(e,t,n="tag"){throw e.length?new Error(`The ${n} "${t}" is not defined in the configuration. Available tags are:
66
66
  ${e.map(r=>`- ${r.name}${r.description?`: ${r.description}`:""}`).join(`
67
- `)}`):new Error(`The Vitest config does't define any "tags", cannot apply "${t}" ${n} for this test. See: https://vitest.dev/guide/test-tags`)}i(Nl,"createNoTagsError");function ls(e){let t=[e.name],n=e;for(;n?.suite;)n=n.suite,n?.name&&t.unshift(n.name);return n!==e.file&&t.unshift(e.file.name),t}i(ls,"getNames");function pn(e,t=" > "){return e.filter(n=>n!==void 0).join(t)}i(pn,"createTaskName");var rt=dg(),us=ds(function(e,t,n){Ve().test.fn.call(this,bt(e),t,n);}),wn=rt,Pe=us,Te,Pl,pl;function Rl(e,t){if(!e)throw new Error(`Vitest failed to find ${t}. One of the following is possible:
67
+ `)}`):new Error(`The Vitest config does't define any "tags", cannot apply "${t}" ${n} for this test. See: https://vitest.dev/guide/test-tags`)}i(Cl,"createNoTagsError");function as(e){let t=[e.name],n=e;for(;n?.suite;)n=n.suite,n?.name&&t.unshift(n.name);return n!==e.file&&t.unshift(e.file.name),t}i(as,"getNames");function hn(e,t=" > "){return e.filter(n=>n!==void 0).join(t)}i(hn,"createTaskName");var rt=tg(),cs=fs(function(e,t,n){Ve().test.fn.call(this,bt(e),t,n);}),gn=rt,Pe=cs,be,_l,cl;function Ol(e,t){if(!e)throw new Error(`Vitest failed to find ${t}. One of the following is possible:
68
68
  - "vitest" is imported directly without running "vitest" command
69
69
  - "vitest" is imported inside "globalSetup" (to fix this, use "setupFiles" instead, because "globalSetup" runs in a different context)
70
70
  - "vitest" is imported inside Vite / Vitest config file
71
71
  - Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues
72
- `)}i(Rl,"assert");function fs(){return Rl(Te,"the runner"),Te}i(fs,"getRunner");function Ve(){let e=Ne.currentSuite||Pl;return Rl(e,"the current suite"),e}i(Ve,"getCurrentSuite");function ug(){return {beforeAll:[],afterAll:[],beforeEach:[],afterEach:[],aroundEach:[],aroundAll:[]}}i(ug,"createSuiteHooks");var ml=Number.POSITIVE_INFINITY;function Ut(e,t){if(t!=null&&typeof t=="object")throw new TypeError('Signature "test(name, fn, { ... })" was deprecated in Vitest 3 and removed in Vitest 4. Please, provide options as a second argument instead.');let n={},r;if(typeof t=="number"?n={timeout:t}:typeof e=="object"&&(n=e),typeof e=="function"){if(typeof t=="function")throw new TypeError("Cannot use two functions as arguments. Please use the second argument for options.");r=e;}else typeof t=="function"&&(r=t);return {options:n,handler:r}}i(Ut,"parseArguments");function fg(e,t=()=>{},n,r,o){let s=[],a;h();let l=i(function(g="",m={}){let b=Ne.currentSuite?.suite,_=(b??Ne.currentSuite?.file)?.tags||[],A=No([..._,...fn(m.tags)]),M=A.map(V=>{let U=Te.config.tags?.find(te=>te.name===V);if(!U&&Te.config.strictTags)throw Nl(Te.config.tags,V);return U}).filter(V=>V!=null).sort((V,U)=>(U.priority??ml)-(V.priority??ml)).reduce((V,U)=>{let{name:te,description:_e,priority:fe,meta:me,...je}=U;return Object.assign(V,je),me&&(V.meta=Object.assign(V.meta??Object.create(null),me)),V},{}),O=m.meta;m={...M,...m};let N=m.timeout??Te.config.testTimeout,C=b?.meta,L=M.meta,ee=Object.create(null);L&&Object.assign(ee,L),C&&Object.assign(ee,C),O&&Object.assign(ee,O);let j={id:"",name:g,fullName:pn([b?.fullName??Ne.currentSuite?.file?.fullName,g]),fullTestName:pn([b?.fullTestName,g]),suite:b,each:m.each,fails:m.fails,context:void 0,type:"test",file:b?.file??Ne.currentSuite?.file,timeout:N,retry:m.retry??Te.config.retry,repeats:m.repeats,mode:m.only?"only":m.skip?"skip":m.todo?"todo":"run",meta:ee,annotations:[],artifacts:[],tags:A},W=m.handler;j.mode==="run"&&!W&&(j.mode="todo"),(m.concurrent||!m.sequential&&Te.config.sequence.concurrent)&&(j.concurrent=true),j.shuffle=o?.shuffle;let Y=bg(j,Te);Object.defineProperty(j,"context",{value:Y,enumerable:false}),rg(Y,m.fixtures??new mn);let ge=Error.stackTraceLimit;Error.stackTraceLimit=10;let le=new Error("STACK_TRACE_ERROR");if(Error.stackTraceLimit=ge,W&&Tl(j,pt(yg(hg(yn(W,{context:Y}),j),j.context.signal),N,false,le,(V,U)=>bn([Y],U))),Te.config.includeTaskLocation){let V=le.stack,U=dr(pl,V);U&&(j.location={line:U.line,column:U.column});}return s.push(j),j},"task"),c=ds(function(g,m,b){let{options:S,handler:_}=Ut(m,b);typeof o=="object"&&(S=Object.assign({},o,S));let A=this.concurrent??(!this.sequential&&S?.concurrent);S.concurrent!=null&&A!=null&&(S.concurrent=A);let M=this.sequential??(!this.concurrent&&S?.sequential);S.sequential!=null&&M!=null&&(S.sequential=M);let O=l(bt(g),{...this,...S,handler:_});O.type="test";}),u={type:"collector",name:e,mode:n,suite:a,options:o,test:c,file:a.file,tasks:s,collect:d,task:l,clear:p,on:f};function f(g,...m){es(a)[g].push(...m);}i(f,"addHook");function h(g){typeof o=="number"&&(o={timeout:o});let m=Ne.currentSuite?.suite,b=m??Ne.currentSuite?.file,S=fn(o?.tags);if($l(Te.config,S),a={id:"",type:"suite",name:e,fullName:pn([m?.fullName??Ne.currentSuite?.file?.fullName,e]),fullTestName:pn([m?.fullTestName,e]),suite:m,mode:n,each:r,file:m?.file??Ne.currentSuite?.file,shuffle:o?.shuffle,tasks:[],meta:o?.meta??Object.create(null),concurrent:o?.concurrent,tags:No([...b?.tags||[],...S])},Te);Sl(a,ug());}i(h,"initSuite");function p(){s.length=0,h();}i(p,"clear");async function d(g){if(!g)throw new TypeError("File is required to collect tasks.");t&&await gg(u,()=>t(c));let m=[];for(let b of s)m.push(b.type==="collector"?await b.collect(g):b);return a.tasks=m,a}return i(d,"collect"),mg(u),u}i(fg,"createSuiteCollector");function hg(e,t){return(async(...n)=>{let r=await e(...n);if(t.promises){let s=(await Promise.allSettled(t.promises)).map(a=>a.status==="rejected"?a.reason:void 0).filter(Boolean);if(s.length)throw s}return r})}i(hg,"withAwaitAsyncAssertions");function dg(){function e(t,n,r){let o=Ne.currentSuite||Pl,{options:s,handler:a}=Ut(n,r),l=s.concurrent||this.concurrent||s.sequential===false,c=s.sequential||this.sequential||s.concurrent===false,{meta:u,...f}=o?.options||{};s={...f,...s};let h=this.shuffle??s.shuffle??o?.options?.shuffle??Te?.config.sequence.shuffle;h!=null&&(s.shuffle=h);let p=this.only??s.only?"only":this.skip??s.skip?"skip":this.todo??s.todo?"todo":"run";p==="run"&&!a&&(p="todo");let d=l||s.concurrent&&!c,g=c||s.sequential&&!l;return d!=null&&(s.concurrent=d&&!g),g!=null&&(s.sequential=g&&!d),u&&(s.meta=Object.assign(Object.create(null),u,s.meta)),fg(bt(t),a,p,this.each,s)}return i(e,"suiteFn"),e.each=function(t,...n){let r=ht(this),o=r.withContext();return r.setContext("each",true),Array.isArray(t)&&n.length&&(t=pr(t,n)),(s,a,l)=>{let c=bt(s),u=t.every(Array.isArray),{options:f,handler:h}=Ut(a,l),p=typeof a=="function";t.forEach((d,g)=>{let m=Array.isArray(d)?d:[d];p?u?o(ot(c,m,g),h?()=>h(...m):void 0,f.timeout):o(ot(c,m,g),h?()=>h(d):void 0,f.timeout):u?o(ot(c,m,g),f,h?()=>h(...m):void 0):o(ot(c,m,g),f,h?()=>h(d):void 0);}),r.setContext("each",void 0);}},e.for=function(t,...n){return Array.isArray(t)&&n.length&&(t=pr(t,n)),(r,o,s)=>{let a=bt(r),{options:l,handler:c}=Ut(o,s);t.forEach((u,f)=>{rt(ot(a,fn(u),f),l,c?()=>c(u):void 0);});}},e.skipIf=t=>t?rt.skip:rt,e.runIf=t=>t?rt:rt.skip,mr(["concurrent","sequential","shuffle","skip","only","todo"],e)}i(dg,"createSuite");function hs(e){let t=e;t.each=function(o,...s){let a=ht(this),l=a.withContext();return a.setContext("each",true),Array.isArray(o)&&s.length&&(o=pr(o,s)),(c,u,f)=>{let h=bt(c),p=o.every(Array.isArray),{options:d,handler:g}=Ut(u,f),m=typeof u=="function";o.forEach((b,S)=>{let _=Array.isArray(b)?b:[b];m?p?l(ot(h,_,S),g?()=>g(..._):void 0,d.timeout):l(ot(h,_,S),g?()=>g(b):void 0,d.timeout):p?l(ot(h,_,S),d,g?()=>g(..._):void 0):l(ot(h,_,S),d,g?()=>g(b):void 0);}),a.setContext("each",void 0);}},t.for=function(o,...s){let l=ht(this).withContext();return Array.isArray(o)&&s.length&&(o=pr(o,s)),(c,u,f)=>{let h=bt(c),{options:p,handler:d}=Ut(u,f);o.forEach((g,m)=>{let b=d?S=>d(g,S):void 0;b&&hr(b,{index:1,original:d}),l(ot(h,fn(g),m),p,b);});}},t.skipIf=function(o){return o?this.skip:this},t.runIf=function(o){return o?this:this.skip};function n(o,s,a){if(typeof o!="string")return o;let l=o,c,u;if(a!==void 0?(c=s,u=a):s!==null&&typeof s=="object"&&!Array.isArray(s)&&mn.isFixtureOptions(s)?(c=s,u={}):(c=void 0,u=s),typeof u=="function"){let f=u,h=i(async(p,d)=>{let g,b=await f(p,{onCleanup:i(S=>{if(g!==void 0)throw new Error("onCleanup can only be called once per fixture. Define separate fixtures if you need multiple cleanup functions.");g=S;},"onCleanup")});await d(b),g&&await g();},"fixture");return hr(h,{original:f}),c?{[l]:[h,c]}:{[l]:h}}return c?{[l]:[u,c]}:{[l]:u}}return i(n,"parseBuilderFixtures"),t.override=function(o,s,a){let l=n(o,s,a);return ht(this).getFixtures().override(Te,l),this},t.scoped=function(o){return console.warn("test.scoped() is deprecated and will be removed in future versions. Please use test.override() instead."),this.override(o)},t.extend=function(o,s,a){let l=n(o,s,a),c=ht(this).getFixtures().extend(Te,l),u=ds(function(f,h,p){e.call(this,bt(f),h,p);});return ht(u).mergeContext({fixtures:c}),u},t.describe=rt,t.suite=rt,t.beforeEach=os,t.afterEach=ss,t.beforeAll=ns,t.afterAll=rs,t.aroundEach=as,t.aroundAll=is,mr(["concurrent","sequential","skip","only","todo","fails"],t,{fixtures:new mn})}i(hs,"createTaskCollector");function ds(e){return hs(e)}i(ds,"createTest");function bt(e){return typeof e=="string"?e:typeof e=="function"?e.name||"<anonymous>":String(e)}i(bt,"formatName");function ot(e,t,n){(e.includes("%#")||e.includes("%$"))&&(e=e.replace(/%%/g,"__vitest_escaped_%__").replace(/%#/g,`${n}`).replace(/%\$/g,`${n+1}`).replace(/__vitest_escaped_%__/g,"%%"));let r=e.split("%").length-1;e.includes("%f")&&(e.match(/%f/g)||[]).forEach((u,f)=>{if(kc(t[f])||Object.is(t[f],-0)){let h=0;e=e.replace(/%f/g,p=>(h++,h===f+1?"-%f":p));}});let o=Le(t[0]);function s(c){return c.replace(/\$([$\w.]+)/g,(u,f)=>{let h=/^\d+$/.test(f);if(!o&&!h)return `$${f}`;let p=h?$o(t,f):void 0,d=o?$o(t[0],f,p):p;return bc(d,{truncate:Te?.config?.chaiConfig?.truncateThreshold})})}i(s,"formatAttribute");let a="",l=0;return pg(e,_o,c=>{l<r?a+=yc(c[0],t[l++]):a+=c[0];},c=>{a+=s(c);}),a}i(ot,"formatTitle");function pg(e,t,n,r){let o=0;for(let s of e.matchAll(t))o<s.index&&r(e.slice(o,s.index)),n(s),o=s.index+s[0].length;o<e.length&&r(e.slice(o));}i(pg,"handleRegexMatch");function pr(e,t){let n=e.join("").trim().replace(/ /g,"").split(`
73
- `).map(o=>o.split("|"))[0],r=[];for(let o=0;o<Math.floor(t.length/n.length);o++){let s={};for(let a=0;a<n.length;a++)s[n[a]]=t[o*n.length+a];r.push(s);}return r}i(pr,"formatTemplateString");var gl=globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now,Ne={currentSuite:null};function mg(e){Ne.currentSuite?.tasks.push(e);}i(mg,"collectTask");async function gg(e,t){let n=Ne.currentSuite;Ne.currentSuite=e,await t(),Ne.currentSuite=n;}i(gg,"runWithSuite");function pt(e,t,n=false,r,o){if(t<=0||t===Number.POSITIVE_INFINITY)return e;let{setTimeout:s,clearTimeout:a}=ft();return i((function(...c){let u=gl(),f=fs();return f._currentTaskStartTime=u,f._currentTaskTimeout=t,new Promise((h,p)=>{let d=s(()=>{a(d),g();},t);d.unref?.();function g(){let S=Tg(n,t,r);o?.(c,S),p(S);}i(g,"rejectTimeoutError");function m(S){if(f._currentTaskStartTime=void 0,f._currentTaskTimeout=void 0,a(d),gl()-u>=t){g();return}h(S);}i(m,"resolve");function b(S){f._currentTaskStartTime=void 0,f._currentTaskTimeout=void 0,a(d),p(S);}i(b,"reject");try{let S=e(...c);typeof S=="object"&&S!=null&&typeof S.then=="function"?S.then(m,b):m(S);}catch(S){b(S);}})}),"runWithTimeout")}i(pt,"withTimeout");function yg(e,t){return i((function(...r){return new Promise((o,s)=>{t.addEventListener("abort",()=>s(t.reason));try{let a=e(...r);typeof a=="object"&&a!=null&&typeof a.then=="function"?a.then(o,s):o(a);}catch(a){s(a);}})}),"runWithCancel")}i(yg,"withCancel");var Qo=new WeakMap;function bn([e],t){e&&wg(e,t);}i(bn,"abortIfTimeout");function wg(e,t){Qo.get(e)?.abort(t);}i(wg,"abortContextSignal");function bg(e,t){let n=i(function(){throw new Error("done() callback is deprecated, use promise instead")},"context"),r=Qo.get(n);return r||(r=new AbortController,Qo.set(n,r)),n.signal=r.signal,n.task=e,n.skip=(o,s)=>{if(o!==false)throw e.result??={state:"skip"},e.result.pending=true,new Jo("test is skipped; abort execution",e,typeof o=="string"?o:s)},n.annotate=((o,s,a)=>{if(e.result&&e.result.state!=="run")throw new Error(`Cannot annotate tests outside of the test run. The test "${e.name}" finished running with the "${e.result.state}" state already.`);let l={message:o,type:typeof s=="object"||s===void 0?"notice":s},c=typeof s=="object"?s:a;return c&&(l.attachment=c,Dl(l.attachment)),_g(e,ps(e,{type:"internal:annotation",annotation:l}).then(async({annotation:u})=>{if(!t.onTestAnnotate)throw new Error("Test runner doesn't support test annotations.");await Fl(t);let f=await t.onTestAnnotate(e,u);return e.annotations.push(f),f}))}),n.onTestFailed=(o,s)=>{e.onFailed||=[],e.onFailed.push(pt(o,s??t.config.hookTimeout,true,new Error("STACK_TRACE_ERROR"),(a,l)=>r.abort(l)));},n.onTestFinished=(o,s)=>{e.onFinished||=[],e.onFinished.push(pt(o,s??t.config.hookTimeout,true,new Error("STACK_TRACE_ERROR"),(a,l)=>r.abort(l)));},t.extendTaskContext?.(n)||n}i(bg,"createTestContext");function Tg(e,t,n){let r=`${e?"Hook":"Test"} timed out in ${t}ms.
74
- If this is a long-running ${e?"hook":"test"}, pass a timeout value as the last argument or configure it globally with "${e?"hookTimeout":"testTimeout"}".`,o=new Error(r);return n?.stack&&(o.stack=n.stack.replace(o.message,n.message)),o}i(Tg,"makeTimeoutError");globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;var Sg=Date.now,{clearTimeout:Eg,setTimeout:vg}=ft();var Go=new Map,yl=[],ur=[];function jl(e){if(Go.size){let t=Array.from(Go).map(([r,o])=>[r,o[0],o[1]]),n=e.onTaskUpdate?.(t,yl);n&&(ur.push(n),n.then(()=>ur.splice(ur.indexOf(n),1),()=>{})),yl.length=0,Go.clear();}}i(jl,"sendTasksUpdate");async function Fl(e){jl(e),await Promise.all(ur);}i(Fl,"finishSendTasksUpdate");function xg(e,t){let n=0,r;return i(function o(...s){let a=Sg();if(a-n>t)return n=a,Eg(r),r=void 0,e.apply(this,s);r??=vg(()=>o.bind(this)(...s),t);},"call")}i(xg,"throttle");xg(jl,100);async function ps(e,t){let n=fs(),r=dr(e.file.filepath,new Error("STACK_TRACE").stack);if(r&&(t.location={file:r.file,line:r.line,column:r.column},t.type==="internal:annotation"&&(t.annotation.location=t.location)),Array.isArray(t.attachments))for(let s of t.attachments)Dl(s);if(t.type==="internal:annotation")return t;if(!n.onTestArtifactRecord)throw new Error("Test runner doesn't support test artifacts.");await Fl(n);let o=await n.onTestArtifactRecord(e,t);return e.artifacts.push(o),o}i(ps,"recordArtifact");var Be=[];for(let e=65;e<91;e++)Be.push(String.fromCharCode(e));for(let e=97;e<123;e++)Be.push(String.fromCharCode(e));for(let e=0;e<10;e++)Be.push(e.toString(10));Be.push("+","/");function kg(e){let t="",n=e.byteLength;for(let r=0;r<n;r+=3)if(n===r+1){let o=(e[r]&252)>>2,s=(e[r]&3)<<4;t+=Be[o],t+=Be[s],t+="==";}else if(n===r+2){let o=(e[r]&252)>>2,s=(e[r]&3)<<4|(e[r+1]&240)>>4,a=(e[r+1]&15)<<2;t+=Be[o],t+=Be[s],t+=Be[a],t+="=";}else {let o=(e[r]&252)>>2,s=(e[r]&3)<<4|(e[r+1]&240)>>4,a=(e[r+1]&15)<<2|(e[r+2]&192)>>6,l=e[r+2]&63;t+=Be[o],t+=Be[s],t+=Be[a],t+=Be[l];}return t}i(kg,"encodeUint8Array");function _g(e,t){return t=t.finally(()=>{if(!e.promises)return;let n=e.promises.indexOf(t);n!==-1&&e.promises.splice(n,1);}),e.promises||(e.promises=[]),e.promises.push(t),t}i(_g,"recordAsyncOperation");function Dl(e){if(e.body==null&&!e.path)throw new TypeError('Test attachment requires "body" or "path" to be set. Both are missing.');if(e.body&&e.path)throw new TypeError('Test attachment requires only one of "body" or "path" to be set. Both are specified.');if(e.path&&e.bodyEncoding)throw new TypeError('Test attachment with "path" should not have "bodyEncoding" specified.');e.body instanceof Uint8Array&&(e.body=kg(e.body)),e.body!=null&&(e.bodyEncoding??="base64");}i(Dl,"manageArtifactAttachment");var $g="__vitest_worker__";function Wt(){let e=globalThis[$g];if(!e)throw new Error(`Vitest failed to access its internal state.
72
+ `)}i(Ol,"assert");function ls(){return Ol(be,"the runner"),be}i(ls,"getRunner");function Ve(){let e=Ne.currentSuite||_l;return Ol(e,"the current suite"),e}i(Ve,"getCurrentSuite");function Zm(){return {beforeAll:[],afterAll:[],beforeEach:[],afterEach:[],aroundEach:[],aroundAll:[]}}i(Zm,"createSuiteHooks");var ll=Number.POSITIVE_INFINITY;function qt(e,t){if(t!=null&&typeof t=="object")throw new TypeError('Signature "test(name, fn, { ... })" was deprecated in Vitest 3 and removed in Vitest 4. Please, provide options as a second argument instead.');let n={},r;if(typeof t=="number"?n={timeout:t}:typeof e=="object"&&(n=e),typeof e=="function"){if(typeof t=="function")throw new TypeError("Cannot use two functions as arguments. Please use the second argument for options.");r=e;}else typeof t=="function"&&(r=t);return {options:n,handler:r}}i(qt,"parseArguments");function Qm(e,t=()=>{},n,r,o){let s=[],a;h();let l=i(function(g="",m={}){let b=Ne.currentSuite?.suite,M=(b??Ne.currentSuite?.file)?.tags||[],A=Ao([...M,...ln(m.tags)]),C=A.map(W=>{let U=be.config.tags?.find(ee=>ee.name===W);if(!U&&be.config.strictTags)throw Cl(be.config.tags,W);return U}).filter(W=>W!=null).sort((W,U)=>(U.priority??ll)-(W.priority??ll)).reduce((W,U)=>{let{name:ee,description:Me,priority:fe,meta:me,...je}=U;return Object.assign(W,je),me&&(W.meta=Object.assign(W.meta??Object.create(null),me)),W},{}),O=m.meta;m={...C,...m};let N=m.timeout??be.config.testTimeout,_=b?.meta,q=C.meta,Q=Object.create(null);q&&Object.assign(Q,q),_&&Object.assign(Q,_),O&&Object.assign(Q,O);let R={id:"",name:g,fullName:hn([b?.fullName??Ne.currentSuite?.file?.fullName,g]),fullTestName:hn([b?.fullTestName,g]),suite:b,each:m.each,fails:m.fails,context:void 0,type:"test",file:b?.file??Ne.currentSuite?.file,timeout:N,retry:m.retry??be.config.retry,repeats:m.repeats,mode:m.only?"only":m.skip?"skip":m.todo?"todo":"run",meta:Q,annotations:[],artifacts:[],tags:A},V=m.handler;R.mode==="run"&&!V&&(R.mode="todo"),(m.concurrent||!m.sequential&&be.config.sequence.concurrent)&&(R.concurrent=true),R.shuffle=o?.shuffle;let Y=ag(R,be);Object.defineProperty(R,"context",{value:Y,enumerable:false}),Km(Y,m.fixtures??new pn);let Te=Error.stackTraceLimit;Error.stackTraceLimit=10;let le=new Error("STACK_TRACE_ERROR");if(Error.stackTraceLimit=Te,V&&dl(R,dt(sg(eg(mn(V,{context:Y}),R),R.context.signal),N,false,le,(W,U)=>yn([Y],U))),be.config.includeTaskLocation){let W=le.stack,U=pr(cl,W);U&&(R.location={line:U.line,column:U.column});}return s.push(R),R},"task"),c=fs(function(g,m,b){let{options:E,handler:M}=qt(m,b);typeof o=="object"&&(E=Object.assign({},o,E));let A=this.concurrent??(!this.sequential&&E?.concurrent);E.concurrent!=null&&A!=null&&(E.concurrent=A);let C=this.sequential??(!this.concurrent&&E?.sequential);E.sequential!=null&&C!=null&&(E.sequential=C);let O=l(bt(g),{...this,...E,handler:M});O.type="test";}),u={type:"collector",name:e,mode:n,suite:a,options:o,test:c,file:a.file,tasks:s,collect:p,task:l,clear:d,on:f};function f(g,...m){Zo(a)[g].push(...m);}i(f,"addHook");function h(g){typeof o=="number"&&(o={timeout:o});let m=Ne.currentSuite?.suite,b=m??Ne.currentSuite?.file,E=ln(o?.tags);if(Ml(be.config,E),a={id:"",type:"suite",name:e,fullName:hn([m?.fullName??Ne.currentSuite?.file?.fullName,e]),fullTestName:hn([m?.fullTestName,e]),suite:m,mode:n,each:r,file:m?.file??Ne.currentSuite?.file,shuffle:o?.shuffle,tasks:[],meta:o?.meta??Object.create(null),concurrent:o?.concurrent,tags:Ao([...b?.tags||[],...E])},be);ml(a,Zm());}i(h,"initSuite");function d(){s.length=0,h();}i(d,"clear");async function p(g){if(!g)throw new TypeError("File is required to collect tasks.");t&&await og(u,()=>t(c));let m=[];for(let b of s)m.push(b.type==="collector"?await b.collect(g):b);return a.tasks=m,a}return i(p,"collect"),rg(u),u}i(Qm,"createSuiteCollector");function eg(e,t){return(async(...n)=>{let r=await e(...n);if(t.promises){let s=(await Promise.allSettled(t.promises)).map(a=>a.status==="rejected"?a.reason:void 0).filter(Boolean);if(s.length)throw s}return r})}i(eg,"withAwaitAsyncAssertions");function tg(){function e(t,n,r){let o=Ne.currentSuite||_l,{options:s,handler:a}=qt(n,r),l=s.concurrent||this.concurrent||s.sequential===false,c=s.sequential||this.sequential||s.concurrent===false,{meta:u,...f}=o?.options||{};s={...f,...s};let h=this.shuffle??s.shuffle??o?.options?.shuffle??be?.config.sequence.shuffle;h!=null&&(s.shuffle=h);let d=this.only??s.only?"only":this.skip??s.skip?"skip":this.todo??s.todo?"todo":"run";d==="run"&&!a&&(d="todo");let p=l||s.concurrent&&!c,g=c||s.sequential&&!l;return p!=null&&(s.concurrent=p&&!g),g!=null&&(s.sequential=g&&!p),u&&(s.meta=Object.assign(Object.create(null),u,s.meta)),Qm(bt(t),a,d,this.each,s)}return i(e,"suiteFn"),e.each=function(t,...n){let r=ht(this),o=r.withContext();return r.setContext("each",true),Array.isArray(t)&&n.length&&(t=dr(t,n)),(s,a,l)=>{let c=bt(s),u=t.every(Array.isArray),{options:f,handler:h}=qt(a,l),d=typeof a=="function";t.forEach((p,g)=>{let m=Array.isArray(p)?p:[p];d?u?o(ot(c,m,g),h?()=>h(...m):void 0,f.timeout):o(ot(c,m,g),h?()=>h(p):void 0,f.timeout):u?o(ot(c,m,g),f,h?()=>h(...m):void 0):o(ot(c,m,g),f,h?()=>h(p):void 0);}),r.setContext("each",void 0);}},e.for=function(t,...n){return Array.isArray(t)&&n.length&&(t=dr(t,n)),(r,o,s)=>{let a=bt(r),{options:l,handler:c}=qt(o,s);t.forEach((u,f)=>{rt(ot(a,ln(u),f),l,c?()=>c(u):void 0);});}},e.skipIf=t=>t?rt.skip:rt,e.runIf=t=>t?rt:rt.skip,mr(["concurrent","sequential","shuffle","skip","only","todo"],e)}i(tg,"createSuite");function us(e){let t=e;t.each=function(o,...s){let a=ht(this),l=a.withContext();return a.setContext("each",true),Array.isArray(o)&&s.length&&(o=dr(o,s)),(c,u,f)=>{let h=bt(c),d=o.every(Array.isArray),{options:p,handler:g}=qt(u,f),m=typeof u=="function";o.forEach((b,E)=>{let M=Array.isArray(b)?b:[b];m?d?l(ot(h,M,E),g?()=>g(...M):void 0,p.timeout):l(ot(h,M,E),g?()=>g(b):void 0,p.timeout):d?l(ot(h,M,E),p,g?()=>g(...M):void 0):l(ot(h,M,E),p,g?()=>g(b):void 0);}),a.setContext("each",void 0);}},t.for=function(o,...s){let l=ht(this).withContext();return Array.isArray(o)&&s.length&&(o=dr(o,s)),(c,u,f)=>{let h=bt(c),{options:d,handler:p}=qt(u,f);o.forEach((g,m)=>{let b=p?E=>p(g,E):void 0;b&&hr(b,{index:1,original:p}),l(ot(h,ln(g),m),d,b);});}},t.skipIf=function(o){return o?this.skip:this},t.runIf=function(o){return o?this:this.skip};function n(o,s,a){if(typeof o!="string")return o;let l=o,c,u;if(a!==void 0?(c=s,u=a):s!==null&&typeof s=="object"&&!Array.isArray(s)&&pn.isFixtureOptions(s)?(c=s,u={}):(c=void 0,u=s),typeof u=="function"){let f=u,h=i(async(d,p)=>{let g,b=await f(d,{onCleanup:i(E=>{if(g!==void 0)throw new Error("onCleanup can only be called once per fixture. Define separate fixtures if you need multiple cleanup functions.");g=E;},"onCleanup")});await p(b),g&&await g();},"fixture");return hr(h,{original:f}),c?{[l]:[h,c]}:{[l]:h}}return c?{[l]:[u,c]}:{[l]:u}}return i(n,"parseBuilderFixtures"),t.override=function(o,s,a){let l=n(o,s,a);return ht(this).getFixtures().override(be,l),this},t.scoped=function(o){return console.warn("test.scoped() is deprecated and will be removed in future versions. Please use test.override() instead."),this.override(o)},t.extend=function(o,s,a){let l=n(o,s,a),c=ht(this).getFixtures().extend(be,l),u=fs(function(f,h,d){e.call(this,bt(f),h,d);});return ht(u).mergeContext({fixtures:c}),u},t.describe=rt,t.suite=rt,t.beforeEach=ns,t.afterEach=rs,t.beforeAll=es,t.afterAll=ts,t.aroundEach=ss,t.aroundAll=os,mr(["concurrent","sequential","skip","only","todo","fails"],t,{fixtures:new pn})}i(us,"createTaskCollector");function fs(e){return us(e)}i(fs,"createTest");function bt(e){return typeof e=="string"?e:typeof e=="function"?e.name||"<anonymous>":String(e)}i(bt,"formatName");function ot(e,t,n){(e.includes("%#")||e.includes("%$"))&&(e=e.replace(/%%/g,"__vitest_escaped_%__").replace(/%#/g,`${n}`).replace(/%\$/g,`${n+1}`).replace(/__vitest_escaped_%__/g,"%%"));let r=e.split("%").length-1;e.includes("%f")&&(e.match(/%f/g)||[]).forEach((u,f)=>{if(bc(t[f])||Object.is(t[f],-0)){let h=0;e=e.replace(/%f/g,d=>(h++,h===f+1?"-%f":d));}});let o=Le(t[0]);function s(c){return c.replace(/\$([$\w.]+)/g,(u,f)=>{let h=/^\d+$/.test(f);if(!o&&!h)return `$${f}`;let d=h?Io(t,f):void 0,p=o?Io(t[0],f,d):d;return pc(p,{truncate:be?.config?.chaiConfig?.truncateThreshold})})}i(s,"formatAttribute");let a="",l=0;return ng(e,xo,c=>{l<r?a+=fc(c[0],t[l++]):a+=c[0];},c=>{a+=s(c);}),a}i(ot,"formatTitle");function ng(e,t,n,r){let o=0;for(let s of e.matchAll(t))o<s.index&&r(e.slice(o,s.index)),n(s),o=s.index+s[0].length;o<e.length&&r(e.slice(o));}i(ng,"handleRegexMatch");function dr(e,t){let n=e.join("").trim().replace(/ /g,"").split(`
73
+ `).map(o=>o.split("|"))[0],r=[];for(let o=0;o<Math.floor(t.length/n.length);o++){let s={};for(let a=0;a<n.length;a++)s[n[a]]=t[o*n.length+a];r.push(s);}return r}i(dr,"formatTemplateString");var ul=globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now,Ne={currentSuite:null};function rg(e){Ne.currentSuite?.tasks.push(e);}i(rg,"collectTask");async function og(e,t){let n=Ne.currentSuite;Ne.currentSuite=e,await t(),Ne.currentSuite=n;}i(og,"runWithSuite");function dt(e,t,n=false,r,o){if(t<=0||t===Number.POSITIVE_INFINITY)return e;let{setTimeout:s,clearTimeout:a}=ft();return i((function(...c){let u=ul(),f=ls();return f._currentTaskStartTime=u,f._currentTaskTimeout=t,new Promise((h,d)=>{let p=s(()=>{a(p),g();},t);p.unref?.();function g(){let E=cg(n,t,r);o?.(c,E),d(E);}i(g,"rejectTimeoutError");function m(E){if(f._currentTaskStartTime=void 0,f._currentTaskTimeout=void 0,a(p),ul()-u>=t){g();return}h(E);}i(m,"resolve");function b(E){f._currentTaskStartTime=void 0,f._currentTaskTimeout=void 0,a(p),d(E);}i(b,"reject");try{let E=e(...c);typeof E=="object"&&E!=null&&typeof E.then=="function"?E.then(m,b):m(E);}catch(E){b(E);}})}),"runWithTimeout")}i(dt,"withTimeout");function sg(e,t){return i((function(...r){return new Promise((o,s)=>{t.addEventListener("abort",()=>s(t.reason));try{let a=e(...r);typeof a=="object"&&a!=null&&typeof a.then=="function"?a.then(o,s):o(a);}catch(a){s(a);}})}),"runWithCancel")}i(sg,"withCancel");var Xo=new WeakMap;function yn([e],t){e&&ig(e,t);}i(yn,"abortIfTimeout");function ig(e,t){Xo.get(e)?.abort(t);}i(ig,"abortContextSignal");function ag(e,t){let n=i(function(){throw new Error("done() callback is deprecated, use promise instead")},"context"),r=Xo.get(n);return r||(r=new AbortController,Xo.set(n,r)),n.signal=r.signal,n.task=e,n.skip=(o,s)=>{if(o!==false)throw e.result??={state:"skip"},e.result.pending=true,new Ho("test is skipped; abort execution",e,typeof o=="string"?o:s)},n.annotate=((o,s,a)=>{if(e.result&&e.result.state!=="run")throw new Error(`Cannot annotate tests outside of the test run. The test "${e.name}" finished running with the "${e.result.state}" state already.`);let l={message:o,type:typeof s=="object"||s===void 0?"notice":s},c=typeof s=="object"?s:a;return c&&(l.attachment=c,$l(l.attachment)),dg(e,hs(e,{type:"internal:annotation",annotation:l}).then(async({annotation:u})=>{if(!t.onTestAnnotate)throw new Error("Test runner doesn't support test annotations.");await Al(t);let f=await t.onTestAnnotate(e,u);return e.annotations.push(f),f}))}),n.onTestFailed=(o,s)=>{e.onFailed||=[],e.onFailed.push(dt(o,s??t.config.hookTimeout,true,new Error("STACK_TRACE_ERROR"),(a,l)=>r.abort(l)));},n.onTestFinished=(o,s)=>{e.onFinished||=[],e.onFinished.push(dt(o,s??t.config.hookTimeout,true,new Error("STACK_TRACE_ERROR"),(a,l)=>r.abort(l)));},t.extendTaskContext?.(n)||n}i(ag,"createTestContext");function cg(e,t,n){let r=`${e?"Hook":"Test"} timed out in ${t}ms.
74
+ If this is a long-running ${e?"hook":"test"}, pass a timeout value as the last argument or configure it globally with "${e?"hookTimeout":"testTimeout"}".`,o=new Error(r);return n?.stack&&(o.stack=n.stack.replace(o.message,n.message)),o}i(cg,"makeTimeoutError");globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;var lg=Date.now,{clearTimeout:ug,setTimeout:fg}=ft();var Ko=new Map,fl=[],ur=[];function Il(e){if(Ko.size){let t=Array.from(Ko).map(([r,o])=>[r,o[0],o[1]]),n=e.onTaskUpdate?.(t,fl);n&&(ur.push(n),n.then(()=>ur.splice(ur.indexOf(n),1),()=>{})),fl.length=0,Ko.clear();}}i(Il,"sendTasksUpdate");async function Al(e){Il(e),await Promise.all(ur);}i(Al,"finishSendTasksUpdate");function hg(e,t){let n=0,r;return i(function o(...s){let a=lg();if(a-n>t)return n=a,ug(r),r=void 0,e.apply(this,s);r??=fg(()=>o.bind(this)(...s),t);},"call")}i(hg,"throttle");hg(Il,100);async function hs(e,t){let n=ls(),r=pr(e.file.filepath,new Error("STACK_TRACE").stack);if(r&&(t.location={file:r.file,line:r.line,column:r.column},t.type==="internal:annotation"&&(t.annotation.location=t.location)),Array.isArray(t.attachments))for(let s of t.attachments)$l(s);if(t.type==="internal:annotation")return t;if(!n.onTestArtifactRecord)throw new Error("Test runner doesn't support test artifacts.");await Al(n);let o=await n.onTestArtifactRecord(e,t);return e.artifacts.push(o),o}i(hs,"recordArtifact");var Be=[];for(let e=65;e<91;e++)Be.push(String.fromCharCode(e));for(let e=97;e<123;e++)Be.push(String.fromCharCode(e));for(let e=0;e<10;e++)Be.push(e.toString(10));Be.push("+","/");function pg(e){let t="",n=e.byteLength;for(let r=0;r<n;r+=3)if(n===r+1){let o=(e[r]&252)>>2,s=(e[r]&3)<<4;t+=Be[o],t+=Be[s],t+="==";}else if(n===r+2){let o=(e[r]&252)>>2,s=(e[r]&3)<<4|(e[r+1]&240)>>4,a=(e[r+1]&15)<<2;t+=Be[o],t+=Be[s],t+=Be[a],t+="=";}else {let o=(e[r]&252)>>2,s=(e[r]&3)<<4|(e[r+1]&240)>>4,a=(e[r+1]&15)<<2|(e[r+2]&192)>>6,l=e[r+2]&63;t+=Be[o],t+=Be[s],t+=Be[a],t+=Be[l];}return t}i(pg,"encodeUint8Array");function dg(e,t){return t=t.finally(()=>{if(!e.promises)return;let n=e.promises.indexOf(t);n!==-1&&e.promises.splice(n,1);}),e.promises||(e.promises=[]),e.promises.push(t),t}i(dg,"recordAsyncOperation");function $l(e){if(e.body==null&&!e.path)throw new TypeError('Test attachment requires "body" or "path" to be set. Both are missing.');if(e.body&&e.path)throw new TypeError('Test attachment requires only one of "body" or "path" to be set. Both are specified.');e.body instanceof Uint8Array&&(e.body=pg(e.body));}i($l,"manageArtifactAttachment");var Tg="__vitest_worker__";function wn(){let e=globalThis[Tg];if(!e)throw new Error(`Vitest failed to access its internal state.
75
75
 
76
76
  One of the following is possible:
77
77
  - "vitest" is imported directly without running "vitest" command
78
78
  - "vitest" is imported inside "globalSetup" (to fix this, use "setupFiles" instead, because "globalSetup" runs in a different context)
79
79
  - "vitest" is imported inside Vite / Vitest config file
80
80
  - Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues
81
- `);return e}i(Wt,"getWorkerState");function ms(){return typeof process<"u"&&!!process.send}i(ms,"isChildProcess");function Ll(e,t=false){let n=[/\/vitest\/dist\//,/vitest-virtual-\w+\/dist/,/@vitest\/dist/,...t?[]:[/^mock:/]];e.idToModuleMap.forEach((r,o)=>{n.some(s=>s.test(o))||(r.promise=void 0,r.exports=void 0,r.evaluated=false,r.importers.clear());});}i(Ll,"resetModules");function Ng(){let{setTimeout:e}=ft();return new Promise(t=>e(t,0))}i(Ng,"waitNextTick");async function gs(){await Ng();let e=Wt(),t=[],n=e.resolvingModules.size;for(let[r,o]of e.evaluatedModules.idToModuleMap)o.promise&&!o.evaluated&&t.push(o.promise);!t.length&&!n||(await Promise.allSettled(t),await gs());}i(gs,"waitForImportsToResolve");function mt(e){return typeof e=="function"&&"_isMockFunction"in e&&e._isMockFunction===true}i(mt,"isMockFunction");var ys=new Set,ws=new Set,Bl=new WeakMap;function bs(e={}){let{originalImplementation:t,restore:n,mockImplementation:r,resetToMockImplementation:o,resetToMockName:s}=e;n&&ys.add(n);let a=Vg(t),l=Kg(),c=Rg({config:a,state:l,...e}),u=(r||t)?.length??0;return Object.defineProperty(c,"length",{writable:true,enumerable:false,value:u,configurable:true}),s&&(a.mockName=c.name||"vi.fn()"),Bl.set(c,a),ws.add(c),c._isMockFunction=true,c.getMockImplementation=()=>a.onceMockImplementations[0]||a.mockImplementation,Object.defineProperty(c,"mock",{configurable:false,enumerable:true,writable:false,value:l}),c.mockImplementation=i(function(h){return a.mockImplementation=h,c},"mockImplementation"),c.mockImplementationOnce=i(function(h){return a.onceMockImplementations.push(h),c},"mockImplementationOnce"),c.withImplementation=i(function(h,p){let d=a.mockImplementation,g=a.onceMockImplementations,m=i(()=>{a.mockImplementation=d,a.onceMockImplementations=g;},"reset");a.mockImplementation=h,a.onceMockImplementations=[];let b=p();return typeof b=="object"&&typeof b?.then=="function"?b.then(()=>(m(),c)):(m(),c)},"withImplementation"),c.mockReturnThis=i(function(){return c.mockImplementation(function(){return this})},"mockReturnThis"),c.mockReturnValue=i(function(h){return c.mockImplementation(function(){return new.target&&Vt("mockReturnValue"),h})},"mockReturnValue"),c.mockReturnValueOnce=i(function(h){return c.mockImplementationOnce(function(){return new.target&&Vt("mockReturnValueOnce"),h})},"mockReturnValueOnce"),c.mockThrow=i(function(h){return c.mockImplementation(function(){throw h})},"mockThrow"),c.mockThrowOnce=i(function(h){return c.mockImplementationOnce(function(){throw h})},"mockThrowOnce"),c.mockResolvedValue=i(function(h){return c.mockImplementation(function(){return new.target&&Vt("mockResolvedValue"),Promise.resolve(h)})},"mockResolvedValue"),c.mockResolvedValueOnce=i(function(h){return c.mockImplementationOnce(function(){return new.target&&Vt("mockResolvedValueOnce"),Promise.resolve(h)})},"mockResolvedValueOnce"),c.mockRejectedValue=i(function(h){return c.mockImplementation(function(){return new.target&&Vt("mockRejectedValue"),Promise.reject(h)})},"mockRejectedValue"),c.mockRejectedValueOnce=i(function(h){return c.mockImplementationOnce(function(){return new.target&&Vt("mockRejectedValueOnce"),Promise.reject(h)})},"mockRejectedValueOnce"),c.mockClear=i(function(){return l.calls=[],l.contexts=[],l.instances=[],l.invocationCallOrder=[],l.results=[],l.settledResults=[],c},"mockClear"),c.mockReset=i(function(){return c.mockClear(),a.mockImplementation=o?r:void 0,a.mockName=s&&c.name||"vi.fn()",a.onceMockImplementations=[],c},"mockReset"),c.mockRestore=i(function(){return c.mockReset(),n?.()},"mockRestore"),c.mockName=i(function(h){return typeof h=="string"&&(a.mockName=h),c},"mockName"),c.getMockName=i(function(){return a.mockName||"vi.fn()"},"getMockName"),Symbol.dispose&&(c[Symbol.dispose]=()=>c.mockRestore()),r&&c.mockImplementation(r),c}i(bs,"createMockInstance");function ql(e){return e!=null&&mt(e)?e:bs({mockImplementation:e,resetToMockImplementation:true})}i(ql,"fn");function Ul(e,t,n){gr(e!=null,"The vi.spyOn() function could not find an object to spy upon. The first argument must be defined."),gr(typeof e=="object"||typeof e=="function","Vitest cannot spy on a primitive value.");let[r,o]=zl(e,t)||[];gr(o||t in e,`The property "${String(t)}" is not defined on the ${typeof e}.`);let s=n||"value",a=false;s==="value"&&o&&o.value==null&&o.get&&(s="get",a=true);let l;o?(l=o[s],l==null&&s==="value"&&(l=e[t])):s!=="value"?l=i(()=>e[t],"original"):l=e[t];let c=a&&l?l():l,u=typeof c;if(gr(u==="function"||s!=="value"&&l==null,`vi.spyOn() can only spy on a function. Received ${u}.`),mt(c))return c;let f=i(d=>{let{value:g,...m}=o||{configurable:true,writable:true};s!=="value"&&delete m.writable,m[s]=d,Object.defineProperty(e,t,m);},"reassign"),p=bs({restore:i(()=>{r!==e?Reflect.deleteProperty(e,t):o&&!l?Object.defineProperty(e,t,o):f(l);},"restore"),originalImplementation:c,resetToMockName:true});try{f(a?()=>p:p);}catch(d){throw d instanceof TypeError&&Symbol.toStringTag&&e[Symbol.toStringTag]==="Module"&&(d.message.includes("Cannot redefine property")||d.message.includes("Cannot replace module namespace")||d.message.includes("can't redefine non-configurable property"))?new TypeError(`Cannot spy on export "${String(t)}". Module namespace is not configurable in ESM. See: https://vitest.dev/guide/browser/#limitations`,{cause:d}):d}return p}i(Ul,"spyOn");function zl(e,t){let n=Object.getOwnPropertyDescriptor(e,t);if(n)return [e,n];let r=Object.getPrototypeOf(e);for(;r!==null;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return [r,o];r=Object.getPrototypeOf(r);}}i(zl,"getDescriptor");function gr(e,t){if(!e)throw new Error(t)}i(gr,"assert");var Pg=1;function Rg({state:e,config:t,name:n,prototypeState:r,prototypeConfig:o,keepMembersImplementation:s,mockImplementation:a,prototypeMembers:l=[]}){let c=t.mockOriginal,u=a,f=n||c?.name||"Mock",h={[f]:(function(...g){jg(g,e,r),Fg(Pg++,e,r);let m={type:"incomplete",value:void 0},b={type:"incomplete",value:void 0};Dg(m,e,r),Lg(b,e,r);let S=new.target?void 0:this,[_,A]=Bg(S,e,r),[M,O]=qg(S,e,r),N=t.onceMockImplementations.shift()||t.mockImplementation||o?.onceMockImplementations.shift()||o?.mockImplementation||c||function(){},C,L,ee=false;try{if(new.target){C=Reflect.construct(N,g,new.target);for(let j of l){let W=C[j];if(W!==p.prototype[j])continue;let Y=mt(W),ge=Y?W.mock:void 0,le=Y?Bl.get(W):void 0;C[j]=bs({originalImplementation:s?le?.mockOriginal:void 0,prototypeState:ge,prototypeConfig:le,keepMembersImplementation:s});}}else C=N.apply(this,g);}catch(j){throw L=j,ee=true,j instanceof TypeError&&j.message.includes("is not a constructor")&&console.warn(`[vitest] The ${h[f].getMockName()} mock did not use 'function' or 'class' in its implementation, see https://vitest.dev/api/vi#vi-spyon for examples.`),j}finally{ee?(m.type="throw",m.value=L,b.type="rejected",b.value=L):(m.type="return",m.value=C,new.target&&(e.contexts[M-1]=C,e.instances[_-1]=C,O!=null&&r&&(r.contexts[O-1]=C),A!=null&&r&&(r.instances[A-1]=C)),C instanceof Promise?C.then(j=>{b.type="fulfilled",b.value=j;},j=>{b.type="rejected",b.value=j;}):(b.type="fulfilled",b.value=C));}return C})},p=h[f],d=c||u;return d&&Ug(p,d),p}i(Rg,"createMock");function jg(e,t,n){t.calls.push(e),n?.calls.push(e);}i(jg,"registerCalls");function Fg(e,t,n){t.invocationCallOrder.push(e),n?.invocationCallOrder.push(e);}i(Fg,"registerInvocationOrder");function Dg(e,t,n){t.results.push(e),n?.results.push(e);}i(Dg,"registerResult");function Lg(e,t,n){t.settledResults.push(e),n?.settledResults.push(e);}i(Lg,"registerSettledResult");function Bg(e,t,n){let r=t.instances.push(e),o=n?.instances.push(e);return [r,o]}i(Bg,"registerInstance");function qg(e,t,n){let r=t.contexts.push(e),o=n?.contexts.push(e);return [r,o]}i(qg,"registerContext");function Ug(e,t){let{properties:n,descriptors:r}=Wg(t);for(let o of n){let s=r[o];zl(e,o)||Object.defineProperty(e,o,s);}}i(Ug,"copyOriginalStaticProperties");var zg=new Set(["length","name","prototype",Symbol.for("nodejs.util.promisify.custom")]);function Wg(e){let t=new Set,n={};for(;e&&e!==Object.prototype&&e!==Function.prototype;){let r=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(let o of r)n[o]||zg.has(o)||(t.add(o),n[o]=Object.getOwnPropertyDescriptor(e,o));e=Object.getPrototypeOf(e);}return {properties:t,descriptors:n}}i(Wg,"getAllProperties");function Vg(e){return {mockImplementation:void 0,mockOriginal:e,mockName:"vi.fn()",onceMockImplementations:[]}}i(Vg,"getDefaultConfig");function Kg(){let e={calls:[],contexts:[],instances:[],invocationCallOrder:[],settledResults:[],results:[],get lastCall(){return e.calls.at(-1)}};return e}i(Kg,"getDefaultState");function Wl(){for(let e of ys)e();ys.clear();}i(Wl,"restoreAllMocks");function Vl(){ws.forEach(e=>e.mockClear());}i(Vl,"clearAllMocks");function Kl(){ws.forEach(e=>e.mockReset());}i(Kl,"resetAllMocks");function Vt(e){throw new TypeError(`Cannot use \`${e}\` when called with \`new\`. Use \`mockImplementation\` with a \`class\` keyword instead. See https://vitest.dev/api/mock#class-support for more information.`)}i(Vt,"throwConstructorError");var K={};wa(K,{Assertion:()=>w,AssertionError:()=>J,Should:()=>Xu,assert:()=>y,config:()=>ve,expect:()=>vn,should:()=>Yu,use:()=>On,util:()=>Ke});var Fs=Object.defineProperty,Hg=i((e,t,n)=>t in e?Fs(e,t,{enumerable:true,configurable:true,writable:true,value:n}):e[t]=n,"__defNormalProp"),x=i((e,t)=>Fs(e,"name",{value:t,configurable:true}),"__name"),Ds=i((e,t)=>{for(var n in t)Fs(e,n,{get:t[n],enumerable:true});},"__export"),nu=i((e,t,n)=>Hg(e,typeof t!="symbol"?t+"":t,n),"__publicField"),Ke={};Ds(Ke,{addChainableMethod:i(()=>Xs,"addChainableMethod"),addLengthGuard:i(()=>_n,"addLengthGuard"),addMethod:i(()=>Gs,"addMethod"),addProperty:i(()=>Hs,"addProperty"),checkError:i(()=>qe,"checkError"),compareByInspect:i(()=>br,"compareByInspect"),eql:i(()=>Au,"eql"),events:i(()=>_r,"events"),expectTypes:i(()=>fu,"expectTypes"),flag:i(()=>z,"flag"),getActual:i(()=>xr,"getActual"),getMessage:i(()=>qs,"getMessage"),getName:i(()=>Mr,"getName"),getOperator:i(()=>ti,"getOperator"),getOwnEnumerableProperties:i(()=>ei,"getOwnEnumerableProperties"),getOwnEnumerablePropertySymbols:i(()=>Qs,"getOwnEnumerablePropertySymbols"),getPathInfo:i(()=>Vs,"getPathInfo"),hasProperty:i(()=>kr,"hasProperty"),inspect:i(()=>G,"inspect"),isNaN:i(()=>Tr,"isNaN"),isNumeric:i(()=>ye,"isNumeric"),isProxyEnabled:i(()=>kn,"isProxyEnabled"),isRegExp:i(()=>Sr,"isRegExp"),objDisplay:i(()=>Ot,"objDisplay"),overwriteChainableMethod:i(()=>Zs,"overwriteChainableMethod"),overwriteMethod:i(()=>Ys,"overwriteMethod"),overwriteProperty:i(()=>Js,"overwriteProperty"),proxify:i(()=>Gt,"proxify"),test:i(()=>Ls,"test"),transferFlags:i(()=>Xe,"transferFlags"),type:i(()=>oe,"type")});var qe={};Ds(qe,{compatibleConstructor:i(()=>su,"compatibleConstructor"),compatibleInstance:i(()=>ou,"compatibleInstance"),compatibleMessage:i(()=>iu,"compatibleMessage"),getConstructorName:i(()=>au,"getConstructorName"),getMessage:i(()=>cu,"getMessage")});function vr(e){return e instanceof Error||Object.prototype.toString.call(e)==="[object Error]"}i(vr,"isErrorInstance");x(vr,"isErrorInstance");function ru(e){return Object.prototype.toString.call(e)==="[object RegExp]"}i(ru,"isRegExp");x(ru,"isRegExp");function ou(e,t){return vr(t)&&e===t}i(ou,"compatibleInstance");x(ou,"compatibleInstance");function su(e,t){return vr(t)?e.constructor===t.constructor||e instanceof t.constructor:(typeof t=="object"||typeof t=="function")&&t.prototype?e.constructor===t||e instanceof t:false}i(su,"compatibleConstructor");x(su,"compatibleConstructor");function iu(e,t){let n=typeof e=="string"?e:e.message;return ru(t)?t.test(n):typeof t=="string"?n.indexOf(t)!==-1:false}i(iu,"compatibleMessage");x(iu,"compatibleMessage");function au(e){let t=e;return vr(e)?t=e.constructor.name:typeof e=="function"&&(t=e.name,t===""&&(t=new e().name||t)),t}i(au,"getConstructorName");x(au,"getConstructorName");function cu(e){let t="";return e&&e.message?t=e.message:typeof e=="string"&&(t=e),t}i(cu,"getMessage");x(cu,"getMessage");function z(e,t,n){let r=e.__flags||(e.__flags=Object.create(null));if(arguments.length===3)r[t]=n;else return r[t]}i(z,"flag");x(z,"flag");function Ls(e,t){let n=z(e,"negate"),r=t[0];return n?!r:r}i(Ls,"test");x(Ls,"test");function oe(e){if(typeof e>"u")return "undefined";if(e===null)return "null";let t=e[Symbol.toStringTag];return typeof t=="string"?t:Object.prototype.toString.call(e).slice(8,-1)}i(oe,"type");x(oe,"type");var Gg="captureStackTrace"in Error,lu=class uu extends Error{static{i(this,"_AssertionError");}constructor(t="Unspecified AssertionError",n,r){super(t),nu(this,"message"),this.message=t,Gg&&Error.captureStackTrace(this,r||uu);for(let o in n)o in this||(this[o]=n[o]);}get name(){return "AssertionError"}get ok(){return false}toJSON(t){return {...this,name:this.name,message:this.message,ok:false,stack:t!==false?this.stack:void 0}}};x(lu,"AssertionError");var J=lu;function fu(e,t){let n=z(e,"message"),r=z(e,"ssfi");n=n?n+": ":"",e=z(e,"object"),t=t.map(function(a){return a.toLowerCase()}),t.sort();let o=t.map(function(a,l){let c=~["a","e","i","o","u"].indexOf(a.charAt(0))?"an":"a";return (t.length>1&&l===t.length-1?"or ":"")+c+" "+a}).join(", "),s=oe(e).toLowerCase();if(!t.some(function(a){return s===a}))throw new J(n+"object tested must be "+o+", but "+s+" given",void 0,r)}i(fu,"expectTypes");x(fu,"expectTypes");function xr(e,t){return t.length>4?t[4]:e._obj}i(xr,"getActual");x(xr,"getActual");var Hl={bold:["1","22"],dim:["2","22"],italic:["3","23"],underline:["4","24"],inverse:["7","27"],hidden:["8","28"],strike:["9","29"],black:["30","39"],red:["31","39"],green:["32","39"],yellow:["33","39"],blue:["34","39"],magenta:["35","39"],cyan:["36","39"],white:["37","39"],brightblack:["30;1","39"],brightred:["31;1","39"],brightgreen:["32;1","39"],brightyellow:["33;1","39"],brightblue:["34;1","39"],brightmagenta:["35;1","39"],brightcyan:["36;1","39"],brightwhite:["37;1","39"],grey:["90","39"]},Jg={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},Kt="\u2026";function hu(e,t){let n=Hl[Jg[t]]||Hl[t]||"";return n?`\x1B[${n[0]}m${String(e)}\x1B[${n[1]}m`:String(e)}i(hu,"colorise");x(hu,"colorise");function du({showHidden:e=false,depth:t=2,colors:n=false,customInspect:r=true,showProxy:o=false,maxArrayLength:s=1/0,breakLength:a=1/0,seen:l=[],truncate:c=1/0,stylize:u=String}={},f){let h={showHidden:!!e,depth:Number(t),colors:!!n,customInspect:!!r,showProxy:!!o,maxArrayLength:Number(s),breakLength:Number(a),truncate:Number(c),seen:l,inspect:f,stylize:u};return h.colors&&(h.stylize=hu),h}i(du,"normaliseOptions");x(du,"normaliseOptions");function pu(e){return e>="\uD800"&&e<="\uDBFF"}i(pu,"isHighSurrogate");x(pu,"isHighSurrogate");function gt(e,t,n=Kt){e=String(e);let r=n.length,o=e.length;if(r>t&&o>r)return n;if(o>t&&o>r){let s=t-r;return s>0&&pu(e[s-1])&&(s=s-1),`${e.slice(0,s)}${n}`}return e}i(gt,"truncate");x(gt,"truncate");function He(e,t,n,r=", "){n=n||t.inspect;let o=e.length;if(o===0)return "";let s=t.truncate,a="",l="",c="";for(let u=0;u<o;u+=1){let f=u+1===e.length,h=u+2===e.length;c=`${Kt}(${e.length-u})`;let p=e[u];t.truncate=s-a.length-(f?0:r.length);let d=l||n(p,t)+(f?"":r),g=a.length+d.length,m=g+c.length;if(f&&g>s&&a.length+c.length<=s||!f&&!h&&m>s||(l=f?"":n(e[u+1],t)+(h?"":r),!f&&h&&m>s&&g+l.length>s))break;if(a+=d,!f&&!h&&g+l.length>=s){c=`${Kt}(${e.length-u-1})`;break}c="";}return `${a}${c}`}i(He,"inspectList");x(He,"inspectList");function mu(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}i(mu,"quoteComplexKey");x(mu,"quoteComplexKey");function Ht([e,t],n){return n.truncate-=2,typeof e=="string"?e=mu(e):typeof e!="number"&&(e=`[${n.inspect(e,n)}]`),n.truncate-=e.length,t=n.inspect(t,n),`${e}: ${t}`}i(Ht,"inspectProperty");x(Ht,"inspectProperty");function gu(e,t){let n=Object.keys(e).slice(e.length);if(!e.length&&!n.length)return "[]";t.truncate-=4;let r=He(e,t);t.truncate-=r.length;let o="";return n.length&&(o=He(n.map(s=>[s,e[s]]),t,Ht)),`[ ${r}${o?`, ${o}`:""} ]`}i(gu,"inspectArray");x(gu,"inspectArray");var Yg=x(e=>typeof Buffer=="function"&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name,"getArrayName");function st(e,t){let n=Yg(e);t.truncate-=n.length+4;let r=Object.keys(e).slice(e.length);if(!e.length&&!r.length)return `${n}[]`;let o="";for(let a=0;a<e.length;a++){let l=`${t.stylize(gt(e[a],t.truncate),"number")}${a===e.length-1?"":", "}`;if(t.truncate-=l.length,e[a]!==e.length&&t.truncate<=3){o+=`${Kt}(${e.length-e[a]+1})`;break}o+=l;}let s="";return r.length&&(s=He(r.map(a=>[a,e[a]]),t,Ht)),`${n}[ ${o}${s?`, ${s}`:""} ]`}i(st,"inspectTypedArray");x(st,"inspectTypedArray");function yu(e,t){let n=e.toJSON();if(n===null)return "Invalid Date";let r=n.split("T"),o=r[0];return t.stylize(`${o}T${gt(r[1],t.truncate-o.length-1)}`,"date")}i(yu,"inspectDate");x(yu,"inspectDate");function vs(e,t){let n=e[Symbol.toStringTag]||"Function",r=e.name;return r?t.stylize(`[${n} ${gt(r,t.truncate-11)}]`,"special"):t.stylize(`[${n}]`,"special")}i(vs,"inspectFunction");x(vs,"inspectFunction");function wu([e,t],n){return n.truncate-=4,e=n.inspect(e,n),n.truncate-=e.length,t=n.inspect(t,n),`${e} => ${t}`}i(wu,"inspectMapEntry");x(wu,"inspectMapEntry");function bu(e){let t=[];return e.forEach((n,r)=>{t.push([r,n]);}),t}i(bu,"mapToEntries");x(bu,"mapToEntries");function Tu(e,t){return e.size===0?"Map{}":(t.truncate-=7,`Map{ ${He(bu(e),t,wu)} }`)}i(Tu,"inspectMap");x(Tu,"inspectMap");var Xg=Number.isNaN||(e=>e!==e);function xs(e,t){return Xg(e)?t.stylize("NaN","number"):e===1/0?t.stylize("Infinity","number"):e===-1/0?t.stylize("-Infinity","number"):e===0?t.stylize(1/e===1/0?"+0":"-0","number"):t.stylize(gt(String(e),t.truncate),"number")}i(xs,"inspectNumber");x(xs,"inspectNumber");function ks(e,t){let n=gt(e.toString(),t.truncate-1);return n!==Kt&&(n+="n"),t.stylize(n,"bigint")}i(ks,"inspectBigInt");x(ks,"inspectBigInt");function Su(e,t){let n=e.toString().split("/")[2],r=t.truncate-(2+n.length),o=e.source;return t.stylize(`/${gt(o,r)}/${n}`,"regexp")}i(Su,"inspectRegExp");x(Su,"inspectRegExp");function Eu(e){let t=[];return e.forEach(n=>{t.push(n);}),t}i(Eu,"arrayFromSet");x(Eu,"arrayFromSet");function vu(e,t){return e.size===0?"Set{}":(t.truncate-=7,`Set{ ${He(Eu(e),t)} }`)}i(vu,"inspectSet");x(vu,"inspectSet");var Gl=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),Zg={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},Qg=16;function xu(e){return Zg[e]||`\\u${`0000${e.charCodeAt(0).toString(Qg)}`.slice(-4)}`}i(xu,"escape");x(xu,"escape");function _s(e,t){return Gl.test(e)&&(e=e.replace(Gl,xu)),t.stylize(`'${gt(e,t.truncate-2)}'`,"string")}i(_s,"inspectString");x(_s,"inspectString");function Ms(e){return "description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString()}i(Ms,"inspectSymbol");x(Ms,"inspectSymbol");var ty=x(()=>"Promise{\u2026}","getPromiseValue"),ny=ty;function Sn(e,t){let n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[];if(n.length===0&&r.length===0)return "{}";if(t.truncate-=4,t.seen=t.seen||[],t.seen.includes(e))return "[Circular]";t.seen.push(e);let o=He(n.map(l=>[l,e[l]]),t,Ht),s=He(r.map(l=>[l,e[l]]),t,Ht);t.seen.pop();let a="";return o&&s&&(a=", "),`{ ${o}${a}${s} }`}i(Sn,"inspectObject");x(Sn,"inspectObject");var Ts=typeof Symbol<"u"&&Symbol.toStringTag?Symbol.toStringTag:false;function ku(e,t){let n="";return Ts&&Ts in e&&(n=e[Ts]),n=n||e.constructor.name,(!n||n==="_class")&&(n="<Anonymous Class>"),t.truncate-=n.length,`${n}${Sn(e,t)}`}i(ku,"inspectClass");x(ku,"inspectClass");function _u(e,t){return e.length===0?"Arguments[]":(t.truncate-=13,`Arguments[ ${He(e,t)} ]`)}i(_u,"inspectArguments");x(_u,"inspectArguments");var ry=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function Mu(e,t){let n=Object.getOwnPropertyNames(e).filter(a=>ry.indexOf(a)===-1),r=e.name;t.truncate-=r.length;let o="";if(typeof e.message=="string"?o=gt(e.message,t.truncate):n.unshift("message"),o=o?`: ${o}`:"",t.truncate-=o.length+5,t.seen=t.seen||[],t.seen.includes(e))return "[Circular]";t.seen.push(e);let s=He(n.map(a=>[a,e[a]]),t,Ht);return `${r}${o}${s?` { ${s} }`:""}`}i(Mu,"inspectObject2");x(Mu,"inspectObject");function Cu([e,t],n){return n.truncate-=3,t?`${n.stylize(String(e),"yellow")}=${n.stylize(`"${t}"`,"string")}`:`${n.stylize(String(e),"yellow")}`}i(Cu,"inspectAttribute");x(Cu,"inspectAttribute");function yr(e,t){return He(e,t,Ou,`
82
- `)}i(yr,"inspectNodeCollection");x(yr,"inspectNodeCollection");function Ou(e,t){switch(e.nodeType){case 1:return Bs(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}i(Ou,"inspectNode");x(Ou,"inspectNode");function Bs(e,t){let n=e.getAttributeNames(),r=e.tagName.toLowerCase(),o=t.stylize(`<${r}`,"special"),s=t.stylize(">","special"),a=t.stylize(`</${r}>`,"special");t.truncate-=r.length*2+5;let l="";n.length>0&&(l+=" ",l+=He(n.map(f=>[f,e.getAttribute(f)]),t,Cu," ")),t.truncate-=l.length;let c=t.truncate,u=yr(e.children,t);return u&&u.length>c&&(u=`${Kt}(${e.children.length})`),`${o}${l}${s}${u}${a}`}i(Bs,"inspectHTML");x(Bs,"inspectHTML");var oy=typeof Symbol=="function"&&typeof Symbol.for=="function",Ss=oy?Symbol.for("chai/inspect"):"@@chai/inspect",Es=Symbol.for("nodejs.util.inspect.custom"),Jl=new WeakMap,Yl={},Xl={undefined:x((e,t)=>t.stylize("undefined","undefined"),"undefined"),null:x((e,t)=>t.stylize("null","null"),"null"),boolean:x((e,t)=>t.stylize(String(e),"boolean"),"boolean"),Boolean:x((e,t)=>t.stylize(String(e),"boolean"),"Boolean"),number:xs,Number:xs,bigint:ks,BigInt:ks,string:_s,String:_s,function:vs,Function:vs,symbol:Ms,Symbol:Ms,Array:gu,Date:yu,Map:Tu,Set:vu,RegExp:Su,Promise:ny,WeakSet:x((e,t)=>t.stylize("WeakSet{\u2026}","special"),"WeakSet"),WeakMap:x((e,t)=>t.stylize("WeakMap{\u2026}","special"),"WeakMap"),Arguments:_u,Int8Array:st,Uint8Array:st,Uint8ClampedArray:st,Int16Array:st,Uint16Array:st,Int32Array:st,Uint32Array:st,Float32Array:st,Float64Array:st,Generator:x(()=>"","Generator"),DataView:x(()=>"","DataView"),ArrayBuffer:x(()=>"","ArrayBuffer"),Error:Mu,HTMLCollection:yr,NodeList:yr},sy=x((e,t,n,r)=>Ss in e&&typeof e[Ss]=="function"?e[Ss](t):Es in e&&typeof e[Es]=="function"?e[Es](t.depth,t,r):"inspect"in e&&typeof e.inspect=="function"?e.inspect(t.depth,t):"constructor"in e&&Jl.has(e.constructor)?Jl.get(e.constructor)(e,t):Yl[n]?Yl[n](e,t):"","inspectCustom"),iy=Object.prototype.toString;function En(e,t={}){let n=du(t,En),{customInspect:r}=n,o=e===null?"null":typeof e;if(o==="object"&&(o=iy.call(e).slice(8,-1)),o in Xl)return Xl[o](e,n);if(r&&e){let a=sy(e,n,o,En);if(a)return typeof a=="string"?a:En(a,n)}let s=e?Object.getPrototypeOf(e):false;return s===Object.prototype||s===null?Sn(e,n):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?Bs(e,n):"constructor"in e?e.constructor!==Object?ku(e,n):Sn(e,n):e===Object(e)?Sn(e,n):n.stylize(String(e),o)}i(En,"inspect");x(En,"inspect");var ve={includeStack:false,showDiff:true,truncateThreshold:40,useProxy:true,proxyExcludedKeys:["then","catch","inspect","toJSON"],deepEqual:null};function G(e,t,n,r){let o={colors:r,depth:typeof n>"u"?2:n,showHidden:t,truncate:ve.truncateThreshold?ve.truncateThreshold:1/0};return En(e,o)}i(G,"inspect2");x(G,"inspect");function Ot(e){let t=G(e),n=Object.prototype.toString.call(e);if(ve.truncateThreshold&&t.length>=ve.truncateThreshold){if(n==="[object Function]")return !e.name||e.name===""?"[Function]":"[Function: "+e.name+"]";if(n==="[object Array]")return "[ Array("+e.length+") ]";if(n==="[object Object]"){let r=Object.keys(e);return "{ Object ("+(r.length>2?r.splice(0,2).join(", ")+", ...":r.join(", "))+") }"}else return t}else return t}i(Ot,"objDisplay");x(Ot,"objDisplay");function qs(e,t){let n=z(e,"negate"),r=z(e,"object"),o=t[3],s=xr(e,t),a=n?t[2]:t[1],l=z(e,"message");return typeof a=="function"&&(a=a()),a=a||"",a=a.replace(/#\{this\}/g,function(){return Ot(r)}).replace(/#\{act\}/g,function(){return Ot(s)}).replace(/#\{exp\}/g,function(){return Ot(o)}),l?l+": "+a:a}i(qs,"getMessage2");x(qs,"getMessage");function Xe(e,t,n){let r=e.__flags||(e.__flags=Object.create(null));t.__flags||(t.__flags=Object.create(null)),n=arguments.length===3?n:true;for(let o in r)(n||o!=="object"&&o!=="ssfi"&&o!=="lockSsfi"&&o!="message")&&(t.__flags[o]=r[o]);}i(Xe,"transferFlags");x(Xe,"transferFlags");function Cs(e){if(typeof e>"u")return "undefined";if(e===null)return "null";let t=e[Symbol.toStringTag];return typeof t=="string"?t:Object.prototype.toString.call(e).slice(8,-1)}i(Cs,"type2");x(Cs,"type");function Us(){this._key="chai/deep-eql__"+Math.random()+Date.now();}i(Us,"FakeMap");x(Us,"FakeMap");Us.prototype={get:x(i(function(t){return t[this._key]},"get"),"get"),set:x(i(function(t,n){Object.isExtensible(t)&&Object.defineProperty(t,this._key,{value:n,configurable:true});},"set"),"set")};var Iu=typeof WeakMap=="function"?WeakMap:Us;function Os(e,t,n){if(!n||It(e)||It(t))return null;var r=n.get(e);if(r){var o=r.get(t);if(typeof o=="boolean")return o}return null}i(Os,"memoizeCompare");x(Os,"memoizeCompare");function Tn(e,t,n,r){if(!(!n||It(e)||It(t))){var o=n.get(e);o?o.set(t,r):(o=new Iu,o.set(t,r),n.set(e,o));}}i(Tn,"memoizeSet");x(Tn,"memoizeSet");var Au=xn;function xn(e,t,n){if(n&&n.comparator)return Is(e,t,n);var r=zs(e,t);return r!==null?r:Is(e,t,n)}i(xn,"deepEqual");x(xn,"deepEqual");function zs(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t?true:It(e)||It(t)?false:null}i(zs,"simpleEqual");x(zs,"simpleEqual");function Is(e,t,n){n=n||{},n.memoize=n.memoize===false?false:n.memoize||new Iu;var r=n&&n.comparator,o=Os(e,t,n.memoize);if(o!==null)return o;var s=Os(t,e,n.memoize);if(s!==null)return s;if(r){var a=r(e,t);if(a===false||a===true)return Tn(e,t,n.memoize,a),a;var l=zs(e,t);if(l!==null)return l}var c=Cs(e);if(c!==Cs(t))return Tn(e,t,n.memoize,false),false;Tn(e,t,n.memoize,true);var u=$u(e,t,c,n);return Tn(e,t,n.memoize,u),u}i(Is,"extensiveDeepEqual");x(Is,"extensiveDeepEqual");function $u(e,t,n,r){switch(n){case "String":case "Number":case "Boolean":case "Date":return xn(e.valueOf(),t.valueOf());case "Promise":case "Symbol":case "function":case "WeakMap":case "WeakSet":return e===t;case "Error":return Ws(e,t,["name","message","code"],r);case "Arguments":case "Int8Array":case "Uint8Array":case "Uint8ClampedArray":case "Int16Array":case "Uint16Array":case "Int32Array":case "Uint32Array":case "Float32Array":case "Float64Array":case "Array":return Tt(e,t,r);case "RegExp":return Nu(e,t);case "Generator":return Pu(e,t,r);case "DataView":return Tt(new Uint8Array(e.buffer),new Uint8Array(t.buffer),r);case "ArrayBuffer":return Tt(new Uint8Array(e),new Uint8Array(t),r);case "Set":return As(e,t,r);case "Map":return As(e,t,r);case "Temporal.PlainDate":case "Temporal.PlainTime":case "Temporal.PlainDateTime":case "Temporal.Instant":case "Temporal.ZonedDateTime":case "Temporal.PlainYearMonth":case "Temporal.PlainMonthDay":return e.equals(t);case "Temporal.Duration":return e.total("nanoseconds")===t.total("nanoseconds");case "Temporal.TimeZone":case "Temporal.Calendar":return e.toString()===t.toString();default:return ju(e,t,r)}}i($u,"extensiveDeepEqualByType");x($u,"extensiveDeepEqualByType");function Nu(e,t){return e.toString()===t.toString()}i(Nu,"regexpEqual");x(Nu,"regexpEqual");function As(e,t,n){try{if(e.size!==t.size)return false;if(e.size===0)return true}catch{return false}var r=[],o=[];return e.forEach(x(i(function(a,l){r.push([a,l]);},"gatherEntries"),"gatherEntries")),t.forEach(x(i(function(a,l){o.push([a,l]);},"gatherEntries"),"gatherEntries")),Tt(r.sort(),o.sort(),n)}i(As,"entriesEqual");x(As,"entriesEqual");function Tt(e,t,n){var r=e.length;if(r!==t.length)return false;if(r===0)return true;for(var o=-1;++o<r;)if(xn(e[o],t[o],n)===false)return false;return true}i(Tt,"iterableEqual");x(Tt,"iterableEqual");function Pu(e,t,n){return Tt(wr(e),wr(t),n)}i(Pu,"generatorEqual");x(Pu,"generatorEqual");function Ru(e){return typeof Symbol<"u"&&typeof e=="object"&&typeof Symbol.iterator<"u"&&typeof e[Symbol.iterator]=="function"}i(Ru,"hasIteratorFunction");x(Ru,"hasIteratorFunction");function $s(e){if(Ru(e))try{return wr(e[Symbol.iterator]())}catch{return []}return []}i($s,"getIteratorEntries");x($s,"getIteratorEntries");function wr(e){for(var t=e.next(),n=[t.value];t.done===false;)t=e.next(),n.push(t.value);return n}i(wr,"getGeneratorEntries");x(wr,"getGeneratorEntries");function Ns(e){var t=[];for(var n in e)t.push(n);return t}i(Ns,"getEnumerableKeys");x(Ns,"getEnumerableKeys");function Ps(e){for(var t=[],n=Object.getOwnPropertySymbols(e),r=0;r<n.length;r+=1){var o=n[r];Object.getOwnPropertyDescriptor(e,o).enumerable&&t.push(o);}return t}i(Ps,"getEnumerableSymbols");x(Ps,"getEnumerableSymbols");function Ws(e,t,n,r){var o=n.length;if(o===0)return true;for(var s=0;s<o;s+=1)if(xn(e[n[s]],t[n[s]],r)===false)return false;return true}i(Ws,"keysEqual");x(Ws,"keysEqual");function ju(e,t,n){var r=Ns(e),o=Ns(t),s=Ps(e),a=Ps(t);if(r=r.concat(s),o=o.concat(a),r.length&&r.length===o.length)return Tt(Rs(r).sort(),Rs(o).sort())===false?false:Ws(e,t,r,n);var l=$s(e),c=$s(t);return l.length&&l.length===c.length?(l.sort(),c.sort(),Tt(l,c,n)):r.length===0&&l.length===0&&o.length===0&&c.length===0}i(ju,"objectEqual");x(ju,"objectEqual");function It(e){return e===null||typeof e!="object"}i(It,"isPrimitive");x(It,"isPrimitive");function Rs(e){return e.map(x(i(function(n){return typeof n=="symbol"?n.toString():n},"mapSymbol"),"mapSymbol"))}i(Rs,"mapSymbols");x(Rs,"mapSymbols");function kr(e,t){return typeof e>"u"||e===null?false:t in Object(e)}i(kr,"hasProperty");x(kr,"hasProperty");function Fu(e){return e.replace(/([^\\])\[/g,"$1.[").match(/(\\\.|[^.]+?)+/g).map(r=>{if(r==="constructor"||r==="__proto__"||r==="prototype")return {};let s=/^\[(\d+)\]$/.exec(r),a=null;return s?a={i:parseFloat(s[1])}:a={p:r.replace(/\\([.[\]])/g,"$1")},a})}i(Fu,"parsePath");x(Fu,"parsePath");function js(e,t,n){let r=e,o=null;n=typeof n>"u"?t.length:n;for(let s=0;s<n;s++){let a=t[s];r&&(typeof a.p>"u"?r=r[a.i]:r=r[a.p],s===n-1&&(o=r));}return o}i(js,"internalGetPathValue");x(js,"internalGetPathValue");function Vs(e,t){let n=Fu(t),r=n[n.length-1],o={parent:n.length>1?js(e,n,n.length-1):e,name:r.p||r.i,value:js(e,n)};return o.exists=kr(o.parent,o.name),o}i(Vs,"getPathInfo");x(Vs,"getPathInfo");var Du=class Lu{static{i(this,"_Assertion");}constructor(t,n,r,o){return nu(this,"__flags",{}),z(this,"ssfi",r||Lu),z(this,"lockSsfi",o),z(this,"object",t),z(this,"message",n),z(this,"eql",ve.deepEqual||Au),Gt(this)}static get includeStack(){return console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),ve.includeStack}static set includeStack(t){console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),ve.includeStack=t;}static get showDiff(){return console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),ve.showDiff}static set showDiff(t){console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),ve.showDiff=t;}static addProperty(t,n){Hs(this.prototype,t,n);}static addMethod(t,n){Gs(this.prototype,t,n);}static addChainableMethod(t,n,r){Xs(this.prototype,t,n,r);}static overwriteProperty(t,n){Js(this.prototype,t,n);}static overwriteMethod(t,n){Ys(this.prototype,t,n);}static overwriteChainableMethod(t,n,r){Zs(this.prototype,t,n,r);}assert(t,n,r,o,s,a){let l=Ls(this,arguments);if(a!==false&&(a=true),o===void 0&&s===void 0&&(a=false),ve.showDiff!==true&&(a=false),!l){n=qs(this,arguments);let u={actual:xr(this,arguments),expected:o,showDiff:a},f=ti(this,arguments);throw f&&(u.operator=f),new J(n,u,ve.includeStack?this.assert:z(this,"ssfi"))}}get _obj(){return z(this,"object")}set _obj(t){z(this,"object",t);}};x(Du,"Assertion");var w=Du,_r=new EventTarget,Bu=class extends Event{static{i(this,"_PluginEvent");}constructor(t,n,r){super(t),this.name=String(n),this.fn=r;}};x(Bu,"PluginEvent");var Ks=Bu;function kn(){return ve.useProxy&&typeof Proxy<"u"&&typeof Reflect<"u"}i(kn,"isProxyEnabled");x(kn,"isProxyEnabled");function Hs(e,t,n){n=n===void 0?function(){}:n,Object.defineProperty(e,t,{get:x(i(function r(){!kn()&&!z(this,"lockSsfi")&&z(this,"ssfi",r);let o=n.call(this);if(o!==void 0)return o;let s=new w;return Xe(this,s),s},"propertyGetter"),"propertyGetter"),configurable:true}),_r.dispatchEvent(new Ks("addProperty",t,n));}i(Hs,"addProperty");x(Hs,"addProperty");var ay=Object.getOwnPropertyDescriptor(function(){},"length");function _n(e,t,n){return ay.configurable&&Object.defineProperty(e,"length",{get:x(function(){throw Error(n?"Invalid Chai property: "+t+'.length. Due to a compatibility issue, "length" cannot directly follow "'+t+'". Use "'+t+'.lengthOf" instead.':"Invalid Chai property: "+t+'.length. See docs for proper usage of "'+t+'".')},"get")}),e}i(_n,"addLengthGuard");x(_n,"addLengthGuard");function qu(e){let t=Object.getOwnPropertyNames(e);function n(o){t.indexOf(o)===-1&&t.push(o);}i(n,"addProperty2"),x(n,"addProperty");let r=Object.getPrototypeOf(e);for(;r!==null;)Object.getOwnPropertyNames(r).forEach(n),r=Object.getPrototypeOf(r);return t}i(qu,"getProperties");x(qu,"getProperties");var Zl=["__flags","__methods","_obj","assert"];function Gt(e,t){return kn()?new Proxy(e,{get:x(i(function n(r,o){if(typeof o=="string"&&ve.proxyExcludedKeys.indexOf(o)===-1&&!Reflect.has(r,o)){if(t)throw Error("Invalid Chai property: "+t+"."+o+'. See docs for proper usage of "'+t+'".');let s=null,a=4;throw qu(r).forEach(function(l){if(!Object.prototype.hasOwnProperty(l)&&Zl.indexOf(l)===-1){let c=Uu(o,l,a);c<a&&(s=l,a=c);}}),Error(s!==null?"Invalid Chai property: "+o+'. Did you mean "'+s+'"?':"Invalid Chai property: "+o)}return Zl.indexOf(o)===-1&&!z(r,"lockSsfi")&&z(r,"ssfi",n),Reflect.get(r,o)},"proxyGetter"),"proxyGetter")}):e}i(Gt,"proxify");x(Gt,"proxify");function Uu(e,t,n){if(Math.abs(e.length-t.length)>=n)return n;let r=[];for(let o=0;o<=e.length;o++)r[o]=Array(t.length+1).fill(0),r[o][0]=o;for(let o=0;o<t.length;o++)r[0][o]=o;for(let o=1;o<=e.length;o++){let s=e.charCodeAt(o-1);for(let a=1;a<=t.length;a++){if(Math.abs(o-a)>=n){r[o][a]=n;continue}r[o][a]=Math.min(r[o-1][a]+1,r[o][a-1]+1,r[o-1][a-1]+(s===t.charCodeAt(a-1)?0:1));}}return r[e.length][t.length]}i(Uu,"stringDistanceCapped");x(Uu,"stringDistanceCapped");function Gs(e,t,n){let r=x(function(){z(this,"lockSsfi")||z(this,"ssfi",r);let o=n.apply(this,arguments);if(o!==void 0)return o;let s=new w;return Xe(this,s),s},"methodWrapper");_n(r,t,false),e[t]=Gt(r,t),_r.dispatchEvent(new Ks("addMethod",t,n));}i(Gs,"addMethod");x(Gs,"addMethod");function Js(e,t,n){let r=Object.getOwnPropertyDescriptor(e,t),o=x(function(){},"_super");r&&typeof r.get=="function"&&(o=r.get),Object.defineProperty(e,t,{get:x(i(function s(){!kn()&&!z(this,"lockSsfi")&&z(this,"ssfi",s);let a=z(this,"lockSsfi");z(this,"lockSsfi",true);let l=n(o).call(this);if(z(this,"lockSsfi",a),l!==void 0)return l;let c=new w;return Xe(this,c),c},"overwritingPropertyGetter"),"overwritingPropertyGetter"),configurable:true});}i(Js,"overwriteProperty");x(Js,"overwriteProperty");function Ys(e,t,n){let r=e[t],o=x(function(){throw new Error(t+" is not a function")},"_super");r&&typeof r=="function"&&(o=r);let s=x(function(){z(this,"lockSsfi")||z(this,"ssfi",s);let a=z(this,"lockSsfi");z(this,"lockSsfi",true);let l=n(o).apply(this,arguments);if(z(this,"lockSsfi",a),l!==void 0)return l;let c=new w;return Xe(this,c),c},"overwritingMethodWrapper");_n(s,t,false),e[t]=Gt(s,t);}i(Ys,"overwriteMethod");x(Ys,"overwriteMethod");var cy=typeof Object.setPrototypeOf=="function",Ql=x(function(){},"testFn"),ly=Object.getOwnPropertyNames(Ql).filter(function(e){let t=Object.getOwnPropertyDescriptor(Ql,e);return typeof t!="object"?true:!t.configurable}),uy=Function.prototype.call,fy=Function.prototype.apply,zu=class extends Ks{static{i(this,"_PluginAddChainableMethodEvent");}constructor(t,n,r,o){super(t,n,r),this.chainingBehavior=o;}};x(zu,"PluginAddChainableMethodEvent");var hy=zu;function Xs(e,t,n,r){typeof r!="function"&&(r=x(function(){},"chainingBehavior"));let o={method:n,chainingBehavior:r};e.__methods||(e.__methods={}),e.__methods[t]=o,Object.defineProperty(e,t,{get:x(i(function(){o.chainingBehavior.call(this);let a=x(function(){z(this,"lockSsfi")||z(this,"ssfi",a);let l=o.method.apply(this,arguments);if(l!==void 0)return l;let c=new w;return Xe(this,c),c},"chainableMethodWrapper");if(_n(a,t,true),cy){let l=Object.create(this);l.call=uy,l.apply=fy,Object.setPrototypeOf(a,l);}else Object.getOwnPropertyNames(e).forEach(function(c){if(ly.indexOf(c)!==-1)return;let u=Object.getOwnPropertyDescriptor(e,c);Object.defineProperty(a,c,u);});return Xe(this,a),Gt(a)},"chainableMethodGetter"),"chainableMethodGetter"),configurable:true}),_r.dispatchEvent(new hy("addChainableMethod",t,n,r));}i(Xs,"addChainableMethod");x(Xs,"addChainableMethod");function Zs(e,t,n,r){let o=e.__methods[t],s=o.chainingBehavior;o.chainingBehavior=x(i(function(){let c=r(s).call(this);if(c!==void 0)return c;let u=new w;return Xe(this,u),u},"overwritingChainableMethodGetter"),"overwritingChainableMethodGetter");let a=o.method;o.method=x(i(function(){let c=n(a).apply(this,arguments);if(c!==void 0)return c;let u=new w;return Xe(this,u),u},"overwritingChainableMethodWrapper"),"overwritingChainableMethodWrapper");}i(Zs,"overwriteChainableMethod");x(Zs,"overwriteChainableMethod");function br(e,t){return G(e)<G(t)?-1:1}i(br,"compareByInspect");x(br,"compareByInspect");function Qs(e){return typeof Object.getOwnPropertySymbols!="function"?[]:Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})}i(Qs,"getOwnEnumerablePropertySymbols");x(Qs,"getOwnEnumerablePropertySymbols");function ei(e){return Object.keys(e).concat(Qs(e))}i(ei,"getOwnEnumerableProperties");x(ei,"getOwnEnumerableProperties");var Tr=Number.isNaN;function Wu(e){let t=oe(e);return ["Array","Object","Function"].indexOf(t)!==-1}i(Wu,"isObjectType");x(Wu,"isObjectType");function ti(e,t){let n=z(e,"operator"),r=z(e,"negate"),o=t[3],s=r?t[2]:t[1];if(n)return n;if(typeof s=="function"&&(s=s()),s=s||"",!s||/\shave\s/.test(s))return;let a=Wu(o);return /\snot\s/.test(s)?a?"notDeepStrictEqual":"notStrictEqual":a?"deepStrictEqual":"strictEqual"}i(ti,"getOperator");x(ti,"getOperator");function Mr(e){return e.name}i(Mr,"getName");x(Mr,"getName");function Sr(e){return Object.prototype.toString.call(e)==="[object RegExp]"}i(Sr,"isRegExp2");x(Sr,"isRegExp");function ye(e){return ["Number","BigInt"].includes(oe(e))}i(ye,"isNumeric");x(ye,"isNumeric");var{flag:E}=Ke;["to","be","been","is","and","has","have","with","that","which","at","of","same","but","does","still","also"].forEach(function(e){w.addProperty(e);});w.addProperty("not",function(){E(this,"negate",true);});w.addProperty("deep",function(){E(this,"deep",true);});w.addProperty("nested",function(){E(this,"nested",true);});w.addProperty("own",function(){E(this,"own",true);});w.addProperty("ordered",function(){E(this,"ordered",true);});w.addProperty("any",function(){E(this,"any",true),E(this,"all",false);});w.addProperty("all",function(){E(this,"all",true),E(this,"any",false);});var eu={function:["function","asyncfunction","generatorfunction","asyncgeneratorfunction"],asyncfunction:["asyncfunction","asyncgeneratorfunction"],generatorfunction:["generatorfunction","asyncgeneratorfunction"],asyncgeneratorfunction:["asyncgeneratorfunction"]};function ni(e,t){t&&E(this,"message",t),e=e.toLowerCase();let n=E(this,"object"),r=~["a","e","i","o","u"].indexOf(e.charAt(0))?"an ":"a ",o=oe(n).toLowerCase();eu.function.includes(e)?this.assert(eu[e].includes(o),"expected #{this} to be "+r+e,"expected #{this} not to be "+r+e):this.assert(e===o,"expected #{this} to be "+r+e,"expected #{this} not to be "+r+e);}i(ni,"an");x(ni,"an");w.addChainableMethod("an",ni);w.addChainableMethod("a",ni);function Vu(e,t){return Tr(e)&&Tr(t)||e===t}i(Vu,"SameValueZero");x(Vu,"SameValueZero");function Mn(){E(this,"contains",true);}i(Mn,"includeChainingBehavior");x(Mn,"includeChainingBehavior");function Cn(e,t){t&&E(this,"message",t);let n=E(this,"object"),r=oe(n).toLowerCase(),o=E(this,"message"),s=E(this,"negate"),a=E(this,"ssfi"),l=E(this,"deep"),c=l?"deep ":"",u=l?E(this,"eql"):Vu;o=o?o+": ":"";let f=false;switch(r){case "string":f=n.indexOf(e)!==-1;break;case "weakset":if(l)throw new J(o+"unable to use .deep.include with WeakSet",void 0,a);f=n.has(e);break;case "map":n.forEach(function(h){f=f||u(h,e);});break;case "set":l?n.forEach(function(h){f=f||u(h,e);}):f=n.has(e);break;case "array":l?f=n.some(function(h){return u(h,e)}):f=n.indexOf(e)!==-1;break;default:{if(e!==Object(e))throw new J(o+"the given combination of arguments ("+r+" and "+oe(e).toLowerCase()+") is invalid for this assertion. You can use an array, a map, an object, a set, a string, or a weakset instead of a "+oe(e).toLowerCase(),void 0,a);let h=Object.keys(e),p=null,d=0;if(h.forEach(function(g){let m=new w(n);if(Xe(this,m,true),E(m,"lockSsfi",true),!s||h.length===1){m.property(g,e[g]);return}try{m.property(g,e[g]);}catch(b){if(!qe.compatibleConstructor(b,J))throw b;p===null&&(p=b),d++;}},this),s&&h.length>1&&d===h.length)throw p;return}}this.assert(f,"expected #{this} to "+c+"include "+G(e),"expected #{this} to not "+c+"include "+G(e));}i(Cn,"include");x(Cn,"include");w.addChainableMethod("include",Cn,Mn);w.addChainableMethod("contain",Cn,Mn);w.addChainableMethod("contains",Cn,Mn);w.addChainableMethod("includes",Cn,Mn);w.addProperty("ok",function(){this.assert(E(this,"object"),"expected #{this} to be truthy","expected #{this} to be falsy");});w.addProperty("true",function(){this.assert(E(this,"object")===true,"expected #{this} to be true","expected #{this} to be false",!E(this,"negate"));});w.addProperty("numeric",function(){let e=E(this,"object");this.assert(["Number","BigInt"].includes(oe(e)),"expected #{this} to be numeric","expected #{this} to not be numeric",!E(this,"negate"));});w.addProperty("callable",function(){let e=E(this,"object"),t=E(this,"ssfi"),n=E(this,"message"),r=n?`${n}: `:"",o=E(this,"negate"),s=o?`${r}expected ${G(e)} not to be a callable function`:`${r}expected ${G(e)} to be a callable function`,a=["Function","AsyncFunction","GeneratorFunction","AsyncGeneratorFunction"].includes(oe(e));if(a&&o||!a&&!o)throw new J(s,void 0,t)});w.addProperty("false",function(){this.assert(E(this,"object")===false,"expected #{this} to be false","expected #{this} to be true",!!E(this,"negate"));});w.addProperty("null",function(){this.assert(E(this,"object")===null,"expected #{this} to be null","expected #{this} not to be null");});w.addProperty("undefined",function(){this.assert(E(this,"object")===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined");});w.addProperty("NaN",function(){this.assert(Tr(E(this,"object")),"expected #{this} to be NaN","expected #{this} not to be NaN");});function ri(){let e=E(this,"object");this.assert(e!=null,"expected #{this} to exist","expected #{this} to not exist");}i(ri,"assertExist");x(ri,"assertExist");w.addProperty("exist",ri);w.addProperty("exists",ri);w.addProperty("empty",function(){let e=E(this,"object"),t=E(this,"ssfi"),n=E(this,"message"),r;switch(n=n?n+": ":"",oe(e).toLowerCase()){case "array":case "string":r=e.length;break;case "map":case "set":r=e.size;break;case "weakmap":case "weakset":throw new J(n+".empty was passed a weak collection",void 0,t);case "function":{let o=n+".empty was passed a function "+Mr(e);throw new J(o.trim(),void 0,t)}default:if(e!==Object(e))throw new J(n+".empty was passed non-string primitive "+G(e),void 0,t);r=Object.keys(e).length;}this.assert(r===0,"expected #{this} to be empty","expected #{this} not to be empty");});function oi(){let e=E(this,"object"),t=oe(e);this.assert(t==="Arguments","expected #{this} to be arguments but got "+t,"expected #{this} to not be arguments");}i(oi,"checkArguments");x(oi,"checkArguments");w.addProperty("arguments",oi);w.addProperty("Arguments",oi);function Cr(e,t){t&&E(this,"message",t);let n=E(this,"object");if(E(this,"deep")){let r=E(this,"lockSsfi");E(this,"lockSsfi",true),this.eql(e),E(this,"lockSsfi",r);}else this.assert(e===n,"expected #{this} to equal #{exp}","expected #{this} to not equal #{exp}",e,this._obj,true);}i(Cr,"assertEqual");x(Cr,"assertEqual");w.addMethod("equal",Cr);w.addMethod("equals",Cr);w.addMethod("eq",Cr);function si(e,t){t&&E(this,"message",t);let n=E(this,"eql");this.assert(n(e,E(this,"object")),"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",e,this._obj,true);}i(si,"assertEql");x(si,"assertEql");w.addMethod("eql",si);w.addMethod("eqls",si);function Or(e,t){t&&E(this,"message",t);let n=E(this,"object"),r=E(this,"doLength"),o=E(this,"message"),s=o?o+": ":"",a=E(this,"ssfi"),l=oe(n).toLowerCase(),c=oe(e).toLowerCase();if(r&&l!=="map"&&l!=="set"&&new w(n,o,a,true).to.have.property("length"),!r&&l==="date"&&c!=="date")throw new J(s+"the argument to above must be a date",void 0,a);if(!ye(e)&&(r||ye(n)))throw new J(s+"the argument to above must be a number",void 0,a);if(!r&&l!=="date"&&!ye(n)){let u=l==="string"?"'"+n+"'":n;throw new J(s+"expected "+u+" to be a number or a date",void 0,a)}if(r){let u="length",f;l==="map"||l==="set"?(u="size",f=n.size):f=n.length,this.assert(f>e,"expected #{this} to have a "+u+" above #{exp} but got #{act}","expected #{this} to not have a "+u+" above #{exp}",e,f);}else this.assert(n>e,"expected #{this} to be above #{exp}","expected #{this} to be at most #{exp}",e);}i(Or,"assertAbove");x(Or,"assertAbove");w.addMethod("above",Or);w.addMethod("gt",Or);w.addMethod("greaterThan",Or);function Ir(e,t){t&&E(this,"message",t);let n=E(this,"object"),r=E(this,"doLength"),o=E(this,"message"),s=o?o+": ":"",a=E(this,"ssfi"),l=oe(n).toLowerCase(),c=oe(e).toLowerCase(),u,f=true;if(r&&l!=="map"&&l!=="set"&&new w(n,o,a,true).to.have.property("length"),!r&&l==="date"&&c!=="date")u=s+"the argument to least must be a date";else if(!ye(e)&&(r||ye(n)))u=s+"the argument to least must be a number";else if(!r&&l!=="date"&&!ye(n)){let h=l==="string"?"'"+n+"'":n;u=s+"expected "+h+" to be a number or a date";}else f=false;if(f)throw new J(u,void 0,a);if(r){let h="length",p;l==="map"||l==="set"?(h="size",p=n.size):p=n.length,this.assert(p>=e,"expected #{this} to have a "+h+" at least #{exp} but got #{act}","expected #{this} to have a "+h+" below #{exp}",e,p);}else this.assert(n>=e,"expected #{this} to be at least #{exp}","expected #{this} to be below #{exp}",e);}i(Ir,"assertLeast");x(Ir,"assertLeast");w.addMethod("least",Ir);w.addMethod("gte",Ir);w.addMethod("greaterThanOrEqual",Ir);function Ar(e,t){t&&E(this,"message",t);let n=E(this,"object"),r=E(this,"doLength"),o=E(this,"message"),s=o?o+": ":"",a=E(this,"ssfi"),l=oe(n).toLowerCase(),c=oe(e).toLowerCase(),u,f=true;if(r&&l!=="map"&&l!=="set"&&new w(n,o,a,true).to.have.property("length"),!r&&l==="date"&&c!=="date")u=s+"the argument to below must be a date";else if(!ye(e)&&(r||ye(n)))u=s+"the argument to below must be a number";else if(!r&&l!=="date"&&!ye(n)){let h=l==="string"?"'"+n+"'":n;u=s+"expected "+h+" to be a number or a date";}else f=false;if(f)throw new J(u,void 0,a);if(r){let h="length",p;l==="map"||l==="set"?(h="size",p=n.size):p=n.length,this.assert(p<e,"expected #{this} to have a "+h+" below #{exp} but got #{act}","expected #{this} to not have a "+h+" below #{exp}",e,p);}else this.assert(n<e,"expected #{this} to be below #{exp}","expected #{this} to be at least #{exp}",e);}i(Ar,"assertBelow");x(Ar,"assertBelow");w.addMethod("below",Ar);w.addMethod("lt",Ar);w.addMethod("lessThan",Ar);function $r(e,t){t&&E(this,"message",t);let n=E(this,"object"),r=E(this,"doLength"),o=E(this,"message"),s=o?o+": ":"",a=E(this,"ssfi"),l=oe(n).toLowerCase(),c=oe(e).toLowerCase(),u,f=true;if(r&&l!=="map"&&l!=="set"&&new w(n,o,a,true).to.have.property("length"),!r&&l==="date"&&c!=="date")u=s+"the argument to most must be a date";else if(!ye(e)&&(r||ye(n)))u=s+"the argument to most must be a number";else if(!r&&l!=="date"&&!ye(n)){let h=l==="string"?"'"+n+"'":n;u=s+"expected "+h+" to be a number or a date";}else f=false;if(f)throw new J(u,void 0,a);if(r){let h="length",p;l==="map"||l==="set"?(h="size",p=n.size):p=n.length,this.assert(p<=e,"expected #{this} to have a "+h+" at most #{exp} but got #{act}","expected #{this} to have a "+h+" above #{exp}",e,p);}else this.assert(n<=e,"expected #{this} to be at most #{exp}","expected #{this} to be above #{exp}",e);}i($r,"assertMost");x($r,"assertMost");w.addMethod("most",$r);w.addMethod("lte",$r);w.addMethod("lessThanOrEqual",$r);w.addMethod("within",function(e,t,n){n&&E(this,"message",n);let r=E(this,"object"),o=E(this,"doLength"),s=E(this,"message"),a=s?s+": ":"",l=E(this,"ssfi"),c=oe(r).toLowerCase(),u=oe(e).toLowerCase(),f=oe(t).toLowerCase(),h,p=true,d=u==="date"&&f==="date"?e.toISOString()+".."+t.toISOString():e+".."+t;if(o&&c!=="map"&&c!=="set"&&new w(r,s,l,true).to.have.property("length"),!o&&c==="date"&&(u!=="date"||f!=="date"))h=a+"the arguments to within must be dates";else if((!ye(e)||!ye(t))&&(o||ye(r)))h=a+"the arguments to within must be numbers";else if(!o&&c!=="date"&&!ye(r)){let g=c==="string"?"'"+r+"'":r;h=a+"expected "+g+" to be a number or a date";}else p=false;if(p)throw new J(h,void 0,l);if(o){let g="length",m;c==="map"||c==="set"?(g="size",m=r.size):m=r.length,this.assert(m>=e&&m<=t,"expected #{this} to have a "+g+" within "+d,"expected #{this} to not have a "+g+" within "+d);}else this.assert(r>=e&&r<=t,"expected #{this} to be within "+d,"expected #{this} to not be within "+d);});function ii(e,t){t&&E(this,"message",t);let n=E(this,"object"),r=E(this,"ssfi"),o=E(this,"message"),s;try{s=n instanceof e;}catch(l){throw l instanceof TypeError?(o=o?o+": ":"",new J(o+"The instanceof assertion needs a constructor but "+oe(e)+" was given.",void 0,r)):l}let a=Mr(e);a==null&&(a="an unnamed constructor"),this.assert(s,"expected #{this} to be an instance of "+a,"expected #{this} to not be an instance of "+a);}i(ii,"assertInstanceOf");x(ii,"assertInstanceOf");w.addMethod("instanceof",ii);w.addMethod("instanceOf",ii);function ai(e,t,n){n&&E(this,"message",n);let r=E(this,"nested"),o=E(this,"own"),s=E(this,"message"),a=E(this,"object"),l=E(this,"ssfi"),c=typeof e;if(s=s?s+": ":"",r){if(c!=="string")throw new J(s+"the argument to property must be a string when using nested syntax",void 0,l)}else if(c!=="string"&&c!=="number"&&c!=="symbol")throw new J(s+"the argument to property must be a string, number, or symbol",void 0,l);if(r&&o)throw new J(s+'The "nested" and "own" flags cannot be combined.',void 0,l);if(a==null)throw new J(s+"Target cannot be null or undefined.",void 0,l);let u=E(this,"deep"),f=E(this,"negate"),h=r?Vs(a,e):null,p=r?h.value:a[e],d=u?E(this,"eql"):(b,S)=>b===S,g="";u&&(g+="deep "),o&&(g+="own "),r&&(g+="nested "),g+="property ";let m;o?m=Object.prototype.hasOwnProperty.call(a,e):r?m=h.exists:m=kr(a,e),(!f||arguments.length===1)&&this.assert(m,"expected #{this} to have "+g+G(e),"expected #{this} to not have "+g+G(e)),arguments.length>1&&this.assert(m&&d(t,p),"expected #{this} to have "+g+G(e)+" of #{exp}, but got #{act}","expected #{this} to not have "+g+G(e)+" of #{act}",t,p),E(this,"object",p);}i(ai,"assertProperty");x(ai,"assertProperty");w.addMethod("property",ai);function ci(e,t,n){E(this,"own",true),ai.apply(this,arguments);}i(ci,"assertOwnProperty");x(ci,"assertOwnProperty");w.addMethod("ownProperty",ci);w.addMethod("haveOwnProperty",ci);function li(e,t,n){typeof t=="string"&&(n=t,t=null),n&&E(this,"message",n);let r=E(this,"object"),o=Object.getOwnPropertyDescriptor(Object(r),e),s=E(this,"eql");o&&t?this.assert(s(t,o),"expected the own property descriptor for "+G(e)+" on #{this} to match "+G(t)+", got "+G(o),"expected the own property descriptor for "+G(e)+" on #{this} to not match "+G(t),t,o,true):this.assert(o,"expected #{this} to have an own property descriptor for "+G(e),"expected #{this} to not have an own property descriptor for "+G(e)),E(this,"object",o);}i(li,"assertOwnPropertyDescriptor");x(li,"assertOwnPropertyDescriptor");w.addMethod("ownPropertyDescriptor",li);w.addMethod("haveOwnPropertyDescriptor",li);function ui(){E(this,"doLength",true);}i(ui,"assertLengthChain");x(ui,"assertLengthChain");function fi(e,t){t&&E(this,"message",t);let n=E(this,"object"),r=oe(n).toLowerCase(),o=E(this,"message"),s=E(this,"ssfi"),a="length",l;switch(r){case "map":case "set":a="size",l=n.size;break;default:new w(n,o,s,true).to.have.property("length"),l=n.length;}this.assert(l==e,"expected #{this} to have a "+a+" of #{exp} but got #{act}","expected #{this} to not have a "+a+" of #{act}",e,l);}i(fi,"assertLength");x(fi,"assertLength");w.addChainableMethod("length",fi,ui);w.addChainableMethod("lengthOf",fi,ui);function hi(e,t){t&&E(this,"message",t);let n=E(this,"object");this.assert(e.exec(n),"expected #{this} to match "+e,"expected #{this} not to match "+e);}i(hi,"assertMatch");x(hi,"assertMatch");w.addMethod("match",hi);w.addMethod("matches",hi);w.addMethod("string",function(e,t){t&&E(this,"message",t);let n=E(this,"object"),r=E(this,"message"),o=E(this,"ssfi");new w(n,r,o,true).is.a("string"),this.assert(~n.indexOf(e),"expected #{this} to contain "+G(e),"expected #{this} to not contain "+G(e));});function di(e){let t=E(this,"object"),n=oe(t),r=oe(e),o=E(this,"ssfi"),s=E(this,"deep"),a,l="",c,u=true,f=E(this,"message");f=f?f+": ":"";let h=f+"when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments";if(n==="Map"||n==="Set")l=s?"deeply ":"",c=[],t.forEach(function(S,_){c.push(_);}),r!=="Array"&&(e=Array.prototype.slice.call(arguments));else {switch(c=ei(t),r){case "Array":if(arguments.length>1)throw new J(h,void 0,o);break;case "Object":if(arguments.length>1)throw new J(h,void 0,o);e=Object.keys(e);break;default:e=Array.prototype.slice.call(arguments);}e=e.map(function(S){return typeof S=="symbol"?S:String(S)});}if(!e.length)throw new J(f+"keys required",void 0,o);let p=e.length,d=E(this,"any"),g=E(this,"all"),m=e,b=s?E(this,"eql"):(S,_)=>S===_;if(!d&&!g&&(g=true),d&&(u=m.some(function(S){return c.some(function(_){return b(S,_)})})),g&&(u=m.every(function(S){return c.some(function(_){return b(S,_)})}),E(this,"contains")||(u=u&&e.length==c.length)),p>1){e=e.map(function(_){return G(_)});let S=e.pop();g&&(a=e.join(", ")+", and "+S),d&&(a=e.join(", ")+", or "+S);}else a=G(e[0]);a=(p>1?"keys ":"key ")+a,a=(E(this,"contains")?"contain ":"have ")+a,this.assert(u,"expected #{this} to "+l+a,"expected #{this} to not "+l+a,m.slice(0).sort(br),c.sort(br),true);}i(di,"assertKeys");x(di,"assertKeys");w.addMethod("keys",di);w.addMethod("key",di);function Nr(e,t,n){n&&E(this,"message",n);let r=E(this,"object"),o=E(this,"ssfi"),s=E(this,"message"),a=E(this,"negate")||false;new w(r,s,o,true).is.a("function"),(Sr(e)||typeof e=="string")&&(t=e,e=null);let l,c=false;try{r();}catch(d){c=true,l=d;}let u=e===void 0&&t===void 0,f=!!(e&&t),h=false,p=false;if(u||!u&&!a){let d="an error";e instanceof Error?d="#{exp}":e&&(d=qe.getConstructorName(e));let g=l;if(l instanceof Error)g=l.toString();else if(typeof l=="string")g=l;else if(l&&(typeof l=="object"||typeof l=="function"))try{g=qe.getConstructorName(l);}catch{}this.assert(c,"expected #{this} to throw "+d,"expected #{this} to not throw an error but #{act} was thrown",e&&e.toString(),g);}if(e&&l&&(e instanceof Error&&qe.compatibleInstance(l,e)===a&&(f&&a?h=true:this.assert(a,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(l&&!a?" but #{act} was thrown":""),e.toString(),l.toString())),qe.compatibleConstructor(l,e)===a&&(f&&a?h=true:this.assert(a,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(l?" but #{act} was thrown":""),e instanceof Error?e.toString():e&&qe.getConstructorName(e),l instanceof Error?l.toString():l&&qe.getConstructorName(l)))),l&&t!==void 0&&t!==null){let d="including";Sr(t)&&(d="matching"),qe.compatibleMessage(l,t)===a&&(f&&a?p=true:this.assert(a,"expected #{this} to throw error "+d+" #{exp} but got #{act}","expected #{this} to throw error not "+d+" #{exp}",t,qe.getMessage(l)));}h&&p&&this.assert(a,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(l?" but #{act} was thrown":""),e instanceof Error?e.toString():e&&qe.getConstructorName(e),l instanceof Error?l.toString():l&&qe.getConstructorName(l)),E(this,"object",l);}i(Nr,"assertThrows");x(Nr,"assertThrows");w.addMethod("throw",Nr);w.addMethod("throws",Nr);w.addMethod("Throw",Nr);function pi(e,t){t&&E(this,"message",t);let n=E(this,"object"),r=E(this,"itself"),o=typeof n=="function"&&!r?n.prototype[e]:n[e];this.assert(typeof o=="function","expected #{this} to respond to "+G(e),"expected #{this} to not respond to "+G(e));}i(pi,"respondTo");x(pi,"respondTo");w.addMethod("respondTo",pi);w.addMethod("respondsTo",pi);w.addProperty("itself",function(){E(this,"itself",true);});function mi(e,t){t&&E(this,"message",t);let n=E(this,"object"),r=e(n);this.assert(r,"expected #{this} to satisfy "+Ot(e),"expected #{this} to not satisfy"+Ot(e),!E(this,"negate"),r);}i(mi,"satisfy");x(mi,"satisfy");w.addMethod("satisfy",mi);w.addMethod("satisfies",mi);function gi(e,t,n){n&&E(this,"message",n);let r=E(this,"object"),o=E(this,"message"),s=E(this,"ssfi");new w(r,o,s,true).is.numeric;let a="A `delta` value is required for `closeTo`";if(t==null)throw new J(o?`${o}: ${a}`:a,void 0,s);if(new w(t,o,s,true).is.numeric,a="A `expected` value is required for `closeTo`",e==null)throw new J(o?`${o}: ${a}`:a,void 0,s);new w(e,o,s,true).is.numeric;let l=x(u=>u<0?-u:u,"abs"),c=x(u=>parseFloat(parseFloat(u).toPrecision(12)),"strip");this.assert(c(l(r-e))<=t,"expected #{this} to be close to "+e+" +/- "+t,"expected #{this} not to be close to "+e+" +/- "+t);}i(gi,"closeTo");x(gi,"closeTo");w.addMethod("closeTo",gi);w.addMethod("approximately",gi);function Ku(e,t,n,r,o){let s=Array.from(t),a=Array.from(e);if(!r){if(a.length!==s.length)return false;s=s.slice();}return a.every(function(l,c){if(o)return n?n(l,s[c]):l===s[c];if(!n){let u=s.indexOf(l);return u===-1?false:(r||s.splice(u,1),true)}return s.some(function(u,f){return n(l,u)?(r||s.splice(f,1),true):false})})}i(Ku,"isSubsetOf");x(Ku,"isSubsetOf");w.addMethod("members",function(e,t){t&&E(this,"message",t);let n=E(this,"object"),r=E(this,"message"),o=E(this,"ssfi");new w(n,r,o,true).to.be.iterable,new w(e,r,o,true).to.be.iterable;let s=E(this,"contains"),a=E(this,"ordered"),l,c,u;s?(l=a?"an ordered superset":"a superset",c="expected #{this} to be "+l+" of #{exp}",u="expected #{this} to not be "+l+" of #{exp}"):(l=a?"ordered members":"members",c="expected #{this} to have the same "+l+" as #{exp}",u="expected #{this} to not have the same "+l+" as #{exp}");let f=E(this,"deep")?E(this,"eql"):void 0;this.assert(Ku(e,n,f,s,a),c,u,e,n,true);});w.addProperty("iterable",function(e){e&&E(this,"message",e);let t=E(this,"object");this.assert(t!=null&&t[Symbol.iterator],"expected #{this} to be an iterable","expected #{this} to not be an iterable",t);});function Hu(e,t){t&&E(this,"message",t);let n=E(this,"object"),r=E(this,"message"),o=E(this,"ssfi"),s=E(this,"contains"),a=E(this,"deep"),l=E(this,"eql");new w(e,r,o,true).to.be.an("array"),s?this.assert(e.some(function(c){return n.indexOf(c)>-1}),"expected #{this} to contain one of #{exp}","expected #{this} to not contain one of #{exp}",e,n):a?this.assert(e.some(function(c){return l(n,c)}),"expected #{this} to deeply equal one of #{exp}","expected #{this} to deeply equal one of #{exp}",e,n):this.assert(e.indexOf(n)>-1,"expected #{this} to be one of #{exp}","expected #{this} to not be one of #{exp}",e,n);}i(Hu,"oneOf");x(Hu,"oneOf");w.addMethod("oneOf",Hu);function yi(e,t,n){n&&E(this,"message",n);let r=E(this,"object"),o=E(this,"message"),s=E(this,"ssfi");new w(r,o,s,true).is.a("function");let a;t?(new w(e,o,s,true).to.have.property(t),a=e[t]):(new w(e,o,s,true).is.a("function"),a=e()),r();let l=t==null?e():e[t],c=t==null?a:"."+t;E(this,"deltaMsgObj",c),E(this,"initialDeltaValue",a),E(this,"finalDeltaValue",l),E(this,"deltaBehavior","change"),E(this,"realDelta",l!==a),this.assert(a!==l,"expected "+c+" to change","expected "+c+" to not change");}i(yi,"assertChanges");x(yi,"assertChanges");w.addMethod("change",yi);w.addMethod("changes",yi);function wi(e,t,n){n&&E(this,"message",n);let r=E(this,"object"),o=E(this,"message"),s=E(this,"ssfi");new w(r,o,s,true).is.a("function");let a;t?(new w(e,o,s,true).to.have.property(t),a=e[t]):(new w(e,o,s,true).is.a("function"),a=e()),new w(a,o,s,true).is.a("number"),r();let l=t==null?e():e[t],c=t==null?a:"."+t;E(this,"deltaMsgObj",c),E(this,"initialDeltaValue",a),E(this,"finalDeltaValue",l),E(this,"deltaBehavior","increase"),E(this,"realDelta",l-a),this.assert(l-a>0,"expected "+c+" to increase","expected "+c+" to not increase");}i(wi,"assertIncreases");x(wi,"assertIncreases");w.addMethod("increase",wi);w.addMethod("increases",wi);function bi(e,t,n){n&&E(this,"message",n);let r=E(this,"object"),o=E(this,"message"),s=E(this,"ssfi");new w(r,o,s,true).is.a("function");let a;t?(new w(e,o,s,true).to.have.property(t),a=e[t]):(new w(e,o,s,true).is.a("function"),a=e()),new w(a,o,s,true).is.a("number"),r();let l=t==null?e():e[t],c=t==null?a:"."+t;E(this,"deltaMsgObj",c),E(this,"initialDeltaValue",a),E(this,"finalDeltaValue",l),E(this,"deltaBehavior","decrease"),E(this,"realDelta",a-l),this.assert(l-a<0,"expected "+c+" to decrease","expected "+c+" to not decrease");}i(bi,"assertDecreases");x(bi,"assertDecreases");w.addMethod("decrease",bi);w.addMethod("decreases",bi);function Gu(e,t){t&&E(this,"message",t);let n=E(this,"deltaMsgObj"),r=E(this,"initialDeltaValue"),o=E(this,"finalDeltaValue"),s=E(this,"deltaBehavior"),a=E(this,"realDelta"),l;s==="change"?l=Math.abs(o-r)===Math.abs(e):l=a===Math.abs(e),this.assert(l,"expected "+n+" to "+s+" by "+e,"expected "+n+" to not "+s+" by "+e);}i(Gu,"assertDelta");x(Gu,"assertDelta");w.addMethod("by",Gu);w.addProperty("extensible",function(){let e=E(this,"object"),t=e===Object(e)&&Object.isExtensible(e);this.assert(t,"expected #{this} to be extensible","expected #{this} to not be extensible");});w.addProperty("sealed",function(){let e=E(this,"object"),t=e===Object(e)?Object.isSealed(e):true;this.assert(t,"expected #{this} to be sealed","expected #{this} to not be sealed");});w.addProperty("frozen",function(){let e=E(this,"object"),t=e===Object(e)?Object.isFrozen(e):true;this.assert(t,"expected #{this} to be frozen","expected #{this} to not be frozen");});w.addProperty("finite",function(e){let t=E(this,"object");this.assert(typeof t=="number"&&isFinite(t),"expected #{this} to be a finite number","expected #{this} to not be a finite number");});function Er(e,t){return e===t?true:typeof t!=typeof e?false:typeof e!="object"||e===null?e===t:t?Array.isArray(e)?Array.isArray(t)?e.every(function(n){return t.some(function(r){return Er(n,r)})}):false:e instanceof Date?t instanceof Date?e.getTime()===t.getTime():false:Object.keys(e).every(function(n){let r=e[n],o=t[n];return typeof r=="object"&&r!==null&&o!==null?Er(r,o):typeof r=="function"?r(o):o===r}):false}i(Er,"compareSubset");x(Er,"compareSubset");w.addMethod("containSubset",function(e){let t=z(this,"object"),n=ve.showDiff;this.assert(Er(e,t),"expected #{act} to contain subset #{exp}","expected #{act} to not contain subset #{exp}",e,t,n);});function vn(e,t){return new w(e,t)}i(vn,"expect");x(vn,"expect");vn.fail=function(e,t,n,r){throw arguments.length<2&&(n=e,e=void 0),n=n||"expect.fail()",new J(n,{actual:e,expected:t,operator:r},vn.fail)};var Ju={};Ds(Ju,{Should:i(()=>Xu,"Should"),should:i(()=>Yu,"should")});function Ti(){function e(){return this instanceof String||this instanceof Number||this instanceof Boolean||typeof Symbol=="function"&&this instanceof Symbol||typeof BigInt=="function"&&this instanceof BigInt?new w(this.valueOf(),null,e):new w(this,null,e)}i(e,"shouldGetter"),x(e,"shouldGetter");function t(r){Object.defineProperty(this,"should",{value:r,enumerable:true,configurable:true,writable:true});}i(t,"shouldSetter"),x(t,"shouldSetter"),Object.defineProperty(Object.prototype,"should",{set:t,get:e,configurable:true});let n={};return n.fail=function(r,o,s,a){throw arguments.length<2&&(s=r,r=void 0),s=s||"should.fail()",new J(s,{actual:r,expected:o,operator:a},n.fail)},n.equal=function(r,o,s){new w(r,s).to.equal(o);},n.Throw=function(r,o,s,a){new w(r,a).to.Throw(o,s);},n.exist=function(r,o){new w(r,o).to.exist;},n.not={},n.not.equal=function(r,o,s){new w(r,s).to.not.equal(o);},n.not.Throw=function(r,o,s,a){new w(r,a).to.not.Throw(o,s);},n.not.exist=function(r,o){new w(r,o).to.not.exist;},n.throw=n.Throw,n.not.throw=n.not.Throw,n}i(Ti,"loadShould");x(Ti,"loadShould");var Yu=Ti,Xu=Ti;function y(e,t){new w(null,null,y,true).assert(e,t,"[ negation message unavailable ]");}i(y,"assert");x(y,"assert");y.fail=function(e,t,n,r){throw arguments.length<2&&(n=e,e=void 0),n=n||"assert.fail()",new J(n,{actual:e,expected:t,operator:r},y.fail)};y.isOk=function(e,t){new w(e,t,y.isOk,true).is.ok;};y.isNotOk=function(e,t){new w(e,t,y.isNotOk,true).is.not.ok;};y.equal=function(e,t,n){let r=new w(e,n,y.equal,true);r.assert(t==z(r,"object"),"expected #{this} to equal #{exp}","expected #{this} to not equal #{act}",t,e,true);};y.notEqual=function(e,t,n){let r=new w(e,n,y.notEqual,true);r.assert(t!=z(r,"object"),"expected #{this} to not equal #{exp}","expected #{this} to equal #{act}",t,e,true);};y.strictEqual=function(e,t,n){new w(e,n,y.strictEqual,true).to.equal(t);};y.notStrictEqual=function(e,t,n){new w(e,n,y.notStrictEqual,true).to.not.equal(t);};y.deepEqual=y.deepStrictEqual=function(e,t,n){new w(e,n,y.deepEqual,true).to.eql(t);};y.notDeepEqual=function(e,t,n){new w(e,n,y.notDeepEqual,true).to.not.eql(t);};y.isAbove=function(e,t,n){new w(e,n,y.isAbove,true).to.be.above(t);};y.isAtLeast=function(e,t,n){new w(e,n,y.isAtLeast,true).to.be.least(t);};y.isBelow=function(e,t,n){new w(e,n,y.isBelow,true).to.be.below(t);};y.isAtMost=function(e,t,n){new w(e,n,y.isAtMost,true).to.be.most(t);};y.isTrue=function(e,t){new w(e,t,y.isTrue,true).is.true;};y.isNotTrue=function(e,t){new w(e,t,y.isNotTrue,true).to.not.equal(true);};y.isFalse=function(e,t){new w(e,t,y.isFalse,true).is.false;};y.isNotFalse=function(e,t){new w(e,t,y.isNotFalse,true).to.not.equal(false);};y.isNull=function(e,t){new w(e,t,y.isNull,true).to.equal(null);};y.isNotNull=function(e,t){new w(e,t,y.isNotNull,true).to.not.equal(null);};y.isNaN=function(e,t){new w(e,t,y.isNaN,true).to.be.NaN;};y.isNotNaN=function(e,t){new w(e,t,y.isNotNaN,true).not.to.be.NaN;};y.exists=function(e,t){new w(e,t,y.exists,true).to.exist;};y.notExists=function(e,t){new w(e,t,y.notExists,true).to.not.exist;};y.isUndefined=function(e,t){new w(e,t,y.isUndefined,true).to.equal(void 0);};y.isDefined=function(e,t){new w(e,t,y.isDefined,true).to.not.equal(void 0);};y.isCallable=function(e,t){new w(e,t,y.isCallable,true).is.callable;};y.isNotCallable=function(e,t){new w(e,t,y.isNotCallable,true).is.not.callable;};y.isObject=function(e,t){new w(e,t,y.isObject,true).to.be.a("object");};y.isNotObject=function(e,t){new w(e,t,y.isNotObject,true).to.not.be.a("object");};y.isArray=function(e,t){new w(e,t,y.isArray,true).to.be.an("array");};y.isNotArray=function(e,t){new w(e,t,y.isNotArray,true).to.not.be.an("array");};y.isString=function(e,t){new w(e,t,y.isString,true).to.be.a("string");};y.isNotString=function(e,t){new w(e,t,y.isNotString,true).to.not.be.a("string");};y.isNumber=function(e,t){new w(e,t,y.isNumber,true).to.be.a("number");};y.isNotNumber=function(e,t){new w(e,t,y.isNotNumber,true).to.not.be.a("number");};y.isNumeric=function(e,t){new w(e,t,y.isNumeric,true).is.numeric;};y.isNotNumeric=function(e,t){new w(e,t,y.isNotNumeric,true).is.not.numeric;};y.isFinite=function(e,t){new w(e,t,y.isFinite,true).to.be.finite;};y.isBoolean=function(e,t){new w(e,t,y.isBoolean,true).to.be.a("boolean");};y.isNotBoolean=function(e,t){new w(e,t,y.isNotBoolean,true).to.not.be.a("boolean");};y.typeOf=function(e,t,n){new w(e,n,y.typeOf,true).to.be.a(t);};y.notTypeOf=function(e,t,n){new w(e,n,y.notTypeOf,true).to.not.be.a(t);};y.instanceOf=function(e,t,n){new w(e,n,y.instanceOf,true).to.be.instanceOf(t);};y.notInstanceOf=function(e,t,n){new w(e,n,y.notInstanceOf,true).to.not.be.instanceOf(t);};y.include=function(e,t,n){new w(e,n,y.include,true).include(t);};y.notInclude=function(e,t,n){new w(e,n,y.notInclude,true).not.include(t);};y.deepInclude=function(e,t,n){new w(e,n,y.deepInclude,true).deep.include(t);};y.notDeepInclude=function(e,t,n){new w(e,n,y.notDeepInclude,true).not.deep.include(t);};y.nestedInclude=function(e,t,n){new w(e,n,y.nestedInclude,true).nested.include(t);};y.notNestedInclude=function(e,t,n){new w(e,n,y.notNestedInclude,true).not.nested.include(t);};y.deepNestedInclude=function(e,t,n){new w(e,n,y.deepNestedInclude,true).deep.nested.include(t);};y.notDeepNestedInclude=function(e,t,n){new w(e,n,y.notDeepNestedInclude,true).not.deep.nested.include(t);};y.ownInclude=function(e,t,n){new w(e,n,y.ownInclude,true).own.include(t);};y.notOwnInclude=function(e,t,n){new w(e,n,y.notOwnInclude,true).not.own.include(t);};y.deepOwnInclude=function(e,t,n){new w(e,n,y.deepOwnInclude,true).deep.own.include(t);};y.notDeepOwnInclude=function(e,t,n){new w(e,n,y.notDeepOwnInclude,true).not.deep.own.include(t);};y.match=function(e,t,n){new w(e,n,y.match,true).to.match(t);};y.notMatch=function(e,t,n){new w(e,n,y.notMatch,true).to.not.match(t);};y.property=function(e,t,n){new w(e,n,y.property,true).to.have.property(t);};y.notProperty=function(e,t,n){new w(e,n,y.notProperty,true).to.not.have.property(t);};y.propertyVal=function(e,t,n,r){new w(e,r,y.propertyVal,true).to.have.property(t,n);};y.notPropertyVal=function(e,t,n,r){new w(e,r,y.notPropertyVal,true).to.not.have.property(t,n);};y.deepPropertyVal=function(e,t,n,r){new w(e,r,y.deepPropertyVal,true).to.have.deep.property(t,n);};y.notDeepPropertyVal=function(e,t,n,r){new w(e,r,y.notDeepPropertyVal,true).to.not.have.deep.property(t,n);};y.ownProperty=function(e,t,n){new w(e,n,y.ownProperty,true).to.have.own.property(t);};y.notOwnProperty=function(e,t,n){new w(e,n,y.notOwnProperty,true).to.not.have.own.property(t);};y.ownPropertyVal=function(e,t,n,r){new w(e,r,y.ownPropertyVal,true).to.have.own.property(t,n);};y.notOwnPropertyVal=function(e,t,n,r){new w(e,r,y.notOwnPropertyVal,true).to.not.have.own.property(t,n);};y.deepOwnPropertyVal=function(e,t,n,r){new w(e,r,y.deepOwnPropertyVal,true).to.have.deep.own.property(t,n);};y.notDeepOwnPropertyVal=function(e,t,n,r){new w(e,r,y.notDeepOwnPropertyVal,true).to.not.have.deep.own.property(t,n);};y.nestedProperty=function(e,t,n){new w(e,n,y.nestedProperty,true).to.have.nested.property(t);};y.notNestedProperty=function(e,t,n){new w(e,n,y.notNestedProperty,true).to.not.have.nested.property(t);};y.nestedPropertyVal=function(e,t,n,r){new w(e,r,y.nestedPropertyVal,true).to.have.nested.property(t,n);};y.notNestedPropertyVal=function(e,t,n,r){new w(e,r,y.notNestedPropertyVal,true).to.not.have.nested.property(t,n);};y.deepNestedPropertyVal=function(e,t,n,r){new w(e,r,y.deepNestedPropertyVal,true).to.have.deep.nested.property(t,n);};y.notDeepNestedPropertyVal=function(e,t,n,r){new w(e,r,y.notDeepNestedPropertyVal,true).to.not.have.deep.nested.property(t,n);};y.lengthOf=function(e,t,n){new w(e,n,y.lengthOf,true).to.have.lengthOf(t);};y.hasAnyKeys=function(e,t,n){new w(e,n,y.hasAnyKeys,true).to.have.any.keys(t);};y.hasAllKeys=function(e,t,n){new w(e,n,y.hasAllKeys,true).to.have.all.keys(t);};y.containsAllKeys=function(e,t,n){new w(e,n,y.containsAllKeys,true).to.contain.all.keys(t);};y.doesNotHaveAnyKeys=function(e,t,n){new w(e,n,y.doesNotHaveAnyKeys,true).to.not.have.any.keys(t);};y.doesNotHaveAllKeys=function(e,t,n){new w(e,n,y.doesNotHaveAllKeys,true).to.not.have.all.keys(t);};y.hasAnyDeepKeys=function(e,t,n){new w(e,n,y.hasAnyDeepKeys,true).to.have.any.deep.keys(t);};y.hasAllDeepKeys=function(e,t,n){new w(e,n,y.hasAllDeepKeys,true).to.have.all.deep.keys(t);};y.containsAllDeepKeys=function(e,t,n){new w(e,n,y.containsAllDeepKeys,true).to.contain.all.deep.keys(t);};y.doesNotHaveAnyDeepKeys=function(e,t,n){new w(e,n,y.doesNotHaveAnyDeepKeys,true).to.not.have.any.deep.keys(t);};y.doesNotHaveAllDeepKeys=function(e,t,n){new w(e,n,y.doesNotHaveAllDeepKeys,true).to.not.have.all.deep.keys(t);};y.throws=function(e,t,n,r){(typeof t=="string"||t instanceof RegExp)&&(n=t,t=null);let o=new w(e,r,y.throws,true).to.throw(t,n);return z(o,"object")};y.doesNotThrow=function(e,t,n,r){(typeof t=="string"||t instanceof RegExp)&&(n=t,t=null),new w(e,r,y.doesNotThrow,true).to.not.throw(t,n);};y.operator=function(e,t,n,r){let o;switch(t){case "==":o=e==n;break;case "===":o=e===n;break;case ">":o=e>n;break;case ">=":o=e>=n;break;case "<":o=e<n;break;case "<=":o=e<=n;break;case "!=":o=e!=n;break;case "!==":o=e!==n;break;default:throw r=r&&r+": ",new J(r+'Invalid operator "'+t+'"',void 0,y.operator)}let s=new w(o,r,y.operator,true);s.assert(z(s,"object")===true,"expected "+G(e)+" to be "+t+" "+G(n),"expected "+G(e)+" to not be "+t+" "+G(n));};y.closeTo=function(e,t,n,r){new w(e,r,y.closeTo,true).to.be.closeTo(t,n);};y.approximately=function(e,t,n,r){new w(e,r,y.approximately,true).to.be.approximately(t,n);};y.sameMembers=function(e,t,n){new w(e,n,y.sameMembers,true).to.have.same.members(t);};y.notSameMembers=function(e,t,n){new w(e,n,y.notSameMembers,true).to.not.have.same.members(t);};y.sameDeepMembers=function(e,t,n){new w(e,n,y.sameDeepMembers,true).to.have.same.deep.members(t);};y.notSameDeepMembers=function(e,t,n){new w(e,n,y.notSameDeepMembers,true).to.not.have.same.deep.members(t);};y.sameOrderedMembers=function(e,t,n){new w(e,n,y.sameOrderedMembers,true).to.have.same.ordered.members(t);};y.notSameOrderedMembers=function(e,t,n){new w(e,n,y.notSameOrderedMembers,true).to.not.have.same.ordered.members(t);};y.sameDeepOrderedMembers=function(e,t,n){new w(e,n,y.sameDeepOrderedMembers,true).to.have.same.deep.ordered.members(t);};y.notSameDeepOrderedMembers=function(e,t,n){new w(e,n,y.notSameDeepOrderedMembers,true).to.not.have.same.deep.ordered.members(t);};y.includeMembers=function(e,t,n){new w(e,n,y.includeMembers,true).to.include.members(t);};y.notIncludeMembers=function(e,t,n){new w(e,n,y.notIncludeMembers,true).to.not.include.members(t);};y.includeDeepMembers=function(e,t,n){new w(e,n,y.includeDeepMembers,true).to.include.deep.members(t);};y.notIncludeDeepMembers=function(e,t,n){new w(e,n,y.notIncludeDeepMembers,true).to.not.include.deep.members(t);};y.includeOrderedMembers=function(e,t,n){new w(e,n,y.includeOrderedMembers,true).to.include.ordered.members(t);};y.notIncludeOrderedMembers=function(e,t,n){new w(e,n,y.notIncludeOrderedMembers,true).to.not.include.ordered.members(t);};y.includeDeepOrderedMembers=function(e,t,n){new w(e,n,y.includeDeepOrderedMembers,true).to.include.deep.ordered.members(t);};y.notIncludeDeepOrderedMembers=function(e,t,n){new w(e,n,y.notIncludeDeepOrderedMembers,true).to.not.include.deep.ordered.members(t);};y.oneOf=function(e,t,n){new w(e,n,y.oneOf,true).to.be.oneOf(t);};y.isIterable=function(e,t){if(e==null||!e[Symbol.iterator])throw t=t?`${t} expected ${G(e)} to be an iterable`:`expected ${G(e)} to be an iterable`,new J(t,void 0,y.isIterable)};y.changes=function(e,t,n,r){arguments.length===3&&typeof t=="function"&&(r=n,n=null),new w(e,r,y.changes,true).to.change(t,n);};y.changesBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){let s=r;r=n,o=s;}else arguments.length===3&&(r=n,n=null);new w(e,o,y.changesBy,true).to.change(t,n).by(r);};y.doesNotChange=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new w(e,r,y.doesNotChange,true).to.not.change(t,n)};y.changesButNotBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){let s=r;r=n,o=s;}else arguments.length===3&&(r=n,n=null);new w(e,o,y.changesButNotBy,true).to.change(t,n).but.not.by(r);};y.increases=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new w(e,r,y.increases,true).to.increase(t,n)};y.increasesBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){let s=r;r=n,o=s;}else arguments.length===3&&(r=n,n=null);new w(e,o,y.increasesBy,true).to.increase(t,n).by(r);};y.doesNotIncrease=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new w(e,r,y.doesNotIncrease,true).to.not.increase(t,n)};y.increasesButNotBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){let s=r;r=n,o=s;}else arguments.length===3&&(r=n,n=null);new w(e,o,y.increasesButNotBy,true).to.increase(t,n).but.not.by(r);};y.decreases=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new w(e,r,y.decreases,true).to.decrease(t,n)};y.decreasesBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){let s=r;r=n,o=s;}else arguments.length===3&&(r=n,n=null);new w(e,o,y.decreasesBy,true).to.decrease(t,n).by(r);};y.doesNotDecrease=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new w(e,r,y.doesNotDecrease,true).to.not.decrease(t,n)};y.doesNotDecreaseBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){let s=r;r=n,o=s;}else arguments.length===3&&(r=n,n=null);return new w(e,o,y.doesNotDecreaseBy,true).to.not.decrease(t,n).by(r)};y.decreasesButNotBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){let s=r;r=n,o=s;}else arguments.length===3&&(r=n,n=null);new w(e,o,y.decreasesButNotBy,true).to.decrease(t,n).but.not.by(r);};y.ifError=function(e){if(e)throw e};y.isExtensible=function(e,t){new w(e,t,y.isExtensible,true).to.be.extensible;};y.isNotExtensible=function(e,t){new w(e,t,y.isNotExtensible,true).to.not.be.extensible;};y.isSealed=function(e,t){new w(e,t,y.isSealed,true).to.be.sealed;};y.isNotSealed=function(e,t){new w(e,t,y.isNotSealed,true).to.not.be.sealed;};y.isFrozen=function(e,t){new w(e,t,y.isFrozen,true).to.be.frozen;};y.isNotFrozen=function(e,t){new w(e,t,y.isNotFrozen,true).to.not.be.frozen;};y.isEmpty=function(e,t){new w(e,t,y.isEmpty,true).to.be.empty;};y.isNotEmpty=function(e,t){new w(e,t,y.isNotEmpty,true).to.not.be.empty;};y.containsSubset=function(e,t,n){new w(e,n).to.containSubset(t);};y.doesNotContainSubset=function(e,t,n){new w(e,n).to.not.containSubset(t);};var dy=[["isOk","ok"],["isNotOk","notOk"],["throws","throw"],["throws","Throw"],["isExtensible","extensible"],["isNotExtensible","notExtensible"],["isSealed","sealed"],["isNotSealed","notSealed"],["isFrozen","frozen"],["isNotFrozen","notFrozen"],["isEmpty","empty"],["isNotEmpty","notEmpty"],["isCallable","isFunction"],["isNotCallable","isNotFunction"],["containsSubset","containSubset"]];for(let[e,t]of dy)y[t]=y[e];var tu=[];function On(e){let t={use:On,AssertionError:J,util:Ke,config:ve,expect:vn,assert:y,Assertion:w,...Ju};return ~tu.indexOf(e)||(e(t,Ke),tu.push(e)),t}i(On,"use");x(On,"use");var of=i((e,t)=>{function n(s,a){t.addProperty(e.Assertion.prototype,s,function(){let l=e.Assertion.prototype[a];if(!l)throw new Error(`Cannot delegate to ${String(a)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return l.call(this)});}i(n,"defProperty");function r(s,a,...l){t.addProperty(e.Assertion.prototype,s,function(){let c=e.Assertion.prototype[a];if(!c)throw new Error(`Cannot delegate to ${String(a)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return c.call(this,...l)});}i(r,"defPropertyWithArgs");function o(s,a){t.addMethod(e.Assertion.prototype,s,function(...l){let c=e.Assertion.prototype[a];if(!c)throw new Error(`Cannot delegate to ${String(a)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return c.call(this,...l)});}i(o,"defMethod"),n("called","toHaveBeenCalled"),n("calledOnce","toHaveBeenCalledOnce"),r("calledTwice","toHaveBeenCalledTimes",2),r("calledThrice","toHaveBeenCalledTimes",3),o("callCount","toHaveBeenCalledTimes"),o("calledWith","toHaveBeenCalledWith"),o("calledOnceWith","toHaveBeenCalledExactlyOnceWith"),o("lastCalledWith","toHaveBeenLastCalledWith"),o("nthCalledWith","toHaveBeenNthCalledWith"),o("returned","toHaveReturned"),o("returnedWith","toHaveReturnedWith"),o("returnedTimes","toHaveReturnedTimes"),o("lastReturnedWith","toHaveLastReturnedWith"),o("nthReturnedWith","toHaveNthReturnedWith"),o("calledBefore","toHaveBeenCalledBefore"),o("calledAfter","toHaveBeenCalledAfter");},"ChaiStyleAssertions"),Pr=Symbol.for("matchers-object"),An=Symbol.for("$$jest-matchers-object"),$n=Symbol.for("expect-global"),Vr=Symbol.for("asymmetric-matchers-object"),sf={toSatisfy(e,t,n){let{printReceived:r,printExpected:o,matcherHint:s}=this.utils,a=t(e);return {pass:a,message:i(()=>a?`${s(".not.toSatisfy","received","")}
81
+ `);return e}i(wn,"getWorkerState");function ps(){return typeof process<"u"&&!!process.send}i(ps,"isChildProcess");function Nl(e,t=false){let n=[/\/vitest\/dist\//,/vitest-virtual-\w+\/dist/,/@vitest\/dist/,...t?[]:[/^mock:/]];e.idToModuleMap.forEach((r,o)=>{n.some(s=>s.test(o))||(r.promise=void 0,r.exports=void 0,r.evaluated=false,r.importers.clear());});}i(Nl,"resetModules");function Sg(){let{setTimeout:e}=ft();return new Promise(t=>e(t,0))}i(Sg,"waitNextTick");async function ds(){await Sg();let e=wn(),t=[],n=e.resolvingModules.size;for(let[r,o]of e.evaluatedModules.idToModuleMap)o.promise&&!o.evaluated&&t.push(o.promise);!t.length&&!n||(await Promise.allSettled(t),await ds());}i(ds,"waitForImportsToResolve");function mt(e){return typeof e=="function"&&"_isMockFunction"in e&&e._isMockFunction===true}i(mt,"isMockFunction");var ms=new Set,gs=new Set,Pl=new WeakMap;function ys(e={}){let{originalImplementation:t,restore:n,mockImplementation:r,resetToMockImplementation:o,resetToMockName:s}=e;n&&ms.add(n);let a=Ng(t),l=Pg(),c=vg({config:a,state:l,...e}),u=(r||t)?.length??0;return Object.defineProperty(c,"length",{writable:true,enumerable:false,value:u,configurable:true}),s&&(a.mockName=c.name||"vi.fn()"),Pl.set(c,a),gs.add(c),c._isMockFunction=true,c.getMockImplementation=()=>a.onceMockImplementations[0]||a.mockImplementation,Object.defineProperty(c,"mock",{configurable:false,enumerable:true,writable:false,value:l}),c.mockImplementation=i(function(h){return a.mockImplementation=h,c},"mockImplementation"),c.mockImplementationOnce=i(function(h){return a.onceMockImplementations.push(h),c},"mockImplementationOnce"),c.withImplementation=i(function(h,d){let p=a.mockImplementation,g=a.onceMockImplementations,m=i(()=>{a.mockImplementation=p,a.onceMockImplementations=g;},"reset");a.mockImplementation=h,a.onceMockImplementations=[];let b=d();return typeof b=="object"&&typeof b?.then=="function"?b.then(()=>(m(),c)):(m(),c)},"withImplementation"),c.mockReturnThis=i(function(){return c.mockImplementation(function(){return this})},"mockReturnThis"),c.mockReturnValue=i(function(h){return c.mockImplementation(function(){return new.target&&zt("mockReturnValue"),h})},"mockReturnValue"),c.mockReturnValueOnce=i(function(h){return c.mockImplementationOnce(function(){return new.target&&zt("mockReturnValueOnce"),h})},"mockReturnValueOnce"),c.mockThrow=i(function(h){return c.mockImplementation(function(){throw h})},"mockThrow"),c.mockThrowOnce=i(function(h){return c.mockImplementationOnce(function(){throw h})},"mockThrowOnce"),c.mockResolvedValue=i(function(h){return c.mockImplementation(function(){return new.target&&zt("mockResolvedValue"),Promise.resolve(h)})},"mockResolvedValue"),c.mockResolvedValueOnce=i(function(h){return c.mockImplementationOnce(function(){return new.target&&zt("mockResolvedValueOnce"),Promise.resolve(h)})},"mockResolvedValueOnce"),c.mockRejectedValue=i(function(h){return c.mockImplementation(function(){return new.target&&zt("mockRejectedValue"),Promise.reject(h)})},"mockRejectedValue"),c.mockRejectedValueOnce=i(function(h){return c.mockImplementationOnce(function(){return new.target&&zt("mockRejectedValueOnce"),Promise.reject(h)})},"mockRejectedValueOnce"),c.mockClear=i(function(){return l.calls=[],l.contexts=[],l.instances=[],l.invocationCallOrder=[],l.results=[],l.settledResults=[],c},"mockClear"),c.mockReset=i(function(){return c.mockClear(),a.mockImplementation=o?r:void 0,a.mockName=s&&c.name||"vi.fn()",a.onceMockImplementations=[],c},"mockReset"),c.mockRestore=i(function(){return c.mockReset(),n?.()},"mockRestore"),c.mockName=i(function(h){return typeof h=="string"&&(a.mockName=h),c},"mockName"),c.getMockName=i(function(){return a.mockName||"vi.fn()"},"getMockName"),Symbol.dispose&&(c[Symbol.dispose]=()=>c.mockRestore()),r&&c.mockImplementation(r),c}i(ys,"createMockInstance");function Rl(e){return e!=null&&mt(e)?e:ys({mockImplementation:e,resetToMockImplementation:true})}i(Rl,"fn");function jl(e,t,n){gr(e!=null,"The vi.spyOn() function could not find an object to spy upon. The first argument must be defined."),gr(typeof e=="object"||typeof e=="function","Vitest cannot spy on a primitive value.");let[r,o]=Fl(e,t)||[];gr(o||t in e,`The property "${String(t)}" is not defined on the ${typeof e}.`);let s=n||"value",a=false;s==="value"&&o&&o.value==null&&o.get&&(s="get",a=true);let l;o?(l=o[s],l==null&&s==="value"&&(l=e[t])):s!=="value"?l=i(()=>e[t],"original"):l=e[t];let c=a&&l?l():l,u=typeof c;if(gr(u==="function"||s!=="value"&&l==null,`vi.spyOn() can only spy on a function. Received ${u}.`),mt(c))return c;let f=i(p=>{let{value:g,...m}=o||{configurable:true,writable:true};s!=="value"&&delete m.writable,m[s]=p,Object.defineProperty(e,t,m);},"reassign"),d=ys({restore:i(()=>{r!==e?Reflect.deleteProperty(e,t):o&&!l?Object.defineProperty(e,t,o):f(l);},"restore"),originalImplementation:c,resetToMockName:true});try{f(a?()=>d:d);}catch(p){throw p instanceof TypeError&&Symbol.toStringTag&&e[Symbol.toStringTag]==="Module"&&(p.message.includes("Cannot redefine property")||p.message.includes("Cannot replace module namespace")||p.message.includes("can't redefine non-configurable property"))?new TypeError(`Cannot spy on export "${String(t)}". Module namespace is not configurable in ESM. See: https://vitest.dev/guide/browser/#limitations`,{cause:p}):p}return d}i(jl,"spyOn");function Fl(e,t){let n=Object.getOwnPropertyDescriptor(e,t);if(n)return [e,n];let r=Object.getPrototypeOf(e);for(;r!==null;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return [r,o];r=Object.getPrototypeOf(r);}}i(Fl,"getDescriptor");function gr(e,t){if(!e)throw new Error(t)}i(gr,"assert");var Eg=1;function vg({state:e,config:t,name:n,prototypeState:r,prototypeConfig:o,keepMembersImplementation:s,mockImplementation:a,prototypeMembers:l=[]}){let c=t.mockOriginal,u=a,f=n||c?.name||"Mock",h={[f]:(function(...g){xg(g,e,r),kg(Eg++,e,r);let m={type:"incomplete",value:void 0},b={type:"incomplete",value:void 0};Mg(m,e,r),Cg(b,e,r);let E=new.target?void 0:this,[M,A]=_g(E,e,r),[C,O]=Og(E,e,r),N=t.onceMockImplementations.shift()||t.mockImplementation||o?.onceMockImplementations.shift()||o?.mockImplementation||c||function(){},_,q,Q=false;try{if(new.target){_=Reflect.construct(N,g,new.target);for(let R of l){let V=_[R];if(V!==d.prototype[R])continue;let Y=mt(V),Te=Y?V.mock:void 0,le=Y?Pl.get(V):void 0;_[R]=ys({originalImplementation:s?le?.mockOriginal:void 0,prototypeState:Te,prototypeConfig:le,keepMembersImplementation:s});}}else _=N.apply(this,g);}catch(R){throw q=R,Q=true,R instanceof TypeError&&R.message.includes("is not a constructor")&&console.warn(`[vitest] The ${h[f].getMockName()} mock did not use 'function' or 'class' in its implementation, see https://vitest.dev/api/vi#vi-spyon for examples.`),R}finally{Q?(m.type="throw",m.value=q,b.type="rejected",b.value=q):(m.type="return",m.value=_,new.target&&(e.contexts[C-1]=_,e.instances[M-1]=_,O!=null&&r&&(r.contexts[O-1]=_),A!=null&&r&&(r.instances[A-1]=_)),_ instanceof Promise?_.then(R=>{b.type="fulfilled",b.value=R;},R=>{b.type="rejected",b.value=R;}):(b.type="fulfilled",b.value=_));}return _})},d=h[f],p=c||u;return p&&Ig(d,p),d}i(vg,"createMock");function xg(e,t,n){t.calls.push(e),n?.calls.push(e);}i(xg,"registerCalls");function kg(e,t,n){t.invocationCallOrder.push(e),n?.invocationCallOrder.push(e);}i(kg,"registerInvocationOrder");function Mg(e,t,n){t.results.push(e),n?.results.push(e);}i(Mg,"registerResult");function Cg(e,t,n){t.settledResults.push(e),n?.settledResults.push(e);}i(Cg,"registerSettledResult");function _g(e,t,n){let r=t.instances.push(e),o=n?.instances.push(e);return [r,o]}i(_g,"registerInstance");function Og(e,t,n){let r=t.contexts.push(e),o=n?.contexts.push(e);return [r,o]}i(Og,"registerContext");function Ig(e,t){let{properties:n,descriptors:r}=$g(t);for(let o of n){let s=r[o];Fl(e,o)||Object.defineProperty(e,o,s);}}i(Ig,"copyOriginalStaticProperties");var Ag=new Set(["length","name","prototype",Symbol.for("nodejs.util.promisify.custom")]);function $g(e){let t=new Set,n={};for(;e&&e!==Object.prototype&&e!==Function.prototype;){let r=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(let o of r)n[o]||Ag.has(o)||(t.add(o),n[o]=Object.getOwnPropertyDescriptor(e,o));e=Object.getPrototypeOf(e);}return {properties:t,descriptors:n}}i($g,"getAllProperties");function Ng(e){return {mockImplementation:void 0,mockOriginal:e,mockName:"vi.fn()",onceMockImplementations:[]}}i(Ng,"getDefaultConfig");function Pg(){let e={calls:[],contexts:[],instances:[],invocationCallOrder:[],settledResults:[],results:[],get lastCall(){return e.calls.at(-1)}};return e}i(Pg,"getDefaultState");function Dl(){for(let e of ms)e();ms.clear();}i(Dl,"restoreAllMocks");function Ll(){gs.forEach(e=>e.mockClear());}i(Ll,"clearAllMocks");function Bl(){gs.forEach(e=>e.mockReset());}i(Bl,"resetAllMocks");function zt(e){throw new TypeError(`Cannot use \`${e}\` when called with \`new\`. Use \`mockImplementation\` with a \`class\` keyword instead. See https://vitest.dev/api/mock#class-support for more information.`)}i(zt,"throwConstructorError");var oe={};ha(oe,{Assertion:()=>w,AssertionError:()=>G,Should:()=>Vu,assert:()=>y,config:()=>ve,expect:()=>En,should:()=>Wu,use:()=>_n,util:()=>Ke});var Rs=Object.defineProperty,Rg=i((e,t,n)=>t in e?Rs(e,t,{enumerable:true,configurable:true,writable:true,value:n}):e[t]=n,"__defNormalProp"),x=i((e,t)=>Rs(e,"name",{value:t,configurable:true}),"__name"),js=i((e,t)=>{for(var n in t)Rs(e,n,{get:t[n],enumerable:true});},"__export"),Yl=i((e,t,n)=>Rg(e,typeof t!="symbol"?t+"":t,n),"__publicField"),Ke={};js(Ke,{addChainableMethod:i(()=>Js,"addChainableMethod"),addLengthGuard:i(()=>kn,"addLengthGuard"),addMethod:i(()=>Ks,"addMethod"),addProperty:i(()=>Vs,"addProperty"),checkError:i(()=>qe,"checkError"),compareByInspect:i(()=>br,"compareByInspect"),eql:i(()=>ku,"eql"),events:i(()=>Mr,"events"),expectTypes:i(()=>su,"expectTypes"),flag:i(()=>z,"flag"),getActual:i(()=>xr,"getActual"),getMessage:i(()=>Ls,"getMessage"),getName:i(()=>Cr,"getName"),getOperator:i(()=>Qs,"getOperator"),getOwnEnumerableProperties:i(()=>Zs,"getOwnEnumerableProperties"),getOwnEnumerablePropertySymbols:i(()=>Xs,"getOwnEnumerablePropertySymbols"),getPathInfo:i(()=>zs,"getPathInfo"),hasProperty:i(()=>kr,"hasProperty"),inspect:i(()=>H,"inspect"),isNaN:i(()=>Tr,"isNaN"),isNumeric:i(()=>ge,"isNumeric"),isProxyEnabled:i(()=>xn,"isProxyEnabled"),isRegExp:i(()=>Sr,"isRegExp"),objDisplay:i(()=>Ot,"objDisplay"),overwriteChainableMethod:i(()=>Ys,"overwriteChainableMethod"),overwriteMethod:i(()=>Gs,"overwriteMethod"),overwriteProperty:i(()=>Hs,"overwriteProperty"),proxify:i(()=>Kt,"proxify"),test:i(()=>Fs,"test"),transferFlags:i(()=>Xe,"transferFlags"),type:i(()=>re,"type")});var qe={};js(qe,{compatibleConstructor:i(()=>Ql,"compatibleConstructor"),compatibleInstance:i(()=>Zl,"compatibleInstance"),compatibleMessage:i(()=>eu,"compatibleMessage"),getConstructorName:i(()=>tu,"getConstructorName"),getMessage:i(()=>nu,"getMessage")});function vr(e){return e instanceof Error||Object.prototype.toString.call(e)==="[object Error]"}i(vr,"isErrorInstance");x(vr,"isErrorInstance");function Xl(e){return Object.prototype.toString.call(e)==="[object RegExp]"}i(Xl,"isRegExp");x(Xl,"isRegExp");function Zl(e,t){return vr(t)&&e===t}i(Zl,"compatibleInstance");x(Zl,"compatibleInstance");function Ql(e,t){return vr(t)?e.constructor===t.constructor||e instanceof t.constructor:(typeof t=="object"||typeof t=="function")&&t.prototype?e.constructor===t||e instanceof t:false}i(Ql,"compatibleConstructor");x(Ql,"compatibleConstructor");function eu(e,t){let n=typeof e=="string"?e:e.message;return Xl(t)?t.test(n):typeof t=="string"?n.indexOf(t)!==-1:false}i(eu,"compatibleMessage");x(eu,"compatibleMessage");function tu(e){let t=e;return vr(e)?t=e.constructor.name:typeof e=="function"&&(t=e.name,t===""&&(t=new e().name||t)),t}i(tu,"getConstructorName");x(tu,"getConstructorName");function nu(e){let t="";return e&&e.message?t=e.message:typeof e=="string"&&(t=e),t}i(nu,"getMessage");x(nu,"getMessage");function z(e,t,n){let r=e.__flags||(e.__flags=Object.create(null));if(arguments.length===3)r[t]=n;else return r[t]}i(z,"flag");x(z,"flag");function Fs(e,t){let n=z(e,"negate"),r=t[0];return n?!r:r}i(Fs,"test");x(Fs,"test");function re(e){if(typeof e>"u")return "undefined";if(e===null)return "null";let t=e[Symbol.toStringTag];return typeof t=="string"?t:Object.prototype.toString.call(e).slice(8,-1)}i(re,"type");x(re,"type");var jg="captureStackTrace"in Error,ru=class ou extends Error{static{i(this,"_AssertionError");}constructor(t="Unspecified AssertionError",n,r){super(t),Yl(this,"message"),this.message=t,jg&&Error.captureStackTrace(this,r||ou);for(let o in n)o in this||(this[o]=n[o]);}get name(){return "AssertionError"}get ok(){return false}toJSON(t){return {...this,name:this.name,message:this.message,ok:false,stack:t!==false?this.stack:void 0}}};x(ru,"AssertionError");var G=ru;function su(e,t){let n=z(e,"message"),r=z(e,"ssfi");n=n?n+": ":"",e=z(e,"object"),t=t.map(function(a){return a.toLowerCase()}),t.sort();let o=t.map(function(a,l){let c=~["a","e","i","o","u"].indexOf(a.charAt(0))?"an":"a";return (t.length>1&&l===t.length-1?"or ":"")+c+" "+a}).join(", "),s=re(e).toLowerCase();if(!t.some(function(a){return s===a}))throw new G(n+"object tested must be "+o+", but "+s+" given",void 0,r)}i(su,"expectTypes");x(su,"expectTypes");function xr(e,t){return t.length>4?t[4]:e._obj}i(xr,"getActual");x(xr,"getActual");var ql={bold:["1","22"],dim:["2","22"],italic:["3","23"],underline:["4","24"],inverse:["7","27"],hidden:["8","28"],strike:["9","29"],black:["30","39"],red:["31","39"],green:["32","39"],yellow:["33","39"],blue:["34","39"],magenta:["35","39"],cyan:["36","39"],white:["37","39"],brightblack:["30;1","39"],brightred:["31;1","39"],brightgreen:["32;1","39"],brightyellow:["33;1","39"],brightblue:["34;1","39"],brightmagenta:["35;1","39"],brightcyan:["36;1","39"],brightwhite:["37;1","39"],grey:["90","39"]},Fg={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},Wt="\u2026";function iu(e,t){let n=ql[Fg[t]]||ql[t]||"";return n?`\x1B[${n[0]}m${String(e)}\x1B[${n[1]}m`:String(e)}i(iu,"colorise");x(iu,"colorise");function au({showHidden:e=false,depth:t=2,colors:n=false,customInspect:r=true,showProxy:o=false,maxArrayLength:s=1/0,breakLength:a=1/0,seen:l=[],truncate:c=1/0,stylize:u=String}={},f){let h={showHidden:!!e,depth:Number(t),colors:!!n,customInspect:!!r,showProxy:!!o,maxArrayLength:Number(s),breakLength:Number(a),truncate:Number(c),seen:l,inspect:f,stylize:u};return h.colors&&(h.stylize=iu),h}i(au,"normaliseOptions");x(au,"normaliseOptions");function cu(e){return e>="\uD800"&&e<="\uDBFF"}i(cu,"isHighSurrogate");x(cu,"isHighSurrogate");function gt(e,t,n=Wt){e=String(e);let r=n.length,o=e.length;if(r>t&&o>r)return n;if(o>t&&o>r){let s=t-r;return s>0&&cu(e[s-1])&&(s=s-1),`${e.slice(0,s)}${n}`}return e}i(gt,"truncate");x(gt,"truncate");function He(e,t,n,r=", "){n=n||t.inspect;let o=e.length;if(o===0)return "";let s=t.truncate,a="",l="",c="";for(let u=0;u<o;u+=1){let f=u+1===e.length,h=u+2===e.length;c=`${Wt}(${e.length-u})`;let d=e[u];t.truncate=s-a.length-(f?0:r.length);let p=l||n(d,t)+(f?"":r),g=a.length+p.length,m=g+c.length;if(f&&g>s&&a.length+c.length<=s||!f&&!h&&m>s||(l=f?"":n(e[u+1],t)+(h?"":r),!f&&h&&m>s&&g+l.length>s))break;if(a+=p,!f&&!h&&g+l.length>=s){c=`${Wt}(${e.length-u-1})`;break}c="";}return `${a}${c}`}i(He,"inspectList");x(He,"inspectList");function lu(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}i(lu,"quoteComplexKey");x(lu,"quoteComplexKey");function Vt([e,t],n){return n.truncate-=2,typeof e=="string"?e=lu(e):typeof e!="number"&&(e=`[${n.inspect(e,n)}]`),n.truncate-=e.length,t=n.inspect(t,n),`${e}: ${t}`}i(Vt,"inspectProperty");x(Vt,"inspectProperty");function uu(e,t){let n=Object.keys(e).slice(e.length);if(!e.length&&!n.length)return "[]";t.truncate-=4;let r=He(e,t);t.truncate-=r.length;let o="";return n.length&&(o=He(n.map(s=>[s,e[s]]),t,Vt)),`[ ${r}${o?`, ${o}`:""} ]`}i(uu,"inspectArray");x(uu,"inspectArray");var Dg=x(e=>typeof Buffer=="function"&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name,"getArrayName");function st(e,t){let n=Dg(e);t.truncate-=n.length+4;let r=Object.keys(e).slice(e.length);if(!e.length&&!r.length)return `${n}[]`;let o="";for(let a=0;a<e.length;a++){let l=`${t.stylize(gt(e[a],t.truncate),"number")}${a===e.length-1?"":", "}`;if(t.truncate-=l.length,e[a]!==e.length&&t.truncate<=3){o+=`${Wt}(${e.length-e[a]+1})`;break}o+=l;}let s="";return r.length&&(s=He(r.map(a=>[a,e[a]]),t,Vt)),`${n}[ ${o}${s?`, ${s}`:""} ]`}i(st,"inspectTypedArray");x(st,"inspectTypedArray");function fu(e,t){let n=e.toJSON();if(n===null)return "Invalid Date";let r=n.split("T"),o=r[0];return t.stylize(`${o}T${gt(r[1],t.truncate-o.length-1)}`,"date")}i(fu,"inspectDate");x(fu,"inspectDate");function Ss(e,t){let n=e[Symbol.toStringTag]||"Function",r=e.name;return r?t.stylize(`[${n} ${gt(r,t.truncate-11)}]`,"special"):t.stylize(`[${n}]`,"special")}i(Ss,"inspectFunction");x(Ss,"inspectFunction");function hu([e,t],n){return n.truncate-=4,e=n.inspect(e,n),n.truncate-=e.length,t=n.inspect(t,n),`${e} => ${t}`}i(hu,"inspectMapEntry");x(hu,"inspectMapEntry");function pu(e){let t=[];return e.forEach((n,r)=>{t.push([r,n]);}),t}i(pu,"mapToEntries");x(pu,"mapToEntries");function du(e,t){return e.size===0?"Map{}":(t.truncate-=7,`Map{ ${He(pu(e),t,hu)} }`)}i(du,"inspectMap");x(du,"inspectMap");var Lg=Number.isNaN||(e=>e!==e);function Es(e,t){return Lg(e)?t.stylize("NaN","number"):e===1/0?t.stylize("Infinity","number"):e===-1/0?t.stylize("-Infinity","number"):e===0?t.stylize(1/e===1/0?"+0":"-0","number"):t.stylize(gt(String(e),t.truncate),"number")}i(Es,"inspectNumber");x(Es,"inspectNumber");function vs(e,t){let n=gt(e.toString(),t.truncate-1);return n!==Wt&&(n+="n"),t.stylize(n,"bigint")}i(vs,"inspectBigInt");x(vs,"inspectBigInt");function mu(e,t){let n=e.toString().split("/")[2],r=t.truncate-(2+n.length),o=e.source;return t.stylize(`/${gt(o,r)}/${n}`,"regexp")}i(mu,"inspectRegExp");x(mu,"inspectRegExp");function gu(e){let t=[];return e.forEach(n=>{t.push(n);}),t}i(gu,"arrayFromSet");x(gu,"arrayFromSet");function yu(e,t){return e.size===0?"Set{}":(t.truncate-=7,`Set{ ${He(gu(e),t)} }`)}i(yu,"inspectSet");x(yu,"inspectSet");var Ul=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),Bg={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},qg=16;function wu(e){return Bg[e]||`\\u${`0000${e.charCodeAt(0).toString(qg)}`.slice(-4)}`}i(wu,"escape");x(wu,"escape");function xs(e,t){return Ul.test(e)&&(e=e.replace(Ul,wu)),t.stylize(`'${gt(e,t.truncate-2)}'`,"string")}i(xs,"inspectString");x(xs,"inspectString");function ks(e){return "description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString()}i(ks,"inspectSymbol");x(ks,"inspectSymbol");var zg=x(()=>"Promise{\u2026}","getPromiseValue"),Wg=zg;function Tn(e,t){let n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[];if(n.length===0&&r.length===0)return "{}";if(t.truncate-=4,t.seen=t.seen||[],t.seen.includes(e))return "[Circular]";t.seen.push(e);let o=He(n.map(l=>[l,e[l]]),t,Vt),s=He(r.map(l=>[l,e[l]]),t,Vt);t.seen.pop();let a="";return o&&s&&(a=", "),`{ ${o}${a}${s} }`}i(Tn,"inspectObject");x(Tn,"inspectObject");var ws=typeof Symbol<"u"&&Symbol.toStringTag?Symbol.toStringTag:false;function bu(e,t){let n="";return ws&&ws in e&&(n=e[ws]),n=n||e.constructor.name,(!n||n==="_class")&&(n="<Anonymous Class>"),t.truncate-=n.length,`${n}${Tn(e,t)}`}i(bu,"inspectClass");x(bu,"inspectClass");function Tu(e,t){return e.length===0?"Arguments[]":(t.truncate-=13,`Arguments[ ${He(e,t)} ]`)}i(Tu,"inspectArguments");x(Tu,"inspectArguments");var Vg=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function Su(e,t){let n=Object.getOwnPropertyNames(e).filter(a=>Vg.indexOf(a)===-1),r=e.name;t.truncate-=r.length;let o="";if(typeof e.message=="string"?o=gt(e.message,t.truncate):n.unshift("message"),o=o?`: ${o}`:"",t.truncate-=o.length+5,t.seen=t.seen||[],t.seen.includes(e))return "[Circular]";t.seen.push(e);let s=He(n.map(a=>[a,e[a]]),t,Vt);return `${r}${o}${s?` { ${s} }`:""}`}i(Su,"inspectObject2");x(Su,"inspectObject");function Eu([e,t],n){return n.truncate-=3,t?`${n.stylize(String(e),"yellow")}=${n.stylize(`"${t}"`,"string")}`:`${n.stylize(String(e),"yellow")}`}i(Eu,"inspectAttribute");x(Eu,"inspectAttribute");function yr(e,t){return He(e,t,vu,`
82
+ `)}i(yr,"inspectNodeCollection");x(yr,"inspectNodeCollection");function vu(e,t){switch(e.nodeType){case 1:return Ds(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}i(vu,"inspectNode");x(vu,"inspectNode");function Ds(e,t){let n=e.getAttributeNames(),r=e.tagName.toLowerCase(),o=t.stylize(`<${r}`,"special"),s=t.stylize(">","special"),a=t.stylize(`</${r}>`,"special");t.truncate-=r.length*2+5;let l="";n.length>0&&(l+=" ",l+=He(n.map(f=>[f,e.getAttribute(f)]),t,Eu," ")),t.truncate-=l.length;let c=t.truncate,u=yr(e.children,t);return u&&u.length>c&&(u=`${Wt}(${e.children.length})`),`${o}${l}${s}${u}${a}`}i(Ds,"inspectHTML");x(Ds,"inspectHTML");var Kg=typeof Symbol=="function"&&typeof Symbol.for=="function",bs=Kg?Symbol.for("chai/inspect"):"@@chai/inspect",Ts=Symbol.for("nodejs.util.inspect.custom"),zl=new WeakMap,Wl={},Vl={undefined:x((e,t)=>t.stylize("undefined","undefined"),"undefined"),null:x((e,t)=>t.stylize("null","null"),"null"),boolean:x((e,t)=>t.stylize(String(e),"boolean"),"boolean"),Boolean:x((e,t)=>t.stylize(String(e),"boolean"),"Boolean"),number:Es,Number:Es,bigint:vs,BigInt:vs,string:xs,String:xs,function:Ss,Function:Ss,symbol:ks,Symbol:ks,Array:uu,Date:fu,Map:du,Set:yu,RegExp:mu,Promise:Wg,WeakSet:x((e,t)=>t.stylize("WeakSet{\u2026}","special"),"WeakSet"),WeakMap:x((e,t)=>t.stylize("WeakMap{\u2026}","special"),"WeakMap"),Arguments:Tu,Int8Array:st,Uint8Array:st,Uint8ClampedArray:st,Int16Array:st,Uint16Array:st,Int32Array:st,Uint32Array:st,Float32Array:st,Float64Array:st,Generator:x(()=>"","Generator"),DataView:x(()=>"","DataView"),ArrayBuffer:x(()=>"","ArrayBuffer"),Error:Su,HTMLCollection:yr,NodeList:yr},Hg=x((e,t,n,r)=>bs in e&&typeof e[bs]=="function"?e[bs](t):Ts in e&&typeof e[Ts]=="function"?e[Ts](t.depth,t,r):"inspect"in e&&typeof e.inspect=="function"?e.inspect(t.depth,t):"constructor"in e&&zl.has(e.constructor)?zl.get(e.constructor)(e,t):Wl[n]?Wl[n](e,t):"","inspectCustom"),Gg=Object.prototype.toString;function Sn(e,t={}){let n=au(t,Sn),{customInspect:r}=n,o=e===null?"null":typeof e;if(o==="object"&&(o=Gg.call(e).slice(8,-1)),o in Vl)return Vl[o](e,n);if(r&&e){let a=Hg(e,n,o,Sn);if(a)return typeof a=="string"?a:Sn(a,n)}let s=e?Object.getPrototypeOf(e):false;return s===Object.prototype||s===null?Tn(e,n):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?Ds(e,n):"constructor"in e?e.constructor!==Object?bu(e,n):Tn(e,n):e===Object(e)?Tn(e,n):n.stylize(String(e),o)}i(Sn,"inspect");x(Sn,"inspect");var ve={includeStack:false,showDiff:true,truncateThreshold:40,useProxy:true,proxyExcludedKeys:["then","catch","inspect","toJSON"],deepEqual:null};function H(e,t,n,r){let o={colors:r,depth:typeof n>"u"?2:n,showHidden:t,truncate:ve.truncateThreshold?ve.truncateThreshold:1/0};return Sn(e,o)}i(H,"inspect2");x(H,"inspect");function Ot(e){let t=H(e),n=Object.prototype.toString.call(e);if(ve.truncateThreshold&&t.length>=ve.truncateThreshold){if(n==="[object Function]")return !e.name||e.name===""?"[Function]":"[Function: "+e.name+"]";if(n==="[object Array]")return "[ Array("+e.length+") ]";if(n==="[object Object]"){let r=Object.keys(e);return "{ Object ("+(r.length>2?r.splice(0,2).join(", ")+", ...":r.join(", "))+") }"}else return t}else return t}i(Ot,"objDisplay");x(Ot,"objDisplay");function Ls(e,t){let n=z(e,"negate"),r=z(e,"object"),o=t[3],s=xr(e,t),a=n?t[2]:t[1],l=z(e,"message");return typeof a=="function"&&(a=a()),a=a||"",a=a.replace(/#\{this\}/g,function(){return Ot(r)}).replace(/#\{act\}/g,function(){return Ot(s)}).replace(/#\{exp\}/g,function(){return Ot(o)}),l?l+": "+a:a}i(Ls,"getMessage2");x(Ls,"getMessage");function Xe(e,t,n){let r=e.__flags||(e.__flags=Object.create(null));t.__flags||(t.__flags=Object.create(null)),n=arguments.length===3?n:true;for(let o in r)(n||o!=="object"&&o!=="ssfi"&&o!=="lockSsfi"&&o!="message")&&(t.__flags[o]=r[o]);}i(Xe,"transferFlags");x(Xe,"transferFlags");function Ms(e){if(typeof e>"u")return "undefined";if(e===null)return "null";let t=e[Symbol.toStringTag];return typeof t=="string"?t:Object.prototype.toString.call(e).slice(8,-1)}i(Ms,"type2");x(Ms,"type");function Bs(){this._key="chai/deep-eql__"+Math.random()+Date.now();}i(Bs,"FakeMap");x(Bs,"FakeMap");Bs.prototype={get:x(i(function(t){return t[this._key]},"get"),"get"),set:x(i(function(t,n){Object.isExtensible(t)&&Object.defineProperty(t,this._key,{value:n,configurable:true});},"set"),"set")};var xu=typeof WeakMap=="function"?WeakMap:Bs;function Cs(e,t,n){if(!n||It(e)||It(t))return null;var r=n.get(e);if(r){var o=r.get(t);if(typeof o=="boolean")return o}return null}i(Cs,"memoizeCompare");x(Cs,"memoizeCompare");function bn(e,t,n,r){if(!(!n||It(e)||It(t))){var o=n.get(e);o?o.set(t,r):(o=new xu,o.set(t,r),n.set(e,o));}}i(bn,"memoizeSet");x(bn,"memoizeSet");var ku=vn;function vn(e,t,n){if(n&&n.comparator)return _s(e,t,n);var r=qs(e,t);return r!==null?r:_s(e,t,n)}i(vn,"deepEqual");x(vn,"deepEqual");function qs(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t?true:It(e)||It(t)?false:null}i(qs,"simpleEqual");x(qs,"simpleEqual");function _s(e,t,n){n=n||{},n.memoize=n.memoize===false?false:n.memoize||new xu;var r=n&&n.comparator,o=Cs(e,t,n.memoize);if(o!==null)return o;var s=Cs(t,e,n.memoize);if(s!==null)return s;if(r){var a=r(e,t);if(a===false||a===true)return bn(e,t,n.memoize,a),a;var l=qs(e,t);if(l!==null)return l}var c=Ms(e);if(c!==Ms(t))return bn(e,t,n.memoize,false),false;bn(e,t,n.memoize,true);var u=Mu(e,t,c,n);return bn(e,t,n.memoize,u),u}i(_s,"extensiveDeepEqual");x(_s,"extensiveDeepEqual");function Mu(e,t,n,r){switch(n){case "String":case "Number":case "Boolean":case "Date":return vn(e.valueOf(),t.valueOf());case "Promise":case "Symbol":case "function":case "WeakMap":case "WeakSet":return e===t;case "Error":return Us(e,t,["name","message","code"],r);case "Arguments":case "Int8Array":case "Uint8Array":case "Uint8ClampedArray":case "Int16Array":case "Uint16Array":case "Int32Array":case "Uint32Array":case "Float32Array":case "Float64Array":case "Array":return Tt(e,t,r);case "RegExp":return Cu(e,t);case "Generator":return _u(e,t,r);case "DataView":return Tt(new Uint8Array(e.buffer),new Uint8Array(t.buffer),r);case "ArrayBuffer":return Tt(new Uint8Array(e),new Uint8Array(t),r);case "Set":return Os(e,t,r);case "Map":return Os(e,t,r);case "Temporal.PlainDate":case "Temporal.PlainTime":case "Temporal.PlainDateTime":case "Temporal.Instant":case "Temporal.ZonedDateTime":case "Temporal.PlainYearMonth":case "Temporal.PlainMonthDay":return e.equals(t);case "Temporal.Duration":return e.total("nanoseconds")===t.total("nanoseconds");case "Temporal.TimeZone":case "Temporal.Calendar":return e.toString()===t.toString();default:return Iu(e,t,r)}}i(Mu,"extensiveDeepEqualByType");x(Mu,"extensiveDeepEqualByType");function Cu(e,t){return e.toString()===t.toString()}i(Cu,"regexpEqual");x(Cu,"regexpEqual");function Os(e,t,n){try{if(e.size!==t.size)return false;if(e.size===0)return true}catch{return false}var r=[],o=[];return e.forEach(x(i(function(a,l){r.push([a,l]);},"gatherEntries"),"gatherEntries")),t.forEach(x(i(function(a,l){o.push([a,l]);},"gatherEntries"),"gatherEntries")),Tt(r.sort(),o.sort(),n)}i(Os,"entriesEqual");x(Os,"entriesEqual");function Tt(e,t,n){var r=e.length;if(r!==t.length)return false;if(r===0)return true;for(var o=-1;++o<r;)if(vn(e[o],t[o],n)===false)return false;return true}i(Tt,"iterableEqual");x(Tt,"iterableEqual");function _u(e,t,n){return Tt(wr(e),wr(t),n)}i(_u,"generatorEqual");x(_u,"generatorEqual");function Ou(e){return typeof Symbol<"u"&&typeof e=="object"&&typeof Symbol.iterator<"u"&&typeof e[Symbol.iterator]=="function"}i(Ou,"hasIteratorFunction");x(Ou,"hasIteratorFunction");function Is(e){if(Ou(e))try{return wr(e[Symbol.iterator]())}catch{return []}return []}i(Is,"getIteratorEntries");x(Is,"getIteratorEntries");function wr(e){for(var t=e.next(),n=[t.value];t.done===false;)t=e.next(),n.push(t.value);return n}i(wr,"getGeneratorEntries");x(wr,"getGeneratorEntries");function As(e){var t=[];for(var n in e)t.push(n);return t}i(As,"getEnumerableKeys");x(As,"getEnumerableKeys");function $s(e){for(var t=[],n=Object.getOwnPropertySymbols(e),r=0;r<n.length;r+=1){var o=n[r];Object.getOwnPropertyDescriptor(e,o).enumerable&&t.push(o);}return t}i($s,"getEnumerableSymbols");x($s,"getEnumerableSymbols");function Us(e,t,n,r){var o=n.length;if(o===0)return true;for(var s=0;s<o;s+=1)if(vn(e[n[s]],t[n[s]],r)===false)return false;return true}i(Us,"keysEqual");x(Us,"keysEqual");function Iu(e,t,n){var r=As(e),o=As(t),s=$s(e),a=$s(t);if(r=r.concat(s),o=o.concat(a),r.length&&r.length===o.length)return Tt(Ns(r).sort(),Ns(o).sort())===false?false:Us(e,t,r,n);var l=Is(e),c=Is(t);return l.length&&l.length===c.length?(l.sort(),c.sort(),Tt(l,c,n)):r.length===0&&l.length===0&&o.length===0&&c.length===0}i(Iu,"objectEqual");x(Iu,"objectEqual");function It(e){return e===null||typeof e!="object"}i(It,"isPrimitive");x(It,"isPrimitive");function Ns(e){return e.map(x(i(function(n){return typeof n=="symbol"?n.toString():n},"mapSymbol"),"mapSymbol"))}i(Ns,"mapSymbols");x(Ns,"mapSymbols");function kr(e,t){return typeof e>"u"||e===null?false:t in Object(e)}i(kr,"hasProperty");x(kr,"hasProperty");function Au(e){return e.replace(/([^\\])\[/g,"$1.[").match(/(\\\.|[^.]+?)+/g).map(r=>{if(r==="constructor"||r==="__proto__"||r==="prototype")return {};let s=/^\[(\d+)\]$/.exec(r),a=null;return s?a={i:parseFloat(s[1])}:a={p:r.replace(/\\([.[\]])/g,"$1")},a})}i(Au,"parsePath");x(Au,"parsePath");function Ps(e,t,n){let r=e,o=null;n=typeof n>"u"?t.length:n;for(let s=0;s<n;s++){let a=t[s];r&&(typeof a.p>"u"?r=r[a.i]:r=r[a.p],s===n-1&&(o=r));}return o}i(Ps,"internalGetPathValue");x(Ps,"internalGetPathValue");function zs(e,t){let n=Au(t),r=n[n.length-1],o={parent:n.length>1?Ps(e,n,n.length-1):e,name:r.p||r.i,value:Ps(e,n)};return o.exists=kr(o.parent,o.name),o}i(zs,"getPathInfo");x(zs,"getPathInfo");var $u=class Nu{static{i(this,"_Assertion");}constructor(t,n,r,o){return Yl(this,"__flags",{}),z(this,"ssfi",r||Nu),z(this,"lockSsfi",o),z(this,"object",t),z(this,"message",n),z(this,"eql",ve.deepEqual||ku),Kt(this)}static get includeStack(){return console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),ve.includeStack}static set includeStack(t){console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),ve.includeStack=t;}static get showDiff(){return console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),ve.showDiff}static set showDiff(t){console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),ve.showDiff=t;}static addProperty(t,n){Vs(this.prototype,t,n);}static addMethod(t,n){Ks(this.prototype,t,n);}static addChainableMethod(t,n,r){Js(this.prototype,t,n,r);}static overwriteProperty(t,n){Hs(this.prototype,t,n);}static overwriteMethod(t,n){Gs(this.prototype,t,n);}static overwriteChainableMethod(t,n,r){Ys(this.prototype,t,n,r);}assert(t,n,r,o,s,a){let l=Fs(this,arguments);if(a!==false&&(a=true),o===void 0&&s===void 0&&(a=false),ve.showDiff!==true&&(a=false),!l){n=Ls(this,arguments);let u={actual:xr(this,arguments),expected:o,showDiff:a},f=Qs(this,arguments);throw f&&(u.operator=f),new G(n,u,ve.includeStack?this.assert:z(this,"ssfi"))}}get _obj(){return z(this,"object")}set _obj(t){z(this,"object",t);}};x($u,"Assertion");var w=$u,Mr=new EventTarget,Pu=class extends Event{static{i(this,"_PluginEvent");}constructor(t,n,r){super(t),this.name=String(n),this.fn=r;}};x(Pu,"PluginEvent");var Ws=Pu;function xn(){return ve.useProxy&&typeof Proxy<"u"&&typeof Reflect<"u"}i(xn,"isProxyEnabled");x(xn,"isProxyEnabled");function Vs(e,t,n){n=n===void 0?function(){}:n,Object.defineProperty(e,t,{get:x(i(function r(){!xn()&&!z(this,"lockSsfi")&&z(this,"ssfi",r);let o=n.call(this);if(o!==void 0)return o;let s=new w;return Xe(this,s),s},"propertyGetter"),"propertyGetter"),configurable:true}),Mr.dispatchEvent(new Ws("addProperty",t,n));}i(Vs,"addProperty");x(Vs,"addProperty");var Jg=Object.getOwnPropertyDescriptor(function(){},"length");function kn(e,t,n){return Jg.configurable&&Object.defineProperty(e,"length",{get:x(function(){throw Error(n?"Invalid Chai property: "+t+'.length. Due to a compatibility issue, "length" cannot directly follow "'+t+'". Use "'+t+'.lengthOf" instead.':"Invalid Chai property: "+t+'.length. See docs for proper usage of "'+t+'".')},"get")}),e}i(kn,"addLengthGuard");x(kn,"addLengthGuard");function Ru(e){let t=Object.getOwnPropertyNames(e);function n(o){t.indexOf(o)===-1&&t.push(o);}i(n,"addProperty2"),x(n,"addProperty");let r=Object.getPrototypeOf(e);for(;r!==null;)Object.getOwnPropertyNames(r).forEach(n),r=Object.getPrototypeOf(r);return t}i(Ru,"getProperties");x(Ru,"getProperties");var Kl=["__flags","__methods","_obj","assert"];function Kt(e,t){return xn()?new Proxy(e,{get:x(i(function n(r,o){if(typeof o=="string"&&ve.proxyExcludedKeys.indexOf(o)===-1&&!Reflect.has(r,o)){if(t)throw Error("Invalid Chai property: "+t+"."+o+'. See docs for proper usage of "'+t+'".');let s=null,a=4;throw Ru(r).forEach(function(l){if(!Object.prototype.hasOwnProperty(l)&&Kl.indexOf(l)===-1){let c=ju(o,l,a);c<a&&(s=l,a=c);}}),Error(s!==null?"Invalid Chai property: "+o+'. Did you mean "'+s+'"?':"Invalid Chai property: "+o)}return Kl.indexOf(o)===-1&&!z(r,"lockSsfi")&&z(r,"ssfi",n),Reflect.get(r,o)},"proxyGetter"),"proxyGetter")}):e}i(Kt,"proxify");x(Kt,"proxify");function ju(e,t,n){if(Math.abs(e.length-t.length)>=n)return n;let r=[];for(let o=0;o<=e.length;o++)r[o]=Array(t.length+1).fill(0),r[o][0]=o;for(let o=0;o<t.length;o++)r[0][o]=o;for(let o=1;o<=e.length;o++){let s=e.charCodeAt(o-1);for(let a=1;a<=t.length;a++){if(Math.abs(o-a)>=n){r[o][a]=n;continue}r[o][a]=Math.min(r[o-1][a]+1,r[o][a-1]+1,r[o-1][a-1]+(s===t.charCodeAt(a-1)?0:1));}}return r[e.length][t.length]}i(ju,"stringDistanceCapped");x(ju,"stringDistanceCapped");function Ks(e,t,n){let r=x(function(){z(this,"lockSsfi")||z(this,"ssfi",r);let o=n.apply(this,arguments);if(o!==void 0)return o;let s=new w;return Xe(this,s),s},"methodWrapper");kn(r,t,false),e[t]=Kt(r,t),Mr.dispatchEvent(new Ws("addMethod",t,n));}i(Ks,"addMethod");x(Ks,"addMethod");function Hs(e,t,n){let r=Object.getOwnPropertyDescriptor(e,t),o=x(function(){},"_super");r&&typeof r.get=="function"&&(o=r.get),Object.defineProperty(e,t,{get:x(i(function s(){!xn()&&!z(this,"lockSsfi")&&z(this,"ssfi",s);let a=z(this,"lockSsfi");z(this,"lockSsfi",true);let l=n(o).call(this);if(z(this,"lockSsfi",a),l!==void 0)return l;let c=new w;return Xe(this,c),c},"overwritingPropertyGetter"),"overwritingPropertyGetter"),configurable:true});}i(Hs,"overwriteProperty");x(Hs,"overwriteProperty");function Gs(e,t,n){let r=e[t],o=x(function(){throw new Error(t+" is not a function")},"_super");r&&typeof r=="function"&&(o=r);let s=x(function(){z(this,"lockSsfi")||z(this,"ssfi",s);let a=z(this,"lockSsfi");z(this,"lockSsfi",true);let l=n(o).apply(this,arguments);if(z(this,"lockSsfi",a),l!==void 0)return l;let c=new w;return Xe(this,c),c},"overwritingMethodWrapper");kn(s,t,false),e[t]=Kt(s,t);}i(Gs,"overwriteMethod");x(Gs,"overwriteMethod");var Yg=typeof Object.setPrototypeOf=="function",Hl=x(function(){},"testFn"),Xg=Object.getOwnPropertyNames(Hl).filter(function(e){let t=Object.getOwnPropertyDescriptor(Hl,e);return typeof t!="object"?true:!t.configurable}),Zg=Function.prototype.call,Qg=Function.prototype.apply,Fu=class extends Ws{static{i(this,"_PluginAddChainableMethodEvent");}constructor(t,n,r,o){super(t,n,r),this.chainingBehavior=o;}};x(Fu,"PluginAddChainableMethodEvent");var ey=Fu;function Js(e,t,n,r){typeof r!="function"&&(r=x(function(){},"chainingBehavior"));let o={method:n,chainingBehavior:r};e.__methods||(e.__methods={}),e.__methods[t]=o,Object.defineProperty(e,t,{get:x(i(function(){o.chainingBehavior.call(this);let a=x(function(){z(this,"lockSsfi")||z(this,"ssfi",a);let l=o.method.apply(this,arguments);if(l!==void 0)return l;let c=new w;return Xe(this,c),c},"chainableMethodWrapper");if(kn(a,t,true),Yg){let l=Object.create(this);l.call=Zg,l.apply=Qg,Object.setPrototypeOf(a,l);}else Object.getOwnPropertyNames(e).forEach(function(c){if(Xg.indexOf(c)!==-1)return;let u=Object.getOwnPropertyDescriptor(e,c);Object.defineProperty(a,c,u);});return Xe(this,a),Kt(a)},"chainableMethodGetter"),"chainableMethodGetter"),configurable:true}),Mr.dispatchEvent(new ey("addChainableMethod",t,n,r));}i(Js,"addChainableMethod");x(Js,"addChainableMethod");function Ys(e,t,n,r){let o=e.__methods[t],s=o.chainingBehavior;o.chainingBehavior=x(i(function(){let c=r(s).call(this);if(c!==void 0)return c;let u=new w;return Xe(this,u),u},"overwritingChainableMethodGetter"),"overwritingChainableMethodGetter");let a=o.method;o.method=x(i(function(){let c=n(a).apply(this,arguments);if(c!==void 0)return c;let u=new w;return Xe(this,u),u},"overwritingChainableMethodWrapper"),"overwritingChainableMethodWrapper");}i(Ys,"overwriteChainableMethod");x(Ys,"overwriteChainableMethod");function br(e,t){return H(e)<H(t)?-1:1}i(br,"compareByInspect");x(br,"compareByInspect");function Xs(e){return typeof Object.getOwnPropertySymbols!="function"?[]:Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})}i(Xs,"getOwnEnumerablePropertySymbols");x(Xs,"getOwnEnumerablePropertySymbols");function Zs(e){return Object.keys(e).concat(Xs(e))}i(Zs,"getOwnEnumerableProperties");x(Zs,"getOwnEnumerableProperties");var Tr=Number.isNaN;function Du(e){let t=re(e);return ["Array","Object","Function"].indexOf(t)!==-1}i(Du,"isObjectType");x(Du,"isObjectType");function Qs(e,t){let n=z(e,"operator"),r=z(e,"negate"),o=t[3],s=r?t[2]:t[1];if(n)return n;if(typeof s=="function"&&(s=s()),s=s||"",!s||/\shave\s/.test(s))return;let a=Du(o);return /\snot\s/.test(s)?a?"notDeepStrictEqual":"notStrictEqual":a?"deepStrictEqual":"strictEqual"}i(Qs,"getOperator");x(Qs,"getOperator");function Cr(e){return e.name}i(Cr,"getName");x(Cr,"getName");function Sr(e){return Object.prototype.toString.call(e)==="[object RegExp]"}i(Sr,"isRegExp2");x(Sr,"isRegExp");function ge(e){return ["Number","BigInt"].includes(re(e))}i(ge,"isNumeric");x(ge,"isNumeric");var{flag:S}=Ke;["to","be","been","is","and","has","have","with","that","which","at","of","same","but","does","still","also"].forEach(function(e){w.addProperty(e);});w.addProperty("not",function(){S(this,"negate",true);});w.addProperty("deep",function(){S(this,"deep",true);});w.addProperty("nested",function(){S(this,"nested",true);});w.addProperty("own",function(){S(this,"own",true);});w.addProperty("ordered",function(){S(this,"ordered",true);});w.addProperty("any",function(){S(this,"any",true),S(this,"all",false);});w.addProperty("all",function(){S(this,"all",true),S(this,"any",false);});var Gl={function:["function","asyncfunction","generatorfunction","asyncgeneratorfunction"],asyncfunction:["asyncfunction","asyncgeneratorfunction"],generatorfunction:["generatorfunction","asyncgeneratorfunction"],asyncgeneratorfunction:["asyncgeneratorfunction"]};function ei(e,t){t&&S(this,"message",t),e=e.toLowerCase();let n=S(this,"object"),r=~["a","e","i","o","u"].indexOf(e.charAt(0))?"an ":"a ",o=re(n).toLowerCase();Gl.function.includes(e)?this.assert(Gl[e].includes(o),"expected #{this} to be "+r+e,"expected #{this} not to be "+r+e):this.assert(e===o,"expected #{this} to be "+r+e,"expected #{this} not to be "+r+e);}i(ei,"an");x(ei,"an");w.addChainableMethod("an",ei);w.addChainableMethod("a",ei);function Lu(e,t){return Tr(e)&&Tr(t)||e===t}i(Lu,"SameValueZero");x(Lu,"SameValueZero");function Mn(){S(this,"contains",true);}i(Mn,"includeChainingBehavior");x(Mn,"includeChainingBehavior");function Cn(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=re(n).toLowerCase(),o=S(this,"message"),s=S(this,"negate"),a=S(this,"ssfi"),l=S(this,"deep"),c=l?"deep ":"",u=l?S(this,"eql"):Lu;o=o?o+": ":"";let f=false;switch(r){case "string":f=n.indexOf(e)!==-1;break;case "weakset":if(l)throw new G(o+"unable to use .deep.include with WeakSet",void 0,a);f=n.has(e);break;case "map":n.forEach(function(h){f=f||u(h,e);});break;case "set":l?n.forEach(function(h){f=f||u(h,e);}):f=n.has(e);break;case "array":l?f=n.some(function(h){return u(h,e)}):f=n.indexOf(e)!==-1;break;default:{if(e!==Object(e))throw new G(o+"the given combination of arguments ("+r+" and "+re(e).toLowerCase()+") is invalid for this assertion. You can use an array, a map, an object, a set, a string, or a weakset instead of a "+re(e).toLowerCase(),void 0,a);let h=Object.keys(e),d=null,p=0;if(h.forEach(function(g){let m=new w(n);if(Xe(this,m,true),S(m,"lockSsfi",true),!s||h.length===1){m.property(g,e[g]);return}try{m.property(g,e[g]);}catch(b){if(!qe.compatibleConstructor(b,G))throw b;d===null&&(d=b),p++;}},this),s&&h.length>1&&p===h.length)throw d;return}}this.assert(f,"expected #{this} to "+c+"include "+H(e),"expected #{this} to not "+c+"include "+H(e));}i(Cn,"include");x(Cn,"include");w.addChainableMethod("include",Cn,Mn);w.addChainableMethod("contain",Cn,Mn);w.addChainableMethod("contains",Cn,Mn);w.addChainableMethod("includes",Cn,Mn);w.addProperty("ok",function(){this.assert(S(this,"object"),"expected #{this} to be truthy","expected #{this} to be falsy");});w.addProperty("true",function(){this.assert(S(this,"object")===true,"expected #{this} to be true","expected #{this} to be false",!S(this,"negate"));});w.addProperty("numeric",function(){let e=S(this,"object");this.assert(["Number","BigInt"].includes(re(e)),"expected #{this} to be numeric","expected #{this} to not be numeric",!S(this,"negate"));});w.addProperty("callable",function(){let e=S(this,"object"),t=S(this,"ssfi"),n=S(this,"message"),r=n?`${n}: `:"",o=S(this,"negate"),s=o?`${r}expected ${H(e)} not to be a callable function`:`${r}expected ${H(e)} to be a callable function`,a=["Function","AsyncFunction","GeneratorFunction","AsyncGeneratorFunction"].includes(re(e));if(a&&o||!a&&!o)throw new G(s,void 0,t)});w.addProperty("false",function(){this.assert(S(this,"object")===false,"expected #{this} to be false","expected #{this} to be true",!!S(this,"negate"));});w.addProperty("null",function(){this.assert(S(this,"object")===null,"expected #{this} to be null","expected #{this} not to be null");});w.addProperty("undefined",function(){this.assert(S(this,"object")===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined");});w.addProperty("NaN",function(){this.assert(Tr(S(this,"object")),"expected #{this} to be NaN","expected #{this} not to be NaN");});function ti(){let e=S(this,"object");this.assert(e!=null,"expected #{this} to exist","expected #{this} to not exist");}i(ti,"assertExist");x(ti,"assertExist");w.addProperty("exist",ti);w.addProperty("exists",ti);w.addProperty("empty",function(){let e=S(this,"object"),t=S(this,"ssfi"),n=S(this,"message"),r;switch(n=n?n+": ":"",re(e).toLowerCase()){case "array":case "string":r=e.length;break;case "map":case "set":r=e.size;break;case "weakmap":case "weakset":throw new G(n+".empty was passed a weak collection",void 0,t);case "function":{let o=n+".empty was passed a function "+Cr(e);throw new G(o.trim(),void 0,t)}default:if(e!==Object(e))throw new G(n+".empty was passed non-string primitive "+H(e),void 0,t);r=Object.keys(e).length;}this.assert(r===0,"expected #{this} to be empty","expected #{this} not to be empty");});function ni(){let e=S(this,"object"),t=re(e);this.assert(t==="Arguments","expected #{this} to be arguments but got "+t,"expected #{this} to not be arguments");}i(ni,"checkArguments");x(ni,"checkArguments");w.addProperty("arguments",ni);w.addProperty("Arguments",ni);function _r(e,t){t&&S(this,"message",t);let n=S(this,"object");if(S(this,"deep")){let r=S(this,"lockSsfi");S(this,"lockSsfi",true),this.eql(e),S(this,"lockSsfi",r);}else this.assert(e===n,"expected #{this} to equal #{exp}","expected #{this} to not equal #{exp}",e,this._obj,true);}i(_r,"assertEqual");x(_r,"assertEqual");w.addMethod("equal",_r);w.addMethod("equals",_r);w.addMethod("eq",_r);function ri(e,t){t&&S(this,"message",t);let n=S(this,"eql");this.assert(n(e,S(this,"object")),"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",e,this._obj,true);}i(ri,"assertEql");x(ri,"assertEql");w.addMethod("eql",ri);w.addMethod("eqls",ri);function Or(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=S(this,"doLength"),o=S(this,"message"),s=o?o+": ":"",a=S(this,"ssfi"),l=re(n).toLowerCase(),c=re(e).toLowerCase();if(r&&l!=="map"&&l!=="set"&&new w(n,o,a,true).to.have.property("length"),!r&&l==="date"&&c!=="date")throw new G(s+"the argument to above must be a date",void 0,a);if(!ge(e)&&(r||ge(n)))throw new G(s+"the argument to above must be a number",void 0,a);if(!r&&l!=="date"&&!ge(n)){let u=l==="string"?"'"+n+"'":n;throw new G(s+"expected "+u+" to be a number or a date",void 0,a)}if(r){let u="length",f;l==="map"||l==="set"?(u="size",f=n.size):f=n.length,this.assert(f>e,"expected #{this} to have a "+u+" above #{exp} but got #{act}","expected #{this} to not have a "+u+" above #{exp}",e,f);}else this.assert(n>e,"expected #{this} to be above #{exp}","expected #{this} to be at most #{exp}",e);}i(Or,"assertAbove");x(Or,"assertAbove");w.addMethod("above",Or);w.addMethod("gt",Or);w.addMethod("greaterThan",Or);function Ir(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=S(this,"doLength"),o=S(this,"message"),s=o?o+": ":"",a=S(this,"ssfi"),l=re(n).toLowerCase(),c=re(e).toLowerCase(),u,f=true;if(r&&l!=="map"&&l!=="set"&&new w(n,o,a,true).to.have.property("length"),!r&&l==="date"&&c!=="date")u=s+"the argument to least must be a date";else if(!ge(e)&&(r||ge(n)))u=s+"the argument to least must be a number";else if(!r&&l!=="date"&&!ge(n)){let h=l==="string"?"'"+n+"'":n;u=s+"expected "+h+" to be a number or a date";}else f=false;if(f)throw new G(u,void 0,a);if(r){let h="length",d;l==="map"||l==="set"?(h="size",d=n.size):d=n.length,this.assert(d>=e,"expected #{this} to have a "+h+" at least #{exp} but got #{act}","expected #{this} to have a "+h+" below #{exp}",e,d);}else this.assert(n>=e,"expected #{this} to be at least #{exp}","expected #{this} to be below #{exp}",e);}i(Ir,"assertLeast");x(Ir,"assertLeast");w.addMethod("least",Ir);w.addMethod("gte",Ir);w.addMethod("greaterThanOrEqual",Ir);function Ar(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=S(this,"doLength"),o=S(this,"message"),s=o?o+": ":"",a=S(this,"ssfi"),l=re(n).toLowerCase(),c=re(e).toLowerCase(),u,f=true;if(r&&l!=="map"&&l!=="set"&&new w(n,o,a,true).to.have.property("length"),!r&&l==="date"&&c!=="date")u=s+"the argument to below must be a date";else if(!ge(e)&&(r||ge(n)))u=s+"the argument to below must be a number";else if(!r&&l!=="date"&&!ge(n)){let h=l==="string"?"'"+n+"'":n;u=s+"expected "+h+" to be a number or a date";}else f=false;if(f)throw new G(u,void 0,a);if(r){let h="length",d;l==="map"||l==="set"?(h="size",d=n.size):d=n.length,this.assert(d<e,"expected #{this} to have a "+h+" below #{exp} but got #{act}","expected #{this} to not have a "+h+" below #{exp}",e,d);}else this.assert(n<e,"expected #{this} to be below #{exp}","expected #{this} to be at least #{exp}",e);}i(Ar,"assertBelow");x(Ar,"assertBelow");w.addMethod("below",Ar);w.addMethod("lt",Ar);w.addMethod("lessThan",Ar);function $r(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=S(this,"doLength"),o=S(this,"message"),s=o?o+": ":"",a=S(this,"ssfi"),l=re(n).toLowerCase(),c=re(e).toLowerCase(),u,f=true;if(r&&l!=="map"&&l!=="set"&&new w(n,o,a,true).to.have.property("length"),!r&&l==="date"&&c!=="date")u=s+"the argument to most must be a date";else if(!ge(e)&&(r||ge(n)))u=s+"the argument to most must be a number";else if(!r&&l!=="date"&&!ge(n)){let h=l==="string"?"'"+n+"'":n;u=s+"expected "+h+" to be a number or a date";}else f=false;if(f)throw new G(u,void 0,a);if(r){let h="length",d;l==="map"||l==="set"?(h="size",d=n.size):d=n.length,this.assert(d<=e,"expected #{this} to have a "+h+" at most #{exp} but got #{act}","expected #{this} to have a "+h+" above #{exp}",e,d);}else this.assert(n<=e,"expected #{this} to be at most #{exp}","expected #{this} to be above #{exp}",e);}i($r,"assertMost");x($r,"assertMost");w.addMethod("most",$r);w.addMethod("lte",$r);w.addMethod("lessThanOrEqual",$r);w.addMethod("within",function(e,t,n){n&&S(this,"message",n);let r=S(this,"object"),o=S(this,"doLength"),s=S(this,"message"),a=s?s+": ":"",l=S(this,"ssfi"),c=re(r).toLowerCase(),u=re(e).toLowerCase(),f=re(t).toLowerCase(),h,d=true,p=u==="date"&&f==="date"?e.toISOString()+".."+t.toISOString():e+".."+t;if(o&&c!=="map"&&c!=="set"&&new w(r,s,l,true).to.have.property("length"),!o&&c==="date"&&(u!=="date"||f!=="date"))h=a+"the arguments to within must be dates";else if((!ge(e)||!ge(t))&&(o||ge(r)))h=a+"the arguments to within must be numbers";else if(!o&&c!=="date"&&!ge(r)){let g=c==="string"?"'"+r+"'":r;h=a+"expected "+g+" to be a number or a date";}else d=false;if(d)throw new G(h,void 0,l);if(o){let g="length",m;c==="map"||c==="set"?(g="size",m=r.size):m=r.length,this.assert(m>=e&&m<=t,"expected #{this} to have a "+g+" within "+p,"expected #{this} to not have a "+g+" within "+p);}else this.assert(r>=e&&r<=t,"expected #{this} to be within "+p,"expected #{this} to not be within "+p);});function oi(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=S(this,"ssfi"),o=S(this,"message"),s;try{s=n instanceof e;}catch(l){throw l instanceof TypeError?(o=o?o+": ":"",new G(o+"The instanceof assertion needs a constructor but "+re(e)+" was given.",void 0,r)):l}let a=Cr(e);a==null&&(a="an unnamed constructor"),this.assert(s,"expected #{this} to be an instance of "+a,"expected #{this} to not be an instance of "+a);}i(oi,"assertInstanceOf");x(oi,"assertInstanceOf");w.addMethod("instanceof",oi);w.addMethod("instanceOf",oi);function si(e,t,n){n&&S(this,"message",n);let r=S(this,"nested"),o=S(this,"own"),s=S(this,"message"),a=S(this,"object"),l=S(this,"ssfi"),c=typeof e;if(s=s?s+": ":"",r){if(c!=="string")throw new G(s+"the argument to property must be a string when using nested syntax",void 0,l)}else if(c!=="string"&&c!=="number"&&c!=="symbol")throw new G(s+"the argument to property must be a string, number, or symbol",void 0,l);if(r&&o)throw new G(s+'The "nested" and "own" flags cannot be combined.',void 0,l);if(a==null)throw new G(s+"Target cannot be null or undefined.",void 0,l);let u=S(this,"deep"),f=S(this,"negate"),h=r?zs(a,e):null,d=r?h.value:a[e],p=u?S(this,"eql"):(b,E)=>b===E,g="";u&&(g+="deep "),o&&(g+="own "),r&&(g+="nested "),g+="property ";let m;o?m=Object.prototype.hasOwnProperty.call(a,e):r?m=h.exists:m=kr(a,e),(!f||arguments.length===1)&&this.assert(m,"expected #{this} to have "+g+H(e),"expected #{this} to not have "+g+H(e)),arguments.length>1&&this.assert(m&&p(t,d),"expected #{this} to have "+g+H(e)+" of #{exp}, but got #{act}","expected #{this} to not have "+g+H(e)+" of #{act}",t,d),S(this,"object",d);}i(si,"assertProperty");x(si,"assertProperty");w.addMethod("property",si);function ii(e,t,n){S(this,"own",true),si.apply(this,arguments);}i(ii,"assertOwnProperty");x(ii,"assertOwnProperty");w.addMethod("ownProperty",ii);w.addMethod("haveOwnProperty",ii);function ai(e,t,n){typeof t=="string"&&(n=t,t=null),n&&S(this,"message",n);let r=S(this,"object"),o=Object.getOwnPropertyDescriptor(Object(r),e),s=S(this,"eql");o&&t?this.assert(s(t,o),"expected the own property descriptor for "+H(e)+" on #{this} to match "+H(t)+", got "+H(o),"expected the own property descriptor for "+H(e)+" on #{this} to not match "+H(t),t,o,true):this.assert(o,"expected #{this} to have an own property descriptor for "+H(e),"expected #{this} to not have an own property descriptor for "+H(e)),S(this,"object",o);}i(ai,"assertOwnPropertyDescriptor");x(ai,"assertOwnPropertyDescriptor");w.addMethod("ownPropertyDescriptor",ai);w.addMethod("haveOwnPropertyDescriptor",ai);function ci(){S(this,"doLength",true);}i(ci,"assertLengthChain");x(ci,"assertLengthChain");function li(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=re(n).toLowerCase(),o=S(this,"message"),s=S(this,"ssfi"),a="length",l;switch(r){case "map":case "set":a="size",l=n.size;break;default:new w(n,o,s,true).to.have.property("length"),l=n.length;}this.assert(l==e,"expected #{this} to have a "+a+" of #{exp} but got #{act}","expected #{this} to not have a "+a+" of #{act}",e,l);}i(li,"assertLength");x(li,"assertLength");w.addChainableMethod("length",li,ci);w.addChainableMethod("lengthOf",li,ci);function ui(e,t){t&&S(this,"message",t);let n=S(this,"object");this.assert(e.exec(n),"expected #{this} to match "+e,"expected #{this} not to match "+e);}i(ui,"assertMatch");x(ui,"assertMatch");w.addMethod("match",ui);w.addMethod("matches",ui);w.addMethod("string",function(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=S(this,"message"),o=S(this,"ssfi");new w(n,r,o,true).is.a("string"),this.assert(~n.indexOf(e),"expected #{this} to contain "+H(e),"expected #{this} to not contain "+H(e));});function fi(e){let t=S(this,"object"),n=re(t),r=re(e),o=S(this,"ssfi"),s=S(this,"deep"),a,l="",c,u=true,f=S(this,"message");f=f?f+": ":"";let h=f+"when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments";if(n==="Map"||n==="Set")l=s?"deeply ":"",c=[],t.forEach(function(E,M){c.push(M);}),r!=="Array"&&(e=Array.prototype.slice.call(arguments));else {switch(c=Zs(t),r){case "Array":if(arguments.length>1)throw new G(h,void 0,o);break;case "Object":if(arguments.length>1)throw new G(h,void 0,o);e=Object.keys(e);break;default:e=Array.prototype.slice.call(arguments);}e=e.map(function(E){return typeof E=="symbol"?E:String(E)});}if(!e.length)throw new G(f+"keys required",void 0,o);let d=e.length,p=S(this,"any"),g=S(this,"all"),m=e,b=s?S(this,"eql"):(E,M)=>E===M;if(!p&&!g&&(g=true),p&&(u=m.some(function(E){return c.some(function(M){return b(E,M)})})),g&&(u=m.every(function(E){return c.some(function(M){return b(E,M)})}),S(this,"contains")||(u=u&&e.length==c.length)),d>1){e=e.map(function(M){return H(M)});let E=e.pop();g&&(a=e.join(", ")+", and "+E),p&&(a=e.join(", ")+", or "+E);}else a=H(e[0]);a=(d>1?"keys ":"key ")+a,a=(S(this,"contains")?"contain ":"have ")+a,this.assert(u,"expected #{this} to "+l+a,"expected #{this} to not "+l+a,m.slice(0).sort(br),c.sort(br),true);}i(fi,"assertKeys");x(fi,"assertKeys");w.addMethod("keys",fi);w.addMethod("key",fi);function Nr(e,t,n){n&&S(this,"message",n);let r=S(this,"object"),o=S(this,"ssfi"),s=S(this,"message"),a=S(this,"negate")||false;new w(r,s,o,true).is.a("function"),(Sr(e)||typeof e=="string")&&(t=e,e=null);let l,c=false;try{r();}catch(p){c=true,l=p;}let u=e===void 0&&t===void 0,f=!!(e&&t),h=false,d=false;if(u||!u&&!a){let p="an error";e instanceof Error?p="#{exp}":e&&(p=qe.getConstructorName(e));let g=l;if(l instanceof Error)g=l.toString();else if(typeof l=="string")g=l;else if(l&&(typeof l=="object"||typeof l=="function"))try{g=qe.getConstructorName(l);}catch{}this.assert(c,"expected #{this} to throw "+p,"expected #{this} to not throw an error but #{act} was thrown",e&&e.toString(),g);}if(e&&l&&(e instanceof Error&&qe.compatibleInstance(l,e)===a&&(f&&a?h=true:this.assert(a,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(l&&!a?" but #{act} was thrown":""),e.toString(),l.toString())),qe.compatibleConstructor(l,e)===a&&(f&&a?h=true:this.assert(a,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(l?" but #{act} was thrown":""),e instanceof Error?e.toString():e&&qe.getConstructorName(e),l instanceof Error?l.toString():l&&qe.getConstructorName(l)))),l&&t!==void 0&&t!==null){let p="including";Sr(t)&&(p="matching"),qe.compatibleMessage(l,t)===a&&(f&&a?d=true:this.assert(a,"expected #{this} to throw error "+p+" #{exp} but got #{act}","expected #{this} to throw error not "+p+" #{exp}",t,qe.getMessage(l)));}h&&d&&this.assert(a,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(l?" but #{act} was thrown":""),e instanceof Error?e.toString():e&&qe.getConstructorName(e),l instanceof Error?l.toString():l&&qe.getConstructorName(l)),S(this,"object",l);}i(Nr,"assertThrows");x(Nr,"assertThrows");w.addMethod("throw",Nr);w.addMethod("throws",Nr);w.addMethod("Throw",Nr);function hi(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=S(this,"itself"),o=typeof n=="function"&&!r?n.prototype[e]:n[e];this.assert(typeof o=="function","expected #{this} to respond to "+H(e),"expected #{this} to not respond to "+H(e));}i(hi,"respondTo");x(hi,"respondTo");w.addMethod("respondTo",hi);w.addMethod("respondsTo",hi);w.addProperty("itself",function(){S(this,"itself",true);});function pi(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=e(n);this.assert(r,"expected #{this} to satisfy "+Ot(e),"expected #{this} to not satisfy"+Ot(e),!S(this,"negate"),r);}i(pi,"satisfy");x(pi,"satisfy");w.addMethod("satisfy",pi);w.addMethod("satisfies",pi);function di(e,t,n){n&&S(this,"message",n);let r=S(this,"object"),o=S(this,"message"),s=S(this,"ssfi");new w(r,o,s,true).is.numeric;let a="A `delta` value is required for `closeTo`";if(t==null)throw new G(o?`${o}: ${a}`:a,void 0,s);if(new w(t,o,s,true).is.numeric,a="A `expected` value is required for `closeTo`",e==null)throw new G(o?`${o}: ${a}`:a,void 0,s);new w(e,o,s,true).is.numeric;let l=x(u=>u<0?-u:u,"abs"),c=x(u=>parseFloat(parseFloat(u).toPrecision(12)),"strip");this.assert(c(l(r-e))<=t,"expected #{this} to be close to "+e+" +/- "+t,"expected #{this} not to be close to "+e+" +/- "+t);}i(di,"closeTo");x(di,"closeTo");w.addMethod("closeTo",di);w.addMethod("approximately",di);function Bu(e,t,n,r,o){let s=Array.from(t),a=Array.from(e);if(!r){if(a.length!==s.length)return false;s=s.slice();}return a.every(function(l,c){if(o)return n?n(l,s[c]):l===s[c];if(!n){let u=s.indexOf(l);return u===-1?false:(r||s.splice(u,1),true)}return s.some(function(u,f){return n(l,u)?(r||s.splice(f,1),true):false})})}i(Bu,"isSubsetOf");x(Bu,"isSubsetOf");w.addMethod("members",function(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=S(this,"message"),o=S(this,"ssfi");new w(n,r,o,true).to.be.iterable,new w(e,r,o,true).to.be.iterable;let s=S(this,"contains"),a=S(this,"ordered"),l,c,u;s?(l=a?"an ordered superset":"a superset",c="expected #{this} to be "+l+" of #{exp}",u="expected #{this} to not be "+l+" of #{exp}"):(l=a?"ordered members":"members",c="expected #{this} to have the same "+l+" as #{exp}",u="expected #{this} to not have the same "+l+" as #{exp}");let f=S(this,"deep")?S(this,"eql"):void 0;this.assert(Bu(e,n,f,s,a),c,u,e,n,true);});w.addProperty("iterable",function(e){e&&S(this,"message",e);let t=S(this,"object");this.assert(t!=null&&t[Symbol.iterator],"expected #{this} to be an iterable","expected #{this} to not be an iterable",t);});function qu(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=S(this,"message"),o=S(this,"ssfi"),s=S(this,"contains"),a=S(this,"deep"),l=S(this,"eql");new w(e,r,o,true).to.be.an("array"),s?this.assert(e.some(function(c){return n.indexOf(c)>-1}),"expected #{this} to contain one of #{exp}","expected #{this} to not contain one of #{exp}",e,n):a?this.assert(e.some(function(c){return l(n,c)}),"expected #{this} to deeply equal one of #{exp}","expected #{this} to deeply equal one of #{exp}",e,n):this.assert(e.indexOf(n)>-1,"expected #{this} to be one of #{exp}","expected #{this} to not be one of #{exp}",e,n);}i(qu,"oneOf");x(qu,"oneOf");w.addMethod("oneOf",qu);function mi(e,t,n){n&&S(this,"message",n);let r=S(this,"object"),o=S(this,"message"),s=S(this,"ssfi");new w(r,o,s,true).is.a("function");let a;t?(new w(e,o,s,true).to.have.property(t),a=e[t]):(new w(e,o,s,true).is.a("function"),a=e()),r();let l=t==null?e():e[t],c=t==null?a:"."+t;S(this,"deltaMsgObj",c),S(this,"initialDeltaValue",a),S(this,"finalDeltaValue",l),S(this,"deltaBehavior","change"),S(this,"realDelta",l!==a),this.assert(a!==l,"expected "+c+" to change","expected "+c+" to not change");}i(mi,"assertChanges");x(mi,"assertChanges");w.addMethod("change",mi);w.addMethod("changes",mi);function gi(e,t,n){n&&S(this,"message",n);let r=S(this,"object"),o=S(this,"message"),s=S(this,"ssfi");new w(r,o,s,true).is.a("function");let a;t?(new w(e,o,s,true).to.have.property(t),a=e[t]):(new w(e,o,s,true).is.a("function"),a=e()),new w(a,o,s,true).is.a("number"),r();let l=t==null?e():e[t],c=t==null?a:"."+t;S(this,"deltaMsgObj",c),S(this,"initialDeltaValue",a),S(this,"finalDeltaValue",l),S(this,"deltaBehavior","increase"),S(this,"realDelta",l-a),this.assert(l-a>0,"expected "+c+" to increase","expected "+c+" to not increase");}i(gi,"assertIncreases");x(gi,"assertIncreases");w.addMethod("increase",gi);w.addMethod("increases",gi);function yi(e,t,n){n&&S(this,"message",n);let r=S(this,"object"),o=S(this,"message"),s=S(this,"ssfi");new w(r,o,s,true).is.a("function");let a;t?(new w(e,o,s,true).to.have.property(t),a=e[t]):(new w(e,o,s,true).is.a("function"),a=e()),new w(a,o,s,true).is.a("number"),r();let l=t==null?e():e[t],c=t==null?a:"."+t;S(this,"deltaMsgObj",c),S(this,"initialDeltaValue",a),S(this,"finalDeltaValue",l),S(this,"deltaBehavior","decrease"),S(this,"realDelta",a-l),this.assert(l-a<0,"expected "+c+" to decrease","expected "+c+" to not decrease");}i(yi,"assertDecreases");x(yi,"assertDecreases");w.addMethod("decrease",yi);w.addMethod("decreases",yi);function Uu(e,t){t&&S(this,"message",t);let n=S(this,"deltaMsgObj"),r=S(this,"initialDeltaValue"),o=S(this,"finalDeltaValue"),s=S(this,"deltaBehavior"),a=S(this,"realDelta"),l;s==="change"?l=Math.abs(o-r)===Math.abs(e):l=a===Math.abs(e),this.assert(l,"expected "+n+" to "+s+" by "+e,"expected "+n+" to not "+s+" by "+e);}i(Uu,"assertDelta");x(Uu,"assertDelta");w.addMethod("by",Uu);w.addProperty("extensible",function(){let e=S(this,"object"),t=e===Object(e)&&Object.isExtensible(e);this.assert(t,"expected #{this} to be extensible","expected #{this} to not be extensible");});w.addProperty("sealed",function(){let e=S(this,"object"),t=e===Object(e)?Object.isSealed(e):true;this.assert(t,"expected #{this} to be sealed","expected #{this} to not be sealed");});w.addProperty("frozen",function(){let e=S(this,"object"),t=e===Object(e)?Object.isFrozen(e):true;this.assert(t,"expected #{this} to be frozen","expected #{this} to not be frozen");});w.addProperty("finite",function(e){let t=S(this,"object");this.assert(typeof t=="number"&&isFinite(t),"expected #{this} to be a finite number","expected #{this} to not be a finite number");});function Er(e,t){return e===t?true:typeof t!=typeof e?false:typeof e!="object"||e===null?e===t:t?Array.isArray(e)?Array.isArray(t)?e.every(function(n){return t.some(function(r){return Er(n,r)})}):false:e instanceof Date?t instanceof Date?e.getTime()===t.getTime():false:Object.keys(e).every(function(n){let r=e[n],o=t[n];return typeof r=="object"&&r!==null&&o!==null?Er(r,o):typeof r=="function"?r(o):o===r}):false}i(Er,"compareSubset");x(Er,"compareSubset");w.addMethod("containSubset",function(e){let t=z(this,"object"),n=ve.showDiff;this.assert(Er(e,t),"expected #{act} to contain subset #{exp}","expected #{act} to not contain subset #{exp}",e,t,n);});function En(e,t){return new w(e,t)}i(En,"expect");x(En,"expect");En.fail=function(e,t,n,r){throw arguments.length<2&&(n=e,e=void 0),n=n||"expect.fail()",new G(n,{actual:e,expected:t,operator:r},En.fail)};var zu={};js(zu,{Should:i(()=>Vu,"Should"),should:i(()=>Wu,"should")});function wi(){function e(){return this instanceof String||this instanceof Number||this instanceof Boolean||typeof Symbol=="function"&&this instanceof Symbol||typeof BigInt=="function"&&this instanceof BigInt?new w(this.valueOf(),null,e):new w(this,null,e)}i(e,"shouldGetter"),x(e,"shouldGetter");function t(r){Object.defineProperty(this,"should",{value:r,enumerable:true,configurable:true,writable:true});}i(t,"shouldSetter"),x(t,"shouldSetter"),Object.defineProperty(Object.prototype,"should",{set:t,get:e,configurable:true});let n={};return n.fail=function(r,o,s,a){throw arguments.length<2&&(s=r,r=void 0),s=s||"should.fail()",new G(s,{actual:r,expected:o,operator:a},n.fail)},n.equal=function(r,o,s){new w(r,s).to.equal(o);},n.Throw=function(r,o,s,a){new w(r,a).to.Throw(o,s);},n.exist=function(r,o){new w(r,o).to.exist;},n.not={},n.not.equal=function(r,o,s){new w(r,s).to.not.equal(o);},n.not.Throw=function(r,o,s,a){new w(r,a).to.not.Throw(o,s);},n.not.exist=function(r,o){new w(r,o).to.not.exist;},n.throw=n.Throw,n.not.throw=n.not.Throw,n}i(wi,"loadShould");x(wi,"loadShould");var Wu=wi,Vu=wi;function y(e,t){new w(null,null,y,true).assert(e,t,"[ negation message unavailable ]");}i(y,"assert");x(y,"assert");y.fail=function(e,t,n,r){throw arguments.length<2&&(n=e,e=void 0),n=n||"assert.fail()",new G(n,{actual:e,expected:t,operator:r},y.fail)};y.isOk=function(e,t){new w(e,t,y.isOk,true).is.ok;};y.isNotOk=function(e,t){new w(e,t,y.isNotOk,true).is.not.ok;};y.equal=function(e,t,n){let r=new w(e,n,y.equal,true);r.assert(t==z(r,"object"),"expected #{this} to equal #{exp}","expected #{this} to not equal #{act}",t,e,true);};y.notEqual=function(e,t,n){let r=new w(e,n,y.notEqual,true);r.assert(t!=z(r,"object"),"expected #{this} to not equal #{exp}","expected #{this} to equal #{act}",t,e,true);};y.strictEqual=function(e,t,n){new w(e,n,y.strictEqual,true).to.equal(t);};y.notStrictEqual=function(e,t,n){new w(e,n,y.notStrictEqual,true).to.not.equal(t);};y.deepEqual=y.deepStrictEqual=function(e,t,n){new w(e,n,y.deepEqual,true).to.eql(t);};y.notDeepEqual=function(e,t,n){new w(e,n,y.notDeepEqual,true).to.not.eql(t);};y.isAbove=function(e,t,n){new w(e,n,y.isAbove,true).to.be.above(t);};y.isAtLeast=function(e,t,n){new w(e,n,y.isAtLeast,true).to.be.least(t);};y.isBelow=function(e,t,n){new w(e,n,y.isBelow,true).to.be.below(t);};y.isAtMost=function(e,t,n){new w(e,n,y.isAtMost,true).to.be.most(t);};y.isTrue=function(e,t){new w(e,t,y.isTrue,true).is.true;};y.isNotTrue=function(e,t){new w(e,t,y.isNotTrue,true).to.not.equal(true);};y.isFalse=function(e,t){new w(e,t,y.isFalse,true).is.false;};y.isNotFalse=function(e,t){new w(e,t,y.isNotFalse,true).to.not.equal(false);};y.isNull=function(e,t){new w(e,t,y.isNull,true).to.equal(null);};y.isNotNull=function(e,t){new w(e,t,y.isNotNull,true).to.not.equal(null);};y.isNaN=function(e,t){new w(e,t,y.isNaN,true).to.be.NaN;};y.isNotNaN=function(e,t){new w(e,t,y.isNotNaN,true).not.to.be.NaN;};y.exists=function(e,t){new w(e,t,y.exists,true).to.exist;};y.notExists=function(e,t){new w(e,t,y.notExists,true).to.not.exist;};y.isUndefined=function(e,t){new w(e,t,y.isUndefined,true).to.equal(void 0);};y.isDefined=function(e,t){new w(e,t,y.isDefined,true).to.not.equal(void 0);};y.isCallable=function(e,t){new w(e,t,y.isCallable,true).is.callable;};y.isNotCallable=function(e,t){new w(e,t,y.isNotCallable,true).is.not.callable;};y.isObject=function(e,t){new w(e,t,y.isObject,true).to.be.a("object");};y.isNotObject=function(e,t){new w(e,t,y.isNotObject,true).to.not.be.a("object");};y.isArray=function(e,t){new w(e,t,y.isArray,true).to.be.an("array");};y.isNotArray=function(e,t){new w(e,t,y.isNotArray,true).to.not.be.an("array");};y.isString=function(e,t){new w(e,t,y.isString,true).to.be.a("string");};y.isNotString=function(e,t){new w(e,t,y.isNotString,true).to.not.be.a("string");};y.isNumber=function(e,t){new w(e,t,y.isNumber,true).to.be.a("number");};y.isNotNumber=function(e,t){new w(e,t,y.isNotNumber,true).to.not.be.a("number");};y.isNumeric=function(e,t){new w(e,t,y.isNumeric,true).is.numeric;};y.isNotNumeric=function(e,t){new w(e,t,y.isNotNumeric,true).is.not.numeric;};y.isFinite=function(e,t){new w(e,t,y.isFinite,true).to.be.finite;};y.isBoolean=function(e,t){new w(e,t,y.isBoolean,true).to.be.a("boolean");};y.isNotBoolean=function(e,t){new w(e,t,y.isNotBoolean,true).to.not.be.a("boolean");};y.typeOf=function(e,t,n){new w(e,n,y.typeOf,true).to.be.a(t);};y.notTypeOf=function(e,t,n){new w(e,n,y.notTypeOf,true).to.not.be.a(t);};y.instanceOf=function(e,t,n){new w(e,n,y.instanceOf,true).to.be.instanceOf(t);};y.notInstanceOf=function(e,t,n){new w(e,n,y.notInstanceOf,true).to.not.be.instanceOf(t);};y.include=function(e,t,n){new w(e,n,y.include,true).include(t);};y.notInclude=function(e,t,n){new w(e,n,y.notInclude,true).not.include(t);};y.deepInclude=function(e,t,n){new w(e,n,y.deepInclude,true).deep.include(t);};y.notDeepInclude=function(e,t,n){new w(e,n,y.notDeepInclude,true).not.deep.include(t);};y.nestedInclude=function(e,t,n){new w(e,n,y.nestedInclude,true).nested.include(t);};y.notNestedInclude=function(e,t,n){new w(e,n,y.notNestedInclude,true).not.nested.include(t);};y.deepNestedInclude=function(e,t,n){new w(e,n,y.deepNestedInclude,true).deep.nested.include(t);};y.notDeepNestedInclude=function(e,t,n){new w(e,n,y.notDeepNestedInclude,true).not.deep.nested.include(t);};y.ownInclude=function(e,t,n){new w(e,n,y.ownInclude,true).own.include(t);};y.notOwnInclude=function(e,t,n){new w(e,n,y.notOwnInclude,true).not.own.include(t);};y.deepOwnInclude=function(e,t,n){new w(e,n,y.deepOwnInclude,true).deep.own.include(t);};y.notDeepOwnInclude=function(e,t,n){new w(e,n,y.notDeepOwnInclude,true).not.deep.own.include(t);};y.match=function(e,t,n){new w(e,n,y.match,true).to.match(t);};y.notMatch=function(e,t,n){new w(e,n,y.notMatch,true).to.not.match(t);};y.property=function(e,t,n){new w(e,n,y.property,true).to.have.property(t);};y.notProperty=function(e,t,n){new w(e,n,y.notProperty,true).to.not.have.property(t);};y.propertyVal=function(e,t,n,r){new w(e,r,y.propertyVal,true).to.have.property(t,n);};y.notPropertyVal=function(e,t,n,r){new w(e,r,y.notPropertyVal,true).to.not.have.property(t,n);};y.deepPropertyVal=function(e,t,n,r){new w(e,r,y.deepPropertyVal,true).to.have.deep.property(t,n);};y.notDeepPropertyVal=function(e,t,n,r){new w(e,r,y.notDeepPropertyVal,true).to.not.have.deep.property(t,n);};y.ownProperty=function(e,t,n){new w(e,n,y.ownProperty,true).to.have.own.property(t);};y.notOwnProperty=function(e,t,n){new w(e,n,y.notOwnProperty,true).to.not.have.own.property(t);};y.ownPropertyVal=function(e,t,n,r){new w(e,r,y.ownPropertyVal,true).to.have.own.property(t,n);};y.notOwnPropertyVal=function(e,t,n,r){new w(e,r,y.notOwnPropertyVal,true).to.not.have.own.property(t,n);};y.deepOwnPropertyVal=function(e,t,n,r){new w(e,r,y.deepOwnPropertyVal,true).to.have.deep.own.property(t,n);};y.notDeepOwnPropertyVal=function(e,t,n,r){new w(e,r,y.notDeepOwnPropertyVal,true).to.not.have.deep.own.property(t,n);};y.nestedProperty=function(e,t,n){new w(e,n,y.nestedProperty,true).to.have.nested.property(t);};y.notNestedProperty=function(e,t,n){new w(e,n,y.notNestedProperty,true).to.not.have.nested.property(t);};y.nestedPropertyVal=function(e,t,n,r){new w(e,r,y.nestedPropertyVal,true).to.have.nested.property(t,n);};y.notNestedPropertyVal=function(e,t,n,r){new w(e,r,y.notNestedPropertyVal,true).to.not.have.nested.property(t,n);};y.deepNestedPropertyVal=function(e,t,n,r){new w(e,r,y.deepNestedPropertyVal,true).to.have.deep.nested.property(t,n);};y.notDeepNestedPropertyVal=function(e,t,n,r){new w(e,r,y.notDeepNestedPropertyVal,true).to.not.have.deep.nested.property(t,n);};y.lengthOf=function(e,t,n){new w(e,n,y.lengthOf,true).to.have.lengthOf(t);};y.hasAnyKeys=function(e,t,n){new w(e,n,y.hasAnyKeys,true).to.have.any.keys(t);};y.hasAllKeys=function(e,t,n){new w(e,n,y.hasAllKeys,true).to.have.all.keys(t);};y.containsAllKeys=function(e,t,n){new w(e,n,y.containsAllKeys,true).to.contain.all.keys(t);};y.doesNotHaveAnyKeys=function(e,t,n){new w(e,n,y.doesNotHaveAnyKeys,true).to.not.have.any.keys(t);};y.doesNotHaveAllKeys=function(e,t,n){new w(e,n,y.doesNotHaveAllKeys,true).to.not.have.all.keys(t);};y.hasAnyDeepKeys=function(e,t,n){new w(e,n,y.hasAnyDeepKeys,true).to.have.any.deep.keys(t);};y.hasAllDeepKeys=function(e,t,n){new w(e,n,y.hasAllDeepKeys,true).to.have.all.deep.keys(t);};y.containsAllDeepKeys=function(e,t,n){new w(e,n,y.containsAllDeepKeys,true).to.contain.all.deep.keys(t);};y.doesNotHaveAnyDeepKeys=function(e,t,n){new w(e,n,y.doesNotHaveAnyDeepKeys,true).to.not.have.any.deep.keys(t);};y.doesNotHaveAllDeepKeys=function(e,t,n){new w(e,n,y.doesNotHaveAllDeepKeys,true).to.not.have.all.deep.keys(t);};y.throws=function(e,t,n,r){(typeof t=="string"||t instanceof RegExp)&&(n=t,t=null);let o=new w(e,r,y.throws,true).to.throw(t,n);return z(o,"object")};y.doesNotThrow=function(e,t,n,r){(typeof t=="string"||t instanceof RegExp)&&(n=t,t=null),new w(e,r,y.doesNotThrow,true).to.not.throw(t,n);};y.operator=function(e,t,n,r){let o;switch(t){case "==":o=e==n;break;case "===":o=e===n;break;case ">":o=e>n;break;case ">=":o=e>=n;break;case "<":o=e<n;break;case "<=":o=e<=n;break;case "!=":o=e!=n;break;case "!==":o=e!==n;break;default:throw r=r&&r+": ",new G(r+'Invalid operator "'+t+'"',void 0,y.operator)}let s=new w(o,r,y.operator,true);s.assert(z(s,"object")===true,"expected "+H(e)+" to be "+t+" "+H(n),"expected "+H(e)+" to not be "+t+" "+H(n));};y.closeTo=function(e,t,n,r){new w(e,r,y.closeTo,true).to.be.closeTo(t,n);};y.approximately=function(e,t,n,r){new w(e,r,y.approximately,true).to.be.approximately(t,n);};y.sameMembers=function(e,t,n){new w(e,n,y.sameMembers,true).to.have.same.members(t);};y.notSameMembers=function(e,t,n){new w(e,n,y.notSameMembers,true).to.not.have.same.members(t);};y.sameDeepMembers=function(e,t,n){new w(e,n,y.sameDeepMembers,true).to.have.same.deep.members(t);};y.notSameDeepMembers=function(e,t,n){new w(e,n,y.notSameDeepMembers,true).to.not.have.same.deep.members(t);};y.sameOrderedMembers=function(e,t,n){new w(e,n,y.sameOrderedMembers,true).to.have.same.ordered.members(t);};y.notSameOrderedMembers=function(e,t,n){new w(e,n,y.notSameOrderedMembers,true).to.not.have.same.ordered.members(t);};y.sameDeepOrderedMembers=function(e,t,n){new w(e,n,y.sameDeepOrderedMembers,true).to.have.same.deep.ordered.members(t);};y.notSameDeepOrderedMembers=function(e,t,n){new w(e,n,y.notSameDeepOrderedMembers,true).to.not.have.same.deep.ordered.members(t);};y.includeMembers=function(e,t,n){new w(e,n,y.includeMembers,true).to.include.members(t);};y.notIncludeMembers=function(e,t,n){new w(e,n,y.notIncludeMembers,true).to.not.include.members(t);};y.includeDeepMembers=function(e,t,n){new w(e,n,y.includeDeepMembers,true).to.include.deep.members(t);};y.notIncludeDeepMembers=function(e,t,n){new w(e,n,y.notIncludeDeepMembers,true).to.not.include.deep.members(t);};y.includeOrderedMembers=function(e,t,n){new w(e,n,y.includeOrderedMembers,true).to.include.ordered.members(t);};y.notIncludeOrderedMembers=function(e,t,n){new w(e,n,y.notIncludeOrderedMembers,true).to.not.include.ordered.members(t);};y.includeDeepOrderedMembers=function(e,t,n){new w(e,n,y.includeDeepOrderedMembers,true).to.include.deep.ordered.members(t);};y.notIncludeDeepOrderedMembers=function(e,t,n){new w(e,n,y.notIncludeDeepOrderedMembers,true).to.not.include.deep.ordered.members(t);};y.oneOf=function(e,t,n){new w(e,n,y.oneOf,true).to.be.oneOf(t);};y.isIterable=function(e,t){if(e==null||!e[Symbol.iterator])throw t=t?`${t} expected ${H(e)} to be an iterable`:`expected ${H(e)} to be an iterable`,new G(t,void 0,y.isIterable)};y.changes=function(e,t,n,r){arguments.length===3&&typeof t=="function"&&(r=n,n=null),new w(e,r,y.changes,true).to.change(t,n);};y.changesBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){let s=r;r=n,o=s;}else arguments.length===3&&(r=n,n=null);new w(e,o,y.changesBy,true).to.change(t,n).by(r);};y.doesNotChange=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new w(e,r,y.doesNotChange,true).to.not.change(t,n)};y.changesButNotBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){let s=r;r=n,o=s;}else arguments.length===3&&(r=n,n=null);new w(e,o,y.changesButNotBy,true).to.change(t,n).but.not.by(r);};y.increases=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new w(e,r,y.increases,true).to.increase(t,n)};y.increasesBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){let s=r;r=n,o=s;}else arguments.length===3&&(r=n,n=null);new w(e,o,y.increasesBy,true).to.increase(t,n).by(r);};y.doesNotIncrease=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new w(e,r,y.doesNotIncrease,true).to.not.increase(t,n)};y.increasesButNotBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){let s=r;r=n,o=s;}else arguments.length===3&&(r=n,n=null);new w(e,o,y.increasesButNotBy,true).to.increase(t,n).but.not.by(r);};y.decreases=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new w(e,r,y.decreases,true).to.decrease(t,n)};y.decreasesBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){let s=r;r=n,o=s;}else arguments.length===3&&(r=n,n=null);new w(e,o,y.decreasesBy,true).to.decrease(t,n).by(r);};y.doesNotDecrease=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new w(e,r,y.doesNotDecrease,true).to.not.decrease(t,n)};y.doesNotDecreaseBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){let s=r;r=n,o=s;}else arguments.length===3&&(r=n,n=null);return new w(e,o,y.doesNotDecreaseBy,true).to.not.decrease(t,n).by(r)};y.decreasesButNotBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){let s=r;r=n,o=s;}else arguments.length===3&&(r=n,n=null);new w(e,o,y.decreasesButNotBy,true).to.decrease(t,n).but.not.by(r);};y.ifError=function(e){if(e)throw e};y.isExtensible=function(e,t){new w(e,t,y.isExtensible,true).to.be.extensible;};y.isNotExtensible=function(e,t){new w(e,t,y.isNotExtensible,true).to.not.be.extensible;};y.isSealed=function(e,t){new w(e,t,y.isSealed,true).to.be.sealed;};y.isNotSealed=function(e,t){new w(e,t,y.isNotSealed,true).to.not.be.sealed;};y.isFrozen=function(e,t){new w(e,t,y.isFrozen,true).to.be.frozen;};y.isNotFrozen=function(e,t){new w(e,t,y.isNotFrozen,true).to.not.be.frozen;};y.isEmpty=function(e,t){new w(e,t,y.isEmpty,true).to.be.empty;};y.isNotEmpty=function(e,t){new w(e,t,y.isNotEmpty,true).to.not.be.empty;};y.containsSubset=function(e,t,n){new w(e,n).to.containSubset(t);};y.doesNotContainSubset=function(e,t,n){new w(e,n).to.not.containSubset(t);};var ty=[["isOk","ok"],["isNotOk","notOk"],["throws","throw"],["throws","Throw"],["isExtensible","extensible"],["isNotExtensible","notExtensible"],["isSealed","sealed"],["isNotSealed","notSealed"],["isFrozen","frozen"],["isNotFrozen","notFrozen"],["isEmpty","empty"],["isNotEmpty","notEmpty"],["isCallable","isFunction"],["isNotCallable","isNotFunction"],["containsSubset","containSubset"]];for(let[e,t]of ty)y[t]=y[e];var Jl=[];function _n(e){let t={use:_n,AssertionError:G,util:Ke,config:ve,expect:En,assert:y,Assertion:w,...zu};return ~Jl.indexOf(e)||(e(t,Ke),Jl.push(e)),t}i(_n,"use");x(_n,"use");var Zu=i((e,t)=>{function n(s,a){t.addProperty(e.Assertion.prototype,s,function(){let l=e.Assertion.prototype[a];if(!l)throw new Error(`Cannot delegate to ${String(a)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return l.call(this)});}i(n,"defProperty");function r(s,a,...l){t.addProperty(e.Assertion.prototype,s,function(){let c=e.Assertion.prototype[a];if(!c)throw new Error(`Cannot delegate to ${String(a)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return c.call(this,...l)});}i(r,"defPropertyWithArgs");function o(s,a){t.addMethod(e.Assertion.prototype,s,function(...l){let c=e.Assertion.prototype[a];if(!c)throw new Error(`Cannot delegate to ${String(a)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return c.call(this,...l)});}i(o,"defMethod"),n("called","toHaveBeenCalled"),n("calledOnce","toHaveBeenCalledOnce"),r("calledTwice","toHaveBeenCalledTimes",2),r("calledThrice","toHaveBeenCalledTimes",3),o("callCount","toHaveBeenCalledTimes"),o("calledWith","toHaveBeenCalledWith"),o("calledOnceWith","toHaveBeenCalledExactlyOnceWith"),o("lastCalledWith","toHaveBeenLastCalledWith"),o("nthCalledWith","toHaveBeenNthCalledWith"),o("returned","toHaveReturned"),o("returnedWith","toHaveReturnedWith"),o("returnedTimes","toHaveReturnedTimes"),o("lastReturnedWith","toHaveLastReturnedWith"),o("nthReturnedWith","toHaveNthReturnedWith"),o("calledBefore","toHaveBeenCalledBefore"),o("calledAfter","toHaveBeenCalledAfter");},"ChaiStyleAssertions"),Pr=Symbol.for("matchers-object"),In=Symbol.for("$$jest-matchers-object"),An=Symbol.for("expect-global"),Vr=Symbol.for("asymmetric-matchers-object"),Qu={toSatisfy(e,t,n){let{printReceived:r,printExpected:o,matcherHint:s}=this.utils,a=t(e);return {pass:a,message:i(()=>a?`${s(".not.toSatisfy","received","")}
83
83
 
84
84
  Expected value to not satisfy:
85
85
  ${n||o(t)}
@@ -101,74 +101,73 @@ Expected value to be one of:
101
101
  ${s(t)}
102
102
 
103
103
  Received:
104
- ${o(e)}`,"message")}}},Rr=se.green,Mi=se.red,py=se.inverse,my=se.bold,St=se.dim;function gy(e,t="received",n="expected",r={}){let{comment:o="",isDirectExpectCall:s=false,isNot:a=false,promise:l="",secondArgument:c="",expectedColor:u=Rr,receivedColor:f=Mi,secondArgumentColor:h=Rr}=r,p="",d="expect";return !s&&t!==""&&(p+=St(`${d}(`)+f(t),d=")"),l!==""&&(p+=St(`${d}.`)+l,d=""),a&&(p+=`${St(`${d}.`)}not`,d=""),e.includes(".")?d+=e:(p+=St(`${d}.`)+e,d=""),n===""?d+="()":(p+=St(`${d}(`)+u(n),c&&(p+=St(", ")+h(c)),d=")"),o!==""&&(d+=` // ${o}`),d!==""&&(p+=St(d)),p}i(gy,"matcherHint");var yy="\xB7";function af(e){return e.replace(/\s+$/gm,t=>yy.repeat(t.length))}i(af,"replaceTrailingSpaces");function wy(e){return Mi(af(we(e)))}i(wy,"printReceived");function by(e){return Rr(af(we(e)))}i(by,"printExpected");function cf(){return {EXPECTED_COLOR:Rr,RECEIVED_COLOR:Mi,INVERTED_COLOR:py,BOLD_WEIGHT:my,DIM_COLOR:St,diff:Ct,matcherHint:gy,printReceived:wy,printExpected:by,printDiffOrStringify:nr,printWithType:Ty}}i(cf,"getMatcherUtils");function Ty(e,t,n){let r=_t(t),o=r!=="null"&&r!=="undefined"?`${e} has type: ${r}
105
- `:"",s=`${e} has value: ${n(t)}`;return o+s}i(Ty,"printWithType");function lf(e){if(!Array.isArray(e))throw new TypeError(`expect.customEqualityTesters: Must be set to an array of Testers. Was given "${_t(e)}"`);globalThis[An].customEqualityTesters.push(...e);}i(lf,"addCustomEqualityTesters");function Ci(){return globalThis[An].customEqualityTesters}i(Ci,"getCustomEqualityTesters");function H(e,t,n,r){return n=n||[],In(e,t,[],[],n,r?uf:vy)}i(H,"equals");function Zu(e){return !!e&&typeof e=="object"&&"asymmetricMatch"in e&&Ze("Function",e.asymmetricMatch)}i(Zu,"isAsymmetric");function Sy(e,t,n){let r=Zu(e),o=Zu(t);if(!(r&&o)){if(r)return e.asymmetricMatch(t,n);if(o)return t.asymmetricMatch(e,n)}}i(Sy,"asymmetricMatch");function Jt(e){if(typeof Error.isError=="function")return Error.isError(e);switch(Object.prototype.toString.call(e)){case "[object Error]":case "[object Exception]":case "[object DOMException]":return true;default:return e instanceof Error}}i(Jt,"isError");function In(e,t,n,r,o,s){let a=true,l=Sy(e,t,o);if(l!==void 0)return l;let c={equals:H};for(let g=0;g<o.length;g++){let m=o[g].call(c,e,t,o);if(m!==void 0)return m}if(typeof URL=="function"&&e instanceof URL&&t instanceof URL)return e.href===t.href;if(Object.is(e,t))return true;if(e===null||t===null)return e===t;let u=Object.prototype.toString.call(e);if(u!==Object.prototype.toString.call(t))return false;switch(u){case "[object Boolean]":case "[object String]":case "[object Number]":return typeof e!=typeof t?false:typeof e!="object"&&typeof t!="object"?Object.is(e,t):Object.is(e.valueOf(),t.valueOf());case "[object Date]":{let g=+e,m=+t;return g===m||Number.isNaN(g)&&Number.isNaN(m)}case "[object RegExp]":return e.source===t.source&&e.flags===t.flags;case "[object Temporal.Instant]":case "[object Temporal.ZonedDateTime]":case "[object Temporal.PlainDateTime]":case "[object Temporal.PlainDate]":case "[object Temporal.PlainTime]":case "[object Temporal.PlainYearMonth]":case "[object Temporal.PlainMonthDay]":return e.equals(t);case "[object Temporal.Duration]":return e.toString()===t.toString()}if(typeof e!="object"||typeof t!="object")return false;if(ef(e)&&ef(t))return e.isEqualNode(t);let f=n.length;for(;f--;){if(n[f]===e)return r[f]===t;if(r[f]===t)return false}if(n.push(e),r.push(t),u==="[object Array]"&&e.length!==t.length)return false;if(Jt(e)&&Jt(t))try{return Ey(e,t,n,r,o,s)}finally{n.pop(),r.pop();}let h=Qu(e,s),p,d=h.length;if(Qu(t,s).length!==d)return false;for(;d--;)if(p=h[d],a=s(t,p)&&In(e[p],t[p],n,r,o,s),!a)return false;return n.pop(),r.pop(),a}i(In,"eq");function Ey(e,t,n,r,o,s){let a=Object.prototype.toString.call(e)===Object.prototype.toString.call(t)&&e.name===t.name&&e.message===t.message;return typeof t.cause<"u"&&(a&&=In(e.cause,t.cause,n,r,o,s)),e instanceof AggregateError&&t instanceof AggregateError&&(a&&=In(e.errors,t.errors,n,r,o,s)),a&&=In({...e},{...t},n,r,o,s),a}i(Ey,"isErrorEqual");function Qu(e,t){let n=[];for(let r in e)t(e,r)&&n.push(r);return n.concat(Object.getOwnPropertySymbols(e).filter(r=>Object.getOwnPropertyDescriptor(e,r).enumerable))}i(Qu,"keys");function vy(e,t){return uf(e,t)&&e[t]!==void 0}i(vy,"hasDefinedKey");function uf(e,t){return Object.hasOwn(e,t)}i(uf,"hasKey");function Ze(e,t){return Object.prototype.toString.apply(t)===`[object ${e}]`}i(Ze,"isA");function ef(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"&&"nodeName"in e&&typeof e.nodeName=="string"&&"isEqualNode"in e&&typeof e.isEqualNode=="function"}i(ef,"isDomNode");var ff="@@__IMMUTABLE_KEYED__@@",hf="@@__IMMUTABLE_SET__@@",xy="@@__IMMUTABLE_LIST__@@",Kr="@@__IMMUTABLE_ORDERED__@@",ky="@@__IMMUTABLE_RECORD__@@";function _y(e){return !!(e&&e[ff]&&!e[Kr])}i(_y,"isImmutableUnorderedKeyed");function My(e){return !!(e&&e[hf]&&!e[Kr])}i(My,"isImmutableUnorderedSet");function Hr(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}i(Hr,"isObjectLiteral");function Cy(e){return !!(e&&Hr(e)&&e[xy])}i(Cy,"isImmutableList");function Oy(e){return !!(e&&Hr(e)&&e[ff]&&e[Kr])}i(Oy,"isImmutableOrderedKeyed");function Iy(e){return !!(e&&Hr(e)&&e[hf]&&e[Kr])}i(Iy,"isImmutableOrderedSet");function Ay(e){return !!(e&&Hr(e)&&e[ky])}i(Ay,"isImmutableRecord");var df=Symbol.iterator;function tf(e){return !!(e!=null&&e[df])}i(tf,"hasIterator");function ke(e,t,n=[],r=[],o=[]){if(typeof e!="object"||typeof t!="object"||Array.isArray(e)||Array.isArray(t)||!tf(e)||!tf(t))return;if(e.constructor!==t.constructor)return false;let s=r.length;for(;s--;)if(r[s]===e)return o[s]===t;r.push(e),o.push(t);let a=[...n.filter(u=>u!==ke),l];function l(u,f){return ke(u,f,[...n],[...r],[...o])}if(i(l,"iterableEqualityWithStack"),e.size!==void 0){if(e.size!==t.size)return false;if(Ze("Set",e)||My(e)){let u=true;for(let f of e)if(!t.has(f)){let h=false;for(let p of t)H(f,p,a)===true&&(h=true);if(h===false){u=false;break}}return r.pop(),o.pop(),u}else if(Ze("Map",e)||_y(e)){let u=true;for(let f of e)if(!t.has(f[0])||!H(f[1],t.get(f[0]),a)){let h=false;for(let p of t){let d=H(f[0],p[0],a),g=false;d===true&&(g=H(f[1],p[1],a)),g===true&&(h=true);}if(h===false){u=false;break}}return r.pop(),o.pop(),u}}let c=t[df]();for(let u of e){let f=c.next();if(f.done||!H(u,f.value,a))return false}if(!c.next().done)return false;if(!Cy(e)&&!Oy(e)&&!Iy(e)&&!Ay(e)){let u=Object.entries(e),f=Object.entries(t);if(!H(u,f,a))return false}return r.pop(),o.pop(),true}i(ke,"iterableEquality");function Oi(e,t){return !e||typeof e!="object"||e===Object.prototype?false:Object.hasOwn(e,t)||Oi(Object.getPrototypeOf(e),t)}i(Oi,"hasPropertyInObject");function $y(e){return Le(e)&&!Jt(e)&&!Array.isArray(e)&&!(e instanceof Date)&&!(e instanceof Set)&&!(e instanceof Map)}i($y,"isObjectWithKeys");function At(e,t,n=[]){let r=n.filter(s=>s!==At),o=i((s=new WeakMap)=>(a,l)=>{if($y(l))return Object.keys(l).every(c=>{if(l[c]!=null&&typeof l[c]=="object"){if(s.has(l[c]))return H(a[c],l[c],r);s.set(l[c],true);}let u=a!=null&&Oi(a,c)&&H(a[c],l[c],[...r,o(s)]);return s.delete(l[c]),u})},"subsetEqualityWithContext");return o()(e,t)}i(At,"subsetEquality");function nf(e,t){if(!(e==null||t==null||e.constructor===t.constructor))return false}i(nf,"typeEquality");function rf(e,t){let n=e,r=t;if(!(e instanceof DataView&&t instanceof DataView)){if(!(e instanceof ArrayBuffer)||!(t instanceof ArrayBuffer))return;try{n=new DataView(e),r=new DataView(t);}catch{return}}if(n.byteLength!==r.byteLength)return false;for(let o=0;o<n.byteLength;o++)if(n.getUint8(o)!==r.getUint8(o))return false;return true}i(rf,"arrayBufferEquality");function vi(e,t,n=[]){if(!Array.isArray(e)||!Array.isArray(t))return;let r=Object.keys(e),o=Object.keys(t),s=n.filter(a=>a!==vi);return H(e,t,s,true)&&H(r,o)}i(vi,"sparseArrayEquality");function Ny(e,t="#{this}",n="#{exp}"){let r=`expected ${t} to be ${n} // Object.is equality`;return ["toStrictEqual","toEqual"].includes(e)?`${r}
104
+ ${o(e)}`,"message")}}},Rr=se.green,ki=se.red,ny=se.inverse,ry=se.bold,St=se.dim;function oy(e,t="received",n="expected",r={}){let{comment:o="",isDirectExpectCall:s=false,isNot:a=false,promise:l="",secondArgument:c="",expectedColor:u=Rr,receivedColor:f=ki,secondArgumentColor:h=Rr}=r,d="",p="expect";return !s&&t!==""&&(d+=St(`${p}(`)+f(t),p=")"),l!==""&&(d+=St(`${p}.`)+l,p=""),a&&(d+=`${St(`${p}.`)}not`,p=""),e.includes(".")?p+=e:(d+=St(`${p}.`)+e,p=""),n===""?p+="()":(d+=St(`${p}(`)+u(n),c&&(d+=St(", ")+h(c)),p=")"),o!==""&&(p+=` // ${o}`),p!==""&&(d+=St(p)),d}i(oy,"matcherHint");var sy="\xB7";function ef(e){return e.replace(/\s+$/gm,t=>sy.repeat(t.length))}i(ef,"replaceTrailingSpaces");function iy(e){return ki(ef(ye(e)))}i(iy,"printReceived");function ay(e){return Rr(ef(ye(e)))}i(ay,"printExpected");function tf(){return {EXPECTED_COLOR:Rr,RECEIVED_COLOR:ki,INVERTED_COLOR:ny,BOLD_WEIGHT:ry,DIM_COLOR:St,diff:_t,matcherHint:oy,printReceived:iy,printExpected:ay,printDiffOrStringify:nr,printWithType:cy}}i(tf,"getMatcherUtils");function cy(e,t,n){let r=Mt(t),o=r!=="null"&&r!=="undefined"?`${e} has type: ${r}
105
+ `:"",s=`${e} has value: ${n(t)}`;return o+s}i(cy,"printWithType");function nf(e){if(!Array.isArray(e))throw new TypeError(`expect.customEqualityTesters: Must be set to an array of Testers. Was given "${Mt(e)}"`);globalThis[In].customEqualityTesters.push(...e);}i(nf,"addCustomEqualityTesters");function Mi(){return globalThis[In].customEqualityTesters}i(Mi,"getCustomEqualityTesters");function K(e,t,n,r){return n=n||[],On(e,t,[],[],n,r?rf:fy)}i(K,"equals");function Ku(e){return !!e&&typeof e=="object"&&"asymmetricMatch"in e&&Ze("Function",e.asymmetricMatch)}i(Ku,"isAsymmetric");function ly(e,t,n){let r=Ku(e),o=Ku(t);if(!(r&&o)){if(r)return e.asymmetricMatch(t,n);if(o)return t.asymmetricMatch(e,n)}}i(ly,"asymmetricMatch");function Ht(e){if(typeof Error.isError=="function")return Error.isError(e);switch(Object.prototype.toString.call(e)){case "[object Error]":case "[object Exception]":case "[object DOMException]":return true;default:return e instanceof Error}}i(Ht,"isError");function On(e,t,n,r,o,s){let a=true,l=ly(e,t,o);if(l!==void 0)return l;let c={equals:K};for(let g=0;g<o.length;g++){let m=o[g].call(c,e,t,o);if(m!==void 0)return m}if(typeof URL=="function"&&e instanceof URL&&t instanceof URL)return e.href===t.href;if(Object.is(e,t))return true;if(e===null||t===null)return e===t;let u=Object.prototype.toString.call(e);if(u!==Object.prototype.toString.call(t))return false;switch(u){case "[object Boolean]":case "[object String]":case "[object Number]":return typeof e!=typeof t?false:typeof e!="object"&&typeof t!="object"?Object.is(e,t):Object.is(e.valueOf(),t.valueOf());case "[object Date]":{let g=+e,m=+t;return g===m||Number.isNaN(g)&&Number.isNaN(m)}case "[object RegExp]":return e.source===t.source&&e.flags===t.flags;case "[object Temporal.Instant]":case "[object Temporal.ZonedDateTime]":case "[object Temporal.PlainDateTime]":case "[object Temporal.PlainDate]":case "[object Temporal.PlainTime]":case "[object Temporal.PlainYearMonth]":case "[object Temporal.PlainMonthDay]":return e.equals(t);case "[object Temporal.Duration]":return e.toString()===t.toString()}if(typeof e!="object"||typeof t!="object")return false;if(Gu(e)&&Gu(t))return e.isEqualNode(t);let f=n.length;for(;f--;){if(n[f]===e)return r[f]===t;if(r[f]===t)return false}if(n.push(e),r.push(t),u==="[object Array]"&&e.length!==t.length)return false;if(Ht(e)&&Ht(t))try{return uy(e,t,n,r,o,s)}finally{n.pop(),r.pop();}let h=Hu(e,s),d,p=h.length;if(Hu(t,s).length!==p)return false;for(;p--;)if(d=h[p],a=s(t,d)&&On(e[d],t[d],n,r,o,s),!a)return false;return n.pop(),r.pop(),a}i(On,"eq");function uy(e,t,n,r,o,s){let a=Object.prototype.toString.call(e)===Object.prototype.toString.call(t)&&e.name===t.name&&e.message===t.message;return typeof t.cause<"u"&&(a&&=On(e.cause,t.cause,n,r,o,s)),e instanceof AggregateError&&t instanceof AggregateError&&(a&&=On(e.errors,t.errors,n,r,o,s)),a&&=On({...e},{...t},n,r,o,s),a}i(uy,"isErrorEqual");function Hu(e,t){let n=[];for(let r in e)t(e,r)&&n.push(r);return n.concat(Object.getOwnPropertySymbols(e).filter(r=>Object.getOwnPropertyDescriptor(e,r).enumerable))}i(Hu,"keys");function fy(e,t){return rf(e,t)&&e[t]!==void 0}i(fy,"hasDefinedKey");function rf(e,t){return Object.hasOwn(e,t)}i(rf,"hasKey");function Ze(e,t){return Object.prototype.toString.apply(t)===`[object ${e}]`}i(Ze,"isA");function Gu(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"&&"nodeName"in e&&typeof e.nodeName=="string"&&"isEqualNode"in e&&typeof e.isEqualNode=="function"}i(Gu,"isDomNode");var of="@@__IMMUTABLE_KEYED__@@",sf="@@__IMMUTABLE_SET__@@",hy="@@__IMMUTABLE_LIST__@@",Kr="@@__IMMUTABLE_ORDERED__@@",py="@@__IMMUTABLE_RECORD__@@";function dy(e){return !!(e&&e[of]&&!e[Kr])}i(dy,"isImmutableUnorderedKeyed");function my(e){return !!(e&&e[sf]&&!e[Kr])}i(my,"isImmutableUnorderedSet");function Hr(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}i(Hr,"isObjectLiteral");function gy(e){return !!(e&&Hr(e)&&e[hy])}i(gy,"isImmutableList");function yy(e){return !!(e&&Hr(e)&&e[of]&&e[Kr])}i(yy,"isImmutableOrderedKeyed");function wy(e){return !!(e&&Hr(e)&&e[sf]&&e[Kr])}i(wy,"isImmutableOrderedSet");function by(e){return !!(e&&Hr(e)&&e[py])}i(by,"isImmutableRecord");var af=Symbol.iterator;function Ju(e){return !!(e!=null&&e[af])}i(Ju,"hasIterator");function ke(e,t,n=[],r=[],o=[]){if(typeof e!="object"||typeof t!="object"||Array.isArray(e)||Array.isArray(t)||!Ju(e)||!Ju(t))return;if(e.constructor!==t.constructor)return false;let s=r.length;for(;s--;)if(r[s]===e)return o[s]===t;r.push(e),o.push(t);let a=[...n.filter(u=>u!==ke),l];function l(u,f){return ke(u,f,[...n],[...r],[...o])}if(i(l,"iterableEqualityWithStack"),e.size!==void 0){if(e.size!==t.size)return false;if(Ze("Set",e)||my(e)){let u=true;for(let f of e)if(!t.has(f)){let h=false;for(let d of t)K(f,d,a)===true&&(h=true);if(h===false){u=false;break}}return r.pop(),o.pop(),u}else if(Ze("Map",e)||dy(e)){let u=true;for(let f of e)if(!t.has(f[0])||!K(f[1],t.get(f[0]),a)){let h=false;for(let d of t){let p=K(f[0],d[0],a),g=false;p===true&&(g=K(f[1],d[1],a)),g===true&&(h=true);}if(h===false){u=false;break}}return r.pop(),o.pop(),u}}let c=t[af]();for(let u of e){let f=c.next();if(f.done||!K(u,f.value,a))return false}if(!c.next().done)return false;if(!gy(e)&&!yy(e)&&!wy(e)&&!by(e)){let u=Object.entries(e),f=Object.entries(t);if(!K(u,f,a))return false}return r.pop(),o.pop(),true}i(ke,"iterableEquality");function Ci(e,t){return !e||typeof e!="object"||e===Object.prototype?false:Object.hasOwn(e,t)||Ci(Object.getPrototypeOf(e),t)}i(Ci,"hasPropertyInObject");function Ty(e){return Le(e)&&!Ht(e)&&!Array.isArray(e)&&!(e instanceof Date)&&!(e instanceof Set)&&!(e instanceof Map)}i(Ty,"isObjectWithKeys");function At(e,t,n=[]){let r=n.filter(s=>s!==At),o=i((s=new WeakMap)=>(a,l)=>{if(Ty(l))return Object.keys(l).every(c=>{if(l[c]!=null&&typeof l[c]=="object"){if(s.has(l[c]))return K(a[c],l[c],r);s.set(l[c],true);}let u=a!=null&&Ci(a,c)&&K(a[c],l[c],[...r,o(s)]);return s.delete(l[c]),u})},"subsetEqualityWithContext");return o()(e,t)}i(At,"subsetEquality");function Yu(e,t){if(!(e==null||t==null||e.constructor===t.constructor))return false}i(Yu,"typeEquality");function Xu(e,t){let n=e,r=t;if(!(e instanceof DataView&&t instanceof DataView)){if(!(e instanceof ArrayBuffer)||!(t instanceof ArrayBuffer))return;try{n=new DataView(e),r=new DataView(t);}catch{return}}if(n.byteLength!==r.byteLength)return false;for(let o=0;o<n.byteLength;o++)if(n.getUint8(o)!==r.getUint8(o))return false;return true}i(Xu,"arrayBufferEquality");function Si(e,t,n=[]){if(!Array.isArray(e)||!Array.isArray(t))return;let r=Object.keys(e),o=Object.keys(t),s=n.filter(a=>a!==Si);return K(e,t,s,true)&&K(r,o)}i(Si,"sparseArrayEquality");function Sy(e,t="#{this}",n="#{exp}"){let r=`expected ${t} to be ${n} // Object.is equality`;return ["toStrictEqual","toEqual"].includes(e)?`${r}
106
106
 
107
107
  If it should pass with deep equality, replace "toBe" with "${e}"
108
108
 
109
109
  Expected: ${t}
110
110
  Received: serializes to the same string
111
- `:r}i(Ny,"generateToBeMessage");function Py(e,t){return `${t} ${e}${t===1?"":"s"}`}i(Py,"pluralize");function Si(e){return [...Object.keys(e),...Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t)?.enumerable)]}i(Si,"getObjectKeys");function Ry(e,t,n){let r=0,o=i((s=new WeakMap)=>(a,l)=>{if(Array.isArray(a)){if(Array.isArray(l)&&l.length===a.length)return l.map((c,u)=>o(s)(a[u],c))}else {if(a instanceof Date)return a;if(Le(a)&&Le(l)){if(H(a,l,[...n,ke,At]))return l;let c={};s.set(a,c),typeof a.constructor=="function"&&typeof a.constructor.name=="string"&&Object.defineProperty(c,"constructor",{enumerable:false,value:a.constructor});for(let u of Si(a))Oi(l,u)?c[u]=s.has(a[u])?s.get(a[u]):o(s)(a[u],l[u]):s.has(a[u])||(r+=1,Le(a[u])&&(r+=Si(a[u]).length),o(s)(a[u],l[u]));if(Si(c).length>0)return c}}return a},"getObjectSubsetWithContext");return {subset:o()(e,t),stripped:r}}i(Ry,"getObjectSubset");function jy(e){return !!e&&(typeof e=="object"||typeof e=="function")&&e["~standard"]&&typeof e["~standard"].validate=="function"}i(jy,"isStandardSchema");if(!Object.hasOwn(globalThis,Pr)){let e=new WeakMap,t=Object.create(null),n=[],r=Object.create(null);Object.defineProperty(globalThis,Pr,{get:i(()=>e,"get")}),Object.defineProperty(globalThis,An,{configurable:true,get:i(()=>({state:e.get(globalThis[$n]),matchers:t,customEqualityTesters:n}),"get")}),Object.defineProperty(globalThis,Vr,{get:i(()=>r,"get")});}function Yt(e){return globalThis[Pr].get(e)}i(Yt,"getState");function Gr(e,t){let n=globalThis[Pr],r=n.get(t)||{},o=Object.defineProperties(r,{...Object.getOwnPropertyDescriptors(r),...Object.getOwnPropertyDescriptors(e)});n.set(t,o);}i(Gr,"setState");var Ge=class{static{i(this,"AsymmetricMatcher");}$$typeof=Symbol.for("jest.asymmetricMatcher");constructor(t,n=false){this.sample=t,this.inverse=n;}getMatcherContext(t){return {...Yt(t||globalThis[$n]),equals:H,isNot:this.inverse,customTesters:Ci(),utils:{...cf(),diff:Ct,stringify:we,iterableEquality:ke,subsetEquality:At}}}};Ge.prototype[Symbol.for("chai/inspect")]=function(e){let t=we(this,e.depth,{min:true});return t.length<=e.truncate?t:`${this.toString()}{\u2026}`};var jr=class extends Ge{static{i(this,"StringContaining");}constructor(t,n=false){if(!Ze("String",t))throw new Error("Expected is not a string");super(t,n);}asymmetricMatch(t){let n=Ze("String",t)&&t.includes(this.sample);return this.inverse?!n:n}toString(){return `String${this.inverse?"Not":""}Containing`}getExpectedType(){return "string"}},xi=class extends Ge{static{i(this,"Anything");}asymmetricMatch(t){return t!=null}toString(){return "Anything"}toAsymmetricMatcher(){return "Anything"}},Fr=class extends Ge{static{i(this,"ObjectContaining");}constructor(t,n=false){super(t,n);}getPrototype(t){return Object.getPrototypeOf?Object.getPrototypeOf(t):t.constructor.prototype===t?null:t.constructor.prototype}hasProperty(t,n){return t?Object.hasOwn(t,n)?true:this.hasProperty(this.getPrototype(t),n):false}getProperties(t){return [...Object.keys(t),...Object.getOwnPropertySymbols(t).filter(n=>Object.getOwnPropertyDescriptor(t,n)?.enumerable)]}asymmetricMatch(t,n){if(typeof this.sample!="object")throw new TypeError(`You must provide an object to ${this.toString()}, not '${typeof this.sample}'.`);let r=true,o=this.getProperties(this.sample);for(let s of o){if(!this.hasProperty(t,s)){r=false;break}let a=this.sample[s],l=t[s];if(!H(a,l,n)){r=false;break}}return this.inverse?!r:r}toString(){return `Object${this.inverse?"Not":""}Containing`}getExpectedType(){return "object"}},Dr=class extends Ge{static{i(this,"ArrayContaining");}constructor(t,n=false){super(t,n);}asymmetricMatch(t,n){if(!Array.isArray(this.sample))throw new TypeError(`You must provide an array to ${this.toString()}, not '${typeof this.sample}'.`);let r=this.sample.length===0||Array.isArray(t)&&this.sample.every(o=>t.some(s=>H(o,s,n)));return this.inverse?!r:r}toString(){return `Array${this.inverse?"Not":""}Containing`}getExpectedType(){return "array"}},ki=class extends Ge{static{i(this,"Any");}constructor(t){if(typeof t>"u")throw new TypeError("any() expects to be passed a constructor function. Please pass one or use anything() to match any object.");super(t);}fnNameFor(t){if(t.name)return t.name;let r=Function.prototype.toString.call(t).match(/^(?:async)?\s*function\s*(?:\*\s*)?([\w$]+)\s*\(/);return r?r[1]:"<anonymous>"}asymmetricMatch(t){return this.sample===String?typeof t=="string"||t instanceof String:this.sample===Number?typeof t=="number"||t instanceof Number:this.sample===Function?typeof t=="function"||typeof t=="function":this.sample===Boolean?typeof t=="boolean"||t instanceof Boolean:this.sample===BigInt?typeof t=="bigint"||t instanceof BigInt:this.sample===Symbol?typeof t=="symbol"||t instanceof Symbol:this.sample===Object?typeof t=="object":t instanceof this.sample}toString(){return "Any"}getExpectedType(){return this.sample===String?"string":this.sample===Number?"number":this.sample===Function?"function":this.sample===Object?"object":this.sample===Boolean?"boolean":this.fnNameFor(this.sample)}toAsymmetricMatcher(){return `Any<${this.fnNameFor(this.sample)}>`}},Lr=class extends Ge{static{i(this,"StringMatching");}constructor(t,n=false){if(!Ze("String",t)&&!Ze("RegExp",t))throw new Error("Expected is not a String or a RegExp");super(new RegExp(t),n);}asymmetricMatch(t){let n=Ze("String",t)&&this.sample.test(t);return this.inverse?!n:n}toString(){return `String${this.inverse?"Not":""}Matching`}getExpectedType(){return "string"}},Br=class extends Ge{static{i(this,"CloseTo");}precision;constructor(t,n=2,r=false){if(!Ze("Number",t))throw new Error("Expected is not a Number");if(!Ze("Number",n))throw new Error("Precision is not a Number");super(t),this.inverse=r,this.precision=n;}asymmetricMatch(t){if(!Ze("Number",t))return false;let n=false;return t===Number.POSITIVE_INFINITY&&this.sample===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY&&this.sample===Number.NEGATIVE_INFINITY?n=true:n=Math.abs(this.sample-t)<10**-this.precision/2,this.inverse?!n:n}toString(){return `Number${this.inverse?"Not":""}CloseTo`}getExpectedType(){return "number"}toAsymmetricMatcher(){return [this.toString(),this.sample,`(${Py("digit",this.precision)})`].join(" ")}},qr=class extends Ge{static{i(this,"SchemaMatching");}result;constructor(t,n=false){if(!jy(t))throw new TypeError("SchemaMatching expected to receive a Standard Schema.");super(t,n);}asymmetricMatch(t){let n=this.sample["~standard"].validate(t);if(n instanceof Promise)throw new TypeError("Async schema validation is not supported in asymmetric matchers.");this.result=n;let r=!this.result.issues||this.result.issues.length===0;return this.inverse?!r:r}toString(){return `Schema${this.inverse?"Not":""}Matching`}getExpectedType(){return "object"}toAsymmetricMatcher(){let{utils:t}=this.getMatcherContext();return (this.result?.issues||[]).length>0?`${this.toString()} ${t.stringify(this.result,void 0,{printBasicPrototype:false})}`:this.toString()}},pf=i((e,t)=>{t.addMethod(e.expect,"anything",()=>new xi),t.addMethod(e.expect,"any",n=>new ki(n)),t.addMethod(e.expect,"stringContaining",n=>new jr(n)),t.addMethod(e.expect,"objectContaining",n=>new Fr(n)),t.addMethod(e.expect,"arrayContaining",n=>new Dr(n)),t.addMethod(e.expect,"stringMatching",n=>new Lr(n)),t.addMethod(e.expect,"closeTo",(n,r)=>new Br(n,r)),t.addMethod(e.expect,"schemaMatching",n=>new qr(n)),e.expect.not={stringContaining:i(n=>new jr(n,true),"stringContaining"),objectContaining:i(n=>new Fr(n,true),"objectContaining"),arrayContaining:i(n=>new Dr(n,true),"arrayContaining"),stringMatching:i(n=>new Lr(n,true),"stringMatching"),closeTo:i((n,r)=>new Br(n,r,true),"closeTo"),schemaMatching:i(n=>new qr(n,true),"schemaMatching")};},"JestAsymmetricMatchers");function Ur(e,t,n){let r=e.flag(t,"soft")?".soft":"",o=e.flag(t,"negate")?"not.":"",s=`${e.flag(t,"_name")}(${n?"expected":""})`,a=e.flag(t,"promise"),l=a?`.${a}`:"";return `expect${r}(actual)${l}.${o}${s}`}i(Ur,"createAssertionMessage");function zr(e,t,n,r,o){let s=e;if(s&&t instanceof Promise){t=t.finally(()=>{if(!s.promises)return;let l=s.promises.indexOf(t);l!==-1&&s.promises.splice(l,1);}),s.promises||(s.promises=[]),o&&(t=t.then(Ao,l=>{_i(s,l);})),s.promises.push(t);let a=false;return s.onFinished??=[],s.onFinished.push(()=>{if(!a){let c=(globalThis.__vitest_worker__?.onFilterStackTrace||(u=>u||""))(r.stack);console.warn([`Promise returned by \`${n}\` was not awaited. `,"Vitest currently auto-awaits hanging assertions at the end of the test, but this will cause the test to fail in the next Vitest major. ",`Please remember to await the assertion.
112
- `,c].join(""));}}),{then(l,c){return a=true,t.then(l,c)},catch(l){return a=true,t.catch(l)},finally(l){return a=true,t.finally(l)},[Symbol.toStringTag]:"Promise"}}return t}i(zr,"recordAsyncExpect");function _i(e,t){e.result||={state:"fail"},e.result.state="fail",e.result.errors||=[],e.result.errors.push(Uo(t));}i(_i,"handleTestError");function $t(e,t,n){return function(...r){if(t!=="withTest"&&e.flag(this,"_name",t),!e.flag(this,"soft"))try{return n.apply(this,r)}finally{}let o=e.flag(this,"vitest-test");if(!o)throw new Error("expect.soft() can only be used inside a test");try{let s=n.apply(this,r);return s&&typeof s=="object"&&typeof s.then=="function"?s.then(Ao,a=>{_i(o,a);}):s}catch(s){_i(o,s);}}}i($t,"wrapAssertion");var mf=i((e,t)=>{let{AssertionError:n}=e,r=Ci();function o(u,f){let h=i(p=>{let d=$t(t,p,f);t.addMethod(e.Assertion.prototype,p,d),t.addMethod(globalThis[An].matchers,p,d);},"addMethod");Array.isArray(u)?u.forEach(p=>h(p)):h(u);}i(o,"def"),["throw","throws","Throw"].forEach(u=>{t.overwriteMethod(e.Assertion.prototype,u,f=>function(...h){let p=t.flag(this,"promise"),d=t.flag(this,"object"),g=t.flag(this,"negate");if(p==="rejects")t.flag(this,"object",()=>{throw d});else if(p==="resolves"&&typeof d!="function"){if(g)return;{let m=t.flag(this,"message")||"expected promise to throw an error, but it didn't",b={showDiff:false};throw new n(m,b,t.flag(this,"ssfi"))}}f.apply(this,h);});}),o("withTest",function(u){return t.flag(this,"vitest-test",u),this}),o("toEqual",function(u){let f=t.flag(this,"object"),h=H(f,u,[...r,ke]);return this.assert(h,"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",u,f)}),o("toStrictEqual",function(u){let f=t.flag(this,"object"),h=H(f,u,[...r,ke,nf,vi,rf],true);return this.assert(h,"expected #{this} to strictly equal #{exp}","expected #{this} to not strictly equal #{exp}",u,f)}),o("toBe",function(u){let f=this._obj,h=Object.is(f,u),p="";return h||(H(f,u,[...r,ke,nf,vi,rf],true)?p="toStrictEqual":H(f,u,[...r,ke])&&(p="toEqual")),this.assert(h,Ny(p),"expected #{this} not to be #{exp} // Object.is equality",u,f)}),o("toMatchObject",function(u){let f=this._obj,h=H(f,u,[...r,ke,At]),p=t.flag(this,"negate"),{subset:d,stripped:g}=Ry(f,u,r);if(h&&p||!h&&!p){let m=t.getMessage(this,[h,"expected #{this} to match object #{exp}","expected #{this} to not match object #{exp}",u,d,false]),b=g===0?m:`${m}
113
- (${g} matching ${g===1?"property":"properties"} omitted from actual)`;throw new n(b,{showDiff:true,expected:u,actual:d})}}),o("toMatch",function(u){let f=this._obj;if(typeof f!="string")throw new TypeError(`.toMatch() expects to receive a string, but got ${typeof f}`);return this.assert(typeof u=="string"?f.includes(u):f.match(u),"expected #{this} to match #{exp}","expected #{this} not to match #{exp}",u,f)}),o("toContain",function(u){let f=this._obj;if(typeof Node<"u"&&f instanceof Node){if(!(u instanceof Node))throw new TypeError(`toContain() expected a DOM node as the argument, but got ${typeof u}`);return this.assert(f.contains(u),"expected #{this} to contain element #{exp}","expected #{this} not to contain element #{exp}",u,f)}if(typeof DOMTokenList<"u"&&f instanceof DOMTokenList){de(u,"class name",["string"]);let p=t.flag(this,"negate")?f.value.replace(u,"").trim():`${f.value} ${u}`;return this.assert(f.contains(u),`expected "${f.value}" to contain "${u}"`,`expected "${f.value}" not to contain "${u}"`,p,f.value)}return typeof f=="string"&&typeof u=="string"?this.assert(f.includes(u),"expected #{this} to contain #{exp}","expected #{this} not to contain #{exp}",u,f):(f!=null&&typeof f!="string"&&t.flag(this,"object",Array.from(f)),this.contain(u))}),o("toContainEqual",function(u){let f=t.flag(this,"object"),h=Array.from(f).findIndex(p=>H(p,u,r));this.assert(h!==-1,"expected #{this} to deep equally contain #{exp}","expected #{this} to not deep equally contain #{exp}",u);}),o("toBeTruthy",function(){let u=t.flag(this,"object");this.assert(!!u,"expected #{this} to be truthy","expected #{this} to not be truthy",true,u);}),o("toBeFalsy",function(){let u=t.flag(this,"object");this.assert(!u,"expected #{this} to be falsy","expected #{this} to not be falsy",false,u);}),o("toBeGreaterThan",function(u){let f=this._obj;return de(f,"actual",["number","bigint"]),de(u,"expected",["number","bigint"]),this.assert(f>u,`expected ${f} to be greater than ${u}`,`expected ${f} to be not greater than ${u}`,u,f,false)}),o("toBeGreaterThanOrEqual",function(u){let f=this._obj;return de(f,"actual",["number","bigint"]),de(u,"expected",["number","bigint"]),this.assert(f>=u,`expected ${f} to be greater than or equal to ${u}`,`expected ${f} to be not greater than or equal to ${u}`,u,f,false)}),o("toBeLessThan",function(u){let f=this._obj;return de(f,"actual",["number","bigint"]),de(u,"expected",["number","bigint"]),this.assert(f<u,`expected ${f} to be less than ${u}`,`expected ${f} to be not less than ${u}`,u,f,false)}),o("toBeLessThanOrEqual",function(u){let f=this._obj;return de(f,"actual",["number","bigint"]),de(u,"expected",["number","bigint"]),this.assert(f<=u,`expected ${f} to be less than or equal to ${u}`,`expected ${f} to be not less than or equal to ${u}`,u,f,false)}),o("toBeNaN",function(){let u=t.flag(this,"object");this.assert(Number.isNaN(u),"expected #{this} to be NaN","expected #{this} not to be NaN",Number.NaN,u);}),o("toBeUndefined",function(){let u=t.flag(this,"object");this.assert(u===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined",void 0,u);}),o("toBeNull",function(){let u=t.flag(this,"object");this.assert(u===null,"expected #{this} to be null","expected #{this} not to be null",null,u);}),o("toBeNullable",function(){let u=t.flag(this,"object");this.assert(u==null,"expected #{this} to be nullish","expected #{this} not to be nullish",null,u);}),o("toBeDefined",function(){let u=t.flag(this,"object");this.assert(typeof u<"u","expected #{this} to be defined","expected #{this} to be undefined",u);}),o("toBeTypeOf",function(u){let f=typeof this._obj,h=u===f;return this.assert(h,"expected #{this} to be type of #{exp}","expected #{this} not to be type of #{exp}",u,f)}),o("toBeInstanceOf",function(u){return this.instanceOf(u)}),o("toHaveLength",function(u){return this.have.length(u)}),o("toHaveProperty",function(...u){Array.isArray(u[0])&&(u[0]=u[0].map(_=>String(_).replace(/([.[\]])/g,"\\$1")).join("."));let f=this._obj,[h,p]=u,d=i(()=>Object.hasOwn(f,h)?{value:f[h],exists:true}:t.getPathInfo(f,h),"getValue"),{value:g,exists:m}=d(),b=m&&(u.length===1||H(p,g,r)),S=u.length===1?"":` with value ${t.objDisplay(p)}`;return this.assert(b,`expected #{this} to have property "${h}"${S}`,`expected #{this} to not have property "${h}"${S}`,p,m?g:void 0)}),o("toBeCloseTo",function(u,f=2){let h=this._obj,p=false,d=0,g=0;return u===Number.POSITIVE_INFINITY&&h===Number.POSITIVE_INFINITY||u===Number.NEGATIVE_INFINITY&&h===Number.NEGATIVE_INFINITY?p=true:(d=10**-f/2,g=Math.abs(h-u),p=g<d),this.assert(p,`expected #{this} to be close to #{exp}, received difference is ${g}, but expected ${d}`,`expected #{this} to not be close to #{exp}, received difference is ${g}, but expected ${d}`,u,h,false)});function s(u){if(!mt(u._obj))throw new TypeError(`${t.inspect(u._obj)} is not a spy or a call to a spy!`)}i(s,"assertIsMock");function a(u){return s(u),u._obj}i(a,"getSpy"),o(["toHaveBeenCalledTimes","toBeCalledTimes"],function(u){let f=a(this),h=f.getMockName(),p=f.mock.calls.length;return this.assert(p===u,`expected "${h}" to be called #{exp} times, but got ${p} times`,`expected "${h}" to not be called #{exp} times`,u,p,false)}),o("toHaveBeenCalledOnce",function(){let u=a(this),f=u.getMockName(),h=u.mock.calls.length;return this.assert(h===1,`expected "${f}" to be called once, but got ${h} times`,`expected "${f}" to not be called once`,1,h,false)}),o(["toHaveBeenCalled","toBeCalled"],function(){let u=a(this),f=u.getMockName(),h=u.mock.calls.length,p=h>0,d=t.flag(this,"negate"),g=t.getMessage(this,[p,`expected "${f}" to be called at least once`,`expected "${f}" to not be called at all, but actually been called ${h} times`,true,p]);if(p&&d&&(g=Ei(u,g)),p&&d||!p&&!d)throw new n(g)});function l(u,f){return u.length===f.length&&u.every((h,p)=>H(h,f[p],[...r,ke]))}i(l,"equalsArgumentArray"),o(["toHaveBeenCalledWith","toBeCalledWith"],function(...u){let f=a(this),h=f.getMockName(),p=f.mock.calls.some(m=>l(m,u)),d=t.flag(this,"negate"),g=t.getMessage(this,[p,`expected "${h}" to be called with arguments: #{exp}`,`expected "${h}" to not be called with arguments: #{exp}`,u]);if(p&&d||!p&&!d)throw new n(Ei(f,g,u))}),o("toHaveBeenCalledExactlyOnceWith",function(...u){let f=a(this),h=f.getMockName(),p=f.mock.calls.length,g=f.mock.calls.some(S=>l(S,u))&&p===1,m=t.flag(this,"negate"),b=t.getMessage(this,[g,`expected "${h}" to be called once with arguments: #{exp}`,`expected "${h}" to not be called once with arguments: #{exp}`,u]);if(g&&m||!g&&!m)throw new n(Ei(f,b,u))}),o("toHaveBeenNthCalledWith",function(u,...f){let h=a(this),p=h.getMockName(),d=h.mock.calls[u-1],g=h.mock.calls.length,m=u<=g;this.assert(d&&l(d,f),`expected ${lt(u)} "${p}" call to have been called with #{exp}${m?"":`, but called only ${g} times`}`,`expected ${lt(u)} "${p}" call to not have been called with #{exp}`,f,d,m);}),o("toHaveBeenLastCalledWith",function(...u){let f=a(this),h=f.getMockName(),p=f.mock.calls.at(-1);this.assert(p&&l(p,u),`expected last "${h}" call to have been called with #{exp}`,`expected last "${h}" call to not have been called with #{exp}`,u,p);});function c(u,f,h){let p=u.mock.invocationCallOrder,d=f.mock.invocationCallOrder;return p.length===0?!h:d.length===0?false:p[0]<d[0]}i(c,"isSpyCalledBeforeAnotherSpy"),o(["toHaveBeenCalledBefore"],function(u,f=true){let h=a(this);if(!mt(u))throw new TypeError(`${t.inspect(u)} is not a spy or a call to a spy`);this.assert(c(h,u,f),`expected "${h.getMockName()}" to have been called before "${u.getMockName()}"`,`expected "${h.getMockName()}" to not have been called before "${u.getMockName()}"`,u,h);}),o(["toHaveBeenCalledAfter"],function(u,f=true){let h=a(this);if(!mt(u))throw new TypeError(`${t.inspect(u)} is not a spy or a call to a spy`);this.assert(c(u,h,f),`expected "${h.getMockName()}" to have been called after "${u.getMockName()}"`,`expected "${h.getMockName()}" to not have been called after "${u.getMockName()}"`,u,h);}),o(["toThrow","toThrowError"],function(u){if(typeof u=="string"||typeof u>"u"||u instanceof RegExp)return this.throws(u===""?/^$/:u);let f=this._obj,h=t.flag(this,"promise"),p=t.flag(this,"negate"),d=null;if(h==="rejects")d=f;else if(h==="resolves"&&typeof f!="function"){if(p)return;{let m=t.flag(this,"message")||"expected promise to throw an error, but it didn't",b={showDiff:false};throw new n(m,b,t.flag(this,"ssfi"))}}else {let m=false;try{f();}catch(b){m=true,d=b;}if(!m&&!p){let b=t.flag(this,"message")||"expected function to throw an error, but it didn't",S={showDiff:false};throw new n(b,S,t.flag(this,"ssfi"))}}if(typeof u=="function"){let m=u.name||u.prototype.constructor.name;return this.assert(d&&d instanceof u,`expected error to be instance of ${m}`,`expected error not to be instance of ${m}`,u,d)}if(Jt(u)){let m=H(d,u,[...r,ke]);return this.assert(m,"expected a thrown error to be #{exp}","expected a thrown error not to be #{exp}",u,d)}if(typeof u=="object"&&"asymmetricMatch"in u&&typeof u.asymmetricMatch=="function"){let m=u;return this.assert(d&&m.asymmetricMatch(d),"expected error to match asymmetric matcher","expected error not to match asymmetric matcher",m,d)}let g=H(d,u,[...r,ke]);return this.assert(g,"expected a thrown value to equal #{exp}","expected a thrown value not to equal #{exp}",u,d)}),[{name:"toHaveResolved",condition:i(u=>u.mock.settledResults.length>0&&u.mock.settledResults.some(({type:f})=>f==="fulfilled"),"condition"),action:"resolved"},{name:["toHaveReturned","toReturn"],condition:i(u=>u.mock.calls.length>0&&u.mock.results.some(({type:f})=>f!=="throw"),"condition"),action:"called"}].forEach(({name:u,condition:f,action:h})=>{o(u,function(){let p=a(this),d=p.getMockName(),g=f(p);this.assert(g,`expected "${d}" to be successfully ${h} at least once`,`expected "${d}" to not be successfully ${h}`,g,!g,false);});}),[{name:"toHaveResolvedTimes",condition:i((u,f)=>u.mock.settledResults.reduce((h,{type:p})=>p==="fulfilled"?++h:h,0)===f,"condition"),action:"resolved"},{name:["toHaveReturnedTimes","toReturnTimes"],condition:i((u,f)=>u.mock.results.reduce((h,{type:p})=>p==="throw"?h:++h,0)===f,"condition"),action:"called"}].forEach(({name:u,condition:f,action:h})=>{o(u,function(p){let d=a(this),g=d.getMockName(),m=f(d,p);this.assert(m,`expected "${g}" to be successfully ${h} ${p} times`,`expected "${g}" to not be successfully ${h} ${p} times`,`expected resolved times: ${p}`,`received resolved times: ${m}`,false);});}),[{name:"toHaveResolvedWith",condition:i((u,f)=>u.mock.settledResults.some(({type:h,value:p})=>h==="fulfilled"&&H(f,p)),"condition"),action:"resolve"},{name:["toHaveReturnedWith","toReturnWith"],condition:i((u,f)=>u.mock.results.some(({type:h,value:p})=>h==="return"&&H(f,p)),"condition"),action:"return"}].forEach(({name:u,condition:f,action:h})=>{o(u,function(p){let d=a(this),g=f(d,p),m=t.flag(this,"negate");if(g&&m||!g&&!m){let b=d.getMockName(),S=t.getMessage(this,[g,`expected "${b}" to ${h} with: #{exp} at least once`,`expected "${b}" to not ${h} with: #{exp}`,p]),_=h==="return"?d.mock.results:d.mock.settledResults;throw new n(Fy(d,_,S,p))}});}),[{name:"toHaveLastResolvedWith",condition:i((u,f)=>{let h=u.mock.settledResults.at(-1);return !!(h&&h.type==="fulfilled"&&H(h.value,f))},"condition"),action:"resolve"},{name:"toHaveLastReturnedWith",condition:i((u,f)=>{let h=u.mock.results.at(-1);return !!(h&&h.type==="return"&&H(h.value,f))},"condition"),action:"return"}].forEach(({name:u,condition:f,action:h})=>{o(u,function(p){let d=a(this),m=(h==="return"?d.mock.results:d.mock.settledResults).at(-1),b=d.getMockName();this.assert(f(d,p),`expected last "${b}" call to ${h} #{exp}`,`expected last "${b}" call to not ${h} #{exp}`,p,m?.value);});}),[{name:"toHaveNthResolvedWith",condition:i((u,f,h)=>{let p=u.mock.settledResults[f-1];return p&&p.type==="fulfilled"&&H(p.value,h)},"condition"),action:"resolve"},{name:"toHaveNthReturnedWith",condition:i((u,f,h)=>{let p=u.mock.results[f-1];return p&&p.type==="return"&&H(p.value,h)},"condition"),action:"return"}].forEach(({name:u,condition:f,action:h})=>{o(u,function(p,d){let g=a(this),m=g.getMockName(),S=(h==="return"?g.mock.results:g.mock.settledResults)[p-1],_=`${lt(p)} call`;this.assert(f(g,p,d),`expected ${_} "${m}" call to ${h} #{exp}`,`expected ${_} "${m}" call to not ${h} #{exp}`,d,S?.value);});}),o("withContext",function(u){for(let f in u)t.flag(this,f,u[f]);return this}),t.addProperty(e.Assertion.prototype,"resolves",i(function(){let f=new Error("resolves");t.flag(this,"promise","resolves"),t.flag(this,"error",f);let h=t.flag(this,"vitest-test"),p=t.flag(this,"object");if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .resolves");if(typeof p?.then!="function")throw new TypeError(`You must provide a Promise to expect() when using .resolves, not '${typeof p}'.`);let d=new Proxy(this,{get:i((g,m,b)=>{let S=Reflect.get(g,m,b);return typeof S!="function"?S instanceof e.Assertion?d:S:(..._)=>{t.flag(this,"_name",m);let A=Promise.resolve(p).then(M=>(t.flag(this,"object",M),S.call(this,..._)),M=>{let O=new n(`promise rejected "${t.inspect(M)}" instead of resolving`,{showDiff:false});throw O.cause=M,O}).catch(M=>{throw Jt(M)&&f.stack&&(M.stack=f.stack.replace(f.message,M.message)),M});return zr(h,A,Ur(t,this,!!_.length),f,t.flag(this,"soft"))}},"get")});return d},"__VITEST_RESOLVES__")),t.addProperty(e.Assertion.prototype,"rejects",i(function(){let f=new Error("rejects");t.flag(this,"promise","rejects"),t.flag(this,"error",f);let h=t.flag(this,"vitest-test"),p=t.flag(this,"object"),d=typeof p=="function"?p():p;if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .rejects");if(typeof d?.then!="function")throw new TypeError(`You must provide a Promise to expect() when using .rejects, not '${typeof d}'.`);let g=new Proxy(this,{get:i((m,b,S)=>{let _=Reflect.get(m,b,S);return typeof _!="function"?_ instanceof e.Assertion?g:_:(...A)=>{t.flag(this,"_name",b);let M=Promise.resolve(d).then(O=>{throw new n(`promise resolved "${t.inspect(O)}" instead of rejecting`,{showDiff:true,expected:new Error("rejected promise"),actual:O})},O=>(t.flag(this,"object",O),_.call(this,...A))).catch(O=>{throw Jt(O)&&f.stack&&(O.stack=f.stack.replace(f.message,O.message)),O});return zr(h,M,Ur(t,this,!!A.length),f,t.flag(this,"soft"))}},"get")});return g},"__VITEST_REJECTS__"));},"JestChaiExpect");function Ei(e,t,n){return e.mock.calls.length&&(t+=se.gray(`
111
+ `:r}i(Sy,"generateToBeMessage");function Ey(e,t){return `${t} ${e}${t===1?"":"s"}`}i(Ey,"pluralize");function bi(e){return [...Object.keys(e),...Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t)?.enumerable)]}i(bi,"getObjectKeys");function vy(e,t,n){let r=0,o=i((s=new WeakMap)=>(a,l)=>{if(Array.isArray(a)){if(Array.isArray(l)&&l.length===a.length)return l.map((c,u)=>o(s)(a[u],c))}else {if(a instanceof Date)return a;if(Le(a)&&Le(l)){if(K(a,l,[...n,ke,At]))return l;let c={};s.set(a,c),typeof a.constructor=="function"&&typeof a.constructor.name=="string"&&Object.defineProperty(c,"constructor",{enumerable:false,value:a.constructor});for(let u of bi(a))Ci(l,u)?c[u]=s.has(a[u])?s.get(a[u]):o(s)(a[u],l[u]):s.has(a[u])||(r+=1,Le(a[u])&&(r+=bi(a[u]).length),o(s)(a[u],l[u]));if(bi(c).length>0)return c}}return a},"getObjectSubsetWithContext");return {subset:o()(e,t),stripped:r}}i(vy,"getObjectSubset");function xy(e){return !!e&&(typeof e=="object"||typeof e=="function")&&e["~standard"]&&typeof e["~standard"].validate=="function"}i(xy,"isStandardSchema");if(!Object.hasOwn(globalThis,Pr)){let e=new WeakMap,t=Object.create(null),n=[],r=Object.create(null);Object.defineProperty(globalThis,Pr,{get:i(()=>e,"get")}),Object.defineProperty(globalThis,In,{configurable:true,get:i(()=>({state:e.get(globalThis[An]),matchers:t,customEqualityTesters:n}),"get")}),Object.defineProperty(globalThis,Vr,{get:i(()=>r,"get")});}function Gt(e){return globalThis[Pr].get(e)}i(Gt,"getState");function Gr(e,t){let n=globalThis[Pr],r=n.get(t)||{},o=Object.defineProperties(r,{...Object.getOwnPropertyDescriptors(r),...Object.getOwnPropertyDescriptors(e)});n.set(t,o);}i(Gr,"setState");var Ge=class{static{i(this,"AsymmetricMatcher");}$$typeof=Symbol.for("jest.asymmetricMatcher");constructor(t,n=false){this.sample=t,this.inverse=n;}getMatcherContext(t){return {...Gt(t||globalThis[An]),equals:K,isNot:this.inverse,customTesters:Mi(),utils:{...tf(),diff:_t,stringify:ye,iterableEquality:ke,subsetEquality:At}}}};Ge.prototype[Symbol.for("chai/inspect")]=function(e){let t=ye(this,e.depth,{min:true});return t.length<=e.truncate?t:`${this.toString()}{\u2026}`};var jr=class extends Ge{static{i(this,"StringContaining");}constructor(t,n=false){if(!Ze("String",t))throw new Error("Expected is not a string");super(t,n);}asymmetricMatch(t){let n=Ze("String",t)&&t.includes(this.sample);return this.inverse?!n:n}toString(){return `String${this.inverse?"Not":""}Containing`}getExpectedType(){return "string"}},Ei=class extends Ge{static{i(this,"Anything");}asymmetricMatch(t){return t!=null}toString(){return "Anything"}toAsymmetricMatcher(){return "Anything"}},Fr=class extends Ge{static{i(this,"ObjectContaining");}constructor(t,n=false){super(t,n);}getPrototype(t){return Object.getPrototypeOf?Object.getPrototypeOf(t):t.constructor.prototype===t?null:t.constructor.prototype}hasProperty(t,n){return t?Object.hasOwn(t,n)?true:this.hasProperty(this.getPrototype(t),n):false}getProperties(t){return [...Object.keys(t),...Object.getOwnPropertySymbols(t).filter(n=>Object.getOwnPropertyDescriptor(t,n)?.enumerable)]}asymmetricMatch(t,n){if(typeof this.sample!="object")throw new TypeError(`You must provide an object to ${this.toString()}, not '${typeof this.sample}'.`);let r=true,o=this.getProperties(this.sample);for(let s of o){if(!this.hasProperty(t,s)){r=false;break}let a=this.sample[s],l=t[s];if(!K(a,l,n)){r=false;break}}return this.inverse?!r:r}toString(){return `Object${this.inverse?"Not":""}Containing`}getExpectedType(){return "object"}},Dr=class extends Ge{static{i(this,"ArrayContaining");}constructor(t,n=false){super(t,n);}asymmetricMatch(t,n){if(!Array.isArray(this.sample))throw new TypeError(`You must provide an array to ${this.toString()}, not '${typeof this.sample}'.`);let r=this.sample.length===0||Array.isArray(t)&&this.sample.every(o=>t.some(s=>K(o,s,n)));return this.inverse?!r:r}toString(){return `Array${this.inverse?"Not":""}Containing`}getExpectedType(){return "array"}},vi=class extends Ge{static{i(this,"Any");}constructor(t){if(typeof t>"u")throw new TypeError("any() expects to be passed a constructor function. Please pass one or use anything() to match any object.");super(t);}fnNameFor(t){if(t.name)return t.name;let r=Function.prototype.toString.call(t).match(/^(?:async)?\s*function\s*(?:\*\s*)?([\w$]+)\s*\(/);return r?r[1]:"<anonymous>"}asymmetricMatch(t){return this.sample===String?typeof t=="string"||t instanceof String:this.sample===Number?typeof t=="number"||t instanceof Number:this.sample===Function?typeof t=="function"||typeof t=="function":this.sample===Boolean?typeof t=="boolean"||t instanceof Boolean:this.sample===BigInt?typeof t=="bigint"||t instanceof BigInt:this.sample===Symbol?typeof t=="symbol"||t instanceof Symbol:this.sample===Object?typeof t=="object":t instanceof this.sample}toString(){return "Any"}getExpectedType(){return this.sample===String?"string":this.sample===Number?"number":this.sample===Function?"function":this.sample===Object?"object":this.sample===Boolean?"boolean":this.fnNameFor(this.sample)}toAsymmetricMatcher(){return `Any<${this.fnNameFor(this.sample)}>`}},Lr=class extends Ge{static{i(this,"StringMatching");}constructor(t,n=false){if(!Ze("String",t)&&!Ze("RegExp",t))throw new Error("Expected is not a String or a RegExp");super(new RegExp(t),n);}asymmetricMatch(t){let n=Ze("String",t)&&this.sample.test(t);return this.inverse?!n:n}toString(){return `String${this.inverse?"Not":""}Matching`}getExpectedType(){return "string"}},Br=class extends Ge{static{i(this,"CloseTo");}precision;constructor(t,n=2,r=false){if(!Ze("Number",t))throw new Error("Expected is not a Number");if(!Ze("Number",n))throw new Error("Precision is not a Number");super(t),this.inverse=r,this.precision=n;}asymmetricMatch(t){if(!Ze("Number",t))return false;let n=false;return t===Number.POSITIVE_INFINITY&&this.sample===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY&&this.sample===Number.NEGATIVE_INFINITY?n=true:n=Math.abs(this.sample-t)<10**-this.precision/2,this.inverse?!n:n}toString(){return `Number${this.inverse?"Not":""}CloseTo`}getExpectedType(){return "number"}toAsymmetricMatcher(){return [this.toString(),this.sample,`(${Ey("digit",this.precision)})`].join(" ")}},qr=class extends Ge{static{i(this,"SchemaMatching");}result;constructor(t,n=false){if(!xy(t))throw new TypeError("SchemaMatching expected to receive a Standard Schema.");super(t,n);}asymmetricMatch(t){let n=this.sample["~standard"].validate(t);if(n instanceof Promise)throw new TypeError("Async schema validation is not supported in asymmetric matchers.");this.result=n;let r=!this.result.issues||this.result.issues.length===0;return this.inverse?!r:r}toString(){return `Schema${this.inverse?"Not":""}Matching`}getExpectedType(){return "object"}toAsymmetricMatcher(){let{utils:t}=this.getMatcherContext();return (this.result?.issues||[]).length>0?`${this.toString()} ${t.stringify(this.result,void 0,{printBasicPrototype:false})}`:this.toString()}},cf=i((e,t)=>{t.addMethod(e.expect,"anything",()=>new Ei),t.addMethod(e.expect,"any",n=>new vi(n)),t.addMethod(e.expect,"stringContaining",n=>new jr(n)),t.addMethod(e.expect,"objectContaining",n=>new Fr(n)),t.addMethod(e.expect,"arrayContaining",n=>new Dr(n)),t.addMethod(e.expect,"stringMatching",n=>new Lr(n)),t.addMethod(e.expect,"closeTo",(n,r)=>new Br(n,r)),t.addMethod(e.expect,"schemaMatching",n=>new qr(n)),e.expect.not={stringContaining:i(n=>new jr(n,true),"stringContaining"),objectContaining:i(n=>new Fr(n,true),"objectContaining"),arrayContaining:i(n=>new Dr(n,true),"arrayContaining"),stringMatching:i(n=>new Lr(n,true),"stringMatching"),closeTo:i((n,r)=>new Br(n,r,true),"closeTo"),schemaMatching:i(n=>new qr(n,true),"schemaMatching")};},"JestAsymmetricMatchers");function Ur(e,t,n){let r=e.flag(t,"soft")?".soft":"",o=e.flag(t,"negate")?"not.":"",s=`${e.flag(t,"_name")}(${n?"expected":""})`,a=e.flag(t,"promise"),l=a?`.${a}`:"";return `expect${r}(actual)${l}.${o}${s}`}i(Ur,"createAssertionMessage");function zr(e,t,n,r,o){let s=e;if(s&&t instanceof Promise){t=t.finally(()=>{if(!s.promises)return;let l=s.promises.indexOf(t);l!==-1&&s.promises.splice(l,1);}),s.promises||(s.promises=[]),o&&(t=t.then(Oo,l=>{xi(s,l);})),s.promises.push(t);let a=false;return s.onFinished??=[],s.onFinished.push(()=>{if(!a){let c=(globalThis.__vitest_worker__?.onFilterStackTrace||(u=>u||""))(r.stack);console.warn([`Promise returned by \`${n}\` was not awaited. `,"Vitest currently auto-awaits hanging assertions at the end of the test, but this will cause the test to fail in the next Vitest major. ",`Please remember to await the assertion.
112
+ `,c].join(""));}}),{then(l,c){return a=true,t.then(l,c)},catch(l){return a=true,t.catch(l)},finally(l){return a=true,t.finally(l)},[Symbol.toStringTag]:"Promise"}}return t}i(zr,"recordAsyncExpect");function xi(e,t){e.result||={state:"fail"},e.result.state="fail",e.result.errors||=[],e.result.errors.push(Bo(t));}i(xi,"handleTestError");function $t(e,t,n){return function(...r){if(t!=="withTest"&&e.flag(this,"_name",t),!e.flag(this,"soft"))try{return n.apply(this,r)}finally{}let o=e.flag(this,"vitest-test");if(!o)throw new Error("expect.soft() can only be used inside a test");try{let s=n.apply(this,r);return s&&typeof s=="object"&&typeof s.then=="function"?s.then(Oo,a=>{xi(o,a);}):s}catch(s){xi(o,s);}}}i($t,"wrapAssertion");var lf=i((e,t)=>{let{AssertionError:n}=e,r=Mi();function o(u,f){let h=i(d=>{let p=$t(t,d,f);t.addMethod(e.Assertion.prototype,d,p),t.addMethod(globalThis[In].matchers,d,p);},"addMethod");Array.isArray(u)?u.forEach(d=>h(d)):h(u);}i(o,"def"),["throw","throws","Throw"].forEach(u=>{t.overwriteMethod(e.Assertion.prototype,u,f=>function(...h){let d=t.flag(this,"promise"),p=t.flag(this,"object"),g=t.flag(this,"negate");if(d==="rejects")t.flag(this,"object",()=>{throw p});else if(d==="resolves"&&typeof p!="function"){if(g)return;{let m=t.flag(this,"message")||"expected promise to throw an error, but it didn't",b={showDiff:false};throw new n(m,b,t.flag(this,"ssfi"))}}f.apply(this,h);});}),o("withTest",function(u){return t.flag(this,"vitest-test",u),this}),o("toEqual",function(u){let f=t.flag(this,"object"),h=K(f,u,[...r,ke]);return this.assert(h,"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",u,f)}),o("toStrictEqual",function(u){let f=t.flag(this,"object"),h=K(f,u,[...r,ke,Yu,Si,Xu],true);return this.assert(h,"expected #{this} to strictly equal #{exp}","expected #{this} to not strictly equal #{exp}",u,f)}),o("toBe",function(u){let f=this._obj,h=Object.is(f,u),d="";return h||(K(f,u,[...r,ke,Yu,Si,Xu],true)?d="toStrictEqual":K(f,u,[...r,ke])&&(d="toEqual")),this.assert(h,Sy(d),"expected #{this} not to be #{exp} // Object.is equality",u,f)}),o("toMatchObject",function(u){let f=this._obj,h=K(f,u,[...r,ke,At]),d=t.flag(this,"negate"),{subset:p,stripped:g}=vy(f,u,r);if(h&&d||!h&&!d){let m=t.getMessage(this,[h,"expected #{this} to match object #{exp}","expected #{this} to not match object #{exp}",u,p,false]),b=g===0?m:`${m}
113
+ (${g} matching ${g===1?"property":"properties"} omitted from actual)`;throw new n(b,{showDiff:true,expected:u,actual:p})}}),o("toMatch",function(u){let f=this._obj;if(typeof f!="string")throw new TypeError(`.toMatch() expects to receive a string, but got ${typeof f}`);return this.assert(typeof u=="string"?f.includes(u):f.match(u),"expected #{this} to match #{exp}","expected #{this} not to match #{exp}",u,f)}),o("toContain",function(u){let f=this._obj;if(typeof Node<"u"&&f instanceof Node){if(!(u instanceof Node))throw new TypeError(`toContain() expected a DOM node as the argument, but got ${typeof u}`);return this.assert(f.contains(u),"expected #{this} to contain element #{exp}","expected #{this} not to contain element #{exp}",u,f)}if(typeof DOMTokenList<"u"&&f instanceof DOMTokenList){pe(u,"class name",["string"]);let d=t.flag(this,"negate")?f.value.replace(u,"").trim():`${f.value} ${u}`;return this.assert(f.contains(u),`expected "${f.value}" to contain "${u}"`,`expected "${f.value}" not to contain "${u}"`,d,f.value)}return typeof f=="string"&&typeof u=="string"?this.assert(f.includes(u),"expected #{this} to contain #{exp}","expected #{this} not to contain #{exp}",u,f):(f!=null&&typeof f!="string"&&t.flag(this,"object",Array.from(f)),this.contain(u))}),o("toContainEqual",function(u){let f=t.flag(this,"object"),h=Array.from(f).findIndex(d=>K(d,u,r));this.assert(h!==-1,"expected #{this} to deep equally contain #{exp}","expected #{this} to not deep equally contain #{exp}",u);}),o("toBeTruthy",function(){let u=t.flag(this,"object");this.assert(!!u,"expected #{this} to be truthy","expected #{this} to not be truthy",true,u);}),o("toBeFalsy",function(){let u=t.flag(this,"object");this.assert(!u,"expected #{this} to be falsy","expected #{this} to not be falsy",false,u);}),o("toBeGreaterThan",function(u){let f=this._obj;return pe(f,"actual",["number","bigint"]),pe(u,"expected",["number","bigint"]),this.assert(f>u,`expected ${f} to be greater than ${u}`,`expected ${f} to be not greater than ${u}`,u,f,false)}),o("toBeGreaterThanOrEqual",function(u){let f=this._obj;return pe(f,"actual",["number","bigint"]),pe(u,"expected",["number","bigint"]),this.assert(f>=u,`expected ${f} to be greater than or equal to ${u}`,`expected ${f} to be not greater than or equal to ${u}`,u,f,false)}),o("toBeLessThan",function(u){let f=this._obj;return pe(f,"actual",["number","bigint"]),pe(u,"expected",["number","bigint"]),this.assert(f<u,`expected ${f} to be less than ${u}`,`expected ${f} to be not less than ${u}`,u,f,false)}),o("toBeLessThanOrEqual",function(u){let f=this._obj;return pe(f,"actual",["number","bigint"]),pe(u,"expected",["number","bigint"]),this.assert(f<=u,`expected ${f} to be less than or equal to ${u}`,`expected ${f} to be not less than or equal to ${u}`,u,f,false)}),o("toBeNaN",function(){let u=t.flag(this,"object");this.assert(Number.isNaN(u),"expected #{this} to be NaN","expected #{this} not to be NaN",Number.NaN,u);}),o("toBeUndefined",function(){let u=t.flag(this,"object");this.assert(u===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined",void 0,u);}),o("toBeNull",function(){let u=t.flag(this,"object");this.assert(u===null,"expected #{this} to be null","expected #{this} not to be null",null,u);}),o("toBeNullable",function(){let u=t.flag(this,"object");this.assert(u==null,"expected #{this} to be nullish","expected #{this} not to be nullish",null,u);}),o("toBeDefined",function(){let u=t.flag(this,"object");this.assert(typeof u<"u","expected #{this} to be defined","expected #{this} to be undefined",u);}),o("toBeTypeOf",function(u){let f=typeof this._obj,h=u===f;return this.assert(h,"expected #{this} to be type of #{exp}","expected #{this} not to be type of #{exp}",u,f)}),o("toBeInstanceOf",function(u){return this.instanceOf(u)}),o("toHaveLength",function(u){return this.have.length(u)}),o("toHaveProperty",function(...u){Array.isArray(u[0])&&(u[0]=u[0].map(M=>String(M).replace(/([.[\]])/g,"\\$1")).join("."));let f=this._obj,[h,d]=u,p=i(()=>Object.hasOwn(f,h)?{value:f[h],exists:true}:t.getPathInfo(f,h),"getValue"),{value:g,exists:m}=p(),b=m&&(u.length===1||K(d,g,r)),E=u.length===1?"":` with value ${t.objDisplay(d)}`;return this.assert(b,`expected #{this} to have property "${h}"${E}`,`expected #{this} to not have property "${h}"${E}`,d,m?g:void 0)}),o("toBeCloseTo",function(u,f=2){let h=this._obj,d=false,p=0,g=0;return u===Number.POSITIVE_INFINITY&&h===Number.POSITIVE_INFINITY||u===Number.NEGATIVE_INFINITY&&h===Number.NEGATIVE_INFINITY?d=true:(p=10**-f/2,g=Math.abs(h-u),d=g<p),this.assert(d,`expected #{this} to be close to #{exp}, received difference is ${g}, but expected ${p}`,`expected #{this} to not be close to #{exp}, received difference is ${g}, but expected ${p}`,u,h,false)});function s(u){if(!mt(u._obj))throw new TypeError(`${t.inspect(u._obj)} is not a spy or a call to a spy!`)}i(s,"assertIsMock");function a(u){return s(u),u._obj}i(a,"getSpy"),o(["toHaveBeenCalledTimes","toBeCalledTimes"],function(u){let f=a(this),h=f.getMockName(),d=f.mock.calls.length;return this.assert(d===u,`expected "${h}" to be called #{exp} times, but got ${d} times`,`expected "${h}" to not be called #{exp} times`,u,d,false)}),o("toHaveBeenCalledOnce",function(){let u=a(this),f=u.getMockName(),h=u.mock.calls.length;return this.assert(h===1,`expected "${f}" to be called once, but got ${h} times`,`expected "${f}" to not be called once`,1,h,false)}),o(["toHaveBeenCalled","toBeCalled"],function(){let u=a(this),f=u.getMockName(),h=u.mock.calls.length,d=h>0,p=t.flag(this,"negate"),g=t.getMessage(this,[d,`expected "${f}" to be called at least once`,`expected "${f}" to not be called at all, but actually been called ${h} times`,true,d]);if(d&&p&&(g=Ti(u,g)),d&&p||!d&&!p)throw new n(g)});function l(u,f){return u.length===f.length&&u.every((h,d)=>K(h,f[d],[...r,ke]))}i(l,"equalsArgumentArray"),o(["toHaveBeenCalledWith","toBeCalledWith"],function(...u){let f=a(this),h=f.getMockName(),d=f.mock.calls.some(m=>l(m,u)),p=t.flag(this,"negate"),g=t.getMessage(this,[d,`expected "${h}" to be called with arguments: #{exp}`,`expected "${h}" to not be called with arguments: #{exp}`,u]);if(d&&p||!d&&!p)throw new n(Ti(f,g,u))}),o("toHaveBeenCalledExactlyOnceWith",function(...u){let f=a(this),h=f.getMockName(),d=f.mock.calls.length,g=f.mock.calls.some(E=>l(E,u))&&d===1,m=t.flag(this,"negate"),b=t.getMessage(this,[g,`expected "${h}" to be called once with arguments: #{exp}`,`expected "${h}" to not be called once with arguments: #{exp}`,u]);if(g&&m||!g&&!m)throw new n(Ti(f,b,u))}),o("toHaveBeenNthCalledWith",function(u,...f){let h=a(this),d=h.getMockName(),p=h.mock.calls[u-1],g=h.mock.calls.length,m=u<=g;this.assert(p&&l(p,f),`expected ${lt(u)} "${d}" call to have been called with #{exp}${m?"":`, but called only ${g} times`}`,`expected ${lt(u)} "${d}" call to not have been called with #{exp}`,f,p,m);}),o("toHaveBeenLastCalledWith",function(...u){let f=a(this),h=f.getMockName(),d=f.mock.calls.at(-1);this.assert(d&&l(d,u),`expected last "${h}" call to have been called with #{exp}`,`expected last "${h}" call to not have been called with #{exp}`,u,d);});function c(u,f,h){let d=u.mock.invocationCallOrder,p=f.mock.invocationCallOrder;return d.length===0?!h:p.length===0?false:d[0]<p[0]}i(c,"isSpyCalledBeforeAnotherSpy"),o(["toHaveBeenCalledBefore"],function(u,f=true){let h=a(this);if(!mt(u))throw new TypeError(`${t.inspect(u)} is not a spy or a call to a spy`);this.assert(c(h,u,f),`expected "${h.getMockName()}" to have been called before "${u.getMockName()}"`,`expected "${h.getMockName()}" to not have been called before "${u.getMockName()}"`,u,h);}),o(["toHaveBeenCalledAfter"],function(u,f=true){let h=a(this);if(!mt(u))throw new TypeError(`${t.inspect(u)} is not a spy or a call to a spy`);this.assert(c(u,h,f),`expected "${h.getMockName()}" to have been called after "${u.getMockName()}"`,`expected "${h.getMockName()}" to not have been called after "${u.getMockName()}"`,u,h);}),o(["toThrow","toThrowError"],function(u){if(typeof u=="string"||typeof u>"u"||u instanceof RegExp)return this.throws(u===""?/^$/:u);let f=this._obj,h=t.flag(this,"promise"),d=t.flag(this,"negate"),p=null;if(h==="rejects")p=f;else if(h==="resolves"&&typeof f!="function"){if(d)return;{let m=t.flag(this,"message")||"expected promise to throw an error, but it didn't",b={showDiff:false};throw new n(m,b,t.flag(this,"ssfi"))}}else {let m=false;try{f();}catch(b){m=true,p=b;}if(!m&&!d){let b=t.flag(this,"message")||"expected function to throw an error, but it didn't",E={showDiff:false};throw new n(b,E,t.flag(this,"ssfi"))}}if(typeof u=="function"){let m=u.name||u.prototype.constructor.name;return this.assert(p&&p instanceof u,`expected error to be instance of ${m}`,`expected error not to be instance of ${m}`,u,p)}if(Ht(u)){let m=K(p,u,[...r,ke]);return this.assert(m,"expected a thrown error to be #{exp}","expected a thrown error not to be #{exp}",u,p)}if(typeof u=="object"&&"asymmetricMatch"in u&&typeof u.asymmetricMatch=="function"){let m=u;return this.assert(p&&m.asymmetricMatch(p),"expected error to match asymmetric matcher","expected error not to match asymmetric matcher",m,p)}let g=K(p,u,[...r,ke]);return this.assert(g,"expected a thrown value to equal #{exp}","expected a thrown value not to equal #{exp}",u,p)}),[{name:"toHaveResolved",condition:i(u=>u.mock.settledResults.length>0&&u.mock.settledResults.some(({type:f})=>f==="fulfilled"),"condition"),action:"resolved"},{name:["toHaveReturned","toReturn"],condition:i(u=>u.mock.calls.length>0&&u.mock.results.some(({type:f})=>f!=="throw"),"condition"),action:"called"}].forEach(({name:u,condition:f,action:h})=>{o(u,function(){let d=a(this),p=d.getMockName(),g=f(d);this.assert(g,`expected "${p}" to be successfully ${h} at least once`,`expected "${p}" to not be successfully ${h}`,g,!g,false);});}),[{name:"toHaveResolvedTimes",condition:i((u,f)=>u.mock.settledResults.reduce((h,{type:d})=>d==="fulfilled"?++h:h,0)===f,"condition"),action:"resolved"},{name:["toHaveReturnedTimes","toReturnTimes"],condition:i((u,f)=>u.mock.results.reduce((h,{type:d})=>d==="throw"?h:++h,0)===f,"condition"),action:"called"}].forEach(({name:u,condition:f,action:h})=>{o(u,function(d){let p=a(this),g=p.getMockName(),m=f(p,d);this.assert(m,`expected "${g}" to be successfully ${h} ${d} times`,`expected "${g}" to not be successfully ${h} ${d} times`,`expected resolved times: ${d}`,`received resolved times: ${m}`,false);});}),[{name:"toHaveResolvedWith",condition:i((u,f)=>u.mock.settledResults.some(({type:h,value:d})=>h==="fulfilled"&&K(f,d)),"condition"),action:"resolve"},{name:["toHaveReturnedWith","toReturnWith"],condition:i((u,f)=>u.mock.results.some(({type:h,value:d})=>h==="return"&&K(f,d)),"condition"),action:"return"}].forEach(({name:u,condition:f,action:h})=>{o(u,function(d){let p=a(this),g=f(p,d),m=t.flag(this,"negate");if(g&&m||!g&&!m){let b=p.getMockName(),E=t.getMessage(this,[g,`expected "${b}" to ${h} with: #{exp} at least once`,`expected "${b}" to not ${h} with: #{exp}`,d]),M=h==="return"?p.mock.results:p.mock.settledResults;throw new n(ky(p,M,E,d))}});}),[{name:"toHaveLastResolvedWith",condition:i((u,f)=>{let h=u.mock.settledResults.at(-1);return !!(h&&h.type==="fulfilled"&&K(h.value,f))},"condition"),action:"resolve"},{name:"toHaveLastReturnedWith",condition:i((u,f)=>{let h=u.mock.results.at(-1);return !!(h&&h.type==="return"&&K(h.value,f))},"condition"),action:"return"}].forEach(({name:u,condition:f,action:h})=>{o(u,function(d){let p=a(this),m=(h==="return"?p.mock.results:p.mock.settledResults).at(-1),b=p.getMockName();this.assert(f(p,d),`expected last "${b}" call to ${h} #{exp}`,`expected last "${b}" call to not ${h} #{exp}`,d,m?.value);});}),[{name:"toHaveNthResolvedWith",condition:i((u,f,h)=>{let d=u.mock.settledResults[f-1];return d&&d.type==="fulfilled"&&K(d.value,h)},"condition"),action:"resolve"},{name:"toHaveNthReturnedWith",condition:i((u,f,h)=>{let d=u.mock.results[f-1];return d&&d.type==="return"&&K(d.value,h)},"condition"),action:"return"}].forEach(({name:u,condition:f,action:h})=>{o(u,function(d,p){let g=a(this),m=g.getMockName(),E=(h==="return"?g.mock.results:g.mock.settledResults)[d-1],M=`${lt(d)} call`;this.assert(f(g,d,p),`expected ${M} "${m}" call to ${h} #{exp}`,`expected ${M} "${m}" call to not ${h} #{exp}`,p,E?.value);});}),o("withContext",function(u){for(let f in u)t.flag(this,f,u[f]);return this}),t.addProperty(e.Assertion.prototype,"resolves",i(function(){let f=new Error("resolves");t.flag(this,"promise","resolves"),t.flag(this,"error",f);let h=t.flag(this,"vitest-test"),d=t.flag(this,"object");if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .resolves");if(typeof d?.then!="function")throw new TypeError(`You must provide a Promise to expect() when using .resolves, not '${typeof d}'.`);let p=new Proxy(this,{get:i((g,m,b)=>{let E=Reflect.get(g,m,b);return typeof E!="function"?E instanceof e.Assertion?p:E:(...M)=>{t.flag(this,"_name",m);let A=Promise.resolve(d).then(C=>(t.flag(this,"object",C),E.call(this,...M)),C=>{let O=new n(`promise rejected "${t.inspect(C)}" instead of resolving`,{showDiff:false});throw O.cause=C,O}).catch(C=>{throw Ht(C)&&f.stack&&(C.stack=f.stack.replace(f.message,C.message)),C});return zr(h,A,Ur(t,this,!!M.length),f,t.flag(this,"soft"))}},"get")});return p},"__VITEST_RESOLVES__")),t.addProperty(e.Assertion.prototype,"rejects",i(function(){let f=new Error("rejects");t.flag(this,"promise","rejects"),t.flag(this,"error",f);let h=t.flag(this,"vitest-test"),d=t.flag(this,"object"),p=typeof d=="function"?d():d;if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .rejects");if(typeof p?.then!="function")throw new TypeError(`You must provide a Promise to expect() when using .rejects, not '${typeof p}'.`);let g=new Proxy(this,{get:i((m,b,E)=>{let M=Reflect.get(m,b,E);return typeof M!="function"?M instanceof e.Assertion?g:M:(...A)=>{t.flag(this,"_name",b);let C=Promise.resolve(p).then(O=>{throw new n(`promise resolved "${t.inspect(O)}" instead of rejecting`,{showDiff:true,expected:new Error("rejected promise"),actual:O})},O=>(t.flag(this,"object",O),M.call(this,...A))).catch(O=>{throw Ht(O)&&f.stack&&(O.stack=f.stack.replace(f.message,O.message)),O});return zr(h,C,Ur(t,this,!!A.length),f,t.flag(this,"soft"))}},"get")});return g},"__VITEST_REJECTS__"));},"JestChaiExpect");function Ti(e,t,n){return e.mock.calls.length&&(t+=se.gray(`
114
114
 
115
115
  Received:
116
116
 
117
117
  ${e.mock.calls.map((r,o)=>{let s=se.bold(` ${lt(o+1)} ${e.getMockName()} call:
118
118
 
119
- `);return n?s+=Ct(n,r,{omitAnnotationLines:true}):s+=we(r).split(`
119
+ `);return n?s+=_t(n,r,{omitAnnotationLines:true}):s+=ye(r).split(`
120
120
  `).map(a=>` ${a}`).join(`
121
121
  `),s+=`
122
122
  `,s}).join(`
123
123
  `)}`)),t+=se.gray(`
124
124
 
125
125
  Number of calls: ${se.bold(e.mock.calls.length)}
126
- `),t}i(Ei,"formatCalls");function Fy(e,t,n,r){return t.length&&(n+=se.gray(`
126
+ `),t}i(Ti,"formatCalls");function ky(e,t,n,r){return t.length&&(n+=se.gray(`
127
127
 
128
128
  Received:
129
129
 
130
130
  ${t.map((o,s)=>{let a=se.bold(` ${lt(s+1)} ${e.getMockName()} call return:
131
131
 
132
- `);return r?a+=Ct(r,o.value,{omitAnnotationLines:true}):a+=we(o).split(`
132
+ `);return r?a+=_t(r,o.value,{omitAnnotationLines:true}):a+=ye(o).split(`
133
133
  `).map(l=>` ${l}`).join(`
134
134
  `),a+=`
135
135
  `,a}).join(`
136
136
  `)}`)),n+=se.gray(`
137
137
 
138
138
  Number of calls: ${se.bold(e.mock.calls.length)}
139
- `),n}i(Fy,"formatReturns");function Dy(e,t){let n=e._obj,r=Ke.flag(e,"negate"),o=Ke.flag(e,"promise")||"",s=Ke.flag(e,"message"),a={...cf(),diff:Ct,stringify:we,iterableEquality:ke,subsetEquality:At},l=Ke.flag(e,"vitest-test"),c=l?.fullTestName??"";l?.type!=="test"&&(l=void 0);let u={...Yt(t),currentTestName:c,customTesters:Ci(),isNot:r,utils:a,promise:o,equals:H,suppressedErrors:[],soft:Ke.flag(e,"soft"),poll:Ke.flag(e,"poll"),assertion:e};return Object.assign(u,{task:l}),{state:u,isNot:r,obj:n,customMessage:s}}i(Dy,"getMatcherState");var Wr=class extends Error{static{i(this,"JestExtendError");}constructor(t,n,r,o){super(t),this.actual=n,this.expected=r,this.__vitest_error_context__=o;}};function Ly(e,t,n){return (r,o)=>{Object.entries(n).forEach(([s,a])=>{function l(...h){let{state:p,isNot:d,obj:g,customMessage:m}=Dy(this,t),b=a.call(p,g,...h);if(b&&typeof b=="object"&&typeof b.then=="function")return b.then(({pass:C,message:L,actual:ee,expected:j,meta:W})=>{if(C&&d||!C&&!d){let Y=(m?`${m}: `:"")+L();throw new Wr(Y,ee,j,{assertionName:s,meta:W})}});let{pass:S,message:_,actual:A,expected:M,meta:O}=b;if(S&&d||!S&&!d){let N=(m?`${m}: `:"")+_();throw new Wr(N,A,M,{assertionName:s,meta:O})}}i(l,"__VITEST_EXTEND_ASSERTION__");let c=$t(o,s,l);if(o.addMethod(globalThis[An].matchers,s,c),o.addMethod(e.Assertion.prototype,s,c),a.__vitest_poll_takeover__){let h=e.Assertion.prototype[s];Object.defineProperty(h,"__vitest_poll_takeover__",{value:true});}class u extends Ge{static{i(this,"CustomMatcher");}constructor(p=false,...d){super(d,p);}asymmetricMatch(p){let{pass:d}=a.call(this.getMatcherContext(t),p,...this.sample);return this.inverse?!d:d}toString(){return `${this.inverse?"not.":""}${s}`}getExpectedType(){return "any"}toAsymmetricMatcher(){return `${this.toString()}<${this.sample.map(p=>we(p)).join(", ")}>`}}let f=i((...h)=>new u(false,...h),"customMatcher");Object.defineProperty(t,s,{configurable:true,enumerable:true,value:f,writable:true}),Object.defineProperty(t.not,s,{configurable:true,enumerable:true,value:i((...h)=>new u(true,...h),"value"),writable:true}),Object.defineProperty(globalThis[Vr],s,{configurable:true,enumerable:true,value:f,writable:true});});}}i(Ly,"JestExtendPlugin");var gf=i((e,t)=>{t.addMethod(e.expect,"extend",(n,r)=>{On(Ly(e,n,r));});},"JestExtend");var Jr=/\r?\n/;function yf(e,t,n){let r=e.split(Jr),o=/\r\n/.test(e)?2:1,s=0;if(t>r.length)return e.length;for(let a=0;a<t-1;a++)s+=r[a].length+o;return s+n}i(yf,"positionToOffset");function wf(e,t){if(t>e.length)throw new Error(`offset is longer than source length! offset ${t} > length ${e.length}`);let n=e.split(Jr),r=/\r\n/.test(e)?2:1,o=0,s=0;for(;s<n.length;s++){let a=n[s].length+r;if(o+a>=t)break;o+=a;}return s+1}i(wf,"offsetToLineNumber");var Yr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};var Je=Date,Ii=null,Et=class e extends Je{static{i(this,"MockDate");}constructor(t,n,r,o,s,a,l){super();let c;switch(arguments.length){case 0:Ii!==null?c=new Je(Ii.valueOf()):c=new Je;break;case 1:c=new Je(t);break;default:r=typeof r>"u"?1:r,o=o||0,s=s||0,a=a||0,l=l||0,c=new Je(t,n,r,o,s,a,l);break}return Object.setPrototypeOf(c,e.prototype),c}};Et.UTC=Je.UTC;Et.now=function(){return new Et().valueOf()};Et.parse=function(e){return Je.parse(e)};Et.toString=function(){return Je.toString()};function bf(e){let t=new Je(e.valueOf());if(Number.isNaN(t.getTime()))throw new TypeError(`mockdate: The time set is an invalid date: ${e}`);globalThis.Date=Et,Ii=t.valueOf();}i(bf,"mockDate");function Ai(){globalThis.Date=Je;}i(Ai,"resetDate");function Jy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}i(Jy,"getDefaultExportFromCjs");var Pi={exports:{}},Af;function Yy(){if(Af)return Pi.exports;Af=1;var e=i(function(t,n){var r,o,s=1,a=0,l=0,c=String.alphabet;function u(f,h,p){if(p){for(r=h;p=u(f,r),p<76&&p>65;)++r;return +f.slice(h-1,r)}return p=c&&c.indexOf(f.charAt(h)),p>-1?p+76:(p=f.charCodeAt(h)||0,p<45||p>127?p:p<46?65:p<48?p-1:p<58?p+18:p<65?p-11:p<91?p+11:p<97?p-37:p<123?p+5:p-63)}if(i(u,"getCode"),(t+="")!=(n+="")){for(;s;)if(o=u(t,a++),s=u(n,l++),o<76&&s<76&&o>66&&s>66&&(o=u(t,a,a),s=u(n,l,a=r),l=r),o!=s)return o<s?-1:1}return 0},"naturalCompare");try{Pi.exports=e;}catch{String.naturalCompare=e;}return Pi.exports}i(Yy,"requireNaturalCompare");var Xy=Yy(),Zy=Jy(Xy),Qy=i((e,t,n,r,o,s)=>{let a=e.getMockName(),l=a==="vi.fn()"?"":` ${a}`,c="";if(e.mock.calls.length!==0){let u=n+t.indent;c=` {${t.spacingOuter}${u}"calls": ${s(e.mock.calls,t,u,r,o)}${t.min?", ":","}${t.spacingOuter}${u}"results": ${s(e.mock.results,t,u,r,o)}${t.min?"":","}${t.spacingOuter}${n}}`;}return `[MockFunction${l}]${c}`},"serialize$1"),ew=i(e=>e&&!!e._isMockFunction,"test"),tw={serialize:Qy,test:ew},{DOMCollection:nw,DOMElement:rw,Immutable:ow,ReactElement:sw,ReactTestComponent:iw,AsymmetricMatcher:aw}=kt,Ri=[iw,sw,rw,nw,ow,aw,tw];function jf(e){Ri=[e].concat(Ri);}i(jf,"addSerializer");function cw(){return Ri}i(cw,"getSerializers");function $f(e,t){return `${e} ${t}`}i($f,"testNameToKey");function lw(e){if(!/ \d+$/.test(e))throw new Error("Snapshot keys must end with a number.");return e.replace(/ \d+$/,"")}i(lw,"keyToTestName");function uw(e,t){let n=t.updateSnapshot,r=Object.create(null),o="",s=false;if(e!=null)try{o=e,new Function("exports",o)(r);}catch{}return (n==="all"||n==="new")&&o&&(s=true),{data:r,dirty:s}}i(uw,"getSnapshotData");function fw(e){return e.includes(`
139
+ `),n}i(ky,"formatReturns");function My(e,t){let n=e._obj,r=Ke.flag(e,"negate"),o=Ke.flag(e,"promise")||"",s=Ke.flag(e,"message"),a={...tf(),diff:_t,stringify:ye,iterableEquality:ke,subsetEquality:At},l=Ke.flag(e,"vitest-test"),c=l?.fullTestName??"";return l?.type!=="test"&&(l=void 0),{state:{...Gt(t),task:l,currentTestName:c,customTesters:Mi(),isNot:r,utils:a,promise:o,equals:K,suppressedErrors:[],soft:Ke.flag(e,"soft"),poll:Ke.flag(e,"poll")},isNot:r,obj:n,customMessage:s}}i(My,"getMatcherState");var Wr=class extends Error{static{i(this,"JestExtendError");}constructor(t,n,r,o){super(t),this.actual=n,this.expected=r,this.context=o;}};function Cy(e,t,n){return (r,o)=>{Object.entries(n).forEach(([s,a])=>{function l(...h){let{state:d,isNot:p,obj:g,customMessage:m}=My(this,t),b=a.call(d,g,...h);if(b&&typeof b=="object"&&typeof b.then=="function")return b.then(({pass:_,message:q,actual:Q,expected:R,meta:V})=>{if(_&&p||!_&&!p){let Y=m??q();throw new Wr(Y,Q,R,{assertionName:s,meta:V})}});let{pass:E,message:M,actual:A,expected:C,meta:O}=b;if(E&&p||!E&&!p){let N=m??M();throw new Wr(N,A,C,{assertionName:s,meta:O})}}i(l,"expectWrapper");let c=$t(o,s,l);o.addMethod(globalThis[In].matchers,s,c),o.addMethod(e.Assertion.prototype,s,c);class u extends Ge{static{i(this,"CustomMatcher");}constructor(d=false,...p){super(p,d);}asymmetricMatch(d){let{pass:p}=a.call(this.getMatcherContext(t),d,...this.sample);return this.inverse?!p:p}toString(){return `${this.inverse?"not.":""}${s}`}getExpectedType(){return "any"}toAsymmetricMatcher(){return `${this.toString()}<${this.sample.map(d=>ye(d)).join(", ")}>`}}let f=i((...h)=>new u(false,...h),"customMatcher");Object.defineProperty(t,s,{configurable:true,enumerable:true,value:f,writable:true}),Object.defineProperty(t.not,s,{configurable:true,enumerable:true,value:i((...h)=>new u(true,...h),"value"),writable:true}),Object.defineProperty(globalThis[Vr],s,{configurable:true,enumerable:true,value:f,writable:true});});}}i(Cy,"JestExtendPlugin");var uf=i((e,t)=>{t.addMethod(e.expect,"extend",(n,r)=>{_n(Cy(e,n,r));});},"JestExtend");var Jr=/\r?\n/;function ff(e,t,n){let r=e.split(Jr),o=/\r\n/.test(e)?2:1,s=0;if(t>r.length)return e.length;for(let a=0;a<t-1;a++)s+=r[a].length+o;return s+n}i(ff,"positionToOffset");function hf(e,t){if(t>e.length)throw new Error(`offset is longer than source length! offset ${t} > length ${e.length}`);let n=e.split(Jr),r=/\r\n/.test(e)?2:1,o=0,s=0;for(;s<n.length;s++){let a=n[s].length+r;if(o+a>=t)break;o+=a;}return s+1}i(hf,"offsetToLineNumber");async function Fy(e,t){let n=(await Promise.resolve().then(()=>(vf(),Ef))).default,r=new Set(t.map(o=>o.file));await Promise.all(Array.from(r).map(async o=>{let s=t.filter(u=>u.file===o),a=await e.readSnapshotFile(o);if(a==null)throw new Error(`cannot read ${o} when saving inline snapshot`);let l=new n(a);for(let u of s){let f=ff(a,u.line,u.column);zy(a,l,f,u.snapshot);}let c=l.toString();c!==a&&await e.saveSnapshotFile(o,c);}));}i(Fy,"saveInlineSnapshots");var Dy=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*\{/;function Ly(e,t,n,r){let o=e.slice(n),s=Dy.exec(o);if(!s)return false;o=o.slice(s.index);let a=wc(o);if(a===null)return false;a+=n+s.index;let l=n+s.index+s[0].length,c=By(e,l),u=`, ${Af(r,e,n)}`;return c===a?t.appendLeft(a,u):t.overwrite(c,a,u),true}i(Ly,"replaceObjectSnap");function By(e,t){let n=1,r=0;for(;n!==r&&t<e.length;){let o=e[t++];o==="{"?n++:o==="}"&&r++;}return t}i(By,"getObjectShapeEndIndex");function Af(e,t,n){let r=hf(t,n),s=t.split(Jr)[r-1].match(/^\s*/)[0]||"",a=s.includes(" ")?`${s} `:`${s} `,l=e.trim().replace(/\\/g,"\\\\").split(/\n/g),c=l.length<=1,u="`";return c?`${u}${l.join(`
140
+ `).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}${u}`:`${u}
141
+ ${l.map(f=>f?a+f:"").join(`
142
+ `).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}
143
+ ${s}${u}`}i(Af,"prepareSnapString");var xf="toMatchInlineSnapshot",kf="toThrowErrorMatchingInlineSnapshot";function qy(e,t){let n=t-xf.length;if(e.slice(n,t)===xf)return {code:e.slice(n),index:n};let r=t-kf.length;return e.slice(t-r,t)===kf?{code:e.slice(t-r),index:t-r}:{code:e.slice(t),index:t}}i(qy,"getCodeStartingAtIndex");var Uy=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*[\w$]*(['"`)])/;function zy(e,t,n,r){let{code:o,index:s}=qy(e,n),a=Uy.exec(o),l=/toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot/.exec(o);if(!a||a.index!==l?.index)return Ly(e,t,s,r);let c=a[1],u=s+a.index+a[0].length,f=Af(r,e,s);if(c===")")return t.appendRight(u-1,f),true;let d=new RegExp(`(?:^|[^\\\\])${c}`).exec(e.slice(u));if(!d)return false;let p=u+d.index+d[0].length;return t.overwrite(u-1,p,f),true}i(zy,"replaceInlineSnap");var Wy=/^([^\S\n]*)\S/m;function Pi(e){let t=e.match(Wy);if(!t||!t[1])return e;let n=t[1],r=e.split(/\n/g);if(r.length<=2||r[0].trim()!==""||r.at(-1)?.trim()!=="")return e;for(let o=1;o<r.length-1;o++)if(r[o]!==""){if(r[o].indexOf(n)!==0)return e;r[o]=r[o].substring(n.length);}return r[r.length-1]="",e=r.join(`
144
+ `),e}i(Pi,"stripSnapshotIndentation");async function Vy(e,t){await Promise.all(t.map(async n=>{n.readonly||await e.saveSnapshotFile(n.file,n.snapshot);}));}i(Vy,"saveRawSnapshots");function Ky(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}i(Ky,"getDefaultExportFromCjs");var Ii={exports:{}},Mf;function Hy(){if(Mf)return Ii.exports;Mf=1;var e=i(function(t,n){var r,o,s=1,a=0,l=0,c=String.alphabet;function u(f,h,d){if(d){for(r=h;d=u(f,r),d<76&&d>65;)++r;return +f.slice(h-1,r)}return d=c&&c.indexOf(f.charAt(h)),d>-1?d+76:(d=f.charCodeAt(h)||0,d<45||d>127?d:d<46?65:d<48?d-1:d<58?d+18:d<65?d-11:d<91?d+11:d<97?d-37:d<123?d+5:d-63)}if(i(u,"getCode"),(t+="")!=(n+="")){for(;s;)if(o=u(t,a++),s=u(n,l++),o<76&&s<76&&o>66&&s>66&&(o=u(t,a,a),s=u(n,l,a=r),l=r),o!=s)return o<s?-1:1}return 0},"naturalCompare");try{Ii.exports=e;}catch{String.naturalCompare=e;}return Ii.exports}i(Hy,"requireNaturalCompare");var Gy=Hy(),Jy=Ky(Gy),Yy=i((e,t,n,r,o,s)=>{let a=e.getMockName(),l=a==="vi.fn()"?"":` ${a}`,c="";if(e.mock.calls.length!==0){let u=n+t.indent;c=` {${t.spacingOuter}${u}"calls": ${s(e.mock.calls,t,u,r,o)}${t.min?", ":","}${t.spacingOuter}${u}"results": ${s(e.mock.results,t,u,r,o)}${t.min?"":","}${t.spacingOuter}${n}}`;}return `[MockFunction${l}]${c}`},"serialize$1"),Xy=i(e=>e&&!!e._isMockFunction,"test"),Zy={serialize:Yy,test:Xy},{DOMCollection:Qy,DOMElement:ew,Immutable:tw,ReactElement:nw,ReactTestComponent:rw,AsymmetricMatcher:ow}=kt,Ai=[rw,nw,ew,Qy,tw,ow,Zy];function $f(e){Ai=[e].concat(Ai);}i($f,"addSerializer");function sw(){return Ai}i(sw,"getSerializers");function iw(e,t){return `${e} ${t}`}i(iw,"testNameToKey");function aw(e){if(!/ \d+$/.test(e))throw new Error("Snapshot keys must end with a number.");return e.replace(/ \d+$/,"")}i(aw,"keyToTestName");function cw(e,t){let n=t.updateSnapshot,r=Object.create(null),o="",s=false;if(e!=null)try{o=e,new Function("exports",o)(r);}catch{}return (n==="all"||n==="new")&&o&&(s=true),{data:r,dirty:s}}i(cw,"getSnapshotData");function lw(e){return e.includes(`
140
145
  `)?`
141
146
  ${e}
142
- `:e}i(fw,"addExtraLineBreaks");function eo(e){return e.length>2&&e[0]===`
147
+ `:e}i(lw,"addExtraLineBreaks");function Cf(e){return e.length>2&&e[0]===`
143
148
  `&&e.endsWith(`
144
- `)?e.slice(1,-1):e}i(eo,"removeExtraLineBreaks");var hw=true,dw=false;function pw(e,t=2,n={}){return Di($e(e,{escapeRegex:hw,indent:t,plugins:cw(),printFunctionName:dw,...n}))}i(pw,"serialize");function mw(e){return e.replace(/`|\\|\$\{/g,"\\$&")}i(mw,"escapeBacktickString");function Nf(e){return `\`${mw(e)}\``}i(Nf,"printBacktickString");function Di(e){return e.replace(/\r\n|\r/g,`
145
- `)}i(Di,"normalizeNewlines");async function gw(e,t,n){let r=Object.keys(t).sort(Zy).map(l=>`exports[${Nf(l)}] = ${Nf(Di(t[l]))};`),o=`${e.getHeader()}
149
+ `)?e.slice(1,-1):e}i(Cf,"removeExtraLineBreaks");var uw=true,fw=false;function hw(e,t=2,n={}){return Ri($e(e,{escapeRegex:uw,indent:t,plugins:sw(),printFunctionName:fw,...n}))}i(hw,"serialize");function pw(e){return e.replace(/`|\\|\$\{/g,"\\$&")}i(pw,"escapeBacktickString");function _f(e){return `\`${pw(e)}\``}i(_f,"printBacktickString");function Ri(e){return e.replace(/\r\n|\r/g,`
150
+ `)}i(Ri,"normalizeNewlines");async function dw(e,t,n){let r=Object.keys(t).sort(Jy).map(l=>`exports[${_f(l)}] = ${_f(Ri(t[l]))};`),o=`${e.getHeader()}
146
151
 
147
152
  ${r.join(`
148
153
 
149
154
  `)}
150
- `,s=await e.readSnapshotFile(n);s!=null&&s===o||await e.saveSnapshotFile(n,o);}i(gw,"saveSnapshotFile");function ji(e=[],t=[]){let n=Array.from(e);return t.forEach((r,o)=>{let s=n[o];Array.isArray(e[o])?n[o]=ji(e[o],r):Le(s)?n[o]=Li(e[o],r):n[o]=r;}),n}i(ji,"deepMergeArray");function Li(e,t){if(Le(e)&&Le(t)){let n={...e};return Object.keys(t).forEach(r=>{Le(t[r])&&!t[r].$$typeof?r in e?n[r]=Li(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Array.isArray(t[r])?n[r]=ji(e[r],t[r]):Object.assign(n,{[r]:t[r]});}),n}else if(Array.isArray(e)&&Array.isArray(t))return ji(e,t);return e}i(Li,"deepMergeSnapshot");var to=class extends Map{static{i(this,"DefaultMap");}constructor(t,n){super(n),this.defaultFn=t;}get(t){return this.has(t)||this.set(t,this.defaultFn(t)),super.get(t)}},Nt=class extends to{static{i(this,"CounterMap");}constructor(){super(()=>0);}_total;valueOf(){return this._total=this.total()}increment(t){typeof this._total<"u"&&this._total++,this.set(t,this.get(t)+1);}total(){if(typeof this._total<"u")return this._total;let t=0;for(let n of this.values())t+=n;return t}};function Ff(e){let t=new Map;return n=>(t.has(n)||t.set(n,e(n)),t.get(n))}i(Ff,"memo");async function yw(e,t){let n=(await Promise.resolve().then(()=>(If(),Of))).default,r=new Set(t.map(o=>o.file));await Promise.all(Array.from(r).map(async o=>{let s=t.filter(u=>u.file===o),a=await e.readSnapshotFile(o);if(a==null)throw new Error(`cannot read ${o} when saving inline snapshot`);let l=new n(a);for(let u of s){let f=yf(a,u.line,u.column);xw(a,l,f,u.snapshot,u.assertionName);}let c=l.toString();c!==a&&await e.saveSnapshotFile(o,c);}));}i(yw,"saveInlineSnapshots");var Df=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*\{/;function Bi(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}i(Bi,"escapeRegExp");var ww=Ff(e=>{let t=Df.source.replace("toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot",Bi(e));return new RegExp(t)});function bw(e,t,n,r,o){let s=e.slice(n),l=(o?ww(o):Df).exec(s);if(!l)return false;s=s.slice(l.index);let c=xc(s);if(c===null)return false;c+=n+l.index;let u=n+l.index+l[0].length,f=Tw(e,u),h=`, ${Lf(r,e,n)}`;return f===c?t.appendLeft(c,h):t.overwrite(f,c,h),true}i(bw,"replaceObjectSnap");function Tw(e,t){let n=1,r=0;for(;n!==r&&t<e.length;){let o=e[t++];o==="{"?n++:o==="}"&&r++;}return t}i(Tw,"getObjectShapeEndIndex");function Lf(e,t,n){let r=wf(t,n),s=t.split(Jr)[r-1].match(/^\s*/)[0]||"",a=s.includes(" ")?`${s} `:`${s} `,l=e.trim().replace(/\\/g,"\\\\").split(/\n/g),c=l.length<=1,u="`";return c?`${u}${l.join(`
151
- `).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}${u}`:`${u}
152
- ${l.map(f=>f?a+f:"").join(`
153
- `).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}
154
- ${s}${u}`}i(Lf,"prepareSnapString");var Sw=["toMatchInlineSnapshot","toThrowErrorMatchingInlineSnapshot"];function Ew(e,t,n){for(let r of n){let o=t-r.length;if(o>=0&&e.slice(o,t)===r)return {code:e.slice(o),index:o}}return {code:e.slice(t),index:t}}i(Ew,"getCodeStartingAtIndex");var Bf=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*[\w$]*(['"`)])/,vw=Ff(e=>{let t=Bf.source.replace("toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot",Bi(e));return new RegExp(t)});function xw(e,t,n,r,o){let s=o?[o]:Sw,{code:a,index:l}=Ew(e,n,s),u=(o?vw(o):Bf).exec(a),h=(o?new RegExp(Bi(o)):/toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot/).exec(a);if(!u||u.index!==h?.index)return bw(e,t,l,r,o);let p=u[1],d=l+u.index+u[0].length,g=Lf(r,e,l);if(p===")")return t.appendRight(d-1,g),true;let b=new RegExp(`(?:^|[^\\\\])${p}`).exec(e.slice(d));if(!b)return false;let S=d+b.index+b[0].length;return t.overwrite(d-1,S,g),true}i(xw,"replaceInlineSnap");var kw=/^([^\S\n]*)\S/m;function qi(e){let t=e.match(kw);if(!t||!t[1])return e;let n=t[1],r=e.split(/\n/g);if(r.length<=2||r[0].trim()!==""||r.at(-1)?.trim()!=="")return e;for(let o=1;o<r.length-1;o++)if(r[o]!==""){if(r[o].indexOf(n)!==0)return e;r[o]=r[o].substring(n.length);}return r[r.length-1]="",e=r.join(`
155
- `),e}i(qi,"stripSnapshotIndentation");async function _w(e,t){await Promise.all(t.map(async n=>{n.readonly||await e.saveSnapshotFile(n.file,n.snapshot);}));}i(_w,"saveRawSnapshots");function Pf(e,t){return e.file===t.file&&e.column===t.column&&e.line===t.line}i(Pf,"isSameStackPosition");var Fi=class e{static{i(this,"SnapshotState");}_counters=new Nt;_dirty;_updateSnapshot;_snapshotData;_initialData;_inlineSnapshots;_inlineSnapshotStacks;_testIdToKeys=new to(()=>[]);_rawSnapshots;_uncheckedKeys;_snapshotFormat;_environment;_fileExists;expand;_added=new Nt;_matched=new Nt;_unmatched=new Nt;_updated=new Nt;get added(){return this._added}set added(t){this._added._total=t;}get matched(){return this._matched}set matched(t){this._matched._total=t;}get unmatched(){return this._unmatched}set unmatched(t){this._unmatched._total=t;}get updated(){return this._updated}set updated(t){this._updated._total=t;}constructor(t,n,r,o){this.testFilePath=t,this.snapshotPath=n;let{data:s,dirty:a}=uw(r,o);this._fileExists=r!=null,this._initialData={...s},this._snapshotData={...s},this._dirty=a,this._inlineSnapshots=[],this._inlineSnapshotStacks=[],this._rawSnapshots=[],this._uncheckedKeys=new Set(Object.keys(this._snapshotData)),this.expand=o.expand||false,this._updateSnapshot=o.updateSnapshot,this._snapshotFormat={printBasicPrototype:false,escapeString:false,...o.snapshotFormat},this._environment=o.snapshotEnvironment;}static async create(t,n){let r=await n.snapshotEnvironment.resolvePath(t),o=await n.snapshotEnvironment.readSnapshotFile(r);return new e(t,r,o,n)}get snapshotUpdateState(){return this._updateSnapshot}get environment(){return this._environment}markSnapshotsAsCheckedForTest(t){this._uncheckedKeys.forEach(n=>{/ \d+$| > /.test(n.slice(t.length))&&this._uncheckedKeys.delete(n);});}clearTest(t){this._inlineSnapshots=this._inlineSnapshots.filter(n=>n.testId!==t),this._inlineSnapshotStacks=this._inlineSnapshotStacks.filter(n=>n.testId!==t);for(let n of this._testIdToKeys.get(t)){let r=lw(n),o=this._counters.get(r);o>0&&((n in this._snapshotData||n in this._initialData)&&(this._snapshotData[n]=this._initialData[n]),this._counters.set(r,o-1));}this._testIdToKeys.delete(t),this.added.delete(t),this.updated.delete(t),this.matched.delete(t),this.unmatched.delete(t);}_inferInlineSnapshotStack(t){let n=t.findIndex(a=>a.method.match(/__VITEST_(RESOLVES|REJECTS)__/));if(n!==-1)return t[n+3];let r=t.findIndex(a=>a.method.match(/__VITEST_POLL_CHAIN__/));if(r!==-1)return t[r+1];for(let a=0;a<t.length;a++){let l=t[a].method.match(/__INLINE_SNAPSHOT_OFFSET_(\d+)__/);if(l)return t[a+Number(l[1])]??null}let o=t.findIndex(a=>a.method.includes("__VITEST_EXTEND_ASSERTION__"));if(o!==-1)return t[o+3]??null;let s=t.findIndex(a=>a.method.includes("__INLINE_SNAPSHOT__"));return s!==-1?t[s+2]:null}_addSnapshot(t,n,r){this._dirty=true,r.stack?this._inlineSnapshots.push({...r.stack,snapshot:n,testId:r.testId,assertionName:r.assertionName}):r.rawSnapshot?this._rawSnapshots.push({...r.rawSnapshot,snapshot:n}):this._snapshotData[t]=n;}_resolveKey(t,n,r){this._counters.increment(n);let o=this._counters.get(n);return r||(r=$f(n,o)),this._testIdToKeys.get(t).push(r),{key:r,count:o}}_resolveInlineStack(t){let{testId:n,snapshot:r,assertionName:o,error:s}=t,a=hl(s,{ignoreStackEntries:[]}),l=this._inferInlineSnapshotStack(a);if(!l){let f=a.map(h=>` ${h.file}:${h.line}:${h.column}${h.method?` (${h.method})`:""}`).join(`
156
- `);throw new Error(`@vitest/snapshot: Couldn't infer stack frame for inline snapshot.
157
- ${f}`)}let c=this.environment.processStackTrace?.(l)||l;c.column--;let u=this._inlineSnapshotStacks.filter(f=>Pf(f,c));if(u.length>0){this._inlineSnapshots=this._inlineSnapshots.filter(h=>!Pf(h,c));let f=u.find(h=>h.snapshot!==r);if(f)throw Object.assign(new Error(`${o} with different snapshots cannot be called at the same location`),{actual:r,expected:f.snapshot})}return this._inlineSnapshotStacks.push({...c,testId:n,snapshot:r}),c}_reconcile(t){return t.hasSnapshot&&this._updateSnapshot==="all"||(!t.hasSnapshot||!t.snapshotIsPersisted)&&(this._updateSnapshot==="new"||this._updateSnapshot==="all")?(this._updateSnapshot==="all"?t.pass?this.matched.increment(t.testId):(t.hasSnapshot?this.updated.increment(t.testId):this.added.increment(t.testId),this._addSnapshot(t.key,t.addValue,{stack:t.stack,testId:t.testId,rawSnapshot:t.rawSnapshot,assertionName:t.assertionName})):(this._addSnapshot(t.key,t.addValue,{stack:t.stack,testId:t.testId,rawSnapshot:t.rawSnapshot,assertionName:t.assertionName}),this.added.increment(t.testId)),{actual:"",count:t.count,expected:"",key:t.key,pass:true}):t.pass?(this.matched.increment(t.testId),{actual:"",count:t.count,expected:"",key:t.key,pass:true}):(this.unmatched.increment(t.testId),{actual:t.actualDisplay,count:t.count,expected:t.expectedDisplay,key:t.key,pass:false})}async save(){let t=Object.keys(this._snapshotData).length,n=this._inlineSnapshots.length,r=this._rawSnapshots.length,o=!t&&!n&&!r,s={deleted:false,saved:false};return (this._dirty||this._uncheckedKeys.size)&&!o?(t&&(await gw(this._environment,this._snapshotData,this.snapshotPath),this._fileExists=true),n&&await yw(this._environment,this._inlineSnapshots),r&&await _w(this._environment,this._rawSnapshots),s.saved=true):!t&&this._fileExists&&(this._updateSnapshot==="all"&&(await this._environment.removeSnapshotFile(this.snapshotPath),this._fileExists=false),s.deleted=true),s}getUncheckedCount(){return this._uncheckedKeys.size||0}getUncheckedKeys(){return Array.from(this._uncheckedKeys)}removeUncheckedKeys(){this._updateSnapshot==="all"&&this._uncheckedKeys.size&&(this._dirty=true,this._uncheckedKeys.forEach(t=>delete this._snapshotData[t]),this._uncheckedKeys.clear());}probeExpectedSnapshot(t){let n=this._counters.get(t.testName)+1,r=$f(t.testName,n);return {key:r,count:n,data:t?.isInline?t.inlineSnapshot:this._snapshotData[r],markAsChecked:i(()=>{this._counters.increment(t.testName),this._testIdToKeys.get(t.testId).push(r),this._uncheckedKeys.delete(r);},"markAsChecked")}}match({testId:t,testName:n,received:r,key:o,inlineSnapshot:s,isInline:a,error:l,rawSnapshot:c,assertionName:u}){let f=this._resolveKey(t,n,o);o=f.key;let h=f.count;a&&this._snapshotData[o]!==void 0||this._uncheckedKeys.delete(o);let p=c&&typeof r=="string"?r:pw(r,void 0,this._snapshotFormat);c||(p=fw(p)),c&&c.content&&c.content.match(/\r\n/)&&!p.match(/\r\n/)&&(c.content=Di(c.content));let d=a?s:c?c.content:this._snapshotData[o],g=c?d:d?.trim(),m=g===(c?p:p.trim()),b=d!==void 0,S=a||this._fileExists||c&&c.content!=null;m&&!a&&!c&&(this._snapshotData[o]=p);let _=a?this._resolveInlineStack({testId:t,snapshot:p,assertionName:u||"toMatchInlineSnapshot",error:l||new Error("snapshot")}):void 0;return this._reconcile({testId:t,key:o,count:h,pass:m,hasSnapshot:b,snapshotIsPersisted:!!S,addValue:p,actualDisplay:c?p:eo(p),expectedDisplay:g!==void 0?c?g:eo(g):void 0,stack:_,rawSnapshot:c,assertionName:u})}processDomainSnapshot({testId:t,received:n,expectedSnapshot:r,matchResult:o,isInline:s,error:a,assertionName:l}){let c=s?this._resolveInlineStack({testId:t,snapshot:n,assertionName:l,error:a||new Error("STACK_TRACE_ERROR")}):void 0,u=o?.resolved??n,f=o?.expected??r.data;return this._reconcile({testId:t,key:r.key,count:r.count,pass:o?.pass??false,hasSnapshot:!!r.data,snapshotIsPersisted:s?true:this._fileExists,addValue:u,actualDisplay:eo(u),expectedDisplay:f!==void 0?eo(f):void 0,stack:c,assertionName:l})}async pack(){let t={filepath:this.testFilePath,added:0,fileDeleted:false,matched:0,unchecked:0,uncheckedKeys:[],unmatched:0,updated:0},n=this.getUncheckedCount(),r=this.getUncheckedKeys();n&&this.removeUncheckedKeys();let o=await this.save();return t.fileDeleted=o.deleted,t.added=this.added.total(),t.matched=this.matched.total(),t.unmatched=this.unmatched.total(),t.updated=this.updated.total(),t.unchecked=o.deleted?0:n,t.uncheckedKeys=Array.from(r),t}};function Mw(e,t,n,r){let o=new Error(e);return Object.defineProperty(o,"actual",{value:n,enumerable:true,configurable:true,writable:true}),Object.defineProperty(o,"expected",{value:r,enumerable:true,configurable:true,writable:true}),Object.defineProperty(o,"diffOptions",{value:{expand:t}}),o}i(Mw,"createMismatchError");var no=class{static{i(this,"SnapshotClient");}snapshotStateMap=new Map;constructor(t={}){this.options=t;}async setup(t,n){this.snapshotStateMap.has(t)||this.snapshotStateMap.set(t,await Fi.create(t,n));}async finish(t){let r=await this.getSnapshotState(t).pack();return this.snapshotStateMap.delete(t),r}skipTest(t,n){this.getSnapshotState(t).markSnapshotsAsCheckedForTest(n);}clearTest(t,n){this.getSnapshotState(t).clearTest(n);}getSnapshotState(t){let n=this.snapshotStateMap.get(t);if(!n)throw new Error(`The snapshot state for '${t}' is not found. Did you call 'SnapshotClient.setup()'?`);return n}match(t){let{filepath:n,name:r,testId:o=r,message:s,isInline:a=false,properties:l,inlineSnapshot:c,error:u,errorMessage:f,rawSnapshot:h,assertionName:p}=t,{received:d}=t;if(!n)throw new Error("Snapshot cannot be used outside of test");let g=this.getSnapshotState(n),m=[r,...s?[s]:[]].join(" > "),b=g.probeExpectedSnapshot({testName:m,testId:o,isInline:a,inlineSnapshot:c});if(typeof l=="object"){if(typeof d!="object"||!d)throw b.markAsChecked(),new Error("Received value must be an object when the matcher has properties");let O;try{O=this.options.isEqual?.(d,l)??false;}catch(N){throw b.markAsChecked(),N}if(!O)return b.markAsChecked(),{pass:false,message:i(()=>f||"Snapshot properties mismatched","message"),actual:d,expected:l};d=Li(d,l);}let{actual:S,expected:_,key:A,pass:M}=g.match({testId:o,testName:m,received:d,isInline:a,error:u,inlineSnapshot:c,rawSnapshot:h,assertionName:p});return {pass:M,message:i(()=>`Snapshot \`${A||"unknown"}\` mismatched`,"message"),actual:h?S:S?.trim(),expected:h?_:_?.trim()}}assert(t){let n=this.match(t);if(!n.pass){let r=this.getSnapshotState(t.filepath);throw Mw(n.message(),r.expand,n.actual,n.expected)}}matchDomain(t){let{received:n,filepath:r,name:o,testId:s=o,message:a,adapter:l,isInline:c=false,inlineSnapshot:u,error:f}=t;if(!r)throw new Error("Snapshot cannot be used outside of test");let h=l.capture(n),p=l.render(h),d=this.getSnapshotState(r),g=[o,...a?[a]:[]].join(" > "),m=d.probeExpectedSnapshot({testName:g,testId:s,isInline:c,inlineSnapshot:u});m.markAsChecked();let b=m.data?l.match(h,l.parseExpected(m.data)):void 0,{actual:S,expected:_,key:A,pass:M}=d.processDomainSnapshot({testId:s,received:p,expectedSnapshot:m,matchResult:b,isInline:c,error:f,assertionName:t.assertionName});return {pass:M,message:i(()=>`Snapshot \`${A}\` mismatched`,"message"),actual:S?.trim(),expected:_?.trim()}}async pollMatchDomain(t){let{poll:n,filepath:r,name:o,testId:s=o,message:a,adapter:l,isInline:c=false,inlineSnapshot:u,error:f,timeout:h=1e3,interval:p=50}=t;if(!r)throw new Error("Snapshot cannot be used outside of test");let d=this.getSnapshotState(r),g=[o,...a?[a]:[]].join(" > "),m=d.probeExpectedSnapshot({testName:g,testId:s,isInline:c,inlineSnapshot:u}),b=m.data&&d.snapshotUpdateState!=="all"?l.parseExpected(m.data):void 0,S=h>0?new Promise(L=>setTimeout(L,h)):void 0,_=await Cw({adapter:l,poll:n,interval:p,timedOut:S,match:b?L=>l.match(L,b).pass:void 0});if(m.markAsChecked(),!_?.rendered){if(_?.lastPollError)throw _.lastPollError;return {pass:false,message:i(()=>"poll() did not produce a stable snapshot within the timeout","message")}}let A=m.data?l.match(_.captured,l.parseExpected(m.data)):void 0,{actual:M,expected:O,key:N,pass:C}=d.processDomainSnapshot({testId:s,received:_.rendered,expectedSnapshot:m,matchResult:A,isInline:c,error:f,assertionName:t.assertionName});return {pass:C,message:i(()=>`Snapshot \`${N}\` mismatched`,"message"),actual:M?.trim(),expected:O?.trim()}}async assertRaw(t){if(!t.rawSnapshot)throw new Error("Raw snapshot is required");let{filepath:n,rawSnapshot:r}=t;if(r.content==null){if(!n)throw new Error("Snapshot cannot be used outside of test");let o=this.getSnapshotState(n);t.filepath||=n,r.file=await o.environment.resolveRawPath(n,r.file),r.content=await o.environment.readSnapshotFile(r.file)??void 0;}return this.assert(t)}clear(){this.snapshotStateMap.clear();}};async function Cw({adapter:e,poll:t,interval:n,timedOut:r,match:o}){let s,a,l;for(;;){try{let u=await Rf(Promise.resolve(t()),r);if(!u.ok)break;let f=e.capture(u.value),h=e.render(f);if(s!==void 0&&h===s){if(l={captured:f,rendered:h},!o||o(f))break}else s=h,l=void 0;}catch(u){s=void 0,l=void 0,a=u;}if(!(await Rf(new Promise(u=>setTimeout(u,n)),r)).ok)break}return {...l,lastPollError:a}}i(Cw,"getStableSnapshot");function Rf(e,t){let n=e.then(r=>({ok:true,value:r}));return t?Promise.race([n,t.then(r=>({ok:false,value:r}))]):n}i(Rf,"raceWith");var Zt={},Ui,qf;function Ow(){if(qf)return Ui;qf=1;var e;return typeof Yr<"u"?e=Yr:typeof window<"u"?e=window:e=self,Ui=e,Ui}i(Ow,"requireGlobal");var zi,Uf;function Iw(){if(Uf)return zi;Uf=1;let e;try{e=false;}catch{e=true;}return zi=e,zi}i(Iw,"requireThrowsOnProto");var Wi,zf;function en(){if(zf)return Wi;zf=1;var e=Function.call,t=Iw(),n=["size","caller","callee","arguments"];return t&&n.push("__proto__"),Wi=i(function(o){return Object.getOwnPropertyNames(o).reduce(function(s,a){return n.includes(a)||typeof o[a]!="function"||(s[a]=e.bind(o[a])),s},Object.create(null))},"copyPrototypeMethods"),Wi}i(en,"requireCopyPrototypeMethods");var Vi,Wf;function so(){if(Wf)return Vi;Wf=1;var e=en();return Vi=e(Array.prototype),Vi}i(so,"requireArray");var Ki,Vf;function Aw(){if(Vf)return Ki;Vf=1;var e=so().every;function t(o,s){return o[s.id]===void 0&&(o[s.id]=0),o[s.id]<s.callCount}i(t,"hasCallsLeft");function n(o,s,a,l){var c=true;return a!==l.length-1&&(c=s.calledBefore(l[a+1])),t(o,s)&&c?(o[s.id]+=1,true):false}i(n,"checkAdjacentCalls");function r(o){var s={},a=arguments.length>1?arguments:o;return e(a,n.bind(null,s))}return i(r,"calledInOrder"),Ki=r,Ki}i(Aw,"requireCalledInOrder");var Hi,Kf;function $w(){if(Kf)return Hi;Kf=1;function e(t){return t.constructor&&t.constructor.name||null}return i(e,"className"),Hi=e,Hi}i($w,"requireClassName");var Gi={},Hf;function Nw(){return Hf||(Hf=1,(function(e){e.wrap=function(t,n){var r=i(function(){return e.printWarning(n),t.apply(this,arguments)},"wrapped");return t.prototype&&(r.prototype=t.prototype),r},e.defaultMsg=function(t,n){return `${t}.${n} is deprecated and will be removed from the public API in a future version of ${t}.`},e.printWarning=function(t){typeof process=="object"&&process.emitWarning?process.emitWarning(t):console.info?console.info(t):console.log(t);};})(Gi)),Gi}i(Nw,"requireDeprecated");var Ji,Gf;function Pw(){return Gf||(Gf=1,Ji=i(function(t,n){var r=true;try{t.forEach(function(){if(!n.apply(this,arguments))throw new Error});}catch{r=false;}return r},"every")),Ji}i(Pw,"requireEvery");var Yi,Jf;function Rw(){return Jf||(Jf=1,Yi=i(function(t){if(!t)return "";try{return t.displayName||t.name||(String(t).match(/function ([^\s(]+)/)||[])[1]}catch{return ""}},"functionName")),Yi}i(Rw,"requireFunctionName");var Xi,Yf;function jw(){if(Yf)return Xi;Yf=1;var e=so().sort,t=so().slice;function n(o,s){var a=o.getCall(0),l=s.getCall(0),c=a&&a.callId||-1,u=l&&l.callId||-1;return c<u?-1:1}i(n,"comparator");function r(o){return e(t(o),n)}return i(r,"orderByFirstCall"),Xi=r,Xi}i(jw,"requireOrderByFirstCall");var Zi,Xf;function Fw(){if(Xf)return Zi;Xf=1;var e=en();return Zi=e(Function.prototype),Zi}i(Fw,"require_function");var Qi,Zf;function Dw(){if(Zf)return Qi;Zf=1;var e=en();return Qi=e(Map.prototype),Qi}i(Dw,"requireMap");var ea,Qf;function Lw(){if(Qf)return ea;Qf=1;var e=en();return ea=e(Object.prototype),ea}i(Lw,"requireObject");var ta,eh;function Bw(){if(eh)return ta;eh=1;var e=en();return ta=e(Set.prototype),ta}i(Bw,"requireSet");var na,th;function qw(){if(th)return na;th=1;var e=en();return na=e(String.prototype),na}i(qw,"requireString");var ra,nh;function Uw(){return nh||(nh=1,ra={array:so(),function:Fw(),map:Dw(),object:Lw(),set:Bw(),string:qw()}),ra}i(Uw,"requirePrototypes");var oo={exports:{}},zw=oo.exports,rh;function Ww(){return rh||(rh=1,(function(e,t){(function(n,r){e.exports=r();})(zw,(function(){var n=typeof Promise=="function",r=typeof self=="object"?self:Yr,o=typeof Symbol<"u",s=typeof Map<"u",a=typeof Set<"u",l=typeof WeakMap<"u",c=typeof WeakSet<"u",u=typeof DataView<"u",f=o&&typeof Symbol.iterator<"u",h=o&&typeof Symbol.toStringTag<"u",p=a&&typeof Set.prototype.entries=="function",d=s&&typeof Map.prototype.entries=="function",g=p&&Object.getPrototypeOf(new Set().entries()),m=d&&Object.getPrototypeOf(new Map().entries()),b=f&&typeof Array.prototype[Symbol.iterator]=="function",S=b&&Object.getPrototypeOf([][Symbol.iterator]()),_=f&&typeof String.prototype[Symbol.iterator]=="function",A=_&&Object.getPrototypeOf(""[Symbol.iterator]()),M=8,O=-1;function N(C){var L=typeof C;if(L!=="object")return L;if(C===null)return "null";if(C===r)return "global";if(Array.isArray(C)&&(h===false||!(Symbol.toStringTag in C)))return "Array";if(typeof window=="object"&&window!==null){if(typeof window.location=="object"&&C===window.location)return "Location";if(typeof window.document=="object"&&C===window.document)return "Document";if(typeof window.navigator=="object"){if(typeof window.navigator.mimeTypes=="object"&&C===window.navigator.mimeTypes)return "MimeTypeArray";if(typeof window.navigator.plugins=="object"&&C===window.navigator.plugins)return "PluginArray"}if((typeof window.HTMLElement=="function"||typeof window.HTMLElement=="object")&&C instanceof window.HTMLElement){if(C.tagName==="BLOCKQUOTE")return "HTMLQuoteElement";if(C.tagName==="TD")return "HTMLTableDataCellElement";if(C.tagName==="TH")return "HTMLTableHeaderCellElement"}}var ee=h&&C[Symbol.toStringTag];if(typeof ee=="string")return ee;var j=Object.getPrototypeOf(C);return j===RegExp.prototype?"RegExp":j===Date.prototype?"Date":n&&j===Promise.prototype?"Promise":a&&j===Set.prototype?"Set":s&&j===Map.prototype?"Map":c&&j===WeakSet.prototype?"WeakSet":l&&j===WeakMap.prototype?"WeakMap":u&&j===DataView.prototype?"DataView":s&&j===m?"Map Iterator":a&&j===g?"Set Iterator":b&&j===S?"Array Iterator":_&&j===A?"String Iterator":j===null?"Object":Object.prototype.toString.call(C).slice(M,O)}return i(N,"typeDetect"),N}));})(oo)),oo.exports}i(Ww,"requireTypeDetect");var oa,oh;function Vw(){if(oh)return oa;oh=1;var e=Ww();return oa=i(function(n){return e(n).toLowerCase()},"typeOf"),oa}i(Vw,"requireTypeOf");var sa,sh;function Kw(){if(sh)return sa;sh=1;function e(t){return t&&t.toString?t.toString():String(t)}return i(e,"valueToString"),sa=e,sa}i(Kw,"requireValueToString");var ia,ih;function Hw(){return ih||(ih=1,ia={global:Ow(),calledInOrder:Aw(),className:$w(),deprecated:Nw(),every:Pw(),functionName:Rw(),orderByFirstCall:jw(),prototypes:Uw(),typeOf:Vw(),valueToString:Kw()}),ia}i(Hw,"requireLib");var ah;function Gw(){if(ah)return Zt;ah=1;let e=Hw().global,t,n;if(typeof __vitest_required__<"u"){try{t=__vitest_required__.timers;}catch{}try{n=__vitest_required__.timersPromises;}catch{}}function r(s){let a=Math.pow(2,31)-1,l=1e12,c=i(function(){},"NOOP"),u=i(function(){return []},"NOOP_ARRAY"),f={},h,p=false;s.setTimeout&&(f.setTimeout=true,h=s.setTimeout(c,0),p=typeof h=="object"),f.clearTimeout=!!s.clearTimeout,f.setInterval=!!s.setInterval,f.clearInterval=!!s.clearInterval,f.hrtime=s.process&&typeof s.process.hrtime=="function",f.hrtimeBigint=f.hrtime&&typeof s.process.hrtime.bigint=="function",f.nextTick=s.process&&typeof s.process.nextTick=="function";let d=s.process&&s.__vitest_required__&&s.__vitest_required__.util.promisify;f.performance=s.performance&&typeof s.performance.now=="function";let g=s.Performance&&(typeof s.Performance).match(/^(function|object)$/),m=s.performance&&s.performance.constructor&&s.performance.constructor.prototype;f.queueMicrotask=s.hasOwnProperty("queueMicrotask"),f.requestAnimationFrame=s.requestAnimationFrame&&typeof s.requestAnimationFrame=="function",f.cancelAnimationFrame=s.cancelAnimationFrame&&typeof s.cancelAnimationFrame=="function",f.requestIdleCallback=s.requestIdleCallback&&typeof s.requestIdleCallback=="function",f.cancelIdleCallbackPresent=s.cancelIdleCallback&&typeof s.cancelIdleCallback=="function",f.setImmediate=s.setImmediate&&typeof s.setImmediate=="function",f.clearImmediate=s.clearImmediate&&typeof s.clearImmediate=="function",f.Intl=s.Intl&&typeof s.Intl=="object",s.clearTimeout&&s.clearTimeout(h);let b=s.Date,S=f.Intl?Object.defineProperties(Object.create(null),Object.getOwnPropertyDescriptors(s.Intl)):void 0,_=l;if(b===void 0)throw new Error("The global scope doesn't have a `Date` object (see https://github.com/sinonjs/sinon/issues/1852#issuecomment-419622780)");f.Date=true;class A{static{i(this,"FakePerformanceEntry");}constructor(k,I,R,T){this.name=k,this.entryType=I,this.startTime=R,this.duration=T;}toJSON(){return JSON.stringify({...this})}}function M(v){return Number.isFinite?Number.isFinite(v):isFinite(v)}i(M,"isNumberFinite");let O=false;function N(v,k){v.loopLimit&&k===v.loopLimit-1&&(O=true);}i(N,"checkIsNearInfiniteLimit");function C(){O=false;}i(C,"resetIsNearInfiniteLimit");function L(v){if(!v)return 0;let k=v.split(":"),I=k.length,R=I,T=0,B;if(I>3||!/^(\d\d:){0,2}\d\d?$/.test(v))throw new Error("tick only understands numbers, 'm:s' and 'h:m:s'. Each part must be two digits");for(;R--;){if(B=parseInt(k[R],10),B>=60)throw new Error(`Invalid time ${v}`);T+=B*Math.pow(60,I-R-1);}return T*1e3}i(L,"parseTime");function ee(v){let I=v*1e6%1e6,R=I<0?I+1e6:I;return Math.floor(R)}i(ee,"nanoRemainder");function j(v){if(!v)return 0;if(typeof v.getTime=="function")return v.getTime();if(typeof v=="number")return v;throw new TypeError("now should be milliseconds since UNIX epoch")}i(j,"getEpoch");function W(v,k,I){return I&&I.callAt>=v&&I.callAt<=k}i(W,"inRange");function Y(v,k){let I=new Error(`Aborting after running ${v.loopLimit} timers, assuming an infinite loop!`);if(!k.error)return I;let R=/target\.*[<|(|[].*?[>|\]|)]\s*/,T=new RegExp(String(Object.keys(v).join("|")));p&&(T=new RegExp(`\\s+at (Object\\.)?(?:${Object.keys(v).join("|")})\\s+`));let B=-1;k.error.stack.split(`
158
- `).some(function(X,ne){return X.match(R)?(B=ne,true):X.match(T)?(B=ne,false):B>=0});let q=`${I}
155
+ `,s=await e.readSnapshotFile(n);s!=null&&s===o||await e.saveSnapshotFile(n,o);}i(dw,"saveSnapshotFile");function $i(e=[],t=[]){let n=Array.from(e);return t.forEach((r,o)=>{let s=n[o];Array.isArray(e[o])?n[o]=$i(e[o],r):Le(s)?n[o]=ji(e[o],r):n[o]=r;}),n}i($i,"deepMergeArray");function ji(e,t){if(Le(e)&&Le(t)){let n={...e};return Object.keys(t).forEach(r=>{Le(t[r])&&!t[r].$$typeof?r in e?n[r]=ji(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Array.isArray(t[r])?n[r]=$i(e[r],t[r]):Object.assign(n,{[r]:t[r]});}),n}else if(Array.isArray(e)&&Array.isArray(t))return $i(e,t);return e}i(ji,"deepMergeSnapshot");var Qr=class extends Map{static{i(this,"DefaultMap");}constructor(t,n){super(n),this.defaultFn=t;}get(t){return this.has(t)||this.set(t,this.defaultFn(t)),super.get(t)}},Nt=class extends Qr{static{i(this,"CounterMap");}constructor(){super(()=>0);}_total;valueOf(){return this._total=this.total()}increment(t){typeof this._total<"u"&&this._total++,this.set(t,this.get(t)+1);}total(){if(typeof this._total<"u")return this._total;let t=0;for(let n of this.values())t+=n;return t}};function Of(e,t){return e.file===t.file&&e.column===t.column&&e.line===t.line}i(Of,"isSameStackPosition");var Ni=class e{static{i(this,"SnapshotState");}_counters=new Nt;_dirty;_updateSnapshot;_snapshotData;_initialData;_inlineSnapshots;_inlineSnapshotStacks;_testIdToKeys=new Qr(()=>[]);_rawSnapshots;_uncheckedKeys;_snapshotFormat;_environment;_fileExists;expand;_added=new Nt;_matched=new Nt;_unmatched=new Nt;_updated=new Nt;get added(){return this._added}set added(t){this._added._total=t;}get matched(){return this._matched}set matched(t){this._matched._total=t;}get unmatched(){return this._unmatched}set unmatched(t){this._unmatched._total=t;}get updated(){return this._updated}set updated(t){this._updated._total=t;}constructor(t,n,r,o){this.testFilePath=t,this.snapshotPath=n;let{data:s,dirty:a}=cw(r,o);this._fileExists=r!=null,this._initialData={...s},this._snapshotData={...s},this._dirty=a,this._inlineSnapshots=[],this._inlineSnapshotStacks=[],this._rawSnapshots=[],this._uncheckedKeys=new Set(Object.keys(this._snapshotData)),this.expand=o.expand||false,this._updateSnapshot=o.updateSnapshot,this._snapshotFormat={printBasicPrototype:false,escapeString:false,...o.snapshotFormat},this._environment=o.snapshotEnvironment;}static async create(t,n){let r=await n.snapshotEnvironment.resolvePath(t),o=await n.snapshotEnvironment.readSnapshotFile(r);return new e(t,r,o,n)}get environment(){return this._environment}markSnapshotsAsCheckedForTest(t){this._uncheckedKeys.forEach(n=>{/ \d+$| > /.test(n.slice(t.length))&&this._uncheckedKeys.delete(n);});}clearTest(t){this._inlineSnapshots=this._inlineSnapshots.filter(n=>n.testId!==t),this._inlineSnapshotStacks=this._inlineSnapshotStacks.filter(n=>n.testId!==t);for(let n of this._testIdToKeys.get(t)){let r=aw(n),o=this._counters.get(r);o>0&&((n in this._snapshotData||n in this._initialData)&&(this._snapshotData[n]=this._initialData[n]),this._counters.set(r,o-1));}this._testIdToKeys.delete(t),this.added.delete(t),this.updated.delete(t),this.matched.delete(t),this.unmatched.delete(t);}_inferInlineSnapshotStack(t){let n=t.findIndex(o=>o.method.match(/__VITEST_(RESOLVES|REJECTS)__/));if(n!==-1)return t[n+3];for(let o=0;o<t.length;o++){let s=t[o].method.match(/__INLINE_SNAPSHOT_OFFSET_(\d+)__/);if(s)return t[o+Number(s[1])]??null}let r=t.findIndex(o=>o.method.includes("__INLINE_SNAPSHOT__"));return r!==-1?t[r+2]:null}_addSnapshot(t,n,r){this._dirty=true,r.stack?this._inlineSnapshots.push({snapshot:n,testId:r.testId,...r.stack}):r.rawSnapshot?this._rawSnapshots.push({...r.rawSnapshot,snapshot:n}):this._snapshotData[t]=n;}async save(){let t=Object.keys(this._snapshotData).length,n=this._inlineSnapshots.length,r=this._rawSnapshots.length,o=!t&&!n&&!r,s={deleted:false,saved:false};return (this._dirty||this._uncheckedKeys.size)&&!o?(t&&(await dw(this._environment,this._snapshotData,this.snapshotPath),this._fileExists=true),n&&await Fy(this._environment,this._inlineSnapshots),r&&await Vy(this._environment,this._rawSnapshots),s.saved=true):!t&&this._fileExists&&(this._updateSnapshot==="all"&&(await this._environment.removeSnapshotFile(this.snapshotPath),this._fileExists=false),s.deleted=true),s}getUncheckedCount(){return this._uncheckedKeys.size||0}getUncheckedKeys(){return Array.from(this._uncheckedKeys)}removeUncheckedKeys(){this._updateSnapshot==="all"&&this._uncheckedKeys.size&&(this._dirty=true,this._uncheckedKeys.forEach(t=>delete this._snapshotData[t]),this._uncheckedKeys.clear());}match({testId:t,testName:n,received:r,key:o,inlineSnapshot:s,isInline:a,error:l,rawSnapshot:c}){this._counters.increment(n);let u=this._counters.get(n);o||(o=iw(n,u)),this._testIdToKeys.get(t).push(o),a&&this._snapshotData[o]!==void 0||this._uncheckedKeys.delete(o);let f=c&&typeof r=="string"?r:hw(r,void 0,this._snapshotFormat);c||(f=lw(f)),c&&c.content&&c.content.match(/\r\n/)&&!f.match(/\r\n/)&&(c.content=Ri(c.content));let h=a?s:c?c.content:this._snapshotData[o],d=c?h:h?.trim(),p=d===(c?f:f.trim()),g=h!==void 0,m=a||this._fileExists||c&&c.content!=null;p&&!a&&!c&&(this._snapshotData[o]=f);let b;if(a){let E=il(l||new Error("snapshot"),{ignoreStackEntries:[]}),M=this._inferInlineSnapshotStack(E);if(!M)throw new Error(`@vitest/snapshot: Couldn't infer stack frame for inline snapshot.
156
+ ${JSON.stringify(E)}`);b=this.environment.processStackTrace?.(M)||M,b.column--;let A=this._inlineSnapshotStacks.filter(C=>Of(C,b));if(A.length>0){this._inlineSnapshots=this._inlineSnapshots.filter(O=>!Of(O,b));let C=A.find(O=>O.snapshot!==f);if(C)throw Object.assign(new Error("toMatchInlineSnapshot with different snapshots cannot be called at the same location"),{actual:f,expected:C.snapshot})}this._inlineSnapshotStacks.push({...b,testId:t,snapshot:f});}return g&&this._updateSnapshot==="all"||(!g||!m)&&(this._updateSnapshot==="new"||this._updateSnapshot==="all")?(this._updateSnapshot==="all"?p?this.matched.increment(t):(g?this.updated.increment(t):this.added.increment(t),this._addSnapshot(o,f,{stack:b,testId:t,rawSnapshot:c})):(this._addSnapshot(o,f,{stack:b,testId:t,rawSnapshot:c}),this.added.increment(t)),{actual:"",count:u,expected:"",key:o,pass:true}):p?(this.matched.increment(t),{actual:"",count:u,expected:"",key:o,pass:true}):(this.unmatched.increment(t),{actual:c?f:Cf(f),count:u,expected:d!==void 0?c?d:Cf(d):void 0,key:o,pass:false})}async pack(){let t={filepath:this.testFilePath,added:0,fileDeleted:false,matched:0,unchecked:0,uncheckedKeys:[],unmatched:0,updated:0},n=this.getUncheckedCount(),r=this.getUncheckedKeys();n&&this.removeUncheckedKeys();let o=await this.save();return t.fileDeleted=o.deleted,t.added=this.added.total(),t.matched=this.matched.total(),t.unmatched=this.unmatched.total(),t.updated=this.updated.total(),t.unchecked=o.deleted?0:n,t.uncheckedKeys=Array.from(r),t}};function If(e,t,n,r){let o=new Error(e);return Object.defineProperty(o,"actual",{value:n,enumerable:true,configurable:true,writable:true}),Object.defineProperty(o,"expected",{value:r,enumerable:true,configurable:true,writable:true}),Object.defineProperty(o,"diffOptions",{value:{expand:t}}),o}i(If,"createMismatchError");var eo=class{static{i(this,"SnapshotClient");}snapshotStateMap=new Map;constructor(t={}){this.options=t;}async setup(t,n){this.snapshotStateMap.has(t)||this.snapshotStateMap.set(t,await Ni.create(t,n));}async finish(t){let r=await this.getSnapshotState(t).pack();return this.snapshotStateMap.delete(t),r}skipTest(t,n){this.getSnapshotState(t).markSnapshotsAsCheckedForTest(n);}clearTest(t,n){this.getSnapshotState(t).clearTest(n);}getSnapshotState(t){let n=this.snapshotStateMap.get(t);if(!n)throw new Error(`The snapshot state for '${t}' is not found. Did you call 'SnapshotClient.setup()'?`);return n}assert(t){let{filepath:n,name:r,testId:o=r,message:s,isInline:a=false,properties:l,inlineSnapshot:c,error:u,errorMessage:f,rawSnapshot:h}=t,{received:d}=t;if(!n)throw new Error("Snapshot cannot be used outside of test");let p=this.getSnapshotState(n);if(typeof l=="object"){if(typeof d!="object"||!d)throw new Error("Received value must be an object when the matcher has properties");try{if(this.options.isEqual?.(d,l)??false)d=ji(d,l);else throw If("Snapshot properties mismatched",p.expand,d,l)}catch(A){throw A.message=f||"Snapshot mismatched",A}}let g=[r,...s?[s]:[]].join(" > "),{actual:m,expected:b,key:E,pass:M}=p.match({testId:o,testName:g,received:d,isInline:a,error:u,inlineSnapshot:c,rawSnapshot:h});if(!M)throw If(`Snapshot \`${E||"unknown"}\` mismatched`,p.expand,h?m:m?.trim(),h?b:b?.trim())}async assertRaw(t){if(!t.rawSnapshot)throw new Error("Raw snapshot is required");let{filepath:n,rawSnapshot:r}=t;if(r.content==null){if(!n)throw new Error("Snapshot cannot be used outside of test");let o=this.getSnapshotState(n);t.filepath||=n,r.file=await o.environment.resolveRawPath(n,r.file),r.content=await o.environment.readSnapshotFile(r.file)??void 0;}return this.assert(t)}clear(){this.snapshotStateMap.clear();}};var to=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};var Je=Date,Fi=null,Et=class e extends Je{static{i(this,"MockDate");}constructor(t,n,r,o,s,a,l){super();let c;switch(arguments.length){case 0:Fi!==null?c=new Je(Fi.valueOf()):c=new Je;break;case 1:c=new Je(t);break;default:r=typeof r>"u"?1:r,o=o||0,s=s||0,a=a||0,l=l||0,c=new Je(t,n,r,o,s,a,l);break}return Object.setPrototypeOf(c,e.prototype),c}};Et.UTC=Je.UTC;Et.now=function(){return new Et().valueOf()};Et.parse=function(e){return Je.parse(e)};Et.toString=function(){return Je.toString()};function Nf(e){let t=new Je(e.valueOf());if(Number.isNaN(t.getTime()))throw new TypeError(`mockdate: The time set is an invalid date: ${e}`);globalThis.Date=Et,Fi=t.valueOf();}i(Nf,"mockDate");function Di(){globalThis.Date=Je;}i(Di,"resetDate");var mw=["matchSnapshot","toMatchSnapshot","toMatchInlineSnapshot","toThrowErrorMatchingSnapshot","toThrowErrorMatchingInlineSnapshot","throws","Throw","throw","toThrow","toThrowError"];function gw(e,t){throw e.cause==null&&(e.cause=new Error("Matcher did not succeed in time.")),nh(e,t)}i(gw,"throwWithCause");function yw(e){return i(function(n,r={}){let o=wn().config.expect?.poll??{},{interval:s=o.interval??50,timeout:a=o.timeout??1e3,message:l}=r,c=e(null,l).withContext({poll:true});n=n.bind(c);let u=oe.util.flag(c,"vitest-test");if(!u)throw new Error("expect.poll() must be called inside a test");let f=new Proxy(c,{get(h,d,p){let g=Reflect.get(h,d,p);if(typeof g!="function")return g instanceof oe.Assertion?f:g;if(d==="assert")return g;if(typeof d=="string"&&mw.includes(d))throw new SyntaxError(`expect.poll() is not supported in combination with .${d}(). Use vi.waitFor() if your assertion condition is unstable.`);return function(...m){let b=new Error("STACK_TRACE_ERROR"),E=i(async()=>{let{setTimeout:C,clearTimeout:O}=ft(),N="fn",_=false,q=C(()=>{_=true;},a);oe.util.flag(c,"_name",d);let Q=oe.util.flag(c,"_poll.onSettled");try{for(;;){let R=_;R&&oe.util.flag(c,"_isLastPollAttempt",true);try{N="fn";let V=await n();oe.util.flag(c,"object",V),N="assertion";let Y=await g.call(c,...m);return await Q?.({assertion:c,status:"pass"}),Y}catch(V){(R||N==="assertion"&&oe.util.flag(c,"_poll.assert_once"))&&(await Q?.({assertion:c,status:"fail"}),gw(V,b)),await Yc(s,C);}}}finally{O(q);}},"promise"),M=false;u.onFinished??=[],u.onFinished.push(()=>{if(!M){let C=oe.util.flag(c,"negate")?"not.":"",O=`expect.${oe.util.flag(c,"_poll.element")?"element(locator)":"poll(assertion)"}.${C}${String(d)}()`;throw nh(new Error(`${O} was not awaited. This assertion is asynchronous and must be awaited; otherwise, it is not executed to avoid unhandled rejections:
157
+
158
+ await ${O}
159
+ `),b)}});let A;return {then(C,O){return M=true,(A||=E()).then(C,O)},catch(C){return M=true,(A||=E()).catch(C)},finally(C){return M=true,(A||=E()).finally(C)},[Symbol.toStringTag]:"Promise"}}}});return f},"poll")}i(yw,"createExpectPoll");function nh(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}i(nh,"copyStackTrace$1");var Li;function jn(){return Li||(Li=new eo({isEqual:i((e,t)=>K(e,t,[ke,At]),"isEqual")})),Li}i(jn,"getSnapshotClient");function Pf(e,t){if(typeof e!="function"){if(!t)throw new Error(`expected must be a function, received ${typeof e}`);return e}try{e();}catch(n){return n}throw new Error("snapshot function didn't throw")}i(Pf,"getError");function Fn(e){return {filepath:e.file.filepath,name:as(e).slice(1).join(" > "),testId:e.id}}i(Fn,"getTestNames");var ww=i((e,t)=>{function n(r,o){let s=t.flag(o,"vitest-test");if(!s)throw new Error(`'${r}' cannot be used without test context`);return s}i(n,"getTest");for(let r of ["matchSnapshot","toMatchSnapshot"])t.addMethod(e.Assertion.prototype,r,$t(t,r,function(o,s){if(t.flag(this,"_name",r),t.flag(this,"negate"))throw new Error(`${r} cannot be used with "not"`);let a=t.flag(this,"object"),l=n(r,this);typeof o=="string"&&typeof s>"u"&&(s=o,o=void 0);let c=t.flag(this,"message");jn().assert({received:a,message:s,isInline:false,properties:o,errorMessage:c,...Fn(l)});}));t.addMethod(e.Assertion.prototype,"toMatchFileSnapshot",function(r,o){if(t.flag(this,"_name","toMatchFileSnapshot"),t.flag(this,"negate"))throw new Error('toMatchFileSnapshot cannot be used with "not"');let s=new Error("resolves"),a=t.flag(this,"object"),l=n("toMatchFileSnapshot",this),c=t.flag(this,"message");return zr(l,jn().assertRaw({received:a,message:o,isInline:false,rawSnapshot:{file:r},errorMessage:c,...Fn(l)}),Ur(t,this,true),s,t.flag(this,"soft"))}),t.addMethod(e.Assertion.prototype,"toMatchInlineSnapshot",$t(t,"toMatchInlineSnapshot",i(function(o,s,a){if(t.flag(this,"_name","toMatchInlineSnapshot"),t.flag(this,"negate"))throw new Error('toMatchInlineSnapshot cannot be used with "not"');let l=n("toMatchInlineSnapshot",this),c=t.flag(this,"object"),u=t.flag(this,"error");typeof o=="string"&&(a=s,s=o,o=void 0),s&&(s=Pi(s));let f=t.flag(this,"message");jn().assert({received:c,message:a,isInline:true,properties:o,inlineSnapshot:s,error:u,errorMessage:f,...Fn(l)});},"__INLINE_SNAPSHOT_OFFSET_3__"))),t.addMethod(e.Assertion.prototype,"toThrowErrorMatchingSnapshot",$t(t,"toThrowErrorMatchingSnapshot",function(r,o){if(t.flag(this,"_name","toThrowErrorMatchingSnapshot"),t.flag(this,"negate"))throw new Error('toThrowErrorMatchingSnapshot cannot be used with "not"');let s=t.flag(this,"object"),a=n("toThrowErrorMatchingSnapshot",this),l=t.flag(this,"promise"),c=t.flag(this,"message");jn().assert({received:Pf(s,l),message:o,errorMessage:c,...Fn(a)});})),t.addMethod(e.Assertion.prototype,"toThrowErrorMatchingInlineSnapshot",$t(t,"toThrowErrorMatchingInlineSnapshot",i(function(o,s){if(t.flag(this,"negate"))throw new Error('toThrowErrorMatchingInlineSnapshot cannot be used with "not"');let a=n("toThrowErrorMatchingInlineSnapshot",this),l=t.flag(this,"object"),c=t.flag(this,"error"),u=t.flag(this,"promise"),f=t.flag(this,"message");o&&(o=Pi(o)),jn().assert({received:Pf(l,u),message:s,inlineSnapshot:o,isInline:true,error:c,errorMessage:f,...Fn(a)});},"__INLINE_SNAPSHOT_OFFSET_3__"))),t.addMethod(e.expect,"addSnapshotSerializer",$f);},"SnapshotPlugin");oe.use(uf);oe.use(lf);oe.use(Zu);oe.use(ww);oe.use(cf);function rh(e){let t=i(((s,a)=>{let{assertionCalls:l}=Gt(t);Gr({assertionCalls:l+1},t);let c=oe.expect(s,a),u=e||Ut();return u?c.withTest(u):c}),"expect");Object.assign(t,oe.expect),Object.assign(t,globalThis[Vr]),t.getState=()=>Gt(t),t.setState=s=>Gr(s,t);let n=Gt(globalThis[An])||{};Gr({...n,assertionCalls:0,isExpectingAssertions:false,isExpectingAssertionsError:null,expectedAssertionsNumber:null,expectedAssertionsNumberErrorGen:null,get testPath(){return wn().filepath},currentTestName:e?e.fullTestName??"":n.currentTestName},t),t.assert=oe.assert,t.extend=s=>oe.expect.extend(t,s),t.addEqualityTesters=s=>nf(s),t.soft=(...s)=>t(...s).withContext({soft:true}),t.poll=yw(t),t.unreachable=s=>{oe.assert.fail(`expected${s?` "${s}" `:" "}not to be reached`);};function r(s){let a=i(()=>new Error(`expected number of assertions to be ${s}, but got ${t.getState().assertionCalls}`),"errorGen");Error.captureStackTrace&&Error.captureStackTrace(a(),r),t.setState({expectedAssertionsNumber:s,expectedAssertionsNumberErrorGen:a});}i(r,"assertions");function o(){let s=new Error("expected any number of assertion, but got none");Error.captureStackTrace&&Error.captureStackTrace(s,o),t.setState({isExpectingAssertions:true,isExpectingAssertionsError:s});}return i(o,"hasAssertions"),oe.util.addMethod(t,"assertions",r),oe.util.addMethod(t,"hasAssertions",o),t.extend(Qu),t}i(rh,"createExpect");var Re=rh();Object.defineProperty(globalThis,An,{value:Re,writable:true,configurable:true});var Yt={},Bi,Rf;function Sw(){if(Rf)return Bi;Rf=1;var e;return typeof to<"u"?e=to:typeof window<"u"?e=window:e=self,Bi=e,Bi}i(Sw,"requireGlobal");var qi,jf;function Ew(){if(jf)return qi;jf=1;let e;try{e=false;}catch{e=true;}return qi=e,qi}i(Ew,"requireThrowsOnProto");var Ui,Ff;function Zt(){if(Ff)return Ui;Ff=1;var e=Function.call,t=Ew(),n=["size","caller","callee","arguments"];return t&&n.push("__proto__"),Ui=i(function(o){return Object.getOwnPropertyNames(o).reduce(function(s,a){return n.includes(a)||typeof o[a]!="function"||(s[a]=e.bind(o[a])),s},Object.create(null))},"copyPrototypeMethods"),Ui}i(Zt,"requireCopyPrototypeMethods");var zi,Df;function ro(){if(Df)return zi;Df=1;var e=Zt();return zi=e(Array.prototype),zi}i(ro,"requireArray");var Wi,Lf;function vw(){if(Lf)return Wi;Lf=1;var e=ro().every;function t(o,s){return o[s.id]===void 0&&(o[s.id]=0),o[s.id]<s.callCount}i(t,"hasCallsLeft");function n(o,s,a,l){var c=true;return a!==l.length-1&&(c=s.calledBefore(l[a+1])),t(o,s)&&c?(o[s.id]+=1,true):false}i(n,"checkAdjacentCalls");function r(o){var s={},a=arguments.length>1?arguments:o;return e(a,n.bind(null,s))}return i(r,"calledInOrder"),Wi=r,Wi}i(vw,"requireCalledInOrder");var Vi,Bf;function xw(){if(Bf)return Vi;Bf=1;function e(t){return t.constructor&&t.constructor.name||null}return i(e,"className"),Vi=e,Vi}i(xw,"requireClassName");var Ki={},qf;function kw(){return qf||(qf=1,(function(e){e.wrap=function(t,n){var r=i(function(){return e.printWarning(n),t.apply(this,arguments)},"wrapped");return t.prototype&&(r.prototype=t.prototype),r},e.defaultMsg=function(t,n){return `${t}.${n} is deprecated and will be removed from the public API in a future version of ${t}.`},e.printWarning=function(t){typeof process=="object"&&process.emitWarning?process.emitWarning(t):console.info?console.info(t):console.log(t);};})(Ki)),Ki}i(kw,"requireDeprecated");var Hi,Uf;function Mw(){return Uf||(Uf=1,Hi=i(function(t,n){var r=true;try{t.forEach(function(){if(!n.apply(this,arguments))throw new Error});}catch{r=false;}return r},"every")),Hi}i(Mw,"requireEvery");var Gi,zf;function Cw(){return zf||(zf=1,Gi=i(function(t){if(!t)return "";try{return t.displayName||t.name||(String(t).match(/function ([^\s(]+)/)||[])[1]}catch{return ""}},"functionName")),Gi}i(Cw,"requireFunctionName");var Ji,Wf;function _w(){if(Wf)return Ji;Wf=1;var e=ro().sort,t=ro().slice;function n(o,s){var a=o.getCall(0),l=s.getCall(0),c=a&&a.callId||-1,u=l&&l.callId||-1;return c<u?-1:1}i(n,"comparator");function r(o){return e(t(o),n)}return i(r,"orderByFirstCall"),Ji=r,Ji}i(_w,"requireOrderByFirstCall");var Yi,Vf;function Ow(){if(Vf)return Yi;Vf=1;var e=Zt();return Yi=e(Function.prototype),Yi}i(Ow,"require_function");var Xi,Kf;function Iw(){if(Kf)return Xi;Kf=1;var e=Zt();return Xi=e(Map.prototype),Xi}i(Iw,"requireMap");var Zi,Hf;function Aw(){if(Hf)return Zi;Hf=1;var e=Zt();return Zi=e(Object.prototype),Zi}i(Aw,"requireObject");var Qi,Gf;function $w(){if(Gf)return Qi;Gf=1;var e=Zt();return Qi=e(Set.prototype),Qi}i($w,"requireSet");var ea,Jf;function Nw(){if(Jf)return ea;Jf=1;var e=Zt();return ea=e(String.prototype),ea}i(Nw,"requireString");var ta,Yf;function Pw(){return Yf||(Yf=1,ta={array:ro(),function:Ow(),map:Iw(),object:Aw(),set:$w(),string:Nw()}),ta}i(Pw,"requirePrototypes");var no={exports:{}},Rw=no.exports,Xf;function jw(){return Xf||(Xf=1,(function(e,t){(function(n,r){e.exports=r();})(Rw,(function(){var n=typeof Promise=="function",r=typeof self=="object"?self:to,o=typeof Symbol<"u",s=typeof Map<"u",a=typeof Set<"u",l=typeof WeakMap<"u",c=typeof WeakSet<"u",u=typeof DataView<"u",f=o&&typeof Symbol.iterator<"u",h=o&&typeof Symbol.toStringTag<"u",d=a&&typeof Set.prototype.entries=="function",p=s&&typeof Map.prototype.entries=="function",g=d&&Object.getPrototypeOf(new Set().entries()),m=p&&Object.getPrototypeOf(new Map().entries()),b=f&&typeof Array.prototype[Symbol.iterator]=="function",E=b&&Object.getPrototypeOf([][Symbol.iterator]()),M=f&&typeof String.prototype[Symbol.iterator]=="function",A=M&&Object.getPrototypeOf(""[Symbol.iterator]()),C=8,O=-1;function N(_){var q=typeof _;if(q!=="object")return q;if(_===null)return "null";if(_===r)return "global";if(Array.isArray(_)&&(h===false||!(Symbol.toStringTag in _)))return "Array";if(typeof window=="object"&&window!==null){if(typeof window.location=="object"&&_===window.location)return "Location";if(typeof window.document=="object"&&_===window.document)return "Document";if(typeof window.navigator=="object"){if(typeof window.navigator.mimeTypes=="object"&&_===window.navigator.mimeTypes)return "MimeTypeArray";if(typeof window.navigator.plugins=="object"&&_===window.navigator.plugins)return "PluginArray"}if((typeof window.HTMLElement=="function"||typeof window.HTMLElement=="object")&&_ instanceof window.HTMLElement){if(_.tagName==="BLOCKQUOTE")return "HTMLQuoteElement";if(_.tagName==="TD")return "HTMLTableDataCellElement";if(_.tagName==="TH")return "HTMLTableHeaderCellElement"}}var Q=h&&_[Symbol.toStringTag];if(typeof Q=="string")return Q;var R=Object.getPrototypeOf(_);return R===RegExp.prototype?"RegExp":R===Date.prototype?"Date":n&&R===Promise.prototype?"Promise":a&&R===Set.prototype?"Set":s&&R===Map.prototype?"Map":c&&R===WeakSet.prototype?"WeakSet":l&&R===WeakMap.prototype?"WeakMap":u&&R===DataView.prototype?"DataView":s&&R===m?"Map Iterator":a&&R===g?"Set Iterator":b&&R===E?"Array Iterator":M&&R===A?"String Iterator":R===null?"Object":Object.prototype.toString.call(_).slice(C,O)}return i(N,"typeDetect"),N}));})(no)),no.exports}i(jw,"requireTypeDetect");var na,Zf;function Fw(){if(Zf)return na;Zf=1;var e=jw();return na=i(function(n){return e(n).toLowerCase()},"typeOf"),na}i(Fw,"requireTypeOf");var ra,Qf;function Dw(){if(Qf)return ra;Qf=1;function e(t){return t&&t.toString?t.toString():String(t)}return i(e,"valueToString"),ra=e,ra}i(Dw,"requireValueToString");var oa,eh;function Lw(){return eh||(eh=1,oa={global:Sw(),calledInOrder:vw(),className:xw(),deprecated:kw(),every:Mw(),functionName:Cw(),orderByFirstCall:_w(),prototypes:Pw(),typeOf:Fw(),valueToString:Dw()}),oa}i(Lw,"requireLib");var th;function Bw(){if(th)return Yt;th=1;let e=Lw().global,t,n;if(typeof __vitest_required__<"u"){try{t=__vitest_required__.timers;}catch{}try{n=__vitest_required__.timersPromises;}catch{}}function r(s){let a=Math.pow(2,31)-1,l=1e12,c=i(function(){},"NOOP"),u=i(function(){return []},"NOOP_ARRAY"),f={},h,d=false;s.setTimeout&&(f.setTimeout=true,h=s.setTimeout(c,0),d=typeof h=="object"),f.clearTimeout=!!s.clearTimeout,f.setInterval=!!s.setInterval,f.clearInterval=!!s.clearInterval,f.hrtime=s.process&&typeof s.process.hrtime=="function",f.hrtimeBigint=f.hrtime&&typeof s.process.hrtime.bigint=="function",f.nextTick=s.process&&typeof s.process.nextTick=="function";let p=s.process&&s.__vitest_required__&&s.__vitest_required__.util.promisify;f.performance=s.performance&&typeof s.performance.now=="function";let g=s.Performance&&(typeof s.Performance).match(/^(function|object)$/),m=s.performance&&s.performance.constructor&&s.performance.constructor.prototype;f.queueMicrotask=s.hasOwnProperty("queueMicrotask"),f.requestAnimationFrame=s.requestAnimationFrame&&typeof s.requestAnimationFrame=="function",f.cancelAnimationFrame=s.cancelAnimationFrame&&typeof s.cancelAnimationFrame=="function",f.requestIdleCallback=s.requestIdleCallback&&typeof s.requestIdleCallback=="function",f.cancelIdleCallbackPresent=s.cancelIdleCallback&&typeof s.cancelIdleCallback=="function",f.setImmediate=s.setImmediate&&typeof s.setImmediate=="function",f.clearImmediate=s.clearImmediate&&typeof s.clearImmediate=="function",f.Intl=s.Intl&&typeof s.Intl=="object",s.clearTimeout&&s.clearTimeout(h);let b=s.Date,E=f.Intl?Object.defineProperties(Object.create(null),Object.getOwnPropertyDescriptors(s.Intl)):void 0,M=l;if(b===void 0)throw new Error("The global scope doesn't have a `Date` object (see https://github.com/sinonjs/sinon/issues/1852#issuecomment-419622780)");f.Date=true;class A{static{i(this,"FakePerformanceEntry");}constructor(k,I,j,T){this.name=k,this.entryType=I,this.startTime=j,this.duration=T;}toJSON(){return JSON.stringify({...this})}}function C(v){return Number.isFinite?Number.isFinite(v):isFinite(v)}i(C,"isNumberFinite");let O=false;function N(v,k){v.loopLimit&&k===v.loopLimit-1&&(O=true);}i(N,"checkIsNearInfiniteLimit");function _(){O=false;}i(_,"resetIsNearInfiniteLimit");function q(v){if(!v)return 0;let k=v.split(":"),I=k.length,j=I,T=0,L;if(I>3||!/^(\d\d:){0,2}\d\d?$/.test(v))throw new Error("tick only understands numbers, 'm:s' and 'h:m:s'. Each part must be two digits");for(;j--;){if(L=parseInt(k[j],10),L>=60)throw new Error(`Invalid time ${v}`);T+=L*Math.pow(60,I-j-1);}return T*1e3}i(q,"parseTime");function Q(v){let I=v*1e6%1e6,j=I<0?I+1e6:I;return Math.floor(j)}i(Q,"nanoRemainder");function R(v){if(!v)return 0;if(typeof v.getTime=="function")return v.getTime();if(typeof v=="number")return v;throw new TypeError("now should be milliseconds since UNIX epoch")}i(R,"getEpoch");function V(v,k,I){return I&&I.callAt>=v&&I.callAt<=k}i(V,"inRange");function Y(v,k){let I=new Error(`Aborting after running ${v.loopLimit} timers, assuming an infinite loop!`);if(!k.error)return I;let j=/target\.*[<|(|[].*?[>|\]|)]\s*/,T=new RegExp(String(Object.keys(v).join("|")));d&&(T=new RegExp(`\\s+at (Object\\.)?(?:${Object.keys(v).join("|")})\\s+`));let L=-1;k.error.stack.split(`
160
+ `).some(function(J,te){return J.match(j)?(L=te,true):J.match(T)?(L=te,false):L>=0});let B=`${I}
159
161
  ${k.type||"Microtask"} - ${k.func.name||"anonymous"}
160
162
  ${k.error.stack.split(`
161
- `).slice(B+1).join(`
162
- `)}`;try{Object.defineProperty(I,"stack",{value:q});}catch{}return I}i(Y,"getInfiniteLoopError");function ge(){class v extends b{static{i(this,"ClockDate");}constructor(R,T,B,q,X,ne,Fe){arguments.length===0?super(v.clock.now):super(...arguments),Object.defineProperty(this,"constructor",{value:b,enumerable:false});}static[Symbol.hasInstance](R){return R instanceof b}}return v.isFake=true,b.now&&(v.now=i(function(){return v.clock.now},"now")),b.toSource&&(v.toSource=i(function(){return b.toSource()},"toSource")),v.toString=i(function(){return b.toString()},"toString"),new Proxy(v,{apply(){if(this instanceof v)throw new TypeError("A Proxy should only capture `new` calls with the `construct` handler. This is not supposed to be possible, so check the logic.");return new b(v.clock.now).toString()}})}i(ge,"createDate");function le(){let v={};return Object.getOwnPropertyNames(S).forEach(k=>v[k]=S[k]),v.DateTimeFormat=function(...k){let I=new S.DateTimeFormat(...k),R={};return ["formatRange","formatRangeToParts","resolvedOptions"].forEach(T=>{R[T]=I[T].bind(I);}),["format","formatToParts"].forEach(T=>{R[T]=function(B){return I[T](B||v.clock.now)};}),R},v.DateTimeFormat.prototype=Object.create(S.DateTimeFormat.prototype),v.DateTimeFormat.supportedLocalesOf=S.DateTimeFormat.supportedLocalesOf,v}i(le,"createIntl");function V(v,k){v.jobs||(v.jobs=[]),v.jobs.push(k);}i(V,"enqueueJob");function U(v){if(v.jobs){for(let k=0;k<v.jobs.length;k++){let I=v.jobs[k];if(I.func.apply(null,I.args),N(v,k),v.loopLimit&&k>v.loopLimit)throw Y(v,I)}C(),v.jobs=[];}}i(U,"runJobs");function te(v,k){if(k.func===void 0)throw new Error("Callback must be provided to timer calls");if(p&&typeof k.func!="function")throw new TypeError(`[ERR_INVALID_CALLBACK]: Callback must be a function. Received ${k.func} of type ${typeof k.func}`);if(O&&(k.error=new Error),k.type=k.immediate?"Immediate":"Timeout",k.hasOwnProperty("delay")&&(typeof k.delay!="number"&&(k.delay=parseInt(k.delay,10)),M(k.delay)||(k.delay=0),k.delay=k.delay>a?1:k.delay,k.delay=Math.max(0,k.delay)),k.hasOwnProperty("interval")&&(k.type="Interval",k.interval=k.interval>a?1:k.interval),k.hasOwnProperty("animation")&&(k.type="AnimationFrame",k.animation=true),k.hasOwnProperty("idleCallback")&&(k.type="IdleCallback",k.idleCallback=true),v.timers||(v.timers={}),k.id=_++,k.createdAt=v.now,k.callAt=v.now+(parseInt(k.delay)||(v.duringTick?1:0)),v.timers[k.id]=k,p){let I={refed:true,ref:i(function(){return this.refed=true,I},"ref"),unref:i(function(){return this.refed=false,I},"unref"),hasRef:i(function(){return this.refed},"hasRef"),refresh:i(function(){return k.callAt=v.now+(parseInt(k.delay)||(v.duringTick?1:0)),v.timers[k.id]=k,I},"refresh"),[Symbol.toPrimitive]:function(){return k.id}};return I}return k.id}i(te,"addTimer");function _e(v,k){if(v.callAt<k.callAt)return -1;if(v.callAt>k.callAt)return 1;if(v.immediate&&!k.immediate)return -1;if(!v.immediate&&k.immediate)return 1;if(v.createdAt<k.createdAt)return -1;if(v.createdAt>k.createdAt)return 1;if(v.id<k.id)return -1;if(v.id>k.id)return 1}i(_e,"compareTimers");function fe(v,k,I){let R=v.timers,T=null,B,q;for(B in R)R.hasOwnProperty(B)&&(q=W(k,I,R[B]),q&&(!T||_e(T,R[B])===1)&&(T=R[B]));return T}i(fe,"firstTimerInRange");function me(v){let k=v.timers,I=null,R;for(R in k)k.hasOwnProperty(R)&&(!I||_e(I,k[R])===1)&&(I=k[R]);return I}i(me,"firstTimer");function je(v){let k=v.timers,I=null,R;for(R in k)k.hasOwnProperty(R)&&(!I||_e(I,k[R])===-1)&&(I=k[R]);return I}i(je,"lastTimer");function xe(v,k){if(typeof k.interval=="number"?v.timers[k.id].callAt+=k.interval:delete v.timers[k.id],typeof k.func=="function")k.func.apply(null,k.args);else {let I=eval;(function(){I(k.func);})();}}i(xe,"callTimer");function Me(v){return v==="IdleCallback"||v==="AnimationFrame"?`cancel${v}`:`clear${v}`}i(Me,"getClearHandler");function it(v){return v==="IdleCallback"||v==="AnimationFrame"?`request${v}`:`set${v}`}i(it,"getScheduleHandler");function ze(){let v=0;return function(k){!v++&&console.warn(k);}}i(ze,"createWarnOnce");let Ce=ze();function Oe(v,k,I){if(!k)return;v.timers||(v.timers={});let R=Number(k);if(Number.isNaN(R)||R<l){let T=Me(I);if(v.shouldClearNativeTimers===true){let B=v[`_${T}`];return typeof B=="function"?B(k):void 0}Ce(`FakeTimers: ${T} was invoked to clear a native timer instead of one created by this library.
163
- To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`);}if(v.timers.hasOwnProperty(R)){let T=v.timers[R];if(T.type===I||T.type==="Timeout"&&I==="Interval"||T.type==="Interval"&&I==="Timeout")delete v.timers[R];else {let B=Me(I),q=it(T.type);throw new Error(`Cannot clear timer: timer created with ${q}() but cleared with ${B}()`)}}}i(Oe,"clearTimer");function jt(v){let k,I,R,T="_hrtime",B="_nextTick";for(I=0,R=v.methods.length;I<R;I++){if(k=v.methods[I],k==="hrtime"&&s.process)s.process.hrtime=v[T];else if(k==="nextTick"&&s.process)s.process.nextTick=v[B];else if(k==="performance"){let q=Object.getOwnPropertyDescriptor(v,`_${k}`);q&&q.get&&!q.set?Object.defineProperty(s,k,q):q.configurable&&(s[k]=v[`_${k}`]);}else if(s[k]&&s[k].hadOwnProperty)s[k]=v[`_${k}`];else try{delete s[k];}catch{}if(v.timersModuleMethods!==void 0)for(let q=0;q<v.timersModuleMethods.length;q++){let X=v.timersModuleMethods[q];t[X.methodName]=X.original;}if(v.timersPromisesModuleMethods!==void 0)for(let q=0;q<v.timersPromisesModuleMethods.length;q++){let X=v.timersPromisesModuleMethods[q];n[X.methodName]=X.original;}}v.setTickMode("manual"),v.methods=[];for(let[q,X]of v.abortListenerMap.entries())X.removeEventListener("abort",q),v.abortListenerMap.delete(q);return v.timers?Object.keys(v.timers).map(i(function(X){return v.timers[X]},"mapper")):[]}i(jt,"uninstall");function Qe(v,k,I){if(I[k].hadOwnProperty=Object.prototype.hasOwnProperty.call(v,k),I[`_${k}`]=v[k],k==="Date")v[k]=I[k];else if(k==="Intl")v[k]=I[k];else if(k==="performance"){let R=Object.getOwnPropertyDescriptor(v,k);if(R&&R.get&&!R.set){Object.defineProperty(I,`_${k}`,R);let T=Object.getOwnPropertyDescriptor(I,k);Object.defineProperty(v,k,T);}else v[k]=I[k];}else v[k]=function(){return I[k].apply(I,arguments)},Object.defineProperties(v[k],Object.getOwnPropertyDescriptors(I[k]));v[k].clock=I;}i(Qe,"hijackMethod");function rn(v,k){v.tick(k);}i(rn,"doIntervalTick");let Se={setTimeout:s.setTimeout,clearTimeout:s.clearTimeout,setInterval:s.setInterval,clearInterval:s.clearInterval,Date:s.Date};f.setImmediate&&(Se.setImmediate=s.setImmediate),f.clearImmediate&&(Se.clearImmediate=s.clearImmediate),f.hrtime&&(Se.hrtime=s.process.hrtime),f.nextTick&&(Se.nextTick=s.process.nextTick),f.performance&&(Se.performance=s.performance),f.requestAnimationFrame&&(Se.requestAnimationFrame=s.requestAnimationFrame),f.queueMicrotask&&(Se.queueMicrotask=s.queueMicrotask),f.cancelAnimationFrame&&(Se.cancelAnimationFrame=s.cancelAnimationFrame),f.requestIdleCallback&&(Se.requestIdleCallback=s.requestIdleCallback),f.cancelIdleCallback&&(Se.cancelIdleCallback=s.cancelIdleCallback),f.Intl&&(Se.Intl=S);let et=s.setImmediate||s.setTimeout,Oh=s.clearInterval,Ih=s.setInterval;function pa(v,k){v=Math.floor(j(v)),k=k||1e3;let I=0,R=[0,0],T={now:v,Date:ge(),loopLimit:k,tickMode:{mode:"manual",counter:0,delta:void 0}};T.Date.clock=T;function B(){return 16-(T.now-v)%16}i(B,"getTimeToNextFrame");function q(P){let $=T.now-R[0]-v,F=Math.floor($/1e3),D=($-F*1e3)*1e6+I-R[1];if(Array.isArray(P)){if(P[1]>1e9)throw new TypeError("Number of nanoseconds can't exceed a billion");let Z=P[0],ae=D-P[1],Ie=F-Z;return ae<0&&(ae+=1e9,Ie-=1),[Ie,ae]}return [F,D]}i(q,"hrtime");function X(){let P=q();return P[0]*1e3+P[1]/1e6}i(X,"fakePerformanceNow"),f.hrtimeBigint&&(q.bigint=function(){let P=q();return BigInt(P[0])*BigInt(1e9)+BigInt(P[1])}),f.Intl&&(T.Intl=le(),T.Intl.clock=T),T.setTickMode=function(P){let{mode:$,delta:F}=P,{mode:D,delta:Z}=T.tickMode;$===D&&F===Z||(D==="interval"&&Oh(T.attachedInterval),T.tickMode={counter:T.tickMode.counter+1,mode:$,delta:F},$==="nextAsync"?ne():$==="interval"&&Ah(T,F||20));};async function ne(){async function P(){let F=new MessageChannel;await new Promise(D=>{F.port1.onmessage=()=>{D(),F.port1.close();},F.port2.postMessage(void 0);}),F.port1.close(),F.port2.close(),await new Promise(D=>{et(D);});}i(P,"newMacrotask");let{counter:$}=T.tickMode;for(;T.tickMode.counter===$;){if(await P(),T.tickMode.counter!==$)return;T.next();}}i(ne,"advanceUntilModeChanges");function Fe(P){return T.tickMode.mode!=="nextAsync"?P:(T.setTickMode({mode:"manual"}),P.finally(()=>{T.setTickMode({mode:"nextAsync"});}))}i(Fe,"pauseAutoTickUntilFinished"),T.requestIdleCallback=i(function($,F){let D=0;T.countTimers()>0&&(D=50);let Z=te(T,{func:$,args:Array.prototype.slice.call(arguments,2),delay:typeof F>"u"?D:Math.min(F,D),idleCallback:true});return Number(Z)},"requestIdleCallback"),T.cancelIdleCallback=i(function($){return Oe(T,$,"IdleCallback")},"cancelIdleCallback"),T.setTimeout=i(function($,F){return te(T,{func:$,args:Array.prototype.slice.call(arguments,2),delay:F})},"setTimeout"),typeof s.Promise<"u"&&d&&(T.setTimeout[d.custom]=i(function($,F){return new s.Promise(i(function(Z){te(T,{func:Z,args:[F],delay:$});},"setTimeoutExecutor"))},"promisifiedSetTimeout")),T.clearTimeout=i(function($){return Oe(T,$,"Timeout")},"clearTimeout"),T.nextTick=i(function($){return V(T,{func:$,args:Array.prototype.slice.call(arguments,1),error:O?new Error:null})},"nextTick"),T.queueMicrotask=i(function($){return T.nextTick($)},"queueMicrotask"),T.setInterval=i(function($,F){return F=parseInt(F,10),te(T,{func:$,args:Array.prototype.slice.call(arguments,2),delay:F,interval:F})},"setInterval"),T.clearInterval=i(function($){return Oe(T,$,"Interval")},"clearInterval"),f.setImmediate&&(T.setImmediate=i(function($){return te(T,{func:$,args:Array.prototype.slice.call(arguments,1),immediate:true})},"setImmediate"),typeof s.Promise<"u"&&d&&(T.setImmediate[d.custom]=i(function($){return new s.Promise(i(function(D){te(T,{func:D,args:[$],immediate:true});},"setImmediateExecutor"))},"promisifiedSetImmediate")),T.clearImmediate=i(function($){return Oe(T,$,"Immediate")},"clearImmediate")),T.countTimers=i(function(){return Object.keys(T.timers||{}).length+(T.jobs||[]).length},"countTimers"),T.requestAnimationFrame=i(function($){let F=te(T,{func:$,delay:B(),get args(){return [X()]},animation:true});return Number(F)},"requestAnimationFrame"),T.cancelAnimationFrame=i(function($){return Oe(T,$,"AnimationFrame")},"cancelAnimationFrame"),T.runMicrotasks=i(function(){U(T);},"runMicrotasks");function he(P,$,F,D){let Z=typeof P=="number"?P:L(P),ae=Math.floor(Z),Ie=ee(Z),vt=I+Ie,Ae=T.now+ae;if(Z<0)throw new TypeError("Negative ticks are not supported");vt>=1e6&&(Ae+=1,vt-=1e6),I=vt;let tt=T.now,on=T.now,at,Ft,De,ma,co,lo;T.duringTick=true,De=T.now,U(T),De!==T.now&&(tt+=T.now-De,Ae+=T.now-De);function ga(){for(at=fe(T,tt,Ae);at&&tt<=Ae;){if(T.timers[at.id]){tt=at.callAt,T.now=at.callAt,De=T.now;try{U(T),xe(T,at);}catch(sn){Ft=Ft||sn;}if($){et(ma);return}co();}lo();}if(De=T.now,U(T),De!==T.now&&(tt+=T.now-De,Ae+=T.now-De),T.duringTick=false,at=fe(T,tt,Ae),at)try{T.tick(Ae-T.now);}catch(sn){Ft=Ft||sn;}else T.now=Ae,I=vt;if(Ft)throw Ft;if($)F(T.now);else return T.now}return i(ga,"doTickInner"),ma=$&&function(){try{co(),lo(),ga();}catch(sn){D(sn);}},co=i(function(){De!==T.now&&(tt+=T.now-De,Ae+=T.now-De,on+=T.now-De);},"compensationCheck"),lo=i(function(){at=fe(T,on,Ae),on=tt;},"postTimerCall"),ga()}return i(he,"doTick"),T.tick=i(function($){return he($,false)},"tick"),typeof s.Promise<"u"&&(T.tickAsync=i(function($){return Fe(new s.Promise(function(F,D){et(function(){try{he($,true,F,D);}catch(Z){D(Z);}});}))},"tickAsync")),T.next=i(function(){U(T);let $=me(T);if(!$)return T.now;T.duringTick=true;try{return T.now=$.callAt,xe(T,$),U(T),T.now}finally{T.duringTick=false;}},"next"),typeof s.Promise<"u"&&(T.nextAsync=i(function(){return Fe(new s.Promise(function($,F){et(function(){try{let D=me(T);if(!D){$(T.now);return}let Z;T.duringTick=true,T.now=D.callAt;try{xe(T,D);}catch(ae){Z=ae;}T.duringTick=false,et(function(){Z?F(Z):$(T.now);});}catch(D){F(D);}});}))},"nextAsync")),T.runAll=i(function(){let $,F;for(U(T),F=0;F<T.loopLimit;F++){if(!T.timers||($=Object.keys(T.timers).length,$===0))return C(),T.now;T.next(),N(T,F);}let D=me(T);throw Y(T,D)},"runAll"),T.runToFrame=i(function(){return T.tick(B())},"runToFrame"),typeof s.Promise<"u"&&(T.runAllAsync=i(function(){return Fe(new s.Promise(function($,F){let D=0;function Z(){et(function(){try{U(T);let ae;if(D<T.loopLimit){if(!T.timers){C(),$(T.now);return}if(ae=Object.keys(T.timers).length,ae===0){C(),$(T.now);return}T.next(),D++,Z(),N(T,D);return}let Ie=me(T);F(Y(T,Ie));}catch(ae){F(ae);}});}i(Z,"doRun"),Z();}))},"runAllAsync")),T.runToLast=i(function(){let $=je(T);return $?T.tick($.callAt-T.now):(U(T),T.now)},"runToLast"),typeof s.Promise<"u"&&(T.runToLastAsync=i(function(){return Fe(new s.Promise(function($,F){et(function(){try{let D=je(T);D||(U(T),$(T.now)),$(T.tickAsync(D.callAt-T.now));}catch(D){F(D);}});}))},"runToLastAsync")),T.reset=i(function(){I=0,T.timers={},T.jobs=[],T.now=v;},"reset"),T.setSystemTime=i(function($){let F=j($),D=F-T.now,Z,ae;R[0]=R[0]+D,R[1]=R[1]+I,T.now=F,I=0;for(Z in T.timers)T.timers.hasOwnProperty(Z)&&(ae=T.timers[Z],ae.createdAt+=D,ae.callAt+=D);},"setSystemTime"),T.jump=i(function($){let F=typeof $=="number"?$:L($),D=Math.floor(F);for(let Z of Object.values(T.timers))T.now+D>Z.callAt&&(Z.callAt=T.now+D);T.tick(D);},"jump"),f.performance&&(T.performance=Object.create(null),T.performance.now=X),f.hrtime&&(T.hrtime=q),T}i(pa,"createClock");function Ah(v,k){let I=rn.bind(null,v,k),R=Ih(I,k);v.attachedInterval=R;}i(Ah,"createIntervalTick");function $h(v){if(arguments.length>1||v instanceof Date||Array.isArray(v)||typeof v=="number")throw new TypeError(`FakeTimers.install called with ${String(v)} install requires an object parameter`);if(s.Date.isFake===true)throw new TypeError("Can't install fake timers twice on the same global object.");if(v=typeof v<"u"?v:{},v.shouldAdvanceTime=v.shouldAdvanceTime||false,v.advanceTimeDelta=v.advanceTimeDelta||20,v.shouldClearNativeTimers=v.shouldClearNativeTimers||false,v.target)throw new TypeError("config.target is no longer supported. Use `withGlobal(target)` instead.");function k(B){if(!v.ignoreMissingTimers)throw new ReferenceError(`non-existent timers and/or objects cannot be faked: '${B}'`)}i(k,"handleMissingTimer");let I,R,T=pa(v.now,v.loopLimit);if(T.shouldClearNativeTimers=v.shouldClearNativeTimers,T.uninstall=function(){return jt(T)},T.abortListenerMap=new Map,T.methods=v.toFake||[],T.methods.length===0&&(T.methods=Object.keys(Se)),v.shouldAdvanceTime===true&&T.setTickMode({mode:"interval",delta:v.advanceTimeDelta}),T.methods.includes("performance")){let B=(()=>{if(m)return s.performance.constructor.prototype;if(g)return s.Performance.prototype})();if(B)Object.getOwnPropertyNames(B).forEach(function(q){q!=="now"&&(T.performance[q]=q.indexOf("getEntries")===0?u:c);}),T.performance.mark=q=>new A(q,"mark",0,0),T.performance.measure=q=>new A(q,"measure",0,100),T.performance.timeOrigin=j(v.now);else if((v.toFake||[]).includes("performance"))return k("performance")}for(s===e&&t&&(T.timersModuleMethods=[]),s===e&&n&&(T.timersPromisesModuleMethods=[]),I=0,R=T.methods.length;I<R;I++){let B=T.methods[I];if(!f[B]){k(B);continue}if(B==="hrtime"?s.process&&typeof s.process.hrtime=="function"&&Qe(s.process,B,T):B==="nextTick"?s.process&&typeof s.process.nextTick=="function"&&Qe(s.process,B,T):Qe(s,B,T),T.timersModuleMethods!==void 0&&t[B]){let q=t[B];T.timersModuleMethods.push({methodName:B,original:q}),t[B]=s[B];}T.timersPromisesModuleMethods!==void 0&&(B==="setTimeout"?(T.timersPromisesModuleMethods.push({methodName:"setTimeout",original:n.setTimeout}),n.setTimeout=(q,X,ne={})=>new Promise((Fe,he)=>{let P=i(()=>{ne.signal.removeEventListener("abort",P),T.abortListenerMap.delete(P),T.clearTimeout($),he(ne.signal.reason);},"abort"),$=T.setTimeout(()=>{ne.signal&&(ne.signal.removeEventListener("abort",P),T.abortListenerMap.delete(P)),Fe(X);},q);ne.signal&&(ne.signal.aborted?P():(ne.signal.addEventListener("abort",P),T.abortListenerMap.set(P,ne.signal)));})):B==="setImmediate"?(T.timersPromisesModuleMethods.push({methodName:"setImmediate",original:n.setImmediate}),n.setImmediate=(q,X={})=>new Promise((ne,Fe)=>{let he=i(()=>{X.signal.removeEventListener("abort",he),T.abortListenerMap.delete(he),T.clearImmediate(P),Fe(X.signal.reason);},"abort"),P=T.setImmediate(()=>{X.signal&&(X.signal.removeEventListener("abort",he),T.abortListenerMap.delete(he)),ne(q);});X.signal&&(X.signal.aborted?he():(X.signal.addEventListener("abort",he),T.abortListenerMap.set(he,X.signal)));})):B==="setInterval"&&(T.timersPromisesModuleMethods.push({methodName:"setInterval",original:n.setInterval}),n.setInterval=(q,X,ne={})=>({[Symbol.asyncIterator]:()=>{let Fe=i(()=>{let Ie,vt,Ae=new Promise((tt,on)=>{Ie=tt,vt=on;});return Ae.resolve=Ie,Ae.reject=vt,Ae},"createResolvable"),he=false,P=false,$,F=0,D=[],Z=T.setInterval(()=>{D.length>0?D.shift().resolve():F++;},q),ae=i(()=>{ne.signal.removeEventListener("abort",ae),T.abortListenerMap.delete(ae),T.clearInterval(Z),he=true;for(let Ie of D)Ie.resolve();},"abort");return ne.signal&&(ne.signal.aborted?he=true:(ne.signal.addEventListener("abort",ae),T.abortListenerMap.set(ae,ne.signal))),{next:i(async()=>{if(ne.signal?.aborted&&!P)throw P=true,ne.signal.reason;if(he)return {done:true,value:void 0};if(F>0)return F--,{done:false,value:X};let Ie=Fe();if(D.push(Ie),await Ie,$&&D.length===0&&$.resolve(),ne.signal?.aborted&&!P)throw P=true,ne.signal.reason;return he?{done:true,value:void 0}:{done:false,value:X}},"next"),return:i(async()=>he?{done:true,value:void 0}:(D.length>0&&($=Fe(),await $),T.clearInterval(Z),he=true,ne.signal&&(ne.signal.removeEventListener("abort",ae),T.abortListenerMap.delete(ae)),{done:true,value:void 0}),"return")}}})));}return T}return i($h,"install"),{timers:Se,createClock:pa,install:$h,withGlobal:r}}i(r,"withGlobal");let o=r(e);return Zt.timers=o.timers,Zt.createClock=o.createClock,Zt.install=o.install,Zt.withGlobal=r,Zt}i(Gw,"requireFakeTimersSrc");var Jw=Gw(),ca=class{static{i(this,"FakeTimers");}_global;_clock;_fakingTime;_fakingDate;_fakeTimers;_userConfig;_now=Je.now;constructor({global:t,config:n}){this._userConfig=n,this._fakingDate=null,this._fakingTime=false,this._fakeTimers=Jw.withGlobal(t),this._global=t;}clearAllTimers(){this._fakingTime&&this._clock.reset();}dispose(){this.useRealTimers();}runAllTimers(){this._checkFakeTimers()&&this._clock.runAll();}async runAllTimersAsync(){this._checkFakeTimers()&&await this._clock.runAllAsync();}runOnlyPendingTimers(){this._checkFakeTimers()&&this._clock.runToLast();}async runOnlyPendingTimersAsync(){this._checkFakeTimers()&&await this._clock.runToLastAsync();}advanceTimersToNextTimer(t=1){if(this._checkFakeTimers())for(let n=t;n>0&&(this._clock.next(),this._clock.tick(0),this._clock.countTimers()!==0);n--);}async advanceTimersToNextTimerAsync(t=1){if(this._checkFakeTimers())for(let n=t;n>0&&(await this._clock.nextAsync(),this._clock.tick(0),this._clock.countTimers()!==0);n--);}advanceTimersByTime(t){this._checkFakeTimers()&&this._clock.tick(t);}async advanceTimersByTimeAsync(t){this._checkFakeTimers()&&await this._clock.tickAsync(t);}advanceTimersToNextFrame(){this._checkFakeTimers()&&this._clock.runToFrame();}runAllTicks(){this._checkFakeTimers()&&this._clock.runMicrotasks();}useRealTimers(){this._fakingDate&&(Ai(),this._fakingDate=null),this._fakingTime&&(this._clock.uninstall(),this._fakingTime=false);}useFakeTimers(){let t=this._fakingDate||Date.now();this._fakingDate&&(Ai(),this._fakingDate=null),this._fakingTime&&this._clock.uninstall();let n=Object.keys(this._fakeTimers.timers).filter(r=>r!=="nextTick"&&r!=="queueMicrotask");if(this._userConfig?.toFake?.includes("nextTick")&&ms())throw new Error("process.nextTick cannot be mocked inside child_process");this._clock=this._fakeTimers.install({now:t,...this._userConfig,toFake:this._userConfig?.toFake||n,ignoreMissingTimers:true}),this._fakingTime=true;}reset(){if(this._checkFakeTimers()){let{now:t}=this._clock;this._clock.reset(),this._clock.setSystemTime(t);}}setSystemTime(t){let n=typeof t>"u"||t instanceof Date?t:new Date(t);this._fakingTime?this._clock.setSystemTime(n):(this._fakingDate=n??new Date(this.getRealSystemTime()),bf(this._fakingDate));}getMockedSystemTime(){return this._fakingTime?new Date(this._clock.now):this._fakingDate}getRealSystemTime(){return this._now()}getTimerCount(){return this._checkFakeTimers()?this._clock.countTimers():0}setTimerTickMode(t,n){if(this._checkFakeTimers())if(t==="manual")this._clock.setTickMode({mode:"manual"});else if(t==="nextTimerAsync")this._clock.setTickMode({mode:"nextAsync"});else if(t==="interval")this._clock.setTickMode({mode:"interval",delta:n});else throw new Error(`Invalid tick mode: ${t}`)}configure(t){this._userConfig=t;}isFakeTimers(){return this._fakingTime}_checkFakeTimers(){if(!this._fakingTime)throw new Error("A function to advance timers was called but the timers APIs are not mocked. Call `vi.useFakeTimers()` in the test file first.");return this._fakingTime}};function hh(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}i(hh,"copyStackTrace$1");function Yw(e,t={}){let{setTimeout:n,setInterval:r,clearTimeout:o,clearInterval:s}=ft(),{interval:a=50,timeout:l=1e3}=typeof t=="number"?{timeout:t}:t,c=new Error("STACK_TRACE_ERROR");return new Promise((u,f)=>{let h,p="idle",d,g,m=i(_=>{d&&o(d),g&&s(g),u(_);},"onResolve"),b=i(()=>{g&&s(g);let _=h;_||(_=hh(new Error("Timed out in waitFor!"),c)),f(_);},"handleTimeout"),S=i(()=>{if(Pt.isFakeTimers()&&Pt.advanceTimersByTime(a),p!=="pending")try{let _=e();if(_!==null&&typeof _=="object"&&typeof _.then=="function"){let A=_;p="pending",A.then(M=>{p="resolved",m(M);},M=>{p="rejected",h=M;});}else return m(_),true}catch(_){h=_;}},"checkCallback");S()!==true&&(d=n(b,l),g=r(S,a));})}i(Yw,"waitFor");function Xw(e,t={}){let{setTimeout:n,setInterval:r,clearTimeout:o,clearInterval:s}=ft(),{interval:a=50,timeout:l=1e3}=typeof t=="number"?{timeout:t}:t,c=new Error("STACK_TRACE_ERROR");return new Promise((u,f)=>{let h="idle",p,d,g=i(S=>{d&&s(d),S||(S=hh(new Error("Timed out in waitUntil!"),c)),f(S);},"onReject"),m=i(S=>{if(S)return p&&o(p),d&&s(d),u(S),true},"onResolve"),b=i(()=>{if(Pt.isFakeTimers()&&Pt.advanceTimersByTime(a),h!=="pending")try{let S=e();if(S!==null&&typeof S=="object"&&typeof S.then=="function"){let _=S;h="pending",_.then(A=>{h="resolved",m(A);},A=>{h="rejected",g(A);});}else return m(S)}catch(S){g(S);}},"checkCallback");b()!==true&&(p=n(g,l),d=r(b,a));})}i(Xw,"waitUntil");function Zw(){let e=null,t=i(()=>Wt(),"state"),n,r=i(()=>n||=new ca({global:globalThis,config:t().config.fakeTimers}),"timers"),o=new Map,s=new Map,a=["PROD","DEV","SSR"],l={useFakeTimers(c){if(ms()&&(c?.toFake?.includes("nextTick")||t().config?.fakeTimers?.toFake?.includes("nextTick")))throw new Error('vi.useFakeTimers({ toFake: ["nextTick"] }) is not supported in node:child_process. Use --pool=threads if mocking nextTick is required.');return c?r().configure({...t().config.fakeTimers,...c}):r().configure(t().config.fakeTimers),r().useFakeTimers(),l},isFakeTimers(){return r().isFakeTimers()},useRealTimers(){return r().useRealTimers(),l},runOnlyPendingTimers(){return r().runOnlyPendingTimers(),l},async runOnlyPendingTimersAsync(){return await r().runOnlyPendingTimersAsync(),l},runAllTimers(){return r().runAllTimers(),l},async runAllTimersAsync(){return await r().runAllTimersAsync(),l},runAllTicks(){return r().runAllTicks(),l},advanceTimersByTime(c){return r().advanceTimersByTime(c),l},async advanceTimersByTimeAsync(c){return await r().advanceTimersByTimeAsync(c),l},advanceTimersToNextTimer(){return r().advanceTimersToNextTimer(),l},async advanceTimersToNextTimerAsync(){return await r().advanceTimersToNextTimerAsync(),l},advanceTimersToNextFrame(){return r().advanceTimersToNextFrame(),l},getTimerCount(){return r().getTimerCount()},setSystemTime(c){return r().setSystemTime(c),l},getMockedSystemTime(){return r().getMockedSystemTime()},getRealSystemTime(){return r().getRealSystemTime()},clearAllTimers(){return r().clearAllTimers(),l},setTimerTickMode(c,u){return r().setTimerTickMode(c,u),l},spyOn:Ul,fn:ql,waitFor:Yw,waitUntil:Xw,defineHelper:i(c=>i(function(...f){let h=c(...f);return h&&typeof h=="object"&&typeof h.then=="function"?i((async function(){return await h}),"__VITEST_HELPER__")():h},"__VITEST_HELPER__"),"defineHelper"),hoisted(c){return de(c,'"vi.hoisted" factory',["function"]),c()},mock(c,u){if(typeof c!="string")throw new TypeError(`vi.mock() expects a string path, but received a ${typeof c}`);let f=Qt("mock");Ue().queueMock(c,f,typeof u=="function"?()=>u(()=>Ue().importActual(c,f,Ue().getMockContext().callstack)):u);},unmock(c){if(typeof c!="string")throw new TypeError(`vi.unmock() expects a string path, but received a ${typeof c}`);Ue().queueUnmock(c,Qt("unmock"));},doMock(c,u){if(typeof c!="string")throw new TypeError(`vi.doMock() expects a string path, but received a ${typeof c}`);let f=Qt("doMock");Ue().queueMock(c,f,typeof u=="function"?()=>u(()=>Ue().importActual(c,f,Ue().getMockContext().callstack)):u);let h={};return Symbol.dispose&&(h[Symbol.dispose]=()=>{Ue().queueUnmock(c,f);}),h},doUnmock(c){if(typeof c!="string")throw new TypeError(`vi.doUnmock() expects a string path, but received a ${typeof c}`);let u=Qt("doUnmock");Ue().queueUnmock(c,u);},async importActual(c){let u=Qt("importActual");return Ue().importActual(c,u,Ue().getMockContext().callstack)},async importMock(c){let u=Qt("importMock");return Ue().importMock(c,u)},mockObject(c,u){return Ue().mockObject({value:c},void 0,u?.spy?"autospy":"automock").value},mocked(c,u={}){return c},isMockFunction(c){return mt(c)},clearAllMocks(){return Vl(),l},resetAllMocks(){return Kl(),l},restoreAllMocks(){return Wl(),l},stubGlobal(c,u){return o.has(c)||o.set(c,Object.getOwnPropertyDescriptor(globalThis,c)),Object.defineProperty(globalThis,c,{value:u,writable:true,configurable:true,enumerable:true}),l},stubEnv(c,u){let f=t().metaEnv;return s.has(c)||s.set(c,f[c]),a.includes(c)?f[c]=u?"1":"":u===void 0?delete f[c]:f[c]=String(u),l},unstubAllGlobals(){return o.forEach((c,u)=>{c?Object.defineProperty(globalThis,u,c):Reflect.deleteProperty(globalThis,u);}),o.clear(),l},unstubAllEnvs(){let c=t().metaEnv;return s.forEach((u,f)=>{u===void 0?delete c[f]:c[f]=u;}),s.clear(),l},resetModules(){return Ll(t().evaluatedModules),l},async dynamicImportSettled(){return gs()},setConfig(c){e||(e={...t().config}),Object.assign(t().config,c);},resetConfig(){e&&Object.assign(t().config,e);}};return l}i(Zw,"createVitest");var dh=Zw(),Pt=dh;function Ue(){return typeof __vitest_mocker__<"u"?__vitest_mocker__:new Proxy({},{get(e,t){throw new Error(`Vitest mocker was not initialized in this environment. vi.${String(t)}() is forbidden.`)}})}i(Ue,"_mocker");function Qt(e){let t=Tc({stackTraceLimit:5}).split(`
164
- `);return ir(t[t.findLastIndex(n=>n.includes(` at Object.${e}`)||n.includes(`${e}@`)||n.includes(` at ${e} (`))+1])?.file||""}i(Qt,"getImporter");var Qw=["matchSnapshot","toMatchSnapshot","toMatchInlineSnapshot","toThrowErrorMatchingSnapshot","toThrowErrorMatchingInlineSnapshot","throws","Throw","throw","toThrow","toThrowError"];function ch(e,t){throw e.cause==null&&(e.cause=new Error("Matcher did not succeed in time.")),ph(e,t)}i(ch,"throwWithCause");function eb(e){return i(function(n,r={}){let o=Wt().config.expect?.poll??{},{interval:s=o.interval??50,timeout:a=o.timeout??1e3,message:l}=r,c=e(null,l).withContext({poll:true});n=n.bind(c),K.util.flag(c,"_poll.fn",n),K.util.flag(c,"_poll.timeout",a),K.util.flag(c,"_poll.interval",s);let u=K.util.flag(c,"vitest-test");if(!u)throw new Error("expect.poll() must be called inside a test");let f=new Proxy(c,{get(h,p,d){let g=Reflect.get(h,p,d);if(typeof g!="function")return g instanceof K.Assertion?f:g;if(p==="assert")return g;if(typeof p=="string"&&Qw.includes(p))throw new SyntaxError(`expect.poll() is not supported in combination with .${p}(). Use vi.waitFor() if your assertion condition is unstable.`);return i(function(...b){let S=new Error("STACK_TRACE_ERROR"),_=i(async()=>{K.util.flag(c,"_name",p),K.util.flag(c,"error",S);let O=K.util.flag(c,"_poll.onSettled");if(Object.getOwnPropertyDescriptor(g,"__vitest_poll_takeover__")?.value)try{let W=await g.call(c,...b);return await O?.({assertion:c,status:"pass"}),W}catch(W){await O?.({assertion:c,status:"fail"}),ch(W,S);}let{setTimeout:N,clearTimeout:C}=ft(),L="fn",ee=false,j=N(()=>{ee=true;},a);try{for(;;){let W=ee;W&&K.util.flag(c,"_isLastPollAttempt",true);try{L="fn";let Y=await n();K.util.flag(c,"object",Y),L="assertion";let ge=await g.call(c,...b);return await O?.({assertion:c,status:"pass"}),ge}catch(Y){(W||L==="assertion"&&K.util.flag(c,"_poll.assert_once"))&&(await O?.({assertion:c,status:"fail"}),ch(Y,S)),await nl(s,N),Pt.isFakeTimers()&&Pt.advanceTimersByTime(s);}}}finally{C(j);}},"promise"),A=false;u.onFinished??=[],u.onFinished.push(()=>{if(!A){let O=K.util.flag(c,"negate")?"not.":"",N=`expect.${K.util.flag(c,"_poll.element")?"element(locator)":"poll(assertion)"}.${O}${String(p)}()`;throw ph(new Error(`${N} was not awaited. This assertion is asynchronous and must be awaited; otherwise, it is not executed to avoid unhandled rejections:
165
-
166
- await ${N}
167
- `),S)}});let M;return {then(O,N){return A=true,(M||=_()).then(O,N)},catch(O){return A=true,(M||=_()).catch(O)},finally(O){return A=true,(M||=_()).finally(O)},[Symbol.toStringTag]:"Promise"}},"__VITEST_POLL_CHAIN__")}});return f},"poll")}i(eb,"createExpectPoll");function ph(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}i(ph,"copyStackTrace");var aa;function la(){return aa||(aa=new no({isEqual:i((e,t)=>H(e,t,[ke,At]),"isEqual")})),aa}i(la,"getSnapshotClient");function lh(e,t){if(typeof e!="function"){if(!t)throw new Error(`expected must be a function, received ${typeof e}`);return e}try{e();}catch(n){return n}throw new Error("snapshot function didn't throw")}i(lh,"getError");function mh(e){return {filepath:e.file.filepath,name:ls(e).slice(1).join(" > "),testId:e.id}}i(mh,"getTestNames");function ua(e){let t=K.util.flag(e,"_name");if(!t)throw new Error("Assertion name is not set. This is a bug in Vitest. Please, open a new issue with reproduction.");return t}i(ua,"getAssertionName");function fa(e){let t=K.util.flag(e,"vitest-test");if(!t)throw new Error(`'${ua(e)}' cannot be used without test context`);return t}i(fa,"getTest");function Dn(e){if(K.util.flag(e,"negate"))throw new Error(`${ua(e)} cannot be used with "not"`)}i(Dn,"validateAssertion");var tb=i((e,t)=>{for(let n of ["matchSnapshot","toMatchSnapshot"])t.addMethod(e.Assertion.prototype,n,$t(t,n,function(r,o){return Fn(ro({assertion:this,received:t.flag(this,"object"),...uh(r,o)}),e.util.flag(this,"message"))}));t.addMethod(e.Assertion.prototype,"toMatchFileSnapshot",function(n,r){t.flag(this,"_name","toMatchFileSnapshot"),Dn(this);let o=nb({assertion:this,received:t.flag(this,"object"),filepath:n,hint:r}).then(s=>Fn(s,e.util.flag(this,"message")));return zr(fa(this),o,Ur(t,this,true),new Error("resolves"),t.flag(this,"soft"))}),t.addMethod(e.Assertion.prototype,"toMatchInlineSnapshot",$t(t,"toMatchInlineSnapshot",i(function(r,o,s){return Fn(ro({assertion:this,received:t.flag(this,"object"),isInline:true,...fh(r,o,s)}),e.util.flag(this,"message"))},"__INLINE_SNAPSHOT_OFFSET_3__"))),t.addMethod(e.Assertion.prototype,"toThrowErrorMatchingSnapshot",$t(t,"toThrowErrorMatchingSnapshot",function(n,r){Dn(this);let o=t.flag(this,"object"),s=t.flag(this,"promise");return Fn(ro({assertion:this,received:lh(o,s),...uh(n,r)}),e.util.flag(this,"message"))})),t.addMethod(e.Assertion.prototype,"toThrowErrorMatchingInlineSnapshot",$t(t,"toThrowErrorMatchingInlineSnapshot",i(function(r,o){Dn(this);let s=t.flag(this,"object"),a=t.flag(this,"promise");return Fn(ro({assertion:this,received:lh(s,a),isInline:true,...fh(void 0,r,o)}),e.util.flag(this,"message"))},"__INLINE_SNAPSHOT_OFFSET_3__"))),t.addMethod(e.expect,"addSnapshotSerializer",jf);},"SnapshotPlugin");function uh(e,t){return typeof e=="string"?{hint:e}:{properties:e,hint:t}}i(uh,"normalizeArguments");function fh(e,t,n){let r;return typeof e=="string"?(r=qi(e),{inlineSnapshot:r,hint:t}):(t&&(r=qi(t)),{properties:e,inlineSnapshot:r,hint:n})}i(fh,"normalizeInlineArguments");function ro(e){let{assertion:t}=e;Dn(t);let n=ua(t),r=fa(t);return la().match({received:e.received,properties:e.properties,message:e.hint,isInline:e.isInline,inlineSnapshot:e.inlineSnapshot,assertionName:n,error:K.util.flag(t,"error"),...mh(r)})}i(ro,"toMatchSnapshotImpl");async function nb(e){let{assertion:t}=e;Dn(t);let n=mh(fa(t)),r=la().getSnapshotState(n.filepath),o=await r.environment.resolveRawPath(n.filepath,e.filepath),s=await r.environment.readSnapshotFile(o);return la().match({received:e.received,message:e.hint,rawSnapshot:{file:o,content:s??void 0},...n})}i(nb,"toMatchFileSnapshotImpl");function Fn(e,t){if(!e.pass){let n=(t?`${t}: `:"")+e.message();throw Object.assign(new Error(n),{actual:e.actual,expected:e.expected,diffOptions:{expand:Wt().config.snapshotOptions.expand}})}}i(Fn,"assertMatchResult");K.use(gf);K.use(mf);K.use(of);K.use(tb);K.use(pf);function gh(e){let t=i(((s,a)=>{let{assertionCalls:l}=Yt(t);Gr({assertionCalls:l+1},t);let c=K.expect(s,a),u=e||zt();return u?c.withTest(u):c}),"expect");Object.assign(t,K.expect),Object.assign(t,globalThis[Vr]),t.getState=()=>Yt(t),t.setState=s=>Gr(s,t);let n=Yt(globalThis[$n])||{};Gr({...n,assertionCalls:0,isExpectingAssertions:false,isExpectingAssertionsError:null,expectedAssertionsNumber:null,expectedAssertionsNumberErrorGen:null,get testPath(){return Wt().filepath},currentTestName:e?e.fullTestName??"":n.currentTestName},t),t.assert=K.assert,t.extend=s=>K.expect.extend(t,s),t.addEqualityTesters=s=>lf(s),t.soft=(...s)=>t(...s).withContext({soft:true}),t.poll=eb(t),t.unreachable=s=>{K.assert.fail(`expected${s?` "${s}" `:" "}not to be reached`);};function r(s){let a=i(()=>new Error(`expected number of assertions to be ${s}, but got ${t.getState().assertionCalls}`),"errorGen");Error.captureStackTrace&&Error.captureStackTrace(a(),r),t.setState({expectedAssertionsNumber:s,expectedAssertionsNumberErrorGen:a});}i(r,"assertions");function o(){let s=new Error("expected any number of assertion, but got none");Error.captureStackTrace&&Error.captureStackTrace(s,o),t.setState({isExpectingAssertions:true,isExpectingAssertionsError:s});}return i(o,"hasAssertions"),K.util.addMethod(t,"assertions",r),K.util.addMethod(t,"hasAssertions",o),t.extend(sf),t}i(gh,"createExpect");var Re=gh();Object.defineProperty(globalThis,$n,{value:Re,writable:true,configurable:true});var yh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",sb=new Uint8Array(64),ib=new Uint8Array(128);for(let e=0;e<yh.length;e++){let t=yh.charCodeAt(e);sb[e]=t,ib[t]=e;}var ab=new Set,cb=new Set,bh=i(e=>((...t)=>{for(let n of e){let r=n(...t);if(r)return r}return null}),"createExecHandlers");bh(ab);bh(cb);var ha="vite-module-runner:import-meta-resolve/v1/";`
163
+ `).slice(L+1).join(`
164
+ `)}`;try{Object.defineProperty(I,"stack",{value:B});}catch{}return I}i(Y,"getInfiniteLoopError");function Te(){class v extends b{static{i(this,"ClockDate");}constructor(j,T,L,B,J,te,Fe){arguments.length===0?super(v.clock.now):super(...arguments),Object.defineProperty(this,"constructor",{value:b,enumerable:false});}static[Symbol.hasInstance](j){return j instanceof b}}return v.isFake=true,b.now&&(v.now=i(function(){return v.clock.now},"now")),b.toSource&&(v.toSource=i(function(){return b.toSource()},"toSource")),v.toString=i(function(){return b.toString()},"toString"),new Proxy(v,{apply(){if(this instanceof v)throw new TypeError("A Proxy should only capture `new` calls with the `construct` handler. This is not supposed to be possible, so check the logic.");return new b(v.clock.now).toString()}})}i(Te,"createDate");function le(){let v={};return Object.getOwnPropertyNames(E).forEach(k=>v[k]=E[k]),v.DateTimeFormat=function(...k){let I=new E.DateTimeFormat(...k),j={};return ["formatRange","formatRangeToParts","resolvedOptions"].forEach(T=>{j[T]=I[T].bind(I);}),["format","formatToParts"].forEach(T=>{j[T]=function(L){return I[T](L||v.clock.now)};}),j},v.DateTimeFormat.prototype=Object.create(E.DateTimeFormat.prototype),v.DateTimeFormat.supportedLocalesOf=E.DateTimeFormat.supportedLocalesOf,v}i(le,"createIntl");function W(v,k){v.jobs||(v.jobs=[]),v.jobs.push(k);}i(W,"enqueueJob");function U(v){if(v.jobs){for(let k=0;k<v.jobs.length;k++){let I=v.jobs[k];if(I.func.apply(null,I.args),N(v,k),v.loopLimit&&k>v.loopLimit)throw Y(v,I)}_(),v.jobs=[];}}i(U,"runJobs");function ee(v,k){if(k.func===void 0)throw new Error("Callback must be provided to timer calls");if(d&&typeof k.func!="function")throw new TypeError(`[ERR_INVALID_CALLBACK]: Callback must be a function. Received ${k.func} of type ${typeof k.func}`);if(O&&(k.error=new Error),k.type=k.immediate?"Immediate":"Timeout",k.hasOwnProperty("delay")&&(typeof k.delay!="number"&&(k.delay=parseInt(k.delay,10)),C(k.delay)||(k.delay=0),k.delay=k.delay>a?1:k.delay,k.delay=Math.max(0,k.delay)),k.hasOwnProperty("interval")&&(k.type="Interval",k.interval=k.interval>a?1:k.interval),k.hasOwnProperty("animation")&&(k.type="AnimationFrame",k.animation=true),k.hasOwnProperty("idleCallback")&&(k.type="IdleCallback",k.idleCallback=true),v.timers||(v.timers={}),k.id=M++,k.createdAt=v.now,k.callAt=v.now+(parseInt(k.delay)||(v.duringTick?1:0)),v.timers[k.id]=k,d){let I={refed:true,ref:i(function(){return this.refed=true,I},"ref"),unref:i(function(){return this.refed=false,I},"unref"),hasRef:i(function(){return this.refed},"hasRef"),refresh:i(function(){return k.callAt=v.now+(parseInt(k.delay)||(v.duringTick?1:0)),v.timers[k.id]=k,I},"refresh"),[Symbol.toPrimitive]:function(){return k.id}};return I}return k.id}i(ee,"addTimer");function Me(v,k){if(v.callAt<k.callAt)return -1;if(v.callAt>k.callAt)return 1;if(v.immediate&&!k.immediate)return -1;if(!v.immediate&&k.immediate)return 1;if(v.createdAt<k.createdAt)return -1;if(v.createdAt>k.createdAt)return 1;if(v.id<k.id)return -1;if(v.id>k.id)return 1}i(Me,"compareTimers");function fe(v,k,I){let j=v.timers,T=null,L,B;for(L in j)j.hasOwnProperty(L)&&(B=V(k,I,j[L]),B&&(!T||Me(T,j[L])===1)&&(T=j[L]));return T}i(fe,"firstTimerInRange");function me(v){let k=v.timers,I=null,j;for(j in k)k.hasOwnProperty(j)&&(!I||Me(I,k[j])===1)&&(I=k[j]);return I}i(me,"firstTimer");function je(v){let k=v.timers,I=null,j;for(j in k)k.hasOwnProperty(j)&&(!I||Me(I,k[j])===-1)&&(I=k[j]);return I}i(je,"lastTimer");function xe(v,k){if(typeof k.interval=="number"?v.timers[k.id].callAt+=k.interval:delete v.timers[k.id],typeof k.func=="function")k.func.apply(null,k.args);else {let I=eval;(function(){I(k.func);})();}}i(xe,"callTimer");function Ce(v){return v==="IdleCallback"||v==="AnimationFrame"?`cancel${v}`:`clear${v}`}i(Ce,"getClearHandler");function it(v){return v==="IdleCallback"||v==="AnimationFrame"?`request${v}`:`set${v}`}i(it,"getScheduleHandler");function ze(){let v=0;return function(k){!v++&&console.warn(k);}}i(ze,"createWarnOnce");let _e=ze();function Oe(v,k,I){if(!k)return;v.timers||(v.timers={});let j=Number(k);if(Number.isNaN(j)||j<l){let T=Ce(I);if(v.shouldClearNativeTimers===true){let L=v[`_${T}`];return typeof L=="function"?L(k):void 0}_e(`FakeTimers: ${T} was invoked to clear a native timer instead of one created by this library.
165
+ To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`);}if(v.timers.hasOwnProperty(j)){let T=v.timers[j];if(T.type===I||T.type==="Timeout"&&I==="Interval"||T.type==="Interval"&&I==="Timeout")delete v.timers[j];else {let L=Ce(I),B=it(T.type);throw new Error(`Cannot clear timer: timer created with ${B}() but cleared with ${L}()`)}}}i(Oe,"clearTimer");function Rt(v){let k,I,j,T="_hrtime",L="_nextTick";for(I=0,j=v.methods.length;I<j;I++){if(k=v.methods[I],k==="hrtime"&&s.process)s.process.hrtime=v[T];else if(k==="nextTick"&&s.process)s.process.nextTick=v[L];else if(k==="performance"){let B=Object.getOwnPropertyDescriptor(v,`_${k}`);B&&B.get&&!B.set?Object.defineProperty(s,k,B):B.configurable&&(s[k]=v[`_${k}`]);}else if(s[k]&&s[k].hadOwnProperty)s[k]=v[`_${k}`];else try{delete s[k];}catch{}if(v.timersModuleMethods!==void 0)for(let B=0;B<v.timersModuleMethods.length;B++){let J=v.timersModuleMethods[B];t[J.methodName]=J.original;}if(v.timersPromisesModuleMethods!==void 0)for(let B=0;B<v.timersPromisesModuleMethods.length;B++){let J=v.timersPromisesModuleMethods[B];n[J.methodName]=J.original;}}v.setTickMode("manual"),v.methods=[];for(let[B,J]of v.abortListenerMap.entries())J.removeEventListener("abort",B),v.abortListenerMap.delete(B);return v.timers?Object.keys(v.timers).map(i(function(J){return v.timers[J]},"mapper")):[]}i(Rt,"uninstall");function Qe(v,k,I){if(I[k].hadOwnProperty=Object.prototype.hasOwnProperty.call(v,k),I[`_${k}`]=v[k],k==="Date")v[k]=I[k];else if(k==="Intl")v[k]=I[k];else if(k==="performance"){let j=Object.getOwnPropertyDescriptor(v,k);if(j&&j.get&&!j.set){Object.defineProperty(I,`_${k}`,j);let T=Object.getOwnPropertyDescriptor(I,k);Object.defineProperty(v,k,T);}else v[k]=I[k];}else v[k]=function(){return I[k].apply(I,arguments)},Object.defineProperties(v[k],Object.getOwnPropertyDescriptors(I[k]));v[k].clock=I;}i(Qe,"hijackMethod");function tn(v,k){v.tick(k);}i(tn,"doIntervalTick");let Se={setTimeout:s.setTimeout,clearTimeout:s.clearTimeout,setInterval:s.setInterval,clearInterval:s.clearInterval,Date:s.Date};f.setImmediate&&(Se.setImmediate=s.setImmediate),f.clearImmediate&&(Se.clearImmediate=s.clearImmediate),f.hrtime&&(Se.hrtime=s.process.hrtime),f.nextTick&&(Se.nextTick=s.process.nextTick),f.performance&&(Se.performance=s.performance),f.requestAnimationFrame&&(Se.requestAnimationFrame=s.requestAnimationFrame),f.queueMicrotask&&(Se.queueMicrotask=s.queueMicrotask),f.cancelAnimationFrame&&(Se.cancelAnimationFrame=s.cancelAnimationFrame),f.requestIdleCallback&&(Se.requestIdleCallback=s.requestIdleCallback),f.cancelIdleCallback&&(Se.cancelIdleCallback=s.cancelIdleCallback),f.Intl&&(Se.Intl=E);let et=s.setImmediate||s.setTimeout,wh=s.clearInterval,bh=s.setInterval;function ca(v,k){v=Math.floor(R(v)),k=k||1e3;let I=0,j=[0,0],T={now:v,Date:Te(),loopLimit:k,tickMode:{mode:"manual",counter:0,delta:void 0}};T.Date.clock=T;function L(){return 16-(T.now-v)%16}i(L,"getTimeToNextFrame");function B(P){let $=T.now-j[0]-v,F=Math.floor($/1e3),D=($-F*1e3)*1e6+I-j[1];if(Array.isArray(P)){if(P[1]>1e9)throw new TypeError("Number of nanoseconds can't exceed a billion");let X=P[0],ae=D-P[1],Ie=F-X;return ae<0&&(ae+=1e9,Ie-=1),[Ie,ae]}return [F,D]}i(B,"hrtime");function J(){let P=B();return P[0]*1e3+P[1]/1e6}i(J,"fakePerformanceNow"),f.hrtimeBigint&&(B.bigint=function(){let P=B();return BigInt(P[0])*BigInt(1e9)+BigInt(P[1])}),f.Intl&&(T.Intl=le(),T.Intl.clock=T),T.setTickMode=function(P){let{mode:$,delta:F}=P,{mode:D,delta:X}=T.tickMode;$===D&&F===X||(D==="interval"&&wh(T.attachedInterval),T.tickMode={counter:T.tickMode.counter+1,mode:$,delta:F},$==="nextAsync"?te():$==="interval"&&Th(T,F||20));};async function te(){async function P(){let F=new MessageChannel;await new Promise(D=>{F.port1.onmessage=()=>{D(),F.port1.close();},F.port2.postMessage(void 0);}),F.port1.close(),F.port2.close(),await new Promise(D=>{et(D);});}i(P,"newMacrotask");let{counter:$}=T.tickMode;for(;T.tickMode.counter===$;){if(await P(),T.tickMode.counter!==$)return;T.next();}}i(te,"advanceUntilModeChanges");function Fe(P){return T.tickMode.mode!=="nextAsync"?P:(T.setTickMode({mode:"manual"}),P.finally(()=>{T.setTickMode({mode:"nextAsync"});}))}i(Fe,"pauseAutoTickUntilFinished"),T.requestIdleCallback=i(function($,F){let D=0;T.countTimers()>0&&(D=50);let X=ee(T,{func:$,args:Array.prototype.slice.call(arguments,2),delay:typeof F>"u"?D:Math.min(F,D),idleCallback:true});return Number(X)},"requestIdleCallback"),T.cancelIdleCallback=i(function($){return Oe(T,$,"IdleCallback")},"cancelIdleCallback"),T.setTimeout=i(function($,F){return ee(T,{func:$,args:Array.prototype.slice.call(arguments,2),delay:F})},"setTimeout"),typeof s.Promise<"u"&&p&&(T.setTimeout[p.custom]=i(function($,F){return new s.Promise(i(function(X){ee(T,{func:X,args:[F],delay:$});},"setTimeoutExecutor"))},"promisifiedSetTimeout")),T.clearTimeout=i(function($){return Oe(T,$,"Timeout")},"clearTimeout"),T.nextTick=i(function($){return W(T,{func:$,args:Array.prototype.slice.call(arguments,1),error:O?new Error:null})},"nextTick"),T.queueMicrotask=i(function($){return T.nextTick($)},"queueMicrotask"),T.setInterval=i(function($,F){return F=parseInt(F,10),ee(T,{func:$,args:Array.prototype.slice.call(arguments,2),delay:F,interval:F})},"setInterval"),T.clearInterval=i(function($){return Oe(T,$,"Interval")},"clearInterval"),f.setImmediate&&(T.setImmediate=i(function($){return ee(T,{func:$,args:Array.prototype.slice.call(arguments,1),immediate:true})},"setImmediate"),typeof s.Promise<"u"&&p&&(T.setImmediate[p.custom]=i(function($){return new s.Promise(i(function(D){ee(T,{func:D,args:[$],immediate:true});},"setImmediateExecutor"))},"promisifiedSetImmediate")),T.clearImmediate=i(function($){return Oe(T,$,"Immediate")},"clearImmediate")),T.countTimers=i(function(){return Object.keys(T.timers||{}).length+(T.jobs||[]).length},"countTimers"),T.requestAnimationFrame=i(function($){let F=ee(T,{func:$,delay:L(),get args(){return [J()]},animation:true});return Number(F)},"requestAnimationFrame"),T.cancelAnimationFrame=i(function($){return Oe(T,$,"AnimationFrame")},"cancelAnimationFrame"),T.runMicrotasks=i(function(){U(T);},"runMicrotasks");function he(P,$,F,D){let X=typeof P=="number"?P:q(P),ae=Math.floor(X),Ie=Q(X),vt=I+Ie,Ae=T.now+ae;if(X<0)throw new TypeError("Negative ticks are not supported");vt>=1e6&&(Ae+=1,vt-=1e6),I=vt;let tt=T.now,nn=T.now,at,jt,De,la,io,ao;T.duringTick=true,De=T.now,U(T),De!==T.now&&(tt+=T.now-De,Ae+=T.now-De);function ua(){for(at=fe(T,tt,Ae);at&&tt<=Ae;){if(T.timers[at.id]){tt=at.callAt,T.now=at.callAt,De=T.now;try{U(T),xe(T,at);}catch(rn){jt=jt||rn;}if($){et(la);return}io();}ao();}if(De=T.now,U(T),De!==T.now&&(tt+=T.now-De,Ae+=T.now-De),T.duringTick=false,at=fe(T,tt,Ae),at)try{T.tick(Ae-T.now);}catch(rn){jt=jt||rn;}else T.now=Ae,I=vt;if(jt)throw jt;if($)F(T.now);else return T.now}return i(ua,"doTickInner"),la=$&&function(){try{io(),ao(),ua();}catch(rn){D(rn);}},io=i(function(){De!==T.now&&(tt+=T.now-De,Ae+=T.now-De,nn+=T.now-De);},"compensationCheck"),ao=i(function(){at=fe(T,nn,Ae),nn=tt;},"postTimerCall"),ua()}return i(he,"doTick"),T.tick=i(function($){return he($,false)},"tick"),typeof s.Promise<"u"&&(T.tickAsync=i(function($){return Fe(new s.Promise(function(F,D){et(function(){try{he($,true,F,D);}catch(X){D(X);}});}))},"tickAsync")),T.next=i(function(){U(T);let $=me(T);if(!$)return T.now;T.duringTick=true;try{return T.now=$.callAt,xe(T,$),U(T),T.now}finally{T.duringTick=false;}},"next"),typeof s.Promise<"u"&&(T.nextAsync=i(function(){return Fe(new s.Promise(function($,F){et(function(){try{let D=me(T);if(!D){$(T.now);return}let X;T.duringTick=true,T.now=D.callAt;try{xe(T,D);}catch(ae){X=ae;}T.duringTick=false,et(function(){X?F(X):$(T.now);});}catch(D){F(D);}});}))},"nextAsync")),T.runAll=i(function(){let $,F;for(U(T),F=0;F<T.loopLimit;F++){if(!T.timers||($=Object.keys(T.timers).length,$===0))return _(),T.now;T.next(),N(T,F);}let D=me(T);throw Y(T,D)},"runAll"),T.runToFrame=i(function(){return T.tick(L())},"runToFrame"),typeof s.Promise<"u"&&(T.runAllAsync=i(function(){return Fe(new s.Promise(function($,F){let D=0;function X(){et(function(){try{U(T);let ae;if(D<T.loopLimit){if(!T.timers){_(),$(T.now);return}if(ae=Object.keys(T.timers).length,ae===0){_(),$(T.now);return}T.next(),D++,X(),N(T,D);return}let Ie=me(T);F(Y(T,Ie));}catch(ae){F(ae);}});}i(X,"doRun"),X();}))},"runAllAsync")),T.runToLast=i(function(){let $=je(T);return $?T.tick($.callAt-T.now):(U(T),T.now)},"runToLast"),typeof s.Promise<"u"&&(T.runToLastAsync=i(function(){return Fe(new s.Promise(function($,F){et(function(){try{let D=je(T);D||(U(T),$(T.now)),$(T.tickAsync(D.callAt-T.now));}catch(D){F(D);}});}))},"runToLastAsync")),T.reset=i(function(){I=0,T.timers={},T.jobs=[],T.now=v;},"reset"),T.setSystemTime=i(function($){let F=R($),D=F-T.now,X,ae;j[0]=j[0]+D,j[1]=j[1]+I,T.now=F,I=0;for(X in T.timers)T.timers.hasOwnProperty(X)&&(ae=T.timers[X],ae.createdAt+=D,ae.callAt+=D);},"setSystemTime"),T.jump=i(function($){let F=typeof $=="number"?$:q($),D=Math.floor(F);for(let X of Object.values(T.timers))T.now+D>X.callAt&&(X.callAt=T.now+D);T.tick(D);},"jump"),f.performance&&(T.performance=Object.create(null),T.performance.now=J),f.hrtime&&(T.hrtime=B),T}i(ca,"createClock");function Th(v,k){let I=tn.bind(null,v,k),j=bh(I,k);v.attachedInterval=j;}i(Th,"createIntervalTick");function Sh(v){if(arguments.length>1||v instanceof Date||Array.isArray(v)||typeof v=="number")throw new TypeError(`FakeTimers.install called with ${String(v)} install requires an object parameter`);if(s.Date.isFake===true)throw new TypeError("Can't install fake timers twice on the same global object.");if(v=typeof v<"u"?v:{},v.shouldAdvanceTime=v.shouldAdvanceTime||false,v.advanceTimeDelta=v.advanceTimeDelta||20,v.shouldClearNativeTimers=v.shouldClearNativeTimers||false,v.target)throw new TypeError("config.target is no longer supported. Use `withGlobal(target)` instead.");function k(L){if(!v.ignoreMissingTimers)throw new ReferenceError(`non-existent timers and/or objects cannot be faked: '${L}'`)}i(k,"handleMissingTimer");let I,j,T=ca(v.now,v.loopLimit);if(T.shouldClearNativeTimers=v.shouldClearNativeTimers,T.uninstall=function(){return Rt(T)},T.abortListenerMap=new Map,T.methods=v.toFake||[],T.methods.length===0&&(T.methods=Object.keys(Se)),v.shouldAdvanceTime===true&&T.setTickMode({mode:"interval",delta:v.advanceTimeDelta}),T.methods.includes("performance")){let L=(()=>{if(m)return s.performance.constructor.prototype;if(g)return s.Performance.prototype})();if(L)Object.getOwnPropertyNames(L).forEach(function(B){B!=="now"&&(T.performance[B]=B.indexOf("getEntries")===0?u:c);}),T.performance.mark=B=>new A(B,"mark",0,0),T.performance.measure=B=>new A(B,"measure",0,100),T.performance.timeOrigin=R(v.now);else if((v.toFake||[]).includes("performance"))return k("performance")}for(s===e&&t&&(T.timersModuleMethods=[]),s===e&&n&&(T.timersPromisesModuleMethods=[]),I=0,j=T.methods.length;I<j;I++){let L=T.methods[I];if(!f[L]){k(L);continue}if(L==="hrtime"?s.process&&typeof s.process.hrtime=="function"&&Qe(s.process,L,T):L==="nextTick"?s.process&&typeof s.process.nextTick=="function"&&Qe(s.process,L,T):Qe(s,L,T),T.timersModuleMethods!==void 0&&t[L]){let B=t[L];T.timersModuleMethods.push({methodName:L,original:B}),t[L]=s[L];}T.timersPromisesModuleMethods!==void 0&&(L==="setTimeout"?(T.timersPromisesModuleMethods.push({methodName:"setTimeout",original:n.setTimeout}),n.setTimeout=(B,J,te={})=>new Promise((Fe,he)=>{let P=i(()=>{te.signal.removeEventListener("abort",P),T.abortListenerMap.delete(P),T.clearTimeout($),he(te.signal.reason);},"abort"),$=T.setTimeout(()=>{te.signal&&(te.signal.removeEventListener("abort",P),T.abortListenerMap.delete(P)),Fe(J);},B);te.signal&&(te.signal.aborted?P():(te.signal.addEventListener("abort",P),T.abortListenerMap.set(P,te.signal)));})):L==="setImmediate"?(T.timersPromisesModuleMethods.push({methodName:"setImmediate",original:n.setImmediate}),n.setImmediate=(B,J={})=>new Promise((te,Fe)=>{let he=i(()=>{J.signal.removeEventListener("abort",he),T.abortListenerMap.delete(he),T.clearImmediate(P),Fe(J.signal.reason);},"abort"),P=T.setImmediate(()=>{J.signal&&(J.signal.removeEventListener("abort",he),T.abortListenerMap.delete(he)),te(B);});J.signal&&(J.signal.aborted?he():(J.signal.addEventListener("abort",he),T.abortListenerMap.set(he,J.signal)));})):L==="setInterval"&&(T.timersPromisesModuleMethods.push({methodName:"setInterval",original:n.setInterval}),n.setInterval=(B,J,te={})=>({[Symbol.asyncIterator]:()=>{let Fe=i(()=>{let Ie,vt,Ae=new Promise((tt,nn)=>{Ie=tt,vt=nn;});return Ae.resolve=Ie,Ae.reject=vt,Ae},"createResolvable"),he=false,P=false,$,F=0,D=[],X=T.setInterval(()=>{D.length>0?D.shift().resolve():F++;},B),ae=i(()=>{te.signal.removeEventListener("abort",ae),T.abortListenerMap.delete(ae),T.clearInterval(X),he=true;for(let Ie of D)Ie.resolve();},"abort");return te.signal&&(te.signal.aborted?he=true:(te.signal.addEventListener("abort",ae),T.abortListenerMap.set(ae,te.signal))),{next:i(async()=>{if(te.signal?.aborted&&!P)throw P=true,te.signal.reason;if(he)return {done:true,value:void 0};if(F>0)return F--,{done:false,value:J};let Ie=Fe();if(D.push(Ie),await Ie,$&&D.length===0&&$.resolve(),te.signal?.aborted&&!P)throw P=true,te.signal.reason;return he?{done:true,value:void 0}:{done:false,value:J}},"next"),return:i(async()=>he?{done:true,value:void 0}:(D.length>0&&($=Fe(),await $),T.clearInterval(X),he=true,te.signal&&(te.signal.removeEventListener("abort",ae),T.abortListenerMap.delete(ae)),{done:true,value:void 0}),"return")}}})));}return T}return i(Sh,"install"),{timers:Se,createClock:ca,install:Sh,withGlobal:r}}i(r,"withGlobal");let o=r(e);return Yt.timers=o.timers,Yt.createClock=o.createClock,Yt.install=o.install,Yt.withGlobal=r,Yt}i(Bw,"requireFakeTimersSrc");var qw=Bw(),sa=class{static{i(this,"FakeTimers");}_global;_clock;_fakingTime;_fakingDate;_fakeTimers;_userConfig;_now=Je.now;constructor({global:t,config:n}){this._userConfig=n,this._fakingDate=null,this._fakingTime=false,this._fakeTimers=qw.withGlobal(t),this._global=t;}clearAllTimers(){this._fakingTime&&this._clock.reset();}dispose(){this.useRealTimers();}runAllTimers(){this._checkFakeTimers()&&this._clock.runAll();}async runAllTimersAsync(){this._checkFakeTimers()&&await this._clock.runAllAsync();}runOnlyPendingTimers(){this._checkFakeTimers()&&this._clock.runToLast();}async runOnlyPendingTimersAsync(){this._checkFakeTimers()&&await this._clock.runToLastAsync();}advanceTimersToNextTimer(t=1){if(this._checkFakeTimers())for(let n=t;n>0&&(this._clock.next(),this._clock.tick(0),this._clock.countTimers()!==0);n--);}async advanceTimersToNextTimerAsync(t=1){if(this._checkFakeTimers())for(let n=t;n>0&&(await this._clock.nextAsync(),this._clock.tick(0),this._clock.countTimers()!==0);n--);}advanceTimersByTime(t){this._checkFakeTimers()&&this._clock.tick(t);}async advanceTimersByTimeAsync(t){this._checkFakeTimers()&&await this._clock.tickAsync(t);}advanceTimersToNextFrame(){this._checkFakeTimers()&&this._clock.runToFrame();}runAllTicks(){this._checkFakeTimers()&&this._clock.runMicrotasks();}useRealTimers(){this._fakingDate&&(Di(),this._fakingDate=null),this._fakingTime&&(this._clock.uninstall(),this._fakingTime=false);}useFakeTimers(){let t=this._fakingDate||Date.now();this._fakingDate&&(Di(),this._fakingDate=null),this._fakingTime&&this._clock.uninstall();let n=Object.keys(this._fakeTimers.timers).filter(r=>r!=="nextTick"&&r!=="queueMicrotask");if(this._userConfig?.toFake?.includes("nextTick")&&ps())throw new Error("process.nextTick cannot be mocked inside child_process");this._clock=this._fakeTimers.install({now:t,...this._userConfig,toFake:this._userConfig?.toFake||n,ignoreMissingTimers:true}),this._fakingTime=true;}reset(){if(this._checkFakeTimers()){let{now:t}=this._clock;this._clock.reset(),this._clock.setSystemTime(t);}}setSystemTime(t){let n=typeof t>"u"||t instanceof Date?t:new Date(t);this._fakingTime?this._clock.setSystemTime(n):(this._fakingDate=n??new Date(this.getRealSystemTime()),Nf(this._fakingDate));}getMockedSystemTime(){return this._fakingTime?new Date(this._clock.now):this._fakingDate}getRealSystemTime(){return this._now()}getTimerCount(){return this._checkFakeTimers()?this._clock.countTimers():0}setTimerTickMode(t,n){if(this._checkFakeTimers())if(t==="manual")this._clock.setTickMode({mode:"manual"});else if(t==="nextTimerAsync")this._clock.setTickMode({mode:"nextAsync"});else if(t==="interval")this._clock.setTickMode({mode:"interval",delta:n});else throw new Error(`Invalid tick mode: ${t}`)}configure(t){this._userConfig=t;}isFakeTimers(){return this._fakingTime}_checkFakeTimers(){if(!this._fakingTime)throw new Error("A function to advance timers was called but the timers APIs are not mocked. Call `vi.useFakeTimers()` in the test file first.");return this._fakingTime}};function oh(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}i(oh,"copyStackTrace");function Uw(e,t={}){let{setTimeout:n,setInterval:r,clearTimeout:o,clearInterval:s}=ft(),{interval:a=50,timeout:l=1e3}=typeof t=="number"?{timeout:t}:t,c=new Error("STACK_TRACE_ERROR");return new Promise((u,f)=>{let h,d="idle",p,g,m=i(M=>{p&&o(p),g&&s(g),u(M);},"onResolve"),b=i(()=>{g&&s(g);let M=h;M||(M=oh(new Error("Timed out in waitFor!"),c)),f(M);},"handleTimeout"),E=i(()=>{if(Dn.isFakeTimers()&&Dn.advanceTimersByTime(a),d!=="pending")try{let M=e();if(M!==null&&typeof M=="object"&&typeof M.then=="function"){let A=M;d="pending",A.then(C=>{d="resolved",m(C);},C=>{d="rejected",h=C;});}else return m(M),true}catch(M){h=M;}},"checkCallback");E()!==true&&(p=n(b,l),g=r(E,a));})}i(Uw,"waitFor");function zw(e,t={}){let{setTimeout:n,setInterval:r,clearTimeout:o,clearInterval:s}=ft(),{interval:a=50,timeout:l=1e3}=typeof t=="number"?{timeout:t}:t,c=new Error("STACK_TRACE_ERROR");return new Promise((u,f)=>{let h="idle",d,p,g=i(E=>{p&&s(p),E||(E=oh(new Error("Timed out in waitUntil!"),c)),f(E);},"onReject"),m=i(E=>{if(E)return d&&o(d),p&&s(p),u(E),true},"onResolve"),b=i(()=>{if(Dn.isFakeTimers()&&Dn.advanceTimersByTime(a),h!=="pending")try{let E=e();if(E!==null&&typeof E=="object"&&typeof E.then=="function"){let M=E;h="pending",M.then(A=>{h="resolved",m(A);},A=>{h="rejected",g(A);});}else return m(E)}catch(E){g(E);}},"checkCallback");b()!==true&&(d=n(g,l),p=r(b,a));})}i(zw,"waitUntil");function Ww(){let e=null,t=i(()=>wn(),"state"),n,r=i(()=>n||=new sa({global:globalThis,config:t().config.fakeTimers}),"timers"),o=new Map,s=new Map,a=["PROD","DEV","SSR"],l={useFakeTimers(c){if(ps()&&(c?.toFake?.includes("nextTick")||t().config?.fakeTimers?.toFake?.includes("nextTick")))throw new Error('vi.useFakeTimers({ toFake: ["nextTick"] }) is not supported in node:child_process. Use --pool=threads if mocking nextTick is required.');return c?r().configure({...t().config.fakeTimers,...c}):r().configure(t().config.fakeTimers),r().useFakeTimers(),l},isFakeTimers(){return r().isFakeTimers()},useRealTimers(){return r().useRealTimers(),l},runOnlyPendingTimers(){return r().runOnlyPendingTimers(),l},async runOnlyPendingTimersAsync(){return await r().runOnlyPendingTimersAsync(),l},runAllTimers(){return r().runAllTimers(),l},async runAllTimersAsync(){return await r().runAllTimersAsync(),l},runAllTicks(){return r().runAllTicks(),l},advanceTimersByTime(c){return r().advanceTimersByTime(c),l},async advanceTimersByTimeAsync(c){return await r().advanceTimersByTimeAsync(c),l},advanceTimersToNextTimer(){return r().advanceTimersToNextTimer(),l},async advanceTimersToNextTimerAsync(){return await r().advanceTimersToNextTimerAsync(),l},advanceTimersToNextFrame(){return r().advanceTimersToNextFrame(),l},getTimerCount(){return r().getTimerCount()},setSystemTime(c){return r().setSystemTime(c),l},getMockedSystemTime(){return r().getMockedSystemTime()},getRealSystemTime(){return r().getRealSystemTime()},clearAllTimers(){return r().clearAllTimers(),l},setTimerTickMode(c,u){return r().setTimerTickMode(c,u),l},spyOn:jl,fn:Rl,waitFor:Uw,waitUntil:zw,defineHelper:i(c=>i(function(...f){let h=c(...f);return h&&typeof h=="object"&&typeof h.then=="function"?i((async function(){return await h}),"__VITEST_HELPER__")():h},"__VITEST_HELPER__"),"defineHelper"),hoisted(c){return pe(c,'"vi.hoisted" factory',["function"]),c()},mock(c,u){if(typeof c!="string")throw new TypeError(`vi.mock() expects a string path, but received a ${typeof c}`);let f=Xt("mock");Ue().queueMock(c,f,typeof u=="function"?()=>u(()=>Ue().importActual(c,f,Ue().getMockContext().callstack)):u);},unmock(c){if(typeof c!="string")throw new TypeError(`vi.unmock() expects a string path, but received a ${typeof c}`);Ue().queueUnmock(c,Xt("unmock"));},doMock(c,u){if(typeof c!="string")throw new TypeError(`vi.doMock() expects a string path, but received a ${typeof c}`);let f=Xt("doMock");Ue().queueMock(c,f,typeof u=="function"?()=>u(()=>Ue().importActual(c,f,Ue().getMockContext().callstack)):u);let h={};return Symbol.dispose&&(h[Symbol.dispose]=()=>{Ue().queueUnmock(c,f);}),h},doUnmock(c){if(typeof c!="string")throw new TypeError(`vi.doUnmock() expects a string path, but received a ${typeof c}`);let u=Xt("doUnmock");Ue().queueUnmock(c,u);},async importActual(c){let u=Xt("importActual");return Ue().importActual(c,u,Ue().getMockContext().callstack)},async importMock(c){let u=Xt("importMock");return Ue().importMock(c,u)},mockObject(c,u){return Ue().mockObject({value:c},void 0,u?.spy?"autospy":"automock").value},mocked(c,u={}){return c},isMockFunction(c){return mt(c)},clearAllMocks(){return Ll(),l},resetAllMocks(){return Bl(),l},restoreAllMocks(){return Dl(),l},stubGlobal(c,u){return o.has(c)||o.set(c,Object.getOwnPropertyDescriptor(globalThis,c)),Object.defineProperty(globalThis,c,{value:u,writable:true,configurable:true,enumerable:true}),l},stubEnv(c,u){let f=t().metaEnv;return s.has(c)||s.set(c,f[c]),a.includes(c)?f[c]=u?"1":"":u===void 0?delete f[c]:f[c]=String(u),l},unstubAllGlobals(){return o.forEach((c,u)=>{c?Object.defineProperty(globalThis,u,c):Reflect.deleteProperty(globalThis,u);}),o.clear(),l},unstubAllEnvs(){let c=t().metaEnv;return s.forEach((u,f)=>{u===void 0?delete c[f]:c[f]=u;}),s.clear(),l},resetModules(){return Nl(t().evaluatedModules),l},async dynamicImportSettled(){return ds()},setConfig(c){e||(e={...t().config}),Object.assign(t().config,c);},resetConfig(){e&&Object.assign(t().config,e);}};return l}i(Ww,"createVitest");var sh=Ww(),Dn=sh;function Ue(){return typeof __vitest_mocker__<"u"?__vitest_mocker__:new Proxy({},{get(e,t){throw new Error(`Vitest mocker was not initialized in this environment. vi.${String(t)}() is forbidden.`)}})}i(Ue,"_mocker");function Xt(e){let t=dc({stackTraceLimit:5}).split(`
166
+ `);return ir(t[t.findLastIndex(n=>n.includes(` at Object.${e}`)||n.includes(`${e}@`)||n.includes(` at ${e} (`))+1])?.file||""}i(Xt,"getImporter");var ih="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Vw=new Uint8Array(64),Kw=new Uint8Array(128);for(let e=0;e<ih.length;e++){let t=ih.charCodeAt(e);Vw[e]=t,Kw[t]=e;}var Hw=new Set,Gw=new Set,ch=i(e=>((...t)=>{for(let n of e){let r=n(...t);if(r)return r}return null}),"createExecHandlers");ch(Hw);ch(Gw);var ia="vite-module-runner:import-meta-resolve/v1/";`
168
167
 
169
168
  export async function resolve(specifier, context, nextResolve) {
170
- if (specifier.startsWith(${JSON.stringify(ha)})) {
171
- const data = specifier.slice(${JSON.stringify(ha)}.length)
169
+ if (specifier.startsWith(${JSON.stringify(ia)})) {
170
+ const data = specifier.slice(${JSON.stringify(ia)}.length)
172
171
  const [parsedSpecifier, parsedImporter] = JSON.parse(data)
173
172
  specifier = parsedSpecifier
174
173
  context.parentURL = parsedImporter
@@ -176,7 +175,7 @@ export async function resolve(specifier, context, nextResolve) {
176
175
  return nextResolve(specifier, context)
177
176
  }
178
177
 
179
- `;new Proxy({},{get(e,t){throw Error(`[module runner] Dynamic access of "import.meta.env" is not supported. Please, use "import.meta.env.${String(t)}" instead.`)}});var tn=Lh(Ch());zod.z.strictObject({path:zod.z.string().describe("Can contain glob patterns, relative paths, absolute paths, package paths, or package sub-paths"),filter:zod.z.custom(e=>typeof e=="function").optional().describe("A function that takes a path and returns a boolean")});function Rt({rendererId:e,alias:t,path:n}){return (()=>{switch(e){case "react":case "angular":return {rendererId:e,codeSrcPath:n,exportName:t||"default"};case "vue":case "hbs":case "html":return {rendererId:e,codeSrcPath:n};case "twig":return {rendererId:e,namespacePath:t};case "web-components":return {rendererId:e,elementName:t};case "ios":return {rendererId:e,moduleName:n,symbolName:t};case "android":return {rendererId:e,packageName:n,componentName:t};default:{throw new Error(`Invalid renderer ID: ${e}`)}}})()}i(Rt,"normalizeTemplateInfo");function nn(e){switch(e.rendererId){case "react":case "angular":return {path:e.codeSrcPath,alias:e.exportName};case "hbs":case "html":case "vue":return {path:e.codeSrcPath};case "twig":return {alias:e.namespacePath};case "web-components":return {alias:e.elementName};case "ios":return {path:e.moduleName,alias:e.symbolName};case "android":return {path:e.packageName,alias:e.componentName};default:{throw new Error(`Invalid template info: ${JSON.stringify(e)}`)}}}i(nn,"convertTemplateInfoToOldWay");wn("normalizeTemplateInfo",()=>{Pe("should handle React template with default export",()=>{let e=Rt({rendererId:"react",path:"@components/Button"});(0, tn.expectTypeOf)(e.codeSrcPath).toEqualTypeOf(),(0, tn.expectTypeOf)(e.rendererId).toMatchTypeOf(),(0, tn.expectTypeOf)(e.rendererId).toEqualTypeOf(),(0, tn.expectTypeOf)(e.exportName).toEqualTypeOf(),Re(e).toEqual({rendererId:"react",codeSrcPath:"@components/Button",exportName:"default"});}),Pe("should handle React template with named export",()=>{let e=Rt({rendererId:"react",path:"@components/Button",alias:"CustomButton"});Re(e).toEqual({rendererId:"react",codeSrcPath:"@components/Button",exportName:"CustomButton"});}),Pe("should handle Vue template",()=>{let e=Rt({rendererId:"vue",path:"@components/Button.vue"});Re(e).toEqual({rendererId:"vue",codeSrcPath:"@components/Button.vue"});}),Pe("should handle web components",()=>{let e=Rt({rendererId:"web-components",alias:"custom-button"});Re(e).toEqual({rendererId:"web-components",elementName:"custom-button"});}),Pe("should handle Twig template",()=>{let e=Rt({rendererId:"twig",alias:"@namespace/button"});Re(e).toEqual({rendererId:"twig",namespacePath:"@namespace/button"});}),Pe("should throw error for invalid renderer ID",()=>{Re(()=>Rt({rendererId:"invalid",path:"some/path"})).toThrow("Invalid renderer ID: invalid");});});wn("convertTemplateInfoToOldWay",()=>{Pe("should convert React template info",()=>{let e=nn({rendererId:"react",codeSrcPath:"@components/Button",exportName:"CustomButton"});Re(e).toEqual({path:"@components/Button",alias:"CustomButton"});}),Pe("should convert Vue template info",()=>{let e=nn({rendererId:"vue",codeSrcPath:"@components/Button.vue"});Re(e).toEqual({path:"@components/Button.vue"});}),Pe("should convert web components template info",()=>{let e=nn({rendererId:"web-components",elementName:"custom-button"});Re(e).toEqual({alias:"custom-button"});}),Pe("should convert Twig template info",()=>{let e=nn({rendererId:"twig",namespacePath:"@namespace/button"});Re(e).toEqual({alias:"@namespace/button"});}),Pe("should throw error for invalid template info",()=>{Re(()=>nn({rendererId:"invalid"})).toThrow("Invalid template info:");});});
178
+ `;new Proxy({},{get(e,t){throw Error(`[module runner] Dynamic access of "import.meta.env" is not supported. Please, use "import.meta.env.${String(t)}" instead.`)}});var Qt=_h(yh());zod.z.strictObject({path:zod.z.string().describe("Can contain glob patterns, relative paths, absolute paths, package paths, or package sub-paths"),filter:zod.z.custom(e=>typeof e=="function").optional().describe("A function that takes a path and returns a boolean")});function Pt({rendererId:e,alias:t,path:n}){return (()=>{switch(e){case "react":case "angular":return {rendererId:e,codeSrcPath:n,exportName:t||"default"};case "vue":case "hbs":case "html":return {rendererId:e,codeSrcPath:n};case "twig":return {rendererId:e,namespacePath:t};case "web-components":return {rendererId:e,elementName:t};case "ios":return {rendererId:e,moduleName:n,symbolName:t};case "android":return {rendererId:e,packageName:n,componentName:t};default:{throw new Error(`Invalid renderer ID: ${e}`)}}})()}i(Pt,"normalizeTemplateInfo");function en(e){switch(e.rendererId){case "react":case "angular":return {path:e.codeSrcPath,alias:e.exportName};case "hbs":case "html":case "vue":return {path:e.codeSrcPath};case "twig":return {alias:e.namespacePath};case "web-components":return {alias:e.elementName};case "ios":return {path:e.moduleName,alias:e.symbolName};case "android":return {path:e.packageName,alias:e.componentName};default:{throw new Error(`Invalid template info: ${JSON.stringify(e)}`)}}}i(en,"convertTemplateInfoToOldWay");gn("normalizeTemplateInfo",()=>{Pe("should handle React template with default export",()=>{let e=Pt({rendererId:"react",path:"@components/Button"});(0, Qt.expectTypeOf)(e.codeSrcPath).toEqualTypeOf(),(0, Qt.expectTypeOf)(e.rendererId).toMatchTypeOf(),(0, Qt.expectTypeOf)(e.rendererId).toEqualTypeOf(),(0, Qt.expectTypeOf)(e.exportName).toEqualTypeOf(),Re(e).toEqual({rendererId:"react",codeSrcPath:"@components/Button",exportName:"default"});}),Pe("should handle React template with named export",()=>{let e=Pt({rendererId:"react",path:"@components/Button",alias:"CustomButton"});Re(e).toEqual({rendererId:"react",codeSrcPath:"@components/Button",exportName:"CustomButton"});}),Pe("should handle Vue template",()=>{let e=Pt({rendererId:"vue",path:"@components/Button.vue"});Re(e).toEqual({rendererId:"vue",codeSrcPath:"@components/Button.vue"});}),Pe("should handle web components",()=>{let e=Pt({rendererId:"web-components",alias:"custom-button"});Re(e).toEqual({rendererId:"web-components",elementName:"custom-button"});}),Pe("should handle Twig template",()=>{let e=Pt({rendererId:"twig",alias:"@namespace/button"});Re(e).toEqual({rendererId:"twig",namespacePath:"@namespace/button"});}),Pe("should throw error for invalid renderer ID",()=>{Re(()=>Pt({rendererId:"invalid",path:"some/path"})).toThrow("Invalid renderer ID: invalid");});});gn("convertTemplateInfoToOldWay",()=>{Pe("should convert React template info",()=>{let e=en({rendererId:"react",codeSrcPath:"@components/Button",exportName:"CustomButton"});Re(e).toEqual({path:"@components/Button",alias:"CustomButton"});}),Pe("should convert Vue template info",()=>{let e=en({rendererId:"vue",codeSrcPath:"@components/Button.vue"});Re(e).toEqual({path:"@components/Button.vue"});}),Pe("should convert web components template info",()=>{let e=en({rendererId:"web-components",elementName:"custom-button"});Re(e).toEqual({alias:"custom-button"});}),Pe("should convert Twig template info",()=>{let e=en({rendererId:"twig",namespacePath:"@namespace/button"});Re(e).toEqual({alias:"@namespace/button"});}),Pe("should throw error for invalid template info",()=>{Re(()=>en({rendererId:"invalid"})).toThrow("Invalid template info:");});});
180
179
  /*! Bundled license information:
181
180
 
182
181
  @vitest/pretty-format/dist/index.js: