403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.221
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/elite-events-storybook/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/elite-events-storybook/mocker-runtime-injected.js
/*! For license information please see mocker-runtime-injected.js.LICENSE.txt */
var __defProp=Object.defineProperty,__defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value,__publicField=(obj,key,value)=>__defNormalProp(obj,"symbol"!=typeof key?key+"":key,value),MockerRegistry=class{constructor(){__publicField(this,"registryByUrl",new Map),__publicField(this,"registryById",new Map)}clear(){this.registryByUrl.clear(),this.registryById.clear()}keys(){return this.registryByUrl.keys()}add(mock){this.registryByUrl.set(mock.url,mock),this.registryById.set(mock.id,mock)}register(typeOrEvent,raw,id,url,factoryOrRedirect){const type="object"==typeof typeOrEvent?typeOrEvent.type:typeOrEvent;if("object"==typeof typeOrEvent){const event=typeOrEvent;if(event instanceof AutomockedModule||event instanceof AutospiedModule||event instanceof ManualMockedModule||event instanceof RedirectedModule)throw new TypeError(`[vitest] Cannot register a mock that is already defined. Expected a JSON representation from \`MockedModule.toJSON\`, instead got "${event.type}". Use "registry.add()" to update a mock instead.`);if("automock"===event.type){const module=AutomockedModule.fromJSON(event);return this.add(module),module}if("autospy"===event.type){const module=AutospiedModule.fromJSON(event);return this.add(module),module}if("redirect"===event.type){const module=RedirectedModule.fromJSON(event);return this.add(module),module}throw"manual"===event.type?new Error("Cannot set serialized manual mock. Define a factory function manually with `ManualMockedModule.fromJSON()`."):new Error(`Unknown mock type: ${event.type}`)}if("string"!=typeof raw)throw new TypeError("[vitest] Mocks require a raw string.");if("string"!=typeof url)throw new TypeError("[vitest] Mocks require a url string.");if("string"!=typeof id)throw new TypeError("[vitest] Mocks require an id string.");if("manual"===type){if("function"!=typeof factoryOrRedirect)throw new TypeError("[vitest] Manual mocks require a factory function.");const mock=new ManualMockedModule(raw,id,url,factoryOrRedirect);return this.add(mock),mock}if("automock"===type||"autospy"===type){const mock="automock"===type?new AutomockedModule(raw,id,url):new AutospiedModule(raw,id,url);return this.add(mock),mock}if("redirect"===type){if("string"!=typeof factoryOrRedirect)throw new TypeError("[vitest] Redirect mocks require a redirect string.");const mock=new RedirectedModule(raw,id,url,factoryOrRedirect);return this.add(mock),mock}throw new Error(`[vitest] Unknown mock type: ${type}`)}delete(id){this.registryByUrl.delete(id)}get(id){return this.registryByUrl.get(id)}getById(id){return this.registryById.get(id)}has(id){return this.registryByUrl.has(id)}},AutomockedModule=class{constructor(raw,id,url){__publicField(this,"type","automock"),this.raw=raw,this.id=id,this.url=url}static fromJSON(data){return new AutospiedModule(data.raw,data.id,data.url)}toJSON(){return{type:this.type,url:this.url,raw:this.raw,id:this.id}}},AutospiedModule=class _AutospiedModule{constructor(raw,id,url){__publicField(this,"type","autospy"),this.raw=raw,this.id=id,this.url=url}static fromJSON(data){return new _AutospiedModule(data.raw,data.id,data.url)}toJSON(){return{type:this.type,url:this.url,id:this.id,raw:this.raw}}},RedirectedModule=class _RedirectedModule{constructor(raw,id,url,redirect){__publicField(this,"type","redirect"),this.raw=raw,this.id=id,this.url=url,this.redirect=redirect}static fromJSON(data){return new _RedirectedModule(data.raw,data.id,data.url,data.redirect)}toJSON(){return{type:this.type,url:this.url,raw:this.raw,id:this.id,redirect:this.redirect}}},ManualMockedModule=class _ManualMockedModule{constructor(raw,id,url,factory){__publicField(this,"cache"),__publicField(this,"type","manual"),this.raw=raw,this.id=id,this.url=url,this.factory=factory}async resolve(){if(this.cache)return this.cache;let exports;try{exports=await this.factory()}catch(err){const vitestError=new Error('[vitest] There was an error when mocking a module. If you are using "vi.mock" factory, make sure there are no top level variables inside, since this call is hoisted to top of the file. Read more: https://vitest.dev/api/vi.html#vi-mock');throw vitestError.cause=err,vitestError}if(null===exports||"object"!=typeof exports||Array.isArray(exports))throw new TypeError(`[vitest] vi.mock("${this.raw}", factory?: () => unknown) is not returning an object. Did you mean to return an object with a "default" key?`);return this.cache=exports}static fromJSON(data,factory){return new _ManualMockedModule(data.raw,data.id,data.url,factory)}toJSON(){return{type:this.type,url:this.url,id:this.id,raw:this.raw}}};function mockObject(options,object,mockExports={}){const finalizers=new Array,refs=new RefTracker,define=(container,key,value)=>{try{return container[key]=value,!0}catch{return!1}},mockPropertiesOf=(container,newContainer)=>{const containerType=getType(container),isModule="Module"===containerType||!!container.__esModule;for(const{key:property,descriptor}of getAllMockableProperties(container,isModule,options.globalConstructors)){if(!isModule&&descriptor.get){try{Object.defineProperty(newContainer,property,descriptor)}catch{}continue}if(isSpecialProp(property,containerType))continue;const value=container[property],refId=refs.getId(value);if(void 0!==refId){finalizers.push(()=>define(newContainer,property,refs.getMockedValue(refId)));continue}const type=getType(value);if(Array.isArray(value)){define(newContainer,property,[]);continue}const isFunction=type.includes("Function")&&"function"==typeof value;if(isFunction&&!value._isMockFunction||"Object"===type||"Module"===type){if(define(newContainer,property,isFunction?value:{})){if(isFunction){let mockFunction=function(){if(this instanceof newContainer[property])for(const{key,descriptor:descriptor2}of getAllMockableProperties(this,!1,options.globalConstructors)){if(descriptor2.get)continue;const value2=this[key];if(getType(value2).includes("Function")&&"function"==typeof value2){const original=this[key],mock2=spyOn(this,key).mockImplementation(original),origMockReset=mock2.mockReset;mock2.mockRestore=mock2.mockReset=()=>(origMockReset.call(mock2),mock2.mockImplementation(original),mock2)}}};if(!options.spyOn)throw new Error("[@vitest/mocker] `spyOn` is not defined. This is a Vitest error. Please open a new issue with reproduction.");const spyOn=options.spyOn,mock=spyOn(newContainer,property);if("automock"===options.type){mock.mockImplementation(mockFunction);const origMockReset=mock.mockReset;mock.mockRestore=mock.mockReset=()=>(origMockReset.call(mock),mock.mockImplementation(mockFunction),mock)}Object.defineProperty(newContainer[property],"length",{value:0})}refs.track(value,newContainer[property]),mockPropertiesOf(value,newContainer[property])}}else define(newContainer,property,value)}},mockedObject=mockExports;mockPropertiesOf(object,mockedObject);for(const finalizer of finalizers)finalizer();return mockedObject}var RefTracker=class{constructor(){__publicField(this,"idMap",new Map),__publicField(this,"mockedValueMap",new Map)}getId(value){return this.idMap.get(value)}getMockedValue(id){return this.mockedValueMap.get(id)}track(originalValue,mockedValue){const newId=this.idMap.size;return this.idMap.set(originalValue,newId),this.mockedValueMap.set(newId,mockedValue),newId}};function getType(value){return Object.prototype.toString.apply(value).slice(8,-1)}function isSpecialProp(prop,parentType){return parentType.includes("Function")&&"string"==typeof prop&&["arguments","callee","caller","length","name"].includes(prop)}function getAllMockableProperties(obj,isModule,constructors){const{Map:Map2,Object:Object2,Function:Function2,RegExp:RegExp2,Array:Array2}=constructors,allProps=new Map2;let curr=obj;do{if(curr===Object2.prototype||curr===Function2.prototype||curr===RegExp2.prototype)break;collectOwnProperties(curr,key=>{const descriptor=Object2.getOwnPropertyDescriptor(curr,key);descriptor&&allProps.set(key,{key,descriptor})})}while(curr=Object2.getPrototypeOf(curr));if(isModule&&!allProps.has("default")&&"default"in obj){const descriptor=Object2.getOwnPropertyDescriptor(obj,"default");descriptor&&allProps.set("default",{key:"default",descriptor})}return Array2.from(allProps.values())}function collectOwnProperties(obj,collector){const collect="function"==typeof collector?collector:key=>collector.add(key);Object.getOwnPropertyNames(obj).forEach(collect),Object.getOwnPropertySymbols(obj).forEach(collect)}var _DRIVE_LETTER_START_RE=/^[A-Za-z]:\//;function normalizeWindowsPath(input=""){return input?input.replace(/\\/g,"/").replace(_DRIVE_LETTER_START_RE,r=>r.toUpperCase()):input}var _UNC_REGEX=/^[/\\]{2}/,_IS_ABSOLUTE_RE=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,_DRIVE_LETTER_RE=/^[A-Za-z]:$/,_EXTNAME_RE=/.(\.[^./]+|\.)$/,normalize=function(path){if(0===path.length)return".";const isUNCPath=(path=normalizeWindowsPath(path)).match(_UNC_REGEX),isPathAbsolute=isAbsolute(path),trailingSeparator="/"===path[path.length-1];return 0===(path=normalizeString(path,!isPathAbsolute)).length?isPathAbsolute?"/":trailingSeparator?"./":".":(trailingSeparator&&(path+="/"),_DRIVE_LETTER_RE.test(path)&&(path+="/"),isUNCPath?isPathAbsolute?`//${path}`:`//./${path}`:isPathAbsolute&&!isAbsolute(path)?`/${path}`:path)},join=function(...segments){let path="";for(const seg of segments)if(seg)if(path.length>0){const pathTrailing="/"===path[path.length-1],segLeading="/"===seg[0];path+=pathTrailing&&segLeading?seg.slice(1):pathTrailing||segLeading?seg:`/${seg}`}else path+=seg;return normalize(path)};function normalizeString(path,allowAboveRoot){let res="",lastSegmentLength=0,lastSlash=-1,dots=0,char=null;for(let index2=0;index2<=path.length;++index2){if(index2<path.length)char=path[index2];else{if("/"===char)break;char="/"}if("/"===char){if(lastSlash===index2-1||1===dots);else if(2===dots){if(res.length<2||2!==lastSegmentLength||"."!==res[res.length-1]||"."!==res[res.length-2]){if(res.length>2){const lastSlashIndex=res.lastIndexOf("/");-1===lastSlashIndex?(res="",lastSegmentLength=0):(res=res.slice(0,lastSlashIndex),lastSegmentLength=res.length-1-res.lastIndexOf("/")),lastSlash=index2,dots=0;continue}if(res.length>0){res="",lastSegmentLength=0,lastSlash=index2,dots=0;continue}}allowAboveRoot&&(res+=res.length>0?"/..":"..",lastSegmentLength=2)}else res.length>0?res+=`/${path.slice(lastSlash+1,index2)}`:res=path.slice(lastSlash+1,index2),lastSegmentLength=index2-lastSlash-1;lastSlash=index2,dots=0}else"."===char&&-1!==dots?++dots:dots=-1}return res}var isAbsolute=function(p2){return _IS_ABSOLUTE_RE.test(p2)},extname=function(p2){if(".."===p2)return"";const match=_EXTNAME_RE.exec(normalizeWindowsPath(p2));return match&&match[1]||""},f={reset:[0,0],bold:[1,22,""],dim:[2,22,""],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]},h=Object.entries(f);function a(n){return String(n)}function C(n=!1){let e="undefined"!=typeof process?process:void 0,i=(null==e?void 0:e.env)||{},g=(null==e?void 0:e.argv)||[];return!("NO_COLOR"in i||g.includes("--no-color"))&&("FORCE_COLOR"in i||g.includes("--color")||"win32"===(null==e?void 0:e.platform)||n&&"dumb"!==i.TERM||"CI"in i)||"undefined"!=typeof window&&!!window.chrome}function p(n=!1){let e=C(n),g=(r,t,c=r)=>{let o=l=>{let s=String(l),b=s.indexOf(t,r.length);return~b?r+((r,t,c,o)=>{let l="",s=0;do{l+=r.substring(s,o)+c,s=o+t.length,o=r.indexOf(t,s)}while(~o);return l+r.substring(s)})(s,t,c,b)+t:r+s+t};return o.open=r,o.close=t,o},u={isColorSupported:e},d=r=>`[${r}m`;for(let[r,t]of h)u[r]=e?g(d(t[0]),d(t[1]),t[2]):a;return u}function _mergeNamespaces(n,m){return m.forEach(function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach(function(k){if("default"!==k&&!(k in n)){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:!0,get:function(){return e[k]}})}})}),Object.freeze(n)}function getDefaultExportFromCjs(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")?x.default:x}a.open="",a.close="",p();var hasRequiredReactIs_development$1,hasRequiredReactIs$1,reactIs$1={exports:{}},reactIs_development$1={};function requireReactIs_development$1(){return hasRequiredReactIs_development$1||(hasRequiredReactIs_development$1=1,function(){function typeOf(object){if("object"==typeof object&&null!==object){var $$typeof=object.$$typeof;switch($$typeof){case REACT_ELEMENT_TYPE:switch(object=object.type){case REACT_FRAGMENT_TYPE:case REACT_PROFILER_TYPE:case REACT_STRICT_MODE_TYPE:case REACT_SUSPENSE_TYPE:case REACT_SUSPENSE_LIST_TYPE:case REACT_VIEW_TRANSITION_TYPE:return object;default:switch(object=object&&object.$$typeof){case REACT_CONTEXT_TYPE:case REACT_FORWARD_REF_TYPE:case REACT_LAZY_TYPE:case REACT_MEMO_TYPE:case REACT_CONSUMER_TYPE:return object;default:return $$typeof}}case REACT_PORTAL_TYPE:return $$typeof}}}var REACT_ELEMENT_TYPE=Symbol.for("react.transitional.element"),REACT_PORTAL_TYPE=Symbol.for("react.portal"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment"),REACT_STRICT_MODE_TYPE=Symbol.for("react.strict_mode"),REACT_PROFILER_TYPE=Symbol.for("react.profiler"),REACT_CONSUMER_TYPE=Symbol.for("react.consumer"),REACT_CONTEXT_TYPE=Symbol.for("react.context"),REACT_FORWARD_REF_TYPE=Symbol.for("react.forward_ref"),REACT_SUSPENSE_TYPE=Symbol.for("react.suspense"),REACT_SUSPENSE_LIST_TYPE=Symbol.for("react.suspense_list"),REACT_MEMO_TYPE=Symbol.for("react.memo"),REACT_LAZY_TYPE=Symbol.for("react.lazy"),REACT_VIEW_TRANSITION_TYPE=Symbol.for("react.view_transition"),REACT_CLIENT_REFERENCE=Symbol.for("react.client.reference");reactIs_development$1.ContextConsumer=REACT_CONSUMER_TYPE,reactIs_development$1.ContextProvider=REACT_CONTEXT_TYPE,reactIs_development$1.Element=REACT_ELEMENT_TYPE,reactIs_development$1.ForwardRef=REACT_FORWARD_REF_TYPE,reactIs_development$1.Fragment=REACT_FRAGMENT_TYPE,reactIs_development$1.Lazy=REACT_LAZY_TYPE,reactIs_development$1.Memo=REACT_MEMO_TYPE,reactIs_development$1.Portal=REACT_PORTAL_TYPE,reactIs_development$1.Profiler=REACT_PROFILER_TYPE,reactIs_development$1.StrictMode=REACT_STRICT_MODE_TYPE,reactIs_development$1.Suspense=REACT_SUSPENSE_TYPE,reactIs_development$1.SuspenseList=REACT_SUSPENSE_LIST_TYPE,reactIs_development$1.isContextConsumer=function(object){return typeOf(object)===REACT_CONSUMER_TYPE},reactIs_development$1.isContextProvider=function(object){return typeOf(object)===REACT_CONTEXT_TYPE},reactIs_development$1.isElement=function(object){return"object"==typeof object&&null!==object&&object.$$typeof===REACT_ELEMENT_TYPE},reactIs_development$1.isForwardRef=function(object){return typeOf(object)===REACT_FORWARD_REF_TYPE},reactIs_development$1.isFragment=function(object){return typeOf(object)===REACT_FRAGMENT_TYPE},reactIs_development$1.isLazy=function(object){return typeOf(object)===REACT_LAZY_TYPE},reactIs_development$1.isMemo=function(object){return typeOf(object)===REACT_MEMO_TYPE},reactIs_development$1.isPortal=function(object){return typeOf(object)===REACT_PORTAL_TYPE},reactIs_development$1.isProfiler=function(object){return typeOf(object)===REACT_PROFILER_TYPE},reactIs_development$1.isStrictMode=function(object){return typeOf(object)===REACT_STRICT_MODE_TYPE},reactIs_development$1.isSuspense=function(object){return typeOf(object)===REACT_SUSPENSE_TYPE},reactIs_development$1.isSuspenseList=function(object){return typeOf(object)===REACT_SUSPENSE_LIST_TYPE},reactIs_development$1.isValidElementType=function(type){return"string"==typeof type||"function"==typeof type||type===REACT_FRAGMENT_TYPE||type===REACT_PROFILER_TYPE||type===REACT_STRICT_MODE_TYPE||type===REACT_SUSPENSE_TYPE||type===REACT_SUSPENSE_LIST_TYPE||"object"==typeof type&&null!==type&&(type.$$typeof===REACT_LAZY_TYPE||type.$$typeof===REACT_MEMO_TYPE||type.$$typeof===REACT_CONTEXT_TYPE||type.$$typeof===REACT_CONSUMER_TYPE||type.$$typeof===REACT_FORWARD_REF_TYPE||type.$$typeof===REACT_CLIENT_REFERENCE||void 0!==type.getModuleId)},reactIs_development$1.typeOf=typeOf}()),reactIs_development$1}function requireReactIs$1(){return hasRequiredReactIs$1||(hasRequiredReactIs$1=1,reactIs$1.exports=requireReactIs_development$1()),reactIs$1.exports}var hasRequiredReactIs_development,hasRequiredReactIs,reactIsExports$1=requireReactIs$1(),index$1=getDefaultExportFromCjs(reactIsExports$1),ReactIs19=_mergeNamespaces({__proto__:null,default:index$1},[reactIsExports$1]),reactIs={exports:{}},reactIs_development={};function requireReactIs_development(){return hasRequiredReactIs_development||(hasRequiredReactIs_development=1,function(){var REACT_MODULE_REFERENCE,REACT_ELEMENT_TYPE=Symbol.for("react.element"),REACT_PORTAL_TYPE=Symbol.for("react.portal"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment"),REACT_STRICT_MODE_TYPE=Symbol.for("react.strict_mode"),REACT_PROFILER_TYPE=Symbol.for("react.profiler"),REACT_PROVIDER_TYPE=Symbol.for("react.provider"),REACT_CONTEXT_TYPE=Symbol.for("react.context"),REACT_SERVER_CONTEXT_TYPE=Symbol.for("react.server_context"),REACT_FORWARD_REF_TYPE=Symbol.for("react.forward_ref"),REACT_SUSPENSE_TYPE=Symbol.for("react.suspense"),REACT_SUSPENSE_LIST_TYPE=Symbol.for("react.suspense_list"),REACT_MEMO_TYPE=Symbol.for("react.memo"),REACT_LAZY_TYPE=Symbol.for("react.lazy"),REACT_OFFSCREEN_TYPE=Symbol.for("react.offscreen");function typeOf(object){if("object"==typeof object&&null!==object){var $$typeof=object.$$typeof;switch($$typeof){case REACT_ELEMENT_TYPE:var type=object.type;switch(type){case REACT_FRAGMENT_TYPE:case REACT_PROFILER_TYPE:case REACT_STRICT_MODE_TYPE:case REACT_SUSPENSE_TYPE:case REACT_SUSPENSE_LIST_TYPE:return type;default:var $$typeofType=type&&type.$$typeof;switch($$typeofType){case REACT_SERVER_CONTEXT_TYPE:case REACT_CONTEXT_TYPE:case REACT_FORWARD_REF_TYPE:case REACT_LAZY_TYPE:case REACT_MEMO_TYPE:case REACT_PROVIDER_TYPE:return $$typeofType;default:return $$typeof}}case REACT_PORTAL_TYPE:return $$typeof}}}REACT_MODULE_REFERENCE=Symbol.for("react.module.reference");var ContextConsumer=REACT_CONTEXT_TYPE,ContextProvider=REACT_PROVIDER_TYPE,Element=REACT_ELEMENT_TYPE,ForwardRef=REACT_FORWARD_REF_TYPE,Fragment=REACT_FRAGMENT_TYPE,Lazy=REACT_LAZY_TYPE,Memo=REACT_MEMO_TYPE,Portal=REACT_PORTAL_TYPE,Profiler=REACT_PROFILER_TYPE,StrictMode=REACT_STRICT_MODE_TYPE,Suspense=REACT_SUSPENSE_TYPE,SuspenseList=REACT_SUSPENSE_LIST_TYPE,hasWarnedAboutDeprecatedIsAsyncMode=!1,hasWarnedAboutDeprecatedIsConcurrentMode=!1;reactIs_development.ContextConsumer=ContextConsumer,reactIs_development.ContextProvider=ContextProvider,reactIs_development.Element=Element,reactIs_development.ForwardRef=ForwardRef,reactIs_development.Fragment=Fragment,reactIs_development.Lazy=Lazy,reactIs_development.Memo=Memo,reactIs_development.Portal=Portal,reactIs_development.Profiler=Profiler,reactIs_development.StrictMode=StrictMode,reactIs_development.Suspense=Suspense,reactIs_development.SuspenseList=SuspenseList,reactIs_development.isAsyncMode=function isAsyncMode(object){return hasWarnedAboutDeprecatedIsAsyncMode||(hasWarnedAboutDeprecatedIsAsyncMode=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1},reactIs_development.isConcurrentMode=function isConcurrentMode(object){return hasWarnedAboutDeprecatedIsConcurrentMode||(hasWarnedAboutDeprecatedIsConcurrentMode=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1},reactIs_development.isContextConsumer=function isContextConsumer(object){return typeOf(object)===REACT_CONTEXT_TYPE},reactIs_development.isContextProvider=function isContextProvider(object){return typeOf(object)===REACT_PROVIDER_TYPE},reactIs_development.isElement=function isElement(object){return"object"==typeof object&&null!==object&&object.$$typeof===REACT_ELEMENT_TYPE},reactIs_development.isForwardRef=function isForwardRef(object){return typeOf(object)===REACT_FORWARD_REF_TYPE},reactIs_development.isFragment=function isFragment(object){return typeOf(object)===REACT_FRAGMENT_TYPE},reactIs_development.isLazy=function isLazy(object){return typeOf(object)===REACT_LAZY_TYPE},reactIs_development.isMemo=function isMemo(object){return typeOf(object)===REACT_MEMO_TYPE},reactIs_development.isPortal=function isPortal(object){return typeOf(object)===REACT_PORTAL_TYPE},reactIs_development.isProfiler=function isProfiler(object){return typeOf(object)===REACT_PROFILER_TYPE},reactIs_development.isStrictMode=function isStrictMode(object){return typeOf(object)===REACT_STRICT_MODE_TYPE},reactIs_development.isSuspense=function isSuspense(object){return typeOf(object)===REACT_SUSPENSE_TYPE},reactIs_development.isSuspenseList=function isSuspenseList(object){return typeOf(object)===REACT_SUSPENSE_LIST_TYPE},reactIs_development.isValidElementType=function isValidElementType(type){return"string"==typeof type||"function"==typeof type||(type===REACT_FRAGMENT_TYPE||type===REACT_PROFILER_TYPE||type===REACT_STRICT_MODE_TYPE||type===REACT_SUSPENSE_TYPE||type===REACT_SUSPENSE_LIST_TYPE||type===REACT_OFFSCREEN_TYPE||"object"==typeof type&&null!==type&&(type.$$typeof===REACT_LAZY_TYPE||type.$$typeof===REACT_MEMO_TYPE||type.$$typeof===REACT_PROVIDER_TYPE||type.$$typeof===REACT_CONTEXT_TYPE||type.$$typeof===REACT_FORWARD_REF_TYPE||type.$$typeof===REACT_MODULE_REFERENCE||void 0!==type.getModuleId))},reactIs_development.typeOf=typeOf}()),reactIs_development}function requireReactIs(){return hasRequiredReactIs||(hasRequiredReactIs=1,reactIs.exports=requireReactIs_development()),reactIs.exports}var reactIsExports=requireReactIs(),index=getDefaultExportFromCjs(reactIsExports),ReactIs18=_mergeNamespaces({__proto__:null,default:index},[reactIsExports]),reactIsMethods=["isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","isSuspenseList","isValidElementType"];Object.fromEntries(reactIsMethods.map(m=>[m,v=>ReactIs18[m](v)||ReactIs19[m](v)]));var jsTokens_1,hasRequiredJsTokens,getPromiseValue=()=>"Promise{…}";try{const{getPromiseDetails,kPending,kRejected}=process.binding("util");Array.isArray(getPromiseDetails(Promise.resolve()))&&(getPromiseValue=(value,options)=>{const[state,innerValue]=getPromiseDetails(value);return state===kPending?"Promise{<pending>}":`Promise${state===kRejected?"!":""}{${options.inspect(innerValue,options)}}`})}catch(notNode){}function createSimpleStackTrace(options){const{message="$$stack trace error",stackTraceLimit=1}=options||{},limit=Error.stackTraceLimit,prepareStackTrace=Error.prepareStackTrace;Error.stackTraceLimit=stackTraceLimit,Error.prepareStackTrace=e=>e.stack;const stackTrace=new Error(message).stack||"";return Error.prepareStackTrace=prepareStackTrace,Error.stackTraceLimit=limit,stackTrace}function requireJsTokens(){return hasRequiredJsTokens?jsTokens_1:(hasRequiredJsTokens=1,RegularExpressionLiteral=/\/(?![*\/])(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\\]).|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/uy,Punctuator=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y,Identifier=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/uy,StringLiteral=/(['"])(?:(?!\1)[^\\\n\r]|\\(?:\r\n|[^]))*(\1)?/y,NumericLiteral=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y,Template=/[`}](?:[^`\\$]|\\[^]|\$(?!\{))*(`|\$\{)?/y,WhiteSpace=/[\t\v\f\ufeff\p{Zs}]+/uy,LineTerminatorSequence=/\r?\n|[\r\u2028\u2029]/y,MultiLineComment=/\/\*(?:[^*]|\*(?!\/))*(\*\/)?/y,SingleLineComment=/\/\/.*/y,JSXPunctuator=/[<>.:={}]|\/(?![\/*])/y,JSXIdentifier=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/uy,JSXString=/(['"])(?:(?!\1)[^])*(\1)?/y,JSXText=/[^<>{}]+/y,TokensPrecedingExpression=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/,TokensNotPrecedingObjectLiteral=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/,KeywordsWithExpressionAfter=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/,KeywordsWithNoLineTerminatorAfter=/^(?:return|throw|yield)$/,Newline=RegExp(LineTerminatorSequence.source),jsTokens_1=function*(input,{jsx=!1}={}){var braces,firstCodePoint,isExpression,lastIndex,lastSignificantToken,length,match,mode,nextLastIndex,nextLastSignificantToken,parenNesting,postfixIncDec,punctuator,stack;for(({length}=input),lastIndex=0,lastSignificantToken="",stack=[{tag:"JS"}],braces=[],parenNesting=0,postfixIncDec=!1;lastIndex<length;){switch((mode=stack[stack.length-1]).tag){case"JS":case"JSNonExpressionParen":case"InterpolationInTemplate":case"InterpolationInJSX":if("/"===input[lastIndex]&&(TokensPrecedingExpression.test(lastSignificantToken)||KeywordsWithExpressionAfter.test(lastSignificantToken))&&(RegularExpressionLiteral.lastIndex=lastIndex,match=RegularExpressionLiteral.exec(input))){lastIndex=RegularExpressionLiteral.lastIndex,lastSignificantToken=match[0],postfixIncDec=!0,yield{type:"RegularExpressionLiteral",value:match[0],closed:void 0!==match[1]&&"\\"!==match[1]};continue}if(Punctuator.lastIndex=lastIndex,match=Punctuator.exec(input)){switch(punctuator=match[0],nextLastIndex=Punctuator.lastIndex,nextLastSignificantToken=punctuator,punctuator){case"(":"?NonExpressionParenKeyword"===lastSignificantToken&&stack.push({tag:"JSNonExpressionParen",nesting:parenNesting}),parenNesting++,postfixIncDec=!1;break;case")":parenNesting--,postfixIncDec=!0,"JSNonExpressionParen"===mode.tag&&parenNesting===mode.nesting&&(stack.pop(),nextLastSignificantToken="?NonExpressionParenEnd",postfixIncDec=!1);break;case"{":Punctuator.lastIndex=0,isExpression=!TokensNotPrecedingObjectLiteral.test(lastSignificantToken)&&(TokensPrecedingExpression.test(lastSignificantToken)||KeywordsWithExpressionAfter.test(lastSignificantToken)),braces.push(isExpression),postfixIncDec=!1;break;case"}":switch(mode.tag){case"InterpolationInTemplate":if(braces.length===mode.nesting){Template.lastIndex=lastIndex,match=Template.exec(input),lastIndex=Template.lastIndex,lastSignificantToken=match[0],"${"===match[1]?(lastSignificantToken="?InterpolationInTemplate",postfixIncDec=!1,yield{type:"TemplateMiddle",value:match[0]}):(stack.pop(),postfixIncDec=!0,yield{type:"TemplateTail",value:match[0],closed:"`"===match[1]});continue}break;case"InterpolationInJSX":if(braces.length===mode.nesting){stack.pop(),lastIndex+=1,lastSignificantToken="}",yield{type:"JSXPunctuator",value:"}"};continue}}nextLastSignificantToken=(postfixIncDec=braces.pop())?"?ExpressionBraceEnd":"}";break;case"]":postfixIncDec=!0;break;case"++":case"--":nextLastSignificantToken=postfixIncDec?"?PostfixIncDec":"?UnaryIncDec";break;case"<":if(jsx&&(TokensPrecedingExpression.test(lastSignificantToken)||KeywordsWithExpressionAfter.test(lastSignificantToken))){stack.push({tag:"JSXTag"}),lastIndex+=1,lastSignificantToken="<",yield{type:"JSXPunctuator",value:punctuator};continue}postfixIncDec=!1;break;default:postfixIncDec=!1}lastIndex=nextLastIndex,lastSignificantToken=nextLastSignificantToken,yield{type:"Punctuator",value:punctuator};continue}if(Identifier.lastIndex=lastIndex,match=Identifier.exec(input)){switch(lastIndex=Identifier.lastIndex,nextLastSignificantToken=match[0],match[0]){case"for":case"if":case"while":case"with":"."!==lastSignificantToken&&"?."!==lastSignificantToken&&(nextLastSignificantToken="?NonExpressionParenKeyword")}lastSignificantToken=nextLastSignificantToken,postfixIncDec=!KeywordsWithExpressionAfter.test(match[0]),yield{type:"#"===match[1]?"PrivateIdentifier":"IdentifierName",value:match[0]};continue}if(StringLiteral.lastIndex=lastIndex,match=StringLiteral.exec(input)){lastIndex=StringLiteral.lastIndex,lastSignificantToken=match[0],postfixIncDec=!0,yield{type:"StringLiteral",value:match[0],closed:void 0!==match[2]};continue}if(NumericLiteral.lastIndex=lastIndex,match=NumericLiteral.exec(input)){lastIndex=NumericLiteral.lastIndex,lastSignificantToken=match[0],postfixIncDec=!0,yield{type:"NumericLiteral",value:match[0]};continue}if(Template.lastIndex=lastIndex,match=Template.exec(input)){lastIndex=Template.lastIndex,lastSignificantToken=match[0],"${"===match[1]?(lastSignificantToken="?InterpolationInTemplate",stack.push({tag:"InterpolationInTemplate",nesting:braces.length}),postfixIncDec=!1,yield{type:"TemplateHead",value:match[0]}):(postfixIncDec=!0,yield{type:"NoSubstitutionTemplate",value:match[0],closed:"`"===match[1]});continue}break;case"JSXTag":case"JSXTagEnd":if(JSXPunctuator.lastIndex=lastIndex,match=JSXPunctuator.exec(input)){switch(lastIndex=JSXPunctuator.lastIndex,nextLastSignificantToken=match[0],match[0]){case"<":stack.push({tag:"JSXTag"});break;case">":stack.pop(),"/"===lastSignificantToken||"JSXTagEnd"===mode.tag?(nextLastSignificantToken="?JSX",postfixIncDec=!0):stack.push({tag:"JSXChildren"});break;case"{":stack.push({tag:"InterpolationInJSX",nesting:braces.length}),nextLastSignificantToken="?InterpolationInJSX",postfixIncDec=!1;break;case"/":"<"===lastSignificantToken&&(stack.pop(),"JSXChildren"===stack[stack.length-1].tag&&stack.pop(),stack.push({tag:"JSXTagEnd"}))}lastSignificantToken=nextLastSignificantToken,yield{type:"JSXPunctuator",value:match[0]};continue}if(JSXIdentifier.lastIndex=lastIndex,match=JSXIdentifier.exec(input)){lastIndex=JSXIdentifier.lastIndex,lastSignificantToken=match[0],yield{type:"JSXIdentifier",value:match[0]};continue}if(JSXString.lastIndex=lastIndex,match=JSXString.exec(input)){lastIndex=JSXString.lastIndex,lastSignificantToken=match[0],yield{type:"JSXString",value:match[0],closed:void 0!==match[2]};continue}break;case"JSXChildren":if(JSXText.lastIndex=lastIndex,match=JSXText.exec(input)){lastIndex=JSXText.lastIndex,lastSignificantToken=match[0],yield{type:"JSXText",value:match[0]};continue}switch(input[lastIndex]){case"<":stack.push({tag:"JSXTag"}),lastIndex++,lastSignificantToken="<",yield{type:"JSXPunctuator",value:"<"};continue;case"{":stack.push({tag:"InterpolationInJSX",nesting:braces.length}),lastIndex++,lastSignificantToken="?InterpolationInJSX",postfixIncDec=!1,yield{type:"JSXPunctuator",value:"{"};continue}}WhiteSpace.lastIndex=lastIndex,(match=WhiteSpace.exec(input))?(lastIndex=WhiteSpace.lastIndex,yield{type:"WhiteSpace",value:match[0]}):(LineTerminatorSequence.lastIndex=lastIndex,(match=LineTerminatorSequence.exec(input))?(lastIndex=LineTerminatorSequence.lastIndex,postfixIncDec=!1,KeywordsWithNoLineTerminatorAfter.test(lastSignificantToken)&&(lastSignificantToken="?NoLineTerminatorHere"),yield{type:"LineTerminatorSequence",value:match[0]}):(MultiLineComment.lastIndex=lastIndex,(match=MultiLineComment.exec(input))?(lastIndex=MultiLineComment.lastIndex,Newline.test(match[0])&&(postfixIncDec=!1,KeywordsWithNoLineTerminatorAfter.test(lastSignificantToken)&&(lastSignificantToken="?NoLineTerminatorHere")),yield{type:"MultiLineComment",value:match[0],closed:void 0!==match[1]}):(SingleLineComment.lastIndex=lastIndex,(match=SingleLineComment.exec(input))?(lastIndex=SingleLineComment.lastIndex,postfixIncDec=!1,yield{type:"SingleLineComment",value:match[0]}):(lastIndex+=(firstCodePoint=String.fromCodePoint(input.codePointAt(lastIndex))).length,lastSignificantToken=firstCodePoint,postfixIncDec=!1,yield{type:mode.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:firstCodePoint}))))}});var Identifier,JSXIdentifier,JSXPunctuator,JSXString,JSXText,KeywordsWithExpressionAfter,KeywordsWithNoLineTerminatorAfter,LineTerminatorSequence,MultiLineComment,Newline,NumericLiteral,Punctuator,RegularExpressionLiteral,SingleLineComment,StringLiteral,Template,TokensNotPrecedingObjectLiteral,TokensPrecedingExpression,WhiteSpace}requireJsTokens();var reservedWords={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"]};new Set(reservedWords.keyword),new Set(reservedWords.strict);var UrlType,chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",intToChar=new Uint8Array(64),charToInt=new Uint8Array(128);for(let i=0;i<chars.length;i++){const c=chars.charCodeAt(i);intToChar[i]=c,charToInt[c]=i}!function(UrlType2){UrlType2[UrlType2.Empty=1]="Empty",UrlType2[UrlType2.Hash=2]="Hash",UrlType2[UrlType2.Query=3]="Query",UrlType2[UrlType2.RelativePath=4]="RelativePath",UrlType2[UrlType2.AbsolutePath=5]="AbsolutePath",UrlType2[UrlType2.SchemeRelative=6]="SchemeRelative",UrlType2[UrlType2.Absolute=7]="Absolute"}(UrlType||(UrlType={}));var _DRIVE_LETTER_START_RE2=/^[A-Za-z]:\//;function normalizeWindowsPath2(input=""){return input?input.replace(/\\/g,"/").replace(_DRIVE_LETTER_START_RE2,r=>r.toUpperCase()):input}var _IS_ABSOLUTE_RE2=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;function cwd(){return"undefined"!=typeof process&&"function"==typeof process.cwd?process.cwd().replace(/\\/g,"/"):"/"}var resolve=function(...arguments_){let resolvedPath="",resolvedAbsolute=!1;for(let index2=(arguments_=arguments_.map(argument=>normalizeWindowsPath2(argument))).length-1;index2>=-1&&!resolvedAbsolute;index2--){const path=index2>=0?arguments_[index2]:cwd();path&&0!==path.length&&(resolvedPath=`${path}/${resolvedPath}`,resolvedAbsolute=isAbsolute2(path))}return resolvedPath=normalizeString2(resolvedPath,!resolvedAbsolute),resolvedAbsolute&&!isAbsolute2(resolvedPath)?`/${resolvedPath}`:resolvedPath.length>0?resolvedPath:"."};function normalizeString2(path,allowAboveRoot){let res="",lastSegmentLength=0,lastSlash=-1,dots=0,char=null;for(let index2=0;index2<=path.length;++index2){if(index2<path.length)char=path[index2];else{if("/"===char)break;char="/"}if("/"===char){if(lastSlash===index2-1||1===dots);else if(2===dots){if(res.length<2||2!==lastSegmentLength||"."!==res[res.length-1]||"."!==res[res.length-2]){if(res.length>2){const lastSlashIndex=res.lastIndexOf("/");-1===lastSlashIndex?(res="",lastSegmentLength=0):(res=res.slice(0,lastSlashIndex),lastSegmentLength=res.length-1-res.lastIndexOf("/")),lastSlash=index2,dots=0;continue}if(res.length>0){res="",lastSegmentLength=0,lastSlash=index2,dots=0;continue}}allowAboveRoot&&(res+=res.length>0?"/..":"..",lastSegmentLength=2)}else res.length>0?res+=`/${path.slice(lastSlash+1,index2)}`:res=path.slice(lastSlash+1,index2),lastSegmentLength=index2-lastSlash-1;lastSlash=index2,dots=0}else"."===char&&-1!==dots?++dots:dots=-1}return res}var isAbsolute2=function(p2){return _IS_ABSOLUTE_RE2.test(p2)},CHROME_IE_STACK_REGEXP=/^\s*at .*(?:\S:\d+|\(native\))/m,SAFARI_NATIVE_CODE_REGEXP=/^(?:eval@)?(?:\[native code\])?$/;function extractLocation(urlLike){if(!urlLike.includes(":"))return[urlLike];const parts=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(urlLike.replace(/^\(|\)$/g,""));if(!parts)return[urlLike];let url=parts[1];if(url.startsWith("async ")&&(url=url.slice(6)),url.startsWith("http:")||url.startsWith("https:")){const urlObj=new URL(url);urlObj.searchParams.delete("import"),urlObj.searchParams.delete("browserv"),url=urlObj.pathname+urlObj.hash+urlObj.search}if(url.startsWith("/@fs/")){const isWindows=/^\/@fs\/[a-zA-Z]:\//.test(url);url=url.slice(isWindows?5:4)}return[url,parts[2]||void 0,parts[3]||void 0]}function parseSingleFFOrSafariStack(raw){let line=raw.trim();if(SAFARI_NATIVE_CODE_REGEXP.test(line))return null;if(line.includes(" > eval")&&(line=line.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!line.includes("@")&&!line.includes(":"))return null;const functionNameRegex=/((.*".+"[^@]*)?[^@]*)(@)/,matches=line.match(functionNameRegex),functionName=matches&&matches[1]?matches[1]:void 0,[url,lineNumber,columnNumber]=extractLocation(line.replace(functionNameRegex,""));return url&&lineNumber&&columnNumber?{file:url,method:functionName||"",line:Number.parseInt(lineNumber),column:Number.parseInt(columnNumber)}:null}function parseSingleStack(raw){const line=raw.trim();return CHROME_IE_STACK_REGEXP.test(line)?parseSingleV8Stack(line):parseSingleFFOrSafariStack(line)}function parseSingleV8Stack(raw){let line=raw.trim();if(!CHROME_IE_STACK_REGEXP.test(line))return null;line.includes("(eval ")&&(line=line.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let sanitizedLine=line.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,"");const location2=sanitizedLine.match(/ (\(.+\)$)/);sanitizedLine=location2?sanitizedLine.replace(location2[0],""):sanitizedLine;const[url,lineNumber,columnNumber]=extractLocation(location2?location2[1]:sanitizedLine);let method=location2&&sanitizedLine||"",file=url&&["eval","<anonymous>"].includes(url)?void 0:url;return file&&lineNumber&&columnNumber?(method.startsWith("async ")&&(method=method.slice(6)),file.startsWith("file://")&&(file=file.slice(7)),file=file.startsWith("node:")||file.startsWith("internal:")?file:resolve(file),method&&(method=method.replace(/__vite_ssr_import_\d+__\./g,"")),{method,file,line:Number.parseInt(lineNumber),column:Number.parseInt(columnNumber)}):null}function createCompilerHints(options){const globalThisAccessor=(null==options?void 0:options.globalThisKey)||"__vitest_mocker__";function _mocker(){return void 0!==globalThis[globalThisAccessor]?globalThis[globalThisAccessor]:new Proxy({},{get(_,name){throw new Error(`Vitest mocker was not initialized in this environment. vi.${String(name)}() is forbidden.`)}})}return{hoisted(factory){if("function"!=typeof factory)throw new TypeError("vi.hoisted() expects a function, but received a "+typeof factory);return factory()},mock(path,factory){if("string"!=typeof path)throw new TypeError("vi.mock() expects a string path, but received a "+typeof path);const importer=getImporter("mock");_mocker().queueMock(path,importer,"function"==typeof factory?()=>factory(()=>_mocker().importActual(path,importer)):factory)},unmock(path){if("string"!=typeof path)throw new TypeError("vi.unmock() expects a string path, but received a "+typeof path);_mocker().queueUnmock(path,getImporter("unmock"))},doMock(path,factory){if("string"!=typeof path)throw new TypeError("vi.doMock() expects a string path, but received a "+typeof path);const importer=getImporter("doMock");_mocker().queueMock(path,importer,"function"==typeof factory?()=>factory(()=>_mocker().importActual(path,importer)):factory)},doUnmock(path){if("string"!=typeof path)throw new TypeError("vi.doUnmock() expects a string path, but received a "+typeof path);_mocker().queueUnmock(path,getImporter("doUnmock"))},importActual:async path=>_mocker().importActual(path,getImporter("importActual")),importMock:async path=>_mocker().importMock(path,getImporter("importMock"))}}function getImporter(name){const stackArray=createSimpleStackTrace({stackTraceLimit:5}).split("\n"),importerStackIndex=stackArray.findIndex(stack2=>stack2.includes(` at Object.${name}`)||stack2.includes(`${name}@`)),stack=parseSingleStack(stackArray[importerStackIndex+1]);return(null==stack?void 0:stack.file)||""}var hot=import.meta.hot||{on:warn,off:warn,send:warn};function warn(){console.warn("Vitest mocker cannot work if Vite didn't establish WS connection.")}var{now}=Date,ModuleMocker=class{constructor(interceptor,rpc2,spyOn,config){__publicField(this,"registry",new MockerRegistry),__publicField(this,"queue",new Set),__publicField(this,"mockedIds",new Set),this.interceptor=interceptor,this.rpc=rpc2,this.spyOn=spyOn,this.config=config}async prepare(){this.queue.size&&await Promise.all([...this.queue.values()])}async resolveFactoryModule(id){const mock=this.registry.get(id);if(!mock||"manual"!==mock.type)throw new Error(`Mock ${id} wasn't registered. This is probably a Vitest error. Please, open a new issue with reproduction.`);return await mock.resolve()}getFactoryModule(id){const mock=this.registry.get(id);if(!mock||"manual"!==mock.type)throw new Error(`Mock ${id} wasn't registered. This is probably a Vitest error. Please, open a new issue with reproduction.`);if(!mock.cache)throw new Error(`Mock ${id} wasn't resolved. This is probably a Vitest error. Please, open a new issue with reproduction.`);return mock.cache}async invalidate(){const ids=Array.from(this.mockedIds);ids.length&&(await this.rpc.invalidate(ids),await this.interceptor.invalidate(),this.registry.clear())}async importActual(id,importer){const resolved=await this.rpc.resolveId(id,importer);if(null==resolved)throw new Error(`[vitest] Cannot resolve "${id}" imported from "${importer}"`);const ext=extname(resolved.id),url=new URL(resolved.url,location.href),query=`_vitest_original&ext${ext}`,actualUrl=`${url.pathname}${url.search?`${url.search}&${query}`:`?${query}`}${url.hash}`;return this.wrapDynamicImport(()=>import(actualUrl)).then(mod=>{if(!resolved.optimized||void 0===mod.default)return mod;const m=mod.default;return(null==m?void 0:m.__esModule)?m:{..."object"==typeof m&&!Array.isArray(m)||"function"==typeof m?m:{},default:m}})}async importMock(rawId,importer){await this.prepare();const{resolvedId,resolvedUrl,redirectUrl}=await this.rpc.resolveMock(rawId,importer,{mock:"auto"}),mockUrl=this.resolveMockPath(cleanVersion(resolvedUrl));let mock=this.registry.get(mockUrl);if(!mock)if(redirectUrl){const resolvedRedirect=new URL(this.resolveMockPath(cleanVersion(redirectUrl)),location.href).toString();mock=new RedirectedModule(rawId,resolvedId,mockUrl,resolvedRedirect)}else mock=new AutomockedModule(rawId,resolvedId,mockUrl);if("manual"===mock.type)return await mock.resolve();if("automock"===mock.type||"autospy"===mock.type){const url=new URL(`/@id/${resolvedId}`,location.href),query=url.search?`${url.search}&t=${now()}`:`?t=${now()}`,moduleObject=await import(`${url.pathname}${query}&mock=${mock.type}${url.hash}`);return this.mockObject(moduleObject,mock.type)}return import(mock.redirect)}mockObject(object,moduleType="automock"){return mockObject({globalConstructors:{Object,Function,Array,Map,RegExp},spyOn:this.spyOn,type:moduleType},object)}queueMock(rawId,importer,factoryOrOptions){const promise=this.rpc.resolveMock(rawId,importer,{mock:"function"==typeof factoryOrOptions?"factory":(null==factoryOrOptions?void 0:factoryOrOptions.spy)?"spy":"auto"}).then(async({redirectUrl,resolvedId,resolvedUrl,needsInterop,mockType})=>{const mockUrl=this.resolveMockPath(cleanVersion(resolvedUrl));this.mockedIds.add(resolvedId);const factory="function"==typeof factoryOrOptions?async()=>{const data=await factoryOrOptions();return needsInterop?{default:data}:data}:void 0,mockRedirect="string"==typeof redirectUrl?new URL(this.resolveMockPath(cleanVersion(redirectUrl)),location.href).toString():null;let module;module="manual"===mockType?this.registry.register("manual",rawId,resolvedId,mockUrl,factory):"autospy"===mockType?this.registry.register("autospy",rawId,resolvedId,mockUrl):"redirect"===mockType?this.registry.register("redirect",rawId,resolvedId,mockUrl,mockRedirect):this.registry.register("automock",rawId,resolvedId,mockUrl),await this.interceptor.register(module)}).finally(()=>{this.queue.delete(promise)});this.queue.add(promise)}queueUnmock(id,importer){const promise=this.rpc.resolveId(id,importer).then(async resolved=>{if(!resolved)return;const mockUrl=this.resolveMockPath(cleanVersion(resolved.url));this.mockedIds.add(resolved.id),this.registry.delete(mockUrl),await this.interceptor.delete(mockUrl)}).finally(()=>{this.queue.delete(promise)});this.queue.add(promise)}wrapDynamicImport(moduleFactory){if("function"==typeof moduleFactory){return new Promise((resolve2,reject)=>{this.prepare().finally(()=>{moduleFactory().then(resolve2,reject)})})}return moduleFactory}resolveMockPath(path){const config=this.config,fsRoot=join("/@fs/",config.root);return path.startsWith(config.root)?path.slice(config.root.length):path.startsWith(fsRoot)?path.slice(fsRoot.length):path}},versionRegexp=/(\?|&)v=\w{8}/;function cleanVersion(url){return url.replace(versionRegexp,"")}var ModuleMockerInterceptor=class{constructor(){__publicField(this,"mocks",new MockerRegistry)}async register(module){this.mocks.add(module)}async delete(url){this.mocks.delete(url)}async invalidate(){this.mocks.clear()}},rpc=method=>{switch(method){case"resolveId":return Promise.resolve({id:"",url:"",optimized:!1});case"resolveMock":return Promise.resolve({mockType:"dummy",resolvedId:"",resolvedUrl:"",redirectUrl:"",needsInterop:!1});case"invalidate":return Promise.resolve()}},BuildModuleMocker=class extends ModuleMocker{queueMock(){}};function registerModuleMocker(interceptor){const mocker=new BuildModuleMocker(interceptor("__vitest_mocker__"),{resolveId:(id,importer)=>rpc("resolveId",{id,importer}),resolveMock:(id,importer,options)=>rpc("resolveMock",{id,importer,options}),invalidate:async ids=>rpc("invalidate",{ids})},(...args)=>globalThis.__STORYBOOK_MODULE_TEST__.spyOn(...args),{root:""});return globalThis.__vitest_mocker__=mocker,createCompilerHints({globalThisKey:"__vitest_mocker__"})}globalThis.__STORYBOOK_MOCKER__=registerModuleMocker(()=>new ModuleMockerInterceptor);export{ModuleMockerInterceptor};

Youez - 2016 - github.com/yon3zu
LinuXploit