@mcp-use/inspector 0.9.1 → 0.9.2
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.
- package/dist/client/assets/{browser-BZ1VyPPE.js → browser-BaWfMf0m.js} +20 -20
- package/dist/client/assets/{display-A5IEINAP-BtnnEI1b.js → display-A5IEINAP-C7C5ZEWf.js} +2 -2
- package/dist/client/assets/{embeddings-BL9ejhef.js → embeddings-Cd_IFijr.js} +1 -1
- package/dist/client/assets/index-BDueMm07.js +2 -0
- package/dist/client/assets/index-BaFuUxbj.js +40 -0
- package/dist/client/assets/{index-Chq9-Di8.js → index-BxlzAdRz.js} +1 -1
- package/dist/client/assets/{index-B7YsVTr1.js → index-CejJnjhQ.js} +1 -1
- package/dist/client/assets/{index-DpINZeCw.js → index-D-t8kYzy.js} +1 -1
- package/dist/client/assets/index-DZxMwvFi.js +1683 -0
- package/dist/client/assets/{index-RN7Bwyyp.js → index-Dwx0D9tm.js} +1 -1
- package/dist/client/assets/{index-CKjOo3Yf.js → index-FfhUz5GP.js} +1 -1
- package/dist/client/assets/{winston-FgGR1hHA.js → winston-D_OHtP4E.js} +1 -1
- package/dist/client/index.html +2 -2
- package/package.json +38 -38
- package/dist/client/assets/index-DfkXNide.js +0 -1628
- package/dist/client/assets/index-LHuBhwpA.js +0 -2
- package/dist/client/assets/index-efwGY5fY.js +0 -7
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as ie,H as ge,I as me,J as ye,K as Ce,L as _e,M as Ee,N as ve,a as ae,t as re,P as ce,Q as we,S as Te,U as N,V as Ie,i as Oe,O as Re,W as Se,X as Ae,Y as Ne,Z as U,$ as be}from"./index-Chq9-Di8.js";import"./embeddings-BL9ejhef.js";import"./index-DfkXNide.js";import"./index-DRz5BQNA.js";function E(e){if(typeof e=="object"&&e!==null){const t={...e};"additionalProperties"in t&&delete t.additionalProperties,"$schema"in t&&delete t.$schema,"strict"in t&&delete t.strict;for(const n in t)n in t&&(Array.isArray(t[n])?t[n]=t[n].map(E):typeof t[n]=="object"&&t[n]!==null&&(t[n]=E(t[n])));return t}return e}function x(e){const t=E(ie(e)?ge(e):e),{$schema:n,...o}=t;return o}function xe(e){const t=E(e),{$schema:n,...o}=t;return o}const g=[];for(let e=0;e<256;++e)g.push((e+256).toString(16).slice(1));function Me(e,t=0){return(g[e[t+0]]+g[e[t+1]]+g[e[t+2]]+g[e[t+3]]+"-"+g[e[t+4]]+g[e[t+5]]+"-"+g[e[t+6]]+g[e[t+7]]+"-"+g[e[t+8]]+g[e[t+9]]+"-"+g[e[t+10]]+g[e[t+11]]+g[e[t+12]]+g[e[t+13]]+g[e[t+14]]+g[e[t+15]]).toLowerCase()}let b;const De=new Uint8Array(16);function Ge(){if(!b){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");b=crypto.getRandomValues.bind(crypto)}return b(De)}const Ue=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),k={randomUUID:Ue};function le(e,t,n){if(k.randomUUID&&!e)return k.randomUUID();e=e||{};const o=e.random??e.rng?.()??Ge();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=o[6]&15|64,o[8]=o[8]&63|128,Me(o)}function ke(e){const t=e._getType();return Ee.isInstance(e)?e.role:t==="tool"?t:e.name??t}function Le(e){switch(e){case"supervisor":case"ai":case"model":return"model";case"system":return"system";case"human":return"user";case"tool":case"function":return"function";default:throw new Error(`Unknown / unsupported author: ${e}`)}}function Pe(e){if("mimeType"in e&&"data"in e)return{inlineData:{mimeType:e.mimeType,data:e.data}};if("mimeType"in e&&"fileUri"in e)return{fileData:{mimeType:e.mimeType,fileUri:e.fileUri}};throw new Error("Invalid media content")}function je(e,t){return t.map(n=>ae(n)?n.tool_calls??[]:[]).flat().find(n=>n.id===e.tool_call_id)?.name}function Fe(e){return{providerName:"Google Gemini",fromStandardTextBlock(n){return{text:n.text}},fromStandardImageBlock(n){if(!e)throw new Error("This model does not support images");if(n.source_type==="url"){const o=N({dataUrl:n.url});return o?{inlineData:{mimeType:o.mime_type,data:o.data}}:{fileData:{mimeType:n.mime_type??"",fileUri:n.url}}}if(n.source_type==="base64")return{inlineData:{mimeType:n.mime_type??"",data:n.data}};throw new Error(`Unsupported source type: ${n.source_type}`)},fromStandardAudioBlock(n){if(!e)throw new Error("This model does not support audio");if(n.source_type==="url"){const o=N({dataUrl:n.url});return o?{inlineData:{mimeType:o.mime_type,data:o.data}}:{fileData:{mimeType:n.mime_type??"",fileUri:n.url}}}if(n.source_type==="base64")return{inlineData:{mimeType:n.mime_type??"",data:n.data}};throw new Error(`Unsupported source type: ${n.source_type}`)},fromStandardFileBlock(n){if(!e)throw new Error("This model does not support files");if(n.source_type==="text")return{text:n.text};if(n.source_type==="url"){const o=N({dataUrl:n.url});return o?{inlineData:{mimeType:o.mime_type,data:o.data}}:{fileData:{mimeType:n.mime_type??"",fileUri:n.url}}}if(n.source_type==="base64")return{inlineData:{mimeType:n.mime_type??"",data:n.data}};throw new Error(`Unsupported source type: ${n.source_type}`)}}}function L(e,t){if(we(e))return Te(e,Fe(t));if(e.type==="text")return{text:e.text};if(e.type==="executableCode")return{executableCode:e.executableCode};if(e.type==="codeExecutionResult")return{codeExecutionResult:e.codeExecutionResult};if(e.type==="image_url"){if(!t)throw new Error("This model does not support images");let n;if(typeof e.image_url=="string")n=e.image_url;else if(typeof e.image_url=="object"&&"url"in e.image_url)n=e.image_url.url;else throw new Error("Please provide image as base64 encoded data URL");const[o,s]=n.split(",");if(!o.startsWith("data:"))throw new Error("Please provide image as base64 encoded data URL");const[i,a]=o.replace(/^data:/,"").split(";");if(a!=="base64")throw new Error("Please provide image as base64 encoded data URL");return{inlineData:{data:s,mimeType:i}}}else{if(e.type==="media")return Pe(e);if(e.type==="tool_use")return{functionCall:{name:e.name,args:e.input}};if(e.type?.includes("/")&&e.type.split("/").length===2&&"data"in e&&typeof e.data=="string")return{inlineData:{mimeType:e.type,data:e.data}};if("functionCall"in e)return;throw"type"in e?new Error(`Unknown content type ${e.type}`):new Error(`Unknown content ${JSON.stringify(e)}`)}}function Ke(e,t,n){if(ve(e)){const i=e.name??je(e,n);if(i===void 0)throw new Error(`Google requires a tool name for each tool call response, and we could not infer a called tool name for ToolMessage "${e.id}" from your passed messages. Please populate a "name" field on that ToolMessage explicitly.`);const a=Array.isArray(e.content)?e.content.map(c=>L(c,t)).filter(c=>c!==void 0):e.content;return e.status==="error"?[{functionResponse:{name:i,response:{error:{details:a}}}}]:[{functionResponse:{name:i,response:{result:a}}}]}let o=[];const s=[];return typeof e.content=="string"&&e.content&&s.push({text:e.content}),Array.isArray(e.content)&&s.push(...e.content.map(i=>L(i,t)).filter(i=>i!==void 0)),ae(e)&&e.tool_calls?.length&&(o=e.tool_calls.map(i=>({functionCall:{name:i.name,args:i.args}}))),[...s,...o]}function P(e,t,n=!1){return e.reduce((o,s,i)=>{if(!me(s))throw new Error("Unsupported message input");const a=ke(s);if(a==="system"&&i!==0)throw new Error("System message should be the first one");const c=Le(a),u=o.content[o.content.length];if(!o.mergeWithPreviousContent&&u&&u.role===c)throw new Error("Google Generative AI requires alternate messages between authors");const r=Ke(s,t,e.slice(0,i));if(o.mergeWithPreviousContent){const d=o.content[o.content.length-1];if(!d)throw new Error("There was a problem parsing your system message. Please try a prompt without one.");return d.parts.push(...r),{mergeWithPreviousContent:!1,content:o.content}}let p=c;(p==="function"||p==="system"&&!n)&&(p="user");const f={role:p,parts:r};return{mergeWithPreviousContent:a==="system"&&!n,content:[...o.content,f]}},{content:[],mergeWithPreviousContent:!1}).content}function $e(e,t){if(!e.candidates||e.candidates.length===0||!e.candidates[0])return{generations:[],llmOutput:{filters:e.promptFeedback}};const n=e.functionCalls(),[o]=e.candidates,{content:s,...i}=o;let a;Array.isArray(s?.parts)&&s.parts.length===1&&s.parts[0].text?a=s.parts[0].text:Array.isArray(s?.parts)&&s.parts.length>0?a=s.parts.map(r=>"text"in r?{type:"text",text:r.text}:"inlineData"in r?{type:"inlineData",inlineData:r.inlineData}:"functionCall"in r?{type:"functionCall",functionCall:r.functionCall}:"functionResponse"in r?{type:"functionResponse",functionResponse:r.functionResponse}:"fileData"in r?{type:"fileData",fileData:r.fileData}:"executableCode"in r?{type:"executableCode",executableCode:r.executableCode}:"codeExecutionResult"in r?{type:"codeExecutionResult",codeExecutionResult:r.codeExecutionResult}:r):a=[];let c="";return typeof a=="string"?c=a:Array.isArray(a)&&a.length>0&&(c=a.find(p=>"text"in p)?.text??c),{generations:[{text:c,message:new ye({content:a??"",tool_calls:n?.map(r=>({...r,type:"tool_call",id:"id"in r&&typeof r.id=="string"?r.id:le()})),additional_kwargs:{...i},usage_metadata:t?.usageMetadata}),generationInfo:i}],llmOutput:{tokenUsage:{promptTokens:t?.usageMetadata?.input_tokens,completionTokens:t?.usageMetadata?.output_tokens,totalTokens:t?.usageMetadata?.total_tokens}}}}function He(e,t){if(!e.candidates||e.candidates.length===0)return null;const n=e.functionCalls(),[o]=e.candidates,{content:s,...i}=o;let a;Array.isArray(s?.parts)&&s.parts.every(r=>"text"in r)?a=s.parts.map(r=>r.text).join(""):Array.isArray(s?.parts)?a=s.parts.map(r=>"text"in r?{type:"text",text:r.text}:"inlineData"in r?{type:"inlineData",inlineData:r.inlineData}:"functionCall"in r?{type:"functionCall",functionCall:r.functionCall}:"functionResponse"in r?{type:"functionResponse",functionResponse:r.functionResponse}:"fileData"in r?{type:"fileData",fileData:r.fileData}:"executableCode"in r?{type:"executableCode",executableCode:r.executableCode}:"codeExecutionResult"in r?{type:"codeExecutionResult",codeExecutionResult:r.codeExecutionResult}:r):a=[];let c="";a&&typeof a=="string"?c=a:Array.isArray(a)&&(c=a.find(p=>"text"in p)?.text??"");const u=[];return n&&u.push(...n.map(r=>({...r,args:JSON.stringify(r.args),index:t.index,type:"tool_call_chunk",id:"id"in r&&typeof r.id=="string"?r.id:le()}))),new Ce({text:c,message:new _e({content:a||"",name:s?s.role:void 0,tool_call_chunks:u,additional_kwargs:{},response_metadata:{model_provider:"google-genai"},usage_metadata:t.usageMetadata}),generationInfo:i})}function Be(e){return e.every(t=>"functionDeclarations"in t&&Array.isArray(t.functionDeclarations))?e:[{functionDeclarations:e.map(t=>{if(re(t)){const n=x(t.schema);return n.type==="object"&&"properties"in n&&Object.keys(n.properties).length===0?{name:t.name,description:t.description}:{name:t.name,description:t.description,parameters:n}}return ce(t)?{name:t.function.name,description:t.function.description??"A function available to call.",parameters:xe(t.function.parameters)}:t})}]}var j=class extends Ie{static lc_name(){return"GoogleGenerativeAIToolsOutputParser"}lc_namespace=["langchain","google_genai","output_parsers"];returnId=!1;keyName;returnSingle=!1;zodSchema;constructor(e){super(e),this.keyName=e.keyName,this.returnSingle=e.returnSingle??this.returnSingle,this.zodSchema=e.zodSchema}async _validateResult(e){if(this.zodSchema===void 0)return e;const t=await Oe(this.zodSchema,e);if(t.success)return t.data;throw new Re(`Failed to parse. Text: "${JSON.stringify(e,null,2)}". Error: ${JSON.stringify(t.error.issues)}`,JSON.stringify(e,null,2))}async parseResult(e){const t=e.flatMap(s=>{const{message:i}=s;return!("tool_calls"in i)||!Array.isArray(i.tool_calls)?[]:i.tool_calls});if(t[0]===void 0)throw new Error("No parseable tool calls provided to GoogleGenerativeAIToolsOutputParser.");const[n]=t;return await this._validateResult(n.args)}},F;(function(e){e.STRING="string",e.NUMBER="number",e.INTEGER="integer",e.BOOLEAN="boolean",e.ARRAY="array",e.OBJECT="object"})(F||(F={}));var K;(function(e){e.LANGUAGE_UNSPECIFIED="language_unspecified",e.PYTHON="python"})(K||(K={}));var $;(function(e){e.OUTCOME_UNSPECIFIED="outcome_unspecified",e.OUTCOME_OK="outcome_ok",e.OUTCOME_FAILED="outcome_failed",e.OUTCOME_DEADLINE_EXCEEDED="outcome_deadline_exceeded"})($||($={}));const H=["user","model","function","system"];var B;(function(e){e.HARM_CATEGORY_UNSPECIFIED="HARM_CATEGORY_UNSPECIFIED",e.HARM_CATEGORY_HATE_SPEECH="HARM_CATEGORY_HATE_SPEECH",e.HARM_CATEGORY_SEXUALLY_EXPLICIT="HARM_CATEGORY_SEXUALLY_EXPLICIT",e.HARM_CATEGORY_HARASSMENT="HARM_CATEGORY_HARASSMENT",e.HARM_CATEGORY_DANGEROUS_CONTENT="HARM_CATEGORY_DANGEROUS_CONTENT",e.HARM_CATEGORY_CIVIC_INTEGRITY="HARM_CATEGORY_CIVIC_INTEGRITY"})(B||(B={}));var Y;(function(e){e.HARM_BLOCK_THRESHOLD_UNSPECIFIED="HARM_BLOCK_THRESHOLD_UNSPECIFIED",e.BLOCK_LOW_AND_ABOVE="BLOCK_LOW_AND_ABOVE",e.BLOCK_MEDIUM_AND_ABOVE="BLOCK_MEDIUM_AND_ABOVE",e.BLOCK_ONLY_HIGH="BLOCK_ONLY_HIGH",e.BLOCK_NONE="BLOCK_NONE"})(Y||(Y={}));var q;(function(e){e.HARM_PROBABILITY_UNSPECIFIED="HARM_PROBABILITY_UNSPECIFIED",e.NEGLIGIBLE="NEGLIGIBLE",e.LOW="LOW",e.MEDIUM="MEDIUM",e.HIGH="HIGH"})(q||(q={}));var V;(function(e){e.BLOCKED_REASON_UNSPECIFIED="BLOCKED_REASON_UNSPECIFIED",e.SAFETY="SAFETY",e.OTHER="OTHER"})(V||(V={}));var I;(function(e){e.FINISH_REASON_UNSPECIFIED="FINISH_REASON_UNSPECIFIED",e.STOP="STOP",e.MAX_TOKENS="MAX_TOKENS",e.SAFETY="SAFETY",e.RECITATION="RECITATION",e.LANGUAGE="LANGUAGE",e.BLOCKLIST="BLOCKLIST",e.PROHIBITED_CONTENT="PROHIBITED_CONTENT",e.SPII="SPII",e.MALFORMED_FUNCTION_CALL="MALFORMED_FUNCTION_CALL",e.OTHER="OTHER"})(I||(I={}));var W;(function(e){e.TASK_TYPE_UNSPECIFIED="TASK_TYPE_UNSPECIFIED",e.RETRIEVAL_QUERY="RETRIEVAL_QUERY",e.RETRIEVAL_DOCUMENT="RETRIEVAL_DOCUMENT",e.SEMANTIC_SIMILARITY="SEMANTIC_SIMILARITY",e.CLASSIFICATION="CLASSIFICATION",e.CLUSTERING="CLUSTERING"})(W||(W={}));var T;(function(e){e.MODE_UNSPECIFIED="MODE_UNSPECIFIED",e.AUTO="AUTO",e.ANY="ANY",e.NONE="NONE"})(T||(T={}));var J;(function(e){e.MODE_UNSPECIFIED="MODE_UNSPECIFIED",e.MODE_DYNAMIC="MODE_DYNAMIC"})(J||(J={}));class m extends Error{constructor(t){super(`[GoogleGenerativeAI Error]: ${t}`)}}class w extends m{constructor(t,n){super(t),this.response=n}}class ue extends m{constructor(t,n,o,s){super(t),this.status=n,this.statusText=o,this.errorDetails=s}}class _ extends m{}class de extends m{}const Ye="https://generativelanguage.googleapis.com",qe="v1beta",Ve="0.24.1",We="genai-js";var v;(function(e){e.GENERATE_CONTENT="generateContent",e.STREAM_GENERATE_CONTENT="streamGenerateContent",e.COUNT_TOKENS="countTokens",e.EMBED_CONTENT="embedContent",e.BATCH_EMBED_CONTENTS="batchEmbedContents"})(v||(v={}));class Je{constructor(t,n,o,s,i){this.model=t,this.task=n,this.apiKey=o,this.stream=s,this.requestOptions=i}toString(){var t,n;const o=((t=this.requestOptions)===null||t===void 0?void 0:t.apiVersion)||qe;let i=`${((n=this.requestOptions)===null||n===void 0?void 0:n.baseUrl)||Ye}/${o}/${this.model}:${this.task}`;return this.stream&&(i+="?alt=sse"),i}}function ze(e){const t=[];return e?.apiClient&&t.push(e.apiClient),t.push(`${We}/${Ve}`),t.join(" ")}async function Xe(e){var t;const n=new Headers;n.append("Content-Type","application/json"),n.append("x-goog-api-client",ze(e.requestOptions)),n.append("x-goog-api-key",e.apiKey);let o=(t=e.requestOptions)===null||t===void 0?void 0:t.customHeaders;if(o){if(!(o instanceof Headers))try{o=new Headers(o)}catch(s){throw new _(`unable to convert customHeaders value ${JSON.stringify(o)} to Headers: ${s.message}`)}for(const[s,i]of o.entries()){if(s==="x-goog-api-key")throw new _(`Cannot set reserved header name ${s}`);if(s==="x-goog-api-client")throw new _(`Header name ${s} can only be set using the apiClient field`);n.append(s,i)}}return n}async function Qe(e,t,n,o,s,i){const a=new Je(e,t,n,o,i);return{url:a.toString(),fetchOptions:Object.assign(Object.assign({},nt(i)),{method:"POST",headers:await Xe(a),body:s})}}async function S(e,t,n,o,s,i={},a=fetch){const{url:c,fetchOptions:u}=await Qe(e,t,n,o,s,i);return Ze(c,u,a)}async function Ze(e,t,n=fetch){let o;try{o=await n(e,t)}catch(s){et(s,e)}return o.ok||await tt(o,e),o}function et(e,t){let n=e;throw n.name==="AbortError"?(n=new de(`Request aborted when fetching ${t.toString()}: ${e.message}`),n.stack=e.stack):e instanceof ue||e instanceof _||(n=new m(`Error fetching from ${t.toString()}: ${e.message}`),n.stack=e.stack),n}async function tt(e,t){let n="",o;try{const s=await e.json();n=s.error.message,s.error.details&&(n+=` ${JSON.stringify(s.error.details)}`,o=s.error.details)}catch{}throw new ue(`Error fetching from ${t.toString()}: [${e.status} ${e.statusText}] ${n}`,e.status,e.statusText,o)}function nt(e){const t={};if(e?.signal!==void 0||e?.timeout>=0){const n=new AbortController;e?.timeout>=0&&setTimeout(()=>n.abort(),e.timeout),e?.signal&&e.signal.addEventListener("abort",()=>{n.abort()}),t.signal=n.signal}return t}function M(e){return e.text=()=>{if(e.candidates&&e.candidates.length>0){if(e.candidates.length>1&&console.warn(`This response had ${e.candidates.length} candidates. Returning text from the first candidate only. Access response.candidates directly to use the other candidates.`),A(e.candidates[0]))throw new w(`${C(e)}`,e);return ot(e)}else if(e.promptFeedback)throw new w(`Text not available. ${C(e)}`,e);return""},e.functionCall=()=>{if(e.candidates&&e.candidates.length>0){if(e.candidates.length>1&&console.warn(`This response had ${e.candidates.length} candidates. Returning function calls from the first candidate only. Access response.candidates directly to use the other candidates.`),A(e.candidates[0]))throw new w(`${C(e)}`,e);return console.warn("response.functionCall() is deprecated. Use response.functionCalls() instead."),z(e)[0]}else if(e.promptFeedback)throw new w(`Function call not available. ${C(e)}`,e)},e.functionCalls=()=>{if(e.candidates&&e.candidates.length>0){if(e.candidates.length>1&&console.warn(`This response had ${e.candidates.length} candidates. Returning function calls from the first candidate only. Access response.candidates directly to use the other candidates.`),A(e.candidates[0]))throw new w(`${C(e)}`,e);return z(e)}else if(e.promptFeedback)throw new w(`Function call not available. ${C(e)}`,e)},e}function ot(e){var t,n,o,s;const i=[];if(!((n=(t=e.candidates)===null||t===void 0?void 0:t[0].content)===null||n===void 0)&&n.parts)for(const a of(s=(o=e.candidates)===null||o===void 0?void 0:o[0].content)===null||s===void 0?void 0:s.parts)a.text&&i.push(a.text),a.executableCode&&i.push("\n```"+a.executableCode.language+`
|
|
2
|
-
`+a.executableCode.code+"\n```\n"),a.codeExecutionResult&&i.push("\n```\n"+a.codeExecutionResult.output+"\n```\n");return i.length>0?i.join(""):""}function z(e){var t,n,o,s;const i=[];if(!((n=(t=e.candidates)===null||t===void 0?void 0:t[0].content)===null||n===void 0)&&n.parts)for(const a of(s=(o=e.candidates)===null||o===void 0?void 0:o[0].content)===null||s===void 0?void 0:s.parts)a.functionCall&&i.push(a.functionCall);if(i.length>0)return i}const st=[I.RECITATION,I.SAFETY,I.LANGUAGE];function A(e){return!!e.finishReason&&st.includes(e.finishReason)}function C(e){var t,n,o;let s="";if((!e.candidates||e.candidates.length===0)&&e.promptFeedback)s+="Response was blocked",!((t=e.promptFeedback)===null||t===void 0)&&t.blockReason&&(s+=` due to ${e.promptFeedback.blockReason}`),!((n=e.promptFeedback)===null||n===void 0)&&n.blockReasonMessage&&(s+=`: ${e.promptFeedback.blockReasonMessage}`);else if(!((o=e.candidates)===null||o===void 0)&&o[0]){const i=e.candidates[0];A(i)&&(s+=`Candidate was blocked due to ${i.finishReason}`,i.finishMessage&&(s+=`: ${i.finishMessage}`))}return s}function O(e){return this instanceof O?(this.v=e,this):new O(e)}function it(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o=n.apply(e,t||[]),s,i=[];return s={},a("next"),a("throw"),a("return"),s[Symbol.asyncIterator]=function(){return this},s;function a(d){o[d]&&(s[d]=function(l){return new Promise(function(h,y){i.push([d,l,h,y])>1||c(d,l)})})}function c(d,l){try{u(o[d](l))}catch(h){f(i[0][3],h)}}function u(d){d.value instanceof O?Promise.resolve(d.value.v).then(r,p):f(i[0][2],d)}function r(d){c("next",d)}function p(d){c("throw",d)}function f(d,l){d(l),i.shift(),i.length&&c(i[0][0],i[0][1])}}const X=/^data\: (.*)(?:\n\n|\r\r|\r\n\r\n)/;function at(e){const t=e.body.pipeThrough(new TextDecoderStream("utf8",{fatal:!0})),n=lt(t),[o,s]=n.tee();return{stream:ct(o),response:rt(s)}}async function rt(e){const t=[],n=e.getReader();for(;;){const{done:o,value:s}=await n.read();if(o)return M(ut(t));t.push(s)}}function ct(e){return it(this,arguments,function*(){const n=e.getReader();for(;;){const{value:o,done:s}=yield O(n.read());if(s)break;yield yield O(M(o))}})}function lt(e){const t=e.getReader();return new ReadableStream({start(o){let s="";return i();function i(){return t.read().then(({value:a,done:c})=>{if(c){if(s.trim()){o.error(new m("Failed to parse stream"));return}o.close();return}s+=a;let u=s.match(X),r;for(;u;){try{r=JSON.parse(u[1])}catch{o.error(new m(`Error parsing JSON response: "${u[1]}"`));return}o.enqueue(r),s=s.substring(u[0].length),u=s.match(X)}return i()}).catch(a=>{let c=a;throw c.stack=a.stack,c.name==="AbortError"?c=new de("Request aborted when reading from the stream"):c=new m("Error reading from the stream"),c})}}})}function ut(e){const t=e[e.length-1],n={promptFeedback:t?.promptFeedback};for(const o of e){if(o.candidates){let s=0;for(const i of o.candidates)if(n.candidates||(n.candidates=[]),n.candidates[s]||(n.candidates[s]={index:s}),n.candidates[s].citationMetadata=i.citationMetadata,n.candidates[s].groundingMetadata=i.groundingMetadata,n.candidates[s].finishReason=i.finishReason,n.candidates[s].finishMessage=i.finishMessage,n.candidates[s].safetyRatings=i.safetyRatings,i.content&&i.content.parts){n.candidates[s].content||(n.candidates[s].content={role:i.content.role||"user",parts:[]});const a={};for(const c of i.content.parts)c.text&&(a.text=c.text),c.functionCall&&(a.functionCall=c.functionCall),c.executableCode&&(a.executableCode=c.executableCode),c.codeExecutionResult&&(a.codeExecutionResult=c.codeExecutionResult),Object.keys(a).length===0&&(a.text=""),n.candidates[s].content.parts.push(a)}s++}o.usageMetadata&&(n.usageMetadata=o.usageMetadata)}return n}async function fe(e,t,n,o){const s=await S(t,v.STREAM_GENERATE_CONTENT,e,!0,JSON.stringify(n),o);return at(s)}async function he(e,t,n,o){const i=await(await S(t,v.GENERATE_CONTENT,e,!1,JSON.stringify(n),o)).json();return{response:M(i)}}function pe(e){if(e!=null){if(typeof e=="string")return{role:"system",parts:[{text:e}]};if(e.text)return{role:"system",parts:[e]};if(e.parts)return e.role?e:{role:"system",parts:e.parts}}}function R(e){let t=[];if(typeof e=="string")t=[{text:e}];else for(const n of e)typeof n=="string"?t.push({text:n}):t.push(n);return dt(t)}function dt(e){const t={role:"user",parts:[]},n={role:"function",parts:[]};let o=!1,s=!1;for(const i of e)"functionResponse"in i?(n.parts.push(i),s=!0):(t.parts.push(i),o=!0);if(o&&s)throw new m("Within a single message, FunctionResponse cannot be mixed with other type of part in the request for sending chat message.");if(!o&&!s)throw new m("No content is provided for sending chat message.");return o?t:n}function ft(e,t){var n;let o={model:t?.model,generationConfig:t?.generationConfig,safetySettings:t?.safetySettings,tools:t?.tools,toolConfig:t?.toolConfig,systemInstruction:t?.systemInstruction,cachedContent:(n=t?.cachedContent)===null||n===void 0?void 0:n.name,contents:[]};const s=e.generateContentRequest!=null;if(e.contents){if(s)throw new _("CountTokensRequest must have one of contents or generateContentRequest, not both.");o.contents=e.contents}else if(s)o=Object.assign(Object.assign({},o),e.generateContentRequest);else{const i=R(e);o.contents=[i]}return{generateContentRequest:o}}function Q(e){let t;return e.contents?t=e:t={contents:[R(e)]},e.systemInstruction&&(t.systemInstruction=pe(e.systemInstruction)),t}function ht(e){return typeof e=="string"||Array.isArray(e)?{content:R(e)}:e}const Z=["text","inlineData","functionCall","functionResponse","executableCode","codeExecutionResult"],pt={user:["text","inlineData"],function:["functionResponse"],model:["text","functionCall","executableCode","codeExecutionResult"],system:["text"]};function gt(e){let t=!1;for(const n of e){const{role:o,parts:s}=n;if(!t&&o!=="user")throw new m(`First content should be with role 'user', got ${o}`);if(!H.includes(o))throw new m(`Each item should include role field. Got ${o} but valid roles are: ${JSON.stringify(H)}`);if(!Array.isArray(s))throw new m("Content should have 'parts' property with an array of Parts");if(s.length===0)throw new m("Each Content should have at least one part");const i={text:0,inlineData:0,functionCall:0,functionResponse:0,fileData:0,executableCode:0,codeExecutionResult:0};for(const c of s)for(const u of Z)u in c&&(i[u]+=1);const a=pt[o];for(const c of Z)if(!a.includes(c)&&i[c]>0)throw new m(`Content with role '${o}' can't contain '${c}' part`);t=!0}}function ee(e){var t;if(e.candidates===void 0||e.candidates.length===0)return!1;const n=(t=e.candidates[0])===null||t===void 0?void 0:t.content;if(n===void 0||n.parts===void 0||n.parts.length===0)return!1;for(const o of n.parts)if(o===void 0||Object.keys(o).length===0||o.text!==void 0&&o.text==="")return!1;return!0}const te="SILENT_ERROR";class mt{constructor(t,n,o,s={}){this.model=n,this.params=o,this._requestOptions=s,this._history=[],this._sendPromise=Promise.resolve(),this._apiKey=t,o?.history&&(gt(o.history),this._history=o.history)}async getHistory(){return await this._sendPromise,this._history}async sendMessage(t,n={}){var o,s,i,a,c,u;await this._sendPromise;const r=R(t),p={safetySettings:(o=this.params)===null||o===void 0?void 0:o.safetySettings,generationConfig:(s=this.params)===null||s===void 0?void 0:s.generationConfig,tools:(i=this.params)===null||i===void 0?void 0:i.tools,toolConfig:(a=this.params)===null||a===void 0?void 0:a.toolConfig,systemInstruction:(c=this.params)===null||c===void 0?void 0:c.systemInstruction,cachedContent:(u=this.params)===null||u===void 0?void 0:u.cachedContent,contents:[...this._history,r]},f=Object.assign(Object.assign({},this._requestOptions),n);let d;return this._sendPromise=this._sendPromise.then(()=>he(this._apiKey,this.model,p,f)).then(l=>{var h;if(ee(l.response)){this._history.push(r);const y=Object.assign({parts:[],role:"model"},(h=l.response.candidates)===null||h===void 0?void 0:h[0].content);this._history.push(y)}else{const y=C(l.response);y&&console.warn(`sendMessage() was unsuccessful. ${y}. Inspect response object for details.`)}d=l}).catch(l=>{throw this._sendPromise=Promise.resolve(),l}),await this._sendPromise,d}async sendMessageStream(t,n={}){var o,s,i,a,c,u;await this._sendPromise;const r=R(t),p={safetySettings:(o=this.params)===null||o===void 0?void 0:o.safetySettings,generationConfig:(s=this.params)===null||s===void 0?void 0:s.generationConfig,tools:(i=this.params)===null||i===void 0?void 0:i.tools,toolConfig:(a=this.params)===null||a===void 0?void 0:a.toolConfig,systemInstruction:(c=this.params)===null||c===void 0?void 0:c.systemInstruction,cachedContent:(u=this.params)===null||u===void 0?void 0:u.cachedContent,contents:[...this._history,r]},f=Object.assign(Object.assign({},this._requestOptions),n),d=fe(this._apiKey,this.model,p,f);return this._sendPromise=this._sendPromise.then(()=>d).catch(l=>{throw new Error(te)}).then(l=>l.response).then(l=>{if(ee(l)){this._history.push(r);const h=Object.assign({},l.candidates[0].content);h.role||(h.role="model"),this._history.push(h)}else{const h=C(l);h&&console.warn(`sendMessageStream() was unsuccessful. ${h}. Inspect response object for details.`)}}).catch(l=>{l.message!==te&&console.error(l)}),d}}async function yt(e,t,n,o){return(await S(t,v.COUNT_TOKENS,e,!1,JSON.stringify(n),o)).json()}async function Ct(e,t,n,o){return(await S(t,v.EMBED_CONTENT,e,!1,JSON.stringify(n),o)).json()}async function _t(e,t,n,o){const s=n.requests.map(a=>Object.assign(Object.assign({},a),{model:t}));return(await S(t,v.BATCH_EMBED_CONTENTS,e,!1,JSON.stringify({requests:s}),o)).json()}class ne{constructor(t,n,o={}){this.apiKey=t,this._requestOptions=o,n.model.includes("/")?this.model=n.model:this.model=`models/${n.model}`,this.generationConfig=n.generationConfig||{},this.safetySettings=n.safetySettings||[],this.tools=n.tools,this.toolConfig=n.toolConfig,this.systemInstruction=pe(n.systemInstruction),this.cachedContent=n.cachedContent}async generateContent(t,n={}){var o;const s=Q(t),i=Object.assign(Object.assign({},this._requestOptions),n);return he(this.apiKey,this.model,Object.assign({generationConfig:this.generationConfig,safetySettings:this.safetySettings,tools:this.tools,toolConfig:this.toolConfig,systemInstruction:this.systemInstruction,cachedContent:(o=this.cachedContent)===null||o===void 0?void 0:o.name},s),i)}async generateContentStream(t,n={}){var o;const s=Q(t),i=Object.assign(Object.assign({},this._requestOptions),n);return fe(this.apiKey,this.model,Object.assign({generationConfig:this.generationConfig,safetySettings:this.safetySettings,tools:this.tools,toolConfig:this.toolConfig,systemInstruction:this.systemInstruction,cachedContent:(o=this.cachedContent)===null||o===void 0?void 0:o.name},s),i)}startChat(t){var n;return new mt(this.apiKey,this.model,Object.assign({generationConfig:this.generationConfig,safetySettings:this.safetySettings,tools:this.tools,toolConfig:this.toolConfig,systemInstruction:this.systemInstruction,cachedContent:(n=this.cachedContent)===null||n===void 0?void 0:n.name},t),this._requestOptions)}async countTokens(t,n={}){const o=ft(t,{model:this.model,generationConfig:this.generationConfig,safetySettings:this.safetySettings,tools:this.tools,toolConfig:this.toolConfig,systemInstruction:this.systemInstruction,cachedContent:this.cachedContent}),s=Object.assign(Object.assign({},this._requestOptions),n);return yt(this.apiKey,this.model,o,s)}async embedContent(t,n={}){const o=ht(t),s=Object.assign(Object.assign({},this._requestOptions),n);return Ct(this.apiKey,this.model,o,s)}async batchEmbedContents(t,n={}){const o=Object.assign(Object.assign({},this._requestOptions),n);return _t(this.apiKey,this.model,t,o)}}class oe{constructor(t){this.apiKey=t}getGenerativeModel(t,n){if(!t.model)throw new m("Must provide a model name. Example: genai.getGenerativeModel({ model: 'my-model-name' })");return new ne(this.apiKey,t,n)}getGenerativeModelFromCachedContent(t,n,o){if(!t.name)throw new _("Cached content must contain a `name` field.");if(!t.model)throw new _("Cached content must contain a `model` field.");const s=["model","systemInstruction"];for(const a of s)if(n?.[a]&&t[a]&&n?.[a]!==t[a]){if(a==="model"){const c=n.model.startsWith("models/")?n.model.replace("models/",""):n.model,u=t.model.startsWith("models/")?t.model.replace("models/",""):t.model;if(c===u)continue}throw new _(`Different value for "${a}" specified in modelParams (${n[a]}) and cachedContent (${t[a]})`)}const i=Object.assign(Object.assign({},n),{model:t.model,tools:t.tools,toolConfig:t.toolConfig,systemInstruction:t.systemInstruction,cachedContent:t});return new ne(this.apiKey,i,o)}}function se(e,t){const n=Et(e),o=wt(n,t);return{tools:n,toolConfig:o}}function Et(e){let t=[];const n=[];return e.forEach(s=>{if(re(s)){const[i]=Be([s]);i.functionDeclarations&&t.push(...i.functionDeclarations)}else if(ce(s)){const{functionDeclarations:i}=vt(s);if(i)t.push(...i);else throw new Error("Failed to convert OpenAI structured tool to GenerativeAI tool")}else n.push(s)}),n.find(s=>"functionDeclarations"in s)?n.map(s=>{if(t?.length>0&&"functionDeclarations"in s){const i={functionDeclarations:[...s.functionDeclarations||[],...t]};return t=[],i}return s}):[...n,...t.length>0?[{functionDeclarations:t}]:[]]}function vt(e){return{functionDeclarations:[{name:e.function.name,description:e.function.description,parameters:E(e.function.parameters)}]}}function wt(e,t){if(!e.length||!t)return;const{toolChoice:n,allowedFunctionNames:o}=t,s={any:T.ANY,auto:T.AUTO,none:T.NONE};if(n&&["any","auto","none"].includes(n))return{functionCallingConfig:{mode:s[n]??"MODE_UNSPECIFIED",allowedFunctionNames:o}};if(typeof n=="string"||o)return{functionCallingConfig:{mode:T.ANY,allowedFunctionNames:[...o??[],...n&&typeof n=="string"?[n]:[]]}}}var St=class extends Se{static lc_name(){return"ChatGoogleGenerativeAI"}lc_serializable=!0;get lc_secrets(){return{apiKey:"GOOGLE_API_KEY"}}lc_namespace=["langchain","chat_models","google_genai"];get lc_aliases(){return{apiKey:"google_api_key"}}model;temperature;maxOutputTokens;topP;topK;stopSequences=[];safetySettings;apiKey;streaming=!1;json;streamUsage=!0;convertSystemMessageToHumanContent;client;get _isMultimodalModel(){return this.model.includes("vision")||this.model.startsWith("gemini-1.5")||this.model.startsWith("gemini-2")||this.model.startsWith("gemma-3-")&&!this.model.startsWith("gemma-3-1b")}constructor(e){if(super(e),this.model=e.model.replace(/^models\//,""),this.maxOutputTokens=e.maxOutputTokens??this.maxOutputTokens,this.maxOutputTokens&&this.maxOutputTokens<0)throw new Error("`maxOutputTokens` must be a positive integer");if(this.temperature=e.temperature??this.temperature,this.temperature&&(this.temperature<0||this.temperature>2))throw new Error("`temperature` must be in the range of [0.0,2.0]");if(this.topP=e.topP??this.topP,this.topP&&this.topP<0)throw new Error("`topP` must be a positive integer");if(this.topP&&this.topP>1)throw new Error("`topP` must be below 1.");if(this.topK=e.topK??this.topK,this.topK&&this.topK<0)throw new Error("`topK` must be a positive integer");if(this.stopSequences=e.stopSequences??this.stopSequences,this.apiKey=e.apiKey??Ae("GOOGLE_API_KEY"),!this.apiKey)throw new Error("Please set an API key for Google GenerativeAI in the environment variable GOOGLE_API_KEY or in the `apiKey` field of the ChatGoogleGenerativeAI constructor");if(this.safetySettings=e.safetySettings??this.safetySettings,this.safetySettings&&this.safetySettings.length>0&&new Set(this.safetySettings.map(n=>n.category)).size!==this.safetySettings.length)throw new Error("The categories in `safetySettings` array must be unique");this.streaming=e.streaming??this.streaming,this.json=e.json,this.client=new oe(this.apiKey).getGenerativeModel({model:this.model,safetySettings:this.safetySettings,generationConfig:{stopSequences:this.stopSequences,maxOutputTokens:this.maxOutputTokens,temperature:this.temperature,topP:this.topP,topK:this.topK,...this.json?{responseMimeType:"application/json"}:{}}},{apiVersion:e.apiVersion,baseUrl:e.baseUrl}),this.streamUsage=e.streamUsage??this.streamUsage}useCachedContent(e,t,n){this.apiKey&&(this.client=new oe(this.apiKey).getGenerativeModelFromCachedContent(e,t,n))}get useSystemInstruction(){return typeof this.convertSystemMessageToHumanContent=="boolean"?!this.convertSystemMessageToHumanContent:this.computeUseSystemInstruction}get computeUseSystemInstruction(){return this.model==="gemini-1.0-pro-001"||this.model.startsWith("gemini-pro-vision")||this.model.startsWith("gemini-1.0-pro-vision")?!1:this.model!=="gemini-pro"}getLsParams(e){return{ls_provider:"google_genai",ls_model_name:this.model,ls_model_type:"chat",ls_temperature:this.client.generationConfig.temperature,ls_max_tokens:this.client.generationConfig.maxOutputTokens,ls_stop:e.stop}}_combineLLMOutput(){return[]}_llmType(){return"googlegenerativeai"}bindTools(e,t){return this.withConfig({tools:se(e)?.tools,...t})}invocationParams(e){const t=e?.tools?.length?se(e.tools,{toolChoice:e.tool_choice,allowedFunctionNames:e.allowedFunctionNames}):void 0;return e?.responseSchema?(this.client.generationConfig.responseSchema=e.responseSchema,this.client.generationConfig.responseMimeType="application/json"):(this.client.generationConfig.responseSchema=void 0,this.client.generationConfig.responseMimeType=this.json?"application/json":void 0),{...t?.tools?{tools:t.tools}:{},...t?.toolConfig?{toolConfig:t.toolConfig}:{}}}async _generate(e,t,n){const o=P(e,this._isMultimodalModel,this.useSystemInstruction);let s=o;if(o[0].role==="system"){const[r]=o;this.client.systemInstruction=r,s=o.slice(1)}const i=this.invocationParams(t);if(this.streaming){const r={},p=this._streamResponseChunks(e,t,n),f={};for await(const l of p){const h=l.generationInfo?.completion??0;f[h]===void 0?f[h]=l:f[h]=f[h].concat(l)}return{generations:Object.entries(f).sort(([l],[h])=>parseInt(l,10)-parseInt(h,10)).map(([l,h])=>h),llmOutput:{estimatedTokenUsage:r}}}const a=await this.completionWithRetry({...i,contents:s});let c;if("usageMetadata"in a.response){const r=a.response.usageMetadata;c={input_tokens:r.promptTokenCount??0,output_tokens:r.candidatesTokenCount??0,total_tokens:r.totalTokenCount??0}}const u=$e(a.response,{usageMetadata:c});return u.generations?.length>0&&await n?.handleLLMNewToken(u.generations[0]?.text??""),u}async*_streamResponseChunks(e,t,n){const o=P(e,this._isMultimodalModel,this.useSystemInstruction);let s=o;if(o[0].role==="system"){const[l]=o;this.client.systemInstruction=l,s=o.slice(1)}const a={...this.invocationParams(t),contents:s},c=await this.caller.callWithOptions({signal:t?.signal},async()=>{const{stream:l}=await this.client.generateContentStream(a);return l});let u,r=0,p=0,f=0,d=0;for await(const l of c){if("usageMetadata"in l&&l.usageMetadata!==void 0&&this.streamUsage!==!1&&t.streamUsage!==!1){u={input_tokens:l.usageMetadata.promptTokenCount??0,output_tokens:l.usageMetadata.candidatesTokenCount??0,total_tokens:l.usageMetadata.totalTokenCount??0};const y=l.usageMetadata.promptTokenCount??0;u.input_tokens=Math.max(0,y-r),r=y;const D=l.usageMetadata.candidatesTokenCount??0;u.output_tokens=Math.max(0,D-p),p=D;const G=l.usageMetadata.totalTokenCount??0;u.total_tokens=Math.max(0,G-f),f=G}const h=He(l,{usageMetadata:u,index:d});d+=1,h&&(yield h,await n?.handleLLMNewToken(h.text??""))}}async completionWithRetry(e,t){return this.caller.callWithOptions({signal:t?.signal},async()=>{try{return await this.client.generateContent(e)}catch(n){throw n.message?.includes("400 Bad Request")&&(n.status=400),n}})}withStructuredOutput(e,t){const n=e,o=t?.name,s=t?.method,i=t?.includeRaw;if(s==="jsonMode")throw new Error('ChatGoogleGenerativeAI only supports "jsonSchema" or "functionCalling" as a method.');let a,c;if(s==="functionCalling"){let f=o??"extract",d;if(ie(n)){const l=x(n);d=[{functionDeclarations:[{name:f,description:l.description??"A function available to call.",parameters:l}]}],c=new j({returnSingle:!0,keyName:f,zodSchema:n})}else{let l;typeof n.name=="string"&&typeof n.parameters=="object"&&n.parameters!=null?(l=n,l.parameters=E(n.parameters),f=n.name):l={name:f,description:n.description??"",parameters:E(n)},d=[{functionDeclarations:[l]}],c=new j({returnSingle:!0,keyName:f})}a=this.bindTools(d).withConfig({allowedFunctionNames:[f]})}else{const f=x(n);a=this.withConfig({responseSchema:f}),c=new Ne}if(!i)return a.pipe(c).withConfig({runName:"ChatGoogleGenerativeAIStructuredOutput"});const u=U.assign({parsed:(f,d)=>c.invoke(f.raw,d)}),r=U.assign({parsed:()=>null}),p=u.withFallbacks({fallbacks:[r]});return be.from([{raw:a},p]).withConfig({runName:"StructuredOutputRunnable"})}};export{St as ChatGoogleGenerativeAI};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{c as Be,s as K,b as me,r as E,F as B,R as ye,S as Re,d as ze,u as je,e as b,E as T,m as we,f as W,g as $e,h as Ve,i as ge,j as We,k as ve,l as x,w as Se,n as qe,o as Je,q as Xe,t as Ke,v as Qe,O as Ge,x as Ye,y as Ee,z as N,A as Ze,B as et,C as tt,D as O,G as rt,H as ee,I as at,J as Q,K as F,L as nt,N as st,M as ot,P as it,Q as Ce,T as lt,U as ut,V as dt,W as ct,X as ft,Y as ht,Z as pt,$ as mt,a0 as yt,a1 as Rt}from"./index-DfkXNide.js";import{a2 as Cr,a3 as br,a4 as _r,a5 as xr,a6 as Dr,a7 as Fr,a8 as Ar,a9 as Hr,aa as kr,ab as Pr,ac as Tr,ad as Nr,ae as Lr,af as Or,ag as Ur,ah as Ir,ai as Mr,aj as Br,ak as zr,al as jr,am as $r,an as Vr,ao as Wr,ap as qr,aq as Jr,ar as Xr,as as Kr,at as Qr,au as Gr,av as Yr,aw as Zr,ax as ea,ay as ta,az as ra,aA as aa,aB as na,aC as sa,aD as oa,aE as ia,aF as la,aG as ua,aH as da,aI as ca,aJ as fa,aK as ha,aL as pa,aM as ma,aN as ya,aO as Ra,aP as wa,aQ as ga,aR as va,aS as Sa,aT as Ea,aU as Ca,aV as ba,aW as _a,aX as xa,aY as Da,aZ as Fa,a_ as Aa,a$ as Ha,b0 as ka,b1 as Pa,b2 as Ta,b3 as Na,b4 as La,b5 as Oa,b6 as Ua,b7 as Ia,b8 as Ma,b9 as Ba,ba as za,bb as ja,bc as $a,bd as Va,be as Wa,bf as qa}from"./index-DfkXNide.js";var k={},te;function wt(){if(te)return k;te=1,Object.defineProperty(k,"__esModule",{value:!0}),k.parse=l,k.serialize=i;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,r=/^[\u0021-\u003A\u003C-\u007E]*$/,t=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,a=/^[\u0020-\u003A\u003D-\u007E]*$/,n=Object.prototype.toString,o=(()=>{const c=function(){};return c.prototype=Object.create(null),c})();function l(c,y){const f=new o,p=c.length;if(p<2)return f;const w=y?.decode||u;let m=0;do{const g=c.indexOf("=",m);if(g===-1)break;const v=c.indexOf(";",m),S=v===-1?p:v;if(g>S){m=c.lastIndexOf(";",g-1)+1;continue}const C=d(c,m,g),Z=s(c,g,C),H=c.slice(C,Z);if(f[H]===void 0){let _=d(c,g+1,S),Ie=s(c,S,_);const Me=w(c.slice(_,Ie));f[H]=Me}m=S+1}while(m<p);return f}function d(c,y,f){do{const p=c.charCodeAt(y);if(p!==32&&p!==9)return y}while(++y<f);return f}function s(c,y,f){for(;y>f;){const p=c.charCodeAt(--y);if(p!==32&&p!==9)return y+1}return f}function i(c,y,f){const p=f?.encode||encodeURIComponent;if(!e.test(c))throw new TypeError(`argument name is invalid: ${c}`);const w=p(y);if(!r.test(w))throw new TypeError(`argument val is invalid: ${y}`);let m=c+"="+w;if(!f)return m;if(f.maxAge!==void 0){if(!Number.isInteger(f.maxAge))throw new TypeError(`option maxAge is invalid: ${f.maxAge}`);m+="; Max-Age="+f.maxAge}if(f.domain){if(!t.test(f.domain))throw new TypeError(`option domain is invalid: ${f.domain}`);m+="; Domain="+f.domain}if(f.path){if(!a.test(f.path))throw new TypeError(`option path is invalid: ${f.path}`);m+="; Path="+f.path}if(f.expires){if(!h(f.expires)||!Number.isFinite(f.expires.valueOf()))throw new TypeError(`option expires is invalid: ${f.expires}`);m+="; Expires="+f.expires.toUTCString()}if(f.httpOnly&&(m+="; HttpOnly"),f.secure&&(m+="; Secure"),f.partitioned&&(m+="; Partitioned"),f.priority)switch(typeof f.priority=="string"?f.priority.toLowerCase():void 0){case"low":m+="; Priority=Low";break;case"medium":m+="; Priority=Medium";break;case"high":m+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${f.priority}`)}if(f.sameSite)switch(typeof f.sameSite=="string"?f.sameSite.toLowerCase():f.sameSite){case!0:case"strict":m+="; SameSite=Strict";break;case"lax":m+="; SameSite=Lax";break;case"none":m+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${f.sameSite}`)}return m}function u(c){if(c.indexOf("%")===-1)return c;try{return decodeURIComponent(c)}catch{return c}}function h(c){return n.call(c)==="[object Date]"}return k}var re=wt(),A={exports:{}},ae;function gt(){if(ae)return A.exports;ae=1;var e={decodeValues:!0,map:!1,silent:!1};function r(s){return typeof s!="string"||s in{}}function t(){return Object.create(null)}function a(s){return typeof s=="string"&&!!s.trim()}function n(s,i){var u=s.split(";").filter(a),h=u.shift(),c=o(h),y=c.name,f=c.value;if(i=i?Object.assign({},e,i):e,r(y))return null;try{f=i.decodeValues?decodeURIComponent(f):f}catch(w){console.error("set-cookie-parser: failed to decode cookie value. Set options.decodeValues=false to disable decoding.",w)}var p=t();return p.name=y,p.value=f,u.forEach(function(w){var m=w.split("="),g=m.shift().trimLeft().toLowerCase();if(!r(g)){var v=m.join("=");if(g==="expires")p.expires=new Date(v);else if(g==="max-age"){var S=parseInt(v,10);Number.isNaN(S)||(p.maxAge=S)}else g==="secure"?p.secure=!0:g==="httponly"?p.httpOnly=!0:g==="samesite"?p.sameSite=v:g==="partitioned"?p.partitioned=!0:g&&(p[g]=v)}}),p}function o(s){var i="",u="",h=s.split("=");return h.length>1?(i=h.shift(),u=h.join("=")):u=s,{name:i,value:u}}function l(s,i){if(i=i?Object.assign({},e,i):e,!s)return i.map?t():[];if(s.headers)if(typeof s.headers.getSetCookie=="function")s=s.headers.getSetCookie();else if(s.headers["set-cookie"])s=s.headers["set-cookie"];else{var u=s.headers[Object.keys(s.headers).find(function(c){return c.toLowerCase()==="set-cookie"})];!u&&s.headers.cookie&&!i.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),s=u}if(Array.isArray(s)||(s=[s]),i.map){var h=t();return s.filter(a).reduce(function(c,y){var f=n(y,i);return f&&!r(f.name)&&(c[f.name]=f),c},h)}else return s.filter(a).map(function(c){return n(c,i)}).filter(Boolean)}function d(s){if(Array.isArray(s))return s;if(typeof s!="string")return[];var i=[],u=0,h,c,y,f,p;function w(){for(;u<s.length&&/\s/.test(s.charAt(u));)u+=1;return u<s.length}function m(){return c=s.charAt(u),c!=="="&&c!==";"&&c!==","}for(;u<s.length;){for(h=u,p=!1;w();)if(c=s.charAt(u),c===","){for(y=u,u+=1,w(),f=u;u<s.length&&m();)u+=1;u<s.length&&s.charAt(u)==="="?(p=!0,u=f,i.push(s.substring(h,y)),h=u):u=y+1}else u+=1;(!p||u>=s.length)&&i.push(s.substring(h,s.length))}return i}return A.exports=l,A.exports.parse=l,A.exports.parseString=n,A.exports.splitCookiesString=d,A.exports}var vt=gt(),St={};function ur({context:e,url:r,nonce:t}){typeof r=="string"&&(r=new URL(r));let{manifest:a,routeModules:n,criticalCss:o,serverHandoffString:l}=e,d=Be(a.routes,n,e.future,e.isSpaMode);e.staticHandlerContext.loaderData={...e.staticHandlerContext.loaderData};for(let i of e.staticHandlerContext.matches){let u=i.route.id,h=n[u],c=e.manifest.routes[u];h&&c&&K(u,h.clientLoader,c.hasLoader,e.isSpaMode)&&(h.HydrateFallback||!c.hasLoader)&&delete e.staticHandlerContext.loaderData[u]}let s=me(d,e.staticHandlerContext);return E.createElement(E.Fragment,null,E.createElement(B.Provider,{value:{manifest:a,routeModules:n,criticalCss:o,serverHandoffString:l,future:e.future,ssr:e.ssr,isSpaMode:e.isSpaMode,routeDiscovery:e.routeDiscovery,serializeError:e.serializeError,renderMeta:e.renderMeta}},E.createElement(ye,{location:s.state.location},E.createElement(Re,{router:s,context:e.staticHandlerContext,hydrate:!1}))),e.serverHandoffStream?E.createElement(E.Suspense,null,E.createElement(ze,{context:e,identifier:0,reader:e.serverHandoffStream.getReader(),textDecoder:new TextDecoder,nonce:t})):null)}function dr(e,r){return function({initialEntries:a,initialIndex:n,hydrationData:o,future:l}){let d=E.useRef(),s=E.useRef();if(d.current==null){s.current={future:{unstable_subResourceIntegrity:l?.unstable_subResourceIntegrity===!0,v8_middleware:l?.v8_middleware===!0},manifest:{routes:{},entry:{imports:[],module:""},url:"",version:""},routeModules:{},ssr:!1,isSpaMode:!1,routeDiscovery:{mode:"lazy",manifestPath:"/__manifest"}};let i=be($e(e,u=>u),r!==void 0?r:l?.v8_middleware?new W:{},s.current.manifest,s.current.routeModules);d.current=Ve(i,{initialEntries:a,initialIndex:n,hydrationData:o})}return E.createElement(B.Provider,{value:s.current},E.createElement(ge,{router:d.current}))}}function be(e,r,t,a,n){return e.map(o=>{if(!o.id)throw new Error("Expected a route.id in react-router processRoutes() function");let l={id:o.id,path:o.path,index:o.index,Component:o.Component?Qe(o.Component):void 0,HydrateFallback:o.HydrateFallback?Ke(o.HydrateFallback):void 0,ErrorBoundary:o.ErrorBoundary?Xe(o.ErrorBoundary):void 0,action:o.action?s=>o.action({...s,context:r}):void 0,loader:o.loader?s=>o.loader({...s,context:r}):void 0,middleware:o.middleware?o.middleware.map(s=>(...i)=>s({...i[0],context:r},i[1])):void 0,handle:o.handle,shouldRevalidate:o.shouldRevalidate},d={id:o.id,path:o.path,index:o.index,parentId:n,hasAction:o.action!=null,hasLoader:o.loader!=null,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:o.ErrorBoundary!=null,module:"build/stub-path-to-module.js",clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0};return t.routes[l.id]=d,a[o.id]={default:l.Component||Ge,ErrorBoundary:l.ErrorBoundary||void 0,handle:o.handle,links:o.links,meta:o.meta,shouldRevalidate:o.shouldRevalidate},o.children&&(l.children=be(o.children,r,t,a,l.id)),l})}var G=new TextEncoder,Et=async(e,r)=>{let t=G.encode(e),a=await _e(r,["sign"]),n=await crypto.subtle.sign("HMAC",a,t),o=btoa(String.fromCharCode(...new Uint8Array(n))).replace(/=+$/,"");return e+"."+o},Ct=async(e,r)=>{let t=e.lastIndexOf("."),a=e.slice(0,t),n=e.slice(t+1),o=G.encode(a),l=await _e(r,["verify"]);try{let d=bt(atob(n));return await crypto.subtle.verify("HMAC",l,d,o)?a:!1}catch{return!1}},_e=async(e,r)=>crypto.subtle.importKey("raw",G.encode(e),{name:"HMAC",hash:"SHA-256"},!1,r);function bt(e){let r=new Uint8Array(e.length);for(let t=0;t<e.length;t++)r[t]=e.charCodeAt(t);return r}var xe=(e,r={})=>{let{secrets:t=[],...a}={path:"/",sameSite:"lax",...r};return Ht(e,a.expires),{get name(){return e},get isSigned(){return t.length>0},get expires(){return typeof a.maxAge<"u"?new Date(Date.now()+a.maxAge*1e3):a.expires},async parse(n,o){if(!n)return null;let l=re.parse(n,{...a,...o});if(e in l){let d=l[e];return typeof d=="string"&&d!==""?await xt(d,t):""}else return null},async serialize(n,o){return re.serialize(e,n===""?"":await _t(n,t),{...a,...o})}}},De=e=>e!=null&&typeof e.name=="string"&&typeof e.isSigned=="boolean"&&typeof e.parse=="function"&&typeof e.serialize=="function";async function _t(e,r){let t=Dt(e);return r.length>0&&(t=await Et(t,r[0])),t}async function xt(e,r){if(r.length>0){for(let t of r){let a=await Ct(e,t);if(a!==!1)return ne(a)}return null}return ne(e)}function Dt(e){return btoa(At(encodeURIComponent(JSON.stringify(e))))}function ne(e){try{return JSON.parse(decodeURIComponent(Ft(atob(e))))}catch{return{}}}function Ft(e){let r=e.toString(),t="",a=0,n,o;for(;a<r.length;)n=r.charAt(a++),/[\w*+\-./@]/.exec(n)?t+=n:(o=n.charCodeAt(0),o<256?t+="%"+se(o,2):t+="%u"+se(o,4).toUpperCase());return t}function se(e,r){let t=e.toString(16);for(;t.length<r;)t="0"+t;return t}function At(e){let r=e.toString(),t="",a=0,n,o;for(;a<r.length;){if(n=r.charAt(a++),n==="%"){if(r.charAt(a)==="u"){if(o=r.slice(a+1,a+5),/^[\da-f]{4}$/i.exec(o)){t+=String.fromCharCode(parseInt(o,16)),a+=5;continue}}else if(o=r.slice(a,a+2),/^[\da-f]{2}$/i.exec(o)){t+=String.fromCharCode(parseInt(o,16)),a+=2;continue}}t+=n}return t}function Ht(e,r){Se(!r,`The "${e}" cookie has an "expires" property set. This will cause the expires value to not be updated when the session is committed. Instead, you should set the expires value when serializing the cookie. You can use \`commitSession(session, { expires })\` if using a session storage object, or \`cookie.serialize("value", { expires })\` if you're using the cookie directly.`)}function kt(e){return Object.keys(e).reduce((r,t)=>{let a=e[t];return a&&(r[t]=a.module),r},{})}var Pt=(e=>(e.Development="development",e.Production="production",e.Test="test",e))(Pt||{});function Tt(e){return e==="development"||e==="production"||e==="test"}function z(e,r){if(e instanceof Error&&r!=="development"){let t=new Error("Unexpected Server Error");return t.stack=void 0,t}return e}function I(e,r){return Object.entries(e).reduce((t,[a,n])=>Object.assign(t,{[a]:z(n,r)}),{})}function Fe(e,r){let t=z(e,r);return{message:t.message,stack:t.stack}}function oe(e,r){if(!e)return null;let t=Object.entries(e),a={};for(let[n,o]of t)if(x(o))a[n]={...o,__type:"RouteErrorResponse"};else if(o instanceof Error){let l=z(o,r);a[n]={message:l.message,stack:l.stack,__type:"Error",...l.name!=="Error"?{__subType:l.name}:{}}}else a[n]=o;return a}function q(e,r,t){let a=we(e,r,t);return a?a.map(n=>({params:n.params,pathname:n.pathname,route:n.route})):null}async function ie(e,r){let t=await e({request:Lt(Nt(r.request)),params:r.params,context:r.context,unstable_pattern:r.unstable_pattern});if(at(t)&&t.init&&t.init.status&&Q(t.init.status))throw new Response(null,t.init);return t}function Nt(e){let r=new URL(e.url),t=r.searchParams.getAll("index");r.searchParams.delete("index");let a=[];for(let o of t)o&&a.push(o);for(let o of a)r.searchParams.append("index",o);let n={method:e.method,body:e.body,headers:e.headers,signal:e.signal};return n.body&&(n.duplex="half"),new Request(r.href,n)}function Lt(e){let r=new URL(e.url);r.searchParams.delete("_routes");let t={method:e.method,body:e.body,headers:e.headers,signal:e.signal};return t.body&&(t.duplex="half"),new Request(r.href,t)}function U(e,r){if(e===!1||e===null||typeof e>"u")throw console.error("The following error is a bug in React Router; please open an issue! https://github.com/remix-run/react-router/issues/new/choose"),new Error(r)}var Ae="__reactRouterDevServerHooks";function cr(e){globalThis[Ae]=e}function j(){return globalThis[Ae]}function He(e,r){if(typeof process<"u")try{if(St?.IS_RR_BUILD_REQUEST==="yes")return e.headers.get(r)}catch{}return null}function ke(e){let r={};return Object.values(e).forEach(t=>{if(t){let a=t.parentId||"";r[a]||(r[a]=[]),r[a].push(t)}}),r}function Pe(e,r="",t=ke(e)){return(t[r]||[]).map(a=>({...a,children:Pe(e,a.id,t)}))}function Te(e,r,t="",a=ke(e)){return(a[t]||[]).map(n=>{let o={hasErrorBoundary:n.id==="root"||n.module.ErrorBoundary!=null,id:n.id,path:n.path,middleware:n.module.middleware,loader:n.module.loader?async l=>{let d=He(l.request,"X-React-Router-Prerender-Data");if(d!=null){let i=d&&decodeURI(d);U(i,"Missing prerendered data for route");let u=new TextEncoder().encode(i),h=new ReadableStream({start(f){f.enqueue(u),f.close()}}),y=(await Ee(h,globalThis)).value;if(y&&N in y){let f=y[N],p={status:f.status};throw f.reload?Ze(f.redirect,p):f.replace?et(f.redirect,p):tt(f.redirect,p)}else{U(y&&n.id in y,"Unable to decode prerendered data");let f=y[n.id];return U("data"in f,"Unable to process prerendered data"),f.data}}return await ie(n.module.loader,l)}:void 0,action:n.module.action?l=>ie(n.module.action,l):void 0,handle:n.module.handle};return n.index?{index:!0,...o}:{caseSensitive:n.caseSensitive,children:Te(e,r,n.id,a),...o}})}function le(e){return it(JSON.stringify(e))}function Y(e,r){return Ot(e,t=>{let a=r.routes[t.route.id];return U(a,`Route with id "${t.route.id}" not found in build`),a.module.headers})}function Ot(e,r,t){let a=e.errors?e.matches.findIndex(d=>e.errors[d.route.id]):-1,n=a>=0?e.matches.slice(0,a+1):e.matches,o;if(a>=0){let{actionHeaders:d,actionData:s,loaderHeaders:i,loaderData:u}=e;e.matches.slice(a).some(h=>{let c=h.route.id;return d[c]&&(!s||!s.hasOwnProperty(c))?o=d[c]:i[c]&&!u.hasOwnProperty(c)&&(o=i[c]),o!=null})}const l=new Headers(t);return n.reduce((d,s,i)=>{let{id:u}=s.route,h=e.loaderHeaders[u]||new Headers,c=e.actionHeaders[u]||new Headers,y=o!=null&&i===n.length-1,f=y&&o!==h&&o!==c,p=r(s);if(p==null){let m=new Headers(d);return f&&D(o,m),D(c,m),D(h,m),m}let w=new Headers(typeof p=="function"?p({loaderHeaders:h,parentHeaders:d,actionHeaders:c,errorHeaders:y?o:void 0}):p);return f&&D(o,w),D(c,w),D(h,w),D(d,w),w},new Headers(l))}function D(e,r){let t=e.get("Set-Cookie");if(t){let a=vt.splitCookiesString(t),n=new Set(r.getSetCookie());a.forEach(o=>{n.has(o)||r.append("Set-Cookie",o)})}}var Ne=new Set([...st,304]);async function Ut(e,r,t,a,n,o,l){try{let u=new Request(n,{method:a.method,body:a.body,headers:a.headers,signal:a.signal,...a.body?{duplex:"half"}:void 0}),h=await t.query(u,{requestContext:o,skipLoaderErrorBubbling:!0,skipRevalidation:!0,generateMiddlewareResponse:e.future.v8_middleware?async c=>{try{let y=await c(u);return d(y)}catch(y){return s(y)}}:void 0});return d(h)}catch(u){return s(u)}function d(u){return F(u)?u:i(u)}function s(u){return l(u),L(a,e,r,{result:{error:u},headers:new Headers,status:500})}function i(u){let h=Y(u,e);if(Q(u.statusCode)&&h.has("Location"))return new Response(null,{status:u.statusCode,headers:h});u.errors&&(Object.values(u.errors).forEach(y=>{(!x(y)||y.error)&&l(y)}),u.errors=I(u.errors,r));let c;return u.errors?c={error:Object.values(u.errors)[0]}:c={data:Object.values(u.actionData||{})[0]},L(a,e,r,{result:c,headers:h,status:u.statusCode})}}async function It(e,r,t,a,n,o,l){let d=new URL(a.url).searchParams.get("_routes"),s=d?new Set(d.split(",")):null;try{let c=new Request(n,{headers:a.headers,signal:a.signal}),y=await t.query(c,{requestContext:o,filterMatchesToLoad:f=>!s||s.has(f.route.id),skipLoaderErrorBubbling:!0,generateMiddlewareResponse:e.future.v8_middleware?async f=>{try{let p=await f(c);return i(p)}catch(p){return u(p)}}:void 0});return i(y)}catch(c){return u(c)}function i(c){return F(c)?c:h(c)}function u(c){return l(c),L(a,e,r,{result:{error:c},headers:new Headers,status:500})}function h(c){let y=Y(c,e);if(Q(c.statusCode)&&y.has("Location"))return new Response(null,{status:c.statusCode,headers:y});c.errors&&(Object.values(c.errors).forEach(w=>{(!x(w)||w.error)&&l(w)}),c.errors=I(c.errors,r));let f={},p=new Set(c.matches.filter(w=>s?s.has(w.route.id):w.route.loader!=null).map(w=>w.route.id));if(c.errors)for(let[w,m]of Object.entries(c.errors))f[w]={error:m};for(let[w,m]of Object.entries(c.loaderData))!(w in f)&&p.has(w)&&(f[w]={data:m});return L(a,e,r,{result:f,headers:y,status:c.statusCode})}}function L(e,r,t,{result:a,headers:n,status:o}){let l=new Headers(n);return l.set("X-Remix-Response","yes"),Ne.has(o)?new Response(null,{status:o,headers:l}):(l.set("Content-Type","text/x-script"),l.delete("Content-Length"),new Response(J(a,e.signal,r.entry.module.streamTimeout,t),{status:o||200,headers:l}))}function ue(e,r,t,a){let n=Mt(e.status,e.headers,t.basename),o=new Headers(e.headers);return o.delete("Location"),o.set("Content-Type","text/x-script"),L(r,t,a,{result:r.method==="GET"?{[N]:n}:n,headers:o,status:ve})}function Mt(e,r,t){let a=r.get("Location");return t&&(a=O(a,t)||a),{redirect:a,status:e,revalidate:r.has("X-Remix-Revalidate")||r.has("Set-Cookie"),reload:r.has("X-Remix-Reload-Document"),replace:r.has("X-Remix-Replace")}}function J(e,r,t,a){let n=new AbortController,o=setTimeout(()=>n.abort(new Error("Server Timeout")),typeof t=="number"?t:4950);return r.addEventListener("abort",()=>clearTimeout(o)),ot(e,{signal:n.signal,plugins:[l=>{if(l instanceof Error){let{name:d,message:s,stack:i}=a==="production"?z(l,a):l;return["SanitizedError",d,s,i]}if(l instanceof T){let{data:d,status:s,statusText:i}=l;return["ErrorResponse",d,s,i]}if(l&&typeof l=="object"&&N in l)return["SingleFetchRedirect",l[N]]}],postPlugins:[l=>{if(l&&typeof l=="object")return["SingleFetchClassInstance",Object.fromEntries(Object.entries(l))]},()=>["SingleFetchFallback"]]})}function de(e,r){let t=Pe(e.routes),a=Te(e.routes,e.future),n=Tt(r)?r:"production",o=qe(a,{basename:e.basename,unstable_instrumentations:e.entry.module.unstable_instrumentations}),l=e.entry.module.handleError||((s,{request:i})=>{n!=="test"&&!i.signal.aborted&&console.error(x(s)&&s.error?s.error:s)}),d=async(s,i)=>{let u={},h,c=S=>{r==="development"&&j()?.processRequestError?.(S),l(S,{context:h,params:u,request:s})};if(e.future.v8_middleware){if(i&&!(i instanceof W)){let S=new Error("Invalid `context` value provided to `handleRequest`. When middleware is enabled you must return an instance of `RouterContextProvider` from your `getLoadContext` function.");return c(S),M(S,n)}h=i||new W}else h=i||{};let y=new URL(s.url),f=e.basename||"/",p=y.pathname;O(p,f)==="/_root.data"?p=f:p.endsWith(".data")&&(p=p.replace(/\.data$/,"")),O(p,f)!=="/"&&p.endsWith("/")&&(p=p.slice(0,-1));let w=He(s,"X-React-Router-SPA-Mode")==="yes";if(!e.ssr){let S=decodeURI(p);if(f!=="/"){let C=O(S,f);if(C==null)return l(new T(404,"Not Found",`Refusing to prerender the \`${S}\` path because it does not start with the basename \`${f}\``),{context:h,params:u,request:s}),new Response("Not Found",{status:404,statusText:"Not Found"});S=C}if(e.prerender.length===0)w=!0;else if(!e.prerender.includes(S)&&!e.prerender.includes(S+"/")){if(y.pathname.endsWith(".data"))return l(new T(404,"Not Found",`Refusing to SSR the path \`${S}\` because \`ssr:false\` is set and the path is not included in the \`prerender\` config, so in production the path will be a 404.`),{context:h,params:u,request:s}),new Response("Not Found",{status:404,statusText:"Not Found"});w=!0}}let m=rt(e.routeDiscovery.manifestPath,f);if(y.pathname===m)try{return await Bt(e,t,y)}catch(S){return c(S),new Response("Unknown Server Error",{status:500})}let g=q(t,p,e.basename);g&&g.length>0&&Object.assign(u,g[0].params);let v;if(y.pathname.endsWith(".data")){let S=new URL(s.url);S.pathname=p;let C=q(t,S.pathname,e.basename);v=await zt(n,e,o,s,S,h,c),ee(v)&&(v=ue(v,s,e,n)),e.entry.module.handleDataRequest&&(v=await e.entry.module.handleDataRequest(v,{context:h,params:C?C[0].params:{},request:s}),ee(v)&&(v=ue(v,s,e,n)))}else if(!w&&g&&g[g.length-1].route.module.default==null&&g[g.length-1].route.module.ErrorBoundary==null)v=await $t(n,e,o,g.slice(-1)[0].route.id,s,h,c);else{let{pathname:S}=y,C;e.unstable_getCriticalCss?C=await e.unstable_getCriticalCss({pathname:S}):r==="development"&&j()?.getCriticalCss&&(C=await j()?.getCriticalCss?.(S)),v=await jt(n,e,o,s,h,c,w,C)}return s.method==="HEAD"?new Response(null,{headers:v.headers,status:v.status,statusText:v.statusText}):v};return e.entry.module.unstable_instrumentations&&(d=Je(d,e.entry.module.unstable_instrumentations.map(s=>s.handler).filter(Boolean))),{routes:t,dataRoutes:a,serverMode:n,staticHandler:o,errorHandler:l,requestHandler:d}}var fr=(e,r)=>{let t,a,n,o,l,d;return async function(i,u){if(t=typeof e=="function"?await e():e,typeof e=="function"){let h=de(t,r);a=h.routes,n=h.serverMode,o=h.staticHandler,l=h.errorHandler,d=h.requestHandler}else if(!a||!n||!o||!l||!d){let h=de(t,r);a=h.routes,n=h.serverMode,o=h.staticHandler,l=h.errorHandler,d=h.requestHandler}return d(i,u)}};async function Bt(e,r,t){if(e.assets.version!==t.searchParams.get("version"))return new Response(null,{status:204,headers:{"X-Remix-Reload-Document":"true"}});let a={};if(t.searchParams.has("paths")){let n=new Set;(t.searchParams.get("paths")||"").split(",").filter(Boolean).forEach(d=>{d.startsWith("/")||(d=`/${d}`);let s=d.split("/").slice(1);s.forEach((i,u)=>{let h=s.slice(0,u+1).join("/");n.add(`/${h}`)})});for(let d of n){let s=q(r,d,e.basename);if(s)for(let i of s){let u=i.route.id,h=e.assets.routes[u];h&&(a[u]=h)}}return Response.json(a,{headers:{"Cache-Control":"public, max-age=31536000, immutable"}})}return new Response("Invalid Request",{status:400})}async function zt(e,r,t,a,n,o,l){return a.method!=="GET"?await Ut(r,e,t,a,n,o,l):await It(r,e,t,a,n,o,l)}async function jt(e,r,t,a,n,o,l,d){try{let i=await t.query(a,{requestContext:n,generateMiddlewareResponse:r.future.v8_middleware?async u=>{try{let h=await u(a);return F(h)||(h=await s(h,l)),h}catch(h){return o(h),new Response(null,{status:500})}}:void 0});return F(i)||(i=await s(i,l)),i}catch(i){return o(i),new Response(null,{status:500})}async function s(i,u){let h=Y(i,r);if(Ne.has(i.statusCode))return new Response(null,{status:i.statusCode,headers:h});i.errors&&(Object.values(i.errors).forEach(w=>{(!x(w)||w.error)&&o(w)}),i.errors=I(i.errors,e));let c={loaderData:i.loaderData,actionData:i.actionData,errors:oe(i.errors,e)},y={basename:r.basename,future:r.future,routeDiscovery:r.routeDiscovery,ssr:r.ssr,isSpaMode:u},f={manifest:r.assets,routeModules:kt(r.routes),staticHandlerContext:i,criticalCss:d,serverHandoffString:le({...y,criticalCss:d}),serverHandoffStream:J(c,a.signal,r.entry.module.streamTimeout,e),renderMeta:{},future:r.future,ssr:r.ssr,routeDiscovery:r.routeDiscovery,isSpaMode:u,serializeError:w=>Fe(w,e)},p=r.entry.module.default;try{return await p(a,i.statusCode,h,f,n)}catch(w){o(w);let m=w;if(F(w))try{let v=await Wt(w);m=new T(w.status,w.statusText,v)}catch{}i=nt(t.dataRoutes,i,m),i.errors&&(i.errors=I(i.errors,e));let g={loaderData:i.loaderData,actionData:i.actionData,errors:oe(i.errors,e)};f={...f,staticHandlerContext:i,serverHandoffString:le(y),serverHandoffStream:J(g,a.signal,r.entry.module.streamTimeout,e),renderMeta:{}};try{return await p(a,i.statusCode,h,f,n)}catch(v){return o(v),M(v,e)}}}}async function $t(e,r,t,a,n,o,l){try{let i=await t.queryRoute(n,{routeId:a,requestContext:o,generateMiddlewareResponse:r.future.v8_middleware?async u=>{try{let h=await u(n);return d(h)}catch(h){return s(h)}}:void 0});return d(i)}catch(i){return s(i)}function d(i){return F(i)?i:typeof i=="string"?new Response(i):Response.json(i)}function s(i){if(F(i))return i;if(x(i))return l(i),Vt(i,e);if(i instanceof Error&&i.message==="Expected a response from queryRoute"){let u=new Error("Expected a Response to be returned from resource route handler");return l(u),M(u,e)}return l(i),M(i,e)}}function Vt(e,r){return Response.json(Fe(e.error||new Error("Unexpected Server Error"),r),{status:e.status,statusText:e.statusText})}function M(e,r){let t="Unexpected Server Error";return r!=="production"&&(t+=`
|
|
2
|
-
|
|
3
|
-
${String(e)}`),new Response(t,{status:500,headers:{"Content-Type":"text/plain"}})}function Wt(e){let r=e.headers.get("Content-Type");return r&&/\bapplication\/json\b/.test(r)?e.body==null?null:e.json():e.text()}function $(e){return`__flash_${e}__`}var Le=(e={},r="")=>{let t=new Map(Object.entries(e));return{get id(){return r},get data(){return Object.fromEntries(t)},has(a){return t.has(a)||t.has($(a))},get(a){if(t.has(a))return t.get(a);let n=$(a);if(t.has(n)){let o=t.get(n);return t.delete(n),o}},set(a,n){t.set(a,n)},flash(a,n){t.set($(a),n)},unset(a){t.delete(a)}}},hr=e=>e!=null&&typeof e.id=="string"&&typeof e.data<"u"&&typeof e.has=="function"&&typeof e.get=="function"&&typeof e.set=="function"&&typeof e.flash=="function"&&typeof e.unset=="function";function qt({cookie:e,createData:r,readData:t,updateData:a,deleteData:n}){let o=De(e)?e:xe(e?.name||"__session",e);return Oe(o),{async getSession(l,d){let s=l&&await o.parse(l,d),i=s&&await t(s);return Le(i||{},s||"")},async commitSession(l,d){let{id:s,data:i}=l,u=d?.maxAge!=null?new Date(Date.now()+d.maxAge*1e3):d?.expires!=null?d.expires:o.expires;return s?await a(s,i,u):s=await r(i,u),o.serialize(s,d)},async destroySession(l,d){return await n(l.id),o.serialize("",{...d,maxAge:void 0,expires:new Date(0)})}}}function Oe(e){Se(e.isSigned,`The "${e.name}" cookie is not signed, but session cookies should be signed to prevent tampering on the client before they are sent back to the server. See https://reactrouter.com/explanation/sessions-and-cookies#signing-cookies for more information.`)}function pr({cookie:e}={}){let r=De(e)?e:xe(e?.name||"__session",e);return Oe(r),{async getSession(t,a){return Le(t&&await r.parse(t,a)||{})},async commitSession(t,a){let n=await r.serialize(t.data,a);if(n.length>4096)throw new Error("Cookie length will exceed browser maximum. Length: "+n.length);return n},async destroySession(t,a){return r.serialize("",{...a,maxAge:void 0,expires:new Date(0)})}}}function mr({cookie:e}={}){let r=new Map;return qt({cookie:e,async createData(t,a){let n=Math.random().toString(36).substring(2,10);return r.set(n,{data:t,expires:a}),n},async readData(t){if(r.has(t)){let{data:a,expires:n}=r.get(t);if(!n||n>new Date)return a;n&&r.delete(t)}return null},async updateData(t,a,n){r.set(t,{data:a,expires:n})},async deleteData(t){r.delete(t)}})}function yr(e,...r){let t=r[0],a=e.replace(/\/*\*?$/,"").replace(/\/:([\w-]+)(\?)?/g,(n,o,l)=>{const d=l===void 0,s=t?t[o]:void 0;if(d&&s===void 0)throw new Error(`Path '${e}' requires param '${o}' but it was not provided`);return s===void 0?"":"/"+s});if(e.endsWith("*")){const n=t?t["*"]:void 0;n!==void 0&&(a+="/"+n)}return a||"/"}var X=new TextEncoder,ce="</body></html>";function fe(e){let r=new TextDecoder,t,a=new Promise(s=>t=s),n=!1,o=[],l=null;function d(s){for(let i of o){let u=r.decode(i,{stream:!0});u.endsWith(ce)&&(u=u.slice(0,-ce.length)),s.enqueue(X.encode(u))}o.length=0,l=null}return new TransformStream({transform(s,i){o.push(s),!l&&(l=setTimeout(async()=>{d(i),n||(n=!0,Jt(e,i).catch(u=>i.error(u)).then(t))},0))},async flush(s){await a,l&&(clearTimeout(l),d(s)),s.enqueue(X.encode("</body></html>"))}})}async function Jt(e,r){let t=new TextDecoder("utf-8",{fatal:!0});const a=e.getReader();try{let o;for(;(o=await a.read())&&!o.done;){const l=o.value;try{V(JSON.stringify(t.decode(l,{stream:!0})),r)}catch{let s=JSON.stringify(btoa(String.fromCodePoint(...l)));V(`Uint8Array.from(atob(${s}), m => m.codePointAt(0))`,r)}}}finally{a.releaseLock()}let n=t.decode();n.length&&V(JSON.stringify(n),r)}function V(e,r){r.enqueue(X.encode(`<script>${Xt(`(self.__FLIGHT_DATA||=[]).push(${e})`)}<\/script>`))}function Xt(e){return e.replace(/<!--/g,"<\\!--").replace(/<\/(script)/gi,"</\\$1")}var Kt=class extends b.Component{constructor(e){super(e),this.state={error:null,location:e.location}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location?{error:null,location:e.location}:{error:r.error,location:r.location}}render(){return this.state.error?b.createElement(Ue,{error:this.state.error,renderAppShell:!0}):this.props.children}};function he({renderAppShell:e,title:r,children:t}){return e?b.createElement("html",{lang:"en"},b.createElement("head",null,b.createElement("meta",{charSet:"utf-8"}),b.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),b.createElement("title",null,r)),b.createElement("body",null,b.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},t))):t}function Ue({error:e,renderAppShell:r}){console.error(e);let t=b.createElement("script",{dangerouslySetInnerHTML:{__html:`
|
|
4
|
-
console.log(
|
|
5
|
-
"💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."
|
|
6
|
-
);
|
|
7
|
-
`}});if(x(e))return b.createElement(he,{renderAppShell:r,title:"Unhandled Thrown Response!"},b.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),t);let a;if(e instanceof Error)a=e;else{let n=e==null?"Unknown Error":typeof e=="object"&&"toString"in e?e.toString():JSON.stringify(e);a=new Error(n)}return b.createElement(he,{renderAppShell:r,title:"Application Error!"},b.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),b.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},a.stack),t)}function Rr({hasRootLayout:e}){let r=je();if(e===void 0)throw new Error("Missing 'hasRootLayout' prop");return b.createElement(Ue,{renderAppShell:!e,error:r})}function Qt(e){const r={};for(const t of e.matches)Gt(r,t);return r}function Gt(e,r){r=Array.isArray(r)?r:[r];for(const t of r)e[t.id]={links:t.links,meta:t.meta,default:Yt}}var Yt=()=>null,Zt="use",pe=Ye[Zt];function er(e){if(pe)return pe(e);throw new Error("React Router v7 requires React 19+ for RSC features.")}async function wr({request:e,fetchServer:r,createFromReadableStream:t,renderHTML:a,hydrate:n=!0}){const o=new URL(e.url),d=tr(o)||rr(o)||e.headers.has("rsc-action-id"),s=await r(e);if(d||s.headers.get("React-Router-Resource")==="true")return s;if(!s.body)throw new Error("Missing body in server response");const i=s.clone();let u=null;n&&(u=s.clone());const h=s.body;let c,y=[];const f=()=>c?new ReadableStream({start(m){c.forEach(g=>m.enqueue(g)),y.push(m)}}):(c=[],h.pipeThrough(new TransformStream({transform(m,g){c.push(m),g.enqueue(m),y.forEach(v=>v.enqueue(m))},flush(){y.forEach(m=>m.close()),y=[]}})));let p=null;const w=()=>{const m=Promise.resolve(t(f()));return Object.defineProperties(m,{_deepestRenderedBoundaryId:{get(){return p},set(g){p=g}},formState:{get(){return m.then(g=>g.type==="render"?g.formState:void 0)}}})};try{if(!i.body)throw new Error("Failed to clone server response");const m=await t(i.body);if(s.status===ve&&m.type==="redirect"){const C=new Headers(s.headers);return C.delete("Content-Encoding"),C.delete("Content-Length"),C.delete("Content-Type"),C.delete("X-Remix-Response"),C.set("Location",m.location),new Response(u?.body||"",{headers:C,status:m.status,statusText:s.statusText})}const g=await a(w),v=new Headers(s.headers);if(v.set("Content-Type","text/html; charset=utf-8"),!n)return new Response(g,{status:s.status,headers:v});if(!u?.body)throw new Error("Failed to clone server response");const S=g.pipeThrough(fe(u.body));return new Response(S,{status:s.status,headers:v})}catch(m){if(m instanceof Response)return m;try{const g=x(m)?m.status:500,v=await a(()=>{const H=Promise.resolve(t(f())).then(_=>Object.assign(_,{status:g,errors:p?{[p]:m}:{}}));return Object.defineProperties(H,{_deepestRenderedBoundaryId:{get(){return p},set(_){p=_}},formState:{get(){return H.then(_=>_.type==="render"?_.formState:void 0)}}})}),S=new Headers(s.headers);if(S.set("Content-Type","text/html"),!n)return new Response(v,{status:g,headers:S});if(!u?.body)throw new Error("Failed to clone server response");const C=v.pipeThrough(fe(u.body));return new Response(C,{status:g,headers:S})}catch{}throw m}}function gr({getPayload:e}){const r=e(),t=er(r);if(t.type==="redirect")throw new Response(null,{status:t.status,headers:{Location:t.location}});if(t.type!=="render")return null;let a={...t.loaderData};for(const d of t.matches)K(d.id,d.clientLoader,d.hasLoader,!1)&&(d.hydrateFallbackElement||!d.hasLoader)&&delete a[d.id];const n={get _deepestRenderedBoundaryId(){return r._deepestRenderedBoundaryId??null},set _deepestRenderedBoundaryId(d){r._deepestRenderedBoundaryId=d},actionData:t.actionData,actionHeaders:{},basename:t.basename,errors:t.errors,loaderData:a,loaderHeaders:{},location:t.location,statusCode:200,matches:t.matches.map(d=>({params:d.params,pathname:d.pathname,pathnameBase:d.pathnameBase,route:{id:d.id,action:d.hasAction||!!d.clientAction,handle:d.handle,hasErrorBoundary:d.hasErrorBoundary,loader:d.hasLoader||!!d.clientLoader,index:d.index,path:d.path,shouldRevalidate:d.shouldRevalidate}}))},o=me(t.matches.reduceRight((d,s)=>{const i={id:s.id,action:s.hasAction||!!s.clientAction,element:s.element,errorElement:s.errorElement,handle:s.handle,hasErrorBoundary:!!s.errorElement,hydrateFallbackElement:s.hydrateFallbackElement,index:s.index,loader:s.hasLoader||!!s.clientLoader,path:s.path,shouldRevalidate:s.shouldRevalidate};return d.length>0&&(i.children=d),[i]},[]),n),l={future:{v8_middleware:!1,unstable_subResourceIntegrity:!1},isSpaMode:!1,ssr:!0,criticalCss:"",manifest:{routes:{},version:"1",url:"",entry:{module:"",imports:[]}},routeDiscovery:{mode:"lazy",manifestPath:"/__manifest"},routeModules:Qt(t)};return E.createElement(We.Provider,{value:!0},E.createElement(Kt,{location:t.location},E.createElement(B.Provider,{value:l},E.createElement(Re,{context:n,router:o,hydrate:!1,nonce:t.nonce}))))}function tr(e){return e.pathname.endsWith(".rsc")}function rr(e){return e.pathname.endsWith(".manifest")}function ar(e){if(!e)return null;let r=Object.entries(e),t={};for(let[a,n]of r)if(n&&n.__type==="RouteErrorResponse")t[a]=new T(n.status,n.statusText,n.data,n.internal===!0);else if(n&&n.__type==="Error"){if(n.__subType){let o=window[n.__subType];if(typeof o=="function")try{let l=new o(n.message);l.stack=n.stack,t[a]=l}catch{}}if(t[a]==null){let o=new Error(n.message);o.stack=n.stack,t[a]=o}}else t[a]=n;return t}function nr({state:e,routes:r,getRouteInfo:t,location:a,basename:n,isSpaMode:o}){let l={...e,loaderData:{...e.loaderData}},d=we(r,a,n);if(d)for(let s of d){let i=s.route.id,u=t(i);K(i,u.clientLoader,u.hasLoader,o)&&(u.hasHydrateFallback||!u.hasLoader)?delete l.loaderData[i]:u.hasLoader||(l.loaderData[i]=null)}return l}function sr(e){return E.createElement(ge,{flushSync:ut.flushSync,...e})}var R=null,P=null;function or(){if(!R&&window.__reactRouterContext&&window.__reactRouterManifest&&window.__reactRouterRouteModules){if(window.__reactRouterManifest.sri===!0){const e=document.querySelector("script[rr-importmap]");if(e?.textContent)try{window.__reactRouterManifest.sri=JSON.parse(e.textContent).integrity}catch(r){console.error("Failed to parse import map",r)}}R={context:window.__reactRouterContext,manifest:window.__reactRouterManifest,routeModules:window.__reactRouterRouteModules,stateDecodingPromise:void 0,router:void 0,routerInitialized:!1}}}function ir({getContext:e,unstable_instrumentations:r}){if(or(),!R)throw new Error("You must be using the SSR features of React Router in order to skip passing a `router` prop to `<RouterProvider>`");let t=R;if(!R.stateDecodingPromise){let l=R.context.stream;Ce(l,"No stream found for single fetch decoding"),R.context.stream=void 0,R.stateDecodingPromise=Ee(l,window).then(d=>{R.context.state=d.value,t.stateDecodingPromise.value=!0}).catch(d=>{t.stateDecodingPromise.error=d})}if(R.stateDecodingPromise.error)throw R.stateDecodingPromise.error;if(!R.stateDecodingPromise.value)throw R.stateDecodingPromise;let a=dt(R.manifest.routes,R.routeModules,R.context.state,R.context.ssr,R.context.isSpaMode),n;if(R.context.isSpaMode){let{loaderData:l}=R.context.state;R.manifest.routes.root?.hasLoader&&l&&"root"in l&&(n={loaderData:{root:l.root}})}else n=nr({state:R.context.state,routes:a,getRouteInfo:l=>({clientLoader:R.routeModules[l]?.clientLoader,hasLoader:R.manifest.routes[l]?.hasLoader===!0,hasHydrateFallback:R.routeModules[l]?.HydrateFallback!=null}),location:window.location,basename:window.__reactRouterContext?.basename,isSpaMode:R.context.isSpaMode}),n&&n.errors&&(n.errors=ar(n.errors));let o=ct({routes:a,history:yt(),basename:R.context.basename,getContext:e,hydrationData:n,hydrationRouteProperties:mt,unstable_instrumentations:r,mapRouteProperties:pt,future:{middleware:R.context.future.v8_middleware},dataStrategy:ht(()=>o,R.manifest,R.routeModules,R.context.ssr,R.context.basename),patchRoutesOnNavigation:ft(R.manifest,R.routeModules,R.context.ssr,R.context.routeDiscovery,R.context.isSpaMode,R.context.basename)});return R.router=o,o.state.initialized&&(R.routerInitialized=!0,o.initialize()),o.createRoutesForHMR=Rt,window.__reactRouterDataRouter=o,o}function vr(e){P||(P=ir({getContext:e.getContext,unstable_instrumentations:e.unstable_instrumentations}));let[r,t]=E.useState(void 0);E.useEffect(()=>{},[]),E.useEffect(()=>{},[r]);let[a,n]=E.useState(P.state.location);return E.useLayoutEffect(()=>{R&&R.router&&!R.routerInitialized&&(R.routerInitialized=!0,R.router.initialize())},[]),E.useLayoutEffect(()=>{if(R&&R.router)return R.router.subscribe(o=>{o.location!==a&&n(o.location)})},[a]),Ce(R,"ssrInfo unavailable for HydratedRouter"),lt(P,R.manifest,R.routeModules,R.context.ssr,R.context.routeDiscovery,R.context.isSpaMode),E.createElement(E.Fragment,null,E.createElement(B.Provider,{value:{manifest:R.manifest,routeModules:R.routeModules,future:R.context.future,criticalCss:r,ssr:R.context.ssr,isSpaMode:R.context.isSpaMode,routeDiscovery:R.context.routeDiscovery}},E.createElement(ye,{location:a},E.createElement(sr,{router:P,unstable_onError:e.unstable_onError}))),E.createElement(E.Fragment,null))}export{Cr as Await,br as BrowserRouter,_r as Form,xr as HashRouter,vr as HydratedRouter,Dr as IDLE_BLOCKER,Fr as IDLE_FETCHER,Ar as IDLE_NAVIGATION,Hr as Link,kr as Links,Pr as MemoryRouter,Tr as Meta,Nr as NavLink,Lr as Navigate,Or as NavigationType,Ge as Outlet,Ur as PrefetchPageLinks,Ir as Route,Mr as Router,W as RouterContextProvider,sr as RouterProvider,Br as Routes,zr as Scripts,jr as ScrollRestoration,ur as ServerRouter,$r as StaticRouter,Re as StaticRouterProvider,Vr as UNSAFE_AwaitContextProvider,Wr as UNSAFE_DataRouterContext,qr as UNSAFE_DataRouterStateContext,T as UNSAFE_ErrorResponseImpl,Jr as UNSAFE_FetchersContext,B as UNSAFE_FrameworkContext,Xr as UNSAFE_LocationContext,Kr as UNSAFE_NavigationContext,Rr as UNSAFE_RSCDefaultRootErrorBoundary,ye as UNSAFE_RemixErrorBoundary,Qr as UNSAFE_RouteContext,Pt as UNSAFE_ServerMode,N as UNSAFE_SingleFetchRedirectSymbol,Gr as UNSAFE_ViewTransitionContext,Yr as UNSAFE_WithComponentProps,Zr as UNSAFE_WithErrorBoundaryProps,ea as UNSAFE_WithHydrateFallbackProps,yt as UNSAFE_createBrowserHistory,dt as UNSAFE_createClientRoutes,Rt as UNSAFE_createClientRoutesWithHMRRevalidationOptOut,ct as UNSAFE_createRouter,Ee as UNSAFE_decodeViaTurboStream,ar as UNSAFE_deserializeErrors,nr as UNSAFE_getHydrationData,ft as UNSAFE_getPatchRoutesOnNavigationFunction,ht as UNSAFE_getTurboStreamSingleFetchDataStrategy,mt as UNSAFE_hydrationRouteProperties,Ce as UNSAFE_invariant,pt as UNSAFE_mapRouteProperties,K as UNSAFE_shouldHydrateRouteLoader,lt as UNSAFE_useFogOFWarDiscovery,ta as UNSAFE_useScrollRestoration,Qe as UNSAFE_withComponentProps,Xe as UNSAFE_withErrorBoundaryProps,Ke as UNSAFE_withHydrateFallbackProps,ra as createBrowserRouter,aa as createContext,xe as createCookie,pr as createCookieSessionStorage,na as createHashRouter,Ve as createMemoryRouter,mr as createMemorySessionStorage,sa as createPath,fr as createRequestHandler,oa as createRoutesFromChildren,ia as createRoutesFromElements,dr as createRoutesStub,la as createSearchParams,Le as createSession,qt as createSessionStorage,ua as createStaticHandler,me as createStaticRouter,da as data,ca as generatePath,yr as href,De as isCookie,x as isRouteErrorResponse,hr as isSession,fa as matchPath,we as matchRoutes,ha as parsePath,tt as redirect,Ze as redirectDocument,pa as renderMatches,et as replace,ma as resolvePath,ya as unstable_HistoryRouter,gr as unstable_RSCStaticRouter,wr as unstable_routeRSCServerRequest,cr as unstable_setDevServerHooks,Ra as unstable_usePrompt,wa as unstable_useRoute,ga as useActionData,va as useAsyncError,Sa as useAsyncValue,Ea as useBeforeUnload,Ca as useBlocker,ba as useFetcher,_a as useFetchers,xa as useFormAction,Da as useHref,Fa as useInRouterContext,Aa as useLinkClickHandler,Ha as useLoaderData,ka as useLocation,Pa as useMatch,Ta as useMatches,Na as useNavigate,La as useNavigation,Oa as useNavigationType,Ua as useOutlet,Ia as useOutletContext,Ma as useParams,Ba as useResolvedPath,za as useRevalidator,je as useRouteError,ja as useRouteLoaderData,$a as useRoutes,Va as useSearchParams,Wa as useSubmit,qa as useViewTransitionState};
|