@fabiocv/mcp 0.6.3 → 0.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/stdio.js +1 -1
  2. package/package.json +4 -4
package/dist/stdio.js CHANGED
@@ -78,7 +78,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
78
78
  `)}async close(){if(!this._closed){if(this._closed=!0,this._abortCleanup?.(),this._abortCleanup=void 0,this._sse?.keepAliveTimer!==void 0&&clearInterval(this._sse.keepAliveTimer),this._sse!==void 0&&!this._sse.closed){this._sse.closed=!0;try{this._sse.controller.close()}catch{}}this._deferredResponse!==void 0&&!this._deferredResponse.settled&&(this._deferredResponse.settled=!0,this._deferredResponse.reject(new ve(ke.ConnectionClosed,"Connection closed before a response was produced"))),this.onclose?.()}}settleResponse(e){this._deferredResponse===void 0||this._deferredResponse.settled||(this._deferredResponse.settled=!0,this._deferredResponse.resolve(e))}upgradeToSse(){let e,t=new ReadableStream({start:r=>{e=r},cancel:()=>{this.close()}});this._sse={controller:e,encoder:new TextEncoder,closed:!1},this._sse.keepAliveTimer=g1(this._keepAliveMs,()=>this.writeCommentFrame("keepalive")),this.settleResponse(new Response(t,{status:200,headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive","X-Accel-Buffering":"no"}}))}finalizeStream(){if(this._sse?.keepAliveTimer!==void 0&&clearInterval(this._sse.keepAliveTimer),this._sse!==void 0&&!this._sse.closed){this._sse.closed=!0;try{this._sse.controller.close()}catch{}}queueMicrotask(()=>{this.close()})}writeMessageFrame(e){this.writeFrame(`event: message
79
79
  data: ${JSON.stringify(e)}
80
80
 
81
- `)}writeFrame(e){if(!(this._sse===void 0||this._sse.closed))try{this._sse.controller.enqueue(this._sse.encoder.encode(e))}catch(t){this.onerror?.(new Error(`Failed to write to the response stream: ${t}`))}}};function uC(e){return e instanceof Q0?W0(e):void 0}function dC(e){return typeof e=="object"&&e!==null&&"setScopeChallengeResolver"in e&&typeof e.setScopeChallengeResolver=="function"}var pC=8,mC=6e5;function fC(e){if(e?.maxRounds!==void 0&&(!Number.isInteger(e.maxRounds)||e.maxRounds<1))throw new RangeError(`inputRequired.maxRounds must be a positive integer (got ${e.maxRounds})`);if(e?.roundTimeoutMs!==void 0&&(!Number.isFinite(e.roundTimeoutMs)||e.roundTimeoutMs<=0))throw new RangeError(`inputRequired.roundTimeoutMs must be a positive number (got ${e.roundTimeoutMs})`);return{maxRounds:e?.maxRounds??pC,roundTimeoutMs:e?.roundTimeoutMs??mC,legacyShim:e?.legacyShim??!0}}function X0(e,t,r){if(r===null||typeof r!="object"||typeof r.method!="string")throw new de(ee.InternalError,`Handler for ${e} returned an invalid input request '${t}': each inputRequests entry must be an embedded elicitation/create, sampling/createMessage, or roots/list request`);let i=r,n=FS(i);if(n===void 0)throw new de(ee.InternalError,`Handler for ${e} returned an input request '${t}' of kind '${i.method}', which is not an embedded request the 2026-07-28 revision defines`);return{embedded:i,required:n}}function hC(){let e=globalThis.crypto;if(e?.randomUUID!==void 0)return e.randomUUID();let t=new Uint8Array(16);e.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128;let r=[...t].map(i=>i.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`}function m1(e,t){if(e==="tools/call")return{content:[{type:"text",text:t}],isError:!0};throw new de(ee.InternalError,t)}var gC=class{constructor(e){this._host=e}async fulfill(e,t,r,i,n){let{maxRounds:o,roundTimeoutMs:a}=this._host,s=i.mcpReq.signal,c=n,l=0;for(;;){if(l+=1,l>o)return m1(e,d0(e,o));let u=c.inputRequests,d=u!=null&&Object.keys(u).length>0,f=typeof c.requestState=="string"?c.requestState:void 0;if(!d&&f===void 0)throw new de(ee.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);let h;if(d){let S=this._host.resolvedClientCapabilities(i),y=[];for(let[k,I]of Object.entries(u)){let{embedded:O,required:T}=X0(e,k,I);if(O.method!=="roots/list"&&O.params===void 0)throw new de(ee.InternalError,`Handler for ${e} returned an input request '${k}' of kind '${O.method}' without params`);if(fd(T,S)!==void 0)return m1(e,`Cannot request input '${k}' (${O.method}): the client on this 2025-era connection did not declare the required capability${S===void 0?" (no client capabilities are available on this connection \u2014 per-request legacy serving cannot receive server-to-client requests)":""}`);y.push([k,O])}let x=m0(s);try{let k={relatedRequestId:i.mcpReq.id,timeout:a,resetTimeoutOnProgress:!0,onprogress:()=>{},signal:x.signal},I=await Promise.all(y.map(async([O,T])=>{try{return[O,await this._dispatchLeg(T,k)]}catch(_){throw x.abort(_),_}}));h=Object.fromEntries(I)}catch(k){if(s.aborted)throw k;return m1(e,`Fulfilling input required by '${e}' failed: ${k instanceof Error?k.message:String(k)}`)}finally{x.dispose()}}else await p0(u0,s);let g={...i,mcpReq:{...i.mcpReq,inputResponses:h,droppedInputResponseKeys:void 0,requestState:Ga(f)}};if(f!==void 0){let S=await this._host.verifyRequestState(f,g,e);S!==void 0&&(g=Yv(g,S))}let b=await t(r,g);if(!cn(b))return b;c=b}}async _dispatchLeg(e,t){switch(e.method){case"elicitation/create":{let r=e.params;return r.mode==="url"&&r.elicitationId===void 0&&(r={...r,elicitationId:hC()}),await this._host.sendElicitation(r,t)}case"sampling/createMessage":return await this._host.sendSampling(e.params,t);case"roots/list":return await this._host.listRoots(e.params,t)}}},vC=new Set(["tools/call","prompts/get","resources/read"]),yC,Y0,ek;function v1(e,t){Y0(e,t)}function y1(e){return ek(e)}var tk=class extends t1{_clientCapabilities;_clientVersion;static{yC=(e,t)=>{t.clientCapabilities!==void 0&&(e._clientCapabilities=t.clientCapabilities),t.clientInfo!==void 0&&(e._clientVersion=t.clientInfo)},Y0=(e,t)=>{let r=t.filter(i=>!e._supportedProtocolVersions.includes(i));r.length>0&&(e._supportedProtocolVersions=[...e._supportedProtocolVersions,...r]),e.setRequestHandler("server/discover",()=>e._ondiscover())},ek=e=>e._serverInfo}_capabilities;_instructions;_jsonSchemaValidator;_cacheHints;_requestStateVerify;_inputRequiredServing;_legacyShim;_boundFromTransport=!1;_legacyInputRequiredShim(){return this._legacyShim??=new gC({maxRounds:this._inputRequiredServing.maxRounds,roundTimeoutMs:this._inputRequiredServing.roundTimeoutMs,resolvedClientCapabilities:e=>this._inputRequestCapabilityView(e),verifyRequestState:(e,t,r)=>this._verifyRequestState(e,t,r),sendElicitation:(e,t)=>this._sendElicitationLeg(e,t,{validateAcceptedContent:!1}),sendSampling:(e,t)=>this.createMessage(e,t),listRoots:(e,t)=>this.listRoots(e,t)})}oninitialized;constructor(e,t){if(super(t),this._serverInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._instructions=t?.instructions,this._jsonSchemaValidator=t?.jsonSchemaValidator??new Cd,this._requestStateVerify=t?.requestState?.verify,this._inputRequiredServing=fC(t?.inputRequired),t?.cacheHints!==void 0){for(let[r,i]of Object.entries(t.cacheHints))i!==void 0&&Zv(i,`cacheHints['${r}']`);this._cacheHints=t.cacheHints}this.setRequestHandler("initialize",r=>this._oninitialize(r)),this.setNotificationHandler("notifications/initialized",()=>this.oninitialized?.()),hd(this._supportedProtocolVersions).length>0&&this.setRequestHandler("server/discover",()=>this._ondiscover()),this._capabilities.logging&&this._registerLoggingHandler()}async connect(e){if(this.transport!==void 0)throw new ve(ke.AlreadyConnected,"Use a separate Server instance per connection: this instance is already connected to a transport. To connect it to a new transport, call close() first.");this._boundFromTransport&&(this._boundFromTransport=!1,this._negotiatedProtocolVersion=void 0);let t=uC(e)?.revision;t!==void 0&&!this._servedModernEra()&&Gt.includes(t)&&hd(this._supportedProtocolVersions).includes(t)&&(this._negotiatedProtocolVersion=t,this._boundFromTransport=!0),await super.connect(e)}_registerLoggingHandler(){this.setRequestHandler("logging/setLevel",async(e,t)=>{let r=t.sessionId||t.http?.req?.headers.get("mcp-session-id")||void 0,{level:i}=e.params,n=kd(An,i);return n.success&&this._loggingLevels.set(r,n.data),{}})}buildContext(e,t){let r=e.http||t?.request||t?.closeSSEStream||t?.closeStandaloneSSEStream;return{...e,mcpReq:{...e.mcpReq,log:(i,n,o)=>{if(!this._capabilities.logging)return Promise.resolve();let a;if(this._servedModernEra()){if(a=e.mcpReq.envelope?.[Cn],a===void 0)return Promise.resolve()}else a=this._loggingLevels.get(e.sessionId)??this._loggingLevels.get(void 0);return a!==void 0&&this.LOG_LEVEL_SEVERITY.get(i)<this.LOG_LEVEL_SEVERITY.get(a)?Promise.resolve():e.mcpReq.notify({method:"notifications/message",params:{level:i,data:n,logger:o}})},elicitInput:(i,n)=>this.elicitInput(i,n),requestSampling:(i,n)=>this.createMessage(i,n)},http:r?{...e.http,req:t?.request,closeSSE:t?.closeSSEStream,closeStandaloneSSE:t?.closeStandaloneSSEStream}:void 0}}_loggingLevels=new Map;LOG_LEVEL_SEVERITY=new Map(An.options.map((e,t)=>[e,t]));isMessageIgnored=(e,t)=>{let r=this._loggingLevels.get(t);return r?this.LOG_LEVEL_SEVERITY.get(e)<this.LOG_LEVEL_SEVERITY.get(r):!1};registerCapabilities(e){if(this.transport)throw new ve(ke.AlreadyConnected,"Cannot register capabilities after connecting to transport");let t=!!this._capabilities.logging;this._capabilities=n1(this._capabilities,e),!t&&this._capabilities.logging&&this._registerLoggingHandler()}_wrapHandler(e,t){if(e!=="tools/call"){let r=this._cacheHints?.[e],i=vC.has(e);return r===void 0&&!i?async(n,o)=>{let a=await t(n,o);if(cn(a))throw new de(ee.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return a}:async(n,o)=>{let a=i?await this._invokeInputRequiredCapableHandler(e,t,n,o):await t(n,o);if(cn(a)){if(!i)throw new de(ee.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return a}return r===void 0?a:gd(a,r)}}return async(r,i)=>{let n=sn(this._negotiatedProtocolVersion),o=n.validateRequest("tools/call",r);if(!o.ok)throw new de(o.reason==="not-in-era"?ee.InternalError:ee.InvalidParams,o.reason==="not-in-era"?"No wire schema for tools/call in the resolved era":`Invalid tools/call request: ${o.message}`);let a=await this._invokeInputRequiredCapableHandler("tools/call",t,r,i);if(cn(a))return a;let s=qv(a),c=n.validateResult("tools/call",s);if(!c.ok)throw new de(c.reason==="not-in-era"?ee.InternalError:ee.InvalidParams,c.reason==="not-in-era"?"No wire schema for tools/call in the resolved era":`Invalid tools/call result: ${c.message}`);return c.value}}_servedModernEra(){return this._negotiatedProtocolVersion!==void 0&&Ao(this._negotiatedProtocolVersion)}async _invokeInputRequiredCapableHandler(e,t,r,i){let n=this._servedModernEra(),o=i.mcpReq.requestState();if(o!==void 0&&typeof o!="string")throw new de(ee.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"});let a=i;if(typeof o=="string"){let d=await this._verifyRequestState(o,i,e);d!==void 0&&(a=Yv(i,d))}let s;try{s=await t(r,a)}catch(d){throw d instanceof de&&d.code===ee.UrlElicitationRequired&&n?new de(ee.InternalError,`URL elicitation cannot be signalled by throwing UrlElicitationRequiredError on protocol revision ${this._negotiatedProtocolVersion}: return inputRequired({ inputRequests: { \u2026: inputRequired.elicitUrl(...) } }) from the handler instead. The urlElicitationRequired error (-32042) of earlier revisions is not available on this revision.`):d}if(!cn(s))return s;if(!n){if(!this._inputRequiredServing.legacyShim)throw new de(ee.InternalError,`Handler for ${e} returned an input-required result, but this request is served on protocol revision ${this._negotiatedProtocolVersion??fr}, which has no input_required vocabulary`);return await this._legacyInputRequiredShim().fulfill(e,t,r,a,s)}let c=s.inputRequests,l=c!=null&&Object.keys(c).length>0,u=typeof s.requestState=="string";if(!l&&!u)throw new de(ee.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);if(l){let d=this._inputRequestCapabilityView(i);for(let[f,h]of Object.entries(c)){let{embedded:g,required:b}=X0(e,f,h),S=fd(b,d);if(S!==void 0)throw new yd({requiredCapabilities:S},`Cannot request input '${f}' (${g.method}): the request's client capabilities do not declare the required capability`)}}return s}async _verifyRequestState(e,t,r){if(this._requestStateVerify!==void 0)try{return await this._requestStateVerify(e,t)}catch(i){throw this.onerror?.(new Error(`requestState verification rejected ${r}: ${i instanceof Error?i.message:String(i)}`)),new de(ee.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"})}}_inputRequestCapabilityView(e){return this._servedModernEra()?e.mcpReq.envelope?.[on]:this._clientCapabilities}_assertPushApiInServedEra(e){if(this._servedModernEra())throw new ve(ke.MethodNotSupportedByProtocolVersion,`Server-to-client requests are not available on protocol revision ${this._negotiatedProtocolVersion}: '${e}' cannot be sent while serving a request on that revision. Return inputRequired({ ... }) from the handler instead \u2014 the client fulfils the embedded requests and retries the original request (multi round-trip requests).`,{method:e,era:"2026-07-28"})}assertCapabilityForMethod(e){switch(e){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new ve(ke.CapabilityNotSupported,`Client does not support sampling (required for ${e})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new ve(ke.CapabilityNotSupported,`Client does not support elicitation (required for ${e})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new ve(ke.CapabilityNotSupported,`Client does not support listing roots (required for ${e})`);break;case"ping":break}}assertNotificationCapability(e){switch(e){case"notifications/message":if(!this._capabilities.logging)throw new ve(ke.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new ve(ke.CapabilityNotSupported,`Server does not support notifying about resources (required for ${e})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new ve(ke.CapabilityNotSupported,`Server does not support notifying of tool list changes (required for ${e})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new ve(ke.CapabilityNotSupported,`Server does not support notifying of prompt list changes (required for ${e})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new ve(ke.CapabilityNotSupported,`Client does not support URL elicitation (required for ${e})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(e){switch(e){case"completion/complete":if(!this._capabilities.completions)throw new ve(ke.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new ve(ke.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new ve(ke.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new ve(ke.CapabilityNotSupported,`Server does not support resources (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new ve(ke.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;case"ping":case"initialize":break}}async _oninitialize(e){let t=e.params.protocolVersion;this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo;let r=ZS(this._supportedProtocolVersions),i=r.includes(t)?t:r[0]??fr;return this._negotiatedProtocolVersion=i,this.transport?.setProtocolVersion?.(i),{protocolVersion:i,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}_ondiscover(){return{supportedVersions:hd(this._supportedProtocolVersions),capabilities:bC(this.getCapabilities()),...this._instructions&&{instructions:this._instructions}}}_outboundServerInfo(){return this._serverInfo}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}projectCallToolResult(e,t){return this._wireCodec().projectCallToolResult(e,t)}getCapabilities(){return this._capabilities}async ping(){return this._assertPushApiInServedEra("ping"),this.request({method:"ping"})}async createMessage(e,t){if(this._assertPushApiInServedEra("sampling/createMessage"),(e.tools||e.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new ve(ke.CapabilityNotSupported,"Client does not support sampling tools capability.");if(e.messages.length>0){let o=e.messages.at(-1),a=Array.isArray(o.content)?o.content:[o.content],s=a.some(d=>d.type==="tool_result"),c=e.messages.length>1?e.messages.at(-2):void 0,l=c?Array.isArray(c.content)?c.content:[c.content]:[],u=l.some(d=>d.type==="tool_use");if(s){if(a.some(d=>d.type!=="tool_result"))throw new de(ee.InvalidParams,"The last message must contain only tool_result content if any is present");if(!u)throw new de(ee.InvalidParams,"tool_result blocks are not matching any tool_use from the previous message")}if(u){let d=new Set(l.filter(h=>h.type==="tool_use").map(h=>h.id)),f=new Set(a.filter(h=>h.type==="tool_result").map(h=>h.toolUseId));if(d.size!==f.size||![...d].every(h=>f.has(h)))throw new de(ee.InvalidParams,"ids of tool_result blocks and tool_use blocks from previous message do not match")}}let r=!!(e.tools||e.toolChoice),i=await this.request({method:"sampling/createMessage",params:e},t),n=this._wireCodec().samplingResultVariant(r,i);if(!n.ok)throw new ve(ke.InvalidResult,`Invalid sampling/createMessage result: ${n.reason==="invalid"?n.message:n.reason}`);return n.value}async elicitInput(e,t){switch(this._assertPushApiInServedEra("elicitation/create"),e.mode??"form"){case"url":if(!this._clientCapabilities?.elicitation?.url)throw new ve(ke.CapabilityNotSupported,"Client does not support url elicitation.");break;case"form":if(!this._clientCapabilities?.elicitation?.form)throw new ve(ke.CapabilityNotSupported,"Client does not support form elicitation.");break}return this._sendElicitationLeg(e,t)}async _sendElicitationLeg(e,t,r){let i=e.mode??"form",n=r?.validateAcceptedContent??!0;switch(i){case"url":{let o=e;return this.request({method:"elicitation/create",params:o},t)}case"form":{let o=e.mode==="form"?e:{...e,mode:"form"},a=await this.request({method:"elicitation/create",params:o},t);if(n&&a.action==="accept"&&a.content&&o.requestedSchema)try{let s=this._jsonSchemaValidator.getValidator(o.requestedSchema)(a.content);if(!s.valid)throw new de(ee.InvalidParams,`Elicitation response content does not match requested schema: ${s.errorMessage}`)}catch(s){throw s instanceof de?s:new de(ee.InternalError,`Error validating elicitation response: ${s instanceof Error?s.message:String(s)}`)}return a}}}createElicitationCompletionNotifier(e,t){if(!this._clientCapabilities?.elicitation?.url)throw new ve(ke.CapabilityNotSupported,"Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:e}},t)}async listRoots(e,t){return this._assertPushApiInServedEra("roots/list"),this.request({method:"roots/list",params:e},t)}async sendLoggingMessage(e,t){if(this._capabilities.logging&&!this.isMessageIgnored(e.level,t))return this.notification({method:"notifications/message",params:e})}async sendResourceUpdated(e){return this.notification({method:"notifications/resources/updated",params:e})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}};function bC(e){return{...e}}function _C(e,t){let r=0,i=[e];for(;i.length>0;){let n=i.pop();if(!(n===null||typeof n!="object"))if(Array.isArray(n))for(let o of n){if(++r>t)return r;o!==null&&typeof o=="object"&&i.push(o)}else for(let o in n){if(!Object.prototype.hasOwnProperty.call(n,o))continue;if(++r>t)return r;let a=n[o];a!==null&&typeof a=="object"&&i.push(a)}}return r}function SC(e){if(!(e===void 0||e===1/0)){if(typeof e!="number"||Number.isNaN(e)||e<1)throw new RangeError(`maxToolInputElements must be a number of at least 1, or Infinity, got ${String(e)}`);return e}}var Ka=class{server;_maxToolInputElements;_registeredResources={};_registeredResourceTemplates={};_registeredTools={};_registeredPrompts={};_toolInputSchemaJson={};toolInputSchemaJson(e){let t=this._registeredTools[e];if(!(t===void 0||!t.enabled)){if(Object.hasOwn(this._toolInputSchemaJson,e))return this._toolInputSchemaJson[e];if(t.inputSchema===void 0)return V0;try{let r=kr(t.inputSchema,"input");return this._toolInputSchemaJson[e]=r,r}catch{return}}}constructor(e,t){this.server=new tk(e,t),this._maxToolInputElements=SC(t?.maxToolInputElements),t?.capabilities?.tools&&this.setToolRequestHandlers(),t?.capabilities?.resources&&this.setResourceRequestHandlers(),t?.capabilities?.prompts&&this.setPromptRequestHandlers()}async connect(e){return dC(e)&&e.setScopeChallengeResolver(t=>this.resolveScopeChallenge(t)),await this.server.connect(e)}async close(){await this.server.close()}resolveScopeChallenge=e=>{switch(e.request.method){case"tools/call":{let t=e.request.params?.name;if(typeof t!="string")return;let r=this._registeredTools[t];return r===void 0||!r.enabled?void 0:r.scopeChallenge?.(e)}case"resources/read":{let t=e.request.params?.uri;if(typeof t!="string")return;let r;try{r=new URL(t)}catch{return}let i=this._registeredResources[r.toString()];if(i!==void 0)return i.enabled?i.scopeChallenge?.(e):void 0;for(let n of Object.values(this._registeredResourceTemplates))if(n.resourceTemplate.uriTemplate.match(r.toString()))return n.enabled?n.scopeChallenge?.(e):void 0;return}case"prompts/get":{let t=e.request.params?.name;if(typeof t!="string")return;let r=this._registeredPrompts[t];return r===void 0||!r.enabled?void 0:r.scopeChallenge?.(e)}default:return}};_toolHandlersInitialized=!1;setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler("tools/list"),this.server.assertCanSetRequestHandler("tools/call"),this.server.registerCapabilities({tools:{listChanged:this.server.getCapabilities().tools?.listChanged??!0}}),this.server.setRequestHandler("tools/list",()=>({tools:Object.entries(this._registeredTools).filter(([,e])=>e.enabled).map(([e,t])=>{let r={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?kC(e,t.inputSchema):V0,annotations:t.annotations,icons:t.icons,execution:t.execution,_meta:t._meta};return t.outputSchema&&(r.outputSchema=kr(t.outputSchema,"output")),r})})),this.server.setRequestHandler("tools/call",async(e,t)=>{let r=this._registeredTools[e.params.name];if(!r)throw new de(ee.InvalidParams,`Tool ${e.params.name} not found`);if(!r.enabled)throw new de(ee.InvalidParams,`Tool ${e.params.name} disabled`);try{let i=await this.validateToolInput(r,e.params.arguments,e.params.name),n=await this.executeToolHandler(r,i,t);return await this.validateToolOutput(r,n,e.params.name),cn(n)?n:this.server.projectCallToolResult(n,r.outputSchemaJson)}catch(i){if(i instanceof de&&i.code===ee.UrlElicitationRequired)throw i;return this.createToolError(i instanceof Error?i.message:String(i))}}),this._toolHandlersInitialized=!0)}createToolError(e){return{content:[{type:"text",text:e}],isError:!0}}async validateToolInput(e,t,r){if(this._maxToolInputElements!==void 0&&_C(t,this._maxToolInputElements)>this._maxToolInputElements)throw new de(ee.InvalidParams,`Invalid arguments for tool ${r}: arguments contain more than the maximum of ${this._maxToolInputElements} elements`);if(!e.inputSchema)return;let i=await yr(e.inputSchema,t??{});if(!i.success)throw new de(ee.InvalidParams,`Input validation error: Invalid arguments for tool ${r}: ${i.error}`);return i.data}async validateToolOutput(e,t,r){if(!e.outputSchema||cn(t)||t.isError)return;if(t.structuredContent===void 0)throw new de(ee.InvalidParams,`Output validation error: Tool ${r} has an output schema but no structured content was provided`);let i=await yr(e.outputSchema,t.structuredContent);if(!i.success)throw new de(ee.InvalidParams,`Output validation error: Invalid structured content for tool ${r}: ${i.error}`)}async executeToolHandler(e,t,r){return e.executor(t,r)}_completionHandlerInitialized=!1;setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler("completion/complete"),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler("completion/complete",async e=>{switch(e.params.ref.type){case"ref/prompt":return Jv(e),this.handlePromptCompletion(e,e.params.ref);case"ref/resource":return Bv(e),this.handleResourceCompletion(e,e.params.ref);default:throw new de(ee.InvalidParams,`Invalid completion reference: ${e.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(e,t){let r=this._registeredPrompts[t.name];if(!r)throw new de(ee.InvalidParams,`Prompt ${t.name} not found`);if(!r.enabled)throw new de(ee.InvalidParams,`Prompt ${t.name} disabled`);if(!r.argsSchema)return Ba;let i=B0(J0(r.argsSchema)?.[e.params.argument.name]);if(!f1(i))return Ba;let n=cC(i);return n?G0(await n(e.params.argument.value,e.params.context)):Ba}async handleResourceCompletion(e,t){let r=Object.values(this._registeredResourceTemplates).find(n=>n.resourceTemplate.uriTemplate.toString()===t.uri);if(!r){if(this._registeredResources[t.uri])return Ba;throw new de(ee.InvalidParams,`Resource template ${e.params.ref.uri} not found`)}let i=r.resourceTemplate.completeCallback(e.params.argument.name);return i?G0(await i(e.params.argument.value,e.params.context)):Ba}_resourceHandlersInitialized=!1;setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler("resources/list"),this.server.assertCanSetRequestHandler("resources/templates/list"),this.server.assertCanSetRequestHandler("resources/read"),this.server.registerCapabilities({resources:{listChanged:this.server.getCapabilities().resources?.listChanged??!0}}),this.server.setRequestHandler("resources/list",async(e,t)=>{let r=Object.entries(this._registeredResources).filter(([n,o])=>o.enabled).map(([n,o])=>({uri:n,name:o.name,...o.metadata})),i=[];for(let n of Object.values(this._registeredResourceTemplates)){if(!n.resourceTemplate.listCallback)continue;let o=await n.resourceTemplate.listCallback(t);for(let a of o.resources)i.push({...n.metadata,...a})}return{resources:[...r,...i]}}),this.server.setRequestHandler("resources/templates/list",async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([e,t])=>({name:e,uriTemplate:t.resourceTemplate.uriTemplate.toString(),...t.metadata}))})),this.server.setRequestHandler("resources/read",async(e,t)=>{let r;try{r=new URL(e.params.uri)}catch{throw new de(ee.InvalidParams,`Resource URI ${e.params.uri} is invalid`,{uri:e.params.uri,reason:"invalid_uri"})}let i=this._registeredResources[r.toString()];if(i){if(!i.enabled)throw new de(ee.InvalidParams,`Resource ${r} disabled`);return gd(await i.readCallback(r,t),i.cacheHint)}for(let n of Object.values(this._registeredResourceTemplates)){let o=n.resourceTemplate.uriTemplate.match(r.toString());if(o){if(!n.enabled)throw new de(ee.InvalidParams,`Resource template ${n.resourceTemplate.uriTemplate} disabled`);return gd(await n.readCallback(r,o,t),n.cacheHint)}}throw new vd(e.params.uri)}),this._resourceHandlersInitialized=!0)}_promptHandlersInitialized=!1;setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler("prompts/list"),this.server.assertCanSetRequestHandler("prompts/get"),this.server.registerCapabilities({prompts:{listChanged:this.server.getCapabilities().prompts?.listChanged??!0}}),this.server.setRequestHandler("prompts/list",()=>({prompts:Object.entries(this._registeredPrompts).filter(([,e])=>e.enabled).map(([e,t])=>({name:e,title:t.title,description:t.description,arguments:t.argsSchema?l0(t.argsSchema):void 0,icons:t.icons,_meta:t._meta}))})),this.server.setRequestHandler("prompts/get",async(e,t)=>{let r=this._registeredPrompts[e.params.name];if(!r)throw new de(ee.InvalidParams,`Prompt ${e.params.name} not found`);if(!r.enabled)throw new de(ee.InvalidParams,`Prompt ${e.params.name} disabled`);return r.handler(e.params.arguments,t)}),this._promptHandlersInitialized=!0)}registerResource(e,t,r,i){let{cacheHint:n,scopeChallenge:o,...a}=r,s=a;if(n!==void 0&&Zv(n,`resource ${e}`),typeof t=="string"){if(this._registeredResources[t])throw new Error(`Resource ${t} is already registered`);let c=this._createRegisteredResource(e,r.title,t,s,o,i);return n!==void 0&&(c.cacheHint=n),this.setResourceRequestHandlers(),this.sendResourceListChanged(),c}else{if(this._registeredResourceTemplates[e])throw new Error(`Resource template ${e} is already registered`);let c=this._createRegisteredResourceTemplate(e,r.title,t,s,o,i);return n!==void 0&&(c.cacheHint=n),this.setResourceRequestHandlers(),this.sendResourceListChanged(),c}}_createRegisteredResource(e,t,r,i,n,o){let a={name:e,title:t,metadata:i,readCallback:o,scopeChallenge:n,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({uri:null}),update:s=>{s.uri!==void 0&&s.uri!==r&&(delete this._registeredResources[r],s.uri&&(this._registeredResources[s.uri]=a)),s.name!==void 0&&(a.name=s.name),s.metadata!==void 0&&(a.metadata=s.metadata),s.title!==void 0&&(a.title=s.title,a.metadata={...a.metadata,title:s.title}),s.callback!==void 0&&(a.readCallback=s.callback),s.scopeChallenge!==void 0&&(a.scopeChallenge=s.scopeChallenge===null?void 0:s.scopeChallenge),s.enabled!==void 0&&(a.enabled=s.enabled),this.sendResourceListChanged()}};return this._registeredResources[r]=a,a}_createRegisteredResourceTemplate(e,t,r,i,n,o){let a={resourceTemplate:r,title:t,metadata:i,readCallback:o,scopeChallenge:n,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({name:null}),update:c=>{c.name!==void 0&&c.name!==e&&(delete this._registeredResourceTemplates[e],c.name&&(this._registeredResourceTemplates[c.name]=a)),c.template!==void 0&&(a.resourceTemplate=c.template),c.metadata!==void 0&&(a.metadata=c.metadata),c.title!==void 0&&(a.title=c.title,a.metadata={...a.metadata,title:c.title}),c.callback!==void 0&&(a.readCallback=c.callback),c.scopeChallenge!==void 0&&(a.scopeChallenge=c.scopeChallenge===null?void 0:c.scopeChallenge),c.enabled!==void 0&&(a.enabled=c.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[e]=a;let s=r.uriTemplate.variableNames;return Array.isArray(s)&&s.some(c=>!!r.completeCallback(c))&&this.setCompletionRequestHandler(),a}_createRegisteredPrompt(e,t,r,i,n,o,a,s){let c=i,l=n,u={title:t,description:r,argsSchema:i,icons:o,scopeChallenge:a,_meta:s,handler:H0(e,i,n),enabled:!0,disable:()=>u.update({enabled:!1}),enable:()=>u.update({enabled:!0}),remove:()=>u.update({name:null}),update:d=>{d.name!==void 0&&d.name!==e&&(delete this._registeredPrompts[e],d.name&&(this._registeredPrompts[d.name]=u)),d.title!==void 0&&(u.title=d.title),d.description!==void 0&&(u.description=d.description),d.icons!==void 0&&(u.icons=d.icons),d.scopeChallenge!==void 0&&(u.scopeChallenge=d.scopeChallenge===null?void 0:d.scopeChallenge),d._meta!==void 0&&(u._meta=d._meta);let f=!1;d.argsSchema!==void 0&&(u.argsSchema=d.argsSchema,c=d.argsSchema,f=!0),d.callback!==void 0&&(l=d.callback,f=!0),f&&(u.handler=H0(e,c,l)),d.enabled!==void 0&&(u.enabled=d.enabled),this.sendPromptListChanged()}};if(this._registeredPrompts[e]=u,i){let d=J0(i);d&&Object.values(d).some(f=>f1(B0(f)))&&this.setCompletionRequestHandler()}return u}_createRegisteredTool(e,t,r,i,n,o,a,s,c,l,u){i1(e);let d=u,f,h={title:t,description:r,inputSchema:i,outputSchema:n,get outputSchemaJson(){return f??=Z0(h.outputSchema)},set outputSchemaJson(g){f=g},annotations:o,icons:a,execution:s,scopeChallenge:c,_meta:l,handler:u,executor:F0(i,u),enabled:!0,disable:()=>h.update({enabled:!1}),enable:()=>h.update({enabled:!0}),remove:()=>h.update({name:null}),update:g=>{g.name!==void 0&&g.name!==e&&(typeof g.name=="string"&&i1(g.name),delete this._registeredTools[e],delete this._toolInputSchemaJson[e],g.name&&(delete this._toolInputSchemaJson[g.name],this._registeredTools[g.name]=h,e=g.name)),g.title!==void 0&&(h.title=g.title),g.description!==void 0&&(h.description=g.description);let b=!1;g.paramsSchema!==void 0&&(h.inputSchema=g.paramsSchema,delete this._toolInputSchemaJson[e],b=!0),g.callback!==void 0&&(h.handler=g.callback,d=g.callback,b=!0),b&&(h.executor=F0(h.inputSchema,d)),g.outputSchema!==void 0&&(h.outputSchema=g.outputSchema,h.outputSchemaJson=Z0(g.outputSchema)),g.annotations!==void 0&&(h.annotations=g.annotations),g.icons!==void 0&&(h.icons=g.icons),g.scopeChallenge!==void 0&&(h.scopeChallenge=g.scopeChallenge===null?void 0:g.scopeChallenge),g._meta!==void 0&&(h._meta=g._meta),g.enabled!==void 0&&(h.enabled=g.enabled),this.sendToolListChanged()}};return this._registeredTools[e]=h,this.setToolRequestHandlers(),this.sendToolListChanged(),h}registerTool(e,t,r){if(this._registeredTools[e])throw new Error(`Tool ${e} is already registered`);let{title:i,description:n,inputSchema:o,outputSchema:a,annotations:s,icons:c,scopeChallenge:l,_meta:u}=t;return this._createRegisteredTool(e,i,n,wd(o),wd(a),s,c,void 0,l,u,r)}registerPrompt(e,t,r){if(this._registeredPrompts[e])throw new Error(`Prompt ${e} is already registered`);let{title:i,description:n,argsSchema:o,icons:a,scopeChallenge:s,_meta:c}=t,l=this._createRegisteredPrompt(e,i,n,wd(o),r,a,s,c);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),l}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(e,t){return this.server.sendLoggingMessage(e,t)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}};function F0(e,t){if(e){let i=t;return async(n,o)=>i(n,o)}let r=t;return async(i,n)=>r(n)}var V0={type:"object",properties:{}};function kC(e,t){let r=kr(t,"input"),i=Kv(r);return i.valid||console.warn(`[mcp-sdk] tool '${e}' carries an invalid x-mcp-header declaration and will be excluded by conforming Streamable HTTP clients: ${i.reason}`),r}function Z0(e){if(e!==void 0)try{return kr(e,"output")}catch{return}}function H0(e,t,r){if(t){let i=r;return async(n,o)=>{let a=await yr(t,n??{});if(!a.success)throw new de(ee.InvalidParams,`Invalid arguments for prompt ${e}: ${a.error}`);return i(a.data,o)}}else{let i=r;return async(n,o)=>i(o)}}function G0(e){return{completion:{values:e.map(String).slice(0,100),total:e.length,hasMore:e.length>100}}}var Ba={completion:{values:[],hasMore:!1}};function J0(e){let t=e;if(t.shape&&typeof t.shape=="object")return t.shape}function wC(e){return e?.type==="optional"}function B0(e){return wC(e)?e.def?.innerType??e:e}function $C(e,t){switch(t.kind){case"tools_list_changed":return e.toolsListChanged===!0;case"prompts_list_changed":return e.promptsListChanged===!0;case"resources_list_changed":return e.resourcesListChanged===!0;case"resource_updated":return e.resourceSubscriptions!==void 0&&e.resourceSubscriptions.includes(t.uri)}}function xC(e,t){let r={},i=n=>t===void 0||n===!0;return e.toolsListChanged===!0&&i(t?.tools?.listChanged)&&(r.toolsListChanged=!0),e.promptsListChanged===!0&&i(t?.prompts?.listChanged)&&(r.promptsListChanged=!0),e.resourcesListChanged===!0&&i(t?.resources?.listChanged)&&(r.resourcesListChanged=!0),e.resourceSubscriptions!==void 0&&e.resourceSubscriptions.length>0&&i(t?.resources?.subscribe)&&(r.resourceSubscriptions=[...e.resourceSubscriptions]),r}var Ed=1024;function nk(e,t){return{method:e.method,params:{...e.params,_meta:{...e.params?._meta,[hr]:t}}}}function TC(e){let t=sn(Ha).validateRequest("subscriptions/listen",e);return t.ok?t.value.params?.notifications:void 0}var RC=new Set(["notifications/tools/list_changed","notifications/prompts/list_changed","notifications/resources/list_changed","notifications/resources/updated"]),rk=class{_subs=new Map;_serverCapabilities;_serverInfo;constructor(e=Ed,t,r){this._maxSubscriptions=e,this._serverCapabilities=t,this._serverInfo=r}setServerCapabilities(e,t){this._serverCapabilities=e,t!==void 0&&(this._serverInfo=t)}has(e){return this._subs.has(e)}serve(e){if(this._serverCapabilities===void 0)throw new Error("StdioListenRouter.serve() called before setServerCapabilities(); refusing to honor a filter without capabilities");if(this._subs.size>=this._maxSubscriptions)return{jsonrpc:"2.0",id:e.id,error:{code:-32603,message:"Subscription limit reached"}};let t=TC(e);if(t===void 0)return{jsonrpc:"2.0",id:e.id,error:{code:-32602,message:"Invalid params: 'notifications' is required and must be a valid SubscriptionFilter"}};let r=xC(t,this._serverCapabilities);return this._subs.set(e.id,r),nk({method:"notifications/subscriptions/acknowledged",params:{notifications:r}},e.id)}cancel(e){return this._subs.delete(e)}routeOutbound(e){if(!RC.has(e.method))return"passthrough";let t=e.params?.uri,r=typeof t=="string"?t:void 0,i=IC(e.method,r),n=[];for(let[o,a]of this._subs)$C(a,i)&&n.push(nk({method:e.method,params:e.params??{}},o));return n}teardownAll(){let e=[];for(let t of this._subs.keys())e.push({jsonrpc:"2.0",id:t,result:{resultType:"complete",_meta:{[hr]:t,...this._serverInfo!==void 0&&{[Ht]:this._serverInfo}}}});return this._subs.clear(),e}};function IC(e,t){switch(e){case"notifications/tools/list_changed":return{kind:"tools_list_changed"};case"notifications/prompts/list_changed":return{kind:"prompts_list_changed"};case"notifications/resources/list_changed":return{kind:"resources_list_changed"};default:return{kind:"resource_updated",uri:t??""}}}var MA=4*1024*1024;var ok="https://cdn.jsdelivr.net";function ik(e,...t){let r=new Ka(e);for(let i of t)i(r);return r}function Pd(e,t){k1(e,t.name,t.uri,{description:t.description},()=>({contents:[{uri:t.uri,mimeType:Nd,text:t.html,_meta:{ui:{csp:{resourceDomains:[ok]}}}}]}))}var ak=[{id:"component-code",name:"Component Code",pkg:"@fabiocv/component-code-mcp",summary:"Code with live parameters that you can change and see the component update."},{id:"orbit",name:"Orbit",pkg:"@fabiocv/orbit-mcp",summary:"A one-button game to play while your agent works. Switch rings to miss the arcs ahead."}],sk={id:"mcp",name:"fabiocv",pkg:"@fabiocv/mcp",summary:"MCP Apps that show UI in your chat. Every tool in one server."};var ck=Symbol("swallowsErrorsAfterClose"),zC=class{_readBuffer;_started=!1;_closed=!1;constructor(e=p1.stdin,t=p1.stdout,r){this._stdin=e,this._stdout=t,this._readBuffer=new r1({maxBufferSize:r?.maxBufferSize})}onclose;onerror;onmessage;_ondata=e=>{try{this._readBuffer.append(e),this.processReadBuffer()}catch(t){this.onerror?.(t),this.close().catch(()=>{})}};_onerror=e=>{this.onerror?.(e)};_onstdouterror=e=>{this._closed||(this.onerror?.(e),this.close().catch(()=>{}))};_onstdinclose=()=>{this.close().catch(()=>{})};async start(){if(this._started)throw new Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=!0;for(let e of this._stdout.listeners("error"))e[ck]&&this._stdout.off("error",e);(this._stdin.readableEnded||this._stdin.destroyed)&&setImmediate(this._onstdinclose),this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror),this._stdin.on("end",this._onstdinclose),this._stdin.on("close",this._onstdinclose),this._stdout.on("error",this._onstdouterror)}processReadBuffer(){for(;;)try{let e=this._readBuffer.readMessage();if(e===null)break;this.onmessage?.(e)}catch(e){this.onerror?.(e)}}async close(){this._closed||(this._closed=!0,this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.off("end",this._onstdinclose),this._stdin.off("close",this._onstdinclose),this._onstdouterror[ck]=!0,this._stdin.listenerCount("data")===0&&this._stdin.pause(),this._readBuffer.clear(),this.onclose?.())}send(e){return this._closed?Promise.reject(new Error("StdioServerTransport is closed")):new Promise((t,r)=>{let i=o1(e),n=!1,o=s=>{n||(n=!0,this._stdout.off("error",o),this._stdout.off("drain",a),r(s))},a=()=>{n||(n=!0,this._stdout.off("error",o),this._stdout.off("drain",a),t())};if(this._stdout.once("error",o),this._stdout.write(i)){if(n)return;n=!0,this._stdout.off("error",o),t()}else n||this._stdout.once("drain",a)})}},lk=3e3,CC=class{onclose;onerror;onmessage;_closed=!1;_pendingRequests=new Set;_drainWaiters=[];constructor(e,t,r){this._wire=e,this._onInstanceClose=t,this._outboundIntercept=r}async start(){}async send(e,t){if(br(e)||Sr(e)){let{id:r}=e;r!==void 0&&this._settle(r)}if(!this._closed&&this._outboundIntercept?.(e)!=="handled")return this._wire.send(e,t)}setProtocolVersion=e=>{this._wire.setProtocolVersion?.(e)};deliver(e,t){if(!this._closed){if(_t(e))this._pendingRequests.add(e.id);else if(qn(e)&&e.method==="notifications/cancelled"){let r=e.params?.requestId;r!==void 0&&this._settle(r)}this.onmessage?.(e,t)}}async whenRequestsAnswered(e){return this._closed||this._pendingRequests.size===0?!0:await new Promise(t=>{let r=()=>{clearTimeout(i),t(!0)},i=setTimeout(()=>{this._drainWaiters=this._drainWaiters.filter(n=>n!==r),t(!1)},e);this._drainWaiters.push(r)})}async close(){if(!this._closed){this._closed=!0,this._pendingRequests.clear(),this._releaseDrainWaiters();try{this._onInstanceClose()}finally{this.onclose?.()}}}_settle(e){this._pendingRequests.delete(e),this._pendingRequests.size===0&&this._releaseDrainWaiters()}_releaseDrainWaiters(){let e=this._drainWaiters;this._drainWaiters=[];for(let t of e)t()}};function EC(e){let t=e.params;if(e.method==="initialize"&&!Wv(t)){let o=t!==null&&typeof t=="object"&&typeof t.protocolVersion=="string"?t.protocolVersion:void 0;return{kind:"legacy",reason:"initialize",...o!==void 0&&{requestedVersion:o}}}if(!bd(t))return{kind:"legacy",reason:"no-claim"};let r=_r(t),i=(r===void 0?[]:Sd(r))[0];if(i!==void 0)return{kind:"invalid-envelope",issue:i};let n=_d(t);return n===void 0||!Gt.includes(n)?{kind:"unsupported-revision",requested:n??"unknown"}:{kind:"modern",revision:n,classification:{era:"modern",revision:n}}}function uk(e,t={}){let r=t.legacy??"serve",i=t.transport??new zC,n={phase:"opening"},o,a=!1,s=()=>a||n.phase==="closed",c=R=>{try{t.onerror?.(R)}catch{}},l=(R,A,F,M)=>i.send({jsonrpc:"2.0",id:R,error:{code:A,message:F,...M!==void 0&&{data:M}}}).catch(V=>c(qt(V))),u=new rk(t.maxSubscriptions??Ed),d=R=>{if(!qn(R))return;let A=u.routeOutbound(R);if(A!=="passthrough"){for(let F of A)i.send({jsonrpc:"2.0",...F}).catch(M=>c(qt(M)));return"handled"}},f=async R=>{if(_t(R)&&R.method==="subscriptions/listen"){let A=_r(R.params),F=bd(R.params)?(A===void 0?[]:Sd(A))[0]:{key:"_meta",problem:"the per-request envelope is required on protocol revision 2026-07-28"},M=_d(R.params),V;if(F!==void 0)V={jsonrpc:"2.0",id:R.id,error:{code:-32602,message:`Invalid _meta envelope: ${F.key}: ${F.problem}`}};else if(M===void 0||!Gt.includes(M)){let te=new jo({supported:[...Gt],requested:M??"unknown"});V={jsonrpc:"2.0",id:R.id,error:{code:te.code,message:te.message,data:te.data}}}else V=u.serve(R);return await i.send("error"in V?V:{jsonrpc:"2.0",method:V.method,params:V.params}).catch(te=>c(qt(te))),!0}if(qn(R)&&R.method==="notifications/cancelled"){let A=R.params?.requestId;if(A!==void 0&&u.cancel(A))return!0}return!1},h=(R,A,F)=>{let M=Qv({kind:"legacy",reason:A,...F!==void 0&&{requestedVersion:F}},Gt);return M===void 0?Promise.resolve():(c(new Error(`Rejected 2025-era request on a modern-only stdio connection (${M.cell}): ${M.message}`)),l(R.id,M.code,M.message,M.data))},g=R=>{a||R===o||T()},b=async(R,A)=>{let F=await e({era:R}),M=F instanceof Ka?F.server:F;R==="modern"&&(e1(M,A),v1(M,Gt),u.setServerCapabilities(M.getCapabilities(),y1(M)));let V=new CC(i,()=>g(V),R==="modern"?d:void 0);return await F.connect(V),{product:F,channel:V}},S=R=>R.product.close().catch(A=>c(qt(A))),y=async R=>{o=R.channel;try{await R.channel.whenRequestsAnswered(lk)||c(new Error(`Discarded the probe instance with requests still unanswered after ${lk}ms; continuing with the fallback`)),await R.product.close()}catch(A){c(qt(A))}finally{o=void 0}},x=async R=>{if(n.phase==="closed")return;if(n.phase==="pinned"){if(n.era==="modern"&&_t(R)&&R.method==="initialize"&&!Wv(R.params)){await h(R,"initialize",R.params!==null&&typeof R.params=="object"&&typeof R.params.protocolVersion=="string"?R.params.protocolVersion:void 0);return}if(n.era==="modern"&&await f(R)||s())return;n.instance.channel.deliver(R);return}if(!_t(R)&&!qn(R)){c(new Error("Discarded a JSON-RPC response received before the connection negotiated an era"));return}let A=EC(R);switch(A.kind){case"invalid-envelope":{let F=`Invalid _meta envelope for protocol revision 2026-07-28: ${A.issue.key}: ${A.issue.problem}`;_t(R)?await l(R.id,ee.InvalidParams,F,{envelope:A.issue}):c(new Error(`Discarded a notification with a malformed envelope: ${F}`));return}case"unsupported-revision":if(_t(R)){let F=new jo({supported:[...Gt],requested:A.requested});c(F),await l(R.id,F.code,F.message,F.data)}else c(new Error(`Discarded a notification claiming unsupported protocol revision ${A.requested}`));return;case"modern":if(_t(R)&&R.method==="server/discover"){if(n.phase==="probe"){n.instance.channel.deliver(R,{classification:A.classification});return}let F=await b("modern",A.revision);if(s()){await S(F);return}n={phase:"probe",instance:F},F.channel.deliver(R,{classification:A.classification});return}if(n.phase==="probe"){if(qn(R)){n.instance.channel.deliver(R,{classification:A.classification});return}n={phase:"pinned",era:"modern",instance:n.instance}}else{let F=await b("modern",A.revision);if(s()){await S(F);return}n={phase:"pinned",era:"modern",instance:F}}if(await f(R)||s())return;n.instance.channel.deliver(R,{classification:A.classification});return;case"legacy":{if(r==="reject"){_t(R)&&await h(R,A.reason,A.requestedVersion);return}if(n.phase==="probe"){if(await y(n.instance),s())return;n={phase:"opening"}}let F=await b("legacy");if(s()){await S(F);return}n={phase:"pinned",era:"legacy",instance:F},n.instance.channel.deliver(R);return}}},k=[],I=!1,O=async()=>{if(!I){I=!0;try{for(;k.length>0;){let R=k.shift();try{await x(R)}catch(A){_t(R)&&await l(R.id,ee.InternalError,"Internal server error"),c(qt(A))}}}finally{I=!1}}},T=async()=>{if(a||n.phase==="closed")return;a=!0;let R=n;n={phase:"closed"};for(let A of u.teardownAll())await i.send(A).catch(F=>c(qt(F)));(R.phase==="probe"||R.phase==="pinned")&&await R.instance.product.close().catch(A=>c(qt(A))),await i.close().catch(A=>c(qt(A)))};i.onmessage=R=>{k.push(R),O()},i.onerror=R=>{c(R),(n.phase==="probe"||n.phase==="pinned")&&n.instance.channel.onerror?.(R)},i.onclose=()=>{if(a||n.phase==="closed")return;a=!0;let R=n;n={phase:"closed"},(R.phase==="probe"||R.phase==="pinned")&&R.instance.product.close().catch(A=>c(qt(A)))};let _=i.start().catch(R=>{throw c(qt(R)),R});return _.catch(()=>{}),{close:async()=>{await _.catch(()=>{}),await T()}}}function qt(e){return e instanceof Error?e:new Error(String(e))}var dk="0.6.3";var pk='<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n <title>Component Code</title>\n <style>\n @font-face {\n font-family: Geist;\n src: url(\'https://cdn.jsdelivr.net/npm/geist@1.9.2/dist/fonts/geist-sans/Geist-Variable.woff2\')\n format(\'woff2\');\n font-weight: 100 900;\n font-display: swap;\n }\n @font-face {\n font-family: \'Geist Mono\';\n src: url(\'https://cdn.jsdelivr.net/npm/geist@1.9.2/dist/fonts/geist-mono/GeistMono-Variable.woff2\')\n format(\'woff2\');\n font-weight: 100 900;\n font-display: swap;\n }\n body {\n margin: 0;\n padding: 1px;\n font-family: Geist, ui-sans-serif, system-ui, sans-serif;\n }\n </style>\n <script type="module" crossorigin>var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function ee(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var te=ee.prototype=new y;te.constructor=ee,g(te,v.prototype),te.isPureReactComponent=!0;var ne=Array.isArray;function re(){}var ie={H:null,A:null,T:null,S:null},ae=Object.prototype.hasOwnProperty;function oe(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function se(e,t){return oe(e.type,t,e.props)}function ce(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function le(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ue=/\\/+/g;function de(e,t){return typeof e==`object`&&e&&e.key!=null?le(``+e.key):t.toString(36)}function fe(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(re,re):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function pe(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,pe(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+de(e,0):a,ne(o)?(i=``,c!=null&&(i=c.replace(ue,`$&/`)+`/`),pe(o,r,i,``,function(e){return e})):o!=null&&(ce(o)&&(o=se(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ue,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(ne(e))for(var u=0;u<e.length;u++)a=e[u],s=l+de(a,u),c+=pe(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+de(a,u++),c+=pe(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return pe(fe(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function b(e,t,n){if(e==null)return e;var r=[],i=0;return pe(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function me(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var he=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ge={map:b,forEach:function(e,t,n){b(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return b(e,function(){t++}),t},toArray:function(e){return b(e,function(e){return e})||[]},only:function(e){if(!ce(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ge,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=ee,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ie,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return ie.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!ae.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return oe(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)ae.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return oe(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=ce,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:me}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=ie.T,n={};ie.T=n;try{var r=e(),i=ie.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(re,he)}catch(e){he(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),ie.T=t}},e.unstable_useCacheRefresh=function(){return ie.H.useCacheRefresh()},e.use=function(e){return ie.H.use(e)},e.useActionState=function(e,t,n){return ie.H.useActionState(e,t,n)},e.useCallback=function(e,t){return ie.H.useCallback(e,t)},e.useContext=function(e){return ie.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return ie.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return ie.H.useEffect(e,t)},e.useEffectEvent=function(e){return ie.H.useEffectEvent(e)},e.useId=function(){return ie.H.useId()},e.useImperativeHandle=function(e,t,n){return ie.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return ie.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return ie.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return ie.H.useMemo(e,t)},e.useOptimistic=function(e,t){return ie.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return ie.H.useReducer(e,t,n)},e.useRef=function(e){return ie.H.useRef(e)},e.useState=function(e){return ie.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return ie.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return ie.H.useTransition()},e.version=`19.2.7`})),u=o(((e,t)=>{t.exports=l()})),d=c(u(),1),f=Object.defineProperty,p=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),m=(e,t)=>{let n={};for(var r in e)f(n,r,{get:e[r],enumerable:!0});return t&&f(n,Symbol.toStringTag,{value:`Module`}),n},h=new Set([`https://json-schema.org/draft/2020-12/schema`,`http://json-schema.org/draft/2020-12/schema`]),g=new Set([`https://json-schema.org/draft/2019-09/schema`,`http://json-schema.org/draft/2019-09/schema`]),_=new Set([`https://json-schema.org/draft-07/schema`,`http://json-schema.org/draft-07/schema`]),v=new Set([`https://json-schema.org/draft-06/schema`,`http://json-schema.org/draft-06/schema`]);function y(e){return typeof e==`string`&&g.has(e.replace(/#$/,``))}function ee(e,t){if(!(`$schema`in e)||typeof e.$schema!=`string`)return`2020-12`;let n=e.$schema.replace(/#$/,``);if(h.has(n))return`2020-12`;if(g.has(n))return`2019-09`;if(_.has(n)||v.has(n))return`draft-7`;throw Error(`JSON Schema declares an unsupported dialect ("$schema": "${e.$schema.slice(0,200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${t}`)}function te(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function ne(e,t=`|`){return e.map(e=>Oe(e)).join(t)}function re(e,t){return typeof t==`bigint`?t.toString():t}var ie=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function ae(e){return new ie(e)}function oe(e){return e==null}function se(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ce(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var le=Symbol(`evaluating`);function ue(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==le)return r===void 0&&(r=le,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function de(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function fe(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function pe(e){return fe(e._zod.def)??e._zod.def.shape}function b(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return de(this,t,e),e},enumerable:!0,configurable:!0})}function me(e,t,n){t in e?de(e,t,n):e[t]=n}function he(e,t,n,r){let i=pe(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?b(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):me(e,a,r?r(n.value,a):n.value))}}function ge(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?b(e,n,()=>t[n]):me(e,n,r.value))}}function _e(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function ve(e){return JSON.stringify(e)}function ye(e){return e.toLowerCase().trim().replace(/[^\\w\\s-]/g,``).replace(/[\\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var be=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function xe(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Se=ae(()=>{if(vt.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Ce(e){if(xe(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(xe(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function we(e){return Ce(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Te=new Set([`string`,`number`,`symbol`]);function Ee(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,`\\\\$&`)}function De(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function x(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Oe(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function ke(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var Ae={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},je={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Me(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return he(i,e,Ne(e,t)),De(e,_e(n,{shape:i,checks:[]}))}function Ne(e,t){let n=pe(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function S(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(Ne(e,t)),a={};return he(a,e,Reflect.ownKeys(pe(e)).filter(e=>!i.has(e))),De(e,_e(n,{shape:a,checks:[]}))}function Pe(e,t){if(!Ce(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=pe(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return De(e,_e(e._zod.def,{shape:Fe(e,t)}))}function Fe(e,t){let n={};return he(n,e,Reflect.ownKeys(pe(e))),ge(n,t),n}function Ie(e,t){if(!Ce(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return De(e,_e(e._zod.def,{shape:Fe(e,t)}))}function Le(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return he(n,e,Reflect.ownKeys(pe(e))),he(n,t,Reflect.ownKeys(pe(t))),De(e,_e(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Re(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(Ne(t,n)):void 0,o={};return he(o,t,Reflect.ownKeys(pe(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),De(t,_e(t._zod.def,{shape:o,checks:[]}))}function ze(e,t,n){let r=n?new Set(Ne(t,n)):void 0,i={};return he(i,t,Reflect.ownKeys(pe(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),De(t,_e(t._zod.def,{shape:i}))}function Be(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Ve(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function He(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Ue(e){return typeof e==`string`?e:e?.message}function We(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function Ge(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function Ke(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:Ue(e.inst?._zod.def?.error?.(e))??Ue(a?.(e))??Ue(t?.error?.(e))??Ue(n.customError?.(e))??Ue(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t===`inst`||t===`schema`||t===`continue`||t===`input`||t===`__proto__`||(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var qe=/[\\uD800-\\uDBFF]/;function Je(e){let t=e.length;if(!qe.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function Ye(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Xe(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Ze(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Qe(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):nt(e,n,r.value)}}function $e(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function et(e,t,n){return $e(e,t,n,!1)}function tt(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return $e(this,n,r(this))},set(e){$e(this,n,e)}})}return t}function nt(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:$e(this,t,n.bind(this))},set(e){$e(this,t,e)}})}function rt(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var it,at=!1,ot={configurable:!0,get(){at=!0}};function st(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&it!==e._zod){it=void 0;return}it=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,ot);let e=at;at=!1;try{let r=n(this);return at?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),at||=e,r}catch(n){throw delete this[t],at||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function ct(e,t,n,r){let i=rt(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var lt=`~constantCatch`;function ut(e){let t=()=>e;return t[lt]=!0,t}var dt,ft=Object.freeze({status:`aborted`}),pt={value:void 0,enumerable:!1},mt=`captureStackTrace`in Error?Error:null;function ht(e){let t=mt;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return mt=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function C(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){pt.value=new a(r);try{Object.defineProperty(n,"_zod",pt)}finally{pt.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Qe(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?ht(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var gt=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},_t=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(dt=globalThis).__zod_globalConfig??(dt.__zod_globalConfig={});var vt=globalThis.__zod_globalConfig;function yt(e){return e&&Object.assign(vt,e),vt}function bt(){let e=this._zod;return e.message??=JSON.stringify(e.def,re,2),e.message}function xt(e){this._zod.message=e}var St={get:bt,set:xt,enumerable:!0,configurable:!0},Ct={value:void 0,enumerable:!1},wt=new WeakSet([Object.prototype,Error.prototype]),Tt=(e,t)=>{e.name=`$ZodError`,Ct.value=t,Object.defineProperty(e,"issues",Ct),Ct.value=void 0,Object.defineProperty(e,"message",St);let n=Object.getPrototypeOf(e);wt.has(n)||(wt.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},Et=C(`$ZodError`,Tt);C(`$ZodError`,Tt,void 0,{Parent:Error});function Dt(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Ot(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Dt(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function kt(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function At(e,t){return{callee:t?.callee??e,Err:t?.Err}}var jt=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new gt;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Ke(e,o,yt())));throw be(n,a?.callee??t),n}return s.value};return t},Mt=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Ke(e,o,yt())));throw be(n,a?.callee??t),n}return s.value};return t},Nt=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new gt;return a.issues.length?Pt(e,a.issues,i):{success:!0,data:a.value}};function Pt(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>Ke(e,n,yt()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var Ft=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?Pt(e,a.issues,i):{success:!0,data:a.value}},It=Symbol.for(`zod.compile.invalid`),Lt=Symbol.for(`zod.compile.fallback`),Rt=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==It)return!0;if(r.definite===!0&&n===void 0)return!1}return zt(e,t,n)});function zt(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[Lt]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new gt;return a.issues.length===0}var Bt=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},Vt=e=>{let t=jt(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,At(n,a))};return n},Ht=e=>{let t=jt(e),n=(e,r,i,a)=>t(e,r,i,At(n,a));return n},Ut=e=>{let t=Mt(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,At(n,a))};return n},Wt=e=>{let t=Mt(e),n=async(e,r,i,a)=>await t(e,r,i,At(n,a));return n},Gt=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Nt(e)(t,n,i)},Kt=e=>(t,n,r)=>Nt(e)(t,n,r),qt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ft(e)(t,n,i)},Jt=e=>async(t,n,r)=>Ft(e)(t,n,r),Yt=/^[cC][0-9a-z]{6,}$/,Xt=/^[0-9a-z]+$/,Zt=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Qt=/^[0-9a-vA-V]{20}$/,$t=/^[A-Za-z0-9]{27}$/,en=/^[a-zA-Z0-9_-]{21}$/;function tn(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var nn=/^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/,rn=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,an=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,on=/^(?:[A-Za-z0-9_\'+\\-]+\\.)*[A-Za-z0-9_\'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/,sn=`^(?=[\\\\s\\\\S]*[\\\\p{Extended_Pictographic}\\\\p{Regional_Indicator}\\\\u20E3])[\\\\p{Extended_Pictographic}\\\\p{Emoji_Component}]+$`;function cn(){return new RegExp(sn,`u`)}var ln=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,un=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,dn=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$/,fn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,pn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,mn=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,hn=/^https?$/,gn=/^\\+[1-9]\\d{6,14}$/,_n=`(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))`;function vn(e){return RegExp(`^${e}$`)}var yn=vn(_n);function bn(e){let t=`(?:[01]\\\\d|2[0-3]):[0-5]\\\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\\\d`:`${t}:[0-5]\\\\d\\\\.\\\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\\\d(?:\\\\.\\\\d+)?`:`${t}(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?`}function xn(e){return RegExp(`^${bn(e)}$`)}function Sn(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)`);let n=`${bn({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${bn({precision:e.precision})}`:n;return RegExp(`^${_n}T(?:${r})$`)}var Cn=/^[\\s\\S]{0,}$/,wn=/^-?\\d+$/,Tn=/^-?\\d+(?:\\.\\d+)?$/,En=/^(?:true|false)$/i,Dn=/^null$/i,On=/^undefined$/i,kn=/^[^A-Z]*$/,An=/^[^a-z]*$/,jn=C(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Mn=e=>{let t=e.value;return!oe(t)&&t.length!==void 0},Nn={number:`number`,bigint:`bigint`,object:`date`},Pn=C(`$ZodCheckLessThan`,(e,t)=>{jn.init(e,t);let n=Nn[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Nn[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Fn=C(`$ZodCheckGreaterThan`,(e,t)=>{jn.init(e,t);let n=Nn[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Nn[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),In=C(`$ZodCheckMultipleOf`,(e,t)=>{jn.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):ce(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Ln=C(`$ZodCheckNumberFormat`,(e,t)=>{jn.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Ae[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Rn=C(`$ZodCheckMaxLength`,(e,t)=>{var n;jn.init(e,t),(n=e._zod.def).when??(n.when=Mn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Je(r):i)<=t.maximum)return;let a=Ye(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),zn=C(`$ZodCheckMinLength`,(e,t)=>{var n;jn.init(e,t),(n=e._zod.def).when??(n.when=Mn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?Je(r):i)>=t.minimum)return;let a=Ye(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Bn=C(`$ZodCheckLengthEquals`,(e,t)=>{var n;jn.init(e,t),(n=e._zod.def).when??(n.when=Mn),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Je(r):i;if(a===t.length)return;let o=Ye(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Vn=C(`$ZodCheckStringFormat`,(e,t)=>{var n,r;jn.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Hn=C(`$ZodCheckRegex`,(e,t)=>{Vn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Un=C(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=kn,Vn.init(e,t)}),Wn=C(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=An,Vn.init(e,t)}),Gn=C(`$ZodCheckIncludes`,(e,t)=>{jn.init(e,t);let n=Ee(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Kn=C(`$ZodCheckStartsWith`,(e,t)=>{jn.init(e,t);let n=RegExp(`^${Ee(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),qn=C(`$ZodCheckEndsWith`,(e,t)=>{jn.init(e,t);let n=RegExp(`.*${Ee(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Jn=C(`$ZodCheckOverwrite`,(e,t)=>{jn.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Yn=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`\n`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\\n${t.join(`\n`)}\\n};`)(...Object.values(this.closed))}},Xn={major:4,minor:6,patch:7},Zn=C(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Xn;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=Be(t),a;for(let o of n){if(o._zod.def.when){if(Ve(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new gt;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Ge(t.issues,n,e),i||=Be(t,n))});else{if(t.issues.length===n)continue;Ge(t.issues,n,e),i||=Be(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(Be(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new gt;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new gt;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return et(this,`~standard`,er(this))},set"~standard"(e){$e(this,`~standard`,e)}}),Qn=(e,t)=>e.issues.length?{issues:e.issues.map(e=>Ke(e,t,yt()))}:{value:e.value};async function $n(e,t){let n={async:!0};return Qn(await e._zod.run({value:t,issues:[]},n),n)}function er(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Qn(r,n)}catch{}return $n(e,t)},vendor:`zod`,version:1}}var tr=C(`$ZodString`,(e,t)=>{Zn.init(e,t),e._zod.pattern=t.pattern??Cn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),nr=C(`$ZodStringFormat`,(e,t)=>{Vn.init(e,t),tr.init(e,t)}),rr=C(`$ZodGUID`,(e,t)=>{t.pattern??=rn,nr.init(e,t)}),ir=C(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=an(e)}else t.pattern??=an();nr.init(e,t)}),ar=C(`$ZodEmail`,(e,t)=>{t.pattern??=on,nr.init(e,t)});function or(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function sr(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?or(e)||2:cr(e,t)}function cr(e,t){if(!t.normalize&&t.protocol?.source===hn.source&&!/^https?:\\/\\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var lr=/[\\t\\n\\r]/g;function ur(e){return e.replace(lr,``)}function dr(e,t){return t.lastIndex=0,t.test(e.hostname)}function fr(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var pr=C(`$ZodURL`,(e,t)=>{nr.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=sr(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=ur(r);return}t.hostname&&!dr(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!fr(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:ur(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),mr=C(`$ZodEmoji`,(e,t)=>{t.pattern??=cn(),nr.init(e,t)}),hr=C(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?en:tn(t.length),nr.init(e,t)}),gr=C(`$ZodCUID`,(e,t)=>{t.pattern??=Yt,nr.init(e,t)}),_r=C(`$ZodCUID2`,(e,t)=>{t.pattern??=Xt,nr.init(e,t)}),vr=C(`$ZodULID`,(e,t)=>{t.pattern??=Zt,nr.init(e,t)}),yr=C(`$ZodXID`,(e,t)=>{t.pattern??=Qt,nr.init(e,t)}),br=C(`$ZodKSUID`,(e,t)=>{t.pattern??=$t,nr.init(e,t)}),xr=C(`$ZodISODateTime`,(e,t)=>{t.pattern??=Sn(t),nr.init(e,t)}),Sr=C(`$ZodISODate`,(e,t)=>{t.pattern??=yn,nr.init(e,t)}),Cr=C(`$ZodISOTime`,(e,t)=>{t.pattern??=xn(t),nr.init(e,t)}),wr=C(`$ZodISODuration`,(e,t)=>{t.pattern??=nn,nr.init(e,t)}),Tr=C(`$ZodIPv4`,(e,t)=>{t.pattern??=ln,nr.init(e,t)}),Er=/^[0-9a-fA-F:.]+$/;function Dr(e){return Er.test(e)?or(`http://[${e}]`):!1}var Or=C(`$ZodIPv6`,(e,t)=>{t.pattern??=un,nr.init(e,t),e._zod.check=n=>{Dr(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),kr=C(`$ZodCIDRv4`,(e,t)=>{t.pattern??=dn,nr.init(e,t)});function Ar(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:Dr(n)}var jr=C(`$ZodCIDRv6`,(e,t)=>{t.pattern??=fn,nr.init(e,t),e._zod.check=n=>{Ar(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function Mr(e){if(e===``)return!0;if(/\\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Nr=/^[0-9a-zA-Z+/]*={0,2}$/,Pr=C(`$ZodBase64`,(e,t)=>{t.pattern??=Nr,nr.init(e,t),e._zod.check=n=>{Mr(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),Fr=/^[A-Za-z0-9_-]*$/;function Ir(e){if(!Fr.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Mr(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Lr=C(`$ZodBase64URL`,(e,t)=>{t.pattern??=Fr,nr.init(e,t),e._zod.check=n=>{Ir(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Rr=C(`$ZodE164`,(e,t)=>{t.pattern??=gn,nr.init(e,t)});function zr(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Br=C(`$ZodJWT`,(e,t)=>{nr.init(e,t),e._zod.check=n=>{zr(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Vr=C(`$ZodNumber`,(e,t)=>{Zn.init(e,t),e._zod.pattern=Tn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Hr=C(`$ZodNumberFormat`,(e,t)=>{Ln.init(e,t),Vr.init(e,t)}),Ur=C(`$ZodBoolean`,(e,t)=>{Zn.init(e,t),e._zod.pattern=En,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Wr=C(`$ZodUndefined`,(e,t)=>{Zn.init(e,t),e._zod.pattern=On,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),Gr=C(`$ZodNull`,(e,t)=>{Zn.init(e,t),e._zod.pattern=Dn,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),Kr=C(`$ZodAny`,(e,t)=>{Zn.init(e,t),e._zod.parse=e=>e}),qr=C(`$ZodUnknown`,(e,t)=>{Zn.init(e,t),e._zod.parse=e=>e}),Jr=C(`$ZodNever`,(e,t)=>{Zn.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Yr(e,t){let n=We(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of We(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,Ge(n.issues,t,e),n}}return i(n,a)}}var Xr=e=>Array.isArray(e)?e.length:-1;function Zr(e,t,n){e.issues.length&&t.issues.push(...He(n,e.issues)),t.value[n]=e.value}var Qr=C(`$ZodArray`,(e,t)=>{Zn.init(e,t);let n=vt.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>Zr(t,r,e)));else if(Zr(c,r,e),s&&c.issues.length!==0&&Be(c))break}return o.length?Promise.all(o).then(()=>r):r},Yr(e,Xr)});function $r(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(!(!o&&s&&i===`optional`)){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...He(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var ei=[];function ti(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:ei,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=ke(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function ni(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(Be(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>$r(e,n,i,t,d,f))):$r(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var ri=C(`$ZodObject`,(e,t)=>{Zn.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=ae(()=>ti(t));st(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||de(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=xe,o=t.catchall,s,c=vt.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(Be(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>$r(n,t,e,r,a,o))):$r(s,t,e,r,a,o)}return o?ni(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),ii=C(`$ZodObjectJIT`,(e,t)=>{ri.init(e,t);let n=e._zod.parse,r=ae(()=>ti(t)),i=vt.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new Yn([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`\n let ${e}_ab = false;\n for (let i = 0; i < ${e}.issues.length; i++) {\n const iss = ${e}.issues[i];\n iss.path = iss.path ? [${t}, ...iss.path] : [${t}];\n payload.issues.push(iss);\n if (iss.continue !== true) ${e}_ab = true;\n }\n if (${e}_ab && ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:ve(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`\n const ${n}_present = ${i};\n if (!${n}.issues.length || ${n}_present) {\n if (${n}.issues.length) {${c(n,r)}\n }\n\n if (${e}) {\n newResult[${r}] = ${n}.value;\n }\n }\n\n `)}else f?(o.write(`\n if (${n}.issues.length) {${c(n,r)}\n }\n `),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`\n if (${n}.value !== undefined || ${i}) {\n newResult[${r}] = ${n}.value;\n }\n `)):o.write(`\n const ${n}_present = ${i};\n if (${n}.issues.length) {${c(n,r)}\n }\n if (!${n}_present && !${n}.issues.length) {\n payload.issues.push({\n code: "invalid_type",\n expected: "nonoptional",\n input: undefined,\n path: [${r}]\n });\n if (ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }\n }\n\n if (${n}_present) {\n newResult[${r}] = ${n}.value;\n }\n\n `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=xe,c=!vt.jitless,l=c&&Se.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?ni([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function ai(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Be(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Ke(e,r,yt())))}),t)}var oi=C(`$ZodUnion`,(e,t)=>{Zn.init(e,t),st(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),st(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),st(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),st(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>se(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>ai(t,r,e,i)):ai(o,r,e,i)}});function si(e){let t=new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||r.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(e!==void 0)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}var ci=C(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,oi.init(e,t);let n=e._zod.parse;st(e,`propValues`,e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||Object.keys(i).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);i[e.def.discriminator]?.has(void 0)&&n++;for(let[e,n]of Object.entries(i)){Object.prototype.hasOwnProperty.call(t,e)||de(t,e,new Set);for(let r of n)t[e].add(r)}}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=fe(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=ae(()=>si(t));e._zod.parse=(i,a)=>{let o=i.value;if(!xe(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=o?.[t.discriminator],c=r.value.get(s);return c&&(s!==void 0||a.direction!==`backward`)?c._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>r.value.get(e)!==null),input:o,path:[t.discriminator],inst:e}),i)}}),li=C(`$ZodIntersection`,(e,t)=>{Zn.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>di(e,t,n)):di(e,i,a)}});function ui(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ce(e)&&Ce(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=ui(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=ui(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function di(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=ui(t.value,n.value);if(!c.valid){if(Be(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var fi=C(`$ZodRecord`,(e,t)=>{Zn.init(e,t);let n=vt.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Ce(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>Ke(e,i,yt())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...He(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...He(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e))if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e);l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&Tn.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>Ke(e,i,yt())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...He(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...He(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),pi=C(`$ZodEnum`,(e,t)=>{Zn.init(e,t);let n=te(t.entries),r=new Set(n);e._zod.values=r,st(e,`pattern`,e=>{let t=te(e.def.entries).filter(e=>Te.has(typeof e));return RegExp(t.length?`^(${t.map(e=>Ee(e.toString())).join(`|`)})$`:`^[^\\\\s\\\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),mi=C(`$ZodLiteral`,(e,t)=>{Zn.init(e,t);let n=new Set(t.values);e._zod.values=n,st(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?Ee(e):e?Ee(e.toString()):String(e)).join(`|`)})$`:`^[^\\\\s\\\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),hi=C(`$ZodTransform`,(e,t)=>{Zn.init(e,t),e._zod.optin=`optional`,vt.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new _t(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new gt;return n.value=i,n}});function gi(e,t){return e.value=t.issues.length?void 0:t.value,e}var _i=C(`$ZodOptional`,(e,t)=>{Zn.init(e,t),st(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,st(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),st(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${se(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>gi(e,t)):gi(e,r)}return t.innerType._zod.run(e,n)}}),vi=C(`$ZodExactOptional`,(e,t)=>{_i.init(e,t),st(e,`values`,e=>e.def.innerType._zod.values),st(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),yi=C(`$ZodNullable`,(e,t)=>{Zn.init(e,t),st(e,`optin`,e=>e.def.innerType._zod.optin),st(e,`optout`,e=>e.def.innerType._zod.optout),st(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${se(t.source)}|null)$`):void 0}),st(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),bi=C(`$ZodDefault`,(e,t)=>{Zn.init(e,t),e._zod.optin=`defaulted`,st(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>xi(e,t)):xi(r,t)}});function xi(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Si=C(`$ZodPrefault`,(e,t)=>{Zn.init(e,t),e._zod.optin=`defaulted`,st(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Ci=C(`$ZodNonOptional`,(e,t)=>{Zn.init(e,t),st(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>wi(t,e)):wi(i,e)}});function wi(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function Ti(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>Ke(e,r,yt()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var Ei=C(`$ZodCatch`,(e,t)=>{Zn.init(e,t),st(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),st(e,`optout`,e=>e.def.innerType._zod.optout),st(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>Ti(e,r,t,n)):Ti(e,r,t,n)}}),Di=C(`$ZodPipe`,(e,t)=>{Zn.init(e,t),st(e,`values`,e=>e.def.in._zod.values),st(e,`optin`,e=>e.def.in._zod.optin),st(e,`optout`,e=>e.def.out._zod.optout),st(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Oi(e,t.in,n)):Oi(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Oi(e,t.out,n)):Oi(r,t.out,n)}});function Oi(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var ki=C(`$ZodPreprocess`,(e,t)=>{Di.init(e,t)}),Ai=C(`$ZodReadonly`,(e,t)=>{Zn.init(e,t),st(e,`propValues`,e=>e.def.innerType._zod.propValues),st(e,`values`,e=>e.def.innerType._zod.values),st(e,`optin`,e=>e.def.innerType?._zod?.optin),st(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(ji):ji(r)}});function ji(e){return e.memo||(e.value=Object.freeze(e.value)),e}var Mi=C(`$ZodLazy`,(e,t)=>{Zn.init(e,t),ue(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),st(e,`pattern`,e=>e.innerType?._zod?.pattern),st(e,`propValues`,e=>e.innerType?._zod?.propValues),st(e,`optin`,e=>e.innerType?._zod?.optin??void 0),st(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Ni=C(`$ZodCustom`,(e,t)=>{jn.init(e,t),Zn.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Pi(t,n,r,e));Pi(i,n,r,e)}});function Pi(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Ze(e))}}var Fi=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},Ii=`~memo`,Li=[];function Ri(e){return typeof e==`object`&&!!e}function zi(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var Bi=new WeakMap,Vi=0,Hi=1,Ui=2;function Wi(e,t,n){let r=Bi.get(e);if(r!==void 0)return r?Ui:Vi;if(t.has(e))return Ui;t.add(e);let i=Vi,a=e=>{if(i!==Ui&&e?._zod){let r=Wi(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=Vi;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?Hi:o.value?._zod?Wi(o.value,t,n):Vi;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=fe(c);s(e?o(e,!0):Hi),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?Wi(r,t,!1):Hi);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(!(!n||typeof n!=`object`)){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),Gi(e,i)}function Gi(e,t){return t!==Hi&&Bi.set(e,t===Ui),t}function Ki(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var qi,Ji=[],Yi={alloc(e,t,n){let r=qi;if(!r)return n;qi=void 0;let i={value:n,issues:null};return r.set(t.value,i),Ji.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&Zi(n,e.value))throw new Fi;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=Wi(e,new Set,!1);if(i===Vi)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===Ui||r?n=!0:r=!0}let l=s.value;if(!Ri(l))return t(s,c);let u=c[Ii];u||(u={buckets:new WeakMap,backEdges:void 0},c[Ii]=u);let d;i===c?d=a:(d=Ki(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...zi(f.issues)):(s.memo=!0,u.backEdges??=new WeakSet,u.backEdges.add(f.value)),s;qi=d;let p=Ji.length,m=t(s,c);qi=void 0;let h=Ji.length>p?Ji.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?zi(e.issues):Li),e)):(h&&(h.issues=m.issues.length?zi(m.issues):Li),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function Xi(){return Yi}function Zi(e,t){let n=e[Ii]?.backEdges;return n!==void 0&&Ri(t)&&n.has(t)}var Qi=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(Xe(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${Oe(e.values[0])}`:`Invalid option: expected one of ${ne(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${ne(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`\'${e}\'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function $i(){return{localeError:Qi()}}var ea,ta=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function na(){return new ta}(ea=globalThis).__zod_globalRegistry??(ea.__zod_globalRegistry=na());var ra=globalThis.__zod_globalRegistry;function ia(e){return e.checks&&=[...e.checks],e}function aa(e,t){return new e(ia({type:`string`,...x(t)}))}function oa(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...x(t)})}function sa(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...x(t)})}function ca(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...x(t)})}function la(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...x(t)})}function ua(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...x(t)})}function da(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...x(t)})}function fa(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...x(t)})}function pa(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...x(t)})}function ma(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...x(t)})}function ha(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...x(t)})}function ga(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...x(t)})}function _a(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...x(t)})}function va(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...x(t)})}function ya(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...x(t)})}function ba(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...x(t)})}function xa(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...x(t)})}function Sa(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...x(t)})}function Ca(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...x(t)})}function wa(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...x(t)})}function Ta(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...x(t)})}function Ea(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...x(t)})}function Da(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...x(t)})}function Oa(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...x(t)})}function ka(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...x(t)})}function Aa(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...x(t)})}function ja(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...x(t)})}function Ma(e,t){return new e(ia({type:`number`,checks:[],...x(t)}))}function Na(e,t){return new e(ia({type:`number`,coerce:!0,checks:[],...x(t)}))}function Pa(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...x(t)})}function Fa(e,t){return new e({type:`boolean`,...x(t)})}function Ia(e,t){return new e({type:`undefined`,...x(t)})}function La(e,t){return new e({type:`null`,...x(t)})}function Ra(e){return new e({type:`any`})}function za(e){return new e({type:`unknown`})}function Ba(e,t){return new e({type:`never`,...x(t)})}function Va(e,t){return new Pn({check:`less_than`,...x(t),value:e,inclusive:!1})}function Ha(e,t){return new Pn({check:`less_than`,...x(t),value:e,inclusive:!0})}function Ua(e,t){return new Fn({check:`greater_than`,...x(t),value:e,inclusive:!1})}function Wa(e,t){return new Fn({check:`greater_than`,...x(t),value:e,inclusive:!0})}function Ga(e,t){return new In({check:`multiple_of`,...x(t),value:e})}function Ka(e,t){return new Rn({check:`max_length`,...x(t),maximum:e})}function qa(e,t){return new zn({check:`min_length`,...x(t),minimum:e})}function Ja(e,t){return new Bn({check:`length_equals`,...x(t),length:e})}function Ya(e,t){return new Hn({check:`string_format`,format:`regex`,...x(t),pattern:e})}function Xa(e){return new Un({check:`string_format`,format:`lowercase`,...x(e)})}function Za(e){return new Wn({check:`string_format`,format:`uppercase`,...x(e)})}function Qa(e,t){return new Gn({check:`string_format`,format:`includes`,...x(t),includes:e})}function $a(e,t){return new Kn({check:`string_format`,format:`starts_with`,...x(t),prefix:e})}function eo(e,t){return new qn({check:`string_format`,format:`ends_with`,...x(t),suffix:e})}function to(e){return new Jn({check:`overwrite`,tx:e})}function no(e){return to(t=>t.normalize(e))}function ro(){return to(e=>e.trim())}function io(){return to(e=>e.toLowerCase())}function ao(){return to(e=>e.toUpperCase())}function oo(){return to(e=>ye(e))}function so(e,t,n){return new e({type:`array`,element:t,...x(n)})}function co(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...x(n)})}function lo(e,t){let n=uo(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Ze(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Ze(r))}},e(t.value,t)),t);return n}function uo(e,t){let n=new jn({check:`custom`,...x(t)});return n._zod.check=e,n}function fo(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&de(e,t,n[t]);return e}function po(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??ra,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function mo(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function ho(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,ho(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&fo(o.schema,c),t.io===`input`&&To(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function go(e){return e.replace(/~/g,`~0`).replace(/\\//g,`~1`)}function _o(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${go(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+go(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>\n\nSet the \\`cycles\\` parameter to \\`"ref"\\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}r.count>1&&e.reused===`ref`&&a(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}function vo(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;vo(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var yo=new Set([`type`,`properties`,`required`,`additionalProperties`]),bo=[`oneOf`,`anyOf`];function xo(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function So(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!yo.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??xo(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}de(n,r,e.length===1?e[0]:So(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=xo(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function Co(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of yo)if(t in e)return;let n=t.filter(e=>bo.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=So(t);else{let e=n[0],i=bo.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>So([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,fo(e,r))}function wo(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):fo(i,s),fo(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())vo(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])Co(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}fo(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,de(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Do(t,`input`,e.processors),output:Do(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function To(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return To(r.element,n);if(r.type===`set`)return To(r.valueType,n);if(r.type===`lazy`)return To(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return To(r.innerType,n);if(r.type===`intersection`)return To(r.left,n)||To(r.right,n);if(r.type===`record`||r.type===`map`)return To(r.keyType,n)||To(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:To(r.in,n)||To(r.out,n);if(r.type===`object`){for(let e in r.shape)if(To(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(To(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(To(e,n))return!0;return!!(r.rest&&To(r.rest,n))}return!1}var Eo=(e,t={})=>n=>{let r=po({...n,processors:t});return ho(e,r),_o(r,e),wo(r,e)},Do=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=po({...i??{},target:a,io:t,processors:n});return ho(e,o),_o(o,e),wo(o,e)},w=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},Oo=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},ko=(e,t)=>{w(e,`minimum`,t),Oo(e,`maximum`,t)},Ao=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},jo=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},Mo=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},No=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},Po=(e,t)=>w(e,`minimum`,t.minimum),Fo=(e,t)=>Oo(e,`maximum`,t.maximum),Io=e=>(t,n)=>{No(t,n.format);let[r,i]=e[n.format];w(t,`minimum`,r),Oo(t,`maximum`,i)},Lo={greater_than:(e,t)=>w(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>Oo(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>Ao(e,t.value),number_format:Io(Ae),bigint_format:Io(je),min_length:Po,max_length:Fo,length_equals:(e,t)=>ko(e,t.length),min_size:Po,max_size:Fo,size_equals:(e,t)=>ko(e,t.size),string_format:(e,t)=>{No(e,t.format),t.pattern&&jo(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>Mo(e,t.mime)};function Ro(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Lo[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&w(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&w(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&Oo(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&Oo(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&Ao(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&Mo(t,i.mime);for(let e of i.patterns??[])jo(t,e);return t}var zo={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Bo=new Map([[Nr,pn],[Fr,mn]]),Vo=e=>Bo.get(e)??e,Ho=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=Ro(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=zo[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(Vo);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Uo=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=Ro(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):mo(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},Wo=(e,t,n,r)=>{n.type=`boolean`},Go=(e,t,n,r)=>{mo(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},Ko=(e,t,n,r)=>{mo(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},qo=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Jo=(e,t,n,r)=>{mo(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},Yo=(e,t,n,r)=>{mo(e,t,n,r,`Void cannot be represented in JSON Schema`)},Xo=(e,t,n,r)=>{n.not={}},Zo=(e,t,n,r)=>{},Qo=(e,t,n,r)=>{},$o=(e,t,n,r)=>{mo(e,t,n,r,`Date cannot be represented in JSON Schema`)},es=(e,t,n,r)=>{let i=e._zod.def,a=te(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},ts=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(mo(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(mo(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},ns=(e,t,n,r)=>{mo(e,t,n,r,`NaN cannot be represented in JSON Schema`)},rs=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},is=(e,t,n,r)=>{let i=n;i.type=`string`,i.format=`binary`,i.contentEncoding=`binary`;let{minimum:a,maximum:o,mime:s}=Ro(e);a!==void 0&&(i.minLength=a),o!==void 0&&(i.maxLength=o),s&&(s.length===0?i.not={}:s.length===1?i.contentMediaType=s[0]:i.anyOf=s.map(e=>({contentMediaType:e})))},as=(e,t,n,r)=>{n.type=`boolean`},os=(e,t,n,r)=>{mo(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},ss=(e,t,n,r)=>{mo(e,t,n,r,`Function types cannot be represented in JSON Schema`)},cs=(e,t,n,r)=>{mo(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},ls=(e,t,n,r)=>{mo(e,t,n,r,`Map cannot be represented in JSON Schema`)},us=(e,t,n,r)=>{mo(e,t,n,r,`Set cannot be represented in JSON Schema`)},ds=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=Ro(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=ho(a.element,t,{...r,path:[...r.path,`items`]})};function fs(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?fs(t.out):t.type===`catch`?fs(t.innerType):e._zod.optin}var ps=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&mo(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)de(i.properties,e,ho(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?fs(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=ho(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},ms=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>ho(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},hs=(e,t,n,r)=>{let i=e._zod.def,a=ho(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=ho(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},gs=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>ho(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?ho(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?fs(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=Ro(e);typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)};function _s(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=_s(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>_s(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i?(p.type=`string`,a||(p.pattern=(r.includes(`number`)?Tn:wn).source),p):p}var vs=new WeakMap;function ys(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of vs.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=_s(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var bs=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=Ro(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=ho(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)de(i.patternProperties,Vo(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=ho(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=vs.get(t);n||(n=[],vs.set(t,n),t.deferred.push(()=>ys(t))),n.push(e)}i.additionalProperties=ho(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&fs(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},xs=(e,t,n,r)=>{let i=e._zod.def,a=ho(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Ss=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Cs=Symbol();function ws(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(mo(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),Cs):JSON.parse(o)}var Ts=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=ws(i.defaultValue,e,t,n,r);o!==Cs&&(n.default=o)},Es=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=ws(i.defaultValue,e,t,n,r);o!==Cs&&(n._prefault=o)},Ds=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{mo(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},Os=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;ho(o,t,r);let s=t.seen.get(e);s.ref=o},ks=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},As=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},js=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ms=(e,t,n,r)=>{let i=e._zod.innerType;ho(i,t,r);let a=t.seen.get(e);a.ref=i},Ns={string:Ho,number:Uo,boolean:Wo,bigint:Go,symbol:Ko,null:qo,undefined:Jo,void:Yo,never:Xo,any:Zo,unknown:Qo,date:$o,enum:es,literal:ts,nan:ns,template_literal:rs,file:is,success:as,custom:os,function:ss,transform:cs,map:ls,set:us,array:ds,object:ps,union:ms,intersection:hs,tuple:gs,record:bs,nullable:xs,nonoptional:Ss,default:Ts,prefault:Es,catch:Ds,pipe:Os,readonly:ks,promise:As,optional:js,lazy:Ms};function Ps(e,t){if(`_idmap`in e){let n=e,r=po({...t,processors:Ns}),i={};for(let e of n._idmap.entries()){let[t,n]=e;ho(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;_o(r,n),de(a,t,wo(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=po({...t,processors:Ns});return ho(e,n),_o(n,e),wo(n,e)}var Fs=new WeakSet([Object.prototype,Error.prototype]);function Is(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var Ls=C(`ZodError`,(e,t)=>{Et.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);Fs.has(n)||(Fs.add(n),Is(n,`format`,e=>t=>kt(e,t)),Is(n,`flatten`,e=>t=>Ot(e,t)),Is(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,re,2)}),Is(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,re,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),Rs=jt(Ls),zs=Mt(Ls),Bs=Nt(Ls),Vs=Ft(Ls),Hs=Vt(Ls),Us=Ht(Ls),Ws=Ut(Ls),Gs=Wt(Ls),Ks=Gt(Ls),qs=Kt(Ls),Js=qt(Ls),Ys=Jt(Ls);function Xs(){vt.localeError||yt($i())}function Zs(){vt.memoizer||yt({memoizer:Xi()})}var Qs=C(`ZodType`,(e,t)=>(Xs(),Zn.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(_e(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return De(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(yl(e,t))},superRefine(e,t){return this.check(bl(e,t))},overwrite(e){return this.check(to(e))},optional(){return I(this)},exactOptional(){return el(this)},nullable(){return nl(this)},nullish(){return I(nl(this))},nonoptional(e){return cl(this,e)},array(){return k(this)},or(e){return M([this,e])},and(e){return Kc(this,e)},transform(e){return fl(this,Zc(e))},default(e){return il(this,e)},prefault(e){return ol(this,e)},catch(e){return ul(this,e)},pipe(e){return fl(this,e)},readonly(){return hl(this)},describe(e){let t=this.clone();return ra.add(t,{description:e}),t},meta(...e){if(e.length===0)return ra.get(this);let t=this.clone();return ra.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return et(this,`~standard`,{...er(this),jsonSchema:{input:Do(this,`input`),output:Do(this,`output`)}})},set"~standard"(e){$e(this,`~standard`,e)},parse:function e(t,n){return Rs(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await zs(this,t,n,{callee:e})},safeParse(e,t){return Bs(this,e,t)},async safeParseAsync(e,t){return Vs(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){$e(this,`spa`,e)},validate(e,t){return Rt(this,e,t)},validateAsync(e,t){return Bt(this,e,t)},encode:function e(t,n){return Hs(this,t,n,{callee:e})},decode:function e(t,n){return Us(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await Ws(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Gs(this,t,n,{callee:e})},safeEncode(e,t){return Ks(this,e,t)},safeDecode(e,t){return qs(this,e,t)},async safeEncodeAsync(e,t){return Js(this,e,t)},async safeDecodeAsync(e,t){return Ys(this,e,t)},toJSONSchema(e){return Eo(this,{})(e)},get description(){return ra.get(this)?.description},get _def(){return this._zod.def}}),$s=C(`_ZodString`,(e,t)=>{tr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ho(e,t,n,r)},tt({format:e=>Ro(e).format??null,minLength:e=>Ro(e).minimum??null,maxLength:e=>Ro(e).maximum??null},{regex(...e){return this.check(Ya(...e))},includes(...e){return this.check(Qa(...e))},startsWith(...e){return this.check($a(...e))},endsWith(...e){return this.check(eo(...e))},min(...e){return this.check(qa(...e))},max(...e){return this.check(Ka(...e))},length(...e){return this.check(Ja(...e))},nonempty(...e){return this.check(qa(1,...e))},lowercase(e){return this.check(Xa(e))},uppercase(e){return this.check(Za(e))},trim(){return this.check(ro())},normalize(...e){return this.check(no(...e))},toLowerCase(){return this.check(io())},toUpperCase(){return this.check(ao())},slugify(){return this.check(oo())}})),ec=C(`ZodString`,(e,t)=>{tr.init(e,t),$s.init(e,t)},{email(e){return this.check(oa(oc,e))},url(e){return this.check(fa(uc,e))},jwt(e){return this.check(Da(Ec,e))},emoji(e){return this.check(pa(fc,e))},guid(e){return this.check(sa(cc,e))},uuid(e){return this.check(ca(lc,e))},uuidv4(e){return this.check(la(lc,e))},uuidv6(e){return this.check(ua(lc,e))},uuidv7(e){return this.check(da(lc,e))},nanoid(e){return this.check(ma(pc,e))},cuid(e){return this.check(ha(mc,e))},cuid2(e){return this.check(ga(hc,e))},ulid(e){return this.check(_a(gc,e))},base64(e){return this.check(wa(Cc,e))},base64url(e){return this.check(Ta(wc,e))},xid(e){return this.check(va(_c,e))},ksuid(e){return this.check(ya(vc,e))},ipv4(e){return this.check(ba(yc,e))},ipv6(e){return this.check(xa(bc,e))},cidrv4(e){return this.check(Sa(xc,e))},cidrv6(e){return this.check(Ca(Sc,e))},e164(e){return this.check(Ea(Tc,e))},datetime(e){return this.check(Oa(nc,e))},date(e){return this.check(ka(rc,e))},time(e){return this.check(Aa(ic,e))},duration(e){return this.check(ja(ac,e))}});function T(e){return aa(ec,e)}var tc=C(`ZodStringFormat`,(e,t)=>{nr.init(e,t),$s.init(e,t)}),nc=C(`ZodISODateTime`,(e,t)=>{xr.init(e,t),tc.init(e,t)}),rc=C(`ZodISODate`,(e,t)=>{Sr.init(e,t),tc.init(e,t)}),ic=C(`ZodISOTime`,(e,t)=>{Cr.init(e,t),tc.init(e,t)}),ac=C(`ZodISODuration`,(e,t)=>{wr.init(e,t),tc.init(e,t)}),oc=C(`ZodEmail`,(e,t)=>{ar.init(e,t),tc.init(e,t)});function sc(e){return oa(oc,e)}var cc=C(`ZodGUID`,(e,t)=>{rr.init(e,t),tc.init(e,t)}),lc=C(`ZodUUID`,(e,t)=>{ir.init(e,t),tc.init(e,t)}),uc=C(`ZodURL`,(e,t)=>{pr.init(e,t),tc.init(e,t)});function dc(e){return fa(uc,e)}var fc=C(`ZodEmoji`,(e,t)=>{mr.init(e,t),tc.init(e,t)}),pc=C(`ZodNanoID`,(e,t)=>{hr.init(e,t),tc.init(e,t)}),mc=C(`ZodCUID`,(e,t)=>{gr.init(e,t),tc.init(e,t)}),hc=C(`ZodCUID2`,(e,t)=>{_r.init(e,t),tc.init(e,t)}),gc=C(`ZodULID`,(e,t)=>{vr.init(e,t),tc.init(e,t)}),_c=C(`ZodXID`,(e,t)=>{yr.init(e,t),tc.init(e,t)}),vc=C(`ZodKSUID`,(e,t)=>{br.init(e,t),tc.init(e,t)}),yc=C(`ZodIPv4`,(e,t)=>{Tr.init(e,t),tc.init(e,t)}),bc=C(`ZodIPv6`,(e,t)=>{Or.init(e,t),tc.init(e,t)}),xc=C(`ZodCIDRv4`,(e,t)=>{kr.init(e,t),tc.init(e,t)}),Sc=C(`ZodCIDRv6`,(e,t)=>{jr.init(e,t),tc.init(e,t)}),Cc=C(`ZodBase64`,(e,t)=>{Pr.init(e,t),tc.init(e,t)}),wc=C(`ZodBase64URL`,(e,t)=>{Lr.init(e,t),tc.init(e,t)}),Tc=C(`ZodE164`,(e,t)=>{Rr.init(e,t),tc.init(e,t)}),Ec=C(`ZodJWT`,(e,t)=>{Br.init(e,t),tc.init(e,t)}),Dc=C(`ZodNumber`,(e,t)=>{Vr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Uo(e,t,n,r),e.isFinite=!0},tt({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=Ro(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=Ro(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=Ro(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>Ro(e).format??null},{gt(e,t){return this.check(Ua(e,t))},gte(e,t){return this.check(Wa(e,t))},min(e,t){return this.check(Wa(e,t))},lt(e,t){return this.check(Va(e,t))},lte(e,t){return this.check(Ha(e,t))},max(e,t){return this.check(Ha(e,t))},int(e){return this.check(kc(e))},safe(e){return this.check(kc(e))},positive(e){return this.check(Ua(0,e))},nonnegative(e){return this.check(Wa(0,e))},negative(e){return this.check(Va(0,e))},nonpositive(e){return this.check(Ha(0,e))},multipleOf(e,t){return this.check(Ga(e,t))},step(e,t){return this.check(Ga(e,t))},finite(){return this}}));function E(e){return Ma(Dc,e)}var Oc=C(`ZodNumberFormat`,(e,t)=>{Hr.init(e,t),Dc.init(e,t)});function kc(e){return Pa(Oc,e)}var Ac=C(`ZodBoolean`,(e,t)=>{Ur.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wo(e,t,n,r)});function D(e){return Fa(Ac,e)}var jc=C(`ZodUndefined`,(e,t)=>{Wr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jo(e,t,n,r)});function Mc(e){return Ia(jc,e)}var Nc=C(`ZodNull`,(e,t)=>{Gr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qo(e,t,n,r)});function Pc(e){return La(Nc,e)}var Fc=C(`ZodAny`,(e,t)=>{Kr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Ic(){return Ra(Fc)}var Lc=C(`ZodUnknown`,(e,t)=>{qr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function O(){return za(Lc)}var Rc=C(`ZodNever`,(e,t)=>{Jr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xo(e,t,n,r)});function zc(e){return Ba(Rc,e)}var Bc=C(`ZodArray`,(e,t)=>{Zs(),Qr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ds(e,t,n,r),e.element=t.element},{min(e,t){return this.check(qa(e,t))},nonempty(e){return this.check(qa(1,e))},max(e,t){return this.check(Ka(e,t))},length(e,t){return this.check(Ja(e,t))},unwrap(){return this.element}});function k(e,t){return so(Bc,e,t)}var Vc=C(`ZodObject`,(e,t)=>{Zs(),ii.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ps(e,t,n,r),ct(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return P(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(_e(this._zod.def,{catchall:e}))},passthrough(){return this.clone(_e(this._zod.def,{catchall:O()}))},loose(){return this.clone(_e(this._zod.def,{catchall:O()}))},strict(){return this.clone(_e(this._zod.def,{catchall:zc()}))},strip(){return this.clone(_e(this._zod.def,{catchall:void 0}))},extend(e){return Pe(this,e)},safeExtend(e){return Ie(this,e)},merge(e){return Le(this,e)},pick(e){return Me(this,e)},omit(e){return S(this,e)},partial(...e){return Re(Qc,this,e[0])},exactPartial(...e){return Re($c,this,e[0],`exactPartial`)},required(...e){return ze(sl,this,e[0])}});function A(e,t){return new Vc({type:`object`,shape:e??{},...x(t)})}function j(e,t){return new Vc({type:`object`,shape:e,catchall:O(),...x(t)})}var Hc=C(`ZodUnion`,(e,t)=>{oi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ms(e,t,n,r),e.options=t.options});function M(e,t){return new Hc({type:`union`,options:e,...x(t)})}var Uc=C(`ZodDiscriminatedUnion`,(e,t)=>{Hc.init(e,t),ci.init(e,t)});function Wc(e,t,n){return new Uc({type:`union`,options:t,discriminator:e,...x(n)})}var Gc=C(`ZodIntersection`,(e,t)=>{li.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hs(e,t,n,r)});function Kc(e,t){return new Gc({type:`intersection`,left:e,right:t})}var qc=C(`ZodRecord`,(e,t)=>{Zs(),fi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bs(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function N(e,t,n){return!t||!t._zod?new qc({type:`record`,keyType:T(),valueType:e,...x(t)}):new qc({type:`record`,keyType:e,valueType:t,...x(n)})}var Jc=C(`ZodEnum`,(e,t)=>{pi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>es(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Jc({...t,checks:[],...x(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Jc({...t,checks:[],...x(r),entries:i})}});function P(e,t){return new Jc({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...x(t)})}var Yc=C(`ZodLiteral`,(e,t)=>{mi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ts(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function F(e,t){return new Yc({type:`literal`,values:Array.isArray(e)?e:[e],...x(t)})}var Xc=C(`ZodTransform`,(e,t)=>{Zs(),hi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cs(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new _t(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Ze(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(Ze(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Zc(e){return new Xc({type:`transform`,transform:e})}var Qc=C(`ZodOptional`,(e,t)=>{_i.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>js(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function I(e){return new Qc({type:`optional`,innerType:e})}var $c=C(`ZodExactOptional`,(e,t)=>{vi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>js(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function el(e){return new $c({type:`optional`,innerType:e})}var tl=C(`ZodNullable`,(e,t)=>{yi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function nl(e){return new tl({type:`nullable`,innerType:e})}var rl=C(`ZodDefault`,(e,t)=>{bi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ts(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function il(e,t){return new rl({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():we(t)}})}var al=C(`ZodPrefault`,(e,t)=>{Si.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Es(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ol(e,t){return new al({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():we(t)}})}var sl=C(`ZodNonOptional`,(e,t)=>{Ci.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ss(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function cl(e,t){return new sl({type:`nonoptional`,innerType:e,...x(t)})}var ll=C(`ZodCatch`,(e,t)=>{Ei.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ds(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ul(e,t){return new ll({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:ut(t)})}var dl=C(`ZodPipe`,(e,t)=>{Di.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Os(e,t,n,r),e.in=t.in,e.out=t.out});function fl(e,t){return new dl({type:`pipe`,in:e,out:t})}var pl=C(`ZodPreprocess`,(e,t)=>{dl.init(e,t),ki.init(e,t)}),ml=C(`ZodReadonly`,(e,t)=>{Ai.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ks(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function hl(e){return new ml({type:`readonly`,innerType:e})}var gl=C(`ZodLazy`,(e,t)=>{Mi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ms(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function _l(e){return new gl({type:`lazy`,getter:e})}var vl=C(`ZodCustom`,(e,t)=>{Ni.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>os(e,t,n,r)});function yl(e,t={}){return co(vl,e,t)}function bl(e,t){return lo(e,t)}function xl(e,t){return new pl({type:`pipe`,in:Zc(e),out:t})}var Sl={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},Cl;Cl||={};function wl(e){return Oa(nc,e)}function Tl(e){return ka(rc,e)}function El(e){return Na(Dc,e)}var Dl=[`2025-11-25`,`2025-06-18`,`2025-03-26`,`2024-11-05`,`2024-10-07`],Ol=`io.modelcontextprotocol/related-task`,kl=`io.modelcontextprotocol/protocolVersion`,Al=`io.modelcontextprotocol/clientInfo`,jl=`io.modelcontextprotocol/serverInfo`,Ml=`io.modelcontextprotocol/clientCapabilities`,Nl=`io.modelcontextprotocol/subscriptionId`,Pl=`io.modelcontextprotocol/logLevel`,Fl=_l(()=>M([T(),E(),D(),Pc(),N(T(),Fl),k(Fl)])),Il=N(T(),Fl),Ll=k(Fl),Rl=M([T(),E().int()]),zl=T(),Bl=A({ttl:E().optional()}),Vl=A({taskId:T()}),Hl=j({progressToken:Rl.optional(),[Ol]:Vl.optional()}),Ul=A({_meta:Hl.optional()}),Wl=Ul.extend({task:Bl.optional()}),Gl=A({method:T(),params:Ul.loose().optional()}),Kl=A({_meta:Hl.optional()}),ql=A({method:T(),params:Kl.loose().optional()}),Jl=j({get[jl](){return cu.optional().catch(void 0)}}),L=j({_meta:Jl.optional()}),Yl=M([T(),E().int()]),Xl=A({jsonrpc:F(`2.0`),id:Yl,...Gl.shape}).strict(),Zl=A({jsonrpc:F(`2.0`),...ql.shape}).strict(),Ql=A({jsonrpc:F(`2.0`),id:Yl,result:L}).strict(),$l=A({jsonrpc:F(`2.0`),id:Yl.optional(),error:A({code:E().int(),message:T(),data:O().optional()})}).strict(),eu=M([Xl,Zl,Ql,$l]),tu=M([Ql,$l]),nu=L.strict(),ru=Kl.extend({requestId:Yl.optional(),reason:T().optional()}),iu=ql.extend({method:F(`notifications/cancelled`),params:ru}),au=A({src:T(),mimeType:T().optional(),sizes:k(T()).optional(),theme:P([`light`,`dark`]).optional()}),ou=A({icons:k(au).optional()}),su=A({name:T(),title:T().optional()}),cu=su.extend({...su.shape,...ou.shape,version:T(),websiteUrl:T().optional(),description:T().optional()}),lu=xl(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Kc(A({form:Kc(A({applyDefaults:D().optional()}),Il).optional(),url:Il.optional()}),Il.optional())),uu=j({list:Il.optional(),cancel:Il.optional(),requests:j({sampling:j({createMessage:Il.optional()}).optional(),elicitation:j({create:Il.optional()}).optional()}).optional()}),du=j({list:Il.optional(),cancel:Il.optional(),requests:j({tools:j({call:Il.optional()}).optional()}).optional()}),fu=A({experimental:N(T(),Il).optional(),sampling:A({context:Il.optional(),tools:Il.optional()}).optional(),elicitation:lu.optional(),roots:A({listChanged:D().optional()}).optional(),tasks:uu.optional(),extensions:N(T(),Il).optional()}),pu=Ul.extend({protocolVersion:T(),capabilities:fu,clientInfo:cu}),mu=Gl.extend({method:F(`initialize`),params:pu}),hu=A({experimental:N(T(),Il).optional(),logging:Il.optional(),completions:Il.optional(),prompts:A({listChanged:D().optional()}).optional(),resources:A({subscribe:D().optional(),listChanged:D().optional()}).optional(),tools:A({listChanged:D().optional()}).optional(),tasks:du.optional(),extensions:N(T(),Il).optional()}),gu=L.extend({protocolVersion:T(),capabilities:hu,serverInfo:cu,instructions:T().optional()}),_u=ql.extend({method:F(`notifications/initialized`),params:Kl.optional()}),vu=Gl.extend({method:F(`server/discover`),params:Ul.optional()}),yu=L.extend({supportedVersions:k(T()),capabilities:hu,instructions:T().optional()}),bu=Gl.extend({method:F(`ping`),params:Ul.optional()}),xu=A({progress:E(),total:I(E()),message:I(T())}),Su=A({...Kl.shape,...xu.shape,progressToken:Rl}),Cu=ql.extend({method:F(`notifications/progress`),params:Su}),wu=Ul.extend({cursor:zl.optional()}),Tu=Gl.extend({params:wu.optional()}),Eu=L.extend({nextCursor:zl.optional()}),Du=A({uri:T(),mimeType:I(T()),_meta:N(T(),O()).optional()}),Ou=Du.extend({text:T()}),ku=T().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),Au=Du.extend({blob:ku}),ju=P([`user`,`assistant`]),Mu=A({audience:k(ju).optional(),priority:E().min(0).max(1).optional(),lastModified:wl({offset:!0}).optional()}),Nu=A({...su.shape,...ou.shape,uri:T(),description:I(T()),mimeType:I(T()),size:I(E()),annotations:Mu.optional(),_meta:I(j({}))}),Pu=A({...su.shape,...ou.shape,uriTemplate:T(),description:I(T()),mimeType:I(T()),annotations:Mu.optional(),_meta:I(j({}))}),Fu=Tu.extend({method:F(`resources/list`)}),Iu=Eu.extend({resources:k(Nu)}),Lu=Tu.extend({method:F(`resources/templates/list`)}),Ru=Eu.extend({resourceTemplates:k(Pu)}),zu=Ul.extend({uri:T()}),Bu=zu,Vu=Gl.extend({method:F(`resources/read`),params:Bu}),Hu=L.extend({contents:k(M([Ou,Au]))}),Uu=ql.extend({method:F(`notifications/resources/list_changed`),params:Kl.optional()}),Wu=zu,Gu=Gl.extend({method:F(`resources/subscribe`),params:Wu}),Ku=zu,qu=Gl.extend({method:F(`resources/unsubscribe`),params:Ku}),Ju=A({toolsListChanged:D().optional(),promptsListChanged:D().optional(),resourcesListChanged:D().optional(),resourceSubscriptions:k(T()).optional()}),Yu=Ul.extend({notifications:Ju}),Xu=Gl.extend({method:F(`subscriptions/listen`),params:Yu}),Zu=Kl.extend({notifications:Ju}),Qu=ql.extend({method:F(`notifications/subscriptions/acknowledged`),params:Zu}),$u=Jl.extend({[Nl]:Yl}),ed=L.extend({_meta:$u}),td=Kl.extend({uri:T()}),nd=ql.extend({method:F(`notifications/resources/updated`),params:td}),rd=A({name:T(),description:I(T()),required:I(D())}),id=A({...su.shape,...ou.shape,description:I(T()),arguments:I(k(rd)),_meta:I(j({}))}),ad=Tu.extend({method:F(`prompts/list`)}),od=Eu.extend({prompts:k(id)}),sd=Ul.extend({name:T(),arguments:N(T(),T()).optional()}),cd=Gl.extend({method:F(`prompts/get`),params:sd}),ld=A({type:F(`text`),text:T(),annotations:Mu.optional(),_meta:N(T(),O()).optional()}),ud=A({type:F(`image`),data:ku,mimeType:T(),annotations:Mu.optional(),_meta:N(T(),O()).optional()}),dd=A({type:F(`audio`),data:ku,mimeType:T(),annotations:Mu.optional(),_meta:N(T(),O()).optional()}),fd=A({type:F(`tool_use`),name:T(),id:T(),input:N(T(),O()),_meta:N(T(),O()).optional()}),pd=A({type:F(`resource`),resource:M([Ou,Au]),annotations:Mu.optional(),_meta:N(T(),O()).optional()}),md=Nu.extend({type:F(`resource_link`)}),hd=M([ld,ud,dd,md,pd]),gd=A({role:ju,content:hd}),_d=L.extend({description:T().optional(),messages:k(gd)}),vd=ql.extend({method:F(`notifications/prompts/list_changed`),params:Kl.optional()}),yd=A({title:T().optional(),readOnlyHint:D().optional(),destructiveHint:D().optional(),idempotentHint:D().optional(),openWorldHint:D().optional()}),bd=A({taskSupport:P([`required`,`optional`,`forbidden`]).optional()}),xd=A({...su.shape,...ou.shape,description:T().optional(),inputSchema:A({type:F(`object`),properties:N(T(),Fl).optional(),required:k(T()).optional()}).catchall(O()),outputSchema:j({$schema:T().optional()}).optional(),annotations:yd.optional(),execution:bd.optional(),_meta:N(T(),O()).optional()}),Sd=Tu.extend({method:F(`tools/list`)}),Cd=Eu.extend({tools:k(xd)}),wd=L.extend({content:k(hd).default([]),structuredContent:O().optional(),isError:D().optional()}),Td=wd.or(L.extend({toolResult:O()})),Ed=Wl.extend({name:T(),arguments:N(T(),O()).optional()}),Dd=Gl.extend({method:F(`tools/call`),params:Ed}),Od=ql.extend({method:F(`notifications/tools/list_changed`),params:Kl.optional()}),kd=A({autoRefresh:D().default(!0),debounceMs:E().int().nonnegative().default(300)}),Ad=P([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),jd=Ul.extend({level:Ad}),Md=Gl.extend({method:F(`logging/setLevel`),params:jd}),Nd=Kl.extend({level:Ad,logger:T().optional(),data:O()}),Pd=ql.extend({method:F(`notifications/message`),params:Nd}),Fd=A({name:T().optional()}),Id=A({hints:k(Fd).optional(),costPriority:E().min(0).max(1).optional(),speedPriority:E().min(0).max(1).optional(),intelligencePriority:E().min(0).max(1).optional()}),Ld=A({mode:P([`auto`,`required`,`none`]).optional()}),Rd=A({type:F(`tool_result`),toolUseId:T().describe(`The unique identifier for the corresponding tool call.`),content:k(hd),structuredContent:O().optional(),isError:D().optional(),_meta:N(T(),O()).optional()}),zd=Wc(`type`,[ld,ud,dd]),Bd=Wc(`type`,[ld,ud,dd,fd,Rd]),Vd=A({role:ju,content:M([Bd,k(Bd)]),_meta:N(T(),O()).optional()}),Hd=Wl.extend({messages:k(Vd),modelPreferences:Id.optional(),systemPrompt:T().optional(),includeContext:P([`none`,`thisServer`,`allServers`]).optional(),temperature:E().optional(),maxTokens:E().int(),stopSequences:k(T()).optional(),metadata:Il.optional(),tools:k(xd).optional(),toolChoice:Ld.optional()}),Ud=Gl.extend({method:F(`sampling/createMessage`),params:Hd}),Wd=L.extend({model:T(),stopReason:I(P([`endTurn`,`stopSequence`,`maxTokens`]).or(T())),role:ju,content:zd}),Gd=L.extend({model:T(),stopReason:I(P([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(T())),role:ju,content:M([Bd,k(Bd)])}),Kd=A({type:F(`boolean`),title:T().optional(),description:T().optional(),default:D().optional()}),qd=A({type:F(`string`),title:T().optional(),description:T().optional(),minLength:E().optional(),maxLength:E().optional(),format:P([`email`,`uri`,`date`,`date-time`]).optional(),default:T().optional()}),Jd=A({type:P([`number`,`integer`]),title:T().optional(),description:T().optional(),minimum:E().optional(),maximum:E().optional(),default:E().optional()}),Yd=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),default:T().optional()}),Xd=A({type:F(`string`),title:T().optional(),description:T().optional(),oneOf:k(A({const:T(),title:T()})),default:T().optional()}),Zd=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),enumNames:k(T()).optional(),default:T().optional()}),Qd=M([Yd,Xd]),$d=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({type:F(`string`),enum:k(T())}),default:k(T()).optional()}),ef=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({anyOf:k(A({const:T(),title:T()}))}),default:k(T()).optional()}),tf=M([$d,ef]),nf=M([Zd,Qd,tf]),rf=M([nf,Kd,qd,Jd]),af=Wl.extend({mode:F(`form`).optional(),message:T(),requestedSchema:A({type:F(`object`),properties:N(T(),rf),required:k(T()).optional()}).catchall(O())}),of=Wl.extend({mode:F(`url`),message:T(),elicitationId:T(),url:T().url()}),sf=M([af,of]),cf=Gl.extend({method:F(`elicitation/create`),params:sf}),lf=Kl.extend({elicitationId:T()}),uf=ql.extend({method:F(`notifications/elicitation/complete`),params:lf}),df=L.extend({action:P([`accept`,`decline`,`cancel`]),content:xl(e=>e===null?void 0:e,N(T(),M([T(),E(),D(),k(T())])).optional())}),ff=A({type:F(`ref/resource`),uri:T()}),pf=A({type:F(`ref/prompt`),name:T()}),mf=Ul.extend({ref:M([pf,ff]),argument:A({name:T(),value:T()}),context:A({arguments:N(T(),T()).optional()}).optional()}),hf=Gl.extend({method:F(`completion/complete`),params:mf}),gf=L.extend({completion:j({values:k(T()).max(100),total:I(E().int()),hasMore:I(D())})}),_f=A({uri:T().startsWith(`file://`),name:T().optional(),_meta:N(T(),O()).optional()}),vf=Gl.extend({method:F(`roots/list`),params:Ul.optional()}),yf=L.extend({roots:k(_f)}),bf=ql.extend({method:F(`notifications/roots/list_changed`),params:Kl.optional()}),xf=j({ttl:E().optional(),pollInterval:E().optional()}),Sf=P([`working`,`input_required`,`completed`,`failed`,`cancelled`]),Cf=A({taskId:T(),status:Sf,ttl:M([E(),Pc()]),createdAt:T(),lastUpdatedAt:T(),pollInterval:I(E()),statusMessage:I(T())}),wf=L.extend({task:Cf}),Tf=Kl.merge(Cf),Ef=ql.extend({method:F(`notifications/tasks/status`),params:Tf}),Df=Gl.extend({method:F(`tasks/get`),params:Ul.extend({taskId:T()})}),Of=L.merge(Cf),kf=Gl.extend({method:F(`tasks/result`),params:Ul.extend({taskId:T()})}),Af=L.loose(),jf=Tu.extend({method:F(`tasks/list`)}),Mf=Eu.extend({tasks:k(Cf)}),Nf=Gl.extend({method:F(`tasks/cancel`),params:Ul.extend({taskId:T()})}),Pf=L.merge(Cf),Ff=M([bu,mu,vu,hf,Md,cd,ad,Fu,Lu,Vu,Gu,qu,Xu,Dd,Sd]),If=M([iu,Cu,_u,bf]),Lf=M([nu,Wd,Gd,df,yf]),Rf=M([bu,Ud,cf,vf]),zf=M([iu,Cu,Pd,nd,Uu,Od,vd,Qu,uf]),Bf=M([nu,gu,yu,gf,_d,od,Iu,Ru,Hu,wd,Cd,ed]),Vf=dc().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:Sl.custom,message:`URL must be parseable`,fatal:!0}),ft}).refine(e=>{let t=new URL(e);return t.protocol!==`javascript:`&&t.protocol!==`data:`&&t.protocol!==`vbscript:`},{message:`URL cannot use javascript:, data:, or vbscript: scheme`}),Hf=j({resource:T().url(),authorization_servers:k(Vf).optional(),jwks_uri:T().url().optional(),scopes_supported:k(T()).optional(),bearer_methods_supported:k(T()).optional(),resource_signing_alg_values_supported:k(T()).optional(),resource_name:T().optional(),resource_documentation:T().optional(),resource_policy_uri:T().url().optional(),resource_tos_uri:T().url().optional(),tls_client_certificate_bound_access_tokens:D().optional(),authorization_details_types_supported:k(T()).optional(),dpop_signing_alg_values_supported:k(T()).optional(),dpop_bound_access_tokens_required:D().optional()}),Uf=j({issuer:T(),authorization_endpoint:Vf,token_endpoint:Vf,registration_endpoint:Vf.optional(),scopes_supported:k(T()).optional(),response_types_supported:k(T()),response_modes_supported:k(T()).optional(),grant_types_supported:k(T()).optional(),token_endpoint_auth_methods_supported:k(T()).optional(),token_endpoint_auth_signing_alg_values_supported:k(T()).optional(),service_documentation:Vf.optional(),revocation_endpoint:Vf.optional(),revocation_endpoint_auth_methods_supported:k(T()).optional(),revocation_endpoint_auth_signing_alg_values_supported:k(T()).optional(),introspection_endpoint:T().optional(),introspection_endpoint_auth_methods_supported:k(T()).optional(),introspection_endpoint_auth_signing_alg_values_supported:k(T()).optional(),code_challenge_methods_supported:k(T()).optional(),client_id_metadata_document_supported:D().optional(),authorization_response_iss_parameter_supported:D().optional().catch(void 0),dpop_signing_alg_values_supported:k(T()).optional()}),Wf=j({issuer:T(),authorization_endpoint:Vf,token_endpoint:Vf,userinfo_endpoint:Vf.optional(),jwks_uri:Vf,registration_endpoint:Vf.optional(),scopes_supported:k(T()).optional(),response_types_supported:k(T()),response_modes_supported:k(T()).optional(),grant_types_supported:k(T()).optional(),acr_values_supported:k(T()).optional(),subject_types_supported:k(T()),id_token_signing_alg_values_supported:k(T()),id_token_encryption_alg_values_supported:k(T()).optional(),id_token_encryption_enc_values_supported:k(T()).optional(),userinfo_signing_alg_values_supported:k(T()).optional(),userinfo_encryption_alg_values_supported:k(T()).optional(),userinfo_encryption_enc_values_supported:k(T()).optional(),request_object_signing_alg_values_supported:k(T()).optional(),request_object_encryption_alg_values_supported:k(T()).optional(),request_object_encryption_enc_values_supported:k(T()).optional(),token_endpoint_auth_methods_supported:k(T()).optional(),token_endpoint_auth_signing_alg_values_supported:k(T()).optional(),display_values_supported:k(T()).optional(),claim_types_supported:k(T()).optional(),claims_supported:k(T()).optional(),service_documentation:T().optional(),claims_locales_supported:k(T()).optional(),ui_locales_supported:k(T()).optional(),claims_parameter_supported:D().optional(),request_parameter_supported:D().optional(),request_uri_parameter_supported:D().optional(),require_request_uri_registration:D().optional(),op_policy_uri:Vf.optional(),op_tos_uri:Vf.optional(),client_id_metadata_document_supported:D().optional(),authorization_response_iss_parameter_supported:D().optional().catch(void 0)}),Gf=A({...Wf.shape,...Uf.pick({code_challenge_methods_supported:!0}).shape}),Kf=A({access_token:T(),id_token:T().optional(),token_type:T(),expires_in:El().optional(),scope:T().optional(),refresh_token:T().optional(),issuer:T().optional().catch(void 0)}).strip(),qf=A({issued_token_type:F(`urn:ietf:params:oauth:token-type:id-jag`),access_token:T(),token_type:T().optional(),expires_in:E().optional(),scope:T().optional()}).strip(),Jf=A({error:T(),error_description:T().optional(),error_uri:T().optional()}),Yf=Vf.optional().or(F(``).transform(()=>void 0)),Xf=A({redirect_uris:k(Vf),token_endpoint_auth_method:T().optional(),grant_types:k(T()).optional(),response_types:k(T()).optional(),application_type:T().optional(),client_name:T().optional(),client_uri:Vf.optional(),logo_uri:Yf,scope:T().optional(),contacts:k(T()).optional(),tos_uri:Yf,policy_uri:T().optional(),jwks_uri:Vf.optional(),jwks:Ic().optional(),software_id:T().optional(),software_version:T().optional(),software_statement:T().optional()}).strip(),Zf=A({client_id:T(),client_secret:T().optional(),client_id_issued_at:E().optional(),client_secret_expires_at:E().optional(),issuer:T().optional().catch(void 0)}).strip(),Qf=Xf.merge(Zf),$f=A({error:T(),error_description:T().optional()}).strip(),ep=A({token:T(),token_type_hint:T().optional()}).strip(),tp=Symbol.for(`mcp.sdk.errorBrands`);function np(e,t){let n=new Set,r=t;for(;typeof r==`function`;){let e=r.mcpBrand;Object.prototype.hasOwnProperty.call(r,`mcpBrand`)&&typeof e==`string`&&n.add(e),r=Object.getPrototypeOf(r)}n.size!==0&&Object.defineProperty(e,tp,{value:n,enumerable:!1,configurable:!0})}function rp(e,t){try{if(typeof t==`object`&&t&&Object.prototype.hasOwnProperty.call(e,`mcpBrand`)&&typeof e.mcpBrand==`string`&&Object.prototype.hasOwnProperty.call(t,tp)){let n=t[tp];if(n&&typeof n.has==`function`&&n.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}(class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e,t,n){super(t),this.code=e,this.errorUri=n,this.name=`OAuthError`,np(this,new.target)}toResponseObject(){let e={error:this.code,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}});var R=function(e){return e.NotConnected=`NOT_CONNECTED`,e.AlreadyConnected=`ALREADY_CONNECTED`,e.NotInitialized=`NOT_INITIALIZED`,e.CapabilityNotSupported=`CAPABILITY_NOT_SUPPORTED`,e.RequestTimeout=`REQUEST_TIMEOUT`,e.ConnectionClosed=`CONNECTION_CLOSED`,e.SendFailed=`SEND_FAILED`,e.InvalidResult=`INVALID_RESULT`,e.UnsupportedResultType=`UNSUPPORTED_RESULT_TYPE`,e.InputRequiredRoundsExceeded=`INPUT_REQUIRED_ROUNDS_EXCEEDED`,e.ListPaginationExceeded=`LIST_PAGINATION_EXCEEDED`,e.MethodNotSupportedByProtocolVersion=`METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION`,e.EraNegotiationFailed=`ERA_NEGOTIATION_FAILED`,e.ClientHttpNotImplemented=`CLIENT_HTTP_NOT_IMPLEMENTED`,e.ClientHttpAuthentication=`CLIENT_HTTP_AUTHENTICATION`,e.ClientHttpForbidden=`CLIENT_HTTP_FORBIDDEN`,e.ClientHttpUnexpectedContent=`CLIENT_HTTP_UNEXPECTED_CONTENT`,e.ClientHttpFailedToOpenStream=`CLIENT_HTTP_FAILED_TO_OPEN_STREAM`,e.ClientHttpFailedToTerminateSession=`CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION`,e}({}),z=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e,t,n,r){super(t,r),this.code=e,this.data=n,this.name=`SdkError`,np(this,new.target)}},ip=class extends z{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkHttpError`})}constructor(e,t,n,r){super(e,t,n,r),this.name=`SdkHttpError`}get status(){return this.data.status}get statusText(){return this.data.statusText}},ap=`2026-07-28`,op=[ap];function sp(e){return e>=ap}function cp(e){return e.filter(e=>!sp(e))}function lp(e){return e.filter(e=>sp(e))}function up(e){let t=e.structuredContent;return t===void 0||!(typeof t!=`object`||!t||Array.isArray(t))||(e.content?.some(e=>e.type===`text`)??!1)?e:{...e,content:[...e.content??[],{type:`text`,text:JSON.stringify(t)}]}}var dp=[`task`,`inputRequests`,`requestState`];function fp(e){return typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0||dp.some(t=>t in e)?e:{...e,content:[]}}function pp(){let e=_l(()=>M([T(),E(),D(),Pc(),N(T(),e),k(e)])),t=N(T(),e),n=M([T(),E().int()]),r=T(),i=A({ttl:E().optional()}),a=A({taskId:T()}),o=j({progressToken:n.optional(),"io.modelcontextprotocol/related-task":a.optional()}),s=A({_meta:o.optional()}),c=s.extend({task:i.optional()}),l=A({method:T(),params:s.loose().optional()}),u=A({_meta:o.optional()}),d=A({method:T(),params:u.loose().optional()}),f=j({_meta:o.optional()}),p=M([T(),E().int()]),m=f.strict(),h=u.extend({requestId:p.optional(),reason:T().optional()}),g=d.extend({method:F(`notifications/cancelled`),params:h}),_=A({src:T(),mimeType:T().optional(),sizes:k(T()).optional(),theme:P([`light`,`dark`]).optional()}),v=A({icons:k(_).optional()}),y=A({name:T(),title:T().optional()}),ee=y.extend({...y.shape,...v.shape,version:T(),websiteUrl:T().optional(),description:T().optional()}),te=xl(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Kc(A({form:Kc(A({applyDefaults:D().optional()}),t).optional(),url:t.optional()}),t.optional())),ne=j({list:t.optional(),cancel:t.optional(),requests:j({sampling:j({createMessage:t.optional()}).optional(),elicitation:j({create:t.optional()}).optional()}).optional()}),re=j({list:t.optional(),cancel:t.optional(),requests:j({tools:j({call:t.optional()}).optional()}).optional()}),ie=A({experimental:N(T(),t).optional(),sampling:A({context:t.optional(),tools:t.optional()}).optional(),elicitation:te.optional(),roots:A({listChanged:D().optional()}).optional(),tasks:ne.optional(),extensions:N(T(),t).optional()}),ae=s.extend({protocolVersion:T(),capabilities:ie,clientInfo:ee}),oe=l.extend({method:F(`initialize`),params:ae}),se=A({experimental:N(T(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:A({listChanged:D().optional()}).optional(),resources:A({subscribe:D().optional(),listChanged:D().optional()}).optional(),tools:A({listChanged:D().optional()}).optional(),tasks:re.optional(),extensions:N(T(),t).optional()}),ce=f.extend({protocolVersion:T(),capabilities:se,serverInfo:ee,instructions:T().optional()}),le=d.extend({method:F(`notifications/initialized`),params:u.optional()}),ue=l.extend({method:F(`ping`),params:s.optional()}),de=A({progress:E(),total:I(E()),message:I(T())}),fe=A({...u.shape,...de.shape,progressToken:n}),pe=d.extend({method:F(`notifications/progress`),params:fe}),b=s.extend({cursor:r.optional()}),me=l.extend({params:b.optional()}),he=f.extend({nextCursor:r.optional()}),ge=A({uri:T(),mimeType:I(T()),_meta:N(T(),O()).optional()}),_e=ge.extend({text:T()}),ve=T().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),ye=ge.extend({blob:ve}),be=P([`user`,`assistant`]),xe=A({audience:k(be).optional(),priority:E().min(0).max(1).optional(),lastModified:wl({offset:!0}).optional()}),Se=A({...y.shape,...v.shape,uri:T(),description:I(T()),mimeType:I(T()),size:I(E()),annotations:xe.optional(),_meta:I(j({}))}),Ce=A({...y.shape,...v.shape,uriTemplate:T(),description:I(T()),mimeType:I(T()),annotations:xe.optional(),_meta:I(j({}))}),we=me.extend({method:F(`resources/list`)}),Te=he.extend({resources:k(Se)}),Ee=me.extend({method:F(`resources/templates/list`)}),De=he.extend({resourceTemplates:k(Ce)}),x=s.extend({uri:T()}),Oe=x,ke=l.extend({method:F(`resources/read`),params:Oe}),Ae=f.extend({contents:k(M([_e,ye]))}),je=d.extend({method:F(`notifications/resources/list_changed`),params:u.optional()}),Me=x,Ne=l.extend({method:F(`resources/subscribe`),params:Me}),S=x,Pe=l.extend({method:F(`resources/unsubscribe`),params:S}),Fe=u.extend({uri:T()}),Ie=d.extend({method:F(`notifications/resources/updated`),params:Fe}),Le=A({name:T(),description:I(T()),required:I(D())}),Re=A({...y.shape,...v.shape,description:I(T()),arguments:I(k(Le)),_meta:I(j({}))}),ze=me.extend({method:F(`prompts/list`)}),Be=he.extend({prompts:k(Re)}),Ve=s.extend({name:T(),arguments:N(T(),T()).optional()}),He=l.extend({method:F(`prompts/get`),params:Ve}),Ue=A({type:F(`text`),text:T(),annotations:xe.optional(),_meta:N(T(),O()).optional()}),We=A({type:F(`image`),data:ve,mimeType:T(),annotations:xe.optional(),_meta:N(T(),O()).optional()}),Ge=A({type:F(`audio`),data:ve,mimeType:T(),annotations:xe.optional(),_meta:N(T(),O()).optional()}),Ke=A({type:F(`tool_use`),name:T(),id:T(),input:N(T(),O()),_meta:N(T(),O()).optional()}),qe=A({type:F(`resource`),resource:M([_e,ye]),annotations:xe.optional(),_meta:N(T(),O()).optional()}),Je=Se.extend({type:F(`resource_link`)}),Ye=M([Ue,We,Ge,Je,qe]),Xe=A({role:be,content:Ye}),Ze=f.extend({description:T().optional(),messages:k(Xe)}),Qe=d.extend({method:F(`notifications/prompts/list_changed`),params:u.optional()}),$e=A({title:T().optional(),readOnlyHint:D().optional(),destructiveHint:D().optional(),idempotentHint:D().optional(),openWorldHint:D().optional()}),et=A({taskSupport:P([`required`,`optional`,`forbidden`]).optional()}),tt=A({...y.shape,...v.shape,description:T().optional(),inputSchema:A({type:F(`object`),properties:N(T(),e).optional(),required:k(T()).optional()}).catchall(O()),outputSchema:A({type:F(`object`),properties:N(T(),e).optional(),required:k(T()).optional()}).catchall(O()).optional(),annotations:$e.optional(),execution:et.optional(),_meta:N(T(),O()).optional()}),nt=me.extend({method:F(`tools/list`)}),rt=he.extend({tools:k(tt)}),it=f.extend({content:k(Ye),structuredContent:N(T(),O()).optional(),isError:D().optional()}),at=c.extend({name:T(),arguments:N(T(),O()).optional()}),ot=l.extend({method:F(`tools/call`),params:at}),st=d.extend({method:F(`notifications/tools/list_changed`),params:u.optional()}),ct=P([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),lt=s.extend({level:ct}),ut=l.extend({method:F(`logging/setLevel`),params:lt}),dt=u.extend({level:ct,logger:T().optional(),data:O()}),ft=d.extend({method:F(`notifications/message`),params:dt}),pt=A({name:T().optional()}),mt=A({hints:k(pt).optional(),costPriority:E().min(0).max(1).optional(),speedPriority:E().min(0).max(1).optional(),intelligencePriority:E().min(0).max(1).optional()}),ht=A({mode:P([`auto`,`required`,`none`]).optional()}),C=A({type:F(`tool_result`),toolUseId:T().describe(`The unique identifier for the corresponding tool call.`),content:k(Ye),structuredContent:A({}).loose().optional(),isError:D().optional(),_meta:N(T(),O()).optional()}),gt=Wc(`type`,[Ue,We,Ge]),_t=Wc(`type`,[Ue,We,Ge,Ke,C]),vt=A({role:be,content:M([_t,k(_t)]),_meta:N(T(),O()).optional()}),yt=c.extend({messages:k(vt),modelPreferences:mt.optional(),systemPrompt:T().optional(),includeContext:P([`none`,`thisServer`,`allServers`]).optional(),temperature:E().optional(),maxTokens:E().int(),stopSequences:k(T()).optional(),metadata:t.optional(),tools:k(tt).optional(),toolChoice:ht.optional()}),bt=l.extend({method:F(`sampling/createMessage`),params:yt}),xt=f.extend({model:T(),stopReason:I(P([`endTurn`,`stopSequence`,`maxTokens`]).or(T())),role:be,content:gt}),St=f.extend({model:T(),stopReason:I(P([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(T())),role:be,content:M([_t,k(_t)])}),Ct=A({type:F(`boolean`),title:T().optional(),description:T().optional(),default:D().optional()}),wt=A({type:F(`string`),title:T().optional(),description:T().optional(),minLength:E().optional(),maxLength:E().optional(),format:P([`email`,`uri`,`date`,`date-time`]).optional(),default:T().optional()}),Tt=A({type:P([`number`,`integer`]),title:T().optional(),description:T().optional(),minimum:E().optional(),maximum:E().optional(),default:E().optional()}),Et=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),default:T().optional()}),Dt=A({type:F(`string`),title:T().optional(),description:T().optional(),oneOf:k(A({const:T(),title:T()})),default:T().optional()}),Ot=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),enumNames:k(T()).optional(),default:T().optional()}),kt=M([Et,Dt]),At=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({type:F(`string`),enum:k(T())}),default:k(T()).optional()}),jt=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({anyOf:k(A({const:T(),title:T()}))}),default:k(T()).optional()}),Mt=M([At,jt]),Nt=M([Ot,kt,Mt]),Pt=M([Nt,Ct,wt,Tt]),Ft=c.extend({mode:F(`form`).optional(),message:T(),requestedSchema:A({type:F(`object`),properties:N(T(),Pt),required:k(T()).optional()}).catchall(O())}),It=c.extend({mode:F(`url`),message:T(),elicitationId:T(),url:T().url()}),Lt=M([Ft,It]),Rt=l.extend({method:F(`elicitation/create`),params:Lt}),zt=u.extend({elicitationId:T()}),Bt=d.extend({method:F(`notifications/elicitation/complete`),params:zt}),Vt=f.extend({action:P([`accept`,`decline`,`cancel`]),content:xl(e=>e===null?void 0:e,N(T(),M([T(),E(),D(),k(T())])).optional())}),Ht=A({type:F(`ref/resource`),uri:T()}),Ut=A({type:F(`ref/prompt`),name:T()}),Wt=s.extend({ref:M([Ut,Ht]),argument:A({name:T(),value:T()}),context:A({arguments:N(T(),T()).optional()}).optional()}),Gt=l.extend({method:F(`completion/complete`),params:Wt}),Kt=f.extend({completion:j({values:k(T()).max(100),total:I(E().int()),hasMore:I(D())})}),qt=A({uri:T().startsWith(`file://`),name:T().optional(),_meta:N(T(),O()).optional()}),Jt=l.extend({method:F(`roots/list`),params:s.optional()}),Yt=f.extend({roots:k(qt)}),Xt=d.extend({method:F(`notifications/roots/list_changed`),params:u.optional()}),Zt=j({ttl:E().optional(),pollInterval:E().optional()}),Qt=P([`working`,`input_required`,`completed`,`failed`,`cancelled`]),$t=A({taskId:T(),status:Qt,ttl:M([E(),Pc()]),createdAt:T(),lastUpdatedAt:T(),pollInterval:I(E()),statusMessage:I(T())}),en=f.extend({task:$t}),tn=u.merge($t),nn=d.extend({method:F(`notifications/tasks/status`),params:tn}),rn=l.extend({method:F(`tasks/get`),params:s.extend({taskId:T()})}),an=f.merge($t),on=l.extend({method:F(`tasks/result`),params:s.extend({taskId:T()})}),sn=f.loose(),cn=me.extend({method:F(`tasks/list`)}),ln=he.extend({tasks:k($t)}),un=l.extend({method:F(`tasks/cancel`),params:s.extend({taskId:T()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,TaskMetadataSchema:i,RelatedTaskMetadataSchema:a,RequestMetaSchema:o,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:u,NotificationSchema:d,ResultSchema:f,RequestIdSchema:p,EmptyResultSchema:m,CancelledNotificationParamsSchema:h,CancelledNotificationSchema:g,IconSchema:_,IconsSchema:v,BaseMetadataSchema:y,ImplementationSchema:ee,ClientTasksCapabilitySchema:ne,ServerTasksCapabilitySchema:re,ClientCapabilitiesSchema:ie,InitializeRequestParamsSchema:ae,InitializeRequestSchema:oe,ServerCapabilitiesSchema:se,InitializeResultSchema:ce,InitializedNotificationSchema:le,PingRequestSchema:ue,ProgressSchema:de,ProgressNotificationParamsSchema:fe,ProgressNotificationSchema:pe,PaginatedRequestParamsSchema:b,PaginatedRequestSchema:me,PaginatedResultSchema:he,ResourceContentsSchema:ge,TextResourceContentsSchema:_e,BlobResourceContentsSchema:ye,RoleSchema:be,AnnotationsSchema:xe,ResourceSchema:Se,ResourceTemplateSchema:Ce,ListResourcesRequestSchema:we,ListResourcesResultSchema:Te,ListResourceTemplatesRequestSchema:Ee,ListResourceTemplatesResultSchema:De,ResourceRequestParamsSchema:x,ReadResourceRequestParamsSchema:Oe,ReadResourceRequestSchema:ke,ReadResourceResultSchema:Ae,ResourceListChangedNotificationSchema:je,SubscribeRequestParamsSchema:Me,SubscribeRequestSchema:Ne,UnsubscribeRequestParamsSchema:S,UnsubscribeRequestSchema:Pe,ResourceUpdatedNotificationParamsSchema:Fe,ResourceUpdatedNotificationSchema:Ie,PromptArgumentSchema:Le,PromptSchema:Re,ListPromptsRequestSchema:ze,ListPromptsResultSchema:Be,GetPromptRequestParamsSchema:Ve,GetPromptRequestSchema:He,TextContentSchema:Ue,ImageContentSchema:We,AudioContentSchema:Ge,ToolUseContentSchema:Ke,EmbeddedResourceSchema:qe,ResourceLinkSchema:Je,ContentBlockSchema:Ye,PromptMessageSchema:Xe,GetPromptResultSchema:Ze,PromptListChangedNotificationSchema:Qe,ToolAnnotationsSchema:$e,ToolExecutionSchema:et,ToolSchema:tt,ListToolsRequestSchema:nt,ListToolsResultSchema:rt,CallToolResultSchema:it,CallToolRequestParamsSchema:at,CallToolRequestSchema:ot,ToolListChangedNotificationSchema:st,LoggingLevelSchema:ct,SetLevelRequestParamsSchema:lt,SetLevelRequestSchema:ut,LoggingMessageNotificationParamsSchema:dt,LoggingMessageNotificationSchema:ft,ModelHintSchema:pt,ModelPreferencesSchema:mt,ToolChoiceSchema:ht,ToolResultContentSchema:C,SamplingContentSchema:gt,SamplingMessageContentBlockSchema:_t,SamplingMessageSchema:vt,CreateMessageRequestParamsSchema:yt,CreateMessageRequestSchema:bt,CreateMessageResultSchema:xt,CreateMessageResultWithToolsSchema:St,BooleanSchemaSchema:Ct,StringSchemaSchema:wt,NumberSchemaSchema:Tt,UntitledSingleSelectEnumSchemaSchema:Et,TitledSingleSelectEnumSchemaSchema:Dt,LegacyTitledEnumSchemaSchema:Ot,SingleSelectEnumSchemaSchema:kt,UntitledMultiSelectEnumSchemaSchema:At,TitledMultiSelectEnumSchemaSchema:jt,MultiSelectEnumSchemaSchema:Mt,EnumSchemaSchema:Nt,PrimitiveSchemaDefinitionSchema:Pt,ElicitRequestFormParamsSchema:Ft,ElicitRequestURLParamsSchema:It,ElicitRequestParamsSchema:Lt,ElicitRequestSchema:Rt,ElicitationCompleteNotificationParamsSchema:zt,ElicitationCompleteNotificationSchema:Bt,ElicitResultSchema:Vt,ResourceTemplateReferenceSchema:Ht,PromptReferenceSchema:Ut,CompleteRequestParamsSchema:Wt,CompleteRequestSchema:Gt,CompleteResultSchema:Kt,RootSchema:qt,ListRootsRequestSchema:Jt,ListRootsResultSchema:Yt,RootsListChangedNotificationSchema:Xt,TaskCreationParamsSchema:Zt,TaskStatusSchema:Qt,TaskSchema:$t,CreateTaskResultSchema:en,TaskStatusNotificationParamsSchema:tn,TaskStatusNotificationSchema:nn,GetTaskRequestSchema:rn,GetTaskResultSchema:an,GetTaskPayloadRequestSchema:on,GetTaskPayloadResultSchema:sn,ListTasksRequestSchema:cn,ListTasksResultSchema:ln,CancelTaskRequestSchema:un,CancelTaskResultSchema:f.merge($t),ClientRequestSchema:M([ue,oe,Gt,ut,He,ze,we,Ee,ke,Ne,Pe,ot,nt,rn,on,cn,un]),ClientNotificationSchema:M([g,pe,le,Xt,nn]),ClientResultSchema:M([m,xt,St,Vt,Yt,an,ln,en]),ServerRequestSchema:M([ue,bt,Rt,Jt,rn,on,cn,un]),ServerNotificationSchema:M([g,pe,ft,Ie,je,st,Qe,nn,Bt]),ServerResultSchema:M([m,ce,Kt,Ze,Be,Te,De,Ae,it,rt,an,ln,en]),CallToolResultWireSchema:O().superRefine((e,t)=>{if(!(typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0)){for(let n of dp)if(n in e){t.addIssue({code:`custom`,message:`content is required when the body carries \'${n}\' \u2014 another result family cannot default into an empty tools/call success`});return}}}).transform(fp).pipe(it)}}var mp;function hp(){return mp??=pp()}function gp(e){return e.type!==`object`}var _p=new Set([`const`,`enum`,`default`,`examples`]),vp=new Set([`properties`,`patternProperties`,`$defs`,`definitions`,`dependentSchemas`,`dependencies`]);function yp(e){return e!==void 0&&!(typeof e==`string`&&e.startsWith(`#`))}function bp(e){let t=typeof e.$schema==`string`?e.$schema:void 0;if(yp(e.$id))return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:e},required:[`result`]};let n=y(e.$schema)&&e.$recursiveAnchor!==!0,r=(e,t)=>{if(Array.isArray(e))return e.map(e=>r(e,!1));if(typeof e!=`object`||!e||!t&&yp(e.$id))return e;let i={},a=!1;for(let[o,s]of Object.entries(e))t?i[o]=r(s,!1):(o===`$ref`||o===`$dynamicRef`)&&typeof s==`string`?i[o]=s===`#`?`#/properties/result`:s.startsWith(`#/`)?`#/properties/result${s.slice(1)}`:s:o===`$recursiveRef`&&s===`#`&&n?a=!0:_p.has(o)?i[o]=s:vp.has(o)?i[o]=r(s,!0):i[o]=r(s,!1);return a&&(`$ref`in i?i.allOf=[...Array.isArray(i.allOf)?i.allOf:[],{$ref:`#/properties/result`}]:i.$ref=`#/properties/result`),i};return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:r(e,!1)},required:[`result`]}}var xp={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Sp={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},Cp={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},wp;function Tp(){if(wp)return wp;let e=hp();return wp={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}},wp}function Ep(e){return Object.prototype.hasOwnProperty.call(xp,e)}function Dp(e){return Object.prototype.hasOwnProperty.call(Sp,e)}function Op(e){return Object.prototype.hasOwnProperty.call(Cp,e)}function kp(e){return Op(e)?Tp().resultSchemas[e]:void 0}function Ap(e){return Ep(e)?Tp().requestSchemas[e]:void 0}function jp(e){return Dp(e)?Tp().notificationSchemas[e]:void 0}Object.keys(xp),Object.keys(Sp);function Mp(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Np(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var Pp={ok:!1,reason:`not-in-era`};function Fp(e){return Mp(e)&&Mp(e.outputSchema)&&gp(e.outputSchema)}function Ip(e){return e}var Lp={era:`2025-11-25`,hasRequestMethod:Ep,hasNotificationMethod:Dp,validateRequest:(e,t)=>Np(Ap(e),t),validateResult:(e,t)=>Np(kp(e),t),validateNotification:(e,t)=>Np(jp(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>Pp,validateInputResponse:()=>Pp,samplingResultVariant:((e,t)=>{let n=hp();return Np(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)}),outboundEnvelope:e=>void 0,validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let n=up(e),r=n.structuredContent;if(r===void 0)return n;let i=typeof r!=`object`||!r||Array.isArray(r),a=t!==void 0&&gp(t);return!i&&!a?n:{...n,structuredContent:{result:r}}},decodeResult(e,t){if(Mp(t)&&`resultType`in t){let e={...t};return delete e.resultType,{kind:`complete`,result:Ip(e)}}return{kind:`complete`,result:Ip(t)}},encodeResult(e,t){if(e!==`tools/list`)return t;let n=t.tools;return!Array.isArray(n)||!n.some(e=>Fp(e))?t:{...t,tools:n.map(e=>Fp(e)?{...e,outputSchema:bp(e.outputSchema)}:e)}},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope:e=>void 0};function Rp(){let e=_l(()=>M([T(),E(),D(),Pc(),N(T(),e),k(e)])),t=N(T(),e),n=M([T(),E().int()]),r=T(),i=M([T(),E().int()]),a=P([`user`,`assistant`]),o=P([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),s=T().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),c=A({ttl:E().optional()}),l=A({taskId:T()}),u=j({progressToken:n.optional(),"io.modelcontextprotocol/related-task":l.optional()}),d=A({_meta:u.optional()}),f=d.extend({task:c.optional()}),p=A({_meta:u.optional()}),m=A({method:T(),params:p.loose().optional()}),h=A({src:T(),mimeType:T().optional(),sizes:k(T()).optional(),theme:P([`light`,`dark`]).optional()}),g=A({icons:k(h).optional()}),_=A({name:T(),title:T().optional()}),v=_.extend({..._.shape,...g.shape,version:T(),websiteUrl:T().optional(),description:T().optional()}),y=xl(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Kc(A({form:Kc(A({applyDefaults:D().optional()}),t).optional(),url:t.optional()}),t.optional())),ee=j({list:t.optional(),cancel:t.optional(),requests:j({sampling:j({createMessage:t.optional()}).optional(),elicitation:j({create:t.optional()}).optional()}).optional()}),te=j({list:t.optional(),cancel:t.optional(),requests:j({tools:j({call:t.optional()}).optional()}).optional()}),ne=A({experimental:N(T(),t).optional(),sampling:A({context:t.optional(),tools:t.optional()}).optional(),elicitation:y.optional(),roots:A({listChanged:D().optional()}).optional(),tasks:ee.optional(),extensions:N(T(),t).optional()}),re=A({experimental:N(T(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:A({listChanged:D().optional()}).optional(),resources:A({subscribe:D().optional(),listChanged:D().optional()}).optional(),tools:A({listChanged:D().optional()}).optional(),tasks:te.optional(),extensions:N(T(),t).optional()}),ie=A({progress:E(),total:I(E()),message:I(T())}),ae=A({...p.shape,...ie.shape,progressToken:n}),oe=m.extend({method:F(`notifications/progress`),params:ae}),se=p.extend({level:o,logger:T().optional(),data:O()}),ce=m.extend({method:F(`notifications/message`),params:se}),le=A({uri:T(),mimeType:I(T()),_meta:N(T(),O()).optional()}),ue=le.extend({text:T()}),de=le.extend({blob:s}),fe=A({audience:k(a).optional(),priority:E().min(0).max(1).optional(),lastModified:wl({offset:!0}).optional()}),pe=A({..._.shape,...g.shape,uri:T(),description:I(T()),mimeType:I(T()),size:I(E()),annotations:fe.optional(),_meta:I(j({}))}),b=A({..._.shape,...g.shape,uriTemplate:T(),description:I(T()),mimeType:I(T()),annotations:fe.optional(),_meta:I(j({}))}),me=m.extend({method:F(`notifications/resources/list_changed`),params:p.optional()}),he=p.extend({uri:T()}),ge=m.extend({method:F(`notifications/resources/updated`),params:he}),_e=A({name:T(),description:I(T()),required:I(D())}),ve=A({..._.shape,...g.shape,description:I(T()),arguments:I(k(_e)),_meta:I(j({}))}),ye=m.extend({method:F(`notifications/prompts/list_changed`),params:p.optional()}),be=A({type:F(`text`),text:T(),annotations:fe.optional(),_meta:N(T(),O()).optional()}),xe=A({type:F(`image`),data:s,mimeType:T(),annotations:fe.optional(),_meta:N(T(),O()).optional()}),Se=A({type:F(`audio`),data:s,mimeType:T(),annotations:fe.optional(),_meta:N(T(),O()).optional()}),Ce=A({type:F(`tool_use`),name:T(),id:T(),input:N(T(),O()),_meta:N(T(),O()).optional()}),we=A({type:F(`resource`),resource:M([ue,de]),annotations:fe.optional(),_meta:N(T(),O()).optional()}),Te=pe.extend({type:F(`resource_link`)}),Ee=M([be,xe,Se,Te,we]),De=A({role:a,content:Ee}),x=A({title:T().optional(),readOnlyHint:D().optional(),destructiveHint:D().optional(),idempotentHint:D().optional(),openWorldHint:D().optional()}),Oe=m.extend({method:F(`notifications/tools/list_changed`),params:p.optional()}),ke=A({name:T().optional()}),Ae=A({hints:k(ke).optional(),costPriority:E().min(0).max(1).optional(),speedPriority:E().min(0).max(1).optional(),intelligencePriority:E().min(0).max(1).optional()}),je=A({mode:P([`auto`,`required`,`none`]).optional()}),Me=A({type:F(`boolean`),title:T().optional(),description:T().optional(),default:D().optional()}),Ne=A({type:F(`string`),title:T().optional(),description:T().optional(),minLength:E().optional(),maxLength:E().optional(),format:P([`email`,`uri`,`date`,`date-time`]).optional(),default:T().optional()}),S=A({type:P([`number`,`integer`]),title:T().optional(),description:T().optional(),minimum:E().optional(),maximum:E().optional(),default:E().optional()}),Pe=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),default:T().optional()}),Fe=A({type:F(`string`),title:T().optional(),description:T().optional(),oneOf:k(A({const:T(),title:T()})),default:T().optional()}),Ie=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),enumNames:k(T()).optional(),default:T().optional()}),Le=M([Pe,Fe]),Re=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({type:F(`string`),enum:k(T())}),default:k(T()).optional()}),ze=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({anyOf:k(A({const:T(),title:T()}))}),default:k(T()).optional()}),Be=M([Re,ze]),Ve=M([Ie,Le,Be]),He=M([Ve,Me,Ne,S]),Ue=f.extend({mode:F(`form`).optional(),message:T(),requestedSchema:A({type:F(`object`),properties:N(T(),He),required:k(T()).optional()}).catchall(O())}),We=A({type:F(`ref/resource`),uri:T()}),Ge=A({type:F(`ref/prompt`),name:T()}),Ke=A({uri:T().startsWith(`file://`),name:T().optional(),_meta:N(T(),O()).optional()}),qe=ne.shape,Je=A({experimental:qe.experimental,sampling:qe.sampling,elicitation:qe.elicitation,roots:qe.roots,extensions:qe.extensions}),Ye=re.shape,Xe=A({experimental:Ye.experimental,logging:Ye.logging,completions:Ye.completions,prompts:Ye.prompts,resources:Ye.resources,tools:Ye.tools,extensions:Ye.extensions}),Ze=j({progressToken:n.optional(),[kl]:T(),[Al]:v.optional(),[Ml]:Je,[Pl]:o.optional()}),Qe=A({..._.shape,...g.shape,description:T().optional(),inputSchema:j({$schema:T().optional(),type:F(`object`)}),outputSchema:j({$schema:T().optional()}).optional(),annotations:x.optional(),_meta:N(T(),O()).optional()}),$e=A({type:F(`tool_result`),toolUseId:T(),content:k(Ee),structuredContent:O().optional(),isError:D().optional(),_meta:N(T(),O()).optional()}),et=M([be,xe,Se,Ce,$e]),tt=A({role:a,content:M([et,k(et)]),_meta:N(T(),O()).optional()}),nt=T(),rt=j({[jl]:v.optional().catch(void 0)}),it=rt.optional();function at(e){return j({_meta:it,resultType:nt.default(`complete`),...e})}let ot=at({}),st=at({nextCursor:r.optional()}),ct=at({content:k(Ee),structuredContent:O().optional(),isError:D().optional()}),lt=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),tools:k(Qe),nextCursor:r.optional()}),ut=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),prompts:k(ve),nextCursor:r.optional()}),dt=at({description:T().optional(),messages:k(De)}),ft=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),resources:k(pe),nextCursor:r.optional()}),pt=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),resourceTemplates:k(b),nextCursor:r.optional()}),mt=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),contents:k(M([ue,de]))}),ht=at({completion:A({values:k(T()).max(100),total:E().int().optional(),hasMore:D().optional()}).loose()}),C=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`])}),gt=at({ttlMs:E().int().min(0).catch(0),cacheScope:P([`public`,`private`]).catch(`private`),supportedVersions:k(T()),capabilities:Xe,instructions:T().optional()}),_t=A({messages:k(tt),modelPreferences:Ae.optional(),systemPrompt:T().optional(),includeContext:P([`none`,`thisServer`,`allServers`]).optional(),temperature:E().optional(),maxTokens:E().int(),stopSequences:k(T()).optional(),metadata:t.optional(),tools:k(Qe).optional(),toolChoice:je.optional()}),vt=A({method:F(`sampling/createMessage`),params:_t}),yt=A({method:F(`roots/list`),params:A({_meta:N(T(),O()).optional()}).optional()}),bt=A({...tt.shape,model:T(),stopReason:T().optional()}),xt=A({roots:k(Ke)}),St=A({action:P([`accept`,`decline`,`cancel`]),content:N(T(),M([T(),E(),D(),k(T())])).optional()}),Ct=A({mode:F(`url`),message:T(),url:T().url()}),wt=M([Ue,Ct]),Tt=A({method:F(`elicitation/create`),params:wt}),Et=M([vt,yt,Tt]),Dt=M([bt,xt,St]),Ot=N(T(),Et),kt=N(T(),Dt),At=at({inputRequests:Ot.optional(),requestState:T().optional()}),jt={inputResponses:kt.optional(),requestState:T().optional()},Mt=A({_meta:Ze,...jt}),Nt=j({progressToken:n.optional()});function Pt(e,t){return A({method:F(e),params:A({_meta:Ze,...t})})}function Ft(e,t){return A({method:F(e),params:A({_meta:Nt.optional(),...t}).optional()})}let It={name:T(),arguments:N(T(),O()).optional(),...jt},Lt={cursor:r.optional()},Rt=Pt(`tools/call`,It),zt=Pt(`tools/list`,Lt),Bt=Pt(`prompts/list`,Lt),Vt=Pt(`prompts/get`,{name:T(),arguments:N(T(),T()).optional(),...jt}),Ht=Pt(`resources/list`,Lt),Ut=Pt(`resources/templates/list`,Lt),Wt=Pt(`resources/read`,{uri:T(),...jt}),Gt={ref:M([Ge,We]),argument:A({name:T(),value:T()}),context:A({arguments:N(T(),T()).optional()}).optional()},Kt=Pt(`completion/complete`,Gt),qt=Pt(`server/discover`,{}),Jt=A({toolsListChanged:D().optional(),promptsListChanged:D().optional(),resourcesListChanged:D().optional(),resourceSubscriptions:k(T()).optional()}),Yt={notifications:Jt},Xt=Pt(`subscriptions/listen`,Yt),Zt=rt.extend({"io.modelcontextprotocol/subscriptionId":i}),Qt=j({_meta:Zt,resultType:nt.default(`complete`)}),$t={"tools/call":Ft(`tools/call`,It),"tools/list":Ft(`tools/list`,Lt),"prompts/get":Ft(`prompts/get`,{name:T(),arguments:N(T(),T()).optional()}),"prompts/list":Ft(`prompts/list`,Lt),"resources/list":Ft(`resources/list`,Lt),"resources/templates/list":Ft(`resources/templates/list`,Lt),"resources/read":Ft(`resources/read`,{uri:T()}),"completion/complete":Ft(`completion/complete`,Gt),"server/discover":Ft(`server/discover`,{}),"subscriptions/listen":Ft(`subscriptions/listen`,Yt)};function en(e){return j({_meta:it,...e})}let tn={"tools/call":en({content:k(Ee),structuredContent:O().optional(),isError:D().optional()}),"tools/list":en({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),tools:k(Qe),nextCursor:r.optional()}),"prompts/get":en({description:T().optional(),messages:k(De)}),"prompts/list":en({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),prompts:k(ve),nextCursor:r.optional()}),"resources/list":en({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),resources:k(pe),nextCursor:r.optional()}),"resources/templates/list":en({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),resourceTemplates:k(b),nextCursor:r.optional()}),"resources/read":en({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),contents:k(M([ue,de]))}),"completion/complete":en({completion:A({values:k(T()).max(100),total:E().int().optional(),hasMore:D().optional()}).loose()}),"server/discover":en({ttlMs:E().int().min(0).catch(0),cacheScope:P([`public`,`private`]).catch(`private`),supportedVersions:k(T()),capabilities:Xe,instructions:T().optional()}),"subscriptions/listen":en({})},nn=j({"io.modelcontextprotocol/subscriptionId":i.optional()}),rn=A({method:F(`notifications/subscriptions/acknowledged`),params:A({_meta:nn.optional(),notifications:Jt})}),an=A({_meta:nn.optional(),requestId:i,reason:T().optional()}),on=A({method:F(`notifications/cancelled`),params:an}),sn={"notifications/cancelled":on,"notifications/progress":oe,"notifications/message":ce,"notifications/resources/updated":ge,"notifications/resources/list_changed":me,"notifications/tools/list_changed":Oe,"notifications/prompts/list_changed":ye,"notifications/subscriptions/acknowledged":rn},cn=e=>A({jsonrpc:F(`2.0`),id:M([T(),E().int()]),result:e}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,RequestIdSchema:i,RoleSchema:a,LoggingLevelSchema:o,TaskMetadataSchema:c,RelatedTaskMetadataSchema:l,RequestMetaSchema:u,BaseRequestParamsSchema:d,TaskAugmentedRequestParamsSchema:f,NotificationsParamsSchema:p,NotificationSchema:m,IconSchema:h,IconsSchema:g,BaseMetadataSchema:_,ImplementationSchema:v,ClientTasksCapabilitySchema:ee,ServerTasksCapabilitySchema:te,ClientCapabilitiesSchema:ne,ServerCapabilitiesSchema:re,ProgressSchema:ie,ProgressNotificationParamsSchema:ae,ProgressNotificationSchema:oe,LoggingMessageNotificationParamsSchema:se,LoggingMessageNotificationSchema:ce,ResourceContentsSchema:le,TextResourceContentsSchema:ue,BlobResourceContentsSchema:de,AnnotationsSchema:fe,ResourceSchema:pe,ResourceTemplateSchema:b,ResourceListChangedNotificationSchema:me,ResourceUpdatedNotificationParamsSchema:he,ResourceUpdatedNotificationSchema:ge,PromptArgumentSchema:_e,PromptSchema:ve,PromptListChangedNotificationSchema:ye,TextContentSchema:be,ImageContentSchema:xe,AudioContentSchema:Se,ToolUseContentSchema:Ce,EmbeddedResourceSchema:we,ResourceLinkSchema:Te,ContentBlockSchema:Ee,PromptMessageSchema:De,ToolAnnotationsSchema:x,ToolListChangedNotificationSchema:Oe,ModelHintSchema:ke,ModelPreferencesSchema:Ae,ToolChoiceSchema:je,BooleanSchemaSchema:Me,StringSchemaSchema:Ne,NumberSchemaSchema:S,UntitledSingleSelectEnumSchemaSchema:Pe,TitledSingleSelectEnumSchemaSchema:Fe,LegacyTitledEnumSchemaSchema:Ie,SingleSelectEnumSchemaSchema:Le,UntitledMultiSelectEnumSchemaSchema:Re,TitledMultiSelectEnumSchemaSchema:ze,MultiSelectEnumSchemaSchema:Be,EnumSchemaSchema:Ve,PrimitiveSchemaDefinitionSchema:He,ElicitRequestFormParamsSchema:Ue,ResourceTemplateReferenceSchema:We,PromptReferenceSchema:Ge,RootSchema:Ke,ClientCapabilities2026Schema:Je,ServerCapabilities2026Schema:Xe,RequestMetaEnvelopeSchema:Ze,ToolSchema:Qe,ToolResultContentSchema:$e,SamplingMessageContentBlockSchema:et,SamplingMessageSchema:tt,ResultTypeSchema:nt,ResultMetaSchema:rt,ResultSchema:ot,PaginatedResultSchema:st,CallToolResultSchema:ct,ListToolsResultSchema:lt,ListPromptsResultSchema:ut,GetPromptResultSchema:dt,ListResourcesResultSchema:ft,ListResourceTemplatesResultSchema:pt,ReadResourceResultSchema:mt,CompleteResultSchema:ht,CacheableResultSchema:C,DiscoverResultSchema:gt,CreateMessageRequestParamsSchema:_t,CreateMessageRequestSchema:vt,ListRootsRequestSchema:yt,CreateMessageResultSchema:bt,ListRootsResultSchema:xt,ElicitResultSchema:St,ElicitRequestURLParamsSchema:Ct,ElicitRequestParamsSchema:wt,ElicitRequestSchema:Tt,InputRequestSchema:Et,InputResponseSchema:Dt,InputRequestsSchema:Ot,InputResponsesSchema:kt,InputRequiredResultSchema:At,InputResponseRequestParamsSchema:Mt,CallToolRequestSchema:Rt,ListToolsRequestSchema:zt,ListPromptsRequestSchema:Bt,GetPromptRequestSchema:Vt,ListResourcesRequestSchema:Ht,ListResourceTemplatesRequestSchema:Ut,ReadResourceRequestSchema:Wt,CompleteRequestSchema:Kt,DiscoverRequestSchema:qt,SubscriptionFilterSchema:Jt,SubscriptionsListenRequestSchema:Xt,SubscriptionsListenResultMetaSchema:Zt,SubscriptionsListenResultSchema:Qt,dispatchRequestSchemas:$t,dispatchResultSchemas:tn,NotificationMetaSchema:nn,SubscriptionsAcknowledgedNotificationSchema:rn,CancelledNotificationParamsSchema:an,CancelledNotificationSchema:on,notificationSchemas2026:sn,JSONRPCResultResponseSchema:cn(ot),CallToolResultResponseSchema:cn(M([ct,At])),ListToolsResultResponseSchema:cn(lt),ListPromptsResultResponseSchema:cn(ut),GetPromptResultResponseSchema:cn(M([dt,At])),ListResourcesResultResponseSchema:cn(ft),ListResourceTemplatesResultResponseSchema:cn(pt),ReadResourceResultResponseSchema:cn(M([mt,At])),CompleteResultResponseSchema:cn(ht),DiscoverResultResponseSchema:cn(gt),SubscriptionsListenResultResponseSchema:cn(Qt)}}var zp;function Bp(){return zp??=Rp()}var Vp=[`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`resources/read`,`server/discover`];function Hp(e){return Vp.includes(e)}var Up=Symbol(`modelcontextprotocol.resultCacheHintFallback`);function Wp(e){return e[Up]}function Gp(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function Kp(e){return e===`public`||e===`private`}var B=function(e){return e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.ResourceNotFound=-32002]=`ResourceNotFound`,e[e.MissingRequiredClientCapability=-32021]=`MissingRequiredClientCapability`,e[e.UnsupportedProtocolVersion=-32022]=`UnsupportedProtocolVersion`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`,e}({}),qp=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ProtocolError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name=`ProtocolError`,np(this,new.target)}static fromError(t,n,r){if(t===B.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new Yp(e.elicitations,n)}if(t===B.UnsupportedProtocolVersion&&r){let e=r;if(Array.isArray(e.supported)&&typeof e.requested==`string`)return new Xp({supported:e.supported,requested:e.requested},n)}if(t===B.InvalidParams||t===B.ResourceNotFound){let e=r;if(typeof e?.uri==`string`&&(t===B.ResourceNotFound||Object.keys(e).length===1))return new Jp(e.uri,n)}if(t===B.MissingRequiredClientCapability&&r){let e=r;if(e.requiredCapabilities!==null&&typeof e.requiredCapabilities==`object`&&!Array.isArray(e.requiredCapabilities))return new Zp({requiredCapabilities:e.requiredCapabilities},n)}return new e(t,n,r)}},Jp=class extends qp{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ResourceNotFoundError`})}constructor(e,t=`Resource not found: ${e}`){super(B.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},Yp=class extends qp{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UrlElicitationRequiredError`})}constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(B.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},Xp=class extends qp{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnsupportedProtocolVersionError`})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(B.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},Zp=class extends qp{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.MissingRequiredClientCapabilityError`})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(`, `)}`){super(B.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},Qp=0,$p=`private`,em=[`tools/call`,`prompts/get`,`resources/read`];function tm(e,t){let n=t.resultType;if(n===void 0)return{...t,resultType:`complete`};if(n===`complete`||em.includes(e))return t;throw new qp(B.InternalError,`Handler for ${e} returned resultType \'${String(n)}\', but results of ${e} only support \'complete\' on protocol revision 2026-07-28`)}function nm(e,t){let n=Wp(t);if(t.resultType!==`complete`||!Hp(e))return n===void 0?t:sm(t);let r=t,i=Gp(r.ttlMs)?r.ttlMs:am(n),a=Kp(r.cacheScope)?r.cacheScope:om(n),o={...r,ttlMs:i,cacheScope:a};return delete o[Up],o}function rm(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function im(e,t){if(t===void 0)return e;let n=e._meta;return n===void 0?{...e,_meta:{[jl]:t}}:!rm(n)||n[`io.modelcontextprotocol/serverInfo`]!==void 0?e:{...e,_meta:{...n,[jl]:t}}}function am(e){return e!==void 0&&Gp(e.ttlMs)?e.ttlMs:Qp}function om(e){return e!==void 0&&Kp(e.cacheScope)?e.cacheScope:$p}function sm(e){let t={...e};return delete t[Up],t}var cm=[`elicitation/create`,`sampling/createMessage`,`roots/list`],lm;function um(){if(lm)return lm;let e=Bp();return lm={request:{"elicitation/create":A({method:F(`elicitation/create`),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":A({method:F(`sampling/createMessage`),params:e.CreateMessageRequestParamsSchema}),"roots/list":A({method:F(`roots/list`),params:j({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},lm}function dm(e){return cm.includes(e)}function fm(e){return dm(e)?um().request[e]:void 0}function pm(e){return dm(e)?um().response[e]:void 0}var mm={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},hm={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function gm(e){return Object.prototype.hasOwnProperty.call(mm,e)}function _m(e){return Object.prototype.hasOwnProperty.call(hm,e)}function vm(e){return Object.prototype.hasOwnProperty.call(mm,e)}function ym(e){return gm(e)?Bp().dispatchRequestSchemas[e]:void 0}function bm(e){return vm(e)?Bp().dispatchResultSchemas[e]:void 0}function xm(e){return _m(e)?Bp().notificationSchemas2026[e]:void 0}Object.keys(mm),Object.keys(hm);function Sm(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Cm(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var wm={ok:!1,reason:`not-in-era`},Tm=[kl,Ml];function Em(e,t){let n=t,r=!1,i=()=>(r||=(n={...n},!0),n),a=t.tools;e===`tools/list`&&Array.isArray(a)&&a.some(e=>Sm(e)&&`execution`in e)&&(i().tools=a.map(e=>{if(!Sm(e)||!(`execution`in e))return e;let t={...e};return delete t.execution,t}));let o=t.capabilities;if(Sm(o)&&`tasks`in o){let e={...o};delete e.tasks,i().capabilities=e}return n}var Dm={era:`2026-07-28`,hasRequestMethod:gm,hasNotificationMethod:_m,hasInputRequestMethod:e=>fm(e)!==void 0,validateRequest:(e,t)=>Cm(ym(e),t),validateResult:(e,t)=>Cm(bm(e),t),validateNotification:(e,t)=>Cm(xm(e),t),validateInputRequest:(e,t)=>Cm(fm(e),t),validateInputResponse:(e,t)=>Cm(pm(e),t),samplingResultVariant:()=>wm,outboundEnvelope(e){return{[kl]:e.protocolVersion,[Al]:e.clientInfo,[Ml]:e.clientCapabilities,...e.logLevel!==void 0&&{"io.modelcontextprotocol/logLevel":e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let n of Tm)n in e||t.push({key:n,problem:`missing`});let n=Bp().RequestMetaEnvelopeSchema.safeParse(e);if(!n.success)for(let e of n.error.issues){let n=e.path.map(String),r=n.length>0?n.join(`.`):`_meta`;n.length===1&&t.some(e=>e.key===r&&e.problem===`missing`)||t.push({key:r,problem:e.message})}return t},projectCallToolResult:e=>up(e),inputRequestSchema:fm,decodeResult(e,t){if(!Sm(t))return{kind:`invalid`,error:new z(R.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return{kind:`invalid`,error:new z(R.InvalidResult,`Invalid result for ${e}: missing required resultType \u2014 servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:`missing-resultType`})};if(typeof n!=`string`)return{kind:`invalid`,error:new z(R.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n===`input_required`){let n=t.inputRequests,r=Sm(n)?n:{},i=t.requestState,a=t._meta===void 0?void 0:Bp().ResultMetaSchema.safeParse(t._meta),o=a?.success?a.data:void 0;return Object.keys(r).length===0&&typeof i!=`string`?{kind:`invalid`,error:new z(R.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:`input-required-missing-both`})}:{kind:`input_required`,inputRequests:r,...typeof i==`string`&&{requestState:i},...o!==void 0&&{_meta:o}}}if(n!==`complete`)return{kind:`invalid`,error:new z(R.UnsupportedResultType,`Unsupported result type \'${n}\' for ${e}`,{resultType:n,method:e})};let r=km(),i=Object.hasOwn(r,e)?r[e]:void 0;if(i!==void 0){let n=i.safeParse(t);if(!n.success)return{kind:`invalid`,error:new z(R.InvalidResult,`Invalid result for ${e}: ${n.error}`,{method:e})}}let a={...t};return delete a.resultType,{kind:`complete`,result:a}},encodeResult(e,t,n){return im(nm(e,tm(e,Em(e,t))),n)},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope(e){if(e.envelope===void 0)return`Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)`;let t=Bp().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(e=>e.message).join(`; `)}`}},Om;function km(){if(Om)return Om;let e=Bp();return Om={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema},Om}var Am=`2026-07-28`;function jm(e){return e!==void 0&&sp(e)?Dm:Lp}function Mm(e){return e.revision===void 0?e.era===`modern`?Dm.era:Lp.era:jm(e.revision).era}function Nm(e){return Im.some(t=>t.hasRequestMethod(e))}function Pm(e){return Im.some(t=>t.hasNotificationMethod(e))}function Fm(e){return e===`tasks/get`||e===`tasks/cancel`}var Im=[Lp,Dm],Lm=m({AnnotationsSchema:()=>Mu,AudioContentSchema:()=>dd,BaseMetadataSchema:()=>su,BaseRequestParamsSchema:()=>Ul,BlobResourceContentsSchema:()=>Au,BooleanSchemaSchema:()=>Kd,CallToolRequestParamsSchema:()=>Ed,CallToolRequestSchema:()=>Dd,CallToolResultSchema:()=>wd,CancelTaskRequestSchema:()=>Nf,CancelTaskResultSchema:()=>Pf,CancelledNotificationParamsSchema:()=>ru,CancelledNotificationSchema:()=>iu,ClientCapabilitiesSchema:()=>fu,ClientNotificationSchema:()=>If,ClientRequestSchema:()=>Ff,ClientResultSchema:()=>Lf,ClientTasksCapabilitySchema:()=>uu,CompatibilityCallToolResultSchema:()=>Td,CompleteRequestParamsSchema:()=>mf,CompleteRequestSchema:()=>hf,CompleteResultSchema:()=>gf,ContentBlockSchema:()=>hd,CreateMessageRequestParamsSchema:()=>Hd,CreateMessageRequestSchema:()=>Ud,CreateMessageResultSchema:()=>Wd,CreateMessageResultWithToolsSchema:()=>Gd,CreateTaskResultSchema:()=>wf,CursorSchema:()=>zl,DiscoverRequestSchema:()=>vu,DiscoverResultSchema:()=>yu,ElicitRequestFormParamsSchema:()=>af,ElicitRequestParamsSchema:()=>sf,ElicitRequestSchema:()=>cf,ElicitRequestURLParamsSchema:()=>of,ElicitResultSchema:()=>df,ElicitationCompleteNotificationParamsSchema:()=>lf,ElicitationCompleteNotificationSchema:()=>uf,EmbeddedResourceSchema:()=>pd,EmptyResultSchema:()=>nu,EnumSchemaSchema:()=>nf,GetPromptRequestParamsSchema:()=>sd,GetPromptRequestSchema:()=>cd,GetPromptResultSchema:()=>_d,GetTaskPayloadRequestSchema:()=>kf,GetTaskPayloadResultSchema:()=>Af,GetTaskRequestSchema:()=>Df,GetTaskResultSchema:()=>Of,IconSchema:()=>au,IconsSchema:()=>ou,ImageContentSchema:()=>ud,ImplementationSchema:()=>cu,InitializeRequestParamsSchema:()=>pu,InitializeRequestSchema:()=>mu,InitializeResultSchema:()=>gu,InitializedNotificationSchema:()=>_u,JSONArraySchema:()=>Ll,JSONObjectSchema:()=>Il,JSONRPCErrorResponseSchema:()=>$l,JSONRPCMessageSchema:()=>eu,JSONRPCNotificationSchema:()=>Zl,JSONRPCRequestSchema:()=>Xl,JSONRPCResponseSchema:()=>tu,JSONRPCResultResponseSchema:()=>Ql,JSONValueSchema:()=>Fl,LegacyTitledEnumSchemaSchema:()=>Zd,ListChangedOptionsBaseSchema:()=>kd,ListPromptsRequestSchema:()=>ad,ListPromptsResultSchema:()=>od,ListResourceTemplatesRequestSchema:()=>Lu,ListResourceTemplatesResultSchema:()=>Ru,ListResourcesRequestSchema:()=>Fu,ListResourcesResultSchema:()=>Iu,ListRootsRequestSchema:()=>vf,ListRootsResultSchema:()=>yf,ListTasksRequestSchema:()=>jf,ListTasksResultSchema:()=>Mf,ListToolsRequestSchema:()=>Sd,ListToolsResultSchema:()=>Cd,LoggingLevelSchema:()=>Ad,LoggingMessageNotificationParamsSchema:()=>Nd,LoggingMessageNotificationSchema:()=>Pd,ModelHintSchema:()=>Fd,ModelPreferencesSchema:()=>Id,MultiSelectEnumSchemaSchema:()=>tf,NotificationSchema:()=>ql,NotificationsParamsSchema:()=>Kl,NumberSchemaSchema:()=>Jd,PaginatedRequestParamsSchema:()=>wu,PaginatedRequestSchema:()=>Tu,PaginatedResultSchema:()=>Eu,PingRequestSchema:()=>bu,PrimitiveSchemaDefinitionSchema:()=>rf,ProgressNotificationParamsSchema:()=>Su,ProgressNotificationSchema:()=>Cu,ProgressSchema:()=>xu,ProgressTokenSchema:()=>Rl,PromptArgumentSchema:()=>rd,PromptListChangedNotificationSchema:()=>vd,PromptMessageSchema:()=>gd,PromptReferenceSchema:()=>pf,PromptSchema:()=>id,ReadResourceRequestParamsSchema:()=>Bu,ReadResourceRequestSchema:()=>Vu,ReadResourceResultSchema:()=>Hu,RelatedTaskMetadataSchema:()=>Vl,RequestIdSchema:()=>Yl,RequestMetaSchema:()=>Hl,RequestSchema:()=>Gl,ResourceContentsSchema:()=>Du,ResourceLinkSchema:()=>md,ResourceListChangedNotificationSchema:()=>Uu,ResourceRequestParamsSchema:()=>zu,ResourceSchema:()=>Nu,ResourceTemplateReferenceSchema:()=>ff,ResourceTemplateSchema:()=>Pu,ResourceUpdatedNotificationParamsSchema:()=>td,ResourceUpdatedNotificationSchema:()=>nd,ResultMetaObjectSchema:()=>Jl,ResultSchema:()=>L,RoleSchema:()=>ju,RootSchema:()=>_f,RootsListChangedNotificationSchema:()=>bf,SamplingContentSchema:()=>zd,SamplingMessageContentBlockSchema:()=>Bd,SamplingMessageSchema:()=>Vd,ServerCapabilitiesSchema:()=>hu,ServerNotificationSchema:()=>zf,ServerRequestSchema:()=>Rf,ServerResultSchema:()=>Bf,ServerTasksCapabilitySchema:()=>du,SetLevelRequestParamsSchema:()=>jd,SetLevelRequestSchema:()=>Md,SingleSelectEnumSchemaSchema:()=>Qd,StringSchemaSchema:()=>qd,SubscribeRequestParamsSchema:()=>Wu,SubscribeRequestSchema:()=>Gu,SubscriptionFilterSchema:()=>Ju,SubscriptionsAcknowledgedNotificationParamsSchema:()=>Zu,SubscriptionsAcknowledgedNotificationSchema:()=>Qu,SubscriptionsListenRequestParamsSchema:()=>Yu,SubscriptionsListenRequestSchema:()=>Xu,SubscriptionsListenResultMetaSchema:()=>$u,SubscriptionsListenResultSchema:()=>ed,TaskAugmentedRequestParamsSchema:()=>Wl,TaskCreationParamsSchema:()=>xf,TaskMetadataSchema:()=>Bl,TaskSchema:()=>Cf,TaskStatusNotificationParamsSchema:()=>Tf,TaskStatusNotificationSchema:()=>Ef,TaskStatusSchema:()=>Sf,TextContentSchema:()=>ld,TextResourceContentsSchema:()=>Ou,TitledMultiSelectEnumSchemaSchema:()=>ef,TitledSingleSelectEnumSchemaSchema:()=>Xd,ToolAnnotationsSchema:()=>yd,ToolChoiceSchema:()=>Ld,ToolExecutionSchema:()=>bd,ToolListChangedNotificationSchema:()=>Od,ToolResultContentSchema:()=>Rd,ToolSchema:()=>xd,ToolUseContentSchema:()=>fd,UnsubscribeRequestParamsSchema:()=>Ku,UnsubscribeRequestSchema:()=>qu,UntitledMultiSelectEnumSchemaSchema:()=>$d,UntitledSingleSelectEnumSchemaSchema:()=>Yd}),Rm=e=>Xl.safeParse(e).success,zm=e=>Zl.safeParse(e).success,Bm=e=>Ql.safeParse(e).success,Vm=e=>$l.safeParse(e).success,Hm=e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&e.resultType===`input_required`,Um=`Mcp-Param-`,Wm=`x-mcp-header`,Gm=/^[!#$%&\'*+\\-.^_`|~0-9A-Za-z]+$/,Km=new Set([`string`,`integer`,`boolean`]);function qm(e){let t=[],n=new Map,r,i=(e,a,o)=>{if(typeof e!=`object`||!e)return;let s=e;if(Wm in s){if(!o||a.length===0)return`${Xm(a)}: x-mcp-header is only permitted on properties statically reachable via a chain of \'properties\' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let e=s[Wm];if(typeof e!=`string`||e.length===0)return`${Xm(a)}: x-mcp-header MUST be a non-empty string`;if(!Gm.test(e))return`${Xm(a)}: x-mcp-header \'${e}\' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let i=typeof s.type==`string`?s.type:void 0;if(i===void 0||!Km.has(i)){let e=`${Xm(a)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${i??`<none>`}`;if(i!==`number`)return e;r??=e}let c=e.toLowerCase(),l=n.get(c);if(l!==void 0)return`x-mcp-header \'${e}\' is not case-insensitively unique (also declared as \'${l}\')`;n.set(c,e),t.push({path:a,headerName:e,type:i})}let c=s.properties;if(typeof c==`object`&&c)for(let[e,t]of Object.entries(c)){let n=i(t,[...a,e],o);if(n!==void 0)return n}for(let e of Jm){let t=s[e];if(t===void 0)continue;let n=Array.isArray(t)?t:typeof t==`object`&&t&&Ym.has(e)?Object.values(t):[t];for(let t of n){let n=i(t,[...a,`<${e}>`],!1);if(n!==void 0)return n}}},a=i(e,[],!0);return a===void 0?r===void 0?{valid:!0,declarations:t}:{valid:!1,reason:r,declarations:t}:{valid:!1,reason:r??a}}var Jm=[`items`,`prefixItems`,`contains`,`additionalProperties`,`unevaluatedProperties`,`unevaluatedItems`,`propertyNames`,`patternProperties`,`dependentSchemas`,`oneOf`,`anyOf`,`allOf`,`not`,`if`,`then`,`else`,`$defs`,`definitions`],Ym=new Set([`patternProperties`,`dependentSchemas`,`$defs`,`definitions`]);function Xm(e){return e.length===0?`<root>`:e.join(`.`)}var Zm=`=?base64?`,Qm=`?=`;function $m(e){if(typeof e==`string`)return e;if(typeof e==`boolean`)return e?`true`:`false`;if(typeof e==`number`)return!Number.isFinite(e)||Number.isInteger(e)&&!Number.isSafeInteger(e)?void 0:String(e)}function eh(e){if(e.length===0||e.startsWith(Zm)&&e.endsWith(Qm)||e!==e.trim())return!0;for(let t=0;t<e.length;t++){let n=e.codePointAt(t);if(!(n===9||n>=32&&n<=126))return!0}return!1}function th(e){let t=new TextEncoder().encode(e),n=``;for(let e of t)n+=String.fromCodePoint(e);return btoa(n)}function nh(e){return eh(e)?`${Zm}${th(e)}${Qm}`:e}function rh(e,t){let n=e;for(let e of t){if(typeof n!=`object`||!n)return;n=n[e]}return n}function ih(e,t){let n={};for(let r of e){let e=rh(t,r.path);if(e==null)continue;let i=$m(e);i!==void 0&&(n[`${Um}${r.headerName}`]=nh(i))}return n}B.InvalidRequest,B.UnsupportedProtocolVersion,B.InvalidParams,B.MethodNotFound,B.InvalidParams,B.MissingRequiredClientCapability,B.ParseError,B.InvalidRequest,B.MethodNotFound,B.UnsupportedProtocolVersion,B.MissingRequiredClientCapability;function ah(e,t){return Bs(e,t)}function oh(e){return new Set(e.flatMap(e=>Object.keys(e.shape)))}function sh(e){if(e==null)return!1;let t=typeof e;return t!==`object`&&t!==`function`||!(`~standard`in e)?!1:typeof e[`~standard`]?.validate==`function`}var ch=!1,lh=`draft-2020-12`;function uh(e,t=`input`){let n=e[`~standard`],r;if(n.jsonSchema)r=n.jsonSchema[t]({target:lh});else if(n.vendor===`zod`){if(!(`_zod`in e))throw Error(`Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().`);ch||(ch=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.")),r=Ps(e,{target:lh,io:t})}else throw Error(`Schema library "${n.vendor}" does not implement StandardJSONSchemaV1 (\\`~standard.jsonSchema\\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(t===`output`)return r.type===void 0&&fh(r)?{type:`object`,...r}:r;if(r.type!==void 0&&r.type!==`object`)throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(r.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:`object`,...r}}var dh=/^#\\/(\\$defs|definitions)\\/([^/~%]+)$/;function fh(e,t=e){if(`properties`in e||`patternProperties`in e||`additionalProperties`in e||`required`in e)return!0;let n=typeof e.$ref==`string`&&dh.exec(e.$ref);if(n&&t[n[1]]?.[n[2]]?.type===`object`)return!0;for(let n of[`oneOf`,`anyOf`,`allOf`]){let r=e[n];if(Array.isArray(r)&&r.length>0)return r.every(e=>typeof e==`object`&&!!e&&(e.type===`object`||fh(e,`$id`in e?{}:t)))}return!1}function ph(e){return e.path?.length?`${e.path.map(e=>String(typeof e==`object`?e.key:e)).join(`.`)}: ${e.message}`:e.message}async function mh(e,t){let n=await e[`~standard`].validate(t);return n.issues&&n.issues.length>0?{success:!1,error:n.issues.map(e=>ph(e)).join(`, `)}:{success:!0,data:n.value}}function hh(e){let t=Ps(e,{target:lh,io:`input`});return typeof t.pattern==`string`?t.pattern:void 0}var gh=/\\\\\\.\\\\d\\{(\\d+)\\}/;function _h(e){let t=gh.exec(e),n=[void 0,-1,0];return t&&n.push(Number(t[1])),[!1,!0].flatMap(e=>[!1,!0].flatMap(t=>n.map(n=>wl({local:e,offset:t,precision:n}))))}function vh(e,t){let n;switch(e){case`email`:n=[sc()];break;case`uri`:n=[dc()];break;case`date`:n=[Tl()];break;case`date-time`:n=_h(t);break}return new Set(n.map(e=>hh(e)).filter(e=>e!==void 0))}function yh(e,t,n){return n!==`zod`||vh(e,t).has(t)}function bh(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function xh(e){try{return uh(e,`input`)}catch(e){let t=e instanceof Error?e.message:String(e);throw new qp(B.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${t}`)}}var Sh=new Set([`$comment`,`deprecated`,`description`,`examples`,`readOnly`,`title`,`writeOnly`]);function Ch(e){return Sh.has(e)||e.startsWith(`x-`)}var wh=new Set([`$schema`,...Object.keys(af.shape.requestedSchema.shape)]),Th={string:oh([qd,Yd,Xd,Zd]),number:oh([Jd]),integer:oh([Jd]),boolean:oh([Kd]),array:oh([$d,ef])},Eh=new Set(qd.shape.format.unwrap().options);function Dh(e,t,n,r){if(!bh(e))return e;let i=typeof e.type==`string`&&Object.hasOwn(Th,e.type)?Th[e.type]:void 0;if(i===void 0)return e;let a={};for(let[o,s]of Object.entries(e))i.has(o)||Ch(o)?a[o]=s:o===`pattern`&&e.type===`string`&&typeof e.format==`string`?Eh.has(e.format)?(typeof s!=`string`||!yh(e.format,s,n))&&r.push(`${t}.${o}`):a[o]=s:r.push(`${t}.${o}`);return a}function Oh(e,t){let n={},r=[];for(let[i,a]of Object.entries(e))i===`properties`&&bh(a)?n[i]=Object.fromEntries(Object.entries(a).map(([e,n])=>[e,Dh(n,`properties.${e}`,t,r)])):wh.has(i)?n[i]=a:Ch(i)||r.push(i);if(r.length>0)throw new qp(B.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(`, `)}`);return n}function kh(e,t){if(!bh(e.properties))return t;let n=Object.entries(e.properties).filter(([,e])=>!ah(rf,e).success).map(([e])=>`properties.${e}`);return n.length>0?n.join(`, `):t}function Ah(e,t,n=``){return Array.isArray(e)&&Array.isArray(t)?e.flatMap((e,r)=>Ah(e,t[r],`${n}[${r}]`)):!bh(e)||!bh(t)?[]:Object.entries(e).flatMap(([e,r])=>{let i=n?`${n}.${e}`:e;return Object.prototype.hasOwnProperty.call(t,e)?Ah(r,t[e],i):Ch(e)?[]:[i]})}function jh(e){if(!sh(e.requestedSchema))return{...e,mode:`form`,requestedSchema:e.requestedSchema};let t=e.requestedSchema[`~standard`].vendor,n=Oh(xh(e.requestedSchema),t),r=ah(af.shape.requestedSchema,n);if(!r.success)throw new qp(B.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${kh(n,r.error.message)}`);let i=Ah(n,r.data);if(i.length>0)throw new qp(B.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(`, `)}`);let a=(r.data.required??[]).filter(e=>!Object.prototype.hasOwnProperty.call(r.data.properties,e));if(a.length>0)throw new qp(B.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(`, `)}`);return{...e,mode:`form`,requestedSchema:r.data}}function Mh(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,n=typeof e.requestState==`string`;if(!t&&!n)throw TypeError(`inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)`);return{resultType:`input_required`,...e.inputRequests!==void 0&&{inputRequests:e.inputRequests},...e.requestState!==void 0&&{requestState:e.requestState}}}Object.assign(Mh,{elicit(e){try{return{method:`elicitation/create`,params:jh(e)}}catch(e){throw e instanceof qp?TypeError(e.message,{cause:e}):e}},elicitUrl(e){return{method:`elicitation/create`,params:{...e,mode:`url`}}},createMessage(e){return{method:`sampling/createMessage`,params:e}},listRoots(){return{method:`roots/list`}}});var Nh=!0,Ph=10,Fh=250;function Ih(e){return{autoFulfill:e?.autoFulfill??Nh,maxRounds:e?.maxRounds??Ph}}function Lh(e,t,n){let r=t!==void 0&&Object.keys(t).length>0;return!r&&n===void 0?e:{...e,...r&&{inputResponses:t},...n!==void 0&&{requestState:n}}}function Rh(e,t){return`Multi-round-trip request \'${e}\' still required input after ${t} rounds (inputRequired.maxRounds)`}function zh(e,t){return new Promise((n,r)=>{if(t?.aborted){r(t.reason instanceof z?t.reason:new z(R.RequestTimeout,String(t.reason)));return}let i=setTimeout(()=>{t?.removeEventListener(`abort`,a),n()},e),a=()=>{clearTimeout(i),r(t?.reason instanceof z?t.reason:new z(R.RequestTimeout,String(t?.reason)))};t?.addEventListener(`abort`,a,{once:!0})})}function Bh(e){let t=new AbortController,n=()=>t.abort(e?.reason);return e?.addEventListener(`abort`,n,{once:!0}),e?.aborted&&t.abort(e.reason),{signal:t.signal,abort:e=>t.abort(e),dispose:()=>e?.removeEventListener(`abort`,n)}}async function Vh(e){let{config:t,method:n,originalParams:r,requestOptions:i,hooks:a,signal:o}=e,s=e.flowStartedAt??Date.now(),c=e.firstPayload,l=0;for(;;){if(l+=1,l>t.maxRounds)throw new z(R.InputRequiredRoundsExceeded,Rh(n,t.maxRounds),{rounds:t.maxRounds,lastResult:{inputRequests:c.inputRequests,...c.requestState!==void 0&&{requestState:c.requestState}}});i.onprogress?.({progress:l,message:`Fulfilling input required by \'${n}\' (round ${l})`});let e=Object.entries(c.inputRequests??{}),u;if(e.length>0){let t=Bh(o);try{let n=await Promise.all(e.map(async([e,n])=>{try{return[e,await a.dispatchInputRequest(e,n,t.signal)]}catch(e){throw t.abort(e),e}}));u=Object.fromEntries(n)}finally{t.dispose()}}else await zh(Fh,o);let d={...i.timeout!==void 0&&{timeout:i.timeout}};if(i.maxTotalTimeout!==void 0){let e=Date.now()-s,t=i.maxTotalTimeout-e;if(t<=0)throw new z(R.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:i.maxTotalTimeout,totalElapsed:e});d.maxTotalTimeout=t}let f=await a.retry(Lh(r,u,c.requestState),d);if(Hm(f)){c={inputRequests:f.inputRequests??{},...f.requestState!==void 0&&{requestState:f.requestState}};continue}return f}}var Hh=`AnnotationsSchema.AudioContentSchema.BaseMetadataSchema.BlobResourceContentsSchema.BooleanSchemaSchema.CallToolRequestSchema.CallToolRequestParamsSchema.CallToolResultSchema.CancelledNotificationSchema.CancelledNotificationParamsSchema.CancelTaskRequestSchema.CancelTaskResultSchema.ClientCapabilitiesSchema.ClientNotificationSchema.ClientRequestSchema.ClientResultSchema.CompatibilityCallToolResultSchema.CompleteRequestSchema.CompleteRequestParamsSchema.CompleteResultSchema.ContentBlockSchema.CreateMessageRequestSchema.CreateMessageRequestParamsSchema.CreateMessageResultSchema.CreateMessageResultWithToolsSchema.CreateTaskResultSchema.CursorSchema.DiscoverRequestSchema.DiscoverResultSchema.ElicitationCompleteNotificationSchema.ElicitationCompleteNotificationParamsSchema.ElicitRequestSchema.ElicitRequestFormParamsSchema.ElicitRequestParamsSchema.ElicitRequestURLParamsSchema.ElicitResultSchema.EmbeddedResourceSchema.EmptyResultSchema.EnumSchemaSchema.GetPromptRequestSchema.GetPromptRequestParamsSchema.GetPromptResultSchema.GetTaskPayloadRequestSchema.GetTaskPayloadResultSchema.GetTaskRequestSchema.GetTaskResultSchema.IconSchema.IconsSchema.ImageContentSchema.ImplementationSchema.InitializedNotificationSchema.InitializeRequestSchema.InitializeRequestParamsSchema.InitializeResultSchema.JSONArraySchema.JSONObjectSchema.JSONRPCErrorResponseSchema.JSONRPCMessageSchema.JSONRPCNotificationSchema.JSONRPCRequestSchema.JSONRPCResponseSchema.JSONRPCResultResponseSchema.JSONValueSchema.LegacyTitledEnumSchemaSchema.ListPromptsRequestSchema.ListPromptsResultSchema.ListResourcesRequestSchema.ListResourcesResultSchema.ListResourceTemplatesRequestSchema.ListResourceTemplatesResultSchema.ListRootsRequestSchema.ListRootsResultSchema.ListTasksRequestSchema.ListTasksResultSchema.ListToolsRequestSchema.ListToolsResultSchema.LoggingLevelSchema.LoggingMessageNotificationSchema.LoggingMessageNotificationParamsSchema.ModelHintSchema.ModelPreferencesSchema.MultiSelectEnumSchemaSchema.NotificationSchema.NumberSchemaSchema.PaginatedRequestSchema.PaginatedRequestParamsSchema.PaginatedResultSchema.PingRequestSchema.PrimitiveSchemaDefinitionSchema.ProgressSchema.ProgressNotificationSchema.ProgressNotificationParamsSchema.ProgressTokenSchema.PromptSchema.PromptArgumentSchema.PromptListChangedNotificationSchema.PromptMessageSchema.PromptReferenceSchema.ReadResourceRequestSchema.ReadResourceRequestParamsSchema.ReadResourceResultSchema.RelatedTaskMetadataSchema.RequestSchema.RequestIdSchema.RequestMetaSchema.ResourceSchema.ResourceContentsSchema.ResourceLinkSchema.ResourceListChangedNotificationSchema.ResourceRequestParamsSchema.ResourceTemplateSchema.ResourceTemplateReferenceSchema.ResourceUpdatedNotificationSchema.ResourceUpdatedNotificationParamsSchema.ResultMetaObjectSchema.ResultSchema.RoleSchema.RootSchema.RootsListChangedNotificationSchema.SamplingContentSchema.SamplingMessageSchema.SamplingMessageContentBlockSchema.ServerCapabilitiesSchema.ServerNotificationSchema.ServerRequestSchema.ServerResultSchema.SetLevelRequestSchema.SetLevelRequestParamsSchema.SingleSelectEnumSchemaSchema.StringSchemaSchema.SubscribeRequestSchema.SubscribeRequestParamsSchema.SubscriptionFilterSchema.SubscriptionsAcknowledgedNotificationSchema.SubscriptionsAcknowledgedNotificationParamsSchema.SubscriptionsListenRequestSchema.SubscriptionsListenRequestParamsSchema.SubscriptionsListenResultSchema.SubscriptionsListenResultMetaSchema.TaskAugmentedRequestParamsSchema.TaskCreationParamsSchema.TaskMetadataSchema.TaskSchema.TaskStatusSchema.TaskStatusNotificationSchema.TaskStatusNotificationParamsSchema.TextContentSchema.TextResourceContentsSchema.TitledMultiSelectEnumSchemaSchema.TitledSingleSelectEnumSchemaSchema.ToolSchema.ToolAnnotationsSchema.ToolChoiceSchema.ToolExecutionSchema.ToolListChangedNotificationSchema.ToolResultContentSchema.ToolUseContentSchema.UnsubscribeRequestSchema.UnsubscribeRequestParamsSchema.UntitledMultiSelectEnumSchemaSchema.UntitledSingleSelectEnumSchemaSchema`.split(`.`),Uh={IdJagTokenExchangeResponseSchema:qf,OAuthClientInformationFullSchema:Qf,OAuthClientInformationSchema:Zf,OAuthClientMetadataSchema:Xf,OAuthClientRegistrationErrorSchema:$f,OAuthErrorResponseSchema:Jf,OAuthMetadataSchema:Uf,OAuthProtectedResourceMetadataSchema:Hf,OAuthTokenRevocationRequestSchema:ep,OAuthTokensSchema:Kf,OpenIdProviderDiscoveryMetadataSchema:Gf,OpenIdProviderMetadataSchema:Wf},Wh={},Gh={};function Kh(e,t){let n=e.slice(0,-6);Wh[n]=t,Gh[n]=e=>t.safeParse(e).success}for(let e of Hh)Kh(e,Lm[e]);for(let[e,t]of Object.entries(Uh))Kh(e,t);Object.freeze(Wh);var qh=Object.freeze(Gh);function Jh(e){switch(e){case`initialize`:case`notifications/initialized`:return jm(void 0);case`server/discover`:return jm(Am);default:return}}var Yh=[kl,Al,Ml,Pl],Xh=[`inputResponses`,`requestState`];function Zh(e,t){let n=e.params;if(!ng(n))return{message:e,lifted:{}};let r=n._meta,i=ng(r)?Yh.filter(e=>e in r):[],a=t===`request`?Xh.filter(e=>e in n):[];if(i.length===0&&a.length===0)return{message:e,lifted:{}};let o={},s={...n};if(i.length>0&&ng(r)){let e={},t={...r};for(let n of i)e[n]=r[n],delete t[n];o.envelope=e,Object.keys(t).length>0?s._meta=t:delete s._meta}for(let e of a)e===`inputResponses`&&(o.inputResponses=s[e]),e===`requestState`&&(o.requestState=s[e]),delete s[e];return{message:{...e,params:s},lifted:o}}function Qh(e,t){let n=e.validateResult(t,void 0);if(!(!n.ok&&n.reason===`not-in-era`))return{"~standard":{version:1,vendor:`mcp-wire-codec`,validate(n){let r=e.validateResult(t,n);return r.ok?{value:r.value}:{issues:[{message:r.reason===`invalid`?r.message:`not-in-era: ${t}`}]}}}}}function $h(e){return()=>e}var eg=$h(void 0),tg=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_customSchemaRequestMethods=new Set;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??Dl,this.setNotificationHandler(`notifications/cancelled`,e=>{this._oncancel(e)}),this.setNotificationHandler(`notifications/progress`,e=>{this._onprogress(e)}),this.setRequestHandler(`ping`,e=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(t===void 0)return e;let n=e.params??{};return{...e,params:{...n,_meta:{...t,...n._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new z(R.UnsupportedResultType,`Unsupported result type \'${e.kind}\' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){e.params.requestId!==void 0&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new z(R.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),Bm(e)||Vm(e)?this._onresponse(e):Rm(e)?this._onrequest(e,t):zm(e)?this._onnotification(e,t):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let n=new z(R.ConnectionClosed,`Connection closed`);this._transport=void 0;try{this.onclose?.()}finally{for(let t of e.values())t(n);for(let e of t.values())e.abort(n)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:n}=Zh(e,`notification`),r=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`)return;if(t?.classification!==void 0){let e=Mm(t.classification);if(e!==r.era){this._onerror(Error(`Era mismatch on inbound notification \'${n.method}\': classified as ${e} but this instance serves ${r.era}`));return}}if(Pm(n.method)&&!r.hasNotificationMethod(n.method))return;let i=this._notificationHandlers.get(n.method),a=this.fallbackNotificationHandler;i===void 0&&a===void 0||Promise.resolve().then(()=>i===void 0?a(n):i(n,r)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let{message:n,lifted:r}=Zh(e,`request`),i=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`){this._onerror(Error(`Dropped inbound request \'${e.method}\': not servable on this connection\'s protocol era`));return}let a=this._transport,o=(e,t,r)=>{let i={jsonrpc:`2.0`,id:n.id,error:{code:e,message:t,...r!==void 0&&{data:r}}};a?.send(i).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)))};if(t?.classification!==void 0){let e=Mm(t.classification);if(e!==i.era){this._onerror(Error(`Era mismatch on inbound request \'${n.method}\': classified as ${e} but this instance serves ${i.era}`));let r=t.classification.revision??e;o(B.UnsupportedProtocolVersion,`Unsupported protocol version: ${r}`,{supported:this._supportedProtocolVersions,requested:r});return}}if(Nm(n.method)&&!i.hasRequestMethod(n.method)&&!(Fm(n.method)&&this._customSchemaRequestMethods.has(n.method))){o(B.MethodNotFound,`Method not found`);return}let s=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(s===void 0){o(B.MethodNotFound,`Method not found`);return}let c=i.checkInboundEnvelope(r);if(c!==void 0){o(B.InvalidParams,c);return}let l=(e,t)=>this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,{...t,relatedRequestId:n.id}),u=(e,t,r)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(e.method),e,t,{...r,relatedRequestId:n.id}),d=new AbortController;this._requestHandlerAbortControllers.set(n.id,d);let f=r.inputResponses===void 0?void 0:ag(r.inputResponses),p={sessionId:a?.sessionId,mcpReq:{id:n.id,method:n.method,_meta:n.params?._meta,...r.envelope!==void 0&&{envelope:r.envelope},...f!==void 0&&{inputResponses:f.accepted},...f!==void 0&&f.droppedKeys.length>0&&{droppedInputResponseKeys:f.droppedKeys},requestState:r.requestState===void 0?eg:$h(r.requestState),signal:d.signal,send:((e,t,n)=>{let r=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(r,e.method),sh(t))return u(e,t,n);let i=Qh(r,e.method);if(i===void 0)throw TypeError(`\'${e.method}\' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return u(e,i,t)}),notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},m=this.buildContext(p,t);Promise.resolve().then(()=>s(n,m)).then(async e=>{if(d.signal.aborted)return;let t;try{t=i.encodeResult(n.method,e,this._outboundServerInfo())}catch(e){this._onerror(Error(`Failed to encode result for ${n.method}: ${e}`)),o(B.InternalError,`Internal error`);return}let r={result:t,jsonrpc:`2.0`,id:n.id};await a?.send(r)},async e=>{if(d.signal.aborted)return;let t=Number.isSafeInteger(e.code)?e.code:B.InternalError,r={jsonrpc:`2.0`,id:n.id,error:{code:i.encodeErrorCode(t),message:e.message??`Internal error`,...e.data!==void 0&&{data:e.data}}};await a?.send(r)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(n.id)===d&&this._requestHandlerAbortControllers.delete(n.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._responseHandlers.get(t);if(n===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),Bm(e)?n(e):n(qp.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,n){let r=this._resolveOutboundCodec(e.method);if(sh(t))return Fm(e.method)||this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,n);this._assertOutboundRequestInEra(r,e.method);let i=Qh(r,e.method);if(i===void 0)throw TypeError(`\'${e.method}\' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(r,e,i,t)}_negotiatedWireCodec(){return jm(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=Jh(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(Nm(t)&&!e.hasRequestMethod(t))throw new z(R.MethodNotSupportedByProtocolVersion,`Method \'${t}\' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,n){let r=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,n)}_requestWithSchemaViaCodec(e,t,n,r){let{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s}=r??{},c=Date.now(),l,u;return new Promise((d,f)=>{let p=e=>{f(e)};if(!this._transport){p(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(e){p(e);return}if(r?.signal?.aborted){let e=r.signal.reason;throw e instanceof z?e:new z(R.RequestTimeout,String(e))}let m=e.era===`2026-07-28`&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,h=this._requestMessageId++;u=h;let g={...t,jsonrpc:`2.0`,id:h};r?.onprogress&&(this._progressHandlers.set(h,r.onprogress),g.params={...t.params,_meta:{...t.params?._meta,progressToken:h}});let _=this._envelopeOutbound(g),v=!1,y=e=>{v||(this._progressHandlers.delete(h),m===void 0?t.method!==`initialize`&&this._transport?.send(this._envelopeOutbound({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:h,reason:String(e)}}),{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))):m.abort(),f(e instanceof z?e:new z(R.RequestTimeout,String(e))))};this._responseHandlers.set(h,i=>{if(r?.signal?.aborted)return;if(v=!0,i instanceof Error)return f(i);let a;try{a=e.decodeResult(t.method,i.result)}catch(e){return f(e instanceof Error?e:Error(String(e)))}if(a.kind===`invalid`)return f(a.error);if(a.kind===`input_required`){if(r?.allowInputRequired===!0)return d(dg(a));let i={codec:e,request:t,resultSchema:n,options:r,flowStartedAt:c,retry:(r,i)=>this._requestWithSchemaViaCodec(e,r===void 0?{method:t.method}:{method:t.method,params:r},n,i)};return d(this._resolveNonCompleteResult(a,i))}let o=a.result;mh(n,o).then(e=>{e.success?d(e.data):f(new z(R.InvalidResult,`Invalid result for ${t.method}: ${e.error}`))},f)}),l=()=>y(r?.signal?.reason),r?.signal?.addEventListener(`abort`,l,{once:!0});let ee=r?.timeout??6e4;this._setupTimeout(h,ee,r?.maxTotalTimeout,()=>y(new z(R.RequestTimeout,`Request timed out`,{timeout:ee})),r?.resetTimeoutOnProgress??!1),this._transport.send(_,{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s,requestSignal:m?.signal}).catch(e=>{this._progressHandlers.delete(h),f(e)})}).finally(()=>{l&&r?.signal?.removeEventListener(`abort`,l),u!==void 0&&(this._responseHandlers.delete(u),this._cleanupTimeout(u))})}async notification(e,t){return await this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,n){if(!this._transport)throw new z(R.NotConnected,`Not connected`);if(Pm(t.method)&&!e.hasNotificationMethod(t.method))throw new z(R.MethodNotSupportedByProtocolVersion,`Notification \'${t.method}\' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let r=this._envelopeOutbound({jsonrpc:`2.0`,...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&n?.relatedRequestId===void 0){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{this._pendingDebouncedNotifications.delete(t.method),this._transport&&this._transport?.send(r,n).catch(e=>this._onerror(e))});return}await this._transport.send(r,n)}setRequestHandler(e,t,n){this.assertRequestHandlerCapability(e);let r;if(typeof t==`function`){if(!Nm(e))throw TypeError(`\'${e}\' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);r=(n,r)=>{let i=this._negotiatedWireCodec(),a=i.validateRequest(e,n);if(!a.ok&&a.reason===`not-in-era`&&(a=i.validateInputRequest(e,n)),!a.ok)throw a.reason===`not-in-era`?new qp(B.InternalError,`No wire schema for ${e} in the resolved era`):Error(a.message);return Promise.resolve(t(a.value,r))}}else if(n)r=async(r,i)=>{let a=await mh(t.params,{...r.params});if(!a.success)throw new qp(B.InvalidParams,`Invalid params for ${e}: ${a.error}`);return n(a.data,i)};else throw TypeError(`setRequestHandler: handler is required`);typeof t==`function`?this._customSchemaRequestMethods.delete(e):this._customSchemaRequestMethods.add(e),this._requestHandlers.set(e,this._wrapHandler(e,r))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e),this._customSchemaRequestMethods.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,n){if(typeof t==`function`){if(!Pm(e))throw TypeError(`\'${e}\' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(n,r)=>{let i=r.validateNotification(e,n);if(!i.ok)throw i.reason===`not-in-era`?new qp(B.InternalError,`No wire schema for ${e} in the resolved era`):Error(i.message);return Promise.resolve(t(i.value))});return}if(!n)throw TypeError(`setNotificationHandler: handler is required`);this._notificationHandlers.set(e,async r=>{let i=await mh(t.params,{...r.params});if(!i.success)throw new qp(B.InvalidParams,`Invalid params for notification ${e}: ${i.error}`);await n(i.data,r)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function ng(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function rg(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=ng(a)&&ng(i)?{...a,...i}:i}return n}function ig(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ag(e){let t={},n=[];if(!ig(e))return{accepted:t,droppedKeys:n};for(let[r,i]of Object.entries(e)){if(!ig(i)||`method`in i||`result`in i){n.push(r);continue}t[r]=i}return{accepted:t,droppedKeys:n}}function og(e){throw new z(R.SendFailed,`ctx.mcpReq.${e} is not available while fulfilling an embedded input request: the request is fulfilled locally and has no related peer request`)}function sg(e,t,n,r,i){return{sessionId:i,mcpReq:{id:e,method:t,_meta:n?._meta,requestState:$h(void 0),signal:r,send:(()=>og(`send`)),notify:()=>og(`notify`)}}}async function cg(e,t,n,r,i){if(!ig(r)||typeof r.method!=`string`)throw new z(R.InvalidResult,`Invalid input request \'${n}\': each inputRequests entry must be an embedded request object with a method`,{key:n});let a=r.method;if(!t.hasInputRequestMethod(a))throw new z(R.InvalidResult,`Invalid input request \'${n}\': \'${a}\' is not an embedded request the ${t.era} revision defines (expected elicitation/create, sampling/createMessage, or roots/list)`,{key:n,method:a});let o=e.getRequestHandler(a);if(o===void 0)throw new z(R.CapabilityNotSupported,`Cannot fulfil input request \'${n}\': no handler is registered for \'${a}\' on this client. Declare the corresponding capability and register a handler, or handle input_required results manually.`,{key:n,method:a});let s=ig(r.params)?r.params:void 0;return await o({jsonrpc:`2.0`,id:n,method:a,...s!==void 0&&{params:s}},e.buildContext(sg(n,a,s,i,e.sessionId)))}function lg(e,t){return{...e?.signal!==void 0&&{signal:e.signal},...e?.onprogress!==void 0&&{onprogress:e.onprogress},...e?.resetTimeoutOnProgress!==void 0&&{resetTimeoutOnProgress:e.resetTimeoutOnProgress},...e?.headers!==void 0&&{headers:e.headers},...t.timeout!==void 0&&{timeout:t.timeout},...t.maxTotalTimeout!==void 0&&{maxTotalTimeout:t.maxTotalTimeout},allowInputRequired:!0}}function ug(e,t,n,r){let{codec:i,request:a,options:o,flowStartedAt:s}=r,c={inputRequests:n.inputRequests,...n.requestState!==void 0&&{requestState:n.requestState}},l={dispatchInputRequest:(t,n,r)=>cg(e,i,t,n,r),retry:(e,t)=>r.retry(e,lg(o,t))};return Vh({config:t,method:a.method,originalParams:a.params,firstPayload:c,flowStartedAt:s,signal:o?.signal,requestOptions:{...o?.timeout!==void 0&&{timeout:o.timeout},...o?.maxTotalTimeout!==void 0&&{maxTotalTimeout:o.maxTotalTimeout},...o?.onprogress!==void 0&&{onprogress:o.onprogress}},hooks:l})}function dg(e){return{resultType:`input_required`,inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState},...e._meta!==void 0&&{_meta:e._meta}}}p((e=>{var t=/; *([!#$%&\'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\\u000b\\u0020\\u0021\\u0023-\\u005b\\u005d-\\u007e\\u0080-\\u00ff]|\\\\[\\u000b\\u0020-\\u00ff])*"|[!#$%&\'*+.^_`|~0-9A-Za-z-]+) */g,n=/\\\\([\\u000b\\u0020-\\u00ff])/g,r=/^[!#$%&\'*+.^_`|~0-9A-Za-z-]+\\/[!#$%&\'*+.^_`|~0-9A-Za-z-]+$/;e.parse=i;function i(e){if(!e)throw TypeError(`argument string is required`);var i=typeof e==`object`?a(e):e;if(typeof i!=`string`)throw TypeError(`argument string is required to be a string`);var s=i.indexOf(`;`),c=s===-1?i.trim():i.slice(0,s).trim();if(!r.test(c))throw TypeError(`invalid media type`);var l=new o(c.toLowerCase());if(s!==-1){var u,d,f;for(t.lastIndex=s;d=t.exec(i);){if(d.index!==s)throw TypeError(`invalid parameter format`);s+=d[0].length,u=d[1].toLowerCase(),f=d[2],f.charCodeAt(0)===34&&(f=f.slice(1,-1),f.indexOf(`\\\\`)!==-1&&(f=f.replace(n,`$1`))),l.parameters[u]=f}if(s!==i.length)throw TypeError(`invalid parameter format`)}return l}function a(e){var t;if(typeof e.getHeader==`function`?t=e.getHeader(`content-type`):typeof e.headers==`object`&&(t=e.headers&&e.headers[`content-type`]),typeof t!=`string`)throw TypeError(`content-type header is missing from object`);return t}function o(e){this.parameters=Object.create(null),this.type=e}}))();function fg(e,t){let n=typeof e;if(n!==typeof t)return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(!fg(e[r],t[r]))return!1;return!0}if(n===`object`){if(!e||!t)return e===t;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!fg(e[r],t[r]))return!1;return!0}return e===t}function pg(e){return encodeURI(mg(e))}function mg(e){return e.replace(/~/g,`~0`).replace(/\\//g,`~1`)}var hg={prefixItems:!0,items:!0,allOf:!0,anyOf:!0,oneOf:!0},gg={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependentSchemas:!0},_g={id:!0,$id:!0,$ref:!0,$schema:!0,$anchor:!0,$vocabulary:!0,$comment:!0,default:!0,enum:!0,const:!0,required:!0,type:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0},vg=typeof self<`u`&&self.location&&self.location.origin!==`null`?new URL(self.location.origin+self.location.pathname+location.search):new URL(`https://github.com/cfworker`);function yg(e,t=Object.create(null),n=vg,r=``){if(e&&typeof e==`object`&&!Array.isArray(e)){let i=e.$id||e.id;if(i){let a=new URL(i,n.href);a.hash.length>1?t[a.href]=e:(a.hash=``,r===``?n=a:yg(e,t,n))}}else if(e!==!0&&e!==!1)return t;let i=n.href+(r?`#`+r:``);if(t[i]!==void 0)throw Error(`Duplicate schema URI "${i}".`);if(t[i]=e,e===!0||e===!1)return t;if(e.__absolute_uri__===void 0&&Object.defineProperty(e,"__absolute_uri__",{enumerable:!1,value:i}),e.$ref&&e.__absolute_ref__===void 0){let t=new URL(e.$ref,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_ref__",{enumerable:!1,value:t.href})}if(e.$recursiveRef&&e.__absolute_recursive_ref__===void 0){let t=new URL(e.$recursiveRef,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_recursive_ref__",{enumerable:!1,value:t.href})}if(e.$anchor){let r=new URL(`#`+e.$anchor,n.href);t[r.href]=e}for(let i in e){if(_g[i])continue;let a=`${r}/${pg(i)}`,o=e[i];if(Array.isArray(o)){if(hg[i]){let e=o.length;for(let r=0;r<e;r++)yg(o[r],t,n,`${a}/${r}`)}}else if(gg[i])for(let e in o)yg(o[e],t,n,`${a}/${pg(e)}`);else yg(o,t,n,a)}return t}var bg=/^(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)$/,xg=[0,31,28,31,30,31,30,31,31,30,31,30,31],Sg=/^(\\d\\d):(\\d\\d):(\\d\\d)(\\.\\d+)?(z|[+-]\\d\\d(?::?\\d\\d)?)?$/i,Cg=/^(?=.{1,253}\\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\\.?$/i,wg=/^(?:[a-z][a-z0-9+\\-.]*:)?(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&\'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&\'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&\'"()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\\?(?:[a-z0-9\\-._~!$&\'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&\'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,Tg=/^(?:(?:[^\\x00-\\x20"\'<>%\\\\^`{|}]|%[0-9a-f]{2})|\\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?)*\\})*$/i,Eg=/^(?:(?:https?|ftp):\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!10(?:\\.\\d{1,3}){3})(?!127(?:\\.\\d{1,3}){3})(?!169\\.254(?:\\.\\d{1,3}){2})(?!192\\.168(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u{00a1}-\\u{ffff}0-9]+-?)*[a-z\\u{00a1}-\\u{ffff}0-9]+)(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}0-9]+-?)*[a-z\\u{00a1}-\\u{ffff}0-9]+)*(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}]{2,})))(?::\\d{2,5})?(?:\\/[^\\s]*)?$/iu,Dg=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Og=/^(?:\\/(?:[^~/]|~0|~1)*)*$/,kg=/^#(?:\\/(?:[a-z0-9_\\-.!$&\'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Ag=/^(?:0|[1-9][0-9]*)(?:#|(?:\\/(?:[^~/]|~0|~1)*)*)$/,jg=e=>{if(e[0]===`"`)return!1;let[t,n,...r]=e.split(`@`);return!t||!n||r.length!==0||t.length>64||n.length>253||t[0]===`.`||t.endsWith(`.`)||t.includes(`..`)||!/^[a-z0-9.-]+$/i.test(n)||!/^[a-z0-9.!#$%&\'*+/=?^_`{|}~-]+$/i.test(t)?!1:n.split(`.`).every(e=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(e))},Mg=/^(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)$/,Ng=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))$/i,Pg=e=>e.length>1&&e.length<80&&(/^P\\d+([.,]\\d+)?W$/.test(e)||/^P[\\dYMDTHS]*(\\d[.,]\\d+)?[YMDHS]$/.test(e)&&/^P([.,\\d]+Y)?([.,\\d]+M)?([.,\\d]+D)?(T([.,\\d]+H)?([.,\\d]+M)?([.,\\d]+S)?)?$/.test(e));function Fg(e){return e.test.bind(e)}var Ig={date:Rg,time:zg.bind(void 0,!1),"date-time":Vg,duration:Pg,uri:Wg,"uri-reference":Fg(wg),"uri-template":Fg(Tg),url:Fg(Eg),email:jg,hostname:Fg(Cg),ipv4:Fg(Mg),ipv6:Fg(Ng),regex:Kg,uuid:Fg(Dg),"json-pointer":Fg(Og),"json-pointer-uri-fragment":Fg(kg),"relative-json-pointer":Fg(Ag)};function Lg(e){return e%4==0&&(e%100!=0||e%400==0)}function Rg(e){let t=e.match(bg);if(!t)return!1;let n=+t[1],r=+t[2],i=+t[3];return r>=1&&r<=12&&i>=1&&i<=(r==2&&Lg(n)?29:xg[r])}function zg(e,t){let n=t.match(Sg);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=!!n[5];return(r<=23&&i<=59&&a<=59||r==23&&i==59&&a==60)&&(!e||o)}var Bg=/t|\\s/i;function Vg(e){let t=e.split(Bg);return t.length==2&&Rg(t[0])&&zg(!0,t[1])}var Hg=/\\/|:/,Ug=/^(?:[a-z][a-z0-9+\\-.]*:)(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&\'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&\'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&\'()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\\?(?:[a-z0-9\\-._~!$&\'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&\'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function Wg(e){return Hg.test(e)&&Ug.test(e)}var Gg=/[^\\\\]\\\\Z/;function Kg(e){if(Gg.test(e))return!1;try{return new RegExp(e,`u`),!0}catch{return!1}}function qg(e){let t=0,n=e.length,r=0,i;for(;r<n;)t++,i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<n&&(i=e.charCodeAt(r),(i&64512)==56320&&r++);return t}function Jg(e,t,n=`2019-09`,r=yg(t),i=!0,a=null,o=`#`,s=`#`,c=Object.create(null)){if(t===!0)return{valid:!0,errors:[]};if(t===!1)return{valid:!1,errors:[{instanceLocation:o,keyword:`false`,keywordLocation:o,error:`False boolean schema.`}]};let l=typeof e,u;switch(l){case`boolean`:case`number`:case`string`:u=l;break;case`object`:u=e===null?`null`:Array.isArray(e)?`array`:`object`;break;default:throw Error(`Instances of "${l}" type are not supported.`)}let{$ref:d,$recursiveRef:f,$recursiveAnchor:p,type:m,const:h,enum:g,required:_,not:v,anyOf:y,allOf:ee,oneOf:te,if:ne,then:re,else:ie,format:ae,properties:oe,patternProperties:se,additionalProperties:ce,unevaluatedProperties:le,minProperties:ue,maxProperties:de,propertyNames:fe,dependentRequired:pe,dependentSchemas:b,dependencies:me,prefixItems:he,items:ge,additionalItems:_e,unevaluatedItems:ve,contains:ye,minContains:be,maxContains:xe,minItems:Se,maxItems:Ce,uniqueItems:we,minimum:Te,maximum:Ee,exclusiveMinimum:De,exclusiveMaximum:x,multipleOf:Oe,minLength:ke,maxLength:Ae,pattern:je,__absolute_ref__:Me,__absolute_recursive_ref__:Ne}=t,S=[];if(p===!0&&a===null&&(a=t),f===`#`){let l=a===null?r[Ne]:a,u=`${s}/$recursiveRef`,d=Jg(e,a===null?t:a,n,r,i,l,o,u,c);d.valid||S.push({instanceLocation:o,keyword:`$recursiveRef`,keywordLocation:u,error:`A subschema had errors.`},...d.errors)}if(d!==void 0){let t=r[Me||d];if(t===void 0){let e=`Unresolved $ref "${d}".`;throw Me&&Me!==d&&(e+=` Absolute URI "${Me}".`),e+=`\\nKnown schemas:\\n- ${Object.keys(r).join(`\n- `)}`,Error(e)}let l=`${s}/$ref`,u=Jg(e,t,n,r,i,a,o,l,c);if(u.valid||S.push({instanceLocation:o,keyword:`$ref`,keywordLocation:l,error:`A subschema had errors.`},...u.errors),n===`4`||n===`7`)return{valid:S.length===0,errors:S}}if(Array.isArray(m)){let t=m.length,n=!1;for(let r=0;r<t;r++)if(u===m[r]||m[r]===`integer`&&u===`number`&&e%1==0&&e===e){n=!0;break}n||S.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m.join(`", "`)}".`})}else m===`integer`?(u!==`number`||e%1||e!==e)&&S.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m}".`}):m!==void 0&&u!==m&&S.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m}".`});if(h!==void 0&&(u===`object`||u===`array`?fg(e,h)||S.push({instanceLocation:o,keyword:`const`,keywordLocation:`${s}/const`,error:`Instance does not match ${JSON.stringify(h)}.`}):e!==h&&S.push({instanceLocation:o,keyword:`const`,keywordLocation:`${s}/const`,error:`Instance does not match ${JSON.stringify(h)}.`})),g!==void 0&&(u===`object`||u===`array`?g.some(t=>fg(e,t))||S.push({instanceLocation:o,keyword:`enum`,keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`}):g.some(t=>e===t)||S.push({instanceLocation:o,keyword:`enum`,keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`})),v!==void 0){let t=`${s}/not`;Jg(e,v,n,r,i,a,o,t).valid&&S.push({instanceLocation:o,keyword:`not`,keywordLocation:t,error:`Instance matched "not" schema.`})}let Pe=[];if(y!==void 0){let t=`${s}/anyOf`,l=S.length,u=!1;for(let s=0;s<y.length;s++){let l=y[s],d=Object.create(c),f=Jg(e,l,n,r,i,p===!0?a:null,o,`${t}/${s}`,d);S.push(...f.errors),u||=f.valid,f.valid&&Pe.push(d)}u?S.length=l:S.splice(l,0,{instanceLocation:o,keyword:`anyOf`,keywordLocation:t,error:`Instance does not match any subschemas.`})}if(ee!==void 0){let t=`${s}/allOf`,l=S.length,u=!0;for(let s=0;s<ee.length;s++){let l=ee[s],d=Object.create(c),f=Jg(e,l,n,r,i,p===!0?a:null,o,`${t}/${s}`,d);S.push(...f.errors),u&&=f.valid,f.valid&&Pe.push(d)}u?S.length=l:S.splice(l,0,{instanceLocation:o,keyword:`allOf`,keywordLocation:t,error:`Instance does not match every subschema.`})}if(te!==void 0){let t=`${s}/oneOf`,l=S.length,u=te.filter((s,l)=>{let u=Object.create(c),d=Jg(e,s,n,r,i,p===!0?a:null,o,`${t}/${l}`,u);return S.push(...d.errors),d.valid&&Pe.push(u),d.valid}).length;u===1?S.length=l:S.splice(l,0,{instanceLocation:o,keyword:`oneOf`,keywordLocation:t,error:`Instance does not match exactly one subschema (${u} matches).`})}if((u===`object`||u===`array`)&&Object.assign(c,...Pe),ne!==void 0){let t=`${s}/if`;if(Jg(e,ne,n,r,i,a,o,t,c).valid){if(re!==void 0){let l=Jg(e,re,n,r,i,a,o,`${s}/then`,c);l.valid||S.push({instanceLocation:o,keyword:`if`,keywordLocation:t,error:`Instance does not match "then" schema.`},...l.errors)}}else if(ie!==void 0){let l=Jg(e,ie,n,r,i,a,o,`${s}/else`,c);l.valid||S.push({instanceLocation:o,keyword:`if`,keywordLocation:t,error:`Instance does not match "else" schema.`},...l.errors)}}if(u===`object`){if(_!==void 0)for(let t of _)t in e||S.push({instanceLocation:o,keyword:`required`,keywordLocation:`${s}/required`,error:`Instance does not have required property "${t}".`});let t=Object.keys(e);if(ue!==void 0&&t.length<ue&&S.push({instanceLocation:o,keyword:`minProperties`,keywordLocation:`${s}/minProperties`,error:`Instance does not have at least ${ue} properties.`}),de!==void 0&&t.length>de&&S.push({instanceLocation:o,keyword:`maxProperties`,keywordLocation:`${s}/maxProperties`,error:`Instance does not have at least ${de} properties.`}),fe!==void 0){let t=`${s}/propertyNames`;for(let s in e){let e=`${o}/${pg(s)}`,c=Jg(s,fe,n,r,i,a,e,t);c.valid||S.push({instanceLocation:o,keyword:`propertyNames`,keywordLocation:t,error:`Property name "${s}" does not match schema.`},...c.errors)}}if(pe!==void 0){let t=`${s}/dependantRequired`;for(let n in pe)if(n in e){let r=pe[n];for(let i of r)i in e||S.push({instanceLocation:o,keyword:`dependentRequired`,keywordLocation:t,error:`Instance has "${n}" but does not have "${i}".`})}}if(b!==void 0)for(let t in b){let l=`${s}/dependentSchemas`;if(t in e){let s=Jg(e,b[t],n,r,i,a,o,`${l}/${pg(t)}`,c);s.valid||S.push({instanceLocation:o,keyword:`dependentSchemas`,keywordLocation:l,error:`Instance has "${t}" but does not match dependant schema.`},...s.errors)}}if(me!==void 0){let t=`${s}/dependencies`;for(let s in me)if(s in e){let c=me[s];if(Array.isArray(c))for(let n of c)n in e||S.push({instanceLocation:o,keyword:`dependencies`,keywordLocation:t,error:`Instance has "${s}" but does not have "${n}".`});else{let l=Jg(e,c,n,r,i,a,o,`${t}/${pg(s)}`);l.valid||S.push({instanceLocation:o,keyword:`dependencies`,keywordLocation:t,error:`Instance has "${s}" but does not match dependant schema.`},...l.errors)}}}let l=Object.create(null),u=!1;if(oe!==void 0){let t=`${s}/properties`;for(let s in oe){if(!(s in e))continue;let d=`${o}/${pg(s)}`,f=Jg(e[s],oe[s],n,r,i,a,d,`${t}/${pg(s)}`);if(f.valid)c[s]=l[s]=!0;else if(u=i,S.push({instanceLocation:o,keyword:`properties`,keywordLocation:t,error:`Property "${s}" does not match schema.`},...f.errors),u)break}}if(!u&&se!==void 0){let t=`${s}/patternProperties`;for(let s in se){let d=new RegExp(s,`u`),f=se[s];for(let p in e){if(!d.test(p))continue;let m=`${o}/${pg(p)}`,h=Jg(e[p],f,n,r,i,a,m,`${t}/${pg(s)}`);h.valid?c[p]=l[p]=!0:(u=i,S.push({instanceLocation:o,keyword:`patternProperties`,keywordLocation:t,error:`Property "${p}" matches pattern "${s}" but does not match associated schema.`},...h.errors))}}}if(!u&&ce!==void 0){let t=`${s}/additionalProperties`;for(let s in e){if(l[s])continue;let d=`${o}/${pg(s)}`,f=Jg(e[s],ce,n,r,i,a,d,t);f.valid?c[s]=!0:(u=i,S.push({instanceLocation:o,keyword:`additionalProperties`,keywordLocation:t,error:`Property "${s}" does not match additional properties schema.`},...f.errors))}}else if(!u&&le!==void 0){let t=`${s}/unevaluatedProperties`;for(let s in e)if(!c[s]){let l=`${o}/${pg(s)}`,u=Jg(e[s],le,n,r,i,a,l,t);u.valid?c[s]=!0:S.push({instanceLocation:o,keyword:`unevaluatedProperties`,keywordLocation:t,error:`Property "${s}" does not match unevaluated properties schema.`},...u.errors)}}}else if(u===`array`){Ce!==void 0&&e.length>Ce&&S.push({instanceLocation:o,keyword:`maxItems`,keywordLocation:`${s}/maxItems`,error:`Array has too many items (${e.length} > ${Ce}).`}),Se!==void 0&&e.length<Se&&S.push({instanceLocation:o,keyword:`minItems`,keywordLocation:`${s}/minItems`,error:`Array has too few items (${e.length} < ${Se}).`});let t=e.length,l=0,u=!1;if(he!==void 0){let d=`${s}/prefixItems`,f=Math.min(he.length,t);for(;l<f;l++){let t=Jg(e[l],he[l],n,r,i,a,`${o}/${l}`,`${d}/${l}`);if(c[l]=!0,!t.valid&&(u=i,S.push({instanceLocation:o,keyword:`prefixItems`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}}if(ge!==void 0){let d=`${s}/items`;if(Array.isArray(ge)){let s=Math.min(ge.length,t);for(;l<s;l++){let t=Jg(e[l],ge[l],n,r,i,a,`${o}/${l}`,`${d}/${l}`);if(c[l]=!0,!t.valid&&(u=i,S.push({instanceLocation:o,keyword:`items`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}}else for(;l<t;l++){let t=Jg(e[l],ge,n,r,i,a,`${o}/${l}`,d);if(c[l]=!0,!t.valid&&(u=i,S.push({instanceLocation:o,keyword:`items`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}if(!u&&_e!==void 0){let d=`${s}/additionalItems`;for(;l<t;l++){let t=Jg(e[l],_e,n,r,i,a,`${o}/${l}`,d);c[l]=!0,t.valid||(u=i,S.push({instanceLocation:o,keyword:`additionalItems`,keywordLocation:d,error:`Items did not match additional items schema.`},...t.errors))}}}if(ye!==void 0)if(t===0&&be===void 0)S.push({instanceLocation:o,keyword:`contains`,keywordLocation:`${s}/contains`,error:`Array is empty. It must contain at least one item matching the schema.`});else if(be!==void 0&&t<be)S.push({instanceLocation:o,keyword:`minContains`,keywordLocation:`${s}/minContains`,error:`Array has less items (${t}) than minContains (${be}).`});else{let l=`${s}/contains`,u=S.length,d=0;for(let s=0;s<t;s++){let t=Jg(e[s],ye,n,r,i,a,`${o}/${s}`,l);t.valid?(c[s]=!0,d++):S.push(...t.errors)}d>=(be||0)&&(S.length=u),be===void 0&&xe===void 0&&d===0?S.splice(u,0,{instanceLocation:o,keyword:`contains`,keywordLocation:l,error:`Array does not contain item matching schema.`}):be!==void 0&&d<be?S.push({instanceLocation:o,keyword:`minContains`,keywordLocation:`${s}/minContains`,error:`Array must contain at least ${be} items matching schema. Only ${d} items were found.`}):xe!==void 0&&d>xe&&S.push({instanceLocation:o,keyword:`maxContains`,keywordLocation:`${s}/maxContains`,error:`Array may contain at most ${xe} items matching schema. ${d} items were found.`})}if(!u&&ve!==void 0){let u=`${s}/unevaluatedItems`;for(;l<t;l++){if(c[l])continue;let t=Jg(e[l],ve,n,r,i,a,`${o}/${l}`,u);c[l]=!0,t.valid||S.push({instanceLocation:o,keyword:`unevaluatedItems`,keywordLocation:u,error:`Items did not match unevaluated items schema.`},...t.errors)}}if(we)for(let n=0;n<t;n++){let r=e[n],i=typeof r==`object`&&!!r;for(let a=0;a<t;a++){if(n===a)continue;let t=e[a];(r===t||i&&typeof t==`object`&&t&&fg(r,t))&&(S.push({instanceLocation:o,keyword:`uniqueItems`,keywordLocation:`${s}/uniqueItems`,error:`Duplicate items at indexes ${n} and ${a}.`}),n=2**53-1,a=2**53-1)}}}else if(u===`number`){if(n===`4`?(Te!==void 0&&(De===!0&&e<=Te||e<Te)&&S.push({instanceLocation:o,keyword:`minimum`,keywordLocation:`${s}/minimum`,error:`${e} is less than ${De?`or equal to `:``} ${Te}.`}),Ee!==void 0&&(x===!0&&e>=Ee||e>Ee)&&S.push({instanceLocation:o,keyword:`maximum`,keywordLocation:`${s}/maximum`,error:`${e} is greater than ${x?`or equal to `:``} ${Ee}.`})):(Te!==void 0&&e<Te&&S.push({instanceLocation:o,keyword:`minimum`,keywordLocation:`${s}/minimum`,error:`${e} is less than ${Te}.`}),Ee!==void 0&&e>Ee&&S.push({instanceLocation:o,keyword:`maximum`,keywordLocation:`${s}/maximum`,error:`${e} is greater than ${Ee}.`}),De!==void 0&&e<=De&&S.push({instanceLocation:o,keyword:`exclusiveMinimum`,keywordLocation:`${s}/exclusiveMinimum`,error:`${e} is less than ${De}.`}),x!==void 0&&e>=x&&S.push({instanceLocation:o,keyword:`exclusiveMaximum`,keywordLocation:`${s}/exclusiveMaximum`,error:`${e} is greater than or equal to ${x}.`})),Oe!==void 0){let t=e%Oe;Math.abs(0-t)>=1.1920929e-7&&Math.abs(Oe-t)>=1.1920929e-7&&S.push({instanceLocation:o,keyword:`multipleOf`,keywordLocation:`${s}/multipleOf`,error:`${e} is not a multiple of ${Oe}.`})}}else if(u===`string`){let t=ke===void 0&&Ae===void 0?0:qg(e);ke!==void 0&&t<ke&&S.push({instanceLocation:o,keyword:`minLength`,keywordLocation:`${s}/minLength`,error:`String is too short (${t} < ${ke}).`}),Ae!==void 0&&t>Ae&&S.push({instanceLocation:o,keyword:`maxLength`,keywordLocation:`${s}/maxLength`,error:`String is too long (${t} > ${Ae}).`}),je!==void 0&&!new RegExp(je,`u`).test(e)&&S.push({instanceLocation:o,keyword:`pattern`,keywordLocation:`${s}/pattern`,error:`String does not match pattern.`}),ae!==void 0&&Ig[ae]&&!Ig[ae](e)&&S.push({instanceLocation:o,keyword:`format`,keywordLocation:`${s}/format`,error:`String does not match format "${ae}".`})}return{valid:S.length===0,errors:S}}var Yg=class{schema;draft;shortCircuit;lookup;constructor(e,t=`2019-09`,n=!0){this.schema=e,this.draft=t,this.shortCircuit=n,this.lookup=yg(e)}validate(e){return Jg(e,this.schema,this.draft,this.lookup,this.shortCircuit)}addSchema(e,t){t&&(e={...e,$id:t}),yg(e,this.lookup)}},Xg=class{shortcircuit;draft;constructor(e){this.shortcircuit=e?.shortcircuit??!0,this.draft=e?.draft}_draftFor(e){let t=ee(e,`pass an explicit { draft } to CfWorkerJsonSchemaValidator to validate other dialects.`);return t===`draft-7`?`7`:t}getValidator(e){let t=new Yg(e,this.draft??this._draftFor(e),this.shortcircuit);return e=>{let n=t.validate(e);return n.valid?{valid:!0,data:e,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:n.errors.map(e=>`${e.instanceLocation}: ${e.error}`).join(`; `)}}}};globalThis.crypto;var Zg=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthClientFlowError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e){super(e),this.name=new.target.name,np(this,new.target)}};(class extends Zg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.IssuerMismatchError`})}kind;expected;received;constructor(e,t,n){super(`Issuer mismatch in ${e===`metadata`?`authorization server metadata (RFC 8414 \xA73.3)`:`authorization response (RFC 9207)`}: expected ${JSON.stringify(t)}, received ${JSON.stringify(n)}`),this.kind=e,this.expected=t,this.received=n}}),class extends Zg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.RegistrationRejectedError`})}status;body;submittedMetadata;constructor(e){super(`Dynamic Client Registration rejected (HTTP ${e.status}): ${e.body}`),this.status=e.status,this.body=e.body,this.submittedMetadata=e.submittedMetadata}},class extends Zg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsecureTokenEndpointError`})}tokenEndpoint;constructor(e){super(`Refusing to send credentials to non-https token endpoint \'${e}\'. OAuth token requests MUST use TLS (localhost / *.localhost / 127.0.0.1 / ::1 are exempt).`),this.tokenEndpoint=e}},class extends Zg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.AuthorizationServerMismatchError`})}constructor(e,t){super(`Authorization server mismatch: credentials are bound to ${JSON.stringify(e)} but this call resolved ${JSON.stringify(t)}; refusing to present them to a different authorization server`),this.recordedIssuer=e,this.currentIssuer=t}},class extends Zg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsufficientScopeError`})}requiredScope;resourceMetadataUrl;errorDescription;constructor(e){super(`Insufficient scope${e.requiredScope?`: required "${e.requiredScope}"`:``}`),this.requiredScope=e.requiredScope,this.resourceMetadataUrl=e.resourceMetadataUrl,this.errorDescription=e.errorDescription}};var Qg=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnauthorizedError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e){super(e??`Unauthorized`),this.name=`UnauthorizedError`,np(this,new.target)}},$g=new Set([`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`server/discover`]),e_=class{_entries=new Map;_maxEntries;_stamp=0;_cappedSize=0;constructor(e){this._maxEntries=e?.maxEntries??512}get size(){return this._entries.size}get(e){return this._entries.get(t_(e))}set(e,t){let n=t_(e),r=$g.has(e.method),i=!this._entries.has(n);if(!r&&i&&this._maxEntries>0&&this._cappedSize>=this._maxEntries){for(let e of this._entries.keys())if(!$g.has(e.slice(0,e.indexOf(`\\0`)))){this._entries.delete(e),this._cappedSize--;break}}let a=++this._stamp;return this._entries.set(n,{...t,stamp:a}),i&&!r&&this._cappedSize++,a}delete(e){this._entries.delete(t_(e))&&!$g.has(e.method)&&this._cappedSize--}evict(e){let t=`${e}\\0`,n=$g.has(e);for(let e of this._entries.keys())e.startsWith(t)&&(this._entries.delete(e),n||this._cappedSize--)}clear(){this._entries.clear(),this._cappedSize=0}};function t_(e){return`${e.method}\\0${JSON.stringify([e.partition??``,e.params??``])}`}function n_(e,t){return t===void 0?e:`${e}\\0${t}`}var r_=864e5,i_=class{_evictionGeneration=new Map;_toolIndex;_toolOutputValidatorIndex;_serverIdentity=``;constructor(e,t,n=()=>{},r=``,i=Date.now){this._store=e,this._isUserSupplied=t,this._reportError=n,this._cachePartition=r,this._now=i}now(){return this._now()}setServerIdentity(e){this._serverIdentity=e}_partitionFor(e){return JSON.stringify([this._serverIdentity,e===`public`?``:this._cachePartition])}async _probe(e,t){let n={method:e,params:t??``},r=this._partitionFor(`private`),i=await this._store.get({...n,partition:r});if(i!==void 0)return i;let a=this._partitionFor(`public`);if(a===r)return;let o=await this._store.get({...n,partition:a});return o?.scope===`public`?o:void 0}async evict(e){this._evictionGeneration.set(e,(this._evictionGeneration.get(e)??0)+1),await this._deleteBoth(e,``)}async _deleteBoth(e,t){let n=this._partitionFor(`private`),r=this._partitionFor(`public`);try{await this._store.delete({method:e,params:t,partition:n})}catch(e){this._reportError(e)}if(r!==n)try{await this._store.delete({method:e,params:t,partition:r})}catch(e){this._reportError(e)}}async evictKey(e,t){let n=n_(e,t),r=this._evictionGeneration.get(n);r!==void 0&&this._evictionGeneration.set(n,r+1),await this._deleteBoth(e,t)}captureGeneration(e,t){let n=n_(e,t),r=this._evictionGeneration.get(n)??0;return this._evictionGeneration.set(n,r),r}async write(e,t,n,r){if((this._evictionGeneration.get(n_(e,r?.params))??0)!==n)return;let i=r?.params??``,a=this._partitionFor(`private`),o=this._partitionFor(`public`),s=(r?.scope??`private`)===`public`?o:a;try{await this._store.set({method:e,params:i,partition:s},{value:a_(t),expiresAt:r?.expiresAt,scope:r?.scope})}catch(e){this._reportError(e)}if(o!==a)try{await this._store.delete({method:e,params:i,partition:s===a?o:a})}catch(e){this._reportError(e)}}async read(e,t){let n=await this._probe(e,t);if(!(n?.expiresAt===void 0||!(n.expiresAt>this.now())))try{let e=JSON.parse(n.value);if(typeof e!=`object`||!e||Array.isArray(e))throw TypeError(`cached document is not an object`);return{value:e}}catch(n){this._reportError(n),await this._deleteBoth(e,t??``);return}}resetForReconnect(){this._isUserSupplied||this._store.clear(),this._evictionGeneration.clear(),this._toolIndex=void 0,this._toolOutputValidatorIndex=void 0,this._serverIdentity=``}async toolDefinition(e){let t=await this._probe(`tools/list`);if(t===void 0){this._toolIndex=void 0;return}if(this._toolIndex?.stamp!==t.stamp){let e=this._decodeListTools(t),n=new Map;if(e!==void 0)for(let t of e.tools)n.set(t.name,t);this._toolIndex={stamp:t.stamp,byName:n}}return this._toolIndex.byName.get(e)}async outputValidator(e,t){let n=await this._probe(`tools/list`);if(n===void 0){this._toolOutputValidatorIndex=void 0;return}if(this._toolOutputValidatorIndex?.stamp!==n.stamp){let e=this._decodeListTools(n)??{tools:[]},r=new Map;for(let n of e.tools){let e=t(n);e!==void 0&&r.set(n.name,e)}this._toolOutputValidatorIndex={stamp:n.stamp,byName:r}}return this._toolOutputValidatorIndex.byName.get(e)}_decodeListTools(e){try{let t=JSON.parse(e.value);if(!Array.isArray(t?.tools)||!t.tools.every(e=>typeof e==`object`&&!!e))throw TypeError(`cached tools/list document has a malformed tools array`);return t}catch(e){this._reportError(e);return}}};function a_(e){let t;try{t=JSON.stringify(e)}catch(e){throw TypeError(`cache value is not JSON-serializable: ${e instanceof Error?e.message:String(e)}`)}if(typeof t!=`string`)throw TypeError(`cache value is not JSON-serializable: it has no JSON representation`);return t}var o_=Symbol.for(`mcp.authSeamEscape`);function s_(e){return(typeof e==`object`&&!!e||typeof e==`function`)&&e[o_]===!0}var c_=-32022,l_=new Set([-32001,-32020,-32021]);function u_(e,t){switch(e.kind){case`result`:return d_(e.result,t);case`rpc-error`:return f_(e,t);case`http-error`:return p_(e,t);case`network-error`:return m_(e.error,t);case`unusable-reply`:return{kind:`error`,error:new z(R.EraNegotiationFailed,`Version negotiation probe failed: the server answered with an unusable reply (${g_(e.error)})`,{cause:e.error},{cause:e.error})};case`auth-required`:return{kind:`error`,error:e.error};case`closed`:return t.transportKind===`stdio`?{kind:`legacy`}:m_(Error(`Connection closed during the version negotiation probe`),t);case`timeout`:return t.transportKind===`stdio`?{kind:`legacy`}:{kind:`error`,error:new z(R.RequestTimeout,`Version negotiation probe timed out after ${e.timeoutMs}ms`,{timeout:e.timeoutMs})}}}function d_(e,t){let n=jm(Am).validateResult(`server/discover`,e);if(!n.ok)return{kind:`legacy`};let r=n.value.supportedVersions,i=t.clientModernVersions.find(e=>r.includes(e));return i===void 0?t.fallbackAvailable?{kind:`legacy`}:{kind:`error`,error:new Xp({supported:[...r],requested:t.requestedVersion})}:{kind:`modern`,version:i,discover:n.value}}function f_(e,t){let{code:n,message:r,data:i}=e;if(n===c_){let e=__(i);if(e===void 0)return{kind:`legacy`};let n=new Xp({supported:e,requested:v_(i)??t.requestedVersion},r),a=lp(e),o=t.clientModernVersions.find(e=>a.includes(e));return o===void 0?a.length>0?{kind:`error`,error:n}:t.fallbackAvailable?{kind:`legacy`}:{kind:`error`,error:n}:{kind:`corrective`,version:o,error:n}}return l_.has(n),{kind:`legacy`}}function p_(e,t){if(e.status===401||e.status===403){let t=e.status===403;return{kind:`error`,error:new ip(t?R.ClientHttpForbidden:R.ClientHttpAuthentication,`Version negotiation failed: ${t?`the server denied access (HTTP 403)`:`the server requires authorization (HTTP 401)`}`,{status:e.status,statusText:e.statusText,text:e.body})}}if(e.status>=500)return{kind:`error`,error:new ip(R.EraNegotiationFailed,`Version negotiation failed: the server answered the probe with HTTP ${e.status}`,{status:e.status,statusText:e.statusText,text:e.body})};let n=y_(e.body);return n===void 0?{kind:`legacy`}:f_(n,t)}function m_(e,t){return t.environment===`browser`&&h_(e)?{kind:`legacy`}:{kind:`error`,error:new z(R.EraNegotiationFailed,`Version negotiation probe failed: ${g_(e)}`,{cause:e},{cause:e})}}function h_(e){return e instanceof TypeError||e instanceof Error&&e.name===`TypeError`}function g_(e){return e instanceof Error?e.message:String(e)}function __(e){if(typeof e!=`object`||!e)return;let t=e.supported;if(!(!Array.isArray(t)||t.length===0||!t.every(e=>typeof e==`string`)))return t}function v_(e){if(typeof e!=`object`||!e)return;let t=e.requested;return typeof t==`string`?t:void 0}function y_(e){if(e===void 0||e===``)return;let t;try{t=JSON.parse(e)}catch{return}if(typeof t!=`object`||!t)return;let n=t.error;if(typeof n!=`object`||!n)return;let{code:r,message:i,data:a}=n;if(typeof r==`number`)return{code:r,message:typeof i==`string`?i:``,data:a}}var b_=`legacy`;function x_(e,t){let n=e?.mode??b_;if(n===`legacy`)return{kind:`legacy`};let r=e?.probe??{};if(typeof n==`object`){if(!sp(n.pin))throw TypeError(`versionNegotiation: { pin: \'${n.pin}\' } is not a modern protocol revision \u2014 pinning is for 2026-07-28 and later; omit versionNegotiation (or use mode: \'legacy\') for 2025-era servers.`);return{kind:`pin`,version:n.pin,probe:r}}let i=t?lp(t):[];return{kind:`auto`,modernVersions:i.length>0?i:[...op],fallbackAvailable:!t||cp(t).length>0,probe:r}}function S_(){let e=globalThis;return e.window!==void 0&&e.document!==void 0?`browser`:`node`}function C_(e){return`stderr`in e&&`pid`in e?`stdio`:`http`}var w_=class e{_pending;_probeCounter=0;_savedOnMessage;_savedOnError;_savedOnClose;_closeDelivered=!1;constructor(e){this._transport=e,this._savedOnMessage=e.onmessage,this._savedOnError=e.onerror,this._savedOnClose=e.onclose}static async open(t){let n=new e(t);t.onmessage=e=>{let t=n._pending;if(t!==void 0&&(Bm(e)||Vm(e))&&e.id===t.id){n._pending=void 0,Bm(e)?t.resolve({kind:`response`,result:e.result}):t.resolve({kind:`response`,error:e.error});return}},t.onerror=e=>{n._savedOnError?.(e)},t.onclose=()=>{let e=n._pending;e!==void 0&&(n._pending=void 0,e.resolve({kind:`closed`})),n._closeDelivered=!0,n._savedOnClose?.()};try{await t.start()}catch(e){throw n.detach(),e}return n}async exchange(e,t){let n=`server-discover-probe-${++this._probeCounter}`;return new Promise(r=>{let i=!1,a=e=>{i||(i=!0,clearTimeout(o),this._pending?.id===n&&(this._pending=void 0),r(e))},o=setTimeout(()=>a({kind:`timeout`}),t);this._pending={id:n,resolve:a},this._transport.send(e(n)).catch(e=>a({kind:`send-error`,error:e}))})}detach(){if(this._pending=void 0,this._transport.onmessage=this._savedOnMessage,this._transport.onerror=this._savedOnError,this._closeDelivered&&this._savedOnClose!==void 0){let e=this._savedOnClose,t=this._transport,n=!1,r=()=>{if(!n){n=!0;return}e()};t.onclose=r,T_.set(t,()=>{t.onclose===r&&(t.onclose=e)})}else this._transport.onclose=this._savedOnClose}release(){this.detach();let e=this._transport,t=e.start,n=!0;e.start=async function(){if(n){n=!1,e.start=t;return}return t.call(e)}}},T_=new WeakMap;function E_(e){let t=T_.get(e);T_.delete(e),t?.()}function D_(e,t,n,r){return{jsonrpc:`2.0`,id:e,method:`server/discover`,params:{_meta:jm(t).outboundEnvelope({protocolVersion:t,clientInfo:n,clientCapabilities:r})}}}function O_(e){return e instanceof z&&e.code===R.ClientHttpUnexpectedContent||e instanceof Error&&e.name===`SyntaxError`}function k_(e,t){switch(e.kind){case`response`:return e.error===void 0?{kind:`result`,result:e.result}:{kind:`rpc-error`,...e.error};case`send-error`:{let t=e.error;if(s_(t)||t instanceof Qg||t instanceof Error&&t.name===`UnauthorizedError`)return{kind:`auth-required`,error:t};if(t instanceof ip){let e=t.data?.text;return{kind:`http-error`,status:t.data.status,body:typeof e==`string`?e:void 0,statusText:t.data.statusText}}return O_(t)?{kind:`unusable-reply`,error:t}:{kind:`network-error`,error:t}}case`closed`:return{kind:`closed`};case`timeout`:return{kind:`timeout`,timeoutMs:t}}}async function A_(e,t){let n=e.probe.timeoutMs??t.defaultTimeoutMs,r=Math.max(0,e.probe.maxRetries??0),i=e.kind===`pin`?[e.version]:e.modernVersions,a=e.kind===`auto`&&e.fallbackAvailable,o=await w_.open(t.transport),s=async()=>{let s=i[0],c=!1,l=r;for(;;){let r=await o.exchange(e=>D_(e,s,t.clientInfo,t.capabilities),n);if(r.kind===`timeout`&&l>0){l--;continue}let u=k_(r,n),d=u_(u,{clientModernVersions:i,requestedVersion:s,fallbackAvailable:a,environment:t.environment,transportKind:t.transportKind});switch(d.kind){case`modern`:return{era:`modern`,version:d.version,discover:d.discover};case`corrective`:if(c)throw d.error;c=!0,s=d.version;continue;case`legacy`:{let n=u.kind===`closed`?`the connection closed during the server/discover probe`:void 0;if(e.kind===`pin`)throw new z(R.EraNegotiationFailed,n===void 0?`Version negotiation failed: the server did not offer pinned protocol version ${e.version} via server/discover (no fallback in pin mode)`:`Version negotiation failed: ${n} before the server offered pinned protocol version ${e.version} (no fallback in pin mode)`);if(!e.fallbackAvailable)throw new z(R.EraNegotiationFailed,n===void 0?`Version negotiation failed: the server gave no modern evidence and this client supports no pre-2026-07-28 protocol version to fall back to`:`Version negotiation failed: ${n} and this client supports no pre-2026-07-28 protocol version to fall back to`);if(n!==void 0&&t.disposableProbe!==!0)throw new z(R.EraNegotiationFailed,`Version negotiation failed: ${n} (this transport probed in place \u2014 the disposable sibling probe requires the SDK\'s base StdioClientTransport)`);return{era:`legacy`}}case`error`:throw d.error}}},c;try{c=await s()}catch(e){throw o.detach(),e}return o.release(),c}function j_(e){let t=Object.getPrototypeOf(e);if(t===null||!Object.prototype.hasOwnProperty.call(t,`_dispose`))return;let n=e._serverParams;return typeof n==`object`&&n&&typeof n.command==`string`?n:void 0}async function M_(e,t,n,r){let i=t.constructor,a=new i({...n,stderr:`ignore`}),o=t.close,s=!1,c,l=new Promise((e,t)=>{c=()=>t(N_())});t.close=async function(){return s=!0,c?.(),o.call(t)};let u;try{let t=A_(e,{...r,transport:a,transportKind:`stdio`,disposableProbe:!0});t.catch(()=>{}),u=await Promise.race([t,l])}finally{await P_(a),t.close=o}if(s)throw N_();return u}function N_(){return new z(R.EraNegotiationFailed,`Version negotiation failed: the transport was closed during the server/discover probe`)}async function P_(e){try{let t=e._dispose;await(typeof t==`function`?t.call(e):e.close())}catch{}}function F_(e){let t=e._meta?.[jl];return qh.Implementation(t)?t:void 0}function I_(e,t){if(!(!e||typeof t!=`object`||!t)){if(e.type===`object`&&e.properties&&typeof e.properties==`object`){let n=t,r=e.properties;for(let e of Object.keys(r)){let t=r[e];n[e]===void 0&&Object.prototype.hasOwnProperty.call(t,`default`)&&(n[e]=t.default),n[e]!==void 0&&I_(t,n[e])}}if(Array.isArray(e.anyOf))for(let n of e.anyOf)typeof n!=`boolean`&&I_(n,t);if(Array.isArray(e.oneOf))for(let n of e.oneOf)typeof n!=`boolean`&&I_(n,t)}}function L_(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};let t=e.form!==void 0,n=e.url!==void 0;return{supportsFormMode:t||!t&&!n,supportsUrlMode:n}}function R_(e){if(typeof e==`object`&&e&&(e.kind===`legacy`&&!(`supportedVersions`in e)&&!(`discover`in e)||e.kind===`modern`&&yu.safeParse(e.discover).success))return e;throw new z(R.EraNegotiationFailed,`connect({ prior }): unrecognized prior \u2014 expected { kind: \'modern\', discover } or { kind: \'legacy\' }`)}var z_={"notifications/tools/list_changed":[`tools/list`],"notifications/prompts/list_changed":[`prompts/list`],"notifications/resources/list_changed":[`resources/list`,`resources/templates/list`]},B_=64,V_={};(class extends tg{_serverCapabilities;_serverVersion;_capabilities;_instructions;_jsonSchemaValidator;_cache;_defaultCacheTtlMs;_listMaxPages;_listChangedDebounceTimers=new Map;_listChangedConfig;_enforceStrictCapabilities;_versionNegotiation;_supportedProtocolVersionsOption;_inputRequiredDriverConfig;_listenState=new Map;_nextListenId=0;_autoOpenedSubscription;_discoverResult;static{V_.enforceStrictCapabilities=e=>e._enforceStrictCapabilities,V_.walkPages=(e,t,n,r)=>e._walkPages(t,n,r),V_.readResource=(e,t,n)=>e._readResource(t,n)}_resetConnectionState(){if(this._negotiatedProtocolVersion=void 0,this._serverCapabilities=void 0,this._serverVersion=void 0,this._instructions=void 0,this._discoverResult=void 0,this._autoOpenedSubscription=void 0,this._listenState.size>0){let e=new z(R.ConnectionClosed,`subscriptions/listen: client reconnected or closed; subscription state from the previous connection was reset`);for(let t of this._listenState.values())t.settle({cause:`remote`,error:e})}this._listenState.clear();for(let e of this._listChangedDebounceTimers.values())clearTimeout(e);this._listChangedDebounceTimers.clear(),this._cache.resetForReconnect()}async close(){try{await super.close()}finally{this._resetConnectionState()}}constructor(e,t){super(t),this._clientInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._jsonSchemaValidator=t?.jsonSchemaValidator??new Xg,this._enforceStrictCapabilities=t?.enforceStrictCapabilities??!1,this._versionNegotiation=t?.versionNegotiation,this._supportedProtocolVersionsOption=t?.supportedProtocolVersions,this._inputRequiredDriverConfig=Ih(t?.inputRequired),this._cache=new i_(t?.responseCacheStore??new e_,t?.responseCacheStore!==void 0,e=>this._reportStoreError(e),t?.cachePartition??``),this._defaultCacheTtlMs=t?.defaultCacheTtlMs??0,this._listMaxPages=t?.listMaxPages??B_,t?.listChanged&&(this._listChangedConfig=t.listChanged)}buildContext(e,t){return e}_shouldDropInbound(e){if(this._negotiatedProtocolVersion!==void 0&&sp(this._negotiatedProtocolVersion)&&Rm(e))return`drop`}_outboundMetaEnvelope(){let e=this._negotiatedProtocolVersion;if(e!==void 0)return this._wireCodec().outboundEnvelope({protocolVersion:e,clientInfo:this._clientInfo,clientCapabilities:this._capabilities})}_resolveNonCompleteResult(e,t){return this._inputRequiredDriverConfig.autoFulfill?ug({getRequestHandler:e=>this._getRequestHandler(e),buildContext:e=>this.buildContext(e,void 0),sessionId:this.transport?.sessionId},this._inputRequiredDriverConfig,e,t):Promise.reject(new z(R.UnsupportedResultType,`Unsupported result type \'input_required\' for ${t.request.method}: multi-round-trip auto-fulfilment is not enabled on this instance \u2014 pass allowInputRequired: true to handle it manually, or enable inputRequired.autoFulfill`,{resultType:`input_required`,method:t.request.method}))}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler(`tools`,`notifications/tools/list_changed`,e.tools,async()=>(await this.listTools(void 0,{cacheMode:`refresh`})).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler(`prompts`,`notifications/prompts/list_changed`,e.prompts,async()=>(await this.listPrompts(void 0,{cacheMode:`refresh`})).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler(`resources`,`notifications/resources/list_changed`,e.resources,async()=>(await this.listResources(void 0,{cacheMode:`refresh`})).resources)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after connecting to transport`);this._capabilities=rg(this._capabilities,e)}setVersionNegotiation(e){if(this.transport)throw Error(`Cannot configure version negotiation after connecting to transport`);this._versionNegotiation=e}_wrapHandler(e,t){return e===`elicitation/create`?async(e,n)=>{let r=jm(this._negotiatedProtocolVersion),i=r.validateRequest(`elicitation/create`,e);if(!i.ok&&i.reason===`not-in-era`&&(i=r.validateInputRequest(`elicitation/create`,e)),!i.ok)throw new qp(i.reason===`not-in-era`?B.InternalError:B.InvalidParams,i.reason===`not-in-era`?`No wire schema for elicitation/create in the resolved era`:`Invalid elicitation request: ${i.message}`);let{params:a}=i.value;a.mode=a.mode??`form`;let{supportsFormMode:o,supportsUrlMode:s}=L_(this._capabilities.elicitation);if(a.mode===`form`&&!o)throw new qp(B.InvalidParams,`Client does not support form-mode elicitation requests`);if(a.mode===`url`&&!s)throw new qp(B.InvalidParams,`Client does not support URL-mode elicitation requests`);let c=await t(e,n),l=r.validateResult(`elicitation/create`,c);if(!l.ok&&l.reason===`not-in-era`&&(l=r.validateInputResponse(`elicitation/create`,c)),!l.ok)throw new qp(l.reason===`not-in-era`?B.InternalError:B.InvalidParams,l.reason===`not-in-era`?`No wire schema for elicitation/create in the resolved era`:`Invalid elicitation result: ${l.message}`);let u=l.value,d=a.mode===`form`?a.requestedSchema:void 0;if(a.mode===`form`&&u.action===`accept`&&u.content&&d&&this._capabilities.elicitation?.form?.applyDefaults)try{I_(d,u.content)}catch{}return u}:e===`sampling/createMessage`?async(e,n)=>{let r=jm(this._negotiatedProtocolVersion),i=r.validateRequest(`sampling/createMessage`,e);if(!i.ok&&i.reason===`not-in-era`&&(i=r.validateInputRequest(`sampling/createMessage`,e)),!i.ok)throw new qp(i.reason===`not-in-era`?B.InternalError:B.InvalidParams,i.reason===`not-in-era`?`No wire schema for sampling/createMessage in the resolved era`:`Invalid sampling request: ${i.message}`);let{params:a}=i.value,o=await t(e,n),s=!!(a.tools||a.toolChoice),c=r.samplingResultVariant(s,o);if(!c.ok&&c.reason===`not-in-era`&&(c=r.validateInputResponse(`sampling/createMessage`,o)),!c.ok)throw new qp(c.reason===`not-in-era`?B.InternalError:B.InvalidParams,c.reason===`not-in-era`?`No result schema for sampling/createMessage in the resolved era`:`Invalid sampling result: ${c.message}`);return c.value}:t}assertCapability(e,t){if(!this._serverCapabilities?.[e])throw new z(R.CapabilityNotSupported,`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(t?.prior!=null)return this._connectFromPrior(e,R_(t.prior),t);let n=x_(this._versionNegotiation,this._supportedProtocolVersionsOption);return n.kind===`legacy`?this._connectPlainLegacy(e,t):this._connectNegotiated(e,n,t)}async _connectPlainLegacy(e,t){if(await super.connect(e),e.sessionId!==void 0){let t=this._negotiatedProtocolVersion;t!==void 0&&e.setProtocolVersion?.(t);return}this._resetConnectionState(),await this._legacyHandshake(e,t)}async _legacyHandshake(e,t){let n=cp(this._supportedProtocolVersions);try{let r=n[0];if(r===void 0)throw new z(R.EraNegotiationFailed,`Cannot run the initialize handshake: supportedProtocolVersions contains no pre-2026-07-28 protocol version`);let i=await this.request({method:`initialize`,params:{protocolVersion:r,capabilities:this._capabilities,clientInfo:this._clientInfo}},t);if(i===void 0)throw Error(`Server sent invalid initialize result: ${i}`);if(!n.includes(i.protocolVersion))throw Error(`Server\'s protocol version is not supported: ${i.protocolVersion}`);this._serverCapabilities=i.capabilities,this._serverVersion=i.serverInfo,this._cache.setServerIdentity(this._deriveServerIdentity(e)),e.setProtocolVersion&&e.setProtocolVersion(i.protocolVersion),this._instructions=i.instructions,await this.notification({method:`notifications/initialized`}),this._negotiatedProtocolVersion=i.protocolVersion,this._listChangedConfig&&this._setupListChangedHandlers(this._listChangedConfig)}catch(e){throw this.close(),e}}async _connectNegotiated(e,t,n){if(e.sessionId!==void 0){await super.connect(e);let t=this._negotiatedProtocolVersion;t!==void 0&&e.setProtocolVersion&&e.setProtocolVersion(t);return}this._resetConnectionState();let r;try{let i=C_(e),a={clientInfo:this._clientInfo,capabilities:this._capabilities,environment:S_(),defaultTimeoutMs:n?.timeout??6e4},o=i===`stdio`?j_(e):void 0;r=o===void 0?await A_(t,{...a,transport:e,transportKind:i}):await M_(t,e,o,a)}catch(t){throw await e.close().catch(()=>{}),E_(e),t}if(E_(e),await super.connect(e),r.era===`legacy`){await this._legacyHandshake(e,n);return}if(this._serverCapabilities=r.discover.capabilities,this._serverVersion=F_(r.discover),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=r.discover.instructions,this._discoverResult=r.discover,this._negotiatedProtocolVersion=r.version,e.setProtocolVersion&&e.setProtocolVersion(r.version),this._listChangedConfig){let e=this._listChangedConfig,t=this._serverCapabilities,r={...e.tools&&t?.tools?.listChanged&&{tools:e.tools},...e.prompts&&t?.prompts?.listChanged&&{prompts:e.prompts},...e.resources&&t?.resources?.listChanged&&{resources:e.resources}},i=!0;try{this._setupListChangedHandlers(r)}catch(e){i=!1,this.onerror?.(e instanceof Error?e:Error(String(e)))}let a=i?{...r.tools&&{toolsListChanged:!0},...r.prompts&&{promptsListChanged:!0},...r.resources&&{resourcesListChanged:!0}}:{};if(Object.keys(a).length>0){let e=new AbortController,t=()=>e.abort(n?.signal?.reason);n?.signal?.aborted&&t(),n?.signal?.addEventListener(`abort`,t);try{this._autoOpenedSubscription=await this.listen(a,{timeout:n?.timeout,signal:e.signal})}catch(e){if(n?.signal?.aborted)throw await this.close().catch(()=>{}),e;this.onerror?.(e instanceof Error?e:Error(String(e)))}finally{n?.signal?.removeEventListener(`abort`,t)}}}}async _connectFromPrior(e,t,n){if(t.kind===`legacy`)return this._connectPlainLegacy(e,n);let r=t.discover;this._resetConnectionState();let i=this._supportedProtocolVersionsOption,a=(i&&lp(i).length>0?lp(i):op).find(e=>r.supportedVersions.includes(e));if(a===void 0)throw new z(R.EraNegotiationFailed,`connect({ prior }) with a modern verdict requires a 2026-07-28+ mutual protocol version; the supplied DiscoverResult and this client\'s supportedProtocolVersions have no modern overlap. For a server known to be legacy, pass prior: { kind: \'legacy\' } to skip the probe and initialize directly, or use versionNegotiation: { mode: \'auto\' } to re-probe with legacy fallback.`);if(await super.connect(e),this._discoverResult=r,this._serverCapabilities=r.capabilities,this._serverVersion=F_(r),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=r.instructions,this._negotiatedProtocolVersion=a,e.setProtocolVersion?.(a),this._listChangedConfig)try{this._setupListChangedHandlers(this._listChangedConfig)}catch(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}_deriveServerIdentity(e){let t=this._serverVersion;return t===void 0?e.sessionId??`anonymous:${Date.now()}-${Math.random().toString(36).slice(2)}`:`${t.name}@${t.version}`}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}getProtocolEra(){let e=this._negotiatedProtocolVersion;if(e!==void 0)return sp(e)?`modern`:`legacy`}getInstructions(){return this._instructions}getDiscoverResult(){return this._discoverResult}assertCapabilityForMethod(e){switch(e){case`logging/setLevel`:if(!this._serverCapabilities?.logging)throw new z(R.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case`prompts/get`:case`prompts/list`:if(!this._serverCapabilities?.prompts)throw new z(R.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case`resources/list`:case`resources/templates/list`:case`resources/read`:case`resources/subscribe`:case`resources/unsubscribe`:if(!this._serverCapabilities?.resources)throw new z(R.CapabilityNotSupported,`Server does not support resources (required for ${e})`);if(e===`resources/subscribe`&&!this._serverCapabilities.resources.subscribe)throw new z(R.CapabilityNotSupported,`Server does not support resource subscriptions (required for ${e})`);break;case`tools/call`:case`tools/list`:if(!this._serverCapabilities?.tools)throw new z(R.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;case`completion/complete`:if(!this._serverCapabilities?.completions)throw new z(R.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case`initialize`:break;case`server/discover`:break;case`ping`:break}}assertNotificationCapability(e){switch(e){case`notifications/roots/list_changed`:if(!this._capabilities.roots?.listChanged)throw new z(R.CapabilityNotSupported,`Client does not support roots list changed notifications (required for ${e})`);break;case`notifications/initialized`:break;case`notifications/cancelled`:break;case`notifications/progress`:break}}assertRequestHandlerCapability(e){switch(e){case`sampling/createMessage`:if(!this._capabilities.sampling)throw new z(R.CapabilityNotSupported,`Client does not support sampling capability (required for ${e})`);break;case`elicitation/create`:if(!this._capabilities.elicitation)throw new z(R.CapabilityNotSupported,`Client does not support elicitation capability (required for ${e})`);break;case`roots/list`:if(!this._capabilities.roots)throw new z(R.CapabilityNotSupported,`Client does not support roots capability (required for ${e})`);break;case`ping`:break}}async ping(e){return this.request({method:`ping`},e)}async discover(e){let t=await this._requestWithSchema({method:`server/discover`},yu,e);return this._discoverResult=t,t}async complete(e,t){return this.request({method:`completion/complete`,params:e},t)}async setLoggingLevel(e,t){return this.request({method:`logging/setLevel`,params:{level:e}},t)}async getPrompt(e,t){return this.request({method:`prompts/get`,params:e},t)}async listPrompts(e,t){if(!this._serverCapabilities?.prompts&&!this._enforceStrictCapabilities)return console.debug(`Client.listPrompts() called but server does not advertise prompts capability - returning empty list`),{prompts:[]};if(e?.cursor!==void 0)return this.request({method:`prompts/list`,params:e},t);let n=await this._serveFromCache(`prompts/list`,void 0,t);return n===void 0?this._listAllPages(`prompts/list`,e,t,e=>e.prompts):n}async listResources(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug(`Client.listResources() called but server does not advertise resources capability - returning empty list`),{resources:[]};if(e?.cursor!==void 0)return this.request({method:`resources/list`,params:e},t);let n=await this._serveFromCache(`resources/list`,void 0,t);return n===void 0?this._listAllPages(`resources/list`,e,t,e=>e.resources):n}async listResourceTemplates(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug(`Client.listResourceTemplates() called but server does not advertise resources capability - returning empty list`),{resourceTemplates:[]};if(e?.cursor!==void 0)return this.request({method:`resources/templates/list`,params:e},t);let n=await this._serveFromCache(`resources/templates/list`,void 0,t);return n===void 0?this._listAllPages(`resources/templates/list`,e,t,e=>e.resourceTemplates):n}async _listAllPages(e,t,n,r,i){let a=n?.cacheMode===`bypass`,o=this._cache.captureGeneration(e),s=await this._walkPages(e,r=>{let i=r===void 0?t&&{...t}:{...t,cursor:r};return this.request({method:e,...i&&{params:i}},n)},r);return delete s.nextCursor,i?.(s),a||await this._cache.write(e,s,o,this._freshness(s)),s}async _walkPages(e,t,n){let r=await t(void 0),i=r.nextCursor,a=r,o=1;for(;i!==void 0;){if(this._listMaxPages!==0&&o>=this._listMaxPages)throw new z(R.ListPaginationExceeded,`${e}: exceeded listMaxPages (${this._listMaxPages}); server pagination did not terminate`,{method:e,listMaxPages:this._listMaxPages});let s=await t(i);if(s.nextCursor===i&&JSON.stringify(n(s))===JSON.stringify(n(a)))break;n(r).push(...n(s)),a=s,i=s.nextCursor,o++}return r}_freshness(e,t){let n=e,r=typeof n.ttlMs==`number`?n.ttlMs:this._defaultCacheTtlMs,i=n.cacheScope===`public`?`public`:`private`;return{expiresAt:this._cache.now()+Math.min(Math.max(0,r),r_),scope:i,params:t}}async _serveFromCache(e,t,n){if(n?.cacheMode===`bypass`||n?.cacheMode===`refresh`)return;let r=await this._cache.read(e,t).catch(e=>void this._reportStoreError(e));if(r!==void 0){if(n?.signal?.aborted){let e=n.signal.reason;throw e instanceof z?e:new z(R.RequestTimeout,String(e))}return r.value}}_reportStoreError(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}_compileOutputValidator(e){if(e.outputSchema)try{return{ok:!0,validator:this._jsonSchemaValidator.getValidator(e.outputSchema)}}catch(e){return{ok:!1,compileError:e}}}async _resolveXMcpHeaderScan(e,t){let n=t??await this._cache.toolDefinition(e);return n===void 0?void 0:qm(n.inputSchema)}async readResource(e,t){let{result:n}=await this._readResource(e,t);return n}async _readResource(e,t){let n=await this._serveFromCache(`resources/read`,e.uri,t);if(n!==void 0)return{result:n,cached:!0};let r=this._cache.captureGeneration(`resources/read`,e.uri),i=await this.request({method:`resources/read`,params:e},t);if(t?.cacheMode!==`bypass`){let n=this._freshness(i,e.uri);n.expiresAt>this._cache.now()?await this._cache.write(`resources/read`,i,r,n):t?.cacheMode===`refresh`&&await this._cache.evictKey(`resources/read`,e.uri)}return{result:i,cached:!1}}async subscribeResource(e,t){return this.request({method:`resources/subscribe`,params:e},t)}async unsubscribeResource(e,t){return this.request({method:`resources/unsubscribe`,params:e},t)}async listen(e,t){if(this.transport===void 0)throw new z(R.NotConnected,`Not connected`);let n=this._negotiatedProtocolVersion;if(n===void 0||!sp(n))throw new z(R.MethodNotSupportedByProtocolVersion,`subscriptions/listen requires a 2026-07-28-era connection (negotiated: ${n??`none`}). On a 2025-era connection, change notifications are delivered unsolicited: use ClientOptions.listChanged and resources/subscribe instead.`,{method:`subscriptions/listen`,protocolVersion:n});if(t?.signal?.aborted){let e=t.signal.reason;throw e instanceof z?e:new z(R.RequestTimeout,String(e))}let r=new AbortController,i=`listen:${this._nextListenId++}`,a=`opening`,o,s,c,l,u=new Promise((e,t)=>{c=e,l=t}),d,f=new Promise(e=>{d=e}),p=e=>{if(a===`closed`)return;let n=a===`opening`;if(o!==void 0&&(clearTimeout(o),o=void 0),`ack`in e){a=`open`,c(e.ack);return}a=`closed`,s!==void 0&&t?.signal?.removeEventListener(`abort`,s),this._listenState.delete(i),r.abort(),d(e.cause),n&&l(e.error??new z(R.ConnectionClosed,`subscriptions/listen closed before the server acknowledged`))},m=async()=>{r.abort(),await this.notification({method:`notifications/cancelled`,params:{requestId:i}}).catch(()=>{})},h=async()=>{a!==`closed`&&(p({cause:`local`}),await m())};this._listenState.set(i,{settle:p});let g=t?.timeout??6e4;if(o=setTimeout(()=>{p({cause:`remote`,error:new z(R.RequestTimeout,`subscriptions/listen ack timed out`,{timeout:g})}),m().catch(()=>{})},g),t?.signal){let e=t.signal;s=()=>{if(a===`closed`)return;let t=e.reason;p({cause:`local`,error:t instanceof Error?t:Error(String(t??`Aborted`))}),m().catch(()=>{})},e.addEventListener(`abort`,s,{once:!0})}let _={jsonrpc:`2.0`,id:i,method:`subscriptions/listen`,params:{_meta:{...this._outboundMetaEnvelope()},notifications:e}},v=e=>{p({cause:`remote`,error:e instanceof Error?e:Error(String(e))})};try{this.transport.send(_,{requestSignal:r.signal,onRequestStreamEnd:()=>p({cause:`remote`,error:Error(`subscriptions/listen: stream ended`)})}).catch(v)}catch(e){v(e)}return{honoredFilter:await u,close:h,closed:f}}get autoOpenedSubscription(){return this._autoOpenedSubscription}_onnotification(e,t){let n=Object.hasOwn(z_,e.method)?z_[e.method]:void 0;if(e.method===`notifications/resources/updated`){let t=e.params?.uri;typeof t==`string`&&this._cache.evictKey(`resources/read`,t)}else if(n!==void 0)for(let e of n)this._cache.evict(e);if(e.method===`notifications/subscriptions/acknowledged`){let t=e.params?._meta?.[Nl],n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){let t=this._wireCodec().validateNotification(`notifications/subscriptions/acknowledged`,e);n.settle({ack:t.ok?t.value.params.notifications:{}});return}}if(e.method===`notifications/cancelled`){let t=e.params?.requestId,n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){n.settle({cause:`remote`,error:Error(`subscriptions/listen: server cancelled the subscription`)});return}}super._onnotification(e,t)}_onresponse(e){let t=e.id,n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){Vm(e)?n.settle({cause:`remote`,error:qp.fromError(e.error.code,e.error.message,e.error.data)}):n.settle({cause:`graceful`,error:new z(R.ConnectionClosed,`subscriptions/listen: server closed the subscription gracefully before acknowledging`)});return}super._onresponse(e)}_onclose(){if(this._listenState.size>0){let e=new z(R.ConnectionClosed,`Connection closed`);for(let t of this._listenState.values())t.settle({cause:`remote`,error:e});this._listenState.clear()}super._onclose()}async callTool(e,t){let n=this.getProtocolEra()===`modern`&&S_()!==`browser`,r=async()=>{if(!n)return t;let r;try{r=await this._resolveXMcpHeaderScan(e.name,t?.toolDefinition)}catch(e){this._reportStoreError(e)}if(!r?.valid||r.declarations.length===0)return t;let i=ih(r.declarations,e.arguments);return Object.keys(i).length===0?t:{...t,headers:{...t?.headers,...i}}},i=t?.toolDefinition===void 0?await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)):this._compileOutputValidator(t.toolDefinition),a=()=>{if(i===void 0||i.ok)return;let t=i.compileError,n=(t instanceof Error?t.message:String(t)).slice(0,200);throw new qp(B.InvalidParams,`Tool \'${e.name}\' has an invalid outputSchema: ${n}`)};a();let o;try{o=await this.request({method:`tools/call`,params:e},await r())}catch(s){let c=s instanceof qp&&s.code===-32020;if(!n||!c||t?.toolDefinition!==void 0)throw s;let l={signal:t?.signal,timeout:t?.timeout,cacheMode:`refresh`};await this._cache.evict(`tools/list`),await this.listTools(void 0,l).catch(e=>this._reportStoreError(e)),i=await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)),a(),o=await this.request({method:`tools/call`,params:e},await r())}let s=i!==void 0&&i.ok?i.validator:void 0;if(s){if(o.structuredContent===void 0&&!o.isError)throw new qp(B.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(o.structuredContent!==void 0&&!o.isError)try{let e=s(o.structuredContent);if(!e.valid)throw new qp(B.InvalidParams,`Structured content does not match the tool\'s output schema: ${e.errorMessage}`)}catch(e){throw e instanceof qp?e:new qp(B.InvalidParams,`Failed to validate structured content: ${e instanceof Error?e.message:String(e)}`)}}return o}async listTools(e,t){if(!this._serverCapabilities?.tools&&!this._enforceStrictCapabilities)return console.debug(`Client.listTools() called but server does not advertise tools capability - returning empty list`),{tools:[]};if(e?.cursor!==void 0){let n=await this.request({method:`tools/list`,params:e},t);return this._excludeInvalidXMcpHeaderTools(n),n}let n=await this._serveFromCache(`tools/list`,void 0,t);return n===void 0?this._listAllPages(`tools/list`,e,t,e=>e.tools,e=>this._excludeInvalidXMcpHeaderTools(e)):n}_excludeInvalidXMcpHeaderTools(e){if(this.getProtocolEra()!==`modern`||!this.transport||C_(this.transport)===`stdio`)return;let t=e.tools.filter(e=>{let t=qm(e.inputSchema);return t.valid?!0:(console.warn(`[mcp-sdk] excluding tool \'${e.name}\' from tools/list: invalid x-mcp-header declaration \u2014 ${t.reason}`),!1)});t.length!==e.tools.length&&(e.tools=t)}_setupListChangedHandler(e,t,n,r){let i=ah(kd,n);if(!i.success)throw Error(`Invalid ${e} listChanged options: ${i.error.message}`);if(typeof n.onChanged!=`function`)throw TypeError(`Invalid ${e} listChanged options: onChanged must be a function`);let{autoRefresh:a,debounceMs:o}=i.data,{onChanged:s}=n,c=async()=>{if(!a){s(null,null);return}try{s(null,await r())}catch(e){s(e instanceof Error?e:Error(String(e)),null)}};this.setNotificationHandler(t,()=>{if(o){let t=this._listChangedDebounceTimers.get(e);t&&clearTimeout(t);let n=setTimeout(c,o);this._listChangedDebounceTimers.set(e,n)}else c()})}async sendRootsListChanged(){return this.notification({method:`notifications/roots/list_changed`})}}),class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SseError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e,t,n){super(`SSE error: ${t}`),this.code=e,this.event=n,np(this,new.target)}};var H_=class{_eventSlots=new Map;setHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", \u2026) to add multiple listeners without replacing.`),n.onHandler=t}getHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}dispatch(e,t){let n=this._eventSlots.get(e);if(n){n.onHandler?.(t);for(let e of[...n.listeners])e(t)}}_ensureEventSlot(e){let t=this._eventSlots.get(e);return t||(t={listeners:[]},this._eventSlots.set(e,t)),t}},U_=class{_methods=new Set;claim(e,t){if(this._methods.has(e))throw Error(`Handler for "${e}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._methods.add(e)}replace(e){this._methods.add(e)}release(e){this._methods.delete(e)}has(e){return this._methods.has(e)}},W_=new Set;function G_(e,t){let[n,r]=t,i=n?.shape;if(typeof i?.method?.value!=`string`)return;let a=i.method.value,o=e===`request`?`setRequestHandler`:`setNotificationHandler`;W_.has(o)||(W_.add(o),console.warn(`[ext-apps] ${o}(Schema, handler) is deprecated; use ${o}("${a}", { params: Schema.shape.params }, handler).`));let s=r;return[a,{params:i.params},e===`request`?(e,t)=>s({method:a,params:e},K_(t)):e=>s({method:a,params:e})]}function K_(e){return{signal:e.mcpReq.signal,requestId:e.mcpReq.id,sessionId:e.sessionId,_meta:e.mcpReq._meta,sendRequest:e.mcpReq.send,sendNotification:e.mcpReq.notify,authInfo:e.http?.authInfo}}var q_=`2026-01-26`,J_=class{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource){console.debug(`Ignoring message from unknown source`,e);return}let n=eu.safeParse(e.data);n.success?(console.debug(`Parsed message`,n.data),this.onmessage?.(n.data)):e.data?.jsonrpc===`2.0`?(console.error(`Failed to parse message`,n.error.message,e),this.onerror?.(Error(`Invalid JSON-RPC message received: `+n.error.message))):console.debug(`Ignoring non-JSON-RPC message`,n.error.message,e)}}async start(){window.addEventListener(`message`,this.messageListener)}async send(e,t){e.method!==`ui/notifications/tool-input-partial`&&console.debug(`Sending message`,e),this.eventTarget.postMessage(e,`*`)}async close(){window.removeEventListener(`message`,this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},Y_=M([F(`light`),F(`dark`)]).describe(`Color theme preference for the host environment.`),X_=M([F(`inline`),F(`fullscreen`),F(`pip`)]).describe(`Display mode for UI presentation.`),Z_=N(M([F(`--color-background-primary`),F(`--color-background-secondary`),F(`--color-background-tertiary`),F(`--color-background-inverse`),F(`--color-background-ghost`),F(`--color-background-info`),F(`--color-background-danger`),F(`--color-background-success`),F(`--color-background-warning`),F(`--color-background-disabled`),F(`--color-text-primary`),F(`--color-text-secondary`),F(`--color-text-tertiary`),F(`--color-text-inverse`),F(`--color-text-ghost`),F(`--color-text-info`),F(`--color-text-danger`),F(`--color-text-success`),F(`--color-text-warning`),F(`--color-text-disabled`),F(`--color-border-primary`),F(`--color-border-secondary`),F(`--color-border-tertiary`),F(`--color-border-inverse`),F(`--color-border-ghost`),F(`--color-border-info`),F(`--color-border-danger`),F(`--color-border-success`),F(`--color-border-warning`),F(`--color-border-disabled`),F(`--color-ring-primary`),F(`--color-ring-secondary`),F(`--color-ring-inverse`),F(`--color-ring-info`),F(`--color-ring-danger`),F(`--color-ring-success`),F(`--color-ring-warning`),F(`--font-sans`),F(`--font-mono`),F(`--font-weight-normal`),F(`--font-weight-medium`),F(`--font-weight-semibold`),F(`--font-weight-bold`),F(`--font-text-xs-size`),F(`--font-text-sm-size`),F(`--font-text-md-size`),F(`--font-text-lg-size`),F(`--font-heading-xs-size`),F(`--font-heading-sm-size`),F(`--font-heading-md-size`),F(`--font-heading-lg-size`),F(`--font-heading-xl-size`),F(`--font-heading-2xl-size`),F(`--font-heading-3xl-size`),F(`--font-text-xs-line-height`),F(`--font-text-sm-line-height`),F(`--font-text-md-line-height`),F(`--font-text-lg-line-height`),F(`--font-heading-xs-line-height`),F(`--font-heading-sm-line-height`),F(`--font-heading-md-line-height`),F(`--font-heading-lg-line-height`),F(`--font-heading-xl-line-height`),F(`--font-heading-2xl-line-height`),F(`--font-heading-3xl-line-height`),F(`--border-radius-xs`),F(`--border-radius-sm`),F(`--border-radius-md`),F(`--border-radius-lg`),F(`--border-radius-xl`),F(`--border-radius-full`),F(`--border-width-regular`),F(`--shadow-hairline`),F(`--shadow-sm`),F(`--shadow-md`),F(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`),M([T(),Mc()]).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`)).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`);A({method:F(`ui/open-link`),params:A({url:T().describe(`URL to open in the host\'s browser`)})});var Q_=A({isError:D().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),$_=A({isError:D().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),ev=A({isError:D().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough();A({method:F(`ui/notifications/sandbox-proxy-ready`),params:A({})});var tv=A({connectDomains:k(T()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).\n\n- Maps to CSP \\`connect-src\\` directive\n- Empty or omitted \u2192 no network connections (secure default)`),resourceDomains:k(T()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\\n\\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\\n- Wildcard subdomains supported: `https://*.example.com`\\n- Empty or omitted \u2192 no network resources (secure default)"),frameDomains:k(T()).optional().describe("Origins for nested iframes.\\n\\n- Maps to CSP `frame-src` directive\\n- Empty or omitted \u2192 no nested iframes allowed (`frame-src \'none\'`)"),baseUriDomains:k(T()).optional().describe("Allowed base URIs for the document.\\n\\n- Maps to CSP `base-uri` directive\\n- Empty or omitted \u2192 only same origin allowed (`base-uri \'self\'`)")}),nv=A({camera:A({}).optional().describe(`Request camera access.\n\nMaps to Permission Policy \\`camera\\` feature.`),microphone:A({}).optional().describe(`Request microphone access.\n\nMaps to Permission Policy \\`microphone\\` feature.`),geolocation:A({}).optional().describe(`Request geolocation access.\n\nMaps to Permission Policy \\`geolocation\\` feature.`),clipboardWrite:A({}).optional().describe(`Request clipboard write access.\n\nMaps to Permission Policy \\`clipboard-write\\` feature.`)});A({method:F(`ui/notifications/size-changed`),params:A({width:E().optional().describe(`New width in pixels.`),height:E().optional().describe(`New height in pixels.`)})});var rv=A({method:F(`ui/notifications/tool-input`),params:A({arguments:N(T(),O().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),iv=A({method:F(`ui/notifications/tool-input-partial`),params:A({arguments:N(T(),O().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),av=A({method:F(`ui/notifications/tool-cancelled`),params:A({reason:T().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),ov=A({fonts:T().optional()}),sv=A({variables:Z_.optional().describe(`CSS variables for theming the app.`),css:ov.optional().describe(`CSS blocks that apps can inject.`)}),cv=A({method:F(`ui/resource-teardown`),params:A({})}),lv=N(T(),O()),uv=A({text:A({}).optional().describe(`Host supports text content blocks.`),image:A({}).optional().describe(`Host supports image content blocks.`),audio:A({}).optional().describe(`Host supports audio content blocks.`),resource:A({}).optional().describe(`Host supports resource content blocks.`),resourceLink:A({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:A({}).optional().describe(`Host supports structured content.`)});A({method:F(`ui/notifications/request-teardown`),params:A({}).optional()});var dv=A({experimental:N(T(),N(T(),Ic()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:A({}).optional().describe(`Host supports opening external URLs.`),downloadFile:A({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:A({listChanged:D().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:A({listChanged:D().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:A({}).optional().describe(`Host accepts log messages.`),sandbox:A({permissions:nv.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:tv.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:uv.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model\'s context for future turns.`),message:uv.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:A({tools:A({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),fv=A({experimental:N(T(),N(T(),Ic()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:A({listChanged:D().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:k(X_).optional().describe(`Display modes the app supports.`)});A({method:F(`ui/notifications/initialized`),params:A({}).optional()}),A({csp:tv.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:nv.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:T().optional().describe(`Dedicated origin for view sandbox.\n\nUseful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.\n\n**Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include:\n- Hash-based subdomains (e.g., \\`{hash}.claudemcpcontent.com\\`)\n- URL-derived subdomains (e.g., \\`www-example-com.oaiusercontent.com\\`)\n\nIf omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:D().optional().describe(`Visual boundary preference - true if view prefers a visible border.\n\nBoolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts\' defaults may vary.\n\n- \\`true\\`: request visible border + background\n- \\`false\\`: request no visible border + background\n- omitted: host decides border`)}),A({method:F(`ui/request-display-mode`),params:A({mode:X_.describe(`The display mode being requested.`)})});var pv=A({mode:X_.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough(),mv=M([F(`model`),F(`app`)]).describe(`Tool visibility scope - who can access the tool.`);A({resourceUri:T().optional(),visibility:k(mv).optional().describe(`Who can access this tool. Default: ["model", "app"]\n- "model": Tool visible to and callable by the agent\n- "app": Tool callable by the app from this server only`),csp:zc().optional(),permissions:zc().optional()}),A({mimeTypes:k(T()).optional().describe(\'Array of supported MIME types for UI resources.\\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.\')}),A({method:F(`ui/download-file`),params:A({contents:k(M([pd,md])).describe(`Resource contents to download \u2014 embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),A({method:F(`ui/message`),params:A({role:F(`user`).describe(`Message role, currently only "user" is supported.`),content:k(hd).describe(`Message content blocks (text, image, etc.).`)})}),A({method:F(`ui/notifications/sandbox-resource-ready`),params:A({html:T().describe(`HTML content to load into the inner iframe.`),sandbox:T().optional().describe(`Optional override for the inner iframe\'s sandbox attribute.`),csp:tv.optional().describe(`CSP configuration from resource metadata.`),permissions:nv.optional().describe(`Sandbox permissions from resource metadata.`)})});var hv=A({method:F(`ui/notifications/tool-result`),params:wd.describe(`Standard MCP tool execution result.`)}),gv=A({toolInfo:A({id:Yl.optional().describe(`JSON-RPC id of the tools/call request.`),tool:xd.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:Y_.optional().describe(`Current color theme preference.`),styles:sv.optional().describe(`Style configuration for theming the app.`),displayMode:X_.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:k(X_).optional().describe(`Display modes the host supports.`),containerDimensions:M([A({height:E().describe(`Fixed container height in pixels.`)}),A({maxHeight:M([E(),Mc()]).optional().describe(`Maximum container height in pixels.`)})]).and(M([A({width:E().describe(`Fixed container width in pixels.`)}),A({maxWidth:M([E(),Mc()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other\ncontainer holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:T().optional().describe(`User\'s language and region preference in BCP 47 format.`),timeZone:T().optional().describe(`User\'s timezone in IANA format.`),userAgent:T().optional().describe(`Host application identifier.`),platform:M([F(`web`),F(`desktop`),F(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:A({touch:D().optional().describe(`Whether the device supports touch input.`),hover:D().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:A({top:E().describe(`Top safe area inset in pixels.`),right:E().describe(`Right safe area inset in pixels.`),bottom:E().describe(`Bottom safe area inset in pixels.`),left:E().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),_v=A({method:F(`ui/notifications/host-context-changed`),params:gv.describe(`Partial context update containing only changed fields.`)});A({method:F(`ui/update-model-context`),params:A({content:k(hd).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:N(T(),O().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),A({method:F(`ui/initialize`),params:A({appInfo:cu.describe(`App identification (name and version).`),appCapabilities:fv.describe(`Features and capabilities this app provides.`),protocolVersion:T().describe(`Protocol version this app supports.`)})});var vv=A({protocolVersion:T().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:cu.describe(`Host application identification and version.`),hostCapabilities:dv.describe(`Features and capabilities provided by the host.`),hostContext:gv.describe(`Rich context about the host environment.`)}).passthrough(),yv={target:`draft-2020-12`};async function bv(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](yv);throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function xv(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}function Sv(e,t){let n={...e,...t};return t.experimental!==void 0&&(n.experimental={...e.experimental,...t.experimental}),t.tools!==void 0&&(n.tools={...e.tools,...t.tools}),n}var Cv=class e extends tg{_appInfo;_appCapabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_registeredEvents=new Set;_events=new H_;_methods=new U_;setRequestHandler=(...e)=>{let[t,...n]=G_(`request`,e)??e;this._methods.claim(t,`setRequestHandler`),super.setRequestHandler.call(this,t,...n)};setNotificationHandler=(...e)=>{let[t,...n]=G_(`notification`,e)??e;this._methods.claim(t,`setNotificationHandler`),super.setNotificationHandler.call(this,t,...n)};removeRequestHandler=e=>{this._methods.release(e),super.removeRequestHandler(e)};removeNotificationHandler=e=>{this._methods.release(e),super.removeNotificationHandler(e)};replaceRequestHandler=(e,...t)=>{this._methods.replace(e),super.setRequestHandler.call(this,e,...t)};_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:rv,toolinputpartial:iv,toolresult:hv,toolcancelled:av,hostcontextchanged:_v};static ONE_SHOT_EVENTS=new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]);_everHadListener=new Set;_assertHandlerTiming(t){if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let n=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.setHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.addEventListener(e,t)}removeEventListener(e,t){this._events.removeEventListener(e,t)}_ensureEventSlot(e){if(this._registeredEvents.has(e))return;let t=this.eventSchemas[e];if(!t)throw Error(`Unknown event: ${String(e)}`);this.setNotificationHandler(t.shape.method.value,{params:t.shape.params},t=>{let n=t;e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...n}),this._events.dispatch(e,n)}),this._registeredEvents.add(e)}getEventHandler(e){return this._events.getHandler(e)}warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._appCapabilities=t,this.options=n,this._methods.replace(`notifications/cancelled`),this._methods.replace(`notifications/progress`),!n.allowUnsafeEval&&yt({jitless:!0}),this.replaceRequestHandler(`ping`,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}buildContext(e){return e}registerAppCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._appCapabilities=Sv(this._appCapabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._appCapabilities.tools?.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await xv(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await xv(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._appCapabilities.tools&&!this.transport&&this.registerAppCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await bv(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await bv(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(`ui/resource-teardown`,{params:cv.shape.params,result:lv},(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(`tools/call`,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(`tools/list`,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){switch(e){case`sampling/createMessage`:if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`);break}}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._appCapabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;default:return}}assertNotificationCapability(e){}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},t)}async createSamplingMessage(e,t){return this._assertInitialized(`createSamplingMessage`),await this.request({method:`sampling/createMessage`,params:e},t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},ev,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},nu,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},Q_,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},$_,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},pv,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new J_(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1;try{await super.connect(e);let n=await this.request({method:`ui/initialize`,params:{appCapabilities:this._appCapabilities,appInfo:this._appInfo,protocolVersion:q_}},vv,t);if(n===void 0)throw Error(`Server sent invalid initialize result: ${n}`);this._hostCapabilities=n.hostCapabilities,this._hostInfo=n.hostInfo,this._hostContext=n.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}},wv=e=>`${e}`.split(`.`)[1]?.length??0,Tv=e=>10**-wv(e),Ev=(e,t)=>`${+e.toFixed(wv(t))}`,Dv=class extends Error{},Ov=/[A-Za-z_$][\\w$-]*/y,kv=/-?(?:\\d[\\d_]*\\.?\\d*|\\.\\d+)(?:e[+-]?\\d+)?/iy,Av={amp:`&`,lt:`<`,gt:`>`,quot:`"`,apos:`\'`,nbsp:`\\xA0`},jv=e=>e.replace(/&(#x[\\da-f]+|#\\d+|\\w+);/gi,(e,t)=>t[0]===`#`?String.fromCodePoint(t[1]===`x`||t[1]===`X`?parseInt(t.slice(2),16):+t.slice(1)):Av[t]??e),Mv=e=>e.replace(/\\\\(u\\{[\\da-f]+\\}|u[\\da-f]{4}|x[\\da-f]{2}|[\\s\\S])/gi,(e,t)=>t.length>1?String.fromCodePoint(parseInt(t.replace(/[ux{}]/gi,``),16)):{n:`\n`,t:` `,r:`\\r`,b:`\\b`,f:`\\f`,v:`\\v`,0:`\\0`}[t]??t);function Nv(e){let t=0,n=e=>{throw new Dv(e)},r=()=>e.slice(t,t+12).split(`\n`)[0],i=n=>{n.lastIndex=t;let r=n.exec(e)?.[0];return r&&(t+=r.length),r},a=()=>{for(;;)if(i(/\\s+/y),e.startsWith(`//`,t))i(/\\/\\/.*/y);else if(e.startsWith(`/*`,t)){let n=e.indexOf(`*/`,t+2);t=n<0?e.length:n+2}else return},o=n=>(a(),e.startsWith(n,t)),s=e=>{o(e)||n(`Expected \\`${e}\\` at \\`${r()}\\`.`),t+=e.length};function c(){let a=[i(Ov)??n(`Expected a name at \\`${r()}\\`.`)];for(;e[t]===`.`;)t++,a.push(i(Ov)??n("Expected a name after `.`."));return a}function l(r,i=!1){let a=e[t],o=t+1;for(;o<e.length&&e[o]!==a;)e[o]===`\\\\`&&!i&&o++,o++;o>=e.length&&n(`A string is not closed.`);let s=e.slice(t+1,o);return a==="`"&&s.includes("${")&&n(`A template string cannot run here.`),t=o+1,{type:`string`,value:i?jv(s):Mv(s),quote:a,jsx:i,start:r,end:t}}function u(){a();let r=t,f=e[t];if(f===`"`||f===`\'`||f==="`")return l(r);if(f===`<`)return d();if(f===`(`){t++;let e=u();return s(`)`),e}if(f===`[`){t++;let e=[];for(;!o(`]`);)e.push(u()),o(`]`)||s(`,`);return t++,{type:`array`,items:e,start:r,end:t}}if(f===`{`){t++;let n=[];for(;!o(`}`);){let r=t,i=e[t]===`"`||e[t]===`\'`?l(t).value:c()[0],a={type:`name`,path:[i],start:r,end:t};n.push([i,o(`:`)?(t++,u()):a]),o(`}`)||s(`,`)}return t++,{type:`object`,entries:n,start:r,end:t}}let p=i(kv);if(p)return{type:`number`,value:+p.replace(/_/g,``),start:r,end:t};let m=c(),h=t;if(m.length===1){let e=m[0];if(e===`true`||e===`false`)return{type:`boolean`,value:e===`true`,start:r,end:h};if(e===`null`||e===`undefined`)return{type:e,start:r,end:h}}return o(`(`)&&n(`\\`${m.join(`.`)}()\\` is a call, which cannot run here.`),{type:`name`,path:m,start:r,end:h}}function d(){let f=t;s(`<`);let p=o(`>`)?``:c().join(`.`),m=[];for(;;){if(o(`/>`))return t+=2,{type:`element`,name:p,attributes:m,children:[],start:f,end:t};if(o(`>`))break;let c=t;if(o(`{`)){t++,s(`...`);let e=u();s(`}`),m.push({name:``,value:e,spread:!0,start:c,end:t});continue}let d=i(/[\\w$:-]+/y)??n(`Expected a prop at \\`${r()}\\`.`),h=t,g=null;o(`=`)&&(t++,a(),e[t]===`{`?(t++,g=u(),s(`}`)):g=e[t]===`"`||e[t]===`\'`?l(t,!0):u()),m.push({name:d,value:g,start:c,end:g?t:h})}t++;let h=[];for(;;){t>=e.length&&n(`\\`<${p}>\\` is not closed.`);let r=t;if(e.startsWith(`</`,t)){t+=2,a();let r=e[t]===`>`?``:c().join(`.`);return r!==p&&n(`\\`</${r}>\\` does not close \\`<${p}>\\`.`),s(`>`),{type:`element`,name:p,attributes:m,children:h,start:f,end:t}}e[t]===`<`?h.push(d()):e[t]===`{`?(t++,o(`}`)||h.push(u()),s(`}`)):(t=e.slice(t).search(/[<{]/)+t,t<r&&(t=e.length),h.push({type:`text`,raw:e.slice(r,t),start:r,end:t}))}}let f=[];for(;!o(`;`)&&t<e.length;){e[t]!==`<`&&e[t]!==`(`&&n(`Expected an element at \\`${r()}\\`.`);let i=u();i.type!==`element`&&n(`Expected an element.`),f.push(i)}return f}function Pv(e,t={}){let n=[],r=(e,r,i)=>{let a=t[`${e}.${r}`]??t[r],{value:o}=i,s=i.type===`string`?i.quote:``;if(a===!1||s==="`"||`${o}`.includes(`\n`))return;let c=a&&(`length`in a?a:a.options);n.push({prop:r,kind:c?`option`:i.type===`string`?`text`:i.type,value:o,range:{start:i.start,end:i.end},quote:s,jsx:i.type===`string`&&(!s||!!i.jsx),step:typeof o==`number`?Tv(o):1,...a&&`length`in a?{options:c}:a})},i=e=>{for(let{name:t,value:n}of e.attributes)n?.type===`element`?i(n):(n?.type===`string`||n?.type===`number`||n?.type===`boolean`)&&r(e.name,t,n);let[t]=e.children,n=t?.type===`text`?t.raw.trim():``;if(e.children.length===1&&n&&!n.includes(`\n`)){let i=t.start+t.raw.indexOf(n);r(e.name,`children`,{type:`string`,value:jv(n),quote:``,start:i,end:i+n.length})}for(let t of e.children)t.type===`element`&&i(t)};return e.forEach(i),n}function Fv(e,t){let{quote:n}=e;if(typeof t!=`string`){let r=typeof t==`number`?Ev(t,e.step):`${t}`;return e.jsx&&n?`{${r}}`:r}if(!e.jsx){let e=n||`"`;return e+t.replaceAll(`\\\\`,`\\\\\\\\`).replaceAll(e,`\\\\${e}`)+e}let r=t.replaceAll(`&`,`&amp;`).replaceAll(`<`,`&lt;`);return n?n+r.replaceAll(n,n===`"`?`&quot;`:`&apos;`)+n:r.replaceAll(`>`,`&gt;`).replaceAll(`{`,`&#123;`).replaceAll(`}`,`&#125;`)}function Iv(e,t,n){let{start:r,end:i}=t.range;return e.slice(0,r)+Fv(t,n)+e.slice(i)}function Lv(e){let t=[],n=e=>{for(let r of e.attributes)!r.value&&!r.spread?t.push(r.end):r.value?.type===`element`&&n(r.value);for(let t of e.children)t.type===`element`&&n(t)};return Nv(e).forEach(n),t.reverse().reduce((e,t)=>e.slice(0,t)+`={true}`+e.slice(t),e)}var Rv=new Set(`as async await break case catch class const continue default delete do else enum export extends false finally for from function if import in instanceof interface let new null of return satisfies static switch this throw true try type typeof undefined var void while yield`.split(` `)),zv=/^(|[(,=:?[{}>&|!]|return)$/;function Bv(e){let t=[],n=[{in:`code`,depth:0}],r=0,i=``,a=t=>(t.lastIndex=r,t.exec(e)?.[0]??``),o=(e,n)=>{n&&t.push({ink:e,start:r,end:r+n}),r+=n},s=t=>{let n=r+1;for(;n<e.length&&e[n]!==t;)n+=e[n]===`\\\\`?2:1;o(`string`,Math.min(n+1,e.length)-r)};for(;r<e.length;){let t=n[n.length-1],c=e[r];if(t.in===`text`){if(c===`{`)r++,n.push({in:`code`,depth:0});else if(c===`<`)r++,e[r]===`/`?(r++,o(`tag`,a(/[\\w$.:-]*/y).length),r=Math.max(r,e.indexOf(`>`,r)+1),n.pop()):n.push({in:`tag`,named:!1});else{let t=e.slice(r).search(/[<{]/);r=t<0?e.length:r+t}continue}if(t.in===`tag`){let i=a(/[\\w$.:-]+/y);i?o(t.named?`attribute`:`tag`,i.length):c===`"`||c===`\'`?s(c):c===`{`?(r++,n.push({in:`code`,depth:0})):c===`>`?(r++,n[n.length-1]={in:`text`}):e.startsWith(`/>`,r)?(r+=2,n.pop()):r++,t.named=!0;continue}let l=a(/\\s+|\\/\\/.*|\\/\\*[\\s\\S]*?(\\*\\/|$)/y);if(l){r+=l.length;continue}let u=a(/[A-Za-z_$][\\w$]*/y);if(u){let t=e.slice(r+u.length).match(/^\\s*(\\S)/)?.[1],n=Rv.has(u)?`keyword`:t===`(`||/^[A-Z]/.test(u)?`tag`:e[r-1]===`.`||t===`:`&&i!==`?`?`attribute`:void 0;n?o(n,u.length):r+=u.length,i=u===`return`?u:`name`;continue}let d=a(/\\d[\\d_]*\\.?\\d*(e[+-]?\\d+)?n?|\\.\\d+/iy);if(d){o(`keyword`,d.length),i=`name`;continue}if(c===`"`||c===`\'`||c==="`"){s(c),i=`name`;continue}if(c===`<`&&zv.test(i)&&/[A-Za-z>]/.test(e[r+1]??``)){r++,n.push({in:`tag`,named:e[r]===`>`}),e[r]===`>`&&(r++,n[n.length-1]={in:`text`});continue}if(c===`{`&&t.depth++,c===`}`){if(t.depth===0&&n.length>1){r++,n.pop();continue}t.depth--}i=e.startsWith(`&&`,r)||e.startsWith(`||`,r)?`&`:c,r++}return t}var Vv=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Hv=o(((e,t)=>{t.exports=Vv()})),Uv=o(((e,t)=>{(function(){var e={}.hasOwnProperty;function n(){for(var e=``,t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,r(n)))}return e}function r(t){if(typeof t==`string`||typeof t==`number`)return t;if(typeof t!=`object`)return``;if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes(`[native code]`))return t.toString();var r=``;for(var a in t)e.call(t,a)&&t[a]&&(r=i(r,a));return r}function i(e,t){return t?e?e+` `+t:e+t:e}t!==void 0&&t.exports?(n.default=n,t.exports=n):typeof define==`function`&&typeof define.amd==`object`&&define.amd?define(`classnames`,[],function(){return n}):window.classNames=n})()})),V=c(Hv(),1),Wv=c(Uv(),1),Gv=`sfr28j0`;function Kv({size:e=24,className:t,...n}){return(0,V.jsx)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,className:(0,Wv.default)(Gv,t),...n})}function qv(e){return(0,V.jsx)(Kv,{...e,children:(0,V.jsx)(`path`,{d:`M6 12.5l3.5 3.5L18 8`})})}function Jv(e){return(0,V.jsxs)(Kv,{...e,children:[(0,V.jsx)(`rect`,{x:`5.5`,y:`8.5`,width:`10`,height:`10`,rx:`2`}),(0,V.jsx)(`path`,{d:`M8.5 8.5v-1a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2h-1`})]})}var Yv=2*(1-Math.SQRT1_2),Xv=4/3*Math.tan(Math.PI/16)*2,Zv=[[6+Yv,6+Yv],[6+Yv-Xv*Math.SQRT1_2,6+Yv+Xv*Math.SQRT1_2],[6,8-Xv],[6,8]],Qv=Array.from({length:4},()=>[8.5,6]),$v=e=>[...e,...e.map(([e,t])=>[e,24-t]).reverse()];$v(Zv),$v(Qv);function ey(e){return(0,V.jsx)(Kv,{...e,children:(0,V.jsx)(`path`,{d:`M6 12a6 6 0 1 0 6-6c-1.67 0-3.23.68-4.43 1.83L6 9.43M6 6v3.43h3.43`})})}var ty=`.cc{--cc-surface:light-dark(#fff,oklch(17.5% 0 0));--cc-subtle:light-dark(oklch(93% 0 0),oklch(24.5% 0 0));--cc-sunken:light-dark(oklch(89.5% 0 0),oklch(21% 0 0));--cc-foreground:light-dark(oklch(22.7% .006 271.2),oklch(92.3% .004 286.3));--cc-secondary:light-dark(oklch(41.8% .014 274.6),oklch(78.2% .016 281.9));--cc-muted:light-dark(oklch(52% .044 267.6),oklch(67.3% .028 276.2));--cc-disabled:light-dark(oklch(72% .01 270),oklch(48% .01 280));--cc-text:light-dark(oklch(49% .04 268),oklch(67.3% .028 276.2));--cc-line:light-dark(oklch(59% .02 270),oklch(51% .02 276));--cc-tag:light-dark(oklch(46% .185 145.3),oklch(84.4% .185 145.3));--cc-attribute:light-dark(oklch(46% .088 229.9),oklch(85.7% .088 229.9));--cc-string:light-dark(oklch(46% .191 32.2),oklch(71.2% .191 32.2));--cc-keyword:light-dark(oklch(46% .2 317.2),oklch(76.9% .2 317.2));--cc-sans:Geist, ui-sans-serif, system-ui, sans-serif;--cc-mono:"Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;--cc-ease:.24s cubic-bezier(.2, .9, .3, 1);--copy:0;--reset:0;--split:.5;--seam:min(2px, var(--split) * (100cqw - 4px), (1 - var(--split)) * (100cqw - 4px));--edge:calc(2px + var(--split) * (100cqw - 4px - var(--seam)));box-sizing:border-box;outline:1px solid var(--cc-subtle);background:var(--cc-subtle);width:100%;color:var(--cc-foreground);font:16px/24px var(--cc-sans);text-align:left;-webkit-font-smoothing:antialiased;border-radius:8px;position:relative;overflow:hidden;container-type:inline-size}.cc[data-theme=light]{color-scheme:light}.cc[data-theme=dark]{color-scheme:dark}.cc *,.cc :before,.cc :after{box-sizing:inherit}.cc{display:grid}.cc-frame{background:var(--cc-surface);gap:2px;min-height:0;padding:2px;display:grid}.cc-frame,.cc-split{--into:clamp(0px, 8px - (1 - var(--split)) * (100cqw - 4px - var(--seam)), 8px)}.cc-split{inset:0 auto;left:calc(var(--edge) + var(--seam) / 2 - 5px);width:14px;translate:calc(var(--into) * -1);cursor:grab;touch-action:none;display:none;position:absolute}.cc-split:active{cursor:grabbing}@property --cc-grip{syntax:"<number>";inherits:false;initial-value:0}.cc-split,.cc-frame>*{transition:--cc-grip .3s linear(0, .25, .58, .79, .9, .95, .98, .99, .996, 1)}:is(.cc-split:is(:hover,:active),.cc:has(>.cc-split:is(:hover,:active))>.cc-frame>*){--cc-grip:1}.cc-split:after{--cc-grip:inherit;--cc-off:calc((1 - var(--cc-grip)) * (8px - var(--into)));--cc-on:calc((1 - var(--cc-grip)) * var(--into));content:"";top:calc(50% - 20px);left:calc(var(--seam) / 2 + 5px);width:4px;height:40px;transform-origin:var(--into);background:var(--cc-disabled);translate:calc(var(--cc-on) - var(--cc-off)) 0;clip-path:inset(0 var(--cc-on) 0 var(--cc-off));border-radius:2px;position:absolute}@property --cc-deep{syntax:"*";inherits:false}@property --cc-fillet{syntax:"*";inherits:false}@property --cc-corner{syntax:"*";inherits:false}@property --cc-m{syntax:"*";inherits:false}@property --cc-q{syntax:"*";inherits:false}@property --cc-l{syntax:"*";inherits:false}@property --cc-s{syntax:"*";inherits:false}@property --cc-t{syntax:"*";inherits:false}@property --cc-e{syntax:"*";inherits:false}@property --cc-a{syntax:"*";inherits:false}@property --cc-b{syntax:"*";inherits:false}.cc-frame>*{--cc-fillet:6px;--cc-corner:var(--cc-fillet);--cc-m:clamp(-1 * (var(--cc-fillet) + var(--cc-corner)), var(--cc-deep) - var(--cc-fillet) - var(--cc-corner), 0px);--cc-q:calc((var(--cc-fillet) + var(--cc-corner)) * sqrt(max(0, 1 - pow(tan(atan2(var(--cc-m), var(--cc-fillet) + var(--cc-corner))), 2))));--cc-l:tan(atan2(var(--cc-fillet), var(--cc-fillet) + var(--cc-corner)));--cc-s:calc(24px - var(--cc-corner));--cc-t:calc(var(--cc-s) + (1 - var(--cc-l)) * var(--cc-q));--cc-e:calc(var(--cc-s) + var(--cc-q));--cc-a:calc(var(--cc-fillet) + var(--cc-l) * var(--cc-m));--cc-b:calc(var(--cc-deep) - var(--cc-corner) - (1 - var(--cc-l)) * var(--cc-m))}@container (width>=640px){.cc-frame{grid-template-columns:calc(var(--split) * (100% - var(--seam))) minmax(0, 1fr);column-gap:var(--seam);grid-template-rows:minmax(0,1fr)}.cc-frame>*{min-height:0}.cc-preview{--cc-deep:calc(min(1.5 * var(--into), var(--into) + 4px - var(--seam)) * var(--cc-grip));overflow:clip}.cc-code{--cc-deep:calc(var(--cc-grip) * 8px);clip-path:inset(-2px 0 0 -2px)}@supports (clip-path:shape(from 0 0, line to 1px 1px)){.cc-preview{clip-path:shape(from -9999px -9999px, hline to calc(100% + 9999px), vline to calc(50% - var(--cc-e)), hline to 100%, arc to calc(100% - var(--cc-a)) calc(50% - var(--cc-t)) of var(--cc-fillet) cw, line to calc(100% - var(--cc-b)) calc(50% - var(--cc-t)), arc to calc(100% - var(--cc-deep)) calc(50% - var(--cc-s)) of var(--cc-corner) ccw, vline to calc(50% + var(--cc-s)), arc to calc(100% - var(--cc-b)) calc(50% + var(--cc-t)) of var(--cc-corner) ccw, line to calc(100% - var(--cc-a)) calc(50% + var(--cc-t)), arc to 100% calc(50% + var(--cc-e)) of var(--cc-fillet) cw, hline to calc(100% + 9999px), vline to calc(100% + 9999px), hline to -9999px, close)}.cc-code{clip-path:shape(from -2px -2px, hline to 100%, vline to 100%, hline to -2px, vline to calc(50% + var(--cc-e)), hline to 0px, arc to var(--cc-a) calc(50% + var(--cc-t)) of var(--cc-fillet) cw, line to var(--cc-b) calc(50% + var(--cc-t)), arc to var(--cc-deep) calc(50% + var(--cc-s)) of var(--cc-corner) ccw, vline to calc(50% - var(--cc-s)), arc to var(--cc-b) calc(50% - var(--cc-t)) of var(--cc-corner) ccw, line to var(--cc-a) calc(50% - var(--cc-t)), arc to 0px calc(50% - var(--cc-e)) of var(--cc-fillet) cw, hline to -2px, close)}}.cc>.cc-tab{--cut:calc(var(--edge) + var(--seam) - 2px);clip-path:polygon(-1px -1px, calc(var(--cut) + 6px) -1px, calc(var(--cut) + 6px) 0, calc(var(--cut) + 4.45px) .2px, calc(var(--cut) + 3px) .8px, calc(var(--cut) + 1.76px) 1.76px, calc(var(--cut) + .8px) 3px, calc(var(--cut) + .2px) 4.45px, var(--cut) 6px, var(--cut) calc(100% + 6px), -1px calc(100% + 6px))}.cc-split{display:block}.cc[data-alone]>.cc-frame{grid-template-columns:minmax(0,1fr)}.cc[data-collapsed=code]>.cc-frame>.cc-code,.cc[data-collapsed=preview]>.cc-frame>.cc-preview{contain:size}.cc-split{--at:calc(5px - var(--seam) / 2);clip-path:polygon(var(--at) 0, 100% 0, 100% 100%, var(--at) 100%, var(--at) calc(50% + 24px), 0 calc(50% + 24px), 0 calc(50% - 24px), var(--at) calc(50% - 24px))}}.cc{--seam-y:2px;--edge-y:0px;--stack:100vh}.cc[data-stack]{--seam-y:min(2px, var(--split) * var(--stack), (1 - var(--split)) * var(--stack));--edge-y:calc(2px + var(--split) * (var(--stack) - var(--seam-y)))}@container (width<640px){.cc-frame{grid-template-rows:auto minmax(0,1fr)}.cc:not([data-stack],[data-collapsed])>.cc-split{visibility:hidden}.cc[data-alone]>.cc-frame,.cc[data-collapsed]:not([data-opened])>.cc-frame,.cc[data-closed]:not([data-stack])>.cc-frame{grid-template-rows:minmax(0,1fr)}.cc:is([data-stack],:not([data-closed],[data-collapsed],[data-alone],[data-measure]))>.cc-frame{grid-template-rows:calc(var(--split) * (100% - var(--seam-y))) minmax(0, 1fr);row-gap:var(--seam-y)}.cc[data-stack=own]>.cc-frame{height:calc(var(--stack) + 4px)}.cc[data-measure]>.cc-frame{grid-template-rows:auto minmax(0,1fr);row-gap:2px;height:max-content}.cc:is([data-measure=preview],[data-measure=code])>.cc-frame{grid-template-rows:minmax(0,1fr)}.cc:is([data-stack],:not([data-closed],[data-collapsed],[data-alone],[data-measure]))>.cc-frame>.cc-preview{min-height:0;overflow:clip}.cc:is([data-stack],:not([data-closed],[data-collapsed],[data-alone],[data-measure]))>.cc-frame>.cc-preview:not([data-flush]){--cc-h:calc(var(--split) * (var(--stack) - var(--seam-y)));padding-top:min(48px, var(--cc-h) * 2 / 3);padding-bottom:min(24px, var(--cc-h) / 3)}.cc:is([data-stack],:not([data-closed],[data-collapsed],[data-alone],[data-measure]))>.cc-frame>.cc-preview[data-untitled]:not([data-flush]){padding-top:min(24px, var(--cc-h) / 2);padding-bottom:min(24px, var(--cc-h) / 2)}.cc:is([data-stack],:not([data-closed],[data-collapsed],[data-alone],[data-measure]))>.cc-frame>.cc-code{clip-path:inset(-2px -2px 0);min-height:0;padding-top:0}.cc:is([data-stack],:not([data-closed],[data-collapsed],[data-alone],[data-measure]))>.cc-frame>.cc-code>.cc-body{margin-top:22px}.cc:is([data-stack],:not([data-closed],[data-collapsed],[data-alone],[data-measure]))>.cc-frame>[data-untitled]>.cc-body{margin-top:0}.cc:is([data-stack],:not([data-closed],[data-collapsed],[data-alone],[data-measure]))>.cc-tab{clip-path:inset(-1px -7px calc(26px - var(--edge-y) - var(--seam-y)) -1px)}.cc-frame,.cc-split{--into:clamp(0px, 8px - (1 - var(--split)) * (var(--stack) - var(--seam-y)), 8px)}.cc-split{inset:auto 0;top:calc(var(--edge-y) + var(--seam-y) / 2 - 5px);width:auto;height:14px;translate:0 calc(var(--into) * -1);display:block}.cc-split:after{top:calc(var(--seam-y) / 2 + 5px);width:40px;height:4px;transform-origin:50% var(--into);translate:0 calc(var(--cc-on) - var(--cc-off));clip-path:inset(var(--cc-off) 0 var(--cc-on) 0);left:calc(50% - 20px)}.cc[data-collapsed=code]:not([data-opened])>.cc-frame>.cc-code,.cc[data-collapsed=preview]:not([data-opened])>.cc-frame>.cc-preview,.cc[data-collapsed=preview]:not([data-opened])>.cc-tab,.cc[data-closed=code]:not([data-stack])>.cc-frame>.cc-code,.cc[data-closed=preview]:not([data-stack])>.cc-frame>.cc-preview,.cc[data-closed=preview]:not([data-stack])>.cc-tab,.cc[data-measure=code]>.cc-frame>.cc-code,.cc[data-measure=preview]>.cc-frame>.cc-preview{visibility:hidden;position:absolute}.cc[data-collapsed]:not([data-opened])>:is(.cc-frame,.cc-split),.cc[data-closed]:not([data-stack])>:is(.cc-frame,.cc-split){--seam-y:0px}.cc[data-collapsed=code]:not([data-opened])>:is(.cc-frame,.cc-split),.cc[data-closed=code]:not([data-stack])>:is(.cc-frame,.cc-split){--into:8px}.cc[data-collapsed=preview]:not([data-opened])>.cc-split,.cc[data-closed=preview]:not([data-stack])>.cc-split{--edge-y:2px}.cc[data-collapsed=code]:not([data-opened])>.cc-split,.cc[data-closed=code]:not([data-stack])>.cc-split{--edge-y:calc(100% - 2px)}.cc-preview{--cc-deep:calc(min(1.5 * var(--into), var(--into) + 4px - var(--seam-y)) * var(--cc-grip))}.cc-code{--cc-deep:calc(var(--cc-grip) * 8px)}@supports (clip-path:shape(from 0 0, line to 1px 1px)){.cc-preview{clip-path:shape(from -9999px -9999px, hline to calc(100% + 9999px), vline to calc(100% + 9999px), hline to calc(50% + var(--cc-e)), vline to 100%, arc to calc(50% + var(--cc-t)) calc(100% - var(--cc-a)) of var(--cc-fillet) cw, line to calc(50% + var(--cc-t)) calc(100% - var(--cc-b)), arc to calc(50% + var(--cc-s)) calc(100% - var(--cc-deep)) of var(--cc-corner) ccw, hline to calc(50% - var(--cc-s)), arc to calc(50% - var(--cc-t)) calc(100% - var(--cc-b)) of var(--cc-corner) ccw, line to calc(50% - var(--cc-t)) calc(100% - var(--cc-a)), arc to calc(50% - var(--cc-e)) 100% of var(--cc-fillet) cw, vline to calc(100% + 9999px), hline to -9999px, close)}.cc:is([data-stack],:not([data-closed],[data-collapsed],[data-alone],[data-measure]))>.cc-frame>.cc-code,.cc-code{clip-path:shape(from -2px -2px, hline to calc(50% - var(--cc-e)), vline to 0px, arc to calc(50% - var(--cc-t)) var(--cc-a) of var(--cc-fillet) cw, line to calc(50% - var(--cc-t)) var(--cc-b), arc to calc(50% - var(--cc-s)) var(--cc-deep) of var(--cc-corner) ccw, hline to calc(50% + var(--cc-s)), arc to calc(50% + var(--cc-t)) var(--cc-b) of var(--cc-corner) ccw, line to calc(50% + var(--cc-t)) var(--cc-a), arc to calc(50% + var(--cc-e)) 0px of var(--cc-fillet) cw, vline to -2px, hline to calc(100% + 2px), vline to 100%, hline to -2px, close)}}}.cc-preview{place-items:center;min-width:0;padding:48px 24px 24px;display:grid}.cc-preview[data-untitled]{padding-top:24px}.cc-code[data-untitled]{padding-top:0}.cc-preview[data-flush]{padding:0}:is(.cc[data-handle=always],.cc[data-handle=collapsed][data-closed])>.cc-split,:is(.cc[data-handle=always],.cc[data-handle=collapsed][data-closed])>.cc-frame>*{--cc-grip:1}.cc-problem{color:var(--cc-muted);font:14px/20px var(--cc-sans);text-align:center;margin:0}.cc-tab{--inset:0px;top:calc(var(--inset) * -1);left:calc(var(--inset) * -1);background:var(--ground);height:24px;color:var(--cc-muted);font:12px/16px var(--cc-sans);white-space:nowrap;pointer-events:none;border-bottom-right-radius:6px;align-items:center;padding:0 8px;display:flex;position:absolute}.cc-tab:before,.cc-tab:after{content:"";background:radial-gradient(circle at 100% 100%, #0000 6px, var(--ground) 6.5px);width:6px;height:6px;position:absolute}.cc-tab:before{top:var(--inset);left:100%}.cc-tab:after{top:100%;left:var(--inset)}.cc>.cc-tab{--ground:var(--cc-subtle)}.cc-code{--ground:var(--cc-surface);--tint:var(--cc-text);background:var(--cc-sunken);min-width:0;color:var(--cc-text);font:14px/24px var(--cc-mono);border-radius:6px;flex-direction:column;padding-top:22px;display:flex;position:relative}.cc-head{z-index:2;pointer-events:none;gap:8px;width:calc(100% + 4px);min-width:max-content;display:flex;position:absolute;top:-2px;left:-2px}.cc-head>.cc-tab{--inset:2px;position:relative;top:0;left:0}.cc-body{border-radius:inherit;scrollbar-width:thin;scrollbar-color:var(--cc-disabled) #0000;flex-grow:1;align-items:flex-start;min-height:0;display:flex;overflow:auto}.cc[data-moving]>.cc-frame>.cc-code>.cc-body{scrollbar-color:#0000 #0000}.cc-lines{z-index:1;background:var(--cc-sunken);color:var(--cc-line);text-align:right;white-space:pre;-webkit-user-select:none;user-select:none;flex-shrink:0;padding:16px 4px 16px 16px;position:sticky;left:0}.cc-source{flex:1 0 auto;padding:16px 16px 16px 4px}.cc .cc-source>code{all:unset;white-space:pre;tab-size:2;width:max-content;min-width:100%;display:block}.cc-tag{color:var(--cc-tag)}.cc-attribute{color:var(--cc-attribute)}.cc-string{--tint:var(--cc-string);color:var(--cc-string)}.cc-keyword{--tint:var(--cc-keyword);color:var(--cc-keyword)}.cc-box{all:unset;background:color-mix(in srgb, var(--tint) 14%, #0000);white-space:pre;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:#0000;border-radius:4px;margin:0 -2px;padding:0 4px;line-height:20px;display:inline-block}.cc-box:is(:hover,:focus-within,[aria-expanded=true]){background:color-mix(in srgb, var(--tint) 28%, #0000)}:is(.cc-box,.cc-action,.cc-menu>button):focus-visible{outline-offset:-2px;outline:2px solid}.cc-scrub{cursor:ew-resize;touch-action:pan-y}.cc-field{cursor:text;min-width:8px;display:inline-grid}.cc-field:after{content:attr(data-value);visibility:hidden;white-space:pre;grid-area:1/1}.cc-field>input{all:unset;grid-area:1/1;width:100%;min-width:0}.cc-menu{min-width:96px;font:14px/20px var(--cc-mono);border:0;margin:0;padding:2px;display:none;position:fixed;inset:auto}.cc-menu,.cc-code:after{background:var(--cc-subtle);color:var(--cc-secondary);border-radius:8px;box-shadow:0 8px 24px oklch(0% 0 0/.12)}.cc-menu:popover-open{gap:2px;display:grid}.cc-menu>button{all:unset;white-space:pre;cursor:pointer;border-radius:6px;align-items:center;gap:16px;height:32px;padding:0 8px;display:flex}.cc-menu>button:is(:hover,:focus){background:var(--cc-sunken);color:var(--cc-foreground)}.cc-menu>[aria-checked=true]:after{content:"\u2713";color:var(--cc-muted);margin-left:auto}:is(.cc-code:is(:hover,:has(:focus-visible)),.cc:has(>.cc-split:is(:hover,:active)) .cc-code){--copy:1}@media (hover:none){.cc-code{--copy:1}}.cc-changed{--reset:1}.cc-actions{--open:max(var(--copy), var(--reset));padding:0 calc(var(--open) * 4px) 0 0;pointer-events:auto;transition:padding var(--cc-ease);border-radius:0 0 0 6px;margin-left:auto}.cc-actions:before,.cc-actions:after{background:radial-gradient(circle at 0 100%, #0000 6px, var(--ground) 6.5px);opacity:var(--open);transition:opacity var(--cc-ease);left:auto}.cc-actions:before{right:100%}.cc-actions:after{right:var(--inset)}.cc-slot{--shown:var(--copy);width:calc(var(--shown) * 24px);transition:width var(--cc-ease);justify-content:flex-end;display:flex;overflow:hidden}.cc-note,.cc-reset{--shown:var(--reset)}.cc-action{all:unset;width:20px;height:20px;color:var(--cc-muted);cursor:pointer;transform:translateX(calc((1 - var(--shown)) * 24px));transition:transform var(--cc-ease);border-radius:4px;flex-shrink:0;place-items:center;display:grid}.cc-action:hover{color:var(--cc-foreground)}.cc-action svg{fill:none;stroke:currentColor;stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round}.cc-action svg *{vector-effect:non-scaling-stroke}.cc-code:after{content:attr(data-note);font:12px/16px var(--cc-sans);white-space:nowrap;opacity:0;transition:opacity var(--cc-ease);pointer-events:none;padding:4px 8px;position:absolute;top:26px;right:4px}.cc-code:has(.cc-note :is(:hover,:focus)):after{opacity:1}@media (prefers-reduced-motion:reduce){.cc *{transition:none!important}}`;function ny(e,t){(0,d.useInsertionEffect)(()=>{if(document.getElementById(e))return;let n=document.createElement(`style`);n.id=e,n.textContent=t,document.head.prepend(n)},[])}function ry(e){let t=e.replace(/^\\s*\\n/,``).trimEnd().split(`\n`),n=Math.min(...t.filter(e=>e.trim()).map(e=>e.search(/\\S/)));return t.map(e=>e.slice(n)).join(`\n`)}var iy=e=>e.kind===`boolean`||typeof e.value==`number`?`cc-box cc-keyword`:e.quote?`cc-box cc-string`:`cc-box`,ay=(0,V.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,"aria-hidden":!0,children:(0,V.jsx)(`path`,{d:`M16 10a6 6 0 1 1-12 0a6 6 0 0 1 12 0M10 9.5V13m0-6v.01`})});function oy({control:e,onChange:t,written:n}){let{min:r=-1/0,max:i=1/0,step:a}=e,o=e.value,s=(0,d.useRef)(null),c=i-r<1/0?Math.min(12,Math.max(2,240*a/(i-r))):6,l=()=>s.current=null,u=e=>{e=Math.min(i,Math.max(r,e)),e!==o&&t(e)};return(0,V.jsx)(`span`,{className:`${iy(e)} cc-scrub`,role:`slider`,tabIndex:0,"aria-label":e.prop,"aria-valuenow":o,"aria-valuemin":r>-1/0?r:void 0,"aria-valuemax":i<1/0?i:void 0,onPointerDown:e=>{e.currentTarget.setPointerCapture(e.pointerId),s.current={x:e.clientX,value:o}},onPointerMove:e=>{if(s.current){let t=Math.round((e.clientX-s.current.x)/c);u(s.current.value+t*a)}},onPointerUp:l,onPointerCancel:l,onKeyDown:e=>{let t=e.shiftKey?a*10:a,n={ArrowUp:o+t,ArrowRight:o+t,ArrowDown:o-t,ArrowLeft:o-t,Home:r,End:i}[e.key];n!==void 0&&isFinite(n)&&(e.preventDefault(),u(n))},children:n})}function sy({control:e,onChange:t,written:n}){return(0,V.jsx)(`button`,{type:`button`,className:iy(e),"aria-label":e.prop,"aria-pressed":e.value,onClick:()=>t(!e.value),children:n})}function cy({control:e,onChange:t}){let n=`${e.value}`,{quote:r}=e;return(0,V.jsxs)(`label`,{className:iy(e),children:[r,(0,V.jsx)(`span`,{className:`cc-field`,"data-value":n,children:(0,V.jsx)(`input`,{size:1,value:n,"aria-label":e.prop,spellCheck:!1,onChange:e=>t(e.target.value),onKeyDown:e=>{(e.key===`Enter`||e.key===`Escape`)&&e.currentTarget.blur()}})}),r]})}function ly({control:e,onChange:t,written:n}){let r=(0,d.useRef)(null),i=(0,d.useRef)(null),[a,o]=(0,d.useState)(!1),s=t=>{let n=typeof t==`string`?e.quote:``;return n+t+n},c=()=>[...r.current.children];return(0,d.useEffect)(()=>{let e=r.current,t=e=>o(e.newState===`open`),n=()=>e.matches(`:popover-open`)&&e.hidePopover();return e.addEventListener(`toggle`,t),addEventListener(`scroll`,n,!0),addEventListener(`resize`,n),()=>{e.removeEventListener(`toggle`,t),removeEventListener(`scroll`,n,!0),removeEventListener(`resize`,n)}},[]),(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`button`,{ref:i,type:`button`,className:iy(e),"aria-haspopup":`menu`,"aria-expanded":a,"aria-label":e.prop,onClick:e=>{let t=r.current,{left:n,bottom:i}=e.currentTarget.getBoundingClientRect();t.style.left=`${n}px`,t.style.top=`${i+4}px`,t.showPopover(),t.querySelector(`[aria-checked=true]`)?.focus()},children:n}),(0,V.jsx)(`div`,{ref:r,className:`cc-menu`,popover:`auto`,role:`menu`,onKeyDown:e=>{let t=c(),n=t.indexOf(document.activeElement),{key:r}=e,a=r.length===1&&[...t.slice(n+1),...t].find(e=>e.textContent.replace(/^\\W/,``).startsWith(r)),o=a?t.indexOf(a):{ArrowDown:n+1,ArrowUp:n-1,Home:0,End:-1}[r];r===`Escape`&&i.current.focus(),o!==void 0&&(e.preventDefault(),t.at(o%t.length).focus())},children:e.options.map(n=>(0,V.jsx)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":n===e.value,onClick:()=>t(n),children:s(n)},`${n}`))})]})}function uy({source:e,tokens:t,controls:n,onChange:r}){let i=[],a=0,o=0,s=n=>{for(;a<n;){for(;o<t.length&&t[o].end<=a;)o++;let r=t[o];if(r&&r.start<=a){let t=Math.min(r.end,n);i.push((0,V.jsx)(`span`,{className:`cc-${r.ink}`,children:e.slice(a,t)},a)),a=t}else{let t=Math.min(r?.start??n,n);i.push(e.slice(a,t)),a=t}}};return n.forEach((t,n)=>{s(t.range.start);let o={control:t,written:e.slice(t.range.start,t.range.end),onChange:e=>r(t,e)},c={boolean:sy,number:oy,option:ly,text:cy}[t.kind];i.push((0,V.jsx)(c,{...o},`c${n}`)),a=t.range.end}),s(e.length),(0,V.jsxs)(`div`,{className:`cc-body`,children:[(0,V.jsx)(`div`,{className:`cc-lines`,"aria-hidden":!0,children:e.split(`\n`).map((e,t)=>t+1).join(`\n`)}),(0,V.jsx)(`div`,{className:`cc-source`,children:(0,V.jsx)(`code`,{children:i})})]})}function dy({slot:e,label:t,icon:n,hidden:r,onClick:i}){return(0,V.jsx)(`span`,{className:`cc-slot${e}`,children:(0,V.jsx)(`button`,{type:`button`,className:`cc-action`,"aria-label":t,tabIndex:r?-1:0,onClick:i,children:n})})}function fy({source:e,changed:t,note:n,onReset:r}){let[i,a]=(0,d.useState)(!1);return(0,V.jsxs)(`div`,{className:`cc-tab cc-actions${t?` cc-changed`:``}`,children:[(0,V.jsx)(dy,{slot:``,label:i?`Copied`:`Copy code`,icon:i?(0,V.jsx)(qv,{size:20}):(0,V.jsx)(Jv,{size:20}),onClick:()=>navigator.clipboard.writeText(e).then(()=>{a(!0),setTimeout(()=>a(!1),1500)})}),n&&(0,V.jsx)(dy,{slot:` cc-note`,label:n,icon:ay,hidden:!t}),(0,V.jsx)(dy,{slot:` cc-reset`,label:`Reset code`,icon:(0,V.jsx)(ey,{size:20}),hidden:!t,onClick:r})]})}var py=250,my=150,hy=typeof document>`u`?d.useEffect:d.useLayoutEffect,gy=(2*Math.PI/.35)**2,_y=4*Math.PI/.35;function vy(e,t){let n={min:160,to:t??.5,last:.5,off:0,speed:0,track:1,show(){e.style.setProperty(`--split`,`${Math.min(1,Math.max(0,n.to+n.off))}`)},jump(t){n.off=matchMedia(`(prefers-reduced-motion: reduce)`).matches?0:n.off+n.to-t,n.to=t,i||(r=performance.now(),i=requestAnimationFrame(a),e.dataset.moving=``)},ease(e){let{min:t}=n,r=t-e;return r<=0?e:r>t/2?0:t-t/4*(1-Math.exp(-4*r/t))},stop:()=>cancelAnimationFrame(i)},r=0,i=0,a=t=>{let o=Math.min(.05,(t-r)/1e3);r=t;for(let e=0;e<o;e+=.001)n.speed-=(gy*n.off+_y*n.speed)*.001,n.off+=n.speed*.001;Math.abs(n.off)*n.track<.5?(n.off=n.speed=i=0,delete e.dataset.moving):i=requestAnimationFrame(a),n.show()};return n}function yy({start:e}){let t=(0,d.useRef)(null);return hy(()=>{let n=t.current,r=n.parentElement,i=r.firstElementChild,a=i.firstElementChild,o=vy(r,e),s=e===void 0?0:e*2-1,c=1,l=!1,u,d,f=0,p,m=!1,h=()=>{s?r.dataset.closed=s<0?`preview`:`code`:delete r.dataset.closed},g=o.show;o.show=()=>{g(),h()},h();let _=()=>parseFloat(getComputedStyle(r).width)<640,v=e=>l?e.clientY:e.clientX,y=e=>{let t=r.clientHeight;r.dataset.measure=s<0?`preview`:s>0?`code`:``;let n=i.offsetHeight,a=r.clientHeight!==n,o=(a?r.clientHeight:n)-4;delete r.dataset.measure;let c=()=>{r.dataset.stack=a?`given`:`own`,r.style.setProperty(`--stack`,`${o}px`)};e&&!a&&n!==t?requestAnimationFrame(c):c()};_()&&y();let ee=globalThis.ResizeObserver&&new ResizeObserver(e=>{let t=`opened`in r.dataset;_()&&(!t||e.some(e=>e.target===r))&&y(!0)}),te=()=>{for(let e of[r,...i.querySelectorAll(`.cc-lines`)])ee?.observe(e);for(let e of a.children)ee?.observe(e)};te();let ne=globalThis.MutationObserver&&new MutationObserver(te);ne?.observe(a,{childList:!0}),n.onpointerdown=e=>{e.button||(e.preventDefault(),n.setPointerCapture(e.pointerId),m=!!p,clearTimeout(p),p=void 0,f=e.timeStamp,l=_(),l&&!(`stack`in r.dataset)&&y(),o.min=l?80:160,o.track=(l?i.clientHeight:i.clientWidth)-6,r.dataset.opened=``,u=v(e)-o.to*o.track,s&&(c=s),d=v(e))},n.onpointermove=e=>{if(u===void 0)return;if(!(e.buttons&1))return re();d!==void 0&&Math.abs(v(e)-d)>3&&(d=void 0);let{track:t}=o,n=v(e)-u;if(s){let e=s<0?Math.min(n,0):Math.max(n-t,0);if(u+=e,n-=e,(s<0?n:t-n)<o.min){o.to=n/t,o.show();return}s=0}let r=o.ease(n),i=o.ease(t-n);s=r?+!i:-1,s?(o.jump(s<0?0:1),u=v(e)-o.to*t):o.to=(r===n?t-i:r)/t,o.show()};let re=()=>{if(u===void 0)return;u=void 0;let{min:e,track:t}=o,n=o.to*t,r=Math.min(n,t-n);s&&r<e/2?o.jump(s<0?0:1):r<e&&(s=0,o.jump((n<e?e:t-e)/t)),s||(o.last=o.to),h()};return n.onpointercancel=n.onlostpointercapture=re,n.onpointerup=e=>{let t=d!==void 0&&e.timeStamp-f<py;if(re(),d=void 0,t){if(m)return s=0,o.jump(o.last=.5),h();p=setTimeout(()=>{p=void 0,s?(s=0,o.jump(o.last)):(o.last=o.to,s=c,o.jump(c<0?0:1)),h()},my)}},()=>{clearTimeout(p),o.stop(),ee?.disconnect(),ne?.disconnect()}},[]),(0,V.jsx)(`div`,{ref:t,className:`cc-split`,"aria-hidden":!0})}function by({className:e,theme:t,title:n=`Preview`,tabs:r=!0,defaultPanel:i=`both`,padding:a=!0,handle:o=`hover`,preview:s,tab:c,source:l,changed:u,note:d,onReset:f,...p}){let m=s===null,h=m?void 0:{both:void 0,preview:`code`,code:`preview`}[i],g=h?+(h===`code`):void 0,_=r&&!m&&n!==``,v=r&&c;return(0,V.jsxs)(`div`,{className:e?`cc ${e}`:`cc`,"data-theme":t,"data-alone":m?``:void 0,"data-collapsed":h,"data-handle":o===`hover`?void 0:o,style:g===void 0?void 0:{"--split":g},children:[(0,V.jsxs)(`div`,{className:`cc-frame`,children:[!m&&(0,V.jsx)(`div`,{className:`cc-preview`,"data-untitled":_?void 0:``,"data-flush":a?void 0:``,children:s}),(0,V.jsxs)(`div`,{className:`cc-code`,"data-note":d,"data-untitled":v?void 0:``,children:[(0,V.jsxs)(`div`,{className:`cc-head`,children:[v,(0,V.jsx)(fy,{source:l,changed:u,note:d,onReset:f})]}),(0,V.jsx)(uy,{source:l,...p})]})]}),_&&(0,V.jsx)(`div`,{className:`cc-tab`,children:n}),!m&&(0,V.jsx)(yy,{start:g})]})}var xy=Symbol(),Sy=e=>jv(e.split(/\\s*\\n\\s*/).filter(Boolean).join(` `));function Cy(e,t){let[n,...r]=e;if(!Object.hasOwn(t,n))throw new Dv(`\\`${n}\\` is not in \\`scope\\`.`);let i=t[n];for(let e of r)i=i?.[e];if(i===void 0)throw new Dv(`\\`${e.join(`.`)}\\` is not in \\`scope\\`.`);return i}function wy(e,t){switch(e.type){case`element`:return Ey(e,t);case`name`:return Cy(e.path,t);case`array`:return e.items.map(e=>wy(e,t));case`object`:return Object.fromEntries(e.entries.map(([e,n])=>[e,wy(n,t)]));case`null`:return null;case`undefined`:return;default:return e.value}}function Ty(e,t){return e.type===`text`?Sy(e.raw)||null:wy(e,t)}function Ey(e,t){let n=e.name?/^[a-z][^.]*$/.test(e.name)?e.name:Cy(e.name.split(`.`),t):d.Fragment,r={},i=t[xy];for(let a of e.attributes){let e=typeof n!=`string`&&i?.get(a.value?.start);if(e){let{name:t}=a;r[`on${t[0].toUpperCase()}${t.slice(1)}Change`]=e}a.spread?Object.assign(r,wy(a.value,t)):r[a.name]=!a.value||wy(a.value,t)}return(0,d.createElement)(n,r,...e.children.map(e=>Ty(e,t)))}var Dy=ty,Oy=class extends d.Component{state={};static getDerivedStateFromError(e){return{problem:e instanceof Error?e.message:`${e}`}}static getDerivedStateFromProps({source:e},t){return t.source===e?null:{source:e,problem:void 0}}render(){let{problem:e}=this.state;return e?(0,V.jsx)(`p`,{className:`cc-problem`,children:e}):this.props.children}};function ky({code:e,file:t=`Code`,theme:n,note:r,className:i,scope:a,interactive:o,controls:s,onChange:c,children:l,...u}){ny(`component-code`,Dy);let f=(0,d.useMemo)(()=>{let t=ry(e);try{return o?Lv(t):t}catch{return t}},[e,o]),[p,m]=(0,d.useState)({from:f,to:f});p.from!==f&&m({from:f,to:f});let h=p.from===f?p.to:f,g=(0,d.useMemo)(()=>Bv(h),[h]),_=(e,t)=>{let n=Iv(h,e,t);m({from:f,to:n}),c?.({prop:e.prop,value:t,code:n})},v=l,y,ee=[];if(a)try{let e=Nv(h);o&&(ee=Pv(e,s));let t={...a,[xy]:new Map(ee.filter(e=>e.change).map(e=>[e.range.start,t=>typeof t==typeof e.value&&_(e,t)]))};v=(0,d.createElement)(d.Fragment,null,...e.map(e=>Ey(e,t)))}catch(e){if(!(e instanceof Dv))throw e;y=e.message}return(0,V.jsx)(by,{className:i,theme:n,...u,preview:v===null?null:y?(0,V.jsx)(`p`,{className:`cc-problem`,children:y}):(0,V.jsx)(Oy,{source:h,children:v}),tab:t!==``&&(0,V.jsx)(`div`,{className:`cc-tab`,children:t}),source:h,changed:h!==f,note:r,onReset:()=>m({from:f,to:f}),tokens:g,controls:ee,onChange:_})}function Ay(){let e=document.documentElement,t=document.currentScript.previousElementSibling,n=e=>parent.postMessage(e,`*`);addEventListener(`message`,e=>{e.source===parent&&(t.textContent=e.data.css)}),addEventListener(`error`,e=>n({problem:e.message})),addEventListener(`unhandledrejection`,e=>n({problem:`${e.reason?.message??e.reason}`})),new ResizeObserver(()=>n({height:e.getBoundingClientRect().height})).observe(e),addEventListener(`load`,()=>n({ready:!0}))}var jy=(e,t)=>e.replace(RegExp(`</${t}`,`gi`),`<\\\\/${t}`);function My(e,t,n,r){return`<!doctype html><html><head><meta charset="utf-8"><style>:root{${r}}body{margin:0}</style><style>${jy(t,`style`)}</style><script>(${Ay})()<\\/script></head><body>${e}<script>${jy(n,`script`)}<\\/script></body></html>`}function Ny(e,t){let n,r,i,a,o=``,s=e=>e?.contentWindow?.postMessage({css:o},`*`),c=({source:e,data:o})=>{let c=[n,r].find(t=>t&&t.contentWindow===e);if(!(!c||typeof o!=`object`||!o)&&(o.height!==void 0&&(c.style.height=`${Math.ceil(o.height)}px`),o.problem&&(c===n?t(o.problem):a??=o.problem),o.ready&&c===r)){n?.remove(),n=c,r=void 0,c.dataset.shown=``,s(c),t(a),a=void 0;let e=i;i=void 0,e?.()}};return addEventListener(`message`,c),{run(t,a,s){let c=()=>{r=document.createElement(`iframe`),r.setAttribute(`sandbox`,`allow-scripts`),r.title=`Preview`,n&&(r.style.height=n.style.height),r.srcdoc=My(t,o,a,s),e.append(r)};r?i=c:c()},css(e){o=e,s(n),s(r)},stop(){removeEventListener(`message`,c),n?.remove(),r?.remove()}}}var Py=/^-?(?:\\d+\\.?\\d*|\\.\\d+)$/,Fy=e=>/\\.css$/i.test(e)?`css`:/\\.m?js$/i.test(e)?`js`:`html`;function Iy(e,t,n,r,i,a=``){let o=Array.isArray(t);return{prop:e,kind:o?`option`:typeof n==`string`?`text`:typeof n,value:n,range:{start:r,end:i},quote:a,jsx:!1,step:typeof n==`number`?Tv(n):1,...o?{options:t}:t===!0?{}:t}}var Ly=e=>(t,n,r)=>{r&&e.push({ink:t,start:n,end:n+r})},Ry=/\\x3C!--[\\s\\S]*?(?:-->|$)|<[!/]?([A-Za-z][\\w:-]*)([^>]*)>?/g,zy=/([^\\s"\'=<>/]+)(?:\\s*=\\s*("[^"]*"?|\'[^\']*\'?|[^\\s>]+))?/g;function By(e,t){let n=[],r=[],i=Ly(n),a=new RegExp(Ry),o;for(;o=a.exec(e);){let[n,s,c]=o;if(!s)continue;let l=o.index+n.indexOf(s);i(`tag`,l,s.length);let u=s.toLowerCase();for(let e of c.matchAll(zy)){let[,n,a]=e,o=l+s.length+e.index;if(i(`attribute`,o,n.length),!a)continue;let c=o+e[0].length-a.length;i(`string`,c,a.length);let d=t[`${u}.${n}`]??t[n];if(!d)continue;let f=/^["\']/.test(a)?a[0]:``,p=f?a.slice(1,-1):a;r.push(Iy(n,d,Py.test(p)?+p:p,c,c+a.length,f))}if(n[1]!==`/`&&(u===`script`||u===`style`)){let t=e.indexOf(`</${u}`,a.lastIndex);a.lastIndex=t<0?e.length:t}}return{tokens:n,controls:r}}var Vy=/(["\'])(?:\\\\.|(?!\\1)[^\\\\])*\\1?|#[\\da-f]{3,8}\\b|(?<![\\w-])-?(?:\\d+\\.?\\d*|\\.\\d+)(?:[a-z]+|%)?|!important/gi;function Hy(e,t){let n=[],r=[],i=Ly(n),a=0;for(;a<e.length;){let n=/\\s+|\\/\\*[\\s\\S]*?(?:\\*\\/|$)/y;n.lastIndex=a;let o=n.exec(e)?.[0].length;if(o){a+=o;continue}let s=a,c=0;for(;s<e.length;){let t=e[s];if(t===`"`||t===`\'`){let n=e.indexOf(t,s+1);s=n<0?e.length:n+1;continue}if(t===`(`)c++;else if(t===`)`)c--;else if(c<=0&&/[{};]/.test(t))break;s++}let l=e.slice(a,s).trimEnd(),u=l.indexOf(`:`);if(l[0]===`@`)i(`keyword`,a,l.match(/^@[\\w-]*/)[0].length);else if(e[s]===`{`)i(`tag`,a,l.length);else if(u>0){let e=l.slice(0,u).trim();i(`attribute`,a,e.length);let n=l.slice(u+1).search(/\\S/),o=a+u+1+n,s=n<0?``:l.slice(u+1+n);for(let e of s.matchAll(Vy))i(e[1]?`string`:`keyword`,o+e.index,e[0].length);let c=t[e],d=s.match(/^(-?(?:\\d+\\.?\\d*|\\.\\d+))([a-z]*|%)$/i);c&&s&&r.push(d&&(!Array.isArray(c)||!d[2])?Iy(e,c,+d[1],o,o+d[1].length):Iy(e,c,s,o,o+s.length))}a=s+1}return{tokens:n,controls:r}}var Uy=/\\b(?:const|let|var)\\s+([A-Za-z_$][\\w$]*)\\s*=\\s*(-?(?:\\d+\\.?\\d*|\\.\\d+)|true|false|(["\'])(?:\\\\.|(?!\\3)[^\\\\\\n])*\\3)(?=[ \\t]*(?:[;,\\n]|$))/g;function Wy(e,t){let n=[];for(let r of e.matchAll(Uy)){let[e,i,a,o=``]=r,s=t[i];if(!s)continue;let c=r.index+e.length-a.length,l=o?a.slice(1,-1).replace(/\\\\(.)/g,`$1`):Py.test(a)?+a:a===`true`;n.push(Iy(i,s,l,c,c+a.length,o))}return{tokens:Bv(e),controls:n}}var Gy={html:By,css:Hy,js:Wy};function Ky(e,t,n){let r=typeof n==`number`?Ev(n,t.step):`${n}`;if(e===`css`)return r.replace(/[;{}<]/g,``);let{quote:i}=t;if(e===`html`){let e=r.replaceAll(`&`,`&amp;`).replaceAll(`<`,`&lt;`);return i?i+e.replaceAll(i,i===`"`?`&quot;`:`&#39;`)+i:e}if(typeof n!=`string`)return r;let a=i||`\'`;return a+r.replaceAll(`\\\\`,`\\\\\\\\`).replaceAll(a,`\\\\${a}`).replaceAll(`\n`,`\\\\n`)+a}function qy(e,t,n,r){let{start:i,end:a}=n.range;return t.slice(0,i)+Ky(e,n,r)+t.slice(a)}var Jy=ty+`.cc .cc-files{pointer-events:auto;padding:0 2px}.cc-files>button{all:unset;cursor:pointer;border-radius:4px;align-items:center;height:20px;padding:0 6px;display:flex}.cc-files>:hover{color:var(--cc-secondary)}.cc-files>[aria-selected=true]{background:var(--cc-sunken);color:var(--cc-foreground)}.cc-files>:focus-visible{outline-offset:-2px;outline:2px solid}.cc-run:not([hidden]){width:100%;display:grid}.cc-run>iframe{opacity:0;pointer-events:none;border:0;grid-area:1/1;width:100%}.cc-run>[data-shown]{opacity:1;pointer-events:auto}`,Yy=(e,t)=>Object.keys(e).filter(e=>Fy(e)===t).map(t=>e[t]).join(`\n`);function Xy({html:e,css:t,js:n,theme:r}){let i=(0,d.useRef)(null),a=(0,d.useRef)(null),[o,s]=(0,d.useState)();return(0,d.useEffect)(()=>{let e=Ny(i.current,s);return a.current=e,e.stop},[]),(0,d.useEffect)(()=>a.current.css(t),[t]),(0,d.useEffect)(()=>{let t=matchMedia(`(prefers-color-scheme: dark)`),r=()=>{let{colorScheme:r,color:o,fontFamily:s}=getComputedStyle(i.current),c=r.includes(`dark`)&&(!r.includes(`light`)||t.matches);a.current.run(e,n,`color-scheme:${c?`dark`:`light`};color:${o};font-family:${s}`)};return r(),t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[e,n,r]),(0,V.jsxs)(V.Fragment,{children:[o&&(0,V.jsx)(`p`,{className:`cc-problem`,children:o}),(0,V.jsx)(`div`,{ref:i,className:`cc-run`,hidden:!!o})]})}function Zy({files:e,controls:t={},onChange:n,theme:r,note:i,className:a,...o}){ny(`component-code-html`,Jy);let s=(0,d.useMemo)(()=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,ry(t)])),[JSON.stringify(e)]),c=Object.keys(s),[l,u]=(0,d.useState)(c[0]),f=c.includes(l)?l:c[0],[p,m]=(0,d.useState)({from:s,to:s});p.from!==s&&m({from:s,to:s});let h=p.from===s?p.to:s,g=Fy(f),{tokens:_,controls:v}=Gy[g](h[f],t);return(0,V.jsx)(by,{className:a,theme:r,...o,preview:(0,V.jsx)(Xy,{html:Yy(h,`html`),css:Yy(h,`css`),js:Yy(h,`js`),theme:r}),tab:(0,V.jsx)(`div`,{className:`cc-tab cc-files`,role:`tablist`,children:c.map(e=>(0,V.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":e===f,onClick:()=>u(e),children:e},e))}),source:h[f],changed:c.some(e=>h[e]!==s[e]),note:i,onReset:()=>m({from:s,to:s}),tokens:_,controls:v,onChange:(e,t)=>{let r=qy(g,h[f],e,t);m({from:s,to:{...h,[f]:r}}),n?.({file:f,prop:e.prop,value:t,code:r})}})}var Qy=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function ee(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function te(e){if(h=!1,ee(e),!m)if(n(c)!==null)m=!0,ne||(ne=!0,ce());else{var t=n(l);t!==null&&de(te,t.startTime-e)}}var ne=!1,re=-1,ie=5,ae=-1;function oe(){return g?!0:!(e.unstable_now()-ae<ie)}function se(){if(g=!1,ne){var t=e.unstable_now();ae=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(re),re=-1),p=!0;var a=f;try{b:{for(ee(t),d=n(c);d!==null&&!(d.expirationTime>t&&oe());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,ee(t),i=!0;break b}d===n(c)&&r(c),ee(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&de(te,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ce():ne=!1}}}var ce;if(typeof y==`function`)ce=function(){y(se)};else if(typeof MessageChannel<`u`){var le=new MessageChannel,ue=le.port2;le.port1.onmessage=se,ce=function(){ue.postMessage(null)}}else ce=function(){_(se,0)};function de(t,n){re=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):ie=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(re),re=-1):h=!0,de(te,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ne||(ne=!0,ce()))),r},e.unstable_shouldYield=oe,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),$y=o(((e,t)=>{t.exports=Qy()})),eb=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.7`})),tb=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=eb()})),nb=o((e=>{var t=$y(),n=u(),r=tb();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,m=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),ee=Symbol.for(`react.consumer`),te=Symbol.for(`react.context`),ne=Symbol.for(`react.forward_ref`),re=Symbol.for(`react.suspense`),ie=Symbol.for(`react.suspense_list`),ae=Symbol.for(`react.memo`),oe=Symbol.for(`react.lazy`),se=Symbol.for(`react.activity`),ce=Symbol.for(`react.memo_cache_sentinel`),le=Symbol.iterator;function ue(e){return typeof e!=`object`||!e?null:(e=le&&e[le]||e[`@@iterator`],typeof e==`function`?e:null)}var de=Symbol.for(`react.client.reference`);function fe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===de?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case re:return`Suspense`;case ie:return`SuspenseList`;case se:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case g:return`Portal`;case te:return e.displayName||`Context`;case ee:return(e._context.displayName||`Context`)+`.Consumer`;case ne:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ae:return t=e.displayName||null,t===null?fe(e.type)||`Memo`:t;case oe:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}var pe=Array.isArray,b=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,he={pending:!1,data:null,method:null,action:null},ge=[],_e=-1;function ve(e){return{current:e}}function ye(e){0>_e||(e.current=ge[_e],ge[_e]=null,_e--)}function be(e,t){_e++,ge[_e]=e.current,e.current=t}var xe=ve(null),Se=ve(null),Ce=ve(null),we=ve(null);function Te(e,t){switch(be(Ce,t),be(Se,e),be(xe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?tf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=tf(t),e=nf(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ye(xe),be(xe,e)}function Ee(){ye(xe),ye(Se),ye(Ce)}function De(e){e.memoizedState!==null&&be(we,e);var t=xe.current,n=nf(t,e.type);t!==n&&(be(Se,e),be(xe,n))}function x(e){Se.current===e&&(ye(xe),ye(Se)),we.current===e&&(ye(we),up._currentValue=he)}var Oe,ke;function Ae(e){if(Oe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\\n( *(at )?)/);Oe=t&&t[1]||``,ke=-1<e.stack.indexOf(`\n at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`\n`+Oe+e+ke}var je=!1;function Me(e,t){if(!e||je)return``;je=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`\n`),l=s.split(`\n`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`\n`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{je=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ae(n):``}function Ne(e,t){switch(e.tag){case 26:case 27:case 5:return Ae(e.type);case 16:return Ae(`Lazy`);case 13:return e.child!==t&&t!==null?Ae(`Suspense Fallback`):Ae(`Suspense`);case 19:return Ae(`SuspenseList`);case 0:case 15:return Me(e.type,!1);case 11:return Me(e.type.render,!1);case 1:return Me(e.type,!0);case 31:return Ae(`Activity`);default:return``}}function S(e){try{var t=``,n=null;do t+=Ne(e,n),n=e,e=e.return;while(e);return t}catch(e){return`\nError generating stack: `+e.message+`\n`+e.stack}}var Pe=Object.prototype.hasOwnProperty,Fe=t.unstable_scheduleCallback,Ie=t.unstable_cancelCallback,Le=t.unstable_shouldYield,Re=t.unstable_requestPaint,ze=t.unstable_now,Be=t.unstable_getCurrentPriorityLevel,Ve=t.unstable_ImmediatePriority,He=t.unstable_UserBlockingPriority,Ue=t.unstable_NormalPriority,We=t.unstable_LowPriority,Ge=t.unstable_IdlePriority,Ke=t.log,qe=t.unstable_setDisableYieldValue,Je=null,Ye=null;function Xe(e){if(typeof Ke==`function`&&qe(e),Ye&&typeof Ye.setStrictMode==`function`)try{Ye.setStrictMode(Je,e)}catch{}}var Ze=Math.clz32?Math.clz32:et,Qe=Math.log,$e=Math.LN2;function et(e){return e>>>=0,e===0?32:31-(Qe(e)/$e|0)|0}var tt=256,nt=262144,rt=4194304;function it(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function at(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=it(n))):i=it(o):i=it(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=it(n))):i=it(o)):i=it(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function ot(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function st(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ct(){var e=rt;return rt<<=1,!(rt&62914560)&&(rt=4194304),e}function lt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ut(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function dt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ze(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&ft(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ft(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ze(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function pt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ze(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function mt(e,t){var n=t&-t;return n=n&42?1:ht(n),(n&(e.suspendedLanes|t))===0?n:0}function ht(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function C(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function gt(){var e=me.p;return e===0?(e=window.event,e===void 0?32:Ep(e.type)):e}function _t(e,t){var n=me.p;try{return me.p=e,t()}finally{me.p=n}}var vt=Math.random().toString(36).slice(2),yt=`__reactFiber$`+vt,bt=`__reactProps$`+vt,xt=`__reactContainer$`+vt,St=`__reactEvents$`+vt,Ct=`__reactListeners$`+vt,wt=`__reactHandles$`+vt,Tt=`__reactResources$`+vt,Et=`__reactMarker$`+vt;function Dt(e){delete e[yt],delete e[bt],delete e[St],delete e[Ct],delete e[wt]}function Ot(e){var t=e[yt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[xt]||n[yt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Tf(e);e!==null;){if(n=e[yt])return n;e=Tf(e)}return t}e=n,n=e.parentNode}return null}function kt(e){if(e=e[yt]||e[xt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function At(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function jt(e){var t=e[Tt];return t||=e[Tt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Mt(e){e[Et]=!0}var Nt=new Set,Pt={};function Ft(e,t){It(e,t),It(e+`Capture`,t)}function It(e,t){for(Pt[e]=t,e=0;e<t.length;e++)Nt.add(t[e])}var Lt=RegExp(`^[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$`),Rt={},zt={};function Bt(e){return Pe.call(zt,e)?!0:Pe.call(Rt,e)?!1:Lt.test(e)?zt[e]=!0:(Rt[e]=!0,!1)}function Vt(e,t,n){if(Bt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Ht(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Ut(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Wt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Gt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Kt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qt(e){if(!e._valueTracker){var t=Gt(e)?`checked`:`value`;e._valueTracker=Kt(e,t,``+e[t])}}function Jt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Gt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Yt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Xt=/[\\n"\\\\]/g;function Zt(e){return e.replace(Xt,function(e){return`\\\\`+e.charCodeAt(0).toString(16)+` `})}function Qt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Wt(t)):e.value!==``+Wt(t)&&(e.value=``+Wt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):en(e,o,Wt(n)):en(e,o,Wt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Wt(s):e.removeAttribute(`name`)}function $t(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){qt(e);return}n=n==null?``:``+Wt(n),t=t==null?n:``+Wt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),qt(e)}function en(e,t,n){t===`number`&&Yt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function tn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Wt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function nn(e,t,n){if(t!=null&&(t=``+Wt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Wt(n)}function rn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(pe(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Wt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),qt(e)}function an(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var on=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function sn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||on.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function cn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&sn(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&sn(e,o,t[o])}function ln(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var un=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),dn=/^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*:/i;function fn(e){return dn.test(``+e)?`javascript:throw new Error(\'React has blocked a javascript: URL as a security precaution.\')`:e}function pn(){}var mn=null;function hn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var gn=null,_n=null;function vn(e){var t=kt(e);if(t&&(e=t.stateNode)){var n=e[bt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Qt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Zt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[bt]||null;if(!a)throw Error(i(90));Qt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Jt(r)}break a;case`textarea`:nn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&tn(e,!!n.multiple,t,!1)}}}var yn=!1;function bn(e,t,n){if(yn)return e(t,n);yn=!0;try{return e(t)}finally{if(yn=!1,(gn!==null||_n!==null)&&(ju(),gn&&(t=gn,e=_n,_n=gn=null,vn(t),e)))for(t=0;t<e.length;t++)vn(e[t])}}function xn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[bt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var Sn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),Cn=!1;if(Sn)try{var wn={};Object.defineProperty(wn,"passive",{get:function(){Cn=!0}}),window.addEventListener(`test`,wn,wn),window.removeEventListener(`test`,wn,wn)}catch{Cn=!1}var Tn=null,En=null,Dn=null;function On(){if(Dn)return Dn;var e,t=En,n=t.length,r,i=`value`in Tn?Tn.value:Tn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Dn=i.slice(e,1<r?1-r:void 0)}function kn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function An(){return!0}function jn(){return!1}function Mn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?An:jn,this.isPropagationStopped=jn,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=An)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=An)},persist:function(){},isPersistent:An}),t}var Nn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pn=Mn(Nn),Fn=p({},Nn,{view:0,detail:0}),In=Mn(Fn),Ln,Rn,zn,Bn=p({},Fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==zn&&(zn&&e.type===`mousemove`?(Ln=e.screenX-zn.screenX,Rn=e.screenY-zn.screenY):Rn=Ln=0,zn=e),Ln)},movementY:function(e){return`movementY`in e?e.movementY:Rn}}),Vn=Mn(Bn),Hn=Mn(p({},Bn,{dataTransfer:0})),Un=Mn(p({},Fn,{relatedTarget:0})),Wn=Mn(p({},Nn,{animationName:0,elapsedTime:0,pseudoElement:0})),Gn=Mn(p({},Nn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Kn=Mn(p({},Nn,{data:0})),qn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Jn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Yn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Xn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Yn[e])?!!t[e]:!1}function Zn(){return Xn}var Qn=Mn(p({},Fn,{key:function(e){if(e.key){var t=qn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=kn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Jn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zn,charCode:function(e){return e.type===`keypress`?kn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?kn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),$n=Mn(p({},Bn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),er=Mn(p({},Fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zn})),tr=Mn(p({},Nn,{propertyName:0,elapsedTime:0,pseudoElement:0})),nr=Mn(p({},Bn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),rr=Mn(p({},Nn,{newState:0,oldState:0})),ir=[9,13,27,32],ar=Sn&&`CompositionEvent`in window,or=null;Sn&&`documentMode`in document&&(or=document.documentMode);var sr=Sn&&`TextEvent`in window&&!or,cr=Sn&&(!ar||or&&8<or&&11>=or),lr=` `,ur=!1;function dr(e,t){switch(e){case`keyup`:return ir.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function fr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var pr=!1;function mr(e,t){switch(e){case`compositionend`:return fr(t);case`keypress`:return t.which===32?(ur=!0,lr):null;case`textInput`:return e=t.data,e===lr&&ur?null:e;default:return null}}function hr(e,t){if(pr)return e===`compositionend`||!ar&&dr(e,t)?(e=On(),Dn=En=Tn=null,pr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return cr&&t.locale!==`ko`?null:t.data;default:return null}}var gr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function _r(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!gr[e.type]:t===`textarea`}function vr(e,t,n,r){gn?_n?_n.push(r):_n=[r]:gn=r,t=zd(t,`onChange`),0<t.length&&(n=new Pn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var yr=null,br=null;function xr(e){jd(e,0)}function Sr(e){if(Jt(At(e)))return e}function Cr(e,t){if(e===`change`)return t}var wr=!1;if(Sn){var Tr;if(Sn){var Er=`oninput`in document;if(!Er){var Dr=document.createElement(`div`);Dr.setAttribute(`oninput`,`return;`),Er=typeof Dr.oninput==`function`}Tr=Er}else Tr=!1;wr=Tr&&(!document.documentMode||9<document.documentMode)}function Or(){yr&&(yr.detachEvent(`onpropertychange`,kr),br=yr=null)}function kr(e){if(e.propertyName===`value`&&Sr(br)){var t=[];vr(t,br,e,hn(e)),bn(xr,t)}}function Ar(e,t,n){e===`focusin`?(Or(),yr=t,br=n,yr.attachEvent(`onpropertychange`,kr)):e===`focusout`&&Or()}function jr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Sr(br)}function Mr(e,t){if(e===`click`)return Sr(t)}function Nr(e,t){if(e===`input`||e===`change`)return Sr(t)}function Pr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Fr=typeof Object.is==`function`?Object.is:Pr;function Ir(e,t){if(Fr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Pe.call(t,i)||!Fr(e[i],t[i]))return!1}return!0}function Lr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Rr(e,t){var n=Lr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Lr(n)}}function zr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?zr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Br(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Yt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Yt(e.document)}return t}function Vr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Hr=Sn&&`documentMode`in document&&11>=document.documentMode,Ur=null,Wr=null,Gr=null,Kr=!1;function qr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Kr||Ur==null||Ur!==Yt(r)||(r=Ur,`selectionStart`in r&&Vr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Gr&&Ir(Gr,r)||(Gr=r,r=zd(Wr,`onSelect`),0<r.length&&(t=new Pn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Ur)))}function Jr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Yr={animationend:Jr(`Animation`,`AnimationEnd`),animationiteration:Jr(`Animation`,`AnimationIteration`),animationstart:Jr(`Animation`,`AnimationStart`),transitionrun:Jr(`Transition`,`TransitionRun`),transitionstart:Jr(`Transition`,`TransitionStart`),transitioncancel:Jr(`Transition`,`TransitionCancel`),transitionend:Jr(`Transition`,`TransitionEnd`)},Xr={},Zr={};Sn&&(Zr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Yr.animationend.animation,delete Yr.animationiteration.animation,delete Yr.animationstart.animation),`TransitionEvent`in window||delete Yr.transitionend.transition);function Qr(e){if(Xr[e])return Xr[e];if(!Yr[e])return e;var t=Yr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Zr)return Xr[e]=t[n];return e}var $r=Qr(`animationend`),ei=Qr(`animationiteration`),ti=Qr(`animationstart`),ni=Qr(`transitionrun`),ri=Qr(`transitionstart`),ii=Qr(`transitioncancel`),ai=Qr(`transitionend`),oi=new Map,si=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);si.push(`scrollEnd`);function ci(e,t){oi.set(e,t),Ft(t,[e])}var li=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ui=[],di=0,fi=0;function pi(){for(var e=di,t=fi=di=0;t<e;){var n=ui[t];ui[t++]=null;var r=ui[t];ui[t++]=null;var i=ui[t];ui[t++]=null;var a=ui[t];if(ui[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&_i(n,i,a)}}function mi(e,t,n,r){ui[di++]=e,ui[di++]=t,ui[di++]=n,ui[di++]=r,fi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function hi(e,t,n,r){return mi(e,t,n,r),vi(e)}function gi(e,t){return mi(e,null,null,t),vi(e)}function _i(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ze(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function vi(e){if(50<Su)throw Su=0,Cu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var yi={};function bi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xi(e,t,n,r){return new bi(e,t,n,r)}function Si(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ci(e,t){var n=e.alternate;return n===null?(n=xi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function wi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ti(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)Si(e)&&(s=1);else if(typeof e==`string`)s=rp(e,n,xe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case se:return e=xi(31,n,t,a),e.elementType=se,e.lanes=o,e;case _:return Ei(n.children,a,o,t);case v:s=8,a|=24;break;case y:return e=xi(12,n,t,a|2),e.elementType=y,e.lanes=o,e;case re:return e=xi(13,n,t,a),e.elementType=re,e.lanes=o,e;case ie:return e=xi(19,n,t,a),e.elementType=ie,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case te:s=10;break a;case ee:s=9;break a;case ne:s=11;break a;case ae:s=14;break a;case oe:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=xi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Ei(e,t,n,r){return e=xi(7,e,r,t),e.lanes=n,e}function Di(e,t,n){return e=xi(6,e,null,t),e.lanes=n,e}function Oi(e){var t=xi(18,null,null,0);return t.stateNode=e,t}function ki(e,t,n){return t=xi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ai=new WeakMap;function ji(e,t){if(typeof e==`object`&&e){var n=Ai.get(e);return n===void 0?(t={value:e,source:t,stack:S(t)},Ai.set(e,t),t):n}return{value:e,source:t,stack:S(t)}}var Mi=[],Ni=0,Pi=null,Fi=0,Ii=[],Li=0,Ri=null,zi=1,Bi=``;function Vi(e,t){Mi[Ni++]=Fi,Mi[Ni++]=Pi,Pi=e,Fi=t}function Hi(e,t,n){Ii[Li++]=zi,Ii[Li++]=Bi,Ii[Li++]=Ri,Ri=e;var r=zi;e=Bi;var i=32-Ze(r)-1;r&=~(1<<i),n+=1;var a=32-Ze(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,zi=1<<32-Ze(t)+i|n<<i|r,Bi=a+e}else zi=1<<a|n<<i|r,Bi=e}function Ui(e){e.return!==null&&(Vi(e,1),Hi(e,1,0))}function Wi(e){for(;e===Pi;)Pi=Mi[--Ni],Mi[Ni]=null,Fi=Mi[--Ni],Mi[Ni]=null;for(;e===Ri;)Ri=Ii[--Li],Ii[Li]=null,Bi=Ii[--Li],Ii[Li]=null,zi=Ii[--Li],Ii[Li]=null}function Gi(e,t){Ii[Li++]=zi,Ii[Li++]=Bi,Ii[Li++]=Ri,zi=t.id,Bi=t.overflow,Ri=e}var Ki=null,qi=null,Ji=!1,Yi=null,Xi=!1,Zi=Error(i(519));function Qi(e){throw ia(ji(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Zi}function $i(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[yt]=e,t[bt]=r,n){case`dialog`:Md(`cancel`,t),Md(`close`,t);break;case`iframe`:case`object`:case`embed`:Md(`load`,t);break;case`video`:case`audio`:for(n=0;n<kd.length;n++)Md(kd[n],t);break;case`source`:Md(`error`,t);break;case`img`:case`image`:case`link`:Md(`error`,t),Md(`load`,t);break;case`details`:Md(`toggle`,t);break;case`input`:Md(`invalid`,t),$t(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Md(`invalid`,t);break;case`textarea`:Md(`invalid`,t),rn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Gd(t.textContent,n)?(r.popover!=null&&(Md(`beforetoggle`,t),Md(`toggle`,t)),r.onScroll!=null&&Md(`scroll`,t),r.onScrollEnd!=null&&Md(`scrollend`,t),r.onClick!=null&&(t.onclick=pn),t=!0):t=!1,t||Qi(e,!0)}function ea(e){for(Ki=e.return;Ki;)switch(Ki.tag){case 5:case 31:case 13:Xi=!1;return;case 27:case 3:Xi=!0;return;default:Ki=Ki.return}}function ta(e){if(e!==Ki)return!1;if(!Ji)return ea(e),Ji=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||rf(e.type,e.memoizedProps)),n=!n),n&&qi&&Qi(e),ea(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));qi=wf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));qi=wf(e)}else t===27?(t=qi,ff(e.type)?(e=Cf,Cf=null,qi=e):qi=t):qi=Ki?Sf(e.stateNode.nextSibling):null;return!0}function na(){qi=Ki=null,Ji=!1}function ra(){var e=Yi;return e!==null&&(cu===null?cu=e:cu.push.apply(cu,e),Yi=null),e}function ia(e){Yi===null?Yi=[e]:Yi.push(e)}var aa=ve(null),oa=null,sa=null;function ca(e,t,n){be(aa,t._currentValue),t._currentValue=n}function la(e){e._currentValue=aa.current,ye(aa)}function ua(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function da(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ua(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ua(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function fa(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Fr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===we.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[up]:e.push(up))}a=a.return}e!==null&&da(t,e,n,r),t.flags|=262144}function pa(e){for(e=e.firstContext;e!==null;){if(!Fr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ma(e){oa=e,sa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ha(e){return _a(oa,e)}function ga(e,t){return oa===null&&ma(e),_a(e,t)}function _a(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},sa===null){if(e===null)throw Error(i(308));sa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else sa=sa.next=t;return n}var va=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ya=t.unstable_scheduleCallback,ba=t.unstable_NormalPriority,xa={$$typeof:te,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Sa(){return{controller:new va,data:new Map,refCount:0}}function Ca(e){e.refCount--,e.refCount===0&&ya(ba,function(){e.controller.abort()})}var wa=null,Ta=0,Ea=0,Da=null;function Oa(e,t){if(wa===null){var n=wa=[];Ta=0,Ea=Cd(),Da={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Ta++,t.then(ka,ka),t}function ka(){if(--Ta===0&&wa!==null){Da!==null&&(Da.status=`fulfilled`);var e=wa;wa=null,Ea=0,Da=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Aa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ja=b.S;b.S=function(e,t){du=ze(),typeof t==`object`&&t&&typeof t.then==`function`&&Oa(e,t),ja!==null&&ja(e,t)};var Ma=ve(null);function Na(){var e=Ma.current;return e===null?ql.pooledCache:e}function Pa(e,t){t===null?be(Ma,Ma.current):be(Ma,t.pool)}function Fa(){var e=Na();return e===null?null:{parent:xa._currentValue,pool:e}}var Ia=Error(i(460)),La=Error(i(474)),Ra=Error(i(542)),za={then:function(){}};function Ba(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Va(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(pn,pn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ga(e),e;default:if(typeof t.status==`string`)t.then(pn,pn);else{if(e=ql,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ga(e),e}throw Ua=t,Ia}}function Ha(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ua=e,Ia):e}}var Ua=null;function Wa(){if(Ua===null)throw Error(i(459));var e=Ua;return Ua=null,e}function Ga(e){if(e===Ia||e===Ra)throw Error(i(483))}var Ka=null,qa=0;function Ja(e){var t=qa;return qa+=1,Ka===null&&(Ka=[]),Va(Ka,e,t)}function Ya(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Xa(e,t){throw t.$$typeof===m?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Za(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Ci(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Di(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===_?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===oe&&Ha(i)===t.type)?(t=a(t,n.props),Ya(t,n),t.return=e,t):(t=Ti(n.type,n.key,n.props,null,e.mode,r),Ya(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ki(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Ei(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Di(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case h:return n=Ti(t.type,t.key,t.props,null,e.mode,n),Ya(n,t),n.return=e,n;case g:return t=ki(t,e.mode,n),t.return=e,t;case oe:return t=Ha(t),f(e,t,n)}if(pe(t)||ue(t))return t=Ei(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ja(t),n);if(t.$$typeof===te)return f(e,ga(e,t),n);Xa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case h:return n.key===i?l(e,t,n,r):null;case g:return n.key===i?u(e,t,n,r):null;case oe:return n=Ha(n),p(e,t,n,r)}if(pe(n)||ue(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ja(n),r);if(n.$$typeof===te)return p(e,t,ga(e,n),r);Xa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case h:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case g:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case oe:return r=Ha(r),m(e,t,n,r,i)}if(pe(r)||ue(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ja(r),i);if(r.$$typeof===te)return m(e,t,n,ga(t,r),i);Xa(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Ji&&Vi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Ji&&Vi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Ji&&Vi(i,h),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Ji&&Vi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ji&&Vi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Ji&&Vi(a,g),u}function ee(e,r,o,c){if(typeof o==`object`&&o&&o.type===_&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===_){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===oe&&Ha(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ya(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===_?(c=Ei(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=Ti(o.type,o.key,o.props,null,e.mode,c),Ya(c,o),c.return=e,e=c)}return s(e);case g:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=ki(o,e.mode,c),c.return=e,e=c}return s(e);case oe:return o=Ha(o),ee(e,r,o,c)}if(pe(o))return v(e,r,o,c);if(ue(o)){if(l=ue(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return ee(e,r,Ja(o),c);if(o.$$typeof===te)return ee(e,r,ga(e,o),c);Xa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Di(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{qa=0;var i=ee(e,t,n,r);return Ka=null,i}catch(t){if(t===Ia||t===Ra)throw t;var a=xi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Qa=Za(!0),$a=Za(!1),eo=!1;function to(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function no(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ro(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function io(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Kl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=vi(e),_i(e,null,n),t}return mi(e,r,t,n),vi(e)}function ao(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pt(e,n)}}function oo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var so=!1;function co(){if(so){var e=Da;if(e!==null)throw e}}function lo(e,t,n,r){so=!1;var i=e.updateQueue;eo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(L&f)===f:(r&f)===f){f!==0&&f===Ea&&(so=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:eo=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),nu|=o,e.lanes=o,e.memoizedState=d}}function uo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function fo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)uo(n[e],t)}var po=ve(null),mo=ve(0);function ho(e,t){e=eu,be(mo,e),be(po,t),eu=e|t.baseLanes}function go(){be(mo,eu),be(po,po.current)}function _o(){eu=mo.current,ye(po),ye(mo)}var vo=ve(null),yo=null;function bo(e){var t=e.alternate;be(To,To.current&1),be(vo,e),yo===null&&(t===null||po.current!==null||t.memoizedState!==null)&&(yo=e)}function xo(e){be(To,To.current),be(vo,e),yo===null&&(yo=e)}function So(e){e.tag===22?(be(To,To.current),be(vo,e),yo===null&&(yo=e)):Co(e)}function Co(){be(To,To.current),be(vo,vo.current)}function wo(e){ye(vo),yo===e&&(yo=null),ye(To)}var To=ve(0);function Eo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||yf(n)||bf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Do=0,w=null,Oo=null,ko=null,Ao=!1,jo=!1,Mo=!1,No=0,Po=0,Fo=null,Io=0;function Lo(){throw Error(i(321))}function Ro(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Fr(e[n],t[n]))return!1;return!0}function zo(e,t,n,r,i,a){return Do=a,w=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,b.H=e===null||e.memoizedState===null?tc:nc,Mo=!1,a=n(r,i),Mo=!1,jo&&(a=Vo(t,n,r,i)),Bo(e),a}function Bo(e){b.H=T;var t=Oo!==null&&Oo.next!==null;if(Do=0,ko=Oo=w=null,Ao=!1,Po=0,Fo=null,t)throw Error(i(300));e===null||yc||(e=e.dependencies,e!==null&&pa(e)&&(yc=!0))}function Vo(e,t,n,r){w=e;var a=0;do{if(jo&&(Fo=null),Po=0,jo=!1,25<=a)throw Error(i(301));if(a+=1,ko=Oo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}b.H=rc,o=t(n,r)}while(jo);return o}function Ho(){var e=b.H,t=e.useState()[0];return t=typeof t.then==`function`?Yo(t):t,e=e.useState()[0],(Oo===null?null:Oo.memoizedState)!==e&&(w.flags|=1024),t}function Uo(){var e=No!==0;return No=0,e}function Wo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Go(e){if(Ao){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ao=!1}Do=0,ko=Oo=w=null,jo=!1,Po=No=0,Fo=null}function Ko(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ko===null?w.memoizedState=ko=e:ko=ko.next=e,ko}function qo(){if(Oo===null){var e=w.alternate;e=e===null?null:e.memoizedState}else e=Oo.next;var t=ko===null?w.memoizedState:ko.next;if(t!==null)ko=t,Oo=e;else{if(e===null)throw w.alternate===null?Error(i(467)):Error(i(310));Oo=e,e={memoizedState:Oo.memoizedState,baseState:Oo.baseState,baseQueue:Oo.baseQueue,queue:Oo.queue,next:null},ko===null?w.memoizedState=ko=e:ko=ko.next=e}return ko}function Jo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Yo(e){var t=Po;return Po+=1,Fo===null&&(Fo=[]),e=Va(Fo,e,t),t=w,(ko===null?t.memoizedState:ko.next)===null&&(t=t.alternate,b.H=t===null||t.memoizedState===null?tc:nc),e}function Xo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Yo(e);if(e.$$typeof===te)return ha(e)}throw Error(i(438,String(e)))}function Zo(e){var t=null,n=w.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=w.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Jo(),w.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ce;return t.index++,n}function Qo(e,t){return typeof t==`function`?t(e):t}function $o(e){return es(qo(),Oo,e)}function es(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Do&f)===f:(L&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Ea&&(d=!0);else if((Do&p)===p){u=u.next,p===Ea&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,w.lanes|=p,nu|=p;f=u.action,Mo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,w.lanes|=f,nu|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Fr(o,e.memoizedState)&&(yc=!0,d&&(n=Da,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ts(e){var t=qo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Fr(o,t.memoizedState)||(yc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ns(e,t,n){var r=w,a=qo(),o=Ji;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Fr((Oo||a).memoizedState,n);if(s&&(a.memoizedState=n,yc=!0),a=a.queue,Ds(as.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||ko!==null&&ko.memoizedState.tag&1){if(r.flags|=2048,Ss(9,{destroy:void 0},is.bind(null,r,a,n,t),null),ql===null)throw Error(i(349));o||Do&127||rs(r,t,n)}return n}function rs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=w.updateQueue,t===null?(t=Jo(),w.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function is(e,t,n,r){t.value=n,t.getSnapshot=r,os(t)&&ss(e)}function as(e,t,n){return n(function(){os(t)&&ss(e)})}function os(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Fr(e,n)}catch{return!0}}function ss(e){var t=gi(e,2);t!==null&&Eu(t,e,2)}function cs(e){var t=Ko();if(typeof e==`function`){var n=e;if(e=n(),Mo){Xe(!0);try{n()}finally{Xe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qo,lastRenderedState:e},t}function ls(e,t,n,r){return e.baseState=n,es(e,Oo,typeof r==`function`?r:Qo)}function us(e,t,n,r,a){if(Qs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};b.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,ds(t,o)):(o.next=n.next,t.pending=n.next=o)}}function ds(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=b.T,o={};b.T=o;try{var s=n(i,r),c=b.S;c!==null&&c(o,s),fs(e,t,s)}catch(n){ms(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),b.T=a}}else try{a=n(i,r),fs(e,t,a)}catch(n){ms(e,t,n)}}function fs(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ps(e,t,n)},function(n){return ms(e,t,n)}):ps(e,t,n)}function ps(e,t,n){t.status=`fulfilled`,t.value=n,hs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,ds(e,n)))}function ms(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,hs(t),t=t.next;while(t!==r)}e.action=null}function hs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function gs(e,t){return t}function _s(e,t){if(Ji){var n=ql.formState;if(n!==null){a:{var r=w;if(Ji){if(qi){b:{for(var i=qi,a=Xi;i.nodeType!==8;){if(!a){i=null;break b}if(i=Sf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){qi=Sf(i.nextSibling),r=i.data===`F!`;break a}}Qi(r)}r=!1}r&&(t=n[0])}}return n=Ko(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gs,lastRenderedState:t},n.queue=r,n=Ys.bind(null,w,r),r.dispatch=n,r=cs(!1),a=Zs.bind(null,w,!1,r.queue),r=Ko(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=us.bind(null,w,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function vs(e){return ys(qo(),Oo,e)}function ys(e,t,n){if(t=es(e,t,gs)[0],e=$o(Qo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Yo(t)}catch(e){throw e===Ia?Ra:e}else r=t;t=qo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(w.flags|=2048,Ss(9,{destroy:void 0},bs.bind(null,i,n),null)),[r,a,e]}function bs(e,t){e.action=t}function xs(e){var t=qo(),n=Oo;if(n!==null)return ys(t,n,e);qo(),t=t.memoizedState,n=qo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ss(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=w.updateQueue,t===null&&(t=Jo(),w.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Cs(){return qo().memoizedState}function ws(e,t,n,r){var i=Ko();w.flags|=e,i.memoizedState=Ss(1|t,{destroy:void 0},n,r===void 0?null:r)}function Ts(e,t,n,r){var i=qo();r=r===void 0?null:r;var a=i.memoizedState.inst;Oo!==null&&r!==null&&Ro(r,Oo.memoizedState.deps)?i.memoizedState=Ss(t,a,n,r):(w.flags|=e,i.memoizedState=Ss(1|t,a,n,r))}function Es(e,t){ws(8390656,8,e,t)}function Ds(e,t){Ts(2048,8,e,t)}function Os(e){w.flags|=4;var t=w.updateQueue;if(t===null)t=Jo(),w.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ks(e){var t=qo().memoizedState;return Os({ref:t,nextImpl:e}),function(){if(Kl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function As(e,t){return Ts(4,2,e,t)}function js(e,t){return Ts(4,4,e,t)}function Ms(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ns(e,t,n){n=n==null?null:n.concat([e]),Ts(4,4,Ms.bind(null,t,e),n)}function Ps(){}function Fs(e,t){var n=qo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Ro(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Is(e,t){var n=qo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Ro(t,r[1]))return r[0];if(r=e(),Mo){Xe(!0);try{e()}finally{Xe(!1)}}return n.memoizedState=[r,t],r}function Ls(e,t,n){return n===void 0||Do&1073741824&&!(L&261930)?e.memoizedState=t:(e.memoizedState=n,e=Tu(),w.lanes|=e,nu|=e,n)}function Rs(e,t,n,r){return Fr(n,t)?n:po.current===null?!(Do&42)||Do&1073741824&&!(L&261930)?(yc=!0,e.memoizedState=n):(e=Tu(),w.lanes|=e,nu|=e,t):(e=Ls(e,n,r),Fr(e,t)||(yc=!0),e)}function zs(e,t,n,r,i){var a=me.p;me.p=a!==0&&8>a?a:8;var o=b.T,s={};b.T=s,Zs(e,!1,t,n);try{var c=i(),l=b.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Xs(e,t,Aa(c,r),wu(e)):Xs(e,t,r,wu(e))}catch(n){Xs(e,t,{then:function(){},status:`rejected`,reason:n},wu())}finally{me.p=a,o!==null&&s.types!==null&&(o.types=s.types),b.T=o}}function Bs(){}function Vs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Hs(e).queue;zs(e,a,t,he,n===null?Bs:function(){return Us(e),n(r)})}function Hs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:he,baseState:he,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qo,lastRenderedState:he},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Us(e){var t=Hs(e);t.next===null&&(t=e.alternate.memoizedState),Xs(e,t.next.queue,{},wu())}function Ws(){return ha(up)}function Gs(){return qo().memoizedState}function Ks(){return qo().memoizedState}function qs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=wu();e=ro(n);var r=io(t,e,n);r!==null&&(Eu(r,t,n),ao(r,t,n)),t={cache:Sa()},e.payload=t;return}t=t.return}}function Js(e,t,n){var r=wu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Qs(e)?$s(t,n):(n=hi(e,t,n,r),n!==null&&(Eu(n,e,r),ec(n,t,r)))}function Ys(e,t,n){Xs(e,t,n,wu())}function Xs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Qs(e))$s(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Fr(s,o))return mi(e,t,i,0),ql===null&&pi(),!1}catch{}if(n=hi(e,t,i,r),n!==null)return Eu(n,e,r),ec(n,t,r),!0}return!1}function Zs(e,t,n,r){if(r={lane:2,revertLane:Cd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Qs(e)){if(t)throw Error(i(479))}else t=hi(e,n,r,2),t!==null&&Eu(t,e,2)}function Qs(e){var t=e.alternate;return e===w||t!==null&&t===w}function $s(e,t){jo=Ao=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ec(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pt(e,n)}}var T={readContext:ha,use:Xo,useCallback:Lo,useContext:Lo,useEffect:Lo,useImperativeHandle:Lo,useLayoutEffect:Lo,useInsertionEffect:Lo,useMemo:Lo,useReducer:Lo,useRef:Lo,useState:Lo,useDebugValue:Lo,useDeferredValue:Lo,useTransition:Lo,useSyncExternalStore:Lo,useId:Lo,useHostTransitionStatus:Lo,useFormState:Lo,useActionState:Lo,useOptimistic:Lo,useMemoCache:Lo,useCacheRefresh:Lo};T.useEffectEvent=Lo;var tc={readContext:ha,use:Xo,useCallback:function(e,t){return Ko().memoizedState=[e,t===void 0?null:t],e},useContext:ha,useEffect:Es,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ws(4194308,4,Ms.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ws(4194308,4,e,t)},useInsertionEffect:function(e,t){ws(4,2,e,t)},useMemo:function(e,t){var n=Ko();t=t===void 0?null:t;var r=e();if(Mo){Xe(!0);try{e()}finally{Xe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Ko();if(n!==void 0){var i=n(t);if(Mo){Xe(!0);try{n(t)}finally{Xe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Js.bind(null,w,e),[r.memoizedState,e]},useRef:function(e){var t=Ko();return e={current:e},t.memoizedState=e},useState:function(e){e=cs(e);var t=e.queue,n=Ys.bind(null,w,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ps,useDeferredValue:function(e,t){return Ls(Ko(),e,t)},useTransition:function(){var e=cs(!1);return e=zs.bind(null,w,e.queue,!0,!1),Ko().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=w,a=Ko();if(Ji){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),ql===null)throw Error(i(349));L&127||rs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Es(as.bind(null,r,o,e),[e]),r.flags|=2048,Ss(9,{destroy:void 0},is.bind(null,r,o,n,t),null),n},useId:function(){var e=Ko(),t=ql.identifierPrefix;if(Ji){var n=Bi,r=zi;n=(r&~(1<<32-Ze(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=No++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Io++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ws,useFormState:_s,useActionState:_s,useOptimistic:function(e){var t=Ko();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Zs.bind(null,w,!0,n),n.dispatch=t,[e,t]},useMemoCache:Zo,useCacheRefresh:function(){return Ko().memoizedState=qs.bind(null,w)},useEffectEvent:function(e){var t=Ko(),n={impl:e};return t.memoizedState=n,function(){if(Kl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},nc={readContext:ha,use:Xo,useCallback:Fs,useContext:ha,useEffect:Ds,useImperativeHandle:Ns,useInsertionEffect:As,useLayoutEffect:js,useMemo:Is,useReducer:$o,useRef:Cs,useState:function(){return $o(Qo)},useDebugValue:Ps,useDeferredValue:function(e,t){return Rs(qo(),Oo.memoizedState,e,t)},useTransition:function(){var e=$o(Qo)[0],t=qo().memoizedState;return[typeof e==`boolean`?e:Yo(e),t]},useSyncExternalStore:ns,useId:Gs,useHostTransitionStatus:Ws,useFormState:vs,useActionState:vs,useOptimistic:function(e,t){return ls(qo(),Oo,e,t)},useMemoCache:Zo,useCacheRefresh:Ks};nc.useEffectEvent=ks;var rc={readContext:ha,use:Xo,useCallback:Fs,useContext:ha,useEffect:Ds,useImperativeHandle:Ns,useInsertionEffect:As,useLayoutEffect:js,useMemo:Is,useReducer:ts,useRef:Cs,useState:function(){return ts(Qo)},useDebugValue:Ps,useDeferredValue:function(e,t){var n=qo();return Oo===null?Ls(n,e,t):Rs(n,Oo.memoizedState,e,t)},useTransition:function(){var e=ts(Qo)[0],t=qo().memoizedState;return[typeof e==`boolean`?e:Yo(e),t]},useSyncExternalStore:ns,useId:Gs,useHostTransitionStatus:Ws,useFormState:xs,useActionState:xs,useOptimistic:function(e,t){var n=qo();return Oo===null?(n.baseState=e,[e,n.queue.dispatch]):ls(n,Oo,e,t)},useMemoCache:Zo,useCacheRefresh:Ks};rc.useEffectEvent=ks;function ic(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:p({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ac={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=wu(),i=ro(r);i.payload=t,n!=null&&(i.callback=n),t=io(e,i,r),t!==null&&(Eu(t,e,r),ao(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=wu(),i=ro(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=io(e,i,r),t!==null&&(Eu(t,e,r),ao(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=wu(),r=ro(n);r.tag=2,t!=null&&(r.callback=t),t=io(e,r,n),t!==null&&(Eu(t,e,n),ao(t,e,n))}};function oc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Ir(n,r)||!Ir(i,a):!0}function sc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ac.enqueueReplaceState(t,t.state,null)}function cc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=p({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function lc(e){li(e)}function uc(e){console.error(e)}function dc(e){li(e)}function fc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function pc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function mc(e,t,n){return n=ro(n),n.tag=3,n.payload={element:null},n.callback=function(){fc(e,t)},n}function hc(e){return e=ro(e),e.tag=3,e}function gc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){pc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){pc(t,n,r),typeof i!=`function`&&(mu===null?mu=new Set([this]):mu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function _c(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&fa(t,n,a,!0),n=vo.current,n!==null){switch(n.tag){case 31:case 13:return yo===null?Ru():n.alternate===null&&tu===0&&(tu=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===za?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),rd(e,r,a)),!1;case 22:return n.flags|=65536,r===za?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),rd(e,r,a)),!1}throw Error(i(435,n.tag))}return rd(e,r,a),Ru(),!1}if(Ji)return t=vo.current,t===null?(r!==Zi&&(t=Error(i(423),{cause:r}),ia(ji(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=ji(r,n),a=mc(e.stateNode,r,a),oo(e,a),tu!==4&&(tu=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Zi&&(e=Error(i(422),{cause:r}),ia(ji(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=ji(o,n),su===null?su=[o]:su.push(o),tu!==4&&(tu=2),t===null)return!0;r=ji(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=mc(n.stateNode,r,e),oo(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(mu===null||!mu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=hc(a),gc(a,e,n,r),oo(n,a),!1}n=n.return}while(n!==null);return!1}var vc=Error(i(461)),yc=!1;function bc(e,t,n,r){t.child=e===null?$a(t,null,n,r):Qa(t,e.child,n,r)}function xc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ma(t),r=zo(e,t,n,o,a,i),s=Uo(),e!==null&&!yc?(Wo(e,t,i),Vc(e,t,i)):(Ji&&s&&Ui(t),t.flags|=1,bc(e,t,r,i),t.child)}function Sc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Si(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Cc(e,t,a,r,i)):(e=Ti(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!A(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Ir:n,n(o,r)&&e.ref===t.ref)return Vc(e,t,i)}return t.flags|=1,e=Ci(a,r),e.ref=t.ref,e.return=t,t.child=e}function Cc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Ir(a,r)&&e.ref===t.ref)if(yc=!1,t.pendingProps=r=a,A(e,i))e.flags&131072&&(yc=!0);else return t.lanes=e.lanes,Vc(e,t,i)}return Ac(e,t,n,r,i)}function wc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Ec(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Pa(t,a===null?null:a.cachePool),a===null?go():ho(t,a),So(t);else return r=t.lanes=536870912,Ec(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Pa(t,null),go(),Co(t)):(Pa(t,a.cachePool),ho(t,a),Co(t),t.memoizedState=null);return bc(e,t,i,n),t.child}function Tc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ec(e,t,n,r,i){var a=Na();return a=a===null?null:{parent:xa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Pa(t,null),go(),So(t),e!==null&&fa(e,t,r,!0),t.childLanes=i,null}function Dc(e,t){return t=O({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function E(e,t,n){return Qa(t,e.child,null,n),e=Dc(t,t.pendingProps),e.flags|=2,wo(t),t.memoizedState=null,e}function Oc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Ji){if(r.mode===`hidden`)return e=Dc(t,r),t.lanes=536870912,Tc(null,e);if(xo(t),(e=qi)?(e=vf(e,Xi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ri===null?null:{id:zi,overflow:Bi},retryLane:536870912,hydrationErrors:null},n=Oi(e),n.return=t,t.child=n,Ki=t,qi=null)):e=null,e===null)throw Qi(t);return t.lanes=536870912,null}return Dc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(xo(t),a)if(t.flags&256)t.flags&=-257,t=E(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(yc||fa(e,t,n,!1),a=(n&e.childLanes)!==0,yc||a){if(r=ql,r!==null&&(s=mt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,gi(e,s),Eu(r,e,s),vc;Ru(),t=E(e,t,n)}else e=o.treeContext,qi=Sf(s.nextSibling),Ki=t,Ji=!0,Yi=null,Xi=!1,e!==null&&Gi(t,e),t=Dc(t,r),t.flags|=4096;return t}return e=Ci(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function kc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Ac(e,t,n,r,i){return ma(t),n=zo(e,t,n,r,void 0,i),r=Uo(),e!==null&&!yc?(Wo(e,t,i),Vc(e,t,i)):(Ji&&r&&Ui(t),t.flags|=1,bc(e,t,n,i),t.child)}function D(e,t,n,r,i,a){return ma(t),t.updateQueue=null,n=Vo(t,r,n,i),Bo(e),r=Uo(),e!==null&&!yc?(Wo(e,t,a),Vc(e,t,a)):(Ji&&r&&Ui(t),t.flags|=1,bc(e,t,n,a),t.child)}function jc(e,t,n,r,i){if(ma(t),t.stateNode===null){var a=yi,o=n.contextType;typeof o==`object`&&o&&(a=ha(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=ac,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},to(t),o=n.contextType,a.context=typeof o==`object`&&o?ha(o):yi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(ic(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&ac.enqueueReplaceState(a,a.state,null),lo(t,r,a,i),co(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=cc(n,s);a.props=c;var l=a.context,u=n.contextType;o=yi,typeof u==`object`&&u&&(o=ha(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&sc(t,a,r,o),eo=!1;var f=t.memoizedState;a.state=f,lo(t,r,a,i),co(),l=t.memoizedState,s||f!==l||eo?(typeof d==`function`&&(ic(t,n,d,r),l=t.memoizedState),(c=eo||oc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,no(e,t),o=t.memoizedProps,u=cc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=yi,typeof l==`object`&&l&&(c=ha(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&sc(t,a,r,c),eo=!1,f=t.memoizedState,a.state=f,lo(t,r,a,i),co();var p=t.memoizedState;o!==d||f!==p||eo||e!==null&&e.dependencies!==null&&pa(e.dependencies)?(typeof s==`function`&&(ic(t,n,s,r),p=t.memoizedState),(u=eo||oc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&pa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,kc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Qa(t,e.child,null,i),t.child=Qa(t,null,n,i)):bc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Vc(e,t,i),e}function Mc(e,t,n,r){return na(),t.flags|=256,bc(e,t,n,r),t.child}var Nc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Pc(e){return{baseLanes:e,cachePool:Fa()}}function Fc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=au),e}function Ic(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(To.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Ji){if(a?bo(t):Co(t),(e=qi)?(e=vf(e,Xi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ri===null?null:{id:zi,overflow:Bi},retryLane:536870912,hydrationErrors:null},n=Oi(e),n.return=t,t.child=n,Ki=t,qi=null)):e=null,e===null)throw Qi(t);return bf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(Co(t),a=t.mode,c=O({mode:`hidden`,children:c},a),r=Ei(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Pc(n),r.childLanes=Fc(e,s,n),t.memoizedState=Nc,Tc(null,r)):(bo(t),Lc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(bo(t),t.flags&=-257,t=Rc(e,t,n)):t.memoizedState===null?(Co(t),c=r.fallback,a=t.mode,r=O({mode:`visible`,children:r.children},a),c=Ei(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Qa(t,e.child,null,n),r=t.child,r.memoizedState=Pc(n),r.childLanes=Fc(e,s,n),t.memoizedState=Nc,t=Tc(null,r)):(Co(t),t.child=e.child,t.flags|=128,t=null);else if(bo(t),bf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,ia({value:r,source:null,stack:null}),t=Rc(e,t,n)}else if(yc||fa(e,t,n,!1),s=(n&e.childLanes)!==0,yc||s){if(s=ql,s!==null&&(r=mt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,gi(e,r),Eu(s,e,r),vc;yf(c)||Ru(),t=Rc(e,t,n)}else yf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,qi=Sf(c.nextSibling),Ki=t,Ji=!0,Yi=null,Xi=!1,e!==null&&Gi(t,e),t=Lc(t,r.children),t.flags|=4096);return t}return a?(Co(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=Ci(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=Ei(c,a,n,null),c.flags|=2):c=Ci(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,Tc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Pc(n):(a=c.cachePool,a===null?a=Fa():(l=xa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Fc(e,s,n),t.memoizedState=Nc,Tc(e.child,r)):(bo(t),n=e.child,e=n.sibling,n=Ci(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Lc(e,t){return t=O({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function O(e,t){return e=xi(22,e,null,t),e.lanes=0,e}function Rc(e,t,n){return Qa(t,e.child,null,n),e=Lc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ua(e.return,t,n)}function Bc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function k(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=To.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,be(To,o),bc(e,t,r,n),r=Ji?Fi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&zc(e,n,t);else if(e.tag===19)zc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Eo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Bc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Eo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Bc(t,!0,n,null,a,r);break;case`together`:Bc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Vc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),nu|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(fa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Ci(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ci(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function A(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&pa(e))):!0}function j(e,t,n){switch(t.tag){case 3:Te(t,t.stateNode.containerInfo),ca(t,xa,e.memoizedState.cache),na();break;case 27:case 5:De(t);break;case 4:Te(t,t.stateNode.containerInfo);break;case 10:ca(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,xo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(bo(t),e=Vc(e,t,n),e===null?null:e.sibling):Ic(e,t,n):(bo(t),t.flags|=128,null);bo(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(fa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return k(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),be(To,To.current),r)break;return null;case 22:return t.lanes=0,wc(e,t,n,t.pendingProps);case 24:ca(t,xa,e.memoizedState.cache)}return Vc(e,t,n)}function Hc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)yc=!0;else{if(!A(e,n)&&!(t.flags&128))return yc=!1,j(e,t,n);yc=!!(e.flags&131072)}else yc=!1,Ji&&t.flags&1048576&&Hi(t,Fi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ha(t.elementType),t.type=e,typeof e==`function`)Si(e)?(r=cc(e,r),t.tag=1,t=jc(null,t,e,r,n)):(t.tag=0,t=Ac(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===ne){t.tag=11,t=xc(null,t,e,r,n);break a}else if(a===ae){t.tag=14,t=Sc(null,t,e,r,n);break a}}throw t=fe(e)||e,Error(i(306,t,``))}}return t;case 0:return Ac(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=cc(r,t.pendingProps),jc(e,t,r,a,n);case 3:a:{if(Te(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,no(e,t),lo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ca(t,xa,r),r!==o.cache&&da(t,[xa],n,!0),co(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Mc(e,t,r,n);break a}else if(r!==a){a=ji(Error(i(424)),t),ia(a),t=Mc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(qi=Sf(e.firstChild),Ki=t,Ji=!0,Yi=null,Xi=!0,n=$a(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(na(),r===a){t=Vc(e,t,n);break a}bc(e,t,r,n)}t=t.child}return t;case 26:return kc(e,t),e===null?(n=Uf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ji||(n=t.type,e=t.pendingProps,r=ef(Ce.current).createElement(n),r[yt]=t,r[bt]=e,Jd(r,n,e),Mt(r),t.stateNode=r):t.memoizedState=Uf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return De(t),e===null&&Ji&&(r=t.stateNode=Ef(t.type,t.pendingProps,Ce.current),Ki=t,Xi=!0,a=qi,ff(t.type)?(Cf=a,qi=Sf(r.firstChild)):qi=a),bc(e,t,t.pendingProps.children,n),kc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ji&&((a=r=qi)&&(r=gf(r,t.type,t.pendingProps,Xi),r===null?a=!1:(t.stateNode=r,Ki=t,qi=Sf(r.firstChild),Xi=!1,a=!0)),a||Qi(t)),De(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,rf(a,o)?r=null:s!==null&&rf(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=zo(e,t,Ho,null,null,n),up._currentValue=a),kc(e,t),bc(e,t,r,n),t.child;case 6:return e===null&&Ji&&((e=n=qi)&&(n=_f(n,t.pendingProps,Xi),n===null?e=!1:(t.stateNode=n,Ki=t,qi=null,e=!0)),e||Qi(t)),null;case 13:return Ic(e,t,n);case 4:return Te(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Qa(t,null,r,n):bc(e,t,r,n),t.child;case 11:return xc(e,t,t.type,t.pendingProps,n);case 7:return bc(e,t,t.pendingProps,n),t.child;case 8:return bc(e,t,t.pendingProps.children,n),t.child;case 12:return bc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,ca(t,t.type,r.value),bc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ma(t),a=ha(a),r=r(a),t.flags|=1,bc(e,t,r,n),t.child;case 14:return Sc(e,t,t.type,t.pendingProps,n);case 15:return Cc(e,t,t.type,t.pendingProps,n);case 19:return k(e,t,n);case 31:return Oc(e,t,n);case 22:return wc(e,t,n,t.pendingProps);case 24:return ma(t),r=ha(xa),e===null?(a=Na(),a===null&&(a=ql,o=Sa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},to(t),ca(t,xa,a)):((e.lanes&n)!==0&&(no(e,t),lo(t,null,null,n),co()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ca(t,xa,r),r!==a.cache&&da(t,[xa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ca(t,xa,r))),bc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function M(e){e.flags|=4}function Uc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Fu())e.flags|=8192;else throw Ua=za,La}else e.flags&=-16777217}function Wc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!R(t))if(Fu())e.flags|=8192;else throw Ua=za,La}function Gc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:ct(),e.lanes|=t,ou|=t)}function Kc(e,t){if(!Ji)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function qc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function N(e,t,n){var r=t.pendingProps;switch(Wi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qc(t),null;case 1:return qc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),la(xa),Ee(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ta(t)?M(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ra())),qc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(M(t),o===null?(qc(t),Uc(t,a,null,r,n)):(qc(t),Wc(t,o))):o?o===e.memoizedState?(qc(t),t.flags&=-16777217):(M(t),qc(t),Wc(t,o)):(e=e.memoizedProps,e!==r&&M(t),qc(t),Uc(t,a,e,r,n)),null;case 27:if(x(t),n=Ce.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&M(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return qc(t),null}e=xe.current,ta(t)?$i(t,e):(e=Ef(a,r,n),t.stateNode=e,M(t))}return qc(t),null;case 5:if(x(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&M(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return qc(t),null}if(o=xe.current,ta(t))$i(t,o);else{var s=ef(Ce.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[yt]=t,o[bt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Jd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&M(t)}}return qc(t),Uc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&M(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Ce.current,ta(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ki,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[yt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Gd(e.nodeValue,n)),e||Qi(t,!0)}else e=ef(e).createTextNode(r),e[yt]=t,t.stateNode=e}return qc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ta(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[yt]=t}else na(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;qc(t),e=!1}else n=ra(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(wo(t),t):(wo(t),null);if(t.flags&128)throw Error(i(558))}return qc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ta(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[yt]=t}else na(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;qc(t),a=!1}else a=ra(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(wo(t),t):(wo(t),null)}return wo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Gc(t,t.updateQueue),qc(t),null);case 4:return Ee(),e===null&&Fd(t.stateNode.containerInfo),qc(t),null;case 10:return la(t.type),qc(t),null;case 19:if(ye(To),r=t.memoizedState,r===null)return qc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Kc(r,!1);else{if(tu!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Eo(e),o!==null){for(t.flags|=128,Kc(r,!1),e=o.updateQueue,t.updateQueue=e,Gc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)wi(n,e),n=n.sibling;return be(To,To.current&1|2),Ji&&Vi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ze()>fu&&(t.flags|=128,a=!0,Kc(r,!1),t.lanes=4194304)}else{if(!a)if(e=Eo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Gc(t,e),Kc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ji)return qc(t),null}else 2*ze()-r.renderingStartTime>fu&&n!==536870912&&(t.flags|=128,a=!0,Kc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(qc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ze(),e.sibling=null,n=To.current,be(To,a?n&1|2:n&1),Ji&&Vi(t,r.treeForkCount),e);case 22:case 23:return wo(t),_o(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(qc(t),t.subtreeFlags&6&&(t.flags|=8192)):qc(t),n=t.updateQueue,n!==null&&Gc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ye(Ma),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),la(xa),qc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Jc(e,t){switch(Wi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return la(xa),Ee(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return x(t),null;case 31:if(t.memoizedState!==null){if(wo(t),t.alternate===null)throw Error(i(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(wo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ye(To),null;case 4:return Ee(),null;case 10:return la(t.type),null;case 22:case 23:return wo(t),_o(),e!==null&&ye(Ma),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return la(xa),null;case 25:return null;default:return null}}function P(e,t){switch(Wi(t),t.tag){case 3:la(xa),Ee();break;case 26:case 27:case 5:x(t);break;case 4:Ee();break;case 31:t.memoizedState!==null&&wo(t);break;case 13:wo(t);break;case 19:ye(To);break;case 10:la(t.type);break;case 22:case 23:wo(t),_o(),e!==null&&ye(Ma);break;case 24:la(xa)}}function Yc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){nd(t,t.return,e)}}function F(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){nd(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){nd(t,t.return,e)}}function Xc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{fo(t,n)}catch(t){nd(e,e.return,t)}}}function Zc(e,t,n){n.props=cc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){nd(e,t,n)}}function Qc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){nd(e,t,n)}}function I(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){nd(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){nd(e,t,n)}else n.current=null}function $c(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){nd(e,e.return,t)}}function el(e,t,n){try{var r=e.stateNode;Yd(r,e.type,n,t),r[bt]=t}catch(t){nd(e,e.return,t)}}function tl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ff(e.type)||e.tag===4}function nl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||tl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ff(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function rl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=pn));else if(r!==4&&(r===27&&ff(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(rl(e,t,n),e=e.sibling;e!==null;)rl(e,t,n),e=e.sibling}function il(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&ff(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(il(e,t,n),e=e.sibling;e!==null;)il(e,t,n),e=e.sibling}function al(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Jd(t,r,n),t[yt]=e,t[bt]=n}catch(t){nd(e,e.return,t)}}var ol=!1,sl=!1,cl=!1,ll=typeof WeakSet==`function`?WeakSet:Set,ul=null;function dl(e,t){if(e=e.containerInfo,Qd=yp,e=Br(e),Vr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for($d={focusedElem:e,selectionRange:n},yp=!1,ul=t;ul!==null;)if(t=ul,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,ul=e;else for(;ul!==null;){switch(t=ul,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=cc(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){nd(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)hf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:hf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,ul=e;break}ul=t.return}}function fl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Dl(e,n),r&4&&Yc(5,n);break;case 1:if(Dl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){nd(n,n.return,e)}else{var i=cc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){nd(n,n.return,e)}}r&64&&Xc(n),r&512&&Qc(n,n.return);break;case 3:if(Dl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{fo(e,t)}catch(e){nd(n,n.return,e)}}break;case 27:t===null&&r&4&&al(n);case 26:case 5:Dl(e,n),t===null&&r&4&&$c(n),r&512&&Qc(n,n.return);break;case 12:Dl(e,n);break;case 31:Dl(e,n),r&4&&vl(e,n);break;case 13:Dl(e,n),r&4&&yl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=od.bind(null,n),xf(e,n))));break;case 22:if(r=n.memoizedState!==null||ol,!r){t=t!==null&&t.memoizedState!==null||sl,i=ol;var a=sl;ol=r,(sl=t)&&!a?kl(e,n,(n.subtreeFlags&8772)!=0):Dl(e,n),ol=i,sl=a}break;case 30:break;default:Dl(e,n)}}function pl(e){var t=e.alternate;t!==null&&(e.alternate=null,pl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Dt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ml=null,hl=!1;function gl(e,t,n){for(n=n.child;n!==null;)_l(e,t,n),n=n.sibling}function _l(e,t,n){if(Ye&&typeof Ye.onCommitFiberUnmount==`function`)try{Ye.onCommitFiberUnmount(Je,n)}catch{}switch(n.tag){case 26:sl||I(n,t),gl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:sl||I(n,t);var r=ml,i=hl;ff(n.type)&&(ml=n.stateNode,hl=!1),gl(e,t,n),Df(n.stateNode),ml=r,hl=i;break;case 5:sl||I(n,t);case 6:if(r=ml,i=hl,ml=null,gl(e,t,n),ml=r,hl=i,ml!==null)if(hl)try{(ml.nodeType===9?ml.body:ml.nodeName===`HTML`?ml.ownerDocument.body:ml).removeChild(n.stateNode)}catch(e){nd(n,t,e)}else try{ml.removeChild(n.stateNode)}catch(e){nd(n,t,e)}break;case 18:ml!==null&&(hl?(e=ml,pf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Gp(e)):pf(ml,n.stateNode));break;case 4:r=ml,i=hl,ml=n.stateNode.containerInfo,hl=!0,gl(e,t,n),ml=r,hl=i;break;case 0:case 11:case 14:case 15:F(2,n,t),sl||F(4,n,t),gl(e,t,n);break;case 1:sl||(I(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Zc(n,t,r)),gl(e,t,n);break;case 21:gl(e,t,n);break;case 22:sl=(r=sl)||n.memoizedState!==null,gl(e,t,n),sl=r;break;default:gl(e,t,n)}}function vl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Gp(e)}catch(e){nd(t,t.return,e)}}}function yl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Gp(e)}catch(e){nd(t,t.return,e)}}function bl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ll),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ll),t;default:throw Error(i(435,e.tag))}}function xl(e,t){var n=bl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=sd.bind(null,e,t);t.then(r,r)}})}function Sl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(ff(c.type)){ml=c.stateNode,hl=!1;break a}break;case 5:ml=c.stateNode,hl=!1;break a;case 3:case 4:ml=c.stateNode.containerInfo,hl=!0;break a}c=c.return}if(ml===null)throw Error(i(160));_l(o,s,a),ml=null,hl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)wl(t,e),t=t.sibling}var Cl=null;function wl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Sl(t,e),Tl(e),r&4&&(F(3,e,e.return),Yc(3,e),F(5,e,e.return));break;case 1:Sl(t,e),Tl(e),r&512&&(sl||n===null||I(n,n.return)),r&64&&ol&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=Cl;if(Sl(t,e),Tl(e),r&512&&(sl||n===null||I(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[Et]||o[yt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Jd(o,r,n),o[yt]=e,Mt(o),r=o;break a;case`link`:var s=tp(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Jd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=tp(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Jd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[yt]=e,Mt(o),r=o}e.stateNode=r}else np(a,e.type,e.stateNode);else e.stateNode=Xf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&el(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?np(a,e.type,e.stateNode):Xf(a,r,e.memoizedProps))}break;case 27:Sl(t,e),Tl(e),r&512&&(sl||n===null||I(n,n.return)),n!==null&&r&4&&el(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Sl(t,e),Tl(e),r&512&&(sl||n===null||I(n,n.return)),e.flags&32){a=e.stateNode;try{an(a,``)}catch(t){nd(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,el(e,a,n===null?a:n.memoizedProps)),r&1024&&(cl=!0);break;case 6:if(Sl(t,e),Tl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){nd(e,e.return,t)}}break;case 3:if(ep=null,a=Cl,Cl=Af(t.containerInfo),Sl(t,e),Cl=a,Tl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Gp(t.containerInfo)}catch(t){nd(e,e.return,t)}cl&&(cl=!1,El(e));break;case 4:r=Cl,Cl=Af(e.stateNode.containerInfo),Sl(t,e),Tl(e),Cl=r;break;case 12:Sl(t,e),Tl(e);break;case 31:Sl(t,e),Tl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,xl(e,r)));break;case 13:Sl(t,e),Tl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(uu=ze()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,xl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=ol,d=sl;if(ol=u||a,sl=d||l,Sl(t,e),sl=d,ol=u,Tl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||ol||sl||Ol(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){nd(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){nd(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?mf(m,!0):mf(l.stateNode,!1)}catch(e){nd(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,xl(e,n))));break;case 19:Sl(t,e),Tl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,xl(e,r)));break;case 30:break;case 21:break;default:Sl(t,e),Tl(e)}}function Tl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(tl(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;il(e,nl(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(an(o,``),n.flags&=-33),il(e,nl(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;rl(e,nl(e),s);break;default:throw Error(i(161))}}catch(t){nd(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function El(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;El(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Dl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)fl(e,t.alternate,t),t=t.sibling}function Ol(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:F(4,t,t.return),Ol(t);break;case 1:I(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Zc(t,t.return,n),Ol(t);break;case 27:Df(t.stateNode);case 26:case 5:I(t,t.return),Ol(t);break;case 22:t.memoizedState===null&&Ol(t);break;case 30:Ol(t);break;default:Ol(t)}e=e.sibling}}function kl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:kl(i,a,n),Yc(4,a);break;case 1:if(kl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){nd(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)uo(c[i],s)}catch(e){nd(r,r.return,e)}}n&&o&64&&Xc(a),Qc(a,a.return);break;case 27:al(a);case 26:case 5:kl(i,a,n),n&&r===null&&o&4&&$c(a),Qc(a,a.return);break;case 12:kl(i,a,n);break;case 31:kl(i,a,n),n&&o&4&&vl(i,a);break;case 13:kl(i,a,n),n&&o&4&&yl(i,a);break;case 22:a.memoizedState===null&&kl(i,a,n),Qc(a,a.return);break;case 30:break;default:kl(i,a,n)}t=t.sibling}}function Al(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Ca(n))}function jl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ca(e))}function Ml(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Nl(e,t,n,r),t=t.sibling}function Nl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Ml(e,t,n,r),i&2048&&Yc(9,t);break;case 1:Ml(e,t,n,r);break;case 3:Ml(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ca(e)));break;case 12:if(i&2048){Ml(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){nd(t,t.return,e)}}else Ml(e,t,n,r);break;case 31:Ml(e,t,n,r);break;case 13:Ml(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Ml(e,t,n,r):(a._visibility|=2,Pl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Ml(e,t,n,r):Fl(e,t),i&2048&&Al(o,t);break;case 24:Ml(e,t,n,r),i&2048&&jl(t.alternate,t);break;default:Ml(e,t,n,r)}}function Pl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Pl(a,o,s,c,i),Yc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Pl(a,o,s,c,i)):u._visibility&2?Pl(a,o,s,c,i):Fl(a,o),i&&l&2048&&Al(o.alternate,o);break;case 24:Pl(a,o,s,c,i),i&&l&2048&&jl(o.alternate,o);break;default:Pl(a,o,s,c,i)}t=t.sibling}}function Fl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Fl(n,r),i&2048&&Al(r.alternate,r);break;case 24:Fl(n,r),i&2048&&jl(r.alternate,r);break;default:Fl(n,r)}t=t.sibling}}var Il=8192;function Ll(e,t,n){if(e.subtreeFlags&Il)for(e=e.child;e!==null;)Rl(e,t,n),e=e.sibling}function Rl(e,t,n){switch(e.tag){case 26:Ll(e,t,n),e.flags&Il&&e.memoizedState!==null&&z(n,Cl,e.memoizedState,e.memoizedProps);break;case 5:Ll(e,t,n);break;case 3:case 4:var r=Cl;Cl=Af(e.stateNode.containerInfo),Ll(e,t,n),Cl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Il,Il=16777216,Ll(e,t,n),Il=r):Ll(e,t,n));break;default:Ll(e,t,n)}}function zl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Bl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ul=r,Ul(r,e)}zl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Vl(e),e=e.sibling}function Vl(e){switch(e.tag){case 0:case 11:case 15:Bl(e),e.flags&2048&&F(9,e,e.return);break;case 3:Bl(e);break;case 12:Bl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Hl(e)):Bl(e);break;default:Bl(e)}}function Hl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ul=r,Ul(r,e)}zl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:F(8,t,t.return),Hl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Hl(t));break;default:Hl(t)}e=e.sibling}}function Ul(e,t){for(;ul!==null;){var n=ul;switch(n.tag){case 0:case 11:case 15:F(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Ca(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ul=r;else a:for(n=e;ul!==null;){r=ul;var i=r.sibling,a=r.return;if(pl(r),r===n){ul=null;break a}if(i!==null){i.return=a,ul=i;break a}ul=a}}}var Wl={getCacheForType:function(e){var t=ha(xa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ha(xa).controller.signal}},Gl=typeof WeakMap==`function`?WeakMap:Map,Kl=0,ql=null,Jl=null,L=0,Yl=0,Xl=null,Zl=!1,Ql=!1,$l=!1,eu=0,tu=0,nu=0,ru=0,iu=0,au=0,ou=0,su=null,cu=null,lu=!1,uu=0,du=0,fu=1/0,pu=null,mu=null,hu=0,gu=null,_u=null,vu=0,yu=0,bu=null,xu=null,Su=0,Cu=null;function wu(){return Kl&2&&L!==0?L&-L:b.T===null?gt():Cd()}function Tu(){if(au===0)if(!(L&536870912)||Ji){var e=nt;nt<<=1,!(nt&3932160)&&(nt=262144),au=e}else au=536870912;return e=vo.current,e!==null&&(e.flags|=32),au}function Eu(e,t,n){(e===ql&&(Yl===2||Yl===9)||e.cancelPendingCommit!==null)&&(Nu(e,0),Au(e,L,au,!1)),ut(e,n),(!(Kl&2)||e!==ql)&&(e===ql&&(!(Kl&2)&&(ru|=n),tu===4&&Au(e,L,au,!1)),hd(e))}function Du(e,t,n){if(Kl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||ot(e,t),a=r?Vu(e,t):zu(e,t,!0),o=r;do{if(a===0){Ql&&!r&&Au(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!ku(n)){a=zu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=su;var l=c.current.memoizedState.isDehydrated;if(l&&(Nu(c,s).flags|=256),s=zu(c,s,!1),s!==2){if($l&&!l){c.errorRecoveryDisabledLanes|=o,ru|=o,a=4;break a}o=cu,cu=a,o!==null&&(cu===null?cu=o:cu.push.apply(cu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Nu(e,0),Au(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Au(r,t,au,!Zl);break a;case 2:cu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=uu+300-ze(),10<a)){if(Au(r,t,au,!Zl),at(r,0,!0)!==0)break a;vu=t,r.timeoutHandle=sf(Ou.bind(null,r,n,cu,pu,lu,t,au,ru,ou,Zl,o,`Throttled`,-0,0),a);break a}Ou(r,n,cu,pu,lu,t,au,ru,ou,Zl,o,null,-0,0)}}break}while(1);hd(e)}function Ou(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:pn},Rl(t,a,d);var m=(a&62914560)===a?uu-ze():(a&4194048)===a?du-ze():0;if(m=ap(d,m),m!==null){vu=a,e.cancelPendingCommit=m(Ju.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Au(e,a,o,!l);return}}Ju(e,t,a,n,r,i,o,s,c)}function ku(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Fr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Au(e,t,n,r){t&=~iu,t&=~ru,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ze(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ft(e,n,t)}function ju(){return Kl&6?!0:(gd(0,!1),!1)}function Mu(){if(Jl!==null){if(Yl===0)var e=Jl.return;else e=Jl,sa=oa=null,Go(e),Ka=null,qa=0,e=Jl;for(;e!==null;)P(e.alternate,e),e=e.return;Jl=null}}function Nu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,cf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),vu=0,Mu(),ql=e,Jl=n=Ci(e.current,null),L=t,Yl=0,Xl=null,Zl=!1,Ql=ot(e,t),$l=!1,ou=au=iu=ru=nu=tu=0,cu=su=null,lu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ze(r),a=1<<i;t|=e[i],r&=~a}return eu=t,pi(),n}function Pu(e,t){w=null,b.H=T,t===Ia||t===Ra?(t=Wa(),Yl=3):t===La?(t=Wa(),Yl=4):Yl=t===vc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Xl=t,Jl===null&&(tu=1,fc(e,ji(t,e.current)))}function Fu(){var e=vo.current;return e===null?!0:(L&4194048)===L?yo===null:(L&62914560)===L||L&536870912?e===yo:!1}function Iu(){var e=b.H;return b.H=T,e===null?T:e}function Lu(){var e=b.A;return b.A=Wl,e}function Ru(){tu=4,Zl||(L&4194048)!==L&&vo.current!==null||(Ql=!0),!(nu&134217727)&&!(ru&134217727)||ql===null||Au(ql,L,au,!1)}function zu(e,t,n){var r=Kl;Kl|=2;var i=Iu(),a=Lu();(ql!==e||L!==t)&&(pu=null,Nu(e,t)),t=!1;var o=tu;a:do try{if(Yl!==0&&Jl!==null){var s=Jl,c=Xl;switch(Yl){case 8:Mu(),o=6;break a;case 3:case 2:case 9:case 6:vo.current===null&&(t=!0);var l=Yl;if(Yl=0,Xl=null,Gu(e,s,c,l),n&&Ql){o=0;break a}break;default:l=Yl,Yl=0,Xl=null,Gu(e,s,c,l)}}Bu(),o=tu;break}catch(t){Pu(e,t)}while(1);return t&&e.shellSuspendCounter++,sa=oa=null,Kl=r,b.H=i,b.A=a,Jl===null&&(ql=null,L=0,pi()),o}function Bu(){for(;Jl!==null;)Uu(Jl)}function Vu(e,t){var n=Kl;Kl|=2;var r=Iu(),a=Lu();ql!==e||L!==t?(pu=null,fu=ze()+500,Nu(e,t)):Ql=ot(e,t);a:do try{if(Yl!==0&&Jl!==null){t=Jl;var o=Xl;b:switch(Yl){case 1:Yl=0,Xl=null,Gu(e,t,o,1);break;case 2:case 9:if(Ba(o)){Yl=0,Xl=null,Wu(t);break}t=function(){Yl!==2&&Yl!==9||ql!==e||(Yl=7),hd(e)},o.then(t,t);break a;case 3:Yl=7;break a;case 4:Yl=5;break a;case 7:Ba(o)?(Yl=0,Xl=null,Wu(t)):(Yl=0,Xl=null,Gu(e,t,o,7));break;case 5:var s=null;switch(Jl.tag){case 26:s=Jl.memoizedState;case 5:case 27:var c=Jl;if(s?R(s):c.stateNode.complete){Yl=0,Xl=null;var l=c.sibling;if(l!==null)Jl=l;else{var u=c.return;u===null?Jl=null:(Jl=u,Ku(u))}break b}}Yl=0,Xl=null,Gu(e,t,o,5);break;case 6:Yl=0,Xl=null,Gu(e,t,o,6);break;case 8:Mu(),tu=6;break a;default:throw Error(i(462))}}Hu();break}catch(t){Pu(e,t)}while(1);return sa=oa=null,b.H=r,b.A=a,Kl=n,Jl===null?(ql=null,L=0,pi(),tu):0}function Hu(){for(;Jl!==null&&!Le();)Uu(Jl)}function Uu(e){var t=Hc(e.alternate,e,eu);e.memoizedProps=e.pendingProps,t===null?Ku(e):Jl=t}function Wu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=D(n,t,t.pendingProps,t.type,void 0,L);break;case 11:t=D(n,t,t.pendingProps,t.type.render,t.ref,L);break;case 5:Go(t);default:P(n,t),t=Jl=wi(t,eu),t=Hc(n,t,eu)}e.memoizedProps=e.pendingProps,t===null?Ku(e):Jl=t}function Gu(e,t,n,r){sa=oa=null,Go(t),Ka=null,qa=0;var i=t.return;try{if(_c(e,i,t,n,L)){tu=1,fc(e,ji(n,e.current)),Jl=null;return}}catch(t){if(i!==null)throw Jl=i,t;tu=1,fc(e,ji(n,e.current)),Jl=null;return}t.flags&32768?(Ji||r===1?e=!0:Ql||L&536870912?e=!1:(Zl=e=!0,(r===2||r===9||r===3||r===6)&&(r=vo.current,r!==null&&r.tag===13&&(r.flags|=16384))),qu(t,e)):Ku(t)}function Ku(e){var t=e;do{if(t.flags&32768){qu(t,Zl);return}e=t.return;var n=N(t.alternate,t,eu);if(n!==null){Jl=n;return}if(t=t.sibling,t!==null){Jl=t;return}Jl=t=e}while(t!==null);tu===0&&(tu=5)}function qu(e,t){do{var n=Jc(e.alternate,e);if(n!==null){n.flags&=32767,Jl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Jl=e;return}Jl=e=n}while(e!==null);tu=6,Jl=null}function Ju(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do $u();while(hu!==0);if(Kl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=fi,dt(e,n,o,s,c,l),e===ql&&(Jl=ql=null,L=0),_u=t,gu=e,vu=n,yu=o,bu=a,xu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,cd(Ue,function(){return ed(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=b.T,b.T=null,a=me.p,me.p=2,s=Kl,Kl|=4;try{dl(e,t,n)}finally{Kl=s,me.p=a,b.T=r}}hu=1,Yu(),Xu(),Zu()}}function Yu(){if(hu===1){hu=0;var e=gu,t=_u,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=b.T,b.T=null;var r=me.p;me.p=2;var i=Kl;Kl|=4;try{wl(t,e);var a=$d,o=Br(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&zr(s.ownerDocument.documentElement,s)){if(c!==null&&Vr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Rr(s,h),v=Rr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var ee=d[s];ee.element.scrollLeft=ee.left,ee.element.scrollTop=ee.top}}yp=!!Qd,$d=Qd=null}finally{Kl=i,me.p=r,b.T=n}}e.current=t,hu=2}}function Xu(){if(hu===2){hu=0;var e=gu,t=_u,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=b.T,b.T=null;var r=me.p;me.p=2;var i=Kl;Kl|=4;try{fl(e,t.alternate,t)}finally{Kl=i,me.p=r,b.T=n}}hu=3}}function Zu(){if(hu===4||hu===3){hu=0,Re();var e=gu,t=_u,n=vu,r=xu;t.subtreeFlags&10256||t.flags&10256?hu=5:(hu=0,_u=gu=null,Qu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(mu=null),C(n),t=t.stateNode,Ye&&typeof Ye.onCommitFiberRoot==`function`)try{Ye.onCommitFiberRoot(Je,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=b.T,i=me.p,me.p=2,b.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{b.T=t,me.p=i}}vu&3&&$u(),hd(e),i=e.pendingLanes,n&261930&&i&42?e===Cu?Su++:(Su=0,Cu=e):Su=0,gd(0,!1)}}function Qu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ca(t)))}function $u(){return Yu(),Xu(),Zu(),ed()}function ed(){if(hu!==5)return!1;var e=gu,t=yu;yu=0;var n=C(vu),r=b.T,a=me.p;try{me.p=32>n?32:n,b.T=null,n=bu,bu=null;var o=gu,s=vu;if(hu=0,_u=gu=null,vu=0,Kl&6)throw Error(i(331));var c=Kl;if(Kl|=4,Vl(o.current),Nl(o,o.current,s,n),Kl=c,gd(0,!1),Ye&&typeof Ye.onPostCommitFiberRoot==`function`)try{Ye.onPostCommitFiberRoot(Je,o)}catch{}return!0}finally{me.p=a,b.T=r,Qu(e,t)}}function td(e,t,n){t=ji(n,t),t=mc(e.stateNode,t,2),e=io(e,t,2),e!==null&&(ut(e,2),hd(e))}function nd(e,t,n){if(e.tag===3)td(e,e,n);else for(;t!==null;){if(t.tag===3){td(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(mu===null||!mu.has(r))){e=ji(n,e),n=hc(2),r=io(t,n,2),r!==null&&(gc(n,r,t,e),ut(r,2),hd(r));break}}t=t.return}}function rd(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Gl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||($l=!0,i.add(n),e=id.bind(null,e,t,n),t.then(e,e))}function id(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ql===e&&(L&n)===n&&(tu===4||tu===3&&(L&62914560)===L&&300>ze()-uu?!(Kl&2)&&Nu(e,0):iu|=n,ou===L&&(ou=0)),hd(e)}function ad(e,t){t===0&&(t=ct()),e=gi(e,t),e!==null&&(ut(e,t),hd(e))}function od(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ad(e,n)}function sd(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),ad(e,n)}function cd(e,t){return Fe(e,t)}var ld=null,ud=null,dd=!1,fd=!1,pd=!1,md=0;function hd(e){e!==ud&&e.next===null&&(ud===null?ld=ud=e:ud=ud.next=e),fd=!0,dd||(dd=!0,Sd())}function gd(e,t){if(!pd&&fd){pd=!0;do for(var n=!1,r=ld;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ze(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,xd(r,a))}else a=L,a=at(r,r===ql?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ot(r,a)||(n=!0,xd(r,a));r=r.next}while(n);pd=!1}}function _d(){vd()}function vd(){fd=dd=!1;var e=0;md!==0&&of()&&(e=md);for(var t=ze(),n=null,r=ld;r!==null;){var i=r.next,a=yd(r,t);a===0?(r.next=null,n===null?ld=i:n.next=i,i===null&&(ud=n)):(n=r,(e!==0||a&3)&&(fd=!0)),r=i}hu!==0&&hu!==5||gd(e,!1),md!==0&&(md=0)}function yd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ze(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=st(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=ql,n=L,n=at(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Yl===2||Yl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ie(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ot(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ie(r),C(n)){case 2:case 8:n=He;break;case 32:n=Ue;break;case 268435456:n=Ge;break;default:n=Ue}return r=bd.bind(null,e),n=Fe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ie(r),e.callbackPriority=2,e.callbackNode=null,2}function bd(e,t){if(hu!==0&&hu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if($u()&&e.callbackNode!==n)return null;var r=L;return r=at(e,e===ql?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Du(e,r,t),yd(e,ze()),e.callbackNode!=null&&e.callbackNode===n?bd.bind(null,e):null)}function xd(e,t){if($u())return null;Du(e,t,!0)}function Sd(){uf(function(){Kl&6?Fe(Ve,_d):vd()})}function Cd(){if(md===0){var e=Ea;e===0&&(e=tt,tt<<=1,!(tt&261888)&&(tt=256)),md=e}return md}function wd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:fn(``+e)}function Td(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Ed(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=wd((i[bt]||null).action),o=r.submitter;o&&(t=(t=o[bt]||null)?wd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Pn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(md!==0){var e=o?Td(i,o):new FormData(i);Vs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?Td(i,o):new FormData(i),Vs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Dd=0;Dd<si.length;Dd++){var Od=si[Dd];ci(Od.toLowerCase(),`on`+(Od[0].toUpperCase()+Od.slice(1)))}ci($r,`onAnimationEnd`),ci(ei,`onAnimationIteration`),ci(ti,`onAnimationStart`),ci(`dblclick`,`onDoubleClick`),ci(`focusin`,`onFocus`),ci(`focusout`,`onBlur`),ci(ni,`onTransitionRun`),ci(ri,`onTransitionStart`),ci(ii,`onTransitionCancel`),ci(ai,`onTransitionEnd`),It(`onMouseEnter`,[`mouseout`,`mouseover`]),It(`onMouseLeave`,[`mouseout`,`mouseover`]),It(`onPointerEnter`,[`pointerout`,`pointerover`]),It(`onPointerLeave`,[`pointerout`,`pointerover`]),Ft(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ft(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ft(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ft(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ft(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ft(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var kd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Ad=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(kd));function jd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){li(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){li(e)}i.currentTarget=null,a=c}}}}function Md(e,t){var n=t[St];n===void 0&&(n=t[St]=new Set);var r=e+`__bubble`;n.has(r)||(Id(t,e,2,!1),n.add(r))}function Nd(e,t,n){var r=0;t&&(r|=4),Id(n,e,r,t)}var Pd=`_reactListening`+Math.random().toString(36).slice(2);function Fd(e){if(!e[Pd]){e[Pd]=!0,Nt.forEach(function(t){t!==`selectionchange`&&(Ad.has(t)||Nd(t,!1,e),Nd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Pd]||(t[Pd]=!0,Nd(`selectionchange`,!1,t))}}function Id(e,t,n,r){switch(Ep(t)){case 2:var i=bp;break;case 8:i=xp;break;default:i=Sp}n=i.bind(null,t,n,e),i=void 0,!Cn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Ld(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=Ot(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}bn(function(){var r=a,i=hn(n),s=[];a:{var c=oi.get(e);if(c!==void 0){var l=Pn,u=e;switch(e){case`keypress`:if(kn(n)===0)break a;case`keydown`:case`keyup`:l=Qn;break;case`focusin`:u=`focus`,l=Un;break;case`focusout`:u=`blur`,l=Un;break;case`beforeblur`:case`afterblur`:l=Un;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Vn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Hn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=er;break;case $r:case ei:case ti:l=Wn;break;case ai:l=tr;break;case`scroll`:case`scrollend`:l=In;break;case`wheel`:l=nr;break;case`copy`:case`cut`:case`paste`:l=Gn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=$n;break;case`toggle`:case`beforetoggle`:l=rr}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=xn(m,p),g!=null&&d.push(Rd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==mn&&(u=n.relatedTarget||n.fromElement)&&(Ot(u)||u[xt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?Ot(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Vn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=$n,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:At(l),h=u==null?c:At(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,Ot(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Bd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Vd(s,c,l,d,!1),u!==null&&f!==null&&Vd(s,f,u,d,!0)}}a:{if(c=r?At(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=Cr;else if(_r(c))if(wr)v=Nr;else{v=jr;var y=Ar}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&ln(r.elementType)&&(v=Cr):v=Mr;if(v&&=v(e,r)){vr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&en(c,`number`,c.value)}switch(y=r?At(r):window,e){case`focusin`:(_r(y)||y.contentEditable===`true`)&&(Ur=y,Wr=r,Gr=null);break;case`focusout`:Gr=Wr=Ur=null;break;case`mousedown`:Kr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Kr=!1,qr(s,n,i);break;case`selectionchange`:if(Hr)break;case`keydown`:case`keyup`:qr(s,n,i)}var ee;if(ar)b:{switch(e){case`compositionstart`:var te=`onCompositionStart`;break b;case`compositionend`:te=`onCompositionEnd`;break b;case`compositionupdate`:te=`onCompositionUpdate`;break b}te=void 0}else pr?dr(e,n)&&(te=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(te=`onCompositionStart`);te&&(cr&&n.locale!==`ko`&&(pr||te!==`onCompositionStart`?te===`onCompositionEnd`&&pr&&(ee=On()):(Tn=i,En=`value`in Tn?Tn.value:Tn.textContent,pr=!0)),y=zd(r,te),0<y.length&&(te=new Kn(te,e,null,n,i),s.push({event:te,listeners:y}),ee?te.data=ee:(ee=fr(n),ee!==null&&(te.data=ee)))),(ee=sr?mr(e,n):hr(e,n))&&(te=zd(r,`onBeforeInput`),0<te.length&&(y=new Kn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:te}),y.data=ee)),Ed(s,e,r,n,i)}jd(s,t)})}function Rd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function zd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=xn(e,n),i!=null&&r.unshift(Rd(e,i,a)),i=xn(e,t),i!=null&&r.push(Rd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Bd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Vd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=xn(n,a),l!=null&&o.unshift(Rd(n,l,c))):i||(l=xn(n,a),l!=null&&o.push(Rd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Hd=/\\r\\n?/g,Ud=/\\u0000|\\uFFFD/g;function Wd(e){return(typeof e==`string`?e:``+e).replace(Hd,`\n`).replace(Ud,``)}function Gd(e,t){return t=Wd(t),Wd(e)===t}function Kd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||an(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&an(e,``+r);break;case`className`:Ht(e,`class`,r);break;case`tabIndex`:Ht(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ht(e,n,r);break;case`style`:cn(e,r,o);break;case`data`:if(t!==`object`){Ht(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=fn(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error(\'A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\\\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().\')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Kd(e,t,`name`,a.name,a,null),Kd(e,t,`formEncType`,a.formEncType,a,null),Kd(e,t,`formMethod`,a.formMethod,a,null),Kd(e,t,`formTarget`,a.formTarget,a,null)):(Kd(e,t,`encType`,a.encType,a,null),Kd(e,t,`method`,a.method,a,null),Kd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=fn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=pn);break;case`onScroll`:r!=null&&Md(`scroll`,e);break;case`onScrollEnd`:r!=null&&Md(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=fn(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Md(`beforetoggle`,e),Md(`toggle`,e),Vt(e,`popover`,r);break;case`xlinkActuate`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ut(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ut(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ut(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Vt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=un.get(n)||n,Vt(e,n,r))}}function qd(e,t,n,r,a,o){switch(n){case`style`:cn(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?an(e,r):(typeof r==`number`||typeof r==`bigint`)&&an(e,``+r);break;case`onScroll`:r!=null&&Md(`scroll`,e);break;case`onScrollEnd`:r!=null&&Md(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=pn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Pt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[bt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Vt(e,n,r)}}}function Jd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Md(`error`,e),Md(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Kd(e,t,o,s,n,null)}}a&&Kd(e,t,`srcSet`,n.srcSet,n,null),r&&Kd(e,t,`src`,n.src,n,null);return;case`input`:Md(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Kd(e,t,r,d,n,null)}}$t(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Md(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Kd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&tn(e,!!r,n,!0):tn(e,!!r,t,!1);return;case`textarea`:for(s in Md(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Kd(e,t,s,c,n,null)}rn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Kd(e,t,l,r,n,null)}return;case`dialog`:Md(`beforetoggle`,e),Md(`toggle`,e),Md(`cancel`,e),Md(`close`,e);break;case`iframe`:case`object`:Md(`load`,e);break;case`video`:case`audio`:for(r=0;r<kd.length;r++)Md(kd[r],e);break;case`image`:Md(`error`,e),Md(`load`,e);break;case`details`:Md(`toggle`,e);break;case`embed`:case`source`:case`link`:Md(`error`,e),Md(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Kd(e,t,u,r,n,null)}return;default:if(ln(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&qd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Kd(e,t,c,r,n,null))}function Yd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Kd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Kd(e,t,p,m,r,f)}}Qt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Kd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Kd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?tn(e,!!n,n?[]:``,!1):tn(e,!!n,t,!0)):tn(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Kd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Kd(e,t,s,a,r,o)}nn(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Kd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Kd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Kd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Kd(e,t,u,p,r,m)}return;default:if(ln(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&qd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||qd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Kd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Kd(e,t,f,p,r,m)}function Xd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Zd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Xd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Xd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Qd=null,$d=null;function ef(e){return e.nodeType===9?e:e.ownerDocument}function tf(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function nf(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function rf(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var af=null;function of(){var e=window.event;return e&&e.type===`popstate`?e===af?!1:(af=e,!0):(af=null,!1)}var sf=typeof setTimeout==`function`?setTimeout:void 0,cf=typeof clearTimeout==`function`?clearTimeout:void 0,lf=typeof Promise==`function`?Promise:void 0,uf=typeof queueMicrotask==`function`?queueMicrotask:lf===void 0?sf:function(e){return lf.resolve(null).then(e).catch(df)};function df(e){setTimeout(function(){throw e})}function ff(e){return e===`head`}function pf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Gp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Df(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Df(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Et]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Df(e.ownerDocument.body);n=i}while(n);Gp(t)}function mf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function hf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:hf(n),Dt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function gf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[Et])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=Sf(e.nextSibling),e===null)break}return null}function _f(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=Sf(e.nextSibling),e===null))return null;return e}function vf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=Sf(e.nextSibling),e===null))return null;return e}function yf(e){return e.data===`$?`||e.data===`$~`}function bf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function xf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function Sf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var Cf=null;function wf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return Sf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function Tf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function Ef(e,t,n){switch(t=ef(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Df(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Dt(e)}var Of=new Map,kf=new Set;function Af(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var jf=me.d;me.d={f:Mf,r:Nf,D:If,C:Lf,L:Rf,m:zf,X:Vf,S:Bf,M:Hf};function Mf(){var e=jf.f(),t=ju();return e||t}function Nf(e){var t=kt(e);t!==null&&t.tag===5&&t.type===`form`?Us(t):jf.r(e)}var Pf=typeof document>`u`?null:document;function Ff(e,t,n){var r=Pf;if(r&&typeof t==`string`&&t){var i=Zt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),kf.has(i)||(kf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Jd(t,`link`,e),Mt(t),r.head.appendChild(t)))}}function If(e){jf.D(e),Ff(`dns-prefetch`,e,null)}function Lf(e,t){jf.C(e,t),Ff(`preconnect`,e,t)}function Rf(e,t,n){jf.L(e,t,n);var r=Pf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Zt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Zt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Zt(n.imageSizes)+`"]`)):i+=`[href="`+Zt(e)+`"]`;var a=i;switch(t){case`style`:a=Wf(e);break;case`script`:a=Jf(e)}Of.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Of.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Gf(a))||t===`script`&&r.querySelector(Yf(a))||(t=r.createElement(`link`),Jd(t,`link`,e),Mt(t),r.head.appendChild(t)))}}function zf(e,t){jf.m(e,t);var n=Pf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Zt(r)+`"][href="`+Zt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Jf(e)}if(!Of.has(a)&&(e=p({rel:`modulepreload`,href:e},t),Of.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Yf(a)))return}r=n.createElement(`link`),Jd(r,`link`,e),Mt(r),n.head.appendChild(r)}}}function Bf(e,t,n){jf.S(e,t,n);var r=Pf;if(r&&e){var i=jt(r).hoistableStyles,a=Wf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Gf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Of.get(a))&&Qf(e,n);var c=o=r.createElement(`link`);Mt(c),Jd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Zf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Vf(e,t){jf.X(e,t);var n=Pf;if(n&&e){var r=jt(n).hoistableScripts,i=Jf(e),a=r.get(i);a||(a=n.querySelector(Yf(i)),a||(e=p({src:e,async:!0},t),(t=Of.get(i))&&$f(e,t),a=n.createElement(`script`),Mt(a),Jd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Hf(e,t){jf.M(e,t);var n=Pf;if(n&&e){var r=jt(n).hoistableScripts,i=Jf(e),a=r.get(i);a||(a=n.querySelector(Yf(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=Of.get(i))&&$f(e,t),a=n.createElement(`script`),Mt(a),Jd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Uf(e,t,n,r){var a=(a=Ce.current)?Af(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Wf(n.href),n=jt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Wf(n.href);var o=jt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Gf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Of.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Of.set(e,n),o||qf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Jf(n),n=jt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Wf(e){return`href="`+Zt(e)+`"`}function Gf(e){return`link[rel="stylesheet"][`+e+`]`}function Kf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function qf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Jd(t,`link`,n),Mt(t),e.head.appendChild(t))}function Jf(e){return`[src="`+Zt(e)+`"]`}function Yf(e){return`script[async]`+e}function Xf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Zt(n.href)+`"]`);if(r)return t.instance=r,Mt(r),r;var a=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Mt(r),Jd(r,`style`,a),Zf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Wf(n.href);var o=e.querySelector(Gf(a));if(o)return t.state.loading|=4,t.instance=o,Mt(o),o;r=Kf(n),(a=Of.get(a))&&Qf(r,a),o=(e.ownerDocument||e).createElement(`link`),Mt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Jd(o,`link`,r),t.state.loading|=4,Zf(o,n.precedence,e),t.instance=o;case`script`:return o=Jf(n.src),(a=e.querySelector(Yf(o)))?(t.instance=a,Mt(a),a):(r=n,(a=Of.get(o))&&(r=p({},n),$f(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Mt(a),Jd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Zf(r,n.precedence,e));return t.instance}function Zf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Qf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function $f(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var ep=null;function tp(e,t,n){if(ep===null){var r=new Map,i=ep=new Map;i.set(n,r)}else i=ep,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Et]||a[yt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function np(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function rp(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function R(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function z(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Wf(r.href),a=t.querySelector(Gf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=op.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Mt(a);return}a=t.ownerDocument||t,r=Kf(r),(i=Of.get(i))&&Qf(r,i),a=a.createElement(`link`),Mt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Jd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=op.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var ip=0;function ap(e,t){return e.stylesheets&&e.count===0&&cp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&cp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&ip===0&&(ip=62500*Zd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&cp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>ip?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function op(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)cp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var sp=null;function cp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,sp=new Map,t.forEach(lp,e),sp=null,op.call(e))}function lp(e,t){if(!(t.state.loading&4)){var n=sp.get(e);if(n)var r=n.get(null);else{n=new Map,sp.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=op.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var up={$$typeof:te,Provider:null,Consumer:null,_currentValue:he,_currentValue2:he,_threadCount:0};function dp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=lt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lt(0),this.hiddenUpdates=lt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function fp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new dp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=xi(3,null,null,t),e.current=a,a.stateNode=e,t=Sa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},to(a),e}function pp(e){return e?(e=yi,e):yi}function mp(e,t,n,r,i,a){i=pp(i),r.context===null?r.context=i:r.pendingContext=i,r=ro(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=io(e,r,t),n!==null&&(Eu(n,e,t),ao(n,e,t))}function hp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function gp(e,t){hp(e,t),(e=e.alternate)&&hp(e,t)}function _p(e){if(e.tag===13||e.tag===31){var t=gi(e,67108864);t!==null&&Eu(t,e,67108864),gp(e,67108864)}}function vp(e){if(e.tag===13||e.tag===31){var t=wu();t=ht(t);var n=gi(e,t);n!==null&&Eu(n,e,t),gp(e,t)}}var yp=!0;function bp(e,t,n,r){var i=b.T;b.T=null;var a=me.p;try{me.p=2,Sp(e,t,n,r)}finally{me.p=a,b.T=i}}function xp(e,t,n,r){var i=b.T;b.T=null;var a=me.p;try{me.p=8,Sp(e,t,n,r)}finally{me.p=a,b.T=i}}function Sp(e,t,n,r){if(yp){var i=Cp(r);if(i===null)Ld(e,t,r,wp,n),Fp(e,r);else if(Lp(i,e,t,n,r))r.stopPropagation();else if(Fp(e,r),t&4&&-1<Pp.indexOf(e)){for(;i!==null;){var a=kt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=it(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ze(o);s.entanglements[1]|=c,o&=~c}hd(a),!(Kl&6)&&(fu=ze()+500,gd(0,!1))}}break;case 31:case 13:s=gi(a,2),s!==null&&Eu(s,a,2),ju(),gp(a,2)}if(a=Cp(r),a===null&&Ld(e,t,r,wp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Ld(e,t,r,null,n)}}function Cp(e){return e=hn(e),Tp(e)}var wp=null;function Tp(e){if(wp=null,e=Ot(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return wp=e,null}function Ep(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Be()){case Ve:return 2;case He:return 8;case Ue:case We:return 32;case Ge:return 268435456;default:return 32}default:return 32}}var Dp=!1,Op=null,kp=null,Ap=null,jp=new Map,Mp=new Map,Np=[],Pp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Fp(e,t){switch(e){case`focusin`:case`focusout`:Op=null;break;case`dragenter`:case`dragleave`:kp=null;break;case`mouseover`:case`mouseout`:Ap=null;break;case`pointerover`:case`pointerout`:jp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Mp.delete(t.pointerId)}}function Ip(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=kt(t),t!==null&&_p(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Lp(e,t,n,r,i){switch(t){case`focusin`:return Op=Ip(Op,e,t,n,r,i),!0;case`dragenter`:return kp=Ip(kp,e,t,n,r,i),!0;case`mouseover`:return Ap=Ip(Ap,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return jp.set(a,Ip(jp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Mp.set(a,Ip(Mp.get(a)||null,e,t,n,r,i)),!0}return!1}function Rp(e){var t=Ot(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,_t(e.priority,function(){vp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,_t(e.priority,function(){vp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function zp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Cp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);mn=r,n.target.dispatchEvent(r),mn=null}else return t=kt(n),t!==null&&_p(t),e.blockedOn=n,!1;t.shift()}return!0}function Bp(e,t,n){zp(e)&&n.delete(t)}function Vp(){Dp=!1,Op!==null&&zp(Op)&&(Op=null),kp!==null&&zp(kp)&&(kp=null),Ap!==null&&zp(Ap)&&(Ap=null),jp.forEach(Bp),Mp.forEach(Bp)}function Hp(e,n){e.blockedOn===n&&(e.blockedOn=null,Dp||(Dp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Vp)))}var Up=null;function Wp(e){Up!==e&&(Up=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Up===e&&(Up=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Tp(r||n)===null)continue;break}var a=kt(n);a!==null&&(e.splice(t,3),t-=3,Vs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Gp(e){function t(t){return Hp(t,e)}Op!==null&&Hp(Op,e),kp!==null&&Hp(kp,e),Ap!==null&&Hp(Ap,e),jp.forEach(t),Mp.forEach(t);for(var n=0;n<Np.length;n++){var r=Np[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Np.length&&(n=Np[0],n.blockedOn===null);)Rp(n),n.blockedOn===null&&Np.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[bt]||null;if(typeof a==`function`)o||Wp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[bt]||null)s=o.formAction;else if(Tp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Wp(n)}}}function Kp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function B(e){this._internalRoot=e}qp.prototype.render=B.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;mp(n,wu(),e,t,null,null)},qp.prototype.unmount=B.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;mp(e.current,2,null,e,null,null),ju(),t[xt]=null}};function qp(e){this._internalRoot=e}qp.prototype.unstable_scheduleHydration=function(e){if(e){var t=gt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Np.length&&t!==0&&t<Np[n].priority;n++);Np.splice(n,0,e),n===0&&Rp(e)}};var Jp=n.version;if(Jp!==`19.2.7`)throw Error(i(527,Jp,`19.2.7`));me.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Yp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:b,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Xp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xp.isDisabled&&Xp.supportsFiber)try{Je=Xp.inject(Yp),Ye=Xp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=lc,s=uc,c=dc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=fp(e,1,!1,null,null,n,r,null,o,s,c,Kp),e[xt]=t.current,Fd(e),new B(t)}})),rb=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=nb()}))(),ib=`0.6.3`,ab=A({source:T().describe("The component\'s module in TSX. It may import only from \'react\'. Its exports, the default one by its function\'s name, are what `code` can name. For each value the reader can change by using the component, such as `checked`, `open` or `value`, take a matching `onCheckedChange`, `onOpenChange` or `onValueChange` prop and call it with the new value, and give that value `{ change: true }` in `controls`. Component Code passes it then, so the change shows in the code. Keep state of its own only for when the prop is missing."),code:T().describe(`How the component is used, in JSX: elements, props and text only, with no hooks, calls or conditions. It is shown as code and rendered as the preview. Each string, number and boolean in it becomes a control.`),file:T().optional().describe("The file named in the code\'s tab, such as `Card.tsx`."),controls:N(T(),M([F(!1),k(M([T(),E()])),A({min:E().optional(),max:E().optional(),step:E().optional(),options:k(M([T(),E()])).optional(),change:D().optional()})])).optional().describe("How a prop is changed, by its name or by `Element.prop`: a list of options, `{ min, max, step }` for a number, or `false` to keep it as written. `{ change: true }` lets the component change it too, through its `on<Prop>Change`, and takes a list as `options`.")}),ob=A({files:N(T(),T()).describe("The files by name, such as `index.html`, `style.css` and `script.js`, each in its own tab. They run together as one page in a sandboxed frame: the HTML is the page\'s body, with the CSS in a style element and the JS in a script element after it. The page cannot load anything from the network, so draw with canvas, SVG or the DOM."),controls:N(T(),M([F(!0),k(M([T(),E()])),A({min:E().optional(),max:E().optional(),step:E().optional()})])).optional().describe("The values the reader can change, by name: an attribute, as `r` or `circle.r`, a CSS property or custom property, as `--speed`, or a JS `const` set to a number, string or boolean. Each takes `true`, a list of options, or `{ min, max, step }` for a number. CSS changes apply as the reader drags, while HTML and JS run the page again, so a script that reads custom properties each frame follows along.")}),sb={tsx:`tsx`,jsx:`jsx`,ts:`ts`,js:`js`,html:`html`,css:`css`},cb=(e,t)=>`\\`${e}\\`\\n\\n\\`\\`\\`${sb[e.split(`.`).pop()??``]??``}\\n${t}\\n\\`\\`\\``;function lb({prop:e,value:t,files:n,file:r,problem:i}){return[`In Component Code, the user set \\`${e}\\` to \\`${typeof t==`string`?JSON.stringify(t):`${t}`}\\` in \\`${r}\\`. The preview now runs this code, which is its whole state:`,...Object.entries(n).map(([e,t])=>cb(e,t)),i?`The preview throws instead of rendering: ${i}`:`The preview renders without throwing.`].join(`\n\n`)}var H;(function(e){e[e.NONE=0]=`NONE`,e[e._abstract=1]=`_abstract`,e[e._accessor=2]=`_accessor`,e[e._as=3]=`_as`,e[e._assert=4]=`_assert`,e[e._asserts=5]=`_asserts`,e[e._async=6]=`_async`,e[e._await=7]=`_await`,e[e._checks=8]=`_checks`,e[e._constructor=9]=`_constructor`,e[e._declare=10]=`_declare`,e[e._enum=11]=`_enum`,e[e._exports=12]=`_exports`,e[e._from=13]=`_from`,e[e._get=14]=`_get`,e[e._global=15]=`_global`,e[e._implements=16]=`_implements`,e[e._infer=17]=`_infer`,e[e._interface=18]=`_interface`,e[e._is=19]=`_is`,e[e._keyof=20]=`_keyof`,e[e._mixins=21]=`_mixins`,e[e._module=22]=`_module`,e[e._namespace=23]=`_namespace`,e[e._of=24]=`_of`,e[e._opaque=25]=`_opaque`,e[e._out=26]=`_out`,e[e._override=27]=`_override`,e[e._private=28]=`_private`,e[e._protected=29]=`_protected`,e[e._proto=30]=`_proto`,e[e._public=31]=`_public`,e[e._readonly=32]=`_readonly`,e[e._require=33]=`_require`,e[e._satisfies=34]=`_satisfies`,e[e._set=35]=`_set`,e[e._static=36]=`_static`,e[e._symbol=37]=`_symbol`,e[e._type=38]=`_type`,e[e._unique=39]=`_unique`,e[e._using=40]=`_using`})(H||={});var U;(function(e){e[e.PRECEDENCE_MASK=15]=`PRECEDENCE_MASK`,e[e.IS_KEYWORD=16]=`IS_KEYWORD`,e[e.IS_ASSIGN=32]=`IS_ASSIGN`,e[e.IS_RIGHT_ASSOCIATIVE=64]=`IS_RIGHT_ASSOCIATIVE`,e[e.IS_PREFIX=128]=`IS_PREFIX`,e[e.IS_POSTFIX=256]=`IS_POSTFIX`,e[e.IS_EXPRESSION_START=512]=`IS_EXPRESSION_START`,e[e.num=512]=`num`,e[e.bigint=1536]=`bigint`,e[e.decimal=2560]=`decimal`,e[e.regexp=3584]=`regexp`,e[e.string=4608]=`string`,e[e.name=5632]=`name`,e[e.eof=6144]=`eof`,e[e.bracketL=7680]=`bracketL`,e[e.bracketR=8192]=`bracketR`,e[e.braceL=9728]=`braceL`,e[e.braceBarL=10752]=`braceBarL`,e[e.braceR=11264]=`braceR`,e[e.braceBarR=12288]=`braceBarR`,e[e.parenL=13824]=`parenL`,e[e.parenR=14336]=`parenR`,e[e.comma=15360]=`comma`,e[e.semi=16384]=`semi`,e[e.colon=17408]=`colon`,e[e.doubleColon=18432]=`doubleColon`,e[e.dot=19456]=`dot`,e[e.question=20480]=`question`,e[e.questionDot=21504]=`questionDot`,e[e.arrow=22528]=`arrow`,e[e.template=23552]=`template`,e[e.ellipsis=24576]=`ellipsis`,e[e.backQuote=25600]=`backQuote`,e[e.dollarBraceL=27136]=`dollarBraceL`,e[e.at=27648]=`at`,e[e.hash=29184]=`hash`,e[e.eq=29728]=`eq`,e[e.assign=30752]=`assign`,e[e.preIncDec=32640]=`preIncDec`,e[e.postIncDec=33664]=`postIncDec`,e[e.bang=34432]=`bang`,e[e.tilde=35456]=`tilde`,e[e.pipeline=35841]=`pipeline`,e[e.nullishCoalescing=36866]=`nullishCoalescing`,e[e.logicalOR=37890]=`logicalOR`,e[e.logicalAND=38915]=`logicalAND`,e[e.bitwiseOR=39940]=`bitwiseOR`,e[e.bitwiseXOR=40965]=`bitwiseXOR`,e[e.bitwiseAND=41990]=`bitwiseAND`,e[e.equality=43015]=`equality`,e[e.lessThan=44040]=`lessThan`,e[e.greaterThan=45064]=`greaterThan`,e[e.relationalOrEqual=46088]=`relationalOrEqual`,e[e.bitShiftL=47113]=`bitShiftL`,e[e.bitShiftR=48137]=`bitShiftR`,e[e.plus=49802]=`plus`,e[e.minus=50826]=`minus`,e[e.modulo=51723]=`modulo`,e[e.star=52235]=`star`,e[e.slash=53259]=`slash`,e[e.exponent=54348]=`exponent`,e[e.jsxName=55296]=`jsxName`,e[e.jsxText=56320]=`jsxText`,e[e.jsxEmptyText=57344]=`jsxEmptyText`,e[e.jsxTagStart=58880]=`jsxTagStart`,e[e.jsxTagEnd=59392]=`jsxTagEnd`,e[e.typeParameterStart=60928]=`typeParameterStart`,e[e.nonNullAssertion=61440]=`nonNullAssertion`,e[e._break=62480]=`_break`,e[e._case=63504]=`_case`,e[e._catch=64528]=`_catch`,e[e._continue=65552]=`_continue`,e[e._debugger=66576]=`_debugger`,e[e._default=67600]=`_default`,e[e._do=68624]=`_do`,e[e._else=69648]=`_else`,e[e._finally=70672]=`_finally`,e[e._for=71696]=`_for`,e[e._function=73232]=`_function`,e[e._if=73744]=`_if`,e[e._return=74768]=`_return`,e[e._switch=75792]=`_switch`,e[e._throw=77456]=`_throw`,e[e._try=77840]=`_try`,e[e._var=78864]=`_var`,e[e._let=79888]=`_let`,e[e._const=80912]=`_const`,e[e._while=81936]=`_while`,e[e._with=82960]=`_with`,e[e._new=84496]=`_new`,e[e._this=85520]=`_this`,e[e._super=86544]=`_super`,e[e._class=87568]=`_class`,e[e._extends=88080]=`_extends`,e[e._export=89104]=`_export`,e[e._import=90640]=`_import`,e[e._yield=91664]=`_yield`,e[e._null=92688]=`_null`,e[e._true=93712]=`_true`,e[e._false=94736]=`_false`,e[e._in=95256]=`_in`,e[e._instanceof=96280]=`_instanceof`,e[e._typeof=97936]=`_typeof`,e[e._void=98960]=`_void`,e[e._delete=99984]=`_delete`,e[e._async=100880]=`_async`,e[e._get=101904]=`_get`,e[e._set=102928]=`_set`,e[e._declare=103952]=`_declare`,e[e._readonly=104976]=`_readonly`,e[e._abstract=106e3]=`_abstract`,e[e._static=107024]=`_static`,e[e._public=107536]=`_public`,e[e._private=108560]=`_private`,e[e._protected=109584]=`_protected`,e[e._override=110608]=`_override`,e[e._as=112144]=`_as`,e[e._enum=113168]=`_enum`,e[e._type=114192]=`_type`,e[e._implements=115216]=`_implements`})(U||={});function ub(e){switch(e){case U.num:return`num`;case U.bigint:return`bigint`;case U.decimal:return`decimal`;case U.regexp:return`regexp`;case U.string:return`string`;case U.name:return`name`;case U.eof:return`eof`;case U.bracketL:return`[`;case U.bracketR:return`]`;case U.braceL:return`{`;case U.braceBarL:return`{|`;case U.braceR:return`}`;case U.braceBarR:return`|}`;case U.parenL:return`(`;case U.parenR:return`)`;case U.comma:return`,`;case U.semi:return`;`;case U.colon:return`:`;case U.doubleColon:return`::`;case U.dot:return`.`;case U.question:return`?`;case U.questionDot:return`?.`;case U.arrow:return`=>`;case U.template:return`template`;case U.ellipsis:return`...`;case U.backQuote:return"`";case U.dollarBraceL:return"${";case U.at:return`@`;case U.hash:return`#`;case U.eq:return`=`;case U.assign:return`_=`;case U.preIncDec:return`++/--`;case U.postIncDec:return`++/--`;case U.bang:return`!`;case U.tilde:return`~`;case U.pipeline:return`|>`;case U.nullishCoalescing:return`??`;case U.logicalOR:return`||`;case U.logicalAND:return`&&`;case U.bitwiseOR:return`|`;case U.bitwiseXOR:return`^`;case U.bitwiseAND:return`&`;case U.equality:return`==/!=`;case U.lessThan:return`<`;case U.greaterThan:return`>`;case U.relationalOrEqual:return`<=/>=`;case U.bitShiftL:return`<<`;case U.bitShiftR:return`>>/>>>`;case U.plus:return`+`;case U.minus:return`-`;case U.modulo:return`%`;case U.star:return`*`;case U.slash:return`/`;case U.exponent:return`**`;case U.jsxName:return`jsxName`;case U.jsxText:return`jsxText`;case U.jsxEmptyText:return`jsxEmptyText`;case U.jsxTagStart:return`jsxTagStart`;case U.jsxTagEnd:return`jsxTagEnd`;case U.typeParameterStart:return`typeParameterStart`;case U.nonNullAssertion:return`nonNullAssertion`;case U._break:return`break`;case U._case:return`case`;case U._catch:return`catch`;case U._continue:return`continue`;case U._debugger:return`debugger`;case U._default:return`default`;case U._do:return`do`;case U._else:return`else`;case U._finally:return`finally`;case U._for:return`for`;case U._function:return`function`;case U._if:return`if`;case U._return:return`return`;case U._switch:return`switch`;case U._throw:return`throw`;case U._try:return`try`;case U._var:return`var`;case U._let:return`let`;case U._const:return`const`;case U._while:return`while`;case U._with:return`with`;case U._new:return`new`;case U._this:return`this`;case U._super:return`super`;case U._class:return`class`;case U._extends:return`extends`;case U._export:return`export`;case U._import:return`import`;case U._yield:return`yield`;case U._null:return`null`;case U._true:return`true`;case U._false:return`false`;case U._in:return`in`;case U._instanceof:return`instanceof`;case U._typeof:return`typeof`;case U._void:return`void`;case U._delete:return`delete`;case U._async:return`async`;case U._get:return`get`;case U._set:return`set`;case U._declare:return`declare`;case U._readonly:return`readonly`;case U._abstract:return`abstract`;case U._static:return`static`;case U._public:return`public`;case U._private:return`private`;case U._protected:return`protected`;case U._override:return`override`;case U._as:return`as`;case U._enum:return`enum`;case U._type:return`type`;case U._implements:return`implements`;default:return``}}var db=class{constructor(e,t,n){this.startTokenIndex=e,this.endTokenIndex=t,this.isFunctionScope=n}},fb=class{constructor(e,t,n,r,i,a,o,s,c,l,u,d,f){this.potentialArrowAt=e,this.noAnonFunctionType=t,this.inDisallowConditionalTypesContext=n,this.tokensLength=r,this.scopesLength=i,this.pos=a,this.type=o,this.contextualKeyword=s,this.start=c,this.end=l,this.isType=u,this.scopeDepth=d,this.error=f}},pb=class e{constructor(){e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this),e.prototype.__init6.call(this),e.prototype.__init7.call(this),e.prototype.__init8.call(this),e.prototype.__init9.call(this),e.prototype.__init10.call(this),e.prototype.__init11.call(this),e.prototype.__init12.call(this),e.prototype.__init13.call(this)}__init(){this.potentialArrowAt=-1}__init2(){this.noAnonFunctionType=!1}__init3(){this.inDisallowConditionalTypesContext=!1}__init4(){this.tokens=[]}__init5(){this.scopes=[]}__init6(){this.pos=0}__init7(){this.type=U.eof}__init8(){this.contextualKeyword=H.NONE}__init9(){this.start=0}__init10(){this.end=0}__init11(){this.isType=!1}__init12(){this.scopeDepth=0}__init13(){this.error=null}snapshot(){return new fb(this.potentialArrowAt,this.noAnonFunctionType,this.inDisallowConditionalTypesContext,this.tokens.length,this.scopes.length,this.pos,this.type,this.contextualKeyword,this.start,this.end,this.isType,this.scopeDepth,this.error)}restoreFromSnapshot(e){this.potentialArrowAt=e.potentialArrowAt,this.noAnonFunctionType=e.noAnonFunctionType,this.inDisallowConditionalTypesContext=e.inDisallowConditionalTypesContext,this.tokens.length=e.tokensLength,this.scopes.length=e.scopesLength,this.pos=e.pos,this.type=e.type,this.contextualKeyword=e.contextualKeyword,this.start=e.start,this.end=e.end,this.isType=e.isType,this.scopeDepth=e.scopeDepth,this.error=e.error}},W;(function(e){e[e.backSpace=8]=`backSpace`,e[e.lineFeed=10]=`lineFeed`,e[e.tab=9]=`tab`,e[e.carriageReturn=13]=`carriageReturn`,e[e.shiftOut=14]=`shiftOut`,e[e.space=32]=`space`,e[e.exclamationMark=33]=`exclamationMark`,e[e.quotationMark=34]=`quotationMark`,e[e.numberSign=35]=`numberSign`,e[e.dollarSign=36]=`dollarSign`,e[e.percentSign=37]=`percentSign`,e[e.ampersand=38]=`ampersand`,e[e.apostrophe=39]=`apostrophe`,e[e.leftParenthesis=40]=`leftParenthesis`,e[e.rightParenthesis=41]=`rightParenthesis`,e[e.asterisk=42]=`asterisk`,e[e.plusSign=43]=`plusSign`,e[e.comma=44]=`comma`,e[e.dash=45]=`dash`,e[e.dot=46]=`dot`,e[e.slash=47]=`slash`,e[e.digit0=48]=`digit0`,e[e.digit1=49]=`digit1`,e[e.digit2=50]=`digit2`,e[e.digit3=51]=`digit3`,e[e.digit4=52]=`digit4`,e[e.digit5=53]=`digit5`,e[e.digit6=54]=`digit6`,e[e.digit7=55]=`digit7`,e[e.digit8=56]=`digit8`,e[e.digit9=57]=`digit9`,e[e.colon=58]=`colon`,e[e.semicolon=59]=`semicolon`,e[e.lessThan=60]=`lessThan`,e[e.equalsTo=61]=`equalsTo`,e[e.greaterThan=62]=`greaterThan`,e[e.questionMark=63]=`questionMark`,e[e.atSign=64]=`atSign`,e[e.uppercaseA=65]=`uppercaseA`,e[e.uppercaseB=66]=`uppercaseB`,e[e.uppercaseC=67]=`uppercaseC`,e[e.uppercaseD=68]=`uppercaseD`,e[e.uppercaseE=69]=`uppercaseE`,e[e.uppercaseF=70]=`uppercaseF`,e[e.uppercaseG=71]=`uppercaseG`,e[e.uppercaseH=72]=`uppercaseH`,e[e.uppercaseI=73]=`uppercaseI`,e[e.uppercaseJ=74]=`uppercaseJ`,e[e.uppercaseK=75]=`uppercaseK`,e[e.uppercaseL=76]=`uppercaseL`,e[e.uppercaseM=77]=`uppercaseM`,e[e.uppercaseN=78]=`uppercaseN`,e[e.uppercaseO=79]=`uppercaseO`,e[e.uppercaseP=80]=`uppercaseP`,e[e.uppercaseQ=81]=`uppercaseQ`,e[e.uppercaseR=82]=`uppercaseR`,e[e.uppercaseS=83]=`uppercaseS`,e[e.uppercaseT=84]=`uppercaseT`,e[e.uppercaseU=85]=`uppercaseU`,e[e.uppercaseV=86]=`uppercaseV`,e[e.uppercaseW=87]=`uppercaseW`,e[e.uppercaseX=88]=`uppercaseX`,e[e.uppercaseY=89]=`uppercaseY`,e[e.uppercaseZ=90]=`uppercaseZ`,e[e.leftSquareBracket=91]=`leftSquareBracket`,e[e.backslash=92]=`backslash`,e[e.rightSquareBracket=93]=`rightSquareBracket`,e[e.caret=94]=`caret`,e[e.underscore=95]=`underscore`,e[e.graveAccent=96]=`graveAccent`,e[e.lowercaseA=97]=`lowercaseA`,e[e.lowercaseB=98]=`lowercaseB`,e[e.lowercaseC=99]=`lowercaseC`,e[e.lowercaseD=100]=`lowercaseD`,e[e.lowercaseE=101]=`lowercaseE`,e[e.lowercaseF=102]=`lowercaseF`,e[e.lowercaseG=103]=`lowercaseG`,e[e.lowercaseH=104]=`lowercaseH`,e[e.lowercaseI=105]=`lowercaseI`,e[e.lowercaseJ=106]=`lowercaseJ`,e[e.lowercaseK=107]=`lowercaseK`,e[e.lowercaseL=108]=`lowercaseL`,e[e.lowercaseM=109]=`lowercaseM`,e[e.lowercaseN=110]=`lowercaseN`,e[e.lowercaseO=111]=`lowercaseO`,e[e.lowercaseP=112]=`lowercaseP`,e[e.lowercaseQ=113]=`lowercaseQ`,e[e.lowercaseR=114]=`lowercaseR`,e[e.lowercaseS=115]=`lowercaseS`,e[e.lowercaseT=116]=`lowercaseT`,e[e.lowercaseU=117]=`lowercaseU`,e[e.lowercaseV=118]=`lowercaseV`,e[e.lowercaseW=119]=`lowercaseW`,e[e.lowercaseX=120]=`lowercaseX`,e[e.lowercaseY=121]=`lowercaseY`,e[e.lowercaseZ=122]=`lowercaseZ`,e[e.leftCurlyBrace=123]=`leftCurlyBrace`,e[e.verticalBar=124]=`verticalBar`,e[e.rightCurlyBrace=125]=`rightCurlyBrace`,e[e.tilde=126]=`tilde`,e[e.nonBreakingSpace=160]=`nonBreakingSpace`,e[e.oghamSpaceMark=5760]=`oghamSpaceMark`,e[e.lineSeparator=8232]=`lineSeparator`,e[e.paragraphSeparator=8233]=`paragraphSeparator`})(W||={});var mb,hb,gb,G,K,_b;function vb(){return _b++}function yb(e){if(`pos`in e){let t=xb(e.pos);e.message+=` (${t.line}:${t.column})`,e.loc=t}return e}var bb=class{constructor(e,t){this.line=e,this.column=t}};function xb(e){let t=1,n=1;for(let r=0;r<e;r++)K.charCodeAt(r)===W.lineFeed?(t++,n=1):n++;return new bb(t,n)}function Sb(e,t,n,r){K=e,G=new pb,_b=1,mb=t,hb=n,gb=r}function q(e){return G.contextualKeyword===e}function Cb(e){let t=tx();return t.type===U.name&&t.contextualKeyword===e}function wb(e){return G.contextualKeyword===e&&Z(U.name)}function Tb(e){wb(e)||jb()}function Eb(){return Q(U.eof)||Q(U.braceR)||Db()}function Db(){let e=G.tokens[G.tokens.length-1],t=e?e.end:0;for(let e=t;e<G.start;e++){let t=K.charCodeAt(e);if(t===W.lineFeed||t===W.carriageReturn||t===8232||t===8233)return!0}return!1}function Ob(){let e=nx();for(let t=G.end;t<e;t++){let e=K.charCodeAt(t);if(e===W.lineFeed||e===W.carriageReturn||e===8232||e===8233)return!0}return!1}function kb(){return Z(U.semi)||Eb()}function Ab(){kb()||jb(`Unexpected token, expected ";"`)}function J(e){Z(e)||jb(`Unexpected token, expected "${ub(e)}"`)}function jb(e=`Unexpected token`,t=G.start){if(G.error)return;let n=SyntaxError(e);n.pos=t,G.error=n,G.pos=K.length,ux(U.eof)}var Mb=[9,11,12,W.space,W.nonBreakingSpace,W.oghamSpaceMark,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],Nb=/(?:\\s|\\/\\/.*|\\/\\*[^]*?\\*\\/)*/g,Pb=new Uint8Array(65536);for(let e of Mb)Pb[e]=1;function Fb(e){if(e<48)return e===36;if(e<58)return!0;if(e<65)return!1;if(e<91)return!0;if(e<97)return e===95;if(e<123)return!0;if(e<128)return!1;throw Error(`Should not be called with non-ASCII char code.`)}var Ib=new Uint8Array(65536);for(let e=0;e<128;e++)Ib[e]=+!!Fb(e);for(let e=128;e<65536;e++)Ib[e]=1;for(let e of Mb)Ib[e]=0;Ib[8232]=0,Ib[8233]=0;var Lb=Ib.slice();for(let e=W.digit0;e<=W.digit9;e++)Lb[e]=0;var Rb=new Int32Array([-1,27,783,918,1755,2376,2862,3483,-1,3699,-1,4617,4752,4833,5130,5508,5940,-1,6480,6939,7749,8181,8451,8613,-1,8829,-1,-1,-1,54,243,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,432,-1,-1,-1,675,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,81,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,108,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,135,-1,-1,-1,-1,-1,-1,-1,-1,-1,162,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,189,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,216,-1,-1,-1,-1,-1,-1,H._abstract<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,270,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,297,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,324,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,351,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,378,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,405,-1,-1,-1,-1,-1,-1,-1,-1,H._accessor<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._as<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,459,-1,-1,-1,-1,-1,594,-1,-1,-1,-1,-1,-1,486,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,513,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,540,-1,-1,-1,-1,-1,-1,H._assert<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,567,-1,-1,-1,-1,-1,-1,-1,H._asserts<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,621,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,648,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._async<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,702,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,729,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,756,-1,-1,-1,-1,-1,-1,H._await<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,810,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,837,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,864,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,891,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._break<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,945,-1,-1,-1,-1,-1,-1,1107,-1,-1,-1,1242,-1,-1,1350,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,972,1026,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,999,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._case<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1053,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1080,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._catch<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1134,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1161,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1188,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1215,-1,-1,-1,-1,-1,-1,-1,H._checks<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1269,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1296,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1323,-1,-1,-1,-1,-1,-1,-1,(U._class<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1377,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1404,1620,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1431,-1,-1,-1,-1,-1,-1,(U._const<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1458,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1485,-1,-1,-1,-1,-1,-1,-1,-1,1512,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1539,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1566,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1593,-1,-1,-1,-1,-1,-1,-1,-1,H._constructor<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1647,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1674,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1701,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1728,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._continue<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1782,-1,-1,-1,-1,-1,-1,-1,-1,-1,2349,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1809,1971,-1,-1,2106,-1,-1,-1,-1,-1,2241,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1836,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1863,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1890,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1917,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1944,-1,-1,-1,-1,-1,-1,-1,-1,(U._debugger<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1998,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2025,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2052,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2079,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._declare<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2133,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2160,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2187,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2214,-1,-1,-1,-1,-1,-1,(U._default<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2268,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2295,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2322,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._delete<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._do<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2403,-1,2484,-1,-1,-1,-1,-1,-1,-1,-1,-1,2565,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2430,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2457,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._else<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2511,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2538,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._enum<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2592,-1,-1,-1,2727,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2619,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2646,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2673,-1,-1,-1,-1,-1,-1,(U._export<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2700,-1,-1,-1,-1,-1,-1,-1,H._exports<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2754,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2781,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2808,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2835,-1,-1,-1,-1,-1,-1,-1,(U._extends<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2889,-1,-1,-1,-1,-1,-1,-1,2997,-1,-1,-1,-1,-1,3159,-1,-1,3213,-1,-1,3294,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2916,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2943,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2970,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._false<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3024,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3051,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3078,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3105,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3132,-1,(U._finally<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3186,-1,-1,-1,-1,-1,-1,-1,-1,(U._for<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3240,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3267,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._from<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3321,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3348,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3375,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3402,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3429,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3456,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._function<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3510,-1,-1,-1,-1,-1,-1,3564,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3537,-1,-1,-1,-1,-1,-1,H._get<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3591,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3618,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3645,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3672,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._global<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3726,-1,-1,-1,-1,-1,-1,3753,4077,-1,-1,-1,-1,4590,-1,-1,-1,-1,-1,-1,-1,(U._if<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3780,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3807,-1,-1,3996,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3834,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3861,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3888,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3915,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3942,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3969,-1,-1,-1,-1,-1,-1,-1,H._implements<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4023,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4050,-1,-1,-1,-1,-1,-1,(U._import<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._in<<1)+1,-1,-1,-1,-1,-1,4104,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4185,4401,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4131,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4158,-1,-1,-1,-1,-1,-1,-1,-1,H._infer<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4212,-1,-1,-1,-1,-1,-1,-1,4239,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4266,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4293,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4320,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4347,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4374,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._instanceof<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4428,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4455,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4482,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4509,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4536,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4563,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._interface<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._is<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4644,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4671,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4698,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4725,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._keyof<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4779,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4806,-1,-1,-1,-1,-1,-1,(U._let<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4860,-1,-1,-1,-1,-1,4995,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4887,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4914,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4941,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4968,-1,-1,-1,-1,-1,-1,-1,H._mixins<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5022,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5049,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5076,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5103,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._module<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5157,-1,-1,-1,5373,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5427,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5184,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5211,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5238,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5265,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5292,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5319,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5346,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._namespace<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5400,-1,-1,-1,(U._new<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5454,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5481,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._null<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5535,-1,-1,-1,-1,-1,-1,-1,-1,-1,5562,-1,-1,-1,-1,5697,5751,-1,-1,-1,-1,H._of<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5589,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5616,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5643,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5670,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._opaque<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5724,-1,-1,-1,-1,-1,-1,H._out<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5778,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5805,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5832,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5859,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5886,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5913,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._override<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5967,-1,-1,6345,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5994,-1,-1,-1,-1,-1,6129,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6021,-1,-1,-1,-1,-1,6048,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6075,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6102,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._private<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6156,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6183,-1,-1,-1,-1,-1,-1,-1,-1,-1,6318,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6210,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6237,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6264,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6291,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._protected<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._proto<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6372,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6399,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6426,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6453,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._public<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6507,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6534,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6696,-1,-1,6831,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6561,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6588,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6615,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6642,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6669,-1,H._readonly<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6723,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6750,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6777,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6804,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._require<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6858,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6885,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6912,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._return<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6966,-1,-1,-1,7182,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7236,7371,-1,7479,-1,7614,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6993,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7020,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7047,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7074,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7101,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7128,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7155,-1,-1,-1,-1,-1,-1,-1,H._satisfies<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7209,-1,-1,-1,-1,-1,-1,H._set<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7263,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7290,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7317,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7344,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._static<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7398,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7425,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7452,-1,-1,-1,-1,-1,-1,-1,-1,(U._super<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7506,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7533,-1,-1,-1,-1,-1,-1,-1,-1,-1,7560,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7587,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._switch<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7641,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7668,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7695,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7722,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._symbol<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7776,-1,-1,-1,-1,-1,-1,-1,-1,-1,7938,-1,-1,-1,-1,-1,-1,8046,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7803,-1,-1,-1,-1,-1,-1,-1,-1,7857,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7830,-1,-1,-1,-1,-1,-1,-1,(U._this<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7884,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7911,-1,-1,-1,(U._throw<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7965,-1,-1,-1,8019,-1,-1,-1,-1,-1,-1,7992,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._true<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._try<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8073,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8100,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._type<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8127,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8154,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._typeof<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8208,-1,-1,-1,-1,8343,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8235,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8262,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8289,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8316,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._unique<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8370,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8397,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8424,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._using<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8478,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8532,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8505,-1,-1,-1,-1,-1,-1,-1,-1,(U._var<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8559,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8586,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._void<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8640,8748,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8667,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8694,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8721,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._while<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8775,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8802,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._with<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8856,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8883,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8910,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8937,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._yield<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]);function zb(){let e=0,t=0,n=G.pos;for(;n<K.length&&(t=K.charCodeAt(n),!(t<W.lowercaseA||t>W.lowercaseZ));){let r=Rb[e+(t-W.lowercaseA)+1];if(r===-1)break;e=r,n++}let r=Rb[e];if(r>-1&&!Ib[t]){G.pos=n,r&1?ux(r>>>1):ux(U.name,r>>>1);return}for(;n<K.length;){let e=K.charCodeAt(n);if(Ib[e])n++;else if(e===W.backslash){if(n+=2,K.charCodeAt(n)===W.leftCurlyBrace){for(;n<K.length&&K.charCodeAt(n)!==W.rightCurlyBrace;)n++;n++}}else if(e===W.atSign&&K.charCodeAt(n+1)===W.atSign)n+=2;else break}G.pos=n,ux(U.name)}var Y;(function(e){e[e.Access=0]=`Access`,e[e.ExportAccess=1]=`ExportAccess`,e[e.TopLevelDeclaration=2]=`TopLevelDeclaration`,e[e.FunctionScopedDeclaration=3]=`FunctionScopedDeclaration`,e[e.BlockScopedDeclaration=4]=`BlockScopedDeclaration`,e[e.ObjectShorthandTopLevelDeclaration=5]=`ObjectShorthandTopLevelDeclaration`,e[e.ObjectShorthandFunctionScopedDeclaration=6]=`ObjectShorthandFunctionScopedDeclaration`,e[e.ObjectShorthandBlockScopedDeclaration=7]=`ObjectShorthandBlockScopedDeclaration`,e[e.ObjectShorthand=8]=`ObjectShorthand`,e[e.ImportDeclaration=9]=`ImportDeclaration`,e[e.ObjectKey=10]=`ObjectKey`,e[e.ImportAccess=11]=`ImportAccess`})(Y||={});var Bb;(function(e){e[e.NoChildren=0]=`NoChildren`,e[e.OneChild=1]=`OneChild`,e[e.StaticChildren=2]=`StaticChildren`,e[e.KeyAfterPropSpread=3]=`KeyAfterPropSpread`})(Bb||={});function Vb(e){let t=e.identifierRole;return t===Y.TopLevelDeclaration||t===Y.FunctionScopedDeclaration||t===Y.BlockScopedDeclaration||t===Y.ObjectShorthandTopLevelDeclaration||t===Y.ObjectShorthandFunctionScopedDeclaration||t===Y.ObjectShorthandBlockScopedDeclaration}function Hb(e){let t=e.identifierRole;return t===Y.FunctionScopedDeclaration||t===Y.BlockScopedDeclaration||t===Y.ObjectShorthandFunctionScopedDeclaration||t===Y.ObjectShorthandBlockScopedDeclaration}function Ub(e){let t=e.identifierRole;return t===Y.TopLevelDeclaration||t===Y.ObjectShorthandTopLevelDeclaration||t===Y.ImportDeclaration}function Wb(e){let t=e.identifierRole;return t===Y.TopLevelDeclaration||t===Y.BlockScopedDeclaration||t===Y.ObjectShorthandTopLevelDeclaration||t===Y.ObjectShorthandBlockScopedDeclaration}function Gb(e){let t=e.identifierRole;return t===Y.FunctionScopedDeclaration||t===Y.ObjectShorthandFunctionScopedDeclaration}function Kb(e){return e.identifierRole===Y.ObjectShorthandTopLevelDeclaration||e.identifierRole===Y.ObjectShorthandBlockScopedDeclaration||e.identifierRole===Y.ObjectShorthandFunctionScopedDeclaration}var qb=class{constructor(){this.type=G.type,this.contextualKeyword=G.contextualKeyword,this.start=G.start,this.end=G.end,this.scopeDepth=G.scopeDepth,this.isType=G.isType,this.identifierRole=null,this.jsxRole=null,this.shadowsGlobal=!1,this.isAsyncOperation=!1,this.contextId=null,this.rhsEndIndex=null,this.isExpression=!1,this.numNullishCoalesceStarts=0,this.numNullishCoalesceEnds=0,this.isOptionalChainStart=!1,this.isOptionalChainEnd=!1,this.subscriptStartIndex=null,this.nullishStartIndex=null}};function X(){G.tokens.push(new qb),ax()}function Jb(){G.tokens.push(new qb),G.start=G.pos,kx()}function Yb(){G.type===U.assign&&--G.pos,wx()}function Xb(e){for(let t=G.tokens.length-e;t<G.tokens.length;t++)G.tokens[t].isType=!0;let t=G.isType;return G.isType=!0,t}function Zb(e){G.isType=e}function Z(e){return Q(e)?(X(),!0):!1}function Qb(e){let t=G.isType;G.isType=!0,Z(e),G.isType=t}function Q(e){return G.type===e}function $b(){let e=G.snapshot();X();let t=G.type;return G.restoreFromSnapshot(e),t}var ex=class{constructor(e,t){this.type=e,this.contextualKeyword=t}};function tx(){let e=G.snapshot();X();let t=G.type,n=G.contextualKeyword;return G.restoreFromSnapshot(e),new ex(t,n)}function nx(){return rx(G.pos)}function rx(e){return Nb.lastIndex=e,e+Nb.exec(K)[0].length}function ix(){return K.charCodeAt(nx())}function ax(){if(lx(),G.start=G.pos,G.pos>=K.length){let e=G.tokens;e.length>=2&&e[e.length-1].start>=K.length&&e[e.length-2].start>=K.length&&jb(`Unexpectedly reached the end of input.`),ux(U.eof);return}ox(K.charCodeAt(G.pos))}function ox(e){Lb[e]||e===W.backslash||e===W.atSign&&K.charCodeAt(G.pos+1)===W.atSign?zb():Sx(e)}function sx(){for(;K.charCodeAt(G.pos)!==W.asterisk||K.charCodeAt(G.pos+1)!==W.slash;)if(G.pos++,G.pos>K.length){jb(`Unterminated comment`,G.pos-2);return}G.pos+=2}function cx(e){let t=K.charCodeAt(G.pos+=e);if(G.pos<K.length)for(;t!==W.lineFeed&&t!==W.carriageReturn&&t!==W.lineSeparator&&t!==W.paragraphSeparator&&++G.pos<K.length;)t=K.charCodeAt(G.pos)}function lx(){for(;G.pos<K.length;){let e=K.charCodeAt(G.pos);switch(e){case W.carriageReturn:K.charCodeAt(G.pos+1)===W.lineFeed&&++G.pos;case W.lineFeed:case W.lineSeparator:case W.paragraphSeparator:++G.pos;break;case W.slash:switch(K.charCodeAt(G.pos+1)){case W.asterisk:G.pos+=2,sx();break;case W.slash:cx(2);break;default:return}break;default:if(Pb[e])++G.pos;else return}}}function ux(e,t=H.NONE){G.end=G.pos,G.type=e,G.contextualKeyword=t}function dx(){let e=K.charCodeAt(G.pos+1);if(e>=W.digit0&&e<=W.digit9){Dx(!0);return}e===W.dot&&K.charCodeAt(G.pos+2)===W.dot?(G.pos+=3,ux(U.ellipsis)):(++G.pos,ux(U.dot))}function fx(){K.charCodeAt(G.pos+1)===W.equalsTo?Cx(U.assign,2):Cx(U.slash,1)}function px(e){let t=e===W.asterisk?U.star:U.modulo,n=1,r=K.charCodeAt(G.pos+1);e===W.asterisk&&r===W.asterisk&&(n++,r=K.charCodeAt(G.pos+2),t=U.exponent),r===W.equalsTo&&K.charCodeAt(G.pos+2)!==W.greaterThan&&(n++,t=U.assign),Cx(t,n)}function mx(e){let t=K.charCodeAt(G.pos+1);if(t===e){K.charCodeAt(G.pos+2)===W.equalsTo?Cx(U.assign,3):Cx(e===W.verticalBar?U.logicalOR:U.logicalAND,2);return}if(e===W.verticalBar){if(t===W.greaterThan){Cx(U.pipeline,2);return}else if(t===W.rightCurlyBrace&&gb){Cx(U.braceBarR,2);return}}if(t===W.equalsTo){Cx(U.assign,2);return}Cx(e===W.verticalBar?U.bitwiseOR:U.bitwiseAND,1)}function hx(){K.charCodeAt(G.pos+1)===W.equalsTo?Cx(U.assign,2):Cx(U.bitwiseXOR,1)}function gx(e){let t=K.charCodeAt(G.pos+1);if(t===e){Cx(U.preIncDec,2);return}t===W.equalsTo?Cx(U.assign,2):e===W.plusSign?Cx(U.plus,1):Cx(U.minus,1)}function _x(){let e=K.charCodeAt(G.pos+1);if(e===W.lessThan){if(K.charCodeAt(G.pos+2)===W.equalsTo){Cx(U.assign,3);return}G.isType?Cx(U.lessThan,1):Cx(U.bitShiftL,2);return}e===W.equalsTo?Cx(U.relationalOrEqual,2):Cx(U.lessThan,1)}function vx(){if(G.isType){Cx(U.greaterThan,1);return}let e=K.charCodeAt(G.pos+1);if(e===W.greaterThan){let e=K.charCodeAt(G.pos+2)===W.greaterThan?3:2;if(K.charCodeAt(G.pos+e)===W.equalsTo){Cx(U.assign,e+1);return}Cx(U.bitShiftR,e);return}e===W.equalsTo?Cx(U.relationalOrEqual,2):Cx(U.greaterThan,1)}function yx(){G.type===U.greaterThan&&(--G.pos,vx())}function bx(e){let t=K.charCodeAt(G.pos+1);if(t===W.equalsTo){Cx(U.equality,K.charCodeAt(G.pos+2)===W.equalsTo?3:2);return}if(e===W.equalsTo&&t===W.greaterThan){G.pos+=2,ux(U.arrow);return}Cx(e===W.equalsTo?U.eq:U.bang,1)}function xx(){let e=K.charCodeAt(G.pos+1),t=K.charCodeAt(G.pos+2);e===W.questionMark&&!(gb&&G.isType)?t===W.equalsTo?Cx(U.assign,3):Cx(U.nullishCoalescing,2):e===W.dot&&!(t>=W.digit0&&t<=W.digit9)?(G.pos+=2,ux(U.questionDot)):(++G.pos,ux(U.question))}function Sx(e){switch(e){case W.numberSign:++G.pos,ux(U.hash);return;case W.dot:dx();return;case W.leftParenthesis:++G.pos,ux(U.parenL);return;case W.rightParenthesis:++G.pos,ux(U.parenR);return;case W.semicolon:++G.pos,ux(U.semi);return;case W.comma:++G.pos,ux(U.comma);return;case W.leftSquareBracket:++G.pos,ux(U.bracketL);return;case W.rightSquareBracket:++G.pos,ux(U.bracketR);return;case W.leftCurlyBrace:gb&&K.charCodeAt(G.pos+1)===W.verticalBar?Cx(U.braceBarL,2):(++G.pos,ux(U.braceL));return;case W.rightCurlyBrace:++G.pos,ux(U.braceR);return;case W.colon:K.charCodeAt(G.pos+1)===W.colon?Cx(U.doubleColon,2):(++G.pos,ux(U.colon));return;case W.questionMark:xx();return;case W.atSign:++G.pos,ux(U.at);return;case W.graveAccent:++G.pos,ux(U.backQuote);return;case W.digit0:{let e=K.charCodeAt(G.pos+1);if(e===W.lowercaseX||e===W.uppercaseX||e===W.lowercaseO||e===W.uppercaseO||e===W.lowercaseB||e===W.uppercaseB){Ex();return}}case W.digit1:case W.digit2:case W.digit3:case W.digit4:case W.digit5:case W.digit6:case W.digit7:case W.digit8:case W.digit9:Dx(!1);return;case W.quotationMark:case W.apostrophe:Ox(e);return;case W.slash:fx();return;case W.percentSign:case W.asterisk:px(e);return;case W.verticalBar:case W.ampersand:mx(e);return;case W.caret:hx();return;case W.plusSign:case W.dash:gx(e);return;case W.lessThan:_x();return;case W.greaterThan:vx();return;case W.equalsTo:case W.exclamationMark:bx(e);return;case W.tilde:Cx(U.tilde,1);return;default:break}jb(`Unexpected character \'${String.fromCharCode(e)}\'`,G.pos)}function Cx(e,t){G.pos+=t,ux(e)}function wx(){let e=G.pos,t=!1,n=!1;for(;;){if(G.pos>=K.length){jb(`Unterminated regular expression`,e);return}let r=K.charCodeAt(G.pos);if(t)t=!1;else{if(r===W.leftSquareBracket)n=!0;else if(r===W.rightSquareBracket&&n)n=!1;else if(r===W.slash&&!n)break;t=r===W.backslash}++G.pos}++G.pos,Ax(),ux(U.regexp)}function Tx(){for(;;){let e=K.charCodeAt(G.pos);if(e>=W.digit0&&e<=W.digit9||e===W.underscore)G.pos++;else break}}function Ex(){for(G.pos+=2;;){let e=K.charCodeAt(G.pos);if(e>=W.digit0&&e<=W.digit9||e>=W.lowercaseA&&e<=W.lowercaseF||e>=W.uppercaseA&&e<=W.uppercaseF||e===W.underscore)G.pos++;else break}K.charCodeAt(G.pos)===W.lowercaseN?(++G.pos,ux(U.bigint)):ux(U.num)}function Dx(e){let t=!1,n=!1;e||Tx();let r=K.charCodeAt(G.pos);if(r===W.dot&&(++G.pos,Tx(),r=K.charCodeAt(G.pos)),(r===W.uppercaseE||r===W.lowercaseE)&&(r=K.charCodeAt(++G.pos),(r===W.plusSign||r===W.dash)&&++G.pos,Tx(),r=K.charCodeAt(G.pos)),r===W.lowercaseN?(++G.pos,t=!0):r===W.lowercaseM&&(++G.pos,n=!0),t){ux(U.bigint);return}if(n){ux(U.decimal);return}ux(U.num)}function Ox(e){for(G.pos++;;){if(G.pos>=K.length){jb(`Unterminated string constant`);return}let t=K.charCodeAt(G.pos);if(t===W.backslash)G.pos++;else if(t===e)break;G.pos++}G.pos++,ux(U.string)}function kx(){for(;;){if(G.pos>=K.length){jb(`Unterminated template`);return}let e=K.charCodeAt(G.pos);if(e===W.graveAccent||e===W.dollarSign&&K.charCodeAt(G.pos+1)===W.leftCurlyBrace){if(G.pos===G.start&&Q(U.template))if(e===W.dollarSign){G.pos+=2,ux(U.dollarBraceL);return}else{++G.pos,ux(U.backQuote);return}ux(U.template);return}e===W.backslash&&G.pos++,G.pos++}}function Ax(){for(;G.pos<K.length;){let e=K.charCodeAt(G.pos);if(Ib[e])G.pos++;else if(e===W.backslash){if(G.pos+=2,K.charCodeAt(G.pos)===W.leftCurlyBrace){for(;G.pos<K.length&&K.charCodeAt(G.pos)!==W.rightCurlyBrace;)G.pos++;G.pos++}}else break}}function jx(e,t=e.currentIndex()){let n=t+1;if(Mx(e,n)){let r=e.identifierNameAtIndex(t);return{isType:!1,leftName:r,rightName:r,endIndex:n}}if(n++,Mx(e,n))return{isType:!0,leftName:null,rightName:null,endIndex:n};if(n++,Mx(e,n))return{isType:!1,leftName:e.identifierNameAtIndex(t),rightName:e.identifierNameAtIndex(t+2),endIndex:n};if(n++,Mx(e,n))return{isType:!0,leftName:null,rightName:null,endIndex:n};throw Error(`Unexpected import/export specifier at ${t}`)}function Mx(e,t){let n=e.tokens[t];return n.type===U.braceR||n.type===U.comma}var Nx=new Map([[`quot`,`"`],[`amp`,`&`],[`apos`,`\'`],[`lt`,`<`],[`gt`,`>`],[`nbsp`,`\\xA0`],[`iexcl`,`\xA1`],[`cent`,`\xA2`],[`pound`,`\xA3`],[`curren`,`\xA4`],[`yen`,`\xA5`],[`brvbar`,`\xA6`],[`sect`,`\xA7`],[`uml`,`\xA8`],[`copy`,`\xA9`],[`ordf`,`\xAA`],[`laquo`,`\xAB`],[`not`,`\xAC`],[`shy`,`\xAD`],[`reg`,`\xAE`],[`macr`,`\xAF`],[`deg`,`\xB0`],[`plusmn`,`\xB1`],[`sup2`,`\xB2`],[`sup3`,`\xB3`],[`acute`,`\xB4`],[`micro`,`\xB5`],[`para`,`\xB6`],[`middot`,`\xB7`],[`cedil`,`\xB8`],[`sup1`,`\xB9`],[`ordm`,`\xBA`],[`raquo`,`\xBB`],[`frac14`,`\xBC`],[`frac12`,`\xBD`],[`frac34`,`\xBE`],[`iquest`,`\xBF`],[`Agrave`,`\xC0`],[`Aacute`,`\xC1`],[`Acirc`,`\xC2`],[`Atilde`,`\xC3`],[`Auml`,`\xC4`],[`Aring`,`\xC5`],[`AElig`,`\xC6`],[`Ccedil`,`\xC7`],[`Egrave`,`\xC8`],[`Eacute`,`\xC9`],[`Ecirc`,`\xCA`],[`Euml`,`\xCB`],[`Igrave`,`\xCC`],[`Iacute`,`\xCD`],[`Icirc`,`\xCE`],[`Iuml`,`\xCF`],[`ETH`,`\xD0`],[`Ntilde`,`\xD1`],[`Ograve`,`\xD2`],[`Oacute`,`\xD3`],[`Ocirc`,`\xD4`],[`Otilde`,`\xD5`],[`Ouml`,`\xD6`],[`times`,`\xD7`],[`Oslash`,`\xD8`],[`Ugrave`,`\xD9`],[`Uacute`,`\xDA`],[`Ucirc`,`\xDB`],[`Uuml`,`\xDC`],[`Yacute`,`\xDD`],[`THORN`,`\xDE`],[`szlig`,`\xDF`],[`agrave`,`\xE0`],[`aacute`,`\xE1`],[`acirc`,`\xE2`],[`atilde`,`\xE3`],[`auml`,`\xE4`],[`aring`,`\xE5`],[`aelig`,`\xE6`],[`ccedil`,`\xE7`],[`egrave`,`\xE8`],[`eacute`,`\xE9`],[`ecirc`,`\xEA`],[`euml`,`\xEB`],[`igrave`,`\xEC`],[`iacute`,`\xED`],[`icirc`,`\xEE`],[`iuml`,`\xEF`],[`eth`,`\xF0`],[`ntilde`,`\xF1`],[`ograve`,`\xF2`],[`oacute`,`\xF3`],[`ocirc`,`\xF4`],[`otilde`,`\xF5`],[`ouml`,`\xF6`],[`divide`,`\xF7`],[`oslash`,`\xF8`],[`ugrave`,`\xF9`],[`uacute`,`\xFA`],[`ucirc`,`\xFB`],[`uuml`,`\xFC`],[`yacute`,`\xFD`],[`thorn`,`\xFE`],[`yuml`,`\xFF`],[`OElig`,`\u0152`],[`oelig`,`\u0153`],[`Scaron`,`\u0160`],[`scaron`,`\u0161`],[`Yuml`,`\u0178`],[`fnof`,`\u0192`],[`circ`,`\u02C6`],[`tilde`,`\u02DC`],[`Alpha`,`\u0391`],[`Beta`,`\u0392`],[`Gamma`,`\u0393`],[`Delta`,`\u0394`],[`Epsilon`,`\u0395`],[`Zeta`,`\u0396`],[`Eta`,`\u0397`],[`Theta`,`\u0398`],[`Iota`,`\u0399`],[`Kappa`,`\u039A`],[`Lambda`,`\u039B`],[`Mu`,`\u039C`],[`Nu`,`\u039D`],[`Xi`,`\u039E`],[`Omicron`,`\u039F`],[`Pi`,`\u03A0`],[`Rho`,`\u03A1`],[`Sigma`,`\u03A3`],[`Tau`,`\u03A4`],[`Upsilon`,`\u03A5`],[`Phi`,`\u03A6`],[`Chi`,`\u03A7`],[`Psi`,`\u03A8`],[`Omega`,`\u03A9`],[`alpha`,`\u03B1`],[`beta`,`\u03B2`],[`gamma`,`\u03B3`],[`delta`,`\u03B4`],[`epsilon`,`\u03B5`],[`zeta`,`\u03B6`],[`eta`,`\u03B7`],[`theta`,`\u03B8`],[`iota`,`\u03B9`],[`kappa`,`\u03BA`],[`lambda`,`\u03BB`],[`mu`,`\u03BC`],[`nu`,`\u03BD`],[`xi`,`\u03BE`],[`omicron`,`\u03BF`],[`pi`,`\u03C0`],[`rho`,`\u03C1`],[`sigmaf`,`\u03C2`],[`sigma`,`\u03C3`],[`tau`,`\u03C4`],[`upsilon`,`\u03C5`],[`phi`,`\u03C6`],[`chi`,`\u03C7`],[`psi`,`\u03C8`],[`omega`,`\u03C9`],[`thetasym`,`\u03D1`],[`upsih`,`\u03D2`],[`piv`,`\u03D6`],[`ensp`,`\u2002`],[`emsp`,`\u2003`],[`thinsp`,`\u2009`],[`zwnj`,`\u200C`],[`zwj`,`\u200D`],[`lrm`,`\u200E`],[`rlm`,`\u200F`],[`ndash`,`\u2013`],[`mdash`,`\u2014`],[`lsquo`,`\u2018`],[`rsquo`,`\u2019`],[`sbquo`,`\u201A`],[`ldquo`,`\u201C`],[`rdquo`,`\u201D`],[`bdquo`,`\u201E`],[`dagger`,`\u2020`],[`Dagger`,`\u2021`],[`bull`,`\u2022`],[`hellip`,`\u2026`],[`permil`,`\u2030`],[`prime`,`\u2032`],[`Prime`,`\u2033`],[`lsaquo`,`\u2039`],[`rsaquo`,`\u203A`],[`oline`,`\u203E`],[`frasl`,`\u2044`],[`euro`,`\u20AC`],[`image`,`\u2111`],[`weierp`,`\u2118`],[`real`,`\u211C`],[`trade`,`\u2122`],[`alefsym`,`\u2135`],[`larr`,`\u2190`],[`uarr`,`\u2191`],[`rarr`,`\u2192`],[`darr`,`\u2193`],[`harr`,`\u2194`],[`crarr`,`\u21B5`],[`lArr`,`\u21D0`],[`uArr`,`\u21D1`],[`rArr`,`\u21D2`],[`dArr`,`\u21D3`],[`hArr`,`\u21D4`],[`forall`,`\u2200`],[`part`,`\u2202`],[`exist`,`\u2203`],[`empty`,`\u2205`],[`nabla`,`\u2207`],[`isin`,`\u2208`],[`notin`,`\u2209`],[`ni`,`\u220B`],[`prod`,`\u220F`],[`sum`,`\u2211`],[`minus`,`\u2212`],[`lowast`,`\u2217`],[`radic`,`\u221A`],[`prop`,`\u221D`],[`infin`,`\u221E`],[`ang`,`\u2220`],[`and`,`\u2227`],[`or`,`\u2228`],[`cap`,`\u2229`],[`cup`,`\u222A`],[`int`,`\u222B`],[`there4`,`\u2234`],[`sim`,`\u223C`],[`cong`,`\u2245`],[`asymp`,`\u2248`],[`ne`,`\u2260`],[`equiv`,`\u2261`],[`le`,`\u2264`],[`ge`,`\u2265`],[`sub`,`\u2282`],[`sup`,`\u2283`],[`nsub`,`\u2284`],[`sube`,`\u2286`],[`supe`,`\u2287`],[`oplus`,`\u2295`],[`otimes`,`\u2297`],[`perp`,`\u22A5`],[`sdot`,`\u22C5`],[`lceil`,`\u2308`],[`rceil`,`\u2309`],[`lfloor`,`\u230A`],[`rfloor`,`\u230B`],[`lang`,`\u2329`],[`rang`,`\u232A`],[`loz`,`\u25CA`],[`spades`,`\u2660`],[`clubs`,`\u2663`],[`hearts`,`\u2665`],[`diams`,`\u2666`]]);function Px(e){let[t,n]=Fx(e.jsxPragma||`React.createElement`),[r,i]=Fx(e.jsxFragmentPragma||`React.Fragment`);return{base:t,suffix:n,fragmentBase:r,fragmentSuffix:i}}function Fx(e){let t=e.indexOf(`.`);return t===-1&&(t=e.length),[e.slice(0,t),e.slice(t)]}var Ix=class{getPrefixCode(){return``}getHoistedCode(){return``}getSuffixCode(){return``}},Lx=class e extends Ix{__init(){this.lastLineNumber=1}__init2(){this.lastIndex=0}__init3(){this.filenameVarName=null}__init4(){this.esmAutomaticImportNameResolutions={}}__init5(){this.cjsAutomaticModuleNameResolutions={}}constructor(t,n,r,i,a){super(),this.rootTransformer=t,this.tokens=n,this.importProcessor=r,this.nameManager=i,this.options=a,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this),this.jsxPragmaInfo=Px(a),this.isAutomaticRuntime=a.jsxRuntime===`automatic`,this.jsxImportSource=a.jsxImportSource||`react`}process(){return this.tokens.matches1(U.jsxTagStart)?(this.processJSXTag(),!0):!1}getPrefixCode(){let e=``;if(this.filenameVarName&&(e+=`const ${this.filenameVarName} = ${JSON.stringify(this.options.filePath||``)};`),this.isAutomaticRuntime)if(this.importProcessor)for(let[t,n]of Object.entries(this.cjsAutomaticModuleNameResolutions))e+=`var ${n} = require("${t}");`;else{let{createElement:t,...n}=this.esmAutomaticImportNameResolutions;t&&(e+=`import {createElement as ${t}} from "${this.jsxImportSource}";`);let r=Object.entries(n).map(([e,t])=>`${e} as ${t}`).join(`, `);if(r){let t=this.jsxImportSource+(this.options.production?`/jsx-runtime`:`/jsx-dev-runtime`);e+=`import {${r}} from "${t}";`}}return e}processJSXTag(){let{jsxRole:e,start:t}=this.tokens.currentToken(),n=this.options.production?null:this.getElementLocationCode(t);this.isAutomaticRuntime&&e!==Bb.KeyAfterPropSpread?this.transformTagToJSXFunc(n,e):this.transformTagToCreateElement(n)}getElementLocationCode(e){return`lineNumber: ${this.getLineNumberForIndex(e)}`}getLineNumberForIndex(e){let t=this.tokens.code;for(;this.lastIndex<e&&this.lastIndex<t.length;)t[this.lastIndex]===`\n`&&this.lastLineNumber++,this.lastIndex++;return this.lastLineNumber}transformTagToJSXFunc(e,t){let n=t===Bb.StaticChildren;this.tokens.replaceToken(this.getJSXFuncInvocationCode(n));let r=null;if(this.tokens.matches1(U.jsxTagEnd))this.tokens.replaceToken(`${this.getFragmentCode()}, {`),this.processAutomaticChildrenAndEndProps(t);else{if(this.processTagIntro(),this.tokens.appendCode(`, {`),r=this.processProps(!0),this.tokens.matches2(U.slash,U.jsxTagEnd))this.tokens.appendCode(`}`);else if(this.tokens.matches1(U.jsxTagEnd))this.tokens.removeToken(),this.processAutomaticChildrenAndEndProps(t);else throw Error(`Expected either /> or > at the end of the tag.`);r&&this.tokens.appendCode(`, ${r}`)}for(this.options.production||(r===null&&this.tokens.appendCode(`, void 0`),this.tokens.appendCode(`, ${n}, ${this.getDevSource(e)}, this`)),this.tokens.removeInitialToken();!this.tokens.matches1(U.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(`)`)}transformTagToCreateElement(e){if(this.tokens.replaceToken(this.getCreateElementInvocationCode()),this.tokens.matches1(U.jsxTagEnd))this.tokens.replaceToken(`${this.getFragmentCode()}, null`),this.processChildren(!0);else if(this.processTagIntro(),this.processPropsObjectWithDevInfo(e),!this.tokens.matches2(U.slash,U.jsxTagEnd))if(this.tokens.matches1(U.jsxTagEnd))this.tokens.removeToken(),this.processChildren(!0);else throw Error(`Expected either /> or > at the end of the tag.`);for(this.tokens.removeInitialToken();!this.tokens.matches1(U.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(`)`)}getJSXFuncInvocationCode(e){return this.options.production?e?this.claimAutoImportedFuncInvocation(`jsxs`,`/jsx-runtime`):this.claimAutoImportedFuncInvocation(`jsx`,`/jsx-runtime`):this.claimAutoImportedFuncInvocation(`jsxDEV`,`/jsx-dev-runtime`)}getCreateElementInvocationCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedFuncInvocation(`createElement`,``);{let{jsxPragmaInfo:e}=this;return`${this.importProcessor&&this.importProcessor.getIdentifierReplacement(e.base)||e.base}${e.suffix}(`}}getFragmentCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedName(`Fragment`,this.options.production?`/jsx-runtime`:`/jsx-dev-runtime`);{let{jsxPragmaInfo:e}=this;return(this.importProcessor&&this.importProcessor.getIdentifierReplacement(e.fragmentBase)||e.fragmentBase)+e.fragmentSuffix}}claimAutoImportedFuncInvocation(e,t){let n=this.claimAutoImportedName(e,t);return this.importProcessor?`${n}.call(void 0, `:`${n}(`}claimAutoImportedName(e,t){if(this.importProcessor){let n=this.jsxImportSource+t;return this.cjsAutomaticModuleNameResolutions[n]||(this.cjsAutomaticModuleNameResolutions[n]=this.importProcessor.getFreeIdentifierForPath(n)),`${this.cjsAutomaticModuleNameResolutions[n]}.${e}`}else return this.esmAutomaticImportNameResolutions[e]||(this.esmAutomaticImportNameResolutions[e]=this.nameManager.claimFreeName(`_${e}`)),this.esmAutomaticImportNameResolutions[e]}processTagIntro(){let e=this.tokens.currentIndex()+1;for(;this.tokens.tokens[e].isType||!this.tokens.matches2AtIndex(e-1,U.jsxName,U.jsxName)&&!this.tokens.matches2AtIndex(e-1,U.greaterThan,U.jsxName)&&!this.tokens.matches1AtIndex(e,U.braceL)&&!this.tokens.matches1AtIndex(e,U.jsxTagEnd)&&!this.tokens.matches2AtIndex(e,U.slash,U.jsxTagEnd);)e++;if(e===this.tokens.currentIndex()+1){let e=this.tokens.identifierName();Rx(e)&&this.tokens.replaceToken(`\'${e}\'`)}for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken()}processPropsObjectWithDevInfo(e){let t=this.options.production?``:`__self: this, __source: ${this.getDevSource(e)}`;if(!this.tokens.matches1(U.jsxName)&&!this.tokens.matches1(U.braceL)){t?this.tokens.appendCode(`, {${t}}`):this.tokens.appendCode(`, null`);return}this.tokens.appendCode(`, {`),this.processProps(!1),t?this.tokens.appendCode(` ${t}}`):this.tokens.appendCode(`}`)}processProps(e){let t=null;for(;;){if(this.tokens.matches2(U.jsxName,U.eq)){let n=this.tokens.identifierName();if(e&&n===`key`){t!==null&&this.tokens.appendCode(t.replace(/[^\\n]/g,``)),this.tokens.removeToken(),this.tokens.removeToken();let e=this.tokens.snapshot();this.processPropValue(),t=this.tokens.dangerouslyGetAndRemoveCodeSinceSnapshot(e);continue}else this.processPropName(n),this.tokens.replaceToken(`: `),this.processPropValue()}else if(this.tokens.matches1(U.jsxName)){let e=this.tokens.identifierName();this.processPropName(e),this.tokens.appendCode(`: true`)}else if(this.tokens.matches1(U.braceL))this.tokens.replaceToken(``),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken(``);else break;this.tokens.appendCode(`,`)}return t}processPropName(e){e.includes(`-`)?this.tokens.replaceToken(`\'${e}\'`):this.tokens.copyToken()}processPropValue(){this.tokens.matches1(U.braceL)?(this.tokens.replaceToken(``),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken(``)):this.tokens.matches1(U.jsxTagStart)?this.processJSXTag():this.processStringPropValue()}processStringPropValue(){let e=this.tokens.currentToken(),t=this.tokens.code.slice(e.start+1,e.end-1),n=Bx(t),r=Vx(t);this.tokens.replaceToken(r+n)}processAutomaticChildrenAndEndProps(e){e===Bb.StaticChildren?(this.tokens.appendCode(` children: [`),this.processChildren(!1),this.tokens.appendCode(`]}`)):(e===Bb.OneChild&&this.tokens.appendCode(` children: `),this.processChildren(!1),this.tokens.appendCode(`}`))}processChildren(e){let t=e;for(;;){if(this.tokens.matches2(U.jsxTagStart,U.slash))return;let e=!1;if(this.tokens.matches1(U.braceL))this.tokens.matches2(U.braceL,U.braceR)?(this.tokens.replaceToken(``),this.tokens.replaceToken(``)):(this.tokens.replaceToken(t?`, `:``),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken(``),e=!0);else if(this.tokens.matches1(U.jsxTagStart))this.tokens.appendCode(t?`, `:``),this.processJSXTag(),e=!0;else if(this.tokens.matches1(U.jsxText)||this.tokens.matches1(U.jsxEmptyText))e=this.processChildTextElement(t);else throw Error(`Unexpected token when processing JSX children.`);e&&(t=!0)}}processChildTextElement(e){let t=this.tokens.currentToken(),n=this.tokens.code.slice(t.start,t.end),r=Bx(n),i=zx(n);return i===`""`?(this.tokens.replaceToken(r),!1):(this.tokens.replaceToken(`${e?`, `:``}${i}${r}`),!0)}getDevSource(e){return`{fileName: ${this.getFilenameVarName()}, ${e}}`}getFilenameVarName(){return this.filenameVarName||=this.nameManager.claimFreeName(`_jsxFileName`),this.filenameVarName}};function Rx(e){let t=e.charCodeAt(0);return t>=W.lowercaseA&&t<=W.lowercaseZ}function zx(e){let t=``,n=``,r=!1,i=!1;for(let a=0;a<e.length;a++){let o=e[a];if(o===` `||o===` `||o===`\\r`)r||(n+=o);else if(o===`\n`)n=``,r=!0;else{if(i&&r&&(t+=` `),t+=n,n=``,o===`&`){let{entity:n,newI:r}=Hx(e,a+1);a=r-1,t+=n}else t+=o;i=!0,r=!1}}return r||(t+=n),JSON.stringify(t)}function Bx(e){let t=0,n=0;for(let r of e)r===`\n`?(t++,n=0):r===` `&&n++;return`\n`.repeat(t)+` `.repeat(n)}function Vx(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(r===`\n`)if(/\\s/.test(e[n+1]))for(t+=` `;n<e.length&&/\\s/.test(e[n+1]);)n++;else t+=`\n`;else if(r===`&`){let{entity:r,newI:i}=Hx(e,n+1);t+=r,n=i-1}else t+=r}return JSON.stringify(t)}function Hx(e,t){let n=``,r=0,i,a=t;if(e[a]===`#`){let t=10;a++;let n;if(e[a]===`x`)for(t=16,a++,n=a;a<e.length&&Wx(e.charCodeAt(a));)a++;else for(n=a;a<e.length&&Ux(e.charCodeAt(a));)a++;if(e[a]===`;`){let r=e.slice(n,a);r&&(a++,i=String.fromCodePoint(parseInt(r,t)))}}else for(;a<e.length&&r++<10;){let t=e[a];if(a++,t===`;`){i=Nx.get(n);break}n+=t}return i?{entity:i,newI:a}:{entity:`&`,newI:t}}function Ux(e){return e>=W.digit0&&e<=W.digit9}function Wx(e){return e>=W.digit0&&e<=W.digit9||e>=W.lowercaseA&&e<=W.lowercaseF||e>=W.uppercaseA&&e<=W.uppercaseF}function Gx(e,t){let n=Px(t),r=new Set;for(let t=0;t<e.tokens.length;t++){let i=e.tokens[t];i.type===U.name&&!i.isType&&(i.identifierRole===Y.Access||i.identifierRole===Y.ObjectShorthand||i.identifierRole===Y.ExportAccess)&&!i.shadowsGlobal&&r.add(e.identifierNameForToken(i)),i.type===U.jsxTagStart&&r.add(n.base),i.type===U.jsxTagStart&&t+1<e.tokens.length&&e.tokens[t+1].type===U.jsxTagEnd&&(r.add(n.base),r.add(n.fragmentBase)),i.type===U.jsxName&&i.identifierRole===Y.Access&&(!Rx(e.identifierNameForToken(i))||e.tokens[t+1].type===U.dot)&&r.add(e.identifierNameForToken(i))}return r}var Kx=class e{__init(){this.nonTypeIdentifiers=new Set}__init2(){this.importInfoByPath=new Map}__init3(){this.importsToReplace=new Map}__init4(){this.identifierReplacements=new Map}__init5(){this.exportBindingsByLocalName=new Map}constructor(t,n,r,i,a,o,s){this.nameManager=t,this.tokens=n,this.enableLegacyTypeScriptModuleInterop=r,this.options=i,this.isTypeScriptTransformEnabled=a,this.keepUnusedImports=o,this.helperManager=s,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this)}preprocessTokens(){for(let e=0;e<this.tokens.tokens.length;e++)this.tokens.matches1AtIndex(e,U._import)&&!this.tokens.matches3AtIndex(e,U._import,U.name,U.eq)&&this.preprocessImportAtIndex(e),this.tokens.matches1AtIndex(e,U._export)&&!this.tokens.matches2AtIndex(e,U._export,U.eq)&&this.preprocessExportAtIndex(e);this.generateImportReplacements()}pruneTypeOnlyImports(){this.nonTypeIdentifiers=Gx(this.tokens,this.options);for(let[e,t]of this.importInfoByPath.entries())t.hasBareImport||t.hasStarExport||t.exportStarNames.length>0||t.namedExports.length>0||[...t.defaultNames,...t.wildcardNames,...t.namedImports.map(({localName:e})=>e)].every(e=>this.shouldAutomaticallyElideImportedName(e))&&this.importsToReplace.set(e,``)}shouldAutomaticallyElideImportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.nonTypeIdentifiers.has(e)}generateImportReplacements(){for(let[e,t]of this.importInfoByPath.entries()){let{defaultNames:n,wildcardNames:r,namedImports:i,namedExports:a,exportStarNames:o,hasStarExport:s}=t;if(n.length===0&&r.length===0&&i.length===0&&a.length===0&&o.length===0&&!s){this.importsToReplace.set(e,`require(\'${e}\');`);continue}let c=this.getFreeIdentifierForPath(e),l;l=this.enableLegacyTypeScriptModuleInterop?c:r.length>0?r[0]:this.getFreeIdentifierForPath(e);let u=`var ${c} = require(\'${e}\');`;if(r.length>0)for(let e of r){let t=this.enableLegacyTypeScriptModuleInterop?c:`${this.helperManager.getHelperName(`interopRequireWildcard`)}(${c})`;u+=` var ${e} = ${t};`}else o.length>0&&l!==c?u+=` var ${l} = ${this.helperManager.getHelperName(`interopRequireWildcard`)}(${c});`:n.length>0&&l!==c&&(u+=` var ${l} = ${this.helperManager.getHelperName(`interopRequireDefault`)}(${c});`);for(let{importedName:e,localName:t}of a)u+=` ${this.helperManager.getHelperName(`createNamedExportFrom`)}(${c}, \'${t}\', \'${e}\');`;for(let e of o)u+=` exports.${e} = ${l};`;s&&(u+=` ${this.helperManager.getHelperName(`createStarExport`)}(${c});`),this.importsToReplace.set(e,u);for(let e of n)this.identifierReplacements.set(e,`${l}.default`);for(let{importedName:e,localName:t}of i)this.identifierReplacements.set(t,`${c}.${e}`)}}getFreeIdentifierForPath(e){let t=e.split(`/`),n=t[t.length-1].replace(/\\W/g,``);return this.nameManager.claimFreeName(`_${n}`)}preprocessImportAtIndex(e){let t=[],n=[],r=[];if(e++,(this.tokens.matchesContextualAtIndex(e,H._type)||this.tokens.matches1AtIndex(e,U._typeof))&&!this.tokens.matches1AtIndex(e+1,U.comma)&&!this.tokens.matchesContextualAtIndex(e+1,H._from)||this.tokens.matches1AtIndex(e,U.parenL))return;if(this.tokens.matches1AtIndex(e,U.name)&&(t.push(this.tokens.identifierNameAtIndex(e)),e++,this.tokens.matches1AtIndex(e,U.comma)&&e++),this.tokens.matches1AtIndex(e,U.star)&&(e+=2,n.push(this.tokens.identifierNameAtIndex(e)),e++),this.tokens.matches1AtIndex(e,U.braceL)){let n=this.getNamedImports(e+1);e=n.newIndex;for(let e of n.namedImports)e.importedName==="default"?t.push(e.localName):r.push(e)}if(this.tokens.matchesContextualAtIndex(e,H._from)&&e++,!this.tokens.matches1AtIndex(e,U.string))throw Error(`Expected string token at the end of import statement.`);let i=this.tokens.stringValueAtIndex(e),a=this.getImportInfo(i);a.defaultNames.push(...t),a.wildcardNames.push(...n),a.namedImports.push(...r),t.length===0&&n.length===0&&r.length===0&&(a.hasBareImport=!0)}preprocessExportAtIndex(e){if(this.tokens.matches2AtIndex(e,U._export,U._var)||this.tokens.matches2AtIndex(e,U._export,U._let)||this.tokens.matches2AtIndex(e,U._export,U._const))this.preprocessVarExportAtIndex(e);else if(this.tokens.matches2AtIndex(e,U._export,U._function)||this.tokens.matches2AtIndex(e,U._export,U._class)){let t=this.tokens.identifierNameAtIndex(e+2);this.addExportBinding(t,t)}else if(this.tokens.matches3AtIndex(e,U._export,U.name,U._function)){let t=this.tokens.identifierNameAtIndex(e+3);this.addExportBinding(t,t)}else this.tokens.matches2AtIndex(e,U._export,U.braceL)?this.preprocessNamedExportAtIndex(e):this.tokens.matches2AtIndex(e,U._export,U.star)&&this.preprocessExportStarAtIndex(e)}preprocessVarExportAtIndex(e){let t=0;for(let n=e+2;;n++)if(this.tokens.matches1AtIndex(n,U.braceL)||this.tokens.matches1AtIndex(n,U.dollarBraceL)||this.tokens.matches1AtIndex(n,U.bracketL))t++;else if(this.tokens.matches1AtIndex(n,U.braceR)||this.tokens.matches1AtIndex(n,U.bracketR))t--;else if(t===0&&!this.tokens.matches1AtIndex(n,U.name))break;else if(this.tokens.matches1AtIndex(1,U.eq)){let e=this.tokens.currentToken().rhsEndIndex;if(e==null)throw Error(`Expected = token with an end index.`);n=e-1}else{let e=this.tokens.tokens[n];if(Vb(e)){let e=this.tokens.identifierNameAtIndex(n);this.identifierReplacements.set(e,`exports.${e}`)}}}preprocessNamedExportAtIndex(e){e+=2;let{newIndex:t,namedImports:n}=this.getNamedImports(e);if(e=t,this.tokens.matchesContextualAtIndex(e,H._from))e++;else{for(let{importedName:e,localName:t}of n)this.addExportBinding(e,t);return}if(!this.tokens.matches1AtIndex(e,U.string))throw Error(`Expected string token at the end of import statement.`);let r=this.tokens.stringValueAtIndex(e);this.getImportInfo(r).namedExports.push(...n)}preprocessExportStarAtIndex(e){let t=null;if(this.tokens.matches3AtIndex(e,U._export,U.star,U._as)?(e+=3,t=this.tokens.identifierNameAtIndex(e),e+=2):e+=3,!this.tokens.matches1AtIndex(e,U.string))throw Error(`Expected string token at the end of star export statement.`);let n=this.tokens.stringValueAtIndex(e),r=this.getImportInfo(n);t===null?r.hasStarExport=!0:r.exportStarNames.push(t)}getNamedImports(e){let t=[];for(;;){if(this.tokens.matches1AtIndex(e,U.braceR)){e++;break}let n=jx(this.tokens,e);if(e=n.endIndex,n.isType||t.push({importedName:n.leftName,localName:n.rightName}),this.tokens.matches2AtIndex(e,U.comma,U.braceR)){e+=2;break}else if(this.tokens.matches1AtIndex(e,U.braceR)){e++;break}else if(this.tokens.matches1AtIndex(e,U.comma))e++;else throw Error(`Unexpected token: ${JSON.stringify(this.tokens.tokens[e])}`)}return{newIndex:e,namedImports:t}}getImportInfo(e){let t=this.importInfoByPath.get(e);if(t)return t;let n={defaultNames:[],wildcardNames:[],namedImports:[],namedExports:[],hasBareImport:!1,exportStarNames:[],hasStarExport:!1};return this.importInfoByPath.set(e,n),n}addExportBinding(e,t){this.exportBindingsByLocalName.has(e)||this.exportBindingsByLocalName.set(e,[]),this.exportBindingsByLocalName.get(e).push(t)}claimImportCode(e){let t=this.importsToReplace.get(e);return this.importsToReplace.set(e,``),t||``}getIdentifierReplacement(e){return this.identifierReplacements.get(e)||null}resolveExportBinding(e){let t=this.exportBindingsByLocalName.get(e);return!t||t.length===0?null:t.map(e=>`exports.${e}`).join(` = `)}getGlobalNames(){return new Set([...this.identifierReplacements.keys(),...this.exportBindingsByLocalName.keys()])}},qx=44,Jx=59,Yx=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,Xx=new Uint8Array(64),Zx=new Uint8Array(128);for(let e=0;e<Yx.length;e++){let t=Yx.charCodeAt(e);Xx[e]=t,Zx[t]=e}function Qx(e,t){do{let n=t&31;t>>>=5,t>0&&(n|=32),e.write(Xx[n])}while(t>0)}function $x(e){return e<0?-e<<1|1:e<<1}var eS=1024*16,tS=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}},nS=class{constructor(){this.pos=0,this.out=``,this.buffer=new Uint8Array(eS)}write(e){let{buffer:t}=this;t[this.pos++]=e,this.pos===eS&&(this.out+=tS.decode(t),this.pos=0)}flush(){let{buffer:e,out:t,pos:n}=this;return n>0?t+tS.decode(e.subarray(0,n)):t}};function rS(e){let t=new nS,n=0,r=0,i=0,a=0;for(let o=0;o<e.length;o++){let s=e[o];if(o>0&&t.write(Jx),s.length===0)continue;let c=0;for(let e=0;e<s.length;e++){let o=s[e];e>0&&t.write(qx),Qx(t,$x(o[0]-c)),c=o[0],o.length!==1&&(Qx(t,$x(o[1]-n)),Qx(t,$x(o[2]-r)),Qx(t,$x(o[3]-i)),n=o[1],r=o[2],i=o[3],o.length!==4&&(Qx(t,$x(o[4]-a)),a=o[4]))}}return t.flush()}o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self,n.resolveURI=r())})(e,(function(){let e=/^[\\w+.-]+:\\/\\//,t=/^([\\w+.-]+:)\\/\\/([^@/#?]*@)?(\\[[^\\]]+\\]|[^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/,n=/^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;function r(t){return e.test(t)}function i(e){return e.startsWith(`//`)}function a(e){return e.startsWith(`/`)}function o(e){return e.startsWith(`file:`)}function s(e){return/^[.?#]/.test(e)}function c(e){let n=t.exec(e);return u(n[1],n[2]||``,n[3],n[4]||``,n[5]||`/`,n[6]||``,n[7]||``)}function l(e){let t=n.exec(e),r=t[2];return u(`file:`,``,t[1]||``,``,a(r)?r:`/`+r,t[3]||``,t[4]||``)}function u(e,t,n,r,i,a,o){return{scheme:e,user:t,host:n,port:r,path:i,query:a,hash:o,type:7}}function d(e){if(i(e)){let t=c(`http:`+e);return t.scheme=``,t.type=6,t}if(a(e)){let t=c(`http://foo.com`+e);return t.scheme=``,t.host=``,t.type=5,t}if(o(e))return l(e);if(r(e))return c(e);let t=c(`http://foo.com/`+e);return t.scheme=``,t.host=``,t.type=e?e.startsWith(`?`)?3:e.startsWith(`#`)?2:4:1,t}function f(e){if(e.endsWith(`/..`))return e;let t=e.lastIndexOf(`/`);return e.slice(0,t+1)}function p(e,t){m(t,t.type),e.path===`/`?e.path=t.path:e.path=f(t.path)+e.path}function m(e,t){let n=t<=4,r=e.path.split(`/`),i=1,a=0,o=!1;for(let e=1;e<r.length;e++){let t=r[e];if(!t){o=!0;continue}if(o=!1,t!==`.`){if(t===`..`){a?(o=!0,a--,i--):n&&(r[i++]=t);continue}r[i++]=t,a++}}let s=``;for(let e=1;e<i;e++)s+=`/`+r[e];(!s||o&&!s.endsWith(`/..`))&&(s+=`/`),e.path=s}function h(e,t){if(!e&&!t)return``;let n=d(e),r=n.type;if(t&&r!==7){let e=d(t),i=e.type;switch(r){case 1:n.hash=e.hash;case 2:n.query=e.query;case 3:case 4:p(n,e);case 5:n.user=e.user,n.host=e.host,n.port=e.port;case 6:n.scheme=e.scheme}i>r&&(r=i)}m(n,r);let i=n.query+n.hash;switch(r){case 2:case 3:return i;case 4:{let r=n.path.slice(1);return r?s(t||e)&&!s(r)?`./`+r+i:r+i:i||`.`}case 5:return n.path+i;default:return n.scheme+`//`+n.user+n.host+n.port+n.path+i}}return h}))}))();var iS=class{constructor(){this._indexes={__proto__:null},this.array=[]}};function aS(e){return e}function oS(e,t){return aS(e)._indexes[t]}function sS(e,t){let n=oS(e,t);if(n!==void 0)return n;let{array:r,_indexes:i}=aS(e);return i[t]=r.push(t)-1}var cS=0,lS=1,uS=2,dS=3,fS=4,pS=-1,mS=class{constructor({file:e,sourceRoot:t}={}){this._names=new iS,this._sources=new iS,this._sourcesContent=[],this._mappings=[],this.file=e,this.sourceRoot=t,this._ignoreList=new iS}};function hS(e){return e}var gS=(e,t,n,r,i,a,o,s)=>yS(!0,e,t,n,r,i,a,o,s);function _S(e){let{_mappings:t,_sources:n,_sourcesContent:r,_names:i,_ignoreList:a}=hS(e);return CS(t),{version:3,file:e.file||void 0,names:i.array,sourceRoot:e.sourceRoot||void 0,sources:n.array,sourcesContent:r,mappings:t,ignoreList:a.array}}function vS(e){let t=_S(e);return Object.assign({},t,{mappings:rS(t.mappings)})}function yS(e,t,n,r,i,a,o,s,c){let{_mappings:l,_sources:u,_sourcesContent:d,_names:f}=hS(t),p=bS(l,n),m=xS(p,r);if(!i)return e&&wS(p,m)?void 0:SS(p,m,[r]);let h=sS(u,i),g=s?sS(f,s):pS;if(h===d.length&&(d[h]=c??null),!(e&&TS(p,m,h,a,o,g)))return SS(p,m,s?[r,h,a,o,g]:[r,h,a,o])}function bS(e,t){for(let n=e.length;n<=t;n++)e[n]=[];return e[t]}function xS(e,t){let n=e.length;for(let r=n-1;r>=0&&!(t>=e[r][cS]);n=r--);return n}function SS(e,t,n){for(let n=e.length;n>t;n--)e[n]=e[n-1];e[t]=n}function CS(e){let{length:t}=e,n=t;for(let t=n-1;t>=0&&!(e[t].length>0);n=t,t--);n<t&&(e.length=n)}function wS(e,t){return t===0||e[t-1].length===1}function TS(e,t,n,r,i,a){if(t===0)return!1;let o=e[t-1];return o.length!==1&&n===o[lS]&&r===o[uS]&&i===o[dS]&&a===(o.length===5?o[fS]:pS)}function ES({code:e,mappings:t},n,r,i,a){let o=DS(i,a),s=new mS({file:r.compiledFilename}),c=0,l=t[0];for(;l===void 0&&c<t.length-1;)c++,l=t[c];let u=0,d=0;l!==d&&gS(s,u,0,n,u,0);for(let r=0;r<e.length;r++){if(r===l){let e=l-d,i=o[c];for(gS(s,u,e,n,u,i);(l===r||l===void 0)&&c<t.length-1;)c++,l=t[c]}e.charCodeAt(r)===W.lineFeed&&(u++,d=r+1,l!==d&&gS(s,u,0,n,u,0))}let{sourceRoot:f,sourcesContent:p,...m}=vS(s);return m}function DS(e,t){let n=Array(t.length),r=0,i=t[r].start,a=0;for(let o=0;o<e.length;o++)o===i&&(n[r]=i-a,r++,i=t[r].start),e.charCodeAt(o)===W.lineFeed&&(a=o+1);return n}var OS={require:`\n import {createRequire as CREATE_REQUIRE_NAME} from "module";\n const require = CREATE_REQUIRE_NAME(import.meta.url);\n `,interopRequireWildcard:`\n function interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n newObj[key] = obj[key];\n }\n }\n }\n newObj.default = obj;\n return newObj;\n }\n }\n `,interopRequireDefault:`\n function interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n }\n `,createNamedExportFrom:`\n function createNamedExportFrom(obj, localName, importedName) {\n Object.defineProperty(exports, localName, {enumerable: true, configurable: true, get: () => obj[importedName]});\n }\n `,createStarExport:`\n function createStarExport(obj) {\n Object.keys(obj)\n .filter((key) => key !== "default" && key !== "__esModule")\n .forEach((key) => {\n if (exports.hasOwnProperty(key)) {\n return;\n }\n Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]});\n });\n }\n `,nullishCoalesce:`\n function nullishCoalesce(lhs, rhsFn) {\n if (lhs != null) {\n return lhs;\n } else {\n return rhsFn();\n }\n }\n `,asyncNullishCoalesce:`\n async function asyncNullishCoalesce(lhs, rhsFn) {\n if (lhs != null) {\n return lhs;\n } else {\n return await rhsFn();\n }\n }\n `,optionalChain:`\n function optionalChain(ops) {\n let lastAccessLHS = undefined;\n let value = ops[0];\n let i = 1;\n while (i < ops.length) {\n const op = ops[i];\n const fn = ops[i + 1];\n i += 2;\n if ((op === \'optionalAccess\' || op === \'optionalCall\') && value == null) {\n return undefined;\n }\n if (op === \'access\' || op === \'optionalAccess\') {\n lastAccessLHS = value;\n value = fn(value);\n } else if (op === \'call\' || op === \'optionalCall\') {\n value = fn((...args) => value.call(lastAccessLHS, ...args));\n lastAccessLHS = undefined;\n }\n }\n return value;\n }\n `,asyncOptionalChain:`\n async function asyncOptionalChain(ops) {\n let lastAccessLHS = undefined;\n let value = ops[0];\n let i = 1;\n while (i < ops.length) {\n const op = ops[i];\n const fn = ops[i + 1];\n i += 2;\n if ((op === \'optionalAccess\' || op === \'optionalCall\') && value == null) {\n return undefined;\n }\n if (op === \'access\' || op === \'optionalAccess\') {\n lastAccessLHS = value;\n value = await fn(value);\n } else if (op === \'call\' || op === \'optionalCall\') {\n value = await fn((...args) => value.call(lastAccessLHS, ...args));\n lastAccessLHS = undefined;\n }\n }\n return value;\n }\n `,optionalChainDelete:`\n function optionalChainDelete(ops) {\n const result = OPTIONAL_CHAIN_NAME(ops);\n return result == null ? true : result;\n }\n `,asyncOptionalChainDelete:`\n async function asyncOptionalChainDelete(ops) {\n const result = await ASYNC_OPTIONAL_CHAIN_NAME(ops);\n return result == null ? true : result;\n }\n `},kS=class e{__init(){this.helperNames={}}__init2(){this.createRequireName=null}constructor(t){this.nameManager=t,e.prototype.__init.call(this),e.prototype.__init2.call(this)}getHelperName(e){let t=this.helperNames[e];return t||(t=this.nameManager.claimFreeName(`_${e}`),this.helperNames[e]=t,t)}emitHelpers(){let e=``;this.helperNames.optionalChainDelete&&this.getHelperName(`optionalChain`),this.helperNames.asyncOptionalChainDelete&&this.getHelperName(`asyncOptionalChain`);for(let[t,n]of Object.entries(OS)){let r=this.helperNames[t],i=n;t===`optionalChainDelete`?i=i.replace(`OPTIONAL_CHAIN_NAME`,this.helperNames.optionalChain):t===`asyncOptionalChainDelete`?i=i.replace(`ASYNC_OPTIONAL_CHAIN_NAME`,this.helperNames.asyncOptionalChain):t===`require`&&(this.createRequireName===null&&(this.createRequireName=this.nameManager.claimFreeName(`_createRequire`)),i=i.replace(/CREATE_REQUIRE_NAME/g,this.createRequireName)),r&&(e+=` `,e+=i.replace(t,r).replace(/\\s+/g,` `).trim())}return e}};function AS(e,t,n){jS(e,n)&&MS(e,t,n)}function jS(e,t){for(let n of e.tokens)if(n.type===U.name&&!n.isType&&Hb(n)&&t.has(e.identifierNameForToken(n)))return!0;return!1}function MS(e,t,n){let r=[],i=t.length-1;for(let a=e.tokens.length-1;;a--){for(;r.length>0&&r[r.length-1].startTokenIndex===a+1;)r.pop();for(;i>=0&&t[i].endTokenIndex===a+1;)r.push(t[i]),i--;if(a<0)break;let o=e.tokens[a],s=e.identifierNameForToken(o);if(r.length>1&&!o.isType&&o.type===U.name&&n.has(s)){if(Wb(o))NS(r[r.length-1],e,s);else if(Gb(o)){let t=r.length-1;for(;t>0&&!r[t].isFunctionScope;)t--;if(t<0)throw Error(`Did not find parent function scope.`);NS(r[t],e,s)}}}if(r.length>0)throw Error(`Expected empty scope stack after processing file.`)}function NS(e,t,n){for(let r=e.startTokenIndex;r<e.endTokenIndex;r++){let e=t.tokens[r];(e.type===U.name||e.type===U.jsxName)&&t.identifierNameForToken(e)===n&&(e.shadowsGlobal=!0)}}function PS(e,t){let n=[];for(let r of t)r.type===U.name&&n.push(e.slice(r.start,r.end));return n}var FS=class e{__init(){this.usedNames=new Set}constructor(t,n){e.prototype.__init.call(this),this.usedNames=new Set(PS(t,n))}claimFreeName(e){let t=this.findFreeName(e);return this.usedNames.add(t),t}findFreeName(e){if(!this.usedNames.has(e))return e;let t=2;for(;this.usedNames.has(e+String(t));)t++;return e+String(t)}},IS=o((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.DetailContext=e.NoopContext=e.VError=void 0;var n=function(e){t(n,e);function n(t,r){var i=e.call(this,r)||this;return i.path=t,Object.setPrototypeOf(i,n.prototype),i}return n}(Error);e.VError=n,e.NoopContext=function(){function e(){}return e.prototype.fail=function(e,t,n){return!1},e.prototype.unionResolver=function(){return this},e.prototype.createContext=function(){return this},e.prototype.resolveUnion=function(e){},e}();var r=function(){function e(){this._propNames=[``],this._messages=[null],this._score=0}return e.prototype.fail=function(e,t,n){return this._propNames.push(e),this._messages.push(t),this._score+=n,!1},e.prototype.unionResolver=function(){return new i},e.prototype.resolveUnion=function(e){for(var t,n,r=e,i=null,a=0,o=r.contexts;a<o.length;a++){var s=o[a];(!i||s._score>=i._score)&&(i=s)}i&&i._score>0&&((t=this._propNames).push.apply(t,i._propNames),(n=this._messages).push.apply(n,i._messages))},e.prototype.getError=function(e){for(var t=[],r=this._propNames.length-1;r>=0;r--){var i=this._propNames[r];e+=typeof i==`number`?`[`+i+`]`:i?`.`+i:``;var a=this._messages[r];a&&t.push(e+` `+a)}return new n(e,t.join(`; `))},e.prototype.getErrorDetail=function(e){for(var t=[],n=this._propNames.length-1;n>=0;n--){var r=this._propNames[n];e+=typeof r==`number`?`[`+r+`]`:r?`.`+r:``;var i=this._messages[n];i&&t.push({path:e,message:i})}for(var a=null,n=t.length-1;n>=0;n--)a&&(t[n].nested=[a]),a=t[n];return a},e}();e.DetailContext=r;var i=function(){function e(){this.contexts=[]}return e.prototype.createContext=function(){var e=new r;return this.contexts.push(e),e},e}()})),LS=o((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.basicTypes=e.BasicType=e.TParamList=e.TParam=e.param=e.TFunc=e.func=e.TProp=e.TOptional=e.opt=e.TIface=e.iface=e.TEnumLiteral=e.enumlit=e.TEnumType=e.enumtype=e.TIntersection=e.intersection=e.TUnion=e.union=e.TTuple=e.tuple=e.TArray=e.array=e.TLiteral=e.lit=e.TName=e.name=e.TType=void 0;var n=IS(),r=function(){function e(){}return e}();e.TType=r;function i(e){return typeof e==`string`?o(e):e}function a(e,t){var n=e[t];if(!n)throw Error(`Unknown type `+t);return n}function o(e){return new s(e)}e.name=o;var s=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.name=t,n._failMsg=`is not a `+t,n}return n.prototype.getChecker=function(e,t,r){var i=this,o=a(e,this.name),s=o.getChecker(e,t,r);return o instanceof b||o instanceof n?s:function(e,t){return s(e,t)?!0:t.fail(null,i._failMsg,0)}},n}(r);e.TName=s;function c(e){return new l(e)}e.lit=c;var l=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.value=t,n.name=JSON.stringify(t),n._failMsg=`is not `+n.name,n}return n.prototype.getChecker=function(e,t){var n=this;return function(e,t){return e===n.value||t.fail(null,n._failMsg,-1)}},n}(r);e.TLiteral=l;function u(e){return new d(i(e))}e.array=u;var d=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.ttype=t,n}return n.prototype.getChecker=function(e,t){var n=this.ttype.getChecker(e,t);return function(e,t){if(!Array.isArray(e))return t.fail(null,`is not an array`,0);for(var r=0;r<e.length;r++)if(!n(e[r],t))return t.fail(r,null,1);return!0}},n}(r);e.TArray=d;function f(){return new p([...arguments].map(function(e){return i(e)}))}e.tuple=f;var p=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.ttypes=t,n}return n.prototype.getChecker=function(e,t){var n=this.ttypes.map(function(n){return n.getChecker(e,t)}),r=function(e,t){if(!Array.isArray(e))return t.fail(null,`is not an array`,0);for(var r=0;r<n.length;r++)if(!n[r](e[r],t))return t.fail(r,null,1);return!0};return t?function(e,t){return r(e,t)?e.length<=n.length||t.fail(n.length,`is extraneous`,2):!1}:r},n}(r);e.TTuple=p;function m(){return new h([...arguments].map(function(e){return i(e)}))}e.union=m;var h=function(e){t(n,e);function n(t){var n=e.call(this)||this;n.ttypes=t;var r=t.map(function(e){return e instanceof s||e instanceof l?e.name:null}).filter(function(e){return e}),i=t.length-r.length;return r.length?(i>0&&r.push(i+` more`),n._failMsg=`is none of `+r.join(`, `)):n._failMsg=`is none of `+i+` types`,n}return n.prototype.getChecker=function(e,t){var n=this,r=this.ttypes.map(function(n){return n.getChecker(e,t)});return function(e,t){for(var i=t.unionResolver(),a=0;a<r.length;a++)if(r[a](e,i.createContext()))return!0;return t.resolveUnion(i),t.fail(null,n._failMsg,0)}},n}(r);e.TUnion=h;function g(){return new _([...arguments].map(function(e){return i(e)}))}e.intersection=g;var _=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.ttypes=t,n}return n.prototype.getChecker=function(e,t){var n=new Set,r=this.ttypes.map(function(r){return r.getChecker(e,t,n)});return function(e,t){return r.every(function(n){return n(e,t)})?!0:t.fail(null,null,0)}},n}(r);e.TIntersection=_;function v(e){return new y(e)}e.enumtype=v;var y=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.members=t,n.validValues=new Set,n._failMsg=`is not a valid enum value`,n.validValues=new Set(Object.keys(t).map(function(e){return t[e]})),n}return n.prototype.getChecker=function(e,t){var n=this;return function(e,t){return n.validValues.has(e)?!0:t.fail(null,n._failMsg,0)}},n}(r);e.TEnumType=y;function ee(e,t){return new te(e,t)}e.enumlit=ee;var te=function(e){t(n,e);function n(t,n){var r=e.call(this)||this;return r.enumName=t,r.prop=n,r._failMsg=`is not `+t+`.`+n,r}return n.prototype.getChecker=function(e,t){var n=this,r=a(e,this.enumName);if(!(r instanceof y))throw Error(`Type `+this.enumName+` used in enumlit is not an enum type`);var i=r.members[this.prop];if(!r.members.hasOwnProperty(this.prop))throw Error(`Unknown value `+this.enumName+`.`+this.prop+` used in enumlit`);return function(e,t){return e===i||t.fail(null,n._failMsg,-1)}},n}(r);e.TEnumLiteral=te;function ne(e){return Object.keys(e).map(function(t){return re(t,e[t])})}function re(e,t){return t instanceof se?new ce(e,t.ttype,!0):new ce(e,i(t),!1)}function ie(e,t){return new ae(e,ne(t))}e.iface=ie;var ae=function(e){t(r,e);function r(t,n){var r=e.call(this)||this;return r.bases=t,r.props=n,r.propSet=new Set(n.map(function(e){return e.name})),r}return r.prototype.getChecker=function(e,t,r){var i=this,o=this.bases.map(function(n){return a(e,n).getChecker(e,t)}),s=this.props.map(function(n){return n.ttype.getChecker(e,t)}),c=new n.NoopContext,l=this.props.map(function(e,t){return!e.isOpt&&!s[t](void 0,c)}),u=function(e,t){if(typeof e!=`object`||!e)return t.fail(null,`is not an object`,0);for(var n=0;n<o.length;n++)if(!o[n](e,t))return!1;for(var n=0;n<s.length;n++){var r=i.props[n].name,a=e[r];if(a===void 0){if(l[n])return t.fail(r,`is missing`,1)}else if(!s[n](a,t))return t.fail(r,null,1)}return!0};if(!t)return u;var d=this.propSet;return r&&(this.propSet.forEach(function(e){return r.add(e)}),d=r),function(e,t){if(!u(e,t))return!1;for(var n in e)if(!d.has(n))return t.fail(n,`is extraneous`,2);return!0}},r}(r);e.TIface=ae;function oe(e){return new se(i(e))}e.opt=oe;var se=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.ttype=t,n}return n.prototype.getChecker=function(e,t){var n=this.ttype.getChecker(e,t);return function(e,t){return e===void 0||n(e,t)}},n}(r);e.TOptional=se;var ce=function(){function e(e,t,n){this.name=e,this.ttype=t,this.isOpt=n}return e}();e.TProp=ce;function le(e){return new ue(new pe([...arguments].slice(1)),i(e))}e.func=le;var ue=function(e){t(n,e);function n(t,n){var r=e.call(this)||this;return r.paramList=t,r.result=n,r}return n.prototype.getChecker=function(e,t){return function(e,t){return typeof e==`function`||t.fail(null,`is not a function`,0)}},n}(r);e.TFunc=ue;function de(e,t,n){return new fe(e,i(t),!!n)}e.param=de;var fe=function(){function e(e,t,n){this.name=e,this.ttype=t,this.isOpt=n}return e}();e.TParam=fe;var pe=function(e){t(r,e);function r(t){var n=e.call(this)||this;return n.params=t,n}return r.prototype.getChecker=function(e,t){var r=this,i=this.params.map(function(n){return n.ttype.getChecker(e,t)}),a=new n.NoopContext,o=this.params.map(function(e,t){return!e.isOpt&&!i[t](void 0,a)}),s=function(e,t){if(!Array.isArray(e))return t.fail(null,`is not an array`,0);for(var n=0;n<i.length;n++){var a=r.params[n];if(e[n]===void 0){if(o[n])return t.fail(a.name,`is missing`,1)}else if(!i[n](e[n],t))return t.fail(a.name,null,1)}return!0};return t?function(e,t){return s(e,t)?e.length<=i.length||t.fail(i.length,`is extraneous`,2):!1}:s},r}(r);e.TParamList=pe;var b=function(e){t(n,e);function n(t,n){var r=e.call(this)||this;return r.validator=t,r.message=n,r}return n.prototype.getChecker=function(e,t){var n=this;return function(e,t){return n.validator(e)?!0:t.fail(null,n.message,0)}},n}(r);e.BasicType=b,e.basicTypes={any:new b(function(e){return!0},`is invalid`),number:new b(function(e){return typeof e==`number`},`is not a number`),object:new b(function(e){return typeof e==`object`&&e},`is not an object`),boolean:new b(function(e){return typeof e==`boolean`},`is not a boolean`),string:new b(function(e){return typeof e==`string`},`is not a string`),symbol:new b(function(e){return typeof e==`symbol`},`is not a symbol`),void:new b(function(e){return e==null},`is not void`),undefined:new b(function(e){return e===void 0},`is not undefined`),null:new b(function(e){return e===null},`is not null`),never:new b(function(e){return!1},`is unexpected`),Date:new b(he(`[object Date]`),`is not a Date`),RegExp:new b(he(`[object RegExp]`),`is not a RegExp`)};var me=Object.prototype.toString;function he(e){return function(t){return typeof t==`object`&&t&&me.call(t)===e}}typeof Buffer<`u`&&(e.basicTypes.Buffer=new b(function(e){return Buffer.isBuffer(e)},`is not a Buffer`));for(var ge=function(t){e.basicTypes[t.name]=new b(function(e){return e instanceof t},`is not a `+t.name)},_e=0,ve=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,ArrayBuffer];_e<ve.length;_e++){var ye=ve[_e];ge(ye)}})),RS=c(o((e=>{var t=e&&e.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r};Object.defineProperty(e,"__esModule",{value:!0}),e.Checker=e.createCheckers=void 0;var n=LS(),r=IS(),i=LS();Object.defineProperty(e,"TArray",{enumerable:!0,get:function(){return i.TArray}}),Object.defineProperty(e,"TEnumType",{enumerable:!0,get:function(){return i.TEnumType}}),Object.defineProperty(e,"TEnumLiteral",{enumerable:!0,get:function(){return i.TEnumLiteral}}),Object.defineProperty(e,"TFunc",{enumerable:!0,get:function(){return i.TFunc}}),Object.defineProperty(e,"TIface",{enumerable:!0,get:function(){return i.TIface}}),Object.defineProperty(e,"TLiteral",{enumerable:!0,get:function(){return i.TLiteral}}),Object.defineProperty(e,"TName",{enumerable:!0,get:function(){return i.TName}}),Object.defineProperty(e,"TOptional",{enumerable:!0,get:function(){return i.TOptional}}),Object.defineProperty(e,"TParam",{enumerable:!0,get:function(){return i.TParam}}),Object.defineProperty(e,"TParamList",{enumerable:!0,get:function(){return i.TParamList}}),Object.defineProperty(e,"TProp",{enumerable:!0,get:function(){return i.TProp}}),Object.defineProperty(e,"TTuple",{enumerable:!0,get:function(){return i.TTuple}}),Object.defineProperty(e,"TType",{enumerable:!0,get:function(){return i.TType}}),Object.defineProperty(e,"TUnion",{enumerable:!0,get:function(){return i.TUnion}}),Object.defineProperty(e,"TIntersection",{enumerable:!0,get:function(){return i.TIntersection}}),Object.defineProperty(e,"array",{enumerable:!0,get:function(){return i.array}}),Object.defineProperty(e,"enumlit",{enumerable:!0,get:function(){return i.enumlit}}),Object.defineProperty(e,"enumtype",{enumerable:!0,get:function(){return i.enumtype}}),Object.defineProperty(e,"func",{enumerable:!0,get:function(){return i.func}}),Object.defineProperty(e,"iface",{enumerable:!0,get:function(){return i.iface}}),Object.defineProperty(e,"lit",{enumerable:!0,get:function(){return i.lit}}),Object.defineProperty(e,"name",{enumerable:!0,get:function(){return i.name}}),Object.defineProperty(e,"opt",{enumerable:!0,get:function(){return i.opt}}),Object.defineProperty(e,"param",{enumerable:!0,get:function(){return i.param}}),Object.defineProperty(e,"tuple",{enumerable:!0,get:function(){return i.tuple}}),Object.defineProperty(e,"union",{enumerable:!0,get:function(){return i.union}}),Object.defineProperty(e,"intersection",{enumerable:!0,get:function(){return i.intersection}}),Object.defineProperty(e,"BasicType",{enumerable:!0,get:function(){return i.BasicType}});var a=IS();Object.defineProperty(e,"VError",{enumerable:!0,get:function(){return a.VError}});function o(){for(var e=[...arguments],r=Object.assign.apply(Object,t([{},n.basicTypes],e)),i={},a=0,o=e;a<o.length;a++)for(var c=o[a],l=0,u=Object.keys(c);l<u.length;l++){var d=u[l];i[d]=new s(r,c[d])}return i}e.createCheckers=o;var s=function(){function e(e,t,r){if(r===void 0&&(r=`value`),this.suite=e,this.ttype=t,this._path=r,this.props=new Map,t instanceof n.TIface)for(var i=0,a=t.props;i<a.length;i++){var o=a[i];this.props.set(o.name,o.ttype)}this.checkerPlain=this.ttype.getChecker(e,!1),this.checkerStrict=this.ttype.getChecker(e,!0)}return e.prototype.setReportedPath=function(e){this._path=e},e.prototype.check=function(e){return this._doCheck(this.checkerPlain,e)},e.prototype.test=function(e){return this.checkerPlain(e,new r.NoopContext)},e.prototype.validate=function(e){return this._doValidate(this.checkerPlain,e)},e.prototype.strictCheck=function(e){return this._doCheck(this.checkerStrict,e)},e.prototype.strictTest=function(e){return this.checkerStrict(e,new r.NoopContext)},e.prototype.strictValidate=function(e){return this._doValidate(this.checkerStrict,e)},e.prototype.getProp=function(t){var n=this.props.get(t);if(!n)throw Error(`Type has no property `+t);return new e(this.suite,n,this._path+`.`+t)},e.prototype.methodArgs=function(t){var n=this._getMethod(t);return new e(this.suite,n.paramList)},e.prototype.methodResult=function(t){var n=this._getMethod(t);return new e(this.suite,n.result)},e.prototype.getArgs=function(){if(!(this.ttype instanceof n.TFunc))throw Error(`getArgs() applied to non-function`);return new e(this.suite,this.ttype.paramList)},e.prototype.getResult=function(){if(!(this.ttype instanceof n.TFunc))throw Error(`getResult() applied to non-function`);return new e(this.suite,this.ttype.result)},e.prototype.getType=function(){return this.ttype},e.prototype._doCheck=function(e,t){if(!e(t,new r.NoopContext)){var n=new r.DetailContext;throw e(t,n),n.getError(this._path)}},e.prototype._doValidate=function(e,t){if(e(t,new r.NoopContext))return null;var n=new r.DetailContext;return e(t,n),n.getErrorDetail(this._path)},e.prototype._getMethod=function(e){var t=this.props.get(e);if(!t)throw Error(`Type has no property `+e);if(!(t instanceof n.TFunc))throw Error(`Property `+e+` is not a method`);return t},e}();e.Checker=s}))()),zS={Transform:RS.union(RS.lit(`jsx`),RS.lit(`typescript`),RS.lit(`flow`),RS.lit(`imports`),RS.lit(`react-hot-loader`),RS.lit(`jest`)),SourceMapOptions:RS.iface([],{compiledFilename:`string`}),Options:RS.iface([],{transforms:RS.array(`Transform`),disableESTransforms:RS.opt(`boolean`),jsxRuntime:RS.opt(RS.union(RS.lit(`classic`),RS.lit(`automatic`),RS.lit(`preserve`))),production:RS.opt(`boolean`),jsxImportSource:RS.opt(`string`),jsxPragma:RS.opt(`string`),jsxFragmentPragma:RS.opt(`string`),keepUnusedImports:RS.opt(`boolean`),preserveDynamicImport:RS.opt(`boolean`),injectCreateRequireForImportRequire:RS.opt(`boolean`),enableLegacyTypeScriptModuleInterop:RS.opt(`boolean`),enableLegacyBabel5ModuleInterop:RS.opt(`boolean`),sourceMapOptions:RS.opt(`SourceMapOptions`),filePath:RS.opt(`string`)})},{Options:BS}=(0,RS.createCheckers)(zS);function VS(e){BS.strictCheck(e)}function HS(){X(),oT(!1)}function US(e){X(),qS(e)}function WS(e){$(),KS(e)}function GS(){$(),G.tokens[G.tokens.length-1].identifierRole=Y.ImportDeclaration}function KS(e){let t;t=G.scopeDepth===0?Y.TopLevelDeclaration:e?Y.BlockScopedDeclaration:Y.FunctionScopedDeclaration,G.tokens[G.tokens.length-1].identifierRole=t}function qS(e){switch(G.type){case U._this:{let e=Xb(0);X(),Zb(e);return}case U._yield:case U.name:G.type=U.name,WS(e);return;case U.bracketL:X(),JS(U.bracketR,e,!0);return;case U.braceL:IT(!0,e);return;default:jb()}}function JS(e,t,n=!1,r=!1,i=0){let a=!0,o=!1,s=G.tokens.length;for(;!Z(e)&&!G.error;)if(a?a=!1:(J(U.comma),G.tokens[G.tokens.length-1].contextId=i,!o&&G.tokens[s].isType&&(G.tokens[G.tokens.length-1].isType=!0,o=!0)),!(n&&Q(U.comma))){if(Z(e))break;if(Q(U.ellipsis)){US(t),XS(),Z(U.comma),J(e);break}else YS(r,t)}}function YS(e,t){e&&tC([H._public,H._protected,H._private,H._readonly,H._override]),ZS(t),XS(),ZS(t,!0)}function XS(){gb?iD():hb&&Bw()}function ZS(e,t=!1){if(t||qS(e),!Z(U.eq))return;let n=G.tokens.length-1;oT(),G.tokens[n].rhsEndIndex=G.tokens.length}function QS(){return Q(U.name)}function $S(){return Q(U.name)||!!(G.type&U.IS_KEYWORD)||Q(U.string)||Q(U.num)||Q(U.bigint)||Q(U.decimal)}function eC(){let e=G.snapshot();return X(),(Q(U.bracketL)||Q(U.braceL)||Q(U.star)||Q(U.ellipsis)||Q(U.hash)||$S())&&!Db()?!0:(G.restoreFromSnapshot(e),!1)}function tC(e){for(;nC(e)!==null;);}function nC(e){if(!Q(U.name))return null;let t=G.contextualKeyword;if(e.indexOf(t)!==-1&&eC()){switch(t){case H._readonly:G.tokens[G.tokens.length-1].type=U._readonly;break;case H._abstract:G.tokens[G.tokens.length-1].type=U._abstract;break;case H._static:G.tokens[G.tokens.length-1].type=U._static;break;case H._public:G.tokens[G.tokens.length-1].type=U._public;break;case H._private:G.tokens[G.tokens.length-1].type=U._private;break;case H._protected:G.tokens[G.tokens.length-1].type=U._protected;break;case H._override:G.tokens[G.tokens.length-1].type=U._override;break;case H._declare:G.tokens[G.tokens.length-1].type=U._declare;break;default:break}return t}return null}function rC(){for($();Z(U.dot);)$()}function iC(){rC(),!Db()&&Q(U.lessThan)&&yw()}function aC(){X(),qC()}function oC(){X()}function sC(){J(U._typeof),Q(U._import)?cC():rC(),!Db()&&Q(U.lessThan)&&yw()}function cC(){J(U._import),J(U.parenL),J(U.string),J(U.parenR),Z(U.dot)&&rC(),Q(U.lessThan)&&yw()}function lC(){Z(U._const);let e=Z(U._in),t=wb(H._out);Z(U._const),(e||t)&&!Q(U.name)?G.tokens[G.tokens.length-1].type=U.name:$(),Z(U._extends)&&JC(),Z(U.eq)&&JC()}function uC(){Q(U.lessThan)&&dC()}function dC(){let e=Xb(0);for(Q(U.lessThan)||Q(U.typeParameterStart)?X():jb();!Z(U.greaterThan)&&!G.error;)lC(),Z(U.comma);Zb(e)}function fC(e){let t=e===U.arrow;uC(),J(U.parenL),G.scopeDepth++,pC(!1),G.scopeDepth--,(t||Q(e))&&HC(e)}function pC(e){JS(U.parenR,e)}function mC(){Z(U.comma)||Ab()}function hC(){fC(U.colon),mC()}function gC(){let e=G.snapshot();X();let t=Z(U.name)&&Q(U.colon);return G.restoreFromSnapshot(e),t}function _C(){if(!(Q(U.bracketL)&&gC()))return!1;let e=Xb(0);return J(U.bracketL),$(),qC(),J(U.bracketR),WC(),mC(),Zb(e),!0}function vC(e){Z(U.question),!e&&(Q(U.parenL)||Q(U.lessThan))?(fC(U.colon),mC()):(WC(),mC())}function yC(){if(Q(U.parenL)||Q(U.lessThan)){hC();return}if(Q(U._new)){X(),Q(U.parenL)||Q(U.lessThan)?hC():vC(!1);return}let e=!!nC([H._readonly]);_C()||((q(H._get)||q(H._set))&&eC(),VT(-1),vC(e))}function bC(){xC()}function xC(){for(J(U.braceL);!Z(U.braceR)&&!G.error;)yC()}function SC(){let e=G.snapshot(),t=CC();return G.restoreFromSnapshot(e),t}function CC(){return X(),Z(U.plus)||Z(U.minus)?q(H._readonly):(q(H._readonly)&&X(),!Q(U.bracketL)||(X(),!QS())?!1:(X(),Q(U._in)))}function wC(){$(),J(U._in),JC()}function TC(){J(U.braceL),Q(U.plus)||Q(U.minus)?(X(),Tb(H._readonly)):wb(H._readonly),J(U.bracketL),wC(),wb(H._as)&&JC(),J(U.bracketR),Q(U.plus)||Q(U.minus)?(X(),J(U.question)):Z(U.question),GC(),Ab(),J(U.braceR)}function EC(){for(J(U.bracketL);!Z(U.bracketR)&&!G.error;)DC(),Z(U.comma)}function DC(){Z(U.ellipsis)?JC():(JC(),Z(U.question)),Z(U.colon)&&JC()}function OC(){J(U.parenL),JC(),J(U.parenR)}function kC(){for(Jb(),Jb();!Q(U.backQuote)&&!G.error;)J(U.dollarBraceL),JC(),Jb(),Jb();X()}var AC;(function(e){e[e.TSFunctionType=0]=`TSFunctionType`,e[e.TSConstructorType=1]=`TSConstructorType`,e[e.TSAbstractConstructorType=2]=`TSAbstractConstructorType`})(AC||={});function jC(e){e===AC.TSAbstractConstructorType&&Tb(H._abstract),(e===AC.TSConstructorType||e===AC.TSAbstractConstructorType)&&J(U._new);let t=G.inDisallowConditionalTypesContext;G.inDisallowConditionalTypesContext=!1,fC(U.arrow),G.inDisallowConditionalTypesContext=t}function MC(){switch(G.type){case U.name:iC();return;case U._void:case U._null:X();return;case U.string:case U.num:case U.bigint:case U.decimal:case U._true:case U._false:DT();return;case U.minus:X(),DT();return;case U._this:oC(),q(H._is)&&!Db()&&aC();return;case U._typeof:sC();return;case U._import:cC();return;case U.braceL:SC()?TC():bC();return;case U.bracketL:EC();return;case U.parenL:OC();return;case U.backQuote:kC();return;default:if(G.type&U.IS_KEYWORD){X(),G.tokens[G.tokens.length-1].type=U.name;return}break}jb()}function NC(){for(MC();!Db()&&Z(U.bracketL);)Z(U.bracketR)||(JC(),J(U.bracketR))}function PC(){if(Tb(H._infer),$(),Q(U._extends)){let e=G.snapshot();J(U._extends);let t=G.inDisallowConditionalTypesContext;G.inDisallowConditionalTypesContext=!0,JC(),G.inDisallowConditionalTypesContext=t,(G.error||!G.inDisallowConditionalTypesContext&&Q(U.question))&&G.restoreFromSnapshot(e)}}function FC(){if(q(H._keyof)||q(H._unique)||q(H._readonly))X(),FC();else if(q(H._infer))PC();else{let e=G.inDisallowConditionalTypesContext;G.inDisallowConditionalTypesContext=!1,NC(),G.inDisallowConditionalTypesContext=e}}function IC(){if(Z(U.bitwiseAND),FC(),Q(U.bitwiseAND))for(;Z(U.bitwiseAND);)FC()}function LC(){if(Z(U.bitwiseOR),IC(),Q(U.bitwiseOR))for(;Z(U.bitwiseOR);)IC()}function RC(){return Q(U.lessThan)?!0:Q(U.parenL)&&BC()}function zC(){if(Q(U.name)||Q(U._this))return X(),!0;if(Q(U.braceL)||Q(U.bracketL)){let e=1;for(X();e>0&&!G.error;)Q(U.braceL)||Q(U.bracketL)?e++:(Q(U.braceR)||Q(U.bracketR))&&e--,X();return!0}return!1}function BC(){let e=G.snapshot(),t=VC();return G.restoreFromSnapshot(e),t}function VC(){return X(),!!(Q(U.parenR)||Q(U.ellipsis)||zC()&&(Q(U.colon)||Q(U.comma)||Q(U.question)||Q(U.eq)||Q(U.parenR)&&(X(),Q(U.arrow))))}function HC(e){let t=Xb(0);J(e),KC()||JC(),Zb(t)}function UC(){Q(U.colon)&&HC(U.colon)}function WC(){Q(U.colon)&&qC()}function GC(){Z(U.colon)&&JC()}function KC(){let e=G.snapshot();return q(H._asserts)?(X(),wb(H._is)?(JC(),!0):QS()||Q(U._this)?(X(),wb(H._is)&&JC(),!0):(G.restoreFromSnapshot(e),!1)):QS()||Q(U._this)?(X(),q(H._is)&&!Db()?(X(),JC(),!0):(G.restoreFromSnapshot(e),!1)):!1}function qC(){let e=Xb(0);J(U.colon),JC(),Zb(e)}function JC(){if(XC(),G.inDisallowConditionalTypesContext||Db()||!Z(U._extends))return;let e=G.inDisallowConditionalTypesContext;G.inDisallowConditionalTypesContext=!0,XC(),G.inDisallowConditionalTypesContext=e,J(U.question),JC(),J(U.colon),JC()}function YC(){return q(H._abstract)&&$b()===U._new}function XC(){if(RC()){jC(AC.TSFunctionType);return}if(Q(U._new)){jC(AC.TSConstructorType);return}else if(YC()){jC(AC.TSAbstractConstructorType);return}LC()}function ZC(){let e=Xb(1);JC(),J(U.greaterThan),Zb(e),pT()}function QC(){if(Z(U.jsxTagStart)){G.tokens[G.tokens.length-1].type=U.typeParameterStart;let e=Xb(1);for(;!Q(U.greaterThan)&&!G.error;)JC(),Z(U.comma);eT(),Zb(e)}}function $C(){for(;!Q(U.braceL)&&!G.error;)ew(),Z(U.comma)}function ew(){rC(),Q(U.lessThan)&&yw()}function tw(){WS(!1),uC(),Z(U._extends)&&$C(),xC()}function nw(){WS(!1),uC(),J(U.eq),JC(),Ab()}function rw(){if(Q(U.string)?DT():$(),Z(U.eq)){let e=G.tokens.length-1;oT(),G.tokens[e].rhsEndIndex=G.tokens.length}}function iw(){for(WS(!1),J(U.braceL);!Z(U.braceR)&&!G.error;)rw(),Z(U.comma)}function aw(){J(U.braceL),GD(U.braceR)}function ow(){WS(!1),Z(U.dot)?ow():aw()}function sw(){q(H._global)?$():Q(U.string)?wT():jb(),Q(U.braceL)?aw():Ab()}function cw(){GS(),J(U.eq),uw(),Ab()}function lw(){return q(H._require)&&$b()===U.parenL}function uw(){lw()?dw():rC()}function dw(){Tb(H._require),J(U.parenL),Q(U.string)||jb(),DT(),J(U.parenR)}function fw(){if(kb())return!1;switch(G.type){case U._function:{let e=Xb(1);X();let t=G.start;return XD(t,!0),Zb(e),!0}case U._class:{let e=Xb(1);return QD(!0,!1),Zb(e),!0}case U._const:if(Q(U._const)&&Cb(H._enum)){let e=Xb(1);return J(U._const),Tb(H._enum),G.tokens[G.tokens.length-1].type=U._enum,iw(),Zb(e),!0}case U._var:case U._let:{let e=Xb(1);return zD(G.type!==U._var),Zb(e),!0}case U.name:{let e=Xb(1),t=G.contextualKeyword,n=!1;return t===H._global?(sw(),n=!0):n=hw(t,!0),Zb(e),n}default:return!1}}function pw(){return hw(G.contextualKeyword,!0)}function mw(e){switch(e){case H._declare:{let e=G.tokens.length-1;if(fw())return G.tokens[e].type=U._declare,!0;break}case H._global:if(Q(U.braceL))return aw(),!0;break;default:return hw(e,!1)}return!1}function hw(e,t){switch(e){case H._abstract:if(gw(t)&&Q(U._class))return G.tokens[G.tokens.length-1].type=U._abstract,QD(!0,!1),!0;break;case H._enum:if(gw(t)&&Q(U.name))return G.tokens[G.tokens.length-1].type=U._enum,iw(),!0;break;case H._interface:if(gw(t)&&Q(U.name)){let e=Xb(t?2:1);return tw(),Zb(e),!0}break;case H._module:if(gw(t)){if(Q(U.string)){let e=Xb(t?2:1);return sw(),Zb(e),!0}else if(Q(U.name)){let e=Xb(t?2:1);return ow(),Zb(e),!0}}break;case H._namespace:if(gw(t)&&Q(U.name)){let e=Xb(t?2:1);return ow(),Zb(e),!0}break;case H._type:if(gw(t)&&Q(U.name)){let e=Xb(t?2:1);return nw(),Zb(e),!0}break;default:break}return!1}function gw(e){return e?(X(),!0):!kb()}function _w(){let e=G.snapshot();return dC(),ZD(),UC(),J(U.arrow),G.error?(G.restoreFromSnapshot(e),!1):(GT(!0),!0)}function vw(){G.type===U.bitShiftL&&(--G.pos,ux(U.lessThan)),yw()}function yw(){let e=Xb(0);for(J(U.lessThan);!Q(U.greaterThan)&&!G.error;)JC(),Z(U.comma);e?(J(U.greaterThan),Zb(e)):(Zb(e),yx(),J(U.greaterThan),G.tokens[G.tokens.length-1].isType=!0)}function bw(){if(Q(U.name))switch(G.contextualKeyword){case H._abstract:case H._declare:case H._enum:case H._interface:case H._module:case H._namespace:case H._type:return!0;default:break}return!1}function xw(e,t){if(Q(U.colon)&&HC(U.colon),!Q(U.braceL)&&kb()){let t=G.tokens.length-1;for(;t>=0&&(G.tokens[t].start>=e||G.tokens[t].type===U._default||G.tokens[t].type===U._export);)G.tokens[t].isType=!0,t--;return}GT(!1,t)}function Sw(e,t,n){if(!Db()&&Z(U.bang)){G.tokens[G.tokens.length-1].type=U.nonNullAssertion;return}if(Q(U.lessThan)||Q(U.bitShiftL)){let n=G.snapshot();if(!t&&yT()&&_w())return;if(vw(),!t&&Z(U.parenL)?(G.tokens[G.tokens.length-1].subscriptStartIndex=e,bT()):Q(U.backQuote)?FT():(G.type===U.greaterThan||G.type!==U.parenL&&G.type&U.IS_EXPRESSION_START&&!Db())&&jb(),G.error)G.restoreFromSnapshot(n);else return}else!t&&Q(U.questionDot)&&$b()===U.lessThan&&(X(),G.tokens[e].isOptionalChainStart=!0,G.tokens[G.tokens.length-1].subscriptStartIndex=e,yw(),J(U.parenL),bT());vT(e,t,n)}function Cw(){if(Z(U._import))return q(H._type)&&$b()!==U.eq&&Tb(H._type),cw(),!0;if(Z(U.eq))return aT(),Ab(),!0;if(wb(H._as))return Tb(H._namespace),$(),Ab(),!0;if(q(H._type)){let e=$b();(e===U.braceL||e===U.star)&&X()}return!1}function ww(){if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-1].identifierRole=Y.ImportDeclaration;return}if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-1].identifierRole=Y.ImportDeclaration,G.tokens[G.tokens.length-2].isType=!0,G.tokens[G.tokens.length-1].isType=!0;return}if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-3].identifierRole=Y.ImportAccess,G.tokens[G.tokens.length-1].identifierRole=Y.ImportDeclaration;return}$(),G.tokens[G.tokens.length-3].identifierRole=Y.ImportAccess,G.tokens[G.tokens.length-1].identifierRole=Y.ImportDeclaration,G.tokens[G.tokens.length-4].isType=!0,G.tokens[G.tokens.length-3].isType=!0,G.tokens[G.tokens.length-2].isType=!0,G.tokens[G.tokens.length-1].isType=!0}function Tw(){if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-1].identifierRole=Y.ExportAccess;return}if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-1].identifierRole=Y.ExportAccess,G.tokens[G.tokens.length-2].isType=!0,G.tokens[G.tokens.length-1].isType=!0;return}if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-3].identifierRole=Y.ExportAccess;return}$(),G.tokens[G.tokens.length-3].identifierRole=Y.ExportAccess,G.tokens[G.tokens.length-4].isType=!0,G.tokens[G.tokens.length-3].isType=!0,G.tokens[G.tokens.length-2].isType=!0,G.tokens[G.tokens.length-1].isType=!0}function Ew(){if(q(H._abstract)&&$b()===U._class)return G.type=U._abstract,X(),QD(!0,!0),!0;if(q(H._interface)){let e=Xb(2);return hw(H._interface,!0),Zb(e),!0}return!1}function Dw(){if(G.type===U._const){let e=tx();if(e.type===U.name&&e.contextualKeyword===H._enum)return J(U._const),Tb(H._enum),G.tokens[G.tokens.length-1].type=U._enum,iw(),!0}return!1}function Ow(e){let t=G.tokens.length;tC([H._abstract,H._readonly,H._declare,H._static,H._override]);let n=G.tokens.length;if(_C()){let r=e?t-1:t;for(let e=r;e<n;e++)G.tokens[e].isType=!0;return!0}return!1}function kw(e){mw(e)||Ab()}function Aw(){let e=wb(H._declare);e&&(G.tokens[G.tokens.length-1].type=U._declare);let t=!1;if(Q(U.name))if(e){let e=Xb(2);t=pw(),Zb(e)}else t=pw();if(!t)if(e){let e=Xb(2);yD(!0),Zb(e)}else yD(!0)}function jw(e){if(e&&(Q(U.lessThan)||Q(U.bitShiftL))&&vw(),wb(H._implements)){G.tokens[G.tokens.length-1].type=U._implements;let e=Xb(1);$C(),Zb(e)}}function Mw(){uC()}function Nw(){uC()}function Pw(){let e=Xb(0);Db()||Z(U.bang),WC(),Zb(e)}function Fw(){Q(U.colon)&&qC()}function Iw(e,t){return mb?Lw(e,t):Rw(e,t)}function Lw(e,t){if(!Q(U.lessThan))return sT(e,t);let n=G.snapshot(),r=sT(e,t);if(G.error)G.restoreFromSnapshot(n);else return r;return G.type=U.typeParameterStart,dC(),r=sT(e,t),r||jb(),r}function Rw(e,t){if(!Q(U.lessThan))return sT(e,t);let n=G.snapshot();dC();let r=sT(e,t);if(r||jb(),G.error)G.restoreFromSnapshot(n);else return r;return sT(e,t)}function zw(){if(Q(U.colon)){let e=G.snapshot();HC(U.colon),Eb()&&jb(),Q(U.arrow)||jb(),G.error&&G.restoreFromSnapshot(e)}return Z(U.arrow)}function Bw(){let e=Xb(0);Z(U.question),WC(),Zb(e)}function Vw(){(Q(U.lessThan)||Q(U.bitShiftL))&&vw(),TD()}function Hw(){let e=!1,t=!1;for(;;){if(G.pos>=K.length){jb(`Unterminated JSX contents`);return}let n=K.charCodeAt(G.pos);if(n===W.lessThan||n===W.leftCurlyBrace){if(G.pos===G.start){if(n===W.lessThan){G.pos++,ux(U.jsxTagStart);return}Sx(n);return}ux(e&&!t?U.jsxEmptyText:U.jsxText);return}n===W.lineFeed?e=!0:n!==W.space&&n!==W.carriageReturn&&n!==W.tab&&(t=!0),G.pos++}}function Uw(e){for(G.pos++;;){if(G.pos>=K.length){jb(`Unterminated string constant`);return}if(K.charCodeAt(G.pos)===e){G.pos++;break}G.pos++}ux(U.string)}function Ww(){let e;do{if(G.pos>K.length){jb(`Unexpectedly reached the end of input.`);return}e=K.charCodeAt(++G.pos)}while(Ib[e]||e===W.dash);ux(U.jsxName)}function Gw(){eT()}function Kw(e){if(Gw(),!Z(U.colon)){G.tokens[G.tokens.length-1].identifierRole=e;return}Gw()}function qw(){let e=G.tokens.length;Kw(Y.Access);let t=!1;for(;Q(U.dot);)t=!0,eT(),Gw();if(!t){let t=G.tokens[e],n=K.charCodeAt(t.start);n>=W.lowercaseA&&n<=W.lowercaseZ&&(t.identifierRole=null)}}function Jw(){switch(G.type){case U.braceL:X(),aT(),eT();return;case U.jsxTagStart:$w(),eT();return;case U.string:eT();return;default:jb(`JSX value should be either an expression or a quoted JSX text`)}}function Yw(){J(U.ellipsis),aT()}function Xw(e){if(Q(U.jsxTagEnd))return!1;qw(),hb&&QC();let t=!1;for(;!Q(U.slash)&&!Q(U.jsxTagEnd)&&!G.error;){if(Z(U.braceL)){t=!0,J(U.ellipsis),oT(),eT();continue}t&&G.end-G.start===3&&K.charCodeAt(G.start)===W.lowercaseK&&K.charCodeAt(G.start+1)===W.lowercaseE&&K.charCodeAt(G.start+2)===W.lowercaseY&&(G.tokens[e].jsxRole=Bb.KeyAfterPropSpread),Kw(Y.ObjectKey),Q(U.eq)&&(eT(),Jw())}let n=Q(U.slash);return n&&eT(),n}function Zw(){Q(U.jsxTagEnd)||qw()}function Qw(){let e=G.tokens.length-1;G.tokens[e].jsxRole=Bb.NoChildren;let t=0;if(!Xw(e))for(tT();;)switch(G.type){case U.jsxTagStart:if(eT(),Q(U.slash)){eT(),Zw(),G.tokens[e].jsxRole!==Bb.KeyAfterPropSpread&&(t===1?G.tokens[e].jsxRole=Bb.OneChild:t>1&&(G.tokens[e].jsxRole=Bb.StaticChildren));return}t++,Qw(),tT();break;case U.jsxText:t++,tT();break;case U.jsxEmptyText:tT();break;case U.braceL:X(),Q(U.ellipsis)?(Yw(),tT(),t+=2):(Q(U.braceR)||(t++,aT()),tT());break;default:jb();return}}function $w(){eT(),Qw()}function eT(){G.tokens.push(new qb),lx(),G.start=G.pos;let e=K.charCodeAt(G.pos);if(Lb[e])Ww();else if(e===W.quotationMark||e===W.apostrophe)Uw(e);else switch(++G.pos,e){case W.greaterThan:ux(U.jsxTagEnd);break;case W.lessThan:ux(U.jsxTagStart);break;case W.slash:ux(U.slash);break;case W.equalsTo:ux(U.eq);break;case W.leftCurlyBrace:ux(U.braceL);break;case W.dot:ux(U.dot);break;case W.colon:ux(U.colon);break;default:jb()}}function tT(){G.tokens.push(new qb),G.start=G.pos,Hw()}function nT(e){if(Q(U.question)){let e=$b();if(e===U.colon||e===U.comma||e===U.parenR)return}uT(e)}function rT(){Qb(U.question),Q(U.colon)&&(hb?qC():gb&&HE())}var iT=class{constructor(e){this.stop=e}};function aT(e=!1){if(oT(e),Q(U.comma))for(;Z(U.comma);)oT(e)}function oT(e=!1,t=!1){return hb?Iw(e,t):gb?uD(e,t):sT(e,t)}function sT(e,t){if(Q(U._yield))return YT(),!1;(Q(U.parenL)||Q(U.name)||Q(U._yield))&&(G.potentialArrowAt=G.start);let n=cT(e);return t&&MT(),G.type&U.IS_ASSIGN?(X(),oT(e),!1):n}function cT(e){return dT(e)?!0:(lT(e),!1)}function lT(e){hb||gb?nT(e):uT(e)}function uT(e){Z(U.question)&&(oT(),J(U.colon),oT(e))}function dT(e){let t=G.tokens.length;return pT()?!0:(fT(t,-1,e),!1)}function fT(e,t,n){if(hb&&(U._in&U.PRECEDENCE_MASK)>t&&!Db()&&(wb(H._as)||wb(H._satisfies))){let r=Xb(1);JC(),Zb(r),yx(),fT(e,t,n);return}let r=G.type&U.PRECEDENCE_MASK;if(r>0&&(!n||!Q(U._in))&&r>t){let i=G.type;X(),i===U.nullishCoalescing&&(G.tokens[G.tokens.length-1].nullishStartIndex=e);let a=G.tokens.length;pT(),fT(a,i&U.IS_RIGHT_ASSOCIATIVE?r-1:r,n),i===U.nullishCoalescing&&(G.tokens[e].numNullishCoalesceStarts++,G.tokens[G.tokens.length-1].numNullishCoalesceEnds++),fT(e,t,n)}}function pT(){if(hb&&!mb&&Z(U.lessThan))return ZC(),!1;if(q(H._module)&&ix()===W.leftCurlyBrace&&!Ob())return XT(),!1;if(G.type&U.IS_PREFIX)return X(),pT(),!1;if(mT())return!0;for(;G.type&U.IS_POSTFIX&&!Eb();)G.type===U.preIncDec&&(G.type=U.postIncDec),X();return!1}function mT(){let e=G.tokens.length;return wT()?!0:(hT(e),G.tokens.length>e&&G.tokens[e].isOptionalChainStart&&(G.tokens[G.tokens.length-1].isOptionalChainEnd=!0),!1)}function hT(e,t=!1){gb?fD(e,t):gT(e,t)}function gT(e,t=!1){let n=new iT(!1);do _T(e,t,n);while(!n.stop&&!G.error)}function _T(e,t,n){hb?Sw(e,t,n):gb?KE(e,t,n):vT(e,t,n)}function vT(e,t,n){if(!t&&Z(U.doubleColon))CT(),n.stop=!0,hT(e,t);else if(Q(U.questionDot)){if(G.tokens[e].isOptionalChainStart=!0,t&&$b()===U.parenL){n.stop=!0;return}X(),G.tokens[G.tokens.length-1].subscriptStartIndex=e,Z(U.bracketL)?(aT(),J(U.bracketR)):Z(U.parenL)?bT():TT()}else if(Z(U.dot))G.tokens[G.tokens.length-1].subscriptStartIndex=e,TT();else if(Z(U.bracketL))G.tokens[G.tokens.length-1].subscriptStartIndex=e,aT(),J(U.bracketR);else if(!t&&Q(U.parenL))if(yT()){let t=G.snapshot(),r=G.tokens.length;X(),G.tokens[G.tokens.length-1].subscriptStartIndex=e;let i=vb();G.tokens[G.tokens.length-1].contextId=i,bT(),G.tokens[G.tokens.length-1].contextId=i,xT()&&(G.restoreFromSnapshot(t),n.stop=!0,G.scopeDepth++,ZD(),ST(r))}else{X(),G.tokens[G.tokens.length-1].subscriptStartIndex=e;let t=vb();G.tokens[G.tokens.length-1].contextId=t,bT(),G.tokens[G.tokens.length-1].contextId=t}else Q(U.backQuote)?FT():n.stop=!0}function yT(){return G.tokens[G.tokens.length-1].contextualKeyword===H._async&&!Eb()}function bT(){let e=!0;for(;!Z(U.parenR)&&!G.error;){if(e)e=!1;else if(J(U.comma),Z(U.parenR))break;qT(!1)}}function xT(){return Q(U.colon)||Q(U.arrow)}function ST(e){hb?Fw():gb&&lD(),J(U.arrow),UT(e)}function CT(){let e=G.tokens.length;wT(),hT(e,!0)}function wT(){if(Z(U.modulo))return $(),!1;if(Q(U.jsxText)||Q(U.jsxEmptyText))return DT(),!1;if(Q(U.lessThan)&&mb)return G.type=U.jsxTagStart,$w(),X(),!1;let e=G.potentialArrowAt===G.start;switch(G.type){case U.slash:case U.assign:Yb();case U._super:case U._this:case U.regexp:case U.num:case U.bigint:case U.decimal:case U.string:case U._null:case U._true:case U._false:return X(),!1;case U._import:return X(),Q(U.dot)&&(G.tokens[G.tokens.length-1].type=U.name,X(),$()),!1;case U.name:{let t=G.tokens.length,n=G.start,r=G.contextualKeyword;return $(),r===H._await?(JT(),!1):r===H._async&&Q(U._function)&&!Eb()?(X(),XD(n,!1),!1):e&&r===H._async&&!Eb()&&Q(U.name)?(G.scopeDepth++,WS(!1),J(U.arrow),UT(t),!0):Q(U._do)&&!Eb()?(X(),WD(),!1):e&&!Eb()&&Q(U.arrow)?(G.scopeDepth++,KS(!1),J(U.arrow),UT(t),!0):(G.tokens[G.tokens.length-1].identifierRole=Y.Access,!1)}case U._do:return X(),WD(),!1;case U.parenL:return kT(e);case U.bracketL:return X(),KT(U.bracketR,!0),!1;case U.braceL:return IT(!1,!1),!1;case U._function:return ET(),!1;case U.at:SD();case U._class:return QD(!1),!1;case U._new:return NT(),!1;case U.backQuote:return FT(),!1;case U.doubleColon:return X(),CT(),!1;case U.hash:{let e=ix();return Lb[e]||e===W.backslash?TT():X(),!1}default:return jb(),!1}}function TT(){Z(U.hash),$()}function ET(){let e=G.start;$(),Z(U.dot)&&$(),XD(e,!1)}function DT(){X()}function OT(){J(U.parenL),aT(),J(U.parenR)}function kT(e){let t=G.snapshot(),n=G.tokens.length;J(U.parenL);let r=!0;for(;!Q(U.parenR)&&!G.error;){if(r)r=!1;else if(J(U.comma),Q(U.parenR))break;if(Q(U.ellipsis)){US(!1),MT();break}else oT(!1,!0)}return J(U.parenR),e&&AT()&&jT()?(G.restoreFromSnapshot(t),G.scopeDepth++,ZD(),jT(),UT(n),G.error?(G.restoreFromSnapshot(t),kT(!1),!1):!0):!1}function AT(){return Q(U.colon)||!Eb()}function jT(){return hb?zw():gb?dD():Z(U.arrow)}function MT(){(hb||gb)&&rT()}function NT(){if(J(U._new),Z(U.dot)){$();return}PT(),gb&&qE(),Z(U.parenL)&&KT(U.parenR)}function PT(){CT(),Z(U.questionDot)}function FT(){for(Jb(),Jb();!Q(U.backQuote)&&!G.error;)J(U.dollarBraceL),aT(),Jb(),Jb();X()}function IT(e,t){let n=vb(),r=!0;for(X(),G.tokens[G.tokens.length-1].contextId=n;!Z(U.braceR)&&!G.error;){if(r)r=!1;else if(J(U.comma),Z(U.braceR))break;let i=!1;if(Q(U.ellipsis)){let n=G.tokens.length;if(HS(),e&&(G.tokens.length===n+2&&KS(t),Z(U.braceR)))break;continue}e||(i=Z(U.star)),!e&&q(H._async)?(i&&jb(),$(),Q(U.colon)||Q(U.parenL)||Q(U.braceR)||Q(U.eq)||Q(U.comma)||(Q(U.star)&&(X(),i=!0),VT(n))):VT(n),BT(e,t,n)}G.tokens[G.tokens.length-1].contextId=n}function LT(e){return!e&&(Q(U.string)||Q(U.num)||Q(U.bracketL)||Q(U.name)||!!(G.type&U.IS_KEYWORD))}function RT(e,t){let n=G.start;return Q(U.parenL)?(e&&jb(),HT(n,!1),!0):LT(e)?(VT(t),HT(n,!1),!0):!1}function zT(e,t){if(Z(U.colon)){e?ZS(t):oT(!1);return}let n;n=e?G.scopeDepth===0?Y.ObjectShorthandTopLevelDeclaration:t?Y.ObjectShorthandBlockScopedDeclaration:Y.ObjectShorthandFunctionScopedDeclaration:Y.ObjectShorthand,G.tokens[G.tokens.length-1].identifierRole=n,ZS(t,!0)}function BT(e,t,n){hb?Mw():gb&&rD(),RT(e,n)||zT(e,t)}function VT(e){gb&&WE(),Z(U.bracketL)?(G.tokens[G.tokens.length-1].contextId=e,oT(),J(U.bracketR),G.tokens[G.tokens.length-1].contextId=e):(Q(U.num)||Q(U.string)||Q(U.bigint)||Q(U.decimal)?wT():TT(),G.tokens[G.tokens.length-1].identifierRole=Y.ObjectKey,G.tokens[G.tokens.length-1].contextId=e)}function HT(e,t){let n=vb();G.scopeDepth++;let r=G.tokens.length;ZD(t,n),WT(e,n);let i=G.tokens.length;G.scopes.push(new db(r,i,!0)),G.scopeDepth--}function UT(e){GT(!0);let t=G.tokens.length;G.scopes.push(new db(e,t,!0)),G.scopeDepth--}function WT(e,t=0){hb?xw(e,t):gb?GE(t):GT(!1,t)}function GT(e,t=0){e&&!Q(U.braceL)?oT():WD(!0,t)}function KT(e,t=!1){let n=!0;for(;!Z(e)&&!G.error;){if(n)n=!1;else if(J(U.comma),Z(e))break;qT(t)}}function qT(e){e&&Q(U.comma)||(Q(U.ellipsis)?(HS(),MT()):Q(U.question)?X():oT(!1,!0))}function $(){X(),G.tokens[G.tokens.length-1].type=U.name}function JT(){pT()}function YT(){X(),!Q(U.semi)&&!Eb()&&(Z(U.star),oT())}function XT(){Tb(H._module),J(U.braceL),GD(U.braceR)}function ZT(e){return(e.type===U.name||!!(e.type&U.IS_KEYWORD))&&e.contextualKeyword!==H._from}function QT(e){let t=Xb(0);J(e||U.colon),VE(),Zb(t)}function $T(){J(U.modulo),Tb(H._checks),Z(U.parenL)&&(aT(),J(U.parenR))}function eE(){let e=Xb(0);J(U.colon),Q(U.modulo)?$T():(VE(),Q(U.modulo)&&$T()),Zb(e)}function tE(){X(),dE(!0)}function nE(){X(),$(),Q(U.lessThan)&&vE(),J(U.parenL),PE(),J(U.parenR),eE(),Ab()}function rE(){Q(U._class)?tE():Q(U._function)?nE():Q(U._var)?iE():wb(H._module)?Z(U.dot)?sE():aE():q(H._type)?cE():q(H._opaque)?lE():q(H._interface)?uE():Q(U._export)?oE():jb()}function iE(){X(),UE(),Ab()}function aE(){for(Q(U.string)?wT():$(),J(U.braceL);!Q(U.braceR)&&!G.error;)Q(U._import)?(X(),TO()):jb();J(U.braceR)}function oE(){J(U._export),Z(U._default)?Q(U._function)||Q(U._class)?rE():(VE(),Ab()):Q(U._var)||Q(U._function)||Q(U._class)||q(H._opaque)?rE():Q(U.star)||Q(U.braceL)||q(H._interface)||q(H._type)||q(H._opaque)?uO():jb()}function sE(){Tb(H._exports),HE(),Ab()}function cE(){X(),hE()}function lE(){X(),gE(!0)}function uE(){X(),dE()}function dE(e=!1){if(mE(),Q(U.lessThan)&&vE(),Z(U._extends))do fE();while(!e&&Z(U.comma));if(q(H._mixins)){X();do fE();while(Z(U.comma))}if(q(H._implements)){X();do fE();while(Z(U.comma))}EE(e,!1,e)}function fE(){kE(!1),Q(U.lessThan)&&yE()}function pE(){dE()}function mE(){$()}function hE(){mE(),Q(U.lessThan)&&vE(),QT(U.eq),Ab()}function gE(e){Tb(H._type),mE(),Q(U.lessThan)&&vE(),Q(U.colon)&&QT(U.colon),e||QT(U.eq),Ab()}function _E(){WE(),UE(),Z(U.eq)&&VE()}function vE(){let e=Xb(0);Q(U.lessThan)||Q(U.typeParameterStart)?X():jb();do _E(),Q(U.greaterThan)||J(U.comma);while(!Q(U.greaterThan)&&!G.error);J(U.greaterThan),Zb(e)}function yE(){let e=Xb(0);for(J(U.lessThan);!Q(U.greaterThan)&&!G.error;)VE(),Q(U.greaterThan)||J(U.comma);J(U.greaterThan),Zb(e)}function bE(){if(Tb(H._interface),Z(U._extends))do fE();while(Z(U.comma));EE(!1,!1,!1)}function xE(){Q(U.num)||Q(U.string)?wT():$()}function SE(){$b()===U.colon?(xE(),QT()):VE(),J(U.bracketR),QT()}function CE(){xE(),J(U.bracketR),J(U.bracketR),Q(U.lessThan)||Q(U.parenL)?wE():(Z(U.question),QT())}function wE(){for(Q(U.lessThan)&&vE(),J(U.parenL);!Q(U.parenR)&&!Q(U.ellipsis)&&!G.error;)NE(),Q(U.parenR)||J(U.comma);Z(U.ellipsis)&&NE(),J(U.parenR),QT()}function TE(){wE()}function EE(e,t,n){let r;for(t&&Q(U.braceBarL)?(J(U.braceBarL),r=U.braceBarR):(J(U.braceL),r=U.braceR);!Q(r)&&!G.error;){if(n&&q(H._proto)){let t=$b();t!==U.colon&&t!==U.question&&(X(),e=!1)}if(e&&q(H._static)){let e=$b();e!==U.colon&&e!==U.question&&X()}if(WE(),Z(U.bracketL))Z(U.bracketL)?CE():SE();else if(Q(U.parenL)||Q(U.lessThan))TE();else{if(q(H._get)||q(H._set)){let e=$b();(e===U.name||e===U.string||e===U.num)&&X()}DE()}OE()}J(r)}function DE(){if(Q(U.ellipsis)){if(J(U.ellipsis),Z(U.comma)||Z(U.semi),Q(U.braceR))return;VE()}else xE(),Q(U.lessThan)||Q(U.parenL)?wE():(Z(U.question),QT())}function OE(){!Z(U.semi)&&!Z(U.comma)&&!Q(U.braceR)&&!Q(U.braceBarR)&&jb()}function kE(e){for(e||$();Z(U.dot);)$()}function AE(){kE(!0),Q(U.lessThan)&&yE()}function jE(){J(U._typeof),FE()}function ME(){for(J(U.bracketL);G.pos<K.length&&!Q(U.bracketR)&&(VE(),!Q(U.bracketR));)J(U.comma);J(U.bracketR)}function NE(){let e=$b();e===U.colon||e===U.question?($(),Z(U.question),QT()):VE()}function PE(){for(;!Q(U.parenR)&&!Q(U.ellipsis)&&!G.error;)NE(),Q(U.parenR)||J(U.comma);Z(U.ellipsis)&&NE()}function FE(){let e=!1,t=G.noAnonFunctionType;switch(G.type){case U.name:if(q(H._interface)){bE();return}$(),AE();return;case U.braceL:EE(!1,!1,!1);return;case U.braceBarL:EE(!1,!0,!1);return;case U.bracketL:ME();return;case U.lessThan:vE(),J(U.parenL),PE(),J(U.parenR),J(U.arrow),VE();return;case U.parenL:if(X(),!Q(U.parenR)&&!Q(U.ellipsis))if(Q(U.name)){let t=$b();e=t!==U.question&&t!==U.colon}else e=!0;if(e)if(G.noAnonFunctionType=!1,VE(),G.noAnonFunctionType=t,G.noAnonFunctionType||!(Q(U.comma)||Q(U.parenR)&&$b()===U.arrow)){J(U.parenR);return}else Z(U.comma);PE(),J(U.parenR),J(U.arrow),VE();return;case U.minus:X(),DT();return;case U.string:case U.num:case U._true:case U._false:case U._null:case U._this:case U._void:case U.star:X();return;default:if(G.type===U._typeof){jE();return}else if(G.type&U.IS_KEYWORD){X(),G.tokens[G.tokens.length-1].type=U.name;return}}jb()}function IE(){for(FE();!Eb()&&(Q(U.bracketL)||Q(U.questionDot));)Z(U.questionDot),J(U.bracketL),Z(U.bracketR)||(VE(),J(U.bracketR))}function LE(){Z(U.question)?LE():IE()}function RE(){LE(),!G.noAnonFunctionType&&Z(U.arrow)&&VE()}function zE(){for(Z(U.bitwiseAND),RE();Z(U.bitwiseAND);)RE()}function BE(){for(Z(U.bitwiseOR),zE();Z(U.bitwiseOR);)zE()}function VE(){BE()}function HE(){QT()}function UE(){$(),Q(U.colon)&&HE()}function WE(){(Q(U.plus)||Q(U.minus))&&(X(),G.tokens[G.tokens.length-1].isType=!0)}function GE(e){Q(U.colon)&&eE(),GT(!1,e)}function KE(e,t,n){if(Q(U.questionDot)&&$b()===U.lessThan){if(t){n.stop=!0;return}X(),yE(),J(U.parenL),bT();return}else if(!t&&Q(U.lessThan)){let e=G.snapshot();if(yE(),J(U.parenL),bT(),G.error)G.restoreFromSnapshot(e);else return}vT(e,t,n)}function qE(){if(Q(U.lessThan)){let e=G.snapshot();yE(),G.error&&G.restoreFromSnapshot(e)}}function JE(){if(Q(U.name)&&G.contextualKeyword===H._interface){let e=Xb(0);return X(),pE(),Zb(e),!0}else if(q(H._enum))return mD(),!0;return!1}function YE(){return q(H._enum)?(mD(),!0):!1}function XE(e){if(e===H._declare){if(Q(U._class)||Q(U.name)||Q(U._function)||Q(U._var)||Q(U._export)){let e=Xb(1);rE(),Zb(e)}}else if(Q(U.name)){if(e===H._interface){let e=Xb(1);pE(),Zb(e)}else if(e===H._type){let e=Xb(1);hE(),Zb(e)}else if(e===H._opaque){let e=Xb(1);gE(!1),Zb(e)}}Ab()}function ZE(){return q(H._type)||q(H._interface)||q(H._opaque)||q(H._enum)}function QE(){return Q(U.name)&&(G.contextualKeyword===H._type||G.contextualKeyword===H._interface||G.contextualKeyword===H._opaque||G.contextualKeyword===H._enum)}function $E(){if(q(H._type)){let e=Xb(1);X(),Q(U.braceL)?(xO(),hO()):hE(),Zb(e)}else if(q(H._opaque)){let e=Xb(1);X(),gE(!1),Zb(e)}else if(q(H._interface)){let e=Xb(1);X(),pE(),Zb(e)}else yD(!0)}function eD(){return Q(U.star)||q(H._type)&&$b()===U.star}function tD(){if(wb(H._type)){let e=Xb(2);vO(),Zb(e)}else vO()}function nD(e){if(e&&Q(U.lessThan)&&yE(),q(H._implements)){let e=Xb(0);X(),G.tokens[G.tokens.length-1].type=U._implements;do mE(),Q(U.lessThan)&&yE();while(Z(U.comma));Zb(e)}}function rD(){Q(U.lessThan)&&(vE(),Q(U.parenL)||jb())}function iD(){let e=Xb(0);Z(U.question),Q(U.colon)&&HE(),Zb(e)}function aD(){if(Q(U._typeof)||q(H._type)){let e=tx();(ZT(e)||e.type===U.braceL||e.type===U.star)&&X()}}function oD(){let e=G.contextualKeyword===H._type||G.type===U._typeof;e?X():$(),q(H._as)&&!Cb(H._as)?($(),e&&!Q(U.name)&&!(G.type&U.IS_KEYWORD)||$()):(e&&(Q(U.name)||G.type&U.IS_KEYWORD)&&$(),wb(H._as)&&$())}function sD(){if(Q(U.lessThan)){let e=Xb(0);vE(),Zb(e)}}function cD(){Q(U.colon)&&HE()}function lD(){if(Q(U.colon)){let e=G.noAnonFunctionType;G.noAnonFunctionType=!0,HE(),G.noAnonFunctionType=e}}function uD(e,t){if(Q(U.lessThan)){let n=G.snapshot(),r=sT(e,t);if(G.error)G.restoreFromSnapshot(n),G.type=U.typeParameterStart;else return r;let i=Xb(0);if(vE(),Zb(i),r=sT(e,t),r)return!0;jb()}return sT(e,t)}function dD(){if(Q(U.colon)){let e=Xb(0),t=G.snapshot(),n=G.noAnonFunctionType;G.noAnonFunctionType=!0,eE(),G.noAnonFunctionType=n,Eb()&&jb(),Q(U.arrow)||jb(),G.error&&G.restoreFromSnapshot(t),Zb(e)}return Z(U.arrow)}function fD(e,t=!1){if(G.tokens[G.tokens.length-1].contextualKeyword===H._async&&Q(U.lessThan)){let e=G.snapshot();if(pD()&&!G.error)return;G.restoreFromSnapshot(e)}gT(e,t)}function pD(){G.scopeDepth++;let e=G.tokens.length;return ZD(),jT()?(UT(e),!0):!1}function mD(){Tb(H._enum),G.tokens[G.tokens.length-1].type=U._enum,$(),hD()}function hD(){wb(H._of)&&X(),J(U.braceL),gD(),J(U.braceR)}function gD(){for(;!Q(U.braceR)&&!G.error&&!Z(U.ellipsis);)_D(),Q(U.braceR)||J(U.comma)}function _D(){$(),Z(U.eq)&&X()}function vD(){if(GD(U.eof),G.scopes.push(new db(0,G.tokens.length,!0)),G.scopeDepth!==0)throw Error(`Invalid scope depth at end of file: ${G.scopeDepth}`);return new MO(G.tokens,G.scopes)}function yD(e){gb&&JE()||(Q(U.at)&&SD(),bD(e))}function bD(e){if(hb&&Dw())return;let t=G.type;switch(t){case U._break:case U._continue:ED();return;case U._debugger:DD();return;case U._do:OD();return;case U._for:kD();return;case U._function:if($b()===U.dot)break;e||jb(),MD();return;case U._class:e||jb(),QD(!0);return;case U._if:ND();return;case U._return:PD();return;case U._switch:FD();return;case U._throw:ID();return;case U._try:RD();return;case U._let:case U._const:e||jb();case U._var:zD(t!==U._var);return;case U._while:BD();return;case U.braceL:WD();return;case U.semi:VD();return;case U._export:case U._import:{let e=$b();if(e===U.parenL||e===U.dot)break;X(),t===U._import?TO():uO();return}case U.name:if(G.contextualKeyword===H._async){let e=G.start,t=G.snapshot();if(X(),Q(U._function)&&!Eb()){J(U._function),XD(e,!0);return}else G.restoreFromSnapshot(t)}else if(G.contextualKeyword===H._using&&!Ob()&&$b()===U.name){zD(!0);return}else if(xD()){Tb(H._await),zD(!0);return}default:break}let n=G.tokens.length;aT();let r=null;if(G.tokens.length===n+1){let e=G.tokens[G.tokens.length-1];e.type===U.name&&(r=e.contextualKeyword)}if(r==null){Ab();return}Z(U.colon)?HD():UD(r)}function xD(){if(!q(H._await))return!1;let e=G.snapshot();return X(),!q(H._using)||Db()||(X(),!Q(U.name)||Db())?(G.restoreFromSnapshot(e),!1):(G.restoreFromSnapshot(e),!0)}function SD(){for(;Q(U.at);)CD()}function CD(){if(X(),Z(U.parenL))aT(),J(U.parenR);else{for($();Z(U.dot);)$();wD()}}function wD(){hb?Vw():TD()}function TD(){Z(U.parenL)&&bT()}function ED(){X(),kb()||($(),Ab())}function DD(){X(),Ab()}function OD(){X(),yD(!1),J(U._while),OT(),Z(U.semi)}function kD(){G.scopeDepth++;let e=G.tokens.length;jD();let t=G.tokens.length;G.scopes.push(new db(e,t,!1)),G.scopeDepth--}function AD(){return!(!q(H._using)||Cb(H._of))}function jD(){X();let e=!1;if(q(H._await)&&(e=!0,X()),J(U.parenL),Q(U.semi)){e&&jb(),KD();return}let t=xD();if(t||Q(U._var)||Q(U._let)||Q(U._const)||AD()){if(t&&Tb(H._await),X(),JD(!0,G.type!==U._var),Q(U._in)||q(H._of)){qD(e);return}KD();return}if(aT(!0),Q(U._in)||q(H._of)){qD(e);return}e&&jb(),KD()}function MD(){let e=G.start;X(),XD(e,!0)}function ND(){X(),OT(),yD(!1),Z(U._else)&&yD(!1)}function PD(){X(),kb()||(aT(),Ab())}function FD(){X(),OT(),G.scopeDepth++;let e=G.tokens.length;for(J(U.braceL);!Q(U.braceR)&&!G.error;)if(Q(U._case)||Q(U._default)){let e=Q(U._case);X(),e&&aT(),J(U.colon)}else yD(!0);X();let t=G.tokens.length;G.scopes.push(new db(e,t,!1)),G.scopeDepth--}function ID(){X(),aT(),Ab()}function LD(){qS(!0),hb&&WC()}function RD(){if(X(),WD(),Q(U._catch)){X();let e=null;if(Q(U.parenL)&&(G.scopeDepth++,e=G.tokens.length,J(U.parenL),LD(),J(U.parenR)),WD(),e!=null){let t=G.tokens.length;G.scopes.push(new db(e,t,!1)),G.scopeDepth--}}Z(U._finally)&&WD()}function zD(e){X(),JD(!1,e),Ab()}function BD(){X(),OT(),yD(!1)}function VD(){X()}function HD(){yD(!0)}function UD(e){hb?kw(e):gb?XE(e):Ab()}function WD(e=!1,t=0){let n=G.tokens.length;G.scopeDepth++,J(U.braceL),t&&(G.tokens[G.tokens.length-1].contextId=t),GD(U.braceR),t&&(G.tokens[G.tokens.length-1].contextId=t);let r=G.tokens.length;G.scopes.push(new db(n,r,e)),G.scopeDepth--}function GD(e){for(;!Z(e)&&!G.error;)yD(!0)}function KD(){J(U.semi),Q(U.semi)||aT(),J(U.semi),Q(U.parenR)||aT(),J(U.parenR),yD(!1)}function qD(e){e?wb(H._of):X(),aT(),J(U.parenR),yD(!1)}function JD(e,t){for(;;){if(YD(t),Z(U.eq)){let t=G.tokens.length-1;oT(e),G.tokens[t].rhsEndIndex=G.tokens.length}if(!Z(U.comma))break}}function YD(e){qS(e),hb?Pw():gb&&cD()}function XD(e,t,n=!1){Q(U.star)&&X(),t&&!n&&!Q(U.name)&&!Q(U._yield)&&jb();let r=null;Q(U.name)&&(t||(r=G.tokens.length,G.scopeDepth++),WS(!1));let i=G.tokens.length;G.scopeDepth++,ZD(),WT(e);let a=G.tokens.length;G.scopes.push(new db(i,a,!0)),G.scopeDepth--,r!==null&&(G.scopes.push(new db(r,a,!0)),G.scopeDepth--)}function ZD(e=!1,t=0){hb?Nw():gb&&sD(),J(U.parenL),t&&(G.tokens[G.tokens.length-1].contextId=t),JS(U.parenR,!1,!1,e,t),t&&(G.tokens[G.tokens.length-1].contextId=t)}function QD(e,t=!1){let n=vb();X(),G.tokens[G.tokens.length-1].contextId=n,G.tokens[G.tokens.length-1].isExpression=!e;let r=null;e||(r=G.tokens.length,G.scopeDepth++),cO(e,t),lO();let i=G.tokens.length;if(tO(n),!G.error&&(G.tokens[i].contextId=n,G.tokens[G.tokens.length-1].contextId=n,r!==null)){let e=G.tokens.length;G.scopes.push(new db(r,e,!1)),G.scopeDepth--}}function $D(){return Q(U.eq)||Q(U.semi)||Q(U.braceR)||Q(U.bang)||Q(U.colon)}function eO(){return Q(U.parenL)||Q(U.lessThan)}function tO(e){for(J(U.braceL);!Z(U.braceR)&&!G.error;){if(Z(U.semi))continue;if(Q(U.at)){CD();continue}let t=G.start;nO(t,e)}}function nO(e,t){hb&&tC([H._declare,H._public,H._protected,H._private,H._override]);let n=!1;if(Q(U.name)&&G.contextualKeyword===H._static){if($(),eO()){iO(e,!1);return}else if($D()){sO();return}if(G.tokens[G.tokens.length-1].type=U._static,n=!0,Q(U.braceL)){G.tokens[G.tokens.length-1].contextId=t,WD();return}}rO(e,n,t)}function rO(e,t,n){if(hb&&Ow(t))return;if(Z(U.star)){aO(n),iO(e,!1);return}aO(n);let r=!1,i=G.tokens[G.tokens.length-1];i.contextualKeyword===H._constructor&&(r=!0),oO(),eO()?iO(e,r):$D()?sO():i.contextualKeyword===H._async&&!kb()?(G.tokens[G.tokens.length-1].type=U._async,Q(U.star)&&X(),aO(n),oO(),iO(e,!1)):(i.contextualKeyword===H._get||i.contextualKeyword===H._set)&&!(kb()&&Q(U.star))?(i.contextualKeyword===H._get?G.tokens[G.tokens.length-1].type=U._get:G.tokens[G.tokens.length-1].type=U._set,aO(n),iO(e,!1)):i.contextualKeyword===H._accessor&&!kb()?(aO(n),sO()):kb()?sO():jb()}function iO(e,t){hb?uC():gb&&Q(U.lessThan)&&vE(),HT(e,t)}function aO(e){VT(e)}function oO(){if(hb){let e=Xb(0);Z(U.question),Zb(e)}}function sO(){if(hb?(Qb(U.bang),WC()):gb&&Q(U.colon)&&HE(),Q(U.eq)){let e=G.tokens.length;X(),oT(),G.tokens[e].rhsEndIndex=G.tokens.length}Ab()}function cO(e,t=!1){hb&&(!e||t)&&q(H._implements)||(Q(U.name)&&WS(!0),hb?uC():gb&&Q(U.lessThan)&&vE())}function lO(){let e=!1;Z(U._extends)?(mT(),e=!0):e=!1,hb?jw(e):gb&&nD(e)}function uO(){let e=G.tokens.length-1;hb&&Cw()||(gO()?_O():pO()?($(),Q(U.comma)&&$b()===U.star?(J(U.comma),J(U.star),Tb(H._as),$()):mO(),hO()):Z(U._default)?dO():bO()?fO():(xO(),hO()),G.tokens[e].rhsEndIndex=G.tokens.length)}function dO(){if(hb&&Ew()||gb&&YE())return;let e=G.start;Z(U._function)?XD(e,!0,!0):q(H._async)&&$b()===U._function?(wb(H._async),Z(U._function),XD(e,!0,!0)):Q(U._class)?QD(!0,!0):Q(U.at)?(SD(),QD(!0,!0)):(oT(),Ab())}function fO(){hb?Aw():gb?$E():yD(!0)}function pO(){if(hb&&bw()||gb&&QE())return!1;if(Q(U.name))return G.contextualKeyword!==H._async;if(!Q(U._default))return!1;let e=nx(),t=tx(),n=t.type===U.name&&t.contextualKeyword===H._from;if(t.type===U.comma)return!0;if(n){let t=K.charCodeAt(rx(e+4));return t===W.quotationMark||t===W.apostrophe}return!1}function mO(){Z(U.comma)&&xO()}function hO(){wb(H._from)&&(wT(),AO()),Ab()}function gO(){return gb?eD():Q(U.star)}function _O(){gb?tD():vO()}function vO(){J(U.star),q(H._as)?yO():hO()}function yO(){X(),G.tokens[G.tokens.length-1].type=U._as,$(),mO(),hO()}function bO(){return hb&&bw()||gb&&ZE()||G.type===U._var||G.type===U._const||G.type===U._let||G.type===U._function||G.type===U._class||q(H._async)||Q(U.at)}function xO(){let e=!0;for(J(U.braceL);!Z(U.braceR)&&!G.error;){if(e)e=!1;else if(J(U.comma),Z(U.braceR))break;SO()}}function SO(){if(hb){Tw();return}$(),G.tokens[G.tokens.length-1].identifierRole=Y.ExportAccess,wb(H._as)&&$()}function CO(){let e=G.snapshot();return Tb(H._module),wb(H._from)?q(H._from)?(G.restoreFromSnapshot(e),!0):(G.restoreFromSnapshot(e),!1):Q(U.comma)?(G.restoreFromSnapshot(e),!1):(G.restoreFromSnapshot(e),!0)}function wO(){q(H._module)&&CO()&&X()}function TO(){if(hb&&Q(U.name)&&$b()===U.eq){cw();return}if(hb&&q(H._type)){let e=tx();if(e.type===U.name&&e.contextualKeyword!==H._from){if(Tb(H._type),$b()===U.eq){cw();return}}else(e.type===U.star||e.type===U.braceL)&&Tb(H._type)}Q(U.string)?wT():(wO(),OO(),Tb(H._from),wT()),AO(),Ab()}function EO(){return Q(U.name)}function DO(){GS()}function OO(){gb&&aD();let e=!0;if(!(EO()&&(DO(),!Z(U.comma)))){if(Q(U.star)){X(),Tb(H._as),DO();return}for(J(U.braceL);!Z(U.braceR)&&!G.error;){if(e)e=!1;else if(Z(U.colon)&&jb(`ES2015 named imports do not destructure. Use another statement for destructuring after the import.`),J(U.comma),Z(U.braceR))break;kO()}}}function kO(){if(hb){ww();return}if(gb){oD();return}GS(),q(H._as)&&(G.tokens[G.tokens.length-1].identifierRole=Y.ImportAccess,X(),GS())}function AO(){(Q(U._with)||q(H._assert)&&!Db())&&(X(),IT(!1,!1))}function jO(){return G.pos===0&&K.charCodeAt(0)===W.numberSign&&K.charCodeAt(1)===W.exclamationMark&&cx(2),ax(),vD()}var MO=class{constructor(e,t){this.tokens=e,this.scopes=t}};function NO(e,t,n,r){if(r&&n)throw Error(`Cannot combine flow and typescript plugins.`);Sb(e,t,n,r);let i=jO();if(G.error)throw yb(G.error);return i}function PO(e){let t=e.currentIndex(),n=0,r=e.currentToken();do{let i=e.tokens[t];if(i.isOptionalChainStart&&n++,i.isOptionalChainEnd&&n--,n+=i.numNullishCoalesceStarts,n-=i.numNullishCoalesceEnds,i.contextualKeyword===H._await&&i.identifierRole==null&&i.scopeDepth===r.scopeDepth)return!0;t+=1}while(n>0&&t<e.tokens.length);return!1}var FO=class e{__init(){this.resultCode=``}__init2(){this.resultMappings=Array(this.tokens.length)}__init3(){this.tokenIndex=0}constructor(t,n,r,i,a){this.code=t,this.tokens=n,this.isFlowEnabled=r,this.disableESTransforms=i,this.helperManager=a,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this)}snapshot(){return{resultCode:this.resultCode,tokenIndex:this.tokenIndex}}restoreToSnapshot(e){this.resultCode=e.resultCode,this.tokenIndex=e.tokenIndex}dangerouslyGetAndRemoveCodeSinceSnapshot(e){let t=this.resultCode.slice(e.resultCode.length);return this.resultCode=e.resultCode,t}reset(){this.resultCode=``,this.resultMappings=Array(this.tokens.length),this.tokenIndex=0}matchesContextualAtIndex(e,t){return this.matches1AtIndex(e,U.name)&&this.tokens[e].contextualKeyword===t}identifierNameAtIndex(e){return this.identifierNameForToken(this.tokens[e])}identifierNameAtRelativeIndex(e){return this.identifierNameForToken(this.tokenAtRelativeIndex(e))}identifierName(){return this.identifierNameForToken(this.currentToken())}identifierNameForToken(e){return this.code.slice(e.start,e.end)}rawCodeForToken(e){return this.code.slice(e.start,e.end)}stringValueAtIndex(e){return this.stringValueForToken(this.tokens[e])}stringValue(){return this.stringValueForToken(this.currentToken())}stringValueForToken(e){return this.code.slice(e.start+1,e.end-1)}matches1AtIndex(e,t){return this.tokens[e].type===t}matches2AtIndex(e,t,n){return this.tokens[e].type===t&&this.tokens[e+1].type===n}matches3AtIndex(e,t,n,r){return this.tokens[e].type===t&&this.tokens[e+1].type===n&&this.tokens[e+2].type===r}matches1(e){return this.tokens[this.tokenIndex].type===e}matches2(e,t){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t}matches3(e,t,n){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t&&this.tokens[this.tokenIndex+2].type===n}matches4(e,t,n,r){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t&&this.tokens[this.tokenIndex+2].type===n&&this.tokens[this.tokenIndex+3].type===r}matches5(e,t,n,r,i){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t&&this.tokens[this.tokenIndex+2].type===n&&this.tokens[this.tokenIndex+3].type===r&&this.tokens[this.tokenIndex+4].type===i}matchesContextual(e){return this.matchesContextualAtIndex(this.tokenIndex,e)}matchesContextIdAndLabel(e,t){return this.matches1(e)&&this.currentToken().contextId===t}previousWhitespaceAndComments(){let e=this.code.slice(this.tokenIndex>0?this.tokens[this.tokenIndex-1].end:0,this.tokenIndex<this.tokens.length?this.tokens[this.tokenIndex].start:this.code.length);return this.isFlowEnabled&&(e=e.replace(/@flow/g,``)),e}replaceToken(e){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=e,this.appendTokenSuffix(),this.tokenIndex++}replaceTokenTrimmingLeftWhitespace(e){this.resultCode+=this.previousWhitespaceAndComments().replace(/[^\\r\\n]/g,``),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=e,this.appendTokenSuffix(),this.tokenIndex++}removeInitialToken(){this.replaceToken(``)}removeToken(){this.replaceTokenTrimmingLeftWhitespace(``)}removeBalancedCode(){let e=0;for(;!this.isAtEnd();){if(this.matches1(U.braceL))e++;else if(this.matches1(U.braceR)){if(e===0)return;e--}this.removeToken()}}copyExpectedToken(e){if(this.tokens[this.tokenIndex].type!==e)throw Error(`Expected token ${e}`);this.copyToken()}copyToken(){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}copyTokenWithPrefix(e){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultCode+=e,this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}appendTokenPrefix(){let e=this.currentToken();if((e.numNullishCoalesceStarts||e.isOptionalChainStart)&&(e.isAsyncOperation=PO(this)),!this.disableESTransforms){if(e.numNullishCoalesceStarts)for(let t=0;t<e.numNullishCoalesceStarts;t++)e.isAsyncOperation?(this.resultCode+=`await `,this.resultCode+=this.helperManager.getHelperName(`asyncNullishCoalesce`)):this.resultCode+=this.helperManager.getHelperName(`nullishCoalesce`),this.resultCode+=`(`;e.isOptionalChainStart&&(e.isAsyncOperation&&(this.resultCode+=`await `),this.tokenIndex>0&&this.tokenAtRelativeIndex(-1).type===U._delete?e.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName(`asyncOptionalChainDelete`):this.resultCode+=this.helperManager.getHelperName(`optionalChainDelete`):e.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName(`asyncOptionalChain`):this.resultCode+=this.helperManager.getHelperName(`optionalChain`),this.resultCode+=`([`)}}appendTokenSuffix(){let e=this.currentToken();if(e.isOptionalChainEnd&&!this.disableESTransforms&&(this.resultCode+=`])`),e.numNullishCoalesceEnds&&!this.disableESTransforms)for(let t=0;t<e.numNullishCoalesceEnds;t++)this.resultCode+=`))`}appendCode(e){this.resultCode+=e}currentToken(){return this.tokens[this.tokenIndex]}currentTokenCode(){let e=this.currentToken();return this.code.slice(e.start,e.end)}tokenAtRelativeIndex(e){return this.tokens[this.tokenIndex+e]}currentIndex(){return this.tokenIndex}nextToken(){if(this.tokenIndex===this.tokens.length)throw Error(`Unexpectedly reached end of input.`);this.tokenIndex++}previousToken(){this.tokenIndex--}finish(){if(this.tokenIndex!==this.tokens.length)throw Error(`Tried to finish processing tokens before reaching the end.`);return this.resultCode+=this.previousWhitespaceAndComments(),{code:this.resultCode,mappings:this.resultMappings}}isAtEnd(){return this.tokenIndex===this.tokens.length}};function IO(e,t,n,r){let i=t.snapshot(),a=RO(t),o=[],s=[],c=[],l=null,u=[],d=[],f=t.currentToken().contextId;if(f==null)throw Error(`Expected non-null class context ID on class open-brace.`);for(t.nextToken();!t.matchesContextIdAndLabel(U.braceR,f);)if(t.matchesContextual(H._constructor)&&!t.currentToken().isType)({constructorInitializerStatements:o,constructorInsertPos:l}=zO(t));else if(t.matches1(U.semi))r||d.push({start:t.currentIndex(),end:t.currentIndex()+1}),t.nextToken();else if(t.currentToken().isType)t.nextToken();else{let i=t.currentIndex(),a=!1,p=!1,m=!1;for(;BO(t.currentToken());)t.matches1(U._static)&&(a=!0),t.matches1(U.hash)&&(p=!0),(t.matches1(U._declare)||t.matches1(U._abstract))&&(m=!0),t.nextToken();if(a&&t.matches1(U.braceL)){LO(t,f);continue}if(p){LO(t,f);continue}if(t.matchesContextual(H._constructor)&&!t.currentToken().isType){({constructorInitializerStatements:o,constructorInsertPos:l}=zO(t));continue}let h=t.currentIndex();if(VO(t),t.matches1(U.lessThan)||t.matches1(U.parenL)){LO(t,f);continue}for(;t.currentToken().isType;)t.nextToken();if(t.matches1(U.eq)){let r=t.currentIndex(),i=t.currentToken().rhsEndIndex;if(i==null)throw Error(`Expected rhsEndIndex on class field assignment.`);for(t.nextToken();t.currentIndex()<i;)e.processToken();let o;a?(o=n.claimFreeName(`__initStatic`),c.push(o)):(o=n.claimFreeName(`__init`),s.push(o)),u.push({initializerName:o,equalsIndex:r,start:h,end:t.currentIndex()})}else(!r||m)&&d.push({start:i,end:t.currentIndex()})}return t.restoreToSnapshot(i),r?{headerInfo:a,constructorInitializerStatements:o,instanceInitializerNames:[],staticInitializerNames:[],constructorInsertPos:l,fields:[],rangesToRemove:d}:{headerInfo:a,constructorInitializerStatements:o,instanceInitializerNames:s,staticInitializerNames:c,constructorInsertPos:l,fields:u,rangesToRemove:d}}function LO(e,t){for(e.nextToken();e.currentToken().contextId!==t;)e.nextToken();for(;BO(e.tokenAtRelativeIndex(-1));)e.previousToken()}function RO(e){let t=e.currentToken(),n=t.contextId;if(n==null)throw Error(`Expected context ID on class token.`);let r=t.isExpression;if(r==null)throw Error(`Expected isExpression on class token.`);let i=null,a=!1;for(e.nextToken(),e.matches1(U.name)&&(i=e.identifierName());!e.matchesContextIdAndLabel(U.braceL,n);)e.matches1(U._extends)&&!e.currentToken().isType&&(a=!0),e.nextToken();return{isExpression:r,className:i,hasSuperclass:a}}function zO(e){let t=[];e.nextToken();let n=e.currentToken().contextId;if(n==null)throw Error(`Expected context ID on open-paren starting constructor params.`);for(;!e.matchesContextIdAndLabel(U.parenR,n);)if(e.currentToken().contextId===n){if(e.nextToken(),BO(e.currentToken())){for(e.nextToken();BO(e.currentToken());)e.nextToken();let n=e.currentToken();if(n.type!==U.name)throw Error(`Expected identifier after access modifiers in constructor arg.`);let r=e.identifierNameForToken(n);t.push(`this.${r} = ${r}`)}}else e.nextToken();for(e.nextToken();e.currentToken().isType;)e.nextToken();let r=e.currentIndex(),i=!1;for(;!e.matchesContextIdAndLabel(U.braceR,n);){if(!i&&e.matches2(U._super,U.parenL)){e.nextToken();let t=e.currentToken().contextId;if(t==null)throw Error(`Expected a context ID on the super call`);for(;!e.matchesContextIdAndLabel(U.parenR,t);)e.nextToken();r=e.currentIndex(),i=!0}e.nextToken()}return e.nextToken(),{constructorInitializerStatements:t,constructorInsertPos:r}}function BO(e){return[U._async,U._get,U._set,U.plus,U.minus,U._readonly,U._static,U._public,U._private,U._protected,U._override,U._abstract,U.star,U._declare,U.hash].includes(e.type)}function VO(e){if(e.matches1(U.bracketL)){let t=e.currentToken().contextId;if(t==null)throw Error(`Expected class context ID on computed name open bracket.`);for(;!e.matchesContextIdAndLabel(U.bracketR,t);)e.nextToken();e.nextToken()}else e.nextToken()}function HO(e){if(e.removeInitialToken(),e.removeToken(),e.removeToken(),e.removeToken(),e.matches1(U.parenL))e.removeToken(),e.removeToken(),e.removeToken();else for(;e.matches1(U.dot);)e.removeToken(),e.removeToken()}var UO={typeDeclarations:new Set,valueDeclarations:new Set};function WO(e){let t=new Set,n=new Set;for(let r=0;r<e.tokens.length;r++){let i=e.tokens[r];i.type===U.name&&Ub(i)&&(i.isType?t.add(e.identifierNameForToken(i)):n.add(e.identifierNameForToken(i)))}return{typeDeclarations:t,valueDeclarations:n}}function GO(e){let t=e.currentIndex();for(;!e.matches1AtIndex(t,U.braceR);)t++;return e.matchesContextualAtIndex(t+1,H._from)&&e.matches1AtIndex(t+2,U.string)}function KO(e){(e.matches2(U._with,U.braceL)||e.matches2(U.name,U.braceL)&&e.matchesContextual(H._assert))&&(e.removeToken(),e.removeToken(),e.removeBalancedCode(),e.removeToken())}function qO(e,t,n,r){if(!e||t)return!1;let i=n.currentToken();if(i.rhsEndIndex==null)throw Error(`Expected non-null rhsEndIndex on export token.`);let a=i.rhsEndIndex-n.currentIndex();if(a!==3&&!(a===4&&n.matches1AtIndex(i.rhsEndIndex-1,U.semi)))return!1;let o=n.tokenAtRelativeIndex(2);if(o.type!==U.name)return!1;let s=n.identifierNameForToken(o);return r.typeDeclarations.has(s)&&!r.valueDeclarations.has(s)}var JO=class e extends Ix{__init(){this.hadExport=!1}__init2(){this.hadNamedExport=!1}__init3(){this.hadDefaultExport=!1}constructor(t,n,r,i,a,o,s,c,l,u,d,f){super(),this.rootTransformer=t,this.tokens=n,this.importProcessor=r,this.nameManager=i,this.helperManager=a,this.reactHotLoaderTransformer=o,this.enableLegacyBabel5ModuleInterop=s,this.enableLegacyTypeScriptModuleInterop=c,this.isTypeScriptTransformEnabled=l,this.isFlowTransformEnabled=u,this.preserveDynamicImport=d,this.keepUnusedImports=f,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),this.declarationInfo=l?WO(n):UO}getPrefixCode(){let e=``;return this.hadExport&&(e+=`Object.defineProperty(exports, "__esModule", {value: true});`),e}getSuffixCode(){return this.enableLegacyBabel5ModuleInterop&&this.hadDefaultExport&&!this.hadNamedExport?`\nmodule.exports = exports.default;\n`:``}process(){return this.tokens.matches3(U._import,U.name,U.eq)?this.processImportEquals():this.tokens.matches1(U._import)?(this.processImport(),!0):this.tokens.matches2(U._export,U.eq)?(this.tokens.replaceToken(`module.exports`),!0):this.tokens.matches1(U._export)&&!this.tokens.currentToken().isType?(this.hadExport=!0,this.processExport()):this.tokens.matches2(U.name,U.postIncDec)&&this.processPostIncDec()?!0:this.tokens.matches1(U.name)||this.tokens.matches1(U.jsxName)?this.processIdentifier():this.tokens.matches1(U.eq)?this.processAssignment():this.tokens.matches1(U.assign)?this.processComplexAssignment():this.tokens.matches1(U.preIncDec)?this.processPreIncDec():!1}processImportEquals(){let e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.importProcessor.shouldAutomaticallyElideImportedName(e)?HO(this.tokens):this.tokens.replaceToken(`const`),!0}processImport(){if(this.tokens.matches2(U._import,U.parenL)){if(this.preserveDynamicImport){this.tokens.copyToken();return}let e=this.enableLegacyTypeScriptModuleInterop?``:`${this.helperManager.getHelperName(`interopRequireWildcard`)}(`;this.tokens.replaceToken(`Promise.resolve().then(() => ${e}require`);let t=this.tokens.currentToken().contextId;if(t==null)throw Error(`Expected context ID on dynamic import invocation.`);for(this.tokens.copyToken();!this.tokens.matchesContextIdAndLabel(U.parenR,t);)this.rootTransformer.processToken();this.tokens.replaceToken(e?`)))`:`))`);return}if(this.removeImportAndDetectIfShouldElide())this.tokens.removeToken();else{let e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),this.tokens.appendCode(this.importProcessor.claimImportCode(e))}KO(this.tokens),this.tokens.matches1(U.semi)&&this.tokens.removeToken()}removeImportAndDetectIfShouldElide(){if(this.tokens.removeInitialToken(),this.tokens.matchesContextual(H._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,U.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,H._from))return this.removeRemainingImport(),!0;if(this.tokens.matches1(U.name)||this.tokens.matches1(U.star))return this.removeRemainingImport(),!1;if(this.tokens.matches1(U.string))return!1;let e=!1,t=!1;for(;!this.tokens.matches1(U.string);)(!e&&this.tokens.matches1(U.braceL)||this.tokens.matches1(U.comma))&&(this.tokens.removeToken(),this.tokens.matches1(U.braceR)||(t=!0),(this.tokens.matches2(U.name,U.comma)||this.tokens.matches2(U.name,U.braceR)||this.tokens.matches4(U.name,U.name,U.name,U.comma)||this.tokens.matches4(U.name,U.name,U.name,U.braceR))&&(e=!0)),this.tokens.removeToken();return this.keepUnusedImports?!1:this.isTypeScriptTransformEnabled?!e:this.isFlowTransformEnabled?t&&!e:!1}removeRemainingImport(){for(;!this.tokens.matches1(U.string);)this.tokens.removeToken()}processIdentifier(){let e=this.tokens.currentToken();if(e.shadowsGlobal)return!1;if(e.identifierRole===Y.ObjectShorthand)return this.processObjectShorthand();if(e.identifierRole!==Y.Access)return!1;let t=this.importProcessor.getIdentifierReplacement(this.tokens.identifierNameForToken(e));if(!t)return!1;let n=this.tokens.currentIndex()+1;for(;n<this.tokens.tokens.length&&this.tokens.tokens[n].type===U.parenR;)n++;return this.tokens.tokens[n].type===U.parenL?this.tokens.tokenAtRelativeIndex(1).type===U.parenL&&this.tokens.tokenAtRelativeIndex(-1).type!==U._new?(this.tokens.replaceToken(`${t}.call(void 0, `),this.tokens.removeToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR)):this.tokens.replaceToken(`(0, ${t})`):this.tokens.replaceToken(t),!0}processObjectShorthand(){let e=this.tokens.identifierName(),t=this.importProcessor.getIdentifierReplacement(e);return t?(this.tokens.replaceToken(`${e}: ${t}`),!0):!1}processExport(){if(this.tokens.matches2(U._export,U._enum)||this.tokens.matches3(U._export,U._const,U._enum))return this.hadNamedExport=!0,!1;if(this.tokens.matches2(U._export,U._default))return this.tokens.matches3(U._export,U._default,U._enum)?(this.hadDefaultExport=!0,!1):(this.processExportDefault(),!0);if(this.tokens.matches2(U._export,U.braceL))return this.processExportBindings(),!0;if(this.tokens.matches2(U._export,U.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,H._type)){if(this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(U.braceL)){for(;!this.tokens.matches1(U.braceR);)this.tokens.removeToken();this.tokens.removeToken()}else this.tokens.removeToken(),this.tokens.matches1(U._as)&&(this.tokens.removeToken(),this.tokens.removeToken());return this.tokens.matchesContextual(H._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,U.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),KO(this.tokens)),!0}if(this.hadNamedExport=!0,this.tokens.matches2(U._export,U._var)||this.tokens.matches2(U._export,U._let)||this.tokens.matches2(U._export,U._const))return this.processExportVar(),!0;if(this.tokens.matches2(U._export,U._function)||this.tokens.matches3(U._export,U.name,U._function))return this.processExportFunction(),!0;if(this.tokens.matches2(U._export,U._class)||this.tokens.matches3(U._export,U._abstract,U._class)||this.tokens.matches2(U._export,U.at))return this.processExportClass(),!0;if(this.tokens.matches2(U._export,U.star))return this.processExportStar(),!0;throw Error(`Unrecognized export syntax.`)}processAssignment(){let e=this.tokens.currentIndex(),t=this.tokens.tokens[e-1];if(t.isType||t.type!==U.name||t.shadowsGlobal||e>=2&&this.tokens.matches1AtIndex(e-2,U.dot)||e>=2&&[U._var,U._let,U._const].includes(this.tokens.tokens[e-2].type))return!1;let n=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(t));return n?(this.tokens.copyToken(),this.tokens.appendCode(` ${n} =`),!0):!1}processComplexAssignment(){let e=this.tokens.currentIndex(),t=this.tokens.tokens[e-1];if(t.type!==U.name||t.shadowsGlobal||e>=2&&this.tokens.matches1AtIndex(e-2,U.dot))return!1;let n=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(t));return n?(this.tokens.appendCode(` = ${n}`),this.tokens.copyToken(),!0):!1}processPreIncDec(){let e=this.tokens.currentIndex(),t=this.tokens.tokens[e+1];if(t.type!==U.name||t.shadowsGlobal||e+2<this.tokens.tokens.length&&(this.tokens.matches1AtIndex(e+2,U.dot)||this.tokens.matches1AtIndex(e+2,U.bracketL)||this.tokens.matches1AtIndex(e+2,U.parenL)))return!1;let n=this.tokens.identifierNameForToken(t),r=this.importProcessor.resolveExportBinding(n);return r?(this.tokens.appendCode(`${r} = `),this.tokens.copyToken(),!0):!1}processPostIncDec(){let e=this.tokens.currentIndex(),t=this.tokens.tokens[e],n=this.tokens.tokens[e+1];if(t.type!==U.name||t.shadowsGlobal||e>=1&&this.tokens.matches1AtIndex(e-1,U.dot))return!1;let r=this.tokens.identifierNameForToken(t),i=this.importProcessor.resolveExportBinding(r);if(!i)return!1;let a=this.tokens.rawCodeForToken(n),o=this.importProcessor.getIdentifierReplacement(r)||r;if(a===`++`)this.tokens.replaceToken(`(${o} = ${i} = ${o} + 1, ${o} - 1)`);else if(a===`--`)this.tokens.replaceToken(`(${o} = ${i} = ${o} - 1, ${o} + 1)`);else throw Error(`Unexpected operator: ${a}`);return this.tokens.removeToken(),!0}processExportDefault(){let e=!0;if(this.tokens.matches4(U._export,U._default,U._function,U.name)||this.tokens.matches5(U._export,U._default,U.name,U._function,U.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,H._async)){this.tokens.removeInitialToken(),this.tokens.removeToken();let e=this.processNamedFunction();this.tokens.appendCode(` exports.default = ${e};`)}else if(this.tokens.matches4(U._export,U._default,U._class,U.name)||this.tokens.matches5(U._export,U._default,U._abstract,U._class,U.name)||this.tokens.matches3(U._export,U._default,U.at)){this.tokens.removeInitialToken(),this.tokens.removeToken(),this.copyDecorators(),this.tokens.matches1(U._abstract)&&this.tokens.removeToken();let e=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.default = ${e};`)}else if(qO(this.isTypeScriptTransformEnabled,this.keepUnusedImports,this.tokens,this.declarationInfo))e=!1,this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken();else if(this.reactHotLoaderTransformer){let e=this.nameManager.claimFreeName(`_default`);this.tokens.replaceToken(`let ${e}; exports.`),this.tokens.copyToken(),this.tokens.appendCode(` = ${e} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(e)}else this.tokens.replaceToken(`exports.`),this.tokens.copyToken(),this.tokens.appendCode(` =`);e&&(this.hadDefaultExport=!0)}copyDecorators(){for(;this.tokens.matches1(U.at);)if(this.tokens.copyToken(),this.tokens.matches1(U.parenL))this.tokens.copyExpectedToken(U.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR);else{for(this.tokens.copyExpectedToken(U.name);this.tokens.matches1(U.dot);)this.tokens.copyExpectedToken(U.dot),this.tokens.copyExpectedToken(U.name);this.tokens.matches1(U.parenL)&&(this.tokens.copyExpectedToken(U.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR))}}processExportVar(){this.isSimpleExportVar()?this.processSimpleExportVar():this.processComplexExportVar()}isSimpleExportVar(){let e=this.tokens.currentIndex();if(e++,e++,!this.tokens.matches1AtIndex(e,U.name))return!1;for(e++;e<this.tokens.tokens.length&&this.tokens.tokens[e].isType;)e++;return!!this.tokens.matches1AtIndex(e,U.eq)}processSimpleExportVar(){this.tokens.removeInitialToken(),this.tokens.copyToken();let e=this.tokens.identifierName();for(;!this.tokens.matches1(U.eq);)this.rootTransformer.processToken();let t=this.tokens.currentToken().rhsEndIndex;if(t==null)throw Error(`Expected = token with an end index.`);for(;this.tokens.currentIndex()<t;)this.rootTransformer.processToken();this.tokens.appendCode(`; exports.${e} = ${e}`)}processComplexExportVar(){this.tokens.removeInitialToken(),this.tokens.removeToken();let e=this.tokens.matches1(U.braceL);e&&this.tokens.appendCode(`(`);let t=0;for(;;)if(this.tokens.matches1(U.braceL)||this.tokens.matches1(U.dollarBraceL)||this.tokens.matches1(U.bracketL))t++,this.tokens.copyToken();else if(this.tokens.matches1(U.braceR)||this.tokens.matches1(U.bracketR))t--,this.tokens.copyToken();else if(t===0&&!this.tokens.matches1(U.name)&&!this.tokens.currentToken().isType)break;else if(this.tokens.matches1(U.eq)){let e=this.tokens.currentToken().rhsEndIndex;if(e==null)throw Error(`Expected = token with an end index.`);for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken()}else{let e=this.tokens.currentToken();if(Vb(e)){let t=this.tokens.identifierName(),n=this.importProcessor.getIdentifierReplacement(t);if(n===null)throw Error(`Expected a replacement for ${t} in \\`export var\\` syntax.`);Kb(e)&&(n=`${t}: ${n}`),this.tokens.replaceToken(n)}else this.rootTransformer.processToken()}if(e){let e=this.tokens.currentToken().rhsEndIndex;if(e==null)throw Error(`Expected = token with an end index.`);for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken();this.tokens.appendCode(`)`)}}processExportFunction(){this.tokens.replaceToken(``);let e=this.processNamedFunction();this.tokens.appendCode(` exports.${e} = ${e};`)}processNamedFunction(){if(this.tokens.matches1(U._function))this.tokens.copyToken();else if(this.tokens.matches2(U.name,U._function)){if(!this.tokens.matchesContextual(H._async))throw Error(`Expected async keyword in function export.`);this.tokens.copyToken(),this.tokens.copyToken()}if(this.tokens.matches1(U.star)&&this.tokens.copyToken(),!this.tokens.matches1(U.name))throw Error(`Expected identifier for exported function name.`);let e=this.tokens.identifierName();if(this.tokens.copyToken(),this.tokens.currentToken().isType)for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return this.tokens.copyExpectedToken(U.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR),this.rootTransformer.processPossibleTypeRange(),this.tokens.copyExpectedToken(U.braceL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.braceR),e}processExportClass(){this.tokens.removeInitialToken(),this.copyDecorators(),this.tokens.matches1(U._abstract)&&this.tokens.removeToken();let e=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.${e} = ${e};`)}processExportBindings(){this.tokens.removeInitialToken(),this.tokens.removeToken();let e=GO(this.tokens),t=[];for(;;){if(this.tokens.matches1(U.braceR)){this.tokens.removeToken();break}let n=jx(this.tokens);for(;this.tokens.currentIndex()<n.endIndex;)this.tokens.removeToken();if(!(n.isType||!e&&this.shouldElideExportedIdentifier(n.leftName))){let e=n.rightName;e==="default"?this.hadDefaultExport=!0:this.hadNamedExport=!0;let r=n.leftName,i=this.importProcessor.getIdentifierReplacement(r);t.push(`exports.${e} = ${i||r};`)}if(this.tokens.matches1(U.braceR)){this.tokens.removeToken();break}if(this.tokens.matches2(U.comma,U.braceR)){this.tokens.removeToken(),this.tokens.removeToken();break}else if(this.tokens.matches1(U.comma))this.tokens.removeToken();else throw Error(`Unexpected token: ${JSON.stringify(this.tokens.currentToken())}`)}if(this.tokens.matchesContextual(H._from)){this.tokens.removeToken();let e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),KO(this.tokens)}else this.tokens.appendCode(t.join(` `));this.tokens.matches1(U.semi)&&this.tokens.removeToken()}processExportStar(){for(this.tokens.removeInitialToken();!this.tokens.matches1(U.string);)this.tokens.removeToken();let e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),KO(this.tokens),this.tokens.matches1(U.semi)&&this.tokens.removeToken()}shouldElideExportedIdentifier(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.declarationInfo.valueDeclarations.has(e)}},YO=class extends Ix{constructor(e,t,n,r,i,a,o,s){super(),this.tokens=e,this.nameManager=t,this.helperManager=n,this.reactHotLoaderTransformer=r,this.isTypeScriptTransformEnabled=i,this.isFlowTransformEnabled=a,this.keepUnusedImports=o,this.nonTypeIdentifiers=i&&!o?Gx(e,s):new Set,this.declarationInfo=i&&!o?WO(e):UO,this.injectCreateRequireForImportRequire=!!s.injectCreateRequireForImportRequire}process(){if(this.tokens.matches3(U._import,U.name,U.eq))return this.processImportEquals();if(this.tokens.matches4(U._import,U.name,U.name,U.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,H._type)){this.tokens.removeInitialToken();for(let e=0;e<7;e++)this.tokens.removeToken();return!0}if(this.tokens.matches2(U._export,U.eq))return this.tokens.replaceToken(`module.exports`),!0;if(this.tokens.matches5(U._export,U._import,U.name,U.name,U.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,H._type)){this.tokens.removeInitialToken();for(let e=0;e<8;e++)this.tokens.removeToken();return!0}if(this.tokens.matches1(U._import))return this.processImport();if(this.tokens.matches2(U._export,U._default))return this.processExportDefault();if(this.tokens.matches2(U._export,U.braceL))return this.processNamedExports();if(this.tokens.matches2(U._export,U.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,H._type)){if(this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(U.braceL)){for(;!this.tokens.matches1(U.braceR);)this.tokens.removeToken();this.tokens.removeToken()}else this.tokens.removeToken(),this.tokens.matches1(U._as)&&(this.tokens.removeToken(),this.tokens.removeToken());return this.tokens.matchesContextual(H._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,U.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),KO(this.tokens)),!0}return!1}processImportEquals(){let e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.shouldAutomaticallyElideImportedName(e)?HO(this.tokens):this.injectCreateRequireForImportRequire?(this.tokens.replaceToken(`const`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.replaceToken(this.helperManager.getHelperName(`require`))):this.tokens.replaceToken(`const`),!0}processImport(){if(this.tokens.matches2(U._import,U.parenL))return!1;let e=this.tokens.snapshot();if(this.removeImportTypeBindings()){for(this.tokens.restoreToSnapshot(e);!this.tokens.matches1(U.string);)this.tokens.removeToken();this.tokens.removeToken(),KO(this.tokens),this.tokens.matches1(U.semi)&&this.tokens.removeToken()}return!0}removeImportTypeBindings(){if(this.tokens.copyExpectedToken(U._import),this.tokens.matchesContextual(H._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,U.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,H._from))return!0;if(this.tokens.matches1(U.string))return this.tokens.copyToken(),!1;this.tokens.matchesContextual(H._module)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,H._from)&&this.tokens.copyToken();let e=!1,t=!1,n=!1;if(this.tokens.matches1(U.name)&&(this.shouldAutomaticallyElideImportedName(this.tokens.identifierName())?(this.tokens.removeToken(),this.tokens.matches1(U.comma)&&this.tokens.removeToken()):(e=!0,this.tokens.copyToken(),this.tokens.matches1(U.comma)&&(n=!0,this.tokens.removeToken()))),this.tokens.matches1(U.star))this.shouldAutomaticallyElideImportedName(this.tokens.identifierNameAtRelativeIndex(2))?(this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.removeToken()):(n&&this.tokens.appendCode(`,`),e=!0,this.tokens.copyExpectedToken(U.star),this.tokens.copyExpectedToken(U.name),this.tokens.copyExpectedToken(U.name));else if(this.tokens.matches1(U.braceL)){for(n&&this.tokens.appendCode(`,`),this.tokens.copyToken();!this.tokens.matches1(U.braceR);){t=!0;let n=jx(this.tokens);if(n.isType||this.shouldAutomaticallyElideImportedName(n.rightName)){for(;this.tokens.currentIndex()<n.endIndex;)this.tokens.removeToken();this.tokens.matches1(U.comma)&&this.tokens.removeToken()}else{for(e=!0;this.tokens.currentIndex()<n.endIndex;)this.tokens.copyToken();this.tokens.matches1(U.comma)&&this.tokens.copyToken()}}this.tokens.copyExpectedToken(U.braceR)}return this.keepUnusedImports?!1:this.isTypeScriptTransformEnabled?!e:this.isFlowTransformEnabled?t&&!e:!1}shouldAutomaticallyElideImportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.nonTypeIdentifiers.has(e)}processExportDefault(){if(qO(this.isTypeScriptTransformEnabled,this.keepUnusedImports,this.tokens,this.declarationInfo))return this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken(),!0;if(!(this.tokens.matches4(U._export,U._default,U._function,U.name)||this.tokens.matches5(U._export,U._default,U.name,U._function,U.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,H._async)||this.tokens.matches4(U._export,U._default,U._class,U.name)||this.tokens.matches5(U._export,U._default,U._abstract,U._class,U.name))&&this.reactHotLoaderTransformer){let e=this.nameManager.claimFreeName(`_default`);return this.tokens.replaceToken(`let ${e}; export`),this.tokens.copyToken(),this.tokens.appendCode(` ${e} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(e),!0}return!1}processNamedExports(){if(!this.isTypeScriptTransformEnabled)return!1;this.tokens.copyExpectedToken(U._export),this.tokens.copyExpectedToken(U.braceL);let e=GO(this.tokens),t=!1;for(;!this.tokens.matches1(U.braceR);){let n=jx(this.tokens);if(n.isType||!e&&this.shouldElideExportedName(n.leftName)){for(;this.tokens.currentIndex()<n.endIndex;)this.tokens.removeToken();this.tokens.matches1(U.comma)&&this.tokens.removeToken()}else{for(t=!0;this.tokens.currentIndex()<n.endIndex;)this.tokens.copyToken();this.tokens.matches1(U.comma)&&this.tokens.copyToken()}}return this.tokens.copyExpectedToken(U.braceR),!this.keepUnusedImports&&e&&!t&&(this.tokens.removeToken(),this.tokens.removeToken(),KO(this.tokens)),!0}shouldElideExportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&this.declarationInfo.typeDeclarations.has(e)&&!this.declarationInfo.valueDeclarations.has(e)}},XO=class extends Ix{constructor(e,t,n){super(),this.rootTransformer=e,this.tokens=t,this.isImportsTransformEnabled=n}process(){return this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange()?!0:this.tokens.matches1(U._enum)?(this.processEnum(),!0):this.tokens.matches2(U._export,U._enum)?(this.processNamedExportEnum(),!0):this.tokens.matches3(U._export,U._default,U._enum)?(this.processDefaultExportEnum(),!0):!1}processNamedExportEnum(){if(this.isImportsTransformEnabled){this.tokens.removeInitialToken();let e=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.tokens.appendCode(` exports.${e} = ${e};`)}else this.tokens.copyToken(),this.processEnum()}processDefaultExportEnum(){this.tokens.removeInitialToken(),this.tokens.removeToken();let e=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.isImportsTransformEnabled?this.tokens.appendCode(` exports.default = ${e};`):this.tokens.appendCode(` export default ${e};`)}processEnum(){this.tokens.replaceToken(`const`),this.tokens.copyExpectedToken(U.name);let e=!1;this.tokens.matchesContextual(H._of)&&(this.tokens.removeToken(),e=this.tokens.matchesContextual(H._symbol),this.tokens.removeToken());let t=this.tokens.matches3(U.braceL,U.name,U.eq);this.tokens.appendCode(` = require("flow-enums-runtime")`);let n=!e&&!t;for(this.tokens.replaceTokenTrimmingLeftWhitespace(n?`.Mirrored([`:`({`);!this.tokens.matches1(U.braceR);){if(this.tokens.matches1(U.ellipsis)){this.tokens.removeToken();break}this.processEnumElement(e,t),this.tokens.matches1(U.comma)&&this.tokens.copyToken()}this.tokens.replaceToken(n?`]);`:`});`)}processEnumElement(e,t){if(e){let e=this.tokens.identifierName();this.tokens.copyToken(),this.tokens.appendCode(`: Symbol("${e}")`)}else t?(this.tokens.copyToken(),this.tokens.replaceTokenTrimmingLeftWhitespace(`:`),this.tokens.copyToken()):this.tokens.replaceToken(`"${this.tokens.identifierName()}"`)}};function ZO(e){let t,n=e[0],r=1;for(;r<e.length;){let i=e[r],a=e[r+1];if(r+=2,(i===`optionalAccess`||i===`optionalCall`)&&n==null)return;i===`access`||i===`optionalAccess`?(t=n,n=a(n)):(i===`call`||i===`optionalCall`)&&(n=a((...e)=>n.call(t,...e)),t=void 0)}return n}var QO=`jest`,$O=[`mock`,`unmock`,`enableAutomock`,`disableAutomock`],ek=class e extends Ix{__init(){this.hoistedFunctionNames=[]}constructor(t,n,r,i){super(),this.rootTransformer=t,this.tokens=n,this.nameManager=r,this.importProcessor=i,e.prototype.__init.call(this)}process(){return this.tokens.currentToken().scopeDepth===0&&this.tokens.matches4(U.name,U.dot,U.name,U.parenL)&&this.tokens.identifierName()===QO?!ZO([this,`access`,e=>e.importProcessor,`optionalAccess`,e=>e.getGlobalNames,`call`,e=>e(),`optionalAccess`,e=>e.has,`call`,e=>e(QO)])&&this.extractHoistedCalls():!1}getHoistedCode(){return this.hoistedFunctionNames.length>0?this.hoistedFunctionNames.map(e=>`${e}();`).join(``):``}extractHoistedCalls(){this.tokens.removeToken();let e=!1;for(;this.tokens.matches3(U.dot,U.name,U.parenL);){let t=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);if($O.includes(t)){let t=this.nameManager.claimFreeName(`__jestHoist`);this.hoistedFunctionNames.push(t),this.tokens.replaceToken(`function ${t}(){${QO}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR),this.tokens.appendCode(`;}`),e=!1}else e?this.tokens.copyToken():this.tokens.replaceToken(`${QO}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR),e=!0}return!0}},tk=class extends Ix{constructor(e){super(),this.tokens=e}process(){if(this.tokens.matches1(U.num)){let e=this.tokens.currentTokenCode();if(e.includes(`_`))return this.tokens.replaceToken(e.replace(/_/g,``)),!0}return!1}},nk=class extends Ix{constructor(e,t){super(),this.tokens=e,this.nameManager=t}process(){return this.tokens.matches2(U._catch,U.braceL)?(this.tokens.copyToken(),this.tokens.appendCode(` (${this.nameManager.claimFreeName(`e`)})`),!0):!1}},rk=class extends Ix{constructor(e,t){super(),this.tokens=e,this.nameManager=t}process(){if(this.tokens.matches1(U.nullishCoalescing)){let e=this.tokens.currentToken();return this.tokens.tokens[e.nullishStartIndex].isAsyncOperation?this.tokens.replaceTokenTrimmingLeftWhitespace(`, async () => (`):this.tokens.replaceTokenTrimmingLeftWhitespace(`, () => (`),!0}if(this.tokens.matches1(U._delete)&&this.tokens.tokenAtRelativeIndex(1).isOptionalChainStart)return this.tokens.removeInitialToken(),!0;let e=this.tokens.currentToken().subscriptStartIndex;if(e!=null&&this.tokens.tokens[e].isOptionalChainStart&&this.tokens.tokenAtRelativeIndex(-1).type!==U._super){let t=this.nameManager.claimFreeName(`_`),n;if(n=e>0&&this.tokens.matches1AtIndex(e-1,U._delete)&&this.isLastSubscriptInChain()?`${t} => delete ${t}`:`${t} => ${t}`,this.tokens.tokens[e].isAsyncOperation&&(n=`async ${n}`),this.tokens.matches2(U.questionDot,U.parenL)||this.tokens.matches2(U.questionDot,U.lessThan))this.justSkippedSuper()&&this.tokens.appendCode(`.bind(this)`),this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'optionalCall\', ${n}`);else if(this.tokens.matches2(U.questionDot,U.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'optionalAccess\', ${n}`);else if(this.tokens.matches1(U.questionDot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'optionalAccess\', ${n}.`);else if(this.tokens.matches1(U.dot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'access\', ${n}.`);else if(this.tokens.matches1(U.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'access\', ${n}[`);else if(this.tokens.matches1(U.parenL))this.justSkippedSuper()&&this.tokens.appendCode(`.bind(this)`),this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'call\', ${n}(`);else throw Error(`Unexpected subscript operator in optional chain.`);return!0}return!1}isLastSubscriptInChain(){let e=0;for(let t=this.tokens.currentIndex()+1;;t++){if(t>=this.tokens.tokens.length)throw Error(`Reached the end of the code while finding the end of the access chain.`);if(this.tokens.tokens[t].isOptionalChainStart?e++:this.tokens.tokens[t].isOptionalChainEnd&&e--,e<0)return!0;if(e===0&&this.tokens.tokens[t].subscriptStartIndex!=null)return!1}}justSkippedSuper(){let e=0,t=this.tokens.currentIndex()-1;for(;;){if(t<0)throw Error(`Reached the start of the code while finding the start of the access chain.`);if(this.tokens.tokens[t].isOptionalChainStart?e--:this.tokens.tokens[t].isOptionalChainEnd&&e++,e<0)return!1;if(e===0&&this.tokens.tokens[t].subscriptStartIndex!=null)return this.tokens.tokens[t-1].type===U._super;t--}}},ik=class extends Ix{constructor(e,t,n,r){super(),this.rootTransformer=e,this.tokens=t,this.importProcessor=n,this.options=r}process(){let e=this.tokens.currentIndex();if(this.tokens.identifierName()===`createReactClass`){let t=this.importProcessor&&this.importProcessor.getIdentifierReplacement(`createReactClass`);return t?this.tokens.replaceToken(`(0, ${t})`):this.tokens.copyToken(),this.tryProcessCreateClassCall(e),!0}if(this.tokens.matches3(U.name,U.dot,U.name)&&this.tokens.identifierName()===`React`&&this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+2)===`createClass`){let t=this.importProcessor&&this.importProcessor.getIdentifierReplacement(`React`)||`React`;return t?(this.tokens.replaceToken(t),this.tokens.copyToken(),this.tokens.copyToken()):(this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.copyToken()),this.tryProcessCreateClassCall(e),!0}return!1}tryProcessCreateClassCall(e){let t=this.findDisplayName(e);t&&this.classNeedsDisplayName()&&(this.tokens.copyExpectedToken(U.parenL),this.tokens.copyExpectedToken(U.braceL),this.tokens.appendCode(`displayName: \'${t}\',`),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.braceR),this.tokens.copyExpectedToken(U.parenR))}findDisplayName(e){return e<2?null:this.tokens.matches2AtIndex(e-2,U.name,U.eq)||e>=2&&this.tokens.tokens[e-2].identifierRole===Y.ObjectKey?this.tokens.identifierNameAtIndex(e-2):this.tokens.matches2AtIndex(e-2,U._export,U._default)?this.getDisplayNameFromFilename():null}getDisplayNameFromFilename(){let e=(this.options.filePath||`unknown`).split(`/`),t=e[e.length-1],n=t.lastIndexOf(`.`),r=n===-1?t:t.slice(0,n);return r===`index`&&e[e.length-2]?e[e.length-2]:r}classNeedsDisplayName(){let e=this.tokens.currentIndex();if(!this.tokens.matches2(U.parenL,U.braceL))return!1;let t=e+1,n=this.tokens.tokens[t].contextId;if(n==null)throw Error(`Expected non-null context ID on object open-brace.`);for(;e<this.tokens.tokens.length;e++){let t=this.tokens.tokens[e];if(t.type===U.braceR&&t.contextId===n){e++;break}if(this.tokens.identifierNameAtIndex(e)===`displayName`&&this.tokens.tokens[e].identifierRole===Y.ObjectKey&&t.contextId===n)return!1}if(e===this.tokens.tokens.length)throw Error(`Unexpected end of input when processing React class.`);return this.tokens.matches1AtIndex(e,U.parenR)||this.tokens.matches2AtIndex(e,U.comma,U.parenR)}},ak=class e extends Ix{__init(){this.extractedDefaultExportName=null}constructor(t,n){super(),this.tokens=t,this.filePath=n,e.prototype.__init.call(this)}setExtractedDefaultExportName(e){this.extractedDefaultExportName=e}getPrefixCode(){return`\n (function () {\n var enterModule = require(\'react-hot-loader\').enterModule;\n enterModule && enterModule(module);\n })();`.replace(/\\s+/g,` `).trim()}getSuffixCode(){let e=new Set;for(let t of this.tokens.tokens)!t.isType&&Ub(t)&&t.identifierRole!==Y.ImportDeclaration&&e.add(this.tokens.identifierNameForToken(t));let t=Array.from(e).map(e=>({variableName:e,uniqueLocalName:e}));return this.extractedDefaultExportName&&t.push({variableName:this.extractedDefaultExportName,uniqueLocalName:`default`}),`\n;(function () {\n var reactHotLoader = require(\'react-hot-loader\').default;\n var leaveModule = require(\'react-hot-loader\').leaveModule;\n if (!reactHotLoader) {\n return;\n }\n${t.map(({variableName:e,uniqueLocalName:t})=>` reactHotLoader.register(${e}, "${t}", ${JSON.stringify(this.filePath||``)});`).join(`\n`)}\n leaveModule(module);\n})();`}process(){return!1}},ok=new Set(`break.case.catch.class.const.continue.debugger.default.delete.do.else.export.extends.finally.for.function.if.import.in.instanceof.new.return.super.switch.this.throw.try.typeof.var.void.while.with.yield.enum.implements.interface.let.package.private.protected.public.static.await.false.null.true`.split(`.`));function sk(e){if(e.length===0||!Lb[e.charCodeAt(0)])return!1;for(let t=1;t<e.length;t++)if(!Ib[e.charCodeAt(t)])return!1;return!ok.has(e)}var ck=class extends Ix{constructor(e,t,n){super(),this.rootTransformer=e,this.tokens=t,this.isImportsTransformEnabled=n}process(){return this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange()?!0:this.tokens.matches1(U._public)||this.tokens.matches1(U._protected)||this.tokens.matches1(U._private)||this.tokens.matches1(U._abstract)||this.tokens.matches1(U._readonly)||this.tokens.matches1(U._override)||this.tokens.matches1(U.nonNullAssertion)?(this.tokens.removeInitialToken(),!0):this.tokens.matches1(U._enum)||this.tokens.matches2(U._const,U._enum)?(this.processEnum(),!0):this.tokens.matches2(U._export,U._enum)||this.tokens.matches3(U._export,U._const,U._enum)?(this.processEnum(!0),!0):!1}processEnum(e=!1){for(this.tokens.removeInitialToken();this.tokens.matches1(U._const)||this.tokens.matches1(U._enum);)this.tokens.removeToken();let t=this.tokens.identifierName();this.tokens.removeToken(),e&&!this.isImportsTransformEnabled&&this.tokens.appendCode(`export `),this.tokens.appendCode(`var ${t}; (function (${t})`),this.tokens.copyExpectedToken(U.braceL),this.processEnumBody(t),this.tokens.copyExpectedToken(U.braceR),e&&this.isImportsTransformEnabled?this.tokens.appendCode(`)(${t} || (exports.${t} = ${t} = {}));`):this.tokens.appendCode(`)(${t} || (${t} = {}));`)}processEnumBody(e){let t=null;for(;!this.tokens.matches1(U.braceR);){let{nameStringCode:n,variableName:r}=this.extractEnumKeyInfo(this.tokens.currentToken());this.tokens.removeInitialToken(),this.tokens.matches3(U.eq,U.string,U.comma)||this.tokens.matches3(U.eq,U.string,U.braceR)?this.processStringLiteralEnumMember(e,n,r):this.tokens.matches1(U.eq)?this.processExplicitValueEnumMember(e,n,r):this.processImplicitValueEnumMember(e,n,r,t),this.tokens.matches1(U.comma)&&this.tokens.removeToken(),t=r??`${e}[${n}]`}}extractEnumKeyInfo(e){if(e.type===U.name){let t=this.tokens.identifierNameForToken(e);return{nameStringCode:`"${t}"`,variableName:sk(t)?t:null}}else if(e.type===U.string){let t=this.tokens.stringValueForToken(e);return{nameStringCode:this.tokens.code.slice(e.start,e.end),variableName:sk(t)?t:null}}else throw Error(`Expected name or string at beginning of enum element.`)}processStringLiteralEnumMember(e,t,n){n==null?(this.tokens.appendCode(`${e}[${t}]`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(`;`)):(this.tokens.appendCode(`const ${n}`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(`; ${e}[${t}] = ${n};`))}processExplicitValueEnumMember(e,t,n){let r=this.tokens.currentToken().rhsEndIndex;if(r==null)throw Error(`Expected rhsEndIndex on enum assign.`);if(n!=null){for(this.tokens.appendCode(`const ${n}`),this.tokens.copyToken();this.tokens.currentIndex()<r;)this.rootTransformer.processToken();this.tokens.appendCode(`; ${e}[${e}[${t}] = ${n}] = ${t};`)}else{for(this.tokens.appendCode(`${e}[${e}[${t}]`),this.tokens.copyToken();this.tokens.currentIndex()<r;)this.rootTransformer.processToken();this.tokens.appendCode(`] = ${t};`)}}processImplicitValueEnumMember(e,t,n,r){let i=r==null?`0`:`${r} + 1`;n!=null&&(this.tokens.appendCode(`const ${n} = ${i}; `),i=n),this.tokens.appendCode(`${e}[${e}[${t}] = ${i}] = ${t};`)}},lk=class e{__init(){this.transformers=[]}__init2(){this.generatedVariables=[]}constructor(t,n,r,i){e.prototype.__init.call(this),e.prototype.__init2.call(this),this.nameManager=t.nameManager,this.helperManager=t.helperManager;let{tokenProcessor:a,importProcessor:o}=t;this.tokens=a,this.isImportsTransformEnabled=n.includes(`imports`),this.isReactHotLoaderTransformEnabled=n.includes(`react-hot-loader`),this.disableESTransforms=!!i.disableESTransforms,i.disableESTransforms||(this.transformers.push(new rk(a,this.nameManager)),this.transformers.push(new tk(a)),this.transformers.push(new nk(a,this.nameManager))),n.includes(`jsx`)&&(i.jsxRuntime!==`preserve`&&this.transformers.push(new Lx(this,a,o,this.nameManager,i)),this.transformers.push(new ik(this,a,o,i)));let s=null;if(n.includes(`react-hot-loader`)){if(!i.filePath)throw Error(`filePath is required when using the react-hot-loader transform.`);s=new ak(a,i.filePath),this.transformers.push(s)}if(n.includes(`imports`)){if(o===null)throw Error(`Expected non-null importProcessor with imports transform enabled.`);this.transformers.push(new JO(this,a,o,this.nameManager,this.helperManager,s,r,!!i.enableLegacyTypeScriptModuleInterop,n.includes(`typescript`),n.includes(`flow`),!!i.preserveDynamicImport,!!i.keepUnusedImports))}else this.transformers.push(new YO(a,this.nameManager,this.helperManager,s,n.includes(`typescript`),n.includes(`flow`),!!i.keepUnusedImports,i));n.includes(`flow`)&&this.transformers.push(new XO(this,a,n.includes(`imports`))),n.includes(`typescript`)&&this.transformers.push(new ck(this,a,n.includes(`imports`))),n.includes(`jest`)&&this.transformers.push(new ek(this,a,this.nameManager,o))}transform(){this.tokens.reset(),this.processBalancedCode();let e=this.isImportsTransformEnabled?`"use strict";`:``;for(let t of this.transformers)e+=t.getPrefixCode();e+=this.helperManager.emitHelpers(),e+=this.generatedVariables.map(e=>` var ${e};`).join(``);for(let t of this.transformers)e+=t.getHoistedCode();let t=``;for(let e of this.transformers)t+=e.getSuffixCode();let n=this.tokens.finish(),{code:r}=n;if(r.startsWith(`#!`)){let i=r.indexOf(`\n`);return i===-1&&(i=r.length,r+=`\n`),{code:r.slice(0,i+1)+e+r.slice(i+1)+t,mappings:this.shiftMappings(n.mappings,e.length)}}else return{code:e+r+t,mappings:this.shiftMappings(n.mappings,e.length)}}processBalancedCode(){let e=0,t=0;for(;!this.tokens.isAtEnd();){if(this.tokens.matches1(U.braceL)||this.tokens.matches1(U.dollarBraceL))e++;else if(this.tokens.matches1(U.braceR)){if(e===0)return;e--}if(this.tokens.matches1(U.parenL))t++;else if(this.tokens.matches1(U.parenR)){if(t===0)return;t--}this.processToken()}}processToken(){if(this.tokens.matches1(U._class)){this.processClass();return}for(let e of this.transformers)if(e.process())return;this.tokens.copyToken()}processNamedClass(){if(!this.tokens.matches2(U._class,U.name))throw Error(`Expected identifier for exported class name.`);let e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.processClass(),e}processClass(){let e=IO(this,this.tokens,this.nameManager,this.disableESTransforms),t=(e.headerInfo.isExpression||!e.headerInfo.className)&&e.staticInitializerNames.length+e.instanceInitializerNames.length>0,n=e.headerInfo.className;t&&(n=this.nameManager.claimFreeName(`_class`),this.generatedVariables.push(n),this.tokens.appendCode(` (${n} =`));let r=this.tokens.currentToken().contextId;if(r==null)throw Error(`Expected class to have a context ID.`);for(this.tokens.copyExpectedToken(U._class);!this.tokens.matchesContextIdAndLabel(U.braceL,r);)this.processToken();this.processClassBody(e,n);let i=e.staticInitializerNames.map(e=>`${n}.${e}()`);t?this.tokens.appendCode(`, ${i.map(e=>`${e}, `).join(``)}${n})`):e.staticInitializerNames.length>0&&this.tokens.appendCode(` ${i.map(e=>`${e};`).join(` `)}`)}processClassBody(e,t){let{headerInfo:n,constructorInsertPos:r,constructorInitializerStatements:i,fields:a,instanceInitializerNames:o,rangesToRemove:s}=e,c=0,l=0,u=this.tokens.currentToken().contextId;if(u==null)throw Error(`Expected non-null context ID on class.`);this.tokens.copyExpectedToken(U.braceL),this.isReactHotLoaderTransformEnabled&&this.tokens.appendCode(`__reactstandin__regenerateByEval(key, code) {this[key] = eval(code);}`);let d=i.length+o.length>0;if(r===null&&d){let e=this.makeConstructorInitCode(i,o,t);if(n.hasSuperclass){let t=this.nameManager.claimFreeName(`args`);this.tokens.appendCode(`constructor(...${t}) { super(...${t}); ${e}; }`)}else this.tokens.appendCode(`constructor() { ${e}; }`)}for(;!this.tokens.matchesContextIdAndLabel(U.braceR,u);)if(c<a.length&&this.tokens.currentIndex()===a[c].start){let e=!1;for(this.tokens.matches1(U.bracketL)?this.tokens.copyTokenWithPrefix(`${a[c].initializerName}() {this`):this.tokens.matches1(U.string)||this.tokens.matches1(U.num)?(this.tokens.copyTokenWithPrefix(`${a[c].initializerName}() {this[`),e=!0):this.tokens.copyTokenWithPrefix(`${a[c].initializerName}() {this.`);this.tokens.currentIndex()<a[c].end;)e&&this.tokens.currentIndex()===a[c].equalsIndex&&this.tokens.appendCode(`]`),this.processToken();this.tokens.appendCode(`}`),c++}else if(l<s.length&&this.tokens.currentIndex()>=s[l].start){for(this.tokens.currentIndex()<s[l].end&&this.tokens.removeInitialToken();this.tokens.currentIndex()<s[l].end;)this.tokens.removeToken();l++}else this.tokens.currentIndex()===r?(this.tokens.copyToken(),d&&this.tokens.appendCode(`;${this.makeConstructorInitCode(i,o,t)};`),this.processToken()):this.processToken();this.tokens.copyExpectedToken(U.braceR)}makeConstructorInitCode(e,t,n){return[...e,...t.map(e=>`${n}.prototype.${e}.call(this)`)].join(`;`)}processPossibleArrowParamEnd(){if(this.tokens.matches2(U.parenR,U.colon)&&this.tokens.tokenAtRelativeIndex(1).isType){let e=this.tokens.currentIndex()+1;for(;this.tokens.tokens[e].isType;)e++;if(this.tokens.matches1AtIndex(e,U.arrow)){for(this.tokens.removeInitialToken();this.tokens.currentIndex()<e;)this.tokens.removeToken();return this.tokens.replaceTokenTrimmingLeftWhitespace(`) =>`),!0}}return!1}processPossibleAsyncArrowWithTypeParams(){if(!this.tokens.matchesContextual(H._async)&&!this.tokens.matches1(U._async))return!1;let e=this.tokens.tokenAtRelativeIndex(1);if(e.type!==U.lessThan||!e.isType)return!1;let t=this.tokens.currentIndex()+1;for(;this.tokens.tokens[t].isType;)t++;if(this.tokens.matches1AtIndex(t,U.parenL)){for(this.tokens.replaceToken(`async (`),this.tokens.removeInitialToken();this.tokens.currentIndex()<t;)this.tokens.removeToken();return this.tokens.removeToken(),this.processBalancedCode(),this.processToken(),!0}return!1}processPossibleTypeRange(){if(this.tokens.currentToken().isType){for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return!0}return!1}shiftMappings(e,t){for(let n=0;n<e.length;n++){let r=e[n];r!==void 0&&(e[n]=r+t)}return e}};o((e=>{e.__esModule=!0,e.LinesAndColumns=void 0;var t=`\n`,n=`\\r`;e.LinesAndColumns=function(){function e(e){this.string=e;for(var r=[0],i=0;i<e.length;)switch(e[i]){case t:i+=t.length,r.push(i);break;case n:i+=n.length,e[i]===t&&(i+=t.length),r.push(i);break;default:i++;break}this.offsets=r}return e.prototype.locationForIndex=function(e){if(e<0||e>this.string.length)return null;for(var t=0,n=this.offsets;n[t+1]<=e;)t++;var r=e-n[t];return{line:t,column:r}},e.prototype.indexForLocation=function(e){var t=e.line,n=e.column;return t<0||t>=this.offsets.length||n<0||n>this.lengthOfLine(t)?null:this.offsets[t]+n},e.prototype.lengthOfLine=function(e){var t=this.offsets[e];return(e===this.offsets.length-1?this.string.length:this.offsets[e+1])-t},e}()}))();function uk(e){let t=new Set;for(let n=0;n<e.tokens.length;n++)e.matches1AtIndex(n,U._import)&&!e.matches3AtIndex(n,U._import,U.name,U.eq)&&dk(e,n,t);return t}function dk(e,t,n){t++,!e.matches1AtIndex(t,U.parenL)&&(e.matches1AtIndex(t,U.name)&&(n.add(e.identifierNameAtIndex(t)),t++,e.matches1AtIndex(t,U.comma)&&t++),e.matches1AtIndex(t,U.star)&&(t+=2,n.add(e.identifierNameAtIndex(t)),t++),e.matches1AtIndex(t,U.braceL)&&(t++,fk(e,t,n)))}function fk(e,t,n){for(;;){if(e.matches1AtIndex(t,U.braceR))return;let r=jx(e,t);if(t=r.endIndex,r.isType||n.add(r.rightName),e.matches2AtIndex(t,U.comma,U.braceR)||e.matches1AtIndex(t,U.braceR))return;if(e.matches1AtIndex(t,U.comma))t++;else throw Error(`Unexpected token: ${JSON.stringify(e.tokens[t])}`)}}function pk(e,t){VS(t);try{let n=mk(e,t),r=new lk(n,t.transforms,!!t.enableLegacyBabel5ModuleInterop,t).transform(),i={code:r.code};if(t.sourceMapOptions){if(!t.filePath)throw Error(`filePath must be specified when generating a source map.`);i={...i,sourceMap:ES(r,t.filePath,t.sourceMapOptions,e,n.tokenProcessor.tokens)}}return i}catch(e){throw t.filePath&&(e.message=`Error transforming ${t.filePath}: ${e.message}`),e}}function mk(e,t){let n=t.transforms.includes(`jsx`),r=t.transforms.includes(`typescript`),i=t.transforms.includes(`flow`),a=t.disableESTransforms===!0,o=NO(e,n,r,i),s=o.tokens,c=o.scopes,l=new FS(e,s),u=new kS(l),d=new FO(e,s,i,a,u),f=!!t.enableLegacyTypeScriptModuleInterop,p=null;return t.transforms.includes(`imports`)?(p=new Kx(l,d,f,t,t.transforms.includes(`typescript`),!!t.keepUnusedImports,u),p.preprocessTokens(),AS(d,c,p.getGlobalNames()),t.transforms.includes(`typescript`)&&!t.keepUnusedImports&&p.pruneTypeOnlyImports()):t.transforms.includes(`typescript`)&&!t.keepUnusedImports&&AS(d,c,uk(d)),{tokenProcessor:d,scopes:c,nameManager:l,importProcessor:p,helperManager:u}}var hk={react:d,"react/jsx-runtime":V};function gk(e){if(e in hk)return hk[e];throw Error(`\'${e}\' cannot be imported here. Only \'react\' can.`)}function _k(e){let{code:t}=pk(e,{transforms:[`typescript`,`jsx`,`imports`],jsxRuntime:`automatic`,production:!0}),n={require:gk,module:{exports:{}},ran:!1};window.__componentCode=n;let r=document.createElement(`script`);if(r.textContent=`(function (require, module, exports) {\ntry {\n${t}\n} catch (error) { __componentCode.error = error; }\n__componentCode.ran = true;\n})(__componentCode.require, __componentCode.module, __componentCode.module.exports);`,document.head.append(r),r.remove(),delete window.__componentCode,n.error)throw n.error;if(!n.ran)throw Error(`The host did not let the component run.`);let{default:i,...a}=n.module.exports;return typeof i==`function`&&i.name&&i.name!=="default"?{[i.name]:i,...a}:a}function vk({error:e}){throw e}function yk({source:e,code:t,file:n=`Code`,controls:r,note:i,onChange:a}){let o=(0,d.useMemo)(()=>{try{return{scope:_k(e)}}catch(e){return{error:e}}},[e]);return o.scope?(0,V.jsx)(ky,{interactive:!0,scope:o.scope,code:t,file:n,controls:r,note:i,onChange:({prop:e,value:t,code:r})=>a({prop:e,value:t,file:n,files:{[n]:r}})}):(0,V.jsx)(ky,{code:t,file:n,children:(0,V.jsx)(vk,{error:o.error})})}var bk=new Cv({name:`Component Code`,version:ib}),xk=(0,rb.createRoot)(document.getElementById(`root`)),Sk=matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`,Ck,wk={},Tk=!1,Ek,Dk=e=>{bk.getHostCapabilities()?.updateModelContext&&(clearTimeout(Ek),Ek=setTimeout(()=>{let t=document.querySelector(`.cc-problem`)?.textContent||void 0;Tk=!0,bk.updateModelContext({content:[{type:`text`,text:lb({...e,problem:t})}]}).catch(()=>{})},400))},Ok=()=>bk.getHostCapabilities()?.updateModelContext?`The chat sees this state`:void 0,kk=()=>{clearTimeout(Ek),Tk&&(Tk=!1,bk.updateModelContext({content:[]}).catch(()=>{}))},Ak=()=>{if(document.documentElement.style.colorScheme=Sk,Ck===void 0)return;let e=ob.safeParse(Ck),t=ab.safeParse(Ck);xk.render(e.success?(0,V.jsx)(Zy,{...e.data,theme:Sk,note:Ok(),onChange:({file:e,prop:t,value:n,code:r})=>{wk={...wk,[e]:r},Dk({prop:t,value:n,file:e,files:wk})}}):t.success?(0,V.jsx)(yk,{...t.data,note:Ok(),onChange:Dk}):(0,V.jsx)(`p`,{children:t.error.message}))};bk.addEventListener(`toolinput`,e=>{Ck=e.arguments;let t=ob.safeParse(Ck);wk=t.success?{...t.data.files}:{},kk(),Ak()}),bk.addEventListener(`hostcontextchanged`,e=>{e.theme&&(Sk=e.theme),Ak()}),await bk.connect(),Sk=bk.getHostContext()?.theme??Sk,Ak();var jk={host:bk.getHostVersion(),capabilities:bk.getHostCapabilities()};console.info(`Component Code host`,jk),jk.capabilities?.logging&&bk.sendLog({level:`info`,logger:`Component Code`,data:jk}).catch(()=>{});</script>\n </head>\n <body>\n <div id="root"></div>\n </body>\n</html>\n';var mk=Te.object({source:Te.string().describe("The component's module in TSX. It may import only from 'react'. Its exports, the default one by its function's name, are what `code` can name. For each value the reader can change by using the component, such as `checked`, `open` or `value`, take a matching `onCheckedChange`, `onOpenChange` or `onValueChange` prop and call it with the new value, and give that value `{ change: true }` in `controls`. Component Code passes it then, so the change shows in the code. Keep state of its own only for when the prop is missing."),code:Te.string().describe("How the component is used, in JSX: elements, props and text only, with no hooks, calls or conditions. It is shown as code and rendered as the preview. Each string, number and boolean in it becomes a control."),file:Te.string().optional().describe("The file named in the code's tab, such as `Card.tsx`."),controls:Te.record(Te.string(),Te.union([Te.literal(!1),Te.array(Te.union([Te.string(),Te.number()])),Te.object({min:Te.number().optional(),max:Te.number().optional(),step:Te.number().optional(),options:Te.array(Te.union([Te.string(),Te.number()])).optional(),change:Te.boolean().optional()})])).optional().describe("How a prop is changed, by its name or by `Element.prop`: a list of options, `{ min, max, step }` for a number, or `false` to keep it as written. `{ change: true }` lets the component change it too, through its `on<Prop>Change`, and takes a list as `options`.")}),fk=Te.object({files:Te.record(Te.string(),Te.string()).describe("The files by name, such as `index.html`, `style.css` and `script.js`, each in its own tab. They run together as one page in a sandboxed frame: the HTML is the page's body, with the CSS in a style element and the JS in a script element after it. The page cannot load anything from the network, so draw with canvas, SVG or the DOM."),controls:Te.record(Te.string(),Te.union([Te.literal(!0),Te.array(Te.union([Te.string(),Te.number()])),Te.object({min:Te.number().optional(),max:Te.number().optional(),step:Te.number().optional()})])).optional().describe("The values the reader can change, by name: an attribute, as `r` or `circle.r`, a CSS property or custom property, as `--speed`, or a JS `const` set to a number, string or boolean. Each takes `true`, a list of options, or `{ min, max, step }` for a number. CSS changes apply as the reader drags, while HTML and JS run the page again, so a script that reads custom properties each frame follows along.")});var b1="ui://fabio.cv/component-code",hk=e=>{fi(e,"component_code_show",{title:"Show in Component Code",description:"Shows a React component in the chat in Component Code: a live preview beside the code that uses it. Each string, number and boolean in the code becomes a control the reader can change. Use it when someone asks to show a component in Component Code, or to see, preview or try one.",inputSchema:mk,annotations:{readOnlyHint:!0,openWorldHint:!1},_meta:{ui:{resourceUri:b1}}},({file:t,code:r})=>({content:[{type:"text",text:`Showing ${t??"the component"} in Component Code:
81
+ `)}writeFrame(e){if(!(this._sse===void 0||this._sse.closed))try{this._sse.controller.enqueue(this._sse.encoder.encode(e))}catch(t){this.onerror?.(new Error(`Failed to write to the response stream: ${t}`))}}};function uC(e){return e instanceof Q0?W0(e):void 0}function dC(e){return typeof e=="object"&&e!==null&&"setScopeChallengeResolver"in e&&typeof e.setScopeChallengeResolver=="function"}var pC=8,mC=6e5;function fC(e){if(e?.maxRounds!==void 0&&(!Number.isInteger(e.maxRounds)||e.maxRounds<1))throw new RangeError(`inputRequired.maxRounds must be a positive integer (got ${e.maxRounds})`);if(e?.roundTimeoutMs!==void 0&&(!Number.isFinite(e.roundTimeoutMs)||e.roundTimeoutMs<=0))throw new RangeError(`inputRequired.roundTimeoutMs must be a positive number (got ${e.roundTimeoutMs})`);return{maxRounds:e?.maxRounds??pC,roundTimeoutMs:e?.roundTimeoutMs??mC,legacyShim:e?.legacyShim??!0}}function X0(e,t,r){if(r===null||typeof r!="object"||typeof r.method!="string")throw new de(ee.InternalError,`Handler for ${e} returned an invalid input request '${t}': each inputRequests entry must be an embedded elicitation/create, sampling/createMessage, or roots/list request`);let i=r,n=FS(i);if(n===void 0)throw new de(ee.InternalError,`Handler for ${e} returned an input request '${t}' of kind '${i.method}', which is not an embedded request the 2026-07-28 revision defines`);return{embedded:i,required:n}}function hC(){let e=globalThis.crypto;if(e?.randomUUID!==void 0)return e.randomUUID();let t=new Uint8Array(16);e.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128;let r=[...t].map(i=>i.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`}function m1(e,t){if(e==="tools/call")return{content:[{type:"text",text:t}],isError:!0};throw new de(ee.InternalError,t)}var gC=class{constructor(e){this._host=e}async fulfill(e,t,r,i,n){let{maxRounds:o,roundTimeoutMs:a}=this._host,s=i.mcpReq.signal,c=n,l=0;for(;;){if(l+=1,l>o)return m1(e,d0(e,o));let u=c.inputRequests,d=u!=null&&Object.keys(u).length>0,f=typeof c.requestState=="string"?c.requestState:void 0;if(!d&&f===void 0)throw new de(ee.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);let h;if(d){let S=this._host.resolvedClientCapabilities(i),y=[];for(let[k,I]of Object.entries(u)){let{embedded:O,required:T}=X0(e,k,I);if(O.method!=="roots/list"&&O.params===void 0)throw new de(ee.InternalError,`Handler for ${e} returned an input request '${k}' of kind '${O.method}' without params`);if(fd(T,S)!==void 0)return m1(e,`Cannot request input '${k}' (${O.method}): the client on this 2025-era connection did not declare the required capability${S===void 0?" (no client capabilities are available on this connection \u2014 per-request legacy serving cannot receive server-to-client requests)":""}`);y.push([k,O])}let x=m0(s);try{let k={relatedRequestId:i.mcpReq.id,timeout:a,resetTimeoutOnProgress:!0,onprogress:()=>{},signal:x.signal},I=await Promise.all(y.map(async([O,T])=>{try{return[O,await this._dispatchLeg(T,k)]}catch(_){throw x.abort(_),_}}));h=Object.fromEntries(I)}catch(k){if(s.aborted)throw k;return m1(e,`Fulfilling input required by '${e}' failed: ${k instanceof Error?k.message:String(k)}`)}finally{x.dispose()}}else await p0(u0,s);let g={...i,mcpReq:{...i.mcpReq,inputResponses:h,droppedInputResponseKeys:void 0,requestState:Ga(f)}};if(f!==void 0){let S=await this._host.verifyRequestState(f,g,e);S!==void 0&&(g=Yv(g,S))}let b=await t(r,g);if(!cn(b))return b;c=b}}async _dispatchLeg(e,t){switch(e.method){case"elicitation/create":{let r=e.params;return r.mode==="url"&&r.elicitationId===void 0&&(r={...r,elicitationId:hC()}),await this._host.sendElicitation(r,t)}case"sampling/createMessage":return await this._host.sendSampling(e.params,t);case"roots/list":return await this._host.listRoots(e.params,t)}}},vC=new Set(["tools/call","prompts/get","resources/read"]),yC,Y0,ek;function v1(e,t){Y0(e,t)}function y1(e){return ek(e)}var tk=class extends t1{_clientCapabilities;_clientVersion;static{yC=(e,t)=>{t.clientCapabilities!==void 0&&(e._clientCapabilities=t.clientCapabilities),t.clientInfo!==void 0&&(e._clientVersion=t.clientInfo)},Y0=(e,t)=>{let r=t.filter(i=>!e._supportedProtocolVersions.includes(i));r.length>0&&(e._supportedProtocolVersions=[...e._supportedProtocolVersions,...r]),e.setRequestHandler("server/discover",()=>e._ondiscover())},ek=e=>e._serverInfo}_capabilities;_instructions;_jsonSchemaValidator;_cacheHints;_requestStateVerify;_inputRequiredServing;_legacyShim;_boundFromTransport=!1;_legacyInputRequiredShim(){return this._legacyShim??=new gC({maxRounds:this._inputRequiredServing.maxRounds,roundTimeoutMs:this._inputRequiredServing.roundTimeoutMs,resolvedClientCapabilities:e=>this._inputRequestCapabilityView(e),verifyRequestState:(e,t,r)=>this._verifyRequestState(e,t,r),sendElicitation:(e,t)=>this._sendElicitationLeg(e,t,{validateAcceptedContent:!1}),sendSampling:(e,t)=>this.createMessage(e,t),listRoots:(e,t)=>this.listRoots(e,t)})}oninitialized;constructor(e,t){if(super(t),this._serverInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._instructions=t?.instructions,this._jsonSchemaValidator=t?.jsonSchemaValidator??new Cd,this._requestStateVerify=t?.requestState?.verify,this._inputRequiredServing=fC(t?.inputRequired),t?.cacheHints!==void 0){for(let[r,i]of Object.entries(t.cacheHints))i!==void 0&&Zv(i,`cacheHints['${r}']`);this._cacheHints=t.cacheHints}this.setRequestHandler("initialize",r=>this._oninitialize(r)),this.setNotificationHandler("notifications/initialized",()=>this.oninitialized?.()),hd(this._supportedProtocolVersions).length>0&&this.setRequestHandler("server/discover",()=>this._ondiscover()),this._capabilities.logging&&this._registerLoggingHandler()}async connect(e){if(this.transport!==void 0)throw new ve(ke.AlreadyConnected,"Use a separate Server instance per connection: this instance is already connected to a transport. To connect it to a new transport, call close() first.");this._boundFromTransport&&(this._boundFromTransport=!1,this._negotiatedProtocolVersion=void 0);let t=uC(e)?.revision;t!==void 0&&!this._servedModernEra()&&Gt.includes(t)&&hd(this._supportedProtocolVersions).includes(t)&&(this._negotiatedProtocolVersion=t,this._boundFromTransport=!0),await super.connect(e)}_registerLoggingHandler(){this.setRequestHandler("logging/setLevel",async(e,t)=>{let r=t.sessionId||t.http?.req?.headers.get("mcp-session-id")||void 0,{level:i}=e.params,n=kd(An,i);return n.success&&this._loggingLevels.set(r,n.data),{}})}buildContext(e,t){let r=e.http||t?.request||t?.closeSSEStream||t?.closeStandaloneSSEStream;return{...e,mcpReq:{...e.mcpReq,log:(i,n,o)=>{if(!this._capabilities.logging)return Promise.resolve();let a;if(this._servedModernEra()){if(a=e.mcpReq.envelope?.[Cn],a===void 0)return Promise.resolve()}else a=this._loggingLevels.get(e.sessionId)??this._loggingLevels.get(void 0);return a!==void 0&&this.LOG_LEVEL_SEVERITY.get(i)<this.LOG_LEVEL_SEVERITY.get(a)?Promise.resolve():e.mcpReq.notify({method:"notifications/message",params:{level:i,data:n,logger:o}})},elicitInput:(i,n)=>this.elicitInput(i,n),requestSampling:(i,n)=>this.createMessage(i,n)},http:r?{...e.http,req:t?.request,closeSSE:t?.closeSSEStream,closeStandaloneSSE:t?.closeStandaloneSSEStream}:void 0}}_loggingLevels=new Map;LOG_LEVEL_SEVERITY=new Map(An.options.map((e,t)=>[e,t]));isMessageIgnored=(e,t)=>{let r=this._loggingLevels.get(t);return r?this.LOG_LEVEL_SEVERITY.get(e)<this.LOG_LEVEL_SEVERITY.get(r):!1};registerCapabilities(e){if(this.transport)throw new ve(ke.AlreadyConnected,"Cannot register capabilities after connecting to transport");let t=!!this._capabilities.logging;this._capabilities=n1(this._capabilities,e),!t&&this._capabilities.logging&&this._registerLoggingHandler()}_wrapHandler(e,t){if(e!=="tools/call"){let r=this._cacheHints?.[e],i=vC.has(e);return r===void 0&&!i?async(n,o)=>{let a=await t(n,o);if(cn(a))throw new de(ee.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return a}:async(n,o)=>{let a=i?await this._invokeInputRequiredCapableHandler(e,t,n,o):await t(n,o);if(cn(a)){if(!i)throw new de(ee.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return a}return r===void 0?a:gd(a,r)}}return async(r,i)=>{let n=sn(this._negotiatedProtocolVersion),o=n.validateRequest("tools/call",r);if(!o.ok)throw new de(o.reason==="not-in-era"?ee.InternalError:ee.InvalidParams,o.reason==="not-in-era"?"No wire schema for tools/call in the resolved era":`Invalid tools/call request: ${o.message}`);let a=await this._invokeInputRequiredCapableHandler("tools/call",t,r,i);if(cn(a))return a;let s=qv(a),c=n.validateResult("tools/call",s);if(!c.ok)throw new de(c.reason==="not-in-era"?ee.InternalError:ee.InvalidParams,c.reason==="not-in-era"?"No wire schema for tools/call in the resolved era":`Invalid tools/call result: ${c.message}`);return c.value}}_servedModernEra(){return this._negotiatedProtocolVersion!==void 0&&Ao(this._negotiatedProtocolVersion)}async _invokeInputRequiredCapableHandler(e,t,r,i){let n=this._servedModernEra(),o=i.mcpReq.requestState();if(o!==void 0&&typeof o!="string")throw new de(ee.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"});let a=i;if(typeof o=="string"){let d=await this._verifyRequestState(o,i,e);d!==void 0&&(a=Yv(i,d))}let s;try{s=await t(r,a)}catch(d){throw d instanceof de&&d.code===ee.UrlElicitationRequired&&n?new de(ee.InternalError,`URL elicitation cannot be signalled by throwing UrlElicitationRequiredError on protocol revision ${this._negotiatedProtocolVersion}: return inputRequired({ inputRequests: { \u2026: inputRequired.elicitUrl(...) } }) from the handler instead. The urlElicitationRequired error (-32042) of earlier revisions is not available on this revision.`):d}if(!cn(s))return s;if(!n){if(!this._inputRequiredServing.legacyShim)throw new de(ee.InternalError,`Handler for ${e} returned an input-required result, but this request is served on protocol revision ${this._negotiatedProtocolVersion??fr}, which has no input_required vocabulary`);return await this._legacyInputRequiredShim().fulfill(e,t,r,a,s)}let c=s.inputRequests,l=c!=null&&Object.keys(c).length>0,u=typeof s.requestState=="string";if(!l&&!u)throw new de(ee.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);if(l){let d=this._inputRequestCapabilityView(i);for(let[f,h]of Object.entries(c)){let{embedded:g,required:b}=X0(e,f,h),S=fd(b,d);if(S!==void 0)throw new yd({requiredCapabilities:S},`Cannot request input '${f}' (${g.method}): the request's client capabilities do not declare the required capability`)}}return s}async _verifyRequestState(e,t,r){if(this._requestStateVerify!==void 0)try{return await this._requestStateVerify(e,t)}catch(i){throw this.onerror?.(new Error(`requestState verification rejected ${r}: ${i instanceof Error?i.message:String(i)}`)),new de(ee.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"})}}_inputRequestCapabilityView(e){return this._servedModernEra()?e.mcpReq.envelope?.[on]:this._clientCapabilities}_assertPushApiInServedEra(e){if(this._servedModernEra())throw new ve(ke.MethodNotSupportedByProtocolVersion,`Server-to-client requests are not available on protocol revision ${this._negotiatedProtocolVersion}: '${e}' cannot be sent while serving a request on that revision. Return inputRequired({ ... }) from the handler instead \u2014 the client fulfils the embedded requests and retries the original request (multi round-trip requests).`,{method:e,era:"2026-07-28"})}assertCapabilityForMethod(e){switch(e){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new ve(ke.CapabilityNotSupported,`Client does not support sampling (required for ${e})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new ve(ke.CapabilityNotSupported,`Client does not support elicitation (required for ${e})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new ve(ke.CapabilityNotSupported,`Client does not support listing roots (required for ${e})`);break;case"ping":break}}assertNotificationCapability(e){switch(e){case"notifications/message":if(!this._capabilities.logging)throw new ve(ke.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new ve(ke.CapabilityNotSupported,`Server does not support notifying about resources (required for ${e})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new ve(ke.CapabilityNotSupported,`Server does not support notifying of tool list changes (required for ${e})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new ve(ke.CapabilityNotSupported,`Server does not support notifying of prompt list changes (required for ${e})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new ve(ke.CapabilityNotSupported,`Client does not support URL elicitation (required for ${e})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(e){switch(e){case"completion/complete":if(!this._capabilities.completions)throw new ve(ke.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new ve(ke.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new ve(ke.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new ve(ke.CapabilityNotSupported,`Server does not support resources (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new ve(ke.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;case"ping":case"initialize":break}}async _oninitialize(e){let t=e.params.protocolVersion;this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo;let r=ZS(this._supportedProtocolVersions),i=r.includes(t)?t:r[0]??fr;return this._negotiatedProtocolVersion=i,this.transport?.setProtocolVersion?.(i),{protocolVersion:i,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}_ondiscover(){return{supportedVersions:hd(this._supportedProtocolVersions),capabilities:bC(this.getCapabilities()),...this._instructions&&{instructions:this._instructions}}}_outboundServerInfo(){return this._serverInfo}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}projectCallToolResult(e,t){return this._wireCodec().projectCallToolResult(e,t)}getCapabilities(){return this._capabilities}async ping(){return this._assertPushApiInServedEra("ping"),this.request({method:"ping"})}async createMessage(e,t){if(this._assertPushApiInServedEra("sampling/createMessage"),(e.tools||e.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new ve(ke.CapabilityNotSupported,"Client does not support sampling tools capability.");if(e.messages.length>0){let o=e.messages.at(-1),a=Array.isArray(o.content)?o.content:[o.content],s=a.some(d=>d.type==="tool_result"),c=e.messages.length>1?e.messages.at(-2):void 0,l=c?Array.isArray(c.content)?c.content:[c.content]:[],u=l.some(d=>d.type==="tool_use");if(s){if(a.some(d=>d.type!=="tool_result"))throw new de(ee.InvalidParams,"The last message must contain only tool_result content if any is present");if(!u)throw new de(ee.InvalidParams,"tool_result blocks are not matching any tool_use from the previous message")}if(u){let d=new Set(l.filter(h=>h.type==="tool_use").map(h=>h.id)),f=new Set(a.filter(h=>h.type==="tool_result").map(h=>h.toolUseId));if(d.size!==f.size||![...d].every(h=>f.has(h)))throw new de(ee.InvalidParams,"ids of tool_result blocks and tool_use blocks from previous message do not match")}}let r=!!(e.tools||e.toolChoice),i=await this.request({method:"sampling/createMessage",params:e},t),n=this._wireCodec().samplingResultVariant(r,i);if(!n.ok)throw new ve(ke.InvalidResult,`Invalid sampling/createMessage result: ${n.reason==="invalid"?n.message:n.reason}`);return n.value}async elicitInput(e,t){switch(this._assertPushApiInServedEra("elicitation/create"),e.mode??"form"){case"url":if(!this._clientCapabilities?.elicitation?.url)throw new ve(ke.CapabilityNotSupported,"Client does not support url elicitation.");break;case"form":if(!this._clientCapabilities?.elicitation?.form)throw new ve(ke.CapabilityNotSupported,"Client does not support form elicitation.");break}return this._sendElicitationLeg(e,t)}async _sendElicitationLeg(e,t,r){let i=e.mode??"form",n=r?.validateAcceptedContent??!0;switch(i){case"url":{let o=e;return this.request({method:"elicitation/create",params:o},t)}case"form":{let o=e.mode==="form"?e:{...e,mode:"form"},a=await this.request({method:"elicitation/create",params:o},t);if(n&&a.action==="accept"&&a.content&&o.requestedSchema)try{let s=this._jsonSchemaValidator.getValidator(o.requestedSchema)(a.content);if(!s.valid)throw new de(ee.InvalidParams,`Elicitation response content does not match requested schema: ${s.errorMessage}`)}catch(s){throw s instanceof de?s:new de(ee.InternalError,`Error validating elicitation response: ${s instanceof Error?s.message:String(s)}`)}return a}}}createElicitationCompletionNotifier(e,t){if(!this._clientCapabilities?.elicitation?.url)throw new ve(ke.CapabilityNotSupported,"Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:e}},t)}async listRoots(e,t){return this._assertPushApiInServedEra("roots/list"),this.request({method:"roots/list",params:e},t)}async sendLoggingMessage(e,t){if(this._capabilities.logging&&!this.isMessageIgnored(e.level,t))return this.notification({method:"notifications/message",params:e})}async sendResourceUpdated(e){return this.notification({method:"notifications/resources/updated",params:e})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}};function bC(e){return{...e}}function _C(e,t){let r=0,i=[e];for(;i.length>0;){let n=i.pop();if(!(n===null||typeof n!="object"))if(Array.isArray(n))for(let o of n){if(++r>t)return r;o!==null&&typeof o=="object"&&i.push(o)}else for(let o in n){if(!Object.prototype.hasOwnProperty.call(n,o))continue;if(++r>t)return r;let a=n[o];a!==null&&typeof a=="object"&&i.push(a)}}return r}function SC(e){if(!(e===void 0||e===1/0)){if(typeof e!="number"||Number.isNaN(e)||e<1)throw new RangeError(`maxToolInputElements must be a number of at least 1, or Infinity, got ${String(e)}`);return e}}var Ka=class{server;_maxToolInputElements;_registeredResources={};_registeredResourceTemplates={};_registeredTools={};_registeredPrompts={};_toolInputSchemaJson={};toolInputSchemaJson(e){let t=this._registeredTools[e];if(!(t===void 0||!t.enabled)){if(Object.hasOwn(this._toolInputSchemaJson,e))return this._toolInputSchemaJson[e];if(t.inputSchema===void 0)return V0;try{let r=kr(t.inputSchema,"input");return this._toolInputSchemaJson[e]=r,r}catch{return}}}constructor(e,t){this.server=new tk(e,t),this._maxToolInputElements=SC(t?.maxToolInputElements),t?.capabilities?.tools&&this.setToolRequestHandlers(),t?.capabilities?.resources&&this.setResourceRequestHandlers(),t?.capabilities?.prompts&&this.setPromptRequestHandlers()}async connect(e){return dC(e)&&e.setScopeChallengeResolver(t=>this.resolveScopeChallenge(t)),await this.server.connect(e)}async close(){await this.server.close()}resolveScopeChallenge=e=>{switch(e.request.method){case"tools/call":{let t=e.request.params?.name;if(typeof t!="string")return;let r=this._registeredTools[t];return r===void 0||!r.enabled?void 0:r.scopeChallenge?.(e)}case"resources/read":{let t=e.request.params?.uri;if(typeof t!="string")return;let r;try{r=new URL(t)}catch{return}let i=this._registeredResources[r.toString()];if(i!==void 0)return i.enabled?i.scopeChallenge?.(e):void 0;for(let n of Object.values(this._registeredResourceTemplates))if(n.resourceTemplate.uriTemplate.match(r.toString()))return n.enabled?n.scopeChallenge?.(e):void 0;return}case"prompts/get":{let t=e.request.params?.name;if(typeof t!="string")return;let r=this._registeredPrompts[t];return r===void 0||!r.enabled?void 0:r.scopeChallenge?.(e)}default:return}};_toolHandlersInitialized=!1;setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler("tools/list"),this.server.assertCanSetRequestHandler("tools/call"),this.server.registerCapabilities({tools:{listChanged:this.server.getCapabilities().tools?.listChanged??!0}}),this.server.setRequestHandler("tools/list",()=>({tools:Object.entries(this._registeredTools).filter(([,e])=>e.enabled).map(([e,t])=>{let r={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?kC(e,t.inputSchema):V0,annotations:t.annotations,icons:t.icons,execution:t.execution,_meta:t._meta};return t.outputSchema&&(r.outputSchema=kr(t.outputSchema,"output")),r})})),this.server.setRequestHandler("tools/call",async(e,t)=>{let r=this._registeredTools[e.params.name];if(!r)throw new de(ee.InvalidParams,`Tool ${e.params.name} not found`);if(!r.enabled)throw new de(ee.InvalidParams,`Tool ${e.params.name} disabled`);try{let i=await this.validateToolInput(r,e.params.arguments,e.params.name),n=await this.executeToolHandler(r,i,t);return await this.validateToolOutput(r,n,e.params.name),cn(n)?n:this.server.projectCallToolResult(n,r.outputSchemaJson)}catch(i){if(i instanceof de&&i.code===ee.UrlElicitationRequired)throw i;return this.createToolError(i instanceof Error?i.message:String(i))}}),this._toolHandlersInitialized=!0)}createToolError(e){return{content:[{type:"text",text:e}],isError:!0}}async validateToolInput(e,t,r){if(this._maxToolInputElements!==void 0&&_C(t,this._maxToolInputElements)>this._maxToolInputElements)throw new de(ee.InvalidParams,`Invalid arguments for tool ${r}: arguments contain more than the maximum of ${this._maxToolInputElements} elements`);if(!e.inputSchema)return;let i=await yr(e.inputSchema,t??{});if(!i.success)throw new de(ee.InvalidParams,`Input validation error: Invalid arguments for tool ${r}: ${i.error}`);return i.data}async validateToolOutput(e,t,r){if(!e.outputSchema||cn(t)||t.isError)return;if(t.structuredContent===void 0)throw new de(ee.InvalidParams,`Output validation error: Tool ${r} has an output schema but no structured content was provided`);let i=await yr(e.outputSchema,t.structuredContent);if(!i.success)throw new de(ee.InvalidParams,`Output validation error: Invalid structured content for tool ${r}: ${i.error}`)}async executeToolHandler(e,t,r){return e.executor(t,r)}_completionHandlerInitialized=!1;setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler("completion/complete"),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler("completion/complete",async e=>{switch(e.params.ref.type){case"ref/prompt":return Jv(e),this.handlePromptCompletion(e,e.params.ref);case"ref/resource":return Bv(e),this.handleResourceCompletion(e,e.params.ref);default:throw new de(ee.InvalidParams,`Invalid completion reference: ${e.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(e,t){let r=this._registeredPrompts[t.name];if(!r)throw new de(ee.InvalidParams,`Prompt ${t.name} not found`);if(!r.enabled)throw new de(ee.InvalidParams,`Prompt ${t.name} disabled`);if(!r.argsSchema)return Ba;let i=B0(J0(r.argsSchema)?.[e.params.argument.name]);if(!f1(i))return Ba;let n=cC(i);return n?G0(await n(e.params.argument.value,e.params.context)):Ba}async handleResourceCompletion(e,t){let r=Object.values(this._registeredResourceTemplates).find(n=>n.resourceTemplate.uriTemplate.toString()===t.uri);if(!r){if(this._registeredResources[t.uri])return Ba;throw new de(ee.InvalidParams,`Resource template ${e.params.ref.uri} not found`)}let i=r.resourceTemplate.completeCallback(e.params.argument.name);return i?G0(await i(e.params.argument.value,e.params.context)):Ba}_resourceHandlersInitialized=!1;setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler("resources/list"),this.server.assertCanSetRequestHandler("resources/templates/list"),this.server.assertCanSetRequestHandler("resources/read"),this.server.registerCapabilities({resources:{listChanged:this.server.getCapabilities().resources?.listChanged??!0}}),this.server.setRequestHandler("resources/list",async(e,t)=>{let r=Object.entries(this._registeredResources).filter(([n,o])=>o.enabled).map(([n,o])=>({uri:n,name:o.name,...o.metadata})),i=[];for(let n of Object.values(this._registeredResourceTemplates)){if(!n.resourceTemplate.listCallback)continue;let o=await n.resourceTemplate.listCallback(t);for(let a of o.resources)i.push({...n.metadata,...a})}return{resources:[...r,...i]}}),this.server.setRequestHandler("resources/templates/list",async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([e,t])=>({name:e,uriTemplate:t.resourceTemplate.uriTemplate.toString(),...t.metadata}))})),this.server.setRequestHandler("resources/read",async(e,t)=>{let r;try{r=new URL(e.params.uri)}catch{throw new de(ee.InvalidParams,`Resource URI ${e.params.uri} is invalid`,{uri:e.params.uri,reason:"invalid_uri"})}let i=this._registeredResources[r.toString()];if(i){if(!i.enabled)throw new de(ee.InvalidParams,`Resource ${r} disabled`);return gd(await i.readCallback(r,t),i.cacheHint)}for(let n of Object.values(this._registeredResourceTemplates)){let o=n.resourceTemplate.uriTemplate.match(r.toString());if(o){if(!n.enabled)throw new de(ee.InvalidParams,`Resource template ${n.resourceTemplate.uriTemplate} disabled`);return gd(await n.readCallback(r,o,t),n.cacheHint)}}throw new vd(e.params.uri)}),this._resourceHandlersInitialized=!0)}_promptHandlersInitialized=!1;setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler("prompts/list"),this.server.assertCanSetRequestHandler("prompts/get"),this.server.registerCapabilities({prompts:{listChanged:this.server.getCapabilities().prompts?.listChanged??!0}}),this.server.setRequestHandler("prompts/list",()=>({prompts:Object.entries(this._registeredPrompts).filter(([,e])=>e.enabled).map(([e,t])=>({name:e,title:t.title,description:t.description,arguments:t.argsSchema?l0(t.argsSchema):void 0,icons:t.icons,_meta:t._meta}))})),this.server.setRequestHandler("prompts/get",async(e,t)=>{let r=this._registeredPrompts[e.params.name];if(!r)throw new de(ee.InvalidParams,`Prompt ${e.params.name} not found`);if(!r.enabled)throw new de(ee.InvalidParams,`Prompt ${e.params.name} disabled`);return r.handler(e.params.arguments,t)}),this._promptHandlersInitialized=!0)}registerResource(e,t,r,i){let{cacheHint:n,scopeChallenge:o,...a}=r,s=a;if(n!==void 0&&Zv(n,`resource ${e}`),typeof t=="string"){if(this._registeredResources[t])throw new Error(`Resource ${t} is already registered`);let c=this._createRegisteredResource(e,r.title,t,s,o,i);return n!==void 0&&(c.cacheHint=n),this.setResourceRequestHandlers(),this.sendResourceListChanged(),c}else{if(this._registeredResourceTemplates[e])throw new Error(`Resource template ${e} is already registered`);let c=this._createRegisteredResourceTemplate(e,r.title,t,s,o,i);return n!==void 0&&(c.cacheHint=n),this.setResourceRequestHandlers(),this.sendResourceListChanged(),c}}_createRegisteredResource(e,t,r,i,n,o){let a={name:e,title:t,metadata:i,readCallback:o,scopeChallenge:n,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({uri:null}),update:s=>{s.uri!==void 0&&s.uri!==r&&(delete this._registeredResources[r],s.uri&&(this._registeredResources[s.uri]=a)),s.name!==void 0&&(a.name=s.name),s.metadata!==void 0&&(a.metadata=s.metadata),s.title!==void 0&&(a.title=s.title,a.metadata={...a.metadata,title:s.title}),s.callback!==void 0&&(a.readCallback=s.callback),s.scopeChallenge!==void 0&&(a.scopeChallenge=s.scopeChallenge===null?void 0:s.scopeChallenge),s.enabled!==void 0&&(a.enabled=s.enabled),this.sendResourceListChanged()}};return this._registeredResources[r]=a,a}_createRegisteredResourceTemplate(e,t,r,i,n,o){let a={resourceTemplate:r,title:t,metadata:i,readCallback:o,scopeChallenge:n,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({name:null}),update:c=>{c.name!==void 0&&c.name!==e&&(delete this._registeredResourceTemplates[e],c.name&&(this._registeredResourceTemplates[c.name]=a)),c.template!==void 0&&(a.resourceTemplate=c.template),c.metadata!==void 0&&(a.metadata=c.metadata),c.title!==void 0&&(a.title=c.title,a.metadata={...a.metadata,title:c.title}),c.callback!==void 0&&(a.readCallback=c.callback),c.scopeChallenge!==void 0&&(a.scopeChallenge=c.scopeChallenge===null?void 0:c.scopeChallenge),c.enabled!==void 0&&(a.enabled=c.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[e]=a;let s=r.uriTemplate.variableNames;return Array.isArray(s)&&s.some(c=>!!r.completeCallback(c))&&this.setCompletionRequestHandler(),a}_createRegisteredPrompt(e,t,r,i,n,o,a,s){let c=i,l=n,u={title:t,description:r,argsSchema:i,icons:o,scopeChallenge:a,_meta:s,handler:H0(e,i,n),enabled:!0,disable:()=>u.update({enabled:!1}),enable:()=>u.update({enabled:!0}),remove:()=>u.update({name:null}),update:d=>{d.name!==void 0&&d.name!==e&&(delete this._registeredPrompts[e],d.name&&(this._registeredPrompts[d.name]=u)),d.title!==void 0&&(u.title=d.title),d.description!==void 0&&(u.description=d.description),d.icons!==void 0&&(u.icons=d.icons),d.scopeChallenge!==void 0&&(u.scopeChallenge=d.scopeChallenge===null?void 0:d.scopeChallenge),d._meta!==void 0&&(u._meta=d._meta);let f=!1;d.argsSchema!==void 0&&(u.argsSchema=d.argsSchema,c=d.argsSchema,f=!0),d.callback!==void 0&&(l=d.callback,f=!0),f&&(u.handler=H0(e,c,l)),d.enabled!==void 0&&(u.enabled=d.enabled),this.sendPromptListChanged()}};if(this._registeredPrompts[e]=u,i){let d=J0(i);d&&Object.values(d).some(f=>f1(B0(f)))&&this.setCompletionRequestHandler()}return u}_createRegisteredTool(e,t,r,i,n,o,a,s,c,l,u){i1(e);let d=u,f,h={title:t,description:r,inputSchema:i,outputSchema:n,get outputSchemaJson(){return f??=Z0(h.outputSchema)},set outputSchemaJson(g){f=g},annotations:o,icons:a,execution:s,scopeChallenge:c,_meta:l,handler:u,executor:F0(i,u),enabled:!0,disable:()=>h.update({enabled:!1}),enable:()=>h.update({enabled:!0}),remove:()=>h.update({name:null}),update:g=>{g.name!==void 0&&g.name!==e&&(typeof g.name=="string"&&i1(g.name),delete this._registeredTools[e],delete this._toolInputSchemaJson[e],g.name&&(delete this._toolInputSchemaJson[g.name],this._registeredTools[g.name]=h,e=g.name)),g.title!==void 0&&(h.title=g.title),g.description!==void 0&&(h.description=g.description);let b=!1;g.paramsSchema!==void 0&&(h.inputSchema=g.paramsSchema,delete this._toolInputSchemaJson[e],b=!0),g.callback!==void 0&&(h.handler=g.callback,d=g.callback,b=!0),b&&(h.executor=F0(h.inputSchema,d)),g.outputSchema!==void 0&&(h.outputSchema=g.outputSchema,h.outputSchemaJson=Z0(g.outputSchema)),g.annotations!==void 0&&(h.annotations=g.annotations),g.icons!==void 0&&(h.icons=g.icons),g.scopeChallenge!==void 0&&(h.scopeChallenge=g.scopeChallenge===null?void 0:g.scopeChallenge),g._meta!==void 0&&(h._meta=g._meta),g.enabled!==void 0&&(h.enabled=g.enabled),this.sendToolListChanged()}};return this._registeredTools[e]=h,this.setToolRequestHandlers(),this.sendToolListChanged(),h}registerTool(e,t,r){if(this._registeredTools[e])throw new Error(`Tool ${e} is already registered`);let{title:i,description:n,inputSchema:o,outputSchema:a,annotations:s,icons:c,scopeChallenge:l,_meta:u}=t;return this._createRegisteredTool(e,i,n,wd(o),wd(a),s,c,void 0,l,u,r)}registerPrompt(e,t,r){if(this._registeredPrompts[e])throw new Error(`Prompt ${e} is already registered`);let{title:i,description:n,argsSchema:o,icons:a,scopeChallenge:s,_meta:c}=t,l=this._createRegisteredPrompt(e,i,n,wd(o),r,a,s,c);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),l}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(e,t){return this.server.sendLoggingMessage(e,t)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}};function F0(e,t){if(e){let i=t;return async(n,o)=>i(n,o)}let r=t;return async(i,n)=>r(n)}var V0={type:"object",properties:{}};function kC(e,t){let r=kr(t,"input"),i=Kv(r);return i.valid||console.warn(`[mcp-sdk] tool '${e}' carries an invalid x-mcp-header declaration and will be excluded by conforming Streamable HTTP clients: ${i.reason}`),r}function Z0(e){if(e!==void 0)try{return kr(e,"output")}catch{return}}function H0(e,t,r){if(t){let i=r;return async(n,o)=>{let a=await yr(t,n??{});if(!a.success)throw new de(ee.InvalidParams,`Invalid arguments for prompt ${e}: ${a.error}`);return i(a.data,o)}}else{let i=r;return async(n,o)=>i(o)}}function G0(e){return{completion:{values:e.map(String).slice(0,100),total:e.length,hasMore:e.length>100}}}var Ba={completion:{values:[],hasMore:!1}};function J0(e){let t=e;if(t.shape&&typeof t.shape=="object")return t.shape}function wC(e){return e?.type==="optional"}function B0(e){return wC(e)?e.def?.innerType??e:e}function $C(e,t){switch(t.kind){case"tools_list_changed":return e.toolsListChanged===!0;case"prompts_list_changed":return e.promptsListChanged===!0;case"resources_list_changed":return e.resourcesListChanged===!0;case"resource_updated":return e.resourceSubscriptions!==void 0&&e.resourceSubscriptions.includes(t.uri)}}function xC(e,t){let r={},i=n=>t===void 0||n===!0;return e.toolsListChanged===!0&&i(t?.tools?.listChanged)&&(r.toolsListChanged=!0),e.promptsListChanged===!0&&i(t?.prompts?.listChanged)&&(r.promptsListChanged=!0),e.resourcesListChanged===!0&&i(t?.resources?.listChanged)&&(r.resourcesListChanged=!0),e.resourceSubscriptions!==void 0&&e.resourceSubscriptions.length>0&&i(t?.resources?.subscribe)&&(r.resourceSubscriptions=[...e.resourceSubscriptions]),r}var Ed=1024;function nk(e,t){return{method:e.method,params:{...e.params,_meta:{...e.params?._meta,[hr]:t}}}}function TC(e){let t=sn(Ha).validateRequest("subscriptions/listen",e);return t.ok?t.value.params?.notifications:void 0}var RC=new Set(["notifications/tools/list_changed","notifications/prompts/list_changed","notifications/resources/list_changed","notifications/resources/updated"]),rk=class{_subs=new Map;_serverCapabilities;_serverInfo;constructor(e=Ed,t,r){this._maxSubscriptions=e,this._serverCapabilities=t,this._serverInfo=r}setServerCapabilities(e,t){this._serverCapabilities=e,t!==void 0&&(this._serverInfo=t)}has(e){return this._subs.has(e)}serve(e){if(this._serverCapabilities===void 0)throw new Error("StdioListenRouter.serve() called before setServerCapabilities(); refusing to honor a filter without capabilities");if(this._subs.size>=this._maxSubscriptions)return{jsonrpc:"2.0",id:e.id,error:{code:-32603,message:"Subscription limit reached"}};let t=TC(e);if(t===void 0)return{jsonrpc:"2.0",id:e.id,error:{code:-32602,message:"Invalid params: 'notifications' is required and must be a valid SubscriptionFilter"}};let r=xC(t,this._serverCapabilities);return this._subs.set(e.id,r),nk({method:"notifications/subscriptions/acknowledged",params:{notifications:r}},e.id)}cancel(e){return this._subs.delete(e)}routeOutbound(e){if(!RC.has(e.method))return"passthrough";let t=e.params?.uri,r=typeof t=="string"?t:void 0,i=IC(e.method,r),n=[];for(let[o,a]of this._subs)$C(a,i)&&n.push(nk({method:e.method,params:e.params??{}},o));return n}teardownAll(){let e=[];for(let t of this._subs.keys())e.push({jsonrpc:"2.0",id:t,result:{resultType:"complete",_meta:{[hr]:t,...this._serverInfo!==void 0&&{[Ht]:this._serverInfo}}}});return this._subs.clear(),e}};function IC(e,t){switch(e){case"notifications/tools/list_changed":return{kind:"tools_list_changed"};case"notifications/prompts/list_changed":return{kind:"prompts_list_changed"};case"notifications/resources/list_changed":return{kind:"resources_list_changed"};default:return{kind:"resource_updated",uri:t??""}}}var MA=4*1024*1024;var ok="https://cdn.jsdelivr.net";function ik(e,...t){let r=new Ka(e);for(let i of t)i(r);return r}function Pd(e,t){k1(e,t.name,t.uri,{description:t.description},()=>({contents:[{uri:t.uri,mimeType:Nd,text:t.html,_meta:{ui:{csp:{resourceDomains:[ok]}}}}]}))}var ak=[{id:"component-code",name:"Component Code",pkg:"@fabiocv/component-code-mcp",summary:"Code with live parameters that you can change and see the component update."},{id:"orbit",name:"Orbit",pkg:"@fabiocv/orbit-mcp",summary:"A one-button game to play while your agent works. Switch rings to miss the arcs ahead."}],sk={id:"mcp",name:"fabiocv",pkg:"@fabiocv/mcp",summary:"MCP Apps that show UI in your chat. Every tool in one server."};var ck=Symbol("swallowsErrorsAfterClose"),zC=class{_readBuffer;_started=!1;_closed=!1;constructor(e=p1.stdin,t=p1.stdout,r){this._stdin=e,this._stdout=t,this._readBuffer=new r1({maxBufferSize:r?.maxBufferSize})}onclose;onerror;onmessage;_ondata=e=>{try{this._readBuffer.append(e),this.processReadBuffer()}catch(t){this.onerror?.(t),this.close().catch(()=>{})}};_onerror=e=>{this.onerror?.(e)};_onstdouterror=e=>{this._closed||(this.onerror?.(e),this.close().catch(()=>{}))};_onstdinclose=()=>{this.close().catch(()=>{})};async start(){if(this._started)throw new Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=!0;for(let e of this._stdout.listeners("error"))e[ck]&&this._stdout.off("error",e);(this._stdin.readableEnded||this._stdin.destroyed)&&setImmediate(this._onstdinclose),this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror),this._stdin.on("end",this._onstdinclose),this._stdin.on("close",this._onstdinclose),this._stdout.on("error",this._onstdouterror)}processReadBuffer(){for(;;)try{let e=this._readBuffer.readMessage();if(e===null)break;this.onmessage?.(e)}catch(e){this.onerror?.(e)}}async close(){this._closed||(this._closed=!0,this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.off("end",this._onstdinclose),this._stdin.off("close",this._onstdinclose),this._onstdouterror[ck]=!0,this._stdin.listenerCount("data")===0&&this._stdin.pause(),this._readBuffer.clear(),this.onclose?.())}send(e){return this._closed?Promise.reject(new Error("StdioServerTransport is closed")):new Promise((t,r)=>{let i=o1(e),n=!1,o=s=>{n||(n=!0,this._stdout.off("error",o),this._stdout.off("drain",a),r(s))},a=()=>{n||(n=!0,this._stdout.off("error",o),this._stdout.off("drain",a),t())};if(this._stdout.once("error",o),this._stdout.write(i)){if(n)return;n=!0,this._stdout.off("error",o),t()}else n||this._stdout.once("drain",a)})}},lk=3e3,CC=class{onclose;onerror;onmessage;_closed=!1;_pendingRequests=new Set;_drainWaiters=[];constructor(e,t,r){this._wire=e,this._onInstanceClose=t,this._outboundIntercept=r}async start(){}async send(e,t){if(br(e)||Sr(e)){let{id:r}=e;r!==void 0&&this._settle(r)}if(!this._closed&&this._outboundIntercept?.(e)!=="handled")return this._wire.send(e,t)}setProtocolVersion=e=>{this._wire.setProtocolVersion?.(e)};deliver(e,t){if(!this._closed){if(_t(e))this._pendingRequests.add(e.id);else if(qn(e)&&e.method==="notifications/cancelled"){let r=e.params?.requestId;r!==void 0&&this._settle(r)}this.onmessage?.(e,t)}}async whenRequestsAnswered(e){return this._closed||this._pendingRequests.size===0?!0:await new Promise(t=>{let r=()=>{clearTimeout(i),t(!0)},i=setTimeout(()=>{this._drainWaiters=this._drainWaiters.filter(n=>n!==r),t(!1)},e);this._drainWaiters.push(r)})}async close(){if(!this._closed){this._closed=!0,this._pendingRequests.clear(),this._releaseDrainWaiters();try{this._onInstanceClose()}finally{this.onclose?.()}}}_settle(e){this._pendingRequests.delete(e),this._pendingRequests.size===0&&this._releaseDrainWaiters()}_releaseDrainWaiters(){let e=this._drainWaiters;this._drainWaiters=[];for(let t of e)t()}};function EC(e){let t=e.params;if(e.method==="initialize"&&!Wv(t)){let o=t!==null&&typeof t=="object"&&typeof t.protocolVersion=="string"?t.protocolVersion:void 0;return{kind:"legacy",reason:"initialize",...o!==void 0&&{requestedVersion:o}}}if(!bd(t))return{kind:"legacy",reason:"no-claim"};let r=_r(t),i=(r===void 0?[]:Sd(r))[0];if(i!==void 0)return{kind:"invalid-envelope",issue:i};let n=_d(t);return n===void 0||!Gt.includes(n)?{kind:"unsupported-revision",requested:n??"unknown"}:{kind:"modern",revision:n,classification:{era:"modern",revision:n}}}function uk(e,t={}){let r=t.legacy??"serve",i=t.transport??new zC,n={phase:"opening"},o,a=!1,s=()=>a||n.phase==="closed",c=R=>{try{t.onerror?.(R)}catch{}},l=(R,A,F,M)=>i.send({jsonrpc:"2.0",id:R,error:{code:A,message:F,...M!==void 0&&{data:M}}}).catch(V=>c(qt(V))),u=new rk(t.maxSubscriptions??Ed),d=R=>{if(!qn(R))return;let A=u.routeOutbound(R);if(A!=="passthrough"){for(let F of A)i.send({jsonrpc:"2.0",...F}).catch(M=>c(qt(M)));return"handled"}},f=async R=>{if(_t(R)&&R.method==="subscriptions/listen"){let A=_r(R.params),F=bd(R.params)?(A===void 0?[]:Sd(A))[0]:{key:"_meta",problem:"the per-request envelope is required on protocol revision 2026-07-28"},M=_d(R.params),V;if(F!==void 0)V={jsonrpc:"2.0",id:R.id,error:{code:-32602,message:`Invalid _meta envelope: ${F.key}: ${F.problem}`}};else if(M===void 0||!Gt.includes(M)){let te=new jo({supported:[...Gt],requested:M??"unknown"});V={jsonrpc:"2.0",id:R.id,error:{code:te.code,message:te.message,data:te.data}}}else V=u.serve(R);return await i.send("error"in V?V:{jsonrpc:"2.0",method:V.method,params:V.params}).catch(te=>c(qt(te))),!0}if(qn(R)&&R.method==="notifications/cancelled"){let A=R.params?.requestId;if(A!==void 0&&u.cancel(A))return!0}return!1},h=(R,A,F)=>{let M=Qv({kind:"legacy",reason:A,...F!==void 0&&{requestedVersion:F}},Gt);return M===void 0?Promise.resolve():(c(new Error(`Rejected 2025-era request on a modern-only stdio connection (${M.cell}): ${M.message}`)),l(R.id,M.code,M.message,M.data))},g=R=>{a||R===o||T()},b=async(R,A)=>{let F=await e({era:R}),M=F instanceof Ka?F.server:F;R==="modern"&&(e1(M,A),v1(M,Gt),u.setServerCapabilities(M.getCapabilities(),y1(M)));let V=new CC(i,()=>g(V),R==="modern"?d:void 0);return await F.connect(V),{product:F,channel:V}},S=R=>R.product.close().catch(A=>c(qt(A))),y=async R=>{o=R.channel;try{await R.channel.whenRequestsAnswered(lk)||c(new Error(`Discarded the probe instance with requests still unanswered after ${lk}ms; continuing with the fallback`)),await R.product.close()}catch(A){c(qt(A))}finally{o=void 0}},x=async R=>{if(n.phase==="closed")return;if(n.phase==="pinned"){if(n.era==="modern"&&_t(R)&&R.method==="initialize"&&!Wv(R.params)){await h(R,"initialize",R.params!==null&&typeof R.params=="object"&&typeof R.params.protocolVersion=="string"?R.params.protocolVersion:void 0);return}if(n.era==="modern"&&await f(R)||s())return;n.instance.channel.deliver(R);return}if(!_t(R)&&!qn(R)){c(new Error("Discarded a JSON-RPC response received before the connection negotiated an era"));return}let A=EC(R);switch(A.kind){case"invalid-envelope":{let F=`Invalid _meta envelope for protocol revision 2026-07-28: ${A.issue.key}: ${A.issue.problem}`;_t(R)?await l(R.id,ee.InvalidParams,F,{envelope:A.issue}):c(new Error(`Discarded a notification with a malformed envelope: ${F}`));return}case"unsupported-revision":if(_t(R)){let F=new jo({supported:[...Gt],requested:A.requested});c(F),await l(R.id,F.code,F.message,F.data)}else c(new Error(`Discarded a notification claiming unsupported protocol revision ${A.requested}`));return;case"modern":if(_t(R)&&R.method==="server/discover"){if(n.phase==="probe"){n.instance.channel.deliver(R,{classification:A.classification});return}let F=await b("modern",A.revision);if(s()){await S(F);return}n={phase:"probe",instance:F},F.channel.deliver(R,{classification:A.classification});return}if(n.phase==="probe"){if(qn(R)){n.instance.channel.deliver(R,{classification:A.classification});return}n={phase:"pinned",era:"modern",instance:n.instance}}else{let F=await b("modern",A.revision);if(s()){await S(F);return}n={phase:"pinned",era:"modern",instance:F}}if(await f(R)||s())return;n.instance.channel.deliver(R,{classification:A.classification});return;case"legacy":{if(r==="reject"){_t(R)&&await h(R,A.reason,A.requestedVersion);return}if(n.phase==="probe"){if(await y(n.instance),s())return;n={phase:"opening"}}let F=await b("legacy");if(s()){await S(F);return}n={phase:"pinned",era:"legacy",instance:F},n.instance.channel.deliver(R);return}}},k=[],I=!1,O=async()=>{if(!I){I=!0;try{for(;k.length>0;){let R=k.shift();try{await x(R)}catch(A){_t(R)&&await l(R.id,ee.InternalError,"Internal server error"),c(qt(A))}}}finally{I=!1}}},T=async()=>{if(a||n.phase==="closed")return;a=!0;let R=n;n={phase:"closed"};for(let A of u.teardownAll())await i.send(A).catch(F=>c(qt(F)));(R.phase==="probe"||R.phase==="pinned")&&await R.instance.product.close().catch(A=>c(qt(A))),await i.close().catch(A=>c(qt(A)))};i.onmessage=R=>{k.push(R),O()},i.onerror=R=>{c(R),(n.phase==="probe"||n.phase==="pinned")&&n.instance.channel.onerror?.(R)},i.onclose=()=>{if(a||n.phase==="closed")return;a=!0;let R=n;n={phase:"closed"},(R.phase==="probe"||R.phase==="pinned")&&R.instance.product.close().catch(A=>c(qt(A)))};let _=i.start().catch(R=>{throw c(qt(R)),R});return _.catch(()=>{}),{close:async()=>{await _.catch(()=>{}),await T()}}}function qt(e){return e instanceof Error?e:new Error(String(e))}var dk="0.6.4";var pk='<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n <title>Component Code</title>\n <style>\n @font-face {\n font-family: Geist;\n src: url(\'https://cdn.jsdelivr.net/npm/geist@1.9.2/dist/fonts/geist-sans/Geist-Variable.woff2\')\n format(\'woff2\');\n font-weight: 100 900;\n font-display: swap;\n }\n @font-face {\n font-family: \'Geist Mono\';\n src: url(\'https://cdn.jsdelivr.net/npm/geist@1.9.2/dist/fonts/geist-mono/GeistMono-Variable.woff2\')\n format(\'woff2\');\n font-weight: 100 900;\n font-display: swap;\n }\n body {\n margin: 0;\n padding: 1px;\n font-family: Geist, ui-sans-serif, system-ui, sans-serif;\n }\n </style>\n <script type="module" crossorigin>var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function ee(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var te=ee.prototype=new y;te.constructor=ee,g(te,v.prototype),te.isPureReactComponent=!0;var ne=Array.isArray;function re(){}var ie={H:null,A:null,T:null,S:null},ae=Object.prototype.hasOwnProperty;function oe(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function se(e,t){return oe(e.type,t,e.props)}function ce(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function le(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ue=/\\/+/g;function de(e,t){return typeof e==`object`&&e&&e.key!=null?le(``+e.key):t.toString(36)}function fe(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(re,re):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function pe(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,pe(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+de(e,0):a,ne(o)?(i=``,c!=null&&(i=c.replace(ue,`$&/`)+`/`),pe(o,r,i,``,function(e){return e})):o!=null&&(ce(o)&&(o=se(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ue,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(ne(e))for(var u=0;u<e.length;u++)a=e[u],s=l+de(a,u),c+=pe(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+de(a,u++),c+=pe(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return pe(fe(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function b(e,t,n){if(e==null)return e;var r=[],i=0;return pe(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function me(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var he=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ge={map:b,forEach:function(e,t,n){b(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return b(e,function(){t++}),t},toArray:function(e){return b(e,function(e){return e})||[]},only:function(e){if(!ce(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ge,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=ee,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ie,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return ie.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!ae.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return oe(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)ae.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return oe(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=ce,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:me}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=ie.T,n={};ie.T=n;try{var r=e(),i=ie.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(re,he)}catch(e){he(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),ie.T=t}},e.unstable_useCacheRefresh=function(){return ie.H.useCacheRefresh()},e.use=function(e){return ie.H.use(e)},e.useActionState=function(e,t,n){return ie.H.useActionState(e,t,n)},e.useCallback=function(e,t){return ie.H.useCallback(e,t)},e.useContext=function(e){return ie.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return ie.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return ie.H.useEffect(e,t)},e.useEffectEvent=function(e){return ie.H.useEffectEvent(e)},e.useId=function(){return ie.H.useId()},e.useImperativeHandle=function(e,t,n){return ie.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return ie.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return ie.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return ie.H.useMemo(e,t)},e.useOptimistic=function(e,t){return ie.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return ie.H.useReducer(e,t,n)},e.useRef=function(e){return ie.H.useRef(e)},e.useState=function(e){return ie.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return ie.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return ie.H.useTransition()},e.version=`19.2.7`})),u=o(((e,t)=>{t.exports=l()})),d=c(u(),1),f=Object.defineProperty,p=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),m=(e,t)=>{let n={};for(var r in e)f(n,r,{get:e[r],enumerable:!0});return t&&f(n,Symbol.toStringTag,{value:`Module`}),n},h=new Set([`https://json-schema.org/draft/2020-12/schema`,`http://json-schema.org/draft/2020-12/schema`]),g=new Set([`https://json-schema.org/draft/2019-09/schema`,`http://json-schema.org/draft/2019-09/schema`]),_=new Set([`https://json-schema.org/draft-07/schema`,`http://json-schema.org/draft-07/schema`]),v=new Set([`https://json-schema.org/draft-06/schema`,`http://json-schema.org/draft-06/schema`]);function y(e){return typeof e==`string`&&g.has(e.replace(/#$/,``))}function ee(e,t){if(!(`$schema`in e)||typeof e.$schema!=`string`)return`2020-12`;let n=e.$schema.replace(/#$/,``);if(h.has(n))return`2020-12`;if(g.has(n))return`2019-09`;if(_.has(n)||v.has(n))return`draft-7`;throw Error(`JSON Schema declares an unsupported dialect ("$schema": "${e.$schema.slice(0,200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${t}`)}function te(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function ne(e,t=`|`){return e.map(e=>Oe(e)).join(t)}function re(e,t){return typeof t==`bigint`?t.toString():t}var ie=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function ae(e){return new ie(e)}function oe(e){return e==null}function se(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ce(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var le=Symbol(`evaluating`);function ue(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==le)return r===void 0&&(r=le,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function de(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function fe(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function pe(e){return fe(e._zod.def)??e._zod.def.shape}function b(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return de(this,t,e),e},enumerable:!0,configurable:!0})}function me(e,t,n){t in e?de(e,t,n):e[t]=n}function he(e,t,n,r){let i=pe(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?b(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):me(e,a,r?r(n.value,a):n.value))}}function ge(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?b(e,n,()=>t[n]):me(e,n,r.value))}}function _e(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function ve(e){return JSON.stringify(e)}function ye(e){return e.toLowerCase().trim().replace(/[^\\w\\s-]/g,``).replace(/[\\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var be=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function xe(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Se=ae(()=>{if(vt.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Ce(e){if(xe(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(xe(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function we(e){return Ce(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Te=new Set([`string`,`number`,`symbol`]);function Ee(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,`\\\\$&`)}function De(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function x(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Oe(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function ke(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var Ae={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},je={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Me(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return he(i,e,Ne(e,t)),De(e,_e(n,{shape:i,checks:[]}))}function Ne(e,t){let n=pe(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function S(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(Ne(e,t)),a={};return he(a,e,Reflect.ownKeys(pe(e)).filter(e=>!i.has(e))),De(e,_e(n,{shape:a,checks:[]}))}function Pe(e,t){if(!Ce(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=pe(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return De(e,_e(e._zod.def,{shape:Fe(e,t)}))}function Fe(e,t){let n={};return he(n,e,Reflect.ownKeys(pe(e))),ge(n,t),n}function Ie(e,t){if(!Ce(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return De(e,_e(e._zod.def,{shape:Fe(e,t)}))}function Le(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return he(n,e,Reflect.ownKeys(pe(e))),he(n,t,Reflect.ownKeys(pe(t))),De(e,_e(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Re(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(Ne(t,n)):void 0,o={};return he(o,t,Reflect.ownKeys(pe(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),De(t,_e(t._zod.def,{shape:o,checks:[]}))}function ze(e,t,n){let r=n?new Set(Ne(t,n)):void 0,i={};return he(i,t,Reflect.ownKeys(pe(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),De(t,_e(t._zod.def,{shape:i}))}function Be(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Ve(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function He(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Ue(e){return typeof e==`string`?e:e?.message}function We(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function Ge(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function Ke(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:Ue(e.inst?._zod.def?.error?.(e))??Ue(a?.(e))??Ue(t?.error?.(e))??Ue(n.customError?.(e))??Ue(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t===`inst`||t===`schema`||t===`continue`||t===`input`||t===`__proto__`||(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var qe=/[\\uD800-\\uDBFF]/;function Je(e){let t=e.length;if(!qe.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function Ye(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Xe(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Ze(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Qe(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):nt(e,n,r.value)}}function $e(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function et(e,t,n){return $e(e,t,n,!1)}function tt(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return $e(this,n,r(this))},set(e){$e(this,n,e)}})}return t}function nt(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:$e(this,t,n.bind(this))},set(e){$e(this,t,e)}})}function rt(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var it,at=!1,ot={configurable:!0,get(){at=!0}};function st(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&it!==e._zod){it=void 0;return}it=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,ot);let e=at;at=!1;try{let r=n(this);return at?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),at||=e,r}catch(n){throw delete this[t],at||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function ct(e,t,n,r){let i=rt(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var lt=`~constantCatch`;function ut(e){let t=()=>e;return t[lt]=!0,t}var dt,ft=Object.freeze({status:`aborted`}),pt={value:void 0,enumerable:!1},mt=`captureStackTrace`in Error?Error:null;function ht(e){let t=mt;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return mt=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function C(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){pt.value=new a(r);try{Object.defineProperty(n,"_zod",pt)}finally{pt.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Qe(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?ht(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var gt=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},_t=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(dt=globalThis).__zod_globalConfig??(dt.__zod_globalConfig={});var vt=globalThis.__zod_globalConfig;function yt(e){return e&&Object.assign(vt,e),vt}function bt(){let e=this._zod;return e.message??=JSON.stringify(e.def,re,2),e.message}function xt(e){this._zod.message=e}var St={get:bt,set:xt,enumerable:!0,configurable:!0},Ct={value:void 0,enumerable:!1},wt=new WeakSet([Object.prototype,Error.prototype]),Tt=(e,t)=>{e.name=`$ZodError`,Ct.value=t,Object.defineProperty(e,"issues",Ct),Ct.value=void 0,Object.defineProperty(e,"message",St);let n=Object.getPrototypeOf(e);wt.has(n)||(wt.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},Et=C(`$ZodError`,Tt);C(`$ZodError`,Tt,void 0,{Parent:Error});function Dt(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Ot(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Dt(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function kt(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function At(e,t){return{callee:t?.callee??e,Err:t?.Err}}var jt=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new gt;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Ke(e,o,yt())));throw be(n,a?.callee??t),n}return s.value};return t},Mt=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Ke(e,o,yt())));throw be(n,a?.callee??t),n}return s.value};return t},Nt=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new gt;return a.issues.length?Pt(e,a.issues,i):{success:!0,data:a.value}};function Pt(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>Ke(e,n,yt()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var Ft=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?Pt(e,a.issues,i):{success:!0,data:a.value}},It=Symbol.for(`zod.compile.invalid`),Lt=Symbol.for(`zod.compile.fallback`),Rt=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==It)return!0;if(r.definite===!0&&n===void 0)return!1}return zt(e,t,n)});function zt(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[Lt]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new gt;return a.issues.length===0}var Bt=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},Vt=e=>{let t=jt(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,At(n,a))};return n},Ht=e=>{let t=jt(e),n=(e,r,i,a)=>t(e,r,i,At(n,a));return n},Ut=e=>{let t=Mt(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,At(n,a))};return n},Wt=e=>{let t=Mt(e),n=async(e,r,i,a)=>await t(e,r,i,At(n,a));return n},Gt=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Nt(e)(t,n,i)},Kt=e=>(t,n,r)=>Nt(e)(t,n,r),qt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ft(e)(t,n,i)},Jt=e=>async(t,n,r)=>Ft(e)(t,n,r),Yt=/^[cC][0-9a-z]{6,}$/,Xt=/^[0-9a-z]+$/,Zt=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Qt=/^[0-9a-vA-V]{20}$/,$t=/^[A-Za-z0-9]{27}$/,en=/^[a-zA-Z0-9_-]{21}$/;function tn(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var nn=/^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/,rn=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,an=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,on=/^(?:[A-Za-z0-9_\'+\\-]+\\.)*[A-Za-z0-9_\'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/,sn=`^(?=[\\\\s\\\\S]*[\\\\p{Extended_Pictographic}\\\\p{Regional_Indicator}\\\\u20E3])[\\\\p{Extended_Pictographic}\\\\p{Emoji_Component}]+$`;function cn(){return new RegExp(sn,`u`)}var ln=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,un=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,dn=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$/,fn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,pn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,mn=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,hn=/^https?$/,gn=/^\\+[1-9]\\d{6,14}$/,_n=`(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))`;function vn(e){return RegExp(`^${e}$`)}var yn=vn(_n);function bn(e){let t=`(?:[01]\\\\d|2[0-3]):[0-5]\\\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\\\d`:`${t}:[0-5]\\\\d\\\\.\\\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\\\d(?:\\\\.\\\\d+)?`:`${t}(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?`}function xn(e){return RegExp(`^${bn(e)}$`)}function Sn(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)`);let n=`${bn({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${bn({precision:e.precision})}`:n;return RegExp(`^${_n}T(?:${r})$`)}var Cn=/^[\\s\\S]{0,}$/,wn=/^-?\\d+$/,Tn=/^-?\\d+(?:\\.\\d+)?$/,En=/^(?:true|false)$/i,Dn=/^null$/i,On=/^undefined$/i,kn=/^[^A-Z]*$/,An=/^[^a-z]*$/,jn=C(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Mn=e=>{let t=e.value;return!oe(t)&&t.length!==void 0},Nn={number:`number`,bigint:`bigint`,object:`date`},Pn=C(`$ZodCheckLessThan`,(e,t)=>{jn.init(e,t);let n=Nn[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Nn[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Fn=C(`$ZodCheckGreaterThan`,(e,t)=>{jn.init(e,t);let n=Nn[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Nn[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),In=C(`$ZodCheckMultipleOf`,(e,t)=>{jn.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):ce(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Ln=C(`$ZodCheckNumberFormat`,(e,t)=>{jn.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Ae[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Rn=C(`$ZodCheckMaxLength`,(e,t)=>{var n;jn.init(e,t),(n=e._zod.def).when??(n.when=Mn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Je(r):i)<=t.maximum)return;let a=Ye(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),zn=C(`$ZodCheckMinLength`,(e,t)=>{var n;jn.init(e,t),(n=e._zod.def).when??(n.when=Mn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?Je(r):i)>=t.minimum)return;let a=Ye(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Bn=C(`$ZodCheckLengthEquals`,(e,t)=>{var n;jn.init(e,t),(n=e._zod.def).when??(n.when=Mn),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Je(r):i;if(a===t.length)return;let o=Ye(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Vn=C(`$ZodCheckStringFormat`,(e,t)=>{var n,r;jn.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Hn=C(`$ZodCheckRegex`,(e,t)=>{Vn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Un=C(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=kn,Vn.init(e,t)}),Wn=C(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=An,Vn.init(e,t)}),Gn=C(`$ZodCheckIncludes`,(e,t)=>{jn.init(e,t);let n=Ee(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Kn=C(`$ZodCheckStartsWith`,(e,t)=>{jn.init(e,t);let n=RegExp(`^${Ee(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),qn=C(`$ZodCheckEndsWith`,(e,t)=>{jn.init(e,t);let n=RegExp(`.*${Ee(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Jn=C(`$ZodCheckOverwrite`,(e,t)=>{jn.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Yn=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`\n`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\\n${t.join(`\n`)}\\n};`)(...Object.values(this.closed))}},Xn={major:4,minor:6,patch:7},Zn=C(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Xn;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=Be(t),a;for(let o of n){if(o._zod.def.when){if(Ve(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new gt;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Ge(t.issues,n,e),i||=Be(t,n))});else{if(t.issues.length===n)continue;Ge(t.issues,n,e),i||=Be(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(Be(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new gt;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new gt;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return et(this,`~standard`,er(this))},set"~standard"(e){$e(this,`~standard`,e)}}),Qn=(e,t)=>e.issues.length?{issues:e.issues.map(e=>Ke(e,t,yt()))}:{value:e.value};async function $n(e,t){let n={async:!0};return Qn(await e._zod.run({value:t,issues:[]},n),n)}function er(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Qn(r,n)}catch{}return $n(e,t)},vendor:`zod`,version:1}}var tr=C(`$ZodString`,(e,t)=>{Zn.init(e,t),e._zod.pattern=t.pattern??Cn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),nr=C(`$ZodStringFormat`,(e,t)=>{Vn.init(e,t),tr.init(e,t)}),rr=C(`$ZodGUID`,(e,t)=>{t.pattern??=rn,nr.init(e,t)}),ir=C(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=an(e)}else t.pattern??=an();nr.init(e,t)}),ar=C(`$ZodEmail`,(e,t)=>{t.pattern??=on,nr.init(e,t)});function or(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function sr(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?or(e)||2:cr(e,t)}function cr(e,t){if(!t.normalize&&t.protocol?.source===hn.source&&!/^https?:\\/\\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var lr=/[\\t\\n\\r]/g;function ur(e){return e.replace(lr,``)}function dr(e,t){return t.lastIndex=0,t.test(e.hostname)}function fr(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var pr=C(`$ZodURL`,(e,t)=>{nr.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=sr(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=ur(r);return}t.hostname&&!dr(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!fr(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:ur(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),mr=C(`$ZodEmoji`,(e,t)=>{t.pattern??=cn(),nr.init(e,t)}),hr=C(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?en:tn(t.length),nr.init(e,t)}),gr=C(`$ZodCUID`,(e,t)=>{t.pattern??=Yt,nr.init(e,t)}),_r=C(`$ZodCUID2`,(e,t)=>{t.pattern??=Xt,nr.init(e,t)}),vr=C(`$ZodULID`,(e,t)=>{t.pattern??=Zt,nr.init(e,t)}),yr=C(`$ZodXID`,(e,t)=>{t.pattern??=Qt,nr.init(e,t)}),br=C(`$ZodKSUID`,(e,t)=>{t.pattern??=$t,nr.init(e,t)}),xr=C(`$ZodISODateTime`,(e,t)=>{t.pattern??=Sn(t),nr.init(e,t)}),Sr=C(`$ZodISODate`,(e,t)=>{t.pattern??=yn,nr.init(e,t)}),Cr=C(`$ZodISOTime`,(e,t)=>{t.pattern??=xn(t),nr.init(e,t)}),wr=C(`$ZodISODuration`,(e,t)=>{t.pattern??=nn,nr.init(e,t)}),Tr=C(`$ZodIPv4`,(e,t)=>{t.pattern??=ln,nr.init(e,t)}),Er=/^[0-9a-fA-F:.]+$/;function Dr(e){return Er.test(e)?or(`http://[${e}]`):!1}var Or=C(`$ZodIPv6`,(e,t)=>{t.pattern??=un,nr.init(e,t),e._zod.check=n=>{Dr(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),kr=C(`$ZodCIDRv4`,(e,t)=>{t.pattern??=dn,nr.init(e,t)});function Ar(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:Dr(n)}var jr=C(`$ZodCIDRv6`,(e,t)=>{t.pattern??=fn,nr.init(e,t),e._zod.check=n=>{Ar(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function Mr(e){if(e===``)return!0;if(/\\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Nr=/^[0-9a-zA-Z+/]*={0,2}$/,Pr=C(`$ZodBase64`,(e,t)=>{t.pattern??=Nr,nr.init(e,t),e._zod.check=n=>{Mr(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),Fr=/^[A-Za-z0-9_-]*$/;function Ir(e){if(!Fr.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Mr(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Lr=C(`$ZodBase64URL`,(e,t)=>{t.pattern??=Fr,nr.init(e,t),e._zod.check=n=>{Ir(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Rr=C(`$ZodE164`,(e,t)=>{t.pattern??=gn,nr.init(e,t)});function zr(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Br=C(`$ZodJWT`,(e,t)=>{nr.init(e,t),e._zod.check=n=>{zr(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Vr=C(`$ZodNumber`,(e,t)=>{Zn.init(e,t),e._zod.pattern=Tn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Hr=C(`$ZodNumberFormat`,(e,t)=>{Ln.init(e,t),Vr.init(e,t)}),Ur=C(`$ZodBoolean`,(e,t)=>{Zn.init(e,t),e._zod.pattern=En,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Wr=C(`$ZodUndefined`,(e,t)=>{Zn.init(e,t),e._zod.pattern=On,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),Gr=C(`$ZodNull`,(e,t)=>{Zn.init(e,t),e._zod.pattern=Dn,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),Kr=C(`$ZodAny`,(e,t)=>{Zn.init(e,t),e._zod.parse=e=>e}),qr=C(`$ZodUnknown`,(e,t)=>{Zn.init(e,t),e._zod.parse=e=>e}),Jr=C(`$ZodNever`,(e,t)=>{Zn.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Yr(e,t){let n=We(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of We(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,Ge(n.issues,t,e),n}}return i(n,a)}}var Xr=e=>Array.isArray(e)?e.length:-1;function Zr(e,t,n){e.issues.length&&t.issues.push(...He(n,e.issues)),t.value[n]=e.value}var Qr=C(`$ZodArray`,(e,t)=>{Zn.init(e,t);let n=vt.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>Zr(t,r,e)));else if(Zr(c,r,e),s&&c.issues.length!==0&&Be(c))break}return o.length?Promise.all(o).then(()=>r):r},Yr(e,Xr)});function $r(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(!(!o&&s&&i===`optional`)){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...He(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var ei=[];function ti(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:ei,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=ke(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function ni(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(Be(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>$r(e,n,i,t,d,f))):$r(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var ri=C(`$ZodObject`,(e,t)=>{Zn.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=ae(()=>ti(t));st(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||de(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=xe,o=t.catchall,s,c=vt.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(Be(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>$r(n,t,e,r,a,o))):$r(s,t,e,r,a,o)}return o?ni(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),ii=C(`$ZodObjectJIT`,(e,t)=>{ri.init(e,t);let n=e._zod.parse,r=ae(()=>ti(t)),i=vt.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new Yn([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`\n let ${e}_ab = false;\n for (let i = 0; i < ${e}.issues.length; i++) {\n const iss = ${e}.issues[i];\n iss.path = iss.path ? [${t}, ...iss.path] : [${t}];\n payload.issues.push(iss);\n if (iss.continue !== true) ${e}_ab = true;\n }\n if (${e}_ab && ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:ve(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`\n const ${n}_present = ${i};\n if (!${n}.issues.length || ${n}_present) {\n if (${n}.issues.length) {${c(n,r)}\n }\n\n if (${e}) {\n newResult[${r}] = ${n}.value;\n }\n }\n\n `)}else f?(o.write(`\n if (${n}.issues.length) {${c(n,r)}\n }\n `),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`\n if (${n}.value !== undefined || ${i}) {\n newResult[${r}] = ${n}.value;\n }\n `)):o.write(`\n const ${n}_present = ${i};\n if (${n}.issues.length) {${c(n,r)}\n }\n if (!${n}_present && !${n}.issues.length) {\n payload.issues.push({\n code: "invalid_type",\n expected: "nonoptional",\n input: undefined,\n path: [${r}]\n });\n if (ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }\n }\n\n if (${n}_present) {\n newResult[${r}] = ${n}.value;\n }\n\n `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=xe,c=!vt.jitless,l=c&&Se.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?ni([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function ai(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Be(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Ke(e,r,yt())))}),t)}var oi=C(`$ZodUnion`,(e,t)=>{Zn.init(e,t),st(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),st(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),st(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),st(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>se(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>ai(t,r,e,i)):ai(o,r,e,i)}});function si(e){let t=new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||r.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(e!==void 0)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}var ci=C(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,oi.init(e,t);let n=e._zod.parse;st(e,`propValues`,e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||Object.keys(i).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);i[e.def.discriminator]?.has(void 0)&&n++;for(let[e,n]of Object.entries(i)){Object.prototype.hasOwnProperty.call(t,e)||de(t,e,new Set);for(let r of n)t[e].add(r)}}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=fe(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=ae(()=>si(t));e._zod.parse=(i,a)=>{let o=i.value;if(!xe(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=o?.[t.discriminator],c=r.value.get(s);return c&&(s!==void 0||a.direction!==`backward`)?c._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>r.value.get(e)!==null),input:o,path:[t.discriminator],inst:e}),i)}}),li=C(`$ZodIntersection`,(e,t)=>{Zn.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>di(e,t,n)):di(e,i,a)}});function ui(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ce(e)&&Ce(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=ui(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=ui(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function di(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=ui(t.value,n.value);if(!c.valid){if(Be(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var fi=C(`$ZodRecord`,(e,t)=>{Zn.init(e,t);let n=vt.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Ce(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>Ke(e,i,yt())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...He(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...He(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e))if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e);l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&Tn.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>Ke(e,i,yt())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...He(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...He(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),pi=C(`$ZodEnum`,(e,t)=>{Zn.init(e,t);let n=te(t.entries),r=new Set(n);e._zod.values=r,st(e,`pattern`,e=>{let t=te(e.def.entries).filter(e=>Te.has(typeof e));return RegExp(t.length?`^(${t.map(e=>Ee(e.toString())).join(`|`)})$`:`^[^\\\\s\\\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),mi=C(`$ZodLiteral`,(e,t)=>{Zn.init(e,t);let n=new Set(t.values);e._zod.values=n,st(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?Ee(e):e?Ee(e.toString()):String(e)).join(`|`)})$`:`^[^\\\\s\\\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),hi=C(`$ZodTransform`,(e,t)=>{Zn.init(e,t),e._zod.optin=`optional`,vt.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new _t(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new gt;return n.value=i,n}});function gi(e,t){return e.value=t.issues.length?void 0:t.value,e}var _i=C(`$ZodOptional`,(e,t)=>{Zn.init(e,t),st(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,st(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),st(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${se(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>gi(e,t)):gi(e,r)}return t.innerType._zod.run(e,n)}}),vi=C(`$ZodExactOptional`,(e,t)=>{_i.init(e,t),st(e,`values`,e=>e.def.innerType._zod.values),st(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),yi=C(`$ZodNullable`,(e,t)=>{Zn.init(e,t),st(e,`optin`,e=>e.def.innerType._zod.optin),st(e,`optout`,e=>e.def.innerType._zod.optout),st(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${se(t.source)}|null)$`):void 0}),st(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),bi=C(`$ZodDefault`,(e,t)=>{Zn.init(e,t),e._zod.optin=`defaulted`,st(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>xi(e,t)):xi(r,t)}});function xi(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Si=C(`$ZodPrefault`,(e,t)=>{Zn.init(e,t),e._zod.optin=`defaulted`,st(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Ci=C(`$ZodNonOptional`,(e,t)=>{Zn.init(e,t),st(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>wi(t,e)):wi(i,e)}});function wi(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function Ti(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>Ke(e,r,yt()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var Ei=C(`$ZodCatch`,(e,t)=>{Zn.init(e,t),st(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),st(e,`optout`,e=>e.def.innerType._zod.optout),st(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>Ti(e,r,t,n)):Ti(e,r,t,n)}}),Di=C(`$ZodPipe`,(e,t)=>{Zn.init(e,t),st(e,`values`,e=>e.def.in._zod.values),st(e,`optin`,e=>e.def.in._zod.optin),st(e,`optout`,e=>e.def.out._zod.optout),st(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Oi(e,t.in,n)):Oi(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Oi(e,t.out,n)):Oi(r,t.out,n)}});function Oi(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var ki=C(`$ZodPreprocess`,(e,t)=>{Di.init(e,t)}),Ai=C(`$ZodReadonly`,(e,t)=>{Zn.init(e,t),st(e,`propValues`,e=>e.def.innerType._zod.propValues),st(e,`values`,e=>e.def.innerType._zod.values),st(e,`optin`,e=>e.def.innerType?._zod?.optin),st(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(ji):ji(r)}});function ji(e){return e.memo||(e.value=Object.freeze(e.value)),e}var Mi=C(`$ZodLazy`,(e,t)=>{Zn.init(e,t),ue(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),st(e,`pattern`,e=>e.innerType?._zod?.pattern),st(e,`propValues`,e=>e.innerType?._zod?.propValues),st(e,`optin`,e=>e.innerType?._zod?.optin??void 0),st(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Ni=C(`$ZodCustom`,(e,t)=>{jn.init(e,t),Zn.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Pi(t,n,r,e));Pi(i,n,r,e)}});function Pi(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Ze(e))}}var Fi=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},Ii=`~memo`,Li=[];function Ri(e){return typeof e==`object`&&!!e}function zi(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var Bi=new WeakMap,Vi=0,Hi=1,Ui=2;function Wi(e,t,n){let r=Bi.get(e);if(r!==void 0)return r?Ui:Vi;if(t.has(e))return Ui;t.add(e);let i=Vi,a=e=>{if(i!==Ui&&e?._zod){let r=Wi(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=Vi;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?Hi:o.value?._zod?Wi(o.value,t,n):Vi;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=fe(c);s(e?o(e,!0):Hi),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?Wi(r,t,!1):Hi);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(!(!n||typeof n!=`object`)){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),Gi(e,i)}function Gi(e,t){return t!==Hi&&Bi.set(e,t===Ui),t}function Ki(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var qi,Ji=[],Yi={alloc(e,t,n){let r=qi;if(!r)return n;qi=void 0;let i={value:n,issues:null};return r.set(t.value,i),Ji.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&Zi(n,e.value))throw new Fi;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=Wi(e,new Set,!1);if(i===Vi)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===Ui||r?n=!0:r=!0}let l=s.value;if(!Ri(l))return t(s,c);let u=c[Ii];u||(u={buckets:new WeakMap,backEdges:void 0},c[Ii]=u);let d;i===c?d=a:(d=Ki(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...zi(f.issues)):(s.memo=!0,u.backEdges??=new WeakSet,u.backEdges.add(f.value)),s;qi=d;let p=Ji.length,m=t(s,c);qi=void 0;let h=Ji.length>p?Ji.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?zi(e.issues):Li),e)):(h&&(h.issues=m.issues.length?zi(m.issues):Li),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function Xi(){return Yi}function Zi(e,t){let n=e[Ii]?.backEdges;return n!==void 0&&Ri(t)&&n.has(t)}var Qi=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(Xe(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${Oe(e.values[0])}`:`Invalid option: expected one of ${ne(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${ne(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`\'${e}\'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function $i(){return{localeError:Qi()}}var ea,ta=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function na(){return new ta}(ea=globalThis).__zod_globalRegistry??(ea.__zod_globalRegistry=na());var ra=globalThis.__zod_globalRegistry;function ia(e){return e.checks&&=[...e.checks],e}function aa(e,t){return new e(ia({type:`string`,...x(t)}))}function oa(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...x(t)})}function sa(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...x(t)})}function ca(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...x(t)})}function la(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...x(t)})}function ua(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...x(t)})}function da(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...x(t)})}function fa(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...x(t)})}function pa(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...x(t)})}function ma(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...x(t)})}function ha(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...x(t)})}function ga(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...x(t)})}function _a(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...x(t)})}function va(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...x(t)})}function ya(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...x(t)})}function ba(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...x(t)})}function xa(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...x(t)})}function Sa(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...x(t)})}function Ca(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...x(t)})}function wa(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...x(t)})}function Ta(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...x(t)})}function Ea(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...x(t)})}function Da(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...x(t)})}function Oa(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...x(t)})}function ka(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...x(t)})}function Aa(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...x(t)})}function ja(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...x(t)})}function Ma(e,t){return new e(ia({type:`number`,checks:[],...x(t)}))}function Na(e,t){return new e(ia({type:`number`,coerce:!0,checks:[],...x(t)}))}function Pa(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...x(t)})}function Fa(e,t){return new e({type:`boolean`,...x(t)})}function Ia(e,t){return new e({type:`undefined`,...x(t)})}function La(e,t){return new e({type:`null`,...x(t)})}function Ra(e){return new e({type:`any`})}function za(e){return new e({type:`unknown`})}function Ba(e,t){return new e({type:`never`,...x(t)})}function Va(e,t){return new Pn({check:`less_than`,...x(t),value:e,inclusive:!1})}function Ha(e,t){return new Pn({check:`less_than`,...x(t),value:e,inclusive:!0})}function Ua(e,t){return new Fn({check:`greater_than`,...x(t),value:e,inclusive:!1})}function Wa(e,t){return new Fn({check:`greater_than`,...x(t),value:e,inclusive:!0})}function Ga(e,t){return new In({check:`multiple_of`,...x(t),value:e})}function Ka(e,t){return new Rn({check:`max_length`,...x(t),maximum:e})}function qa(e,t){return new zn({check:`min_length`,...x(t),minimum:e})}function Ja(e,t){return new Bn({check:`length_equals`,...x(t),length:e})}function Ya(e,t){return new Hn({check:`string_format`,format:`regex`,...x(t),pattern:e})}function Xa(e){return new Un({check:`string_format`,format:`lowercase`,...x(e)})}function Za(e){return new Wn({check:`string_format`,format:`uppercase`,...x(e)})}function Qa(e,t){return new Gn({check:`string_format`,format:`includes`,...x(t),includes:e})}function $a(e,t){return new Kn({check:`string_format`,format:`starts_with`,...x(t),prefix:e})}function eo(e,t){return new qn({check:`string_format`,format:`ends_with`,...x(t),suffix:e})}function to(e){return new Jn({check:`overwrite`,tx:e})}function no(e){return to(t=>t.normalize(e))}function ro(){return to(e=>e.trim())}function io(){return to(e=>e.toLowerCase())}function ao(){return to(e=>e.toUpperCase())}function oo(){return to(e=>ye(e))}function so(e,t,n){return new e({type:`array`,element:t,...x(n)})}function co(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...x(n)})}function lo(e,t){let n=uo(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Ze(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Ze(r))}},e(t.value,t)),t);return n}function uo(e,t){let n=new jn({check:`custom`,...x(t)});return n._zod.check=e,n}function fo(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&de(e,t,n[t]);return e}function po(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??ra,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function mo(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function ho(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,ho(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&fo(o.schema,c),t.io===`input`&&To(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function go(e){return e.replace(/~/g,`~0`).replace(/\\//g,`~1`)}function _o(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${go(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+go(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>\n\nSet the \\`cycles\\` parameter to \\`"ref"\\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}r.count>1&&e.reused===`ref`&&a(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}function vo(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;vo(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var yo=new Set([`type`,`properties`,`required`,`additionalProperties`]),bo=[`oneOf`,`anyOf`];function xo(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function So(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!yo.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??xo(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}de(n,r,e.length===1?e[0]:So(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=xo(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function Co(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of yo)if(t in e)return;let n=t.filter(e=>bo.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=So(t);else{let e=n[0],i=bo.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>So([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,fo(e,r))}function wo(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):fo(i,s),fo(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())vo(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])Co(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}fo(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,de(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Do(t,`input`,e.processors),output:Do(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function To(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return To(r.element,n);if(r.type===`set`)return To(r.valueType,n);if(r.type===`lazy`)return To(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return To(r.innerType,n);if(r.type===`intersection`)return To(r.left,n)||To(r.right,n);if(r.type===`record`||r.type===`map`)return To(r.keyType,n)||To(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:To(r.in,n)||To(r.out,n);if(r.type===`object`){for(let e in r.shape)if(To(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(To(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(To(e,n))return!0;return!!(r.rest&&To(r.rest,n))}return!1}var Eo=(e,t={})=>n=>{let r=po({...n,processors:t});return ho(e,r),_o(r,e),wo(r,e)},Do=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=po({...i??{},target:a,io:t,processors:n});return ho(e,o),_o(o,e),wo(o,e)},w=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},Oo=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},ko=(e,t)=>{w(e,`minimum`,t),Oo(e,`maximum`,t)},Ao=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},jo=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},Mo=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},No=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},Po=(e,t)=>w(e,`minimum`,t.minimum),Fo=(e,t)=>Oo(e,`maximum`,t.maximum),Io=e=>(t,n)=>{No(t,n.format);let[r,i]=e[n.format];w(t,`minimum`,r),Oo(t,`maximum`,i)},Lo={greater_than:(e,t)=>w(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>Oo(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>Ao(e,t.value),number_format:Io(Ae),bigint_format:Io(je),min_length:Po,max_length:Fo,length_equals:(e,t)=>ko(e,t.length),min_size:Po,max_size:Fo,size_equals:(e,t)=>ko(e,t.size),string_format:(e,t)=>{No(e,t.format),t.pattern&&jo(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>Mo(e,t.mime)};function Ro(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Lo[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&w(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&w(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&Oo(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&Oo(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&Ao(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&Mo(t,i.mime);for(let e of i.patterns??[])jo(t,e);return t}var zo={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Bo=new Map([[Nr,pn],[Fr,mn]]),Vo=e=>Bo.get(e)??e,Ho=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=Ro(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=zo[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(Vo);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Uo=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=Ro(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):mo(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},Wo=(e,t,n,r)=>{n.type=`boolean`},Go=(e,t,n,r)=>{mo(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},Ko=(e,t,n,r)=>{mo(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},qo=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Jo=(e,t,n,r)=>{mo(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},Yo=(e,t,n,r)=>{mo(e,t,n,r,`Void cannot be represented in JSON Schema`)},Xo=(e,t,n,r)=>{n.not={}},Zo=(e,t,n,r)=>{},Qo=(e,t,n,r)=>{},$o=(e,t,n,r)=>{mo(e,t,n,r,`Date cannot be represented in JSON Schema`)},es=(e,t,n,r)=>{let i=e._zod.def,a=te(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},ts=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(mo(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(mo(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},ns=(e,t,n,r)=>{mo(e,t,n,r,`NaN cannot be represented in JSON Schema`)},rs=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},is=(e,t,n,r)=>{let i=n;i.type=`string`,i.format=`binary`,i.contentEncoding=`binary`;let{minimum:a,maximum:o,mime:s}=Ro(e);a!==void 0&&(i.minLength=a),o!==void 0&&(i.maxLength=o),s&&(s.length===0?i.not={}:s.length===1?i.contentMediaType=s[0]:i.anyOf=s.map(e=>({contentMediaType:e})))},as=(e,t,n,r)=>{n.type=`boolean`},os=(e,t,n,r)=>{mo(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},ss=(e,t,n,r)=>{mo(e,t,n,r,`Function types cannot be represented in JSON Schema`)},cs=(e,t,n,r)=>{mo(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},ls=(e,t,n,r)=>{mo(e,t,n,r,`Map cannot be represented in JSON Schema`)},us=(e,t,n,r)=>{mo(e,t,n,r,`Set cannot be represented in JSON Schema`)},ds=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=Ro(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=ho(a.element,t,{...r,path:[...r.path,`items`]})};function fs(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?fs(t.out):t.type===`catch`?fs(t.innerType):e._zod.optin}var ps=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&mo(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)de(i.properties,e,ho(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?fs(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=ho(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},ms=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>ho(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},hs=(e,t,n,r)=>{let i=e._zod.def,a=ho(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=ho(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},gs=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>ho(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?ho(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?fs(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=Ro(e);typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)};function _s(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=_s(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>_s(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i?(p.type=`string`,a||(p.pattern=(r.includes(`number`)?Tn:wn).source),p):p}var vs=new WeakMap;function ys(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of vs.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=_s(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var bs=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=Ro(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=ho(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)de(i.patternProperties,Vo(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=ho(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=vs.get(t);n||(n=[],vs.set(t,n),t.deferred.push(()=>ys(t))),n.push(e)}i.additionalProperties=ho(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&fs(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},xs=(e,t,n,r)=>{let i=e._zod.def,a=ho(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Ss=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Cs=Symbol();function ws(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(mo(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),Cs):JSON.parse(o)}var Ts=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=ws(i.defaultValue,e,t,n,r);o!==Cs&&(n.default=o)},Es=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=ws(i.defaultValue,e,t,n,r);o!==Cs&&(n._prefault=o)},Ds=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{mo(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},Os=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;ho(o,t,r);let s=t.seen.get(e);s.ref=o},ks=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},As=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},js=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ms=(e,t,n,r)=>{let i=e._zod.innerType;ho(i,t,r);let a=t.seen.get(e);a.ref=i},Ns={string:Ho,number:Uo,boolean:Wo,bigint:Go,symbol:Ko,null:qo,undefined:Jo,void:Yo,never:Xo,any:Zo,unknown:Qo,date:$o,enum:es,literal:ts,nan:ns,template_literal:rs,file:is,success:as,custom:os,function:ss,transform:cs,map:ls,set:us,array:ds,object:ps,union:ms,intersection:hs,tuple:gs,record:bs,nullable:xs,nonoptional:Ss,default:Ts,prefault:Es,catch:Ds,pipe:Os,readonly:ks,promise:As,optional:js,lazy:Ms};function Ps(e,t){if(`_idmap`in e){let n=e,r=po({...t,processors:Ns}),i={};for(let e of n._idmap.entries()){let[t,n]=e;ho(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;_o(r,n),de(a,t,wo(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=po({...t,processors:Ns});return ho(e,n),_o(n,e),wo(n,e)}var Fs=new WeakSet([Object.prototype,Error.prototype]);function Is(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var Ls=C(`ZodError`,(e,t)=>{Et.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);Fs.has(n)||(Fs.add(n),Is(n,`format`,e=>t=>kt(e,t)),Is(n,`flatten`,e=>t=>Ot(e,t)),Is(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,re,2)}),Is(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,re,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),Rs=jt(Ls),zs=Mt(Ls),Bs=Nt(Ls),Vs=Ft(Ls),Hs=Vt(Ls),Us=Ht(Ls),Ws=Ut(Ls),Gs=Wt(Ls),Ks=Gt(Ls),qs=Kt(Ls),Js=qt(Ls),Ys=Jt(Ls);function Xs(){vt.localeError||yt($i())}function Zs(){vt.memoizer||yt({memoizer:Xi()})}var Qs=C(`ZodType`,(e,t)=>(Xs(),Zn.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(_e(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return De(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(yl(e,t))},superRefine(e,t){return this.check(bl(e,t))},overwrite(e){return this.check(to(e))},optional(){return I(this)},exactOptional(){return el(this)},nullable(){return nl(this)},nullish(){return I(nl(this))},nonoptional(e){return cl(this,e)},array(){return k(this)},or(e){return M([this,e])},and(e){return Kc(this,e)},transform(e){return fl(this,Zc(e))},default(e){return il(this,e)},prefault(e){return ol(this,e)},catch(e){return ul(this,e)},pipe(e){return fl(this,e)},readonly(){return hl(this)},describe(e){let t=this.clone();return ra.add(t,{description:e}),t},meta(...e){if(e.length===0)return ra.get(this);let t=this.clone();return ra.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return et(this,`~standard`,{...er(this),jsonSchema:{input:Do(this,`input`),output:Do(this,`output`)}})},set"~standard"(e){$e(this,`~standard`,e)},parse:function e(t,n){return Rs(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await zs(this,t,n,{callee:e})},safeParse(e,t){return Bs(this,e,t)},async safeParseAsync(e,t){return Vs(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){$e(this,`spa`,e)},validate(e,t){return Rt(this,e,t)},validateAsync(e,t){return Bt(this,e,t)},encode:function e(t,n){return Hs(this,t,n,{callee:e})},decode:function e(t,n){return Us(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await Ws(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Gs(this,t,n,{callee:e})},safeEncode(e,t){return Ks(this,e,t)},safeDecode(e,t){return qs(this,e,t)},async safeEncodeAsync(e,t){return Js(this,e,t)},async safeDecodeAsync(e,t){return Ys(this,e,t)},toJSONSchema(e){return Eo(this,{})(e)},get description(){return ra.get(this)?.description},get _def(){return this._zod.def}}),$s=C(`_ZodString`,(e,t)=>{tr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ho(e,t,n,r)},tt({format:e=>Ro(e).format??null,minLength:e=>Ro(e).minimum??null,maxLength:e=>Ro(e).maximum??null},{regex(...e){return this.check(Ya(...e))},includes(...e){return this.check(Qa(...e))},startsWith(...e){return this.check($a(...e))},endsWith(...e){return this.check(eo(...e))},min(...e){return this.check(qa(...e))},max(...e){return this.check(Ka(...e))},length(...e){return this.check(Ja(...e))},nonempty(...e){return this.check(qa(1,...e))},lowercase(e){return this.check(Xa(e))},uppercase(e){return this.check(Za(e))},trim(){return this.check(ro())},normalize(...e){return this.check(no(...e))},toLowerCase(){return this.check(io())},toUpperCase(){return this.check(ao())},slugify(){return this.check(oo())}})),ec=C(`ZodString`,(e,t)=>{tr.init(e,t),$s.init(e,t)},{email(e){return this.check(oa(oc,e))},url(e){return this.check(fa(uc,e))},jwt(e){return this.check(Da(Ec,e))},emoji(e){return this.check(pa(fc,e))},guid(e){return this.check(sa(cc,e))},uuid(e){return this.check(ca(lc,e))},uuidv4(e){return this.check(la(lc,e))},uuidv6(e){return this.check(ua(lc,e))},uuidv7(e){return this.check(da(lc,e))},nanoid(e){return this.check(ma(pc,e))},cuid(e){return this.check(ha(mc,e))},cuid2(e){return this.check(ga(hc,e))},ulid(e){return this.check(_a(gc,e))},base64(e){return this.check(wa(Cc,e))},base64url(e){return this.check(Ta(wc,e))},xid(e){return this.check(va(_c,e))},ksuid(e){return this.check(ya(vc,e))},ipv4(e){return this.check(ba(yc,e))},ipv6(e){return this.check(xa(bc,e))},cidrv4(e){return this.check(Sa(xc,e))},cidrv6(e){return this.check(Ca(Sc,e))},e164(e){return this.check(Ea(Tc,e))},datetime(e){return this.check(Oa(nc,e))},date(e){return this.check(ka(rc,e))},time(e){return this.check(Aa(ic,e))},duration(e){return this.check(ja(ac,e))}});function T(e){return aa(ec,e)}var tc=C(`ZodStringFormat`,(e,t)=>{nr.init(e,t),$s.init(e,t)}),nc=C(`ZodISODateTime`,(e,t)=>{xr.init(e,t),tc.init(e,t)}),rc=C(`ZodISODate`,(e,t)=>{Sr.init(e,t),tc.init(e,t)}),ic=C(`ZodISOTime`,(e,t)=>{Cr.init(e,t),tc.init(e,t)}),ac=C(`ZodISODuration`,(e,t)=>{wr.init(e,t),tc.init(e,t)}),oc=C(`ZodEmail`,(e,t)=>{ar.init(e,t),tc.init(e,t)});function sc(e){return oa(oc,e)}var cc=C(`ZodGUID`,(e,t)=>{rr.init(e,t),tc.init(e,t)}),lc=C(`ZodUUID`,(e,t)=>{ir.init(e,t),tc.init(e,t)}),uc=C(`ZodURL`,(e,t)=>{pr.init(e,t),tc.init(e,t)});function dc(e){return fa(uc,e)}var fc=C(`ZodEmoji`,(e,t)=>{mr.init(e,t),tc.init(e,t)}),pc=C(`ZodNanoID`,(e,t)=>{hr.init(e,t),tc.init(e,t)}),mc=C(`ZodCUID`,(e,t)=>{gr.init(e,t),tc.init(e,t)}),hc=C(`ZodCUID2`,(e,t)=>{_r.init(e,t),tc.init(e,t)}),gc=C(`ZodULID`,(e,t)=>{vr.init(e,t),tc.init(e,t)}),_c=C(`ZodXID`,(e,t)=>{yr.init(e,t),tc.init(e,t)}),vc=C(`ZodKSUID`,(e,t)=>{br.init(e,t),tc.init(e,t)}),yc=C(`ZodIPv4`,(e,t)=>{Tr.init(e,t),tc.init(e,t)}),bc=C(`ZodIPv6`,(e,t)=>{Or.init(e,t),tc.init(e,t)}),xc=C(`ZodCIDRv4`,(e,t)=>{kr.init(e,t),tc.init(e,t)}),Sc=C(`ZodCIDRv6`,(e,t)=>{jr.init(e,t),tc.init(e,t)}),Cc=C(`ZodBase64`,(e,t)=>{Pr.init(e,t),tc.init(e,t)}),wc=C(`ZodBase64URL`,(e,t)=>{Lr.init(e,t),tc.init(e,t)}),Tc=C(`ZodE164`,(e,t)=>{Rr.init(e,t),tc.init(e,t)}),Ec=C(`ZodJWT`,(e,t)=>{Br.init(e,t),tc.init(e,t)}),Dc=C(`ZodNumber`,(e,t)=>{Vr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Uo(e,t,n,r),e.isFinite=!0},tt({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=Ro(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=Ro(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=Ro(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>Ro(e).format??null},{gt(e,t){return this.check(Ua(e,t))},gte(e,t){return this.check(Wa(e,t))},min(e,t){return this.check(Wa(e,t))},lt(e,t){return this.check(Va(e,t))},lte(e,t){return this.check(Ha(e,t))},max(e,t){return this.check(Ha(e,t))},int(e){return this.check(kc(e))},safe(e){return this.check(kc(e))},positive(e){return this.check(Ua(0,e))},nonnegative(e){return this.check(Wa(0,e))},negative(e){return this.check(Va(0,e))},nonpositive(e){return this.check(Ha(0,e))},multipleOf(e,t){return this.check(Ga(e,t))},step(e,t){return this.check(Ga(e,t))},finite(){return this}}));function E(e){return Ma(Dc,e)}var Oc=C(`ZodNumberFormat`,(e,t)=>{Hr.init(e,t),Dc.init(e,t)});function kc(e){return Pa(Oc,e)}var Ac=C(`ZodBoolean`,(e,t)=>{Ur.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wo(e,t,n,r)});function D(e){return Fa(Ac,e)}var jc=C(`ZodUndefined`,(e,t)=>{Wr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jo(e,t,n,r)});function Mc(e){return Ia(jc,e)}var Nc=C(`ZodNull`,(e,t)=>{Gr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qo(e,t,n,r)});function Pc(e){return La(Nc,e)}var Fc=C(`ZodAny`,(e,t)=>{Kr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Ic(){return Ra(Fc)}var Lc=C(`ZodUnknown`,(e,t)=>{qr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function O(){return za(Lc)}var Rc=C(`ZodNever`,(e,t)=>{Jr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xo(e,t,n,r)});function zc(e){return Ba(Rc,e)}var Bc=C(`ZodArray`,(e,t)=>{Zs(),Qr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ds(e,t,n,r),e.element=t.element},{min(e,t){return this.check(qa(e,t))},nonempty(e){return this.check(qa(1,e))},max(e,t){return this.check(Ka(e,t))},length(e,t){return this.check(Ja(e,t))},unwrap(){return this.element}});function k(e,t){return so(Bc,e,t)}var Vc=C(`ZodObject`,(e,t)=>{Zs(),ii.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ps(e,t,n,r),ct(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return P(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(_e(this._zod.def,{catchall:e}))},passthrough(){return this.clone(_e(this._zod.def,{catchall:O()}))},loose(){return this.clone(_e(this._zod.def,{catchall:O()}))},strict(){return this.clone(_e(this._zod.def,{catchall:zc()}))},strip(){return this.clone(_e(this._zod.def,{catchall:void 0}))},extend(e){return Pe(this,e)},safeExtend(e){return Ie(this,e)},merge(e){return Le(this,e)},pick(e){return Me(this,e)},omit(e){return S(this,e)},partial(...e){return Re(Qc,this,e[0])},exactPartial(...e){return Re($c,this,e[0],`exactPartial`)},required(...e){return ze(sl,this,e[0])}});function A(e,t){return new Vc({type:`object`,shape:e??{},...x(t)})}function j(e,t){return new Vc({type:`object`,shape:e,catchall:O(),...x(t)})}var Hc=C(`ZodUnion`,(e,t)=>{oi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ms(e,t,n,r),e.options=t.options});function M(e,t){return new Hc({type:`union`,options:e,...x(t)})}var Uc=C(`ZodDiscriminatedUnion`,(e,t)=>{Hc.init(e,t),ci.init(e,t)});function Wc(e,t,n){return new Uc({type:`union`,options:t,discriminator:e,...x(n)})}var Gc=C(`ZodIntersection`,(e,t)=>{li.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hs(e,t,n,r)});function Kc(e,t){return new Gc({type:`intersection`,left:e,right:t})}var qc=C(`ZodRecord`,(e,t)=>{Zs(),fi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bs(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function N(e,t,n){return!t||!t._zod?new qc({type:`record`,keyType:T(),valueType:e,...x(t)}):new qc({type:`record`,keyType:e,valueType:t,...x(n)})}var Jc=C(`ZodEnum`,(e,t)=>{pi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>es(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Jc({...t,checks:[],...x(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Jc({...t,checks:[],...x(r),entries:i})}});function P(e,t){return new Jc({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...x(t)})}var Yc=C(`ZodLiteral`,(e,t)=>{mi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ts(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function F(e,t){return new Yc({type:`literal`,values:Array.isArray(e)?e:[e],...x(t)})}var Xc=C(`ZodTransform`,(e,t)=>{Zs(),hi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cs(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new _t(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Ze(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(Ze(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Zc(e){return new Xc({type:`transform`,transform:e})}var Qc=C(`ZodOptional`,(e,t)=>{_i.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>js(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function I(e){return new Qc({type:`optional`,innerType:e})}var $c=C(`ZodExactOptional`,(e,t)=>{vi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>js(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function el(e){return new $c({type:`optional`,innerType:e})}var tl=C(`ZodNullable`,(e,t)=>{yi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function nl(e){return new tl({type:`nullable`,innerType:e})}var rl=C(`ZodDefault`,(e,t)=>{bi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ts(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function il(e,t){return new rl({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():we(t)}})}var al=C(`ZodPrefault`,(e,t)=>{Si.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Es(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ol(e,t){return new al({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():we(t)}})}var sl=C(`ZodNonOptional`,(e,t)=>{Ci.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ss(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function cl(e,t){return new sl({type:`nonoptional`,innerType:e,...x(t)})}var ll=C(`ZodCatch`,(e,t)=>{Ei.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ds(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ul(e,t){return new ll({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:ut(t)})}var dl=C(`ZodPipe`,(e,t)=>{Di.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Os(e,t,n,r),e.in=t.in,e.out=t.out});function fl(e,t){return new dl({type:`pipe`,in:e,out:t})}var pl=C(`ZodPreprocess`,(e,t)=>{dl.init(e,t),ki.init(e,t)}),ml=C(`ZodReadonly`,(e,t)=>{Ai.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ks(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function hl(e){return new ml({type:`readonly`,innerType:e})}var gl=C(`ZodLazy`,(e,t)=>{Mi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ms(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function _l(e){return new gl({type:`lazy`,getter:e})}var vl=C(`ZodCustom`,(e,t)=>{Ni.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>os(e,t,n,r)});function yl(e,t={}){return co(vl,e,t)}function bl(e,t){return lo(e,t)}function xl(e,t){return new pl({type:`pipe`,in:Zc(e),out:t})}var Sl={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},Cl;Cl||={};function wl(e){return Oa(nc,e)}function Tl(e){return ka(rc,e)}function El(e){return Na(Dc,e)}var Dl=[`2025-11-25`,`2025-06-18`,`2025-03-26`,`2024-11-05`,`2024-10-07`],Ol=`io.modelcontextprotocol/related-task`,kl=`io.modelcontextprotocol/protocolVersion`,Al=`io.modelcontextprotocol/clientInfo`,jl=`io.modelcontextprotocol/serverInfo`,Ml=`io.modelcontextprotocol/clientCapabilities`,Nl=`io.modelcontextprotocol/subscriptionId`,Pl=`io.modelcontextprotocol/logLevel`,Fl=_l(()=>M([T(),E(),D(),Pc(),N(T(),Fl),k(Fl)])),Il=N(T(),Fl),Ll=k(Fl),Rl=M([T(),E().int()]),zl=T(),Bl=A({ttl:E().optional()}),Vl=A({taskId:T()}),Hl=j({progressToken:Rl.optional(),[Ol]:Vl.optional()}),Ul=A({_meta:Hl.optional()}),Wl=Ul.extend({task:Bl.optional()}),Gl=A({method:T(),params:Ul.loose().optional()}),Kl=A({_meta:Hl.optional()}),ql=A({method:T(),params:Kl.loose().optional()}),Jl=j({get[jl](){return cu.optional().catch(void 0)}}),L=j({_meta:Jl.optional()}),Yl=M([T(),E().int()]),Xl=A({jsonrpc:F(`2.0`),id:Yl,...Gl.shape}).strict(),Zl=A({jsonrpc:F(`2.0`),...ql.shape}).strict(),Ql=A({jsonrpc:F(`2.0`),id:Yl,result:L}).strict(),$l=A({jsonrpc:F(`2.0`),id:Yl.optional(),error:A({code:E().int(),message:T(),data:O().optional()})}).strict(),eu=M([Xl,Zl,Ql,$l]),tu=M([Ql,$l]),nu=L.strict(),ru=Kl.extend({requestId:Yl.optional(),reason:T().optional()}),iu=ql.extend({method:F(`notifications/cancelled`),params:ru}),au=A({src:T(),mimeType:T().optional(),sizes:k(T()).optional(),theme:P([`light`,`dark`]).optional()}),ou=A({icons:k(au).optional()}),su=A({name:T(),title:T().optional()}),cu=su.extend({...su.shape,...ou.shape,version:T(),websiteUrl:T().optional(),description:T().optional()}),lu=xl(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Kc(A({form:Kc(A({applyDefaults:D().optional()}),Il).optional(),url:Il.optional()}),Il.optional())),uu=j({list:Il.optional(),cancel:Il.optional(),requests:j({sampling:j({createMessage:Il.optional()}).optional(),elicitation:j({create:Il.optional()}).optional()}).optional()}),du=j({list:Il.optional(),cancel:Il.optional(),requests:j({tools:j({call:Il.optional()}).optional()}).optional()}),fu=A({experimental:N(T(),Il).optional(),sampling:A({context:Il.optional(),tools:Il.optional()}).optional(),elicitation:lu.optional(),roots:A({listChanged:D().optional()}).optional(),tasks:uu.optional(),extensions:N(T(),Il).optional()}),pu=Ul.extend({protocolVersion:T(),capabilities:fu,clientInfo:cu}),mu=Gl.extend({method:F(`initialize`),params:pu}),hu=A({experimental:N(T(),Il).optional(),logging:Il.optional(),completions:Il.optional(),prompts:A({listChanged:D().optional()}).optional(),resources:A({subscribe:D().optional(),listChanged:D().optional()}).optional(),tools:A({listChanged:D().optional()}).optional(),tasks:du.optional(),extensions:N(T(),Il).optional()}),gu=L.extend({protocolVersion:T(),capabilities:hu,serverInfo:cu,instructions:T().optional()}),_u=ql.extend({method:F(`notifications/initialized`),params:Kl.optional()}),vu=Gl.extend({method:F(`server/discover`),params:Ul.optional()}),yu=L.extend({supportedVersions:k(T()),capabilities:hu,instructions:T().optional()}),bu=Gl.extend({method:F(`ping`),params:Ul.optional()}),xu=A({progress:E(),total:I(E()),message:I(T())}),Su=A({...Kl.shape,...xu.shape,progressToken:Rl}),Cu=ql.extend({method:F(`notifications/progress`),params:Su}),wu=Ul.extend({cursor:zl.optional()}),Tu=Gl.extend({params:wu.optional()}),Eu=L.extend({nextCursor:zl.optional()}),Du=A({uri:T(),mimeType:I(T()),_meta:N(T(),O()).optional()}),Ou=Du.extend({text:T()}),ku=T().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),Au=Du.extend({blob:ku}),ju=P([`user`,`assistant`]),Mu=A({audience:k(ju).optional(),priority:E().min(0).max(1).optional(),lastModified:wl({offset:!0}).optional()}),Nu=A({...su.shape,...ou.shape,uri:T(),description:I(T()),mimeType:I(T()),size:I(E()),annotations:Mu.optional(),_meta:I(j({}))}),Pu=A({...su.shape,...ou.shape,uriTemplate:T(),description:I(T()),mimeType:I(T()),annotations:Mu.optional(),_meta:I(j({}))}),Fu=Tu.extend({method:F(`resources/list`)}),Iu=Eu.extend({resources:k(Nu)}),Lu=Tu.extend({method:F(`resources/templates/list`)}),Ru=Eu.extend({resourceTemplates:k(Pu)}),zu=Ul.extend({uri:T()}),Bu=zu,Vu=Gl.extend({method:F(`resources/read`),params:Bu}),Hu=L.extend({contents:k(M([Ou,Au]))}),Uu=ql.extend({method:F(`notifications/resources/list_changed`),params:Kl.optional()}),Wu=zu,Gu=Gl.extend({method:F(`resources/subscribe`),params:Wu}),Ku=zu,qu=Gl.extend({method:F(`resources/unsubscribe`),params:Ku}),Ju=A({toolsListChanged:D().optional(),promptsListChanged:D().optional(),resourcesListChanged:D().optional(),resourceSubscriptions:k(T()).optional()}),Yu=Ul.extend({notifications:Ju}),Xu=Gl.extend({method:F(`subscriptions/listen`),params:Yu}),Zu=Kl.extend({notifications:Ju}),Qu=ql.extend({method:F(`notifications/subscriptions/acknowledged`),params:Zu}),$u=Jl.extend({[Nl]:Yl}),ed=L.extend({_meta:$u}),td=Kl.extend({uri:T()}),nd=ql.extend({method:F(`notifications/resources/updated`),params:td}),rd=A({name:T(),description:I(T()),required:I(D())}),id=A({...su.shape,...ou.shape,description:I(T()),arguments:I(k(rd)),_meta:I(j({}))}),ad=Tu.extend({method:F(`prompts/list`)}),od=Eu.extend({prompts:k(id)}),sd=Ul.extend({name:T(),arguments:N(T(),T()).optional()}),cd=Gl.extend({method:F(`prompts/get`),params:sd}),ld=A({type:F(`text`),text:T(),annotations:Mu.optional(),_meta:N(T(),O()).optional()}),ud=A({type:F(`image`),data:ku,mimeType:T(),annotations:Mu.optional(),_meta:N(T(),O()).optional()}),dd=A({type:F(`audio`),data:ku,mimeType:T(),annotations:Mu.optional(),_meta:N(T(),O()).optional()}),fd=A({type:F(`tool_use`),name:T(),id:T(),input:N(T(),O()),_meta:N(T(),O()).optional()}),pd=A({type:F(`resource`),resource:M([Ou,Au]),annotations:Mu.optional(),_meta:N(T(),O()).optional()}),md=Nu.extend({type:F(`resource_link`)}),hd=M([ld,ud,dd,md,pd]),gd=A({role:ju,content:hd}),_d=L.extend({description:T().optional(),messages:k(gd)}),vd=ql.extend({method:F(`notifications/prompts/list_changed`),params:Kl.optional()}),yd=A({title:T().optional(),readOnlyHint:D().optional(),destructiveHint:D().optional(),idempotentHint:D().optional(),openWorldHint:D().optional()}),bd=A({taskSupport:P([`required`,`optional`,`forbidden`]).optional()}),xd=A({...su.shape,...ou.shape,description:T().optional(),inputSchema:A({type:F(`object`),properties:N(T(),Fl).optional(),required:k(T()).optional()}).catchall(O()),outputSchema:j({$schema:T().optional()}).optional(),annotations:yd.optional(),execution:bd.optional(),_meta:N(T(),O()).optional()}),Sd=Tu.extend({method:F(`tools/list`)}),Cd=Eu.extend({tools:k(xd)}),wd=L.extend({content:k(hd).default([]),structuredContent:O().optional(),isError:D().optional()}),Td=wd.or(L.extend({toolResult:O()})),Ed=Wl.extend({name:T(),arguments:N(T(),O()).optional()}),Dd=Gl.extend({method:F(`tools/call`),params:Ed}),Od=ql.extend({method:F(`notifications/tools/list_changed`),params:Kl.optional()}),kd=A({autoRefresh:D().default(!0),debounceMs:E().int().nonnegative().default(300)}),Ad=P([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),jd=Ul.extend({level:Ad}),Md=Gl.extend({method:F(`logging/setLevel`),params:jd}),Nd=Kl.extend({level:Ad,logger:T().optional(),data:O()}),Pd=ql.extend({method:F(`notifications/message`),params:Nd}),Fd=A({name:T().optional()}),Id=A({hints:k(Fd).optional(),costPriority:E().min(0).max(1).optional(),speedPriority:E().min(0).max(1).optional(),intelligencePriority:E().min(0).max(1).optional()}),Ld=A({mode:P([`auto`,`required`,`none`]).optional()}),Rd=A({type:F(`tool_result`),toolUseId:T().describe(`The unique identifier for the corresponding tool call.`),content:k(hd),structuredContent:O().optional(),isError:D().optional(),_meta:N(T(),O()).optional()}),zd=Wc(`type`,[ld,ud,dd]),Bd=Wc(`type`,[ld,ud,dd,fd,Rd]),Vd=A({role:ju,content:M([Bd,k(Bd)]),_meta:N(T(),O()).optional()}),Hd=Wl.extend({messages:k(Vd),modelPreferences:Id.optional(),systemPrompt:T().optional(),includeContext:P([`none`,`thisServer`,`allServers`]).optional(),temperature:E().optional(),maxTokens:E().int(),stopSequences:k(T()).optional(),metadata:Il.optional(),tools:k(xd).optional(),toolChoice:Ld.optional()}),Ud=Gl.extend({method:F(`sampling/createMessage`),params:Hd}),Wd=L.extend({model:T(),stopReason:I(P([`endTurn`,`stopSequence`,`maxTokens`]).or(T())),role:ju,content:zd}),Gd=L.extend({model:T(),stopReason:I(P([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(T())),role:ju,content:M([Bd,k(Bd)])}),Kd=A({type:F(`boolean`),title:T().optional(),description:T().optional(),default:D().optional()}),qd=A({type:F(`string`),title:T().optional(),description:T().optional(),minLength:E().optional(),maxLength:E().optional(),format:P([`email`,`uri`,`date`,`date-time`]).optional(),default:T().optional()}),Jd=A({type:P([`number`,`integer`]),title:T().optional(),description:T().optional(),minimum:E().optional(),maximum:E().optional(),default:E().optional()}),Yd=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),default:T().optional()}),Xd=A({type:F(`string`),title:T().optional(),description:T().optional(),oneOf:k(A({const:T(),title:T()})),default:T().optional()}),Zd=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),enumNames:k(T()).optional(),default:T().optional()}),Qd=M([Yd,Xd]),$d=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({type:F(`string`),enum:k(T())}),default:k(T()).optional()}),ef=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({anyOf:k(A({const:T(),title:T()}))}),default:k(T()).optional()}),tf=M([$d,ef]),nf=M([Zd,Qd,tf]),rf=M([nf,Kd,qd,Jd]),af=Wl.extend({mode:F(`form`).optional(),message:T(),requestedSchema:A({type:F(`object`),properties:N(T(),rf),required:k(T()).optional()}).catchall(O())}),of=Wl.extend({mode:F(`url`),message:T(),elicitationId:T(),url:T().url()}),sf=M([af,of]),cf=Gl.extend({method:F(`elicitation/create`),params:sf}),lf=Kl.extend({elicitationId:T()}),uf=ql.extend({method:F(`notifications/elicitation/complete`),params:lf}),df=L.extend({action:P([`accept`,`decline`,`cancel`]),content:xl(e=>e===null?void 0:e,N(T(),M([T(),E(),D(),k(T())])).optional())}),ff=A({type:F(`ref/resource`),uri:T()}),pf=A({type:F(`ref/prompt`),name:T()}),mf=Ul.extend({ref:M([pf,ff]),argument:A({name:T(),value:T()}),context:A({arguments:N(T(),T()).optional()}).optional()}),hf=Gl.extend({method:F(`completion/complete`),params:mf}),gf=L.extend({completion:j({values:k(T()).max(100),total:I(E().int()),hasMore:I(D())})}),_f=A({uri:T().startsWith(`file://`),name:T().optional(),_meta:N(T(),O()).optional()}),vf=Gl.extend({method:F(`roots/list`),params:Ul.optional()}),yf=L.extend({roots:k(_f)}),bf=ql.extend({method:F(`notifications/roots/list_changed`),params:Kl.optional()}),xf=j({ttl:E().optional(),pollInterval:E().optional()}),Sf=P([`working`,`input_required`,`completed`,`failed`,`cancelled`]),Cf=A({taskId:T(),status:Sf,ttl:M([E(),Pc()]),createdAt:T(),lastUpdatedAt:T(),pollInterval:I(E()),statusMessage:I(T())}),wf=L.extend({task:Cf}),Tf=Kl.merge(Cf),Ef=ql.extend({method:F(`notifications/tasks/status`),params:Tf}),Df=Gl.extend({method:F(`tasks/get`),params:Ul.extend({taskId:T()})}),Of=L.merge(Cf),kf=Gl.extend({method:F(`tasks/result`),params:Ul.extend({taskId:T()})}),Af=L.loose(),jf=Tu.extend({method:F(`tasks/list`)}),Mf=Eu.extend({tasks:k(Cf)}),Nf=Gl.extend({method:F(`tasks/cancel`),params:Ul.extend({taskId:T()})}),Pf=L.merge(Cf),Ff=M([bu,mu,vu,hf,Md,cd,ad,Fu,Lu,Vu,Gu,qu,Xu,Dd,Sd]),If=M([iu,Cu,_u,bf]),Lf=M([nu,Wd,Gd,df,yf]),Rf=M([bu,Ud,cf,vf]),zf=M([iu,Cu,Pd,nd,Uu,Od,vd,Qu,uf]),Bf=M([nu,gu,yu,gf,_d,od,Iu,Ru,Hu,wd,Cd,ed]),Vf=dc().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:Sl.custom,message:`URL must be parseable`,fatal:!0}),ft}).refine(e=>{let t=new URL(e);return t.protocol!==`javascript:`&&t.protocol!==`data:`&&t.protocol!==`vbscript:`},{message:`URL cannot use javascript:, data:, or vbscript: scheme`}),Hf=j({resource:T().url(),authorization_servers:k(Vf).optional(),jwks_uri:T().url().optional(),scopes_supported:k(T()).optional(),bearer_methods_supported:k(T()).optional(),resource_signing_alg_values_supported:k(T()).optional(),resource_name:T().optional(),resource_documentation:T().optional(),resource_policy_uri:T().url().optional(),resource_tos_uri:T().url().optional(),tls_client_certificate_bound_access_tokens:D().optional(),authorization_details_types_supported:k(T()).optional(),dpop_signing_alg_values_supported:k(T()).optional(),dpop_bound_access_tokens_required:D().optional()}),Uf=j({issuer:T(),authorization_endpoint:Vf,token_endpoint:Vf,registration_endpoint:Vf.optional(),scopes_supported:k(T()).optional(),response_types_supported:k(T()),response_modes_supported:k(T()).optional(),grant_types_supported:k(T()).optional(),token_endpoint_auth_methods_supported:k(T()).optional(),token_endpoint_auth_signing_alg_values_supported:k(T()).optional(),service_documentation:Vf.optional(),revocation_endpoint:Vf.optional(),revocation_endpoint_auth_methods_supported:k(T()).optional(),revocation_endpoint_auth_signing_alg_values_supported:k(T()).optional(),introspection_endpoint:T().optional(),introspection_endpoint_auth_methods_supported:k(T()).optional(),introspection_endpoint_auth_signing_alg_values_supported:k(T()).optional(),code_challenge_methods_supported:k(T()).optional(),client_id_metadata_document_supported:D().optional(),authorization_response_iss_parameter_supported:D().optional().catch(void 0),dpop_signing_alg_values_supported:k(T()).optional()}),Wf=j({issuer:T(),authorization_endpoint:Vf,token_endpoint:Vf,userinfo_endpoint:Vf.optional(),jwks_uri:Vf,registration_endpoint:Vf.optional(),scopes_supported:k(T()).optional(),response_types_supported:k(T()),response_modes_supported:k(T()).optional(),grant_types_supported:k(T()).optional(),acr_values_supported:k(T()).optional(),subject_types_supported:k(T()),id_token_signing_alg_values_supported:k(T()),id_token_encryption_alg_values_supported:k(T()).optional(),id_token_encryption_enc_values_supported:k(T()).optional(),userinfo_signing_alg_values_supported:k(T()).optional(),userinfo_encryption_alg_values_supported:k(T()).optional(),userinfo_encryption_enc_values_supported:k(T()).optional(),request_object_signing_alg_values_supported:k(T()).optional(),request_object_encryption_alg_values_supported:k(T()).optional(),request_object_encryption_enc_values_supported:k(T()).optional(),token_endpoint_auth_methods_supported:k(T()).optional(),token_endpoint_auth_signing_alg_values_supported:k(T()).optional(),display_values_supported:k(T()).optional(),claim_types_supported:k(T()).optional(),claims_supported:k(T()).optional(),service_documentation:T().optional(),claims_locales_supported:k(T()).optional(),ui_locales_supported:k(T()).optional(),claims_parameter_supported:D().optional(),request_parameter_supported:D().optional(),request_uri_parameter_supported:D().optional(),require_request_uri_registration:D().optional(),op_policy_uri:Vf.optional(),op_tos_uri:Vf.optional(),client_id_metadata_document_supported:D().optional(),authorization_response_iss_parameter_supported:D().optional().catch(void 0)}),Gf=A({...Wf.shape,...Uf.pick({code_challenge_methods_supported:!0}).shape}),Kf=A({access_token:T(),id_token:T().optional(),token_type:T(),expires_in:El().optional(),scope:T().optional(),refresh_token:T().optional(),issuer:T().optional().catch(void 0)}).strip(),qf=A({issued_token_type:F(`urn:ietf:params:oauth:token-type:id-jag`),access_token:T(),token_type:T().optional(),expires_in:E().optional(),scope:T().optional()}).strip(),Jf=A({error:T(),error_description:T().optional(),error_uri:T().optional()}),Yf=Vf.optional().or(F(``).transform(()=>void 0)),Xf=A({redirect_uris:k(Vf),token_endpoint_auth_method:T().optional(),grant_types:k(T()).optional(),response_types:k(T()).optional(),application_type:T().optional(),client_name:T().optional(),client_uri:Vf.optional(),logo_uri:Yf,scope:T().optional(),contacts:k(T()).optional(),tos_uri:Yf,policy_uri:T().optional(),jwks_uri:Vf.optional(),jwks:Ic().optional(),software_id:T().optional(),software_version:T().optional(),software_statement:T().optional()}).strip(),Zf=A({client_id:T(),client_secret:T().optional(),client_id_issued_at:E().optional(),client_secret_expires_at:E().optional(),issuer:T().optional().catch(void 0)}).strip(),Qf=Xf.merge(Zf),$f=A({error:T(),error_description:T().optional()}).strip(),ep=A({token:T(),token_type_hint:T().optional()}).strip(),tp=Symbol.for(`mcp.sdk.errorBrands`);function np(e,t){let n=new Set,r=t;for(;typeof r==`function`;){let e=r.mcpBrand;Object.prototype.hasOwnProperty.call(r,`mcpBrand`)&&typeof e==`string`&&n.add(e),r=Object.getPrototypeOf(r)}n.size!==0&&Object.defineProperty(e,tp,{value:n,enumerable:!1,configurable:!0})}function rp(e,t){try{if(typeof t==`object`&&t&&Object.prototype.hasOwnProperty.call(e,`mcpBrand`)&&typeof e.mcpBrand==`string`&&Object.prototype.hasOwnProperty.call(t,tp)){let n=t[tp];if(n&&typeof n.has==`function`&&n.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}(class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e,t,n){super(t),this.code=e,this.errorUri=n,this.name=`OAuthError`,np(this,new.target)}toResponseObject(){let e={error:this.code,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}});var R=function(e){return e.NotConnected=`NOT_CONNECTED`,e.AlreadyConnected=`ALREADY_CONNECTED`,e.NotInitialized=`NOT_INITIALIZED`,e.CapabilityNotSupported=`CAPABILITY_NOT_SUPPORTED`,e.RequestTimeout=`REQUEST_TIMEOUT`,e.ConnectionClosed=`CONNECTION_CLOSED`,e.SendFailed=`SEND_FAILED`,e.InvalidResult=`INVALID_RESULT`,e.UnsupportedResultType=`UNSUPPORTED_RESULT_TYPE`,e.InputRequiredRoundsExceeded=`INPUT_REQUIRED_ROUNDS_EXCEEDED`,e.ListPaginationExceeded=`LIST_PAGINATION_EXCEEDED`,e.MethodNotSupportedByProtocolVersion=`METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION`,e.EraNegotiationFailed=`ERA_NEGOTIATION_FAILED`,e.ClientHttpNotImplemented=`CLIENT_HTTP_NOT_IMPLEMENTED`,e.ClientHttpAuthentication=`CLIENT_HTTP_AUTHENTICATION`,e.ClientHttpForbidden=`CLIENT_HTTP_FORBIDDEN`,e.ClientHttpUnexpectedContent=`CLIENT_HTTP_UNEXPECTED_CONTENT`,e.ClientHttpFailedToOpenStream=`CLIENT_HTTP_FAILED_TO_OPEN_STREAM`,e.ClientHttpFailedToTerminateSession=`CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION`,e}({}),z=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e,t,n,r){super(t,r),this.code=e,this.data=n,this.name=`SdkError`,np(this,new.target)}},ip=class extends z{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkHttpError`})}constructor(e,t,n,r){super(e,t,n,r),this.name=`SdkHttpError`}get status(){return this.data.status}get statusText(){return this.data.statusText}},ap=`2026-07-28`,op=[ap];function sp(e){return e>=ap}function cp(e){return e.filter(e=>!sp(e))}function lp(e){return e.filter(e=>sp(e))}function up(e){let t=e.structuredContent;return t===void 0||!(typeof t!=`object`||!t||Array.isArray(t))||(e.content?.some(e=>e.type===`text`)??!1)?e:{...e,content:[...e.content??[],{type:`text`,text:JSON.stringify(t)}]}}var dp=[`task`,`inputRequests`,`requestState`];function fp(e){return typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0||dp.some(t=>t in e)?e:{...e,content:[]}}function pp(){let e=_l(()=>M([T(),E(),D(),Pc(),N(T(),e),k(e)])),t=N(T(),e),n=M([T(),E().int()]),r=T(),i=A({ttl:E().optional()}),a=A({taskId:T()}),o=j({progressToken:n.optional(),"io.modelcontextprotocol/related-task":a.optional()}),s=A({_meta:o.optional()}),c=s.extend({task:i.optional()}),l=A({method:T(),params:s.loose().optional()}),u=A({_meta:o.optional()}),d=A({method:T(),params:u.loose().optional()}),f=j({_meta:o.optional()}),p=M([T(),E().int()]),m=f.strict(),h=u.extend({requestId:p.optional(),reason:T().optional()}),g=d.extend({method:F(`notifications/cancelled`),params:h}),_=A({src:T(),mimeType:T().optional(),sizes:k(T()).optional(),theme:P([`light`,`dark`]).optional()}),v=A({icons:k(_).optional()}),y=A({name:T(),title:T().optional()}),ee=y.extend({...y.shape,...v.shape,version:T(),websiteUrl:T().optional(),description:T().optional()}),te=xl(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Kc(A({form:Kc(A({applyDefaults:D().optional()}),t).optional(),url:t.optional()}),t.optional())),ne=j({list:t.optional(),cancel:t.optional(),requests:j({sampling:j({createMessage:t.optional()}).optional(),elicitation:j({create:t.optional()}).optional()}).optional()}),re=j({list:t.optional(),cancel:t.optional(),requests:j({tools:j({call:t.optional()}).optional()}).optional()}),ie=A({experimental:N(T(),t).optional(),sampling:A({context:t.optional(),tools:t.optional()}).optional(),elicitation:te.optional(),roots:A({listChanged:D().optional()}).optional(),tasks:ne.optional(),extensions:N(T(),t).optional()}),ae=s.extend({protocolVersion:T(),capabilities:ie,clientInfo:ee}),oe=l.extend({method:F(`initialize`),params:ae}),se=A({experimental:N(T(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:A({listChanged:D().optional()}).optional(),resources:A({subscribe:D().optional(),listChanged:D().optional()}).optional(),tools:A({listChanged:D().optional()}).optional(),tasks:re.optional(),extensions:N(T(),t).optional()}),ce=f.extend({protocolVersion:T(),capabilities:se,serverInfo:ee,instructions:T().optional()}),le=d.extend({method:F(`notifications/initialized`),params:u.optional()}),ue=l.extend({method:F(`ping`),params:s.optional()}),de=A({progress:E(),total:I(E()),message:I(T())}),fe=A({...u.shape,...de.shape,progressToken:n}),pe=d.extend({method:F(`notifications/progress`),params:fe}),b=s.extend({cursor:r.optional()}),me=l.extend({params:b.optional()}),he=f.extend({nextCursor:r.optional()}),ge=A({uri:T(),mimeType:I(T()),_meta:N(T(),O()).optional()}),_e=ge.extend({text:T()}),ve=T().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),ye=ge.extend({blob:ve}),be=P([`user`,`assistant`]),xe=A({audience:k(be).optional(),priority:E().min(0).max(1).optional(),lastModified:wl({offset:!0}).optional()}),Se=A({...y.shape,...v.shape,uri:T(),description:I(T()),mimeType:I(T()),size:I(E()),annotations:xe.optional(),_meta:I(j({}))}),Ce=A({...y.shape,...v.shape,uriTemplate:T(),description:I(T()),mimeType:I(T()),annotations:xe.optional(),_meta:I(j({}))}),we=me.extend({method:F(`resources/list`)}),Te=he.extend({resources:k(Se)}),Ee=me.extend({method:F(`resources/templates/list`)}),De=he.extend({resourceTemplates:k(Ce)}),x=s.extend({uri:T()}),Oe=x,ke=l.extend({method:F(`resources/read`),params:Oe}),Ae=f.extend({contents:k(M([_e,ye]))}),je=d.extend({method:F(`notifications/resources/list_changed`),params:u.optional()}),Me=x,Ne=l.extend({method:F(`resources/subscribe`),params:Me}),S=x,Pe=l.extend({method:F(`resources/unsubscribe`),params:S}),Fe=u.extend({uri:T()}),Ie=d.extend({method:F(`notifications/resources/updated`),params:Fe}),Le=A({name:T(),description:I(T()),required:I(D())}),Re=A({...y.shape,...v.shape,description:I(T()),arguments:I(k(Le)),_meta:I(j({}))}),ze=me.extend({method:F(`prompts/list`)}),Be=he.extend({prompts:k(Re)}),Ve=s.extend({name:T(),arguments:N(T(),T()).optional()}),He=l.extend({method:F(`prompts/get`),params:Ve}),Ue=A({type:F(`text`),text:T(),annotations:xe.optional(),_meta:N(T(),O()).optional()}),We=A({type:F(`image`),data:ve,mimeType:T(),annotations:xe.optional(),_meta:N(T(),O()).optional()}),Ge=A({type:F(`audio`),data:ve,mimeType:T(),annotations:xe.optional(),_meta:N(T(),O()).optional()}),Ke=A({type:F(`tool_use`),name:T(),id:T(),input:N(T(),O()),_meta:N(T(),O()).optional()}),qe=A({type:F(`resource`),resource:M([_e,ye]),annotations:xe.optional(),_meta:N(T(),O()).optional()}),Je=Se.extend({type:F(`resource_link`)}),Ye=M([Ue,We,Ge,Je,qe]),Xe=A({role:be,content:Ye}),Ze=f.extend({description:T().optional(),messages:k(Xe)}),Qe=d.extend({method:F(`notifications/prompts/list_changed`),params:u.optional()}),$e=A({title:T().optional(),readOnlyHint:D().optional(),destructiveHint:D().optional(),idempotentHint:D().optional(),openWorldHint:D().optional()}),et=A({taskSupport:P([`required`,`optional`,`forbidden`]).optional()}),tt=A({...y.shape,...v.shape,description:T().optional(),inputSchema:A({type:F(`object`),properties:N(T(),e).optional(),required:k(T()).optional()}).catchall(O()),outputSchema:A({type:F(`object`),properties:N(T(),e).optional(),required:k(T()).optional()}).catchall(O()).optional(),annotations:$e.optional(),execution:et.optional(),_meta:N(T(),O()).optional()}),nt=me.extend({method:F(`tools/list`)}),rt=he.extend({tools:k(tt)}),it=f.extend({content:k(Ye),structuredContent:N(T(),O()).optional(),isError:D().optional()}),at=c.extend({name:T(),arguments:N(T(),O()).optional()}),ot=l.extend({method:F(`tools/call`),params:at}),st=d.extend({method:F(`notifications/tools/list_changed`),params:u.optional()}),ct=P([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),lt=s.extend({level:ct}),ut=l.extend({method:F(`logging/setLevel`),params:lt}),dt=u.extend({level:ct,logger:T().optional(),data:O()}),ft=d.extend({method:F(`notifications/message`),params:dt}),pt=A({name:T().optional()}),mt=A({hints:k(pt).optional(),costPriority:E().min(0).max(1).optional(),speedPriority:E().min(0).max(1).optional(),intelligencePriority:E().min(0).max(1).optional()}),ht=A({mode:P([`auto`,`required`,`none`]).optional()}),C=A({type:F(`tool_result`),toolUseId:T().describe(`The unique identifier for the corresponding tool call.`),content:k(Ye),structuredContent:A({}).loose().optional(),isError:D().optional(),_meta:N(T(),O()).optional()}),gt=Wc(`type`,[Ue,We,Ge]),_t=Wc(`type`,[Ue,We,Ge,Ke,C]),vt=A({role:be,content:M([_t,k(_t)]),_meta:N(T(),O()).optional()}),yt=c.extend({messages:k(vt),modelPreferences:mt.optional(),systemPrompt:T().optional(),includeContext:P([`none`,`thisServer`,`allServers`]).optional(),temperature:E().optional(),maxTokens:E().int(),stopSequences:k(T()).optional(),metadata:t.optional(),tools:k(tt).optional(),toolChoice:ht.optional()}),bt=l.extend({method:F(`sampling/createMessage`),params:yt}),xt=f.extend({model:T(),stopReason:I(P([`endTurn`,`stopSequence`,`maxTokens`]).or(T())),role:be,content:gt}),St=f.extend({model:T(),stopReason:I(P([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(T())),role:be,content:M([_t,k(_t)])}),Ct=A({type:F(`boolean`),title:T().optional(),description:T().optional(),default:D().optional()}),wt=A({type:F(`string`),title:T().optional(),description:T().optional(),minLength:E().optional(),maxLength:E().optional(),format:P([`email`,`uri`,`date`,`date-time`]).optional(),default:T().optional()}),Tt=A({type:P([`number`,`integer`]),title:T().optional(),description:T().optional(),minimum:E().optional(),maximum:E().optional(),default:E().optional()}),Et=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),default:T().optional()}),Dt=A({type:F(`string`),title:T().optional(),description:T().optional(),oneOf:k(A({const:T(),title:T()})),default:T().optional()}),Ot=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),enumNames:k(T()).optional(),default:T().optional()}),kt=M([Et,Dt]),At=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({type:F(`string`),enum:k(T())}),default:k(T()).optional()}),jt=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({anyOf:k(A({const:T(),title:T()}))}),default:k(T()).optional()}),Mt=M([At,jt]),Nt=M([Ot,kt,Mt]),Pt=M([Nt,Ct,wt,Tt]),Ft=c.extend({mode:F(`form`).optional(),message:T(),requestedSchema:A({type:F(`object`),properties:N(T(),Pt),required:k(T()).optional()}).catchall(O())}),It=c.extend({mode:F(`url`),message:T(),elicitationId:T(),url:T().url()}),Lt=M([Ft,It]),Rt=l.extend({method:F(`elicitation/create`),params:Lt}),zt=u.extend({elicitationId:T()}),Bt=d.extend({method:F(`notifications/elicitation/complete`),params:zt}),Vt=f.extend({action:P([`accept`,`decline`,`cancel`]),content:xl(e=>e===null?void 0:e,N(T(),M([T(),E(),D(),k(T())])).optional())}),Ht=A({type:F(`ref/resource`),uri:T()}),Ut=A({type:F(`ref/prompt`),name:T()}),Wt=s.extend({ref:M([Ut,Ht]),argument:A({name:T(),value:T()}),context:A({arguments:N(T(),T()).optional()}).optional()}),Gt=l.extend({method:F(`completion/complete`),params:Wt}),Kt=f.extend({completion:j({values:k(T()).max(100),total:I(E().int()),hasMore:I(D())})}),qt=A({uri:T().startsWith(`file://`),name:T().optional(),_meta:N(T(),O()).optional()}),Jt=l.extend({method:F(`roots/list`),params:s.optional()}),Yt=f.extend({roots:k(qt)}),Xt=d.extend({method:F(`notifications/roots/list_changed`),params:u.optional()}),Zt=j({ttl:E().optional(),pollInterval:E().optional()}),Qt=P([`working`,`input_required`,`completed`,`failed`,`cancelled`]),$t=A({taskId:T(),status:Qt,ttl:M([E(),Pc()]),createdAt:T(),lastUpdatedAt:T(),pollInterval:I(E()),statusMessage:I(T())}),en=f.extend({task:$t}),tn=u.merge($t),nn=d.extend({method:F(`notifications/tasks/status`),params:tn}),rn=l.extend({method:F(`tasks/get`),params:s.extend({taskId:T()})}),an=f.merge($t),on=l.extend({method:F(`tasks/result`),params:s.extend({taskId:T()})}),sn=f.loose(),cn=me.extend({method:F(`tasks/list`)}),ln=he.extend({tasks:k($t)}),un=l.extend({method:F(`tasks/cancel`),params:s.extend({taskId:T()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,TaskMetadataSchema:i,RelatedTaskMetadataSchema:a,RequestMetaSchema:o,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:u,NotificationSchema:d,ResultSchema:f,RequestIdSchema:p,EmptyResultSchema:m,CancelledNotificationParamsSchema:h,CancelledNotificationSchema:g,IconSchema:_,IconsSchema:v,BaseMetadataSchema:y,ImplementationSchema:ee,ClientTasksCapabilitySchema:ne,ServerTasksCapabilitySchema:re,ClientCapabilitiesSchema:ie,InitializeRequestParamsSchema:ae,InitializeRequestSchema:oe,ServerCapabilitiesSchema:se,InitializeResultSchema:ce,InitializedNotificationSchema:le,PingRequestSchema:ue,ProgressSchema:de,ProgressNotificationParamsSchema:fe,ProgressNotificationSchema:pe,PaginatedRequestParamsSchema:b,PaginatedRequestSchema:me,PaginatedResultSchema:he,ResourceContentsSchema:ge,TextResourceContentsSchema:_e,BlobResourceContentsSchema:ye,RoleSchema:be,AnnotationsSchema:xe,ResourceSchema:Se,ResourceTemplateSchema:Ce,ListResourcesRequestSchema:we,ListResourcesResultSchema:Te,ListResourceTemplatesRequestSchema:Ee,ListResourceTemplatesResultSchema:De,ResourceRequestParamsSchema:x,ReadResourceRequestParamsSchema:Oe,ReadResourceRequestSchema:ke,ReadResourceResultSchema:Ae,ResourceListChangedNotificationSchema:je,SubscribeRequestParamsSchema:Me,SubscribeRequestSchema:Ne,UnsubscribeRequestParamsSchema:S,UnsubscribeRequestSchema:Pe,ResourceUpdatedNotificationParamsSchema:Fe,ResourceUpdatedNotificationSchema:Ie,PromptArgumentSchema:Le,PromptSchema:Re,ListPromptsRequestSchema:ze,ListPromptsResultSchema:Be,GetPromptRequestParamsSchema:Ve,GetPromptRequestSchema:He,TextContentSchema:Ue,ImageContentSchema:We,AudioContentSchema:Ge,ToolUseContentSchema:Ke,EmbeddedResourceSchema:qe,ResourceLinkSchema:Je,ContentBlockSchema:Ye,PromptMessageSchema:Xe,GetPromptResultSchema:Ze,PromptListChangedNotificationSchema:Qe,ToolAnnotationsSchema:$e,ToolExecutionSchema:et,ToolSchema:tt,ListToolsRequestSchema:nt,ListToolsResultSchema:rt,CallToolResultSchema:it,CallToolRequestParamsSchema:at,CallToolRequestSchema:ot,ToolListChangedNotificationSchema:st,LoggingLevelSchema:ct,SetLevelRequestParamsSchema:lt,SetLevelRequestSchema:ut,LoggingMessageNotificationParamsSchema:dt,LoggingMessageNotificationSchema:ft,ModelHintSchema:pt,ModelPreferencesSchema:mt,ToolChoiceSchema:ht,ToolResultContentSchema:C,SamplingContentSchema:gt,SamplingMessageContentBlockSchema:_t,SamplingMessageSchema:vt,CreateMessageRequestParamsSchema:yt,CreateMessageRequestSchema:bt,CreateMessageResultSchema:xt,CreateMessageResultWithToolsSchema:St,BooleanSchemaSchema:Ct,StringSchemaSchema:wt,NumberSchemaSchema:Tt,UntitledSingleSelectEnumSchemaSchema:Et,TitledSingleSelectEnumSchemaSchema:Dt,LegacyTitledEnumSchemaSchema:Ot,SingleSelectEnumSchemaSchema:kt,UntitledMultiSelectEnumSchemaSchema:At,TitledMultiSelectEnumSchemaSchema:jt,MultiSelectEnumSchemaSchema:Mt,EnumSchemaSchema:Nt,PrimitiveSchemaDefinitionSchema:Pt,ElicitRequestFormParamsSchema:Ft,ElicitRequestURLParamsSchema:It,ElicitRequestParamsSchema:Lt,ElicitRequestSchema:Rt,ElicitationCompleteNotificationParamsSchema:zt,ElicitationCompleteNotificationSchema:Bt,ElicitResultSchema:Vt,ResourceTemplateReferenceSchema:Ht,PromptReferenceSchema:Ut,CompleteRequestParamsSchema:Wt,CompleteRequestSchema:Gt,CompleteResultSchema:Kt,RootSchema:qt,ListRootsRequestSchema:Jt,ListRootsResultSchema:Yt,RootsListChangedNotificationSchema:Xt,TaskCreationParamsSchema:Zt,TaskStatusSchema:Qt,TaskSchema:$t,CreateTaskResultSchema:en,TaskStatusNotificationParamsSchema:tn,TaskStatusNotificationSchema:nn,GetTaskRequestSchema:rn,GetTaskResultSchema:an,GetTaskPayloadRequestSchema:on,GetTaskPayloadResultSchema:sn,ListTasksRequestSchema:cn,ListTasksResultSchema:ln,CancelTaskRequestSchema:un,CancelTaskResultSchema:f.merge($t),ClientRequestSchema:M([ue,oe,Gt,ut,He,ze,we,Ee,ke,Ne,Pe,ot,nt,rn,on,cn,un]),ClientNotificationSchema:M([g,pe,le,Xt,nn]),ClientResultSchema:M([m,xt,St,Vt,Yt,an,ln,en]),ServerRequestSchema:M([ue,bt,Rt,Jt,rn,on,cn,un]),ServerNotificationSchema:M([g,pe,ft,Ie,je,st,Qe,nn,Bt]),ServerResultSchema:M([m,ce,Kt,Ze,Be,Te,De,Ae,it,rt,an,ln,en]),CallToolResultWireSchema:O().superRefine((e,t)=>{if(!(typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0)){for(let n of dp)if(n in e){t.addIssue({code:`custom`,message:`content is required when the body carries \'${n}\' \u2014 another result family cannot default into an empty tools/call success`});return}}}).transform(fp).pipe(it)}}var mp;function hp(){return mp??=pp()}function gp(e){return e.type!==`object`}var _p=new Set([`const`,`enum`,`default`,`examples`]),vp=new Set([`properties`,`patternProperties`,`$defs`,`definitions`,`dependentSchemas`,`dependencies`]);function yp(e){return e!==void 0&&!(typeof e==`string`&&e.startsWith(`#`))}function bp(e){let t=typeof e.$schema==`string`?e.$schema:void 0;if(yp(e.$id))return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:e},required:[`result`]};let n=y(e.$schema)&&e.$recursiveAnchor!==!0,r=(e,t)=>{if(Array.isArray(e))return e.map(e=>r(e,!1));if(typeof e!=`object`||!e||!t&&yp(e.$id))return e;let i={},a=!1;for(let[o,s]of Object.entries(e))t?i[o]=r(s,!1):(o===`$ref`||o===`$dynamicRef`)&&typeof s==`string`?i[o]=s===`#`?`#/properties/result`:s.startsWith(`#/`)?`#/properties/result${s.slice(1)}`:s:o===`$recursiveRef`&&s===`#`&&n?a=!0:_p.has(o)?i[o]=s:vp.has(o)?i[o]=r(s,!0):i[o]=r(s,!1);return a&&(`$ref`in i?i.allOf=[...Array.isArray(i.allOf)?i.allOf:[],{$ref:`#/properties/result`}]:i.$ref=`#/properties/result`),i};return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:r(e,!1)},required:[`result`]}}var xp={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Sp={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},Cp={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},wp;function Tp(){if(wp)return wp;let e=hp();return wp={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}},wp}function Ep(e){return Object.prototype.hasOwnProperty.call(xp,e)}function Dp(e){return Object.prototype.hasOwnProperty.call(Sp,e)}function Op(e){return Object.prototype.hasOwnProperty.call(Cp,e)}function kp(e){return Op(e)?Tp().resultSchemas[e]:void 0}function Ap(e){return Ep(e)?Tp().requestSchemas[e]:void 0}function jp(e){return Dp(e)?Tp().notificationSchemas[e]:void 0}Object.keys(xp),Object.keys(Sp);function Mp(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Np(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var Pp={ok:!1,reason:`not-in-era`};function Fp(e){return Mp(e)&&Mp(e.outputSchema)&&gp(e.outputSchema)}function Ip(e){return e}var Lp={era:`2025-11-25`,hasRequestMethod:Ep,hasNotificationMethod:Dp,validateRequest:(e,t)=>Np(Ap(e),t),validateResult:(e,t)=>Np(kp(e),t),validateNotification:(e,t)=>Np(jp(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>Pp,validateInputResponse:()=>Pp,samplingResultVariant:((e,t)=>{let n=hp();return Np(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)}),outboundEnvelope:e=>void 0,validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let n=up(e),r=n.structuredContent;if(r===void 0)return n;let i=typeof r!=`object`||!r||Array.isArray(r),a=t!==void 0&&gp(t);return!i&&!a?n:{...n,structuredContent:{result:r}}},decodeResult(e,t){if(Mp(t)&&`resultType`in t){let e={...t};return delete e.resultType,{kind:`complete`,result:Ip(e)}}return{kind:`complete`,result:Ip(t)}},encodeResult(e,t){if(e!==`tools/list`)return t;let n=t.tools;return!Array.isArray(n)||!n.some(e=>Fp(e))?t:{...t,tools:n.map(e=>Fp(e)?{...e,outputSchema:bp(e.outputSchema)}:e)}},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope:e=>void 0};function Rp(){let e=_l(()=>M([T(),E(),D(),Pc(),N(T(),e),k(e)])),t=N(T(),e),n=M([T(),E().int()]),r=T(),i=M([T(),E().int()]),a=P([`user`,`assistant`]),o=P([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),s=T().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),c=A({ttl:E().optional()}),l=A({taskId:T()}),u=j({progressToken:n.optional(),"io.modelcontextprotocol/related-task":l.optional()}),d=A({_meta:u.optional()}),f=d.extend({task:c.optional()}),p=A({_meta:u.optional()}),m=A({method:T(),params:p.loose().optional()}),h=A({src:T(),mimeType:T().optional(),sizes:k(T()).optional(),theme:P([`light`,`dark`]).optional()}),g=A({icons:k(h).optional()}),_=A({name:T(),title:T().optional()}),v=_.extend({..._.shape,...g.shape,version:T(),websiteUrl:T().optional(),description:T().optional()}),y=xl(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Kc(A({form:Kc(A({applyDefaults:D().optional()}),t).optional(),url:t.optional()}),t.optional())),ee=j({list:t.optional(),cancel:t.optional(),requests:j({sampling:j({createMessage:t.optional()}).optional(),elicitation:j({create:t.optional()}).optional()}).optional()}),te=j({list:t.optional(),cancel:t.optional(),requests:j({tools:j({call:t.optional()}).optional()}).optional()}),ne=A({experimental:N(T(),t).optional(),sampling:A({context:t.optional(),tools:t.optional()}).optional(),elicitation:y.optional(),roots:A({listChanged:D().optional()}).optional(),tasks:ee.optional(),extensions:N(T(),t).optional()}),re=A({experimental:N(T(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:A({listChanged:D().optional()}).optional(),resources:A({subscribe:D().optional(),listChanged:D().optional()}).optional(),tools:A({listChanged:D().optional()}).optional(),tasks:te.optional(),extensions:N(T(),t).optional()}),ie=A({progress:E(),total:I(E()),message:I(T())}),ae=A({...p.shape,...ie.shape,progressToken:n}),oe=m.extend({method:F(`notifications/progress`),params:ae}),se=p.extend({level:o,logger:T().optional(),data:O()}),ce=m.extend({method:F(`notifications/message`),params:se}),le=A({uri:T(),mimeType:I(T()),_meta:N(T(),O()).optional()}),ue=le.extend({text:T()}),de=le.extend({blob:s}),fe=A({audience:k(a).optional(),priority:E().min(0).max(1).optional(),lastModified:wl({offset:!0}).optional()}),pe=A({..._.shape,...g.shape,uri:T(),description:I(T()),mimeType:I(T()),size:I(E()),annotations:fe.optional(),_meta:I(j({}))}),b=A({..._.shape,...g.shape,uriTemplate:T(),description:I(T()),mimeType:I(T()),annotations:fe.optional(),_meta:I(j({}))}),me=m.extend({method:F(`notifications/resources/list_changed`),params:p.optional()}),he=p.extend({uri:T()}),ge=m.extend({method:F(`notifications/resources/updated`),params:he}),_e=A({name:T(),description:I(T()),required:I(D())}),ve=A({..._.shape,...g.shape,description:I(T()),arguments:I(k(_e)),_meta:I(j({}))}),ye=m.extend({method:F(`notifications/prompts/list_changed`),params:p.optional()}),be=A({type:F(`text`),text:T(),annotations:fe.optional(),_meta:N(T(),O()).optional()}),xe=A({type:F(`image`),data:s,mimeType:T(),annotations:fe.optional(),_meta:N(T(),O()).optional()}),Se=A({type:F(`audio`),data:s,mimeType:T(),annotations:fe.optional(),_meta:N(T(),O()).optional()}),Ce=A({type:F(`tool_use`),name:T(),id:T(),input:N(T(),O()),_meta:N(T(),O()).optional()}),we=A({type:F(`resource`),resource:M([ue,de]),annotations:fe.optional(),_meta:N(T(),O()).optional()}),Te=pe.extend({type:F(`resource_link`)}),Ee=M([be,xe,Se,Te,we]),De=A({role:a,content:Ee}),x=A({title:T().optional(),readOnlyHint:D().optional(),destructiveHint:D().optional(),idempotentHint:D().optional(),openWorldHint:D().optional()}),Oe=m.extend({method:F(`notifications/tools/list_changed`),params:p.optional()}),ke=A({name:T().optional()}),Ae=A({hints:k(ke).optional(),costPriority:E().min(0).max(1).optional(),speedPriority:E().min(0).max(1).optional(),intelligencePriority:E().min(0).max(1).optional()}),je=A({mode:P([`auto`,`required`,`none`]).optional()}),Me=A({type:F(`boolean`),title:T().optional(),description:T().optional(),default:D().optional()}),Ne=A({type:F(`string`),title:T().optional(),description:T().optional(),minLength:E().optional(),maxLength:E().optional(),format:P([`email`,`uri`,`date`,`date-time`]).optional(),default:T().optional()}),S=A({type:P([`number`,`integer`]),title:T().optional(),description:T().optional(),minimum:E().optional(),maximum:E().optional(),default:E().optional()}),Pe=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),default:T().optional()}),Fe=A({type:F(`string`),title:T().optional(),description:T().optional(),oneOf:k(A({const:T(),title:T()})),default:T().optional()}),Ie=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),enumNames:k(T()).optional(),default:T().optional()}),Le=M([Pe,Fe]),Re=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({type:F(`string`),enum:k(T())}),default:k(T()).optional()}),ze=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({anyOf:k(A({const:T(),title:T()}))}),default:k(T()).optional()}),Be=M([Re,ze]),Ve=M([Ie,Le,Be]),He=M([Ve,Me,Ne,S]),Ue=f.extend({mode:F(`form`).optional(),message:T(),requestedSchema:A({type:F(`object`),properties:N(T(),He),required:k(T()).optional()}).catchall(O())}),We=A({type:F(`ref/resource`),uri:T()}),Ge=A({type:F(`ref/prompt`),name:T()}),Ke=A({uri:T().startsWith(`file://`),name:T().optional(),_meta:N(T(),O()).optional()}),qe=ne.shape,Je=A({experimental:qe.experimental,sampling:qe.sampling,elicitation:qe.elicitation,roots:qe.roots,extensions:qe.extensions}),Ye=re.shape,Xe=A({experimental:Ye.experimental,logging:Ye.logging,completions:Ye.completions,prompts:Ye.prompts,resources:Ye.resources,tools:Ye.tools,extensions:Ye.extensions}),Ze=j({progressToken:n.optional(),[kl]:T(),[Al]:v.optional(),[Ml]:Je,[Pl]:o.optional()}),Qe=A({..._.shape,...g.shape,description:T().optional(),inputSchema:j({$schema:T().optional(),type:F(`object`)}),outputSchema:j({$schema:T().optional()}).optional(),annotations:x.optional(),_meta:N(T(),O()).optional()}),$e=A({type:F(`tool_result`),toolUseId:T(),content:k(Ee),structuredContent:O().optional(),isError:D().optional(),_meta:N(T(),O()).optional()}),et=M([be,xe,Se,Ce,$e]),tt=A({role:a,content:M([et,k(et)]),_meta:N(T(),O()).optional()}),nt=T(),rt=j({[jl]:v.optional().catch(void 0)}),it=rt.optional();function at(e){return j({_meta:it,resultType:nt.default(`complete`),...e})}let ot=at({}),st=at({nextCursor:r.optional()}),ct=at({content:k(Ee),structuredContent:O().optional(),isError:D().optional()}),lt=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),tools:k(Qe),nextCursor:r.optional()}),ut=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),prompts:k(ve),nextCursor:r.optional()}),dt=at({description:T().optional(),messages:k(De)}),ft=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),resources:k(pe),nextCursor:r.optional()}),pt=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),resourceTemplates:k(b),nextCursor:r.optional()}),mt=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),contents:k(M([ue,de]))}),ht=at({completion:A({values:k(T()).max(100),total:E().int().optional(),hasMore:D().optional()}).loose()}),C=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`])}),gt=at({ttlMs:E().int().min(0).catch(0),cacheScope:P([`public`,`private`]).catch(`private`),supportedVersions:k(T()),capabilities:Xe,instructions:T().optional()}),_t=A({messages:k(tt),modelPreferences:Ae.optional(),systemPrompt:T().optional(),includeContext:P([`none`,`thisServer`,`allServers`]).optional(),temperature:E().optional(),maxTokens:E().int(),stopSequences:k(T()).optional(),metadata:t.optional(),tools:k(Qe).optional(),toolChoice:je.optional()}),vt=A({method:F(`sampling/createMessage`),params:_t}),yt=A({method:F(`roots/list`),params:A({_meta:N(T(),O()).optional()}).optional()}),bt=A({...tt.shape,model:T(),stopReason:T().optional()}),xt=A({roots:k(Ke)}),St=A({action:P([`accept`,`decline`,`cancel`]),content:N(T(),M([T(),E(),D(),k(T())])).optional()}),Ct=A({mode:F(`url`),message:T(),url:T().url()}),wt=M([Ue,Ct]),Tt=A({method:F(`elicitation/create`),params:wt}),Et=M([vt,yt,Tt]),Dt=M([bt,xt,St]),Ot=N(T(),Et),kt=N(T(),Dt),At=at({inputRequests:Ot.optional(),requestState:T().optional()}),jt={inputResponses:kt.optional(),requestState:T().optional()},Mt=A({_meta:Ze,...jt}),Nt=j({progressToken:n.optional()});function Pt(e,t){return A({method:F(e),params:A({_meta:Ze,...t})})}function Ft(e,t){return A({method:F(e),params:A({_meta:Nt.optional(),...t}).optional()})}let It={name:T(),arguments:N(T(),O()).optional(),...jt},Lt={cursor:r.optional()},Rt=Pt(`tools/call`,It),zt=Pt(`tools/list`,Lt),Bt=Pt(`prompts/list`,Lt),Vt=Pt(`prompts/get`,{name:T(),arguments:N(T(),T()).optional(),...jt}),Ht=Pt(`resources/list`,Lt),Ut=Pt(`resources/templates/list`,Lt),Wt=Pt(`resources/read`,{uri:T(),...jt}),Gt={ref:M([Ge,We]),argument:A({name:T(),value:T()}),context:A({arguments:N(T(),T()).optional()}).optional()},Kt=Pt(`completion/complete`,Gt),qt=Pt(`server/discover`,{}),Jt=A({toolsListChanged:D().optional(),promptsListChanged:D().optional(),resourcesListChanged:D().optional(),resourceSubscriptions:k(T()).optional()}),Yt={notifications:Jt},Xt=Pt(`subscriptions/listen`,Yt),Zt=rt.extend({"io.modelcontextprotocol/subscriptionId":i}),Qt=j({_meta:Zt,resultType:nt.default(`complete`)}),$t={"tools/call":Ft(`tools/call`,It),"tools/list":Ft(`tools/list`,Lt),"prompts/get":Ft(`prompts/get`,{name:T(),arguments:N(T(),T()).optional()}),"prompts/list":Ft(`prompts/list`,Lt),"resources/list":Ft(`resources/list`,Lt),"resources/templates/list":Ft(`resources/templates/list`,Lt),"resources/read":Ft(`resources/read`,{uri:T()}),"completion/complete":Ft(`completion/complete`,Gt),"server/discover":Ft(`server/discover`,{}),"subscriptions/listen":Ft(`subscriptions/listen`,Yt)};function en(e){return j({_meta:it,...e})}let tn={"tools/call":en({content:k(Ee),structuredContent:O().optional(),isError:D().optional()}),"tools/list":en({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),tools:k(Qe),nextCursor:r.optional()}),"prompts/get":en({description:T().optional(),messages:k(De)}),"prompts/list":en({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),prompts:k(ve),nextCursor:r.optional()}),"resources/list":en({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),resources:k(pe),nextCursor:r.optional()}),"resources/templates/list":en({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),resourceTemplates:k(b),nextCursor:r.optional()}),"resources/read":en({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),contents:k(M([ue,de]))}),"completion/complete":en({completion:A({values:k(T()).max(100),total:E().int().optional(),hasMore:D().optional()}).loose()}),"server/discover":en({ttlMs:E().int().min(0).catch(0),cacheScope:P([`public`,`private`]).catch(`private`),supportedVersions:k(T()),capabilities:Xe,instructions:T().optional()}),"subscriptions/listen":en({})},nn=j({"io.modelcontextprotocol/subscriptionId":i.optional()}),rn=A({method:F(`notifications/subscriptions/acknowledged`),params:A({_meta:nn.optional(),notifications:Jt})}),an=A({_meta:nn.optional(),requestId:i,reason:T().optional()}),on=A({method:F(`notifications/cancelled`),params:an}),sn={"notifications/cancelled":on,"notifications/progress":oe,"notifications/message":ce,"notifications/resources/updated":ge,"notifications/resources/list_changed":me,"notifications/tools/list_changed":Oe,"notifications/prompts/list_changed":ye,"notifications/subscriptions/acknowledged":rn},cn=e=>A({jsonrpc:F(`2.0`),id:M([T(),E().int()]),result:e}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,RequestIdSchema:i,RoleSchema:a,LoggingLevelSchema:o,TaskMetadataSchema:c,RelatedTaskMetadataSchema:l,RequestMetaSchema:u,BaseRequestParamsSchema:d,TaskAugmentedRequestParamsSchema:f,NotificationsParamsSchema:p,NotificationSchema:m,IconSchema:h,IconsSchema:g,BaseMetadataSchema:_,ImplementationSchema:v,ClientTasksCapabilitySchema:ee,ServerTasksCapabilitySchema:te,ClientCapabilitiesSchema:ne,ServerCapabilitiesSchema:re,ProgressSchema:ie,ProgressNotificationParamsSchema:ae,ProgressNotificationSchema:oe,LoggingMessageNotificationParamsSchema:se,LoggingMessageNotificationSchema:ce,ResourceContentsSchema:le,TextResourceContentsSchema:ue,BlobResourceContentsSchema:de,AnnotationsSchema:fe,ResourceSchema:pe,ResourceTemplateSchema:b,ResourceListChangedNotificationSchema:me,ResourceUpdatedNotificationParamsSchema:he,ResourceUpdatedNotificationSchema:ge,PromptArgumentSchema:_e,PromptSchema:ve,PromptListChangedNotificationSchema:ye,TextContentSchema:be,ImageContentSchema:xe,AudioContentSchema:Se,ToolUseContentSchema:Ce,EmbeddedResourceSchema:we,ResourceLinkSchema:Te,ContentBlockSchema:Ee,PromptMessageSchema:De,ToolAnnotationsSchema:x,ToolListChangedNotificationSchema:Oe,ModelHintSchema:ke,ModelPreferencesSchema:Ae,ToolChoiceSchema:je,BooleanSchemaSchema:Me,StringSchemaSchema:Ne,NumberSchemaSchema:S,UntitledSingleSelectEnumSchemaSchema:Pe,TitledSingleSelectEnumSchemaSchema:Fe,LegacyTitledEnumSchemaSchema:Ie,SingleSelectEnumSchemaSchema:Le,UntitledMultiSelectEnumSchemaSchema:Re,TitledMultiSelectEnumSchemaSchema:ze,MultiSelectEnumSchemaSchema:Be,EnumSchemaSchema:Ve,PrimitiveSchemaDefinitionSchema:He,ElicitRequestFormParamsSchema:Ue,ResourceTemplateReferenceSchema:We,PromptReferenceSchema:Ge,RootSchema:Ke,ClientCapabilities2026Schema:Je,ServerCapabilities2026Schema:Xe,RequestMetaEnvelopeSchema:Ze,ToolSchema:Qe,ToolResultContentSchema:$e,SamplingMessageContentBlockSchema:et,SamplingMessageSchema:tt,ResultTypeSchema:nt,ResultMetaSchema:rt,ResultSchema:ot,PaginatedResultSchema:st,CallToolResultSchema:ct,ListToolsResultSchema:lt,ListPromptsResultSchema:ut,GetPromptResultSchema:dt,ListResourcesResultSchema:ft,ListResourceTemplatesResultSchema:pt,ReadResourceResultSchema:mt,CompleteResultSchema:ht,CacheableResultSchema:C,DiscoverResultSchema:gt,CreateMessageRequestParamsSchema:_t,CreateMessageRequestSchema:vt,ListRootsRequestSchema:yt,CreateMessageResultSchema:bt,ListRootsResultSchema:xt,ElicitResultSchema:St,ElicitRequestURLParamsSchema:Ct,ElicitRequestParamsSchema:wt,ElicitRequestSchema:Tt,InputRequestSchema:Et,InputResponseSchema:Dt,InputRequestsSchema:Ot,InputResponsesSchema:kt,InputRequiredResultSchema:At,InputResponseRequestParamsSchema:Mt,CallToolRequestSchema:Rt,ListToolsRequestSchema:zt,ListPromptsRequestSchema:Bt,GetPromptRequestSchema:Vt,ListResourcesRequestSchema:Ht,ListResourceTemplatesRequestSchema:Ut,ReadResourceRequestSchema:Wt,CompleteRequestSchema:Kt,DiscoverRequestSchema:qt,SubscriptionFilterSchema:Jt,SubscriptionsListenRequestSchema:Xt,SubscriptionsListenResultMetaSchema:Zt,SubscriptionsListenResultSchema:Qt,dispatchRequestSchemas:$t,dispatchResultSchemas:tn,NotificationMetaSchema:nn,SubscriptionsAcknowledgedNotificationSchema:rn,CancelledNotificationParamsSchema:an,CancelledNotificationSchema:on,notificationSchemas2026:sn,JSONRPCResultResponseSchema:cn(ot),CallToolResultResponseSchema:cn(M([ct,At])),ListToolsResultResponseSchema:cn(lt),ListPromptsResultResponseSchema:cn(ut),GetPromptResultResponseSchema:cn(M([dt,At])),ListResourcesResultResponseSchema:cn(ft),ListResourceTemplatesResultResponseSchema:cn(pt),ReadResourceResultResponseSchema:cn(M([mt,At])),CompleteResultResponseSchema:cn(ht),DiscoverResultResponseSchema:cn(gt),SubscriptionsListenResultResponseSchema:cn(Qt)}}var zp;function Bp(){return zp??=Rp()}var Vp=[`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`resources/read`,`server/discover`];function Hp(e){return Vp.includes(e)}var Up=Symbol(`modelcontextprotocol.resultCacheHintFallback`);function Wp(e){return e[Up]}function Gp(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function Kp(e){return e===`public`||e===`private`}var B=function(e){return e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.ResourceNotFound=-32002]=`ResourceNotFound`,e[e.MissingRequiredClientCapability=-32021]=`MissingRequiredClientCapability`,e[e.UnsupportedProtocolVersion=-32022]=`UnsupportedProtocolVersion`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`,e}({}),qp=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ProtocolError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name=`ProtocolError`,np(this,new.target)}static fromError(t,n,r){if(t===B.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new Yp(e.elicitations,n)}if(t===B.UnsupportedProtocolVersion&&r){let e=r;if(Array.isArray(e.supported)&&typeof e.requested==`string`)return new Xp({supported:e.supported,requested:e.requested},n)}if(t===B.InvalidParams||t===B.ResourceNotFound){let e=r;if(typeof e?.uri==`string`&&(t===B.ResourceNotFound||Object.keys(e).length===1))return new Jp(e.uri,n)}if(t===B.MissingRequiredClientCapability&&r){let e=r;if(e.requiredCapabilities!==null&&typeof e.requiredCapabilities==`object`&&!Array.isArray(e.requiredCapabilities))return new Zp({requiredCapabilities:e.requiredCapabilities},n)}return new e(t,n,r)}},Jp=class extends qp{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ResourceNotFoundError`})}constructor(e,t=`Resource not found: ${e}`){super(B.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},Yp=class extends qp{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UrlElicitationRequiredError`})}constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(B.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},Xp=class extends qp{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnsupportedProtocolVersionError`})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(B.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},Zp=class extends qp{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.MissingRequiredClientCapabilityError`})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(`, `)}`){super(B.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},Qp=0,$p=`private`,em=[`tools/call`,`prompts/get`,`resources/read`];function tm(e,t){let n=t.resultType;if(n===void 0)return{...t,resultType:`complete`};if(n===`complete`||em.includes(e))return t;throw new qp(B.InternalError,`Handler for ${e} returned resultType \'${String(n)}\', but results of ${e} only support \'complete\' on protocol revision 2026-07-28`)}function nm(e,t){let n=Wp(t);if(t.resultType!==`complete`||!Hp(e))return n===void 0?t:sm(t);let r=t,i=Gp(r.ttlMs)?r.ttlMs:am(n),a=Kp(r.cacheScope)?r.cacheScope:om(n),o={...r,ttlMs:i,cacheScope:a};return delete o[Up],o}function rm(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function im(e,t){if(t===void 0)return e;let n=e._meta;return n===void 0?{...e,_meta:{[jl]:t}}:!rm(n)||n[`io.modelcontextprotocol/serverInfo`]!==void 0?e:{...e,_meta:{...n,[jl]:t}}}function am(e){return e!==void 0&&Gp(e.ttlMs)?e.ttlMs:Qp}function om(e){return e!==void 0&&Kp(e.cacheScope)?e.cacheScope:$p}function sm(e){let t={...e};return delete t[Up],t}var cm=[`elicitation/create`,`sampling/createMessage`,`roots/list`],lm;function um(){if(lm)return lm;let e=Bp();return lm={request:{"elicitation/create":A({method:F(`elicitation/create`),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":A({method:F(`sampling/createMessage`),params:e.CreateMessageRequestParamsSchema}),"roots/list":A({method:F(`roots/list`),params:j({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},lm}function dm(e){return cm.includes(e)}function fm(e){return dm(e)?um().request[e]:void 0}function pm(e){return dm(e)?um().response[e]:void 0}var mm={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},hm={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function gm(e){return Object.prototype.hasOwnProperty.call(mm,e)}function _m(e){return Object.prototype.hasOwnProperty.call(hm,e)}function vm(e){return Object.prototype.hasOwnProperty.call(mm,e)}function ym(e){return gm(e)?Bp().dispatchRequestSchemas[e]:void 0}function bm(e){return vm(e)?Bp().dispatchResultSchemas[e]:void 0}function xm(e){return _m(e)?Bp().notificationSchemas2026[e]:void 0}Object.keys(mm),Object.keys(hm);function Sm(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Cm(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var wm={ok:!1,reason:`not-in-era`},Tm=[kl,Ml];function Em(e,t){let n=t,r=!1,i=()=>(r||=(n={...n},!0),n),a=t.tools;e===`tools/list`&&Array.isArray(a)&&a.some(e=>Sm(e)&&`execution`in e)&&(i().tools=a.map(e=>{if(!Sm(e)||!(`execution`in e))return e;let t={...e};return delete t.execution,t}));let o=t.capabilities;if(Sm(o)&&`tasks`in o){let e={...o};delete e.tasks,i().capabilities=e}return n}var Dm={era:`2026-07-28`,hasRequestMethod:gm,hasNotificationMethod:_m,hasInputRequestMethod:e=>fm(e)!==void 0,validateRequest:(e,t)=>Cm(ym(e),t),validateResult:(e,t)=>Cm(bm(e),t),validateNotification:(e,t)=>Cm(xm(e),t),validateInputRequest:(e,t)=>Cm(fm(e),t),validateInputResponse:(e,t)=>Cm(pm(e),t),samplingResultVariant:()=>wm,outboundEnvelope(e){return{[kl]:e.protocolVersion,[Al]:e.clientInfo,[Ml]:e.clientCapabilities,...e.logLevel!==void 0&&{"io.modelcontextprotocol/logLevel":e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let n of Tm)n in e||t.push({key:n,problem:`missing`});let n=Bp().RequestMetaEnvelopeSchema.safeParse(e);if(!n.success)for(let e of n.error.issues){let n=e.path.map(String),r=n.length>0?n.join(`.`):`_meta`;n.length===1&&t.some(e=>e.key===r&&e.problem===`missing`)||t.push({key:r,problem:e.message})}return t},projectCallToolResult:e=>up(e),inputRequestSchema:fm,decodeResult(e,t){if(!Sm(t))return{kind:`invalid`,error:new z(R.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return{kind:`invalid`,error:new z(R.InvalidResult,`Invalid result for ${e}: missing required resultType \u2014 servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:`missing-resultType`})};if(typeof n!=`string`)return{kind:`invalid`,error:new z(R.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n===`input_required`){let n=t.inputRequests,r=Sm(n)?n:{},i=t.requestState,a=t._meta===void 0?void 0:Bp().ResultMetaSchema.safeParse(t._meta),o=a?.success?a.data:void 0;return Object.keys(r).length===0&&typeof i!=`string`?{kind:`invalid`,error:new z(R.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:`input-required-missing-both`})}:{kind:`input_required`,inputRequests:r,...typeof i==`string`&&{requestState:i},...o!==void 0&&{_meta:o}}}if(n!==`complete`)return{kind:`invalid`,error:new z(R.UnsupportedResultType,`Unsupported result type \'${n}\' for ${e}`,{resultType:n,method:e})};let r=km(),i=Object.hasOwn(r,e)?r[e]:void 0;if(i!==void 0){let n=i.safeParse(t);if(!n.success)return{kind:`invalid`,error:new z(R.InvalidResult,`Invalid result for ${e}: ${n.error}`,{method:e})}}let a={...t};return delete a.resultType,{kind:`complete`,result:a}},encodeResult(e,t,n){return im(nm(e,tm(e,Em(e,t))),n)},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope(e){if(e.envelope===void 0)return`Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)`;let t=Bp().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(e=>e.message).join(`; `)}`}},Om;function km(){if(Om)return Om;let e=Bp();return Om={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema},Om}var Am=`2026-07-28`;function jm(e){return e!==void 0&&sp(e)?Dm:Lp}function Mm(e){return e.revision===void 0?e.era===`modern`?Dm.era:Lp.era:jm(e.revision).era}function Nm(e){return Im.some(t=>t.hasRequestMethod(e))}function Pm(e){return Im.some(t=>t.hasNotificationMethod(e))}function Fm(e){return e===`tasks/get`||e===`tasks/cancel`}var Im=[Lp,Dm],Lm=m({AnnotationsSchema:()=>Mu,AudioContentSchema:()=>dd,BaseMetadataSchema:()=>su,BaseRequestParamsSchema:()=>Ul,BlobResourceContentsSchema:()=>Au,BooleanSchemaSchema:()=>Kd,CallToolRequestParamsSchema:()=>Ed,CallToolRequestSchema:()=>Dd,CallToolResultSchema:()=>wd,CancelTaskRequestSchema:()=>Nf,CancelTaskResultSchema:()=>Pf,CancelledNotificationParamsSchema:()=>ru,CancelledNotificationSchema:()=>iu,ClientCapabilitiesSchema:()=>fu,ClientNotificationSchema:()=>If,ClientRequestSchema:()=>Ff,ClientResultSchema:()=>Lf,ClientTasksCapabilitySchema:()=>uu,CompatibilityCallToolResultSchema:()=>Td,CompleteRequestParamsSchema:()=>mf,CompleteRequestSchema:()=>hf,CompleteResultSchema:()=>gf,ContentBlockSchema:()=>hd,CreateMessageRequestParamsSchema:()=>Hd,CreateMessageRequestSchema:()=>Ud,CreateMessageResultSchema:()=>Wd,CreateMessageResultWithToolsSchema:()=>Gd,CreateTaskResultSchema:()=>wf,CursorSchema:()=>zl,DiscoverRequestSchema:()=>vu,DiscoverResultSchema:()=>yu,ElicitRequestFormParamsSchema:()=>af,ElicitRequestParamsSchema:()=>sf,ElicitRequestSchema:()=>cf,ElicitRequestURLParamsSchema:()=>of,ElicitResultSchema:()=>df,ElicitationCompleteNotificationParamsSchema:()=>lf,ElicitationCompleteNotificationSchema:()=>uf,EmbeddedResourceSchema:()=>pd,EmptyResultSchema:()=>nu,EnumSchemaSchema:()=>nf,GetPromptRequestParamsSchema:()=>sd,GetPromptRequestSchema:()=>cd,GetPromptResultSchema:()=>_d,GetTaskPayloadRequestSchema:()=>kf,GetTaskPayloadResultSchema:()=>Af,GetTaskRequestSchema:()=>Df,GetTaskResultSchema:()=>Of,IconSchema:()=>au,IconsSchema:()=>ou,ImageContentSchema:()=>ud,ImplementationSchema:()=>cu,InitializeRequestParamsSchema:()=>pu,InitializeRequestSchema:()=>mu,InitializeResultSchema:()=>gu,InitializedNotificationSchema:()=>_u,JSONArraySchema:()=>Ll,JSONObjectSchema:()=>Il,JSONRPCErrorResponseSchema:()=>$l,JSONRPCMessageSchema:()=>eu,JSONRPCNotificationSchema:()=>Zl,JSONRPCRequestSchema:()=>Xl,JSONRPCResponseSchema:()=>tu,JSONRPCResultResponseSchema:()=>Ql,JSONValueSchema:()=>Fl,LegacyTitledEnumSchemaSchema:()=>Zd,ListChangedOptionsBaseSchema:()=>kd,ListPromptsRequestSchema:()=>ad,ListPromptsResultSchema:()=>od,ListResourceTemplatesRequestSchema:()=>Lu,ListResourceTemplatesResultSchema:()=>Ru,ListResourcesRequestSchema:()=>Fu,ListResourcesResultSchema:()=>Iu,ListRootsRequestSchema:()=>vf,ListRootsResultSchema:()=>yf,ListTasksRequestSchema:()=>jf,ListTasksResultSchema:()=>Mf,ListToolsRequestSchema:()=>Sd,ListToolsResultSchema:()=>Cd,LoggingLevelSchema:()=>Ad,LoggingMessageNotificationParamsSchema:()=>Nd,LoggingMessageNotificationSchema:()=>Pd,ModelHintSchema:()=>Fd,ModelPreferencesSchema:()=>Id,MultiSelectEnumSchemaSchema:()=>tf,NotificationSchema:()=>ql,NotificationsParamsSchema:()=>Kl,NumberSchemaSchema:()=>Jd,PaginatedRequestParamsSchema:()=>wu,PaginatedRequestSchema:()=>Tu,PaginatedResultSchema:()=>Eu,PingRequestSchema:()=>bu,PrimitiveSchemaDefinitionSchema:()=>rf,ProgressNotificationParamsSchema:()=>Su,ProgressNotificationSchema:()=>Cu,ProgressSchema:()=>xu,ProgressTokenSchema:()=>Rl,PromptArgumentSchema:()=>rd,PromptListChangedNotificationSchema:()=>vd,PromptMessageSchema:()=>gd,PromptReferenceSchema:()=>pf,PromptSchema:()=>id,ReadResourceRequestParamsSchema:()=>Bu,ReadResourceRequestSchema:()=>Vu,ReadResourceResultSchema:()=>Hu,RelatedTaskMetadataSchema:()=>Vl,RequestIdSchema:()=>Yl,RequestMetaSchema:()=>Hl,RequestSchema:()=>Gl,ResourceContentsSchema:()=>Du,ResourceLinkSchema:()=>md,ResourceListChangedNotificationSchema:()=>Uu,ResourceRequestParamsSchema:()=>zu,ResourceSchema:()=>Nu,ResourceTemplateReferenceSchema:()=>ff,ResourceTemplateSchema:()=>Pu,ResourceUpdatedNotificationParamsSchema:()=>td,ResourceUpdatedNotificationSchema:()=>nd,ResultMetaObjectSchema:()=>Jl,ResultSchema:()=>L,RoleSchema:()=>ju,RootSchema:()=>_f,RootsListChangedNotificationSchema:()=>bf,SamplingContentSchema:()=>zd,SamplingMessageContentBlockSchema:()=>Bd,SamplingMessageSchema:()=>Vd,ServerCapabilitiesSchema:()=>hu,ServerNotificationSchema:()=>zf,ServerRequestSchema:()=>Rf,ServerResultSchema:()=>Bf,ServerTasksCapabilitySchema:()=>du,SetLevelRequestParamsSchema:()=>jd,SetLevelRequestSchema:()=>Md,SingleSelectEnumSchemaSchema:()=>Qd,StringSchemaSchema:()=>qd,SubscribeRequestParamsSchema:()=>Wu,SubscribeRequestSchema:()=>Gu,SubscriptionFilterSchema:()=>Ju,SubscriptionsAcknowledgedNotificationParamsSchema:()=>Zu,SubscriptionsAcknowledgedNotificationSchema:()=>Qu,SubscriptionsListenRequestParamsSchema:()=>Yu,SubscriptionsListenRequestSchema:()=>Xu,SubscriptionsListenResultMetaSchema:()=>$u,SubscriptionsListenResultSchema:()=>ed,TaskAugmentedRequestParamsSchema:()=>Wl,TaskCreationParamsSchema:()=>xf,TaskMetadataSchema:()=>Bl,TaskSchema:()=>Cf,TaskStatusNotificationParamsSchema:()=>Tf,TaskStatusNotificationSchema:()=>Ef,TaskStatusSchema:()=>Sf,TextContentSchema:()=>ld,TextResourceContentsSchema:()=>Ou,TitledMultiSelectEnumSchemaSchema:()=>ef,TitledSingleSelectEnumSchemaSchema:()=>Xd,ToolAnnotationsSchema:()=>yd,ToolChoiceSchema:()=>Ld,ToolExecutionSchema:()=>bd,ToolListChangedNotificationSchema:()=>Od,ToolResultContentSchema:()=>Rd,ToolSchema:()=>xd,ToolUseContentSchema:()=>fd,UnsubscribeRequestParamsSchema:()=>Ku,UnsubscribeRequestSchema:()=>qu,UntitledMultiSelectEnumSchemaSchema:()=>$d,UntitledSingleSelectEnumSchemaSchema:()=>Yd}),Rm=e=>Xl.safeParse(e).success,zm=e=>Zl.safeParse(e).success,Bm=e=>Ql.safeParse(e).success,Vm=e=>$l.safeParse(e).success,Hm=e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&e.resultType===`input_required`,Um=`Mcp-Param-`,Wm=`x-mcp-header`,Gm=/^[!#$%&\'*+\\-.^_`|~0-9A-Za-z]+$/,Km=new Set([`string`,`integer`,`boolean`]);function qm(e){let t=[],n=new Map,r,i=(e,a,o)=>{if(typeof e!=`object`||!e)return;let s=e;if(Wm in s){if(!o||a.length===0)return`${Xm(a)}: x-mcp-header is only permitted on properties statically reachable via a chain of \'properties\' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let e=s[Wm];if(typeof e!=`string`||e.length===0)return`${Xm(a)}: x-mcp-header MUST be a non-empty string`;if(!Gm.test(e))return`${Xm(a)}: x-mcp-header \'${e}\' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let i=typeof s.type==`string`?s.type:void 0;if(i===void 0||!Km.has(i)){let e=`${Xm(a)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${i??`<none>`}`;if(i!==`number`)return e;r??=e}let c=e.toLowerCase(),l=n.get(c);if(l!==void 0)return`x-mcp-header \'${e}\' is not case-insensitively unique (also declared as \'${l}\')`;n.set(c,e),t.push({path:a,headerName:e,type:i})}let c=s.properties;if(typeof c==`object`&&c)for(let[e,t]of Object.entries(c)){let n=i(t,[...a,e],o);if(n!==void 0)return n}for(let e of Jm){let t=s[e];if(t===void 0)continue;let n=Array.isArray(t)?t:typeof t==`object`&&t&&Ym.has(e)?Object.values(t):[t];for(let t of n){let n=i(t,[...a,`<${e}>`],!1);if(n!==void 0)return n}}},a=i(e,[],!0);return a===void 0?r===void 0?{valid:!0,declarations:t}:{valid:!1,reason:r,declarations:t}:{valid:!1,reason:r??a}}var Jm=[`items`,`prefixItems`,`contains`,`additionalProperties`,`unevaluatedProperties`,`unevaluatedItems`,`propertyNames`,`patternProperties`,`dependentSchemas`,`oneOf`,`anyOf`,`allOf`,`not`,`if`,`then`,`else`,`$defs`,`definitions`],Ym=new Set([`patternProperties`,`dependentSchemas`,`$defs`,`definitions`]);function Xm(e){return e.length===0?`<root>`:e.join(`.`)}var Zm=`=?base64?`,Qm=`?=`;function $m(e){if(typeof e==`string`)return e;if(typeof e==`boolean`)return e?`true`:`false`;if(typeof e==`number`)return!Number.isFinite(e)||Number.isInteger(e)&&!Number.isSafeInteger(e)?void 0:String(e)}function eh(e){if(e.length===0||e.startsWith(Zm)&&e.endsWith(Qm)||e!==e.trim())return!0;for(let t=0;t<e.length;t++){let n=e.codePointAt(t);if(!(n===9||n>=32&&n<=126))return!0}return!1}function th(e){let t=new TextEncoder().encode(e),n=``;for(let e of t)n+=String.fromCodePoint(e);return btoa(n)}function nh(e){return eh(e)?`${Zm}${th(e)}${Qm}`:e}function rh(e,t){let n=e;for(let e of t){if(typeof n!=`object`||!n)return;n=n[e]}return n}function ih(e,t){let n={};for(let r of e){let e=rh(t,r.path);if(e==null)continue;let i=$m(e);i!==void 0&&(n[`${Um}${r.headerName}`]=nh(i))}return n}B.InvalidRequest,B.UnsupportedProtocolVersion,B.InvalidParams,B.MethodNotFound,B.InvalidParams,B.MissingRequiredClientCapability,B.ParseError,B.InvalidRequest,B.MethodNotFound,B.UnsupportedProtocolVersion,B.MissingRequiredClientCapability;function ah(e,t){return Bs(e,t)}function oh(e){return new Set(e.flatMap(e=>Object.keys(e.shape)))}function sh(e){if(e==null)return!1;let t=typeof e;return t!==`object`&&t!==`function`||!(`~standard`in e)?!1:typeof e[`~standard`]?.validate==`function`}var ch=!1,lh=`draft-2020-12`;function uh(e,t=`input`){let n=e[`~standard`],r;if(n.jsonSchema)r=n.jsonSchema[t]({target:lh});else if(n.vendor===`zod`){if(!(`_zod`in e))throw Error(`Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().`);ch||(ch=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.")),r=Ps(e,{target:lh,io:t})}else throw Error(`Schema library "${n.vendor}" does not implement StandardJSONSchemaV1 (\\`~standard.jsonSchema\\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(t===`output`)return r.type===void 0&&fh(r)?{type:`object`,...r}:r;if(r.type!==void 0&&r.type!==`object`)throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(r.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:`object`,...r}}var dh=/^#\\/(\\$defs|definitions)\\/([^/~%]+)$/;function fh(e,t=e){if(`properties`in e||`patternProperties`in e||`additionalProperties`in e||`required`in e)return!0;let n=typeof e.$ref==`string`&&dh.exec(e.$ref);if(n&&t[n[1]]?.[n[2]]?.type===`object`)return!0;for(let n of[`oneOf`,`anyOf`,`allOf`]){let r=e[n];if(Array.isArray(r)&&r.length>0)return r.every(e=>typeof e==`object`&&!!e&&(e.type===`object`||fh(e,`$id`in e?{}:t)))}return!1}function ph(e){return e.path?.length?`${e.path.map(e=>String(typeof e==`object`?e.key:e)).join(`.`)}: ${e.message}`:e.message}async function mh(e,t){let n=await e[`~standard`].validate(t);return n.issues&&n.issues.length>0?{success:!1,error:n.issues.map(e=>ph(e)).join(`, `)}:{success:!0,data:n.value}}function hh(e){let t=Ps(e,{target:lh,io:`input`});return typeof t.pattern==`string`?t.pattern:void 0}var gh=/\\\\\\.\\\\d\\{(\\d+)\\}/;function _h(e){let t=gh.exec(e),n=[void 0,-1,0];return t&&n.push(Number(t[1])),[!1,!0].flatMap(e=>[!1,!0].flatMap(t=>n.map(n=>wl({local:e,offset:t,precision:n}))))}function vh(e,t){let n;switch(e){case`email`:n=[sc()];break;case`uri`:n=[dc()];break;case`date`:n=[Tl()];break;case`date-time`:n=_h(t);break}return new Set(n.map(e=>hh(e)).filter(e=>e!==void 0))}function yh(e,t,n){return n!==`zod`||vh(e,t).has(t)}function bh(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function xh(e){try{return uh(e,`input`)}catch(e){let t=e instanceof Error?e.message:String(e);throw new qp(B.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${t}`)}}var Sh=new Set([`$comment`,`deprecated`,`description`,`examples`,`readOnly`,`title`,`writeOnly`]);function Ch(e){return Sh.has(e)||e.startsWith(`x-`)}var wh=new Set([`$schema`,...Object.keys(af.shape.requestedSchema.shape)]),Th={string:oh([qd,Yd,Xd,Zd]),number:oh([Jd]),integer:oh([Jd]),boolean:oh([Kd]),array:oh([$d,ef])},Eh=new Set(qd.shape.format.unwrap().options);function Dh(e,t,n,r){if(!bh(e))return e;let i=typeof e.type==`string`&&Object.hasOwn(Th,e.type)?Th[e.type]:void 0;if(i===void 0)return e;let a={};for(let[o,s]of Object.entries(e))i.has(o)||Ch(o)?a[o]=s:o===`pattern`&&e.type===`string`&&typeof e.format==`string`?Eh.has(e.format)?(typeof s!=`string`||!yh(e.format,s,n))&&r.push(`${t}.${o}`):a[o]=s:r.push(`${t}.${o}`);return a}function Oh(e,t){let n={},r=[];for(let[i,a]of Object.entries(e))i===`properties`&&bh(a)?n[i]=Object.fromEntries(Object.entries(a).map(([e,n])=>[e,Dh(n,`properties.${e}`,t,r)])):wh.has(i)?n[i]=a:Ch(i)||r.push(i);if(r.length>0)throw new qp(B.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(`, `)}`);return n}function kh(e,t){if(!bh(e.properties))return t;let n=Object.entries(e.properties).filter(([,e])=>!ah(rf,e).success).map(([e])=>`properties.${e}`);return n.length>0?n.join(`, `):t}function Ah(e,t,n=``){return Array.isArray(e)&&Array.isArray(t)?e.flatMap((e,r)=>Ah(e,t[r],`${n}[${r}]`)):!bh(e)||!bh(t)?[]:Object.entries(e).flatMap(([e,r])=>{let i=n?`${n}.${e}`:e;return Object.prototype.hasOwnProperty.call(t,e)?Ah(r,t[e],i):Ch(e)?[]:[i]})}function jh(e){if(!sh(e.requestedSchema))return{...e,mode:`form`,requestedSchema:e.requestedSchema};let t=e.requestedSchema[`~standard`].vendor,n=Oh(xh(e.requestedSchema),t),r=ah(af.shape.requestedSchema,n);if(!r.success)throw new qp(B.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${kh(n,r.error.message)}`);let i=Ah(n,r.data);if(i.length>0)throw new qp(B.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(`, `)}`);let a=(r.data.required??[]).filter(e=>!Object.prototype.hasOwnProperty.call(r.data.properties,e));if(a.length>0)throw new qp(B.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(`, `)}`);return{...e,mode:`form`,requestedSchema:r.data}}function Mh(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,n=typeof e.requestState==`string`;if(!t&&!n)throw TypeError(`inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)`);return{resultType:`input_required`,...e.inputRequests!==void 0&&{inputRequests:e.inputRequests},...e.requestState!==void 0&&{requestState:e.requestState}}}Object.assign(Mh,{elicit(e){try{return{method:`elicitation/create`,params:jh(e)}}catch(e){throw e instanceof qp?TypeError(e.message,{cause:e}):e}},elicitUrl(e){return{method:`elicitation/create`,params:{...e,mode:`url`}}},createMessage(e){return{method:`sampling/createMessage`,params:e}},listRoots(){return{method:`roots/list`}}});var Nh=!0,Ph=10,Fh=250;function Ih(e){return{autoFulfill:e?.autoFulfill??Nh,maxRounds:e?.maxRounds??Ph}}function Lh(e,t,n){let r=t!==void 0&&Object.keys(t).length>0;return!r&&n===void 0?e:{...e,...r&&{inputResponses:t},...n!==void 0&&{requestState:n}}}function Rh(e,t){return`Multi-round-trip request \'${e}\' still required input after ${t} rounds (inputRequired.maxRounds)`}function zh(e,t){return new Promise((n,r)=>{if(t?.aborted){r(t.reason instanceof z?t.reason:new z(R.RequestTimeout,String(t.reason)));return}let i=setTimeout(()=>{t?.removeEventListener(`abort`,a),n()},e),a=()=>{clearTimeout(i),r(t?.reason instanceof z?t.reason:new z(R.RequestTimeout,String(t?.reason)))};t?.addEventListener(`abort`,a,{once:!0})})}function Bh(e){let t=new AbortController,n=()=>t.abort(e?.reason);return e?.addEventListener(`abort`,n,{once:!0}),e?.aborted&&t.abort(e.reason),{signal:t.signal,abort:e=>t.abort(e),dispose:()=>e?.removeEventListener(`abort`,n)}}async function Vh(e){let{config:t,method:n,originalParams:r,requestOptions:i,hooks:a,signal:o}=e,s=e.flowStartedAt??Date.now(),c=e.firstPayload,l=0;for(;;){if(l+=1,l>t.maxRounds)throw new z(R.InputRequiredRoundsExceeded,Rh(n,t.maxRounds),{rounds:t.maxRounds,lastResult:{inputRequests:c.inputRequests,...c.requestState!==void 0&&{requestState:c.requestState}}});i.onprogress?.({progress:l,message:`Fulfilling input required by \'${n}\' (round ${l})`});let e=Object.entries(c.inputRequests??{}),u;if(e.length>0){let t=Bh(o);try{let n=await Promise.all(e.map(async([e,n])=>{try{return[e,await a.dispatchInputRequest(e,n,t.signal)]}catch(e){throw t.abort(e),e}}));u=Object.fromEntries(n)}finally{t.dispose()}}else await zh(Fh,o);let d={...i.timeout!==void 0&&{timeout:i.timeout}};if(i.maxTotalTimeout!==void 0){let e=Date.now()-s,t=i.maxTotalTimeout-e;if(t<=0)throw new z(R.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:i.maxTotalTimeout,totalElapsed:e});d.maxTotalTimeout=t}let f=await a.retry(Lh(r,u,c.requestState),d);if(Hm(f)){c={inputRequests:f.inputRequests??{},...f.requestState!==void 0&&{requestState:f.requestState}};continue}return f}}var Hh=`AnnotationsSchema.AudioContentSchema.BaseMetadataSchema.BlobResourceContentsSchema.BooleanSchemaSchema.CallToolRequestSchema.CallToolRequestParamsSchema.CallToolResultSchema.CancelledNotificationSchema.CancelledNotificationParamsSchema.CancelTaskRequestSchema.CancelTaskResultSchema.ClientCapabilitiesSchema.ClientNotificationSchema.ClientRequestSchema.ClientResultSchema.CompatibilityCallToolResultSchema.CompleteRequestSchema.CompleteRequestParamsSchema.CompleteResultSchema.ContentBlockSchema.CreateMessageRequestSchema.CreateMessageRequestParamsSchema.CreateMessageResultSchema.CreateMessageResultWithToolsSchema.CreateTaskResultSchema.CursorSchema.DiscoverRequestSchema.DiscoverResultSchema.ElicitationCompleteNotificationSchema.ElicitationCompleteNotificationParamsSchema.ElicitRequestSchema.ElicitRequestFormParamsSchema.ElicitRequestParamsSchema.ElicitRequestURLParamsSchema.ElicitResultSchema.EmbeddedResourceSchema.EmptyResultSchema.EnumSchemaSchema.GetPromptRequestSchema.GetPromptRequestParamsSchema.GetPromptResultSchema.GetTaskPayloadRequestSchema.GetTaskPayloadResultSchema.GetTaskRequestSchema.GetTaskResultSchema.IconSchema.IconsSchema.ImageContentSchema.ImplementationSchema.InitializedNotificationSchema.InitializeRequestSchema.InitializeRequestParamsSchema.InitializeResultSchema.JSONArraySchema.JSONObjectSchema.JSONRPCErrorResponseSchema.JSONRPCMessageSchema.JSONRPCNotificationSchema.JSONRPCRequestSchema.JSONRPCResponseSchema.JSONRPCResultResponseSchema.JSONValueSchema.LegacyTitledEnumSchemaSchema.ListPromptsRequestSchema.ListPromptsResultSchema.ListResourcesRequestSchema.ListResourcesResultSchema.ListResourceTemplatesRequestSchema.ListResourceTemplatesResultSchema.ListRootsRequestSchema.ListRootsResultSchema.ListTasksRequestSchema.ListTasksResultSchema.ListToolsRequestSchema.ListToolsResultSchema.LoggingLevelSchema.LoggingMessageNotificationSchema.LoggingMessageNotificationParamsSchema.ModelHintSchema.ModelPreferencesSchema.MultiSelectEnumSchemaSchema.NotificationSchema.NumberSchemaSchema.PaginatedRequestSchema.PaginatedRequestParamsSchema.PaginatedResultSchema.PingRequestSchema.PrimitiveSchemaDefinitionSchema.ProgressSchema.ProgressNotificationSchema.ProgressNotificationParamsSchema.ProgressTokenSchema.PromptSchema.PromptArgumentSchema.PromptListChangedNotificationSchema.PromptMessageSchema.PromptReferenceSchema.ReadResourceRequestSchema.ReadResourceRequestParamsSchema.ReadResourceResultSchema.RelatedTaskMetadataSchema.RequestSchema.RequestIdSchema.RequestMetaSchema.ResourceSchema.ResourceContentsSchema.ResourceLinkSchema.ResourceListChangedNotificationSchema.ResourceRequestParamsSchema.ResourceTemplateSchema.ResourceTemplateReferenceSchema.ResourceUpdatedNotificationSchema.ResourceUpdatedNotificationParamsSchema.ResultMetaObjectSchema.ResultSchema.RoleSchema.RootSchema.RootsListChangedNotificationSchema.SamplingContentSchema.SamplingMessageSchema.SamplingMessageContentBlockSchema.ServerCapabilitiesSchema.ServerNotificationSchema.ServerRequestSchema.ServerResultSchema.SetLevelRequestSchema.SetLevelRequestParamsSchema.SingleSelectEnumSchemaSchema.StringSchemaSchema.SubscribeRequestSchema.SubscribeRequestParamsSchema.SubscriptionFilterSchema.SubscriptionsAcknowledgedNotificationSchema.SubscriptionsAcknowledgedNotificationParamsSchema.SubscriptionsListenRequestSchema.SubscriptionsListenRequestParamsSchema.SubscriptionsListenResultSchema.SubscriptionsListenResultMetaSchema.TaskAugmentedRequestParamsSchema.TaskCreationParamsSchema.TaskMetadataSchema.TaskSchema.TaskStatusSchema.TaskStatusNotificationSchema.TaskStatusNotificationParamsSchema.TextContentSchema.TextResourceContentsSchema.TitledMultiSelectEnumSchemaSchema.TitledSingleSelectEnumSchemaSchema.ToolSchema.ToolAnnotationsSchema.ToolChoiceSchema.ToolExecutionSchema.ToolListChangedNotificationSchema.ToolResultContentSchema.ToolUseContentSchema.UnsubscribeRequestSchema.UnsubscribeRequestParamsSchema.UntitledMultiSelectEnumSchemaSchema.UntitledSingleSelectEnumSchemaSchema`.split(`.`),Uh={IdJagTokenExchangeResponseSchema:qf,OAuthClientInformationFullSchema:Qf,OAuthClientInformationSchema:Zf,OAuthClientMetadataSchema:Xf,OAuthClientRegistrationErrorSchema:$f,OAuthErrorResponseSchema:Jf,OAuthMetadataSchema:Uf,OAuthProtectedResourceMetadataSchema:Hf,OAuthTokenRevocationRequestSchema:ep,OAuthTokensSchema:Kf,OpenIdProviderDiscoveryMetadataSchema:Gf,OpenIdProviderMetadataSchema:Wf},Wh={},Gh={};function Kh(e,t){let n=e.slice(0,-6);Wh[n]=t,Gh[n]=e=>t.safeParse(e).success}for(let e of Hh)Kh(e,Lm[e]);for(let[e,t]of Object.entries(Uh))Kh(e,t);Object.freeze(Wh);var qh=Object.freeze(Gh);function Jh(e){switch(e){case`initialize`:case`notifications/initialized`:return jm(void 0);case`server/discover`:return jm(Am);default:return}}var Yh=[kl,Al,Ml,Pl],Xh=[`inputResponses`,`requestState`];function Zh(e,t){let n=e.params;if(!ng(n))return{message:e,lifted:{}};let r=n._meta,i=ng(r)?Yh.filter(e=>e in r):[],a=t===`request`?Xh.filter(e=>e in n):[];if(i.length===0&&a.length===0)return{message:e,lifted:{}};let o={},s={...n};if(i.length>0&&ng(r)){let e={},t={...r};for(let n of i)e[n]=r[n],delete t[n];o.envelope=e,Object.keys(t).length>0?s._meta=t:delete s._meta}for(let e of a)e===`inputResponses`&&(o.inputResponses=s[e]),e===`requestState`&&(o.requestState=s[e]),delete s[e];return{message:{...e,params:s},lifted:o}}function Qh(e,t){let n=e.validateResult(t,void 0);if(!(!n.ok&&n.reason===`not-in-era`))return{"~standard":{version:1,vendor:`mcp-wire-codec`,validate(n){let r=e.validateResult(t,n);return r.ok?{value:r.value}:{issues:[{message:r.reason===`invalid`?r.message:`not-in-era: ${t}`}]}}}}}function $h(e){return()=>e}var eg=$h(void 0),tg=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_customSchemaRequestMethods=new Set;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??Dl,this.setNotificationHandler(`notifications/cancelled`,e=>{this._oncancel(e)}),this.setNotificationHandler(`notifications/progress`,e=>{this._onprogress(e)}),this.setRequestHandler(`ping`,e=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(t===void 0)return e;let n=e.params??{};return{...e,params:{...n,_meta:{...t,...n._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new z(R.UnsupportedResultType,`Unsupported result type \'${e.kind}\' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){e.params.requestId!==void 0&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new z(R.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),Bm(e)||Vm(e)?this._onresponse(e):Rm(e)?this._onrequest(e,t):zm(e)?this._onnotification(e,t):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let n=new z(R.ConnectionClosed,`Connection closed`);this._transport=void 0;try{this.onclose?.()}finally{for(let t of e.values())t(n);for(let e of t.values())e.abort(n)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:n}=Zh(e,`notification`),r=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`)return;if(t?.classification!==void 0){let e=Mm(t.classification);if(e!==r.era){this._onerror(Error(`Era mismatch on inbound notification \'${n.method}\': classified as ${e} but this instance serves ${r.era}`));return}}if(Pm(n.method)&&!r.hasNotificationMethod(n.method))return;let i=this._notificationHandlers.get(n.method),a=this.fallbackNotificationHandler;i===void 0&&a===void 0||Promise.resolve().then(()=>i===void 0?a(n):i(n,r)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let{message:n,lifted:r}=Zh(e,`request`),i=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`){this._onerror(Error(`Dropped inbound request \'${e.method}\': not servable on this connection\'s protocol era`));return}let a=this._transport,o=(e,t,r)=>{let i={jsonrpc:`2.0`,id:n.id,error:{code:e,message:t,...r!==void 0&&{data:r}}};a?.send(i).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)))};if(t?.classification!==void 0){let e=Mm(t.classification);if(e!==i.era){this._onerror(Error(`Era mismatch on inbound request \'${n.method}\': classified as ${e} but this instance serves ${i.era}`));let r=t.classification.revision??e;o(B.UnsupportedProtocolVersion,`Unsupported protocol version: ${r}`,{supported:this._supportedProtocolVersions,requested:r});return}}if(Nm(n.method)&&!i.hasRequestMethod(n.method)&&!(Fm(n.method)&&this._customSchemaRequestMethods.has(n.method))){o(B.MethodNotFound,`Method not found`);return}let s=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(s===void 0){o(B.MethodNotFound,`Method not found`);return}let c=i.checkInboundEnvelope(r);if(c!==void 0){o(B.InvalidParams,c);return}let l=(e,t)=>this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,{...t,relatedRequestId:n.id}),u=(e,t,r)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(e.method),e,t,{...r,relatedRequestId:n.id}),d=new AbortController;this._requestHandlerAbortControllers.set(n.id,d);let f=r.inputResponses===void 0?void 0:ag(r.inputResponses),p={sessionId:a?.sessionId,mcpReq:{id:n.id,method:n.method,_meta:n.params?._meta,...r.envelope!==void 0&&{envelope:r.envelope},...f!==void 0&&{inputResponses:f.accepted},...f!==void 0&&f.droppedKeys.length>0&&{droppedInputResponseKeys:f.droppedKeys},requestState:r.requestState===void 0?eg:$h(r.requestState),signal:d.signal,send:((e,t,n)=>{let r=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(r,e.method),sh(t))return u(e,t,n);let i=Qh(r,e.method);if(i===void 0)throw TypeError(`\'${e.method}\' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return u(e,i,t)}),notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},m=this.buildContext(p,t);Promise.resolve().then(()=>s(n,m)).then(async e=>{if(d.signal.aborted)return;let t;try{t=i.encodeResult(n.method,e,this._outboundServerInfo())}catch(e){this._onerror(Error(`Failed to encode result for ${n.method}: ${e}`)),o(B.InternalError,`Internal error`);return}let r={result:t,jsonrpc:`2.0`,id:n.id};await a?.send(r)},async e=>{if(d.signal.aborted)return;let t=Number.isSafeInteger(e.code)?e.code:B.InternalError,r={jsonrpc:`2.0`,id:n.id,error:{code:i.encodeErrorCode(t),message:e.message??`Internal error`,...e.data!==void 0&&{data:e.data}}};await a?.send(r)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(n.id)===d&&this._requestHandlerAbortControllers.delete(n.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._responseHandlers.get(t);if(n===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),Bm(e)?n(e):n(qp.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,n){let r=this._resolveOutboundCodec(e.method);if(sh(t))return Fm(e.method)||this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,n);this._assertOutboundRequestInEra(r,e.method);let i=Qh(r,e.method);if(i===void 0)throw TypeError(`\'${e.method}\' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(r,e,i,t)}_negotiatedWireCodec(){return jm(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=Jh(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(Nm(t)&&!e.hasRequestMethod(t))throw new z(R.MethodNotSupportedByProtocolVersion,`Method \'${t}\' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,n){let r=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,n)}_requestWithSchemaViaCodec(e,t,n,r){let{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s}=r??{},c=Date.now(),l,u;return new Promise((d,f)=>{let p=e=>{f(e)};if(!this._transport){p(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(e){p(e);return}if(r?.signal?.aborted){let e=r.signal.reason;throw e instanceof z?e:new z(R.RequestTimeout,String(e))}let m=e.era===`2026-07-28`&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,h=this._requestMessageId++;u=h;let g={...t,jsonrpc:`2.0`,id:h};r?.onprogress&&(this._progressHandlers.set(h,r.onprogress),g.params={...t.params,_meta:{...t.params?._meta,progressToken:h}});let _=this._envelopeOutbound(g),v=!1,y=e=>{v||(this._progressHandlers.delete(h),m===void 0?t.method!==`initialize`&&this._transport?.send(this._envelopeOutbound({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:h,reason:String(e)}}),{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))):m.abort(),f(e instanceof z?e:new z(R.RequestTimeout,String(e))))};this._responseHandlers.set(h,i=>{if(r?.signal?.aborted)return;if(v=!0,i instanceof Error)return f(i);let a;try{a=e.decodeResult(t.method,i.result)}catch(e){return f(e instanceof Error?e:Error(String(e)))}if(a.kind===`invalid`)return f(a.error);if(a.kind===`input_required`){if(r?.allowInputRequired===!0)return d(dg(a));let i={codec:e,request:t,resultSchema:n,options:r,flowStartedAt:c,retry:(r,i)=>this._requestWithSchemaViaCodec(e,r===void 0?{method:t.method}:{method:t.method,params:r},n,i)};return d(this._resolveNonCompleteResult(a,i))}let o=a.result;mh(n,o).then(e=>{e.success?d(e.data):f(new z(R.InvalidResult,`Invalid result for ${t.method}: ${e.error}`))},f)}),l=()=>y(r?.signal?.reason),r?.signal?.addEventListener(`abort`,l,{once:!0});let ee=r?.timeout??6e4;this._setupTimeout(h,ee,r?.maxTotalTimeout,()=>y(new z(R.RequestTimeout,`Request timed out`,{timeout:ee})),r?.resetTimeoutOnProgress??!1),this._transport.send(_,{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s,requestSignal:m?.signal}).catch(e=>{this._progressHandlers.delete(h),f(e)})}).finally(()=>{l&&r?.signal?.removeEventListener(`abort`,l),u!==void 0&&(this._responseHandlers.delete(u),this._cleanupTimeout(u))})}async notification(e,t){return await this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,n){if(!this._transport)throw new z(R.NotConnected,`Not connected`);if(Pm(t.method)&&!e.hasNotificationMethod(t.method))throw new z(R.MethodNotSupportedByProtocolVersion,`Notification \'${t.method}\' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let r=this._envelopeOutbound({jsonrpc:`2.0`,...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&n?.relatedRequestId===void 0){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{this._pendingDebouncedNotifications.delete(t.method),this._transport&&this._transport?.send(r,n).catch(e=>this._onerror(e))});return}await this._transport.send(r,n)}setRequestHandler(e,t,n){this.assertRequestHandlerCapability(e);let r;if(typeof t==`function`){if(!Nm(e))throw TypeError(`\'${e}\' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);r=(n,r)=>{let i=this._negotiatedWireCodec(),a=i.validateRequest(e,n);if(!a.ok&&a.reason===`not-in-era`&&(a=i.validateInputRequest(e,n)),!a.ok)throw a.reason===`not-in-era`?new qp(B.InternalError,`No wire schema for ${e} in the resolved era`):Error(a.message);return Promise.resolve(t(a.value,r))}}else if(n)r=async(r,i)=>{let a=await mh(t.params,{...r.params});if(!a.success)throw new qp(B.InvalidParams,`Invalid params for ${e}: ${a.error}`);return n(a.data,i)};else throw TypeError(`setRequestHandler: handler is required`);typeof t==`function`?this._customSchemaRequestMethods.delete(e):this._customSchemaRequestMethods.add(e),this._requestHandlers.set(e,this._wrapHandler(e,r))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e),this._customSchemaRequestMethods.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,n){if(typeof t==`function`){if(!Pm(e))throw TypeError(`\'${e}\' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(n,r)=>{let i=r.validateNotification(e,n);if(!i.ok)throw i.reason===`not-in-era`?new qp(B.InternalError,`No wire schema for ${e} in the resolved era`):Error(i.message);return Promise.resolve(t(i.value))});return}if(!n)throw TypeError(`setNotificationHandler: handler is required`);this._notificationHandlers.set(e,async r=>{let i=await mh(t.params,{...r.params});if(!i.success)throw new qp(B.InvalidParams,`Invalid params for notification ${e}: ${i.error}`);await n(i.data,r)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function ng(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function rg(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=ng(a)&&ng(i)?{...a,...i}:i}return n}function ig(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ag(e){let t={},n=[];if(!ig(e))return{accepted:t,droppedKeys:n};for(let[r,i]of Object.entries(e)){if(!ig(i)||`method`in i||`result`in i){n.push(r);continue}t[r]=i}return{accepted:t,droppedKeys:n}}function og(e){throw new z(R.SendFailed,`ctx.mcpReq.${e} is not available while fulfilling an embedded input request: the request is fulfilled locally and has no related peer request`)}function sg(e,t,n,r,i){return{sessionId:i,mcpReq:{id:e,method:t,_meta:n?._meta,requestState:$h(void 0),signal:r,send:(()=>og(`send`)),notify:()=>og(`notify`)}}}async function cg(e,t,n,r,i){if(!ig(r)||typeof r.method!=`string`)throw new z(R.InvalidResult,`Invalid input request \'${n}\': each inputRequests entry must be an embedded request object with a method`,{key:n});let a=r.method;if(!t.hasInputRequestMethod(a))throw new z(R.InvalidResult,`Invalid input request \'${n}\': \'${a}\' is not an embedded request the ${t.era} revision defines (expected elicitation/create, sampling/createMessage, or roots/list)`,{key:n,method:a});let o=e.getRequestHandler(a);if(o===void 0)throw new z(R.CapabilityNotSupported,`Cannot fulfil input request \'${n}\': no handler is registered for \'${a}\' on this client. Declare the corresponding capability and register a handler, or handle input_required results manually.`,{key:n,method:a});let s=ig(r.params)?r.params:void 0;return await o({jsonrpc:`2.0`,id:n,method:a,...s!==void 0&&{params:s}},e.buildContext(sg(n,a,s,i,e.sessionId)))}function lg(e,t){return{...e?.signal!==void 0&&{signal:e.signal},...e?.onprogress!==void 0&&{onprogress:e.onprogress},...e?.resetTimeoutOnProgress!==void 0&&{resetTimeoutOnProgress:e.resetTimeoutOnProgress},...e?.headers!==void 0&&{headers:e.headers},...t.timeout!==void 0&&{timeout:t.timeout},...t.maxTotalTimeout!==void 0&&{maxTotalTimeout:t.maxTotalTimeout},allowInputRequired:!0}}function ug(e,t,n,r){let{codec:i,request:a,options:o,flowStartedAt:s}=r,c={inputRequests:n.inputRequests,...n.requestState!==void 0&&{requestState:n.requestState}},l={dispatchInputRequest:(t,n,r)=>cg(e,i,t,n,r),retry:(e,t)=>r.retry(e,lg(o,t))};return Vh({config:t,method:a.method,originalParams:a.params,firstPayload:c,flowStartedAt:s,signal:o?.signal,requestOptions:{...o?.timeout!==void 0&&{timeout:o.timeout},...o?.maxTotalTimeout!==void 0&&{maxTotalTimeout:o.maxTotalTimeout},...o?.onprogress!==void 0&&{onprogress:o.onprogress}},hooks:l})}function dg(e){return{resultType:`input_required`,inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState},...e._meta!==void 0&&{_meta:e._meta}}}p((e=>{var t=/; *([!#$%&\'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\\u000b\\u0020\\u0021\\u0023-\\u005b\\u005d-\\u007e\\u0080-\\u00ff]|\\\\[\\u000b\\u0020-\\u00ff])*"|[!#$%&\'*+.^_`|~0-9A-Za-z-]+) */g,n=/\\\\([\\u000b\\u0020-\\u00ff])/g,r=/^[!#$%&\'*+.^_`|~0-9A-Za-z-]+\\/[!#$%&\'*+.^_`|~0-9A-Za-z-]+$/;e.parse=i;function i(e){if(!e)throw TypeError(`argument string is required`);var i=typeof e==`object`?a(e):e;if(typeof i!=`string`)throw TypeError(`argument string is required to be a string`);var s=i.indexOf(`;`),c=s===-1?i.trim():i.slice(0,s).trim();if(!r.test(c))throw TypeError(`invalid media type`);var l=new o(c.toLowerCase());if(s!==-1){var u,d,f;for(t.lastIndex=s;d=t.exec(i);){if(d.index!==s)throw TypeError(`invalid parameter format`);s+=d[0].length,u=d[1].toLowerCase(),f=d[2],f.charCodeAt(0)===34&&(f=f.slice(1,-1),f.indexOf(`\\\\`)!==-1&&(f=f.replace(n,`$1`))),l.parameters[u]=f}if(s!==i.length)throw TypeError(`invalid parameter format`)}return l}function a(e){var t;if(typeof e.getHeader==`function`?t=e.getHeader(`content-type`):typeof e.headers==`object`&&(t=e.headers&&e.headers[`content-type`]),typeof t!=`string`)throw TypeError(`content-type header is missing from object`);return t}function o(e){this.parameters=Object.create(null),this.type=e}}))();function fg(e,t){let n=typeof e;if(n!==typeof t)return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(!fg(e[r],t[r]))return!1;return!0}if(n===`object`){if(!e||!t)return e===t;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!fg(e[r],t[r]))return!1;return!0}return e===t}function pg(e){return encodeURI(mg(e))}function mg(e){return e.replace(/~/g,`~0`).replace(/\\//g,`~1`)}var hg={prefixItems:!0,items:!0,allOf:!0,anyOf:!0,oneOf:!0},gg={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependentSchemas:!0},_g={id:!0,$id:!0,$ref:!0,$schema:!0,$anchor:!0,$vocabulary:!0,$comment:!0,default:!0,enum:!0,const:!0,required:!0,type:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0},vg=typeof self<`u`&&self.location&&self.location.origin!==`null`?new URL(self.location.origin+self.location.pathname+location.search):new URL(`https://github.com/cfworker`);function yg(e,t=Object.create(null),n=vg,r=``){if(e&&typeof e==`object`&&!Array.isArray(e)){let i=e.$id||e.id;if(i){let a=new URL(i,n.href);a.hash.length>1?t[a.href]=e:(a.hash=``,r===``?n=a:yg(e,t,n))}}else if(e!==!0&&e!==!1)return t;let i=n.href+(r?`#`+r:``);if(t[i]!==void 0)throw Error(`Duplicate schema URI "${i}".`);if(t[i]=e,e===!0||e===!1)return t;if(e.__absolute_uri__===void 0&&Object.defineProperty(e,"__absolute_uri__",{enumerable:!1,value:i}),e.$ref&&e.__absolute_ref__===void 0){let t=new URL(e.$ref,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_ref__",{enumerable:!1,value:t.href})}if(e.$recursiveRef&&e.__absolute_recursive_ref__===void 0){let t=new URL(e.$recursiveRef,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_recursive_ref__",{enumerable:!1,value:t.href})}if(e.$anchor){let r=new URL(`#`+e.$anchor,n.href);t[r.href]=e}for(let i in e){if(_g[i])continue;let a=`${r}/${pg(i)}`,o=e[i];if(Array.isArray(o)){if(hg[i]){let e=o.length;for(let r=0;r<e;r++)yg(o[r],t,n,`${a}/${r}`)}}else if(gg[i])for(let e in o)yg(o[e],t,n,`${a}/${pg(e)}`);else yg(o,t,n,a)}return t}var bg=/^(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)$/,xg=[0,31,28,31,30,31,30,31,31,30,31,30,31],Sg=/^(\\d\\d):(\\d\\d):(\\d\\d)(\\.\\d+)?(z|[+-]\\d\\d(?::?\\d\\d)?)?$/i,Cg=/^(?=.{1,253}\\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\\.?$/i,wg=/^(?:[a-z][a-z0-9+\\-.]*:)?(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&\'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&\'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&\'"()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\\?(?:[a-z0-9\\-._~!$&\'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&\'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,Tg=/^(?:(?:[^\\x00-\\x20"\'<>%\\\\^`{|}]|%[0-9a-f]{2})|\\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?)*\\})*$/i,Eg=/^(?:(?:https?|ftp):\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!10(?:\\.\\d{1,3}){3})(?!127(?:\\.\\d{1,3}){3})(?!169\\.254(?:\\.\\d{1,3}){2})(?!192\\.168(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u{00a1}-\\u{ffff}0-9]+-?)*[a-z\\u{00a1}-\\u{ffff}0-9]+)(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}0-9]+-?)*[a-z\\u{00a1}-\\u{ffff}0-9]+)*(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}]{2,})))(?::\\d{2,5})?(?:\\/[^\\s]*)?$/iu,Dg=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Og=/^(?:\\/(?:[^~/]|~0|~1)*)*$/,kg=/^#(?:\\/(?:[a-z0-9_\\-.!$&\'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Ag=/^(?:0|[1-9][0-9]*)(?:#|(?:\\/(?:[^~/]|~0|~1)*)*)$/,jg=e=>{if(e[0]===`"`)return!1;let[t,n,...r]=e.split(`@`);return!t||!n||r.length!==0||t.length>64||n.length>253||t[0]===`.`||t.endsWith(`.`)||t.includes(`..`)||!/^[a-z0-9.-]+$/i.test(n)||!/^[a-z0-9.!#$%&\'*+/=?^_`{|}~-]+$/i.test(t)?!1:n.split(`.`).every(e=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(e))},Mg=/^(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)$/,Ng=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))$/i,Pg=e=>e.length>1&&e.length<80&&(/^P\\d+([.,]\\d+)?W$/.test(e)||/^P[\\dYMDTHS]*(\\d[.,]\\d+)?[YMDHS]$/.test(e)&&/^P([.,\\d]+Y)?([.,\\d]+M)?([.,\\d]+D)?(T([.,\\d]+H)?([.,\\d]+M)?([.,\\d]+S)?)?$/.test(e));function Fg(e){return e.test.bind(e)}var Ig={date:Rg,time:zg.bind(void 0,!1),"date-time":Vg,duration:Pg,uri:Wg,"uri-reference":Fg(wg),"uri-template":Fg(Tg),url:Fg(Eg),email:jg,hostname:Fg(Cg),ipv4:Fg(Mg),ipv6:Fg(Ng),regex:Kg,uuid:Fg(Dg),"json-pointer":Fg(Og),"json-pointer-uri-fragment":Fg(kg),"relative-json-pointer":Fg(Ag)};function Lg(e){return e%4==0&&(e%100!=0||e%400==0)}function Rg(e){let t=e.match(bg);if(!t)return!1;let n=+t[1],r=+t[2],i=+t[3];return r>=1&&r<=12&&i>=1&&i<=(r==2&&Lg(n)?29:xg[r])}function zg(e,t){let n=t.match(Sg);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=!!n[5];return(r<=23&&i<=59&&a<=59||r==23&&i==59&&a==60)&&(!e||o)}var Bg=/t|\\s/i;function Vg(e){let t=e.split(Bg);return t.length==2&&Rg(t[0])&&zg(!0,t[1])}var Hg=/\\/|:/,Ug=/^(?:[a-z][a-z0-9+\\-.]*:)(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&\'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&\'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&\'()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\\?(?:[a-z0-9\\-._~!$&\'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&\'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function Wg(e){return Hg.test(e)&&Ug.test(e)}var Gg=/[^\\\\]\\\\Z/;function Kg(e){if(Gg.test(e))return!1;try{return new RegExp(e,`u`),!0}catch{return!1}}function qg(e){let t=0,n=e.length,r=0,i;for(;r<n;)t++,i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<n&&(i=e.charCodeAt(r),(i&64512)==56320&&r++);return t}function Jg(e,t,n=`2019-09`,r=yg(t),i=!0,a=null,o=`#`,s=`#`,c=Object.create(null)){if(t===!0)return{valid:!0,errors:[]};if(t===!1)return{valid:!1,errors:[{instanceLocation:o,keyword:`false`,keywordLocation:o,error:`False boolean schema.`}]};let l=typeof e,u;switch(l){case`boolean`:case`number`:case`string`:u=l;break;case`object`:u=e===null?`null`:Array.isArray(e)?`array`:`object`;break;default:throw Error(`Instances of "${l}" type are not supported.`)}let{$ref:d,$recursiveRef:f,$recursiveAnchor:p,type:m,const:h,enum:g,required:_,not:v,anyOf:y,allOf:ee,oneOf:te,if:ne,then:re,else:ie,format:ae,properties:oe,patternProperties:se,additionalProperties:ce,unevaluatedProperties:le,minProperties:ue,maxProperties:de,propertyNames:fe,dependentRequired:pe,dependentSchemas:b,dependencies:me,prefixItems:he,items:ge,additionalItems:_e,unevaluatedItems:ve,contains:ye,minContains:be,maxContains:xe,minItems:Se,maxItems:Ce,uniqueItems:we,minimum:Te,maximum:Ee,exclusiveMinimum:De,exclusiveMaximum:x,multipleOf:Oe,minLength:ke,maxLength:Ae,pattern:je,__absolute_ref__:Me,__absolute_recursive_ref__:Ne}=t,S=[];if(p===!0&&a===null&&(a=t),f===`#`){let l=a===null?r[Ne]:a,u=`${s}/$recursiveRef`,d=Jg(e,a===null?t:a,n,r,i,l,o,u,c);d.valid||S.push({instanceLocation:o,keyword:`$recursiveRef`,keywordLocation:u,error:`A subschema had errors.`},...d.errors)}if(d!==void 0){let t=r[Me||d];if(t===void 0){let e=`Unresolved $ref "${d}".`;throw Me&&Me!==d&&(e+=` Absolute URI "${Me}".`),e+=`\\nKnown schemas:\\n- ${Object.keys(r).join(`\n- `)}`,Error(e)}let l=`${s}/$ref`,u=Jg(e,t,n,r,i,a,o,l,c);if(u.valid||S.push({instanceLocation:o,keyword:`$ref`,keywordLocation:l,error:`A subschema had errors.`},...u.errors),n===`4`||n===`7`)return{valid:S.length===0,errors:S}}if(Array.isArray(m)){let t=m.length,n=!1;for(let r=0;r<t;r++)if(u===m[r]||m[r]===`integer`&&u===`number`&&e%1==0&&e===e){n=!0;break}n||S.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m.join(`", "`)}".`})}else m===`integer`?(u!==`number`||e%1||e!==e)&&S.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m}".`}):m!==void 0&&u!==m&&S.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m}".`});if(h!==void 0&&(u===`object`||u===`array`?fg(e,h)||S.push({instanceLocation:o,keyword:`const`,keywordLocation:`${s}/const`,error:`Instance does not match ${JSON.stringify(h)}.`}):e!==h&&S.push({instanceLocation:o,keyword:`const`,keywordLocation:`${s}/const`,error:`Instance does not match ${JSON.stringify(h)}.`})),g!==void 0&&(u===`object`||u===`array`?g.some(t=>fg(e,t))||S.push({instanceLocation:o,keyword:`enum`,keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`}):g.some(t=>e===t)||S.push({instanceLocation:o,keyword:`enum`,keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`})),v!==void 0){let t=`${s}/not`;Jg(e,v,n,r,i,a,o,t).valid&&S.push({instanceLocation:o,keyword:`not`,keywordLocation:t,error:`Instance matched "not" schema.`})}let Pe=[];if(y!==void 0){let t=`${s}/anyOf`,l=S.length,u=!1;for(let s=0;s<y.length;s++){let l=y[s],d=Object.create(c),f=Jg(e,l,n,r,i,p===!0?a:null,o,`${t}/${s}`,d);S.push(...f.errors),u||=f.valid,f.valid&&Pe.push(d)}u?S.length=l:S.splice(l,0,{instanceLocation:o,keyword:`anyOf`,keywordLocation:t,error:`Instance does not match any subschemas.`})}if(ee!==void 0){let t=`${s}/allOf`,l=S.length,u=!0;for(let s=0;s<ee.length;s++){let l=ee[s],d=Object.create(c),f=Jg(e,l,n,r,i,p===!0?a:null,o,`${t}/${s}`,d);S.push(...f.errors),u&&=f.valid,f.valid&&Pe.push(d)}u?S.length=l:S.splice(l,0,{instanceLocation:o,keyword:`allOf`,keywordLocation:t,error:`Instance does not match every subschema.`})}if(te!==void 0){let t=`${s}/oneOf`,l=S.length,u=te.filter((s,l)=>{let u=Object.create(c),d=Jg(e,s,n,r,i,p===!0?a:null,o,`${t}/${l}`,u);return S.push(...d.errors),d.valid&&Pe.push(u),d.valid}).length;u===1?S.length=l:S.splice(l,0,{instanceLocation:o,keyword:`oneOf`,keywordLocation:t,error:`Instance does not match exactly one subschema (${u} matches).`})}if((u===`object`||u===`array`)&&Object.assign(c,...Pe),ne!==void 0){let t=`${s}/if`;if(Jg(e,ne,n,r,i,a,o,t,c).valid){if(re!==void 0){let l=Jg(e,re,n,r,i,a,o,`${s}/then`,c);l.valid||S.push({instanceLocation:o,keyword:`if`,keywordLocation:t,error:`Instance does not match "then" schema.`},...l.errors)}}else if(ie!==void 0){let l=Jg(e,ie,n,r,i,a,o,`${s}/else`,c);l.valid||S.push({instanceLocation:o,keyword:`if`,keywordLocation:t,error:`Instance does not match "else" schema.`},...l.errors)}}if(u===`object`){if(_!==void 0)for(let t of _)t in e||S.push({instanceLocation:o,keyword:`required`,keywordLocation:`${s}/required`,error:`Instance does not have required property "${t}".`});let t=Object.keys(e);if(ue!==void 0&&t.length<ue&&S.push({instanceLocation:o,keyword:`minProperties`,keywordLocation:`${s}/minProperties`,error:`Instance does not have at least ${ue} properties.`}),de!==void 0&&t.length>de&&S.push({instanceLocation:o,keyword:`maxProperties`,keywordLocation:`${s}/maxProperties`,error:`Instance does not have at least ${de} properties.`}),fe!==void 0){let t=`${s}/propertyNames`;for(let s in e){let e=`${o}/${pg(s)}`,c=Jg(s,fe,n,r,i,a,e,t);c.valid||S.push({instanceLocation:o,keyword:`propertyNames`,keywordLocation:t,error:`Property name "${s}" does not match schema.`},...c.errors)}}if(pe!==void 0){let t=`${s}/dependantRequired`;for(let n in pe)if(n in e){let r=pe[n];for(let i of r)i in e||S.push({instanceLocation:o,keyword:`dependentRequired`,keywordLocation:t,error:`Instance has "${n}" but does not have "${i}".`})}}if(b!==void 0)for(let t in b){let l=`${s}/dependentSchemas`;if(t in e){let s=Jg(e,b[t],n,r,i,a,o,`${l}/${pg(t)}`,c);s.valid||S.push({instanceLocation:o,keyword:`dependentSchemas`,keywordLocation:l,error:`Instance has "${t}" but does not match dependant schema.`},...s.errors)}}if(me!==void 0){let t=`${s}/dependencies`;for(let s in me)if(s in e){let c=me[s];if(Array.isArray(c))for(let n of c)n in e||S.push({instanceLocation:o,keyword:`dependencies`,keywordLocation:t,error:`Instance has "${s}" but does not have "${n}".`});else{let l=Jg(e,c,n,r,i,a,o,`${t}/${pg(s)}`);l.valid||S.push({instanceLocation:o,keyword:`dependencies`,keywordLocation:t,error:`Instance has "${s}" but does not match dependant schema.`},...l.errors)}}}let l=Object.create(null),u=!1;if(oe!==void 0){let t=`${s}/properties`;for(let s in oe){if(!(s in e))continue;let d=`${o}/${pg(s)}`,f=Jg(e[s],oe[s],n,r,i,a,d,`${t}/${pg(s)}`);if(f.valid)c[s]=l[s]=!0;else if(u=i,S.push({instanceLocation:o,keyword:`properties`,keywordLocation:t,error:`Property "${s}" does not match schema.`},...f.errors),u)break}}if(!u&&se!==void 0){let t=`${s}/patternProperties`;for(let s in se){let d=new RegExp(s,`u`),f=se[s];for(let p in e){if(!d.test(p))continue;let m=`${o}/${pg(p)}`,h=Jg(e[p],f,n,r,i,a,m,`${t}/${pg(s)}`);h.valid?c[p]=l[p]=!0:(u=i,S.push({instanceLocation:o,keyword:`patternProperties`,keywordLocation:t,error:`Property "${p}" matches pattern "${s}" but does not match associated schema.`},...h.errors))}}}if(!u&&ce!==void 0){let t=`${s}/additionalProperties`;for(let s in e){if(l[s])continue;let d=`${o}/${pg(s)}`,f=Jg(e[s],ce,n,r,i,a,d,t);f.valid?c[s]=!0:(u=i,S.push({instanceLocation:o,keyword:`additionalProperties`,keywordLocation:t,error:`Property "${s}" does not match additional properties schema.`},...f.errors))}}else if(!u&&le!==void 0){let t=`${s}/unevaluatedProperties`;for(let s in e)if(!c[s]){let l=`${o}/${pg(s)}`,u=Jg(e[s],le,n,r,i,a,l,t);u.valid?c[s]=!0:S.push({instanceLocation:o,keyword:`unevaluatedProperties`,keywordLocation:t,error:`Property "${s}" does not match unevaluated properties schema.`},...u.errors)}}}else if(u===`array`){Ce!==void 0&&e.length>Ce&&S.push({instanceLocation:o,keyword:`maxItems`,keywordLocation:`${s}/maxItems`,error:`Array has too many items (${e.length} > ${Ce}).`}),Se!==void 0&&e.length<Se&&S.push({instanceLocation:o,keyword:`minItems`,keywordLocation:`${s}/minItems`,error:`Array has too few items (${e.length} < ${Se}).`});let t=e.length,l=0,u=!1;if(he!==void 0){let d=`${s}/prefixItems`,f=Math.min(he.length,t);for(;l<f;l++){let t=Jg(e[l],he[l],n,r,i,a,`${o}/${l}`,`${d}/${l}`);if(c[l]=!0,!t.valid&&(u=i,S.push({instanceLocation:o,keyword:`prefixItems`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}}if(ge!==void 0){let d=`${s}/items`;if(Array.isArray(ge)){let s=Math.min(ge.length,t);for(;l<s;l++){let t=Jg(e[l],ge[l],n,r,i,a,`${o}/${l}`,`${d}/${l}`);if(c[l]=!0,!t.valid&&(u=i,S.push({instanceLocation:o,keyword:`items`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}}else for(;l<t;l++){let t=Jg(e[l],ge,n,r,i,a,`${o}/${l}`,d);if(c[l]=!0,!t.valid&&(u=i,S.push({instanceLocation:o,keyword:`items`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}if(!u&&_e!==void 0){let d=`${s}/additionalItems`;for(;l<t;l++){let t=Jg(e[l],_e,n,r,i,a,`${o}/${l}`,d);c[l]=!0,t.valid||(u=i,S.push({instanceLocation:o,keyword:`additionalItems`,keywordLocation:d,error:`Items did not match additional items schema.`},...t.errors))}}}if(ye!==void 0)if(t===0&&be===void 0)S.push({instanceLocation:o,keyword:`contains`,keywordLocation:`${s}/contains`,error:`Array is empty. It must contain at least one item matching the schema.`});else if(be!==void 0&&t<be)S.push({instanceLocation:o,keyword:`minContains`,keywordLocation:`${s}/minContains`,error:`Array has less items (${t}) than minContains (${be}).`});else{let l=`${s}/contains`,u=S.length,d=0;for(let s=0;s<t;s++){let t=Jg(e[s],ye,n,r,i,a,`${o}/${s}`,l);t.valid?(c[s]=!0,d++):S.push(...t.errors)}d>=(be||0)&&(S.length=u),be===void 0&&xe===void 0&&d===0?S.splice(u,0,{instanceLocation:o,keyword:`contains`,keywordLocation:l,error:`Array does not contain item matching schema.`}):be!==void 0&&d<be?S.push({instanceLocation:o,keyword:`minContains`,keywordLocation:`${s}/minContains`,error:`Array must contain at least ${be} items matching schema. Only ${d} items were found.`}):xe!==void 0&&d>xe&&S.push({instanceLocation:o,keyword:`maxContains`,keywordLocation:`${s}/maxContains`,error:`Array may contain at most ${xe} items matching schema. ${d} items were found.`})}if(!u&&ve!==void 0){let u=`${s}/unevaluatedItems`;for(;l<t;l++){if(c[l])continue;let t=Jg(e[l],ve,n,r,i,a,`${o}/${l}`,u);c[l]=!0,t.valid||S.push({instanceLocation:o,keyword:`unevaluatedItems`,keywordLocation:u,error:`Items did not match unevaluated items schema.`},...t.errors)}}if(we)for(let n=0;n<t;n++){let r=e[n],i=typeof r==`object`&&!!r;for(let a=0;a<t;a++){if(n===a)continue;let t=e[a];(r===t||i&&typeof t==`object`&&t&&fg(r,t))&&(S.push({instanceLocation:o,keyword:`uniqueItems`,keywordLocation:`${s}/uniqueItems`,error:`Duplicate items at indexes ${n} and ${a}.`}),n=2**53-1,a=2**53-1)}}}else if(u===`number`){if(n===`4`?(Te!==void 0&&(De===!0&&e<=Te||e<Te)&&S.push({instanceLocation:o,keyword:`minimum`,keywordLocation:`${s}/minimum`,error:`${e} is less than ${De?`or equal to `:``} ${Te}.`}),Ee!==void 0&&(x===!0&&e>=Ee||e>Ee)&&S.push({instanceLocation:o,keyword:`maximum`,keywordLocation:`${s}/maximum`,error:`${e} is greater than ${x?`or equal to `:``} ${Ee}.`})):(Te!==void 0&&e<Te&&S.push({instanceLocation:o,keyword:`minimum`,keywordLocation:`${s}/minimum`,error:`${e} is less than ${Te}.`}),Ee!==void 0&&e>Ee&&S.push({instanceLocation:o,keyword:`maximum`,keywordLocation:`${s}/maximum`,error:`${e} is greater than ${Ee}.`}),De!==void 0&&e<=De&&S.push({instanceLocation:o,keyword:`exclusiveMinimum`,keywordLocation:`${s}/exclusiveMinimum`,error:`${e} is less than ${De}.`}),x!==void 0&&e>=x&&S.push({instanceLocation:o,keyword:`exclusiveMaximum`,keywordLocation:`${s}/exclusiveMaximum`,error:`${e} is greater than or equal to ${x}.`})),Oe!==void 0){let t=e%Oe;Math.abs(0-t)>=1.1920929e-7&&Math.abs(Oe-t)>=1.1920929e-7&&S.push({instanceLocation:o,keyword:`multipleOf`,keywordLocation:`${s}/multipleOf`,error:`${e} is not a multiple of ${Oe}.`})}}else if(u===`string`){let t=ke===void 0&&Ae===void 0?0:qg(e);ke!==void 0&&t<ke&&S.push({instanceLocation:o,keyword:`minLength`,keywordLocation:`${s}/minLength`,error:`String is too short (${t} < ${ke}).`}),Ae!==void 0&&t>Ae&&S.push({instanceLocation:o,keyword:`maxLength`,keywordLocation:`${s}/maxLength`,error:`String is too long (${t} > ${Ae}).`}),je!==void 0&&!new RegExp(je,`u`).test(e)&&S.push({instanceLocation:o,keyword:`pattern`,keywordLocation:`${s}/pattern`,error:`String does not match pattern.`}),ae!==void 0&&Ig[ae]&&!Ig[ae](e)&&S.push({instanceLocation:o,keyword:`format`,keywordLocation:`${s}/format`,error:`String does not match format "${ae}".`})}return{valid:S.length===0,errors:S}}var Yg=class{schema;draft;shortCircuit;lookup;constructor(e,t=`2019-09`,n=!0){this.schema=e,this.draft=t,this.shortCircuit=n,this.lookup=yg(e)}validate(e){return Jg(e,this.schema,this.draft,this.lookup,this.shortCircuit)}addSchema(e,t){t&&(e={...e,$id:t}),yg(e,this.lookup)}},Xg=class{shortcircuit;draft;constructor(e){this.shortcircuit=e?.shortcircuit??!0,this.draft=e?.draft}_draftFor(e){let t=ee(e,`pass an explicit { draft } to CfWorkerJsonSchemaValidator to validate other dialects.`);return t===`draft-7`?`7`:t}getValidator(e){let t=new Yg(e,this.draft??this._draftFor(e),this.shortcircuit);return e=>{let n=t.validate(e);return n.valid?{valid:!0,data:e,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:n.errors.map(e=>`${e.instanceLocation}: ${e.error}`).join(`; `)}}}};globalThis.crypto;var Zg=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthClientFlowError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e){super(e),this.name=new.target.name,np(this,new.target)}};(class extends Zg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.IssuerMismatchError`})}kind;expected;received;constructor(e,t,n){super(`Issuer mismatch in ${e===`metadata`?`authorization server metadata (RFC 8414 \xA73.3)`:`authorization response (RFC 9207)`}: expected ${JSON.stringify(t)}, received ${JSON.stringify(n)}`),this.kind=e,this.expected=t,this.received=n}}),class extends Zg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.RegistrationRejectedError`})}status;body;submittedMetadata;constructor(e){super(`Dynamic Client Registration rejected (HTTP ${e.status}): ${e.body}`),this.status=e.status,this.body=e.body,this.submittedMetadata=e.submittedMetadata}},class extends Zg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsecureTokenEndpointError`})}tokenEndpoint;constructor(e){super(`Refusing to send credentials to non-https token endpoint \'${e}\'. OAuth token requests MUST use TLS (localhost / *.localhost / 127.0.0.1 / ::1 are exempt).`),this.tokenEndpoint=e}},class extends Zg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.AuthorizationServerMismatchError`})}constructor(e,t){super(`Authorization server mismatch: credentials are bound to ${JSON.stringify(e)} but this call resolved ${JSON.stringify(t)}; refusing to present them to a different authorization server`),this.recordedIssuer=e,this.currentIssuer=t}},class extends Zg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsufficientScopeError`})}requiredScope;resourceMetadataUrl;errorDescription;constructor(e){super(`Insufficient scope${e.requiredScope?`: required "${e.requiredScope}"`:``}`),this.requiredScope=e.requiredScope,this.resourceMetadataUrl=e.resourceMetadataUrl,this.errorDescription=e.errorDescription}};var Qg=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnauthorizedError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e){super(e??`Unauthorized`),this.name=`UnauthorizedError`,np(this,new.target)}},$g=new Set([`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`server/discover`]),e_=class{_entries=new Map;_maxEntries;_stamp=0;_cappedSize=0;constructor(e){this._maxEntries=e?.maxEntries??512}get size(){return this._entries.size}get(e){return this._entries.get(t_(e))}set(e,t){let n=t_(e),r=$g.has(e.method),i=!this._entries.has(n);if(!r&&i&&this._maxEntries>0&&this._cappedSize>=this._maxEntries){for(let e of this._entries.keys())if(!$g.has(e.slice(0,e.indexOf(`\\0`)))){this._entries.delete(e),this._cappedSize--;break}}let a=++this._stamp;return this._entries.set(n,{...t,stamp:a}),i&&!r&&this._cappedSize++,a}delete(e){this._entries.delete(t_(e))&&!$g.has(e.method)&&this._cappedSize--}evict(e){let t=`${e}\\0`,n=$g.has(e);for(let e of this._entries.keys())e.startsWith(t)&&(this._entries.delete(e),n||this._cappedSize--)}clear(){this._entries.clear(),this._cappedSize=0}};function t_(e){return`${e.method}\\0${JSON.stringify([e.partition??``,e.params??``])}`}function n_(e,t){return t===void 0?e:`${e}\\0${t}`}var r_=864e5,i_=class{_evictionGeneration=new Map;_toolIndex;_toolOutputValidatorIndex;_serverIdentity=``;constructor(e,t,n=()=>{},r=``,i=Date.now){this._store=e,this._isUserSupplied=t,this._reportError=n,this._cachePartition=r,this._now=i}now(){return this._now()}setServerIdentity(e){this._serverIdentity=e}_partitionFor(e){return JSON.stringify([this._serverIdentity,e===`public`?``:this._cachePartition])}async _probe(e,t){let n={method:e,params:t??``},r=this._partitionFor(`private`),i=await this._store.get({...n,partition:r});if(i!==void 0)return i;let a=this._partitionFor(`public`);if(a===r)return;let o=await this._store.get({...n,partition:a});return o?.scope===`public`?o:void 0}async evict(e){this._evictionGeneration.set(e,(this._evictionGeneration.get(e)??0)+1),await this._deleteBoth(e,``)}async _deleteBoth(e,t){let n=this._partitionFor(`private`),r=this._partitionFor(`public`);try{await this._store.delete({method:e,params:t,partition:n})}catch(e){this._reportError(e)}if(r!==n)try{await this._store.delete({method:e,params:t,partition:r})}catch(e){this._reportError(e)}}async evictKey(e,t){let n=n_(e,t),r=this._evictionGeneration.get(n);r!==void 0&&this._evictionGeneration.set(n,r+1),await this._deleteBoth(e,t)}captureGeneration(e,t){let n=n_(e,t),r=this._evictionGeneration.get(n)??0;return this._evictionGeneration.set(n,r),r}async write(e,t,n,r){if((this._evictionGeneration.get(n_(e,r?.params))??0)!==n)return;let i=r?.params??``,a=this._partitionFor(`private`),o=this._partitionFor(`public`),s=(r?.scope??`private`)===`public`?o:a;try{await this._store.set({method:e,params:i,partition:s},{value:a_(t),expiresAt:r?.expiresAt,scope:r?.scope})}catch(e){this._reportError(e)}if(o!==a)try{await this._store.delete({method:e,params:i,partition:s===a?o:a})}catch(e){this._reportError(e)}}async read(e,t){let n=await this._probe(e,t);if(!(n?.expiresAt===void 0||!(n.expiresAt>this.now())))try{let e=JSON.parse(n.value);if(typeof e!=`object`||!e||Array.isArray(e))throw TypeError(`cached document is not an object`);return{value:e}}catch(n){this._reportError(n),await this._deleteBoth(e,t??``);return}}resetForReconnect(){this._isUserSupplied||this._store.clear(),this._evictionGeneration.clear(),this._toolIndex=void 0,this._toolOutputValidatorIndex=void 0,this._serverIdentity=``}async toolDefinition(e){let t=await this._probe(`tools/list`);if(t===void 0){this._toolIndex=void 0;return}if(this._toolIndex?.stamp!==t.stamp){let e=this._decodeListTools(t),n=new Map;if(e!==void 0)for(let t of e.tools)n.set(t.name,t);this._toolIndex={stamp:t.stamp,byName:n}}return this._toolIndex.byName.get(e)}async outputValidator(e,t){let n=await this._probe(`tools/list`);if(n===void 0){this._toolOutputValidatorIndex=void 0;return}if(this._toolOutputValidatorIndex?.stamp!==n.stamp){let e=this._decodeListTools(n)??{tools:[]},r=new Map;for(let n of e.tools){let e=t(n);e!==void 0&&r.set(n.name,e)}this._toolOutputValidatorIndex={stamp:n.stamp,byName:r}}return this._toolOutputValidatorIndex.byName.get(e)}_decodeListTools(e){try{let t=JSON.parse(e.value);if(!Array.isArray(t?.tools)||!t.tools.every(e=>typeof e==`object`&&!!e))throw TypeError(`cached tools/list document has a malformed tools array`);return t}catch(e){this._reportError(e);return}}};function a_(e){let t;try{t=JSON.stringify(e)}catch(e){throw TypeError(`cache value is not JSON-serializable: ${e instanceof Error?e.message:String(e)}`)}if(typeof t!=`string`)throw TypeError(`cache value is not JSON-serializable: it has no JSON representation`);return t}var o_=Symbol.for(`mcp.authSeamEscape`);function s_(e){return(typeof e==`object`&&!!e||typeof e==`function`)&&e[o_]===!0}var c_=-32022,l_=new Set([-32001,-32020,-32021]);function u_(e,t){switch(e.kind){case`result`:return d_(e.result,t);case`rpc-error`:return f_(e,t);case`http-error`:return p_(e,t);case`network-error`:return m_(e.error,t);case`unusable-reply`:return{kind:`error`,error:new z(R.EraNegotiationFailed,`Version negotiation probe failed: the server answered with an unusable reply (${g_(e.error)})`,{cause:e.error},{cause:e.error})};case`auth-required`:return{kind:`error`,error:e.error};case`closed`:return t.transportKind===`stdio`?{kind:`legacy`}:m_(Error(`Connection closed during the version negotiation probe`),t);case`timeout`:return t.transportKind===`stdio`?{kind:`legacy`}:{kind:`error`,error:new z(R.RequestTimeout,`Version negotiation probe timed out after ${e.timeoutMs}ms`,{timeout:e.timeoutMs})}}}function d_(e,t){let n=jm(Am).validateResult(`server/discover`,e);if(!n.ok)return{kind:`legacy`};let r=n.value.supportedVersions,i=t.clientModernVersions.find(e=>r.includes(e));return i===void 0?t.fallbackAvailable?{kind:`legacy`}:{kind:`error`,error:new Xp({supported:[...r],requested:t.requestedVersion})}:{kind:`modern`,version:i,discover:n.value}}function f_(e,t){let{code:n,message:r,data:i}=e;if(n===c_){let e=__(i);if(e===void 0)return{kind:`legacy`};let n=new Xp({supported:e,requested:v_(i)??t.requestedVersion},r),a=lp(e),o=t.clientModernVersions.find(e=>a.includes(e));return o===void 0?a.length>0?{kind:`error`,error:n}:t.fallbackAvailable?{kind:`legacy`}:{kind:`error`,error:n}:{kind:`corrective`,version:o,error:n}}return l_.has(n),{kind:`legacy`}}function p_(e,t){if(e.status===401||e.status===403){let t=e.status===403;return{kind:`error`,error:new ip(t?R.ClientHttpForbidden:R.ClientHttpAuthentication,`Version negotiation failed: ${t?`the server denied access (HTTP 403)`:`the server requires authorization (HTTP 401)`}`,{status:e.status,statusText:e.statusText,text:e.body})}}if(e.status>=500)return{kind:`error`,error:new ip(R.EraNegotiationFailed,`Version negotiation failed: the server answered the probe with HTTP ${e.status}`,{status:e.status,statusText:e.statusText,text:e.body})};let n=y_(e.body);return n===void 0?{kind:`legacy`}:f_(n,t)}function m_(e,t){return t.environment===`browser`&&h_(e)?{kind:`legacy`}:{kind:`error`,error:new z(R.EraNegotiationFailed,`Version negotiation probe failed: ${g_(e)}`,{cause:e},{cause:e})}}function h_(e){return e instanceof TypeError||e instanceof Error&&e.name===`TypeError`}function g_(e){return e instanceof Error?e.message:String(e)}function __(e){if(typeof e!=`object`||!e)return;let t=e.supported;if(!(!Array.isArray(t)||t.length===0||!t.every(e=>typeof e==`string`)))return t}function v_(e){if(typeof e!=`object`||!e)return;let t=e.requested;return typeof t==`string`?t:void 0}function y_(e){if(e===void 0||e===``)return;let t;try{t=JSON.parse(e)}catch{return}if(typeof t!=`object`||!t)return;let n=t.error;if(typeof n!=`object`||!n)return;let{code:r,message:i,data:a}=n;if(typeof r==`number`)return{code:r,message:typeof i==`string`?i:``,data:a}}var b_=`legacy`;function x_(e,t){let n=e?.mode??b_;if(n===`legacy`)return{kind:`legacy`};let r=e?.probe??{};if(typeof n==`object`){if(!sp(n.pin))throw TypeError(`versionNegotiation: { pin: \'${n.pin}\' } is not a modern protocol revision \u2014 pinning is for 2026-07-28 and later; omit versionNegotiation (or use mode: \'legacy\') for 2025-era servers.`);return{kind:`pin`,version:n.pin,probe:r}}let i=t?lp(t):[];return{kind:`auto`,modernVersions:i.length>0?i:[...op],fallbackAvailable:!t||cp(t).length>0,probe:r}}function S_(){let e=globalThis;return e.window!==void 0&&e.document!==void 0?`browser`:`node`}function C_(e){return`stderr`in e&&`pid`in e?`stdio`:`http`}var w_=class e{_pending;_probeCounter=0;_savedOnMessage;_savedOnError;_savedOnClose;_closeDelivered=!1;constructor(e){this._transport=e,this._savedOnMessage=e.onmessage,this._savedOnError=e.onerror,this._savedOnClose=e.onclose}static async open(t){let n=new e(t);t.onmessage=e=>{let t=n._pending;if(t!==void 0&&(Bm(e)||Vm(e))&&e.id===t.id){n._pending=void 0,Bm(e)?t.resolve({kind:`response`,result:e.result}):t.resolve({kind:`response`,error:e.error});return}},t.onerror=e=>{n._savedOnError?.(e)},t.onclose=()=>{let e=n._pending;e!==void 0&&(n._pending=void 0,e.resolve({kind:`closed`})),n._closeDelivered=!0,n._savedOnClose?.()};try{await t.start()}catch(e){throw n.detach(),e}return n}async exchange(e,t){let n=`server-discover-probe-${++this._probeCounter}`;return new Promise(r=>{let i=!1,a=e=>{i||(i=!0,clearTimeout(o),this._pending?.id===n&&(this._pending=void 0),r(e))},o=setTimeout(()=>a({kind:`timeout`}),t);this._pending={id:n,resolve:a},this._transport.send(e(n)).catch(e=>a({kind:`send-error`,error:e}))})}detach(){if(this._pending=void 0,this._transport.onmessage=this._savedOnMessage,this._transport.onerror=this._savedOnError,this._closeDelivered&&this._savedOnClose!==void 0){let e=this._savedOnClose,t=this._transport,n=!1,r=()=>{if(!n){n=!0;return}e()};t.onclose=r,T_.set(t,()=>{t.onclose===r&&(t.onclose=e)})}else this._transport.onclose=this._savedOnClose}release(){this.detach();let e=this._transport,t=e.start,n=!0;e.start=async function(){if(n){n=!1,e.start=t;return}return t.call(e)}}},T_=new WeakMap;function E_(e){let t=T_.get(e);T_.delete(e),t?.()}function D_(e,t,n,r){return{jsonrpc:`2.0`,id:e,method:`server/discover`,params:{_meta:jm(t).outboundEnvelope({protocolVersion:t,clientInfo:n,clientCapabilities:r})}}}function O_(e){return e instanceof z&&e.code===R.ClientHttpUnexpectedContent||e instanceof Error&&e.name===`SyntaxError`}function k_(e,t){switch(e.kind){case`response`:return e.error===void 0?{kind:`result`,result:e.result}:{kind:`rpc-error`,...e.error};case`send-error`:{let t=e.error;if(s_(t)||t instanceof Qg||t instanceof Error&&t.name===`UnauthorizedError`)return{kind:`auth-required`,error:t};if(t instanceof ip){let e=t.data?.text;return{kind:`http-error`,status:t.data.status,body:typeof e==`string`?e:void 0,statusText:t.data.statusText}}return O_(t)?{kind:`unusable-reply`,error:t}:{kind:`network-error`,error:t}}case`closed`:return{kind:`closed`};case`timeout`:return{kind:`timeout`,timeoutMs:t}}}async function A_(e,t){let n=e.probe.timeoutMs??t.defaultTimeoutMs,r=Math.max(0,e.probe.maxRetries??0),i=e.kind===`pin`?[e.version]:e.modernVersions,a=e.kind===`auto`&&e.fallbackAvailable,o=await w_.open(t.transport),s=async()=>{let s=i[0],c=!1,l=r;for(;;){let r=await o.exchange(e=>D_(e,s,t.clientInfo,t.capabilities),n);if(r.kind===`timeout`&&l>0){l--;continue}let u=k_(r,n),d=u_(u,{clientModernVersions:i,requestedVersion:s,fallbackAvailable:a,environment:t.environment,transportKind:t.transportKind});switch(d.kind){case`modern`:return{era:`modern`,version:d.version,discover:d.discover};case`corrective`:if(c)throw d.error;c=!0,s=d.version;continue;case`legacy`:{let n=u.kind===`closed`?`the connection closed during the server/discover probe`:void 0;if(e.kind===`pin`)throw new z(R.EraNegotiationFailed,n===void 0?`Version negotiation failed: the server did not offer pinned protocol version ${e.version} via server/discover (no fallback in pin mode)`:`Version negotiation failed: ${n} before the server offered pinned protocol version ${e.version} (no fallback in pin mode)`);if(!e.fallbackAvailable)throw new z(R.EraNegotiationFailed,n===void 0?`Version negotiation failed: the server gave no modern evidence and this client supports no pre-2026-07-28 protocol version to fall back to`:`Version negotiation failed: ${n} and this client supports no pre-2026-07-28 protocol version to fall back to`);if(n!==void 0&&t.disposableProbe!==!0)throw new z(R.EraNegotiationFailed,`Version negotiation failed: ${n} (this transport probed in place \u2014 the disposable sibling probe requires the SDK\'s base StdioClientTransport)`);return{era:`legacy`}}case`error`:throw d.error}}},c;try{c=await s()}catch(e){throw o.detach(),e}return o.release(),c}function j_(e){let t=Object.getPrototypeOf(e);if(t===null||!Object.prototype.hasOwnProperty.call(t,`_dispose`))return;let n=e._serverParams;return typeof n==`object`&&n&&typeof n.command==`string`?n:void 0}async function M_(e,t,n,r){let i=t.constructor,a=new i({...n,stderr:`ignore`}),o=t.close,s=!1,c,l=new Promise((e,t)=>{c=()=>t(N_())});t.close=async function(){return s=!0,c?.(),o.call(t)};let u;try{let t=A_(e,{...r,transport:a,transportKind:`stdio`,disposableProbe:!0});t.catch(()=>{}),u=await Promise.race([t,l])}finally{await P_(a),t.close=o}if(s)throw N_();return u}function N_(){return new z(R.EraNegotiationFailed,`Version negotiation failed: the transport was closed during the server/discover probe`)}async function P_(e){try{let t=e._dispose;await(typeof t==`function`?t.call(e):e.close())}catch{}}function F_(e){let t=e._meta?.[jl];return qh.Implementation(t)?t:void 0}function I_(e,t){if(!(!e||typeof t!=`object`||!t)){if(e.type===`object`&&e.properties&&typeof e.properties==`object`){let n=t,r=e.properties;for(let e of Object.keys(r)){let t=r[e];n[e]===void 0&&Object.prototype.hasOwnProperty.call(t,`default`)&&(n[e]=t.default),n[e]!==void 0&&I_(t,n[e])}}if(Array.isArray(e.anyOf))for(let n of e.anyOf)typeof n!=`boolean`&&I_(n,t);if(Array.isArray(e.oneOf))for(let n of e.oneOf)typeof n!=`boolean`&&I_(n,t)}}function L_(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};let t=e.form!==void 0,n=e.url!==void 0;return{supportsFormMode:t||!t&&!n,supportsUrlMode:n}}function R_(e){if(typeof e==`object`&&e&&(e.kind===`legacy`&&!(`supportedVersions`in e)&&!(`discover`in e)||e.kind===`modern`&&yu.safeParse(e.discover).success))return e;throw new z(R.EraNegotiationFailed,`connect({ prior }): unrecognized prior \u2014 expected { kind: \'modern\', discover } or { kind: \'legacy\' }`)}var z_={"notifications/tools/list_changed":[`tools/list`],"notifications/prompts/list_changed":[`prompts/list`],"notifications/resources/list_changed":[`resources/list`,`resources/templates/list`]},B_=64,V_={};(class extends tg{_serverCapabilities;_serverVersion;_capabilities;_instructions;_jsonSchemaValidator;_cache;_defaultCacheTtlMs;_listMaxPages;_listChangedDebounceTimers=new Map;_listChangedConfig;_enforceStrictCapabilities;_versionNegotiation;_supportedProtocolVersionsOption;_inputRequiredDriverConfig;_listenState=new Map;_nextListenId=0;_autoOpenedSubscription;_discoverResult;static{V_.enforceStrictCapabilities=e=>e._enforceStrictCapabilities,V_.walkPages=(e,t,n,r)=>e._walkPages(t,n,r),V_.readResource=(e,t,n)=>e._readResource(t,n)}_resetConnectionState(){if(this._negotiatedProtocolVersion=void 0,this._serverCapabilities=void 0,this._serverVersion=void 0,this._instructions=void 0,this._discoverResult=void 0,this._autoOpenedSubscription=void 0,this._listenState.size>0){let e=new z(R.ConnectionClosed,`subscriptions/listen: client reconnected or closed; subscription state from the previous connection was reset`);for(let t of this._listenState.values())t.settle({cause:`remote`,error:e})}this._listenState.clear();for(let e of this._listChangedDebounceTimers.values())clearTimeout(e);this._listChangedDebounceTimers.clear(),this._cache.resetForReconnect()}async close(){try{await super.close()}finally{this._resetConnectionState()}}constructor(e,t){super(t),this._clientInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._jsonSchemaValidator=t?.jsonSchemaValidator??new Xg,this._enforceStrictCapabilities=t?.enforceStrictCapabilities??!1,this._versionNegotiation=t?.versionNegotiation,this._supportedProtocolVersionsOption=t?.supportedProtocolVersions,this._inputRequiredDriverConfig=Ih(t?.inputRequired),this._cache=new i_(t?.responseCacheStore??new e_,t?.responseCacheStore!==void 0,e=>this._reportStoreError(e),t?.cachePartition??``),this._defaultCacheTtlMs=t?.defaultCacheTtlMs??0,this._listMaxPages=t?.listMaxPages??B_,t?.listChanged&&(this._listChangedConfig=t.listChanged)}buildContext(e,t){return e}_shouldDropInbound(e){if(this._negotiatedProtocolVersion!==void 0&&sp(this._negotiatedProtocolVersion)&&Rm(e))return`drop`}_outboundMetaEnvelope(){let e=this._negotiatedProtocolVersion;if(e!==void 0)return this._wireCodec().outboundEnvelope({protocolVersion:e,clientInfo:this._clientInfo,clientCapabilities:this._capabilities})}_resolveNonCompleteResult(e,t){return this._inputRequiredDriverConfig.autoFulfill?ug({getRequestHandler:e=>this._getRequestHandler(e),buildContext:e=>this.buildContext(e,void 0),sessionId:this.transport?.sessionId},this._inputRequiredDriverConfig,e,t):Promise.reject(new z(R.UnsupportedResultType,`Unsupported result type \'input_required\' for ${t.request.method}: multi-round-trip auto-fulfilment is not enabled on this instance \u2014 pass allowInputRequired: true to handle it manually, or enable inputRequired.autoFulfill`,{resultType:`input_required`,method:t.request.method}))}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler(`tools`,`notifications/tools/list_changed`,e.tools,async()=>(await this.listTools(void 0,{cacheMode:`refresh`})).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler(`prompts`,`notifications/prompts/list_changed`,e.prompts,async()=>(await this.listPrompts(void 0,{cacheMode:`refresh`})).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler(`resources`,`notifications/resources/list_changed`,e.resources,async()=>(await this.listResources(void 0,{cacheMode:`refresh`})).resources)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after connecting to transport`);this._capabilities=rg(this._capabilities,e)}setVersionNegotiation(e){if(this.transport)throw Error(`Cannot configure version negotiation after connecting to transport`);this._versionNegotiation=e}_wrapHandler(e,t){return e===`elicitation/create`?async(e,n)=>{let r=jm(this._negotiatedProtocolVersion),i=r.validateRequest(`elicitation/create`,e);if(!i.ok&&i.reason===`not-in-era`&&(i=r.validateInputRequest(`elicitation/create`,e)),!i.ok)throw new qp(i.reason===`not-in-era`?B.InternalError:B.InvalidParams,i.reason===`not-in-era`?`No wire schema for elicitation/create in the resolved era`:`Invalid elicitation request: ${i.message}`);let{params:a}=i.value;a.mode=a.mode??`form`;let{supportsFormMode:o,supportsUrlMode:s}=L_(this._capabilities.elicitation);if(a.mode===`form`&&!o)throw new qp(B.InvalidParams,`Client does not support form-mode elicitation requests`);if(a.mode===`url`&&!s)throw new qp(B.InvalidParams,`Client does not support URL-mode elicitation requests`);let c=await t(e,n),l=r.validateResult(`elicitation/create`,c);if(!l.ok&&l.reason===`not-in-era`&&(l=r.validateInputResponse(`elicitation/create`,c)),!l.ok)throw new qp(l.reason===`not-in-era`?B.InternalError:B.InvalidParams,l.reason===`not-in-era`?`No wire schema for elicitation/create in the resolved era`:`Invalid elicitation result: ${l.message}`);let u=l.value,d=a.mode===`form`?a.requestedSchema:void 0;if(a.mode===`form`&&u.action===`accept`&&u.content&&d&&this._capabilities.elicitation?.form?.applyDefaults)try{I_(d,u.content)}catch{}return u}:e===`sampling/createMessage`?async(e,n)=>{let r=jm(this._negotiatedProtocolVersion),i=r.validateRequest(`sampling/createMessage`,e);if(!i.ok&&i.reason===`not-in-era`&&(i=r.validateInputRequest(`sampling/createMessage`,e)),!i.ok)throw new qp(i.reason===`not-in-era`?B.InternalError:B.InvalidParams,i.reason===`not-in-era`?`No wire schema for sampling/createMessage in the resolved era`:`Invalid sampling request: ${i.message}`);let{params:a}=i.value,o=await t(e,n),s=!!(a.tools||a.toolChoice),c=r.samplingResultVariant(s,o);if(!c.ok&&c.reason===`not-in-era`&&(c=r.validateInputResponse(`sampling/createMessage`,o)),!c.ok)throw new qp(c.reason===`not-in-era`?B.InternalError:B.InvalidParams,c.reason===`not-in-era`?`No result schema for sampling/createMessage in the resolved era`:`Invalid sampling result: ${c.message}`);return c.value}:t}assertCapability(e,t){if(!this._serverCapabilities?.[e])throw new z(R.CapabilityNotSupported,`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(t?.prior!=null)return this._connectFromPrior(e,R_(t.prior),t);let n=x_(this._versionNegotiation,this._supportedProtocolVersionsOption);return n.kind===`legacy`?this._connectPlainLegacy(e,t):this._connectNegotiated(e,n,t)}async _connectPlainLegacy(e,t){if(await super.connect(e),e.sessionId!==void 0){let t=this._negotiatedProtocolVersion;t!==void 0&&e.setProtocolVersion?.(t);return}this._resetConnectionState(),await this._legacyHandshake(e,t)}async _legacyHandshake(e,t){let n=cp(this._supportedProtocolVersions);try{let r=n[0];if(r===void 0)throw new z(R.EraNegotiationFailed,`Cannot run the initialize handshake: supportedProtocolVersions contains no pre-2026-07-28 protocol version`);let i=await this.request({method:`initialize`,params:{protocolVersion:r,capabilities:this._capabilities,clientInfo:this._clientInfo}},t);if(i===void 0)throw Error(`Server sent invalid initialize result: ${i}`);if(!n.includes(i.protocolVersion))throw Error(`Server\'s protocol version is not supported: ${i.protocolVersion}`);this._serverCapabilities=i.capabilities,this._serverVersion=i.serverInfo,this._cache.setServerIdentity(this._deriveServerIdentity(e)),e.setProtocolVersion&&e.setProtocolVersion(i.protocolVersion),this._instructions=i.instructions,await this.notification({method:`notifications/initialized`}),this._negotiatedProtocolVersion=i.protocolVersion,this._listChangedConfig&&this._setupListChangedHandlers(this._listChangedConfig)}catch(e){throw this.close(),e}}async _connectNegotiated(e,t,n){if(e.sessionId!==void 0){await super.connect(e);let t=this._negotiatedProtocolVersion;t!==void 0&&e.setProtocolVersion&&e.setProtocolVersion(t);return}this._resetConnectionState();let r;try{let i=C_(e),a={clientInfo:this._clientInfo,capabilities:this._capabilities,environment:S_(),defaultTimeoutMs:n?.timeout??6e4},o=i===`stdio`?j_(e):void 0;r=o===void 0?await A_(t,{...a,transport:e,transportKind:i}):await M_(t,e,o,a)}catch(t){throw await e.close().catch(()=>{}),E_(e),t}if(E_(e),await super.connect(e),r.era===`legacy`){await this._legacyHandshake(e,n);return}if(this._serverCapabilities=r.discover.capabilities,this._serverVersion=F_(r.discover),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=r.discover.instructions,this._discoverResult=r.discover,this._negotiatedProtocolVersion=r.version,e.setProtocolVersion&&e.setProtocolVersion(r.version),this._listChangedConfig){let e=this._listChangedConfig,t=this._serverCapabilities,r={...e.tools&&t?.tools?.listChanged&&{tools:e.tools},...e.prompts&&t?.prompts?.listChanged&&{prompts:e.prompts},...e.resources&&t?.resources?.listChanged&&{resources:e.resources}},i=!0;try{this._setupListChangedHandlers(r)}catch(e){i=!1,this.onerror?.(e instanceof Error?e:Error(String(e)))}let a=i?{...r.tools&&{toolsListChanged:!0},...r.prompts&&{promptsListChanged:!0},...r.resources&&{resourcesListChanged:!0}}:{};if(Object.keys(a).length>0){let e=new AbortController,t=()=>e.abort(n?.signal?.reason);n?.signal?.aborted&&t(),n?.signal?.addEventListener(`abort`,t);try{this._autoOpenedSubscription=await this.listen(a,{timeout:n?.timeout,signal:e.signal})}catch(e){if(n?.signal?.aborted)throw await this.close().catch(()=>{}),e;this.onerror?.(e instanceof Error?e:Error(String(e)))}finally{n?.signal?.removeEventListener(`abort`,t)}}}}async _connectFromPrior(e,t,n){if(t.kind===`legacy`)return this._connectPlainLegacy(e,n);let r=t.discover;this._resetConnectionState();let i=this._supportedProtocolVersionsOption,a=(i&&lp(i).length>0?lp(i):op).find(e=>r.supportedVersions.includes(e));if(a===void 0)throw new z(R.EraNegotiationFailed,`connect({ prior }) with a modern verdict requires a 2026-07-28+ mutual protocol version; the supplied DiscoverResult and this client\'s supportedProtocolVersions have no modern overlap. For a server known to be legacy, pass prior: { kind: \'legacy\' } to skip the probe and initialize directly, or use versionNegotiation: { mode: \'auto\' } to re-probe with legacy fallback.`);if(await super.connect(e),this._discoverResult=r,this._serverCapabilities=r.capabilities,this._serverVersion=F_(r),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=r.instructions,this._negotiatedProtocolVersion=a,e.setProtocolVersion?.(a),this._listChangedConfig)try{this._setupListChangedHandlers(this._listChangedConfig)}catch(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}_deriveServerIdentity(e){let t=this._serverVersion;return t===void 0?e.sessionId??`anonymous:${Date.now()}-${Math.random().toString(36).slice(2)}`:`${t.name}@${t.version}`}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}getProtocolEra(){let e=this._negotiatedProtocolVersion;if(e!==void 0)return sp(e)?`modern`:`legacy`}getInstructions(){return this._instructions}getDiscoverResult(){return this._discoverResult}assertCapabilityForMethod(e){switch(e){case`logging/setLevel`:if(!this._serverCapabilities?.logging)throw new z(R.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case`prompts/get`:case`prompts/list`:if(!this._serverCapabilities?.prompts)throw new z(R.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case`resources/list`:case`resources/templates/list`:case`resources/read`:case`resources/subscribe`:case`resources/unsubscribe`:if(!this._serverCapabilities?.resources)throw new z(R.CapabilityNotSupported,`Server does not support resources (required for ${e})`);if(e===`resources/subscribe`&&!this._serverCapabilities.resources.subscribe)throw new z(R.CapabilityNotSupported,`Server does not support resource subscriptions (required for ${e})`);break;case`tools/call`:case`tools/list`:if(!this._serverCapabilities?.tools)throw new z(R.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;case`completion/complete`:if(!this._serverCapabilities?.completions)throw new z(R.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case`initialize`:break;case`server/discover`:break;case`ping`:break}}assertNotificationCapability(e){switch(e){case`notifications/roots/list_changed`:if(!this._capabilities.roots?.listChanged)throw new z(R.CapabilityNotSupported,`Client does not support roots list changed notifications (required for ${e})`);break;case`notifications/initialized`:break;case`notifications/cancelled`:break;case`notifications/progress`:break}}assertRequestHandlerCapability(e){switch(e){case`sampling/createMessage`:if(!this._capabilities.sampling)throw new z(R.CapabilityNotSupported,`Client does not support sampling capability (required for ${e})`);break;case`elicitation/create`:if(!this._capabilities.elicitation)throw new z(R.CapabilityNotSupported,`Client does not support elicitation capability (required for ${e})`);break;case`roots/list`:if(!this._capabilities.roots)throw new z(R.CapabilityNotSupported,`Client does not support roots capability (required for ${e})`);break;case`ping`:break}}async ping(e){return this.request({method:`ping`},e)}async discover(e){let t=await this._requestWithSchema({method:`server/discover`},yu,e);return this._discoverResult=t,t}async complete(e,t){return this.request({method:`completion/complete`,params:e},t)}async setLoggingLevel(e,t){return this.request({method:`logging/setLevel`,params:{level:e}},t)}async getPrompt(e,t){return this.request({method:`prompts/get`,params:e},t)}async listPrompts(e,t){if(!this._serverCapabilities?.prompts&&!this._enforceStrictCapabilities)return console.debug(`Client.listPrompts() called but server does not advertise prompts capability - returning empty list`),{prompts:[]};if(e?.cursor!==void 0)return this.request({method:`prompts/list`,params:e},t);let n=await this._serveFromCache(`prompts/list`,void 0,t);return n===void 0?this._listAllPages(`prompts/list`,e,t,e=>e.prompts):n}async listResources(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug(`Client.listResources() called but server does not advertise resources capability - returning empty list`),{resources:[]};if(e?.cursor!==void 0)return this.request({method:`resources/list`,params:e},t);let n=await this._serveFromCache(`resources/list`,void 0,t);return n===void 0?this._listAllPages(`resources/list`,e,t,e=>e.resources):n}async listResourceTemplates(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug(`Client.listResourceTemplates() called but server does not advertise resources capability - returning empty list`),{resourceTemplates:[]};if(e?.cursor!==void 0)return this.request({method:`resources/templates/list`,params:e},t);let n=await this._serveFromCache(`resources/templates/list`,void 0,t);return n===void 0?this._listAllPages(`resources/templates/list`,e,t,e=>e.resourceTemplates):n}async _listAllPages(e,t,n,r,i){let a=n?.cacheMode===`bypass`,o=this._cache.captureGeneration(e),s=await this._walkPages(e,r=>{let i=r===void 0?t&&{...t}:{...t,cursor:r};return this.request({method:e,...i&&{params:i}},n)},r);return delete s.nextCursor,i?.(s),a||await this._cache.write(e,s,o,this._freshness(s)),s}async _walkPages(e,t,n){let r=await t(void 0),i=r.nextCursor,a=r,o=1;for(;i!==void 0;){if(this._listMaxPages!==0&&o>=this._listMaxPages)throw new z(R.ListPaginationExceeded,`${e}: exceeded listMaxPages (${this._listMaxPages}); server pagination did not terminate`,{method:e,listMaxPages:this._listMaxPages});let s=await t(i);if(s.nextCursor===i&&JSON.stringify(n(s))===JSON.stringify(n(a)))break;n(r).push(...n(s)),a=s,i=s.nextCursor,o++}return r}_freshness(e,t){let n=e,r=typeof n.ttlMs==`number`?n.ttlMs:this._defaultCacheTtlMs,i=n.cacheScope===`public`?`public`:`private`;return{expiresAt:this._cache.now()+Math.min(Math.max(0,r),r_),scope:i,params:t}}async _serveFromCache(e,t,n){if(n?.cacheMode===`bypass`||n?.cacheMode===`refresh`)return;let r=await this._cache.read(e,t).catch(e=>void this._reportStoreError(e));if(r!==void 0){if(n?.signal?.aborted){let e=n.signal.reason;throw e instanceof z?e:new z(R.RequestTimeout,String(e))}return r.value}}_reportStoreError(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}_compileOutputValidator(e){if(e.outputSchema)try{return{ok:!0,validator:this._jsonSchemaValidator.getValidator(e.outputSchema)}}catch(e){return{ok:!1,compileError:e}}}async _resolveXMcpHeaderScan(e,t){let n=t??await this._cache.toolDefinition(e);return n===void 0?void 0:qm(n.inputSchema)}async readResource(e,t){let{result:n}=await this._readResource(e,t);return n}async _readResource(e,t){let n=await this._serveFromCache(`resources/read`,e.uri,t);if(n!==void 0)return{result:n,cached:!0};let r=this._cache.captureGeneration(`resources/read`,e.uri),i=await this.request({method:`resources/read`,params:e},t);if(t?.cacheMode!==`bypass`){let n=this._freshness(i,e.uri);n.expiresAt>this._cache.now()?await this._cache.write(`resources/read`,i,r,n):t?.cacheMode===`refresh`&&await this._cache.evictKey(`resources/read`,e.uri)}return{result:i,cached:!1}}async subscribeResource(e,t){return this.request({method:`resources/subscribe`,params:e},t)}async unsubscribeResource(e,t){return this.request({method:`resources/unsubscribe`,params:e},t)}async listen(e,t){if(this.transport===void 0)throw new z(R.NotConnected,`Not connected`);let n=this._negotiatedProtocolVersion;if(n===void 0||!sp(n))throw new z(R.MethodNotSupportedByProtocolVersion,`subscriptions/listen requires a 2026-07-28-era connection (negotiated: ${n??`none`}). On a 2025-era connection, change notifications are delivered unsolicited: use ClientOptions.listChanged and resources/subscribe instead.`,{method:`subscriptions/listen`,protocolVersion:n});if(t?.signal?.aborted){let e=t.signal.reason;throw e instanceof z?e:new z(R.RequestTimeout,String(e))}let r=new AbortController,i=`listen:${this._nextListenId++}`,a=`opening`,o,s,c,l,u=new Promise((e,t)=>{c=e,l=t}),d,f=new Promise(e=>{d=e}),p=e=>{if(a===`closed`)return;let n=a===`opening`;if(o!==void 0&&(clearTimeout(o),o=void 0),`ack`in e){a=`open`,c(e.ack);return}a=`closed`,s!==void 0&&t?.signal?.removeEventListener(`abort`,s),this._listenState.delete(i),r.abort(),d(e.cause),n&&l(e.error??new z(R.ConnectionClosed,`subscriptions/listen closed before the server acknowledged`))},m=async()=>{r.abort(),await this.notification({method:`notifications/cancelled`,params:{requestId:i}}).catch(()=>{})},h=async()=>{a!==`closed`&&(p({cause:`local`}),await m())};this._listenState.set(i,{settle:p});let g=t?.timeout??6e4;if(o=setTimeout(()=>{p({cause:`remote`,error:new z(R.RequestTimeout,`subscriptions/listen ack timed out`,{timeout:g})}),m().catch(()=>{})},g),t?.signal){let e=t.signal;s=()=>{if(a===`closed`)return;let t=e.reason;p({cause:`local`,error:t instanceof Error?t:Error(String(t??`Aborted`))}),m().catch(()=>{})},e.addEventListener(`abort`,s,{once:!0})}let _={jsonrpc:`2.0`,id:i,method:`subscriptions/listen`,params:{_meta:{...this._outboundMetaEnvelope()},notifications:e}},v=e=>{p({cause:`remote`,error:e instanceof Error?e:Error(String(e))})};try{this.transport.send(_,{requestSignal:r.signal,onRequestStreamEnd:()=>p({cause:`remote`,error:Error(`subscriptions/listen: stream ended`)})}).catch(v)}catch(e){v(e)}return{honoredFilter:await u,close:h,closed:f}}get autoOpenedSubscription(){return this._autoOpenedSubscription}_onnotification(e,t){let n=Object.hasOwn(z_,e.method)?z_[e.method]:void 0;if(e.method===`notifications/resources/updated`){let t=e.params?.uri;typeof t==`string`&&this._cache.evictKey(`resources/read`,t)}else if(n!==void 0)for(let e of n)this._cache.evict(e);if(e.method===`notifications/subscriptions/acknowledged`){let t=e.params?._meta?.[Nl],n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){let t=this._wireCodec().validateNotification(`notifications/subscriptions/acknowledged`,e);n.settle({ack:t.ok?t.value.params.notifications:{}});return}}if(e.method===`notifications/cancelled`){let t=e.params?.requestId,n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){n.settle({cause:`remote`,error:Error(`subscriptions/listen: server cancelled the subscription`)});return}}super._onnotification(e,t)}_onresponse(e){let t=e.id,n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){Vm(e)?n.settle({cause:`remote`,error:qp.fromError(e.error.code,e.error.message,e.error.data)}):n.settle({cause:`graceful`,error:new z(R.ConnectionClosed,`subscriptions/listen: server closed the subscription gracefully before acknowledging`)});return}super._onresponse(e)}_onclose(){if(this._listenState.size>0){let e=new z(R.ConnectionClosed,`Connection closed`);for(let t of this._listenState.values())t.settle({cause:`remote`,error:e});this._listenState.clear()}super._onclose()}async callTool(e,t){let n=this.getProtocolEra()===`modern`&&S_()!==`browser`,r=async()=>{if(!n)return t;let r;try{r=await this._resolveXMcpHeaderScan(e.name,t?.toolDefinition)}catch(e){this._reportStoreError(e)}if(!r?.valid||r.declarations.length===0)return t;let i=ih(r.declarations,e.arguments);return Object.keys(i).length===0?t:{...t,headers:{...t?.headers,...i}}},i=t?.toolDefinition===void 0?await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)):this._compileOutputValidator(t.toolDefinition),a=()=>{if(i===void 0||i.ok)return;let t=i.compileError,n=(t instanceof Error?t.message:String(t)).slice(0,200);throw new qp(B.InvalidParams,`Tool \'${e.name}\' has an invalid outputSchema: ${n}`)};a();let o;try{o=await this.request({method:`tools/call`,params:e},await r())}catch(s){let c=s instanceof qp&&s.code===-32020;if(!n||!c||t?.toolDefinition!==void 0)throw s;let l={signal:t?.signal,timeout:t?.timeout,cacheMode:`refresh`};await this._cache.evict(`tools/list`),await this.listTools(void 0,l).catch(e=>this._reportStoreError(e)),i=await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)),a(),o=await this.request({method:`tools/call`,params:e},await r())}let s=i!==void 0&&i.ok?i.validator:void 0;if(s){if(o.structuredContent===void 0&&!o.isError)throw new qp(B.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(o.structuredContent!==void 0&&!o.isError)try{let e=s(o.structuredContent);if(!e.valid)throw new qp(B.InvalidParams,`Structured content does not match the tool\'s output schema: ${e.errorMessage}`)}catch(e){throw e instanceof qp?e:new qp(B.InvalidParams,`Failed to validate structured content: ${e instanceof Error?e.message:String(e)}`)}}return o}async listTools(e,t){if(!this._serverCapabilities?.tools&&!this._enforceStrictCapabilities)return console.debug(`Client.listTools() called but server does not advertise tools capability - returning empty list`),{tools:[]};if(e?.cursor!==void 0){let n=await this.request({method:`tools/list`,params:e},t);return this._excludeInvalidXMcpHeaderTools(n),n}let n=await this._serveFromCache(`tools/list`,void 0,t);return n===void 0?this._listAllPages(`tools/list`,e,t,e=>e.tools,e=>this._excludeInvalidXMcpHeaderTools(e)):n}_excludeInvalidXMcpHeaderTools(e){if(this.getProtocolEra()!==`modern`||!this.transport||C_(this.transport)===`stdio`)return;let t=e.tools.filter(e=>{let t=qm(e.inputSchema);return t.valid?!0:(console.warn(`[mcp-sdk] excluding tool \'${e.name}\' from tools/list: invalid x-mcp-header declaration \u2014 ${t.reason}`),!1)});t.length!==e.tools.length&&(e.tools=t)}_setupListChangedHandler(e,t,n,r){let i=ah(kd,n);if(!i.success)throw Error(`Invalid ${e} listChanged options: ${i.error.message}`);if(typeof n.onChanged!=`function`)throw TypeError(`Invalid ${e} listChanged options: onChanged must be a function`);let{autoRefresh:a,debounceMs:o}=i.data,{onChanged:s}=n,c=async()=>{if(!a){s(null,null);return}try{s(null,await r())}catch(e){s(e instanceof Error?e:Error(String(e)),null)}};this.setNotificationHandler(t,()=>{if(o){let t=this._listChangedDebounceTimers.get(e);t&&clearTimeout(t);let n=setTimeout(c,o);this._listChangedDebounceTimers.set(e,n)}else c()})}async sendRootsListChanged(){return this.notification({method:`notifications/roots/list_changed`})}}),class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SseError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e,t,n){super(`SSE error: ${t}`),this.code=e,this.event=n,np(this,new.target)}};var H_=class{_eventSlots=new Map;setHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", \u2026) to add multiple listeners without replacing.`),n.onHandler=t}getHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}dispatch(e,t){let n=this._eventSlots.get(e);if(n){n.onHandler?.(t);for(let e of[...n.listeners])e(t)}}_ensureEventSlot(e){let t=this._eventSlots.get(e);return t||(t={listeners:[]},this._eventSlots.set(e,t)),t}},U_=class{_methods=new Set;claim(e,t){if(this._methods.has(e))throw Error(`Handler for "${e}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._methods.add(e)}replace(e){this._methods.add(e)}release(e){this._methods.delete(e)}has(e){return this._methods.has(e)}},W_=new Set;function G_(e,t){let[n,r]=t,i=n?.shape;if(typeof i?.method?.value!=`string`)return;let a=i.method.value,o=e===`request`?`setRequestHandler`:`setNotificationHandler`;W_.has(o)||(W_.add(o),console.warn(`[ext-apps] ${o}(Schema, handler) is deprecated; use ${o}("${a}", { params: Schema.shape.params }, handler).`));let s=r;return[a,{params:i.params},e===`request`?(e,t)=>s({method:a,params:e},K_(t)):e=>s({method:a,params:e})]}function K_(e){return{signal:e.mcpReq.signal,requestId:e.mcpReq.id,sessionId:e.sessionId,_meta:e.mcpReq._meta,sendRequest:e.mcpReq.send,sendNotification:e.mcpReq.notify,authInfo:e.http?.authInfo}}var q_=`2026-01-26`,J_=class{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource){console.debug(`Ignoring message from unknown source`,e);return}let n=eu.safeParse(e.data);n.success?(console.debug(`Parsed message`,n.data),this.onmessage?.(n.data)):e.data?.jsonrpc===`2.0`?(console.error(`Failed to parse message`,n.error.message,e),this.onerror?.(Error(`Invalid JSON-RPC message received: `+n.error.message))):console.debug(`Ignoring non-JSON-RPC message`,n.error.message,e)}}async start(){window.addEventListener(`message`,this.messageListener)}async send(e,t){e.method!==`ui/notifications/tool-input-partial`&&console.debug(`Sending message`,e),this.eventTarget.postMessage(e,`*`)}async close(){window.removeEventListener(`message`,this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},Y_=M([F(`light`),F(`dark`)]).describe(`Color theme preference for the host environment.`),X_=M([F(`inline`),F(`fullscreen`),F(`pip`)]).describe(`Display mode for UI presentation.`),Z_=N(M([F(`--color-background-primary`),F(`--color-background-secondary`),F(`--color-background-tertiary`),F(`--color-background-inverse`),F(`--color-background-ghost`),F(`--color-background-info`),F(`--color-background-danger`),F(`--color-background-success`),F(`--color-background-warning`),F(`--color-background-disabled`),F(`--color-text-primary`),F(`--color-text-secondary`),F(`--color-text-tertiary`),F(`--color-text-inverse`),F(`--color-text-ghost`),F(`--color-text-info`),F(`--color-text-danger`),F(`--color-text-success`),F(`--color-text-warning`),F(`--color-text-disabled`),F(`--color-border-primary`),F(`--color-border-secondary`),F(`--color-border-tertiary`),F(`--color-border-inverse`),F(`--color-border-ghost`),F(`--color-border-info`),F(`--color-border-danger`),F(`--color-border-success`),F(`--color-border-warning`),F(`--color-border-disabled`),F(`--color-ring-primary`),F(`--color-ring-secondary`),F(`--color-ring-inverse`),F(`--color-ring-info`),F(`--color-ring-danger`),F(`--color-ring-success`),F(`--color-ring-warning`),F(`--font-sans`),F(`--font-mono`),F(`--font-weight-normal`),F(`--font-weight-medium`),F(`--font-weight-semibold`),F(`--font-weight-bold`),F(`--font-text-xs-size`),F(`--font-text-sm-size`),F(`--font-text-md-size`),F(`--font-text-lg-size`),F(`--font-heading-xs-size`),F(`--font-heading-sm-size`),F(`--font-heading-md-size`),F(`--font-heading-lg-size`),F(`--font-heading-xl-size`),F(`--font-heading-2xl-size`),F(`--font-heading-3xl-size`),F(`--font-text-xs-line-height`),F(`--font-text-sm-line-height`),F(`--font-text-md-line-height`),F(`--font-text-lg-line-height`),F(`--font-heading-xs-line-height`),F(`--font-heading-sm-line-height`),F(`--font-heading-md-line-height`),F(`--font-heading-lg-line-height`),F(`--font-heading-xl-line-height`),F(`--font-heading-2xl-line-height`),F(`--font-heading-3xl-line-height`),F(`--border-radius-xs`),F(`--border-radius-sm`),F(`--border-radius-md`),F(`--border-radius-lg`),F(`--border-radius-xl`),F(`--border-radius-full`),F(`--border-width-regular`),F(`--shadow-hairline`),F(`--shadow-sm`),F(`--shadow-md`),F(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`),M([T(),Mc()]).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`)).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`);A({method:F(`ui/open-link`),params:A({url:T().describe(`URL to open in the host\'s browser`)})});var Q_=A({isError:D().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),$_=A({isError:D().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),ev=A({isError:D().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough();A({method:F(`ui/notifications/sandbox-proxy-ready`),params:A({})});var tv=A({connectDomains:k(T()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).\n\n- Maps to CSP \\`connect-src\\` directive\n- Empty or omitted \u2192 no network connections (secure default)`),resourceDomains:k(T()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\\n\\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\\n- Wildcard subdomains supported: `https://*.example.com`\\n- Empty or omitted \u2192 no network resources (secure default)"),frameDomains:k(T()).optional().describe("Origins for nested iframes.\\n\\n- Maps to CSP `frame-src` directive\\n- Empty or omitted \u2192 no nested iframes allowed (`frame-src \'none\'`)"),baseUriDomains:k(T()).optional().describe("Allowed base URIs for the document.\\n\\n- Maps to CSP `base-uri` directive\\n- Empty or omitted \u2192 only same origin allowed (`base-uri \'self\'`)")}),nv=A({camera:A({}).optional().describe(`Request camera access.\n\nMaps to Permission Policy \\`camera\\` feature.`),microphone:A({}).optional().describe(`Request microphone access.\n\nMaps to Permission Policy \\`microphone\\` feature.`),geolocation:A({}).optional().describe(`Request geolocation access.\n\nMaps to Permission Policy \\`geolocation\\` feature.`),clipboardWrite:A({}).optional().describe(`Request clipboard write access.\n\nMaps to Permission Policy \\`clipboard-write\\` feature.`)});A({method:F(`ui/notifications/size-changed`),params:A({width:E().optional().describe(`New width in pixels.`),height:E().optional().describe(`New height in pixels.`)})});var rv=A({method:F(`ui/notifications/tool-input`),params:A({arguments:N(T(),O().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),iv=A({method:F(`ui/notifications/tool-input-partial`),params:A({arguments:N(T(),O().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),av=A({method:F(`ui/notifications/tool-cancelled`),params:A({reason:T().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),ov=A({fonts:T().optional()}),sv=A({variables:Z_.optional().describe(`CSS variables for theming the app.`),css:ov.optional().describe(`CSS blocks that apps can inject.`)}),cv=A({method:F(`ui/resource-teardown`),params:A({})}),lv=N(T(),O()),uv=A({text:A({}).optional().describe(`Host supports text content blocks.`),image:A({}).optional().describe(`Host supports image content blocks.`),audio:A({}).optional().describe(`Host supports audio content blocks.`),resource:A({}).optional().describe(`Host supports resource content blocks.`),resourceLink:A({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:A({}).optional().describe(`Host supports structured content.`)});A({method:F(`ui/notifications/request-teardown`),params:A({}).optional()});var dv=A({experimental:N(T(),N(T(),Ic()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:A({}).optional().describe(`Host supports opening external URLs.`),downloadFile:A({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:A({listChanged:D().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:A({listChanged:D().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:A({}).optional().describe(`Host accepts log messages.`),sandbox:A({permissions:nv.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:tv.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:uv.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model\'s context for future turns.`),message:uv.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:A({tools:A({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),fv=A({experimental:N(T(),N(T(),Ic()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:A({listChanged:D().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:k(X_).optional().describe(`Display modes the app supports.`)});A({method:F(`ui/notifications/initialized`),params:A({}).optional()}),A({csp:tv.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:nv.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:T().optional().describe(`Dedicated origin for view sandbox.\n\nUseful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.\n\n**Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include:\n- Hash-based subdomains (e.g., \\`{hash}.claudemcpcontent.com\\`)\n- URL-derived subdomains (e.g., \\`www-example-com.oaiusercontent.com\\`)\n\nIf omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:D().optional().describe(`Visual boundary preference - true if view prefers a visible border.\n\nBoolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts\' defaults may vary.\n\n- \\`true\\`: request visible border + background\n- \\`false\\`: request no visible border + background\n- omitted: host decides border`)}),A({method:F(`ui/request-display-mode`),params:A({mode:X_.describe(`The display mode being requested.`)})});var pv=A({mode:X_.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough(),mv=M([F(`model`),F(`app`)]).describe(`Tool visibility scope - who can access the tool.`);A({resourceUri:T().optional(),visibility:k(mv).optional().describe(`Who can access this tool. Default: ["model", "app"]\n- "model": Tool visible to and callable by the agent\n- "app": Tool callable by the app from this server only`),csp:zc().optional(),permissions:zc().optional()}),A({mimeTypes:k(T()).optional().describe(\'Array of supported MIME types for UI resources.\\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.\')}),A({method:F(`ui/download-file`),params:A({contents:k(M([pd,md])).describe(`Resource contents to download \u2014 embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),A({method:F(`ui/message`),params:A({role:F(`user`).describe(`Message role, currently only "user" is supported.`),content:k(hd).describe(`Message content blocks (text, image, etc.).`)})}),A({method:F(`ui/notifications/sandbox-resource-ready`),params:A({html:T().describe(`HTML content to load into the inner iframe.`),sandbox:T().optional().describe(`Optional override for the inner iframe\'s sandbox attribute.`),csp:tv.optional().describe(`CSP configuration from resource metadata.`),permissions:nv.optional().describe(`Sandbox permissions from resource metadata.`)})});var hv=A({method:F(`ui/notifications/tool-result`),params:wd.describe(`Standard MCP tool execution result.`)}),gv=A({toolInfo:A({id:Yl.optional().describe(`JSON-RPC id of the tools/call request.`),tool:xd.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:Y_.optional().describe(`Current color theme preference.`),styles:sv.optional().describe(`Style configuration for theming the app.`),displayMode:X_.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:k(X_).optional().describe(`Display modes the host supports.`),containerDimensions:M([A({height:E().describe(`Fixed container height in pixels.`)}),A({maxHeight:M([E(),Mc()]).optional().describe(`Maximum container height in pixels.`)})]).and(M([A({width:E().describe(`Fixed container width in pixels.`)}),A({maxWidth:M([E(),Mc()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other\ncontainer holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:T().optional().describe(`User\'s language and region preference in BCP 47 format.`),timeZone:T().optional().describe(`User\'s timezone in IANA format.`),userAgent:T().optional().describe(`Host application identifier.`),platform:M([F(`web`),F(`desktop`),F(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:A({touch:D().optional().describe(`Whether the device supports touch input.`),hover:D().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:A({top:E().describe(`Top safe area inset in pixels.`),right:E().describe(`Right safe area inset in pixels.`),bottom:E().describe(`Bottom safe area inset in pixels.`),left:E().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),_v=A({method:F(`ui/notifications/host-context-changed`),params:gv.describe(`Partial context update containing only changed fields.`)});A({method:F(`ui/update-model-context`),params:A({content:k(hd).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:N(T(),O().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),A({method:F(`ui/initialize`),params:A({appInfo:cu.describe(`App identification (name and version).`),appCapabilities:fv.describe(`Features and capabilities this app provides.`),protocolVersion:T().describe(`Protocol version this app supports.`)})});var vv=A({protocolVersion:T().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:cu.describe(`Host application identification and version.`),hostCapabilities:dv.describe(`Features and capabilities provided by the host.`),hostContext:gv.describe(`Rich context about the host environment.`)}).passthrough(),yv={target:`draft-2020-12`};async function bv(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](yv);throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function xv(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}function Sv(e,t){let n={...e,...t};return t.experimental!==void 0&&(n.experimental={...e.experimental,...t.experimental}),t.tools!==void 0&&(n.tools={...e.tools,...t.tools}),n}var Cv=class e extends tg{_appInfo;_appCapabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_registeredEvents=new Set;_events=new H_;_methods=new U_;setRequestHandler=(...e)=>{let[t,...n]=G_(`request`,e)??e;this._methods.claim(t,`setRequestHandler`),super.setRequestHandler.call(this,t,...n)};setNotificationHandler=(...e)=>{let[t,...n]=G_(`notification`,e)??e;this._methods.claim(t,`setNotificationHandler`),super.setNotificationHandler.call(this,t,...n)};removeRequestHandler=e=>{this._methods.release(e),super.removeRequestHandler(e)};removeNotificationHandler=e=>{this._methods.release(e),super.removeNotificationHandler(e)};replaceRequestHandler=(e,...t)=>{this._methods.replace(e),super.setRequestHandler.call(this,e,...t)};_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:rv,toolinputpartial:iv,toolresult:hv,toolcancelled:av,hostcontextchanged:_v};static ONE_SHOT_EVENTS=new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]);_everHadListener=new Set;_assertHandlerTiming(t){if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let n=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.setHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.addEventListener(e,t)}removeEventListener(e,t){this._events.removeEventListener(e,t)}_ensureEventSlot(e){if(this._registeredEvents.has(e))return;let t=this.eventSchemas[e];if(!t)throw Error(`Unknown event: ${String(e)}`);this.setNotificationHandler(t.shape.method.value,{params:t.shape.params},t=>{let n=t;e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...n}),this._events.dispatch(e,n)}),this._registeredEvents.add(e)}getEventHandler(e){return this._events.getHandler(e)}warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._appCapabilities=t,this.options=n,this._methods.replace(`notifications/cancelled`),this._methods.replace(`notifications/progress`),!n.allowUnsafeEval&&yt({jitless:!0}),this.replaceRequestHandler(`ping`,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}buildContext(e){return e}registerAppCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._appCapabilities=Sv(this._appCapabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._appCapabilities.tools?.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await xv(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await xv(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._appCapabilities.tools&&!this.transport&&this.registerAppCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await bv(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await bv(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(`ui/resource-teardown`,{params:cv.shape.params,result:lv},(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(`tools/call`,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(`tools/list`,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){switch(e){case`sampling/createMessage`:if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`);break}}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._appCapabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;default:return}}assertNotificationCapability(e){}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},t)}async createSamplingMessage(e,t){return this._assertInitialized(`createSamplingMessage`),await this.request({method:`sampling/createMessage`,params:e},t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},ev,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},nu,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},Q_,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},$_,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},pv,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new J_(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1;try{await super.connect(e);let n=await this.request({method:`ui/initialize`,params:{appCapabilities:this._appCapabilities,appInfo:this._appInfo,protocolVersion:q_}},vv,t);if(n===void 0)throw Error(`Server sent invalid initialize result: ${n}`);this._hostCapabilities=n.hostCapabilities,this._hostInfo=n.hostInfo,this._hostContext=n.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}},wv=e=>`${e}`.split(`.`)[1]?.length??0,Tv=e=>10**-wv(e),Ev=(e,t)=>`${+e.toFixed(wv(t))}`,Dv=class extends Error{},Ov=/[A-Za-z_$][\\w$-]*/y,kv=/-?(?:\\d[\\d_]*\\.?\\d*|\\.\\d+)(?:e[+-]?\\d+)?/iy,Av={amp:`&`,lt:`<`,gt:`>`,quot:`"`,apos:`\'`,nbsp:`\\xA0`},jv=e=>e.replace(/&(#x[\\da-f]+|#\\d+|\\w+);/gi,(e,t)=>t[0]===`#`?String.fromCodePoint(t[1]===`x`||t[1]===`X`?parseInt(t.slice(2),16):+t.slice(1)):Av[t]??e),Mv=e=>e.replace(/\\\\(u\\{[\\da-f]+\\}|u[\\da-f]{4}|x[\\da-f]{2}|[\\s\\S])/gi,(e,t)=>t.length>1?String.fromCodePoint(parseInt(t.replace(/[ux{}]/gi,``),16)):{n:`\n`,t:` `,r:`\\r`,b:`\\b`,f:`\\f`,v:`\\v`,0:`\\0`}[t]??t);function Nv(e){let t=0,n=e=>{throw new Dv(e)},r=()=>e.slice(t,t+12).split(`\n`)[0],i=n=>{n.lastIndex=t;let r=n.exec(e)?.[0];return r&&(t+=r.length),r},a=()=>{for(;;)if(i(/\\s+/y),e.startsWith(`//`,t))i(/\\/\\/.*/y);else if(e.startsWith(`/*`,t)){let n=e.indexOf(`*/`,t+2);t=n<0?e.length:n+2}else return},o=n=>(a(),e.startsWith(n,t)),s=e=>{o(e)||n(`Expected \\`${e}\\` at \\`${r()}\\`.`),t+=e.length};function c(){let a=[i(Ov)??n(`Expected a name at \\`${r()}\\`.`)];for(;e[t]===`.`;)t++,a.push(i(Ov)??n("Expected a name after `.`."));return a}function l(r,i=!1){let a=e[t],o=t+1;for(;o<e.length&&e[o]!==a;)e[o]===`\\\\`&&!i&&o++,o++;o>=e.length&&n(`A string is not closed.`);let s=e.slice(t+1,o);return a==="`"&&s.includes("${")&&n(`A template string cannot run here.`),t=o+1,{type:`string`,value:i?jv(s):Mv(s),quote:a,jsx:i,start:r,end:t}}function u(){a();let r=t,f=e[t];if(f===`"`||f===`\'`||f==="`")return l(r);if(f===`<`)return d();if(f===`(`){t++;let e=u();return s(`)`),e}if(f===`[`){t++;let e=[];for(;!o(`]`);)e.push(u()),o(`]`)||s(`,`);return t++,{type:`array`,items:e,start:r,end:t}}if(f===`{`){t++;let n=[];for(;!o(`}`);){let r=t,i=e[t]===`"`||e[t]===`\'`?l(t).value:c()[0],a={type:`name`,path:[i],start:r,end:t};n.push([i,o(`:`)?(t++,u()):a]),o(`}`)||s(`,`)}return t++,{type:`object`,entries:n,start:r,end:t}}let p=i(kv);if(p)return{type:`number`,value:+p.replace(/_/g,``),start:r,end:t};let m=c(),h=t;if(m.length===1){let e=m[0];if(e===`true`||e===`false`)return{type:`boolean`,value:e===`true`,start:r,end:h};if(e===`null`||e===`undefined`)return{type:e,start:r,end:h}}return o(`(`)&&n(`\\`${m.join(`.`)}()\\` is a call, which cannot run here.`),{type:`name`,path:m,start:r,end:h}}function d(){let f=t;s(`<`);let p=o(`>`)?``:c().join(`.`),m=[];for(;;){if(o(`/>`))return t+=2,{type:`element`,name:p,attributes:m,children:[],start:f,end:t};if(o(`>`))break;let c=t;if(o(`{`)){t++,s(`...`);let e=u();s(`}`),m.push({name:``,value:e,spread:!0,start:c,end:t});continue}let d=i(/[\\w$:-]+/y)??n(`Expected a prop at \\`${r()}\\`.`),h=t,g=null;o(`=`)&&(t++,a(),e[t]===`{`?(t++,g=u(),s(`}`)):g=e[t]===`"`||e[t]===`\'`?l(t,!0):u()),m.push({name:d,value:g,start:c,end:g?t:h})}t++;let h=[];for(;;){t>=e.length&&n(`\\`<${p}>\\` is not closed.`);let r=t;if(e.startsWith(`</`,t)){t+=2,a();let r=e[t]===`>`?``:c().join(`.`);return r!==p&&n(`\\`</${r}>\\` does not close \\`<${p}>\\`.`),s(`>`),{type:`element`,name:p,attributes:m,children:h,start:f,end:t}}e[t]===`<`?h.push(d()):e[t]===`{`?(t++,o(`}`)||h.push(u()),s(`}`)):(t=e.slice(t).search(/[<{]/)+t,t<r&&(t=e.length),h.push({type:`text`,raw:e.slice(r,t),start:r,end:t}))}}let f=[];for(;!o(`;`)&&t<e.length;){e[t]!==`<`&&e[t]!==`(`&&n(`Expected an element at \\`${r()}\\`.`);let i=u();i.type!==`element`&&n(`Expected an element.`),f.push(i)}return f}function Pv(e,t={}){let n=[],r=(e,r,i)=>{let a=t[`${e}.${r}`]??t[r],{value:o}=i,s=i.type===`string`?i.quote:``;if(a===!1||s==="`"||`${o}`.includes(`\n`))return;let c=a&&(`length`in a?a:a.options);n.push({prop:r,kind:c?`option`:i.type===`string`?`text`:i.type,value:o,range:{start:i.start,end:i.end},quote:s,jsx:i.type===`string`&&(!s||!!i.jsx),step:typeof o==`number`?Tv(o):1,...a&&`length`in a?{options:c}:a})},i=e=>{for(let{name:t,value:n}of e.attributes)n?.type===`element`?i(n):(n?.type===`string`||n?.type===`number`||n?.type===`boolean`)&&r(e.name,t,n);let[t]=e.children,n=t?.type===`text`?t.raw.trim():``;if(e.children.length===1&&n&&!n.includes(`\n`)){let i=t.start+t.raw.indexOf(n);r(e.name,`children`,{type:`string`,value:jv(n),quote:``,start:i,end:i+n.length})}for(let t of e.children)t.type===`element`&&i(t)};return e.forEach(i),n}function Fv(e,t){let{quote:n}=e;if(typeof t!=`string`){let r=typeof t==`number`?Ev(t,e.step):`${t}`;return e.jsx&&n?`{${r}}`:r}if(!e.jsx){let e=n||`"`;return e+t.replaceAll(`\\\\`,`\\\\\\\\`).replaceAll(e,`\\\\${e}`)+e}let r=t.replaceAll(`&`,`&amp;`).replaceAll(`<`,`&lt;`);return n?n+r.replaceAll(n,n===`"`?`&quot;`:`&apos;`)+n:r.replaceAll(`>`,`&gt;`).replaceAll(`{`,`&#123;`).replaceAll(`}`,`&#125;`)}function Iv(e,t,n){let{start:r,end:i}=t.range;return e.slice(0,r)+Fv(t,n)+e.slice(i)}function Lv(e){let t=[],n=e=>{for(let r of e.attributes)!r.value&&!r.spread?t.push(r.end):r.value?.type===`element`&&n(r.value);for(let t of e.children)t.type===`element`&&n(t)};return Nv(e).forEach(n),t.reverse().reduce((e,t)=>e.slice(0,t)+`={true}`+e.slice(t),e)}var Rv=new Set(`as async await break case catch class const continue default delete do else enum export extends false finally for from function if import in instanceof interface let new null of return satisfies static switch this throw true try type typeof undefined var void while yield`.split(` `)),zv=/^(|[(,=:?[{}>&|!]|return)$/;function Bv(e){let t=[],n=[{in:`code`,depth:0}],r=0,i=``,a=t=>(t.lastIndex=r,t.exec(e)?.[0]??``),o=(e,n)=>{n&&t.push({ink:e,start:r,end:r+n}),r+=n},s=t=>{let n=r+1;for(;n<e.length&&e[n]!==t;)n+=e[n]===`\\\\`?2:1;o(`string`,Math.min(n+1,e.length)-r)};for(;r<e.length;){let t=n[n.length-1],c=e[r];if(t.in===`text`){if(c===`{`)r++,n.push({in:`code`,depth:0});else if(c===`<`)r++,e[r]===`/`?(r++,o(`tag`,a(/[\\w$.:-]*/y).length),r=Math.max(r,e.indexOf(`>`,r)+1),n.pop()):n.push({in:`tag`,named:!1});else{let t=e.slice(r).search(/[<{]/);r=t<0?e.length:r+t}continue}if(t.in===`tag`){let i=a(/[\\w$.:-]+/y);i?o(t.named?`attribute`:`tag`,i.length):c===`"`||c===`\'`?s(c):c===`{`?(r++,n.push({in:`code`,depth:0})):c===`>`?(r++,n[n.length-1]={in:`text`}):e.startsWith(`/>`,r)?(r+=2,n.pop()):r++,t.named=!0;continue}let l=a(/\\s+|\\/\\/.*|\\/\\*[\\s\\S]*?(\\*\\/|$)/y);if(l){r+=l.length;continue}let u=a(/[A-Za-z_$][\\w$]*/y);if(u){let t=e.slice(r+u.length).match(/^\\s*(\\S)/)?.[1],n=Rv.has(u)?`keyword`:t===`(`||/^[A-Z]/.test(u)?`tag`:e[r-1]===`.`||t===`:`&&i!==`?`?`attribute`:void 0;n?o(n,u.length):r+=u.length,i=u===`return`?u:`name`;continue}let d=a(/\\d[\\d_]*\\.?\\d*(e[+-]?\\d+)?n?|\\.\\d+/iy);if(d){o(`keyword`,d.length),i=`name`;continue}if(c===`"`||c===`\'`||c==="`"){s(c),i=`name`;continue}if(c===`<`&&zv.test(i)&&/[A-Za-z>]/.test(e[r+1]??``)){r++,n.push({in:`tag`,named:e[r]===`>`}),e[r]===`>`&&(r++,n[n.length-1]={in:`text`});continue}if(c===`{`&&t.depth++,c===`}`){if(t.depth===0&&n.length>1){r++,n.pop();continue}t.depth--}i=e.startsWith(`&&`,r)||e.startsWith(`||`,r)?`&`:c,r++}return t}var Vv=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Hv=o(((e,t)=>{t.exports=Vv()})),Uv=o(((e,t)=>{(function(){var e={}.hasOwnProperty;function n(){for(var e=``,t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,r(n)))}return e}function r(t){if(typeof t==`string`||typeof t==`number`)return t;if(typeof t!=`object`)return``;if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes(`[native code]`))return t.toString();var r=``;for(var a in t)e.call(t,a)&&t[a]&&(r=i(r,a));return r}function i(e,t){return t?e?e+` `+t:e+t:e}t!==void 0&&t.exports?(n.default=n,t.exports=n):typeof define==`function`&&typeof define.amd==`object`&&define.amd?define(`classnames`,[],function(){return n}):window.classNames=n})()})),V=c(Hv(),1),Wv=c(Uv(),1),Gv=`sfr28j0`;function Kv({size:e=24,className:t,...n}){return(0,V.jsx)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,className:(0,Wv.default)(Gv,t),...n})}function qv(e){return(0,V.jsx)(Kv,{...e,children:(0,V.jsx)(`path`,{d:`M6 12.5l3.5 3.5L18 8`})})}function Jv(e){return(0,V.jsxs)(Kv,{...e,children:[(0,V.jsx)(`rect`,{x:`5.5`,y:`8.5`,width:`10`,height:`10`,rx:`2`}),(0,V.jsx)(`path`,{d:`M8.5 8.5v-1a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2h-1`})]})}var Yv=2*(1-Math.SQRT1_2),Xv=4/3*Math.tan(Math.PI/16)*2,Zv=[[6+Yv,6+Yv],[6+Yv-Xv*Math.SQRT1_2,6+Yv+Xv*Math.SQRT1_2],[6,8-Xv],[6,8]],Qv=Array.from({length:4},()=>[8.5,6]),$v=e=>[...e,...e.map(([e,t])=>[e,24-t]).reverse()];$v(Zv),$v(Qv);function ey(e){return(0,V.jsx)(Kv,{...e,children:(0,V.jsx)(`path`,{d:`M6 12a6 6 0 1 0 6-6c-1.67 0-3.23.68-4.43 1.83L6 9.43M6 6v3.43h3.43`})})}var ty=`.cc{--cc-surface:light-dark(#fff,oklch(17.5% 0 0));--cc-subtle:light-dark(oklch(93% 0 0),oklch(24.5% 0 0));--cc-sunken:light-dark(oklch(89.5% 0 0),oklch(21% 0 0));--cc-foreground:light-dark(oklch(22.7% .006 271.2),oklch(92.3% .004 286.3));--cc-secondary:light-dark(oklch(41.8% .014 274.6),oklch(78.2% .016 281.9));--cc-muted:light-dark(oklch(52% .044 267.6),oklch(67.3% .028 276.2));--cc-disabled:light-dark(oklch(72% .01 270),oklch(48% .01 280));--cc-text:light-dark(oklch(49% .04 268),oklch(67.3% .028 276.2));--cc-line:light-dark(oklch(59% .02 270),oklch(51% .02 276));--cc-tag:light-dark(oklch(46% .185 145.3),oklch(84.4% .185 145.3));--cc-attribute:light-dark(oklch(46% .088 229.9),oklch(85.7% .088 229.9));--cc-string:light-dark(oklch(46% .191 32.2),oklch(71.2% .191 32.2));--cc-keyword:light-dark(oklch(46% .2 317.2),oklch(76.9% .2 317.2));--cc-sans:Geist, ui-sans-serif, system-ui, sans-serif;--cc-mono:"Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;--cc-ease:.24s cubic-bezier(.2, .9, .3, 1);--copy:0;--reset:0;--split:.5;--seam:min(2px, var(--split) * (100cqw - 4px), (1 - var(--split)) * (100cqw - 4px));--edge:calc(2px + var(--split) * (100cqw - 4px - var(--seam)));box-sizing:border-box;outline:1px solid var(--cc-subtle);background:var(--cc-subtle);width:100%;color:var(--cc-foreground);font:16px/24px var(--cc-sans);text-align:left;-webkit-font-smoothing:antialiased;border-radius:8px;position:relative;overflow:hidden;container-type:inline-size}.cc[data-theme=light]{color-scheme:light}.cc[data-theme=dark]{color-scheme:dark}.cc *,.cc :before,.cc :after{box-sizing:inherit}.cc{display:grid}.cc-frame{background:var(--cc-surface);gap:2px;min-height:0;padding:2px;display:grid}:where(.cc-frame>*>*){--split:initial;--seam:initial;--edge:initial;--seam-y:initial;--edge-y:initial;--into:initial;--cc-h:initial}.cc-frame,.cc-split{--into:clamp(0px, 8px - (1 - var(--split)) * (100cqw - 4px - var(--seam)), 8px)}.cc-split{inset:0 auto;left:calc(var(--edge) + var(--seam) / 2 - 5px);width:14px;translate:calc(var(--into) * -1);cursor:grab;touch-action:none;-webkit-user-select:none;display:none;position:absolute}.cc-split:active{cursor:grabbing}@property --cc-grip{syntax:"<number>";inherits:false;initial-value:0}.cc-split,.cc-frame>*{transition:--cc-grip .3s linear(0, .25, .58, .79, .9, .95, .98, .99, .996, 1)}:is(.cc-split:is(:hover,:active),.cc:has(>.cc-split:is(:hover,:active))>.cc-frame>*){--cc-grip:1}.cc-split{--cc-off:calc((1 - var(--cc-grip)) * (8px - var(--into)));--cc-on:calc((1 - var(--cc-grip)) * var(--into))}.cc-split:after{content:"";top:calc(50% - 20px);left:calc(var(--seam) / 2 + 5px);width:4px;height:40px;transform-origin:var(--into);background:var(--cc-disabled);translate:calc(var(--cc-on) - var(--cc-off)) 0;clip-path:inset(0 var(--cc-on) 0 var(--cc-off));border-radius:2px;position:absolute}@property --cc-deep{syntax:"*";inherits:false}@property --cc-fillet{syntax:"*";inherits:false}@property --cc-corner{syntax:"*";inherits:false}@property --cc-m{syntax:"*";inherits:false}@property --cc-q{syntax:"*";inherits:false}@property --cc-l{syntax:"*";inherits:false}@property --cc-s{syntax:"*";inherits:false}@property --cc-t{syntax:"*";inherits:false}@property --cc-e{syntax:"*";inherits:false}@property --cc-a{syntax:"*";inherits:false}@property --cc-b{syntax:"*";inherits:false}.cc-frame>*{--cc-fillet:6px;--cc-corner:var(--cc-fillet);--cc-m:clamp(-1 * (var(--cc-fillet) + var(--cc-corner)), var(--cc-deep) - var(--cc-fillet) - var(--cc-corner), 0px);--cc-q:calc((var(--cc-fillet) + var(--cc-corner)) * sqrt(max(0, 1 - pow(tan(atan2(var(--cc-m), var(--cc-fillet) + var(--cc-corner))), 2))));--cc-l:tan(atan2(var(--cc-fillet), var(--cc-fillet) + var(--cc-corner)));--cc-s:calc(24px - var(--cc-corner));--cc-t:calc(var(--cc-s) + (1 - var(--cc-l)) * var(--cc-q));--cc-e:calc(var(--cc-s) + var(--cc-q));--cc-a:calc(var(--cc-fillet) + var(--cc-l) * var(--cc-m));--cc-b:calc(var(--cc-deep) - var(--cc-corner) - (1 - var(--cc-l)) * var(--cc-m))}@container (width>=640px){.cc-frame{grid-template-columns:calc(var(--split) * (100% - var(--seam))) minmax(0, 1fr);column-gap:var(--seam);grid-template-rows:minmax(0,1fr)}.cc-frame>*{min-height:0}.cc-preview{--cc-deep:calc(min(1.5 * var(--into), var(--into) + 4px - var(--seam)) * var(--cc-grip));overflow:clip}.cc-code{--cc-deep:calc(var(--cc-grip) * 8px);clip-path:inset(-2px 0 0 -2px)}@supports (clip-path:shape(from 0 0, line to 1px 1px)){.cc-preview{clip-path:shape(from -9999px -9999px, hline to calc(100% + 9999px), vline to calc(50% - var(--cc-e)), hline to 100%, arc to calc(100% - var(--cc-a)) calc(50% - var(--cc-t)) of var(--cc-fillet) cw, line to calc(100% - var(--cc-b)) calc(50% - var(--cc-t)), arc to calc(100% - var(--cc-deep)) calc(50% - var(--cc-s)) of var(--cc-corner) ccw, vline to calc(50% + var(--cc-s)), arc to calc(100% - var(--cc-b)) calc(50% + var(--cc-t)) of var(--cc-corner) ccw, line to calc(100% - var(--cc-a)) calc(50% + var(--cc-t)), arc to 100% calc(50% + var(--cc-e)) of var(--cc-fillet) cw, hline to calc(100% + 9999px), vline to calc(100% + 9999px), hline to -9999px, close)}.cc-code{clip-path:shape(from -2px -2px, hline to 100%, vline to 100%, hline to -2px, vline to calc(50% + var(--cc-e)), hline to 0px, arc to var(--cc-a) calc(50% + var(--cc-t)) of var(--cc-fillet) cw, line to var(--cc-b) calc(50% + var(--cc-t)), arc to var(--cc-deep) calc(50% + var(--cc-s)) of var(--cc-corner) ccw, vline to calc(50% - var(--cc-s)), arc to var(--cc-b) calc(50% - var(--cc-t)) of var(--cc-corner) ccw, line to var(--cc-a) calc(50% - var(--cc-t)), arc to 0px calc(50% - var(--cc-e)) of var(--cc-fillet) cw, hline to -2px, close)}}.cc>.cc-tab{--cut:calc(var(--edge) + var(--seam) - 2px);clip-path:polygon(-1px -1px, calc(var(--cut) + 6px) -1px, calc(var(--cut) + 6px) 0, calc(var(--cut) + 4.45px) .2px, calc(var(--cut) + 3px) .8px, calc(var(--cut) + 1.76px) 1.76px, calc(var(--cut) + .8px) 3px, calc(var(--cut) + .2px) 4.45px, var(--cut) 6px, var(--cut) calc(100% + 6px), -1px calc(100% + 6px))}.cc-split{display:block}.cc[data-alone]>.cc-frame{grid-template-columns:minmax(0,1fr)}.cc[data-collapsed=code]>.cc-frame>.cc-code,.cc[data-collapsed=preview]>.cc-frame>.cc-preview{contain:size}.cc-split{--at:calc(5px - var(--seam) / 2);clip-path:polygon(var(--at) 0, 100% 0, 100% 100%, var(--at) 100%, var(--at) calc(50% + 24px), 0 calc(50% + 24px), 0 calc(50% - 24px), var(--at) calc(50% - 24px))}}.cc{--seam-y:2px;--edge-y:0px;--stack:100vh}.cc[data-stack]{--seam-y:min(2px, var(--split) * var(--stack), (1 - var(--split)) * var(--stack));--edge-y:calc(2px + var(--split) * (var(--stack) - var(--seam-y)))}@container (width<640px){.cc-frame{grid-template-rows:auto minmax(0,1fr)}.cc:not([data-stack],[data-collapsed])>.cc-split{visibility:hidden}.cc[data-alone]>.cc-frame,.cc[data-collapsed]:not([data-opened])>.cc-frame,.cc[data-closed]:not([data-stack])>.cc-frame{grid-template-rows:minmax(0,1fr)}.cc:is([data-stack],:not([data-closed],[data-collapsed],[data-alone],[data-measure]))>.cc-frame{grid-template-rows:calc(var(--split) * (100% - var(--seam-y))) minmax(0, 1fr);row-gap:var(--seam-y)}.cc[data-stack=own]>.cc-frame{height:calc(var(--stack) + 4px)}.cc[data-measure]>.cc-frame{grid-template-rows:auto minmax(0,1fr);row-gap:2px;height:max-content}.cc:is([data-measure=preview],[data-measure=code])>.cc-frame{grid-template-rows:minmax(0,1fr)}.cc:is([data-stack],:not([data-closed],[data-collapsed],[data-alone],[data-measure]))>.cc-frame>.cc-preview{min-height:0;overflow:clip}.cc:is([data-stack],:not([data-closed],[data-collapsed],[data-alone],[data-measure]))>.cc-frame>.cc-preview:not([data-flush]){--cc-h:calc(var(--split) * (var(--stack) - var(--seam-y)));padding-top:min(48px, var(--cc-h) * 2 / 3);padding-bottom:min(24px, var(--cc-h) / 3)}.cc:is([data-stack],:not([data-closed],[data-collapsed],[data-alone],[data-measure]))>.cc-frame>.cc-preview[data-untitled]:not([data-flush]){padding-top:min(24px, var(--cc-h) / 2);padding-bottom:min(24px, var(--cc-h) / 2)}.cc:is([data-stack],:not([data-closed],[data-collapsed],[data-alone],[data-measure]))>.cc-frame>.cc-code{clip-path:inset(-2px -2px 0);min-height:0;padding-top:0}.cc:is([data-stack],:not([data-closed],[data-collapsed],[data-alone],[data-measure]))>.cc-frame>.cc-code>.cc-body{margin-top:22px}.cc:is([data-stack],:not([data-closed],[data-collapsed],[data-alone],[data-measure]))>.cc-frame>[data-untitled]>.cc-body{margin-top:0}.cc:is([data-stack],:not([data-closed],[data-collapsed],[data-alone],[data-measure]))>.cc-tab{clip-path:inset(-1px -7px calc(26px - var(--edge-y) - var(--seam-y)) -1px)}.cc-frame,.cc-split{--into:clamp(0px, 8px - (1 - var(--split)) * (var(--stack) - var(--seam-y)), 8px)}.cc-split{inset:auto 0;top:calc(var(--edge-y) + var(--seam-y) / 2 - 5px);width:auto;height:14px;translate:0 calc(var(--into) * -1);display:block}.cc-split:after{top:calc(var(--seam-y) / 2 + 5px);width:40px;height:4px;transform-origin:50% var(--into);translate:0 calc(var(--cc-on) - var(--cc-off));clip-path:inset(var(--cc-off) 0 var(--cc-on) 0);left:calc(50% - 20px)}.cc[data-collapsed=code]:not([data-opened])>.cc-frame>.cc-code,.cc[data-collapsed=preview]:not([data-opened])>.cc-frame>.cc-preview,.cc[data-collapsed=preview]:not([data-opened])>.cc-tab,.cc[data-closed=code]:not([data-stack])>.cc-frame>.cc-code,.cc[data-closed=preview]:not([data-stack])>.cc-frame>.cc-preview,.cc[data-closed=preview]:not([data-stack])>.cc-tab,.cc[data-measure=code]>.cc-frame>.cc-code,.cc[data-measure=preview]>.cc-frame>.cc-preview{visibility:hidden;position:absolute}.cc[data-collapsed]:not([data-opened])>:is(.cc-frame,.cc-split),.cc[data-closed]:not([data-stack])>:is(.cc-frame,.cc-split){--seam-y:0px}.cc[data-collapsed=code]:not([data-opened])>:is(.cc-frame,.cc-split),.cc[data-closed=code]:not([data-stack])>:is(.cc-frame,.cc-split){--into:8px}.cc[data-collapsed=preview]:not([data-opened])>.cc-split,.cc[data-closed=preview]:not([data-stack])>.cc-split{--edge-y:2px}.cc[data-collapsed=code]:not([data-opened])>.cc-split,.cc[data-closed=code]:not([data-stack])>.cc-split{--edge-y:calc(100% - 2px)}.cc-preview{--cc-deep:calc(min(1.5 * var(--into), var(--into) + 4px - var(--seam-y)) * var(--cc-grip))}.cc-code{--cc-deep:calc(var(--cc-grip) * 8px)}@supports (clip-path:shape(from 0 0, line to 1px 1px)){.cc-preview{clip-path:shape(from -9999px -9999px, hline to calc(100% + 9999px), vline to calc(100% + 9999px), hline to calc(50% + var(--cc-e)), vline to 100%, arc to calc(50% + var(--cc-t)) calc(100% - var(--cc-a)) of var(--cc-fillet) cw, line to calc(50% + var(--cc-t)) calc(100% - var(--cc-b)), arc to calc(50% + var(--cc-s)) calc(100% - var(--cc-deep)) of var(--cc-corner) ccw, hline to calc(50% - var(--cc-s)), arc to calc(50% - var(--cc-t)) calc(100% - var(--cc-b)) of var(--cc-corner) ccw, line to calc(50% - var(--cc-t)) calc(100% - var(--cc-a)), arc to calc(50% - var(--cc-e)) 100% of var(--cc-fillet) cw, vline to calc(100% + 9999px), hline to -9999px, close)}.cc:is([data-stack],:not([data-closed],[data-collapsed],[data-alone],[data-measure]))>.cc-frame>.cc-code,.cc-code{clip-path:shape(from -2px -2px, hline to calc(50% - var(--cc-e)), vline to 0px, arc to calc(50% - var(--cc-t)) var(--cc-a) of var(--cc-fillet) cw, line to calc(50% - var(--cc-t)) var(--cc-b), arc to calc(50% - var(--cc-s)) var(--cc-deep) of var(--cc-corner) ccw, hline to calc(50% + var(--cc-s)), arc to calc(50% + var(--cc-t)) var(--cc-b) of var(--cc-corner) ccw, line to calc(50% + var(--cc-t)) var(--cc-a), arc to calc(50% + var(--cc-e)) 0px of var(--cc-fillet) cw, vline to -2px, hline to calc(100% + 2px), vline to 100%, hline to -2px, close)}}}.cc-preview{place-items:center;min-width:0;padding:48px 24px 24px;display:grid}.cc-preview[data-untitled]{padding-top:24px}.cc-code[data-untitled]{padding-top:0}.cc-preview[data-flush]{padding:0}:is(.cc[data-handle=always],.cc[data-handle=collapsed][data-closed])>.cc-split,:is(.cc[data-handle=always],.cc[data-handle=collapsed][data-closed])>.cc-frame>*{--cc-grip:1}.cc-problem{color:var(--cc-muted);font:14px/20px var(--cc-sans);text-align:center;margin:0}.cc-tab{--inset:0px;top:calc(var(--inset) * -1);left:calc(var(--inset) * -1);background:var(--ground);height:24px;color:var(--cc-muted);font:12px/16px var(--cc-sans);white-space:nowrap;pointer-events:none;border-bottom-right-radius:6px;align-items:center;padding:0 8px;display:flex;position:absolute}.cc-tab:before,.cc-tab:after{content:"";background:radial-gradient(circle at 100% 100%, #0000 6px, var(--ground) 6.5px);width:6px;height:6px;position:absolute}.cc-tab:before{top:var(--inset);left:100%}.cc-tab:after{top:100%;left:var(--inset)}.cc>.cc-tab{--ground:var(--cc-subtle)}.cc-code{--ground:var(--cc-surface);--tint:var(--cc-text);background:var(--cc-sunken);min-width:0;color:var(--cc-text);font:14px/24px var(--cc-mono);border-radius:6px;flex-direction:column;padding-top:22px;display:flex;position:relative}.cc-head{z-index:2;pointer-events:none;gap:8px;width:calc(100% + 4px);min-width:max-content;display:flex;position:absolute;top:-2px;left:-2px}.cc-head>.cc-tab{--inset:2px;position:relative;top:0;left:0}.cc-body{border-radius:inherit;scrollbar-width:thin;scrollbar-color:var(--cc-disabled) #0000;flex-grow:1;align-items:flex-start;min-height:0;display:flex;overflow:auto}.cc[data-moving]>.cc-frame>.cc-code>.cc-body{scrollbar-color:#0000 #0000}.cc-lines{z-index:1;background:var(--cc-sunken);color:var(--cc-line);text-align:right;white-space:pre;-webkit-user-select:none;flex-shrink:0;padding:16px 4px 16px 16px;position:sticky;left:0}.cc-source{flex:1 0 auto;padding:16px 16px 16px 4px}.cc .cc-source>code{all:unset;white-space:pre;tab-size:2;width:max-content;min-width:100%;display:block}.cc-tag{color:var(--cc-tag)}.cc-attribute{color:var(--cc-attribute)}.cc-string{--tint:var(--cc-string);color:var(--cc-string)}.cc-keyword{--tint:var(--cc-keyword);color:var(--cc-keyword)}.cc-box{all:unset;background:color-mix(in srgb, var(--tint) 14%, #0000);white-space:pre;cursor:pointer;-webkit-user-select:none;-webkit-tap-highlight-color:#0000;border-radius:4px;margin:0 -2px;padding:0 4px;line-height:20px;display:inline-block}.cc-box:is(:hover,:focus-within,[aria-expanded=true]){background:color-mix(in srgb, var(--tint) 28%, #0000)}:is(.cc-box,.cc-action,.cc-menu>button):focus-visible{outline-offset:-2px;outline:2px solid}.cc-scrub{cursor:ew-resize;touch-action:pan-y}.cc-field{cursor:text;min-width:8px;display:inline-grid}.cc-field:after{content:attr(data-value);visibility:hidden;white-space:pre;grid-area:1/1}.cc-field>input{all:unset;grid-area:1/1;width:100%;min-width:0}.cc-menu{min-width:96px;font:14px/20px var(--cc-mono);border:0;margin:0;padding:2px;display:none;position:fixed;inset:auto}.cc-menu,.cc-code:after{background:var(--cc-subtle);color:var(--cc-secondary);border-radius:8px;box-shadow:0 8px 24px oklch(0% 0 0/.12)}.cc-menu:popover-open{gap:2px;display:grid}.cc-menu>button{all:unset;white-space:pre;cursor:pointer;border-radius:6px;align-items:center;gap:16px;height:32px;padding:0 8px;display:flex}.cc-menu>button:is(:hover,:focus){background:var(--cc-sunken);color:var(--cc-foreground)}.cc-menu>[aria-checked=true]:after{content:"\u2713";color:var(--cc-muted);margin-left:auto}:is(.cc-code:is(:hover,:has(:focus-visible)),.cc:has(>.cc-split:is(:hover,:active)) .cc-code){--copy:1}@media (hover:none){.cc-code{--copy:1}.cc[data-handle=collapsed]>.cc-split,.cc[data-handle=collapsed]>.cc-frame>*{--cc-grip:1}}.cc-changed{--reset:1}.cc-actions{--open:max(var(--copy), var(--reset));padding:0 calc(var(--open) * 4px) 0 0;pointer-events:auto;transition:padding var(--cc-ease);border-radius:0 0 0 6px;margin-left:auto}.cc-actions:before,.cc-actions:after{background:radial-gradient(circle at 0 100%, #0000 6px, var(--ground) 6.5px);opacity:var(--open);transition:opacity var(--cc-ease);left:auto}.cc-actions:before{right:100%}.cc-actions:after{right:var(--inset)}.cc-slot{--shown:var(--copy);width:calc(var(--shown) * 24px);transition:width var(--cc-ease);justify-content:flex-end;display:flex;overflow:hidden}.cc-note,.cc-reset{--shown:var(--reset)}.cc-action{all:unset;width:20px;height:20px;color:var(--cc-muted);cursor:pointer;transform:translateX(calc((1 - var(--shown)) * 24px));transition:transform var(--cc-ease);border-radius:4px;flex-shrink:0;place-items:center;display:grid}.cc-action:hover{color:var(--cc-foreground)}.cc-action svg{fill:none;stroke:currentColor;stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round}.cc-action svg *{vector-effect:non-scaling-stroke}.cc-code:after{content:attr(data-note);font:12px/16px var(--cc-sans);white-space:nowrap;opacity:0;transition:opacity var(--cc-ease);pointer-events:none;padding:4px 8px;position:absolute;top:26px;right:4px}.cc-code:has(.cc-note :is(:hover,:focus)):after{opacity:1}@media (prefers-reduced-motion:reduce){.cc *{transition:none!important}}`;function ny(e,t){(0,d.useInsertionEffect)(()=>{if(document.getElementById(e))return;let n=document.createElement(`style`);n.id=e,n.textContent=t,document.head.prepend(n)},[])}function ry(e){let t=e.replace(/^\\s*\\n/,``).trimEnd().split(`\n`),n=Math.min(...t.filter(e=>e.trim()).map(e=>e.search(/\\S/)));return t.map(e=>e.slice(n)).join(`\n`)}var iy=e=>e.kind===`boolean`||typeof e.value==`number`?`cc-box cc-keyword`:e.quote?`cc-box cc-string`:`cc-box`,ay=(0,V.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,"aria-hidden":!0,children:(0,V.jsx)(`path`,{d:`M16 10a6 6 0 1 1-12 0a6 6 0 0 1 12 0M10 9.5V13m0-6v.01`})});function oy({control:e,onChange:t,written:n}){let{min:r=-1/0,max:i=1/0,step:a}=e,o=e.value,s=(0,d.useRef)(null),c=i-r<1/0?Math.min(12,Math.max(2,240*a/(i-r))):6,l=()=>s.current=null,u=e=>{e=Math.min(i,Math.max(r,e)),e!==o&&t(e)};return(0,V.jsx)(`span`,{className:`${iy(e)} cc-scrub`,role:`slider`,tabIndex:0,"aria-label":e.prop,"aria-valuenow":o,"aria-valuemin":r>-1/0?r:void 0,"aria-valuemax":i<1/0?i:void 0,onPointerDown:e=>{e.currentTarget.setPointerCapture(e.pointerId),s.current={x:e.clientX,value:o}},onPointerMove:e=>{if(s.current){let t=Math.round((e.clientX-s.current.x)/c);u(s.current.value+t*a)}},onPointerUp:l,onPointerCancel:l,onKeyDown:e=>{let t=e.shiftKey?a*10:a,n={ArrowUp:o+t,ArrowRight:o+t,ArrowDown:o-t,ArrowLeft:o-t,Home:r,End:i}[e.key];n!==void 0&&isFinite(n)&&(e.preventDefault(),u(n))},children:n})}function sy({control:e,onChange:t,written:n}){return(0,V.jsx)(`button`,{type:`button`,className:iy(e),"aria-label":e.prop,"aria-pressed":e.value,onClick:()=>t(!e.value),children:n})}function cy({control:e,onChange:t}){let n=`${e.value}`,{quote:r}=e;return(0,V.jsxs)(`label`,{className:iy(e),children:[r,(0,V.jsx)(`span`,{className:`cc-field`,"data-value":n,children:(0,V.jsx)(`input`,{size:1,value:n,"aria-label":e.prop,spellCheck:!1,onChange:e=>t(e.target.value),onKeyDown:e=>{(e.key===`Enter`||e.key===`Escape`)&&e.currentTarget.blur()}})}),r]})}function ly({control:e,onChange:t,written:n}){let r=(0,d.useRef)(null),i=(0,d.useRef)(null),[a,o]=(0,d.useState)(!1),s=t=>{let n=typeof t==`string`?e.quote:``;return n+t+n},c=()=>[...r.current.children];return(0,d.useEffect)(()=>{let e=r.current,t=e=>o(e.newState===`open`),n=()=>e.matches(`:popover-open`)&&e.hidePopover();return e.addEventListener(`toggle`,t),addEventListener(`scroll`,n,!0),addEventListener(`resize`,n),()=>{e.removeEventListener(`toggle`,t),removeEventListener(`scroll`,n,!0),removeEventListener(`resize`,n)}},[]),(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`button`,{ref:i,type:`button`,className:iy(e),"aria-haspopup":`menu`,"aria-expanded":a,"aria-label":e.prop,onClick:e=>{let t=r.current,{left:n,bottom:i}=e.currentTarget.getBoundingClientRect();t.style.left=`${n}px`,t.style.top=`${i+4}px`,t.showPopover(),t.querySelector(`[aria-checked=true]`)?.focus()},children:n}),(0,V.jsx)(`div`,{ref:r,className:`cc-menu`,popover:`auto`,role:`menu`,onKeyDown:e=>{let t=c(),n=t.indexOf(document.activeElement),{key:r}=e,a=r.length===1&&[...t.slice(n+1),...t].find(e=>e.textContent.replace(/^\\W/,``).startsWith(r)),o=a?t.indexOf(a):{ArrowDown:n+1,ArrowUp:n-1,Home:0,End:-1}[r];r===`Escape`&&i.current.focus(),o!==void 0&&(e.preventDefault(),t.at(o%t.length).focus())},children:e.options.map(n=>(0,V.jsx)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":n===e.value,onClick:()=>t(n),children:s(n)},`${n}`))})]})}function uy({source:e,tokens:t,controls:n,onChange:r}){let i=[],a=0,o=0,s=n=>{for(;a<n;){for(;o<t.length&&t[o].end<=a;)o++;let r=t[o];if(r&&r.start<=a){let t=Math.min(r.end,n);i.push((0,V.jsx)(`span`,{className:`cc-${r.ink}`,children:e.slice(a,t)},a)),a=t}else{let t=Math.min(r?.start??n,n);i.push(e.slice(a,t)),a=t}}};return n.forEach((t,n)=>{s(t.range.start);let o={control:t,written:e.slice(t.range.start,t.range.end),onChange:e=>r(t,e)},c={boolean:sy,number:oy,option:ly,text:cy}[t.kind];i.push((0,V.jsx)(c,{...o},`c${n}`)),a=t.range.end}),s(e.length),(0,V.jsxs)(`div`,{className:`cc-body`,children:[(0,V.jsx)(`div`,{className:`cc-lines`,"aria-hidden":!0,children:e.split(`\n`).map((e,t)=>t+1).join(`\n`)}),(0,V.jsx)(`div`,{className:`cc-source`,children:(0,V.jsx)(`code`,{children:i})})]})}function dy({slot:e,label:t,icon:n,hidden:r,onClick:i}){return(0,V.jsx)(`span`,{className:`cc-slot${e}`,children:(0,V.jsx)(`button`,{type:`button`,className:`cc-action`,"aria-label":t,tabIndex:r?-1:0,onClick:i,children:n})})}function fy({source:e,changed:t,note:n,onReset:r}){let[i,a]=(0,d.useState)(!1);return(0,V.jsxs)(`div`,{className:`cc-tab cc-actions${t?` cc-changed`:``}`,children:[(0,V.jsx)(dy,{slot:``,label:i?`Copied`:`Copy code`,icon:i?(0,V.jsx)(qv,{size:20}):(0,V.jsx)(Jv,{size:20}),onClick:()=>navigator.clipboard.writeText(e).then(()=>{a(!0),setTimeout(()=>a(!1),1500)})}),n&&(0,V.jsx)(dy,{slot:` cc-note`,label:n,icon:ay,hidden:!t}),(0,V.jsx)(dy,{slot:` cc-reset`,label:`Reset code`,icon:(0,V.jsx)(ey,{size:20}),hidden:!t,onClick:r})]})}var py=250,my=150,hy=typeof document>`u`?d.useEffect:d.useLayoutEffect,gy=(2*Math.PI/.35)**2,_y=4*Math.PI/.35;function vy(e,t){let n={min:160,to:t??.5,last:.5,off:0,speed:0,track:1,show(){e.style.setProperty(`--split`,`${Math.min(1,Math.max(0,n.to+n.off))}`)},jump(t){n.off=matchMedia(`(prefers-reduced-motion: reduce)`).matches?0:n.off+n.to-t,n.to=t,i||(r=performance.now(),i=requestAnimationFrame(a),e.dataset.moving=``)},ease(e){let{min:t}=n,r=t-e;return r<=0?e:r>t/2?0:t-t/4*(1-Math.exp(-4*r/t))},stop:()=>cancelAnimationFrame(i)},r=0,i=0,a=t=>{let o=Math.min(.05,(t-r)/1e3);r=t;for(let e=0;e<o;e+=.001)n.speed-=(gy*n.off+_y*n.speed)*.001,n.off+=n.speed*.001;Math.abs(n.off)*n.track<.5?(n.off=n.speed=i=0,delete e.dataset.moving):i=requestAnimationFrame(a),n.show()};return n}function yy({start:e}){let t=(0,d.useRef)(null);return hy(()=>{let n=t.current,r=n.parentElement,i=r.firstElementChild,a=i.firstElementChild,o=vy(r,e),s=e===void 0?0:e*2-1,c=1,l=!1,u,d,f=0,p,m=!1,h=()=>{s?r.dataset.closed=s<0?`preview`:`code`:delete r.dataset.closed},g=o.show;o.show=()=>{g(),h()},h();let _=()=>parseFloat(getComputedStyle(r).width)<640,v=e=>l?e.clientY:e.clientX,y=e=>{let t=r.clientHeight;r.dataset.measure=s<0?`preview`:s>0?`code`:``;let n=i.offsetHeight,a=r.clientHeight!==n,o=(a?r.clientHeight:n)-4;delete r.dataset.measure;let c=()=>{r.dataset.stack=a?`given`:`own`,r.style.setProperty(`--stack`,`${o}px`)};e&&!a&&n!==t?requestAnimationFrame(c):c()};_()&&y();let ee=globalThis.ResizeObserver&&new ResizeObserver(e=>{let t=`opened`in r.dataset;_()&&(!t||e.some(e=>e.target===r))&&y(!0)}),te=()=>{for(let e of[r,...i.querySelectorAll(`.cc-lines`)])ee?.observe(e);for(let e of a.children)ee?.observe(e)};te();let ne=globalThis.MutationObserver&&new MutationObserver(te);ne?.observe(a,{childList:!0}),n.onpointerdown=e=>{e.button||(e.preventDefault(),n.setPointerCapture(e.pointerId),m=!!p,clearTimeout(p),p=void 0,f=e.timeStamp,l=_(),l&&!(`stack`in r.dataset)&&y(),o.min=l?80:160,o.track=(l?i.clientHeight:i.clientWidth)-6,r.dataset.opened=``,u=v(e)-o.to*o.track,s&&(c=s),d=v(e))},n.onpointermove=e=>{if(u===void 0)return;if(!(e.buttons&1))return re();d!==void 0&&Math.abs(v(e)-d)>3&&(d=void 0);let{track:t}=o,n=v(e)-u;if(s){let e=s<0?Math.min(n,0):Math.max(n-t,0);if(u+=e,n-=e,(s<0?n:t-n)<o.min){o.to=n/t,o.show();return}s=0}let r=o.ease(n),i=o.ease(t-n);s=r?+!i:-1,s?(o.jump(s<0?0:1),u=v(e)-o.to*t):o.to=(r===n?t-i:r)/t,o.show()};let re=()=>{if(u===void 0)return;u=void 0;let{min:e,track:t}=o,n=o.to*t,r=Math.min(n,t-n);s&&r<e/2?o.jump(s<0?0:1):r<e&&(s=0,o.jump((n<e?e:t-e)/t)),s||(o.last=o.to),h()};return n.onpointercancel=n.onlostpointercapture=re,n.onpointerup=e=>{let t=d!==void 0&&e.timeStamp-f<py;if(re(),d=void 0,t){if(m)return s=0,o.jump(o.last=.5),h();p=setTimeout(()=>{p=void 0,s?(s=0,o.jump(o.last)):(o.last=o.to,s=c,o.jump(c<0?0:1)),h()},my)}},()=>{clearTimeout(p),o.stop(),ee?.disconnect(),ne?.disconnect()}},[]),(0,V.jsx)(`div`,{ref:t,className:`cc-split`,"aria-hidden":!0})}function by({className:e,theme:t,title:n=`Preview`,tabs:r=!0,defaultPanel:i=`both`,padding:a=!0,handle:o=`hover`,preview:s,tab:c,source:l,changed:u,note:d,onReset:f,...p}){let m=s===null,h=m?void 0:{both:void 0,preview:`code`,code:`preview`}[i],g=h?+(h===`code`):void 0,_=r&&!m&&n!==``,v=r&&c;return(0,V.jsxs)(`div`,{className:e?`cc ${e}`:`cc`,"data-theme":t,"data-alone":m?``:void 0,"data-collapsed":h,"data-closed":h,"data-handle":o===`hover`?void 0:o,style:g===void 0?void 0:{"--split":g},children:[(0,V.jsxs)(`div`,{className:`cc-frame`,children:[!m&&(0,V.jsx)(`div`,{className:`cc-preview`,"data-untitled":_?void 0:``,"data-flush":a?void 0:``,children:s}),(0,V.jsxs)(`div`,{className:`cc-code`,"data-note":d,"data-untitled":v?void 0:``,children:[(0,V.jsxs)(`div`,{className:`cc-head`,children:[v,(0,V.jsx)(fy,{source:l,changed:u,note:d,onReset:f})]}),(0,V.jsx)(uy,{source:l,...p})]})]}),_&&(0,V.jsx)(`div`,{className:`cc-tab`,children:n}),!m&&(0,V.jsx)(yy,{start:g})]})}var xy=Symbol(),Sy=e=>jv(e.split(/\\s*\\n\\s*/).filter(Boolean).join(` `));function Cy(e,t){let[n,...r]=e;if(!Object.hasOwn(t,n))throw new Dv(`\\`${n}\\` is not in \\`scope\\`.`);let i=t[n];for(let e of r)i=i?.[e];if(i===void 0)throw new Dv(`\\`${e.join(`.`)}\\` is not in \\`scope\\`.`);return i}function wy(e,t){switch(e.type){case`element`:return Ey(e,t);case`name`:return Cy(e.path,t);case`array`:return e.items.map(e=>wy(e,t));case`object`:return Object.fromEntries(e.entries.map(([e,n])=>[e,wy(n,t)]));case`null`:return null;case`undefined`:return;default:return e.value}}function Ty(e,t){return e.type===`text`?Sy(e.raw)||null:wy(e,t)}function Ey(e,t){let n=e.name?/^[a-z][^.]*$/.test(e.name)?e.name:Cy(e.name.split(`.`),t):d.Fragment,r={},i=t[xy];for(let a of e.attributes){let e=typeof n!=`string`&&i?.get(a.value?.start);if(e){let{name:t}=a;r[`on${t[0].toUpperCase()}${t.slice(1)}Change`]=e}a.spread?Object.assign(r,wy(a.value,t)):r[a.name]=!a.value||wy(a.value,t)}return(0,d.createElement)(n,r,...e.children.map(e=>Ty(e,t)))}var Dy=ty,Oy=class extends d.Component{state={};static getDerivedStateFromError(e){return{problem:e instanceof Error?e.message:`${e}`}}static getDerivedStateFromProps({source:e},t){return t.source===e?null:{source:e,problem:void 0}}render(){let{problem:e}=this.state;return e?(0,V.jsx)(`p`,{className:`cc-problem`,children:e}):this.props.children}};function ky({code:e,file:t=`Code`,theme:n,note:r,className:i,scope:a,interactive:o,controls:s,onChange:c,children:l,...u}){ny(`component-code`,Dy);let f=(0,d.useMemo)(()=>{let t=ry(e);try{return o?Lv(t):t}catch{return t}},[e,o]),[p,m]=(0,d.useState)({from:f,to:f});p.from!==f&&m({from:f,to:f});let h=p.from===f?p.to:f,g=(0,d.useMemo)(()=>Bv(h),[h]),_=(e,t)=>{let n=Iv(h,e,t);m({from:f,to:n}),c?.({prop:e.prop,value:t,code:n})},v=l,y,ee=[];if(a)try{let e=Nv(h);o&&(ee=Pv(e,s));let t={...a,[xy]:new Map(ee.filter(e=>e.change).map(e=>[e.range.start,t=>typeof t==typeof e.value&&_(e,t)]))};v=(0,d.createElement)(d.Fragment,null,...e.map(e=>Ey(e,t)))}catch(e){if(!(e instanceof Dv))throw e;y=e.message}return(0,V.jsx)(by,{className:i,theme:n,...u,preview:v===null?null:y?(0,V.jsx)(`p`,{className:`cc-problem`,children:y}):(0,V.jsx)(Oy,{source:h,children:v}),tab:t!==``&&(0,V.jsx)(`div`,{className:`cc-tab`,children:t}),source:h,changed:h!==f,note:r,onReset:()=>m({from:f,to:f}),tokens:g,controls:ee,onChange:_})}function Ay(){let e=document.documentElement,t=document.currentScript.previousElementSibling,n=e=>parent.postMessage(e,`*`);addEventListener(`message`,e=>{e.source===parent&&(t.textContent=e.data.css)}),addEventListener(`error`,e=>n({problem:e.message})),addEventListener(`unhandledrejection`,e=>n({problem:`${e.reason?.message??e.reason}`})),new ResizeObserver(()=>n({height:e.getBoundingClientRect().height})).observe(e),addEventListener(`load`,()=>n({ready:!0}))}var jy=(e,t)=>e.replace(RegExp(`</${t}`,`gi`),`<\\\\/${t}`);function My(e,t,n,r){return`<!doctype html><html><head><meta charset="utf-8"><style>:root{${r}}body{margin:0}</style><style>${jy(t,`style`)}</style><script>(${Ay})()<\\/script></head><body>${e}<script>${jy(n,`script`)}<\\/script></body></html>`}function Ny(e,t){let n,r,i,a,o=``,s=e=>e?.contentWindow?.postMessage({css:o},`*`),c=({source:e,data:o})=>{let c=[n,r].find(t=>t&&t.contentWindow===e);if(!(!c||typeof o!=`object`||!o)&&(o.height!==void 0&&(c.style.height=`${Math.ceil(o.height)}px`),o.problem&&(c===n?t(o.problem):a??=o.problem),o.ready&&c===r)){n?.remove(),n=c,r=void 0,c.dataset.shown=``,s(c),t(a),a=void 0;let e=i;i=void 0,e?.()}};return addEventListener(`message`,c),{run(t,a,s){let c=()=>{r=document.createElement(`iframe`),r.setAttribute(`sandbox`,`allow-scripts`),r.title=`Preview`,n&&(r.style.height=n.style.height),r.srcdoc=My(t,o,a,s),e.append(r)};r?i=c:c()},css(e){o=e,s(n),s(r)},stop(){removeEventListener(`message`,c),n?.remove(),r?.remove()}}}var Py=/^-?(?:\\d+\\.?\\d*|\\.\\d+)$/,Fy=e=>/\\.css$/i.test(e)?`css`:/\\.m?js$/i.test(e)?`js`:`html`;function Iy(e,t,n,r,i,a=``){let o=Array.isArray(t);return{prop:e,kind:o?`option`:typeof n==`string`?`text`:typeof n,value:n,range:{start:r,end:i},quote:a,jsx:!1,step:typeof n==`number`?Tv(n):1,...o?{options:t}:t===!0?{}:t}}var Ly=e=>(t,n,r)=>{r&&e.push({ink:t,start:n,end:n+r})},Ry=/\\x3C!--[\\s\\S]*?(?:-->|$)|<[!/]?([A-Za-z][\\w:-]*)([^>]*)>?/g,zy=/([^\\s"\'=<>/]+)(?:\\s*=\\s*("[^"]*"?|\'[^\']*\'?|[^\\s>]+))?/g;function By(e,t){let n=[],r=[],i=Ly(n),a=new RegExp(Ry),o;for(;o=a.exec(e);){let[n,s,c]=o;if(!s)continue;let l=o.index+n.indexOf(s);i(`tag`,l,s.length);let u=s.toLowerCase();for(let e of c.matchAll(zy)){let[,n,a]=e,o=l+s.length+e.index;if(i(`attribute`,o,n.length),!a)continue;let c=o+e[0].length-a.length;i(`string`,c,a.length);let d=t[`${u}.${n}`]??t[n];if(!d)continue;let f=/^["\']/.test(a)?a[0]:``,p=f?a.slice(1,-1):a;r.push(Iy(n,d,Py.test(p)?+p:p,c,c+a.length,f))}if(n[1]!==`/`&&(u===`script`||u===`style`)){let t=e.indexOf(`</${u}`,a.lastIndex);a.lastIndex=t<0?e.length:t}}return{tokens:n,controls:r}}var Vy=/(["\'])(?:\\\\.|(?!\\1)[^\\\\])*\\1?|#[\\da-f]{3,8}\\b|(?<![\\w-])-?(?:\\d+\\.?\\d*|\\.\\d+)(?:[a-z]+|%)?|!important/gi;function Hy(e,t){let n=[],r=[],i=Ly(n),a=0;for(;a<e.length;){let n=/\\s+|\\/\\*[\\s\\S]*?(?:\\*\\/|$)/y;n.lastIndex=a;let o=n.exec(e)?.[0].length;if(o){a+=o;continue}let s=a,c=0;for(;s<e.length;){let t=e[s];if(t===`"`||t===`\'`){let n=e.indexOf(t,s+1);s=n<0?e.length:n+1;continue}if(t===`(`)c++;else if(t===`)`)c--;else if(c<=0&&/[{};]/.test(t))break;s++}let l=e.slice(a,s).trimEnd(),u=l.indexOf(`:`);if(l[0]===`@`)i(`keyword`,a,l.match(/^@[\\w-]*/)[0].length);else if(e[s]===`{`)i(`tag`,a,l.length);else if(u>0){let e=l.slice(0,u).trim();i(`attribute`,a,e.length);let n=l.slice(u+1).search(/\\S/),o=a+u+1+n,s=n<0?``:l.slice(u+1+n);for(let e of s.matchAll(Vy))i(e[1]?`string`:`keyword`,o+e.index,e[0].length);let c=t[e],d=s.match(/^(-?(?:\\d+\\.?\\d*|\\.\\d+))([a-z]*|%)$/i);c&&s&&r.push(d&&(!Array.isArray(c)||!d[2])?Iy(e,c,+d[1],o,o+d[1].length):Iy(e,c,s,o,o+s.length))}a=s+1}return{tokens:n,controls:r}}var Uy=/\\b(?:const|let|var)\\s+([A-Za-z_$][\\w$]*)\\s*=\\s*(-?(?:\\d+\\.?\\d*|\\.\\d+)|true|false|(["\'])(?:\\\\.|(?!\\3)[^\\\\\\n])*\\3)(?=[ \\t]*(?:[;,\\n]|$))/g;function Wy(e,t){let n=[];for(let r of e.matchAll(Uy)){let[e,i,a,o=``]=r,s=t[i];if(!s)continue;let c=r.index+e.length-a.length,l=o?a.slice(1,-1).replace(/\\\\(.)/g,`$1`):Py.test(a)?+a:a===`true`;n.push(Iy(i,s,l,c,c+a.length,o))}return{tokens:Bv(e),controls:n}}var Gy={html:By,css:Hy,js:Wy};function Ky(e,t,n){let r=typeof n==`number`?Ev(n,t.step):`${n}`;if(e===`css`)return r.replace(/[;{}<]/g,``);let{quote:i}=t;if(e===`html`){let e=r.replaceAll(`&`,`&amp;`).replaceAll(`<`,`&lt;`);return i?i+e.replaceAll(i,i===`"`?`&quot;`:`&#39;`)+i:e}if(typeof n!=`string`)return r;let a=i||`\'`;return a+r.replaceAll(`\\\\`,`\\\\\\\\`).replaceAll(a,`\\\\${a}`).replaceAll(`\n`,`\\\\n`)+a}function qy(e,t,n,r){let{start:i,end:a}=n.range;return t.slice(0,i)+Ky(e,n,r)+t.slice(a)}var Jy=ty+`.cc .cc-files{pointer-events:auto;padding:0 2px}.cc-files>button{all:unset;cursor:pointer;border-radius:4px;align-items:center;height:20px;padding:0 6px;display:flex}.cc-files>:hover{color:var(--cc-secondary)}.cc-files>[aria-selected=true]{background:var(--cc-sunken);color:var(--cc-foreground)}.cc-files>:focus-visible{outline-offset:-2px;outline:2px solid}.cc-run:not([hidden]){width:100%;display:grid}.cc-run>iframe{opacity:0;pointer-events:none;border:0;grid-area:1/1;width:100%}.cc-run>[data-shown]{opacity:1;pointer-events:auto}`,Yy=(e,t)=>Object.keys(e).filter(e=>Fy(e)===t).map(t=>e[t]).join(`\n`);function Xy({html:e,css:t,js:n,theme:r}){let i=(0,d.useRef)(null),a=(0,d.useRef)(null),[o,s]=(0,d.useState)();return(0,d.useEffect)(()=>{let e=Ny(i.current,s);return a.current=e,e.stop},[]),(0,d.useEffect)(()=>a.current.css(t),[t]),(0,d.useEffect)(()=>{let t=matchMedia(`(prefers-color-scheme: dark)`),r=()=>{let{colorScheme:r,color:o,fontFamily:s}=getComputedStyle(i.current),c=r.includes(`dark`)&&(!r.includes(`light`)||t.matches);a.current.run(e,n,`color-scheme:${c?`dark`:`light`};color:${o};font-family:${s}`)};return r(),t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[e,n,r]),(0,V.jsxs)(V.Fragment,{children:[o&&(0,V.jsx)(`p`,{className:`cc-problem`,children:o}),(0,V.jsx)(`div`,{ref:i,className:`cc-run`,hidden:!!o})]})}function Zy({files:e,controls:t={},onChange:n,theme:r,note:i,className:a,...o}){ny(`component-code-html`,Jy);let s=(0,d.useMemo)(()=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,ry(t)])),[JSON.stringify(e)]),c=Object.keys(s),[l,u]=(0,d.useState)(c[0]),f=c.includes(l)?l:c[0],[p,m]=(0,d.useState)({from:s,to:s});p.from!==s&&m({from:s,to:s});let h=p.from===s?p.to:s,g=Fy(f),{tokens:_,controls:v}=Gy[g](h[f],t);return(0,V.jsx)(by,{className:a,theme:r,...o,preview:(0,V.jsx)(Xy,{html:Yy(h,`html`),css:Yy(h,`css`),js:Yy(h,`js`),theme:r}),tab:(0,V.jsx)(`div`,{className:`cc-tab cc-files`,role:`tablist`,children:c.map(e=>(0,V.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":e===f,onClick:()=>u(e),children:e},e))}),source:h[f],changed:c.some(e=>h[e]!==s[e]),note:i,onReset:()=>m({from:s,to:s}),tokens:_,controls:v,onChange:(e,t)=>{let r=qy(g,h[f],e,t);m({from:s,to:{...h,[f]:r}}),n?.({file:f,prop:e.prop,value:t,code:r})}})}var Qy=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function ee(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function te(e){if(h=!1,ee(e),!m)if(n(c)!==null)m=!0,ne||(ne=!0,ce());else{var t=n(l);t!==null&&de(te,t.startTime-e)}}var ne=!1,re=-1,ie=5,ae=-1;function oe(){return g?!0:!(e.unstable_now()-ae<ie)}function se(){if(g=!1,ne){var t=e.unstable_now();ae=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(re),re=-1),p=!0;var a=f;try{b:{for(ee(t),d=n(c);d!==null&&!(d.expirationTime>t&&oe());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,ee(t),i=!0;break b}d===n(c)&&r(c),ee(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&de(te,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ce():ne=!1}}}var ce;if(typeof y==`function`)ce=function(){y(se)};else if(typeof MessageChannel<`u`){var le=new MessageChannel,ue=le.port2;le.port1.onmessage=se,ce=function(){ue.postMessage(null)}}else ce=function(){_(se,0)};function de(t,n){re=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):ie=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(re),re=-1):h=!0,de(te,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ne||(ne=!0,ce()))),r},e.unstable_shouldYield=oe,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),$y=o(((e,t)=>{t.exports=Qy()})),eb=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.7`})),tb=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=eb()})),nb=o((e=>{var t=$y(),n=u(),r=tb();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,m=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),ee=Symbol.for(`react.consumer`),te=Symbol.for(`react.context`),ne=Symbol.for(`react.forward_ref`),re=Symbol.for(`react.suspense`),ie=Symbol.for(`react.suspense_list`),ae=Symbol.for(`react.memo`),oe=Symbol.for(`react.lazy`),se=Symbol.for(`react.activity`),ce=Symbol.for(`react.memo_cache_sentinel`),le=Symbol.iterator;function ue(e){return typeof e!=`object`||!e?null:(e=le&&e[le]||e[`@@iterator`],typeof e==`function`?e:null)}var de=Symbol.for(`react.client.reference`);function fe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===de?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case re:return`Suspense`;case ie:return`SuspenseList`;case se:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case g:return`Portal`;case te:return e.displayName||`Context`;case ee:return(e._context.displayName||`Context`)+`.Consumer`;case ne:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ae:return t=e.displayName||null,t===null?fe(e.type)||`Memo`:t;case oe:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}var pe=Array.isArray,b=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,he={pending:!1,data:null,method:null,action:null},ge=[],_e=-1;function ve(e){return{current:e}}function ye(e){0>_e||(e.current=ge[_e],ge[_e]=null,_e--)}function be(e,t){_e++,ge[_e]=e.current,e.current=t}var xe=ve(null),Se=ve(null),Ce=ve(null),we=ve(null);function Te(e,t){switch(be(Ce,t),be(Se,e),be(xe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?tf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=tf(t),e=nf(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ye(xe),be(xe,e)}function Ee(){ye(xe),ye(Se),ye(Ce)}function De(e){e.memoizedState!==null&&be(we,e);var t=xe.current,n=nf(t,e.type);t!==n&&(be(Se,e),be(xe,n))}function x(e){Se.current===e&&(ye(xe),ye(Se)),we.current===e&&(ye(we),up._currentValue=he)}var Oe,ke;function Ae(e){if(Oe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\\n( *(at )?)/);Oe=t&&t[1]||``,ke=-1<e.stack.indexOf(`\n at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`\n`+Oe+e+ke}var je=!1;function Me(e,t){if(!e||je)return``;je=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`\n`),l=s.split(`\n`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`\n`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{je=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ae(n):``}function Ne(e,t){switch(e.tag){case 26:case 27:case 5:return Ae(e.type);case 16:return Ae(`Lazy`);case 13:return e.child!==t&&t!==null?Ae(`Suspense Fallback`):Ae(`Suspense`);case 19:return Ae(`SuspenseList`);case 0:case 15:return Me(e.type,!1);case 11:return Me(e.type.render,!1);case 1:return Me(e.type,!0);case 31:return Ae(`Activity`);default:return``}}function S(e){try{var t=``,n=null;do t+=Ne(e,n),n=e,e=e.return;while(e);return t}catch(e){return`\nError generating stack: `+e.message+`\n`+e.stack}}var Pe=Object.prototype.hasOwnProperty,Fe=t.unstable_scheduleCallback,Ie=t.unstable_cancelCallback,Le=t.unstable_shouldYield,Re=t.unstable_requestPaint,ze=t.unstable_now,Be=t.unstable_getCurrentPriorityLevel,Ve=t.unstable_ImmediatePriority,He=t.unstable_UserBlockingPriority,Ue=t.unstable_NormalPriority,We=t.unstable_LowPriority,Ge=t.unstable_IdlePriority,Ke=t.log,qe=t.unstable_setDisableYieldValue,Je=null,Ye=null;function Xe(e){if(typeof Ke==`function`&&qe(e),Ye&&typeof Ye.setStrictMode==`function`)try{Ye.setStrictMode(Je,e)}catch{}}var Ze=Math.clz32?Math.clz32:et,Qe=Math.log,$e=Math.LN2;function et(e){return e>>>=0,e===0?32:31-(Qe(e)/$e|0)|0}var tt=256,nt=262144,rt=4194304;function it(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function at(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=it(n))):i=it(o):i=it(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=it(n))):i=it(o)):i=it(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function ot(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function st(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ct(){var e=rt;return rt<<=1,!(rt&62914560)&&(rt=4194304),e}function lt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ut(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function dt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ze(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&ft(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ft(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ze(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function pt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ze(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function mt(e,t){var n=t&-t;return n=n&42?1:ht(n),(n&(e.suspendedLanes|t))===0?n:0}function ht(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function C(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function gt(){var e=me.p;return e===0?(e=window.event,e===void 0?32:Ep(e.type)):e}function _t(e,t){var n=me.p;try{return me.p=e,t()}finally{me.p=n}}var vt=Math.random().toString(36).slice(2),yt=`__reactFiber$`+vt,bt=`__reactProps$`+vt,xt=`__reactContainer$`+vt,St=`__reactEvents$`+vt,Ct=`__reactListeners$`+vt,wt=`__reactHandles$`+vt,Tt=`__reactResources$`+vt,Et=`__reactMarker$`+vt;function Dt(e){delete e[yt],delete e[bt],delete e[St],delete e[Ct],delete e[wt]}function Ot(e){var t=e[yt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[xt]||n[yt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Tf(e);e!==null;){if(n=e[yt])return n;e=Tf(e)}return t}e=n,n=e.parentNode}return null}function kt(e){if(e=e[yt]||e[xt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function At(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function jt(e){var t=e[Tt];return t||=e[Tt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Mt(e){e[Et]=!0}var Nt=new Set,Pt={};function Ft(e,t){It(e,t),It(e+`Capture`,t)}function It(e,t){for(Pt[e]=t,e=0;e<t.length;e++)Nt.add(t[e])}var Lt=RegExp(`^[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$`),Rt={},zt={};function Bt(e){return Pe.call(zt,e)?!0:Pe.call(Rt,e)?!1:Lt.test(e)?zt[e]=!0:(Rt[e]=!0,!1)}function Vt(e,t,n){if(Bt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Ht(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Ut(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Wt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Gt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Kt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qt(e){if(!e._valueTracker){var t=Gt(e)?`checked`:`value`;e._valueTracker=Kt(e,t,``+e[t])}}function Jt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Gt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Yt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Xt=/[\\n"\\\\]/g;function Zt(e){return e.replace(Xt,function(e){return`\\\\`+e.charCodeAt(0).toString(16)+` `})}function Qt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Wt(t)):e.value!==``+Wt(t)&&(e.value=``+Wt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):en(e,o,Wt(n)):en(e,o,Wt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Wt(s):e.removeAttribute(`name`)}function $t(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){qt(e);return}n=n==null?``:``+Wt(n),t=t==null?n:``+Wt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),qt(e)}function en(e,t,n){t===`number`&&Yt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function tn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Wt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function nn(e,t,n){if(t!=null&&(t=``+Wt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Wt(n)}function rn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(pe(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Wt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),qt(e)}function an(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var on=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function sn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||on.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function cn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&sn(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&sn(e,o,t[o])}function ln(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var un=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),dn=/^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*:/i;function fn(e){return dn.test(``+e)?`javascript:throw new Error(\'React has blocked a javascript: URL as a security precaution.\')`:e}function pn(){}var mn=null;function hn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var gn=null,_n=null;function vn(e){var t=kt(e);if(t&&(e=t.stateNode)){var n=e[bt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Qt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Zt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[bt]||null;if(!a)throw Error(i(90));Qt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Jt(r)}break a;case`textarea`:nn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&tn(e,!!n.multiple,t,!1)}}}var yn=!1;function bn(e,t,n){if(yn)return e(t,n);yn=!0;try{return e(t)}finally{if(yn=!1,(gn!==null||_n!==null)&&(ju(),gn&&(t=gn,e=_n,_n=gn=null,vn(t),e)))for(t=0;t<e.length;t++)vn(e[t])}}function xn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[bt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var Sn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),Cn=!1;if(Sn)try{var wn={};Object.defineProperty(wn,"passive",{get:function(){Cn=!0}}),window.addEventListener(`test`,wn,wn),window.removeEventListener(`test`,wn,wn)}catch{Cn=!1}var Tn=null,En=null,Dn=null;function On(){if(Dn)return Dn;var e,t=En,n=t.length,r,i=`value`in Tn?Tn.value:Tn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Dn=i.slice(e,1<r?1-r:void 0)}function kn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function An(){return!0}function jn(){return!1}function Mn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?An:jn,this.isPropagationStopped=jn,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=An)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=An)},persist:function(){},isPersistent:An}),t}var Nn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pn=Mn(Nn),Fn=p({},Nn,{view:0,detail:0}),In=Mn(Fn),Ln,Rn,zn,Bn=p({},Fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==zn&&(zn&&e.type===`mousemove`?(Ln=e.screenX-zn.screenX,Rn=e.screenY-zn.screenY):Rn=Ln=0,zn=e),Ln)},movementY:function(e){return`movementY`in e?e.movementY:Rn}}),Vn=Mn(Bn),Hn=Mn(p({},Bn,{dataTransfer:0})),Un=Mn(p({},Fn,{relatedTarget:0})),Wn=Mn(p({},Nn,{animationName:0,elapsedTime:0,pseudoElement:0})),Gn=Mn(p({},Nn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Kn=Mn(p({},Nn,{data:0})),qn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Jn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Yn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Xn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Yn[e])?!!t[e]:!1}function Zn(){return Xn}var Qn=Mn(p({},Fn,{key:function(e){if(e.key){var t=qn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=kn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Jn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zn,charCode:function(e){return e.type===`keypress`?kn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?kn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),$n=Mn(p({},Bn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),er=Mn(p({},Fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zn})),tr=Mn(p({},Nn,{propertyName:0,elapsedTime:0,pseudoElement:0})),nr=Mn(p({},Bn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),rr=Mn(p({},Nn,{newState:0,oldState:0})),ir=[9,13,27,32],ar=Sn&&`CompositionEvent`in window,or=null;Sn&&`documentMode`in document&&(or=document.documentMode);var sr=Sn&&`TextEvent`in window&&!or,cr=Sn&&(!ar||or&&8<or&&11>=or),lr=` `,ur=!1;function dr(e,t){switch(e){case`keyup`:return ir.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function fr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var pr=!1;function mr(e,t){switch(e){case`compositionend`:return fr(t);case`keypress`:return t.which===32?(ur=!0,lr):null;case`textInput`:return e=t.data,e===lr&&ur?null:e;default:return null}}function hr(e,t){if(pr)return e===`compositionend`||!ar&&dr(e,t)?(e=On(),Dn=En=Tn=null,pr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return cr&&t.locale!==`ko`?null:t.data;default:return null}}var gr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function _r(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!gr[e.type]:t===`textarea`}function vr(e,t,n,r){gn?_n?_n.push(r):_n=[r]:gn=r,t=zd(t,`onChange`),0<t.length&&(n=new Pn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var yr=null,br=null;function xr(e){jd(e,0)}function Sr(e){if(Jt(At(e)))return e}function Cr(e,t){if(e===`change`)return t}var wr=!1;if(Sn){var Tr;if(Sn){var Er=`oninput`in document;if(!Er){var Dr=document.createElement(`div`);Dr.setAttribute(`oninput`,`return;`),Er=typeof Dr.oninput==`function`}Tr=Er}else Tr=!1;wr=Tr&&(!document.documentMode||9<document.documentMode)}function Or(){yr&&(yr.detachEvent(`onpropertychange`,kr),br=yr=null)}function kr(e){if(e.propertyName===`value`&&Sr(br)){var t=[];vr(t,br,e,hn(e)),bn(xr,t)}}function Ar(e,t,n){e===`focusin`?(Or(),yr=t,br=n,yr.attachEvent(`onpropertychange`,kr)):e===`focusout`&&Or()}function jr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Sr(br)}function Mr(e,t){if(e===`click`)return Sr(t)}function Nr(e,t){if(e===`input`||e===`change`)return Sr(t)}function Pr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Fr=typeof Object.is==`function`?Object.is:Pr;function Ir(e,t){if(Fr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Pe.call(t,i)||!Fr(e[i],t[i]))return!1}return!0}function Lr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Rr(e,t){var n=Lr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Lr(n)}}function zr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?zr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Br(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Yt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Yt(e.document)}return t}function Vr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Hr=Sn&&`documentMode`in document&&11>=document.documentMode,Ur=null,Wr=null,Gr=null,Kr=!1;function qr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Kr||Ur==null||Ur!==Yt(r)||(r=Ur,`selectionStart`in r&&Vr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Gr&&Ir(Gr,r)||(Gr=r,r=zd(Wr,`onSelect`),0<r.length&&(t=new Pn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Ur)))}function Jr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Yr={animationend:Jr(`Animation`,`AnimationEnd`),animationiteration:Jr(`Animation`,`AnimationIteration`),animationstart:Jr(`Animation`,`AnimationStart`),transitionrun:Jr(`Transition`,`TransitionRun`),transitionstart:Jr(`Transition`,`TransitionStart`),transitioncancel:Jr(`Transition`,`TransitionCancel`),transitionend:Jr(`Transition`,`TransitionEnd`)},Xr={},Zr={};Sn&&(Zr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Yr.animationend.animation,delete Yr.animationiteration.animation,delete Yr.animationstart.animation),`TransitionEvent`in window||delete Yr.transitionend.transition);function Qr(e){if(Xr[e])return Xr[e];if(!Yr[e])return e;var t=Yr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Zr)return Xr[e]=t[n];return e}var $r=Qr(`animationend`),ei=Qr(`animationiteration`),ti=Qr(`animationstart`),ni=Qr(`transitionrun`),ri=Qr(`transitionstart`),ii=Qr(`transitioncancel`),ai=Qr(`transitionend`),oi=new Map,si=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);si.push(`scrollEnd`);function ci(e,t){oi.set(e,t),Ft(t,[e])}var li=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ui=[],di=0,fi=0;function pi(){for(var e=di,t=fi=di=0;t<e;){var n=ui[t];ui[t++]=null;var r=ui[t];ui[t++]=null;var i=ui[t];ui[t++]=null;var a=ui[t];if(ui[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&_i(n,i,a)}}function mi(e,t,n,r){ui[di++]=e,ui[di++]=t,ui[di++]=n,ui[di++]=r,fi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function hi(e,t,n,r){return mi(e,t,n,r),vi(e)}function gi(e,t){return mi(e,null,null,t),vi(e)}function _i(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ze(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function vi(e){if(50<Su)throw Su=0,Cu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var yi={};function bi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xi(e,t,n,r){return new bi(e,t,n,r)}function Si(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ci(e,t){var n=e.alternate;return n===null?(n=xi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function wi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ti(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)Si(e)&&(s=1);else if(typeof e==`string`)s=rp(e,n,xe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case se:return e=xi(31,n,t,a),e.elementType=se,e.lanes=o,e;case _:return Ei(n.children,a,o,t);case v:s=8,a|=24;break;case y:return e=xi(12,n,t,a|2),e.elementType=y,e.lanes=o,e;case re:return e=xi(13,n,t,a),e.elementType=re,e.lanes=o,e;case ie:return e=xi(19,n,t,a),e.elementType=ie,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case te:s=10;break a;case ee:s=9;break a;case ne:s=11;break a;case ae:s=14;break a;case oe:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=xi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Ei(e,t,n,r){return e=xi(7,e,r,t),e.lanes=n,e}function Di(e,t,n){return e=xi(6,e,null,t),e.lanes=n,e}function Oi(e){var t=xi(18,null,null,0);return t.stateNode=e,t}function ki(e,t,n){return t=xi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ai=new WeakMap;function ji(e,t){if(typeof e==`object`&&e){var n=Ai.get(e);return n===void 0?(t={value:e,source:t,stack:S(t)},Ai.set(e,t),t):n}return{value:e,source:t,stack:S(t)}}var Mi=[],Ni=0,Pi=null,Fi=0,Ii=[],Li=0,Ri=null,zi=1,Bi=``;function Vi(e,t){Mi[Ni++]=Fi,Mi[Ni++]=Pi,Pi=e,Fi=t}function Hi(e,t,n){Ii[Li++]=zi,Ii[Li++]=Bi,Ii[Li++]=Ri,Ri=e;var r=zi;e=Bi;var i=32-Ze(r)-1;r&=~(1<<i),n+=1;var a=32-Ze(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,zi=1<<32-Ze(t)+i|n<<i|r,Bi=a+e}else zi=1<<a|n<<i|r,Bi=e}function Ui(e){e.return!==null&&(Vi(e,1),Hi(e,1,0))}function Wi(e){for(;e===Pi;)Pi=Mi[--Ni],Mi[Ni]=null,Fi=Mi[--Ni],Mi[Ni]=null;for(;e===Ri;)Ri=Ii[--Li],Ii[Li]=null,Bi=Ii[--Li],Ii[Li]=null,zi=Ii[--Li],Ii[Li]=null}function Gi(e,t){Ii[Li++]=zi,Ii[Li++]=Bi,Ii[Li++]=Ri,zi=t.id,Bi=t.overflow,Ri=e}var Ki=null,qi=null,Ji=!1,Yi=null,Xi=!1,Zi=Error(i(519));function Qi(e){throw ia(ji(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Zi}function $i(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[yt]=e,t[bt]=r,n){case`dialog`:Md(`cancel`,t),Md(`close`,t);break;case`iframe`:case`object`:case`embed`:Md(`load`,t);break;case`video`:case`audio`:for(n=0;n<kd.length;n++)Md(kd[n],t);break;case`source`:Md(`error`,t);break;case`img`:case`image`:case`link`:Md(`error`,t),Md(`load`,t);break;case`details`:Md(`toggle`,t);break;case`input`:Md(`invalid`,t),$t(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Md(`invalid`,t);break;case`textarea`:Md(`invalid`,t),rn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Gd(t.textContent,n)?(r.popover!=null&&(Md(`beforetoggle`,t),Md(`toggle`,t)),r.onScroll!=null&&Md(`scroll`,t),r.onScrollEnd!=null&&Md(`scrollend`,t),r.onClick!=null&&(t.onclick=pn),t=!0):t=!1,t||Qi(e,!0)}function ea(e){for(Ki=e.return;Ki;)switch(Ki.tag){case 5:case 31:case 13:Xi=!1;return;case 27:case 3:Xi=!0;return;default:Ki=Ki.return}}function ta(e){if(e!==Ki)return!1;if(!Ji)return ea(e),Ji=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||rf(e.type,e.memoizedProps)),n=!n),n&&qi&&Qi(e),ea(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));qi=wf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));qi=wf(e)}else t===27?(t=qi,ff(e.type)?(e=Cf,Cf=null,qi=e):qi=t):qi=Ki?Sf(e.stateNode.nextSibling):null;return!0}function na(){qi=Ki=null,Ji=!1}function ra(){var e=Yi;return e!==null&&(cu===null?cu=e:cu.push.apply(cu,e),Yi=null),e}function ia(e){Yi===null?Yi=[e]:Yi.push(e)}var aa=ve(null),oa=null,sa=null;function ca(e,t,n){be(aa,t._currentValue),t._currentValue=n}function la(e){e._currentValue=aa.current,ye(aa)}function ua(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function da(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ua(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ua(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function fa(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Fr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===we.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[up]:e.push(up))}a=a.return}e!==null&&da(t,e,n,r),t.flags|=262144}function pa(e){for(e=e.firstContext;e!==null;){if(!Fr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ma(e){oa=e,sa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ha(e){return _a(oa,e)}function ga(e,t){return oa===null&&ma(e),_a(e,t)}function _a(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},sa===null){if(e===null)throw Error(i(308));sa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else sa=sa.next=t;return n}var va=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ya=t.unstable_scheduleCallback,ba=t.unstable_NormalPriority,xa={$$typeof:te,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Sa(){return{controller:new va,data:new Map,refCount:0}}function Ca(e){e.refCount--,e.refCount===0&&ya(ba,function(){e.controller.abort()})}var wa=null,Ta=0,Ea=0,Da=null;function Oa(e,t){if(wa===null){var n=wa=[];Ta=0,Ea=Cd(),Da={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Ta++,t.then(ka,ka),t}function ka(){if(--Ta===0&&wa!==null){Da!==null&&(Da.status=`fulfilled`);var e=wa;wa=null,Ea=0,Da=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Aa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ja=b.S;b.S=function(e,t){du=ze(),typeof t==`object`&&t&&typeof t.then==`function`&&Oa(e,t),ja!==null&&ja(e,t)};var Ma=ve(null);function Na(){var e=Ma.current;return e===null?ql.pooledCache:e}function Pa(e,t){t===null?be(Ma,Ma.current):be(Ma,t.pool)}function Fa(){var e=Na();return e===null?null:{parent:xa._currentValue,pool:e}}var Ia=Error(i(460)),La=Error(i(474)),Ra=Error(i(542)),za={then:function(){}};function Ba(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Va(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(pn,pn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ga(e),e;default:if(typeof t.status==`string`)t.then(pn,pn);else{if(e=ql,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ga(e),e}throw Ua=t,Ia}}function Ha(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ua=e,Ia):e}}var Ua=null;function Wa(){if(Ua===null)throw Error(i(459));var e=Ua;return Ua=null,e}function Ga(e){if(e===Ia||e===Ra)throw Error(i(483))}var Ka=null,qa=0;function Ja(e){var t=qa;return qa+=1,Ka===null&&(Ka=[]),Va(Ka,e,t)}function Ya(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Xa(e,t){throw t.$$typeof===m?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Za(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Ci(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Di(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===_?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===oe&&Ha(i)===t.type)?(t=a(t,n.props),Ya(t,n),t.return=e,t):(t=Ti(n.type,n.key,n.props,null,e.mode,r),Ya(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ki(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Ei(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Di(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case h:return n=Ti(t.type,t.key,t.props,null,e.mode,n),Ya(n,t),n.return=e,n;case g:return t=ki(t,e.mode,n),t.return=e,t;case oe:return t=Ha(t),f(e,t,n)}if(pe(t)||ue(t))return t=Ei(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ja(t),n);if(t.$$typeof===te)return f(e,ga(e,t),n);Xa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case h:return n.key===i?l(e,t,n,r):null;case g:return n.key===i?u(e,t,n,r):null;case oe:return n=Ha(n),p(e,t,n,r)}if(pe(n)||ue(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ja(n),r);if(n.$$typeof===te)return p(e,t,ga(e,n),r);Xa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case h:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case g:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case oe:return r=Ha(r),m(e,t,n,r,i)}if(pe(r)||ue(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ja(r),i);if(r.$$typeof===te)return m(e,t,n,ga(t,r),i);Xa(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Ji&&Vi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Ji&&Vi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Ji&&Vi(i,h),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Ji&&Vi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ji&&Vi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Ji&&Vi(a,g),u}function ee(e,r,o,c){if(typeof o==`object`&&o&&o.type===_&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===_){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===oe&&Ha(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ya(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===_?(c=Ei(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=Ti(o.type,o.key,o.props,null,e.mode,c),Ya(c,o),c.return=e,e=c)}return s(e);case g:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=ki(o,e.mode,c),c.return=e,e=c}return s(e);case oe:return o=Ha(o),ee(e,r,o,c)}if(pe(o))return v(e,r,o,c);if(ue(o)){if(l=ue(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return ee(e,r,Ja(o),c);if(o.$$typeof===te)return ee(e,r,ga(e,o),c);Xa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Di(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{qa=0;var i=ee(e,t,n,r);return Ka=null,i}catch(t){if(t===Ia||t===Ra)throw t;var a=xi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Qa=Za(!0),$a=Za(!1),eo=!1;function to(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function no(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ro(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function io(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Kl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=vi(e),_i(e,null,n),t}return mi(e,r,t,n),vi(e)}function ao(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pt(e,n)}}function oo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var so=!1;function co(){if(so){var e=Da;if(e!==null)throw e}}function lo(e,t,n,r){so=!1;var i=e.updateQueue;eo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(L&f)===f:(r&f)===f){f!==0&&f===Ea&&(so=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:eo=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),nu|=o,e.lanes=o,e.memoizedState=d}}function uo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function fo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)uo(n[e],t)}var po=ve(null),mo=ve(0);function ho(e,t){e=eu,be(mo,e),be(po,t),eu=e|t.baseLanes}function go(){be(mo,eu),be(po,po.current)}function _o(){eu=mo.current,ye(po),ye(mo)}var vo=ve(null),yo=null;function bo(e){var t=e.alternate;be(To,To.current&1),be(vo,e),yo===null&&(t===null||po.current!==null||t.memoizedState!==null)&&(yo=e)}function xo(e){be(To,To.current),be(vo,e),yo===null&&(yo=e)}function So(e){e.tag===22?(be(To,To.current),be(vo,e),yo===null&&(yo=e)):Co(e)}function Co(){be(To,To.current),be(vo,vo.current)}function wo(e){ye(vo),yo===e&&(yo=null),ye(To)}var To=ve(0);function Eo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||yf(n)||bf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Do=0,w=null,Oo=null,ko=null,Ao=!1,jo=!1,Mo=!1,No=0,Po=0,Fo=null,Io=0;function Lo(){throw Error(i(321))}function Ro(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Fr(e[n],t[n]))return!1;return!0}function zo(e,t,n,r,i,a){return Do=a,w=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,b.H=e===null||e.memoizedState===null?tc:nc,Mo=!1,a=n(r,i),Mo=!1,jo&&(a=Vo(t,n,r,i)),Bo(e),a}function Bo(e){b.H=T;var t=Oo!==null&&Oo.next!==null;if(Do=0,ko=Oo=w=null,Ao=!1,Po=0,Fo=null,t)throw Error(i(300));e===null||yc||(e=e.dependencies,e!==null&&pa(e)&&(yc=!0))}function Vo(e,t,n,r){w=e;var a=0;do{if(jo&&(Fo=null),Po=0,jo=!1,25<=a)throw Error(i(301));if(a+=1,ko=Oo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}b.H=rc,o=t(n,r)}while(jo);return o}function Ho(){var e=b.H,t=e.useState()[0];return t=typeof t.then==`function`?Yo(t):t,e=e.useState()[0],(Oo===null?null:Oo.memoizedState)!==e&&(w.flags|=1024),t}function Uo(){var e=No!==0;return No=0,e}function Wo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Go(e){if(Ao){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ao=!1}Do=0,ko=Oo=w=null,jo=!1,Po=No=0,Fo=null}function Ko(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ko===null?w.memoizedState=ko=e:ko=ko.next=e,ko}function qo(){if(Oo===null){var e=w.alternate;e=e===null?null:e.memoizedState}else e=Oo.next;var t=ko===null?w.memoizedState:ko.next;if(t!==null)ko=t,Oo=e;else{if(e===null)throw w.alternate===null?Error(i(467)):Error(i(310));Oo=e,e={memoizedState:Oo.memoizedState,baseState:Oo.baseState,baseQueue:Oo.baseQueue,queue:Oo.queue,next:null},ko===null?w.memoizedState=ko=e:ko=ko.next=e}return ko}function Jo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Yo(e){var t=Po;return Po+=1,Fo===null&&(Fo=[]),e=Va(Fo,e,t),t=w,(ko===null?t.memoizedState:ko.next)===null&&(t=t.alternate,b.H=t===null||t.memoizedState===null?tc:nc),e}function Xo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Yo(e);if(e.$$typeof===te)return ha(e)}throw Error(i(438,String(e)))}function Zo(e){var t=null,n=w.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=w.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Jo(),w.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ce;return t.index++,n}function Qo(e,t){return typeof t==`function`?t(e):t}function $o(e){return es(qo(),Oo,e)}function es(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Do&f)===f:(L&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Ea&&(d=!0);else if((Do&p)===p){u=u.next,p===Ea&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,w.lanes|=p,nu|=p;f=u.action,Mo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,w.lanes|=f,nu|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Fr(o,e.memoizedState)&&(yc=!0,d&&(n=Da,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ts(e){var t=qo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Fr(o,t.memoizedState)||(yc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ns(e,t,n){var r=w,a=qo(),o=Ji;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Fr((Oo||a).memoizedState,n);if(s&&(a.memoizedState=n,yc=!0),a=a.queue,Ds(as.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||ko!==null&&ko.memoizedState.tag&1){if(r.flags|=2048,Ss(9,{destroy:void 0},is.bind(null,r,a,n,t),null),ql===null)throw Error(i(349));o||Do&127||rs(r,t,n)}return n}function rs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=w.updateQueue,t===null?(t=Jo(),w.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function is(e,t,n,r){t.value=n,t.getSnapshot=r,os(t)&&ss(e)}function as(e,t,n){return n(function(){os(t)&&ss(e)})}function os(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Fr(e,n)}catch{return!0}}function ss(e){var t=gi(e,2);t!==null&&Eu(t,e,2)}function cs(e){var t=Ko();if(typeof e==`function`){var n=e;if(e=n(),Mo){Xe(!0);try{n()}finally{Xe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qo,lastRenderedState:e},t}function ls(e,t,n,r){return e.baseState=n,es(e,Oo,typeof r==`function`?r:Qo)}function us(e,t,n,r,a){if(Qs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};b.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,ds(t,o)):(o.next=n.next,t.pending=n.next=o)}}function ds(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=b.T,o={};b.T=o;try{var s=n(i,r),c=b.S;c!==null&&c(o,s),fs(e,t,s)}catch(n){ms(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),b.T=a}}else try{a=n(i,r),fs(e,t,a)}catch(n){ms(e,t,n)}}function fs(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ps(e,t,n)},function(n){return ms(e,t,n)}):ps(e,t,n)}function ps(e,t,n){t.status=`fulfilled`,t.value=n,hs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,ds(e,n)))}function ms(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,hs(t),t=t.next;while(t!==r)}e.action=null}function hs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function gs(e,t){return t}function _s(e,t){if(Ji){var n=ql.formState;if(n!==null){a:{var r=w;if(Ji){if(qi){b:{for(var i=qi,a=Xi;i.nodeType!==8;){if(!a){i=null;break b}if(i=Sf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){qi=Sf(i.nextSibling),r=i.data===`F!`;break a}}Qi(r)}r=!1}r&&(t=n[0])}}return n=Ko(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gs,lastRenderedState:t},n.queue=r,n=Ys.bind(null,w,r),r.dispatch=n,r=cs(!1),a=Zs.bind(null,w,!1,r.queue),r=Ko(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=us.bind(null,w,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function vs(e){return ys(qo(),Oo,e)}function ys(e,t,n){if(t=es(e,t,gs)[0],e=$o(Qo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Yo(t)}catch(e){throw e===Ia?Ra:e}else r=t;t=qo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(w.flags|=2048,Ss(9,{destroy:void 0},bs.bind(null,i,n),null)),[r,a,e]}function bs(e,t){e.action=t}function xs(e){var t=qo(),n=Oo;if(n!==null)return ys(t,n,e);qo(),t=t.memoizedState,n=qo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ss(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=w.updateQueue,t===null&&(t=Jo(),w.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Cs(){return qo().memoizedState}function ws(e,t,n,r){var i=Ko();w.flags|=e,i.memoizedState=Ss(1|t,{destroy:void 0},n,r===void 0?null:r)}function Ts(e,t,n,r){var i=qo();r=r===void 0?null:r;var a=i.memoizedState.inst;Oo!==null&&r!==null&&Ro(r,Oo.memoizedState.deps)?i.memoizedState=Ss(t,a,n,r):(w.flags|=e,i.memoizedState=Ss(1|t,a,n,r))}function Es(e,t){ws(8390656,8,e,t)}function Ds(e,t){Ts(2048,8,e,t)}function Os(e){w.flags|=4;var t=w.updateQueue;if(t===null)t=Jo(),w.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ks(e){var t=qo().memoizedState;return Os({ref:t,nextImpl:e}),function(){if(Kl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function As(e,t){return Ts(4,2,e,t)}function js(e,t){return Ts(4,4,e,t)}function Ms(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ns(e,t,n){n=n==null?null:n.concat([e]),Ts(4,4,Ms.bind(null,t,e),n)}function Ps(){}function Fs(e,t){var n=qo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Ro(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Is(e,t){var n=qo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Ro(t,r[1]))return r[0];if(r=e(),Mo){Xe(!0);try{e()}finally{Xe(!1)}}return n.memoizedState=[r,t],r}function Ls(e,t,n){return n===void 0||Do&1073741824&&!(L&261930)?e.memoizedState=t:(e.memoizedState=n,e=Tu(),w.lanes|=e,nu|=e,n)}function Rs(e,t,n,r){return Fr(n,t)?n:po.current===null?!(Do&42)||Do&1073741824&&!(L&261930)?(yc=!0,e.memoizedState=n):(e=Tu(),w.lanes|=e,nu|=e,t):(e=Ls(e,n,r),Fr(e,t)||(yc=!0),e)}function zs(e,t,n,r,i){var a=me.p;me.p=a!==0&&8>a?a:8;var o=b.T,s={};b.T=s,Zs(e,!1,t,n);try{var c=i(),l=b.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Xs(e,t,Aa(c,r),wu(e)):Xs(e,t,r,wu(e))}catch(n){Xs(e,t,{then:function(){},status:`rejected`,reason:n},wu())}finally{me.p=a,o!==null&&s.types!==null&&(o.types=s.types),b.T=o}}function Bs(){}function Vs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Hs(e).queue;zs(e,a,t,he,n===null?Bs:function(){return Us(e),n(r)})}function Hs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:he,baseState:he,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qo,lastRenderedState:he},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Us(e){var t=Hs(e);t.next===null&&(t=e.alternate.memoizedState),Xs(e,t.next.queue,{},wu())}function Ws(){return ha(up)}function Gs(){return qo().memoizedState}function Ks(){return qo().memoizedState}function qs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=wu();e=ro(n);var r=io(t,e,n);r!==null&&(Eu(r,t,n),ao(r,t,n)),t={cache:Sa()},e.payload=t;return}t=t.return}}function Js(e,t,n){var r=wu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Qs(e)?$s(t,n):(n=hi(e,t,n,r),n!==null&&(Eu(n,e,r),ec(n,t,r)))}function Ys(e,t,n){Xs(e,t,n,wu())}function Xs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Qs(e))$s(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Fr(s,o))return mi(e,t,i,0),ql===null&&pi(),!1}catch{}if(n=hi(e,t,i,r),n!==null)return Eu(n,e,r),ec(n,t,r),!0}return!1}function Zs(e,t,n,r){if(r={lane:2,revertLane:Cd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Qs(e)){if(t)throw Error(i(479))}else t=hi(e,n,r,2),t!==null&&Eu(t,e,2)}function Qs(e){var t=e.alternate;return e===w||t!==null&&t===w}function $s(e,t){jo=Ao=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ec(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pt(e,n)}}var T={readContext:ha,use:Xo,useCallback:Lo,useContext:Lo,useEffect:Lo,useImperativeHandle:Lo,useLayoutEffect:Lo,useInsertionEffect:Lo,useMemo:Lo,useReducer:Lo,useRef:Lo,useState:Lo,useDebugValue:Lo,useDeferredValue:Lo,useTransition:Lo,useSyncExternalStore:Lo,useId:Lo,useHostTransitionStatus:Lo,useFormState:Lo,useActionState:Lo,useOptimistic:Lo,useMemoCache:Lo,useCacheRefresh:Lo};T.useEffectEvent=Lo;var tc={readContext:ha,use:Xo,useCallback:function(e,t){return Ko().memoizedState=[e,t===void 0?null:t],e},useContext:ha,useEffect:Es,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ws(4194308,4,Ms.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ws(4194308,4,e,t)},useInsertionEffect:function(e,t){ws(4,2,e,t)},useMemo:function(e,t){var n=Ko();t=t===void 0?null:t;var r=e();if(Mo){Xe(!0);try{e()}finally{Xe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Ko();if(n!==void 0){var i=n(t);if(Mo){Xe(!0);try{n(t)}finally{Xe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Js.bind(null,w,e),[r.memoizedState,e]},useRef:function(e){var t=Ko();return e={current:e},t.memoizedState=e},useState:function(e){e=cs(e);var t=e.queue,n=Ys.bind(null,w,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ps,useDeferredValue:function(e,t){return Ls(Ko(),e,t)},useTransition:function(){var e=cs(!1);return e=zs.bind(null,w,e.queue,!0,!1),Ko().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=w,a=Ko();if(Ji){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),ql===null)throw Error(i(349));L&127||rs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Es(as.bind(null,r,o,e),[e]),r.flags|=2048,Ss(9,{destroy:void 0},is.bind(null,r,o,n,t),null),n},useId:function(){var e=Ko(),t=ql.identifierPrefix;if(Ji){var n=Bi,r=zi;n=(r&~(1<<32-Ze(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=No++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Io++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ws,useFormState:_s,useActionState:_s,useOptimistic:function(e){var t=Ko();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Zs.bind(null,w,!0,n),n.dispatch=t,[e,t]},useMemoCache:Zo,useCacheRefresh:function(){return Ko().memoizedState=qs.bind(null,w)},useEffectEvent:function(e){var t=Ko(),n={impl:e};return t.memoizedState=n,function(){if(Kl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},nc={readContext:ha,use:Xo,useCallback:Fs,useContext:ha,useEffect:Ds,useImperativeHandle:Ns,useInsertionEffect:As,useLayoutEffect:js,useMemo:Is,useReducer:$o,useRef:Cs,useState:function(){return $o(Qo)},useDebugValue:Ps,useDeferredValue:function(e,t){return Rs(qo(),Oo.memoizedState,e,t)},useTransition:function(){var e=$o(Qo)[0],t=qo().memoizedState;return[typeof e==`boolean`?e:Yo(e),t]},useSyncExternalStore:ns,useId:Gs,useHostTransitionStatus:Ws,useFormState:vs,useActionState:vs,useOptimistic:function(e,t){return ls(qo(),Oo,e,t)},useMemoCache:Zo,useCacheRefresh:Ks};nc.useEffectEvent=ks;var rc={readContext:ha,use:Xo,useCallback:Fs,useContext:ha,useEffect:Ds,useImperativeHandle:Ns,useInsertionEffect:As,useLayoutEffect:js,useMemo:Is,useReducer:ts,useRef:Cs,useState:function(){return ts(Qo)},useDebugValue:Ps,useDeferredValue:function(e,t){var n=qo();return Oo===null?Ls(n,e,t):Rs(n,Oo.memoizedState,e,t)},useTransition:function(){var e=ts(Qo)[0],t=qo().memoizedState;return[typeof e==`boolean`?e:Yo(e),t]},useSyncExternalStore:ns,useId:Gs,useHostTransitionStatus:Ws,useFormState:xs,useActionState:xs,useOptimistic:function(e,t){var n=qo();return Oo===null?(n.baseState=e,[e,n.queue.dispatch]):ls(n,Oo,e,t)},useMemoCache:Zo,useCacheRefresh:Ks};rc.useEffectEvent=ks;function ic(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:p({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ac={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=wu(),i=ro(r);i.payload=t,n!=null&&(i.callback=n),t=io(e,i,r),t!==null&&(Eu(t,e,r),ao(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=wu(),i=ro(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=io(e,i,r),t!==null&&(Eu(t,e,r),ao(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=wu(),r=ro(n);r.tag=2,t!=null&&(r.callback=t),t=io(e,r,n),t!==null&&(Eu(t,e,n),ao(t,e,n))}};function oc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Ir(n,r)||!Ir(i,a):!0}function sc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ac.enqueueReplaceState(t,t.state,null)}function cc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=p({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function lc(e){li(e)}function uc(e){console.error(e)}function dc(e){li(e)}function fc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function pc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function mc(e,t,n){return n=ro(n),n.tag=3,n.payload={element:null},n.callback=function(){fc(e,t)},n}function hc(e){return e=ro(e),e.tag=3,e}function gc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){pc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){pc(t,n,r),typeof i!=`function`&&(mu===null?mu=new Set([this]):mu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function _c(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&fa(t,n,a,!0),n=vo.current,n!==null){switch(n.tag){case 31:case 13:return yo===null?Ru():n.alternate===null&&tu===0&&(tu=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===za?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),rd(e,r,a)),!1;case 22:return n.flags|=65536,r===za?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),rd(e,r,a)),!1}throw Error(i(435,n.tag))}return rd(e,r,a),Ru(),!1}if(Ji)return t=vo.current,t===null?(r!==Zi&&(t=Error(i(423),{cause:r}),ia(ji(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=ji(r,n),a=mc(e.stateNode,r,a),oo(e,a),tu!==4&&(tu=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Zi&&(e=Error(i(422),{cause:r}),ia(ji(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=ji(o,n),su===null?su=[o]:su.push(o),tu!==4&&(tu=2),t===null)return!0;r=ji(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=mc(n.stateNode,r,e),oo(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(mu===null||!mu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=hc(a),gc(a,e,n,r),oo(n,a),!1}n=n.return}while(n!==null);return!1}var vc=Error(i(461)),yc=!1;function bc(e,t,n,r){t.child=e===null?$a(t,null,n,r):Qa(t,e.child,n,r)}function xc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ma(t),r=zo(e,t,n,o,a,i),s=Uo(),e!==null&&!yc?(Wo(e,t,i),Vc(e,t,i)):(Ji&&s&&Ui(t),t.flags|=1,bc(e,t,r,i),t.child)}function Sc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Si(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Cc(e,t,a,r,i)):(e=Ti(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!A(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Ir:n,n(o,r)&&e.ref===t.ref)return Vc(e,t,i)}return t.flags|=1,e=Ci(a,r),e.ref=t.ref,e.return=t,t.child=e}function Cc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Ir(a,r)&&e.ref===t.ref)if(yc=!1,t.pendingProps=r=a,A(e,i))e.flags&131072&&(yc=!0);else return t.lanes=e.lanes,Vc(e,t,i)}return Ac(e,t,n,r,i)}function wc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Ec(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Pa(t,a===null?null:a.cachePool),a===null?go():ho(t,a),So(t);else return r=t.lanes=536870912,Ec(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Pa(t,null),go(),Co(t)):(Pa(t,a.cachePool),ho(t,a),Co(t),t.memoizedState=null);return bc(e,t,i,n),t.child}function Tc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ec(e,t,n,r,i){var a=Na();return a=a===null?null:{parent:xa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Pa(t,null),go(),So(t),e!==null&&fa(e,t,r,!0),t.childLanes=i,null}function Dc(e,t){return t=O({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function E(e,t,n){return Qa(t,e.child,null,n),e=Dc(t,t.pendingProps),e.flags|=2,wo(t),t.memoizedState=null,e}function Oc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Ji){if(r.mode===`hidden`)return e=Dc(t,r),t.lanes=536870912,Tc(null,e);if(xo(t),(e=qi)?(e=vf(e,Xi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ri===null?null:{id:zi,overflow:Bi},retryLane:536870912,hydrationErrors:null},n=Oi(e),n.return=t,t.child=n,Ki=t,qi=null)):e=null,e===null)throw Qi(t);return t.lanes=536870912,null}return Dc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(xo(t),a)if(t.flags&256)t.flags&=-257,t=E(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(yc||fa(e,t,n,!1),a=(n&e.childLanes)!==0,yc||a){if(r=ql,r!==null&&(s=mt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,gi(e,s),Eu(r,e,s),vc;Ru(),t=E(e,t,n)}else e=o.treeContext,qi=Sf(s.nextSibling),Ki=t,Ji=!0,Yi=null,Xi=!1,e!==null&&Gi(t,e),t=Dc(t,r),t.flags|=4096;return t}return e=Ci(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function kc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Ac(e,t,n,r,i){return ma(t),n=zo(e,t,n,r,void 0,i),r=Uo(),e!==null&&!yc?(Wo(e,t,i),Vc(e,t,i)):(Ji&&r&&Ui(t),t.flags|=1,bc(e,t,n,i),t.child)}function D(e,t,n,r,i,a){return ma(t),t.updateQueue=null,n=Vo(t,r,n,i),Bo(e),r=Uo(),e!==null&&!yc?(Wo(e,t,a),Vc(e,t,a)):(Ji&&r&&Ui(t),t.flags|=1,bc(e,t,n,a),t.child)}function jc(e,t,n,r,i){if(ma(t),t.stateNode===null){var a=yi,o=n.contextType;typeof o==`object`&&o&&(a=ha(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=ac,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},to(t),o=n.contextType,a.context=typeof o==`object`&&o?ha(o):yi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(ic(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&ac.enqueueReplaceState(a,a.state,null),lo(t,r,a,i),co(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=cc(n,s);a.props=c;var l=a.context,u=n.contextType;o=yi,typeof u==`object`&&u&&(o=ha(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&sc(t,a,r,o),eo=!1;var f=t.memoizedState;a.state=f,lo(t,r,a,i),co(),l=t.memoizedState,s||f!==l||eo?(typeof d==`function`&&(ic(t,n,d,r),l=t.memoizedState),(c=eo||oc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,no(e,t),o=t.memoizedProps,u=cc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=yi,typeof l==`object`&&l&&(c=ha(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&sc(t,a,r,c),eo=!1,f=t.memoizedState,a.state=f,lo(t,r,a,i),co();var p=t.memoizedState;o!==d||f!==p||eo||e!==null&&e.dependencies!==null&&pa(e.dependencies)?(typeof s==`function`&&(ic(t,n,s,r),p=t.memoizedState),(u=eo||oc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&pa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,kc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Qa(t,e.child,null,i),t.child=Qa(t,null,n,i)):bc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Vc(e,t,i),e}function Mc(e,t,n,r){return na(),t.flags|=256,bc(e,t,n,r),t.child}var Nc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Pc(e){return{baseLanes:e,cachePool:Fa()}}function Fc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=au),e}function Ic(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(To.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Ji){if(a?bo(t):Co(t),(e=qi)?(e=vf(e,Xi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ri===null?null:{id:zi,overflow:Bi},retryLane:536870912,hydrationErrors:null},n=Oi(e),n.return=t,t.child=n,Ki=t,qi=null)):e=null,e===null)throw Qi(t);return bf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(Co(t),a=t.mode,c=O({mode:`hidden`,children:c},a),r=Ei(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Pc(n),r.childLanes=Fc(e,s,n),t.memoizedState=Nc,Tc(null,r)):(bo(t),Lc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(bo(t),t.flags&=-257,t=Rc(e,t,n)):t.memoizedState===null?(Co(t),c=r.fallback,a=t.mode,r=O({mode:`visible`,children:r.children},a),c=Ei(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Qa(t,e.child,null,n),r=t.child,r.memoizedState=Pc(n),r.childLanes=Fc(e,s,n),t.memoizedState=Nc,t=Tc(null,r)):(Co(t),t.child=e.child,t.flags|=128,t=null);else if(bo(t),bf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,ia({value:r,source:null,stack:null}),t=Rc(e,t,n)}else if(yc||fa(e,t,n,!1),s=(n&e.childLanes)!==0,yc||s){if(s=ql,s!==null&&(r=mt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,gi(e,r),Eu(s,e,r),vc;yf(c)||Ru(),t=Rc(e,t,n)}else yf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,qi=Sf(c.nextSibling),Ki=t,Ji=!0,Yi=null,Xi=!1,e!==null&&Gi(t,e),t=Lc(t,r.children),t.flags|=4096);return t}return a?(Co(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=Ci(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=Ei(c,a,n,null),c.flags|=2):c=Ci(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,Tc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Pc(n):(a=c.cachePool,a===null?a=Fa():(l=xa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Fc(e,s,n),t.memoizedState=Nc,Tc(e.child,r)):(bo(t),n=e.child,e=n.sibling,n=Ci(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Lc(e,t){return t=O({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function O(e,t){return e=xi(22,e,null,t),e.lanes=0,e}function Rc(e,t,n){return Qa(t,e.child,null,n),e=Lc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ua(e.return,t,n)}function Bc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function k(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=To.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,be(To,o),bc(e,t,r,n),r=Ji?Fi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&zc(e,n,t);else if(e.tag===19)zc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Eo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Bc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Eo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Bc(t,!0,n,null,a,r);break;case`together`:Bc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Vc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),nu|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(fa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Ci(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ci(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function A(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&pa(e))):!0}function j(e,t,n){switch(t.tag){case 3:Te(t,t.stateNode.containerInfo),ca(t,xa,e.memoizedState.cache),na();break;case 27:case 5:De(t);break;case 4:Te(t,t.stateNode.containerInfo);break;case 10:ca(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,xo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(bo(t),e=Vc(e,t,n),e===null?null:e.sibling):Ic(e,t,n):(bo(t),t.flags|=128,null);bo(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(fa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return k(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),be(To,To.current),r)break;return null;case 22:return t.lanes=0,wc(e,t,n,t.pendingProps);case 24:ca(t,xa,e.memoizedState.cache)}return Vc(e,t,n)}function Hc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)yc=!0;else{if(!A(e,n)&&!(t.flags&128))return yc=!1,j(e,t,n);yc=!!(e.flags&131072)}else yc=!1,Ji&&t.flags&1048576&&Hi(t,Fi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ha(t.elementType),t.type=e,typeof e==`function`)Si(e)?(r=cc(e,r),t.tag=1,t=jc(null,t,e,r,n)):(t.tag=0,t=Ac(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===ne){t.tag=11,t=xc(null,t,e,r,n);break a}else if(a===ae){t.tag=14,t=Sc(null,t,e,r,n);break a}}throw t=fe(e)||e,Error(i(306,t,``))}}return t;case 0:return Ac(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=cc(r,t.pendingProps),jc(e,t,r,a,n);case 3:a:{if(Te(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,no(e,t),lo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ca(t,xa,r),r!==o.cache&&da(t,[xa],n,!0),co(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Mc(e,t,r,n);break a}else if(r!==a){a=ji(Error(i(424)),t),ia(a),t=Mc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(qi=Sf(e.firstChild),Ki=t,Ji=!0,Yi=null,Xi=!0,n=$a(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(na(),r===a){t=Vc(e,t,n);break a}bc(e,t,r,n)}t=t.child}return t;case 26:return kc(e,t),e===null?(n=Uf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ji||(n=t.type,e=t.pendingProps,r=ef(Ce.current).createElement(n),r[yt]=t,r[bt]=e,Jd(r,n,e),Mt(r),t.stateNode=r):t.memoizedState=Uf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return De(t),e===null&&Ji&&(r=t.stateNode=Ef(t.type,t.pendingProps,Ce.current),Ki=t,Xi=!0,a=qi,ff(t.type)?(Cf=a,qi=Sf(r.firstChild)):qi=a),bc(e,t,t.pendingProps.children,n),kc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ji&&((a=r=qi)&&(r=gf(r,t.type,t.pendingProps,Xi),r===null?a=!1:(t.stateNode=r,Ki=t,qi=Sf(r.firstChild),Xi=!1,a=!0)),a||Qi(t)),De(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,rf(a,o)?r=null:s!==null&&rf(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=zo(e,t,Ho,null,null,n),up._currentValue=a),kc(e,t),bc(e,t,r,n),t.child;case 6:return e===null&&Ji&&((e=n=qi)&&(n=_f(n,t.pendingProps,Xi),n===null?e=!1:(t.stateNode=n,Ki=t,qi=null,e=!0)),e||Qi(t)),null;case 13:return Ic(e,t,n);case 4:return Te(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Qa(t,null,r,n):bc(e,t,r,n),t.child;case 11:return xc(e,t,t.type,t.pendingProps,n);case 7:return bc(e,t,t.pendingProps,n),t.child;case 8:return bc(e,t,t.pendingProps.children,n),t.child;case 12:return bc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,ca(t,t.type,r.value),bc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ma(t),a=ha(a),r=r(a),t.flags|=1,bc(e,t,r,n),t.child;case 14:return Sc(e,t,t.type,t.pendingProps,n);case 15:return Cc(e,t,t.type,t.pendingProps,n);case 19:return k(e,t,n);case 31:return Oc(e,t,n);case 22:return wc(e,t,n,t.pendingProps);case 24:return ma(t),r=ha(xa),e===null?(a=Na(),a===null&&(a=ql,o=Sa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},to(t),ca(t,xa,a)):((e.lanes&n)!==0&&(no(e,t),lo(t,null,null,n),co()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ca(t,xa,r),r!==a.cache&&da(t,[xa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ca(t,xa,r))),bc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function M(e){e.flags|=4}function Uc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Fu())e.flags|=8192;else throw Ua=za,La}else e.flags&=-16777217}function Wc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!R(t))if(Fu())e.flags|=8192;else throw Ua=za,La}function Gc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:ct(),e.lanes|=t,ou|=t)}function Kc(e,t){if(!Ji)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function qc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function N(e,t,n){var r=t.pendingProps;switch(Wi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qc(t),null;case 1:return qc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),la(xa),Ee(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ta(t)?M(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ra())),qc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(M(t),o===null?(qc(t),Uc(t,a,null,r,n)):(qc(t),Wc(t,o))):o?o===e.memoizedState?(qc(t),t.flags&=-16777217):(M(t),qc(t),Wc(t,o)):(e=e.memoizedProps,e!==r&&M(t),qc(t),Uc(t,a,e,r,n)),null;case 27:if(x(t),n=Ce.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&M(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return qc(t),null}e=xe.current,ta(t)?$i(t,e):(e=Ef(a,r,n),t.stateNode=e,M(t))}return qc(t),null;case 5:if(x(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&M(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return qc(t),null}if(o=xe.current,ta(t))$i(t,o);else{var s=ef(Ce.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[yt]=t,o[bt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Jd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&M(t)}}return qc(t),Uc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&M(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Ce.current,ta(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ki,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[yt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Gd(e.nodeValue,n)),e||Qi(t,!0)}else e=ef(e).createTextNode(r),e[yt]=t,t.stateNode=e}return qc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ta(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[yt]=t}else na(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;qc(t),e=!1}else n=ra(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(wo(t),t):(wo(t),null);if(t.flags&128)throw Error(i(558))}return qc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ta(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[yt]=t}else na(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;qc(t),a=!1}else a=ra(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(wo(t),t):(wo(t),null)}return wo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Gc(t,t.updateQueue),qc(t),null);case 4:return Ee(),e===null&&Fd(t.stateNode.containerInfo),qc(t),null;case 10:return la(t.type),qc(t),null;case 19:if(ye(To),r=t.memoizedState,r===null)return qc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Kc(r,!1);else{if(tu!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Eo(e),o!==null){for(t.flags|=128,Kc(r,!1),e=o.updateQueue,t.updateQueue=e,Gc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)wi(n,e),n=n.sibling;return be(To,To.current&1|2),Ji&&Vi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ze()>fu&&(t.flags|=128,a=!0,Kc(r,!1),t.lanes=4194304)}else{if(!a)if(e=Eo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Gc(t,e),Kc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ji)return qc(t),null}else 2*ze()-r.renderingStartTime>fu&&n!==536870912&&(t.flags|=128,a=!0,Kc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(qc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ze(),e.sibling=null,n=To.current,be(To,a?n&1|2:n&1),Ji&&Vi(t,r.treeForkCount),e);case 22:case 23:return wo(t),_o(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(qc(t),t.subtreeFlags&6&&(t.flags|=8192)):qc(t),n=t.updateQueue,n!==null&&Gc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ye(Ma),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),la(xa),qc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Jc(e,t){switch(Wi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return la(xa),Ee(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return x(t),null;case 31:if(t.memoizedState!==null){if(wo(t),t.alternate===null)throw Error(i(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(wo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ye(To),null;case 4:return Ee(),null;case 10:return la(t.type),null;case 22:case 23:return wo(t),_o(),e!==null&&ye(Ma),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return la(xa),null;case 25:return null;default:return null}}function P(e,t){switch(Wi(t),t.tag){case 3:la(xa),Ee();break;case 26:case 27:case 5:x(t);break;case 4:Ee();break;case 31:t.memoizedState!==null&&wo(t);break;case 13:wo(t);break;case 19:ye(To);break;case 10:la(t.type);break;case 22:case 23:wo(t),_o(),e!==null&&ye(Ma);break;case 24:la(xa)}}function Yc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){nd(t,t.return,e)}}function F(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){nd(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){nd(t,t.return,e)}}function Xc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{fo(t,n)}catch(t){nd(e,e.return,t)}}}function Zc(e,t,n){n.props=cc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){nd(e,t,n)}}function Qc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){nd(e,t,n)}}function I(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){nd(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){nd(e,t,n)}else n.current=null}function $c(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){nd(e,e.return,t)}}function el(e,t,n){try{var r=e.stateNode;Yd(r,e.type,n,t),r[bt]=t}catch(t){nd(e,e.return,t)}}function tl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ff(e.type)||e.tag===4}function nl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||tl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ff(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function rl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=pn));else if(r!==4&&(r===27&&ff(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(rl(e,t,n),e=e.sibling;e!==null;)rl(e,t,n),e=e.sibling}function il(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&ff(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(il(e,t,n),e=e.sibling;e!==null;)il(e,t,n),e=e.sibling}function al(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Jd(t,r,n),t[yt]=e,t[bt]=n}catch(t){nd(e,e.return,t)}}var ol=!1,sl=!1,cl=!1,ll=typeof WeakSet==`function`?WeakSet:Set,ul=null;function dl(e,t){if(e=e.containerInfo,Qd=yp,e=Br(e),Vr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for($d={focusedElem:e,selectionRange:n},yp=!1,ul=t;ul!==null;)if(t=ul,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,ul=e;else for(;ul!==null;){switch(t=ul,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=cc(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){nd(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)hf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:hf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,ul=e;break}ul=t.return}}function fl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Dl(e,n),r&4&&Yc(5,n);break;case 1:if(Dl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){nd(n,n.return,e)}else{var i=cc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){nd(n,n.return,e)}}r&64&&Xc(n),r&512&&Qc(n,n.return);break;case 3:if(Dl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{fo(e,t)}catch(e){nd(n,n.return,e)}}break;case 27:t===null&&r&4&&al(n);case 26:case 5:Dl(e,n),t===null&&r&4&&$c(n),r&512&&Qc(n,n.return);break;case 12:Dl(e,n);break;case 31:Dl(e,n),r&4&&vl(e,n);break;case 13:Dl(e,n),r&4&&yl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=od.bind(null,n),xf(e,n))));break;case 22:if(r=n.memoizedState!==null||ol,!r){t=t!==null&&t.memoizedState!==null||sl,i=ol;var a=sl;ol=r,(sl=t)&&!a?kl(e,n,(n.subtreeFlags&8772)!=0):Dl(e,n),ol=i,sl=a}break;case 30:break;default:Dl(e,n)}}function pl(e){var t=e.alternate;t!==null&&(e.alternate=null,pl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Dt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ml=null,hl=!1;function gl(e,t,n){for(n=n.child;n!==null;)_l(e,t,n),n=n.sibling}function _l(e,t,n){if(Ye&&typeof Ye.onCommitFiberUnmount==`function`)try{Ye.onCommitFiberUnmount(Je,n)}catch{}switch(n.tag){case 26:sl||I(n,t),gl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:sl||I(n,t);var r=ml,i=hl;ff(n.type)&&(ml=n.stateNode,hl=!1),gl(e,t,n),Df(n.stateNode),ml=r,hl=i;break;case 5:sl||I(n,t);case 6:if(r=ml,i=hl,ml=null,gl(e,t,n),ml=r,hl=i,ml!==null)if(hl)try{(ml.nodeType===9?ml.body:ml.nodeName===`HTML`?ml.ownerDocument.body:ml).removeChild(n.stateNode)}catch(e){nd(n,t,e)}else try{ml.removeChild(n.stateNode)}catch(e){nd(n,t,e)}break;case 18:ml!==null&&(hl?(e=ml,pf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Gp(e)):pf(ml,n.stateNode));break;case 4:r=ml,i=hl,ml=n.stateNode.containerInfo,hl=!0,gl(e,t,n),ml=r,hl=i;break;case 0:case 11:case 14:case 15:F(2,n,t),sl||F(4,n,t),gl(e,t,n);break;case 1:sl||(I(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Zc(n,t,r)),gl(e,t,n);break;case 21:gl(e,t,n);break;case 22:sl=(r=sl)||n.memoizedState!==null,gl(e,t,n),sl=r;break;default:gl(e,t,n)}}function vl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Gp(e)}catch(e){nd(t,t.return,e)}}}function yl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Gp(e)}catch(e){nd(t,t.return,e)}}function bl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ll),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ll),t;default:throw Error(i(435,e.tag))}}function xl(e,t){var n=bl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=sd.bind(null,e,t);t.then(r,r)}})}function Sl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(ff(c.type)){ml=c.stateNode,hl=!1;break a}break;case 5:ml=c.stateNode,hl=!1;break a;case 3:case 4:ml=c.stateNode.containerInfo,hl=!0;break a}c=c.return}if(ml===null)throw Error(i(160));_l(o,s,a),ml=null,hl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)wl(t,e),t=t.sibling}var Cl=null;function wl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Sl(t,e),Tl(e),r&4&&(F(3,e,e.return),Yc(3,e),F(5,e,e.return));break;case 1:Sl(t,e),Tl(e),r&512&&(sl||n===null||I(n,n.return)),r&64&&ol&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=Cl;if(Sl(t,e),Tl(e),r&512&&(sl||n===null||I(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[Et]||o[yt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Jd(o,r,n),o[yt]=e,Mt(o),r=o;break a;case`link`:var s=tp(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Jd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=tp(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Jd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[yt]=e,Mt(o),r=o}e.stateNode=r}else np(a,e.type,e.stateNode);else e.stateNode=Xf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&el(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?np(a,e.type,e.stateNode):Xf(a,r,e.memoizedProps))}break;case 27:Sl(t,e),Tl(e),r&512&&(sl||n===null||I(n,n.return)),n!==null&&r&4&&el(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Sl(t,e),Tl(e),r&512&&(sl||n===null||I(n,n.return)),e.flags&32){a=e.stateNode;try{an(a,``)}catch(t){nd(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,el(e,a,n===null?a:n.memoizedProps)),r&1024&&(cl=!0);break;case 6:if(Sl(t,e),Tl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){nd(e,e.return,t)}}break;case 3:if(ep=null,a=Cl,Cl=Af(t.containerInfo),Sl(t,e),Cl=a,Tl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Gp(t.containerInfo)}catch(t){nd(e,e.return,t)}cl&&(cl=!1,El(e));break;case 4:r=Cl,Cl=Af(e.stateNode.containerInfo),Sl(t,e),Tl(e),Cl=r;break;case 12:Sl(t,e),Tl(e);break;case 31:Sl(t,e),Tl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,xl(e,r)));break;case 13:Sl(t,e),Tl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(uu=ze()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,xl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=ol,d=sl;if(ol=u||a,sl=d||l,Sl(t,e),sl=d,ol=u,Tl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||ol||sl||Ol(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){nd(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){nd(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?mf(m,!0):mf(l.stateNode,!1)}catch(e){nd(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,xl(e,n))));break;case 19:Sl(t,e),Tl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,xl(e,r)));break;case 30:break;case 21:break;default:Sl(t,e),Tl(e)}}function Tl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(tl(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;il(e,nl(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(an(o,``),n.flags&=-33),il(e,nl(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;rl(e,nl(e),s);break;default:throw Error(i(161))}}catch(t){nd(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function El(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;El(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Dl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)fl(e,t.alternate,t),t=t.sibling}function Ol(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:F(4,t,t.return),Ol(t);break;case 1:I(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Zc(t,t.return,n),Ol(t);break;case 27:Df(t.stateNode);case 26:case 5:I(t,t.return),Ol(t);break;case 22:t.memoizedState===null&&Ol(t);break;case 30:Ol(t);break;default:Ol(t)}e=e.sibling}}function kl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:kl(i,a,n),Yc(4,a);break;case 1:if(kl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){nd(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)uo(c[i],s)}catch(e){nd(r,r.return,e)}}n&&o&64&&Xc(a),Qc(a,a.return);break;case 27:al(a);case 26:case 5:kl(i,a,n),n&&r===null&&o&4&&$c(a),Qc(a,a.return);break;case 12:kl(i,a,n);break;case 31:kl(i,a,n),n&&o&4&&vl(i,a);break;case 13:kl(i,a,n),n&&o&4&&yl(i,a);break;case 22:a.memoizedState===null&&kl(i,a,n),Qc(a,a.return);break;case 30:break;default:kl(i,a,n)}t=t.sibling}}function Al(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Ca(n))}function jl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ca(e))}function Ml(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Nl(e,t,n,r),t=t.sibling}function Nl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Ml(e,t,n,r),i&2048&&Yc(9,t);break;case 1:Ml(e,t,n,r);break;case 3:Ml(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ca(e)));break;case 12:if(i&2048){Ml(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){nd(t,t.return,e)}}else Ml(e,t,n,r);break;case 31:Ml(e,t,n,r);break;case 13:Ml(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Ml(e,t,n,r):(a._visibility|=2,Pl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Ml(e,t,n,r):Fl(e,t),i&2048&&Al(o,t);break;case 24:Ml(e,t,n,r),i&2048&&jl(t.alternate,t);break;default:Ml(e,t,n,r)}}function Pl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Pl(a,o,s,c,i),Yc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Pl(a,o,s,c,i)):u._visibility&2?Pl(a,o,s,c,i):Fl(a,o),i&&l&2048&&Al(o.alternate,o);break;case 24:Pl(a,o,s,c,i),i&&l&2048&&jl(o.alternate,o);break;default:Pl(a,o,s,c,i)}t=t.sibling}}function Fl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Fl(n,r),i&2048&&Al(r.alternate,r);break;case 24:Fl(n,r),i&2048&&jl(r.alternate,r);break;default:Fl(n,r)}t=t.sibling}}var Il=8192;function Ll(e,t,n){if(e.subtreeFlags&Il)for(e=e.child;e!==null;)Rl(e,t,n),e=e.sibling}function Rl(e,t,n){switch(e.tag){case 26:Ll(e,t,n),e.flags&Il&&e.memoizedState!==null&&z(n,Cl,e.memoizedState,e.memoizedProps);break;case 5:Ll(e,t,n);break;case 3:case 4:var r=Cl;Cl=Af(e.stateNode.containerInfo),Ll(e,t,n),Cl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Il,Il=16777216,Ll(e,t,n),Il=r):Ll(e,t,n));break;default:Ll(e,t,n)}}function zl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Bl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ul=r,Ul(r,e)}zl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Vl(e),e=e.sibling}function Vl(e){switch(e.tag){case 0:case 11:case 15:Bl(e),e.flags&2048&&F(9,e,e.return);break;case 3:Bl(e);break;case 12:Bl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Hl(e)):Bl(e);break;default:Bl(e)}}function Hl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ul=r,Ul(r,e)}zl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:F(8,t,t.return),Hl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Hl(t));break;default:Hl(t)}e=e.sibling}}function Ul(e,t){for(;ul!==null;){var n=ul;switch(n.tag){case 0:case 11:case 15:F(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Ca(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ul=r;else a:for(n=e;ul!==null;){r=ul;var i=r.sibling,a=r.return;if(pl(r),r===n){ul=null;break a}if(i!==null){i.return=a,ul=i;break a}ul=a}}}var Wl={getCacheForType:function(e){var t=ha(xa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ha(xa).controller.signal}},Gl=typeof WeakMap==`function`?WeakMap:Map,Kl=0,ql=null,Jl=null,L=0,Yl=0,Xl=null,Zl=!1,Ql=!1,$l=!1,eu=0,tu=0,nu=0,ru=0,iu=0,au=0,ou=0,su=null,cu=null,lu=!1,uu=0,du=0,fu=1/0,pu=null,mu=null,hu=0,gu=null,_u=null,vu=0,yu=0,bu=null,xu=null,Su=0,Cu=null;function wu(){return Kl&2&&L!==0?L&-L:b.T===null?gt():Cd()}function Tu(){if(au===0)if(!(L&536870912)||Ji){var e=nt;nt<<=1,!(nt&3932160)&&(nt=262144),au=e}else au=536870912;return e=vo.current,e!==null&&(e.flags|=32),au}function Eu(e,t,n){(e===ql&&(Yl===2||Yl===9)||e.cancelPendingCommit!==null)&&(Nu(e,0),Au(e,L,au,!1)),ut(e,n),(!(Kl&2)||e!==ql)&&(e===ql&&(!(Kl&2)&&(ru|=n),tu===4&&Au(e,L,au,!1)),hd(e))}function Du(e,t,n){if(Kl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||ot(e,t),a=r?Vu(e,t):zu(e,t,!0),o=r;do{if(a===0){Ql&&!r&&Au(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!ku(n)){a=zu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=su;var l=c.current.memoizedState.isDehydrated;if(l&&(Nu(c,s).flags|=256),s=zu(c,s,!1),s!==2){if($l&&!l){c.errorRecoveryDisabledLanes|=o,ru|=o,a=4;break a}o=cu,cu=a,o!==null&&(cu===null?cu=o:cu.push.apply(cu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Nu(e,0),Au(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Au(r,t,au,!Zl);break a;case 2:cu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=uu+300-ze(),10<a)){if(Au(r,t,au,!Zl),at(r,0,!0)!==0)break a;vu=t,r.timeoutHandle=sf(Ou.bind(null,r,n,cu,pu,lu,t,au,ru,ou,Zl,o,`Throttled`,-0,0),a);break a}Ou(r,n,cu,pu,lu,t,au,ru,ou,Zl,o,null,-0,0)}}break}while(1);hd(e)}function Ou(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:pn},Rl(t,a,d);var m=(a&62914560)===a?uu-ze():(a&4194048)===a?du-ze():0;if(m=ap(d,m),m!==null){vu=a,e.cancelPendingCommit=m(Ju.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Au(e,a,o,!l);return}}Ju(e,t,a,n,r,i,o,s,c)}function ku(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Fr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Au(e,t,n,r){t&=~iu,t&=~ru,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ze(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ft(e,n,t)}function ju(){return Kl&6?!0:(gd(0,!1),!1)}function Mu(){if(Jl!==null){if(Yl===0)var e=Jl.return;else e=Jl,sa=oa=null,Go(e),Ka=null,qa=0,e=Jl;for(;e!==null;)P(e.alternate,e),e=e.return;Jl=null}}function Nu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,cf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),vu=0,Mu(),ql=e,Jl=n=Ci(e.current,null),L=t,Yl=0,Xl=null,Zl=!1,Ql=ot(e,t),$l=!1,ou=au=iu=ru=nu=tu=0,cu=su=null,lu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ze(r),a=1<<i;t|=e[i],r&=~a}return eu=t,pi(),n}function Pu(e,t){w=null,b.H=T,t===Ia||t===Ra?(t=Wa(),Yl=3):t===La?(t=Wa(),Yl=4):Yl=t===vc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Xl=t,Jl===null&&(tu=1,fc(e,ji(t,e.current)))}function Fu(){var e=vo.current;return e===null?!0:(L&4194048)===L?yo===null:(L&62914560)===L||L&536870912?e===yo:!1}function Iu(){var e=b.H;return b.H=T,e===null?T:e}function Lu(){var e=b.A;return b.A=Wl,e}function Ru(){tu=4,Zl||(L&4194048)!==L&&vo.current!==null||(Ql=!0),!(nu&134217727)&&!(ru&134217727)||ql===null||Au(ql,L,au,!1)}function zu(e,t,n){var r=Kl;Kl|=2;var i=Iu(),a=Lu();(ql!==e||L!==t)&&(pu=null,Nu(e,t)),t=!1;var o=tu;a:do try{if(Yl!==0&&Jl!==null){var s=Jl,c=Xl;switch(Yl){case 8:Mu(),o=6;break a;case 3:case 2:case 9:case 6:vo.current===null&&(t=!0);var l=Yl;if(Yl=0,Xl=null,Gu(e,s,c,l),n&&Ql){o=0;break a}break;default:l=Yl,Yl=0,Xl=null,Gu(e,s,c,l)}}Bu(),o=tu;break}catch(t){Pu(e,t)}while(1);return t&&e.shellSuspendCounter++,sa=oa=null,Kl=r,b.H=i,b.A=a,Jl===null&&(ql=null,L=0,pi()),o}function Bu(){for(;Jl!==null;)Uu(Jl)}function Vu(e,t){var n=Kl;Kl|=2;var r=Iu(),a=Lu();ql!==e||L!==t?(pu=null,fu=ze()+500,Nu(e,t)):Ql=ot(e,t);a:do try{if(Yl!==0&&Jl!==null){t=Jl;var o=Xl;b:switch(Yl){case 1:Yl=0,Xl=null,Gu(e,t,o,1);break;case 2:case 9:if(Ba(o)){Yl=0,Xl=null,Wu(t);break}t=function(){Yl!==2&&Yl!==9||ql!==e||(Yl=7),hd(e)},o.then(t,t);break a;case 3:Yl=7;break a;case 4:Yl=5;break a;case 7:Ba(o)?(Yl=0,Xl=null,Wu(t)):(Yl=0,Xl=null,Gu(e,t,o,7));break;case 5:var s=null;switch(Jl.tag){case 26:s=Jl.memoizedState;case 5:case 27:var c=Jl;if(s?R(s):c.stateNode.complete){Yl=0,Xl=null;var l=c.sibling;if(l!==null)Jl=l;else{var u=c.return;u===null?Jl=null:(Jl=u,Ku(u))}break b}}Yl=0,Xl=null,Gu(e,t,o,5);break;case 6:Yl=0,Xl=null,Gu(e,t,o,6);break;case 8:Mu(),tu=6;break a;default:throw Error(i(462))}}Hu();break}catch(t){Pu(e,t)}while(1);return sa=oa=null,b.H=r,b.A=a,Kl=n,Jl===null?(ql=null,L=0,pi(),tu):0}function Hu(){for(;Jl!==null&&!Le();)Uu(Jl)}function Uu(e){var t=Hc(e.alternate,e,eu);e.memoizedProps=e.pendingProps,t===null?Ku(e):Jl=t}function Wu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=D(n,t,t.pendingProps,t.type,void 0,L);break;case 11:t=D(n,t,t.pendingProps,t.type.render,t.ref,L);break;case 5:Go(t);default:P(n,t),t=Jl=wi(t,eu),t=Hc(n,t,eu)}e.memoizedProps=e.pendingProps,t===null?Ku(e):Jl=t}function Gu(e,t,n,r){sa=oa=null,Go(t),Ka=null,qa=0;var i=t.return;try{if(_c(e,i,t,n,L)){tu=1,fc(e,ji(n,e.current)),Jl=null;return}}catch(t){if(i!==null)throw Jl=i,t;tu=1,fc(e,ji(n,e.current)),Jl=null;return}t.flags&32768?(Ji||r===1?e=!0:Ql||L&536870912?e=!1:(Zl=e=!0,(r===2||r===9||r===3||r===6)&&(r=vo.current,r!==null&&r.tag===13&&(r.flags|=16384))),qu(t,e)):Ku(t)}function Ku(e){var t=e;do{if(t.flags&32768){qu(t,Zl);return}e=t.return;var n=N(t.alternate,t,eu);if(n!==null){Jl=n;return}if(t=t.sibling,t!==null){Jl=t;return}Jl=t=e}while(t!==null);tu===0&&(tu=5)}function qu(e,t){do{var n=Jc(e.alternate,e);if(n!==null){n.flags&=32767,Jl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Jl=e;return}Jl=e=n}while(e!==null);tu=6,Jl=null}function Ju(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do $u();while(hu!==0);if(Kl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=fi,dt(e,n,o,s,c,l),e===ql&&(Jl=ql=null,L=0),_u=t,gu=e,vu=n,yu=o,bu=a,xu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,cd(Ue,function(){return ed(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=b.T,b.T=null,a=me.p,me.p=2,s=Kl,Kl|=4;try{dl(e,t,n)}finally{Kl=s,me.p=a,b.T=r}}hu=1,Yu(),Xu(),Zu()}}function Yu(){if(hu===1){hu=0;var e=gu,t=_u,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=b.T,b.T=null;var r=me.p;me.p=2;var i=Kl;Kl|=4;try{wl(t,e);var a=$d,o=Br(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&zr(s.ownerDocument.documentElement,s)){if(c!==null&&Vr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Rr(s,h),v=Rr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var ee=d[s];ee.element.scrollLeft=ee.left,ee.element.scrollTop=ee.top}}yp=!!Qd,$d=Qd=null}finally{Kl=i,me.p=r,b.T=n}}e.current=t,hu=2}}function Xu(){if(hu===2){hu=0;var e=gu,t=_u,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=b.T,b.T=null;var r=me.p;me.p=2;var i=Kl;Kl|=4;try{fl(e,t.alternate,t)}finally{Kl=i,me.p=r,b.T=n}}hu=3}}function Zu(){if(hu===4||hu===3){hu=0,Re();var e=gu,t=_u,n=vu,r=xu;t.subtreeFlags&10256||t.flags&10256?hu=5:(hu=0,_u=gu=null,Qu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(mu=null),C(n),t=t.stateNode,Ye&&typeof Ye.onCommitFiberRoot==`function`)try{Ye.onCommitFiberRoot(Je,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=b.T,i=me.p,me.p=2,b.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{b.T=t,me.p=i}}vu&3&&$u(),hd(e),i=e.pendingLanes,n&261930&&i&42?e===Cu?Su++:(Su=0,Cu=e):Su=0,gd(0,!1)}}function Qu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ca(t)))}function $u(){return Yu(),Xu(),Zu(),ed()}function ed(){if(hu!==5)return!1;var e=gu,t=yu;yu=0;var n=C(vu),r=b.T,a=me.p;try{me.p=32>n?32:n,b.T=null,n=bu,bu=null;var o=gu,s=vu;if(hu=0,_u=gu=null,vu=0,Kl&6)throw Error(i(331));var c=Kl;if(Kl|=4,Vl(o.current),Nl(o,o.current,s,n),Kl=c,gd(0,!1),Ye&&typeof Ye.onPostCommitFiberRoot==`function`)try{Ye.onPostCommitFiberRoot(Je,o)}catch{}return!0}finally{me.p=a,b.T=r,Qu(e,t)}}function td(e,t,n){t=ji(n,t),t=mc(e.stateNode,t,2),e=io(e,t,2),e!==null&&(ut(e,2),hd(e))}function nd(e,t,n){if(e.tag===3)td(e,e,n);else for(;t!==null;){if(t.tag===3){td(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(mu===null||!mu.has(r))){e=ji(n,e),n=hc(2),r=io(t,n,2),r!==null&&(gc(n,r,t,e),ut(r,2),hd(r));break}}t=t.return}}function rd(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Gl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||($l=!0,i.add(n),e=id.bind(null,e,t,n),t.then(e,e))}function id(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ql===e&&(L&n)===n&&(tu===4||tu===3&&(L&62914560)===L&&300>ze()-uu?!(Kl&2)&&Nu(e,0):iu|=n,ou===L&&(ou=0)),hd(e)}function ad(e,t){t===0&&(t=ct()),e=gi(e,t),e!==null&&(ut(e,t),hd(e))}function od(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ad(e,n)}function sd(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),ad(e,n)}function cd(e,t){return Fe(e,t)}var ld=null,ud=null,dd=!1,fd=!1,pd=!1,md=0;function hd(e){e!==ud&&e.next===null&&(ud===null?ld=ud=e:ud=ud.next=e),fd=!0,dd||(dd=!0,Sd())}function gd(e,t){if(!pd&&fd){pd=!0;do for(var n=!1,r=ld;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ze(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,xd(r,a))}else a=L,a=at(r,r===ql?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ot(r,a)||(n=!0,xd(r,a));r=r.next}while(n);pd=!1}}function _d(){vd()}function vd(){fd=dd=!1;var e=0;md!==0&&of()&&(e=md);for(var t=ze(),n=null,r=ld;r!==null;){var i=r.next,a=yd(r,t);a===0?(r.next=null,n===null?ld=i:n.next=i,i===null&&(ud=n)):(n=r,(e!==0||a&3)&&(fd=!0)),r=i}hu!==0&&hu!==5||gd(e,!1),md!==0&&(md=0)}function yd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ze(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=st(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=ql,n=L,n=at(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Yl===2||Yl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ie(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ot(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ie(r),C(n)){case 2:case 8:n=He;break;case 32:n=Ue;break;case 268435456:n=Ge;break;default:n=Ue}return r=bd.bind(null,e),n=Fe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ie(r),e.callbackPriority=2,e.callbackNode=null,2}function bd(e,t){if(hu!==0&&hu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if($u()&&e.callbackNode!==n)return null;var r=L;return r=at(e,e===ql?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Du(e,r,t),yd(e,ze()),e.callbackNode!=null&&e.callbackNode===n?bd.bind(null,e):null)}function xd(e,t){if($u())return null;Du(e,t,!0)}function Sd(){uf(function(){Kl&6?Fe(Ve,_d):vd()})}function Cd(){if(md===0){var e=Ea;e===0&&(e=tt,tt<<=1,!(tt&261888)&&(tt=256)),md=e}return md}function wd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:fn(``+e)}function Td(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Ed(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=wd((i[bt]||null).action),o=r.submitter;o&&(t=(t=o[bt]||null)?wd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Pn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(md!==0){var e=o?Td(i,o):new FormData(i);Vs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?Td(i,o):new FormData(i),Vs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Dd=0;Dd<si.length;Dd++){var Od=si[Dd];ci(Od.toLowerCase(),`on`+(Od[0].toUpperCase()+Od.slice(1)))}ci($r,`onAnimationEnd`),ci(ei,`onAnimationIteration`),ci(ti,`onAnimationStart`),ci(`dblclick`,`onDoubleClick`),ci(`focusin`,`onFocus`),ci(`focusout`,`onBlur`),ci(ni,`onTransitionRun`),ci(ri,`onTransitionStart`),ci(ii,`onTransitionCancel`),ci(ai,`onTransitionEnd`),It(`onMouseEnter`,[`mouseout`,`mouseover`]),It(`onMouseLeave`,[`mouseout`,`mouseover`]),It(`onPointerEnter`,[`pointerout`,`pointerover`]),It(`onPointerLeave`,[`pointerout`,`pointerover`]),Ft(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ft(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ft(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ft(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ft(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ft(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var kd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Ad=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(kd));function jd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){li(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){li(e)}i.currentTarget=null,a=c}}}}function Md(e,t){var n=t[St];n===void 0&&(n=t[St]=new Set);var r=e+`__bubble`;n.has(r)||(Id(t,e,2,!1),n.add(r))}function Nd(e,t,n){var r=0;t&&(r|=4),Id(n,e,r,t)}var Pd=`_reactListening`+Math.random().toString(36).slice(2);function Fd(e){if(!e[Pd]){e[Pd]=!0,Nt.forEach(function(t){t!==`selectionchange`&&(Ad.has(t)||Nd(t,!1,e),Nd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Pd]||(t[Pd]=!0,Nd(`selectionchange`,!1,t))}}function Id(e,t,n,r){switch(Ep(t)){case 2:var i=bp;break;case 8:i=xp;break;default:i=Sp}n=i.bind(null,t,n,e),i=void 0,!Cn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Ld(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=Ot(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}bn(function(){var r=a,i=hn(n),s=[];a:{var c=oi.get(e);if(c!==void 0){var l=Pn,u=e;switch(e){case`keypress`:if(kn(n)===0)break a;case`keydown`:case`keyup`:l=Qn;break;case`focusin`:u=`focus`,l=Un;break;case`focusout`:u=`blur`,l=Un;break;case`beforeblur`:case`afterblur`:l=Un;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Vn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Hn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=er;break;case $r:case ei:case ti:l=Wn;break;case ai:l=tr;break;case`scroll`:case`scrollend`:l=In;break;case`wheel`:l=nr;break;case`copy`:case`cut`:case`paste`:l=Gn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=$n;break;case`toggle`:case`beforetoggle`:l=rr}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=xn(m,p),g!=null&&d.push(Rd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==mn&&(u=n.relatedTarget||n.fromElement)&&(Ot(u)||u[xt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?Ot(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Vn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=$n,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:At(l),h=u==null?c:At(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,Ot(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Bd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Vd(s,c,l,d,!1),u!==null&&f!==null&&Vd(s,f,u,d,!0)}}a:{if(c=r?At(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=Cr;else if(_r(c))if(wr)v=Nr;else{v=jr;var y=Ar}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&ln(r.elementType)&&(v=Cr):v=Mr;if(v&&=v(e,r)){vr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&en(c,`number`,c.value)}switch(y=r?At(r):window,e){case`focusin`:(_r(y)||y.contentEditable===`true`)&&(Ur=y,Wr=r,Gr=null);break;case`focusout`:Gr=Wr=Ur=null;break;case`mousedown`:Kr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Kr=!1,qr(s,n,i);break;case`selectionchange`:if(Hr)break;case`keydown`:case`keyup`:qr(s,n,i)}var ee;if(ar)b:{switch(e){case`compositionstart`:var te=`onCompositionStart`;break b;case`compositionend`:te=`onCompositionEnd`;break b;case`compositionupdate`:te=`onCompositionUpdate`;break b}te=void 0}else pr?dr(e,n)&&(te=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(te=`onCompositionStart`);te&&(cr&&n.locale!==`ko`&&(pr||te!==`onCompositionStart`?te===`onCompositionEnd`&&pr&&(ee=On()):(Tn=i,En=`value`in Tn?Tn.value:Tn.textContent,pr=!0)),y=zd(r,te),0<y.length&&(te=new Kn(te,e,null,n,i),s.push({event:te,listeners:y}),ee?te.data=ee:(ee=fr(n),ee!==null&&(te.data=ee)))),(ee=sr?mr(e,n):hr(e,n))&&(te=zd(r,`onBeforeInput`),0<te.length&&(y=new Kn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:te}),y.data=ee)),Ed(s,e,r,n,i)}jd(s,t)})}function Rd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function zd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=xn(e,n),i!=null&&r.unshift(Rd(e,i,a)),i=xn(e,t),i!=null&&r.push(Rd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Bd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Vd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=xn(n,a),l!=null&&o.unshift(Rd(n,l,c))):i||(l=xn(n,a),l!=null&&o.push(Rd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Hd=/\\r\\n?/g,Ud=/\\u0000|\\uFFFD/g;function Wd(e){return(typeof e==`string`?e:``+e).replace(Hd,`\n`).replace(Ud,``)}function Gd(e,t){return t=Wd(t),Wd(e)===t}function Kd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||an(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&an(e,``+r);break;case`className`:Ht(e,`class`,r);break;case`tabIndex`:Ht(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ht(e,n,r);break;case`style`:cn(e,r,o);break;case`data`:if(t!==`object`){Ht(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=fn(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error(\'A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\\\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().\')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Kd(e,t,`name`,a.name,a,null),Kd(e,t,`formEncType`,a.formEncType,a,null),Kd(e,t,`formMethod`,a.formMethod,a,null),Kd(e,t,`formTarget`,a.formTarget,a,null)):(Kd(e,t,`encType`,a.encType,a,null),Kd(e,t,`method`,a.method,a,null),Kd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=fn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=pn);break;case`onScroll`:r!=null&&Md(`scroll`,e);break;case`onScrollEnd`:r!=null&&Md(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=fn(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Md(`beforetoggle`,e),Md(`toggle`,e),Vt(e,`popover`,r);break;case`xlinkActuate`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ut(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ut(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ut(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Vt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=un.get(n)||n,Vt(e,n,r))}}function qd(e,t,n,r,a,o){switch(n){case`style`:cn(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?an(e,r):(typeof r==`number`||typeof r==`bigint`)&&an(e,``+r);break;case`onScroll`:r!=null&&Md(`scroll`,e);break;case`onScrollEnd`:r!=null&&Md(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=pn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Pt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[bt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Vt(e,n,r)}}}function Jd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Md(`error`,e),Md(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Kd(e,t,o,s,n,null)}}a&&Kd(e,t,`srcSet`,n.srcSet,n,null),r&&Kd(e,t,`src`,n.src,n,null);return;case`input`:Md(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Kd(e,t,r,d,n,null)}}$t(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Md(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Kd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&tn(e,!!r,n,!0):tn(e,!!r,t,!1);return;case`textarea`:for(s in Md(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Kd(e,t,s,c,n,null)}rn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Kd(e,t,l,r,n,null)}return;case`dialog`:Md(`beforetoggle`,e),Md(`toggle`,e),Md(`cancel`,e),Md(`close`,e);break;case`iframe`:case`object`:Md(`load`,e);break;case`video`:case`audio`:for(r=0;r<kd.length;r++)Md(kd[r],e);break;case`image`:Md(`error`,e),Md(`load`,e);break;case`details`:Md(`toggle`,e);break;case`embed`:case`source`:case`link`:Md(`error`,e),Md(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Kd(e,t,u,r,n,null)}return;default:if(ln(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&qd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Kd(e,t,c,r,n,null))}function Yd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Kd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Kd(e,t,p,m,r,f)}}Qt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Kd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Kd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?tn(e,!!n,n?[]:``,!1):tn(e,!!n,t,!0)):tn(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Kd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Kd(e,t,s,a,r,o)}nn(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Kd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Kd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Kd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Kd(e,t,u,p,r,m)}return;default:if(ln(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&qd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||qd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Kd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Kd(e,t,f,p,r,m)}function Xd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Zd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Xd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Xd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Qd=null,$d=null;function ef(e){return e.nodeType===9?e:e.ownerDocument}function tf(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function nf(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function rf(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var af=null;function of(){var e=window.event;return e&&e.type===`popstate`?e===af?!1:(af=e,!0):(af=null,!1)}var sf=typeof setTimeout==`function`?setTimeout:void 0,cf=typeof clearTimeout==`function`?clearTimeout:void 0,lf=typeof Promise==`function`?Promise:void 0,uf=typeof queueMicrotask==`function`?queueMicrotask:lf===void 0?sf:function(e){return lf.resolve(null).then(e).catch(df)};function df(e){setTimeout(function(){throw e})}function ff(e){return e===`head`}function pf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Gp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Df(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Df(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Et]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Df(e.ownerDocument.body);n=i}while(n);Gp(t)}function mf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function hf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:hf(n),Dt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function gf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[Et])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=Sf(e.nextSibling),e===null)break}return null}function _f(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=Sf(e.nextSibling),e===null))return null;return e}function vf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=Sf(e.nextSibling),e===null))return null;return e}function yf(e){return e.data===`$?`||e.data===`$~`}function bf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function xf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function Sf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var Cf=null;function wf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return Sf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function Tf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function Ef(e,t,n){switch(t=ef(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Df(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Dt(e)}var Of=new Map,kf=new Set;function Af(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var jf=me.d;me.d={f:Mf,r:Nf,D:If,C:Lf,L:Rf,m:zf,X:Vf,S:Bf,M:Hf};function Mf(){var e=jf.f(),t=ju();return e||t}function Nf(e){var t=kt(e);t!==null&&t.tag===5&&t.type===`form`?Us(t):jf.r(e)}var Pf=typeof document>`u`?null:document;function Ff(e,t,n){var r=Pf;if(r&&typeof t==`string`&&t){var i=Zt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),kf.has(i)||(kf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Jd(t,`link`,e),Mt(t),r.head.appendChild(t)))}}function If(e){jf.D(e),Ff(`dns-prefetch`,e,null)}function Lf(e,t){jf.C(e,t),Ff(`preconnect`,e,t)}function Rf(e,t,n){jf.L(e,t,n);var r=Pf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Zt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Zt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Zt(n.imageSizes)+`"]`)):i+=`[href="`+Zt(e)+`"]`;var a=i;switch(t){case`style`:a=Wf(e);break;case`script`:a=Jf(e)}Of.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Of.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Gf(a))||t===`script`&&r.querySelector(Yf(a))||(t=r.createElement(`link`),Jd(t,`link`,e),Mt(t),r.head.appendChild(t)))}}function zf(e,t){jf.m(e,t);var n=Pf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Zt(r)+`"][href="`+Zt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Jf(e)}if(!Of.has(a)&&(e=p({rel:`modulepreload`,href:e},t),Of.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Yf(a)))return}r=n.createElement(`link`),Jd(r,`link`,e),Mt(r),n.head.appendChild(r)}}}function Bf(e,t,n){jf.S(e,t,n);var r=Pf;if(r&&e){var i=jt(r).hoistableStyles,a=Wf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Gf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Of.get(a))&&Qf(e,n);var c=o=r.createElement(`link`);Mt(c),Jd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Zf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Vf(e,t){jf.X(e,t);var n=Pf;if(n&&e){var r=jt(n).hoistableScripts,i=Jf(e),a=r.get(i);a||(a=n.querySelector(Yf(i)),a||(e=p({src:e,async:!0},t),(t=Of.get(i))&&$f(e,t),a=n.createElement(`script`),Mt(a),Jd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Hf(e,t){jf.M(e,t);var n=Pf;if(n&&e){var r=jt(n).hoistableScripts,i=Jf(e),a=r.get(i);a||(a=n.querySelector(Yf(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=Of.get(i))&&$f(e,t),a=n.createElement(`script`),Mt(a),Jd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Uf(e,t,n,r){var a=(a=Ce.current)?Af(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Wf(n.href),n=jt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Wf(n.href);var o=jt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Gf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Of.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Of.set(e,n),o||qf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Jf(n),n=jt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Wf(e){return`href="`+Zt(e)+`"`}function Gf(e){return`link[rel="stylesheet"][`+e+`]`}function Kf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function qf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Jd(t,`link`,n),Mt(t),e.head.appendChild(t))}function Jf(e){return`[src="`+Zt(e)+`"]`}function Yf(e){return`script[async]`+e}function Xf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Zt(n.href)+`"]`);if(r)return t.instance=r,Mt(r),r;var a=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Mt(r),Jd(r,`style`,a),Zf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Wf(n.href);var o=e.querySelector(Gf(a));if(o)return t.state.loading|=4,t.instance=o,Mt(o),o;r=Kf(n),(a=Of.get(a))&&Qf(r,a),o=(e.ownerDocument||e).createElement(`link`),Mt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Jd(o,`link`,r),t.state.loading|=4,Zf(o,n.precedence,e),t.instance=o;case`script`:return o=Jf(n.src),(a=e.querySelector(Yf(o)))?(t.instance=a,Mt(a),a):(r=n,(a=Of.get(o))&&(r=p({},n),$f(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Mt(a),Jd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Zf(r,n.precedence,e));return t.instance}function Zf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Qf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function $f(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var ep=null;function tp(e,t,n){if(ep===null){var r=new Map,i=ep=new Map;i.set(n,r)}else i=ep,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Et]||a[yt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function np(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function rp(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function R(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function z(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Wf(r.href),a=t.querySelector(Gf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=op.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Mt(a);return}a=t.ownerDocument||t,r=Kf(r),(i=Of.get(i))&&Qf(r,i),a=a.createElement(`link`),Mt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Jd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=op.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var ip=0;function ap(e,t){return e.stylesheets&&e.count===0&&cp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&cp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&ip===0&&(ip=62500*Zd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&cp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>ip?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function op(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)cp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var sp=null;function cp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,sp=new Map,t.forEach(lp,e),sp=null,op.call(e))}function lp(e,t){if(!(t.state.loading&4)){var n=sp.get(e);if(n)var r=n.get(null);else{n=new Map,sp.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=op.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var up={$$typeof:te,Provider:null,Consumer:null,_currentValue:he,_currentValue2:he,_threadCount:0};function dp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=lt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lt(0),this.hiddenUpdates=lt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function fp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new dp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=xi(3,null,null,t),e.current=a,a.stateNode=e,t=Sa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},to(a),e}function pp(e){return e?(e=yi,e):yi}function mp(e,t,n,r,i,a){i=pp(i),r.context===null?r.context=i:r.pendingContext=i,r=ro(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=io(e,r,t),n!==null&&(Eu(n,e,t),ao(n,e,t))}function hp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function gp(e,t){hp(e,t),(e=e.alternate)&&hp(e,t)}function _p(e){if(e.tag===13||e.tag===31){var t=gi(e,67108864);t!==null&&Eu(t,e,67108864),gp(e,67108864)}}function vp(e){if(e.tag===13||e.tag===31){var t=wu();t=ht(t);var n=gi(e,t);n!==null&&Eu(n,e,t),gp(e,t)}}var yp=!0;function bp(e,t,n,r){var i=b.T;b.T=null;var a=me.p;try{me.p=2,Sp(e,t,n,r)}finally{me.p=a,b.T=i}}function xp(e,t,n,r){var i=b.T;b.T=null;var a=me.p;try{me.p=8,Sp(e,t,n,r)}finally{me.p=a,b.T=i}}function Sp(e,t,n,r){if(yp){var i=Cp(r);if(i===null)Ld(e,t,r,wp,n),Fp(e,r);else if(Lp(i,e,t,n,r))r.stopPropagation();else if(Fp(e,r),t&4&&-1<Pp.indexOf(e)){for(;i!==null;){var a=kt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=it(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ze(o);s.entanglements[1]|=c,o&=~c}hd(a),!(Kl&6)&&(fu=ze()+500,gd(0,!1))}}break;case 31:case 13:s=gi(a,2),s!==null&&Eu(s,a,2),ju(),gp(a,2)}if(a=Cp(r),a===null&&Ld(e,t,r,wp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Ld(e,t,r,null,n)}}function Cp(e){return e=hn(e),Tp(e)}var wp=null;function Tp(e){if(wp=null,e=Ot(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return wp=e,null}function Ep(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Be()){case Ve:return 2;case He:return 8;case Ue:case We:return 32;case Ge:return 268435456;default:return 32}default:return 32}}var Dp=!1,Op=null,kp=null,Ap=null,jp=new Map,Mp=new Map,Np=[],Pp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Fp(e,t){switch(e){case`focusin`:case`focusout`:Op=null;break;case`dragenter`:case`dragleave`:kp=null;break;case`mouseover`:case`mouseout`:Ap=null;break;case`pointerover`:case`pointerout`:jp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Mp.delete(t.pointerId)}}function Ip(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=kt(t),t!==null&&_p(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Lp(e,t,n,r,i){switch(t){case`focusin`:return Op=Ip(Op,e,t,n,r,i),!0;case`dragenter`:return kp=Ip(kp,e,t,n,r,i),!0;case`mouseover`:return Ap=Ip(Ap,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return jp.set(a,Ip(jp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Mp.set(a,Ip(Mp.get(a)||null,e,t,n,r,i)),!0}return!1}function Rp(e){var t=Ot(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,_t(e.priority,function(){vp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,_t(e.priority,function(){vp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function zp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Cp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);mn=r,n.target.dispatchEvent(r),mn=null}else return t=kt(n),t!==null&&_p(t),e.blockedOn=n,!1;t.shift()}return!0}function Bp(e,t,n){zp(e)&&n.delete(t)}function Vp(){Dp=!1,Op!==null&&zp(Op)&&(Op=null),kp!==null&&zp(kp)&&(kp=null),Ap!==null&&zp(Ap)&&(Ap=null),jp.forEach(Bp),Mp.forEach(Bp)}function Hp(e,n){e.blockedOn===n&&(e.blockedOn=null,Dp||(Dp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Vp)))}var Up=null;function Wp(e){Up!==e&&(Up=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Up===e&&(Up=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Tp(r||n)===null)continue;break}var a=kt(n);a!==null&&(e.splice(t,3),t-=3,Vs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Gp(e){function t(t){return Hp(t,e)}Op!==null&&Hp(Op,e),kp!==null&&Hp(kp,e),Ap!==null&&Hp(Ap,e),jp.forEach(t),Mp.forEach(t);for(var n=0;n<Np.length;n++){var r=Np[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Np.length&&(n=Np[0],n.blockedOn===null);)Rp(n),n.blockedOn===null&&Np.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[bt]||null;if(typeof a==`function`)o||Wp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[bt]||null)s=o.formAction;else if(Tp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Wp(n)}}}function Kp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function B(e){this._internalRoot=e}qp.prototype.render=B.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;mp(n,wu(),e,t,null,null)},qp.prototype.unmount=B.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;mp(e.current,2,null,e,null,null),ju(),t[xt]=null}};function qp(e){this._internalRoot=e}qp.prototype.unstable_scheduleHydration=function(e){if(e){var t=gt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Np.length&&t!==0&&t<Np[n].priority;n++);Np.splice(n,0,e),n===0&&Rp(e)}};var Jp=n.version;if(Jp!==`19.2.7`)throw Error(i(527,Jp,`19.2.7`));me.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Yp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:b,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Xp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xp.isDisabled&&Xp.supportsFiber)try{Je=Xp.inject(Yp),Ye=Xp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=lc,s=uc,c=dc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=fp(e,1,!1,null,null,n,r,null,o,s,c,Kp),e[xt]=t.current,Fd(e),new B(t)}})),rb=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=nb()}))(),ib=`0.6.4`,ab=A({source:T().describe("The component\'s module in TSX. It may import only from \'react\'. Its exports, the default one by its function\'s name, are what `code` can name. For each value the reader can change by using the component, such as `checked`, `open` or `value`, take a matching `onCheckedChange`, `onOpenChange` or `onValueChange` prop and call it with the new value, and give that value `{ change: true }` in `controls`. Component Code passes it then, so the change shows in the code. Keep state of its own only for when the prop is missing."),code:T().describe(`How the component is used, in JSX: elements, props and text only, with no hooks, calls or conditions. It is shown as code and rendered as the preview. Each string, number and boolean in it becomes a control.`),file:T().optional().describe("The file named in the code\'s tab, such as `Card.tsx`."),controls:N(T(),M([F(!1),k(M([T(),E()])),A({min:E().optional(),max:E().optional(),step:E().optional(),options:k(M([T(),E()])).optional(),change:D().optional()})])).optional().describe("How a prop is changed, by its name or by `Element.prop`: a list of options, `{ min, max, step }` for a number, or `false` to keep it as written. `{ change: true }` lets the component change it too, through its `on<Prop>Change`, and takes a list as `options`.")}),ob=A({files:N(T(),T()).describe("The files by name, such as `index.html`, `style.css` and `script.js`, each in its own tab. They run together as one page in a sandboxed frame: the HTML is the page\'s body, with the CSS in a style element and the JS in a script element after it. The page cannot load anything from the network, so draw with canvas, SVG or the DOM."),controls:N(T(),M([F(!0),k(M([T(),E()])),A({min:E().optional(),max:E().optional(),step:E().optional()})])).optional().describe("The values the reader can change, by name: an attribute, as `r` or `circle.r`, a CSS property or custom property, as `--speed`, or a JS `const` set to a number, string or boolean. Each takes `true`, a list of options, or `{ min, max, step }` for a number. CSS changes apply as the reader drags, while HTML and JS run the page again, so a script that reads custom properties each frame follows along.")}),sb={tsx:`tsx`,jsx:`jsx`,ts:`ts`,js:`js`,html:`html`,css:`css`},cb=(e,t)=>`\\`${e}\\`\\n\\n\\`\\`\\`${sb[e.split(`.`).pop()??``]??``}\\n${t}\\n\\`\\`\\``;function lb({prop:e,value:t,files:n,file:r,problem:i}){return[`In Component Code, the user set \\`${e}\\` to \\`${typeof t==`string`?JSON.stringify(t):`${t}`}\\` in \\`${r}\\`. The preview now runs this code, which is its whole state:`,...Object.entries(n).map(([e,t])=>cb(e,t)),i?`The preview throws instead of rendering: ${i}`:`The preview renders without throwing.`].join(`\n\n`)}var H;(function(e){e[e.NONE=0]=`NONE`,e[e._abstract=1]=`_abstract`,e[e._accessor=2]=`_accessor`,e[e._as=3]=`_as`,e[e._assert=4]=`_assert`,e[e._asserts=5]=`_asserts`,e[e._async=6]=`_async`,e[e._await=7]=`_await`,e[e._checks=8]=`_checks`,e[e._constructor=9]=`_constructor`,e[e._declare=10]=`_declare`,e[e._enum=11]=`_enum`,e[e._exports=12]=`_exports`,e[e._from=13]=`_from`,e[e._get=14]=`_get`,e[e._global=15]=`_global`,e[e._implements=16]=`_implements`,e[e._infer=17]=`_infer`,e[e._interface=18]=`_interface`,e[e._is=19]=`_is`,e[e._keyof=20]=`_keyof`,e[e._mixins=21]=`_mixins`,e[e._module=22]=`_module`,e[e._namespace=23]=`_namespace`,e[e._of=24]=`_of`,e[e._opaque=25]=`_opaque`,e[e._out=26]=`_out`,e[e._override=27]=`_override`,e[e._private=28]=`_private`,e[e._protected=29]=`_protected`,e[e._proto=30]=`_proto`,e[e._public=31]=`_public`,e[e._readonly=32]=`_readonly`,e[e._require=33]=`_require`,e[e._satisfies=34]=`_satisfies`,e[e._set=35]=`_set`,e[e._static=36]=`_static`,e[e._symbol=37]=`_symbol`,e[e._type=38]=`_type`,e[e._unique=39]=`_unique`,e[e._using=40]=`_using`})(H||={});var U;(function(e){e[e.PRECEDENCE_MASK=15]=`PRECEDENCE_MASK`,e[e.IS_KEYWORD=16]=`IS_KEYWORD`,e[e.IS_ASSIGN=32]=`IS_ASSIGN`,e[e.IS_RIGHT_ASSOCIATIVE=64]=`IS_RIGHT_ASSOCIATIVE`,e[e.IS_PREFIX=128]=`IS_PREFIX`,e[e.IS_POSTFIX=256]=`IS_POSTFIX`,e[e.IS_EXPRESSION_START=512]=`IS_EXPRESSION_START`,e[e.num=512]=`num`,e[e.bigint=1536]=`bigint`,e[e.decimal=2560]=`decimal`,e[e.regexp=3584]=`regexp`,e[e.string=4608]=`string`,e[e.name=5632]=`name`,e[e.eof=6144]=`eof`,e[e.bracketL=7680]=`bracketL`,e[e.bracketR=8192]=`bracketR`,e[e.braceL=9728]=`braceL`,e[e.braceBarL=10752]=`braceBarL`,e[e.braceR=11264]=`braceR`,e[e.braceBarR=12288]=`braceBarR`,e[e.parenL=13824]=`parenL`,e[e.parenR=14336]=`parenR`,e[e.comma=15360]=`comma`,e[e.semi=16384]=`semi`,e[e.colon=17408]=`colon`,e[e.doubleColon=18432]=`doubleColon`,e[e.dot=19456]=`dot`,e[e.question=20480]=`question`,e[e.questionDot=21504]=`questionDot`,e[e.arrow=22528]=`arrow`,e[e.template=23552]=`template`,e[e.ellipsis=24576]=`ellipsis`,e[e.backQuote=25600]=`backQuote`,e[e.dollarBraceL=27136]=`dollarBraceL`,e[e.at=27648]=`at`,e[e.hash=29184]=`hash`,e[e.eq=29728]=`eq`,e[e.assign=30752]=`assign`,e[e.preIncDec=32640]=`preIncDec`,e[e.postIncDec=33664]=`postIncDec`,e[e.bang=34432]=`bang`,e[e.tilde=35456]=`tilde`,e[e.pipeline=35841]=`pipeline`,e[e.nullishCoalescing=36866]=`nullishCoalescing`,e[e.logicalOR=37890]=`logicalOR`,e[e.logicalAND=38915]=`logicalAND`,e[e.bitwiseOR=39940]=`bitwiseOR`,e[e.bitwiseXOR=40965]=`bitwiseXOR`,e[e.bitwiseAND=41990]=`bitwiseAND`,e[e.equality=43015]=`equality`,e[e.lessThan=44040]=`lessThan`,e[e.greaterThan=45064]=`greaterThan`,e[e.relationalOrEqual=46088]=`relationalOrEqual`,e[e.bitShiftL=47113]=`bitShiftL`,e[e.bitShiftR=48137]=`bitShiftR`,e[e.plus=49802]=`plus`,e[e.minus=50826]=`minus`,e[e.modulo=51723]=`modulo`,e[e.star=52235]=`star`,e[e.slash=53259]=`slash`,e[e.exponent=54348]=`exponent`,e[e.jsxName=55296]=`jsxName`,e[e.jsxText=56320]=`jsxText`,e[e.jsxEmptyText=57344]=`jsxEmptyText`,e[e.jsxTagStart=58880]=`jsxTagStart`,e[e.jsxTagEnd=59392]=`jsxTagEnd`,e[e.typeParameterStart=60928]=`typeParameterStart`,e[e.nonNullAssertion=61440]=`nonNullAssertion`,e[e._break=62480]=`_break`,e[e._case=63504]=`_case`,e[e._catch=64528]=`_catch`,e[e._continue=65552]=`_continue`,e[e._debugger=66576]=`_debugger`,e[e._default=67600]=`_default`,e[e._do=68624]=`_do`,e[e._else=69648]=`_else`,e[e._finally=70672]=`_finally`,e[e._for=71696]=`_for`,e[e._function=73232]=`_function`,e[e._if=73744]=`_if`,e[e._return=74768]=`_return`,e[e._switch=75792]=`_switch`,e[e._throw=77456]=`_throw`,e[e._try=77840]=`_try`,e[e._var=78864]=`_var`,e[e._let=79888]=`_let`,e[e._const=80912]=`_const`,e[e._while=81936]=`_while`,e[e._with=82960]=`_with`,e[e._new=84496]=`_new`,e[e._this=85520]=`_this`,e[e._super=86544]=`_super`,e[e._class=87568]=`_class`,e[e._extends=88080]=`_extends`,e[e._export=89104]=`_export`,e[e._import=90640]=`_import`,e[e._yield=91664]=`_yield`,e[e._null=92688]=`_null`,e[e._true=93712]=`_true`,e[e._false=94736]=`_false`,e[e._in=95256]=`_in`,e[e._instanceof=96280]=`_instanceof`,e[e._typeof=97936]=`_typeof`,e[e._void=98960]=`_void`,e[e._delete=99984]=`_delete`,e[e._async=100880]=`_async`,e[e._get=101904]=`_get`,e[e._set=102928]=`_set`,e[e._declare=103952]=`_declare`,e[e._readonly=104976]=`_readonly`,e[e._abstract=106e3]=`_abstract`,e[e._static=107024]=`_static`,e[e._public=107536]=`_public`,e[e._private=108560]=`_private`,e[e._protected=109584]=`_protected`,e[e._override=110608]=`_override`,e[e._as=112144]=`_as`,e[e._enum=113168]=`_enum`,e[e._type=114192]=`_type`,e[e._implements=115216]=`_implements`})(U||={});function ub(e){switch(e){case U.num:return`num`;case U.bigint:return`bigint`;case U.decimal:return`decimal`;case U.regexp:return`regexp`;case U.string:return`string`;case U.name:return`name`;case U.eof:return`eof`;case U.bracketL:return`[`;case U.bracketR:return`]`;case U.braceL:return`{`;case U.braceBarL:return`{|`;case U.braceR:return`}`;case U.braceBarR:return`|}`;case U.parenL:return`(`;case U.parenR:return`)`;case U.comma:return`,`;case U.semi:return`;`;case U.colon:return`:`;case U.doubleColon:return`::`;case U.dot:return`.`;case U.question:return`?`;case U.questionDot:return`?.`;case U.arrow:return`=>`;case U.template:return`template`;case U.ellipsis:return`...`;case U.backQuote:return"`";case U.dollarBraceL:return"${";case U.at:return`@`;case U.hash:return`#`;case U.eq:return`=`;case U.assign:return`_=`;case U.preIncDec:return`++/--`;case U.postIncDec:return`++/--`;case U.bang:return`!`;case U.tilde:return`~`;case U.pipeline:return`|>`;case U.nullishCoalescing:return`??`;case U.logicalOR:return`||`;case U.logicalAND:return`&&`;case U.bitwiseOR:return`|`;case U.bitwiseXOR:return`^`;case U.bitwiseAND:return`&`;case U.equality:return`==/!=`;case U.lessThan:return`<`;case U.greaterThan:return`>`;case U.relationalOrEqual:return`<=/>=`;case U.bitShiftL:return`<<`;case U.bitShiftR:return`>>/>>>`;case U.plus:return`+`;case U.minus:return`-`;case U.modulo:return`%`;case U.star:return`*`;case U.slash:return`/`;case U.exponent:return`**`;case U.jsxName:return`jsxName`;case U.jsxText:return`jsxText`;case U.jsxEmptyText:return`jsxEmptyText`;case U.jsxTagStart:return`jsxTagStart`;case U.jsxTagEnd:return`jsxTagEnd`;case U.typeParameterStart:return`typeParameterStart`;case U.nonNullAssertion:return`nonNullAssertion`;case U._break:return`break`;case U._case:return`case`;case U._catch:return`catch`;case U._continue:return`continue`;case U._debugger:return`debugger`;case U._default:return`default`;case U._do:return`do`;case U._else:return`else`;case U._finally:return`finally`;case U._for:return`for`;case U._function:return`function`;case U._if:return`if`;case U._return:return`return`;case U._switch:return`switch`;case U._throw:return`throw`;case U._try:return`try`;case U._var:return`var`;case U._let:return`let`;case U._const:return`const`;case U._while:return`while`;case U._with:return`with`;case U._new:return`new`;case U._this:return`this`;case U._super:return`super`;case U._class:return`class`;case U._extends:return`extends`;case U._export:return`export`;case U._import:return`import`;case U._yield:return`yield`;case U._null:return`null`;case U._true:return`true`;case U._false:return`false`;case U._in:return`in`;case U._instanceof:return`instanceof`;case U._typeof:return`typeof`;case U._void:return`void`;case U._delete:return`delete`;case U._async:return`async`;case U._get:return`get`;case U._set:return`set`;case U._declare:return`declare`;case U._readonly:return`readonly`;case U._abstract:return`abstract`;case U._static:return`static`;case U._public:return`public`;case U._private:return`private`;case U._protected:return`protected`;case U._override:return`override`;case U._as:return`as`;case U._enum:return`enum`;case U._type:return`type`;case U._implements:return`implements`;default:return``}}var db=class{constructor(e,t,n){this.startTokenIndex=e,this.endTokenIndex=t,this.isFunctionScope=n}},fb=class{constructor(e,t,n,r,i,a,o,s,c,l,u,d,f){this.potentialArrowAt=e,this.noAnonFunctionType=t,this.inDisallowConditionalTypesContext=n,this.tokensLength=r,this.scopesLength=i,this.pos=a,this.type=o,this.contextualKeyword=s,this.start=c,this.end=l,this.isType=u,this.scopeDepth=d,this.error=f}},pb=class e{constructor(){e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this),e.prototype.__init6.call(this),e.prototype.__init7.call(this),e.prototype.__init8.call(this),e.prototype.__init9.call(this),e.prototype.__init10.call(this),e.prototype.__init11.call(this),e.prototype.__init12.call(this),e.prototype.__init13.call(this)}__init(){this.potentialArrowAt=-1}__init2(){this.noAnonFunctionType=!1}__init3(){this.inDisallowConditionalTypesContext=!1}__init4(){this.tokens=[]}__init5(){this.scopes=[]}__init6(){this.pos=0}__init7(){this.type=U.eof}__init8(){this.contextualKeyword=H.NONE}__init9(){this.start=0}__init10(){this.end=0}__init11(){this.isType=!1}__init12(){this.scopeDepth=0}__init13(){this.error=null}snapshot(){return new fb(this.potentialArrowAt,this.noAnonFunctionType,this.inDisallowConditionalTypesContext,this.tokens.length,this.scopes.length,this.pos,this.type,this.contextualKeyword,this.start,this.end,this.isType,this.scopeDepth,this.error)}restoreFromSnapshot(e){this.potentialArrowAt=e.potentialArrowAt,this.noAnonFunctionType=e.noAnonFunctionType,this.inDisallowConditionalTypesContext=e.inDisallowConditionalTypesContext,this.tokens.length=e.tokensLength,this.scopes.length=e.scopesLength,this.pos=e.pos,this.type=e.type,this.contextualKeyword=e.contextualKeyword,this.start=e.start,this.end=e.end,this.isType=e.isType,this.scopeDepth=e.scopeDepth,this.error=e.error}},W;(function(e){e[e.backSpace=8]=`backSpace`,e[e.lineFeed=10]=`lineFeed`,e[e.tab=9]=`tab`,e[e.carriageReturn=13]=`carriageReturn`,e[e.shiftOut=14]=`shiftOut`,e[e.space=32]=`space`,e[e.exclamationMark=33]=`exclamationMark`,e[e.quotationMark=34]=`quotationMark`,e[e.numberSign=35]=`numberSign`,e[e.dollarSign=36]=`dollarSign`,e[e.percentSign=37]=`percentSign`,e[e.ampersand=38]=`ampersand`,e[e.apostrophe=39]=`apostrophe`,e[e.leftParenthesis=40]=`leftParenthesis`,e[e.rightParenthesis=41]=`rightParenthesis`,e[e.asterisk=42]=`asterisk`,e[e.plusSign=43]=`plusSign`,e[e.comma=44]=`comma`,e[e.dash=45]=`dash`,e[e.dot=46]=`dot`,e[e.slash=47]=`slash`,e[e.digit0=48]=`digit0`,e[e.digit1=49]=`digit1`,e[e.digit2=50]=`digit2`,e[e.digit3=51]=`digit3`,e[e.digit4=52]=`digit4`,e[e.digit5=53]=`digit5`,e[e.digit6=54]=`digit6`,e[e.digit7=55]=`digit7`,e[e.digit8=56]=`digit8`,e[e.digit9=57]=`digit9`,e[e.colon=58]=`colon`,e[e.semicolon=59]=`semicolon`,e[e.lessThan=60]=`lessThan`,e[e.equalsTo=61]=`equalsTo`,e[e.greaterThan=62]=`greaterThan`,e[e.questionMark=63]=`questionMark`,e[e.atSign=64]=`atSign`,e[e.uppercaseA=65]=`uppercaseA`,e[e.uppercaseB=66]=`uppercaseB`,e[e.uppercaseC=67]=`uppercaseC`,e[e.uppercaseD=68]=`uppercaseD`,e[e.uppercaseE=69]=`uppercaseE`,e[e.uppercaseF=70]=`uppercaseF`,e[e.uppercaseG=71]=`uppercaseG`,e[e.uppercaseH=72]=`uppercaseH`,e[e.uppercaseI=73]=`uppercaseI`,e[e.uppercaseJ=74]=`uppercaseJ`,e[e.uppercaseK=75]=`uppercaseK`,e[e.uppercaseL=76]=`uppercaseL`,e[e.uppercaseM=77]=`uppercaseM`,e[e.uppercaseN=78]=`uppercaseN`,e[e.uppercaseO=79]=`uppercaseO`,e[e.uppercaseP=80]=`uppercaseP`,e[e.uppercaseQ=81]=`uppercaseQ`,e[e.uppercaseR=82]=`uppercaseR`,e[e.uppercaseS=83]=`uppercaseS`,e[e.uppercaseT=84]=`uppercaseT`,e[e.uppercaseU=85]=`uppercaseU`,e[e.uppercaseV=86]=`uppercaseV`,e[e.uppercaseW=87]=`uppercaseW`,e[e.uppercaseX=88]=`uppercaseX`,e[e.uppercaseY=89]=`uppercaseY`,e[e.uppercaseZ=90]=`uppercaseZ`,e[e.leftSquareBracket=91]=`leftSquareBracket`,e[e.backslash=92]=`backslash`,e[e.rightSquareBracket=93]=`rightSquareBracket`,e[e.caret=94]=`caret`,e[e.underscore=95]=`underscore`,e[e.graveAccent=96]=`graveAccent`,e[e.lowercaseA=97]=`lowercaseA`,e[e.lowercaseB=98]=`lowercaseB`,e[e.lowercaseC=99]=`lowercaseC`,e[e.lowercaseD=100]=`lowercaseD`,e[e.lowercaseE=101]=`lowercaseE`,e[e.lowercaseF=102]=`lowercaseF`,e[e.lowercaseG=103]=`lowercaseG`,e[e.lowercaseH=104]=`lowercaseH`,e[e.lowercaseI=105]=`lowercaseI`,e[e.lowercaseJ=106]=`lowercaseJ`,e[e.lowercaseK=107]=`lowercaseK`,e[e.lowercaseL=108]=`lowercaseL`,e[e.lowercaseM=109]=`lowercaseM`,e[e.lowercaseN=110]=`lowercaseN`,e[e.lowercaseO=111]=`lowercaseO`,e[e.lowercaseP=112]=`lowercaseP`,e[e.lowercaseQ=113]=`lowercaseQ`,e[e.lowercaseR=114]=`lowercaseR`,e[e.lowercaseS=115]=`lowercaseS`,e[e.lowercaseT=116]=`lowercaseT`,e[e.lowercaseU=117]=`lowercaseU`,e[e.lowercaseV=118]=`lowercaseV`,e[e.lowercaseW=119]=`lowercaseW`,e[e.lowercaseX=120]=`lowercaseX`,e[e.lowercaseY=121]=`lowercaseY`,e[e.lowercaseZ=122]=`lowercaseZ`,e[e.leftCurlyBrace=123]=`leftCurlyBrace`,e[e.verticalBar=124]=`verticalBar`,e[e.rightCurlyBrace=125]=`rightCurlyBrace`,e[e.tilde=126]=`tilde`,e[e.nonBreakingSpace=160]=`nonBreakingSpace`,e[e.oghamSpaceMark=5760]=`oghamSpaceMark`,e[e.lineSeparator=8232]=`lineSeparator`,e[e.paragraphSeparator=8233]=`paragraphSeparator`})(W||={});var mb,hb,gb,G,K,_b;function vb(){return _b++}function yb(e){if(`pos`in e){let t=xb(e.pos);e.message+=` (${t.line}:${t.column})`,e.loc=t}return e}var bb=class{constructor(e,t){this.line=e,this.column=t}};function xb(e){let t=1,n=1;for(let r=0;r<e;r++)K.charCodeAt(r)===W.lineFeed?(t++,n=1):n++;return new bb(t,n)}function Sb(e,t,n,r){K=e,G=new pb,_b=1,mb=t,hb=n,gb=r}function q(e){return G.contextualKeyword===e}function Cb(e){let t=tx();return t.type===U.name&&t.contextualKeyword===e}function wb(e){return G.contextualKeyword===e&&Z(U.name)}function Tb(e){wb(e)||jb()}function Eb(){return Q(U.eof)||Q(U.braceR)||Db()}function Db(){let e=G.tokens[G.tokens.length-1],t=e?e.end:0;for(let e=t;e<G.start;e++){let t=K.charCodeAt(e);if(t===W.lineFeed||t===W.carriageReturn||t===8232||t===8233)return!0}return!1}function Ob(){let e=nx();for(let t=G.end;t<e;t++){let e=K.charCodeAt(t);if(e===W.lineFeed||e===W.carriageReturn||e===8232||e===8233)return!0}return!1}function kb(){return Z(U.semi)||Eb()}function Ab(){kb()||jb(`Unexpected token, expected ";"`)}function J(e){Z(e)||jb(`Unexpected token, expected "${ub(e)}"`)}function jb(e=`Unexpected token`,t=G.start){if(G.error)return;let n=SyntaxError(e);n.pos=t,G.error=n,G.pos=K.length,ux(U.eof)}var Mb=[9,11,12,W.space,W.nonBreakingSpace,W.oghamSpaceMark,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],Nb=/(?:\\s|\\/\\/.*|\\/\\*[^]*?\\*\\/)*/g,Pb=new Uint8Array(65536);for(let e of Mb)Pb[e]=1;function Fb(e){if(e<48)return e===36;if(e<58)return!0;if(e<65)return!1;if(e<91)return!0;if(e<97)return e===95;if(e<123)return!0;if(e<128)return!1;throw Error(`Should not be called with non-ASCII char code.`)}var Ib=new Uint8Array(65536);for(let e=0;e<128;e++)Ib[e]=+!!Fb(e);for(let e=128;e<65536;e++)Ib[e]=1;for(let e of Mb)Ib[e]=0;Ib[8232]=0,Ib[8233]=0;var Lb=Ib.slice();for(let e=W.digit0;e<=W.digit9;e++)Lb[e]=0;var Rb=new Int32Array([-1,27,783,918,1755,2376,2862,3483,-1,3699,-1,4617,4752,4833,5130,5508,5940,-1,6480,6939,7749,8181,8451,8613,-1,8829,-1,-1,-1,54,243,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,432,-1,-1,-1,675,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,81,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,108,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,135,-1,-1,-1,-1,-1,-1,-1,-1,-1,162,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,189,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,216,-1,-1,-1,-1,-1,-1,H._abstract<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,270,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,297,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,324,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,351,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,378,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,405,-1,-1,-1,-1,-1,-1,-1,-1,H._accessor<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._as<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,459,-1,-1,-1,-1,-1,594,-1,-1,-1,-1,-1,-1,486,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,513,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,540,-1,-1,-1,-1,-1,-1,H._assert<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,567,-1,-1,-1,-1,-1,-1,-1,H._asserts<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,621,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,648,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._async<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,702,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,729,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,756,-1,-1,-1,-1,-1,-1,H._await<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,810,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,837,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,864,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,891,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._break<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,945,-1,-1,-1,-1,-1,-1,1107,-1,-1,-1,1242,-1,-1,1350,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,972,1026,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,999,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._case<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1053,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1080,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._catch<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1134,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1161,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1188,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1215,-1,-1,-1,-1,-1,-1,-1,H._checks<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1269,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1296,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1323,-1,-1,-1,-1,-1,-1,-1,(U._class<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1377,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1404,1620,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1431,-1,-1,-1,-1,-1,-1,(U._const<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1458,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1485,-1,-1,-1,-1,-1,-1,-1,-1,1512,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1539,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1566,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1593,-1,-1,-1,-1,-1,-1,-1,-1,H._constructor<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1647,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1674,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1701,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1728,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._continue<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1782,-1,-1,-1,-1,-1,-1,-1,-1,-1,2349,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1809,1971,-1,-1,2106,-1,-1,-1,-1,-1,2241,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1836,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1863,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1890,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1917,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1944,-1,-1,-1,-1,-1,-1,-1,-1,(U._debugger<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1998,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2025,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2052,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2079,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._declare<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2133,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2160,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2187,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2214,-1,-1,-1,-1,-1,-1,(U._default<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2268,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2295,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2322,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._delete<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._do<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2403,-1,2484,-1,-1,-1,-1,-1,-1,-1,-1,-1,2565,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2430,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2457,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._else<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2511,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2538,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._enum<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2592,-1,-1,-1,2727,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2619,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2646,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2673,-1,-1,-1,-1,-1,-1,(U._export<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2700,-1,-1,-1,-1,-1,-1,-1,H._exports<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2754,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2781,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2808,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2835,-1,-1,-1,-1,-1,-1,-1,(U._extends<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2889,-1,-1,-1,-1,-1,-1,-1,2997,-1,-1,-1,-1,-1,3159,-1,-1,3213,-1,-1,3294,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2916,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2943,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2970,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._false<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3024,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3051,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3078,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3105,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3132,-1,(U._finally<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3186,-1,-1,-1,-1,-1,-1,-1,-1,(U._for<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3240,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3267,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._from<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3321,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3348,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3375,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3402,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3429,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3456,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._function<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3510,-1,-1,-1,-1,-1,-1,3564,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3537,-1,-1,-1,-1,-1,-1,H._get<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3591,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3618,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3645,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3672,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._global<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3726,-1,-1,-1,-1,-1,-1,3753,4077,-1,-1,-1,-1,4590,-1,-1,-1,-1,-1,-1,-1,(U._if<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3780,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3807,-1,-1,3996,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3834,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3861,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3888,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3915,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3942,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3969,-1,-1,-1,-1,-1,-1,-1,H._implements<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4023,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4050,-1,-1,-1,-1,-1,-1,(U._import<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._in<<1)+1,-1,-1,-1,-1,-1,4104,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4185,4401,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4131,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4158,-1,-1,-1,-1,-1,-1,-1,-1,H._infer<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4212,-1,-1,-1,-1,-1,-1,-1,4239,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4266,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4293,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4320,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4347,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4374,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._instanceof<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4428,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4455,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4482,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4509,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4536,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4563,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._interface<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._is<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4644,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4671,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4698,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4725,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._keyof<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4779,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4806,-1,-1,-1,-1,-1,-1,(U._let<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4860,-1,-1,-1,-1,-1,4995,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4887,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4914,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4941,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4968,-1,-1,-1,-1,-1,-1,-1,H._mixins<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5022,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5049,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5076,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5103,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._module<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5157,-1,-1,-1,5373,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5427,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5184,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5211,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5238,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5265,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5292,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5319,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5346,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._namespace<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5400,-1,-1,-1,(U._new<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5454,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5481,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._null<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5535,-1,-1,-1,-1,-1,-1,-1,-1,-1,5562,-1,-1,-1,-1,5697,5751,-1,-1,-1,-1,H._of<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5589,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5616,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5643,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5670,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._opaque<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5724,-1,-1,-1,-1,-1,-1,H._out<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5778,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5805,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5832,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5859,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5886,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5913,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._override<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5967,-1,-1,6345,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5994,-1,-1,-1,-1,-1,6129,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6021,-1,-1,-1,-1,-1,6048,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6075,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6102,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._private<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6156,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6183,-1,-1,-1,-1,-1,-1,-1,-1,-1,6318,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6210,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6237,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6264,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6291,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._protected<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._proto<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6372,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6399,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6426,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6453,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._public<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6507,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6534,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6696,-1,-1,6831,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6561,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6588,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6615,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6642,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6669,-1,H._readonly<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6723,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6750,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6777,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6804,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._require<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6858,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6885,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6912,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._return<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6966,-1,-1,-1,7182,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7236,7371,-1,7479,-1,7614,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6993,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7020,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7047,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7074,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7101,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7128,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7155,-1,-1,-1,-1,-1,-1,-1,H._satisfies<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7209,-1,-1,-1,-1,-1,-1,H._set<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7263,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7290,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7317,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7344,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._static<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7398,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7425,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7452,-1,-1,-1,-1,-1,-1,-1,-1,(U._super<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7506,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7533,-1,-1,-1,-1,-1,-1,-1,-1,-1,7560,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7587,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._switch<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7641,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7668,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7695,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7722,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._symbol<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7776,-1,-1,-1,-1,-1,-1,-1,-1,-1,7938,-1,-1,-1,-1,-1,-1,8046,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7803,-1,-1,-1,-1,-1,-1,-1,-1,7857,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7830,-1,-1,-1,-1,-1,-1,-1,(U._this<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7884,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7911,-1,-1,-1,(U._throw<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7965,-1,-1,-1,8019,-1,-1,-1,-1,-1,-1,7992,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._true<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._try<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8073,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8100,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._type<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8127,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8154,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._typeof<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8208,-1,-1,-1,-1,8343,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8235,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8262,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8289,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8316,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._unique<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8370,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8397,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8424,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._using<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8478,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8532,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8505,-1,-1,-1,-1,-1,-1,-1,-1,(U._var<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8559,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8586,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._void<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8640,8748,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8667,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8694,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8721,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._while<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8775,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8802,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._with<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8856,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8883,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8910,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8937,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._yield<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]);function zb(){let e=0,t=0,n=G.pos;for(;n<K.length&&(t=K.charCodeAt(n),!(t<W.lowercaseA||t>W.lowercaseZ));){let r=Rb[e+(t-W.lowercaseA)+1];if(r===-1)break;e=r,n++}let r=Rb[e];if(r>-1&&!Ib[t]){G.pos=n,r&1?ux(r>>>1):ux(U.name,r>>>1);return}for(;n<K.length;){let e=K.charCodeAt(n);if(Ib[e])n++;else if(e===W.backslash){if(n+=2,K.charCodeAt(n)===W.leftCurlyBrace){for(;n<K.length&&K.charCodeAt(n)!==W.rightCurlyBrace;)n++;n++}}else if(e===W.atSign&&K.charCodeAt(n+1)===W.atSign)n+=2;else break}G.pos=n,ux(U.name)}var Y;(function(e){e[e.Access=0]=`Access`,e[e.ExportAccess=1]=`ExportAccess`,e[e.TopLevelDeclaration=2]=`TopLevelDeclaration`,e[e.FunctionScopedDeclaration=3]=`FunctionScopedDeclaration`,e[e.BlockScopedDeclaration=4]=`BlockScopedDeclaration`,e[e.ObjectShorthandTopLevelDeclaration=5]=`ObjectShorthandTopLevelDeclaration`,e[e.ObjectShorthandFunctionScopedDeclaration=6]=`ObjectShorthandFunctionScopedDeclaration`,e[e.ObjectShorthandBlockScopedDeclaration=7]=`ObjectShorthandBlockScopedDeclaration`,e[e.ObjectShorthand=8]=`ObjectShorthand`,e[e.ImportDeclaration=9]=`ImportDeclaration`,e[e.ObjectKey=10]=`ObjectKey`,e[e.ImportAccess=11]=`ImportAccess`})(Y||={});var Bb;(function(e){e[e.NoChildren=0]=`NoChildren`,e[e.OneChild=1]=`OneChild`,e[e.StaticChildren=2]=`StaticChildren`,e[e.KeyAfterPropSpread=3]=`KeyAfterPropSpread`})(Bb||={});function Vb(e){let t=e.identifierRole;return t===Y.TopLevelDeclaration||t===Y.FunctionScopedDeclaration||t===Y.BlockScopedDeclaration||t===Y.ObjectShorthandTopLevelDeclaration||t===Y.ObjectShorthandFunctionScopedDeclaration||t===Y.ObjectShorthandBlockScopedDeclaration}function Hb(e){let t=e.identifierRole;return t===Y.FunctionScopedDeclaration||t===Y.BlockScopedDeclaration||t===Y.ObjectShorthandFunctionScopedDeclaration||t===Y.ObjectShorthandBlockScopedDeclaration}function Ub(e){let t=e.identifierRole;return t===Y.TopLevelDeclaration||t===Y.ObjectShorthandTopLevelDeclaration||t===Y.ImportDeclaration}function Wb(e){let t=e.identifierRole;return t===Y.TopLevelDeclaration||t===Y.BlockScopedDeclaration||t===Y.ObjectShorthandTopLevelDeclaration||t===Y.ObjectShorthandBlockScopedDeclaration}function Gb(e){let t=e.identifierRole;return t===Y.FunctionScopedDeclaration||t===Y.ObjectShorthandFunctionScopedDeclaration}function Kb(e){return e.identifierRole===Y.ObjectShorthandTopLevelDeclaration||e.identifierRole===Y.ObjectShorthandBlockScopedDeclaration||e.identifierRole===Y.ObjectShorthandFunctionScopedDeclaration}var qb=class{constructor(){this.type=G.type,this.contextualKeyword=G.contextualKeyword,this.start=G.start,this.end=G.end,this.scopeDepth=G.scopeDepth,this.isType=G.isType,this.identifierRole=null,this.jsxRole=null,this.shadowsGlobal=!1,this.isAsyncOperation=!1,this.contextId=null,this.rhsEndIndex=null,this.isExpression=!1,this.numNullishCoalesceStarts=0,this.numNullishCoalesceEnds=0,this.isOptionalChainStart=!1,this.isOptionalChainEnd=!1,this.subscriptStartIndex=null,this.nullishStartIndex=null}};function X(){G.tokens.push(new qb),ax()}function Jb(){G.tokens.push(new qb),G.start=G.pos,kx()}function Yb(){G.type===U.assign&&--G.pos,wx()}function Xb(e){for(let t=G.tokens.length-e;t<G.tokens.length;t++)G.tokens[t].isType=!0;let t=G.isType;return G.isType=!0,t}function Zb(e){G.isType=e}function Z(e){return Q(e)?(X(),!0):!1}function Qb(e){let t=G.isType;G.isType=!0,Z(e),G.isType=t}function Q(e){return G.type===e}function $b(){let e=G.snapshot();X();let t=G.type;return G.restoreFromSnapshot(e),t}var ex=class{constructor(e,t){this.type=e,this.contextualKeyword=t}};function tx(){let e=G.snapshot();X();let t=G.type,n=G.contextualKeyword;return G.restoreFromSnapshot(e),new ex(t,n)}function nx(){return rx(G.pos)}function rx(e){return Nb.lastIndex=e,e+Nb.exec(K)[0].length}function ix(){return K.charCodeAt(nx())}function ax(){if(lx(),G.start=G.pos,G.pos>=K.length){let e=G.tokens;e.length>=2&&e[e.length-1].start>=K.length&&e[e.length-2].start>=K.length&&jb(`Unexpectedly reached the end of input.`),ux(U.eof);return}ox(K.charCodeAt(G.pos))}function ox(e){Lb[e]||e===W.backslash||e===W.atSign&&K.charCodeAt(G.pos+1)===W.atSign?zb():Sx(e)}function sx(){for(;K.charCodeAt(G.pos)!==W.asterisk||K.charCodeAt(G.pos+1)!==W.slash;)if(G.pos++,G.pos>K.length){jb(`Unterminated comment`,G.pos-2);return}G.pos+=2}function cx(e){let t=K.charCodeAt(G.pos+=e);if(G.pos<K.length)for(;t!==W.lineFeed&&t!==W.carriageReturn&&t!==W.lineSeparator&&t!==W.paragraphSeparator&&++G.pos<K.length;)t=K.charCodeAt(G.pos)}function lx(){for(;G.pos<K.length;){let e=K.charCodeAt(G.pos);switch(e){case W.carriageReturn:K.charCodeAt(G.pos+1)===W.lineFeed&&++G.pos;case W.lineFeed:case W.lineSeparator:case W.paragraphSeparator:++G.pos;break;case W.slash:switch(K.charCodeAt(G.pos+1)){case W.asterisk:G.pos+=2,sx();break;case W.slash:cx(2);break;default:return}break;default:if(Pb[e])++G.pos;else return}}}function ux(e,t=H.NONE){G.end=G.pos,G.type=e,G.contextualKeyword=t}function dx(){let e=K.charCodeAt(G.pos+1);if(e>=W.digit0&&e<=W.digit9){Dx(!0);return}e===W.dot&&K.charCodeAt(G.pos+2)===W.dot?(G.pos+=3,ux(U.ellipsis)):(++G.pos,ux(U.dot))}function fx(){K.charCodeAt(G.pos+1)===W.equalsTo?Cx(U.assign,2):Cx(U.slash,1)}function px(e){let t=e===W.asterisk?U.star:U.modulo,n=1,r=K.charCodeAt(G.pos+1);e===W.asterisk&&r===W.asterisk&&(n++,r=K.charCodeAt(G.pos+2),t=U.exponent),r===W.equalsTo&&K.charCodeAt(G.pos+2)!==W.greaterThan&&(n++,t=U.assign),Cx(t,n)}function mx(e){let t=K.charCodeAt(G.pos+1);if(t===e){K.charCodeAt(G.pos+2)===W.equalsTo?Cx(U.assign,3):Cx(e===W.verticalBar?U.logicalOR:U.logicalAND,2);return}if(e===W.verticalBar){if(t===W.greaterThan){Cx(U.pipeline,2);return}else if(t===W.rightCurlyBrace&&gb){Cx(U.braceBarR,2);return}}if(t===W.equalsTo){Cx(U.assign,2);return}Cx(e===W.verticalBar?U.bitwiseOR:U.bitwiseAND,1)}function hx(){K.charCodeAt(G.pos+1)===W.equalsTo?Cx(U.assign,2):Cx(U.bitwiseXOR,1)}function gx(e){let t=K.charCodeAt(G.pos+1);if(t===e){Cx(U.preIncDec,2);return}t===W.equalsTo?Cx(U.assign,2):e===W.plusSign?Cx(U.plus,1):Cx(U.minus,1)}function _x(){let e=K.charCodeAt(G.pos+1);if(e===W.lessThan){if(K.charCodeAt(G.pos+2)===W.equalsTo){Cx(U.assign,3);return}G.isType?Cx(U.lessThan,1):Cx(U.bitShiftL,2);return}e===W.equalsTo?Cx(U.relationalOrEqual,2):Cx(U.lessThan,1)}function vx(){if(G.isType){Cx(U.greaterThan,1);return}let e=K.charCodeAt(G.pos+1);if(e===W.greaterThan){let e=K.charCodeAt(G.pos+2)===W.greaterThan?3:2;if(K.charCodeAt(G.pos+e)===W.equalsTo){Cx(U.assign,e+1);return}Cx(U.bitShiftR,e);return}e===W.equalsTo?Cx(U.relationalOrEqual,2):Cx(U.greaterThan,1)}function yx(){G.type===U.greaterThan&&(--G.pos,vx())}function bx(e){let t=K.charCodeAt(G.pos+1);if(t===W.equalsTo){Cx(U.equality,K.charCodeAt(G.pos+2)===W.equalsTo?3:2);return}if(e===W.equalsTo&&t===W.greaterThan){G.pos+=2,ux(U.arrow);return}Cx(e===W.equalsTo?U.eq:U.bang,1)}function xx(){let e=K.charCodeAt(G.pos+1),t=K.charCodeAt(G.pos+2);e===W.questionMark&&!(gb&&G.isType)?t===W.equalsTo?Cx(U.assign,3):Cx(U.nullishCoalescing,2):e===W.dot&&!(t>=W.digit0&&t<=W.digit9)?(G.pos+=2,ux(U.questionDot)):(++G.pos,ux(U.question))}function Sx(e){switch(e){case W.numberSign:++G.pos,ux(U.hash);return;case W.dot:dx();return;case W.leftParenthesis:++G.pos,ux(U.parenL);return;case W.rightParenthesis:++G.pos,ux(U.parenR);return;case W.semicolon:++G.pos,ux(U.semi);return;case W.comma:++G.pos,ux(U.comma);return;case W.leftSquareBracket:++G.pos,ux(U.bracketL);return;case W.rightSquareBracket:++G.pos,ux(U.bracketR);return;case W.leftCurlyBrace:gb&&K.charCodeAt(G.pos+1)===W.verticalBar?Cx(U.braceBarL,2):(++G.pos,ux(U.braceL));return;case W.rightCurlyBrace:++G.pos,ux(U.braceR);return;case W.colon:K.charCodeAt(G.pos+1)===W.colon?Cx(U.doubleColon,2):(++G.pos,ux(U.colon));return;case W.questionMark:xx();return;case W.atSign:++G.pos,ux(U.at);return;case W.graveAccent:++G.pos,ux(U.backQuote);return;case W.digit0:{let e=K.charCodeAt(G.pos+1);if(e===W.lowercaseX||e===W.uppercaseX||e===W.lowercaseO||e===W.uppercaseO||e===W.lowercaseB||e===W.uppercaseB){Ex();return}}case W.digit1:case W.digit2:case W.digit3:case W.digit4:case W.digit5:case W.digit6:case W.digit7:case W.digit8:case W.digit9:Dx(!1);return;case W.quotationMark:case W.apostrophe:Ox(e);return;case W.slash:fx();return;case W.percentSign:case W.asterisk:px(e);return;case W.verticalBar:case W.ampersand:mx(e);return;case W.caret:hx();return;case W.plusSign:case W.dash:gx(e);return;case W.lessThan:_x();return;case W.greaterThan:vx();return;case W.equalsTo:case W.exclamationMark:bx(e);return;case W.tilde:Cx(U.tilde,1);return;default:break}jb(`Unexpected character \'${String.fromCharCode(e)}\'`,G.pos)}function Cx(e,t){G.pos+=t,ux(e)}function wx(){let e=G.pos,t=!1,n=!1;for(;;){if(G.pos>=K.length){jb(`Unterminated regular expression`,e);return}let r=K.charCodeAt(G.pos);if(t)t=!1;else{if(r===W.leftSquareBracket)n=!0;else if(r===W.rightSquareBracket&&n)n=!1;else if(r===W.slash&&!n)break;t=r===W.backslash}++G.pos}++G.pos,Ax(),ux(U.regexp)}function Tx(){for(;;){let e=K.charCodeAt(G.pos);if(e>=W.digit0&&e<=W.digit9||e===W.underscore)G.pos++;else break}}function Ex(){for(G.pos+=2;;){let e=K.charCodeAt(G.pos);if(e>=W.digit0&&e<=W.digit9||e>=W.lowercaseA&&e<=W.lowercaseF||e>=W.uppercaseA&&e<=W.uppercaseF||e===W.underscore)G.pos++;else break}K.charCodeAt(G.pos)===W.lowercaseN?(++G.pos,ux(U.bigint)):ux(U.num)}function Dx(e){let t=!1,n=!1;e||Tx();let r=K.charCodeAt(G.pos);if(r===W.dot&&(++G.pos,Tx(),r=K.charCodeAt(G.pos)),(r===W.uppercaseE||r===W.lowercaseE)&&(r=K.charCodeAt(++G.pos),(r===W.plusSign||r===W.dash)&&++G.pos,Tx(),r=K.charCodeAt(G.pos)),r===W.lowercaseN?(++G.pos,t=!0):r===W.lowercaseM&&(++G.pos,n=!0),t){ux(U.bigint);return}if(n){ux(U.decimal);return}ux(U.num)}function Ox(e){for(G.pos++;;){if(G.pos>=K.length){jb(`Unterminated string constant`);return}let t=K.charCodeAt(G.pos);if(t===W.backslash)G.pos++;else if(t===e)break;G.pos++}G.pos++,ux(U.string)}function kx(){for(;;){if(G.pos>=K.length){jb(`Unterminated template`);return}let e=K.charCodeAt(G.pos);if(e===W.graveAccent||e===W.dollarSign&&K.charCodeAt(G.pos+1)===W.leftCurlyBrace){if(G.pos===G.start&&Q(U.template))if(e===W.dollarSign){G.pos+=2,ux(U.dollarBraceL);return}else{++G.pos,ux(U.backQuote);return}ux(U.template);return}e===W.backslash&&G.pos++,G.pos++}}function Ax(){for(;G.pos<K.length;){let e=K.charCodeAt(G.pos);if(Ib[e])G.pos++;else if(e===W.backslash){if(G.pos+=2,K.charCodeAt(G.pos)===W.leftCurlyBrace){for(;G.pos<K.length&&K.charCodeAt(G.pos)!==W.rightCurlyBrace;)G.pos++;G.pos++}}else break}}function jx(e,t=e.currentIndex()){let n=t+1;if(Mx(e,n)){let r=e.identifierNameAtIndex(t);return{isType:!1,leftName:r,rightName:r,endIndex:n}}if(n++,Mx(e,n))return{isType:!0,leftName:null,rightName:null,endIndex:n};if(n++,Mx(e,n))return{isType:!1,leftName:e.identifierNameAtIndex(t),rightName:e.identifierNameAtIndex(t+2),endIndex:n};if(n++,Mx(e,n))return{isType:!0,leftName:null,rightName:null,endIndex:n};throw Error(`Unexpected import/export specifier at ${t}`)}function Mx(e,t){let n=e.tokens[t];return n.type===U.braceR||n.type===U.comma}var Nx=new Map([[`quot`,`"`],[`amp`,`&`],[`apos`,`\'`],[`lt`,`<`],[`gt`,`>`],[`nbsp`,`\\xA0`],[`iexcl`,`\xA1`],[`cent`,`\xA2`],[`pound`,`\xA3`],[`curren`,`\xA4`],[`yen`,`\xA5`],[`brvbar`,`\xA6`],[`sect`,`\xA7`],[`uml`,`\xA8`],[`copy`,`\xA9`],[`ordf`,`\xAA`],[`laquo`,`\xAB`],[`not`,`\xAC`],[`shy`,`\xAD`],[`reg`,`\xAE`],[`macr`,`\xAF`],[`deg`,`\xB0`],[`plusmn`,`\xB1`],[`sup2`,`\xB2`],[`sup3`,`\xB3`],[`acute`,`\xB4`],[`micro`,`\xB5`],[`para`,`\xB6`],[`middot`,`\xB7`],[`cedil`,`\xB8`],[`sup1`,`\xB9`],[`ordm`,`\xBA`],[`raquo`,`\xBB`],[`frac14`,`\xBC`],[`frac12`,`\xBD`],[`frac34`,`\xBE`],[`iquest`,`\xBF`],[`Agrave`,`\xC0`],[`Aacute`,`\xC1`],[`Acirc`,`\xC2`],[`Atilde`,`\xC3`],[`Auml`,`\xC4`],[`Aring`,`\xC5`],[`AElig`,`\xC6`],[`Ccedil`,`\xC7`],[`Egrave`,`\xC8`],[`Eacute`,`\xC9`],[`Ecirc`,`\xCA`],[`Euml`,`\xCB`],[`Igrave`,`\xCC`],[`Iacute`,`\xCD`],[`Icirc`,`\xCE`],[`Iuml`,`\xCF`],[`ETH`,`\xD0`],[`Ntilde`,`\xD1`],[`Ograve`,`\xD2`],[`Oacute`,`\xD3`],[`Ocirc`,`\xD4`],[`Otilde`,`\xD5`],[`Ouml`,`\xD6`],[`times`,`\xD7`],[`Oslash`,`\xD8`],[`Ugrave`,`\xD9`],[`Uacute`,`\xDA`],[`Ucirc`,`\xDB`],[`Uuml`,`\xDC`],[`Yacute`,`\xDD`],[`THORN`,`\xDE`],[`szlig`,`\xDF`],[`agrave`,`\xE0`],[`aacute`,`\xE1`],[`acirc`,`\xE2`],[`atilde`,`\xE3`],[`auml`,`\xE4`],[`aring`,`\xE5`],[`aelig`,`\xE6`],[`ccedil`,`\xE7`],[`egrave`,`\xE8`],[`eacute`,`\xE9`],[`ecirc`,`\xEA`],[`euml`,`\xEB`],[`igrave`,`\xEC`],[`iacute`,`\xED`],[`icirc`,`\xEE`],[`iuml`,`\xEF`],[`eth`,`\xF0`],[`ntilde`,`\xF1`],[`ograve`,`\xF2`],[`oacute`,`\xF3`],[`ocirc`,`\xF4`],[`otilde`,`\xF5`],[`ouml`,`\xF6`],[`divide`,`\xF7`],[`oslash`,`\xF8`],[`ugrave`,`\xF9`],[`uacute`,`\xFA`],[`ucirc`,`\xFB`],[`uuml`,`\xFC`],[`yacute`,`\xFD`],[`thorn`,`\xFE`],[`yuml`,`\xFF`],[`OElig`,`\u0152`],[`oelig`,`\u0153`],[`Scaron`,`\u0160`],[`scaron`,`\u0161`],[`Yuml`,`\u0178`],[`fnof`,`\u0192`],[`circ`,`\u02C6`],[`tilde`,`\u02DC`],[`Alpha`,`\u0391`],[`Beta`,`\u0392`],[`Gamma`,`\u0393`],[`Delta`,`\u0394`],[`Epsilon`,`\u0395`],[`Zeta`,`\u0396`],[`Eta`,`\u0397`],[`Theta`,`\u0398`],[`Iota`,`\u0399`],[`Kappa`,`\u039A`],[`Lambda`,`\u039B`],[`Mu`,`\u039C`],[`Nu`,`\u039D`],[`Xi`,`\u039E`],[`Omicron`,`\u039F`],[`Pi`,`\u03A0`],[`Rho`,`\u03A1`],[`Sigma`,`\u03A3`],[`Tau`,`\u03A4`],[`Upsilon`,`\u03A5`],[`Phi`,`\u03A6`],[`Chi`,`\u03A7`],[`Psi`,`\u03A8`],[`Omega`,`\u03A9`],[`alpha`,`\u03B1`],[`beta`,`\u03B2`],[`gamma`,`\u03B3`],[`delta`,`\u03B4`],[`epsilon`,`\u03B5`],[`zeta`,`\u03B6`],[`eta`,`\u03B7`],[`theta`,`\u03B8`],[`iota`,`\u03B9`],[`kappa`,`\u03BA`],[`lambda`,`\u03BB`],[`mu`,`\u03BC`],[`nu`,`\u03BD`],[`xi`,`\u03BE`],[`omicron`,`\u03BF`],[`pi`,`\u03C0`],[`rho`,`\u03C1`],[`sigmaf`,`\u03C2`],[`sigma`,`\u03C3`],[`tau`,`\u03C4`],[`upsilon`,`\u03C5`],[`phi`,`\u03C6`],[`chi`,`\u03C7`],[`psi`,`\u03C8`],[`omega`,`\u03C9`],[`thetasym`,`\u03D1`],[`upsih`,`\u03D2`],[`piv`,`\u03D6`],[`ensp`,`\u2002`],[`emsp`,`\u2003`],[`thinsp`,`\u2009`],[`zwnj`,`\u200C`],[`zwj`,`\u200D`],[`lrm`,`\u200E`],[`rlm`,`\u200F`],[`ndash`,`\u2013`],[`mdash`,`\u2014`],[`lsquo`,`\u2018`],[`rsquo`,`\u2019`],[`sbquo`,`\u201A`],[`ldquo`,`\u201C`],[`rdquo`,`\u201D`],[`bdquo`,`\u201E`],[`dagger`,`\u2020`],[`Dagger`,`\u2021`],[`bull`,`\u2022`],[`hellip`,`\u2026`],[`permil`,`\u2030`],[`prime`,`\u2032`],[`Prime`,`\u2033`],[`lsaquo`,`\u2039`],[`rsaquo`,`\u203A`],[`oline`,`\u203E`],[`frasl`,`\u2044`],[`euro`,`\u20AC`],[`image`,`\u2111`],[`weierp`,`\u2118`],[`real`,`\u211C`],[`trade`,`\u2122`],[`alefsym`,`\u2135`],[`larr`,`\u2190`],[`uarr`,`\u2191`],[`rarr`,`\u2192`],[`darr`,`\u2193`],[`harr`,`\u2194`],[`crarr`,`\u21B5`],[`lArr`,`\u21D0`],[`uArr`,`\u21D1`],[`rArr`,`\u21D2`],[`dArr`,`\u21D3`],[`hArr`,`\u21D4`],[`forall`,`\u2200`],[`part`,`\u2202`],[`exist`,`\u2203`],[`empty`,`\u2205`],[`nabla`,`\u2207`],[`isin`,`\u2208`],[`notin`,`\u2209`],[`ni`,`\u220B`],[`prod`,`\u220F`],[`sum`,`\u2211`],[`minus`,`\u2212`],[`lowast`,`\u2217`],[`radic`,`\u221A`],[`prop`,`\u221D`],[`infin`,`\u221E`],[`ang`,`\u2220`],[`and`,`\u2227`],[`or`,`\u2228`],[`cap`,`\u2229`],[`cup`,`\u222A`],[`int`,`\u222B`],[`there4`,`\u2234`],[`sim`,`\u223C`],[`cong`,`\u2245`],[`asymp`,`\u2248`],[`ne`,`\u2260`],[`equiv`,`\u2261`],[`le`,`\u2264`],[`ge`,`\u2265`],[`sub`,`\u2282`],[`sup`,`\u2283`],[`nsub`,`\u2284`],[`sube`,`\u2286`],[`supe`,`\u2287`],[`oplus`,`\u2295`],[`otimes`,`\u2297`],[`perp`,`\u22A5`],[`sdot`,`\u22C5`],[`lceil`,`\u2308`],[`rceil`,`\u2309`],[`lfloor`,`\u230A`],[`rfloor`,`\u230B`],[`lang`,`\u2329`],[`rang`,`\u232A`],[`loz`,`\u25CA`],[`spades`,`\u2660`],[`clubs`,`\u2663`],[`hearts`,`\u2665`],[`diams`,`\u2666`]]);function Px(e){let[t,n]=Fx(e.jsxPragma||`React.createElement`),[r,i]=Fx(e.jsxFragmentPragma||`React.Fragment`);return{base:t,suffix:n,fragmentBase:r,fragmentSuffix:i}}function Fx(e){let t=e.indexOf(`.`);return t===-1&&(t=e.length),[e.slice(0,t),e.slice(t)]}var Ix=class{getPrefixCode(){return``}getHoistedCode(){return``}getSuffixCode(){return``}},Lx=class e extends Ix{__init(){this.lastLineNumber=1}__init2(){this.lastIndex=0}__init3(){this.filenameVarName=null}__init4(){this.esmAutomaticImportNameResolutions={}}__init5(){this.cjsAutomaticModuleNameResolutions={}}constructor(t,n,r,i,a){super(),this.rootTransformer=t,this.tokens=n,this.importProcessor=r,this.nameManager=i,this.options=a,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this),this.jsxPragmaInfo=Px(a),this.isAutomaticRuntime=a.jsxRuntime===`automatic`,this.jsxImportSource=a.jsxImportSource||`react`}process(){return this.tokens.matches1(U.jsxTagStart)?(this.processJSXTag(),!0):!1}getPrefixCode(){let e=``;if(this.filenameVarName&&(e+=`const ${this.filenameVarName} = ${JSON.stringify(this.options.filePath||``)};`),this.isAutomaticRuntime)if(this.importProcessor)for(let[t,n]of Object.entries(this.cjsAutomaticModuleNameResolutions))e+=`var ${n} = require("${t}");`;else{let{createElement:t,...n}=this.esmAutomaticImportNameResolutions;t&&(e+=`import {createElement as ${t}} from "${this.jsxImportSource}";`);let r=Object.entries(n).map(([e,t])=>`${e} as ${t}`).join(`, `);if(r){let t=this.jsxImportSource+(this.options.production?`/jsx-runtime`:`/jsx-dev-runtime`);e+=`import {${r}} from "${t}";`}}return e}processJSXTag(){let{jsxRole:e,start:t}=this.tokens.currentToken(),n=this.options.production?null:this.getElementLocationCode(t);this.isAutomaticRuntime&&e!==Bb.KeyAfterPropSpread?this.transformTagToJSXFunc(n,e):this.transformTagToCreateElement(n)}getElementLocationCode(e){return`lineNumber: ${this.getLineNumberForIndex(e)}`}getLineNumberForIndex(e){let t=this.tokens.code;for(;this.lastIndex<e&&this.lastIndex<t.length;)t[this.lastIndex]===`\n`&&this.lastLineNumber++,this.lastIndex++;return this.lastLineNumber}transformTagToJSXFunc(e,t){let n=t===Bb.StaticChildren;this.tokens.replaceToken(this.getJSXFuncInvocationCode(n));let r=null;if(this.tokens.matches1(U.jsxTagEnd))this.tokens.replaceToken(`${this.getFragmentCode()}, {`),this.processAutomaticChildrenAndEndProps(t);else{if(this.processTagIntro(),this.tokens.appendCode(`, {`),r=this.processProps(!0),this.tokens.matches2(U.slash,U.jsxTagEnd))this.tokens.appendCode(`}`);else if(this.tokens.matches1(U.jsxTagEnd))this.tokens.removeToken(),this.processAutomaticChildrenAndEndProps(t);else throw Error(`Expected either /> or > at the end of the tag.`);r&&this.tokens.appendCode(`, ${r}`)}for(this.options.production||(r===null&&this.tokens.appendCode(`, void 0`),this.tokens.appendCode(`, ${n}, ${this.getDevSource(e)}, this`)),this.tokens.removeInitialToken();!this.tokens.matches1(U.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(`)`)}transformTagToCreateElement(e){if(this.tokens.replaceToken(this.getCreateElementInvocationCode()),this.tokens.matches1(U.jsxTagEnd))this.tokens.replaceToken(`${this.getFragmentCode()}, null`),this.processChildren(!0);else if(this.processTagIntro(),this.processPropsObjectWithDevInfo(e),!this.tokens.matches2(U.slash,U.jsxTagEnd))if(this.tokens.matches1(U.jsxTagEnd))this.tokens.removeToken(),this.processChildren(!0);else throw Error(`Expected either /> or > at the end of the tag.`);for(this.tokens.removeInitialToken();!this.tokens.matches1(U.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(`)`)}getJSXFuncInvocationCode(e){return this.options.production?e?this.claimAutoImportedFuncInvocation(`jsxs`,`/jsx-runtime`):this.claimAutoImportedFuncInvocation(`jsx`,`/jsx-runtime`):this.claimAutoImportedFuncInvocation(`jsxDEV`,`/jsx-dev-runtime`)}getCreateElementInvocationCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedFuncInvocation(`createElement`,``);{let{jsxPragmaInfo:e}=this;return`${this.importProcessor&&this.importProcessor.getIdentifierReplacement(e.base)||e.base}${e.suffix}(`}}getFragmentCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedName(`Fragment`,this.options.production?`/jsx-runtime`:`/jsx-dev-runtime`);{let{jsxPragmaInfo:e}=this;return(this.importProcessor&&this.importProcessor.getIdentifierReplacement(e.fragmentBase)||e.fragmentBase)+e.fragmentSuffix}}claimAutoImportedFuncInvocation(e,t){let n=this.claimAutoImportedName(e,t);return this.importProcessor?`${n}.call(void 0, `:`${n}(`}claimAutoImportedName(e,t){if(this.importProcessor){let n=this.jsxImportSource+t;return this.cjsAutomaticModuleNameResolutions[n]||(this.cjsAutomaticModuleNameResolutions[n]=this.importProcessor.getFreeIdentifierForPath(n)),`${this.cjsAutomaticModuleNameResolutions[n]}.${e}`}else return this.esmAutomaticImportNameResolutions[e]||(this.esmAutomaticImportNameResolutions[e]=this.nameManager.claimFreeName(`_${e}`)),this.esmAutomaticImportNameResolutions[e]}processTagIntro(){let e=this.tokens.currentIndex()+1;for(;this.tokens.tokens[e].isType||!this.tokens.matches2AtIndex(e-1,U.jsxName,U.jsxName)&&!this.tokens.matches2AtIndex(e-1,U.greaterThan,U.jsxName)&&!this.tokens.matches1AtIndex(e,U.braceL)&&!this.tokens.matches1AtIndex(e,U.jsxTagEnd)&&!this.tokens.matches2AtIndex(e,U.slash,U.jsxTagEnd);)e++;if(e===this.tokens.currentIndex()+1){let e=this.tokens.identifierName();Rx(e)&&this.tokens.replaceToken(`\'${e}\'`)}for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken()}processPropsObjectWithDevInfo(e){let t=this.options.production?``:`__self: this, __source: ${this.getDevSource(e)}`;if(!this.tokens.matches1(U.jsxName)&&!this.tokens.matches1(U.braceL)){t?this.tokens.appendCode(`, {${t}}`):this.tokens.appendCode(`, null`);return}this.tokens.appendCode(`, {`),this.processProps(!1),t?this.tokens.appendCode(` ${t}}`):this.tokens.appendCode(`}`)}processProps(e){let t=null;for(;;){if(this.tokens.matches2(U.jsxName,U.eq)){let n=this.tokens.identifierName();if(e&&n===`key`){t!==null&&this.tokens.appendCode(t.replace(/[^\\n]/g,``)),this.tokens.removeToken(),this.tokens.removeToken();let e=this.tokens.snapshot();this.processPropValue(),t=this.tokens.dangerouslyGetAndRemoveCodeSinceSnapshot(e);continue}else this.processPropName(n),this.tokens.replaceToken(`: `),this.processPropValue()}else if(this.tokens.matches1(U.jsxName)){let e=this.tokens.identifierName();this.processPropName(e),this.tokens.appendCode(`: true`)}else if(this.tokens.matches1(U.braceL))this.tokens.replaceToken(``),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken(``);else break;this.tokens.appendCode(`,`)}return t}processPropName(e){e.includes(`-`)?this.tokens.replaceToken(`\'${e}\'`):this.tokens.copyToken()}processPropValue(){this.tokens.matches1(U.braceL)?(this.tokens.replaceToken(``),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken(``)):this.tokens.matches1(U.jsxTagStart)?this.processJSXTag():this.processStringPropValue()}processStringPropValue(){let e=this.tokens.currentToken(),t=this.tokens.code.slice(e.start+1,e.end-1),n=Bx(t),r=Vx(t);this.tokens.replaceToken(r+n)}processAutomaticChildrenAndEndProps(e){e===Bb.StaticChildren?(this.tokens.appendCode(` children: [`),this.processChildren(!1),this.tokens.appendCode(`]}`)):(e===Bb.OneChild&&this.tokens.appendCode(` children: `),this.processChildren(!1),this.tokens.appendCode(`}`))}processChildren(e){let t=e;for(;;){if(this.tokens.matches2(U.jsxTagStart,U.slash))return;let e=!1;if(this.tokens.matches1(U.braceL))this.tokens.matches2(U.braceL,U.braceR)?(this.tokens.replaceToken(``),this.tokens.replaceToken(``)):(this.tokens.replaceToken(t?`, `:``),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken(``),e=!0);else if(this.tokens.matches1(U.jsxTagStart))this.tokens.appendCode(t?`, `:``),this.processJSXTag(),e=!0;else if(this.tokens.matches1(U.jsxText)||this.tokens.matches1(U.jsxEmptyText))e=this.processChildTextElement(t);else throw Error(`Unexpected token when processing JSX children.`);e&&(t=!0)}}processChildTextElement(e){let t=this.tokens.currentToken(),n=this.tokens.code.slice(t.start,t.end),r=Bx(n),i=zx(n);return i===`""`?(this.tokens.replaceToken(r),!1):(this.tokens.replaceToken(`${e?`, `:``}${i}${r}`),!0)}getDevSource(e){return`{fileName: ${this.getFilenameVarName()}, ${e}}`}getFilenameVarName(){return this.filenameVarName||=this.nameManager.claimFreeName(`_jsxFileName`),this.filenameVarName}};function Rx(e){let t=e.charCodeAt(0);return t>=W.lowercaseA&&t<=W.lowercaseZ}function zx(e){let t=``,n=``,r=!1,i=!1;for(let a=0;a<e.length;a++){let o=e[a];if(o===` `||o===` `||o===`\\r`)r||(n+=o);else if(o===`\n`)n=``,r=!0;else{if(i&&r&&(t+=` `),t+=n,n=``,o===`&`){let{entity:n,newI:r}=Hx(e,a+1);a=r-1,t+=n}else t+=o;i=!0,r=!1}}return r||(t+=n),JSON.stringify(t)}function Bx(e){let t=0,n=0;for(let r of e)r===`\n`?(t++,n=0):r===` `&&n++;return`\n`.repeat(t)+` `.repeat(n)}function Vx(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(r===`\n`)if(/\\s/.test(e[n+1]))for(t+=` `;n<e.length&&/\\s/.test(e[n+1]);)n++;else t+=`\n`;else if(r===`&`){let{entity:r,newI:i}=Hx(e,n+1);t+=r,n=i-1}else t+=r}return JSON.stringify(t)}function Hx(e,t){let n=``,r=0,i,a=t;if(e[a]===`#`){let t=10;a++;let n;if(e[a]===`x`)for(t=16,a++,n=a;a<e.length&&Wx(e.charCodeAt(a));)a++;else for(n=a;a<e.length&&Ux(e.charCodeAt(a));)a++;if(e[a]===`;`){let r=e.slice(n,a);r&&(a++,i=String.fromCodePoint(parseInt(r,t)))}}else for(;a<e.length&&r++<10;){let t=e[a];if(a++,t===`;`){i=Nx.get(n);break}n+=t}return i?{entity:i,newI:a}:{entity:`&`,newI:t}}function Ux(e){return e>=W.digit0&&e<=W.digit9}function Wx(e){return e>=W.digit0&&e<=W.digit9||e>=W.lowercaseA&&e<=W.lowercaseF||e>=W.uppercaseA&&e<=W.uppercaseF}function Gx(e,t){let n=Px(t),r=new Set;for(let t=0;t<e.tokens.length;t++){let i=e.tokens[t];i.type===U.name&&!i.isType&&(i.identifierRole===Y.Access||i.identifierRole===Y.ObjectShorthand||i.identifierRole===Y.ExportAccess)&&!i.shadowsGlobal&&r.add(e.identifierNameForToken(i)),i.type===U.jsxTagStart&&r.add(n.base),i.type===U.jsxTagStart&&t+1<e.tokens.length&&e.tokens[t+1].type===U.jsxTagEnd&&(r.add(n.base),r.add(n.fragmentBase)),i.type===U.jsxName&&i.identifierRole===Y.Access&&(!Rx(e.identifierNameForToken(i))||e.tokens[t+1].type===U.dot)&&r.add(e.identifierNameForToken(i))}return r}var Kx=class e{__init(){this.nonTypeIdentifiers=new Set}__init2(){this.importInfoByPath=new Map}__init3(){this.importsToReplace=new Map}__init4(){this.identifierReplacements=new Map}__init5(){this.exportBindingsByLocalName=new Map}constructor(t,n,r,i,a,o,s){this.nameManager=t,this.tokens=n,this.enableLegacyTypeScriptModuleInterop=r,this.options=i,this.isTypeScriptTransformEnabled=a,this.keepUnusedImports=o,this.helperManager=s,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this)}preprocessTokens(){for(let e=0;e<this.tokens.tokens.length;e++)this.tokens.matches1AtIndex(e,U._import)&&!this.tokens.matches3AtIndex(e,U._import,U.name,U.eq)&&this.preprocessImportAtIndex(e),this.tokens.matches1AtIndex(e,U._export)&&!this.tokens.matches2AtIndex(e,U._export,U.eq)&&this.preprocessExportAtIndex(e);this.generateImportReplacements()}pruneTypeOnlyImports(){this.nonTypeIdentifiers=Gx(this.tokens,this.options);for(let[e,t]of this.importInfoByPath.entries())t.hasBareImport||t.hasStarExport||t.exportStarNames.length>0||t.namedExports.length>0||[...t.defaultNames,...t.wildcardNames,...t.namedImports.map(({localName:e})=>e)].every(e=>this.shouldAutomaticallyElideImportedName(e))&&this.importsToReplace.set(e,``)}shouldAutomaticallyElideImportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.nonTypeIdentifiers.has(e)}generateImportReplacements(){for(let[e,t]of this.importInfoByPath.entries()){let{defaultNames:n,wildcardNames:r,namedImports:i,namedExports:a,exportStarNames:o,hasStarExport:s}=t;if(n.length===0&&r.length===0&&i.length===0&&a.length===0&&o.length===0&&!s){this.importsToReplace.set(e,`require(\'${e}\');`);continue}let c=this.getFreeIdentifierForPath(e),l;l=this.enableLegacyTypeScriptModuleInterop?c:r.length>0?r[0]:this.getFreeIdentifierForPath(e);let u=`var ${c} = require(\'${e}\');`;if(r.length>0)for(let e of r){let t=this.enableLegacyTypeScriptModuleInterop?c:`${this.helperManager.getHelperName(`interopRequireWildcard`)}(${c})`;u+=` var ${e} = ${t};`}else o.length>0&&l!==c?u+=` var ${l} = ${this.helperManager.getHelperName(`interopRequireWildcard`)}(${c});`:n.length>0&&l!==c&&(u+=` var ${l} = ${this.helperManager.getHelperName(`interopRequireDefault`)}(${c});`);for(let{importedName:e,localName:t}of a)u+=` ${this.helperManager.getHelperName(`createNamedExportFrom`)}(${c}, \'${t}\', \'${e}\');`;for(let e of o)u+=` exports.${e} = ${l};`;s&&(u+=` ${this.helperManager.getHelperName(`createStarExport`)}(${c});`),this.importsToReplace.set(e,u);for(let e of n)this.identifierReplacements.set(e,`${l}.default`);for(let{importedName:e,localName:t}of i)this.identifierReplacements.set(t,`${c}.${e}`)}}getFreeIdentifierForPath(e){let t=e.split(`/`),n=t[t.length-1].replace(/\\W/g,``);return this.nameManager.claimFreeName(`_${n}`)}preprocessImportAtIndex(e){let t=[],n=[],r=[];if(e++,(this.tokens.matchesContextualAtIndex(e,H._type)||this.tokens.matches1AtIndex(e,U._typeof))&&!this.tokens.matches1AtIndex(e+1,U.comma)&&!this.tokens.matchesContextualAtIndex(e+1,H._from)||this.tokens.matches1AtIndex(e,U.parenL))return;if(this.tokens.matches1AtIndex(e,U.name)&&(t.push(this.tokens.identifierNameAtIndex(e)),e++,this.tokens.matches1AtIndex(e,U.comma)&&e++),this.tokens.matches1AtIndex(e,U.star)&&(e+=2,n.push(this.tokens.identifierNameAtIndex(e)),e++),this.tokens.matches1AtIndex(e,U.braceL)){let n=this.getNamedImports(e+1);e=n.newIndex;for(let e of n.namedImports)e.importedName==="default"?t.push(e.localName):r.push(e)}if(this.tokens.matchesContextualAtIndex(e,H._from)&&e++,!this.tokens.matches1AtIndex(e,U.string))throw Error(`Expected string token at the end of import statement.`);let i=this.tokens.stringValueAtIndex(e),a=this.getImportInfo(i);a.defaultNames.push(...t),a.wildcardNames.push(...n),a.namedImports.push(...r),t.length===0&&n.length===0&&r.length===0&&(a.hasBareImport=!0)}preprocessExportAtIndex(e){if(this.tokens.matches2AtIndex(e,U._export,U._var)||this.tokens.matches2AtIndex(e,U._export,U._let)||this.tokens.matches2AtIndex(e,U._export,U._const))this.preprocessVarExportAtIndex(e);else if(this.tokens.matches2AtIndex(e,U._export,U._function)||this.tokens.matches2AtIndex(e,U._export,U._class)){let t=this.tokens.identifierNameAtIndex(e+2);this.addExportBinding(t,t)}else if(this.tokens.matches3AtIndex(e,U._export,U.name,U._function)){let t=this.tokens.identifierNameAtIndex(e+3);this.addExportBinding(t,t)}else this.tokens.matches2AtIndex(e,U._export,U.braceL)?this.preprocessNamedExportAtIndex(e):this.tokens.matches2AtIndex(e,U._export,U.star)&&this.preprocessExportStarAtIndex(e)}preprocessVarExportAtIndex(e){let t=0;for(let n=e+2;;n++)if(this.tokens.matches1AtIndex(n,U.braceL)||this.tokens.matches1AtIndex(n,U.dollarBraceL)||this.tokens.matches1AtIndex(n,U.bracketL))t++;else if(this.tokens.matches1AtIndex(n,U.braceR)||this.tokens.matches1AtIndex(n,U.bracketR))t--;else if(t===0&&!this.tokens.matches1AtIndex(n,U.name))break;else if(this.tokens.matches1AtIndex(1,U.eq)){let e=this.tokens.currentToken().rhsEndIndex;if(e==null)throw Error(`Expected = token with an end index.`);n=e-1}else{let e=this.tokens.tokens[n];if(Vb(e)){let e=this.tokens.identifierNameAtIndex(n);this.identifierReplacements.set(e,`exports.${e}`)}}}preprocessNamedExportAtIndex(e){e+=2;let{newIndex:t,namedImports:n}=this.getNamedImports(e);if(e=t,this.tokens.matchesContextualAtIndex(e,H._from))e++;else{for(let{importedName:e,localName:t}of n)this.addExportBinding(e,t);return}if(!this.tokens.matches1AtIndex(e,U.string))throw Error(`Expected string token at the end of import statement.`);let r=this.tokens.stringValueAtIndex(e);this.getImportInfo(r).namedExports.push(...n)}preprocessExportStarAtIndex(e){let t=null;if(this.tokens.matches3AtIndex(e,U._export,U.star,U._as)?(e+=3,t=this.tokens.identifierNameAtIndex(e),e+=2):e+=3,!this.tokens.matches1AtIndex(e,U.string))throw Error(`Expected string token at the end of star export statement.`);let n=this.tokens.stringValueAtIndex(e),r=this.getImportInfo(n);t===null?r.hasStarExport=!0:r.exportStarNames.push(t)}getNamedImports(e){let t=[];for(;;){if(this.tokens.matches1AtIndex(e,U.braceR)){e++;break}let n=jx(this.tokens,e);if(e=n.endIndex,n.isType||t.push({importedName:n.leftName,localName:n.rightName}),this.tokens.matches2AtIndex(e,U.comma,U.braceR)){e+=2;break}else if(this.tokens.matches1AtIndex(e,U.braceR)){e++;break}else if(this.tokens.matches1AtIndex(e,U.comma))e++;else throw Error(`Unexpected token: ${JSON.stringify(this.tokens.tokens[e])}`)}return{newIndex:e,namedImports:t}}getImportInfo(e){let t=this.importInfoByPath.get(e);if(t)return t;let n={defaultNames:[],wildcardNames:[],namedImports:[],namedExports:[],hasBareImport:!1,exportStarNames:[],hasStarExport:!1};return this.importInfoByPath.set(e,n),n}addExportBinding(e,t){this.exportBindingsByLocalName.has(e)||this.exportBindingsByLocalName.set(e,[]),this.exportBindingsByLocalName.get(e).push(t)}claimImportCode(e){let t=this.importsToReplace.get(e);return this.importsToReplace.set(e,``),t||``}getIdentifierReplacement(e){return this.identifierReplacements.get(e)||null}resolveExportBinding(e){let t=this.exportBindingsByLocalName.get(e);return!t||t.length===0?null:t.map(e=>`exports.${e}`).join(` = `)}getGlobalNames(){return new Set([...this.identifierReplacements.keys(),...this.exportBindingsByLocalName.keys()])}},qx=44,Jx=59,Yx=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,Xx=new Uint8Array(64),Zx=new Uint8Array(128);for(let e=0;e<Yx.length;e++){let t=Yx.charCodeAt(e);Xx[e]=t,Zx[t]=e}function Qx(e,t){do{let n=t&31;t>>>=5,t>0&&(n|=32),e.write(Xx[n])}while(t>0)}function $x(e){return e<0?-e<<1|1:e<<1}var eS=1024*16,tS=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}},nS=class{constructor(){this.pos=0,this.out=``,this.buffer=new Uint8Array(eS)}write(e){let{buffer:t}=this;t[this.pos++]=e,this.pos===eS&&(this.out+=tS.decode(t),this.pos=0)}flush(){let{buffer:e,out:t,pos:n}=this;return n>0?t+tS.decode(e.subarray(0,n)):t}};function rS(e){let t=new nS,n=0,r=0,i=0,a=0;for(let o=0;o<e.length;o++){let s=e[o];if(o>0&&t.write(Jx),s.length===0)continue;let c=0;for(let e=0;e<s.length;e++){let o=s[e];e>0&&t.write(qx),Qx(t,$x(o[0]-c)),c=o[0],o.length!==1&&(Qx(t,$x(o[1]-n)),Qx(t,$x(o[2]-r)),Qx(t,$x(o[3]-i)),n=o[1],r=o[2],i=o[3],o.length!==4&&(Qx(t,$x(o[4]-a)),a=o[4]))}}return t.flush()}o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self,n.resolveURI=r())})(e,(function(){let e=/^[\\w+.-]+:\\/\\//,t=/^([\\w+.-]+:)\\/\\/([^@/#?]*@)?(\\[[^\\]]+\\]|[^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/,n=/^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;function r(t){return e.test(t)}function i(e){return e.startsWith(`//`)}function a(e){return e.startsWith(`/`)}function o(e){return e.startsWith(`file:`)}function s(e){return/^[.?#]/.test(e)}function c(e){let n=t.exec(e);return u(n[1],n[2]||``,n[3],n[4]||``,n[5]||`/`,n[6]||``,n[7]||``)}function l(e){let t=n.exec(e),r=t[2];return u(`file:`,``,t[1]||``,``,a(r)?r:`/`+r,t[3]||``,t[4]||``)}function u(e,t,n,r,i,a,o){return{scheme:e,user:t,host:n,port:r,path:i,query:a,hash:o,type:7}}function d(e){if(i(e)){let t=c(`http:`+e);return t.scheme=``,t.type=6,t}if(a(e)){let t=c(`http://foo.com`+e);return t.scheme=``,t.host=``,t.type=5,t}if(o(e))return l(e);if(r(e))return c(e);let t=c(`http://foo.com/`+e);return t.scheme=``,t.host=``,t.type=e?e.startsWith(`?`)?3:e.startsWith(`#`)?2:4:1,t}function f(e){if(e.endsWith(`/..`))return e;let t=e.lastIndexOf(`/`);return e.slice(0,t+1)}function p(e,t){m(t,t.type),e.path===`/`?e.path=t.path:e.path=f(t.path)+e.path}function m(e,t){let n=t<=4,r=e.path.split(`/`),i=1,a=0,o=!1;for(let e=1;e<r.length;e++){let t=r[e];if(!t){o=!0;continue}if(o=!1,t!==`.`){if(t===`..`){a?(o=!0,a--,i--):n&&(r[i++]=t);continue}r[i++]=t,a++}}let s=``;for(let e=1;e<i;e++)s+=`/`+r[e];(!s||o&&!s.endsWith(`/..`))&&(s+=`/`),e.path=s}function h(e,t){if(!e&&!t)return``;let n=d(e),r=n.type;if(t&&r!==7){let e=d(t),i=e.type;switch(r){case 1:n.hash=e.hash;case 2:n.query=e.query;case 3:case 4:p(n,e);case 5:n.user=e.user,n.host=e.host,n.port=e.port;case 6:n.scheme=e.scheme}i>r&&(r=i)}m(n,r);let i=n.query+n.hash;switch(r){case 2:case 3:return i;case 4:{let r=n.path.slice(1);return r?s(t||e)&&!s(r)?`./`+r+i:r+i:i||`.`}case 5:return n.path+i;default:return n.scheme+`//`+n.user+n.host+n.port+n.path+i}}return h}))}))();var iS=class{constructor(){this._indexes={__proto__:null},this.array=[]}};function aS(e){return e}function oS(e,t){return aS(e)._indexes[t]}function sS(e,t){let n=oS(e,t);if(n!==void 0)return n;let{array:r,_indexes:i}=aS(e);return i[t]=r.push(t)-1}var cS=0,lS=1,uS=2,dS=3,fS=4,pS=-1,mS=class{constructor({file:e,sourceRoot:t}={}){this._names=new iS,this._sources=new iS,this._sourcesContent=[],this._mappings=[],this.file=e,this.sourceRoot=t,this._ignoreList=new iS}};function hS(e){return e}var gS=(e,t,n,r,i,a,o,s)=>yS(!0,e,t,n,r,i,a,o,s);function _S(e){let{_mappings:t,_sources:n,_sourcesContent:r,_names:i,_ignoreList:a}=hS(e);return CS(t),{version:3,file:e.file||void 0,names:i.array,sourceRoot:e.sourceRoot||void 0,sources:n.array,sourcesContent:r,mappings:t,ignoreList:a.array}}function vS(e){let t=_S(e);return Object.assign({},t,{mappings:rS(t.mappings)})}function yS(e,t,n,r,i,a,o,s,c){let{_mappings:l,_sources:u,_sourcesContent:d,_names:f}=hS(t),p=bS(l,n),m=xS(p,r);if(!i)return e&&wS(p,m)?void 0:SS(p,m,[r]);let h=sS(u,i),g=s?sS(f,s):pS;if(h===d.length&&(d[h]=c??null),!(e&&TS(p,m,h,a,o,g)))return SS(p,m,s?[r,h,a,o,g]:[r,h,a,o])}function bS(e,t){for(let n=e.length;n<=t;n++)e[n]=[];return e[t]}function xS(e,t){let n=e.length;for(let r=n-1;r>=0&&!(t>=e[r][cS]);n=r--);return n}function SS(e,t,n){for(let n=e.length;n>t;n--)e[n]=e[n-1];e[t]=n}function CS(e){let{length:t}=e,n=t;for(let t=n-1;t>=0&&!(e[t].length>0);n=t,t--);n<t&&(e.length=n)}function wS(e,t){return t===0||e[t-1].length===1}function TS(e,t,n,r,i,a){if(t===0)return!1;let o=e[t-1];return o.length!==1&&n===o[lS]&&r===o[uS]&&i===o[dS]&&a===(o.length===5?o[fS]:pS)}function ES({code:e,mappings:t},n,r,i,a){let o=DS(i,a),s=new mS({file:r.compiledFilename}),c=0,l=t[0];for(;l===void 0&&c<t.length-1;)c++,l=t[c];let u=0,d=0;l!==d&&gS(s,u,0,n,u,0);for(let r=0;r<e.length;r++){if(r===l){let e=l-d,i=o[c];for(gS(s,u,e,n,u,i);(l===r||l===void 0)&&c<t.length-1;)c++,l=t[c]}e.charCodeAt(r)===W.lineFeed&&(u++,d=r+1,l!==d&&gS(s,u,0,n,u,0))}let{sourceRoot:f,sourcesContent:p,...m}=vS(s);return m}function DS(e,t){let n=Array(t.length),r=0,i=t[r].start,a=0;for(let o=0;o<e.length;o++)o===i&&(n[r]=i-a,r++,i=t[r].start),e.charCodeAt(o)===W.lineFeed&&(a=o+1);return n}var OS={require:`\n import {createRequire as CREATE_REQUIRE_NAME} from "module";\n const require = CREATE_REQUIRE_NAME(import.meta.url);\n `,interopRequireWildcard:`\n function interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n newObj[key] = obj[key];\n }\n }\n }\n newObj.default = obj;\n return newObj;\n }\n }\n `,interopRequireDefault:`\n function interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n }\n `,createNamedExportFrom:`\n function createNamedExportFrom(obj, localName, importedName) {\n Object.defineProperty(exports, localName, {enumerable: true, configurable: true, get: () => obj[importedName]});\n }\n `,createStarExport:`\n function createStarExport(obj) {\n Object.keys(obj)\n .filter((key) => key !== "default" && key !== "__esModule")\n .forEach((key) => {\n if (exports.hasOwnProperty(key)) {\n return;\n }\n Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]});\n });\n }\n `,nullishCoalesce:`\n function nullishCoalesce(lhs, rhsFn) {\n if (lhs != null) {\n return lhs;\n } else {\n return rhsFn();\n }\n }\n `,asyncNullishCoalesce:`\n async function asyncNullishCoalesce(lhs, rhsFn) {\n if (lhs != null) {\n return lhs;\n } else {\n return await rhsFn();\n }\n }\n `,optionalChain:`\n function optionalChain(ops) {\n let lastAccessLHS = undefined;\n let value = ops[0];\n let i = 1;\n while (i < ops.length) {\n const op = ops[i];\n const fn = ops[i + 1];\n i += 2;\n if ((op === \'optionalAccess\' || op === \'optionalCall\') && value == null) {\n return undefined;\n }\n if (op === \'access\' || op === \'optionalAccess\') {\n lastAccessLHS = value;\n value = fn(value);\n } else if (op === \'call\' || op === \'optionalCall\') {\n value = fn((...args) => value.call(lastAccessLHS, ...args));\n lastAccessLHS = undefined;\n }\n }\n return value;\n }\n `,asyncOptionalChain:`\n async function asyncOptionalChain(ops) {\n let lastAccessLHS = undefined;\n let value = ops[0];\n let i = 1;\n while (i < ops.length) {\n const op = ops[i];\n const fn = ops[i + 1];\n i += 2;\n if ((op === \'optionalAccess\' || op === \'optionalCall\') && value == null) {\n return undefined;\n }\n if (op === \'access\' || op === \'optionalAccess\') {\n lastAccessLHS = value;\n value = await fn(value);\n } else if (op === \'call\' || op === \'optionalCall\') {\n value = await fn((...args) => value.call(lastAccessLHS, ...args));\n lastAccessLHS = undefined;\n }\n }\n return value;\n }\n `,optionalChainDelete:`\n function optionalChainDelete(ops) {\n const result = OPTIONAL_CHAIN_NAME(ops);\n return result == null ? true : result;\n }\n `,asyncOptionalChainDelete:`\n async function asyncOptionalChainDelete(ops) {\n const result = await ASYNC_OPTIONAL_CHAIN_NAME(ops);\n return result == null ? true : result;\n }\n `},kS=class e{__init(){this.helperNames={}}__init2(){this.createRequireName=null}constructor(t){this.nameManager=t,e.prototype.__init.call(this),e.prototype.__init2.call(this)}getHelperName(e){let t=this.helperNames[e];return t||(t=this.nameManager.claimFreeName(`_${e}`),this.helperNames[e]=t,t)}emitHelpers(){let e=``;this.helperNames.optionalChainDelete&&this.getHelperName(`optionalChain`),this.helperNames.asyncOptionalChainDelete&&this.getHelperName(`asyncOptionalChain`);for(let[t,n]of Object.entries(OS)){let r=this.helperNames[t],i=n;t===`optionalChainDelete`?i=i.replace(`OPTIONAL_CHAIN_NAME`,this.helperNames.optionalChain):t===`asyncOptionalChainDelete`?i=i.replace(`ASYNC_OPTIONAL_CHAIN_NAME`,this.helperNames.asyncOptionalChain):t===`require`&&(this.createRequireName===null&&(this.createRequireName=this.nameManager.claimFreeName(`_createRequire`)),i=i.replace(/CREATE_REQUIRE_NAME/g,this.createRequireName)),r&&(e+=` `,e+=i.replace(t,r).replace(/\\s+/g,` `).trim())}return e}};function AS(e,t,n){jS(e,n)&&MS(e,t,n)}function jS(e,t){for(let n of e.tokens)if(n.type===U.name&&!n.isType&&Hb(n)&&t.has(e.identifierNameForToken(n)))return!0;return!1}function MS(e,t,n){let r=[],i=t.length-1;for(let a=e.tokens.length-1;;a--){for(;r.length>0&&r[r.length-1].startTokenIndex===a+1;)r.pop();for(;i>=0&&t[i].endTokenIndex===a+1;)r.push(t[i]),i--;if(a<0)break;let o=e.tokens[a],s=e.identifierNameForToken(o);if(r.length>1&&!o.isType&&o.type===U.name&&n.has(s)){if(Wb(o))NS(r[r.length-1],e,s);else if(Gb(o)){let t=r.length-1;for(;t>0&&!r[t].isFunctionScope;)t--;if(t<0)throw Error(`Did not find parent function scope.`);NS(r[t],e,s)}}}if(r.length>0)throw Error(`Expected empty scope stack after processing file.`)}function NS(e,t,n){for(let r=e.startTokenIndex;r<e.endTokenIndex;r++){let e=t.tokens[r];(e.type===U.name||e.type===U.jsxName)&&t.identifierNameForToken(e)===n&&(e.shadowsGlobal=!0)}}function PS(e,t){let n=[];for(let r of t)r.type===U.name&&n.push(e.slice(r.start,r.end));return n}var FS=class e{__init(){this.usedNames=new Set}constructor(t,n){e.prototype.__init.call(this),this.usedNames=new Set(PS(t,n))}claimFreeName(e){let t=this.findFreeName(e);return this.usedNames.add(t),t}findFreeName(e){if(!this.usedNames.has(e))return e;let t=2;for(;this.usedNames.has(e+String(t));)t++;return e+String(t)}},IS=o((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.DetailContext=e.NoopContext=e.VError=void 0;var n=function(e){t(n,e);function n(t,r){var i=e.call(this,r)||this;return i.path=t,Object.setPrototypeOf(i,n.prototype),i}return n}(Error);e.VError=n,e.NoopContext=function(){function e(){}return e.prototype.fail=function(e,t,n){return!1},e.prototype.unionResolver=function(){return this},e.prototype.createContext=function(){return this},e.prototype.resolveUnion=function(e){},e}();var r=function(){function e(){this._propNames=[``],this._messages=[null],this._score=0}return e.prototype.fail=function(e,t,n){return this._propNames.push(e),this._messages.push(t),this._score+=n,!1},e.prototype.unionResolver=function(){return new i},e.prototype.resolveUnion=function(e){for(var t,n,r=e,i=null,a=0,o=r.contexts;a<o.length;a++){var s=o[a];(!i||s._score>=i._score)&&(i=s)}i&&i._score>0&&((t=this._propNames).push.apply(t,i._propNames),(n=this._messages).push.apply(n,i._messages))},e.prototype.getError=function(e){for(var t=[],r=this._propNames.length-1;r>=0;r--){var i=this._propNames[r];e+=typeof i==`number`?`[`+i+`]`:i?`.`+i:``;var a=this._messages[r];a&&t.push(e+` `+a)}return new n(e,t.join(`; `))},e.prototype.getErrorDetail=function(e){for(var t=[],n=this._propNames.length-1;n>=0;n--){var r=this._propNames[n];e+=typeof r==`number`?`[`+r+`]`:r?`.`+r:``;var i=this._messages[n];i&&t.push({path:e,message:i})}for(var a=null,n=t.length-1;n>=0;n--)a&&(t[n].nested=[a]),a=t[n];return a},e}();e.DetailContext=r;var i=function(){function e(){this.contexts=[]}return e.prototype.createContext=function(){var e=new r;return this.contexts.push(e),e},e}()})),LS=o((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.basicTypes=e.BasicType=e.TParamList=e.TParam=e.param=e.TFunc=e.func=e.TProp=e.TOptional=e.opt=e.TIface=e.iface=e.TEnumLiteral=e.enumlit=e.TEnumType=e.enumtype=e.TIntersection=e.intersection=e.TUnion=e.union=e.TTuple=e.tuple=e.TArray=e.array=e.TLiteral=e.lit=e.TName=e.name=e.TType=void 0;var n=IS(),r=function(){function e(){}return e}();e.TType=r;function i(e){return typeof e==`string`?o(e):e}function a(e,t){var n=e[t];if(!n)throw Error(`Unknown type `+t);return n}function o(e){return new s(e)}e.name=o;var s=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.name=t,n._failMsg=`is not a `+t,n}return n.prototype.getChecker=function(e,t,r){var i=this,o=a(e,this.name),s=o.getChecker(e,t,r);return o instanceof b||o instanceof n?s:function(e,t){return s(e,t)?!0:t.fail(null,i._failMsg,0)}},n}(r);e.TName=s;function c(e){return new l(e)}e.lit=c;var l=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.value=t,n.name=JSON.stringify(t),n._failMsg=`is not `+n.name,n}return n.prototype.getChecker=function(e,t){var n=this;return function(e,t){return e===n.value||t.fail(null,n._failMsg,-1)}},n}(r);e.TLiteral=l;function u(e){return new d(i(e))}e.array=u;var d=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.ttype=t,n}return n.prototype.getChecker=function(e,t){var n=this.ttype.getChecker(e,t);return function(e,t){if(!Array.isArray(e))return t.fail(null,`is not an array`,0);for(var r=0;r<e.length;r++)if(!n(e[r],t))return t.fail(r,null,1);return!0}},n}(r);e.TArray=d;function f(){return new p([...arguments].map(function(e){return i(e)}))}e.tuple=f;var p=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.ttypes=t,n}return n.prototype.getChecker=function(e,t){var n=this.ttypes.map(function(n){return n.getChecker(e,t)}),r=function(e,t){if(!Array.isArray(e))return t.fail(null,`is not an array`,0);for(var r=0;r<n.length;r++)if(!n[r](e[r],t))return t.fail(r,null,1);return!0};return t?function(e,t){return r(e,t)?e.length<=n.length||t.fail(n.length,`is extraneous`,2):!1}:r},n}(r);e.TTuple=p;function m(){return new h([...arguments].map(function(e){return i(e)}))}e.union=m;var h=function(e){t(n,e);function n(t){var n=e.call(this)||this;n.ttypes=t;var r=t.map(function(e){return e instanceof s||e instanceof l?e.name:null}).filter(function(e){return e}),i=t.length-r.length;return r.length?(i>0&&r.push(i+` more`),n._failMsg=`is none of `+r.join(`, `)):n._failMsg=`is none of `+i+` types`,n}return n.prototype.getChecker=function(e,t){var n=this,r=this.ttypes.map(function(n){return n.getChecker(e,t)});return function(e,t){for(var i=t.unionResolver(),a=0;a<r.length;a++)if(r[a](e,i.createContext()))return!0;return t.resolveUnion(i),t.fail(null,n._failMsg,0)}},n}(r);e.TUnion=h;function g(){return new _([...arguments].map(function(e){return i(e)}))}e.intersection=g;var _=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.ttypes=t,n}return n.prototype.getChecker=function(e,t){var n=new Set,r=this.ttypes.map(function(r){return r.getChecker(e,t,n)});return function(e,t){return r.every(function(n){return n(e,t)})?!0:t.fail(null,null,0)}},n}(r);e.TIntersection=_;function v(e){return new y(e)}e.enumtype=v;var y=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.members=t,n.validValues=new Set,n._failMsg=`is not a valid enum value`,n.validValues=new Set(Object.keys(t).map(function(e){return t[e]})),n}return n.prototype.getChecker=function(e,t){var n=this;return function(e,t){return n.validValues.has(e)?!0:t.fail(null,n._failMsg,0)}},n}(r);e.TEnumType=y;function ee(e,t){return new te(e,t)}e.enumlit=ee;var te=function(e){t(n,e);function n(t,n){var r=e.call(this)||this;return r.enumName=t,r.prop=n,r._failMsg=`is not `+t+`.`+n,r}return n.prototype.getChecker=function(e,t){var n=this,r=a(e,this.enumName);if(!(r instanceof y))throw Error(`Type `+this.enumName+` used in enumlit is not an enum type`);var i=r.members[this.prop];if(!r.members.hasOwnProperty(this.prop))throw Error(`Unknown value `+this.enumName+`.`+this.prop+` used in enumlit`);return function(e,t){return e===i||t.fail(null,n._failMsg,-1)}},n}(r);e.TEnumLiteral=te;function ne(e){return Object.keys(e).map(function(t){return re(t,e[t])})}function re(e,t){return t instanceof se?new ce(e,t.ttype,!0):new ce(e,i(t),!1)}function ie(e,t){return new ae(e,ne(t))}e.iface=ie;var ae=function(e){t(r,e);function r(t,n){var r=e.call(this)||this;return r.bases=t,r.props=n,r.propSet=new Set(n.map(function(e){return e.name})),r}return r.prototype.getChecker=function(e,t,r){var i=this,o=this.bases.map(function(n){return a(e,n).getChecker(e,t)}),s=this.props.map(function(n){return n.ttype.getChecker(e,t)}),c=new n.NoopContext,l=this.props.map(function(e,t){return!e.isOpt&&!s[t](void 0,c)}),u=function(e,t){if(typeof e!=`object`||!e)return t.fail(null,`is not an object`,0);for(var n=0;n<o.length;n++)if(!o[n](e,t))return!1;for(var n=0;n<s.length;n++){var r=i.props[n].name,a=e[r];if(a===void 0){if(l[n])return t.fail(r,`is missing`,1)}else if(!s[n](a,t))return t.fail(r,null,1)}return!0};if(!t)return u;var d=this.propSet;return r&&(this.propSet.forEach(function(e){return r.add(e)}),d=r),function(e,t){if(!u(e,t))return!1;for(var n in e)if(!d.has(n))return t.fail(n,`is extraneous`,2);return!0}},r}(r);e.TIface=ae;function oe(e){return new se(i(e))}e.opt=oe;var se=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.ttype=t,n}return n.prototype.getChecker=function(e,t){var n=this.ttype.getChecker(e,t);return function(e,t){return e===void 0||n(e,t)}},n}(r);e.TOptional=se;var ce=function(){function e(e,t,n){this.name=e,this.ttype=t,this.isOpt=n}return e}();e.TProp=ce;function le(e){return new ue(new pe([...arguments].slice(1)),i(e))}e.func=le;var ue=function(e){t(n,e);function n(t,n){var r=e.call(this)||this;return r.paramList=t,r.result=n,r}return n.prototype.getChecker=function(e,t){return function(e,t){return typeof e==`function`||t.fail(null,`is not a function`,0)}},n}(r);e.TFunc=ue;function de(e,t,n){return new fe(e,i(t),!!n)}e.param=de;var fe=function(){function e(e,t,n){this.name=e,this.ttype=t,this.isOpt=n}return e}();e.TParam=fe;var pe=function(e){t(r,e);function r(t){var n=e.call(this)||this;return n.params=t,n}return r.prototype.getChecker=function(e,t){var r=this,i=this.params.map(function(n){return n.ttype.getChecker(e,t)}),a=new n.NoopContext,o=this.params.map(function(e,t){return!e.isOpt&&!i[t](void 0,a)}),s=function(e,t){if(!Array.isArray(e))return t.fail(null,`is not an array`,0);for(var n=0;n<i.length;n++){var a=r.params[n];if(e[n]===void 0){if(o[n])return t.fail(a.name,`is missing`,1)}else if(!i[n](e[n],t))return t.fail(a.name,null,1)}return!0};return t?function(e,t){return s(e,t)?e.length<=i.length||t.fail(i.length,`is extraneous`,2):!1}:s},r}(r);e.TParamList=pe;var b=function(e){t(n,e);function n(t,n){var r=e.call(this)||this;return r.validator=t,r.message=n,r}return n.prototype.getChecker=function(e,t){var n=this;return function(e,t){return n.validator(e)?!0:t.fail(null,n.message,0)}},n}(r);e.BasicType=b,e.basicTypes={any:new b(function(e){return!0},`is invalid`),number:new b(function(e){return typeof e==`number`},`is not a number`),object:new b(function(e){return typeof e==`object`&&e},`is not an object`),boolean:new b(function(e){return typeof e==`boolean`},`is not a boolean`),string:new b(function(e){return typeof e==`string`},`is not a string`),symbol:new b(function(e){return typeof e==`symbol`},`is not a symbol`),void:new b(function(e){return e==null},`is not void`),undefined:new b(function(e){return e===void 0},`is not undefined`),null:new b(function(e){return e===null},`is not null`),never:new b(function(e){return!1},`is unexpected`),Date:new b(he(`[object Date]`),`is not a Date`),RegExp:new b(he(`[object RegExp]`),`is not a RegExp`)};var me=Object.prototype.toString;function he(e){return function(t){return typeof t==`object`&&t&&me.call(t)===e}}typeof Buffer<`u`&&(e.basicTypes.Buffer=new b(function(e){return Buffer.isBuffer(e)},`is not a Buffer`));for(var ge=function(t){e.basicTypes[t.name]=new b(function(e){return e instanceof t},`is not a `+t.name)},_e=0,ve=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,ArrayBuffer];_e<ve.length;_e++){var ye=ve[_e];ge(ye)}})),RS=c(o((e=>{var t=e&&e.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r};Object.defineProperty(e,"__esModule",{value:!0}),e.Checker=e.createCheckers=void 0;var n=LS(),r=IS(),i=LS();Object.defineProperty(e,"TArray",{enumerable:!0,get:function(){return i.TArray}}),Object.defineProperty(e,"TEnumType",{enumerable:!0,get:function(){return i.TEnumType}}),Object.defineProperty(e,"TEnumLiteral",{enumerable:!0,get:function(){return i.TEnumLiteral}}),Object.defineProperty(e,"TFunc",{enumerable:!0,get:function(){return i.TFunc}}),Object.defineProperty(e,"TIface",{enumerable:!0,get:function(){return i.TIface}}),Object.defineProperty(e,"TLiteral",{enumerable:!0,get:function(){return i.TLiteral}}),Object.defineProperty(e,"TName",{enumerable:!0,get:function(){return i.TName}}),Object.defineProperty(e,"TOptional",{enumerable:!0,get:function(){return i.TOptional}}),Object.defineProperty(e,"TParam",{enumerable:!0,get:function(){return i.TParam}}),Object.defineProperty(e,"TParamList",{enumerable:!0,get:function(){return i.TParamList}}),Object.defineProperty(e,"TProp",{enumerable:!0,get:function(){return i.TProp}}),Object.defineProperty(e,"TTuple",{enumerable:!0,get:function(){return i.TTuple}}),Object.defineProperty(e,"TType",{enumerable:!0,get:function(){return i.TType}}),Object.defineProperty(e,"TUnion",{enumerable:!0,get:function(){return i.TUnion}}),Object.defineProperty(e,"TIntersection",{enumerable:!0,get:function(){return i.TIntersection}}),Object.defineProperty(e,"array",{enumerable:!0,get:function(){return i.array}}),Object.defineProperty(e,"enumlit",{enumerable:!0,get:function(){return i.enumlit}}),Object.defineProperty(e,"enumtype",{enumerable:!0,get:function(){return i.enumtype}}),Object.defineProperty(e,"func",{enumerable:!0,get:function(){return i.func}}),Object.defineProperty(e,"iface",{enumerable:!0,get:function(){return i.iface}}),Object.defineProperty(e,"lit",{enumerable:!0,get:function(){return i.lit}}),Object.defineProperty(e,"name",{enumerable:!0,get:function(){return i.name}}),Object.defineProperty(e,"opt",{enumerable:!0,get:function(){return i.opt}}),Object.defineProperty(e,"param",{enumerable:!0,get:function(){return i.param}}),Object.defineProperty(e,"tuple",{enumerable:!0,get:function(){return i.tuple}}),Object.defineProperty(e,"union",{enumerable:!0,get:function(){return i.union}}),Object.defineProperty(e,"intersection",{enumerable:!0,get:function(){return i.intersection}}),Object.defineProperty(e,"BasicType",{enumerable:!0,get:function(){return i.BasicType}});var a=IS();Object.defineProperty(e,"VError",{enumerable:!0,get:function(){return a.VError}});function o(){for(var e=[...arguments],r=Object.assign.apply(Object,t([{},n.basicTypes],e)),i={},a=0,o=e;a<o.length;a++)for(var c=o[a],l=0,u=Object.keys(c);l<u.length;l++){var d=u[l];i[d]=new s(r,c[d])}return i}e.createCheckers=o;var s=function(){function e(e,t,r){if(r===void 0&&(r=`value`),this.suite=e,this.ttype=t,this._path=r,this.props=new Map,t instanceof n.TIface)for(var i=0,a=t.props;i<a.length;i++){var o=a[i];this.props.set(o.name,o.ttype)}this.checkerPlain=this.ttype.getChecker(e,!1),this.checkerStrict=this.ttype.getChecker(e,!0)}return e.prototype.setReportedPath=function(e){this._path=e},e.prototype.check=function(e){return this._doCheck(this.checkerPlain,e)},e.prototype.test=function(e){return this.checkerPlain(e,new r.NoopContext)},e.prototype.validate=function(e){return this._doValidate(this.checkerPlain,e)},e.prototype.strictCheck=function(e){return this._doCheck(this.checkerStrict,e)},e.prototype.strictTest=function(e){return this.checkerStrict(e,new r.NoopContext)},e.prototype.strictValidate=function(e){return this._doValidate(this.checkerStrict,e)},e.prototype.getProp=function(t){var n=this.props.get(t);if(!n)throw Error(`Type has no property `+t);return new e(this.suite,n,this._path+`.`+t)},e.prototype.methodArgs=function(t){var n=this._getMethod(t);return new e(this.suite,n.paramList)},e.prototype.methodResult=function(t){var n=this._getMethod(t);return new e(this.suite,n.result)},e.prototype.getArgs=function(){if(!(this.ttype instanceof n.TFunc))throw Error(`getArgs() applied to non-function`);return new e(this.suite,this.ttype.paramList)},e.prototype.getResult=function(){if(!(this.ttype instanceof n.TFunc))throw Error(`getResult() applied to non-function`);return new e(this.suite,this.ttype.result)},e.prototype.getType=function(){return this.ttype},e.prototype._doCheck=function(e,t){if(!e(t,new r.NoopContext)){var n=new r.DetailContext;throw e(t,n),n.getError(this._path)}},e.prototype._doValidate=function(e,t){if(e(t,new r.NoopContext))return null;var n=new r.DetailContext;return e(t,n),n.getErrorDetail(this._path)},e.prototype._getMethod=function(e){var t=this.props.get(e);if(!t)throw Error(`Type has no property `+e);if(!(t instanceof n.TFunc))throw Error(`Property `+e+` is not a method`);return t},e}();e.Checker=s}))()),zS={Transform:RS.union(RS.lit(`jsx`),RS.lit(`typescript`),RS.lit(`flow`),RS.lit(`imports`),RS.lit(`react-hot-loader`),RS.lit(`jest`)),SourceMapOptions:RS.iface([],{compiledFilename:`string`}),Options:RS.iface([],{transforms:RS.array(`Transform`),disableESTransforms:RS.opt(`boolean`),jsxRuntime:RS.opt(RS.union(RS.lit(`classic`),RS.lit(`automatic`),RS.lit(`preserve`))),production:RS.opt(`boolean`),jsxImportSource:RS.opt(`string`),jsxPragma:RS.opt(`string`),jsxFragmentPragma:RS.opt(`string`),keepUnusedImports:RS.opt(`boolean`),preserveDynamicImport:RS.opt(`boolean`),injectCreateRequireForImportRequire:RS.opt(`boolean`),enableLegacyTypeScriptModuleInterop:RS.opt(`boolean`),enableLegacyBabel5ModuleInterop:RS.opt(`boolean`),sourceMapOptions:RS.opt(`SourceMapOptions`),filePath:RS.opt(`string`)})},{Options:BS}=(0,RS.createCheckers)(zS);function VS(e){BS.strictCheck(e)}function HS(){X(),oT(!1)}function US(e){X(),qS(e)}function WS(e){$(),KS(e)}function GS(){$(),G.tokens[G.tokens.length-1].identifierRole=Y.ImportDeclaration}function KS(e){let t;t=G.scopeDepth===0?Y.TopLevelDeclaration:e?Y.BlockScopedDeclaration:Y.FunctionScopedDeclaration,G.tokens[G.tokens.length-1].identifierRole=t}function qS(e){switch(G.type){case U._this:{let e=Xb(0);X(),Zb(e);return}case U._yield:case U.name:G.type=U.name,WS(e);return;case U.bracketL:X(),JS(U.bracketR,e,!0);return;case U.braceL:IT(!0,e);return;default:jb()}}function JS(e,t,n=!1,r=!1,i=0){let a=!0,o=!1,s=G.tokens.length;for(;!Z(e)&&!G.error;)if(a?a=!1:(J(U.comma),G.tokens[G.tokens.length-1].contextId=i,!o&&G.tokens[s].isType&&(G.tokens[G.tokens.length-1].isType=!0,o=!0)),!(n&&Q(U.comma))){if(Z(e))break;if(Q(U.ellipsis)){US(t),XS(),Z(U.comma),J(e);break}else YS(r,t)}}function YS(e,t){e&&tC([H._public,H._protected,H._private,H._readonly,H._override]),ZS(t),XS(),ZS(t,!0)}function XS(){gb?iD():hb&&Bw()}function ZS(e,t=!1){if(t||qS(e),!Z(U.eq))return;let n=G.tokens.length-1;oT(),G.tokens[n].rhsEndIndex=G.tokens.length}function QS(){return Q(U.name)}function $S(){return Q(U.name)||!!(G.type&U.IS_KEYWORD)||Q(U.string)||Q(U.num)||Q(U.bigint)||Q(U.decimal)}function eC(){let e=G.snapshot();return X(),(Q(U.bracketL)||Q(U.braceL)||Q(U.star)||Q(U.ellipsis)||Q(U.hash)||$S())&&!Db()?!0:(G.restoreFromSnapshot(e),!1)}function tC(e){for(;nC(e)!==null;);}function nC(e){if(!Q(U.name))return null;let t=G.contextualKeyword;if(e.indexOf(t)!==-1&&eC()){switch(t){case H._readonly:G.tokens[G.tokens.length-1].type=U._readonly;break;case H._abstract:G.tokens[G.tokens.length-1].type=U._abstract;break;case H._static:G.tokens[G.tokens.length-1].type=U._static;break;case H._public:G.tokens[G.tokens.length-1].type=U._public;break;case H._private:G.tokens[G.tokens.length-1].type=U._private;break;case H._protected:G.tokens[G.tokens.length-1].type=U._protected;break;case H._override:G.tokens[G.tokens.length-1].type=U._override;break;case H._declare:G.tokens[G.tokens.length-1].type=U._declare;break;default:break}return t}return null}function rC(){for($();Z(U.dot);)$()}function iC(){rC(),!Db()&&Q(U.lessThan)&&yw()}function aC(){X(),qC()}function oC(){X()}function sC(){J(U._typeof),Q(U._import)?cC():rC(),!Db()&&Q(U.lessThan)&&yw()}function cC(){J(U._import),J(U.parenL),J(U.string),J(U.parenR),Z(U.dot)&&rC(),Q(U.lessThan)&&yw()}function lC(){Z(U._const);let e=Z(U._in),t=wb(H._out);Z(U._const),(e||t)&&!Q(U.name)?G.tokens[G.tokens.length-1].type=U.name:$(),Z(U._extends)&&JC(),Z(U.eq)&&JC()}function uC(){Q(U.lessThan)&&dC()}function dC(){let e=Xb(0);for(Q(U.lessThan)||Q(U.typeParameterStart)?X():jb();!Z(U.greaterThan)&&!G.error;)lC(),Z(U.comma);Zb(e)}function fC(e){let t=e===U.arrow;uC(),J(U.parenL),G.scopeDepth++,pC(!1),G.scopeDepth--,(t||Q(e))&&HC(e)}function pC(e){JS(U.parenR,e)}function mC(){Z(U.comma)||Ab()}function hC(){fC(U.colon),mC()}function gC(){let e=G.snapshot();X();let t=Z(U.name)&&Q(U.colon);return G.restoreFromSnapshot(e),t}function _C(){if(!(Q(U.bracketL)&&gC()))return!1;let e=Xb(0);return J(U.bracketL),$(),qC(),J(U.bracketR),WC(),mC(),Zb(e),!0}function vC(e){Z(U.question),!e&&(Q(U.parenL)||Q(U.lessThan))?(fC(U.colon),mC()):(WC(),mC())}function yC(){if(Q(U.parenL)||Q(U.lessThan)){hC();return}if(Q(U._new)){X(),Q(U.parenL)||Q(U.lessThan)?hC():vC(!1);return}let e=!!nC([H._readonly]);_C()||((q(H._get)||q(H._set))&&eC(),VT(-1),vC(e))}function bC(){xC()}function xC(){for(J(U.braceL);!Z(U.braceR)&&!G.error;)yC()}function SC(){let e=G.snapshot(),t=CC();return G.restoreFromSnapshot(e),t}function CC(){return X(),Z(U.plus)||Z(U.minus)?q(H._readonly):(q(H._readonly)&&X(),!Q(U.bracketL)||(X(),!QS())?!1:(X(),Q(U._in)))}function wC(){$(),J(U._in),JC()}function TC(){J(U.braceL),Q(U.plus)||Q(U.minus)?(X(),Tb(H._readonly)):wb(H._readonly),J(U.bracketL),wC(),wb(H._as)&&JC(),J(U.bracketR),Q(U.plus)||Q(U.minus)?(X(),J(U.question)):Z(U.question),GC(),Ab(),J(U.braceR)}function EC(){for(J(U.bracketL);!Z(U.bracketR)&&!G.error;)DC(),Z(U.comma)}function DC(){Z(U.ellipsis)?JC():(JC(),Z(U.question)),Z(U.colon)&&JC()}function OC(){J(U.parenL),JC(),J(U.parenR)}function kC(){for(Jb(),Jb();!Q(U.backQuote)&&!G.error;)J(U.dollarBraceL),JC(),Jb(),Jb();X()}var AC;(function(e){e[e.TSFunctionType=0]=`TSFunctionType`,e[e.TSConstructorType=1]=`TSConstructorType`,e[e.TSAbstractConstructorType=2]=`TSAbstractConstructorType`})(AC||={});function jC(e){e===AC.TSAbstractConstructorType&&Tb(H._abstract),(e===AC.TSConstructorType||e===AC.TSAbstractConstructorType)&&J(U._new);let t=G.inDisallowConditionalTypesContext;G.inDisallowConditionalTypesContext=!1,fC(U.arrow),G.inDisallowConditionalTypesContext=t}function MC(){switch(G.type){case U.name:iC();return;case U._void:case U._null:X();return;case U.string:case U.num:case U.bigint:case U.decimal:case U._true:case U._false:DT();return;case U.minus:X(),DT();return;case U._this:oC(),q(H._is)&&!Db()&&aC();return;case U._typeof:sC();return;case U._import:cC();return;case U.braceL:SC()?TC():bC();return;case U.bracketL:EC();return;case U.parenL:OC();return;case U.backQuote:kC();return;default:if(G.type&U.IS_KEYWORD){X(),G.tokens[G.tokens.length-1].type=U.name;return}break}jb()}function NC(){for(MC();!Db()&&Z(U.bracketL);)Z(U.bracketR)||(JC(),J(U.bracketR))}function PC(){if(Tb(H._infer),$(),Q(U._extends)){let e=G.snapshot();J(U._extends);let t=G.inDisallowConditionalTypesContext;G.inDisallowConditionalTypesContext=!0,JC(),G.inDisallowConditionalTypesContext=t,(G.error||!G.inDisallowConditionalTypesContext&&Q(U.question))&&G.restoreFromSnapshot(e)}}function FC(){if(q(H._keyof)||q(H._unique)||q(H._readonly))X(),FC();else if(q(H._infer))PC();else{let e=G.inDisallowConditionalTypesContext;G.inDisallowConditionalTypesContext=!1,NC(),G.inDisallowConditionalTypesContext=e}}function IC(){if(Z(U.bitwiseAND),FC(),Q(U.bitwiseAND))for(;Z(U.bitwiseAND);)FC()}function LC(){if(Z(U.bitwiseOR),IC(),Q(U.bitwiseOR))for(;Z(U.bitwiseOR);)IC()}function RC(){return Q(U.lessThan)?!0:Q(U.parenL)&&BC()}function zC(){if(Q(U.name)||Q(U._this))return X(),!0;if(Q(U.braceL)||Q(U.bracketL)){let e=1;for(X();e>0&&!G.error;)Q(U.braceL)||Q(U.bracketL)?e++:(Q(U.braceR)||Q(U.bracketR))&&e--,X();return!0}return!1}function BC(){let e=G.snapshot(),t=VC();return G.restoreFromSnapshot(e),t}function VC(){return X(),!!(Q(U.parenR)||Q(U.ellipsis)||zC()&&(Q(U.colon)||Q(U.comma)||Q(U.question)||Q(U.eq)||Q(U.parenR)&&(X(),Q(U.arrow))))}function HC(e){let t=Xb(0);J(e),KC()||JC(),Zb(t)}function UC(){Q(U.colon)&&HC(U.colon)}function WC(){Q(U.colon)&&qC()}function GC(){Z(U.colon)&&JC()}function KC(){let e=G.snapshot();return q(H._asserts)?(X(),wb(H._is)?(JC(),!0):QS()||Q(U._this)?(X(),wb(H._is)&&JC(),!0):(G.restoreFromSnapshot(e),!1)):QS()||Q(U._this)?(X(),q(H._is)&&!Db()?(X(),JC(),!0):(G.restoreFromSnapshot(e),!1)):!1}function qC(){let e=Xb(0);J(U.colon),JC(),Zb(e)}function JC(){if(XC(),G.inDisallowConditionalTypesContext||Db()||!Z(U._extends))return;let e=G.inDisallowConditionalTypesContext;G.inDisallowConditionalTypesContext=!0,XC(),G.inDisallowConditionalTypesContext=e,J(U.question),JC(),J(U.colon),JC()}function YC(){return q(H._abstract)&&$b()===U._new}function XC(){if(RC()){jC(AC.TSFunctionType);return}if(Q(U._new)){jC(AC.TSConstructorType);return}else if(YC()){jC(AC.TSAbstractConstructorType);return}LC()}function ZC(){let e=Xb(1);JC(),J(U.greaterThan),Zb(e),pT()}function QC(){if(Z(U.jsxTagStart)){G.tokens[G.tokens.length-1].type=U.typeParameterStart;let e=Xb(1);for(;!Q(U.greaterThan)&&!G.error;)JC(),Z(U.comma);eT(),Zb(e)}}function $C(){for(;!Q(U.braceL)&&!G.error;)ew(),Z(U.comma)}function ew(){rC(),Q(U.lessThan)&&yw()}function tw(){WS(!1),uC(),Z(U._extends)&&$C(),xC()}function nw(){WS(!1),uC(),J(U.eq),JC(),Ab()}function rw(){if(Q(U.string)?DT():$(),Z(U.eq)){let e=G.tokens.length-1;oT(),G.tokens[e].rhsEndIndex=G.tokens.length}}function iw(){for(WS(!1),J(U.braceL);!Z(U.braceR)&&!G.error;)rw(),Z(U.comma)}function aw(){J(U.braceL),GD(U.braceR)}function ow(){WS(!1),Z(U.dot)?ow():aw()}function sw(){q(H._global)?$():Q(U.string)?wT():jb(),Q(U.braceL)?aw():Ab()}function cw(){GS(),J(U.eq),uw(),Ab()}function lw(){return q(H._require)&&$b()===U.parenL}function uw(){lw()?dw():rC()}function dw(){Tb(H._require),J(U.parenL),Q(U.string)||jb(),DT(),J(U.parenR)}function fw(){if(kb())return!1;switch(G.type){case U._function:{let e=Xb(1);X();let t=G.start;return XD(t,!0),Zb(e),!0}case U._class:{let e=Xb(1);return QD(!0,!1),Zb(e),!0}case U._const:if(Q(U._const)&&Cb(H._enum)){let e=Xb(1);return J(U._const),Tb(H._enum),G.tokens[G.tokens.length-1].type=U._enum,iw(),Zb(e),!0}case U._var:case U._let:{let e=Xb(1);return zD(G.type!==U._var),Zb(e),!0}case U.name:{let e=Xb(1),t=G.contextualKeyword,n=!1;return t===H._global?(sw(),n=!0):n=hw(t,!0),Zb(e),n}default:return!1}}function pw(){return hw(G.contextualKeyword,!0)}function mw(e){switch(e){case H._declare:{let e=G.tokens.length-1;if(fw())return G.tokens[e].type=U._declare,!0;break}case H._global:if(Q(U.braceL))return aw(),!0;break;default:return hw(e,!1)}return!1}function hw(e,t){switch(e){case H._abstract:if(gw(t)&&Q(U._class))return G.tokens[G.tokens.length-1].type=U._abstract,QD(!0,!1),!0;break;case H._enum:if(gw(t)&&Q(U.name))return G.tokens[G.tokens.length-1].type=U._enum,iw(),!0;break;case H._interface:if(gw(t)&&Q(U.name)){let e=Xb(t?2:1);return tw(),Zb(e),!0}break;case H._module:if(gw(t)){if(Q(U.string)){let e=Xb(t?2:1);return sw(),Zb(e),!0}else if(Q(U.name)){let e=Xb(t?2:1);return ow(),Zb(e),!0}}break;case H._namespace:if(gw(t)&&Q(U.name)){let e=Xb(t?2:1);return ow(),Zb(e),!0}break;case H._type:if(gw(t)&&Q(U.name)){let e=Xb(t?2:1);return nw(),Zb(e),!0}break;default:break}return!1}function gw(e){return e?(X(),!0):!kb()}function _w(){let e=G.snapshot();return dC(),ZD(),UC(),J(U.arrow),G.error?(G.restoreFromSnapshot(e),!1):(GT(!0),!0)}function vw(){G.type===U.bitShiftL&&(--G.pos,ux(U.lessThan)),yw()}function yw(){let e=Xb(0);for(J(U.lessThan);!Q(U.greaterThan)&&!G.error;)JC(),Z(U.comma);e?(J(U.greaterThan),Zb(e)):(Zb(e),yx(),J(U.greaterThan),G.tokens[G.tokens.length-1].isType=!0)}function bw(){if(Q(U.name))switch(G.contextualKeyword){case H._abstract:case H._declare:case H._enum:case H._interface:case H._module:case H._namespace:case H._type:return!0;default:break}return!1}function xw(e,t){if(Q(U.colon)&&HC(U.colon),!Q(U.braceL)&&kb()){let t=G.tokens.length-1;for(;t>=0&&(G.tokens[t].start>=e||G.tokens[t].type===U._default||G.tokens[t].type===U._export);)G.tokens[t].isType=!0,t--;return}GT(!1,t)}function Sw(e,t,n){if(!Db()&&Z(U.bang)){G.tokens[G.tokens.length-1].type=U.nonNullAssertion;return}if(Q(U.lessThan)||Q(U.bitShiftL)){let n=G.snapshot();if(!t&&yT()&&_w())return;if(vw(),!t&&Z(U.parenL)?(G.tokens[G.tokens.length-1].subscriptStartIndex=e,bT()):Q(U.backQuote)?FT():(G.type===U.greaterThan||G.type!==U.parenL&&G.type&U.IS_EXPRESSION_START&&!Db())&&jb(),G.error)G.restoreFromSnapshot(n);else return}else!t&&Q(U.questionDot)&&$b()===U.lessThan&&(X(),G.tokens[e].isOptionalChainStart=!0,G.tokens[G.tokens.length-1].subscriptStartIndex=e,yw(),J(U.parenL),bT());vT(e,t,n)}function Cw(){if(Z(U._import))return q(H._type)&&$b()!==U.eq&&Tb(H._type),cw(),!0;if(Z(U.eq))return aT(),Ab(),!0;if(wb(H._as))return Tb(H._namespace),$(),Ab(),!0;if(q(H._type)){let e=$b();(e===U.braceL||e===U.star)&&X()}return!1}function ww(){if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-1].identifierRole=Y.ImportDeclaration;return}if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-1].identifierRole=Y.ImportDeclaration,G.tokens[G.tokens.length-2].isType=!0,G.tokens[G.tokens.length-1].isType=!0;return}if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-3].identifierRole=Y.ImportAccess,G.tokens[G.tokens.length-1].identifierRole=Y.ImportDeclaration;return}$(),G.tokens[G.tokens.length-3].identifierRole=Y.ImportAccess,G.tokens[G.tokens.length-1].identifierRole=Y.ImportDeclaration,G.tokens[G.tokens.length-4].isType=!0,G.tokens[G.tokens.length-3].isType=!0,G.tokens[G.tokens.length-2].isType=!0,G.tokens[G.tokens.length-1].isType=!0}function Tw(){if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-1].identifierRole=Y.ExportAccess;return}if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-1].identifierRole=Y.ExportAccess,G.tokens[G.tokens.length-2].isType=!0,G.tokens[G.tokens.length-1].isType=!0;return}if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-3].identifierRole=Y.ExportAccess;return}$(),G.tokens[G.tokens.length-3].identifierRole=Y.ExportAccess,G.tokens[G.tokens.length-4].isType=!0,G.tokens[G.tokens.length-3].isType=!0,G.tokens[G.tokens.length-2].isType=!0,G.tokens[G.tokens.length-1].isType=!0}function Ew(){if(q(H._abstract)&&$b()===U._class)return G.type=U._abstract,X(),QD(!0,!0),!0;if(q(H._interface)){let e=Xb(2);return hw(H._interface,!0),Zb(e),!0}return!1}function Dw(){if(G.type===U._const){let e=tx();if(e.type===U.name&&e.contextualKeyword===H._enum)return J(U._const),Tb(H._enum),G.tokens[G.tokens.length-1].type=U._enum,iw(),!0}return!1}function Ow(e){let t=G.tokens.length;tC([H._abstract,H._readonly,H._declare,H._static,H._override]);let n=G.tokens.length;if(_C()){let r=e?t-1:t;for(let e=r;e<n;e++)G.tokens[e].isType=!0;return!0}return!1}function kw(e){mw(e)||Ab()}function Aw(){let e=wb(H._declare);e&&(G.tokens[G.tokens.length-1].type=U._declare);let t=!1;if(Q(U.name))if(e){let e=Xb(2);t=pw(),Zb(e)}else t=pw();if(!t)if(e){let e=Xb(2);yD(!0),Zb(e)}else yD(!0)}function jw(e){if(e&&(Q(U.lessThan)||Q(U.bitShiftL))&&vw(),wb(H._implements)){G.tokens[G.tokens.length-1].type=U._implements;let e=Xb(1);$C(),Zb(e)}}function Mw(){uC()}function Nw(){uC()}function Pw(){let e=Xb(0);Db()||Z(U.bang),WC(),Zb(e)}function Fw(){Q(U.colon)&&qC()}function Iw(e,t){return mb?Lw(e,t):Rw(e,t)}function Lw(e,t){if(!Q(U.lessThan))return sT(e,t);let n=G.snapshot(),r=sT(e,t);if(G.error)G.restoreFromSnapshot(n);else return r;return G.type=U.typeParameterStart,dC(),r=sT(e,t),r||jb(),r}function Rw(e,t){if(!Q(U.lessThan))return sT(e,t);let n=G.snapshot();dC();let r=sT(e,t);if(r||jb(),G.error)G.restoreFromSnapshot(n);else return r;return sT(e,t)}function zw(){if(Q(U.colon)){let e=G.snapshot();HC(U.colon),Eb()&&jb(),Q(U.arrow)||jb(),G.error&&G.restoreFromSnapshot(e)}return Z(U.arrow)}function Bw(){let e=Xb(0);Z(U.question),WC(),Zb(e)}function Vw(){(Q(U.lessThan)||Q(U.bitShiftL))&&vw(),TD()}function Hw(){let e=!1,t=!1;for(;;){if(G.pos>=K.length){jb(`Unterminated JSX contents`);return}let n=K.charCodeAt(G.pos);if(n===W.lessThan||n===W.leftCurlyBrace){if(G.pos===G.start){if(n===W.lessThan){G.pos++,ux(U.jsxTagStart);return}Sx(n);return}ux(e&&!t?U.jsxEmptyText:U.jsxText);return}n===W.lineFeed?e=!0:n!==W.space&&n!==W.carriageReturn&&n!==W.tab&&(t=!0),G.pos++}}function Uw(e){for(G.pos++;;){if(G.pos>=K.length){jb(`Unterminated string constant`);return}if(K.charCodeAt(G.pos)===e){G.pos++;break}G.pos++}ux(U.string)}function Ww(){let e;do{if(G.pos>K.length){jb(`Unexpectedly reached the end of input.`);return}e=K.charCodeAt(++G.pos)}while(Ib[e]||e===W.dash);ux(U.jsxName)}function Gw(){eT()}function Kw(e){if(Gw(),!Z(U.colon)){G.tokens[G.tokens.length-1].identifierRole=e;return}Gw()}function qw(){let e=G.tokens.length;Kw(Y.Access);let t=!1;for(;Q(U.dot);)t=!0,eT(),Gw();if(!t){let t=G.tokens[e],n=K.charCodeAt(t.start);n>=W.lowercaseA&&n<=W.lowercaseZ&&(t.identifierRole=null)}}function Jw(){switch(G.type){case U.braceL:X(),aT(),eT();return;case U.jsxTagStart:$w(),eT();return;case U.string:eT();return;default:jb(`JSX value should be either an expression or a quoted JSX text`)}}function Yw(){J(U.ellipsis),aT()}function Xw(e){if(Q(U.jsxTagEnd))return!1;qw(),hb&&QC();let t=!1;for(;!Q(U.slash)&&!Q(U.jsxTagEnd)&&!G.error;){if(Z(U.braceL)){t=!0,J(U.ellipsis),oT(),eT();continue}t&&G.end-G.start===3&&K.charCodeAt(G.start)===W.lowercaseK&&K.charCodeAt(G.start+1)===W.lowercaseE&&K.charCodeAt(G.start+2)===W.lowercaseY&&(G.tokens[e].jsxRole=Bb.KeyAfterPropSpread),Kw(Y.ObjectKey),Q(U.eq)&&(eT(),Jw())}let n=Q(U.slash);return n&&eT(),n}function Zw(){Q(U.jsxTagEnd)||qw()}function Qw(){let e=G.tokens.length-1;G.tokens[e].jsxRole=Bb.NoChildren;let t=0;if(!Xw(e))for(tT();;)switch(G.type){case U.jsxTagStart:if(eT(),Q(U.slash)){eT(),Zw(),G.tokens[e].jsxRole!==Bb.KeyAfterPropSpread&&(t===1?G.tokens[e].jsxRole=Bb.OneChild:t>1&&(G.tokens[e].jsxRole=Bb.StaticChildren));return}t++,Qw(),tT();break;case U.jsxText:t++,tT();break;case U.jsxEmptyText:tT();break;case U.braceL:X(),Q(U.ellipsis)?(Yw(),tT(),t+=2):(Q(U.braceR)||(t++,aT()),tT());break;default:jb();return}}function $w(){eT(),Qw()}function eT(){G.tokens.push(new qb),lx(),G.start=G.pos;let e=K.charCodeAt(G.pos);if(Lb[e])Ww();else if(e===W.quotationMark||e===W.apostrophe)Uw(e);else switch(++G.pos,e){case W.greaterThan:ux(U.jsxTagEnd);break;case W.lessThan:ux(U.jsxTagStart);break;case W.slash:ux(U.slash);break;case W.equalsTo:ux(U.eq);break;case W.leftCurlyBrace:ux(U.braceL);break;case W.dot:ux(U.dot);break;case W.colon:ux(U.colon);break;default:jb()}}function tT(){G.tokens.push(new qb),G.start=G.pos,Hw()}function nT(e){if(Q(U.question)){let e=$b();if(e===U.colon||e===U.comma||e===U.parenR)return}uT(e)}function rT(){Qb(U.question),Q(U.colon)&&(hb?qC():gb&&HE())}var iT=class{constructor(e){this.stop=e}};function aT(e=!1){if(oT(e),Q(U.comma))for(;Z(U.comma);)oT(e)}function oT(e=!1,t=!1){return hb?Iw(e,t):gb?uD(e,t):sT(e,t)}function sT(e,t){if(Q(U._yield))return YT(),!1;(Q(U.parenL)||Q(U.name)||Q(U._yield))&&(G.potentialArrowAt=G.start);let n=cT(e);return t&&MT(),G.type&U.IS_ASSIGN?(X(),oT(e),!1):n}function cT(e){return dT(e)?!0:(lT(e),!1)}function lT(e){hb||gb?nT(e):uT(e)}function uT(e){Z(U.question)&&(oT(),J(U.colon),oT(e))}function dT(e){let t=G.tokens.length;return pT()?!0:(fT(t,-1,e),!1)}function fT(e,t,n){if(hb&&(U._in&U.PRECEDENCE_MASK)>t&&!Db()&&(wb(H._as)||wb(H._satisfies))){let r=Xb(1);JC(),Zb(r),yx(),fT(e,t,n);return}let r=G.type&U.PRECEDENCE_MASK;if(r>0&&(!n||!Q(U._in))&&r>t){let i=G.type;X(),i===U.nullishCoalescing&&(G.tokens[G.tokens.length-1].nullishStartIndex=e);let a=G.tokens.length;pT(),fT(a,i&U.IS_RIGHT_ASSOCIATIVE?r-1:r,n),i===U.nullishCoalescing&&(G.tokens[e].numNullishCoalesceStarts++,G.tokens[G.tokens.length-1].numNullishCoalesceEnds++),fT(e,t,n)}}function pT(){if(hb&&!mb&&Z(U.lessThan))return ZC(),!1;if(q(H._module)&&ix()===W.leftCurlyBrace&&!Ob())return XT(),!1;if(G.type&U.IS_PREFIX)return X(),pT(),!1;if(mT())return!0;for(;G.type&U.IS_POSTFIX&&!Eb();)G.type===U.preIncDec&&(G.type=U.postIncDec),X();return!1}function mT(){let e=G.tokens.length;return wT()?!0:(hT(e),G.tokens.length>e&&G.tokens[e].isOptionalChainStart&&(G.tokens[G.tokens.length-1].isOptionalChainEnd=!0),!1)}function hT(e,t=!1){gb?fD(e,t):gT(e,t)}function gT(e,t=!1){let n=new iT(!1);do _T(e,t,n);while(!n.stop&&!G.error)}function _T(e,t,n){hb?Sw(e,t,n):gb?KE(e,t,n):vT(e,t,n)}function vT(e,t,n){if(!t&&Z(U.doubleColon))CT(),n.stop=!0,hT(e,t);else if(Q(U.questionDot)){if(G.tokens[e].isOptionalChainStart=!0,t&&$b()===U.parenL){n.stop=!0;return}X(),G.tokens[G.tokens.length-1].subscriptStartIndex=e,Z(U.bracketL)?(aT(),J(U.bracketR)):Z(U.parenL)?bT():TT()}else if(Z(U.dot))G.tokens[G.tokens.length-1].subscriptStartIndex=e,TT();else if(Z(U.bracketL))G.tokens[G.tokens.length-1].subscriptStartIndex=e,aT(),J(U.bracketR);else if(!t&&Q(U.parenL))if(yT()){let t=G.snapshot(),r=G.tokens.length;X(),G.tokens[G.tokens.length-1].subscriptStartIndex=e;let i=vb();G.tokens[G.tokens.length-1].contextId=i,bT(),G.tokens[G.tokens.length-1].contextId=i,xT()&&(G.restoreFromSnapshot(t),n.stop=!0,G.scopeDepth++,ZD(),ST(r))}else{X(),G.tokens[G.tokens.length-1].subscriptStartIndex=e;let t=vb();G.tokens[G.tokens.length-1].contextId=t,bT(),G.tokens[G.tokens.length-1].contextId=t}else Q(U.backQuote)?FT():n.stop=!0}function yT(){return G.tokens[G.tokens.length-1].contextualKeyword===H._async&&!Eb()}function bT(){let e=!0;for(;!Z(U.parenR)&&!G.error;){if(e)e=!1;else if(J(U.comma),Z(U.parenR))break;qT(!1)}}function xT(){return Q(U.colon)||Q(U.arrow)}function ST(e){hb?Fw():gb&&lD(),J(U.arrow),UT(e)}function CT(){let e=G.tokens.length;wT(),hT(e,!0)}function wT(){if(Z(U.modulo))return $(),!1;if(Q(U.jsxText)||Q(U.jsxEmptyText))return DT(),!1;if(Q(U.lessThan)&&mb)return G.type=U.jsxTagStart,$w(),X(),!1;let e=G.potentialArrowAt===G.start;switch(G.type){case U.slash:case U.assign:Yb();case U._super:case U._this:case U.regexp:case U.num:case U.bigint:case U.decimal:case U.string:case U._null:case U._true:case U._false:return X(),!1;case U._import:return X(),Q(U.dot)&&(G.tokens[G.tokens.length-1].type=U.name,X(),$()),!1;case U.name:{let t=G.tokens.length,n=G.start,r=G.contextualKeyword;return $(),r===H._await?(JT(),!1):r===H._async&&Q(U._function)&&!Eb()?(X(),XD(n,!1),!1):e&&r===H._async&&!Eb()&&Q(U.name)?(G.scopeDepth++,WS(!1),J(U.arrow),UT(t),!0):Q(U._do)&&!Eb()?(X(),WD(),!1):e&&!Eb()&&Q(U.arrow)?(G.scopeDepth++,KS(!1),J(U.arrow),UT(t),!0):(G.tokens[G.tokens.length-1].identifierRole=Y.Access,!1)}case U._do:return X(),WD(),!1;case U.parenL:return kT(e);case U.bracketL:return X(),KT(U.bracketR,!0),!1;case U.braceL:return IT(!1,!1),!1;case U._function:return ET(),!1;case U.at:SD();case U._class:return QD(!1),!1;case U._new:return NT(),!1;case U.backQuote:return FT(),!1;case U.doubleColon:return X(),CT(),!1;case U.hash:{let e=ix();return Lb[e]||e===W.backslash?TT():X(),!1}default:return jb(),!1}}function TT(){Z(U.hash),$()}function ET(){let e=G.start;$(),Z(U.dot)&&$(),XD(e,!1)}function DT(){X()}function OT(){J(U.parenL),aT(),J(U.parenR)}function kT(e){let t=G.snapshot(),n=G.tokens.length;J(U.parenL);let r=!0;for(;!Q(U.parenR)&&!G.error;){if(r)r=!1;else if(J(U.comma),Q(U.parenR))break;if(Q(U.ellipsis)){US(!1),MT();break}else oT(!1,!0)}return J(U.parenR),e&&AT()&&jT()?(G.restoreFromSnapshot(t),G.scopeDepth++,ZD(),jT(),UT(n),G.error?(G.restoreFromSnapshot(t),kT(!1),!1):!0):!1}function AT(){return Q(U.colon)||!Eb()}function jT(){return hb?zw():gb?dD():Z(U.arrow)}function MT(){(hb||gb)&&rT()}function NT(){if(J(U._new),Z(U.dot)){$();return}PT(),gb&&qE(),Z(U.parenL)&&KT(U.parenR)}function PT(){CT(),Z(U.questionDot)}function FT(){for(Jb(),Jb();!Q(U.backQuote)&&!G.error;)J(U.dollarBraceL),aT(),Jb(),Jb();X()}function IT(e,t){let n=vb(),r=!0;for(X(),G.tokens[G.tokens.length-1].contextId=n;!Z(U.braceR)&&!G.error;){if(r)r=!1;else if(J(U.comma),Z(U.braceR))break;let i=!1;if(Q(U.ellipsis)){let n=G.tokens.length;if(HS(),e&&(G.tokens.length===n+2&&KS(t),Z(U.braceR)))break;continue}e||(i=Z(U.star)),!e&&q(H._async)?(i&&jb(),$(),Q(U.colon)||Q(U.parenL)||Q(U.braceR)||Q(U.eq)||Q(U.comma)||(Q(U.star)&&(X(),i=!0),VT(n))):VT(n),BT(e,t,n)}G.tokens[G.tokens.length-1].contextId=n}function LT(e){return!e&&(Q(U.string)||Q(U.num)||Q(U.bracketL)||Q(U.name)||!!(G.type&U.IS_KEYWORD))}function RT(e,t){let n=G.start;return Q(U.parenL)?(e&&jb(),HT(n,!1),!0):LT(e)?(VT(t),HT(n,!1),!0):!1}function zT(e,t){if(Z(U.colon)){e?ZS(t):oT(!1);return}let n;n=e?G.scopeDepth===0?Y.ObjectShorthandTopLevelDeclaration:t?Y.ObjectShorthandBlockScopedDeclaration:Y.ObjectShorthandFunctionScopedDeclaration:Y.ObjectShorthand,G.tokens[G.tokens.length-1].identifierRole=n,ZS(t,!0)}function BT(e,t,n){hb?Mw():gb&&rD(),RT(e,n)||zT(e,t)}function VT(e){gb&&WE(),Z(U.bracketL)?(G.tokens[G.tokens.length-1].contextId=e,oT(),J(U.bracketR),G.tokens[G.tokens.length-1].contextId=e):(Q(U.num)||Q(U.string)||Q(U.bigint)||Q(U.decimal)?wT():TT(),G.tokens[G.tokens.length-1].identifierRole=Y.ObjectKey,G.tokens[G.tokens.length-1].contextId=e)}function HT(e,t){let n=vb();G.scopeDepth++;let r=G.tokens.length;ZD(t,n),WT(e,n);let i=G.tokens.length;G.scopes.push(new db(r,i,!0)),G.scopeDepth--}function UT(e){GT(!0);let t=G.tokens.length;G.scopes.push(new db(e,t,!0)),G.scopeDepth--}function WT(e,t=0){hb?xw(e,t):gb?GE(t):GT(!1,t)}function GT(e,t=0){e&&!Q(U.braceL)?oT():WD(!0,t)}function KT(e,t=!1){let n=!0;for(;!Z(e)&&!G.error;){if(n)n=!1;else if(J(U.comma),Z(e))break;qT(t)}}function qT(e){e&&Q(U.comma)||(Q(U.ellipsis)?(HS(),MT()):Q(U.question)?X():oT(!1,!0))}function $(){X(),G.tokens[G.tokens.length-1].type=U.name}function JT(){pT()}function YT(){X(),!Q(U.semi)&&!Eb()&&(Z(U.star),oT())}function XT(){Tb(H._module),J(U.braceL),GD(U.braceR)}function ZT(e){return(e.type===U.name||!!(e.type&U.IS_KEYWORD))&&e.contextualKeyword!==H._from}function QT(e){let t=Xb(0);J(e||U.colon),VE(),Zb(t)}function $T(){J(U.modulo),Tb(H._checks),Z(U.parenL)&&(aT(),J(U.parenR))}function eE(){let e=Xb(0);J(U.colon),Q(U.modulo)?$T():(VE(),Q(U.modulo)&&$T()),Zb(e)}function tE(){X(),dE(!0)}function nE(){X(),$(),Q(U.lessThan)&&vE(),J(U.parenL),PE(),J(U.parenR),eE(),Ab()}function rE(){Q(U._class)?tE():Q(U._function)?nE():Q(U._var)?iE():wb(H._module)?Z(U.dot)?sE():aE():q(H._type)?cE():q(H._opaque)?lE():q(H._interface)?uE():Q(U._export)?oE():jb()}function iE(){X(),UE(),Ab()}function aE(){for(Q(U.string)?wT():$(),J(U.braceL);!Q(U.braceR)&&!G.error;)Q(U._import)?(X(),TO()):jb();J(U.braceR)}function oE(){J(U._export),Z(U._default)?Q(U._function)||Q(U._class)?rE():(VE(),Ab()):Q(U._var)||Q(U._function)||Q(U._class)||q(H._opaque)?rE():Q(U.star)||Q(U.braceL)||q(H._interface)||q(H._type)||q(H._opaque)?uO():jb()}function sE(){Tb(H._exports),HE(),Ab()}function cE(){X(),hE()}function lE(){X(),gE(!0)}function uE(){X(),dE()}function dE(e=!1){if(mE(),Q(U.lessThan)&&vE(),Z(U._extends))do fE();while(!e&&Z(U.comma));if(q(H._mixins)){X();do fE();while(Z(U.comma))}if(q(H._implements)){X();do fE();while(Z(U.comma))}EE(e,!1,e)}function fE(){kE(!1),Q(U.lessThan)&&yE()}function pE(){dE()}function mE(){$()}function hE(){mE(),Q(U.lessThan)&&vE(),QT(U.eq),Ab()}function gE(e){Tb(H._type),mE(),Q(U.lessThan)&&vE(),Q(U.colon)&&QT(U.colon),e||QT(U.eq),Ab()}function _E(){WE(),UE(),Z(U.eq)&&VE()}function vE(){let e=Xb(0);Q(U.lessThan)||Q(U.typeParameterStart)?X():jb();do _E(),Q(U.greaterThan)||J(U.comma);while(!Q(U.greaterThan)&&!G.error);J(U.greaterThan),Zb(e)}function yE(){let e=Xb(0);for(J(U.lessThan);!Q(U.greaterThan)&&!G.error;)VE(),Q(U.greaterThan)||J(U.comma);J(U.greaterThan),Zb(e)}function bE(){if(Tb(H._interface),Z(U._extends))do fE();while(Z(U.comma));EE(!1,!1,!1)}function xE(){Q(U.num)||Q(U.string)?wT():$()}function SE(){$b()===U.colon?(xE(),QT()):VE(),J(U.bracketR),QT()}function CE(){xE(),J(U.bracketR),J(U.bracketR),Q(U.lessThan)||Q(U.parenL)?wE():(Z(U.question),QT())}function wE(){for(Q(U.lessThan)&&vE(),J(U.parenL);!Q(U.parenR)&&!Q(U.ellipsis)&&!G.error;)NE(),Q(U.parenR)||J(U.comma);Z(U.ellipsis)&&NE(),J(U.parenR),QT()}function TE(){wE()}function EE(e,t,n){let r;for(t&&Q(U.braceBarL)?(J(U.braceBarL),r=U.braceBarR):(J(U.braceL),r=U.braceR);!Q(r)&&!G.error;){if(n&&q(H._proto)){let t=$b();t!==U.colon&&t!==U.question&&(X(),e=!1)}if(e&&q(H._static)){let e=$b();e!==U.colon&&e!==U.question&&X()}if(WE(),Z(U.bracketL))Z(U.bracketL)?CE():SE();else if(Q(U.parenL)||Q(U.lessThan))TE();else{if(q(H._get)||q(H._set)){let e=$b();(e===U.name||e===U.string||e===U.num)&&X()}DE()}OE()}J(r)}function DE(){if(Q(U.ellipsis)){if(J(U.ellipsis),Z(U.comma)||Z(U.semi),Q(U.braceR))return;VE()}else xE(),Q(U.lessThan)||Q(U.parenL)?wE():(Z(U.question),QT())}function OE(){!Z(U.semi)&&!Z(U.comma)&&!Q(U.braceR)&&!Q(U.braceBarR)&&jb()}function kE(e){for(e||$();Z(U.dot);)$()}function AE(){kE(!0),Q(U.lessThan)&&yE()}function jE(){J(U._typeof),FE()}function ME(){for(J(U.bracketL);G.pos<K.length&&!Q(U.bracketR)&&(VE(),!Q(U.bracketR));)J(U.comma);J(U.bracketR)}function NE(){let e=$b();e===U.colon||e===U.question?($(),Z(U.question),QT()):VE()}function PE(){for(;!Q(U.parenR)&&!Q(U.ellipsis)&&!G.error;)NE(),Q(U.parenR)||J(U.comma);Z(U.ellipsis)&&NE()}function FE(){let e=!1,t=G.noAnonFunctionType;switch(G.type){case U.name:if(q(H._interface)){bE();return}$(),AE();return;case U.braceL:EE(!1,!1,!1);return;case U.braceBarL:EE(!1,!0,!1);return;case U.bracketL:ME();return;case U.lessThan:vE(),J(U.parenL),PE(),J(U.parenR),J(U.arrow),VE();return;case U.parenL:if(X(),!Q(U.parenR)&&!Q(U.ellipsis))if(Q(U.name)){let t=$b();e=t!==U.question&&t!==U.colon}else e=!0;if(e)if(G.noAnonFunctionType=!1,VE(),G.noAnonFunctionType=t,G.noAnonFunctionType||!(Q(U.comma)||Q(U.parenR)&&$b()===U.arrow)){J(U.parenR);return}else Z(U.comma);PE(),J(U.parenR),J(U.arrow),VE();return;case U.minus:X(),DT();return;case U.string:case U.num:case U._true:case U._false:case U._null:case U._this:case U._void:case U.star:X();return;default:if(G.type===U._typeof){jE();return}else if(G.type&U.IS_KEYWORD){X(),G.tokens[G.tokens.length-1].type=U.name;return}}jb()}function IE(){for(FE();!Eb()&&(Q(U.bracketL)||Q(U.questionDot));)Z(U.questionDot),J(U.bracketL),Z(U.bracketR)||(VE(),J(U.bracketR))}function LE(){Z(U.question)?LE():IE()}function RE(){LE(),!G.noAnonFunctionType&&Z(U.arrow)&&VE()}function zE(){for(Z(U.bitwiseAND),RE();Z(U.bitwiseAND);)RE()}function BE(){for(Z(U.bitwiseOR),zE();Z(U.bitwiseOR);)zE()}function VE(){BE()}function HE(){QT()}function UE(){$(),Q(U.colon)&&HE()}function WE(){(Q(U.plus)||Q(U.minus))&&(X(),G.tokens[G.tokens.length-1].isType=!0)}function GE(e){Q(U.colon)&&eE(),GT(!1,e)}function KE(e,t,n){if(Q(U.questionDot)&&$b()===U.lessThan){if(t){n.stop=!0;return}X(),yE(),J(U.parenL),bT();return}else if(!t&&Q(U.lessThan)){let e=G.snapshot();if(yE(),J(U.parenL),bT(),G.error)G.restoreFromSnapshot(e);else return}vT(e,t,n)}function qE(){if(Q(U.lessThan)){let e=G.snapshot();yE(),G.error&&G.restoreFromSnapshot(e)}}function JE(){if(Q(U.name)&&G.contextualKeyword===H._interface){let e=Xb(0);return X(),pE(),Zb(e),!0}else if(q(H._enum))return mD(),!0;return!1}function YE(){return q(H._enum)?(mD(),!0):!1}function XE(e){if(e===H._declare){if(Q(U._class)||Q(U.name)||Q(U._function)||Q(U._var)||Q(U._export)){let e=Xb(1);rE(),Zb(e)}}else if(Q(U.name)){if(e===H._interface){let e=Xb(1);pE(),Zb(e)}else if(e===H._type){let e=Xb(1);hE(),Zb(e)}else if(e===H._opaque){let e=Xb(1);gE(!1),Zb(e)}}Ab()}function ZE(){return q(H._type)||q(H._interface)||q(H._opaque)||q(H._enum)}function QE(){return Q(U.name)&&(G.contextualKeyword===H._type||G.contextualKeyword===H._interface||G.contextualKeyword===H._opaque||G.contextualKeyword===H._enum)}function $E(){if(q(H._type)){let e=Xb(1);X(),Q(U.braceL)?(xO(),hO()):hE(),Zb(e)}else if(q(H._opaque)){let e=Xb(1);X(),gE(!1),Zb(e)}else if(q(H._interface)){let e=Xb(1);X(),pE(),Zb(e)}else yD(!0)}function eD(){return Q(U.star)||q(H._type)&&$b()===U.star}function tD(){if(wb(H._type)){let e=Xb(2);vO(),Zb(e)}else vO()}function nD(e){if(e&&Q(U.lessThan)&&yE(),q(H._implements)){let e=Xb(0);X(),G.tokens[G.tokens.length-1].type=U._implements;do mE(),Q(U.lessThan)&&yE();while(Z(U.comma));Zb(e)}}function rD(){Q(U.lessThan)&&(vE(),Q(U.parenL)||jb())}function iD(){let e=Xb(0);Z(U.question),Q(U.colon)&&HE(),Zb(e)}function aD(){if(Q(U._typeof)||q(H._type)){let e=tx();(ZT(e)||e.type===U.braceL||e.type===U.star)&&X()}}function oD(){let e=G.contextualKeyword===H._type||G.type===U._typeof;e?X():$(),q(H._as)&&!Cb(H._as)?($(),e&&!Q(U.name)&&!(G.type&U.IS_KEYWORD)||$()):(e&&(Q(U.name)||G.type&U.IS_KEYWORD)&&$(),wb(H._as)&&$())}function sD(){if(Q(U.lessThan)){let e=Xb(0);vE(),Zb(e)}}function cD(){Q(U.colon)&&HE()}function lD(){if(Q(U.colon)){let e=G.noAnonFunctionType;G.noAnonFunctionType=!0,HE(),G.noAnonFunctionType=e}}function uD(e,t){if(Q(U.lessThan)){let n=G.snapshot(),r=sT(e,t);if(G.error)G.restoreFromSnapshot(n),G.type=U.typeParameterStart;else return r;let i=Xb(0);if(vE(),Zb(i),r=sT(e,t),r)return!0;jb()}return sT(e,t)}function dD(){if(Q(U.colon)){let e=Xb(0),t=G.snapshot(),n=G.noAnonFunctionType;G.noAnonFunctionType=!0,eE(),G.noAnonFunctionType=n,Eb()&&jb(),Q(U.arrow)||jb(),G.error&&G.restoreFromSnapshot(t),Zb(e)}return Z(U.arrow)}function fD(e,t=!1){if(G.tokens[G.tokens.length-1].contextualKeyword===H._async&&Q(U.lessThan)){let e=G.snapshot();if(pD()&&!G.error)return;G.restoreFromSnapshot(e)}gT(e,t)}function pD(){G.scopeDepth++;let e=G.tokens.length;return ZD(),jT()?(UT(e),!0):!1}function mD(){Tb(H._enum),G.tokens[G.tokens.length-1].type=U._enum,$(),hD()}function hD(){wb(H._of)&&X(),J(U.braceL),gD(),J(U.braceR)}function gD(){for(;!Q(U.braceR)&&!G.error&&!Z(U.ellipsis);)_D(),Q(U.braceR)||J(U.comma)}function _D(){$(),Z(U.eq)&&X()}function vD(){if(GD(U.eof),G.scopes.push(new db(0,G.tokens.length,!0)),G.scopeDepth!==0)throw Error(`Invalid scope depth at end of file: ${G.scopeDepth}`);return new MO(G.tokens,G.scopes)}function yD(e){gb&&JE()||(Q(U.at)&&SD(),bD(e))}function bD(e){if(hb&&Dw())return;let t=G.type;switch(t){case U._break:case U._continue:ED();return;case U._debugger:DD();return;case U._do:OD();return;case U._for:kD();return;case U._function:if($b()===U.dot)break;e||jb(),MD();return;case U._class:e||jb(),QD(!0);return;case U._if:ND();return;case U._return:PD();return;case U._switch:FD();return;case U._throw:ID();return;case U._try:RD();return;case U._let:case U._const:e||jb();case U._var:zD(t!==U._var);return;case U._while:BD();return;case U.braceL:WD();return;case U.semi:VD();return;case U._export:case U._import:{let e=$b();if(e===U.parenL||e===U.dot)break;X(),t===U._import?TO():uO();return}case U.name:if(G.contextualKeyword===H._async){let e=G.start,t=G.snapshot();if(X(),Q(U._function)&&!Eb()){J(U._function),XD(e,!0);return}else G.restoreFromSnapshot(t)}else if(G.contextualKeyword===H._using&&!Ob()&&$b()===U.name){zD(!0);return}else if(xD()){Tb(H._await),zD(!0);return}default:break}let n=G.tokens.length;aT();let r=null;if(G.tokens.length===n+1){let e=G.tokens[G.tokens.length-1];e.type===U.name&&(r=e.contextualKeyword)}if(r==null){Ab();return}Z(U.colon)?HD():UD(r)}function xD(){if(!q(H._await))return!1;let e=G.snapshot();return X(),!q(H._using)||Db()||(X(),!Q(U.name)||Db())?(G.restoreFromSnapshot(e),!1):(G.restoreFromSnapshot(e),!0)}function SD(){for(;Q(U.at);)CD()}function CD(){if(X(),Z(U.parenL))aT(),J(U.parenR);else{for($();Z(U.dot);)$();wD()}}function wD(){hb?Vw():TD()}function TD(){Z(U.parenL)&&bT()}function ED(){X(),kb()||($(),Ab())}function DD(){X(),Ab()}function OD(){X(),yD(!1),J(U._while),OT(),Z(U.semi)}function kD(){G.scopeDepth++;let e=G.tokens.length;jD();let t=G.tokens.length;G.scopes.push(new db(e,t,!1)),G.scopeDepth--}function AD(){return!(!q(H._using)||Cb(H._of))}function jD(){X();let e=!1;if(q(H._await)&&(e=!0,X()),J(U.parenL),Q(U.semi)){e&&jb(),KD();return}let t=xD();if(t||Q(U._var)||Q(U._let)||Q(U._const)||AD()){if(t&&Tb(H._await),X(),JD(!0,G.type!==U._var),Q(U._in)||q(H._of)){qD(e);return}KD();return}if(aT(!0),Q(U._in)||q(H._of)){qD(e);return}e&&jb(),KD()}function MD(){let e=G.start;X(),XD(e,!0)}function ND(){X(),OT(),yD(!1),Z(U._else)&&yD(!1)}function PD(){X(),kb()||(aT(),Ab())}function FD(){X(),OT(),G.scopeDepth++;let e=G.tokens.length;for(J(U.braceL);!Q(U.braceR)&&!G.error;)if(Q(U._case)||Q(U._default)){let e=Q(U._case);X(),e&&aT(),J(U.colon)}else yD(!0);X();let t=G.tokens.length;G.scopes.push(new db(e,t,!1)),G.scopeDepth--}function ID(){X(),aT(),Ab()}function LD(){qS(!0),hb&&WC()}function RD(){if(X(),WD(),Q(U._catch)){X();let e=null;if(Q(U.parenL)&&(G.scopeDepth++,e=G.tokens.length,J(U.parenL),LD(),J(U.parenR)),WD(),e!=null){let t=G.tokens.length;G.scopes.push(new db(e,t,!1)),G.scopeDepth--}}Z(U._finally)&&WD()}function zD(e){X(),JD(!1,e),Ab()}function BD(){X(),OT(),yD(!1)}function VD(){X()}function HD(){yD(!0)}function UD(e){hb?kw(e):gb?XE(e):Ab()}function WD(e=!1,t=0){let n=G.tokens.length;G.scopeDepth++,J(U.braceL),t&&(G.tokens[G.tokens.length-1].contextId=t),GD(U.braceR),t&&(G.tokens[G.tokens.length-1].contextId=t);let r=G.tokens.length;G.scopes.push(new db(n,r,e)),G.scopeDepth--}function GD(e){for(;!Z(e)&&!G.error;)yD(!0)}function KD(){J(U.semi),Q(U.semi)||aT(),J(U.semi),Q(U.parenR)||aT(),J(U.parenR),yD(!1)}function qD(e){e?wb(H._of):X(),aT(),J(U.parenR),yD(!1)}function JD(e,t){for(;;){if(YD(t),Z(U.eq)){let t=G.tokens.length-1;oT(e),G.tokens[t].rhsEndIndex=G.tokens.length}if(!Z(U.comma))break}}function YD(e){qS(e),hb?Pw():gb&&cD()}function XD(e,t,n=!1){Q(U.star)&&X(),t&&!n&&!Q(U.name)&&!Q(U._yield)&&jb();let r=null;Q(U.name)&&(t||(r=G.tokens.length,G.scopeDepth++),WS(!1));let i=G.tokens.length;G.scopeDepth++,ZD(),WT(e);let a=G.tokens.length;G.scopes.push(new db(i,a,!0)),G.scopeDepth--,r!==null&&(G.scopes.push(new db(r,a,!0)),G.scopeDepth--)}function ZD(e=!1,t=0){hb?Nw():gb&&sD(),J(U.parenL),t&&(G.tokens[G.tokens.length-1].contextId=t),JS(U.parenR,!1,!1,e,t),t&&(G.tokens[G.tokens.length-1].contextId=t)}function QD(e,t=!1){let n=vb();X(),G.tokens[G.tokens.length-1].contextId=n,G.tokens[G.tokens.length-1].isExpression=!e;let r=null;e||(r=G.tokens.length,G.scopeDepth++),cO(e,t),lO();let i=G.tokens.length;if(tO(n),!G.error&&(G.tokens[i].contextId=n,G.tokens[G.tokens.length-1].contextId=n,r!==null)){let e=G.tokens.length;G.scopes.push(new db(r,e,!1)),G.scopeDepth--}}function $D(){return Q(U.eq)||Q(U.semi)||Q(U.braceR)||Q(U.bang)||Q(U.colon)}function eO(){return Q(U.parenL)||Q(U.lessThan)}function tO(e){for(J(U.braceL);!Z(U.braceR)&&!G.error;){if(Z(U.semi))continue;if(Q(U.at)){CD();continue}let t=G.start;nO(t,e)}}function nO(e,t){hb&&tC([H._declare,H._public,H._protected,H._private,H._override]);let n=!1;if(Q(U.name)&&G.contextualKeyword===H._static){if($(),eO()){iO(e,!1);return}else if($D()){sO();return}if(G.tokens[G.tokens.length-1].type=U._static,n=!0,Q(U.braceL)){G.tokens[G.tokens.length-1].contextId=t,WD();return}}rO(e,n,t)}function rO(e,t,n){if(hb&&Ow(t))return;if(Z(U.star)){aO(n),iO(e,!1);return}aO(n);let r=!1,i=G.tokens[G.tokens.length-1];i.contextualKeyword===H._constructor&&(r=!0),oO(),eO()?iO(e,r):$D()?sO():i.contextualKeyword===H._async&&!kb()?(G.tokens[G.tokens.length-1].type=U._async,Q(U.star)&&X(),aO(n),oO(),iO(e,!1)):(i.contextualKeyword===H._get||i.contextualKeyword===H._set)&&!(kb()&&Q(U.star))?(i.contextualKeyword===H._get?G.tokens[G.tokens.length-1].type=U._get:G.tokens[G.tokens.length-1].type=U._set,aO(n),iO(e,!1)):i.contextualKeyword===H._accessor&&!kb()?(aO(n),sO()):kb()?sO():jb()}function iO(e,t){hb?uC():gb&&Q(U.lessThan)&&vE(),HT(e,t)}function aO(e){VT(e)}function oO(){if(hb){let e=Xb(0);Z(U.question),Zb(e)}}function sO(){if(hb?(Qb(U.bang),WC()):gb&&Q(U.colon)&&HE(),Q(U.eq)){let e=G.tokens.length;X(),oT(),G.tokens[e].rhsEndIndex=G.tokens.length}Ab()}function cO(e,t=!1){hb&&(!e||t)&&q(H._implements)||(Q(U.name)&&WS(!0),hb?uC():gb&&Q(U.lessThan)&&vE())}function lO(){let e=!1;Z(U._extends)?(mT(),e=!0):e=!1,hb?jw(e):gb&&nD(e)}function uO(){let e=G.tokens.length-1;hb&&Cw()||(gO()?_O():pO()?($(),Q(U.comma)&&$b()===U.star?(J(U.comma),J(U.star),Tb(H._as),$()):mO(),hO()):Z(U._default)?dO():bO()?fO():(xO(),hO()),G.tokens[e].rhsEndIndex=G.tokens.length)}function dO(){if(hb&&Ew()||gb&&YE())return;let e=G.start;Z(U._function)?XD(e,!0,!0):q(H._async)&&$b()===U._function?(wb(H._async),Z(U._function),XD(e,!0,!0)):Q(U._class)?QD(!0,!0):Q(U.at)?(SD(),QD(!0,!0)):(oT(),Ab())}function fO(){hb?Aw():gb?$E():yD(!0)}function pO(){if(hb&&bw()||gb&&QE())return!1;if(Q(U.name))return G.contextualKeyword!==H._async;if(!Q(U._default))return!1;let e=nx(),t=tx(),n=t.type===U.name&&t.contextualKeyword===H._from;if(t.type===U.comma)return!0;if(n){let t=K.charCodeAt(rx(e+4));return t===W.quotationMark||t===W.apostrophe}return!1}function mO(){Z(U.comma)&&xO()}function hO(){wb(H._from)&&(wT(),AO()),Ab()}function gO(){return gb?eD():Q(U.star)}function _O(){gb?tD():vO()}function vO(){J(U.star),q(H._as)?yO():hO()}function yO(){X(),G.tokens[G.tokens.length-1].type=U._as,$(),mO(),hO()}function bO(){return hb&&bw()||gb&&ZE()||G.type===U._var||G.type===U._const||G.type===U._let||G.type===U._function||G.type===U._class||q(H._async)||Q(U.at)}function xO(){let e=!0;for(J(U.braceL);!Z(U.braceR)&&!G.error;){if(e)e=!1;else if(J(U.comma),Z(U.braceR))break;SO()}}function SO(){if(hb){Tw();return}$(),G.tokens[G.tokens.length-1].identifierRole=Y.ExportAccess,wb(H._as)&&$()}function CO(){let e=G.snapshot();return Tb(H._module),wb(H._from)?q(H._from)?(G.restoreFromSnapshot(e),!0):(G.restoreFromSnapshot(e),!1):Q(U.comma)?(G.restoreFromSnapshot(e),!1):(G.restoreFromSnapshot(e),!0)}function wO(){q(H._module)&&CO()&&X()}function TO(){if(hb&&Q(U.name)&&$b()===U.eq){cw();return}if(hb&&q(H._type)){let e=tx();if(e.type===U.name&&e.contextualKeyword!==H._from){if(Tb(H._type),$b()===U.eq){cw();return}}else(e.type===U.star||e.type===U.braceL)&&Tb(H._type)}Q(U.string)?wT():(wO(),OO(),Tb(H._from),wT()),AO(),Ab()}function EO(){return Q(U.name)}function DO(){GS()}function OO(){gb&&aD();let e=!0;if(!(EO()&&(DO(),!Z(U.comma)))){if(Q(U.star)){X(),Tb(H._as),DO();return}for(J(U.braceL);!Z(U.braceR)&&!G.error;){if(e)e=!1;else if(Z(U.colon)&&jb(`ES2015 named imports do not destructure. Use another statement for destructuring after the import.`),J(U.comma),Z(U.braceR))break;kO()}}}function kO(){if(hb){ww();return}if(gb){oD();return}GS(),q(H._as)&&(G.tokens[G.tokens.length-1].identifierRole=Y.ImportAccess,X(),GS())}function AO(){(Q(U._with)||q(H._assert)&&!Db())&&(X(),IT(!1,!1))}function jO(){return G.pos===0&&K.charCodeAt(0)===W.numberSign&&K.charCodeAt(1)===W.exclamationMark&&cx(2),ax(),vD()}var MO=class{constructor(e,t){this.tokens=e,this.scopes=t}};function NO(e,t,n,r){if(r&&n)throw Error(`Cannot combine flow and typescript plugins.`);Sb(e,t,n,r);let i=jO();if(G.error)throw yb(G.error);return i}function PO(e){let t=e.currentIndex(),n=0,r=e.currentToken();do{let i=e.tokens[t];if(i.isOptionalChainStart&&n++,i.isOptionalChainEnd&&n--,n+=i.numNullishCoalesceStarts,n-=i.numNullishCoalesceEnds,i.contextualKeyword===H._await&&i.identifierRole==null&&i.scopeDepth===r.scopeDepth)return!0;t+=1}while(n>0&&t<e.tokens.length);return!1}var FO=class e{__init(){this.resultCode=``}__init2(){this.resultMappings=Array(this.tokens.length)}__init3(){this.tokenIndex=0}constructor(t,n,r,i,a){this.code=t,this.tokens=n,this.isFlowEnabled=r,this.disableESTransforms=i,this.helperManager=a,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this)}snapshot(){return{resultCode:this.resultCode,tokenIndex:this.tokenIndex}}restoreToSnapshot(e){this.resultCode=e.resultCode,this.tokenIndex=e.tokenIndex}dangerouslyGetAndRemoveCodeSinceSnapshot(e){let t=this.resultCode.slice(e.resultCode.length);return this.resultCode=e.resultCode,t}reset(){this.resultCode=``,this.resultMappings=Array(this.tokens.length),this.tokenIndex=0}matchesContextualAtIndex(e,t){return this.matches1AtIndex(e,U.name)&&this.tokens[e].contextualKeyword===t}identifierNameAtIndex(e){return this.identifierNameForToken(this.tokens[e])}identifierNameAtRelativeIndex(e){return this.identifierNameForToken(this.tokenAtRelativeIndex(e))}identifierName(){return this.identifierNameForToken(this.currentToken())}identifierNameForToken(e){return this.code.slice(e.start,e.end)}rawCodeForToken(e){return this.code.slice(e.start,e.end)}stringValueAtIndex(e){return this.stringValueForToken(this.tokens[e])}stringValue(){return this.stringValueForToken(this.currentToken())}stringValueForToken(e){return this.code.slice(e.start+1,e.end-1)}matches1AtIndex(e,t){return this.tokens[e].type===t}matches2AtIndex(e,t,n){return this.tokens[e].type===t&&this.tokens[e+1].type===n}matches3AtIndex(e,t,n,r){return this.tokens[e].type===t&&this.tokens[e+1].type===n&&this.tokens[e+2].type===r}matches1(e){return this.tokens[this.tokenIndex].type===e}matches2(e,t){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t}matches3(e,t,n){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t&&this.tokens[this.tokenIndex+2].type===n}matches4(e,t,n,r){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t&&this.tokens[this.tokenIndex+2].type===n&&this.tokens[this.tokenIndex+3].type===r}matches5(e,t,n,r,i){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t&&this.tokens[this.tokenIndex+2].type===n&&this.tokens[this.tokenIndex+3].type===r&&this.tokens[this.tokenIndex+4].type===i}matchesContextual(e){return this.matchesContextualAtIndex(this.tokenIndex,e)}matchesContextIdAndLabel(e,t){return this.matches1(e)&&this.currentToken().contextId===t}previousWhitespaceAndComments(){let e=this.code.slice(this.tokenIndex>0?this.tokens[this.tokenIndex-1].end:0,this.tokenIndex<this.tokens.length?this.tokens[this.tokenIndex].start:this.code.length);return this.isFlowEnabled&&(e=e.replace(/@flow/g,``)),e}replaceToken(e){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=e,this.appendTokenSuffix(),this.tokenIndex++}replaceTokenTrimmingLeftWhitespace(e){this.resultCode+=this.previousWhitespaceAndComments().replace(/[^\\r\\n]/g,``),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=e,this.appendTokenSuffix(),this.tokenIndex++}removeInitialToken(){this.replaceToken(``)}removeToken(){this.replaceTokenTrimmingLeftWhitespace(``)}removeBalancedCode(){let e=0;for(;!this.isAtEnd();){if(this.matches1(U.braceL))e++;else if(this.matches1(U.braceR)){if(e===0)return;e--}this.removeToken()}}copyExpectedToken(e){if(this.tokens[this.tokenIndex].type!==e)throw Error(`Expected token ${e}`);this.copyToken()}copyToken(){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}copyTokenWithPrefix(e){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultCode+=e,this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}appendTokenPrefix(){let e=this.currentToken();if((e.numNullishCoalesceStarts||e.isOptionalChainStart)&&(e.isAsyncOperation=PO(this)),!this.disableESTransforms){if(e.numNullishCoalesceStarts)for(let t=0;t<e.numNullishCoalesceStarts;t++)e.isAsyncOperation?(this.resultCode+=`await `,this.resultCode+=this.helperManager.getHelperName(`asyncNullishCoalesce`)):this.resultCode+=this.helperManager.getHelperName(`nullishCoalesce`),this.resultCode+=`(`;e.isOptionalChainStart&&(e.isAsyncOperation&&(this.resultCode+=`await `),this.tokenIndex>0&&this.tokenAtRelativeIndex(-1).type===U._delete?e.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName(`asyncOptionalChainDelete`):this.resultCode+=this.helperManager.getHelperName(`optionalChainDelete`):e.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName(`asyncOptionalChain`):this.resultCode+=this.helperManager.getHelperName(`optionalChain`),this.resultCode+=`([`)}}appendTokenSuffix(){let e=this.currentToken();if(e.isOptionalChainEnd&&!this.disableESTransforms&&(this.resultCode+=`])`),e.numNullishCoalesceEnds&&!this.disableESTransforms)for(let t=0;t<e.numNullishCoalesceEnds;t++)this.resultCode+=`))`}appendCode(e){this.resultCode+=e}currentToken(){return this.tokens[this.tokenIndex]}currentTokenCode(){let e=this.currentToken();return this.code.slice(e.start,e.end)}tokenAtRelativeIndex(e){return this.tokens[this.tokenIndex+e]}currentIndex(){return this.tokenIndex}nextToken(){if(this.tokenIndex===this.tokens.length)throw Error(`Unexpectedly reached end of input.`);this.tokenIndex++}previousToken(){this.tokenIndex--}finish(){if(this.tokenIndex!==this.tokens.length)throw Error(`Tried to finish processing tokens before reaching the end.`);return this.resultCode+=this.previousWhitespaceAndComments(),{code:this.resultCode,mappings:this.resultMappings}}isAtEnd(){return this.tokenIndex===this.tokens.length}};function IO(e,t,n,r){let i=t.snapshot(),a=RO(t),o=[],s=[],c=[],l=null,u=[],d=[],f=t.currentToken().contextId;if(f==null)throw Error(`Expected non-null class context ID on class open-brace.`);for(t.nextToken();!t.matchesContextIdAndLabel(U.braceR,f);)if(t.matchesContextual(H._constructor)&&!t.currentToken().isType)({constructorInitializerStatements:o,constructorInsertPos:l}=zO(t));else if(t.matches1(U.semi))r||d.push({start:t.currentIndex(),end:t.currentIndex()+1}),t.nextToken();else if(t.currentToken().isType)t.nextToken();else{let i=t.currentIndex(),a=!1,p=!1,m=!1;for(;BO(t.currentToken());)t.matches1(U._static)&&(a=!0),t.matches1(U.hash)&&(p=!0),(t.matches1(U._declare)||t.matches1(U._abstract))&&(m=!0),t.nextToken();if(a&&t.matches1(U.braceL)){LO(t,f);continue}if(p){LO(t,f);continue}if(t.matchesContextual(H._constructor)&&!t.currentToken().isType){({constructorInitializerStatements:o,constructorInsertPos:l}=zO(t));continue}let h=t.currentIndex();if(VO(t),t.matches1(U.lessThan)||t.matches1(U.parenL)){LO(t,f);continue}for(;t.currentToken().isType;)t.nextToken();if(t.matches1(U.eq)){let r=t.currentIndex(),i=t.currentToken().rhsEndIndex;if(i==null)throw Error(`Expected rhsEndIndex on class field assignment.`);for(t.nextToken();t.currentIndex()<i;)e.processToken();let o;a?(o=n.claimFreeName(`__initStatic`),c.push(o)):(o=n.claimFreeName(`__init`),s.push(o)),u.push({initializerName:o,equalsIndex:r,start:h,end:t.currentIndex()})}else(!r||m)&&d.push({start:i,end:t.currentIndex()})}return t.restoreToSnapshot(i),r?{headerInfo:a,constructorInitializerStatements:o,instanceInitializerNames:[],staticInitializerNames:[],constructorInsertPos:l,fields:[],rangesToRemove:d}:{headerInfo:a,constructorInitializerStatements:o,instanceInitializerNames:s,staticInitializerNames:c,constructorInsertPos:l,fields:u,rangesToRemove:d}}function LO(e,t){for(e.nextToken();e.currentToken().contextId!==t;)e.nextToken();for(;BO(e.tokenAtRelativeIndex(-1));)e.previousToken()}function RO(e){let t=e.currentToken(),n=t.contextId;if(n==null)throw Error(`Expected context ID on class token.`);let r=t.isExpression;if(r==null)throw Error(`Expected isExpression on class token.`);let i=null,a=!1;for(e.nextToken(),e.matches1(U.name)&&(i=e.identifierName());!e.matchesContextIdAndLabel(U.braceL,n);)e.matches1(U._extends)&&!e.currentToken().isType&&(a=!0),e.nextToken();return{isExpression:r,className:i,hasSuperclass:a}}function zO(e){let t=[];e.nextToken();let n=e.currentToken().contextId;if(n==null)throw Error(`Expected context ID on open-paren starting constructor params.`);for(;!e.matchesContextIdAndLabel(U.parenR,n);)if(e.currentToken().contextId===n){if(e.nextToken(),BO(e.currentToken())){for(e.nextToken();BO(e.currentToken());)e.nextToken();let n=e.currentToken();if(n.type!==U.name)throw Error(`Expected identifier after access modifiers in constructor arg.`);let r=e.identifierNameForToken(n);t.push(`this.${r} = ${r}`)}}else e.nextToken();for(e.nextToken();e.currentToken().isType;)e.nextToken();let r=e.currentIndex(),i=!1;for(;!e.matchesContextIdAndLabel(U.braceR,n);){if(!i&&e.matches2(U._super,U.parenL)){e.nextToken();let t=e.currentToken().contextId;if(t==null)throw Error(`Expected a context ID on the super call`);for(;!e.matchesContextIdAndLabel(U.parenR,t);)e.nextToken();r=e.currentIndex(),i=!0}e.nextToken()}return e.nextToken(),{constructorInitializerStatements:t,constructorInsertPos:r}}function BO(e){return[U._async,U._get,U._set,U.plus,U.minus,U._readonly,U._static,U._public,U._private,U._protected,U._override,U._abstract,U.star,U._declare,U.hash].includes(e.type)}function VO(e){if(e.matches1(U.bracketL)){let t=e.currentToken().contextId;if(t==null)throw Error(`Expected class context ID on computed name open bracket.`);for(;!e.matchesContextIdAndLabel(U.bracketR,t);)e.nextToken();e.nextToken()}else e.nextToken()}function HO(e){if(e.removeInitialToken(),e.removeToken(),e.removeToken(),e.removeToken(),e.matches1(U.parenL))e.removeToken(),e.removeToken(),e.removeToken();else for(;e.matches1(U.dot);)e.removeToken(),e.removeToken()}var UO={typeDeclarations:new Set,valueDeclarations:new Set};function WO(e){let t=new Set,n=new Set;for(let r=0;r<e.tokens.length;r++){let i=e.tokens[r];i.type===U.name&&Ub(i)&&(i.isType?t.add(e.identifierNameForToken(i)):n.add(e.identifierNameForToken(i)))}return{typeDeclarations:t,valueDeclarations:n}}function GO(e){let t=e.currentIndex();for(;!e.matches1AtIndex(t,U.braceR);)t++;return e.matchesContextualAtIndex(t+1,H._from)&&e.matches1AtIndex(t+2,U.string)}function KO(e){(e.matches2(U._with,U.braceL)||e.matches2(U.name,U.braceL)&&e.matchesContextual(H._assert))&&(e.removeToken(),e.removeToken(),e.removeBalancedCode(),e.removeToken())}function qO(e,t,n,r){if(!e||t)return!1;let i=n.currentToken();if(i.rhsEndIndex==null)throw Error(`Expected non-null rhsEndIndex on export token.`);let a=i.rhsEndIndex-n.currentIndex();if(a!==3&&!(a===4&&n.matches1AtIndex(i.rhsEndIndex-1,U.semi)))return!1;let o=n.tokenAtRelativeIndex(2);if(o.type!==U.name)return!1;let s=n.identifierNameForToken(o);return r.typeDeclarations.has(s)&&!r.valueDeclarations.has(s)}var JO=class e extends Ix{__init(){this.hadExport=!1}__init2(){this.hadNamedExport=!1}__init3(){this.hadDefaultExport=!1}constructor(t,n,r,i,a,o,s,c,l,u,d,f){super(),this.rootTransformer=t,this.tokens=n,this.importProcessor=r,this.nameManager=i,this.helperManager=a,this.reactHotLoaderTransformer=o,this.enableLegacyBabel5ModuleInterop=s,this.enableLegacyTypeScriptModuleInterop=c,this.isTypeScriptTransformEnabled=l,this.isFlowTransformEnabled=u,this.preserveDynamicImport=d,this.keepUnusedImports=f,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),this.declarationInfo=l?WO(n):UO}getPrefixCode(){let e=``;return this.hadExport&&(e+=`Object.defineProperty(exports, "__esModule", {value: true});`),e}getSuffixCode(){return this.enableLegacyBabel5ModuleInterop&&this.hadDefaultExport&&!this.hadNamedExport?`\nmodule.exports = exports.default;\n`:``}process(){return this.tokens.matches3(U._import,U.name,U.eq)?this.processImportEquals():this.tokens.matches1(U._import)?(this.processImport(),!0):this.tokens.matches2(U._export,U.eq)?(this.tokens.replaceToken(`module.exports`),!0):this.tokens.matches1(U._export)&&!this.tokens.currentToken().isType?(this.hadExport=!0,this.processExport()):this.tokens.matches2(U.name,U.postIncDec)&&this.processPostIncDec()?!0:this.tokens.matches1(U.name)||this.tokens.matches1(U.jsxName)?this.processIdentifier():this.tokens.matches1(U.eq)?this.processAssignment():this.tokens.matches1(U.assign)?this.processComplexAssignment():this.tokens.matches1(U.preIncDec)?this.processPreIncDec():!1}processImportEquals(){let e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.importProcessor.shouldAutomaticallyElideImportedName(e)?HO(this.tokens):this.tokens.replaceToken(`const`),!0}processImport(){if(this.tokens.matches2(U._import,U.parenL)){if(this.preserveDynamicImport){this.tokens.copyToken();return}let e=this.enableLegacyTypeScriptModuleInterop?``:`${this.helperManager.getHelperName(`interopRequireWildcard`)}(`;this.tokens.replaceToken(`Promise.resolve().then(() => ${e}require`);let t=this.tokens.currentToken().contextId;if(t==null)throw Error(`Expected context ID on dynamic import invocation.`);for(this.tokens.copyToken();!this.tokens.matchesContextIdAndLabel(U.parenR,t);)this.rootTransformer.processToken();this.tokens.replaceToken(e?`)))`:`))`);return}if(this.removeImportAndDetectIfShouldElide())this.tokens.removeToken();else{let e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),this.tokens.appendCode(this.importProcessor.claimImportCode(e))}KO(this.tokens),this.tokens.matches1(U.semi)&&this.tokens.removeToken()}removeImportAndDetectIfShouldElide(){if(this.tokens.removeInitialToken(),this.tokens.matchesContextual(H._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,U.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,H._from))return this.removeRemainingImport(),!0;if(this.tokens.matches1(U.name)||this.tokens.matches1(U.star))return this.removeRemainingImport(),!1;if(this.tokens.matches1(U.string))return!1;let e=!1,t=!1;for(;!this.tokens.matches1(U.string);)(!e&&this.tokens.matches1(U.braceL)||this.tokens.matches1(U.comma))&&(this.tokens.removeToken(),this.tokens.matches1(U.braceR)||(t=!0),(this.tokens.matches2(U.name,U.comma)||this.tokens.matches2(U.name,U.braceR)||this.tokens.matches4(U.name,U.name,U.name,U.comma)||this.tokens.matches4(U.name,U.name,U.name,U.braceR))&&(e=!0)),this.tokens.removeToken();return this.keepUnusedImports?!1:this.isTypeScriptTransformEnabled?!e:this.isFlowTransformEnabled?t&&!e:!1}removeRemainingImport(){for(;!this.tokens.matches1(U.string);)this.tokens.removeToken()}processIdentifier(){let e=this.tokens.currentToken();if(e.shadowsGlobal)return!1;if(e.identifierRole===Y.ObjectShorthand)return this.processObjectShorthand();if(e.identifierRole!==Y.Access)return!1;let t=this.importProcessor.getIdentifierReplacement(this.tokens.identifierNameForToken(e));if(!t)return!1;let n=this.tokens.currentIndex()+1;for(;n<this.tokens.tokens.length&&this.tokens.tokens[n].type===U.parenR;)n++;return this.tokens.tokens[n].type===U.parenL?this.tokens.tokenAtRelativeIndex(1).type===U.parenL&&this.tokens.tokenAtRelativeIndex(-1).type!==U._new?(this.tokens.replaceToken(`${t}.call(void 0, `),this.tokens.removeToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR)):this.tokens.replaceToken(`(0, ${t})`):this.tokens.replaceToken(t),!0}processObjectShorthand(){let e=this.tokens.identifierName(),t=this.importProcessor.getIdentifierReplacement(e);return t?(this.tokens.replaceToken(`${e}: ${t}`),!0):!1}processExport(){if(this.tokens.matches2(U._export,U._enum)||this.tokens.matches3(U._export,U._const,U._enum))return this.hadNamedExport=!0,!1;if(this.tokens.matches2(U._export,U._default))return this.tokens.matches3(U._export,U._default,U._enum)?(this.hadDefaultExport=!0,!1):(this.processExportDefault(),!0);if(this.tokens.matches2(U._export,U.braceL))return this.processExportBindings(),!0;if(this.tokens.matches2(U._export,U.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,H._type)){if(this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(U.braceL)){for(;!this.tokens.matches1(U.braceR);)this.tokens.removeToken();this.tokens.removeToken()}else this.tokens.removeToken(),this.tokens.matches1(U._as)&&(this.tokens.removeToken(),this.tokens.removeToken());return this.tokens.matchesContextual(H._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,U.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),KO(this.tokens)),!0}if(this.hadNamedExport=!0,this.tokens.matches2(U._export,U._var)||this.tokens.matches2(U._export,U._let)||this.tokens.matches2(U._export,U._const))return this.processExportVar(),!0;if(this.tokens.matches2(U._export,U._function)||this.tokens.matches3(U._export,U.name,U._function))return this.processExportFunction(),!0;if(this.tokens.matches2(U._export,U._class)||this.tokens.matches3(U._export,U._abstract,U._class)||this.tokens.matches2(U._export,U.at))return this.processExportClass(),!0;if(this.tokens.matches2(U._export,U.star))return this.processExportStar(),!0;throw Error(`Unrecognized export syntax.`)}processAssignment(){let e=this.tokens.currentIndex(),t=this.tokens.tokens[e-1];if(t.isType||t.type!==U.name||t.shadowsGlobal||e>=2&&this.tokens.matches1AtIndex(e-2,U.dot)||e>=2&&[U._var,U._let,U._const].includes(this.tokens.tokens[e-2].type))return!1;let n=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(t));return n?(this.tokens.copyToken(),this.tokens.appendCode(` ${n} =`),!0):!1}processComplexAssignment(){let e=this.tokens.currentIndex(),t=this.tokens.tokens[e-1];if(t.type!==U.name||t.shadowsGlobal||e>=2&&this.tokens.matches1AtIndex(e-2,U.dot))return!1;let n=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(t));return n?(this.tokens.appendCode(` = ${n}`),this.tokens.copyToken(),!0):!1}processPreIncDec(){let e=this.tokens.currentIndex(),t=this.tokens.tokens[e+1];if(t.type!==U.name||t.shadowsGlobal||e+2<this.tokens.tokens.length&&(this.tokens.matches1AtIndex(e+2,U.dot)||this.tokens.matches1AtIndex(e+2,U.bracketL)||this.tokens.matches1AtIndex(e+2,U.parenL)))return!1;let n=this.tokens.identifierNameForToken(t),r=this.importProcessor.resolveExportBinding(n);return r?(this.tokens.appendCode(`${r} = `),this.tokens.copyToken(),!0):!1}processPostIncDec(){let e=this.tokens.currentIndex(),t=this.tokens.tokens[e],n=this.tokens.tokens[e+1];if(t.type!==U.name||t.shadowsGlobal||e>=1&&this.tokens.matches1AtIndex(e-1,U.dot))return!1;let r=this.tokens.identifierNameForToken(t),i=this.importProcessor.resolveExportBinding(r);if(!i)return!1;let a=this.tokens.rawCodeForToken(n),o=this.importProcessor.getIdentifierReplacement(r)||r;if(a===`++`)this.tokens.replaceToken(`(${o} = ${i} = ${o} + 1, ${o} - 1)`);else if(a===`--`)this.tokens.replaceToken(`(${o} = ${i} = ${o} - 1, ${o} + 1)`);else throw Error(`Unexpected operator: ${a}`);return this.tokens.removeToken(),!0}processExportDefault(){let e=!0;if(this.tokens.matches4(U._export,U._default,U._function,U.name)||this.tokens.matches5(U._export,U._default,U.name,U._function,U.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,H._async)){this.tokens.removeInitialToken(),this.tokens.removeToken();let e=this.processNamedFunction();this.tokens.appendCode(` exports.default = ${e};`)}else if(this.tokens.matches4(U._export,U._default,U._class,U.name)||this.tokens.matches5(U._export,U._default,U._abstract,U._class,U.name)||this.tokens.matches3(U._export,U._default,U.at)){this.tokens.removeInitialToken(),this.tokens.removeToken(),this.copyDecorators(),this.tokens.matches1(U._abstract)&&this.tokens.removeToken();let e=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.default = ${e};`)}else if(qO(this.isTypeScriptTransformEnabled,this.keepUnusedImports,this.tokens,this.declarationInfo))e=!1,this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken();else if(this.reactHotLoaderTransformer){let e=this.nameManager.claimFreeName(`_default`);this.tokens.replaceToken(`let ${e}; exports.`),this.tokens.copyToken(),this.tokens.appendCode(` = ${e} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(e)}else this.tokens.replaceToken(`exports.`),this.tokens.copyToken(),this.tokens.appendCode(` =`);e&&(this.hadDefaultExport=!0)}copyDecorators(){for(;this.tokens.matches1(U.at);)if(this.tokens.copyToken(),this.tokens.matches1(U.parenL))this.tokens.copyExpectedToken(U.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR);else{for(this.tokens.copyExpectedToken(U.name);this.tokens.matches1(U.dot);)this.tokens.copyExpectedToken(U.dot),this.tokens.copyExpectedToken(U.name);this.tokens.matches1(U.parenL)&&(this.tokens.copyExpectedToken(U.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR))}}processExportVar(){this.isSimpleExportVar()?this.processSimpleExportVar():this.processComplexExportVar()}isSimpleExportVar(){let e=this.tokens.currentIndex();if(e++,e++,!this.tokens.matches1AtIndex(e,U.name))return!1;for(e++;e<this.tokens.tokens.length&&this.tokens.tokens[e].isType;)e++;return!!this.tokens.matches1AtIndex(e,U.eq)}processSimpleExportVar(){this.tokens.removeInitialToken(),this.tokens.copyToken();let e=this.tokens.identifierName();for(;!this.tokens.matches1(U.eq);)this.rootTransformer.processToken();let t=this.tokens.currentToken().rhsEndIndex;if(t==null)throw Error(`Expected = token with an end index.`);for(;this.tokens.currentIndex()<t;)this.rootTransformer.processToken();this.tokens.appendCode(`; exports.${e} = ${e}`)}processComplexExportVar(){this.tokens.removeInitialToken(),this.tokens.removeToken();let e=this.tokens.matches1(U.braceL);e&&this.tokens.appendCode(`(`);let t=0;for(;;)if(this.tokens.matches1(U.braceL)||this.tokens.matches1(U.dollarBraceL)||this.tokens.matches1(U.bracketL))t++,this.tokens.copyToken();else if(this.tokens.matches1(U.braceR)||this.tokens.matches1(U.bracketR))t--,this.tokens.copyToken();else if(t===0&&!this.tokens.matches1(U.name)&&!this.tokens.currentToken().isType)break;else if(this.tokens.matches1(U.eq)){let e=this.tokens.currentToken().rhsEndIndex;if(e==null)throw Error(`Expected = token with an end index.`);for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken()}else{let e=this.tokens.currentToken();if(Vb(e)){let t=this.tokens.identifierName(),n=this.importProcessor.getIdentifierReplacement(t);if(n===null)throw Error(`Expected a replacement for ${t} in \\`export var\\` syntax.`);Kb(e)&&(n=`${t}: ${n}`),this.tokens.replaceToken(n)}else this.rootTransformer.processToken()}if(e){let e=this.tokens.currentToken().rhsEndIndex;if(e==null)throw Error(`Expected = token with an end index.`);for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken();this.tokens.appendCode(`)`)}}processExportFunction(){this.tokens.replaceToken(``);let e=this.processNamedFunction();this.tokens.appendCode(` exports.${e} = ${e};`)}processNamedFunction(){if(this.tokens.matches1(U._function))this.tokens.copyToken();else if(this.tokens.matches2(U.name,U._function)){if(!this.tokens.matchesContextual(H._async))throw Error(`Expected async keyword in function export.`);this.tokens.copyToken(),this.tokens.copyToken()}if(this.tokens.matches1(U.star)&&this.tokens.copyToken(),!this.tokens.matches1(U.name))throw Error(`Expected identifier for exported function name.`);let e=this.tokens.identifierName();if(this.tokens.copyToken(),this.tokens.currentToken().isType)for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return this.tokens.copyExpectedToken(U.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR),this.rootTransformer.processPossibleTypeRange(),this.tokens.copyExpectedToken(U.braceL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.braceR),e}processExportClass(){this.tokens.removeInitialToken(),this.copyDecorators(),this.tokens.matches1(U._abstract)&&this.tokens.removeToken();let e=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.${e} = ${e};`)}processExportBindings(){this.tokens.removeInitialToken(),this.tokens.removeToken();let e=GO(this.tokens),t=[];for(;;){if(this.tokens.matches1(U.braceR)){this.tokens.removeToken();break}let n=jx(this.tokens);for(;this.tokens.currentIndex()<n.endIndex;)this.tokens.removeToken();if(!(n.isType||!e&&this.shouldElideExportedIdentifier(n.leftName))){let e=n.rightName;e==="default"?this.hadDefaultExport=!0:this.hadNamedExport=!0;let r=n.leftName,i=this.importProcessor.getIdentifierReplacement(r);t.push(`exports.${e} = ${i||r};`)}if(this.tokens.matches1(U.braceR)){this.tokens.removeToken();break}if(this.tokens.matches2(U.comma,U.braceR)){this.tokens.removeToken(),this.tokens.removeToken();break}else if(this.tokens.matches1(U.comma))this.tokens.removeToken();else throw Error(`Unexpected token: ${JSON.stringify(this.tokens.currentToken())}`)}if(this.tokens.matchesContextual(H._from)){this.tokens.removeToken();let e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),KO(this.tokens)}else this.tokens.appendCode(t.join(` `));this.tokens.matches1(U.semi)&&this.tokens.removeToken()}processExportStar(){for(this.tokens.removeInitialToken();!this.tokens.matches1(U.string);)this.tokens.removeToken();let e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),KO(this.tokens),this.tokens.matches1(U.semi)&&this.tokens.removeToken()}shouldElideExportedIdentifier(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.declarationInfo.valueDeclarations.has(e)}},YO=class extends Ix{constructor(e,t,n,r,i,a,o,s){super(),this.tokens=e,this.nameManager=t,this.helperManager=n,this.reactHotLoaderTransformer=r,this.isTypeScriptTransformEnabled=i,this.isFlowTransformEnabled=a,this.keepUnusedImports=o,this.nonTypeIdentifiers=i&&!o?Gx(e,s):new Set,this.declarationInfo=i&&!o?WO(e):UO,this.injectCreateRequireForImportRequire=!!s.injectCreateRequireForImportRequire}process(){if(this.tokens.matches3(U._import,U.name,U.eq))return this.processImportEquals();if(this.tokens.matches4(U._import,U.name,U.name,U.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,H._type)){this.tokens.removeInitialToken();for(let e=0;e<7;e++)this.tokens.removeToken();return!0}if(this.tokens.matches2(U._export,U.eq))return this.tokens.replaceToken(`module.exports`),!0;if(this.tokens.matches5(U._export,U._import,U.name,U.name,U.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,H._type)){this.tokens.removeInitialToken();for(let e=0;e<8;e++)this.tokens.removeToken();return!0}if(this.tokens.matches1(U._import))return this.processImport();if(this.tokens.matches2(U._export,U._default))return this.processExportDefault();if(this.tokens.matches2(U._export,U.braceL))return this.processNamedExports();if(this.tokens.matches2(U._export,U.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,H._type)){if(this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(U.braceL)){for(;!this.tokens.matches1(U.braceR);)this.tokens.removeToken();this.tokens.removeToken()}else this.tokens.removeToken(),this.tokens.matches1(U._as)&&(this.tokens.removeToken(),this.tokens.removeToken());return this.tokens.matchesContextual(H._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,U.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),KO(this.tokens)),!0}return!1}processImportEquals(){let e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.shouldAutomaticallyElideImportedName(e)?HO(this.tokens):this.injectCreateRequireForImportRequire?(this.tokens.replaceToken(`const`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.replaceToken(this.helperManager.getHelperName(`require`))):this.tokens.replaceToken(`const`),!0}processImport(){if(this.tokens.matches2(U._import,U.parenL))return!1;let e=this.tokens.snapshot();if(this.removeImportTypeBindings()){for(this.tokens.restoreToSnapshot(e);!this.tokens.matches1(U.string);)this.tokens.removeToken();this.tokens.removeToken(),KO(this.tokens),this.tokens.matches1(U.semi)&&this.tokens.removeToken()}return!0}removeImportTypeBindings(){if(this.tokens.copyExpectedToken(U._import),this.tokens.matchesContextual(H._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,U.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,H._from))return!0;if(this.tokens.matches1(U.string))return this.tokens.copyToken(),!1;this.tokens.matchesContextual(H._module)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,H._from)&&this.tokens.copyToken();let e=!1,t=!1,n=!1;if(this.tokens.matches1(U.name)&&(this.shouldAutomaticallyElideImportedName(this.tokens.identifierName())?(this.tokens.removeToken(),this.tokens.matches1(U.comma)&&this.tokens.removeToken()):(e=!0,this.tokens.copyToken(),this.tokens.matches1(U.comma)&&(n=!0,this.tokens.removeToken()))),this.tokens.matches1(U.star))this.shouldAutomaticallyElideImportedName(this.tokens.identifierNameAtRelativeIndex(2))?(this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.removeToken()):(n&&this.tokens.appendCode(`,`),e=!0,this.tokens.copyExpectedToken(U.star),this.tokens.copyExpectedToken(U.name),this.tokens.copyExpectedToken(U.name));else if(this.tokens.matches1(U.braceL)){for(n&&this.tokens.appendCode(`,`),this.tokens.copyToken();!this.tokens.matches1(U.braceR);){t=!0;let n=jx(this.tokens);if(n.isType||this.shouldAutomaticallyElideImportedName(n.rightName)){for(;this.tokens.currentIndex()<n.endIndex;)this.tokens.removeToken();this.tokens.matches1(U.comma)&&this.tokens.removeToken()}else{for(e=!0;this.tokens.currentIndex()<n.endIndex;)this.tokens.copyToken();this.tokens.matches1(U.comma)&&this.tokens.copyToken()}}this.tokens.copyExpectedToken(U.braceR)}return this.keepUnusedImports?!1:this.isTypeScriptTransformEnabled?!e:this.isFlowTransformEnabled?t&&!e:!1}shouldAutomaticallyElideImportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.nonTypeIdentifiers.has(e)}processExportDefault(){if(qO(this.isTypeScriptTransformEnabled,this.keepUnusedImports,this.tokens,this.declarationInfo))return this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken(),!0;if(!(this.tokens.matches4(U._export,U._default,U._function,U.name)||this.tokens.matches5(U._export,U._default,U.name,U._function,U.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,H._async)||this.tokens.matches4(U._export,U._default,U._class,U.name)||this.tokens.matches5(U._export,U._default,U._abstract,U._class,U.name))&&this.reactHotLoaderTransformer){let e=this.nameManager.claimFreeName(`_default`);return this.tokens.replaceToken(`let ${e}; export`),this.tokens.copyToken(),this.tokens.appendCode(` ${e} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(e),!0}return!1}processNamedExports(){if(!this.isTypeScriptTransformEnabled)return!1;this.tokens.copyExpectedToken(U._export),this.tokens.copyExpectedToken(U.braceL);let e=GO(this.tokens),t=!1;for(;!this.tokens.matches1(U.braceR);){let n=jx(this.tokens);if(n.isType||!e&&this.shouldElideExportedName(n.leftName)){for(;this.tokens.currentIndex()<n.endIndex;)this.tokens.removeToken();this.tokens.matches1(U.comma)&&this.tokens.removeToken()}else{for(t=!0;this.tokens.currentIndex()<n.endIndex;)this.tokens.copyToken();this.tokens.matches1(U.comma)&&this.tokens.copyToken()}}return this.tokens.copyExpectedToken(U.braceR),!this.keepUnusedImports&&e&&!t&&(this.tokens.removeToken(),this.tokens.removeToken(),KO(this.tokens)),!0}shouldElideExportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&this.declarationInfo.typeDeclarations.has(e)&&!this.declarationInfo.valueDeclarations.has(e)}},XO=class extends Ix{constructor(e,t,n){super(),this.rootTransformer=e,this.tokens=t,this.isImportsTransformEnabled=n}process(){return this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange()?!0:this.tokens.matches1(U._enum)?(this.processEnum(),!0):this.tokens.matches2(U._export,U._enum)?(this.processNamedExportEnum(),!0):this.tokens.matches3(U._export,U._default,U._enum)?(this.processDefaultExportEnum(),!0):!1}processNamedExportEnum(){if(this.isImportsTransformEnabled){this.tokens.removeInitialToken();let e=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.tokens.appendCode(` exports.${e} = ${e};`)}else this.tokens.copyToken(),this.processEnum()}processDefaultExportEnum(){this.tokens.removeInitialToken(),this.tokens.removeToken();let e=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.isImportsTransformEnabled?this.tokens.appendCode(` exports.default = ${e};`):this.tokens.appendCode(` export default ${e};`)}processEnum(){this.tokens.replaceToken(`const`),this.tokens.copyExpectedToken(U.name);let e=!1;this.tokens.matchesContextual(H._of)&&(this.tokens.removeToken(),e=this.tokens.matchesContextual(H._symbol),this.tokens.removeToken());let t=this.tokens.matches3(U.braceL,U.name,U.eq);this.tokens.appendCode(` = require("flow-enums-runtime")`);let n=!e&&!t;for(this.tokens.replaceTokenTrimmingLeftWhitespace(n?`.Mirrored([`:`({`);!this.tokens.matches1(U.braceR);){if(this.tokens.matches1(U.ellipsis)){this.tokens.removeToken();break}this.processEnumElement(e,t),this.tokens.matches1(U.comma)&&this.tokens.copyToken()}this.tokens.replaceToken(n?`]);`:`});`)}processEnumElement(e,t){if(e){let e=this.tokens.identifierName();this.tokens.copyToken(),this.tokens.appendCode(`: Symbol("${e}")`)}else t?(this.tokens.copyToken(),this.tokens.replaceTokenTrimmingLeftWhitespace(`:`),this.tokens.copyToken()):this.tokens.replaceToken(`"${this.tokens.identifierName()}"`)}};function ZO(e){let t,n=e[0],r=1;for(;r<e.length;){let i=e[r],a=e[r+1];if(r+=2,(i===`optionalAccess`||i===`optionalCall`)&&n==null)return;i===`access`||i===`optionalAccess`?(t=n,n=a(n)):(i===`call`||i===`optionalCall`)&&(n=a((...e)=>n.call(t,...e)),t=void 0)}return n}var QO=`jest`,$O=[`mock`,`unmock`,`enableAutomock`,`disableAutomock`],ek=class e extends Ix{__init(){this.hoistedFunctionNames=[]}constructor(t,n,r,i){super(),this.rootTransformer=t,this.tokens=n,this.nameManager=r,this.importProcessor=i,e.prototype.__init.call(this)}process(){return this.tokens.currentToken().scopeDepth===0&&this.tokens.matches4(U.name,U.dot,U.name,U.parenL)&&this.tokens.identifierName()===QO?!ZO([this,`access`,e=>e.importProcessor,`optionalAccess`,e=>e.getGlobalNames,`call`,e=>e(),`optionalAccess`,e=>e.has,`call`,e=>e(QO)])&&this.extractHoistedCalls():!1}getHoistedCode(){return this.hoistedFunctionNames.length>0?this.hoistedFunctionNames.map(e=>`${e}();`).join(``):``}extractHoistedCalls(){this.tokens.removeToken();let e=!1;for(;this.tokens.matches3(U.dot,U.name,U.parenL);){let t=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);if($O.includes(t)){let t=this.nameManager.claimFreeName(`__jestHoist`);this.hoistedFunctionNames.push(t),this.tokens.replaceToken(`function ${t}(){${QO}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR),this.tokens.appendCode(`;}`),e=!1}else e?this.tokens.copyToken():this.tokens.replaceToken(`${QO}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR),e=!0}return!0}},tk=class extends Ix{constructor(e){super(),this.tokens=e}process(){if(this.tokens.matches1(U.num)){let e=this.tokens.currentTokenCode();if(e.includes(`_`))return this.tokens.replaceToken(e.replace(/_/g,``)),!0}return!1}},nk=class extends Ix{constructor(e,t){super(),this.tokens=e,this.nameManager=t}process(){return this.tokens.matches2(U._catch,U.braceL)?(this.tokens.copyToken(),this.tokens.appendCode(` (${this.nameManager.claimFreeName(`e`)})`),!0):!1}},rk=class extends Ix{constructor(e,t){super(),this.tokens=e,this.nameManager=t}process(){if(this.tokens.matches1(U.nullishCoalescing)){let e=this.tokens.currentToken();return this.tokens.tokens[e.nullishStartIndex].isAsyncOperation?this.tokens.replaceTokenTrimmingLeftWhitespace(`, async () => (`):this.tokens.replaceTokenTrimmingLeftWhitespace(`, () => (`),!0}if(this.tokens.matches1(U._delete)&&this.tokens.tokenAtRelativeIndex(1).isOptionalChainStart)return this.tokens.removeInitialToken(),!0;let e=this.tokens.currentToken().subscriptStartIndex;if(e!=null&&this.tokens.tokens[e].isOptionalChainStart&&this.tokens.tokenAtRelativeIndex(-1).type!==U._super){let t=this.nameManager.claimFreeName(`_`),n;if(n=e>0&&this.tokens.matches1AtIndex(e-1,U._delete)&&this.isLastSubscriptInChain()?`${t} => delete ${t}`:`${t} => ${t}`,this.tokens.tokens[e].isAsyncOperation&&(n=`async ${n}`),this.tokens.matches2(U.questionDot,U.parenL)||this.tokens.matches2(U.questionDot,U.lessThan))this.justSkippedSuper()&&this.tokens.appendCode(`.bind(this)`),this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'optionalCall\', ${n}`);else if(this.tokens.matches2(U.questionDot,U.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'optionalAccess\', ${n}`);else if(this.tokens.matches1(U.questionDot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'optionalAccess\', ${n}.`);else if(this.tokens.matches1(U.dot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'access\', ${n}.`);else if(this.tokens.matches1(U.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'access\', ${n}[`);else if(this.tokens.matches1(U.parenL))this.justSkippedSuper()&&this.tokens.appendCode(`.bind(this)`),this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'call\', ${n}(`);else throw Error(`Unexpected subscript operator in optional chain.`);return!0}return!1}isLastSubscriptInChain(){let e=0;for(let t=this.tokens.currentIndex()+1;;t++){if(t>=this.tokens.tokens.length)throw Error(`Reached the end of the code while finding the end of the access chain.`);if(this.tokens.tokens[t].isOptionalChainStart?e++:this.tokens.tokens[t].isOptionalChainEnd&&e--,e<0)return!0;if(e===0&&this.tokens.tokens[t].subscriptStartIndex!=null)return!1}}justSkippedSuper(){let e=0,t=this.tokens.currentIndex()-1;for(;;){if(t<0)throw Error(`Reached the start of the code while finding the start of the access chain.`);if(this.tokens.tokens[t].isOptionalChainStart?e--:this.tokens.tokens[t].isOptionalChainEnd&&e++,e<0)return!1;if(e===0&&this.tokens.tokens[t].subscriptStartIndex!=null)return this.tokens.tokens[t-1].type===U._super;t--}}},ik=class extends Ix{constructor(e,t,n,r){super(),this.rootTransformer=e,this.tokens=t,this.importProcessor=n,this.options=r}process(){let e=this.tokens.currentIndex();if(this.tokens.identifierName()===`createReactClass`){let t=this.importProcessor&&this.importProcessor.getIdentifierReplacement(`createReactClass`);return t?this.tokens.replaceToken(`(0, ${t})`):this.tokens.copyToken(),this.tryProcessCreateClassCall(e),!0}if(this.tokens.matches3(U.name,U.dot,U.name)&&this.tokens.identifierName()===`React`&&this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+2)===`createClass`){let t=this.importProcessor&&this.importProcessor.getIdentifierReplacement(`React`)||`React`;return t?(this.tokens.replaceToken(t),this.tokens.copyToken(),this.tokens.copyToken()):(this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.copyToken()),this.tryProcessCreateClassCall(e),!0}return!1}tryProcessCreateClassCall(e){let t=this.findDisplayName(e);t&&this.classNeedsDisplayName()&&(this.tokens.copyExpectedToken(U.parenL),this.tokens.copyExpectedToken(U.braceL),this.tokens.appendCode(`displayName: \'${t}\',`),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.braceR),this.tokens.copyExpectedToken(U.parenR))}findDisplayName(e){return e<2?null:this.tokens.matches2AtIndex(e-2,U.name,U.eq)||e>=2&&this.tokens.tokens[e-2].identifierRole===Y.ObjectKey?this.tokens.identifierNameAtIndex(e-2):this.tokens.matches2AtIndex(e-2,U._export,U._default)?this.getDisplayNameFromFilename():null}getDisplayNameFromFilename(){let e=(this.options.filePath||`unknown`).split(`/`),t=e[e.length-1],n=t.lastIndexOf(`.`),r=n===-1?t:t.slice(0,n);return r===`index`&&e[e.length-2]?e[e.length-2]:r}classNeedsDisplayName(){let e=this.tokens.currentIndex();if(!this.tokens.matches2(U.parenL,U.braceL))return!1;let t=e+1,n=this.tokens.tokens[t].contextId;if(n==null)throw Error(`Expected non-null context ID on object open-brace.`);for(;e<this.tokens.tokens.length;e++){let t=this.tokens.tokens[e];if(t.type===U.braceR&&t.contextId===n){e++;break}if(this.tokens.identifierNameAtIndex(e)===`displayName`&&this.tokens.tokens[e].identifierRole===Y.ObjectKey&&t.contextId===n)return!1}if(e===this.tokens.tokens.length)throw Error(`Unexpected end of input when processing React class.`);return this.tokens.matches1AtIndex(e,U.parenR)||this.tokens.matches2AtIndex(e,U.comma,U.parenR)}},ak=class e extends Ix{__init(){this.extractedDefaultExportName=null}constructor(t,n){super(),this.tokens=t,this.filePath=n,e.prototype.__init.call(this)}setExtractedDefaultExportName(e){this.extractedDefaultExportName=e}getPrefixCode(){return`\n (function () {\n var enterModule = require(\'react-hot-loader\').enterModule;\n enterModule && enterModule(module);\n })();`.replace(/\\s+/g,` `).trim()}getSuffixCode(){let e=new Set;for(let t of this.tokens.tokens)!t.isType&&Ub(t)&&t.identifierRole!==Y.ImportDeclaration&&e.add(this.tokens.identifierNameForToken(t));let t=Array.from(e).map(e=>({variableName:e,uniqueLocalName:e}));return this.extractedDefaultExportName&&t.push({variableName:this.extractedDefaultExportName,uniqueLocalName:`default`}),`\n;(function () {\n var reactHotLoader = require(\'react-hot-loader\').default;\n var leaveModule = require(\'react-hot-loader\').leaveModule;\n if (!reactHotLoader) {\n return;\n }\n${t.map(({variableName:e,uniqueLocalName:t})=>` reactHotLoader.register(${e}, "${t}", ${JSON.stringify(this.filePath||``)});`).join(`\n`)}\n leaveModule(module);\n})();`}process(){return!1}},ok=new Set(`break.case.catch.class.const.continue.debugger.default.delete.do.else.export.extends.finally.for.function.if.import.in.instanceof.new.return.super.switch.this.throw.try.typeof.var.void.while.with.yield.enum.implements.interface.let.package.private.protected.public.static.await.false.null.true`.split(`.`));function sk(e){if(e.length===0||!Lb[e.charCodeAt(0)])return!1;for(let t=1;t<e.length;t++)if(!Ib[e.charCodeAt(t)])return!1;return!ok.has(e)}var ck=class extends Ix{constructor(e,t,n){super(),this.rootTransformer=e,this.tokens=t,this.isImportsTransformEnabled=n}process(){return this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange()?!0:this.tokens.matches1(U._public)||this.tokens.matches1(U._protected)||this.tokens.matches1(U._private)||this.tokens.matches1(U._abstract)||this.tokens.matches1(U._readonly)||this.tokens.matches1(U._override)||this.tokens.matches1(U.nonNullAssertion)?(this.tokens.removeInitialToken(),!0):this.tokens.matches1(U._enum)||this.tokens.matches2(U._const,U._enum)?(this.processEnum(),!0):this.tokens.matches2(U._export,U._enum)||this.tokens.matches3(U._export,U._const,U._enum)?(this.processEnum(!0),!0):!1}processEnum(e=!1){for(this.tokens.removeInitialToken();this.tokens.matches1(U._const)||this.tokens.matches1(U._enum);)this.tokens.removeToken();let t=this.tokens.identifierName();this.tokens.removeToken(),e&&!this.isImportsTransformEnabled&&this.tokens.appendCode(`export `),this.tokens.appendCode(`var ${t}; (function (${t})`),this.tokens.copyExpectedToken(U.braceL),this.processEnumBody(t),this.tokens.copyExpectedToken(U.braceR),e&&this.isImportsTransformEnabled?this.tokens.appendCode(`)(${t} || (exports.${t} = ${t} = {}));`):this.tokens.appendCode(`)(${t} || (${t} = {}));`)}processEnumBody(e){let t=null;for(;!this.tokens.matches1(U.braceR);){let{nameStringCode:n,variableName:r}=this.extractEnumKeyInfo(this.tokens.currentToken());this.tokens.removeInitialToken(),this.tokens.matches3(U.eq,U.string,U.comma)||this.tokens.matches3(U.eq,U.string,U.braceR)?this.processStringLiteralEnumMember(e,n,r):this.tokens.matches1(U.eq)?this.processExplicitValueEnumMember(e,n,r):this.processImplicitValueEnumMember(e,n,r,t),this.tokens.matches1(U.comma)&&this.tokens.removeToken(),t=r??`${e}[${n}]`}}extractEnumKeyInfo(e){if(e.type===U.name){let t=this.tokens.identifierNameForToken(e);return{nameStringCode:`"${t}"`,variableName:sk(t)?t:null}}else if(e.type===U.string){let t=this.tokens.stringValueForToken(e);return{nameStringCode:this.tokens.code.slice(e.start,e.end),variableName:sk(t)?t:null}}else throw Error(`Expected name or string at beginning of enum element.`)}processStringLiteralEnumMember(e,t,n){n==null?(this.tokens.appendCode(`${e}[${t}]`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(`;`)):(this.tokens.appendCode(`const ${n}`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(`; ${e}[${t}] = ${n};`))}processExplicitValueEnumMember(e,t,n){let r=this.tokens.currentToken().rhsEndIndex;if(r==null)throw Error(`Expected rhsEndIndex on enum assign.`);if(n!=null){for(this.tokens.appendCode(`const ${n}`),this.tokens.copyToken();this.tokens.currentIndex()<r;)this.rootTransformer.processToken();this.tokens.appendCode(`; ${e}[${e}[${t}] = ${n}] = ${t};`)}else{for(this.tokens.appendCode(`${e}[${e}[${t}]`),this.tokens.copyToken();this.tokens.currentIndex()<r;)this.rootTransformer.processToken();this.tokens.appendCode(`] = ${t};`)}}processImplicitValueEnumMember(e,t,n,r){let i=r==null?`0`:`${r} + 1`;n!=null&&(this.tokens.appendCode(`const ${n} = ${i}; `),i=n),this.tokens.appendCode(`${e}[${e}[${t}] = ${i}] = ${t};`)}},lk=class e{__init(){this.transformers=[]}__init2(){this.generatedVariables=[]}constructor(t,n,r,i){e.prototype.__init.call(this),e.prototype.__init2.call(this),this.nameManager=t.nameManager,this.helperManager=t.helperManager;let{tokenProcessor:a,importProcessor:o}=t;this.tokens=a,this.isImportsTransformEnabled=n.includes(`imports`),this.isReactHotLoaderTransformEnabled=n.includes(`react-hot-loader`),this.disableESTransforms=!!i.disableESTransforms,i.disableESTransforms||(this.transformers.push(new rk(a,this.nameManager)),this.transformers.push(new tk(a)),this.transformers.push(new nk(a,this.nameManager))),n.includes(`jsx`)&&(i.jsxRuntime!==`preserve`&&this.transformers.push(new Lx(this,a,o,this.nameManager,i)),this.transformers.push(new ik(this,a,o,i)));let s=null;if(n.includes(`react-hot-loader`)){if(!i.filePath)throw Error(`filePath is required when using the react-hot-loader transform.`);s=new ak(a,i.filePath),this.transformers.push(s)}if(n.includes(`imports`)){if(o===null)throw Error(`Expected non-null importProcessor with imports transform enabled.`);this.transformers.push(new JO(this,a,o,this.nameManager,this.helperManager,s,r,!!i.enableLegacyTypeScriptModuleInterop,n.includes(`typescript`),n.includes(`flow`),!!i.preserveDynamicImport,!!i.keepUnusedImports))}else this.transformers.push(new YO(a,this.nameManager,this.helperManager,s,n.includes(`typescript`),n.includes(`flow`),!!i.keepUnusedImports,i));n.includes(`flow`)&&this.transformers.push(new XO(this,a,n.includes(`imports`))),n.includes(`typescript`)&&this.transformers.push(new ck(this,a,n.includes(`imports`))),n.includes(`jest`)&&this.transformers.push(new ek(this,a,this.nameManager,o))}transform(){this.tokens.reset(),this.processBalancedCode();let e=this.isImportsTransformEnabled?`"use strict";`:``;for(let t of this.transformers)e+=t.getPrefixCode();e+=this.helperManager.emitHelpers(),e+=this.generatedVariables.map(e=>` var ${e};`).join(``);for(let t of this.transformers)e+=t.getHoistedCode();let t=``;for(let e of this.transformers)t+=e.getSuffixCode();let n=this.tokens.finish(),{code:r}=n;if(r.startsWith(`#!`)){let i=r.indexOf(`\n`);return i===-1&&(i=r.length,r+=`\n`),{code:r.slice(0,i+1)+e+r.slice(i+1)+t,mappings:this.shiftMappings(n.mappings,e.length)}}else return{code:e+r+t,mappings:this.shiftMappings(n.mappings,e.length)}}processBalancedCode(){let e=0,t=0;for(;!this.tokens.isAtEnd();){if(this.tokens.matches1(U.braceL)||this.tokens.matches1(U.dollarBraceL))e++;else if(this.tokens.matches1(U.braceR)){if(e===0)return;e--}if(this.tokens.matches1(U.parenL))t++;else if(this.tokens.matches1(U.parenR)){if(t===0)return;t--}this.processToken()}}processToken(){if(this.tokens.matches1(U._class)){this.processClass();return}for(let e of this.transformers)if(e.process())return;this.tokens.copyToken()}processNamedClass(){if(!this.tokens.matches2(U._class,U.name))throw Error(`Expected identifier for exported class name.`);let e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.processClass(),e}processClass(){let e=IO(this,this.tokens,this.nameManager,this.disableESTransforms),t=(e.headerInfo.isExpression||!e.headerInfo.className)&&e.staticInitializerNames.length+e.instanceInitializerNames.length>0,n=e.headerInfo.className;t&&(n=this.nameManager.claimFreeName(`_class`),this.generatedVariables.push(n),this.tokens.appendCode(` (${n} =`));let r=this.tokens.currentToken().contextId;if(r==null)throw Error(`Expected class to have a context ID.`);for(this.tokens.copyExpectedToken(U._class);!this.tokens.matchesContextIdAndLabel(U.braceL,r);)this.processToken();this.processClassBody(e,n);let i=e.staticInitializerNames.map(e=>`${n}.${e}()`);t?this.tokens.appendCode(`, ${i.map(e=>`${e}, `).join(``)}${n})`):e.staticInitializerNames.length>0&&this.tokens.appendCode(` ${i.map(e=>`${e};`).join(` `)}`)}processClassBody(e,t){let{headerInfo:n,constructorInsertPos:r,constructorInitializerStatements:i,fields:a,instanceInitializerNames:o,rangesToRemove:s}=e,c=0,l=0,u=this.tokens.currentToken().contextId;if(u==null)throw Error(`Expected non-null context ID on class.`);this.tokens.copyExpectedToken(U.braceL),this.isReactHotLoaderTransformEnabled&&this.tokens.appendCode(`__reactstandin__regenerateByEval(key, code) {this[key] = eval(code);}`);let d=i.length+o.length>0;if(r===null&&d){let e=this.makeConstructorInitCode(i,o,t);if(n.hasSuperclass){let t=this.nameManager.claimFreeName(`args`);this.tokens.appendCode(`constructor(...${t}) { super(...${t}); ${e}; }`)}else this.tokens.appendCode(`constructor() { ${e}; }`)}for(;!this.tokens.matchesContextIdAndLabel(U.braceR,u);)if(c<a.length&&this.tokens.currentIndex()===a[c].start){let e=!1;for(this.tokens.matches1(U.bracketL)?this.tokens.copyTokenWithPrefix(`${a[c].initializerName}() {this`):this.tokens.matches1(U.string)||this.tokens.matches1(U.num)?(this.tokens.copyTokenWithPrefix(`${a[c].initializerName}() {this[`),e=!0):this.tokens.copyTokenWithPrefix(`${a[c].initializerName}() {this.`);this.tokens.currentIndex()<a[c].end;)e&&this.tokens.currentIndex()===a[c].equalsIndex&&this.tokens.appendCode(`]`),this.processToken();this.tokens.appendCode(`}`),c++}else if(l<s.length&&this.tokens.currentIndex()>=s[l].start){for(this.tokens.currentIndex()<s[l].end&&this.tokens.removeInitialToken();this.tokens.currentIndex()<s[l].end;)this.tokens.removeToken();l++}else this.tokens.currentIndex()===r?(this.tokens.copyToken(),d&&this.tokens.appendCode(`;${this.makeConstructorInitCode(i,o,t)};`),this.processToken()):this.processToken();this.tokens.copyExpectedToken(U.braceR)}makeConstructorInitCode(e,t,n){return[...e,...t.map(e=>`${n}.prototype.${e}.call(this)`)].join(`;`)}processPossibleArrowParamEnd(){if(this.tokens.matches2(U.parenR,U.colon)&&this.tokens.tokenAtRelativeIndex(1).isType){let e=this.tokens.currentIndex()+1;for(;this.tokens.tokens[e].isType;)e++;if(this.tokens.matches1AtIndex(e,U.arrow)){for(this.tokens.removeInitialToken();this.tokens.currentIndex()<e;)this.tokens.removeToken();return this.tokens.replaceTokenTrimmingLeftWhitespace(`) =>`),!0}}return!1}processPossibleAsyncArrowWithTypeParams(){if(!this.tokens.matchesContextual(H._async)&&!this.tokens.matches1(U._async))return!1;let e=this.tokens.tokenAtRelativeIndex(1);if(e.type!==U.lessThan||!e.isType)return!1;let t=this.tokens.currentIndex()+1;for(;this.tokens.tokens[t].isType;)t++;if(this.tokens.matches1AtIndex(t,U.parenL)){for(this.tokens.replaceToken(`async (`),this.tokens.removeInitialToken();this.tokens.currentIndex()<t;)this.tokens.removeToken();return this.tokens.removeToken(),this.processBalancedCode(),this.processToken(),!0}return!1}processPossibleTypeRange(){if(this.tokens.currentToken().isType){for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return!0}return!1}shiftMappings(e,t){for(let n=0;n<e.length;n++){let r=e[n];r!==void 0&&(e[n]=r+t)}return e}};o((e=>{e.__esModule=!0,e.LinesAndColumns=void 0;var t=`\n`,n=`\\r`;e.LinesAndColumns=function(){function e(e){this.string=e;for(var r=[0],i=0;i<e.length;)switch(e[i]){case t:i+=t.length,r.push(i);break;case n:i+=n.length,e[i]===t&&(i+=t.length),r.push(i);break;default:i++;break}this.offsets=r}return e.prototype.locationForIndex=function(e){if(e<0||e>this.string.length)return null;for(var t=0,n=this.offsets;n[t+1]<=e;)t++;var r=e-n[t];return{line:t,column:r}},e.prototype.indexForLocation=function(e){var t=e.line,n=e.column;return t<0||t>=this.offsets.length||n<0||n>this.lengthOfLine(t)?null:this.offsets[t]+n},e.prototype.lengthOfLine=function(e){var t=this.offsets[e];return(e===this.offsets.length-1?this.string.length:this.offsets[e+1])-t},e}()}))();function uk(e){let t=new Set;for(let n=0;n<e.tokens.length;n++)e.matches1AtIndex(n,U._import)&&!e.matches3AtIndex(n,U._import,U.name,U.eq)&&dk(e,n,t);return t}function dk(e,t,n){t++,!e.matches1AtIndex(t,U.parenL)&&(e.matches1AtIndex(t,U.name)&&(n.add(e.identifierNameAtIndex(t)),t++,e.matches1AtIndex(t,U.comma)&&t++),e.matches1AtIndex(t,U.star)&&(t+=2,n.add(e.identifierNameAtIndex(t)),t++),e.matches1AtIndex(t,U.braceL)&&(t++,fk(e,t,n)))}function fk(e,t,n){for(;;){if(e.matches1AtIndex(t,U.braceR))return;let r=jx(e,t);if(t=r.endIndex,r.isType||n.add(r.rightName),e.matches2AtIndex(t,U.comma,U.braceR)||e.matches1AtIndex(t,U.braceR))return;if(e.matches1AtIndex(t,U.comma))t++;else throw Error(`Unexpected token: ${JSON.stringify(e.tokens[t])}`)}}function pk(e,t){VS(t);try{let n=mk(e,t),r=new lk(n,t.transforms,!!t.enableLegacyBabel5ModuleInterop,t).transform(),i={code:r.code};if(t.sourceMapOptions){if(!t.filePath)throw Error(`filePath must be specified when generating a source map.`);i={...i,sourceMap:ES(r,t.filePath,t.sourceMapOptions,e,n.tokenProcessor.tokens)}}return i}catch(e){throw t.filePath&&(e.message=`Error transforming ${t.filePath}: ${e.message}`),e}}function mk(e,t){let n=t.transforms.includes(`jsx`),r=t.transforms.includes(`typescript`),i=t.transforms.includes(`flow`),a=t.disableESTransforms===!0,o=NO(e,n,r,i),s=o.tokens,c=o.scopes,l=new FS(e,s),u=new kS(l),d=new FO(e,s,i,a,u),f=!!t.enableLegacyTypeScriptModuleInterop,p=null;return t.transforms.includes(`imports`)?(p=new Kx(l,d,f,t,t.transforms.includes(`typescript`),!!t.keepUnusedImports,u),p.preprocessTokens(),AS(d,c,p.getGlobalNames()),t.transforms.includes(`typescript`)&&!t.keepUnusedImports&&p.pruneTypeOnlyImports()):t.transforms.includes(`typescript`)&&!t.keepUnusedImports&&AS(d,c,uk(d)),{tokenProcessor:d,scopes:c,nameManager:l,importProcessor:p,helperManager:u}}var hk={react:d,"react/jsx-runtime":V};function gk(e){if(e in hk)return hk[e];throw Error(`\'${e}\' cannot be imported here. Only \'react\' can.`)}function _k(e){let{code:t}=pk(e,{transforms:[`typescript`,`jsx`,`imports`],jsxRuntime:`automatic`,production:!0}),n={require:gk,module:{exports:{}},ran:!1};window.__componentCode=n;let r=document.createElement(`script`);if(r.textContent=`(function (require, module, exports) {\ntry {\n${t}\n} catch (error) { __componentCode.error = error; }\n__componentCode.ran = true;\n})(__componentCode.require, __componentCode.module, __componentCode.module.exports);`,document.head.append(r),r.remove(),delete window.__componentCode,n.error)throw n.error;if(!n.ran)throw Error(`The host did not let the component run.`);let{default:i,...a}=n.module.exports;return typeof i==`function`&&i.name&&i.name!=="default"?{[i.name]:i,...a}:a}function vk({error:e}){throw e}function yk({source:e,code:t,file:n=`Code`,controls:r,note:i,onChange:a}){let o=(0,d.useMemo)(()=>{try{return{scope:_k(e)}}catch(e){return{error:e}}},[e]);return o.scope?(0,V.jsx)(ky,{interactive:!0,scope:o.scope,code:t,file:n,controls:r,note:i,onChange:({prop:e,value:t,code:r})=>a({prop:e,value:t,file:n,files:{[n]:r}})}):(0,V.jsx)(ky,{code:t,file:n,children:(0,V.jsx)(vk,{error:o.error})})}var bk=new Cv({name:`Component Code`,version:ib}),xk=(0,rb.createRoot)(document.getElementById(`root`)),Sk=matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`,Ck,wk={},Tk=!1,Ek,Dk=e=>{bk.getHostCapabilities()?.updateModelContext&&(clearTimeout(Ek),Ek=setTimeout(()=>{let t=document.querySelector(`.cc-problem`)?.textContent||void 0;Tk=!0,bk.updateModelContext({content:[{type:`text`,text:lb({...e,problem:t})}]}).catch(()=>{})},400))},Ok=()=>bk.getHostCapabilities()?.updateModelContext?`The chat sees this state`:void 0,kk=()=>{clearTimeout(Ek),Tk&&(Tk=!1,bk.updateModelContext({content:[]}).catch(()=>{}))},Ak=()=>{if(document.documentElement.style.colorScheme=Sk,Ck===void 0)return;let e=ob.safeParse(Ck),t=ab.safeParse(Ck);xk.render(e.success?(0,V.jsx)(Zy,{...e.data,theme:Sk,note:Ok(),onChange:({file:e,prop:t,value:n,code:r})=>{wk={...wk,[e]:r},Dk({prop:t,value:n,file:e,files:wk})}}):t.success?(0,V.jsx)(yk,{...t.data,note:Ok(),onChange:Dk}):(0,V.jsx)(`p`,{children:t.error.message}))};bk.addEventListener(`toolinput`,e=>{Ck=e.arguments;let t=ob.safeParse(Ck);wk=t.success?{...t.data.files}:{},kk(),Ak()}),bk.addEventListener(`hostcontextchanged`,e=>{e.theme&&(Sk=e.theme),Ak()}),await bk.connect(),Sk=bk.getHostContext()?.theme??Sk,Ak();var jk={host:bk.getHostVersion(),capabilities:bk.getHostCapabilities()};console.info(`Component Code host`,jk),jk.capabilities?.logging&&bk.sendLog({level:`info`,logger:`Component Code`,data:jk}).catch(()=>{});</script>\n </head>\n <body>\n <div id="root"></div>\n </body>\n</html>\n';var mk=Te.object({source:Te.string().describe("The component's module in TSX. It may import only from 'react'. Its exports, the default one by its function's name, are what `code` can name. For each value the reader can change by using the component, such as `checked`, `open` or `value`, take a matching `onCheckedChange`, `onOpenChange` or `onValueChange` prop and call it with the new value, and give that value `{ change: true }` in `controls`. Component Code passes it then, so the change shows in the code. Keep state of its own only for when the prop is missing."),code:Te.string().describe("How the component is used, in JSX: elements, props and text only, with no hooks, calls or conditions. It is shown as code and rendered as the preview. Each string, number and boolean in it becomes a control."),file:Te.string().optional().describe("The file named in the code's tab, such as `Card.tsx`."),controls:Te.record(Te.string(),Te.union([Te.literal(!1),Te.array(Te.union([Te.string(),Te.number()])),Te.object({min:Te.number().optional(),max:Te.number().optional(),step:Te.number().optional(),options:Te.array(Te.union([Te.string(),Te.number()])).optional(),change:Te.boolean().optional()})])).optional().describe("How a prop is changed, by its name or by `Element.prop`: a list of options, `{ min, max, step }` for a number, or `false` to keep it as written. `{ change: true }` lets the component change it too, through its `on<Prop>Change`, and takes a list as `options`.")}),fk=Te.object({files:Te.record(Te.string(),Te.string()).describe("The files by name, such as `index.html`, `style.css` and `script.js`, each in its own tab. They run together as one page in a sandboxed frame: the HTML is the page's body, with the CSS in a style element and the JS in a script element after it. The page cannot load anything from the network, so draw with canvas, SVG or the DOM."),controls:Te.record(Te.string(),Te.union([Te.literal(!0),Te.array(Te.union([Te.string(),Te.number()])),Te.object({min:Te.number().optional(),max:Te.number().optional(),step:Te.number().optional()})])).optional().describe("The values the reader can change, by name: an attribute, as `r` or `circle.r`, a CSS property or custom property, as `--speed`, or a JS `const` set to a number, string or boolean. Each takes `true`, a list of options, or `{ min, max, step }` for a number. CSS changes apply as the reader drags, while HTML and JS run the page again, so a script that reads custom properties each frame follows along.")});var b1="ui://fabio.cv/component-code",hk=e=>{fi(e,"component_code_show",{title:"Show in Component Code",description:"Shows a React component in the chat in Component Code: a live preview beside the code that uses it. Each string, number and boolean in the code becomes a control the reader can change. Use it when someone asks to show a component in Component Code, or to see, preview or try one.",inputSchema:mk,annotations:{readOnlyHint:!0,openWorldHint:!1},_meta:{ui:{resourceUri:b1}}},({file:t,code:r})=>({content:[{type:"text",text:`Showing ${t??"the component"} in Component Code:
82
82
 
83
83
  ${r}`}]})),fi(e,"component_code_show_html",{title:"Show HTML in Component Code",description:"Shows HTML, CSS and JS running in the chat in Component Code: the page beside its code, with a tab for each file. The values named in `controls` become controls the reader can change. Use it when someone asks to show HTML, CSS, JS, a canvas or an SVG in Component Code, or for an experiment without React.",inputSchema:fk,annotations:{readOnlyHint:!0,openWorldHint:!1},_meta:{ui:{resourceUri:b1}}},({files:t})=>({content:[{type:"text",text:`Showing ${Object.keys(t).join(", ")} in Component Code.`}]})),Pd(e,{uri:b1,name:"Component Code",description:"A component or page beside the code that makes it.",html:pk})};var gk='<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n <title>Orbit</title>\n <style>\n @font-face {\n font-family: \'Geist Mono\';\n src: url(\'https://cdn.jsdelivr.net/npm/geist@1.9.2/dist/fonts/geist-mono/GeistMono-Variable.woff2\')\n format(\'woff2\');\n font-weight: 100 900;\n font-display: swap;\n }\n :root {\n color-scheme: light dark;\n --surface: light-dark(oklch(100% 0 0), oklch(17.5% 0 0));\n --subtle: light-dark(oklch(93% 0 0), oklch(24.5% 0 0));\n --foreground: light-dark(\n oklch(22.7% 0.006 271.2),\n oklch(92.3% 0.004 286.3)\n );\n --muted: light-dark(oklch(52% 0.044 267.6), oklch(67.3% 0.028 276.2));\n --hazard: light-dark(oklch(46% 0.191 32.2), oklch(71.2% 0.191 32.2));\n --mono: \'Geist Mono\', ui-monospace, SFMono-Regular, Menlo, monospace;\n }\n body {\n margin: 0;\n padding: 1px;\n background: transparent;\n }\n main {\n position: relative;\n height: 260px;\n border-radius: 12px;\n background: var(--surface);\n box-shadow: inset 0 0 0 1px var(--subtle);\n overflow: hidden;\n cursor: pointer;\n user-select: none;\n -webkit-user-select: none;\n -webkit-tap-highlight-color: transparent;\n touch-action: manipulation;\n }\n main:focus-visible {\n outline: 2px solid var(--muted);\n outline-offset: -2px;\n }\n canvas {\n display: block;\n width: 100%;\n height: 100%;\n }\n p {\n position: absolute;\n margin: 0;\n font: 500 12px/16px var(--mono);\n color: var(--muted);\n font-variant-numeric: tabular-nums;\n }\n #score {\n top: 12px;\n left: 14px;\n color: var(--foreground);\n }\n #best {\n top: 12px;\n right: 14px;\n }\n #hint {\n bottom: 12px;\n left: 0;\n right: 0;\n text-align: center;\n }\n /* Read for the canvas, so it draws in the theme\'s colours. */\n .probe {\n display: none;\n }\n </style>\n <script type="module" crossorigin>(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=Object.defineProperty,t=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),n=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n&&e(r,Symbol.toStringTag,{value:`Module`}),r},r=new Set([`https://json-schema.org/draft/2020-12/schema`,`http://json-schema.org/draft/2020-12/schema`]),i=new Set([`https://json-schema.org/draft/2019-09/schema`,`http://json-schema.org/draft/2019-09/schema`]),a=new Set([`https://json-schema.org/draft-07/schema`,`http://json-schema.org/draft-07/schema`]),o=new Set([`https://json-schema.org/draft-06/schema`,`http://json-schema.org/draft-06/schema`]);function s(e){return typeof e==`string`&&i.has(e.replace(/#$/,``))}function c(e,t){if(!(`$schema`in e)||typeof e.$schema!=`string`)return`2020-12`;let n=e.$schema.replace(/#$/,``);if(r.has(n))return`2020-12`;if(i.has(n))return`2019-09`;if(a.has(n)||o.has(n))return`draft-7`;throw Error(`JSON Schema declares an unsupported dialect ("$schema": "${e.$schema.slice(0,200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${t}`)}function l(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function u(e,t=`|`){return e.map(e=>_e(e)).join(t)}function d(e,t){return typeof t==`bigint`?t.toString():t}var f=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function p(e){return new f(e)}function m(e){return e==null}function h(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function g(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var ee=Symbol(`evaluating`);function te(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==ee)return r===void 0&&(r=ee,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function _(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ne(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function re(e){return ne(e._zod.def)??e._zod.def.shape}function ie(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return _(this,t,e),e},enumerable:!0,configurable:!0})}function ae(e,t,n){t in e?_(e,t,n):e[t]=n}function oe(e,t,n,r){let i=re(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?ie(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):ae(e,a,r?r(n.value,a):n.value))}}function se(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?ie(e,n,()=>t[n]):ae(e,n,r.value))}}function v(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function ce(e){return JSON.stringify(e)}function le(e){return e.toLowerCase().trim().replace(/[^\\w\\s-]/g,``).replace(/[\\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var ue=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function de(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var fe=p(()=>{if(rt.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function pe(e){if(de(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(de(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function me(e){return pe(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var he=new Set([`string`,`number`,`symbol`]);function ge(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,`\\\\$&`)}function y(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function b(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function _e(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function ve(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var ye={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},x={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function be(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return oe(i,e,xe(e,t)),y(e,v(n,{shape:i,checks:[]}))}function xe(e,t){let n=re(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function Se(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(xe(e,t)),a={};return oe(a,e,Reflect.ownKeys(re(e)).filter(e=>!i.has(e))),y(e,v(n,{shape:a,checks:[]}))}function Ce(e,t){if(!pe(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=re(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return y(e,v(e._zod.def,{shape:we(e,t)}))}function we(e,t){let n={};return oe(n,e,Reflect.ownKeys(re(e))),se(n,t),n}function Te(e,t){if(!pe(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return y(e,v(e._zod.def,{shape:we(e,t)}))}function Ee(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return oe(n,e,Reflect.ownKeys(re(e))),oe(n,t,Reflect.ownKeys(re(t))),y(e,v(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function De(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(xe(t,n)):void 0,o={};return oe(o,t,Reflect.ownKeys(re(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),y(t,v(t._zod.def,{shape:o,checks:[]}))}function Oe(e,t,n){let r=n?new Set(xe(t,n)):void 0,i={};return oe(i,t,Reflect.ownKeys(re(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),y(t,v(t._zod.def,{shape:i}))}function S(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function ke(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Ae(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function je(e){return typeof e==`string`?e:e?.message}function Me(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function C(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function Ne(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:je(e.inst?._zod.def?.error?.(e))??je(a?.(e))??je(t?.error?.(e))??je(n.customError?.(e))??je(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t===`inst`||t===`schema`||t===`continue`||t===`input`||t===`__proto__`||(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var Pe=/[\\uD800-\\uDBFF]/;function Fe(e){let t=e.length;if(!Pe.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function Ie(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Le(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Re(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function ze(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Ue(e,n,r.value)}}function Be(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Ve(e,t,n){return Be(e,t,n,!1)}function He(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return Be(this,n,r(this))},set(e){Be(this,n,e)}})}return t}function Ue(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:Be(this,t,n.bind(this))},set(e){Be(this,t,e)}})}function We(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Ge,Ke=!1,qe={configurable:!0,get(){Ke=!0}};function w(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&Ge!==e._zod){Ge=void 0;return}Ge=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,qe);let e=Ke;Ke=!1;try{let r=n(this);return Ke?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Ke||=e,r}catch(n){throw delete this[t],Ke||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function Je(e,t,n,r){let i=We(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var Ye=`~constantCatch`;function Xe(e){let t=()=>e;return t[Ye]=!0,t}var Ze,Qe=Object.freeze({status:`aborted`}),$e={value:void 0,enumerable:!1},et=`captureStackTrace`in Error?Error:null;function tt(e){let t=et;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return et=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function T(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){$e.value=new a(r);try{Object.defineProperty(n,"_zod",$e)}finally{$e.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),ze(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?tt(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var E=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},nt=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Ze=globalThis).__zod_globalConfig??(Ze.__zod_globalConfig={});var rt=globalThis.__zod_globalConfig;function it(e){return e&&Object.assign(rt,e),rt}function at(){let e=this._zod;return e.message??=JSON.stringify(e.def,d,2),e.message}function ot(e){this._zod.message=e}var st={get:at,set:ot,enumerable:!0,configurable:!0},ct={value:void 0,enumerable:!1},lt=new WeakSet([Object.prototype,Error.prototype]),ut=(e,t)=>{e.name=`$ZodError`,ct.value=t,Object.defineProperty(e,"issues",ct),ct.value=void 0,Object.defineProperty(e,"message",st);let n=Object.getPrototypeOf(e);lt.has(n)||(lt.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},dt=T(`$ZodError`,ut);T(`$ZodError`,ut,void 0,{Parent:Error});function ft(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function pt(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?ft(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function mt(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function ht(e,t){return{callee:t?.callee??e,Err:t?.Err}}var gt=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new E;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Ne(e,o,it())));throw ue(n,a?.callee??t),n}return s.value};return t},_t=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Ne(e,o,it())));throw ue(n,a?.callee??t),n}return s.value};return t},vt=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new E;return a.issues.length?yt(e,a.issues,i):{success:!0,data:a.value}};function yt(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>Ne(e,n,it()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var bt=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?yt(e,a.issues,i):{success:!0,data:a.value}},xt=Symbol.for(`zod.compile.invalid`),St=Symbol.for(`zod.compile.fallback`),Ct=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==xt)return!0;if(r.definite===!0&&n===void 0)return!1}return wt(e,t,n)});function wt(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[St]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new E;return a.issues.length===0}var Tt=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},Et=e=>{let t=gt(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,ht(n,a))};return n},Dt=e=>{let t=gt(e),n=(e,r,i,a)=>t(e,r,i,ht(n,a));return n},Ot=e=>{let t=_t(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,ht(n,a))};return n},kt=e=>{let t=_t(e),n=async(e,r,i,a)=>await t(e,r,i,ht(n,a));return n},At=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return vt(e)(t,n,i)},jt=e=>(t,n,r)=>vt(e)(t,n,r),Mt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return bt(e)(t,n,i)},Nt=e=>async(t,n,r)=>bt(e)(t,n,r),Pt=/^[cC][0-9a-z]{6,}$/,Ft=/^[0-9a-z]+$/,It=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Lt=/^[0-9a-vA-V]{20}$/,Rt=/^[A-Za-z0-9]{27}$/,zt=/^[a-zA-Z0-9_-]{21}$/;function Bt(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Vt=/^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/,Ht=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ut=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Wt=/^(?:[A-Za-z0-9_\'+\\-]+\\.)*[A-Za-z0-9_\'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/,Gt=`^(?=[\\\\s\\\\S]*[\\\\p{Extended_Pictographic}\\\\p{Regional_Indicator}\\\\u20E3])[\\\\p{Extended_Pictographic}\\\\p{Emoji_Component}]+$`;function Kt(){return new RegExp(Gt,`u`)}var qt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Jt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Yt=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$/,Xt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Zt=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Qt=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,$t=/^https?$/,en=/^\\+[1-9]\\d{6,14}$/,tn=`(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))`;function nn(e){return RegExp(`^${e}$`)}var rn=nn(tn);function D(e){let t=`(?:[01]\\\\d|2[0-3]):[0-5]\\\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\\\d`:`${t}:[0-5]\\\\d\\\\.\\\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\\\d(?:\\\\.\\\\d+)?`:`${t}(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?`}function an(e){return RegExp(`^${D(e)}$`)}function on(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)`);let n=`${D({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${D({precision:e.precision})}`:n;return RegExp(`^${tn}T(?:${r})$`)}var sn=/^[\\s\\S]{0,}$/,cn=/^-?\\d+$/,ln=/^-?\\d+(?:\\.\\d+)?$/,un=/^(?:true|false)$/i,dn=/^null$/i,fn=/^undefined$/i,pn=/^[^A-Z]*$/,mn=/^[^a-z]*$/,hn=T(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),gn=e=>{let t=e.value;return!m(t)&&t.length!==void 0},_n={number:`number`,bigint:`bigint`,object:`date`},vn=T(`$ZodCheckLessThan`,(e,t)=>{hn.init(e,t);let n=_n[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:_n[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),yn=T(`$ZodCheckGreaterThan`,(e,t)=>{hn.init(e,t);let n=_n[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:_n[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),bn=T(`$ZodCheckMultipleOf`,(e,t)=>{hn.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):g(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),xn=T(`$ZodCheckNumberFormat`,(e,t)=>{hn.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ye[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Sn=T(`$ZodCheckMaxLength`,(e,t)=>{var n;hn.init(e,t),(n=e._zod.def).when??(n.when=gn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Fe(r):i)<=t.maximum)return;let a=Ie(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Cn=T(`$ZodCheckMinLength`,(e,t)=>{var n;hn.init(e,t),(n=e._zod.def).when??(n.when=gn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?Fe(r):i)>=t.minimum)return;let a=Ie(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),wn=T(`$ZodCheckLengthEquals`,(e,t)=>{var n;hn.init(e,t),(n=e._zod.def).when??(n.when=gn),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Fe(r):i;if(a===t.length)return;let o=Ie(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Tn=T(`$ZodCheckStringFormat`,(e,t)=>{var n,r;hn.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),En=T(`$ZodCheckRegex`,(e,t)=>{Tn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Dn=T(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=pn,Tn.init(e,t)}),On=T(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=mn,Tn.init(e,t)}),kn=T(`$ZodCheckIncludes`,(e,t)=>{hn.init(e,t);let n=ge(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),An=T(`$ZodCheckStartsWith`,(e,t)=>{hn.init(e,t);let n=RegExp(`^${ge(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),jn=T(`$ZodCheckEndsWith`,(e,t)=>{hn.init(e,t);let n=RegExp(`.*${ge(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Mn=T(`$ZodCheckOverwrite`,(e,t)=>{hn.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Nn=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`\n`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\\n${t.join(`\n`)}\\n};`)(...Object.values(this.closed))}},Pn={major:4,minor:6,patch:7},O=T(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Pn;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=S(t),a;for(let o of n){if(o._zod.def.when){if(ke(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new E;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(C(t.issues,n,e),i||=S(t,n))});else{if(t.issues.length===n)continue;C(t.issues,n,e),i||=S(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(S(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new E;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new E;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return Ve(this,`~standard`,Ln(this))},set"~standard"(e){Be(this,`~standard`,e)}}),Fn=(e,t)=>e.issues.length?{issues:e.issues.map(e=>Ne(e,t,it()))}:{value:e.value};async function In(e,t){let n={async:!0};return Fn(await e._zod.run({value:t,issues:[]},n),n)}function Ln(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Fn(r,n)}catch{}return In(e,t)},vendor:`zod`,version:1}}var Rn=T(`$ZodString`,(e,t)=>{O.init(e,t),e._zod.pattern=t.pattern??sn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),k=T(`$ZodStringFormat`,(e,t)=>{Tn.init(e,t),Rn.init(e,t)}),zn=T(`$ZodGUID`,(e,t)=>{t.pattern??=Ht,k.init(e,t)}),Bn=T(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Ut(e)}else t.pattern??=Ut();k.init(e,t)}),Vn=T(`$ZodEmail`,(e,t)=>{t.pattern??=Wt,k.init(e,t)});function Hn(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Un(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?Hn(e)||2:Wn(e,t)}function Wn(e,t){if(!t.normalize&&t.protocol?.source===$t.source&&!/^https?:\\/\\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var Gn=/[\\t\\n\\r]/g;function Kn(e){return e.replace(Gn,``)}function qn(e,t){return t.lastIndex=0,t.test(e.hostname)}function Jn(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var Yn=T(`$ZodURL`,(e,t)=>{k.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Un(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=Kn(r);return}t.hostname&&!qn(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Jn(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Kn(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Xn=T(`$ZodEmoji`,(e,t)=>{t.pattern??=Kt(),k.init(e,t)}),Zn=T(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?zt:Bt(t.length),k.init(e,t)}),Qn=T(`$ZodCUID`,(e,t)=>{t.pattern??=Pt,k.init(e,t)}),$n=T(`$ZodCUID2`,(e,t)=>{t.pattern??=Ft,k.init(e,t)}),er=T(`$ZodULID`,(e,t)=>{t.pattern??=It,k.init(e,t)}),tr=T(`$ZodXID`,(e,t)=>{t.pattern??=Lt,k.init(e,t)}),nr=T(`$ZodKSUID`,(e,t)=>{t.pattern??=Rt,k.init(e,t)}),rr=T(`$ZodISODateTime`,(e,t)=>{t.pattern??=on(t),k.init(e,t)}),ir=T(`$ZodISODate`,(e,t)=>{t.pattern??=rn,k.init(e,t)}),ar=T(`$ZodISOTime`,(e,t)=>{t.pattern??=an(t),k.init(e,t)}),or=T(`$ZodISODuration`,(e,t)=>{t.pattern??=Vt,k.init(e,t)}),sr=T(`$ZodIPv4`,(e,t)=>{t.pattern??=qt,k.init(e,t)}),cr=/^[0-9a-fA-F:.]+$/;function lr(e){return cr.test(e)?Hn(`http://[${e}]`):!1}var ur=T(`$ZodIPv6`,(e,t)=>{t.pattern??=Jt,k.init(e,t),e._zod.check=n=>{lr(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),dr=T(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Yt,k.init(e,t)});function fr(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:lr(n)}var pr=T(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Xt,k.init(e,t),e._zod.check=n=>{fr(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function mr(e){if(e===``)return!0;if(/\\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var hr=/^[0-9a-zA-Z+/]*={0,2}$/,gr=T(`$ZodBase64`,(e,t)=>{t.pattern??=hr,k.init(e,t),e._zod.check=n=>{mr(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),_r=/^[A-Za-z0-9_-]*$/;function vr(e){if(!_r.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return mr(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var yr=T(`$ZodBase64URL`,(e,t)=>{t.pattern??=_r,k.init(e,t),e._zod.check=n=>{vr(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),br=T(`$ZodE164`,(e,t)=>{t.pattern??=en,k.init(e,t)});function xr(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Sr=T(`$ZodJWT`,(e,t)=>{k.init(e,t),e._zod.check=n=>{xr(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Cr=T(`$ZodNumber`,(e,t)=>{O.init(e,t),e._zod.pattern=ln,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),wr=T(`$ZodNumberFormat`,(e,t)=>{xn.init(e,t),Cr.init(e,t)}),Tr=T(`$ZodBoolean`,(e,t)=>{O.init(e,t),e._zod.pattern=un,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Er=T(`$ZodUndefined`,(e,t)=>{O.init(e,t),e._zod.pattern=fn,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),Dr=T(`$ZodNull`,(e,t)=>{O.init(e,t),e._zod.pattern=dn,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),Or=T(`$ZodAny`,(e,t)=>{O.init(e,t),e._zod.parse=e=>e}),kr=T(`$ZodUnknown`,(e,t)=>{O.init(e,t),e._zod.parse=e=>e}),Ar=T(`$ZodNever`,(e,t)=>{O.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function jr(e,t){let n=Me(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of Me(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,C(n.issues,t,e),n}}return i(n,a)}}var Mr=e=>Array.isArray(e)?e.length:-1;function Nr(e,t,n){e.issues.length&&t.issues.push(...Ae(n,e.issues)),t.value[n]=e.value}var Pr=T(`$ZodArray`,(e,t)=>{O.init(e,t);let n=rt.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>Nr(t,r,e)));else if(Nr(c,r,e),s&&c.issues.length!==0&&S(c))break}return o.length?Promise.all(o).then(()=>r):r},jr(e,Mr)});function Fr(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(!(!o&&s&&i===`optional`)){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...Ae(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var Ir=[];function Lr(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:Ir,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=ve(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function Rr(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(S(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Fr(e,n,i,t,d,f))):Fr(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var zr=T(`$ZodObject`,(e,t)=>{O.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=p(()=>Lr(t));w(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||_(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=de,o=t.catchall,s,c=rt.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(S(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>Fr(n,t,e,r,a,o))):Fr(s,t,e,r,a,o)}return o?Rr(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),Br=T(`$ZodObjectJIT`,(e,t)=>{zr.init(e,t);let n=e._zod.parse,r=p(()=>Lr(t)),i=rt.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new Nn([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`\n let ${e}_ab = false;\n for (let i = 0; i < ${e}.issues.length; i++) {\n const iss = ${e}.issues[i];\n iss.path = iss.path ? [${t}, ...iss.path] : [${t}];\n payload.issues.push(iss);\n if (iss.continue !== true) ${e}_ab = true;\n }\n if (${e}_ab && ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:ce(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`\n const ${n}_present = ${i};\n if (!${n}.issues.length || ${n}_present) {\n if (${n}.issues.length) {${c(n,r)}\n }\n\n if (${e}) {\n newResult[${r}] = ${n}.value;\n }\n }\n\n `)}else f?(o.write(`\n if (${n}.issues.length) {${c(n,r)}\n }\n `),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`\n if (${n}.value !== undefined || ${i}) {\n newResult[${r}] = ${n}.value;\n }\n `)):o.write(`\n const ${n}_present = ${i};\n if (${n}.issues.length) {${c(n,r)}\n }\n if (!${n}_present && !${n}.issues.length) {\n payload.issues.push({\n code: "invalid_type",\n expected: "nonoptional",\n input: undefined,\n path: [${r}]\n });\n if (ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }\n }\n\n if (${n}_present) {\n newResult[${r}] = ${n}.value;\n }\n\n `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=de,c=!rt.jitless,l=c&&fe.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?Rr([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function Vr(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!S(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Ne(e,r,it())))}),t)}var Hr=T(`$ZodUnion`,(e,t)=>{O.init(e,t),w(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),w(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),w(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),w(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>h(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Vr(t,r,e,i)):Vr(o,r,e,i)}});function Ur(e){let t=new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||r.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(e!==void 0)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}var Wr=T(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Hr.init(e,t);let n=e._zod.parse;w(e,`propValues`,e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||Object.keys(i).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);i[e.def.discriminator]?.has(void 0)&&n++;for(let[e,n]of Object.entries(i)){Object.prototype.hasOwnProperty.call(t,e)||_(t,e,new Set);for(let r of n)t[e].add(r)}}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=ne(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=p(()=>Ur(t));e._zod.parse=(i,a)=>{let o=i.value;if(!de(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=o?.[t.discriminator],c=r.value.get(s);return c&&(s!==void 0||a.direction!==`backward`)?c._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>r.value.get(e)!==null),input:o,path:[t.discriminator],inst:e}),i)}}),Gr=T(`$ZodIntersection`,(e,t)=>{O.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>qr(e,t,n)):qr(e,i,a)}});function Kr(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(pe(e)&&pe(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=Kr(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Kr(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function qr(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=Kr(t.value,n.value);if(!c.valid){if(S(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var Jr=T(`$ZodRecord`,(e,t)=>{O.init(e,t);let n=rt.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!pe(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>Ne(e,i,it())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...Ae(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...Ae(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e))if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e);l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&ln.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>Ne(e,i,it())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...Ae(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...Ae(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),Yr=T(`$ZodEnum`,(e,t)=>{O.init(e,t);let n=l(t.entries),r=new Set(n);e._zod.values=r,w(e,`pattern`,e=>{let t=l(e.def.entries).filter(e=>he.has(typeof e));return RegExp(t.length?`^(${t.map(e=>ge(e.toString())).join(`|`)})$`:`^[^\\\\s\\\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Xr=T(`$ZodLiteral`,(e,t)=>{O.init(e,t);let n=new Set(t.values);e._zod.values=n,w(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?ge(e):e?ge(e.toString()):String(e)).join(`|`)})$`:`^[^\\\\s\\\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Zr=T(`$ZodTransform`,(e,t)=>{O.init(e,t),e._zod.optin=`optional`,rt.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new nt(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new E;return n.value=i,n}});function Qr(e,t){return e.value=t.issues.length?void 0:t.value,e}var $r=T(`$ZodOptional`,(e,t)=>{O.init(e,t),w(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,w(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),w(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${h(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Qr(e,t)):Qr(e,r)}return t.innerType._zod.run(e,n)}}),ei=T(`$ZodExactOptional`,(e,t)=>{$r.init(e,t),w(e,`values`,e=>e.def.innerType._zod.values),w(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),ti=T(`$ZodNullable`,(e,t)=>{O.init(e,t),w(e,`optin`,e=>e.def.innerType._zod.optin),w(e,`optout`,e=>e.def.innerType._zod.optout),w(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${h(t.source)}|null)$`):void 0}),w(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),ni=T(`$ZodDefault`,(e,t)=>{O.init(e,t),e._zod.optin=`defaulted`,w(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>ri(e,t)):ri(r,t)}});function ri(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var ii=T(`$ZodPrefault`,(e,t)=>{O.init(e,t),e._zod.optin=`defaulted`,w(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),ai=T(`$ZodNonOptional`,(e,t)=>{O.init(e,t),w(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>oi(t,e)):oi(i,e)}});function oi(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function si(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>Ne(e,r,it()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var ci=T(`$ZodCatch`,(e,t)=>{O.init(e,t),w(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),w(e,`optout`,e=>e.def.innerType._zod.optout),w(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>si(e,r,t,n)):si(e,r,t,n)}}),li=T(`$ZodPipe`,(e,t)=>{O.init(e,t),w(e,`values`,e=>e.def.in._zod.values),w(e,`optin`,e=>e.def.in._zod.optin),w(e,`optout`,e=>e.def.out._zod.optout),w(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>ui(e,t.in,n)):ui(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>ui(e,t.out,n)):ui(r,t.out,n)}});function ui(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var di=T(`$ZodPreprocess`,(e,t)=>{li.init(e,t)}),fi=T(`$ZodReadonly`,(e,t)=>{O.init(e,t),w(e,`propValues`,e=>e.def.innerType._zod.propValues),w(e,`values`,e=>e.def.innerType._zod.values),w(e,`optin`,e=>e.def.innerType?._zod?.optin),w(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(pi):pi(r)}});function pi(e){return e.memo||(e.value=Object.freeze(e.value)),e}var mi=T(`$ZodLazy`,(e,t)=>{O.init(e,t),te(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),w(e,`pattern`,e=>e.innerType?._zod?.pattern),w(e,`propValues`,e=>e.innerType?._zod?.propValues),w(e,`optin`,e=>e.innerType?._zod?.optin??void 0),w(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),hi=T(`$ZodCustom`,(e,t)=>{hn.init(e,t),O.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>gi(t,n,r,e));gi(i,n,r,e)}});function gi(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Re(e))}}var _i=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},vi=`~memo`,yi=[];function bi(e){return typeof e==`object`&&!!e}function xi(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var Si=new WeakMap,Ci=0,wi=1,Ti=2;function Ei(e,t,n){let r=Si.get(e);if(r!==void 0)return r?Ti:Ci;if(t.has(e))return Ti;t.add(e);let i=Ci,a=e=>{if(i!==Ti&&e?._zod){let r=Ei(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=Ci;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?wi:o.value?._zod?Ei(o.value,t,n):Ci;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=ne(c);s(e?o(e,!0):wi),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?Ei(r,t,!1):wi);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(!(!n||typeof n!=`object`)){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),Di(e,i)}function Di(e,t){return t!==wi&&Si.set(e,t===Ti),t}function Oi(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var ki,Ai=[],ji={alloc(e,t,n){let r=ki;if(!r)return n;ki=void 0;let i={value:n,issues:null};return r.set(t.value,i),Ai.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&Ni(n,e.value))throw new _i;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=Ei(e,new Set,!1);if(i===Ci)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===Ti||r?n=!0:r=!0}let l=s.value;if(!bi(l))return t(s,c);let u=c[vi];u||(u={buckets:new WeakMap,backEdges:void 0},c[vi]=u);let d;i===c?d=a:(d=Oi(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...xi(f.issues)):(s.memo=!0,u.backEdges??=new WeakSet,u.backEdges.add(f.value)),s;ki=d;let p=Ai.length,m=t(s,c);ki=void 0;let h=Ai.length>p?Ai.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?xi(e.issues):yi),e)):(h&&(h.issues=m.issues.length?xi(m.issues):yi),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function Mi(){return ji}function Ni(e,t){let n=e[vi]?.backEdges;return n!==void 0&&bi(t)&&n.has(t)}var Pi=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(Le(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${_e(e.values[0])}`:`Invalid option: expected one of ${u(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${u(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`\'${e}\'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function Fi(){return{localeError:Pi()}}var Ii,Li=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Ri(){return new Li}(Ii=globalThis).__zod_globalRegistry??(Ii.__zod_globalRegistry=Ri());var zi=globalThis.__zod_globalRegistry;function Bi(e){return e.checks&&=[...e.checks],e}function Vi(e,t){return new e(Bi({type:`string`,...b(t)}))}function Hi(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...b(t)})}function Ui(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...b(t)})}function Wi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...b(t)})}function Gi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...b(t)})}function Ki(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...b(t)})}function qi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...b(t)})}function Ji(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...b(t)})}function Yi(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...b(t)})}function Xi(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...b(t)})}function Zi(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...b(t)})}function Qi(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...b(t)})}function $i(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...b(t)})}function ea(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...b(t)})}function ta(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...b(t)})}function na(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...b(t)})}function ra(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...b(t)})}function ia(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...b(t)})}function aa(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...b(t)})}function oa(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...b(t)})}function sa(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...b(t)})}function ca(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...b(t)})}function la(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...b(t)})}function ua(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...b(t)})}function da(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...b(t)})}function fa(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...b(t)})}function pa(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...b(t)})}function ma(e,t){return new e(Bi({type:`number`,checks:[],...b(t)}))}function ha(e,t){return new e(Bi({type:`number`,coerce:!0,checks:[],...b(t)}))}function ga(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...b(t)})}function _a(e,t){return new e({type:`boolean`,...b(t)})}function va(e,t){return new e({type:`undefined`,...b(t)})}function ya(e,t){return new e({type:`null`,...b(t)})}function ba(e){return new e({type:`any`})}function xa(e){return new e({type:`unknown`})}function Sa(e,t){return new e({type:`never`,...b(t)})}function Ca(e,t){return new vn({check:`less_than`,...b(t),value:e,inclusive:!1})}function wa(e,t){return new vn({check:`less_than`,...b(t),value:e,inclusive:!0})}function Ta(e,t){return new yn({check:`greater_than`,...b(t),value:e,inclusive:!1})}function Ea(e,t){return new yn({check:`greater_than`,...b(t),value:e,inclusive:!0})}function Da(e,t){return new bn({check:`multiple_of`,...b(t),value:e})}function Oa(e,t){return new Sn({check:`max_length`,...b(t),maximum:e})}function ka(e,t){return new Cn({check:`min_length`,...b(t),minimum:e})}function Aa(e,t){return new wn({check:`length_equals`,...b(t),length:e})}function ja(e,t){return new En({check:`string_format`,format:`regex`,...b(t),pattern:e})}function Ma(e){return new Dn({check:`string_format`,format:`lowercase`,...b(e)})}function Na(e){return new On({check:`string_format`,format:`uppercase`,...b(e)})}function Pa(e,t){return new kn({check:`string_format`,format:`includes`,...b(t),includes:e})}function Fa(e,t){return new An({check:`string_format`,format:`starts_with`,...b(t),prefix:e})}function Ia(e,t){return new jn({check:`string_format`,format:`ends_with`,...b(t),suffix:e})}function La(e){return new Mn({check:`overwrite`,tx:e})}function Ra(e){return La(t=>t.normalize(e))}function za(){return La(e=>e.trim())}function Ba(){return La(e=>e.toLowerCase())}function Va(){return La(e=>e.toUpperCase())}function Ha(){return La(e=>le(e))}function Ua(e,t,n){return new e({type:`array`,element:t,...b(n)})}function Wa(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...b(n)})}function Ga(e,t){let n=Ka(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Re(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Re(r))}},e(t.value,t)),t);return n}function Ka(e,t){let n=new hn({check:`custom`,...b(t)});return n._zod.check=e,n}function qa(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&_(e,t,n[t]);return e}function Ja(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??zi,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function Ya(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function A(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,A(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&qa(o.schema,c),t.io===`input`&&ao(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Xa(e){return e.replace(/~/g,`~0`).replace(/\\//g,`~1`)}function Za(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${Xa(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+Xa(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>\n\nSet the \\`cycles\\` parameter to \\`"ref"\\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}r.count>1&&e.reused===`ref`&&a(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}function Qa(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;Qa(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var $a=new Set([`type`,`properties`,`required`,`additionalProperties`]),eo=[`oneOf`,`anyOf`];function to(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function no(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!$a.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??to(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}_(n,r,e.length===1?e[0]:no(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=to(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function ro(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of $a)if(t in e)return;let n=t.filter(e=>eo.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=no(t);else{let e=n[0],i=eo.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>no([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,qa(e,r))}function io(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):qa(i,s),qa(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())Qa(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])ro(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}qa(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,_(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:so(t,`input`,e.processors),output:so(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function ao(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return ao(r.element,n);if(r.type===`set`)return ao(r.valueType,n);if(r.type===`lazy`)return ao(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return ao(r.innerType,n);if(r.type===`intersection`)return ao(r.left,n)||ao(r.right,n);if(r.type===`record`||r.type===`map`)return ao(r.keyType,n)||ao(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:ao(r.in,n)||ao(r.out,n);if(r.type===`object`){for(let e in r.shape)if(ao(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(ao(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(ao(e,n))return!0;return!!(r.rest&&ao(r.rest,n))}return!1}var oo=(e,t={})=>n=>{let r=Ja({...n,processors:t});return A(e,r),Za(r,e),io(r,e)},so=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Ja({...i??{},target:a,io:t,processors:n});return A(e,o),Za(o,e),io(o,e)},co=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},lo=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},uo=(e,t)=>{co(e,`minimum`,t),lo(e,`maximum`,t)},fo=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},po=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},mo=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},ho=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},go=(e,t)=>co(e,`minimum`,t.minimum),_o=(e,t)=>lo(e,`maximum`,t.maximum),vo=e=>(t,n)=>{ho(t,n.format);let[r,i]=e[n.format];co(t,`minimum`,r),lo(t,`maximum`,i)},yo={greater_than:(e,t)=>co(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>lo(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>fo(e,t.value),number_format:vo(ye),bigint_format:vo(x),min_length:go,max_length:_o,length_equals:(e,t)=>uo(e,t.length),min_size:go,max_size:_o,size_equals:(e,t)=>uo(e,t.size),string_format:(e,t)=>{ho(e,t.format),t.pattern&&po(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>mo(e,t.mime)};function bo(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)yo[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&co(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&co(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&lo(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&lo(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&fo(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&mo(t,i.mime);for(let e of i.patterns??[])po(t,e);return t}var xo={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},So=new Map([[hr,Zt],[_r,Qt]]),Co=e=>So.get(e)??e,wo=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=bo(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=xo[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(Co);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},To=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=bo(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):Ya(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},Eo=(e,t,n,r)=>{n.type=`boolean`},Do=(e,t,n,r)=>{Ya(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},Oo=(e,t,n,r)=>{Ya(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},ko=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Ao=(e,t,n,r)=>{Ya(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},jo=(e,t,n,r)=>{Ya(e,t,n,r,`Void cannot be represented in JSON Schema`)},Mo=(e,t,n,r)=>{n.not={}},No=(e,t,n,r)=>{},Po=(e,t,n,r)=>{},Fo=(e,t,n,r)=>{Ya(e,t,n,r,`Date cannot be represented in JSON Schema`)},Io=(e,t,n,r)=>{let i=e._zod.def,a=l(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Lo=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(Ya(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(Ya(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},Ro=(e,t,n,r)=>{Ya(e,t,n,r,`NaN cannot be represented in JSON Schema`)},zo=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},Bo=(e,t,n,r)=>{let i=n;i.type=`string`,i.format=`binary`,i.contentEncoding=`binary`;let{minimum:a,maximum:o,mime:s}=bo(e);a!==void 0&&(i.minLength=a),o!==void 0&&(i.maxLength=o),s&&(s.length===0?i.not={}:s.length===1?i.contentMediaType=s[0]:i.anyOf=s.map(e=>({contentMediaType:e})))},Vo=(e,t,n,r)=>{n.type=`boolean`},Ho=(e,t,n,r)=>{Ya(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},Uo=(e,t,n,r)=>{Ya(e,t,n,r,`Function types cannot be represented in JSON Schema`)},Wo=(e,t,n,r)=>{Ya(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Go=(e,t,n,r)=>{Ya(e,t,n,r,`Map cannot be represented in JSON Schema`)},Ko=(e,t,n,r)=>{Ya(e,t,n,r,`Set cannot be represented in JSON Schema`)},qo=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=bo(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=A(a.element,t,{...r,path:[...r.path,`items`]})};function Jo(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?Jo(t.out):t.type===`catch`?Jo(t.innerType):e._zod.optin}var Yo=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&Ya(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)_(i.properties,e,A(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?Jo(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=A(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Xo=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>A(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Zo=(e,t,n,r)=>{let i=e._zod.def,a=A(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=A(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},Qo=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>A(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?A(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?Jo(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=bo(e);typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)};function $o(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=$o(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>$o(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i?(p.type=`string`,a||(p.pattern=(r.includes(`number`)?ln:cn).source),p):p}var es=new WeakMap;function ts(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of es.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=$o(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var ns=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=bo(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=A(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)_(i.patternProperties,Co(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=A(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=es.get(t);n||(n=[],es.set(t,n),t.deferred.push(()=>ts(t))),n.push(e)}i.additionalProperties=A(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&Jo(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},rs=(e,t,n,r)=>{let i=e._zod.def,a=A(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},is=(e,t,n,r)=>{let i=e._zod.def;A(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},as=Symbol();function os(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(Ya(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),as):JSON.parse(o)}var ss=(e,t,n,r)=>{let i=e._zod.def;A(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=os(i.defaultValue,e,t,n,r);o!==as&&(n.default=o)},cs=(e,t,n,r)=>{let i=e._zod.def;A(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=os(i.defaultValue,e,t,n,r);o!==as&&(n._prefault=o)},ls=(e,t,n,r)=>{let i=e._zod.def;A(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{Ya(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},us=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;A(o,t,r);let s=t.seen.get(e);s.ref=o},ds=(e,t,n,r)=>{let i=e._zod.def;A(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},fs=(e,t,n,r)=>{let i=e._zod.def;A(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},ps=(e,t,n,r)=>{let i=e._zod.def;A(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},ms=(e,t,n,r)=>{let i=e._zod.innerType;A(i,t,r);let a=t.seen.get(e);a.ref=i},hs={string:wo,number:To,boolean:Eo,bigint:Do,symbol:Oo,null:ko,undefined:Ao,void:jo,never:Mo,any:No,unknown:Po,date:Fo,enum:Io,literal:Lo,nan:Ro,template_literal:zo,file:Bo,success:Vo,custom:Ho,function:Uo,transform:Wo,map:Go,set:Ko,array:qo,object:Yo,union:Xo,intersection:Zo,tuple:Qo,record:ns,nullable:rs,nonoptional:is,default:ss,prefault:cs,catch:ls,pipe:us,readonly:ds,promise:fs,optional:ps,lazy:ms};function gs(e,t){if(`_idmap`in e){let n=e,r=Ja({...t,processors:hs}),i={};for(let e of n._idmap.entries()){let[t,n]=e;A(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;Za(r,n),_(a,t,io(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=Ja({...t,processors:hs});return A(e,n),Za(n,e),io(n,e)}var _s=new WeakSet([Object.prototype,Error.prototype]);function vs(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var ys=T(`ZodError`,(e,t)=>{dt.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);_s.has(n)||(_s.add(n),vs(n,`format`,e=>t=>mt(e,t)),vs(n,`flatten`,e=>t=>pt(e,t)),vs(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,d,2)}),vs(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,d,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),bs=gt(ys),xs=_t(ys),Ss=vt(ys),Cs=bt(ys),ws=Et(ys),Ts=Dt(ys),Es=Ot(ys),Ds=kt(ys),Os=At(ys),ks=jt(ys),As=Mt(ys),js=Nt(ys);function Ms(){rt.localeError||it(Fi())}function Ns(){rt.memoizer||it({memoizer:Mi()})}var j=T(`ZodType`,(e,t)=>(Ms(),O.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(v(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return y(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check($c(e,t))},superRefine(e,t){return this.check(el(e,t))},overwrite(e){return this.check(La(e))},optional(){return W(this)},exactOptional(){return Pc(this)},nullable(){return Ic(this)},nullish(){return W(Ic(this))},nonoptional(e){return Hc(this,e)},array(){return L(this)},or(e){return B([this,e])},and(e){return Ec(this,e)},transform(e){return Kc(this,jc(e))},default(e){return Rc(this,e)},prefault(e){return Bc(this,e)},catch(e){return Wc(this,e)},pipe(e){return Kc(this,e)},readonly(){return Yc(this)},describe(e){let t=this.clone();return zi.add(t,{description:e}),t},meta(...e){if(e.length===0)return zi.get(this);let t=this.clone();return zi.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return Ve(this,`~standard`,{...Ln(this),jsonSchema:{input:so(this,`input`),output:so(this,`output`)}})},set"~standard"(e){Be(this,`~standard`,e)},parse:function e(t,n){return bs(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await xs(this,t,n,{callee:e})},safeParse(e,t){return Ss(this,e,t)},async safeParseAsync(e,t){return Cs(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Be(this,`spa`,e)},validate(e,t){return Ct(this,e,t)},validateAsync(e,t){return Tt(this,e,t)},encode:function e(t,n){return ws(this,t,n,{callee:e})},decode:function e(t,n){return Ts(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await Es(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Ds(this,t,n,{callee:e})},safeEncode(e,t){return Os(this,e,t)},safeDecode(e,t){return ks(this,e,t)},async safeEncodeAsync(e,t){return As(this,e,t)},async safeDecodeAsync(e,t){return js(this,e,t)},toJSONSchema(e){return oo(this,{})(e)},get description(){return zi.get(this)?.description},get _def(){return this._zod.def}}),Ps=T(`_ZodString`,(e,t)=>{Rn.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wo(e,t,n,r)},He({format:e=>bo(e).format??null,minLength:e=>bo(e).minimum??null,maxLength:e=>bo(e).maximum??null},{regex(...e){return this.check(ja(...e))},includes(...e){return this.check(Pa(...e))},startsWith(...e){return this.check(Fa(...e))},endsWith(...e){return this.check(Ia(...e))},min(...e){return this.check(ka(...e))},max(...e){return this.check(Oa(...e))},length(...e){return this.check(Aa(...e))},nonempty(...e){return this.check(ka(1,...e))},lowercase(e){return this.check(Ma(e))},uppercase(e){return this.check(Na(e))},trim(){return this.check(za())},normalize(...e){return this.check(Ra(...e))},toLowerCase(){return this.check(Ba())},toUpperCase(){return this.check(Va())},slugify(){return this.check(Ha())}})),Fs=T(`ZodString`,(e,t)=>{Rn.init(e,t),Ps.init(e,t)},{email(e){return this.check(Hi(Bs,e))},url(e){return this.check(Ji(Ws,e))},jwt(e){return this.check(la(oc,e))},emoji(e){return this.check(Yi(Ks,e))},guid(e){return this.check(Ui(Hs,e))},uuid(e){return this.check(Wi(Us,e))},uuidv4(e){return this.check(Gi(Us,e))},uuidv6(e){return this.check(Ki(Us,e))},uuidv7(e){return this.check(qi(Us,e))},nanoid(e){return this.check(Xi(qs,e))},cuid(e){return this.check(Zi(Js,e))},cuid2(e){return this.check(Qi(Ys,e))},ulid(e){return this.check($i(Xs,e))},base64(e){return this.check(oa(rc,e))},base64url(e){return this.check(sa(ic,e))},xid(e){return this.check(ea(Zs,e))},ksuid(e){return this.check(ta(Qs,e))},ipv4(e){return this.check(na($s,e))},ipv6(e){return this.check(ra(ec,e))},cidrv4(e){return this.check(ia(tc,e))},cidrv6(e){return this.check(aa(nc,e))},e164(e){return this.check(ca(ac,e))},datetime(e){return this.check(ua(Is,e))},date(e){return this.check(da(Ls,e))},time(e){return this.check(fa(Rs,e))},duration(e){return this.check(pa(zs,e))}});function M(e){return Vi(Fs,e)}var N=T(`ZodStringFormat`,(e,t)=>{k.init(e,t),Ps.init(e,t)}),Is=T(`ZodISODateTime`,(e,t)=>{rr.init(e,t),N.init(e,t)}),Ls=T(`ZodISODate`,(e,t)=>{ir.init(e,t),N.init(e,t)}),Rs=T(`ZodISOTime`,(e,t)=>{ar.init(e,t),N.init(e,t)}),zs=T(`ZodISODuration`,(e,t)=>{or.init(e,t),N.init(e,t)}),Bs=T(`ZodEmail`,(e,t)=>{Vn.init(e,t),N.init(e,t)});function Vs(e){return Hi(Bs,e)}var Hs=T(`ZodGUID`,(e,t)=>{zn.init(e,t),N.init(e,t)}),Us=T(`ZodUUID`,(e,t)=>{Bn.init(e,t),N.init(e,t)}),Ws=T(`ZodURL`,(e,t)=>{Yn.init(e,t),N.init(e,t)});function Gs(e){return Ji(Ws,e)}var Ks=T(`ZodEmoji`,(e,t)=>{Xn.init(e,t),N.init(e,t)}),qs=T(`ZodNanoID`,(e,t)=>{Zn.init(e,t),N.init(e,t)}),Js=T(`ZodCUID`,(e,t)=>{Qn.init(e,t),N.init(e,t)}),Ys=T(`ZodCUID2`,(e,t)=>{$n.init(e,t),N.init(e,t)}),Xs=T(`ZodULID`,(e,t)=>{er.init(e,t),N.init(e,t)}),Zs=T(`ZodXID`,(e,t)=>{tr.init(e,t),N.init(e,t)}),Qs=T(`ZodKSUID`,(e,t)=>{nr.init(e,t),N.init(e,t)}),$s=T(`ZodIPv4`,(e,t)=>{sr.init(e,t),N.init(e,t)}),ec=T(`ZodIPv6`,(e,t)=>{ur.init(e,t),N.init(e,t)}),tc=T(`ZodCIDRv4`,(e,t)=>{dr.init(e,t),N.init(e,t)}),nc=T(`ZodCIDRv6`,(e,t)=>{pr.init(e,t),N.init(e,t)}),rc=T(`ZodBase64`,(e,t)=>{gr.init(e,t),N.init(e,t)}),ic=T(`ZodBase64URL`,(e,t)=>{yr.init(e,t),N.init(e,t)}),ac=T(`ZodE164`,(e,t)=>{br.init(e,t),N.init(e,t)}),oc=T(`ZodJWT`,(e,t)=>{Sr.init(e,t),N.init(e,t)}),sc=T(`ZodNumber`,(e,t)=>{Cr.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>To(e,t,n,r),e.isFinite=!0},He({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=bo(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=bo(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=bo(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>bo(e).format??null},{gt(e,t){return this.check(Ta(e,t))},gte(e,t){return this.check(Ea(e,t))},min(e,t){return this.check(Ea(e,t))},lt(e,t){return this.check(Ca(e,t))},lte(e,t){return this.check(wa(e,t))},max(e,t){return this.check(wa(e,t))},int(e){return this.check(lc(e))},safe(e){return this.check(lc(e))},positive(e){return this.check(Ta(0,e))},nonnegative(e){return this.check(Ea(0,e))},negative(e){return this.check(Ca(0,e))},nonpositive(e){return this.check(wa(0,e))},multipleOf(e,t){return this.check(Da(e,t))},step(e,t){return this.check(Da(e,t))},finite(){return this}}));function P(e){return ma(sc,e)}var cc=T(`ZodNumberFormat`,(e,t)=>{wr.init(e,t),sc.init(e,t)});function lc(e){return ga(cc,e)}var uc=T(`ZodBoolean`,(e,t)=>{Tr.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Eo(e,t,n,r)});function F(e){return _a(uc,e)}var dc=T(`ZodUndefined`,(e,t)=>{Er.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ao(e,t,n,r)});function fc(e){return va(dc,e)}var pc=T(`ZodNull`,(e,t)=>{Dr.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ko(e,t,n,r)});function mc(e){return ya(pc,e)}var hc=T(`ZodAny`,(e,t)=>{Or.init(e,t),j.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function gc(){return ba(hc)}var _c=T(`ZodUnknown`,(e,t)=>{kr.init(e,t),j.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function I(){return xa(_c)}var vc=T(`ZodNever`,(e,t)=>{Ar.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mo(e,t,n,r)});function yc(e){return Sa(vc,e)}var bc=T(`ZodArray`,(e,t)=>{Ns(),Pr.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qo(e,t,n,r),e.element=t.element},{min(e,t){return this.check(ka(e,t))},nonempty(e){return this.check(ka(1,e))},max(e,t){return this.check(Oa(e,t))},length(e,t){return this.check(Aa(e,t))},unwrap(){return this.element}});function L(e,t){return Ua(bc,e,t)}var xc=T(`ZodObject`,(e,t)=>{Ns(),Br.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yo(e,t,n,r),Je(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return H(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(v(this._zod.def,{catchall:e}))},passthrough(){return this.clone(v(this._zod.def,{catchall:I()}))},loose(){return this.clone(v(this._zod.def,{catchall:I()}))},strict(){return this.clone(v(this._zod.def,{catchall:yc()}))},strip(){return this.clone(v(this._zod.def,{catchall:void 0}))},extend(e){return Ce(this,e)},safeExtend(e){return Te(this,e)},merge(e){return Ee(this,e)},pick(e){return be(this,e)},omit(e){return Se(this,e)},partial(...e){return De(Mc,this,e[0])},exactPartial(...e){return De(Nc,this,e[0],`exactPartial`)},required(...e){return Oe(Vc,this,e[0])}});function R(e,t){return new xc({type:`object`,shape:e??{},...b(t)})}function z(e,t){return new xc({type:`object`,shape:e,catchall:I(),...b(t)})}var Sc=T(`ZodUnion`,(e,t)=>{Hr.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xo(e,t,n,r),e.options=t.options});function B(e,t){return new Sc({type:`union`,options:e,...b(t)})}var Cc=T(`ZodDiscriminatedUnion`,(e,t)=>{Sc.init(e,t),Wr.init(e,t)});function wc(e,t,n){return new Cc({type:`union`,options:t,discriminator:e,...b(n)})}var Tc=T(`ZodIntersection`,(e,t)=>{Gr.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zo(e,t,n,r)});function Ec(e,t){return new Tc({type:`intersection`,left:e,right:t})}var Dc=T(`ZodRecord`,(e,t)=>{Ns(),Jr.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ns(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function V(e,t,n){return!t||!t._zod?new Dc({type:`record`,keyType:M(),valueType:e,...b(t)}):new Dc({type:`record`,keyType:e,valueType:t,...b(n)})}var Oc=T(`ZodEnum`,(e,t)=>{Yr.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Io(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Oc({...t,checks:[],...b(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Oc({...t,checks:[],...b(r),entries:i})}});function H(e,t){return new Oc({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...b(t)})}var kc=T(`ZodLiteral`,(e,t)=>{Xr.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lo(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function U(e,t){return new kc({type:`literal`,values:Array.isArray(e)?e:[e],...b(t)})}var Ac=T(`ZodTransform`,(e,t)=>{Ns(),Zr.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wo(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new nt(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Re(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(Re(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function jc(e){return new Ac({type:`transform`,transform:e})}var Mc=T(`ZodOptional`,(e,t)=>{$r.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ps(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function W(e){return new Mc({type:`optional`,innerType:e})}var Nc=T(`ZodExactOptional`,(e,t)=>{ei.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ps(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Pc(e){return new Nc({type:`optional`,innerType:e})}var Fc=T(`ZodNullable`,(e,t)=>{ti.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ic(e){return new Fc({type:`nullable`,innerType:e})}var Lc=T(`ZodDefault`,(e,t)=>{ni.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ss(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Rc(e,t){return new Lc({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():me(t)}})}var zc=T(`ZodPrefault`,(e,t)=>{ii.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Bc(e,t){return new zc({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():me(t)}})}var Vc=T(`ZodNonOptional`,(e,t)=>{ai.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>is(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Hc(e,t){return new Vc({type:`nonoptional`,innerType:e,...b(t)})}var Uc=T(`ZodCatch`,(e,t)=>{ci.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ls(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Wc(e,t){return new Uc({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Xe(t)})}var Gc=T(`ZodPipe`,(e,t)=>{li.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>us(e,t,n,r),e.in=t.in,e.out=t.out});function Kc(e,t){return new Gc({type:`pipe`,in:e,out:t})}var qc=T(`ZodPreprocess`,(e,t)=>{Gc.init(e,t),di.init(e,t)}),Jc=T(`ZodReadonly`,(e,t)=>{fi.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ds(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Yc(e){return new Jc({type:`readonly`,innerType:e})}var Xc=T(`ZodLazy`,(e,t)=>{mi.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ms(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function Zc(e){return new Xc({type:`lazy`,getter:e})}var Qc=T(`ZodCustom`,(e,t)=>{hi.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ho(e,t,n,r)});function $c(e,t={}){return Wa(Qc,e,t)}function el(e,t){return Ga(e,t)}function tl(e,t){return new qc({type:`pipe`,in:jc(e),out:t})}var nl={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},rl;rl||={};function il(e){return ua(Is,e)}function al(e){return da(Ls,e)}function ol(e){return ha(sc,e)}var sl=[`2025-11-25`,`2025-06-18`,`2025-03-26`,`2024-11-05`,`2024-10-07`],cl=`io.modelcontextprotocol/related-task`,ll=`io.modelcontextprotocol/protocolVersion`,ul=`io.modelcontextprotocol/clientInfo`,dl=`io.modelcontextprotocol/serverInfo`,fl=`io.modelcontextprotocol/clientCapabilities`,pl=`io.modelcontextprotocol/subscriptionId`,ml=`io.modelcontextprotocol/logLevel`,hl=Zc(()=>B([M(),P(),F(),mc(),V(M(),hl),L(hl)])),G=V(M(),hl),gl=L(hl),_l=B([M(),P().int()]),vl=M(),yl=R({ttl:P().optional()}),bl=R({taskId:M()}),xl=z({progressToken:_l.optional(),[cl]:bl.optional()}),Sl=R({_meta:xl.optional()}),Cl=Sl.extend({task:yl.optional()}),K=R({method:M(),params:Sl.loose().optional()}),wl=R({_meta:xl.optional()}),Tl=R({method:M(),params:wl.loose().optional()}),El=z({get[dl](){return Bl.optional().catch(void 0)}}),q=z({_meta:El.optional()}),Dl=B([M(),P().int()]),Ol=R({jsonrpc:U(`2.0`),id:Dl,...K.shape}).strict(),kl=R({jsonrpc:U(`2.0`),...Tl.shape}).strict(),Al=R({jsonrpc:U(`2.0`),id:Dl,result:q}).strict(),jl=R({jsonrpc:U(`2.0`),id:Dl.optional(),error:R({code:P().int(),message:M(),data:I().optional()})}).strict(),Ml=B([Ol,kl,Al,jl]),Nl=B([Al,jl]),Pl=q.strict(),Fl=wl.extend({requestId:Dl.optional(),reason:M().optional()}),Il=Tl.extend({method:U(`notifications/cancelled`),params:Fl}),Ll=R({src:M(),mimeType:M().optional(),sizes:L(M()).optional(),theme:H([`light`,`dark`]).optional()}),Rl=R({icons:L(Ll).optional()}),zl=R({name:M(),title:M().optional()}),Bl=zl.extend({...zl.shape,...Rl.shape,version:M(),websiteUrl:M().optional(),description:M().optional()}),Vl=tl(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Ec(R({form:Ec(R({applyDefaults:F().optional()}),G).optional(),url:G.optional()}),G.optional())),Hl=z({list:G.optional(),cancel:G.optional(),requests:z({sampling:z({createMessage:G.optional()}).optional(),elicitation:z({create:G.optional()}).optional()}).optional()}),Ul=z({list:G.optional(),cancel:G.optional(),requests:z({tools:z({call:G.optional()}).optional()}).optional()}),Wl=R({experimental:V(M(),G).optional(),sampling:R({context:G.optional(),tools:G.optional()}).optional(),elicitation:Vl.optional(),roots:R({listChanged:F().optional()}).optional(),tasks:Hl.optional(),extensions:V(M(),G).optional()}),Gl=Sl.extend({protocolVersion:M(),capabilities:Wl,clientInfo:Bl}),Kl=K.extend({method:U(`initialize`),params:Gl}),ql=R({experimental:V(M(),G).optional(),logging:G.optional(),completions:G.optional(),prompts:R({listChanged:F().optional()}).optional(),resources:R({subscribe:F().optional(),listChanged:F().optional()}).optional(),tools:R({listChanged:F().optional()}).optional(),tasks:Ul.optional(),extensions:V(M(),G).optional()}),Jl=q.extend({protocolVersion:M(),capabilities:ql,serverInfo:Bl,instructions:M().optional()}),Yl=Tl.extend({method:U(`notifications/initialized`),params:wl.optional()}),Xl=K.extend({method:U(`server/discover`),params:Sl.optional()}),Zl=q.extend({supportedVersions:L(M()),capabilities:ql,instructions:M().optional()}),Ql=K.extend({method:U(`ping`),params:Sl.optional()}),$l=R({progress:P(),total:W(P()),message:W(M())}),eu=R({...wl.shape,...$l.shape,progressToken:_l}),tu=Tl.extend({method:U(`notifications/progress`),params:eu}),nu=Sl.extend({cursor:vl.optional()}),ru=K.extend({params:nu.optional()}),iu=q.extend({nextCursor:vl.optional()}),au=R({uri:M(),mimeType:W(M()),_meta:V(M(),I()).optional()}),ou=au.extend({text:M()}),su=M().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),cu=au.extend({blob:su}),lu=H([`user`,`assistant`]),uu=R({audience:L(lu).optional(),priority:P().min(0).max(1).optional(),lastModified:il({offset:!0}).optional()}),du=R({...zl.shape,...Rl.shape,uri:M(),description:W(M()),mimeType:W(M()),size:W(P()),annotations:uu.optional(),_meta:W(z({}))}),fu=R({...zl.shape,...Rl.shape,uriTemplate:M(),description:W(M()),mimeType:W(M()),annotations:uu.optional(),_meta:W(z({}))}),pu=ru.extend({method:U(`resources/list`)}),mu=iu.extend({resources:L(du)}),hu=ru.extend({method:U(`resources/templates/list`)}),gu=iu.extend({resourceTemplates:L(fu)}),_u=Sl.extend({uri:M()}),vu=_u,yu=K.extend({method:U(`resources/read`),params:vu}),bu=q.extend({contents:L(B([ou,cu]))}),xu=Tl.extend({method:U(`notifications/resources/list_changed`),params:wl.optional()}),Su=_u,Cu=K.extend({method:U(`resources/subscribe`),params:Su}),wu=_u,Tu=K.extend({method:U(`resources/unsubscribe`),params:wu}),Eu=R({toolsListChanged:F().optional(),promptsListChanged:F().optional(),resourcesListChanged:F().optional(),resourceSubscriptions:L(M()).optional()}),Du=Sl.extend({notifications:Eu}),Ou=K.extend({method:U(`subscriptions/listen`),params:Du}),ku=wl.extend({notifications:Eu}),Au=Tl.extend({method:U(`notifications/subscriptions/acknowledged`),params:ku}),ju=El.extend({[pl]:Dl}),Mu=q.extend({_meta:ju}),Nu=wl.extend({uri:M()}),Pu=Tl.extend({method:U(`notifications/resources/updated`),params:Nu}),Fu=R({name:M(),description:W(M()),required:W(F())}),Iu=R({...zl.shape,...Rl.shape,description:W(M()),arguments:W(L(Fu)),_meta:W(z({}))}),Lu=ru.extend({method:U(`prompts/list`)}),Ru=iu.extend({prompts:L(Iu)}),zu=Sl.extend({name:M(),arguments:V(M(),M()).optional()}),Bu=K.extend({method:U(`prompts/get`),params:zu}),Vu=R({type:U(`text`),text:M(),annotations:uu.optional(),_meta:V(M(),I()).optional()}),Hu=R({type:U(`image`),data:su,mimeType:M(),annotations:uu.optional(),_meta:V(M(),I()).optional()}),Uu=R({type:U(`audio`),data:su,mimeType:M(),annotations:uu.optional(),_meta:V(M(),I()).optional()}),Wu=R({type:U(`tool_use`),name:M(),id:M(),input:V(M(),I()),_meta:V(M(),I()).optional()}),Gu=R({type:U(`resource`),resource:B([ou,cu]),annotations:uu.optional(),_meta:V(M(),I()).optional()}),Ku=du.extend({type:U(`resource_link`)}),qu=B([Vu,Hu,Uu,Ku,Gu]),Ju=R({role:lu,content:qu}),Yu=q.extend({description:M().optional(),messages:L(Ju)}),Xu=Tl.extend({method:U(`notifications/prompts/list_changed`),params:wl.optional()}),Zu=R({title:M().optional(),readOnlyHint:F().optional(),destructiveHint:F().optional(),idempotentHint:F().optional(),openWorldHint:F().optional()}),Qu=R({taskSupport:H([`required`,`optional`,`forbidden`]).optional()}),$u=R({...zl.shape,...Rl.shape,description:M().optional(),inputSchema:R({type:U(`object`),properties:V(M(),hl).optional(),required:L(M()).optional()}).catchall(I()),outputSchema:z({$schema:M().optional()}).optional(),annotations:Zu.optional(),execution:Qu.optional(),_meta:V(M(),I()).optional()}),ed=ru.extend({method:U(`tools/list`)}),td=iu.extend({tools:L($u)}),nd=q.extend({content:L(qu).default([]),structuredContent:I().optional(),isError:F().optional()}),rd=nd.or(q.extend({toolResult:I()})),id=Cl.extend({name:M(),arguments:V(M(),I()).optional()}),ad=K.extend({method:U(`tools/call`),params:id}),od=Tl.extend({method:U(`notifications/tools/list_changed`),params:wl.optional()}),sd=R({autoRefresh:F().default(!0),debounceMs:P().int().nonnegative().default(300)}),cd=H([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),ld=Sl.extend({level:cd}),ud=K.extend({method:U(`logging/setLevel`),params:ld}),dd=wl.extend({level:cd,logger:M().optional(),data:I()}),fd=Tl.extend({method:U(`notifications/message`),params:dd}),pd=R({name:M().optional()}),md=R({hints:L(pd).optional(),costPriority:P().min(0).max(1).optional(),speedPriority:P().min(0).max(1).optional(),intelligencePriority:P().min(0).max(1).optional()}),hd=R({mode:H([`auto`,`required`,`none`]).optional()}),gd=R({type:U(`tool_result`),toolUseId:M().describe(`The unique identifier for the corresponding tool call.`),content:L(qu),structuredContent:I().optional(),isError:F().optional(),_meta:V(M(),I()).optional()}),_d=wc(`type`,[Vu,Hu,Uu]),vd=wc(`type`,[Vu,Hu,Uu,Wu,gd]),yd=R({role:lu,content:B([vd,L(vd)]),_meta:V(M(),I()).optional()}),bd=Cl.extend({messages:L(yd),modelPreferences:md.optional(),systemPrompt:M().optional(),includeContext:H([`none`,`thisServer`,`allServers`]).optional(),temperature:P().optional(),maxTokens:P().int(),stopSequences:L(M()).optional(),metadata:G.optional(),tools:L($u).optional(),toolChoice:hd.optional()}),xd=K.extend({method:U(`sampling/createMessage`),params:bd}),Sd=q.extend({model:M(),stopReason:W(H([`endTurn`,`stopSequence`,`maxTokens`]).or(M())),role:lu,content:_d}),Cd=q.extend({model:M(),stopReason:W(H([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(M())),role:lu,content:B([vd,L(vd)])}),wd=R({type:U(`boolean`),title:M().optional(),description:M().optional(),default:F().optional()}),Td=R({type:U(`string`),title:M().optional(),description:M().optional(),minLength:P().optional(),maxLength:P().optional(),format:H([`email`,`uri`,`date`,`date-time`]).optional(),default:M().optional()}),Ed=R({type:H([`number`,`integer`]),title:M().optional(),description:M().optional(),minimum:P().optional(),maximum:P().optional(),default:P().optional()}),Dd=R({type:U(`string`),title:M().optional(),description:M().optional(),enum:L(M()),default:M().optional()}),Od=R({type:U(`string`),title:M().optional(),description:M().optional(),oneOf:L(R({const:M(),title:M()})),default:M().optional()}),kd=R({type:U(`string`),title:M().optional(),description:M().optional(),enum:L(M()),enumNames:L(M()).optional(),default:M().optional()}),Ad=B([Dd,Od]),jd=R({type:U(`array`),title:M().optional(),description:M().optional(),minItems:P().optional(),maxItems:P().optional(),items:R({type:U(`string`),enum:L(M())}),default:L(M()).optional()}),Md=R({type:U(`array`),title:M().optional(),description:M().optional(),minItems:P().optional(),maxItems:P().optional(),items:R({anyOf:L(R({const:M(),title:M()}))}),default:L(M()).optional()}),Nd=B([jd,Md]),Pd=B([kd,Ad,Nd]),Fd=B([Pd,wd,Td,Ed]),Id=Cl.extend({mode:U(`form`).optional(),message:M(),requestedSchema:R({type:U(`object`),properties:V(M(),Fd),required:L(M()).optional()}).catchall(I())}),Ld=Cl.extend({mode:U(`url`),message:M(),elicitationId:M(),url:M().url()}),Rd=B([Id,Ld]),zd=K.extend({method:U(`elicitation/create`),params:Rd}),Bd=wl.extend({elicitationId:M()}),Vd=Tl.extend({method:U(`notifications/elicitation/complete`),params:Bd}),Hd=q.extend({action:H([`accept`,`decline`,`cancel`]),content:tl(e=>e===null?void 0:e,V(M(),B([M(),P(),F(),L(M())])).optional())}),Ud=R({type:U(`ref/resource`),uri:M()}),Wd=R({type:U(`ref/prompt`),name:M()}),Gd=Sl.extend({ref:B([Wd,Ud]),argument:R({name:M(),value:M()}),context:R({arguments:V(M(),M()).optional()}).optional()}),Kd=K.extend({method:U(`completion/complete`),params:Gd}),qd=q.extend({completion:z({values:L(M()).max(100),total:W(P().int()),hasMore:W(F())})}),Jd=R({uri:M().startsWith(`file://`),name:M().optional(),_meta:V(M(),I()).optional()}),Yd=K.extend({method:U(`roots/list`),params:Sl.optional()}),Xd=q.extend({roots:L(Jd)}),Zd=Tl.extend({method:U(`notifications/roots/list_changed`),params:wl.optional()}),Qd=z({ttl:P().optional(),pollInterval:P().optional()}),$d=H([`working`,`input_required`,`completed`,`failed`,`cancelled`]),ef=R({taskId:M(),status:$d,ttl:B([P(),mc()]),createdAt:M(),lastUpdatedAt:M(),pollInterval:W(P()),statusMessage:W(M())}),tf=q.extend({task:ef}),nf=wl.merge(ef),rf=Tl.extend({method:U(`notifications/tasks/status`),params:nf}),af=K.extend({method:U(`tasks/get`),params:Sl.extend({taskId:M()})}),of=q.merge(ef),sf=K.extend({method:U(`tasks/result`),params:Sl.extend({taskId:M()})}),cf=q.loose(),lf=ru.extend({method:U(`tasks/list`)}),uf=iu.extend({tasks:L(ef)}),df=K.extend({method:U(`tasks/cancel`),params:Sl.extend({taskId:M()})}),ff=q.merge(ef),pf=B([Ql,Kl,Xl,Kd,ud,Bu,Lu,pu,hu,yu,Cu,Tu,Ou,ad,ed]),mf=B([Il,tu,Yl,Zd]),hf=B([Pl,Sd,Cd,Hd,Xd]),gf=B([Ql,xd,zd,Yd]),_f=B([Il,tu,fd,Pu,xu,od,Xu,Au,Vd]),vf=B([Pl,Jl,Zl,qd,Yu,Ru,mu,gu,bu,nd,td,Mu]),yf=Gs().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:nl.custom,message:`URL must be parseable`,fatal:!0}),Qe}).refine(e=>{let t=new URL(e);return t.protocol!==`javascript:`&&t.protocol!==`data:`&&t.protocol!==`vbscript:`},{message:`URL cannot use javascript:, data:, or vbscript: scheme`}),bf=z({resource:M().url(),authorization_servers:L(yf).optional(),jwks_uri:M().url().optional(),scopes_supported:L(M()).optional(),bearer_methods_supported:L(M()).optional(),resource_signing_alg_values_supported:L(M()).optional(),resource_name:M().optional(),resource_documentation:M().optional(),resource_policy_uri:M().url().optional(),resource_tos_uri:M().url().optional(),tls_client_certificate_bound_access_tokens:F().optional(),authorization_details_types_supported:L(M()).optional(),dpop_signing_alg_values_supported:L(M()).optional(),dpop_bound_access_tokens_required:F().optional()}),xf=z({issuer:M(),authorization_endpoint:yf,token_endpoint:yf,registration_endpoint:yf.optional(),scopes_supported:L(M()).optional(),response_types_supported:L(M()),response_modes_supported:L(M()).optional(),grant_types_supported:L(M()).optional(),token_endpoint_auth_methods_supported:L(M()).optional(),token_endpoint_auth_signing_alg_values_supported:L(M()).optional(),service_documentation:yf.optional(),revocation_endpoint:yf.optional(),revocation_endpoint_auth_methods_supported:L(M()).optional(),revocation_endpoint_auth_signing_alg_values_supported:L(M()).optional(),introspection_endpoint:M().optional(),introspection_endpoint_auth_methods_supported:L(M()).optional(),introspection_endpoint_auth_signing_alg_values_supported:L(M()).optional(),code_challenge_methods_supported:L(M()).optional(),client_id_metadata_document_supported:F().optional(),authorization_response_iss_parameter_supported:F().optional().catch(void 0),dpop_signing_alg_values_supported:L(M()).optional()}),Sf=z({issuer:M(),authorization_endpoint:yf,token_endpoint:yf,userinfo_endpoint:yf.optional(),jwks_uri:yf,registration_endpoint:yf.optional(),scopes_supported:L(M()).optional(),response_types_supported:L(M()),response_modes_supported:L(M()).optional(),grant_types_supported:L(M()).optional(),acr_values_supported:L(M()).optional(),subject_types_supported:L(M()),id_token_signing_alg_values_supported:L(M()),id_token_encryption_alg_values_supported:L(M()).optional(),id_token_encryption_enc_values_supported:L(M()).optional(),userinfo_signing_alg_values_supported:L(M()).optional(),userinfo_encryption_alg_values_supported:L(M()).optional(),userinfo_encryption_enc_values_supported:L(M()).optional(),request_object_signing_alg_values_supported:L(M()).optional(),request_object_encryption_alg_values_supported:L(M()).optional(),request_object_encryption_enc_values_supported:L(M()).optional(),token_endpoint_auth_methods_supported:L(M()).optional(),token_endpoint_auth_signing_alg_values_supported:L(M()).optional(),display_values_supported:L(M()).optional(),claim_types_supported:L(M()).optional(),claims_supported:L(M()).optional(),service_documentation:M().optional(),claims_locales_supported:L(M()).optional(),ui_locales_supported:L(M()).optional(),claims_parameter_supported:F().optional(),request_parameter_supported:F().optional(),request_uri_parameter_supported:F().optional(),require_request_uri_registration:F().optional(),op_policy_uri:yf.optional(),op_tos_uri:yf.optional(),client_id_metadata_document_supported:F().optional(),authorization_response_iss_parameter_supported:F().optional().catch(void 0)}),Cf=R({...Sf.shape,...xf.pick({code_challenge_methods_supported:!0}).shape}),wf=R({access_token:M(),id_token:M().optional(),token_type:M(),expires_in:ol().optional(),scope:M().optional(),refresh_token:M().optional(),issuer:M().optional().catch(void 0)}).strip(),Tf=R({issued_token_type:U(`urn:ietf:params:oauth:token-type:id-jag`),access_token:M(),token_type:M().optional(),expires_in:P().optional(),scope:M().optional()}).strip(),Ef=R({error:M(),error_description:M().optional(),error_uri:M().optional()}),Df=yf.optional().or(U(``).transform(()=>void 0)),Of=R({redirect_uris:L(yf),token_endpoint_auth_method:M().optional(),grant_types:L(M()).optional(),response_types:L(M()).optional(),application_type:M().optional(),client_name:M().optional(),client_uri:yf.optional(),logo_uri:Df,scope:M().optional(),contacts:L(M()).optional(),tos_uri:Df,policy_uri:M().optional(),jwks_uri:yf.optional(),jwks:gc().optional(),software_id:M().optional(),software_version:M().optional(),software_statement:M().optional()}).strip(),kf=R({client_id:M(),client_secret:M().optional(),client_id_issued_at:P().optional(),client_secret_expires_at:P().optional(),issuer:M().optional().catch(void 0)}).strip(),Af=Of.merge(kf),jf=R({error:M(),error_description:M().optional()}).strip(),Mf=R({token:M(),token_type_hint:M().optional()}).strip(),Nf=Symbol.for(`mcp.sdk.errorBrands`);function Pf(e,t){let n=new Set,r=t;for(;typeof r==`function`;){let e=r.mcpBrand;Object.prototype.hasOwnProperty.call(r,`mcpBrand`)&&typeof e==`string`&&n.add(e),r=Object.getPrototypeOf(r)}n.size!==0&&Object.defineProperty(e,Nf,{value:n,enumerable:!1,configurable:!0})}function Ff(e,t){try{if(typeof t==`object`&&t&&Object.prototype.hasOwnProperty.call(e,`mcpBrand`)&&typeof e.mcpBrand==`string`&&Object.prototype.hasOwnProperty.call(t,Nf)){let n=t[Nf];if(n&&typeof n.has==`function`&&n.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}(class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthError`})}static[Symbol.hasInstance](e){return Ff(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Ff(this,e)}constructor(e,t,n){super(t),this.code=e,this.errorUri=n,this.name=`OAuthError`,Pf(this,new.target)}toResponseObject(){let e={error:this.code,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}});var J=function(e){return e.NotConnected=`NOT_CONNECTED`,e.AlreadyConnected=`ALREADY_CONNECTED`,e.NotInitialized=`NOT_INITIALIZED`,e.CapabilityNotSupported=`CAPABILITY_NOT_SUPPORTED`,e.RequestTimeout=`REQUEST_TIMEOUT`,e.ConnectionClosed=`CONNECTION_CLOSED`,e.SendFailed=`SEND_FAILED`,e.InvalidResult=`INVALID_RESULT`,e.UnsupportedResultType=`UNSUPPORTED_RESULT_TYPE`,e.InputRequiredRoundsExceeded=`INPUT_REQUIRED_ROUNDS_EXCEEDED`,e.ListPaginationExceeded=`LIST_PAGINATION_EXCEEDED`,e.MethodNotSupportedByProtocolVersion=`METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION`,e.EraNegotiationFailed=`ERA_NEGOTIATION_FAILED`,e.ClientHttpNotImplemented=`CLIENT_HTTP_NOT_IMPLEMENTED`,e.ClientHttpAuthentication=`CLIENT_HTTP_AUTHENTICATION`,e.ClientHttpForbidden=`CLIENT_HTTP_FORBIDDEN`,e.ClientHttpUnexpectedContent=`CLIENT_HTTP_UNEXPECTED_CONTENT`,e.ClientHttpFailedToOpenStream=`CLIENT_HTTP_FAILED_TO_OPEN_STREAM`,e.ClientHttpFailedToTerminateSession=`CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION`,e}({}),Y=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkError`})}static[Symbol.hasInstance](e){return Ff(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Ff(this,e)}constructor(e,t,n,r){super(t,r),this.code=e,this.data=n,this.name=`SdkError`,Pf(this,new.target)}},If=class extends Y{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkHttpError`})}constructor(e,t,n,r){super(e,t,n,r),this.name=`SdkHttpError`}get status(){return this.data.status}get statusText(){return this.data.statusText}},Lf=`2026-07-28`,Rf=[Lf];function zf(e){return e>=Lf}function Bf(e){return e.filter(e=>!zf(e))}function Vf(e){return e.filter(e=>zf(e))}function Hf(e){let t=e.structuredContent;return t===void 0||!(typeof t!=`object`||!t||Array.isArray(t))||(e.content?.some(e=>e.type===`text`)??!1)?e:{...e,content:[...e.content??[],{type:`text`,text:JSON.stringify(t)}]}}var Uf=[`task`,`inputRequests`,`requestState`];function Wf(e){return typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0||Uf.some(t=>t in e)?e:{...e,content:[]}}function Gf(){let e=Zc(()=>B([M(),P(),F(),mc(),V(M(),e),L(e)])),t=V(M(),e),n=B([M(),P().int()]),r=M(),i=R({ttl:P().optional()}),a=R({taskId:M()}),o=z({progressToken:n.optional(),"io.modelcontextprotocol/related-task":a.optional()}),s=R({_meta:o.optional()}),c=s.extend({task:i.optional()}),l=R({method:M(),params:s.loose().optional()}),u=R({_meta:o.optional()}),d=R({method:M(),params:u.loose().optional()}),f=z({_meta:o.optional()}),p=B([M(),P().int()]),m=f.strict(),h=u.extend({requestId:p.optional(),reason:M().optional()}),g=d.extend({method:U(`notifications/cancelled`),params:h}),ee=R({src:M(),mimeType:M().optional(),sizes:L(M()).optional(),theme:H([`light`,`dark`]).optional()}),te=R({icons:L(ee).optional()}),_=R({name:M(),title:M().optional()}),ne=_.extend({..._.shape,...te.shape,version:M(),websiteUrl:M().optional(),description:M().optional()}),re=tl(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Ec(R({form:Ec(R({applyDefaults:F().optional()}),t).optional(),url:t.optional()}),t.optional())),ie=z({list:t.optional(),cancel:t.optional(),requests:z({sampling:z({createMessage:t.optional()}).optional(),elicitation:z({create:t.optional()}).optional()}).optional()}),ae=z({list:t.optional(),cancel:t.optional(),requests:z({tools:z({call:t.optional()}).optional()}).optional()}),oe=R({experimental:V(M(),t).optional(),sampling:R({context:t.optional(),tools:t.optional()}).optional(),elicitation:re.optional(),roots:R({listChanged:F().optional()}).optional(),tasks:ie.optional(),extensions:V(M(),t).optional()}),se=s.extend({protocolVersion:M(),capabilities:oe,clientInfo:ne}),v=l.extend({method:U(`initialize`),params:se}),ce=R({experimental:V(M(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:R({listChanged:F().optional()}).optional(),resources:R({subscribe:F().optional(),listChanged:F().optional()}).optional(),tools:R({listChanged:F().optional()}).optional(),tasks:ae.optional(),extensions:V(M(),t).optional()}),le=f.extend({protocolVersion:M(),capabilities:ce,serverInfo:ne,instructions:M().optional()}),ue=d.extend({method:U(`notifications/initialized`),params:u.optional()}),de=l.extend({method:U(`ping`),params:s.optional()}),fe=R({progress:P(),total:W(P()),message:W(M())}),pe=R({...u.shape,...fe.shape,progressToken:n}),me=d.extend({method:U(`notifications/progress`),params:pe}),he=s.extend({cursor:r.optional()}),ge=l.extend({params:he.optional()}),y=f.extend({nextCursor:r.optional()}),b=R({uri:M(),mimeType:W(M()),_meta:V(M(),I()).optional()}),_e=b.extend({text:M()}),ve=M().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),ye=b.extend({blob:ve}),x=H([`user`,`assistant`]),be=R({audience:L(x).optional(),priority:P().min(0).max(1).optional(),lastModified:il({offset:!0}).optional()}),xe=R({..._.shape,...te.shape,uri:M(),description:W(M()),mimeType:W(M()),size:W(P()),annotations:be.optional(),_meta:W(z({}))}),Se=R({..._.shape,...te.shape,uriTemplate:M(),description:W(M()),mimeType:W(M()),annotations:be.optional(),_meta:W(z({}))}),Ce=ge.extend({method:U(`resources/list`)}),we=y.extend({resources:L(xe)}),Te=ge.extend({method:U(`resources/templates/list`)}),Ee=y.extend({resourceTemplates:L(Se)}),De=s.extend({uri:M()}),Oe=De,S=l.extend({method:U(`resources/read`),params:Oe}),ke=f.extend({contents:L(B([_e,ye]))}),Ae=d.extend({method:U(`notifications/resources/list_changed`),params:u.optional()}),je=De,Me=l.extend({method:U(`resources/subscribe`),params:je}),C=De,Ne=l.extend({method:U(`resources/unsubscribe`),params:C}),Pe=u.extend({uri:M()}),Fe=d.extend({method:U(`notifications/resources/updated`),params:Pe}),Ie=R({name:M(),description:W(M()),required:W(F())}),Le=R({..._.shape,...te.shape,description:W(M()),arguments:W(L(Ie)),_meta:W(z({}))}),Re=ge.extend({method:U(`prompts/list`)}),ze=y.extend({prompts:L(Le)}),Be=s.extend({name:M(),arguments:V(M(),M()).optional()}),Ve=l.extend({method:U(`prompts/get`),params:Be}),He=R({type:U(`text`),text:M(),annotations:be.optional(),_meta:V(M(),I()).optional()}),Ue=R({type:U(`image`),data:ve,mimeType:M(),annotations:be.optional(),_meta:V(M(),I()).optional()}),We=R({type:U(`audio`),data:ve,mimeType:M(),annotations:be.optional(),_meta:V(M(),I()).optional()}),Ge=R({type:U(`tool_use`),name:M(),id:M(),input:V(M(),I()),_meta:V(M(),I()).optional()}),Ke=R({type:U(`resource`),resource:B([_e,ye]),annotations:be.optional(),_meta:V(M(),I()).optional()}),qe=xe.extend({type:U(`resource_link`)}),w=B([He,Ue,We,qe,Ke]),Je=R({role:x,content:w}),Ye=f.extend({description:M().optional(),messages:L(Je)}),Xe=d.extend({method:U(`notifications/prompts/list_changed`),params:u.optional()}),Ze=R({title:M().optional(),readOnlyHint:F().optional(),destructiveHint:F().optional(),idempotentHint:F().optional(),openWorldHint:F().optional()}),Qe=R({taskSupport:H([`required`,`optional`,`forbidden`]).optional()}),$e=R({..._.shape,...te.shape,description:M().optional(),inputSchema:R({type:U(`object`),properties:V(M(),e).optional(),required:L(M()).optional()}).catchall(I()),outputSchema:R({type:U(`object`),properties:V(M(),e).optional(),required:L(M()).optional()}).catchall(I()).optional(),annotations:Ze.optional(),execution:Qe.optional(),_meta:V(M(),I()).optional()}),et=ge.extend({method:U(`tools/list`)}),tt=y.extend({tools:L($e)}),T=f.extend({content:L(w),structuredContent:V(M(),I()).optional(),isError:F().optional()}),E=c.extend({name:M(),arguments:V(M(),I()).optional()}),nt=l.extend({method:U(`tools/call`),params:E}),rt=d.extend({method:U(`notifications/tools/list_changed`),params:u.optional()}),it=H([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),at=s.extend({level:it}),ot=l.extend({method:U(`logging/setLevel`),params:at}),st=u.extend({level:it,logger:M().optional(),data:I()}),ct=d.extend({method:U(`notifications/message`),params:st}),lt=R({name:M().optional()}),ut=R({hints:L(lt).optional(),costPriority:P().min(0).max(1).optional(),speedPriority:P().min(0).max(1).optional(),intelligencePriority:P().min(0).max(1).optional()}),dt=R({mode:H([`auto`,`required`,`none`]).optional()}),ft=R({type:U(`tool_result`),toolUseId:M().describe(`The unique identifier for the corresponding tool call.`),content:L(w),structuredContent:R({}).loose().optional(),isError:F().optional(),_meta:V(M(),I()).optional()}),pt=wc(`type`,[He,Ue,We]),mt=wc(`type`,[He,Ue,We,Ge,ft]),ht=R({role:x,content:B([mt,L(mt)]),_meta:V(M(),I()).optional()}),gt=c.extend({messages:L(ht),modelPreferences:ut.optional(),systemPrompt:M().optional(),includeContext:H([`none`,`thisServer`,`allServers`]).optional(),temperature:P().optional(),maxTokens:P().int(),stopSequences:L(M()).optional(),metadata:t.optional(),tools:L($e).optional(),toolChoice:dt.optional()}),_t=l.extend({method:U(`sampling/createMessage`),params:gt}),vt=f.extend({model:M(),stopReason:W(H([`endTurn`,`stopSequence`,`maxTokens`]).or(M())),role:x,content:pt}),yt=f.extend({model:M(),stopReason:W(H([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(M())),role:x,content:B([mt,L(mt)])}),bt=R({type:U(`boolean`),title:M().optional(),description:M().optional(),default:F().optional()}),xt=R({type:U(`string`),title:M().optional(),description:M().optional(),minLength:P().optional(),maxLength:P().optional(),format:H([`email`,`uri`,`date`,`date-time`]).optional(),default:M().optional()}),St=R({type:H([`number`,`integer`]),title:M().optional(),description:M().optional(),minimum:P().optional(),maximum:P().optional(),default:P().optional()}),Ct=R({type:U(`string`),title:M().optional(),description:M().optional(),enum:L(M()),default:M().optional()}),wt=R({type:U(`string`),title:M().optional(),description:M().optional(),oneOf:L(R({const:M(),title:M()})),default:M().optional()}),Tt=R({type:U(`string`),title:M().optional(),description:M().optional(),enum:L(M()),enumNames:L(M()).optional(),default:M().optional()}),Et=B([Ct,wt]),Dt=R({type:U(`array`),title:M().optional(),description:M().optional(),minItems:P().optional(),maxItems:P().optional(),items:R({type:U(`string`),enum:L(M())}),default:L(M()).optional()}),Ot=R({type:U(`array`),title:M().optional(),description:M().optional(),minItems:P().optional(),maxItems:P().optional(),items:R({anyOf:L(R({const:M(),title:M()}))}),default:L(M()).optional()}),kt=B([Dt,Ot]),At=B([Tt,Et,kt]),jt=B([At,bt,xt,St]),Mt=c.extend({mode:U(`form`).optional(),message:M(),requestedSchema:R({type:U(`object`),properties:V(M(),jt),required:L(M()).optional()}).catchall(I())}),Nt=c.extend({mode:U(`url`),message:M(),elicitationId:M(),url:M().url()}),Pt=B([Mt,Nt]),Ft=l.extend({method:U(`elicitation/create`),params:Pt}),It=u.extend({elicitationId:M()}),Lt=d.extend({method:U(`notifications/elicitation/complete`),params:It}),Rt=f.extend({action:H([`accept`,`decline`,`cancel`]),content:tl(e=>e===null?void 0:e,V(M(),B([M(),P(),F(),L(M())])).optional())}),zt=R({type:U(`ref/resource`),uri:M()}),Bt=R({type:U(`ref/prompt`),name:M()}),Vt=s.extend({ref:B([Bt,zt]),argument:R({name:M(),value:M()}),context:R({arguments:V(M(),M()).optional()}).optional()}),Ht=l.extend({method:U(`completion/complete`),params:Vt}),Ut=f.extend({completion:z({values:L(M()).max(100),total:W(P().int()),hasMore:W(F())})}),Wt=R({uri:M().startsWith(`file://`),name:M().optional(),_meta:V(M(),I()).optional()}),Gt=l.extend({method:U(`roots/list`),params:s.optional()}),Kt=f.extend({roots:L(Wt)}),qt=d.extend({method:U(`notifications/roots/list_changed`),params:u.optional()}),Jt=z({ttl:P().optional(),pollInterval:P().optional()}),Yt=H([`working`,`input_required`,`completed`,`failed`,`cancelled`]),Xt=R({taskId:M(),status:Yt,ttl:B([P(),mc()]),createdAt:M(),lastUpdatedAt:M(),pollInterval:W(P()),statusMessage:W(M())}),Zt=f.extend({task:Xt}),Qt=u.merge(Xt),$t=d.extend({method:U(`notifications/tasks/status`),params:Qt}),en=l.extend({method:U(`tasks/get`),params:s.extend({taskId:M()})}),tn=f.merge(Xt),nn=l.extend({method:U(`tasks/result`),params:s.extend({taskId:M()})}),rn=f.loose(),D=ge.extend({method:U(`tasks/list`)}),an=y.extend({tasks:L(Xt)}),on=l.extend({method:U(`tasks/cancel`),params:s.extend({taskId:M()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,TaskMetadataSchema:i,RelatedTaskMetadataSchema:a,RequestMetaSchema:o,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:u,NotificationSchema:d,ResultSchema:f,RequestIdSchema:p,EmptyResultSchema:m,CancelledNotificationParamsSchema:h,CancelledNotificationSchema:g,IconSchema:ee,IconsSchema:te,BaseMetadataSchema:_,ImplementationSchema:ne,ClientTasksCapabilitySchema:ie,ServerTasksCapabilitySchema:ae,ClientCapabilitiesSchema:oe,InitializeRequestParamsSchema:se,InitializeRequestSchema:v,ServerCapabilitiesSchema:ce,InitializeResultSchema:le,InitializedNotificationSchema:ue,PingRequestSchema:de,ProgressSchema:fe,ProgressNotificationParamsSchema:pe,ProgressNotificationSchema:me,PaginatedRequestParamsSchema:he,PaginatedRequestSchema:ge,PaginatedResultSchema:y,ResourceContentsSchema:b,TextResourceContentsSchema:_e,BlobResourceContentsSchema:ye,RoleSchema:x,AnnotationsSchema:be,ResourceSchema:xe,ResourceTemplateSchema:Se,ListResourcesRequestSchema:Ce,ListResourcesResultSchema:we,ListResourceTemplatesRequestSchema:Te,ListResourceTemplatesResultSchema:Ee,ResourceRequestParamsSchema:De,ReadResourceRequestParamsSchema:Oe,ReadResourceRequestSchema:S,ReadResourceResultSchema:ke,ResourceListChangedNotificationSchema:Ae,SubscribeRequestParamsSchema:je,SubscribeRequestSchema:Me,UnsubscribeRequestParamsSchema:C,UnsubscribeRequestSchema:Ne,ResourceUpdatedNotificationParamsSchema:Pe,ResourceUpdatedNotificationSchema:Fe,PromptArgumentSchema:Ie,PromptSchema:Le,ListPromptsRequestSchema:Re,ListPromptsResultSchema:ze,GetPromptRequestParamsSchema:Be,GetPromptRequestSchema:Ve,TextContentSchema:He,ImageContentSchema:Ue,AudioContentSchema:We,ToolUseContentSchema:Ge,EmbeddedResourceSchema:Ke,ResourceLinkSchema:qe,ContentBlockSchema:w,PromptMessageSchema:Je,GetPromptResultSchema:Ye,PromptListChangedNotificationSchema:Xe,ToolAnnotationsSchema:Ze,ToolExecutionSchema:Qe,ToolSchema:$e,ListToolsRequestSchema:et,ListToolsResultSchema:tt,CallToolResultSchema:T,CallToolRequestParamsSchema:E,CallToolRequestSchema:nt,ToolListChangedNotificationSchema:rt,LoggingLevelSchema:it,SetLevelRequestParamsSchema:at,SetLevelRequestSchema:ot,LoggingMessageNotificationParamsSchema:st,LoggingMessageNotificationSchema:ct,ModelHintSchema:lt,ModelPreferencesSchema:ut,ToolChoiceSchema:dt,ToolResultContentSchema:ft,SamplingContentSchema:pt,SamplingMessageContentBlockSchema:mt,SamplingMessageSchema:ht,CreateMessageRequestParamsSchema:gt,CreateMessageRequestSchema:_t,CreateMessageResultSchema:vt,CreateMessageResultWithToolsSchema:yt,BooleanSchemaSchema:bt,StringSchemaSchema:xt,NumberSchemaSchema:St,UntitledSingleSelectEnumSchemaSchema:Ct,TitledSingleSelectEnumSchemaSchema:wt,LegacyTitledEnumSchemaSchema:Tt,SingleSelectEnumSchemaSchema:Et,UntitledMultiSelectEnumSchemaSchema:Dt,TitledMultiSelectEnumSchemaSchema:Ot,MultiSelectEnumSchemaSchema:kt,EnumSchemaSchema:At,PrimitiveSchemaDefinitionSchema:jt,ElicitRequestFormParamsSchema:Mt,ElicitRequestURLParamsSchema:Nt,ElicitRequestParamsSchema:Pt,ElicitRequestSchema:Ft,ElicitationCompleteNotificationParamsSchema:It,ElicitationCompleteNotificationSchema:Lt,ElicitResultSchema:Rt,ResourceTemplateReferenceSchema:zt,PromptReferenceSchema:Bt,CompleteRequestParamsSchema:Vt,CompleteRequestSchema:Ht,CompleteResultSchema:Ut,RootSchema:Wt,ListRootsRequestSchema:Gt,ListRootsResultSchema:Kt,RootsListChangedNotificationSchema:qt,TaskCreationParamsSchema:Jt,TaskStatusSchema:Yt,TaskSchema:Xt,CreateTaskResultSchema:Zt,TaskStatusNotificationParamsSchema:Qt,TaskStatusNotificationSchema:$t,GetTaskRequestSchema:en,GetTaskResultSchema:tn,GetTaskPayloadRequestSchema:nn,GetTaskPayloadResultSchema:rn,ListTasksRequestSchema:D,ListTasksResultSchema:an,CancelTaskRequestSchema:on,CancelTaskResultSchema:f.merge(Xt),ClientRequestSchema:B([de,v,Ht,ot,Ve,Re,Ce,Te,S,Me,Ne,nt,et,en,nn,D,on]),ClientNotificationSchema:B([g,me,ue,qt,$t]),ClientResultSchema:B([m,vt,yt,Rt,Kt,tn,an,Zt]),ServerRequestSchema:B([de,_t,Ft,Gt,en,nn,D,on]),ServerNotificationSchema:B([g,me,ct,Fe,Ae,rt,Xe,$t,Lt]),ServerResultSchema:B([m,le,Ut,Ye,ze,we,Ee,ke,T,tt,tn,an,Zt]),CallToolResultWireSchema:I().superRefine((e,t)=>{if(!(typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0)){for(let n of Uf)if(n in e){t.addIssue({code:`custom`,message:`content is required when the body carries \'${n}\' \u2014 another result family cannot default into an empty tools/call success`});return}}}).transform(Wf).pipe(T)}}var Kf;function qf(){return Kf??=Gf()}function Jf(e){return e.type!==`object`}var Yf=new Set([`const`,`enum`,`default`,`examples`]),Xf=new Set([`properties`,`patternProperties`,`$defs`,`definitions`,`dependentSchemas`,`dependencies`]);function Zf(e){return e!==void 0&&!(typeof e==`string`&&e.startsWith(`#`))}function Qf(e){let t=typeof e.$schema==`string`?e.$schema:void 0;if(Zf(e.$id))return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:e},required:[`result`]};let n=s(e.$schema)&&e.$recursiveAnchor!==!0,r=(e,t)=>{if(Array.isArray(e))return e.map(e=>r(e,!1));if(typeof e!=`object`||!e||!t&&Zf(e.$id))return e;let i={},a=!1;for(let[o,s]of Object.entries(e))t?i[o]=r(s,!1):(o===`$ref`||o===`$dynamicRef`)&&typeof s==`string`?i[o]=s===`#`?`#/properties/result`:s.startsWith(`#/`)?`#/properties/result${s.slice(1)}`:s:o===`$recursiveRef`&&s===`#`&&n?a=!0:Yf.has(o)?i[o]=s:Xf.has(o)?i[o]=r(s,!0):i[o]=r(s,!1);return a&&(`$ref`in i?i.allOf=[...Array.isArray(i.allOf)?i.allOf:[],{$ref:`#/properties/result`}]:i.$ref=`#/properties/result`),i};return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:r(e,!1)},required:[`result`]}}var $f={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},ep={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},tp={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},np;function rp(){if(np)return np;let e=qf();return np={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}},np}function ip(e){return Object.prototype.hasOwnProperty.call($f,e)}function ap(e){return Object.prototype.hasOwnProperty.call(ep,e)}function op(e){return Object.prototype.hasOwnProperty.call(tp,e)}function sp(e){return op(e)?rp().resultSchemas[e]:void 0}function cp(e){return ip(e)?rp().requestSchemas[e]:void 0}function lp(e){return ap(e)?rp().notificationSchemas[e]:void 0}Object.keys($f),Object.keys(ep);function up(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function dp(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var fp={ok:!1,reason:`not-in-era`};function pp(e){return up(e)&&up(e.outputSchema)&&Jf(e.outputSchema)}function mp(e){return e}var hp={era:`2025-11-25`,hasRequestMethod:ip,hasNotificationMethod:ap,validateRequest:(e,t)=>dp(cp(e),t),validateResult:(e,t)=>dp(sp(e),t),validateNotification:(e,t)=>dp(lp(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>fp,validateInputResponse:()=>fp,samplingResultVariant:((e,t)=>{let n=qf();return dp(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)}),outboundEnvelope:e=>void 0,validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let n=Hf(e),r=n.structuredContent;if(r===void 0)return n;let i=typeof r!=`object`||!r||Array.isArray(r),a=t!==void 0&&Jf(t);return!i&&!a?n:{...n,structuredContent:{result:r}}},decodeResult(e,t){if(up(t)&&`resultType`in t){let e={...t};return delete e.resultType,{kind:`complete`,result:mp(e)}}return{kind:`complete`,result:mp(t)}},encodeResult(e,t){if(e!==`tools/list`)return t;let n=t.tools;return!Array.isArray(n)||!n.some(e=>pp(e))?t:{...t,tools:n.map(e=>pp(e)?{...e,outputSchema:Qf(e.outputSchema)}:e)}},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope:e=>void 0};function gp(){let e=Zc(()=>B([M(),P(),F(),mc(),V(M(),e),L(e)])),t=V(M(),e),n=B([M(),P().int()]),r=M(),i=B([M(),P().int()]),a=H([`user`,`assistant`]),o=H([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),s=M().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),c=R({ttl:P().optional()}),l=R({taskId:M()}),u=z({progressToken:n.optional(),"io.modelcontextprotocol/related-task":l.optional()}),d=R({_meta:u.optional()}),f=d.extend({task:c.optional()}),p=R({_meta:u.optional()}),m=R({method:M(),params:p.loose().optional()}),h=R({src:M(),mimeType:M().optional(),sizes:L(M()).optional(),theme:H([`light`,`dark`]).optional()}),g=R({icons:L(h).optional()}),ee=R({name:M(),title:M().optional()}),te=ee.extend({...ee.shape,...g.shape,version:M(),websiteUrl:M().optional(),description:M().optional()}),_=tl(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Ec(R({form:Ec(R({applyDefaults:F().optional()}),t).optional(),url:t.optional()}),t.optional())),ne=z({list:t.optional(),cancel:t.optional(),requests:z({sampling:z({createMessage:t.optional()}).optional(),elicitation:z({create:t.optional()}).optional()}).optional()}),re=z({list:t.optional(),cancel:t.optional(),requests:z({tools:z({call:t.optional()}).optional()}).optional()}),ie=R({experimental:V(M(),t).optional(),sampling:R({context:t.optional(),tools:t.optional()}).optional(),elicitation:_.optional(),roots:R({listChanged:F().optional()}).optional(),tasks:ne.optional(),extensions:V(M(),t).optional()}),ae=R({experimental:V(M(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:R({listChanged:F().optional()}).optional(),resources:R({subscribe:F().optional(),listChanged:F().optional()}).optional(),tools:R({listChanged:F().optional()}).optional(),tasks:re.optional(),extensions:V(M(),t).optional()}),oe=R({progress:P(),total:W(P()),message:W(M())}),se=R({...p.shape,...oe.shape,progressToken:n}),v=m.extend({method:U(`notifications/progress`),params:se}),ce=p.extend({level:o,logger:M().optional(),data:I()}),le=m.extend({method:U(`notifications/message`),params:ce}),ue=R({uri:M(),mimeType:W(M()),_meta:V(M(),I()).optional()}),de=ue.extend({text:M()}),fe=ue.extend({blob:s}),pe=R({audience:L(a).optional(),priority:P().min(0).max(1).optional(),lastModified:il({offset:!0}).optional()}),me=R({...ee.shape,...g.shape,uri:M(),description:W(M()),mimeType:W(M()),size:W(P()),annotations:pe.optional(),_meta:W(z({}))}),he=R({...ee.shape,...g.shape,uriTemplate:M(),description:W(M()),mimeType:W(M()),annotations:pe.optional(),_meta:W(z({}))}),ge=m.extend({method:U(`notifications/resources/list_changed`),params:p.optional()}),y=p.extend({uri:M()}),b=m.extend({method:U(`notifications/resources/updated`),params:y}),_e=R({name:M(),description:W(M()),required:W(F())}),ve=R({...ee.shape,...g.shape,description:W(M()),arguments:W(L(_e)),_meta:W(z({}))}),ye=m.extend({method:U(`notifications/prompts/list_changed`),params:p.optional()}),x=R({type:U(`text`),text:M(),annotations:pe.optional(),_meta:V(M(),I()).optional()}),be=R({type:U(`image`),data:s,mimeType:M(),annotations:pe.optional(),_meta:V(M(),I()).optional()}),xe=R({type:U(`audio`),data:s,mimeType:M(),annotations:pe.optional(),_meta:V(M(),I()).optional()}),Se=R({type:U(`tool_use`),name:M(),id:M(),input:V(M(),I()),_meta:V(M(),I()).optional()}),Ce=R({type:U(`resource`),resource:B([de,fe]),annotations:pe.optional(),_meta:V(M(),I()).optional()}),we=me.extend({type:U(`resource_link`)}),Te=B([x,be,xe,we,Ce]),Ee=R({role:a,content:Te}),De=R({title:M().optional(),readOnlyHint:F().optional(),destructiveHint:F().optional(),idempotentHint:F().optional(),openWorldHint:F().optional()}),Oe=m.extend({method:U(`notifications/tools/list_changed`),params:p.optional()}),S=R({name:M().optional()}),ke=R({hints:L(S).optional(),costPriority:P().min(0).max(1).optional(),speedPriority:P().min(0).max(1).optional(),intelligencePriority:P().min(0).max(1).optional()}),Ae=R({mode:H([`auto`,`required`,`none`]).optional()}),je=R({type:U(`boolean`),title:M().optional(),description:M().optional(),default:F().optional()}),Me=R({type:U(`string`),title:M().optional(),description:M().optional(),minLength:P().optional(),maxLength:P().optional(),format:H([`email`,`uri`,`date`,`date-time`]).optional(),default:M().optional()}),C=R({type:H([`number`,`integer`]),title:M().optional(),description:M().optional(),minimum:P().optional(),maximum:P().optional(),default:P().optional()}),Ne=R({type:U(`string`),title:M().optional(),description:M().optional(),enum:L(M()),default:M().optional()}),Pe=R({type:U(`string`),title:M().optional(),description:M().optional(),oneOf:L(R({const:M(),title:M()})),default:M().optional()}),Fe=R({type:U(`string`),title:M().optional(),description:M().optional(),enum:L(M()),enumNames:L(M()).optional(),default:M().optional()}),Ie=B([Ne,Pe]),Le=R({type:U(`array`),title:M().optional(),description:M().optional(),minItems:P().optional(),maxItems:P().optional(),items:R({type:U(`string`),enum:L(M())}),default:L(M()).optional()}),Re=R({type:U(`array`),title:M().optional(),description:M().optional(),minItems:P().optional(),maxItems:P().optional(),items:R({anyOf:L(R({const:M(),title:M()}))}),default:L(M()).optional()}),ze=B([Le,Re]),Be=B([Fe,Ie,ze]),Ve=B([Be,je,Me,C]),He=f.extend({mode:U(`form`).optional(),message:M(),requestedSchema:R({type:U(`object`),properties:V(M(),Ve),required:L(M()).optional()}).catchall(I())}),Ue=R({type:U(`ref/resource`),uri:M()}),We=R({type:U(`ref/prompt`),name:M()}),Ge=R({uri:M().startsWith(`file://`),name:M().optional(),_meta:V(M(),I()).optional()}),Ke=ie.shape,qe=R({experimental:Ke.experimental,sampling:Ke.sampling,elicitation:Ke.elicitation,roots:Ke.roots,extensions:Ke.extensions}),w=ae.shape,Je=R({experimental:w.experimental,logging:w.logging,completions:w.completions,prompts:w.prompts,resources:w.resources,tools:w.tools,extensions:w.extensions}),Ye=z({progressToken:n.optional(),[ll]:M(),[ul]:te.optional(),[fl]:qe,[ml]:o.optional()}),Xe=R({...ee.shape,...g.shape,description:M().optional(),inputSchema:z({$schema:M().optional(),type:U(`object`)}),outputSchema:z({$schema:M().optional()}).optional(),annotations:De.optional(),_meta:V(M(),I()).optional()}),Ze=R({type:U(`tool_result`),toolUseId:M(),content:L(Te),structuredContent:I().optional(),isError:F().optional(),_meta:V(M(),I()).optional()}),Qe=B([x,be,xe,Se,Ze]),$e=R({role:a,content:B([Qe,L(Qe)]),_meta:V(M(),I()).optional()}),et=M(),tt=z({[dl]:te.optional().catch(void 0)}),T=tt.optional();function E(e){return z({_meta:T,resultType:et.default(`complete`),...e})}let nt=E({}),rt=E({nextCursor:r.optional()}),it=E({content:L(Te),structuredContent:I().optional(),isError:F().optional()}),at=E({ttlMs:P().int().min(0),cacheScope:H([`public`,`private`]),tools:L(Xe),nextCursor:r.optional()}),ot=E({ttlMs:P().int().min(0),cacheScope:H([`public`,`private`]),prompts:L(ve),nextCursor:r.optional()}),st=E({description:M().optional(),messages:L(Ee)}),ct=E({ttlMs:P().int().min(0),cacheScope:H([`public`,`private`]),resources:L(me),nextCursor:r.optional()}),lt=E({ttlMs:P().int().min(0),cacheScope:H([`public`,`private`]),resourceTemplates:L(he),nextCursor:r.optional()}),ut=E({ttlMs:P().int().min(0),cacheScope:H([`public`,`private`]),contents:L(B([de,fe]))}),dt=E({completion:R({values:L(M()).max(100),total:P().int().optional(),hasMore:F().optional()}).loose()}),ft=E({ttlMs:P().int().min(0),cacheScope:H([`public`,`private`])}),pt=E({ttlMs:P().int().min(0).catch(0),cacheScope:H([`public`,`private`]).catch(`private`),supportedVersions:L(M()),capabilities:Je,instructions:M().optional()}),mt=R({messages:L($e),modelPreferences:ke.optional(),systemPrompt:M().optional(),includeContext:H([`none`,`thisServer`,`allServers`]).optional(),temperature:P().optional(),maxTokens:P().int(),stopSequences:L(M()).optional(),metadata:t.optional(),tools:L(Xe).optional(),toolChoice:Ae.optional()}),ht=R({method:U(`sampling/createMessage`),params:mt}),gt=R({method:U(`roots/list`),params:R({_meta:V(M(),I()).optional()}).optional()}),_t=R({...$e.shape,model:M(),stopReason:M().optional()}),vt=R({roots:L(Ge)}),yt=R({action:H([`accept`,`decline`,`cancel`]),content:V(M(),B([M(),P(),F(),L(M())])).optional()}),bt=R({mode:U(`url`),message:M(),url:M().url()}),xt=B([He,bt]),St=R({method:U(`elicitation/create`),params:xt}),Ct=B([ht,gt,St]),wt=B([_t,vt,yt]),Tt=V(M(),Ct),Et=V(M(),wt),Dt=E({inputRequests:Tt.optional(),requestState:M().optional()}),Ot={inputResponses:Et.optional(),requestState:M().optional()},kt=R({_meta:Ye,...Ot}),At=z({progressToken:n.optional()});function jt(e,t){return R({method:U(e),params:R({_meta:Ye,...t})})}function Mt(e,t){return R({method:U(e),params:R({_meta:At.optional(),...t}).optional()})}let Nt={name:M(),arguments:V(M(),I()).optional(),...Ot},Pt={cursor:r.optional()},Ft=jt(`tools/call`,Nt),It=jt(`tools/list`,Pt),Lt=jt(`prompts/list`,Pt),Rt=jt(`prompts/get`,{name:M(),arguments:V(M(),M()).optional(),...Ot}),zt=jt(`resources/list`,Pt),Bt=jt(`resources/templates/list`,Pt),Vt=jt(`resources/read`,{uri:M(),...Ot}),Ht={ref:B([We,Ue]),argument:R({name:M(),value:M()}),context:R({arguments:V(M(),M()).optional()}).optional()},Ut=jt(`completion/complete`,Ht),Wt=jt(`server/discover`,{}),Gt=R({toolsListChanged:F().optional(),promptsListChanged:F().optional(),resourcesListChanged:F().optional(),resourceSubscriptions:L(M()).optional()}),Kt={notifications:Gt},qt=jt(`subscriptions/listen`,Kt),Jt=tt.extend({"io.modelcontextprotocol/subscriptionId":i}),Yt=z({_meta:Jt,resultType:et.default(`complete`)}),Xt={"tools/call":Mt(`tools/call`,Nt),"tools/list":Mt(`tools/list`,Pt),"prompts/get":Mt(`prompts/get`,{name:M(),arguments:V(M(),M()).optional()}),"prompts/list":Mt(`prompts/list`,Pt),"resources/list":Mt(`resources/list`,Pt),"resources/templates/list":Mt(`resources/templates/list`,Pt),"resources/read":Mt(`resources/read`,{uri:M()}),"completion/complete":Mt(`completion/complete`,Ht),"server/discover":Mt(`server/discover`,{}),"subscriptions/listen":Mt(`subscriptions/listen`,Kt)};function Zt(e){return z({_meta:T,...e})}let Qt={"tools/call":Zt({content:L(Te),structuredContent:I().optional(),isError:F().optional()}),"tools/list":Zt({ttlMs:P().int().min(0),cacheScope:H([`public`,`private`]),tools:L(Xe),nextCursor:r.optional()}),"prompts/get":Zt({description:M().optional(),messages:L(Ee)}),"prompts/list":Zt({ttlMs:P().int().min(0),cacheScope:H([`public`,`private`]),prompts:L(ve),nextCursor:r.optional()}),"resources/list":Zt({ttlMs:P().int().min(0),cacheScope:H([`public`,`private`]),resources:L(me),nextCursor:r.optional()}),"resources/templates/list":Zt({ttlMs:P().int().min(0),cacheScope:H([`public`,`private`]),resourceTemplates:L(he),nextCursor:r.optional()}),"resources/read":Zt({ttlMs:P().int().min(0),cacheScope:H([`public`,`private`]),contents:L(B([de,fe]))}),"completion/complete":Zt({completion:R({values:L(M()).max(100),total:P().int().optional(),hasMore:F().optional()}).loose()}),"server/discover":Zt({ttlMs:P().int().min(0).catch(0),cacheScope:H([`public`,`private`]).catch(`private`),supportedVersions:L(M()),capabilities:Je,instructions:M().optional()}),"subscriptions/listen":Zt({})},$t=z({"io.modelcontextprotocol/subscriptionId":i.optional()}),en=R({method:U(`notifications/subscriptions/acknowledged`),params:R({_meta:$t.optional(),notifications:Gt})}),tn=R({_meta:$t.optional(),requestId:i,reason:M().optional()}),nn=R({method:U(`notifications/cancelled`),params:tn}),rn={"notifications/cancelled":nn,"notifications/progress":v,"notifications/message":le,"notifications/resources/updated":b,"notifications/resources/list_changed":ge,"notifications/tools/list_changed":Oe,"notifications/prompts/list_changed":ye,"notifications/subscriptions/acknowledged":en},D=e=>R({jsonrpc:U(`2.0`),id:B([M(),P().int()]),result:e}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,RequestIdSchema:i,RoleSchema:a,LoggingLevelSchema:o,TaskMetadataSchema:c,RelatedTaskMetadataSchema:l,RequestMetaSchema:u,BaseRequestParamsSchema:d,TaskAugmentedRequestParamsSchema:f,NotificationsParamsSchema:p,NotificationSchema:m,IconSchema:h,IconsSchema:g,BaseMetadataSchema:ee,ImplementationSchema:te,ClientTasksCapabilitySchema:ne,ServerTasksCapabilitySchema:re,ClientCapabilitiesSchema:ie,ServerCapabilitiesSchema:ae,ProgressSchema:oe,ProgressNotificationParamsSchema:se,ProgressNotificationSchema:v,LoggingMessageNotificationParamsSchema:ce,LoggingMessageNotificationSchema:le,ResourceContentsSchema:ue,TextResourceContentsSchema:de,BlobResourceContentsSchema:fe,AnnotationsSchema:pe,ResourceSchema:me,ResourceTemplateSchema:he,ResourceListChangedNotificationSchema:ge,ResourceUpdatedNotificationParamsSchema:y,ResourceUpdatedNotificationSchema:b,PromptArgumentSchema:_e,PromptSchema:ve,PromptListChangedNotificationSchema:ye,TextContentSchema:x,ImageContentSchema:be,AudioContentSchema:xe,ToolUseContentSchema:Se,EmbeddedResourceSchema:Ce,ResourceLinkSchema:we,ContentBlockSchema:Te,PromptMessageSchema:Ee,ToolAnnotationsSchema:De,ToolListChangedNotificationSchema:Oe,ModelHintSchema:S,ModelPreferencesSchema:ke,ToolChoiceSchema:Ae,BooleanSchemaSchema:je,StringSchemaSchema:Me,NumberSchemaSchema:C,UntitledSingleSelectEnumSchemaSchema:Ne,TitledSingleSelectEnumSchemaSchema:Pe,LegacyTitledEnumSchemaSchema:Fe,SingleSelectEnumSchemaSchema:Ie,UntitledMultiSelectEnumSchemaSchema:Le,TitledMultiSelectEnumSchemaSchema:Re,MultiSelectEnumSchemaSchema:ze,EnumSchemaSchema:Be,PrimitiveSchemaDefinitionSchema:Ve,ElicitRequestFormParamsSchema:He,ResourceTemplateReferenceSchema:Ue,PromptReferenceSchema:We,RootSchema:Ge,ClientCapabilities2026Schema:qe,ServerCapabilities2026Schema:Je,RequestMetaEnvelopeSchema:Ye,ToolSchema:Xe,ToolResultContentSchema:Ze,SamplingMessageContentBlockSchema:Qe,SamplingMessageSchema:$e,ResultTypeSchema:et,ResultMetaSchema:tt,ResultSchema:nt,PaginatedResultSchema:rt,CallToolResultSchema:it,ListToolsResultSchema:at,ListPromptsResultSchema:ot,GetPromptResultSchema:st,ListResourcesResultSchema:ct,ListResourceTemplatesResultSchema:lt,ReadResourceResultSchema:ut,CompleteResultSchema:dt,CacheableResultSchema:ft,DiscoverResultSchema:pt,CreateMessageRequestParamsSchema:mt,CreateMessageRequestSchema:ht,ListRootsRequestSchema:gt,CreateMessageResultSchema:_t,ListRootsResultSchema:vt,ElicitResultSchema:yt,ElicitRequestURLParamsSchema:bt,ElicitRequestParamsSchema:xt,ElicitRequestSchema:St,InputRequestSchema:Ct,InputResponseSchema:wt,InputRequestsSchema:Tt,InputResponsesSchema:Et,InputRequiredResultSchema:Dt,InputResponseRequestParamsSchema:kt,CallToolRequestSchema:Ft,ListToolsRequestSchema:It,ListPromptsRequestSchema:Lt,GetPromptRequestSchema:Rt,ListResourcesRequestSchema:zt,ListResourceTemplatesRequestSchema:Bt,ReadResourceRequestSchema:Vt,CompleteRequestSchema:Ut,DiscoverRequestSchema:Wt,SubscriptionFilterSchema:Gt,SubscriptionsListenRequestSchema:qt,SubscriptionsListenResultMetaSchema:Jt,SubscriptionsListenResultSchema:Yt,dispatchRequestSchemas:Xt,dispatchResultSchemas:Qt,NotificationMetaSchema:$t,SubscriptionsAcknowledgedNotificationSchema:en,CancelledNotificationParamsSchema:tn,CancelledNotificationSchema:nn,notificationSchemas2026:rn,JSONRPCResultResponseSchema:D(nt),CallToolResultResponseSchema:D(B([it,Dt])),ListToolsResultResponseSchema:D(at),ListPromptsResultResponseSchema:D(ot),GetPromptResultResponseSchema:D(B([st,Dt])),ListResourcesResultResponseSchema:D(ct),ListResourceTemplatesResultResponseSchema:D(lt),ReadResourceResultResponseSchema:D(B([ut,Dt])),CompleteResultResponseSchema:D(dt),DiscoverResultResponseSchema:D(pt),SubscriptionsListenResultResponseSchema:D(Yt)}}var _p;function vp(){return _p??=gp()}var yp=[`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`resources/read`,`server/discover`];function bp(e){return yp.includes(e)}var xp=Symbol(`modelcontextprotocol.resultCacheHintFallback`);function Sp(e){return e[xp]}function Cp(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function wp(e){return e===`public`||e===`private`}var X=function(e){return e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.ResourceNotFound=-32002]=`ResourceNotFound`,e[e.MissingRequiredClientCapability=-32021]=`MissingRequiredClientCapability`,e[e.UnsupportedProtocolVersion=-32022]=`UnsupportedProtocolVersion`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`,e}({}),Z=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ProtocolError`})}static[Symbol.hasInstance](e){return Ff(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Ff(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name=`ProtocolError`,Pf(this,new.target)}static fromError(t,n,r){if(t===X.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new Ep(e.elicitations,n)}if(t===X.UnsupportedProtocolVersion&&r){let e=r;if(Array.isArray(e.supported)&&typeof e.requested==`string`)return new Dp({supported:e.supported,requested:e.requested},n)}if(t===X.InvalidParams||t===X.ResourceNotFound){let e=r;if(typeof e?.uri==`string`&&(t===X.ResourceNotFound||Object.keys(e).length===1))return new Tp(e.uri,n)}if(t===X.MissingRequiredClientCapability&&r){let e=r;if(e.requiredCapabilities!==null&&typeof e.requiredCapabilities==`object`&&!Array.isArray(e.requiredCapabilities))return new Op({requiredCapabilities:e.requiredCapabilities},n)}return new e(t,n,r)}},Tp=class extends Z{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ResourceNotFoundError`})}constructor(e,t=`Resource not found: ${e}`){super(X.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},Ep=class extends Z{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UrlElicitationRequiredError`})}constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(X.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},Dp=class extends Z{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnsupportedProtocolVersionError`})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(X.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},Op=class extends Z{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.MissingRequiredClientCapabilityError`})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(`, `)}`){super(X.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},kp=0,Ap=`private`,jp=[`tools/call`,`prompts/get`,`resources/read`];function Mp(e,t){let n=t.resultType;if(n===void 0)return{...t,resultType:`complete`};if(n===`complete`||jp.includes(e))return t;throw new Z(X.InternalError,`Handler for ${e} returned resultType \'${String(n)}\', but results of ${e} only support \'complete\' on protocol revision 2026-07-28`)}function Np(e,t){let n=Sp(t);if(t.resultType!==`complete`||!bp(e))return n===void 0?t:Rp(t);let r=t,i=Cp(r.ttlMs)?r.ttlMs:Ip(n),a=wp(r.cacheScope)?r.cacheScope:Lp(n),o={...r,ttlMs:i,cacheScope:a};return delete o[xp],o}function Pp(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Fp(e,t){if(t===void 0)return e;let n=e._meta;return n===void 0?{...e,_meta:{[dl]:t}}:!Pp(n)||n[`io.modelcontextprotocol/serverInfo`]!==void 0?e:{...e,_meta:{...n,[dl]:t}}}function Ip(e){return e!==void 0&&Cp(e.ttlMs)?e.ttlMs:kp}function Lp(e){return e!==void 0&&wp(e.cacheScope)?e.cacheScope:Ap}function Rp(e){let t={...e};return delete t[xp],t}var zp=[`elicitation/create`,`sampling/createMessage`,`roots/list`],Bp;function Vp(){if(Bp)return Bp;let e=vp();return Bp={request:{"elicitation/create":R({method:U(`elicitation/create`),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":R({method:U(`sampling/createMessage`),params:e.CreateMessageRequestParamsSchema}),"roots/list":R({method:U(`roots/list`),params:z({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},Bp}function Hp(e){return zp.includes(e)}function Up(e){return Hp(e)?Vp().request[e]:void 0}function Wp(e){return Hp(e)?Vp().response[e]:void 0}var Gp={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},Kp={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function qp(e){return Object.prototype.hasOwnProperty.call(Gp,e)}function Jp(e){return Object.prototype.hasOwnProperty.call(Kp,e)}function Yp(e){return Object.prototype.hasOwnProperty.call(Gp,e)}function Xp(e){return qp(e)?vp().dispatchRequestSchemas[e]:void 0}function Zp(e){return Yp(e)?vp().dispatchResultSchemas[e]:void 0}function Qp(e){return Jp(e)?vp().notificationSchemas2026[e]:void 0}Object.keys(Gp),Object.keys(Kp);function $p(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function em(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var tm={ok:!1,reason:`not-in-era`},nm=[ll,fl];function rm(e,t){let n=t,r=!1,i=()=>(r||=(n={...n},!0),n),a=t.tools;e===`tools/list`&&Array.isArray(a)&&a.some(e=>$p(e)&&`execution`in e)&&(i().tools=a.map(e=>{if(!$p(e)||!(`execution`in e))return e;let t={...e};return delete t.execution,t}));let o=t.capabilities;if($p(o)&&`tasks`in o){let e={...o};delete e.tasks,i().capabilities=e}return n}var im={era:`2026-07-28`,hasRequestMethod:qp,hasNotificationMethod:Jp,hasInputRequestMethod:e=>Up(e)!==void 0,validateRequest:(e,t)=>em(Xp(e),t),validateResult:(e,t)=>em(Zp(e),t),validateNotification:(e,t)=>em(Qp(e),t),validateInputRequest:(e,t)=>em(Up(e),t),validateInputResponse:(e,t)=>em(Wp(e),t),samplingResultVariant:()=>tm,outboundEnvelope(e){return{[ll]:e.protocolVersion,[ul]:e.clientInfo,[fl]:e.clientCapabilities,...e.logLevel!==void 0&&{"io.modelcontextprotocol/logLevel":e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let n of nm)n in e||t.push({key:n,problem:`missing`});let n=vp().RequestMetaEnvelopeSchema.safeParse(e);if(!n.success)for(let e of n.error.issues){let n=e.path.map(String),r=n.length>0?n.join(`.`):`_meta`;n.length===1&&t.some(e=>e.key===r&&e.problem===`missing`)||t.push({key:r,problem:e.message})}return t},projectCallToolResult:e=>Hf(e),inputRequestSchema:Up,decodeResult(e,t){if(!$p(t))return{kind:`invalid`,error:new Y(J.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return{kind:`invalid`,error:new Y(J.InvalidResult,`Invalid result for ${e}: missing required resultType \u2014 servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:`missing-resultType`})};if(typeof n!=`string`)return{kind:`invalid`,error:new Y(J.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n===`input_required`){let n=t.inputRequests,r=$p(n)?n:{},i=t.requestState,a=t._meta===void 0?void 0:vp().ResultMetaSchema.safeParse(t._meta),o=a?.success?a.data:void 0;return Object.keys(r).length===0&&typeof i!=`string`?{kind:`invalid`,error:new Y(J.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:`input-required-missing-both`})}:{kind:`input_required`,inputRequests:r,...typeof i==`string`&&{requestState:i},...o!==void 0&&{_meta:o}}}if(n!==`complete`)return{kind:`invalid`,error:new Y(J.UnsupportedResultType,`Unsupported result type \'${n}\' for ${e}`,{resultType:n,method:e})};let r=om(),i=Object.hasOwn(r,e)?r[e]:void 0;if(i!==void 0){let n=i.safeParse(t);if(!n.success)return{kind:`invalid`,error:new Y(J.InvalidResult,`Invalid result for ${e}: ${n.error}`,{method:e})}}let a={...t};return delete a.resultType,{kind:`complete`,result:a}},encodeResult(e,t,n){return Fp(Np(e,Mp(e,rm(e,t))),n)},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope(e){if(e.envelope===void 0)return`Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)`;let t=vp().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(e=>e.message).join(`; `)}`}},am;function om(){if(am)return am;let e=vp();return am={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema},am}var sm=`2026-07-28`;function cm(e){return e!==void 0&&zf(e)?im:hp}function lm(e){return e.revision===void 0?e.era===`modern`?im.era:hp.era:cm(e.revision).era}function um(e){return pm.some(t=>t.hasRequestMethod(e))}function dm(e){return pm.some(t=>t.hasNotificationMethod(e))}function fm(e){return e===`tasks/get`||e===`tasks/cancel`}var pm=[hp,im],mm=n({AnnotationsSchema:()=>uu,AudioContentSchema:()=>Uu,BaseMetadataSchema:()=>zl,BaseRequestParamsSchema:()=>Sl,BlobResourceContentsSchema:()=>cu,BooleanSchemaSchema:()=>wd,CallToolRequestParamsSchema:()=>id,CallToolRequestSchema:()=>ad,CallToolResultSchema:()=>nd,CancelTaskRequestSchema:()=>df,CancelTaskResultSchema:()=>ff,CancelledNotificationParamsSchema:()=>Fl,CancelledNotificationSchema:()=>Il,ClientCapabilitiesSchema:()=>Wl,ClientNotificationSchema:()=>mf,ClientRequestSchema:()=>pf,ClientResultSchema:()=>hf,ClientTasksCapabilitySchema:()=>Hl,CompatibilityCallToolResultSchema:()=>rd,CompleteRequestParamsSchema:()=>Gd,CompleteRequestSchema:()=>Kd,CompleteResultSchema:()=>qd,ContentBlockSchema:()=>qu,CreateMessageRequestParamsSchema:()=>bd,CreateMessageRequestSchema:()=>xd,CreateMessageResultSchema:()=>Sd,CreateMessageResultWithToolsSchema:()=>Cd,CreateTaskResultSchema:()=>tf,CursorSchema:()=>vl,DiscoverRequestSchema:()=>Xl,DiscoverResultSchema:()=>Zl,ElicitRequestFormParamsSchema:()=>Id,ElicitRequestParamsSchema:()=>Rd,ElicitRequestSchema:()=>zd,ElicitRequestURLParamsSchema:()=>Ld,ElicitResultSchema:()=>Hd,ElicitationCompleteNotificationParamsSchema:()=>Bd,ElicitationCompleteNotificationSchema:()=>Vd,EmbeddedResourceSchema:()=>Gu,EmptyResultSchema:()=>Pl,EnumSchemaSchema:()=>Pd,GetPromptRequestParamsSchema:()=>zu,GetPromptRequestSchema:()=>Bu,GetPromptResultSchema:()=>Yu,GetTaskPayloadRequestSchema:()=>sf,GetTaskPayloadResultSchema:()=>cf,GetTaskRequestSchema:()=>af,GetTaskResultSchema:()=>of,IconSchema:()=>Ll,IconsSchema:()=>Rl,ImageContentSchema:()=>Hu,ImplementationSchema:()=>Bl,InitializeRequestParamsSchema:()=>Gl,InitializeRequestSchema:()=>Kl,InitializeResultSchema:()=>Jl,InitializedNotificationSchema:()=>Yl,JSONArraySchema:()=>gl,JSONObjectSchema:()=>G,JSONRPCErrorResponseSchema:()=>jl,JSONRPCMessageSchema:()=>Ml,JSONRPCNotificationSchema:()=>kl,JSONRPCRequestSchema:()=>Ol,JSONRPCResponseSchema:()=>Nl,JSONRPCResultResponseSchema:()=>Al,JSONValueSchema:()=>hl,LegacyTitledEnumSchemaSchema:()=>kd,ListChangedOptionsBaseSchema:()=>sd,ListPromptsRequestSchema:()=>Lu,ListPromptsResultSchema:()=>Ru,ListResourceTemplatesRequestSchema:()=>hu,ListResourceTemplatesResultSchema:()=>gu,ListResourcesRequestSchema:()=>pu,ListResourcesResultSchema:()=>mu,ListRootsRequestSchema:()=>Yd,ListRootsResultSchema:()=>Xd,ListTasksRequestSchema:()=>lf,ListTasksResultSchema:()=>uf,ListToolsRequestSchema:()=>ed,ListToolsResultSchema:()=>td,LoggingLevelSchema:()=>cd,LoggingMessageNotificationParamsSchema:()=>dd,LoggingMessageNotificationSchema:()=>fd,ModelHintSchema:()=>pd,ModelPreferencesSchema:()=>md,MultiSelectEnumSchemaSchema:()=>Nd,NotificationSchema:()=>Tl,NotificationsParamsSchema:()=>wl,NumberSchemaSchema:()=>Ed,PaginatedRequestParamsSchema:()=>nu,PaginatedRequestSchema:()=>ru,PaginatedResultSchema:()=>iu,PingRequestSchema:()=>Ql,PrimitiveSchemaDefinitionSchema:()=>Fd,ProgressNotificationParamsSchema:()=>eu,ProgressNotificationSchema:()=>tu,ProgressSchema:()=>$l,ProgressTokenSchema:()=>_l,PromptArgumentSchema:()=>Fu,PromptListChangedNotificationSchema:()=>Xu,PromptMessageSchema:()=>Ju,PromptReferenceSchema:()=>Wd,PromptSchema:()=>Iu,ReadResourceRequestParamsSchema:()=>vu,ReadResourceRequestSchema:()=>yu,ReadResourceResultSchema:()=>bu,RelatedTaskMetadataSchema:()=>bl,RequestIdSchema:()=>Dl,RequestMetaSchema:()=>xl,RequestSchema:()=>K,ResourceContentsSchema:()=>au,ResourceLinkSchema:()=>Ku,ResourceListChangedNotificationSchema:()=>xu,ResourceRequestParamsSchema:()=>_u,ResourceSchema:()=>du,ResourceTemplateReferenceSchema:()=>Ud,ResourceTemplateSchema:()=>fu,ResourceUpdatedNotificationParamsSchema:()=>Nu,ResourceUpdatedNotificationSchema:()=>Pu,ResultMetaObjectSchema:()=>El,ResultSchema:()=>q,RoleSchema:()=>lu,RootSchema:()=>Jd,RootsListChangedNotificationSchema:()=>Zd,SamplingContentSchema:()=>_d,SamplingMessageContentBlockSchema:()=>vd,SamplingMessageSchema:()=>yd,ServerCapabilitiesSchema:()=>ql,ServerNotificationSchema:()=>_f,ServerRequestSchema:()=>gf,ServerResultSchema:()=>vf,ServerTasksCapabilitySchema:()=>Ul,SetLevelRequestParamsSchema:()=>ld,SetLevelRequestSchema:()=>ud,SingleSelectEnumSchemaSchema:()=>Ad,StringSchemaSchema:()=>Td,SubscribeRequestParamsSchema:()=>Su,SubscribeRequestSchema:()=>Cu,SubscriptionFilterSchema:()=>Eu,SubscriptionsAcknowledgedNotificationParamsSchema:()=>ku,SubscriptionsAcknowledgedNotificationSchema:()=>Au,SubscriptionsListenRequestParamsSchema:()=>Du,SubscriptionsListenRequestSchema:()=>Ou,SubscriptionsListenResultMetaSchema:()=>ju,SubscriptionsListenResultSchema:()=>Mu,TaskAugmentedRequestParamsSchema:()=>Cl,TaskCreationParamsSchema:()=>Qd,TaskMetadataSchema:()=>yl,TaskSchema:()=>ef,TaskStatusNotificationParamsSchema:()=>nf,TaskStatusNotificationSchema:()=>rf,TaskStatusSchema:()=>$d,TextContentSchema:()=>Vu,TextResourceContentsSchema:()=>ou,TitledMultiSelectEnumSchemaSchema:()=>Md,TitledSingleSelectEnumSchemaSchema:()=>Od,ToolAnnotationsSchema:()=>Zu,ToolChoiceSchema:()=>hd,ToolExecutionSchema:()=>Qu,ToolListChangedNotificationSchema:()=>od,ToolResultContentSchema:()=>gd,ToolSchema:()=>$u,ToolUseContentSchema:()=>Wu,UnsubscribeRequestParamsSchema:()=>wu,UnsubscribeRequestSchema:()=>Tu,UntitledMultiSelectEnumSchemaSchema:()=>jd,UntitledSingleSelectEnumSchemaSchema:()=>Dd}),hm=e=>Ol.safeParse(e).success,gm=e=>kl.safeParse(e).success,_m=e=>Al.safeParse(e).success,vm=e=>jl.safeParse(e).success,ym=e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&e.resultType===`input_required`,bm=`Mcp-Param-`,xm=`x-mcp-header`,Sm=/^[!#$%&\'*+\\-.^_`|~0-9A-Za-z]+$/,Cm=new Set([`string`,`integer`,`boolean`]);function wm(e){let t=[],n=new Map,r,i=(e,a,o)=>{if(typeof e!=`object`||!e)return;let s=e;if(xm in s){if(!o||a.length===0)return`${Dm(a)}: x-mcp-header is only permitted on properties statically reachable via a chain of \'properties\' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let e=s[xm];if(typeof e!=`string`||e.length===0)return`${Dm(a)}: x-mcp-header MUST be a non-empty string`;if(!Sm.test(e))return`${Dm(a)}: x-mcp-header \'${e}\' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let i=typeof s.type==`string`?s.type:void 0;if(i===void 0||!Cm.has(i)){let e=`${Dm(a)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${i??`<none>`}`;if(i!==`number`)return e;r??=e}let c=e.toLowerCase(),l=n.get(c);if(l!==void 0)return`x-mcp-header \'${e}\' is not case-insensitively unique (also declared as \'${l}\')`;n.set(c,e),t.push({path:a,headerName:e,type:i})}let c=s.properties;if(typeof c==`object`&&c)for(let[e,t]of Object.entries(c)){let n=i(t,[...a,e],o);if(n!==void 0)return n}for(let e of Tm){let t=s[e];if(t===void 0)continue;let n=Array.isArray(t)?t:typeof t==`object`&&t&&Em.has(e)?Object.values(t):[t];for(let t of n){let n=i(t,[...a,`<${e}>`],!1);if(n!==void 0)return n}}},a=i(e,[],!0);return a===void 0?r===void 0?{valid:!0,declarations:t}:{valid:!1,reason:r,declarations:t}:{valid:!1,reason:r??a}}var Tm=[`items`,`prefixItems`,`contains`,`additionalProperties`,`unevaluatedProperties`,`unevaluatedItems`,`propertyNames`,`patternProperties`,`dependentSchemas`,`oneOf`,`anyOf`,`allOf`,`not`,`if`,`then`,`else`,`$defs`,`definitions`],Em=new Set([`patternProperties`,`dependentSchemas`,`$defs`,`definitions`]);function Dm(e){return e.length===0?`<root>`:e.join(`.`)}var Om=`=?base64?`,km=`?=`;function Am(e){if(typeof e==`string`)return e;if(typeof e==`boolean`)return e?`true`:`false`;if(typeof e==`number`)return!Number.isFinite(e)||Number.isInteger(e)&&!Number.isSafeInteger(e)?void 0:String(e)}function jm(e){if(e.length===0||e.startsWith(Om)&&e.endsWith(km)||e!==e.trim())return!0;for(let t=0;t<e.length;t++){let n=e.codePointAt(t);if(!(n===9||n>=32&&n<=126))return!0}return!1}function Mm(e){let t=new TextEncoder().encode(e),n=``;for(let e of t)n+=String.fromCodePoint(e);return btoa(n)}function Nm(e){return jm(e)?`${Om}${Mm(e)}${km}`:e}function Pm(e,t){let n=e;for(let e of t){if(typeof n!=`object`||!n)return;n=n[e]}return n}function Fm(e,t){let n={};for(let r of e){let e=Pm(t,r.path);if(e==null)continue;let i=Am(e);i!==void 0&&(n[`${bm}${r.headerName}`]=Nm(i))}return n}X.InvalidRequest,X.UnsupportedProtocolVersion,X.InvalidParams,X.MethodNotFound,X.InvalidParams,X.MissingRequiredClientCapability,X.ParseError,X.InvalidRequest,X.MethodNotFound,X.UnsupportedProtocolVersion,X.MissingRequiredClientCapability;function Im(e,t){return Ss(e,t)}function Lm(e){return new Set(e.flatMap(e=>Object.keys(e.shape)))}function Rm(e){if(e==null)return!1;let t=typeof e;return t!==`object`&&t!==`function`||!(`~standard`in e)?!1:typeof e[`~standard`]?.validate==`function`}var zm=!1,Bm=`draft-2020-12`;function Vm(e,t=`input`){let n=e[`~standard`],r;if(n.jsonSchema)r=n.jsonSchema[t]({target:Bm});else if(n.vendor===`zod`){if(!(`_zod`in e))throw Error(`Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().`);zm||(zm=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.")),r=gs(e,{target:Bm,io:t})}else throw Error(`Schema library "${n.vendor}" does not implement StandardJSONSchemaV1 (\\`~standard.jsonSchema\\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(t===`output`)return r.type===void 0&&Um(r)?{type:`object`,...r}:r;if(r.type!==void 0&&r.type!==`object`)throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(r.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:`object`,...r}}var Hm=/^#\\/(\\$defs|definitions)\\/([^/~%]+)$/;function Um(e,t=e){if(`properties`in e||`patternProperties`in e||`additionalProperties`in e||`required`in e)return!0;let n=typeof e.$ref==`string`&&Hm.exec(e.$ref);if(n&&t[n[1]]?.[n[2]]?.type===`object`)return!0;for(let n of[`oneOf`,`anyOf`,`allOf`]){let r=e[n];if(Array.isArray(r)&&r.length>0)return r.every(e=>typeof e==`object`&&!!e&&(e.type===`object`||Um(e,`$id`in e?{}:t)))}return!1}function Wm(e){return e.path?.length?`${e.path.map(e=>String(typeof e==`object`?e.key:e)).join(`.`)}: ${e.message}`:e.message}async function Gm(e,t){let n=await e[`~standard`].validate(t);return n.issues&&n.issues.length>0?{success:!1,error:n.issues.map(e=>Wm(e)).join(`, `)}:{success:!0,data:n.value}}function Km(e){let t=gs(e,{target:Bm,io:`input`});return typeof t.pattern==`string`?t.pattern:void 0}var qm=/\\\\\\.\\\\d\\{(\\d+)\\}/;function Jm(e){let t=qm.exec(e),n=[void 0,-1,0];return t&&n.push(Number(t[1])),[!1,!0].flatMap(e=>[!1,!0].flatMap(t=>n.map(n=>il({local:e,offset:t,precision:n}))))}function Ym(e,t){let n;switch(e){case`email`:n=[Vs()];break;case`uri`:n=[Gs()];break;case`date`:n=[al()];break;case`date-time`:n=Jm(t);break}return new Set(n.map(e=>Km(e)).filter(e=>e!==void 0))}function Xm(e,t,n){return n!==`zod`||Ym(e,t).has(t)}function Zm(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Qm(e){try{return Vm(e,`input`)}catch(e){let t=e instanceof Error?e.message:String(e);throw new Z(X.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${t}`)}}var $m=new Set([`$comment`,`deprecated`,`description`,`examples`,`readOnly`,`title`,`writeOnly`]);function eh(e){return $m.has(e)||e.startsWith(`x-`)}var th=new Set([`$schema`,...Object.keys(Id.shape.requestedSchema.shape)]),nh={string:Lm([Td,Dd,Od,kd]),number:Lm([Ed]),integer:Lm([Ed]),boolean:Lm([wd]),array:Lm([jd,Md])},rh=new Set(Td.shape.format.unwrap().options);function ih(e,t,n,r){if(!Zm(e))return e;let i=typeof e.type==`string`&&Object.hasOwn(nh,e.type)?nh[e.type]:void 0;if(i===void 0)return e;let a={};for(let[o,s]of Object.entries(e))i.has(o)||eh(o)?a[o]=s:o===`pattern`&&e.type===`string`&&typeof e.format==`string`?rh.has(e.format)?(typeof s!=`string`||!Xm(e.format,s,n))&&r.push(`${t}.${o}`):a[o]=s:r.push(`${t}.${o}`);return a}function ah(e,t){let n={},r=[];for(let[i,a]of Object.entries(e))i===`properties`&&Zm(a)?n[i]=Object.fromEntries(Object.entries(a).map(([e,n])=>[e,ih(n,`properties.${e}`,t,r)])):th.has(i)?n[i]=a:eh(i)||r.push(i);if(r.length>0)throw new Z(X.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(`, `)}`);return n}function oh(e,t){if(!Zm(e.properties))return t;let n=Object.entries(e.properties).filter(([,e])=>!Im(Fd,e).success).map(([e])=>`properties.${e}`);return n.length>0?n.join(`, `):t}function sh(e,t,n=``){return Array.isArray(e)&&Array.isArray(t)?e.flatMap((e,r)=>sh(e,t[r],`${n}[${r}]`)):!Zm(e)||!Zm(t)?[]:Object.entries(e).flatMap(([e,r])=>{let i=n?`${n}.${e}`:e;return Object.prototype.hasOwnProperty.call(t,e)?sh(r,t[e],i):eh(e)?[]:[i]})}function ch(e){if(!Rm(e.requestedSchema))return{...e,mode:`form`,requestedSchema:e.requestedSchema};let t=e.requestedSchema[`~standard`].vendor,n=ah(Qm(e.requestedSchema),t),r=Im(Id.shape.requestedSchema,n);if(!r.success)throw new Z(X.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${oh(n,r.error.message)}`);let i=sh(n,r.data);if(i.length>0)throw new Z(X.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(`, `)}`);let a=(r.data.required??[]).filter(e=>!Object.prototype.hasOwnProperty.call(r.data.properties,e));if(a.length>0)throw new Z(X.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(`, `)}`);return{...e,mode:`form`,requestedSchema:r.data}}function lh(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,n=typeof e.requestState==`string`;if(!t&&!n)throw TypeError(`inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)`);return{resultType:`input_required`,...e.inputRequests!==void 0&&{inputRequests:e.inputRequests},...e.requestState!==void 0&&{requestState:e.requestState}}}Object.assign(lh,{elicit(e){try{return{method:`elicitation/create`,params:ch(e)}}catch(e){throw e instanceof Z?TypeError(e.message,{cause:e}):e}},elicitUrl(e){return{method:`elicitation/create`,params:{...e,mode:`url`}}},createMessage(e){return{method:`sampling/createMessage`,params:e}},listRoots(){return{method:`roots/list`}}});var uh=!0,dh=10,fh=250;function ph(e){return{autoFulfill:e?.autoFulfill??uh,maxRounds:e?.maxRounds??dh}}function mh(e,t,n){let r=t!==void 0&&Object.keys(t).length>0;return!r&&n===void 0?e:{...e,...r&&{inputResponses:t},...n!==void 0&&{requestState:n}}}function hh(e,t){return`Multi-round-trip request \'${e}\' still required input after ${t} rounds (inputRequired.maxRounds)`}function gh(e,t){return new Promise((n,r)=>{if(t?.aborted){r(t.reason instanceof Y?t.reason:new Y(J.RequestTimeout,String(t.reason)));return}let i=setTimeout(()=>{t?.removeEventListener(`abort`,a),n()},e),a=()=>{clearTimeout(i),r(t?.reason instanceof Y?t.reason:new Y(J.RequestTimeout,String(t?.reason)))};t?.addEventListener(`abort`,a,{once:!0})})}function _h(e){let t=new AbortController,n=()=>t.abort(e?.reason);return e?.addEventListener(`abort`,n,{once:!0}),e?.aborted&&t.abort(e.reason),{signal:t.signal,abort:e=>t.abort(e),dispose:()=>e?.removeEventListener(`abort`,n)}}async function vh(e){let{config:t,method:n,originalParams:r,requestOptions:i,hooks:a,signal:o}=e,s=e.flowStartedAt??Date.now(),c=e.firstPayload,l=0;for(;;){if(l+=1,l>t.maxRounds)throw new Y(J.InputRequiredRoundsExceeded,hh(n,t.maxRounds),{rounds:t.maxRounds,lastResult:{inputRequests:c.inputRequests,...c.requestState!==void 0&&{requestState:c.requestState}}});i.onprogress?.({progress:l,message:`Fulfilling input required by \'${n}\' (round ${l})`});let e=Object.entries(c.inputRequests??{}),u;if(e.length>0){let t=_h(o);try{let n=await Promise.all(e.map(async([e,n])=>{try{return[e,await a.dispatchInputRequest(e,n,t.signal)]}catch(e){throw t.abort(e),e}}));u=Object.fromEntries(n)}finally{t.dispose()}}else await gh(fh,o);let d={...i.timeout!==void 0&&{timeout:i.timeout}};if(i.maxTotalTimeout!==void 0){let e=Date.now()-s,t=i.maxTotalTimeout-e;if(t<=0)throw new Y(J.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:i.maxTotalTimeout,totalElapsed:e});d.maxTotalTimeout=t}let f=await a.retry(mh(r,u,c.requestState),d);if(ym(f)){c={inputRequests:f.inputRequests??{},...f.requestState!==void 0&&{requestState:f.requestState}};continue}return f}}var yh=`AnnotationsSchema.AudioContentSchema.BaseMetadataSchema.BlobResourceContentsSchema.BooleanSchemaSchema.CallToolRequestSchema.CallToolRequestParamsSchema.CallToolResultSchema.CancelledNotificationSchema.CancelledNotificationParamsSchema.CancelTaskRequestSchema.CancelTaskResultSchema.ClientCapabilitiesSchema.ClientNotificationSchema.ClientRequestSchema.ClientResultSchema.CompatibilityCallToolResultSchema.CompleteRequestSchema.CompleteRequestParamsSchema.CompleteResultSchema.ContentBlockSchema.CreateMessageRequestSchema.CreateMessageRequestParamsSchema.CreateMessageResultSchema.CreateMessageResultWithToolsSchema.CreateTaskResultSchema.CursorSchema.DiscoverRequestSchema.DiscoverResultSchema.ElicitationCompleteNotificationSchema.ElicitationCompleteNotificationParamsSchema.ElicitRequestSchema.ElicitRequestFormParamsSchema.ElicitRequestParamsSchema.ElicitRequestURLParamsSchema.ElicitResultSchema.EmbeddedResourceSchema.EmptyResultSchema.EnumSchemaSchema.GetPromptRequestSchema.GetPromptRequestParamsSchema.GetPromptResultSchema.GetTaskPayloadRequestSchema.GetTaskPayloadResultSchema.GetTaskRequestSchema.GetTaskResultSchema.IconSchema.IconsSchema.ImageContentSchema.ImplementationSchema.InitializedNotificationSchema.InitializeRequestSchema.InitializeRequestParamsSchema.InitializeResultSchema.JSONArraySchema.JSONObjectSchema.JSONRPCErrorResponseSchema.JSONRPCMessageSchema.JSONRPCNotificationSchema.JSONRPCRequestSchema.JSONRPCResponseSchema.JSONRPCResultResponseSchema.JSONValueSchema.LegacyTitledEnumSchemaSchema.ListPromptsRequestSchema.ListPromptsResultSchema.ListResourcesRequestSchema.ListResourcesResultSchema.ListResourceTemplatesRequestSchema.ListResourceTemplatesResultSchema.ListRootsRequestSchema.ListRootsResultSchema.ListTasksRequestSchema.ListTasksResultSchema.ListToolsRequestSchema.ListToolsResultSchema.LoggingLevelSchema.LoggingMessageNotificationSchema.LoggingMessageNotificationParamsSchema.ModelHintSchema.ModelPreferencesSchema.MultiSelectEnumSchemaSchema.NotificationSchema.NumberSchemaSchema.PaginatedRequestSchema.PaginatedRequestParamsSchema.PaginatedResultSchema.PingRequestSchema.PrimitiveSchemaDefinitionSchema.ProgressSchema.ProgressNotificationSchema.ProgressNotificationParamsSchema.ProgressTokenSchema.PromptSchema.PromptArgumentSchema.PromptListChangedNotificationSchema.PromptMessageSchema.PromptReferenceSchema.ReadResourceRequestSchema.ReadResourceRequestParamsSchema.ReadResourceResultSchema.RelatedTaskMetadataSchema.RequestSchema.RequestIdSchema.RequestMetaSchema.ResourceSchema.ResourceContentsSchema.ResourceLinkSchema.ResourceListChangedNotificationSchema.ResourceRequestParamsSchema.ResourceTemplateSchema.ResourceTemplateReferenceSchema.ResourceUpdatedNotificationSchema.ResourceUpdatedNotificationParamsSchema.ResultMetaObjectSchema.ResultSchema.RoleSchema.RootSchema.RootsListChangedNotificationSchema.SamplingContentSchema.SamplingMessageSchema.SamplingMessageContentBlockSchema.ServerCapabilitiesSchema.ServerNotificationSchema.ServerRequestSchema.ServerResultSchema.SetLevelRequestSchema.SetLevelRequestParamsSchema.SingleSelectEnumSchemaSchema.StringSchemaSchema.SubscribeRequestSchema.SubscribeRequestParamsSchema.SubscriptionFilterSchema.SubscriptionsAcknowledgedNotificationSchema.SubscriptionsAcknowledgedNotificationParamsSchema.SubscriptionsListenRequestSchema.SubscriptionsListenRequestParamsSchema.SubscriptionsListenResultSchema.SubscriptionsListenResultMetaSchema.TaskAugmentedRequestParamsSchema.TaskCreationParamsSchema.TaskMetadataSchema.TaskSchema.TaskStatusSchema.TaskStatusNotificationSchema.TaskStatusNotificationParamsSchema.TextContentSchema.TextResourceContentsSchema.TitledMultiSelectEnumSchemaSchema.TitledSingleSelectEnumSchemaSchema.ToolSchema.ToolAnnotationsSchema.ToolChoiceSchema.ToolExecutionSchema.ToolListChangedNotificationSchema.ToolResultContentSchema.ToolUseContentSchema.UnsubscribeRequestSchema.UnsubscribeRequestParamsSchema.UntitledMultiSelectEnumSchemaSchema.UntitledSingleSelectEnumSchemaSchema`.split(`.`),bh={IdJagTokenExchangeResponseSchema:Tf,OAuthClientInformationFullSchema:Af,OAuthClientInformationSchema:kf,OAuthClientMetadataSchema:Of,OAuthClientRegistrationErrorSchema:jf,OAuthErrorResponseSchema:Ef,OAuthMetadataSchema:xf,OAuthProtectedResourceMetadataSchema:bf,OAuthTokenRevocationRequestSchema:Mf,OAuthTokensSchema:wf,OpenIdProviderDiscoveryMetadataSchema:Cf,OpenIdProviderMetadataSchema:Sf},xh={},Sh={};function Ch(e,t){let n=e.slice(0,-6);xh[n]=t,Sh[n]=e=>t.safeParse(e).success}for(let e of yh)Ch(e,mm[e]);for(let[e,t]of Object.entries(bh))Ch(e,t);Object.freeze(xh);var wh=Object.freeze(Sh);function Th(e){switch(e){case`initialize`:case`notifications/initialized`:return cm(void 0);case`server/discover`:return cm(sm);default:return}}var Eh=[ll,ul,fl,ml],Dh=[`inputResponses`,`requestState`];function Oh(e,t){let n=e.params;if(!Nh(n))return{message:e,lifted:{}};let r=n._meta,i=Nh(r)?Eh.filter(e=>e in r):[],a=t===`request`?Dh.filter(e=>e in n):[];if(i.length===0&&a.length===0)return{message:e,lifted:{}};let o={},s={...n};if(i.length>0&&Nh(r)){let e={},t={...r};for(let n of i)e[n]=r[n],delete t[n];o.envelope=e,Object.keys(t).length>0?s._meta=t:delete s._meta}for(let e of a)e===`inputResponses`&&(o.inputResponses=s[e]),e===`requestState`&&(o.requestState=s[e]),delete s[e];return{message:{...e,params:s},lifted:o}}function kh(e,t){let n=e.validateResult(t,void 0);if(!(!n.ok&&n.reason===`not-in-era`))return{"~standard":{version:1,vendor:`mcp-wire-codec`,validate(n){let r=e.validateResult(t,n);return r.ok?{value:r.value}:{issues:[{message:r.reason===`invalid`?r.message:`not-in-era: ${t}`}]}}}}}function Ah(e){return()=>e}var jh=Ah(void 0),Mh=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_customSchemaRequestMethods=new Set;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??sl,this.setNotificationHandler(`notifications/cancelled`,e=>{this._oncancel(e)}),this.setNotificationHandler(`notifications/progress`,e=>{this._onprogress(e)}),this.setRequestHandler(`ping`,e=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(t===void 0)return e;let n=e.params??{};return{...e,params:{...n,_meta:{...t,...n._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new Y(J.UnsupportedResultType,`Unsupported result type \'${e.kind}\' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){e.params.requestId!==void 0&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new Y(J.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),_m(e)||vm(e)?this._onresponse(e):hm(e)?this._onrequest(e,t):gm(e)?this._onnotification(e,t):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let n=new Y(J.ConnectionClosed,`Connection closed`);this._transport=void 0;try{this.onclose?.()}finally{for(let t of e.values())t(n);for(let e of t.values())e.abort(n)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:n}=Oh(e,`notification`),r=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`)return;if(t?.classification!==void 0){let e=lm(t.classification);if(e!==r.era){this._onerror(Error(`Era mismatch on inbound notification \'${n.method}\': classified as ${e} but this instance serves ${r.era}`));return}}if(dm(n.method)&&!r.hasNotificationMethod(n.method))return;let i=this._notificationHandlers.get(n.method),a=this.fallbackNotificationHandler;i===void 0&&a===void 0||Promise.resolve().then(()=>i===void 0?a(n):i(n,r)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let{message:n,lifted:r}=Oh(e,`request`),i=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`){this._onerror(Error(`Dropped inbound request \'${e.method}\': not servable on this connection\'s protocol era`));return}let a=this._transport,o=(e,t,r)=>{let i={jsonrpc:`2.0`,id:n.id,error:{code:e,message:t,...r!==void 0&&{data:r}}};a?.send(i).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)))};if(t?.classification!==void 0){let e=lm(t.classification);if(e!==i.era){this._onerror(Error(`Era mismatch on inbound request \'${n.method}\': classified as ${e} but this instance serves ${i.era}`));let r=t.classification.revision??e;o(X.UnsupportedProtocolVersion,`Unsupported protocol version: ${r}`,{supported:this._supportedProtocolVersions,requested:r});return}}if(um(n.method)&&!i.hasRequestMethod(n.method)&&!(fm(n.method)&&this._customSchemaRequestMethods.has(n.method))){o(X.MethodNotFound,`Method not found`);return}let s=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(s===void 0){o(X.MethodNotFound,`Method not found`);return}let c=i.checkInboundEnvelope(r);if(c!==void 0){o(X.InvalidParams,c);return}let l=(e,t)=>this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,{...t,relatedRequestId:n.id}),u=(e,t,r)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(e.method),e,t,{...r,relatedRequestId:n.id}),d=new AbortController;this._requestHandlerAbortControllers.set(n.id,d);let f=r.inputResponses===void 0?void 0:Ih(r.inputResponses),p={sessionId:a?.sessionId,mcpReq:{id:n.id,method:n.method,_meta:n.params?._meta,...r.envelope!==void 0&&{envelope:r.envelope},...f!==void 0&&{inputResponses:f.accepted},...f!==void 0&&f.droppedKeys.length>0&&{droppedInputResponseKeys:f.droppedKeys},requestState:r.requestState===void 0?jh:Ah(r.requestState),signal:d.signal,send:((e,t,n)=>{let r=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(r,e.method),Rm(t))return u(e,t,n);let i=kh(r,e.method);if(i===void 0)throw TypeError(`\'${e.method}\' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return u(e,i,t)}),notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},m=this.buildContext(p,t);Promise.resolve().then(()=>s(n,m)).then(async e=>{if(d.signal.aborted)return;let t;try{t=i.encodeResult(n.method,e,this._outboundServerInfo())}catch(e){this._onerror(Error(`Failed to encode result for ${n.method}: ${e}`)),o(X.InternalError,`Internal error`);return}let r={result:t,jsonrpc:`2.0`,id:n.id};await a?.send(r)},async e=>{if(d.signal.aborted)return;let t=Number.isSafeInteger(e.code)?e.code:X.InternalError,r={jsonrpc:`2.0`,id:n.id,error:{code:i.encodeErrorCode(t),message:e.message??`Internal error`,...e.data!==void 0&&{data:e.data}}};await a?.send(r)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(n.id)===d&&this._requestHandlerAbortControllers.delete(n.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._responseHandlers.get(t);if(n===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),_m(e)?n(e):n(Z.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,n){let r=this._resolveOutboundCodec(e.method);if(Rm(t))return fm(e.method)||this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,n);this._assertOutboundRequestInEra(r,e.method);let i=kh(r,e.method);if(i===void 0)throw TypeError(`\'${e.method}\' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(r,e,i,t)}_negotiatedWireCodec(){return cm(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=Th(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(um(t)&&!e.hasRequestMethod(t))throw new Y(J.MethodNotSupportedByProtocolVersion,`Method \'${t}\' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,n){let r=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,n)}_requestWithSchemaViaCodec(e,t,n,r){let{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s}=r??{},c=Date.now(),l,u;return new Promise((d,f)=>{let p=e=>{f(e)};if(!this._transport){p(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(e){p(e);return}if(r?.signal?.aborted){let e=r.signal.reason;throw e instanceof Y?e:new Y(J.RequestTimeout,String(e))}let m=e.era===`2026-07-28`&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,h=this._requestMessageId++;u=h;let g={...t,jsonrpc:`2.0`,id:h};r?.onprogress&&(this._progressHandlers.set(h,r.onprogress),g.params={...t.params,_meta:{...t.params?._meta,progressToken:h}});let ee=this._envelopeOutbound(g),te=!1,_=e=>{te||(this._progressHandlers.delete(h),m===void 0?t.method!==`initialize`&&this._transport?.send(this._envelopeOutbound({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:h,reason:String(e)}}),{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))):m.abort(),f(e instanceof Y?e:new Y(J.RequestTimeout,String(e))))};this._responseHandlers.set(h,i=>{if(r?.signal?.aborted)return;if(te=!0,i instanceof Error)return f(i);let a;try{a=e.decodeResult(t.method,i.result)}catch(e){return f(e instanceof Error?e:Error(String(e)))}if(a.kind===`invalid`)return f(a.error);if(a.kind===`input_required`){if(r?.allowInputRequired===!0)return d(Hh(a));let i={codec:e,request:t,resultSchema:n,options:r,flowStartedAt:c,retry:(r,i)=>this._requestWithSchemaViaCodec(e,r===void 0?{method:t.method}:{method:t.method,params:r},n,i)};return d(this._resolveNonCompleteResult(a,i))}let o=a.result;Gm(n,o).then(e=>{e.success?d(e.data):f(new Y(J.InvalidResult,`Invalid result for ${t.method}: ${e.error}`))},f)}),l=()=>_(r?.signal?.reason),r?.signal?.addEventListener(`abort`,l,{once:!0});let ne=r?.timeout??6e4;this._setupTimeout(h,ne,r?.maxTotalTimeout,()=>_(new Y(J.RequestTimeout,`Request timed out`,{timeout:ne})),r?.resetTimeoutOnProgress??!1),this._transport.send(ee,{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s,requestSignal:m?.signal}).catch(e=>{this._progressHandlers.delete(h),f(e)})}).finally(()=>{l&&r?.signal?.removeEventListener(`abort`,l),u!==void 0&&(this._responseHandlers.delete(u),this._cleanupTimeout(u))})}async notification(e,t){return await this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,n){if(!this._transport)throw new Y(J.NotConnected,`Not connected`);if(dm(t.method)&&!e.hasNotificationMethod(t.method))throw new Y(J.MethodNotSupportedByProtocolVersion,`Notification \'${t.method}\' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let r=this._envelopeOutbound({jsonrpc:`2.0`,...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&n?.relatedRequestId===void 0){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{this._pendingDebouncedNotifications.delete(t.method),this._transport&&this._transport?.send(r,n).catch(e=>this._onerror(e))});return}await this._transport.send(r,n)}setRequestHandler(e,t,n){this.assertRequestHandlerCapability(e);let r;if(typeof t==`function`){if(!um(e))throw TypeError(`\'${e}\' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);r=(n,r)=>{let i=this._negotiatedWireCodec(),a=i.validateRequest(e,n);if(!a.ok&&a.reason===`not-in-era`&&(a=i.validateInputRequest(e,n)),!a.ok)throw a.reason===`not-in-era`?new Z(X.InternalError,`No wire schema for ${e} in the resolved era`):Error(a.message);return Promise.resolve(t(a.value,r))}}else if(n)r=async(r,i)=>{let a=await Gm(t.params,{...r.params});if(!a.success)throw new Z(X.InvalidParams,`Invalid params for ${e}: ${a.error}`);return n(a.data,i)};else throw TypeError(`setRequestHandler: handler is required`);typeof t==`function`?this._customSchemaRequestMethods.delete(e):this._customSchemaRequestMethods.add(e),this._requestHandlers.set(e,this._wrapHandler(e,r))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e),this._customSchemaRequestMethods.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,n){if(typeof t==`function`){if(!dm(e))throw TypeError(`\'${e}\' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(n,r)=>{let i=r.validateNotification(e,n);if(!i.ok)throw i.reason===`not-in-era`?new Z(X.InternalError,`No wire schema for ${e} in the resolved era`):Error(i.message);return Promise.resolve(t(i.value))});return}if(!n)throw TypeError(`setNotificationHandler: handler is required`);this._notificationHandlers.set(e,async r=>{let i=await Gm(t.params,{...r.params});if(!i.success)throw new Z(X.InvalidParams,`Invalid params for notification ${e}: ${i.error}`);await n(i.data,r)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function Nh(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ph(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=Nh(a)&&Nh(i)?{...a,...i}:i}return n}function Fh(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ih(e){let t={},n=[];if(!Fh(e))return{accepted:t,droppedKeys:n};for(let[r,i]of Object.entries(e)){if(!Fh(i)||`method`in i||`result`in i){n.push(r);continue}t[r]=i}return{accepted:t,droppedKeys:n}}function Lh(e){throw new Y(J.SendFailed,`ctx.mcpReq.${e} is not available while fulfilling an embedded input request: the request is fulfilled locally and has no related peer request`)}function Rh(e,t,n,r,i){return{sessionId:i,mcpReq:{id:e,method:t,_meta:n?._meta,requestState:Ah(void 0),signal:r,send:(()=>Lh(`send`)),notify:()=>Lh(`notify`)}}}async function zh(e,t,n,r,i){if(!Fh(r)||typeof r.method!=`string`)throw new Y(J.InvalidResult,`Invalid input request \'${n}\': each inputRequests entry must be an embedded request object with a method`,{key:n});let a=r.method;if(!t.hasInputRequestMethod(a))throw new Y(J.InvalidResult,`Invalid input request \'${n}\': \'${a}\' is not an embedded request the ${t.era} revision defines (expected elicitation/create, sampling/createMessage, or roots/list)`,{key:n,method:a});let o=e.getRequestHandler(a);if(o===void 0)throw new Y(J.CapabilityNotSupported,`Cannot fulfil input request \'${n}\': no handler is registered for \'${a}\' on this client. Declare the corresponding capability and register a handler, or handle input_required results manually.`,{key:n,method:a});let s=Fh(r.params)?r.params:void 0;return await o({jsonrpc:`2.0`,id:n,method:a,...s!==void 0&&{params:s}},e.buildContext(Rh(n,a,s,i,e.sessionId)))}function Bh(e,t){return{...e?.signal!==void 0&&{signal:e.signal},...e?.onprogress!==void 0&&{onprogress:e.onprogress},...e?.resetTimeoutOnProgress!==void 0&&{resetTimeoutOnProgress:e.resetTimeoutOnProgress},...e?.headers!==void 0&&{headers:e.headers},...t.timeout!==void 0&&{timeout:t.timeout},...t.maxTotalTimeout!==void 0&&{maxTotalTimeout:t.maxTotalTimeout},allowInputRequired:!0}}function Vh(e,t,n,r){let{codec:i,request:a,options:o,flowStartedAt:s}=r,c={inputRequests:n.inputRequests,...n.requestState!==void 0&&{requestState:n.requestState}},l={dispatchInputRequest:(t,n,r)=>zh(e,i,t,n,r),retry:(e,t)=>r.retry(e,Bh(o,t))};return vh({config:t,method:a.method,originalParams:a.params,firstPayload:c,flowStartedAt:s,signal:o?.signal,requestOptions:{...o?.timeout!==void 0&&{timeout:o.timeout},...o?.maxTotalTimeout!==void 0&&{maxTotalTimeout:o.maxTotalTimeout},...o?.onprogress!==void 0&&{onprogress:o.onprogress}},hooks:l})}function Hh(e){return{resultType:`input_required`,inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState},...e._meta!==void 0&&{_meta:e._meta}}}t((e=>{var t=/; *([!#$%&\'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\\u000b\\u0020\\u0021\\u0023-\\u005b\\u005d-\\u007e\\u0080-\\u00ff]|\\\\[\\u000b\\u0020-\\u00ff])*"|[!#$%&\'*+.^_`|~0-9A-Za-z-]+) */g,n=/\\\\([\\u000b\\u0020-\\u00ff])/g,r=/^[!#$%&\'*+.^_`|~0-9A-Za-z-]+\\/[!#$%&\'*+.^_`|~0-9A-Za-z-]+$/;e.parse=i;function i(e){if(!e)throw TypeError(`argument string is required`);var i=typeof e==`object`?a(e):e;if(typeof i!=`string`)throw TypeError(`argument string is required to be a string`);var s=i.indexOf(`;`),c=s===-1?i.trim():i.slice(0,s).trim();if(!r.test(c))throw TypeError(`invalid media type`);var l=new o(c.toLowerCase());if(s!==-1){var u,d,f;for(t.lastIndex=s;d=t.exec(i);){if(d.index!==s)throw TypeError(`invalid parameter format`);s+=d[0].length,u=d[1].toLowerCase(),f=d[2],f.charCodeAt(0)===34&&(f=f.slice(1,-1),f.indexOf(`\\\\`)!==-1&&(f=f.replace(n,`$1`))),l.parameters[u]=f}if(s!==i.length)throw TypeError(`invalid parameter format`)}return l}function a(e){var t;if(typeof e.getHeader==`function`?t=e.getHeader(`content-type`):typeof e.headers==`object`&&(t=e.headers&&e.headers[`content-type`]),typeof t!=`string`)throw TypeError(`content-type header is missing from object`);return t}function o(e){this.parameters=Object.create(null),this.type=e}}))();function Uh(e,t){let n=typeof e;if(n!==typeof t)return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(!Uh(e[r],t[r]))return!1;return!0}if(n===`object`){if(!e||!t)return e===t;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Uh(e[r],t[r]))return!1;return!0}return e===t}function Wh(e){return encodeURI(Gh(e))}function Gh(e){return e.replace(/~/g,`~0`).replace(/\\//g,`~1`)}var Kh={prefixItems:!0,items:!0,allOf:!0,anyOf:!0,oneOf:!0},qh={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependentSchemas:!0},Jh={id:!0,$id:!0,$ref:!0,$schema:!0,$anchor:!0,$vocabulary:!0,$comment:!0,default:!0,enum:!0,const:!0,required:!0,type:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0},Yh=typeof self<`u`&&self.location&&self.location.origin!==`null`?new URL(self.location.origin+self.location.pathname+location.search):new URL(`https://github.com/cfworker`);function Xh(e,t=Object.create(null),n=Yh,r=``){if(e&&typeof e==`object`&&!Array.isArray(e)){let i=e.$id||e.id;if(i){let a=new URL(i,n.href);a.hash.length>1?t[a.href]=e:(a.hash=``,r===``?n=a:Xh(e,t,n))}}else if(e!==!0&&e!==!1)return t;let i=n.href+(r?`#`+r:``);if(t[i]!==void 0)throw Error(`Duplicate schema URI "${i}".`);if(t[i]=e,e===!0||e===!1)return t;if(e.__absolute_uri__===void 0&&Object.defineProperty(e,"__absolute_uri__",{enumerable:!1,value:i}),e.$ref&&e.__absolute_ref__===void 0){let t=new URL(e.$ref,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_ref__",{enumerable:!1,value:t.href})}if(e.$recursiveRef&&e.__absolute_recursive_ref__===void 0){let t=new URL(e.$recursiveRef,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_recursive_ref__",{enumerable:!1,value:t.href})}if(e.$anchor){let r=new URL(`#`+e.$anchor,n.href);t[r.href]=e}for(let i in e){if(Jh[i])continue;let a=`${r}/${Wh(i)}`,o=e[i];if(Array.isArray(o)){if(Kh[i]){let e=o.length;for(let r=0;r<e;r++)Xh(o[r],t,n,`${a}/${r}`)}}else if(qh[i])for(let e in o)Xh(o[e],t,n,`${a}/${Wh(e)}`);else Xh(o,t,n,a)}return t}var Zh=/^(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)$/,Qh=[0,31,28,31,30,31,30,31,31,30,31,30,31],$h=/^(\\d\\d):(\\d\\d):(\\d\\d)(\\.\\d+)?(z|[+-]\\d\\d(?::?\\d\\d)?)?$/i,eg=/^(?=.{1,253}\\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\\.?$/i,tg=/^(?:[a-z][a-z0-9+\\-.]*:)?(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&\'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&\'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&\'"()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\\?(?:[a-z0-9\\-._~!$&\'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&\'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,ng=/^(?:(?:[^\\x00-\\x20"\'<>%\\\\^`{|}]|%[0-9a-f]{2})|\\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?)*\\})*$/i,rg=/^(?:(?:https?|ftp):\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!10(?:\\.\\d{1,3}){3})(?!127(?:\\.\\d{1,3}){3})(?!169\\.254(?:\\.\\d{1,3}){2})(?!192\\.168(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u{00a1}-\\u{ffff}0-9]+-?)*[a-z\\u{00a1}-\\u{ffff}0-9]+)(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}0-9]+-?)*[a-z\\u{00a1}-\\u{ffff}0-9]+)*(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}]{2,})))(?::\\d{2,5})?(?:\\/[^\\s]*)?$/iu,ig=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,ag=/^(?:\\/(?:[^~/]|~0|~1)*)*$/,og=/^#(?:\\/(?:[a-z0-9_\\-.!$&\'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,sg=/^(?:0|[1-9][0-9]*)(?:#|(?:\\/(?:[^~/]|~0|~1)*)*)$/,cg=e=>{if(e[0]===`"`)return!1;let[t,n,...r]=e.split(`@`);return!t||!n||r.length!==0||t.length>64||n.length>253||t[0]===`.`||t.endsWith(`.`)||t.includes(`..`)||!/^[a-z0-9.-]+$/i.test(n)||!/^[a-z0-9.!#$%&\'*+/=?^_`{|}~-]+$/i.test(t)?!1:n.split(`.`).every(e=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(e))},lg=/^(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)$/,ug=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))$/i,dg=e=>e.length>1&&e.length<80&&(/^P\\d+([.,]\\d+)?W$/.test(e)||/^P[\\dYMDTHS]*(\\d[.,]\\d+)?[YMDHS]$/.test(e)&&/^P([.,\\d]+Y)?([.,\\d]+M)?([.,\\d]+D)?(T([.,\\d]+H)?([.,\\d]+M)?([.,\\d]+S)?)?$/.test(e));function fg(e){return e.test.bind(e)}var pg={date:hg,time:gg.bind(void 0,!1),"date-time":vg,duration:dg,uri:xg,"uri-reference":fg(tg),"uri-template":fg(ng),url:fg(rg),email:cg,hostname:fg(eg),ipv4:fg(lg),ipv6:fg(ug),regex:Cg,uuid:fg(ig),"json-pointer":fg(ag),"json-pointer-uri-fragment":fg(og),"relative-json-pointer":fg(sg)};function mg(e){return e%4==0&&(e%100!=0||e%400==0)}function hg(e){let t=e.match(Zh);if(!t)return!1;let n=+t[1],r=+t[2],i=+t[3];return r>=1&&r<=12&&i>=1&&i<=(r==2&&mg(n)?29:Qh[r])}function gg(e,t){let n=t.match($h);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=!!n[5];return(r<=23&&i<=59&&a<=59||r==23&&i==59&&a==60)&&(!e||o)}var _g=/t|\\s/i;function vg(e){let t=e.split(_g);return t.length==2&&hg(t[0])&&gg(!0,t[1])}var yg=/\\/|:/,bg=/^(?:[a-z][a-z0-9+\\-.]*:)(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&\'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&\'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&\'()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\\?(?:[a-z0-9\\-._~!$&\'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&\'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function xg(e){return yg.test(e)&&bg.test(e)}var Sg=/[^\\\\]\\\\Z/;function Cg(e){if(Sg.test(e))return!1;try{return new RegExp(e,`u`),!0}catch{return!1}}function wg(e){let t=0,n=e.length,r=0,i;for(;r<n;)t++,i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<n&&(i=e.charCodeAt(r),(i&64512)==56320&&r++);return t}function Q(e,t,n=`2019-09`,r=Xh(t),i=!0,a=null,o=`#`,s=`#`,c=Object.create(null)){if(t===!0)return{valid:!0,errors:[]};if(t===!1)return{valid:!1,errors:[{instanceLocation:o,keyword:`false`,keywordLocation:o,error:`False boolean schema.`}]};let l=typeof e,u;switch(l){case`boolean`:case`number`:case`string`:u=l;break;case`object`:u=e===null?`null`:Array.isArray(e)?`array`:`object`;break;default:throw Error(`Instances of "${l}" type are not supported.`)}let{$ref:d,$recursiveRef:f,$recursiveAnchor:p,type:m,const:h,enum:g,required:ee,not:te,anyOf:_,allOf:ne,oneOf:re,if:ie,then:ae,else:oe,format:se,properties:v,patternProperties:ce,additionalProperties:le,unevaluatedProperties:ue,minProperties:de,maxProperties:fe,propertyNames:pe,dependentRequired:me,dependentSchemas:he,dependencies:ge,prefixItems:y,items:b,additionalItems:_e,unevaluatedItems:ve,contains:ye,minContains:x,maxContains:be,minItems:xe,maxItems:Se,uniqueItems:Ce,minimum:we,maximum:Te,exclusiveMinimum:Ee,exclusiveMaximum:De,multipleOf:Oe,minLength:S,maxLength:ke,pattern:Ae,__absolute_ref__:je,__absolute_recursive_ref__:Me}=t,C=[];if(p===!0&&a===null&&(a=t),f===`#`){let l=a===null?r[Me]:a,u=`${s}/$recursiveRef`,d=Q(e,a===null?t:a,n,r,i,l,o,u,c);d.valid||C.push({instanceLocation:o,keyword:`$recursiveRef`,keywordLocation:u,error:`A subschema had errors.`},...d.errors)}if(d!==void 0){let t=r[je||d];if(t===void 0){let e=`Unresolved $ref "${d}".`;throw je&&je!==d&&(e+=` Absolute URI "${je}".`),e+=`\\nKnown schemas:\\n- ${Object.keys(r).join(`\n- `)}`,Error(e)}let l=`${s}/$ref`,u=Q(e,t,n,r,i,a,o,l,c);if(u.valid||C.push({instanceLocation:o,keyword:`$ref`,keywordLocation:l,error:`A subschema had errors.`},...u.errors),n===`4`||n===`7`)return{valid:C.length===0,errors:C}}if(Array.isArray(m)){let t=m.length,n=!1;for(let r=0;r<t;r++)if(u===m[r]||m[r]===`integer`&&u===`number`&&e%1==0&&e===e){n=!0;break}n||C.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m.join(`", "`)}".`})}else m===`integer`?(u!==`number`||e%1||e!==e)&&C.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m}".`}):m!==void 0&&u!==m&&C.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m}".`});if(h!==void 0&&(u===`object`||u===`array`?Uh(e,h)||C.push({instanceLocation:o,keyword:`const`,keywordLocation:`${s}/const`,error:`Instance does not match ${JSON.stringify(h)}.`}):e!==h&&C.push({instanceLocation:o,keyword:`const`,keywordLocation:`${s}/const`,error:`Instance does not match ${JSON.stringify(h)}.`})),g!==void 0&&(u===`object`||u===`array`?g.some(t=>Uh(e,t))||C.push({instanceLocation:o,keyword:`enum`,keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`}):g.some(t=>e===t)||C.push({instanceLocation:o,keyword:`enum`,keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`})),te!==void 0){let t=`${s}/not`;Q(e,te,n,r,i,a,o,t).valid&&C.push({instanceLocation:o,keyword:`not`,keywordLocation:t,error:`Instance matched "not" schema.`})}let Ne=[];if(_!==void 0){let t=`${s}/anyOf`,l=C.length,u=!1;for(let s=0;s<_.length;s++){let l=_[s],d=Object.create(c),f=Q(e,l,n,r,i,p===!0?a:null,o,`${t}/${s}`,d);C.push(...f.errors),u||=f.valid,f.valid&&Ne.push(d)}u?C.length=l:C.splice(l,0,{instanceLocation:o,keyword:`anyOf`,keywordLocation:t,error:`Instance does not match any subschemas.`})}if(ne!==void 0){let t=`${s}/allOf`,l=C.length,u=!0;for(let s=0;s<ne.length;s++){let l=ne[s],d=Object.create(c),f=Q(e,l,n,r,i,p===!0?a:null,o,`${t}/${s}`,d);C.push(...f.errors),u&&=f.valid,f.valid&&Ne.push(d)}u?C.length=l:C.splice(l,0,{instanceLocation:o,keyword:`allOf`,keywordLocation:t,error:`Instance does not match every subschema.`})}if(re!==void 0){let t=`${s}/oneOf`,l=C.length,u=re.filter((s,l)=>{let u=Object.create(c),d=Q(e,s,n,r,i,p===!0?a:null,o,`${t}/${l}`,u);return C.push(...d.errors),d.valid&&Ne.push(u),d.valid}).length;u===1?C.length=l:C.splice(l,0,{instanceLocation:o,keyword:`oneOf`,keywordLocation:t,error:`Instance does not match exactly one subschema (${u} matches).`})}if((u===`object`||u===`array`)&&Object.assign(c,...Ne),ie!==void 0){let t=`${s}/if`;if(Q(e,ie,n,r,i,a,o,t,c).valid){if(ae!==void 0){let l=Q(e,ae,n,r,i,a,o,`${s}/then`,c);l.valid||C.push({instanceLocation:o,keyword:`if`,keywordLocation:t,error:`Instance does not match "then" schema.`},...l.errors)}}else if(oe!==void 0){let l=Q(e,oe,n,r,i,a,o,`${s}/else`,c);l.valid||C.push({instanceLocation:o,keyword:`if`,keywordLocation:t,error:`Instance does not match "else" schema.`},...l.errors)}}if(u===`object`){if(ee!==void 0)for(let t of ee)t in e||C.push({instanceLocation:o,keyword:`required`,keywordLocation:`${s}/required`,error:`Instance does not have required property "${t}".`});let t=Object.keys(e);if(de!==void 0&&t.length<de&&C.push({instanceLocation:o,keyword:`minProperties`,keywordLocation:`${s}/minProperties`,error:`Instance does not have at least ${de} properties.`}),fe!==void 0&&t.length>fe&&C.push({instanceLocation:o,keyword:`maxProperties`,keywordLocation:`${s}/maxProperties`,error:`Instance does not have at least ${fe} properties.`}),pe!==void 0){let t=`${s}/propertyNames`;for(let s in e){let e=`${o}/${Wh(s)}`,c=Q(s,pe,n,r,i,a,e,t);c.valid||C.push({instanceLocation:o,keyword:`propertyNames`,keywordLocation:t,error:`Property name "${s}" does not match schema.`},...c.errors)}}if(me!==void 0){let t=`${s}/dependantRequired`;for(let n in me)if(n in e){let r=me[n];for(let i of r)i in e||C.push({instanceLocation:o,keyword:`dependentRequired`,keywordLocation:t,error:`Instance has "${n}" but does not have "${i}".`})}}if(he!==void 0)for(let t in he){let l=`${s}/dependentSchemas`;if(t in e){let s=Q(e,he[t],n,r,i,a,o,`${l}/${Wh(t)}`,c);s.valid||C.push({instanceLocation:o,keyword:`dependentSchemas`,keywordLocation:l,error:`Instance has "${t}" but does not match dependant schema.`},...s.errors)}}if(ge!==void 0){let t=`${s}/dependencies`;for(let s in ge)if(s in e){let c=ge[s];if(Array.isArray(c))for(let n of c)n in e||C.push({instanceLocation:o,keyword:`dependencies`,keywordLocation:t,error:`Instance has "${s}" but does not have "${n}".`});else{let l=Q(e,c,n,r,i,a,o,`${t}/${Wh(s)}`);l.valid||C.push({instanceLocation:o,keyword:`dependencies`,keywordLocation:t,error:`Instance has "${s}" but does not match dependant schema.`},...l.errors)}}}let l=Object.create(null),u=!1;if(v!==void 0){let t=`${s}/properties`;for(let s in v){if(!(s in e))continue;let d=`${o}/${Wh(s)}`,f=Q(e[s],v[s],n,r,i,a,d,`${t}/${Wh(s)}`);if(f.valid)c[s]=l[s]=!0;else if(u=i,C.push({instanceLocation:o,keyword:`properties`,keywordLocation:t,error:`Property "${s}" does not match schema.`},...f.errors),u)break}}if(!u&&ce!==void 0){let t=`${s}/patternProperties`;for(let s in ce){let d=new RegExp(s,`u`),f=ce[s];for(let p in e){if(!d.test(p))continue;let m=`${o}/${Wh(p)}`,h=Q(e[p],f,n,r,i,a,m,`${t}/${Wh(s)}`);h.valid?c[p]=l[p]=!0:(u=i,C.push({instanceLocation:o,keyword:`patternProperties`,keywordLocation:t,error:`Property "${p}" matches pattern "${s}" but does not match associated schema.`},...h.errors))}}}if(!u&&le!==void 0){let t=`${s}/additionalProperties`;for(let s in e){if(l[s])continue;let d=`${o}/${Wh(s)}`,f=Q(e[s],le,n,r,i,a,d,t);f.valid?c[s]=!0:(u=i,C.push({instanceLocation:o,keyword:`additionalProperties`,keywordLocation:t,error:`Property "${s}" does not match additional properties schema.`},...f.errors))}}else if(!u&&ue!==void 0){let t=`${s}/unevaluatedProperties`;for(let s in e)if(!c[s]){let l=`${o}/${Wh(s)}`,u=Q(e[s],ue,n,r,i,a,l,t);u.valid?c[s]=!0:C.push({instanceLocation:o,keyword:`unevaluatedProperties`,keywordLocation:t,error:`Property "${s}" does not match unevaluated properties schema.`},...u.errors)}}}else if(u===`array`){Se!==void 0&&e.length>Se&&C.push({instanceLocation:o,keyword:`maxItems`,keywordLocation:`${s}/maxItems`,error:`Array has too many items (${e.length} > ${Se}).`}),xe!==void 0&&e.length<xe&&C.push({instanceLocation:o,keyword:`minItems`,keywordLocation:`${s}/minItems`,error:`Array has too few items (${e.length} < ${xe}).`});let t=e.length,l=0,u=!1;if(y!==void 0){let d=`${s}/prefixItems`,f=Math.min(y.length,t);for(;l<f;l++){let t=Q(e[l],y[l],n,r,i,a,`${o}/${l}`,`${d}/${l}`);if(c[l]=!0,!t.valid&&(u=i,C.push({instanceLocation:o,keyword:`prefixItems`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}}if(b!==void 0){let d=`${s}/items`;if(Array.isArray(b)){let s=Math.min(b.length,t);for(;l<s;l++){let t=Q(e[l],b[l],n,r,i,a,`${o}/${l}`,`${d}/${l}`);if(c[l]=!0,!t.valid&&(u=i,C.push({instanceLocation:o,keyword:`items`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}}else for(;l<t;l++){let t=Q(e[l],b,n,r,i,a,`${o}/${l}`,d);if(c[l]=!0,!t.valid&&(u=i,C.push({instanceLocation:o,keyword:`items`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}if(!u&&_e!==void 0){let d=`${s}/additionalItems`;for(;l<t;l++){let t=Q(e[l],_e,n,r,i,a,`${o}/${l}`,d);c[l]=!0,t.valid||(u=i,C.push({instanceLocation:o,keyword:`additionalItems`,keywordLocation:d,error:`Items did not match additional items schema.`},...t.errors))}}}if(ye!==void 0)if(t===0&&x===void 0)C.push({instanceLocation:o,keyword:`contains`,keywordLocation:`${s}/contains`,error:`Array is empty. It must contain at least one item matching the schema.`});else if(x!==void 0&&t<x)C.push({instanceLocation:o,keyword:`minContains`,keywordLocation:`${s}/minContains`,error:`Array has less items (${t}) than minContains (${x}).`});else{let l=`${s}/contains`,u=C.length,d=0;for(let s=0;s<t;s++){let t=Q(e[s],ye,n,r,i,a,`${o}/${s}`,l);t.valid?(c[s]=!0,d++):C.push(...t.errors)}d>=(x||0)&&(C.length=u),x===void 0&&be===void 0&&d===0?C.splice(u,0,{instanceLocation:o,keyword:`contains`,keywordLocation:l,error:`Array does not contain item matching schema.`}):x!==void 0&&d<x?C.push({instanceLocation:o,keyword:`minContains`,keywordLocation:`${s}/minContains`,error:`Array must contain at least ${x} items matching schema. Only ${d} items were found.`}):be!==void 0&&d>be&&C.push({instanceLocation:o,keyword:`maxContains`,keywordLocation:`${s}/maxContains`,error:`Array may contain at most ${be} items matching schema. ${d} items were found.`})}if(!u&&ve!==void 0){let u=`${s}/unevaluatedItems`;for(;l<t;l++){if(c[l])continue;let t=Q(e[l],ve,n,r,i,a,`${o}/${l}`,u);c[l]=!0,t.valid||C.push({instanceLocation:o,keyword:`unevaluatedItems`,keywordLocation:u,error:`Items did not match unevaluated items schema.`},...t.errors)}}if(Ce)for(let n=0;n<t;n++){let r=e[n],i=typeof r==`object`&&!!r;for(let a=0;a<t;a++){if(n===a)continue;let t=e[a];(r===t||i&&typeof t==`object`&&t&&Uh(r,t))&&(C.push({instanceLocation:o,keyword:`uniqueItems`,keywordLocation:`${s}/uniqueItems`,error:`Duplicate items at indexes ${n} and ${a}.`}),n=2**53-1,a=2**53-1)}}}else if(u===`number`){if(n===`4`?(we!==void 0&&(Ee===!0&&e<=we||e<we)&&C.push({instanceLocation:o,keyword:`minimum`,keywordLocation:`${s}/minimum`,error:`${e} is less than ${Ee?`or equal to `:``} ${we}.`}),Te!==void 0&&(De===!0&&e>=Te||e>Te)&&C.push({instanceLocation:o,keyword:`maximum`,keywordLocation:`${s}/maximum`,error:`${e} is greater than ${De?`or equal to `:``} ${Te}.`})):(we!==void 0&&e<we&&C.push({instanceLocation:o,keyword:`minimum`,keywordLocation:`${s}/minimum`,error:`${e} is less than ${we}.`}),Te!==void 0&&e>Te&&C.push({instanceLocation:o,keyword:`maximum`,keywordLocation:`${s}/maximum`,error:`${e} is greater than ${Te}.`}),Ee!==void 0&&e<=Ee&&C.push({instanceLocation:o,keyword:`exclusiveMinimum`,keywordLocation:`${s}/exclusiveMinimum`,error:`${e} is less than ${Ee}.`}),De!==void 0&&e>=De&&C.push({instanceLocation:o,keyword:`exclusiveMaximum`,keywordLocation:`${s}/exclusiveMaximum`,error:`${e} is greater than or equal to ${De}.`})),Oe!==void 0){let t=e%Oe;Math.abs(0-t)>=1.1920929e-7&&Math.abs(Oe-t)>=1.1920929e-7&&C.push({instanceLocation:o,keyword:`multipleOf`,keywordLocation:`${s}/multipleOf`,error:`${e} is not a multiple of ${Oe}.`})}}else if(u===`string`){let t=S===void 0&&ke===void 0?0:wg(e);S!==void 0&&t<S&&C.push({instanceLocation:o,keyword:`minLength`,keywordLocation:`${s}/minLength`,error:`String is too short (${t} < ${S}).`}),ke!==void 0&&t>ke&&C.push({instanceLocation:o,keyword:`maxLength`,keywordLocation:`${s}/maxLength`,error:`String is too long (${t} > ${ke}).`}),Ae!==void 0&&!new RegExp(Ae,`u`).test(e)&&C.push({instanceLocation:o,keyword:`pattern`,keywordLocation:`${s}/pattern`,error:`String does not match pattern.`}),se!==void 0&&pg[se]&&!pg[se](e)&&C.push({instanceLocation:o,keyword:`format`,keywordLocation:`${s}/format`,error:`String does not match format "${se}".`})}return{valid:C.length===0,errors:C}}var Tg=class{schema;draft;shortCircuit;lookup;constructor(e,t=`2019-09`,n=!0){this.schema=e,this.draft=t,this.shortCircuit=n,this.lookup=Xh(e)}validate(e){return Q(e,this.schema,this.draft,this.lookup,this.shortCircuit)}addSchema(e,t){t&&(e={...e,$id:t}),Xh(e,this.lookup)}},Eg=class{shortcircuit;draft;constructor(e){this.shortcircuit=e?.shortcircuit??!0,this.draft=e?.draft}_draftFor(e){let t=c(e,`pass an explicit { draft } to CfWorkerJsonSchemaValidator to validate other dialects.`);return t===`draft-7`?`7`:t}getValidator(e){let t=new Tg(e,this.draft??this._draftFor(e),this.shortcircuit);return e=>{let n=t.validate(e);return n.valid?{valid:!0,data:e,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:n.errors.map(e=>`${e.instanceLocation}: ${e.error}`).join(`; `)}}}};globalThis.crypto;var Dg=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthClientFlowError`})}static[Symbol.hasInstance](e){return Ff(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Ff(this,e)}constructor(e){super(e),this.name=new.target.name,Pf(this,new.target)}};(class extends Dg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.IssuerMismatchError`})}kind;expected;received;constructor(e,t,n){super(`Issuer mismatch in ${e===`metadata`?`authorization server metadata (RFC 8414 \xA73.3)`:`authorization response (RFC 9207)`}: expected ${JSON.stringify(t)}, received ${JSON.stringify(n)}`),this.kind=e,this.expected=t,this.received=n}}),class extends Dg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.RegistrationRejectedError`})}status;body;submittedMetadata;constructor(e){super(`Dynamic Client Registration rejected (HTTP ${e.status}): ${e.body}`),this.status=e.status,this.body=e.body,this.submittedMetadata=e.submittedMetadata}},class extends Dg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsecureTokenEndpointError`})}tokenEndpoint;constructor(e){super(`Refusing to send credentials to non-https token endpoint \'${e}\'. OAuth token requests MUST use TLS (localhost / *.localhost / 127.0.0.1 / ::1 are exempt).`),this.tokenEndpoint=e}},class extends Dg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.AuthorizationServerMismatchError`})}constructor(e,t){super(`Authorization server mismatch: credentials are bound to ${JSON.stringify(e)} but this call resolved ${JSON.stringify(t)}; refusing to present them to a different authorization server`),this.recordedIssuer=e,this.currentIssuer=t}},class extends Dg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsufficientScopeError`})}requiredScope;resourceMetadataUrl;errorDescription;constructor(e){super(`Insufficient scope${e.requiredScope?`: required "${e.requiredScope}"`:``}`),this.requiredScope=e.requiredScope,this.resourceMetadataUrl=e.resourceMetadataUrl,this.errorDescription=e.errorDescription}};var Og=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnauthorizedError`})}static[Symbol.hasInstance](e){return Ff(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Ff(this,e)}constructor(e){super(e??`Unauthorized`),this.name=`UnauthorizedError`,Pf(this,new.target)}},kg=new Set([`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`server/discover`]),Ag=class{_entries=new Map;_maxEntries;_stamp=0;_cappedSize=0;constructor(e){this._maxEntries=e?.maxEntries??512}get size(){return this._entries.size}get(e){return this._entries.get(jg(e))}set(e,t){let n=jg(e),r=kg.has(e.method),i=!this._entries.has(n);if(!r&&i&&this._maxEntries>0&&this._cappedSize>=this._maxEntries){for(let e of this._entries.keys())if(!kg.has(e.slice(0,e.indexOf(`\\0`)))){this._entries.delete(e),this._cappedSize--;break}}let a=++this._stamp;return this._entries.set(n,{...t,stamp:a}),i&&!r&&this._cappedSize++,a}delete(e){this._entries.delete(jg(e))&&!kg.has(e.method)&&this._cappedSize--}evict(e){let t=`${e}\\0`,n=kg.has(e);for(let e of this._entries.keys())e.startsWith(t)&&(this._entries.delete(e),n||this._cappedSize--)}clear(){this._entries.clear(),this._cappedSize=0}};function jg(e){return`${e.method}\\0${JSON.stringify([e.partition??``,e.params??``])}`}function Mg(e,t){return t===void 0?e:`${e}\\0${t}`}var Ng=864e5,Pg=class{_evictionGeneration=new Map;_toolIndex;_toolOutputValidatorIndex;_serverIdentity=``;constructor(e,t,n=()=>{},r=``,i=Date.now){this._store=e,this._isUserSupplied=t,this._reportError=n,this._cachePartition=r,this._now=i}now(){return this._now()}setServerIdentity(e){this._serverIdentity=e}_partitionFor(e){return JSON.stringify([this._serverIdentity,e===`public`?``:this._cachePartition])}async _probe(e,t){let n={method:e,params:t??``},r=this._partitionFor(`private`),i=await this._store.get({...n,partition:r});if(i!==void 0)return i;let a=this._partitionFor(`public`);if(a===r)return;let o=await this._store.get({...n,partition:a});return o?.scope===`public`?o:void 0}async evict(e){this._evictionGeneration.set(e,(this._evictionGeneration.get(e)??0)+1),await this._deleteBoth(e,``)}async _deleteBoth(e,t){let n=this._partitionFor(`private`),r=this._partitionFor(`public`);try{await this._store.delete({method:e,params:t,partition:n})}catch(e){this._reportError(e)}if(r!==n)try{await this._store.delete({method:e,params:t,partition:r})}catch(e){this._reportError(e)}}async evictKey(e,t){let n=Mg(e,t),r=this._evictionGeneration.get(n);r!==void 0&&this._evictionGeneration.set(n,r+1),await this._deleteBoth(e,t)}captureGeneration(e,t){let n=Mg(e,t),r=this._evictionGeneration.get(n)??0;return this._evictionGeneration.set(n,r),r}async write(e,t,n,r){if((this._evictionGeneration.get(Mg(e,r?.params))??0)!==n)return;let i=r?.params??``,a=this._partitionFor(`private`),o=this._partitionFor(`public`),s=(r?.scope??`private`)===`public`?o:a;try{await this._store.set({method:e,params:i,partition:s},{value:Fg(t),expiresAt:r?.expiresAt,scope:r?.scope})}catch(e){this._reportError(e)}if(o!==a)try{await this._store.delete({method:e,params:i,partition:s===a?o:a})}catch(e){this._reportError(e)}}async read(e,t){let n=await this._probe(e,t);if(!(n?.expiresAt===void 0||!(n.expiresAt>this.now())))try{let e=JSON.parse(n.value);if(typeof e!=`object`||!e||Array.isArray(e))throw TypeError(`cached document is not an object`);return{value:e}}catch(n){this._reportError(n),await this._deleteBoth(e,t??``);return}}resetForReconnect(){this._isUserSupplied||this._store.clear(),this._evictionGeneration.clear(),this._toolIndex=void 0,this._toolOutputValidatorIndex=void 0,this._serverIdentity=``}async toolDefinition(e){let t=await this._probe(`tools/list`);if(t===void 0){this._toolIndex=void 0;return}if(this._toolIndex?.stamp!==t.stamp){let e=this._decodeListTools(t),n=new Map;if(e!==void 0)for(let t of e.tools)n.set(t.name,t);this._toolIndex={stamp:t.stamp,byName:n}}return this._toolIndex.byName.get(e)}async outputValidator(e,t){let n=await this._probe(`tools/list`);if(n===void 0){this._toolOutputValidatorIndex=void 0;return}if(this._toolOutputValidatorIndex?.stamp!==n.stamp){let e=this._decodeListTools(n)??{tools:[]},r=new Map;for(let n of e.tools){let e=t(n);e!==void 0&&r.set(n.name,e)}this._toolOutputValidatorIndex={stamp:n.stamp,byName:r}}return this._toolOutputValidatorIndex.byName.get(e)}_decodeListTools(e){try{let t=JSON.parse(e.value);if(!Array.isArray(t?.tools)||!t.tools.every(e=>typeof e==`object`&&!!e))throw TypeError(`cached tools/list document has a malformed tools array`);return t}catch(e){this._reportError(e);return}}};function Fg(e){let t;try{t=JSON.stringify(e)}catch(e){throw TypeError(`cache value is not JSON-serializable: ${e instanceof Error?e.message:String(e)}`)}if(typeof t!=`string`)throw TypeError(`cache value is not JSON-serializable: it has no JSON representation`);return t}var Ig=Symbol.for(`mcp.authSeamEscape`);function Lg(e){return(typeof e==`object`&&!!e||typeof e==`function`)&&e[Ig]===!0}var Rg=-32022,zg=new Set([-32001,-32020,-32021]);function Bg(e,t){switch(e.kind){case`result`:return Vg(e.result,t);case`rpc-error`:return Hg(e,t);case`http-error`:return Ug(e,t);case`network-error`:return Wg(e.error,t);case`unusable-reply`:return{kind:`error`,error:new Y(J.EraNegotiationFailed,`Version negotiation probe failed: the server answered with an unusable reply (${Kg(e.error)})`,{cause:e.error},{cause:e.error})};case`auth-required`:return{kind:`error`,error:e.error};case`closed`:return t.transportKind===`stdio`?{kind:`legacy`}:Wg(Error(`Connection closed during the version negotiation probe`),t);case`timeout`:return t.transportKind===`stdio`?{kind:`legacy`}:{kind:`error`,error:new Y(J.RequestTimeout,`Version negotiation probe timed out after ${e.timeoutMs}ms`,{timeout:e.timeoutMs})}}}function Vg(e,t){let n=cm(sm).validateResult(`server/discover`,e);if(!n.ok)return{kind:`legacy`};let r=n.value.supportedVersions,i=t.clientModernVersions.find(e=>r.includes(e));return i===void 0?t.fallbackAvailable?{kind:`legacy`}:{kind:`error`,error:new Dp({supported:[...r],requested:t.requestedVersion})}:{kind:`modern`,version:i,discover:n.value}}function Hg(e,t){let{code:n,message:r,data:i}=e;if(n===Rg){let e=qg(i);if(e===void 0)return{kind:`legacy`};let n=new Dp({supported:e,requested:Jg(i)??t.requestedVersion},r),a=Vf(e),o=t.clientModernVersions.find(e=>a.includes(e));return o===void 0?a.length>0?{kind:`error`,error:n}:t.fallbackAvailable?{kind:`legacy`}:{kind:`error`,error:n}:{kind:`corrective`,version:o,error:n}}return zg.has(n),{kind:`legacy`}}function Ug(e,t){if(e.status===401||e.status===403){let t=e.status===403;return{kind:`error`,error:new If(t?J.ClientHttpForbidden:J.ClientHttpAuthentication,`Version negotiation failed: ${t?`the server denied access (HTTP 403)`:`the server requires authorization (HTTP 401)`}`,{status:e.status,statusText:e.statusText,text:e.body})}}if(e.status>=500)return{kind:`error`,error:new If(J.EraNegotiationFailed,`Version negotiation failed: the server answered the probe with HTTP ${e.status}`,{status:e.status,statusText:e.statusText,text:e.body})};let n=Yg(e.body);return n===void 0?{kind:`legacy`}:Hg(n,t)}function Wg(e,t){return t.environment===`browser`&&Gg(e)?{kind:`legacy`}:{kind:`error`,error:new Y(J.EraNegotiationFailed,`Version negotiation probe failed: ${Kg(e)}`,{cause:e},{cause:e})}}function Gg(e){return e instanceof TypeError||e instanceof Error&&e.name===`TypeError`}function Kg(e){return e instanceof Error?e.message:String(e)}function qg(e){if(typeof e!=`object`||!e)return;let t=e.supported;if(!(!Array.isArray(t)||t.length===0||!t.every(e=>typeof e==`string`)))return t}function Jg(e){if(typeof e!=`object`||!e)return;let t=e.requested;return typeof t==`string`?t:void 0}function Yg(e){if(e===void 0||e===``)return;let t;try{t=JSON.parse(e)}catch{return}if(typeof t!=`object`||!t)return;let n=t.error;if(typeof n!=`object`||!n)return;let{code:r,message:i,data:a}=n;if(typeof r==`number`)return{code:r,message:typeof i==`string`?i:``,data:a}}var Xg=`legacy`;function Zg(e,t){let n=e?.mode??Xg;if(n===`legacy`)return{kind:`legacy`};let r=e?.probe??{};if(typeof n==`object`){if(!zf(n.pin))throw TypeError(`versionNegotiation: { pin: \'${n.pin}\' } is not a modern protocol revision \u2014 pinning is for 2026-07-28 and later; omit versionNegotiation (or use mode: \'legacy\') for 2025-era servers.`);return{kind:`pin`,version:n.pin,probe:r}}let i=t?Vf(t):[];return{kind:`auto`,modernVersions:i.length>0?i:[...Rf],fallbackAvailable:!t||Bf(t).length>0,probe:r}}function Qg(){let e=globalThis;return e.window!==void 0&&e.document!==void 0?`browser`:`node`}function $g(e){return`stderr`in e&&`pid`in e?`stdio`:`http`}var e_=class e{_pending;_probeCounter=0;_savedOnMessage;_savedOnError;_savedOnClose;_closeDelivered=!1;constructor(e){this._transport=e,this._savedOnMessage=e.onmessage,this._savedOnError=e.onerror,this._savedOnClose=e.onclose}static async open(t){let n=new e(t);t.onmessage=e=>{let t=n._pending;if(t!==void 0&&(_m(e)||vm(e))&&e.id===t.id){n._pending=void 0,_m(e)?t.resolve({kind:`response`,result:e.result}):t.resolve({kind:`response`,error:e.error});return}},t.onerror=e=>{n._savedOnError?.(e)},t.onclose=()=>{let e=n._pending;e!==void 0&&(n._pending=void 0,e.resolve({kind:`closed`})),n._closeDelivered=!0,n._savedOnClose?.()};try{await t.start()}catch(e){throw n.detach(),e}return n}async exchange(e,t){let n=`server-discover-probe-${++this._probeCounter}`;return new Promise(r=>{let i=!1,a=e=>{i||(i=!0,clearTimeout(o),this._pending?.id===n&&(this._pending=void 0),r(e))},o=setTimeout(()=>a({kind:`timeout`}),t);this._pending={id:n,resolve:a},this._transport.send(e(n)).catch(e=>a({kind:`send-error`,error:e}))})}detach(){if(this._pending=void 0,this._transport.onmessage=this._savedOnMessage,this._transport.onerror=this._savedOnError,this._closeDelivered&&this._savedOnClose!==void 0){let e=this._savedOnClose,t=this._transport,n=!1,r=()=>{if(!n){n=!0;return}e()};t.onclose=r,t_.set(t,()=>{t.onclose===r&&(t.onclose=e)})}else this._transport.onclose=this._savedOnClose}release(){this.detach();let e=this._transport,t=e.start,n=!0;e.start=async function(){if(n){n=!1,e.start=t;return}return t.call(e)}}},t_=new WeakMap;function n_(e){let t=t_.get(e);t_.delete(e),t?.()}function r_(e,t,n,r){return{jsonrpc:`2.0`,id:e,method:`server/discover`,params:{_meta:cm(t).outboundEnvelope({protocolVersion:t,clientInfo:n,clientCapabilities:r})}}}function i_(e){return e instanceof Y&&e.code===J.ClientHttpUnexpectedContent||e instanceof Error&&e.name===`SyntaxError`}function a_(e,t){switch(e.kind){case`response`:return e.error===void 0?{kind:`result`,result:e.result}:{kind:`rpc-error`,...e.error};case`send-error`:{let t=e.error;if(Lg(t)||t instanceof Og||t instanceof Error&&t.name===`UnauthorizedError`)return{kind:`auth-required`,error:t};if(t instanceof If){let e=t.data?.text;return{kind:`http-error`,status:t.data.status,body:typeof e==`string`?e:void 0,statusText:t.data.statusText}}return i_(t)?{kind:`unusable-reply`,error:t}:{kind:`network-error`,error:t}}case`closed`:return{kind:`closed`};case`timeout`:return{kind:`timeout`,timeoutMs:t}}}async function o_(e,t){let n=e.probe.timeoutMs??t.defaultTimeoutMs,r=Math.max(0,e.probe.maxRetries??0),i=e.kind===`pin`?[e.version]:e.modernVersions,a=e.kind===`auto`&&e.fallbackAvailable,o=await e_.open(t.transport),s=async()=>{let s=i[0],c=!1,l=r;for(;;){let r=await o.exchange(e=>r_(e,s,t.clientInfo,t.capabilities),n);if(r.kind===`timeout`&&l>0){l--;continue}let u=a_(r,n),d=Bg(u,{clientModernVersions:i,requestedVersion:s,fallbackAvailable:a,environment:t.environment,transportKind:t.transportKind});switch(d.kind){case`modern`:return{era:`modern`,version:d.version,discover:d.discover};case`corrective`:if(c)throw d.error;c=!0,s=d.version;continue;case`legacy`:{let n=u.kind===`closed`?`the connection closed during the server/discover probe`:void 0;if(e.kind===`pin`)throw new Y(J.EraNegotiationFailed,n===void 0?`Version negotiation failed: the server did not offer pinned protocol version ${e.version} via server/discover (no fallback in pin mode)`:`Version negotiation failed: ${n} before the server offered pinned protocol version ${e.version} (no fallback in pin mode)`);if(!e.fallbackAvailable)throw new Y(J.EraNegotiationFailed,n===void 0?`Version negotiation failed: the server gave no modern evidence and this client supports no pre-2026-07-28 protocol version to fall back to`:`Version negotiation failed: ${n} and this client supports no pre-2026-07-28 protocol version to fall back to`);if(n!==void 0&&t.disposableProbe!==!0)throw new Y(J.EraNegotiationFailed,`Version negotiation failed: ${n} (this transport probed in place \u2014 the disposable sibling probe requires the SDK\'s base StdioClientTransport)`);return{era:`legacy`}}case`error`:throw d.error}}},c;try{c=await s()}catch(e){throw o.detach(),e}return o.release(),c}function s_(e){let t=Object.getPrototypeOf(e);if(t===null||!Object.prototype.hasOwnProperty.call(t,`_dispose`))return;let n=e._serverParams;return typeof n==`object`&&n&&typeof n.command==`string`?n:void 0}async function c_(e,t,n,r){let i=t.constructor,a=new i({...n,stderr:`ignore`}),o=t.close,s=!1,c,l=new Promise((e,t)=>{c=()=>t(l_())});t.close=async function(){return s=!0,c?.(),o.call(t)};let u;try{let t=o_(e,{...r,transport:a,transportKind:`stdio`,disposableProbe:!0});t.catch(()=>{}),u=await Promise.race([t,l])}finally{await u_(a),t.close=o}if(s)throw l_();return u}function l_(){return new Y(J.EraNegotiationFailed,`Version negotiation failed: the transport was closed during the server/discover probe`)}async function u_(e){try{let t=e._dispose;await(typeof t==`function`?t.call(e):e.close())}catch{}}function d_(e){let t=e._meta?.[dl];return wh.Implementation(t)?t:void 0}function f_(e,t){if(!(!e||typeof t!=`object`||!t)){if(e.type===`object`&&e.properties&&typeof e.properties==`object`){let n=t,r=e.properties;for(let e of Object.keys(r)){let t=r[e];n[e]===void 0&&Object.prototype.hasOwnProperty.call(t,`default`)&&(n[e]=t.default),n[e]!==void 0&&f_(t,n[e])}}if(Array.isArray(e.anyOf))for(let n of e.anyOf)typeof n!=`boolean`&&f_(n,t);if(Array.isArray(e.oneOf))for(let n of e.oneOf)typeof n!=`boolean`&&f_(n,t)}}function p_(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};let t=e.form!==void 0,n=e.url!==void 0;return{supportsFormMode:t||!t&&!n,supportsUrlMode:n}}function m_(e){if(typeof e==`object`&&e&&(e.kind===`legacy`&&!(`supportedVersions`in e)&&!(`discover`in e)||e.kind===`modern`&&Zl.safeParse(e.discover).success))return e;throw new Y(J.EraNegotiationFailed,`connect({ prior }): unrecognized prior \u2014 expected { kind: \'modern\', discover } or { kind: \'legacy\' }`)}var h_={"notifications/tools/list_changed":[`tools/list`],"notifications/prompts/list_changed":[`prompts/list`],"notifications/resources/list_changed":[`resources/list`,`resources/templates/list`]},g_=64,__={};(class extends Mh{_serverCapabilities;_serverVersion;_capabilities;_instructions;_jsonSchemaValidator;_cache;_defaultCacheTtlMs;_listMaxPages;_listChangedDebounceTimers=new Map;_listChangedConfig;_enforceStrictCapabilities;_versionNegotiation;_supportedProtocolVersionsOption;_inputRequiredDriverConfig;_listenState=new Map;_nextListenId=0;_autoOpenedSubscription;_discoverResult;static{__.enforceStrictCapabilities=e=>e._enforceStrictCapabilities,__.walkPages=(e,t,n,r)=>e._walkPages(t,n,r),__.readResource=(e,t,n)=>e._readResource(t,n)}_resetConnectionState(){if(this._negotiatedProtocolVersion=void 0,this._serverCapabilities=void 0,this._serverVersion=void 0,this._instructions=void 0,this._discoverResult=void 0,this._autoOpenedSubscription=void 0,this._listenState.size>0){let e=new Y(J.ConnectionClosed,`subscriptions/listen: client reconnected or closed; subscription state from the previous connection was reset`);for(let t of this._listenState.values())t.settle({cause:`remote`,error:e})}this._listenState.clear();for(let e of this._listChangedDebounceTimers.values())clearTimeout(e);this._listChangedDebounceTimers.clear(),this._cache.resetForReconnect()}async close(){try{await super.close()}finally{this._resetConnectionState()}}constructor(e,t){super(t),this._clientInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._jsonSchemaValidator=t?.jsonSchemaValidator??new Eg,this._enforceStrictCapabilities=t?.enforceStrictCapabilities??!1,this._versionNegotiation=t?.versionNegotiation,this._supportedProtocolVersionsOption=t?.supportedProtocolVersions,this._inputRequiredDriverConfig=ph(t?.inputRequired),this._cache=new Pg(t?.responseCacheStore??new Ag,t?.responseCacheStore!==void 0,e=>this._reportStoreError(e),t?.cachePartition??``),this._defaultCacheTtlMs=t?.defaultCacheTtlMs??0,this._listMaxPages=t?.listMaxPages??g_,t?.listChanged&&(this._listChangedConfig=t.listChanged)}buildContext(e,t){return e}_shouldDropInbound(e){if(this._negotiatedProtocolVersion!==void 0&&zf(this._negotiatedProtocolVersion)&&hm(e))return`drop`}_outboundMetaEnvelope(){let e=this._negotiatedProtocolVersion;if(e!==void 0)return this._wireCodec().outboundEnvelope({protocolVersion:e,clientInfo:this._clientInfo,clientCapabilities:this._capabilities})}_resolveNonCompleteResult(e,t){return this._inputRequiredDriverConfig.autoFulfill?Vh({getRequestHandler:e=>this._getRequestHandler(e),buildContext:e=>this.buildContext(e,void 0),sessionId:this.transport?.sessionId},this._inputRequiredDriverConfig,e,t):Promise.reject(new Y(J.UnsupportedResultType,`Unsupported result type \'input_required\' for ${t.request.method}: multi-round-trip auto-fulfilment is not enabled on this instance \u2014 pass allowInputRequired: true to handle it manually, or enable inputRequired.autoFulfill`,{resultType:`input_required`,method:t.request.method}))}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler(`tools`,`notifications/tools/list_changed`,e.tools,async()=>(await this.listTools(void 0,{cacheMode:`refresh`})).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler(`prompts`,`notifications/prompts/list_changed`,e.prompts,async()=>(await this.listPrompts(void 0,{cacheMode:`refresh`})).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler(`resources`,`notifications/resources/list_changed`,e.resources,async()=>(await this.listResources(void 0,{cacheMode:`refresh`})).resources)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after connecting to transport`);this._capabilities=Ph(this._capabilities,e)}setVersionNegotiation(e){if(this.transport)throw Error(`Cannot configure version negotiation after connecting to transport`);this._versionNegotiation=e}_wrapHandler(e,t){return e===`elicitation/create`?async(e,n)=>{let r=cm(this._negotiatedProtocolVersion),i=r.validateRequest(`elicitation/create`,e);if(!i.ok&&i.reason===`not-in-era`&&(i=r.validateInputRequest(`elicitation/create`,e)),!i.ok)throw new Z(i.reason===`not-in-era`?X.InternalError:X.InvalidParams,i.reason===`not-in-era`?`No wire schema for elicitation/create in the resolved era`:`Invalid elicitation request: ${i.message}`);let{params:a}=i.value;a.mode=a.mode??`form`;let{supportsFormMode:o,supportsUrlMode:s}=p_(this._capabilities.elicitation);if(a.mode===`form`&&!o)throw new Z(X.InvalidParams,`Client does not support form-mode elicitation requests`);if(a.mode===`url`&&!s)throw new Z(X.InvalidParams,`Client does not support URL-mode elicitation requests`);let c=await t(e,n),l=r.validateResult(`elicitation/create`,c);if(!l.ok&&l.reason===`not-in-era`&&(l=r.validateInputResponse(`elicitation/create`,c)),!l.ok)throw new Z(l.reason===`not-in-era`?X.InternalError:X.InvalidParams,l.reason===`not-in-era`?`No wire schema for elicitation/create in the resolved era`:`Invalid elicitation result: ${l.message}`);let u=l.value,d=a.mode===`form`?a.requestedSchema:void 0;if(a.mode===`form`&&u.action===`accept`&&u.content&&d&&this._capabilities.elicitation?.form?.applyDefaults)try{f_(d,u.content)}catch{}return u}:e===`sampling/createMessage`?async(e,n)=>{let r=cm(this._negotiatedProtocolVersion),i=r.validateRequest(`sampling/createMessage`,e);if(!i.ok&&i.reason===`not-in-era`&&(i=r.validateInputRequest(`sampling/createMessage`,e)),!i.ok)throw new Z(i.reason===`not-in-era`?X.InternalError:X.InvalidParams,i.reason===`not-in-era`?`No wire schema for sampling/createMessage in the resolved era`:`Invalid sampling request: ${i.message}`);let{params:a}=i.value,o=await t(e,n),s=!!(a.tools||a.toolChoice),c=r.samplingResultVariant(s,o);if(!c.ok&&c.reason===`not-in-era`&&(c=r.validateInputResponse(`sampling/createMessage`,o)),!c.ok)throw new Z(c.reason===`not-in-era`?X.InternalError:X.InvalidParams,c.reason===`not-in-era`?`No result schema for sampling/createMessage in the resolved era`:`Invalid sampling result: ${c.message}`);return c.value}:t}assertCapability(e,t){if(!this._serverCapabilities?.[e])throw new Y(J.CapabilityNotSupported,`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(t?.prior!=null)return this._connectFromPrior(e,m_(t.prior),t);let n=Zg(this._versionNegotiation,this._supportedProtocolVersionsOption);return n.kind===`legacy`?this._connectPlainLegacy(e,t):this._connectNegotiated(e,n,t)}async _connectPlainLegacy(e,t){if(await super.connect(e),e.sessionId!==void 0){let t=this._negotiatedProtocolVersion;t!==void 0&&e.setProtocolVersion?.(t);return}this._resetConnectionState(),await this._legacyHandshake(e,t)}async _legacyHandshake(e,t){let n=Bf(this._supportedProtocolVersions);try{let r=n[0];if(r===void 0)throw new Y(J.EraNegotiationFailed,`Cannot run the initialize handshake: supportedProtocolVersions contains no pre-2026-07-28 protocol version`);let i=await this.request({method:`initialize`,params:{protocolVersion:r,capabilities:this._capabilities,clientInfo:this._clientInfo}},t);if(i===void 0)throw Error(`Server sent invalid initialize result: ${i}`);if(!n.includes(i.protocolVersion))throw Error(`Server\'s protocol version is not supported: ${i.protocolVersion}`);this._serverCapabilities=i.capabilities,this._serverVersion=i.serverInfo,this._cache.setServerIdentity(this._deriveServerIdentity(e)),e.setProtocolVersion&&e.setProtocolVersion(i.protocolVersion),this._instructions=i.instructions,await this.notification({method:`notifications/initialized`}),this._negotiatedProtocolVersion=i.protocolVersion,this._listChangedConfig&&this._setupListChangedHandlers(this._listChangedConfig)}catch(e){throw this.close(),e}}async _connectNegotiated(e,t,n){if(e.sessionId!==void 0){await super.connect(e);let t=this._negotiatedProtocolVersion;t!==void 0&&e.setProtocolVersion&&e.setProtocolVersion(t);return}this._resetConnectionState();let r;try{let i=$g(e),a={clientInfo:this._clientInfo,capabilities:this._capabilities,environment:Qg(),defaultTimeoutMs:n?.timeout??6e4},o=i===`stdio`?s_(e):void 0;r=o===void 0?await o_(t,{...a,transport:e,transportKind:i}):await c_(t,e,o,a)}catch(t){throw await e.close().catch(()=>{}),n_(e),t}if(n_(e),await super.connect(e),r.era===`legacy`){await this._legacyHandshake(e,n);return}if(this._serverCapabilities=r.discover.capabilities,this._serverVersion=d_(r.discover),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=r.discover.instructions,this._discoverResult=r.discover,this._negotiatedProtocolVersion=r.version,e.setProtocolVersion&&e.setProtocolVersion(r.version),this._listChangedConfig){let e=this._listChangedConfig,t=this._serverCapabilities,r={...e.tools&&t?.tools?.listChanged&&{tools:e.tools},...e.prompts&&t?.prompts?.listChanged&&{prompts:e.prompts},...e.resources&&t?.resources?.listChanged&&{resources:e.resources}},i=!0;try{this._setupListChangedHandlers(r)}catch(e){i=!1,this.onerror?.(e instanceof Error?e:Error(String(e)))}let a=i?{...r.tools&&{toolsListChanged:!0},...r.prompts&&{promptsListChanged:!0},...r.resources&&{resourcesListChanged:!0}}:{};if(Object.keys(a).length>0){let e=new AbortController,t=()=>e.abort(n?.signal?.reason);n?.signal?.aborted&&t(),n?.signal?.addEventListener(`abort`,t);try{this._autoOpenedSubscription=await this.listen(a,{timeout:n?.timeout,signal:e.signal})}catch(e){if(n?.signal?.aborted)throw await this.close().catch(()=>{}),e;this.onerror?.(e instanceof Error?e:Error(String(e)))}finally{n?.signal?.removeEventListener(`abort`,t)}}}}async _connectFromPrior(e,t,n){if(t.kind===`legacy`)return this._connectPlainLegacy(e,n);let r=t.discover;this._resetConnectionState();let i=this._supportedProtocolVersionsOption,a=(i&&Vf(i).length>0?Vf(i):Rf).find(e=>r.supportedVersions.includes(e));if(a===void 0)throw new Y(J.EraNegotiationFailed,`connect({ prior }) with a modern verdict requires a 2026-07-28+ mutual protocol version; the supplied DiscoverResult and this client\'s supportedProtocolVersions have no modern overlap. For a server known to be legacy, pass prior: { kind: \'legacy\' } to skip the probe and initialize directly, or use versionNegotiation: { mode: \'auto\' } to re-probe with legacy fallback.`);if(await super.connect(e),this._discoverResult=r,this._serverCapabilities=r.capabilities,this._serverVersion=d_(r),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=r.instructions,this._negotiatedProtocolVersion=a,e.setProtocolVersion?.(a),this._listChangedConfig)try{this._setupListChangedHandlers(this._listChangedConfig)}catch(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}_deriveServerIdentity(e){let t=this._serverVersion;return t===void 0?e.sessionId??`anonymous:${Date.now()}-${Math.random().toString(36).slice(2)}`:`${t.name}@${t.version}`}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}getProtocolEra(){let e=this._negotiatedProtocolVersion;if(e!==void 0)return zf(e)?`modern`:`legacy`}getInstructions(){return this._instructions}getDiscoverResult(){return this._discoverResult}assertCapabilityForMethod(e){switch(e){case`logging/setLevel`:if(!this._serverCapabilities?.logging)throw new Y(J.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case`prompts/get`:case`prompts/list`:if(!this._serverCapabilities?.prompts)throw new Y(J.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case`resources/list`:case`resources/templates/list`:case`resources/read`:case`resources/subscribe`:case`resources/unsubscribe`:if(!this._serverCapabilities?.resources)throw new Y(J.CapabilityNotSupported,`Server does not support resources (required for ${e})`);if(e===`resources/subscribe`&&!this._serverCapabilities.resources.subscribe)throw new Y(J.CapabilityNotSupported,`Server does not support resource subscriptions (required for ${e})`);break;case`tools/call`:case`tools/list`:if(!this._serverCapabilities?.tools)throw new Y(J.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;case`completion/complete`:if(!this._serverCapabilities?.completions)throw new Y(J.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case`initialize`:break;case`server/discover`:break;case`ping`:break}}assertNotificationCapability(e){switch(e){case`notifications/roots/list_changed`:if(!this._capabilities.roots?.listChanged)throw new Y(J.CapabilityNotSupported,`Client does not support roots list changed notifications (required for ${e})`);break;case`notifications/initialized`:break;case`notifications/cancelled`:break;case`notifications/progress`:break}}assertRequestHandlerCapability(e){switch(e){case`sampling/createMessage`:if(!this._capabilities.sampling)throw new Y(J.CapabilityNotSupported,`Client does not support sampling capability (required for ${e})`);break;case`elicitation/create`:if(!this._capabilities.elicitation)throw new Y(J.CapabilityNotSupported,`Client does not support elicitation capability (required for ${e})`);break;case`roots/list`:if(!this._capabilities.roots)throw new Y(J.CapabilityNotSupported,`Client does not support roots capability (required for ${e})`);break;case`ping`:break}}async ping(e){return this.request({method:`ping`},e)}async discover(e){let t=await this._requestWithSchema({method:`server/discover`},Zl,e);return this._discoverResult=t,t}async complete(e,t){return this.request({method:`completion/complete`,params:e},t)}async setLoggingLevel(e,t){return this.request({method:`logging/setLevel`,params:{level:e}},t)}async getPrompt(e,t){return this.request({method:`prompts/get`,params:e},t)}async listPrompts(e,t){if(!this._serverCapabilities?.prompts&&!this._enforceStrictCapabilities)return console.debug(`Client.listPrompts() called but server does not advertise prompts capability - returning empty list`),{prompts:[]};if(e?.cursor!==void 0)return this.request({method:`prompts/list`,params:e},t);let n=await this._serveFromCache(`prompts/list`,void 0,t);return n===void 0?this._listAllPages(`prompts/list`,e,t,e=>e.prompts):n}async listResources(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug(`Client.listResources() called but server does not advertise resources capability - returning empty list`),{resources:[]};if(e?.cursor!==void 0)return this.request({method:`resources/list`,params:e},t);let n=await this._serveFromCache(`resources/list`,void 0,t);return n===void 0?this._listAllPages(`resources/list`,e,t,e=>e.resources):n}async listResourceTemplates(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug(`Client.listResourceTemplates() called but server does not advertise resources capability - returning empty list`),{resourceTemplates:[]};if(e?.cursor!==void 0)return this.request({method:`resources/templates/list`,params:e},t);let n=await this._serveFromCache(`resources/templates/list`,void 0,t);return n===void 0?this._listAllPages(`resources/templates/list`,e,t,e=>e.resourceTemplates):n}async _listAllPages(e,t,n,r,i){let a=n?.cacheMode===`bypass`,o=this._cache.captureGeneration(e),s=await this._walkPages(e,r=>{let i=r===void 0?t&&{...t}:{...t,cursor:r};return this.request({method:e,...i&&{params:i}},n)},r);return delete s.nextCursor,i?.(s),a||await this._cache.write(e,s,o,this._freshness(s)),s}async _walkPages(e,t,n){let r=await t(void 0),i=r.nextCursor,a=r,o=1;for(;i!==void 0;){if(this._listMaxPages!==0&&o>=this._listMaxPages)throw new Y(J.ListPaginationExceeded,`${e}: exceeded listMaxPages (${this._listMaxPages}); server pagination did not terminate`,{method:e,listMaxPages:this._listMaxPages});let s=await t(i);if(s.nextCursor===i&&JSON.stringify(n(s))===JSON.stringify(n(a)))break;n(r).push(...n(s)),a=s,i=s.nextCursor,o++}return r}_freshness(e,t){let n=e,r=typeof n.ttlMs==`number`?n.ttlMs:this._defaultCacheTtlMs,i=n.cacheScope===`public`?`public`:`private`;return{expiresAt:this._cache.now()+Math.min(Math.max(0,r),Ng),scope:i,params:t}}async _serveFromCache(e,t,n){if(n?.cacheMode===`bypass`||n?.cacheMode===`refresh`)return;let r=await this._cache.read(e,t).catch(e=>void this._reportStoreError(e));if(r!==void 0){if(n?.signal?.aborted){let e=n.signal.reason;throw e instanceof Y?e:new Y(J.RequestTimeout,String(e))}return r.value}}_reportStoreError(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}_compileOutputValidator(e){if(e.outputSchema)try{return{ok:!0,validator:this._jsonSchemaValidator.getValidator(e.outputSchema)}}catch(e){return{ok:!1,compileError:e}}}async _resolveXMcpHeaderScan(e,t){let n=t??await this._cache.toolDefinition(e);return n===void 0?void 0:wm(n.inputSchema)}async readResource(e,t){let{result:n}=await this._readResource(e,t);return n}async _readResource(e,t){let n=await this._serveFromCache(`resources/read`,e.uri,t);if(n!==void 0)return{result:n,cached:!0};let r=this._cache.captureGeneration(`resources/read`,e.uri),i=await this.request({method:`resources/read`,params:e},t);if(t?.cacheMode!==`bypass`){let n=this._freshness(i,e.uri);n.expiresAt>this._cache.now()?await this._cache.write(`resources/read`,i,r,n):t?.cacheMode===`refresh`&&await this._cache.evictKey(`resources/read`,e.uri)}return{result:i,cached:!1}}async subscribeResource(e,t){return this.request({method:`resources/subscribe`,params:e},t)}async unsubscribeResource(e,t){return this.request({method:`resources/unsubscribe`,params:e},t)}async listen(e,t){if(this.transport===void 0)throw new Y(J.NotConnected,`Not connected`);let n=this._negotiatedProtocolVersion;if(n===void 0||!zf(n))throw new Y(J.MethodNotSupportedByProtocolVersion,`subscriptions/listen requires a 2026-07-28-era connection (negotiated: ${n??`none`}). On a 2025-era connection, change notifications are delivered unsolicited: use ClientOptions.listChanged and resources/subscribe instead.`,{method:`subscriptions/listen`,protocolVersion:n});if(t?.signal?.aborted){let e=t.signal.reason;throw e instanceof Y?e:new Y(J.RequestTimeout,String(e))}let r=new AbortController,i=`listen:${this._nextListenId++}`,a=`opening`,o,s,c,l,u=new Promise((e,t)=>{c=e,l=t}),d,f=new Promise(e=>{d=e}),p=e=>{if(a===`closed`)return;let n=a===`opening`;if(o!==void 0&&(clearTimeout(o),o=void 0),`ack`in e){a=`open`,c(e.ack);return}a=`closed`,s!==void 0&&t?.signal?.removeEventListener(`abort`,s),this._listenState.delete(i),r.abort(),d(e.cause),n&&l(e.error??new Y(J.ConnectionClosed,`subscriptions/listen closed before the server acknowledged`))},m=async()=>{r.abort(),await this.notification({method:`notifications/cancelled`,params:{requestId:i}}).catch(()=>{})},h=async()=>{a!==`closed`&&(p({cause:`local`}),await m())};this._listenState.set(i,{settle:p});let g=t?.timeout??6e4;if(o=setTimeout(()=>{p({cause:`remote`,error:new Y(J.RequestTimeout,`subscriptions/listen ack timed out`,{timeout:g})}),m().catch(()=>{})},g),t?.signal){let e=t.signal;s=()=>{if(a===`closed`)return;let t=e.reason;p({cause:`local`,error:t instanceof Error?t:Error(String(t??`Aborted`))}),m().catch(()=>{})},e.addEventListener(`abort`,s,{once:!0})}let ee={jsonrpc:`2.0`,id:i,method:`subscriptions/listen`,params:{_meta:{...this._outboundMetaEnvelope()},notifications:e}},te=e=>{p({cause:`remote`,error:e instanceof Error?e:Error(String(e))})};try{this.transport.send(ee,{requestSignal:r.signal,onRequestStreamEnd:()=>p({cause:`remote`,error:Error(`subscriptions/listen: stream ended`)})}).catch(te)}catch(e){te(e)}return{honoredFilter:await u,close:h,closed:f}}get autoOpenedSubscription(){return this._autoOpenedSubscription}_onnotification(e,t){let n=Object.hasOwn(h_,e.method)?h_[e.method]:void 0;if(e.method===`notifications/resources/updated`){let t=e.params?.uri;typeof t==`string`&&this._cache.evictKey(`resources/read`,t)}else if(n!==void 0)for(let e of n)this._cache.evict(e);if(e.method===`notifications/subscriptions/acknowledged`){let t=e.params?._meta?.[pl],n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){let t=this._wireCodec().validateNotification(`notifications/subscriptions/acknowledged`,e);n.settle({ack:t.ok?t.value.params.notifications:{}});return}}if(e.method===`notifications/cancelled`){let t=e.params?.requestId,n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){n.settle({cause:`remote`,error:Error(`subscriptions/listen: server cancelled the subscription`)});return}}super._onnotification(e,t)}_onresponse(e){let t=e.id,n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){vm(e)?n.settle({cause:`remote`,error:Z.fromError(e.error.code,e.error.message,e.error.data)}):n.settle({cause:`graceful`,error:new Y(J.ConnectionClosed,`subscriptions/listen: server closed the subscription gracefully before acknowledging`)});return}super._onresponse(e)}_onclose(){if(this._listenState.size>0){let e=new Y(J.ConnectionClosed,`Connection closed`);for(let t of this._listenState.values())t.settle({cause:`remote`,error:e});this._listenState.clear()}super._onclose()}async callTool(e,t){let n=this.getProtocolEra()===`modern`&&Qg()!==`browser`,r=async()=>{if(!n)return t;let r;try{r=await this._resolveXMcpHeaderScan(e.name,t?.toolDefinition)}catch(e){this._reportStoreError(e)}if(!r?.valid||r.declarations.length===0)return t;let i=Fm(r.declarations,e.arguments);return Object.keys(i).length===0?t:{...t,headers:{...t?.headers,...i}}},i=t?.toolDefinition===void 0?await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)):this._compileOutputValidator(t.toolDefinition),a=()=>{if(i===void 0||i.ok)return;let t=i.compileError,n=(t instanceof Error?t.message:String(t)).slice(0,200);throw new Z(X.InvalidParams,`Tool \'${e.name}\' has an invalid outputSchema: ${n}`)};a();let o;try{o=await this.request({method:`tools/call`,params:e},await r())}catch(s){let c=s instanceof Z&&s.code===-32020;if(!n||!c||t?.toolDefinition!==void 0)throw s;let l={signal:t?.signal,timeout:t?.timeout,cacheMode:`refresh`};await this._cache.evict(`tools/list`),await this.listTools(void 0,l).catch(e=>this._reportStoreError(e)),i=await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)),a(),o=await this.request({method:`tools/call`,params:e},await r())}let s=i!==void 0&&i.ok?i.validator:void 0;if(s){if(o.structuredContent===void 0&&!o.isError)throw new Z(X.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(o.structuredContent!==void 0&&!o.isError)try{let e=s(o.structuredContent);if(!e.valid)throw new Z(X.InvalidParams,`Structured content does not match the tool\'s output schema: ${e.errorMessage}`)}catch(e){throw e instanceof Z?e:new Z(X.InvalidParams,`Failed to validate structured content: ${e instanceof Error?e.message:String(e)}`)}}return o}async listTools(e,t){if(!this._serverCapabilities?.tools&&!this._enforceStrictCapabilities)return console.debug(`Client.listTools() called but server does not advertise tools capability - returning empty list`),{tools:[]};if(e?.cursor!==void 0){let n=await this.request({method:`tools/list`,params:e},t);return this._excludeInvalidXMcpHeaderTools(n),n}let n=await this._serveFromCache(`tools/list`,void 0,t);return n===void 0?this._listAllPages(`tools/list`,e,t,e=>e.tools,e=>this._excludeInvalidXMcpHeaderTools(e)):n}_excludeInvalidXMcpHeaderTools(e){if(this.getProtocolEra()!==`modern`||!this.transport||$g(this.transport)===`stdio`)return;let t=e.tools.filter(e=>{let t=wm(e.inputSchema);return t.valid?!0:(console.warn(`[mcp-sdk] excluding tool \'${e.name}\' from tools/list: invalid x-mcp-header declaration \u2014 ${t.reason}`),!1)});t.length!==e.tools.length&&(e.tools=t)}_setupListChangedHandler(e,t,n,r){let i=Im(sd,n);if(!i.success)throw Error(`Invalid ${e} listChanged options: ${i.error.message}`);if(typeof n.onChanged!=`function`)throw TypeError(`Invalid ${e} listChanged options: onChanged must be a function`);let{autoRefresh:a,debounceMs:o}=i.data,{onChanged:s}=n,c=async()=>{if(!a){s(null,null);return}try{s(null,await r())}catch(e){s(e instanceof Error?e:Error(String(e)),null)}};this.setNotificationHandler(t,()=>{if(o){let t=this._listChangedDebounceTimers.get(e);t&&clearTimeout(t);let n=setTimeout(c,o);this._listChangedDebounceTimers.set(e,n)}else c()})}async sendRootsListChanged(){return this.notification({method:`notifications/roots/list_changed`})}}),class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SseError`})}static[Symbol.hasInstance](e){return Ff(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Ff(this,e)}constructor(e,t,n){super(`SSE error: ${t}`),this.code=e,this.event=n,Pf(this,new.target)}};var v_=class{_eventSlots=new Map;setHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", \u2026) to add multiple listeners without replacing.`),n.onHandler=t}getHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}dispatch(e,t){let n=this._eventSlots.get(e);if(n){n.onHandler?.(t);for(let e of[...n.listeners])e(t)}}_ensureEventSlot(e){let t=this._eventSlots.get(e);return t||(t={listeners:[]},this._eventSlots.set(e,t)),t}},y_=class{_methods=new Set;claim(e,t){if(this._methods.has(e))throw Error(`Handler for "${e}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._methods.add(e)}replace(e){this._methods.add(e)}release(e){this._methods.delete(e)}has(e){return this._methods.has(e)}},b_=new Set;function x_(e,t){let[n,r]=t,i=n?.shape;if(typeof i?.method?.value!=`string`)return;let a=i.method.value,o=e===`request`?`setRequestHandler`:`setNotificationHandler`;b_.has(o)||(b_.add(o),console.warn(`[ext-apps] ${o}(Schema, handler) is deprecated; use ${o}("${a}", { params: Schema.shape.params }, handler).`));let s=r;return[a,{params:i.params},e===`request`?(e,t)=>s({method:a,params:e},S_(t)):e=>s({method:a,params:e})]}function S_(e){return{signal:e.mcpReq.signal,requestId:e.mcpReq.id,sessionId:e.sessionId,_meta:e.mcpReq._meta,sendRequest:e.mcpReq.send,sendNotification:e.mcpReq.notify,authInfo:e.http?.authInfo}}var C_=`2026-01-26`,w_=class{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource){console.debug(`Ignoring message from unknown source`,e);return}let n=Ml.safeParse(e.data);n.success?(console.debug(`Parsed message`,n.data),this.onmessage?.(n.data)):e.data?.jsonrpc===`2.0`?(console.error(`Failed to parse message`,n.error.message,e),this.onerror?.(Error(`Invalid JSON-RPC message received: `+n.error.message))):console.debug(`Ignoring non-JSON-RPC message`,n.error.message,e)}}async start(){window.addEventListener(`message`,this.messageListener)}async send(e,t){e.method!==`ui/notifications/tool-input-partial`&&console.debug(`Sending message`,e),this.eventTarget.postMessage(e,`*`)}async close(){window.removeEventListener(`message`,this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},T_=B([U(`light`),U(`dark`)]).describe(`Color theme preference for the host environment.`),E_=B([U(`inline`),U(`fullscreen`),U(`pip`)]).describe(`Display mode for UI presentation.`),D_=V(B([U(`--color-background-primary`),U(`--color-background-secondary`),U(`--color-background-tertiary`),U(`--color-background-inverse`),U(`--color-background-ghost`),U(`--color-background-info`),U(`--color-background-danger`),U(`--color-background-success`),U(`--color-background-warning`),U(`--color-background-disabled`),U(`--color-text-primary`),U(`--color-text-secondary`),U(`--color-text-tertiary`),U(`--color-text-inverse`),U(`--color-text-ghost`),U(`--color-text-info`),U(`--color-text-danger`),U(`--color-text-success`),U(`--color-text-warning`),U(`--color-text-disabled`),U(`--color-border-primary`),U(`--color-border-secondary`),U(`--color-border-tertiary`),U(`--color-border-inverse`),U(`--color-border-ghost`),U(`--color-border-info`),U(`--color-border-danger`),U(`--color-border-success`),U(`--color-border-warning`),U(`--color-border-disabled`),U(`--color-ring-primary`),U(`--color-ring-secondary`),U(`--color-ring-inverse`),U(`--color-ring-info`),U(`--color-ring-danger`),U(`--color-ring-success`),U(`--color-ring-warning`),U(`--font-sans`),U(`--font-mono`),U(`--font-weight-normal`),U(`--font-weight-medium`),U(`--font-weight-semibold`),U(`--font-weight-bold`),U(`--font-text-xs-size`),U(`--font-text-sm-size`),U(`--font-text-md-size`),U(`--font-text-lg-size`),U(`--font-heading-xs-size`),U(`--font-heading-sm-size`),U(`--font-heading-md-size`),U(`--font-heading-lg-size`),U(`--font-heading-xl-size`),U(`--font-heading-2xl-size`),U(`--font-heading-3xl-size`),U(`--font-text-xs-line-height`),U(`--font-text-sm-line-height`),U(`--font-text-md-line-height`),U(`--font-text-lg-line-height`),U(`--font-heading-xs-line-height`),U(`--font-heading-sm-line-height`),U(`--font-heading-md-line-height`),U(`--font-heading-lg-line-height`),U(`--font-heading-xl-line-height`),U(`--font-heading-2xl-line-height`),U(`--font-heading-3xl-line-height`),U(`--border-radius-xs`),U(`--border-radius-sm`),U(`--border-radius-md`),U(`--border-radius-lg`),U(`--border-radius-xl`),U(`--border-radius-full`),U(`--border-width-regular`),U(`--shadow-hairline`),U(`--shadow-sm`),U(`--shadow-md`),U(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`),B([M(),fc()]).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`)).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`);R({method:U(`ui/open-link`),params:R({url:M().describe(`URL to open in the host\'s browser`)})});var O_=R({isError:F().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),k_=R({isError:F().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),A_=R({isError:F().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough();R({method:U(`ui/notifications/sandbox-proxy-ready`),params:R({})});var j_=R({connectDomains:L(M()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).\n\n- Maps to CSP \\`connect-src\\` directive\n- Empty or omitted \u2192 no network connections (secure default)`),resourceDomains:L(M()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\\n\\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\\n- Wildcard subdomains supported: `https://*.example.com`\\n- Empty or omitted \u2192 no network resources (secure default)"),frameDomains:L(M()).optional().describe("Origins for nested iframes.\\n\\n- Maps to CSP `frame-src` directive\\n- Empty or omitted \u2192 no nested iframes allowed (`frame-src \'none\'`)"),baseUriDomains:L(M()).optional().describe("Allowed base URIs for the document.\\n\\n- Maps to CSP `base-uri` directive\\n- Empty or omitted \u2192 only same origin allowed (`base-uri \'self\'`)")}),M_=R({camera:R({}).optional().describe(`Request camera access.\n\nMaps to Permission Policy \\`camera\\` feature.`),microphone:R({}).optional().describe(`Request microphone access.\n\nMaps to Permission Policy \\`microphone\\` feature.`),geolocation:R({}).optional().describe(`Request geolocation access.\n\nMaps to Permission Policy \\`geolocation\\` feature.`),clipboardWrite:R({}).optional().describe(`Request clipboard write access.\n\nMaps to Permission Policy \\`clipboard-write\\` feature.`)});R({method:U(`ui/notifications/size-changed`),params:R({width:P().optional().describe(`New width in pixels.`),height:P().optional().describe(`New height in pixels.`)})});var N_=R({method:U(`ui/notifications/tool-input`),params:R({arguments:V(M(),I().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),P_=R({method:U(`ui/notifications/tool-input-partial`),params:R({arguments:V(M(),I().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),F_=R({method:U(`ui/notifications/tool-cancelled`),params:R({reason:M().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),I_=R({fonts:M().optional()}),L_=R({variables:D_.optional().describe(`CSS variables for theming the app.`),css:I_.optional().describe(`CSS blocks that apps can inject.`)}),R_=R({method:U(`ui/resource-teardown`),params:R({})}),z_=V(M(),I()),B_=R({text:R({}).optional().describe(`Host supports text content blocks.`),image:R({}).optional().describe(`Host supports image content blocks.`),audio:R({}).optional().describe(`Host supports audio content blocks.`),resource:R({}).optional().describe(`Host supports resource content blocks.`),resourceLink:R({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:R({}).optional().describe(`Host supports structured content.`)});R({method:U(`ui/notifications/request-teardown`),params:R({}).optional()});var V_=R({experimental:V(M(),V(M(),gc()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:R({}).optional().describe(`Host supports opening external URLs.`),downloadFile:R({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:R({listChanged:F().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:R({listChanged:F().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:R({}).optional().describe(`Host accepts log messages.`),sandbox:R({permissions:M_.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:j_.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:B_.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model\'s context for future turns.`),message:B_.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:R({tools:R({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),H_=R({experimental:V(M(),V(M(),gc()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:R({listChanged:F().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:L(E_).optional().describe(`Display modes the app supports.`)});R({method:U(`ui/notifications/initialized`),params:R({}).optional()}),R({csp:j_.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:M_.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:M().optional().describe(`Dedicated origin for view sandbox.\n\nUseful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.\n\n**Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include:\n- Hash-based subdomains (e.g., \\`{hash}.claudemcpcontent.com\\`)\n- URL-derived subdomains (e.g., \\`www-example-com.oaiusercontent.com\\`)\n\nIf omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:F().optional().describe(`Visual boundary preference - true if view prefers a visible border.\n\nBoolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts\' defaults may vary.\n\n- \\`true\\`: request visible border + background\n- \\`false\\`: request no visible border + background\n- omitted: host decides border`)}),R({method:U(`ui/request-display-mode`),params:R({mode:E_.describe(`The display mode being requested.`)})});var U_=R({mode:E_.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough(),W_=B([U(`model`),U(`app`)]).describe(`Tool visibility scope - who can access the tool.`);R({resourceUri:M().optional(),visibility:L(W_).optional().describe(`Who can access this tool. Default: ["model", "app"]\n- "model": Tool visible to and callable by the agent\n- "app": Tool callable by the app from this server only`),csp:yc().optional(),permissions:yc().optional()}),R({mimeTypes:L(M()).optional().describe(\'Array of supported MIME types for UI resources.\\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.\')}),R({method:U(`ui/download-file`),params:R({contents:L(B([Gu,Ku])).describe(`Resource contents to download \u2014 embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),R({method:U(`ui/message`),params:R({role:U(`user`).describe(`Message role, currently only "user" is supported.`),content:L(qu).describe(`Message content blocks (text, image, etc.).`)})}),R({method:U(`ui/notifications/sandbox-resource-ready`),params:R({html:M().describe(`HTML content to load into the inner iframe.`),sandbox:M().optional().describe(`Optional override for the inner iframe\'s sandbox attribute.`),csp:j_.optional().describe(`CSP configuration from resource metadata.`),permissions:M_.optional().describe(`Sandbox permissions from resource metadata.`)})});var G_=R({method:U(`ui/notifications/tool-result`),params:nd.describe(`Standard MCP tool execution result.`)}),K_=R({toolInfo:R({id:Dl.optional().describe(`JSON-RPC id of the tools/call request.`),tool:$u.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:T_.optional().describe(`Current color theme preference.`),styles:L_.optional().describe(`Style configuration for theming the app.`),displayMode:E_.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:L(E_).optional().describe(`Display modes the host supports.`),containerDimensions:B([R({height:P().describe(`Fixed container height in pixels.`)}),R({maxHeight:B([P(),fc()]).optional().describe(`Maximum container height in pixels.`)})]).and(B([R({width:P().describe(`Fixed container width in pixels.`)}),R({maxWidth:B([P(),fc()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other\ncontainer holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:M().optional().describe(`User\'s language and region preference in BCP 47 format.`),timeZone:M().optional().describe(`User\'s timezone in IANA format.`),userAgent:M().optional().describe(`Host application identifier.`),platform:B([U(`web`),U(`desktop`),U(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:R({touch:F().optional().describe(`Whether the device supports touch input.`),hover:F().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:R({top:P().describe(`Top safe area inset in pixels.`),right:P().describe(`Right safe area inset in pixels.`),bottom:P().describe(`Bottom safe area inset in pixels.`),left:P().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),q_=R({method:U(`ui/notifications/host-context-changed`),params:K_.describe(`Partial context update containing only changed fields.`)});R({method:U(`ui/update-model-context`),params:R({content:L(qu).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:V(M(),I().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),R({method:U(`ui/initialize`),params:R({appInfo:Bl.describe(`App identification (name and version).`),appCapabilities:H_.describe(`Features and capabilities this app provides.`),protocolVersion:M().describe(`Protocol version this app supports.`)})});var J_=R({protocolVersion:M().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:Bl.describe(`Host application identification and version.`),hostCapabilities:V_.describe(`Features and capabilities provided by the host.`),hostContext:K_.describe(`Rich context about the host environment.`)}).passthrough(),Y_={target:`draft-2020-12`};async function X_(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](Y_);throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function Z_(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}function Q_(e,t){let n={...e,...t};return t.experimental!==void 0&&(n.experimental={...e.experimental,...t.experimental}),t.tools!==void 0&&(n.tools={...e.tools,...t.tools}),n}var $_=class e extends Mh{_appInfo;_appCapabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_registeredEvents=new Set;_events=new v_;_methods=new y_;setRequestHandler=(...e)=>{let[t,...n]=x_(`request`,e)??e;this._methods.claim(t,`setRequestHandler`),super.setRequestHandler.call(this,t,...n)};setNotificationHandler=(...e)=>{let[t,...n]=x_(`notification`,e)??e;this._methods.claim(t,`setNotificationHandler`),super.setNotificationHandler.call(this,t,...n)};removeRequestHandler=e=>{this._methods.release(e),super.removeRequestHandler(e)};removeNotificationHandler=e=>{this._methods.release(e),super.removeNotificationHandler(e)};replaceRequestHandler=(e,...t)=>{this._methods.replace(e),super.setRequestHandler.call(this,e,...t)};_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:N_,toolinputpartial:P_,toolresult:G_,toolcancelled:F_,hostcontextchanged:q_};static ONE_SHOT_EVENTS=new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]);_everHadListener=new Set;_assertHandlerTiming(t){if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let n=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.setHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.addEventListener(e,t)}removeEventListener(e,t){this._events.removeEventListener(e,t)}_ensureEventSlot(e){if(this._registeredEvents.has(e))return;let t=this.eventSchemas[e];if(!t)throw Error(`Unknown event: ${String(e)}`);this.setNotificationHandler(t.shape.method.value,{params:t.shape.params},t=>{let n=t;e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...n}),this._events.dispatch(e,n)}),this._registeredEvents.add(e)}getEventHandler(e){return this._events.getHandler(e)}warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._appCapabilities=t,this.options=n,this._methods.replace(`notifications/cancelled`),this._methods.replace(`notifications/progress`),!n.allowUnsafeEval&&it({jitless:!0}),this.replaceRequestHandler(`ping`,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}buildContext(e){return e}registerAppCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._appCapabilities=Q_(this._appCapabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._appCapabilities.tools?.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await Z_(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await Z_(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._appCapabilities.tools&&!this.transport&&this.registerAppCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await X_(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await X_(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(`ui/resource-teardown`,{params:R_.shape.params,result:z_},(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(`tools/call`,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(`tools/list`,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){switch(e){case`sampling/createMessage`:if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`);break}}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._appCapabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;default:return}}assertNotificationCapability(e){}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},t)}async createSamplingMessage(e,t){return this._assertInitialized(`createSamplingMessage`),await this.request({method:`sampling/createMessage`,params:e},t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},A_,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},Pl,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},O_,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},k_,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},U_,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new w_(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1;try{await super.connect(e);let n=await this.request({method:`ui/initialize`,params:{appCapabilities:this._appCapabilities,appInfo:this._appInfo,protocolVersion:C_}},J_,t);if(n===void 0)throw Error(`Server sent invalid initialize result: ${n}`);this._hostCapabilities=n.hostCapabilities,this._hostInfo=n.hostInfo,this._hostContext=n.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}},ev=`0.6.0`,tv=.34,nv=6,rv=`orbit-best`,iv=document.querySelector(`main`),av=document.querySelector(`canvas`),$=av.getContext(`2d`),ov=document.querySelector(`#score`),sv=document.querySelector(`#best`),cv=document.querySelector(`#hint`),lv=[...document.querySelectorAll(`.probe`)],uv={foreground:``,muted:``,subtle:``,hazard:``},dv=()=>{let[e,t,n,r]=lv.map(e=>getComputedStyle(e).color);uv={foreground:e,muted:t,subtle:n,hazard:r}},fv=0;try{fv=Number(localStorage.getItem(rv))||0}catch{}var pv=`ready`,mv=-Math.PI/2,hv=1,gv=1,_v=[],vv=0,yv=0,bv=0,xv=0,Sv=()=>Math.min(1.7+yv*.05,4.2);function Cv(){mv=-Math.PI/2,hv=1,gv=1,_v=[],vv=mv+Math.PI,yv=0,xv=0}function wv(){ov.textContent=`${yv}`,sv.textContent=fv?`Best ${fv}`:``,cv.textContent=pv===`ready`?`Tap or press space to start`:pv===`over`?`Tap to go again`:``}function Tv(){pv===`playing`?hv=+!hv:(pv===`ready`||performance.now()-bv>400)&&(Cv(),pv=`playing`,wv())}iv.addEventListener(`pointerdown`,e=>{e.preventDefault(),iv.focus({focusVisible:!1}),Tv()}),iv.addEventListener(`keydown`,e=>{e.key!==` `&&e.key!==`Enter`||(e.preventDefault(),e.repeat||Tv())});function Ev(e,t,n){if(mv+=Sv()*e*(pv===`playing`?1:.5),gv+=(hv-gv)*(1-Math.exp(-e*20)),pv!==`playing`)return;for(;vv<mv+Math.PI*1.25;)_v.push({angle:vv,lane:Math.random()<.5?0:1,passed:!1}),vv+=.95+Math.random()*.75;let r=t[0]+(t[1]-t[0])*gv;for(let e of _v){let i=tv/2+nv/r,a=Math.abs(mv-e.angle)<i,o=Math.abs(r-t[e.lane])<n*.55;if(a&&o){if(pv=`over`,bv=performance.now(),xv=1,yv>fv){fv=yv;try{localStorage.setItem(rv,`${fv}`)}catch{}}wv();return}!e.passed&&e.angle+i<mv&&(e.passed=!0,yv+=1,wv())}_v=_v.filter(e=>e.angle>mv-Math.PI*.6)}function Dv(e){let{width:t,height:n}=av.getBoundingClientRect(),r=devicePixelRatio;av.width!==Math.round(t*r)&&(av.width=Math.round(t*r)),av.height!==Math.round(n*r)&&(av.height=Math.round(n*r)),$.setTransform(r,0,0,r,0,0),$.clearRect(0,0,t,n);let i=t/2,a=n/2,o=Math.min(t,n)*.33,s=o*.2,c=[o-s,o+s];Ev(e,c,s*2),$.lineWidth=1.5,$.strokeStyle=uv.subtle;for(let e of c)$.beginPath(),$.arc(i,a,e,0,Math.PI*2),$.stroke();$.lineWidth=6,$.lineCap=`round`,$.strokeStyle=uv.hazard;for(let e of _v)$.globalAlpha=e.passed?.3:1,$.beginPath(),$.arc(i,a,c[e.lane],e.angle-tv/2,e.angle+tv/2),$.stroke();$.globalAlpha=1;let l=c[0]+(c[1]-c[0])*gv;$.fillStyle=pv===`over`?uv.hazard:uv.foreground,$.beginPath(),$.arc(i+Math.cos(mv)*l,a+Math.sin(mv)*l,nv,0,Math.PI*2),$.fill(),xv>0&&(xv=Math.max(0,xv-e*3),$.globalAlpha=xv*.12,$.fillStyle=uv.hazard,$.fillRect(0,0,t,n),$.globalAlpha=1)}var Ov=performance.now();function kv(e){let t=Math.min((e-Ov)/1e3,1/30);Ov=e,Dv(t),requestAnimationFrame(kv)}var Av=new $_({name:`Orbit`,version:ev}),jv=e=>{(e===`light`||e===`dark`)&&(document.documentElement.style.colorScheme=e),dv()};Av.addEventListener(`hostcontextchanged`,e=>jv(e.theme)),matchMedia(`(prefers-color-scheme: dark)`).addEventListener(`change`,dv),dv(),wv(),requestAnimationFrame(kv),await Av.connect(),jv(Av.getHostContext()?.theme);</script>\n </head>\n <body>\n <main tabindex="0" aria-label="Orbit. Press space or tap to switch rings.">\n <canvas></canvas>\n <p id="score">0</p>\n <p id="best"></p>\n <p id="hint">Tap or press space to start</p>\n </main>\n <i class="probe" style="color: var(--foreground)"></i>\n <i class="probe" style="color: var(--muted)"></i>\n <i class="probe" style="color: var(--subtle)"></i>\n <i class="probe" style="color: var(--hazard)"></i>\n </body>\n</html>\n';var vk="ui://fabio.cv/orbit",yk=e=>{fi(e,"orbit_play",{title:"Play while you wait",description:"Shows Orbit, a small one-button game, in the chat for the reader to play while you work. It returns at once and the game keeps running, so call it first and carry on with the task. Use it only when someone asks for a game, or for something to do while they wait.",annotations:{readOnlyHint:!0,openWorldHint:!1},_meta:{ui:{resourceUri:vk}}},()=>({content:[{type:"text",text:"The reader has a game to play. Carry on with the task."}]})),Pd(e,{uri:vk,name:"Orbit",description:"A one-button game to play while the agent works.",html:gk})};var UC={"component-code":hk,orbit:yk},bk=ak.map(({id:e})=>UC[e]);uk(()=>ik({name:sk.name,version:dk},...bk));
84
84
  /*! Bundled license information: